ext
stringclasses
9 values
sha
stringlengths
40
40
content
stringlengths
3
1.04M
py
7dfa28536595b3985b7d3bb004497909d3738e6d
""" Module for the class PageUsageBitmap. Constants: BITMAP_GRANULARITY (int): tells how many bytes are addressed by a bit in the bitmap. BITMAP_BIT_SIZE (int): the size of the int used in the bitmap (64 -> c_uint64). MEMORY_CHUNK_SIZE (int): number of bytes addressed by a single c_uint64. PAGE_SIZE (int): the size of a page. """ from ctypes import c_uint64 BITMAP_GRANULARITY = 1 # DON'T change these values BITMAP_BIT_SIZE = 64 MEMORY_CHUNK_SIZE = BITMAP_GRANULARITY * BITMAP_BIT_SIZE PAGE_SIZE = 4096 class PageUsageBitmap: """ A class that represent the actual usage of a page. Attributes: base (int): the address base of the page (must be page aligned). chunk_bitmap_list (list): a list of c_uint64 that tells the usage of a memory chunk. """ def __init__(self, base): self.base = base self.chunk_bitmap_list = [c_uint64(0) for _ in range(PAGE_SIZE / MEMORY_CHUNK_SIZE)] def __access_correct_bitmap(self, address): # type: (int) -> tuple chunk_bitmap_offset = address ^ self.base chunk_bitmap_offset = int(chunk_bitmap_offset / MEMORY_CHUNK_SIZE) % MEMORY_CHUNK_SIZE return chunk_bitmap_offset, self.chunk_bitmap_list[chunk_bitmap_offset].value def address_wrote(self, address, written_bytes=1): # type: (int, int) -> None """ Updates the bitmap to remember that from the given address a certain number of bytes were written. :param address: the address from which the wrote has begun. :param written_bytes: the number of written bytes. :return: None """ written_bytes /= BITMAP_GRANULARITY while written_bytes > 0 and address < self.base + PAGE_SIZE: chunk_bitmap_offset, bitmap_value = self.__access_correct_bitmap(address) memory_chunk_base = MEMORY_CHUNK_SIZE * chunk_bitmap_offset masked_address = address ^ self.base bit_offset = int((masked_address - memory_chunk_base) / BITMAP_GRANULARITY) % BITMAP_BIT_SIZE for offset in range(bit_offset, bit_offset + written_bytes): if 0 <= offset < BITMAP_BIT_SIZE: bitmap_value |= (c_uint64(1).value << c_uint64(offset).value) written_bytes -= 1 elif chunk_bitmap_offset < (PAGE_SIZE / MEMORY_CHUNK_SIZE): address = self.base + memory_chunk_base + MEMORY_CHUNK_SIZE break self.chunk_bitmap_list[chunk_bitmap_offset] = c_uint64(bitmap_value) def is_address_wrote(self, address): # type: (int) -> tuple """ Tells if an address has been written and the number of written bytes. :param address: the address from which the check must start. :return: a tuple (bool, int) that tells if the memory zone has been written and by how many bytes. """ chunk_bitmap_offset, bitmap_value = self.__access_correct_bitmap(address) memory_chunk_base = MEMORY_CHUNK_SIZE * chunk_bitmap_offset masked_address = address ^ self.base bit_offset = int((masked_address - memory_chunk_base) / BITMAP_GRANULARITY) % BITMAP_BIT_SIZE written_size = 0 for offset in range(bit_offset, MEMORY_CHUNK_SIZE): if not bitmap_value & (c_uint64(1).value << c_uint64(offset).value): break written_size += 1 return written_size != 0, written_size if __name__ == '__main__': bm = PageUsageBitmap(0x10f00000) bm.address_wrote(0x10f00ffc, 10) for value in bm.chunk_bitmap_list: print hex(value.value) print '\n\n' print bm.is_address_wrote(0x10f00ffc)
py
7dfa2871416e231282e85be2a3765e1790b8560a
# Project: MapServer # Purpose: xUnit style Python mapscript tests of SymbolSet # Author: Sean Gillies, [email protected] # # =========================================================================== # Copyright (c) 2004, Sean Gillies # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # =========================================================================== import os import unittest import mapscript from .testing import MapTestCase, XMARKS_IMAGE, TESTS_PATH SYMBOLSET = os.path.join(TESTS_PATH, "symbols.txt") class SymbolSetTestCase(unittest.TestCase): def testConstructorNoArgs(self): """new instance of symbolSetObj should have one symbol""" symbolset = mapscript.symbolSetObj() num = symbolset.numsymbols assert num == 1, num def testConstructorFile(self): """new instance of symbolSetObj from symbols.txt""" symbolset = mapscript.symbolSetObj(SYMBOLSET) num = symbolset.numsymbols assert num == 4, num def testAddSymbolToNewSymbolSet(self): """add two new symbols to a SymbolSet""" symbolset = mapscript.symbolSetObj(SYMBOLSET) symbola = mapscript.symbolObj('testa') symbolb = mapscript.symbolObj('testb') symbolset.appendSymbol(symbola) symbolset.appendSymbol(symbolb) num = symbolset.numsymbols assert num == 6, num names = [None, 'circle', 'xmarks-png', 'home-png', 'testa', 'testb'] for i in range(symbolset.numsymbols): symbol = symbolset.getSymbol(i) assert symbol.name == names[i], symbol.name def testRemoveSymbolFromNewSymbolSet(self): """after removing a symbol, expect numsymbols -= 1""" symbolset = mapscript.symbolSetObj(SYMBOLSET) symbolset.removeSymbol(1) num = symbolset.numsymbols assert num == 3, num def testSaveNewSymbolSet(self): """save a new SymbolSet to disk""" symbolset = mapscript.symbolSetObj(SYMBOLSET) symbola = mapscript.symbolObj('testa') symbolb = mapscript.symbolObj('testb') symbolset.appendSymbol(symbola) symbolset.appendSymbol(symbolb) assert symbolset.save('new_symbols.txt') == mapscript.MS_SUCCESS def testError(self): symbolset = mapscript.symbolSetObj(SYMBOLSET) symbola = mapscript.symbolObj('testa') symbolb = mapscript.symbolObj('testb') symbolset.appendSymbol(symbola) symbolset.appendSymbol(symbolb) self.assertRaises(mapscript.MapServerError, symbolset.save, '/bogus/new_symbols.txt') class MapSymbolSetTestCase(MapTestCase): def testGetNumSymbols(self): """expect getNumSymbols == 2 from test fixture test.map""" num = self.map.getNumSymbols() assert num == 4, num def testSymbolSetNumsymbols(self): """expect numsymbols == 2 from test fixture test.map""" num = self.map.symbolset.numsymbols assert num == 4, num def testSymbolSetSymbolNames(self): """test names of symbols in test fixture's symbolset""" set = self.map.symbolset names = [None, 'circle', 'xmarks-png', 'home-png'] for i in range(set.numsymbols): symbol = set.getSymbol(i) assert symbol.name == names[i], symbol.name def testSymbolIndex(self): """expect index of 'circle' symbol to be 1 in test fixture symbolset""" i = self.map.symbolset.index('circle') assert i == 1, i def testBug1962(self): """resetting imagepath doesn't cause segfault""" layer = self.map.getLayerByName('POINT') style0 = layer.getClass(0).getStyle(0) sym0 = style0.symbol sym1 = self.map.symbolset.getSymbol(sym0) sym2 = mapscript.symbolObj('xxx') assert sym2 is not None sym1.setImagepath(XMARKS_IMAGE) # self.assertRaises(IOError, sym1.setImagepath, '/bogus/new_symbols.txt') msimg = self.map.draw() assert msimg.thisown == 1 data = msimg.getBytes() filename = 'testBug1962.png' fh = open(filename, 'wb') fh.write(data) fh.close() def testDrawNewSymbol(self): """draw using a new symbol added to the fixture""" symbol = mapscript.symbolObj('xmarks', XMARKS_IMAGE) symbol_index = self.map.symbolset.appendSymbol(symbol) assert symbol_index == 4, symbol_index num = self.map.symbolset.numsymbols assert num == 5, num inline_layer = self.map.getLayerByName('INLINE') s = inline_layer.getClass(0).getStyle(0) s.symbol = symbol_index # s.size = 24 msimg = self.map.draw() assert msimg.thisown == 1 filename = 'testDrawNewSymbol.png' fh = open(filename, 'wb') msimg.write(fh) fh.close() if __name__ == '__main__': unittest.main()
py
7dfa28b619269935caa93ac7a51b66cbd8887f3b
from yandeley.models.groups import Group, GroupMember from yandeley.resources.base import ListResource, GetByIdResource class Groups(GetByIdResource, ListResource): """ Top-level resource for accessing groups. """ _url = '/groups' def __init__(self, session): self.session = session def get(self, id): """ Retrieves a group by ID. :param id: the ID of the group to get. :return: a :class:`Group <yandeley.models.groups.Group>`. """ return super(Groups, self).get(id) def list(self, page_size=None): """ Retrieves groups that the logged-in user is a member of, as a paginated collection. :param page_size: the number of groups to return on each page. Defaults to 20. :return: a :class:`Page <yandeley.pagination.Page>` of :class:`Groups <yandeley.models.groups.Group>`. """ return super(Groups, self).list(page_size) def iter(self, page_size=None): """ Retrieves groups that the logged-in user is a member of, as an iterator. :param page_size: the number of groups to retrieve at a time. Defaults to 20. :return: an iterator of :class:`Groups <yandeley.models.groups.Group>`. """ return super(Groups, self).iter(page_size) @property def _session(self): return self.session def _obj_type(self, **kwargs): return Group class GroupMembers(ListResource): """ Resource for accessing members of a group. """ def __init__(self, session, id): self.session = session self.id = id def list(self, page_size=None): """ Retrieves members of the group, as a paginated collection. :param page_size: the number of members to return on each page. Defaults to 20. :return: a :class:`Page <yandeley.pagination.Page>` of :class:`GroupMembers <yandeley.models.groups.GroupMember>`. """ return super(GroupMembers, self).list(page_size) def iter(self, page_size=None): """ Retrieves members of the group, as an iterator. :param page_size: the number of members to retrieve at a time. Defaults to 20. :return: an iterator of :class:`GroupMembers <yandeley.models.groups.GroupMember>`. """ return super(GroupMembers, self).iter(page_size) @property def _session(self): return self.session def _obj_type(self, **kwargs): return GroupMember @property def _url(self): return '/groups/%s/members' % self.id
py
7dfa294821fb4a72e4bee66fe5e66ee1d797f19f
import pandas as pd import matplotlib.pyplot as plt import re import time import numpy as np from nltk.corpus import stopwords from sklearn.preprocessing import normalize from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer import sys, os import pandas as pd import numpy as np from tqdm import tqdm from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.feature_extraction.text import CountVectorizer # exctract word2vec vectors # https://github.com/explosion/spaCy/issues/1721 # http://landinghub.visualstudio.com/visual-cpp-build-tools import spacy # avoid decoding problems df = pd.read_csv("dataset/train.csv") # encode questions to unicode # https://stackoverflow.com/a/6812069 # ----------------- python 2 --------------------- # df['question1'] = df['question1'].apply(lambda x: unicode(str(x),"utf-8")) # df['question2'] = df['question2'].apply(lambda x: unicode(str(x),"utf-8")) # ----------------- python 3 --------------------- df['question1'] = df['question1'].apply(lambda x: str(x)) df['question2'] = df['question2'].apply(lambda x: str(x)) df.head() """ id qid1 qid2 question1 \ 0 0 1 2 What is the step by step guide to invest in sh... 1 1 3 4 What is the story of Kohinoor (Koh-i-Noor) Dia... 2 2 5 6 How can I increase the speed of my internet co... 3 3 7 8 Why am I mentally very lonely? How can I solve... 4 4 9 10 Which one dissolve in water quikly sugar, salt... question2 is_duplicate 0 What is the step by step guide to invest in sh... 0 1 What would happen if the Indian government sto... 0 2 How can Internet speed be increased by hacking... 0 3 Find the remainder when [math]23^{24}[/math] i... 0 4 Which fish would survive in salt water? 0 """ # merge texts questions = list(df['question1']) + list(df['question2']) tfidf = TfidfVectorizer(lowercase=False) tfidf.fit_transform(questions) # dict key:word and value:tf-idf score word2tfidf = dict(zip(tfidf.get_feature_names(), tfidf.idf_)) """ sample: 'Qnet': 12.20514086571145, 'QoQ': 13.909888957949875, 'Qorvo': 13.909888957949875, 'Qoura': 11.169048934024675, 'Qr': 13.909888957949875, 'Qraft': 13.21674177738993, 'Qrcode': 13.909888957949875, 'Qs': 13.21674177738993, 'Qt': 12.811276669281765, 'Qu': 13.909888957949875, - After we find TF-IDF scores, we convert each question to a weighted average of word2vec vectors by these scores. - here we use a pre-trained GLOVE model which comes free with "Spacy". https://spacy.io/usage/vectors-similarity - It is trained on Wikipedia and therefore, it is stronger in terms of word semantics.""" # en_vectors_web_lg, which includes over 1 million unique vectors. nlp = spacy.load('en_core_web_sm') vecs1 = [] # https://github.com/noamraph/tqdm # tqdm is used to print the progress bar for qu1 in tqdm(list(df['question1'])): doc1 = nlp(qu1) # 96 is the number of dimensions of vectors mean_vec1 = np.zeros([len(doc1), len(doc1[0].vector)]) for word1 in doc1: # word2vec vec1 = word1.vector # fetch df score try: idf = word2tfidf[str(word1)] except: idf = 0 # compute final vec mean_vec1 += vec1 * idf mean_vec1 = mean_vec1.mean(axis=0) vecs1.append(mean_vec1) df['q1_feats_m'] = list(vecs1) vecs2 = [] for qu2 in tqdm(list(df['question2'])): doc2 = nlp(qu2) mean_vec2 = np.zeros([len(doc1), len(doc2[0].vector)]) for word2 in doc2: # word2vec vec2 = word2.vector # fetch df score try: idf = word2tfidf[str(word2)] except: idf = 0 # compute final vec mean_vec2 += vec2 * idf mean_vec2 = mean_vec2.mean(axis=0) vecs2.append(mean_vec2) df['q2_feats_m'] = list(vecs2) #prepro_features_train.csv (Simple Preprocessing Feartures) #nlp_features_train.csv (NLP Features) if os.path.isfile('dataset/nlp_features_train.csv'): dfnlp = pd.read_csv("dataset/nlp_features_train.csv",encoding='latin-1') else: print("generate nlp_features_train.csv from 0.5_advanced_EDA.py file") if os.path.isfile('dataset/df_fe_without_preprocessing_train.csv'): dfppro = pd.read_csv("dataset/df_fe_without_preprocessing_train.csv",encoding='latin-1') else: print("generate df_fe_without_preprocessing_train.csv from 0.4_exploratory_data_analysis.py file") df1 = dfnlp.drop(['qid1','qid2','question1','question2'],axis=1) df2 = dfppro.drop(['qid1','qid2','question1','question2','is_duplicate'],axis=1) df3 = df.drop(['qid1','qid2','question1','question2','is_duplicate'],axis=1) df3_q1 = pd.DataFrame(df3.q1_feats_m.values.tolist(), index= df3.index) df3_q2 = pd.DataFrame(df3.q2_feats_m.values.tolist(), index= df3.index) # dataframe of nlp features df1.head() """ id is_duplicate cwc_min cwc_max csc_min csc_max ctc_min \ 0 0 0 0.999980 0.833319 0.999983 0.999983 0.916659 1 1 0 0.799984 0.399996 0.749981 0.599988 0.699993 2 2 0 0.399992 0.333328 0.399992 0.249997 0.399996 3 3 0 0.000000 0.000000 0.000000 0.000000 0.000000 4 4 0 0.399992 0.199998 0.999950 0.666644 0.571420 ctc_max last_word_eq first_word_eq abs_len_diff mean_len \ 0 0.785709 0.0 1.0 2.0 13.0 1 0.466664 0.0 1.0 5.0 12.5 2 0.285712 0.0 1.0 4.0 12.0 3 0.000000 0.0 0.0 2.0 12.0 4 0.307690 0.0 1.0 6.0 10.0 token_set_ratio token_sort_ratio fuzz_ratio fuzz_partial_ratio \ 0 100 93 93 100 1 86 63 66 75 2 63 63 43 47 3 28 24 9 14 4 67 47 35 56 longest_substr_ratio 0 0.982759 1 0.596154 2 0.166667 3 0.039216 4 0.175000 """ # data before preprocessing df2.head() """ id freq_qid1 freq_qid2 q1len q2len q1_n_words q2_n_words \ 0 0 1 1 66 57 14 12 1 1 4 1 51 88 8 13 2 2 1 1 73 59 14 10 3 3 1 1 50 65 11 9 4 4 3 1 76 39 13 7 word_Common word_Total word_share freq_q1+q2 freq_q1-q2 0 10.0 23.0 0.434783 2 0 1 4.0 20.0 0.200000 5 3 2 4.0 24.0 0.166667 2 0 3 0.0 19.0 0.000000 2 0 4 2.0 20.0 0.100000 4 2 """ # Questions 1 tfidf weighted word2vec df3_q1.head() """ 0 1 2 3 4 5 \ 0 78.682992 87.635912 77.898819 -61.473692 44.053226 18.525178 1 99.993008 55.174564 -2.049167 36.677249 85.412371 -45.989080 2 62.709638 72.489519 10.889310 -45.772860 71.261772 -34.385969 3 35.006791 -40.413219 53.450493 -45.069038 37.137247 -21.992808 4 135.425154 187.445625 143.612776 -111.735024 56.977977 -70.101866 6 7 8 9 10 11 \ 0 -28.609312 47.452460 -86.095610 58.907952 -5.908887 5.062267 1 31.112590 76.453094 -74.456509 110.348369 84.611222 -41.494358 2 -26.228285 18.224490 -113.496336 115.968702 38.446388 6.606776 3 -28.184323 131.916699 41.891510 27.243861 -81.736980 48.172197 4 -47.585533 59.575895 -56.992457 253.326808 -123.363763 74.103075 12 13 14 15 16 17 \ 0 136.384631 -29.311246 -6.908221 -104.905819 106.754770 16.799190 1 34.701861 10.153459 -8.266818 -23.137087 83.302971 49.561717 2 74.324362 24.936682 34.229029 41.480330 -6.715438 -35.863293 3 -83.910213 -36.551715 30.696786 92.143373 49.486582 -138.234718 4 192.244374 -23.418808 -0.072270 -52.374237 88.718404 6.200053 18 19 20 21 22 23 \ 0 -23.684501 76.534100 113.292545 35.874052 48.696723 -11.653754 1 -54.129983 28.575020 109.895182 85.913793 14.017500 -100.408989 2 8.603262 106.322444 -4.632774 0.949820 92.368805 -62.332417 3 -22.038837 -4.167189 -19.487544 -30.428707 46.449947 81.127514 4 -34.748398 118.860650 104.257678 -19.308273 -5.911030 -130.655260 24 25 26 27 28 29 \ 0 -36.541520 99.915375 -142.438337 -72.028596 -1.374175 -129.174994 1 -73.572298 116.830950 -166.630144 -143.004758 -0.770938 -97.216777 2 -58.682641 145.766957 -50.016893 -108.476287 -25.467648 -48.748818 3 104.318424 121.269531 -28.571857 5.302182 -61.549565 -18.612830 4 -23.421555 125.433206 -133.497143 -179.988439 67.516360 -76.359375 30 31 32 33 34 35 \ 0 -25.437618 -42.146922 37.407022 -69.269756 -73.936123 -19.662360 1 -53.970125 -68.309437 181.591619 -92.624022 -17.250550 147.139629 2 6.924941 6.448761 23.785554 -21.784350 -62.634957 5.436183 3 -8.255657 -59.045547 16.189935 39.718045 -52.527881 -58.007130 4 -150.262275 4.916667 -9.865799 -147.885067 -7.246085 -40.686417 36 37 38 39 40 41 \ 0 38.209890 -9.545738 -44.947935 -56.545574 103.351133 -41.773517 1 87.249062 -0.182777 -34.705845 21.572029 92.693047 -15.391700 2 -13.409507 9.269375 -3.466993 -60.888072 102.830437 8.143691 3 29.170820 -23.750451 73.603838 24.064038 34.067341 -13.916953 4 -92.136775 -73.312214 29.648440 25.839449 266.192679 -4.070586 42 43 44 45 46 47 \ 0 -1.615270 -86.685536 179.614234 -32.611244 51.479851 8.153700 1 -17.352219 -51.056824 69.353060 -32.944922 54.505842 79.090806 2 -34.012816 -27.113287 161.985490 -95.804729 -74.151134 82.334418 3 -28.489230 -1.064873 88.392229 53.934564 -49.078122 30.161458 4 -7.189907 -101.205866 205.504083 -56.870189 80.091094 108.538138 48 49 50 51 52 53 \ 0 -72.668160 -14.568319 -42.159194 -64.791713 -114.053887 -35.884712 1 -80.186894 22.345294 -50.556837 -30.395256 -102.353237 -96.444680 2 -18.426852 -8.371303 -80.706157 -29.161945 -71.158556 -7.246943 3 56.377043 -5.712807 -65.776705 -46.446562 22.449847 56.491043 4 -102.876120 16.201895 -116.265227 -35.394072 -80.900812 -34.551696 54 55 56 57 58 59 \ 0 -126.372452 233.877351 119.046858 -43.580892 -129.956927 -17.886887 1 -142.156060 83.219254 21.462435 -41.674029 -45.288238 25.713024 2 -78.805472 216.249159 17.782252 -41.108650 -91.765161 39.959913 3 55.362357 31.832603 66.836505 67.236734 -136.054820 -2.969362 4 -83.786475 247.585437 12.143946 -58.540757 -112.478575 127.197083 60 61 62 63 64 65 \ 0 74.544202 -84.923952 12.030664 -105.147784 -52.161516 128.408010 1 -46.048228 -13.792427 64.060821 -148.117162 14.021728 222.104868 2 65.969145 -67.563025 18.809625 -42.309049 -118.789139 137.138837 3 114.634710 -109.762412 15.616244 90.188304 -2.994025 13.949361 4 -68.109813 -45.138518 7.509471 -123.735964 -72.285366 189.937254 66 67 68 69 70 71 \ 0 62.392989 -85.797754 75.066873 68.268576 -26.459104 60.869161 1 60.743130 13.882971 92.245109 52.623690 -94.634880 71.679861 2 81.460901 -47.298543 39.536516 56.302137 36.771198 39.998114 3 26.629185 -33.313318 47.752399 -69.337008 -23.252295 -12.457546 4 157.002570 -74.696703 82.379056 76.553088 -125.760949 110.094822 72 73 74 75 76 77 \ 0 122.432411 25.912285 76.802800 52.803958 122.555440 20.075123 1 20.999988 -59.635796 64.200658 -17.341305 36.679837 -32.517277 2 87.886053 -27.177739 -2.240621 56.019091 86.501850 4.331870 3 10.267123 3.404362 73.453422 13.668431 84.808816 -21.767701 4 125.219594 -4.329686 -47.015737 54.651598 147.590678 24.471602 78 79 80 81 82 83 \ 0 -38.572492 -28.747160 -62.788667 -43.180552 2.760628 -7.026932 1 -77.499462 3.254362 -11.735660 -16.854048 -88.464100 -39.774370 2 -55.073498 11.235763 -48.251050 -9.591573 -14.177249 -28.909442 3 -37.630875 33.004449 -112.147202 -13.459578 -18.140102 -58.453283 4 -61.596534 103.159982 -100.474603 -72.754540 30.080280 -115.924926 84 85 86 87 88 89 \ 0 -140.634527 -29.274653 7.157678 86.842601 38.238606 -25.909486 1 -15.653514 66.209611 -64.475704 27.344039 -22.471263 -23.111044 2 -48.646742 -19.231418 77.008272 5.414788 -26.222928 35.709896 3 -10.981707 -14.289388 -36.975472 25.987250 -74.511655 -45.798322 4 -85.053259 -79.693878 -34.521699 74.533560 -3.963831 -77.077944 90 91 92 93 94 95 0 3.169638 -54.031532 -112.663659 1.619508 81.309565 -17.361949 1 -97.185489 13.815928 -24.577477 72.654378 58.654857 -19.836278 2 -49.750098 -74.032807 -130.011004 -84.557644 10.153947 -30.314630 3 42.739461 -17.318146 37.957786 -47.867102 -101.418604 -3.919247 4 27.673524 -87.661703 -146.777092 1.730535 5.950078 -12.494797 """ # Questions 2 tfidf weighted word2vec df3_q2.head() print("Number of features in nlp dataframe :", df1.shape[1]) print("Number of features in preprocessed dataframe :", df2.shape[1]) print("Number of features in question1 w2v dataframe :", df3_q1.shape[1]) print("Number of features in question2 w2v dataframe :", df3_q2.shape[1]) print("Number of features in final dataframe :", df1.shape[1]+df2.shape[1]+df3_q1.shape[1]+df3_q2.shape[1]) # storing the final features to csv file if not os.path.isfile('dataset/final_features_96.csv'): df3_q1['id']=df1['id'] df3_q2['id']=df1['id'] df1 = df1.merge(df2, on='id',how='left') df2 = df3_q1.merge(df3_q2, on='id',how='left') result = df1.merge(df2, on='id',how='left') result.to_csv('dataset/final_features_96.csv')
py
7dfa29fd133d8fa1b590d2a42400451bb41dc2b9
import os import logging from flask import Flask from flask_security import Security from flask_cors import CORS def create_app(config=None): """ Application factory to create the app """ # cache = Cache(config={'CACHE_TYPE': 'simple'}) app = Flask(__name__, instance_relative_config=True) # app.config.from_object('config') # Read instance config app.config.from_pyfile('config.py') # Read ${APP_SETTINGS} config defined in root/config.py app.config.from_object(os.environ.get('APP_SETTINGS', 'config.Local')) # Read from config file given in the ${FLASKR_SETTINGS} app.config.from_envvar('FLASKR_SETTINGS', silent=True) # Read config given as a parameter if config is not None: app.config.from_object(config) app.logger.setLevel(logging.INFO) # Initialize Database from homeautomation.models import db, user_datastore db.init_app(app) # Load API blueprint from .api_v1 import api_bp app.register_blueprint(api_bp, url_prefix='/api/v0') # Initialize flask-security security = Security(app, user_datastore) from .mysecurity import MySecurity from .authentication import authenticate, post_login sec = MySecurity(app=app, auth_callback=authenticate, post_login_callback=post_login) CORS(app) return app
py
7dfa2a5848bc86ed7279c18058489c42ce84eab2
# global import ivy import pdb import logging # local from ivy.func_wrapper import _wrap_or_unwrap_methods, NON_WRAPPED_METHODS queue_timeout = None debug_mode_val = False # Methods # def _wrap_method_for_debugging(fn): if hasattr(fn, "__name__") and ( fn.__name__[0] == "_" or fn.__name__ in set( NON_WRAPPED_METHODS + ["has_nans", "is_array", "value_is_nan", "reduce_sum", "to_scalar"] ) ): return fn if hasattr(fn, "wrapped_for_debugging") and fn.wrapped_for_debugging: return fn def _method_wrapped(*args, **kwargs): def _check_nans(x): if ivy.is_native_array(x) and ivy.has_nans(x): if debug_mode_val == "exception": raise Exception("found nans in {}".format(x)) else: logging.error("found nans in {}".format(x)) pdb.set_trace() return x ivy.nested_map(args, _check_nans) ivy.nested_map(kwargs, _check_nans) ret = fn(*args, **kwargs) ivy.nested_map(ret, _check_nans) return ret if hasattr(fn, "__name__"): _method_wrapped.__name__ = fn.__name__ _method_wrapped.wrapped_for_debugging = True _method_wrapped.inner_fn = fn return _method_wrapped def _unwrap_method_from_debugging(method_wrapped): if ( not hasattr(method_wrapped, "wrapped_for_debugging") or not method_wrapped.wrapped_for_debugging ): return method_wrapped return method_wrapped.inner_fn def _wrap_methods_for_debugging(): return _wrap_or_unwrap_methods(_wrap_method_for_debugging) def _unwrap_methods_from_debugging(): return _wrap_or_unwrap_methods(_unwrap_method_from_debugging) # Mode # def set_debug_mode(debug_mode_in="exception"): assert debug_mode_in in ["breakpoint", "exception"] global debug_mode_val debug_mode_val = debug_mode_in global queue_timeout queue_timeout = ivy.queue_timeout() ivy.set_queue_timeout(None) _wrap_methods_for_debugging() def set_breakpoint_debug_mode(): set_debug_mode("breakpoint") def set_exception_debug_mode(): set_debug_mode("exception") def unset_debug_mode(): global debug_mode_val debug_mode_val = False _unwrap_methods_from_debugging() global queue_timeout ivy.set_queue_timeout(queue_timeout) def debug_mode(): return debug_mode_val
py
7dfa2a8147fc4bd7b6e4a70012c266dfe7a99bc7
# Copyright 2017 AT&T Intellectual Property. All other 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 providing the oslo_config based configuration for Shipyard """ import logging import keystoneauth1.loading as ks_loading from oslo_config import cfg from shipyard_airflow.conf.opts import ConfigSection CONF = cfg.CONF SECTIONS = [ ConfigSection( name='base', title='Base Configuration', options=[ cfg.StrOpt( 'web_server', default='http://localhost:8080/', help='The web server for Airflow' ), cfg.IntOpt( 'airflow_api_connect_timeout', default=5, help='Seconds to wait to connect to the airflow api' ), cfg.IntOpt( 'airflow_api_read_timeout', default=60, help='Seconds to wait for a response from the airflow api' ), cfg.StrOpt( 'postgresql_db', default=( 'postgresql+psycopg2://shipyard:changeme' '@postgresql.ucp:5432/shipyard' ), help='The database for shipyard' ), cfg.StrOpt( 'postgresql_airflow_db', default=( 'postgresql+psycopg2://shipyard:changeme' '@postgresql.ucp:5432/airflow' ), help='The database for airflow' ), cfg.IntOpt( 'pool_size', default=15, help='The SQLalchemy database connection pool size.' ), cfg.BoolOpt( 'pool_pre_ping', default=True, help='Should DB connections be validated prior to use.' ), cfg.IntOpt( 'pool_timeout', default=30, help=('How long a request for a connection should wait before ' 'one becomes available.') ), cfg.IntOpt( 'pool_overflow', default=10, help=('How many connections above pool_size are allowed to be ' 'open during high usage.') ), cfg.IntOpt( 'connection_recycle', default=-1, help=('Time, in seconds, when a connection should be closed ' 'and re-established. -1 for no recycling.') ), cfg.StrOpt( 'alembic_ini_path', default='/home/shipyard/shipyard', help='The directory containing the alembic.ini file' ), cfg.BoolOpt( 'profiler', default=False, help=('Enable profiling of API requests. Do NOT ' 'use in production.') ), ] ), ConfigSection( name='logging', title='Logging Options', options=[ cfg.IntOpt( 'log_level', default=logging.DEBUG, help=('The default logging level for the root logger. ' 'ERROR=40, WARNING=30, INFO=20, DEBUG=10') ), cfg.DictOpt( 'named_log_levels', default={"keystoneauth": logging.INFO, "keystonemiddleware": logging.INFO}, help=('The logging levels for named loggers. ' 'Use standard representations for logging levels: ' 'ERROR. WARN, INFO, DEBUG. Configuration file format: ' 'named_log_levels = keystoneauth:INFO,othlgr:WARN' ) ), ] ), ConfigSection( name='shipyard', title='Shipyard Connection Info', options=[ cfg.StrOpt( 'service_type', default='shipyard', help=( 'The service type for the service playing the role ' 'of Shipyard. The specified type is used to perform ' 'the service lookup in the Keystone service catalog.' ) ), ] ), ConfigSection( name='deckhand', title='Deckhand Connection Info', options=[ cfg.StrOpt( 'service_type', default='deckhand', help=( 'The service type for the service playing the role ' 'of Deckhand. The specified type is used to perform ' 'the service lookup in the Keystone service catalog.' ) ), ] ), ConfigSection( name='armada', title='Armada Connection Info', options=[ cfg.StrOpt( 'service_type', default='armada', help=( 'The service type for the service playing the role ' 'of Armada. The specified type is used to perform ' 'the service lookup in the Keystone service catalog.' ) ), ] ), ConfigSection( name='drydock', title='Drydock Connection Info', options=[ cfg.StrOpt( 'service_type', default='physicalprovisioner', help=( 'The service type for the service playing the role ' 'of Drydock. The specified type is used to perform ' 'the service lookup in the Keystone service catalog.' ) ), ] ), ConfigSection( name='promenade', title='Promenade Connection Info', options=[ cfg.StrOpt( 'service_type', default='kubernetesprovisioner', help=( 'The service type for the service playing the role ' 'of Promenade. The specified type is used to perform ' 'the service lookup in the Keystone service catalog.' ) ), ] ), ConfigSection( name='requests_config', title='Requests Configuration', options=[ cfg.IntOpt( 'airflow_log_connect_timeout', default=5, help='Airflow logs retrieval connect timeout (in seconds)' ), cfg.IntOpt( 'airflow_log_read_timeout', default=300, help='Airflow logs retrieval timeout (in seconds)' ), cfg.IntOpt( 'deckhand_client_connect_timeout', default=5, help='Deckhand client connect timeout (in seconds)' ), cfg.IntOpt( 'deckhand_client_read_timeout', default=300, help=( 'Deckhand client timeout (in seconds) for GET, ' 'PUT, POST and DELETE request' ) ), cfg.IntOpt( 'validation_connect_timeout', default=5, help=('Airship component validation connect timeout ' '(in seconds)') ), cfg.IntOpt( 'validation_read_timeout', default=300, help='Airship component validation timeout (in seconds)' ), cfg.IntOpt( 'notes_connect_timeout', default=5, help=('Maximum time to wait to connect to a note source URL ' '(in seconds)') ), cfg.IntOpt( 'notes_read_timeout', default=10, help='Read timeout for a note source URL (in seconds)' ), ] ), ConfigSection( name='airflow', title='Airflow connection info', options=[ cfg.StrOpt( 'worker_endpoint_scheme', default='http', help='Airflow worker url scheme' ), cfg.IntOpt( 'worker_port', default=8793, help='Airflow worker port' ), ] ), ConfigSection( name='k8s_logs', title='Parameters for K8s Pods Logs', options=[ cfg.StrOpt( 'ucp_namespace', default='ucp', help='Namespace of Airship Pods' ), ] ), ] def register_opts(conf): """ Registers all the sections in this module. """ for section in SECTIONS: conf.register_group( cfg.OptGroup(name=section.name, title=section.title, help=section.help)) conf.register_opts(section.options, group=section.name) ks_loading.register_auth_conf_options(conf, group='keystone_authtoken') def list_opts(): """ List the options identified by this configuration """ all_opts = { section.name: section.options for section in SECTIONS } all_opts['keystone_authtoken'] = ks_loading.get_session_conf_options() return all_opts def parse_args(args=None, usage=None, default_config_files=None): """ Triggers the parsing of the arguments/configs """ CONF(args=args, project='shipyard', usage=usage, default_config_files=default_config_files) register_opts(CONF)
py
7dfa2aa1718977dd92759d82b19f3f35c2c2fbf3
# Copyright 2018 MLBenchmark Group. 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. # ============================================================================== """Convenience function for extracting the values for logging calls. Because TensorFlow generally defers computation of values to a session run call, it is impractical to log the values of tensors when they are defined. Instead, the definition of a tensor is logged as normal using the log function in mlperf_log.py and a tf.print statement helper function can be used to report the relevant values as they are computed. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import uuid import tensorflow as tf def log_deferred(op, log_id, every_n=1, first_n=None): """Helper method inserting compliance logging ops. Note: This helper is not guaranteed to be efficient, as it will insert ops and control dependencies. If this proves to be a bottleneck, submitters may wish to consider other methods such as extracting values from an .events file. Args: op: A tf op to be printed. log_id: a uuid provided by the logger in mlperf_log.py every_n: If repeat is True, with what frequency should the input op be ' logged. If repeat is False, this argument is ignored. first_n: Only log this many values. This arg does not interact with every_n. The first_n refers to the first n that would have been logged. """ prefix = ":::MLPv0.5.0 [{}]".format(log_id) if not first_n is not None and first_n == 1: return tf.compat.v1.Print(op, [tf.timestamp(), op], message=prefix, first_n=1) counter = tf.Variable(tf.zeros(shape=(), dtype=tf.int32) - 1, aggregation=tf.VariableAggregation.MEAN) increment = tf.compat.v1.assign_add(counter, 1, use_locking=True) return tf.cond( pred=tf.equal(tf.math.mod(increment, every_n), 0), true_fn=lambda :tf.compat.v1.Print(op, [tf.timestamp(), op], message=prefix, first_n=first_n), false_fn=lambda :op ) def sum_metric(tensor, name): sum_var = tf.compat.v1.Variable( initial_value=tf.zeros(shape=(), dtype=tensor.dtype), trainable=False, collections=[ tf.compat.v1.GraphKeys.LOCAL_VARIABLES, tf.compat.v1.GraphKeys.METRIC_VARIABLES, ], name="{}_total".format(name), aggregation=tf.VariableAggregation.SUM ) update_op = tf.identity(tf.compat.v1.assign_add(sum_var, tensor)) return tf.identity(sum_var, name=name), update_op def _example(): for kwargs in [dict(first_n=1), dict(), dict(every_n=2), dict(first_n=2, every_n=2)]: op = tf.compat.v1.assign_add(tf.Variable(tf.zeros(shape=(), dtype=tf.int32) - 1), 1) op = log_deferred(op, str(uuid.uuid4()), **kwargs) init = [tf.compat.v1.local_variables_initializer(), tf.compat.v1.global_variables_initializer()] print("-" * 5) with tf.compat.v1.Session().as_default() as sess: sess.run(init) for _ in range(6): sess.run(op) if __name__ == "__main__": _example()
py
7dfa2c32cd46600cfebd5857b826204d83258633
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from sweet_desert.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm add_form = UserCreationForm fieldsets = (("User", {"fields": ("name",)}),) + auth_admin.UserAdmin.fieldsets list_display = ["username", "name", "is_superuser"] search_fields = ["name"]
py
7dfa2c691b575062c3565123e53818e8ad10dfb4
import os import re import json from boto3 import Session from moto.core.exceptions import JsonRESTError from moto.core import ACCOUNT_ID, BaseBackend, CloudFormationModel from moto.events.exceptions import ValidationException, ResourceNotFoundException from moto.utilities.tagging_service import TaggingService from uuid import uuid4 class Rule(CloudFormationModel): def _generate_arn(self, name): return "arn:aws:events:{region_name}:111111111111:rule/{name}".format( region_name=self.region_name, name=name ) def __init__(self, name, region_name, **kwargs): self.name = name self.region_name = region_name self.arn = kwargs.get("Arn") or self._generate_arn(name) self.event_pattern = kwargs.get("EventPattern") self.schedule_exp = kwargs.get("ScheduleExpression") self.state = kwargs.get("State") or "ENABLED" self.description = kwargs.get("Description") self.role_arn = kwargs.get("RoleArn") self.event_bus_name = kwargs.get("EventBusName", "default") self.targets = [] @property def physical_resource_id(self): return self.name # This song and dance for targets is because we need order for Limits and NextTokens, but can't use OrderedDicts # with Python 2.6, so tracking it with an array it is. def _check_target_exists(self, target_id): for i in range(0, len(self.targets)): if target_id == self.targets[i]["Id"]: return i return None def enable(self): self.state = "ENABLED" def disable(self): self.state = "DISABLED" def delete(self, region_name): event_backend = events_backends[region_name] event_backend.delete_rule(name=self.name) def put_targets(self, targets): # Not testing for valid ARNs. for target in targets: index = self._check_target_exists(target["Id"]) if index is not None: self.targets[index] = target else: self.targets.append(target) def remove_targets(self, ids): for target_id in ids: index = self._check_target_exists(target_id) if index is not None: self.targets.pop(index) def get_cfn_attribute(self, attribute_name): from moto.cloudformation.exceptions import UnformattedGetAttTemplateException if attribute_name == "Arn": return self.arn raise UnformattedGetAttTemplateException() @staticmethod def cloudformation_name_type(): return "Name" @staticmethod def cloudformation_type(): # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html return "AWS::Events::Rule" @classmethod def create_from_cloudformation_json( cls, resource_name, cloudformation_json, region_name ): properties = cloudformation_json["Properties"] event_backend = events_backends[region_name] event_name = resource_name return event_backend.put_rule(name=event_name, **properties) @classmethod def update_from_cloudformation_json( cls, original_resource, new_resource_name, cloudformation_json, region_name ): original_resource.delete(region_name) return cls.create_from_cloudformation_json( new_resource_name, cloudformation_json, region_name ) @classmethod def delete_from_cloudformation_json( cls, resource_name, cloudformation_json, region_name ): event_backend = events_backends[region_name] event_name = resource_name event_backend.delete_rule(name=event_name) class EventBus(CloudFormationModel): def __init__(self, region_name, name): self.region = region_name self.name = name self._permissions = {} @property def arn(self): return "arn:aws:events:{region}:{account_id}:event-bus/{name}".format( region=self.region, account_id=ACCOUNT_ID, name=self.name ) @property def policy(self): if not len(self._permissions): return None policy = {"Version": "2012-10-17", "Statement": []} for sid, permission in self._permissions.items(): policy["Statement"].append( { "Sid": sid, "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::{}:root".format(permission["Principal"]) }, "Action": permission["Action"], "Resource": self.arn, } ) return json.dumps(policy) def delete(self, region_name): event_backend = events_backends[region_name] event_backend.delete_event_bus(name=self.name) def get_cfn_attribute(self, attribute_name): from moto.cloudformation.exceptions import UnformattedGetAttTemplateException if attribute_name == "Arn": return self.arn elif attribute_name == "Name": return self.name elif attribute_name == "Policy": return self.policy raise UnformattedGetAttTemplateException() @staticmethod def cloudformation_name_type(): return "Name" @staticmethod def cloudformation_type(): # https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-eventbus.html return "AWS::Events::EventBus" @classmethod def create_from_cloudformation_json( cls, resource_name, cloudformation_json, region_name ): properties = cloudformation_json["Properties"] event_backend = events_backends[region_name] event_name = resource_name event_source_name = properties.get("EventSourceName") return event_backend.create_event_bus( name=event_name, event_source_name=event_source_name ) @classmethod def update_from_cloudformation_json( cls, original_resource, new_resource_name, cloudformation_json, region_name ): original_resource.delete(region_name) return cls.create_from_cloudformation_json( new_resource_name, cloudformation_json, region_name ) @classmethod def delete_from_cloudformation_json( cls, resource_name, cloudformation_json, region_name ): event_backend = events_backends[region_name] event_bus_name = resource_name event_backend.delete_event_bus(event_bus_name) class EventsBackend(BaseBackend): ACCOUNT_ID = re.compile(r"^(\d{1,12}|\*)$") STATEMENT_ID = re.compile(r"^[a-zA-Z0-9-_]{1,64}$") def __init__(self, region_name): self.rules = {} # This array tracks the order in which the rules have been added, since # 2.6 doesn't have OrderedDicts. self.rules_order = [] self.next_tokens = {} self.region_name = region_name self.event_buses = {} self.event_sources = {} self.tagger = TaggingService() self._add_default_event_bus() def reset(self): region_name = self.region_name self.__dict__ = {} self.__init__(region_name) def _add_default_event_bus(self): self.event_buses["default"] = EventBus(self.region_name, "default") def _get_rule_by_index(self, i): return self.rules.get(self.rules_order[i]) def _gen_next_token(self, index): token = os.urandom(128).encode("base64") self.next_tokens[token] = index return token def _process_token_and_limits(self, array_len, next_token=None, limit=None): start_index = 0 end_index = array_len new_next_token = None if next_token: start_index = self.next_tokens.pop(next_token, 0) if limit is not None: new_end_index = start_index + int(limit) if new_end_index < end_index: end_index = new_end_index new_next_token = self._gen_next_token(end_index) return start_index, end_index, new_next_token def delete_rule(self, name): self.rules_order.pop(self.rules_order.index(name)) arn = self.rules.get(name).arn if self.tagger.has_tags(arn): self.tagger.delete_all_tags_for_resource(arn) return self.rules.pop(name) is not None def describe_rule(self, name): return self.rules.get(name) def disable_rule(self, name): if name in self.rules: self.rules[name].disable() return True return False def enable_rule(self, name): if name in self.rules: self.rules[name].enable() return True return False def list_rule_names_by_target(self, target_arn, next_token=None, limit=None): matching_rules = [] return_obj = {} start_index, end_index, new_next_token = self._process_token_and_limits( len(self.rules), next_token, limit ) for i in range(start_index, end_index): rule = self._get_rule_by_index(i) for target in rule.targets: if target["Arn"] == target_arn: matching_rules.append(rule.name) return_obj["RuleNames"] = matching_rules if new_next_token is not None: return_obj["NextToken"] = new_next_token return return_obj def list_rules(self, prefix=None, next_token=None, limit=None): match_string = ".*" if prefix is not None: match_string = "^" + prefix + match_string match_regex = re.compile(match_string) matching_rules = [] return_obj = {} start_index, end_index, new_next_token = self._process_token_and_limits( len(self.rules), next_token, limit ) for i in range(start_index, end_index): rule = self._get_rule_by_index(i) if match_regex.match(rule.name): matching_rules.append(rule) return_obj["Rules"] = matching_rules if new_next_token is not None: return_obj["NextToken"] = new_next_token return return_obj def list_targets_by_rule(self, rule, next_token=None, limit=None): # We'll let a KeyError exception be thrown for response to handle if # rule doesn't exist. rule = self.rules[rule] start_index, end_index, new_next_token = self._process_token_and_limits( len(rule.targets), next_token, limit ) returned_targets = [] return_obj = {} for i in range(start_index, end_index): returned_targets.append(rule.targets[i]) return_obj["Targets"] = returned_targets if new_next_token is not None: return_obj["NextToken"] = new_next_token return return_obj def put_rule(self, name, **kwargs): new_rule = Rule(name, self.region_name, **kwargs) self.rules[new_rule.name] = new_rule self.rules_order.append(new_rule.name) return new_rule def put_targets(self, name, targets): rule = self.rules.get(name) if rule: rule.put_targets(targets) return True return False def put_events(self, events): num_events = len(events) if num_events < 1: raise JsonRESTError("ValidationError", "Need at least 1 event") elif num_events > 10: # the exact error text is longer, the Value list consists of all the put events raise ValidationException( "1 validation error detected: " "Value '[PutEventsRequestEntry]' at 'entries' failed to satisfy constraint: " "Member must have length less than or equal to 10" ) entries = [] for event in events: if "Source" not in event: entries.append( { "ErrorCode": "InvalidArgument", "ErrorMessage": "Parameter Source is not valid. Reason: Source is a required argument.", } ) elif "DetailType" not in event: entries.append( { "ErrorCode": "InvalidArgument", "ErrorMessage": "Parameter DetailType is not valid. Reason: DetailType is a required argument.", } ) elif "Detail" not in event: entries.append( { "ErrorCode": "InvalidArgument", "ErrorMessage": "Parameter Detail is not valid. Reason: Detail is a required argument.", } ) else: try: json.loads(event["Detail"]) except ValueError: # json.JSONDecodeError exists since Python 3.5 entries.append( { "ErrorCode": "MalformedDetail", "ErrorMessage": "Detail is malformed.", } ) continue entries.append({"EventId": str(uuid4())}) # We dont really need to store the events yet return entries def remove_targets(self, name, ids): rule = self.rules.get(name) if rule: rule.remove_targets(ids) return {"FailedEntries": [], "FailedEntryCount": 0} else: raise JsonRESTError( "ResourceNotFoundException", "An entity that you specified does not exist", ) def test_event_pattern(self): raise NotImplementedError() def put_permission(self, event_bus_name, action, principal, statement_id): if not event_bus_name: event_bus_name = "default" event_bus = self.describe_event_bus(event_bus_name) if action is None or action != "events:PutEvents": raise JsonRESTError( "ValidationException", "Provided value in parameter 'action' is not supported.", ) if principal is None or self.ACCOUNT_ID.match(principal) is None: raise JsonRESTError( "InvalidParameterValue", r"Principal must match ^(\d{1,12}|\*)$" ) if statement_id is None or self.STATEMENT_ID.match(statement_id) is None: raise JsonRESTError( "InvalidParameterValue", r"StatementId must match ^[a-zA-Z0-9-_]{1,64}$" ) event_bus._permissions[statement_id] = { "Action": action, "Principal": principal, } def remove_permission(self, event_bus_name, statement_id): if not event_bus_name: event_bus_name = "default" event_bus = self.describe_event_bus(event_bus_name) if not len(event_bus._permissions): raise JsonRESTError( "ResourceNotFoundException", "EventBus does not have a policy." ) if not event_bus._permissions.pop(statement_id, None): raise JsonRESTError( "ResourceNotFoundException", "Statement with the provided id does not exist.", ) def describe_event_bus(self, name): if not name: name = "default" event_bus = self.event_buses.get(name) if not event_bus: raise JsonRESTError( "ResourceNotFoundException", "Event bus {} does not exist.".format(name) ) return event_bus def create_event_bus(self, name, event_source_name=None): if name in self.event_buses: raise JsonRESTError( "ResourceAlreadyExistsException", "Event bus {} already exists.".format(name), ) if not event_source_name and "/" in name: raise JsonRESTError( "ValidationException", "Event bus name must not contain '/'." ) if event_source_name and event_source_name not in self.event_sources: raise JsonRESTError( "ResourceNotFoundException", "Event source {} does not exist.".format(event_source_name), ) self.event_buses[name] = EventBus(self.region_name, name) return self.event_buses[name] def list_event_buses(self, name_prefix): if name_prefix: return [ event_bus for event_bus in self.event_buses.values() if event_bus.name.startswith(name_prefix) ] return list(self.event_buses.values()) def delete_event_bus(self, name): if name == "default": raise JsonRESTError( "ValidationException", "Cannot delete event bus default." ) self.event_buses.pop(name, None) def list_tags_for_resource(self, arn): name = arn.split("/")[-1] if name in self.rules: return self.tagger.list_tags_for_resource(self.rules[name].arn) raise ResourceNotFoundException( "Rule {0} does not exist on EventBus default.".format(name) ) def tag_resource(self, arn, tags): name = arn.split("/")[-1] if name in self.rules: self.tagger.tag_resource(self.rules[name].arn, tags) return {} raise ResourceNotFoundException( "Rule {0} does not exist on EventBus default.".format(name) ) def untag_resource(self, arn, tag_names): name = arn.split("/")[-1] if name in self.rules: self.tagger.untag_resource_using_names(self.rules[name].arn, tag_names) return {} raise ResourceNotFoundException( "Rule {0} does not exist on EventBus default.".format(name) ) events_backends = {} for region in Session().get_available_regions("events"): events_backends[region] = EventsBackend(region) for region in Session().get_available_regions("events", partition_name="aws-us-gov"): events_backends[region] = EventsBackend(region) for region in Session().get_available_regions("events", partition_name="aws-cn"): events_backends[region] = EventsBackend(region)
py
7dfa2ca1b0b3eec3dc6b57d3dbf27e7437b70305
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function from six.moves import input import frappe, os, re, git from frappe.utils import touch_file, cstr def make_boilerplate(dest, app_name): if not os.path.exists(dest): print("Destination directory does not exist") return # app_name should be in snake_case app_name = frappe.scrub(app_name) hooks = frappe._dict() hooks.app_name = app_name app_title = hooks.app_name.replace("_", " ").title() for key in ("App Title (default: {0})".format(app_title), "App Description", "App Publisher", "App Email", "App Icon (default 'octicon octicon-file-directory')", "App Color (default 'grey')", "App License (default 'MIT')"): hook_key = key.split(" (")[0].lower().replace(" ", "_") hook_val = None while not hook_val: hook_val = cstr(input(key + ": ")) if not hook_val: defaults = { "app_title": app_title, "app_icon": "octicon octicon-file-directory", "app_color": "grey", "app_license": "MIT" } if hook_key in defaults: hook_val = defaults[hook_key] if hook_key=="app_name" and hook_val.lower().replace(" ", "_") != hook_val: print("App Name must be all lowercase and without spaces") hook_val = "" elif hook_key=="app_title" and not re.match("^(?![\W])[^\d_\s][\w -]+$", hook_val, re.UNICODE): print("App Title should start with a letter and it can only consist of letters, numbers, spaces and underscores") hook_val = "" hooks[hook_key] = hook_val frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, frappe.scrub(hooks.app_title)), with_init=True) frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, "templates"), with_init=True) frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, "www")) frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, "templates", "pages"), with_init=True) frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, "templates", "includes")) frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, "config"), with_init=True) frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, "public", "css")) frappe.create_folder(os.path.join(dest, hooks.app_name, hooks.app_name, "public", "js")) with open(os.path.join(dest, hooks.app_name, hooks.app_name, "__init__.py"), "w") as f: f.write(frappe.as_unicode(init_template)) with open(os.path.join(dest, hooks.app_name, "MANIFEST.in"), "w") as f: f.write(frappe.as_unicode(manifest_template.format(**hooks))) with open(os.path.join(dest, hooks.app_name, ".gitignore"), "w") as f: f.write(frappe.as_unicode(gitignore_template.format(app_name = hooks.app_name))) with open(os.path.join(dest, hooks.app_name, "setup.py"), "w") as f: f.write(frappe.as_unicode(setup_template.format(**hooks))) with open(os.path.join(dest, hooks.app_name, "requirements.txt"), "w") as f: f.write("frappe") with open(os.path.join(dest, hooks.app_name, "README.md"), "w") as f: f.write(frappe.as_unicode("## {0}\n\n{1}\n\n#### License\n\n{2}".format(hooks.app_title, hooks.app_description, hooks.app_license))) with open(os.path.join(dest, hooks.app_name, "license.txt"), "w") as f: f.write(frappe.as_unicode("License: " + hooks.app_license)) with open(os.path.join(dest, hooks.app_name, hooks.app_name, "modules.txt"), "w") as f: f.write(frappe.as_unicode(hooks.app_title)) with open(os.path.join(dest, hooks.app_name, hooks.app_name, "hooks.py"), "w") as f: f.write(frappe.as_unicode(hooks_template.format(**hooks))) touch_file(os.path.join(dest, hooks.app_name, hooks.app_name, "patches.txt")) with open(os.path.join(dest, hooks.app_name, hooks.app_name, "config", "desktop.py"), "w") as f: f.write(frappe.as_unicode(desktop_template.format(**hooks))) with open(os.path.join(dest, hooks.app_name, hooks.app_name, "config", "docs.py"), "w") as f: f.write(frappe.as_unicode(docs_template.format(**hooks))) # initialize git repository app_directory = os.path.join(dest, hooks.app_name) app_repo = git.Repo.init(app_directory) app_repo.git.add(A=True) app_repo.index.commit("feat: Initialize App") print("'{app}' created at {path}".format(app=app_name, path=app_directory)) manifest_template = """include MANIFEST.in include requirements.txt include *.json include *.md include *.py include *.txt recursive-include {app_name} *.css recursive-include {app_name} *.csv recursive-include {app_name} *.html recursive-include {app_name} *.ico recursive-include {app_name} *.js recursive-include {app_name} *.json recursive-include {app_name} *.md recursive-include {app_name} *.png recursive-include {app_name} *.py recursive-include {app_name} *.svg recursive-include {app_name} *.txt recursive-exclude {app_name} *.pyc""" init_template = """# -*- coding: utf-8 -*- from __future__ import unicode_literals __version__ = '0.0.1' """ hooks_template = """# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import __version__ as app_version app_name = "{app_name}" app_title = "{app_title}" app_publisher = "{app_publisher}" app_description = "{app_description}" app_icon = "{app_icon}" app_color = "{app_color}" app_email = "{app_email}" app_license = "{app_license}" # Includes in <head> # ------------------ # include js, css files in header of desk.html # app_include_css = "/assets/{app_name}/css/{app_name}.css" # app_include_js = "/assets/{app_name}/js/{app_name}.js" # include js, css files in header of web template # web_include_css = "/assets/{app_name}/css/{app_name}.css" # web_include_js = "/assets/{app_name}/js/{app_name}.js" # include js, css files in header of web form # webform_include_js = {{"doctype": "public/js/doctype.js"}} # webform_include_css = {{"doctype": "public/css/doctype.css"}} # include js in page # page_js = {{"page" : "public/js/file.js"}} # include js in doctype views # doctype_js = {{"doctype" : "public/js/doctype.js"}} # doctype_list_js = {{"doctype" : "public/js/doctype_list.js"}} # doctype_tree_js = {{"doctype" : "public/js/doctype_tree.js"}} # doctype_calendar_js = {{"doctype" : "public/js/doctype_calendar.js"}} # Home Pages # ---------- # application home page (will override Website Settings) # home_page = "login" # website user home page (by Role) # role_home_page = {{ # "Role": "home_page" # }} # Website user home page (by function) # get_website_user_home_page = "{app_name}.utils.get_home_page" # Generators # ---------- # automatically create page for each record of this doctype # website_generators = ["Web Page"] # Installation # ------------ # before_install = "{app_name}.install.before_install" # after_install = "{app_name}.install.after_install" # Desk Notifications # ------------------ # See frappe.core.notifications.get_notification_config # notification_config = "{app_name}.notifications.get_notification_config" # Permissions # ----------- # Permissions evaluated in scripted ways # permission_query_conditions = {{ # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", # }} # # has_permission = {{ # "Event": "frappe.desk.doctype.event.event.has_permission", # }} # Document Events # --------------- # Hook on document methods and events # doc_events = {{ # "*": {{ # "on_update": "method", # "on_cancel": "method", # "on_trash": "method" # }} # }} # Scheduled Tasks # --------------- # scheduler_events = {{ # "all": [ # "{app_name}.tasks.all" # ], # "daily": [ # "{app_name}.tasks.daily" # ], # "hourly": [ # "{app_name}.tasks.hourly" # ], # "weekly": [ # "{app_name}.tasks.weekly" # ] # "monthly": [ # "{app_name}.tasks.monthly" # ] # }} # Testing # ------- # before_tests = "{app_name}.install.before_tests" # Overriding Methods # ------------------------------ # # override_whitelisted_methods = {{ # "frappe.desk.doctype.event.event.get_events": "{app_name}.event.get_events" # }} # # each overriding function accepts a `data` argument; # generated from the base implementation of the doctype dashboard, # along with any modifications made in other Frappe apps # override_doctype_dashboards = {{ # "Task": "{app_name}.task.get_dashboard_data" # }} # exempt linked doctypes from being automatically cancelled # # auto_cancel_exempted_doctypes = ["Auto Repeat"] """ desktop_template = """# -*- coding: utf-8 -*- from __future__ import unicode_literals from frappe import _ def get_data(): return [ {{ "module_name": "{app_title}", "color": "{app_color}", "icon": "{app_icon}", "type": "module", "label": _("{app_title}") }} ] """ setup_template = """# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('requirements.txt') as f: install_requires = f.read().strip().split('\\n') # get version from __version__ variable in {app_name}/__init__.py from {app_name} import __version__ as version setup( name='{app_name}', version=version, description='{app_description}', author='{app_publisher}', author_email='{app_email}', packages=find_packages(), zip_safe=False, include_package_data=True, install_requires=install_requires ) """ gitignore_template = """.DS_Store *.pyc *.egg-info *.swp tags {app_name}/docs/current""" docs_template = '''""" Configuration for docs """ # source_link = "https://github.com/[org_name]/{app_name}" # docs_base_url = "https://[org_name].github.io/{app_name}" # headline = "App that does everything" # sub_heading = "Yes, you got that right the first time, everything" def get_context(context): context.brand_html = "{app_title}" '''
py
7dfa2ddf05142823b82d95ff3f99757f75a967e2
import os import gym import numpy as np import torch import torch.autograd import torch.nn.functional as tf from mpc import mpc class Dynamics(torch.nn.Module): def __init__(self, dynamics): super(Dynamics, self).__init__() self._dynamics=dynamics def forward(self, state, action): stoch, deter = torch.split(state, [self._dynamics._stoch_size, self._dynamics._deter_size], dim=-1) rnn_input = self._dynamics._rnn_input_model(torch.cat([action, stoch], dim=-1)) deter_state = self._dynamics._cell(rnn_input, deter) mean, std = torch.chunk(self._dynamics._stochastic_prior_model(deter_state), 2, dim=-1) std = tf.softplus(std) + 0.1 dist = self._dynamics._dist(mean, std) stoch_state = dist.rsample() return torch.cat((stoch_state, deter_state), dim=-1) class MPC_planner: def __init__(self, nx, nu, dynamics, timesteps=10, goal_weights=None, ctrl_penalty=0.001, iter=5, action_low=None, action_high=None): self._timesteps=timesteps self._u_init = None self._iter = iter self._nx = nx self._nu = nu self._action_low = action_low.item() self._action_high = action_high.item() self._dtype=torch.float if goal_weights is None: goal_weights = torch.ones(nx, dtype=self._dtype) self._goal_weights = goal_weights q = torch.cat(( goal_weights, ctrl_penalty * torch.ones(nu, dtype=self._dtype) )) self._Q = torch.diag(q).repeat(timesteps, 1, 1).type(self._dtype) self._dynamics = Dynamics(dynamics)#.to("cuda") def set_goal_state(self, state): goal_state = torch.clone(state)[0] self._goal_weights=self._goal_weights.to(state.device) px = -torch.sqrt(self._goal_weights) * goal_state p = torch.cat((px, torch.zeros(self._nu, dtype=self._dtype,device=state.device))) p = p.repeat(self._timesteps, 1) self._Q=self._Q.to(state.device) self._cost = mpc.QuadCost(self._Q, p) self._u_init = None self._dynamics=self._dynamics.to(state.device) def get_next_action(self, state): n_batch = state.shape[0] #self._u_init=torch.rand(self._timesteps, n_batch, self._nu)*2-1 state = torch.clone(state) with torch.enable_grad(): ctrl = mpc.MPC(self._nx, self._nu, self._timesteps, u_lower=self._action_low * torch.ones(self._timesteps, n_batch, self._nu,device=state.device), u_upper=self._action_high * torch.ones(self._timesteps, n_batch, self._nu,device=state.device), lqr_iter=self._iter, n_batch=n_batch, u_init=self._u_init, max_linesearch_iter=10, linesearch_decay=0.5, exit_unconverged=False, backprop=True, detach_unconverged = False, verbose=0, grad_method=mpc.GradMethods.AUTO_DIFF) nominal_states, nominal_actions, nominal_objs = ctrl(state, self._cost, self._dynamics) action = nominal_actions[0] self._u_init = torch.cat((nominal_actions[1:], torch.zeros(1, n_batch, self._nu, dtype=self._dtype,device=action.device)), dim=0) return action def load_goal_state(dtype): domain = "cartpole" task = "balance" goal_state_obs = np.load(os.getcwd()+'/dreamer/models/'+domain+'/'+domain+'_'+task+'.npy') return torch.tensor(goal_state_obs / 255.0 - 0.5, dtype=dtype).unsqueeze(0)
py
7dfa2e690bf6b4277ef24cae06f8f0568d55a80c
# Copyright (c) 2020 Matthew Earl # # 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. __all__ = ( 'MadWrapper', 'GaussianSquashedGaussian', ) import functools import gym import numpy as np from ray.rllib.models.catalog import ModelCatalog from ray.rllib.models.tf.tf_action_dist import ( TFActionDistribution, MultiActionDistribution ) from ray.rllib.utils import ( try_import_tf, try_import_tfp, SMALL_NUMBER, MIN_LOG_NN_OUTPUT, MAX_LOG_NN_OUTPUT ) tf = try_import_tf() tfp = try_import_tfp() class _SquashedGaussianBase(TFActionDistribution): """A diagonal gaussian distribution, squashed into bounded support. This is needed since the ray default is to use a plain gaussian but clip the values. In this case the KL and entropy are calculated as per the unclipped distribution, and so learning hits a failure mode in which most of the mass is pushed outside of the clipping region, encouraged by a negative entropy term in the loss function. This is an abstract base class for all squashed gaussian types, which leaves the squash / unsquash / kl / entropy methods undefined. """ def __init__(self, inputs, model, low=-1.0, high=1.0): """Parameterizes the distribution via `inputs`. Args: low (float): The lowest possible sampling value (excluding this value). high (float): The highest possible sampling value (excluding this value). """ assert tfp is not None mean, log_std = tf.split(inputs, 2, axis=-1) self._num_vars = mean.shape[1] assert log_std.shape[1] == self._num_vars # Clip `std` values (coming from NN) to reasonable values. self.log_std = tf.clip_by_value(log_std, MIN_LOG_NN_OUTPUT, MAX_LOG_NN_OUTPUT) # Clip loc too, for numerical stability reasons. mean = tf.clip_by_value(mean, -3, 3) std = tf.exp(self.log_std) self.distr = tfp.distributions.Normal(loc=mean, scale=std) assert len(self.distr.loc.shape) == 2 assert len(self.distr.scale.shape) == 2 assert np.all(np.less(low, high)) self.low = low self.high = high super().__init__(inputs, model) def deterministic_sample(self): mean = self.distr.mean() assert len(mean.shape) == 2 s = self._squash(mean) assert len(s.shape) == 2 return s def logp(self, x): assert len(x.shape) >= 2, "First dim batch, second dim variable" unsquashed_values = self._unsquash(x) log_prob = self.distr.log_prob(value=unsquashed_values) return tf.reduce_sum(log_prob - self._log_squash_grad(unsquashed_values), axis=1) def _build_sample_op(self): s = self._squash(self.distr.sample()) assert len(s.shape) == 2 return s def _squash(self, unsquashed_values): """Squash an array element-wise into the (high, low) range Arguments: unsquashed_values: values to be squashed Returns: The squashed values. The output shape is `unsquashed_values.shape` """ raise NotImplementedError def _unsquash(self, values): """Unsquash an array element-wise from the (high, low) range Arguments: squashed_values: values to be unsquashed Returns: The unsquashed values. The output shape is `squashed_values.shape` """ raise NotImplementedError def _log_squash_grad(self, unsquashed_values): """Log gradient of _squash with respect to its argument. Arguments: squashed_values: Point at which to measure the gradient. Returns: The gradient at the given point. The output shape is `squashed_values.shape`. """ raise NotImplementedError class GaussianSquashedGaussian(_SquashedGaussianBase): """A gaussian CDF-squashed Gaussian distribution. The distribution will never return low or high exactly, but `low`+SMALL_NUMBER or `high`-SMALL_NUMBER respectively. See base class documentation for a justification of squashed gaussians. """ # Chosen to match the standard logistic variance, so that: # Var(N(0, 2 * _SCALE)) = Var(Logistic(0, 1)) _SCALE = 0.5 * 1.8137 def kl(self, other): # KL(self || other) is just the KL of the two unsquashed distributions. assert isinstance(other, GaussianSquashedGaussian) mean = self.distr.loc std = self.distr.scale other_mean = other.distr.loc other_std = other.distr.scale return tf.reduce_sum((other.log_std - self.log_std + (tf.square(std) + tf.square(mean - other_mean)) / (2.0 * tf.square(other_std)) - 0.5), axis=1) def entropy(self): # Entropy is: # -KL(self.distr || N(0, _SCALE)) + log(high - low) # where the latter distribution's CDF is used to do the squashing. mean = self.distr.loc std = self.distr.scale return tf.reduce_sum(tf.log(self.high - self.low) - (tf.log(self._SCALE) - self.log_std + (tf.square(std) + tf.square(mean)) / (2.0 * tf.square(self._SCALE)) - 0.5), axis=1) def _log_squash_grad(self, unsquashed_values): squash_dist = tfp.distributions.Normal(loc=0, scale=self._SCALE) log_grad = squash_dist.log_prob(value=unsquashed_values) log_grad += tf.log(self.high - self.low) return log_grad def _squash(self, raw_values): # Make sure raw_values are not too high/low (such that tanh would # return exactly 1.0/-1.0, which would lead to +/-inf log-probs). values = tfp.bijectors.NormalCDF().forward(raw_values / self._SCALE) return (tf.clip_by_value(values, SMALL_NUMBER, 1.0 - SMALL_NUMBER) * (self.high - self.low) + self.low) def _unsquash(self, values): return self._SCALE * tfp.bijectors.NormalCDF().inverse( (values - self.low) / (self.high - self.low)) class Q1PhysActionDist(MultiActionDistribution): """ Action distribution used for training the quake 1 physics environment. Since the action space is always a tuple this subclasses MultiActionDistribution and pulls in appropriate distributions for the component action spaces, notably `GaussianSquashedGaussian` for the box action. See the docstring for this class for more information. """ @staticmethod def _get_child_dists(action_space): child_dist = [] input_lens = [] for action in action_space.spaces: if isinstance(action, gym.spaces.Box): low = action.low high = action.high assert low.shape == (1,) and high.shape == (1,) dist = functools.partial(GaussianSquashedGaussian, low=low[0], high=high[0]) action_space = 2 else: dist, action_size = ModelCatalog.get_action_dist( action, config=None) child_dist.append(dist) input_lens.append(action_size) return child_dist, input_lens def __init__(self, inputs, model): assert isinstance(model.action_space, gym.spaces.Tuple) child_dist, input_lens = self._get_child_dists(model.action_space) super().__init__(inputs, model, action_space=model.action_space, child_distributions=child_dist, input_lens=input_lens) @staticmethod def required_model_output_shape(action_space, model_config): child_dist, input_lens = Q1PhysActionDist._get_child_dists( action_space ) return sum(input_lens) ModelCatalog.register_custom_action_dist("q1_phys_action_dist", Q1PhysActionDist)
py
7dfa2feb8be6d6ef82df9532a8aba878dc7546d1
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class NovaServerVolume: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ sensitive_list = [] openapi_types = { 'id': 'str', 'delete_on_termination': 'bool' } attribute_map = { 'id': 'id', 'delete_on_termination': 'delete_on_termination' } def __init__(self, id=None, delete_on_termination=None): """NovaServerVolume - a model defined in huaweicloud sdk""" self._id = None self._delete_on_termination = None self.discriminator = None self.id = id if delete_on_termination is not None: self.delete_on_termination = delete_on_termination @property def id(self): """Gets the id of this NovaServerVolume. 云磁盘ID。 :return: The id of this NovaServerVolume. :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this NovaServerVolume. 云磁盘ID。 :param id: The id of this NovaServerVolume. :type: str """ self._id = id @property def delete_on_termination(self): """Gets the delete_on_termination of this NovaServerVolume. 一个标志,指示在删除服务器时是否删除附加的卷。、 默认情况下,这是False 微版本2.3后支持 :return: The delete_on_termination of this NovaServerVolume. :rtype: bool """ return self._delete_on_termination @delete_on_termination.setter def delete_on_termination(self, delete_on_termination): """Sets the delete_on_termination of this NovaServerVolume. 一个标志,指示在删除服务器时是否删除附加的卷。、 默认情况下,这是False 微版本2.3后支持 :param delete_on_termination: The delete_on_termination of this NovaServerVolume. :type: bool """ self._delete_on_termination = delete_on_termination def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: if attr in self.sensitive_list: result[attr] = "****" else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" import simplejson as json if six.PY2: import sys reload(sys) sys.setdefaultencoding("utf-8") return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) def __repr__(self): """For `print`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, NovaServerVolume): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
py
7dfa30da382bb6f4ed127f3cec9b15fef161c4cf
import os from django.contrib.auth import authenticate, login, logout, models from django.contrib.auth.decorators import login_required from django.contrib.auth.hashers import make_password from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render, redirect, get_object_or_404 from backstage.models import Student, Teacher, User, Announcement, College, AdmClass, Major, UploadFiles from backstage.forms import * from utils import make_encode # 邮件模块 from django.conf import settings from django.core import mail from courseScheduling.models import ClassRoom, Course def welcome(request): name = request.session['name'] user_type = request.session['user_type'] context = { 'name': name, 'user_type': user_type } return render(request, 'base.html', context) def goto_login(request): return render(request, 'login.html') @csrf_exempt def mylogin(request): def save_session(user_type): request.session['username'] = username if user_type == '管理员': request.session['name'] = username else: request.session['name'] = user.name request.session['password'] = password request.session['user_type'] = user_type if request.POST: username = request.POST.get('username') password = request.POST.get('password') # 对密码进行加密 password = make_encode(password) try: user = User.objects.get(username=username, password=password) login(request, user) if user.is_superuser: save_session('管理员') return redirect('backstage:admin_view') elif len(username) == 10: user = Student.objects.get(username=username) save_session('学生') return redirect('backstage:student_view') elif len(user.username) == 9: user = Teacher.objects.get(username=username) save_session('教师') return redirect('backstage:teacher_view') else: return redirect("backstage:goto_login") except: return redirect("backstage:goto_login") @login_required def student_view(request): if request.method == "GET": username = request.session.get('username', False) user = Student.objects.get(username=username) x = str(user.in_cls) department = College.objects.get(major__short_name=x[:2]) usi = user.in_year announcement = Announcement.objects.filter(receiver=department, year=usi) announcements_to_all = Announcement.objects.filter(receiver="全体成员") announcements = announcement | announcements_to_all return render(request, 'student_base.html', locals()) else: anno_id = request.POST.get('details') announcement = Announcement.objects.get(id=anno_id) return render(request, 'backstage/anno_details.html', locals()) @login_required def admin_view(request): if request.method == "GET": announcements = Announcement.objects.all() adm_operator = Adm() return render(request, 'adm_base.html', locals()) elif "search" in request.POST: adm_operator = Adm(request.POST) if adm_operator.is_valid(): receivers = adm_operator.cleaned_data['receiver'] year = adm_operator.cleaned_data['year'] announcements = Announcement.objects.filter(receiver=receivers, year=year) adm_operator = Adm() return render(request, 'adm_base.html', locals()) else: return render(request, 'errors/403page.html') else: anno_id = request.POST.get('details') announcement = Announcement.objects.get(id=anno_id) adm_operator = Adm() return render(request, 'backstage/adm_base_emails_details.html', locals()) @login_required def teacher_view(request): if request.method == "GET": announcements = Announcement.objects.all() adm_operator = Adm() return render(request, 'teacher_base.html', locals()) elif "search" in request.POST: adm_operator = Adm(request.POST) if adm_operator.is_valid(): receivers = adm_operator.cleaned_data['receiver'] year = adm_operator.cleaned_data['year'] announcements = Announcement.objects.filter(receiver=receivers, year=year) adm_operator = Adm() return render(request, 'teacher_base.html', locals()) else: return render(request, 'errors/403page.html') else: anno_id = request.POST.get('details') announcement = Announcement.objects.get(id=anno_id) adm_operator = Adm() return render(request, 'backstage/adm_base_emails_details.html', locals()) @login_required def mylogout(request): logout(request) return render(request, 'base.html') def backstage_manage(request): return render(request, 'backstage/adm_backstage_manage.html') @login_required def register(request): raise NotImplemented def my_personal_details(request): if request.method == "GET": username = request.session.get('username', False) if len(username) == 10: try: user = Student.objects.get(username=username) return render(request, 'backstage/my_personal_details.html', locals()) except: return JsonResponse({}) else: try: user = Teacher.objects.get(username=username) return render(request, 'backstage/my_personal_details_teacher.html', locals()) except: return JsonResponse({}) else: new_password = request.POST.get('Password') username = request.session.get('username', False) if new_password != "": if len(username) == 10: try: user = Student.objects.get(username=username) change_user = User.objects.get(username=username) change_user.password = make_encode(new_password) change_user.save() return render(request, 'backstage/my_personal_details.html', locals()) except: return JsonResponse({}) else: try: user = Teacher.objects.get(username=username) change_user = User.objects.get(username=username) change_user.password = new_password change_user.save() return render(request, 'backstage/my_personal_details_teacher.html', locals()) except: return JsonResponse({}) else: # print("输入修改值为空,返回主页") if len(username) == 10: return render(request, 'student_base.html') else: return render(request, 'teacher_base.html') def check_announcement(request): if request.method == "GET": username = request.session.get('username', False) user = User.objects.get(username=username) if user.is_superuser: announcements = Announcement.objects.all() return render(request, 'backstage/announcement_check.html', locals()) def send_announcement(request): if request.method == "GET": add_announcement = AddAnnouncement() return render(request, 'backstage/announcement_operate.html', locals()) else: new_announcement = AddAnnouncement(request.POST) username = request.session.get('username', False) if new_announcement.is_valid(): new_announcement_receiver = new_announcement.cleaned_data['receiver'] new_announcement_year = new_announcement.cleaned_data['year'] new_announcement_title = new_announcement.cleaned_data['title'] new_announcement_text = request.POST.get('editor') new_announcement_objects = Announcement.objects.create() new_announcement_objects.title = new_announcement_title new_announcement_objects.messages = new_announcement_text new_announcement_objects.author = username new_announcement_objects.receiver = new_announcement_receiver new_announcement_objects.year = new_announcement_year new_announcement_objects.visible = True new_announcement_objects.save() add_announcement = AddAnnouncement() return render(request, 'backstage/announcement_operate.html', locals()) else: add_announcement = AddAnnouncement() message = "表单错误" return render(request, 'backstage/announcement_operate.html', locals()) def send_emails(request): if request.method == "GET": new_email = SendEmails() return render(request, "backstage/send_emails.html", locals()) else: Emailform = SendEmails(request.POST, request.FILES) if Emailform.is_valid(): path = os.getcwd() path_use = path.replace('\\', '/') receivers = Emailform.cleaned_data['receiver'] title = Emailform.cleaned_data['title'] text = request.POST.get('editor') files = request.FILES.getlist('attach') username = request.session.get('username', False) for files in request.FILES.getlist('attach'): record = UploadFiles(file=files, author=username) record.save() recipient_list = ['[email protected]'] # if receivers == '0': # users = models.User.objects.all() # for user in users: # recipient_list.append(user.email) # else: # users = models.User.objects.filter(department__in=receivers) # for user in users: # recipient_list.append(user.email) from_mail = settings.EMAIL_HOST_USER msg = mail.EmailMessage(title, text, from_mail, recipient_list) msg.content_subtype = "html" for files in request.FILES.getlist('attach'): src = os.path.join(path_use, 'backstage/media/files/' + files.name) msg.attach_file(src) if msg.send(): message = "发送成功" new_email = SendEmails() return render(request, 'backstage/send_emails.html', locals()) else: message = "发送失败" return render(request, 'backstage/send_emails.html', locals()) def adm_view_all_stu(request): if request.method == "POST": if "delete" in request.POST: username = request.POST["delete"] try: change_user = User.objects.get(username=username) change_user.delete() except: return render(request, 'adm_base.html', locals()) username = request.session['username'] adm = User.objects.get(username=username) if not adm.is_superuser: return render(request, 'errors/403page.html') all_college = College.objects.all() all_major = Major.objects.all() all_students = Student.objects.all() all_in_year = all_students.values("in_year").order_by("in_year").distinct() context = { 'all_college': all_college, 'all_major': all_major, 'all_in_year': all_in_year, 'all_students': all_students } return render(request, "backstage/adm_view_all_stu.html", context) elif "change" in request.POST: username = request.POST["change"] request.session['choose_user'] = username try: user = Student.objects.get(username=username) except: return render(request, 'adm_base.html', locals()) return render(request, 'backstage/adm_change_stu.html', locals()) else: new_password = request.POST.get('Password') new_name = request.POST.get('name') new_in_cls = request.POST.get('in_cls') new_score_got = request.POST.get('score_got') username = request.session.get('choose_user', False) try: user_op = Student.objects.get(username=username) new_in_class_num = AdmClass.objects.get(name=new_in_cls) if new_password != "": change_user = User.objects.get(username=username) change_user.password = make_encode(new_password) change_user.save() user_op.in_cls = new_in_class_num user_op.score_got = new_score_got user_op.name = new_name user_op.save() user = Student.objects.get(username=username) return render(request, 'backstage/adm_change_stu.html', locals()) except: return JsonResponse({}) else: username = request.session['username'] adm = User.objects.get(username=username) if not adm.is_superuser: return render(request, 'errors/403page.html') all_college = College.objects.all() all_major = Major.objects.all() all_students = Student.objects.all() all_in_year = all_students.values("in_year").order_by("in_year").distinct() context = { 'all_college': all_college, 'all_major': all_major, 'all_in_year': all_in_year, 'all_students': all_students } return render(request, "backstage/adm_view_all_stu.html", context) def adm_view_all_teacher(request): if request.method == "POST": if "delete" in request.POST: username = request.POST["delete"] try: change_user = User.objects.get(username=username) change_user.delete() except: return render(request, 'adm_base.html', locals()) username = request.session['username'] adm = User.objects.get(username=username) if not adm.is_superuser: return render(request, 'errors/403page.html') all_college = College.objects.all() all_teacher = Teacher.objects.all() all_in_year = all_teacher.values("in_year").order_by("in_year").distinct() context = { 'all_college': all_college, 'all_in_year': all_in_year, 'all_teacher': all_teacher } return render(request, "backstage/adm_view_all_teachers.html", context) elif "change" in request.POST: username = request.POST["change"] request.session['choose_user'] = username try: user = Teacher.objects.get(username=username) college_id = user.college_id college_name = College.objects.get(id=college_id).name except: return render(request, 'adm_base.html', locals()) return render(request, 'backstage/adm_change_tea.html', locals()) elif "add" in request.POST: return render(request, 'backstage/adm_add_tea.html', locals()) elif "confirm_add" in request.POST: new_password = request.POST.get('Password') new_name = request.POST.get('name') new_username = request.POST.get('username') sex = request.POST.get('sex') college_name = request.POST.get('college_name') new_in_year = request.POST.get('in_year') new_title = request.POST.get('title') new_edu_background = request.POST.get('edu_background') print(123) try: college_id_for_new = College.objects.get(name=college_name).id print(123) if sex == "男": sex_int = 1 else: sex_int = 0 new_tea = Teacher.objects.create(password=new_password, username=new_username, edu_background=new_edu_background, title=new_title, in_year=new_in_year, college=college_id_for_new, sex=sex_int) print(123) new_tea.save() except: return render(request, 'adm_base.html', locals()) else: new_password = request.POST.get('Password') new_name = request.POST.get('name') college_name = request.POST.get('college_name') new_in_year = request.POST.get('in_year') new_title = request.POST.get('title') new_edu_background = request.POST.get('edu_background') username = request.session.get('choose_user', False) try: user_op = Teacher.objects.get(username=username) new_college = College.objects.get(name=college_name) if new_password != "": change_user = User.objects.get(username=username) change_user.password = make_encode(new_password) change_user.save() user_op.college_id = new_college user_op.title = new_title user_op.name = new_name user_op.in_year = new_in_year user_op.edu_background = new_edu_background user_op.save() user = Teacher.objects.get(username=username) return render(request, 'backstage/adm_change_tea.html', locals()) except: return JsonResponse({}) else: username = request.session['username'] adm = User.objects.get(username=username) if not adm.is_superuser: return render(request, 'errors/403page.html') all_college = College.objects.all() all_teacher = Teacher.objects.all() all_in_year = all_teacher.values("in_year").order_by("in_year").distinct() context = { 'all_college': all_college, 'all_in_year': all_in_year, 'all_teacher': all_teacher } return render(request, "backstage/adm_view_all_teachers.html", context) def adm_view_all_class_room(request): username = request.session['username'] adm = User.objects.get(username=username) if not adm.is_superuser: return render(request, 'errors/403page.html') all_class_room = ClassRoom.objects.all() context = { 'all_class_room': all_class_room } return render(request, "backstage/adm_view_all_classroom.html", context) def adm_view_all_course(request): username = request.session['username'] adm = User.objects.get(username=username) if not adm.is_superuser: return render(request, 'errors/403page.html') all_course = Course.objects.all() all_college = College.objects.all() all_course_type = all_course.values("course_type").distinct() context = { 'all_course': all_course, 'all_college': all_college, 'all_course_type': all_course_type, } return render(request, "backstage/adm_view_all_course.html", context)
py
7dfa30f91354ba5e01a58685c69fe1f2661d37ab
# Copyright 2018 The TensorFlow Probability Authors. # # 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. # ============================================================================ """Experimental Numpy backend.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools import numpy as np # pylint: disable=unused-import from tensorflow_probability.python.internal.backend.numpy import _utils as utils from tensorflow_probability.python.internal.backend.numpy import bitwise from tensorflow_probability.python.internal.backend.numpy import config from tensorflow_probability.python.internal.backend.numpy import debugging from tensorflow_probability.python.internal.backend.numpy import errors from tensorflow_probability.python.internal.backend.numpy import keras from tensorflow_probability.python.internal.backend.numpy import linalg from tensorflow_probability.python.internal.backend.numpy import nest from tensorflow_probability.python.internal.backend.numpy import nn from tensorflow_probability.python.internal.backend.numpy import numpy_logging as logging from tensorflow_probability.python.internal.backend.numpy import numpy_math as math from tensorflow_probability.python.internal.backend.numpy import numpy_signal as signal from tensorflow_probability.python.internal.backend.numpy import random_generators as random from tensorflow_probability.python.internal.backend.numpy import raw_ops from tensorflow_probability.python.internal.backend.numpy import sets_lib as sets from tensorflow_probability.python.internal.backend.numpy import sparse_lib as sparse from tensorflow_probability.python.internal.backend.numpy import test_lib as test from tensorflow_probability.python.internal.backend.numpy.control_flow import * # pylint: disable=wildcard-import from tensorflow_probability.python.internal.backend.numpy.dtype import * # pylint: disable=wildcard-import from tensorflow_probability.python.internal.backend.numpy.functional_ops import * # pylint: disable=wildcard-import from tensorflow_probability.python.internal.backend.numpy.gen.tensor_shape import TensorShape from tensorflow_probability.python.internal.backend.numpy.misc import * # pylint: disable=wildcard-import from tensorflow_probability.python.internal.backend.numpy.numpy_array import * # pylint: disable=wildcard-import from tensorflow_probability.python.internal.backend.numpy.numpy_math import * # pylint: disable=wildcard-import from tensorflow_probability.python.internal.backend.numpy.ops import * # pylint: disable=wildcard-import from tensorflow_probability.python.internal.backend.numpy.tensor_array_ops import TensorArray # pylint: enable=unused-import JAX_MODE = False Assert = debugging.Assert def _function(func=None, input_signature=None, autograph=True, # pylint: disable=unused-argument experimental_autograph_options=None, # pylint: disable=unused-argument experimental_relax_shapes=False, experimental_compile=None): # pylint: disable=unused-argument """Like `tf.function`, for JAX.""" transform = lambda fn: fn if experimental_compile: if JAX_MODE: from jax import jit # pylint: disable=g-import-not-at-top def non_jittable(arg): # Use static args for callables and for bools, which will sometimes # be used in a `if` block and fail if they are tracers. return callable(arg) or np.asarray(arg).dtype == np.bool def jit_decorator(f): cache = {} def jit_wrapper(*args, **kwargs): @functools.wraps(f) def unflatten_f(*args_flat): unflat_args, unflat_kwargs = nest.pack_sequence_as( (args, kwargs), args_flat) return f(*unflat_args, **unflat_kwargs) args_flat = nest.flatten((args, kwargs)) static_argnums = tuple( i for (i, arg) in enumerate(args_flat) if non_jittable(arg)) cache_key = (static_argnums, len(args), tuple(kwargs.keys())) if cache.get(cache_key, None) is None: cache[cache_key] = jit(unflatten_f, static_argnums=static_argnums) return cache[cache_key](*args_flat) return jit_wrapper transform = jit_decorator else: raise NotImplementedError('Could not find compiler: Numpy only.') # This code path is for the `foo = tf.function(foo, ...)` use case. if func is not None: return transform(func) # This code path is for the following use case: # @tf.function(...) # def foo(...): # ... # This case is equivalent to `foo = tf.function(...)(foo)`. return transform # --- Begin Public Functions -------------------------------------------------- compat = collections.namedtuple('compat', 'dimension_value')( lambda dim: None if dim is None else int(dim)) function = utils.copy_docstring( 'tf.function', _function) eye = linalg.eye matmul = linalg.matmul del collections, utils
py
7dfa31fc33aa590ecee8dddde05bd821738bf8a1
import sys import tensorflow as tf import numpy as np import json import os from deepexplain.tensorflow import DeepExplain from model_structure import prepare_fully_connected_layers from vgg import prepare_vgg_model from data_processing import prepare_image, store_result def get_examples_list(examples_list_path): with open(examples_list_path, 'r') as file_stream: return json.load(file_stream) def prepare_session(session, graph, convolution_model_path, full_connected_model_path): prepare_vgg_model(graph, convolution_model_path) prepare_fully_connected_layers(graph, 'vgg/fc6/Reshape:0', 25088, 2048, 2) with graph.as_default(): saver = tf.train.Saver() session.run(tf.global_variables_initializer()) saver.restore(session, full_connected_model_path) def load_example(images_path, example): return np.array([prepare_image(os.path.join(images_path, example + '.png'))]) def save_result(images_path, example, case, attribution): store_result( os.path.join(images_path, example + '_' + case + '.png'), attribution) def to_gray_scale(image): return np.mean(image, axis=2) def explain(deep_explain, input_tensor, output_tensor, image, labels, attribution_method): explenation = deep_explain.explain( attribution_method, output_tensor * [labels], input_tensor, image #, window_shape=(24, 24, 3), step=10 )[0] return to_gray_scale(explenation) def postprocess_attribution(attribution_normal, attribution_abnormal): threshold = np.maximum( attribution_normal, np.zeros((224, 224))) return np.maximum( attribution_abnormal - threshold, np.zeros((224, 224))) def visualize_example(deep_explain, session, graph, example, input_images_path, output_images_path, attribution_method, only_abnormal): image = load_example(input_images_path, example) output = session.run( ['output:0'], feed_dict={ 'vgg/images:0': image }) print(output) input_tensor = graph.get_tensor_by_name('vgg/images:0') output_tensor = graph.get_tensor_by_name('output:0') name = '{}[{:.2f},{:.2f}]'.format( example, output[0][0][0], output[0][0][1]) attribution_abnormal = explain( deep_explain, input_tensor, output_tensor, image, [0., 1.], attribution_method) if only_abnormal: save_result(output_images_path, name, attribution_method, attribution_abnormal) else: attribution_normal = explain( deep_explain, input_tensor, output_tensor, image, [1., 0.], attribution_method) attribution = postprocess_attribution( attribution_normal, attribution_abnormal) save_result(output_images_path, name, '_base', image[0]) #save_result(output_images_path, name, 'x_0', attribution_normal) #save_result(output_images_path, name, 'x_1', attribution_abnormal) save_result(output_images_path, name, attribution_method, attribution) def main(convolution_model_path, full_connected_model_path, examples_list_path, input_images_path, output_images_path, attribution_method): examples_list = get_examples_list(examples_list_path) graph = tf.Graph() with tf.Session(graph=graph) as session: with DeepExplain(session=session) as deep_explain: prepare_session( session, graph, convolution_model_path, full_connected_model_path) for example in examples_list: visualize_example( deep_explain, session, graph, example, input_images_path, output_images_path, attribution_method, attribution_method == 'occlusion') if __name__ == '__main__': main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6]) # python learning/visualization.py data/vgg16.tfmodel data/model/model.ckpt data/examples.json data/images data/results deeplift
py
7dfa3291aab5b082ec2ecc07b61cf3ad77658109
# Generated by Django 2.2.11 on 2021-05-19 12:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0036_auto_20210515_2048'), ] operations = [ migrations.AlterField( model_name='localbody', name='localbody_code', field=models.CharField(blank=True, max_length=20, null=True), ), ]
py
7dfa32a3d5b00c7d37e036c69c18e28f06834693
import enum import os class Account: Regions = {"EUNE": "EUN1", "EUW": "EUW1", "NA": "NA1"} def __init__(self): self.username = "" self.password = "" self.alias = "" self.region = "" self.mode = "" self.access_token = "" self.account_id = "" self.be = 0 self.rp = 0 self.name_status = "" self.requests_count = 0 self.days = 0 def Setup(self): self.username = str(input("\t> Username: ")) if len(self.username) == 0: raise Exception("Username expected.") self.password = str(input("\t> Password: ")) if len(self.password) == 0: raise Exception("Password expected.") self.alias = str(input("\t> Requested name: ")) if len(self.alias) == 0: raise Exception("Name expected.") self.region = str(input("\t> Region [Abbreviation]: ")).upper() if self.region in self.Regions: self.region = self.Regions[self.region] else: raise Exception("Invalid region.") self.mode = str(input("\t> Mode [Turbo/Sniper]: ")).upper() if self.mode != "TURBO" and self.mode != "SNIPER": raise Exception("Invalid mode.")
py
7dfa3300f031e8165900b70bf2d77544ac108f92
def test_transpose_is_repartition(): from distdl.nn.repartition import Repartition from distdl.nn.transpose import DistributedTranspose assert DistributedTranspose is Repartition
py
7dfa332a2581a22842ef5c4fd3c79502450bb065
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2018 Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the 'License' ); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an 'AS IS' BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### from base64 import b64decode, b64encode import stat import os import json from six.moves import urllib import cherrypy import functools from girder import events from girder.api import access from girder.api.v1.assetstore import Assetstore from girder.constants import AssetstoreType, AccessType, TokenScope from girder.utility.assetstore_utilities import setAssetstoreAdapter from girder.models.model_base import ValidationException from girder.plugin import getPlugin, GirderPlugin from girder.utility import setting_utilities from girder.api.describe import Description, autoDescribeRoute from cumulus.transport import get_connection from cumulus_plugin.models.cluster import Cluster from girder.api.rest import getCurrentUser, getCurrentToken, RestException import datetime as dt def date_parser(timestring): """ Parse a datetime string from ls -l and return a standard isotime ls -l returns dates in two different formats: May 2 09:06 (for dates within 6 months from now) May 2 2018 (for dates further away) Best would be to return ls -l --full-time, but unfortunately we have no control over the remote API """ recent_time_format = "%b %d %H:%M" older_time_format = "%b %d %Y" try: date = dt.datetime.strptime(timestring, recent_time_format) now = dt.datetime.now() this_year = dt.datetime(year=now.year, month=date.month, day=date.day, hour=date.hour, minute=date.minute) last_year = dt.datetime(year=now.year-1, month=date.month, day=date.day, hour=date.hour, minute=date.minute) delta_this = abs((now-this_year).total_seconds()) delta_last = abs((now-last_year).total_seconds()) if (delta_this > delta_last): date = last_year else: date = this_year except ValueError: try: date = dt.datetime.strptime(timestring, older_time_format) except ValueError: return timestring return date.isoformat() def _mtime_isoformat(mtime): return dt.datetime.fromtimestamp(mtime).isoformat() def _parse_id(id): id = json.loads(id) return (id['clusterId'], id['path']) def _generate_id(cluster_id, path): return urllib.parse.quote_plus(json.dumps({ 'clusterId': str(cluster_id), 'path': path })) def _decode_id(func=None, key='id'): if func is None: return functools.partial(_decode_id, key=key) @functools.wraps(func) def wrapped(event, **kwargs): if 'params' in event.info and key in event.info['params']: id = event.info['params'][key] elif key in event.info: id = event.info[key] else: # Request is not well formed, delegate to core. return cluster_id = None try: decoded_id = urllib.parse.unquote_plus(id) (cluster_id, path) = _parse_id(decoded_id) # If we have successfully decoded the id, then prevent the default event.preventDefault() except ValueError: pass if cluster_id is not None: cluster = Cluster().load(cluster_id, user=getCurrentUser()) token = getCurrentToken() with get_connection(token['_id'], cluster) as conn: response = func(conn, path, cluster=cluster, encoded_id=id) event.addResponse(response) return wrapped @access.user(scope=TokenScope.DATA_READ) @_decode_id(key='parentId') def _folder_before(conn, path, cluster, encoded_id, **rest): folders = [] for entry in conn.list(path): if stat.S_ISDIR(entry['mode']) and entry['name'] not in ['.', '..']: entry_path = os.path.join(path, entry['name']) entry_id = _generate_id(cluster['_id'], entry_path) folders.append({ '_id': entry_id, '_modelType': 'folder', 'created': date_parser(entry['date']), 'description': '', 'name': entry['name'], 'parentCollection': 'folder', 'parentId': encoded_id, 'public': False, 'size': entry['size'], 'updated': date_parser(entry['date']) }) return folders @access.user(scope=TokenScope.DATA_READ) @_decode_id def _folder_id_before(conn, path, cluster, encoded_id): for entry in conn.list(path): if entry['name'] == '.': parent_path = os.path.dirname(path) name = os.path.basename(path) parent_id = _generate_id(cluster['_id'], parent_path) return { '_id': encoded_id, '_modelType': 'folder', 'created': date_parser(entry['date']), 'description': '', 'name': name, 'parentCollection': 'folder', 'parentId': parent_id, 'public': False, 'size': entry['size'], 'updated': date_parser(entry['date']) } @access.user(scope=TokenScope.DATA_READ) @_decode_id(key='folderId') def _item_before(conn, path, cluster, encoded_id): items = [] for entry in conn.list(path): if not stat.S_ISDIR(entry['mode']): item_path = os.path.join(path, entry['name']) item_id = _generate_id(cluster['_id'], item_path) items.append({ "_id": item_id, "_modelType": "item", "created": date_parser(entry['date']), "description": "", "folderId": encoded_id, "name": entry['name'], "size": entry['size'], "updated": date_parser(entry['date']), }) return items @access.user(scope=TokenScope.DATA_READ) @_decode_id def _item_id_before(conn, path, cluster, encoded_id): file_stat = conn.stat(path) parent_path = os.path.dirname(path) name = os.path.basename(path) parent_id = _generate_id(cluster['_id'], parent_path) return { "_id": encoded_id, "_modelType": "item", "created": _mtime_isoformat(file_stat.st_mtime), "description": "", "folderId": parent_id, "name": name, "size": file_stat.st_size, "updated": _mtime_isoformat(file_stat.st_mtime) } @access.user(scope=TokenScope.DATA_READ) @_decode_id def _item_files_before(conn, path, cluster, encoded_id): file_stat = conn.stat(path) name = os.path.basename(path) return { "_id": encoded_id, "_modelType": "file", "assetstoreId": None, "created": _mtime_isoformat(file_stat.st_mtime), "exts": [ os.path.splitext(name)[1] ], "itemId": encoded_id, "mimeType": "application/octet-stream", "name": name, "size": file_stat.st_size, "updated": _mtime_isoformat(file_stat.st_mtime) } @access.user(scope=TokenScope.DATA_READ) def _file_id_before(event): return _item_files_before(event) @access.public(cookie=True) @_decode_id def _file_download_before(conn, path, cluster_id, **rest): return conn.get(path) # Rest endpoint to start file system traversal. @access.user(scope=TokenScope.DATA_READ) @autoDescribeRoute( Description('Fetches information about a path on the clusters filesystem.') .modelParam('id', 'The cluster id', model=Cluster, destName='cluster', level=AccessType.READ, paramType='path') .param('path', 'The filesystem path.', required=True, paramType='query') ) def _get_path(cluster, path): basename = os.path.basename(path) token = getCurrentToken() with get_connection(token['_id'], cluster) as conn: entry = conn.stat(path) entry_id = _generate_id(cluster['_id'], path) parent_id = _generate_id(cluster['_id'], os.path.dirname(path)) model = { '_id': entry_id, 'size': entry.st_size, 'name': basename, 'created': _mtime_isoformat(entry.st_mtime), 'updated': _mtime_isoformat(entry.st_mtime) } if stat.S_ISDIR(entry.st_mode): model['_modelType'] = 'folder' model['description'] = '' model['parentCollection'] = 'folder' model['parentId'] = parent_id model['public'] = False return model elif stat.S_ISREG(entry.st_mode): model['_modelType'] = "file" model['assetstoreId'] = None model["exts"] = [ os.path.splitext(basename)[1] ] model['itemId'] = parent_id, model['mimeType'] = 'application/octet-stream' return model class ClusterFileSystemPlugin(GirderPlugin): DISPLAY_NAME = 'Cluster filesystem' def load(self, info): getPlugin('cumulus_plugin').load(info) events.bind('rest.get.folder.before', 'cluster_filesystem',_folder_before) events.bind('rest.get.folder/:id.before', 'cluster_filesystem',_folder_id_before) events.bind('rest.get.item.before', 'cluster_filesystem',_item_before) events.bind('rest.get.item/:id.before', 'cluster_filesystem',_item_id_before) events.bind('rest.get.item/:id/files.before', 'cluster_filesystem', _item_files_before) events.bind('rest.get.file/:id.before', 'cluster_filesystem',_file_id_before) events.bind('rest.get.file/:id/download.before', 'cluster_filesystem',_file_download_before) info['apiRoot'].clusters.route('GET', (':id', 'filesystem'), _get_path)
py
7dfa338ff381bae346eca3793606a0398edb92b5
import cv2 import numpy as np from matplotlib import pyplot as plt import random import time filename = 'images/safak.jfif' img_original = cv2.imread(filename, 0) img_process = img_original.copy() (thresh, img_bin) = cv2.threshold(img_process, 128, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU) img_process = 255-img_bin height, width = img_original.shape x =1 def nothing(x): pass cv2.namedWindow('image') # create trackbars for color change cv2.createTrackbar('edged', 'image', 0, 100, nothing) cv2.createTrackbar('blur', 'image', 0, 50, nothing) cv2.createTrackbar('dilated', 'image', 0, 50, nothing) cv2.createTrackbar('blur2', 'image', 0, 50, nothing) # create switch for ON/OFF functionality switch = '0 : OFF \n1 : ON' cv2.createTrackbar('0 : OFF \n1 : ON', 'image', 0, 2, nothing) while 1: time.sleep(0.1) k = cv2.waitKey(1) & 0xFF if k == 27: break s = cv2.getTrackbarPos(switch, 'image') if s == 0: x = 1 b = cv2.getTrackbarPos('blur', 'image') b = (b*2)+1 e = cv2.getTrackbarPos('edged', 'image') d = cv2.getTrackbarPos('dilated', 'image') d = (d * 2) + 1 f = cv2.getTrackbarPos('blur2', 'image') f = (e * 2) + 1 edged = cv2.Canny(img_original, 0, e) blur = cv2.GaussianBlur(edged, (b, b), 0) dilated = cv2.dilate(blur, np.ones((d, d))) blur2 = cv2.GaussianBlur(dilated, (f, f), 0) vis = np.concatenate((img_original, edged), axis=1) vis = np.concatenate((vis, blur), axis=1) vis = np.concatenate((vis, dilated), axis=1) vis = np.concatenate((vis, blur2), axis=1) resized = cv2.resize(vis, (int(width / 5)*5, int(height / 5))) cv2.imshow('image', resized) elif s == 1: while x == 1: b = cv2.getTrackbarPos('blur', 'image') b = (b * 2) + 1 e = cv2.getTrackbarPos('edged', 'image') d = cv2.getTrackbarPos('dilated', 'image') d = (d * 2) + 1 blur = cv2.GaussianBlur(img_process, (b, b), 0) edged = cv2.Canny(blur, 0, e) dilated = cv2.dilate(edged, np.ones((d, d))) contours, _ = cv2.findContours(dilated, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) for i, contour in enumerate(contours): if 1: rect = cv2.boundingRect(contour) x, y, w, h = [r for r in rect] cv2.rectangle(img_original, (x, y), ((x + w), (y + h)), (255, 0, 0), 10) resized3 = cv2.resize(img_original, (int(width / 4), int(height / 4))) cv2.imshow('image', resized3) x = 0 else: x = 1 resized2 = cv2.resize(img_original, (int(width / 4), int(height / 4))) cv2.imshow('image', resized2) cv2.destroyAllWindows()
py
7dfa3430cf78446cfdd7c3bb0a51a96e033e8184
from common_fixtures import * # NOQA from cattle import ApiError class Context: def __init__(self, ctx, driver): self.new_context = ctx self.driver = driver @pytest.fixture(scope='function') def storage_driver_context(new_context, super_client): client = new_context.client stack = client.create_stack(name=random_str(), startOnCreate=True) super_client.update(stack, system=True) stack = client.wait_success(stack) assert stack.state == 'active' s = client.create_storage_driver_service( name=random_str(), startOnCreate=True, stackId=stack.id, storageDriver={ 'foo': 'bar' }) s = client.wait_success(s) assert s.state == 'active' assert s.kind == 'storageDriverService' wait_for(lambda: len(s.storageDrivers()) == 1) driver = find_one(s.storageDrivers) return Context(new_context, driver) def test_storage_driver_in_use(new_context, super_client): client = new_context.client stack = client.create_stack(name=random_str(), startOnCreate=True) super_client.update(stack, system=True) stack = client.wait_success(stack) assert stack.state == 'active' s = client.create_storage_driver_service( name=random_str(), startOnCreate=True, stackId=stack.id, storageDriver={ 'foo': 'bar' }) s = client.wait_success(s) assert s.state == 'active' driver = find_one(s.storageDrivers) vol_name = random_str() c = new_context.create_container(dataVolumes=[ '{}:/tmp'.format(vol_name) ], volumeDriver=driver.name) c = client.wait_success(c) assert c.state == 'running' vol = find_one(client.list_volume, name=vol_name) assert find_one(vol.storagePools).storageDriverId == driver.id with pytest.raises(ApiError): s.deactivate() with pytest.raises(ApiError): client.delete(s) with pytest.raises(ApiError): stack.deactivateservices() with pytest.raises(ApiError): client.delete(stack) def test_create_storage_driver_create_delete(new_context, super_client): client = new_context.client host = new_context.host assert len(host.storagePools()) == 1 driver_name = 'test' + random_str() stack = client.create_stack(name=random_str()) super_client.update(stack, system=True) s = client.create_storage_driver_service( name=random_str(), stackId=stack.id, storageDriver={ 'name': driver_name, 'volumeAccessMode': driver_name, 'blockDevicePath': 'some path', 'volumeCapabilities': [ 'superAwesome', ], }) s = client.wait_success(s) assert s.state == 'inactive' sds = client.list_storage_driver(serviceId=s.id, name=driver_name) assert len(sds) == 1 s = client.wait_success(s.activate()) assert s.state == 'active' sd = find_one(client.list_storage_driver, serviceId=s.id, name=driver_name) sd = client.wait_success(sd) find_one(s.storageDrivers) assert sd.state == 'active' assert sd.kind == 'storageDriver' assert sd.serviceId == s.id assert sd.scope == 'environment' assert sd.volumeAccessMode == 'multiHostRW' pools = [x for x in host.storagePools() if x.storageDriverId == sd.id] assert len(host.storagePools()) == 2 assert len(pools) == 1 stack = client.wait_success(stack.remove()) assert stack.state == 'removed' s = client.wait_success(s) assert s.state == 'removed' sd = client.wait_success(sd) assert sd.state == 'removed' def test_volume_create_from_driver(storage_driver_context): client = storage_driver_context.new_context.client host = storage_driver_context.new_context.host driver = storage_driver_context.driver volume = client.create_volume(name=random_str(), driver=driver.name, hostId=host.id) volume = client.wait_success(volume) assert volume.state == 'detached' assert volume.storageDriverId == driver.id assert volume.driver == driver.name def test_volume_create_from_driver2(storage_driver_context, super_client): client = storage_driver_context.new_context.client host = storage_driver_context.new_context.host driver = storage_driver_context.driver volume = client.create_volume(name=random_str(), storageDriverId=driver.id, hostId=host.id) volume = client.wait_success(volume) assert volume.state == 'detached' assert volume.storageDriverId == driver.id assert volume.driver == driver.name volume = super_client.reload(volume) assert len(volume.storagePools()) == 1 volume = client.wait_success(volume.remove()) assert volume.removed is not None def test_volume_create_from_user(storage_driver_context): client = storage_driver_context.new_context.client host = storage_driver_context.new_context.host driver = storage_driver_context.driver volume = client.create_volume(name=random_str(), storageDriverId=driver.id) volume = client.wait_success(volume) assert volume.state == 'inactive' assert volume.storageDriverId == driver.id assert volume.driver == driver.name volume = client.update(volume, hostId=host.id) volume = client.wait_success(volume) assert volume.state == 'detached' assert volume.hostId == host.id
py
7dfa365bc306c6a0bb6e8d88d52a299d6f51b286
# coding: utf-8 """ Masking API Schema for the Masking Engine API # noqa: E501 OpenAPI spec version: 5.1.8 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from dxm.lib.masking_api.api_client import ApiClient class ExecutionComponentApi(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def get_all_execution_components(self, **kwargs): # noqa: E501 """Get all execution components # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_execution_components(async_req=True) >>> result = thread.get() :param async_req bool :param int execution_id: The ID of the execution to get all components for :param int page_number: The page number for which to get executions. This will default to the first page if excluded :param int page_size: The maximum number of objects to return. This will default to the DEFAULT_API_PAGE_SIZE property if not provided :return: ExecutionComponentList If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.get_all_execution_components_with_http_info(**kwargs) # noqa: E501 else: (data) = self.get_all_execution_components_with_http_info(**kwargs) # noqa: E501 return data def get_all_execution_components_with_http_info(self, **kwargs): # noqa: E501 """Get all execution components # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_all_execution_components_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param int execution_id: The ID of the execution to get all components for :param int page_number: The page number for which to get executions. This will default to the first page if excluded :param int page_size: The maximum number of objects to return. This will default to the DEFAULT_API_PAGE_SIZE property if not provided :return: ExecutionComponentList If the method is called asynchronously, returns the request thread. """ all_params = ['execution_id', 'page_number', 'page_size'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_all_execution_components" % key ) params[key] = val del params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'execution_id' in params: query_params.append(('execution_id', params['execution_id'])) # noqa: E501 if 'page_number' in params: query_params.append(('page_number', params['page_number'])) # noqa: E501 if 'page_size' in params: query_params.append(('page_size', params['page_size'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['api_key'] # noqa: E501 return self.api_client.call_api( '/execution-components', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='ExecutionComponentList', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats)
py
7dfa3673a030520b19a1d3028a338c030d0eff6e
""" Functions for secure comparison of GF(p) types. Most protocols come from [1], with a few subroutines described in [2]. Function naming of comparison routines is as in [1,2], with k always representing the integer bit length, and kappa the statistical security parameter. Most of these routines were implemented before the cint/sint classes, so use the old-fasioned Register class and assembly instructions instead of operator overloading. The PreMulC function has a few variants, depending on whether preprocessing is only triples/bits, or inverse tuples or "special" comparison-specific preprocessing is also available. [1] https://www1.cs.fau.de/filepool/publications/octavian_securescm/smcint-scn10.pdf [2] https://www1.cs.fau.de/filepool/publications/octavian_securescm/SecureSCM-D.9.2.pdf """ # Use constant rounds protocols instead of log rounds const_rounds = False # Set use_inv to use preprocessed inverse tuples for more efficient # online phase comparisons. use_inv = True # If do_precomp is not set, use_inv uses standard inverse tuples, otherwise if # both are set, use a list of "special" tuples of the form # (r[i], r[i]^-1, r[i] * r[i-1]^-1) do_precomp = True from . import instructions_base from . import util def set_variant(options): """ Set flags based on the command-line option provided """ global const_rounds, do_precomp, use_inv variant = options.comparison if variant == 'log': const_rounds = False elif variant == 'plain': const_rounds = True use_inv = False elif variant == 'inv': const_rounds = True use_inv = True do_precomp = True elif variant == 'sinv': const_rounds = True use_inv = True do_precomp = False elif variant is not None: raise CompilerError('Unknown comparison variant: %s' % variant) def ld2i(c, n): """ Load immediate 2^n into clear GF(p) register c """ t1 = program.curr_block.new_reg('c') ldi(t1, 2 ** (n % 30)) for i in range(n // 30): t2 = program.curr_block.new_reg('c') mulci(t2, t1, 2 ** 30) t1 = t2 movc(c, t1) inverse_of_two = {} def divide_by_two(res, x, m=1): """ Faster clear division by two using a cached value of 2^-1 mod p """ tmp = program.curr_block.new_reg('c') inv2m(tmp, m) mulc(res, x, tmp) def require_ring_size(k, op): if int(program.options.ring) < k: raise CompilerError('ring size too small for %s, compile ' 'with \'-R %d\' or more' % (op, k)) @instructions_base.cisc def LTZ(s, a, k, kappa): """ s = (a ?< 0) k: bit length of a """ from .types import sint, _bitint from .GC.types import sbitvec if program.use_split(): summands = a.split_to_two_summands(k) carry = CarryOutRawLE(*reversed(list(x[:-1] for x in summands))) msb = carry ^ summands[0][-1] ^ summands[1][-1] movs(s, sint.conv(msb)) return elif program.options.ring: from . import floatingpoint require_ring_size(k, 'comparison') m = k - 1 shift = int(program.options.ring) - k r_prime, r_bin = MaskingBitsInRing(k) tmp = a - r_prime c_prime = (tmp << shift).reveal() >> shift a = r_bin[0].bit_decompose_clear(c_prime, m) b = r_bin[:m] u = CarryOutRaw(a[::-1], b[::-1]) movs(s, sint.conv(r_bin[m].bit_xor(c_prime >> m).bit_xor(u))) return t = sint() Trunc(t, a, k, k - 1, kappa, True) subsfi(s, t, 0) def LessThanZero(a, k, kappa): from . import types res = types.sint() LTZ(res, a, k, kappa) return res @instructions_base.cisc def Trunc(d, a, k, m, kappa, signed): """ d = a >> m k: bit length of a m: compile-time integer signed: True/False, describes a """ t = program.curr_block.new_reg('s') c = [program.curr_block.new_reg('c') for i in range(3)] c2m = program.curr_block.new_reg('c') if m == 0: movs(d, a) return elif program.options.ring: return TruncRing(d, a, k, m, signed) else: a_prime = program.non_linear.mod2m(a, k, m, signed) subs(t, a, a_prime) ldi(c[1], 1) divide_by_two(c[2], c[1], m) mulm(d, t, c[2]) def TruncRing(d, a, k, m, signed): program.curr_tape.require_bit_length(1) if program.use_split() in (2, 3): if signed: a += (1 << (k - 1)) from Compiler.types import sint from .GC.types import sbitint length = int(program.options.ring) summands = a.split_to_n_summands(length, program.use_split()) x = sbitint.wallace_tree_without_finish(summands, True) if program.use_split() == 2: carries = sbitint.get_carries(*x) low = carries[m] high = sint.conv(carries[length]) else: if m == 1: low = x[1][1] high = sint.conv(CarryOutLE(x[1][:-1], x[0][:-1])) + \ sint.conv(x[0][-1]) else: mid_carry = CarryOutRawLE(x[1][:m], x[0][:m]) low = sint.conv(mid_carry) + sint.conv(x[0][m]) tmp = util.tree_reduce(carry, (sbitint.half_adder(xx, yy) for xx, yy in zip(x[1][m:-1], x[0][m:-1]))) top_carry = sint.conv(carry([None, mid_carry], tmp, False)[1]) high = top_carry + sint.conv(x[0][-1]) shifted = sint() shrsi(shifted, a, m) res = shifted + sint.conv(low) - (high << (length - m)) if signed: res -= (1 << (k - m - 1)) else: a_prime = Mod2mRing(None, a, k, m, signed) a -= a_prime res = TruncLeakyInRing(a, k, m, signed) if d is not None: movs(d, res) return res def TruncZeros(a, k, m, signed): if program.options.ring: return TruncLeakyInRing(a, k, m, signed) else: from . import types tmp = types.cint() inv2m(tmp, m) return a * tmp def TruncLeakyInRing(a, k, m, signed): """ Returns a >> m. Requires a < 2^k and leaks a % 2^m (needs to be constant or random). """ assert k > m assert int(program.options.ring) >= k from .types import sint, intbitint, cint, cgf2n n_bits = k - m n_shift = int(program.options.ring) - n_bits if n_bits > 1: r, r_bits = MaskingBitsInRing(n_bits, True) else: r_bits = [sint.get_random_bit() for i in range(n_bits)] r = sint.bit_compose(r_bits) if signed: a += (1 << (k - 1)) shifted = ((a << (n_shift - m)) + (r << n_shift)).reveal() masked = shifted >> n_shift u = sint() BitLTL(u, masked, r_bits[:n_bits], 0) res = (u << n_bits) + masked - r if signed: res -= (1 << (n_bits - 1)) return res def TruncRoundNearest(a, k, m, kappa, signed=False): """ Returns a / 2^m, rounded to the nearest integer. k: bit length of a m: compile-time integer """ if m == 0: return a nl = program.non_linear nl.check_security(kappa) return program.non_linear.trunc_round_nearest(a, k, m, signed) @instructions_base.cisc def Mod2m(a_prime, a, k, m, kappa, signed): """ a_prime = a % 2^m k: bit length of a m: compile-time integer signed: True/False, describes a """ nl = program.non_linear nl.check_security(kappa) movs(a_prime, program.non_linear.mod2m(a, k, m, signed)) def Mod2mRing(a_prime, a, k, m, signed): assert(int(program.options.ring) >= k) from Compiler.types import sint, intbitint, cint shift = int(program.options.ring) - m r_prime, r_bin = MaskingBitsInRing(m, True) tmp = a + r_prime c_prime = (tmp << shift).reveal() >> shift u = sint() BitLTL(u, c_prime, r_bin[:m], 0) res = (u << m) + c_prime - r_prime if a_prime is not None: movs(a_prime, res) return res def Mod2mField(a_prime, a, k, m, kappa, signed): from .types import sint r_dprime = program.curr_block.new_reg('s') r_prime = program.curr_block.new_reg('s') r = [sint() for i in range(m)] c = program.curr_block.new_reg('c') c_prime = program.curr_block.new_reg('c') v = program.curr_block.new_reg('s') u = program.curr_block.new_reg('s') t = [program.curr_block.new_reg('s') for i in range(6)] c2m = program.curr_block.new_reg('c') c2k1 = program.curr_block.new_reg('c') PRandM(r_dprime, r_prime, r, k, m, kappa) ld2i(c2m, m) mulm(t[0], r_dprime, c2m) if signed: ld2i(c2k1, k - 1) addm(t[1], a, c2k1) else: t[1] = a adds(t[2], t[0], t[1]) adds(t[3], t[2], r_prime) asm_open(c, t[3]) modc(c_prime, c, c2m) if const_rounds: BitLTC1(u, c_prime, r, kappa) else: BitLTL(u, c_prime, r, kappa) mulm(t[4], u, c2m) submr(t[5], c_prime, r_prime) adds(a_prime, t[5], t[4]) return r_dprime, r_prime, c, c_prime, u, t, c2k1 def MaskingBitsInRing(m, strict=False): program.curr_tape.require_bit_length(1) from Compiler.types import sint if program.use_edabit(): return sint.get_edabit(m, strict) elif program.use_dabit: r, r_bin = zip(*(sint.get_dabit() for i in range(m))) else: r = [sint.get_random_bit() for i in range(m)] r_bin = r return sint.bit_compose(r), r_bin def PRandM(r_dprime, r_prime, b, k, m, kappa, use_dabit=True): """ r_dprime = random secret integer in range [0, 2^(k + kappa - m) - 1] r_prime = random secret integer in range [0, 2^m - 1] b = array containing bits of r_prime """ program.curr_tape.require_bit_length(k + kappa) from .types import sint if program.use_edabit() and m > 1 and not const_rounds: movs(r_dprime, sint.get_edabit(k + kappa - m, True)[0]) tmp, b[:] = sint.get_edabit(m, True) movs(r_prime, tmp) return t = [[program.curr_block.new_reg('s') for j in range(2)] for i in range(m)] t[0][1] = b[-1] PRandInt(r_dprime, k + kappa - m) # r_dprime is always multiplied by 2^m if use_dabit and program.use_dabit and m > 1 and not const_rounds: r, b[:] = zip(*(sint.get_dabit() for i in range(m))) r = sint.bit_compose(r) movs(r_prime, r) return bit(b[-1]) for i in range(1,m): adds(t[i][0], t[i-1][1], t[i-1][1]) bit(b[-i-1]) adds(t[i][1], t[i][0], b[-i-1]) movs(r_prime, t[m-1][1]) def PRandInt(r, k): """ r = random secret integer in range [0, 2^k - 1] """ t = [[program.curr_block.new_reg('s') for i in range(k)] for j in range(3)] t[2][k-1] = r bit(t[2][0]) for i in range(1,k): adds(t[0][i], t[2][i-1], t[2][i-1]) bit(t[1][i]) adds(t[2][i], t[0][i], t[1][i]) def BitLTC1(u, a, b, kappa): """ u = a <? b a: array of clear bits b: array of secret bits (same length as a) """ k = len(b) p = [program.curr_block.new_reg('s') for i in range(k)] from . import floatingpoint a_bits = floatingpoint.bits(a, k) if instructions_base.get_global_vector_size() == 1: a_ = a_bits a_bits = program.curr_block.new_reg('c', size=k) b_vec = program.curr_block.new_reg('s', size=k) for i in range(k): movc(a_bits[i], a_[i]) movs(b_vec[i], b[i]) d = program.curr_block.new_reg('s', size=k) s = program.curr_block.new_reg('s', size=k) t = [program.curr_block.new_reg('s', size=k) for j in range(5)] c = [program.curr_block.new_reg('c', size=k) for j in range(4)] else: d = [program.curr_block.new_reg('s') for i in range(k)] s = [program.curr_block.new_reg('s') for i in range(k)] t = [[program.curr_block.new_reg('s') for i in range(k)] for j in range(5)] c = [[program.curr_block.new_reg('c') for i in range(k)] for j in range(4)] if instructions_base.get_global_vector_size() == 1: vmulci(k, c[2], a_bits, 2) vmulm(k, t[0], b_vec, c[2]) vaddm(k, t[1], b_vec, a_bits) vsubs(k, d, t[1], t[0]) vaddsi(k, t[2], d, 1) t[2].create_vector_elements() pre_input = t[2].vector[:] else: for i in range(k): mulci(c[2][i], a_bits[i], 2) mulm(t[0][i], b[i], c[2][i]) addm(t[1][i], b[i], a_bits[i]) subs(d[i], t[1][i], t[0][i]) addsi(t[2][i], d[i], 1) pre_input = t[2][:] pre_input.reverse() if use_inv: if instructions_base.get_global_vector_size() == 1: PreMulC_with_inverses_and_vectors(p, pre_input) else: if do_precomp: PreMulC_with_inverses(p, pre_input) else: raise NotImplementedError('Vectors not compatible with -c sinv') else: PreMulC_without_inverses(p, pre_input) p.reverse() for i in range(k-1): subs(s[i], p[i], p[i+1]) subsi(s[k-1], p[k-1], 1) subcfi(c[3][0], a_bits[0], 1) mulm(t[4][0], s[0], c[3][0]) from .types import sint t[3] = [sint() for i in range(k)] for i in range(1,k): subcfi(c[3][i], a_bits[i], 1) mulm(t[3][i], s[i], c[3][i]) adds(t[4][i], t[4][i-1], t[3][i]) Mod2(u, t[4][k-1], k, kappa, False) return p, a_bits, d, s, t, c, b, pre_input def carry(b, a, compute_p=True): """ Carry propogation: return (p,g) = (p_2, g_2)o(p_1, g_1) -> (p_1 & p_2, g_2 | (p_2 & g_1)) """ if a is None: return b if b is None: return a t = [program.curr_block.new_reg('s') for i in range(3)] if compute_p: t[0] = a[0].bit_and(b[0]) t[2] = a[0].bit_and(b[1]) + a[1] return t[0], t[2] # from WP9 report # length of a is even def CarryOutAux(a, kappa): k = len(a) if k > 1 and k % 2 == 1: a.append(None) k += 1 u = [None]*(k//2) a = a[::-1] if k > 1: for i in range(k//2): u[i] = carry(a[2*i+1], a[2*i], i != k//2-1) return CarryOutAux(u[:k//2][::-1], kappa) else: return a[0][1] # carry out with carry-in bit c def CarryOut(res, a, b, c=0, kappa=None): """ res = last carry bit in addition of a and b a: array of clear bits b: array of secret bits (same length as a) c: initial carry-in bit """ from .types import sint movs(res, sint.conv(CarryOutRaw(a, b, c))) def CarryOutRaw(a, b, c=0): assert len(a) == len(b) k = len(a) from . import types if program.linear_rounds(): carry = 0 for (ai, bi) in zip(a, b): carry = bi.carry_out(ai, carry) return carry d = [program.curr_block.new_reg('s') for i in range(k)] s = [program.curr_block.new_reg('s') for i in range(3)] for i in range(k): d[i] = list(b[i].half_adder(a[i])) s[0] = d[-1][0].bit_and(c) s[1] = d[-1][1] + s[0] d[-1][1] = s[1] return CarryOutAux(d[::-1], None) def CarryOutRawLE(a, b, c=0): """ Little-endian version """ return CarryOutRaw(a[::-1], b[::-1], c) def CarryOutLE(a, b, c=0): """ Little-endian version """ from . import types res = types.sint() CarryOut(res, a[::-1], b[::-1], c) return res def BitLTL(res, a, b, kappa): """ res = a <? b (logarithmic rounds version) a: clear integer register b: array of secret bits (same length as a) """ k = len(b) a_bits = b[0].bit_decompose_clear(a, k) s = [[program.curr_block.new_reg('s') for i in range(k)] for j in range(2)] t = [program.curr_block.new_reg('s') for i in range(1)] for i in range(len(b)): s[0][i] = b[0].long_one() - b[i] CarryOut(t[0], a_bits[::-1], s[0][::-1], b[0].long_one(), kappa) subsfi(res, t[0], 1) return a_bits, s[0] def PreMulC_with_inverses_and_vectors(p, a): """ p[i] = prod_{j=0}^{i-1} a[i] Variant for vector registers using preprocessed inverses. """ k = len(p) a_vec = program.curr_block.new_reg('s', size=k) r = program.curr_block.new_reg('s', size=k) w = program.curr_block.new_reg('s', size=k) w_tmp = program.curr_block.new_reg('s', size=k) z = program.curr_block.new_reg('s', size=k) m = program.curr_block.new_reg('c', size=k) t = [program.curr_block.new_reg('s', size=k) for i in range(1)] c = [program.curr_block.new_reg('c') for i in range(k)] # warning: computer scientists count from 0 if do_precomp: vinverse(k, r, z) else: vprep(k, 'PreMulC', r, z, w_tmp) for i in range(1,k): if do_precomp: muls(w[i], r[i], z[i-1]) else: movs(w[i], w_tmp[i]) movs(a_vec[i], a[i]) movs(w[0], r[0]) movs(a_vec[0], a[0]) vmuls(k, t[0], w, a_vec) vasm_open(k, m, t[0]) PreMulC_end(p, a, c, m, z) def PreMulC_with_inverses(p, a): """ Variant using preprocessed inverses or special inverses. The latter are triples of the form (a_i, a_i^{-1}, a_i * a_{i-1}^{-1}). See also make_PreMulC() in Fake-Offline.cpp. """ k = len(a) r = [[program.curr_block.new_reg('s') for i in range(k)] for j in range(3)] w = [[program.curr_block.new_reg('s') for i in range(k)] for j in range(2)] z = [program.curr_block.new_reg('s') for i in range(k)] m = [program.curr_block.new_reg('c') for i in range(k)] t = [[program.curr_block.new_reg('s') for i in range(k)] for i in range(1)] c = [program.curr_block.new_reg('c') for i in range(k)] # warning: computer scientists count from 0 for i in range(k): if do_precomp: inverse(r[0][i], z[i]) else: prep('PreMulC', r[0][i], z[i], w[1][i]) if do_precomp: for i in range(1,k): muls(w[1][i], r[0][i], z[i-1]) w[1][0] = r[0][0] for i in range(k): muls(t[0][i], w[1][i], a[i]) asm_open(m[i], t[0][i]) PreMulC_end(p, a, c, m, z) def PreMulC_without_inverses(p, a): """ Plain variant with no extra preprocessing. """ k = len(a) r = [program.curr_block.new_reg('s') for i in range(k)] s = [program.curr_block.new_reg('s') for i in range(k)] u = [program.curr_block.new_reg('c') for i in range(k)] v = [program.curr_block.new_reg('s') for i in range(k)] w = [program.curr_block.new_reg('s') for i in range(k)] z = [program.curr_block.new_reg('s') for i in range(k)] m = [program.curr_block.new_reg('c') for i in range(k)] t = [[program.curr_block.new_reg('s') for i in range(k)] for i in range(2)] #tt = [[program.curr_block.new_reg('s') for i in range(k)] for i in range(4)] u_inv = [program.curr_block.new_reg('c') for i in range(k)] c = [program.curr_block.new_reg('c') for i in range(k)] # warning: computer scientists count from 0 for i in range(k): triple(s[i], r[i], t[0][i]) #adds(tt[0][i], t[0][i], a[i]) #subs(tt[1][i], tt[0][i], a[i]) #startopen(tt[1][i]) asm_open(u[i], t[0][i]) for i in range(k-1): muls(v[i], r[i+1], s[i]) w[0] = r[0] one = program.curr_block.new_reg('c') ldi(one, 1) for i in range(k): divc(u_inv[i], one, u[i]) # avoid division by zero, just for benchmarking #divc(u_inv[i], u[i], one) for i in range(1,k): mulm(w[i], v[i-1], u_inv[i-1]) for i in range(1,k): mulm(z[i], s[i], u_inv[i]) for i in range(k): muls(t[1][i], w[i], a[i]) asm_open(m[i], t[1][i]) PreMulC_end(p, a, c, m, z) def PreMulC_end(p, a, c, m, z): """ Helper function for all PreMulC variants. Local operation. """ k = len(a) c[0] = m[0] for j in range(1,k): mulc(c[j], c[j-1], m[j]) if isinstance(p, list): mulm(p[j], z[j], c[j]) if isinstance(p, list): p[0] = a[0] else: mulm(p, z[-1], c[-1]) def PreMulC(a): p = [type(a[0])() for i in range(len(a))] instructions_base.set_global_instruction_type(a[0].instruction_type) if use_inv: PreMulC_with_inverses(p, a) else: PreMulC_without_inverses(p, a) instructions_base.reset_global_instruction_type() return p def KMulC(a): """ Return just the product of all items in a """ from .types import sint, cint p = sint() if use_inv: PreMulC_with_inverses(p, a) else: PreMulC_without_inverses(p, a) return p def Mod2(a_0, a, k, kappa, signed): """ a_0 = a % 2 k: bit length of a """ if k <= 1: movs(a_0, a) return r_dprime = program.curr_block.new_reg('s') r_prime = program.curr_block.new_reg('s') r_0 = program.curr_block.new_reg('s') c = program.curr_block.new_reg('c') c_0 = program.curr_block.new_reg('c') tc = program.curr_block.new_reg('c') t = [program.curr_block.new_reg('s') for i in range(6)] c2k1 = program.curr_block.new_reg('c') PRandM(r_dprime, r_prime, [r_0], k, 1, kappa) mulsi(t[0], r_dprime, 2) if signed: ld2i(c2k1, k - 1) addm(t[1], a, c2k1) else: t[1] = a adds(t[2], t[0], t[1]) adds(t[3], t[2], r_prime) asm_open(c, t[3]) from . import floatingpoint c_0 = floatingpoint.bits(c, 1)[0] mulci(tc, c_0, 2) mulm(t[4], r_0, tc) addm(t[5], r_0, c_0) subs(a_0, t[5], t[4]) # hack for circular dependency from .instructions import *
py
7dfa36d8c56b57fd99f5193631769fdea9b11fa8
#!/usr/bin/env python3 # check_mister_support - sairuk # # Checks the main MiSTer distro against RetroNAS mister entries and reports differences # import os import yaml import requests import json IGNORED_KEYS = [ 'system_map', 'system_links' ] IGNORED_SYSTEMS = [ "MEMTEST" ] MISTER_DIRS = [ 'games', ] MISTER_REPOS = [ 'https://api.github.com/repos/MiSTer-devel/Distribution_MiSTer/git/trees/main?recursive=1', 'https://api.github.com/repos/MiSTer-DB9/Distribution_MiSTer/git/trees/main?recursive=1', ] # maybe support these later """ https://github.com/MiSTer-LLAPI/LLAPI_folder_MiSTer/tree/main/_LLAPI https://github.com/jotego/jtcores_mister """ RETRONAS_SYSTEMS = 'https://raw.githubusercontent.com/danmons/retronas/main/ansible/retronas_systems.yml' def _log(s): print(s) def _get(url): _log("Getting data from %s" % url) r = requests.get(url) if r.status_code == 200: return r.content else: _log("Failed to get %s, code was %s" % (url, r.status_code)) return None def main(): mister_systems = [] # mister github data for MISTER_REPO in MISTER_REPOS: mister_c = _get(MISTER_REPO) if mister_c is not None: mister_d = json.loads(mister_c) for item in mister_d['tree']: for dirs in MISTER_DIRS: if dirs in item['path'] and item['path'].count('/') == 1: filename = item['path'].replace("%s/" % dirs,'') mister_systems.append(filename) #mister_systems.append(filename.split('_')[0]) # retronas data retronas_c = _get(RETRONAS_SYSTEMS) if retronas_c is not None: retronas_d = yaml.safe_load(retronas_c) retronas_mister_systems = [] for key in retronas_d.keys(): if key not in IGNORED_KEYS: for system in retronas_d[key]: if system['mister'] != "": retronas_mister_systems.append(system['mister']) # compare _log("Checking for MiSTer Systems not in retronas based on distro repo") found = False for system in mister_systems: if system not in retronas_mister_systems and system not in IGNORED_SYSTEMS: _log(" %s" % system) found = True if not found: _log("No missing systems found") return if __name__ == "__main__": main()
py
7dfa37880d980473d3293fd149452b6f0c47e977
import torch import torch.nn as nn from kospeech.models.conformer import Conformer batch_size, sequence_length, dim = 3, 12345, 80 cuda = torch.cuda.is_available() device = torch.device('cuda' if cuda else 'cpu') inputs = torch.rand(batch_size, sequence_length, dim).to(device) input_lengths = torch.IntTensor([12345, 12300, 12000]) model = nn.DataParallel(Conformer( num_classes=10, input_dim=dim, encoder_dim=512, num_encoder_layers=3, device=device, )).to(device) outputs = model.module.recognize(inputs, input_lengths) print(outputs) print(outputs.size()) print("PASS")
py
7dfa394f17199c118340de9b49e0cfd7b0696006
# Copyright 2015-2016 HyperBit developers from PyQt5.QtCore import QAbstractTableModel, QModelIndex, Qt, QSortFilterProxyModel, QVariant from PyQt5.QtGui import QBrush, QColor, QFont import binascii from datetime import datetime from hyperbit.gui import identicon from hyperbit import wallet import asyncio class ConnectionModel(QAbstractTableModel): def __init__(self, peers): super().__init__() self._peers = peers self._connections = [] # asyncio.get_event_loop().create_task(self._update()) @asyncio.coroutine def _update(self): while True: # self.beginRemoveRows(QModelIndex(), 0, len(self._connections)-1) # self.endRemoveRows() self.beginResetModel() self._connections.clear() for connection in self._peers._connections: self._connections.append(connection) self.endResetModel() print('now', self.rowCount()) yield from asyncio.sleep(1) def columnCount(self, QModelIndex_parent=None, *args, **kwargs): return 3 def rowCount(self, QModelIndex_parent=None, *args, **kwargs): return len(self._connections) def headerData(self, index, orientation, role=None): if role == Qt.DisplayRole: if orientation == Qt.Horizontal: return ['Address', 'Port', 'User Agent'][index] else: return None else: return None def data(self, index, role=None): if role == Qt.DisplayRole: connection = self._connections[index.row()] column = index.column() if column == 0: return connection.remote_host elif column == 1: return connection.remote_port elif column == 2: return connection.remote_user_agent else: return None class IdentityModel(QAbstractTableModel): def __init__(self, wal): super().__init__() self.wal = wal self.identities = [] for identity in wal.identities: self.identities.append(identity) wal.on_add_identity.append(self._on_add_identity) wal.on_remove_identity.append(self._on_remove_identity) def _on_add_identity(self, identity): self.beginInsertRows(QModelIndex(), len(self.identities), len(self.identities)) self.identities.append(identity) self.endInsertRows() def _on_remove_identity(self, identity): index = self.identities.index(identity) self.beginRemoveRows(QModelIndex(), index, index) del self.identities[index] self.endRemoveRows() def columnCount(self, QModelIndex_parent=None, *args, **kwargs): return 2 def rowCount(self, QModelIndex_parent=None, *args, **kwargs): return len(self.identities) def headerData(self, index, orientation, role=None): if role == Qt.DisplayRole: if orientation == Qt.Horizontal: return ['Name', 'Address'][index] else: return None else: return None def data(self, index, role=Qt.DisplayRole): if role == Qt.DisplayRole or role == Qt.EditRole: identity = self.identities[index.row()] column = index.column() if column == 0: return self.wal.names.get(identity.profile.address.ripe) elif column == 1: return identity.profile.address.to_str() elif role == Qt.DecorationRole: identity = self.identities[index.row()] column = index.column() if column == 0: return identicon.get(identity.profile.address.to_bytes()) else: return None elif role == Qt.ForegroundRole: identity = self.identities[index.row()] column = index.column() if identity.type == wallet.IdentityType.normal: return QBrush(Qt.black) elif identity.type == wallet.IdentityType.channel: return QBrush(Qt.darkRed) else: return None def flags(self, index): identity = self.identities[index.row()] column = index.column() if column == 0: if identity.type == wallet.IdentityType.normal: return Qt.ItemIsEnabled | Qt.ItemIsSelectable | Qt.ItemIsEditable elif identity.type == wallet.IdentityType.channel: return Qt.ItemIsEnabled | Qt.ItemIsSelectable elif column == 1: return Qt.ItemIsEnabled | Qt.ItemIsSelectable def setData(self, index, value, role=Qt.EditRole): if role == Qt.DisplayRole or role == Qt.EditRole: identity = self.identities[index.row()] column = index.column() if column == 0: if identity.type == wallet.IdentityType.normal: self.wal.names.set(identity.profile.address.ripe, value) return True elif identity.type == wallet.IdentityType.channel: return False elif column == 1: return False else: return False def get_identity(self, index): return self.identities[index.row()] def get_identity_by_row(self, row): return self.identities[row] class ObjectModel(QAbstractTableModel): def __init__(self, inv): super().__init__() self.inv = inv self.hashes = [] for hash in self.inv.get_hashes(): self.hashes.append(hash) inv.on_add_object.append(self._on_add_object) inv.on_remove_object.append(self._on_remove_object) def _on_add_object(self, object): self.beginInsertRows(QModelIndex(), len(self.hashes), len(self.hashes)) self.hashes.append(object.hash) self.endInsertRows() def _on_remove_object(self, object): index = self.hashes.index(object.hash) self.beginRemoveRows(QModelIndex(), index, index) del self.hashes[index] self.endRemoveRows() def columnCount(self, QModelIndex_parent=None, *args, **kwargs): return 5 def rowCount(self, QModelIndex_parent=None, *args, **kwargs): return len(self.hashes) def headerData(self, index, orientation, role=None): if role == Qt.DisplayRole: if orientation == Qt.Horizontal: return ['Hash', 'Brink', 'Expires', 'Type', 'Size'][index] else: return None else: return None def data(self, index, role=None): if role == Qt.DisplayRole: hash = self.hashes[index.row()] object = self.inv.get_object(hash) column = index.column() if column == 0: return binascii.hexlify(hash).decode() elif column == 1: # return binascii.hexlify(object.nonce.to_bytes(8, 'big')).decode() return datetime.utcfromtimestamp(max(object.brink, 0)).isoformat() elif column == 2: return datetime.utcfromtimestamp(object.expires).isoformat() elif column == 3: return '{}:{}'.format(object.type, object.version) elif column == 4: return len(object.payload) else: return None class ThreadModel(QAbstractTableModel): def __init__(self, list): super().__init__() self._list = list self.threads = [] for thread in list.threads: self.threads.append(thread) list.on_add_thread.append(self._on_add_thread) list.on_remove_thread.append(self._on_remove_thread) def _on_add_thread(self, thread): self.beginInsertRows(QModelIndex(), len(self.threads), len(self.threads)) self.threads.append(thread) self.endInsertRows() def _on_remove_thread(self, thread): index = self.threads.index(thread) self.beginRemoveRows(QModelIndex(), index, index) del self.threads[index] self.endRemoveRows() def columnCount(self, QModelIndex_parent=None, *args, **kwargs): return 1 def rowCount(self, QModelIndex_parent=None, *args, **kwargs): return len(self.threads) def headerData(self, index, orientation, role=None): if role == Qt.DisplayRole: if orientation == Qt.Horizontal: return ['Subject'][index] else: return None else: return None def data(self, index, role=None): if role == Qt.DisplayRole: thread = self.get_thread(index) column = index.column() if column == 0: return thread.subject elif role == Qt.DecorationRole: thread = self.get_thread(index) column = index.column() if column == 0: return identicon.get(thread.creator, 8) else: return None elif role == Qt.FontRole: font = QFont() thread = self.get_thread(index) if thread.unread > 0: font.setBold(True) return font else: return None def get_thread(self, index): return self.threads[index.row()] def get_thread_by_row(self, row): return self.threads[row]
py
7dfa396f0f9d7dbe05c84f51502a8054751b4093
# https://www.geeksforgeeks.org/python-program-to-check-if-given-string-is-pangram/ # Python program to check if given string is pangram # A pangram is a sentence containing every letter in the Enlish Alphabet import string def isPangram_Naive(str): print("isPangram_Naive() - start | 17:15 19F19") alphabet = "abcdefghijklmnopqrstuvwxyz" for char in alphabet: if char not in str.lower(): return False return True # Driver code string = 'The quick brown fox jumps over the lazy dog' if(isPangram_Naive(string) == True): print("Yes, it's pangram") else: print("No, it's not pangram")
py
7dfa3d85a7b04081e08272c50434317796666444
# # @lc app=leetcode.cn id=217 lang=python3 # # [217] 存在重复元素 # # https://leetcode-cn.com/problems/contains-duplicate/description/ # # algorithms # Easy (46.86%) # Total Accepted: 45K # Total Submissions: 95.6K # Testcase Example: '[1,2,3,1]' # # 给定一个整数数组,判断是否存在重复元素。 # # 如果任何值在数组中出现至少两次,函数返回 true。如果数组中每个元素都不相同,则返回 false。 # # 示例 1: # # 输入: [1,2,3,1] # 输出: true # # 示例 2: # # 输入: [1,2,3,4] # 输出: false # # 示例 3: # # 输入: [1,1,1,3,3,4,3,2,4,2] # 输出: true # # class Solution: def containsDuplicate(self, nums: List[int]) -> bool: return True if len(nums) > len(set(nums)) else False
py
7dfa3dc577aacbc5c738e29f9d2143abf7f40c30
import pickle import numpy as np from .band_interface import * from .s1_interface import BigEarthNet_S1_Patch from .s2_interface import BigEarthNet_S2_Patch # FUTURE: Write a base class that gives the # common skeleton to inherit from class BigEarthNet_S1_S2_Patch: def __init__( self, bandVH: np.ndarray, bandVV: np.ndarray, band01: np.ndarray, band02: np.ndarray, band03: np.ndarray, band04: np.ndarray, band05: np.ndarray, band06: np.ndarray, band07: np.ndarray, band08: np.ndarray, band8A: np.ndarray, band09: np.ndarray, band11: np.ndarray, band12: np.ndarray, **kwargs, ): self.s1_patch = BigEarthNet_S1_Patch(bandVH=bandVH, bandVV=bandVV) self.s2_patch = BigEarthNet_S2_Patch( band01=band01, band02=band02, band03=band03, band04=band04, band05=band05, band06=band06, band07=band07, band08=band08, band8A=band8A, band09=band09, band11=band11, band12=band12, ) self.bands = [*self.s1_patch.bands, *self.s2_patch.bands] # store extra kwargs for k, v in kwargs.items(): setattr(self, k, v) self.__stored_args__ = {**kwargs} @classmethod def short_init( cls, VH: np.ndarray, VV: np.ndarray, B01: np.ndarray, B02: np.ndarray, B03: np.ndarray, B04: np.ndarray, B05: np.ndarray, B06: np.ndarray, B07: np.ndarray, B08: np.ndarray, B8A: np.ndarray, B09: np.ndarray, B11: np.ndarray, B12: np.ndarray, **kwargs, ): """ Alternative `__init__` function. Only difference is the encoded names. """ return cls( bandVH=VH, bandVV=VV, band01=B01, band02=B02, band03=B03, band04=B04, band05=B05, band06=B06, band07=B07, band08=B08, band8A=B8A, band09=B09, band11=B11, band12=B12, **kwargs, ) def dump(self, file): return pickle.dump(self, file, protocol=4) def dumps(self): return pickle.dumps(self, protocol=4) @staticmethod def load(file) -> "BigEarthNet_S1_S2_Patch": return pickle.load(file) @staticmethod def loads(data) -> "BigEarthNet_S1_S2_Patch": return pickle.loads(data) def get_band_by_name(self, name: str) -> Band: band = None for b in self.bands: if b.name == name: band = b if band is None: raise KeyError(f"{name} is not known") return band def get_band_data_by_name(self, name: str) -> np.ndarray: band = self.get_band_by_name(name) return band.data def __repr__(self): r_str = f"{self.__class__.__name__} with:\n" r_str += "\n".join(f"\t{b}" for b in self.bands) if len(self.__stored_args__) != 0: r_str += "\nAnd the extra metadata:\n" for key, metadata in self.__stored_args__.items(): r_str += f"\t{key}: {metadata}\n" return r_str
py
7dfa3e464471f284d195befc0cc6abff227eb014
import torch.nn as nn import copy import torch.nn.functional as F import torch import numpy as np from PIL import Image import matplotlib.pyplot as plt import torchvision.transforms as transforms import torch.optim as optim #device = "cuda" device = "cpu" def img_loader(image_name, device, H=512, W=512): image = Image.open(image_name) loader = transforms.Compose([ transforms.Resize([H, W]), transforms.ToTensor(),]) image = loader(image).unsqueeze(0) return image.to(device, torch.float) unloader = transforms.ToPILImage() plt.ion() def imshow(tensor, title=None): image = tensor.cpu().clone() image = image.squeeze(0) image = unloader(image) if title is not None: plt.title(title) plt.imshow(image) plt.pause(1) class ContentLoss(nn.Module): def __init__(self, target): super(ContentLoss, self).__init__() self.target = target.detach() def forward(self, input): self.loss = F.mse_loss(input, self.target) return input def gram_matrix(input): a,b,c,d = input.size() features = input.view(a*b, c*d) G = torch.mm(features, features.t()) return G.div(a*b*c*d) class StyleLoss(nn.Module): def __init__(self, target_features): super(StyleLoss, self).__init__() self.target = gram_matrix(target_features).detach() def forward(self, input): G = gram_matrix(input) self.loss = F.mse_loss(G, self.target) return input class Normalization(nn.Module): def __init__(self, mean, std): super(Normalization, self).__init__() self.mean = torch.tensor(mean).view(-1,1,1) self.std = torch.tensor(std).view(-1,1,1) def forward(self, img): return (img - self.mean) / self.std content_layers_default = ['conv_4'] style_layers_default = ['conv_1', 'conv_2', 'conv_3', 'conv_4', 'conv_5'] def get_style_model_and_losses(cnn, normalization_mean, normalization_std, style_img, content_img, content_layers=content_layers_default, style_layers=style_layers_default): cnn = copy.deepcopy(cnn) normalization = Normalization(normalization_mean, normalization_std).to(device) content_losses = [] style_losses = [] model = nn.Sequential(normalization) i = 0 for layer in cnn.children(): if isinstance(layer, nn.Conv2d): i += 1 name = f"conv_{i}" elif isinstance(layer, nn.ReLU): name = f"relu_{i}" layer = nn.ReLU(inplace=False) elif isinstance(layer, nn.MaxPool2d): name = 'pool_{}'.format(i) elif isinstance(layer, nn.BatchNorm2d): name = 'bn_{}'.format(i) else: raise RuntimeError('Unrecognized layer: {}'.format(layer.__class__.__name__)) model.add_module(name, layer) if name in content_layers: target = model(content_img).detach() content_loss = ContentLoss(target) model.add_module("content_loss_{}".format(i), content_loss) content_losses.append(content_loss) if name in style_layers: target_feature = model(style_img).detach() style_loss = StyleLoss(target_feature) model.add_module("style_loss_{}".format(i), style_loss) style_losses.append(style_loss) for i in range(len(model) - 1, -1, -1): if isinstance(model[i], ContentLoss) or isinstance(model[i], StyleLoss): break model = model[:(i + 1)] return model, style_losses, content_losses def get_input_optimizer(input_img): optimizer = optim.LBFGS([input_img.requires_grad_()]) return optimizer
py
7dfa3f3f9989762b559c2d942f5d9182be95e2f2
from scipy.linalg import hadamard import torch import numpy as np if __name__ == "__main__": num_class = 80 d_vals = [16, 32, 64] for d in d_vals: ha_d = hadamard(d) ha_2d = np.concatenate((ha_d, -ha_d),0) if num_class <= d: hash_targets = torch.from_numpy(ha_d[0:num_class]).float() print('hash centers shape: {}'.format(hash_targets.shape)) elif num_class > d: hash_targets = torch.from_numpy(ha_2d[0:num_class]).float() print('hash centers shape: {}'.format(hash_targets.shape)) file_name = str(d) + '_revised_coco_' + str(num_class) + '_class.pkl' file_dir = '../hash_centers/' + file_name f = open(file_dir, "wb") torch.save(hash_targets, f)
py
7dfa3f58f4295380674d74c5506f86978bc1d45b
import random import string from django.db import models from .utils import code_generator, create_shortcode # Create your models here. class YektanetURL(models.Model): url = models.CharField(max_length = 220,) shortcode = models.CharField(max_length = 15, unique = True, blank = True) timestamp = models.DateTimeField(auto_now_add = True) update = models.DateTimeField(auto_now = True) update = models.DateTimeField(auto_now_add = False, auto_now = False) def save(self, *args, **kwargs): if self.shortcode is None or self.shortcode =='': self.shortcode = create_shortcode(self) super(YektanetURL, self).save(*args, **kwargs) def __str__(self): return str(self.url) def __unicode__(self): return str(self.url)
py
7dfa3fc91071c018ca4739ca9b923d07d7f48c96
""" This file contains all the HTTP routes for basic pages (usually HTML) """ import os from flask import Blueprint, Response, request, render_template, send_from_directory from lxml import etree from lxml.builder import ElementMaker from _ldapi.ldapi import LDAPI, LdapiParameterError from controller import routes_functions pages = Blueprint('controller', __name__) @pages.route('/favicon.ico') def favicon(): favicon_path = os.path.join( os.path.dirname( os.path.dirname( os.path.abspath(__file__) ) ), 'static', 'img' ) return send_from_directory(favicon_path, 'favicon.ico', mimetype='image/vnd.microsoft.icon') @pages.route('/') def index(): """ A basic landing page for this web service :return: HTTP Response (HTML page only) """ views_mimetypes = { 'default': 'landingpage', 'alternates': ['text/html'], 'landingpage': ['text/html'], 'getcapabilities': ['text/xml'] } try: view, mimetype = LDAPI.get_valid_view_and_mimetype( request.args.get('_view'), request.args.get('_format'), views_mimetypes ) except LdapiParameterError as e: return routes_functions.client_error_Response(e) # select controller and mimetype if view != 'getcapabilities': if mimetype == 'text/html': return render_template( 'page_index.html', ) else: return Response( 'This controller of the API\'s root only has an HTML representation', status=400, mimetype='text/plain') elif view == 'getcapabilities': # move GetCapabilities response formulation to a Renderer class # only a single mimetype for this controller em = ElementMaker( namespace="http://fake.com/_ldapi", nsmap={ '_ldapi': "http://fake.com/_ldapi" } ) onl = ElementMaker( namespace="http://fake.com/_ldapi", nsmap={ 'xlink': "http://www.w3.org/1999/xlink", } ) doc = em.LDAPI_Capabilities( em.Service( em.Name('Linked Data API'), em.Title('Geoscience Australia\'s Physical Samples'), em.KeywordList( em.Keyword('model'), em.Keyword('IGSN'), em.Keyword('Linked Data'), em.Keyword('XML'), em.Keyword('RDF'), ), # TODO: parameterised namespaces not working yet onl.OnlineResource(type="simple", href="http://pid.geoscience.gov.au/survey/ga/"), em.ContactInformation( em.ContactPersonPrimary( em.contactPerson('Nicholas Car'), em.ContactOrganization('Geoscience Australia') ), em.ContactAddress( em.AddressType('Postal'), em.Address('GPO Box 378'), em.City('Canberra'), em.StateOrProvince('ACT'), em.PostCode('2601'), em.Country('Australia'), em.ContactVoiceTelephone('+61 2 6249 9111'), em.ContactFacsimileTelephone(), em.ContactElectronicMailAddress('[email protected]') ) ), em.Fees('none'), em.AccessConstraints( '(c) Commonwealth of Australia (Geoscience Australia) 2016. This product is released under the ' + 'Creative Commons Attribution 4.0 International Licence. ' + 'http://creativecommons.org/licenses/by/4.0/legalcode' ) ), em.Capability( em.Request( em.GetCapabilities( em.Format('text/xml'), em.DCPType( em.HTTP( em.Get( onl.OnlineResource( type="simple", href="http://pid.geoscience.gov.au/survey/ga/" + "?_view=getcapabilities&_format=text/xml" ), ) ) ) ), em.Sample( em.Format('text/html'), em.Format('text/turtle'), em.Format('application/rdf+xml'), em.Format('application/rdf+json'), em.DCPType( em.HTTP( em.Get( onl.OnlineResource( type="simple", href="http://pid.geoscience.gov.au/survey/ga/{SURVEY_ID}" ), ) ) ) ), em.SampleRegister( em.Format('text/html'), em.Format('text/turtle'), em.Format('application/rdf+xml'), em.Format('application/rdf+json'), em.DCPType( em.HTTP( em.Get( onl.OnlineResource( type="simple", href="http://pid.geoscience.gov.au/survey/ga/" ), ) ) ) ) ) ) ) xml = etree.tostring(doc, pretty_print=True, xml_declaration=True, encoding='UTF-8') return Response(xml, status=200, mimetype='text/xml') @pages.route('/page/about') def about(): return render_template('page_about.html')
py
7dfa41da1c50564d999fd3f49d726744b5b74305
import unittest import pymysql from bs4 import BeautifulSoup import requests class UnitTestsDataMiningInpiForOnePatent(unittest.TestCase): def test_mining_title_from_one_patent(self): print("test_mining_title_from_one_patent") url_for_one_patent = 'https://bases-brevets.inpi.fr/fr/document/FR3100422.html' headers = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103' } # Request the content of a page from the url html = requests.get(url_for_one_patent, headers=headers) # Parse the content of html_doc soup = BeautifulSoup(html.text, 'html.parser') if soup.find("h1", {"class": "notice-title"}) is not None: print("Title : " + soup.find("h1", {"class": "notice-title"}).text.lower()) def test_mining_description_from_one_patent(self): print("test_mining_description_from_one_patent") url_for_one_patent = 'https://bases-brevets.inpi.fr/fr/document/FR3100422.html' headers = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103' } # Request the content of a page from the url html = requests.get(url_for_one_patent, headers=headers) # Parse the content of html_doc soup = BeautifulSoup(html.text, 'html.parser') if soup.find("div", {"class": "notice-text"}) is not None: description = soup\ .find("div", {"class": "notice-text"})\ .text\ .lower()\ .replace('\t', ' ')\ .replace('\n', ' ')\ .replace(' ', ' ')\ .replace('\r', ' ') print("Description : " + description) class UnitTestsDataMiningInpiFreeEnergyDevices(unittest.TestCase): def test_fr_patent(self): print('test_fr_patent') keywords = [ "perpétuel", "autogénérateur", "sans limite", "indéfiniment", "générateur d'énergie", "générateur électrique", "auto-générateur", "excès d'énergie" ] for c1 in range(0, 3999999): title = "" description = "" patent_number = "FR" + str(c1) url_patent = "https://bases-brevets.inpi.fr/fr/document/" + patent_number + ".html" headers = { 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103' } # Request the content of a page from the url html = requests.get(url_patent, headers=headers) # Parse the content of html_doc soup = BeautifulSoup(html.text, 'html.parser') # title if soup.find("h1", {"class": "notice-title"}) is not None: title += soup\ .find("h1", {"class": "notice-title"})\ .text\ .lower()\ .replace('\t', ' ')\ .replace('\n', ' ')\ .replace(' ', ' ')\ .replace('\r', ' ') # description if soup.find("div", {"class": "notice-text"}) is not None: description += soup \ .find("div", {"class": "notice-text"}) \ .text \ .lower() \ .replace('\t', ' ') \ .replace('\n', ' ') \ .replace(' ', ' ') \ .replace('\r', ' ') for keyword in keywords: if keyword in title or keyword in description: x = { 'title': title, 'patent_number': patent_number, 'url_patent': url_patent } try: # Connect to the database connection = pymysql.connect( host='localhost', port=3306, user='', password='', db='patents', charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor ) with connection.cursor() as cursor: try: sql = "INSERT INTO `free_energy_inventions` (" \ "`title`, " \ "`patent_number`, " \ "`url_patent`) VALUE (%s, %s, %s)" cursor.execute(sql, ( x.get('title'), x.get('patent_number'), x.get('url_patent') )) connection.commit() print('Patent ' + x.get('patent_number') + ' : ok') connection.close() except Exception as e: print("The record already exists (patent " + x.get('patent_number') + ") : " + str(e)) connection.close() except Exception as e: print("Problem connection MySQL : " + str(e)) break else: print('no keyword "' + keyword + '" in patent ' + patent_number) else: print("patent " + patent_number + " : no information") if __name__ == '__main__': unittest.main()
py
7dfa428368eab11ec5969b53c38752bd7e6e09fa
#!/usr/bin/env python """ pgcleanup.py - A script for cleaning up datasets in Galaxy efficiently, by bypassing the Galaxy model and operating directly on the database. PostgreSQL 9.1 or greater is required. """ import datetime import inspect import logging import os import shutil import sys from ConfigParser import ConfigParser from optparse import OptionParser galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) sys.path.insert(0, os.path.join(galaxy_root, 'lib')) import psycopg2 from sqlalchemy.engine.url import make_url import galaxy.config from galaxy.exceptions import ObjectNotFound from galaxy.objectstore import build_object_store_from_config from galaxy.util.bunch import Bunch log = logging.getLogger() class MetadataFile(Bunch): pass class Dataset(Bunch): pass class Cleanup(object): def __init__(self): self.options = None self.args = None self.config = None self.conn = None self.action_names = [] self.logs = {} self.disk_accounting_user_ids = [] self.object_store = None self.__cache_action_names() self.__parse_args() self.__setup_logging() self.__load_config() self.__connect_db() self.__load_object_store() def __cache_action_names(self): for name, value in inspect.getmembers(self): if not name.startswith('_') and inspect.ismethod(value): self.action_names.append(name) def __parse_args(self): default_config = os.path.abspath(os.path.join(galaxy_root, 'config', 'galaxy.ini')) parser = OptionParser() parser.add_option('-c', '--config', dest='config', help='Path to Galaxy config file (config/galaxy.ini)', default=default_config) parser.add_option('-d', '--debug', action='store_true', dest='debug', help='Enable debug logging', default=False) parser.add_option('--dry-run', action='store_true', dest='dry_run', help="Dry run (rollback all transactions)", default=False) parser.add_option('--force-retry', action='store_true', dest='force_retry', help="Retry file removals (on applicable actions)", default=False) parser.add_option('-o', '--older-than', type='int', dest='days', help='Only perform action(s) on objects that have not been updated since the specified number of days', default=14) parser.add_option('-U', '--no-update-time', action='store_false', dest='update_time', help="Don't set update_time on updated objects", default=True) parser.add_option('-s', '--sequence', dest='sequence', help='Comma-separated sequence of actions, chosen from: %s' % self.action_names, default='') parser.add_option('-w', '--work-mem', dest='work_mem', help='Set PostgreSQL work_mem for this connection', default=None) ( self.options, self.args ) = parser.parse_args() self.options.sequence = [ x.strip() for x in self.options.sequence.split(',') ] if self.options.sequence == ['']: print "Error: At least one action must be specified in the action sequence\n" parser.print_help() sys.exit(0) def __setup_logging(self): format = "%(funcName)s %(levelname)s %(asctime)s %(message)s" if self.options.debug: logging.basicConfig(level=logging.DEBUG, format=format) else: logging.basicConfig(level=logging.INFO, format=format) def __load_config(self): log.info('Reading config from %s' % self.options.config) config_parser = ConfigParser(dict(here=os.getcwd(), database_connection='sqlite:///database/universe.sqlite?isolation_level=IMMEDIATE')) config_parser.read(self.options.config) config_dict = {} for key, value in config_parser.items('app:main'): config_dict[key] = value config_dict['root_dir'] = galaxy_root self.config = galaxy.config.Configuration(**config_dict) def __connect_db(self): url = make_url(self.config.database_connection) log.info('Connecting to database with URL: %s' % url) args = url.translate_connect_args( username='user' ) args.update(url.query) assert url.get_dialect().name == 'postgresql', 'This script can only be used with PostgreSQL.' self.conn = psycopg2.connect(**args) def __load_object_store(self): self.object_store = build_object_store_from_config(self.config) def _open_logfile(self): action_name = inspect.stack()[1][3] logname = os.path.join(galaxy_root, 'scripts', 'cleanup_datasets', action_name + '.log') if self.options.dry_run: log.debug('--dry-run specified, logging changes to stdout instead of log file: %s' % logname) self.logs[action_name] = sys.stdout else: log.debug('Opening log file: %s' % logname) self.logs[action_name] = open(logname, 'a') message = '==== Log opened: %s ' % datetime.datetime.now().isoformat() self.logs[action_name].write(message.ljust(72, '=')) self.logs[action_name].write('\n') def _log(self, message, action_name=None): if action_name is None: action_name = inspect.stack()[1][3] if not message.endswith('\n'): message += '\n' self.logs[action_name].write(message) def _close_logfile(self): action_name = inspect.stack()[1][3] message = '==== Log closed: %s ' % datetime.datetime.now().isoformat() self.logs[action_name].write(message.ljust(72, '=')) self.logs[action_name].write('\n') if self.options.dry_run: log.debug('--dry-run specified, changes were logged to stdout insted of log file') else: log.debug('Closing log file: %s' % self.logs[action_name].name) self.logs[action_name].close() del self.logs[action_name] def _run(self): ok = True for name in self.options.sequence: if name not in self.action_names: log.error('Unknown action in sequence: %s' % name) ok = False if not ok: log.critical('Exiting due to previous error(s)') sys.exit(1) for name in self.options.sequence: log.info('Calling %s' % name) self.__getattribute__(name)() log.info('Finished %s' % name) def _create_event(self, message=None): """ Create a new event in the cleanup_event table. """ if message is None: message = inspect.stack()[1][3] sql = """ INSERT INTO cleanup_event (create_time, message) VALUES (NOW(), %s) RETURNING id; """ log.debug("SQL is: %s" % sql % ("'" + message + "'")) args = (message,) cur = self.conn.cursor() if self.options.dry_run: sql = "SELECT MAX(id) FROM cleanup_event;" cur.execute(sql) max_id = cur.fetchone()[0] if max_id is None: # there has to be at least one event in the table, if there are none just create a fake one. sql = "INSERT INTO cleanup_event (create_time, message) VALUES (NOW(), 'dry_run_event') RETURNING id;" cur.execute(sql) max_id = cur.fetchone()[0] self.conn.commit() log.info("An event must exist for the subsequent query to succeed, so a dummy event has been created") else: log.info("Not executing event creation (increments sequence even when rolling back), using an old event ID (%i) for dry run" % max_id) return max_id log.info("Executing SQL") cur.execute(sql, args) log.info('Database status: %s' % cur.statusmessage) return cur.fetchone()[0] def _update(self, sql, args): if args is not None: log.debug('SQL is: %s' % sql % args) else: log.debug('SQL is: %s' % sql) cur = self.conn.cursor() if self.options.work_mem is not None: log.info('Setting work_mem to %s' % self.options.work_mem) cur.execute('SET work_mem TO %s', (self.options.work_mem,)) log.info('Executing SQL') cur.execute(sql, args) log.info('Database status: %s' % cur.statusmessage) return cur def _flush(self): if self.options.dry_run: self.conn.rollback() log.info("--dry-run specified, all changes rolled back") else: self.conn.commit() log.info("All changes committed") def _remove_metadata_file(self, id, object_store_id, action_name): metadata_file = MetadataFile(id=id, object_store_id=object_store_id) try: filename = self.object_store.get_filename(metadata_file, extra_dir='_metadata_files', extra_dir_at_root=True, alt_name="metadata_%d.dat" % id) self._log('Removing from disk: %s' % filename, action_name) except (ObjectNotFound, AttributeError), e: log.error('Unable to get MetadataFile %s filename: %s' % (id, e)) return if not self.options.dry_run: try: os.unlink(filename) except Exception, e: self._log('Removal of %s failed with error: %s' % (filename, e), action_name) def _update_user_disk_usage(self): """ Any operation that purges a HistoryDatasetAssociation may require updating a user's disk usage. Rather than attempt to resolve dataset copies at purge-time, simply maintain a list of users that have had HDAs purged, and update their usages once all updates are complete. This could probably be done more efficiently. """ log.info('Recalculating disk usage for users whose HistoryDatasetAssociations were purged') for user_id in self.disk_accounting_user_ids: # TODO: h.purged = false should be unnecessary once all hdas in purged histories are purged. sql = """ UPDATE galaxy_user SET disk_usage = (SELECT COALESCE(SUM(total_size), 0) FROM ( SELECT d.total_size FROM history_dataset_association hda JOIN history h ON h.id = hda.history_id JOIN dataset d ON hda.dataset_id = d.id WHERE h.user_id = %s AND h.purged = false AND hda.purged = false AND d.purged = false AND d.id NOT IN (SELECT dataset_id FROM library_dataset_dataset_association) GROUP BY d.id) sizes) WHERE id = %s RETURNING disk_usage; """ args = (user_id, user_id) cur = self._update(sql, args) self._flush() for tup in cur: # disk_usage might be None (e.g. user has purged all data) log.debug('Updated disk usage for user id %i to %s bytes' % (user_id, tup[0])) def _shutdown(self): self.object_store.shutdown() self.conn.close() for handle in self.logs.values(): message = '==== Log closed at shutdown: %s ' % datetime.datetime.now().isoformat() handle.write(message.ljust(72, '=')) handle.write('\n') handle.close() def update_hda_purged_flag(self): """ The old cleanup script does not mark HistoryDatasetAssociations as purged when deleted Histories are purged. This method can be used to rectify that situation. """ log.info('Marking purged all HistoryDatasetAssociations associated with purged Datasets') event_id = self._create_event() # update_time is intentionally left unmodified. sql = """ WITH purged_hda_ids AS ( UPDATE history_dataset_association SET purged = true FROM dataset WHERE history_dataset_association.dataset_id = dataset.id AND dataset.purged AND NOT history_dataset_association.purged RETURNING history_dataset_association.id), hda_events AS (INSERT INTO cleanup_event_hda_association (create_time, cleanup_event_id, hda_id) SELECT NOW(), %s, id FROM purged_hda_ids) SELECT id FROM purged_hda_ids ORDER BY id; """ args = (event_id,) cur = self._update(sql, args) self._flush() self._open_logfile() for tup in cur: self._log('Marked HistoryDatasetAssociation purged: %s' % tup[0]) self._close_logfile() def delete_userless_histories(self): """ Mark deleted all "anonymous" Histories (not owned by a registered user) that are older than the specified number of days. """ log.info('Marking deleted all userless Histories older than %i days' % self.options.days) event_id = self._create_event() sql = """ WITH deleted_history_ids AS ( UPDATE history SET deleted = true%s WHERE user_id is null AND NOT deleted AND update_time < (NOW() - interval '%s days') RETURNING id), history_events AS (INSERT INTO cleanup_event_history_association (create_time, cleanup_event_id, history_id) SELECT NOW(), %s, id FROM deleted_history_ids) SELECT id FROM deleted_history_ids ORDER BY id; """ update_time_sql = '' if self.options.update_time: update_time_sql = """, update_time = NOW()""" sql = sql % (update_time_sql, '%s', '%s') args = (self.options.days, event_id) cur = self._update(sql, args) self._flush() self._open_logfile() for tup in cur: self._log('Marked userless History deleted: %s' % tup[0]) self._close_logfile() def purge_deleted_hdas(self): """ Mark purged all HistoryDatasetAssociations currently marked deleted that are older than the specified number of days. Mark deleted all MetadataFiles whose hda_id is purged in this step. Mark deleted all ImplicitlyConvertedDatasetAssociations whose hda_parent_id is purged in this step. Mark purged all HistoryDatasetAssociations for which an ImplicitlyConvertedDatasetAssociation with matching hda_id is deleted in this step. """ log.info('Marking purged all deleted HistoryDatasetAssociations older than %i days' % self.options.days) event_id = self._create_event() sql = """ WITH purged_hda_ids AS ( UPDATE history_dataset_association SET purged = true%s WHERE deleted%s AND update_time < (NOW() - interval '%s days') RETURNING id, history_id), deleted_metadata_file_ids AS ( UPDATE metadata_file SET deleted = true%s FROM purged_hda_ids WHERE purged_hda_ids.id = metadata_file.hda_id RETURNING metadata_file.hda_id AS hda_id, metadata_file.id AS id, metadata_file.object_store_id AS object_store_id), deleted_icda_ids AS ( UPDATE implicitly_converted_dataset_association SET deleted = true%s FROM purged_hda_ids WHERE purged_hda_ids.id = implicitly_converted_dataset_association.hda_parent_id RETURNING implicitly_converted_dataset_association.hda_id AS hda_id, implicitly_converted_dataset_association.hda_parent_id AS hda_parent_id, implicitly_converted_dataset_association.id AS id), deleted_icda_purged_child_hda_ids AS ( UPDATE history_dataset_association SET purged = true%s FROM deleted_icda_ids WHERE deleted_icda_ids.hda_id = history_dataset_association.id), hda_events AS (INSERT INTO cleanup_event_hda_association (create_time, cleanup_event_id, hda_id) SELECT NOW(), %s, id FROM purged_hda_ids), metadata_file_events AS (INSERT INTO cleanup_event_metadata_file_association (create_time, cleanup_event_id, metadata_file_id) SELECT NOW(), %s, id FROM deleted_metadata_file_ids), icda_events AS (INSERT INTO cleanup_event_icda_association (create_time, cleanup_event_id, icda_id) SELECT NOW(), %s, id FROM deleted_icda_ids), icda_hda_events AS (INSERT INTO cleanup_event_hda_association (create_time, cleanup_event_id, hda_id) SELECT NOW(), %s, hda_id FROM deleted_icda_ids) SELECT purged_hda_ids.id, history.user_id, deleted_metadata_file_ids.id, deleted_metadata_file_ids.object_store_id, deleted_icda_ids.id, deleted_icda_ids.hda_id FROM purged_hda_ids LEFT OUTER JOIN deleted_metadata_file_ids ON deleted_metadata_file_ids.hda_id = purged_hda_ids.id LEFT OUTER JOIN deleted_icda_ids ON deleted_icda_ids.hda_parent_id = purged_hda_ids.id LEFT OUTER JOIN history ON purged_hda_ids.history_id = history.id; """ force_retry_sql = """ AND NOT purged""" update_time_sql = "" if self.options.force_retry: force_retry_sql = "" else: # only update time if not doing force retry (otherwise a lot of things would have their update times reset that were actually purged a long time ago) if self.options.update_time: update_time_sql = """, update_time = NOW()""" sql = sql % (update_time_sql, force_retry_sql, '%s', update_time_sql, update_time_sql, update_time_sql, '%s', '%s', '%s', '%s') args = (self.options.days, event_id, event_id, event_id, event_id) cur = self._update(sql, args) self._flush() self._open_logfile() for tup in cur: self._log('Marked HistoryDatasetAssociations purged: %s' % tup[0]) if tup[1] is not None and tup[1] not in self.disk_accounting_user_ids: self.disk_accounting_user_ids.append(int(tup[1])) if tup[2] is not None: self._log('Purge of HDA %s caused deletion of MetadataFile: %s in Object Store: %s' % (tup[0], tup[2], tup[3])) self._remove_metadata_file(tup[2], tup[3], inspect.stack()[0][3]) if tup[4] is not None: self._log('Purge of HDA %s caused deletion of ImplicitlyConvertedDatasetAssociation: %s and converted HistoryDatasetAssociation: %s' % (tup[0], tup[4], tup[5])) self._close_logfile() def purge_deleted_histories(self): """ Mark purged all Histories marked deleted that are older than the specified number of days. Mark purged all HistoryDatasetAssociations in Histories marked purged in this step (if not already purged). """ log.info('Marking purged all deleted histories that are older than the specified number of days.') event_id = self._create_event() sql = """ WITH purged_history_ids AS ( UPDATE history SET purged = true%s WHERE deleted%s AND update_time < (NOW() - interval '%s days') RETURNING id, user_id), purged_hda_ids AS ( UPDATE history_dataset_association SET purged = true%s FROM purged_history_ids WHERE purged_history_ids.id = history_dataset_association.history_id AND NOT history_dataset_association.purged RETURNING history_dataset_association.history_id AS history_id, history_dataset_association.id AS id), deleted_metadata_file_ids AS ( UPDATE metadata_file SET deleted = true%s FROM purged_hda_ids WHERE purged_hda_ids.id = metadata_file.hda_id RETURNING metadata_file.hda_id AS hda_id, metadata_file.id AS id, metadata_file.object_store_id AS object_store_id), deleted_icda_ids AS ( UPDATE implicitly_converted_dataset_association SET deleted = true%s FROM purged_hda_ids WHERE purged_hda_ids.id = implicitly_converted_dataset_association.hda_parent_id RETURNING implicitly_converted_dataset_association.hda_id AS hda_id, implicitly_converted_dataset_association.hda_parent_id AS hda_parent_id, implicitly_converted_dataset_association.id AS id), deleted_icda_purged_child_hda_ids AS ( UPDATE history_dataset_association SET purged = true%s FROM deleted_icda_ids WHERE deleted_icda_ids.hda_id = history_dataset_association.id), history_events AS (INSERT INTO cleanup_event_history_association (create_time, cleanup_event_id, history_id) SELECT NOW(), %s, id FROM purged_history_ids), hda_events AS (INSERT INTO cleanup_event_hda_association (create_time, cleanup_event_id, hda_id) SELECT NOW(), %s, id FROM purged_hda_ids), metadata_file_events AS (INSERT INTO cleanup_event_metadata_file_association (create_time, cleanup_event_id, metadata_file_id) SELECT NOW(), %s, id FROM deleted_metadata_file_ids), icda_events AS (INSERT INTO cleanup_event_icda_association (create_time, cleanup_event_id, icda_id) SELECT NOW(), %s, id FROM deleted_icda_ids), icda_hda_events AS (INSERT INTO cleanup_event_hda_association (create_time, cleanup_event_id, hda_id) SELECT NOW(), %s, hda_id FROM deleted_icda_ids) SELECT purged_history_ids.id, purged_history_ids.user_id, purged_hda_ids.id, deleted_metadata_file_ids.id, deleted_metadata_file_ids.object_store_id, deleted_icda_ids.id, deleted_icda_ids.hda_id FROM purged_history_ids LEFT OUTER JOIN purged_hda_ids ON purged_history_ids.id = purged_hda_ids.history_id LEFT OUTER JOIN deleted_metadata_file_ids ON deleted_metadata_file_ids.hda_id = purged_hda_ids.id LEFT OUTER JOIN deleted_icda_ids ON deleted_icda_ids.hda_parent_id = purged_hda_ids.id; """ force_retry_sql = """ AND NOT purged""" update_time_sql = "" if self.options.force_retry: force_retry_sql = "" else: if self.options.update_time: update_time_sql += """, update_time = NOW()""" sql = sql % (update_time_sql, force_retry_sql, '%s', update_time_sql, update_time_sql, update_time_sql, update_time_sql, '%s', '%s', '%s', '%s', '%s') args = (self.options.days, event_id, event_id, event_id, event_id, event_id) cur = self._update(sql, args) self._flush() self._open_logfile() for tup in cur: self._log('Marked History purged: %s' % tup[0]) if tup[1] is not None and tup[1] not in self.disk_accounting_user_ids: self.disk_accounting_user_ids.append(int(tup[1])) if tup[2] is not None: self._log('Purge of History %s caused deletion of HistoryDatasetAssociation: %s' % (tup[0], tup[2])) if tup[3] is not None: self._log('Purge of HDA %s caused deletion of MetadataFile: %s in Object Store: %s' % (tup[1], tup[3], tup[4])) self._remove_metadata_file(tup[3], tup[4], inspect.stack()[0][3]) if tup[5] is not None: self._log('Purge of HDA %s caused deletion of ImplicitlyConvertedDatasetAssociation: %s and converted HistoryDatasetAssociation: %s' % (tup[1], tup[5], tup[6])) self._close_logfile() def delete_exported_histories(self): """ Mark deleted all Datasets that are derivative of JobExportHistoryArchives that are older than the specified number of days. """ log.info('Marking deleted all Datasets that are derivative of JobExportHistoryArchives that are older than the specified number of days.') event_id = self._create_event() sql = """ WITH deleted_dataset_ids AS ( UPDATE dataset SET deleted = true%s FROM job_export_history_archive WHERE job_export_history_archive.dataset_id = dataset.id AND NOT deleted AND dataset.update_time <= (NOW() - interval '%s days') RETURNING dataset.id), dataset_events AS (INSERT INTO cleanup_event_dataset_association (create_time, cleanup_event_id, dataset_id) SELECT NOW(), %s, id FROM deleted_dataset_ids) SELECT id FROM deleted_dataset_ids ORDER BY id; """ update_time_sql = "" if self.options.update_time: update_time_sql += """, update_time = NOW()""" sql = sql % (update_time_sql, '%s', '%s') args = (self.options.days, event_id) cur = self._update(sql, args) self._flush() self._open_logfile() for tup in cur: self._log('Marked Dataset deleted: %s' % tup[0]) self._close_logfile() def delete_datasets(self): """ Mark deleted all Datasets whose associations are all marked as deleted (LDDA) or purged (HDA) that are older than the specified number of days. """ log.info('Marking deleted all Datasets whose associations are all marked as deleted/purged that are older than the specified number of days.') event_id = self._create_event() sql = """ WITH deleted_dataset_ids AS ( UPDATE dataset SET deleted = true%s WHERE NOT deleted AND NOT EXISTS (SELECT true FROM library_dataset_dataset_association WHERE (NOT deleted OR update_time >= (NOW() - interval '%s days')) AND dataset.id = dataset_id) AND NOT EXISTS (SELECT true FROM history_dataset_association WHERE (NOT purged OR update_time >= (NOW() - interval '%s days')) AND dataset.id = dataset_id) RETURNING id), dataset_events AS (INSERT INTO cleanup_event_dataset_association (create_time, cleanup_event_id, dataset_id) SELECT NOW(), %s, id FROM deleted_dataset_ids) SELECT id FROM deleted_dataset_ids ORDER BY id; """ update_time_sql = "" if self.options.update_time: update_time_sql += """, update_time = NOW()""" sql = sql % (update_time_sql, '%s', '%s', '%s') args = (self.options.days, self.options.days, event_id) cur = self._update(sql, args) self._flush() self._open_logfile() for tup in cur: self._log('Marked Dataset deleted: %s' % tup[0]) self._close_logfile() def purge_datasets(self): """ Mark purged all Datasets marked deleted that are older than the specified number of days. """ log.info('Marking purged all Datasets marked deleted that are older than the specified number of days.') event_id = self._create_event() sql = """ WITH purged_dataset_ids AS ( UPDATE dataset SET purged = true%s WHERE deleted%s AND update_time < (NOW() - interval '%s days') RETURNING id, object_store_id), dataset_events AS (INSERT INTO cleanup_event_dataset_association (create_time, cleanup_event_id, dataset_id) SELECT NOW(), %s, id FROM purged_dataset_ids) SELECT id, object_store_id FROM purged_dataset_ids ORDER BY id; """ force_retry_sql = """ AND NOT purged""" update_time_sql = "" if self.options.force_retry: force_retry_sql = "" else: if self.options.update_time: update_time_sql = """, update_time = NOW()""" sql = sql % (update_time_sql, force_retry_sql, '%s', '%s') args = (self.options.days, event_id) cur = self._update(sql, args) self._flush() self._open_logfile() for tup in cur: self._log('Marked Dataset purged: %s in Object Store: %s' % (tup[0], tup[1])) # always try to remove the "object store path" - if it's at an external_filename, that file will be untouched anyway (which is what we want) dataset = Dataset(id=tup[0], object_store_id=tup[1]) try: filename = self.object_store.get_filename(dataset) except (ObjectNotFound, AttributeError), e: log.error('Unable to get Dataset %s filename: %s' % (tup[0], e)) continue try: extra_files_dir = self.object_store.get_filename(dataset, dir_only=True, extra_dir="dataset_%d_files" % tup[0]) except (ObjectNotFound, AttributeError): extra_files_dir = None # don't check for existence of the dataset, it should exist self._log('Removing from disk: %s' % filename) if not self.options.dry_run: try: os.unlink(filename) except Exception, e: self._log('Removal of %s failed with error: %s' % (filename, e)) # extra_files_dir is optional so it's checked first if extra_files_dir is not None and os.path.exists(extra_files_dir): self._log('Removing from disk: %s' % extra_files_dir) if not self.options.dry_run: try: shutil.rmtree(extra_files_dir) except Exception, e: self._log('Removal of %s failed with error: %s' % (extra_files_dir, e)) self._close_logfile() if __name__ == '__main__': cleanup = Cleanup() try: cleanup._run() if cleanup.disk_accounting_user_ids: cleanup._update_user_disk_usage() except: log.exception('Caught exception in run sequence:') cleanup._shutdown()
py
7dfa436fa534df6d11fdc7295ef9e62e9675df39
""" ========================================================================= Compute source space connectivity and visualize it using a circular graph ========================================================================= This example computes the all-to-all connectivity between 68 regions in source space based on dSPM inverse solutions and a FreeSurfer cortical parcellation. The connectivity is visualized using a circular graph which is ordered based on the locations of the regions in the axial plane. """ # Authors: Martin Luessi <[email protected]> # Alexandre Gramfort <[email protected]> # Nicolas P. Rougier (graph code borrowed from his matplotlib gallery) # # License: BSD (3-clause) import numpy as np import matplotlib.pyplot as plt import mne from mne.datasets import sample from mne.minimum_norm import apply_inverse_epochs, read_inverse_operator from mne_connectivity import spectral_connectivity from mne_connectivity.viz import circular_layout, plot_connectivity_circle print(__doc__) ############################################################################### # Load our data # ------------- # # First we'll load the data we'll use in connectivity estimation. We'll use # the sample MEG data provided with MNE. data_path = sample.data_path() subjects_dir = data_path + '/subjects' fname_inv = data_path + '/MEG/sample/sample_audvis-meg-oct-6-meg-inv.fif' fname_raw = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif' fname_event = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw-eve.fif' # Load data inverse_operator = read_inverse_operator(fname_inv) raw = mne.io.read_raw_fif(fname_raw) events = mne.read_events(fname_event) # Add a bad channel raw.info['bads'] += ['MEG 2443'] # Pick MEG channels picks = mne.pick_types(raw.info, meg=True, eeg=False, stim=False, eog=True, exclude='bads') # Define epochs for left-auditory condition event_id, tmin, tmax = 1, -0.2, 0.5 epochs = mne.Epochs(raw, events, event_id, tmin, tmax, picks=picks, baseline=(None, 0), reject=dict(mag=4e-12, grad=4000e-13, eog=150e-6)) ############################################################################### # Compute inverse solutions and their connectivity # ------------------------------------------------ # # Next, we need to compute the inverse solution for this data. This will return # the sources / source activity that we'll use in computing connectivity. We'll # compute the connectivity in the alpha band of these sources. We can specify # particular frequencies to include in the connectivity with the ``fmin`` and # ``fmax`` flags. Notice from the status messages how mne-python: # # 1. reads an epoch from the raw file # 2. applies SSP and baseline correction # 3. computes the inverse to obtain a source estimate # 4. averages the source estimate to obtain a time series for each label # 5. includes the label time series in the connectivity computation # 6. moves to the next epoch. # # This behaviour is because we are using generators. Since we only need to # operate on the data one epoch at a time, using a generator allows us to # compute connectivity in a computationally efficient manner where the amount # of memory (RAM) needed is independent from the number of epochs. # Compute inverse solution and for each epoch. By using "return_generator=True" # stcs will be a generator object instead of a list. snr = 1.0 # use lower SNR for single epochs lambda2 = 1.0 / snr ** 2 method = "dSPM" # use dSPM method (could also be MNE or sLORETA) stcs = apply_inverse_epochs(epochs, inverse_operator, lambda2, method, pick_ori="normal", return_generator=True) # Get labels for FreeSurfer 'aparc' cortical parcellation with 34 labels/hemi labels = mne.read_labels_from_annot('sample', parc='aparc', subjects_dir=subjects_dir) label_colors = [label.color for label in labels] # Average the source estimates within each label using sign-flips to reduce # signal cancellations, also here we return a generator src = inverse_operator['src'] label_ts = mne.extract_label_time_course( stcs, labels, src, mode='mean_flip', return_generator=True) fmin = 8. fmax = 13. sfreq = raw.info['sfreq'] # the sampling frequency con_methods = ['pli', 'wpli2_debiased', 'ciplv'] con = spectral_connectivity( label_ts, method=con_methods, mode='multitaper', sfreq=sfreq, fmin=fmin, fmax=fmax, faverage=True, mt_adaptive=True, n_jobs=1) # con is a 3D array, get the connectivity for the first (and only) freq. band # for each method con_res = dict() for method, c in zip(con_methods, con): con_res[method] = c.get_data(output='dense')[:, :, 0] ############################################################################### # Make a connectivity plot # ------------------------ # # Now, we visualize this connectivity using a circular graph layout. # First, we reorder the labels based on their location in the left hemi label_names = [label.name for label in labels] lh_labels = [name for name in label_names if name.endswith('lh')] # Get the y-location of the label label_ypos = list() for name in lh_labels: idx = label_names.index(name) ypos = np.mean(labels[idx].pos[:, 1]) label_ypos.append(ypos) # Reorder the labels based on their location lh_labels = [label for (yp, label) in sorted(zip(label_ypos, lh_labels))] # For the right hemi rh_labels = [label[:-2] + 'rh' for label in lh_labels] # Save the plot order and create a circular layout node_order = list() node_order.extend(lh_labels[::-1]) # reverse the order node_order.extend(rh_labels) node_angles = circular_layout(label_names, node_order, start_pos=90, group_boundaries=[0, len(label_names) / 2]) # Plot the graph using node colors from the FreeSurfer parcellation. We only # show the 300 strongest connections. plot_connectivity_circle(con_res['pli'], label_names, n_lines=300, node_angles=node_angles, node_colors=label_colors, title='All-to-All Connectivity left-Auditory ' 'Condition (PLI)') ############################################################################### # Make two connectivity plots in the same figure # ---------------------------------------------- # # We can also assign these connectivity plots to axes in a figure. Below we'll # show the connectivity plot using two different connectivity methods. fig = plt.figure(num=None, figsize=(8, 4), facecolor='black') no_names = [''] * len(label_names) for ii, method in enumerate(con_methods): plot_connectivity_circle(con_res[method], no_names, n_lines=300, node_angles=node_angles, node_colors=label_colors, title=method, padding=0, fontsize_colorbar=6, fig=fig, subplot=(1, 3, ii + 1)) plt.show() ############################################################################### # Save the figure (optional) # -------------------------- # # By default matplotlib does not save using the facecolor, even though this was # set when the figure was generated. If not set via savefig, the labels, title, # and legend will be cut off from the output png file. # fname_fig = data_path + '/MEG/sample/plot_inverse_connect.png' # fig.savefig(fname_fig, facecolor='black')
py
7dfa43ec3261649170cb615b906ef5e82bbfef4c
# -*- encoding: utf-8 -*- import numpy as np def get_seq_graph(edge): dy, dx = np.array([-1,0,1,1,1,0,-1,-1]), np.array([-1,-1,-1,0,1,1,1,0]) def get_neighbors(node): Y, X = node[0]+dy, node[1]+dx neighbors = edge[Y, X] Y, X = Y[neighbors], X[neighbors] return zip(Y,X) graph = {} Y, X = edge.nonzero() for node in zip(Y,X): graph[node] = get_neighbors(node) seq = [] first_el = (Y[0], X[0]) seq.append(first_el) ext_el = first_el act_el = graph[ext_el][0] while (first_el != ext_el) or (len(seq)==1): ind_el = np.where(np.array(graph[(ext_el)])!=act_el) ind_el_uq = np.unique(ind_el[0]) if len(ind_el_uq)==1: ind_el = ind_el_uq[0] else: acum_dist = [] for ind in ind_el_uq: dist_ = (graph[(ext_el)][ind][0]-ext_el[0])**2+(graph[(ext_el)][ind][1]-ext_el[1])**2 acum_dist.append(dist_) min_dist = acum_dist.index(min(acum_dist)) ind_el = ind_el_uq[min_dist] act_el = ext_el ext_el = graph[(act_el)][ind_el] seq.append(ext_el) lst1, lst2 = zip(*seq) return (np.array(lst1), np.array(lst2))
py
7dfa45801b292d2558c90cb9c63b909a3d62ba73
""" The :mod:`sklearn.ensemble` module includes ensemble-based methods for classification, regression and anomaly detection. """ # from ._base import BaseEnsemble from ._forest import RandomForestClassifier from ._forest import RandomForestRegressor # from ._forest import RandomTreesEmbedding # from ._forest import ExtraTreesClassifier # from ._forest import ExtraTreesRegressor # from ._bagging import BaggingClassifier # from ._bagging import BaggingRegressor # from ._iforest import IsolationForest # from ._weight_boosting import AdaBoostClassifier # from ._weight_boosting import AdaBoostRegressor # from ._gb import GradientBoostingClassifier # from ._gb import GradientBoostingRegressor # from ._voting import VotingClassifier # from ._voting import VotingRegressor # from ._stacking import StackingClassifier # from ._stacking import StackingRegressor # from ._hist_gradient_boosting.gradient_boosting import ( # HistGradientBoostingRegressor, HistGradientBoostingClassifier # ) __all__ = [ # "BaseEnsemble", "RandomForestClassifier", "RandomForestRegressor", # "RandomTreesEmbedding", "ExtraTreesClassifier", # "ExtraTreesRegressor", "BaggingClassifier", # "BaggingRegressor", "IsolationForest", "GradientBoostingClassifier", # "GradientBoostingRegressor", "AdaBoostClassifier", # "AdaBoostRegressor", "VotingClassifier", "VotingRegressor", # "StackingClassifier", "StackingRegressor", # 'HistGradientBoostingClassifier', 'HistGradientBoostingRegressor', ]
py
7dfa458738310315ca68af970a80b6e25f0cab30
# -*- coding: utf-8 -*- """ Testing of Steps() reimplementation using scipy. Created on Fri May 22 22:06:49 2020 @author: Leonard Doyle """ import numpy as _np from scipy.optimize import least_squares #TODO hide from public from scipy.sparse import coo_matrix from LightPipes.field import Field from LightPipes import tictoc def _StepsScipy(z, nstep, refr, Fin): """Right now this is just a test and collection of code from https://scipy-cookbook.readthedocs.io/items/discrete_bvp.html which is not functional for Lightpipes! Also, its really really slow, so possibly not useful at all. """ """ Fout = Steps(z, nstep, refr, Fin) :ref:`Propagates the field a distance, nstep x z, in nstep steps in a medium with a complex refractive index stored in the square array refr. <Steps>` Args:: z: propagation distance per step nstep: number of steps refr: refractive index (N x N array of complex numbers) as n=n_r+j kappa Fin: input field Returns:: Fout: ouput field (N x N square array of complex numbers). Example: :ref:`Propagation through a lens like medium <lenslikemedium>` """ if Fin._curvature != 0.0: raise ValueError('Cannot operate on spherical coords.' + 'Use Convert() first') Fout = Field.shallowcopy(Fin) N = Fout.N lam = Fout.lam size = Fout.siz Pi = _np.pi k0 = 2.*Pi/lam dz = z dx = size/(N-1.) #dx dy = dx AA= -10./dz/nstep #/* total absorption */ band_pow=2. #/* profile of the absorption border, 2=quadratic*/ x = _np.arange(N) xx,yy = _np.meshgrid(x,x) # c_absorb_x[mask] = 1j* (AA*K)*_np.power(iii/i_left, band_pow) n_c = _np.asarray(refr).astype(complex, copy=True) n_avg = _np.mean(refr) #real and im separately, obviously, avg over X and Y k_avg = k0 * n_avg # n_c += 1j* _np.power(xx/(N/20), 8) # n_c += 1j* _np.power((N-xx)/(N/20), 8) # n_c += 1j* _np.power(yy/(N/20), 8) # n_c += 1j* _np.power((N-yy)/(N/20), 8) A = n_c**2 A -= n_avg**2 #n^2-n_avg^2, not (n-n_avg)^2 ! A *= k0**2 a = 1/dx**2 b = 1/dy**2 # b = a #force square grid for now, makes functions a little easier to write V0 = Fin.field def fun(V): #given Vij, calculate Vij out, to find stationary solution #just use global params as long as possible, even though ugly assert V.size == N*N*2 #N^2 as (real,im) floats V = V.view(complex) #treat 2 consecutive floats each as (real, im) V = V.reshape((N, N)) Vpad = _np.zeros((N+2,N+2),dtype=complex) #pad to have NxN output, # implicit data allocation is also good as it avoids # headache about accidentally changing the input data reference Vpad[1:-1,1:-1] = V V = Vpad vij = V[1:-1,1:-1] #makes it the original V again vij1 = V[2:,1:-1] #V[j+1,i] vij_1 = V[:-2,1:-1] #V[j-1,i] vi1j = V[1:-1,2:] #V[j,i+1] vi_1j = V[1:-1,:-2] #V[j,i-1] vv = a*vi1j + a*vi_1j + b*vij1 + b*vij_1 vv += (-2*a-2*b+(2j*k_avg/dz)+A)*vij vv -= 2j*k_avg/dz*V0 ret = vv.ravel().view(float) assert ret.size == N*N*2 return ret #initial guess is old field v0 = Fin.field.ravel().view(float) #treat real and im as 2 entries to array v0 = v0.copy() # v0[:] = 0.0 res_1 = least_squares(fun, v0, verbose=1) field = res_1.x.view(complex) field = field.reshape((N,N)) Fout.field = field # * _np.exp(1j*k_avg*dz) return Fout, res_1 def _StepsScipyJac(z, nstep, refr, Fin): """Right now this is just a test and collection of code from https://scipy-cookbook.readthedocs.io/items/discrete_bvp.html which is not functional for Lightpipes! Also, its really really slow, so possibly not useful at all. """ """ Fout = Steps(z, nstep, refr, Fin) :ref:`Propagates the field a distance, nstep x z, in nstep steps in a medium with a complex refractive index stored in the square array refr. <Steps>` Args:: z: propagation distance per step nstep: number of steps refr: refractive index (N x N array of complex numbers) as n=n_r+j kappa Fin: input field Returns:: Fout: ouput field (N x N square array of complex numbers). Example: :ref:`Propagation through a lens like medium <lenslikemedium>` """ if Fin._curvature != 0.0: raise ValueError('Cannot operate on spherical coords.' + 'Use Convert() first') Fout = Field.shallowcopy(Fin) N = Fout.N lam = Fout.lam size = Fout.siz Pi = _np.pi k0 = 2.*Pi/lam dz = z dx = size/(N-1.) #dx dy = dx c = 1 n_c = _np.asarray(refr).astype(complex, copy=True) n_avg = _np.mean(refr) #real and im separately, obviously, avg over X and Y k_avg = k0 * n_avg # n_c += 1j* _np.power(xx/(N/20), 8) # n_c += 1j* _np.power((N-xx)/(N/20), 8) # n_c += 1j* _np.power(yy/(N/20), 8) # n_c += 1j* _np.power((N-yy)/(N/20), 8) A = n_c**2 A -= n_avg**2 #n^2-n_avg^2, not (n-n_avg)^2 ! A *= k0**2 a = 1/dx**2 b = 1/dy**2 b = a #force square grid for now, makes functions a little easier to write V0 = Fin.field def f(v, ): ret = 1/a*(2j*k_avg/dz+A)*v-2j*k_avg/(a*dz)*V0 return ret def f_prime(v): ret = 1/a*(2j*k_avg/dz+A) return ret def fun(V, n, f, f_prime, **kwargs): assert V.size == N*N*2 #N^2 as (real,im) floats V = V.view(complex) #treat 2 consecutive floats each as (real, im) V = V.reshape((N, N)) Vpad = _np.zeros((N+2,N+2),dtype=complex) #pad to have NxN output, # implicit data allocation is also good as it avoids # headache about accidentally changing the input data reference Vpad[1:-1,1:-1] = V V = Vpad vij = V[1:-1,1:-1] #makes it the original V again vij1 = V[2:,1:-1] #V[j+1,i] vij_1 = V[:-2,1:-1] #V[j-1,i] vi1j = V[1:-1,2:] #V[j,i+1] vi_1j = V[1:-1,:-2] #V[j,i-1] vv = vi1j + vi_1j + vij1 + vij_1 vv -= 4*vij vv += f(V) ret = vv.ravel().view(float) # v = _np.zeros((n + 2, n + 2)) # u = u.reshape((n, n)) # v[1:-1, 1:-1] = u # y = v[:-2, 1:-1] + v[2:, 1:-1] + v[1:-1, :-2] + v[1:-1, 2:] - 4 * u + c * f(u) return ret def compute_jac_indices(n): i = _np.arange(n) jj, ii = _np.meshgrid(i, i) ii = ii.ravel() jj = jj.ravel() ij = _np.arange(n**2) jac_rows = [ij] #diagonal, i.e. self contrib jac_cols = [ij] mask = ii > 0 ij_mask = ij[mask] jac_rows.append(ij_mask) #rows go along j jac_cols.append(ij_mask - n) mask = ii < n - 1 ij_mask = ij[mask] jac_rows.append(ij_mask) jac_cols.append(ij_mask + n) mask = jj > 0 ij_mask = ij[mask] jac_rows.append(ij_mask) jac_cols.append(ij_mask - 1) mask = jj < n - 1 ij_mask = ij[mask] jac_rows.append(ij_mask) jac_cols.append(ij_mask + 1) return _np.hstack(jac_rows), _np.hstack(jac_cols) jac_rows, jac_cols = compute_jac_indices(N) u0 = _np.ones(N**2) * 0.5 # u0 = Fin.field.ravel() #initial guess is old field def jac(u, n, f, f_prime, jac_rows=None, jac_cols=None): jac_values = _np.ones_like(jac_cols, dtype=float) jac_values[:n**2] = -4 + f_prime(u) return coo_matrix((jac_values, (jac_rows, jac_cols)), shape=(n**2, n**2)) res_1 = least_squares(fun, u0.real, jac=jac, gtol=1e-3, args=(N, f, f_prime), kwargs={'jac_rows': jac_rows, 'jac_cols': jac_cols}, verbose=0) # print(res_1) Fout = res_1.x.reshape((N, N)) return Fout
py
7dfa4598fc19b284572c3552eb2e3c27516e8bb6
# -*- coding: utf-8 -*- """ Created on Tue Jun 6 13:59:52 2017 @author: rdk10 """ import os import tkinter as tk from tkinter.filedialog import askopenfilename import sitchensis.ImportFunctions as impF #Not functional yet import sitchensis.TreeCalcs as tc import sitchensis.vPythonFunctions as pf import sitchensis.ErrorScan as es import vpython as vp from pandas.plotting import scatter_matrix import matplotlib.pyplot as plt ################################### #### USER INPUTS ############## ################################### cwd = os.getcwd() root = tk.Tk() fullFileName = askopenfilename(initialdir=cwd, title="select a tree file to error check", filetypes=[("Excel", "*.xlsx")]) #Ask user to pick files root.withdraw() workingDir = os.path.dirname(fullFileName) #path to file fileName = fullFileName.rsplit('/')[-1] #Excludes path to file treeName = fileName.rsplit('.')[0] #For input file (excludes '.xlsx') #Output options suppressScatter = False intFiles = False #Do you want to output intermediate calculation files?? runErrorScan = True initErCheck = True ################################### #### Create output directory ###### ################################### if not os.path.exists(workingDir + '/StichensisOutputs'): os.makedirs(workingDir + '/StichensisOutputs') outPath = workingDir + '/StichensisOutputs' ################################# ######## Import data ########### ################################# treeData, custRefs, mapType = impF.importExcelTree(fullFileName) ########################################################################################## ############ Run Preliminary Error Scan ################################################# ########################################################################################## #if runErrorScan ==True: treeData, noteColChanges = es.screenData(treeData, mapType, custRefs, outPath, treeName) #This scheck for basic naming errors and renames note columns so they will work in the script, the columns are reverted to old names later. ############################################################################# ############ Run tree calculations ######################################### ############################################################################# treeData = tc.calculateTree(treeData, custRefs, mapType, treeName, outDir=outPath, intermediateFiles=intFiles) ############################################################## ############ Outlier errorscan ############################## ############################################################## if suppressScatter == False: color_wheel = {1: "#00ff00", 2: "#000000"} if mapType == 'segment map' or mapType == 'full map': colors = treeData['segments']['% dead'].map(lambda x: color_wheel.get(1) if x < 89 else color_wheel.get(2)) if len(treeData['segments']) > 1: scatter_matrix(treeData['segments'][['base z', 'base radius', 'top z', 'top radius']], figsize=(10,10), color=colors, alpha=0.5, diagonal='kde') plt.suptitle('segments\nblack is > 89% dead') plt.show() else: print('There is only one segment so no scatter matrix for segments was produced') colors = treeData['branches']['% dead'].map(lambda x: color_wheel.get(1) if x < 89 else color_wheel.get(2)) if treeData['branches']['base z'].dtype == 'O': #if it is formatted as a string treeData['branches']['base z'] = treeData['branches']['base z'].astype(dtype = float) scatter_matrix(treeData['branches'][['base z', 'base radius', 'hd', 'slope']], figsize=(10,10), color=colors, alpha=0.5, diagonal='kde') plt.suptitle('branches\nblack is > 89% dead') plt.show() ######################################################## ########## Save data ############################## ######################################################### treeData, noteColChanges = impF.renameNotesCol(treeData, treeName, newname=noteColChanges['oldNoteName']) #segs.name = segs.name.apply(repr) #branches.origin = branches.origin.apply(repr) #branches.to_csv("brFromNode.csv") #rename the notes columns back to their old name using the impF.excelExport(treeData, outPath, treeName) ############################################################################# ############ Run Plotting Routine ########################################### ############################################################################# scene = vp.canvas(title='Tree: {0}'.format(treeName), width=800, height=800, center=vp.vec(0,0,50), background=vp.color.white, fov = 0.01, range = 60, forward = vp.vec(-1,0,0), up = vp.vec(0,0,1)) scene.select() vp.distant_light(direction = vp.vec(1,1,0.5), color = vp.color.white) vp.distant_light(direction = vp.vec(-1,-1,0.5), color = vp.color.white) running = True #This allows widgets to dynamically update display (see bottom of code) cent = 40 #Set the default camera center shift = 0 #for moving around image speed = 0 #Set the default rotation speed for the tree mapChoice = 'full map' #Define what the widgets will do def vertSlide(c): #This controls where the camera points global cent cent = c.value def setSpeed(s): #This controls the rotation speen of the tree global speed speed = s.value def treeDisplay(m): #This controls what parts of the tree are displayed global trunk, segments, branches, mapChoice, radBut, labelButton #clear labels if they are shown and set variable "labsChecked" to reset at end if radBut.checked == True: radBut.checked = False labelButton(radBut) labsChecked = True else: labsChecked = False if m.selected == 'trunk map': trunk.visible = True segments.visible = False for branch in branches: branch.visible = False elif m.selected == 'segment map': trunk.visible = True segments.visible = True for branch in branches: branch.visible = False elif m.selected == 'full map': trunk.visible = True #if there are segments plot them otherwise skip segments.visible = True for branch in branches: branch.visible = True #reset mapChoice, selects item in list and passes correct lebels to section below mapChoice = m.selected #reset labels if they were on previously if labsChecked == True: radBut.checked = True labelButton(radBut) def labelButton(r): #This controls whether or not to display labels global trunkLabs, segLabs,brLabs, mapChoice if r.checked == True: if mapChoice == 'trunk map': for label in trunkLabs: label.visible = True for label in segLabs: label.visible = False for label in brLabs: label.visible = False elif mapChoice == 'segment map': for label in trunkLabs: label.visible = False for label in segLabs: label.visible = True for label in brLabs: label.visible = False elif mapChoice == 'full map': for label in trunkLabs: label.visible = False for label in segLabs: label.visible = False for label in brLabs: label.visible = True #I need conditions in here for trees without segments or without branches elif r.checked == False: for label in trunkLabs: label.visible = False for label in segLabs: label.visible = False for label in brLabs: label.visible = False #Setup widgets (Horizontal slider, menu, and radio button). Different widgets are bound to functions in vPythonFunctions.py scene.caption = "\nVary the rotation speed:\n" hsl = vp.slider(pos = scene.caption_anchor, min = 0, max = 500, value = 0.001, length = 800, bind=setSpeed, right=15) scene.append_to_caption('\nSelect the tree map to display\n') scene.append_to_caption(' ') #There needs to be a condition here to eliminate options if a tree has no segments or no branches if mapType == "trunk map": mapChoices = vp.menu(choices=['trunk map'], selected = 'trunk map',index = 0, bind=treeDisplay ) elif mapType == "trunk and branch map": mapChoices = vp.menu(choices=['trunk map', 'full map'], selected = 'full map',index = 1, bind=treeDisplay ) elif mapType == "trunk and segment map": mapChoices = vp.menu(choices=['trunk map', 'segment map'], selected = 'segment map',index = 1, bind=treeDisplay ) elif mapType == "full map": mapChoices = vp.menu(choices=['trunk map', 'segment map', 'full map'], selected = 'full map', index = 2, bind=treeDisplay ) scene.append_to_caption(' ') radBut = vp.radio(bind=labelButton, text='display labels') # text to right of button scene.append_to_caption(' Scroll to zoom, shift + left click to pan!\n') ###Maybe make a button that moves tree back to zero rotation.#### colors = {'trunk':vp.color.black,'segments':vp.color.red,'branches':vp.color.green, 'dead':vp.color.gray(0.2)} #mapType = 'full map' #This is where we decide what to plot: I could add in an option here to not make visible those portions that are not initiall selected. trnk, trunkLabs = pf.plotFrusta(treeData, 'trunk', colors) #trunkSpheres,, trunkLabs trunk = vp.compound(trnk, texture = vp.textures.wood_old, visible = True) if mapType == 'segment map' or mapType == 'full map': sgmnts, segLabs = pf.plotFrusta(treeData, 'segments', colors) #segSpheres, segments = vp.compound(sgmnts, visible = True) #Take a look at the branches code below, I may have to do that for trees with more than 250 segments. if mapType == 'trunk and branch map' or mapType == 'full map': brnchs, brLabs = pf.plotFrusta(treeData, 'branches', colors) # brSpheres, mid = round(len(brnchs)/2) end = len(brnchs) br1 = vp.compound(brnchs[0:mid], visible = True) #I split up branches into two objects instead of one so they don't exceed the display limits of webGl. This require loops in the rotation and display sections of the code for branches to alter each object in the list. br2 = vp.compound(brnchs[mid:end], visible = True) branches = [br1,br2] #branches = vp.compound(brnchs, visible = True) #Draw axes pf.axes((-5,-5,0)) #This allows dynamic updating based on widgets while True: vp.rate(100) if running: trunk.rotate(angle=speed*1e-4, axis=vp.vec(0,0,1), origin=vp.vector(0,0,0)) for tr in trunkLabs: tr.rotate(angle=speed*1e-4, axis=vp.vec(0,0,1), origin=vp.vector(0,0,0)) if mapType == 'segment map' or mapType == 'full map': segments.rotate(angle=speed*1e-4, axis=vp.vec(0,0,1), origin=vp.vector(0,0,0)) for seg in segLabs: seg.rotate(angle=speed*1e-4, axis=vp.vec(0,0,1), origin=vp.vector(0,0,0)) if mapType == 'trunk and branch map' or mapType == 'full map': for branch in branches: branch.rotate(angle=speed*1e-4, axis=vp.vec(0,0,1), origin=vp.vector(0,0,0)) for br in brLabs: br.rotate(angle=speed*1e-4, axis=vp.vec(0,0,1), origin=vp.vector(0,0,0))
py
7dfa45b656e60f1fd42810d6569a0060dac99e3e
"""Create and maintain info about a given activity track (corresponding to one GPX file).""" # Copyright 2016-2019 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. import datetime import gpxpy as mod_gpxpy import json import os import s2sphere as s2 from .exceptions import TrackLoadError from .utils import parse_datetime_to_local import polyline from collections import namedtuple start_point = namedtuple("start_point", "lat lon") run_map = namedtuple("polyline", "summary_polyline") class Track: def __init__(self): self.file_names = [] self.polylines = [] self.polyline_str = "" self.start_time = None self.end_time = None self.start_time_local = None self.end_time_local = None self.length = 0 self.special = False self.average_heartrate = None self.moving_dict = {} self.run_id = 0 self.start_latlng = [] def load_gpx(self, file_name): try: self.file_names = [os.path.basename(file_name)] # Handle empty gpx files # (for example, treadmill runs pulled via garmin-connect-export) if os.path.getsize(file_name) == 0: raise TrackLoadError("Empty GPX file") with open(file_name, "r") as file: self._load_gpx_data(mod_gpxpy.parse(file)) except: print( f"Something went wrong when loading GPX. for file {self.file_names[0]}" ) pass def load_from_db(self, activate): # use strava as file name self.file_names = [str(activate.run_id)] start_time = datetime.datetime.strptime( activate.start_date_local, "%Y-%m-%d %H:%M:%S" ) self.start_time_local = start_time self.end_time = start_time + activate.elapsed_time self.length = float(activate.distance) summary_polyline = activate.summary_polyline polyline_data = polyline.decode(summary_polyline) if summary_polyline else [] self.polylines = [[s2.LatLng.from_degrees(p[0], p[1]) for p in polyline_data]] def bbox(self): """Compute the smallest rectangle that contains the entire track (border box).""" bbox = s2.LatLngRect() for line in self.polylines: for latlng in line: bbox = bbox.union(s2.LatLngRect.from_point(latlng.normalized())) return bbox def _load_gpx_data(self, gpx): self.start_time, self.end_time = gpx.get_time_bounds() # use timestamp as id self.run_id = int(datetime.datetime.timestamp(self.start_time) * 1000) self.start_time_local, self.end_time_local = parse_datetime_to_local( self.start_time, self.end_time, gpx ) if self.start_time is None: raise TrackLoadError("Track has no start time.") if self.end_time is None: raise TrackLoadError("Track has no end time.") self.length = gpx.length_2d() if self.length == 0: raise TrackLoadError("Track is empty.") gpx.simplify() polyline_container = [] heart_rate_list = [] for t in gpx.tracks: for s in t.segments: try: heart_rate_list.extend( [ int(p.extensions[0].getchildren()[0].text) for p in s.points if p.extensions ] ) except: pass line = [ s2.LatLng.from_degrees(p.latitude, p.longitude) for p in s.points ] self.polylines.append(line) polyline_container.extend([[p.latitude, p.longitude] for p in s.points]) self.polyline_container = polyline_container # get start point try: self.start_latlng = start_point(*polyline_container[0]) except: pass self.polyline_str = polyline.encode(polyline_container) self.average_heartrate = ( sum(heart_rate_list) / len(heart_rate_list) if heart_rate_list else None ) self.moving_dict = self._get_moving_data(gpx) def append(self, other): """Append other track to self.""" self.end_time = other.end_time self.length += other.length self.moving_dict["distance"] += other.moving_dict["distance"] self.moving_dict["moving_time"] += other.moving_dict["moving_time"] self.moving_dict["elapsed_time"] += other.moving_dict["elapsed_time"] self.polyline_container.extend(other.polyline_container) self.polyline_str = polyline.encode(self.polyline_container) self.moving_dict["average_speed"] = ( self.moving_dict["distance"] / self.moving_dict["moving_time"].total_seconds() ) self.file_names.extend(other.file_names) self.special = self.special or other.special def load_cache(self, cache_file_name): try: with open(cache_file_name) as data_file: data = json.load(data_file) self.start_time = datetime.datetime.strptime( data["start"], "%Y-%m-%d %H:%M:%S" ) self.end_time = datetime.datetime.strptime( data["end"], "%Y-%m-%d %H:%M:%S" ) self.start_time_local = datetime.datetime.strptime( data["start_local"], "%Y-%m-%d %H:%M:%S" ) self.end_time_local = datetime.datetime.strptime( data["end_local"], "%Y-%m-%d %H:%M:%S" ) self.length = float(data["length"]) self.polylines = [] for data_line in data["segments"]: self.polylines.append( [ s2.LatLng.from_degrees(float(d["lat"]), float(d["lng"])) for d in data_line ] ) except Exception as e: raise TrackLoadError("Failed to load track data from cache.") from e def store_cache(self, cache_file_name): """Cache the current track""" dir_name = os.path.dirname(cache_file_name) if not os.path.isdir(dir_name): os.makedirs(dir_name) with open(cache_file_name, "w") as json_file: lines_data = [] for line in self.polylines: lines_data.append( [ {"lat": latlng.lat().degrees, "lng": latlng.lng().degrees} for latlng in line ] ) json.dump( { "start": self.start_time.strftime("%Y-%m-%d %H:%M:%S"), "end": self.end_time.strftime("%Y-%m-%d %H:%M:%S"), "start_local": self.start_time_local.strftime("%Y-%m-%d %H:%M:%S"), "end_local": self.end_time_local.strftime("%Y-%m-%d %H:%M:%S"), "length": self.length, "segments": lines_data, }, json_file, ) @staticmethod def _get_moving_data(gpx): moving_data = gpx.get_moving_data() return { "distance": moving_data.moving_distance, "moving_time": datetime.timedelta(seconds=moving_data.moving_time), "elapsed_time": datetime.timedelta( seconds=(moving_data.moving_time + moving_data.stopped_time) ), "average_speed": moving_data.moving_distance / moving_data.moving_time, } def to_namedtuple(self): d = { "id": self.run_id, "name": "run from gpx", # maybe change later "type": "Run", # Run for now only support run for now maybe change later "start_date": self.start_time.strftime("%Y-%m-%d %H:%M:%S"), "end": self.end_time.strftime("%Y-%m-%d %H:%M:%S"), "start_date_local": self.start_time_local.strftime("%Y-%m-%d %H:%M:%S"), "end_local": self.end_time_local.strftime("%Y-%m-%d %H:%M:%S"), "length": self.length, "average_heartrate": int(self.average_heartrate) if self.average_heartrate else None, "map": run_map(self.polyline_str), "start_latlng": self.start_latlng, } d.update(self.moving_dict) # return a nametuple that can use . to get attr return namedtuple("x", d.keys())(*d.values())
py
7dfa45e88196bc82ee58c3e368bec8ea28cb55df
# Generated by Django 3.1.1 on 2020-11-21 19:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('messenger', '0001_initial'), ] operations = [ migrations.AddField( model_name='account', name='selected_chat', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='messenger.chat'), ), migrations.AlterField( model_name='message', name='image', field=models.ImageField(blank=True, upload_to='images'), ), migrations.AlterField( model_name='message', name='text', field=models.TextField(blank=True, max_length=500), ), ]
py
7dfa4622e790b9b298a5f763a8b4ebe55e271ccf
def extract1HP(item): """ # 1HP """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or 'preview' in item['title'].lower(): return None if 'Route to almightyness from 1HP' in item['title'] and (chp or vol): return buildReleaseMessageWithType(item, 'HP1 kara Hajimeru Isekai Musou', vol, chp, frag=frag, postfix=postfix) return False
py
7dfa4658ba8a88d4173081051c04efbcb75837b0
# routes.py import json from flask import render_template, url_for, flash, redirect from iso_app import app from iso_app.utils.iso import ISO from iso_app.utils import db_parser @app.route("/") @app.route("/home", methods=['GET']) def home(): return render_template("map.html") @app.route("/get", methods=['GET']) def get(): data = {'DK': 'id', 'desc': 'test'} response = app.response_class( response=json.dumps(data), status=200, mimetype='application/json' ) return response @app.route("/about") def about(): spam = ['spam', 'ham', 'burger', 'cheese', 'bacon'] return render_template("about.html", ing=spam) @app.route('/source/<value>', methods=['GET']) def get_source(value): # return "Hello {}!".format(name) print(value) data = db_parser.get_all(int(value)) response = app.response_class( response=json.dumps(data), status=200, mimetype='application/json' ) return response
py
7dfa46a500be459f04116654bd7b6e7e1f10c4f0
from office365.runtime.client_object import ClientObject from office365.runtime.paths.resource_path import ResourcePath class SiteCollectionManagementService(ClientObject): def __init__(self, context): fqn = "Microsoft.Online.SharePoint.TenantAdministration.SiteCollectionManagementService" super(SiteCollectionManagementService, self).__init__(context, ResourcePath(fqn))
py
7dfa47302d795a7bbbb359f0c9682386998f70cf
# -- encoding: UTF-8 -- import logging import os import click from wurstc.conf import Config from wurstc.context import find_project_config class CliConfig(object): def __init__(self, debug=False, yes=False): self.debug = debug self.yes = yes @click.group() @click.option('--project', envvar='WURST_PROJECT', default=None) @click.option('--debug/--no-debug', default=False, envvar='WURST_DEBUG') @click.option('--yes/--no-yes', '-y', default=False) @click.pass_context def cli(ctx, project, debug, yes): if debug: logging.basicConfig(level=logging.DEBUG) if project: project = Config(project) else: project = find_project_config(os.getcwd()) ctx.meta["wurst.project"] = project ctx.meta["wurst.cli"] = CliConfig(debug=debug, yes=yes)
py
7dfa47d2afdd21994ab7f107d842e16a39790f20
import pygame pygame.init() screen = pygame.display.set_mode((400, 300)) done = False is_blue = True x = 30 y = 30 velocity = 1 xyLimit = 21 clock = pygame.time.Clock() while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: done = True if event.type == pygame.KEYDOWN and event.key == pygame.K_SPACE: is_blue = not is_blue pressed = pygame.key.get_pressed() ##작은 칸을 넘어가야함. 50 < x < 66 if pressed[pygame.K_UP] and 0 < x and 0 < y < 21: y -= velocity elif pressed[pygame.K_UP] and 50 < x < 66: y -= velocity elif pressed[pygame.K_UP] and y > xyLimit: # 21좌표보다 아래 있을때 y -= velocity if 50 < x < 66 : if pressed[pygame.K_UP]: y -= 0 elif x == 21 or y == 21: x = 350 y = 250 if pressed[pygame.K_DOWN] and y < 300 - 6 - 2: y += velocity if 50 < x < 66 : if pressed[pygame.K_DOWN]: y -= 0 elif x == 21 or y == 21: x = 350 y = 250 if pressed[pygame.K_LEFT] and x > xyLimit: x -= velocity if 50 < x < 66 : if pressed[pygame.K_LEFT]: y -= 0 elif x == 21 or y == 21: x = 350 y = 250 if pressed[pygame.K_RIGHT] and x < 400 - 6 - 2: x += velocity if 50 < x < 66 : if pressed[pygame.K_RIGHT]: y -= 0 elif x == 21 or y == 21: x = 350 y = 250 if y <= 0: done = True screen.fill((0, 0, 0)) if is_blue: color = (0, 128, 255) else: color = (255, 100, 0) pygame.draw.rect(screen, color, pygame.Rect(x, y, 6, 6)) pygame.draw.rect(screen, (255, 255, 255), pygame.Rect(20, 20, 10000, 1)) pygame.draw.rect(screen, (255, 255, 255), pygame.Rect(20, 20, 1, 10000)) pygame.draw.rect(screen, (0, 0, 0), pygame.Rect(50, 20, 16, 2)) pygame.display.flip() clock.tick(60)
py
7dfa47f11e6ecc8fc033dd16092e301957aac07c
import pytest from games4e import * # Creating the game instances f52 = Fig52Game() ttt = TicTacToe() con4 = ConnectFour() random.seed("aima-python") def gen_state(to_move='X', x_positions=[], o_positions=[], h=3, v=3): """Given whose turn it is to move, the positions of X's on the board, the positions of O's on the board, and, (optionally) number of rows, columns and how many consecutive X's or O's required to win, return the corresponding game state""" moves = set([(x, y) for x in range(1, h + 1) for y in range(1, v + 1)]) - set(x_positions) - set(o_positions) moves = list(moves) board = {} for pos in x_positions: board[pos] = 'X' for pos in o_positions: board[pos] = 'O' return GameState(to_move=to_move, utility=0, board=board, moves=moves) def test_minmax_decision(): assert minmax_decision('A', f52) == 'a1' assert minmax_decision('B', f52) == 'b1' assert minmax_decision('C', f52) == 'c1' assert minmax_decision('D', f52) == 'd3' def test_alpha_beta_search(): assert alpha_beta_search('A', f52) == 'a1' assert alpha_beta_search('B', f52) == 'b1' assert alpha_beta_search('C', f52) == 'c1' assert alpha_beta_search('D', f52) == 'd3' state = gen_state(to_move='X', x_positions=[(1, 1), (3, 3)], o_positions=[(1, 2), (3, 2)]) assert alpha_beta_search(state, ttt) == (2, 2) state = gen_state(to_move='O', x_positions=[(1, 1), (3, 1), (3, 3)], o_positions=[(1, 2), (3, 2)]) assert alpha_beta_search(state, ttt) == (2, 2) state = gen_state(to_move='O', x_positions=[(1, 1)], o_positions=[]) assert alpha_beta_search(state, ttt) == (2, 2) state = gen_state(to_move='X', x_positions=[(1, 1), (3, 1)], o_positions=[(2, 2), (3, 1)]) assert alpha_beta_search(state, ttt) == (1, 3) def test_monte_carlo_tree_search(): state = gen_state(to_move='X', x_positions=[(1, 1), (3, 3)], o_positions=[(1, 2), (3, 2)]) assert monte_carlo_tree_search(state, ttt) == (2, 2) state = gen_state(to_move='O', x_positions=[(1, 1), (3, 1), (3, 3)], o_positions=[(1, 2), (3, 2)]) assert monte_carlo_tree_search(state, ttt) == (2, 2) # uncomment the following when removing the 3rd edition # state = gen_state(to_move='O', x_positions=[(1, 1)], # o_positions=[]) # assert monte_carlo_tree_search(state, ttt) == (2, 2) state = gen_state(to_move='X', x_positions=[(1, 1), (3, 1)], o_positions=[(2, 2), (3, 1)]) assert monte_carlo_tree_search(state, ttt) == (1, 3) # should never lose to a random or alpha_beta player in a ttt game assert ttt.play_game(mcts_player, random_player) >= 0 assert ttt.play_game(mcts_player, alpha_beta_player) >= 0 # should never lose to a random player in a connect four game assert con4.play_game(mcts_player, random_player) >= 0 def test_random_tests(): assert Fig52Game().play_game(alpha_beta_player, alpha_beta_player) == 3 # The player 'X' (one who plays first) in TicTacToe never loses: assert ttt.play_game(alpha_beta_player, alpha_beta_player) >= 0 # The player 'X' (one who plays first) in TicTacToe never loses: assert ttt.play_game(alpha_beta_player, random_player) >= 0 if __name__ == "__main__": pytest.main()
py
7dfa48e0af67426d3e10dc6b28672a843394f962
import importlib import math import os import warnings from fractions import Fraction from typing import List, Tuple import numpy as np import torch _HAS_VIDEO_OPT = False try: lib_dir = os.path.join(os.path.dirname(__file__), "..") loader_details = ( importlib.machinery.ExtensionFileLoader, importlib.machinery.EXTENSION_SUFFIXES ) extfinder = importlib.machinery.FileFinder(lib_dir, loader_details) ext_specs = extfinder.find_spec("video_reader") if ext_specs is not None: torch.ops.load_library(ext_specs.origin) _HAS_VIDEO_OPT = True except (ImportError, OSError): pass default_timebase = Fraction(0, 1) # simple class for torch scripting # the complex Fraction class from fractions module is not scriptable @torch.jit.script class Timebase(object): __annotations__ = {"numerator": int, "denominator": int} __slots__ = ["numerator", "denominator"] def __init__( self, numerator, # type: int denominator, # type: int ): # type: (...) -> None self.numerator = numerator self.denominator = denominator @torch.jit.script class VideoMetaData(object): __annotations__ = { "has_video": bool, "video_timebase": Timebase, "video_duration": float, "video_fps": float, "has_audio": bool, "audio_timebase": Timebase, "audio_duration": float, "audio_sample_rate": float, } __slots__ = [ "has_video", "video_timebase", "video_duration", "video_fps", "has_audio", "audio_timebase", "audio_duration", "audio_sample_rate", ] def __init__(self): self.has_video = False self.video_timebase = Timebase(0, 1) self.video_duration = 0.0 self.video_fps = 0.0 self.has_audio = False self.audio_timebase = Timebase(0, 1) self.audio_duration = 0.0 self.audio_sample_rate = 0.0 def _validate_pts(pts_range): # type: (List[int]) -> None if pts_range[1] > 0: assert ( pts_range[0] <= pts_range[1] ), """Start pts should not be smaller than end pts, got start pts: %d and end pts: %d""" % ( pts_range[0], pts_range[1], ) def _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration): # type: (torch.Tensor,torch.Tensor,torch.Tensor,torch.Tensor,torch.Tensor,torch.Tensor) -> VideoMetaData """ Build update VideoMetaData struct with info about the video """ meta = VideoMetaData() if vtimebase.numel() > 0: meta.video_timebase = Timebase( int(vtimebase[0].item()), int(vtimebase[1].item()) ) timebase = vtimebase[0].item() / float(vtimebase[1].item()) if vduration.numel() > 0: meta.has_video = True meta.video_duration = float(vduration.item()) * timebase if vfps.numel() > 0: meta.video_fps = float(vfps.item()) if atimebase.numel() > 0: meta.audio_timebase = Timebase( int(atimebase[0].item()), int(atimebase[1].item()) ) timebase = atimebase[0].item() / float(atimebase[1].item()) if aduration.numel() > 0: meta.has_audio = True meta.audio_duration = float(aduration.item()) * timebase if asample_rate.numel() > 0: meta.audio_sample_rate = float(asample_rate.item()) return meta def _align_audio_frames(aframes, aframe_pts, audio_pts_range): # type: (torch.Tensor, torch.Tensor, List[int]) -> torch.Tensor start, end = aframe_pts[0], aframe_pts[-1] num_samples = aframes.size(0) step_per_aframe = float(end - start + 1) / float(num_samples) s_idx = 0 e_idx = num_samples if start < audio_pts_range[0]: s_idx = int((audio_pts_range[0] - start) / step_per_aframe) if end > audio_pts_range[1]: e_idx = int((audio_pts_range[1] - end) / step_per_aframe) return aframes[s_idx:e_idx, :] def _read_video_from_file( filename, seek_frame_margin=0.25, read_video_stream=True, video_width=0, video_height=0, video_min_dimension=0, video_max_dimension=0, video_pts_range=(0, -1), video_timebase=default_timebase, read_audio_stream=True, audio_samples=0, audio_channels=0, audio_pts_range=(0, -1), audio_timebase=default_timebase, ): """ Reads a video from a file, returning both the video frames as well as the audio frames Args ---------- filename : str path to the video file seek_frame_margin: double, optional seeking frame in the stream is imprecise. Thus, when video_start_pts is specified, we seek the pts earlier by seek_frame_margin seconds read_video_stream: int, optional whether read video stream. If yes, set to 1. Otherwise, 0 video_width/video_height/video_min_dimension/video_max_dimension: int together decide the size of decoded frames - When video_width = 0, video_height = 0, video_min_dimension = 0, and video_max_dimension = 0, keep the orignal frame resolution - When video_width = 0, video_height = 0, video_min_dimension != 0, and video_max_dimension = 0, keep the aspect ratio and resize the frame so that shorter edge size is video_min_dimension - When video_width = 0, video_height = 0, video_min_dimension = 0, and video_max_dimension != 0, keep the aspect ratio and resize the frame so that longer edge size is video_max_dimension - When video_width = 0, video_height = 0, video_min_dimension != 0, and video_max_dimension != 0, resize the frame so that shorter edge size is video_min_dimension, and longer edge size is video_max_dimension. The aspect ratio may not be preserved - When video_width = 0, video_height != 0, video_min_dimension = 0, and video_max_dimension = 0, keep the aspect ratio and resize the frame so that frame video_height is $video_height - When video_width != 0, video_height == 0, video_min_dimension = 0, and video_max_dimension = 0, keep the aspect ratio and resize the frame so that frame video_width is $video_width - When video_width != 0, video_height != 0, video_min_dimension = 0, and video_max_dimension = 0, resize the frame so that frame video_width and video_height are set to $video_width and $video_height, respectively video_pts_range : list(int), optional the start and end presentation timestamp of video stream video_timebase: Fraction, optional a Fraction rational number which denotes timebase in video stream read_audio_stream: int, optional whether read audio stream. If yes, set to 1. Otherwise, 0 audio_samples: int, optional audio sampling rate audio_channels: int optional audio channels audio_pts_range : list(int), optional the start and end presentation timestamp of audio stream audio_timebase: Fraction, optional a Fraction rational number which denotes time base in audio stream Returns ------- vframes : Tensor[T, H, W, C] the `T` video frames aframes : Tensor[L, K] the audio frames, where `L` is the number of points and `K` is the number of audio_channels info : Dict metadata for the video and audio. Can contain the fields video_fps (float) and audio_fps (int) """ _validate_pts(video_pts_range) _validate_pts(audio_pts_range) result = torch.ops.video_reader.read_video_from_file( filename, seek_frame_margin, 0, # getPtsOnly read_video_stream, video_width, video_height, video_min_dimension, video_max_dimension, video_pts_range[0], video_pts_range[1], video_timebase.numerator, video_timebase.denominator, read_audio_stream, audio_samples, audio_channels, audio_pts_range[0], audio_pts_range[1], audio_timebase.numerator, audio_timebase.denominator, ) vframes, _vframe_pts, vtimebase, vfps, vduration, \ aframes, aframe_pts, atimebase, asample_rate, aduration = ( result ) info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) if aframes.numel() > 0: # when audio stream is found aframes = _align_audio_frames(aframes, aframe_pts, audio_pts_range) return vframes, aframes, info def _read_video_timestamps_from_file(filename): """ Decode all video- and audio frames in the video. Only pts (presentation timestamp) is returned. The actual frame pixel data is not copied. Thus, it is much faster than read_video(...) """ result = torch.ops.video_reader.read_video_from_file( filename, 0, # seek_frame_margin 1, # getPtsOnly 1, # read_video_stream 0, # video_width 0, # video_height 0, # video_min_dimension 0, # video_max_dimension 0, # video_start_pts -1, # video_end_pts 0, # video_timebase_num 1, # video_timebase_den 1, # read_audio_stream 0, # audio_samples 0, # audio_channels 0, # audio_start_pts -1, # audio_end_pts 0, # audio_timebase_num 1, # audio_timebase_den ) _vframes, vframe_pts, vtimebase, vfps, vduration, \ _aframes, aframe_pts, atimebase, asample_rate, aduration = (result) info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) vframe_pts = vframe_pts.numpy().tolist() aframe_pts = aframe_pts.numpy().tolist() return vframe_pts, aframe_pts, info def _probe_video_from_file(filename): """ Probe a video file and return VideoMetaData with info about the video """ result = torch.ops.video_reader.probe_video_from_file(filename) vtimebase, vfps, vduration, atimebase, asample_rate, aduration = result info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) return info def _read_video_from_memory( video_data, # type: torch.Tensor seek_frame_margin=0.25, # type: float read_video_stream=1, # type: int video_width=0, # type: int video_height=0, # type: int video_min_dimension=0, # type: int video_max_dimension=0, # type: int video_pts_range=(0, -1), # type: List[int] video_timebase_numerator=0, # type: int video_timebase_denominator=1, # type: int read_audio_stream=1, # type: int audio_samples=0, # type: int audio_channels=0, # type: int audio_pts_range=(0, -1), # type: List[int] audio_timebase_numerator=0, # type: int audio_timebase_denominator=1, # type: int ): # type: (...) -> Tuple[torch.Tensor, torch.Tensor] """ Reads a video from memory, returning both the video frames as well as the audio frames This function is torchscriptable. Args ---------- video_data : data type could be 1) torch.Tensor, dtype=torch.int8 or 2) python bytes compressed video content stored in either 1) torch.Tensor 2) python bytes seek_frame_margin: double, optional seeking frame in the stream is imprecise. Thus, when video_start_pts is specified, we seek the pts earlier by seek_frame_margin seconds read_video_stream: int, optional whether read video stream. If yes, set to 1. Otherwise, 0 video_width/video_height/video_min_dimension/video_max_dimension: int together decide the size of decoded frames - When video_width = 0, video_height = 0, video_min_dimension = 0, and video_max_dimension = 0, keep the orignal frame resolution - When video_width = 0, video_height = 0, video_min_dimension != 0, and video_max_dimension = 0, keep the aspect ratio and resize the frame so that shorter edge size is video_min_dimension - When video_width = 0, video_height = 0, video_min_dimension = 0, and video_max_dimension != 0, keep the aspect ratio and resize the frame so that longer edge size is video_max_dimension - When video_width = 0, video_height = 0, video_min_dimension != 0, and video_max_dimension != 0, resize the frame so that shorter edge size is video_min_dimension, and longer edge size is video_max_dimension. The aspect ratio may not be preserved - When video_width = 0, video_height != 0, video_min_dimension = 0, and video_max_dimension = 0, keep the aspect ratio and resize the frame so that frame video_height is $video_height - When video_width != 0, video_height == 0, video_min_dimension = 0, and video_max_dimension = 0, keep the aspect ratio and resize the frame so that frame video_width is $video_width - When video_width != 0, video_height != 0, video_min_dimension = 0, and video_max_dimension = 0, resize the frame so that frame video_width and video_height are set to $video_width and $video_height, respectively video_pts_range : list(int), optional the start and end presentation timestamp of video stream video_timebase_numerator / video_timebase_denominator: optional a rational number which denotes timebase in video stream read_audio_stream: int, optional whether read audio stream. If yes, set to 1. Otherwise, 0 audio_samples: int, optional audio sampling rate audio_channels: int optional audio audio_channels audio_pts_range : list(int), optional the start and end presentation timestamp of audio stream audio_timebase_numerator / audio_timebase_denominator: optional a rational number which denotes time base in audio stream Returns ------- vframes : Tensor[T, H, W, C] the `T` video frames aframes : Tensor[L, K] the audio frames, where `L` is the number of points and `K` is the number of channels """ _validate_pts(video_pts_range) _validate_pts(audio_pts_range) result = torch.ops.video_reader.read_video_from_memory( video_data, seek_frame_margin, 0, # getPtsOnly read_video_stream, video_width, video_height, video_min_dimension, video_max_dimension, video_pts_range[0], video_pts_range[1], video_timebase_numerator, video_timebase_denominator, read_audio_stream, audio_samples, audio_channels, audio_pts_range[0], audio_pts_range[1], audio_timebase_numerator, audio_timebase_denominator, ) vframes, _vframe_pts, vtimebase, vfps, vduration, \ aframes, aframe_pts, atimebase, asample_rate, aduration = ( result ) if aframes.numel() > 0: # when audio stream is found aframes = _align_audio_frames(aframes, aframe_pts, audio_pts_range) return vframes, aframes def _read_video_timestamps_from_memory(video_data): """ Decode all frames in the video. Only pts (presentation timestamp) is returned. The actual frame pixel data is not copied. Thus, read_video_timestamps(...) is much faster than read_video(...) """ if not isinstance(video_data, torch.Tensor): video_data = torch.from_numpy(np.frombuffer(video_data, dtype=np.uint8)) result = torch.ops.video_reader.read_video_from_memory( video_data, 0, # seek_frame_margin 1, # getPtsOnly 1, # read_video_stream 0, # video_width 0, # video_height 0, # video_min_dimension 0, # video_max_dimension 0, # video_start_pts -1, # video_end_pts 0, # video_timebase_num 1, # video_timebase_den 1, # read_audio_stream 0, # audio_samples 0, # audio_channels 0, # audio_start_pts -1, # audio_end_pts 0, # audio_timebase_num 1, # audio_timebase_den ) _vframes, vframe_pts, vtimebase, vfps, vduration, \ _aframes, aframe_pts, atimebase, asample_rate, aduration = ( result ) info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) vframe_pts = vframe_pts.numpy().tolist() aframe_pts = aframe_pts.numpy().tolist() return vframe_pts, aframe_pts, info def _probe_video_from_memory(video_data): # type: (torch.Tensor) -> VideoMetaData """ Probe a video in memory and return VideoMetaData with info about the video This function is torchscriptable """ if not isinstance(video_data, torch.Tensor): video_data = torch.from_numpy(np.frombuffer(video_data, dtype=np.uint8)) result = torch.ops.video_reader.probe_video_from_memory(video_data) vtimebase, vfps, vduration, atimebase, asample_rate, aduration = result info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) return info def _read_video(filename, start_pts=0, end_pts=None, pts_unit="pts"): if end_pts is None: end_pts = float("inf") if pts_unit == "pts": warnings.warn( "The pts_unit 'pts' gives wrong results and will be removed in a " + "follow-up version. Please use pts_unit 'sec'." ) info = _probe_video_from_file(filename) has_video = info.has_video has_audio = info.has_audio def get_pts(time_base): start_offset = start_pts end_offset = end_pts if pts_unit == "sec": start_offset = int(math.floor(start_pts * (1 / time_base))) if end_offset != float("inf"): end_offset = int(math.ceil(end_pts * (1 / time_base))) if end_offset == float("inf"): end_offset = -1 return start_offset, end_offset video_pts_range = (0, -1) video_timebase = default_timebase if has_video: video_timebase = Fraction( info.video_timebase.numerator, info.video_timebase.denominator ) video_pts_range = get_pts(video_timebase) audio_pts_range = (0, -1) audio_timebase = default_timebase if has_audio: audio_timebase = Fraction( info.audio_timebase.numerator, info.audio_timebase.denominator ) audio_pts_range = get_pts(audio_timebase) vframes, aframes, info = _read_video_from_file( filename, read_video_stream=True, video_pts_range=video_pts_range, video_timebase=video_timebase, read_audio_stream=True, audio_pts_range=audio_pts_range, audio_timebase=audio_timebase, ) _info = {} if has_video: _info["video_fps"] = info.video_fps if has_audio: _info["audio_fps"] = info.audio_sample_rate return vframes, aframes, _info def _read_video_timestamps(filename, pts_unit="pts"): if pts_unit == "pts": warnings.warn( "The pts_unit 'pts' gives wrong results and will be removed in a " + "follow-up version. Please use pts_unit 'sec'." ) pts, _, info = _read_video_timestamps_from_file(filename) if pts_unit == "sec": video_time_base = Fraction( info.video_timebase.numerator, info.video_timebase.denominator ) pts = [x * video_time_base for x in pts] video_fps = info.video_fps if info.has_video else None return pts, video_fps
py
7dfa490c6ca7e834aeecf658dae7780d433d81f7
"""Stringify the parsed meta-model.""" from typing import Optional, Union from aas_core_codegen import stringify from aas_core_codegen.parse import _types from aas_core_codegen.parse import tree from aas_core_codegen.parse._types import ( AbstractClass, Argument, AtomicTypeAnnotation, ConcreteClass, Contract, Contracts, Default, Class, Enumeration, EnumerationLiteral, Method, Property, SelfTypeAnnotation, Snapshot, SubscriptedTypeAnnotation, Symbol, SymbolTable, TypeAnnotation, UnverifiedSymbolTable, Description, Invariant, ImplementationSpecificMethod, UnderstoodMethod, ConstructorToBeUnderstood, Serialization, MetaModel, ) def _stringify_atomic_type_annotation( that: AtomicTypeAnnotation, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("identifier", that.identifier), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_self_type_annotation( that: SelfTypeAnnotation, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[], ) return result def _stringify_subscripted_type_annotation( that: SubscriptedTypeAnnotation, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("identifier", that.identifier), stringify.Property("subscripts", list(map(_stringify, that.subscripts))), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_description(that: Description) -> stringify.Entity: return stringify.Entity( name=that.__class__.__name__, properties=[ stringify.PropertyEllipsis("document", that.document), stringify.PropertyEllipsis("node", that.node), ], ) def _stringify_property(that: Property) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property("type_annotation", _stringify(that.type_annotation)), stringify.Property("description", _stringify(that.description)), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_default(that: Default) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[stringify.PropertyEllipsis("node", that.node)], ) return result def _stringify_argument(that: Argument) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property("type_annotation", _stringify(that.type_annotation)), stringify.Property( "default", _stringify(that.default), ), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_invariant(that: Invariant) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("description", that.description), stringify.Property("body", tree.dump(that.body)), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_contract(that: Contract) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("args", that.args), stringify.Property("description", that.description), stringify.PropertyEllipsis("body", tree.dump(that.body)), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_snapshot(that: Snapshot) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("args", that.args), stringify.Property("name", that.name), stringify.Property("body", tree.dump(that.body)), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_contracts(that: Contracts) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property( "preconditions", list(map(_stringify, that.preconditions)) ), stringify.Property("snapshots", list(map(_stringify, that.snapshots))), stringify.Property( "postconditions", list(map(_stringify, that.postconditions)), ), ], ) return result def _stringify_implementation_specific_method( that: ImplementationSpecificMethod, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property("verification", that.verification), stringify.Property("arguments", list(map(_stringify, that.arguments))), stringify.Property("returns", _stringify(that.returns)), stringify.Property("description", _stringify(that.description)), stringify.Property("contracts", _stringify(that.contracts)), stringify.PropertyEllipsis("node", that.node), stringify.PropertyEllipsis("arguments_by_name", that.arguments_by_name), ], ) return result def _stringify_understood_method( that: UnderstoodMethod, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property("verification", that.verification), stringify.Property("arguments", list(map(_stringify, that.arguments))), stringify.Property("returns", _stringify(that.returns)), stringify.Property("description", _stringify(that.description)), stringify.Property("contracts", _stringify(that.contracts)), stringify.Property("body", list(map(tree.dump, that.body))), stringify.PropertyEllipsis("node", that.node), stringify.PropertyEllipsis("arguments_by_name", that.arguments_by_name), ], ) return result def _stringify_constructor_to_be_understood( that: ConstructorToBeUnderstood, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property("verification", that.verification), stringify.Property("arguments", list(map(_stringify, that.arguments))), stringify.Property("returns", _stringify(that.returns)), stringify.Property("description", _stringify(that.description)), stringify.Property("contracts", _stringify(that.contracts)), stringify.PropertyEllipsis("node", that.node), stringify.PropertyEllipsis("arguments_by_name", that.arguments_by_name), stringify.PropertyEllipsis("body", that.body), ], ) return result def _stringify_serialization( that: Serialization, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("with_model_type", that.with_model_type), ], ) return result def _stringify_abstract_class(that: AbstractClass) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property( "is_implementation_specific", that.is_implementation_specific ), stringify.Property("inheritances", that.inheritances), stringify.Property("properties", list(map(_stringify, that.properties))), stringify.Property("methods", list(map(_stringify, that.methods))), stringify.Property("invariants", list(map(_stringify, that.invariants))), stringify.Property("serialization", _stringify(that.serialization)), stringify.Property("description", _stringify(that.description)), stringify.PropertyEllipsis("node", that.node), stringify.PropertyEllipsis("properties_by_name", that.properties_by_name), stringify.PropertyEllipsis("methods_by_name", that.methods_by_name), ], ) return result def _stringify_concrete_class(that: ConcreteClass) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property( "is_implementation_specific", that.is_implementation_specific ), stringify.Property("inheritances", that.inheritances), stringify.Property("properties", list(map(_stringify, that.properties))), stringify.Property("methods", list(map(_stringify, that.methods))), stringify.Property("invariants", list(map(_stringify, that.invariants))), stringify.Property("serialization", _stringify(that.serialization)), stringify.Property("description", _stringify(that.description)), stringify.PropertyEllipsis("node", that.node), stringify.PropertyEllipsis("properties_by_name", that.properties_by_name), stringify.PropertyEllipsis("methods_by_name", that.methods_by_name), ], ) return result def _stringify_enumeration_literal( that: EnumerationLiteral, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property("value", that.value), stringify.Property("description", _stringify(that.description)), stringify.PropertyEllipsis("node", that.node), ], ) return result def _stringify_enumeration(that: Enumeration) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("name", that.name), stringify.Property("is_superset_of", that.is_superset_of), stringify.Property("literals", list(map(_stringify, that.literals))), stringify.Property("description", _stringify(that.description)), stringify.PropertyEllipsis("node", that.node), stringify.PropertyEllipsis("literals_by_name", that.literals_by_name), ], ) return result def _stringify_meta_model( that: MetaModel, ) -> stringify.Entity: result = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("description", _stringify(that.description)), stringify.Property("book_url", that.book_url), stringify.Property("book_version", that.book_version), ], ) return result def _stringify_unverified_symbol_table( that: UnverifiedSymbolTable, ) -> stringify.Entity: entity = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("symbols", list(map(_stringify, that.symbols))), stringify.Property( "verification_functions", list(map(_stringify, that.verification_functions)), ), stringify.Property("meta_model", _stringify(that.meta_model)), ], ) return entity def _stringify_symbol_table(that: SymbolTable) -> stringify.Entity: entity = stringify.Entity( name=that.__class__.__name__, properties=[ stringify.Property("symbols", list(map(_stringify, that.symbols))), stringify.Property( "verification_functions", list(map(_stringify, that.verification_functions)), ), stringify.Property("meta_model", _stringify(that.meta_model)), ], ) return entity Dumpable = Union[ Argument, AtomicTypeAnnotation, Class, ConcreteClass, ConstructorToBeUnderstood, Contract, Contracts, Default, Description, Enumeration, EnumerationLiteral, ImplementationSpecificMethod, Invariant, MetaModel, Method, Property, SelfTypeAnnotation, Serialization, Snapshot, SubscriptedTypeAnnotation, Symbol, SymbolTable, TypeAnnotation, UnderstoodMethod, UnverifiedSymbolTable, ] stringify.assert_all_public_types_listed_as_dumpables( dumpable=Dumpable, types_module=_types ) _DISPATCH = { AbstractClass: _stringify_abstract_class, Argument: _stringify_argument, AtomicTypeAnnotation: _stringify_atomic_type_annotation, ConcreteClass: _stringify_concrete_class, ConstructorToBeUnderstood: _stringify_constructor_to_be_understood, Contract: _stringify_contract, Contracts: _stringify_contracts, Default: _stringify_default, Description: _stringify_description, Enumeration: _stringify_enumeration, EnumerationLiteral: _stringify_enumeration_literal, ImplementationSpecificMethod: _stringify_implementation_specific_method, Invariant: _stringify_invariant, MetaModel: _stringify_meta_model, Property: _stringify_property, SelfTypeAnnotation: _stringify_self_type_annotation, Serialization: _stringify_serialization, Snapshot: _stringify_snapshot, SubscriptedTypeAnnotation: _stringify_subscripted_type_annotation, SymbolTable: _stringify_symbol_table, UnderstoodMethod: _stringify_understood_method, UnverifiedSymbolTable: _stringify_unverified_symbol_table, } stringify.assert_dispatch_exhaustive(dispatch=_DISPATCH, dumpable=Dumpable) def _stringify(that: Optional[Dumpable]) -> Optional[stringify.Entity]: """Dispatch to the correct ``_stringify_*`` method.""" if that is None: return None stringify_func = _DISPATCH.get(that.__class__, None) if stringify_func is None: raise AssertionError( f"No stringify function could be found for the class {that.__class__}" ) stringified = stringify_func(that) # type: ignore assert isinstance(stringified, stringify.Entity) stringify.assert_compares_against_dict(stringified, that) return stringified def dump(that: Optional[Dumpable]) -> str: """Produce a string representation of the ``dumpable`` for testing or debugging.""" if that is None: return repr(None) stringified = _stringify(that) return stringify.dump(stringified)
py
7dfa4966c2205208f3dbeb763ef9aef46792daa8
# -*- coding:utf8 -*- import json class Issue(object): """ Type of object returned by all checkers. Este es el modelo genérico que será generado por cada vulnerabilidad encontrada por los checkers y tratada por los modulos de reporte. Attributes: SEVERITY_INFO (str): Name of the incidences of informatic value SEVERITY_LOW (str): Name of incidents with low criticality SEVERITY_MEDIUM (str): Name of incidents with medium criticality SEVERITY_HIGH (str): Name of requests with high criticality SEVERITY_CRITICAL (str): Name of the requests with very high criticality _name (str) : Name of the request _file (str) : File affected by the incident _details (str) : Other details about the incident _severity (str) : Criticism of the incidence _potential (bool) : _checker_name (str) : Name of the module that detected the request """ SEVERITY_INFO = "Info" SEVERITY_LOW = "Low" SEVERITY_MEDIUM = "Medium" SEVERITY_HIGH = "High" SEVERITY_CRITICAL = "Critical" def __init__(self, name=None, file=None, details=None, severity=None, potential=None, checker_name=None): self._name = name self._file = file self._details = details self._severity = severity self._potential = potential self._checker_name = checker_name @property def name(self): """ Getter for 'name' property Returns: string: Issue's name """ return self._name @name.setter def name(self, value): """ Setter for 'name' property Args: value (str): Issue's name """ self._name = value @property def file(self): """ Getter for 'file' property Returns: string: Issue's file """ return self._file @file.setter def file(self, value): """ Setter for 'path' property Args: value (str): Issue's file """ self._file = value @property def severity(self): """ Getter for 'severity' property Returns: string: Issue's severity """ return self._severity @severity.setter def severity(self, value): """ Setter for 'path' property Args: value (str): Issue's severity """ self._severity = value @property def potential(self): """ Getter for 'potential' property Returns: bool: potential is required? """ if self._potential is not None and self._potential: return True else: return False @potential.setter def potential(self, value): """ Setter for 'potential' property Args: value (bool): True if a potential is required. False else """ if value: self._potential = True else: self._potential = False @property def details(self): """ Getter for 'details' property Returns: string: Issue's details """ return self._details @details.setter def details(self, value): """ Setter for 'details' property Args: value (str): Issue's details """ self._details = value @property def checker(self): """ Getter for 'checker' property Returns: string: Issue's checker """ return self._checker_name @checker.setter def checker(self, value): """ Setter for 'checker' property Args: value (str): Issue's checker """ self._checker_name = value def __todict__(self): """ Returns a dictionary with the class representation Returns: dict: class representarion """ return { "name": self.name, "file": self.file, "details": self.details, "severity": self.severity, "potential": self.potential, "checker": self.checker } def __str__(self): """ Return a JSON class representation Returns: str: JSON class representation """ return json.dumps(self.__todict__()) def __unicode__(self): """ Return a JSON class representation (unicode) Returns: unicode: JSON class representation """ return unicode(self.__str__())
py
7dfa497a52caac7635b941928b10ada4c5708fba
#!/bin/env python #=============================================================================== # NAME: InstanceDictStart # # DESCRIPTION: The InstanceDictStart class is the main entry point # for generation of end of file code. # # USAGE: Nominally the InstanceDictStart.__call__ is called by using the # instance name. The instance name is the function # called with a suitable argument object containing # all needed model information to generate the code. # # AUTHOR: reder # EMAIL: [email protected] # DATE CREATED : Feb. 5, 2013 # # Copyright 2013, California Institute of Technology. # ALL RIGHTS RESERVED. U.S. Government Sponsorship acknowledged. #=============================================================================== # # Python standard modules # import logging #import os #import sys #import time # # Python extention modules and custom interfaces # from generators.visitors import AbstractVisitor # # Universal globals used within module go here. # (DO NOT USE MANY!) # # Global logger init. below. PRINT = logging.getLogger('output') DEBUG = logging.getLogger('debug') # # Module class or classes go here. class InstanceDictStart: """ Defines the interface concrete class implementation that drives code generation. """ __visitor_list = [] __obj = None def __init__(self): """ Constructor. """ self.__visitor_list = list() def __call__(self, args , topology_model): """ Main execution point. Calls the accept method on each visitor to generate the code. """ # Note that name handling for params goes # here so that the visitor in accept can # process all. self.__obj = args for v in self.__visitor_list: self.accept(v , topology_model) def accept(self, visitor , topology_model): """ The operation in Visitor design pattern that takes a visitor as an argument and calls the visitor's method that corresponds to this elememnt. @raise Exception: if the given visitor is not a subclass of AbstractVisitor """ # visitor should be extended from the AbstractVisitor class if issubclass(visitor.__class__, AbstractVisitor.AbstractVisitor): visitor.DictStartVisit(self.__obj , topology_model) else: DEBUG.error('InstanceDictStartVisit.accept() - the given visitor is not a subclass of AbstractVisitor!') raise 'InstanceDictStartVisit.accept() - the given visitor is not a subclass of AbstractVisitor!' def addVisitor(self, visitor): """ Add a visitor to the list of vistors. @param visitor: the visitor to add, must be derived from AbstractVisitor. """ if issubclass(visitor.__class__, AbstractVisitor.AbstractVisitor): self.__visitor_list.append(visitor) else: DEBUG.error('InstanceDictStartVisit.addVisitor(v) - the given visitor is not a subclass of AbstractVisitor!') raise 'InstanceDictStartVisit.addVisitor(v) - the given visitor is not a subclass of AbstractVisitor!' def getObj(self): """ Return the object to the visitor. """ return self.__obj if __name__ == '__main__': pass
py
7dfa4a24792aaa1b2b75c06916ebdcaf32385b82
from flask import Flask, send_from_directory from flask_restful import Api from pymongo import MongoClient from flask_jwt import JWT from security import SecurityControl from resources.product_types import ProductTypes from resources.stores import Stores from resources.store import Store app = Flask(__name__) app.secret_key = "nosecrets" api = Api(app) client = MongoClient('127.0.0.1', 27017) db = client.comprice securityControl = SecurityControl(db.users) jwt = JWT(app, securityControl.authenticate, securityControl.identity) #auth endpoint #Store and StoreList backend API api.add_resource(Stores, '/stores', resource_class_kwargs={'stores_collection': db.stores}) api.add_resource(Store, '/stores/<string:store_id>', resource_class_kwargs={'stores_collection': db.stores}) @app.route('/templates/<path:path>') def index(path): return send_from_directory('templates', path) #api.add_resource(ProductTypes, '/product_types', resource_class_kwargs={'product_types_collection': db.product_types}) app.run(port=5000)
py
7dfa4a8b5f84e395886edbc30b6d909b722349ab
''' Parameters for synthetic examples using pykalman (For linear models specify all, non-linear, just the ones that are relevant) ''' import theano import theano.tensor as T import numpy as np import os from utils.misc import loadHDF5 def linear_trans(z,fxn_params = {}, ns=None): return z+0.05 def linear_obs(z,fxn_params = {}, ns=None): return 0.5*z def nlinear_trans(z, fxn_params = {}, ns=None): return 2*T.sin(z)+z def nlinear_trans_learn(z, fxn_params = {}, ns = None): assert z.ndim == 3,'expecting 3d' z_1 = z[:,:,[0]] z_2 = z[:,:,[1]] f_1 = 0.2*z_1+T.tanh(fxn_params['alpha']*z_2) f_2 = 0.2*z_2+T.sin(fxn_params['beta']*z_1) return T.concatenate([f_1,f_2],axis=2) def obs_learn(z,fxn_params = {}, ns = None): assert z.ndim == 3,'expecting 3d' return 0.5*z #Load saved matrices and use them to form theano transition and emission functions SAVEDIR = os.path.dirname(os.path.realpath(__file__))+'/synthetic' saved_matrices = loadHDF5(SAVEDIR+'/linear-matrices.h5') saved_matrices_2 = loadHDF5(SAVEDIR+'/linear-matrices-2.h5') def linear_trans_s12(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices['Wtrans_10'].astype('float32'),name = 'Wtrans_10') b = theano.shared(saved_matrices['btrans_10'].astype('float32'),name = 'btrans_10') return T.dot(z,W)+b def linear_obs_s12(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices['Wobs_10'].astype('float32'),name = 'Wobs_10') return T.dot(z,W) def linear_trans_s13(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices['Wtrans_100'].astype('float32'),name = 'Wtrans_100') b = theano.shared(saved_matrices['btrans_100'].astype('float32'),name = 'btrans_100') return T.dot(z,W)+b def linear_obs_s13(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices['Wobs_100'].astype('float32'),name = 'Wobs_100') return T.dot(z,W) def linear_trans_s14(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices['Wtrans_250'].astype('float32'),name = 'Wtrans_250') b = theano.shared(saved_matrices['btrans_250'].astype('float32'),name = 'btrans_250') return T.dot(z,W)+b def linear_obs_s14(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices['Wobs_250'].astype('float32'),name = 'Wobs_250') return T.dot(z,W) def linear_trans_s15(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wtrans_10'].astype('float32'),name = 'Wtrans_10') b = theano.shared(saved_matrices_2['btrans_10'].astype('float32'),name = 'btrans_10') return T.dot(z,W)+b def linear_obs_s15(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wobs_10'].astype('float32'),name = 'Wobs_10') return T.dot(z,W) def linear_trans_s16(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wtrans_100'].astype('float32'),name = 'Wtrans_100') b = theano.shared(saved_matrices_2['btrans_100'].astype('float32'),name = 'btrans_100') return T.dot(z,W)+b def linear_obs_s16(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wobs_100'].astype('float32'),name = 'Wobs_100') return T.dot(z,W) def linear_trans_s17(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wtrans_250'].astype('float32'),name = 'Wtrans_250') b = theano.shared(saved_matrices_2['btrans_250'].astype('float32'),name = 'btrans_250') return T.dot(z,W)+b def linear_obs_s17(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wobs_250'].astype('float32'),name = 'Wobs_250') return T.dot(z,W) def linear_trans_s18(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wtrans_10_diag'].astype('float32'),name = 'Wtrans_10_diag') b = theano.shared(saved_matrices_2['btrans_10_diag'].astype('float32'),name = 'btrans_10_diag') return T.dot(z,W)+b def linear_obs_s18(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wobs_10_diag'].astype('float32'),name = 'Wobs_10_diag') return T.dot(z,W) def linear_trans_s19(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wtrans_100_diag'].astype('float32'),name = 'Wtrans_100_diag') b = theano.shared(saved_matrices_2['btrans_100_diag'].astype('float32'),name = 'btrans_100_diag') return T.dot(z,W)+b def linear_obs_s19(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wobs_100_diag'].astype('float32'),name = 'Wobs_100_diag') return T.dot(z,W) def linear_trans_s20(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wtrans_250_diag'].astype('float32'),name = 'Wtrans_250_diag') b = theano.shared(saved_matrices_2['btrans_250_diag'].astype('float32'),name = 'btrans_250_diag') return T.dot(z,W)+b def linear_obs_s20(z,fxn_params = {},ns=None): assert z.ndim==3,'Expecting 3d' W = theano.shared(saved_matrices_2['Wobs_250_diag'].astype('float32'),name = 'Wobs_250_diag') return T.dot(z,W) def updateParamsSynthetic(params_synthetic): params_synthetic['synthetic9']['trans_fxn'] = linear_trans params_synthetic['synthetic9']['obs_fxn'] = linear_obs params_synthetic['synthetic10']['trans_fxn'] = nlinear_trans params_synthetic['synthetic10']['obs_fxn'] = linear_obs params_synthetic['synthetic11']['trans_fxn'] = nlinear_trans_learn params_synthetic['synthetic11']['obs_fxn'] = obs_learn params_synthetic['synthetic12']['trans_fxn'] = linear_trans_s12 params_synthetic['synthetic12']['obs_fxn'] = linear_obs_s12 params_synthetic['synthetic13']['trans_fxn'] = linear_trans_s13 params_synthetic['synthetic13']['obs_fxn'] = linear_obs_s13 params_synthetic['synthetic14']['trans_fxn'] = linear_trans_s14 params_synthetic['synthetic14']['obs_fxn'] = linear_obs_s14 params_synthetic['synthetic15']['trans_fxn'] = linear_trans_s15 params_synthetic['synthetic15']['obs_fxn'] = linear_obs_s15 params_synthetic['synthetic16']['trans_fxn'] = linear_trans_s16 params_synthetic['synthetic16']['obs_fxn'] = linear_obs_s16 params_synthetic['synthetic17']['trans_fxn'] = linear_trans_s17 params_synthetic['synthetic17']['obs_fxn'] = linear_obs_s17 params_synthetic['synthetic18']['trans_fxn'] = linear_trans_s18 params_synthetic['synthetic18']['obs_fxn'] = linear_obs_s18 params_synthetic['synthetic19']['trans_fxn'] = linear_trans_s19 params_synthetic['synthetic19']['obs_fxn'] = linear_obs_s19 params_synthetic['synthetic20']['trans_fxn'] = linear_trans_s20 params_synthetic['synthetic20']['obs_fxn'] = linear_obs_s20
py
7dfa4aecbe0ffc070b335b427e16cf1aac0b81e9
import torch import torch.nn.functional as F from torch_geometric.data import Data from torch_geometric.nn import GNNExplainer, GCNConv import pickle import networkx as nx import sys sys.path.append("..") from model.BayesExplainer import BayesExplainer from model.samplers.NFSampler import NFSampler prefix = '/gpfs_home/spate116/singhlab/GCN_Integration/scripts/BI/pyro_model/synthetic/' G = nx.read_gpickle( prefix + 'data/syn3_G.pickle') with open(prefix + 'data/syn3_lab.pickle', 'rb') as f: labels = pickle.load(f) x = torch.tensor([x[1]['feat'] for x in G.nodes(data=True)]) edge_index = torch.tensor([x for x in G.edges]) edge_index_flipped = edge_index[:, [1, 0]] edge_index = torch.cat((edge_index, edge_index_flipped)) y = torch.tensor(labels, dtype=torch.long) data = Data(x=x, edge_index=edge_index.T, y=y) class Net(torch.nn.Module): def __init__(self, x=64): super(Net, self).__init__() self.conv1 = GCNConv(10, x) self.conv2 = GCNConv(x, x) self.conv3 = GCNConv(x, x) self.fc = torch.nn.Linear(x, max(y).tolist()+1) def forward(self, x, edge_index): x = F.leaky_relu(self.conv1(x, edge_index)) x = F.leaky_relu(self.conv2(x, edge_index)) x = F.leaky_relu(self.conv3(x, edge_index)) return self.fc(x) # Load everything onto the gpu if available device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') data = data.to(device) x, edge_index = data.x, data.edge_index model = Net(x=64).to(device) optimizer = torch.optim.Adam(model.parameters(), lr=0.0001) best_loss = 100 pbar = range(10000) for epoch in pbar: # Training step model.train() optimizer.zero_grad() log_logits = model(x, edge_index) loss = F.cross_entropy(log_logits, data.y) loss.backward() optimizer.step() # Testing step model.eval() best_loss = loss if loss < best_loss else best_loss if epoch % 100 == 0: print("Acc -> %.4f" % torch.mean((torch.argmax(log_logits, dim=1) == data.y).float()).item()) import numpy as np with open('/gpfs_home/spate116/singhlab/GCN_Integration/scripts/BI/PGExplainer/dataset/syn3.pkl', 'rb') as f: adj, _, _, _, _, _, _, _, edge_labels = pickle.load(f) edge_labels = torch.tensor(edge_labels) from sklearn.metrics import roc_auc_score auc = 0 auc_gnn_exp = 0 pbar = range(x.shape[0]) done = 0 for n in pbar: try: k = 3 splines = 8 sampler = NFSampler("nf_sampler", len(G.edges), splines, True, 10, 1.5, device) explainer = BayesExplainer(model, sampler, n, k, x, edge_index) avgs = explainer.train(epochs=3000, lr=0.25, window=500, log=False) edge_mask = explainer.edge_mask() edges = explainer.edge_index_adj labs = edge_labels[explainer.subset, :][:, explainer.subset][edges[0, :], edges[1, :]] sub_idx = (labs.long().cpu().detach().numpy() == 1) itr_auc = roc_auc_score(labs.long().cpu().detach().numpy()[sub_idx], edge_mask.cpu().detach().numpy()[sub_idx]) auc += itr_auc e_subset = explainer.edge_mask_hard explainer = GNNExplainer(model.to(device), epochs=1000, log=False) _, edge_mask = explainer.explain_node(n, x.to(device), edge_index.to(device)) auc_gnn_exp += roc_auc_score(labs.long().cpu().detach().numpy()[sub_idx], edge_mask[e_subset].cpu().detach().numpy()[sub_idx]) done += 1 if n % 10 == 0: print('EPOCH: %d | AUC: %.3f | AUC GNN_EXP: %.3f | ITR AUC: %.3f' % (n, auc/done, auc_gnn_exp/done, itr_auc)) except: pass print('FINAL | AUC: %.3f | AUC GNN_EXP: %.3f | ITR AUC: %.3f' % (auc/done, auc_gnn_exp/done, itr_auc))
py
7dfa4c195dc90914d135f69d192c03d8e68270ab
x = (lambda n,m: (n>m and 'First' or 'Second {x}')) print(x(10,20),"Number is Greater")
py
7dfa4c2cda75e5b990d84b6daa70a2e1b9283fd5
import stack def is_balanced(input_string: str) -> bool: """ Check if the given string is bracket balanced :param input_string: str :return is_balanced: bool """ bracket_in = "[{(" bracket_out = "]})" bracket_stack = stack.Stack() for i in input_string: if i in bracket_in: bracket_stack.push(bracket_in.index(i)) elif i in bracket_out: if bracket_stack.top() == bracket_out.index(i): bracket_stack.pop() if bracket_stack.is_empty(): return True return False if __name__ == '__main__': bracket_string1 = "(hello {world [bracket]})" bracket_string2 = "(hello {world [bracket}])" print(is_balanced(bracket_string1)) print(is_balanced(bracket_string2))
py
7dfa4e8e90132ae049d0b4dbb862a6b1d4fd1076
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # from collections import OrderedDict from distutils import util import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib # type: ignore from google.api_core import exceptions as core_exceptions # type: ignore from google.api_core import gapic_v1 # type: ignore from google.api_core import retry as retries # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore from google.cloud.webrisk_v1.types import webrisk from google.protobuf import timestamp_pb2 # type: ignore from .transports.base import WebRiskServiceTransport, DEFAULT_CLIENT_INFO from .transports.grpc import WebRiskServiceGrpcTransport from .transports.grpc_asyncio import WebRiskServiceGrpcAsyncIOTransport class WebRiskServiceClientMeta(type): """Metaclass for the WebRiskService client. This provides class-level methods for building and retrieving support objects (e.g. transport) without polluting the client instance objects. """ _transport_registry = ( OrderedDict() ) # type: Dict[str, Type[WebRiskServiceTransport]] _transport_registry["grpc"] = WebRiskServiceGrpcTransport _transport_registry["grpc_asyncio"] = WebRiskServiceGrpcAsyncIOTransport def get_transport_class(cls, label: str = None,) -> Type[WebRiskServiceTransport]: """Returns an appropriate transport class. Args: label: The name of the desired transport. If none is provided, then the first transport in the registry is used. Returns: The transport class to use. """ # If a specific transport is requested, return that one. if label: return cls._transport_registry[label] # No transport is requested; return the default (that is, the first one # in the dictionary). return next(iter(cls._transport_registry.values())) class WebRiskServiceClient(metaclass=WebRiskServiceClientMeta): """Web Risk API defines an interface to detect malicious URLs on your website and in client applications. """ @staticmethod def _get_default_mtls_endpoint(api_endpoint): """Converts api endpoint to mTLS endpoint. Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to "*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively. Args: api_endpoint (Optional[str]): the api endpoint to convert. Returns: str: converted mTLS api endpoint. """ if not api_endpoint: return api_endpoint mtls_endpoint_re = re.compile( r"(?P<name>[^.]+)(?P<mtls>\.mtls)?(?P<sandbox>\.sandbox)?(?P<googledomain>\.googleapis\.com)?" ) m = mtls_endpoint_re.match(api_endpoint) name, mtls, sandbox, googledomain = m.groups() if mtls or not googledomain: return api_endpoint if sandbox: return api_endpoint.replace( "sandbox.googleapis.com", "mtls.sandbox.googleapis.com" ) return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com") DEFAULT_ENDPOINT = "webrisk.googleapis.com" DEFAULT_MTLS_ENDPOINT = _get_default_mtls_endpoint.__func__( # type: ignore DEFAULT_ENDPOINT ) @classmethod def from_service_account_info(cls, info: dict, *args, **kwargs): """Creates an instance of this client using the provided credentials info. Args: info (dict): The service account private key info. args: Additional arguments to pass to the constructor. kwargs: Additional arguments to pass to the constructor. Returns: WebRiskServiceClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_info(info) kwargs["credentials"] = credentials return cls(*args, **kwargs) @classmethod def from_service_account_file(cls, filename: str, *args, **kwargs): """Creates an instance of this client using the provided credentials file. Args: filename (str): The path to the service account private key json file. args: Additional arguments to pass to the constructor. kwargs: Additional arguments to pass to the constructor. Returns: WebRiskServiceClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_file(filename) kwargs["credentials"] = credentials return cls(*args, **kwargs) from_service_account_json = from_service_account_file @property def transport(self) -> WebRiskServiceTransport: """Returns the transport used by the client instance. Returns: WebRiskServiceTransport: The transport used by the client instance. """ return self._transport @staticmethod def common_billing_account_path(billing_account: str,) -> str: """Returns a fully-qualified billing_account string.""" return "billingAccounts/{billing_account}".format( billing_account=billing_account, ) @staticmethod def parse_common_billing_account_path(path: str) -> Dict[str, str]: """Parse a billing_account path into its component segments.""" m = re.match(r"^billingAccounts/(?P<billing_account>.+?)$", path) return m.groupdict() if m else {} @staticmethod def common_folder_path(folder: str,) -> str: """Returns a fully-qualified folder string.""" return "folders/{folder}".format(folder=folder,) @staticmethod def parse_common_folder_path(path: str) -> Dict[str, str]: """Parse a folder path into its component segments.""" m = re.match(r"^folders/(?P<folder>.+?)$", path) return m.groupdict() if m else {} @staticmethod def common_organization_path(organization: str,) -> str: """Returns a fully-qualified organization string.""" return "organizations/{organization}".format(organization=organization,) @staticmethod def parse_common_organization_path(path: str) -> Dict[str, str]: """Parse a organization path into its component segments.""" m = re.match(r"^organizations/(?P<organization>.+?)$", path) return m.groupdict() if m else {} @staticmethod def common_project_path(project: str,) -> str: """Returns a fully-qualified project string.""" return "projects/{project}".format(project=project,) @staticmethod def parse_common_project_path(path: str) -> Dict[str, str]: """Parse a project path into its component segments.""" m = re.match(r"^projects/(?P<project>.+?)$", path) return m.groupdict() if m else {} @staticmethod def common_location_path(project: str, location: str,) -> str: """Returns a fully-qualified location string.""" return "projects/{project}/locations/{location}".format( project=project, location=location, ) @staticmethod def parse_common_location_path(path: str) -> Dict[str, str]: """Parse a location path into its component segments.""" m = re.match(r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)$", path) return m.groupdict() if m else {} def __init__( self, *, credentials: Optional[ga_credentials.Credentials] = None, transport: Union[str, WebRiskServiceTransport, None] = None, client_options: Optional[client_options_lib.ClientOptions] = None, client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, ) -> None: """Instantiates the web risk service client. Args: credentials (Optional[google.auth.credentials.Credentials]): The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. transport (Union[str, WebRiskServiceTransport]): The transport to use. If set to None, a transport is chosen automatically. client_options (google.api_core.client_options.ClientOptions): Custom options for the client. It won't take effect if a ``transport`` instance is provided. (1) The ``api_endpoint`` property can be used to override the default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT environment variable can also be used to override the endpoint: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto switch to the default mTLS endpoint if client certificate is present, this is the default value). However, the ``api_endpoint`` property takes precedence if provided. (2) If GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the ``client_cert_source`` property can be used to provide client certificate for mutual TLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. client_info (google.api_core.gapic_v1.client_info.ClientInfo): The client info used to send a user-agent string along with API requests. If ``None``, then default info will be used. Generally, you only need to set this if you're developing your own client library. Raises: google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport creation failed for any reason. """ if isinstance(client_options, dict): client_options = client_options_lib.from_dict(client_options) if client_options is None: client_options = client_options_lib.ClientOptions() # Create SSL credentials for mutual TLS if needed. use_client_cert = bool( util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false")) ) client_cert_source_func = None is_mtls = False if use_client_cert: if client_options.client_cert_source: is_mtls = True client_cert_source_func = client_options.client_cert_source else: is_mtls = mtls.has_default_client_cert_source() if is_mtls: client_cert_source_func = mtls.default_client_cert_source() else: client_cert_source_func = None # Figure out which api endpoint to use. if client_options.api_endpoint is not None: api_endpoint = client_options.api_endpoint else: use_mtls_env = os.getenv("GOOGLE_API_USE_MTLS_ENDPOINT", "auto") if use_mtls_env == "never": api_endpoint = self.DEFAULT_ENDPOINT elif use_mtls_env == "always": api_endpoint = self.DEFAULT_MTLS_ENDPOINT elif use_mtls_env == "auto": if is_mtls: api_endpoint = self.DEFAULT_MTLS_ENDPOINT else: api_endpoint = self.DEFAULT_ENDPOINT else: raise MutualTLSChannelError( "Unsupported GOOGLE_API_USE_MTLS_ENDPOINT value. Accepted " "values: never, auto, always" ) # Save or instantiate the transport. # Ordinarily, we provide the transport, but allowing a custom transport # instance provides an extensibility point for unusual situations. if isinstance(transport, WebRiskServiceTransport): # transport is a WebRiskServiceTransport instance. if credentials or client_options.credentials_file: raise ValueError( "When providing a transport instance, " "provide its credentials directly." ) if client_options.scopes: raise ValueError( "When providing a transport instance, provide its scopes " "directly." ) self._transport = transport else: Transport = type(self).get_transport_class(transport) self._transport = Transport( credentials=credentials, credentials_file=client_options.credentials_file, host=api_endpoint, scopes=client_options.scopes, client_cert_source_for_mtls=client_cert_source_func, quota_project_id=client_options.quota_project_id, client_info=client_info, always_use_jwt_access=True, ) def compute_threat_list_diff( self, request: Union[webrisk.ComputeThreatListDiffRequest, dict] = None, *, threat_type: webrisk.ThreatType = None, version_token: bytes = None, constraints: webrisk.ComputeThreatListDiffRequest.Constraints = None, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> webrisk.ComputeThreatListDiffResponse: r"""Gets the most recent threat list diffs. These diffs should be applied to a local database of hashes to keep it up-to-date. If the local database is empty or excessively out-of-date, a complete snapshot of the database will be returned. This Method only updates a single ThreatList at a time. To update multiple ThreatList databases, this method needs to be called once for each list. Args: request (Union[google.cloud.webrisk_v1.types.ComputeThreatListDiffRequest, dict]): The request object. Describes an API diff request. threat_type (google.cloud.webrisk_v1.types.ThreatType): Required. The threat list to update. Only a single ThreatType should be specified. This corresponds to the ``threat_type`` field on the ``request`` instance; if ``request`` is provided, this should not be set. version_token (bytes): The current version token of the client for the requested list (the client version that was received from the last successful diff). If the client does not have a version token (this is the first time calling ComputeThreatListDiff), this may be left empty and a full database snapshot will be returned. This corresponds to the ``version_token`` field on the ``request`` instance; if ``request`` is provided, this should not be set. constraints (google.cloud.webrisk_v1.types.ComputeThreatListDiffRequest.Constraints): Required. The constraints associated with this request. This corresponds to the ``constraints`` field on the ``request`` instance; if ``request`` is provided, this should not be set. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. Returns: google.cloud.webrisk_v1.types.ComputeThreatListDiffResponse: """ # Create or coerce a protobuf request object. # Sanity check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([threat_type, version_token, constraints]) if request is not None and has_flattened_params: raise ValueError( "If the `request` argument is set, then none of " "the individual field arguments should be set." ) # Minor optimization to avoid making a copy if the user passes # in a webrisk.ComputeThreatListDiffRequest. # There's no risk of modifying the input as we've already verified # there are no flattened fields. if not isinstance(request, webrisk.ComputeThreatListDiffRequest): request = webrisk.ComputeThreatListDiffRequest(request) # If we have keyword arguments corresponding to fields on the # request, apply these. if threat_type is not None: request.threat_type = threat_type if version_token is not None: request.version_token = version_token if constraints is not None: request.constraints = constraints # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.compute_threat_list_diff] # Send the request. response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) # Done; return the response. return response def search_uris( self, request: Union[webrisk.SearchUrisRequest, dict] = None, *, uri: str = None, threat_types: Sequence[webrisk.ThreatType] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> webrisk.SearchUrisResponse: r"""This method is used to check whether a URI is on a given threatList. Multiple threatLists may be searched in a single query. The response will list all requested threatLists the URI was found to match. If the URI is not found on any of the requested ThreatList an empty response will be returned. Args: request (Union[google.cloud.webrisk_v1.types.SearchUrisRequest, dict]): The request object. Request to check URI entries against threatLists. uri (str): Required. The URI to be checked for matches. This corresponds to the ``uri`` field on the ``request`` instance; if ``request`` is provided, this should not be set. threat_types (Sequence[google.cloud.webrisk_v1.types.ThreatType]): Required. The ThreatLists to search in. Multiple ThreatLists may be specified. This corresponds to the ``threat_types`` field on the ``request`` instance; if ``request`` is provided, this should not be set. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. Returns: google.cloud.webrisk_v1.types.SearchUrisResponse: """ # Create or coerce a protobuf request object. # Sanity check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([uri, threat_types]) if request is not None and has_flattened_params: raise ValueError( "If the `request` argument is set, then none of " "the individual field arguments should be set." ) # Minor optimization to avoid making a copy if the user passes # in a webrisk.SearchUrisRequest. # There's no risk of modifying the input as we've already verified # there are no flattened fields. if not isinstance(request, webrisk.SearchUrisRequest): request = webrisk.SearchUrisRequest(request) # If we have keyword arguments corresponding to fields on the # request, apply these. if uri is not None: request.uri = uri if threat_types is not None: request.threat_types = threat_types # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.search_uris] # Send the request. response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) # Done; return the response. return response def search_hashes( self, request: Union[webrisk.SearchHashesRequest, dict] = None, *, hash_prefix: bytes = None, threat_types: Sequence[webrisk.ThreatType] = None, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> webrisk.SearchHashesResponse: r"""Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is looked up in a threatList and there is a match. The client side threatList only holds partial hashes so the client must query this method to determine if there is a full hash match of a threat. Args: request (Union[google.cloud.webrisk_v1.types.SearchHashesRequest, dict]): The request object. Request to return full hashes matched by the provided hash prefixes. hash_prefix (bytes): A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. For JSON requests, this field is base64-encoded. This corresponds to the ``hash_prefix`` field on the ``request`` instance; if ``request`` is provided, this should not be set. threat_types (Sequence[google.cloud.webrisk_v1.types.ThreatType]): Required. The ThreatLists to search in. Multiple ThreatLists may be specified. This corresponds to the ``threat_types`` field on the ``request`` instance; if ``request`` is provided, this should not be set. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. Returns: google.cloud.webrisk_v1.types.SearchHashesResponse: """ # Create or coerce a protobuf request object. # Sanity check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([hash_prefix, threat_types]) if request is not None and has_flattened_params: raise ValueError( "If the `request` argument is set, then none of " "the individual field arguments should be set." ) # Minor optimization to avoid making a copy if the user passes # in a webrisk.SearchHashesRequest. # There's no risk of modifying the input as we've already verified # there are no flattened fields. if not isinstance(request, webrisk.SearchHashesRequest): request = webrisk.SearchHashesRequest(request) # If we have keyword arguments corresponding to fields on the # request, apply these. if hash_prefix is not None: request.hash_prefix = hash_prefix if threat_types is not None: request.threat_types = threat_types # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.search_hashes] # Send the request. response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) # Done; return the response. return response def create_submission( self, request: Union[webrisk.CreateSubmissionRequest, dict] = None, *, parent: str = None, submission: webrisk.Submission = None, retry: retries.Retry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> webrisk.Submission: r"""Creates a Submission of a URI suspected of containing phishing content to be reviewed. If the result verifies the existence of malicious phishing content, the site will be added to the `Google's Social Engineering lists <https://support.google.com/webmasters/answer/6350487/>`__ in order to protect users that could get exposed to this threat in the future. Only projects with CREATE_SUBMISSION_USERS visibility can use this method. Args: request (Union[google.cloud.webrisk_v1.types.CreateSubmissionRequest, dict]): The request object. Request to send a potentially phishy URI to WebRisk. parent (str): Required. The name of the project that is making the submission. This string is in the format "projects/{project_number}". This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this should not be set. submission (google.cloud.webrisk_v1.types.Submission): Required. The submission that contains the content of the phishing report. This corresponds to the ``submission`` field on the ``request`` instance; if ``request`` is provided, this should not be set. retry (google.api_core.retry.Retry): Designation of what errors, if any, should be retried. timeout (float): The timeout for this request. metadata (Sequence[Tuple[str, str]]): Strings which should be sent along with the request as metadata. Returns: google.cloud.webrisk_v1.types.Submission: Wraps a URI that might be displaying phishing content. """ # Create or coerce a protobuf request object. # Sanity check: If we got a request object, we should *not* have # gotten any keyword arguments that map to the request. has_flattened_params = any([parent, submission]) if request is not None and has_flattened_params: raise ValueError( "If the `request` argument is set, then none of " "the individual field arguments should be set." ) # Minor optimization to avoid making a copy if the user passes # in a webrisk.CreateSubmissionRequest. # There's no risk of modifying the input as we've already verified # there are no flattened fields. if not isinstance(request, webrisk.CreateSubmissionRequest): request = webrisk.CreateSubmissionRequest(request) # If we have keyword arguments corresponding to fields on the # request, apply these. if parent is not None: request.parent = parent if submission is not None: request.submission = submission # Wrap the RPC method; this adds retry and timeout information, # and friendly error handling. rpc = self._transport._wrapped_methods[self._transport.create_submission] # Certain fields should be provided within the metadata header; # add these here. metadata = tuple(metadata) + ( gapic_v1.routing_header.to_grpc_metadata((("parent", request.parent),)), ) # Send the request. response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,) # Done; return the response. return response def __enter__(self): return self def __exit__(self, type, value, traceback): """Releases underlying transport's resources. .. warning:: ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients! """ self.transport.close() try: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( gapic_version=pkg_resources.get_distribution("google-cloud-webrisk",).version, ) except pkg_resources.DistributionNotFound: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() __all__ = ("WebRiskServiceClient",)
py
7dfa4f10c8fc4fc5ca3b4b8567dbbb462df736e1
""" Defines class Connections that holds data from one or more observations (experiments) divided (classified) in groups. The observations are expected to be generated by scripts celft.py, connectors.py, connections.py (depreciated) or classify_connections.py (depreciated). # Author: Vladan Lucic (Max Planck Institute for Biochemistry) # $Id$ """ from __future__ import unicode_literals from __future__ import absolute_import from builtins import zip from builtins import str from builtins import range __version__ = "$Revision$" import warnings import logging from copy import copy, deepcopy import numpy import scipy import pyto from ..util import nested from .observations import Observations from .groups import Groups class Connections(Groups): """ Modes: - 'connectors': Tethers and connectors of the presynaptic terminal - 'cleft': Cleft segments - 'sv_old': Depreciated version of the presynaptic terminal segmentation Attributes set for each group (instance of Observations) belonging to this instance for mode 'connectors': - ids - thresh - surface - volume - length - distance - boundaryDistance - boundaries """ ############################################################### # # Initialization # ############################################################## def __init__(self, mode=None, single=False): """ Initializes attributes. If mode is 'connectors', it is expected tha the data pickles are instances of ..scene.SegmentationAnalysis, that the data describe connectors such as those in the presynaptic terminal, and and that the data was generated by ..scripts.connectors. If mode is 'cleft', it is expected tha the data pickles are instances of ..scene.SegmentationAnalysis, that the data describe segments of the synaptic cleft, and and that the data was generated by ..scripts.cleft. If mode is None or 'sv_old', it is expected that the data pickles are instances of ..segmentation.Segment, that the data describe connectors (connections) or tethers of the presynaptic terminal, and that the data was generated by ..scripts.classify_connections. This mode is depreciated. """ # initialize super super(Connections, self).__init__() # set mode self._mode = mode # determines the conversion of property names self._deep = 'last' if (mode is None) or (mode == 'sv_old'): # old way, don't do anything else self._mode = 'sv_old' elif mode == 'connectors': # connectors, make property definitions to be used in read() self._full_properties = { 'ids' : 'ids', 'morphology.surface' : 'surface', 'morphology.volume' : 'volume', 'morphology.length' : 'length', 'boundDistance.distance' : 'boundaryDistance', 'distance.distance' : 'distance'} self._full_indexed = [ 'ids', 'morphology.surface', 'morphology.volume', 'morphology.length', 'boundDistance.distance', 'distance.distance'] self._indexed = [self._full_properties[full_indexed] for full_indexed in self._full_indexed] # adjust for hierarchy and single threshold if not single: self._full_properties['labels.thresh'] = 'thresh' self._full_properties['thresholds'] = 'thresholds' self._full_indexed.append('labels.thresh') else: self._full_properties['labels.threshold'] = 'thresh' self._full_indexed.append('labels.threshold') self._properties = set(self._full_properties.values()) self._properties.add('boundaries') self._indexed.append('thresh') elif mode == 'cleft': # cleft, make property definitions to be used in read() self._full_properties = { 'ids' : 'ids', 'density.mean' : 'mean', 'density.std' : 'std', 'density.min' : 'min', 'density.max' : 'max', 'morphology.surface' : 'surface', 'morphology.volume' : 'volume', 'morphology.length' : 'length', 'topology.euler' : 'euler', 'topology.nLoops' : 'nLoops', 'nSegments' : 'nSegments', 'nContacts' : 'nContacts', 'surfaceDensityContacts' : 'surfaceDensityContacts', 'surfaceDensitySegments' : 'surfaceDensitySegments'} self._full_indexed = set( ['ids', 'density.mean', 'density.std', 'density.min', 'density.max', 'morphology.surface', 'morphology.volume', 'morphology.length', 'topology.euler', 'topology.nLoops']) self._indexed = set( [pyto.util.attributes.get_deep_name(attr, mode=self._deep) for attr in self._full_indexed]) # adjust for hierarchy and single threshold if not single: self._full_properties['labels.thresh'] = 'thresh' self._full_properties['thresholds'] = 'thresholds' self._full_indexed = self._full_indexed.union( set(['labels.thresh'])) else: self._full_properties['labels.threshold'] = 'thresh' self._full_indexed = self._full_indexed.union( set(['labels.threshold'])) self._properties = set(self._full_properties.values()) #[pyto.util.attributes.get_deep_name(attr, mode=self._deep) # for attr in self._full_properties]) self._indexed = self._indexed.union(set(['thresh'])) else: raise ValueError("Mode ", mode, " is not understood. Acceptable ", "values are None, 'connectors', 'cleft', ", "and 'sv_old (depreciated)'.") ############################################################### # # Input # ############################################################## @classmethod def read(cls, files, mode=None, single=False, categories=None, order=None, catalog=None, pixel=None): """ Reads values from one or more connection pickles, each pickel corresponding to one experiment. Returns an instance of this class that contains data from the pickles read. Exact behavior depends on arg mode, which specifies the type of the connection pickles, as follows. For analysis of pickle files generated by connectors script (typically used for connectors and tethers of the presynaptic terminal generated from 01.2013) use mode connectors and check _readConnectors() docstring for more info. For analysis of pickle files generated by connections and classify_connections scripts (typically used for connections (connectors) and tethers of the presynaptic terminal generated before 12.2012) use mode 'sv_old' and check _readSVOld docstring for further info. For analysis of pickle files generated by cleft script (typically used for connectors of the synaptic cleft) use mode 'cleft' and check _readCleft() docstring foir further info. Argument files has to be a dictionary of dictionaries, where ouside keys are group names, inside keys experiment identifiers and inside values file names. For example: files = {'group_a' : {'exp_1' : file_1, 'exp_2' : file_2, ... }, 'group_b' : {'exp_5' : file_5, ... }, ... } Argument catalog has to be a Catalog object where the groups are already formed (by using Catalog.makeGroups(), for example). That is, catalog has to contain the data in attributes that are themselves of type dict. For example: catalog.pixel_size = {'group_a' : {'exp_1' : pix_size_1, 'exp_2' : pix_size_2, ... }, 'group_b' : {'exp_5' : pix_size_5, ... }, ... } Args files and catalog have to have the same groups and observations. Arguments: - files: dictionary of cleft layers result pickle files - mode: type of pickles, currently "connectors", "cleft" or "sv_old" - single: Flag indicating if reading single threshold segmentation (True) or hierarchical (False) - categories: list of categories - order: (dictionary of Observations objects) data structure that defines the order of the observations (within each group) in this instance - catalog: (Catalog) data about experiments, needed for modes 'connectors' and 'cleft' - pixel: dictionary of pixel sizes, needed for mode 'sv_old' Returns instance of this class. """ if (mode is None) or (mode == 'sv_old'): conn = cls._readSVOld(files=files, pixel=pixel, categories=categories, order=order) elif mode == 'cleft': conn = cls._readCleft(files=files, catalog=catalog, single=single, categories=categories, order=order) elif mode == 'connectors': conn = cls(mode=mode, single=single) conn._readConnectors( files=files, catalog=catalog, categories=categories, order=order) else: raise ValueError("Mode ", mode, " is not understood. Acceptable ", "values are None, 'connectors', 'cleft', ", "and 'sv_old (depreciated)'.") return conn @classmethod def _readSVOld(cls, files, pixel, mode=None, categories=None, order=None): """ Reads values form connection pickles. If ids for an observation is None, all indexed properties (specified in self._indexed) for that observation are set to empty arrays. Arguments: - files: dictionary of connection result pickle files - pixel: dictionary of pixel sizes - categories: list of categories - order: another (dictionary of Observations objects) data structure used to define the order of the identifiers here """ # initialize db = pyto.io.Pickled(files) conn = cls(mode='sv_old') # use all categories if not specified if categories is None: categories = list(db.categories()) # loop over categories for categ in categories: # make sure the identifier order is the same if order is not None: identifier = order[categ].identifiers else: identifier = None # get data conn[categ] = db.readProperties( category=categ, identifier=identifier, deep=conn._deep, properties=['ids','morphology.length', 'thresh', 'boundaries', 'boundaryDistance', 'distanceToRegion']) conn[categ].distance = conn[categ].distanceToRegion # set array properties to empty arrays for observations without ids for obs_index in range(len(conn[categ].identifiers)): if conn[categ].ids[obs_index] is None: conn[categ].ids[obs_index] = numpy.array([]) conn[categ].length[obs_index] = numpy.array([]) conn[categ].thresh[obs_index] = numpy.array([]) conn[categ].boundaryDistance[obs_index] = numpy.array([]) conn[categ].boundaries[obs_index] = numpy.array([]) conn[categ].distance[obs_index] = numpy.array([]) logging.warning(\ "Observation " \ + str(conn[categ].identifiers[obs_index])\ + " of category " + categ + " has no data.") # convert length to nm conn[categ].length_nm = \ conn[categ].pixels2nm(name='length', conversion=pixel[categ]) conn[categ].distance_nm = \ conn[categ].pixels2nm(name='distance', conversion=pixel[categ]) # set book-keeping attributes conn[categ].index = 'ids' conn[categ].indexed = set(['ids', 'length', 'length_nm', 'thresh', 'boundaries']) conn[categ].properties = set(['identifiers', 'categories', 'ids', 'length', 'length_nm', 'thresh', 'boundaries']) # convert distance to nm try: conn[categ].distance_nm = \ conn[categ].pixels2nm(name='distance', conversion=pixel[categ]) conn[categ].indexed.add('distance') conn[categ].indexed.add('distance_nm') conn[categ].properties.add('distance') conn[categ].properties.add('distance_nm') except TypeError: if (conn[categ].distance is None) \ or any(bd is None for bd \ in conn[categ].distance): pass else: raise # convert boundaryDistance to nm try: conn[categ].boundaryDistance_nm = \ conn[categ].pixels2nm(name='boundaryDistance', conversion=pixel[categ]) conn[categ].indexed.add('boundaryDistance') conn[categ].indexed.add('boundaryDistance_nm') conn[categ].properties.add('boundaryDistance') conn[categ].properties.add('boundaryDistance_nm') except TypeError: if (conn[categ].boundaryDistance is None) \ or any(bd is None for bd \ in conn[categ].boundaryDistance): pass else: raise return conn @classmethod def _readCleft(cls, files, catalog, categories=None, order=None, single=False): """ Reads ..scene.SegmentationAnalysis pickles specified by arg files and puts then in a new instance of this class. Each pickle contains data from a single experiment. The properties read are specified by attribute self._full_properties. In addition, reads other data corresponding to the experiments from arg catalog and puts them together with the data from pickles. The only obligatory property is 'pixel_size'. If ids for an observation is None, all indexed properties (specified in self._indexed) for that observation are set to empty arrays. A category specified by arg categories, or an experiment identifier specified by arg order that does not exist in the data (arg files) is ignored and a warning is generated. This condition often generates an exception at a later point. Arguments: - files: dictionary of cleft segmentation result pickle files - catalog: (Catalog) data about experiments - categories: list of categories - order: another Groups instance (or just a dictionary with group names as keys and identifier lists as values), used only to define the order of identifiers in this instance - single: Flag indicating if reading single threshold segmentation (True) or hierarchical (False) Sets properties: - ids: connection ids - thresh: (indexed) threshold - mean, std, min, max: (indexed) grey-scale density - surface, volume, surfaceToVolume: (indexed) - euler, nLoops: (indexed) topological properties - nSegments: number of connections - surfaceToVolume: (indexed) surface to volume ratio - surfaceDensity: average (from both cleft boundaries) surface density of connections [1/pix^2] - nContacts_1, nContacts_2: (indexed) number of contacts each connection has with cleft boundary 1 and 2 respectivly - surfaceDensityContacts_1/2: surface density of contacts on cleft boundaries 1 and 2 respectivly [1/pix^2] - thresholds: list of all thresholds """ # initialize db = pyto.io.Pickled(files) inst = cls(mode='cleft', single=single) # use all categories if not specified if categories is None: categories = list(db.categories()) # loop over categories props_found = {} for categ in categories: # check if data for the current category exist logging.debug('Connections: Reading group ' + categ) if categ not in list(db.categories()): logging.warning( 'Connections: Data for group ' + categ + ' do not exist') # make sure the identifier order is the same if order is not None: if isinstance(order[categ], Observations): identifier = order[categ].identifiers elif isinstance(order[categ], (list, tuple)): identifier = order[categ] else: identifier = None # check if requested identifiers exist in the database if identifier is not None: clean = [] for requested in identifier: if requested in db.identifiers(): clean.append(requested) else: logging.warning( 'Connections: Data for experiment ' + requested + ' do not exist') identifier = clean # get data from all experiments of this category group = Observations() for group, obj, categ_tmp, name_tmp in db.readPropertiesGen( category=categ, identifier=identifier, properties=inst._full_properties, deep=inst._deep, index='ids', indexed=inst._full_indexed, multi=group): logging.debug('Read data of experiment ' + name_tmp) # do something, perhaps pass # add data for this category inst[categ] = group # set array properties to empty arrays for observations without ids for obs_index in range(len(inst[categ].identifiers)): if inst[categ].ids[obs_index] is None: for name in inst._indexed: value = getattr(inst[categ], name) value[obs_index] = numpy.array([]) # figure out if some properties were not found found = set() for name in inst._properties: value = getattr(group, name, None) if value is None: continue if all([x is None for x in value]): continue found.add(name) # set book-keeping attributes inst[categ].index = 'ids' inst[categ].indexed = inst._indexed.intersection(found) inst[categ].properties = inst._properties.intersection(found) # add properties from catalog inst[categ].addCatalog(catalog=catalog) # calculate additional data properties inst.calculateProperties() # convert to nm inst.convertToNm(catalog=catalog) # check if all groups have the same properties last = None for categ in categories: if last is not None: if inst[categ].properties != last: raise ValueError("Groups have different properties") last = inst[categ].properties inst._indexed.intersection_update(last) inst._properties.intersection_update(last) return inst def _readConnectors(self, files, catalog, categories=None, order=None): """ Reads values from one or more connection pickles, each pickel corresponding to one experiment. Returns an instance of this class that contains data from the pickles read. For analysis of pickle files generated by connectors script. These are typically used for connectors and tethers of the presynaptic terminal generated from 01.2013. A category specified by arg categories, or an experiment identifier specified by arg order that does not exist in the data (arg files) is ignored and a warning is generated. This condition often generates an exception at a later point. Arguments: - files: dictionary of connectors pickle files - catalog: (Catalog) data about experiments - categories: list of categories - order: another Groups instance (or just a dictionary with group names as keys and identifier lists as values) that defines the order of the observations (within each group) in this instance Sets properties: - ids: connection ids - thresh: (indexed) threshold - surface, volume, surface_nm, volume_nm: (indexed) in pixels and nm - length, length_nm: (indexed) connection length in pixels and nm - boundaryDistance: (indexed) distance between boundaries - distance: (indexed) distance to a specified region ... - thresholds: list of all thresholds """ # initialize db = pyto.io.Pickled(files) # use all categories if not specified if categories is None: categories = list(db.categories()) # loop over categories props_found = {} for categ in categories: # check if data for the current category exist logging.debug('Connections: Reading group ' + categ) if categ not in list(db.categories()): logging.warning( 'Connections: Data for group ' + categ + ' do not exist') # make sure the identifier order is the same if order is not None: if isinstance(order[categ], Observations): identifier = order[categ].identifiers elif isinstance(order[categ], (list, tuple)): identifier = order[categ] else: identifier = None # check if requested identifiers exist in the database if identifier is not None: clean = [] for requested in identifier: if requested in db.identifiers(): clean.append(requested) else: logging.warning( 'Connections: Data for experiment ' + requested + ' do not exist') identifier = clean # get data from all experiments of this category group = Observations() for group, obj, categ_tmp, current_identif in db.readPropertiesGen( category=categ, identifier=identifier, properties=self._full_properties, deep=self._deep, index='ids', indexed=self._full_indexed, multi=group): logging.debug('Read data of experiment ' + current_identif) # calculate additional properties for the current observation self.extractProperties(group=group, obj=obj, category=categ_tmp, identifier=current_identif) # add data for this category self[categ] = group # set array properties to empty arrays for observations without ids for obs_index in range(len(self[categ].identifiers)): if self[categ].ids[obs_index] is None: for name in self._indexed: value = getattr(self[categ], name) value[obs_index] = numpy.array([]) # figure out if some properties were not found found = set() for name in self._properties: value = getattr(group, name, None) if value is None: continue if all([x is None for x in value]): continue found.add(name) # set book-keeping attributes self[categ].index = 'ids' self[categ].indexed.update(set(self._indexed).intersection(found)) self[categ].properties.update( set(self._properties).intersection(found)) if len(set(self._indexed) - found) > 0: logging.warning("Properties " + str(set(self._indexed) - found) + " not found.") # add properties from catalog self[categ].addCatalog(catalog=catalog) # calculate additional data properties self.calculateProperties() # convert to nm self.convertToNm(catalog=catalog) # check if all groups have the same properties last = None for categ in categories: if last is not None: if self[categ].properties != last: raise ValueError("Groups have different properties") last = self[categ].properties #self._indexed.intersection_update(last) #self._properties.intersection_update(last) ############################################################### # # Data modifying methods # ############################################################## def extractProperties(self, group, obj, category, identifier): """ Calculates additional properties for one experiment directly from pickle files. The calculated properties are added to the already existing group (arg group). Properties calculated depend on the mode. See extractPropertiesCleft() and extractPropertiesConnectors() for details. Can be used for modes 'cleft' and 'connectors' only. """ if self._mode == 'cleft': self.extractPropertiesCleft( group=group, obj=obj, category=category, identifier=identifier) elif self._mode == 'connectors': self.extractPropertiesConnectors( group=group, obj=obj, category=category, identifier=identifier) def extractPropertiesConnectors(self, group, obj, category, identifier): """ Calculated properties: - boundaries: boundary ids (list of length 2 for each segment) """ # boundaries if obj.labels.contacts.compactified: obj.labels.contacts.expand() bounds = [obj.labels.contacts.findBoundaries(segmentIds=id_, nSegment=1) for id_ in obj.labels.ids] bounds = numpy.asarray(bounds) group.setValue(property='boundaries', identifier=identifier, value=bounds, indexed=True) def extractPropertiesCleft(self, group, obj, category, identifier): """ Currently nothing calculated """ pass def convertToNm(self, catalog, categories=None): """ Converts certain properties from pixels to nm. The new values are assigned to (new) properties named by adding '_nm' to the corresponding original property name. Properties set depend on the mode. See convertToNmCleft() and convertToNmConnectors() for details. Can be used for modes 'cleft' and 'connectors' only. Arguments: - catalog: (Catalog) has to contain attribute pixel_size - categories: list of categories """ if self._mode == 'cleft': self.convertToNmCleft(catalog=catalog, categories=categories) elif self._mode == 'connectors': self.convertToNmConnectors(catalog=catalog, categories=categories) def convertToNmCleft(self, catalog, categories=None): """ Converts certain properties from pixels to nm for mode 'cleft'. The new values are assigned to (new) properties named by adding '_nm' to the corresponding original property name. Currently converted properties are: length, surface, volume, surfaceDensity, surfaceDensityContacts_1 and _2. """ if categories is None: categories = list(self.keys()) for categ in categories: pixel = catalog.pixel_size # convert self[categ].length_nm = self[categ].pixels2nm( name='length', conversion=pixel[categ]) self[categ].surface_nm = self[categ].pixels2nm( name='surface', power=2, conversion=pixel[categ]) self[categ].volume_nm = self[categ].pixels2nm( name='volume', power=3, conversion=pixel[categ]) # book keeping self[categ].properties.update(['length_nm', 'surface_nm', 'volume_nm']) self[categ].indexed.update(['length_nm']) # surface densities for name in ['surfaceDensity', 'surfaceDensityContacts_1', 'surfaceDensityContacts_2']: if name in self[categ].properties: nm_value = self[categ].pixels2nm(name=name, power=-2, conversion=pixel[categ]) nm_name = name + '_nm' setattr(self[categ], nm_name, nm_value) self[categ].properties.add(nm_name) if name in self[categ].indexed: self[categ].indexed.add(nm_name) def convertToNmConnectors(self, catalog, categories=None): """ Converts certain properties from pixels to nm for mode 'connectors'. The new values are assigned to (new) properties named by adding '_nm' to the corresponding original property name. Currently converted properties are: length, distance and boundaryDistance. """ if categories is None: categories = list(self.keys()) for categ in categories: pixel = catalog.pixel_size # convert length try: self[categ].length_nm = self[categ].pixels2nm( name='length', conversion=pixel[categ]) self[categ].properties.update(['length_nm']) self[categ].indexed.update(['length_nm']) except TypeError: if ((self[categ].length is None) or any(value is None for value in self[categ].length)): pass else: raise # convert distance try: self[categ].distance_nm = self[categ].pixels2nm( name='distance', conversion=pixel[categ]) self[categ].properties.update(['distance_nm']) self[categ].indexed.update(['distance_nm']) except TypeError: if ((self[categ].distance is None) or any(value is None for value in self[categ].distance)): pass else: raise # convert boundaryDistance try: self[categ].boundaryDistance_nm = self[categ].pixels2nm( name='boundaryDistance', conversion=pixel[categ]) self[categ].properties.update(['boundaryDistance_nm']) self[categ].indexed.update(['boundaryDistance_nm']) except TypeError: if ((self[categ].boundaryDistance is None) or any(value is None for value in self[categ].boundaryDistance)): pass else: raise def calculateProperties(self, categories=None): """ Calculates additonal properties from the already existing properties. Properties set depend on the mode. See calculatePropertiesCleft() and calculatePropertiesConnectors() for details. Can be used for modes 'cleft' and 'connectors' only. Arguments: - categories: list of categories """ if self._mode == 'cleft': self.calculatePropertiesCleft(categories=categories) elif self._mode == 'connectors': self.calculatePropertiesConnectors(categories=categories) def calculatePropertiesCleft(self, categories=None): """ Calculates additonal properties. Sets following new properties to each group (Observations instance) contained in this object: - surfaceToVolume: (indexed) surface to volume ratio - surfaceDensity: average (from both cleft boundaries) surface density of connections [1/pix^2] - nContacts_1, nContacts_2: (indexed) number of contacts each connection has with cleft boundary 1 and 2 respectivly - surfaceDensityContacts_1/2: surface density of contacts on cleft boundaries 1 and 2 respectivly [1/pix^2] Argument: - categories: list of group names, in None all groups are used """ if categories is None: categories = list(self.keys()) # surface to ratio self.apply(funct=numpy.divide, args=['surface', 'volume'], name='surfaceToVolume') for categ in categories: self[categ].properties.add('surfaceToVolume') self[categ].indexed.add('surfaceToVolume') # segments and contacts for categ in categories: for ident in self[categ].identifiers: # connection surface density value = self[categ].getValue(identifier=ident, property='surfaceDensitySegments') self[categ].setValue(identifier=ident, property='surfaceDensity', value=value[0]) # contacts ids = self[categ].getValue(identifier=ident, property='ids') n_con = self[categ].getValue(identifier=ident, property='nContacts') self[categ].setValue(identifier=ident, property='nContacts_1', value=n_con[1,ids], indexed=True) self[categ].setValue(identifier=ident, property='nContacts_2', value=n_con[2,ids], indexed=True) con_dens = self[categ].getValue( identifier=ident, property='surfaceDensityContacts') self[categ].setValue( identifier=ident, property='surfaceDensityContacts_1', value=con_dens[1]) self[categ].setValue( identifier=ident, property='surfaceDensityContacts_2', value=con_dens[2]) def calculatePropertiesConnectors(self, categories=None): """ Calculates additonal properties. Nothing calculed in the moment """ pass def removeNoBoundaries(self): """ Removes elements of observations that do not contact any boundary. Elements (segments) without boundaries can arise from changing (removing) some of the boundary_ids between two consecutive runs of classify_connection series. """ # select elements with boundaries cond = {} for categ in self: cond[categ] = [] for obs_index in range(len(self[categ].identifiers)): local_cond = [] for bound in self[categ].boundaries[obs_index]: if (bound is None) or (len(bound) == 0): local_cond.append(False) else: local_cond.append(True) cond[categ].append(local_cond) # extract selected elements good = self.extract(condition=cond) return good def removeBoundaries(self, boundary, name='ids'): """ Removes connections that contact specified boundaries. All elements (of all indexed properties of all observations contained in this instance) that correspond to elements of property 'boundaries' (of this instance) that contain at least one of the boundary ids specified in arg boundary are removed. Arguments: - boundary: (Groups) have to have the same structure (categories and observations) as this instance - name: name of the property from boundary that contains ids (ids has to be an indexed property) """ # remove boundary ids for categ in list(boundary.keys()): # get boundary ids for all observations in this category b_ids = getattr(boundary[categ], name) # find good observation elements keep = [] for obs_ind in range(len(b_ids)): # find observation elements that contain specified boundaries bad = [numpy.intersect1d(id_pair, b_ids[obs_ind]).any() for id_pair in self[categ].boundaries[obs_ind]] # use observation elements that do not contain specified # boundaries keep.append(numpy.logical_not(numpy.asarray(bad))) # extract good elements self[categ] = self[categ].extractIndexed(condition=keep) ############################################################### # # Extraction methods # ############################################################## def extractByVesicles(self, vesicles, categories=None, other=True): """ Extract and returns an instance of this class that contains only those connections that contact vesicles present in arg vesicles. If other is True, an instance of this class containing connections that are not extracted is also returned. Arguments: - vesicles: (Vesicles) vesicles object - categories: list of group names, None for all groups - other: flag indicating if (in addition to extracted) the remaining non-extracted vesicles are returned """ # get categories if categories is None: categories = list(self.keys()) ves_conn = self.__class__() ves_non_conn = self.__class__() for categ in categories: contact = [] non_contact = [] for obs_b_ids, ves_ids in zip( self[categ].boundaries, vesicles[categ].ids): # find ids of contacted vesicles for each connection contacted_ves = [numpy.intersect1d(b_ids, ves_ids) for b_ids in obs_b_ids] # find out which connections contact svs cont = [len(one_conn_ves) > 0 for one_conn_ves in contacted_ves] contact.append(cont) # find ids of non-contacted vesicles for each connection non_contacted_ves = [numpy.setdiff1d(ves_ids, b_ids) for b_ids in obs_b_ids] # find out which connections contact svs non_cont = [len(one_conn_ves) > 0 for one_conn_ves in non_contacted_ves] non_contact.append(non_cont) # extract vesicles ves_conn[categ] = self[categ].extract(condition=contact) if other: ves_non_conn[categ] = self[categ].extract(condition=non_contact) # return if other: return ves_conn, ves_non_conn else: return ves_conn def splitByDistance(self, distance, name='distance_nm', categories=None): """ Returns a list of instances of this class, where each object contains data for connections whose distances (attribute specified by name) fall into bins specified by arg distances. Lower distance bin limits are inclusive, while the upper are exclusive, except for the upper limit of the last distance bin which is inclusive (like numpy.histogram) If distance is a single number a single object is returned. Otherwise, if distance is a list of numbers, a list of objects is returned. Arguments: - distance: list of distances, interpreted as distance bins, or if a single number it is a higher distance limit, while 0 is the lower - name: name of the distance attribute - categories: """ return self.split(value=distance, name=name, categories=categories)
py
7dfa4f4e38598410a7d2776cf683bdf840f3b9e3
_base_="../byol-base-resisc-config.py" # this will merge with the parent model=dict(pretrained='data/basetrain_chkpts/byol_r50_bs2048_accmulate2_ep200.pth') # epoch related total_iters=50*2 checkpoint_config = dict(interval=total_iters)
py
7dfa4fbbb9bdda5027a4dc6662e7a26d437a43ca
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Region' db.create_table(u'dictionary_region', ( (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), ('gloss', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dictionary.Gloss'])), ('dialect', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['dictionary.Dialect'])), ('frequency', self.gf('django.db.models.fields.IntegerField')()), ('traditional', self.gf('django.db.models.fields.BooleanField')(default=False)), )) db.send_create_signal(u'dictionary', ['Region']) def backwards(self, orm): # Deleting model 'Region' db.delete_table(u'dictionary_region') models = { u'dictionary.definition': { 'Meta': {'ordering': "['gloss', 'role', 'count']", 'object_name': 'Definition'}, 'count': ('django.db.models.fields.IntegerField', [], {}), 'gloss': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Gloss']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'published': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'role': ('django.db.models.fields.CharField', [], {'max_length': '20'}), 'text': ('django.db.models.fields.TextField', [], {}) }, u'dictionary.dialect': { 'Meta': {'ordering': "['language', 'name']", 'object_name': 'Dialect'}, 'description': ('django.db.models.fields.TextField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'language': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Language']"}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '20'}) }, u'dictionary.gloss': { 'Meta': {'ordering': "['idgloss']", 'object_name': 'Gloss'}, 'StemSN': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'annotation_idgloss': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'aslgloss': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'asloantf': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), 'asltf': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), 'blend': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'blendtf': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), 'bslgloss': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'bslloantf': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), 'bsltf': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), 'compound': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), 'comptf': ('django.db.models.fields.NullBooleanField', [], {'null': 'True', 'blank': 'True'}), 'dialect': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Dialect']", 'symmetrical': 'False'}), 'domhndsh': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}), 'final_domhndsh': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}), 'final_loc': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'final_palm_orientation': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), 'final_relative_orientation': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), 'final_secondary_loc': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), 'final_subhndsh': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'idgloss': ('django.db.models.fields.CharField', [], {'max_length': '50'}), 'inWeb': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), 'initial_palm_orientation': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), 'initial_relative_orientation': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), 'initial_secondary_loc': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}), 'inittext': ('django.db.models.fields.CharField', [], {'max_length': "'50'", 'blank': 'True'}), 'isNew': ('django.db.models.fields.NullBooleanField', [], {'default': 'False', 'null': 'True', 'blank': 'True'}), 'language': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['dictionary.Language']", 'symmetrical': 'False'}), 'locprim': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'locsecond': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'morph': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}), 'sedefinetf': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'segloss': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}), 'sense': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), 'sn': ('django.db.models.fields.IntegerField', [], {'unique': 'True', 'null': 'True', 'blank': 'True'}), 'subhndsh': ('django.db.models.fields.CharField', [], {'max_length': '5', 'null': 'True', 'blank': 'True'}) }, u'dictionary.keyword': { 'Meta': {'ordering': "['text']", 'object_name': 'Keyword'}, u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'text': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}) }, u'dictionary.language': { 'Meta': {'ordering': "['name']", 'object_name': 'Language'}, 'description': ('django.db.models.fields.TextField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '20'}) }, u'dictionary.region': { 'Meta': {'ordering': "['gloss', 'dialect', 'frequency', 'traditional']", 'object_name': 'Region'}, 'dialect': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Dialect']"}), 'frequency': ('django.db.models.fields.IntegerField', [], {}), 'gloss': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Gloss']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'traditional': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'dictionary.relation': { 'Meta': {'ordering': "['source']", 'object_name': 'Relation'}, u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'role': ('django.db.models.fields.CharField', [], {'max_length': '20'}), 'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'relation_sources'", 'to': u"orm['dictionary.Gloss']"}), 'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'relation_targets'", 'to': u"orm['dictionary.Gloss']"}) }, u'dictionary.translation': { 'Meta': {'ordering': "['gloss', 'index']", 'object_name': 'Translation'}, 'gloss': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Gloss']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'index': ('django.db.models.fields.IntegerField', [], {}), 'translation': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['dictionary.Keyword']"}) } } complete_apps = ['dictionary']
py
7dfa52fba84e761965fb0c479ec1e479af9ea2d3
import datetime import json import re from django.db import transaction from sql.engines.models import ReviewResult from sql.models import SqlWorkflow from common.config import SysConfig from sql.utils.resource_group import user_groups from sql.utils.sql_utils import remove_comments def is_auto_review(workflow_id): """ 判断SQL上线是否无需审批,无需审批的提交会自动审核通过 :param workflow_id: :return: """ workflow = SqlWorkflow.objects.get(id=workflow_id) auto_review_tags = SysConfig().get('auto_review_tag', '').split(',') auto_review_db_type = SysConfig().get('auto_review_db_type', '').split(',') # TODO 这里也可以放到engine中实现,但是配置项可能会相对复杂 if workflow.instance.db_type in auto_review_db_type and workflow.instance.instance_tag.filter( tag_code__in=auto_review_tags).exists(): # 获取正则表达式 auto_review_regex = SysConfig().get( 'auto_review_regex', '^alter|^create|^drop|^truncate|^rename|^delete') p = re.compile(auto_review_regex, re.I) # 判断是否匹配到需要手动审核的语句 auto_review = True all_affected_rows = 0 review_content = workflow.sqlworkflowcontent.review_content for review_row in json.loads(review_content): review_result = ReviewResult(**review_row) # 去除SQL注释 https://github.com/hhyo/Archery/issues/949 sql = remove_comments(review_result.sql) # 正则匹配 if p.match(sql): auto_review = False break # 影响行数加测, 总语句影响行数超过指定数量则需要人工审核 all_affected_rows += int(review_result.affected_rows) if all_affected_rows > int(SysConfig().get('auto_review_max_update_rows', 50)): auto_review = False else: auto_review = False return auto_review def can_execute(user, workflow_id): """ 判断用户当前是否可执行,两种情况下用户有执行权限 1.登录用户有资源组粒度执行权限,并且为组内用户 2.当前登录用户为提交人,并且有执行权限 :param user: :param workflow_id: :return: """ result = False # 保证工单当前是可执行状态 with transaction.atomic(): workflow_detail = SqlWorkflow.objects.select_for_update().get(id=workflow_id) # 只有审核通过和定时执行的数据才可以立即执行 if workflow_detail.status not in ['workflow_review_pass', 'workflow_timingtask']: return False # 当前登录用户有资源组粒度执行权限,并且为组内用户 group_ids = [group.group_id for group in user_groups(user)] if workflow_detail.group_id in group_ids and user.has_perm('sql.sql_execute_for_resource_group'): result = True # 当前登录用户为提交人,并且有执行权限 if workflow_detail.engineer == user.username and user.has_perm('sql.sql_execute'): result = True return result def on_correct_time_period(workflow_id, run_date=None): """ 判断是否在可执行时间段内,包括人工执行和定时执行 :param workflow_id: :param run_date: :return: """ workflow_detail = SqlWorkflow.objects.get(id=workflow_id) result = True ctime = run_date or datetime.datetime.now() stime = workflow_detail.run_date_start etime = workflow_detail.run_date_end if (stime and stime > ctime) or (etime and etime < ctime): result = False return result def can_timingtask(user, workflow_id): """ 判断用户当前是否可定时执行,两种情况下用户有定时执行权限 1.登录用户有资源组粒度执行权限,并且为组内用户 2.当前登录用户为提交人,并且有执行权限 :param user: :param workflow_id: :return: """ workflow_detail = SqlWorkflow.objects.get(id=workflow_id) result = False # 只有审核通过和定时执行的数据才可以执行 if workflow_detail.status in ['workflow_review_pass', 'workflow_timingtask']: # 当前登录用户有资源组粒度执行权限,并且为组内用户 group_ids = [group.group_id for group in user_groups(user)] if workflow_detail.group_id in group_ids and user.has_perm('sql.sql_execute_for_resource_group'): result = True # 当前登录用户为提交人,并且有执行权限 if workflow_detail.engineer == user.username and user.has_perm('sql.sql_execute'): result = True return result def can_cancel(user, workflow_id): """ 判断用户当前是否是可终止, 审核中、审核通过的的工单,审核人和提交人可终止 :param user: :param workflow_id: :return: """ workflow_detail = SqlWorkflow.objects.get(id=workflow_id) result = False # 审核中的工单,审核人和提交人可终止 if workflow_detail.status == 'workflow_manreviewing': from sql.utils.workflow_audit import Audit return any([Audit.can_review(user, workflow_id, 2), user.username == workflow_detail.engineer]) elif workflow_detail.status in ['workflow_review_pass', 'workflow_timingtask']: return any([can_execute(user, workflow_id), user.username == workflow_detail.engineer]) return result def can_view(user, workflow_id): """ 判断用户当前是否可以查看工单信息,和列表过滤逻辑保存一致 :param user: :param workflow_id: :return: """ workflow_detail = SqlWorkflow.objects.get(id=workflow_id) result = False # 管理员,可查看所有工单 if user.is_superuser: result = True # 非管理员,拥有审核权限、资源组粒度执行权限的,可以查看组内所有工单 elif user.has_perm('sql.sql_review') or user.has_perm('sql.sql_execute_for_resource_group'): # 先获取用户所在资源组列表 group_list = user_groups(user) group_ids = [group.group_id for group in group_list] if workflow_detail.group_id in group_ids: result = True # 其他人只能查看自己提交的工单 else: if workflow_detail.engineer == user.username: result = True return result def can_rollback(user, workflow_id): """ 判断用户当前是否可以查看回滚信息,和工单详情保持一致 执行结束并且开启备份的工单可以查看回滚信息 :param user: :param workflow_id: :return: """ workflow_detail = SqlWorkflow.objects.get(id=workflow_id) result = False # 执行结束并且开启备份的工单可以查看回滚信息 if workflow_detail.is_backup and workflow_detail.status in ('workflow_finish', 'workflow_exception'): return can_view(user, workflow_id) return result
py
7dfa5455d137a39495937a3bcca6f252978bcec7
''' Loads some data from an URL and draws a graph. The graph is saved as a PDF file. ''' import utils import requests import sys from reportlab.graphics.shapes import Drawing, String, colors from reportlab.graphics.charts.lineplots import LinePlot from reportlab.graphics.charts.textlabels import Label from reportlab.graphics.charts.legends import Legend from reportlab.graphics import renderPDF URL = 'http://services.swpc.noaa.gov/text/predicted-sunspot-radio-flux.txt' COMMENT_CHARS = '#:' colorHigh = colors.red colorLow = colors.green colorPred = colors.blue drawing = Drawing(400, 300) data = [] response = requests.get(URL) if response.status_code != 200: print('Error fetching URL') sys.exit(1) dataTable = response.text.strip() for line in dataTable.split('\n'): if not line.isspace() and not line[0] in COMMENT_CHARS: data.append([float(num) for num in line.split()]) # Get data for graph pred = [row[2] for row in data] high = [row[3] for row in data] low = [row[4] for row in data] times = [row[0] + row[1] / 12 for row in data] # Create graph lp = LinePlot() legend = Legend() legend.colorNamePairs = [(colorPred, 'PREDICTED'), (colorHigh, 'HIGH'), (colorLow, 'LOW')] legend.x = 300 legend.y = 70 legend.fontName = 'Helvetica' legend.fontSize = 8 lp.x = 50 lp.y = 100 lp.height = 125 lp.width = 300 lp.data = [list(zip(times, pred)), list( zip(times, high)), list(zip(times, low))] lp.lines[0].strokeColor = colorPred lp.lines[1].strokeColor = colorHigh lp.lines[2].strokeColor = colorLow # Since the year is a decimal we need to change the format lp.xValueAxis.labelTextFormat = utils.formatter # Draw graph drawing.add(lp) drawing.add(legend) drawing.add( String( 250, 300, 'Sunspots', fontsize=15, filegendColor=colors.grey)) # Create output PDF renderPDF.drawToFile(drawing, 'report.pdf', 'Sunspots')
py
7dfa55df311878e58dc6cb9218e51709293c8901
# -*- coding: utf-8 -*- import re import ast from assertpy import assertpy class LMAssert: """断言""" def __init__(self, position, actual_result, expected_result): self.comparator = position self.actual_result = actual_result self.expected_result = expected_result def compare(self): try: if self.comparator in ["equal", "equals", "相等", "字符相等"]: # 等于 assFailMsg = '断言 实际值({})与预期值({}) 字符相等,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_equal_to(self.expected_result) elif self.comparator in ["equalsList", "数组相等"]: # 列表相同,包括列表顺序也相同 assFailMsg = '断言 实际值({})与预期值({}) 数组相等,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.str2list(self.actual_result)).is_equal_to(LMAssert.str2list(self.expected_result)) elif self.comparator in ["equalsDict", "对象相等"]: # 字典相同 assFailMsg = '断言 实际值({})与预期值({}) 对象相等,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.str2dict(self.actual_result)).is_equal_to(LMAssert.str2dict(self.expected_result)) elif self.comparator in ["equalsNumber", "数字相等", "数值相等"]: # 数字等于 assFailMsg = '断言 实际值({})与预期值({}) 数值相等,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.str2num(self.actual_result)).is_equal_to(LMAssert.str2num(self.expected_result)) elif self.comparator in ["equalIgnoreCase", "相等(忽略大小写)"]: # 忽略大小写等于 assFailMsg = '断言 实际值({})与预期值({}) 相等(忽略大小写),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_equal_to_ignoring_case(self.expected_result) elif self.comparator in ["notEqual", "does not equal", "不等于"]: # 不等于 assFailMsg = '断言 实际值({}) 不等于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_not_equal_to(self.expected_result) elif self.comparator in ["contains", "包含"]: # 字符串包含该字符 assFailMsg = '断言 实际值({}) 包含 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.to_str(self.actual_result)).contains((self.expected_result)) elif self.comparator in ["notContains", "does no contains", "不包含"]: # 字符串不包含该字符 assFailMsg = '断言 实际值({}) 不包含 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).does_not_contain(*LMAssert.str2list(self.expected_result)) elif self.comparator in ["containsOnly", "仅包含"]: # 字符串仅包含该字符 assFailMsg = '断言 实际值({}) 仅包含 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).contains_only(*LMAssert.str2list(self.expected_result)) elif self.comparator in ["isNone", "none/null"]: # 为none或null assFailMsg = '断言 实际值({}) 为none或null,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_none() elif self.comparator in ["notEmpty", "is not empty", "不为空"]: # 不为空 assFailMsg = '断言 实际值({}) 不为空,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_not_empty() elif self.comparator in ["empty", "is empty", "为空"]: # 为空 assFailMsg = '断言 实际值({}) 为空,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_empty() elif self.comparator in ["isTrue", "true"]: # 是true assFailMsg = '断言 实际值({}) 是true,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_true() elif self.comparator in ["isFalse", "false"]: # 是false assFailMsg = '断言 实际值({}) 是false,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_false() elif self.comparator in ["isStrType", "字符串"]: # 是str的类型 assFailMsg = '断言 实际值({}) 是字符串,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_type_of(str) elif self.comparator in ["isIntType", "整数"]: # 是int的类型 assFailMsg = '断言 实际值({}) 是整数,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_type_of(int) elif self.comparator in ["isFloatType", "浮点数"]: # 是浮点的类型 assFailMsg = '断言 实际值({}) 是浮点数,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_type_of(float) elif self.comparator in ["isInt", "is a number", "仅含数字"]: # 字符串中仅含有数字 assFailMsg = '断言 实际值({}) 仅含数字,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_digit() elif self.comparator in ["isLetter", "仅含字母"]: # 字符串中仅含有字母 assFailMsg = '断言 实际值({}) 仅含字母,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_alpha() elif self.comparator in ["isLower", "小写"]: # 是小写的 assFailMsg = '断言 实际值({}) 是小写的,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_lower() elif self.comparator in ["isUpper", "大写"]: # 是大写的 assFailMsg = '断言 实际值({}) 是大写的,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_upper() elif self.comparator in ["startWith", "开头是"]: # 字符串以该字符开始 assFailMsg = '断言 实际值({}) 开头是 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).starts_with(self.expected_result) elif self.comparator in ["endWith", "结尾是"]: # 字符串以该字符结束 assFailMsg = '断言 实际值({}) 结尾是 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).ends_with(self.expected_result) elif self.comparator in ["isIn", "has item", "包含对象", "被包含"]: # 在这几个字符串中 assFailMsg = '断言 实际值({}) 被包含在 预期值({}) 列表中,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_in(*LMAssert.str2list(self.expected_result)) elif self.comparator in ["isNotIn", "不被包含"]: # 不在这几个字符串中 assFailMsg = '断言 实际值({}) 不被包含在 预期值({}) 列表中,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_not_in(*LMAssert.str2list(self.expected_result)) elif self.comparator in ["isNotZero", "非0"]: # 不是0 assFailMsg = '断言 实际值({}) 不是0,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.str2num(self.actual_result)).is_not_zero() elif self.comparator in ["isZero", "为0"]: # 是0 assFailMsg = '断言 实际值({}) 是0,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.str2num(self.actual_result)).is_zero() elif self.comparator in ["isPositive", "正数"]: # 是正数 assFailMsg = '断言 实际值({}) 是正数,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_positive() elif self.comparator in ["isNegative", "负数"]: # 是负数 assFailMsg = '断言 实际值({}) 是负数,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_negative() elif self.comparator in ["isGreaterThan", " 大于"]: # 大于 assFailMsg = '断言 实际值({}) 大于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_greater_than(LMAssert.str2num(self.expected_result)) elif self.comparator in ["isGreaterThanOrEqualTo", "greater than or equal", ">=", " 大于等于"]: # 大于等于 assFailMsg = '断言 实际值({}) 大于等于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_greater_than_or_equal_to(LMAssert.str2num(self.expected_result)) elif self.comparator in ["isLessThan", " 小于"]: # 小于 assFailMsg = '断言 实际值({}) 小于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_less_than(LMAssert.str2num(self.expected_result)) elif self.comparator in ["isLessThanOrEqualTo", "less than or equal", "<=", " 小于等于"]: # 小于等于 assFailMsg = '断言 实际值({}) 小于等于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_less_than_or_equal_to(LMAssert.str2num(self.expected_result)) elif self.comparator in ["isBetween", " 在...之间"]: # 在...之间 assFailMsg = '断言 实际值({}) 在 预期值({}) 之间,断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_between(*LMAssert.str2list(self.expected_result)) elif self.comparator in ["isCloseTo", " 接近于"]: # 接近于 assFailMsg = '断言 实际值({}) 接近于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(self.actual_result).is_close_to(*LMAssert.str2list(self.expected_result)) elif self.comparator in ["listLenEqual","列表长度相等"]: # 列表长度相等 assFailMsg = '断言 实际值({}) 列表长度相等 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.list_len(self.actual_result)).is_equal_to(LMAssert.str2num(self.expected_result)) elif self.comparator in ["listLenGreaterThan","列表长度大于"]: # 列表长度大于 assFailMsg = '断言 实际值({}) 列表长度大于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.list_len(self.actual_result)).is_greater_than(LMAssert.str2num(self.expected_result)) elif self.comparator in ["listLenLessThan","列表长度小于"]: # 列表长度小于 assFailMsg = '断言 实际值({}) 列表长度小于 预期值({}),断言失败:'.format(self.actual_result, self.expected_result) assertpy.assert_that(LMAssert.list_len(self.actual_result)).is_less_than_or_equal_to(LMAssert.str2num(self.expected_result)) else: raise AssertionTypeNotExist('没有{}该断言类型'.format(self.comparator)) return True, 'success' except AssertionError as e: ex = str(e).replace("Expected <", "Expected (").replace(">, ", "), ").replace(" <", " (").replace("> ", ") ") return False, assFailMsg + ex @staticmethod def str2num(value): if type(value) == int or type(value) == float: return value if value is None or len(value) == 0: return None elif re.fullmatch(r'-?[0-9]*\.?[0-9]*', value) is not None: if '.' in value: return float(value) else: return int(value) else: return value @staticmethod def str2list(value): if type(value) == list or type(value) == int or type(value) == float: return value if value is None or len(value) == 0: return None value_list = [] if value.startswith('[') and value.endswith(']'): for item in value[1:-1].split(','): item_strip = item.strip() if re.fullmatch(r'-?[0-9]*\.?[0-9]*', item_strip) is not None: if '.' in item_strip: value_list.append(float(item_strip)) else: value_list.append(int(item_strip)) else: # 字符串 value_list.append(item_strip[1:-1]) return value_list else: return value @staticmethod def str2dict(value): if type(value) == dict or type(value) == int or type(value) == float: return value if value is None or len(value) == 0: return None value_dict={} if value.startswith('{') and value.endswith('}'): for item in value[1:-1].split(','): value_dict = ast.literal_eval(value) return value_dict else: return value @staticmethod def to_str(value): if type(value) == int or type(value) == float: return value if value is None or len(value) == 0: return "" if type(value) == str: return value else: return str(value) @staticmethod def list_len(value): value2list=LMAssert.str2list(value) if type(value2list) != list: raise AssertionTypeNotExist('传入实际值({}) 不是列表格式'.format(value)) else: return len(value2list) class AssertionTypeNotExist(Exception): """断言类型错误"""
py
7dfa55eeeba5379e2139996182af674fc9502d06
import os import string import glob import argparse from pathlib import Path import cv2 import numpy as np import torch import imutils from scipy.io import loadmat from torch.utils.data import Dataset, DataLoader CLASS_NAMES = list(string.ascii_lowercase) + list(string.digits) MAX_FRAMES = 40 MOUTH_WIDTH = 96 MOUTH_HEIGHT = 96 def pad_frame(frame): """ """ height, width = frame.shape[:2] if width < height: frame = imutils.resize(frame, width=MOUTH_WIDTH) else: frame = imutils.resize(frame, height=MOUTH_HEIGHT) height, width = frame.shape[:2] if height > MOUTH_HEIGHT: margin = height - MOUTH_HEIGHT offset = margin // 2 frame = frame[offset:offset+MOUTH_HEIGHT, :] else: pad_y = MOUTH_HEIGHT - height pad_y_beg = pad_y // 2 pad_y_end = pad_y - pad_y_beg frame = np.pad(frame, [[pad_y_beg, pad_y_end], [0, 0]]) if width > MOUTH_WIDTH: margin = width - MOUTH_WIDTH offset = margin // 2 frame = frame[:, offset:offset+MOUTH_WIDTH] else: pad_x = MOUTH_WIDTH - width pad_x_beg = pad_x // 2 pad_x_end = pad_x - pad_x_beg frame = np.pad(frame, [[0, 0], [pad_x_beg, pad_x_end]]) msg = [frame.shape] assert frame.shape == (MOUTH_HEIGHT, MOUTH_WIDTH), ' '.join(map(str, msg)) return frame def pad_video(video): """ """ num_pad = max(0, MAX_FRAMES - len(video)) padded_video = video + [video[-1] for _ in range(num_pad)] padded_video = padded_video[:MAX_FRAMES] return padded_video def extract_mat(filename): """ """ data = loadmat(filename) vid_np_raw = data['vid'] size = data['siz'][0].astype('int32') # (height, width, num_frames) vid_np = np.reshape(vid_np_raw, (size[1], size[0], size[2])) vid_np = np.transpose(vid_np, (2, 1, 0)) num_frames = size[2] video = [] for i in range(num_frames): frame = pad_frame(vid_np[i, :, :]) video.append(frame) if len(video) >= MAX_FRAMES: break video = pad_video(video) return video def load_video(frame_dir): video = [] paths = sorted(glob.glob(os.path.join(frame_dir, '*.jpg'))) for path in paths: frame = cv2.imread(path, 0) frame = pad_frame(frame) video.append(frame) if len(video) >= MAX_FRAMES: break video = pad_video(video) video = np.array(video) return video class VisualDataset(Dataset): def __init__(self, paths, target_dir): """ """ # Labels should range in [0, 35] that includes 26 letters and 10 digits # Letters a-z would be indexed from 0 to 25 self.paths = paths self.target_dir = target_dir self.labels = [] for path in self.paths: dirname = os.path.basename(os.path.dirname(path)) filename = Path(path).stem # AVDigits data file format like this. if dirname == 'avletters_cropped': class_name = filename[0].lower() elif dirname == 'avdigits_cropped': class_name = filename.split('_')[1] else: raise Exception(f'Wrong path {path}') print(dirname, path, class_name) label = CLASS_NAMES.index(class_name) self.labels.append(label) def __getitem__(self, idx): frame_dir = self.paths[idx] video_input = load_video(frame_dir) result = {} result['video'] = video_input result['label'] = self.labels[idx] result['duration'] = np.ones(len(video_input)).astype(bool) filename = Path(frame_dir).stem savename = os.path.join(self.target_dir, filename + '.pkl') torch.save(result, savename) return result def __len__(self): return len(self.paths) def load_paths(root, split=0.1): """ """ project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) if not os.path.exists(os.path.abspath(root)): root_dir = os.path.join(project_dir, root) else: root_dir = root # Load AVLetters avletters_mat_paths = sorted(glob.glob(os.path.join(root_dir, 'avletters_cropped', '*'))) avdigits_vid_paths = sorted(glob.glob(os.path.join(root_dir, 'avdigits_cropped', '*'))) assert len(avletters_mat_paths) > 0, 'AVLetters dataset is empty' assert len(avdigits_vid_paths) > 0, 'AVDigits dataset is empty' # Split paths = avletters_mat_paths + avdigits_vid_paths num_train = int(len(paths) * (1 - split)) indices = np.arange(len(paths)) np.random.seed(12) np.random.shuffle(indices) paths = np.array(paths)[indices].tolist() train_paths = paths[:num_train] test_paths = paths[num_train:] print('Number of training samples:', len(train_paths)) print('Number of testing samples', len(test_paths)) splits = { 'train': train_paths, 'test': test_paths, } return splits if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--data-dir', type=str, default='datasets/', help='Path to data dir') parser.add_argument('--target-dir', type=str, default='datasets/avletters_digits_npy_gray_pkl_jpeg', help='Target dir') parser.add_argument('--split', type=float, default=0.1, help='Train split') args = parser.parse_args() print(args) if not os.path.exists(args.target_dir): os.makedirs(args.target_dir, exist_ok=True) splits = load_paths(args.data_dir, args.split) for name, paths in splits.items(): ds_target_dir = os.path.join(args.target_dir, name) os.makedirs(ds_target_dir, exist_ok=True) dataset = VisualDataset(paths, ds_target_dir) loader = DataLoader(dataset, batch_size=64, num_workers=8, shuffle=False, drop_last=False) print(f'Creating {name} dataset...') import time tic = time.time() total_batches = len(loader) for i, batch in enumerate(loader): toc = time.time() eta = ((toc - tic) / (i + 1) * (len(loader) - i)) / 3600.0 print(f'[Batch {i+1}/{total_batches}] eta:{eta:.5f}')
py
7dfa55f045a9b0e32a272e8ff5328410483dffcb
#!/usr/bin/env python3 import os from ged4py import GedcomReader from lib.person import Person from lib.family import Family from lib.media import Media from lib.genealogy import Genealogy from lib.narrator import Narrator from sphinx.config import Config import gettext _ = gettext.gettext def family_page(family_id, generation, descendant_id=None): genealogy.get_family_tree(family_id, pages_dir) with open(os.path.join(pages_dir, family_id + ".rst"), "w") as text_file: family = families[family_id] husb = persons[family.husb_id] wife = persons[family.wife_id] family_name = husb.name + " & " + wife.name print(family_name, file=text_file) for i in range(len(family_name)): text_file.write("=") print("", file=text_file) husb_id = family.husb_id husb_born_text = narrator.get_born_text( husb_id, use_name=True, short=True, docref=[husb_id] ) father_id = None mother_id = None if husb.parents_id: parents = families[husb.parents_id] if parents: father_id = parents.husb_id mother_id = parents.wife_id if father_id and persons[father_id].name or mother_id and persons[mother_id].name: husb_parents_text = narrator.get_parents_text( husb_id, docref=[father_id, mother_id] if generation > 0 else [] ) else: husb_parents_text = "" print(husb_born_text, file=text_file) if husb_parents_text: print(husb_parents_text, file=text_file) print(narrator.get_died_text(husb_id, short=True), file=text_file) print("", file=text_file) wife_id = family.wife_id wife_born_text = narrator.get_born_text( wife_id, use_name=True, short=True, docref=[wife_id] ) father_id = None mother_id = None if wife.parents_id: parents = families[wife.parents_id] if parents: father_id = parents.husb_id mother_id = parents.wife_id if father_id and persons[father_id].name or mother_id and persons[mother_id].name: wife_parents_text = narrator.get_parents_text( wife_id, docref=[father_id, mother_id] if generation > 0 else [] ) else: wife_parents_text = "" print(wife_born_text, file=text_file) if wife_parents_text: print(wife_parents_text, file=text_file) print(narrator.get_died_text(wife_id, short=True), file=text_file) print("", file=text_file) family_partner_text = narrator.get_family_partner_text(family_id) family_children_text = narrator.get_family_children_text(family_id, docref=[descendant_id]) print(family_partner_text, file=text_file) print(family_children_text, file=text_file) print("", file=text_file) image = family_id + "tree.png" print(".. image:: " + image, file=text_file) print("", file=text_file) children = [] for child_id in family.child_ids: print(narrator.get_born_text(child_id, use_name=True), file=text_file) print("", file=text_file) def person_page(person_id, generation, descendant_id=None): genealogy.get_person_tree(person_id, pages_dir) with open(os.path.join(pages_dir, person_id + ".rst"), "w") as text_file: person = persons[person_id] name = person.name print(name, file=text_file) for i in range(len(name)): text_file.write("=") print("", file=text_file) father_id = None mother_id = None if person.parents_id: parents = families[person.parents_id] if parents: father_id = parents.husb_id mother_id = parents.wife_id if father_id and persons[father_id].name or mother_id and persons[mother_id].name: parents_text = narrator.get_parents_text( person_id, child_of=True, use_name=True, docref=[person.parents_id] if generation > 0 else [] ) else: parents_text = person.fname + "." print(parents_text, file=text_file) print(narrator.get_born_text(person_id), file=text_file) print(narrator.get_siblings_text(person_id), file=text_file) print("", file=text_file) family_text = narrator.get_partner_text( person_id, docref=person.family_ids ) print(family_text, file=text_file) print("", file=text_file) print(narrator.get_died_text(person_id), file=text_file) print("", file=text_file) image = person_id + "tree.png" print(".. image:: " + image, file=text_file) def index_page(family_ids, person_ids): with open("index.rst", "w") as text_file: family = families[family_ids[0]] husb = persons[family.husb_id] wife = persons[family.wife_id] title = _("Familybook") print(title, file=text_file) for i in range(len(title)): text_file.write("=") print("", file=text_file) family_name = narrator.get_list_text([husb.sname, wife.sname]) family_link = ":doc:`%s<pages/%s>`" % (family_name, family.id) print( _("A report on the generations of the families %s.") % family_link, file=text_file ) print("", file=text_file) print("*" + _("Families") + "*", file=text_file) print("", file=text_file) print(".. toctree::", file=text_file) for family_id in family_ids: print(" pages/" + family_id, file=text_file) print("", file=text_file) print("*" + _("Persons") + "*", file=text_file) print("", file=text_file) print(".. toctree::", file=text_file) for person_id in person_ids: print(" pages/" + person_id, file=text_file) os.chdir(os.path.dirname(os.path.abspath(__file__))) gedcom_path = os.path.abspath("gedcom/family.ged") pages_dir = os.path.abspath("pages") if not os.path.exists(pages_dir): os.makedirs(pages_dir) config = Config.read(".") config.add('generations', 0, 'env', None) config.add('family_id', "", 'env', None) config.init_values() lang = config.language family_id_start = config.family_id generations = config.generations if lang == "de": de = gettext.translation('messages', localedir='locales', languages=['de']) de.install() _ = de.gettext persons = {} families = {} media = {} with GedcomReader(gedcom_path) as parser: for record in parser.records0("INDI"): persons[record.xref_id] = Person(record) for record in parser.records0("FAM"): families[record.xref_id] = Family(record) for record in parser.records0("OBJE"): media[record.xref_id] = Media(record) narrator = Narrator(persons, families, lang) genealogy = Genealogy(persons, families, media, lang) family_ids = [] person_ids = [] def create_pages(family_id, descendant_id, family_ids, person_ids, generation): family_ids += [family_id] family_page(family_id, generation, descendant_id) family = families[family_id] person_ids += [family.husb_id, family.wife_id] person_page(family.husb_id, generation, descendant_id) person_page(family.wife_id, generation, descendant_id) if generation <= 0: return husb = persons[family.husb_id] create_pages(husb.parents_id, husb.id, family_ids, person_ids, generation - 1) wife = persons[family.wife_id] create_pages(wife.parents_id, wife.id, family_ids, person_ids, generation - 1) create_pages(family_id_start, None, family_ids, person_ids, generations) index_page(family_ids, person_ids)
py
7dfa57b4a9892db8061bbe6bf9d2923c5c24726e
"""Find the maximum firing rate of the somas as driven by bias Set soma offset bias to max Set soma refractory bias to max (minimum refractory) Iterate through the somas, and collect spikes Plot results """ import os from time import sleep import argparse import numpy as np import matplotlib.pyplot as plt from pystorm.hal import HAL from pystorm.hal.hal import parse_hal_spikes from pystorm.hal.neuromorph import graph from pystorm.PyDriver import bddriver as bd from utils.exp import clear_spikes from utils.file_io import load_txt_data, set_data_dir HAL = HAL() CORE = 0 MAX_NEURONS = 4096 BIAS_REF = 1024 BIAS_OFFSET = 1024 TIME_SCALE = 1E-9 NEURONS = 4096 RUN_TIME = 0.1 INTER_RUN_TIME = 0.1 DATA_DIR = set_data_dir(__file__) def parse_args(): """Parse command line arguments""" parser = argparse.ArgumentParser(description='Characterize the soma max firing rates') parser.add_argument("-r", action="store_true", dest="use_saved_data", help='reuse cached data') args = parser.parse_args() return args def build_net(): """Builds the HAL-level network for testing""" dim = 1 tap_matrix = np.zeros((MAX_NEURONS, dim)) net = graph.Network("net") pool = net.create_pool("pool", tap_matrix) HAL.map(net) return pool def set_analog(hal): """Sets the soma config bits and the bias currents""" for nrn_idx in range(MAX_NEURONS): hal.driver.SetSomaGain(CORE, nrn_idx, bd.bdpars.SomaGainId.ONE) hal.driver.SetSomaOffsetSign(CORE, nrn_idx, bd.bdpars.SomaOffsetSignId.POSITIVE) hal.driver.SetSomaOffsetMultiplier(CORE, nrn_idx, bd.bdpars.SomaOffsetMultiplierId.THREE) hal.driver.SetSomaEnableStatus(CORE, nrn_idx, bd.bdpars.SomaStatusId.DISABLED) hal.driver.SetDACCount(CORE, bd.bdpars.BDHornEP.DAC_SOMA_REF, BIAS_REF) hal.driver.SetDACCount(CORE, bd.bdpars.BDHornEP.DAC_SOMA_OFFSET, BIAS_OFFSET) hal.flush() def set_hal(hal): """Sets the HAL settings that remain constant throughout the experiment""" hal.disable_output_recording(flush=True) def toggle_hal(nrn_idx): """Start and stop HAL traffic""" # clear queues aer_nrn_idx = HAL.driver.BDPars.GetSomaAERAddr(nrn_idx) HAL.driver.SetSomaEnableStatus(CORE, aer_nrn_idx, bd.bdpars.SomaStatusId.ENABLED) HAL.set_time_resolution(upstream_ns=10000) HAL.start_traffic(flush=False) HAL.enable_spike_recording(flush=True) sleep(RUN_TIME) HAL.driver.SetSomaEnableStatus(CORE, aer_nrn_idx, bd.bdpars.SomaStatusId.DISABLED) HAL.stop_traffic(flush=False) HAL.disable_spike_recording(flush=True) HAL.set_time_resolution(upstream_ns=10000000) HAL.flush() def measure_soma_max_rate(pool, nrn_idx): """Collect spikes to find a single soma's max firing rate""" clear_spikes(HAL, INTER_RUN_TIME) toggle_hal(nrn_idx) hal_spikes = parse_hal_spikes(HAL.get_spikes()) # print("\nTesting nrn {}. Detected the following spikes".format(nrn_idx)) # for idx in hal_spikes[pool]: # print("nrn_idx {} spikes {}".format(idx, len(hal_spikes[pool][idx]))) soma_spikes = np.array(hal_spikes[pool][nrn_idx])[:, 0] soma_spikes -= soma_spikes[0] soma_spikes = soma_spikes n_spks = len(soma_spikes)-1 time_period = (soma_spikes[-1]- soma_spikes[0])*TIME_SCALE max_rate = n_spks/time_period clear_spikes(HAL, INTER_RUN_TIME) return max_rate def plot_max_rates(max_rates): """Plot the data""" neurons = len(max_rates) fig_1d = plt.figure() plt.plot(max_rates, 'o', markersize=1) plt.xlim(0, neurons-1) plt.xlabel("Soma Index") plt.ylabel("Max Firing Rate (Hz)") max_rates_2d = max_rates.reshape((int(np.sqrt(neurons)), -1)) fig_2d_heatmap = plt.figure() ims = plt.imshow(max_rates_2d) plt.colorbar(ims) plt.xlabel("Soma X Coordinate") plt.ylabel("Soma Y Coordinate") plt.title("Max Firing Rate (Hz)") fig_hist = plt.figure() bins = min(max(10, neurons), 80) max_rates_mean = np.mean(max_rates) max_rates_median = np.median(max_rates) max_rates_min = np.min(max_rates) max_rates_max = np.max(max_rates) plt.hist(max_rates, bins=bins) plt.axvline(max_rates_mean, color="k", label="mean") plt.axvline(max_rates_median, color="r", label="median") plt.xlabel("Max firing Rate (Hz)") plt.ylabel("Counts") plt.title("Mean:{:,.0f} Median:{:,.0f} Min:{:,.0f} Max:{:,.0f}".format( max_rates_mean, max_rates_median, max_rates_min, max_rates_max)) plt.legend() fig_1d.savefig(DATA_DIR + "nrn_idx_vs_max_rate.pdf") fig_2d_heatmap.savefig(DATA_DIR + "2d_heatmap.pdf") fig_hist.savefig(DATA_DIR + "histogram.pdf") def check_soma_max_rates(parsed_args): """Run the check""" use_saved_data = parsed_args.use_saved_data if use_saved_data: max_rates = load_txt_data(DATA_DIR + "max_rates.txt") else: pool = build_net() set_analog(HAL) set_hal(HAL) max_rates = np.zeros(NEURONS) for nrn_idx in range(NEURONS): max_rates[nrn_idx] = measure_soma_max_rate(pool, nrn_idx) np.savetxt(DATA_DIR + "max_rates.txt", max_rates) plot_max_rates(max_rates) print("Max firing rates:") print(max_rates) plt.show() if __name__ == "__main__": check_soma_max_rates(parse_args())
py
7dfa57e4a73bf61943a31ab278407d5036acaace
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="example-pkg-/Users/cchavez", version="0.0.1", author="Example Author", author_email="[email protected]", description="Json to Pandas", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/pypa/sampleproject", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], python_requires='>=3.6', )
py
7dfa5849a424c43a161e39e7448269a157204c4d
# -*- coding: utf-8 -*- # # tally-ho documentation build configuration file, created by # sphinx-quickstart on Mon Mar 3 12:03:23 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os import django # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('../..')) os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tally_ho.settings.common') django.setup() # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'tally-system' copyright = u'2014, Peter Lubell-Doughtie and Dickson Ukang\'a' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1' # The full version, including alpha/beta/rc tags. release = '0.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. # keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'tally-systemdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'tally-system.tex', u'tally-system Documentation', u'Peter Lubell-Doughtie and Dickson Ukang\'a', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'tally-system', u'tally-system Documentation', [u'Peter Lubell-Doughtie and Dickson Ukang\'a'], 1) ] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'tally-system', u'tally-system Documentation', u'Peter Lubell-Doughtie and Dickson Ukang\'a', 'tally-system', 'A tally system for counting paper vote summary forms.', 'Software'), ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/': None}
py
7dfa598691b9ca19dd64ab7eeb0a665b5cf49483
import os import re import codecs import json from System.Collections.Generic import List # --------------------------- # [Required] Script Information # --------------------------- ScriptName = "Currerncy Ranking" Website = "twitch.tv/jevyanj" Description = "Currency Ranking" Creator = "JevyanJ" Version = "1.0.0" # --------------------------- # Define Global Variables # --------------------------- settings = {} configFile = "config.json" command = "!test" output = "web/index.html" templates = { "index": "templates/index.template", "category": "templates/category.template" } def Init(): global settings # Load settings path = os.path.dirname(__file__) try: with codecs.open( os.path.join(path, configFile), encoding='utf-8-sig', mode='r') as file: settings = json.load(file, encoding='utf-8-sig') except Exception: settings = { "black_list": "", "min_points": 0 } process() return def Execute(data): # Only uncomment to launch updating with a command # if data.GetParam(0) == '!currency-ranking-test': # process() # Parent.SendStreamMessage('Ranking file updated') return def ReloadSettings(jsonData): Init() return def OpenOutput(): path_out = os.path.join(os.path.dirname(os.path.abspath(__file__)), "web").replace("\\", "/") location = os.path.join(os.path.dirname(__file__), "output.txt") with open(location, 'w') as f: f.write(path_out) os.startfile(location) return def Tick(): process() return ############################################################################### def log(message): Parent.Log(command, str(message)) return def process(): """Main process """ users = getStreamlabsUsers() ranking = prepareRanking(users) order = getOrderRanking(users) writeRanking(ranking, order) def equalRankin(ranking, other): """Compare two rankings Args: ranking (List<CurrencyUsers>) other (List<CurrencyUsers>) Return: Boolean. True if both ranking are equals. """ if not other or not ranking: return False if len(ranking) != len(other): return False for user in ranking: user_other = next( (item for item in other if item.UserId == user.UserId), None) if not user_other or user_other.TimeWatched != user.TimeWatched: return False return True def getStreamlabsUsers(): """Return all users with streamlabs format Return: List<CurrencyUsers> CurrencyUsers: string UserId string UserName long Points long TimeWatched (In Minutes) string Rank """ top = Parent.GetTopHours(-1) users = top.keys() mylist = List[str](users) users = Parent.GetCurrencyUsers(mylist) # Filter list black_list = settings["black_list"].split(",") regex = settings["black_list_regex"] if not regex: regex = "-" black_list_regex = re.compile(regex) black_list = list(map(str.strip, black_list)) users = [ u for u in users if ( u.UserName not in black_list and not bool(black_list_regex.match(u.UserName)) and u.TimeWatched >= int(settings["min_time"]) )] return users def prepareRanking(users): """Prepare ranking with a CurrencyUsers list Args: users (List<CurrencyUsers>): List of streamlabs users Return: Dict: { 'rank1': [user1, user2,...], 'rank2': [...] } """ output = {} for user in users: if user.Rank in output.keys(): output[user.Rank].append("{}".format(user.UserName)) else: output[user.Rank] = [user.UserName] return output def getOrderRanking(users): """Return a ranking ordered list. Args: users (List<CurrencyUsers>): List of streamlabs users Return: List<str> """ usersSorted = sorted( users, key=lambda d: d.TimeWatched, reverse=True) ranking = [] for user in usersSorted: if user.Rank not in ranking: ranking.append(user.Rank) return ranking def writeRanking(rankings, order): """Write ranking on a file Args: ranking (Dict) """ location = os.path.join(os.path.dirname(__file__), output) category_file = os.path.join( os.path.dirname(__file__), templates["category"]) file = open(category_file, mode='r') category_template = file.read() file.close() rankings_txt = "" for ranking in order: users = rankings[ranking] ranking_users = "" for user in users: ranking_users += "<p>{}</p>\n".format(user) rankings_txt += category_template.format( NAME="{}".format(str.upper(ranking)), ELEMENTS=ranking_users) index_file = os.path.join( os.path.dirname(__file__), templates["index"]) file = open(index_file, mode='r') index_template = file.read() file.close() with open(location, 'w') as f: f.write(index_template.format(RANKING=rankings_txt))
py
7dfa59d2244eee4cc1efa0b5507dba0e1d923cc9
import os os.system("git pull") os.system("python Scripts/Persimmon.py")
py
7dfa5ada93ffef9db3971fc190dbbd8654d85280
import enum class IdEnum(enum.Enum): @property def id(self): return self.value def __str__(self): return self.name def __repr__(self): return self.name @classmethod def from_name(cls, name: str): return next((e for e in cls if e.name == name), None) @classmethod def from_id(cls, id): return next((e for e in cls if e.id == id), None) @enum.unique class Mission(IdEnum): attack = 1 acs_attack = 2 transport = 3 deployment = 4 defend = 5 espionage = 6 colonization = 7 harvest = 8 destroy = 9 expedition = 15 trade = 16 @enum.unique class CoordsType(IdEnum): planet = 1 debris = 2 moon = 3 @enum.unique class Ship(IdEnum): small_cargo = 202 large_cargo = 203 light_fighter = 204 heavy_fighter = 205 cruiser = 206 battleship = 207 colony_ship = 208 recycler = 209 espionage_probe = 210 bomber = 211 destroyer = 213 solar_satellite = 212 deathstar = 214 battlecruiser = 215 trade_ship = 216 crawler = 217 reaper = 218 pathfinder = 219 class Resource(IdEnum): metal = object() crystal = object() deuterium = object() energy = object() dark_matter = object() @enum.unique class CharacterClass(IdEnum): collector = 1 general = 2 discoverer = 3 @enum.unique class Technology(IdEnum): energy_technology = 113 laser_technology = 120 ion_technology = 121 hyperspace_technology = 114 plasma_technology = 122 espionage_technology = 106 computer_technology = 108 astrophysics = 124 intergalactic_research_network = 123 graviton_technology = 199 combustion_drive = 115 impulse_drive = 117 hyperspace_drive = 118 weapons_technology = 109 shielding_technology = 110 armour_technology = 111 @enum.unique class HighscoreCategory(IdEnum): player = 1 alliance = 2 @enum.unique class HighscoreType(IdEnum): points = 0 economy = 1 technology = 2 military = 3 military_lost = 4 military_built = 5 military_destroyed = 6 honor = 7 @enum.unique class Supply(IdEnum): metal_mine = 1 metal_storage = 22 crystal_mine = 2 crystal_storage = 23 deuterium_synthesizer = 3 deuterium_tank = 24 solar_plant = 4 fusion_reactor = 12 solar_satellite = 212 crawler = 217 @enum.unique class Facility(IdEnum): robotics_factory = 14 nanite_factory = 15 shipyard = 21 space_dock = 36 missile_silo = 44 research_lab = 31 alliance_depot = 34 terraformer = 33 lunar_base = 41 sensor_phalanx = 42 jump_gate = 43 @enum.unique class Defense(IdEnum): rocket_launcher = 401 light_laser = 402 heavy_laser = 403 ion_cannon = 405 gauss_cannon = 404 plasma_turret = 406 small_shield_dome = 407 large_shield_dome = 408 anti_ballistic_missile = 502 interplanetary_missile = 503
py
7dfa5b34f4f3bf4ef94ae6dd7e6c7d1f2df651f9
import fastdtw
py
7dfa5f36d43c7ecd426e3b35080df3f9a62c9669
from genologics.entities import Process from genologics.lims import Lims from vogue.parse.build.flowcell import run_data, filter_none import datetime as dt def build_run(run: Process, instrument: str, date: str) -> dict: """Build flowcell document from lims data.""" mongo_run = { '_id': run.udf.get('Run ID'), 'instrument': instrument, 'date': dt.datetime.strptime(date, '%y%m%d') } for key, val in run.udf.items(): if isinstance(val, dt.date): val = dt.datetime.strptime(val.isoformat(), '%Y-%m-%d') mongo_run[key] = val lane_data, avg_data = run_data(run) mongo_run['avg'] = avg_data mongo_run['lanes'] = lane_data mongo_run = filter_none(mongo_run) return mongo_run
py
7dfa5f718aef517c861e718ec3165ab9eb0a4a4d
import requests import secrets from random import random # token generated from website: # https://developer.spotify.com/console/get-users-available-devices/ token = secrets.token def generate_random(l): return random()*l AUTH_URL = 'https://accounts.spotify.com/api/token' def get_trackid(mood): trackid="" if(mood=="Angry"): #don't back in anger trackid = "0UvCh63URrLFcPkKt99hHd" elif(mood=="Disgust"): #ignorance trackid="7pdvxSHmfXKRgXKTCcs5Hs" elif(mood=="Fear"): #back in my body trackid="0DlMSBJh9uo52DieTYVXLw" elif(mood=="Neutral"): #light on trackid="6UnCGAEmrbGIOSmGRZQ1M2" elif(mood=="Happy"): #havana trackid="1rfofaqEpACxVEHIZBJe6W" elif(mood=="Surprise"): #only the young trackid="2slqvGLwzZZYsT4K4Y1GBC" elif(mood=="Sad"): #dog years - we will be alright trackid="5RRNZFyOi17nTh2bPEKPtp" return trackid def play_song(mood): trackid = get_trackid(mood) print(trackid) # authorizing spotify token = secrets.token headers = { 'Authorization': 'Bearer {token}'.format(token=token) } # base URL of all Spotify API endpoints BASE_URL = 'https://api.spotify.com/v1/' #placing track in the play queue post_trackid = requests.post("https://api.spotify.com/v1/me/player/queue?uri=spotify:track:"+ trackid,headers=headers) print(post_trackid) #playing next put_next = requests.post("https://api.spotify.com/v1/me/player/next", headers=headers) print(put_next) #playing the song play_resume = requests.put("https://api.spotify.com/v1/me/player/play", headers=headers) print(play_resume) # play_song('Sad')
py
7dfa5f778491806bb33bd73dc96724749291433e
# -*- coding: utf-8 -*- import datetime from airflow import models from airflow.contrib.kubernetes import secret from airflow.contrib.operators import kubernetes_pod_operator from utils.kubernetes import Tolerations, Affinity YESTERDAY = datetime.datetime.now() - datetime.timedelta(days=1) with models.DAG( dag_id='composer_kubernetes_pod_simple', schedule_interval=None, start_date=YESTERDAY) as dag: kubernetes_min_pod = kubernetes_pod_operator.KubernetesPodOperator( task_id='pod-workshop-simple', name='pod-workshop-simple', cmds=['echo', '"Hello world"'], namespace='default', resources={'request_memory': '128Mi', 'request_cpu': '500m', 'limit_memory': '500Mi', 'limit_cpu': 1}, image='gcr.io/gcp-runtimes/ubuntu_18_0_4', tolerations=Tolerations.default, affinity=Affinity.memory_heavy )
py
7dfa5fd31c6b309eb8eb8e864fa7c38143a69232
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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 os import math from typing import Union import paddle import paddle.nn as nn import paddle.nn.functional as F import paddlehub.vision.transforms as T import numpy as np from paddle import ParamAttr from paddle.nn.initializer import Uniform, KaimingNormal from paddlehub.module.module import moduleinfo from paddlehub.module.cv_module import ImageClassifierModule class ConvBNLayer(nn.Layer): def __init__(self, in_channels, out_channels, kernel_size, stride=1, groups=1, act="relu", name=None): super(ConvBNLayer, self).__init__() self._conv = nn.Conv2D( in_channels=in_channels, out_channels=out_channels, kernel_size=kernel_size, stride=stride, padding=(kernel_size - 1) // 2, groups=groups, weight_attr=ParamAttr(initializer=KaimingNormal(), name=name + "_weights"), bias_attr=False) bn_name = name + "_bn" self._batch_norm = nn.BatchNorm( num_channels=out_channels, act=act, param_attr=ParamAttr(name=bn_name + "_scale", regularizer=paddle.regularizer.L2Decay(0.0)), bias_attr=ParamAttr(name=bn_name + "_offset", regularizer=paddle.regularizer.L2Decay(0.0)), moving_mean_name=bn_name + "_mean", moving_variance_name=bn_name + "_variance") def forward(self, inputs): y = self._conv(inputs) y = self._batch_norm(y) return y class SEBlock(nn.Layer): def __init__(self, num_channels, reduction_ratio=4, name=None): super(SEBlock, self).__init__() self.pool2d_gap = nn.AdaptiveAvgPool2D(1) self._num_channels = num_channels stdv = 1.0 / math.sqrt(num_channels * 1.0) med_ch = num_channels // reduction_ratio self.squeeze = nn.Linear( num_channels, med_ch, weight_attr=ParamAttr(initializer=Uniform(-stdv, stdv), name=name + "_1_weights"), bias_attr=ParamAttr(name=name + "_1_offset")) stdv = 1.0 / math.sqrt(med_ch * 1.0) self.excitation = nn.Linear( med_ch, num_channels, weight_attr=ParamAttr(initializer=Uniform(-stdv, stdv), name=name + "_2_weights"), bias_attr=ParamAttr(name=name + "_2_offset")) def forward(self, inputs): pool = self.pool2d_gap(inputs) pool = paddle.squeeze(pool, axis=[2, 3]) squeeze = self.squeeze(pool) squeeze = F.relu(squeeze) excitation = self.excitation(squeeze) excitation = paddle.clip(x=excitation, min=0, max=1) excitation = paddle.unsqueeze(excitation, axis=[2, 3]) out = paddle.multiply(inputs, excitation) return out class GhostModule(nn.Layer): def __init__(self, in_channels, output_channels, kernel_size=1, ratio=2, dw_size=3, stride=1, relu=True, name=None): super(GhostModule, self).__init__() init_channels = int(math.ceil(output_channels / ratio)) new_channels = int(init_channels * (ratio - 1)) self.primary_conv = ConvBNLayer( in_channels=in_channels, out_channels=init_channels, kernel_size=kernel_size, stride=stride, groups=1, act="relu" if relu else None, name=name + "_primary_conv") self.cheap_operation = ConvBNLayer( in_channels=init_channels, out_channels=new_channels, kernel_size=dw_size, stride=1, groups=init_channels, act="relu" if relu else None, name=name + "_cheap_operation") def forward(self, inputs): x = self.primary_conv(inputs) y = self.cheap_operation(x) out = paddle.concat([x, y], axis=1) return out class GhostBottleneck(nn.Layer): def __init__(self, in_channels, hidden_dim, output_channels, kernel_size, stride, use_se, name=None): super(GhostBottleneck, self).__init__() self._stride = stride self._use_se = use_se self._num_channels = in_channels self._output_channels = output_channels self.ghost_module_1 = GhostModule( in_channels=in_channels, output_channels=hidden_dim, kernel_size=1, stride=1, relu=True, name=name + "_ghost_module_1") if stride == 2: self.depthwise_conv = ConvBNLayer( in_channels=hidden_dim, out_channels=hidden_dim, kernel_size=kernel_size, stride=stride, groups=hidden_dim, act=None, name=name + "_depthwise_depthwise" # looks strange due to an old typo, will be fixed later. ) if use_se: self.se_block = SEBlock(num_channels=hidden_dim, name=name + "_se") self.ghost_module_2 = GhostModule( in_channels=hidden_dim, output_channels=output_channels, kernel_size=1, relu=False, name=name + "_ghost_module_2") if stride != 1 or in_channels != output_channels: self.shortcut_depthwise = ConvBNLayer( in_channels=in_channels, out_channels=in_channels, kernel_size=kernel_size, stride=stride, groups=in_channels, act=None, name=name + "_shortcut_depthwise_depthwise" # looks strange due to an old typo, will be fixed later. ) self.shortcut_conv = ConvBNLayer( in_channels=in_channels, out_channels=output_channels, kernel_size=1, stride=1, groups=1, act=None, name=name + "_shortcut_conv") def forward(self, inputs): x = self.ghost_module_1(inputs) if self._stride == 2: x = self.depthwise_conv(x) if self._use_se: x = self.se_block(x) x = self.ghost_module_2(x) if self._stride == 1 and self._num_channels == self._output_channels: shortcut = inputs else: shortcut = self.shortcut_depthwise(inputs) shortcut = self.shortcut_conv(shortcut) return paddle.add(x=x, y=shortcut) @moduleinfo( name="ghostnet_x1_3_imagenet", type="CV/classification", author="paddlepaddle", author_email="", summary="ghostnet_x1_3_imagenet is a classification model, " "this module is trained with Imagenet dataset.", version="1.0.0", meta=ImageClassifierModule) class GhostNet(nn.Layer): def __init__(self, label_list: list = None, load_checkpoint: str = None): super(GhostNet, self).__init__() if label_list is not None: self.labels = label_list class_dim = len(self.labels) else: label_list = [] label_file = os.path.join(self.directory, 'label_list.txt') files = open(label_file) for line in files.readlines(): line = line.strip('\n') label_list.append(line) self.labels = label_list class_dim = len(self.labels) self.cfgs = [ # k, t, c, SE, s [3, 16, 16, 0, 1], [3, 48, 24, 0, 2], [3, 72, 24, 0, 1], [5, 72, 40, 1, 2], [5, 120, 40, 1, 1], [3, 240, 80, 0, 2], [3, 200, 80, 0, 1], [3, 184, 80, 0, 1], [3, 184, 80, 0, 1], [3, 480, 112, 1, 1], [3, 672, 112, 1, 1], [5, 672, 160, 1, 2], [5, 960, 160, 0, 1], [5, 960, 160, 1, 1], [5, 960, 160, 0, 1], [5, 960, 160, 1, 1] ] self.scale = 1.3 output_channels = int(self._make_divisible(16 * self.scale, 4)) self.conv1 = ConvBNLayer( in_channels=3, out_channels=output_channels, kernel_size=3, stride=2, groups=1, act="relu", name="conv1") # build inverted residual blocks idx = 0 self.ghost_bottleneck_list = [] for k, exp_size, c, use_se, s in self.cfgs: in_channels = output_channels output_channels = int(self._make_divisible(c * self.scale, 4)) hidden_dim = int(self._make_divisible(exp_size * self.scale, 4)) ghost_bottleneck = self.add_sublayer( name="_ghostbottleneck_" + str(idx), sublayer=GhostBottleneck( in_channels=in_channels, hidden_dim=hidden_dim, output_channels=output_channels, kernel_size=k, stride=s, use_se=use_se, name="_ghostbottleneck_" + str(idx))) self.ghost_bottleneck_list.append(ghost_bottleneck) idx += 1 # build last several layers in_channels = output_channels output_channels = int(self._make_divisible(exp_size * self.scale, 4)) self.conv_last = ConvBNLayer( in_channels=in_channels, out_channels=output_channels, kernel_size=1, stride=1, groups=1, act="relu", name="conv_last") self.pool2d_gap = nn.AdaptiveAvgPool2D(1) in_channels = output_channels self._fc0_output_channels = 1280 self.fc_0 = ConvBNLayer( in_channels=in_channels, out_channels=self._fc0_output_channels, kernel_size=1, stride=1, act="relu", name="fc_0") self.dropout = nn.Dropout(p=0.2) stdv = 1.0 / math.sqrt(self._fc0_output_channels * 1.0) self.fc_1 = nn.Linear( self._fc0_output_channels, class_dim, weight_attr=ParamAttr(name="fc_1_weights", initializer=Uniform(-stdv, stdv)), bias_attr=ParamAttr(name="fc_1_offset")) if load_checkpoint is not None: self.model_dict = paddle.load(load_checkpoint) self.set_dict(self.model_dict) print("load custom checkpoint success") else: checkpoint = os.path.join(self.directory, 'model.pdparams') self.model_dict = paddle.load(checkpoint) self.set_dict(self.model_dict) print("load pretrained checkpoint success") def transforms(self, images: Union[str, np.ndarray]): transforms = T.Compose([ T.Resize((256, 256)), T.CenterCrop(224), T.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) ], to_rgb=True) return transforms(images).astype('float32') def forward(self, inputs): x = self.conv1(inputs) for ghost_bottleneck in self.ghost_bottleneck_list: x = ghost_bottleneck(x) x = self.conv_last(x) feature = self.pool2d_gap(x) x = self.fc_0(feature) x = self.dropout(x) x = paddle.reshape(x, shape=[-1, self._fc0_output_channels]) x = self.fc_1(x) return x, feature def _make_divisible(self, v, divisor, min_value=None): """ This function is taken from the original tf repo. It ensures that all layers have a channel number that is divisible by 8 It can be seen here: https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet/mobilenet.py """ if min_value is None: min_value = divisor new_v = max(min_value, int(v + divisor / 2) // divisor * divisor) # Make sure that round down does not go down by more than 10%. if new_v < 0.9 * v: new_v += divisor return new_v
py
7dfa5fd575c25d60867a9ca88898404489e9c909
import os import time import numpy as np import numpy.random as rd import torch from yonv_utils import load_data from yonv_utils import load_torch_model from yonv_utils import whether_remove_history # from classify_netwrok import Res1dNet as Net # from classify_netwrok import Conv2dNet as Net from classify_netwrok import SE2dNet as Net """ Github: Yonv1943 net para(MB time(s accuracy(train_epoch == 3 or 6 Res1dNet 0.49 36 >0.88 61 >0.89 Conv2dNet 0.64 31 >0.92 50 >0.93 SE2dNet 0.67 32 >0.92 64 >0.93 """ class Arguments: train_epochs = [max(int(6 * 0.6065 ** i), 1) for i in range(6)] batch_sizes = [int(128 * 1.6487 ** i) for i in range(6)] show_gap = 2 ** 1 eval_gap = 2 ** 3 def __init__(self, gpu_id=-1, mod_dir=''): import sys self.mod_dir = mod_dir if mod_dir != '' else sys.argv[0].split('/')[-1][:-3] self.gpu_id = gpu_id if gpu_id != -1 else self.mod_dir[-1] self.gpu_ram = 0.9 # 0.0 ~ 1.0 del sys def train_it(model, train_loader, device, optimizer, criterion): loss_sum = 0 model.train() batch_size = train_loader.batch_size for image, target in train_loader: k = rd.randint(2, batch_size) image[:k] = image[:k].flip(3) image = image.to(device) target = target.to(device) optimizer.zero_grad() output = model(image) loss = criterion(output, target) loss.backward() optimizer.step() loss_sum += loss.item() loss_avg = loss_sum / len(train_loader) return loss_avg def eval_it(model, eval_loader, device, criterion): model.eval() loss_sum = 0 correct = 0 with torch.no_grad(): for image, target in eval_loader: image = image.to(device) target = target.to(device) output = model(image) loss_sum += criterion(output, target, reduction='mean').item() predict = output.argmax(dim=1, keepdim=True) predict_bool = predict.eq(target.view_as(predict)) correct += predict_bool.float().mean().item() eval_loader_len = len(eval_loader) loss_avg = loss_sum / eval_loader_len accuracy = correct / eval_loader_len print(end=' |EVAL: Loss: %.4f |Accu: %.4f' % (loss_avg, accuracy)) def run_train(mod_dir, gpu_id, train_epochs, batch_sizes, show_gap, eval_gap): whether_remove_history(mod_dir, remove=True) '''init env''' os.environ['CUDA_VISIBLE_DEVICES'] = str(gpu_id) # choose GPU:0 device = torch.device("cuda" if torch.cuda.is_available() else 'cpu') np.random.seed(1943 + int(time.time())) torch.manual_seed(1943 + rd.randint(0, int(time.time()))) '''load data''' import torch.utils.data as data train_images, train_labels, eval_images, eval_labels = load_data() train_sets = data.TensorDataset(train_images, train_labels) eval_sets = data.TensorDataset(eval_images, eval_labels) eval_loader = data.DataLoader( eval_sets, batch_size=batch_sizes[0], shuffle=False, drop_last=False, ) del eval_sets '''train model''' from torch.nn import functional model = Net().to(device) optimizer = torch.optim.Adam(model.parameters()) criterion = functional.nll_loss save_path = load_torch_model(mod_dir, model) print("Train Loop:") from time import time as timer start_time = timer() eval_time = show_time = 0 loss_avg = None for train_epoch, batch_size in zip(train_epochs, batch_sizes): print(end="\n||%d/%d\t\t" % (batch_size, train_epoch)) for epoch in range(train_epoch): train_loader = data.DataLoader( train_sets, batch_size=batch_size, shuffle=True, drop_last=True, ) loss_avg = train_it(model, train_loader, device, optimizer, criterion) time0 = timer() if time0 - show_time > show_gap: show_time = timer() print(end='\n loss: %.4f' % (loss_avg,)) if time0 - eval_time > eval_gap: eval_time = timer() eval_it(model, eval_loader, device, criterion) print('\n\nTime Used: %i' % (timer() - start_time)) print(end='\n loss: %.4f' % (loss_avg,)) eval_it(model, eval_loader, device, criterion) torch.save(model.state_dict(), save_path) file_size = os.path.getsize(save_path) / (2 ** 20) # Byte --> KB --> MB print("\nSave: %s | %.2f MB" % (mod_dir, file_size)) def run_test(mod_dir, gpu_id, ): os.environ['CUDA_VISIBLE_DEVICES'] = str(gpu_id) # choose GPU:0 device = torch.device("cuda" if torch.cuda.is_available() else 'cpu') model = Net().to(device) load_torch_model(mod_dir, model) in_put = np.zeros((1, 1, 28, 28), dtype=np.float32) in_put = torch.tensor(in_put, dtype=torch.float32, device=device) output = model(in_put) output = output.cpu().data.numpy()[0] print(np.argmax(output), output) if __name__ == '__main__': args = Arguments(gpu_id=3) print(' GPUid: %s' % args.gpu_id) run_train(args.mod_dir, args.gpu_id, args.train_epochs, args.batch_sizes, args.show_gap, args.eval_gap) # run_test(args.mod_dir, args.gpu_id)
py
7dfa60c2a5c32b3dc7e103207506c0cf780088d6
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: steammessages_clientserver_2.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() import steam.protobufs.steammessages_base_pb2 as steammessages__base__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='steammessages_clientserver_2.proto', package='', syntax='proto2', serialized_options=_b('H\001\220\001\000'), serialized_pb=_b('\n\"steammessages_clientserver_2.proto\x1a\x18steammessages_base.proto\"\x81\x03\n\x1a\x43MsgClientUCMAddScreenshot\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x10\n\x08\x66ilename\x18\x02 \x01(\t\x12\x11\n\tthumbname\x18\x03 \x01(\t\x12\x13\n\x0bvr_filename\x18\x0e \x01(\t\x12\x17\n\x0frtime32_created\x18\x04 \x01(\x07\x12\r\n\x05width\x18\x05 \x01(\r\x12\x0e\n\x06height\x18\x06 \x01(\r\x12\x13\n\x0bpermissions\x18\x07 \x01(\r\x12\x0f\n\x07\x63\x61ption\x18\x08 \x01(\t\x12\x15\n\rshortcut_name\x18\t \x01(\t\x12,\n\x03tag\x18\n \x03(\x0b\x32\x1f.CMsgClientUCMAddScreenshot.Tag\x12\x16\n\x0etagged_steamid\x18\x0b \x03(\x06\x12\x13\n\x0bspoiler_tag\x18\x0c \x01(\x08\x12\x1e\n\x16tagged_publishedfileid\x18\r \x03(\x04\x1a*\n\x03Tag\x12\x10\n\x08tag_name\x18\x01 \x01(\t\x12\x11\n\ttag_value\x18\x02 \x01(\t\"d\n\"CMsgClientUCMAddScreenshotResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12*\n\x0cscreenshotid\x18\x02 \x01(\x06:\x14\x31\x38\x34\x34\x36\x37\x34\x34\x30\x37\x33\x37\x30\x39\x35\x35\x31\x36\x31\x35\"K\n\x1d\x43MsgClientUCMDeleteScreenshot\x12*\n\x0cscreenshotid\x18\x01 \x01(\x06:\x14\x31\x38\x34\x34\x36\x37\x34\x34\x30\x37\x33\x37\x30\x39\x35\x35\x31\x36\x31\x35\";\n%CMsgClientUCMDeleteScreenshotResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\"\xd1\x02\n\x18\x43MsgClientUCMPublishFile\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x11\n\tfile_name\x18\x02 \x01(\t\x12\x19\n\x11preview_file_name\x18\x03 \x01(\t\x12\x17\n\x0f\x63onsumer_app_id\x18\x04 \x01(\r\x12\r\n\x05title\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0c\n\x04tags\x18\x08 \x03(\t\x12\x15\n\rworkshop_file\x18\t \x01(\x08\x12\x12\n\nvisibility\x18\n \x01(\x05\x12\x11\n\tfile_type\x18\x0b \x01(\r\x12\x0b\n\x03url\x18\x0c \x01(\t\x12\x16\n\x0evideo_provider\x18\r \x01(\r\x12\x1a\n\x12video_account_name\x18\x0e \x01(\t\x12\x18\n\x10video_identifier\x18\x0f \x01(\t\x12\x13\n\x0bin_progress\x18\x10 \x01(\x08\"\xa1\x01\n CMsgClientUCMPublishFileResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12/\n\x11published_file_id\x18\x02 \x01(\x06:\x14\x31\x38\x34\x34\x36\x37\x34\x34\x30\x37\x33\x37\x30\x39\x35\x35\x31\x36\x31\x35\x12\x38\n)needs_workshop_legal_agreement_acceptance\x18\x03 \x01(\x08:\x05\x66\x61lse\"\xb7\x07\n CMsgClientUCMUpdatePublishedFile\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x19\n\x11published_file_id\x18\x02 \x01(\x06\x12\x11\n\tfile_name\x18\x03 \x01(\t\x12\x19\n\x11preview_file_name\x18\x04 \x01(\t\x12\r\n\x05title\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x0c\n\x04tags\x18\x07 \x03(\t\x12\x12\n\nvisibility\x18\x08 \x01(\x05\x12\x13\n\x0bupdate_file\x18\t \x01(\x08\x12\x1b\n\x13update_preview_file\x18\n \x01(\x08\x12\x14\n\x0cupdate_title\x18\x0b \x01(\x08\x12\x1a\n\x12update_description\x18\x0c \x01(\x08\x12\x13\n\x0bupdate_tags\x18\r \x01(\x08\x12\x19\n\x11update_visibility\x18\x0e \x01(\x08\x12\x1a\n\x12\x63hange_description\x18\x0f \x01(\t\x12\x12\n\nupdate_url\x18\x10 \x01(\x08\x12\x0b\n\x03url\x18\x11 \x01(\t\x12\x1f\n\x17update_content_manifest\x18\x12 \x01(\x08\x12\x18\n\x10\x63ontent_manifest\x18\x13 \x01(\x06\x12\x10\n\x08metadata\x18\x14 \x01(\t\x12\x17\n\x0fupdate_metadata\x18\x15 \x01(\x08\x12\x13\n\x08language\x18\x16 \x01(\x05:\x01\x30\x12\x16\n\x0eremoved_kvtags\x18\x17 \x03(\t\x12=\n\x06kvtags\x18\x18 \x03(\x0b\x32-.CMsgClientUCMUpdatePublishedFile.KeyValueTag\x12\x45\n\x08previews\x18\x19 \x03(\x0b\x32\x33.CMsgClientUCMUpdatePublishedFile.AdditionalPreview\x12\x1a\n\x12previews_to_remove\x18\x1a \x03(\x05\x12\x19\n\x11\x63lear_in_progress\x18\x1b \x01(\x08\x12\x19\n\x11remove_all_kvtags\x18\x1c \x01(\x08\x1a)\n\x0bKeyValueTag\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1a\x8c\x01\n\x11\x41\x64\x64itionalPreview\x12\x1a\n\x12original_file_name\x18\x01 \x01(\t\x12\x1a\n\x12internal_file_name\x18\x02 \x01(\t\x12\x0f\n\x07videoid\x18\x03 \x01(\t\x12\x14\n\x0cpreview_type\x18\x04 \x01(\r\x12\x18\n\x0cupdate_index\x18\x05 \x01(\x05:\x02-1\"x\n(CMsgClientUCMUpdatePublishedFileResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x38\n)needs_workshop_legal_agreement_acceptance\x18\x02 \x01(\x08:\x05\x66\x61lse\"M\n CMsgClientUCMDeletePublishedFile\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\r\">\n(CMsgClientUCMDeletePublishedFileResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\"c\n(CMsgClientUCMEnumerateUserPublishedFiles\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x13\n\x0bstart_index\x18\x02 \x01(\r\x12\x12\n\nsort_order\x18\x03 \x01(\r\"\xe7\x01\n0CMsgClientUCMEnumerateUserPublishedFilesResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12Z\n\x0fpublished_files\x18\x02 \x03(\x0b\x32\x41.CMsgClientUCMEnumerateUserPublishedFilesResponse.PublishedFileId\x12\x15\n\rtotal_results\x18\x03 \x01(\r\x1a,\n\x0fPublishedFileId\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\"\x98\x01\n)CMsgClientUCMEnumerateUserSubscribedFiles\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x13\n\x0bstart_index\x18\x02 \x01(\r\x12\x14\n\tlist_type\x18\x03 \x01(\r:\x01\x31\x12\x1d\n\x12matching_file_type\x18\x04 \x01(\r:\x01\x30\x12\x11\n\x05\x63ount\x18\x05 \x01(\r:\x02\x35\x30\"\x89\x02\n1CMsgClientUCMEnumerateUserSubscribedFilesResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\\\n\x10subscribed_files\x18\x02 \x03(\x0b\x32\x42.CMsgClientUCMEnumerateUserSubscribedFilesResponse.PublishedFileId\x12\x15\n\rtotal_results\x18\x03 \x01(\r\x1aK\n\x0fPublishedFileId\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x1d\n\x12rtime32_subscribed\x18\x02 \x01(\x07:\x01\x30\"\x8c\x01\n4CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x13\n\x0bstart_index\x18\x02 \x01(\r\x12\x12\n\nstart_time\x18\x03 \x01(\x07\x12\x1b\n\x10\x64\x65sired_revision\x18\x04 \x01(\r:\x01\x30\"\x91\x03\n<CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12g\n\x10subscribed_files\x18\x02 \x03(\x0b\x32M.CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId\x12\x15\n\rtotal_results\x18\x03 \x01(\r\x1a\xbc\x01\n\x0fPublishedFileId\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x1d\n\x12rtime32_subscribed\x18\x02 \x01(\x07:\x01\x30\x12\r\n\x05\x61ppid\x18\x03 \x01(\r\x12\x15\n\rfile_hcontent\x18\x04 \x01(\x06\x12\x11\n\tfile_size\x18\x05 \x01(\r\x12\x1c\n\x14rtime32_last_updated\x18\x06 \x01(\x07\x12\x18\n\x10is_depot_content\x18\x07 \x01(\x08\"\xb5\x01\n!CMsgClientUCMPublishedFileUpdated\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\r\x12\x14\n\x0ctime_updated\x18\x03 \x01(\r\x12\x10\n\x08hcontent\x18\x04 \x01(\x06\x12\x11\n\tfile_size\x18\x05 \x01(\x07\x12\x18\n\x10is_depot_content\x18\x06 \x01(\x08\x12\x10\n\x08revision\x18\x07 \x01(\r\"k\n$CMsgClientWorkshopItemChangesRequest\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x19\n\x11last_time_updated\x18\x02 \x01(\r\x12\x18\n\x10num_items_needed\x18\x03 \x01(\r\"\xfb\x01\n%CMsgClientWorkshopItemChangesResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x13\n\x0bupdate_time\x18\x02 \x01(\r\x12O\n\x0eworkshop_items\x18\x05 \x03(\x0b\x32\x37.CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo\x1aX\n\x10WorkshopItemInfo\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x14\n\x0ctime_updated\x18\x02 \x01(\r\x12\x13\n\x0bmanifest_id\x18\x03 \x01(\x06\"\xd8\x01\n!CMsgClientWorkshopItemInfoRequest\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x19\n\x11last_time_updated\x18\x02 \x01(\r\x12G\n\x0eworkshop_items\x18\x03 \x03(\x0b\x32/.CMsgClientWorkshopItemInfoRequest.WorkshopItem\x1a?\n\x0cWorkshopItem\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x14\n\x0ctime_updated\x18\x02 \x01(\r\"\x9f\x02\n\"CMsgClientWorkshopItemInfoResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x13\n\x0bupdate_time\x18\x02 \x01(\r\x12L\n\x0eworkshop_items\x18\x03 \x03(\x0b\x32\x34.CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo\x12\x15\n\rprivate_items\x18\x04 \x03(\x06\x1ak\n\x10WorkshopItemInfo\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x14\n\x0ctime_updated\x18\x02 \x01(\r\x12\x13\n\x0bmanifest_id\x18\x03 \x01(\x06\x12\x11\n\tis_legacy\x18\x04 \x01(\x08\"\x94\x01\n%CMsgClientUCMGetPublishedFilesForUser\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x18\n\x10\x63reator_steam_id\x18\x02 \x01(\x06\x12\x15\n\rrequired_tags\x18\x03 \x03(\t\x12\x15\n\rexcluded_tags\x18\x04 \x03(\t\x12\x13\n\x0bstart_index\x18\x05 \x01(\r\"\xe1\x01\n-CMsgClientUCMGetPublishedFilesForUserResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12W\n\x0fpublished_files\x18\x02 \x03(\x0b\x32>.CMsgClientUCMGetPublishedFilesForUserResponse.PublishedFileId\x12\x15\n\rtotal_results\x18\x03 \x01(\r\x1a,\n\x0fPublishedFileId\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\"d\n\'CMsgClientUCMSetUserPublishedFileAction\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\r\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\x05\"E\n/CMsgClientUCMSetUserPublishedFileActionResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\"g\n0CMsgClientUCMEnumeratePublishedFilesByUserAction\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x13\n\x0bstart_index\x18\x02 \x01(\r\x12\x0e\n\x06\x61\x63tion\x18\x03 \x01(\x05\"\x94\x02\n8CMsgClientUCMEnumeratePublishedFilesByUserActionResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x62\n\x0fpublished_files\x18\x02 \x03(\x0b\x32I.CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.PublishedFileId\x12\x15\n\rtotal_results\x18\x03 \x01(\r\x1aI\n\x0fPublishedFileId\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x1b\n\x10rtime_time_stamp\x18\x02 \x01(\x07:\x01\x30\"\x1e\n\x1c\x43MsgClientScreenshotsChanged\"w\n\x1c\x43MsgClientUpdateUserGameInfo\x12\x14\n\x0csteamid_idgs\x18\x01 \x01(\x06\x12\x0e\n\x06gameid\x18\x02 \x01(\x06\x12\x0f\n\x07game_ip\x18\x03 \x01(\r\x12\x11\n\tgame_port\x18\x04 \x01(\r\x12\r\n\x05token\x18\x05 \x01(\x0c\"S\n\x1c\x43MsgClientRichPresenceUpload\x12\x18\n\x10rich_presence_kv\x18\x01 \x01(\x0c\x12\x19\n\x11steamid_broadcast\x18\x02 \x03(\x06\"8\n\x1d\x43MsgClientRichPresenceRequest\x12\x17\n\x0fsteamid_request\x18\x01 \x03(\x06\"\x9d\x01\n\x1a\x43MsgClientRichPresenceInfo\x12?\n\rrich_presence\x18\x01 \x03(\x0b\x32(.CMsgClientRichPresenceInfo.RichPresence\x1a>\n\x0cRichPresence\x12\x14\n\x0csteamid_user\x18\x01 \x01(\x06\x12\x18\n\x10rich_presence_kv\x18\x02 \x01(\x0c\".\n\x1c\x43MsgClientCheckFileSignature\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\"\xf7\x01\n$CMsgClientCheckFileSignatureResponse\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x0b\n\x03pid\x18\x02 \x01(\r\x12\x0f\n\x07\x65result\x18\x03 \x01(\r\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x18\n\x10\x65signatureresult\x18\x05 \x01(\r\x12\x10\n\x08sha_file\x18\x06 \x01(\x0c\x12\x17\n\x0fsignatureheader\x18\x07 \x01(\x0c\x12\x10\n\x08\x66ilesize\x18\x08 \x01(\r\x12\x14\n\x0cgetlasterror\x18\t \x01(\r\x12\"\n\x1a\x65valvesignaturecheckdetail\x18\n \x01(\r\"P\n\x19\x43MsgClientReadMachineAuth\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x11\n\tcubtoread\x18\x03 \x01(\r\"\xce\x01\n!CMsgClientReadMachineAuthResponse\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x0f\n\x07\x65result\x18\x02 \x01(\r\x12\x10\n\x08\x66ilesize\x18\x03 \x01(\r\x12\x10\n\x08sha_file\x18\x04 \x01(\x0c\x12\x14\n\x0cgetlasterror\x18\x05 \x01(\r\x12\x0e\n\x06offset\x18\x06 \x01(\r\x12\x0f\n\x07\x63ubread\x18\x07 \x01(\r\x12\x12\n\nbytes_read\x18\x08 \x01(\x0c\x12\x17\n\x0f\x66ilename_sentry\x18\t \x01(\t\"\xbd\x01\n\x1b\x43MsgClientUpdateMachineAuth\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x12\n\ncubtowrite\x18\x03 \x01(\r\x12\r\n\x05\x62ytes\x18\x04 \x01(\x0c\x12\x10\n\x08otp_type\x18\x05 \x01(\r\x12\x16\n\x0eotp_identifier\x18\x06 \x01(\t\x12\x18\n\x10otp_sharedsecret\x18\x07 \x01(\x0c\x12\x15\n\rotp_timedrift\x18\x08 \x01(\r\"\xe1\x01\n#CMsgClientUpdateMachineAuthResponse\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x0f\n\x07\x65result\x18\x02 \x01(\r\x12\x10\n\x08\x66ilesize\x18\x03 \x01(\r\x12\x10\n\x08sha_file\x18\x04 \x01(\x0c\x12\x14\n\x0cgetlasterror\x18\x05 \x01(\r\x12\x0e\n\x06offset\x18\x06 \x01(\r\x12\x10\n\x08\x63ubwrote\x18\x07 \x01(\r\x12\x10\n\x08otp_type\x18\x08 \x01(\x05\x12\x11\n\totp_value\x18\t \x01(\r\x12\x16\n\x0eotp_identifier\x18\n \x01(\t\"\xa1\x02\n\x1c\x43MsgClientRequestMachineAuth\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x1a\n\x12\x65result_sentryfile\x18\x02 \x01(\r\x12\x10\n\x08\x66ilesize\x18\x03 \x01(\r\x12\x16\n\x0esha_sentryfile\x18\x04 \x01(\x0c\x12\x1b\n\x13lock_account_action\x18\x06 \x01(\x05\x12\x10\n\x08otp_type\x18\x07 \x01(\r\x12\x16\n\x0eotp_identifier\x18\x08 \x01(\t\x12\x18\n\x10otp_sharedsecret\x18\t \x01(\x0c\x12\x11\n\totp_value\x18\n \x01(\r\x12\x14\n\x0cmachine_name\x18\x0b \x01(\t\x12\x1f\n\x17machine_name_userchosen\x18\x0c \x01(\t\"7\n$CMsgClientRequestMachineAuthResponse\x12\x0f\n\x07\x65result\x18\x01 \x01(\r\"$\n\x15\x43MsgClientRegisterKey\x12\x0b\n\x03key\x18\x01 \x01(\t\"p\n\x1a\x43MsgClientPurchaseResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x1f\n\x17purchase_result_details\x18\x02 \x01(\x05\x12\x1d\n\x15purchase_receipt_info\x18\x03 \x01(\x0c\"\xc5\x01\n\x1c\x43MsgClientActivateOEMLicense\x12\x19\n\x11\x62ios_manufacturer\x18\x01 \x01(\t\x12\x19\n\x11\x62ios_serialnumber\x18\x02 \x01(\t\x12\x14\n\x0clicense_file\x18\x03 \x01(\x0c\x12\x1e\n\x16mainboard_manufacturer\x18\x04 \x01(\t\x12\x19\n\x11mainboard_product\x18\x05 \x01(\t\x12\x1e\n\x16mainboard_serialnumber\x18\x06 \x01(\t\"9\n\x1c\x43MsgClientRegisterOEMMachine\x12\x19\n\x11oem_register_file\x18\x01 \x01(\x0c\"7\n$CMsgClientRegisterOEMMachineResponse\x12\x0f\n\x07\x65result\x18\x01 \x01(\r\"K\n\x1f\x43MsgClientPurchaseWithMachineID\x12\x12\n\npackage_id\x18\x01 \x01(\r\x12\x14\n\x0cmachine_info\x18\x02 \x01(\x0c\"g\n CMsgTrading_InitiateTradeRequest\x12\x18\n\x10trade_request_id\x18\x01 \x01(\r\x12\x15\n\rother_steamid\x18\x02 \x01(\x04\x12\x12\n\nother_name\x18\x03 \x01(\t\"\xd2\x02\n!CMsgTrading_InitiateTradeResponse\x12\x10\n\x08response\x18\x01 \x01(\r\x12\x18\n\x10trade_request_id\x18\x02 \x01(\r\x12\x15\n\rother_steamid\x18\x03 \x01(\x04\x12 \n\x18steamguard_required_days\x18\x04 \x01(\r\x12 \n\x18new_device_cooldown_days\x18\x05 \x01(\r\x12-\n%default_password_reset_probation_days\x18\x06 \x01(\r\x12%\n\x1dpassword_reset_probation_days\x18\x07 \x01(\r\x12+\n#default_email_change_probation_days\x18\x08 \x01(\r\x12#\n\x1b\x65mail_change_probation_days\x18\t \x01(\r\"7\n\x1e\x43MsgTrading_CancelTradeRequest\x12\x15\n\rother_steamid\x18\x01 \x01(\x04\"1\n\x18\x43MsgTrading_StartSession\x12\x15\n\rother_steamid\x18\x01 \x01(\x04\"P\n\x19\x43MsgClientGetCDNAuthToken\x12\x10\n\x08\x64\x65pot_id\x18\x01 \x01(\r\x12\x11\n\thost_name\x18\x02 \x01(\t\x12\x0e\n\x06\x61pp_id\x18\x03 \x01(\r\"C\n\x1f\x43MsgClientGetDepotDecryptionKey\x12\x10\n\x08\x64\x65pot_id\x18\x01 \x01(\r\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\r\"m\n\'CMsgClientGetDepotDecryptionKeyResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x10\n\x08\x64\x65pot_id\x18\x02 \x01(\r\x12\x1c\n\x14\x64\x65pot_encryption_key\x18\x03 \x01(\x0c\"F\n\x1e\x43MsgClientCheckAppBetaPassword\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x14\n\x0c\x62\x65tapassword\x18\x02 \x01(\t\"\xc1\x01\n&CMsgClientCheckAppBetaPasswordResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12K\n\rbetapasswords\x18\x04 \x03(\x0b\x32\x34.CMsgClientCheckAppBetaPasswordResponse.BetaPassword\x1a\x36\n\x0c\x42\x65taPassword\x12\x10\n\x08\x62\x65taname\x18\x01 \x01(\t\x12\x14\n\x0c\x62\x65tapassword\x18\x02 \x01(\t\"\xbe\x04\n\x1c\x43MsgClientUpdateAppJobReport\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x11\n\tdepot_ids\x18\x02 \x03(\r\x12\x11\n\tapp_state\x18\x03 \x01(\r\x12\x15\n\rjob_app_error\x18\x04 \x01(\r\x12\x15\n\rerror_details\x18\x05 \x01(\t\x12\x14\n\x0cjob_duration\x18\x06 \x01(\r\x12\x1f\n\x17\x66iles_validation_failed\x18\x07 \x01(\r\x12\x1c\n\x14job_bytes_downloaded\x18\x08 \x01(\x04\x12\x18\n\x10job_bytes_staged\x18\t \x01(\x04\x12\x16\n\x0e\x62ytes_comitted\x18\n \x01(\x04\x12\x17\n\x0fstart_app_state\x18\x0b \x01(\r\x12\x18\n\x10stats_machine_id\x18\x0c \x01(\x06\x12\x13\n\x0b\x62ranch_name\x18\r \x01(\t\x12\x1e\n\x16total_bytes_downloaded\x18\x0e \x01(\x04\x12\x1a\n\x12total_bytes_staged\x18\x0f \x01(\x04\x12\x1c\n\x14total_bytes_restored\x18\x10 \x01(\x04\x12\x13\n\x0bis_borrowed\x18\x11 \x01(\x08\x12\x17\n\x0fis_free_weekend\x18\x12 \x01(\x08\x12\x1a\n\x12total_bytes_legacy\x18\x13 \x01(\x04\x12\x1b\n\x13total_bytes_patched\x18\x14 \x01(\x04\x12\x19\n\x11total_bytes_saved\x18\x15 \x01(\x04\x12\x0f\n\x07\x63\x65ll_id\x18\x16 \x01(\r\"\xcb\x01\n\x1e\x43MsgClientDPContentStatsReport\x12\x18\n\x10stats_machine_id\x18\x01 \x01(\x06\x12\x14\n\x0c\x63ountry_code\x18\x02 \x01(\t\x12\x0f\n\x07os_type\x18\x03 \x01(\x05\x12\x10\n\x08language\x18\x04 \x01(\x05\x12\x1b\n\x13num_install_folders\x18\x05 \x01(\r\x12\x1b\n\x13num_installed_games\x18\x06 \x01(\r\x12\x1c\n\x14size_installed_games\x18\x07 \x01(\x04\"_\n!CMsgClientGetCDNAuthTokenResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\r:\x01\x32\x12\r\n\x05token\x18\x02 \x01(\t\x12\x17\n\x0f\x65xpiration_time\x18\x03 \x01(\r\"\x9f\x02\n\x1a\x43MsgDownloadRateStatistics\x12\x0f\n\x07\x63\x65ll_id\x18\x01 \x01(\r\x12\x34\n\x05stats\x18\x02 \x03(\x0b\x32%.CMsgDownloadRateStatistics.StatsInfo\x12\x17\n\x0fthrottling_kbps\x18\x03 \x01(\r\x1a\xa0\x01\n\tStatsInfo\x12\x13\n\x0bsource_type\x18\x01 \x01(\r\x12\x11\n\tsource_id\x18\x02 \x01(\r\x12\x0f\n\x07seconds\x18\x03 \x01(\r\x12\r\n\x05\x62ytes\x18\x04 \x01(\x04\x12\x11\n\thost_name\x18\x05 \x01(\t\x12\x14\n\x0cmicroseconds\x18\x06 \x01(\x04\x12\x11\n\tused_ipv6\x18\x07 \x01(\x08\x12\x0f\n\x07proxied\x18\x08 \x01(\x08\"H\n\x1c\x43MsgClientRequestAccountData\x12\x18\n\x10\x61\x63\x63ount_or_email\x18\x01 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\x02 \x01(\r\"\xd7\x01\n$CMsgClientRequestAccountDataResponse\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\r\x12\x0f\n\x07\x65result\x18\x02 \x01(\r\x12\x14\n\x0c\x61\x63\x63ount_name\x18\x03 \x01(\t\x12\x12\n\nct_matches\x18\x04 \x01(\r\x12 \n\x18\x61\x63\x63ount_name_suggestion1\x18\x05 \x01(\t\x12 \n\x18\x61\x63\x63ount_name_suggestion2\x18\x06 \x01(\t\x12 \n\x18\x61\x63\x63ount_name_suggestion3\x18\x07 \x01(\t\"\x99\x01\n\x1b\x43MsgClientUGSGetGlobalStats\x12\x0e\n\x06gameid\x18\x01 \x01(\x04\x12\x1e\n\x16history_days_requested\x18\x02 \x01(\r\x12\x1b\n\x13time_last_requested\x18\x03 \x01(\x07\x12\x18\n\x10\x66irst_day_cached\x18\x04 \x01(\r\x12\x13\n\x0b\x64\x61ys_cached\x18\x05 \x01(\r\"\x95\x02\n#CMsgClientUGSGetGlobalStatsResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x11\n\ttimestamp\x18\x02 \x01(\x07\x12\x13\n\x0b\x64\x61y_current\x18\x03 \x01(\x05\x12\x36\n\x04\x64\x61ys\x18\x04 \x03(\x0b\x32(.CMsgClientUGSGetGlobalStatsResponse.Day\x1az\n\x03\x44\x61y\x12\x0e\n\x06\x64\x61y_id\x18\x01 \x01(\r\x12<\n\x05stats\x18\x02 \x03(\x0b\x32-.CMsgClientUGSGetGlobalStatsResponse.Day.Stat\x1a%\n\x04Stat\x12\x0f\n\x07stat_id\x18\x01 \x01(\x05\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x03\"\x88\x04\n\x12\x43MsgGameServerData\x12\x13\n\x0bsteam_id_gs\x18\x01 \x01(\x06\x12\x15\n\rdeprecated_ip\x18\x02 \x01(\r\x12\x12\n\nquery_port\x18\x03 \x01(\r\x12\x11\n\tgame_port\x18\x04 \x01(\r\x12\x15\n\rsourcetv_port\x18\x05 \x01(\r\x12\x0c\n\x04name\x18\x16 \x01(\t\x12\'\n\x0fgame_ip_address\x18\x17 \x01(\x0b\x32\x0e.CMsgIPAddress\x12\x0e\n\x06\x61pp_id\x18\x06 \x01(\r\x12\x0f\n\x07gamedir\x18\x07 \x01(\t\x12\x0f\n\x07version\x18\x08 \x01(\t\x12\x0f\n\x07product\x18\t \x01(\t\x12\x0e\n\x06region\x18\n \x01(\t\x12+\n\x07players\x18\x0b \x03(\x0b\x32\x1a.CMsgGameServerData.Player\x12\x13\n\x0bmax_players\x18\x0c \x01(\r\x12\x11\n\tbot_count\x18\r \x01(\r\x12\x10\n\x08password\x18\x0e \x01(\x08\x12\x0e\n\x06secure\x18\x0f \x01(\x08\x12\x11\n\tdedicated\x18\x10 \x01(\x08\x12\n\n\x02os\x18\x11 \x01(\t\x12\x11\n\tgame_data\x18\x12 \x01(\t\x12\x19\n\x11game_data_version\x18\x13 \x01(\r\x12\x11\n\tgame_type\x18\x14 \x01(\t\x12\x0b\n\x03map\x18\x15 \x01(\t\x1a\x1a\n\x06Player\x12\x10\n\x08steam_id\x18\x01 \x01(\x06\"o\n\x14\x43MsgGameServerRemove\x12\x10\n\x08steam_id\x18\x01 \x01(\x06\x12\x15\n\rdeprecated_ip\x18\x02 \x01(\r\x12\x12\n\nquery_port\x18\x03 \x01(\r\x12\x1a\n\x02ip\x18\x04 \x01(\x0b\x32\x0e.CMsgIPAddress\"\x82\x01\n\x18\x43MsgClientGMSServerQuery\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x17\n\x0fgeo_location_ip\x18\x02 \x01(\r\x12\x13\n\x0bregion_code\x18\x03 \x01(\r\x12\x13\n\x0b\x66ilter_text\x18\x04 \x01(\t\x12\x13\n\x0bmax_servers\x18\x05 \x01(\r\"\xe2\x01\n CMsgGMSClientServerQueryResponse\x12\x39\n\x07servers\x18\x01 \x03(\x0b\x32(.CMsgGMSClientServerQueryResponse.Server\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x1at\n\x06Server\x12\x1c\n\x14\x64\x65precated_server_ip\x18\x01 \x01(\r\x12\x13\n\x0bserver_port\x18\x02 \x01(\r\x12\x14\n\x0c\x61uth_players\x18\x03 \x01(\r\x12!\n\tserver_ip\x18\x04 \x01(\x0b\x32\x0e.CMsgIPAddress\"O\n\x17\x43MsgGameServerOutOfDate\x12\x13\n\x0bsteam_id_gs\x18\x01 \x01(\x06\x12\x0e\n\x06reject\x18\x02 \x01(\x08\x12\x0f\n\x07message\x18\x03 \x01(\t\"2\n\x19\x43MsgClientRedeemGuestPass\x12\x15\n\rguest_pass_id\x18\x01 \x01(\x06\"c\n!CMsgClientRedeemGuestPassResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\r:\x01\x32\x12\x12\n\npackage_id\x18\x02 \x01(\r\x12\x16\n\x0emust_own_appid\x18\x03 \x01(\r\"8\n\x1f\x43MsgClientGetClanActivityCounts\x12\x15\n\rsteamid_clans\x18\x01 \x03(\x04\"=\n\'CMsgClientGetClanActivityCountsResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\r:\x01\x32\"y\n\x19\x43MsgClientOGSReportString\x12\x13\n\x0b\x61\x63\x63umulated\x18\x01 \x01(\x08\x12\x11\n\tsessionid\x18\x02 \x01(\x04\x12\x10\n\x08severity\x18\x03 \x01(\x05\x12\x11\n\tformatter\x18\x04 \x01(\t\x12\x0f\n\x07varargs\x18\x05 \x01(\x0c\"P\n\x16\x43MsgClientOGSReportBug\x12\x11\n\tsessionid\x18\x01 \x01(\x04\x12\x0f\n\x07\x62ugtext\x18\x02 \x01(\t\x12\x12\n\nscreenshot\x18\x03 \x01(\x0c\"0\n\x17\x43MsgGSAssociateWithClan\x12\x15\n\rsteam_id_clan\x18\x01 \x01(\x06\"L\n\x1f\x43MsgGSAssociateWithClanResponse\x12\x15\n\rsteam_id_clan\x18\x01 \x01(\x06\x12\x12\n\x07\x65result\x18\x02 \x01(\r:\x01\x32\"A\n#CMsgGSComputeNewPlayerCompatibility\x12\x1a\n\x12steam_id_candidate\x18\x01 \x01(\x06\"\xcf\x01\n+CMsgGSComputeNewPlayerCompatibilityResponse\x12\x1a\n\x12steam_id_candidate\x18\x01 \x01(\x06\x12\x12\n\x07\x65result\x18\x02 \x01(\r:\x01\x32\x12\x16\n\x0eis_clan_member\x18\x03 \x01(\x08\x12\x18\n\x10\x63t_dont_like_you\x18\x04 \x01(\x05\x12\x18\n\x10\x63t_you_dont_like\x18\x05 \x01(\x05\x12$\n\x1c\x63t_clanmembers_dont_like_you\x18\x06 \x01(\x05\"\x14\n\x12\x43MsgClientSentLogs\"l\n\x0c\x43MsgGCClient\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x0f\n\x07msgtype\x18\x02 \x01(\r\x12\x0f\n\x07payload\x18\x03 \x01(\x0c\x12\x0f\n\x07steamid\x18\x04 \x01(\x06\x12\x0e\n\x06gcname\x18\x05 \x01(\t\x12\n\n\x02ip\x18\x06 \x01(\r\".\n\x1c\x43MsgClientRequestFreeLicense\x12\x0e\n\x06\x61ppids\x18\x02 \x03(\r\"n\n$CMsgClientRequestFreeLicenseResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\r:\x01\x32\x12\x1a\n\x12granted_packageids\x18\x02 \x03(\r\x12\x16\n\x0egranted_appids\x18\x03 \x03(\r\"\xd3\x01\n#CMsgDRMDownloadRequestWithCrashData\x12\x16\n\x0e\x64ownload_flags\x18\x01 \x01(\r\x12\x1c\n\x14\x64ownload_types_known\x18\x02 \x01(\r\x12\x10\n\x08guid_drm\x18\x03 \x01(\x0c\x12\x12\n\nguid_split\x18\x04 \x01(\x0c\x12\x12\n\nguid_merge\x18\x05 \x01(\x0c\x12\x13\n\x0bmodule_name\x18\x06 \x01(\t\x12\x13\n\x0bmodule_path\x18\x07 \x01(\t\x12\x12\n\ncrash_data\x18\x08 \x01(\x0c\"\xdb\x01\n\x17\x43MsgDRMDownloadResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\r:\x01\x32\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\r\x12\x1a\n\x12\x62lob_download_type\x18\x03 \x01(\r\x12\x12\n\nmerge_guid\x18\x04 \x01(\x0c\x12\x1c\n\x14\x64ownload_file_dfs_ip\x18\x05 \x01(\r\x12\x1e\n\x16\x64ownload_file_dfs_port\x18\x06 \x01(\r\x12\x19\n\x11\x64ownload_file_url\x18\x07 \x01(\t\x12\x13\n\x0bmodule_path\x18\x08 \x01(\t\"\xd7\x01\n\x12\x43MsgDRMFinalResult\x12\x12\n\x07\x65Result\x18\x01 \x01(\r:\x01\x32\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\r\x12\x1a\n\x12\x62lob_download_type\x18\x03 \x01(\r\x12\x14\n\x0c\x65rror_detail\x18\x04 \x01(\r\x12\x12\n\nmerge_guid\x18\x05 \x01(\x0c\x12\x1c\n\x14\x64ownload_file_dfs_ip\x18\x06 \x01(\r\x12\x1e\n\x16\x64ownload_file_dfs_port\x18\x07 \x01(\r\x12\x19\n\x11\x64ownload_file_url\x18\x08 \x01(\t\"3\n\x1e\x43MsgClientDPCheckSpecialSurvey\x12\x11\n\tsurvey_id\x18\x01 \x01(\r\"\x96\x01\n&CMsgClientDPCheckSpecialSurveyResponse\x12\x12\n\x07\x65Result\x18\x01 \x01(\r:\x01\x32\x12\r\n\x05state\x18\x02 \x01(\r\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x12\n\ncustom_url\x18\x04 \x01(\t\x12\x18\n\x10include_software\x18\x05 \x01(\x08\x12\r\n\x05token\x18\x06 \x01(\x0c\"H\n%CMsgClientDPSendSpecialSurveyResponse\x12\x11\n\tsurvey_id\x18\x01 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"O\n*CMsgClientDPSendSpecialSurveyResponseReply\x12\x12\n\x07\x65Result\x18\x01 \x01(\r:\x01\x32\x12\r\n\x05token\x18\x02 \x01(\x0c\"W\n\'CMsgClientRequestForgottenPasswordEmail\x12\x14\n\x0c\x61\x63\x63ount_name\x18\x01 \x01(\t\x12\x16\n\x0epassword_tried\x18\x02 \x01(\t\"_\n/CMsgClientRequestForgottenPasswordEmailResponse\x12\x0f\n\x07\x65Result\x18\x01 \x01(\r\x12\x1b\n\x13use_secret_question\x18\x02 \x01(\x08\"\xf6\x01\n\x1b\x43MsgClientItemAnnouncements\x12\x17\n\x0f\x63ount_new_items\x18\x01 \x01(\r\x12=\n\x0cunseen_items\x18\x02 \x03(\x0b\x32\'.CMsgClientItemAnnouncements.UnseenItem\x1a\x7f\n\nUnseenItem\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x12\n\ncontext_id\x18\x02 \x01(\x04\x12\x10\n\x08\x61sset_id\x18\x03 \x01(\x04\x12\x0e\n\x06\x61mount\x18\x04 \x01(\x04\x12\x16\n\x0ertime32_gained\x18\x05 \x01(\x07\x12\x14\n\x0csource_appid\x18\x06 \x01(\r\"$\n\"CMsgClientRequestItemAnnouncements\"\x9e\x01\n\x1b\x43MsgClientUserNotifications\x12@\n\rnotifications\x18\x01 \x03(\x0b\x32).CMsgClientUserNotifications.Notification\x1a=\n\x0cNotification\x12\x1e\n\x16user_notification_type\x18\x01 \x01(\r\x12\r\n\x05\x63ount\x18\x02 \x01(\r\"\x88\x01\n\x1e\x43MsgClientCommentNotifications\x12\x1a\n\x12\x63ount_new_comments\x18\x01 \x01(\r\x12 \n\x18\x63ount_new_comments_owner\x18\x02 \x01(\r\x12(\n count_new_comments_subscriptions\x18\x03 \x01(\r\"\'\n%CMsgClientRequestCommentNotifications\"g\n$CMsgClientOfflineMessageNotification\x12\x18\n\x10offline_messages\x18\x01 \x01(\r\x12%\n\x1d\x66riends_with_offline_messages\x18\x02 \x03(\r\"&\n$CMsgClientRequestOfflineMessageCount\"8\n%CMsgClientChatGetFriendMessageHistory\x12\x0f\n\x07steamid\x18\x01 \x01(\x06\"\xf9\x01\n-CMsgClientChatGetFriendMessageHistoryResponse\x12\x0f\n\x07steamid\x18\x01 \x01(\x06\x12\x0f\n\x07success\x18\x02 \x01(\r\x12N\n\x08messages\x18\x03 \x03(\x0b\x32<.CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage\x1aV\n\rFriendMessage\x12\x11\n\taccountid\x18\x01 \x01(\r\x12\x11\n\ttimestamp\x18\x02 \x01(\r\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x0e\n\x06unread\x18\x04 \x01(\x08\"9\n7CMsgClientChatGetFriendMessageHistoryForOfflineMessages\"7\n!CMsgClientFSGetFriendsSteamLevels\x12\x12\n\naccountids\x18\x01 \x03(\r\"\x9b\x01\n)CMsgClientFSGetFriendsSteamLevelsResponse\x12\x42\n\x07\x66riends\x18\x01 \x03(\x0b\x32\x31.CMsgClientFSGetFriendsSteamLevelsResponse.Friend\x1a*\n\x06\x46riend\x12\x11\n\taccountid\x18\x01 \x01(\r\x12\r\n\x05level\x18\x02 \x01(\r\"\xeb\x01\n\x17\x43MsgClientEmailAddrInfo\x12\x15\n\remail_address\x18\x01 \x01(\t\x12\x1a\n\x12\x65mail_is_validated\x18\x02 \x01(\x08\x12 \n\x18\x65mail_validation_changed\x18\x03 \x01(\x08\x12\'\n\x1f\x63redential_change_requires_code\x18\x04 \x01(\x08\x12\x31\n)password_or_secretqa_change_requires_code\x18\x05 \x01(\x08\x12\x1f\n\x17remind_user_about_email\x18\x06 \x01(\x08\"\x8b\x01\n\x16\x43MsgCREItemVoteSummary\x12\x43\n\x12published_file_ids\x18\x01 \x03(\x0b\x32\'.CMsgCREItemVoteSummary.PublishedFileId\x1a,\n\x0fPublishedFileId\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\"\xfa\x01\n\x1e\x43MsgCREItemVoteSummaryResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12L\n\x13item_vote_summaries\x18\x02 \x03(\x0b\x32/.CMsgCREItemVoteSummaryResponse.ItemVoteSummary\x1av\n\x0fItemVoteSummary\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x11\n\tvotes_for\x18\x02 \x01(\x05\x12\x15\n\rvotes_against\x18\x03 \x01(\x05\x12\x0f\n\x07reports\x18\x04 \x01(\x05\x12\r\n\x05score\x18\x05 \x01(\x02\"P\n\"CMsgCREUpdateUserPublishedItemVote\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x0f\n\x07vote_up\x18\x02 \x01(\x08\"@\n*CMsgCREUpdateUserPublishedItemVoteResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\"\xab\x01\n&CMsgCREGetUserPublishedItemVoteDetails\x12S\n\x12published_file_ids\x18\x01 \x03(\x0b\x32\x37.CMsgCREGetUserPublishedItemVoteDetails.PublishedFileId\x1a,\n\x0fPublishedFileId\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\"\xea\x01\n.CMsgCREGetUserPublishedItemVoteDetailsResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x62\n\x16user_item_vote_details\x18\x02 \x03(\x0b\x32\x42.CMsgCREGetUserPublishedItemVoteDetailsResponse.UserItemVoteDetail\x1a@\n\x12UserItemVoteDetail\x12\x19\n\x11published_file_id\x18\x01 \x01(\x06\x12\x0f\n\x04vote\x18\x02 \x01(\x05:\x01\x30\"\xb9\x01\n\x18\x43MsgGameServerPingSample\x12\r\n\x05my_ip\x18\x01 \x01(\x07\x12\x11\n\tgs_app_id\x18\x02 \x01(\x05\x12\x34\n\ngs_samples\x18\x03 \x03(\x0b\x32 .CMsgGameServerPingSample.Sample\x1a\x45\n\x06Sample\x12\n\n\x02ip\x18\x01 \x01(\x07\x12\x13\n\x0b\x61vg_ping_ms\x18\x02 \x01(\r\x12\x1a\n\x12stddev_ping_ms_x10\x18\x03 \x01(\r\"*\n\x16\x43MsgFSGetFollowerCount\x12\x10\n\x08steam_id\x18\x01 \x01(\x06\"F\n\x1e\x43MsgFSGetFollowerCountResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x10\n\x05\x63ount\x18\x02 \x01(\x05:\x01\x30\"(\n\x14\x43MsgFSGetIsFollowing\x12\x10\n\x08steam_id\x18\x01 \x01(\x06\"O\n\x1c\x43MsgFSGetIsFollowingResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x1b\n\x0cis_following\x18\x02 \x01(\x08:\x05\x66\x61lse\"3\n\x1c\x43MsgFSEnumerateFollowingList\x12\x13\n\x0bstart_index\x18\x01 \x01(\r\"d\n$CMsgFSEnumerateFollowingListResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x15\n\rtotal_results\x18\x02 \x01(\x05\x12\x11\n\tsteam_ids\x18\x03 \x03(\x06\"0\n\x1f\x43MsgDPGetNumberOfCurrentPlayers\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\"S\n\'CMsgDPGetNumberOfCurrentPlayersResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x14\n\x0cplayer_count\x18\x02 \x01(\x05\"a\n#CMsgClientFriendUserStatusPublished\x12\x16\n\x0e\x66riend_steamid\x18\x01 \x01(\x06\x12\r\n\x05\x61ppid\x18\x02 \x01(\r\x12\x13\n\x0bstatus_text\x18\x03 \x01(\t\"h\n\x1d\x43MsgClientServiceMethodLegacy\x12\x13\n\x0bmethod_name\x18\x01 \x01(\t\x12\x19\n\x11serialized_method\x18\x02 \x01(\x0c\x12\x17\n\x0fis_notification\x18\x03 \x01(\x08\"`\n%CMsgClientServiceMethodLegacyResponse\x12\x13\n\x0bmethod_name\x18\x01 \x01(\t\x12\"\n\x1aserialized_method_response\x18\x02 \x01(\x0c\"5\n\x10\x43MsgClientUIMode\x12\x0e\n\x06uimode\x18\x01 \x01(\r\x12\x11\n\tchat_mode\x18\x02 \x01(\r\"<\n&CMsgClientVanityURLChangedNotification\x12\x12\n\nvanity_url\x18\x01 \x01(\t\"y\n%CMsgClientAuthorizeLocalDeviceRequest\x12\x1a\n\x12\x64\x65vice_description\x18\x01 \x01(\t\x12\x18\n\x10owner_account_id\x18\x02 \x01(\r\x12\x1a\n\x12local_device_token\x18\x03 \x01(\x04\"k\n\x1e\x43MsgClientAuthorizeLocalDevice\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x18\n\x10owner_account_id\x18\x02 \x01(\r\x12\x1b\n\x13\x61uthed_device_token\x18\x03 \x01(\x04\"v\n*CMsgClientAuthorizeLocalDeviceNotification\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x18\n\x10owner_account_id\x18\x02 \x01(\r\x12\x1a\n\x12local_device_token\x18\x03 \x01(\x04\"n\n\"CMsgClientDeauthorizeDeviceRequest\x12\"\n\x1a\x64\x65\x61uthorization_account_id\x18\x01 \x01(\r\x12$\n\x1c\x64\x65\x61uthorization_device_token\x18\x02 \x01(\x04\"U\n\x1b\x43MsgClientDeauthorizeDevice\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\"\n\x1a\x64\x65\x61uthorization_account_id\x18\x02 \x01(\r\"\xd1\x01\n&CMsgClientUseLocalDeviceAuthorizations\x12 \n\x18\x61uthorization_account_id\x18\x01 \x03(\r\x12J\n\rdevice_tokens\x18\x02 \x03(\x0b\x32\x33.CMsgClientUseLocalDeviceAuthorizations.DeviceToken\x1a\x39\n\x0b\x44\x65viceToken\x12\x18\n\x10owner_account_id\x18\x01 \x01(\r\x12\x10\n\x08token_id\x18\x02 \x01(\x04\" \n\x1e\x43MsgClientGetAuthorizedDevices\"\xad\x02\n&CMsgClientGetAuthorizedDevicesResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12S\n\x11\x61uthorized_device\x18\x02 \x03(\x0b\x32\x38.CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice\x1a\x99\x01\n\x10\x41uthorizedDevice\x12\x19\n\x11\x61uth_device_token\x18\x01 \x01(\x04\x12\x13\n\x0b\x64\x65vice_name\x18\x02 \x01(\t\x12\x18\n\x10last_access_time\x18\x03 \x01(\r\x12\x13\n\x0b\x62orrower_id\x18\x04 \x01(\r\x12\x12\n\nis_pending\x18\x05 \x01(\x08\x12\x12\n\napp_played\x18\x06 \x01(\r\"\xc2\x01\n!CMsgClientSharedLibraryLockStatus\x12H\n\x0elocked_library\x18\x01 \x03(\x0b\x32\x30.CMsgClientSharedLibraryLockStatus.LockedLibrary\x12\x1d\n\x15own_library_locked_by\x18\x02 \x01(\r\x1a\x34\n\rLockedLibrary\x12\x10\n\x08owner_id\x18\x01 \x01(\r\x12\x11\n\tlocked_by\x18\x02 \x01(\r\"\xa7\x01\n\"CMsgClientSharedLibraryStopPlaying\x12\x14\n\x0cseconds_left\x18\x01 \x01(\x05\x12>\n\tstop_apps\x18\x02 \x03(\x0b\x32+.CMsgClientSharedLibraryStopPlaying.StopApp\x1a+\n\x07StopApp\x12\x0e\n\x06\x61pp_id\x18\x01 \x01(\r\x12\x10\n\x08owner_id\x18\x02 \x01(\r\"\xf1\x01\n\x15\x43MsgClientServiceCall\x12\x15\n\rsysid_routing\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63\x61ll_handle\x18\x02 \x01(\r\x12\x12\n\nmodule_crc\x18\x03 \x01(\r\x12\x13\n\x0bmodule_hash\x18\x04 \x01(\x0c\x12\x13\n\x0b\x66unction_id\x18\x05 \x01(\r\x12\x16\n\x0e\x63ub_output_max\x18\x06 \x01(\r\x12\r\n\x05\x66lags\x18\x07 \x01(\r\x12\x15\n\rcallparameter\x18\x08 \x01(\x0c\x12\x11\n\tping_only\x18\t \x01(\x08\x12\x1d\n\x15max_outstanding_calls\x18\n \x01(\r\"Z\n\x17\x43MsgClientServiceModule\x12\x12\n\nmodule_crc\x18\x01 \x01(\r\x12\x13\n\x0bmodule_hash\x18\x02 \x01(\x0c\x12\x16\n\x0emodule_content\x18\x03 \x01(\x0c\"\xb8\x04\n\x1d\x43MsgClientServiceCallResponse\x12\x15\n\rsysid_routing\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63\x61ll_handle\x18\x02 \x01(\r\x12\x12\n\nmodule_crc\x18\x03 \x01(\r\x12\x13\n\x0bmodule_hash\x18\x04 \x01(\x0c\x12\x13\n\x0b\x65\x63\x61llresult\x18\x05 \x01(\r\x12\x16\n\x0eresult_content\x18\x06 \x01(\x0c\x12\x17\n\x0fos_version_info\x18\x07 \x01(\x0c\x12\x13\n\x0bsystem_info\x18\x08 \x01(\x0c\x12\x14\n\x0cload_address\x18\t \x01(\x06\x12\x18\n\x10\x65xception_record\x18\n \x01(\x0c\x12 \n\x18portable_os_version_info\x18\x0b \x01(\x0c\x12\x1c\n\x14portable_system_info\x18\x0c \x01(\x0c\x12\x15\n\rwas_converted\x18\r \x01(\x08\x12\x17\n\x0finternal_result\x18\x0e \x01(\r\x12\x15\n\rcurrent_count\x18\x0f \x01(\r\x12\x18\n\x10last_call_handle\x18\x10 \x01(\r\x12\x1c\n\x14last_call_module_crc\x18\x11 \x01(\r\x12\x1f\n\x17last_call_sysid_routing\x18\x12 \x01(\x0c\x12\x18\n\x10last_ecallresult\x18\x13 \x01(\r\x12\x1c\n\x14last_callissue_delta\x18\x14 \x01(\r\x12\x1f\n\x17last_callcomplete_delta\x18\x15 \x01(\r\"\x17\n\x15\x43MsgAMUnlockStreaming\"K\n\x1d\x43MsgAMUnlockStreamingResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\x12\x16\n\x0e\x65ncryption_key\x18\x02 \x01(\x0c\"\x12\n\x10\x43MsgAMUnlockHEVC\".\n\x18\x43MsgAMUnlockHEVCResponse\x12\x12\n\x07\x65result\x18\x01 \x01(\x05:\x01\x32\"M\n\x1d\x43MsgClientPlayingSessionState\x12\x17\n\x0fplaying_blocked\x18\x02 \x01(\x08\x12\x13\n\x0bplaying_app\x18\x03 \x01(\r\"6\n\x1c\x43MsgClientKickPlayingSession\x12\x16\n\x0eonly_stop_game\x18\x01 \x01(\x08\"v\n\x1f\x43MsgClientVoiceCallPreAuthorize\x12\x16\n\x0e\x63\x61ller_steamid\x18\x01 \x01(\x06\x12\x18\n\x10receiver_steamid\x18\x02 \x01(\x06\x12\x11\n\tcaller_id\x18\x03 \x01(\x05\x12\x0e\n\x06hangup\x18\x04 \x01(\x08\"\x82\x01\n\'CMsgClientVoiceCallPreAuthorizeResponse\x12\x16\n\x0e\x63\x61ller_steamid\x18\x01 \x01(\x06\x12\x18\n\x10receiver_steamid\x18\x02 \x01(\x06\x12\x12\n\x07\x65result\x18\x03 \x01(\x05:\x01\x32\x12\x11\n\tcaller_id\x18\x04 \x01(\x05\"B\n\x1c\x43MsgBadgeCraftedNotification\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x13\n\x0b\x62\x61\x64ge_level\x18\x02 \x01(\rB\x05H\x01\x90\x01\x00') , dependencies=[steammessages__base__pb2.DESCRIPTOR,]) _CMSGCLIENTUCMADDSCREENSHOT_TAG = _descriptor.Descriptor( name='Tag', full_name='CMsgClientUCMAddScreenshot.Tag', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='tag_name', full_name='CMsgClientUCMAddScreenshot.Tag.tag_name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tag_value', full_name='CMsgClientUCMAddScreenshot.Tag.tag_value', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=408, serialized_end=450, ) _CMSGCLIENTUCMADDSCREENSHOT = _descriptor.Descriptor( name='CMsgClientUCMAddScreenshot', full_name='CMsgClientUCMAddScreenshot', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='appid', full_name='CMsgClientUCMAddScreenshot.appid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filename', full_name='CMsgClientUCMAddScreenshot.filename', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='thumbname', full_name='CMsgClientUCMAddScreenshot.thumbname', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='vr_filename', full_name='CMsgClientUCMAddScreenshot.vr_filename', index=3, number=14, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rtime32_created', full_name='CMsgClientUCMAddScreenshot.rtime32_created', index=4, number=4, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='width', full_name='CMsgClientUCMAddScreenshot.width', index=5, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='height', full_name='CMsgClientUCMAddScreenshot.height', index=6, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='permissions', full_name='CMsgClientUCMAddScreenshot.permissions', index=7, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='caption', full_name='CMsgClientUCMAddScreenshot.caption', index=8, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='shortcut_name', full_name='CMsgClientUCMAddScreenshot.shortcut_name', index=9, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tag', full_name='CMsgClientUCMAddScreenshot.tag', index=10, number=10, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tagged_steamid', full_name='CMsgClientUCMAddScreenshot.tagged_steamid', index=11, number=11, type=6, cpp_type=4, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='spoiler_tag', full_name='CMsgClientUCMAddScreenshot.spoiler_tag', index=12, number=12, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tagged_publishedfileid', full_name='CMsgClientUCMAddScreenshot.tagged_publishedfileid', index=13, number=13, type=4, cpp_type=4, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUCMADDSCREENSHOT_TAG, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=65, serialized_end=450, ) _CMSGCLIENTUCMADDSCREENSHOTRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMAddScreenshotResponse', full_name='CMsgClientUCMAddScreenshotResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMAddScreenshotResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='screenshotid', full_name='CMsgClientUCMAddScreenshotResponse.screenshotid', index=1, number=2, type=6, cpp_type=4, label=1, has_default_value=True, default_value=18446744073709551615, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=452, serialized_end=552, ) _CMSGCLIENTUCMDELETESCREENSHOT = _descriptor.Descriptor( name='CMsgClientUCMDeleteScreenshot', full_name='CMsgClientUCMDeleteScreenshot', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='screenshotid', full_name='CMsgClientUCMDeleteScreenshot.screenshotid', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=True, default_value=18446744073709551615, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=554, serialized_end=629, ) _CMSGCLIENTUCMDELETESCREENSHOTRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMDeleteScreenshotResponse', full_name='CMsgClientUCMDeleteScreenshotResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMDeleteScreenshotResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=631, serialized_end=690, ) _CMSGCLIENTUCMPUBLISHFILE = _descriptor.Descriptor( name='CMsgClientUCMPublishFile', full_name='CMsgClientUCMPublishFile', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMPublishFile.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='file_name', full_name='CMsgClientUCMPublishFile.file_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='preview_file_name', full_name='CMsgClientUCMPublishFile.preview_file_name', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='consumer_app_id', full_name='CMsgClientUCMPublishFile.consumer_app_id', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='title', full_name='CMsgClientUCMPublishFile.title', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='CMsgClientUCMPublishFile.description', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tags', full_name='CMsgClientUCMPublishFile.tags', index=6, number=8, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='workshop_file', full_name='CMsgClientUCMPublishFile.workshop_file', index=7, number=9, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='visibility', full_name='CMsgClientUCMPublishFile.visibility', index=8, number=10, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='file_type', full_name='CMsgClientUCMPublishFile.file_type', index=9, number=11, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='url', full_name='CMsgClientUCMPublishFile.url', index=10, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='video_provider', full_name='CMsgClientUCMPublishFile.video_provider', index=11, number=13, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='video_account_name', full_name='CMsgClientUCMPublishFile.video_account_name', index=12, number=14, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='video_identifier', full_name='CMsgClientUCMPublishFile.video_identifier', index=13, number=15, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='in_progress', full_name='CMsgClientUCMPublishFile.in_progress', index=14, number=16, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=693, serialized_end=1030, ) _CMSGCLIENTUCMPUBLISHFILERESPONSE = _descriptor.Descriptor( name='CMsgClientUCMPublishFileResponse', full_name='CMsgClientUCMPublishFileResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMPublishFileResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMPublishFileResponse.published_file_id', index=1, number=2, type=6, cpp_type=4, label=1, has_default_value=True, default_value=18446744073709551615, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='needs_workshop_legal_agreement_acceptance', full_name='CMsgClientUCMPublishFileResponse.needs_workshop_legal_agreement_acceptance', index=2, number=3, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1033, serialized_end=1194, ) _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_KEYVALUETAG = _descriptor.Descriptor( name='KeyValueTag', full_name='CMsgClientUCMUpdatePublishedFile.KeyValueTag', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='key', full_name='CMsgClientUCMUpdatePublishedFile.KeyValueTag.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='CMsgClientUCMUpdatePublishedFile.KeyValueTag.value', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1964, serialized_end=2005, ) _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_ADDITIONALPREVIEW = _descriptor.Descriptor( name='AdditionalPreview', full_name='CMsgClientUCMUpdatePublishedFile.AdditionalPreview', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='original_file_name', full_name='CMsgClientUCMUpdatePublishedFile.AdditionalPreview.original_file_name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='internal_file_name', full_name='CMsgClientUCMUpdatePublishedFile.AdditionalPreview.internal_file_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='videoid', full_name='CMsgClientUCMUpdatePublishedFile.AdditionalPreview.videoid', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='preview_type', full_name='CMsgClientUCMUpdatePublishedFile.AdditionalPreview.preview_type', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_index', full_name='CMsgClientUCMUpdatePublishedFile.AdditionalPreview.update_index', index=4, number=5, type=5, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2008, serialized_end=2148, ) _CMSGCLIENTUCMUPDATEPUBLISHEDFILE = _descriptor.Descriptor( name='CMsgClientUCMUpdatePublishedFile', full_name='CMsgClientUCMUpdatePublishedFile', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMUpdatePublishedFile.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMUpdatePublishedFile.published_file_id', index=1, number=2, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='file_name', full_name='CMsgClientUCMUpdatePublishedFile.file_name', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='preview_file_name', full_name='CMsgClientUCMUpdatePublishedFile.preview_file_name', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='title', full_name='CMsgClientUCMUpdatePublishedFile.title', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='CMsgClientUCMUpdatePublishedFile.description', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tags', full_name='CMsgClientUCMUpdatePublishedFile.tags', index=6, number=7, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='visibility', full_name='CMsgClientUCMUpdatePublishedFile.visibility', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_file', full_name='CMsgClientUCMUpdatePublishedFile.update_file', index=8, number=9, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_preview_file', full_name='CMsgClientUCMUpdatePublishedFile.update_preview_file', index=9, number=10, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_title', full_name='CMsgClientUCMUpdatePublishedFile.update_title', index=10, number=11, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_description', full_name='CMsgClientUCMUpdatePublishedFile.update_description', index=11, number=12, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_tags', full_name='CMsgClientUCMUpdatePublishedFile.update_tags', index=12, number=13, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_visibility', full_name='CMsgClientUCMUpdatePublishedFile.update_visibility', index=13, number=14, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='change_description', full_name='CMsgClientUCMUpdatePublishedFile.change_description', index=14, number=15, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_url', full_name='CMsgClientUCMUpdatePublishedFile.update_url', index=15, number=16, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='url', full_name='CMsgClientUCMUpdatePublishedFile.url', index=16, number=17, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_content_manifest', full_name='CMsgClientUCMUpdatePublishedFile.update_content_manifest', index=17, number=18, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='content_manifest', full_name='CMsgClientUCMUpdatePublishedFile.content_manifest', index=18, number=19, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='metadata', full_name='CMsgClientUCMUpdatePublishedFile.metadata', index=19, number=20, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_metadata', full_name='CMsgClientUCMUpdatePublishedFile.update_metadata', index=20, number=21, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language', full_name='CMsgClientUCMUpdatePublishedFile.language', index=21, number=22, type=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='removed_kvtags', full_name='CMsgClientUCMUpdatePublishedFile.removed_kvtags', index=22, number=23, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='kvtags', full_name='CMsgClientUCMUpdatePublishedFile.kvtags', index=23, number=24, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='previews', full_name='CMsgClientUCMUpdatePublishedFile.previews', index=24, number=25, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='previews_to_remove', full_name='CMsgClientUCMUpdatePublishedFile.previews_to_remove', index=25, number=26, type=5, cpp_type=1, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='clear_in_progress', full_name='CMsgClientUCMUpdatePublishedFile.clear_in_progress', index=26, number=27, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='remove_all_kvtags', full_name='CMsgClientUCMUpdatePublishedFile.remove_all_kvtags', index=27, number=28, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUCMUPDATEPUBLISHEDFILE_KEYVALUETAG, _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_ADDITIONALPREVIEW, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=1197, serialized_end=2148, ) _CMSGCLIENTUCMUPDATEPUBLISHEDFILERESPONSE = _descriptor.Descriptor( name='CMsgClientUCMUpdatePublishedFileResponse', full_name='CMsgClientUCMUpdatePublishedFileResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMUpdatePublishedFileResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='needs_workshop_legal_agreement_acceptance', full_name='CMsgClientUCMUpdatePublishedFileResponse.needs_workshop_legal_agreement_acceptance', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2150, serialized_end=2270, ) _CMSGCLIENTUCMDELETEPUBLISHEDFILE = _descriptor.Descriptor( name='CMsgClientUCMDeletePublishedFile', full_name='CMsgClientUCMDeletePublishedFile', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMDeletePublishedFile.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMDeletePublishedFile.app_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2272, serialized_end=2349, ) _CMSGCLIENTUCMDELETEPUBLISHEDFILERESPONSE = _descriptor.Descriptor( name='CMsgClientUCMDeletePublishedFileResponse', full_name='CMsgClientUCMDeletePublishedFileResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMDeletePublishedFileResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2351, serialized_end=2413, ) _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILES = _descriptor.Descriptor( name='CMsgClientUCMEnumerateUserPublishedFiles', full_name='CMsgClientUCMEnumerateUserPublishedFiles', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMEnumerateUserPublishedFiles.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_index', full_name='CMsgClientUCMEnumerateUserPublishedFiles.start_index', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sort_order', full_name='CMsgClientUCMEnumerateUserPublishedFiles.sort_order', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2415, serialized_end=2514, ) _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE_PUBLISHEDFILEID = _descriptor.Descriptor( name='PublishedFileId', full_name='CMsgClientUCMEnumerateUserPublishedFilesResponse.PublishedFileId', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMEnumerateUserPublishedFilesResponse.PublishedFileId.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2704, serialized_end=2748, ) _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMEnumerateUserPublishedFilesResponse', full_name='CMsgClientUCMEnumerateUserPublishedFilesResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMEnumerateUserPublishedFilesResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='published_files', full_name='CMsgClientUCMEnumerateUserPublishedFilesResponse.published_files', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_results', full_name='CMsgClientUCMEnumerateUserPublishedFilesResponse.total_results', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE_PUBLISHEDFILEID, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2517, serialized_end=2748, ) _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILES = _descriptor.Descriptor( name='CMsgClientUCMEnumerateUserSubscribedFiles', full_name='CMsgClientUCMEnumerateUserSubscribedFiles', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMEnumerateUserSubscribedFiles.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_index', full_name='CMsgClientUCMEnumerateUserSubscribedFiles.start_index', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='list_type', full_name='CMsgClientUCMEnumerateUserSubscribedFiles.list_type', index=2, number=3, type=13, cpp_type=3, label=1, has_default_value=True, default_value=1, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='matching_file_type', full_name='CMsgClientUCMEnumerateUserSubscribedFiles.matching_file_type', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=True, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='count', full_name='CMsgClientUCMEnumerateUserSubscribedFiles.count', index=4, number=5, type=13, cpp_type=3, label=1, has_default_value=True, default_value=50, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2751, serialized_end=2903, ) _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE_PUBLISHEDFILEID = _descriptor.Descriptor( name='PublishedFileId', full_name='CMsgClientUCMEnumerateUserSubscribedFilesResponse.PublishedFileId', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMEnumerateUserSubscribedFilesResponse.PublishedFileId.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rtime32_subscribed', full_name='CMsgClientUCMEnumerateUserSubscribedFilesResponse.PublishedFileId.rtime32_subscribed', index=1, number=2, type=7, cpp_type=3, label=1, has_default_value=True, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3096, serialized_end=3171, ) _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMEnumerateUserSubscribedFilesResponse', full_name='CMsgClientUCMEnumerateUserSubscribedFilesResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMEnumerateUserSubscribedFilesResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='subscribed_files', full_name='CMsgClientUCMEnumerateUserSubscribedFilesResponse.subscribed_files', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_results', full_name='CMsgClientUCMEnumerateUserSubscribedFilesResponse.total_results', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE_PUBLISHEDFILEID, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2906, serialized_end=3171, ) _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATES = _descriptor.Descriptor( name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_index', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates.start_index', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_time', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates.start_time', index=2, number=3, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='desired_revision', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates.desired_revision', index=3, number=4, type=13, cpp_type=3, label=1, has_default_value=True, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3174, serialized_end=3314, ) _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE_PUBLISHEDFILEID = _descriptor.Descriptor( name='PublishedFileId', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rtime32_subscribed', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId.rtime32_subscribed', index=1, number=2, type=7, cpp_type=3, label=1, has_default_value=True, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='appid', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId.appid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='file_hcontent', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId.file_hcontent', index=3, number=4, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='file_size', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId.file_size', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rtime32_last_updated', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId.rtime32_last_updated', index=5, number=6, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_depot_content', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId.is_depot_content', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3530, serialized_end=3718, ) _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='subscribed_files', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.subscribed_files', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_results', full_name='CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.total_results', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE_PUBLISHEDFILEID, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3317, serialized_end=3718, ) _CMSGCLIENTUCMPUBLISHEDFILEUPDATED = _descriptor.Descriptor( name='CMsgClientUCMPublishedFileUpdated', full_name='CMsgClientUCMPublishedFileUpdated', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMPublishedFileUpdated.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMPublishedFileUpdated.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_updated', full_name='CMsgClientUCMPublishedFileUpdated.time_updated', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='hcontent', full_name='CMsgClientUCMPublishedFileUpdated.hcontent', index=3, number=4, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='file_size', full_name='CMsgClientUCMPublishedFileUpdated.file_size', index=4, number=5, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_depot_content', full_name='CMsgClientUCMPublishedFileUpdated.is_depot_content', index=5, number=6, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='revision', full_name='CMsgClientUCMPublishedFileUpdated.revision', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3721, serialized_end=3902, ) _CMSGCLIENTWORKSHOPITEMCHANGESREQUEST = _descriptor.Descriptor( name='CMsgClientWorkshopItemChangesRequest', full_name='CMsgClientWorkshopItemChangesRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientWorkshopItemChangesRequest.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_time_updated', full_name='CMsgClientWorkshopItemChangesRequest.last_time_updated', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='num_items_needed', full_name='CMsgClientWorkshopItemChangesRequest.num_items_needed', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=3904, serialized_end=4011, ) _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE_WORKSHOPITEMINFO = _descriptor.Descriptor( name='WorkshopItemInfo', full_name='CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_updated', full_name='CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo.time_updated', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='manifest_id', full_name='CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo.manifest_id', index=2, number=3, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4177, serialized_end=4265, ) _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE = _descriptor.Descriptor( name='CMsgClientWorkshopItemChangesResponse', full_name='CMsgClientWorkshopItemChangesResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientWorkshopItemChangesResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_time', full_name='CMsgClientWorkshopItemChangesResponse.update_time', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='workshop_items', full_name='CMsgClientWorkshopItemChangesResponse.workshop_items', index=2, number=5, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE_WORKSHOPITEMINFO, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4014, serialized_end=4265, ) _CMSGCLIENTWORKSHOPITEMINFOREQUEST_WORKSHOPITEM = _descriptor.Descriptor( name='WorkshopItem', full_name='CMsgClientWorkshopItemInfoRequest.WorkshopItem', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientWorkshopItemInfoRequest.WorkshopItem.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_updated', full_name='CMsgClientWorkshopItemInfoRequest.WorkshopItem.time_updated', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4421, serialized_end=4484, ) _CMSGCLIENTWORKSHOPITEMINFOREQUEST = _descriptor.Descriptor( name='CMsgClientWorkshopItemInfoRequest', full_name='CMsgClientWorkshopItemInfoRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientWorkshopItemInfoRequest.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_time_updated', full_name='CMsgClientWorkshopItemInfoRequest.last_time_updated', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='workshop_items', full_name='CMsgClientWorkshopItemInfoRequest.workshop_items', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTWORKSHOPITEMINFOREQUEST_WORKSHOPITEM, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4268, serialized_end=4484, ) _CMSGCLIENTWORKSHOPITEMINFORESPONSE_WORKSHOPITEMINFO = _descriptor.Descriptor( name='WorkshopItemInfo', full_name='CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_updated', full_name='CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo.time_updated', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='manifest_id', full_name='CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo.manifest_id', index=2, number=3, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_legacy', full_name='CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo.is_legacy', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4667, serialized_end=4774, ) _CMSGCLIENTWORKSHOPITEMINFORESPONSE = _descriptor.Descriptor( name='CMsgClientWorkshopItemInfoResponse', full_name='CMsgClientWorkshopItemInfoResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientWorkshopItemInfoResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update_time', full_name='CMsgClientWorkshopItemInfoResponse.update_time', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='workshop_items', full_name='CMsgClientWorkshopItemInfoResponse.workshop_items', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='private_items', full_name='CMsgClientWorkshopItemInfoResponse.private_items', index=3, number=4, type=6, cpp_type=4, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTWORKSHOPITEMINFORESPONSE_WORKSHOPITEMINFO, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4487, serialized_end=4774, ) _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSER = _descriptor.Descriptor( name='CMsgClientUCMGetPublishedFilesForUser', full_name='CMsgClientUCMGetPublishedFilesForUser', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMGetPublishedFilesForUser.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='creator_steam_id', full_name='CMsgClientUCMGetPublishedFilesForUser.creator_steam_id', index=1, number=2, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='required_tags', full_name='CMsgClientUCMGetPublishedFilesForUser.required_tags', index=2, number=3, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='excluded_tags', full_name='CMsgClientUCMGetPublishedFilesForUser.excluded_tags', index=3, number=4, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_index', full_name='CMsgClientUCMGetPublishedFilesForUser.start_index', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4777, serialized_end=4925, ) _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE_PUBLISHEDFILEID = _descriptor.Descriptor( name='PublishedFileId', full_name='CMsgClientUCMGetPublishedFilesForUserResponse.PublishedFileId', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMGetPublishedFilesForUserResponse.PublishedFileId.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2704, serialized_end=2748, ) _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMGetPublishedFilesForUserResponse', full_name='CMsgClientUCMGetPublishedFilesForUserResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMGetPublishedFilesForUserResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='published_files', full_name='CMsgClientUCMGetPublishedFilesForUserResponse.published_files', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_results', full_name='CMsgClientUCMGetPublishedFilesForUserResponse.total_results', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE_PUBLISHEDFILEID, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=4928, serialized_end=5153, ) _CMSGCLIENTUCMSETUSERPUBLISHEDFILEACTION = _descriptor.Descriptor( name='CMsgClientUCMSetUserPublishedFileAction', full_name='CMsgClientUCMSetUserPublishedFileAction', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMSetUserPublishedFileAction.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMSetUserPublishedFileAction.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='action', full_name='CMsgClientUCMSetUserPublishedFileAction.action', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5155, serialized_end=5255, ) _CMSGCLIENTUCMSETUSERPUBLISHEDFILEACTIONRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMSetUserPublishedFileActionResponse', full_name='CMsgClientUCMSetUserPublishedFileActionResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMSetUserPublishedFileActionResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5257, serialized_end=5326, ) _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTION = _descriptor.Descriptor( name='CMsgClientUCMEnumeratePublishedFilesByUserAction', full_name='CMsgClientUCMEnumeratePublishedFilesByUserAction', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUCMEnumeratePublishedFilesByUserAction.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_index', full_name='CMsgClientUCMEnumeratePublishedFilesByUserAction.start_index', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='action', full_name='CMsgClientUCMEnumeratePublishedFilesByUserAction.action', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5328, serialized_end=5431, ) _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE_PUBLISHEDFILEID = _descriptor.Descriptor( name='PublishedFileId', full_name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.PublishedFileId', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.PublishedFileId.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rtime_time_stamp', full_name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.PublishedFileId.rtime_time_stamp', index=1, number=2, type=7, cpp_type=3, label=1, has_default_value=True, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5637, serialized_end=5710, ) _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE = _descriptor.Descriptor( name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse', full_name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='published_files', full_name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.published_files', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_results', full_name='CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.total_results', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE_PUBLISHEDFILEID, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5434, serialized_end=5710, ) _CMSGCLIENTSCREENSHOTSCHANGED = _descriptor.Descriptor( name='CMsgClientScreenshotsChanged', full_name='CMsgClientScreenshotsChanged', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5712, serialized_end=5742, ) _CMSGCLIENTUPDATEUSERGAMEINFO = _descriptor.Descriptor( name='CMsgClientUpdateUserGameInfo', full_name='CMsgClientUpdateUserGameInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steamid_idgs', full_name='CMsgClientUpdateUserGameInfo.steamid_idgs', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='gameid', full_name='CMsgClientUpdateUserGameInfo.gameid', index=1, number=2, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='game_ip', full_name='CMsgClientUpdateUserGameInfo.game_ip', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='game_port', full_name='CMsgClientUpdateUserGameInfo.game_port', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='token', full_name='CMsgClientUpdateUserGameInfo.token', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5744, serialized_end=5863, ) _CMSGCLIENTRICHPRESENCEUPLOAD = _descriptor.Descriptor( name='CMsgClientRichPresenceUpload', full_name='CMsgClientRichPresenceUpload', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='rich_presence_kv', full_name='CMsgClientRichPresenceUpload.rich_presence_kv', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='steamid_broadcast', full_name='CMsgClientRichPresenceUpload.steamid_broadcast', index=1, number=2, type=6, cpp_type=4, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5865, serialized_end=5948, ) _CMSGCLIENTRICHPRESENCEREQUEST = _descriptor.Descriptor( name='CMsgClientRichPresenceRequest', full_name='CMsgClientRichPresenceRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steamid_request', full_name='CMsgClientRichPresenceRequest.steamid_request', index=0, number=1, type=6, cpp_type=4, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=5950, serialized_end=6006, ) _CMSGCLIENTRICHPRESENCEINFO_RICHPRESENCE = _descriptor.Descriptor( name='RichPresence', full_name='CMsgClientRichPresenceInfo.RichPresence', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steamid_user', full_name='CMsgClientRichPresenceInfo.RichPresence.steamid_user', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rich_presence_kv', full_name='CMsgClientRichPresenceInfo.RichPresence.rich_presence_kv', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6104, serialized_end=6166, ) _CMSGCLIENTRICHPRESENCEINFO = _descriptor.Descriptor( name='CMsgClientRichPresenceInfo', full_name='CMsgClientRichPresenceInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='rich_presence', full_name='CMsgClientRichPresenceInfo.rich_presence', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTRICHPRESENCEINFO_RICHPRESENCE, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6009, serialized_end=6166, ) _CMSGCLIENTCHECKFILESIGNATURE = _descriptor.Descriptor( name='CMsgClientCheckFileSignature', full_name='CMsgClientCheckFileSignature', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientCheckFileSignature.app_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6168, serialized_end=6214, ) _CMSGCLIENTCHECKFILESIGNATURERESPONSE = _descriptor.Descriptor( name='CMsgClientCheckFileSignatureResponse', full_name='CMsgClientCheckFileSignatureResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientCheckFileSignatureResponse.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='pid', full_name='CMsgClientCheckFileSignatureResponse.pid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientCheckFileSignatureResponse.eresult', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filename', full_name='CMsgClientCheckFileSignatureResponse.filename', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='esignatureresult', full_name='CMsgClientCheckFileSignatureResponse.esignatureresult', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sha_file', full_name='CMsgClientCheckFileSignatureResponse.sha_file', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='signatureheader', full_name='CMsgClientCheckFileSignatureResponse.signatureheader', index=6, number=7, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filesize', full_name='CMsgClientCheckFileSignatureResponse.filesize', index=7, number=8, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='getlasterror', full_name='CMsgClientCheckFileSignatureResponse.getlasterror', index=8, number=9, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='evalvesignaturecheckdetail', full_name='CMsgClientCheckFileSignatureResponse.evalvesignaturecheckdetail', index=9, number=10, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6217, serialized_end=6464, ) _CMSGCLIENTREADMACHINEAUTH = _descriptor.Descriptor( name='CMsgClientReadMachineAuth', full_name='CMsgClientReadMachineAuth', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='filename', full_name='CMsgClientReadMachineAuth.filename', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='offset', full_name='CMsgClientReadMachineAuth.offset', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cubtoread', full_name='CMsgClientReadMachineAuth.cubtoread', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6466, serialized_end=6546, ) _CMSGCLIENTREADMACHINEAUTHRESPONSE = _descriptor.Descriptor( name='CMsgClientReadMachineAuthResponse', full_name='CMsgClientReadMachineAuthResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='filename', full_name='CMsgClientReadMachineAuthResponse.filename', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientReadMachineAuthResponse.eresult', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filesize', full_name='CMsgClientReadMachineAuthResponse.filesize', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sha_file', full_name='CMsgClientReadMachineAuthResponse.sha_file', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='getlasterror', full_name='CMsgClientReadMachineAuthResponse.getlasterror', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='offset', full_name='CMsgClientReadMachineAuthResponse.offset', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cubread', full_name='CMsgClientReadMachineAuthResponse.cubread', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bytes_read', full_name='CMsgClientReadMachineAuthResponse.bytes_read', index=7, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filename_sentry', full_name='CMsgClientReadMachineAuthResponse.filename_sentry', index=8, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6549, serialized_end=6755, ) _CMSGCLIENTUPDATEMACHINEAUTH = _descriptor.Descriptor( name='CMsgClientUpdateMachineAuth', full_name='CMsgClientUpdateMachineAuth', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='filename', full_name='CMsgClientUpdateMachineAuth.filename', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='offset', full_name='CMsgClientUpdateMachineAuth.offset', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cubtowrite', full_name='CMsgClientUpdateMachineAuth.cubtowrite', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bytes', full_name='CMsgClientUpdateMachineAuth.bytes', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_type', full_name='CMsgClientUpdateMachineAuth.otp_type', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_identifier', full_name='CMsgClientUpdateMachineAuth.otp_identifier', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_sharedsecret', full_name='CMsgClientUpdateMachineAuth.otp_sharedsecret', index=6, number=7, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_timedrift', full_name='CMsgClientUpdateMachineAuth.otp_timedrift', index=7, number=8, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6758, serialized_end=6947, ) _CMSGCLIENTUPDATEMACHINEAUTHRESPONSE = _descriptor.Descriptor( name='CMsgClientUpdateMachineAuthResponse', full_name='CMsgClientUpdateMachineAuthResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='filename', full_name='CMsgClientUpdateMachineAuthResponse.filename', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUpdateMachineAuthResponse.eresult', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filesize', full_name='CMsgClientUpdateMachineAuthResponse.filesize', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sha_file', full_name='CMsgClientUpdateMachineAuthResponse.sha_file', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='getlasterror', full_name='CMsgClientUpdateMachineAuthResponse.getlasterror', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='offset', full_name='CMsgClientUpdateMachineAuthResponse.offset', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cubwrote', full_name='CMsgClientUpdateMachineAuthResponse.cubwrote', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_type', full_name='CMsgClientUpdateMachineAuthResponse.otp_type', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_value', full_name='CMsgClientUpdateMachineAuthResponse.otp_value', index=8, number=9, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_identifier', full_name='CMsgClientUpdateMachineAuthResponse.otp_identifier', index=9, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=6950, serialized_end=7175, ) _CMSGCLIENTREQUESTMACHINEAUTH = _descriptor.Descriptor( name='CMsgClientRequestMachineAuth', full_name='CMsgClientRequestMachineAuth', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='filename', full_name='CMsgClientRequestMachineAuth.filename', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult_sentryfile', full_name='CMsgClientRequestMachineAuth.eresult_sentryfile', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filesize', full_name='CMsgClientRequestMachineAuth.filesize', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sha_sentryfile', full_name='CMsgClientRequestMachineAuth.sha_sentryfile', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='lock_account_action', full_name='CMsgClientRequestMachineAuth.lock_account_action', index=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_type', full_name='CMsgClientRequestMachineAuth.otp_type', index=5, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_identifier', full_name='CMsgClientRequestMachineAuth.otp_identifier', index=6, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_sharedsecret', full_name='CMsgClientRequestMachineAuth.otp_sharedsecret', index=7, number=9, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='otp_value', full_name='CMsgClientRequestMachineAuth.otp_value', index=8, number=10, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='machine_name', full_name='CMsgClientRequestMachineAuth.machine_name', index=9, number=11, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='machine_name_userchosen', full_name='CMsgClientRequestMachineAuth.machine_name_userchosen', index=10, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7178, serialized_end=7467, ) _CMSGCLIENTREQUESTMACHINEAUTHRESPONSE = _descriptor.Descriptor( name='CMsgClientRequestMachineAuthResponse', full_name='CMsgClientRequestMachineAuthResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientRequestMachineAuthResponse.eresult', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7469, serialized_end=7524, ) _CMSGCLIENTREGISTERKEY = _descriptor.Descriptor( name='CMsgClientRegisterKey', full_name='CMsgClientRegisterKey', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='key', full_name='CMsgClientRegisterKey.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7526, serialized_end=7562, ) _CMSGCLIENTPURCHASERESPONSE = _descriptor.Descriptor( name='CMsgClientPurchaseResponse', full_name='CMsgClientPurchaseResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientPurchaseResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='purchase_result_details', full_name='CMsgClientPurchaseResponse.purchase_result_details', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='purchase_receipt_info', full_name='CMsgClientPurchaseResponse.purchase_receipt_info', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7564, serialized_end=7676, ) _CMSGCLIENTACTIVATEOEMLICENSE = _descriptor.Descriptor( name='CMsgClientActivateOEMLicense', full_name='CMsgClientActivateOEMLicense', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='bios_manufacturer', full_name='CMsgClientActivateOEMLicense.bios_manufacturer', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bios_serialnumber', full_name='CMsgClientActivateOEMLicense.bios_serialnumber', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='license_file', full_name='CMsgClientActivateOEMLicense.license_file', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='mainboard_manufacturer', full_name='CMsgClientActivateOEMLicense.mainboard_manufacturer', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='mainboard_product', full_name='CMsgClientActivateOEMLicense.mainboard_product', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='mainboard_serialnumber', full_name='CMsgClientActivateOEMLicense.mainboard_serialnumber', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7679, serialized_end=7876, ) _CMSGCLIENTREGISTEROEMMACHINE = _descriptor.Descriptor( name='CMsgClientRegisterOEMMachine', full_name='CMsgClientRegisterOEMMachine', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='oem_register_file', full_name='CMsgClientRegisterOEMMachine.oem_register_file', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7878, serialized_end=7935, ) _CMSGCLIENTREGISTEROEMMACHINERESPONSE = _descriptor.Descriptor( name='CMsgClientRegisterOEMMachineResponse', full_name='CMsgClientRegisterOEMMachineResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientRegisterOEMMachineResponse.eresult', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7937, serialized_end=7992, ) _CMSGCLIENTPURCHASEWITHMACHINEID = _descriptor.Descriptor( name='CMsgClientPurchaseWithMachineID', full_name='CMsgClientPurchaseWithMachineID', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='package_id', full_name='CMsgClientPurchaseWithMachineID.package_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='machine_info', full_name='CMsgClientPurchaseWithMachineID.machine_info', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=7994, serialized_end=8069, ) _CMSGTRADING_INITIATETRADEREQUEST = _descriptor.Descriptor( name='CMsgTrading_InitiateTradeRequest', full_name='CMsgTrading_InitiateTradeRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='trade_request_id', full_name='CMsgTrading_InitiateTradeRequest.trade_request_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='other_steamid', full_name='CMsgTrading_InitiateTradeRequest.other_steamid', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='other_name', full_name='CMsgTrading_InitiateTradeRequest.other_name', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8071, serialized_end=8174, ) _CMSGTRADING_INITIATETRADERESPONSE = _descriptor.Descriptor( name='CMsgTrading_InitiateTradeResponse', full_name='CMsgTrading_InitiateTradeResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='response', full_name='CMsgTrading_InitiateTradeResponse.response', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='trade_request_id', full_name='CMsgTrading_InitiateTradeResponse.trade_request_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='other_steamid', full_name='CMsgTrading_InitiateTradeResponse.other_steamid', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='steamguard_required_days', full_name='CMsgTrading_InitiateTradeResponse.steamguard_required_days', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='new_device_cooldown_days', full_name='CMsgTrading_InitiateTradeResponse.new_device_cooldown_days', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='default_password_reset_probation_days', full_name='CMsgTrading_InitiateTradeResponse.default_password_reset_probation_days', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='password_reset_probation_days', full_name='CMsgTrading_InitiateTradeResponse.password_reset_probation_days', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='default_email_change_probation_days', full_name='CMsgTrading_InitiateTradeResponse.default_email_change_probation_days', index=7, number=8, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='email_change_probation_days', full_name='CMsgTrading_InitiateTradeResponse.email_change_probation_days', index=8, number=9, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8177, serialized_end=8515, ) _CMSGTRADING_CANCELTRADEREQUEST = _descriptor.Descriptor( name='CMsgTrading_CancelTradeRequest', full_name='CMsgTrading_CancelTradeRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='other_steamid', full_name='CMsgTrading_CancelTradeRequest.other_steamid', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8517, serialized_end=8572, ) _CMSGTRADING_STARTSESSION = _descriptor.Descriptor( name='CMsgTrading_StartSession', full_name='CMsgTrading_StartSession', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='other_steamid', full_name='CMsgTrading_StartSession.other_steamid', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8574, serialized_end=8623, ) _CMSGCLIENTGETCDNAUTHTOKEN = _descriptor.Descriptor( name='CMsgClientGetCDNAuthToken', full_name='CMsgClientGetCDNAuthToken', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='depot_id', full_name='CMsgClientGetCDNAuthToken.depot_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='host_name', full_name='CMsgClientGetCDNAuthToken.host_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientGetCDNAuthToken.app_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8625, serialized_end=8705, ) _CMSGCLIENTGETDEPOTDECRYPTIONKEY = _descriptor.Descriptor( name='CMsgClientGetDepotDecryptionKey', full_name='CMsgClientGetDepotDecryptionKey', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='depot_id', full_name='CMsgClientGetDepotDecryptionKey.depot_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientGetDepotDecryptionKey.app_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8707, serialized_end=8774, ) _CMSGCLIENTGETDEPOTDECRYPTIONKEYRESPONSE = _descriptor.Descriptor( name='CMsgClientGetDepotDecryptionKeyResponse', full_name='CMsgClientGetDepotDecryptionKeyResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientGetDepotDecryptionKeyResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='depot_id', full_name='CMsgClientGetDepotDecryptionKeyResponse.depot_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='depot_encryption_key', full_name='CMsgClientGetDepotDecryptionKeyResponse.depot_encryption_key', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8776, serialized_end=8885, ) _CMSGCLIENTCHECKAPPBETAPASSWORD = _descriptor.Descriptor( name='CMsgClientCheckAppBetaPassword', full_name='CMsgClientCheckAppBetaPassword', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientCheckAppBetaPassword.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='betapassword', full_name='CMsgClientCheckAppBetaPassword.betapassword', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8887, serialized_end=8957, ) _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE_BETAPASSWORD = _descriptor.Descriptor( name='BetaPassword', full_name='CMsgClientCheckAppBetaPasswordResponse.BetaPassword', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='betaname', full_name='CMsgClientCheckAppBetaPasswordResponse.BetaPassword.betaname', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='betapassword', full_name='CMsgClientCheckAppBetaPasswordResponse.BetaPassword.betapassword', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=9099, serialized_end=9153, ) _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE = _descriptor.Descriptor( name='CMsgClientCheckAppBetaPasswordResponse', full_name='CMsgClientCheckAppBetaPasswordResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientCheckAppBetaPasswordResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='betapasswords', full_name='CMsgClientCheckAppBetaPasswordResponse.betapasswords', index=1, number=4, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE_BETAPASSWORD, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=8960, serialized_end=9153, ) _CMSGCLIENTUPDATEAPPJOBREPORT = _descriptor.Descriptor( name='CMsgClientUpdateAppJobReport', full_name='CMsgClientUpdateAppJobReport', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientUpdateAppJobReport.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='depot_ids', full_name='CMsgClientUpdateAppJobReport.depot_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_state', full_name='CMsgClientUpdateAppJobReport.app_state', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='job_app_error', full_name='CMsgClientUpdateAppJobReport.job_app_error', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='error_details', full_name='CMsgClientUpdateAppJobReport.error_details', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='job_duration', full_name='CMsgClientUpdateAppJobReport.job_duration', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='files_validation_failed', full_name='CMsgClientUpdateAppJobReport.files_validation_failed', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='job_bytes_downloaded', full_name='CMsgClientUpdateAppJobReport.job_bytes_downloaded', index=7, number=8, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='job_bytes_staged', full_name='CMsgClientUpdateAppJobReport.job_bytes_staged', index=8, number=9, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bytes_comitted', full_name='CMsgClientUpdateAppJobReport.bytes_comitted', index=9, number=10, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='start_app_state', full_name='CMsgClientUpdateAppJobReport.start_app_state', index=10, number=11, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='stats_machine_id', full_name='CMsgClientUpdateAppJobReport.stats_machine_id', index=11, number=12, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='branch_name', full_name='CMsgClientUpdateAppJobReport.branch_name', index=12, number=13, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_bytes_downloaded', full_name='CMsgClientUpdateAppJobReport.total_bytes_downloaded', index=13, number=14, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_bytes_staged', full_name='CMsgClientUpdateAppJobReport.total_bytes_staged', index=14, number=15, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_bytes_restored', full_name='CMsgClientUpdateAppJobReport.total_bytes_restored', index=15, number=16, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_borrowed', full_name='CMsgClientUpdateAppJobReport.is_borrowed', index=16, number=17, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_free_weekend', full_name='CMsgClientUpdateAppJobReport.is_free_weekend', index=17, number=18, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_bytes_legacy', full_name='CMsgClientUpdateAppJobReport.total_bytes_legacy', index=18, number=19, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_bytes_patched', full_name='CMsgClientUpdateAppJobReport.total_bytes_patched', index=19, number=20, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_bytes_saved', full_name='CMsgClientUpdateAppJobReport.total_bytes_saved', index=20, number=21, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cell_id', full_name='CMsgClientUpdateAppJobReport.cell_id', index=21, number=22, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=9156, serialized_end=9730, ) _CMSGCLIENTDPCONTENTSTATSREPORT = _descriptor.Descriptor( name='CMsgClientDPContentStatsReport', full_name='CMsgClientDPContentStatsReport', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='stats_machine_id', full_name='CMsgClientDPContentStatsReport.stats_machine_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='country_code', full_name='CMsgClientDPContentStatsReport.country_code', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='os_type', full_name='CMsgClientDPContentStatsReport.os_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='language', full_name='CMsgClientDPContentStatsReport.language', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='num_install_folders', full_name='CMsgClientDPContentStatsReport.num_install_folders', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='num_installed_games', full_name='CMsgClientDPContentStatsReport.num_installed_games', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='size_installed_games', full_name='CMsgClientDPContentStatsReport.size_installed_games', index=6, number=7, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=9733, serialized_end=9936, ) _CMSGCLIENTGETCDNAUTHTOKENRESPONSE = _descriptor.Descriptor( name='CMsgClientGetCDNAuthTokenResponse', full_name='CMsgClientGetCDNAuthTokenResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientGetCDNAuthTokenResponse.eresult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='token', full_name='CMsgClientGetCDNAuthTokenResponse.token', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='expiration_time', full_name='CMsgClientGetCDNAuthTokenResponse.expiration_time', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=9938, serialized_end=10033, ) _CMSGDOWNLOADRATESTATISTICS_STATSINFO = _descriptor.Descriptor( name='StatsInfo', full_name='CMsgDownloadRateStatistics.StatsInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='source_type', full_name='CMsgDownloadRateStatistics.StatsInfo.source_type', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='source_id', full_name='CMsgDownloadRateStatistics.StatsInfo.source_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='seconds', full_name='CMsgDownloadRateStatistics.StatsInfo.seconds', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bytes', full_name='CMsgDownloadRateStatistics.StatsInfo.bytes', index=3, number=4, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='host_name', full_name='CMsgDownloadRateStatistics.StatsInfo.host_name', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='microseconds', full_name='CMsgDownloadRateStatistics.StatsInfo.microseconds', index=5, number=6, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='used_ipv6', full_name='CMsgDownloadRateStatistics.StatsInfo.used_ipv6', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='proxied', full_name='CMsgDownloadRateStatistics.StatsInfo.proxied', index=7, number=8, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=10163, serialized_end=10323, ) _CMSGDOWNLOADRATESTATISTICS = _descriptor.Descriptor( name='CMsgDownloadRateStatistics', full_name='CMsgDownloadRateStatistics', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='cell_id', full_name='CMsgDownloadRateStatistics.cell_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='stats', full_name='CMsgDownloadRateStatistics.stats', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='throttling_kbps', full_name='CMsgDownloadRateStatistics.throttling_kbps', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGDOWNLOADRATESTATISTICS_STATSINFO, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=10036, serialized_end=10323, ) _CMSGCLIENTREQUESTACCOUNTDATA = _descriptor.Descriptor( name='CMsgClientRequestAccountData', full_name='CMsgClientRequestAccountData', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='account_or_email', full_name='CMsgClientRequestAccountData.account_or_email', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='action', full_name='CMsgClientRequestAccountData.action', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=10325, serialized_end=10397, ) _CMSGCLIENTREQUESTACCOUNTDATARESPONSE = _descriptor.Descriptor( name='CMsgClientRequestAccountDataResponse', full_name='CMsgClientRequestAccountDataResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='action', full_name='CMsgClientRequestAccountDataResponse.action', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientRequestAccountDataResponse.eresult', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='account_name', full_name='CMsgClientRequestAccountDataResponse.account_name', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ct_matches', full_name='CMsgClientRequestAccountDataResponse.ct_matches', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='account_name_suggestion1', full_name='CMsgClientRequestAccountDataResponse.account_name_suggestion1', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='account_name_suggestion2', full_name='CMsgClientRequestAccountDataResponse.account_name_suggestion2', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='account_name_suggestion3', full_name='CMsgClientRequestAccountDataResponse.account_name_suggestion3', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=10400, serialized_end=10615, ) _CMSGCLIENTUGSGETGLOBALSTATS = _descriptor.Descriptor( name='CMsgClientUGSGetGlobalStats', full_name='CMsgClientUGSGetGlobalStats', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='gameid', full_name='CMsgClientUGSGetGlobalStats.gameid', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='history_days_requested', full_name='CMsgClientUGSGetGlobalStats.history_days_requested', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='time_last_requested', full_name='CMsgClientUGSGetGlobalStats.time_last_requested', index=2, number=3, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='first_day_cached', full_name='CMsgClientUGSGetGlobalStats.first_day_cached', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='days_cached', full_name='CMsgClientUGSGetGlobalStats.days_cached', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=10618, serialized_end=10771, ) _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY_STAT = _descriptor.Descriptor( name='Stat', full_name='CMsgClientUGSGetGlobalStatsResponse.Day.Stat', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='stat_id', full_name='CMsgClientUGSGetGlobalStatsResponse.Day.Stat.stat_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='data', full_name='CMsgClientUGSGetGlobalStatsResponse.Day.Stat.data', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=11014, serialized_end=11051, ) _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY = _descriptor.Descriptor( name='Day', full_name='CMsgClientUGSGetGlobalStatsResponse.Day', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='day_id', full_name='CMsgClientUGSGetGlobalStatsResponse.Day.day_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='stats', full_name='CMsgClientUGSGetGlobalStatsResponse.Day.stats', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY_STAT, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=10929, serialized_end=11051, ) _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE = _descriptor.Descriptor( name='CMsgClientUGSGetGlobalStatsResponse', full_name='CMsgClientUGSGetGlobalStatsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientUGSGetGlobalStatsResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='timestamp', full_name='CMsgClientUGSGetGlobalStatsResponse.timestamp', index=1, number=2, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='day_current', full_name='CMsgClientUGSGetGlobalStatsResponse.day_current', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='days', full_name='CMsgClientUGSGetGlobalStatsResponse.days', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=10774, serialized_end=11051, ) _CMSGGAMESERVERDATA_PLAYER = _descriptor.Descriptor( name='Player', full_name='CMsgGameServerData.Player', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id', full_name='CMsgGameServerData.Player.steam_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=11548, serialized_end=11574, ) _CMSGGAMESERVERDATA = _descriptor.Descriptor( name='CMsgGameServerData', full_name='CMsgGameServerData', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id_gs', full_name='CMsgGameServerData.steam_id_gs', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='deprecated_ip', full_name='CMsgGameServerData.deprecated_ip', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_port', full_name='CMsgGameServerData.query_port', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='game_port', full_name='CMsgGameServerData.game_port', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sourcetv_port', full_name='CMsgGameServerData.sourcetv_port', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='name', full_name='CMsgGameServerData.name', index=5, number=22, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='game_ip_address', full_name='CMsgGameServerData.game_ip_address', index=6, number=23, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgGameServerData.app_id', index=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='gamedir', full_name='CMsgGameServerData.gamedir', index=8, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='version', full_name='CMsgGameServerData.version', index=9, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='product', full_name='CMsgGameServerData.product', index=10, number=9, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='region', full_name='CMsgGameServerData.region', index=11, number=10, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='players', full_name='CMsgGameServerData.players', index=12, number=11, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_players', full_name='CMsgGameServerData.max_players', index=13, number=12, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bot_count', full_name='CMsgGameServerData.bot_count', index=14, number=13, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='password', full_name='CMsgGameServerData.password', index=15, number=14, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='secure', full_name='CMsgGameServerData.secure', index=16, number=15, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dedicated', full_name='CMsgGameServerData.dedicated', index=17, number=16, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='os', full_name='CMsgGameServerData.os', index=18, number=17, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='game_data', full_name='CMsgGameServerData.game_data', index=19, number=18, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='game_data_version', full_name='CMsgGameServerData.game_data_version', index=20, number=19, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='game_type', full_name='CMsgGameServerData.game_type', index=21, number=20, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='map', full_name='CMsgGameServerData.map', index=22, number=21, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGGAMESERVERDATA_PLAYER, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=11054, serialized_end=11574, ) _CMSGGAMESERVERREMOVE = _descriptor.Descriptor( name='CMsgGameServerRemove', full_name='CMsgGameServerRemove', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id', full_name='CMsgGameServerRemove.steam_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='deprecated_ip', full_name='CMsgGameServerRemove.deprecated_ip', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='query_port', full_name='CMsgGameServerRemove.query_port', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ip', full_name='CMsgGameServerRemove.ip', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=11576, serialized_end=11687, ) _CMSGCLIENTGMSSERVERQUERY = _descriptor.Descriptor( name='CMsgClientGMSServerQuery', full_name='CMsgClientGMSServerQuery', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientGMSServerQuery.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='geo_location_ip', full_name='CMsgClientGMSServerQuery.geo_location_ip', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='region_code', full_name='CMsgClientGMSServerQuery.region_code', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='filter_text', full_name='CMsgClientGMSServerQuery.filter_text', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_servers', full_name='CMsgClientGMSServerQuery.max_servers', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=11690, serialized_end=11820, ) _CMSGGMSCLIENTSERVERQUERYRESPONSE_SERVER = _descriptor.Descriptor( name='Server', full_name='CMsgGMSClientServerQueryResponse.Server', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='deprecated_server_ip', full_name='CMsgGMSClientServerQueryResponse.Server.deprecated_server_ip', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='server_port', full_name='CMsgGMSClientServerQueryResponse.Server.server_port', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='auth_players', full_name='CMsgGMSClientServerQueryResponse.Server.auth_players', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='server_ip', full_name='CMsgGMSClientServerQueryResponse.Server.server_ip', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=11933, serialized_end=12049, ) _CMSGGMSCLIENTSERVERQUERYRESPONSE = _descriptor.Descriptor( name='CMsgGMSClientServerQueryResponse', full_name='CMsgGMSClientServerQueryResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='servers', full_name='CMsgGMSClientServerQueryResponse.servers', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='error', full_name='CMsgGMSClientServerQueryResponse.error', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGGMSCLIENTSERVERQUERYRESPONSE_SERVER, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=11823, serialized_end=12049, ) _CMSGGAMESERVEROUTOFDATE = _descriptor.Descriptor( name='CMsgGameServerOutOfDate', full_name='CMsgGameServerOutOfDate', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id_gs', full_name='CMsgGameServerOutOfDate.steam_id_gs', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='reject', full_name='CMsgGameServerOutOfDate.reject', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='message', full_name='CMsgGameServerOutOfDate.message', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12051, serialized_end=12130, ) _CMSGCLIENTREDEEMGUESTPASS = _descriptor.Descriptor( name='CMsgClientRedeemGuestPass', full_name='CMsgClientRedeemGuestPass', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='guest_pass_id', full_name='CMsgClientRedeemGuestPass.guest_pass_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12132, serialized_end=12182, ) _CMSGCLIENTREDEEMGUESTPASSRESPONSE = _descriptor.Descriptor( name='CMsgClientRedeemGuestPassResponse', full_name='CMsgClientRedeemGuestPassResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientRedeemGuestPassResponse.eresult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='package_id', full_name='CMsgClientRedeemGuestPassResponse.package_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='must_own_appid', full_name='CMsgClientRedeemGuestPassResponse.must_own_appid', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12184, serialized_end=12283, ) _CMSGCLIENTGETCLANACTIVITYCOUNTS = _descriptor.Descriptor( name='CMsgClientGetClanActivityCounts', full_name='CMsgClientGetClanActivityCounts', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steamid_clans', full_name='CMsgClientGetClanActivityCounts.steamid_clans', index=0, number=1, type=4, cpp_type=4, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12285, serialized_end=12341, ) _CMSGCLIENTGETCLANACTIVITYCOUNTSRESPONSE = _descriptor.Descriptor( name='CMsgClientGetClanActivityCountsResponse', full_name='CMsgClientGetClanActivityCountsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientGetClanActivityCountsResponse.eresult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12343, serialized_end=12404, ) _CMSGCLIENTOGSREPORTSTRING = _descriptor.Descriptor( name='CMsgClientOGSReportString', full_name='CMsgClientOGSReportString', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='accumulated', full_name='CMsgClientOGSReportString.accumulated', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='sessionid', full_name='CMsgClientOGSReportString.sessionid', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='severity', full_name='CMsgClientOGSReportString.severity', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='formatter', full_name='CMsgClientOGSReportString.formatter', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='varargs', full_name='CMsgClientOGSReportString.varargs', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12406, serialized_end=12527, ) _CMSGCLIENTOGSREPORTBUG = _descriptor.Descriptor( name='CMsgClientOGSReportBug', full_name='CMsgClientOGSReportBug', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='sessionid', full_name='CMsgClientOGSReportBug.sessionid', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='bugtext', full_name='CMsgClientOGSReportBug.bugtext', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='screenshot', full_name='CMsgClientOGSReportBug.screenshot', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12529, serialized_end=12609, ) _CMSGGSASSOCIATEWITHCLAN = _descriptor.Descriptor( name='CMsgGSAssociateWithClan', full_name='CMsgGSAssociateWithClan', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id_clan', full_name='CMsgGSAssociateWithClan.steam_id_clan', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12611, serialized_end=12659, ) _CMSGGSASSOCIATEWITHCLANRESPONSE = _descriptor.Descriptor( name='CMsgGSAssociateWithClanResponse', full_name='CMsgGSAssociateWithClanResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id_clan', full_name='CMsgGSAssociateWithClanResponse.steam_id_clan', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult', full_name='CMsgGSAssociateWithClanResponse.eresult', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12661, serialized_end=12737, ) _CMSGGSCOMPUTENEWPLAYERCOMPATIBILITY = _descriptor.Descriptor( name='CMsgGSComputeNewPlayerCompatibility', full_name='CMsgGSComputeNewPlayerCompatibility', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id_candidate', full_name='CMsgGSComputeNewPlayerCompatibility.steam_id_candidate', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12739, serialized_end=12804, ) _CMSGGSCOMPUTENEWPLAYERCOMPATIBILITYRESPONSE = _descriptor.Descriptor( name='CMsgGSComputeNewPlayerCompatibilityResponse', full_name='CMsgGSComputeNewPlayerCompatibilityResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id_candidate', full_name='CMsgGSComputeNewPlayerCompatibilityResponse.steam_id_candidate', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult', full_name='CMsgGSComputeNewPlayerCompatibilityResponse.eresult', index=1, number=2, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_clan_member', full_name='CMsgGSComputeNewPlayerCompatibilityResponse.is_clan_member', index=2, number=3, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ct_dont_like_you', full_name='CMsgGSComputeNewPlayerCompatibilityResponse.ct_dont_like_you', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ct_you_dont_like', full_name='CMsgGSComputeNewPlayerCompatibilityResponse.ct_you_dont_like', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ct_clanmembers_dont_like_you', full_name='CMsgGSComputeNewPlayerCompatibilityResponse.ct_clanmembers_dont_like_you', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=12807, serialized_end=13014, ) _CMSGCLIENTSENTLOGS = _descriptor.Descriptor( name='CMsgClientSentLogs', full_name='CMsgClientSentLogs', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13016, serialized_end=13036, ) _CMSGGCCLIENT = _descriptor.Descriptor( name='CMsgGCClient', full_name='CMsgGCClient', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='appid', full_name='CMsgGCClient.appid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='msgtype', full_name='CMsgGCClient.msgtype', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='payload', full_name='CMsgGCClient.payload', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='steamid', full_name='CMsgGCClient.steamid', index=3, number=4, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='gcname', full_name='CMsgGCClient.gcname', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ip', full_name='CMsgGCClient.ip', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13038, serialized_end=13146, ) _CMSGCLIENTREQUESTFREELICENSE = _descriptor.Descriptor( name='CMsgClientRequestFreeLicense', full_name='CMsgClientRequestFreeLicense', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='appids', full_name='CMsgClientRequestFreeLicense.appids', index=0, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13148, serialized_end=13194, ) _CMSGCLIENTREQUESTFREELICENSERESPONSE = _descriptor.Descriptor( name='CMsgClientRequestFreeLicenseResponse', full_name='CMsgClientRequestFreeLicenseResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientRequestFreeLicenseResponse.eresult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='granted_packageids', full_name='CMsgClientRequestFreeLicenseResponse.granted_packageids', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='granted_appids', full_name='CMsgClientRequestFreeLicenseResponse.granted_appids', index=2, number=3, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13196, serialized_end=13306, ) _CMSGDRMDOWNLOADREQUESTWITHCRASHDATA = _descriptor.Descriptor( name='CMsgDRMDownloadRequestWithCrashData', full_name='CMsgDRMDownloadRequestWithCrashData', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='download_flags', full_name='CMsgDRMDownloadRequestWithCrashData.download_flags', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='download_types_known', full_name='CMsgDRMDownloadRequestWithCrashData.download_types_known', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='guid_drm', full_name='CMsgDRMDownloadRequestWithCrashData.guid_drm', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='guid_split', full_name='CMsgDRMDownloadRequestWithCrashData.guid_split', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='guid_merge', full_name='CMsgDRMDownloadRequestWithCrashData.guid_merge', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_name', full_name='CMsgDRMDownloadRequestWithCrashData.module_name', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_path', full_name='CMsgDRMDownloadRequestWithCrashData.module_path', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='crash_data', full_name='CMsgDRMDownloadRequestWithCrashData.crash_data', index=7, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13309, serialized_end=13520, ) _CMSGDRMDOWNLOADRESPONSE = _descriptor.Descriptor( name='CMsgDRMDownloadResponse', full_name='CMsgDRMDownloadResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgDRMDownloadResponse.eresult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgDRMDownloadResponse.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='blob_download_type', full_name='CMsgDRMDownloadResponse.blob_download_type', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='merge_guid', full_name='CMsgDRMDownloadResponse.merge_guid', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='download_file_dfs_ip', full_name='CMsgDRMDownloadResponse.download_file_dfs_ip', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='download_file_dfs_port', full_name='CMsgDRMDownloadResponse.download_file_dfs_port', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='download_file_url', full_name='CMsgDRMDownloadResponse.download_file_url', index=6, number=7, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_path', full_name='CMsgDRMDownloadResponse.module_path', index=7, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13523, serialized_end=13742, ) _CMSGDRMFINALRESULT = _descriptor.Descriptor( name='CMsgDRMFinalResult', full_name='CMsgDRMFinalResult', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eResult', full_name='CMsgDRMFinalResult.eResult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_id', full_name='CMsgDRMFinalResult.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='blob_download_type', full_name='CMsgDRMFinalResult.blob_download_type', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='error_detail', full_name='CMsgDRMFinalResult.error_detail', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='merge_guid', full_name='CMsgDRMFinalResult.merge_guid', index=4, number=5, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='download_file_dfs_ip', full_name='CMsgDRMFinalResult.download_file_dfs_ip', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='download_file_dfs_port', full_name='CMsgDRMFinalResult.download_file_dfs_port', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='download_file_url', full_name='CMsgDRMFinalResult.download_file_url', index=7, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13745, serialized_end=13960, ) _CMSGCLIENTDPCHECKSPECIALSURVEY = _descriptor.Descriptor( name='CMsgClientDPCheckSpecialSurvey', full_name='CMsgClientDPCheckSpecialSurvey', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='survey_id', full_name='CMsgClientDPCheckSpecialSurvey.survey_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=13962, serialized_end=14013, ) _CMSGCLIENTDPCHECKSPECIALSURVEYRESPONSE = _descriptor.Descriptor( name='CMsgClientDPCheckSpecialSurveyResponse', full_name='CMsgClientDPCheckSpecialSurveyResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eResult', full_name='CMsgClientDPCheckSpecialSurveyResponse.eResult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='state', full_name='CMsgClientDPCheckSpecialSurveyResponse.state', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='name', full_name='CMsgClientDPCheckSpecialSurveyResponse.name', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='custom_url', full_name='CMsgClientDPCheckSpecialSurveyResponse.custom_url', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='include_software', full_name='CMsgClientDPCheckSpecialSurveyResponse.include_software', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='token', full_name='CMsgClientDPCheckSpecialSurveyResponse.token', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14016, serialized_end=14166, ) _CMSGCLIENTDPSENDSPECIALSURVEYRESPONSE = _descriptor.Descriptor( name='CMsgClientDPSendSpecialSurveyResponse', full_name='CMsgClientDPSendSpecialSurveyResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='survey_id', full_name='CMsgClientDPSendSpecialSurveyResponse.survey_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='data', full_name='CMsgClientDPSendSpecialSurveyResponse.data', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14168, serialized_end=14240, ) _CMSGCLIENTDPSENDSPECIALSURVEYRESPONSEREPLY = _descriptor.Descriptor( name='CMsgClientDPSendSpecialSurveyResponseReply', full_name='CMsgClientDPSendSpecialSurveyResponseReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eResult', full_name='CMsgClientDPSendSpecialSurveyResponseReply.eResult', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='token', full_name='CMsgClientDPSendSpecialSurveyResponseReply.token', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14242, serialized_end=14321, ) _CMSGCLIENTREQUESTFORGOTTENPASSWORDEMAIL = _descriptor.Descriptor( name='CMsgClientRequestForgottenPasswordEmail', full_name='CMsgClientRequestForgottenPasswordEmail', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='account_name', full_name='CMsgClientRequestForgottenPasswordEmail.account_name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='password_tried', full_name='CMsgClientRequestForgottenPasswordEmail.password_tried', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14323, serialized_end=14410, ) _CMSGCLIENTREQUESTFORGOTTENPASSWORDEMAILRESPONSE = _descriptor.Descriptor( name='CMsgClientRequestForgottenPasswordEmailResponse', full_name='CMsgClientRequestForgottenPasswordEmailResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eResult', full_name='CMsgClientRequestForgottenPasswordEmailResponse.eResult', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='use_secret_question', full_name='CMsgClientRequestForgottenPasswordEmailResponse.use_secret_question', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14412, serialized_end=14507, ) _CMSGCLIENTITEMANNOUNCEMENTS_UNSEENITEM = _descriptor.Descriptor( name='UnseenItem', full_name='CMsgClientItemAnnouncements.UnseenItem', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='appid', full_name='CMsgClientItemAnnouncements.UnseenItem.appid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='context_id', full_name='CMsgClientItemAnnouncements.UnseenItem.context_id', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='asset_id', full_name='CMsgClientItemAnnouncements.UnseenItem.asset_id', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='amount', full_name='CMsgClientItemAnnouncements.UnseenItem.amount', index=3, number=4, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='rtime32_gained', full_name='CMsgClientItemAnnouncements.UnseenItem.rtime32_gained', index=4, number=5, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='source_appid', full_name='CMsgClientItemAnnouncements.UnseenItem.source_appid', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14629, serialized_end=14756, ) _CMSGCLIENTITEMANNOUNCEMENTS = _descriptor.Descriptor( name='CMsgClientItemAnnouncements', full_name='CMsgClientItemAnnouncements', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='count_new_items', full_name='CMsgClientItemAnnouncements.count_new_items', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='unseen_items', full_name='CMsgClientItemAnnouncements.unseen_items', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTITEMANNOUNCEMENTS_UNSEENITEM, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14510, serialized_end=14756, ) _CMSGCLIENTREQUESTITEMANNOUNCEMENTS = _descriptor.Descriptor( name='CMsgClientRequestItemAnnouncements', full_name='CMsgClientRequestItemAnnouncements', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14758, serialized_end=14794, ) _CMSGCLIENTUSERNOTIFICATIONS_NOTIFICATION = _descriptor.Descriptor( name='Notification', full_name='CMsgClientUserNotifications.Notification', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='user_notification_type', full_name='CMsgClientUserNotifications.Notification.user_notification_type', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='count', full_name='CMsgClientUserNotifications.Notification.count', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14894, serialized_end=14955, ) _CMSGCLIENTUSERNOTIFICATIONS = _descriptor.Descriptor( name='CMsgClientUserNotifications', full_name='CMsgClientUserNotifications', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='notifications', full_name='CMsgClientUserNotifications.notifications', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUSERNOTIFICATIONS_NOTIFICATION, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14797, serialized_end=14955, ) _CMSGCLIENTCOMMENTNOTIFICATIONS = _descriptor.Descriptor( name='CMsgClientCommentNotifications', full_name='CMsgClientCommentNotifications', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='count_new_comments', full_name='CMsgClientCommentNotifications.count_new_comments', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='count_new_comments_owner', full_name='CMsgClientCommentNotifications.count_new_comments_owner', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='count_new_comments_subscriptions', full_name='CMsgClientCommentNotifications.count_new_comments_subscriptions', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=14958, serialized_end=15094, ) _CMSGCLIENTREQUESTCOMMENTNOTIFICATIONS = _descriptor.Descriptor( name='CMsgClientRequestCommentNotifications', full_name='CMsgClientRequestCommentNotifications', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15096, serialized_end=15135, ) _CMSGCLIENTOFFLINEMESSAGENOTIFICATION = _descriptor.Descriptor( name='CMsgClientOfflineMessageNotification', full_name='CMsgClientOfflineMessageNotification', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='offline_messages', full_name='CMsgClientOfflineMessageNotification.offline_messages', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='friends_with_offline_messages', full_name='CMsgClientOfflineMessageNotification.friends_with_offline_messages', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15137, serialized_end=15240, ) _CMSGCLIENTREQUESTOFFLINEMESSAGECOUNT = _descriptor.Descriptor( name='CMsgClientRequestOfflineMessageCount', full_name='CMsgClientRequestOfflineMessageCount', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15242, serialized_end=15280, ) _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORY = _descriptor.Descriptor( name='CMsgClientChatGetFriendMessageHistory', full_name='CMsgClientChatGetFriendMessageHistory', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steamid', full_name='CMsgClientChatGetFriendMessageHistory.steamid', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15282, serialized_end=15338, ) _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE_FRIENDMESSAGE = _descriptor.Descriptor( name='FriendMessage', full_name='CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='accountid', full_name='CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage.accountid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='timestamp', full_name='CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage.timestamp', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='message', full_name='CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage.message', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='unread', full_name='CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage.unread', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15504, serialized_end=15590, ) _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE = _descriptor.Descriptor( name='CMsgClientChatGetFriendMessageHistoryResponse', full_name='CMsgClientChatGetFriendMessageHistoryResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steamid', full_name='CMsgClientChatGetFriendMessageHistoryResponse.steamid', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='success', full_name='CMsgClientChatGetFriendMessageHistoryResponse.success', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='messages', full_name='CMsgClientChatGetFriendMessageHistoryResponse.messages', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE_FRIENDMESSAGE, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15341, serialized_end=15590, ) _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYFOROFFLINEMESSAGES = _descriptor.Descriptor( name='CMsgClientChatGetFriendMessageHistoryForOfflineMessages', full_name='CMsgClientChatGetFriendMessageHistoryForOfflineMessages', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15592, serialized_end=15649, ) _CMSGCLIENTFSGETFRIENDSSTEAMLEVELS = _descriptor.Descriptor( name='CMsgClientFSGetFriendsSteamLevels', full_name='CMsgClientFSGetFriendsSteamLevels', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='accountids', full_name='CMsgClientFSGetFriendsSteamLevels.accountids', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15651, serialized_end=15706, ) _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE_FRIEND = _descriptor.Descriptor( name='Friend', full_name='CMsgClientFSGetFriendsSteamLevelsResponse.Friend', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='accountid', full_name='CMsgClientFSGetFriendsSteamLevelsResponse.Friend.accountid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='level', full_name='CMsgClientFSGetFriendsSteamLevelsResponse.Friend.level', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15822, serialized_end=15864, ) _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE = _descriptor.Descriptor( name='CMsgClientFSGetFriendsSteamLevelsResponse', full_name='CMsgClientFSGetFriendsSteamLevelsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='friends', full_name='CMsgClientFSGetFriendsSteamLevelsResponse.friends', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE_FRIEND, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15709, serialized_end=15864, ) _CMSGCLIENTEMAILADDRINFO = _descriptor.Descriptor( name='CMsgClientEmailAddrInfo', full_name='CMsgClientEmailAddrInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='email_address', full_name='CMsgClientEmailAddrInfo.email_address', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='email_is_validated', full_name='CMsgClientEmailAddrInfo.email_is_validated', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='email_validation_changed', full_name='CMsgClientEmailAddrInfo.email_validation_changed', index=2, number=3, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='credential_change_requires_code', full_name='CMsgClientEmailAddrInfo.credential_change_requires_code', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='password_or_secretqa_change_requires_code', full_name='CMsgClientEmailAddrInfo.password_or_secretqa_change_requires_code', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='remind_user_about_email', full_name='CMsgClientEmailAddrInfo.remind_user_about_email', index=5, number=6, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=15867, serialized_end=16102, ) _CMSGCREITEMVOTESUMMARY_PUBLISHEDFILEID = _descriptor.Descriptor( name='PublishedFileId', full_name='CMsgCREItemVoteSummary.PublishedFileId', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgCREItemVoteSummary.PublishedFileId.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2704, serialized_end=2748, ) _CMSGCREITEMVOTESUMMARY = _descriptor.Descriptor( name='CMsgCREItemVoteSummary', full_name='CMsgCREItemVoteSummary', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_ids', full_name='CMsgCREItemVoteSummary.published_file_ids', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCREITEMVOTESUMMARY_PUBLISHEDFILEID, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16105, serialized_end=16244, ) _CMSGCREITEMVOTESUMMARYRESPONSE_ITEMVOTESUMMARY = _descriptor.Descriptor( name='ItemVoteSummary', full_name='CMsgCREItemVoteSummaryResponse.ItemVoteSummary', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgCREItemVoteSummaryResponse.ItemVoteSummary.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='votes_for', full_name='CMsgCREItemVoteSummaryResponse.ItemVoteSummary.votes_for', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='votes_against', full_name='CMsgCREItemVoteSummaryResponse.ItemVoteSummary.votes_against', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='reports', full_name='CMsgCREItemVoteSummaryResponse.ItemVoteSummary.reports', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='score', full_name='CMsgCREItemVoteSummaryResponse.ItemVoteSummary.score', index=4, number=5, type=2, cpp_type=6, label=1, has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16379, serialized_end=16497, ) _CMSGCREITEMVOTESUMMARYRESPONSE = _descriptor.Descriptor( name='CMsgCREItemVoteSummaryResponse', full_name='CMsgCREItemVoteSummaryResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgCREItemVoteSummaryResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='item_vote_summaries', full_name='CMsgCREItemVoteSummaryResponse.item_vote_summaries', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCREITEMVOTESUMMARYRESPONSE_ITEMVOTESUMMARY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16247, serialized_end=16497, ) _CMSGCREUPDATEUSERPUBLISHEDITEMVOTE = _descriptor.Descriptor( name='CMsgCREUpdateUserPublishedItemVote', full_name='CMsgCREUpdateUserPublishedItemVote', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgCREUpdateUserPublishedItemVote.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='vote_up', full_name='CMsgCREUpdateUserPublishedItemVote.vote_up', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16499, serialized_end=16579, ) _CMSGCREUPDATEUSERPUBLISHEDITEMVOTERESPONSE = _descriptor.Descriptor( name='CMsgCREUpdateUserPublishedItemVoteResponse', full_name='CMsgCREUpdateUserPublishedItemVoteResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgCREUpdateUserPublishedItemVoteResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16581, serialized_end=16645, ) _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS_PUBLISHEDFILEID = _descriptor.Descriptor( name='PublishedFileId', full_name='CMsgCREGetUserPublishedItemVoteDetails.PublishedFileId', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgCREGetUserPublishedItemVoteDetails.PublishedFileId.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=2704, serialized_end=2748, ) _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS = _descriptor.Descriptor( name='CMsgCREGetUserPublishedItemVoteDetails', full_name='CMsgCREGetUserPublishedItemVoteDetails', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_ids', full_name='CMsgCREGetUserPublishedItemVoteDetails.published_file_ids', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS_PUBLISHEDFILEID, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16648, serialized_end=16819, ) _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE_USERITEMVOTEDETAIL = _descriptor.Descriptor( name='UserItemVoteDetail', full_name='CMsgCREGetUserPublishedItemVoteDetailsResponse.UserItemVoteDetail', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='published_file_id', full_name='CMsgCREGetUserPublishedItemVoteDetailsResponse.UserItemVoteDetail.published_file_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='vote', full_name='CMsgCREGetUserPublishedItemVoteDetailsResponse.UserItemVoteDetail.vote', index=1, number=2, type=5, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16992, serialized_end=17056, ) _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE = _descriptor.Descriptor( name='CMsgCREGetUserPublishedItemVoteDetailsResponse', full_name='CMsgCREGetUserPublishedItemVoteDetailsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgCREGetUserPublishedItemVoteDetailsResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='user_item_vote_details', full_name='CMsgCREGetUserPublishedItemVoteDetailsResponse.user_item_vote_details', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE_USERITEMVOTEDETAIL, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=16822, serialized_end=17056, ) _CMSGGAMESERVERPINGSAMPLE_SAMPLE = _descriptor.Descriptor( name='Sample', full_name='CMsgGameServerPingSample.Sample', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='ip', full_name='CMsgGameServerPingSample.Sample.ip', index=0, number=1, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='avg_ping_ms', full_name='CMsgGameServerPingSample.Sample.avg_ping_ms', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='stddev_ping_ms_x10', full_name='CMsgGameServerPingSample.Sample.stddev_ping_ms_x10', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17175, serialized_end=17244, ) _CMSGGAMESERVERPINGSAMPLE = _descriptor.Descriptor( name='CMsgGameServerPingSample', full_name='CMsgGameServerPingSample', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='my_ip', full_name='CMsgGameServerPingSample.my_ip', index=0, number=1, type=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='gs_app_id', full_name='CMsgGameServerPingSample.gs_app_id', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='gs_samples', full_name='CMsgGameServerPingSample.gs_samples', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGGAMESERVERPINGSAMPLE_SAMPLE, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17059, serialized_end=17244, ) _CMSGFSGETFOLLOWERCOUNT = _descriptor.Descriptor( name='CMsgFSGetFollowerCount', full_name='CMsgFSGetFollowerCount', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id', full_name='CMsgFSGetFollowerCount.steam_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17246, serialized_end=17288, ) _CMSGFSGETFOLLOWERCOUNTRESPONSE = _descriptor.Descriptor( name='CMsgFSGetFollowerCountResponse', full_name='CMsgFSGetFollowerCountResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgFSGetFollowerCountResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='count', full_name='CMsgFSGetFollowerCountResponse.count', index=1, number=2, type=5, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17290, serialized_end=17360, ) _CMSGFSGETISFOLLOWING = _descriptor.Descriptor( name='CMsgFSGetIsFollowing', full_name='CMsgFSGetIsFollowing', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='steam_id', full_name='CMsgFSGetIsFollowing.steam_id', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17362, serialized_end=17402, ) _CMSGFSGETISFOLLOWINGRESPONSE = _descriptor.Descriptor( name='CMsgFSGetIsFollowingResponse', full_name='CMsgFSGetIsFollowingResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgFSGetIsFollowingResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_following', full_name='CMsgFSGetIsFollowingResponse.is_following', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17404, serialized_end=17483, ) _CMSGFSENUMERATEFOLLOWINGLIST = _descriptor.Descriptor( name='CMsgFSEnumerateFollowingList', full_name='CMsgFSEnumerateFollowingList', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='start_index', full_name='CMsgFSEnumerateFollowingList.start_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17485, serialized_end=17536, ) _CMSGFSENUMERATEFOLLOWINGLISTRESPONSE = _descriptor.Descriptor( name='CMsgFSEnumerateFollowingListResponse', full_name='CMsgFSEnumerateFollowingListResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgFSEnumerateFollowingListResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_results', full_name='CMsgFSEnumerateFollowingListResponse.total_results', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='steam_ids', full_name='CMsgFSEnumerateFollowingListResponse.steam_ids', index=2, number=3, type=6, cpp_type=4, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17538, serialized_end=17638, ) _CMSGDPGETNUMBEROFCURRENTPLAYERS = _descriptor.Descriptor( name='CMsgDPGetNumberOfCurrentPlayers', full_name='CMsgDPGetNumberOfCurrentPlayers', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='appid', full_name='CMsgDPGetNumberOfCurrentPlayers.appid', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17640, serialized_end=17688, ) _CMSGDPGETNUMBEROFCURRENTPLAYERSRESPONSE = _descriptor.Descriptor( name='CMsgDPGetNumberOfCurrentPlayersResponse', full_name='CMsgDPGetNumberOfCurrentPlayersResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgDPGetNumberOfCurrentPlayersResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='player_count', full_name='CMsgDPGetNumberOfCurrentPlayersResponse.player_count', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17690, serialized_end=17773, ) _CMSGCLIENTFRIENDUSERSTATUSPUBLISHED = _descriptor.Descriptor( name='CMsgClientFriendUserStatusPublished', full_name='CMsgClientFriendUserStatusPublished', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='friend_steamid', full_name='CMsgClientFriendUserStatusPublished.friend_steamid', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='appid', full_name='CMsgClientFriendUserStatusPublished.appid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='status_text', full_name='CMsgClientFriendUserStatusPublished.status_text', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17775, serialized_end=17872, ) _CMSGCLIENTSERVICEMETHODLEGACY = _descriptor.Descriptor( name='CMsgClientServiceMethodLegacy', full_name='CMsgClientServiceMethodLegacy', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='method_name', full_name='CMsgClientServiceMethodLegacy.method_name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='serialized_method', full_name='CMsgClientServiceMethodLegacy.serialized_method', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_notification', full_name='CMsgClientServiceMethodLegacy.is_notification', index=2, number=3, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17874, serialized_end=17978, ) _CMSGCLIENTSERVICEMETHODLEGACYRESPONSE = _descriptor.Descriptor( name='CMsgClientServiceMethodLegacyResponse', full_name='CMsgClientServiceMethodLegacyResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='method_name', full_name='CMsgClientServiceMethodLegacyResponse.method_name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='serialized_method_response', full_name='CMsgClientServiceMethodLegacyResponse.serialized_method_response', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=17980, serialized_end=18076, ) _CMSGCLIENTUIMODE = _descriptor.Descriptor( name='CMsgClientUIMode', full_name='CMsgClientUIMode', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='uimode', full_name='CMsgClientUIMode.uimode', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='chat_mode', full_name='CMsgClientUIMode.chat_mode', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18078, serialized_end=18131, ) _CMSGCLIENTVANITYURLCHANGEDNOTIFICATION = _descriptor.Descriptor( name='CMsgClientVanityURLChangedNotification', full_name='CMsgClientVanityURLChangedNotification', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='vanity_url', full_name='CMsgClientVanityURLChangedNotification.vanity_url', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18133, serialized_end=18193, ) _CMSGCLIENTAUTHORIZELOCALDEVICEREQUEST = _descriptor.Descriptor( name='CMsgClientAuthorizeLocalDeviceRequest', full_name='CMsgClientAuthorizeLocalDeviceRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='device_description', full_name='CMsgClientAuthorizeLocalDeviceRequest.device_description', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='owner_account_id', full_name='CMsgClientAuthorizeLocalDeviceRequest.owner_account_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='local_device_token', full_name='CMsgClientAuthorizeLocalDeviceRequest.local_device_token', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18195, serialized_end=18316, ) _CMSGCLIENTAUTHORIZELOCALDEVICE = _descriptor.Descriptor( name='CMsgClientAuthorizeLocalDevice', full_name='CMsgClientAuthorizeLocalDevice', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientAuthorizeLocalDevice.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='owner_account_id', full_name='CMsgClientAuthorizeLocalDevice.owner_account_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='authed_device_token', full_name='CMsgClientAuthorizeLocalDevice.authed_device_token', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18318, serialized_end=18425, ) _CMSGCLIENTAUTHORIZELOCALDEVICENOTIFICATION = _descriptor.Descriptor( name='CMsgClientAuthorizeLocalDeviceNotification', full_name='CMsgClientAuthorizeLocalDeviceNotification', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientAuthorizeLocalDeviceNotification.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='owner_account_id', full_name='CMsgClientAuthorizeLocalDeviceNotification.owner_account_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='local_device_token', full_name='CMsgClientAuthorizeLocalDeviceNotification.local_device_token', index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18427, serialized_end=18545, ) _CMSGCLIENTDEAUTHORIZEDEVICEREQUEST = _descriptor.Descriptor( name='CMsgClientDeauthorizeDeviceRequest', full_name='CMsgClientDeauthorizeDeviceRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='deauthorization_account_id', full_name='CMsgClientDeauthorizeDeviceRequest.deauthorization_account_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='deauthorization_device_token', full_name='CMsgClientDeauthorizeDeviceRequest.deauthorization_device_token', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18547, serialized_end=18657, ) _CMSGCLIENTDEAUTHORIZEDEVICE = _descriptor.Descriptor( name='CMsgClientDeauthorizeDevice', full_name='CMsgClientDeauthorizeDevice', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientDeauthorizeDevice.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='deauthorization_account_id', full_name='CMsgClientDeauthorizeDevice.deauthorization_account_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18659, serialized_end=18744, ) _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS_DEVICETOKEN = _descriptor.Descriptor( name='DeviceToken', full_name='CMsgClientUseLocalDeviceAuthorizations.DeviceToken', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='owner_account_id', full_name='CMsgClientUseLocalDeviceAuthorizations.DeviceToken.owner_account_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='token_id', full_name='CMsgClientUseLocalDeviceAuthorizations.DeviceToken.token_id', index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18899, serialized_end=18956, ) _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS = _descriptor.Descriptor( name='CMsgClientUseLocalDeviceAuthorizations', full_name='CMsgClientUseLocalDeviceAuthorizations', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='authorization_account_id', full_name='CMsgClientUseLocalDeviceAuthorizations.authorization_account_id', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='device_tokens', full_name='CMsgClientUseLocalDeviceAuthorizations.device_tokens', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS_DEVICETOKEN, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18747, serialized_end=18956, ) _CMSGCLIENTGETAUTHORIZEDDEVICES = _descriptor.Descriptor( name='CMsgClientGetAuthorizedDevices', full_name='CMsgClientGetAuthorizedDevices', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18958, serialized_end=18990, ) _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE_AUTHORIZEDDEVICE = _descriptor.Descriptor( name='AuthorizedDevice', full_name='CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='auth_device_token', full_name='CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice.auth_device_token', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='device_name', full_name='CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice.device_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_access_time', full_name='CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice.last_access_time', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='borrower_id', full_name='CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice.borrower_id', index=3, number=4, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='is_pending', full_name='CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice.is_pending', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='app_played', full_name='CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice.app_played', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=19141, serialized_end=19294, ) _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE = _descriptor.Descriptor( name='CMsgClientGetAuthorizedDevicesResponse', full_name='CMsgClientGetAuthorizedDevicesResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientGetAuthorizedDevicesResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='authorized_device', full_name='CMsgClientGetAuthorizedDevicesResponse.authorized_device', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE_AUTHORIZEDDEVICE, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=18993, serialized_end=19294, ) _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS_LOCKEDLIBRARY = _descriptor.Descriptor( name='LockedLibrary', full_name='CMsgClientSharedLibraryLockStatus.LockedLibrary', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='owner_id', full_name='CMsgClientSharedLibraryLockStatus.LockedLibrary.owner_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='locked_by', full_name='CMsgClientSharedLibraryLockStatus.LockedLibrary.locked_by', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=19439, serialized_end=19491, ) _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS = _descriptor.Descriptor( name='CMsgClientSharedLibraryLockStatus', full_name='CMsgClientSharedLibraryLockStatus', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='locked_library', full_name='CMsgClientSharedLibraryLockStatus.locked_library', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='own_library_locked_by', full_name='CMsgClientSharedLibraryLockStatus.own_library_locked_by', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTSHAREDLIBRARYLOCKSTATUS_LOCKEDLIBRARY, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=19297, serialized_end=19491, ) _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING_STOPAPP = _descriptor.Descriptor( name='StopApp', full_name='CMsgClientSharedLibraryStopPlaying.StopApp', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='app_id', full_name='CMsgClientSharedLibraryStopPlaying.StopApp.app_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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='owner_id', full_name='CMsgClientSharedLibraryStopPlaying.StopApp.owner_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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=19618, serialized_end=19661, ) _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING = _descriptor.Descriptor( name='CMsgClientSharedLibraryStopPlaying', full_name='CMsgClientSharedLibraryStopPlaying', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='seconds_left', full_name='CMsgClientSharedLibraryStopPlaying.seconds_left', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='stop_apps', full_name='CMsgClientSharedLibraryStopPlaying.stop_apps', index=1, number=2, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_CMSGCLIENTSHAREDLIBRARYSTOPPLAYING_STOPAPP, ], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=19494, serialized_end=19661, ) _CMSGCLIENTSERVICECALL = _descriptor.Descriptor( name='CMsgClientServiceCall', full_name='CMsgClientServiceCall', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='sysid_routing', full_name='CMsgClientServiceCall.sysid_routing', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='call_handle', full_name='CMsgClientServiceCall.call_handle', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_crc', full_name='CMsgClientServiceCall.module_crc', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_hash', full_name='CMsgClientServiceCall.module_hash', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='function_id', full_name='CMsgClientServiceCall.function_id', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cub_output_max', full_name='CMsgClientServiceCall.cub_output_max', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='flags', full_name='CMsgClientServiceCall.flags', index=6, number=7, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='callparameter', full_name='CMsgClientServiceCall.callparameter', index=7, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ping_only', full_name='CMsgClientServiceCall.ping_only', index=8, number=9, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='max_outstanding_calls', full_name='CMsgClientServiceCall.max_outstanding_calls', index=9, number=10, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=19664, serialized_end=19905, ) _CMSGCLIENTSERVICEMODULE = _descriptor.Descriptor( name='CMsgClientServiceModule', full_name='CMsgClientServiceModule', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='module_crc', full_name='CMsgClientServiceModule.module_crc', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_hash', full_name='CMsgClientServiceModule.module_hash', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_content', full_name='CMsgClientServiceModule.module_content', index=2, number=3, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=19907, serialized_end=19997, ) _CMSGCLIENTSERVICECALLRESPONSE = _descriptor.Descriptor( name='CMsgClientServiceCallResponse', full_name='CMsgClientServiceCallResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='sysid_routing', full_name='CMsgClientServiceCallResponse.sysid_routing', index=0, number=1, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='call_handle', full_name='CMsgClientServiceCallResponse.call_handle', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_crc', full_name='CMsgClientServiceCallResponse.module_crc', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='module_hash', full_name='CMsgClientServiceCallResponse.module_hash', index=3, number=4, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='ecallresult', full_name='CMsgClientServiceCallResponse.ecallresult', index=4, number=5, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='result_content', full_name='CMsgClientServiceCallResponse.result_content', index=5, number=6, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='os_version_info', full_name='CMsgClientServiceCallResponse.os_version_info', index=6, number=7, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='system_info', full_name='CMsgClientServiceCallResponse.system_info', index=7, number=8, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='load_address', full_name='CMsgClientServiceCallResponse.load_address', index=8, number=9, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='exception_record', full_name='CMsgClientServiceCallResponse.exception_record', index=9, number=10, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='portable_os_version_info', full_name='CMsgClientServiceCallResponse.portable_os_version_info', index=10, number=11, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='portable_system_info', full_name='CMsgClientServiceCallResponse.portable_system_info', index=11, number=12, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='was_converted', full_name='CMsgClientServiceCallResponse.was_converted', index=12, number=13, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='internal_result', full_name='CMsgClientServiceCallResponse.internal_result', index=13, number=14, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='current_count', full_name='CMsgClientServiceCallResponse.current_count', index=14, number=15, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_call_handle', full_name='CMsgClientServiceCallResponse.last_call_handle', index=15, number=16, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_call_module_crc', full_name='CMsgClientServiceCallResponse.last_call_module_crc', index=16, number=17, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_call_sysid_routing', full_name='CMsgClientServiceCallResponse.last_call_sysid_routing', index=17, number=18, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_ecallresult', full_name='CMsgClientServiceCallResponse.last_ecallresult', index=18, number=19, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_callissue_delta', full_name='CMsgClientServiceCallResponse.last_callissue_delta', index=19, number=20, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='last_callcomplete_delta', full_name='CMsgClientServiceCallResponse.last_callcomplete_delta', index=20, number=21, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20000, serialized_end=20568, ) _CMSGAMUNLOCKSTREAMING = _descriptor.Descriptor( name='CMsgAMUnlockStreaming', full_name='CMsgAMUnlockStreaming', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20570, serialized_end=20593, ) _CMSGAMUNLOCKSTREAMINGRESPONSE = _descriptor.Descriptor( name='CMsgAMUnlockStreamingResponse', full_name='CMsgAMUnlockStreamingResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgAMUnlockStreamingResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='encryption_key', full_name='CMsgAMUnlockStreamingResponse.encryption_key', index=1, number=2, type=12, cpp_type=9, label=1, has_default_value=False, default_value=_b(""), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20595, serialized_end=20670, ) _CMSGAMUNLOCKHEVC = _descriptor.Descriptor( name='CMsgAMUnlockHEVC', full_name='CMsgAMUnlockHEVC', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20672, serialized_end=20690, ) _CMSGAMUNLOCKHEVCRESPONSE = _descriptor.Descriptor( name='CMsgAMUnlockHEVCResponse', full_name='CMsgAMUnlockHEVCResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='eresult', full_name='CMsgAMUnlockHEVCResponse.eresult', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20692, serialized_end=20738, ) _CMSGCLIENTPLAYINGSESSIONSTATE = _descriptor.Descriptor( name='CMsgClientPlayingSessionState', full_name='CMsgClientPlayingSessionState', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='playing_blocked', full_name='CMsgClientPlayingSessionState.playing_blocked', index=0, number=2, 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='playing_app', full_name='CMsgClientPlayingSessionState.playing_app', index=1, 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20740, serialized_end=20817, ) _CMSGCLIENTKICKPLAYINGSESSION = _descriptor.Descriptor( name='CMsgClientKickPlayingSession', full_name='CMsgClientKickPlayingSession', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='only_stop_game', full_name='CMsgClientKickPlayingSession.only_stop_game', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20819, serialized_end=20873, ) _CMSGCLIENTVOICECALLPREAUTHORIZE = _descriptor.Descriptor( name='CMsgClientVoiceCallPreAuthorize', full_name='CMsgClientVoiceCallPreAuthorize', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='caller_steamid', full_name='CMsgClientVoiceCallPreAuthorize.caller_steamid', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='receiver_steamid', full_name='CMsgClientVoiceCallPreAuthorize.receiver_steamid', index=1, number=2, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='caller_id', full_name='CMsgClientVoiceCallPreAuthorize.caller_id', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='hangup', full_name='CMsgClientVoiceCallPreAuthorize.hangup', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20875, serialized_end=20993, ) _CMSGCLIENTVOICECALLPREAUTHORIZERESPONSE = _descriptor.Descriptor( name='CMsgClientVoiceCallPreAuthorizeResponse', full_name='CMsgClientVoiceCallPreAuthorizeResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='caller_steamid', full_name='CMsgClientVoiceCallPreAuthorizeResponse.caller_steamid', index=0, number=1, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='receiver_steamid', full_name='CMsgClientVoiceCallPreAuthorizeResponse.receiver_steamid', index=1, number=2, type=6, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='eresult', full_name='CMsgClientVoiceCallPreAuthorizeResponse.eresult', index=2, number=3, type=5, cpp_type=1, label=1, has_default_value=True, default_value=2, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='caller_id', full_name='CMsgClientVoiceCallPreAuthorizeResponse.caller_id', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=20996, serialized_end=21126, ) _CMSGBADGECRAFTEDNOTIFICATION = _descriptor.Descriptor( name='CMsgBadgeCraftedNotification', full_name='CMsgBadgeCraftedNotification', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='appid', full_name='CMsgBadgeCraftedNotification.appid', 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, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='badge_level', full_name='CMsgBadgeCraftedNotification.badge_level', 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, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=21128, serialized_end=21194, ) _CMSGCLIENTUCMADDSCREENSHOT_TAG.containing_type = _CMSGCLIENTUCMADDSCREENSHOT _CMSGCLIENTUCMADDSCREENSHOT.fields_by_name['tag'].message_type = _CMSGCLIENTUCMADDSCREENSHOT_TAG _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_KEYVALUETAG.containing_type = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_ADDITIONALPREVIEW.containing_type = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE _CMSGCLIENTUCMUPDATEPUBLISHEDFILE.fields_by_name['kvtags'].message_type = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_KEYVALUETAG _CMSGCLIENTUCMUPDATEPUBLISHEDFILE.fields_by_name['previews'].message_type = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_ADDITIONALPREVIEW _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE_PUBLISHEDFILEID.containing_type = _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE.fields_by_name['published_files'].message_type = _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE_PUBLISHEDFILEID _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE_PUBLISHEDFILEID.containing_type = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE.fields_by_name['subscribed_files'].message_type = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE_PUBLISHEDFILEID _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE_PUBLISHEDFILEID.containing_type = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE.fields_by_name['subscribed_files'].message_type = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE_PUBLISHEDFILEID _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE_WORKSHOPITEMINFO.containing_type = _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE.fields_by_name['workshop_items'].message_type = _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE_WORKSHOPITEMINFO _CMSGCLIENTWORKSHOPITEMINFOREQUEST_WORKSHOPITEM.containing_type = _CMSGCLIENTWORKSHOPITEMINFOREQUEST _CMSGCLIENTWORKSHOPITEMINFOREQUEST.fields_by_name['workshop_items'].message_type = _CMSGCLIENTWORKSHOPITEMINFOREQUEST_WORKSHOPITEM _CMSGCLIENTWORKSHOPITEMINFORESPONSE_WORKSHOPITEMINFO.containing_type = _CMSGCLIENTWORKSHOPITEMINFORESPONSE _CMSGCLIENTWORKSHOPITEMINFORESPONSE.fields_by_name['workshop_items'].message_type = _CMSGCLIENTWORKSHOPITEMINFORESPONSE_WORKSHOPITEMINFO _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE_PUBLISHEDFILEID.containing_type = _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE.fields_by_name['published_files'].message_type = _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE_PUBLISHEDFILEID _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE_PUBLISHEDFILEID.containing_type = _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE.fields_by_name['published_files'].message_type = _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE_PUBLISHEDFILEID _CMSGCLIENTRICHPRESENCEINFO_RICHPRESENCE.containing_type = _CMSGCLIENTRICHPRESENCEINFO _CMSGCLIENTRICHPRESENCEINFO.fields_by_name['rich_presence'].message_type = _CMSGCLIENTRICHPRESENCEINFO_RICHPRESENCE _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE_BETAPASSWORD.containing_type = _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE.fields_by_name['betapasswords'].message_type = _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE_BETAPASSWORD _CMSGDOWNLOADRATESTATISTICS_STATSINFO.containing_type = _CMSGDOWNLOADRATESTATISTICS _CMSGDOWNLOADRATESTATISTICS.fields_by_name['stats'].message_type = _CMSGDOWNLOADRATESTATISTICS_STATSINFO _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY_STAT.containing_type = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY.fields_by_name['stats'].message_type = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY_STAT _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY.containing_type = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE.fields_by_name['days'].message_type = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY _CMSGGAMESERVERDATA_PLAYER.containing_type = _CMSGGAMESERVERDATA _CMSGGAMESERVERDATA.fields_by_name['game_ip_address'].message_type = steammessages__base__pb2._CMSGIPADDRESS _CMSGGAMESERVERDATA.fields_by_name['players'].message_type = _CMSGGAMESERVERDATA_PLAYER _CMSGGAMESERVERREMOVE.fields_by_name['ip'].message_type = steammessages__base__pb2._CMSGIPADDRESS _CMSGGMSCLIENTSERVERQUERYRESPONSE_SERVER.fields_by_name['server_ip'].message_type = steammessages__base__pb2._CMSGIPADDRESS _CMSGGMSCLIENTSERVERQUERYRESPONSE_SERVER.containing_type = _CMSGGMSCLIENTSERVERQUERYRESPONSE _CMSGGMSCLIENTSERVERQUERYRESPONSE.fields_by_name['servers'].message_type = _CMSGGMSCLIENTSERVERQUERYRESPONSE_SERVER _CMSGCLIENTITEMANNOUNCEMENTS_UNSEENITEM.containing_type = _CMSGCLIENTITEMANNOUNCEMENTS _CMSGCLIENTITEMANNOUNCEMENTS.fields_by_name['unseen_items'].message_type = _CMSGCLIENTITEMANNOUNCEMENTS_UNSEENITEM _CMSGCLIENTUSERNOTIFICATIONS_NOTIFICATION.containing_type = _CMSGCLIENTUSERNOTIFICATIONS _CMSGCLIENTUSERNOTIFICATIONS.fields_by_name['notifications'].message_type = _CMSGCLIENTUSERNOTIFICATIONS_NOTIFICATION _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE_FRIENDMESSAGE.containing_type = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE.fields_by_name['messages'].message_type = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE_FRIENDMESSAGE _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE_FRIEND.containing_type = _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE.fields_by_name['friends'].message_type = _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE_FRIEND _CMSGCREITEMVOTESUMMARY_PUBLISHEDFILEID.containing_type = _CMSGCREITEMVOTESUMMARY _CMSGCREITEMVOTESUMMARY.fields_by_name['published_file_ids'].message_type = _CMSGCREITEMVOTESUMMARY_PUBLISHEDFILEID _CMSGCREITEMVOTESUMMARYRESPONSE_ITEMVOTESUMMARY.containing_type = _CMSGCREITEMVOTESUMMARYRESPONSE _CMSGCREITEMVOTESUMMARYRESPONSE.fields_by_name['item_vote_summaries'].message_type = _CMSGCREITEMVOTESUMMARYRESPONSE_ITEMVOTESUMMARY _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS_PUBLISHEDFILEID.containing_type = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS.fields_by_name['published_file_ids'].message_type = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS_PUBLISHEDFILEID _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE_USERITEMVOTEDETAIL.containing_type = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE.fields_by_name['user_item_vote_details'].message_type = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE_USERITEMVOTEDETAIL _CMSGGAMESERVERPINGSAMPLE_SAMPLE.containing_type = _CMSGGAMESERVERPINGSAMPLE _CMSGGAMESERVERPINGSAMPLE.fields_by_name['gs_samples'].message_type = _CMSGGAMESERVERPINGSAMPLE_SAMPLE _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS_DEVICETOKEN.containing_type = _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS.fields_by_name['device_tokens'].message_type = _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS_DEVICETOKEN _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE_AUTHORIZEDDEVICE.containing_type = _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE.fields_by_name['authorized_device'].message_type = _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE_AUTHORIZEDDEVICE _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS_LOCKEDLIBRARY.containing_type = _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS.fields_by_name['locked_library'].message_type = _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS_LOCKEDLIBRARY _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING_STOPAPP.containing_type = _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING.fields_by_name['stop_apps'].message_type = _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING_STOPAPP DESCRIPTOR.message_types_by_name['CMsgClientUCMAddScreenshot'] = _CMSGCLIENTUCMADDSCREENSHOT DESCRIPTOR.message_types_by_name['CMsgClientUCMAddScreenshotResponse'] = _CMSGCLIENTUCMADDSCREENSHOTRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMDeleteScreenshot'] = _CMSGCLIENTUCMDELETESCREENSHOT DESCRIPTOR.message_types_by_name['CMsgClientUCMDeleteScreenshotResponse'] = _CMSGCLIENTUCMDELETESCREENSHOTRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMPublishFile'] = _CMSGCLIENTUCMPUBLISHFILE DESCRIPTOR.message_types_by_name['CMsgClientUCMPublishFileResponse'] = _CMSGCLIENTUCMPUBLISHFILERESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMUpdatePublishedFile'] = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE DESCRIPTOR.message_types_by_name['CMsgClientUCMUpdatePublishedFileResponse'] = _CMSGCLIENTUCMUPDATEPUBLISHEDFILERESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMDeletePublishedFile'] = _CMSGCLIENTUCMDELETEPUBLISHEDFILE DESCRIPTOR.message_types_by_name['CMsgClientUCMDeletePublishedFileResponse'] = _CMSGCLIENTUCMDELETEPUBLISHEDFILERESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumerateUserPublishedFiles'] = _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILES DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumerateUserPublishedFilesResponse'] = _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumerateUserSubscribedFiles'] = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILES DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumerateUserSubscribedFilesResponse'] = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates'] = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATES DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse'] = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMPublishedFileUpdated'] = _CMSGCLIENTUCMPUBLISHEDFILEUPDATED DESCRIPTOR.message_types_by_name['CMsgClientWorkshopItemChangesRequest'] = _CMSGCLIENTWORKSHOPITEMCHANGESREQUEST DESCRIPTOR.message_types_by_name['CMsgClientWorkshopItemChangesResponse'] = _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientWorkshopItemInfoRequest'] = _CMSGCLIENTWORKSHOPITEMINFOREQUEST DESCRIPTOR.message_types_by_name['CMsgClientWorkshopItemInfoResponse'] = _CMSGCLIENTWORKSHOPITEMINFORESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMGetPublishedFilesForUser'] = _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSER DESCRIPTOR.message_types_by_name['CMsgClientUCMGetPublishedFilesForUserResponse'] = _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMSetUserPublishedFileAction'] = _CMSGCLIENTUCMSETUSERPUBLISHEDFILEACTION DESCRIPTOR.message_types_by_name['CMsgClientUCMSetUserPublishedFileActionResponse'] = _CMSGCLIENTUCMSETUSERPUBLISHEDFILEACTIONRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumeratePublishedFilesByUserAction'] = _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTION DESCRIPTOR.message_types_by_name['CMsgClientUCMEnumeratePublishedFilesByUserActionResponse'] = _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientScreenshotsChanged'] = _CMSGCLIENTSCREENSHOTSCHANGED DESCRIPTOR.message_types_by_name['CMsgClientUpdateUserGameInfo'] = _CMSGCLIENTUPDATEUSERGAMEINFO DESCRIPTOR.message_types_by_name['CMsgClientRichPresenceUpload'] = _CMSGCLIENTRICHPRESENCEUPLOAD DESCRIPTOR.message_types_by_name['CMsgClientRichPresenceRequest'] = _CMSGCLIENTRICHPRESENCEREQUEST DESCRIPTOR.message_types_by_name['CMsgClientRichPresenceInfo'] = _CMSGCLIENTRICHPRESENCEINFO DESCRIPTOR.message_types_by_name['CMsgClientCheckFileSignature'] = _CMSGCLIENTCHECKFILESIGNATURE DESCRIPTOR.message_types_by_name['CMsgClientCheckFileSignatureResponse'] = _CMSGCLIENTCHECKFILESIGNATURERESPONSE DESCRIPTOR.message_types_by_name['CMsgClientReadMachineAuth'] = _CMSGCLIENTREADMACHINEAUTH DESCRIPTOR.message_types_by_name['CMsgClientReadMachineAuthResponse'] = _CMSGCLIENTREADMACHINEAUTHRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUpdateMachineAuth'] = _CMSGCLIENTUPDATEMACHINEAUTH DESCRIPTOR.message_types_by_name['CMsgClientUpdateMachineAuthResponse'] = _CMSGCLIENTUPDATEMACHINEAUTHRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientRequestMachineAuth'] = _CMSGCLIENTREQUESTMACHINEAUTH DESCRIPTOR.message_types_by_name['CMsgClientRequestMachineAuthResponse'] = _CMSGCLIENTREQUESTMACHINEAUTHRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientRegisterKey'] = _CMSGCLIENTREGISTERKEY DESCRIPTOR.message_types_by_name['CMsgClientPurchaseResponse'] = _CMSGCLIENTPURCHASERESPONSE DESCRIPTOR.message_types_by_name['CMsgClientActivateOEMLicense'] = _CMSGCLIENTACTIVATEOEMLICENSE DESCRIPTOR.message_types_by_name['CMsgClientRegisterOEMMachine'] = _CMSGCLIENTREGISTEROEMMACHINE DESCRIPTOR.message_types_by_name['CMsgClientRegisterOEMMachineResponse'] = _CMSGCLIENTREGISTEROEMMACHINERESPONSE DESCRIPTOR.message_types_by_name['CMsgClientPurchaseWithMachineID'] = _CMSGCLIENTPURCHASEWITHMACHINEID DESCRIPTOR.message_types_by_name['CMsgTrading_InitiateTradeRequest'] = _CMSGTRADING_INITIATETRADEREQUEST DESCRIPTOR.message_types_by_name['CMsgTrading_InitiateTradeResponse'] = _CMSGTRADING_INITIATETRADERESPONSE DESCRIPTOR.message_types_by_name['CMsgTrading_CancelTradeRequest'] = _CMSGTRADING_CANCELTRADEREQUEST DESCRIPTOR.message_types_by_name['CMsgTrading_StartSession'] = _CMSGTRADING_STARTSESSION DESCRIPTOR.message_types_by_name['CMsgClientGetCDNAuthToken'] = _CMSGCLIENTGETCDNAUTHTOKEN DESCRIPTOR.message_types_by_name['CMsgClientGetDepotDecryptionKey'] = _CMSGCLIENTGETDEPOTDECRYPTIONKEY DESCRIPTOR.message_types_by_name['CMsgClientGetDepotDecryptionKeyResponse'] = _CMSGCLIENTGETDEPOTDECRYPTIONKEYRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientCheckAppBetaPassword'] = _CMSGCLIENTCHECKAPPBETAPASSWORD DESCRIPTOR.message_types_by_name['CMsgClientCheckAppBetaPasswordResponse'] = _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUpdateAppJobReport'] = _CMSGCLIENTUPDATEAPPJOBREPORT DESCRIPTOR.message_types_by_name['CMsgClientDPContentStatsReport'] = _CMSGCLIENTDPCONTENTSTATSREPORT DESCRIPTOR.message_types_by_name['CMsgClientGetCDNAuthTokenResponse'] = _CMSGCLIENTGETCDNAUTHTOKENRESPONSE DESCRIPTOR.message_types_by_name['CMsgDownloadRateStatistics'] = _CMSGDOWNLOADRATESTATISTICS DESCRIPTOR.message_types_by_name['CMsgClientRequestAccountData'] = _CMSGCLIENTREQUESTACCOUNTDATA DESCRIPTOR.message_types_by_name['CMsgClientRequestAccountDataResponse'] = _CMSGCLIENTREQUESTACCOUNTDATARESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUGSGetGlobalStats'] = _CMSGCLIENTUGSGETGLOBALSTATS DESCRIPTOR.message_types_by_name['CMsgClientUGSGetGlobalStatsResponse'] = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE DESCRIPTOR.message_types_by_name['CMsgGameServerData'] = _CMSGGAMESERVERDATA DESCRIPTOR.message_types_by_name['CMsgGameServerRemove'] = _CMSGGAMESERVERREMOVE DESCRIPTOR.message_types_by_name['CMsgClientGMSServerQuery'] = _CMSGCLIENTGMSSERVERQUERY DESCRIPTOR.message_types_by_name['CMsgGMSClientServerQueryResponse'] = _CMSGGMSCLIENTSERVERQUERYRESPONSE DESCRIPTOR.message_types_by_name['CMsgGameServerOutOfDate'] = _CMSGGAMESERVEROUTOFDATE DESCRIPTOR.message_types_by_name['CMsgClientRedeemGuestPass'] = _CMSGCLIENTREDEEMGUESTPASS DESCRIPTOR.message_types_by_name['CMsgClientRedeemGuestPassResponse'] = _CMSGCLIENTREDEEMGUESTPASSRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientGetClanActivityCounts'] = _CMSGCLIENTGETCLANACTIVITYCOUNTS DESCRIPTOR.message_types_by_name['CMsgClientGetClanActivityCountsResponse'] = _CMSGCLIENTGETCLANACTIVITYCOUNTSRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientOGSReportString'] = _CMSGCLIENTOGSREPORTSTRING DESCRIPTOR.message_types_by_name['CMsgClientOGSReportBug'] = _CMSGCLIENTOGSREPORTBUG DESCRIPTOR.message_types_by_name['CMsgGSAssociateWithClan'] = _CMSGGSASSOCIATEWITHCLAN DESCRIPTOR.message_types_by_name['CMsgGSAssociateWithClanResponse'] = _CMSGGSASSOCIATEWITHCLANRESPONSE DESCRIPTOR.message_types_by_name['CMsgGSComputeNewPlayerCompatibility'] = _CMSGGSCOMPUTENEWPLAYERCOMPATIBILITY DESCRIPTOR.message_types_by_name['CMsgGSComputeNewPlayerCompatibilityResponse'] = _CMSGGSCOMPUTENEWPLAYERCOMPATIBILITYRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientSentLogs'] = _CMSGCLIENTSENTLOGS DESCRIPTOR.message_types_by_name['CMsgGCClient'] = _CMSGGCCLIENT DESCRIPTOR.message_types_by_name['CMsgClientRequestFreeLicense'] = _CMSGCLIENTREQUESTFREELICENSE DESCRIPTOR.message_types_by_name['CMsgClientRequestFreeLicenseResponse'] = _CMSGCLIENTREQUESTFREELICENSERESPONSE DESCRIPTOR.message_types_by_name['CMsgDRMDownloadRequestWithCrashData'] = _CMSGDRMDOWNLOADREQUESTWITHCRASHDATA DESCRIPTOR.message_types_by_name['CMsgDRMDownloadResponse'] = _CMSGDRMDOWNLOADRESPONSE DESCRIPTOR.message_types_by_name['CMsgDRMFinalResult'] = _CMSGDRMFINALRESULT DESCRIPTOR.message_types_by_name['CMsgClientDPCheckSpecialSurvey'] = _CMSGCLIENTDPCHECKSPECIALSURVEY DESCRIPTOR.message_types_by_name['CMsgClientDPCheckSpecialSurveyResponse'] = _CMSGCLIENTDPCHECKSPECIALSURVEYRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientDPSendSpecialSurveyResponse'] = _CMSGCLIENTDPSENDSPECIALSURVEYRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientDPSendSpecialSurveyResponseReply'] = _CMSGCLIENTDPSENDSPECIALSURVEYRESPONSEREPLY DESCRIPTOR.message_types_by_name['CMsgClientRequestForgottenPasswordEmail'] = _CMSGCLIENTREQUESTFORGOTTENPASSWORDEMAIL DESCRIPTOR.message_types_by_name['CMsgClientRequestForgottenPasswordEmailResponse'] = _CMSGCLIENTREQUESTFORGOTTENPASSWORDEMAILRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientItemAnnouncements'] = _CMSGCLIENTITEMANNOUNCEMENTS DESCRIPTOR.message_types_by_name['CMsgClientRequestItemAnnouncements'] = _CMSGCLIENTREQUESTITEMANNOUNCEMENTS DESCRIPTOR.message_types_by_name['CMsgClientUserNotifications'] = _CMSGCLIENTUSERNOTIFICATIONS DESCRIPTOR.message_types_by_name['CMsgClientCommentNotifications'] = _CMSGCLIENTCOMMENTNOTIFICATIONS DESCRIPTOR.message_types_by_name['CMsgClientRequestCommentNotifications'] = _CMSGCLIENTREQUESTCOMMENTNOTIFICATIONS DESCRIPTOR.message_types_by_name['CMsgClientOfflineMessageNotification'] = _CMSGCLIENTOFFLINEMESSAGENOTIFICATION DESCRIPTOR.message_types_by_name['CMsgClientRequestOfflineMessageCount'] = _CMSGCLIENTREQUESTOFFLINEMESSAGECOUNT DESCRIPTOR.message_types_by_name['CMsgClientChatGetFriendMessageHistory'] = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORY DESCRIPTOR.message_types_by_name['CMsgClientChatGetFriendMessageHistoryResponse'] = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientChatGetFriendMessageHistoryForOfflineMessages'] = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYFOROFFLINEMESSAGES DESCRIPTOR.message_types_by_name['CMsgClientFSGetFriendsSteamLevels'] = _CMSGCLIENTFSGETFRIENDSSTEAMLEVELS DESCRIPTOR.message_types_by_name['CMsgClientFSGetFriendsSteamLevelsResponse'] = _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientEmailAddrInfo'] = _CMSGCLIENTEMAILADDRINFO DESCRIPTOR.message_types_by_name['CMsgCREItemVoteSummary'] = _CMSGCREITEMVOTESUMMARY DESCRIPTOR.message_types_by_name['CMsgCREItemVoteSummaryResponse'] = _CMSGCREITEMVOTESUMMARYRESPONSE DESCRIPTOR.message_types_by_name['CMsgCREUpdateUserPublishedItemVote'] = _CMSGCREUPDATEUSERPUBLISHEDITEMVOTE DESCRIPTOR.message_types_by_name['CMsgCREUpdateUserPublishedItemVoteResponse'] = _CMSGCREUPDATEUSERPUBLISHEDITEMVOTERESPONSE DESCRIPTOR.message_types_by_name['CMsgCREGetUserPublishedItemVoteDetails'] = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS DESCRIPTOR.message_types_by_name['CMsgCREGetUserPublishedItemVoteDetailsResponse'] = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE DESCRIPTOR.message_types_by_name['CMsgGameServerPingSample'] = _CMSGGAMESERVERPINGSAMPLE DESCRIPTOR.message_types_by_name['CMsgFSGetFollowerCount'] = _CMSGFSGETFOLLOWERCOUNT DESCRIPTOR.message_types_by_name['CMsgFSGetFollowerCountResponse'] = _CMSGFSGETFOLLOWERCOUNTRESPONSE DESCRIPTOR.message_types_by_name['CMsgFSGetIsFollowing'] = _CMSGFSGETISFOLLOWING DESCRIPTOR.message_types_by_name['CMsgFSGetIsFollowingResponse'] = _CMSGFSGETISFOLLOWINGRESPONSE DESCRIPTOR.message_types_by_name['CMsgFSEnumerateFollowingList'] = _CMSGFSENUMERATEFOLLOWINGLIST DESCRIPTOR.message_types_by_name['CMsgFSEnumerateFollowingListResponse'] = _CMSGFSENUMERATEFOLLOWINGLISTRESPONSE DESCRIPTOR.message_types_by_name['CMsgDPGetNumberOfCurrentPlayers'] = _CMSGDPGETNUMBEROFCURRENTPLAYERS DESCRIPTOR.message_types_by_name['CMsgDPGetNumberOfCurrentPlayersResponse'] = _CMSGDPGETNUMBEROFCURRENTPLAYERSRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientFriendUserStatusPublished'] = _CMSGCLIENTFRIENDUSERSTATUSPUBLISHED DESCRIPTOR.message_types_by_name['CMsgClientServiceMethodLegacy'] = _CMSGCLIENTSERVICEMETHODLEGACY DESCRIPTOR.message_types_by_name['CMsgClientServiceMethodLegacyResponse'] = _CMSGCLIENTSERVICEMETHODLEGACYRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientUIMode'] = _CMSGCLIENTUIMODE DESCRIPTOR.message_types_by_name['CMsgClientVanityURLChangedNotification'] = _CMSGCLIENTVANITYURLCHANGEDNOTIFICATION DESCRIPTOR.message_types_by_name['CMsgClientAuthorizeLocalDeviceRequest'] = _CMSGCLIENTAUTHORIZELOCALDEVICEREQUEST DESCRIPTOR.message_types_by_name['CMsgClientAuthorizeLocalDevice'] = _CMSGCLIENTAUTHORIZELOCALDEVICE DESCRIPTOR.message_types_by_name['CMsgClientAuthorizeLocalDeviceNotification'] = _CMSGCLIENTAUTHORIZELOCALDEVICENOTIFICATION DESCRIPTOR.message_types_by_name['CMsgClientDeauthorizeDeviceRequest'] = _CMSGCLIENTDEAUTHORIZEDEVICEREQUEST DESCRIPTOR.message_types_by_name['CMsgClientDeauthorizeDevice'] = _CMSGCLIENTDEAUTHORIZEDEVICE DESCRIPTOR.message_types_by_name['CMsgClientUseLocalDeviceAuthorizations'] = _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS DESCRIPTOR.message_types_by_name['CMsgClientGetAuthorizedDevices'] = _CMSGCLIENTGETAUTHORIZEDDEVICES DESCRIPTOR.message_types_by_name['CMsgClientGetAuthorizedDevicesResponse'] = _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientSharedLibraryLockStatus'] = _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS DESCRIPTOR.message_types_by_name['CMsgClientSharedLibraryStopPlaying'] = _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING DESCRIPTOR.message_types_by_name['CMsgClientServiceCall'] = _CMSGCLIENTSERVICECALL DESCRIPTOR.message_types_by_name['CMsgClientServiceModule'] = _CMSGCLIENTSERVICEMODULE DESCRIPTOR.message_types_by_name['CMsgClientServiceCallResponse'] = _CMSGCLIENTSERVICECALLRESPONSE DESCRIPTOR.message_types_by_name['CMsgAMUnlockStreaming'] = _CMSGAMUNLOCKSTREAMING DESCRIPTOR.message_types_by_name['CMsgAMUnlockStreamingResponse'] = _CMSGAMUNLOCKSTREAMINGRESPONSE DESCRIPTOR.message_types_by_name['CMsgAMUnlockHEVC'] = _CMSGAMUNLOCKHEVC DESCRIPTOR.message_types_by_name['CMsgAMUnlockHEVCResponse'] = _CMSGAMUNLOCKHEVCRESPONSE DESCRIPTOR.message_types_by_name['CMsgClientPlayingSessionState'] = _CMSGCLIENTPLAYINGSESSIONSTATE DESCRIPTOR.message_types_by_name['CMsgClientKickPlayingSession'] = _CMSGCLIENTKICKPLAYINGSESSION DESCRIPTOR.message_types_by_name['CMsgClientVoiceCallPreAuthorize'] = _CMSGCLIENTVOICECALLPREAUTHORIZE DESCRIPTOR.message_types_by_name['CMsgClientVoiceCallPreAuthorizeResponse'] = _CMSGCLIENTVOICECALLPREAUTHORIZERESPONSE DESCRIPTOR.message_types_by_name['CMsgBadgeCraftedNotification'] = _CMSGBADGECRAFTEDNOTIFICATION _sym_db.RegisterFileDescriptor(DESCRIPTOR) CMsgClientUCMAddScreenshot = _reflection.GeneratedProtocolMessageType('CMsgClientUCMAddScreenshot', (_message.Message,), dict( Tag = _reflection.GeneratedProtocolMessageType('Tag', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMADDSCREENSHOT_TAG, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMAddScreenshot.Tag) )) , DESCRIPTOR = _CMSGCLIENTUCMADDSCREENSHOT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMAddScreenshot) )) _sym_db.RegisterMessage(CMsgClientUCMAddScreenshot) _sym_db.RegisterMessage(CMsgClientUCMAddScreenshot.Tag) CMsgClientUCMAddScreenshotResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMAddScreenshotResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMADDSCREENSHOTRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMAddScreenshotResponse) )) _sym_db.RegisterMessage(CMsgClientUCMAddScreenshotResponse) CMsgClientUCMDeleteScreenshot = _reflection.GeneratedProtocolMessageType('CMsgClientUCMDeleteScreenshot', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMDELETESCREENSHOT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMDeleteScreenshot) )) _sym_db.RegisterMessage(CMsgClientUCMDeleteScreenshot) CMsgClientUCMDeleteScreenshotResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMDeleteScreenshotResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMDELETESCREENSHOTRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMDeleteScreenshotResponse) )) _sym_db.RegisterMessage(CMsgClientUCMDeleteScreenshotResponse) CMsgClientUCMPublishFile = _reflection.GeneratedProtocolMessageType('CMsgClientUCMPublishFile', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMPUBLISHFILE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMPublishFile) )) _sym_db.RegisterMessage(CMsgClientUCMPublishFile) CMsgClientUCMPublishFileResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMPublishFileResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMPUBLISHFILERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMPublishFileResponse) )) _sym_db.RegisterMessage(CMsgClientUCMPublishFileResponse) CMsgClientUCMUpdatePublishedFile = _reflection.GeneratedProtocolMessageType('CMsgClientUCMUpdatePublishedFile', (_message.Message,), dict( KeyValueTag = _reflection.GeneratedProtocolMessageType('KeyValueTag', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_KEYVALUETAG, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMUpdatePublishedFile.KeyValueTag) )) , AdditionalPreview = _reflection.GeneratedProtocolMessageType('AdditionalPreview', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE_ADDITIONALPREVIEW, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMUpdatePublishedFile.AdditionalPreview) )) , DESCRIPTOR = _CMSGCLIENTUCMUPDATEPUBLISHEDFILE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMUpdatePublishedFile) )) _sym_db.RegisterMessage(CMsgClientUCMUpdatePublishedFile) _sym_db.RegisterMessage(CMsgClientUCMUpdatePublishedFile.KeyValueTag) _sym_db.RegisterMessage(CMsgClientUCMUpdatePublishedFile.AdditionalPreview) CMsgClientUCMUpdatePublishedFileResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMUpdatePublishedFileResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMUPDATEPUBLISHEDFILERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMUpdatePublishedFileResponse) )) _sym_db.RegisterMessage(CMsgClientUCMUpdatePublishedFileResponse) CMsgClientUCMDeletePublishedFile = _reflection.GeneratedProtocolMessageType('CMsgClientUCMDeletePublishedFile', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMDELETEPUBLISHEDFILE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMDeletePublishedFile) )) _sym_db.RegisterMessage(CMsgClientUCMDeletePublishedFile) CMsgClientUCMDeletePublishedFileResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMDeletePublishedFileResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMDELETEPUBLISHEDFILERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMDeletePublishedFileResponse) )) _sym_db.RegisterMessage(CMsgClientUCMDeletePublishedFileResponse) CMsgClientUCMEnumerateUserPublishedFiles = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumerateUserPublishedFiles', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILES, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserPublishedFiles) )) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserPublishedFiles) CMsgClientUCMEnumerateUserPublishedFilesResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumerateUserPublishedFilesResponse', (_message.Message,), dict( PublishedFileId = _reflection.GeneratedProtocolMessageType('PublishedFileId', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE_PUBLISHEDFILEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserPublishedFilesResponse.PublishedFileId) )) , DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERPUBLISHEDFILESRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserPublishedFilesResponse) )) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserPublishedFilesResponse) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserPublishedFilesResponse.PublishedFileId) CMsgClientUCMEnumerateUserSubscribedFiles = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumerateUserSubscribedFiles', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILES, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserSubscribedFiles) )) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserSubscribedFiles) CMsgClientUCMEnumerateUserSubscribedFilesResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumerateUserSubscribedFilesResponse', (_message.Message,), dict( PublishedFileId = _reflection.GeneratedProtocolMessageType('PublishedFileId', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE_PUBLISHEDFILEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserSubscribedFilesResponse.PublishedFileId) )) , DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserSubscribedFilesResponse) )) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserSubscribedFilesResponse) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserSubscribedFilesResponse.PublishedFileId) CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATES, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates) )) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserSubscribedFilesWithUpdates) CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse', (_message.Message,), dict( PublishedFileId = _reflection.GeneratedProtocolMessageType('PublishedFileId', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE_PUBLISHEDFILEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId) )) , DESCRIPTOR = _CMSGCLIENTUCMENUMERATEUSERSUBSCRIBEDFILESWITHUPDATESRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse) )) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse) _sym_db.RegisterMessage(CMsgClientUCMEnumerateUserSubscribedFilesWithUpdatesResponse.PublishedFileId) CMsgClientUCMPublishedFileUpdated = _reflection.GeneratedProtocolMessageType('CMsgClientUCMPublishedFileUpdated', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMPUBLISHEDFILEUPDATED, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMPublishedFileUpdated) )) _sym_db.RegisterMessage(CMsgClientUCMPublishedFileUpdated) CMsgClientWorkshopItemChangesRequest = _reflection.GeneratedProtocolMessageType('CMsgClientWorkshopItemChangesRequest', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTWORKSHOPITEMCHANGESREQUEST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientWorkshopItemChangesRequest) )) _sym_db.RegisterMessage(CMsgClientWorkshopItemChangesRequest) CMsgClientWorkshopItemChangesResponse = _reflection.GeneratedProtocolMessageType('CMsgClientWorkshopItemChangesResponse', (_message.Message,), dict( WorkshopItemInfo = _reflection.GeneratedProtocolMessageType('WorkshopItemInfo', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE_WORKSHOPITEMINFO, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo) )) , DESCRIPTOR = _CMSGCLIENTWORKSHOPITEMCHANGESRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientWorkshopItemChangesResponse) )) _sym_db.RegisterMessage(CMsgClientWorkshopItemChangesResponse) _sym_db.RegisterMessage(CMsgClientWorkshopItemChangesResponse.WorkshopItemInfo) CMsgClientWorkshopItemInfoRequest = _reflection.GeneratedProtocolMessageType('CMsgClientWorkshopItemInfoRequest', (_message.Message,), dict( WorkshopItem = _reflection.GeneratedProtocolMessageType('WorkshopItem', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTWORKSHOPITEMINFOREQUEST_WORKSHOPITEM, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientWorkshopItemInfoRequest.WorkshopItem) )) , DESCRIPTOR = _CMSGCLIENTWORKSHOPITEMINFOREQUEST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientWorkshopItemInfoRequest) )) _sym_db.RegisterMessage(CMsgClientWorkshopItemInfoRequest) _sym_db.RegisterMessage(CMsgClientWorkshopItemInfoRequest.WorkshopItem) CMsgClientWorkshopItemInfoResponse = _reflection.GeneratedProtocolMessageType('CMsgClientWorkshopItemInfoResponse', (_message.Message,), dict( WorkshopItemInfo = _reflection.GeneratedProtocolMessageType('WorkshopItemInfo', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTWORKSHOPITEMINFORESPONSE_WORKSHOPITEMINFO, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo) )) , DESCRIPTOR = _CMSGCLIENTWORKSHOPITEMINFORESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientWorkshopItemInfoResponse) )) _sym_db.RegisterMessage(CMsgClientWorkshopItemInfoResponse) _sym_db.RegisterMessage(CMsgClientWorkshopItemInfoResponse.WorkshopItemInfo) CMsgClientUCMGetPublishedFilesForUser = _reflection.GeneratedProtocolMessageType('CMsgClientUCMGetPublishedFilesForUser', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSER, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMGetPublishedFilesForUser) )) _sym_db.RegisterMessage(CMsgClientUCMGetPublishedFilesForUser) CMsgClientUCMGetPublishedFilesForUserResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMGetPublishedFilesForUserResponse', (_message.Message,), dict( PublishedFileId = _reflection.GeneratedProtocolMessageType('PublishedFileId', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE_PUBLISHEDFILEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMGetPublishedFilesForUserResponse.PublishedFileId) )) , DESCRIPTOR = _CMSGCLIENTUCMGETPUBLISHEDFILESFORUSERRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMGetPublishedFilesForUserResponse) )) _sym_db.RegisterMessage(CMsgClientUCMGetPublishedFilesForUserResponse) _sym_db.RegisterMessage(CMsgClientUCMGetPublishedFilesForUserResponse.PublishedFileId) CMsgClientUCMSetUserPublishedFileAction = _reflection.GeneratedProtocolMessageType('CMsgClientUCMSetUserPublishedFileAction', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMSETUSERPUBLISHEDFILEACTION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMSetUserPublishedFileAction) )) _sym_db.RegisterMessage(CMsgClientUCMSetUserPublishedFileAction) CMsgClientUCMSetUserPublishedFileActionResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMSetUserPublishedFileActionResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMSETUSERPUBLISHEDFILEACTIONRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMSetUserPublishedFileActionResponse) )) _sym_db.RegisterMessage(CMsgClientUCMSetUserPublishedFileActionResponse) CMsgClientUCMEnumeratePublishedFilesByUserAction = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumeratePublishedFilesByUserAction', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumeratePublishedFilesByUserAction) )) _sym_db.RegisterMessage(CMsgClientUCMEnumeratePublishedFilesByUserAction) CMsgClientUCMEnumeratePublishedFilesByUserActionResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUCMEnumeratePublishedFilesByUserActionResponse', (_message.Message,), dict( PublishedFileId = _reflection.GeneratedProtocolMessageType('PublishedFileId', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE_PUBLISHEDFILEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.PublishedFileId) )) , DESCRIPTOR = _CMSGCLIENTUCMENUMERATEPUBLISHEDFILESBYUSERACTIONRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUCMEnumeratePublishedFilesByUserActionResponse) )) _sym_db.RegisterMessage(CMsgClientUCMEnumeratePublishedFilesByUserActionResponse) _sym_db.RegisterMessage(CMsgClientUCMEnumeratePublishedFilesByUserActionResponse.PublishedFileId) CMsgClientScreenshotsChanged = _reflection.GeneratedProtocolMessageType('CMsgClientScreenshotsChanged', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSCREENSHOTSCHANGED, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientScreenshotsChanged) )) _sym_db.RegisterMessage(CMsgClientScreenshotsChanged) CMsgClientUpdateUserGameInfo = _reflection.GeneratedProtocolMessageType('CMsgClientUpdateUserGameInfo', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUPDATEUSERGAMEINFO, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUpdateUserGameInfo) )) _sym_db.RegisterMessage(CMsgClientUpdateUserGameInfo) CMsgClientRichPresenceUpload = _reflection.GeneratedProtocolMessageType('CMsgClientRichPresenceUpload', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTRICHPRESENCEUPLOAD, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRichPresenceUpload) )) _sym_db.RegisterMessage(CMsgClientRichPresenceUpload) CMsgClientRichPresenceRequest = _reflection.GeneratedProtocolMessageType('CMsgClientRichPresenceRequest', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTRICHPRESENCEREQUEST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRichPresenceRequest) )) _sym_db.RegisterMessage(CMsgClientRichPresenceRequest) CMsgClientRichPresenceInfo = _reflection.GeneratedProtocolMessageType('CMsgClientRichPresenceInfo', (_message.Message,), dict( RichPresence = _reflection.GeneratedProtocolMessageType('RichPresence', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTRICHPRESENCEINFO_RICHPRESENCE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRichPresenceInfo.RichPresence) )) , DESCRIPTOR = _CMSGCLIENTRICHPRESENCEINFO, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRichPresenceInfo) )) _sym_db.RegisterMessage(CMsgClientRichPresenceInfo) _sym_db.RegisterMessage(CMsgClientRichPresenceInfo.RichPresence) CMsgClientCheckFileSignature = _reflection.GeneratedProtocolMessageType('CMsgClientCheckFileSignature', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCHECKFILESIGNATURE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientCheckFileSignature) )) _sym_db.RegisterMessage(CMsgClientCheckFileSignature) CMsgClientCheckFileSignatureResponse = _reflection.GeneratedProtocolMessageType('CMsgClientCheckFileSignatureResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCHECKFILESIGNATURERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientCheckFileSignatureResponse) )) _sym_db.RegisterMessage(CMsgClientCheckFileSignatureResponse) CMsgClientReadMachineAuth = _reflection.GeneratedProtocolMessageType('CMsgClientReadMachineAuth', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREADMACHINEAUTH, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientReadMachineAuth) )) _sym_db.RegisterMessage(CMsgClientReadMachineAuth) CMsgClientReadMachineAuthResponse = _reflection.GeneratedProtocolMessageType('CMsgClientReadMachineAuthResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREADMACHINEAUTHRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientReadMachineAuthResponse) )) _sym_db.RegisterMessage(CMsgClientReadMachineAuthResponse) CMsgClientUpdateMachineAuth = _reflection.GeneratedProtocolMessageType('CMsgClientUpdateMachineAuth', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUPDATEMACHINEAUTH, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUpdateMachineAuth) )) _sym_db.RegisterMessage(CMsgClientUpdateMachineAuth) CMsgClientUpdateMachineAuthResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUpdateMachineAuthResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUPDATEMACHINEAUTHRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUpdateMachineAuthResponse) )) _sym_db.RegisterMessage(CMsgClientUpdateMachineAuthResponse) CMsgClientRequestMachineAuth = _reflection.GeneratedProtocolMessageType('CMsgClientRequestMachineAuth', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTMACHINEAUTH, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestMachineAuth) )) _sym_db.RegisterMessage(CMsgClientRequestMachineAuth) CMsgClientRequestMachineAuthResponse = _reflection.GeneratedProtocolMessageType('CMsgClientRequestMachineAuthResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTMACHINEAUTHRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestMachineAuthResponse) )) _sym_db.RegisterMessage(CMsgClientRequestMachineAuthResponse) CMsgClientRegisterKey = _reflection.GeneratedProtocolMessageType('CMsgClientRegisterKey', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREGISTERKEY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRegisterKey) )) _sym_db.RegisterMessage(CMsgClientRegisterKey) CMsgClientPurchaseResponse = _reflection.GeneratedProtocolMessageType('CMsgClientPurchaseResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTPURCHASERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientPurchaseResponse) )) _sym_db.RegisterMessage(CMsgClientPurchaseResponse) CMsgClientActivateOEMLicense = _reflection.GeneratedProtocolMessageType('CMsgClientActivateOEMLicense', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTACTIVATEOEMLICENSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientActivateOEMLicense) )) _sym_db.RegisterMessage(CMsgClientActivateOEMLicense) CMsgClientRegisterOEMMachine = _reflection.GeneratedProtocolMessageType('CMsgClientRegisterOEMMachine', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREGISTEROEMMACHINE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRegisterOEMMachine) )) _sym_db.RegisterMessage(CMsgClientRegisterOEMMachine) CMsgClientRegisterOEMMachineResponse = _reflection.GeneratedProtocolMessageType('CMsgClientRegisterOEMMachineResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREGISTEROEMMACHINERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRegisterOEMMachineResponse) )) _sym_db.RegisterMessage(CMsgClientRegisterOEMMachineResponse) CMsgClientPurchaseWithMachineID = _reflection.GeneratedProtocolMessageType('CMsgClientPurchaseWithMachineID', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTPURCHASEWITHMACHINEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientPurchaseWithMachineID) )) _sym_db.RegisterMessage(CMsgClientPurchaseWithMachineID) CMsgTrading_InitiateTradeRequest = _reflection.GeneratedProtocolMessageType('CMsgTrading_InitiateTradeRequest', (_message.Message,), dict( DESCRIPTOR = _CMSGTRADING_INITIATETRADEREQUEST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgTrading_InitiateTradeRequest) )) _sym_db.RegisterMessage(CMsgTrading_InitiateTradeRequest) CMsgTrading_InitiateTradeResponse = _reflection.GeneratedProtocolMessageType('CMsgTrading_InitiateTradeResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGTRADING_INITIATETRADERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgTrading_InitiateTradeResponse) )) _sym_db.RegisterMessage(CMsgTrading_InitiateTradeResponse) CMsgTrading_CancelTradeRequest = _reflection.GeneratedProtocolMessageType('CMsgTrading_CancelTradeRequest', (_message.Message,), dict( DESCRIPTOR = _CMSGTRADING_CANCELTRADEREQUEST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgTrading_CancelTradeRequest) )) _sym_db.RegisterMessage(CMsgTrading_CancelTradeRequest) CMsgTrading_StartSession = _reflection.GeneratedProtocolMessageType('CMsgTrading_StartSession', (_message.Message,), dict( DESCRIPTOR = _CMSGTRADING_STARTSESSION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgTrading_StartSession) )) _sym_db.RegisterMessage(CMsgTrading_StartSession) CMsgClientGetCDNAuthToken = _reflection.GeneratedProtocolMessageType('CMsgClientGetCDNAuthToken', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETCDNAUTHTOKEN, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetCDNAuthToken) )) _sym_db.RegisterMessage(CMsgClientGetCDNAuthToken) CMsgClientGetDepotDecryptionKey = _reflection.GeneratedProtocolMessageType('CMsgClientGetDepotDecryptionKey', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETDEPOTDECRYPTIONKEY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetDepotDecryptionKey) )) _sym_db.RegisterMessage(CMsgClientGetDepotDecryptionKey) CMsgClientGetDepotDecryptionKeyResponse = _reflection.GeneratedProtocolMessageType('CMsgClientGetDepotDecryptionKeyResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETDEPOTDECRYPTIONKEYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetDepotDecryptionKeyResponse) )) _sym_db.RegisterMessage(CMsgClientGetDepotDecryptionKeyResponse) CMsgClientCheckAppBetaPassword = _reflection.GeneratedProtocolMessageType('CMsgClientCheckAppBetaPassword', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCHECKAPPBETAPASSWORD, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientCheckAppBetaPassword) )) _sym_db.RegisterMessage(CMsgClientCheckAppBetaPassword) CMsgClientCheckAppBetaPasswordResponse = _reflection.GeneratedProtocolMessageType('CMsgClientCheckAppBetaPasswordResponse', (_message.Message,), dict( BetaPassword = _reflection.GeneratedProtocolMessageType('BetaPassword', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE_BETAPASSWORD, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientCheckAppBetaPasswordResponse.BetaPassword) )) , DESCRIPTOR = _CMSGCLIENTCHECKAPPBETAPASSWORDRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientCheckAppBetaPasswordResponse) )) _sym_db.RegisterMessage(CMsgClientCheckAppBetaPasswordResponse) _sym_db.RegisterMessage(CMsgClientCheckAppBetaPasswordResponse.BetaPassword) CMsgClientUpdateAppJobReport = _reflection.GeneratedProtocolMessageType('CMsgClientUpdateAppJobReport', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUPDATEAPPJOBREPORT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUpdateAppJobReport) )) _sym_db.RegisterMessage(CMsgClientUpdateAppJobReport) CMsgClientDPContentStatsReport = _reflection.GeneratedProtocolMessageType('CMsgClientDPContentStatsReport', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTDPCONTENTSTATSREPORT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientDPContentStatsReport) )) _sym_db.RegisterMessage(CMsgClientDPContentStatsReport) CMsgClientGetCDNAuthTokenResponse = _reflection.GeneratedProtocolMessageType('CMsgClientGetCDNAuthTokenResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETCDNAUTHTOKENRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetCDNAuthTokenResponse) )) _sym_db.RegisterMessage(CMsgClientGetCDNAuthTokenResponse) CMsgDownloadRateStatistics = _reflection.GeneratedProtocolMessageType('CMsgDownloadRateStatistics', (_message.Message,), dict( StatsInfo = _reflection.GeneratedProtocolMessageType('StatsInfo', (_message.Message,), dict( DESCRIPTOR = _CMSGDOWNLOADRATESTATISTICS_STATSINFO, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgDownloadRateStatistics.StatsInfo) )) , DESCRIPTOR = _CMSGDOWNLOADRATESTATISTICS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgDownloadRateStatistics) )) _sym_db.RegisterMessage(CMsgDownloadRateStatistics) _sym_db.RegisterMessage(CMsgDownloadRateStatistics.StatsInfo) CMsgClientRequestAccountData = _reflection.GeneratedProtocolMessageType('CMsgClientRequestAccountData', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTACCOUNTDATA, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestAccountData) )) _sym_db.RegisterMessage(CMsgClientRequestAccountData) CMsgClientRequestAccountDataResponse = _reflection.GeneratedProtocolMessageType('CMsgClientRequestAccountDataResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTACCOUNTDATARESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestAccountDataResponse) )) _sym_db.RegisterMessage(CMsgClientRequestAccountDataResponse) CMsgClientUGSGetGlobalStats = _reflection.GeneratedProtocolMessageType('CMsgClientUGSGetGlobalStats', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUGSGETGLOBALSTATS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUGSGetGlobalStats) )) _sym_db.RegisterMessage(CMsgClientUGSGetGlobalStats) CMsgClientUGSGetGlobalStatsResponse = _reflection.GeneratedProtocolMessageType('CMsgClientUGSGetGlobalStatsResponse', (_message.Message,), dict( Day = _reflection.GeneratedProtocolMessageType('Day', (_message.Message,), dict( Stat = _reflection.GeneratedProtocolMessageType('Stat', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY_STAT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUGSGetGlobalStatsResponse.Day.Stat) )) , DESCRIPTOR = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE_DAY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUGSGetGlobalStatsResponse.Day) )) , DESCRIPTOR = _CMSGCLIENTUGSGETGLOBALSTATSRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUGSGetGlobalStatsResponse) )) _sym_db.RegisterMessage(CMsgClientUGSGetGlobalStatsResponse) _sym_db.RegisterMessage(CMsgClientUGSGetGlobalStatsResponse.Day) _sym_db.RegisterMessage(CMsgClientUGSGetGlobalStatsResponse.Day.Stat) CMsgGameServerData = _reflection.GeneratedProtocolMessageType('CMsgGameServerData', (_message.Message,), dict( Player = _reflection.GeneratedProtocolMessageType('Player', (_message.Message,), dict( DESCRIPTOR = _CMSGGAMESERVERDATA_PLAYER, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGameServerData.Player) )) , DESCRIPTOR = _CMSGGAMESERVERDATA, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGameServerData) )) _sym_db.RegisterMessage(CMsgGameServerData) _sym_db.RegisterMessage(CMsgGameServerData.Player) CMsgGameServerRemove = _reflection.GeneratedProtocolMessageType('CMsgGameServerRemove', (_message.Message,), dict( DESCRIPTOR = _CMSGGAMESERVERREMOVE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGameServerRemove) )) _sym_db.RegisterMessage(CMsgGameServerRemove) CMsgClientGMSServerQuery = _reflection.GeneratedProtocolMessageType('CMsgClientGMSServerQuery', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGMSSERVERQUERY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGMSServerQuery) )) _sym_db.RegisterMessage(CMsgClientGMSServerQuery) CMsgGMSClientServerQueryResponse = _reflection.GeneratedProtocolMessageType('CMsgGMSClientServerQueryResponse', (_message.Message,), dict( Server = _reflection.GeneratedProtocolMessageType('Server', (_message.Message,), dict( DESCRIPTOR = _CMSGGMSCLIENTSERVERQUERYRESPONSE_SERVER, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGMSClientServerQueryResponse.Server) )) , DESCRIPTOR = _CMSGGMSCLIENTSERVERQUERYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGMSClientServerQueryResponse) )) _sym_db.RegisterMessage(CMsgGMSClientServerQueryResponse) _sym_db.RegisterMessage(CMsgGMSClientServerQueryResponse.Server) CMsgGameServerOutOfDate = _reflection.GeneratedProtocolMessageType('CMsgGameServerOutOfDate', (_message.Message,), dict( DESCRIPTOR = _CMSGGAMESERVEROUTOFDATE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGameServerOutOfDate) )) _sym_db.RegisterMessage(CMsgGameServerOutOfDate) CMsgClientRedeemGuestPass = _reflection.GeneratedProtocolMessageType('CMsgClientRedeemGuestPass', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREDEEMGUESTPASS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRedeemGuestPass) )) _sym_db.RegisterMessage(CMsgClientRedeemGuestPass) CMsgClientRedeemGuestPassResponse = _reflection.GeneratedProtocolMessageType('CMsgClientRedeemGuestPassResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREDEEMGUESTPASSRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRedeemGuestPassResponse) )) _sym_db.RegisterMessage(CMsgClientRedeemGuestPassResponse) CMsgClientGetClanActivityCounts = _reflection.GeneratedProtocolMessageType('CMsgClientGetClanActivityCounts', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETCLANACTIVITYCOUNTS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetClanActivityCounts) )) _sym_db.RegisterMessage(CMsgClientGetClanActivityCounts) CMsgClientGetClanActivityCountsResponse = _reflection.GeneratedProtocolMessageType('CMsgClientGetClanActivityCountsResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETCLANACTIVITYCOUNTSRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetClanActivityCountsResponse) )) _sym_db.RegisterMessage(CMsgClientGetClanActivityCountsResponse) CMsgClientOGSReportString = _reflection.GeneratedProtocolMessageType('CMsgClientOGSReportString', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTOGSREPORTSTRING, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientOGSReportString) )) _sym_db.RegisterMessage(CMsgClientOGSReportString) CMsgClientOGSReportBug = _reflection.GeneratedProtocolMessageType('CMsgClientOGSReportBug', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTOGSREPORTBUG, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientOGSReportBug) )) _sym_db.RegisterMessage(CMsgClientOGSReportBug) CMsgGSAssociateWithClan = _reflection.GeneratedProtocolMessageType('CMsgGSAssociateWithClan', (_message.Message,), dict( DESCRIPTOR = _CMSGGSASSOCIATEWITHCLAN, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGSAssociateWithClan) )) _sym_db.RegisterMessage(CMsgGSAssociateWithClan) CMsgGSAssociateWithClanResponse = _reflection.GeneratedProtocolMessageType('CMsgGSAssociateWithClanResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGGSASSOCIATEWITHCLANRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGSAssociateWithClanResponse) )) _sym_db.RegisterMessage(CMsgGSAssociateWithClanResponse) CMsgGSComputeNewPlayerCompatibility = _reflection.GeneratedProtocolMessageType('CMsgGSComputeNewPlayerCompatibility', (_message.Message,), dict( DESCRIPTOR = _CMSGGSCOMPUTENEWPLAYERCOMPATIBILITY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGSComputeNewPlayerCompatibility) )) _sym_db.RegisterMessage(CMsgGSComputeNewPlayerCompatibility) CMsgGSComputeNewPlayerCompatibilityResponse = _reflection.GeneratedProtocolMessageType('CMsgGSComputeNewPlayerCompatibilityResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGGSCOMPUTENEWPLAYERCOMPATIBILITYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGSComputeNewPlayerCompatibilityResponse) )) _sym_db.RegisterMessage(CMsgGSComputeNewPlayerCompatibilityResponse) CMsgClientSentLogs = _reflection.GeneratedProtocolMessageType('CMsgClientSentLogs', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSENTLOGS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientSentLogs) )) _sym_db.RegisterMessage(CMsgClientSentLogs) CMsgGCClient = _reflection.GeneratedProtocolMessageType('CMsgGCClient', (_message.Message,), dict( DESCRIPTOR = _CMSGGCCLIENT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGCClient) )) _sym_db.RegisterMessage(CMsgGCClient) CMsgClientRequestFreeLicense = _reflection.GeneratedProtocolMessageType('CMsgClientRequestFreeLicense', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTFREELICENSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestFreeLicense) )) _sym_db.RegisterMessage(CMsgClientRequestFreeLicense) CMsgClientRequestFreeLicenseResponse = _reflection.GeneratedProtocolMessageType('CMsgClientRequestFreeLicenseResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTFREELICENSERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestFreeLicenseResponse) )) _sym_db.RegisterMessage(CMsgClientRequestFreeLicenseResponse) CMsgDRMDownloadRequestWithCrashData = _reflection.GeneratedProtocolMessageType('CMsgDRMDownloadRequestWithCrashData', (_message.Message,), dict( DESCRIPTOR = _CMSGDRMDOWNLOADREQUESTWITHCRASHDATA, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgDRMDownloadRequestWithCrashData) )) _sym_db.RegisterMessage(CMsgDRMDownloadRequestWithCrashData) CMsgDRMDownloadResponse = _reflection.GeneratedProtocolMessageType('CMsgDRMDownloadResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGDRMDOWNLOADRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgDRMDownloadResponse) )) _sym_db.RegisterMessage(CMsgDRMDownloadResponse) CMsgDRMFinalResult = _reflection.GeneratedProtocolMessageType('CMsgDRMFinalResult', (_message.Message,), dict( DESCRIPTOR = _CMSGDRMFINALRESULT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgDRMFinalResult) )) _sym_db.RegisterMessage(CMsgDRMFinalResult) CMsgClientDPCheckSpecialSurvey = _reflection.GeneratedProtocolMessageType('CMsgClientDPCheckSpecialSurvey', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTDPCHECKSPECIALSURVEY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientDPCheckSpecialSurvey) )) _sym_db.RegisterMessage(CMsgClientDPCheckSpecialSurvey) CMsgClientDPCheckSpecialSurveyResponse = _reflection.GeneratedProtocolMessageType('CMsgClientDPCheckSpecialSurveyResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTDPCHECKSPECIALSURVEYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientDPCheckSpecialSurveyResponse) )) _sym_db.RegisterMessage(CMsgClientDPCheckSpecialSurveyResponse) CMsgClientDPSendSpecialSurveyResponse = _reflection.GeneratedProtocolMessageType('CMsgClientDPSendSpecialSurveyResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTDPSENDSPECIALSURVEYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientDPSendSpecialSurveyResponse) )) _sym_db.RegisterMessage(CMsgClientDPSendSpecialSurveyResponse) CMsgClientDPSendSpecialSurveyResponseReply = _reflection.GeneratedProtocolMessageType('CMsgClientDPSendSpecialSurveyResponseReply', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTDPSENDSPECIALSURVEYRESPONSEREPLY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientDPSendSpecialSurveyResponseReply) )) _sym_db.RegisterMessage(CMsgClientDPSendSpecialSurveyResponseReply) CMsgClientRequestForgottenPasswordEmail = _reflection.GeneratedProtocolMessageType('CMsgClientRequestForgottenPasswordEmail', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTFORGOTTENPASSWORDEMAIL, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestForgottenPasswordEmail) )) _sym_db.RegisterMessage(CMsgClientRequestForgottenPasswordEmail) CMsgClientRequestForgottenPasswordEmailResponse = _reflection.GeneratedProtocolMessageType('CMsgClientRequestForgottenPasswordEmailResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTFORGOTTENPASSWORDEMAILRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestForgottenPasswordEmailResponse) )) _sym_db.RegisterMessage(CMsgClientRequestForgottenPasswordEmailResponse) CMsgClientItemAnnouncements = _reflection.GeneratedProtocolMessageType('CMsgClientItemAnnouncements', (_message.Message,), dict( UnseenItem = _reflection.GeneratedProtocolMessageType('UnseenItem', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTITEMANNOUNCEMENTS_UNSEENITEM, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientItemAnnouncements.UnseenItem) )) , DESCRIPTOR = _CMSGCLIENTITEMANNOUNCEMENTS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientItemAnnouncements) )) _sym_db.RegisterMessage(CMsgClientItemAnnouncements) _sym_db.RegisterMessage(CMsgClientItemAnnouncements.UnseenItem) CMsgClientRequestItemAnnouncements = _reflection.GeneratedProtocolMessageType('CMsgClientRequestItemAnnouncements', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTITEMANNOUNCEMENTS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestItemAnnouncements) )) _sym_db.RegisterMessage(CMsgClientRequestItemAnnouncements) CMsgClientUserNotifications = _reflection.GeneratedProtocolMessageType('CMsgClientUserNotifications', (_message.Message,), dict( Notification = _reflection.GeneratedProtocolMessageType('Notification', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUSERNOTIFICATIONS_NOTIFICATION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUserNotifications.Notification) )) , DESCRIPTOR = _CMSGCLIENTUSERNOTIFICATIONS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUserNotifications) )) _sym_db.RegisterMessage(CMsgClientUserNotifications) _sym_db.RegisterMessage(CMsgClientUserNotifications.Notification) CMsgClientCommentNotifications = _reflection.GeneratedProtocolMessageType('CMsgClientCommentNotifications', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCOMMENTNOTIFICATIONS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientCommentNotifications) )) _sym_db.RegisterMessage(CMsgClientCommentNotifications) CMsgClientRequestCommentNotifications = _reflection.GeneratedProtocolMessageType('CMsgClientRequestCommentNotifications', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTCOMMENTNOTIFICATIONS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestCommentNotifications) )) _sym_db.RegisterMessage(CMsgClientRequestCommentNotifications) CMsgClientOfflineMessageNotification = _reflection.GeneratedProtocolMessageType('CMsgClientOfflineMessageNotification', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTOFFLINEMESSAGENOTIFICATION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientOfflineMessageNotification) )) _sym_db.RegisterMessage(CMsgClientOfflineMessageNotification) CMsgClientRequestOfflineMessageCount = _reflection.GeneratedProtocolMessageType('CMsgClientRequestOfflineMessageCount', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTREQUESTOFFLINEMESSAGECOUNT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientRequestOfflineMessageCount) )) _sym_db.RegisterMessage(CMsgClientRequestOfflineMessageCount) CMsgClientChatGetFriendMessageHistory = _reflection.GeneratedProtocolMessageType('CMsgClientChatGetFriendMessageHistory', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientChatGetFriendMessageHistory) )) _sym_db.RegisterMessage(CMsgClientChatGetFriendMessageHistory) CMsgClientChatGetFriendMessageHistoryResponse = _reflection.GeneratedProtocolMessageType('CMsgClientChatGetFriendMessageHistoryResponse', (_message.Message,), dict( FriendMessage = _reflection.GeneratedProtocolMessageType('FriendMessage', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE_FRIENDMESSAGE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage) )) , DESCRIPTOR = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientChatGetFriendMessageHistoryResponse) )) _sym_db.RegisterMessage(CMsgClientChatGetFriendMessageHistoryResponse) _sym_db.RegisterMessage(CMsgClientChatGetFriendMessageHistoryResponse.FriendMessage) CMsgClientChatGetFriendMessageHistoryForOfflineMessages = _reflection.GeneratedProtocolMessageType('CMsgClientChatGetFriendMessageHistoryForOfflineMessages', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTCHATGETFRIENDMESSAGEHISTORYFOROFFLINEMESSAGES, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientChatGetFriendMessageHistoryForOfflineMessages) )) _sym_db.RegisterMessage(CMsgClientChatGetFriendMessageHistoryForOfflineMessages) CMsgClientFSGetFriendsSteamLevels = _reflection.GeneratedProtocolMessageType('CMsgClientFSGetFriendsSteamLevels', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTFSGETFRIENDSSTEAMLEVELS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientFSGetFriendsSteamLevels) )) _sym_db.RegisterMessage(CMsgClientFSGetFriendsSteamLevels) CMsgClientFSGetFriendsSteamLevelsResponse = _reflection.GeneratedProtocolMessageType('CMsgClientFSGetFriendsSteamLevelsResponse', (_message.Message,), dict( Friend = _reflection.GeneratedProtocolMessageType('Friend', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE_FRIEND, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientFSGetFriendsSteamLevelsResponse.Friend) )) , DESCRIPTOR = _CMSGCLIENTFSGETFRIENDSSTEAMLEVELSRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientFSGetFriendsSteamLevelsResponse) )) _sym_db.RegisterMessage(CMsgClientFSGetFriendsSteamLevelsResponse) _sym_db.RegisterMessage(CMsgClientFSGetFriendsSteamLevelsResponse.Friend) CMsgClientEmailAddrInfo = _reflection.GeneratedProtocolMessageType('CMsgClientEmailAddrInfo', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTEMAILADDRINFO, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientEmailAddrInfo) )) _sym_db.RegisterMessage(CMsgClientEmailAddrInfo) CMsgCREItemVoteSummary = _reflection.GeneratedProtocolMessageType('CMsgCREItemVoteSummary', (_message.Message,), dict( PublishedFileId = _reflection.GeneratedProtocolMessageType('PublishedFileId', (_message.Message,), dict( DESCRIPTOR = _CMSGCREITEMVOTESUMMARY_PUBLISHEDFILEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREItemVoteSummary.PublishedFileId) )) , DESCRIPTOR = _CMSGCREITEMVOTESUMMARY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREItemVoteSummary) )) _sym_db.RegisterMessage(CMsgCREItemVoteSummary) _sym_db.RegisterMessage(CMsgCREItemVoteSummary.PublishedFileId) CMsgCREItemVoteSummaryResponse = _reflection.GeneratedProtocolMessageType('CMsgCREItemVoteSummaryResponse', (_message.Message,), dict( ItemVoteSummary = _reflection.GeneratedProtocolMessageType('ItemVoteSummary', (_message.Message,), dict( DESCRIPTOR = _CMSGCREITEMVOTESUMMARYRESPONSE_ITEMVOTESUMMARY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREItemVoteSummaryResponse.ItemVoteSummary) )) , DESCRIPTOR = _CMSGCREITEMVOTESUMMARYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREItemVoteSummaryResponse) )) _sym_db.RegisterMessage(CMsgCREItemVoteSummaryResponse) _sym_db.RegisterMessage(CMsgCREItemVoteSummaryResponse.ItemVoteSummary) CMsgCREUpdateUserPublishedItemVote = _reflection.GeneratedProtocolMessageType('CMsgCREUpdateUserPublishedItemVote', (_message.Message,), dict( DESCRIPTOR = _CMSGCREUPDATEUSERPUBLISHEDITEMVOTE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREUpdateUserPublishedItemVote) )) _sym_db.RegisterMessage(CMsgCREUpdateUserPublishedItemVote) CMsgCREUpdateUserPublishedItemVoteResponse = _reflection.GeneratedProtocolMessageType('CMsgCREUpdateUserPublishedItemVoteResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCREUPDATEUSERPUBLISHEDITEMVOTERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREUpdateUserPublishedItemVoteResponse) )) _sym_db.RegisterMessage(CMsgCREUpdateUserPublishedItemVoteResponse) CMsgCREGetUserPublishedItemVoteDetails = _reflection.GeneratedProtocolMessageType('CMsgCREGetUserPublishedItemVoteDetails', (_message.Message,), dict( PublishedFileId = _reflection.GeneratedProtocolMessageType('PublishedFileId', (_message.Message,), dict( DESCRIPTOR = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS_PUBLISHEDFILEID, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREGetUserPublishedItemVoteDetails.PublishedFileId) )) , DESCRIPTOR = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREGetUserPublishedItemVoteDetails) )) _sym_db.RegisterMessage(CMsgCREGetUserPublishedItemVoteDetails) _sym_db.RegisterMessage(CMsgCREGetUserPublishedItemVoteDetails.PublishedFileId) CMsgCREGetUserPublishedItemVoteDetailsResponse = _reflection.GeneratedProtocolMessageType('CMsgCREGetUserPublishedItemVoteDetailsResponse', (_message.Message,), dict( UserItemVoteDetail = _reflection.GeneratedProtocolMessageType('UserItemVoteDetail', (_message.Message,), dict( DESCRIPTOR = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE_USERITEMVOTEDETAIL, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREGetUserPublishedItemVoteDetailsResponse.UserItemVoteDetail) )) , DESCRIPTOR = _CMSGCREGETUSERPUBLISHEDITEMVOTEDETAILSRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgCREGetUserPublishedItemVoteDetailsResponse) )) _sym_db.RegisterMessage(CMsgCREGetUserPublishedItemVoteDetailsResponse) _sym_db.RegisterMessage(CMsgCREGetUserPublishedItemVoteDetailsResponse.UserItemVoteDetail) CMsgGameServerPingSample = _reflection.GeneratedProtocolMessageType('CMsgGameServerPingSample', (_message.Message,), dict( Sample = _reflection.GeneratedProtocolMessageType('Sample', (_message.Message,), dict( DESCRIPTOR = _CMSGGAMESERVERPINGSAMPLE_SAMPLE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGameServerPingSample.Sample) )) , DESCRIPTOR = _CMSGGAMESERVERPINGSAMPLE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgGameServerPingSample) )) _sym_db.RegisterMessage(CMsgGameServerPingSample) _sym_db.RegisterMessage(CMsgGameServerPingSample.Sample) CMsgFSGetFollowerCount = _reflection.GeneratedProtocolMessageType('CMsgFSGetFollowerCount', (_message.Message,), dict( DESCRIPTOR = _CMSGFSGETFOLLOWERCOUNT, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgFSGetFollowerCount) )) _sym_db.RegisterMessage(CMsgFSGetFollowerCount) CMsgFSGetFollowerCountResponse = _reflection.GeneratedProtocolMessageType('CMsgFSGetFollowerCountResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGFSGETFOLLOWERCOUNTRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgFSGetFollowerCountResponse) )) _sym_db.RegisterMessage(CMsgFSGetFollowerCountResponse) CMsgFSGetIsFollowing = _reflection.GeneratedProtocolMessageType('CMsgFSGetIsFollowing', (_message.Message,), dict( DESCRIPTOR = _CMSGFSGETISFOLLOWING, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgFSGetIsFollowing) )) _sym_db.RegisterMessage(CMsgFSGetIsFollowing) CMsgFSGetIsFollowingResponse = _reflection.GeneratedProtocolMessageType('CMsgFSGetIsFollowingResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGFSGETISFOLLOWINGRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgFSGetIsFollowingResponse) )) _sym_db.RegisterMessage(CMsgFSGetIsFollowingResponse) CMsgFSEnumerateFollowingList = _reflection.GeneratedProtocolMessageType('CMsgFSEnumerateFollowingList', (_message.Message,), dict( DESCRIPTOR = _CMSGFSENUMERATEFOLLOWINGLIST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgFSEnumerateFollowingList) )) _sym_db.RegisterMessage(CMsgFSEnumerateFollowingList) CMsgFSEnumerateFollowingListResponse = _reflection.GeneratedProtocolMessageType('CMsgFSEnumerateFollowingListResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGFSENUMERATEFOLLOWINGLISTRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgFSEnumerateFollowingListResponse) )) _sym_db.RegisterMessage(CMsgFSEnumerateFollowingListResponse) CMsgDPGetNumberOfCurrentPlayers = _reflection.GeneratedProtocolMessageType('CMsgDPGetNumberOfCurrentPlayers', (_message.Message,), dict( DESCRIPTOR = _CMSGDPGETNUMBEROFCURRENTPLAYERS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgDPGetNumberOfCurrentPlayers) )) _sym_db.RegisterMessage(CMsgDPGetNumberOfCurrentPlayers) CMsgDPGetNumberOfCurrentPlayersResponse = _reflection.GeneratedProtocolMessageType('CMsgDPGetNumberOfCurrentPlayersResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGDPGETNUMBEROFCURRENTPLAYERSRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgDPGetNumberOfCurrentPlayersResponse) )) _sym_db.RegisterMessage(CMsgDPGetNumberOfCurrentPlayersResponse) CMsgClientFriendUserStatusPublished = _reflection.GeneratedProtocolMessageType('CMsgClientFriendUserStatusPublished', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTFRIENDUSERSTATUSPUBLISHED, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientFriendUserStatusPublished) )) _sym_db.RegisterMessage(CMsgClientFriendUserStatusPublished) CMsgClientServiceMethodLegacy = _reflection.GeneratedProtocolMessageType('CMsgClientServiceMethodLegacy', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSERVICEMETHODLEGACY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientServiceMethodLegacy) )) _sym_db.RegisterMessage(CMsgClientServiceMethodLegacy) CMsgClientServiceMethodLegacyResponse = _reflection.GeneratedProtocolMessageType('CMsgClientServiceMethodLegacyResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSERVICEMETHODLEGACYRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientServiceMethodLegacyResponse) )) _sym_db.RegisterMessage(CMsgClientServiceMethodLegacyResponse) CMsgClientUIMode = _reflection.GeneratedProtocolMessageType('CMsgClientUIMode', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUIMODE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUIMode) )) _sym_db.RegisterMessage(CMsgClientUIMode) CMsgClientVanityURLChangedNotification = _reflection.GeneratedProtocolMessageType('CMsgClientVanityURLChangedNotification', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTVANITYURLCHANGEDNOTIFICATION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientVanityURLChangedNotification) )) _sym_db.RegisterMessage(CMsgClientVanityURLChangedNotification) CMsgClientAuthorizeLocalDeviceRequest = _reflection.GeneratedProtocolMessageType('CMsgClientAuthorizeLocalDeviceRequest', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTAUTHORIZELOCALDEVICEREQUEST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientAuthorizeLocalDeviceRequest) )) _sym_db.RegisterMessage(CMsgClientAuthorizeLocalDeviceRequest) CMsgClientAuthorizeLocalDevice = _reflection.GeneratedProtocolMessageType('CMsgClientAuthorizeLocalDevice', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTAUTHORIZELOCALDEVICE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientAuthorizeLocalDevice) )) _sym_db.RegisterMessage(CMsgClientAuthorizeLocalDevice) CMsgClientAuthorizeLocalDeviceNotification = _reflection.GeneratedProtocolMessageType('CMsgClientAuthorizeLocalDeviceNotification', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTAUTHORIZELOCALDEVICENOTIFICATION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientAuthorizeLocalDeviceNotification) )) _sym_db.RegisterMessage(CMsgClientAuthorizeLocalDeviceNotification) CMsgClientDeauthorizeDeviceRequest = _reflection.GeneratedProtocolMessageType('CMsgClientDeauthorizeDeviceRequest', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTDEAUTHORIZEDEVICEREQUEST, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientDeauthorizeDeviceRequest) )) _sym_db.RegisterMessage(CMsgClientDeauthorizeDeviceRequest) CMsgClientDeauthorizeDevice = _reflection.GeneratedProtocolMessageType('CMsgClientDeauthorizeDevice', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTDEAUTHORIZEDEVICE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientDeauthorizeDevice) )) _sym_db.RegisterMessage(CMsgClientDeauthorizeDevice) CMsgClientUseLocalDeviceAuthorizations = _reflection.GeneratedProtocolMessageType('CMsgClientUseLocalDeviceAuthorizations', (_message.Message,), dict( DeviceToken = _reflection.GeneratedProtocolMessageType('DeviceToken', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS_DEVICETOKEN, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUseLocalDeviceAuthorizations.DeviceToken) )) , DESCRIPTOR = _CMSGCLIENTUSELOCALDEVICEAUTHORIZATIONS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientUseLocalDeviceAuthorizations) )) _sym_db.RegisterMessage(CMsgClientUseLocalDeviceAuthorizations) _sym_db.RegisterMessage(CMsgClientUseLocalDeviceAuthorizations.DeviceToken) CMsgClientGetAuthorizedDevices = _reflection.GeneratedProtocolMessageType('CMsgClientGetAuthorizedDevices', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETAUTHORIZEDDEVICES, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetAuthorizedDevices) )) _sym_db.RegisterMessage(CMsgClientGetAuthorizedDevices) CMsgClientGetAuthorizedDevicesResponse = _reflection.GeneratedProtocolMessageType('CMsgClientGetAuthorizedDevicesResponse', (_message.Message,), dict( AuthorizedDevice = _reflection.GeneratedProtocolMessageType('AuthorizedDevice', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE_AUTHORIZEDDEVICE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice) )) , DESCRIPTOR = _CMSGCLIENTGETAUTHORIZEDDEVICESRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientGetAuthorizedDevicesResponse) )) _sym_db.RegisterMessage(CMsgClientGetAuthorizedDevicesResponse) _sym_db.RegisterMessage(CMsgClientGetAuthorizedDevicesResponse.AuthorizedDevice) CMsgClientSharedLibraryLockStatus = _reflection.GeneratedProtocolMessageType('CMsgClientSharedLibraryLockStatus', (_message.Message,), dict( LockedLibrary = _reflection.GeneratedProtocolMessageType('LockedLibrary', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS_LOCKEDLIBRARY, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientSharedLibraryLockStatus.LockedLibrary) )) , DESCRIPTOR = _CMSGCLIENTSHAREDLIBRARYLOCKSTATUS, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientSharedLibraryLockStatus) )) _sym_db.RegisterMessage(CMsgClientSharedLibraryLockStatus) _sym_db.RegisterMessage(CMsgClientSharedLibraryLockStatus.LockedLibrary) CMsgClientSharedLibraryStopPlaying = _reflection.GeneratedProtocolMessageType('CMsgClientSharedLibraryStopPlaying', (_message.Message,), dict( StopApp = _reflection.GeneratedProtocolMessageType('StopApp', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING_STOPAPP, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientSharedLibraryStopPlaying.StopApp) )) , DESCRIPTOR = _CMSGCLIENTSHAREDLIBRARYSTOPPLAYING, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientSharedLibraryStopPlaying) )) _sym_db.RegisterMessage(CMsgClientSharedLibraryStopPlaying) _sym_db.RegisterMessage(CMsgClientSharedLibraryStopPlaying.StopApp) CMsgClientServiceCall = _reflection.GeneratedProtocolMessageType('CMsgClientServiceCall', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSERVICECALL, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientServiceCall) )) _sym_db.RegisterMessage(CMsgClientServiceCall) CMsgClientServiceModule = _reflection.GeneratedProtocolMessageType('CMsgClientServiceModule', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSERVICEMODULE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientServiceModule) )) _sym_db.RegisterMessage(CMsgClientServiceModule) CMsgClientServiceCallResponse = _reflection.GeneratedProtocolMessageType('CMsgClientServiceCallResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTSERVICECALLRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientServiceCallResponse) )) _sym_db.RegisterMessage(CMsgClientServiceCallResponse) CMsgAMUnlockStreaming = _reflection.GeneratedProtocolMessageType('CMsgAMUnlockStreaming', (_message.Message,), dict( DESCRIPTOR = _CMSGAMUNLOCKSTREAMING, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgAMUnlockStreaming) )) _sym_db.RegisterMessage(CMsgAMUnlockStreaming) CMsgAMUnlockStreamingResponse = _reflection.GeneratedProtocolMessageType('CMsgAMUnlockStreamingResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGAMUNLOCKSTREAMINGRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgAMUnlockStreamingResponse) )) _sym_db.RegisterMessage(CMsgAMUnlockStreamingResponse) CMsgAMUnlockHEVC = _reflection.GeneratedProtocolMessageType('CMsgAMUnlockHEVC', (_message.Message,), dict( DESCRIPTOR = _CMSGAMUNLOCKHEVC, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgAMUnlockHEVC) )) _sym_db.RegisterMessage(CMsgAMUnlockHEVC) CMsgAMUnlockHEVCResponse = _reflection.GeneratedProtocolMessageType('CMsgAMUnlockHEVCResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGAMUNLOCKHEVCRESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgAMUnlockHEVCResponse) )) _sym_db.RegisterMessage(CMsgAMUnlockHEVCResponse) CMsgClientPlayingSessionState = _reflection.GeneratedProtocolMessageType('CMsgClientPlayingSessionState', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTPLAYINGSESSIONSTATE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientPlayingSessionState) )) _sym_db.RegisterMessage(CMsgClientPlayingSessionState) CMsgClientKickPlayingSession = _reflection.GeneratedProtocolMessageType('CMsgClientKickPlayingSession', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTKICKPLAYINGSESSION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientKickPlayingSession) )) _sym_db.RegisterMessage(CMsgClientKickPlayingSession) CMsgClientVoiceCallPreAuthorize = _reflection.GeneratedProtocolMessageType('CMsgClientVoiceCallPreAuthorize', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTVOICECALLPREAUTHORIZE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientVoiceCallPreAuthorize) )) _sym_db.RegisterMessage(CMsgClientVoiceCallPreAuthorize) CMsgClientVoiceCallPreAuthorizeResponse = _reflection.GeneratedProtocolMessageType('CMsgClientVoiceCallPreAuthorizeResponse', (_message.Message,), dict( DESCRIPTOR = _CMSGCLIENTVOICECALLPREAUTHORIZERESPONSE, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgClientVoiceCallPreAuthorizeResponse) )) _sym_db.RegisterMessage(CMsgClientVoiceCallPreAuthorizeResponse) CMsgBadgeCraftedNotification = _reflection.GeneratedProtocolMessageType('CMsgBadgeCraftedNotification', (_message.Message,), dict( DESCRIPTOR = _CMSGBADGECRAFTEDNOTIFICATION, __module__ = 'steammessages_clientserver_2_pb2' # @@protoc_insertion_point(class_scope:CMsgBadgeCraftedNotification) )) _sym_db.RegisterMessage(CMsgBadgeCraftedNotification) DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope)
py
7dfa612caa6b0dff3902365e5ef588d999b9fa5c
from typing import Optional, TYPE_CHECKING from pantomime import normalize_mimetype, parse_mimetype from pantomime import DEFAULT from followthemoney.types.common import PropertyType from followthemoney.rdf import URIRef, Identifier from followthemoney.util import defer as _ if TYPE_CHECKING: from followthemoney.proxy import EntityProxy class MimeType(PropertyType): """A MIME media type are a specification of a content type on a network. Each MIME type is assinged by IANA and consists of two parts: the type and sub-type. Common examples are: ``text/plain``, ``application/json`` and ``application/pdf``. MIME type properties do not contain parameters as used in HTTP headers, like ``charset=UTF-8``.""" name = "mimetype" group = "mimetypes" label = _("MIME-Type") plural = _("MIME-Types") matchable = False def clean_text( self, text: str, fuzzy: bool = False, format: Optional[str] = None, proxy: Optional["EntityProxy"] = None, ) -> Optional[str]: text = normalize_mimetype(text) if text != DEFAULT: return text return None def rdf(self, value: str) -> Identifier: return URIRef(f"urn:mimetype:{value}") def caption(self, value: str) -> str: return parse_mimetype(value).label or value
py
7dfa6141d5d736fdcc63cbe0c424ec16f73d1e6f
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains the computed version number. # This file is released into the public domain. Generated by # versioneer-0.19 (https://github.com/python-versioneer/python-versioneer) """Git implementation of _version.py.""" import errno import os import re import subprocess import sys def get_keywords(): """Get the keywords needed to look up the version information.""" # these strings will be replaced by git during git-archive. # setup.py/versioneer.py will grep for the variable names, so they must # each be defined on a line of their own. _version.py will just call # get_keywords(). git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class VersioneerConfig: """Container for Versioneer configuration parameters.""" def get_config(): """Create, populate and return the VersioneerConfig() object.""" # these strings are filled in when 'setup.py versioneer' creates # _version.py cfg = VersioneerConfig() cfg.VCS = "git" cfg.style = "pep440-pre" cfg.tag_prefix = "" cfg.parentdir_prefix = "None" cfg.versionfile_source = "src/pymor_dealii/version.py" cfg.verbose = False return cfg class NotThisMethod(Exception): """Exception raised if a method is not valid for the current scenario.""" LONG_VERSION_PY = {} HANDLERS = {} def register_vcs_handler(vcs, method): # decorator """Create decorator to mark a method as the handler of a VCS.""" def decorate(f): """Store f in HANDLERS[vcs][method].""" if vcs not in HANDLERS: HANDLERS[vcs] = {} HANDLERS[vcs][method] = f return f return decorate def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=None): """Call the given command(s).""" assert isinstance(commands, list) p = None for c in commands: try: dispcmd = str([c] + args) # remember shell=False, so use git.cmd on windows, not just git p = subprocess.Popen( [c] + args, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=(subprocess.PIPE if hide_stderr else None), ) break except EnvironmentError: e = sys.exc_info()[1] if e.errno == errno.ENOENT: continue if verbose: print("unable to run %s" % dispcmd) print(e) return None, None else: if verbose: print("unable to find command, tried %s" % (commands,)) return None, None stdout = p.communicate()[0].strip().decode() if p.returncode != 0: if verbose: print("unable to run %s (error)" % dispcmd) print("stdout was %s" % stdout) return None, p.returncode return stdout, p.returncode def versions_from_parentdir(parentdir_prefix, root, verbose): """Try to determine the version from the parent directory name. Source tarballs conventionally unpack into a directory that includes both the project name and a version string. We will also support searching up two directory levels for an appropriately named parent directory """ rootdirs = [] for i in range(3): dirname = os.path.basename(root) if dirname.startswith(parentdir_prefix): return { "version": dirname[len(parentdir_prefix) :], "full-revisionid": None, "dirty": False, "error": None, "date": None, } else: rootdirs.append(root) root = os.path.dirname(root) # up a level if verbose: print( "Tried directories %s but none started with prefix %s" % (str(rootdirs), parentdir_prefix) ) raise NotThisMethod("rootdir doesn't start with parentdir_prefix") @register_vcs_handler("git", "get_keywords") def git_get_keywords(versionfile_abs): """Extract version information from the given file.""" # the code embedded in _version.py can just fetch the value of these # keywords. When used from setup.py, we don't want to import _version.py, # so we do it with a regexp instead. This function is not used from # _version.py. keywords = {} try: f = open(versionfile_abs, "r") for line in f.readlines(): if line.strip().startswith("git_refnames ="): mo = re.search(r'=\s*"(.*)"', line) if mo: keywords["refnames"] = mo.group(1) if line.strip().startswith("git_full ="): mo = re.search(r'=\s*"(.*)"', line) if mo: keywords["full"] = mo.group(1) if line.strip().startswith("git_date ="): mo = re.search(r'=\s*"(.*)"', line) if mo: keywords["date"] = mo.group(1) f.close() except EnvironmentError: pass return keywords @register_vcs_handler("git", "keywords") def git_versions_from_keywords(keywords, tag_prefix, verbose): """Get version information from git keywords.""" if not keywords: raise NotThisMethod("no keywords at all, weird") date = keywords.get("date") if date is not None: # Use only the last line. Previous lines may contain GPG signature # information. date = date.splitlines()[-1] # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 # -like" string, which we must then edit to make compliant), because # it's been around since git-1.5.3, and it's too difficult to # discover which version we're using, or to work around using an # older one. date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) refnames = keywords["refnames"].strip() if refnames.startswith("$Format"): if verbose: print("keywords are unexpanded, not using") raise NotThisMethod("unexpanded keywords, not a git-archive tarball") refs = set([r.strip() for r in refnames.strip("()").split(",")]) # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of # just "foo-1.0". If we see a "tag: " prefix, prefer those. TAG = "tag: " tags = set([r[len(TAG) :] for r in refs if r.startswith(TAG)]) if not tags: # Either we're using git < 1.8.3, or there really are no tags. We use # a heuristic: assume all version tags have a digit. The old git %d # expansion behaves like git log --decorate=short and strips out the # refs/heads/ and refs/tags/ prefixes that would let us distinguish # between branches and tags. By ignoring refnames without digits, we # filter out many common branch names like "release" and # "stabilization", as well as "HEAD" and "master". tags = set([r for r in refs if re.search(r"\d", r)]) if verbose: print("discarding '%s', no digits" % ",".join(refs - tags)) if verbose: print("likely tags: %s" % ",".join(sorted(tags))) for ref in sorted(tags): # sorting will prefer e.g. "2.0" over "2.0rc1" if ref.startswith(tag_prefix): r = ref[len(tag_prefix) :] if verbose: print("picking %s" % r) return { "version": r, "full-revisionid": keywords["full"].strip(), "dirty": False, "error": None, "date": date, } # no suitable tags, so version is "0+unknown", but full hex is still there if verbose: print("no suitable tags, using unknown + full revision id") return { "version": "0+unknown", "full-revisionid": keywords["full"].strip(), "dirty": False, "error": "no suitable tags", "date": None, } @register_vcs_handler("git", "pieces_from_vcs") def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command): """Get version from 'git describe' in the root of the source tree. This only gets called if the git-archive 'subst' keywords were *not* expanded, and _version.py hasn't already been rewritten with a short version string, meaning we're inside a checked out source tree. """ GITS = ["git"] if sys.platform == "win32": GITS = ["git.cmd", "git.exe"] out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True) if rc != 0: if verbose: print("Directory %s not under git control" % root) raise NotThisMethod("'git rev-parse --git-dir' returned error") # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] # if there isn't one, this yields HEX[-dirty] (no NUM) describe_out, rc = run_command( GITS, [ "describe", "--tags", "--dirty", "--always", "--long", "--match", "%s*" % tag_prefix, ], cwd=root, ) # --long was added in git-1.5.5 if describe_out is None: raise NotThisMethod("'git describe' failed") describe_out = describe_out.strip() full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root) if full_out is None: raise NotThisMethod("'git rev-parse' failed") full_out = full_out.strip() pieces = {} pieces["long"] = full_out pieces["short"] = full_out[:7] # maybe improved later pieces["error"] = None # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] # TAG might have hyphens. git_describe = describe_out # look for -dirty suffix dirty = git_describe.endswith("-dirty") pieces["dirty"] = dirty if dirty: git_describe = git_describe[: git_describe.rindex("-dirty")] # now we have TAG-NUM-gHEX or HEX if "-" in git_describe: # TAG-NUM-gHEX mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe) if not mo: # unparseable. Maybe git-describe is misbehaving? pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out return pieces # tag full_tag = mo.group(1) if not full_tag.startswith(tag_prefix): if verbose: fmt = "tag '%s' doesn't start with prefix '%s'" print(fmt % (full_tag, tag_prefix)) pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( full_tag, tag_prefix, ) return pieces pieces["closest-tag"] = full_tag[len(tag_prefix) :] # distance: number of commits since tag pieces["distance"] = int(mo.group(2)) # commit: short hex revision ID pieces["short"] = mo.group(3) else: # HEX: no tags pieces["closest-tag"] = None count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"], cwd=root) pieces["distance"] = int(count_out) # total number of commits # commit date: see ISO-8601 comment in git_versions_from_keywords() date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[ 0 ].strip() # Use only the last line. Previous lines may contain GPG signature # information. date = date.splitlines()[-1] pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) return pieces def plus_or_dot(pieces): """Return a + if we don't already have one, else return a .""" if "+" in pieces.get("closest-tag", ""): return "." return "+" def render_pep440(pieces): """Build up version string, with post-release "local version identifier". Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty Exceptions: 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] """ if pieces["closest-tag"]: rendered = pieces["closest-tag"] if pieces["distance"] or pieces["dirty"]: rendered += plus_or_dot(pieces) rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) if pieces["dirty"]: rendered += ".dirty" else: # exception #1 rendered = "0+untagged.%d.g%s" % (pieces["distance"], pieces["short"]) if pieces["dirty"]: rendered += ".dirty" return rendered def render_pep440_pre(pieces): """TAG[.post0.devDISTANCE] -- No -dirty. Exceptions: 1: no tags. 0.post0.devDISTANCE """ if pieces["closest-tag"]: rendered = pieces["closest-tag"] if pieces["distance"]: rendered += ".post0.dev%d" % pieces["distance"] else: # exception #1 rendered = "0.post0.dev%d" % pieces["distance"] return rendered def render_pep440_post(pieces): """TAG[.postDISTANCE[.dev0]+gHEX] . The ".dev0" means dirty. Note that .dev0 sorts backwards (a dirty tree will appear "older" than the corresponding clean one), but you shouldn't be releasing software with -dirty anyways. Exceptions: 1: no tags. 0.postDISTANCE[.dev0] """ if pieces["closest-tag"]: rendered = pieces["closest-tag"] if pieces["distance"] or pieces["dirty"]: rendered += ".post%d" % pieces["distance"] if pieces["dirty"]: rendered += ".dev0" rendered += plus_or_dot(pieces) rendered += "g%s" % pieces["short"] else: # exception #1 rendered = "0.post%d" % pieces["distance"] if pieces["dirty"]: rendered += ".dev0" rendered += "+g%s" % pieces["short"] return rendered def render_pep440_old(pieces): """TAG[.postDISTANCE[.dev0]] . The ".dev0" means dirty. Exceptions: 1: no tags. 0.postDISTANCE[.dev0] """ if pieces["closest-tag"]: rendered = pieces["closest-tag"] if pieces["distance"] or pieces["dirty"]: rendered += ".post%d" % pieces["distance"] if pieces["dirty"]: rendered += ".dev0" else: # exception #1 rendered = "0.post%d" % pieces["distance"] if pieces["dirty"]: rendered += ".dev0" return rendered def render_git_describe(pieces): """TAG[-DISTANCE-gHEX][-dirty]. Like 'git describe --tags --dirty --always'. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix) """ if pieces["closest-tag"]: rendered = pieces["closest-tag"] if pieces["distance"]: rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) else: # exception #1 rendered = pieces["short"] if pieces["dirty"]: rendered += "-dirty" return rendered def render_git_describe_long(pieces): """TAG-DISTANCE-gHEX[-dirty]. Like 'git describe --tags --dirty --always -long'. The distance/hash is unconditional. Exceptions: 1: no tags. HEX[-dirty] (note: no 'g' prefix) """ if pieces["closest-tag"]: rendered = pieces["closest-tag"] rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) else: # exception #1 rendered = pieces["short"] if pieces["dirty"]: rendered += "-dirty" return rendered def render(pieces, style): """Render the given version pieces into the requested style.""" if pieces["error"]: return { "version": "unknown", "full-revisionid": pieces.get("long"), "dirty": None, "error": pieces["error"], "date": None, } if not style or style == "default": style = "pep440" # the default if style == "pep440": rendered = render_pep440(pieces) elif style == "pep440-pre": rendered = render_pep440_pre(pieces) elif style == "pep440-post": rendered = render_pep440_post(pieces) elif style == "pep440-old": rendered = render_pep440_old(pieces) elif style == "git-describe": rendered = render_git_describe(pieces) elif style == "git-describe-long": rendered = render_git_describe_long(pieces) else: raise ValueError("unknown style '%s'" % style) return { "version": rendered, "full-revisionid": pieces["long"], "dirty": pieces["dirty"], "error": None, "date": pieces.get("date"), } def get_versions(): """Get version information or return default if unable to do so.""" # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have # __file__, we can work backwards from there to the root. Some # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which # case we can only use expanded keywords. cfg = get_config() verbose = cfg.verbose try: return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose) except NotThisMethod: pass try: root = os.path.realpath(__file__) # versionfile_source is the relative path from the top of the source # tree (where the .git directory might live) to this file. Invert # this to find the root from __file__. for i in cfg.versionfile_source.split("/"): root = os.path.dirname(root) except NameError: return { "version": "0+unknown", "full-revisionid": None, "dirty": None, "error": "unable to find root of source tree", "date": None, } try: pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) return render(pieces, cfg.style) except NotThisMethod: pass try: if cfg.parentdir_prefix: return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) except NotThisMethod: pass return { "version": "0+unknown", "full-revisionid": None, "dirty": None, "error": "unable to compute version", "date": None, }
py
7dfa61bd4a9d8c214a7fdb3be39cd9bfe3d4501a
# coding: utf8 from __future__ import unicode_literals from ..char_classes import LIST_ELLIPSES, LIST_ICONS from ..char_classes import CONCAT_QUOTES, ALPHA, ALPHA_LOWER, ALPHA_UPPER _quotes = CONCAT_QUOTES.replace("'", "") _infixes = ( LIST_ELLIPSES + LIST_ICONS + [ r"(?<=[{al}])\.(?=[{au}])".format(al=ALPHA_LOWER, au=ALPHA_UPPER), r"(?<=[{a}])[,!?](?=[{a}])".format(a=ALPHA), r"(?<=[{a}])[:<>=](?=[{a}])".format(a=ALPHA), r"(?<=[{a}]),(?=[{a}])".format(a=ALPHA), r"(?<=[{a}])([{q}\)\]\(\[])(?=[{a}])".format(a=ALPHA, q=_quotes), r"(?<=[{a}])--(?=[{a}])".format(a=ALPHA), r"(?<=[0-9])-(?=[0-9])", ] ) TOKENIZER_INFIXES = _infixes
py
7dfa63a2ee51c2563bfd2a0b4b2c8dfe716f22ed
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-08-10 17:34 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('todo', '0002_auto_20160810_2031'), ] operations = [ migrations.AlterField( model_name='card', name='description', field=models.CharField(blank=True, max_length=50), ), ]
py
7dfa6473031a8d7cb0153f7cdf81f582c29fc680
# Generated by Django 3.2.2 on 2021-05-28 13:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('kra', '0010_resourceusage_idx'), ] operations = [ migrations.AddIndex( model_name='pod', index=models.Index(fields=['started_at'], name='kra_pod_started_b1cc66_idx'), ), ]
py
7dfa64e6a93ea1c474d1086f7a9c67b9e898c975
# Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Chicago taxi example using TFX on Beam.""" import os from absl import logging from tfx.components.example_gen.csv_example_gen.component import CsvExampleGen from tfx.orchestration import metadata from tfx.orchestration import pipeline from tfx.orchestration.beam.beam_dag_runner import BeamDagRunner _pipeline_name = 'chicago_taxi_beam' _taxi_root = os.path.join(os.environ['HOME'], 'taxi') _data_root = os.path.join(_taxi_root, 'data', 'simple') _tfx_root = os.path.join(os.environ['HOME'], 'tfx') _pipeline_root = os.path.join(_tfx_root, 'pipelines', _pipeline_name) # Sqlite ML-metadata db path. _metadata_path = os.path.join(_tfx_root, 'metadata', _pipeline_name, 'metadata.db') def _create_pipeline(pipeline_name: str, pipeline_root: str, data_root: str, metadata_path: str) -> pipeline.Pipeline: """Implements the chicago taxi pipeline with TFX.""" # Brings data into the pipeline or otherwise joins/converts training data. example_gen = CsvExampleGen(input_base=data_root) return pipeline.Pipeline( pipeline_name=pipeline_name, pipeline_root=pipeline_root, components=[example_gen], enable_cache=True, metadata_connection_config=metadata.sqlite_metadata_connection_config( metadata_path), additional_pipeline_args={}, ) if __name__ == '__main__': logging.set_verbosity(logging.INFO) BeamDagRunner().run( _create_pipeline( pipeline_name=_pipeline_name, pipeline_root=_pipeline_root, data_root=_data_root, metadata_path=_metadata_path))
py
7dfa655b04b962515294ea5122549a33fb996835
''' Metrics to measure calibration of a trained deep neural network. References: [1] C. Guo, G. Pleiss, Y. Sun, and K. Q. Weinberger. On calibration of modern neural networks. arXiv preprint arXiv:1706.04599, 2017. ''' import math import torch import numpy as np from torch import nn from torch.nn import functional as F from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix # Some keys used for the following dictionaries COUNT = 'count' CONF = 'conf' ACC = 'acc' BIN_ACC = 'bin_acc' BIN_CONF = 'bin_conf' def _bin_initializer(bin_dict, num_bins=10): for i in range(num_bins): bin_dict[i][COUNT] = 0 bin_dict[i][CONF] = 0 bin_dict[i][ACC] = 0 bin_dict[i][BIN_ACC] = 0 bin_dict[i][BIN_CONF] = 0 def _populate_bins(confs, preds, labels, num_bins=10): bin_dict = {} for i in range(num_bins): bin_dict[i] = {} _bin_initializer(bin_dict, num_bins) num_test_samples = len(confs) for i in range(0, num_test_samples): confidence = confs[i] prediction = preds[i] label = labels[i] binn = int(math.ceil(((num_bins * confidence) - 1))) bin_dict[binn][COUNT] = bin_dict[binn][COUNT] + 1 bin_dict[binn][CONF] = bin_dict[binn][CONF] + confidence bin_dict[binn][ACC] = bin_dict[binn][ACC] + \ (1 if (label == prediction) else 0) for binn in range(0, num_bins): if (bin_dict[binn][COUNT] == 0): bin_dict[binn][BIN_ACC] = 0 bin_dict[binn][BIN_CONF] = 0 else: bin_dict[binn][BIN_ACC] = float( bin_dict[binn][ACC]) / bin_dict[binn][COUNT] bin_dict[binn][BIN_CONF] = bin_dict[binn][CONF] / \ float(bin_dict[binn][COUNT]) return bin_dict def expected_calibration_error(confs, preds, labels, num_bins=10): bin_dict = _populate_bins(confs, preds, labels, num_bins) num_samples = len(labels) ece = 0 for i in range(num_bins): bin_accuracy = bin_dict[i][BIN_ACC] bin_confidence = bin_dict[i][BIN_CONF] bin_count = bin_dict[i][COUNT] ece += (float(bin_count) / num_samples) * \ abs(bin_accuracy - bin_confidence) return ece def maximum_calibration_error(confs, preds, labels, num_bins=10): bin_dict = _populate_bins(confs, preds, labels, num_bins) ce = [] for i in range(num_bins): bin_accuracy = bin_dict[i][BIN_ACC] bin_confidence = bin_dict[i][BIN_CONF] ce.append(abs(bin_accuracy - bin_confidence)) return max(ce) def average_calibration_error(confs, preds, labels, num_bins=10): bin_dict = _populate_bins(confs, preds, labels, num_bins) non_empty_bins = 0 ace = 0 for i in range(num_bins): bin_accuracy = bin_dict[i][BIN_ACC] bin_confidence = bin_dict[i][BIN_CONF] bin_count = bin_dict[i][COUNT] if bin_count > 0: non_empty_bins += 1 ace += abs(bin_accuracy - bin_confidence) return ace / float(non_empty_bins) def l2_error(confs, preds, labels, num_bins=15): bin_dict = _populate_bins(confs, preds, labels, num_bins) num_samples = len(labels) l2_sum = 0 for i in range(num_bins): bin_accuracy = bin_dict[i][BIN_ACC] bin_confidence = bin_dict[i][BIN_CONF] bin_count = bin_dict[i][COUNT] l2_sum += (float(bin_count) / num_samples) * \ (bin_accuracy - bin_confidence)**2 l2_error = math.sqrt(l2_sum) return l2_error def test_classification_net_logits(logits, labels): ''' This function reports classification accuracy and confusion matrix given logits and labels from a model. ''' labels_list = [] predictions_list = [] confidence_vals_list = [] softmax = F.softmax(logits, dim=1) confidence_vals, predictions = torch.max(softmax, dim=1) labels_list.extend(labels.cpu().numpy().tolist()) predictions_list.extend(predictions.cpu().numpy().tolist()) confidence_vals_list.extend(confidence_vals.cpu().numpy().tolist()) accuracy = accuracy_score(labels_list, predictions_list) return confusion_matrix(labels_list, predictions_list), accuracy, labels_list,\ predictions_list, confidence_vals_list def get_logits_labels(data_loader, net): logits_list = [] labels_list = [] net.eval() with torch.no_grad(): for data, label in data_loader: data = data.cuda() logits = net(data) logits_list.append(logits) labels_list.append(label) logits = torch.cat(logits_list).cuda() labels = torch.cat(labels_list).cuda() return logits, labels def test_classification_net(model, data_loader, device, return_ece=False): ''' This function reports classification accuracy and confusion matrix over a dataset. ''' model.eval() labels_list = [] predictions_list = [] confidence_vals_list = [] with torch.no_grad(): for i, (data, label) in enumerate(data_loader): data = data.to(device) label = label.to(device) logits = model(data) softmax = F.softmax(logits, dim=1) confidence_vals, predictions = torch.max(softmax, dim=1) labels_list.extend(label.cpu().numpy().tolist()) predictions_list.extend(predictions.cpu().numpy().tolist()) confidence_vals_list.extend(confidence_vals.cpu().numpy().tolist()) accuracy = accuracy_score(labels_list, predictions_list) if return_ece: ece_criterion = ECELoss().cuda() logits, labels = get_logits_labels(data_loader, model) ece = ece_criterion(logits, labels).item() return confusion_matrix(labels_list, predictions_list), accuracy, labels_list,\ predictions_list, confidence_vals_list, ece else: return confusion_matrix(labels_list, predictions_list), accuracy, labels_list,\ predictions_list, confidence_vals_list # Calibration error scores in the form of loss metrics class ECELoss(nn.Module): ''' Compute ECE (Expected Calibration Error) ''' def __init__(self, n_bins=15): super(ECELoss, self).__init__() bin_boundaries = torch.linspace(0, 1, n_bins + 1) self.bin_lowers = bin_boundaries[:-1] self.bin_uppers = bin_boundaries[1:] def forward(self, logits, labels): softmaxes = F.softmax(logits, dim=1) confidences, predictions = torch.max(softmaxes, 1) accuracies = predictions.eq(labels) ece = torch.zeros(1, device=logits.device) for bin_lower, bin_upper in zip(self.bin_lowers, self.bin_uppers): # Calculated |confidence - accuracy| in each bin in_bin = confidences.gt(bin_lower.item()) * confidences.le(bin_upper.item()) prop_in_bin = in_bin.float().mean() if prop_in_bin.item() > 0: accuracy_in_bin = accuracies[in_bin].float().mean() avg_confidence_in_bin = confidences[in_bin].mean() ece += torch.abs(avg_confidence_in_bin - accuracy_in_bin) * prop_in_bin return ece class AdaptiveECELoss(nn.Module): ''' Compute Adaptive ECE ''' def __init__(self, n_bins=15): super(AdaptiveECELoss, self).__init__() self.nbins = n_bins def histedges_equalN(self, x): npt = len(x) return np.interp(np.linspace(0, npt, self.nbins + 1), np.arange(npt), np.sort(x)) def forward(self, logits, labels): softmaxes = F.softmax(logits, dim=1) confidences, predictions = torch.max(softmaxes, 1) accuracies = predictions.eq(labels) n, bin_boundaries = np.histogram(confidences.cpu().detach(), self.histedges_equalN(confidences.cpu().detach())) #print(n,confidences,bin_boundaries) self.bin_lowers = bin_boundaries[:-1] self.bin_uppers = bin_boundaries[1:] ece = torch.zeros(1, device=logits.device) for bin_lower, bin_upper in zip(self.bin_lowers, self.bin_uppers): # Calculated |confidence - accuracy| in each bin in_bin = confidences.gt(bin_lower.item()) * confidences.le(bin_upper.item()) prop_in_bin = in_bin.float().mean() if prop_in_bin.item() > 0: accuracy_in_bin = accuracies[in_bin].float().mean() avg_confidence_in_bin = confidences[in_bin].mean() ece += torch.abs(avg_confidence_in_bin - accuracy_in_bin) * prop_in_bin return ece class ClasswiseECELoss(nn.Module): ''' Compute Classwise ECE ''' def __init__(self, n_bins=15): super(ClasswiseECELoss, self).__init__() bin_boundaries = torch.linspace(0, 1, n_bins + 1) self.bin_lowers = bin_boundaries[:-1] self.bin_uppers = bin_boundaries[1:] def forward(self, logits, labels): num_classes = int((torch.max(labels) + 1).item()) softmaxes = F.softmax(logits, dim=1) per_class_sce = None for i in range(num_classes): class_confidences = softmaxes[:, i] class_sce = torch.zeros(1, device=logits.device) labels_in_class = labels.eq(i) # one-hot vector of all positions where the label belongs to the class i for bin_lower, bin_upper in zip(self.bin_lowers, self.bin_uppers): in_bin = class_confidences.gt(bin_lower.item()) * class_confidences.le(bin_upper.item()) prop_in_bin = in_bin.float().mean() if prop_in_bin.item() > 0: accuracy_in_bin = labels_in_class[in_bin].float().mean() avg_confidence_in_bin = class_confidences[in_bin].mean() class_sce += torch.abs(avg_confidence_in_bin - accuracy_in_bin) * prop_in_bin if (i == 0): per_class_sce = class_sce else: per_class_sce = torch.cat((per_class_sce, class_sce), dim=0) sce = torch.mean(per_class_sce) return sce
py
7dfa6589c76b27a2efc2d32c80359053f51076d5
import pygame import collections LINE_HEIGHT = 20 MAX_LINE = 4 #OFFSET_Y = 100 TEXT_COLOR = (0,50,240) PANEL_WIDTH = 32*10 PANEL_HEIGHT = LINE_HEIGHT*(MAX_LINE-1) MAX_AGE = 10 SCROLL_SPEED = 3 #LineInstance = collections.namedtuple('LineInstance', 'label age y yt') class LineInstance(object): pass class DAlertManager(object): @property def panel(self): return self._panel def __init__(self, display): self._display = display self._font = pygame.font.Font('C:\windows\Fonts\GULIM.TTC', 20) self._panel = pygame.Surface((PANEL_WIDTH, PANEL_HEIGHT)) self._msgs = [] def addText(self, msg): m = LineInstance() m.label = self._font.render(msg, 1, TEXT_COLOR) m.age = 0 m.yt = PANEL_HEIGHT-LINE_HEIGHT m.y = PANEL_HEIGHT self._msgs.append(m) for m in self._msgs[:-1]: m.yt -= LINE_HEIGHT def update(self, deltaTime): self._panel.fill((0,0,0)) for m in self._msgs: m.age += deltaTime m.y = max(m.y - SCROLL_SPEED, m.yt) self._msgs = [m for m in self._msgs if m.age < MAX_AGE] for i, m in enumerate(reversed(self._msgs[-MAX_LINE:])): self._panel.blit(m.label, ((PANEL_WIDTH-m.label.get_width())/2, m.y))
py
7dfa65b7a5e7d0279b1300e07d4fdfc45ae6b4e0
import lib.PySimpleGUI as sg from lib.AUConfig import AUConfig, GameHostOptions, PlayerStats from __version__ import __version__ from os import environ from lib.data_indexes import hats_dict, skins_dict, visors_dict, pets_dict, nameplates_dict, color_indexes import sys import ctypes from os import path from lib.dataclass import find_files from decimal import Decimal, getcontext getcontext().prec = 3 # Allows for IDs and in-game names of itmes to be swapped and vise versa hats_dict2 = {y:x for x,y in hats_dict.items()}; hats = list(hats_dict.values()); hats.sort() skins_dict2 = {y:x for x,y in skins_dict.items()}; skins = list(skins_dict.values()); skins.sort() visors_dict2 = {y:x for x,y in visors_dict.items()}; visors = list(visors_dict.values()); visors.sort() pets_dict2 = {y:x for x,y in pets_dict.items()}; pets = list(pets_dict.values()); pets.sort() nameplates_dict2 = {y:x for x,y in nameplates_dict.items()}; nameplates = list(nameplates_dict.values()); nameplates.sort() def resource_path(relative_path): # stolen from https://stackoverflow.com/a/13790741 """ Get absolute path to resource, works for dev and for PyInstaller """ try: # PyInstaller creates a temp folder and stores path in _MEIPASS base_path = sys._MEIPASS except Exception: base_path = path.abspath(".") return path.join(base_path, relative_path) sg.theme('defaultnomorenagging') # Add a touch of color menu_def = [["Help",["About"]]] # All the stuff inside your window. playerPrefs_tab = [ [sg.Text('Username:',key="username_display"),sg.Push(),sg.Input(key="username",size=(20,None))], [sg.Text('Color',key="color_display"),sg.Push(),sg.Combo(values=color_indexes,key="color")], [sg.Text('Hat:',key="hat_display"),sg.Push(),sg.Combo(values=hats,key="hat")], [sg.Text('Skin:',key="skin_display"),sg.Push(),sg.Combo(values=skins,key="skin")], [sg.Text('Visor:',key="visor_display"),sg.Push(),sg.Combo(values=visors,key="visor")], [sg.Text('Pet:',key="pet_display"),sg.Push(),sg.Combo(values=pets,key="pet")], [sg.Text('Nameplate:',key="nameplate_display"),sg.Push(),sg.Combo(values=nameplates,key="nameplate")], ] gameHostOptions_tab = [ [sg.Text("Max players:",key="maxplayers_display"),sg.Push(),sg.Input(key="maxplayers",size=(10,None))], [sg.Text("Player speed:",key="playerspeed_display"),sg.Push(),sg.Input(key="playerspeed",size=(10,None))], [sg.Text("Crewmate vision:",key="crewmatevision_display"),sg.Push(),sg.Input(key="crewmatevision",size=(10,None))], [sg.Text("Imposter vision",key="impostervision_display"),sg.Push(),sg.Input(key="impostervision",size=(10,None))], [sg.Text("Kill cooldown:",key="killcooldown_display"),sg.Push(),sg.Input(key="killcooldown",size=(10,None))], [sg.Text("Common tasks:",key="commontasks_display"),sg.Push(),sg.Input(key="commontasks",size=(10,None))], [sg.Text("Short tasks:",key="shorttasks_display"),sg.Push(),sg.Input(key="shorttasks",size=(10,None))], [sg.Text("Long tasks:",key="longtasks_display"),sg.Push(),sg.Input(key="longtasks",size=(10,None))], ] playerStats2_column = [ [sg.Text('Bodies reported:',key="bodiesreported_display"),sg.Push(),sg.Input(key="bodiesreported",size=(10,None))], [sg.Text('Emergencies called:',key="emergenciescalled_display"),sg.Push(),sg.Input(key="emergenciescalled",size=(10,None))], [sg.Text('Tasks completed:',key="taskscompleted_display"),sg.Push(),sg.Input(key="taskscompleted",size=(10,None))], [sg.Text('All tasks completed:',key="alltaskscompleted_display"),sg.Push(),sg.Input(key="alltaskscompleted",size=(10,None))], [sg.Text('Sabotages fixed:',key="sabotagesfixed_display"),sg.Push(),sg.Input(key="sabotagesfixed",size=(10,None))], [sg.Text('Imposter kills:',key="imposterkills_display"),sg.Push(),sg.Input(key="imposterkills",size=(10,None))], [sg.Text('Times murdered:',key="timesmurdered_display"),sg.Push(),sg.Input(key="timesmurdered",size=(10,None))], [sg.Text('Times ejected:',key="timesejected_display"),sg.Push(),sg.Input(key="timesejected",size=(10,None))], [sg.Text('Crewmate streak:',key="crewmatestreak_display"),sg.Push(),sg.Input(key="crewmatestreak",size=(10,None))], [sg.Text('Times imposter:',key="timesimposter_display"),sg.Push(),sg.Input(key="timesimposter",size=(10,None))], [sg.Text('Times crewmate:',key="timescrewmate_display"),sg.Push(),sg.Input(key="timescrewmate",size=(10,None))], [sg.Text('Games started:',key="gamesstarted_display"),sg.Push(),sg.Input(key="gamesstarted",size=(10,None))], [sg.Text('Games finished:',key="gamesfinished_display"),sg.Push(),sg.Input(key="gamesfinished",size=(10,None))], [sg.Text('Imposter vote wins:',key="impostervotewins_display"),sg.Push(),sg.Input(key="impostervotewins",size=(10,None))], [sg.Text('Imposter kill wins:',key="imposterkillwins_display"),sg.Push(),sg.Input(key="imposterkillwins",size=(10,None))], [sg.Text('Imposter sabotage wins:',key="impostersabotagewins_display"),sg.Push(),sg.Input(key="impostersabotagewins",size=(10,None))], [sg.Text('Crewmate vote wins:',key="crewmatevotewins_display"),sg.Push(),sg.Input(key="crewmatevotewins",size=(10,None))], [sg.Text('Crewmate task wins:',key="crewmatetaskwins_display"),sg.Push(),sg.Input(key="crewmatetaskwins",size=(10,None))], ] playerStats2_tab = [[sg.Column(playerStats2_column,scrollable=True,expand_x=True,size=(None,200),vertical_scroll_only=True)]] layout = [ [sg.Menu(menu_def)], [sg.TabGroup([[ sg.Tab('playerPrefs',playerPrefs_tab),sg.Tab('gameHostOptions',gameHostOptions_tab),sg.Tab('playerStats2',playerStats2_tab) ]])], [sg.Input(key='file',visible=False,enable_events=True),sg.FolderBrowse(button_text="Open",initial_folder=fr"{environ['AppData']}\..\LocalLow\Innersloth\Among Us"),sg.Submit('Save',key="save")] ] # Process is given app user model id of 'a.b.c.d', differentiating itself from the Python processs if sys.platform == 'win32' and not sys.argv[0].endswith('.exe'): ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(f'AUEPython.AUEPython.AUEPython.{__version__}') # string is arbitrary # Create the Window window = sg.Window(f'Among Us Editor (v{__version__}) - Remake - By Vresod',layout,icon=resource_path("images/logo.ico"),finalize=True) def update_window(window:sg.Window,prefsConfig:AUConfig,hostConfig:GameHostOptions,statsConfig:PlayerStats): """ Undoubtedly one of the most bloated functions in the entire codebase. lmao """ # Now it's even more bloated thanks to playerStats2 ;) window['username_display'].update(value=f"Username: {prefsConfig['lastPlayerName']}") window['username'].update(value=prefsConfig['lastPlayerName']) window['color_display'].update(value=f"Color: {color_indexes[int(prefsConfig['colorConfig'])]}") window['color'].update(value=color_indexes[int(prefsConfig['colorConfig'])]) window['hat_display'].update(value=f"Hat: {hats_dict[prefsConfig['lastHat']]}") window['hat'].update(value=hats_dict[prefsConfig['lastHat']]) window['skin_display'].update(value=f"Skin: {skins_dict[prefsConfig['lastSkin']]}") window['skin'].update(value=skins_dict[prefsConfig['lastSkin']]) window['visor_display'].update(value=f"Visor: {visors_dict[prefsConfig['lastVisor']]}") window['visor'].update(value=visors_dict[prefsConfig['lastVisor']]) window['pet_display'].update(value=f"Pet: {pets_dict[prefsConfig['lastPet']]}") window['pet'].update(value=pets_dict[prefsConfig['lastPet']]) window['nameplate_display'].update(value=f"Nameplate: {nameplates_dict[prefsConfig['lastNameplate']]}") window['nameplate'].update(value=nameplates_dict[prefsConfig['lastNameplate']]) # maxplayers playerspeed crewmatevision impostervision killcooldown window['maxplayers_display'].update(value=f"Max players: {hostConfig['MaxPlayers']}") window['maxplayers'].update(value=hostConfig['MaxPlayers']) window['playerspeed_display'].update(value=f"Player speed: {hostConfig['PlayerSpeedMod']}") window['playerspeed'].update(value=hostConfig['PlayerSpeedMod']) window['crewmatevision_display'].update(value=f"Crewmate vision: {hostConfig['CrewLightMod']}") window['crewmatevision'].update(value=hostConfig['CrewLightMod']) window['impostervision_display'].update(value=f"Imposter vision: {hostConfig['ImposterLightMod']}") window['impostervision'].update(value=hostConfig['ImposterLightMod']) window['killcooldown_display'].update(value=f"Kill cooldown: {hostConfig['KillCooldown']}") window['killcooldown'].update(value=hostConfig['KillCooldown']) window['commontasks_display'].update(value=f"Common tasks: {hostConfig['NumCommonTasks']}") window['commontasks'].update(value=hostConfig['NumCommonTasks']) window['shorttasks_display'].update(value=f"Short tasks: {hostConfig['NumShortTasks']}") window['shorttasks'].update(value=hostConfig['NumShortTasks']) window['longtasks_display'].update(value=f"Long tasks: {hostConfig['NumLongTasks']}") window['longtasks'].update(value=hostConfig['NumLongTasks']) # playerStats2 window['bodiesreported_display'].update(value=f"Bodies reported: {statsConfig['BodiesReported']}") window['bodiesreported'].update(value=statsConfig['BodiesReported']) window['emergenciescalled_display'].update(value=f"Emergencies called: {statsConfig['EmergenciesCalled']}") window['emergenciescalled'].update(value=statsConfig['EmergenciesCalled']) window['taskscompleted_display'].update(value=f"Tasks completed: {statsConfig['TasksCompleted']}") window['taskscompleted'].update(value=statsConfig['TasksCompleted']) window['alltaskscompleted_display'].update(value=f"All tasks completed: {statsConfig['AllTasksCompleted']}") window['alltaskscompleted'].update(value=statsConfig['AllTasksCompleted']) window['sabotagesfixed_display'].update(value=f"Sabotages fixed: {statsConfig['SabotagesFixed']}") window['sabotagesfixed'].update(value=statsConfig['SabotagesFixed']) window['imposterkills_display'].update(value=f"Imposter kills: {statsConfig['ImposterKills']}") window['imposterkills'].update(value=statsConfig['ImposterKills']) window['timesmurdered_display'].update(value=f"Times murdered: {statsConfig['TimesMurdered']}") window['timesmurdered'].update(value=statsConfig['TimesMurdered']) window['timesejected_display'].update(value=f"Times ejected: {statsConfig['TimesEjected']}") window['timesejected'].update(value=statsConfig['TimesEjected']) window['crewmatestreak_display'].update(value=f"Crewmate streak: {statsConfig['CrewmateStreak']}") window['crewmatestreak'].update(value=statsConfig['CrewmateStreak']) window['timesimposter_display'].update(value=f"Times imposter: {statsConfig['TimesImposter']}") window['timesimposter'].update(value=statsConfig['TimesImposter']) window['timescrewmate_display'].update(value=f"Times crewmate: {statsConfig['TimesCrewmate']}") window['timescrewmate'].update(value=statsConfig['TimesCrewmate']) window['gamesstarted_display'].update(value=f"Games started: {statsConfig['GamesStarted']}") window['gamesstarted'].update(value=statsConfig['GamesStarted']) window['gamesfinished_display'].update(value=f"Games finished: {statsConfig['GamesFinished']}") window['gamesfinished'].update(value=statsConfig['GamesFinished']) window['impostervotewins_display'].update(value=f"Imposter vote wins: {statsConfig['ImposterVoteWins']}") window['impostervotewins'].update(value=statsConfig['ImposterVoteWins']) window['imposterkillwins_display'].update(value=f"Imposter kill wins: {statsConfig['ImposterKillWins']}") window['imposterkillwins'].update(value=statsConfig['ImposterKillWins']) window['impostersabotagewins_display'].update(value=f"Imposter sabotage wins: {statsConfig['ImposterSabotageWins']}") window['impostersabotagewins'].update(value=statsConfig['ImposterSabotageWins']) window['crewmatevotewins_display'].update(value=f"Crewmate vote wins: {statsConfig['CrewmateVoteWins']}") window['crewmatevotewins'].update(value=statsConfig['CrewmateVoteWins']) window['crewmatetaskwins_display'].update(value=f"Crewmate task wins: {statsConfig['CrewmateTaskWins']}") window['crewmatetaskwins'].update(value=statsConfig['CrewmateTaskWins']) window.finalize() if sys.platform == "win32": files = find_files(fr"{environ['AppData']}\..\LocalLow\Innersloth\Among Us") # epic games compatible prefsConfig = AUConfig(files.playerPrefs) hostConfig = GameHostOptions(files.gameHostOptions) statsConfig = PlayerStats(files.playerStats2) update_window(window,prefsConfig,hostConfig,statsConfig) # Event Loop to process "events" and get the "values" of the inputs while True: event, values = window.read() if event == sg.WIN_CLOSED or event == 'Cancel': # if user closes window or clicks cancel break print(f"{event=}\n{values=}") if event == "file": if values['file'] == '': continue files = find_files(values['file']) prefsConfig = AUConfig(files) hostConfig = GameHostOptions(files) statsConfig = PlayerStats(files) update_window(window,prefsConfig,hostConfig,statsConfig) elif event == "save": prefsConfig['lastPlayerName'] = values['username'][:10] # Max username character length prefsConfig['colorConfig'] = color_indexes.index(values['color']) prefsConfig['lastHat'] = hats_dict2[values['hat']] prefsConfig['lastSkin'] = skins_dict2[values['skin']] prefsConfig['lastVisor'] = visors_dict2[values['visor']] prefsConfig['lastPet'] = pets_dict2[values['pet']] prefsConfig['lastNameplate'] = nameplates_dict2[values['nameplate']] prefsConfig.save() hostConfig['MaxPlayers'] = int(values['maxplayers']) hostConfig['PlayerSpeedMod'] = Decimal(values['playerspeed']).normalize() hostConfig['CrewLightMod'] = Decimal(values['crewmatevision']).normalize() hostConfig['ImposterLightMod'] = Decimal(values['impostervision']).normalize() hostConfig['KillCooldown'] = Decimal(values['killcooldown']).normalize() hostConfig['NumCommonTasks'] = int(values['commontasks']) hostConfig['NumShortTasks'] = int(values['shorttasks']) hostConfig['NumLongTasks'] = int(values['longtasks']) hostConfig.save() statsConfig['BodiesReported'] = int(values['bodiesreported']) statsConfig['EmergenciesCalled'] = int(values['emergenciescalled']) statsConfig['TasksCompleted'] = int(values['taskscompleted']) statsConfig['AllTasksCompleted'] = int(values['alltaskscompleted']) statsConfig['SabotagesFixed'] = int(values['sabotagesfixed']) statsConfig['ImposterKills'] = int(values['imposterkills']) statsConfig['TimesMurdered'] = int(values['timesmurdered']) statsConfig['TimesEjected'] = int(values['timesejected']) statsConfig['CrewmateStreak'] = int(values['crewmatestreak']) statsConfig['TimesImposter'] = int(values['timesimposter']) statsConfig['TimesCrewmate'] = int(values['timescrewmate']) statsConfig['GamesStarted'] = int(values['gamesstarted']) statsConfig['GamesFinished'] = int(values['gamesfinished']) statsConfig['ImposterVoteWins'] = int(values['impostervotewins']) statsConfig['ImposterKillWins'] = int(values['imposterkillwins']) statsConfig['ImposterSabotageWins'] = int(values['impostersabotagewins']) statsConfig['CrewmateVoteWins'] = int(values['crewmatevotewins']) statsConfig['CrewmateTaskWins'] = int(values['crewmatetaskwins']) statsConfig.save() update_window(window,prefsConfig,hostConfig,statsConfig) sg.popup("Config saved!") elif event == 'About': help_popup = sg.Window('About AUE',[ [sg.T("Among Us Editor")], [sg.T(f"v{__version__}")], [sg.Text("By Vresod (Vresod#3907) on Discord")], [sg.Button("Close")] ]).read(close=True) window.close()
py
7dfa66317db588281a2416a257469c3504ea87ad
#!/usr/bin/env python import os PROJECT_DIRECTORY = os.path.abspath(os.path.realpath(os.path.curdir)) def remove_file(filepath): os.remove(os.path.join(PROJECT_DIRECTORY, filepath)) if __name__ == "__main__": if "{{ cookiecutter.create_author_file }}" != "y": remove_file("AUTHORS.md") remove_file("docs/authors.md") if "no" in "{{ cookiecutter.command_line_interface|lower }}": cli_file = os.path.join("{{ cookiecutter.project_slug }}", "cli.py") remove_file(cli_file) if "Not open source" == "{{ cookiecutter.open_source_license }}": remove_file("LICENSE") if "{{ cookiecutter.git_init }}" == "y": os.system(f"cd {PROJECT_DIRECTORY} && git init") os.system( "cd {} && git remote add origin {}".format( PROJECT_DIRECTORY, "{{ cookiecutter.git_remote_repository }}" ) ) os.system(f"cd {PROJECT_DIRECTORY} && git add .") os.system(f'cd {PROJECT_DIRECTORY} && git commit -m "chore: initial commit"') if "{{ cookiecutter.add_pre_commit_hooks }}" == "y": os.system( f"cd {PROJECT_DIRECTORY} && pip install -U pre-commit && pre-commit install" ) if "{{ cookiecutter.add_commit_msg_hook }}" == "y": os.system(f"cd {PROJECT_DIRECTORY} && ./tools/install_git_hooks.sh")
py
7dfa665bb9b56aa85cca92c753e9498942e98367
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. # """ This module contains a sqoop 1.x hook """ import subprocess from copy import deepcopy from typing import Any, Dict, List, Optional from airflow.exceptions import AirflowException from airflow.hooks.base_hook import BaseHook class SqoopHook(BaseHook): """ This hook is a wrapper around the sqoop 1 binary. To be able to use the hook it is required that "sqoop" is in the PATH. Additional arguments that can be passed via the 'extra' JSON field of the sqoop connection: * ``job_tracker``: Job tracker local|jobtracker:port. * ``namenode``: Namenode. * ``lib_jars``: Comma separated jar files to include in the classpath. * ``files``: Comma separated files to be copied to the map reduce cluster. * ``archives``: Comma separated archives to be unarchived on the compute machines. * ``password_file``: Path to file containing the password. :param conn_id: Reference to the sqoop connection. :type conn_id: str :param verbose: Set sqoop to verbose. :type verbose: bool :param num_mappers: Number of map tasks to import in parallel. :type num_mappers: int :param properties: Properties to set via the -D argument :type properties: dict """ def __init__( self, conn_id: str = 'sqoop_default', verbose: bool = False, num_mappers: Optional[int] = None, hcatalog_database: Optional[str] = None, hcatalog_table: Optional[str] = None, properties: Optional[Dict[str, Any]] = None, ) -> None: # No mutable types in the default parameters super().__init__() self.conn = self.get_connection(conn_id) connection_parameters = self.conn.extra_dejson self.job_tracker = connection_parameters.get('job_tracker', None) self.namenode = connection_parameters.get('namenode', None) self.libjars = connection_parameters.get('libjars', None) self.files = connection_parameters.get('files', None) self.archives = connection_parameters.get('archives', None) self.password_file = connection_parameters.get('password_file', None) self.hcatalog_database = hcatalog_database self.hcatalog_table = hcatalog_table self.verbose = verbose self.num_mappers = num_mappers self.properties = properties or {} self.log.info("Using connection to: %s:%s/%s", self.conn.host, self.conn.port, self.conn.schema) self.sub_process: Any = None def get_conn(self) -> Any: return self.conn def cmd_mask_password(self, cmd_orig: List[str]) -> List[str]: """ Mask command password for safety """ cmd = deepcopy(cmd_orig) try: password_index = cmd.index('--password') cmd[password_index + 1] = 'MASKED' except ValueError: self.log.debug("No password in sqoop cmd") return cmd def popen(self, cmd: List[str], **kwargs: Any) -> None: """ Remote Popen :param cmd: command to remotely execute :param kwargs: extra arguments to Popen (see subprocess.Popen) :return: handle to subprocess """ masked_cmd = ' '.join(self.cmd_mask_password(cmd)) self.log.info("Executing command: %s", masked_cmd) self.sub_process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs) for line in iter(self.sub_process.stdout): # type: ignore self.log.info(line.strip()) self.sub_process.wait() self.log.info("Command exited with return code %s", self.sub_process.returncode) if self.sub_process.returncode: raise AirflowException("Sqoop command failed: {}".format(masked_cmd)) def _prepare_command(self, export: bool = False) -> List[str]: sqoop_cmd_type = "export" if export else "import" connection_cmd = ["sqoop", sqoop_cmd_type] for key, value in self.properties.items(): connection_cmd += ["-D", "{}={}".format(key, value)] if self.namenode: connection_cmd += ["-fs", self.namenode] if self.job_tracker: connection_cmd += ["-jt", self.job_tracker] if self.libjars: connection_cmd += ["-libjars", self.libjars] if self.files: connection_cmd += ["-files", self.files] if self.archives: connection_cmd += ["-archives", self.archives] if self.conn.login: connection_cmd += ["--username", self.conn.login] if self.conn.password: connection_cmd += ["--password", self.conn.password] if self.password_file: connection_cmd += ["--password-file", self.password_file] if self.verbose: connection_cmd += ["--verbose"] if self.num_mappers: connection_cmd += ["--num-mappers", str(self.num_mappers)] if self.hcatalog_database: connection_cmd += ["--hcatalog-database", self.hcatalog_database] if self.hcatalog_table: connection_cmd += ["--hcatalog-table", self.hcatalog_table] connect_str = self.conn.host if self.conn.port: connect_str += ":{}".format(self.conn.port) if self.conn.schema: connect_str += "/{}".format(self.conn.schema) connection_cmd += ["--connect", connect_str] return connection_cmd @staticmethod def _get_export_format_argument(file_type: str = 'text') -> List[str]: if file_type == "avro": return ["--as-avrodatafile"] elif file_type == "sequence": return ["--as-sequencefile"] elif file_type == "parquet": return ["--as-parquetfile"] elif file_type == "text": return ["--as-textfile"] else: raise AirflowException("Argument file_type should be 'avro', " "'sequence', 'parquet' or 'text'.") def _import_cmd( self, target_dir: Optional[str], append: bool, file_type: str, split_by: Optional[str], direct: Optional[bool], driver: Any, extra_import_options: Any, ) -> List[str]: cmd = self._prepare_command(export=False) if target_dir: cmd += ["--target-dir", target_dir] if append: cmd += ["--append"] cmd += self._get_export_format_argument(file_type) if split_by: cmd += ["--split-by", split_by] if direct: cmd += ["--direct"] if driver: cmd += ["--driver", driver] if extra_import_options: for key, value in extra_import_options.items(): cmd += ['--{}'.format(key)] if value: cmd += [str(value)] return cmd # pylint: disable=too-many-arguments def import_table( self, table: str, target_dir: Optional[str] = None, append: bool = False, file_type: str = "text", columns: Optional[str] = None, split_by: Optional[str] = None, where: Optional[str] = None, direct: bool = False, driver: Any = None, extra_import_options: Optional[Dict[str, Any]] = None, ) -> Any: """ Imports table from remote location to target dir. Arguments are copies of direct sqoop command line arguments :param table: Table to read :param target_dir: HDFS destination dir :param append: Append data to an existing dataset in HDFS :param file_type: "avro", "sequence", "text" or "parquet". Imports data to into the specified format. Defaults to text. :param columns: <col,col,col…> Columns to import from table :param split_by: Column of the table used to split work units :param where: WHERE clause to use during import :param direct: Use direct connector if exists for the database :param driver: Manually specify JDBC driver class to use :param extra_import_options: Extra import options to pass as dict. If a key doesn't have a value, just pass an empty string to it. Don't include prefix of -- for sqoop options. """ cmd = self._import_cmd(target_dir, append, file_type, split_by, direct, driver, extra_import_options) cmd += ["--table", table] if columns: cmd += ["--columns", columns] if where: cmd += ["--where", where] self.popen(cmd) def import_query( self, query: str, target_dir: Optional[str] = None, append: bool = False, file_type: str = "text", split_by: Optional[str] = None, direct: Optional[bool] = None, driver: Optional[Any] = None, extra_import_options: Optional[Dict[str, Any]] = None, ) -> Any: """ Imports a specific query from the rdbms to hdfs :param query: Free format query to run :param target_dir: HDFS destination dir :param append: Append data to an existing dataset in HDFS :param file_type: "avro", "sequence", "text" or "parquet" Imports data to hdfs into the specified format. Defaults to text. :param split_by: Column of the table used to split work units :param direct: Use direct import fast path :param driver: Manually specify JDBC driver class to use :param extra_import_options: Extra import options to pass as dict. If a key doesn't have a value, just pass an empty string to it. Don't include prefix of -- for sqoop options. """ cmd = self._import_cmd(target_dir, append, file_type, split_by, direct, driver, extra_import_options) cmd += ["--query", query] self.popen(cmd) # pylint: disable=too-many-arguments def _export_cmd( self, table: str, export_dir: Optional[str] = None, input_null_string: Optional[str] = None, input_null_non_string: Optional[str] = None, staging_table: Optional[str] = None, clear_staging_table: bool = False, enclosed_by: Optional[str] = None, escaped_by: Optional[str] = None, input_fields_terminated_by: Optional[str] = None, input_lines_terminated_by: Optional[str] = None, input_optionally_enclosed_by: Optional[str] = None, batch: bool = False, relaxed_isolation: bool = False, extra_export_options: Optional[Dict[str, Any]] = None, ) -> List[str]: cmd = self._prepare_command(export=True) if input_null_string: cmd += ["--input-null-string", input_null_string] if input_null_non_string: cmd += ["--input-null-non-string", input_null_non_string] if staging_table: cmd += ["--staging-table", staging_table] if clear_staging_table: cmd += ["--clear-staging-table"] if enclosed_by: cmd += ["--enclosed-by", enclosed_by] if escaped_by: cmd += ["--escaped-by", escaped_by] if input_fields_terminated_by: cmd += ["--input-fields-terminated-by", input_fields_terminated_by] if input_lines_terminated_by: cmd += ["--input-lines-terminated-by", input_lines_terminated_by] if input_optionally_enclosed_by: cmd += ["--input-optionally-enclosed-by", input_optionally_enclosed_by] if batch: cmd += ["--batch"] if relaxed_isolation: cmd += ["--relaxed-isolation"] if export_dir: cmd += ["--export-dir", export_dir] if extra_export_options: for key, value in extra_export_options.items(): cmd += ['--{}'.format(key)] if value: cmd += [str(value)] # The required option cmd += ["--table", table] return cmd # pylint: disable=too-many-arguments def export_table( self, table: str, export_dir: Optional[str] = None, input_null_string: Optional[str] = None, input_null_non_string: Optional[str] = None, staging_table: Optional[str] = None, clear_staging_table: bool = False, enclosed_by: Optional[str] = None, escaped_by: Optional[str] = None, input_fields_terminated_by: Optional[str] = None, input_lines_terminated_by: Optional[str] = None, input_optionally_enclosed_by: Optional[str] = None, batch: bool = False, relaxed_isolation: bool = False, extra_export_options: Optional[Dict[str, Any]] = None, ) -> None: """ Exports Hive table to remote location. Arguments are copies of direct sqoop command line Arguments :param table: Table remote destination :param export_dir: Hive table to export :param input_null_string: The string to be interpreted as null for string columns :param input_null_non_string: The string to be interpreted as null for non-string columns :param staging_table: The table in which data will be staged before being inserted into the destination table :param clear_staging_table: Indicate that any data present in the staging table can be deleted :param enclosed_by: Sets a required field enclosing character :param escaped_by: Sets the escape character :param input_fields_terminated_by: Sets the field separator character :param input_lines_terminated_by: Sets the end-of-line character :param input_optionally_enclosed_by: Sets a field enclosing character :param batch: Use batch mode for underlying statement execution :param relaxed_isolation: Transaction isolation to read uncommitted for the mappers :param extra_export_options: Extra export options to pass as dict. If a key doesn't have a value, just pass an empty string to it. Don't include prefix of -- for sqoop options. """ cmd = self._export_cmd( table, export_dir, input_null_string, input_null_non_string, staging_table, clear_staging_table, enclosed_by, escaped_by, input_fields_terminated_by, input_lines_terminated_by, input_optionally_enclosed_by, batch, relaxed_isolation, extra_export_options, ) self.popen(cmd)
py
7dfa6734102eb1ee8afc6e993eddff4f7da6b00b
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from datetime import timedelta from django.utils import timezone from impact.tests.factories import ( BaseProfileFactory, EntrepreneurProfileFactory, ExpertProfileFactory, IndustryFactory, MemberProfileFactory, ProgramRoleGrantFactory, StartupStatusFactory, UserFactory, ) class UserContext(object): def __init__(self, user_type="ENTREPRENEUR", primary_industry=None, additional_industries=None, functional_expertise=None, program_families=None, program_role_names=None, startup_status_names=None): self.user = UserFactory(date_joined=(timezone.now() + timedelta(-10))) self.program_families = program_families or [] self.program_role_names = program_role_names or [] self.startup_status_names = startup_status_names or [] self.baseprofile = BaseProfileFactory(user=self.user, user_type=user_type) if user_type == "ENTREPRENEUR": self.profile = EntrepreneurProfileFactory( user=self.user, program_families=self.program_families) self.user.entrepreneurprofile = self.profile elif user_type == "EXPERT": self.primary_industry = primary_industry or IndustryFactory() self.additional_industries = additional_industries or [] self.functional_expertise = functional_expertise or [] self.profile = ExpertProfileFactory( user=self.user, primary_industry=self.primary_industry, additional_industries=self.additional_industries, functional_expertise=self.functional_expertise, program_families=self.program_families) self.user.expertprofile = self.profile elif user_type == "MEMBER": self.profile = MemberProfileFactory(user=self.user) self.user.memberprofile = self.profile self.user.save() self.program_role_grants = [ ProgramRoleGrantFactory(person=self.user, program_role__user_role__name=role_name) for role_name in self.program_role_names] self.startup_role_grants = [ StartupStatusFactory( startup__user=self.user, program_startup_status__startup_role__name=status_name) for status_name in self.startup_status_names]
py
7dfa675748abe2c4a95224c6f5570b58a37c9699
from rfidsecuritysvc.model.authorized import MediaConfig def test_get(rh, open_door): media, perm = open_door rh.assert_response(rh.open('get', f'authorized/{media.id}/{perm.name}'), 200) def test_get_no_guest_info(rh, authorized_media_perm_no_guest, default_permission): mc = MediaConfig(authorized_media_perm_no_guest, None, None, None) rh.assert_response(rh.open('get', f'authorized/{authorized_media_perm_no_guest.media.id}/{authorized_media_perm_no_guest.permission.name}'), 200, mc) def test_get_nomedia(rh, open_door): media, perm = open_door rh.assert_response(rh.open('get', 'authorized/no such media/{perm.name}'), 403) def test_get_noperm(rh, open_door): media, perm = open_door rh.assert_response(rh.open('get', f'authorized/{media.id}/no such perm'), 403) def test_get_notauthorized(rh, not_authorized_media, default_permission): rh.assert_response(rh.open('get', f'authorized/{not_authorized_media.id}/{default_permission.name}'), 403)
py
7dfa67930a806522160c53ea9d99441ea5e675ae
# -*- coding: utf-8 -*- # # django-filter documentation build configuration file, created by # sphinx-quickstart on Mon Sep 17 11:25:20 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.txt' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'django-filter' copyright = u'2013, Alex Gaynor and others.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.12.0' # The full version, including alpha/beta/rc tags. release = '0.12.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'classic' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". #html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'django-filterdoc' # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'django-filter.tex', u'django-filter Documentation', u'Alex Gaynor and others.', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'django-filter', u'django-filter Documentation', [u'Alex Gaynor and others.'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'django-filter', u'django-filter Documentation', u'Alex Gaynor and others.', 'django-filter', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote'
py
7dfa6812b7edacb82387ac627a9c131ddd8f959c
'''Core architecture and functionality of the viewmaker network. Adapted from the transformer_net.py example below, using methods proposed in Johnson et al. 2016 Link: https://github.com/pytorch/examples/blob/0c1654d6913f77f09c0505fb284d977d89c17c1a/fast_neural_style/neural_style/transformer_net.py ''' import torch import torch.nn as nn from torch.nn import functional as init import torch_dct as dct ACTIVATIONS = { 'relu': torch.nn.ReLU, 'leaky_relu': torch.nn.LeakyReLU, } class Viewmaker(torch.nn.Module): '''Viewmaker network that stochastically maps a multichannel 2D input to an output of the same size.''' def __init__(self, num_channels=3, distortion_budget=0.05, activation='relu', clamp=True, frequency_domain=False, downsample_to=False, num_res_blocks=3): '''Initialize the Viewmaker network. Args: num_channels: Number of channels in the input (e.g. 1 for speech, 3 for images) Input will have shape [batch_size, num_channels, height, width] distortion_budget: Distortion budget of the viewmaker (epsilon, in the paper). Controls how strong the perturbations can be. activation: The activation function used in the network ('relu' and 'leaky_relu' currently supported) clamp: Whether to clamp the outputs to [0, 1] (useful to ensure output is, e.g., a valid image) frequency_domain: Whether to apply perturbation (and distortion budget) in the frequency domain. This is useful for shifting the inductive bias of the viewmaker towards more global / textural views. downsample_to: Downsamples the image, applies viewmaker, then upsamples. Possibly useful for higher-resolution inputs, but not evaluaed in the paper. num_res_blocks: Number of residual blocks to use in the network. ''' super().__init__() self.num_channels = num_channels self.num_res_blocks = num_res_blocks self.activation = activation self.clamp = clamp self.frequency_domain = frequency_domain self.downsample_to = downsample_to self.distortion_budget = distortion_budget self.act = ACTIVATIONS[activation]() # Initial convolution layers (+ 1 for noise filter) self.conv1 = ConvLayer(self.num_channels + 1, 32, kernel_size=9, stride=1) self.in1 = torch.nn.InstanceNorm2d(32, affine=True) self.conv2 = ConvLayer(32, 64, kernel_size=3, stride=2) self.in2 = torch.nn.InstanceNorm2d(64, affine=True) self.conv3 = ConvLayer(64, 128, kernel_size=3, stride=2) self.in3 = torch.nn.InstanceNorm2d(128, affine=True) # Residual layers have +N for added random channels self.res1 = ResidualBlock(128 + 1) self.res2 = ResidualBlock(128 + 2) self.res3 = ResidualBlock(128 + 3) self.res4 = ResidualBlock(128 + 4) self.res5 = ResidualBlock(128 + 5) # Upsampling Layers self.deconv1 = UpsampleConvLayer(128 + self.num_res_blocks, 64, kernel_size=3, stride=1, upsample=2) self.in4 = torch.nn.InstanceNorm2d(64, affine=True) self.deconv2 = UpsampleConvLayer(64, 32, kernel_size=3, stride=1, upsample=2) self.in5 = torch.nn.InstanceNorm2d(32, affine=True) self.deconv3 = ConvLayer(32, self.num_channels, kernel_size=9, stride=1) @staticmethod def zero_init(m): if isinstance(m, (nn.Linear, nn.Conv2d)): # actual 0 has symmetry problems init.normal_(m.weight.data, mean=0, std=1e-4) # init.constant_(m.weight.data, 0) init.constant_(m.bias.data, 0) elif isinstance(m, nn.BatchNorm1d): pass def add_noise_channel(self, x, num=1, bound_multiplier=1): # bound_multiplier is a scalar or a 1D tensor of length batch_size batch_size = x.size(0) filter_size = x.size(-1) shp = (batch_size, num, filter_size, filter_size) bound_multiplier = torch.tensor(bound_multiplier, device=x.device) noise = torch.rand(shp, device=x.device) * bound_multiplier.view(-1, 1, 1, 1) return torch.cat((x, noise), dim=1) def basic_net(self, y, num_res_blocks=5, bound_multiplier=1): if num_res_blocks not in list(range(6)): raise ValueError(f'num_res_blocks must be in {list(range(6))}, got {num_res_blocks}.') y = self.add_noise_channel(y, bound_multiplier=bound_multiplier) y = self.act(self.in1(self.conv1(y))) y = self.act(self.in2(self.conv2(y))) y = self.act(self.in3(self.conv3(y))) # Features that could be useful for other auxilary layers / losses. # [batch_size, 128] features = y.clone().mean([-1, -2]) for i, res in enumerate([self.res1, self.res2, self.res3, self.res4, self.res5]): if i < num_res_blocks: y = res(self.add_noise_channel(y, bound_multiplier=bound_multiplier)) y = self.act(self.in4(self.deconv1(y))) y = self.act(self.in5(self.deconv2(y))) y = self.deconv3(y) return y, features def get_delta(self, y_pixels, eps=1e-4): '''Constrains the input perturbation by projecting it onto an L1 sphere''' distortion_budget = self.distortion_budget delta = torch.tanh(y_pixels) # Project to [-1, 1] avg_magnitude = delta.abs().mean([1,2,3], keepdim=True) max_magnitude = distortion_budget delta = delta * max_magnitude / (avg_magnitude + eps) return delta def forward(self, x): if self.downsample_to: # Downsample. x_orig = x x = torch.nn.functional.interpolate( x, size=(self.downsample_to, self.downsample_to), mode='bilinear') y = x if self.frequency_domain: # Input to viewmaker is in frequency domain, outputs frequency domain perturbation. # Uses the Discrete Cosine Transform. # shape still [batch_size, C, W, H] y = dct.dct_2d(y) y_pixels, features = self.basic_net(y, self.num_res_blocks, bound_multiplier=1) delta = self.get_delta(y_pixels) if self.frequency_domain: # Compute inverse DCT from frequency domain to time domain. delta = dct.idct_2d(delta) if self.downsample_to: # Upsample. x = x_orig delta = torch.nn.functional.interpolate(delta, size=x_orig.shape[-2:], mode='bilinear') # Additive perturbation result = x + delta if self.clamp: result = torch.clamp(result, 0, 1.0) return result # --- class ConvLayer(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride): super(ConvLayer, self).__init__() reflection_padding = kernel_size // 2 self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding) self.conv2d = torch.nn.Conv2d( in_channels, out_channels, kernel_size, stride) def forward(self, x): out = self.reflection_pad(x) out = self.conv2d(out) return out class ResidualBlock(torch.nn.Module): """ResidualBlock introduced in: https://arxiv.org/abs/1512.03385 recommended architecture: http://torch.ch/blog/2016/02/04/resnets.html """ def __init__(self, channels, activation='relu'): super(ResidualBlock, self).__init__() self.conv1 = ConvLayer(channels, channels, kernel_size=3, stride=1) self.in1 = torch.nn.InstanceNorm2d(channels, affine=True) self.conv2 = ConvLayer(channels, channels, kernel_size=3, stride=1) self.in2 = torch.nn.InstanceNorm2d(channels, affine=True) self.act = ACTIVATIONS[activation]() def forward(self, x): residual = x out = self.act(self.in1(self.conv1(x))) out = self.in2(self.conv2(out)) out = out + residual return out class UpsampleConvLayer(torch.nn.Module): """UpsampleConvLayer Upsamples the input and then does a convolution. This method gives better results compared to ConvTranspose2d. ref: http://distill.pub/2016/deconv-checkerboard/ """ def __init__(self, in_channels, out_channels, kernel_size, stride, upsample=None): super(UpsampleConvLayer, self).__init__() self.upsample = upsample reflection_padding = kernel_size // 2 self.reflection_pad = torch.nn.ReflectionPad2d(reflection_padding) self.conv2d = torch.nn.Conv2d( in_channels, out_channels, kernel_size, stride) def forward(self, x): x_in = x if self.upsample: x_in = torch.nn.functional.interpolate( x_in, mode='nearest', scale_factor=self.upsample) out = self.reflection_pad(x_in) out = self.conv2d(out) return out
py
7dfa68d35c06887874a754b11f30c5777c614825
# Copyright 2021 portfolio-robustfpm-framework Authors # Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or # http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or # http://opensource.org/licenses/MIT>, at your option. This file may not be # copied, modified, or distributed except according to those terms. from datetime import datetime import time from ..util import coalesce, keydefaultdict __all__ = [ 'Timer', 'PTimer', 'ProfilerData' ] class Timer: """ Console profiler decorated as Python context manager. Displays the elapsed time of the block after execution. Parameters ---------- header : string Displayed header for the executed block. flush : boolean When True, the header is displayed before the execution starts. Otherwise, the header is printed after execution with the elapsed time part. Default is False. silent: boolean When True, no information is displayed in the console. Default is False. """ def __init__(self, header=None, flush=False, silent=False): self.header = coalesce(header, 'Elapsed time') self.flush = flush self.silent = silent def start(self): self.__start = datetime.now() self.__start_cpu = time.perf_counter() def stop(self): self.__end_cpu = time.perf_counter() self.elapsed_sec = (datetime.now() - self.__start).total_seconds() self.elapsed_sec_cpu = self.__end_cpu - self.__start_cpu self.elapsed_hms = Timer.sec2hms(self.elapsed_sec) self.elapsed_hms_cpu = Timer.sec2hms(self.elapsed_sec_cpu) def __enter__(self): if self.flush and not self.silent: print(self.header, end=': ') self.start() return self def __exit__(self, *args): self.stop() if not self.flush and not self.silent: print(self.header, end=': ') if not self.silent: print('{1} (CPU {2})'.format(self.header, Timer.fancystr(self.elapsed_hms), Timer.fancystr(self.elapsed_hms_cpu))) @staticmethod def sec2hms(sec): mnt = int(sec // 60) sec = sec - 60 * mnt hr = int(mnt // 60) mnt = int(mnt - hr * 60) return (hr, mnt, sec) @staticmethod def fancystr(hms): if not isinstance(hms, tuple): # hms is total sec hms = Timer.sec2hms(hms) res = '' if hms[0] > 0: res += '{0} hr '.format(hms[0]) if (res != '') or (hms[1] > 0): res += '{0} min '.format(hms[1]) if ((res != '') and (hms[2] > 0)) or (res == ''): res += '{0:.4f} sec'.format(hms[2]) return res def __str__(self): return '{0:02d}:{1:02d}:{2:02.4f}'.format(*self.elapsed_hms) class ProfilerData: """ Utility class for the Timer class. """ def __init__(self, header=None): self.header = coalesce(header, 'Total time') self.data = keydefaultdict(ProfilerData) def total_sec(self): s = 0 for k,v in self.data.items(): if isinstance(v, ProfilerData): s += v.total_sec() else: s += v return s def print(self, indent=''): print('{0}{1}: {2}'.format(indent, self.header, Timer.fancystr(self.total_sec()))) for k,v in self.data.items(): if isinstance(v, ProfilerData): v.print(indent = indent + '|- ') else: print('{0}{1}: {2}'.format(indent + '|- ', k, Timer.fancystr(v))) class PTimer(Timer): """ Extension of the Timer class. Allows to pass down the profiler data and append to it to reuse it in another profiler. Parameters ---------- profiler_data : ProfilerData object Saved information about the previously executed blocks. See also ---------- Timer """ def __init__(self, header=None, flush=False, silent=False, profiler_data=None): super().__init__(header=header, flush=flush, silent=silent) self.profiler_data = coalesce(profiler_data, ProfilerData()) def __enter__(self): self.profiler_data.data[self.header] = self.profiler_data.data.get(self.header, float(0)) return super().__enter__() def __exit__(self, *args): super().__exit__(args) # self.profiler_data.data[self.header] = self.profiler_data.data.get(self.header, float(0)) + self.elapsed_sec self.profiler_data.data[self.header] += self.elapsed_sec
py
7dfa6a3992f536975cae573616a99c3798ae6364
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Updated on 2021-07-09 - Triangle showing, for each strategy, the number of cells and number of groups at equilibrium. Varies complexity of community by changing NType or Asymmetry - Here we will change NType and mu when there is no density dependence - Fission slope increased to 1E9 when Ni > K_ind Optimized for SLURM array job @author: Simon van Vliet & Gil Henriques Department of Zoology University of Britisch Columbia [email protected] [email protected] ============================================================================ Run Model and plot results ============================================================================""" import sys sys.path.insert(0, '..') #load code from mainCode import MlsGroupDynamics_main as mls from mainCode import MlsGroupDynamics_utilities as util import pandas as pd import numpy as np import itertools import os """============================================================================ SET MODEL SETTINGS ============================================================================""" #SET fileName is appended to file name mainName = 'ScanComplex_NoDensDep-NoMut' #setup 2D parameter grid offspr_size_Vec = np.arange(0.01, 0.5, 0.034) offspr_frac_Vec = np.arange(0.01, 1, 0.07) #set model mode settings (slope and migration rate) mode_set = np.array([[1], [1]]) modeNames = ['indv_NType', 'indv_asymmetry'] mode_vec = np.arange(mode_set.shape[1]) #SET fission rates to scan gr_CFis_vec = np.array([0.05]) mu_vec = np.array([0]) #SET nr of replicates nReplicate = 5 #SET rest of model parameters model_par_def = { #time and run settings "maxRunTime": 900, #max cpu time in seconds "maxT": 5000, # total run time "maxPopSize": 2E5, #stop simulation if population exceeds this number "minT": 200, # min run time "sampleInt": 1, # sampling interval "mav_window": 200, # average over this time window "rms_window": 200, # calc rms change over this time window "rms_err_trNCoop": 1E-2, # when to stop calculations "rms_err_trNGr": 5E-2, # when to stop calculations # settings for initial condition "init_groupNum": 100, # initial # groups "init_fCoop": 1, "init_groupDens": 50, # initial total cell number in group # settings for individual level dynamics # complexity "indv_NType": 1, "indv_asymmetry": 1, # difference in growth rate b(j+1) = b(j) / asymmetry # mutation load "indv_cost": 0.01, # cost of cooperation "indv_mutR": 1E-3, # mutation rate to cheaters "indv_migrR": 0, # mutation rate to cheaters # group size control "indv_K": 100, # total group size at EQ if f_coop=1 "delta_indv": 0, # zero if death rate is simply 1/k, one if death rate decreases with group size # setting for group rates # fission rate 'gr_CFis': 0.05, 'gr_SFis': np.inf, # measured in units of 1 / indv_K 'grp_tau': 1, # constant multiplies group rates # extinction rate 'delta_grp': 0, # exponent of density dependence on group # 'K_grp': 0, # carrying capacity of groups 'delta_tot': 1, # exponent of density dependence on total #individual 'K_tot': 1E4, # carrying capacity of total individuals 'delta_size': 0, # exponent of size dependence # settings for fissioning 'offspr_size': 0.01, # offspr_size <= 0.5 and 'offspr_frac': 0.01, # offspr_size < offspr_frac < 1-offspr_size' # extra settings 'run_idx': 1, 'replicate_idx': 1, 'perimeter_loc': 0 } """============================================================================ CODE TO MAKE FIGURE ============================================================================""" parNameAbbrev = { 'delta_indv' : 'dInd', 'delta_grp' : 'dGrp', 'delta_tot' : 'dTot', 'delta_size' : 'dSiz', 'gr_CFis' : 'fisC', 'gr_SFis' : 'fisS', 'indv_NType' : 'nTyp', 'indv_asymmetry': 'asym', 'indv_cost' : 'cost', 'mutR_type' : 'muTy', 'mutR_size' : 'muSi', 'mutR_frac' : 'muFr', 'indv_migrR' : 'migR', 'indv_mutR' : 'mutR', 'indv_K' : 'kInd', 'K_grp' : 'kGrp', 'K_tot' : 'kTot', 'offspr_sizeInit':'siIn', 'offspr_fracInit':'frIn', 'indv_tau' : 'tInd', 'replicate_idx' : 'repN'} parListName = ['indv_NType', 'indv_asymmetry', 'gr_CFis', 'indv_mutR', 'replicate_idx'] #create list of main parameters to scan, each will run as separate SLURM job modelParListGlobal = [x for x in itertools.product(mode_vec, gr_CFis_vec, mu_vec, range(nReplicate))] #report number of array jobs needed def report_number_runs(): return len(modelParListGlobal) # create parameter list for current job def create_model_par_list_local(runIdx): #create model paremeter list for current parameter scan modelParListLocal = [] #get current global parameters curGlobalPar = modelParListGlobal[runIdx] for offspr_size in offspr_size_Vec: for offspr_frac in offspr_frac_Vec: inBounds = offspr_frac >= offspr_size and \ offspr_frac <= (1 - offspr_size) if inBounds: settings = {'indv_NType' : mode_set[0, curGlobalPar[0]], 'indv_asymmetry' : mode_set[1, curGlobalPar[0]], 'gr_CFis' : curGlobalPar[1], 'indv_mutR' : curGlobalPar[2], 'replicate_idx' : curGlobalPar[3], 'offspr_size' : offspr_size, 'offspr_frac' : offspr_frac, } curPar = util.set_model_par(model_par_def, settings) modelParListLocal.append(curPar) return modelParListLocal # run model code def run_model(runIdx, folder): #get model parameters to scan modelParListLocal = create_model_par_list_local(runIdx) # run model, use serial processing dfList = [] for par in modelParListLocal: output_matrix = mls.run_model_steadyState_fig(par) #convert to pandas data frame, add to list dfList.append(pd.DataFrame.from_records(output_matrix)) #create output name parName = ['_%s%.0g' %(parNameAbbrev[x], modelParListLocal[0][x]) for x in parListName] parName = ''.join(parName) fileNamePkl = folder + mainName + parName + '.pkl' #merge results in single data frame df = pd.concat(dfList, axis=0, ignore_index=True, sort=True) #store results on disk df.to_pickle(fileNamePkl) return None #run parscan if __name__ == "__main__": runIdx = sys.argv[1] folder = sys.argv[2] runFolder = folder + '/home/' + mainName + '/' runIdx = int(runIdx) runFolder = '/scicore/home/jenal/vanvli0000/home/NDD_complexity_noMut/' if not os.path.exists(runFolder): try: os.mkdir(runFolder) except: print('skip folder creation') run_model(runIdx, runFolder)
py
7dfa6a508fc9b7bbe65151ed6d8d665d43b5c0c3
from itertools import product, cycle from time import time t1 = time() with open(r"files\p059_cipher.txt") as f: file = f.read() file = file.split(",") file = list(map(int, file)) checker = set([i for i in range(97, 123)] + [i for i in range(32, 91)]) key_list = list(product([i for i in range(97, 123)], repeat=3)) ans_key = [] high = 0 for key in key_list: k = 0 for a, b in zip(file, cycle(key)): if a ^ b in checker: k += 1 if k > high: high = k ans_key = key # print(f'The encryption key is: {chr(ans_key[0])+chr(ans_key[1])+chr(ans_key[2])}') string = "" sum = 0 for a, b in zip(file, cycle(ans_key)): string += chr(a ^ b) sum += a ^ b # print(string) print(f"Answer is {sum}") print(f"Process completed in {time()-t1}s")
py
7dfa6ae19e63e27327a0cd8bd22f9c907c1d1463
from __future__ import absolute_import, unicode_literals from virtualenv.seed.wheels.util import Wheel from virtualenv.util.path import Path BUNDLE_FOLDER = Path(__file__).absolute().parent BUNDLE_SUPPORT = { "3.11": { "pip": "pip-22.0.4-py3-none-any.whl", "setuptools": "setuptools-61.0.0-py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, "3.10": { "pip": "pip-22.0.4-py3-none-any.whl", "setuptools": "setuptools-61.0.0-py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, "3.9": { "pip": "pip-22.0.4-py3-none-any.whl", "setuptools": "setuptools-61.0.0-py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, "3.8": { "pip": "pip-22.0.4-py3-none-any.whl", "setuptools": "setuptools-61.0.0-py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, "3.7": { "pip": "pip-22.0.4-py3-none-any.whl", "setuptools": "setuptools-61.0.0-py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, "3.6": { "pip": "pip-21.3.1-py3-none-any.whl", "setuptools": "setuptools-59.6.0-py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, "3.5": { "pip": "pip-20.3.4-py2.py3-none-any.whl", "setuptools": "setuptools-50.3.2-py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, "2.7": { "pip": "pip-20.3.4-py2.py3-none-any.whl", "setuptools": "setuptools-44.1.1-py2.py3-none-any.whl", "wheel": "wheel-0.37.1-py2.py3-none-any.whl", }, } MAX = "3.11" def get_embed_wheel(distribution, for_py_version): path = BUNDLE_FOLDER / (BUNDLE_SUPPORT.get(for_py_version, {}) or BUNDLE_SUPPORT[MAX]).get(distribution) return Wheel.from_path(path) __all__ = ( "get_embed_wheel", "BUNDLE_SUPPORT", "MAX", "BUNDLE_FOLDER", )