blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
616
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
69
| license_type
stringclasses 2
values | repo_name
stringlengths 5
118
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
63
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 2.91k
686M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 23
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 213
values | src_encoding
stringclasses 30
values | language
stringclasses 1
value | is_vendor
bool 2
classes | is_generated
bool 2
classes | length_bytes
int64 2
10.3M
| extension
stringclasses 246
values | content
stringlengths 2
10.3M
| authors
listlengths 1
1
| author_id
stringlengths 0
212
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b7d55215524685e8696fe519f227c6d7d2580212
|
c049214b58dd9569ad6205c324b33d11ebce4c5b
|
/network/unet.py
|
3d0c3ea7d3a303310257f3f17aca5f26c373b141
|
[] |
no_license
|
slsjnp/lightning-sacc
|
d102921a5cb49cce3e755b8c4a9ac5bf87080b83
|
eedcce760f4f89ac3b84b393ca578a33b6fde483
|
refs/heads/main
| 2023-04-05T17:22:43.454410
| 2021-04-26T14:28:30
| 2021-04-26T14:28:30
| 356,294,596
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 10,614
|
py
|
# U-Net网络
import torch.nn as nn
import torch
from torch import autograd
class DoubleConv(nn.Module):
def __init__(self, in_ch, out_ch):
super(DoubleConv, self).__init__()
self.conv = nn.Sequential(
nn.Conv2d(in_ch, out_ch, 3, padding=1),
nn.BatchNorm2d(out_ch),
nn.ReLU(inplace=True),
nn.Conv2d(out_ch, out_ch, 3, padding=1),
nn.BatchNorm2d(out_ch),
nn.ReLU(inplace=True)
)
def forward(self, input):
return self.conv(input)
class Unet(nn.Module):
def __init__(self, in_ch, out_ch):
super(Unet, self).__init__()
self.n_channels = 1
self.n_classes = 1
self.conv1 = DoubleConv(in_ch, 64)
self.pool1 = nn.MaxPool2d(2)
self.conv2 = DoubleConv(64, 128)
self.pool2 = nn.MaxPool2d(2)
self.conv3 = DoubleConv(128, 256)
self.pool3 = nn.MaxPool2d(2)
self.conv4 = DoubleConv(256, 512)
self.pool4 = nn.MaxPool2d(2)
self.conv5 = DoubleConv(512, 1024)
self.up6 = nn.ConvTranspose2d(1024, 512, 2, stride=2)
self.conv6 = DoubleConv(1024, 512)
self.up7 = nn.ConvTranspose2d(512, 256, 2, stride=2)
self.conv7 = DoubleConv(512, 256)
self.up8 = nn.ConvTranspose2d(256, 128, 2, stride=2)
self.conv8 = DoubleConv(256, 128)
self.up9 = nn.ConvTranspose2d(128, 64, 2, stride=2)
self.conv9 = DoubleConv(128, 64)
self.conv10 = nn.Conv2d(64, out_ch, 1)
def forward(self, x):
c1 = self.conv1(x)
p1 = self.pool1(c1)
c2 = self.conv2(p1)
p2 = self.pool2(c2)
c3 = self.conv3(p2)
p3 = self.pool3(c3)
c4 = self.conv4(p3)
p4 = self.pool4(c4)
c5 = self.conv5(p4)
up_6 = self.up6(c5)
merge6 = torch.cat([up_6, c4], dim=1)
c6 = self.conv6(merge6)
up_7 = self.up7(c6)
merge7 = torch.cat([up_7, c3], dim=1)
c7 = self.conv7(merge7)
up_8 = self.up8(c7)
merge8 = torch.cat([up_8, c2], dim=1)
c8 = self.conv8(merge8)
up_9 = self.up9(c8)
merge9 = torch.cat([up_9, c1], dim=1)
c9 = self.conv9(merge9)
c10 = self.conv10(c9)
out = nn.Sigmoid()(c10)
return out
# ----------------------------------------
# # U-Net网络
#
#
# import torch.nn as nn
# import torch
# import numpy as np
# from PIL import Image
# from torch import autograd
# from torch.autograd import Variable
# from torchvision.transforms import transforms
#
#
# class DoubleConv(nn.Module):
# def __init__(self, in_ch, out_ch):
# super(DoubleConv, self).__init__()
# self.conv = nn.Sequential(
# nn.Conv2d(in_ch, out_ch, 3, padding=1),
# nn.BatchNorm2d(out_ch),
# nn.ReLU(inplace=True),
# nn.Conv2d(out_ch, out_ch, 3, padding=1),
# nn.BatchNorm2d(out_ch),
# nn.ReLU(inplace=True)
# )
#
# def forward(self, input):
# return self.conv(input)
#
#
# class Down(nn.Module):
# def __init__(self, in_ch, out_ch):
# super(Down, self).__init__()
# self.downconv = nn.Sequential(
# nn.MaxPool2d(2),
# DoubleConv(in_ch, out_ch)
# )
#
# def forward(self, x):
# return self.downconv(x)
#
#
# class Up(nn.Module):
# def __init__(self, in_ch, out_ch, transform=True):
# super(Up, self).__init__()
# if transform:
# self.up = nn.ConvTranspose2d(in_ch, in_ch // 2, kernel_size=2, stride=2)
# else:
# self.up = nn.Sequential(
# nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True),
# nn.Conv2d(in_ch, in_ch // 2, 2, padding=0),
# nn.ReLU(inplace=True)
# )
# self.conv = DoubleConv(in_ch, out_ch)
# # self.up.apply(self.init_weights)
#
# def forward(self, x_down, x_left):
# '''
# input is BCHW
# conv output shape = (input_shape - Filter_shape + 2 * padding)/stride + 1
# '''
# x1 = self.up(x_down)
# x = torch.cat([x1, x_left], 1)
# x2 = self.conv(x)
# return x2
#
# # def forward(self, x1, x2):
# # x1 = self.up(x1)
# # # input is CHW
# # diffY = x2.size()[2] - x1.size()[2]
# # diffX = x2.size()[3] - x1.size()[3]
# #
# # x1 = F.pad(x1, [diffX // 2, diffX - diffX // 2,
# # diffY // 2, diffY - diffY // 2])
# # # if you have padding issues, see
# # # https://github.com/HaiyongJiang/U-Net-Pytorch-Unstructured-Buggy/commit/0e854509c2cea854e247a9c615f175f76fbb2e3a
# # # https://github.com/xiaopeng-liao/Pytorch-UNet/commit/8ebac70e633bac59fc22bb5195e513d5832fb3bd
# # x = torch.cat([x2, x1], dim=1)
# # return self.conv(x)
#
#
# class OutConv(nn.Module):
# def __init__(self, in_channels, out_channels):
# super(OutConv, self).__init__()
# self.conv = nn.Conv2d(in_channels, out_channels, kernel_size=1)
#
# def forward(self, x):
# return self.conv(x)
#
#
# class Unet(nn.Module):
# def __init__(self, n_channels, n_classes, bilinear=True):
# super(Unet, self).__init__()
# self.n_channels = n_channels
# self.n_classes = n_classes
# self.bilinear = bilinear
#
# self.inc = DoubleConv(n_channels, 64)
# self.down1 = Down(64, 128)
# self.down2 = Down(128, 256)
# self.down3 = Down(256, 512)
# # factor = 2 if bilinear else 1
# factor = 1
# self.down4 = Down(512, 1024 // factor)
# self.up1 = Up(1024, 512 // factor)
# self.up2 = Up(512, 256 // factor)
# self.up3 = Up(256, 128 // factor)
# self.up4 = Up(128, 64)
# self.outc = OutConv(64, n_classes)
#
# def forward(self, x):
# x1 = self.inc(x)
# x2 = self.down1(x1)
# x3 = self.down2(x2)
# x4 = self.down3(x3)
# x5 = self.down4(x4)
# x = self.up1(x5, x4)
# x = self.up2(x, x3)
# x = self.up3(x, x2)
# x = self.up4(x, x1)
# logits = self.outc(x)
# return logits
#
#
# # class Unet(nn.Module):
# # def __init__(self, in_ch, out_ch):
# # super(Unet, self).__init__()
# #
# # self.conv1 = DoubleConv(in_ch, 64)
# # self.pool1 = nn.MaxPool2d(2)
# # self.conv2 = DoubleConv(64, 128)
# # self.pool2 = nn.MaxPool2d(2)
# # self.conv3 = DoubleConv(128, 256)
# # self.pool3 = nn.MaxPool2d(2)
# # self.conv4 = DoubleConv(256, 512)
# # self.pool4 = nn.MaxPool2d(2)
# # self.conv5 = DoubleConv(512, 1024)
# # self.up6 = nn.ConvTranspose2d(1024, 512, 2, stride=2)
# # self.conv6 = DoubleConv(1024, 512)
# # self.up7 = nn.ConvTranspose2d(512, 256, 2, stride=2)
# # self.conv7 = DoubleConv(512, 256)
# # self.up8 = nn.ConvTranspose2d(256, 128, 2, stride=2)
# # self.conv8 = DoubleConv(256, 128)
# # self.up9 = nn.ConvTranspose2d(128, 64, 2, stride=2)
# # self.conv9 = DoubleConv(128, 64)
# # self.conv10 = nn.Conv2d(64, out_ch, 1)
# #
# # def forward(self, x):
# # c1 = self.conv1(x)
# # p1 = self.pool1(c1)
# # c2 = self.conv2(p1)
# # p2 = self.pool2(c2)
# # c3 = self.conv3(p2)
# # p3 = self.pool3(c3)
# # c4 = self.conv4(p3)
# # p4 = self.pool4(c4)
# # c5 = self.conv5(p4)
# # up_6 = self.up6(c5)
# # merge6 = torch.cat([up_6, c4], dim=1)
# # c6 = self.conv6(merge6)
# # up_7 = self.up7(c6)
# # merge7 = torch.cat([up_7, c3], dim=1)
# # c7 = self.conv7(merge7)
# # up_8 = self.up8(c7)
# # merge8 = torch.cat([up_8, c2], dim=1)
# # c8 = self.conv8(merge8)
# # up_9 = self.up9(c8)
# # merge9 = torch.cat([up_9, c1], dim=1)
# # c9 = self.conv9(merge9)
# # c10 = self.conv10(c9)
# # out = nn.Sigmoid()(c10)
# #
# # return out
#
#
class FeatureExtractor(nn.Module):
def __init__(self, submoudule, extracted_layers):
"""
inspect feature map
:param submoudule: Module
:param extracted_layers: layer for inspect
"""
super(FeatureExtractor, self).__init__()
self.submodule = submoudule
self.extracted_layers = extracted_layers
self.dict = {}
self.outputs = {}
self.step = 0
def forward(self, x, saved_path='/home/sj/workspace/jupyter/data/unet/feature_img'):
tmplist = ['conv4', 'conv3', 'conv2', 'conv1']
catlist = ['conv6', 'conv7', 'conv8', 'conv9']
output_list = {}
for name, module in self.submodule._modules.items():
if name is "conv10":
# x = x.view(x.size(0), -1)
x = module(x)
out = nn.Sigmoid()(x)
return out
if name in tmplist:
x = module(x)
self.dict[tmplist.index(name)] = x
elif name in catlist:
# a = x
# b = self.dict[catlist.index(name)]
merge6 = torch.cat([x, self.dict[catlist.index(name)]], dim=1)
x = module(merge6)
else:
x = module(x)
# x = module(x)
if self.step == 50:
if name in self.extracted_layers:
# save_name = 'epoch{}_{}'.format(epoch, name)
# output_list[name] = x
# self.outputs.append(output_list)
self.outputs[name] = x
# y = module(x).cpu()
# y = torch.squeeze(x)
# y = y.data.numpy()
# print(y.shape)
# np.savetxt(saved_path, y, delimiter=',')
return x
#
#
# def extractor(img_path, saved_path, net, use_gpu):
# transform = transforms.Compose([
# transforms.Resize(256),
# transforms.CenterCrop(224),
# transforms.ToTensor()]
# )
#
# img = Image.open(img_path)
# img = transform(img)
# print(img.shape)
#
# x = Variable(torch.unsqueeze(img, dim=0).float(), requires_grad=False)
# print(x.shape)
#
# if use_gpu:
# x = x.cuda()
# net = net.cuda()
# y = net(x).cpu()
# y = torch.squeeze(y)
# y = y.data.numpy()
# print(y.shape)
# np.savetxt(saved_path, y, delimiter=',')
#
#
# if __name__ == '__main__':
# print('hello world')
|
[
"slsj7899@126.com"
] |
slsj7899@126.com
|
6f0ca0ccf5f5cb96a3e89b2201a5c7b67ea7be13
|
b408a224da745e3f65bda8a8bf007b12a56ffbe2
|
/EuclideanDistClass.py
|
88b497abaddcf36eff6728e875ad92051a390184
|
[] |
no_license
|
akashdobaria/RideSharing
|
cc01119744bfe2c58551e6e52615604d09c3bc4c
|
9c594052e0a370ae54a566dc4500f13c31b84825
|
refs/heads/master
| 2020-03-08T01:30:32.124145
| 2018-04-22T19:26:22
| 2018-04-22T19:26:22
| 127,832,497
| 0
| 0
| null | 2018-04-03T01:20:15
| 2018-04-03T01:20:14
| null |
UTF-8
|
Python
| false
| false
| 5,466
|
py
|
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 21 14:50:01 2018
@author: Khushbu
"""
import RideDetailsClass
import time
#input - location dictionary
#location dictionary format {"trip_id": <pickup lon, pickup lat, dropoff lon, dropoff lat>}
#output dict - key = merged trip ids , value = [euclidean distance sources]
# dict- key = merged trip ids, value = [euclidean distance destination]
# list - merged trips sent to next pool
#sources dict - key = merged trip ids, value = [long1,lat1,long2,lat2]
#dest dict - key = merged trip ids, value = [long1,lat1,long2,lat2]
class EuclideanDistance:
def __init__(self,minEuclideanDis):
self.minEuc = minEuclideanDis
def getEuclideanDistanceDict(self,locationDictioary,passengerDict):
nextPoolIds = set()
usedPoolIds = set()
individualTrips = set()
locationDict2 = locationDictioary.copy()
euclideanDictSources = dict()
euclideanDictDestinations = dict()
toShortPathSources = dict()
toShortPathDest = dict()
#listofLocationList = list()
tic = time.clock()
for key,value in locationDictioary.items():
lon1 = '%.3f'%(value[0])
lat1 = '%.3f'%(value[1])
lon1Dest = '%.3f'%(value[2])
lat1Dest = '%.3f'%(value[3])
trip_id1 = key
#check if the trip is an independent trip
if(passengerDict[trip_id1] == 3):
individualTrips.add(trip_id1)
del locationDict2[key]
for key2,value2 in locationDict2.items():
lon2 = '%.3f'%(value2[0])
lat2 = '%.3f'%(value2[1])
lon2Dest = '%.3f'%(value2[2])
lat2Dest = '%.3f'%(value2[3])
trip_id2 = key2
#trips will not merge if both have passenger count as 2
if(passengerDict[trip_id1] ==2 and passengerDict[trip_id2] == 2):
continue
haversineSource = RideDetailsClass.CalculateHaversine(float(lon1),float(lat1),float(lon2),float(lat2))
eucDist = haversineSource.haversine()
haversineDest = RideDetailsClass.CalculateHaversine(float(lon1Dest),float(lat1Dest),float(lon2Dest),float(lat2Dest))
eucDistDest = haversineDest.haversine()
#################store to db ???
#check if this is the condition in the algorithm?????????????
if(eucDist < self.minEuc and eucDistDest < self.minEuc):
#list of lists - list1 stores Lat,Long. List2 stores passenger count respective to combined trips
valueListSources = list()
valueListDest = list()
#list of lat,long
listCoordSources = list()
listCoordDest = list()
#list of passenger counts
listPassCount = list()
#store lat,long
listCoordSources.append(lon1)
listCoordSources.append(lat1)
listCoordSources.append(lon2)
listCoordSources.append(lat2)
listCoordDest.append(lon1Dest)
listCoordDest.append(lat1Dest)
listCoordDest.append(lon2Dest)
listCoordDest.append(lat2Dest)
#store passenger count
listPassCount.append(passengerDict[trip_id1])
listPassCount.append(passengerDict[trip_id2])
#append all lists to value list
valueListSources.append(listCoordSources)
valueListSources.append(listPassCount)
valueListDest.append(listCoordDest)
valueListDest.append(listPassCount)
usedPoolIds.add(trip_id1)
usedPoolIds.add(trip_id2)
eucKey = str(trip_id1) + "," + str(trip_id2)
euclideanDictSources[eucKey] = eucDist
euclideanDictDestinations[eucKey] = eucDistDest
toShortPathSources[eucKey] = valueListSources
toShortPathDest[eucKey] = valueListDest
#send the trips to the next pool
else:
if(not trip_id1 in usedPoolIds):
nextPoolIds.add(trip_id1)
if(not trip_id2 in usedPoolIds):
nextPoolIds.add(trip_id2)
toc = time.clock()
print(toc-tic)
#print (len(euclideanDict))
return euclideanDictSources,euclideanDictDestinations,nextPoolIds,toShortPathSources,toShortPathDest,individualTrips
#test
#euclObj = EuclideanDistance(2)
#eucDistS, eucDistDest, nextPoolID,toShortPathSources, toShortPathDest = euclObj.getEuclideanDistanceDict(loc)
#toShortPathSources
#toShortPathDest
|
[
"akash4492@yahoo.com"
] |
akash4492@yahoo.com
|
11747c6c47dac83634412c274cf07f358aba12e3
|
75f6f5bdf3c9f031761c350debee3554991125a0
|
/my_project/insert_lookup.py
|
487143f20eecf68b53a39100e974f98436403437
|
[
"MIT"
] |
permissive
|
ttngu207/canonical-full-imaging-pipeline
|
43946cd2c8fbc8f2b9759d2ac57d462fc1d375e5
|
0fab308ff7e506cb6449d6611a02c135bc710761
|
refs/heads/master
| 2023-01-14T13:01:59.468436
| 2020-11-13T19:47:12
| 2020-11-13T19:47:12
| 285,085,557
| 1
| 0
| null | 2020-08-04T19:56:22
| 2020-08-04T19:56:22
| null |
UTF-8
|
Python
| false
| false
| 1,061
|
py
|
from my_project import subject, imaging
import numpy as np
# ========== Insert new "Subject" ===========
subjects = [{'subject': '82951', 'sex': 'F', 'subject_birth_date': '2020-05-06 15:20:01'},
{'subject': '90853', 'sex': 'M', 'subject_birth_date': '2019-07-14 08:40:01'},
{'subject': '91706', 'sex': 'F', 'subject_birth_date': '2019-04-11 01:12:01'},
{'subject': '92696', 'sex': 'F', 'subject_birth_date': '2019-03-03 12:15:01'}]
subject.Subject.insert(subjects, skip_duplicates=True)
# ========== Insert new "ProcessingParamSet" for Suite2p ===========
params = np.load('./suite2p_ops.npy', allow_pickle=True).item()
imaging.ProcessingParamSet.insert_new_params(
'suite2p', 0, 'Ca-imaging analysis with Suite2p using default Suite2p ops', params)
# ========== Insert new "ProcessingParamSet" for CaImAn ===========
params = np.load('./caiman_ops.npy', allow_pickle=True).item()
imaging.ProcessingParamSet.insert_new_params(
'caiman', 1, 'Ca-imaging analysis with CaImAn using default CaImAn ops', params)
|
[
"thinh@vathes.com"
] |
thinh@vathes.com
|
3a2273dc92a5c2b9265c2540a7fef68a3aa56444
|
8c0e76eff0efff760afcbdc1e93fa73076f8d1a4
|
/autorun.py
|
273c00847c68f0fdd98f0a241257cd6ce571086b
|
[] |
no_license
|
32Bites/AutoTSSSaver
|
2935d67cbb634c0a90a2d18509ea00bd8bb637a7
|
6bbddfb40e0fec04011a090d3b061a5b0509bfed
|
refs/heads/master
| 2021-04-29T18:49:00.384801
| 2018-02-13T07:39:36
| 2018-02-13T07:39:36
| 121,701,343
| 0
| 1
| null | 2018-02-16T00:47:04
| 2018-02-16T00:47:04
| null |
UTF-8
|
Python
| false
| false
| 577
|
py
|
#!/usr/bin/python
import os
from mdfmonitor import URLModificationMonitor
files = os.listdir(".")
# create Watcher instance
monitor = URLModificationMonitor()
# append file to mdfmonitor instance
monitor.add_url("https://api.ipsw.me/v2.1/firmwares.json")
print "started..."
for mdf in monitor.monitor():
print mdf.url.center(30, "=")
print "Catch the Modification!!"
print "Old timestamp: %s" % mdf.old_dtime
print "New timestamp: %s" % mdf.new_dtime
os.system('cd /home/pi/AutoTSSSaver;python3 autotss.py -p /home/pi/AutoTSSSaver/tsschecker_linux')
|
[
"isatou41@gmail.com"
] |
isatou41@gmail.com
|
d7ec75359773e22454809b020fd51948e71989f7
|
e8c82271070e33bb6b181616a0a518d8f8fc6158
|
/fce/numpy/distutils/tests/f2py_ext/PaxHeader/setup.py
|
a2db623a83dba720bc9b9a648ba146aae721a167
|
[] |
no_license
|
DataRozhlas/profil-volice-share
|
aafa0a93b26de0773fa6bf2b7d513a5ec856ce38
|
b4424527fe36e0cd613f7bde8033feeecb7e2e94
|
refs/heads/master
| 2020-03-18T01:44:26.136999
| 2018-05-20T12:19:24
| 2018-05-20T12:19:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 136
|
py
|
17 gid=713727123
15 uid=3629613
20 ctime=1458667064
20 atime=1458667064
23 SCHILY.dev=16777220
23 SCHILY.ino=31296588
18 SCHILY.nlink=1
|
[
"honza@datastory.cz"
] |
honza@datastory.cz
|
b30367867662727af7808d148036434465b4aa5b
|
fab7472a72ae38b1999bb483a246cfe02ae79076
|
/CNN/Relu.py
|
259abb30a51f5171cf80d722c608b1af693f3348
|
[] |
no_license
|
csvw/CNN-Numpy-Implementation
|
72401dc9548c9541499f8644d06639ec9e815c40
|
757b7b59edb76b5a0d5fd22e78c09edb52c71571
|
refs/heads/master
| 2022-03-28T22:22:25.187874
| 2020-01-01T00:27:46
| 2020-01-01T00:27:46
| 231,118,623
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,038
|
py
|
import numpy as np
# Citation: gradient for Relu obtained from the following article:
# https://medium.com/@karpathy/yes-you-should-understand-backprop-e2f06eab496b
class Relu:
def __init__(self):
self.last_input = 0
self.last_batch = 0
def apply(self, input_vector):
self.last_input = input_vector
input_vector[input_vector <= 0] = 0
return input_vector
def apply_batch(self, input_tensor):
self.last_batch = input_tensor
#print("Changed? " + str(np.sum(input_tensor[0])))
for sample in input_tensor:
sample[sample <= 0] = 0
#print("Changed: " + str(np.sum(input_tensor[0])))
return input_tensor
def backprop(self, dLoss_dOutput):
dLoss_dOutput[self.last_input <= 0] = 0
return dLoss_dOutput
def backprop_batch(self, dLoss_dOutput):
for img in range(self.last_batch.shape[0]):
sample = self.last_batch[img]
dLoss_dOutput[img][sample <= 0] = 0
return dLoss_dOutput
|
[
"cwagoner@gatech.edu"
] |
cwagoner@gatech.edu
|
9e59be260b9e496ea4737cf99784ccfd44412b45
|
6a77b42871d1996b9037e3be4fea31436315c8ab
|
/aula_17.py
|
bef96bc1d569815421e4d6047d8cc9491aae6ac8
|
[] |
no_license
|
RaphaelMolina/Curso_em_video_Python3
|
4e1e299681695db69a0439107b32ae90cdea32f5
|
f22100865d7137bc420b677f118c848d963ee90a
|
refs/heads/master
| 2022-01-10T09:48:25.777665
| 2022-01-06T16:23:52
| 2022-01-06T16:23:52
| 244,028,670
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 58
|
py
|
from Titulo import Titulo
a = Titulo(17, '!!!')
a.Aula()
|
[
"manson1307@gmail.com"
] |
manson1307@gmail.com
|
f1ad9636a241389cacc29a8c7c4bb31eb2a3be28
|
4c395d4e66369c44e298642ff32faae1250045f3
|
/app1.py
|
78b632560a9a6327ac3eceb3b06f82466b7e94ce
|
[] |
no_license
|
Ashwini-gowda/flask-proxy-server-for-python
|
09178055e79b50afc5b083190dd6a7a9f1ff55c7
|
6832c41e0d261f17905c07fab2512e6bfe20fa3a
|
refs/heads/master
| 2020-06-29T21:37:42.880060
| 2019-08-06T11:07:14
| 2019-08-06T11:07:14
| 200,631,376
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,886
|
py
|
from flask import Flask, render_template, request, jsonify
from flask_mysqldb import MySQL
app = Flask(__name__)
app.config['MYSQL_HOST'] = 'localhost'
app.config['MYSQL_USER'] = 'root'
app.config['MYSQL_PASSWORD'] = 'root'
app.config['MYSQL_DB'] = 'mypgm_db'
mysql = MySQL(app)
@app.route('/form-example', methods=['GET','POST'])
def form_example():
if request.method == 'POST':
id = request.form['id']
language = request.form['language']
framework = request.form['framework']
cur = mysql.connection.cursor()
cur.execute("INSERT INTO mypgm(id, language, framework) VALUES (%s, %s, %s)", (id, language, framework))
mysql.connection.commit()
cur.execute("SELECT * FROM mypgm")
rows = cur.fetchall()
resp = jsonify(rows)
resp.status_code = 200
cur.close()
return resp
return '''<form method="POST">
Id: <input type="text" name="id"><br>
Language: <input type="text" name="language"><br>
Framework: <input type="text" name="framework"><br>
<input type="submit" value="Submit"><br>
</form>'''
@app.route('/form-process', methods=['GET','POST'])
def form_process():
if request.method == 'POST':
id = request.form['id']
username = request.form['username']
emailid = request.form['emailid']
password = request.form['password']
return jsonify(id=id, username=username, emailid=emailid, password=password)
return '''<form method="POST">
Id: <input type="text" name="id"><br>
UserName: <input type="text" name="username"><br>
Emailid: <input type="text" name="emailid"><br>
password: <input type="password" name="password"><br>
<input type="submit" value="Submit"><br>
</form>'''
if __name__ == "__main__":
app.run(debug='true')
|
[
"shivani.raj@nighthack.in"
] |
shivani.raj@nighthack.in
|
370478fd93220a2e0f29ee830a9036ef236ad689
|
d886b60674a970234134a2d9d84f1d5c2882f5e9
|
/flaskday-05-1/apps/__init__.py
|
9cb985bc01bf9bfc373c419ff7a933f356a9279f
|
[] |
no_license
|
CuiDingke/Python_Flask
|
d17c32530ca54282f6e8df55b8240982a37480a6
|
31afe5bd4608599e187b1285365e422fe60c2798
|
refs/heads/main
| 2023-08-27T17:24:45.231146
| 2021-11-10T08:15:23
| 2021-11-10T08:15:23
| 426,536,383
| 2
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 343
|
py
|
from flask import Flask
import settings
from apps.user.view import user_bp
from exts import db
def creat_app():
app = Flask(__name__, template_folder='../templates', static_folder='../statics')
app.config.from_object(settings.DevelopmentConfig)
app.register_blueprint(user_bp)
db.init_app(app) # 关联上app
return app
|
[
"15736980819@163.com"
] |
15736980819@163.com
|
54ab6172059da7ad82cbe83fb2411ff87434eb18
|
81a1c5db1f24a7daf4fe51de499e1aea81d8ea05
|
/azure/urls.py
|
e7a5a34369c0b02b7a1c1bde086ee4c96bb833cf
|
[] |
no_license
|
Beomi/azure-django-test
|
cf0d1fe323a63d9ba2672b8ebea2fc3e170980ce
|
a811afb62501f2fe245226f9bb94cd51bebc6866
|
refs/heads/master
| 2021-06-19T15:53:18.932591
| 2017-06-08T12:20:34
| 2017-06-08T12:20:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 996
|
py
|
"""azure URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^admin/', admin.site.urls),
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
#urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
[
"latheledusjp@gmail.com"
] |
latheledusjp@gmail.com
|
cc8704fe54076805d28fed406bd8316e9f117ed7
|
09714ed46ca6f9741dc296787ba51df4767b572e
|
/steam/protobufs/steammessages_remoteplay_pb2.py
|
bf30b7ecdce3814bb31fbf00d0bf94bbd3f8093b
|
[
"MIT"
] |
permissive
|
sha016/steam
|
c6da65bca23aac99fcc1ec56a1efc812a60ad162
|
1cb46e181d458b6087401d21eca2499b21cbc760
|
refs/heads/master
| 2023-08-25T21:28:00.725668
| 2021-10-22T19:16:16
| 2021-10-22T19:17:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| true
| 265,869
|
py
|
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: steammessages_remoteplay.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
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()
DESCRIPTOR = _descriptor.FileDescriptor(
name='steammessages_remoteplay.proto',
package='',
syntax='proto2',
serialized_options=_b('H\001\220\001\000'),
serialized_pb=_b('\n\x1esteammessages_remoteplay.proto\"H\n\x15\x43\x44iscoveryPingRequest\x12\x10\n\x08sequence\x18\x01 \x01(\r\x12\x1d\n\x15packet_size_requested\x18\x02 \x01(\r\"H\n\x16\x43\x44iscoveryPingResponse\x12\x10\n\x08sequence\x18\x01 \x01(\r\x12\x1c\n\x14packet_size_received\x18\x02 \x01(\r\"5\n\x1d\x43StreamingClientHandshakeInfo\x12\x14\n\x0cnetwork_test\x18\x02 \x01(\x05\"C\n\x13\x43\x43lientHandshakeMsg\x12,\n\x04info\x18\x01 \x02(\x0b\x32\x1e.CStreamingClientHandshakeInfo\",\n\x1d\x43StreamingServerHandshakeInfo\x12\x0b\n\x03mtu\x18\x01 \x01(\x05\"C\n\x13\x43ServerHandshakeMsg\x12,\n\x04info\x18\x01 \x02(\x0b\x32\x1e.CStreamingServerHandshakeInfo\"s\n\x19\x43\x41uthenticationRequestMsg\x12\r\n\x05token\x18\x01 \x01(\x0c\x12\x36\n\x07version\x18\x02 \x01(\x0e\x32\x0f.EStreamVersion:\x14k_EStreamVersionNone\x12\x0f\n\x07steamid\x18\x03 \x01(\x04\"\xd4\x01\n\x1a\x43\x41uthenticationResponseMsg\x12K\n\x06result\x18\x01 \x01(\x0e\x32\x30.CAuthenticationResponseMsg.AuthenticationResult:\tSUCCEEDED\x12\x36\n\x07version\x18\x02 \x01(\x0e\x32\x0f.EStreamVersion:\x14k_EStreamVersionNone\"1\n\x14\x41uthenticationResult\x12\r\n\tSUCCEEDED\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\"\x0f\n\rCKeepAliveMsg\"\x83\x01\n\x14\x43StartNetworkTestMsg\x12\x0e\n\x06\x66rames\x18\x01 \x01(\r\x12\x11\n\tframerate\x18\x02 \x01(\r\x12\x14\n\x0c\x62itrate_kbps\x18\x03 \x01(\r\x12\x1a\n\x12\x62urst_bitrate_kbps\x18\x04 \x01(\r\x12\x16\n\x0e\x62\x61ndwidth_test\x18\x05 \x01(\x08\"\x89\x01\n\x10\x43StreamVideoMode\x12\r\n\x05width\x18\x01 \x02(\r\x12\x0e\n\x06height\x18\x02 \x02(\r\x12\x14\n\x0crefresh_rate\x18\x03 \x01(\r\x12\x1e\n\x16refresh_rate_numerator\x18\x04 \x01(\r\x12 \n\x18refresh_rate_denominator\x18\x05 \x01(\r\"\xf8\x02\n\x14\x43StreamingClientCaps\x12\x13\n\x0bsystem_info\x18\x01 \x01(\t\x12\x1a\n\x12system_can_suspend\x18\x02 \x01(\x08\x12#\n\x1bmaximum_decode_bitrate_kbps\x18\x03 \x01(\x05\x12\"\n\x1amaximum_burst_bitrate_kbps\x18\x04 \x01(\x05\x12\x1b\n\x13supports_video_hevc\x18\x05 \x01(\x08\x12\x1b\n\x13\x64isable_steam_store\x18\x06 \x01(\x08\x12\x1d\n\x15\x64isable_client_cursor\x18\x07 \x01(\x08\x12\'\n\x1f\x64isable_intel_hardware_encoding\x18\x08 \x01(\x08\x12%\n\x1d\x64isable_amd_hardware_encoding\x18\t \x01(\x08\x12(\n disable_nvidia_hardware_encoding\x18\n \x01(\x08\x12\x13\n\x0b\x66orm_factor\x18\x0b \x01(\x05\"\xea\x05\n\x16\x43StreamingClientConfig\x12\x44\n\x07quality\x18\x01 \x01(\x0e\x32\x19.EStreamQualityPreference:\x18k_EStreamQualityBalanced\x12\x1c\n\x14maximum_resolution_x\x18\x02 \x01(\r\x12\x1c\n\x14maximum_resolution_y\x18\x03 \x01(\r\x12#\n\x1bmaximum_framerate_numerator\x18\x04 \x01(\r\x12%\n\x1dmaximum_framerate_denominator\x18\x05 \x01(\r\x12 \n\x14maximum_bitrate_kbps\x18\x06 \x01(\x05:\x02-1\x12&\n\x18\x65nable_hardware_decoding\x18\x07 \x01(\x08:\x04true\x12)\n\x1a\x65nable_performance_overlay\x18\x08 \x01(\x08:\x05\x66\x61lse\x12$\n\x16\x65nable_video_streaming\x18\t \x01(\x08:\x04true\x12$\n\x16\x65nable_audio_streaming\x18\n \x01(\x08:\x04true\x12$\n\x16\x65nable_input_streaming\x18\x0b \x01(\x08:\x04true\x12\x19\n\x0e\x61udio_channels\x18\x0c \x01(\x05:\x01\x32\x12 \n\x11\x65nable_video_hevc\x18\r \x01(\x08:\x05\x66\x61lse\x12&\n\x18\x65nable_performance_icons\x18\x0e \x01(\x08:\x04true\x12*\n\x1b\x65nable_microphone_streaming\x18\x0f \x01(\x08:\x05\x66\x61lse\x12!\n\x19\x63ontroller_overlay_hotkey\x18\x10 \x01(\t\x12&\n\x17\x65nable_touch_controller\x18\x11 \x01(\x08:\x05\x66\x61lse\x12?\n\tp2p_scope\x18\x13 \x01(\x0e\x32\x10.EStreamP2PScope:\x1ak_EStreamP2PScopeAutomatic\"\x94\x03\n\x16\x43StreamingServerConfig\x12!\n\x19\x63hange_desktop_resolution\x18\x01 \x01(\x08\x12%\n\x1d\x64ynamically_adjust_resolution\x18\x02 \x01(\x08\x12\x1c\n\x14\x65nable_capture_nvfbc\x18\x03 \x01(\x08\x12\'\n\x1f\x65nable_hardware_encoding_nvidia\x18\x04 \x01(\x08\x12$\n\x1c\x65nable_hardware_encoding_amd\x18\x05 \x01(\x08\x12&\n\x1e\x65nable_hardware_encoding_intel\x18\x06 \x01(\x08\x12!\n\x19software_encoding_threads\x18\x07 \x01(\x05\x12\x1f\n\x17\x65nable_traffic_priority\x18\x08 \x01(\x08\x12W\n\x0fhost_play_audio\x18\t \x01(\x0e\x32\x1f.EStreamHostPlayAudioPreference:\x1dk_EStreamHostPlayAudioDefault\"\xa9\x02\n\x11\x43NegotiatedConfig\x12\x15\n\rreliable_data\x18\x01 \x01(\x08\x12I\n\x14selected_audio_codec\x18\x02 \x01(\x0e\x32\x12.EStreamAudioCodec:\x17k_EStreamAudioCodecNone\x12I\n\x14selected_video_codec\x18\x03 \x01(\x0e\x32\x12.EStreamVideoCodec:\x17k_EStreamVideoCodecNone\x12\x30\n\x15\x61vailable_video_modes\x18\x04 \x03(\x0b\x32\x11.CStreamVideoMode\x12\x19\n\x11\x65nable_remote_hid\x18\x05 \x01(\x08\x12\x1a\n\x12\x65nable_touch_input\x18\x06 \x01(\x08\"\xcf\x01\n\x13\x43NegotiationInitMsg\x12\x15\n\rreliable_data\x18\x01 \x01(\x08\x12\x32\n\x16supported_audio_codecs\x18\x02 \x03(\x0e\x32\x12.EStreamAudioCodec\x12\x32\n\x16supported_video_codecs\x18\x03 \x03(\x0e\x32\x12.EStreamVideoCodec\x12\x1b\n\x13supports_remote_hid\x18\x04 \x01(\x08\x12\x1c\n\x14supports_touch_input\x18\x05 \x01(\x08\"\xae\x01\n\x18\x43NegotiationSetConfigMsg\x12\"\n\x06\x63onfig\x18\x01 \x02(\x0b\x32\x12.CNegotiatedConfig\x12\x38\n\x17streaming_client_config\x18\x02 \x01(\x0b\x32\x17.CStreamingClientConfig\x12\x34\n\x15streaming_client_caps\x18\x03 \x01(\x0b\x32\x15.CStreamingClientCaps\"\x19\n\x17\x43NegotiationCompleteMsg\"\x9a\x01\n\x12\x43StartAudioDataMsg\x12\x0f\n\x07\x63hannel\x18\x02 \x02(\r\x12:\n\x05\x63odec\x18\x03 \x01(\x0e\x32\x12.EStreamAudioCodec:\x17k_EStreamAudioCodecNone\x12\x12\n\ncodec_data\x18\x04 \x01(\x0c\x12\x11\n\tfrequency\x18\x05 \x01(\r\x12\x10\n\x08\x63hannels\x18\x06 \x01(\r\"\x13\n\x11\x43StopAudioDataMsg\"\x94\x01\n\x12\x43StartVideoDataMsg\x12\x0f\n\x07\x63hannel\x18\x01 \x02(\r\x12:\n\x05\x63odec\x18\x02 \x01(\x0e\x32\x12.EStreamVideoCodec:\x17k_EStreamVideoCodecNone\x12\x12\n\ncodec_data\x18\x03 \x01(\x0c\x12\r\n\x05width\x18\x04 \x01(\r\x12\x0e\n\x06height\x18\x05 \x01(\r\"\x13\n\x11\x43StopVideoDataMsg\"\xc5\x04\n\x0e\x43RecordedInput\x12K\n\x04type\x18\x01 \x01(\x0e\x32\x16.EStreamControlMessage:%k_EStreamControlAuthenticationRequest\x12\x11\n\ttimestamp\x18\x02 \x01(\r\x12\x30\n\x0b\x66inger_down\x18\x03 \x01(\x0b\x32\x19.CInputTouchFingerDownMsgH\x00\x12\x34\n\rfinger_motion\x18\x04 \x01(\x0b\x32\x1b.CInputTouchFingerMotionMsgH\x00\x12,\n\tfinger_up\x18\x05 \x01(\x0b\x32\x17.CInputTouchFingerUpMsgH\x00\x12-\n\x0cmouse_motion\x18\x06 \x01(\x0b\x32\x15.CInputMouseMotionMsgH\x00\x12+\n\x0bmouse_wheel\x18\x07 \x01(\x0b\x32\x14.CInputMouseWheelMsgH\x00\x12)\n\nmouse_down\x18\x08 \x01(\x0b\x32\x13.CInputMouseDownMsgH\x00\x12%\n\x08mouse_up\x18\t \x01(\x0b\x32\x11.CInputMouseUpMsgH\x00\x12%\n\x08key_down\x18\n \x01(\x0b\x32\x11.CInputKeyDownMsgH\x00\x12!\n\x06key_up\x18\x0b \x01(\x0b\x32\x0f.CInputKeyUpMsgH\x00\x12\x1e\n\x04text\x18\x0c \x01(\x0b\x32\x0e.CInputTextMsgH\x00\x12\x1d\n\x03hid\x18\r \x01(\x0b\x32\x0e.CRemoteHIDMsgH\x00\x42\x06\n\x04\x64\x61ta\"8\n\x14\x43RecordedInputStream\x12 \n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x0f.CRecordedInput\"9\n\x14\x43InputLatencyTestMsg\x12\x12\n\ninput_mark\x18\x01 \x02(\r\x12\r\n\x05\x63olor\x18\x02 \x01(\r\"l\n\x18\x43InputTouchFingerDownMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x10\n\x08\x66ingerid\x18\x02 \x01(\x04\x12\x14\n\x0cx_normalized\x18\x03 \x01(\x02\x12\x14\n\x0cy_normalized\x18\x04 \x01(\x02\"n\n\x1a\x43InputTouchFingerMotionMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x10\n\x08\x66ingerid\x18\x02 \x01(\x04\x12\x14\n\x0cx_normalized\x18\x03 \x01(\x02\x12\x14\n\x0cy_normalized\x18\x04 \x01(\x02\"j\n\x16\x43InputTouchFingerUpMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x10\n\x08\x66ingerid\x18\x02 \x01(\x04\x12\x14\n\x0cx_normalized\x18\x03 \x01(\x02\x12\x14\n\x0cy_normalized\x18\x04 \x01(\x02\"n\n\x14\x43InputMouseMotionMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x14\n\x0cx_normalized\x18\x02 \x01(\x02\x12\x14\n\x0cy_normalized\x18\x03 \x01(\x02\x12\n\n\x02\x64x\x18\x04 \x01(\x05\x12\n\n\x02\x64y\x18\x05 \x01(\x05\"p\n\x13\x43InputMouseWheelMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x45\n\tdirection\x18\x02 \x02(\x0e\x32\x1b.EStreamMouseWheelDirection:\x15k_EStreamMouseWheelUp\"g\n\x12\x43InputMouseDownMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12=\n\x06\x62utton\x18\x02 \x02(\x0e\x32\x13.EStreamMouseButton:\x18k_EStreamMouseButtonLeft\"e\n\x10\x43InputMouseUpMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12=\n\x06\x62utton\x18\x02 \x02(\x0e\x32\x13.EStreamMouseButton:\x18k_EStreamMouseButtonLeft\"8\n\x10\x43InputKeyDownMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x10\n\x08scancode\x18\x02 \x02(\r\"6\n\x0e\x43InputKeyUpMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x10\n\x08scancode\x18\x02 \x02(\r\"6\n\rCInputTextMsg\x12\x12\n\ninput_mark\x18\x01 \x01(\r\x12\x11\n\ttext_utf8\x18\x02 \x02(\t\"\x1c\n\x0c\x43SetTitleMsg\x12\x0c\n\x04text\x18\x01 \x01(\t\"3\n\x12\x43SetCaptureSizeMsg\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\";\n\x0b\x43SetIconMsg\x12\r\n\x05width\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\r\n\x05image\x18\x03 \x01(\x0c\"E\n\x11\x43SetFlashStateMsg\x12\r\n\x05\x66lags\x18\x01 \x01(\r\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x12\n\ntimeout_ms\x18\x03 \x01(\r\"<\n\x0e\x43ShowCursorMsg\x12\x14\n\x0cx_normalized\x18\x01 \x01(\x02\x12\x14\n\x0cy_normalized\x18\x02 \x01(\x02\"\x10\n\x0e\x43HideCursorMsg\"\"\n\rCSetCursorMsg\x12\x11\n\tcursor_id\x18\x01 \x02(\x04\"\'\n\x12\x43GetCursorImageMsg\x12\x11\n\tcursor_id\x18\x01 \x02(\x04\"s\n\x12\x43SetCursorImageMsg\x12\x11\n\tcursor_id\x18\x01 \x02(\x04\x12\r\n\x05width\x18\x02 \x01(\x05\x12\x0e\n\x06height\x18\x03 \x01(\x05\x12\r\n\x05hot_x\x18\x04 \x01(\x05\x12\r\n\x05hot_y\x18\x05 \x01(\x05\x12\r\n\x05image\x18\x06 \x01(\x0c\"5\n\x14\x43VideoDecoderInfoMsg\x12\x0c\n\x04info\x18\x01 \x01(\t\x12\x0f\n\x07threads\x18\x02 \x01(\x05\"$\n\x14\x43VideoEncoderInfoMsg\x12\x0c\n\x04info\x18\x01 \x01(\t\"\x0b\n\tCPauseMsg\"\x0c\n\nCResumeMsg\"\x1a\n\x18\x43\x45nableHighResCaptureMsg\"\x1b\n\x19\x43\x44isableHighResCaptureMsg\"\x19\n\x17\x43ToggleMagnificationMsg\"\"\n\x0f\x43SetCapslockMsg\x12\x0f\n\x07pressed\x18\x01 \x01(\x08\"\x8c\x02\n\x15\x43StreamingKeymapEntry\x12\x10\n\x08scancode\x18\x01 \x01(\x05\x12\x16\n\x0enormal_keycode\x18\x02 \x01(\x05\x12\x15\n\rshift_keycode\x18\x03 \x01(\x05\x12\x18\n\x10\x63\x61pslock_keycode\x18\x04 \x01(\x05\x12\x1e\n\x16shift_capslock_keycode\x18\x05 \x01(\x05\x12\x15\n\raltgr_keycode\x18\x06 \x01(\x05\x12\x1b\n\x13\x61ltgr_shift_keycode\x18\x07 \x01(\x05\x12\x1e\n\x16\x61ltgr_capslock_keycode\x18\x08 \x01(\x05\x12$\n\x1c\x61ltgr_shift_capslock_keycode\x18\t \x01(\x05\";\n\x10\x43StreamingKeymap\x12\'\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x16.CStreamingKeymapEntry\"2\n\rCSetKeymapMsg\x12!\n\x06keymap\x18\x01 \x01(\x0b\x32\x11.CStreamingKeymap\"\x0e\n\x0c\x43StopRequest\"\x0e\n\x0c\x43QuitRequest\"%\n\x10\x43\x44\x65leteCursorMsg\x12\x11\n\tcursor_id\x18\x01 \x02(\x04\"D\n\x19\x43SetStreamingClientConfig\x12\'\n\x06\x63onfig\x18\x01 \x02(\x0b\x32\x17.CStreamingClientConfig\"\x1d\n\nCSetQoSMsg\x12\x0f\n\x07use_qos\x18\x01 \x02(\x08\"x\n\x16\x43SetTargetFramerateMsg\x12\x11\n\tframerate\x18\x01 \x02(\r\x12\x0f\n\x07reasons\x18\x02 \x01(\r\x12\x1b\n\x13\x66ramerate_numerator\x18\x03 \x01(\r\x12\x1d\n\x15\x66ramerate_denominator\x18\x04 \x01(\r\"\'\n\x14\x43SetTargetBitrateMsg\x12\x0f\n\x07\x62itrate\x18\x01 \x02(\x05\"%\n\x12\x43OverlayEnabledMsg\x12\x0f\n\x07\x65nabled\x18\x01 \x02(\x08\"&\n\x10\x43SetGammaRampMsg\x12\x12\n\ngamma_ramp\x18\x01 \x01(\x0c\"~\n\x0f\x43SetActivityMsg\x12\x39\n\x08\x61\x63tivity\x18\x01 \x01(\x0e\x32\x10.EStreamActivity:\x15k_EStreamActivityIdle\x12\r\n\x05\x61ppid\x18\x02 \x01(\r\x12\x0e\n\x06gameid\x18\x03 \x01(\x04\x12\x11\n\tgame_name\x18\x04 \x01(\t\"\x13\n\x11\x43SystemSuspendMsg\"*\n\x16\x43VirtualHereRequestMsg\x12\x10\n\x08hostname\x18\x01 \x01(\t\"5\n\x14\x43VirtualHereReadyMsg\x12\x1d\n\x15licensed_device_count\x18\x01 \x01(\r\"4\n\x1a\x43VirtualHereShareDeviceMsg\x12\x16\n\x0e\x64\x65vice_address\x18\x01 \x01(\t\"\'\n\x14\x43SetSpectatorModeMsg\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1d\n\rCRemoteHIDMsg\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"I\n\x15\x43TouchConfigActiveMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x10\n\x08revision\x18\x02 \x01(\r\x12\x0f\n\x07\x63reator\x18\x03 \x01(\x04\"\'\n\x16\x43GetTouchConfigDataMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\"h\n\x16\x43SetTouchConfigDataMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x10\n\x08revision\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\x12\x0e\n\x06layout\x18\x04 \x01(\x0c\x12\x0f\n\x07\x63reator\x18\x05 \x01(\x04\":\n\x19\x43SaveTouchConfigLayoutMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x0e\n\x06layout\x18\x04 \x01(\x0c\"?\n\x18\x43TouchActionSetActiveMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x14\n\x0c\x61\x63tionset_id\x18\x02 \x01(\x05\"C\n\x1c\x43TouchActionSetLayerAddedMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x14\n\x0c\x61\x63tionset_id\x18\x02 \x01(\x05\"E\n\x1e\x43TouchActionSetLayerRemovedMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x14\n\x0c\x61\x63tionset_id\x18\x02 \x01(\x05\"3\n\x14\x43GetTouchIconDataMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x0c\n\x04icon\x18\x02 \x01(\t\"A\n\x14\x43SetTouchIconDataMsg\x12\r\n\x05\x61ppid\x18\x01 \x01(\r\x12\x0c\n\x04icon\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xea\x02\n!CRemotePlayTogetherGroupUpdateMsg\x12:\n\x07players\x18\x01 \x03(\x0b\x32).CRemotePlayTogetherGroupUpdateMsg.Player\x12\x14\n\x0cplayer_index\x18\x02 \x01(\x05\x12\x1c\n\x14miniprofile_location\x18\x03 \x01(\t\x12\x11\n\tgame_name\x18\x04 \x01(\t\x12\x17\n\x0f\x61vatar_location\x18\x05 \x01(\t\x1a\xa8\x01\n\x06Player\x12\x11\n\taccountid\x18\x01 \x01(\r\x12\x0f\n\x07guestid\x18\x02 \x01(\r\x12\x18\n\x10keyboard_enabled\x18\x03 \x01(\x08\x12\x15\n\rmouse_enabled\x18\x04 \x01(\x08\x12\x1a\n\x12\x63ontroller_enabled\x18\x05 \x01(\x08\x12\x18\n\x10\x63ontroller_slots\x18\x06 \x03(\r\x12\x13\n\x0b\x61vatar_hash\x18\x07 \x01(\x0c\"3\n\x1f\x43SetInputTemporarilyDisabledMsg\x12\x10\n\x08\x64isabled\x18\x01 \x01(\x08\"\'\n\x16\x43SetQualityOverrideMsg\x12\r\n\x05value\x18\x01 \x01(\x05\"\'\n\x16\x43SetBitrateOverrideMsg\x12\r\n\x05value\x18\x01 \x01(\x05\"%\n\x12\x43StreamDataLostMsg\x12\x0f\n\x07packets\x18\x01 \x03(\r\"f\n\x0c\x43\x41udioFormat\x12\x31\n\x06\x66ormat\x18\x01 \x02(\x0e\x32\r.EAudioFormat:\x12k_EAudioFormatNone\x12\x11\n\tfrequency\x18\x02 \x01(\r\x12\x10\n\x08\x63hannels\x18\x03 \x01(\r\"`\n\x0c\x43VideoFormat\x12\x31\n\x06\x66ormat\x18\x01 \x02(\x0e\x32\r.EVideoFormat:\x12k_EVideoFormatNone\x12\r\n\x05width\x18\x02 \x01(\r\x12\x0e\n\x06height\x18\x03 \x01(\r\"`\n\x0b\x43\x46rameEvent\x12>\n\x08\x65vent_id\x18\x01 \x02(\x0e\x32\x12.EStreamFrameEvent:\x18k_EStreamInputEventStart\x12\x11\n\ttimestamp\x18\x02 \x02(\r\"\xcf\x02\n\x0b\x43\x46rameStats\x12\x10\n\x08\x66rame_id\x18\x01 \x02(\r\x12\x12\n\ninput_mark\x18\x02 \x01(\r\x12\x1c\n\x06\x65vents\x18\x03 \x03(\x0b\x32\x0c.CFrameEvent\x12@\n\x06result\x18\x04 \x02(\x0e\x32\x13.EStreamFrameResult:\x1bk_EStreamFrameResultPending\x12\x19\n\x11\x66rame_start_delta\x18\x05 \x01(\x02\x12\x1b\n\x13\x66rame_display_delta\x18\x06 \x01(\x02\x12\x11\n\tping_time\x18\x07 \x01(\x02\x12\x16\n\x0eserver_bitrate\x18\x08 \x01(\x02\x12\x16\n\x0e\x63lient_bitrate\x18\t \x01(\x02\x12\x16\n\x0elink_bandwidth\x18\n \x01(\x02\x12\x13\n\x0bpacket_loss\x18\x0b \x01(\x02\x12\x12\n\nframe_size\x18\x0c \x01(\r\"\x88\x01\n\x1a\x43\x46rameStatAccumulatedValue\x12:\n\tstat_type\x18\x01 \x02(\x0e\x32\x16.EFrameAccumulatedStat:\x0fk_EFrameStatFPS\x12\r\n\x05\x63ount\x18\x02 \x02(\x05\x12\x0f\n\x07\x61verage\x18\x03 \x02(\x02\x12\x0e\n\x06stddev\x18\x04 \x01(\x02\"\xc1\x01\n\x12\x43\x46rameStatsListMsg\x12=\n\tdata_type\x18\x01 \x02(\x0e\x32\x13.EStreamingDataType:\x15k_EStreamingAudioData\x12\x1b\n\x05stats\x18\x02 \x03(\x0b\x32\x0c.CFrameStats\x12\x36\n\x11\x61\x63\x63umulated_stats\x18\x03 \x03(\x0b\x32\x1b.CFrameStatAccumulatedValue\x12\x17\n\x0flatest_frame_id\x18\x04 \x02(\x05\"x\n\x16\x43StreamingSessionStats\x12\x1d\n\x15\x66rame_loss_percentage\x18\x01 \x01(\x02\x12\x1f\n\x17\x61verage_network_time_ms\x18\x02 \x01(\x02\x12\x1e\n\x16stddev_network_time_ms\x18\x03 \x01(\x02\"#\n\rCDebugDumpMsg\x12\x12\n\nscreenshot\x18\x01 \x01(\x0c\"(\n\x07\x43LogMsg\x12\x0c\n\x04type\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\"P\n\rCLogUploadMsg\x12\x31\n\x04type\x18\x01 \x01(\x0e\x32\r.ELogFileType:\x14k_ELogFileSystemBoot\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\xb3\x02\n\x13\x43TransportSignalMsg\x12\x32\n\x06webrtc\x18\x01 \x01(\x0b\x32\".CTransportSignalMsg.WebRTCMessage\x12\x0b\n\x03sdr\x18\x02 \x03(\x0c\x1a\xda\x01\n\rWebRTCMessage\x12\x12\n\x08greeting\x18\x01 \x01(\x08H\x00\x12\x0f\n\x05offer\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x61nswer\x18\x03 \x01(\tH\x00\x12\x41\n\tcandidate\x18\x04 \x01(\x0b\x32,.CTransportSignalMsg.WebRTCMessage.CandidateH\x00\x1aH\n\tCandidate\x12\x0f\n\x07sdp_mid\x18\x01 \x01(\t\x12\x17\n\x0fsdp_mline_index\x18\x02 \x01(\x05\x12\x11\n\tcandidate\x18\x03 \x01(\tB\x05\n\x03msg*\xb3\x01\n\x0e\x45StreamChannel\x12$\n\x17k_EStreamChannelInvalid\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x1d\n\x19k_EStreamChannelDiscovery\x10\x00\x12\x1b\n\x17k_EStreamChannelControl\x10\x01\x12\x19\n\x15k_EStreamChannelStats\x10\x02\x12$\n k_EStreamChannelDataChannelStart\x10\x03*`\n\x17\x45StreamDiscoveryMessage\x12!\n\x1dk_EStreamDiscoveryPingRequest\x10\x01\x12\"\n\x1ek_EStreamDiscoveryPingResponse\x10\x02*\xdb\x1b\n\x15\x45StreamControlMessage\x12)\n%k_EStreamControlAuthenticationRequest\x10\x01\x12*\n&k_EStreamControlAuthenticationResponse\x10\x02\x12#\n\x1fk_EStreamControlNegotiationInit\x10\x03\x12(\n$k_EStreamControlNegotiationSetConfig\x10\x04\x12\'\n#k_EStreamControlNegotiationComplete\x10\x05\x12#\n\x1fk_EStreamControlClientHandshake\x10\x06\x12#\n\x1fk_EStreamControlServerHandshake\x10\x07\x12$\n k_EStreamControlStartNetworkTest\x10\x08\x12\x1d\n\x19k_EStreamControlKeepAlive\x10\t\x12\'\n#k_EStreamControl_LAST_SETUP_MESSAGE\x10\x0f\x12\"\n\x1ek_EStreamControlStartAudioData\x10\x32\x12!\n\x1dk_EStreamControlStopAudioData\x10\x33\x12\"\n\x1ek_EStreamControlStartVideoData\x10\x34\x12!\n\x1dk_EStreamControlStopVideoData\x10\x35\x12$\n k_EStreamControlInputMouseMotion\x10\x36\x12#\n\x1fk_EStreamControlInputMouseWheel\x10\x37\x12\"\n\x1ek_EStreamControlInputMouseDown\x10\x38\x12 \n\x1ck_EStreamControlInputMouseUp\x10\x39\x12 \n\x1ck_EStreamControlInputKeyDown\x10:\x12\x1e\n\x1ak_EStreamControlInputKeyUp\x10;\x12\x31\n-k_EStreamControlInputGamepadAttached_OBSOLETE\x10<\x12.\n*k_EStreamControlInputGamepadEvent_OBSOLETE\x10=\x12\x31\n-k_EStreamControlInputGamepadDetached_OBSOLETE\x10>\x12\x1e\n\x1ak_EStreamControlShowCursor\x10?\x12\x1e\n\x1ak_EStreamControlHideCursor\x10@\x12\x1d\n\x19k_EStreamControlSetCursor\x10\x41\x12\"\n\x1ek_EStreamControlGetCursorImage\x10\x42\x12\"\n\x1ek_EStreamControlSetCursorImage\x10\x43\x12 \n\x1ck_EStreamControlDeleteCursor\x10\x44\x12&\n\"k_EStreamControlSetTargetFramerate\x10\x45\x12$\n k_EStreamControlInputLatencyTest\x10\x46\x12*\n&k_EStreamControlGamepadRumble_OBSOLETE\x10G\x12\"\n\x1ek_EStreamControlOverlayEnabled\x10J\x12\x34\n0k_EStreamControlInputControllerAttached_OBSOLETE\x10K\x12\x31\n-k_EStreamControlInputControllerState_OBSOLETE\x10L\x12/\n+k_EStreamControlTriggerHapticPulse_OBSOLETE\x10M\x12\x34\n0k_EStreamControlInputControllerDetached_OBSOLETE\x10N\x12$\n k_EStreamControlVideoDecoderInfo\x10P\x12\x1c\n\x18k_EStreamControlSetTitle\x10Q\x12\x1b\n\x17k_EStreamControlSetIcon\x10R\x12\x1f\n\x1bk_EStreamControlQuitRequest\x10S\x12\x1a\n\x16k_EStreamControlSetQoS\x10W\x12<\n8k_EStreamControlInputControllerWirelessPresence_OBSOLETE\x10X\x12 \n\x1ck_EStreamControlSetGammaRamp\x10Y\x12$\n k_EStreamControlVideoEncoderInfo\x10Z\x12\x34\n0k_EStreamControlInputControllerStateHID_OBSOLETE\x10]\x12$\n k_EStreamControlSetTargetBitrate\x10^\x12\x38\n4k_EStreamControlSetControllerPairingEnabled_OBSOLETE\x10_\x12\x37\n3k_EStreamControlSetControllerPairingResult_OBSOLETE\x10`\x12\x38\n4k_EStreamControlTriggerControllerDisconnect_OBSOLETE\x10\x61\x12\x1f\n\x1bk_EStreamControlSetActivity\x10\x62\x12,\n(k_EStreamControlSetStreamingClientConfig\x10\x63\x12!\n\x1dk_EStreamControlSystemSuspend\x10\x64\x12\x32\n.k_EStreamControlSetControllerSettings_OBSOLETE\x10\x65\x12&\n\"k_EStreamControlVirtualHereRequest\x10\x66\x12$\n k_EStreamControlVirtualHereReady\x10g\x12*\n&k_EStreamControlVirtualHereShareDevice\x10h\x12$\n k_EStreamControlSetSpectatorMode\x10i\x12\x1d\n\x19k_EStreamControlRemoteHID\x10j\x12\'\n#k_EStreamControlStartMicrophoneData\x10k\x12&\n\"k_EStreamControlStopMicrophoneData\x10l\x12\x1d\n\x19k_EStreamControlInputText\x10m\x12%\n!k_EStreamControlTouchConfigActive\x10n\x12&\n\"k_EStreamControlGetTouchConfigData\x10o\x12&\n\"k_EStreamControlSetTouchConfigData\x10p\x12)\n%k_EStreamControlSaveTouchConfigLayout\x10q\x12(\n$k_EStreamControlTouchActionSetActive\x10r\x12$\n k_EStreamControlGetTouchIconData\x10s\x12$\n k_EStreamControlSetTouchIconData\x10t\x12(\n$k_EStreamControlInputTouchFingerDown\x10u\x12*\n&k_EStreamControlInputTouchFingerMotion\x10v\x12&\n\"k_EStreamControlInputTouchFingerUp\x10w\x12\"\n\x1ek_EStreamControlSetCaptureSize\x10x\x12!\n\x1dk_EStreamControlSetFlashState\x10y\x12\x19\n\x15k_EStreamControlPause\x10z\x12\x1a\n\x16k_EStreamControlResume\x10{\x12(\n$k_EStreamControlEnableHighResCapture\x10|\x12)\n%k_EStreamControlDisableHighResCapture\x10}\x12\'\n#k_EStreamControlToggleMagnification\x10~\x12\x1f\n\x1bk_EStreamControlSetCapslock\x10\x7f\x12\x1e\n\x19k_EStreamControlSetKeymap\x10\x80\x01\x12 \n\x1bk_EStreamControlStopRequest\x10\x81\x01\x12-\n(k_EStreamControlTouchActionSetLayerAdded\x10\x82\x01\x12/\n*k_EStreamControlTouchActionSetLayerRemoved\x10\x83\x01\x12\x32\n-k_EStreamControlRemotePlayTogetherGroupUpdate\x10\x84\x01\x12\x30\n+k_EStreamControlSetInputTemporarilyDisabled\x10\x85\x01\x12\'\n\"k_EStreamControlSetQualityOverride\x10\x86\x01\x12\'\n\"k_EStreamControlSetBitrateOverride\x10\x87\x01*G\n\x0e\x45StreamVersion\x12\x18\n\x14k_EStreamVersionNone\x10\x00\x12\x1b\n\x17k_EStreamVersionCurrent\x10\x01*\xc0\x01\n\x11\x45StreamAudioCodec\x12\x1b\n\x17k_EStreamAudioCodecNone\x10\x00\x12\x1a\n\x16k_EStreamAudioCodecRaw\x10\x01\x12\x1d\n\x19k_EStreamAudioCodecVorbis\x10\x02\x12\x1b\n\x17k_EStreamAudioCodecOpus\x10\x03\x12\x1a\n\x16k_EStreamAudioCodecMP3\x10\x04\x12\x1a\n\x16k_EStreamAudioCodecAAC\x10\x05*\xfa\x01\n\x11\x45StreamVideoCodec\x12\x1b\n\x17k_EStreamVideoCodecNone\x10\x00\x12\x1a\n\x16k_EStreamVideoCodecRaw\x10\x01\x12\x1a\n\x16k_EStreamVideoCodecVP8\x10\x02\x12\x1a\n\x16k_EStreamVideoCodecVP9\x10\x03\x12\x1b\n\x17k_EStreamVideoCodecH264\x10\x04\x12\x1b\n\x17k_EStreamVideoCodecHEVC\x10\x05\x12\x1c\n\x18k_EStreamVideoCodecORBX1\x10\x06\x12\x1c\n\x18k_EStreamVideoCodecORBX2\x10\x07*\x99\x01\n\x18\x45StreamQualityPreference\x12&\n\x19k_EStreamQualityAutomatic\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x18\n\x14k_EStreamQualityFast\x10\x01\x12\x1c\n\x18k_EStreamQualityBalanced\x10\x02\x12\x1d\n\x19k_EStreamQualityBeautiful\x10\x03*X\n\x0e\x45StreamBitrate\x12\'\n\x1ak_EStreamBitrateAutodetect\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x1d\n\x19k_EStreamBitrateUnlimited\x10\x00*\xaa\x01\n\x0f\x45StreamP2PScope\x12\x1e\n\x1ak_EStreamP2PScopeAutomatic\x10\x00\x12\x1d\n\x19k_EStreamP2PScopeDisabled\x10\x01\x12\x1b\n\x17k_EStreamP2PScopeOnlyMe\x10\x02\x12\x1c\n\x18k_EStreamP2PScopeFriends\x10\x03\x12\x1d\n\x19k_EStreamP2PScopeEveryone\x10\x04*e\n\x1e\x45StreamHostPlayAudioPreference\x12!\n\x1dk_EStreamHostPlayAudioDefault\x10\x00\x12 \n\x1ck_EStreamHostPlayAudioAlways\x10\x01*j\n\x12\x45StreamingDataType\x12\x19\n\x15k_EStreamingAudioData\x10\x00\x12\x19\n\x15k_EStreamingVideoData\x10\x01\x12\x1e\n\x1ak_EStreamingMicrophoneData\x10\x02*\xcb\x01\n\x12\x45StreamMouseButton\x12\x1c\n\x18k_EStreamMouseButtonLeft\x10\x01\x12\x1d\n\x19k_EStreamMouseButtonRight\x10\x02\x12\x1e\n\x1ak_EStreamMouseButtonMiddle\x10\x10\x12\x1a\n\x16k_EStreamMouseButtonX1\x10 \x12\x1a\n\x16k_EStreamMouseButtonX2\x10@\x12 \n\x1bk_EStreamMouseButtonUnknown\x10\x80 *\x98\x01\n\x1a\x45StreamMouseWheelDirection\x12\x19\n\x15k_EStreamMouseWheelUp\x10x\x12$\n\x17k_EStreamMouseWheelDown\x10\x88\xff\xff\xff\xff\xff\xff\xff\xff\x01\x12\x1b\n\x17k_EStreamMouseWheelLeft\x10\x03\x12\x1c\n\x18k_EStreamMouseWheelRight\x10\x04*\x89\x02\n\x17\x45StreamFramerateLimiter\x12!\n\x1dk_EStreamFramerateSlowCapture\x10\x01\x12!\n\x1dk_EStreamFramerateSlowConvert\x10\x02\x12 \n\x1ck_EStreamFramerateSlowEncode\x10\x04\x12!\n\x1dk_EStreamFramerateSlowNetwork\x10\x08\x12 \n\x1ck_EStreamFramerateSlowDecode\x10\x10\x12\x1e\n\x1ak_EStreamFramerateSlowGame\x10 \x12!\n\x1dk_EStreamFramerateSlowDisplay\x10@*\xa5\x01\n\x0f\x45StreamActivity\x12\x19\n\x15k_EStreamActivityIdle\x10\x01\x12\x19\n\x15k_EStreamActivityGame\x10\x02\x12\x1c\n\x18k_EStreamActivityDesktop\x10\x03\x12\"\n\x1ek_EStreamActivitySecureDesktop\x10\x04\x12\x1a\n\x16k_EStreamActivityMusic\x10\x05*D\n\x12\x45StreamDataMessage\x12\x17\n\x13k_EStreamDataPacket\x10\x01\x12\x15\n\x11k_EStreamDataLost\x10\x02*d\n\x0c\x45\x41udioFormat\x12\x16\n\x12k_EAudioFormatNone\x10\x00\x12#\n\x1fk_EAudioFormat16BitLittleEndian\x10\x01\x12\x17\n\x13k_EAudioFormatFloat\x10\x02*W\n\x0c\x45VideoFormat\x12\x16\n\x12k_EVideoFormatNone\x10\x00\x12\x16\n\x12k_EVideoFormatYV12\x10\x01\x12\x17\n\x13k_EVideoFormatAccel\x10\x02*\xd7\x01\n\x13\x45StreamStatsMessage\x12\x1d\n\x19k_EStreamStatsFrameEvents\x10\x01\x12\x1b\n\x17k_EStreamStatsDebugDump\x10\x02\x12\x1c\n\x18k_EStreamStatsLogMessage\x10\x03\x12 \n\x1ck_EStreamStatsLogUploadBegin\x10\x04\x12\x1f\n\x1bk_EStreamStatsLogUploadData\x10\x05\x12#\n\x1fk_EStreamStatsLogUploadComplete\x10\x06*\x85\x05\n\x11\x45StreamFrameEvent\x12\x1c\n\x18k_EStreamInputEventStart\x10\x00\x12\x1b\n\x17k_EStreamInputEventSend\x10\x01\x12\x1b\n\x17k_EStreamInputEventRecv\x10\x02\x12\x1d\n\x19k_EStreamInputEventQueued\x10\x03\x12\x1e\n\x1ak_EStreamInputEventHandled\x10\x04\x12\x1c\n\x18k_EStreamFrameEventStart\x10\x05\x12#\n\x1fk_EStreamFrameEventCaptureBegin\x10\x06\x12!\n\x1dk_EStreamFrameEventCaptureEnd\x10\x07\x12#\n\x1fk_EStreamFrameEventConvertBegin\x10\x08\x12!\n\x1dk_EStreamFrameEventConvertEnd\x10\t\x12\"\n\x1ek_EStreamFrameEventEncodeBegin\x10\n\x12 \n\x1ck_EStreamFrameEventEncodeEnd\x10\x0b\x12\x1b\n\x17k_EStreamFrameEventSend\x10\x0c\x12\x1b\n\x17k_EStreamFrameEventRecv\x10\r\x12\"\n\x1ek_EStreamFrameEventDecodeBegin\x10\x0e\x12 \n\x1ck_EStreamFrameEventDecodeEnd\x10\x0f\x12\"\n\x1ek_EStreamFrameEventUploadBegin\x10\x10\x12 \n\x1ck_EStreamFrameEventUploadEnd\x10\x11\x12\x1f\n\x1bk_EStreamFrameEventComplete\x10\x12*\xd4\x02\n\x12\x45StreamFrameResult\x12\x1f\n\x1bk_EStreamFrameResultPending\x10\x00\x12!\n\x1dk_EStreamFrameResultDisplayed\x10\x01\x12*\n&k_EStreamFrameResultDroppedNetworkSlow\x10\x02\x12*\n&k_EStreamFrameResultDroppedNetworkLost\x10\x03\x12)\n%k_EStreamFrameResultDroppedDecodeSlow\x10\x04\x12,\n(k_EStreamFrameResultDroppedDecodeCorrupt\x10\x05\x12#\n\x1fk_EStreamFrameResultDroppedLate\x10\x06\x12$\n k_EStreamFrameResultDroppedReset\x10\x07*\xa2\x05\n\x15\x45\x46rameAccumulatedStat\x12\x13\n\x0fk_EFrameStatFPS\x10\x00\x12!\n\x1dk_EFrameStatCaptureDurationMS\x10\x01\x12!\n\x1dk_EFrameStatConvertDurationMS\x10\x02\x12 \n\x1ck_EFrameStatEncodeDurationMS\x10\x03\x12\x1f\n\x1bk_EFrameStatSteamDurationMS\x10\x04\x12 \n\x1ck_EFrameStatServerDurationMS\x10\x05\x12!\n\x1dk_EFrameStatNetworkDurationMS\x10\x06\x12 \n\x1ck_EFrameStatDecodeDurationMS\x10\x07\x12!\n\x1dk_EFrameStatDisplayDurationMS\x10\x08\x12 \n\x1ck_EFrameStatClientDurationMS\x10\t\x12\x1f\n\x1bk_EFrameStatFrameDurationMS\x10\n\x12\x1e\n\x1ak_EFrameStatInputLatencyMS\x10\x0b\x12\x1d\n\x19k_EFrameStatGameLatencyMS\x10\x0c\x12\"\n\x1ek_EFrameStatRoundTripLatencyMS\x10\r\x12\x1a\n\x16k_EFrameStatPingTimeMS\x10\x0e\x12\'\n#k_EFrameStatServerBitrateKbitPerSec\x10\x0f\x12\'\n#k_EFrameStatClientBitrateKbitPerSec\x10\x10\x12\'\n#k_EFrameStatLinkBandwidthKbitPerSec\x10\x11\x12$\n k_EFrameStatPacketLossPercentage\x10\x12*^\n\x0c\x45LogFileType\x12\x18\n\x14k_ELogFileSystemBoot\x10\x00\x12\x19\n\x15k_ELogFileSystemReset\x10\x01\x12\x19\n\x15k_ELogFileSystemDebug\x10\x02\x42\x05H\x01\x90\x01\x00')
)
_ESTREAMCHANNEL = _descriptor.EnumDescriptor(
name='EStreamChannel',
full_name='EStreamChannel',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamChannelInvalid', index=0, number=-1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamChannelDiscovery', index=1, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamChannelControl', index=2, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamChannelStats', index=3, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamChannelDataChannelStart', index=4, number=3,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=9892,
serialized_end=10071,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMCHANNEL)
EStreamChannel = enum_type_wrapper.EnumTypeWrapper(_ESTREAMCHANNEL)
_ESTREAMDISCOVERYMESSAGE = _descriptor.EnumDescriptor(
name='EStreamDiscoveryMessage',
full_name='EStreamDiscoveryMessage',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamDiscoveryPingRequest', index=0, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamDiscoveryPingResponse', index=1, number=2,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=10073,
serialized_end=10169,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMDISCOVERYMESSAGE)
EStreamDiscoveryMessage = enum_type_wrapper.EnumTypeWrapper(_ESTREAMDISCOVERYMESSAGE)
_ESTREAMCONTROLMESSAGE = _descriptor.EnumDescriptor(
name='EStreamControlMessage',
full_name='EStreamControlMessage',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamControlAuthenticationRequest', index=0, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlAuthenticationResponse', index=1, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlNegotiationInit', index=2, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlNegotiationSetConfig', index=3, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlNegotiationComplete', index=4, number=5,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlClientHandshake', index=5, number=6,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlServerHandshake', index=6, number=7,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStartNetworkTest', index=7, number=8,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlKeepAlive', index=8, number=9,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControl_LAST_SETUP_MESSAGE', index=9, number=15,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStartAudioData', index=10, number=50,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStopAudioData', index=11, number=51,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStartVideoData', index=12, number=52,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStopVideoData', index=13, number=53,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputMouseMotion', index=14, number=54,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputMouseWheel', index=15, number=55,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputMouseDown', index=16, number=56,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputMouseUp', index=17, number=57,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputKeyDown', index=18, number=58,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputKeyUp', index=19, number=59,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputGamepadAttached_OBSOLETE', index=20, number=60,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputGamepadEvent_OBSOLETE', index=21, number=61,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputGamepadDetached_OBSOLETE', index=22, number=62,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlShowCursor', index=23, number=63,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlHideCursor', index=24, number=64,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetCursor', index=25, number=65,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlGetCursorImage', index=26, number=66,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetCursorImage', index=27, number=67,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlDeleteCursor', index=28, number=68,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetTargetFramerate', index=29, number=69,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputLatencyTest', index=30, number=70,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlGamepadRumble_OBSOLETE', index=31, number=71,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlOverlayEnabled', index=32, number=74,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputControllerAttached_OBSOLETE', index=33, number=75,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputControllerState_OBSOLETE', index=34, number=76,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlTriggerHapticPulse_OBSOLETE', index=35, number=77,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputControllerDetached_OBSOLETE', index=36, number=78,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlVideoDecoderInfo', index=37, number=80,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetTitle', index=38, number=81,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetIcon', index=39, number=82,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlQuitRequest', index=40, number=83,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetQoS', index=41, number=87,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputControllerWirelessPresence_OBSOLETE', index=42, number=88,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetGammaRamp', index=43, number=89,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlVideoEncoderInfo', index=44, number=90,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputControllerStateHID_OBSOLETE', index=45, number=93,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetTargetBitrate', index=46, number=94,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetControllerPairingEnabled_OBSOLETE', index=47, number=95,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetControllerPairingResult_OBSOLETE', index=48, number=96,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlTriggerControllerDisconnect_OBSOLETE', index=49, number=97,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetActivity', index=50, number=98,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetStreamingClientConfig', index=51, number=99,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSystemSuspend', index=52, number=100,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetControllerSettings_OBSOLETE', index=53, number=101,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlVirtualHereRequest', index=54, number=102,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlVirtualHereReady', index=55, number=103,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlVirtualHereShareDevice', index=56, number=104,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetSpectatorMode', index=57, number=105,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlRemoteHID', index=58, number=106,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStartMicrophoneData', index=59, number=107,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStopMicrophoneData', index=60, number=108,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputText', index=61, number=109,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlTouchConfigActive', index=62, number=110,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlGetTouchConfigData', index=63, number=111,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetTouchConfigData', index=64, number=112,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSaveTouchConfigLayout', index=65, number=113,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlTouchActionSetActive', index=66, number=114,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlGetTouchIconData', index=67, number=115,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetTouchIconData', index=68, number=116,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputTouchFingerDown', index=69, number=117,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputTouchFingerMotion', index=70, number=118,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlInputTouchFingerUp', index=71, number=119,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetCaptureSize', index=72, number=120,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetFlashState', index=73, number=121,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlPause', index=74, number=122,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlResume', index=75, number=123,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlEnableHighResCapture', index=76, number=124,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlDisableHighResCapture', index=77, number=125,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlToggleMagnification', index=78, number=126,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetCapslock', index=79, number=127,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetKeymap', index=80, number=128,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlStopRequest', index=81, number=129,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlTouchActionSetLayerAdded', index=82, number=130,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlTouchActionSetLayerRemoved', index=83, number=131,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlRemotePlayTogetherGroupUpdate', index=84, number=132,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetInputTemporarilyDisabled', index=85, number=133,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetQualityOverride', index=86, number=134,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamControlSetBitrateOverride', index=87, number=135,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=10172,
serialized_end=13719,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMCONTROLMESSAGE)
EStreamControlMessage = enum_type_wrapper.EnumTypeWrapper(_ESTREAMCONTROLMESSAGE)
_ESTREAMVERSION = _descriptor.EnumDescriptor(
name='EStreamVersion',
full_name='EStreamVersion',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamVersionNone', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVersionCurrent', index=1, number=1,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=13721,
serialized_end=13792,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMVERSION)
EStreamVersion = enum_type_wrapper.EnumTypeWrapper(_ESTREAMVERSION)
_ESTREAMAUDIOCODEC = _descriptor.EnumDescriptor(
name='EStreamAudioCodec',
full_name='EStreamAudioCodec',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamAudioCodecNone', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamAudioCodecRaw', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamAudioCodecVorbis', index=2, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamAudioCodecOpus', index=3, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamAudioCodecMP3', index=4, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamAudioCodecAAC', index=5, number=5,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=13795,
serialized_end=13987,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMAUDIOCODEC)
EStreamAudioCodec = enum_type_wrapper.EnumTypeWrapper(_ESTREAMAUDIOCODEC)
_ESTREAMVIDEOCODEC = _descriptor.EnumDescriptor(
name='EStreamVideoCodec',
full_name='EStreamVideoCodec',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecNone', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecRaw', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecVP8', index=2, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecVP9', index=3, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecH264', index=4, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecHEVC', index=5, number=5,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecORBX1', index=6, number=6,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamVideoCodecORBX2', index=7, number=7,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=13990,
serialized_end=14240,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMVIDEOCODEC)
EStreamVideoCodec = enum_type_wrapper.EnumTypeWrapper(_ESTREAMVIDEOCODEC)
_ESTREAMQUALITYPREFERENCE = _descriptor.EnumDescriptor(
name='EStreamQualityPreference',
full_name='EStreamQualityPreference',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamQualityAutomatic', index=0, number=-1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamQualityFast', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamQualityBalanced', index=2, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamQualityBeautiful', index=3, number=3,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=14243,
serialized_end=14396,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMQUALITYPREFERENCE)
EStreamQualityPreference = enum_type_wrapper.EnumTypeWrapper(_ESTREAMQUALITYPREFERENCE)
_ESTREAMBITRATE = _descriptor.EnumDescriptor(
name='EStreamBitrate',
full_name='EStreamBitrate',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamBitrateAutodetect', index=0, number=-1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamBitrateUnlimited', index=1, number=0,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=14398,
serialized_end=14486,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMBITRATE)
EStreamBitrate = enum_type_wrapper.EnumTypeWrapper(_ESTREAMBITRATE)
_ESTREAMP2PSCOPE = _descriptor.EnumDescriptor(
name='EStreamP2PScope',
full_name='EStreamP2PScope',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamP2PScopeAutomatic', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamP2PScopeDisabled', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamP2PScopeOnlyMe', index=2, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamP2PScopeFriends', index=3, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamP2PScopeEveryone', index=4, number=4,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=14489,
serialized_end=14659,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMP2PSCOPE)
EStreamP2PScope = enum_type_wrapper.EnumTypeWrapper(_ESTREAMP2PSCOPE)
_ESTREAMHOSTPLAYAUDIOPREFERENCE = _descriptor.EnumDescriptor(
name='EStreamHostPlayAudioPreference',
full_name='EStreamHostPlayAudioPreference',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamHostPlayAudioDefault', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamHostPlayAudioAlways', index=1, number=1,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=14661,
serialized_end=14762,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMHOSTPLAYAUDIOPREFERENCE)
EStreamHostPlayAudioPreference = enum_type_wrapper.EnumTypeWrapper(_ESTREAMHOSTPLAYAUDIOPREFERENCE)
_ESTREAMINGDATATYPE = _descriptor.EnumDescriptor(
name='EStreamingDataType',
full_name='EStreamingDataType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamingAudioData', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamingVideoData', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamingMicrophoneData', index=2, number=2,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=14764,
serialized_end=14870,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMINGDATATYPE)
EStreamingDataType = enum_type_wrapper.EnumTypeWrapper(_ESTREAMINGDATATYPE)
_ESTREAMMOUSEBUTTON = _descriptor.EnumDescriptor(
name='EStreamMouseButton',
full_name='EStreamMouseButton',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseButtonLeft', index=0, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseButtonRight', index=1, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseButtonMiddle', index=2, number=16,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseButtonX1', index=3, number=32,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseButtonX2', index=4, number=64,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseButtonUnknown', index=5, number=4096,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=14873,
serialized_end=15076,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMMOUSEBUTTON)
EStreamMouseButton = enum_type_wrapper.EnumTypeWrapper(_ESTREAMMOUSEBUTTON)
_ESTREAMMOUSEWHEELDIRECTION = _descriptor.EnumDescriptor(
name='EStreamMouseWheelDirection',
full_name='EStreamMouseWheelDirection',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseWheelUp', index=0, number=120,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseWheelDown', index=1, number=-120,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseWheelLeft', index=2, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamMouseWheelRight', index=3, number=4,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=15079,
serialized_end=15231,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMMOUSEWHEELDIRECTION)
EStreamMouseWheelDirection = enum_type_wrapper.EnumTypeWrapper(_ESTREAMMOUSEWHEELDIRECTION)
_ESTREAMFRAMERATELIMITER = _descriptor.EnumDescriptor(
name='EStreamFramerateLimiter',
full_name='EStreamFramerateLimiter',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamFramerateSlowCapture', index=0, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFramerateSlowConvert', index=1, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFramerateSlowEncode', index=2, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFramerateSlowNetwork', index=3, number=8,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFramerateSlowDecode', index=4, number=16,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFramerateSlowGame', index=5, number=32,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFramerateSlowDisplay', index=6, number=64,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=15234,
serialized_end=15499,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMFRAMERATELIMITER)
EStreamFramerateLimiter = enum_type_wrapper.EnumTypeWrapper(_ESTREAMFRAMERATELIMITER)
_ESTREAMACTIVITY = _descriptor.EnumDescriptor(
name='EStreamActivity',
full_name='EStreamActivity',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamActivityIdle', index=0, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamActivityGame', index=1, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamActivityDesktop', index=2, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamActivitySecureDesktop', index=3, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamActivityMusic', index=4, number=5,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=15502,
serialized_end=15667,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMACTIVITY)
EStreamActivity = enum_type_wrapper.EnumTypeWrapper(_ESTREAMACTIVITY)
_ESTREAMDATAMESSAGE = _descriptor.EnumDescriptor(
name='EStreamDataMessage',
full_name='EStreamDataMessage',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamDataPacket', index=0, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamDataLost', index=1, number=2,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=15669,
serialized_end=15737,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMDATAMESSAGE)
EStreamDataMessage = enum_type_wrapper.EnumTypeWrapper(_ESTREAMDATAMESSAGE)
_EAUDIOFORMAT = _descriptor.EnumDescriptor(
name='EAudioFormat',
full_name='EAudioFormat',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EAudioFormatNone', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EAudioFormat16BitLittleEndian', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EAudioFormatFloat', index=2, number=2,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=15739,
serialized_end=15839,
)
_sym_db.RegisterEnumDescriptor(_EAUDIOFORMAT)
EAudioFormat = enum_type_wrapper.EnumTypeWrapper(_EAUDIOFORMAT)
_EVIDEOFORMAT = _descriptor.EnumDescriptor(
name='EVideoFormat',
full_name='EVideoFormat',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EVideoFormatNone', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EVideoFormatYV12', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EVideoFormatAccel', index=2, number=2,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=15841,
serialized_end=15928,
)
_sym_db.RegisterEnumDescriptor(_EVIDEOFORMAT)
EVideoFormat = enum_type_wrapper.EnumTypeWrapper(_EVIDEOFORMAT)
_ESTREAMSTATSMESSAGE = _descriptor.EnumDescriptor(
name='EStreamStatsMessage',
full_name='EStreamStatsMessage',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamStatsFrameEvents', index=0, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamStatsDebugDump', index=1, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamStatsLogMessage', index=2, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamStatsLogUploadBegin', index=3, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamStatsLogUploadData', index=4, number=5,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamStatsLogUploadComplete', index=5, number=6,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=15931,
serialized_end=16146,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMSTATSMESSAGE)
EStreamStatsMessage = enum_type_wrapper.EnumTypeWrapper(_ESTREAMSTATSMESSAGE)
_ESTREAMFRAMEEVENT = _descriptor.EnumDescriptor(
name='EStreamFrameEvent',
full_name='EStreamFrameEvent',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamInputEventStart', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamInputEventSend', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamInputEventRecv', index=2, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamInputEventQueued', index=3, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamInputEventHandled', index=4, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventStart', index=5, number=5,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventCaptureBegin', index=6, number=6,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventCaptureEnd', index=7, number=7,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventConvertBegin', index=8, number=8,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventConvertEnd', index=9, number=9,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventEncodeBegin', index=10, number=10,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventEncodeEnd', index=11, number=11,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventSend', index=12, number=12,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventRecv', index=13, number=13,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventDecodeBegin', index=14, number=14,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventDecodeEnd', index=15, number=15,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventUploadBegin', index=16, number=16,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventUploadEnd', index=17, number=17,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameEventComplete', index=18, number=18,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=16149,
serialized_end=16794,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMFRAMEEVENT)
EStreamFrameEvent = enum_type_wrapper.EnumTypeWrapper(_ESTREAMFRAMEEVENT)
_ESTREAMFRAMERESULT = _descriptor.EnumDescriptor(
name='EStreamFrameResult',
full_name='EStreamFrameResult',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultPending', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultDisplayed', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultDroppedNetworkSlow', index=2, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultDroppedNetworkLost', index=3, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultDroppedDecodeSlow', index=4, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultDroppedDecodeCorrupt', index=5, number=5,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultDroppedLate', index=6, number=6,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EStreamFrameResultDroppedReset', index=7, number=7,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=16797,
serialized_end=17137,
)
_sym_db.RegisterEnumDescriptor(_ESTREAMFRAMERESULT)
EStreamFrameResult = enum_type_wrapper.EnumTypeWrapper(_ESTREAMFRAMERESULT)
_EFRAMEACCUMULATEDSTAT = _descriptor.EnumDescriptor(
name='EFrameAccumulatedStat',
full_name='EFrameAccumulatedStat',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_EFrameStatFPS', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatCaptureDurationMS', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatConvertDurationMS', index=2, number=2,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatEncodeDurationMS', index=3, number=3,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatSteamDurationMS', index=4, number=4,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatServerDurationMS', index=5, number=5,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatNetworkDurationMS', index=6, number=6,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatDecodeDurationMS', index=7, number=7,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatDisplayDurationMS', index=8, number=8,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatClientDurationMS', index=9, number=9,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatFrameDurationMS', index=10, number=10,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatInputLatencyMS', index=11, number=11,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatGameLatencyMS', index=12, number=12,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatRoundTripLatencyMS', index=13, number=13,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatPingTimeMS', index=14, number=14,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatServerBitrateKbitPerSec', index=15, number=15,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatClientBitrateKbitPerSec', index=16, number=16,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatLinkBandwidthKbitPerSec', index=17, number=17,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_EFrameStatPacketLossPercentage', index=18, number=18,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=17140,
serialized_end=17814,
)
_sym_db.RegisterEnumDescriptor(_EFRAMEACCUMULATEDSTAT)
EFrameAccumulatedStat = enum_type_wrapper.EnumTypeWrapper(_EFRAMEACCUMULATEDSTAT)
_ELOGFILETYPE = _descriptor.EnumDescriptor(
name='ELogFileType',
full_name='ELogFileType',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='k_ELogFileSystemBoot', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_ELogFileSystemReset', index=1, number=1,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='k_ELogFileSystemDebug', index=2, number=2,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=17816,
serialized_end=17910,
)
_sym_db.RegisterEnumDescriptor(_ELOGFILETYPE)
ELogFileType = enum_type_wrapper.EnumTypeWrapper(_ELOGFILETYPE)
k_EStreamChannelInvalid = -1
k_EStreamChannelDiscovery = 0
k_EStreamChannelControl = 1
k_EStreamChannelStats = 2
k_EStreamChannelDataChannelStart = 3
k_EStreamDiscoveryPingRequest = 1
k_EStreamDiscoveryPingResponse = 2
k_EStreamControlAuthenticationRequest = 1
k_EStreamControlAuthenticationResponse = 2
k_EStreamControlNegotiationInit = 3
k_EStreamControlNegotiationSetConfig = 4
k_EStreamControlNegotiationComplete = 5
k_EStreamControlClientHandshake = 6
k_EStreamControlServerHandshake = 7
k_EStreamControlStartNetworkTest = 8
k_EStreamControlKeepAlive = 9
k_EStreamControl_LAST_SETUP_MESSAGE = 15
k_EStreamControlStartAudioData = 50
k_EStreamControlStopAudioData = 51
k_EStreamControlStartVideoData = 52
k_EStreamControlStopVideoData = 53
k_EStreamControlInputMouseMotion = 54
k_EStreamControlInputMouseWheel = 55
k_EStreamControlInputMouseDown = 56
k_EStreamControlInputMouseUp = 57
k_EStreamControlInputKeyDown = 58
k_EStreamControlInputKeyUp = 59
k_EStreamControlInputGamepadAttached_OBSOLETE = 60
k_EStreamControlInputGamepadEvent_OBSOLETE = 61
k_EStreamControlInputGamepadDetached_OBSOLETE = 62
k_EStreamControlShowCursor = 63
k_EStreamControlHideCursor = 64
k_EStreamControlSetCursor = 65
k_EStreamControlGetCursorImage = 66
k_EStreamControlSetCursorImage = 67
k_EStreamControlDeleteCursor = 68
k_EStreamControlSetTargetFramerate = 69
k_EStreamControlInputLatencyTest = 70
k_EStreamControlGamepadRumble_OBSOLETE = 71
k_EStreamControlOverlayEnabled = 74
k_EStreamControlInputControllerAttached_OBSOLETE = 75
k_EStreamControlInputControllerState_OBSOLETE = 76
k_EStreamControlTriggerHapticPulse_OBSOLETE = 77
k_EStreamControlInputControllerDetached_OBSOLETE = 78
k_EStreamControlVideoDecoderInfo = 80
k_EStreamControlSetTitle = 81
k_EStreamControlSetIcon = 82
k_EStreamControlQuitRequest = 83
k_EStreamControlSetQoS = 87
k_EStreamControlInputControllerWirelessPresence_OBSOLETE = 88
k_EStreamControlSetGammaRamp = 89
k_EStreamControlVideoEncoderInfo = 90
k_EStreamControlInputControllerStateHID_OBSOLETE = 93
k_EStreamControlSetTargetBitrate = 94
k_EStreamControlSetControllerPairingEnabled_OBSOLETE = 95
k_EStreamControlSetControllerPairingResult_OBSOLETE = 96
k_EStreamControlTriggerControllerDisconnect_OBSOLETE = 97
k_EStreamControlSetActivity = 98
k_EStreamControlSetStreamingClientConfig = 99
k_EStreamControlSystemSuspend = 100
k_EStreamControlSetControllerSettings_OBSOLETE = 101
k_EStreamControlVirtualHereRequest = 102
k_EStreamControlVirtualHereReady = 103
k_EStreamControlVirtualHereShareDevice = 104
k_EStreamControlSetSpectatorMode = 105
k_EStreamControlRemoteHID = 106
k_EStreamControlStartMicrophoneData = 107
k_EStreamControlStopMicrophoneData = 108
k_EStreamControlInputText = 109
k_EStreamControlTouchConfigActive = 110
k_EStreamControlGetTouchConfigData = 111
k_EStreamControlSetTouchConfigData = 112
k_EStreamControlSaveTouchConfigLayout = 113
k_EStreamControlTouchActionSetActive = 114
k_EStreamControlGetTouchIconData = 115
k_EStreamControlSetTouchIconData = 116
k_EStreamControlInputTouchFingerDown = 117
k_EStreamControlInputTouchFingerMotion = 118
k_EStreamControlInputTouchFingerUp = 119
k_EStreamControlSetCaptureSize = 120
k_EStreamControlSetFlashState = 121
k_EStreamControlPause = 122
k_EStreamControlResume = 123
k_EStreamControlEnableHighResCapture = 124
k_EStreamControlDisableHighResCapture = 125
k_EStreamControlToggleMagnification = 126
k_EStreamControlSetCapslock = 127
k_EStreamControlSetKeymap = 128
k_EStreamControlStopRequest = 129
k_EStreamControlTouchActionSetLayerAdded = 130
k_EStreamControlTouchActionSetLayerRemoved = 131
k_EStreamControlRemotePlayTogetherGroupUpdate = 132
k_EStreamControlSetInputTemporarilyDisabled = 133
k_EStreamControlSetQualityOverride = 134
k_EStreamControlSetBitrateOverride = 135
k_EStreamVersionNone = 0
k_EStreamVersionCurrent = 1
k_EStreamAudioCodecNone = 0
k_EStreamAudioCodecRaw = 1
k_EStreamAudioCodecVorbis = 2
k_EStreamAudioCodecOpus = 3
k_EStreamAudioCodecMP3 = 4
k_EStreamAudioCodecAAC = 5
k_EStreamVideoCodecNone = 0
k_EStreamVideoCodecRaw = 1
k_EStreamVideoCodecVP8 = 2
k_EStreamVideoCodecVP9 = 3
k_EStreamVideoCodecH264 = 4
k_EStreamVideoCodecHEVC = 5
k_EStreamVideoCodecORBX1 = 6
k_EStreamVideoCodecORBX2 = 7
k_EStreamQualityAutomatic = -1
k_EStreamQualityFast = 1
k_EStreamQualityBalanced = 2
k_EStreamQualityBeautiful = 3
k_EStreamBitrateAutodetect = -1
k_EStreamBitrateUnlimited = 0
k_EStreamP2PScopeAutomatic = 0
k_EStreamP2PScopeDisabled = 1
k_EStreamP2PScopeOnlyMe = 2
k_EStreamP2PScopeFriends = 3
k_EStreamP2PScopeEveryone = 4
k_EStreamHostPlayAudioDefault = 0
k_EStreamHostPlayAudioAlways = 1
k_EStreamingAudioData = 0
k_EStreamingVideoData = 1
k_EStreamingMicrophoneData = 2
k_EStreamMouseButtonLeft = 1
k_EStreamMouseButtonRight = 2
k_EStreamMouseButtonMiddle = 16
k_EStreamMouseButtonX1 = 32
k_EStreamMouseButtonX2 = 64
k_EStreamMouseButtonUnknown = 4096
k_EStreamMouseWheelUp = 120
k_EStreamMouseWheelDown = -120
k_EStreamMouseWheelLeft = 3
k_EStreamMouseWheelRight = 4
k_EStreamFramerateSlowCapture = 1
k_EStreamFramerateSlowConvert = 2
k_EStreamFramerateSlowEncode = 4
k_EStreamFramerateSlowNetwork = 8
k_EStreamFramerateSlowDecode = 16
k_EStreamFramerateSlowGame = 32
k_EStreamFramerateSlowDisplay = 64
k_EStreamActivityIdle = 1
k_EStreamActivityGame = 2
k_EStreamActivityDesktop = 3
k_EStreamActivitySecureDesktop = 4
k_EStreamActivityMusic = 5
k_EStreamDataPacket = 1
k_EStreamDataLost = 2
k_EAudioFormatNone = 0
k_EAudioFormat16BitLittleEndian = 1
k_EAudioFormatFloat = 2
k_EVideoFormatNone = 0
k_EVideoFormatYV12 = 1
k_EVideoFormatAccel = 2
k_EStreamStatsFrameEvents = 1
k_EStreamStatsDebugDump = 2
k_EStreamStatsLogMessage = 3
k_EStreamStatsLogUploadBegin = 4
k_EStreamStatsLogUploadData = 5
k_EStreamStatsLogUploadComplete = 6
k_EStreamInputEventStart = 0
k_EStreamInputEventSend = 1
k_EStreamInputEventRecv = 2
k_EStreamInputEventQueued = 3
k_EStreamInputEventHandled = 4
k_EStreamFrameEventStart = 5
k_EStreamFrameEventCaptureBegin = 6
k_EStreamFrameEventCaptureEnd = 7
k_EStreamFrameEventConvertBegin = 8
k_EStreamFrameEventConvertEnd = 9
k_EStreamFrameEventEncodeBegin = 10
k_EStreamFrameEventEncodeEnd = 11
k_EStreamFrameEventSend = 12
k_EStreamFrameEventRecv = 13
k_EStreamFrameEventDecodeBegin = 14
k_EStreamFrameEventDecodeEnd = 15
k_EStreamFrameEventUploadBegin = 16
k_EStreamFrameEventUploadEnd = 17
k_EStreamFrameEventComplete = 18
k_EStreamFrameResultPending = 0
k_EStreamFrameResultDisplayed = 1
k_EStreamFrameResultDroppedNetworkSlow = 2
k_EStreamFrameResultDroppedNetworkLost = 3
k_EStreamFrameResultDroppedDecodeSlow = 4
k_EStreamFrameResultDroppedDecodeCorrupt = 5
k_EStreamFrameResultDroppedLate = 6
k_EStreamFrameResultDroppedReset = 7
k_EFrameStatFPS = 0
k_EFrameStatCaptureDurationMS = 1
k_EFrameStatConvertDurationMS = 2
k_EFrameStatEncodeDurationMS = 3
k_EFrameStatSteamDurationMS = 4
k_EFrameStatServerDurationMS = 5
k_EFrameStatNetworkDurationMS = 6
k_EFrameStatDecodeDurationMS = 7
k_EFrameStatDisplayDurationMS = 8
k_EFrameStatClientDurationMS = 9
k_EFrameStatFrameDurationMS = 10
k_EFrameStatInputLatencyMS = 11
k_EFrameStatGameLatencyMS = 12
k_EFrameStatRoundTripLatencyMS = 13
k_EFrameStatPingTimeMS = 14
k_EFrameStatServerBitrateKbitPerSec = 15
k_EFrameStatClientBitrateKbitPerSec = 16
k_EFrameStatLinkBandwidthKbitPerSec = 17
k_EFrameStatPacketLossPercentage = 18
k_ELogFileSystemBoot = 0
k_ELogFileSystemReset = 1
k_ELogFileSystemDebug = 2
_CAUTHENTICATIONRESPONSEMSG_AUTHENTICATIONRESULT = _descriptor.EnumDescriptor(
name='AuthenticationResult',
full_name='CAuthenticationResponseMsg.AuthenticationResult',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='SUCCEEDED', index=0, number=0,
serialized_options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='FAILED', index=1, number=1,
serialized_options=None,
type=None),
],
containing_type=None,
serialized_options=None,
serialized_start=702,
serialized_end=751,
)
_sym_db.RegisterEnumDescriptor(_CAUTHENTICATIONRESPONSEMSG_AUTHENTICATIONRESULT)
_CDISCOVERYPINGREQUEST = _descriptor.Descriptor(
name='CDiscoveryPingRequest',
full_name='CDiscoveryPingRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sequence', full_name='CDiscoveryPingRequest.sequence', 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='packet_size_requested', full_name='CDiscoveryPingRequest.packet_size_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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=34,
serialized_end=106,
)
_CDISCOVERYPINGRESPONSE = _descriptor.Descriptor(
name='CDiscoveryPingResponse',
full_name='CDiscoveryPingResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sequence', full_name='CDiscoveryPingResponse.sequence', 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='packet_size_received', full_name='CDiscoveryPingResponse.packet_size_received', 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=108,
serialized_end=180,
)
_CSTREAMINGCLIENTHANDSHAKEINFO = _descriptor.Descriptor(
name='CStreamingClientHandshakeInfo',
full_name='CStreamingClientHandshakeInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='network_test', full_name='CStreamingClientHandshakeInfo.network_test', index=0,
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=182,
serialized_end=235,
)
_CCLIENTHANDSHAKEMSG = _descriptor.Descriptor(
name='CClientHandshakeMsg',
full_name='CClientHandshakeMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='info', full_name='CClientHandshakeMsg.info', index=0,
number=1, type=11, cpp_type=10, label=2,
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=237,
serialized_end=304,
)
_CSTREAMINGSERVERHANDSHAKEINFO = _descriptor.Descriptor(
name='CStreamingServerHandshakeInfo',
full_name='CStreamingServerHandshakeInfo',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='mtu', full_name='CStreamingServerHandshakeInfo.mtu', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=306,
serialized_end=350,
)
_CSERVERHANDSHAKEMSG = _descriptor.Descriptor(
name='CServerHandshakeMsg',
full_name='CServerHandshakeMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='info', full_name='CServerHandshakeMsg.info', index=0,
number=1, type=11, cpp_type=10, label=2,
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=352,
serialized_end=419,
)
_CAUTHENTICATIONREQUESTMSG = _descriptor.Descriptor(
name='CAuthenticationRequestMsg',
full_name='CAuthenticationRequestMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='token', full_name='CAuthenticationRequestMsg.token', 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='version', full_name='CAuthenticationRequestMsg.version', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='steamid', full_name='CAuthenticationRequestMsg.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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=421,
serialized_end=536,
)
_CAUTHENTICATIONRESPONSEMSG = _descriptor.Descriptor(
name='CAuthenticationResponseMsg',
full_name='CAuthenticationResponseMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='result', full_name='CAuthenticationResponseMsg.result', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='version', full_name='CAuthenticationResponseMsg.version', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
_CAUTHENTICATIONRESPONSEMSG_AUTHENTICATIONRESULT,
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=539,
serialized_end=751,
)
_CKEEPALIVEMSG = _descriptor.Descriptor(
name='CKeepAliveMsg',
full_name='CKeepAliveMsg',
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=753,
serialized_end=768,
)
_CSTARTNETWORKTESTMSG = _descriptor.Descriptor(
name='CStartNetworkTestMsg',
full_name='CStartNetworkTestMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='frames', full_name='CStartNetworkTestMsg.frames', 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='framerate', full_name='CStartNetworkTestMsg.framerate', 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='bitrate_kbps', full_name='CStartNetworkTestMsg.bitrate_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),
_descriptor.FieldDescriptor(
name='burst_bitrate_kbps', full_name='CStartNetworkTestMsg.burst_bitrate_kbps', 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='bandwidth_test', full_name='CStartNetworkTestMsg.bandwidth_test', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=771,
serialized_end=902,
)
_CSTREAMVIDEOMODE = _descriptor.Descriptor(
name='CStreamVideoMode',
full_name='CStreamVideoMode',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='width', full_name='CStreamVideoMode.width', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='height', full_name='CStreamVideoMode.height', index=1,
number=2, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='refresh_rate', full_name='CStreamVideoMode.refresh_rate', 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='refresh_rate_numerator', full_name='CStreamVideoMode.refresh_rate_numerator', 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='refresh_rate_denominator', full_name='CStreamVideoMode.refresh_rate_denominator', 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=905,
serialized_end=1042,
)
_CSTREAMINGCLIENTCAPS = _descriptor.Descriptor(
name='CStreamingClientCaps',
full_name='CStreamingClientCaps',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='system_info', full_name='CStreamingClientCaps.system_info', 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='system_can_suspend', full_name='CStreamingClientCaps.system_can_suspend', 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='maximum_decode_bitrate_kbps', full_name='CStreamingClientCaps.maximum_decode_bitrate_kbps', 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='maximum_burst_bitrate_kbps', full_name='CStreamingClientCaps.maximum_burst_bitrate_kbps', 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='supports_video_hevc', full_name='CStreamingClientCaps.supports_video_hevc', 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='disable_steam_store', full_name='CStreamingClientCaps.disable_steam_store', 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='disable_client_cursor', full_name='CStreamingClientCaps.disable_client_cursor', 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='disable_intel_hardware_encoding', full_name='CStreamingClientCaps.disable_intel_hardware_encoding', 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),
_descriptor.FieldDescriptor(
name='disable_amd_hardware_encoding', full_name='CStreamingClientCaps.disable_amd_hardware_encoding', 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='disable_nvidia_hardware_encoding', full_name='CStreamingClientCaps.disable_nvidia_hardware_encoding', 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='form_factor', full_name='CStreamingClientCaps.form_factor', index=10,
number=11, 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=1045,
serialized_end=1421,
)
_CSTREAMINGCLIENTCONFIG = _descriptor.Descriptor(
name='CStreamingClientConfig',
full_name='CStreamingClientConfig',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='quality', full_name='CStreamingClientConfig.quality', index=0,
number=1, type=14, cpp_type=8, 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='maximum_resolution_x', full_name='CStreamingClientConfig.maximum_resolution_x', 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='maximum_resolution_y', full_name='CStreamingClientConfig.maximum_resolution_y', 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='maximum_framerate_numerator', full_name='CStreamingClientConfig.maximum_framerate_numerator', 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='maximum_framerate_denominator', full_name='CStreamingClientConfig.maximum_framerate_denominator', 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='maximum_bitrate_kbps', full_name='CStreamingClientConfig.maximum_bitrate_kbps', index=5,
number=6, 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),
_descriptor.FieldDescriptor(
name='enable_hardware_decoding', full_name='CStreamingClientConfig.enable_hardware_decoding', index=6,
number=7, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enable_performance_overlay', full_name='CStreamingClientConfig.enable_performance_overlay', index=7,
number=8, 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),
_descriptor.FieldDescriptor(
name='enable_video_streaming', full_name='CStreamingClientConfig.enable_video_streaming', index=8,
number=9, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enable_audio_streaming', full_name='CStreamingClientConfig.enable_audio_streaming', index=9,
number=10, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enable_input_streaming', full_name='CStreamingClientConfig.enable_input_streaming', index=10,
number=11, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='audio_channels', full_name='CStreamingClientConfig.audio_channels', index=11,
number=12, 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='enable_video_hevc', full_name='CStreamingClientConfig.enable_video_hevc', index=12,
number=13, 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),
_descriptor.FieldDescriptor(
name='enable_performance_icons', full_name='CStreamingClientConfig.enable_performance_icons', index=13,
number=14, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enable_microphone_streaming', full_name='CStreamingClientConfig.enable_microphone_streaming', index=14,
number=15, 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),
_descriptor.FieldDescriptor(
name='controller_overlay_hotkey', full_name='CStreamingClientConfig.controller_overlay_hotkey', index=15,
number=16, 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='enable_touch_controller', full_name='CStreamingClientConfig.enable_touch_controller', index=16,
number=17, 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),
_descriptor.FieldDescriptor(
name='p2p_scope', full_name='CStreamingClientConfig.p2p_scope', index=17,
number=19, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=1424,
serialized_end=2170,
)
_CSTREAMINGSERVERCONFIG = _descriptor.Descriptor(
name='CStreamingServerConfig',
full_name='CStreamingServerConfig',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='change_desktop_resolution', full_name='CStreamingServerConfig.change_desktop_resolution', 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='dynamically_adjust_resolution', full_name='CStreamingServerConfig.dynamically_adjust_resolution', 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='enable_capture_nvfbc', full_name='CStreamingServerConfig.enable_capture_nvfbc', 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='enable_hardware_encoding_nvidia', full_name='CStreamingServerConfig.enable_hardware_encoding_nvidia', 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='enable_hardware_encoding_amd', full_name='CStreamingServerConfig.enable_hardware_encoding_amd', 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='enable_hardware_encoding_intel', full_name='CStreamingServerConfig.enable_hardware_encoding_intel', 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='software_encoding_threads', full_name='CStreamingServerConfig.software_encoding_threads', index=6,
number=7, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='enable_traffic_priority', full_name='CStreamingServerConfig.enable_traffic_priority', 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),
_descriptor.FieldDescriptor(
name='host_play_audio', full_name='CStreamingServerConfig.host_play_audio', index=8,
number=9, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=2173,
serialized_end=2577,
)
_CNEGOTIATEDCONFIG = _descriptor.Descriptor(
name='CNegotiatedConfig',
full_name='CNegotiatedConfig',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='reliable_data', full_name='CNegotiatedConfig.reliable_data', 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='selected_audio_codec', full_name='CNegotiatedConfig.selected_audio_codec', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='selected_video_codec', full_name='CNegotiatedConfig.selected_video_codec', index=2,
number=3, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='available_video_modes', full_name='CNegotiatedConfig.available_video_modes', 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),
_descriptor.FieldDescriptor(
name='enable_remote_hid', full_name='CNegotiatedConfig.enable_remote_hid', 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='enable_touch_input', full_name='CNegotiatedConfig.enable_touch_input', 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=2580,
serialized_end=2877,
)
_CNEGOTIATIONINITMSG = _descriptor.Descriptor(
name='CNegotiationInitMsg',
full_name='CNegotiationInitMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='reliable_data', full_name='CNegotiationInitMsg.reliable_data', 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='supported_audio_codecs', full_name='CNegotiationInitMsg.supported_audio_codecs', index=1,
number=2, type=14, cpp_type=8, 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='supported_video_codecs', full_name='CNegotiationInitMsg.supported_video_codecs', index=2,
number=3, type=14, cpp_type=8, 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='supports_remote_hid', full_name='CNegotiationInitMsg.supports_remote_hid', 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='supports_touch_input', full_name='CNegotiationInitMsg.supports_touch_input', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=2880,
serialized_end=3087,
)
_CNEGOTIATIONSETCONFIGMSG = _descriptor.Descriptor(
name='CNegotiationSetConfigMsg',
full_name='CNegotiationSetConfigMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='config', full_name='CNegotiationSetConfigMsg.config', index=0,
number=1, type=11, cpp_type=10, label=2,
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='streaming_client_config', full_name='CNegotiationSetConfigMsg.streaming_client_config', index=1,
number=2, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='streaming_client_caps', full_name='CNegotiationSetConfigMsg.streaming_client_caps', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=3090,
serialized_end=3264,
)
_CNEGOTIATIONCOMPLETEMSG = _descriptor.Descriptor(
name='CNegotiationCompleteMsg',
full_name='CNegotiationCompleteMsg',
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=3266,
serialized_end=3291,
)
_CSTARTAUDIODATAMSG = _descriptor.Descriptor(
name='CStartAudioDataMsg',
full_name='CStartAudioDataMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='channel', full_name='CStartAudioDataMsg.channel', index=0,
number=2, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='codec', full_name='CStartAudioDataMsg.codec', index=1,
number=3, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='codec_data', full_name='CStartAudioDataMsg.codec_data', index=2,
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='frequency', full_name='CStartAudioDataMsg.frequency', index=3,
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='channels', full_name='CStartAudioDataMsg.channels', index=4,
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=3294,
serialized_end=3448,
)
_CSTOPAUDIODATAMSG = _descriptor.Descriptor(
name='CStopAudioDataMsg',
full_name='CStopAudioDataMsg',
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=3450,
serialized_end=3469,
)
_CSTARTVIDEODATAMSG = _descriptor.Descriptor(
name='CStartVideoDataMsg',
full_name='CStartVideoDataMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='channel', full_name='CStartVideoDataMsg.channel', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='codec', full_name='CStartVideoDataMsg.codec', index=1,
number=2, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='codec_data', full_name='CStartVideoDataMsg.codec_data', 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='width', full_name='CStartVideoDataMsg.width', 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='height', full_name='CStartVideoDataMsg.height', 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=3472,
serialized_end=3620,
)
_CSTOPVIDEODATAMSG = _descriptor.Descriptor(
name='CStopVideoDataMsg',
full_name='CStopVideoDataMsg',
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=3622,
serialized_end=3641,
)
_CRECORDEDINPUT = _descriptor.Descriptor(
name='CRecordedInput',
full_name='CRecordedInput',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='CRecordedInput.type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='timestamp', full_name='CRecordedInput.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='finger_down', full_name='CRecordedInput.finger_down', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='finger_motion', full_name='CRecordedInput.finger_motion', 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),
_descriptor.FieldDescriptor(
name='finger_up', full_name='CRecordedInput.finger_up', index=4,
number=5, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='mouse_motion', full_name='CRecordedInput.mouse_motion', index=5,
number=6, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='mouse_wheel', full_name='CRecordedInput.mouse_wheel', index=6,
number=7, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='mouse_down', full_name='CRecordedInput.mouse_down', index=7,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='mouse_up', full_name='CRecordedInput.mouse_up', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='key_down', full_name='CRecordedInput.key_down', index=9,
number=10, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='key_up', full_name='CRecordedInput.key_up', index=10,
number=11, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='text', full_name='CRecordedInput.text', index=11,
number=12, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='hid', full_name='CRecordedInput.hid', index=12,
number=13, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='data', full_name='CRecordedInput.data',
index=0, containing_type=None, fields=[]),
],
serialized_start=3644,
serialized_end=4225,
)
_CRECORDEDINPUTSTREAM = _descriptor.Descriptor(
name='CRecordedInputStream',
full_name='CRecordedInputStream',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='entries', full_name='CRecordedInputStream.entries', 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=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=4227,
serialized_end=4283,
)
_CINPUTLATENCYTESTMSG = _descriptor.Descriptor(
name='CInputLatencyTestMsg',
full_name='CInputLatencyTestMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputLatencyTestMsg.input_mark', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='color', full_name='CInputLatencyTestMsg.color', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=4285,
serialized_end=4342,
)
_CINPUTTOUCHFINGERDOWNMSG = _descriptor.Descriptor(
name='CInputTouchFingerDownMsg',
full_name='CInputTouchFingerDownMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputTouchFingerDownMsg.input_mark', 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='fingerid', full_name='CInputTouchFingerDownMsg.fingerid', 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='x_normalized', full_name='CInputTouchFingerDownMsg.x_normalized', index=2,
number=3, 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),
_descriptor.FieldDescriptor(
name='y_normalized', full_name='CInputTouchFingerDownMsg.y_normalized', index=3,
number=4, 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=4344,
serialized_end=4452,
)
_CINPUTTOUCHFINGERMOTIONMSG = _descriptor.Descriptor(
name='CInputTouchFingerMotionMsg',
full_name='CInputTouchFingerMotionMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputTouchFingerMotionMsg.input_mark', 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='fingerid', full_name='CInputTouchFingerMotionMsg.fingerid', 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='x_normalized', full_name='CInputTouchFingerMotionMsg.x_normalized', index=2,
number=3, 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),
_descriptor.FieldDescriptor(
name='y_normalized', full_name='CInputTouchFingerMotionMsg.y_normalized', index=3,
number=4, 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=4454,
serialized_end=4564,
)
_CINPUTTOUCHFINGERUPMSG = _descriptor.Descriptor(
name='CInputTouchFingerUpMsg',
full_name='CInputTouchFingerUpMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputTouchFingerUpMsg.input_mark', 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='fingerid', full_name='CInputTouchFingerUpMsg.fingerid', 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='x_normalized', full_name='CInputTouchFingerUpMsg.x_normalized', index=2,
number=3, 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),
_descriptor.FieldDescriptor(
name='y_normalized', full_name='CInputTouchFingerUpMsg.y_normalized', index=3,
number=4, 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=4566,
serialized_end=4672,
)
_CINPUTMOUSEMOTIONMSG = _descriptor.Descriptor(
name='CInputMouseMotionMsg',
full_name='CInputMouseMotionMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputMouseMotionMsg.input_mark', 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='x_normalized', full_name='CInputMouseMotionMsg.x_normalized', index=1,
number=2, 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),
_descriptor.FieldDescriptor(
name='y_normalized', full_name='CInputMouseMotionMsg.y_normalized', index=2,
number=3, 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),
_descriptor.FieldDescriptor(
name='dx', full_name='CInputMouseMotionMsg.dx', 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='dy', full_name='CInputMouseMotionMsg.dy', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=4674,
serialized_end=4784,
)
_CINPUTMOUSEWHEELMSG = _descriptor.Descriptor(
name='CInputMouseWheelMsg',
full_name='CInputMouseWheelMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputMouseWheelMsg.input_mark', 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='direction', full_name='CInputMouseWheelMsg.direction', index=1,
number=2, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=120,
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=4786,
serialized_end=4898,
)
_CINPUTMOUSEDOWNMSG = _descriptor.Descriptor(
name='CInputMouseDownMsg',
full_name='CInputMouseDownMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputMouseDownMsg.input_mark', 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='button', full_name='CInputMouseDownMsg.button', index=1,
number=2, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=4900,
serialized_end=5003,
)
_CINPUTMOUSEUPMSG = _descriptor.Descriptor(
name='CInputMouseUpMsg',
full_name='CInputMouseUpMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputMouseUpMsg.input_mark', 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='button', full_name='CInputMouseUpMsg.button', index=1,
number=2, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=5005,
serialized_end=5106,
)
_CINPUTKEYDOWNMSG = _descriptor.Descriptor(
name='CInputKeyDownMsg',
full_name='CInputKeyDownMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputKeyDownMsg.input_mark', 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='scancode', full_name='CInputKeyDownMsg.scancode', index=1,
number=2, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=5108,
serialized_end=5164,
)
_CINPUTKEYUPMSG = _descriptor.Descriptor(
name='CInputKeyUpMsg',
full_name='CInputKeyUpMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputKeyUpMsg.input_mark', 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='scancode', full_name='CInputKeyUpMsg.scancode', index=1,
number=2, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=5166,
serialized_end=5220,
)
_CINPUTTEXTMSG = _descriptor.Descriptor(
name='CInputTextMsg',
full_name='CInputTextMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='input_mark', full_name='CInputTextMsg.input_mark', 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='text_utf8', full_name='CInputTextMsg.text_utf8', index=1,
number=2, type=9, cpp_type=9, label=2,
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=5222,
serialized_end=5276,
)
_CSETTITLEMSG = _descriptor.Descriptor(
name='CSetTitleMsg',
full_name='CSetTitleMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='text', full_name='CSetTitleMsg.text', 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=5278,
serialized_end=5306,
)
_CSETCAPTURESIZEMSG = _descriptor.Descriptor(
name='CSetCaptureSizeMsg',
full_name='CSetCaptureSizeMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='width', full_name='CSetCaptureSizeMsg.width', 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='height', full_name='CSetCaptureSizeMsg.height', 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=5308,
serialized_end=5359,
)
_CSETICONMSG = _descriptor.Descriptor(
name='CSetIconMsg',
full_name='CSetIconMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='width', full_name='CSetIconMsg.width', 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='height', full_name='CSetIconMsg.height', 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='image', full_name='CSetIconMsg.image', 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=5361,
serialized_end=5420,
)
_CSETFLASHSTATEMSG = _descriptor.Descriptor(
name='CSetFlashStateMsg',
full_name='CSetFlashStateMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='flags', full_name='CSetFlashStateMsg.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='count', full_name='CSetFlashStateMsg.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),
_descriptor.FieldDescriptor(
name='timeout_ms', full_name='CSetFlashStateMsg.timeout_ms', 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=5422,
serialized_end=5491,
)
_CSHOWCURSORMSG = _descriptor.Descriptor(
name='CShowCursorMsg',
full_name='CShowCursorMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='x_normalized', full_name='CShowCursorMsg.x_normalized', index=0,
number=1, 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),
_descriptor.FieldDescriptor(
name='y_normalized', full_name='CShowCursorMsg.y_normalized', index=1,
number=2, 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=5493,
serialized_end=5553,
)
_CHIDECURSORMSG = _descriptor.Descriptor(
name='CHideCursorMsg',
full_name='CHideCursorMsg',
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=5555,
serialized_end=5571,
)
_CSETCURSORMSG = _descriptor.Descriptor(
name='CSetCursorMsg',
full_name='CSetCursorMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='cursor_id', full_name='CSetCursorMsg.cursor_id', index=0,
number=1, type=4, cpp_type=4, label=2,
has_default_value=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=5573,
serialized_end=5607,
)
_CGETCURSORIMAGEMSG = _descriptor.Descriptor(
name='CGetCursorImageMsg',
full_name='CGetCursorImageMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='cursor_id', full_name='CGetCursorImageMsg.cursor_id', index=0,
number=1, type=4, cpp_type=4, label=2,
has_default_value=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=5609,
serialized_end=5648,
)
_CSETCURSORIMAGEMSG = _descriptor.Descriptor(
name='CSetCursorImageMsg',
full_name='CSetCursorImageMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='cursor_id', full_name='CSetCursorImageMsg.cursor_id', index=0,
number=1, type=4, cpp_type=4, label=2,
has_default_value=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='CSetCursorImageMsg.width', 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='height', full_name='CSetCursorImageMsg.height', 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='hot_x', full_name='CSetCursorImageMsg.hot_x', 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='hot_y', full_name='CSetCursorImageMsg.hot_y', 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='image', full_name='CSetCursorImageMsg.image', 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=5650,
serialized_end=5765,
)
_CVIDEODECODERINFOMSG = _descriptor.Descriptor(
name='CVideoDecoderInfoMsg',
full_name='CVideoDecoderInfoMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='info', full_name='CVideoDecoderInfoMsg.info', 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='threads', full_name='CVideoDecoderInfoMsg.threads', 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=5767,
serialized_end=5820,
)
_CVIDEOENCODERINFOMSG = _descriptor.Descriptor(
name='CVideoEncoderInfoMsg',
full_name='CVideoEncoderInfoMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='info', full_name='CVideoEncoderInfoMsg.info', 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=5822,
serialized_end=5858,
)
_CPAUSEMSG = _descriptor.Descriptor(
name='CPauseMsg',
full_name='CPauseMsg',
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=5860,
serialized_end=5871,
)
_CRESUMEMSG = _descriptor.Descriptor(
name='CResumeMsg',
full_name='CResumeMsg',
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=5873,
serialized_end=5885,
)
_CENABLEHIGHRESCAPTUREMSG = _descriptor.Descriptor(
name='CEnableHighResCaptureMsg',
full_name='CEnableHighResCaptureMsg',
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=5887,
serialized_end=5913,
)
_CDISABLEHIGHRESCAPTUREMSG = _descriptor.Descriptor(
name='CDisableHighResCaptureMsg',
full_name='CDisableHighResCaptureMsg',
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=5915,
serialized_end=5942,
)
_CTOGGLEMAGNIFICATIONMSG = _descriptor.Descriptor(
name='CToggleMagnificationMsg',
full_name='CToggleMagnificationMsg',
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=5944,
serialized_end=5969,
)
_CSETCAPSLOCKMSG = _descriptor.Descriptor(
name='CSetCapslockMsg',
full_name='CSetCapslockMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='pressed', full_name='CSetCapslockMsg.pressed', 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=5971,
serialized_end=6005,
)
_CSTREAMINGKEYMAPENTRY = _descriptor.Descriptor(
name='CStreamingKeymapEntry',
full_name='CStreamingKeymapEntry',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='scancode', full_name='CStreamingKeymapEntry.scancode', 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='normal_keycode', full_name='CStreamingKeymapEntry.normal_keycode', 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='shift_keycode', full_name='CStreamingKeymapEntry.shift_keycode', 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='capslock_keycode', full_name='CStreamingKeymapEntry.capslock_keycode', 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='shift_capslock_keycode', full_name='CStreamingKeymapEntry.shift_capslock_keycode', 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='altgr_keycode', full_name='CStreamingKeymapEntry.altgr_keycode', 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),
_descriptor.FieldDescriptor(
name='altgr_shift_keycode', full_name='CStreamingKeymapEntry.altgr_shift_keycode', index=6,
number=7, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='altgr_capslock_keycode', full_name='CStreamingKeymapEntry.altgr_capslock_keycode', 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='altgr_shift_capslock_keycode', full_name='CStreamingKeymapEntry.altgr_shift_capslock_keycode', index=8,
number=9, 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=6008,
serialized_end=6276,
)
_CSTREAMINGKEYMAP = _descriptor.Descriptor(
name='CStreamingKeymap',
full_name='CStreamingKeymap',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='entries', full_name='CStreamingKeymap.entries', 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=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=6278,
serialized_end=6337,
)
_CSETKEYMAPMSG = _descriptor.Descriptor(
name='CSetKeymapMsg',
full_name='CSetKeymapMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='keymap', full_name='CSetKeymapMsg.keymap', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=6339,
serialized_end=6389,
)
_CSTOPREQUEST = _descriptor.Descriptor(
name='CStopRequest',
full_name='CStopRequest',
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=6391,
serialized_end=6405,
)
_CQUITREQUEST = _descriptor.Descriptor(
name='CQuitRequest',
full_name='CQuitRequest',
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=6407,
serialized_end=6421,
)
_CDELETECURSORMSG = _descriptor.Descriptor(
name='CDeleteCursorMsg',
full_name='CDeleteCursorMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='cursor_id', full_name='CDeleteCursorMsg.cursor_id', index=0,
number=1, type=4, cpp_type=4, label=2,
has_default_value=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=6423,
serialized_end=6460,
)
_CSETSTREAMINGCLIENTCONFIG = _descriptor.Descriptor(
name='CSetStreamingClientConfig',
full_name='CSetStreamingClientConfig',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='config', full_name='CSetStreamingClientConfig.config', index=0,
number=1, type=11, cpp_type=10, label=2,
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=6462,
serialized_end=6530,
)
_CSETQOSMSG = _descriptor.Descriptor(
name='CSetQoSMsg',
full_name='CSetQoSMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='use_qos', full_name='CSetQoSMsg.use_qos', index=0,
number=1, type=8, cpp_type=7, label=2,
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=6532,
serialized_end=6561,
)
_CSETTARGETFRAMERATEMSG = _descriptor.Descriptor(
name='CSetTargetFramerateMsg',
full_name='CSetTargetFramerateMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='framerate', full_name='CSetTargetFramerateMsg.framerate', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='reasons', full_name='CSetTargetFramerateMsg.reasons', 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='framerate_numerator', full_name='CSetTargetFramerateMsg.framerate_numerator', 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='framerate_denominator', full_name='CSetTargetFramerateMsg.framerate_denominator', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=6563,
serialized_end=6683,
)
_CSETTARGETBITRATEMSG = _descriptor.Descriptor(
name='CSetTargetBitrateMsg',
full_name='CSetTargetBitrateMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='bitrate', full_name='CSetTargetBitrateMsg.bitrate', index=0,
number=1, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=6685,
serialized_end=6724,
)
_COVERLAYENABLEDMSG = _descriptor.Descriptor(
name='COverlayEnabledMsg',
full_name='COverlayEnabledMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='enabled', full_name='COverlayEnabledMsg.enabled', index=0,
number=1, type=8, cpp_type=7, label=2,
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=6726,
serialized_end=6763,
)
_CSETGAMMARAMPMSG = _descriptor.Descriptor(
name='CSetGammaRampMsg',
full_name='CSetGammaRampMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='gamma_ramp', full_name='CSetGammaRampMsg.gamma_ramp', 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=6765,
serialized_end=6803,
)
_CSETACTIVITYMSG = _descriptor.Descriptor(
name='CSetActivityMsg',
full_name='CSetActivityMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='activity', full_name='CSetActivityMsg.activity', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='appid', full_name='CSetActivityMsg.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='gameid', full_name='CSetActivityMsg.gameid', 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='game_name', full_name='CSetActivityMsg.game_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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=6805,
serialized_end=6931,
)
_CSYSTEMSUSPENDMSG = _descriptor.Descriptor(
name='CSystemSuspendMsg',
full_name='CSystemSuspendMsg',
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=6933,
serialized_end=6952,
)
_CVIRTUALHEREREQUESTMSG = _descriptor.Descriptor(
name='CVirtualHereRequestMsg',
full_name='CVirtualHereRequestMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='hostname', full_name='CVirtualHereRequestMsg.hostname', 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=6954,
serialized_end=6996,
)
_CVIRTUALHEREREADYMSG = _descriptor.Descriptor(
name='CVirtualHereReadyMsg',
full_name='CVirtualHereReadyMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='licensed_device_count', full_name='CVirtualHereReadyMsg.licensed_device_count', 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=6998,
serialized_end=7051,
)
_CVIRTUALHERESHAREDEVICEMSG = _descriptor.Descriptor(
name='CVirtualHereShareDeviceMsg',
full_name='CVirtualHereShareDeviceMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='device_address', full_name='CVirtualHereShareDeviceMsg.device_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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=7053,
serialized_end=7105,
)
_CSETSPECTATORMODEMSG = _descriptor.Descriptor(
name='CSetSpectatorModeMsg',
full_name='CSetSpectatorModeMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='enabled', full_name='CSetSpectatorModeMsg.enabled', 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=7107,
serialized_end=7146,
)
_CREMOTEHIDMSG = _descriptor.Descriptor(
name='CRemoteHIDMsg',
full_name='CRemoteHIDMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='data', full_name='CRemoteHIDMsg.data', 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=7148,
serialized_end=7177,
)
_CTOUCHCONFIGACTIVEMSG = _descriptor.Descriptor(
name='CTouchConfigActiveMsg',
full_name='CTouchConfigActiveMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CTouchConfigActiveMsg.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='revision', full_name='CTouchConfigActiveMsg.revision', 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='creator', full_name='CTouchConfigActiveMsg.creator', 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=7179,
serialized_end=7252,
)
_CGETTOUCHCONFIGDATAMSG = _descriptor.Descriptor(
name='CGetTouchConfigDataMsg',
full_name='CGetTouchConfigDataMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CGetTouchConfigDataMsg.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=7254,
serialized_end=7293,
)
_CSETTOUCHCONFIGDATAMSG = _descriptor.Descriptor(
name='CSetTouchConfigDataMsg',
full_name='CSetTouchConfigDataMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CSetTouchConfigDataMsg.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='revision', full_name='CSetTouchConfigDataMsg.revision', 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='data', full_name='CSetTouchConfigDataMsg.data', 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='layout', full_name='CSetTouchConfigDataMsg.layout', 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='creator', full_name='CSetTouchConfigDataMsg.creator', index=4,
number=5, 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=7295,
serialized_end=7399,
)
_CSAVETOUCHCONFIGLAYOUTMSG = _descriptor.Descriptor(
name='CSaveTouchConfigLayoutMsg',
full_name='CSaveTouchConfigLayoutMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CSaveTouchConfigLayoutMsg.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='layout', full_name='CSaveTouchConfigLayoutMsg.layout', index=1,
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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=7401,
serialized_end=7459,
)
_CTOUCHACTIONSETACTIVEMSG = _descriptor.Descriptor(
name='CTouchActionSetActiveMsg',
full_name='CTouchActionSetActiveMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CTouchActionSetActiveMsg.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='actionset_id', full_name='CTouchActionSetActiveMsg.actionset_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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=7461,
serialized_end=7524,
)
_CTOUCHACTIONSETLAYERADDEDMSG = _descriptor.Descriptor(
name='CTouchActionSetLayerAddedMsg',
full_name='CTouchActionSetLayerAddedMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CTouchActionSetLayerAddedMsg.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='actionset_id', full_name='CTouchActionSetLayerAddedMsg.actionset_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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=7526,
serialized_end=7593,
)
_CTOUCHACTIONSETLAYERREMOVEDMSG = _descriptor.Descriptor(
name='CTouchActionSetLayerRemovedMsg',
full_name='CTouchActionSetLayerRemovedMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CTouchActionSetLayerRemovedMsg.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='actionset_id', full_name='CTouchActionSetLayerRemovedMsg.actionset_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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=7595,
serialized_end=7664,
)
_CGETTOUCHICONDATAMSG = _descriptor.Descriptor(
name='CGetTouchIconDataMsg',
full_name='CGetTouchIconDataMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CGetTouchIconDataMsg.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='icon', full_name='CGetTouchIconDataMsg.icon', 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=7666,
serialized_end=7717,
)
_CSETTOUCHICONDATAMSG = _descriptor.Descriptor(
name='CSetTouchIconDataMsg',
full_name='CSetTouchIconDataMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='appid', full_name='CSetTouchIconDataMsg.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='icon', full_name='CSetTouchIconDataMsg.icon', 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='data', full_name='CSetTouchIconDataMsg.data', 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=7719,
serialized_end=7784,
)
_CREMOTEPLAYTOGETHERGROUPUPDATEMSG_PLAYER = _descriptor.Descriptor(
name='Player',
full_name='CRemotePlayTogetherGroupUpdateMsg.Player',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='accountid', full_name='CRemotePlayTogetherGroupUpdateMsg.Player.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='guestid', full_name='CRemotePlayTogetherGroupUpdateMsg.Player.guestid', 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='keyboard_enabled', full_name='CRemotePlayTogetherGroupUpdateMsg.Player.keyboard_enabled', 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='mouse_enabled', full_name='CRemotePlayTogetherGroupUpdateMsg.Player.mouse_enabled', 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='controller_enabled', full_name='CRemotePlayTogetherGroupUpdateMsg.Player.controller_enabled', 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='controller_slots', full_name='CRemotePlayTogetherGroupUpdateMsg.Player.controller_slots', index=5,
number=6, 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='avatar_hash', full_name='CRemotePlayTogetherGroupUpdateMsg.Player.avatar_hash', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=7981,
serialized_end=8149,
)
_CREMOTEPLAYTOGETHERGROUPUPDATEMSG = _descriptor.Descriptor(
name='CRemotePlayTogetherGroupUpdateMsg',
full_name='CRemotePlayTogetherGroupUpdateMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='players', full_name='CRemotePlayTogetherGroupUpdateMsg.players', 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='player_index', full_name='CRemotePlayTogetherGroupUpdateMsg.player_index', 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='miniprofile_location', full_name='CRemotePlayTogetherGroupUpdateMsg.miniprofile_location', 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='game_name', full_name='CRemotePlayTogetherGroupUpdateMsg.game_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='avatar_location', full_name='CRemotePlayTogetherGroupUpdateMsg.avatar_location', 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),
],
extensions=[
],
nested_types=[_CREMOTEPLAYTOGETHERGROUPUPDATEMSG_PLAYER, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=7787,
serialized_end=8149,
)
_CSETINPUTTEMPORARILYDISABLEDMSG = _descriptor.Descriptor(
name='CSetInputTemporarilyDisabledMsg',
full_name='CSetInputTemporarilyDisabledMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='disabled', full_name='CSetInputTemporarilyDisabledMsg.disabled', 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=8151,
serialized_end=8202,
)
_CSETQUALITYOVERRIDEMSG = _descriptor.Descriptor(
name='CSetQualityOverrideMsg',
full_name='CSetQualityOverrideMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='CSetQualityOverrideMsg.value', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=8204,
serialized_end=8243,
)
_CSETBITRATEOVERRIDEMSG = _descriptor.Descriptor(
name='CSetBitrateOverrideMsg',
full_name='CSetBitrateOverrideMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='value', full_name='CSetBitrateOverrideMsg.value', 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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=8245,
serialized_end=8284,
)
_CSTREAMDATALOSTMSG = _descriptor.Descriptor(
name='CStreamDataLostMsg',
full_name='CStreamDataLostMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='packets', full_name='CStreamDataLostMsg.packets', 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=8286,
serialized_end=8323,
)
_CAUDIOFORMAT = _descriptor.Descriptor(
name='CAudioFormat',
full_name='CAudioFormat',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='format', full_name='CAudioFormat.format', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='frequency', full_name='CAudioFormat.frequency', 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='channels', full_name='CAudioFormat.channels', 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=8325,
serialized_end=8427,
)
_CVIDEOFORMAT = _descriptor.Descriptor(
name='CVideoFormat',
full_name='CVideoFormat',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='format', full_name='CVideoFormat.format', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='width', full_name='CVideoFormat.width', 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='height', full_name='CVideoFormat.height', 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=8429,
serialized_end=8525,
)
_CFRAMEEVENT = _descriptor.Descriptor(
name='CFrameEvent',
full_name='CFrameEvent',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='event_id', full_name='CFrameEvent.event_id', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='timestamp', full_name='CFrameEvent.timestamp', index=1,
number=2, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=8527,
serialized_end=8623,
)
_CFRAMESTATS = _descriptor.Descriptor(
name='CFrameStats',
full_name='CFrameStats',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='frame_id', full_name='CFrameStats.frame_id', index=0,
number=1, type=13, cpp_type=3, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='input_mark', full_name='CFrameStats.input_mark', 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='events', full_name='CFrameStats.events', 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='result', full_name='CFrameStats.result', index=3,
number=4, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='frame_start_delta', full_name='CFrameStats.frame_start_delta', 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),
_descriptor.FieldDescriptor(
name='frame_display_delta', full_name='CFrameStats.frame_display_delta', index=5,
number=6, 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),
_descriptor.FieldDescriptor(
name='ping_time', full_name='CFrameStats.ping_time', index=6,
number=7, 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),
_descriptor.FieldDescriptor(
name='server_bitrate', full_name='CFrameStats.server_bitrate', index=7,
number=8, 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),
_descriptor.FieldDescriptor(
name='client_bitrate', full_name='CFrameStats.client_bitrate', index=8,
number=9, 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),
_descriptor.FieldDescriptor(
name='link_bandwidth', full_name='CFrameStats.link_bandwidth', index=9,
number=10, 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),
_descriptor.FieldDescriptor(
name='packet_loss', full_name='CFrameStats.packet_loss', index=10,
number=11, 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),
_descriptor.FieldDescriptor(
name='frame_size', full_name='CFrameStats.frame_size', index=11,
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),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=8626,
serialized_end=8961,
)
_CFRAMESTATACCUMULATEDVALUE = _descriptor.Descriptor(
name='CFrameStatAccumulatedValue',
full_name='CFrameStatAccumulatedValue',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='stat_type', full_name='CFrameStatAccumulatedValue.stat_type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='count', full_name='CFrameStatAccumulatedValue.count', index=1,
number=2, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='average', full_name='CFrameStatAccumulatedValue.average', index=2,
number=3, type=2, cpp_type=6, label=2,
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),
_descriptor.FieldDescriptor(
name='stddev', full_name='CFrameStatAccumulatedValue.stddev', index=3,
number=4, 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=8964,
serialized_end=9100,
)
_CFRAMESTATSLISTMSG = _descriptor.Descriptor(
name='CFrameStatsListMsg',
full_name='CFrameStatsListMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='data_type', full_name='CFrameStatsListMsg.data_type', index=0,
number=1, type=14, cpp_type=8, label=2,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='stats', full_name='CFrameStatsListMsg.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='accumulated_stats', full_name='CFrameStatsListMsg.accumulated_stats', 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='latest_frame_id', full_name='CFrameStatsListMsg.latest_frame_id', index=3,
number=4, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=9103,
serialized_end=9296,
)
_CSTREAMINGSESSIONSTATS = _descriptor.Descriptor(
name='CStreamingSessionStats',
full_name='CStreamingSessionStats',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='frame_loss_percentage', full_name='CStreamingSessionStats.frame_loss_percentage', index=0,
number=1, 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),
_descriptor.FieldDescriptor(
name='average_network_time_ms', full_name='CStreamingSessionStats.average_network_time_ms', index=1,
number=2, 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),
_descriptor.FieldDescriptor(
name='stddev_network_time_ms', full_name='CStreamingSessionStats.stddev_network_time_ms', index=2,
number=3, 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=9298,
serialized_end=9418,
)
_CDEBUGDUMPMSG = _descriptor.Descriptor(
name='CDebugDumpMsg',
full_name='CDebugDumpMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='screenshot', full_name='CDebugDumpMsg.screenshot', 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=9420,
serialized_end=9455,
)
_CLOGMSG = _descriptor.Descriptor(
name='CLogMsg',
full_name='CLogMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='CLogMsg.type', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='message', full_name='CLogMsg.message', 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=9457,
serialized_end=9497,
)
_CLOGUPLOADMSG = _descriptor.Descriptor(
name='CLogUploadMsg',
full_name='CLogUploadMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='type', full_name='CLogUploadMsg.type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='data', full_name='CLogUploadMsg.data', index=1,
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=9499,
serialized_end=9579,
)
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE_CANDIDATE = _descriptor.Descriptor(
name='Candidate',
full_name='CTransportSignalMsg.WebRTCMessage.Candidate',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='sdp_mid', full_name='CTransportSignalMsg.WebRTCMessage.Candidate.sdp_mid', 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='sdp_mline_index', full_name='CTransportSignalMsg.WebRTCMessage.Candidate.sdp_mline_index', 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='candidate', full_name='CTransportSignalMsg.WebRTCMessage.Candidate.candidate', 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=9810,
serialized_end=9882,
)
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE = _descriptor.Descriptor(
name='WebRTCMessage',
full_name='CTransportSignalMsg.WebRTCMessage',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='greeting', full_name='CTransportSignalMsg.WebRTCMessage.greeting', 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='offer', full_name='CTransportSignalMsg.WebRTCMessage.offer', 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='answer', full_name='CTransportSignalMsg.WebRTCMessage.answer', 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='candidate', full_name='CTransportSignalMsg.WebRTCMessage.candidate', 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=[_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE_CANDIDATE, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='msg', full_name='CTransportSignalMsg.WebRTCMessage.msg',
index=0, containing_type=None, fields=[]),
],
serialized_start=9671,
serialized_end=9889,
)
_CTRANSPORTSIGNALMSG = _descriptor.Descriptor(
name='CTransportSignalMsg',
full_name='CTransportSignalMsg',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='webrtc', full_name='CTransportSignalMsg.webrtc', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, file=DESCRIPTOR),
_descriptor.FieldDescriptor(
name='sdr', full_name='CTransportSignalMsg.sdr', index=1,
number=2, type=12, 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),
],
extensions=[
],
nested_types=[_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE, ],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto2',
extension_ranges=[],
oneofs=[
],
serialized_start=9582,
serialized_end=9889,
)
_CCLIENTHANDSHAKEMSG.fields_by_name['info'].message_type = _CSTREAMINGCLIENTHANDSHAKEINFO
_CSERVERHANDSHAKEMSG.fields_by_name['info'].message_type = _CSTREAMINGSERVERHANDSHAKEINFO
_CAUTHENTICATIONREQUESTMSG.fields_by_name['version'].enum_type = _ESTREAMVERSION
_CAUTHENTICATIONRESPONSEMSG.fields_by_name['result'].enum_type = _CAUTHENTICATIONRESPONSEMSG_AUTHENTICATIONRESULT
_CAUTHENTICATIONRESPONSEMSG.fields_by_name['version'].enum_type = _ESTREAMVERSION
_CAUTHENTICATIONRESPONSEMSG_AUTHENTICATIONRESULT.containing_type = _CAUTHENTICATIONRESPONSEMSG
_CSTREAMINGCLIENTCONFIG.fields_by_name['quality'].enum_type = _ESTREAMQUALITYPREFERENCE
_CSTREAMINGCLIENTCONFIG.fields_by_name['p2p_scope'].enum_type = _ESTREAMP2PSCOPE
_CSTREAMINGSERVERCONFIG.fields_by_name['host_play_audio'].enum_type = _ESTREAMHOSTPLAYAUDIOPREFERENCE
_CNEGOTIATEDCONFIG.fields_by_name['selected_audio_codec'].enum_type = _ESTREAMAUDIOCODEC
_CNEGOTIATEDCONFIG.fields_by_name['selected_video_codec'].enum_type = _ESTREAMVIDEOCODEC
_CNEGOTIATEDCONFIG.fields_by_name['available_video_modes'].message_type = _CSTREAMVIDEOMODE
_CNEGOTIATIONINITMSG.fields_by_name['supported_audio_codecs'].enum_type = _ESTREAMAUDIOCODEC
_CNEGOTIATIONINITMSG.fields_by_name['supported_video_codecs'].enum_type = _ESTREAMVIDEOCODEC
_CNEGOTIATIONSETCONFIGMSG.fields_by_name['config'].message_type = _CNEGOTIATEDCONFIG
_CNEGOTIATIONSETCONFIGMSG.fields_by_name['streaming_client_config'].message_type = _CSTREAMINGCLIENTCONFIG
_CNEGOTIATIONSETCONFIGMSG.fields_by_name['streaming_client_caps'].message_type = _CSTREAMINGCLIENTCAPS
_CSTARTAUDIODATAMSG.fields_by_name['codec'].enum_type = _ESTREAMAUDIOCODEC
_CSTARTVIDEODATAMSG.fields_by_name['codec'].enum_type = _ESTREAMVIDEOCODEC
_CRECORDEDINPUT.fields_by_name['type'].enum_type = _ESTREAMCONTROLMESSAGE
_CRECORDEDINPUT.fields_by_name['finger_down'].message_type = _CINPUTTOUCHFINGERDOWNMSG
_CRECORDEDINPUT.fields_by_name['finger_motion'].message_type = _CINPUTTOUCHFINGERMOTIONMSG
_CRECORDEDINPUT.fields_by_name['finger_up'].message_type = _CINPUTTOUCHFINGERUPMSG
_CRECORDEDINPUT.fields_by_name['mouse_motion'].message_type = _CINPUTMOUSEMOTIONMSG
_CRECORDEDINPUT.fields_by_name['mouse_wheel'].message_type = _CINPUTMOUSEWHEELMSG
_CRECORDEDINPUT.fields_by_name['mouse_down'].message_type = _CINPUTMOUSEDOWNMSG
_CRECORDEDINPUT.fields_by_name['mouse_up'].message_type = _CINPUTMOUSEUPMSG
_CRECORDEDINPUT.fields_by_name['key_down'].message_type = _CINPUTKEYDOWNMSG
_CRECORDEDINPUT.fields_by_name['key_up'].message_type = _CINPUTKEYUPMSG
_CRECORDEDINPUT.fields_by_name['text'].message_type = _CINPUTTEXTMSG
_CRECORDEDINPUT.fields_by_name['hid'].message_type = _CREMOTEHIDMSG
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['finger_down'])
_CRECORDEDINPUT.fields_by_name['finger_down'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['finger_motion'])
_CRECORDEDINPUT.fields_by_name['finger_motion'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['finger_up'])
_CRECORDEDINPUT.fields_by_name['finger_up'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['mouse_motion'])
_CRECORDEDINPUT.fields_by_name['mouse_motion'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['mouse_wheel'])
_CRECORDEDINPUT.fields_by_name['mouse_wheel'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['mouse_down'])
_CRECORDEDINPUT.fields_by_name['mouse_down'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['mouse_up'])
_CRECORDEDINPUT.fields_by_name['mouse_up'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['key_down'])
_CRECORDEDINPUT.fields_by_name['key_down'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['key_up'])
_CRECORDEDINPUT.fields_by_name['key_up'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['text'])
_CRECORDEDINPUT.fields_by_name['text'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUT.oneofs_by_name['data'].fields.append(
_CRECORDEDINPUT.fields_by_name['hid'])
_CRECORDEDINPUT.fields_by_name['hid'].containing_oneof = _CRECORDEDINPUT.oneofs_by_name['data']
_CRECORDEDINPUTSTREAM.fields_by_name['entries'].message_type = _CRECORDEDINPUT
_CINPUTMOUSEWHEELMSG.fields_by_name['direction'].enum_type = _ESTREAMMOUSEWHEELDIRECTION
_CINPUTMOUSEDOWNMSG.fields_by_name['button'].enum_type = _ESTREAMMOUSEBUTTON
_CINPUTMOUSEUPMSG.fields_by_name['button'].enum_type = _ESTREAMMOUSEBUTTON
_CSTREAMINGKEYMAP.fields_by_name['entries'].message_type = _CSTREAMINGKEYMAPENTRY
_CSETKEYMAPMSG.fields_by_name['keymap'].message_type = _CSTREAMINGKEYMAP
_CSETSTREAMINGCLIENTCONFIG.fields_by_name['config'].message_type = _CSTREAMINGCLIENTCONFIG
_CSETACTIVITYMSG.fields_by_name['activity'].enum_type = _ESTREAMACTIVITY
_CREMOTEPLAYTOGETHERGROUPUPDATEMSG_PLAYER.containing_type = _CREMOTEPLAYTOGETHERGROUPUPDATEMSG
_CREMOTEPLAYTOGETHERGROUPUPDATEMSG.fields_by_name['players'].message_type = _CREMOTEPLAYTOGETHERGROUPUPDATEMSG_PLAYER
_CAUDIOFORMAT.fields_by_name['format'].enum_type = _EAUDIOFORMAT
_CVIDEOFORMAT.fields_by_name['format'].enum_type = _EVIDEOFORMAT
_CFRAMEEVENT.fields_by_name['event_id'].enum_type = _ESTREAMFRAMEEVENT
_CFRAMESTATS.fields_by_name['events'].message_type = _CFRAMEEVENT
_CFRAMESTATS.fields_by_name['result'].enum_type = _ESTREAMFRAMERESULT
_CFRAMESTATACCUMULATEDVALUE.fields_by_name['stat_type'].enum_type = _EFRAMEACCUMULATEDSTAT
_CFRAMESTATSLISTMSG.fields_by_name['data_type'].enum_type = _ESTREAMINGDATATYPE
_CFRAMESTATSLISTMSG.fields_by_name['stats'].message_type = _CFRAMESTATS
_CFRAMESTATSLISTMSG.fields_by_name['accumulated_stats'].message_type = _CFRAMESTATACCUMULATEDVALUE
_CLOGUPLOADMSG.fields_by_name['type'].enum_type = _ELOGFILETYPE
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE_CANDIDATE.containing_type = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['candidate'].message_type = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE_CANDIDATE
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.containing_type = _CTRANSPORTSIGNALMSG
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg'].fields.append(
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['greeting'])
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['greeting'].containing_oneof = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg']
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg'].fields.append(
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['offer'])
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['offer'].containing_oneof = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg']
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg'].fields.append(
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['answer'])
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['answer'].containing_oneof = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg']
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg'].fields.append(
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['candidate'])
_CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.fields_by_name['candidate'].containing_oneof = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE.oneofs_by_name['msg']
_CTRANSPORTSIGNALMSG.fields_by_name['webrtc'].message_type = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE
DESCRIPTOR.message_types_by_name['CDiscoveryPingRequest'] = _CDISCOVERYPINGREQUEST
DESCRIPTOR.message_types_by_name['CDiscoveryPingResponse'] = _CDISCOVERYPINGRESPONSE
DESCRIPTOR.message_types_by_name['CStreamingClientHandshakeInfo'] = _CSTREAMINGCLIENTHANDSHAKEINFO
DESCRIPTOR.message_types_by_name['CClientHandshakeMsg'] = _CCLIENTHANDSHAKEMSG
DESCRIPTOR.message_types_by_name['CStreamingServerHandshakeInfo'] = _CSTREAMINGSERVERHANDSHAKEINFO
DESCRIPTOR.message_types_by_name['CServerHandshakeMsg'] = _CSERVERHANDSHAKEMSG
DESCRIPTOR.message_types_by_name['CAuthenticationRequestMsg'] = _CAUTHENTICATIONREQUESTMSG
DESCRIPTOR.message_types_by_name['CAuthenticationResponseMsg'] = _CAUTHENTICATIONRESPONSEMSG
DESCRIPTOR.message_types_by_name['CKeepAliveMsg'] = _CKEEPALIVEMSG
DESCRIPTOR.message_types_by_name['CStartNetworkTestMsg'] = _CSTARTNETWORKTESTMSG
DESCRIPTOR.message_types_by_name['CStreamVideoMode'] = _CSTREAMVIDEOMODE
DESCRIPTOR.message_types_by_name['CStreamingClientCaps'] = _CSTREAMINGCLIENTCAPS
DESCRIPTOR.message_types_by_name['CStreamingClientConfig'] = _CSTREAMINGCLIENTCONFIG
DESCRIPTOR.message_types_by_name['CStreamingServerConfig'] = _CSTREAMINGSERVERCONFIG
DESCRIPTOR.message_types_by_name['CNegotiatedConfig'] = _CNEGOTIATEDCONFIG
DESCRIPTOR.message_types_by_name['CNegotiationInitMsg'] = _CNEGOTIATIONINITMSG
DESCRIPTOR.message_types_by_name['CNegotiationSetConfigMsg'] = _CNEGOTIATIONSETCONFIGMSG
DESCRIPTOR.message_types_by_name['CNegotiationCompleteMsg'] = _CNEGOTIATIONCOMPLETEMSG
DESCRIPTOR.message_types_by_name['CStartAudioDataMsg'] = _CSTARTAUDIODATAMSG
DESCRIPTOR.message_types_by_name['CStopAudioDataMsg'] = _CSTOPAUDIODATAMSG
DESCRIPTOR.message_types_by_name['CStartVideoDataMsg'] = _CSTARTVIDEODATAMSG
DESCRIPTOR.message_types_by_name['CStopVideoDataMsg'] = _CSTOPVIDEODATAMSG
DESCRIPTOR.message_types_by_name['CRecordedInput'] = _CRECORDEDINPUT
DESCRIPTOR.message_types_by_name['CRecordedInputStream'] = _CRECORDEDINPUTSTREAM
DESCRIPTOR.message_types_by_name['CInputLatencyTestMsg'] = _CINPUTLATENCYTESTMSG
DESCRIPTOR.message_types_by_name['CInputTouchFingerDownMsg'] = _CINPUTTOUCHFINGERDOWNMSG
DESCRIPTOR.message_types_by_name['CInputTouchFingerMotionMsg'] = _CINPUTTOUCHFINGERMOTIONMSG
DESCRIPTOR.message_types_by_name['CInputTouchFingerUpMsg'] = _CINPUTTOUCHFINGERUPMSG
DESCRIPTOR.message_types_by_name['CInputMouseMotionMsg'] = _CINPUTMOUSEMOTIONMSG
DESCRIPTOR.message_types_by_name['CInputMouseWheelMsg'] = _CINPUTMOUSEWHEELMSG
DESCRIPTOR.message_types_by_name['CInputMouseDownMsg'] = _CINPUTMOUSEDOWNMSG
DESCRIPTOR.message_types_by_name['CInputMouseUpMsg'] = _CINPUTMOUSEUPMSG
DESCRIPTOR.message_types_by_name['CInputKeyDownMsg'] = _CINPUTKEYDOWNMSG
DESCRIPTOR.message_types_by_name['CInputKeyUpMsg'] = _CINPUTKEYUPMSG
DESCRIPTOR.message_types_by_name['CInputTextMsg'] = _CINPUTTEXTMSG
DESCRIPTOR.message_types_by_name['CSetTitleMsg'] = _CSETTITLEMSG
DESCRIPTOR.message_types_by_name['CSetCaptureSizeMsg'] = _CSETCAPTURESIZEMSG
DESCRIPTOR.message_types_by_name['CSetIconMsg'] = _CSETICONMSG
DESCRIPTOR.message_types_by_name['CSetFlashStateMsg'] = _CSETFLASHSTATEMSG
DESCRIPTOR.message_types_by_name['CShowCursorMsg'] = _CSHOWCURSORMSG
DESCRIPTOR.message_types_by_name['CHideCursorMsg'] = _CHIDECURSORMSG
DESCRIPTOR.message_types_by_name['CSetCursorMsg'] = _CSETCURSORMSG
DESCRIPTOR.message_types_by_name['CGetCursorImageMsg'] = _CGETCURSORIMAGEMSG
DESCRIPTOR.message_types_by_name['CSetCursorImageMsg'] = _CSETCURSORIMAGEMSG
DESCRIPTOR.message_types_by_name['CVideoDecoderInfoMsg'] = _CVIDEODECODERINFOMSG
DESCRIPTOR.message_types_by_name['CVideoEncoderInfoMsg'] = _CVIDEOENCODERINFOMSG
DESCRIPTOR.message_types_by_name['CPauseMsg'] = _CPAUSEMSG
DESCRIPTOR.message_types_by_name['CResumeMsg'] = _CRESUMEMSG
DESCRIPTOR.message_types_by_name['CEnableHighResCaptureMsg'] = _CENABLEHIGHRESCAPTUREMSG
DESCRIPTOR.message_types_by_name['CDisableHighResCaptureMsg'] = _CDISABLEHIGHRESCAPTUREMSG
DESCRIPTOR.message_types_by_name['CToggleMagnificationMsg'] = _CTOGGLEMAGNIFICATIONMSG
DESCRIPTOR.message_types_by_name['CSetCapslockMsg'] = _CSETCAPSLOCKMSG
DESCRIPTOR.message_types_by_name['CStreamingKeymapEntry'] = _CSTREAMINGKEYMAPENTRY
DESCRIPTOR.message_types_by_name['CStreamingKeymap'] = _CSTREAMINGKEYMAP
DESCRIPTOR.message_types_by_name['CSetKeymapMsg'] = _CSETKEYMAPMSG
DESCRIPTOR.message_types_by_name['CStopRequest'] = _CSTOPREQUEST
DESCRIPTOR.message_types_by_name['CQuitRequest'] = _CQUITREQUEST
DESCRIPTOR.message_types_by_name['CDeleteCursorMsg'] = _CDELETECURSORMSG
DESCRIPTOR.message_types_by_name['CSetStreamingClientConfig'] = _CSETSTREAMINGCLIENTCONFIG
DESCRIPTOR.message_types_by_name['CSetQoSMsg'] = _CSETQOSMSG
DESCRIPTOR.message_types_by_name['CSetTargetFramerateMsg'] = _CSETTARGETFRAMERATEMSG
DESCRIPTOR.message_types_by_name['CSetTargetBitrateMsg'] = _CSETTARGETBITRATEMSG
DESCRIPTOR.message_types_by_name['COverlayEnabledMsg'] = _COVERLAYENABLEDMSG
DESCRIPTOR.message_types_by_name['CSetGammaRampMsg'] = _CSETGAMMARAMPMSG
DESCRIPTOR.message_types_by_name['CSetActivityMsg'] = _CSETACTIVITYMSG
DESCRIPTOR.message_types_by_name['CSystemSuspendMsg'] = _CSYSTEMSUSPENDMSG
DESCRIPTOR.message_types_by_name['CVirtualHereRequestMsg'] = _CVIRTUALHEREREQUESTMSG
DESCRIPTOR.message_types_by_name['CVirtualHereReadyMsg'] = _CVIRTUALHEREREADYMSG
DESCRIPTOR.message_types_by_name['CVirtualHereShareDeviceMsg'] = _CVIRTUALHERESHAREDEVICEMSG
DESCRIPTOR.message_types_by_name['CSetSpectatorModeMsg'] = _CSETSPECTATORMODEMSG
DESCRIPTOR.message_types_by_name['CRemoteHIDMsg'] = _CREMOTEHIDMSG
DESCRIPTOR.message_types_by_name['CTouchConfigActiveMsg'] = _CTOUCHCONFIGACTIVEMSG
DESCRIPTOR.message_types_by_name['CGetTouchConfigDataMsg'] = _CGETTOUCHCONFIGDATAMSG
DESCRIPTOR.message_types_by_name['CSetTouchConfigDataMsg'] = _CSETTOUCHCONFIGDATAMSG
DESCRIPTOR.message_types_by_name['CSaveTouchConfigLayoutMsg'] = _CSAVETOUCHCONFIGLAYOUTMSG
DESCRIPTOR.message_types_by_name['CTouchActionSetActiveMsg'] = _CTOUCHACTIONSETACTIVEMSG
DESCRIPTOR.message_types_by_name['CTouchActionSetLayerAddedMsg'] = _CTOUCHACTIONSETLAYERADDEDMSG
DESCRIPTOR.message_types_by_name['CTouchActionSetLayerRemovedMsg'] = _CTOUCHACTIONSETLAYERREMOVEDMSG
DESCRIPTOR.message_types_by_name['CGetTouchIconDataMsg'] = _CGETTOUCHICONDATAMSG
DESCRIPTOR.message_types_by_name['CSetTouchIconDataMsg'] = _CSETTOUCHICONDATAMSG
DESCRIPTOR.message_types_by_name['CRemotePlayTogetherGroupUpdateMsg'] = _CREMOTEPLAYTOGETHERGROUPUPDATEMSG
DESCRIPTOR.message_types_by_name['CSetInputTemporarilyDisabledMsg'] = _CSETINPUTTEMPORARILYDISABLEDMSG
DESCRIPTOR.message_types_by_name['CSetQualityOverrideMsg'] = _CSETQUALITYOVERRIDEMSG
DESCRIPTOR.message_types_by_name['CSetBitrateOverrideMsg'] = _CSETBITRATEOVERRIDEMSG
DESCRIPTOR.message_types_by_name['CStreamDataLostMsg'] = _CSTREAMDATALOSTMSG
DESCRIPTOR.message_types_by_name['CAudioFormat'] = _CAUDIOFORMAT
DESCRIPTOR.message_types_by_name['CVideoFormat'] = _CVIDEOFORMAT
DESCRIPTOR.message_types_by_name['CFrameEvent'] = _CFRAMEEVENT
DESCRIPTOR.message_types_by_name['CFrameStats'] = _CFRAMESTATS
DESCRIPTOR.message_types_by_name['CFrameStatAccumulatedValue'] = _CFRAMESTATACCUMULATEDVALUE
DESCRIPTOR.message_types_by_name['CFrameStatsListMsg'] = _CFRAMESTATSLISTMSG
DESCRIPTOR.message_types_by_name['CStreamingSessionStats'] = _CSTREAMINGSESSIONSTATS
DESCRIPTOR.message_types_by_name['CDebugDumpMsg'] = _CDEBUGDUMPMSG
DESCRIPTOR.message_types_by_name['CLogMsg'] = _CLOGMSG
DESCRIPTOR.message_types_by_name['CLogUploadMsg'] = _CLOGUPLOADMSG
DESCRIPTOR.message_types_by_name['CTransportSignalMsg'] = _CTRANSPORTSIGNALMSG
DESCRIPTOR.enum_types_by_name['EStreamChannel'] = _ESTREAMCHANNEL
DESCRIPTOR.enum_types_by_name['EStreamDiscoveryMessage'] = _ESTREAMDISCOVERYMESSAGE
DESCRIPTOR.enum_types_by_name['EStreamControlMessage'] = _ESTREAMCONTROLMESSAGE
DESCRIPTOR.enum_types_by_name['EStreamVersion'] = _ESTREAMVERSION
DESCRIPTOR.enum_types_by_name['EStreamAudioCodec'] = _ESTREAMAUDIOCODEC
DESCRIPTOR.enum_types_by_name['EStreamVideoCodec'] = _ESTREAMVIDEOCODEC
DESCRIPTOR.enum_types_by_name['EStreamQualityPreference'] = _ESTREAMQUALITYPREFERENCE
DESCRIPTOR.enum_types_by_name['EStreamBitrate'] = _ESTREAMBITRATE
DESCRIPTOR.enum_types_by_name['EStreamP2PScope'] = _ESTREAMP2PSCOPE
DESCRIPTOR.enum_types_by_name['EStreamHostPlayAudioPreference'] = _ESTREAMHOSTPLAYAUDIOPREFERENCE
DESCRIPTOR.enum_types_by_name['EStreamingDataType'] = _ESTREAMINGDATATYPE
DESCRIPTOR.enum_types_by_name['EStreamMouseButton'] = _ESTREAMMOUSEBUTTON
DESCRIPTOR.enum_types_by_name['EStreamMouseWheelDirection'] = _ESTREAMMOUSEWHEELDIRECTION
DESCRIPTOR.enum_types_by_name['EStreamFramerateLimiter'] = _ESTREAMFRAMERATELIMITER
DESCRIPTOR.enum_types_by_name['EStreamActivity'] = _ESTREAMACTIVITY
DESCRIPTOR.enum_types_by_name['EStreamDataMessage'] = _ESTREAMDATAMESSAGE
DESCRIPTOR.enum_types_by_name['EAudioFormat'] = _EAUDIOFORMAT
DESCRIPTOR.enum_types_by_name['EVideoFormat'] = _EVIDEOFORMAT
DESCRIPTOR.enum_types_by_name['EStreamStatsMessage'] = _ESTREAMSTATSMESSAGE
DESCRIPTOR.enum_types_by_name['EStreamFrameEvent'] = _ESTREAMFRAMEEVENT
DESCRIPTOR.enum_types_by_name['EStreamFrameResult'] = _ESTREAMFRAMERESULT
DESCRIPTOR.enum_types_by_name['EFrameAccumulatedStat'] = _EFRAMEACCUMULATEDSTAT
DESCRIPTOR.enum_types_by_name['ELogFileType'] = _ELOGFILETYPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
CDiscoveryPingRequest = _reflection.GeneratedProtocolMessageType('CDiscoveryPingRequest', (_message.Message,), dict(
DESCRIPTOR = _CDISCOVERYPINGREQUEST,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CDiscoveryPingRequest)
))
_sym_db.RegisterMessage(CDiscoveryPingRequest)
CDiscoveryPingResponse = _reflection.GeneratedProtocolMessageType('CDiscoveryPingResponse', (_message.Message,), dict(
DESCRIPTOR = _CDISCOVERYPINGRESPONSE,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CDiscoveryPingResponse)
))
_sym_db.RegisterMessage(CDiscoveryPingResponse)
CStreamingClientHandshakeInfo = _reflection.GeneratedProtocolMessageType('CStreamingClientHandshakeInfo', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGCLIENTHANDSHAKEINFO,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingClientHandshakeInfo)
))
_sym_db.RegisterMessage(CStreamingClientHandshakeInfo)
CClientHandshakeMsg = _reflection.GeneratedProtocolMessageType('CClientHandshakeMsg', (_message.Message,), dict(
DESCRIPTOR = _CCLIENTHANDSHAKEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CClientHandshakeMsg)
))
_sym_db.RegisterMessage(CClientHandshakeMsg)
CStreamingServerHandshakeInfo = _reflection.GeneratedProtocolMessageType('CStreamingServerHandshakeInfo', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGSERVERHANDSHAKEINFO,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingServerHandshakeInfo)
))
_sym_db.RegisterMessage(CStreamingServerHandshakeInfo)
CServerHandshakeMsg = _reflection.GeneratedProtocolMessageType('CServerHandshakeMsg', (_message.Message,), dict(
DESCRIPTOR = _CSERVERHANDSHAKEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CServerHandshakeMsg)
))
_sym_db.RegisterMessage(CServerHandshakeMsg)
CAuthenticationRequestMsg = _reflection.GeneratedProtocolMessageType('CAuthenticationRequestMsg', (_message.Message,), dict(
DESCRIPTOR = _CAUTHENTICATIONREQUESTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CAuthenticationRequestMsg)
))
_sym_db.RegisterMessage(CAuthenticationRequestMsg)
CAuthenticationResponseMsg = _reflection.GeneratedProtocolMessageType('CAuthenticationResponseMsg', (_message.Message,), dict(
DESCRIPTOR = _CAUTHENTICATIONRESPONSEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CAuthenticationResponseMsg)
))
_sym_db.RegisterMessage(CAuthenticationResponseMsg)
CKeepAliveMsg = _reflection.GeneratedProtocolMessageType('CKeepAliveMsg', (_message.Message,), dict(
DESCRIPTOR = _CKEEPALIVEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CKeepAliveMsg)
))
_sym_db.RegisterMessage(CKeepAliveMsg)
CStartNetworkTestMsg = _reflection.GeneratedProtocolMessageType('CStartNetworkTestMsg', (_message.Message,), dict(
DESCRIPTOR = _CSTARTNETWORKTESTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStartNetworkTestMsg)
))
_sym_db.RegisterMessage(CStartNetworkTestMsg)
CStreamVideoMode = _reflection.GeneratedProtocolMessageType('CStreamVideoMode', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMVIDEOMODE,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamVideoMode)
))
_sym_db.RegisterMessage(CStreamVideoMode)
CStreamingClientCaps = _reflection.GeneratedProtocolMessageType('CStreamingClientCaps', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGCLIENTCAPS,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingClientCaps)
))
_sym_db.RegisterMessage(CStreamingClientCaps)
CStreamingClientConfig = _reflection.GeneratedProtocolMessageType('CStreamingClientConfig', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGCLIENTCONFIG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingClientConfig)
))
_sym_db.RegisterMessage(CStreamingClientConfig)
CStreamingServerConfig = _reflection.GeneratedProtocolMessageType('CStreamingServerConfig', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGSERVERCONFIG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingServerConfig)
))
_sym_db.RegisterMessage(CStreamingServerConfig)
CNegotiatedConfig = _reflection.GeneratedProtocolMessageType('CNegotiatedConfig', (_message.Message,), dict(
DESCRIPTOR = _CNEGOTIATEDCONFIG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CNegotiatedConfig)
))
_sym_db.RegisterMessage(CNegotiatedConfig)
CNegotiationInitMsg = _reflection.GeneratedProtocolMessageType('CNegotiationInitMsg', (_message.Message,), dict(
DESCRIPTOR = _CNEGOTIATIONINITMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CNegotiationInitMsg)
))
_sym_db.RegisterMessage(CNegotiationInitMsg)
CNegotiationSetConfigMsg = _reflection.GeneratedProtocolMessageType('CNegotiationSetConfigMsg', (_message.Message,), dict(
DESCRIPTOR = _CNEGOTIATIONSETCONFIGMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CNegotiationSetConfigMsg)
))
_sym_db.RegisterMessage(CNegotiationSetConfigMsg)
CNegotiationCompleteMsg = _reflection.GeneratedProtocolMessageType('CNegotiationCompleteMsg', (_message.Message,), dict(
DESCRIPTOR = _CNEGOTIATIONCOMPLETEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CNegotiationCompleteMsg)
))
_sym_db.RegisterMessage(CNegotiationCompleteMsg)
CStartAudioDataMsg = _reflection.GeneratedProtocolMessageType('CStartAudioDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CSTARTAUDIODATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStartAudioDataMsg)
))
_sym_db.RegisterMessage(CStartAudioDataMsg)
CStopAudioDataMsg = _reflection.GeneratedProtocolMessageType('CStopAudioDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CSTOPAUDIODATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStopAudioDataMsg)
))
_sym_db.RegisterMessage(CStopAudioDataMsg)
CStartVideoDataMsg = _reflection.GeneratedProtocolMessageType('CStartVideoDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CSTARTVIDEODATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStartVideoDataMsg)
))
_sym_db.RegisterMessage(CStartVideoDataMsg)
CStopVideoDataMsg = _reflection.GeneratedProtocolMessageType('CStopVideoDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CSTOPVIDEODATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStopVideoDataMsg)
))
_sym_db.RegisterMessage(CStopVideoDataMsg)
CRecordedInput = _reflection.GeneratedProtocolMessageType('CRecordedInput', (_message.Message,), dict(
DESCRIPTOR = _CRECORDEDINPUT,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CRecordedInput)
))
_sym_db.RegisterMessage(CRecordedInput)
CRecordedInputStream = _reflection.GeneratedProtocolMessageType('CRecordedInputStream', (_message.Message,), dict(
DESCRIPTOR = _CRECORDEDINPUTSTREAM,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CRecordedInputStream)
))
_sym_db.RegisterMessage(CRecordedInputStream)
CInputLatencyTestMsg = _reflection.GeneratedProtocolMessageType('CInputLatencyTestMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTLATENCYTESTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputLatencyTestMsg)
))
_sym_db.RegisterMessage(CInputLatencyTestMsg)
CInputTouchFingerDownMsg = _reflection.GeneratedProtocolMessageType('CInputTouchFingerDownMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTTOUCHFINGERDOWNMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputTouchFingerDownMsg)
))
_sym_db.RegisterMessage(CInputTouchFingerDownMsg)
CInputTouchFingerMotionMsg = _reflection.GeneratedProtocolMessageType('CInputTouchFingerMotionMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTTOUCHFINGERMOTIONMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputTouchFingerMotionMsg)
))
_sym_db.RegisterMessage(CInputTouchFingerMotionMsg)
CInputTouchFingerUpMsg = _reflection.GeneratedProtocolMessageType('CInputTouchFingerUpMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTTOUCHFINGERUPMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputTouchFingerUpMsg)
))
_sym_db.RegisterMessage(CInputTouchFingerUpMsg)
CInputMouseMotionMsg = _reflection.GeneratedProtocolMessageType('CInputMouseMotionMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTMOUSEMOTIONMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputMouseMotionMsg)
))
_sym_db.RegisterMessage(CInputMouseMotionMsg)
CInputMouseWheelMsg = _reflection.GeneratedProtocolMessageType('CInputMouseWheelMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTMOUSEWHEELMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputMouseWheelMsg)
))
_sym_db.RegisterMessage(CInputMouseWheelMsg)
CInputMouseDownMsg = _reflection.GeneratedProtocolMessageType('CInputMouseDownMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTMOUSEDOWNMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputMouseDownMsg)
))
_sym_db.RegisterMessage(CInputMouseDownMsg)
CInputMouseUpMsg = _reflection.GeneratedProtocolMessageType('CInputMouseUpMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTMOUSEUPMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputMouseUpMsg)
))
_sym_db.RegisterMessage(CInputMouseUpMsg)
CInputKeyDownMsg = _reflection.GeneratedProtocolMessageType('CInputKeyDownMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTKEYDOWNMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputKeyDownMsg)
))
_sym_db.RegisterMessage(CInputKeyDownMsg)
CInputKeyUpMsg = _reflection.GeneratedProtocolMessageType('CInputKeyUpMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTKEYUPMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputKeyUpMsg)
))
_sym_db.RegisterMessage(CInputKeyUpMsg)
CInputTextMsg = _reflection.GeneratedProtocolMessageType('CInputTextMsg', (_message.Message,), dict(
DESCRIPTOR = _CINPUTTEXTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CInputTextMsg)
))
_sym_db.RegisterMessage(CInputTextMsg)
CSetTitleMsg = _reflection.GeneratedProtocolMessageType('CSetTitleMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETTITLEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetTitleMsg)
))
_sym_db.RegisterMessage(CSetTitleMsg)
CSetCaptureSizeMsg = _reflection.GeneratedProtocolMessageType('CSetCaptureSizeMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETCAPTURESIZEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetCaptureSizeMsg)
))
_sym_db.RegisterMessage(CSetCaptureSizeMsg)
CSetIconMsg = _reflection.GeneratedProtocolMessageType('CSetIconMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETICONMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetIconMsg)
))
_sym_db.RegisterMessage(CSetIconMsg)
CSetFlashStateMsg = _reflection.GeneratedProtocolMessageType('CSetFlashStateMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETFLASHSTATEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetFlashStateMsg)
))
_sym_db.RegisterMessage(CSetFlashStateMsg)
CShowCursorMsg = _reflection.GeneratedProtocolMessageType('CShowCursorMsg', (_message.Message,), dict(
DESCRIPTOR = _CSHOWCURSORMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CShowCursorMsg)
))
_sym_db.RegisterMessage(CShowCursorMsg)
CHideCursorMsg = _reflection.GeneratedProtocolMessageType('CHideCursorMsg', (_message.Message,), dict(
DESCRIPTOR = _CHIDECURSORMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CHideCursorMsg)
))
_sym_db.RegisterMessage(CHideCursorMsg)
CSetCursorMsg = _reflection.GeneratedProtocolMessageType('CSetCursorMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETCURSORMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetCursorMsg)
))
_sym_db.RegisterMessage(CSetCursorMsg)
CGetCursorImageMsg = _reflection.GeneratedProtocolMessageType('CGetCursorImageMsg', (_message.Message,), dict(
DESCRIPTOR = _CGETCURSORIMAGEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CGetCursorImageMsg)
))
_sym_db.RegisterMessage(CGetCursorImageMsg)
CSetCursorImageMsg = _reflection.GeneratedProtocolMessageType('CSetCursorImageMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETCURSORIMAGEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetCursorImageMsg)
))
_sym_db.RegisterMessage(CSetCursorImageMsg)
CVideoDecoderInfoMsg = _reflection.GeneratedProtocolMessageType('CVideoDecoderInfoMsg', (_message.Message,), dict(
DESCRIPTOR = _CVIDEODECODERINFOMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CVideoDecoderInfoMsg)
))
_sym_db.RegisterMessage(CVideoDecoderInfoMsg)
CVideoEncoderInfoMsg = _reflection.GeneratedProtocolMessageType('CVideoEncoderInfoMsg', (_message.Message,), dict(
DESCRIPTOR = _CVIDEOENCODERINFOMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CVideoEncoderInfoMsg)
))
_sym_db.RegisterMessage(CVideoEncoderInfoMsg)
CPauseMsg = _reflection.GeneratedProtocolMessageType('CPauseMsg', (_message.Message,), dict(
DESCRIPTOR = _CPAUSEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CPauseMsg)
))
_sym_db.RegisterMessage(CPauseMsg)
CResumeMsg = _reflection.GeneratedProtocolMessageType('CResumeMsg', (_message.Message,), dict(
DESCRIPTOR = _CRESUMEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CResumeMsg)
))
_sym_db.RegisterMessage(CResumeMsg)
CEnableHighResCaptureMsg = _reflection.GeneratedProtocolMessageType('CEnableHighResCaptureMsg', (_message.Message,), dict(
DESCRIPTOR = _CENABLEHIGHRESCAPTUREMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CEnableHighResCaptureMsg)
))
_sym_db.RegisterMessage(CEnableHighResCaptureMsg)
CDisableHighResCaptureMsg = _reflection.GeneratedProtocolMessageType('CDisableHighResCaptureMsg', (_message.Message,), dict(
DESCRIPTOR = _CDISABLEHIGHRESCAPTUREMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CDisableHighResCaptureMsg)
))
_sym_db.RegisterMessage(CDisableHighResCaptureMsg)
CToggleMagnificationMsg = _reflection.GeneratedProtocolMessageType('CToggleMagnificationMsg', (_message.Message,), dict(
DESCRIPTOR = _CTOGGLEMAGNIFICATIONMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CToggleMagnificationMsg)
))
_sym_db.RegisterMessage(CToggleMagnificationMsg)
CSetCapslockMsg = _reflection.GeneratedProtocolMessageType('CSetCapslockMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETCAPSLOCKMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetCapslockMsg)
))
_sym_db.RegisterMessage(CSetCapslockMsg)
CStreamingKeymapEntry = _reflection.GeneratedProtocolMessageType('CStreamingKeymapEntry', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGKEYMAPENTRY,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingKeymapEntry)
))
_sym_db.RegisterMessage(CStreamingKeymapEntry)
CStreamingKeymap = _reflection.GeneratedProtocolMessageType('CStreamingKeymap', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGKEYMAP,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingKeymap)
))
_sym_db.RegisterMessage(CStreamingKeymap)
CSetKeymapMsg = _reflection.GeneratedProtocolMessageType('CSetKeymapMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETKEYMAPMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetKeymapMsg)
))
_sym_db.RegisterMessage(CSetKeymapMsg)
CStopRequest = _reflection.GeneratedProtocolMessageType('CStopRequest', (_message.Message,), dict(
DESCRIPTOR = _CSTOPREQUEST,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStopRequest)
))
_sym_db.RegisterMessage(CStopRequest)
CQuitRequest = _reflection.GeneratedProtocolMessageType('CQuitRequest', (_message.Message,), dict(
DESCRIPTOR = _CQUITREQUEST,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CQuitRequest)
))
_sym_db.RegisterMessage(CQuitRequest)
CDeleteCursorMsg = _reflection.GeneratedProtocolMessageType('CDeleteCursorMsg', (_message.Message,), dict(
DESCRIPTOR = _CDELETECURSORMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CDeleteCursorMsg)
))
_sym_db.RegisterMessage(CDeleteCursorMsg)
CSetStreamingClientConfig = _reflection.GeneratedProtocolMessageType('CSetStreamingClientConfig', (_message.Message,), dict(
DESCRIPTOR = _CSETSTREAMINGCLIENTCONFIG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetStreamingClientConfig)
))
_sym_db.RegisterMessage(CSetStreamingClientConfig)
CSetQoSMsg = _reflection.GeneratedProtocolMessageType('CSetQoSMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETQOSMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetQoSMsg)
))
_sym_db.RegisterMessage(CSetQoSMsg)
CSetTargetFramerateMsg = _reflection.GeneratedProtocolMessageType('CSetTargetFramerateMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETTARGETFRAMERATEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetTargetFramerateMsg)
))
_sym_db.RegisterMessage(CSetTargetFramerateMsg)
CSetTargetBitrateMsg = _reflection.GeneratedProtocolMessageType('CSetTargetBitrateMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETTARGETBITRATEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetTargetBitrateMsg)
))
_sym_db.RegisterMessage(CSetTargetBitrateMsg)
COverlayEnabledMsg = _reflection.GeneratedProtocolMessageType('COverlayEnabledMsg', (_message.Message,), dict(
DESCRIPTOR = _COVERLAYENABLEDMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:COverlayEnabledMsg)
))
_sym_db.RegisterMessage(COverlayEnabledMsg)
CSetGammaRampMsg = _reflection.GeneratedProtocolMessageType('CSetGammaRampMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETGAMMARAMPMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetGammaRampMsg)
))
_sym_db.RegisterMessage(CSetGammaRampMsg)
CSetActivityMsg = _reflection.GeneratedProtocolMessageType('CSetActivityMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETACTIVITYMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetActivityMsg)
))
_sym_db.RegisterMessage(CSetActivityMsg)
CSystemSuspendMsg = _reflection.GeneratedProtocolMessageType('CSystemSuspendMsg', (_message.Message,), dict(
DESCRIPTOR = _CSYSTEMSUSPENDMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSystemSuspendMsg)
))
_sym_db.RegisterMessage(CSystemSuspendMsg)
CVirtualHereRequestMsg = _reflection.GeneratedProtocolMessageType('CVirtualHereRequestMsg', (_message.Message,), dict(
DESCRIPTOR = _CVIRTUALHEREREQUESTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CVirtualHereRequestMsg)
))
_sym_db.RegisterMessage(CVirtualHereRequestMsg)
CVirtualHereReadyMsg = _reflection.GeneratedProtocolMessageType('CVirtualHereReadyMsg', (_message.Message,), dict(
DESCRIPTOR = _CVIRTUALHEREREADYMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CVirtualHereReadyMsg)
))
_sym_db.RegisterMessage(CVirtualHereReadyMsg)
CVirtualHereShareDeviceMsg = _reflection.GeneratedProtocolMessageType('CVirtualHereShareDeviceMsg', (_message.Message,), dict(
DESCRIPTOR = _CVIRTUALHERESHAREDEVICEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CVirtualHereShareDeviceMsg)
))
_sym_db.RegisterMessage(CVirtualHereShareDeviceMsg)
CSetSpectatorModeMsg = _reflection.GeneratedProtocolMessageType('CSetSpectatorModeMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETSPECTATORMODEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetSpectatorModeMsg)
))
_sym_db.RegisterMessage(CSetSpectatorModeMsg)
CRemoteHIDMsg = _reflection.GeneratedProtocolMessageType('CRemoteHIDMsg', (_message.Message,), dict(
DESCRIPTOR = _CREMOTEHIDMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CRemoteHIDMsg)
))
_sym_db.RegisterMessage(CRemoteHIDMsg)
CTouchConfigActiveMsg = _reflection.GeneratedProtocolMessageType('CTouchConfigActiveMsg', (_message.Message,), dict(
DESCRIPTOR = _CTOUCHCONFIGACTIVEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CTouchConfigActiveMsg)
))
_sym_db.RegisterMessage(CTouchConfigActiveMsg)
CGetTouchConfigDataMsg = _reflection.GeneratedProtocolMessageType('CGetTouchConfigDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CGETTOUCHCONFIGDATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CGetTouchConfigDataMsg)
))
_sym_db.RegisterMessage(CGetTouchConfigDataMsg)
CSetTouchConfigDataMsg = _reflection.GeneratedProtocolMessageType('CSetTouchConfigDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETTOUCHCONFIGDATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetTouchConfigDataMsg)
))
_sym_db.RegisterMessage(CSetTouchConfigDataMsg)
CSaveTouchConfigLayoutMsg = _reflection.GeneratedProtocolMessageType('CSaveTouchConfigLayoutMsg', (_message.Message,), dict(
DESCRIPTOR = _CSAVETOUCHCONFIGLAYOUTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSaveTouchConfigLayoutMsg)
))
_sym_db.RegisterMessage(CSaveTouchConfigLayoutMsg)
CTouchActionSetActiveMsg = _reflection.GeneratedProtocolMessageType('CTouchActionSetActiveMsg', (_message.Message,), dict(
DESCRIPTOR = _CTOUCHACTIONSETACTIVEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CTouchActionSetActiveMsg)
))
_sym_db.RegisterMessage(CTouchActionSetActiveMsg)
CTouchActionSetLayerAddedMsg = _reflection.GeneratedProtocolMessageType('CTouchActionSetLayerAddedMsg', (_message.Message,), dict(
DESCRIPTOR = _CTOUCHACTIONSETLAYERADDEDMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CTouchActionSetLayerAddedMsg)
))
_sym_db.RegisterMessage(CTouchActionSetLayerAddedMsg)
CTouchActionSetLayerRemovedMsg = _reflection.GeneratedProtocolMessageType('CTouchActionSetLayerRemovedMsg', (_message.Message,), dict(
DESCRIPTOR = _CTOUCHACTIONSETLAYERREMOVEDMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CTouchActionSetLayerRemovedMsg)
))
_sym_db.RegisterMessage(CTouchActionSetLayerRemovedMsg)
CGetTouchIconDataMsg = _reflection.GeneratedProtocolMessageType('CGetTouchIconDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CGETTOUCHICONDATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CGetTouchIconDataMsg)
))
_sym_db.RegisterMessage(CGetTouchIconDataMsg)
CSetTouchIconDataMsg = _reflection.GeneratedProtocolMessageType('CSetTouchIconDataMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETTOUCHICONDATAMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetTouchIconDataMsg)
))
_sym_db.RegisterMessage(CSetTouchIconDataMsg)
CRemotePlayTogetherGroupUpdateMsg = _reflection.GeneratedProtocolMessageType('CRemotePlayTogetherGroupUpdateMsg', (_message.Message,), dict(
Player = _reflection.GeneratedProtocolMessageType('Player', (_message.Message,), dict(
DESCRIPTOR = _CREMOTEPLAYTOGETHERGROUPUPDATEMSG_PLAYER,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CRemotePlayTogetherGroupUpdateMsg.Player)
))
,
DESCRIPTOR = _CREMOTEPLAYTOGETHERGROUPUPDATEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CRemotePlayTogetherGroupUpdateMsg)
))
_sym_db.RegisterMessage(CRemotePlayTogetherGroupUpdateMsg)
_sym_db.RegisterMessage(CRemotePlayTogetherGroupUpdateMsg.Player)
CSetInputTemporarilyDisabledMsg = _reflection.GeneratedProtocolMessageType('CSetInputTemporarilyDisabledMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETINPUTTEMPORARILYDISABLEDMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetInputTemporarilyDisabledMsg)
))
_sym_db.RegisterMessage(CSetInputTemporarilyDisabledMsg)
CSetQualityOverrideMsg = _reflection.GeneratedProtocolMessageType('CSetQualityOverrideMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETQUALITYOVERRIDEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetQualityOverrideMsg)
))
_sym_db.RegisterMessage(CSetQualityOverrideMsg)
CSetBitrateOverrideMsg = _reflection.GeneratedProtocolMessageType('CSetBitrateOverrideMsg', (_message.Message,), dict(
DESCRIPTOR = _CSETBITRATEOVERRIDEMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CSetBitrateOverrideMsg)
))
_sym_db.RegisterMessage(CSetBitrateOverrideMsg)
CStreamDataLostMsg = _reflection.GeneratedProtocolMessageType('CStreamDataLostMsg', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMDATALOSTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamDataLostMsg)
))
_sym_db.RegisterMessage(CStreamDataLostMsg)
CAudioFormat = _reflection.GeneratedProtocolMessageType('CAudioFormat', (_message.Message,), dict(
DESCRIPTOR = _CAUDIOFORMAT,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CAudioFormat)
))
_sym_db.RegisterMessage(CAudioFormat)
CVideoFormat = _reflection.GeneratedProtocolMessageType('CVideoFormat', (_message.Message,), dict(
DESCRIPTOR = _CVIDEOFORMAT,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CVideoFormat)
))
_sym_db.RegisterMessage(CVideoFormat)
CFrameEvent = _reflection.GeneratedProtocolMessageType('CFrameEvent', (_message.Message,), dict(
DESCRIPTOR = _CFRAMEEVENT,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CFrameEvent)
))
_sym_db.RegisterMessage(CFrameEvent)
CFrameStats = _reflection.GeneratedProtocolMessageType('CFrameStats', (_message.Message,), dict(
DESCRIPTOR = _CFRAMESTATS,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CFrameStats)
))
_sym_db.RegisterMessage(CFrameStats)
CFrameStatAccumulatedValue = _reflection.GeneratedProtocolMessageType('CFrameStatAccumulatedValue', (_message.Message,), dict(
DESCRIPTOR = _CFRAMESTATACCUMULATEDVALUE,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CFrameStatAccumulatedValue)
))
_sym_db.RegisterMessage(CFrameStatAccumulatedValue)
CFrameStatsListMsg = _reflection.GeneratedProtocolMessageType('CFrameStatsListMsg', (_message.Message,), dict(
DESCRIPTOR = _CFRAMESTATSLISTMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CFrameStatsListMsg)
))
_sym_db.RegisterMessage(CFrameStatsListMsg)
CStreamingSessionStats = _reflection.GeneratedProtocolMessageType('CStreamingSessionStats', (_message.Message,), dict(
DESCRIPTOR = _CSTREAMINGSESSIONSTATS,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CStreamingSessionStats)
))
_sym_db.RegisterMessage(CStreamingSessionStats)
CDebugDumpMsg = _reflection.GeneratedProtocolMessageType('CDebugDumpMsg', (_message.Message,), dict(
DESCRIPTOR = _CDEBUGDUMPMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CDebugDumpMsg)
))
_sym_db.RegisterMessage(CDebugDumpMsg)
CLogMsg = _reflection.GeneratedProtocolMessageType('CLogMsg', (_message.Message,), dict(
DESCRIPTOR = _CLOGMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CLogMsg)
))
_sym_db.RegisterMessage(CLogMsg)
CLogUploadMsg = _reflection.GeneratedProtocolMessageType('CLogUploadMsg', (_message.Message,), dict(
DESCRIPTOR = _CLOGUPLOADMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CLogUploadMsg)
))
_sym_db.RegisterMessage(CLogUploadMsg)
CTransportSignalMsg = _reflection.GeneratedProtocolMessageType('CTransportSignalMsg', (_message.Message,), dict(
WebRTCMessage = _reflection.GeneratedProtocolMessageType('WebRTCMessage', (_message.Message,), dict(
Candidate = _reflection.GeneratedProtocolMessageType('Candidate', (_message.Message,), dict(
DESCRIPTOR = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE_CANDIDATE,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CTransportSignalMsg.WebRTCMessage.Candidate)
))
,
DESCRIPTOR = _CTRANSPORTSIGNALMSG_WEBRTCMESSAGE,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CTransportSignalMsg.WebRTCMessage)
))
,
DESCRIPTOR = _CTRANSPORTSIGNALMSG,
__module__ = 'steammessages_remoteplay_pb2'
# @@protoc_insertion_point(class_scope:CTransportSignalMsg)
))
_sym_db.RegisterMessage(CTransportSignalMsg)
_sym_db.RegisterMessage(CTransportSignalMsg.WebRTCMessage)
_sym_db.RegisterMessage(CTransportSignalMsg.WebRTCMessage.Candidate)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)
|
[
"2720787+rossengeorgiev@users.noreply.github.com"
] |
2720787+rossengeorgiev@users.noreply.github.com
|
7b0b6a2ff24158ac13b1eeee4ca1a98bddb849cc
|
55ceefc747e19cdf853e329dba06723a44a42623
|
/_CodeTopics/LeetCode/1201-1400/001260/001260.py3
|
b4101df26ed6ec988c9c9582d04d0a412131f062
|
[] |
no_license
|
BIAOXYZ/variousCodes
|
6c04f3e257dbf87cbe73c98c72aaa384fc033690
|
ee59b82125f100970c842d5e1245287c484d6649
|
refs/heads/master
| 2023-09-04T10:01:31.998311
| 2023-08-26T19:44:39
| 2023-08-26T19:44:39
| 152,967,312
| 0
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 945
|
py3
|
class Solution:
def shiftGrid(self, grid: List[List[int]], k: int) -> List[List[int]]:
m, n = len(grid), len(grid[0])
if m == n == 1:
return grid
def shift():
lastElem = currElem = None
for i in range(m):
for j in range(n):
if i == j == 0:
lastElem = grid[i][j]
grid[i][j] = grid[m-1][n-1]
else:
currElem = grid[i][j]
grid[i][j] = lastElem
lastElem = currElem
for i in range(k):
shift()
return grid
"""
https://leetcode.cn/submissions/detail/339480377/
执行用时:
324 ms
, 在所有 Python3 提交中击败了
11.79%
的用户
内存消耗:
15.1 MB
, 在所有 Python3 提交中击败了
99.13%
的用户
通过测试用例:
107 / 107
"""
|
[
"noreply@github.com"
] |
BIAOXYZ.noreply@github.com
|
d3c1f9e98a976b85cb81eb7fa528283e73842ebc
|
3382efebf73d7123436fcd415f6c953cd5af44ad
|
/Rep_Addn.py
|
c16308acbeb9d6b059c64ac2321e579d093bb197
|
[] |
no_license
|
Samar2173/Basic-Codes
|
b13b861e7b4eeb08906368c4802f26c22e400f28
|
2a5650af731ffb2304c029b42ef90bada88a648a
|
refs/heads/master
| 2020-04-01T13:21:35.441173
| 2018-10-17T13:30:06
| 2018-10-17T13:30:06
| 153,249,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 151
|
py
|
#-*-coding:utf8;-*-
#qpy:3
#qpy:console
print("This is console module")
n=int(input('Enter Number'))
sum=0
for i in range(n,0,-1):
sum+=i
print(sum)
|
[
"noreply@github.com"
] |
Samar2173.noreply@github.com
|
6faecbf965c210422b07c98a674c321567136553
|
8959a3fd6707ee5bb7aadc750acba284bd367a61
|
/test/wlcrawl/ptparse/delWeibo.py
|
e65a790e91f985a1f88924ae79d649c600ab9c1a
|
[
"BSD-3-Clause"
] |
permissive
|
ptphp/PtPy
|
4cc38fc7e7f69dc07a83f295dbbf96a563f33a8f
|
8b0b3ab75773637d1ca22b261158509175f460b5
|
refs/heads/master
| 2021-01-10T20:13:39.657010
| 2014-06-29T01:12:57
| 2014-06-29T01:12:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,162
|
py
|
#delWeibo.py
# -*- coding: utf-8 -*-
from urllib import urlencode
from StringIO import StringIO
from sys import argv
from urlparse import parse_qsl
import pycurl
import re
#以上为本脚本的依赖
b = StringIO()
c = pycurl.Curl()
#这两行定义对象,c为cURL,用以发送http请求,b用于存放cURL得到的response
def fake_write(x):pass
def sigint(signum, frame):
global b, c
del b, c
import sys
print '\n\nsigint received, exiting...'
sys.exit()
import signal
signal.signal(signal.SIGINT, sigint)
def reset(): #清空对象
b.truncate(0)
c.reset()
c.setopt(pycurl.WRITEFUNCTION, b.write)
c.setopt(pycurl.COOKIEJAR, 'cookies.txt')
#cookies.txt存放登录得到的cookies
c.setopt(pycurl.FOLLOWLOCATION, True)
return b, c
def login(username, password):
reset()
c.setopt(pycurl.URL, 'http://3g.sina.com.cn/prog/wapsite/sso/login_submit.php')
c.perform()
data = b.getvalue()
vk = re.search(r'''name="vk"\s+?value="(.*?)"''', data).group(1)
pname = re.search(r'''name="password_(\d+)"''', data).group(1)
reset()
c.setopt(pycurl.POST, True)
c.setopt(pycurl.URL, 'http://3g.sina.com.cn/prog/wapsite/sso/login_submit.php')
c.setopt(pycurl.POSTFIELDS, urlencode({
'mobile': username,
'password_'+pname: password,
'vk': vk,
'remember': 'on',
'submit': '1'
}))
#以上post参数通过curl发送到login_submit.php
c.perform()
return b.getvalue()
def del_tweets():
while True:
reset()
c.setopt(pycurl.URL, 'http://t.sina.cn/dpool/ttt/home.php?cat=1')
c.perform()
#获取包含tweets的页面
data = b.getvalue()
data = re.findall(r'href="mblogDeal\.php\?([^"]+?act=del[^"]+)"', data)
#这两行用正则表达式得到tweets的id
if not data:
break
for i in data:
j = parse_qsl(i)
qs = dict(j)
qs['act'] = 'dodel'
qs = '&'.join(['='.join(k) for k in qs.items()])
url = 'http://t.sina.cn/dpool/ttt/mblogDeal.php?' + qs
#得到删除所有tweets的url列表
reset()
c.setopt(pycurl.WRITEFUNCTION, fake_write)
c.setopt(pycurl.URL, url)
try:
c.perform()
print url
except:pass
def unfollow():
while True:
reset()
c.setopt(pycurl.URL, 'http://t.sina.cn/dpool/ttt/attention.php?cat=0')
c.perform()
data = b.getvalue()
data = re.findall(r'href="attnDeal\.php\?([^"]+?act=del[^"]+)"', data)
if not data:
break
for i in data:
j = parse_qsl(i)
qs = dict(j)
qs['act'] = 'delc'
qs = '&'.join(['='.join(k) for k in qs.items()])
url = 'http://t.sina.cn/dpool/ttt/attnDeal.php?' + qs
reset()
c.setopt(pycurl.WRITEFUNCTION, fake_write)
c.setopt(pycurl.URL, url)
try:
c.perform()
print url
except:pass
def remove_followers(black=False):
while True:
reset()
c.setopt(pycurl.URL, 'http://t.sina.cn/dpool/ttt/attention.php?cat=1')
c.perform()
data = b.getvalue()
data = re.findall(r'href="attnDeal\.php\?([^"]+?act=remove[^"]+)"', data)
if not data:
break
for i in data:
j = parse_qsl(i)
qs = dict(j)
qs['act'] = 'removec'
if black:
qs['black'] = '1'
qs = '&'.join(['='.join(k) for k in qs.items()])
url = 'http://t.sina.cn/dpool/ttt/attnDeal.php?' + qs
reset()
c.setopt(pycurl.WRITEFUNCTION, fake_write)
c.setopt(pycurl.URL, url)
try:
c.perform()
print url
except:pass
if __name__ == '__main__':
username, password = argv[1:]
#从命令行中获取参数,存放于username和password变量
login(username, password)
#登录
del_tweets()
#删除tweets
#unfollow()
#remove_followers()
|
[
"fangtee@qq.com"
] |
fangtee@qq.com
|
6bafbfbbf5306c1daa9bf05643d7e75c6933f2eb
|
7a7c2ef0f0d55165b80abef7a481058aa842bd34
|
/customized_class.py
|
fc2b700e5d2709afbbbfe37b2cde91f1ffc5e62b
|
[] |
no_license
|
TonnyL/MyPythonLearnProject
|
e123e50c6b1c1d18174623e0d5983c0b941dc705
|
1610eb71d83e7058fa23a3834d2f6575d9464ed2
|
refs/heads/master
| 2021-06-06T06:54:11.213971
| 2016-08-03T02:36:58
| 2016-08-03T02:36:58
| 64,402,670
| 2
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 7,745
|
py
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 定制类
# 看到类似__slots__这种形如__xxx__的变量或者函数名就需要注意,在python中是有特殊用途的
# __slots__我们已经知道怎么用了,__len__()方法我们也知道是为了能让class作用于len()函数
# 除此之外,python的class中还有很多这样有特殊用途的函数,可以帮助我们定制类
# __str__
# 我们先定义一个Student类
class Student(object):
def __init__(self, name):
self.name = name
print Student('Tony')
# <__main__.Student object at 0x02A780B0>
# 打印出了对象的地址
# 怎样才能打印出更加好看的信息呢?
# 只需要定义好__str__()方法,返回一个好看的字符串就好了
class Student(object):
def __init__(self, name):
self.name = name
def __str__(self):
return 'Student object (name:%s)' % self.name
s = Student('Tony')
print s
# Student object (name:Tony)
# 同时也可以将调试时使用的方法__repr__()的方法一同写上
class Student(object):
def __init__(self, name):
self.name = name
def __str__(self):
return 'Student object (name:%s)' % self.name
__repr__ = __str__
# __iter__
# 如果一个类想被用于for ... in 循环,类似list和tupel那样,就必须实现一个__iter__()方法,该方法返回一个迭代对象
# 然后,python的for循环就会不断调用该迭代对象的next()方法拿到循环的下一个值,直到遇到StopIteration错误时退出循环
# 我们以斐波那契数列为例,写一个Fib类,可以作用于for循环:
class Fib(object):
def __init__(self):
self.a, self.b = 0, 1 # 初始化两个计数器a,b
def __iter__(self):
return self # 实例本身就是迭代对象,故返回自己
def next(self):
self.a, self.b = self.b, self.a + self.b # 计算下一个值
if self.a > 100: # 退出循环的条件
raise StopIteration();
return self.a # 返回下一个值
# 现在,试试把Fib实例作用于for循环:
for n in Fib():
print n
# 1
# 1
# 2
# 3
# 5
# 8
# 13
# 21
# 34
# 55
# 89
# __getitem__
# Fib实例虽然能作用于for循环,看起来和list有点像,但是,把它当成list来使用还是不行,比如,取第5个元素:
# print Fib()[5]
# TypeError: 'Fib' object does not support indexing
# 要表现得像list那样按照下标取出元素,需要实现__getitem__()方法:
class Fib(object):
def __getitem__(self, n):
a, b = 1, 1
for x in range(n):
a, b = b, a + b
return a
# 现在,就可以按下标访问数列的任意一项了:
f = Fib()
print f[0]
print f[1]
print f[2]
# 1
# 1
# 2
# 但是list有个神奇的切片方法:
print range(100)[5:10]
# [5, 6, 7, 8, 9]
# 对于Fib却报错。原因是__getitem__()传入的参数可能是一个int,也可能是一个切片对象slice,所以要做判断:
class Fib(object):
def __getitem__(self, n):
if isinstance(n, int):
a, b = 1, 1
for x in range(n):
a, b = b, a + b
return a
if isinstance(n, slice):
start = n.start
stop = n.stop
a, b = 1, 1
L = []
for x in range(stop):
if x >= start:
L.append(a)
a, b = b, a + b
return L
# 现在试试Fib的切片:
f = Fib()
print f[0: 5]
# [1, 1, 2, 3, 5]
# 但是没有对step参数作处理:
print f[:10:2]
# [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
# 也没有对负数作处理,所以,要正确实现一个__getitem__()还是有很多工作要做的。
# 此外,如果把对象看成dict,__getitem__()的参数也可能是一个可以作key的object,例如str。
# 与之对应的是__setitem__()方法,把对象视作list或dict来对集合赋值。最后,还有一个__delitem__()方法,用于删除某个元素。
# 总之,通过上面的方法,我们自己定义的类表现得和Python自带的list、tuple、dict没什么区别
# 这完全归功于动态语言的“鸭子类型”,不需要强制继承某个接口。
# __getattr__
# 正常情况下,当我们调用类的方法或属性时,如果不存在,就会报错。比如定义Student类:
class Student(object):
def __init__(self):
self.name = 'Tony'
# 调用name属性,没问题,但是,调用不存在的score属性,就有问题了:
s = Student()
print s.name
# TOny
# print s.score AttributeError: 'Student' object has no attribute 'score'
# 错误信息很清楚地告诉我们,没有找到score这个attribute。
# 要避免这个错误,除了可以加上一个score属性外,Python还有另一个机制,那就是写一个__getattr__()方法,动态返回一个属性
# 修改如下:
class Student(object):
def __init__(self):
self.name = 'Tony'
def __getattr__(self, attr):
if attr=='score':
return 99
# 当调用不存在的属性时,比如score,Python解释器会试图调用__getattr__(self, 'score')来尝试获得属性
# 这样,我们就有机会返回score的值:
s = Student()
print s.score
# 99
# 返回函数也是完全可以的:
class Student(object):
def __getattr__(self, attr):
if attr=='age':
return lambda: 25
# 只是调用方式要变为:
s = Student()
print s.age()
# 25
# 注意,只有在没有找到属性的情况下,才调用__getattr__,已有的属性,比如name,不会在__getattr__中查找。
# 此外,注意到任意调用如s.abc都会返回None,这是因为我们定义的__getattr__默认返回就是None
# 要让class只响应特定的几个属性,我们就要按照约定,抛出AttributeError的错误:
class Student(object):
def __getattr__(self, attr):
if attr=='age':
return lambda: 25
raise AttributeError('\'Student\' object has no attribute \'%s\'' % attr)
# 这实际上可以把一个类的所有属性和方法调用全部动态化处理了,不需要任何特殊手段。
# 这种完全动态调用的特性有什么实际作用呢?作用就是,可以针对完全动态的情况作调用。
# __call__
# 一个对象实例可以有自己的属性和方法,当我们调用实例方法时,我们用instance.method()来调用
# 能不能直接在实例本身上调用呢?类似instance()?在Python中,答案是肯定的。
# 任何类,只需要定义一个__call__()方法,就可以直接对实例进行调用。请看示例:
class Student(object):
def __init__(self, name):
self.name = name
def __call__(self):
print('My name is %s.' % self.name)
# 调用方式如下:
s = Student('Tony')
s()
# My name is Tony.
# __call__()还可以定义参数
# 对实例进行直接调用就好比对一个函数进行调用一样,所以你完全可以把对象看成函数,把函数看成对象
# 因为这两者之间本来就没啥根本的区别
# 如果你把对象看成函数,那么函数本身其实也可以在运行期动态创建出来,因为类的实例都是运行期创建出来的
# 这么一来,我们就模糊了对象和函数的界限
# 那么,怎么判断一个变量是对象还是函数呢?
# 其实,更多的时候,我们需要判断一个对象是否能被调用,能被调用的对象就是一个Callable对象
# 比如函数和我们上面定义的带有__call()__的类实例:
print callable(Student('Tony'))
print callable(max)
print callable([1, 2, 3])
print callable(None)
# True
# True
# False
# False
# 通过callable()函数,我们就可以判断一个对象是否是“可调用”对象。
|
[
"marklztl@sina.cn"
] |
marklztl@sina.cn
|
46a6758d5875a7d57ad50cc97a46edb5fa25bab5
|
d2a3eec49f5032c5f34501b085fdef4af265a873
|
/restrain_jit/becython/representations.py
|
494d84ffb2d89e98a6607414a376fbc49d0ba156
|
[
"MIT"
] |
permissive
|
lvyitian1/restrain-jit
|
3a69634ecf0adfdaa18f1728a4cc29d55721539b
|
f76b3e9ae8a34d2eef87a42cc87197153f14634c
|
refs/heads/master
| 2022-04-09T03:24:27.778381
| 2019-12-09T03:22:58
| 2019-12-09T03:22:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 367
|
py
|
from enum import Enum, auto as _auto
import abc
import typing as t
from dataclasses import dataclass
class Repr:
pass
@dataclass(frozen=True, order=True)
class Reg(Repr):
n:str
pass
@dataclass(frozen=True, order=True)
class Const(Repr):
val:object
pass
@dataclass(frozen=True, order=True)
class Prim(Repr):
qual:str
n:str
pass
|
[
"twshere@outlook.com"
] |
twshere@outlook.com
|
04c9824617f802809f3c0049470676f54f9b31ac
|
e59c3d94254e4d592e8ae52db9d95b9bbc1e5fb4
|
/ames-test/ames-test.py
|
000571b2e3e19acbee09eb60a9c5582738a1eaf7
|
[] |
no_license
|
mina990209/NASA_discovery
|
7cd9fe69a1427ffba1a9f086301f5d8635191748
|
b5ec4a6681e5cccae4f27ef149c19eeb5296e596
|
refs/heads/master
| 2020-08-30T12:49:32.288660
| 2019-11-21T18:13:56
| 2019-11-21T18:13:56
| 218,385,255
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 642
|
py
|
from graphics import*
# import pandas as pd
def main():
# import csv file
# test = pd.read_csv("tester.csv")
# newtest = test.set_index("rows")
# #
# #
# # # isolate specific variable; currently hardcoded
# val = newtest.loc["row 2","col 1"]
# print(val)
#graphics section
# gui()
#
# def gui()
win = GraphWin("Ames Test", 500, 500)
# draw a box
rect = Rectangle(Point(125,125), Point(375, 375))
rect.setFill("red")
rect.draw(win)
# rect.setFill("red")
val_disp = Text(Point(250, 250), 42)
val_disp.draw(win)
win.getMouse()
win.close()
main()
|
[
"jainarchita@gmail.com"
] |
jainarchita@gmail.com
|
b591e0013346ef620438d2e015f86be5394c509f
|
51d442cb0786bd022ea4b62ec7f6f9e310978971
|
/BlenderPlayground/Assets/External Resources/hello_world.py
|
058848fd7d52026a183e175e20d178d163892276
|
[] |
no_license
|
iamchriskelley/theda
|
c912e23225535b8447bc2266ecf2d7895682d1bc
|
045225943a77276516f3819890dd917ad4eb0c38
|
refs/heads/master
| 2020-05-04T03:14:14.978954
| 2019-05-28T07:45:50
| 2019-05-28T07:45:50
| 178,942,973
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 88
|
py
|
import bpy
print("hello world")
object = bpy.data.objects['Body1']
object.select = True
|
[
"iamchriskelley@gmail.com"
] |
iamchriskelley@gmail.com
|
dc1dd380a09f0562de9c0474f2e29dbb8eba66e3
|
6a2a1b2b06bb531d01c9248ee169aa63e2001166
|
/plotter.py
|
80cef009aba67525e35c3197a1830f2227f110d2
|
[] |
no_license
|
tonygallotta/ece568-final-project
|
53cf35009a80e0c36f56e2911958252031ccfd50
|
baf5ca0d4e271902524468b9d4bde1cf0338d61c
|
refs/heads/master
| 2020-12-24T19:03:56.468088
| 2016-04-28T00:41:56
| 2016-04-28T00:41:56
| 57,002,067
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,809
|
py
|
import csv
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.cm as cm
import itertools
published_results = []
experiment_results = []
# column index of various fields
FREQ = 0
VDD = 1
POWER = 2
def autolabel(axis, rects, decimals=2):
# attach some text labels
for rect in rects:
height = rect.get_height()
axis.text(rect.get_x() + rect.get_width() / 2.,
0.5 * height,
'%.*f' % (decimals, float(height)),
fontdict={"color": "black", "size": 10},
ha='center', va='bottom')
with open("publised-spe-results.csv") as csvfile:
reader = csv.reader(csvfile, delimiter=',')
for row in reader:
published_results.append(row)
with open("mcpat_results.csv") as csvfile:
reader = csv.reader(csvfile, delimiter=',')
for row in reader:
experiment_results.append(row)
def get_frequency(r):
return float(r[FREQ]) / 1000
def get_power(r):
return float(r[POWER])
def vdd_equals(vdd):
def vdd_filter(r):
return float(r[VDD]) == vdd
return vdd_filter
# freq is the same for all vdd, just grab the first
x = map(get_frequency, filter(vdd_equals(1.1), published_results))
y1 = map(get_power, filter(vdd_equals(1.1), published_results))
y2 = map(get_power, filter(vdd_equals(1.2), published_results))
y3 = map(get_power, filter(vdd_equals(1.3), published_results))
ylims = [0, 20]
font_size = 10
matplotlib.rcParams.update({'font.size': 10})
fig, axarr = plt.subplots(3, sharex=True, sharey=True)
ax = axarr[0]
ax.set_title("Published vs. Modeled Cell Power Consumption by Frequency: Vdd = 1.1", fontsize=font_size)
ax.set_ylabel("Power (Watts)", fontsize=font_size)
legend = ax.legend(['published', 'modeled'], loc='upper left', fontsize=font_size)
ax.set_ylim(ylims)
ax.plot(x, y1)
ax.plot(x, map(get_power, filter(vdd_equals(1.1), experiment_results)))
legend = ax.legend(['published', 'modeled'], loc='upper left', fontsize=font_size)
ax = axarr[1]
ax.set_title("Published vs. Modeled Cell Power Consumption by Frequency: Vdd = 1.2", fontsize=font_size)
ax.set_ylabel("Power (Watts)", fontsize=font_size)
ax.plot(x, y2)
ax.plot(x, map(get_power, filter(vdd_equals(1.2), experiment_results)))
legend = ax.legend(['published', 'modeled'], loc='upper left', fontsize=font_size)
ax.set_ylim(ylims)
ax = axarr[2]
ax.set_title("Published vs. Modeled Cell Power Consumption by Frequency: Vdd = 1.3", fontsize=font_size)
ax.set_ylabel("Power (Watts)", fontsize=font_size)
ax.set_xlabel("Frequency (GHz)", fontsize=font_size)
ax.plot(x, y3)
ax.plot(x, map(get_power, filter(vdd_equals(1.3), experiment_results)))
legend = ax.legend(['published', 'modeled'], loc='upper left', fontsize=font_size)
ax.set_ylim(ylims)
fig.set_size_inches(7, 7)
plt.savefig("spe-voltage-freq.png",bbox_inches='tight')
plt.close(fig)
plt.show()
|
[
"tgallotta@signal.co"
] |
tgallotta@signal.co
|
7ee0e3a037473836747b536291023045a0d1aa34
|
ef2bc383dd922bcd5ce7e9f47b51dda8801e4883
|
/drummer.py
|
aabd0490fe1df5466d7f24673e518065953c8cbf
|
[] |
no_license
|
jcoviell/drummer
|
e298a7f640ed70521115da6b5cc975ed6d1eb804
|
02ae81cfaf7c550868a2bf1d2a7e323298d573f0
|
refs/heads/master
| 2020-12-24T18:42:19.135958
| 2016-04-24T15:40:18
| 2016-04-24T15:40:18
| 56,979,670
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,264
|
py
|
#always include "object" in parenthesis when creating a new class
class Musician(object):
def __init__(self, sounds):
self.sounds = sounds
def solo(self, length):
for i in range(length):
print(self.sounds[i % len(self.sounds)],)
print('')
class Bassist(Musician): # The Musician class is the parent of the Bassist class
def __init__(self, sounds):
# Call the __init__ method of the parent class
super(Bassist).__init__(["Twang", "Thrumb", "Bling"])
class Guitarist(Musician): #The Guitarist class is the child of the Musician class
def __init__(self, sounds):
# Call the __init__ method of the parent class
super(Guitarist, self).__init__(["Boink", "Bow", "Boom"])
def tune(self):
print("Be with you in a moment")
print("Twoning, sproing, splang")
class Drummer(Musician):
def __init__(self, sounds):
super(Drummer, self).__init__(["Boom", "Ting", "Tap"])
def count_up(self):
print("One... Two... Three... Four...")
def combust(self):
print("Kaboom!!!!!")
"""
nigel = Guitarist(Musician)
nigel.solo(6)
print(nigel.sounds)
"""
pete = Drummer(Musician)
pete.solo(3)
pete.count_up()
pete.combust()
|
[
"jpcoviello@gmail.com"
] |
jpcoviello@gmail.com
|
e7a0d65d7d02ae0fb998dd209c9309eccdba333c
|
45129489b5556a70d3caa6020b0f035de8019a94
|
/probn/30.03/14.py
|
14cf4dd0260a915d30bc6c5effe9b19446e8be87
|
[] |
no_license
|
trofik00777/EgeInformatics
|
83d853b1e8fd1d1a11a9d1f06d809f31e6f986c0
|
60f2587a08d49ff696f50b68fe790e213c710b10
|
refs/heads/main
| 2023-06-06T13:27:34.627915
| 2021-06-23T20:15:28
| 2021-06-23T20:15:28
| 362,217,172
| 3
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 195
|
py
|
def f(a, to):
s = "0123456789"
n = ""
while a > 0:
b = a % to
a //= to
n += s[b]
return n[::-1]
print(f(128**30 + 16**60 - 16, 8).count("7"))
|
[
"noreply@github.com"
] |
trofik00777.noreply@github.com
|
381cf5a3d10eebe2a5063ef8ec14a01c255cd78a
|
813c34988d17fc13165e50456fdf570b5452e50e
|
/Lab4-6/Lab4/Exercitiu_pachete/main/app.py
|
aa6a09571a817363408dc8d64641d866affcfee3
|
[] |
no_license
|
Burbon13/Python
|
094538b7316661be267ce486a63b267a8bab7121
|
b22977b0b4e1c939be57c806407300862b362bb6
|
refs/heads/master
| 2020-03-28T04:38:44.013975
| 2018-09-06T20:13:02
| 2018-09-06T20:13:02
| 147,727,537
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 148
|
py
|
from ui.console import isPrimeUI
def run():
while True:
number = int(input("Introduceti un numar "))
isPrimeUI(number)
run()
|
[
"razvan_roatis@yahoo.com"
] |
razvan_roatis@yahoo.com
|
89a45d6d58354db3498fed2ef38af288af442a70
|
e6004af62641749060a4ac45d4f2c221ef9aaa36
|
/server/APJP/Application.py
|
60a092900d55d801511a0c6f816ac6186f43a177
|
[] |
no_license
|
lixingke3650/APJP-BAE-Python-
|
e715237423bc4f0f0f6f7b25ff977e66e08c151a
|
604af67316fd6887d7074c4e64d0d1d0ff13701c
|
refs/heads/master
| 2020-04-08T14:58:50.461325
| 2014-01-19T12:41:50
| 2014-01-19T12:41:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,262
|
py
|
# APJP, A PHP/JAVA PROXY
# Copyright (C) 2009-2012 Jeroen Van Steirteghem
#
# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import HTTP
import HTTPS
import webob
import errno
class Application():
def __call__(self, environ, start_response):
request = webob.Request(environ)
if 0 > request.path_info.find('HTTPS') :
application = HTTP.Application()
return application(environ, start_response)
else:
application = HTTPS.Application()
return application(environ, start_response)
response = webob.Response(None, 200, None, None)
return response(environ, start_response)
|
[
"lixingke3650@gmail.com"
] |
lixingke3650@gmail.com
|
8db8802a656d037982623fb0230012a20cd84642
|
a727818c6ecce84359a898a1791158f50d4a8c09
|
/Day_3/ex_1.py
|
fe2aa83a4103ef546c9e0b3fc97604b9b3e02cef
|
[] |
no_license
|
rahulkumar353/open_cv
|
d6f6c652c344eb7c234682685f24df55c98e13d5
|
c9b0ecdd95dec3e4a4b446cd9454c3ba366ca0a4
|
refs/heads/master
| 2022-11-20T04:54:52.024321
| 2020-07-21T13:16:21
| 2020-07-21T13:16:21
| 281,150,720
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 456
|
py
|
import cv2
img=cv2.imread('hand3.jpeg',1)
img=cv2.resize(img, (300, 300))
blur=cv2.GaussianBlur(img,(7,7),0)
#blur = cv2.medianBlur(img, 11)
edge=cv2.Canny(blur,40,150)
contours, hierarchy = cv2.findContours(edge, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
print("total no of contours =" + str(len(contours)))
res=cv2.drawContours(img, contours, -1, (0, 255, 0), 2)
cv2.imshow('Result', res)
cv2.waitKey(0)
cv2.destroyAllWindows()
|
[
"noreply@github.com"
] |
rahulkumar353.noreply@github.com
|
138e76e563c0be99cd1a2c7c9f4f184c4f2ae32a
|
49b264ea470246fa685192b90be2aba8b94cf803
|
/src/pyotelem/dtag.py
|
f4dee7256ec3c5723374200e17a1f1aba60c1ac6
|
[
"MIT",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
ryanjdillon/pyotelem
|
284bf310ac910b93d1be0e1efc58bb29bb2285be
|
3c92a368c53631046ed74d073b0af498226567ad
|
refs/heads/master
| 2023-04-13T23:31:12.415992
| 2019-12-17T14:59:23
| 2019-12-17T14:59:23
| 104,341,008
| 0
| 0
|
MIT
| 2021-04-20T19:05:55
| 2017-09-21T11:42:53
|
Python
|
UTF-8
|
Python
| false
| false
| 4,256
|
py
|
def fix_gaps(y):
"""Linearly interpolates over NaNs in 1D input array x
Args
----
x: ndarray
array containing NaNs to interpolate over
Returns
-------
y_interp: ndarray
array with NaN values replaced by interpolated values
"""
import numpy
# Boolean mask for all values not equal to NaN in input array
not_nan = ~numpy.isnan(y)
# x values for array elements to be interpolated
xp = numpy.where(not_nan)
# y values for array elements to be interpolated
yp = y[not_nan]
x_interp = numpy.arange(len(xp))
y_interp = numpy.interp(x_interp, xp, yp)
return y_interp
def buffer(x, n, p=0, opt=None, z_out=True):
"""Mimic MATLAB routine to generate buffer array
MATLAB docs here: https://se.mathworks.com/help/signal/ref/buffer.html
Args
----
x: ndarray
Signal array
n: int
Number of data segments
p: int
Number of values to overlap
opt: str
Initial condition options. None (default) sets the first `p` values to
zero, while 'nodelay' begins filling the buffer immediately.
z_out: bool
Boolean switch to return z array. True returns an additional array with
these values. False returns only the buffer array including these
values.
Returns
-------
b: ndarray
buffer array with dimensions (n, cols)
z: ndarray
array of values leftover that do not completely fill an n-length
segment with overlap
"""
import numpy
if p >= n:
raise ValueError("p ({}) must be less than n ({}).".format(p, n))
# Calculate number of columns of buffer array
cols = int(numpy.ceil(len(x) / (n - p)))
# Check for opt parameters
if opt == "nodelay":
# Need extra column to handle additional values left
cols += 1
elif opt is not None:
raise SystemError(
"Only `None` (default initial condition) and "
"`nodelay` (skip initial condition) have been "
"implemented"
)
# Create empty buffer array
b = numpy.zeros((n, cols))
# Fill buffer by column handling for initial condition and overlap
j = 0
for i in range(cols):
# Set first column to n values from x, move to next iteration
if i == 0 and opt == "nodelay":
b[0:n, i] = x[0:n]
continue
# set first values of row to last p values
elif i != 0 and p != 0:
b[:p, i] = b[-p:, i - 1]
# If initial condition, set p elements in buffer array to zero
else:
b[:p, i] = 0
# Get stop index positions for x
k = j + n - p
# Get stop index position for b, matching number sliced from x
n_end = p + len(x[j:k])
# Assign values to buffer array from x
b[p:n_end, i] = x[j:k]
# Update start index location for next iteration of x
j = k
# TODO implement this better
# Hackish handling of z array creation. Problematic if redundant values;
# though that should be very unlikely in sensor signal input, right?
if z_out is True:
if any(b[:, -1] == 0):
# make array of leftover elements without zeros or overlap repeats
z = numpy.array([i for i in b[:, -1] if i != 0 and i not in b[:, -2]])
b = b[:, :-1]
else:
z = numpy.array([])
return b, z
else:
return b
def event_on(cue, t):
"""Find indices where in t (time array) where event is on
k = 1 when cue is on
k = 0 when cue is off
Args
----
cue: numpy.ndarray, shape (n, 2)
is a list of events in the format: cue = [start_time,duration]
t: ndarray
array of time stames in seconds
Returns
-------
k: numpy.ndarray, dtype bool
index of cues where event is on
not_k: numpy.ndarray, dtype bool
is the complement of k.
Note
----
`notk` change to `k`
"""
import numpy
k = numpy.zeros(len(t), dtype=bool)
cst = cue[:, 0]
ce = cue[:, 0] + cue[:, 1]
for kk in range(len(cue)):
k = k | ((t >= cst[kk]) & (t < ce[kk]))
not_k = k == 0
return k, not_k
|
[
"ryanjamesdillon@gmail.com"
] |
ryanjamesdillon@gmail.com
|
36cf178976e5be4c0e55aea9a3c2ab34eb0264a2
|
4997449156b8a15f0ddfff7003f16b78b9868b56
|
/build/haptic-shared-control/geomagic_touch/geomagic_control/catkin_generated/pkg.develspace.context.pc.py
|
3d6a9c99ca5fab6ec4ec79204efac4198ad4f958
|
[] |
no_license
|
terryxychan/MotionPlanning
|
f9473ab79f044bf2b2b5166c4dfb5d7e242f3f03
|
b59c9e757c900f2eb5aa0667f58f384e1dd38cc3
|
refs/heads/master
| 2020-04-09T15:48:24.265830
| 2018-12-17T17:13:17
| 2018-12-17T17:13:17
| 160,436,299
| 1
| 2
| null | 2018-12-17T15:12:33
| 2018-12-05T00:24:11
|
Makefile
|
UTF-8
|
Python
| false
| false
| 502
|
py
|
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/wall-e/Terry_ws/devel/include".split(';') if "/home/wall-e/Terry_ws/devel/include" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;std_msgs;geometry_msgs;genmsg;rosconsole;tf;urdf".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "geomagic_control"
PROJECT_SPACE_DIR = "/home/wall-e/Terry_ws/devel"
PROJECT_VERSION = "1.0.0"
|
[
"yychan@bu.edu"
] |
yychan@bu.edu
|
32582de1d72d19c3056ffa1a574b434948189035
|
516d8b09391fcf6f1dd95fb665a617c4982af55d
|
/contact/migrations/0015_auto_20200330_2016.py
|
4b80ff1a310fb13e41c97875caaa8f34ffcddcd3
|
[] |
no_license
|
rezmehp/abasian-peroject
|
33eb357fbef3591b9cdd7d5a73fb2c90b62fb7a7
|
5c09a4d235719933f10688454066962dae13f3f5
|
refs/heads/master
| 2023-04-06T21:17:12.855048
| 2021-04-13T15:16:23
| 2021-04-13T15:16:23
| 235,763,509
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 617
|
py
|
# Generated by Django 3.0.2 on 2020-03-30 15:46
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contact', '0014_remove_contactuserpayam4_tarikhjavab'),
]
operations = [
migrations.AlterField(
model_name='contactuserpayam4',
name='usernamefkey',
field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL),
),
]
|
[
"rezmehproject@gmail.com"
] |
rezmehproject@gmail.com
|
ce0f95ab73e4c27e33feae70b78339a270859841
|
034e07aa9a3cc7cd47b7cb46522f1f599469088b
|
/Physics 331/Textbook Programs/Chapter 8/getstats.py
|
0d96d29debc5546ad211aae207e2945a0e13414c
|
[] |
no_license
|
CodyDBrown/Physics-331
|
5799f239e667897a82720aecd5d6c2bc9194f5ca
|
a2faadb9bb83cac67535b3e992a8577a9d3fd1ed
|
refs/heads/master
| 2020-03-20T02:29:43.705568
| 2019-02-06T23:26:19
| 2019-02-06T23:26:19
| 137,114,945
| 0
| 0
| null | 2018-08-28T16:06:11
| 2018-06-12T18:55:25
|
Python
|
UTF-8
|
Python
| false
| false
| 905
|
py
|
def getstats(x, y):
"""
Determine the statistical measured for an array of data points 'x' and 'y'
Inputs
----------
x: Independent varriable
y: dependent varriable.
Outputs
----------
mean: Mean of 'x'
dmean: Uncertainty in the mean
variance: Variance
"""
import numpy as np
#Make sure the input is an array
x = np.array(x)
y = np.array(y)
#Check to make sure the inputs are the same length
if len(x) != len(y):
print('ERROR: Arrays x ({}) and y ({}) need to be the same length'.format(len(x), len(y)))
return
sy = sum(y)
sxy = sum(x*y)
sx2y = sum(x**2 * y)
mean = sxy / sy
if len(x) > 1:
variance = (sx2y -2*mean*sxy + mean**2 * sy) / (sy - 1)
else:
variance = 0
dmean = np.sqrt(variance / sy)
stats = np.array([mean, dmean, variance])
return stats
|
[
"noreply@github.com"
] |
CodyDBrown.noreply@github.com
|
fa43c1233f1b58f187b49192dd5934802bf36cd0
|
6b65442dd3ba31c5f825dc56652728ca742dd01a
|
/src/libs/baseview.py
|
dd51942aa39abd01857d70ac1e3fb0a4dfa76550
|
[
"Apache-2.0"
] |
permissive
|
ttcats/tyearning
|
cf11d03bf964df9f995b5fe729995aea2bfe954f
|
33f16226ec81950b032c3cbae391e0a3bc1d592a
|
refs/heads/master
| 2020-03-21T07:22:41.744152
| 2018-06-22T11:35:19
| 2018-06-22T11:35:19
| 138,276,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,554
|
py
|
from rest_framework.permissions import (
IsAdminUser,
IsAuthenticated,
BasePermission
)
from core.models import globalpermissions
from rest_framework.views import APIView
'''
user.is_staff == True ,IsAdminUser;
'''
class BaseView(APIView):
permission_classes = (IsAuthenticated,)
def get(self, request, args: str = None):
pass
def post(self, request, args: str = None):
pass
def put(self, request, args: str = None):
pass
def delete(self, request, args: str = None):
pass
class SuperUserpermissions(APIView):
#permission_classes = (IsAdminUser,)
permission_classes = (IsAuthenticated,)
def get(self, request, args: str = None):
pass
def post(self, request, args: str = None):
pass
def put(self, request, args: str = None):
pass
def delete(self, request, args: str = None):
pass
class AnyLogin(APIView):
permission_classes = ()
authentication_classes = ()
def get(self, request, args: str = None):
pass
def post(self, request, args: str = None):
pass
def put(self, request, args: str = None):
pass
def delete(self, request, args: str = None):
pass
'''
平台页面权限permission
'''
class WebPermission(BasePermission):
def has_permission(self, request, view):
permission = globalpermissions.objects.filter(authorization=request.user).first()
if permission is not None and permission.dingding == 0:
return True
|
[
"ttcats@sina.com"
] |
ttcats@sina.com
|
01e46e154082881e5ff9662c4d950a5b5a985a48
|
8bb972ef7f6ab1db947be1f556eaa309fa5caa2b
|
/utils/decorators.py
|
a966c4b5b0a4eabdcc2eccb02ceb04c650808a61
|
[] |
no_license
|
pr4k/Auction-Web-App
|
efaebe96e7a660a79454d2a43865cfd00d90f149
|
e535f78e0a32f9bae07bc01958d0ce2873184afb
|
refs/heads/master
| 2020-05-20T07:23:11.102253
| 2019-05-07T17:39:20
| 2019-05-07T17:39:20
| 185,445,950
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,254
|
py
|
from flask import session, redirect, url_for, flash, g, abort
from functools import wraps
def login_required(f):
@wraps(f)
def decorated(*args, **kwargs):
if "user_id" in session and session["user_id"]:
return f(*args, **kwargs)
else:
flash("You need to be logged in to access this page.")
return redirect(url_for('login'))
return decorated
def confirmed_email_required(f):
@wraps(f)
def decorated(*args, **kwargs):
if "user_id" in session and session["user_id"]:
if not g.user.emailconf:
flash("Please confirm your email in order to access that page.")
return redirect(url_for('dashboard'))
else:
return f(*args, **kwargs)
else:
flash("You need to be logged in to access that page.")
return redirect(url_for('login'))
return decorated
def data_required(f):
@wraps(f)
def decorated(*args, **kwargs):
if not g.user.firstsociallogin:
return f(*args, **kwargs)
else:
flash("You need to enter the additional information to access this page :)")
return redirect(url_for('first_social'))
return decorated
|
[
"prakhark19@gmail.com"
] |
prakhark19@gmail.com
|
48f381373ab22065c5ba0974915c1f94ee648552
|
57dbc8c59ed683a4ba5c1c29867edb8ab46eb3b1
|
/859. Buddy Strings/python.py
|
e1d220e9d713aa52f74c631548a1857a41e759a7
|
[] |
no_license
|
yuan-chen-hu/LeetCode-Practice
|
1b4ada528f5165ea61f681f08b6c90727c7248b4
|
aaccf440f1b67ecde897cbf873a8965832db1900
|
refs/heads/main
| 2023-02-18T18:53:17.988440
| 2021-01-22T18:01:59
| 2021-01-22T18:01:59
| 331,450,385
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 816
|
py
|
class Solution:
def buddyStrings(self, A: str, B: str) -> bool:
if len(A)!=len(B):
return False
old=None
if A==B:
C=sorted(A)
for i in C:
if old==i:
return True
old=i
return False
count=0
storeA=[]
storeB=[]
for i in range(len(A)):
if A[i]!=B[i]:
count+=1
storeA.append(A[i])
storeB.append(B[i])
if count>2:
return False
if count==2:
if storeA[0]not in storeB :
return False
if storeA[1]not in storeB :
return False
return True
|
[
"yuanchenhu0309@gmail.com"
] |
yuanchenhu0309@gmail.com
|
ca496b609ef10843b2fb8901ed92a9abe39ff3f1
|
5b54d73e3e2eeeb348884261b60c930cb9d610fd
|
/env/bin/rqworker
|
1ac9c19a1565545f64de9acd0502e735efc5dcc0
|
[] |
no_license
|
AhmadAbdoli97/frappe-bench
|
acba2fee86ce25ea608db55ca421c746c4f4d733
|
321a9c56289252b326edc649570230ed4e612ef2
|
refs/heads/main
| 2023-06-30T07:36:02.584260
| 2021-08-04T10:26:49
| 2021-08-04T10:26:49
| 392,624,116
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 233
|
#!/home/ahmed/frappe-bench/env/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from rq.cli import worker
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(worker())
|
[
"ahmadabdoli29@gmail.com"
] |
ahmadabdoli29@gmail.com
|
|
5e686c1e69f1784db3ed79c919a8ae7247bfc439
|
1af178aa9808629c98172ed2a1d73c66e7d78dae
|
/myapp/migrations/0001_initial.py
|
407025b70df8a31b47b838d2cedde6a8892cc8a9
|
[] |
no_license
|
ian-yitzhak/django-pagination-and-product-search
|
58b08540b44bdc6e99275ea9ff51c4530f00b4b2
|
947cd15562a3fbaa2de1fb0711e40145f1171d56
|
refs/heads/master
| 2023-02-20T16:11:08.304036
| 2021-01-22T18:07:51
| 2021-01-22T18:07:51
| 332,025,278
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,159
|
py
|
# Generated by Django 3.1.5 on 2021-01-22 06:03
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('slug', models.SlugField()),
],
),
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('slug', models.SlugField()),
('image', models.ImageField(upload_to='uploads/')),
('price', models.DecimalField(decimal_places=2, max_digits=10)),
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.category')),
],
),
]
|
[
"onyangoian71@gmail.com"
] |
onyangoian71@gmail.com
|
079628cce2775bf9d39315d8f21d0170312b90c1
|
1e13fc61778f9a9486ea58f3012dfe2f9420331b
|
/Chapter 7/titanic_transform.py
|
534439190d36040afda0b1279370678482f89c9c
|
[] |
no_license
|
andrewshir/CollIntel
|
23fabb5ffd2a33bd6843521cc2159fefca548939
|
4bea4e803c32e2b8c8fd6133b0b23b0cca5961cc
|
refs/heads/master
| 2016-08-12T05:17:10.724349
| 2016-04-13T18:49:51
| 2016-04-13T18:49:51
| 43,281,462
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,236
|
py
|
import csv
work_path = 'C:\\Users\Andrew\\Source\\Repos\\CollIntel\\Chapter 7\\'
def traverse_file(row_f, header_f, input_csv_file, output_csv_file, correction):
with open(work_path + input_csv_file, 'rb') as f_input:
reader = csv.reader(f_input)
with open(work_path + output_csv_file, 'wb') as f_output:
writer = csv.writer(f_output)
header = reader.next()
if header_f is not None:
header_f(header, correction)
writer.writerow(header)
for row in reader:
row_f(row, correction)
writer.writerow(row)
def build_title(input_csv_file='train.csv', output_csv_file='train_aug.csv', correction=0):
def row_f(row, correction):
name = row[3-correction]
title = 0
if 'Mr.' in name or 'Don.' in name or 'Dr.' in name or 'Col.' in name or 'Sir.' in name \
or 'Rev.' in name or 'Jonkheer.' in name or 'Capt.' in name or 'Major.' in name:
title = 1
elif 'Mrs.' in name or 'Mme.' in name or 'Lady.' in name or 'Mlle.' in name \
or ' Countess.' in name or 'Ms.' in name or 'Dona.' in name:
title = 2
elif 'Master.' in name:
title = 3
elif 'Miss.' in name:
title = 4
row.append(str(title))
def header_f(header, correction):
header.append('Title')
traverse_file(row_f, header_f, input_csv_file, output_csv_file, correction)
def build_notalone(input_csv_file='train.csv', output_csv_file='train_aug.csv', correction=0):
def row_f(row, correction):
sibsp = int(row[6-correction])
parch = int(row[7-correction])
notalone = 0 if sibsp == 0 and parch == 0 else 1
row.append(str(notalone))
def header_f(header, correction):
header.append('Notalone')
traverse_file(row_f, header_f, input_csv_file, output_csv_file, correction)
def build_family(input_csv_file='train.csv', output_csv_file='train_aug.csv', correction=0):
def row_fill_f(row, correction):
name = row[3-correction]
coma_index = name.find(',')
lastname = name if coma_index == -1 else name[0:coma_index]
d.setdefault(lastname, 0)
d[lastname] += 1
def row_calc_f(row, correction):
name = row[3-correction]
coma_index = name.find(',')
lastname = name if coma_index == -1 else name[0:coma_index]
row.append(str(d[lastname]-1) if lastname in d else '')
def header_f(header, correction):
header.append('Fmemb')
d = {}
temp_file = 'temp.csv'
traverse_file(row_fill_f, header_f, input_csv_file, temp_file, correction)
traverse_file(row_calc_f, None, temp_file, output_csv_file, correction)
build_title()
build_title(input_csv_file='test.csv', output_csv_file='test_aug.csv', correction=1)
# build_notalone(input_csv_file='train_aug.csv', output_csv_file='train_aug1.csv')
# build_notalone(input_csv_file='test_aug.csv', output_csv_file='test_aug1.csv', correction=1)
# build_family(input_csv_file='train_aug1.csv', output_csv_file='train_aug2.csv')
# build_family(input_csv_file='test_aug1.csv', output_csv_file='test_aug2.csv', correction=1)
|
[
"andrewshirokoff@gmail.com"
] |
andrewshirokoff@gmail.com
|
3f64277f1c7d71922101fc70a30d4036e9c69b11
|
c2ee97bfc35b74932dae2d667f10966b296c81d8
|
/event/models/event_zones.py
|
b189af2da436be5d042c3d6e1d782aa077aa5c7f
|
[] |
no_license
|
GMR027/social-events-platform-api
|
4c241bee10a839ca66624243930ed379ef3ec257
|
89bbf030b7801aba8930fe4a7ba432eb14b06cc0
|
refs/heads/integration
| 2023-08-22T23:11:36.205042
| 2021-10-18T22:44:02
| 2021-10-18T22:44:02
| 411,797,995
| 0
| 0
| null | 2021-10-11T15:52:55
| 2021-09-29T19:05:53
|
Python
|
UTF-8
|
Python
| false
| false
| 567
|
py
|
from django.db import models
from common.models import CommonFields
# Create your models here.
class Zone(CommonFields):
zone=models.CharField (
max_length=64,
null=False,
blank=False
)
event = models.ForeignKey(
"event.Event",
verbose_name="Evento",
null=True,
blank=False,
on_delete=models.CASCADE
)
def __str__(self):
return self.zone
class Meta:
verbose_name="Zona"
verbose_name_plural="Zonas"
class JSONAPIMeta:
resource_name="Zone"
|
[
"christopher.guzman.monsalvo@gmail.com"
] |
christopher.guzman.monsalvo@gmail.com
|
54812df5e8ebf9b4d78c86cdaeee501a3b8437b1
|
48e5c0d6d0f0f7df541320dfa292c6cdbd0c95ef
|
/main/test_torch.py
|
5598d49a8accae28d176a8e41aef39049025802e
|
[] |
no_license
|
1036225283/python
|
9f9d5ba4c7aab64775b2441f7e85bd5ade7d1857
|
bb3e0afab316fe66a06910d9d6e34e7589ec8849
|
refs/heads/master
| 2021-06-20T13:07:15.970486
| 2021-02-20T16:53:32
| 2021-02-20T16:53:32
| 182,051,139
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 667
|
py
|
from __future__ import print_function
import torch
# 构造一个5*3的矩阵
x = torch.empty(5, 3)
print(x)
# 构造一个随机初始化的5*3的矩阵
x = torch.rand(5, 3)
print(x)
# 构造一个初始化为0的5*3的矩阵 元素类型为long
x = torch.zeros(5, 3, dtype=torch.long)
print(x)
# 直接用数据构造一个张量
x = torch.tensor([5.5, 3])
print(x)
x = x.new_ones(5, 3, dtype=torch.double) # new_* methods take in sizes
print(x)
# 用指定的数据类型覆盖x
x = torch.randn_like(x, dtype=torch.float) # override dtype!
print(x) # result has the same size
# 打印出张量的大小
print(x.size())
y = torch.rand(5, 3)
print(x + y)
|
[
"qq15171962899"
] |
qq15171962899
|
6c1bd673c4c30b9b39635fb65795753919de274d
|
c269899aba4c4c32efa2b94a9213a9893507d458
|
/cart/views.py
|
aa8667fc2e2bc4f707c6f9017cf03018b6edae43
|
[] |
no_license
|
Code-Institute-Submissions/Project-4-DareBee
|
86fcdb45f325e66fd1426180600520ad152969ff
|
b63cb9f9490b209d03583266b3de44608e3a4270
|
refs/heads/master
| 2022-12-23T05:43:58.184075
| 2020-10-04T14:12:18
| 2020-10-04T14:12:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,959
|
py
|
from django.shortcuts import render, HttpResponse, redirect, reverse, get_object_or_404
from django.contrib import messages
from products.models import Exercise, Mealplan
# Create your views here.
def add_to_exercise_cart(request, exercise_id):
cart = request.session.get("shopping_cart", {})
# check if exercise is not in the cart, then add
if exercise_id not in cart:
exercise = get_object_or_404(Exercise, pk=exercise_id)
# exercise found add to cart
cart[exercise_id] = {
"id": exercise_id,
"title": exercise.title,
"price": f"{exercise.price:.2f}",
"qty": 1
}
# save the cart back to sessions
request.session["shopping_cart"] = cart
messages.success(request, f"{exercise.title} added to your cart!")
return redirect(reverse("view_all_exercise_route"))
else:
cart[exercise_id]["qty"] += 1
request.session["shopping_cart"] = cart
return redirect(reverse("view_all_exercise_route"))
def add_to_mealplan_cart(request, mealplan_id):
# check if mealplan is not in the cart, then add
cart = request.session.get("mealplan_shopping_cart", {})
if mealplan_id not in cart:
mealplan = get_object_or_404(Mealplan, pk=mealplan_id)
# mealplan found add to cart
cart[mealplan_id] = {
"id": mealplan_id,
"title": mealplan.title,
"price": f"{mealplan.price:.2f}",
}
# save the cart back to sessions
request.session["mealplan_shopping_cart"] = cart
messages.success(request,
f"{mealplan.title} added to your cart!")
return redirect(reverse("view_all_mealplans_route"))
else:
messages.success(request,
f"{mealplan.title} already added to your cart!")
return redirect(reverse("view_all_mealplans_route"))
def view_cart(request):
# retrieve the cart
exercise_cart = request.session.get("shopping_cart", {})
mealplan_cart = request.session.get("mealplan_shopping_cart", {})
total = 0
# add total cost for both products
for key, item in exercise_cart.items():
total += (float(item["price"]) * float(item["qty"]))
for key, item in mealplan_cart.items():
total += float(item["price"])
return render(request, "cart/view_cart.template.html", {
"cart": exercise_cart,
"mealplan_cart": mealplan_cart,
"total": f"{total:.2f}"
})
def remove_from_exercise_cart(request, exercise_id):
cart = request.session.get("shopping_cart", {})
# if exercise is in cart
if exercise_id in cart:
# remove from cart
del cart[exercise_id]
# save back to the session
request.session["shopping_cart"] = cart
messages.success(request, "Exercise removed from cart successfully!")
return redirect(reverse("view_all_exercise_route"))
def remove_from_mealplan_cart(request, mealplan_id):
cart = request.session.get("mealplan_shopping_cart", {})
# if mealplan is in cart
if mealplan_id in cart:
# remove from cart
del cart[mealplan_id]
# save back to the session
request.session["mealplan_shopping_cart"] = cart
messages.success(request, "Mealplan removed from cart successfully!")
return redirect(reverse("view_all_mealplans_route"))
def update_exercise_cart_quantity(request, exercise_id):
cart = request.session.get("shopping_cart", {})
quantity = request.POST["qty"]
if exercise_id in cart:
# change the text in box to change
cart[exercise_id]["qty"] = quantity
print(quantity)
messages.success(request, "Quantity has been updated!")
# update the session
request.session["shopping_cart"] = cart
else:
messages.success(request, "Failed to update")
return redirect(reverse('view_cart_route'))
|
[
"m.fareez.aziz@gmail.com"
] |
m.fareez.aziz@gmail.com
|
d294047a757d98160f51a8216a3f00002260b65e
|
cf790f8169918606770683da323c436a20f4fb04
|
/examples/pipeline_wavernn/utils.py
|
e924c9f51250509fb1b95fd8182b27ebf34680fb
|
[
"BSD-2-Clause"
] |
permissive
|
krishnakalyan3/audio
|
f6d3dabf456cd5ce9a8f033b83301ce7bff47f19
|
0cd25093626d067e008e1f81ad76e072bd4a1edd
|
refs/heads/master
| 2023-07-05T08:20:37.366199
| 2021-11-15T14:23:52
| 2021-11-15T14:23:52
| 176,415,764
| 1
| 0
|
BSD-2-Clause
| 2019-03-19T03:27:23
| 2019-03-19T03:27:22
| null |
UTF-8
|
Python
| false
| false
| 1,546
|
py
|
import logging
import os
import shutil
from collections import defaultdict, deque
import torch
class MetricLogger:
r"""Logger for model metrics
"""
def __init__(self, group, print_freq=1):
self.print_freq = print_freq
self._iter = 0
self.data = defaultdict(lambda: deque(maxlen=self.print_freq))
self.data["group"].append(group)
def __setitem__(self, key, value):
self.data[key].append(value)
def _get_last(self):
return {k: v[-1] for k, v in self.data.items()}
def __str__(self):
return str(self._get_last())
def __call__(self):
self._iter = (self._iter + 1) % self.print_freq
if not self._iter:
print(self, flush=True)
def save_checkpoint(state, is_best, filename):
r"""Save the model to a temporary file first,
then copy it to filename, in case the signal interrupts
the torch.save() process.
"""
if filename == "":
return
tempfile = filename + ".temp"
# Remove tempfile in case interuption during the copying from tempfile to filename
if os.path.isfile(tempfile):
os.remove(tempfile)
torch.save(state, tempfile)
if os.path.isfile(tempfile):
os.rename(tempfile, filename)
if is_best:
shutil.copyfile(filename, "model_best.pth.tar")
logging.info("Checkpoint: saved")
def count_parameters(model):
r"""Count the total number of parameters in the model
"""
return sum(p.numel() for p in model.parameters() if p.requires_grad)
|
[
"noreply@github.com"
] |
krishnakalyan3.noreply@github.com
|
3f501b85fb272f6e69e3de4404df13da27f197d5
|
35b622843b5a14cef90bccd8fdefe6e2aa7f58e8
|
/venv/Scripts/pip-script.py
|
add663e2a656062c04fddb5d4792452504bcaa07
|
[] |
no_license
|
bkapilg/sample1
|
5f0904b0818c53cc45b85a6a5ca1e1441ad8f95d
|
d558a7727a73c810826ab7befdf06635893c0620
|
refs/heads/master
| 2022-11-22T14:50:42.280475
| 2020-07-25T18:15:06
| 2020-07-25T18:15:06
| 282,500,288
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 414
|
py
|
#!C:\Users\20126635\PycharmProjects\sample1\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('pip==19.0.3', 'console_scripts', 'pip')()
)
|
[
"kartikeybarsainya12@gmail.com"
] |
kartikeybarsainya12@gmail.com
|
1f4a7e9c9982c3b6f76d3ff626f68bd8d2da3f60
|
ea9559246d7b482661a75a79618b9b9035f0d30c
|
/refinery/bnpy/bnpy-dev/bnpy/learnalg/StochasticOnlineVBLearnAlg.py
|
8b3a2151a063d2ea073736f2d9039157c05134fb
|
[
"MIT"
] |
permissive
|
ajbloureiro/refinery
|
998438fad170bf7a73d1dd66df444aa43a978ab2
|
0d5de8fc3d680a2c79bd0e9384b506229787c74f
|
refs/heads/master
| 2021-06-01T02:50:57.259433
| 2016-09-02T19:42:52
| 2016-09-02T19:42:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,540
|
py
|
'''
StochasticOnlineVBLearnAlg.py
Implementation of stochastic online VB (soVB) for bnpy models
'''
import numpy as np
from LearnAlg import LearnAlg
class StochasticOnlineVBLearnAlg(LearnAlg):
def __init__(self, **kwargs):
''' Creates stochastic online learning algorithm,
with fields rhodelay, rhoexp that define learning rate schedule.
'''
super(type(self),self).__init__(**kwargs)
self.rhodelay = self.algParams['rhodelay']
self.rhoexp = self.algParams['rhoexp']
def fit(self, hmodel, DataIterator, SS=None):
''' Run soVB learning algorithm, fit global parameters of hmodel to Data
Returns
--------
LP : local params from final pass of Data
Info : dict of run information, with fields
evBound : final ELBO evidence bound
status : str message indicating reason for termination
{'all data processed'}
'''
LP = None
rho = 1.0 # Learning rate
nBatch = float(DataIterator.nBatch)
# Set-up progress-tracking variables
iterid = -1
lapFrac = np.maximum(0, self.algParams['startLap'] - 1.0/nBatch)
if lapFrac > 0:
# When restarting an existing run,
# need to start with last update for final batch from previous lap
DataIterator.lapID = int(np.ceil(lapFrac)) - 1
DataIterator.curLapPos = nBatch - 2
iterid = int(nBatch * lapFrac) - 1
self.set_start_time_now()
while DataIterator.has_next_batch():
# Grab new data
Dchunk = DataIterator.get_next_batch()
# Update progress-tracking variables
iterid += 1
lapFrac += 1.0/nBatch
self.set_random_seed_at_lap(lapFrac)
# M step with learning rate
if SS is not None:
rho = (iterid + self.rhodelay) ** (-1.0 * self.rhoexp)
hmodel.update_global_params(SS, rho)
# E step
LP = hmodel.calc_local_params(Dchunk)
SS = hmodel.get_global_suff_stats(Dchunk, LP, doAmplify=True)
# ELBO calculation
evBound = hmodel.calc_evidence(Dchunk, SS, LP)
# Save and display progress
self.add_nObs(Dchunk.nObs)
self.save_state(hmodel, iterid, lapFrac, evBound)
self.print_state(hmodel, iterid, lapFrac, evBound)
#Finally, save, print and exit
status = "all data processed."
self.save_state(hmodel,iterid, lapFrac, evBound, doFinal=True)
self.print_state(hmodel, iterid, lapFrac, evBound, doFinal=True, status=status)
return None, self.buildRunInfo(evBound, status)
|
[
"daeil.kim@nytimes.com"
] |
daeil.kim@nytimes.com
|
203ba7939ec3b6e2e005c09cdf947028f34b2708
|
52b07ec619504acd850b0ecdebf04f148c184722
|
/exploracao_espacial/exploracao_espacial/settings.py
|
6ad783c714bb87467ac83b978a2d985afb89f0d6
|
[] |
no_license
|
nnatsumy/cefet-web-templates
|
df2c6b78531fef4676f88910bebc4c402e0f71ee
|
6ceaabf9d759d420a62baab463db03b74dee87b0
|
refs/heads/master
| 2020-04-06T10:44:36.636357
| 2018-11-13T14:08:39
| 2018-11-13T14:08:39
| 157,390,085
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,263
|
py
|
"""
Django settings for exploracao_espacial project.
Generated by 'django-admin startproject' using Django 2.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'f=acc@k$#fny&%ohi&r701rrwp7ell!5y^wgr^@^mfnt47mq4%'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'space',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'exploracao_espacial.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
'/var/www/static/',
]
WSGI_APPLICATION = 'exploracao_espacial.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/2.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL = '/static/'
|
[
"you@example.com"
] |
you@example.com
|
ef88ad46963ae78719c011257fb6012f7f4d47ca
|
2f38a0b3ef92e981b79e92d9b9a4357e35354a05
|
/userbot/plugins/deepfryer_IQ.py
|
30dfd8a5fa07b53eb4502070fc01804386e5c0ed
|
[
"Apache-2.0"
] |
permissive
|
Sarkaaut/telethon-iraq
|
b50233189200be4ca5cddf9be220aefca46812bd
|
a247d2a44c547a2a98befdc4d7be93d55a077f70
|
refs/heads/main
| 2023-03-17T01:23:43.430482
| 2020-11-22T17:53:53
| 2020-11-22T17:53:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,336
|
py
|
#TeleOniOn
""" Userbot module for frying stuff. ported by @TeleOniOn """
import io
from random import randint, uniform
from PIL import Image, ImageEnhance, ImageOps
from telethon.tl.types import DocumentAttributeFilename
from uniborg.util import admin_cmd
from telethon import events
@borg.on(admin_cmd(pattern="deepfry(?: |$)(.*)", outgoing=True))
async def deepfryer(event):
try:
frycount = int(event.pattern_match.group(1))
if frycount < 1:
raise ValueError
except ValueError:
frycount = 1
if event.is_reply:
reply_message = await event.get_reply_message()
data = await check_media(reply_message)
if isinstance(data, bool):
await event.edit("`I can't deep fry that!`")
return
else:
await event.edit("`Reply to an image or sticker to deep fry it!`")
return
# download last photo (highres) as byte array
await event.edit("`Downloading media…`")
image = io.BytesIO()
await event.client.download_media(data, image)
image = Image.open(image)
# fry the image
await event.edit("`Deep frying media…`")
for _ in range(frycount):
image = await deepfry(image)
fried_io = io.BytesIO()
fried_io.name = "image.jpeg"
image.save(fried_io, "JPEG")
fried_io.seek(0)
await event.reply(file=fried_io)
async def deepfry(img: Image) -> Image:
colours = (
(randint(50, 200), randint(40, 170), randint(40, 190)),
(randint(190, 255), randint(170, 240), randint(180, 250))
)
img = img.copy().convert("RGB")
# Crush image to hell and back
img = img.convert("RGB")
width, height = img.width, img.height
img = img.resize((int(width ** uniform(0.8, 0.9)), int(height ** uniform(0.8, 0.9))), resample=Image.LANCZOS)
img = img.resize((int(width ** uniform(0.85, 0.95)), int(height ** uniform(0.85, 0.95))), resample=Image.BILINEAR)
img = img.resize((int(width ** uniform(0.89, 0.98)), int(height ** uniform(0.89, 0.98))), resample=Image.BICUBIC)
img = img.resize((width, height), resample=Image.BICUBIC)
img = ImageOps.posterize(img, randint(3, 7))
# Generate colour overlay
overlay = img.split()[0]
overlay = ImageEnhance.Contrast(overlay).enhance(uniform(1.0, 2.0))
overlay = ImageEnhance.Brightness(overlay).enhance(uniform(1.0, 2.0))
overlay = ImageOps.colorize(overlay, colours[0], colours[1])
# Overlay red and yellow onto main image and sharpen the hell out of it
img = Image.blend(img, overlay, uniform(0.1, 0.4))
img = ImageEnhance.Sharpness(img).enhance(randint(5, 300))
return img
async def check_media(reply_message):
if reply_message and reply_message.media:
if reply_message.photo:
data = reply_message.photo
elif reply_message.document:
if DocumentAttributeFilename(file_name='AnimatedSticker.tgs') in reply_message.media.document.attributes:
return False
if reply_message.gif or reply_message.video or reply_message.audio or reply_message.voice:
return False
data = reply_message.media.document
else:
return False
else:
return False
if not data or data is None:
return False
else:
return data
|
[
"noreply@github.com"
] |
Sarkaaut.noreply@github.com
|
c33b61597c596c7533115ae9341cd2c626972d22
|
737c825f562fcdc95137f796d7b643db32f52bf4
|
/src/main/python/prototype.py
|
cc2a85152c7a6ac36b7fcb35d8e7106e81c7dca6
|
[] |
no_license
|
elfkinx/soundcloudArchiving
|
75e4959ceea430ab4de86a32c7c2f18021f70b80
|
ce140ece90825b85ede2175813736f0a04b01142
|
refs/heads/master
| 2020-12-04T21:17:29.346106
| 2020-02-16T12:57:19
| 2020-02-16T12:57:19
| 231,905,238
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,479
|
py
|
"""
scdownload (SoundCloud Downloader)
This file contains prototype code / examples of how additional functionality can be implemented
The use of the soundcloud API is very restricted. In order to use certain custom functionality you must be registered
as a soundcloud developer and/or authenticate using their OAuth API. This set-up would be prohibitive for most users
and much of the data can be gotten from the raw HTTP requests that the HTML pages send.
Below includes some of the functionality that could be additionally supported if developer registration and
authentication was completed
#######################################################################################################################
Uploading (adapted from https://developers.soundcloud.com/docs#uploading example)
def all_files_in(self, path, files=[]):
for next in os.listdir(path):
files.append(next)
next_path = os.path.join(path, next)
if os.path.isdir(next_path):
self.all_files_iter(next_path, files)
# create a client object with access token
client = soundcloud.Client(access_token='YOUR_ACCESS_TOKEN')
all_tracks = all_files_in(DATA_ROOT)
for track in all_tracks:
# upload audio file
uploaded_track = client.post('/tracks', track={
'title': track,
'asset_data': open(track, 'rb')
})
#######################################################################################################################
"""
|
[
"verticalwallmonkey+github@gmail.com"
] |
verticalwallmonkey+github@gmail.com
|
ef97ae543a3212d1b2ff32ad02b6a9c469d7a2a0
|
c59f289e08860fa3daf48dd5476f4f3b0a9c44e0
|
/Class/Class4/4.04.py
|
08cf46e88d4053b4357d7e4fe35b00d8a1573871
|
[] |
no_license
|
Yaraslau-Ilnitski/homework
|
3abfc4c6115fd0cbf81805f3f22c813eeaadb113
|
70f7cda71db47aa34f2fb2af6904b0354c1c1f07
|
refs/heads/master
| 2023-03-18T17:54:27.199191
| 2021-03-11T16:51:01
| 2021-03-11T16:51:01
| 340,057,189
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 109
|
py
|
a = int(input("Введите число\n"))
s = 0
i = 0
while i <= (a):
s += i ** 3
i += 1
print(s)
|
[
"yilnitski@gmail.com"
] |
yilnitski@gmail.com
|
97d86ce3a9b79b0a674c7875385af3aa7f2c6887
|
bbc23c85b85cdaec67b5e7a557bf464745c1fa30
|
/product/permissions.py
|
0d8b0ad76eb68c235b248df2c8611edd502f4443
|
[] |
no_license
|
sentf436/Tango
|
8d59abe84eecd163485422f463c7c383e42f3311
|
702fc92f98c8be39742e3931fae6a196d7784477
|
refs/heads/master
| 2023-08-13T10:51:14.363876
| 2021-09-20T03:55:09
| 2021-09-20T03:55:09
| 408,303,672
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 702
|
py
|
from rest_framework.permissions import BasePermission, SAFE_METHODS
class IsAuthorOrIsAdmin(BasePermission):
def has_permission(self, request, view):
if request.method in SAFE_METHODS:
return True
return bool(request.user and request.user.is_authenticated)
def has_object_permission(self, request, view, obj):
if request.method in SAFE_METHODS:
return True
return request.user and \
(request.user == obj.user or request.user.is_staff)
class IsAuthor(BasePermission):
def has_object_permission(self, request, view, obj):
return bool(request.user and request.user.is_authenticated and request.user == obj.user)
|
[
"dengy.my@gmail.com"
] |
dengy.my@gmail.com
|
cdecca77906e90aff13fe9b8700f41661801839b
|
6c6e73e9673026defadd0bee869c7429670bebeb
|
/test/helperFuncs.py
|
7d57fec2943565565f6572a701cc42a11872dc29
|
[
"BSD-2-Clause"
] |
permissive
|
carlwestman/uba_report_builder
|
e611060c52367645a3552f7fed97cfc19f631db1
|
5b7357b724880de2a25a28d32cc46a3db818fb9f
|
refs/heads/main
| 2023-02-19T12:11:41.009954
| 2021-01-19T21:44:01
| 2021-01-19T21:44:01
| 329,865,889
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,568
|
py
|
from random import choice, randrange
from datetime import datetime
from calendar import monthrange
import re
def n_to_str(n):
if n < 10:
return '0'+str(n)
else:
return str(n)
def multiplier(i):
return 2 if i % 2 == 0 else 1
def check_sum(s):
digits = [int(d) for d in re.sub(r'\D', '', s)][-9:]
if len(digits) != 9:
return None
even_digitsum = sum(x if x < 5 else x - 9 for x in digits[::2])
check_digit = sum(digits, even_digitsum) % 10
return str(10 - check_digit if check_digit else 0)
def mk_random_ssn(age_range: list=None, sex: str=None):
"""
:param age_range: List contain [min_age, max_age]
:param sex: str containing "M", "m", "Male", "male" or "F", "f", "Female", "female"
:return:
"""
if age_range:
min_age = age_range[0]
max_age = age_range[1]
else:
min_age = 0
max_age = 100
acc_male, acc_female = ["M", "m", "Male", "male"], ["F", "f", "Female", "female"]
year = datetime.now().year - randrange(min_age, max_age)
month = randrange(1, 12)
date = randrange(1, monthrange(year, month)[1])
f_1 = randrange(0, 9)
f_2 = randrange(0, 9)
if sex in acc_male:
f_3 = choice([1, 3, 5, 7, 9])
elif sex in acc_female:
f_3 = choice([0, 2, 4, 6, 8])
else:
f_3 = randrange(0, 9)
s_num = str(year)+n_to_str(month)+n_to_str(date)+str(f_1)+str(f_2)+str(f_3)
c_num = check_sum(s_num[2:])
return s_num + c_num
for x in range(1, 4
):
print(mk_random_ssn())
|
[
"carl.westman@gmail.com"
] |
carl.westman@gmail.com
|
8d5fdb574575b7437e5d850159284d6807694528
|
b6472217400cfce4d12e50a06cd5cfc9e4deee1f
|
/sites/top/api/rest/SimbaCampaignAreaoptionsGetRequest.py
|
95afbc116c4b727c865648b6f9d4ab716578132f
|
[] |
no_license
|
topwinner/topwinner
|
2d76cab853b481a4963826b6253f3fb0e578a51b
|
83c996b898cf5cfe6c862c9adb76a3d6a581f164
|
refs/heads/master
| 2021-01-22T22:50:09.653079
| 2012-08-26T19:11:16
| 2012-08-26T19:11:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 279
|
py
|
'''
Created by auto_sdk on 2012-08-26 16:43:44
'''
from top.api.base import RestApi
class SimbaCampaignAreaoptionsGetRequest(RestApi):
def __init__(self,domain,port):
RestApi.__init__(self,domain, port)
def getapiname(self):
return 'taobao.simba.campaign.areaoptions.get'
|
[
"timo.jiang@qq.com"
] |
timo.jiang@qq.com
|
567bbbd788558b0874f6915a4805306282a1f6ba
|
e0e095d77d610cee6e9aaa7a6c2b4317660a3c2b
|
/代理IP/getgoodip.py
|
2cc0170c613ca5dee04ba1d5b47bcae866db61ae
|
[] |
no_license
|
Foxgeek36/Reptile
|
46be7c2af5ba00d50e214060f9bdfd69283ca41d
|
4f9f5e42d0e90a233e61b2bec472e80abb3cde5a
|
refs/heads/master
| 2020-07-05T07:21:51.258810
| 2019-08-14T08:59:27
| 2019-08-14T08:59:27
| 202,569,833
| 1
| 0
| null | 2019-08-15T15:50:25
| 2019-08-15T15:50:25
| null |
UTF-8
|
Python
| false
| false
| 2,353
|
py
|
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 30 12:27:42 2019
@author: Lee
"""
import requests
from bs4 import BeautifulSoup
import threading
from pymongo import MongoClient
from lxml import etree
def checkip(proxy):
try:
url='http://ip.tool.chinaz.com/'
headers={'User-agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 QIHU 360SE'}
r1=requests.get(url,headers=headers,proxies={'https': 'https://{}'.format(proxy),'http': 'http://{}'.format(proxy)},timeout=30)
tree=etree.HTML(r1.text)
ipaddress=tree.xpath('//dd[@class="fz24"]/text()')
# print(ipaddress)
if ipaddress[0]==proxy[:-5]:
return True
elif ipaddress[0]==proxy[:-6]:
return True
else:
return False
except:
return False
def getgoodproxy(ip,ip_type):
if checkip(ip):
print('{}可用,类型为{}'.format(ip,ip_type))
goodip.append(ip)
handler.insert_one({'ip':ip})
if __name__ == '__main__':
url='https://github.com/dxxzst/free-proxy-list'
headers={ 'User-Agent': "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50"}
r=requests.get(url,headers=headers)
soup=BeautifulSoup(r.text,"html.parser")
table=soup.find_all('table')[1]
ulist1=[]
ulist2=[]
for tr in table.find_all('tr')[1:]:
a=tr.text.split("\n")
if a[4]=='high':
# 'https': 'https://{}'.format(proxy)
if a[3]=='http':
ulist1.append("{}:{}".format(a[1],a[2]))
else:
ulist2.append("{}:{}".format(a[1],a[2]))
goodip=[]
client=MongoClient()
db=client.proxy
handler=db.good_proxy
handler.delete_many({})
tasks=[] # 线程池
for ip1 in ulist1:
task=threading.Thread(target=getgoodproxy, args=(ip1,'http',))
tasks.append(task)
task.start()
for ip2 in ulist2:
task=threading.Thread(target=getgoodproxy, args=(ip2,'https',))
tasks.append(task)
task.start()
# 等待所有线程完成
for _ in tasks:
_.join()
print("完成代理ip验证并存储到本地!")
|
[
"870407139@qq.com"
] |
870407139@qq.com
|
f80403b2a9a9ee11a950b3e0d53b738c7a986e5e
|
237fa2d18d8819cc170985eeb4305ad95ff09e95
|
/utils.py
|
62a861cbea1104798564ec8e30f78175449eb0f0
|
[] |
no_license
|
AI4Disaster/EarthquakeDamageDetection
|
2e53de7c970f0f799edbdc5aa0c93f7083cf7baf
|
29f38286b2592b7e14cc4ffe084f7ce3f10dd6f6
|
refs/heads/master
| 2023-04-16T00:32:23.291118
| 2019-01-27T18:02:33
| 2019-01-27T18:02:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 552
|
py
|
from imageproc import Image
import numpy as np
from tqdm import tqdm
import os
def get_training_set(image_path, mask_path):
ids = os.listdir(image_path)
X = []
Y = []
for i in tqdm(ids):
img = Image('{}/{}'.format(image_path, i), 'image')
#img.normalize()
img.set_band_type('last')
msk = Image('{}/{}'.format(mask_path, i), 'mask')
msk.set_band_type('last')
X.append(img.get_array())
Y.append(msk.get_array())
X = np.array(X)
X = X/X.max()
return X, np.array(Y)
|
[
"janekravchenko09071996@gmail.com"
] |
janekravchenko09071996@gmail.com
|
2f360521ec10d93df91c7b1922ae5aa9e49a2b0b
|
a8ce78506388e24ab9f66664c4b8d12ad0aa203a
|
/ov3/ov3.py
|
6facd07f0bc3f02a66693d278ac4a2b2931ec41c
|
[] |
no_license
|
nadiawangberg/robotsyn
|
f49b125d4b8a2389d8574ea67aff8a128d010a66
|
aed0db414abfabdfa913517b8d475674825f38e5
|
refs/heads/master
| 2020-12-15T12:52:09.555293
| 2020-03-15T12:40:15
| 2020-03-15T12:40:15
| 235,108,649
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 543
|
py
|
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import math as math
import numpy as np
# think about whether it is rows or columns
# matrix[row][column]
def decompose(H):
lamb = math.sqrt(H[0][0]**2 + h[1][0]**2 + h[2][0]**2)
H_a = 1/lamb * H
r_3a = H_a[0] CROSS H_a[1]
H_b = -1/lamb * H
r_3b = H_b[0] CROSS H_b[1]
t_a = col 3 of H_a
t_b = col 3 of H_b
return (R_a,t_a), (R_b,t_b)
H = np.array(
[[1, 0, 0],
[0, 1, 0],
[0, 0, 1]]
(R1, t1), (R2, t2) = decompose(H)
print(R2)
|
[
"nadiagw@stud.ntnu.no"
] |
nadiagw@stud.ntnu.no
|
f74b25e68c5598deab3ed95040a22bab6dfe38ba
|
eb5e59a4268e18a329d0d07f4e39f257143aa210
|
/yelib/utils/num_utils.py
|
081b2a887b7d396d341063895c67cde7d585f8ec
|
[] |
no_license
|
jeffzhengye/yelib
|
a2ed2a3a6c4877986df8eb824919e5fe8aa31266
|
6fe4c7fe044c35fbb4488fd9c5540a13f2045067
|
refs/heads/master
| 2022-01-18T22:57:32.109578
| 2021-12-25T08:41:58
| 2021-12-25T08:41:58
| 84,448,680
| 3
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 201
|
py
|
# encoding: utf-8
def int_bytes(v, length=4):
return v.to_bytes(length=length, byteorder='big', signed=True)
def bytes_int(v):
return int.from_bytes(v, byteorder='big', signed=True)
|
[
"jeffzhengye@gmail.com"
] |
jeffzhengye@gmail.com
|
5aa9b08bafbdc22bcd849fa8c5ccaeba6cdbb439
|
703687f3c86cda455b71197fba32da1df61b0ca3
|
/locust/reward/API_get_reward_summary.py
|
9aabd776a09604553ad3bf9e9529e02afa41971f
|
[] |
no_license
|
a9311072/SideProjects
|
4f86ae104579b60d3cc7abc37a599e1851957e41
|
b47bb1bc79ccfe7ceb91ae66f34cf7816075449d
|
refs/heads/master
| 2023-01-08T11:34:36.747431
| 2020-11-12T09:24:36
| 2020-11-12T09:24:36
| 294,865,938
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 637
|
py
|
import random
import sys
sys.path.append('./service')
from get_data import get_json_header, get_config
from locust import HttpLocust, TaskSet, task
company, users_info = get_config()
url= '/api/me/rewardSummary?branchId=1'
class UserTasks(TaskSet):
def get_headers(self):
user = random.choice(users_info)
return get_json_header(user[0])
@task
def task1(self):
headers = self.get_headers()
self.client.get(url , headers = headers)
class WebsiteUser(HttpLocust):
min_wait = company.min_time * 1000
max_wait = company.max_time * 1000
host = company.url
task_set = UserTasks
|
[
"a9311072@gmail.com"
] |
a9311072@gmail.com
|
21b6cc602f6d38c5c1687fc9c74de5dd4c7eb80e
|
2eeac8d1a19d117e22c89f7fcef54d6fef8bf8da
|
/proxy-ddos.py
|
b5727155a16cc08fe80f818b7d9bcacced3ac10e
|
[] |
no_license
|
fnatalucci/ddos
|
882831c499d62597fca17990849acd3242c4a61b
|
470323cccf9b4ccbc2d999f062b18c128f180d5a
|
refs/heads/master
| 2021-01-17T23:58:54.396520
| 2014-11-10T13:29:46
| 2014-11-10T13:29:46
| 30,622,203
| 0
| 1
| null | 2015-02-11T00:28:21
| 2015-02-11T00:28:21
| null |
UTF-8
|
Python
| false
| false
| 4,842
|
py
|
import urllib2
import urllib
import threading
import random
import re
import sys
import socket
#if responce time is more than 3s, it's really a bad one. there is no need to dos .
socket.setdefaulttimeout(1)
#global params
url=''
host=''
headers_useragents=[]
headers_referers=[]
request_counter=0
F = open('result.txt')
ips = F.read().split('\n')
F.close()
def inc_counter():
global request_counter
request_counter+=1
def set_safe():
global safe
safe=1
# generates a user agent array
def useragent_list():
global headers_useragents
headers_useragents.append('Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3')
headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 6.1; en; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)')
headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)')
headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090718 Firefox/3.5.1')
headers_useragents.append('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.1 (KHTML, like Gecko) Chrome/4.0.219.6 Safari/532.1')
headers_useragents.append('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)')
headers_useragents.append('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729)')
headers_useragents.append('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Win64; x64; Trident/4.0)')
headers_useragents.append('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SV1; .NET CLR 2.0.50727; InfoPath.2)')
headers_useragents.append('Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)')
headers_useragents.append('Mozilla/4.0 (compatible; MSIE 6.1; Windows XP)')
headers_useragents.append('Opera/9.80 (Windows NT 5.2; U; ru) Presto/2.5.22 Version/10.51')
return(headers_useragents)
# generates a referer array
def referer_list():
global headers_referers
headers_referers.append('https://www.google.com.hk/#newwindow=1&q=')
headers_referers.append('http://www.usatoday.com/search/results?q=')
headers_referers.append('http://www.baidu.com/s?wd=')
headers_referers.append('http://engadget.search.aol.com/search?q=')
headers_referers.append('http://' + host + '/')
return(headers_referers)
#builds random ascii string
def buildblock(size):
out_str = ''
for i in range(0, size):
a = random.randint(65, 90)
out_str += chr(a)
return(out_str)
def usage():
print '---------------------------------------------------'
print 'USAGE: python proxy-ddos.py <url>'
print '---------------------------------------------------'
def httpcall(url):
useragent_list()
referer_list()
code=0
if url.count("?")>0:
param_joiner="&"
else:
param_joiner="?"
#F = open('result.txt')
#ips = F.read().split('\n')
#F.close()
requests = ''
while 1:
headers = {
'User-Agent':random.choice(headers_useragents),
'Cache-Control':'no-cache',
'Accept-Charset':'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Referer':random.choice(headers_referers) + buildblock(random.randint(5,10)),
'Keep-Alive':random.randint(110,120),
'Connection':'keep-alive',
'Host':host
}
postdata = urllib.urlencode( {buildblock(random.randint(3,10)):buildblock(random.randint(3,10))} )
req = urllib2.Request(url=url,data=postdata,headers=headers)
index = random.randint(0,len(ips)-1)
proxy = urllib2.ProxyHandler({'http':ips[index]})
opener = urllib2.build_opener(proxy,urllib2.HTTPHandler)
urllib2.install_opener(opener)
try:
urllib2.urlopen(req)
#print '***************'
inc_counter()
if(request_counter%10==0):
print request_counter
except Exception,e:
#print e
#break
continue
#http caller thread
class HTTPThread(threading.Thread):
def run(self):
httpcall(url)
#execute
if len(sys.argv) < 2:
usage()
sys.exit()
else:
if sys.argv[1]=="help":
usage()
sys.exit()
else:
print "-- Attack Started --"
url = sys.argv[1]
if url.count("/")==2:
url = url + "/"
m = re.search('http\://([^/]*)/?.*', url)
host = m.group(1)
for i in range(1000):
t = HTTPThread()
t.start()
|
[
"dantangfan@gmail.com"
] |
dantangfan@gmail.com
|
b92d9ace7e31d418ca6e4844c3efada789c53b56
|
eabf2ff3b5b0e31a08182e5983baa8e76e301c69
|
/main.py
|
1ecd6e0d6c21326cc8b00c168620090be1ce1271
|
[] |
no_license
|
githuv4/test
|
adef1b817f75698b9fddd8749feacf9e304760a7
|
413de4398865e6813278c690d0cd1353b10b735a
|
refs/heads/master
| 2023-04-23T16:30:51.915127
| 2021-05-06T13:37:54
| 2021-05-06T13:37:54
| 364,921,337
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 144
|
py
|
class Car():
def __init__(self,**kwargs):
self.wheels = 4
def __str__(self):
return f"Car with {self.wheels} wheels"
print(Car())
|
[
"sendex485@gmail.com"
] |
sendex485@gmail.com
|
9b3f24b2f9d34529c0cd76cfb7f8478e3bb16589
|
8c1457d9e8ead16aa7eb8d26b1e5f363c227067a
|
/test/test_examples.py
|
98550caaed7a95102490752bd6013bf4096ef47b
|
[] |
no_license
|
gg-project/pygg
|
a21f0b4a7604802b66d9a6034dc10e2e79845fe5
|
bd0408b48274dbf990b06d89fb57c826f99e1c3d
|
refs/heads/master
| 2023-02-13T23:22:01.787100
| 2021-01-08T03:27:05
| 2021-01-08T03:27:05
| 327,167,563
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,031
|
py
|
from unittest import TestCase, skipIf
import pathlib
import re
import tempfile
import subprocess as sub
import os
import shutil as sh
import sys
class ExampleTest(TestCase):
@skipIf(not pathlib.Path("examples").exists(), "Missing examples dir")
def test_examples(self) -> None:
ex_dir = os.path.abspath('examples')
pygg_dir = os.path.split(ex_dir)[0]
sys.path.append(pygg_dir)
os.environ['PATH'] = f"{ex_dir}:{os.environ['PATH']}"
os.environ['PYTHONPATH'] = f"{pygg_dir}:{os.environ['PATH']}"
remote = "REMOTE_TEST" in os.environ
if remote:
self.assertIn("AWS_SECRET_ACCESS_KEY", os.environ)
for p in pathlib.Path("examples").iterdir():
if p.suffix == ".py":
print(f"Testing: {p.name}")
with p.open() as f:
s = f.read()
res = re.search("#.*ARGS: (.*)", s)
self.assertIsNotNone(res)
assert res is not None # for mypy
args = res.group(1).strip().split()
res = re.search("#.*RESULT: (\\w*)", s)
self.assertIsNotNone(res)
assert res is not None # for mypy
result = res.group(1)
with tempfile.TemporaryDirectory() as d:
py = sh.which("python3.7")
force = sh.which("gg-force")
assert py is not None
assert force is not None
sub.run(
cwd=d,
check=True,
args=[py, str(os.path.abspath(p)), "init"] + args,
)
a = [force]
if remote:
a.extend(["--jobs", "1", "--engine", "lambda"])
a.append("out")
sub.run(cwd=d, check=True, args=a)
with open(f"{d}/out") as f:
self.assertEqual(f.read().strip(), result)
|
[
"aozdemir@hmc.edu"
] |
aozdemir@hmc.edu
|
1d615aa0d77eb62ff98f2b42d36dee5e9b5f0ba5
|
da1cdd3f43adadb96be1a9e47107478b050717b0
|
/Implementation/generate_data.py
|
d064c8a50f52504b9ae7c6956277fcefb14403be
|
[
"Apache-2.0"
] |
permissive
|
LMesaric/Seminar-FER-2019
|
34da5abe60efaa3f8c690683d950031b42cab72f
|
4917f2f19ce7fed23ee707acf3e444a64498d091
|
refs/heads/master
| 2021-08-04T12:57:30.857624
| 2020-06-12T21:49:42
| 2020-06-12T21:49:42
| 186,222,429
| 3
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 643
|
py
|
import os
import numpy as np
import sympy
from sympy.utilities.lambdify import lambdify
def main():
file_name = input("Enter file name: ")
sym_fun_raw = input("Enter function form: ")
sym_fun = sympy.sympify(sym_fun_raw)
func = lambdify('x', sym_fun, "numpy")
xx = np.linspace(-10, 10, num=21)
yy = func(xx)
currDir = os.path.dirname(__file__)
file_name = os.path.join(currDir, "examples", file_name)
f = open(file_name, "a+")
f.write("# " + sym_fun_raw + "\n")
for x, y in zip(xx, yy):
f.write("%+f\t%+f\n" % (x, y))
f.close()
return
if __name__ == "__main__":
main()
|
[
"luka.mesaric@fer.hr"
] |
luka.mesaric@fer.hr
|
5fad3bee9aef9649c56296d16dbe5a1f170dc1ed
|
a05633d4949ef4b236a7f6aa6d7dea4db85ea794
|
/angr/procedures/linux_kernel/vsyscall.py
|
c96ad75248b035106495f74ed498893d14e9ff93
|
[
"BSD-2-Clause"
] |
permissive
|
HemantR88/angr
|
63b674bb3953d8a78adf0fa58ba7b0f4f164af18
|
245681597be253ec2261b299e08d9ef0d0fddb7d
|
refs/heads/master
| 2020-04-16T07:35:32.266662
| 2019-01-12T06:37:28
| 2019-01-12T06:37:28
| 165,392,624
| 2
| 0
|
BSD-2-Clause
| 2019-01-12T13:45:13
| 2019-01-12T13:45:12
| null |
UTF-8
|
Python
| false
| false
| 490
|
py
|
import angr
import claripy
class _vsyscall(angr.SimProcedure):
NO_RET = True
# This is pretty much entirely copied from SimProcedure.ret
def run(self): # pylint: disable=arguments-differ
if self.state.arch.call_pushes_ret:
ret_addr = self.state.stack_pop()
else:
ret_addr = self.state.registers.load(self.state.arch.lr_offset, self.state.arch.bytes)
self.successors.add_successor(self.state, ret_addr, claripy.true, 'Ijk_Sys')
|
[
"andrewrdutcher@gmail.com"
] |
andrewrdutcher@gmail.com
|
ff87cb24b2ec8147c419a3da9639f38e6bad8dc6
|
ec276a5c01968932d83df0b01bd4c9e013fdebe5
|
/codingchallenge/week4day3.py
|
231d5bd44a9ea3ff2af1a852955005715c4563c6
|
[] |
no_license
|
raj-sekhar-au9/assignments
|
9751965551947ec4aea0ea293e41e5819a89fa00
|
3fa6544e8951f13aa030bb1b58a98aa8fe5dd292
|
refs/heads/master
| 2022-11-26T18:10:45.661209
| 2020-07-24T16:35:59
| 2020-07-24T16:35:59
| 278,550,293
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 273
|
py
|
substring of a string
test_str = char(input("Enter a string"))
print("The original string is : " + str(test_str))
res = [test_str[i: j] for i in range(len(test_str))
for j in range(i + 1, len(test_str) + 1)]
print("All substrings of string are : " + str(res)
|
[
"noreply@github.com"
] |
raj-sekhar-au9.noreply@github.com
|
a52f60b481ac799cc3e1f0a5009e0c8a248d3973
|
80a068532a9efdafddfa13cf9afc8df31eaca270
|
/stockmgmt/apps.py
|
847e5d6aab26db342ba57f8a00056be63f10b2d8
|
[] |
no_license
|
Harshitv670/stockMGMT
|
af503b29f43f7e30ea7b519ff14a4de49b92035f
|
46de3e20be8e126934c8590a57ee95ff68306a1d
|
refs/heads/main
| 2023-08-13T23:38:10.094493
| 2021-10-16T07:33:28
| 2021-10-16T07:33:28
| 407,251,647
| 0
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 150
|
py
|
from django.apps import AppConfig
class StockmgmtConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'stockmgmt'
|
[
"verma.harshit670@gmail.com"
] |
verma.harshit670@gmail.com
|
29dc1a9b2e1c8b243440868de02a7685d9be2632
|
dd8c8bc9b56d9ff5266cd7950350a4c373646606
|
/program_2D/main_program.py
|
1b665942ac794e9934e335d4b03693225eaaf8df
|
[] |
no_license
|
dennist26/cahn-hilliard-tumour-fenics
|
81d0ef3ae1bdc751efd5cb0bbfed839100148fba
|
bf0dd3a4649efa6cc6baf257278162bdfb93bb7f
|
refs/heads/main
| 2023-01-01T07:36:39.759377
| 2020-10-11T13:08:02
| 2020-10-11T13:08:02
| 301,979,681
| 4
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,177
|
py
|
from dolfin import *
import matplotlib.pyplot as plt
from os import path
from shutil import copyfile
# import necessary files
from settings import *
from useful_functions import *
from class_Tumour import *
''' initialize form compiler '''
parameter_form_compiler(discr)
# for mpi
mpi_comm = MPI.comm_world
my_rank = MPI.rank(mpi_comm)
''' print some info '''
print_info(discr, config, model, my_rank)
''' initial conditions '''
if config.init_from_file:
# init from file
mesh_init = Mesh(config.init_path + "/mesh.xml")
P1_init = FiniteElement("Lagrange", mesh_init.ufl_cell(), config.init_degree)
ME_init = FunctionSpace(mesh_init,MixedElement(model.num_eq*[P1_init]))
u_init = Function(ME_init, config.init_path+"/u.xml")
else:
u_init = InitialConditions(degree=discr.polynom_degree)
''' Create mesh, optional: create adapted mesh '''
if discr.adapt:
mesh = refine_mesh(discr, model, mpi_comm, u_init, 0)
else:
mesh = init_mesh(discr, mpi_comm)
''' Initialize functions '''
u, u0 = init_function(discr, config, model, mesh)
u.interpolate(u_init)
''' initialize problem '''
problem = model.init_problem(discr.dt, u, u0)
solver = init_Newton_solver()
j = 0
t = 0
''' save initial conditions into output files '''
file0, file1, file2 = open_vtu(config, model)
save_output_vtu(discr,config,model,u,j,t,file0,file1,file2)
save_output(discr, config, model, u, mesh, j, t)
''' time iteration '''
while (j < discr.N_time):
j += 1
t += discr.dt
''' solve '''
u0.vector()[:] = u.vector()
solver.solve(problem, u.vector())
if my_rank==0:
print("\nCompleted iteration number: ", j, " of ", discr.N_time, "\n")
''' optional: save output '''
save_output(discr, config, model, u, mesh, j, t)
save_output_vtu(discr,config,model,u,j,t,file0,file1,file2)
''' optional: adapt mesh '''
if discr.adapt:
mesh = refine_mesh(discr, model, mpi_comm, u, j)
u, u0 = init_function(discr, config, model, mesh, u, u0)
problem = model.init_problem(discr.dt, u, u0)
solver = init_Newton_solver()
|
[
"noreply@github.com"
] |
dennist26.noreply@github.com
|
b40da820e755f502e53d956dfeea79bed64cef55
|
d7016f69993570a1c55974582cda899ff70907ec
|
/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/operations/_disk_accesses_operations.py
|
30883beab52fdc55a4189602a8be3624341db882
|
[
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] |
permissive
|
kurtzeborn/azure-sdk-for-python
|
51ca636ad26ca51bc0c9e6865332781787e6f882
|
b23e71b289c71f179b9cf9b8c75b1922833a542a
|
refs/heads/main
| 2023-03-21T14:19:50.299852
| 2023-02-15T13:30:47
| 2023-02-15T13:30:47
| 157,927,277
| 0
| 0
|
MIT
| 2022-07-19T08:05:23
| 2018-11-16T22:15:30
|
Python
|
UTF-8
|
Python
| false
| false
| 52,920
|
py
|
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
map_error,
)
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpResponse
from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.core.rest import HttpRequest
from azure.core.tracing.decorator import distributed_trace
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section
if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
_SERIALIZER = Serializer()
_SERIALIZER.client_side_validation = False
def build_create_or_update_request(
resource_group_name: str, disk_access_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"diskAccessName": _SERIALIZER.url("disk_access_name", disk_access_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
if content_type is not None:
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
def build_update_request(
resource_group_name: str, disk_access_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"diskAccessName": _SERIALIZER.url("disk_access_name", disk_access_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
if content_type is not None:
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
def build_get_request(
resource_group_name: str, disk_access_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"diskAccessName": _SERIALIZER.url("disk_access_name", disk_access_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
def build_delete_request(
resource_group_name: str, disk_access_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"diskAccessName": _SERIALIZER.url("disk_access_name", disk_access_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
def build_list_by_resource_group_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses")
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
def build_get_private_link_resources_request(
resource_group_name: str, disk_access_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources",
) # pylint: disable=line-too-long
path_format_arguments = {
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
"resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"),
"diskAccessName": _SERIALIZER.url("disk_access_name", disk_access_name, "str"),
}
_url: str = _format_url_section(_url, **path_format_arguments) # type: ignore
# Construct parameters
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
class DiskAccessesOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.compute.v2020_05_01.ComputeManagementClient`'s
:attr:`disk_accesses` attribute.
"""
models = _models
def __init__(self, *args, **kwargs):
input_args = list(args)
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
def _create_or_update_initial(
self, resource_group_name: str, disk_access_name: str, disk_access: Union[_models.DiskAccess, IO], **kwargs: Any
) -> _models.DiskAccess:
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DiskAccess] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(disk_access, (IO, bytes)):
_content = disk_access
else:
_json = self._serialize.body(disk_access, "DiskAccess")
request = build_create_or_update_request(
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
template_url=self._create_or_update_initial.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize("DiskAccess", pipeline_response)
if response.status_code == 202:
deserialized = self._deserialize("DiskAccess", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
_create_or_update_initial.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
}
@overload
def begin_create_or_update(
self,
resource_group_name: str,
disk_access_name: str,
disk_access: _models.DiskAccess,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.DiskAccess]:
"""Creates or updates a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:param disk_access: disk access object supplied in the body of the Put disk access operation.
Required.
:type disk_access: ~azure.mgmt.compute.v2020_05_01.models.DiskAccess
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
operation to not poll, or pass in your own initialized polling object for a personal polling
strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of LROPoller that returns either DiskAccess or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
def begin_create_or_update(
self,
resource_group_name: str,
disk_access_name: str,
disk_access: IO,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.DiskAccess]:
"""Creates or updates a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:param disk_access: disk access object supplied in the body of the Put disk access operation.
Required.
:type disk_access: IO
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
operation to not poll, or pass in your own initialized polling object for a personal polling
strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of LROPoller that returns either DiskAccess or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
def begin_create_or_update(
self, resource_group_name: str, disk_access_name: str, disk_access: Union[_models.DiskAccess, IO], **kwargs: Any
) -> LROPoller[_models.DiskAccess]:
"""Creates or updates a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:param disk_access: disk access object supplied in the body of the Put disk access operation.
Is either a model type or a IO type. Required.
:type disk_access: ~azure.mgmt.compute.v2020_05_01.models.DiskAccess or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
operation to not poll, or pass in your own initialized polling object for a personal polling
strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of LROPoller that returns either DiskAccess or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DiskAccess] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = self._create_or_update_initial(
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
disk_access=disk_access,
api_version=api_version,
content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
**kwargs
)
kwargs.pop("error_map", None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize("DiskAccess", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
if polling is True:
polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
elif polling is False:
polling_method = cast(PollingMethod, NoPolling())
else:
polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
begin_create_or_update.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
}
def _update_initial(
self,
resource_group_name: str,
disk_access_name: str,
disk_access: Union[_models.DiskAccessUpdate, IO],
**kwargs: Any
) -> _models.DiskAccess:
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DiskAccess] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(disk_access, (IO, bytes)):
_content = disk_access
else:
_json = self._serialize.body(disk_access, "DiskAccessUpdate")
request = build_update_request(
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
template_url=self._update_initial.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if response.status_code == 200:
deserialized = self._deserialize("DiskAccess", pipeline_response)
if response.status_code == 202:
deserialized = self._deserialize("DiskAccess", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserialized # type: ignore
_update_initial.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
}
@overload
def begin_update(
self,
resource_group_name: str,
disk_access_name: str,
disk_access: _models.DiskAccessUpdate,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.DiskAccess]:
"""Updates (patches) a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:param disk_access: disk access object supplied in the body of the Patch disk access operation.
Required.
:type disk_access: ~azure.mgmt.compute.v2020_05_01.models.DiskAccessUpdate
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
operation to not poll, or pass in your own initialized polling object for a personal polling
strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of LROPoller that returns either DiskAccess or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
def begin_update(
self,
resource_group_name: str,
disk_access_name: str,
disk_access: IO,
*,
content_type: str = "application/json",
**kwargs: Any
) -> LROPoller[_models.DiskAccess]:
"""Updates (patches) a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:param disk_access: disk access object supplied in the body of the Patch disk access operation.
Required.
:type disk_access: IO
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
operation to not poll, or pass in your own initialized polling object for a personal polling
strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of LROPoller that returns either DiskAccess or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
def begin_update(
self,
resource_group_name: str,
disk_access_name: str,
disk_access: Union[_models.DiskAccessUpdate, IO],
**kwargs: Any
) -> LROPoller[_models.DiskAccess]:
"""Updates (patches) a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:param disk_access: disk access object supplied in the body of the Patch disk access operation.
Is either a model type or a IO type. Required.
:type disk_access: ~azure.mgmt.compute.v2020_05_01.models.DiskAccessUpdate or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
operation to not poll, or pass in your own initialized polling object for a personal polling
strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of LROPoller that returns either DiskAccess or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DiskAccess] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = self._update_initial(
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
disk_access=disk_access,
api_version=api_version,
content_type=content_type,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
**kwargs
)
kwargs.pop("error_map", None)
def get_long_running_output(pipeline_response):
deserialized = self._deserialize("DiskAccess", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
if polling is True:
polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
elif polling is False:
polling_method = cast(PollingMethod, NoPolling())
else:
polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
begin_update.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
}
@distributed_trace
def get(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> _models.DiskAccess:
"""Gets information about a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: DiskAccess or the result of cls(response)
:rtype: ~azure.mgmt.compute.v2020_05_01.models.DiskAccess
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
cls: ClsType[_models.DiskAccess] = kwargs.pop("cls", None)
request = build_get_request(
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.get.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = self._deserialize("DiskAccess", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
}
def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, disk_access_name: str, **kwargs: Any
) -> None:
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
request = build_delete_request(
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self._delete_initial.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
if cls:
return cls(pipeline_response, None, {})
_delete_initial.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
}
@distributed_trace
def begin_delete(self, resource_group_name: str, disk_access_name: str, **kwargs: Any) -> LROPoller[None]:
"""Deletes a disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this
operation to not poll, or pass in your own initialized polling object for a personal polling
strategy.
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = self._delete_initial( # type: ignore
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
api_version=api_version,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
**kwargs
)
kwargs.pop("error_map", None)
def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
if cls:
return cls(pipeline_response, None, {})
if polling is True:
polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
elif polling is False:
polling_method = cast(PollingMethod, NoPolling())
else:
polling_method = polling
if cont_token:
return LROPoller.from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore
begin_delete.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}"
}
@distributed_trace
def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.DiskAccess"]:
"""Lists all the disk access resources under a resource group.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DiskAccess or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None)
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
def prepare_request(next_link=None):
if not next_link:
request = build_list_by_resource_group_request(
resource_group_name=resource_group_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.list_by_resource_group.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
else:
# make call to next link with the client's api-version
_parsed_next_link = urllib.parse.urlparse(next_link)
_next_request_params = case_insensitive_dict(
{
key: [urllib.parse.quote(v) for v in value]
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
}
)
_next_request_params["api-version"] = self._config.api_version
request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
request.method = "GET"
return request
def extract_data(pipeline_response):
deserialized = self._deserialize("DiskAccessList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(get_next, extract_data)
list_by_resource_group.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses"
}
@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.DiskAccess"]:
"""Lists all the disk access resources under a subscription.
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DiskAccess or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2020_05_01.models.DiskAccess]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
cls: ClsType[_models.DiskAccessList] = kwargs.pop("cls", None)
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
def prepare_request(next_link=None):
if not next_link:
request = build_list_request(
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.list.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
else:
# make call to next link with the client's api-version
_parsed_next_link = urllib.parse.urlparse(next_link)
_next_request_params = case_insensitive_dict(
{
key: [urllib.parse.quote(v) for v in value]
for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
}
)
_next_request_params["api-version"] = self._config.api_version
request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
request.method = "GET"
return request
def extract_data(pipeline_response):
deserialized = self._deserialize("DiskAccessList", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
return deserialized.next_link or None, iter(list_of_elem)
def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return ItemPaged(get_next, extract_data)
list.metadata = {"url": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses"}
@distributed_trace
def get_private_link_resources(
self, resource_group_name: str, disk_access_name: str, **kwargs: Any
) -> _models.PrivateLinkResourceListResult:
"""Gets the private link resources possible under disk access resource.
:param resource_group_name: The name of the resource group. Required.
:type resource_group_name: str
:param disk_access_name: The name of the disk access resource that is being created. The name
can't be changed after the disk encryption set is created. Supported characters for the name
are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. Required.
:type disk_access_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: PrivateLinkResourceListResult or the result of cls(response)
:rtype: ~azure.mgmt.compute.v2020_05_01.models.PrivateLinkResourceListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
api_version: Literal["2020-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01"))
cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None)
request = build_get_private_link_resources_request(
resource_group_name=resource_group_name,
disk_access_name=disk_access_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.get_private_link_resources.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
deserialized = self._deserialize("PrivateLinkResourceListResult", pipeline_response)
if cls:
return cls(pipeline_response, deserialized, {})
return deserialized
get_private_link_resources.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources"
}
|
[
"noreply@github.com"
] |
kurtzeborn.noreply@github.com
|
5a8e04afdc36104d5c089cdc470a55778a4eadb1
|
8557a7211b9002aaf3e7c0bb019bc4366a4c3ead
|
/src/mrsattachment/migrations/0003_remove_mrsattachment_mimetype.py
|
cb678c886c69b90cd8cf0c1826c6215a4bae6a0d
|
[] |
no_license
|
mwolff44/mrs
|
5e24628c11dc4e73bd1739f386bfcca95ff1569a
|
b5e5b6d97e0d1ba5c454a44762db0713df3a7ba0
|
refs/heads/master
| 2020-03-10T13:41:55.310983
| 2018-04-11T02:30:14
| 2018-04-11T10:21:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 347
|
py
|
# Generated by Django 2.0.2 on 2018-02-09 13:08
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mrsattachment', '0002_mrsattachment_mimetype'),
]
operations = [
migrations.RemoveField(
model_name='mrsattachment',
name='mimetype',
),
]
|
[
"jpic@users.noreply.github.com"
] |
jpic@users.noreply.github.com
|
275b576dcd4c0521d4e3193c7c02dd8d680a2597
|
1df7d5c6a99f490a4e60f5dc51fa3f4411458280
|
/orderable/querysets.py
|
526c72ab283022b3db69e07dc0ce39372c8a9dae
|
[
"BSD-2-Clause"
] |
permissive
|
todd-dembrey/django-orderable
|
34b45c8516c9554d33cd48ff1368a7357904c275
|
a74ed5219593bda1fdbc398efc6bef4a31a2f1e4
|
refs/heads/master
| 2020-06-28T04:59:57.827298
| 2016-11-21T10:03:10
| 2016-11-21T10:03:10
| 74,507,777
| 0
| 0
| null | 2016-11-22T19:50:36
| 2016-11-22T19:50:35
| null |
UTF-8
|
Python
| false
| false
| 548
|
py
|
from django.db import models
class OrderableQueryset(models.QuerySet):
"""
Adds additional functionality to `Orderable.objects` and querysets.
Provides access to the next and previous ordered object within the queryset.
As a related manager this will provide the filtering automatically. Should you wish
to
"""
def before(self, orderable):
return self.filter(sort_order__lt=orderable.sort_order).last()
def after(self, orderable):
return self.filter(sort_order__gt=orderable.sort_order).first()
|
[
"toddd@incuna.com"
] |
toddd@incuna.com
|
edac5f9551360d1d301a353c281a140812b2bfae
|
d7b3b3e705f7f7e9721b45caf1aff39087402ec8
|
/fisite/pytest/testfunc.py
|
8abec30c90bdcd0891579b9053b0ed3d297a362c
|
[] |
no_license
|
ifcheung2012/fisite
|
4c400d230355d57f7b332eac565f976e5bc99dc8
|
9d949a79c96f808eda30d6e962ccde3965077b93
|
refs/heads/master
| 2021-01-10T10:18:05.367571
| 2013-09-26T11:32:58
| 2013-09-26T11:32:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 93
|
py
|
from pytest import spam
print spam.a
para = spam.a
spam.foo(para)
c = spam.bar()
c.grok()
|
[
"ifcheung@ifcheung-P31-ES3G.(none)"
] |
ifcheung@ifcheung-P31-ES3G.(none)
|
bd78132d735345a3ed742913a3fdd23cee41780c
|
b35aea9f4411f5dc7942392d78dc31bb76c7ec73
|
/PythonProject/functions/project_funcs.py
|
c47d65f8ad3d850f7a80b8fa8c8795f7c4b56f1f
|
[] |
no_license
|
ashkanusefi/rondshow
|
1079b81704fff55a1d54fa8dee2712ab61e92f4a
|
7e5a80fcc6e326b8b1737a54fb53becc4195e475
|
refs/heads/master
| 2023-09-01T18:45:33.170465
| 2021-09-18T11:24:52
| 2021-09-18T11:24:52
| 407,820,565
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,237
|
py
|
def show_menu():
print('********************')
print('1-add')
print('2-show all')
print('3-search')
print('4-update')
print('5-delete')
print('6-exit')
print('********************')
def fake_data(contacts):
contacts['ali']='0912564873'
contacts['alireza'] = '0913243876'
contacts['hamid'] = '0917643974'
def add_new_contact(contacts):
name=input('contact name?')
mobile=input('contact mobile?')
contacts[name]=mobile
def show_all_contacts(contacts):
for contact in contacts:
print(contact +'\t'+ contacts.get(contact))
def search_contacts(contacts,name):
flag=False
for contact in contacts:
if contact==name:
print(contact+'\t'+contacts.get(contact))
flag=True
break
return flag
def update_contact(contacts,name):
mobile=input('new mobile?')
flag=False
for contact in contacts:
if contact==name:
contacts[name]=mobile
flag=True
break
return flag
def delete_contact(contacts,name):
flag=False
for contact in contacts:
if contact==name:
del contacts[name]
flag=True
break
return flag
|
[
"yousefi.ashkan96@gmail.com"
] |
yousefi.ashkan96@gmail.com
|
7b97643ded1a20f256e1ee9d33c923a1928aca47
|
bce97baa0eeebbc1323648d913c70ad8e950032a
|
/vorinclex/old/collate2.py
|
325fc66ee9ac603871a0afd8cbbf2994b4b7620b
|
[] |
no_license
|
Corvidium/evemktpy2
|
4575ade6a5e8c3dc5d8f246762a2562d4a24d39f
|
cb74f8c8ac00730bc6b47b30ba2b7b8ebad664c3
|
refs/heads/master
| 2022-06-03T17:39:39.802051
| 2020-04-26T21:09:14
| 2020-04-26T21:09:14
| 257,740,966
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,434
|
py
|
#OPENS THE REGION ACTIVE MARKET ITEMS LIST AND OPENS THE TYPEID:ITEMNAME LIST AND CONNECTS THE NAME OF EACH ACTIVE ITEM TO ITS ID, THEN PUTS THE RESULT IN ACTIVEITEMS.JSON
import json, time
import mktconfig
from util import uniLog
mktset = {}
itemrefdat = {}
#load itemref data from file into dictionary
with open(mktconfig.typeidref, "r") as typeidjsonfile:
itemrefdat = json.load(typeidjsonfile)
#open scrape data into dictionary
with open(mktconfig.scrapeoutput, "r") as scrape:
jscrape = json.load(scrape)
#for each market item in the scrape, find its name
mktset.update({jscrape['response'][0] : itemrefdat[str(jscrape['response'][0])]})
print('starting loop')
uniLog('Collating...')
numProds = len(jscrape['response'])
for i in range(0,numProds):
try:
mktset.update({jscrape['response'][i] : {'ItemName' : itemrefdat[str(jscrape['response'][i])], 'ItemID' : jscrape['response'][i] }})
print(itemrefdat[str(jscrape['response'][i])])
print(jscrape['response'][i])
except KeyError:
uniLog('KeyError on key '+str(jscrape['response'][i]))
continue
except:
uniLog('unknown error on key '+str(jscrape['response'][i]))
continue
uniLog('Collation complete. mktset dictionary updated.')
print('complete')
#Record in file
with open(mktconfig.activeitems, 'w') as activeitemsfile:
activeitemsfile.write(json.dumps(mktset))
uniLog('Active items written to file '+ mktconfig.activeitems)
time.sleep(30)
|
[
"garrettkno3@gmail.com"
] |
garrettkno3@gmail.com
|
74c87c705a0f4e5e9b962423c68820399b58e061
|
725b6e877a5cd1593b5a349f9e780302d9e6b771
|
/cnn_3_Classes_local.py
|
eb0ef2d5af37647a827973e65e5eff853fd1f766
|
[] |
no_license
|
RanaMK/Arabic-Sentiment-Analysis-Classification-Project
|
0817472ba41e1e85b7fe2bbcde41e475df727a70
|
1a3842e2159cd62c08fb40744f201860d1516894
|
refs/heads/main
| 2023-03-22T11:06:47.990780
| 2021-03-10T17:17:31
| 2021-03-10T17:17:31
| 346,290,960
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 18,076
|
py
|
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 27 08:21:58 2018
@author: Rana Mahmoud
"""
import os
#os.environ['THEANO_FLAGS']='mode=FAST_RUN,device=gpu,floatX=float32'
# Parameters matplotlib
# ==================================================
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = (10,10)
#%matplotlib inline
import seaborn as sns
plt.switch_backend('agg')
# Parameters General
# ==================================================
import codecs
import csv
import keras
import sklearn
import gensim
import random
import scipy
import pydot
#import commands
import glob
import numpy as np
import pandas as pd
import re
# Parameters theano
# ==================================================
#import theano
#print( 'using : ',(theano.config.device))
# Parameters keras
# ==================================================
#from keras.utils.visualize_util import plot ## to print the model arch
from keras.utils.vis_utils import plot_model ## to print the model arch
from keras.preprocessing import sequence
from keras.preprocessing.text import Tokenizer
#from keras.models import Sequential , Graph
from keras.models import Sequential
from keras.optimizers import SGD
from keras.layers.embeddings import Embedding
from keras.callbacks import EarlyStopping, ModelCheckpoint
from keras.regularizers import l2#, activity_l2
#from keras.layers.core import Dense , Dropout , Activation , Merge , Flatten
from keras.layers import Dense , Dropout , Activation , Merge , Flatten
from keras.layers.convolutional import Convolution1D, MaxPooling1D
from keras.layers import Embedding , LSTM
from keras.models import Model
from keras.layers import Input
from keras.layers import TimeDistributed
from keras.layers import Merge, merge
#Merge is for layers, merge is for tensors.
from keras.utils.vis_utils import plot_model
# Parameters sklearn
# ==================================================
import sklearn.metrics
from sklearn import preprocessing
from sklearn.base import BaseEstimator
from sklearn.svm import LinearSVC , SVC
from sklearn.naive_bayes import MultinomialNB
from sklearn.metrics import confusion_matrix, classification_report #get F1 score
# Parameters gensim
# ==================================================
from gensim.models.word2vec import Word2Vec
import gensim.models.keyedvectors
from gensim.models.doc2vec import Doc2Vec , TaggedDocument
from gensim.corpora.dictionary import Dictionary
import gensim
import datetime
###Preprocessing libraries
from LoadDataset_General import *
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from qalsadi import analex
import pyarabic.arabrepr
from tashaphyne.stemming import ArabicLightStemmer
from pyarabic.named import *
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
# Model Hyperparameters
# ==================================================
#
print( "Model Hyperparameters :")
embeddings_dim = 300
print ("embeddings_dim = " ,embeddings_dim)
filter_sizes = [3, 5, 7]
print ("filter_sizes = ",filter_sizes)
dropout_prob = [0.5,0.5]
print ("dropout_prob = ",dropout_prob)
# maximum number of words to consider in the representations
max_features = 30000
print ("max_features = " ,max_features)
# percentage of the data used for model training
val_split = 0.75
print ("val_split = ",val_split)
# number of classes
num_classes = 2
print ("num_classes = " ,num_classes)
# Training parameters
# ==================================================
num_epochs = 30
print ("num_epochs = ",num_epochs)
# Reading pre-trained word embeddings
# ==================================================
# load the embeddings
print ("")
print ("Reading pre-trained word embeddings...")
embeddings = dict( )
#embeddings = gensim.models.KeyedVectors.load_word2vec_format("C:\\Users\\paperspace\\Desktop\\(CBOW58)-ASA-3B-CBOW-window5-3iter-d300-vecotrs.bin", binary=True,encoding='utf8', unicode_errors='ignore')
embeddings = gensim.models.KeyedVectors.load_word2vec_format("E:\\data\\cbow\\(CBOW58)-ASA-3B-CBOW-window5-3iter-d300-vecotrs.bin", binary=True,encoding='utf8', unicode_errors='ignore')
#embeddings = gensim.models.Word2Vec.load('C:\\Users\\paperspace\\Desktop\\Twt-CBOW\\Twt-CBOW')
#embeddings = gensim.models.Word2Vec.load('E:\\data\\aravec\\Twt-CBOW')
LoadDataset_General = LoadDataset_General()
datasets = list()
datasets = {
# ('ASTD',40), #10000 records
# ('BBN',40),
# ('SYR',40),
# ('HTL',1110),
# ('MOV',2335),
# ('ATT',568),
# ('PROD',234),
# ('RES',539), #10900 records
('EG_NU',540)#,
# ('SemEval',540)
}
for dataset_name, max_sent_len in datasets:
# Reading csv data
# ==================================================
print ("Reading text data for classification and building representations...")
reviews = []
# reviews = [ ( row["text"] , row["polarity"] ) for row in csv.DictReader(open(file_name, encoding="utf8"), delimiter=',', quoting=csv.QUOTE_NONE) ]
(body_all,rating_all)=LoadDataset_General.Load_Data(dataset_name)
num_classes = len( set( rating_all ) )
body = list()
rating = list()
# for i in range(0, len(body_all)):
# if rating_all[i] != 0:
# body.append(body_all[i] )
# rating.append(rating_all[i])
#
columns = {'body': body_all, 'rating': rating_all}
data = pd.DataFrame(columns, columns = ['body', 'rating'])
reviews = pd.DataFrame([[body_all, rating_all]])
############### Preprocessing ########
for i in range(0,len(data)):
data.iloc[i,0] = re.sub("\"",'',data.iloc[i,0])
data.iloc[i,0] = LoadDataset_General.Emoticon_detection(data.iloc[i,0])
# data.iloc[i,0] = re.sub(u'\@',u'', data.iloc[i,0])
data.iloc[i,0] = LoadDataset_General.clean_raw_review(data.iloc[i,0])
data.iloc[i,0] = LoadDataset_General.normalizeArabic(data.iloc[i,0])
data.iloc[i,0] = LoadDataset_General.Elong_remove(data.iloc[i,0])
data.iloc[i,0] = LoadDataset_General.deNoise(data.iloc[i,0])
data.iloc[i,0] = LoadDataset_General.Remove_Stopwords(data.iloc[i,0])
# data.iloc[i,0] = LoadDataset_General.Named_Entity_Recognition(data.iloc[i,0])
# data[i] = LoadDataset_General.Stem_word(data[i])
# data.iloc[i,0] = LoadDataset_General.Light_Stem_word(data.iloc[i,0])
# data[i] = LoadDataset_General.Get_root_word(data[i])
if dataset_name in ('EG_NU','SemEval'):
(body,rating)=LoadDataset_General.Load_Data(dataset_name+'_test')
columns_test = {'body': body, 'rating': rating}
data_test = pd.DataFrame(columns_test, columns = ['body', 'rating'])
reviews = pd.DataFrame([[body, rating]])
for i in range(0,len(data_test)):
data_test.iloc[i,0] = re.sub("\"",'',data_test.iloc[i,0])
data_test.iloc[i,0] = LoadDataset_General.Emoticon_detection(data_test.iloc[i,0])
# data_test.iloc[i,0] = re.sub(u'\@',u'', data_test.iloc[i,0])
data_test.iloc[i,0] = LoadDataset_General.clean_raw_review(data_test.iloc[i,0])
data_test.iloc[i,0] = LoadDataset_General.normalizeArabic(data_test.iloc[i,0])
data_test.iloc[i,0] = LoadDataset_General.Elong_remove(data_test.iloc[i,0])
data_test.iloc[i,0] = LoadDataset_General.deNoise(data_test.iloc[i,0])
data_test.iloc[i,0] = LoadDataset_General.Remove_Stopwords(data_test.iloc[i,0])
# data_test.iloc[i,0] = LoadDataset_General.Named_Entity_Recognition(data_test.iloc[i,0])
# random.shuffle( data )
if dataset_name not in ('EG_NU','SemEval'):
train_size = int(len(data) * val_split)
train_texts = data.iloc[0:train_size,0].tolist()
test_texts = data.iloc[train_size:-1,0].tolist()
train_labels = data.iloc[0:train_size,1].tolist()
test_labels = data.iloc[train_size:-1,1].tolist()
num_classes = len( set( train_labels + test_labels ) )
tokenizer = Tokenizer(num_words=max_features, filters='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~\t\n', split=" ")
tokenizer.fit_on_texts(train_texts)
train_sequences = sequence.pad_sequences( tokenizer.texts_to_sequences( train_texts ) , maxlen=max_sent_len )
test_sequences = sequence.pad_sequences( tokenizer.texts_to_sequences( test_texts ) , maxlen=max_sent_len )
train_matrix = tokenizer.texts_to_matrix( train_texts )
test_matrix = tokenizer.texts_to_matrix( test_texts )
embedding_weights = np.zeros( ( max_features , embeddings_dim ) )
for word,index in tokenizer.word_index.items():
if index < max_features:
try: embedding_weights[index,:] = embeddings[word]
except: embedding_weights[index,:] = np.random.uniform(-0.25,0.25,embeddings_dim)
le = preprocessing.LabelEncoder( )
le.fit( train_labels + test_labels )
train_labels = le.transform( train_labels )
test_labels = le.transform( test_labels )
else:
train_texts = data.iloc[:,0].tolist()
test_texts = data_test.iloc[:,0].tolist()
train_labels = data.iloc[:,1].tolist()
test_labels = data_test.iloc[:,1].tolist()
num_classes = len( set( train_labels + test_labels ) )
tokenizer = Tokenizer(num_words=max_features, filters='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~\t\n', split=" ")
tokenizer.fit_on_texts(train_texts)
train_sequences = sequence.pad_sequences( tokenizer.texts_to_sequences( train_texts ) , maxlen=max_sent_len )
test_sequences = sequence.pad_sequences( tokenizer.texts_to_sequences( test_texts ) , maxlen=max_sent_len )
train_matrix = tokenizer.texts_to_matrix( train_texts )
test_matrix = tokenizer.texts_to_matrix( test_texts )
embedding_weights = np.zeros( ( max_features , embeddings_dim ) )
for word,index in tokenizer.word_index.items():
if index < max_features:
try: embedding_weights[index,:] = embeddings[word]
except: embedding_weights[index,:] = np.random.uniform(-0.25,0.25,embeddings_dim)
le = preprocessing.LabelEncoder( )
le.fit( train_labels + test_labels )
train_labels = le.transform( train_labels )
test_labels = le.transform( test_labels )
print ("Classes : " + repr( le.classes_ ))
if num_classes > 2:
labelencoder_train_labels = LabelEncoder()
train_labels = labelencoder_train_labels.fit_transform(train_labels)
#train_labels = keras.utils.to_categorical(train_labels, 4)
onehotencoder = OneHotEncoder(categorical_features = [0])
train_labels = train_labels.reshape((-1, 1))
train_labels = onehotencoder.fit_transform(train_labels).toarray()
labelencoder_test_labels = LabelEncoder()
test_labels = labelencoder_test_labels.fit_transform(test_labels)
onehotencoder = OneHotEncoder(categorical_features = [0])
test_labels = test_labels.reshape((-1, 1))
test_labels = onehotencoder.fit_transform(test_labels).toarray()
from keras.regularizers import l2
# CNN
# ===============================================================================================
print ("Method = CNN for Arabic Sentiment Analysis'")
model_variation = 'CNN-non-static'
np.random.seed(0)
nb_filter = embeddings_dim
main_input = Input(shape=(max_sent_len,))
embedding = Embedding(max_features, embeddings_dim, input_length=max_sent_len, mask_zero=False, weights=[embedding_weights] )(main_input)
Drop1 = Dropout(dropout_prob[0])(embedding)
i=0
conv_name=["" for x in range(len(filter_sizes))]
pool_name=["" for x in range(len(filter_sizes))]
flat_name=["" for x in range(len(filter_sizes))]
for n_gram in filter_sizes:
conv_name[i] = str('conv_' + str(n_gram))
conv_name[i] = Convolution1D(nb_filter=nb_filter, filter_length=n_gram, border_mode='valid', activation='relu', subsample_length=1, input_dim=embeddings_dim, input_length=max_sent_len)(Drop1)
pool_name[i] = str('maxpool_' + str(n_gram))
pool_name[i] = MaxPooling1D(pool_length=max_sent_len - n_gram + 1)(conv_name[i])
flat_name[i] = str('flat_' + str(n_gram))
flat_name[i] = Flatten()(pool_name[i])
i+=1
merged = merge([flat_name[0], flat_name[1], flat_name[2]], mode='concat')
droput_final = Dropout(dropout_prob[1])(merged)
Dense_final = Dense(100, input_dim=nb_filter * len(filter_sizes))(droput_final)
# Dense_final = Dense(num_classes, input_dim=nb_filter * len(filter_sizes))(droput_final)
if num_classes ==2:
# Dense_final = Dense(1, input_dim=nb_filter * len(filter_sizes))(droput_final)
Out = Dense(1, activation = 'linear', W_regularizer=l2(0.01))(Dense_final)
else:
# Dense_final = Dense(num_classes, input_dim=nb_filter * len(filter_sizes))(droput_final)
Out = Dense(num_classes, activation = 'linear', W_regularizer=l2(0.01))(Dense_final)
# Out = Dense(1, activation = 'linear', W_regularizer=l2(0.01))(Dense_final)
model = Model(inputs=main_input, outputs=Out)
# model = Model(inputs=main_input, outputs=Dense_final)
# Print model summary
# ==================================================
print(model.summary())
#Visualize the model in a graph
# plot_model(model, to_file='E:\\Results_3Classes\\model_plot.png', show_shapes=True, show_layer_names=True)
plot_model(model, to_file='E:\\Results_3Classes\\model_plot.png', show_shapes=True, show_layer_names=True)
# model compilation
# ==================================================
if num_classes == 2: model.compile(loss='hinge', optimizer='Adagrad', metrics=['accuracy'])
else: model.compile(loss='hinge', optimizer='Adagrad', metrics=['accuracy'])
# model early_stopping and checkpointer
# ==================================================
Round='round-1'
Vectors = 'Mine-vec'
Linked = 'Not-Linked'
# early_stopping = EarlyStopping(patience=20, verbose=1)
early_stopping = EarlyStopping(monitor='val_loss', min_delta=0,patience=0,verbose=0, mode='auto')
checkpointer = ModelCheckpoint(filepath= 'E:\\Results_3Classes\\Weights\\'+dataset_name+'_'+Round+'_'+Linked+'_'+model_variation+'_'+Vectors+'_weights_Ar_best.hdf5', verbose=1, save_best_only=False)
# checkpointer = ModelCheckpoint(filepath= 'E:\\Results_3Classes\\Weights\\'+dataset_name+'_'+Round+'_'+Linked+'_'+model_variation+'_'+Vectors+'_weights_Ar_best.csv', verbose=1, save_best_only=False)
with open('E:\\Results_3Classes\\Results.txt', 'a') as the_file:
the_file.write(dataset_name)
the_file.write('\n---------------------------------------\n')
the_file.write('Dataset_Size: ')
the_file.write(str(len(body)))
the_file.write('\nAnd after removing duplicates: ')
the_file.write(str(len(data)))
the_file.write('\n')
the_file.write('Number of Classes: ')
the_file.write(str(num_classes))
the_file.write('\n')
the_file.write('Filter Sizes: ')
the_file.write(str(filter_sizes))
# the_file.write('Classes are: ')
# the_file.write(repr( le.classes_ ))
the_file.write('\n')
the_file.write('\nStart_Time\n')
the_file.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
the_file.write('\n')
# model history
# ==================================================
history = model.fit(train_sequences, train_labels, validation_data = (test_sequences, test_labels), batch_size=32, nb_epoch=30, verbose=2, callbacks=[early_stopping, checkpointer])
# history = model.fit(train_sequences, train_labels, validation_data = (test_sequences, test_labels), batch_size=32, nb_epoch=2, verbose=2, callbacks=[early_stopping, checkpointer])
n_epochs = len(history.history['loss'])
# list all data in history
print(history.history.keys())
# summarize history for accuracy
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train_acc', 'test_acc'], loc='upper left')
plt.show()
plt.savefig('E:\\Results_3Classes\\train_test_acc_'+dataset_name+'.png')
plt.gcf().clear()
# summarize history for loss
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train_loss', 'test_loss'], loc='upper left')
plt.show()
plt.savefig('E:\\Results_3Classes\\train_test_loss_'+dataset_name+'.png')
plt.gcf().clear()
with open('E:\\Results_3Classes\\Results.txt', 'a') as the_file:
the_file.write('\nEnd_Time\n')
the_file.write(datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
the_file.write('\n n_epochs: ')
the_file.write(str(n_epochs))
the_file.write('\n')
# Evaluate model keras
# ==================================================
print("Evaluate...")
score, acc = model.evaluate(test_sequences, test_labels,batch_size=32)
print('Test score:', score)
print('Test accuracy:', acc)
with open('E:\\Results_3Classes\\Results.txt', 'a') as the_file:
the_file.write('\nTest score: ')
the_file.write(str(score))
the_file.write('\nTest accuracy: ')
the_file.write(str(acc))
the_file.write('\n')
|
[
"noreply@github.com"
] |
RanaMK.noreply@github.com
|
0658f5c9ccc3c55170a1c98c3ebfc73e980fc31e
|
1d1973a3ab280609ccf94e866c760b428ec8e51a
|
/blog/populate/book.py
|
5209798759e258c0dc1d2111b57a8dd9f8ebd124
|
[] |
no_license
|
joanne987321/yiblog
|
7e7afe59629e93b4b25b327c689b6dcf4b72045c
|
1d847bda017af8164f1c27926f366d07d7c69a4f
|
refs/heads/master
| 2021-01-11T07:57:26.261773
| 2016-11-18T04:37:16
| 2016-11-18T04:37:16
| 72,162,108
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,046
|
py
|
from populate import base
import random
import datetime
from article.models import Book
def populate():
print('Populating book...', end='')
titles = ['如何像電腦科學家一樣思考', '10 分鐘內學好 Python', '簡單學習 Django'
'如何像電腦科學家一樣思考2', '10 分鐘內學好 Python2', '簡單學習 Django2'
'如何像電腦科學家一樣思考3', '10 分鐘內學好 Python3', '簡單學習 Django3'
'如何像電腦科學家一樣思考4', '10 分鐘內學好 Python4', '簡單學習 Django4']
authors =['張三','李四','王五','照六','前七']
Book.objects.all().delete()
for title in titles:
book = Book()
book.title = title
n = random.randint(0,len(authors)-1)
book.author = authors[n]
book.publisher = book.author
book.pubDate = datetime.datetime.today()
book.version = '1'
book.price = 1000
book.save()
print('done')
if __name__ == '__main__':
populate()
|
[
"joanne@m516-HP-EliteDesk-800-G1-TWR"
] |
joanne@m516-HP-EliteDesk-800-G1-TWR
|
cf8eca2a88c5a6dd95e1afdab331ae225fbf3df0
|
c90f01b6780a6446f1c3a2cd85afee08e881f5b1
|
/authApp/migrations/0002_profile_email.py
|
377f183f408848b8166dd622a7d9d6a2be70409a
|
[] |
no_license
|
Masud2017/invoice_inspector
|
f75b5ff7ece70be793d2cf654503c324299ba3c3
|
afcb78209ec23b800b2d88bf27d2f1536309aa89
|
refs/heads/master
| 2021-04-14T00:18:29.340423
| 2020-11-12T21:36:07
| 2020-11-12T21:36:07
| 249,197,567
| 2
| 0
| null | 2020-10-24T08:25:51
| 2020-03-22T14:12:24
|
Python
|
UTF-8
|
Python
| false
| false
| 387
|
py
|
# Generated by Django 2.2.2 on 2020-03-28 03:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('authApp', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='profile',
name='email',
field=models.EmailField(blank=True, max_length=254),
),
]
|
[
"unroot@localhost.localdomain"
] |
unroot@localhost.localdomain
|
c4e5ffa01c16819dbb3597b99a6ca8131cb93f9f
|
b9de33c6fb310ef69cba728b9de1a31165c3a031
|
/chapter_16_17/closures_VS_classes.py
|
29b07b69748af656a9f9da7e2ab672e65fdf4541
|
[] |
no_license
|
bimri/learning-python
|
2fc8c0be304d360b35020a0dfc16779f78fb6848
|
5f2fcc9a08f14e1d848530f84ce3b523d1f72aad
|
refs/heads/master
| 2023-08-12T20:30:09.754468
| 2021-10-15T20:53:49
| 2021-10-15T20:53:49
| 377,515,946
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,474
|
py
|
"Retaining Enclosing Scope State with Defaults"
def f1():
x = 88
def f2(x=x): # Remember enclosing scope X with defaults
print(x)
f2()
f1() # Prints 88
'''
Code inside a def is never evaluated until the function is
actually called:'''
def f1():
x = 88 # Pass x along instead of nesting
f2(x)
def f2(x):
print(x)
f1()
"Nested scopes, defaults, and lambdas"
# variation on the factory we saw earlier
def func():
x = 4
action = (lambda n: x ** n) # x remembered form enclosing def
return action
x = func()
print(x(2)) # Prints 16, 4 ** 2
"programmers used defaults to pass values from an enclosing scope into lambdas, just as for defs"
def func():
x = 4
action = (lambda n, x=x: x ** n) # Pass x in manually
return action
"Loop variables may require defaults, not scopes"
def makeActions():
acts = []
for i in range(5): # Tries to rem each i
acts.append(lambda x:i ** x) # But all rem same last i!
return acts
acts = makeActions()
print(acts[0]) # doesn’t quite work
print(acts[0](2)) # All are 4 ** 2, 4 = value of last i
print(acts[1](2)) # This should be 1 ** 2 (1)
print(acts[2](2)) # This should be 2 ** 2 (4)
print(acts[4](2)) # ONLY this should be 4 ** 2 (16)
'''
Because defaults are evaluated when the nested function is created (not when
it’s later called), each remembers its own value for i:
'''
def makeActions():
acts = []
for i in range(5): # Use defaults instead
acts.append(lambda x, i=i: i ** x) # Rem current i
return acts
acts = makeActions()
print(acts[0](2)) # 0 ** 2
print(acts[1](2)) # 1 ** 2 # 0 ** 2
print(acts[2](2)) # 2 ** 2
print(acts[4](2)) # 4 ** 2
"Arbitrary scope nesting"
def f1():
x = 99
def f2():
def f3():
print(x) # Found in f1's local scope!
f3()
f2()
f1()
|
[
"bimri@outlook.com"
] |
bimri@outlook.com
|
10c764d5ec29bff6abf3c3452acf53b4ecd52792
|
b9394465cf2ef5bb2b3bb527110233e8e8783b21
|
/01 Data Prep and Visualization/Convert_to_dict.py
|
ab2fbb9ede04de69c76ec48a80daa6cf4d754802
|
[] |
no_license
|
gretaheng/Django_Project
|
e0f8d65471a2329a71b96a9a818cbe1fc68997f6
|
551c7d4529c5a3f3462d94df06b4940104d4e3b1
|
refs/heads/master
| 2022-11-29T07:26:01.785484
| 2020-08-19T03:14:09
| 2020-08-19T03:14:09
| 288,620,702
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,061
|
py
|
# Convert the output from Modify_csv_data.py into a dictionary and export as json file
import pandas as pd
import json
# import hyde_park_crime data into pandas data frame
hyde_park = pd.read_csv('hyde_park_crime.csv')
# make all upper case in to lower case
hyde_park = hyde_park.apply(lambda x: x.astype(str).str.lower())
# get data only for 2017
hyde_park = hyde_park[(hyde_park.Year == "2017")]
# convert data frame columns into list
ID = hyde_park["ID"].tolist()
PrimaryType = hyde_park["PrimaryType"].tolist()
X_Coordinate = hyde_park["XCoordinate"].tolist()
Y_Coordinate = hyde_park["YCoordinate"].tolist()
# define a dictionary
hyde_park_list = []
for i in range(len(ID)):
i = {"type": PrimaryType[i],"geometry": {"type": "Point", "location": (X_Coordinate[i], Y_Coordinate[i])}}
hyde_park_list.append(i)
# define a dictionary
final_dict = {"features": hyde_park_list}
# drop dictionary key
if 'key' in final_dict:
del final_dict['key']
# export as a json file
with open('final_dict.json', 'w') as fd:
json.dump(final_dict, fd)
|
[
"gretaheng18@gmail.com"
] |
gretaheng18@gmail.com
|
396a0d78e2dbad583b9cf3ed2da19e3cc2c7e15a
|
f0e6a2cd2ba976e5f1b80a49d523c7c3f4333073
|
/OrganizadorDeTareas/users/migrations/0003_auto_20191129_0724.py
|
7caa580e21aaf71b544849f180ef8455372bdb5d
|
[] |
no_license
|
DCC-CC4401/2019-2-Another-One-Bytes-DDoS-T4
|
11a58dc274a60b8943721e4521c9549137ec823c
|
29549c73be592e5cea159c51fedadd2b6d2f0766
|
refs/heads/master
| 2020-07-31T00:44:39.131991
| 2019-12-01T23:04:50
| 2019-12-01T23:04:50
| 210,419,406
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 643
|
py
|
# Generated by Django 2.2.7 on 2019-11-29 07:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_auto_20191129_0716'),
]
operations = [
migrations.AlterField(
model_name='usuario',
name='correo',
field=models.EmailField(max_length=50, unique=True, verbose_name='Correo Electrónico'),
),
migrations.AlterField(
model_name='usuario',
name='id',
field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
]
|
[
"sebastian.alfaro@ing.uchile.cl"
] |
sebastian.alfaro@ing.uchile.cl
|
4f16ffbaed8486809cfe453c84b2ec553518556a
|
a631984152b1449df9ef156cf80a033f6a5692ed
|
/Sentdex Tutorials/Quantopian [SENTDEX]/QuantopianTradingTutorial_p3.py
|
91e4d220130eadf92e9d470d90397779c9eda869
|
[] |
no_license
|
john-m-hanlon/Python
|
2f58e20ba56b3dede3baf6f5ed259d741434108b
|
56ebf291b2d8d15f47c942c49d9f40d0ae18741e
|
refs/heads/master
| 2020-06-11T09:47:09.188169
| 2017-03-14T03:32:51
| 2017-03-14T03:32:51
| 75,688,794
| 0
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,055
|
py
|
'''
def initialize(context):
context.security = [sid(8554)]
def handle_data(context, data):
print(data)
price_hist = data.history(context.security,'price',200,'1d')
MA1 = price_hist[-50:].mean()
MA2 = price_hist.mean()
current_price = data.current(context.security, 'price')
current_positions = context.portfolio.positions[symbol('SPY')].amount
cash = context.portfolio.cash
if (MA1 > MA2) and current_positions == 0:
number_of_shares = int(cash/current_price)
order(context.security, number_of_shares)
log.info('Buying shares')
elif (MA1 < MA2) and current_positions > 0:
order_target(context.security, 0)
log.info('Selling shares')
record(MA1 = MA1, MA2 = MA2, Price = current_price)
'''
# This initialize function sets any data or variables that you'll use in
# your algorithm.
def initialize(context):
context.stock = symbol('SPY') # Boeing
# Since record() only works on a daily resolution, record our price at the end
# of each day.
schedule_function(record_vars,
date_rule=date_rules.every_day(),
time_rule=time_rules.market_close(hours=1))
# Now we get into the meat of the algorithm.
def record_vars(context, data):
# Create a variable for the price of the Boeing stock
current_price = data.current(context.stock, 'price')
# Create variables to track the short and long moving averages.
# The short moving average tracks over 20 days and the long moving average
# tracks over 80 days.
price_history = data.history(context.stock, 'price', 26, '1d')
short_mavg = price_history[-12:].mean()
long_mavg = price_history.mean()
# Create current positions
current_positions = context.portfolio.positions[symbol('SPY')].amount
cash = context.portfolio.cash
# If the short moving average is higher than the long moving average, then
# we want our portfolio to hold 500 stocks of Boeing
if (short_mavg > long_mavg) and current_positions == 0:
#order_target(context.stock, +500)
number_of_shares = int(cash/current_price)
order(context.stock, number_of_shares)
log.info('Buying shares')
# If the short moving average is lower than the long moving average, then
# then we want to sell all of our Boeing stocks and own 0 shares
# in the portfolio.
elif (short_mavg < long_mavg) and current_positions != 0:
#order_target(context.stock, 0)
#elif (MA1 < MA2) and current_positions > 0:
order_target(context.stock, 0)
log.info('Selling shares')
# Record our variables to see the algo behavior. You can record up to
# 5 custom variables. Series can be toggled on and off in the plot by
# clicking on labeles in the legend.
record(short_mavg = short_mavg, long_mavg = long_mavg, Price = current_price)
|
[
"JohnHanlon@Johns-Air.home"
] |
JohnHanlon@Johns-Air.home
|
96dd71a9955f0d1d9f7160eba7c179a5106bf09d
|
688f9d1afac62260570f1b82ec16fd99b7c6d28e
|
/src/assn6/problem2-3.py
|
3264b26f3158f19ffd571801d6de427728f824b9
|
[] |
no_license
|
Bryson14/Numerical_Methods
|
8d9a84ec73a5715a38b88668d4fd02f2433f1a07
|
d4398cb16473d9bbdd705d68b3f076cb9e701ce6
|
refs/heads/master
| 2020-09-28T13:48:47.159737
| 2020-04-09T00:53:25
| 2020-04-09T00:53:25
| 226,790,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,740
|
py
|
import numpy as np
import matplotlib.pyplot as plt
'''
y_x+1 = y_x + h * f(t_x, y_x)
'''
def euler(inital_v, initial_y, step):
curr_y = initial_y
positions = [curr_y]
times = [0]
velocities = [inital_v]
index = 0
while curr_y > 0: # hasn't hit the ground yet
if index % (1/step) == 0:
print(index)
velocities.append(velocities[index] + falling_acc(velocities[index]) * step)
positions.append(positions[index] + falling_vel(velocities[index]) * step)
times.append(index * step)
curr_y = positions[index + 1]
index += 1
print(f"Object hit the ground at approximately {times[-1]} seconds")
make_plot(times, positions, velocities, "Position/ Velocity Approximation using Euler's Method")
return times, positions, velocities
'''
ODE representing the downward acceleration of a falling object.
Positive return value means the object is accelerating downward.
This is representing the air drag that is proportional to the velocity squared
This means that at +-62.64 m/s, the air drag and gravity equal, reaching terminal velocity
dv/dt = 9.81-0.0025v^2
'''
def falling_acc(v):
return 9.81 - 0.0025 * np.power(v, 2)
'''
ODE representing the downward velocity of a falling object
dy/dt = -v
'''
def falling_vel(v):
return -v
'''
Produces the plot with two y axis. Convenient for plotting without duplicating data
'''
def make_plot(time, position, velocity, title):
fig, ax1 = plt.subplots()
color = 'tab:red'
ax1.set_xlabel('time (s)')
ax1.set_ylabel('Position (m)', color=color)
ax1.plot(time, position, label="Position", color=color)
ax1.tick_params(axis='y', labelcolor=color)
ax2 = ax1.twinx() # instantiate a second axes that shares the same x-axis
color = 'tab:blue'
ax2.set_ylabel('Velocity (m/s)', color=color) # we already handled the x-label with ax1
ax2.plot(time, velocity, label="Velocity", color=color)
ax2.tick_params(axis='y', labelcolor=color)
ax1.set_title(title)
fig.tight_layout() # otherwise the right y-label is slightly clipped
# fig.savefig("RK4 Method Falling Object.png")
plt.show()
'''
Runge-Kutta Method is a better version basically of Euler's Method.
t takes four different approximations at each step, then makes the next step an average of the four approximations.
'''
def runge_kutta(inital_v, initial_y, step):
curr_y = initial_y
positions = [curr_y]
times = [0]
velocities = [inital_v]
index = 0
'''
Naming Scheme:
vel_1 -> velocity approximation 1
pos_1 -> position approximation 1
'''
while curr_y > 0: # hasn't hit the ground yet
pos_1 = falling_vel(velocities[index])
vel_1 = falling_acc(velocities[index])
pos_2 = falling_vel(velocities[index] + 0.5 * step * vel_1)
vel_2 = falling_acc(velocities[index] + 0.5 * step * vel_1)
pos_3 = falling_vel(velocities[index] + 0.5 * step * vel_2)
vel_3 = falling_acc(velocities[index] + 0.5 * step * vel_2)
pos_4 = falling_vel(velocities[index] + step * vel_3)
vel_4 = falling_acc(velocities[index] + step * vel_3)
velocities.append(velocities[index] + (vel_1 + 2*vel_2 + 2*vel_3 + vel_4) * step / 6)
positions.append(positions[index] + (pos_1 + 2*pos_2 + 2*pos_3 + pos_4) * step / 6)
times.append(index * step)
curr_y = positions[index + 1]
index += 1
print(f"Object hit the ground at approximately {times[-1]} seconds")
make_plot(times, positions, velocities, "Position/ Velocity Approximation using Runge-Kutta 4 Approximation")
return times, positions, velocities
runge_kutta(0, 2000, .001)
# euler(0, 2000, 0.001)
|
[
"bryson.meiling@aggiemail.usu.edu"
] |
bryson.meiling@aggiemail.usu.edu
|
5d1d37d350ad863d0d4e0dda06e14fa47443dc69
|
fda04351cf6c292e39b639b22075d5aa0c06eecd
|
/decoder/lperesde/default.py
|
2c09f205f0ecc64894cb5ce026b9d7f9e5d67462
|
[] |
no_license
|
turash104/NLP
|
b9e604d109ef4d4d2f293a9a9c888dea9a43936c
|
82747a47a9d87b02d06a8e170232f1e3a5f48a4d
|
refs/heads/master
| 2021-05-11T22:48:32.503151
| 2017-12-09T07:42:56
| 2017-12-09T07:42:56
| 117,502,316
| 0
| 1
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 4,578
|
py
|
#!/usr/bin/env python
import optparse
import sys
import models
from collections import namedtuple
optparser = optparse.OptionParser()
optparser.add_option("-i", "--input", dest="input", default="../data/input", help="File containing sentences to translate (default=data/input)")
optparser.add_option("-t", "--translation-model", dest="tm", default="../data/tm", help="File containing translation model (default=data/tm)")
optparser.add_option("-l", "--language-model", dest="lm", default="../data/lm", help="File containing ARPA-format language model (default=data/lm)")
optparser.add_option("-n", "--num_sentences", dest="num_sents", default=sys.maxint, type="int", help="Number of sentences to decode (default=no limit)")
optparser.add_option("-k", "--translations-per-phrase", dest="k", default=1, type="int", help="Limit on number of translations to consider per phrase (default=1)")
optparser.add_option("-s", "--stack-size", dest="s", default=1, type="int", help="Maximum stack size (default=1)")
optparser.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, help="Verbose mode (default=off)")
opts = optparser.parse_args()[0]
tm = models.TM(opts.tm, opts.k)
lm = models.LM(opts.lm)
french = [tuple(line.strip().split()) for line in open(opts.input).readlines()[:opts.num_sents]]
# tm should translate unknown words as-is with probability 1
for word in set(sum(french,())):
if (word,) not in tm:
tm[(word,)] = [models.phrase(word, 0.0)]
sys.stderr.write("Decoding %s...\n" % (opts.input,))
for f in french:
# The following code implements a monotone decoding
# algorithm (one that doesn't permute the target phrases).
# Hence all hypotheses in stacks[i] represent translations of
# the first i words of the input sentence. You should generalize
# this so that they can represent translations of *any* i words.
hypothesis = namedtuple("hypothesis", "logprob, lm_state, predecessor, phrase")
initial_hypothesis = hypothesis(0.0, lm.begin(), None, None)
stacks = [{} for _ in f] + [{}]
stacks[0][lm.begin()] = initial_hypothesis
for i, stack in enumerate(stacks[:-1]):
for h in sorted(stack.itervalues(),key=lambda h: -h.logprob)[:opts.s]: # prune
for j in xrange(i+1,len(f)+1):
if f[i:j] in tm:
for phrase in tm[f[i:j]]:
logprob = h.logprob + phrase.logprob
lm_state = h.lm_state
for word in phrase.english.split():
(lm_state, word_logprob) = lm.score(lm_state, word)
logprob += word_logprob
logprob += lm.end(lm_state) if j == len(f) else 0.0
new_hypothesis = hypothesis(logprob, lm_state, h, phrase)
if lm_state not in stacks[j] or stacks[j][lm_state].logprob < logprob: # second case is recombination
stacks[j][lm_state] = new_hypothesis
winner = max(stacks[-1].itervalues(), key=lambda h: h.logprob)
def extract_english(h):
return "" if h.predecessor is None else "%s%s " % (extract_english(h.predecessor), h.phrase.english)
def best_swap(h):
word = extract_english(h)
words = word.split()
best = None
prob = -1000
for i in range(len(words)-2):
arr = words
arr_cp = words
arr[i], arr[i+1] = arr[i+1], arr[i]
current_prob = 1000
while arr != []:
states = tuple(arr[0:2]) if arr != None and arr[0:2] != None else ()
w = arr[2] if arr != None and len(arr) > 2 else ""
try:
#trigram
(state, p) = lm.score(states, w)
current_prob -= p
except:
#bigram
try:
(st1, p1) = lm.score(states[:-1], states[-1:])
(st2, p2) = lm.score(states[-1:], w)
current_prob -= (p1 + p2) / 2
except:
#unigram
try:
(st1, p1) = lm.score((), states[:-1])
(st2, p2) = lm.score((), states[-1:])
(st3, p3) = lm.score((), w)
current_prob -= (p1 + p2 + p2) / 3
except:
#penalize
current_prob -= 10
arr = arr[2:len(arr)]
if current_prob > prob:
best = arr_cp
prob = current_prob
return best
print " ".join(best_swap(winner))
if opts.verbose:
def extract_tm_logprob(h):
return 0.0 if h.predecessor is None else h.phrase.logprob + extract_tm_logprob(h.predecessor)
tm_logprob = extract_tm_logprob(winner)
sys.stderr.write("LM = %f, TM = %f, Total = %f\n" %
(winner.logprob - tm_logprob, tm_logprob, winner.logprob))
|
[
"luiz_peres10@hotmail.com"
] |
luiz_peres10@hotmail.com
|
258935b8a9252c579930fffdb4bbb983e47816fe
|
9bfc1d17079606513eec50aa9cc02e722eae76d8
|
/dev/event_timer.py
|
fcd7422970bf6f455830249e8f25839ca51e8add
|
[] |
no_license
|
causelovem/ddsCrewBot
|
a84ec535539558f7fb3a6e3830f661bf75b358b8
|
9d04e1aece165443d6355dbfa02ca0ac80e398a9
|
refs/heads/master
| 2020-07-28T12:02:56.388083
| 2020-06-20T13:09:12
| 2020-06-20T13:09:12
| 209,404,013
| 1
| 1
| null | 2020-03-17T15:01:26
| 2019-09-18T21:05:55
|
Python
|
UTF-8
|
Python
| false
| false
| 14,450
|
py
|
# -*- coding: utf-8 -*-
import threading as th
import datetime
import config as cfg
import database as db
import random as rnd
import time
import utils
rnd.seed(datetime.datetime.now().time().second)
@cfg.loglog(command='call_all', type='bot')
def call_all(query=db.sel_all_text, chat_id=None):
chatUsers = {}
if chat_id is None:
for cid in cfg.subscribed_chats:
users = db.sql_exec(query, [cid])
if users == []:
chatUsers[cid] = ''
continue
call_users = '@all: '
for i in users:
call_users += '@' + str(i[0]) + ' '
chatUsers[cid] = call_users.strip() + '\n'
else:
users = db.sql_exec(query, [chat_id])
if users == [] or chat_id not in cfg.subscribed_chats:
chatUsers[chat_id] = ''
return chatUsers
call_users = '@all: '
for i in users:
call_users += '@' + str(i[0]) + ' '
chatUsers[chat_id] = call_users.strip() + '\n'
return chatUsers
@cfg.loglog(command='send_msg', type='bot')
def send_msg(bot, msg, cid=None):
chatToSend = cfg.subscribed_chats if cid is None else [cid]
for chat_id in chatToSend:
utils.sendMessage(bot, chat_id, msg, 'HTML')
@cfg.loglog(command='check_metadata', type='bot')
def check_metadata(bot):
time_now = datetime.datetime.now()
# выбираем все активные строки из метаданных
meta = db.sql_exec("""SELECT * FROM METADATA
WHERE operation in (0, 1) and is_success_flg = ?""", [1])
# meta = db.sql_exec(db.sel_operation_meta_text, [0, 1])
# meta.extend(db.sql_exec(db.sel_operation_meta_text, [1, 1]))
# meta = db.sql_exec(db.sel_operation_meta_text, [(0, 1), 1])
for m in meta:
# print(m)
# '%Y-%m-%d %H:%M:%S'
dttm = datetime.datetime.strptime(m[6], '%Y-%m-%d %H:%M:%S')
if (dttm.date() == time_now.date()) and (dttm.time() >= time_now.time()):
# штрафы
if m[1] == 0:
print(m)
user = db.sql_exec(db.sel_election_text, [m[2], m[3]])
if len(user) == 0:
# обновляем строку в метаданных как ошибочную
db.sql_exec(db.upd_operation_meta_text, [2, m[0]])
print('!!! ОШИБКА, НЕТ ЮЗЕРА В БАЗЕ ДЛЯ ' + str(m[2]) + ' ' + str(m[3]) + ' !!!')
else:
if m[4] >= 0:
# вычисляем дату исполнения
hh = 48
if dttm.weekday() in (4, 5):
hh = 96
if dttm.weekday() == 6:
hh = 72
delta = datetime.timedelta(hours=hh, minutes=5)
# delta = datetime.timedelta(seconds=10)
expire_date = time_now + delta
db.sql_exec(db.ins_operation_meta_text,
[cfg.max_id_rk, 0, m[2], m[3], -int(m[4]),
str(time_now)[:-7], str(expire_date)[:-7], 1])
cfg.max_id_rk += 1
penalty = int(user[0][3]) + int(m[4])
if penalty < 0:
penalty = 0
elif penalty > utils.getSettings(m[2], 'max_deviation').seconds // 60:
penalty = utils.getSettings(m[2], 'max_deviation').seconds // 60
# ставим/убираем штраф
db.sql_exec(db.upd_election_penalty_text, [penalty, m[2], m[3]])
# обновляем строку в метаданных как успешно отработавшую
db.sql_exec(db.upd_operation_meta_text, [0, m[0]])
print(db.sql_exec("""SELECT * FROM METADATA""", []))
print(db.sql_exec("""SELECT * FROM ELECTION""", []))
# воронков
elif m[1] == 1 and utils.getSettings(m[2], 'voronkov') == 1:
dttmt = dttm.time()
expire_time = datetime.timedelta(hours=dttmt.hour, minutes=dttmt.minute,
seconds=dttmt.second)
dttmt_now = time_now.time()
time_now_delta = datetime.timedelta(hours=dttmt_now.hour, minutes=dttmt_now.minute,
seconds=dttmt_now.second)
delta = expire_time - time_now_delta
delta = int(delta.total_seconds()) + 1
th.Timer(delta, voronkov_timer, args=(bot, m,)).start()
elif dttm < time_now:
# обновляем строку в метаданных как ошибочную (не выполнилась в нужную дату или время)
db.sql_exec(db.upd_operation_meta_text, [2, m[0]])
print('!!! ОШИБОЧНАЯ СТРОКА В ТАБЛИЦЕ МЕТАДАННЫХ !!!')
print(m)
# команду штрафа надо применить в любом случае
if m[1] == 0:
cfg.meta_error_flg = 1
delta = datetime.timedelta(minutes=10)
expire_date = time_now + delta
db.sql_exec(db.ins_operation_meta_text,
[cfg.max_id_rk, 0, m[2], m[3], m[4],
str(time_now)[:-7], str(expire_date)[:-7], 1])
cfg.max_id_rk += 1
@cfg.loglog(command='voronkov_timer', type='bot')
def voronkov_timer(bot, meta):
# print(meta)
user = db.sql_exec(db.sel_text, [meta[2], meta[3]])
# print(user)
if user == []:
users = db.sql_exec(db.sel_all_text, [meta[2]])
if users != []:
# user = rnd.choice(users)
user = [rnd.choice(users)]
print('! НЕТ ТЕКУЩЕГО ЮЗЕРА, БЫЛ ВЫБРАН ДРУГОЙ !')
else:
# обновляем строку в метаданных как ошибочную
db.sql_exec(db.upd_operation_meta_text, [2, meta[0]])
print('!!! ОШИБКА, НЕТ ЮЗЕРОВ В БАЗЕ ДЛЯ CHAT_ID = ' + str(meta[2]) + ' !!!')
return
user = '@' + user[0][0]
scenario = rnd.choice(cfg.voronkov_text)
print(scenario)
send_msg(bot, user + scenario[0], meta[2])
time.sleep(1)
send_msg(bot, scenario[1], meta[2])
time.sleep(1)
send_msg(bot, scenario[2] + str(rnd.randint(10000, 19999)), meta[2])
time.sleep(1)
send_msg(bot, scenario[3], meta[2])
bot.send_sticker(meta[2], cfg.stiker_voronkov)
# обновляем строку в метаданных как успешно отработавшую
db.sql_exec(db.upd_operation_meta_text, [0, meta[0]])
# print(db.sql_exec("""SELECT * FROM METADATA""", []))
@cfg.loglog(command='dinner_timer', type='bot')
def dinner_timer(bot, chat_id):
chatUsers = call_all(db.sel_all_text, chat_id)
for cid, msg in chatUsers.items():
if msg == '':
print('Чат отписался от рассылки, сообщение не отправлено; CHAT_ID = ' + str(cid))
else:
send_msg(bot, '{}{}{}<b>{}</b>'.format(msg, rnd.choice(cfg.dinner_notif_text),
rnd.choice(cfg.dinner_text), cfg.show_din_time[cid]), cid)
@cfg.loglog(command='one_hour_timer', type='bot')
def one_hour_timer(bot):
time_now = datetime.datetime.now()
# флаг, который говорит, показывать ли сообщения (показывает, когда 1)
to_show = 0
# начальное время таймера (60 * 60)
timer_time = 3600
# начальная дельта (0)
delta = datetime.timedelta(seconds=0)
if str(time_now.time().minute) in ('0'):
to_show = 1
if str(time_now.time().second) <= '30':
# нормальная работа
timer = th.Timer(timer_time, one_hour_timer, args=(bot,))
else:
# случай для возможного увеличения времени из-за расчётов программы
timer_time -= 29
timer = th.Timer(timer_time, one_hour_timer, args=(bot,))
else:
# рандомное время, например, при запуске бота
# высчитываем время до ближайшего часа **:00:01
common_time = datetime.timedelta(minutes=60, seconds=0)
cur_time = datetime.timedelta(minutes=time_now.time().minute, seconds=time_now.time().second)
delta = common_time - cur_time
timer_time = int(delta.total_seconds()) + 1
timer = th.Timer(timer_time, one_hour_timer, args=(bot,))
print('Секунды до таймера =', timer_time)
print('Время до таймера =', delta)
timer.start()
if to_show == 1:
# будние дни
if time_now.weekday() not in (5, 6):
for chats in cfg.subscribed_chats:
chatSettings = utils.getSettings(chats)
# доброе утро и вызвать pidora
if str(time_now.time().hour) == '9' and chatSettings['pidor'] == 1:
send_msg(bot, rnd.choice(cfg.gm_text), chats)
send_msg(bot, '/pidor@SublimeBot', chats)
# напоминание о голосовании за обед
if time_now.time().hour == chatSettings['elec_end_hour'] - 1:
chatUsers = call_all(db.sel_nonvoted_users_text, chats)
for cid, msg in chatUsers.items():
send_msg(bot, msg + rnd.choice(cfg.vote_notif_text), cid)
# обед
if time_now.time().hour == chatSettings['elec_end_hour']:
chatUsers = call_all(chat_id=chats)
cur_time = datetime.timedelta(hours=time_now.time().hour, minutes=time_now.time().minute,
seconds=time_now.time().second)
for cid, msg in chatUsers.items():
send_msg(bot, '{}{}<b>{}</b>'.format(msg, rnd.choice(cfg.dinner_text),
cfg.show_din_time[cid]), cid)
# сохраняем историю голосования
db.sql_exec(db.colect_election_hist_text, [str(time_now.date())])
# обнуляем время голосования
db.sql_exec(db.reset_election_time_text, [0])
# ставим таймер за 10 минут до обеда, о напоминании об обеде
delta = utils.calc_show_din_time(cid) - cur_time - datetime.timedelta(minutes=10,
seconds=0)
th.Timer(int(delta.total_seconds()) + 1, dinner_timer, args=(bot, cid,)).start()
# # намёк поесть
# if str(time_now.time().hour) == '17':
# send_msg(bot, rnd.choice(cfg.eat_text))
# пора уходить с работы
if str(time_now.time().hour) == '19':
send_msg(bot, rnd.choice(cfg.bb_text), chats)
# в определённое время намекать на попить
if str(time_now.time().hour) in ('11', '15', '17', '18'):
send_msg(bot, rnd.choice(cfg.pitb_text), chats)
# выходные
elif time_now.weekday() == 6:
# напоминать про дсс
if str(time_now.time().hour) == '19':
chatUsers = call_all()
for cid, msg in chatUsers.items():
send_msg(bot, msg + rnd.choice(cfg.dss_text), cid)
# поставить таймер на воронкова
if str(time_now.time().hour) == '23':
for cid in cfg.subscribed_chats:
# оставляем небольшой запас времени на вычисления
# 1 минута и 10 секунд
hh = rnd.randint(1, 119)
mm = rnd.randint(1, 58)
ss = rnd.randint(0, 50)
# вычисляем дату исполнения
delta = datetime.timedelta(hours=hh, minutes=mm, seconds=ss)
expire_date = time_now + delta
if utils.getSettings(cid, 'voronkov') == 1:
users = db.sql_exec(db.sel_all_text, [cid])
if users != []:
call_user = rnd.choice(users)[1]
# добавляем строку воронкова в метаданные для каждого чата
db.sql_exec(db.ins_operation_meta_text,
[cfg.max_id_rk, 1, cid, call_user, -1,
str(time_now)[:-7], str(expire_date)[:-7], 1])
cfg.max_id_rk += 1
else:
print('! ОШИБКА, НЕТ ЮЗЕРОВ В БАЗЕ ДЛЯ CHAT_ID = ' + str(cid) + ' !')
# выводим дату для лога и выполняем системные сбросы и таймеры
if str(time_now.time().hour) == '0':
print('New day!', time_now)
# проверяем метаданные и выставляем таймеры
check_metadata(bot)
# если произошла ошибка с выставлением штрафа,
# нужно проверить метаданные ещё раз
if cfg.meta_error_flg == 1:
cfg.meta_error_flg = 0
check_metadata(bot)
# обнуляем время голосования в боте
utils.upd_din_time()
|
[
"rat.taurus@gmail.com"
] |
rat.taurus@gmail.com
|
30133e53023e74bc86d8fb0e6b49f2b89d41c862
|
c116852255fab7952961dcf5f86cd8a2d5a59fea
|
/Mundo3/Desafio090.py
|
d5cffe4b9b93bf024134daa122bf1ccbbe62d267
|
[
"MIT"
] |
permissive
|
Marcoakira/Desafios_Python_do_Curso_Guanabara
|
cd4490dfcc739a3ea3fc6bfde605d301123b7bd8
|
c49b774148a2232f8f3c21b83e3dc97610480757
|
refs/heads/main
| 2023-04-27T11:42:13.252040
| 2021-05-17T02:25:59
| 2021-05-17T02:25:59
| 367,167,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 497
|
py
|
# Desafio090 o programa mostra o nome e media do aluno em uma lista com dicionario. ele retorna com os dados e se o mesmo foi ou nao aprovado
#aluno = {'nome':'joaquim', 'media': 4.5}
aluno = {}
aluno['nome'] = str(input('Nome do aluno(a)'))
aluno['media'] = float(input('media do aluno(a)'))
print(aluno)
print(f'Nome: {aluno["nome"]}')
print(f'A média foi de {aluno["media"]}')
if aluno['media'] > 7:
print(f'{aluno["nome"]}, passou de ano!')
else:
print(f'{aluno["nome"]}, Reprovou!')
|
[
"tetissu2@gmail.com"
] |
tetissu2@gmail.com
|
46657570c006e0c476ef96b201e147f66569f7e4
|
488987fa46d8ab760a68f368784fcf6dca4e065c
|
/Website/warehouse/migrations/0001_initial.py
|
2b58d528618269e9cada284090b2c5e4557d4548
|
[] |
no_license
|
ScrumdogMillionaire/SkyAccessories
|
cf03e9f8727dac5df96077e42e28ea3dfa30955d
|
e96bc45a234935b0e92e12d8c533f4136a804232
|
refs/heads/master
| 2021-01-19T21:25:39.380876
| 2015-07-25T10:16:13
| 2015-07-25T10:16:13
| 39,084,178
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 503
|
py
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Warehouse',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
],
options={
'db_table': 'warehouse',
},
),
]
|
[
"megan@theparkes.me.uk"
] |
megan@theparkes.me.uk
|
e40a6d49051f873f3a67643eb5506a6a5b9886b7
|
7e0a8226c17afbfa5005b9b9867d60c28f87274e
|
/TestRobotFunctions.py
|
a10978c4f5fb9b143b0ae3f9b0d11fc66efdf81c
|
[] |
no_license
|
VicZamRol/RobotSimulator
|
816978c7ae24ffc0242143dab341ecda38045055
|
4e186cd47e9c47aaa95d0e7b034c33a5ac34b7b5
|
refs/heads/master
| 2020-03-29T18:35:46.911956
| 2018-09-26T04:21:27
| 2018-09-26T04:21:27
| 150,222,268
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 6,251
|
py
|
# TestRobotFunctions.py
# import statements
import unittest
import ParserFunctions
import RobotFunctions
import Game
class TestSystemFunctions(unittest.TestCase):
# Test Parser Functions
def test_isValidCommand_forMOVE(self):
result = ParserFunctions.isValidCommand("MOVE")
self.assertEqual("valid command", result)
def test_isValidCommand_forLEFT(self):
result = ParserFunctions.isValidCommand("LEFT")
self.assertEqual("valid command", result)
def test_isValidCommand_forRIGHT(self):
result = ParserFunctions.isValidCommand("RIGHT")
self.assertEqual("valid command", result)
def test_isValidCommand_forREPORT(self):
result = ParserFunctions.isValidCommand("REPORT")
self.assertEqual("valid command", result)
def test_isValidCommand_forPLACE(self):
result = ParserFunctions.isValidCommand("PLACE 0,1,NORTH")
self.assertEqual("valid command", result)
def test_isValidCommand_forNoValidCommand(self):
result = ParserFunctions.isValidCommand("HELLO")
self.assertEqual("invalid command", result)
def test_isValidCommand_forNoValidPLACEOrientation(self):
result = ParserFunctions.isValidCommand("PLACE 0,1,NORT")
self.assertEqual("invalid command", result)
def test_isValidCommand_forNoValidPLACEPosition(self):
result = ParserFunctions.isValidCommand("PLACE 4,5,NORTH")
self.assertEqual("invalid command", result)
# Test Robot Functions
def test_Robot_PlaceRobotInBoard(self):
new_robot = RobotFunctions.Robot(0, 1, 'NORTH')
self.assertEqual(0, new_robot.getX())
self.assertEqual(1, new_robot.getY())
self.assertEqual('NORTH', new_robot.getFacing())
def test_Rotate_fromNorthToRight(self):
robot = RobotFunctions.Robot(0, 1, 'NORTH')
robot.right() # Right rotation
result = robot.getFacing()
self.assertEqual('EAST', result)
def test_Rotate_fromSouthToRight(self):
robot = RobotFunctions.Robot(0, 1, 'SOUTH')
robot.right() # Right rotation
result = robot.getFacing()
self.assertEqual('WEST', result)
def test_Rotate_fromEastToRight(self):
robot = RobotFunctions.Robot(0, 1, 'EAST')
robot.right() # Right rotation
result = robot.getFacing()
self.assertEqual('SOUTH', result)
def test_Rotate_fromWestToRight(self):
robot = RobotFunctions.Robot(0, 1, 'WEST')
robot.right() # Right rotation
result = robot.getFacing()
self.assertEqual('NORTH',result)
def test_Rotate_fromNorthToLeft(self):
robot = RobotFunctions.Robot(0, 1, 'NORTH')
robot.left() # Left rotation
result = robot.getFacing()
self.assertEqual('WEST', result)
def test_Rotate_fromSouthToLeft(self):
robot = RobotFunctions.Robot(0, 1, 'SOUTH')
robot.left() # Left rotation
result = robot.getFacing()
self.assertEqual('EAST', result)
def test_Rotate_fromEastToLeft(self):
robot = RobotFunctions.Robot(0, 1, 'EAST')
robot.left() # Left rotation
result = robot.getFacing()
self.assertEqual('NORTH', result)
def test_Rotate_fromWestToLeft(self):
robot = RobotFunctions.Robot(0, 1, 'WEST')
robot.left() # Left rotation
result = robot.getFacing()
self.assertEqual('SOUTH', result)
def test_Move_facingNorth(self):
robot = RobotFunctions.Robot(0, 1, 'NORTH')
robot.move() # Move robot
self.assertEqual(0, robot.getX())
self.assertEqual(2, robot.getY())
self.assertEqual('NORTH',robot.getFacing())
def test_Move_facingSouth(self):
robot = RobotFunctions.Robot(0, 1, 'SOUTH')
robot.move() # Move robot
self.assertEqual(0, robot.getX())
self.assertEqual(0, robot.getY())
self.assertEqual('SOUTH', robot.getFacing())
def test_Move_facingEast(self):
robot = RobotFunctions.Robot(0, 1, 'EAST')
robot.move() # Move robot
self.assertEqual(1, robot.getX())
self.assertEqual(1, robot.getY())
self.assertEqual('EAST', robot.getFacing())
def test_Move_facingWest(self):
robot = RobotFunctions.Robot(1, 1, 'WEST')
robot.move() # Move robot
self.assertEqual(0, robot.getX())
self.assertEqual(1, robot.getY())
self.assertEqual('WEST', robot.getFacing())
def test_Move_forNorthBoundariesfacingNorth(self):
robot = RobotFunctions.Robot(1, 4, 'NORTH')
robot.move() # Move robot
self.assertEqual(1, robot.getX())
self.assertEqual(4, robot.getY())
self.assertEqual('NORTH', robot.getFacing())
def test_Move_forSouthBoundariesfacingSouth(self):
robot = RobotFunctions.Robot(1, 0, 'SOUTH')
robot.move() # Move robot
self.assertEqual(1, robot.getX())
self.assertEqual(0, robot.getY())
self.assertEqual('SOUTH', robot.getFacing())
def test_Move_forEastBoundariesfacingEast(self):
robot = RobotFunctions.Robot(4, 1, 'EAST')
robot.move() # Move robot
self.assertEqual(4, robot.getX())
self.assertEqual(1, robot.getY())
self.assertEqual('EAST', robot.getFacing())
def test_Move_forWestBoundariesfacingWest(self):
robot = RobotFunctions.Robot(0, 1, 'WEST')
robot.move() # Move robot
self.assertEqual(0, robot.getX())
self.assertEqual(1, robot.getY())
self.assertEqual('WEST', robot.getFacing())
def test_Report(self):
robot = RobotFunctions.Robot(0, 1, 'WEST')
result = robot.report()
self.assertEqual('0,1,WEST', result)
# Test Game Functions
def test_Game_forValidSequence_1(self):
sequenceCommands = ['PLACE 0,0,NORTH', 'MOVE', 'REPORT']
result = Game.run_game(sequenceCommands)
self.assertEqual('0,1,NORTH', result)
def test_Game_forValidSequence_2(self):
sequenceCommands = ['PLACE 0,0,NORTH', 'LEFT', 'REPORT']
result = Game.run_game(sequenceCommands)
self.assertEqual('0,0,WEST', result)
def test_Game_forValidSequence_3(self):
sequenceCommands = ['PLACE 1,2,EAST', 'MOVE', 'MOVE', 'LEFT', 'MOVE', 'REPORT']
result = Game.run_game(sequenceCommands)
self.assertEqual('3,3,NORTH', result)
def test_Game_forInvalidSequence_1(self):
sequenceCommands = ['PLACE 9,2,EAST', 'MOVE', 'MOVE', 'LEFT', 'PLACE 1,2,EAST', 'MOVE', 'MOVE', 'LEFT', 'MOVE', 'REPORT']
result = Game.run_game(sequenceCommands)
self.assertEqual('3,3,NORTH', result)
def test_Game_forInvalidSequence_2(self):
sequenceCommands = ['MOVE', 'MOVE', 'LEFT', 'PLACE 1,2,EAST', 'MOVE', 'PLACE 9,2,EAST', 'MOVE', 'LEFT', 'MOVE', 'REPORT']
result = Game.run_game(sequenceCommands)
self.assertEqual('3,3,NORTH', result)
# Run the tests
if __name__ == '__main__':
unittest.main()
|
[
"victor.zamoraroldan@gmail.com"
] |
victor.zamoraroldan@gmail.com
|
c941edde2a0e098c955ef45b30a2a83a0c7c272a
|
2422ee49450d11f318a501ed22a77ca1efa586c9
|
/HELLOPYTHON/day03/pyoop01.py
|
6df71c234ac23e7e1dae68ef239312396ad62ed3
|
[] |
no_license
|
Jinny-s/ddit_python_backUp
|
aefc371afbc4f8d7bdff90682b3fe6bdd93a8c1b
|
3fb62e69574b98f8ee935ffff9f37e324a17f771
|
refs/heads/master
| 2023-05-11T21:48:28.412306
| 2021-05-28T00:13:12
| 2021-05-28T00:13:12
| 369,527,325
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 466
|
py
|
class Animal:
def __init__(self):
self.fullness = 0
def eat(self):
self.fullness += 1
def manddang(self):
self.fullness = 10
class Human(Animal):
def __init__(self):
super().__init__()
self.flag_cook = False
def goHakwon(self):
self.flag_cook = True
hum = Human()
print(hum.fullness, hum.flag_cook)
hum.manddang()
hum.goHakwon()
print(hum.fullness, hum.flag_cook)
|
[
"46083003+Jinny-s@users.noreply.github.com"
] |
46083003+Jinny-s@users.noreply.github.com
|
1e9f546fc3daa952a696e913dd48272b89249664
|
7f44bbd04f6ba09610527ee7ffee7b2ed3f66534
|
/algorithms/greedy/travelling_salesman_problem.py
|
b54ad516b8f52161f083b077aea87431b3fdc80d
|
[] |
no_license
|
corolyy/Algorithm
|
dd4bc5838e68e0e0648534ee85ec92c2b19b1e03
|
fca2619d69bb3c18310dd32cd6ba6a7aaf2bf6f3
|
refs/heads/master
| 2021-07-25T02:34:18.406822
| 2017-11-05T15:36:34
| 2017-11-05T15:36:34
| 106,845,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,986
|
py
|
# -*- coding: utf-8 -*-
from random import randint
import sys
'''旅行商问题: 最优方案需O(N!)
求N个城市之间的最短路线,不定起点
'''
MARLIN, BERKELEY, SAN_FRANCISCO, FREMONT, PALO_ALTO = ('Marlin', 'Berkeley',
'SanFrancisco',
'Fremont', 'PaloAlto')
Marlin = {BERKELEY: 17, SAN_FRANCISCO: 10, FREMONT: 32, PALO_ALTO: 36}
Berkeley = {MARLIN: 17, SAN_FRANCISCO: 14, FREMONT: 31, PALO_ALTO: 48}
SanFrancisco = {MARLIN: 10, BERKELEY: 14, FREMONT: 30, PALO_ALTO: 31}
Fremont = {MARLIN: 32, SAN_FRANCISCO: 30, BERKELEY: 32, PALO_ALTO: 16}
PaloAlto = {MARLIN: 36, SAN_FRANCISCO: 31, FREMONT: 16, BERKELEY: 48}
city_dict = {MARLIN: Marlin, BERKELEY: Berkeley,
FREMONT: Fremont, PALO_ALTO: PaloAlto,
SAN_FRANCISCO: SanFrancisco}
# 1. 随机选择一个城市作为起点
# 2. 选择还没到过的最近的城市
# 3. 循环第二步
def select_nearest(city_map, city_unreached):
nearest_city, nearest_distance = None, sys.maxint
for city, distance in city_map.items():
if city in city_unreached and distance < nearest_distance:
nearest_city, nearest_distance = city, distance
return nearest_city, nearest_distance
city_list = [key for key in city_dict.keys()]
# - 随机选择城市
curr_city = city_list[randint(0, len(city_list) - 1)]
travel_order = [curr_city]
travel_distance = 0
city_unreached = {key for key in city_dict.keys()} - {curr_city}
# - 选择还没到过的城市,直到全部去过
while city_unreached:
curr_city, distance = select_nearest(city_dict.get(curr_city),
city_unreached)
city_unreached -= {curr_city}
travel_order.append(curr_city)
travel_distance += distance
print travel_order, travel_distance
print ('TravelOrder: {0}. \nTravelDistance: {1}'
.format(' --> '.join(travel_order), travel_distance))
|
[
"coroyu@163.com"
] |
coroyu@163.com
|
047e3a2e376468ced519fa3d14b40881c125243e
|
00cfb6b10afed712da7789c6e58f601a04778c6e
|
/model/__init__.py
|
f7d3eddfd0fb7111d53cf9ac8ee6433898a8c048
|
[
"MIT"
] |
permissive
|
TotallyFine/DataScienceBowl18
|
4bf5c7db99ed615e3558262d74c32af913a47deb
|
cd683d55e4275f13beff121c83be3bc7d19ff566
|
refs/heads/master
| 2021-05-03T06:37:42.901963
| 2018-03-14T14:34:01
| 2018-03-14T14:34:01
| 120,599,829
| 5
| 0
| null | 2018-02-14T08:24:22
| 2018-02-07T10:24:00
|
Python
|
UTF-8
|
Python
| false
| false
| 38
|
py
|
# coding:utf-8
from .UNet import UNet
|
[
"jipuzhaoklp@outlook.com"
] |
jipuzhaoklp@outlook.com
|
7b0eb062bdb82ba3e31330f3c10272afeea5b48a
|
3f78fea343abcab2f0283afe31771d25a7df6229
|
/NaiveBayes.py
|
ab19ae8c0d39c8206ae199499a43000bb740bd78
|
[] |
no_license
|
VishalJadhav90/MLAITryouts
|
1c2a84278efe2aded947d383777ee00d7ddeb6ae
|
24a1824454889dacca9b33c95b11966bb0032366
|
refs/heads/master
| 2020-07-21T16:07:17.279620
| 2019-10-20T04:38:45
| 2019-10-20T04:38:45
| 206,917,261
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 326
|
py
|
import numpy as np
x = np.array([[-1, -1], [-2, -1], [-3, 0], [1, 2], [1, 1], [2, 2]])
y = np.array([-1, -1, -1, 1, 1, 1])
from sklearn.naive_bayes import GaussianNB
cls = GaussianNB()
cls.fit(x, y)
predictions = cls.predict([[-0.2, -1]])
from sklearn.metrics import accuracy_score
print(accuracy_score(predictions, [-1]))
|
[
"jadhav.vsh@gmail.com"
] |
jadhav.vsh@gmail.com
|
36427bc68422838a83e33aaa143b65e001468997
|
7947e4512a324026f83f7242ddb02a62d1d51f39
|
/readparquet.py
|
b635a0fa27ee8085734eae0e71065be7da47d611
|
[] |
no_license
|
NuTufts/ubparquet
|
0ed65b144d456fa5c8dc06b7bd78c2dda4c191e5
|
7b8f925ceb32f92b215aa6e6ff8cf8000642501a
|
refs/heads/main
| 2023-09-05T22:33:09.962946
| 2021-11-22T21:31:30
| 2021-11-22T21:31:30
| 413,850,058
| 1
| 1
| null | 2021-11-18T14:50:31
| 2021-10-05T14:23:02
|
Python
|
UTF-8
|
Python
| false
| false
| 1,349
|
py
|
import os,sys
import numpy as np
import pyarrow as pa
import pyarrow.parquet as pq
class UBParquetReader:
def __init__(self,filename):
self.table = pq.read_table(filename)
print("columns: ",self.table.column_names)
print("nrows: ",self.table.num_rows)
self.nentries = self.table.num_rows
def get_entry(self,ientry):
if ientry<0 or ientry>=self.nentries:
print("Entry out of range. Table contains %d entries."%(self.nentries))
return {}
#print("ENTRY: ",ientry)
entry_data = {}
for k in self.table.column_names:
if "_shape" in k:
continue
#print("unpack: ",k)
shape_name = k+"_shape"
if shape_name in self.table.column_names:
s = self.table[shape_name][ientry].as_py()
shape = np.array( s, dtype=np.int )
d = self.table[k][ientry].as_py()
arr = np.array( d ).reshape( shape )
entry_data[k] = arr
else:
entry_data[k] = self.table[k][ientry]
return entry_data
if __name__ == "__main__":
reader = UBParquetReader( "temp.parquet" )
entry_data = reader.get_entry(0)
print(entry_data['matchtriplet'][:10,:])
print(entry_data['spacepoint_t'][:10,:])
|
[
"taritree.wongjirad@gmail.com"
] |
taritree.wongjirad@gmail.com
|
403c6e6e44b99774b3178c68715699270e452db1
|
da19363deecd93a73246aaea877ee6607daa6897
|
/xlsxwriter/test/comparison/test_chart_scatter03.py
|
b5f7f25997bbd1dbb9a40b7b9b9bdf7a9af21cad
|
[] |
no_license
|
UNPSJB/FarmaciaCrisol
|
119d2d22417c503d906409a47b9d5abfca1fc119
|
b2b1223c067a8f8f19019237cbf0e36a27a118a6
|
refs/heads/master
| 2021-01-15T22:29:11.943996
| 2016-02-05T14:30:28
| 2016-02-05T14:30:28
| 22,967,417
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,735
|
py
|
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""
Test file created by XlsxWriter against a file created by Excel.
"""
def setUp(self):
self.maxDiff = None
filename = 'chart_scatter03.xlsx'
test_dir = 'xlsxwriter/test/comparison/'
self.got_filename = test_dir + '_test_' + filename
self.exp_filename = test_dir + 'xlsx_files/' + filename
self.ignore_files = []
self.ignore_elements = {}
def test_create_file(self):
"""Test the creation of a simple XlsxWriter file."""
workbook = Workbook(self.got_filename)
worksheet = workbook.add_worksheet()
chart = workbook.add_chart({'type': 'scatter', 'subtype': 'straight'})
chart.axis_ids = [54010624, 45705856]
data = [
[1, 2, 3, 4, 5],
[2, 4, 6, 8, 10],
[3, 6, 9, 12, 15],
]
worksheet.write_column('A1', data[0])
worksheet.write_column('B1', data[1])
worksheet.write_column('C1', data[2])
chart.add_series({'categories': '=Sheet1!$A$1:$A$5',
'values': '=Sheet1!$B$1:$B$5'})
chart.add_series({'categories': '=Sheet1!$A$1:$A$5',
'values': '=Sheet1!$C$1:$C$5',
})
worksheet.insert_chart('E9', chart)
workbook.close()
self.assertExcelEqual()
|
[
"lealuque.tw@gmail.com"
] |
lealuque.tw@gmail.com
|
7f66969edaa3a47ede87d591fc160eb7f5b05f4f
|
0bfdc5d241cb15959e1b12ba9886e330e2bd27b0
|
/test.py
|
895e80085c46b0e1fccc36388f429f561b0f30be
|
[] |
no_license
|
xianpeijie/AlphaZero_Gomoku_PyTorch
|
a0ad79d4f77a921e2f152980653ce0c152883e8d
|
bd5c5c106a74cf8b3de62d8b0101845f57e72933
|
refs/heads/master
| 2023-06-05T10:05:06.352498
| 2021-06-25T12:16:41
| 2021-06-25T12:16:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 535
|
py
|
#! /user/bin/env python
# -*- coding: utf-8 -*-
"""
@author: gingkg
@contact: sby2015666@163.com
@software: PyCharm
@project: AlphaZero_Gomoku_PaddlePaddle
@file: test.py
@date: 2021/3/4
@desc: 测试用文件
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
conv1 = nn.Conv2d(4,16,3,1,1)
fc1 = nn.Linear(16*10*10, 2)
a = torch.rand(2,4,10,10)
print(a)
x = conv1(a)
print(x)
print(x.shape)
x = x.view(x.shape[0], -1)
y = fc1(x)
print(y)
print(F.softmax(y, dim=0))
print(torch.exp(F.log_softmax(y, dim=0)))
|
[
"sby2015666@163.com"
] |
sby2015666@163.com
|
ce8d5f2a493812c5c08129eedd350876554db2e6
|
ff9a907da4f6a7504e6b199d67a2ba5b333d11ed
|
/setup.py
|
5c980a76221af3fd193a3dc884679ee89dd1ca8c
|
[
"Apache-2.0"
] |
permissive
|
LJStroemsdoerfer/boxify
|
61175f637da03421e8e0369aa1aa82bbd95bda2c
|
e721b740ec9dfe29b99004215e86b51a6988f919
|
refs/heads/main
| 2023-03-14T23:19:08.544141
| 2021-03-08T20:53:03
| 2021-03-08T20:53:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 633
|
py
|
# load libs
from setuptools import setup
import boxify
# read in README.md
with open("description.md", "r") as fh:
long_description = fh.read()
# catch the version
current_version = boxify.__version__
# define the setup
setup(name='boxify',
version=current_version,
description='Containerization for Python APIs',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/till-io/boxify',
author='Lukas Jan Stroemsdoerfer',
author_email='ljstroemsdoerfer@gmail.com',
license='MIT',
packages=['boxify'],
zip_safe=False)
|
[
"ljstroemsdoerfer@gmail.com"
] |
ljstroemsdoerfer@gmail.com
|
454c41f67acd3d912bb5d5053791e65b4da74332
|
217d76069856b3e187003636745ede20b27146f2
|
/Unidad 4/Pilas.py
|
777874b7dac951b4df6a17d0e2077a6ab7fd4e2e
|
[] |
no_license
|
ArielAyala/python-conceptos-basicos-y-avanzados
|
05b5b537c61a8f5e339f18d3b86e4fdaabb88a2e
|
5d7540bb700e7f9107d4829c2b5733d14ce46b70
|
refs/heads/master
| 2020-12-01T09:02:52.079041
| 2020-01-12T23:45:46
| 2020-01-12T23:45:46
| 230,597,485
| 1
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 249
|
py
|
pila = [3, 4, 5]
pila.append(6)
pila.append(7)
print("Toda la pila :", pila)
print("Quitando el último dato", pila.pop())
ultimoValor = pila.pop()
print("El último valor de la pila es : ", ultimoValor)
print("La pila sin el ultimo valor ", pila)
|
[
"arielayalamail@gmail.com"
] |
arielayalamail@gmail.com
|
06917bdd90b1a9961c35903a13520d96cbecf7aa
|
1346721a8e737f611aae46a237410955ab21b89b
|
/source/assign4_stepanovic/assign4_stepanovicApp/migrations/0004_auto_20171029_1418.py
|
b4c374e7121b384326ffb0ac04009eae887bb371
|
[] |
no_license
|
it-teaching-abo-akademi/web-services-2017-project-part3-sstepano
|
37e3531827f43c7d1e0c03c62689c3621d1a4a97
|
b5b23c9dddbb5ffb59d47cd3c9cf417f9690d3f5
|
refs/heads/master
| 2021-07-22T10:51:18.361364
| 2017-10-31T19:42:17
| 2017-10-31T19:42:17
| 108,551,623
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 466
|
py
|
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-29 12:18
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('assign4_stepanovicApp', '0003_profile'),
]
operations = [
migrations.RemoveField(
model_name='profile',
name='user',
),
migrations.DeleteModel(
name='Profile',
),
]
|
[
"srboljub.stepanovic@abo.fi"
] |
srboljub.stepanovic@abo.fi
|
1dd1795cdb320e2b1a62ab64528ba8efc74aa4b8
|
ea6b36a1886a3edbe3d922daafdc805e65bd6f45
|
/Lib/Timer.py
|
65eb85cf5e009f90812c5793dd270f27570f9357
|
[] |
no_license
|
zorchenhimer/Meili-Display
|
b1200aa06f0062ff504e7c3637713e9276192638
|
95c6471831d66949ff0e854bcc59648d87db2a1a
|
refs/heads/master
| 2016-09-06T12:59:36.896312
| 2014-12-27T10:17:14
| 2014-12-27T10:17:14
| 30,287,672
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 3,331
|
py
|
#!/usr/bin/python
import time
from Logger import Debug, Info, Warn
class TimerEvent():
def __init__(self, id, interval=5):
self.ID = id
self.LastUpdate = 0
self.UpdateInterval = interval
Info("New TimerEvent() with id '" + str(self.ID) + "'")
def time_to_update(self):
if time.time() - self.LastUpdate > self.UpdateInterval:
Debug("It's time to update '" + str(self.ID) + "'")
return True
return False
def update(self):
Debug("Updated '" + str(self.ID) + "'")
self.LastUpdate = time.time()
class UpdateChecks():
class _timers():
def __init__(self):
self.TimerDict = {}
self.StateDict = {}
Debug('UpdateChecks() singleton init\'d')
def AddTimer(self, id, interval=None):
if interval is None:
self.TimerDict[id] = TimerEvent(id)
Debug("Adding timer '" + str(id) + "' with default interval")
else:
self.TimerDict[id] = TimerEvent(id, interval)
Debug("Adding timer '" + str(id) + "' with interval " + str(interval))
def AddState(self, id, initial=None):
if initial is None:
self.StateDict[id] = False
Debug("Adding state '" + str(id) + "' with default value of False")
else:
self.StateDict[id] = initial
Debug("Adding stat '" + str(id) + "' with value " + str(initial))
def TimeToUpdate(self, id):
if id in self.TimerDict.keys():
return self.TimerDict[id].time_to_update()
else:
raise KeyError("TimeEvent with ID '" + str(id) + "' does not exist")
def Update(self, id):
if id in self.TimerDict.keys():
self.TimerDict[id].update()
else:
raise KeyError("TimeEvent with ID '" + str(id) + "' does not exist")
def SetUpdateInterval(self, id, interval):
if id in self.TimerDict.keys():
self.TimerDict[id].UpdateInterval = interval
Debug("Updating update interval of TimerEvent '" + str(id) + "' to " + str(interval))
else:
raise KeyError("TimeEvent with ID '" + str(id) + "' does not exist")
def GetState(self, id):
if id in self.StateDict.keys():
return self.StateDict[id]
else:
raise KeyError("State with ID '" + str(id) + "' does not exist")
def SetTrue(self, id):
if id in self.StateDict.keys():
self.StateDict[id] = True
Debug("Setting state with ID '" + str(id) + "' to True")
else:
raise KeyError("State with ID '" + str(id) + "' does not exist")
def SetFalse(self, id):
if id in self.StateDict.keys():
self.StateDict[id] = False
Debug("Setting state with ID '" + str(id) + "' to False")
else:
raise KeyError("State with ID '" + str(id) + "' does not exist")
def _dump_timers(self):
print "== Dumping registered TimerEvent() objects =="
for t in self.TimerDict.keys():
print '[' + t + '] ' + str(self.TimerDict[t].ID) + '; LastUpdate: ' + str(self.TimerDict[t].LastUpdate) + '; UpdateInterval: ' + str(self.TimerDict[t].UpdateInterval)
print "== End =="
__instance = None
def __init__(self):
if UpdateChecks.__instance == None:
UpdateChecks.__instance = UpdateChecks._timers()
self.__dict__['_Singleton_instance'] = UpdateChecks.__instance
def __getattr__(self, attr):
return getattr(self.__instance, attr)
def __setattr__(self, attr, value):
if attr is "ScreenSize" or attr is "Bounds":
raise NotImplementedError
return setattr(self.__instance, attr, value)
|
[
"zorchenhimer@gmail.com"
] |
zorchenhimer@gmail.com
|
63bd22ad08dd606c44b591bfbac74191e5796400
|
e7c19b31f3328755d5e309d45f0003665511361d
|
/SearchTrees2/UpdatingSearchTreePlayer.py
|
a0957167e14544706cf2564baeccf823c379164c
|
[] |
no_license
|
janhon3n/MarkovMaze
|
1f5d0e183c3309045a7868e2324ac6512961aa10
|
8640949ae304a29b2621f27dd61c4a932890a0ef
|
refs/heads/master
| 2021-09-07T08:31:13.487943
| 2018-01-09T08:09:44
| 2018-01-09T08:09:44
| 107,707,826
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 2,525
|
py
|
from SearchTreePlayer import *
class UpdatingSearchTreePlayer(SearchTreePlayer):
maxIterations = 100
moveCost = 0.0
discounting = 0.9
leafNodes = []
def initialize(self):
return
def move(self):
move = self.findPathWithMaxReward(self.maxIterations)
self.stage.executePlayerMove(self, move)
def findPathWithMaxReward(self, maxIterations):
self.activeNodes = []
self.deadNodes = []
self.moveToGoalState = []
startTime = time.time()
self.activeNodes.append(TreeNode(self.stage.state.copy(), None, None, 0, None, 1))
iteration = 1
while iteration < maxIterations:
nodeToExpand = self.popANodeToExpand()
if self.gameWindow is not None: # if there is a gamewindow, draw the state of the node to be expanded
if nodeToExpand.move is not None:
self.rotation = nodeToExpand.move
self.gameWindow.drawStateWithMarkers(nodeToExpand.state, nodeToExpand.markers)
newNodes = self.expandNode(nodeToExpand, self)
self.deadNodes.append(nodeToExpand)
if self.checkGoalCondition(nodeToExpand, newNodes):
return self.getRootMoveFromNode(nodeToExpand)
self.checkIfAnyNodesAlreadyInTree(nodeToExpand, newNodes)
self.activeNodes.extend(newNodes)
print("Current node depth: "+str(nodeToExpand.treeLayer) +", Reward: "+("{0:.2f}".format(nodeToExpand.cumulatedReward))+", Dead nodes: "+str(len(self.deadNodes))+", Active nodes: "+str(len(self.activeNodes))+", Elapsed time: " + ("{0:.2f}".format(time.time() - startTime)))
iteration += 1
return self.getRootMoveFromNode(self.findBestActiveNode())
def handleDublicateNode(self, oldNode, newNode, allNewNodes):
return
def getRootMoveFromNode(self, node):
path = self.getPathFromRoot(node)
if len(path) == 0:
return 'Stay'
else:
return self.getPathFromRoot(node).pop()
def findBestActiveNode(self):
bestValue = -1000
bestNode = None
for node in self.activeNodes:
if node.cumulatedReward > bestValue:
bestNode = node
bestValue = node.cumulatedReward
return bestNode
def checkGoalCondition(self, nodeToExpand, newNodes):
if len(nodeToExpand.state.coinPositions) == 0:
return True
return False
|
[
"janhon3n@gmail.com"
] |
janhon3n@gmail.com
|
12917b835a1c4b41df8b0df293d7f0501c45be0c
|
e9d6a3ff13386cd32113f063cf38d18da81b2d10
|
/clients/services.py
|
61b4f3d7b2c5719ca5eb3e1c90ae51e96623b0f4
|
[] |
no_license
|
dimekai/Client-Systems
|
fbf9aadb5829257b8f49632e1732e484b10bb77b
|
00b2e41fff5caead6e3ce7aa9aea74105190e7f4
|
refs/heads/main
| 2023-06-19T02:27:20.747813
| 2021-07-16T03:02:08
| 2021-07-16T03:02:08
| 386,482,208
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 1,503
|
py
|
import csv
import os
from clients.models import Client
class ClientService:
def __init__(self, table_name:str):
self.table_name = table_name
def create_client(self, client):
with open(self.table_name, mode='a') as f:
writer = csv.DictWriter(f, fieldnames=Client.schema())
writer.writerow(client.to_dict())
def list_clients(self):
with open(self.table_name, mode='r') as f:
reader = csv.DictReader(f, fieldnames=Client.schema())
return list(reader)
def update_client(self, updated_client):
clients = self.list_clients()
updated_clients = []
for client in clients:
if client['uid'] == updated_client.uid:
updated_clients.append(updated_client.to_dict())
else:
updated_clients.append(client)
self._save_to_disk(updated_clients)
def delete_client(self, deleted_client):
clients = self.list_clients()
clients.remove(deleted_client[0])
self._save_to_disk(clients)
def _save_to_disk(self, updated_clients:list):
tmp_table = f'{self.table_name}.tmp'
with open(tmp_table, mode='w') as f:
writer = csv.DictWriter(f, fieldnames=Client.schema())
writer.writerows(updated_clients)
# Remove old table
os.remove(self.table_name)
# Update data
os.rename(tmp_table, self.table_name)
|
[
"jesus_kdm@hotmail.com"
] |
jesus_kdm@hotmail.com
|
d254493b3f1aad7dea444048ac4156a0d2f8ae1c
|
ee6fc02e8392ff780a4f0d1a5789776e4d0b6a29
|
/code/practice/abc/abc050/a.py
|
84c536ac978d890ee0358817b30a0ea7e3036ba0
|
[] |
no_license
|
mollinaca/ac
|
e99bb5d5c07159b3ef98cd7067424fa2751c0256
|
2f40dd4333c2b39573b75b45b06ad52cf36d75c3
|
refs/heads/master
| 2020-12-22T11:02:13.269855
| 2020-09-18T01:02:29
| 2020-09-18T01:02:29
| 236,757,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 67
|
py
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
print(eval(input()))
|
[
"github@mail.watarinohibi.tokyo"
] |
github@mail.watarinohibi.tokyo
|
85fef72280fba4b1885f2ebbc9ed6dcf012afa4f
|
1c5145b08987b46c11c6303f54c7b5e85e2091a8
|
/answers-python/206-ReverseLinkedList.py
|
4802908878f3bf97bba8b17810da70593ff1472b
|
[] |
no_license
|
prefrontal/leetcode
|
bd44f5bd9829536504a0da12e101c6a483fb6897
|
27c2ea1b5fb6f60cd434c4fb52f87b4132d23025
|
refs/heads/master
| 2022-12-25T21:03:28.674338
| 2020-09-09T04:30:23
| 2020-09-09T04:30:23
| 284,881,441
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 687
|
py
|
# LeetCode 206 - Reverse Linked List
#
# Reverse a singly linked list.
import time
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
def reverseList(head: ListNode) -> ListNode:
if not head or not head.next:
return head
next_node = None
while head:
temp_node = head.next
head.next = next_node
next_node = head
head = temp_node
return next_node
# Testing
# Given 1->2->3->4, you should return the list as 4->3->2->1.
d = ListNode(4, None)
c = ListNode(3, d)
b = ListNode(2, c)
a = ListNode(1, b)
rev = reverseList(a)
while rev:
print(rev.val)
rev = rev.next
|
[
"prefrontal@gmail.com"
] |
prefrontal@gmail.com
|
8cbcd9c2cc9d54eef562fcec466ec9620e0acd80
|
5491342888577af7fd9c51b404f6bad60794955b
|
/migrations/versions/f1dacd342deb_.py
|
9ab9290658393cb1a8a60900e47ba4d3be70281f
|
[] |
no_license
|
hanaryadn/python-project-krs
|
028dc40071eb85b2666d5b7440b7dfc181d6efa2
|
402567787208f09f0bd0fb4402073f492ef25f42
|
refs/heads/master
| 2020-03-23T07:30:52.454376
| 2018-07-17T10:54:32
| 2018-07-17T10:54:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 820
|
py
|
"""empty message
Revision ID: f1dacd342deb
Revises: c28bfec6b5e0
Create Date: 2018-07-15 12:10:27.998827
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'f1dacd342deb'
down_revision = 'c28bfec6b5e0'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('username', sa.String(length=20), nullable=False))
op.drop_column('user', 'user')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('user', mysql.VARCHAR(length=20), nullable=False))
op.drop_column('user', 'username')
# ### end Alembic commands ###
|
[
"hanaryhanz17@gmail.com"
] |
hanaryhanz17@gmail.com
|
cd49636ca58174bc30efdf2af8bb38bead9ced7c
|
0a727f3ffde045805b9b789abbaa9c8497667f8e
|
/SimpleCalc.py
|
8b0c58d59b4eea6a5c6bb5a9128d18445c849add
|
[
"MIT"
] |
permissive
|
esitarski/CrossMgr
|
ff4a632089a144f6ecc57970e2b29a7c31a15118
|
a95ac1d65f2d0cab712cc6e5f9393668c1bbf83c
|
refs/heads/master
| 2023-08-30T22:48:43.457978
| 2023-08-24T14:12:44
| 2023-08-24T14:12:44
| 1,042,402
| 33
| 20
|
MIT
| 2023-04-30T13:32:11
| 2010-11-01T17:25:15
|
Python
|
UTF-8
|
Python
| false
| false
| 5,359
|
py
|
import re
import math
tokNum = 'n'
tokError = 'e'
tokEnd = '$'
reTime = re.compile(
'(?:[0-9]+:[0-5][0-9]:[0-5][0-9])|(?:[0-5]?[0-9]:[0-5][0-9])(?:\.[0-9]+)?' )
# ------[HHH]H:MM:SS-------------- ------[M]M:SS--------- ---[.ddddddd]---
reNum = re.compile(
'[0-9]*\.?[0-9]+' )
# [ddd][.]d[ddd]
reWhitespace = re.compile( '[ \r\t]+' )
singleCharTokens = set( c for c in '+-*/()' )
class TimeEvalError( Exception ):
def __init__( self, error, line, col, i ):
self.error = error
self.line = line
self.col = col
self.i = i
def __repr__( self ):
return '{} in {}:{} {}'.format(self.error, self.line, self.col, self.i)
class TimeEvalEmptyExpressionError( TimeEvalError ):
def __init__( self ):
super().__init__( 'empty expression', 0, 0, 0 )
class TimeEvalSyntaxError( TimeEvalError ):
def __init__( self, error, line, col, i ):
super().__init__( error, line, col, i )
class TimeEvalDivideByZeroError( TimeEvalError ):
def __init__( self, line, col, i ):
super().__init__( 'divide by zero error', line, col, i )
class TimeEval:
def __init__( self, str = None ):
self.clear()
def clear( self ):
self.parser = None
self.tok, self.value, self.line, self.col, self.i = None, None, 0, 0, 0
def parse( self, str ):
line, col = 0, 0
i, iMax = 0, len(str)
while i < iMax:
# Skip whitespace.
m = reWhitespace.match( str, i )
if m:
col += len(m.group(0))
i += len(m.group(0))
continue
# Match time format.
m = reTime.match( str, i )
if m:
x = 0.0
for f in m.group(0).split(':'):
x = x * 60.0 + float(f)
yield tokNum, x, line, col, i
col += len(m.group(0))
i += len(m.group(0))
continue
# Match pure numbers.
m = reNum.match( str, i )
if m:
yield tokNum, float(m.group(0)), line, col, i
col += len(m.group(0))
i += len(m.group(0))
continue
c = str[i]
# Process single char tokens.
if c in singleCharTokens:
yield c, None, line, col, i
col += 1
i += 1
continue
# Skip newlines, but adjust the line and col counters.
if c == '\n':
line += 1
col = 1
i += 1
continue
raise TimeEvalSyntaxError( 'invalid char', line, col, i )
yield tokEnd, None, line, col, i
def skip( self ):
self.tok, self.value, self.line, self.col, self.iStr = next(self.parser)
def expr( self ):
x = self.factor()
while self.tok in '+-':
op = self.tok
self.skip()
right = self.factor()
if op == '+':
x += right
else:
x -= right
return x
def factor( self ):
x = self.term()
while self.tok in '*/':
op = self.tok
self.skip()
lineSave, colSave, iStrSave = self.line, self.col, self.iStr
right = self.factor()
if op == '*':
x *= right
else:
if right == 0.0:
raise TimeEvalDivideByZeroError( lineSave, colSave, iStrSave )
x /= right
return x
def term( self ):
if self.tok == '-':
sgn = -1
self.skip()
else:
sgn = 1
if self.tok == tokNum:
x = self.value
self.skip()
elif self.tok == '(':
self.skip()
x = self.expr()
if self.tok == ')':
self.skip()
else:
raise TimeEvalSyntaxError( 'missing ")"' , self.line, self.col, self.iStr )
else:
if self.tok == tokEnd:
raise TimeEvalSyntaxError( 'incomplete expression', self.line, self.col, self.iStr )
else:
raise TimeEvalSyntaxError( 'invalid token', self.line, self.col, self.iStr )
return sgn * x
def eval( self, str ):
self.clear()
self.parser = self.parse( str )
self.skip()
if self.tok == tokEnd:
raise TimeEvalEmptyExpressionError()
x = self.expr()
if self.tok != tokEnd:
raise TimeEvalSyntaxError( 'unrecognised input', self.line, self.col, self.iStr )
return x
def __call__( self, str ):
return eval( str )
def formatTime( secs, highPrecision = False ):
if secs is None:
secs = 0
if secs < 0:
sign = '-'
secs = -secs
else:
sign = ''
f, ss = math.modf(secs)
secs = int(ss)
hours = int(secs // (60*60))
minutes = int( (secs // 60) % 60 )
secs = (secs % 60) + f
if highPrecision:
secStr = '{:05.2f}'.format( secs )
else:
secStr = '{:02.0f}'.format( secs )
if secStr.startswith('60'):
secStr = '00' + secStr[2:]
minutes += 1
if minutes == 60:
minutes = 0
hours += 1
if hours > 0:
return "{}{}:{:02d}:{}".format(sign, hours, minutes, secStr)
else:
return "{}{:02d}:{}".format(sign, minutes, secStr)
def testEval( ss ):
re = TimeEval()
try:
x = formatTime( re.eval(ss) )
print( ss, '=', x )
except TimeEvalEmptyExpressionError:
print( 'empty expression' )
except (TimeEvalSyntaxError, TimeEvalDivideByZeroError) as e:
print( ss )
print( ' ' * e.i + '^' )
print( ' ' * e.i + '|' )
print( ' ' * e.i + '+---' + e.error )
print( '--------------------------------------------------------------------' )
if __name__ == '__main__':
testEval( '' )
testEval( '3.1415926 * 3.1415926' )
testEval( '-1:00:00' )
testEval( '30:00 - -30:00' )
testEval( '1:00:00 / 12' )
testEval( '1:00:00 * 2.5' )
testEval( '1:75:00 * 2.5' )
testEval( '1:00:00 * (1+3)' )
testEval( '1:00:00 + 10 20' )
testEval( '1:00:00 *' )
testEval( '23542345234523452345.456345634563456' )
testEval( '1:00:00 / (30-20-10)' )
testEval( '1:00:00 / (30-20-10' )
testEval( '1:00:00 + bla / (30-20-10)' )
testEval( '1:0:0 / 2' )
|
[
"edward.sitarski@gmail.com"
] |
edward.sitarski@gmail.com
|
05fb5e179b99b0e6ed94e9506ce162953f5df8bf
|
f6e4417a6e756a57abeacf9857b621c603b7ce2f
|
/lib/format.py
|
9b4d200dd17174f74fdc44db653fa53738f1176a
|
[
"MIT"
] |
permissive
|
pretech86/phonia
|
43b7114d2bbfa2fca1f9909f1d88afae7bdd3247
|
521e3fd110f60a220e5d47c46ed84facd394ddd3
|
refs/heads/master
| 2020-11-26T06:16:51.950520
| 2019-12-18T21:23:02
| 2019-12-18T21:23:02
| 228,988,569
| 1
| 0
|
MIT
| 2019-12-19T06:20:01
| 2019-12-19T06:20:00
| null |
UTF-8
|
Python
| false
| false
| 409
|
py
|
#!/usr/bin/env python3
import re
def formatNumber(InputNumber):
return re.sub("(?:\+)?(?:[^[0-9]*)", "", InputNumber)
def replaceVariables(string, number):
string = string.replace('$n', number['default'])
string = string.replace('$i', number['international'])
string = string.replace('$l', number['international'].replace(
'%s ' % (number['countryCode']), ''))
return string
|
[
"noreply@github.com"
] |
pretech86.noreply@github.com
|
c270a4bf8312a3e97a2d29b77adb4f7f4e1be3e4
|
d9dee018534159b40ce43db47e3987e6ac6e1d4b
|
/tests/integration/test_payment_method.py
|
775e6dddccc054496bcf7bc3ad4a3a67ed67f1ad
|
[
"MIT"
] |
permissive
|
willardj093/braintree_python
|
65fc70e029a0f04da024f7a67322a9051c5485c8
|
1363cda4fec56b3e53681dc37eeb34586eb5d50f
|
refs/heads/master
| 2023-07-10T13:37:25.075950
| 2021-08-19T19:33:37
| 2021-08-19T19:33:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 67,856
|
py
|
import time
from datetime import datetime
from tests.test_helper import *
from braintree.test.credit_card_numbers import CreditCardNumbers
from braintree.test.nonces import Nonces
class TestPaymentMethod(unittest.TestCase):
def test_create_with_three_d_secure_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.ThreeDSecureVisaFullAuthentication,
"options": {
"verify_card": "true",
}
})
self.assertTrue(result.is_success)
three_d_secure_info = result.payment_method.verification.three_d_secure_info
self.assertEqual("Y", three_d_secure_info.enrolled)
self.assertEqual("authenticate_successful", three_d_secure_info.status)
self.assertEqual(True, three_d_secure_info.liability_shifted)
self.assertEqual(True, three_d_secure_info.liability_shift_possible)
self.assertEqual("cavv_value", three_d_secure_info.cavv)
self.assertEqual("xid_value", three_d_secure_info.xid)
self.assertEqual(None, three_d_secure_info.ds_transaction_id)
self.assertEqual("05", three_d_secure_info.eci_flag)
self.assertEqual("1.0.2", three_d_secure_info.three_d_secure_version)
def test_create_with_three_d_secure_pass_thru(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.Transactable,
"three_d_secure_pass_thru": {
"three_d_secure_version": "1.1.0",
"eci_flag": "05",
"cavv": "some-cavv",
"xid": "some-xid"
},
"options": {
"verify_card": "true",
}
})
self.assertTrue(result.is_success)
def test_create_with_three_d_secure_pass_thru_without_eci_flag(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.Transactable,
"three_d_secure_pass_thru": {
"three_d_secure_version": "1.1.0",
"cavv": "some-cavv",
"xid": "some-xid"
},
"options": {
"verify_card": "true",
}
})
self.assertFalse(result.is_success)
self.assertEqual("EciFlag is required.", result.message)
def test_create_with_paypal_future_payments_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.PayPalFuturePayment
})
self.assertTrue(result.is_success)
created_account = result.payment_method
self.assertEqual(PayPalAccount, created_account.__class__)
self.assertEqual("jane.doe@example.com", created_account.email)
self.assertNotEqual(created_account.image_url, None)
found_account = PaymentMethod.find(result.payment_method.token)
self.assertNotEqual(None, found_account)
self.assertEqual(created_account.token, found_account.token)
self.assertEqual(created_account.customer_id, found_account.customer_id)
def test_create_with_paypal_order_payment_nonce_and_paypal_options(self):
customer_id = Customer.create().customer.id
http = ClientApiHttp.create()
status_code, payment_method_nonce = http.get_paypal_nonce({
"intent": "order",
"payment-token": "fake-paypal-payment-token",
"payer-id": "fake-paypal-payer-id"
})
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": payment_method_nonce,
"options": {
"paypal": {
"payee_email": "payee@example.com",
"order_id": "merchant-order-id",
"custom_field": "custom merchant field",
"description": "merchant description",
"amount": "1.23",
"shipping": {
"first_name": "Andrew",
"last_name": "Mason",
"company": "Braintree",
"street_address": "456 W Main St",
"extended_address": "Apt 2F",
"locality": "Bartlett",
"region": "IL",
"postal_code": "60103",
"country_name": "Mexico",
"country_code_alpha2": "MX",
"country_code_alpha3": "MEX",
"country_code_numeric": "484"
},
},
},
})
self.assertTrue(result.is_success)
created_account = result.payment_method
self.assertEqual(PayPalAccount, created_account.__class__)
self.assertEqual("bt_buyer_us@paypal.com", created_account.email)
self.assertNotEqual(created_account.image_url, None)
self.assertNotEqual(created_account.payer_id, None)
found_account = PaymentMethod.find(result.payment_method.token)
self.assertNotEqual(None, found_account)
self.assertEqual(created_account.token, found_account.token)
self.assertEqual(created_account.customer_id, found_account.customer_id)
self.assertEqual(created_account.payer_id, found_account.payer_id)
def test_create_with_paypal_refresh_token(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"paypal_refresh_token": "PAYPAL_REFRESH_TOKEN",
})
self.assertTrue(result.is_success)
created_account = result.payment_method
self.assertEqual(PayPalAccount, created_account.__class__)
self.assertEqual("B_FAKE_ID", created_account.billing_agreement_id)
self.assertNotEqual(created_account.payer_id, None)
found_account = PaymentMethod.find(result.payment_method.token)
self.assertNotEqual(None, found_account)
self.assertEqual(created_account.token, found_account.token)
self.assertEqual(created_account.customer_id, found_account.customer_id)
self.assertEqual(created_account.billing_agreement_id, found_account.billing_agreement_id)
self.assertEqual(created_account.payer_id, found_account.payer_id)
def test_create_returns_validation_failures(self):
http = ClientApiHttp.create()
status_code, nonce = http.get_paypal_nonce({
"options": {"validate": False}
})
self.assertEqual(202, status_code)
result = PaymentMethod.create({
"payment_method_nonce": nonce
})
self.assertFalse(result.is_success)
paypal_error_codes = [
error.code for error in result.errors.for_object("paypal_account").on("base")
]
self.assertTrue(ErrorCodes.PayPalAccount.ConsentCodeOrAccessTokenIsRequired in paypal_error_codes)
customer_error_codes = [
error.code for error in result.errors.for_object("paypal_account").on("customer_id")
]
self.assertTrue(ErrorCodes.PayPalAccount.CustomerIdIsRequiredForVaulting in customer_error_codes)
def test_create_and_make_default(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"customer_id": customer_id,
"number": "4111111111111111",
"expiration_date": "05/2014",
})
self.assertTrue(credit_card_result.is_success)
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.PayPalFuturePayment,
"options": {"make_default": True},
})
self.assertTrue(result.is_success)
self.assertTrue(result.payment_method.default)
def test_create_and_set_token(self):
customer_id = Customer.create().customer.id
token = str(random.randint(1, 1000000))
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.PayPalFuturePayment,
"token": token
})
self.assertTrue(result.is_success)
self.assertEqual(token, result.payment_method.token)
def test_create_with_paypal_one_time_nonce_fails(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.PayPalOneTimePayment
})
self.assertFalse(result.is_success)
base_errors = result.errors.for_object("paypal_account").on("base")
self.assertEqual(1, len(base_errors))
self.assertEqual(ErrorCodes.PayPalAccount.CannotVaultOneTimeUsePayPalAccount, base_errors[0].code)
def test_create_with_credit_card_nonce(self):
http = ClientApiHttp.create()
status_code, nonce = http.get_credit_card_nonce({
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2020",
"options": {"validate": False}
})
self.assertEqual(202, status_code)
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": nonce
})
self.assertTrue(result.is_success)
created_credit_card = result.payment_method
self.assertEqual(CreditCard, created_credit_card.__class__)
self.assertEqual("411111", created_credit_card.bin)
found_credit_card = PaymentMethod.find(result.payment_method.token)
self.assertNotEqual(None, found_credit_card)
self.assertEqual(found_credit_card.token, created_credit_card.token)
self.assertEqual(found_credit_card.customer_id, created_credit_card.customer_id)
def test_create_with_fake_apple_pay_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.ApplePayMasterCard
})
self.assertTrue(result.is_success)
apple_pay_card = result.payment_method
self.assertIsInstance(apple_pay_card, ApplePayCard)
self.assertNotEqual(apple_pay_card.bin, None)
self.assertNotEqual(apple_pay_card.token, None)
self.assertNotEqual(apple_pay_card.prepaid, None)
self.assertNotEqual(apple_pay_card.healthcare, None)
self.assertNotEqual(apple_pay_card.debit, None)
self.assertNotEqual(apple_pay_card.durbin_regulated, None)
self.assertNotEqual(apple_pay_card.commercial, None)
self.assertNotEqual(apple_pay_card.payroll, None)
self.assertNotEqual(apple_pay_card.issuing_bank, None)
self.assertNotEqual(apple_pay_card.country_of_issuance, None)
self.assertNotEqual(apple_pay_card.product_id, None)
self.assertNotEqual(apple_pay_card.last_4, None)
self.assertNotEqual(apple_pay_card.card_type, None)
self.assertEqual(apple_pay_card.customer_id, customer_id)
self.assertEqual(ApplePayCard.CardType.MasterCard, apple_pay_card.card_type)
self.assertEqual("MasterCard 0017", apple_pay_card.payment_instrument_name)
self.assertEqual("MasterCard 0017", apple_pay_card.source_description)
self.assertTrue(apple_pay_card.default)
self.assertIn("apple_pay", apple_pay_card.image_url)
self.assertTrue(int(apple_pay_card.expiration_month) > 0)
self.assertTrue(int(apple_pay_card.expiration_year) > 0)
def test_create_with_fake_android_pay_proxy_card_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.AndroidPayCardDiscover
})
self.assertTrue(result.is_success)
android_pay_card = result.payment_method
self.assertIsInstance(android_pay_card, AndroidPayCard)
self.assertNotEqual(android_pay_card.token, None)
self.assertEqual(customer_id, android_pay_card.customer_id)
self.assertEqual(CreditCard.CardType.Discover, android_pay_card.virtual_card_type)
self.assertEqual("1117", android_pay_card.virtual_card_last_4)
self.assertEqual("Discover 1111", android_pay_card.source_description)
self.assertEqual(CreditCard.CardType.Discover, android_pay_card.source_card_type)
self.assertEqual("1111", android_pay_card.source_card_last_4)
self.assertEqual("1117", android_pay_card.last_4)
self.assertEqual(CreditCard.CardType.Discover, android_pay_card.card_type)
self.assertTrue(android_pay_card.default)
self.assertIn("android_pay", android_pay_card.image_url)
self.assertTrue(int(android_pay_card.expiration_month) > 0)
self.assertTrue(int(android_pay_card.expiration_year) > 0)
self.assertIsInstance(android_pay_card.created_at, datetime)
self.assertIsInstance(android_pay_card.updated_at, datetime)
self.assertEqual("601111", android_pay_card.bin)
self.assertEqual("google_transaction_id", android_pay_card.google_transaction_id)
self.assertFalse(android_pay_card.is_network_tokenized)
def test_create_with_fake_android_pay_network_token_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.AndroidPayCardMasterCard
})
self.assertTrue(result.is_success)
android_pay_card = result.payment_method
self.assertIsInstance(android_pay_card, AndroidPayCard)
self.assertNotEqual(android_pay_card.token, None)
self.assertEqual(customer_id, android_pay_card.customer_id)
self.assertEqual(CreditCard.CardType.MasterCard, android_pay_card.virtual_card_type)
self.assertEqual("4444", android_pay_card.virtual_card_last_4)
self.assertEqual("MasterCard 4444", android_pay_card.source_description)
self.assertEqual(CreditCard.CardType.MasterCard, android_pay_card.source_card_type)
self.assertEqual("4444", android_pay_card.source_card_last_4)
self.assertEqual("4444", android_pay_card.last_4)
self.assertEqual(CreditCard.CardType.MasterCard, android_pay_card.card_type)
self.assertTrue(android_pay_card.default)
self.assertIn("android_pay", android_pay_card.image_url)
self.assertTrue(int(android_pay_card.expiration_month) > 0)
self.assertTrue(int(android_pay_card.expiration_year) > 0)
self.assertIsInstance(android_pay_card.created_at, datetime)
self.assertIsInstance(android_pay_card.updated_at, datetime)
self.assertEqual("555555", android_pay_card.bin)
self.assertEqual("google_transaction_id", android_pay_card.google_transaction_id)
self.assertTrue(android_pay_card.is_network_tokenized)
self.assertNotEqual(android_pay_card.bin, None)
self.assertNotEqual(android_pay_card.token, None)
self.assertNotEqual(android_pay_card.prepaid, None)
self.assertNotEqual(android_pay_card.healthcare, None)
self.assertNotEqual(android_pay_card.debit, None)
self.assertNotEqual(android_pay_card.durbin_regulated, None)
self.assertNotEqual(android_pay_card.commercial, None)
self.assertNotEqual(android_pay_card.payroll, None)
self.assertNotEqual(android_pay_card.issuing_bank, None)
self.assertNotEqual(android_pay_card.country_of_issuance, None)
self.assertNotEqual(android_pay_card.product_id, None)
self.assertNotEqual(android_pay_card.last_4, None)
self.assertNotEqual(android_pay_card.card_type, None)
def test_create_with_fake_amex_express_checkout_card_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.AmexExpressCheckoutCard
})
self.assertTrue(result.is_success)
amex_express_checkout_card = result.payment_method
self.assertIsInstance(amex_express_checkout_card, AmexExpressCheckoutCard)
self.assertNotEqual(amex_express_checkout_card.token, None)
self.assertTrue(amex_express_checkout_card.default)
self.assertEqual("American Express", amex_express_checkout_card.card_type)
self.assertRegexpMatches(amex_express_checkout_card.bin, r"\A\d{6}\Z")
self.assertRegexpMatches(amex_express_checkout_card.expiration_month, r"\A\d{2}\Z")
self.assertRegexpMatches(amex_express_checkout_card.expiration_year, r"\A\d{4}\Z")
self.assertRegexpMatches(amex_express_checkout_card.card_member_number, r"\A\d{4}\Z")
self.assertRegexpMatches(amex_express_checkout_card.card_member_expiry_date, r"\A\d{2}/\d{2}\Z")
self.assertRegexpMatches(amex_express_checkout_card.source_description, r"\AAmEx \d{4}\Z")
self.assertRegexpMatches(amex_express_checkout_card.image_url, r"\.png")
self.assertEqual(customer_id, amex_express_checkout_card.customer_id)
def test_create_with_venmo_account_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.VenmoAccount,
})
self.assertTrue(result.is_success)
venmo_account = result.payment_method
self.assertIsInstance(venmo_account, VenmoAccount)
self.assertTrue(venmo_account.default)
self.assertIsNotNone(venmo_account.token)
self.assertEqual("venmojoe", venmo_account.username)
self.assertEqual("Venmo-Joe-1", venmo_account.venmo_user_id)
self.assertEqual("Venmo Account: venmojoe", venmo_account.source_description)
self.assertRegexpMatches(venmo_account.image_url, r"\.png")
self.assertEqual(customer_id, venmo_account.customer_id)
def test_create_with_abstract_payment_method_nonce(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.AbstractTransactable
})
self.assertTrue(result.is_success)
payment_method = result.payment_method
self.assertNotEqual(None, payment_method)
self.assertNotEqual(None, payment_method.token)
self.assertEqual(customer_id, payment_method.customer_id)
def test_create_with_custom_card_verification_amount(self):
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token())
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {
"authorization_fingerprint": authorization_fingerprint,
"shared_customer_identifier": "fake_identifier",
"shared_customer_identifier_type": "testing"
})
status_code, nonce = http.get_credit_card_nonce({
"number": "4000111111111115",
"expirationMonth": "11",
"expirationYear": "2099"
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": nonce,
"options": {
"verify_card": "true",
"verification_amount": "1.02"
}
})
self.assertFalse(result.is_success)
verification = result.credit_card_verification
self.assertEqual(CreditCardVerification.Status.ProcessorDeclined, verification.status)
def test_create_respects_verify_card_and_verification_merchant_account_id_when_outside_nonce(self):
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token())
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {
"authorization_fingerprint": authorization_fingerprint,
"shared_customer_identifier": "fake_identifier",
"shared_customer_identifier_type": "testing"
})
status_code, nonce = http.get_credit_card_nonce({
"number": "4000111111111115",
"expirationMonth": "11",
"expirationYear": "2099"
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"options": {
"verify_card": "true",
"verification_merchant_account_id": TestHelper.non_default_merchant_account_id
}
})
self.assertFalse(result.is_success)
self.assertTrue(result.credit_card_verification.status == Transaction.Status.ProcessorDeclined)
self.assertTrue(result.credit_card_verification.processor_response_code == "2000")
self.assertTrue(result.credit_card_verification.processor_response_text == "Do Not Honor")
self.assertTrue(result.credit_card_verification.merchant_account_id == TestHelper.non_default_merchant_account_id)
def test_create_includes_risk_data_when_skip_advanced_fraud_checking_is_false(self):
with FraudProtectionEnterpriseIntegrationMerchant():
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token())
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {
"authorization_fingerprint": authorization_fingerprint,
"shared_customer_identifier": "fake_identifier",
"shared_customer_identifier_type": "testing",
})
status_code, nonce = http.get_credit_card_nonce({
"number": "4111111111111111",
"expirationMonth": "11",
"expirationYear": "2099",
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": nonce,
"options": {
"verify_card": True,
"skip_advanced_fraud_checking": False
},
})
self.assertTrue(result.is_success)
verification = result.payment_method.verification
self.assertIsInstance(verification.risk_data, RiskData)
def test_create_does_not_include_risk_data_when_skip_advanced_fraud_checking_is_true(self):
with FraudProtectionEnterpriseIntegrationMerchant():
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token())
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {
"authorization_fingerprint": authorization_fingerprint,
"shared_customer_identifier": "fake_identifier",
"shared_customer_identifier_type": "testing",
})
status_code, nonce = http.get_credit_card_nonce({
"number": "4111111111111111",
"expirationMonth": "11",
"expirationYear": "2099",
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": nonce,
"options": {
"verify_card": True,
"skip_advanced_fraud_checking": True
},
})
self.assertTrue(result.is_success)
verification = result.payment_method.verification
self.assertIsNone(verification.risk_data)
def test_create_respects_fail_one_duplicate_payment_method_when_included_outside_of_the_nonce(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
self.assertTrue(credit_card_result.is_success)
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token())
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {
"authorization_fingerprint": authorization_fingerprint,
"shared_customer_identifier": "fake_identifier",
"shared_customer_identifier_type": "testing"
})
status_code, nonce = http.get_credit_card_nonce({
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"options": {
"fail_on_duplicate_payment_method": "true"
}
})
self.assertFalse(result.is_success)
self.assertTrue(result.errors.deep_errors[0].code == "81724")
def test_create_allows_passing_billing_address_id_outside_the_nonce(self):
customer_id = Customer.create().customer.id
http = ClientApiHttp.create()
status_code, nonce = http.get_credit_card_nonce({
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2020",
"options": {"validate": "false"}
})
self.assertTrue(status_code == 202)
address_result = Address.create({
"customer_id": customer_id,
"first_name": "Bobby",
"last_name": "Tables"
})
self.assertTrue(address_result.is_success)
payment_method_result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"billing_address_id": address_result.address.id
})
self.assertTrue(payment_method_result.is_success)
self.assertTrue(isinstance(payment_method_result.payment_method, CreditCard))
token = payment_method_result.payment_method.token
found_credit_card = CreditCard.find(token)
self.assertFalse(found_credit_card is None)
self.assertTrue(found_credit_card.billing_address.first_name == "Bobby")
self.assertTrue(found_credit_card.billing_address.last_name == "Tables")
def test_create_allows_passing_billing_address_outside_the_nonce(self):
customer_id = Customer.create().customer.id
http = ClientApiHttp.create()
status_code, nonce = http.get_credit_card_nonce({
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2020",
"options": {"validate": "false"}
})
self.assertTrue(status_code == 202)
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"billing_address": {
"street_address": "123 Abc Way"
}
})
self.assertTrue(result.is_success)
self.assertTrue(isinstance(result.payment_method, CreditCard))
token = result.payment_method.token
found_credit_card = CreditCard.find(token)
self.assertFalse(found_credit_card is None)
self.assertTrue(found_credit_card.billing_address.street_address == "123 Abc Way")
def test_create_overrides_the_billing_address_in_the_nonce(self):
customer_id = Customer.create().customer.id
http = ClientApiHttp.create()
status_code, nonce = http.get_credit_card_nonce({
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2020",
"options": {"validate": "false"},
"billing_address": {
"street_address": "456 Xyz Way"
}
})
self.assertTrue(status_code == 202)
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"billing_address": {
"street_address": "123 Abc Way"
}
})
self.assertTrue(result.is_success)
self.assertTrue(isinstance(result.payment_method, CreditCard))
token = result.payment_method.token
found_credit_card = CreditCard.find(token)
self.assertFalse(found_credit_card is None)
self.assertTrue(found_credit_card.billing_address.street_address == "123 Abc Way")
def test_create_does_not_override_the_billing_address_for_a_valuted_credit_card(self):
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token({"customer_id": customer_id}))
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {"authorization_fingerprint": authorization_fingerprint})
status_code, nonce = http.get_credit_card_nonce({
"number": "4111111111111111",
"expirationMonth": "12",
"expirationYear": "2020",
"billing_address": {
"street_address": "456 Xyz Way"
}
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"billing_address": {
"street_address": "123 Abc Way"
}
})
self.assertTrue(result.is_success)
self.assertTrue(isinstance(result.payment_method, CreditCard))
token = result.payment_method.token
found_credit_card = CreditCard.find(token)
self.assertFalse(found_credit_card is None)
self.assertTrue(found_credit_card.billing_address.street_address == "456 Xyz Way")
def test_create_does_not_return_an_error_if_credit_card_options_are_present_for_paypal_nonce(self):
customer_id = Customer.create().customer.id
original_token = "paypal-account-" + str(int(time.time()))
nonce = TestHelper.nonce_for_paypal_account({
"consent_code": "consent-code",
"token": original_token
})
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"options": {
"verify_card": "true",
"fail_on_duplicate_payment_method": "true",
"verification_merchant_account_id": "not_a_real_merchant_account_id"
}
})
self.assertTrue(result.is_success)
def test_create_for_paypal_ignores_passed_billing_address_id(self):
nonce = TestHelper.nonce_for_paypal_account({
"consent_code": "consent-code"
})
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"billing_address_id": "address_id"
})
self.assertTrue(result.is_success)
self.assertTrue(isinstance(result.payment_method, PayPalAccount))
self.assertFalse(result.payment_method.image_url is None)
token = result.payment_method.token
found_paypal_account = PayPalAccount.find(token)
self.assertFalse(found_paypal_account is None)
def test_create_for_paypal_ignores_passed_billing_address_params(self):
nonce = TestHelper.nonce_for_paypal_account({
"consent_code": "PAYPAL_CONSENT_CODE"
})
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id,
"billing_address": {
"street_address": "123 Abc Way"
}
})
self.assertTrue(result.is_success)
self.assertTrue(isinstance(result.payment_method, PayPalAccount))
self.assertFalse(result.payment_method.image_url is None)
token = result.payment_method.token
found_paypal_account = PayPalAccount.find(token)
self.assertFalse(found_paypal_account is None)
def test_create_payment_method_with_account_type_debit(self):
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token())
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {
"authorization_fingerprint": authorization_fingerprint,
"shared_customer_identifier": "fake_identifier",
"shared_customer_identifier_type": "testing",
})
status_code, nonce = http.get_credit_card_nonce({
"number": CreditCardNumbers.Hiper,
"expirationMonth": "11",
"expirationYear": "2099",
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": nonce,
"options": {
"verify_card": "true",
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_amount": "1.02",
"verification_account_type": "debit",
},
})
self.assertTrue(result.is_success)
self.assertEqual("debit", result.payment_method.verifications[0]["credit_card"]["account_type"])
def test_create_payment_method_with_account_type_credit(self):
config = Configuration.instantiate()
customer_id = Customer.create().customer.id
client_token = json.loads(TestHelper.generate_decoded_client_token())
authorization_fingerprint = client_token["authorizationFingerprint"]
http = ClientApiHttp(config, {
"authorization_fingerprint": authorization_fingerprint,
"shared_customer_identifier": "fake_identifier",
"shared_customer_identifier_type": "testing",
})
status_code, nonce = http.get_credit_card_nonce({
"number": CreditCardNumbers.Hiper,
"expirationMonth": "11",
"expirationYear": "2099",
})
self.assertTrue(status_code == 201)
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": nonce,
"options": {
"verify_card": "true",
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_amount": "1.02",
"verification_account_type": "credit",
},
})
self.assertTrue(result.is_success)
self.assertEqual("credit", result.payment_method.verifications[0]["credit_card"]["account_type"])
def test_create_credit_card_with_account_type_debit(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Hiper,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
"options": {
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_account_type": "debit",
"verify_card": True,
}
})
self.assertTrue(result.is_success)
self.assertEqual("debit", result.credit_card.verifications[0]["credit_card"]["account_type"])
def test_create_credit_card_with_account_type_credit(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Hiper,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
"options": {
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_account_type": "credit",
"verify_card": True,
}
})
self.assertTrue(result.is_success)
self.assertEqual("credit", result.credit_card.verifications[0]["credit_card"]["account_type"])
def test_create_with_usupported_merchant_account(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
"options": {
"verification_account_type": "debit",
"verify_card": True,
}
})
self.assertFalse(result.is_success)
errors = result.errors.for_object("credit_card").for_object("options").on("verification_account_type")
self.assertEqual(1, len(errors))
self.assertEqual(ErrorCodes.CreditCard.VerificationAccountTypeNotSupported, errors[0].code)
def test_create_with_invalid_account_type(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Hiper,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
"options": {
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_account_type": "invalid",
"verify_card": True,
}
})
self.assertFalse(result.is_success)
errors = result.errors.for_object("credit_card").for_object("options").on("verification_account_type")
self.assertEqual(1, len(errors))
self.assertEqual(ErrorCodes.CreditCard.VerificationAccountTypeIsInvald, errors[0].code)
def test_find_returns_an_abstract_payment_method(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.AbstractTransactable
})
self.assertTrue(result.is_success)
found_payment_method = PaymentMethod.find(result.payment_method.token)
self.assertNotEqual(None, found_payment_method)
self.assertEqual(found_payment_method.token, result.payment_method.token)
def test_find_returns_a_paypal_account(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.PayPalFuturePayment
})
self.assertTrue(result.is_success)
found_account = PaymentMethod.find(result.payment_method.token)
self.assertNotEqual(None, found_account)
self.assertEqual(PayPalAccount, found_account.__class__)
self.assertEqual("jane.doe@example.com", found_account.email)
def test_find_returns_a_credit_card(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": "4111111111111111",
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe"
})
self.assertTrue(result.is_success)
found_credit_card = PaymentMethod.find(result.credit_card.token)
self.assertNotEqual(None, found_credit_card)
self.assertEqual(CreditCard, found_credit_card.__class__)
self.assertEqual("411111", found_credit_card.bin)
def test_find_returns_an_android_pay_card(self):
customer = Customer.create().customer
result = PaymentMethod.create({
"customer_id": customer.id,
"payment_method_nonce": Nonces.AndroidPayCard
})
self.assertTrue(result.is_success)
android_pay_card = result.payment_method
found_android_pay_card = PaymentMethod.find(android_pay_card.token)
self.assertNotEqual(None, found_android_pay_card)
self.assertEqual(AndroidPayCard, found_android_pay_card.__class__)
self.assertEqual(found_android_pay_card.token, android_pay_card.token)
def test_delete_deletes_a_credit_card(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": "4111111111111111",
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe"
})
self.assertTrue(result.is_success)
delete_result = PaymentMethod.delete(result.credit_card.token)
self.assertTrue(delete_result.is_success)
self.assertRaises(NotFoundError, PaymentMethod.find, result.credit_card.token)
def test_delete_deletes_a_paypal_account(self):
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": Nonces.PayPalFuturePayment
})
self.assertTrue(result.is_success)
delete_result = PaymentMethod.delete(result.payment_method.token, {"revoke_all_grants": False})
self.assertTrue(delete_result.is_success)
self.assertRaises(NotFoundError, PaymentMethod.find, result.payment_method.token)
def test_update_credit_cards_updates_the_credit_card(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Original Holder",
"customer_id": customer_id,
"cvv": "123",
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.MasterCard,
"expiration_date": "06/2013"
})
self.assertTrue(update_result.is_success)
self.assertTrue(update_result.payment_method.token == credit_card_result.credit_card.token)
updated_credit_card = update_result.payment_method
self.assertTrue(updated_credit_card.bin == CreditCardNumbers.MasterCard[:6])
self.assertTrue(updated_credit_card.last_4 == CreditCardNumbers.MasterCard[-4:])
self.assertTrue(updated_credit_card.expiration_date == "06/2013")
def test_update_with_three_d_secure_pass_thru(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Original Holder",
"customer_id": customer_id,
"cvv": "123",
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.MasterCard,
"expiration_date": "06/2013",
"three_d_secure_pass_thru": {
"three_d_secure_version": "1.1.0",
"eci_flag": "05",
"cavv": "some-cavv",
"xid": "some-xid"
},
"options": {
"verify_card": "true",
}
})
self.assertTrue(update_result.is_success)
def test_create_with_three_d_secure_pass_thru_without_eci_flag(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Original Holder",
"customer_id": customer_id,
"cvv": "123",
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.MasterCard,
"expiration_date": "06/2013",
"three_d_secure_pass_thru": {
"three_d_secure_version": "1.1.0",
"cavv": "some-cavv",
"xid": "some-xid"
},
"options": {
"verify_card": "true",
}
})
self.assertFalse(update_result.is_success)
self.assertEqual("EciFlag is required.", update_result.message)
def test_update_credit_cards_with_account_type_credit(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
})
update_result = PaymentMethod.update(result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.Hiper,
"expiration_date": "06/2013",
"options": {
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_account_type": "credit",
"verify_card": True,
}
})
self.assertTrue(update_result.is_success)
self.assertEqual("credit", update_result.payment_method.verification.credit_card["account_type"])
def test_update_credit_cards_with_account_type_debit(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
})
update_result = PaymentMethod.update(result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.Hiper,
"expiration_date": "06/2013",
"options": {
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_account_type": "debit",
"verify_card": True,
}
})
self.assertTrue(update_result.is_success)
self.assertEqual("debit", update_result.payment_method.verification.credit_card["account_type"])
def test_update_credit_cards_with_invalid_account_type(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
})
update_result = PaymentMethod.update(result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.Hiper,
"expiration_date": "06/2013",
"options": {
"verification_merchant_account_id": TestHelper.hiper_brl_merchant_account_id,
"verification_account_type": "invalid",
"verify_card": True,
}
})
self.assertFalse(update_result.is_success)
errors = update_result.errors.for_object("credit_card").for_object("options").on("verification_account_type")
self.assertEqual(1, len(errors))
self.assertEqual(ErrorCodes.CreditCard.VerificationAccountTypeIsInvald, errors[0].code)
def test_update_credit_cards_with_unsupported_merchant_account(self):
customer = Customer.create().customer
result = CreditCard.create({
"customer_id": customer.id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009",
"cvv": "100",
"cardholder_name": "John Doe",
})
update_result = PaymentMethod.update(result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.Visa,
"expiration_date": "06/2013",
"options": {
"verification_account_type": "debit",
"verify_card": True,
}
})
self.assertFalse(update_result.is_success)
errors = update_result.errors.for_object("credit_card").for_object("options").on("verification_account_type")
self.assertEqual(1, len(errors))
self.assertEqual(ErrorCodes.CreditCard.VerificationAccountTypeNotSupported, errors[0].code)
def test_update_creates_a_new_billing_address_by_default(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012",
"billing_address": {
"street_address": "123 Nigeria Ave"
}
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"billing_address": {
"region": "IL"
}
})
self.assertTrue(update_result.is_success)
updated_credit_card = update_result.payment_method
self.assertTrue(updated_credit_card.billing_address.region == "IL")
self.assertTrue(updated_credit_card.billing_address.street_address is None)
self.assertFalse(updated_credit_card.billing_address.id == credit_card_result.credit_card.billing_address.id)
def test_update_updates_the_billing_address_if_option_is_specified(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012",
"billing_address": {
"street_address": "123 Nigeria Ave"
}
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"billing_address": {
"region": "IL",
"options": {
"update_existing": "true"
}
}
})
self.assertTrue(update_result.is_success)
updated_credit_card = update_result.payment_method
self.assertTrue(updated_credit_card.billing_address.region == "IL")
self.assertTrue(updated_credit_card.billing_address.street_address == "123 Nigeria Ave")
self.assertTrue(updated_credit_card.billing_address.id == credit_card_result.credit_card.billing_address.id)
def test_update_updates_the_country_via_codes(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012",
"billing_address": {
"street_address": "123 Nigeria Ave"
}
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"billing_address": {
"country_name": "American Samoa",
"country_code_alpha2": "AS",
"country_code_alpha3": "ASM",
"country_code_numeric": "016",
"options": {
"update_existing": "true"
}
}
})
self.assertTrue(update_result.is_success)
updated_credit_card = update_result.payment_method
self.assertTrue(updated_credit_card.billing_address.country_name == "American Samoa")
self.assertTrue(updated_credit_card.billing_address.country_code_alpha2 == "AS")
self.assertTrue(updated_credit_card.billing_address.country_code_alpha3 == "ASM")
self.assertTrue(updated_credit_card.billing_address.country_code_numeric == "016")
def test_update_can_pass_expiration_month_and_expiration_year(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"number": CreditCardNumbers.MasterCard,
"expiration_month": "07",
"expiration_year": "2011"
})
self.assertTrue(update_result.is_success)
self.assertTrue(update_result.payment_method.token == credit_card_result.credit_card.token)
updated_credit_card = update_result.payment_method
self.assertTrue(updated_credit_card.expiration_month == "07")
self.assertTrue(updated_credit_card.expiration_year == "2011")
self.assertTrue(updated_credit_card.expiration_date == "07/2011")
def test_update_verifies_the_update_if_options_verify_card_is_true(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Original Holder",
"customer_id": customer_id,
"cvv": "123",
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"cardholder_name": "New Holder",
"cvv": "456",
"number": CreditCardNumbers.FailsSandboxVerification.MasterCard,
"expiration_date": "06/2013",
"options": {
"verify_card": "true"
}
})
self.assertFalse(update_result.is_success)
self.assertTrue(update_result.credit_card_verification.status == CreditCardVerification.Status.ProcessorDeclined)
self.assertTrue(update_result.credit_card_verification.gateway_rejection_reason is None)
def test_update_can_pass_custom_verification_amount(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Card Holder",
"customer_id": customer_id,
"cvv": "123",
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2020"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"payment_method_nonce": Nonces.ProcessorDeclinedMasterCard,
"options": {
"verify_card": "true",
"verification_amount": "2.34"
}
})
self.assertFalse(update_result.is_success)
self.assertTrue(update_result.credit_card_verification.status == CreditCardVerification.Status.ProcessorDeclined)
self.assertTrue(update_result.credit_card_verification.gateway_rejection_reason is None)
def test_update_includes_risk_data_when_skip_advanced_fraud_checking_is_false(self):
with FraudProtectionEnterpriseIntegrationMerchant():
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Card Holder",
"customer_id": customer_id,
"cvv": "123",
"number": "4111111111111111",
"expiration_date": "05/2020"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"expiration_date": "10/2020",
"options": {
"verify_card": True,
"skip_advanced_fraud_checking": False
},
})
self.assertTrue(update_result.is_success)
verification = update_result.payment_method.verification
self.assertIsInstance(verification.risk_data, RiskData)
def test_update_does_not_include_risk_data_when_skip_advanced_fraud_checking_is_true(self):
with FraudProtectionEnterpriseIntegrationMerchant():
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Card Holder",
"customer_id": customer_id,
"cvv": "123",
"number": "4111111111111111",
"expiration_date": "05/2020"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"expiration_date": "10/2020",
"options": {
"verify_card": True,
"skip_advanced_fraud_checking": True
},
})
self.assertTrue(update_result.is_success)
verification = update_result.payment_method.verification
self.assertIsNone(verification.risk_data)
def test_update_can_update_the_billing_address(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Original Holder",
"customer_id": customer_id,
"cvv": "123",
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012",
"billing_address": {
"first_name": "Old First Name",
"last_name": "Old Last Name",
"company": "Old Company",
"street_address": "123 Old St",
"extended_address": "Apt Old",
"locality": "Old City",
"region": "Old State",
"postal_code": "12345",
"country_name": "Canada"
}
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"options": {"verify_card": "false"},
"billing_address": {
"first_name": "New First Name",
"last_name": "New Last Name",
"company": "New Company",
"street_address": "123 New St",
"extended_address": "Apt New",
"locality": "New City",
"region": "New State",
"postal_code": "56789",
"country_name": "United States of America"
}
})
self.assertTrue(update_result.is_success)
address = update_result.payment_method.billing_address
self.assertTrue(address.first_name == "New First Name")
self.assertTrue(address.last_name == "New Last Name")
self.assertTrue(address.company == "New Company")
self.assertTrue(address.street_address == "123 New St")
self.assertTrue(address.extended_address == "Apt New")
self.assertTrue(address.locality == "New City")
self.assertTrue(address.region == "New State")
self.assertTrue(address.postal_code == "56789")
self.assertTrue(address.country_name == "United States of America")
def test_update_returns_an_error_response_if_invalid(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"cardholder_name": "Original Holder",
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2012"
})
update_result = PaymentMethod.update(credit_card_result.credit_card.token, {
"cardholder_name": "New Holder",
"number": "invalid",
"expiration_date": "05/2014",
})
self.assertFalse(update_result.is_success)
number_errors = update_result.errors.for_object("credit_card").on("number")
self.assertEqual(1, len(number_errors))
self.assertEqual("Credit card number must be 12-19 digits.", number_errors[0].message)
def test_update_can_update_the_default(self):
customer_id = Customer.create().customer.id
card1 = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009"
}).credit_card
card2 = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009"
}).credit_card
self.assertTrue(card1.default)
self.assertFalse(card2.default)
PaymentMethod.update(card2.token, {
"options": {"make_default": True}
})
self.assertFalse(CreditCard.find(card1.token).default)
self.assertTrue(CreditCard.find(card2.token).default)
def test_update_updates_a_paypal_accounts_token(self):
customer_id = Customer.create().customer.id
original_token = "paypal-account-" + str(int(time.time()))
nonce = TestHelper.nonce_for_paypal_account({
"consent_code": "consent-code",
"token": original_token
})
original_result = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id
})
updated_token = "UPDATED_TOKEN-" + str(random.randint(0, 100000000))
PaymentMethod.update(
original_token,
{"token": updated_token}
)
updated_paypal_account = PayPalAccount.find(updated_token)
self.assertTrue(updated_paypal_account.email == original_result.payment_method.email)
self.assertRaises(NotFoundError, PaymentMethod.find, original_token)
def test_update_can_make_a_paypal_account_the_default_payment_method(self):
customer_id = Customer.create().customer.id
credit_card_result = CreditCard.create({
"customer_id": customer_id,
"number": CreditCardNumbers.Visa,
"expiration_date": "05/2009",
"options": {"make_default": "true"}
})
self.assertTrue(credit_card_result.is_success)
nonce = TestHelper.nonce_for_paypal_account({
"consent_code": "consent-code"
})
original_token = PaymentMethod.create({
"payment_method_nonce": nonce,
"customer_id": customer_id
}).payment_method.token
PaymentMethod.update(
original_token,
{"options": {"make_default": "true"}}
)
updated_paypal_account = PayPalAccount.find(original_token)
self.assertTrue(updated_paypal_account.default)
def test_update_fails_to_updates_a_paypal_accounts_token_with(self):
customer_id = Customer.create().customer.id
first_token = "paypal-account-" + str(random.randint(0, 100000000))
second_token = "paypal-account-" + str(random.randint(0, 100000000))
first_nonce = TestHelper.nonce_for_paypal_account({
"consent_code": "consent-code",
"token": first_token
})
PaymentMethod.create({
"payment_method_nonce": first_nonce,
"customer_id": customer_id
})
second_nonce = TestHelper.nonce_for_paypal_account({
"consent_code": "consent-code",
"token": second_token
})
PaymentMethod.create({
"payment_method_nonce": second_nonce,
"customer_id": customer_id
})
updated_result = PaymentMethod.update(
first_token,
{"token": second_token}
)
self.assertFalse(updated_result.is_success)
errors = updated_result.errors.deep_errors
self.assertEqual(1, len(errors))
self.assertEqual("92906", errors[0].code)
def test_payment_method_grant_raises_on_non_existent_tokens(self):
granting_gateway, _ = TestHelper.create_payment_method_grant_fixtures()
self.assertRaises(NotFoundError, granting_gateway.payment_method.grant, "non-existant-token", False)
def test_payment_method_grant_returns_one_time_nonce(self):
"""
Payment method grant returns a nonce that is transactable by a partner merchant exactly once
"""
granting_gateway, credit_card = TestHelper.create_payment_method_grant_fixtures()
grant_result = granting_gateway.payment_method.grant(credit_card.token, { "allow_vaulting": False });
self.assertTrue(grant_result.is_success)
result = Transaction.sale({
"payment_method_nonce": grant_result.payment_method_nonce.nonce,
"amount": TransactionAmounts.Authorize
})
self.assertTrue(result.is_success)
result = Transaction.sale({
"payment_method_nonce": grant_result.payment_method_nonce.nonce,
"amount": TransactionAmounts.Authorize
})
self.assertFalse(result.is_success)
def test_payment_method_grant_returns_a_nonce_that_is_not_vaultable(self):
granting_gateway, credit_card = TestHelper.create_payment_method_grant_fixtures()
grant_result = granting_gateway.payment_method.grant(credit_card.token, False)
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": grant_result.payment_method_nonce.nonce
})
self.assertFalse(result.is_success)
def test_payment_method_grant_returns_a_nonce_that_is_vaultable(self):
granting_gateway, credit_card = TestHelper.create_payment_method_grant_fixtures()
grant_result = granting_gateway.payment_method.grant(credit_card.token, { "allow_vaulting": True })
customer_id = Customer.create().customer.id
result = PaymentMethod.create({
"customer_id": customer_id,
"payment_method_nonce": grant_result.payment_method_nonce.nonce
})
self.assertTrue(result.is_success)
def test_payment_method_revoke_renders_a_granted_nonce_unusable(self):
granting_gateway, credit_card = TestHelper.create_payment_method_grant_fixtures()
grant_result = granting_gateway.payment_method.grant(credit_card.token)
revoke_result = granting_gateway.payment_method.revoke(credit_card.token)
self.assertTrue(revoke_result.is_success)
result = Transaction.sale({
"payment_method_nonce": grant_result.payment_method_nonce.nonce,
"amount": TransactionAmounts.Authorize
})
self.assertFalse(result.is_success)
def test_payment_method_revoke_raises_on_non_existent_tokens(self):
granting_gateway, _ = TestHelper.create_payment_method_grant_fixtures()
self.assertRaises(NotFoundError, granting_gateway.payment_method.revoke, "non-existant-token")
|
[
"code@getbraintree.com"
] |
code@getbraintree.com
|
581f399461e2e9d4620c41a64c9be5adf5b2dc9b
|
a7d5fad9c31dc2678505e2dcd2166ac6b74b9dcc
|
/tests/dlkit/primordium/locale/types/test_language.py
|
f3319f5513702a06de80ebba455a6f6bc7b90c19
|
[
"MIT"
] |
permissive
|
mitsei/dlkit
|
39d5fddbb8cc9a33e279036e11a3e7d4fa558f70
|
445f968a175d61c8d92c0f617a3c17dc1dc7c584
|
refs/heads/master
| 2022-07-27T02:09:24.664616
| 2018-04-18T19:38:17
| 2018-04-18T19:38:17
| 88,057,460
| 2
| 1
|
MIT
| 2022-07-06T19:24:50
| 2017-04-12T13:53:10
|
Python
|
UTF-8
|
Python
| false
| false
| 1,458
|
py
|
import pytest
from dlkit.abstract_osid.osid import errors
from dlkit.primordium.locale.types.language import get_type_data
class TestLanguage(object):
def test_get_type_data_with_iso(self):
results = get_type_data('gl')
assert results['identifier'] == 'GLG'
assert results['namespace'] == '639-2'
assert results['display_name'] == 'Galician Language Type'
assert results['display_label'] == 'Galician'
assert results['description'] == 'The display text language type for the Galician language.'
def test_get_type_data_with_iso_major(self):
results = get_type_data('twi')
assert results['identifier'] == 'TWI'
assert results['namespace'] == '639-2'
assert results['display_name'] == 'Twi Language Type'
assert results['display_label'] == 'Twi'
assert results['description'] == 'The display text language type for the Twi language.'
def test_get_type_data_with_iso_other(self):
results = get_type_data('zrp')
assert results['identifier'] == 'ZRP'
assert results['namespace'] == '639-3'
assert results['display_name'] == 'Zarphatic Language Type'
assert results['display_label'] == 'Zarphatic'
assert results['description'] == 'The display text language type for the Zarphatic language.'
def test_unknown_type(self):
with pytest.raises(errors.NotFound):
get_type_data('foo')
|
[
"cjshaw@mit.edu"
] |
cjshaw@mit.edu
|
83833092fcb6d0da8ef00dbc5c3f3e091dd4a6da
|
212321b2ac57d33e76a955cb6d2418551f245b1c
|
/Daniel/0. Clases - Coche.py
|
6bf77cd8669f9f133b594997bc8111bd1298a82c
|
[
"MIT"
] |
permissive
|
alexxfernandez13/Clases
|
506700f29d873a5fb6d16b6514aca8cfe1cde424
|
c69876f0701846aeeac0ccf625b96240a5601320
|
refs/heads/main
| 2023-01-01T22:40:41.452312
| 2020-10-25T17:04:46
| 2020-10-25T17:04:46
| 305,363,261
| 0
| 0
| null | null | null | null |
UTF-8
|
Python
| false
| false
| 782
|
py
|
##### CLASSE vs FUNCTIONS
# - 1 logica / tematica
# - 2 para tener un objeto que lo contenga todo
class Coche():
def __init__(self, marca, puertas):
self.marca = marca
self.puertas = puertas
self.velocidad = 0
def acelerar(self, km_h):
self.velocidad = self.velocidad + km_h #Porque en km_h no se pone self?
def report(self):
print(f"El coche tiem {self.puertas} puertas es de la marca {self.marca} y ahora va a velocidad {self.velocidad}")
def claxon(self):
print("MUUUUUU")
#instancia
coche = Coche("bmw", 4)
print(coche.velocidad) #mirando att
coche.acelerar(10) #metodo que cambia el atributo velocidad
print(coche.velocidad) #mirar velocidad
coche.report()
coche.claxon()
|
[
"alexxfernandez13@users.noreply.github.com"
] |
alexxfernandez13@users.noreply.github.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.