hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
qsc_code_num_words_quality_signal
int64
qsc_code_num_chars_quality_signal
float64
qsc_code_mean_word_length_quality_signal
float64
qsc_code_frac_words_unique_quality_signal
float64
qsc_code_frac_chars_top_2grams_quality_signal
float64
qsc_code_frac_chars_top_3grams_quality_signal
float64
qsc_code_frac_chars_top_4grams_quality_signal
float64
qsc_code_frac_chars_dupe_5grams_quality_signal
float64
qsc_code_frac_chars_dupe_6grams_quality_signal
float64
qsc_code_frac_chars_dupe_7grams_quality_signal
float64
qsc_code_frac_chars_dupe_8grams_quality_signal
float64
qsc_code_frac_chars_dupe_9grams_quality_signal
float64
qsc_code_frac_chars_dupe_10grams_quality_signal
float64
qsc_code_frac_chars_replacement_symbols_quality_signal
float64
qsc_code_frac_chars_digital_quality_signal
float64
qsc_code_frac_chars_whitespace_quality_signal
float64
qsc_code_size_file_byte_quality_signal
float64
qsc_code_num_lines_quality_signal
float64
qsc_code_num_chars_line_max_quality_signal
float64
qsc_code_num_chars_line_mean_quality_signal
float64
qsc_code_frac_chars_alphabet_quality_signal
float64
qsc_code_frac_chars_comments_quality_signal
float64
qsc_code_cate_xml_start_quality_signal
float64
qsc_code_frac_lines_dupe_lines_quality_signal
float64
qsc_code_cate_autogen_quality_signal
float64
qsc_code_frac_lines_long_string_quality_signal
float64
qsc_code_frac_chars_string_length_quality_signal
float64
qsc_code_frac_chars_long_word_length_quality_signal
float64
qsc_code_frac_lines_string_concat_quality_signal
float64
qsc_code_cate_encoded_data_quality_signal
float64
qsc_code_frac_chars_hex_words_quality_signal
float64
qsc_code_frac_lines_prompt_comments_quality_signal
float64
qsc_code_frac_lines_assert_quality_signal
float64
qsc_codepython_cate_ast_quality_signal
float64
qsc_codepython_frac_lines_func_ratio_quality_signal
float64
qsc_codepython_cate_var_zero_quality_signal
bool
qsc_codepython_frac_lines_pass_quality_signal
float64
qsc_codepython_frac_lines_import_quality_signal
float64
qsc_codepython_frac_lines_simplefunc_quality_signal
float64
qsc_codepython_score_lines_no_logic_quality_signal
float64
qsc_codepython_frac_lines_print_quality_signal
float64
qsc_code_num_words
int64
qsc_code_num_chars
int64
qsc_code_mean_word_length
int64
qsc_code_frac_words_unique
null
qsc_code_frac_chars_top_2grams
int64
qsc_code_frac_chars_top_3grams
int64
qsc_code_frac_chars_top_4grams
int64
qsc_code_frac_chars_dupe_5grams
int64
qsc_code_frac_chars_dupe_6grams
int64
qsc_code_frac_chars_dupe_7grams
int64
qsc_code_frac_chars_dupe_8grams
int64
qsc_code_frac_chars_dupe_9grams
int64
qsc_code_frac_chars_dupe_10grams
int64
qsc_code_frac_chars_replacement_symbols
int64
qsc_code_frac_chars_digital
int64
qsc_code_frac_chars_whitespace
int64
qsc_code_size_file_byte
int64
qsc_code_num_lines
int64
qsc_code_num_chars_line_max
int64
qsc_code_num_chars_line_mean
int64
qsc_code_frac_chars_alphabet
int64
qsc_code_frac_chars_comments
int64
qsc_code_cate_xml_start
int64
qsc_code_frac_lines_dupe_lines
int64
qsc_code_cate_autogen
int64
qsc_code_frac_lines_long_string
int64
qsc_code_frac_chars_string_length
int64
qsc_code_frac_chars_long_word_length
int64
qsc_code_frac_lines_string_concat
null
qsc_code_cate_encoded_data
int64
qsc_code_frac_chars_hex_words
int64
qsc_code_frac_lines_prompt_comments
int64
qsc_code_frac_lines_assert
int64
qsc_codepython_cate_ast
int64
qsc_codepython_frac_lines_func_ratio
int64
qsc_codepython_cate_var_zero
int64
qsc_codepython_frac_lines_pass
int64
qsc_codepython_frac_lines_import
int64
qsc_codepython_frac_lines_simplefunc
int64
qsc_codepython_score_lines_no_logic
int64
qsc_codepython_frac_lines_print
int64
effective
string
hits
int64
9524396404692dbd36ecee5c7efcfa7a300ec5cb
379
py
Python
pyGame/chutes_ladders/chutes_ladders/practice/play.py
jamesanderegg/Bootcamp
bc4224a6a510feea2205bcbbeeb83d2164aa117a
[ "MIT" ]
1
2018-09-12T02:56:20.000Z
2018-09-12T02:56:20.000Z
pyGame/chutes_ladders/chutes_ladders/practice/play.py
jamesanderegg/Bootcamp
bc4224a6a510feea2205bcbbeeb83d2164aa117a
[ "MIT" ]
null
null
null
pyGame/chutes_ladders/chutes_ladders/practice/play.py
jamesanderegg/Bootcamp
bc4224a6a510feea2205bcbbeeb83d2164aa117a
[ "MIT" ]
1
2018-08-22T00:43:03.000Z
2018-08-22T00:43:03.000Z
# local imports from Player import Player, Human_Player, Computer_Player, Dice from Board import Square, Chute, Ladder, Board from Chutes_and_Ladders import Chutes_and_Ladders_Game # this is called a boilerplate... # the code beneath this will only execute if you call the script directly (but not as an import) if __name__ == '__main__': game = Chutes_and_Ladders_Game()
34.454545
96
0.783641
58
379
4.810345
0.655172
0.096774
0.172043
0.143369
0
0
0
0
0
0
0
0
0.158311
379
10
97
37.9
0.874608
0.372032
0
0
0
0
0.034188
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
9532605853a02dfd43027a7316e4ffe6847fe59d
464
py
Python
pushcode.py
osgvsun/gsiot
1ba144cd10fd5022c804646a062513ee655841a4
[ "MulanPSL-1.0" ]
null
null
null
pushcode.py
osgvsun/gsiot
1ba144cd10fd5022c804646a062513ee655841a4
[ "MulanPSL-1.0" ]
null
null
null
pushcode.py
osgvsun/gsiot
1ba144cd10fd5022c804646a062513ee655841a4
[ "MulanPSL-1.0" ]
null
null
null
# -*- coding:utf-8 -*- import sys,os,binascii,platform,time,socket,argparse,datetime as dt from gsiot.v3 import * import argparse,datetime def runcmd(cmd): print cmd os.system(cmd +"&") if __name__=="__main__": rootpath=os.path.abspath(sys.path[0]) try:commit=sys.argv[1] except:commit="" # 首先启动外置摄像头 runcmd("cd {} && git add -f * && git commit -a -m \"{}自动更新:{}\" && git push".format(sys.path[0],str(dt.date.today()),commit)) pass
33.142857
129
0.640086
69
464
4.188406
0.695652
0.110727
0.055363
0
0
0
0
0
0
0
0
0.012887
0.163793
464
14
130
33.142857
0.731959
0.064655
0
0
0
0
0.148148
0
0
0
0
0
0
0
null
null
0.083333
0.25
null
null
0.083333
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
20fdde2f0e205bbd5ba351b6f2778eb5c8a99b04
1,315
py
Python
serif/theory/actor_mention_set.py
BBN-E/ZS4IE
357965f3068cfe5098422d8cb0ca4b0f99c99fd4
[ "Apache-2.0" ]
7
2022-03-24T11:04:08.000Z
2022-03-31T17:12:46.000Z
serif/theory/actor_mention_set.py
BBN-E/ZS4IE
357965f3068cfe5098422d8cb0ca4b0f99c99fd4
[ "Apache-2.0" ]
null
null
null
serif/theory/actor_mention_set.py
BBN-E/ZS4IE
357965f3068cfe5098422d8cb0ca4b0f99c99fd4
[ "Apache-2.0" ]
null
null
null
from serif.theory.actor_mention import ActorMention from serif.theory.serif_sequence_theory import SerifSequenceTheory from serif.xmlio import _ChildTheoryElementList class ActorMentionSet(SerifSequenceTheory): _children = _ChildTheoryElementList('ActorMention') @classmethod def from_values(cls, owner=None): ret = cls(owner=owner) return ret @classmethod def empty(cls, owner=None): return cls.from_values(owner=owner) def add_new_actor_mention(self, mention, actor_db_name, actor_uid, actor_name, source_note): actor_mention = self.construct_actor_mention(mention, actor_db_name, actor_uid, actor_name, source_note) self.add_actor_mention(actor_mention) return actor_mention def construct_actor_mention(self, mention, actor_db_name, actor_uid, actor_name, source_note): actor_mention = ActorMention(owner=self) actor_mention.mention = mention actor_mention.actor_db_name = actor_db_name actor_mention.actor_uid = actor_uid actor_mention.actor_name = actor_name actor_mention.source_note = source_note actor_mention.document.generate_id(actor_mention) return actor_mention def add_actor_mention(self, actor_mention): self._children.append(actor_mention)
37.571429
112
0.752091
164
1,315
5.664634
0.219512
0.258342
0.086114
0.086114
0.301399
0.276642
0.205597
0.205597
0.205597
0.205597
0
0
0.18251
1,315
34
113
38.676471
0.864186
0
0
0.148148
0
0
0.009125
0
0
0
0
0
0
1
0.185185
false
0
0.111111
0.037037
0.518519
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
1f07f54aa8edff968175a33b98f9c0e9127d3a2c
304
py
Python
test/src/Syntax/Statements/while/while-break.py
milliburn/llvmPy
d6fa3002e823fae00cf33d9b2ea480604681376c
[ "MIT" ]
1
2019-01-22T02:58:04.000Z
2019-01-22T02:58:04.000Z
test/src/Syntax/Statements/while/while-break.py
roberth-k/llvmPy
d6fa3002e823fae00cf33d9b2ea480604681376c
[ "MIT" ]
null
null
null
test/src/Syntax/Statements/while/while-break.py
roberth-k/llvmPy
d6fa3002e823fae00cf33d9b2ea480604681376c
[ "MIT" ]
null
null
null
# RUN: test-ir.sh %s # IR-LABEL: while.0: # IR: br i1 %{{[0-9]+}}, label %loop.0, label %endwhile.0 while True: # IR-LABEL: loop.0: if True: # IR-LABEL: then.0: # IR: br label %endwhile.0 break # IR-LABEL: endif.0: # IR: br label %while.0 # IR-LABEL: endwhile.0:
21.714286
57
0.536184
51
304
3.196078
0.352941
0.214724
0.092025
0.159509
0
0
0
0
0
0
0
0.054545
0.276316
304
13
58
23.384615
0.686364
0.713816
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
1f0fe402d72b43f92a0a21d9765afaa6375e01cc
1,885
py
Python
quickfunctions.py
skdys/quantumwave
40374b8fce1adec210b0afdef0c656ede1b15703
[ "MIT" ]
2
2019-09-15T11:49:09.000Z
2020-12-29T12:33:58.000Z
quickfunctions.py
skdys/quantumwave
40374b8fce1adec210b0afdef0c656ede1b15703
[ "MIT" ]
null
null
null
quickfunctions.py
skdys/quantumwave
40374b8fce1adec210b0afdef0c656ede1b15703
[ "MIT" ]
1
2019-11-27T12:06:44.000Z
2019-11-27T12:06:44.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Utility functions Authors: - Andrea Maiani <andrea.maiani@mail.polimi.it> - Ciro Pentangelo <ciro.pentangelo@mail.polimi.it> """ import numpy as np # Helper functions for gaussian wave-packets def gauss_x(x, a, x0, k0): """ a gaussian wave packet of width a, centered at x0, with momentum k0 """ return ((a * np.sqrt(np.pi)) ** (-0.5) * np.exp(-0.5 * ((x - x0) * 1. / a) ** 2 + 1j * x * k0)) def gauss_k(k, a, x0, k0): """ analytical fourier transform of gauss_x(x), above """ return ((a / np.sqrt(np.pi)) ** 0.5 * np.exp(-0.5 * (a * (k - k0)) ** 2 - 1j * (k - k0) * x0)) # Utility functions for building potentials def theta(x): """ theta function : returns 0 if x<=0, and 1 if x>0 """ x = np.asarray(x) y = np.zeros(x.shape) y[x > 0] = 1.0 return y def square_barrier(x, width, height): width = width / 2 return height * (theta(x + width) - theta(x - width)) def double_square_barrier(x, width, height, space): width = width / 2 space = space / 2 return height * (theta(x + space + width) - theta(x + space - width) + theta(x - space + width) - theta(x - space - width)) def well(x, width, height): width = width / 2 return height * (-theta(x + width) + theta(x - width)) def reflectionless(x, l=1, V_0=1): """ Poschl-Teller potential """ x = np.asarray(x) return -V_0 * l * (l + 1) / np.cosh(np.sqrt(V_0) * x) ** 2 def invisible_susy(x, a=1j, c=1): x = np.asarray(x) return 2 * c ** 2 / (c * x + a) ** 2 def invisible_kk(x, n=5, a=-3j): x = np.asarray(x) return np.exp(0.5j * np.pi * (n + 1)) / (x + a) ** (n + 1) def kk(x, n, c, A, a): x = np.asarray(x) return A / (c * x + a) ** n
22.440476
71
0.525729
301
1,885
3.255814
0.27907
0.055102
0.05102
0.056122
0.362245
0.240816
0.240816
0.240816
0.240816
0.240816
0
0.041509
0.297082
1,885
83
72
22.710843
0.698113
0.237135
0
0.216216
0
0
0
0
0
0
0
0
0
1
0.27027
false
0
0.027027
0
0.567568
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
1f1159fd80b1ac8efeb3c5ce5c75e912ccd2631a
4,093
py
Python
src/abwreservierung/settings.py
holytortoise/abwreservierung
9bf8bdb64f54df85e815a0af46ad5a62544a2236
[ "MIT" ]
null
null
null
src/abwreservierung/settings.py
holytortoise/abwreservierung
9bf8bdb64f54df85e815a0af46ad5a62544a2236
[ "MIT" ]
null
null
null
src/abwreservierung/settings.py
holytortoise/abwreservierung
9bf8bdb64f54df85e815a0af46ad5a62544a2236
[ "MIT" ]
null
null
null
""" Django settings for abwreservierung project. Generated by 'django-admin startproject' using Django 1.11.5. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import sys import os from decouple import config # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allgemeine Templates für das Projekt TEMPLATE_PROJEKT_DIR = os.path.join(BASE_DIR, 'templates') # Templates für die Account App TEMPLATE_ACCOUNT_DIR = os.path.join(BASE_DIR, 'account/templates') # Templates für die Reservierung App TEMPLATE_RESERVIERUNG_DIR = os.path.join(BASE_DIR, 'reservierung/templates') # Tempates für die interaktiven Türschilder TEMPLATE_SCHILDER_DIR = os.path.join(BASE_DIR, 'schilder/templates') # Static Files STATIC_DIR = os.path.join(BASE_DIR, 'static') # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = config('SECRET_KEY') # 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', 'bootstrap3', 'account', 'reservierung', 'schilder', ] 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 = 'abwreservierung.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [TEMPLATE_PROJEKT_DIR, TEMPLATE_ACCOUNT_DIR, TEMPLATE_RESERVIERUNG_DIR, TEMPLATE_SCHILDER_DIR, ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'abwreservierung.wsgi.application' # Database # https://docs.djangoproject.com/en/1.11/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': config('DB_NAME'), 'USER': config('DB_USER'), 'PASSWORD': config('DB_PASSWORD'), 'HOST': config('DB_HOST'), 'PORT': '', } } # Password validation # https://docs.djangoproject.com/en/1.11/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/1.11/topics/i18n/ LANGUAGE_CODE = 'de' TIME_ZONE = 'CET' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.11/howto/static-files/ STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, "static_root/") STATICFILES_DIRS = [STATIC_DIR, ] LOGIN_REDIRECT_URL = 'reservierung:index' LOGOUT_REDIRECT_URL = 'reservierung:index'
28.034247
91
0.709504
461
4,093
6.156182
0.347072
0.06871
0.054264
0.061663
0.214235
0.19697
0.096547
0.096547
0.04334
0
0
0.009638
0.16345
4,093
145
92
28.227586
0.819217
0.283411
0
0
1
0
0.468847
0.349398
0
0
0
0
0
1
0
false
0.070588
0.035294
0
0.035294
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
1f19084f9b8072c1328373695d52ad50b9266334
1,458
py
Python
src/ros2_quad_sim_python/launch/quad_sim.launch.py
ricardodeazambuja/ros2_quad_sim_python
2bf4cd4f6532653d97d70867757a56c367dda58d
[ "MIT" ]
1
2022-03-08T14:08:49.000Z
2022-03-08T14:08:49.000Z
src/ros2_quad_sim_python/launch/quad_sim.launch.py
ricardodeazambuja/ros2_quad_sim_python
2bf4cd4f6532653d97d70867757a56c367dda58d
[ "MIT" ]
null
null
null
src/ros2_quad_sim_python/launch/quad_sim.launch.py
ricardodeazambuja/ros2_quad_sim_python
2bf4cd4f6532653d97d70867757a56c367dda58d
[ "MIT" ]
null
null
null
import launch import launch_ros.actions #TODO: add all the parameters here... def generate_launch_description(): ld = launch.LaunchDescription([ launch.actions.DeclareLaunchArgument( name='init_pose', default_value="[0,0,2,0,0,0]", description='Initial pose' ), launch.actions.DeclareLaunchArgument( name='target_frame', default_value='flying_sensor', description='Target frame for the flying sensor' ), launch.actions.DeclareLaunchArgument( name='map_frame', default_value='map', description='Target frame for the flying sensor' ), launch_ros.actions.Node( package='ros2_quad_sim_python', executable='quadsim', name='quadsim', output={'both': 'log'}, emulate_tty='True', on_exit=launch.actions.Shutdown(), parameters=[ { 'init_pose': launch.substitutions.LaunchConfiguration('init_pose') }, { 'target_frame': launch.substitutions.LaunchConfiguration('target_frame') }, { 'map_frame': launch.substitutions.LaunchConfiguration('map_frame') } ] ) ]) return ld if __name__ == '__main__': generate_launch_description()
31.021277
92
0.543896
123
1,458
6.186992
0.422764
0.072273
0.134034
0.149803
0.120894
0.120894
0.120894
0.120894
0
0
0
0.007423
0.353224
1,458
47
93
31.021277
0.799576
0.024691
0
0.190476
1
0
0.177215
0
0
0
0
0.021277
0
1
0.02381
false
0
0.047619
0
0.095238
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
2
1f1aff3d48b3a5e342ac7bef1e8508e42c793a44
389
py
Python
xivdb/api/api.py
luther38/XivDbWeb
204d066232c04dce0ea5a03ec55f160cfbc62659
[ "MIT" ]
null
null
null
xivdb/api/api.py
luther38/XivDbWeb
204d066232c04dce0ea5a03ec55f160cfbc62659
[ "MIT" ]
null
null
null
xivdb/api/api.py
luther38/XivDbWeb
204d066232c04dce0ea5a03ec55f160cfbc62659
[ "MIT" ]
null
null
null
from flask import Flask, render_template, Blueprint from xivdb.sql import DB, Base, Weapon, Repair, Materia, Stats from typing import List from sqlalchemy.orm import sessionmaker, Session, Query import json d = DB(Base) #session: Session = d.newSession() api_bp = Blueprint('api', __name__) @api_bp.route('/') def apiHello(): res = {"msg": "Hello World"} return json.dumps(res)
24.3125
62
0.727506
55
389
5.018182
0.654545
0.043478
0
0
0
0
0
0
0
0
0
0
0.151671
389
15
63
25.933333
0.836364
0.084833
0
0
0
0
0.050847
0
0
0
0
0
0
1
0.090909
false
0
0.454545
0
0.636364
0.181818
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
1f1eb3b63733737cfc378b4623ce3fb4ae598a39
1,330
py
Python
src/spiegelib/features/data_scaler_base.py
spiegel-lib/spiegel
2a0b606a2f9eba22e25ade96ece249b790ca3b23
[ "MIT" ]
10
2020-11-12T16:11:03.000Z
2022-02-02T12:18:07.000Z
src/spiegelib/features/data_scaler_base.py
spiegel-lib/spiegel
2a0b606a2f9eba22e25ade96ece249b790ca3b23
[ "MIT" ]
3
2020-12-04T01:43:40.000Z
2021-02-19T17:08:57.000Z
src/spiegelib/features/data_scaler_base.py
spiegel-lib/spiegel
2a0b606a2f9eba22e25ade96ece249b790ca3b23
[ "MIT" ]
3
2020-07-04T02:24:15.000Z
2021-09-08T14:01:36.000Z
#!/usr/bin/env python """ Abstract Base Class for Data Scalers """ from abc import ABC, abstractmethod class DataScalerBase(ABC): @abstractmethod def fit(self, data, axis=None): """ Fit parameters for data scaling. Abstract, must be implemented. Args: data (np.ndarray): data to calculate mean and standard deviation on for future scaling axis (int, tuple, optional): axis or axes to use for calculating scaling parameteres. Defaults to None which will flatten the array first. """ raise NotImplementedError @abstractmethod def transform(self, data): """ Scale data Args: data (np.ndarray): data to scale Returns: np.ndarray: scaled data """ raise NotImplementedError def fit_transform(self, data, axis=None): """ Fit scaling parameters and then scale data Args: data (np.ndarray): data to scale axis (int, tuple, optional): axis or axes to use for calculating scaling parameteres. Defaults to None which will flatten the array first. Returns: np.ndarray: scaled data """ self.fit(data, axis) return self.transform(data)
25.09434
84
0.590226
150
1,330
5.226667
0.393333
0.057398
0.038265
0.065051
0.519133
0.404337
0.375
0.375
0.375
0.280612
0
0
0.337594
1,330
52
85
25.576923
0.889898
0.561654
0
0.363636
0
0
0
0
0
0
0
0
0
1
0.272727
false
0
0.090909
0
0.545455
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
1f1f47f4ad7c533fb296e7330ade19aafbe2552f
426
py
Python
assignments/homework-01.py
ralec911/missing-course
a297768cf7e7162fabd6b8a1d3041c2d3faabc22
[ "BSD-3-Clause" ]
8
2021-02-10T15:58:28.000Z
2022-01-09T01:55:41.000Z
assignments/homework-01.py
ralec911/missing-course
a297768cf7e7162fabd6b8a1d3041c2d3faabc22
[ "BSD-3-Clause" ]
2
2021-01-26T01:35:42.000Z
2021-02-27T20:41:38.000Z
assignments/homework-01.py
ralec911/missing-course
a297768cf7e7162fabd6b8a1d3041c2d3faabc22
[ "BSD-3-Clause" ]
27
2021-01-11T16:23:24.000Z
2022-01-09T02:04:03.000Z
def pow(a, b): if b == 0: result = 1 else: result = pow(a, b - 1) * a return result def square(a): """ >>> square(0) 0 >>> square(1) 1 >>> square(2) 4 """ return pow(a, 2) def cube(a): """ >>> cube(0) 0 >>> cube(1) 1 >>> cube(2) 8 """ return pow(a, 3) if __name__ == "__main__": import doctest doctest.testmod()
11.833333
34
0.410798
57
426
2.929825
0.368421
0.095808
0.05988
0
0
0
0
0
0
0
0
0.06746
0.408451
426
35
35
12.171429
0.595238
0.20892
0
0
0
0
0.030075
0
0
0
0
0
0
1
0.230769
false
0
0.076923
0
0.538462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
1f381b71ceb897b345ffaaf719131de0bc6385f2
568
py
Python
cpython/Lib/test/test_distutils.py
ms-iot/python
a8f8fba1214289572713520f83409762a4446fea
[ "BSD-3-Clause" ]
70
2015-06-20T17:59:24.000Z
2021-05-03T02:01:49.000Z
cpython/Lib/test/test_distutils.py
ms-iot/python
a8f8fba1214289572713520f83409762a4446fea
[ "BSD-3-Clause" ]
16
2015-06-11T14:57:43.000Z
2016-12-03T00:22:13.000Z
cpython/Lib/test/test_distutils.py
ms-iot/python
a8f8fba1214289572713520f83409762a4446fea
[ "BSD-3-Clause" ]
36
2015-05-15T20:30:44.000Z
2020-11-14T19:31:40.000Z
"""Tests for distutils. The tests for distutils are defined in the distutils.tests package; the test_suite() function there returns a test suite that's ready to be run. """ import test.support test.support.import_module('distutils') import distutils.tests # Skip tests if running under UWP import sys if sys.platform == 'uwp': import unittest raise unittest.SkipTest('Test not appropriate under UWP') def test_main(): test.support.run_unittest(distutils.tests.test_suite()) test.support.reap_children() if __name__ == "__main__": test_main()
22.72
68
0.748239
82
568
5
0.487805
0.107317
0.082927
0
0
0
0
0
0
0
0
0
0.15493
568
24
69
23.666667
0.854167
0.350352
0
0
0
0
0.138122
0
0
0
0
0
0
1
0.083333
true
0
0.416667
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
2
1f3e51590e806bcc2d35dc0186b1111525a7e84c
3,589
py
Python
74_Defining_U-net_in_Python_using_Keras.py
Data-Laboratory/WorkExamples
27e58207e664da7813673e6792c0c30c0a5bf74c
[ "MIT" ]
1
2021-12-15T22:27:27.000Z
2021-12-15T22:27:27.000Z
74_Defining_U-net_in_Python_using_Keras.py
Data-Laboratory/WorkExamples
27e58207e664da7813673e6792c0c30c0a5bf74c
[ "MIT" ]
null
null
null
74_Defining_U-net_in_Python_using_Keras.py
Data-Laboratory/WorkExamples
27e58207e664da7813673e6792c0c30c0a5bf74c
[ "MIT" ]
null
null
null
#Ref: Sreenivas Sarwar Anik import tensorflow as tf IMG_WIDTH = 128 IMG_HEIGHT = 128 IMG_CHANNELS = 3 #Build the model inputs = tf.keras.layers.Input((IMG_HEIGHT, IMG_WIDTH, IMG_CHANNELS)) s = tf.keras.layers.Lambda(lambda x: x / 255)(inputs) #Contraction path c1 = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(s) c1 = tf.keras.layers.Dropout(0.1)(c1) c1 = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c1) p1 = tf.keras.layers.MaxPooling2D((2, 2))(c1) c2 = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p1) c2 = tf.keras.layers.Dropout(0.1)(c2) c2 = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c2) p2 = tf.keras.layers.MaxPooling2D((2, 2))(c2) c3 = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p2) c3 = tf.keras.layers.Dropout(0.2)(c3) c3 = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c3) p3 = tf.keras.layers.MaxPooling2D((2, 2))(c3) c4 = tf.keras.layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p3) c4 = tf.keras.layers.Dropout(0.2)(c4) c4 = tf.keras.layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c4) p4 = tf.keras.layers.MaxPooling2D(pool_size=(2, 2))(c4) c5 = tf.keras.layers.Conv2D(256, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(p4) c5 = tf.keras.layers.Dropout(0.3)(c5) c5 = tf.keras.layers.Conv2D(256, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c5) #Expansive path u6 = tf.keras.layers.Conv2DTranspose(128, (2, 2), strides=(2, 2), padding='same')(c5) u6 = tf.keras.layers.concatenate([u6, c4]) c6 = tf.keras.layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u6) c6 = tf.keras.layers.Dropout(0.2)(c6) c6 = tf.keras.layers.Conv2D(128, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c6) u7 = tf.keras.layers.Conv2DTranspose(64, (2, 2), strides=(2, 2), padding='same')(c6) u7 = tf.keras.layers.concatenate([u7, c3]) c7 = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u7) c7 = tf.keras.layers.Dropout(0.2)(c7) c7 = tf.keras.layers.Conv2D(64, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c7) u8 = tf.keras.layers.Conv2DTranspose(32, (2, 2), strides=(2, 2), padding='same')(c7) u8 = tf.keras.layers.concatenate([u8, c2]) c8 = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u8) c8 = tf.keras.layers.Dropout(0.1)(c8) c8 = tf.keras.layers.Conv2D(32, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c8) u9 = tf.keras.layers.Conv2DTranspose(16, (2, 2), strides=(2, 2), padding='same')(c8) u9 = tf.keras.layers.concatenate([u9, c1], axis=3) c9 = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(u9) c9 = tf.keras.layers.Dropout(0.1)(c9) c9 = tf.keras.layers.Conv2D(16, (3, 3), activation='relu', kernel_initializer='he_normal', padding='same')(c9) outputs = tf.keras.layers.Conv2D(1, (1, 1), activation='sigmoid')(c9) model = tf.keras.Model(inputs=[inputs], outputs=[outputs]) model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']) model.summary()
51.271429
111
0.702981
573
3,589
4.326353
0.139616
0.12142
0.22025
0.145623
0.735781
0.727309
0.623639
0.546995
0.546995
0.546995
0
0.076876
0.086654
3,589
69
112
52.014493
0.679378
0.019783
0
0
0
0
0.102477
0
0
0
0
0
0
1
0
false
0
0.020408
0
0.020408
0
0
0
0
null
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1f40ffee827017dc3b519698a90c6adfba3b8067
1,441
py
Python
LDA/LDA_TrainAndTest.py
chazingtheinfinite/panacea
398ecad294e7993a502ce0d6d938cf3e4848e7a4
[ "MIT" ]
null
null
null
LDA/LDA_TrainAndTest.py
chazingtheinfinite/panacea
398ecad294e7993a502ce0d6d938cf3e4848e7a4
[ "MIT" ]
null
null
null
LDA/LDA_TrainAndTest.py
chazingtheinfinite/panacea
398ecad294e7993a502ce0d6d938cf3e4848e7a4
[ "MIT" ]
null
null
null
#!/usr/bin/python from nltk.tokenize import RegexpTokenizer from stop_words import get_stop_words from nltk.stem.porter import PorterStemmer from gensim import corpora, models import gensim # MIMIC-III Connection Imports import numpy as np import pandas as pd import matplotlib.pyplot as plt import psycopg2 # ---------------------------- # Setup some Global Variables VERBOSE = True #STEP 1 :: Preparing the connection to the dataset... # Set the database connection information sqluser = 'postgres' dbname = 'mimic' schema_name = 'mimiciii' # Connect to postgres with a copy of the MIMIC-III database con = psycopg2.connect(dbname=dbname, user=sqluser) # the below statement is prepended to queries to ensure they select from the right schema query_schema = 'set search_path to ' + schema_name + ';' if VERBOSE: print "Setup Complete!" # STEP 2 & 3 :: Creating the Tokenizer and Porter Stemmer tokenizer = RegexpTokenizer(r'\w+') # create English stop words list en_stop = get_stop_words('en') if VERBOSE: print en_stop # Create p_stemmer of class PorterStemmer p_stemmer = PorterStemmer() # Step 4 :: Grabbing the data! # Pull all clinical notes from the MIMIC-II dataset treating each one as a document query = query_schema + """ SELECT subject_id, text FROM noteevents LIMIT 1000 """ df = pd.read_sql_query(query, con) df.head() # Print and example to validate #print df[0:1].text.values[0] print df.at[0, 'text']
22.169231
89
0.743928
214
1,441
4.929907
0.53271
0.034123
0.022749
0
0
0
0
0
0
0
0
0.011542
0.158223
1,441
64
90
22.515625
0.858203
0.442054
0
0
0
0
0.149235
0
0
0
0
0
0
0
null
null
0
0.321429
null
null
0.107143
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
1f5f9e4154e2266e854000a4693aeb417226c1e6
250
py
Python
2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/02-Data-Types-and-Variables/01_Lab/04_Convert-Meters-to-Kilometers.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/02-Data-Types-and-Variables/01_Lab/04_Convert-Meters-to-Kilometers.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
2-Python-Fundamentals (Jan 2021)/Course-Exercises-and-Exams/02-Data-Types-and-Variables/01_Lab/04_Convert-Meters-to-Kilometers.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
# 4. Convert Meters to Kilometers # You will be given an integer that will be distance in meters. # Write a program that converts meters to kilometers formatted to the second decimal point. meters = int(input()) km = meters/1000 print(f'{km:.2f}')
27.777778
91
0.744
41
250
4.536585
0.731707
0.086022
0.193548
0
0
0
0
0
0
0
0
0.028986
0.172
250
9
92
27.777778
0.869565
0.732
0
0
0
0
0.125
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1f6a7a2d75a7baa07b5ae17d3ea8ffa4d4c4b76c
984
py
Python
bin/SchemaUpgrade/versions/0ac155cc2d5e_version_0_63_001.py
karlam123/DBImport
ebaf3f909841276d289bfb2f6eec0ecafa8395cf
[ "Apache-2.0" ]
10
2019-05-22T04:17:02.000Z
2021-12-05T16:54:08.000Z
bin/SchemaUpgrade/versions/0ac155cc2d5e_version_0_63_001.py
karlam123/DBImport
ebaf3f909841276d289bfb2f6eec0ecafa8395cf
[ "Apache-2.0" ]
73
2019-05-22T04:19:24.000Z
2022-01-18T05:09:26.000Z
bin/SchemaUpgrade/versions/0ac155cc2d5e_version_0_63_001.py
BerryOsterlund/DBImport
aa5f4599834985266fc0bf211f9bb8b348f6ae8e
[ "Apache-2.0" ]
5
2020-05-19T23:46:56.000Z
2021-11-12T12:02:37.000Z
"""Version 0.63.001 Revision ID: 0ac155cc2d5e Revises: 6a9d20321d65 Create Date: 2019-10-18 11:26:19.828818 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql from sqlalchemy import Enum # revision identifiers, used by Alembic. revision = '0ac155cc2d5e' down_revision = '6a9d20321d65' branch_labels = None depends_on = None def upgrade(): op.add_column('dbimport_instances', sa.Column('sync_credentials', mysql.TINYINT(display_width=4), server_default=sa.text("'0'"), nullable=False, comment='0 = Credentials wont be synced, 1 = The credentials information will be synced to the other cluster')) op.add_column('import_columns', sa.Column('sqoop_column_type_override', sa.String(length=256), nullable=True, comment='Set the --map-column-java field to a fixed value and not calculated by DBImport')) def downgrade(): op.drop_column('dbimport_instances', 'sync_credentials') op.drop_column('import_columns', 'sqoop_column_type_override')
35.142857
257
0.781504
142
984
5.267606
0.598592
0.037433
0.029412
0.061497
0
0
0
0
0
0
0
0.071672
0.106707
984
27
258
36.444444
0.779295
0.147358
0
0
0
0
0.425301
0.062651
0
0
0
0
0
1
0.142857
false
0
0.571429
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
1f6c88f4e9c96f4717fe688110848ffbc3598d64
1,021
py
Python
bevrand.playlistapi/api/tests/test_config.py
fossabot/bevrand
cc444c6ac9e0f2838d4bc862cd2932babc77de78
[ "MIT" ]
null
null
null
bevrand.playlistapi/api/tests/test_config.py
fossabot/bevrand
cc444c6ac9e0f2838d4bc862cd2932babc77de78
[ "MIT" ]
null
null
null
bevrand.playlistapi/api/tests/test_config.py
fossabot/bevrand
cc444c6ac9e0f2838d4bc862cd2932babc77de78
[ "MIT" ]
null
null
null
import unittest from flask import current_app from flask_testing import TestCase from api import create_app app = create_app() class TestDevelopmentConfig(TestCase): def create_app(self): app.config.from_object('api.config.Development') return app def test_app_is_development(self): assert app.config['DEBUG'] == True assert app.config['CONNECTION'] == 'mongodb://0.0.0.0:27017' class TestTestingConfig(TestCase): def create_app(self): app.config.from_object('api.config.Test') return app def test_app_is_testing(self): assert app.config['DEBUG'] == True assert app.config['TESTING'] == True assert app.config['CONNECTION'] == 'mongodb://0.0.0.0:27017' class TestProductionConfig(TestCase): def create_app(self): app.config.from_object('api.config.Production') return app def test_app_is_production(self): assert app.config['DEBUG'] == False assert app.config['TESTING'] == False
24.902439
68
0.67287
131
1,021
5.099237
0.236641
0.134731
0.157186
0.08982
0.613772
0.577844
0.483533
0.483533
0.483533
0.383234
0
0.022277
0.208619
1,021
40
69
25.525
0.804455
0
0
0.37037
0
0
0.149853
0.087169
0
0
0
0
0.259259
1
0.222222
false
0
0.148148
0
0.592593
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
2f0c19bc30a23bd0977698233afd100363f156e0
899
py
Python
keywords/__init__.py
wqzhou0208/MacacaLibrary
b478d1e957bb68c5c48b0e100806f5d2f857cf5c
[ "MIT" ]
5
2017-06-07T04:01:49.000Z
2017-11-10T09:12:41.000Z
keywords/__init__.py
weiquzwq/MacacaLibrary
b478d1e957bb68c5c48b0e100806f5d2f857cf5c
[ "MIT" ]
2
2018-03-05T10:42:33.000Z
2019-02-24T04:40:56.000Z
keywords/__init__.py
weiquzwq/MacacaLibrary
b478d1e957bb68c5c48b0e100806f5d2f857cf5c
[ "MIT" ]
7
2017-05-26T12:40:06.000Z
2017-09-14T10:03:28.000Z
# -*- coding: utf-8 -*- from _logging import _LoggingKeywords from _runonfailure import _RunOnFailureKeywords from _element import _ElementKeywords from _screenshot import _ScreenshotKeywords from _applicationmanagement import _ApplicationManagementKeywords from _waiting import _WaitingKeywords from _touch import _TouchKeywords from _keyevent import _KeyeventKeywords from _android_utils import _AndroidUtilsKeywords from _mobilekeywords import _MobileKeywords from _browsermanagement import _BrowserManagementKeywords __all__ = ["_LoggingKeywords", "_RunOnFailureKeywords", "_ElementKeywords", "_ScreenshotKeywords", "_ApplicationManagementKeywords", "_WaitingKeywords", "_TouchKeywords", "_KeyeventKeywords", "_AndroidUtilsKeywords", "_MobileKeywords", "_BrowserManagementKeywords"]
34.576923
65
0.757508
60
899
10.716667
0.466667
0
0
0
0
0
0
0
0
0
0
0.001379
0.193548
899
25
66
35.96
0.885517
0.023359
0
0
0
0
0.240868
0.111872
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
2f12bbc164f5e70518d63b3af5392d71881ca66c
285
py
Python
nrftool/command/erase.py
pauloborges/nrftool
885581a672ec766aab59e488a14b40ac24d7a968
[ "MIT" ]
7
2015-08-22T20:41:02.000Z
2021-10-17T04:46:53.000Z
nrftool/command/erase.py
pauloborges/nrftool
885581a672ec766aab59e488a14b40ac24d7a968
[ "MIT" ]
null
null
null
nrftool/command/erase.py
pauloborges/nrftool
885581a672ec766aab59e488a14b40ac24d7a968
[ "MIT" ]
3
2015-07-10T19:38:46.000Z
2016-06-20T09:10:23.000Z
# coding: utf-8 """ Copyright (c) 2014 Paulo Sérgio Borges de Oliveira Filho Check LICENSE for details. """ from .jlink import ExecJLinkScriptCommand class Erase(ExecJLinkScriptCommand): SCRIPT = "erase.jlink" def execute(self): return super(Erase, self).execute(self.SCRIPT)
17.8125
56
0.750877
36
285
5.944444
0.777778
0.102804
0
0
0
0
0
0
0
0
0
0.020492
0.14386
285
15
57
19
0.856557
0.347368
0
0
0
0
0.061798
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
2f132521974265224986ba2b07f414e6a45fe0ec
1,491
py
Python
archived-files/obsoleted/py2/lang_features/nonlocal.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
archived-files/obsoleted/py2/lang_features/nonlocal.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
archived-files/obsoleted/py2/lang_features/nonlocal.py
jameszhan/notes-ml
c633d04e5443eab71bc3b27fff89d57b89d1786c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # python 2.x 不支持 nonlocal def counter(init): nonlocal = {'v': init} def inc(): nonlocal['v'] += 1 print 'inc.locals: {0}'.format(locals()) return nonlocal['v'] print 'counter.locals: {0}'.format(locals()) return inc c = counter(0) c2 = counter(10) for _ in range(10): print 'c = {0}, c2 = {1}'.format(c(), c2()) def counter2(init): def inc(): inc.v += 1 print 'inc.locals: {0}'.format(locals()) return inc.v inc.v = init print 'counter2.locals: {0}'.format(locals()) return inc c = counter2(0) c2 = counter2(10) for _ in range(10): print 'c = {0}, c2 = {1}'.format(c(), c2()) def counter3(init): class nonlocal: v = init def inc(): nonlocal.v += 1 print 'inc.locals: {0}'.format(locals()) return nonlocal.v print 'counter3.locals: {0}'.format(locals()) return inc c = counter3(0) c2 = counter3(10) for _ in range(10): print 'c = {0}, c2 = {1}'.format(c(), c2()) class Nonlocals(object): def __init__(self, **kwargs): self.__dict__.update(kwargs) def counter4(init): nonlocals = Nonlocals(v=init) def inc(): nonlocals.v += 1 print 'inc.locals: {0}'.format(locals()) return nonlocals.v print 'counter4.locals: {0}'.format(locals()) return inc c = counter4(0) c2 = counter4(10) for _ in range(10): print 'c = {0}, c2 = {1}'.format(c(), c2())
17.137931
49
0.547284
205
1,491
3.921951
0.170732
0.069652
0.129353
0.189055
0.595771
0.595771
0.59204
0.447761
0.447761
0.360697
0
0.06044
0.267606
1,491
86
50
17.337209
0.675824
0.030181
0
0.384615
0
0
0.145631
0
0
0
0
0
0
0
null
null
0
0
null
null
0.230769
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
2f22e716d035597e37d36e08b629dc9f44b826df
1,425
py
Python
tests/test_dialogue.py
rotdrop/rhasspy-hermes
ab822ad954da6da90368b65d72ed7e53694f085f
[ "MIT" ]
1
2020-07-11T19:25:32.000Z
2020-07-11T19:25:32.000Z
tests/test_dialogue.py
rotdrop/rhasspy-hermes
ab822ad954da6da90368b65d72ed7e53694f085f
[ "MIT" ]
15
2019-12-31T13:19:25.000Z
2022-01-17T17:40:13.000Z
tests/test_dialogue.py
rotdrop/rhasspy-hermes
ab822ad954da6da90368b65d72ed7e53694f085f
[ "MIT" ]
8
2019-12-31T10:40:53.000Z
2020-12-04T18:48:08.000Z
"""Tests for rhasspyhermes.dialogue""" from rhasspyhermes.dialogue import ( DialogueContinueSession, DialogueEndSession, DialogueIntentNotRecognized, DialogueSessionEnded, DialogueSessionQueued, DialogueSessionStarted, DialogueStartSession, ) def test_dialogue_continue_session(): """Test DialogueContinueSession.""" assert DialogueContinueSession.topic() == "hermes/dialogueManager/continueSession" def test_dialogue_end_session(): """Test DialogueEndSession.""" assert DialogueEndSession.topic() == "hermes/dialogueManager/endSession" def test_dialogue_intent_not_recognized(): """Test DialogueIntentNotRecognized.""" assert ( DialogueIntentNotRecognized.topic() == "hermes/dialogueManager/intentNotRecognized" ) def test_dialogue_session_ended(): """Test DialogueSessionEnded.""" assert DialogueSessionEnded.topic() == "hermes/dialogueManager/sessionEnded" def test_dialogue_session_queued(): """Test DialogueSessionQueued.""" assert DialogueSessionQueued.topic() == "hermes/dialogueManager/sessionQueued" def test_dialogue_session_started(): """Test DialogueSessionStarted.""" assert DialogueSessionStarted.topic() == "hermes/dialogueManager/sessionStarted" def test_dialogue_start_session(): """Test DialogueStartSession.""" assert DialogueStartSession.topic() == "hermes/dialogueManager/startSession"
29.081633
86
0.759298
107
1,425
9.906542
0.336449
0.046226
0.099057
0.062264
0
0
0
0
0
0
0
0
0.134035
1,425
48
87
29.6875
0.858995
0.162807
0
0
0
0
0.222222
0.222222
0
0
0
0
0.269231
1
0.269231
true
0
0.038462
0
0.307692
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
2
2f41a6a4945b13d380d3d1af2ebc9fead93c0902
175
py
Python
Dataset/chat_to_dataset.py
ikergarcia1996/QuestionClustering
9e4ea7a0a02eaaa0a53fa34f77614977046ee8b0
[ "MIT" ]
16
2019-03-30T11:28:53.000Z
2019-06-22T00:44:28.000Z
Dataset/chat_to_dataset.py
ikergarcia1996/QuestionClustering
9e4ea7a0a02eaaa0a53fa34f77614977046ee8b0
[ "MIT" ]
null
null
null
Dataset/chat_to_dataset.py
ikergarcia1996/QuestionClustering
9e4ea7a0a02eaaa0a53fa34f77614977046ee8b0
[ "MIT" ]
2
2019-04-02T13:38:52.000Z
2020-08-11T03:35:51.000Z
questions = open('youtube_chat.txt', 'r').readlines() with open('question_dataset.txt', 'w+') as file: for s in set(questions): print(s.rstrip()[1:-1], file=file)
35
53
0.64
27
175
4.074074
0.740741
0
0
0
0
0
0
0
0
0
0
0.013514
0.154286
175
4
54
43.75
0.72973
0
0
0
0
0
0.222857
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2f4396835302be47d372de62a940b12267ecbb1e
830
py
Python
src/OTLMOW/OTLModel/Classes/WVConsole.py
davidvlaminck/OTLClassPython
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
2
2022-02-01T08:58:11.000Z
2022-02-08T13:35:17.000Z
src/OTLMOW/OTLModel/Classes/WVConsole.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
src/OTLMOW/OTLModel/Classes/WVConsole.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
# coding=utf-8 from OTLMOW.OTLModel.Classes.AIMNaamObject import AIMNaamObject from OTLMOW.GeometrieArtefact.PuntGeometrie import PuntGeometrie # Generated with OTLClassCreator. To modify: extend, do not edit class WVConsole(AIMNaamObject, PuntGeometrie): """Een draagconstructie voor het ophangen van openbare wegverlichting op plaatsen waar er geen ruimte is voor verlichtingsmasten in de grond. Typisch wordt in dergelijke gevallen de draagconstructie met het verlichtingstoestel op hoogte bevestigd aan een gebouw of een andere constructie naast de weg.""" typeURI = 'https://wegenenverkeer.data.vlaanderen.be/ns/onderdeel#WVConsole' """De URI van het object volgens https://www.w3.org/2001/XMLSchema#anyURI.""" def __init__(self): AIMNaamObject.__init__(self) PuntGeometrie.__init__(self)
51.875
308
0.787952
103
830
6.23301
0.737864
0.037383
0
0
0
0
0
0
0
0
0
0.008403
0.139759
830
15
309
55.333333
0.890756
0.451807
0
0
1
0
0.172507
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
2f43f3e7a550d9fcae934c31772ff71870daa474
53
py
Python
django_smart_settings/test/sample.py
ertwroc/django-smart-settings
350e9868ac7431169926932a3672e86d326ed16e
[ "Apache-2.0" ]
null
null
null
django_smart_settings/test/sample.py
ertwroc/django-smart-settings
350e9868ac7431169926932a3672e86d326ed16e
[ "Apache-2.0" ]
null
null
null
django_smart_settings/test/sample.py
ertwroc/django-smart-settings
350e9868ac7431169926932a3672e86d326ed16e
[ "Apache-2.0" ]
null
null
null
A = 'avalue' B = { 'key' : 'value' } C = ['array']
7.571429
16
0.415094
7
53
3.142857
1
0
0
0
0
0
0
0
0
0
0
0
0.283019
53
7
17
7.571429
0.578947
0
0
0
0
0
0.351852
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2f4c60f6103d7a290e84e6c8d0f692cf74cd4f47
203
py
Python
version_differ/common.py
nasifimtiazohi/version-differ-old
244c376e6b08cb7c7e92a3cc6003e57e5980f3c2
[ "MIT" ]
3
2021-11-13T09:04:21.000Z
2022-02-02T09:25:53.000Z
version_differ/common.py
nasifimtiazohi/version-differ-old
244c376e6b08cb7c7e92a3cc6003e57e5980f3c2
[ "MIT" ]
13
2021-09-07T16:35:57.000Z
2022-03-28T22:18:55.000Z
version_differ/common.py
nasifimtiazohi/version-differ-old
244c376e6b08cb7c7e92a3cc6003e57e5980f3c2
[ "MIT" ]
1
2021-11-13T09:04:25.000Z
2021-11-13T09:04:25.000Z
CARGO = "Cargo" COMPOSER = "Composer" GO = "Go" MAVEN = "Maven" NPM = "npm" NUGET = "NuGet" PYPI = PIP = "pip" RUBYGEMS = "RubyGems" ecosystems = [CARGO, COMPOSER, GO, MAVEN, NPM, NUGET, PYPI, RUBYGEMS]
20.3
69
0.650246
26
203
5.076923
0.384615
0.19697
0
0
0
0
0
0
0
0
0
0
0.17734
203
9
70
22.555556
0.790419
0
0
0
0
0
0.192118
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2f81d2af68eb4fe07b398827e538b731810b3cbe
1,342
py
Python
advent/days/day05/test_day.py
RuedigerLudwig/advent2021
ce069d485bb34b4752ec4e89f195f7cc8cf084cc
[ "Unlicense" ]
null
null
null
advent/days/day05/test_day.py
RuedigerLudwig/advent2021
ce069d485bb34b4752ec4e89f195f7cc8cf084cc
[ "Unlicense" ]
null
null
null
advent/days/day05/test_day.py
RuedigerLudwig/advent2021
ce069d485bb34b4752ec4e89f195f7cc8cf084cc
[ "Unlicense" ]
null
null
null
from advent.common import utils from . import day from .vent import Vent def test_parse(): input = "0,9 -> 5,9" expected = Vent((0, 9), (5, 9)) result = Vent.from_string(input) assert result == expected def test_vertical(): input = "0,9 -> 5,9" expected = True result = Vent.from_string(input).is_vertical() assert result == expected def test_horizontal(): input = "2,2 -> 2,1" expected = True result = Vent.from_string(input).is_horizontal() assert result == expected def test_straight_points(): input = Vent.from_string("2,2 -> 2,1") expected = {(2, 1), (2, 2)} result = input.all_points() assert result == expected def test_intersections(): input = [Vent.from_string("0,9 -> 5,9"), Vent.from_string("0,9 -> 2,9")] expected = 3 result = day.count_intersections(iter(input)) assert result == expected def test_part1(): data = utils.read_data(5, "test01.txt") expected = 5 result = day.part1(data) assert result == expected def test_diagonal(): input = Vent.from_string("9,7 -> 7,9") expected = {(9, 7), (8, 8), (7, 9)} result = input.all_points() assert result == expected def test_part2(): data = utils.read_data(5, "test01.txt") expected = 12 result = day.part2(data) assert result == expected
22
76
0.622951
190
1,342
4.278947
0.215789
0.068881
0.196802
0.198032
0.591636
0.408364
0.297663
0.297663
0.115621
0
0
0.054002
0.227273
1,342
60
77
22.366667
0.72999
0
0
0.372093
0
0
0.067064
0
0
0
0
0
0.186047
1
0.186047
false
0
0.069767
0
0.255814
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2f8d4fd55d5590a634ed97bd8acc4f049b8757e7
1,676
py
Python
7.0/asm.py
vezril/IEEEXtreme
b0952cbe4a47a00f387f9f849bd6b632d6507126
[ "MIT" ]
null
null
null
7.0/asm.py
vezril/IEEEXtreme
b0952cbe4a47a00f387f9f849bd6b632d6507126
[ "MIT" ]
null
null
null
7.0/asm.py
vezril/IEEEXtreme
b0952cbe4a47a00f387f9f849bd6b632d6507126
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' 0104 89C3 MOV BX,AX 0106 D1E8 SHR AX,1 010C 91 XCHG AX,CX 010D BA0102 MOV DX,0201 0110 D1C2 ROL DX,1 0112 D1EB SHR BX,1 0114 D1D1 RCL CX,1 0116 38DE CMP DH,BL 0118 7EF6 JLE 0110 011A 38D3 CMP BL,DL 011C 7E06 JLE 0124 0120 D1D1 RCL CX,1 0124 28D4 SUB AH,DL 0126 4A DEC DX 0127 20D0 AND AL,DL 0129 21F2 AND DX,SI 012B 38C2 CMP DL,AL 012D 18E3 SBB BL,AH ''' global carry = 0 global equal = 0 global less = 0 global greater = 0 global ax = 0 global bx = 0 global cx = 0 global dx = 0 def and8(x,y) x1 = ('00000000' + x)[-8:] y1 = ('00000000' + y)[-8:] return (x1 & y1) def sbb(x): pass def dec(x): return x-=1 def sub(x,y): bl = x-y def jmp1(): bx = ax ax = shr(ax) cx = ax dx = 201 dx = rol(dx) bx = shr(bx) cx = rcl(cx) carry = 0 cmp8() if less == 1 or equal == 1: jmp1() cmp8() if less == 1 or equal == 1: jmp2() cx = rcl(cx) jmp2() def jmp2(): sub() dx = dec(dx) #and #and cmp8() def cmp8(x, y): if x == y: equal = 1 if x < y: less = 1 def ror(x): pass def rol(x): return (x[-1] + x)[0:-1] def shr(x): return x >> 1 def rcl(x): c = carry carry = x[0] return (x+c)[1:] if __name__ == "__main__": ax = int(raw_input()) jmp1()
15.961905
38
0.429594
251
1,676
2.832669
0.36255
0.068917
0.033755
0.037975
0.087201
0.053446
0.053446
0
0
0
0
0.20442
0.460024
1,676
104
39
16.115385
0.581215
0.015513
0
0.22807
0
0
0.024717
0
0
0
0
0
0
0
null
null
0.035088
0
null
null
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
2f9ff3a641caa7bc7f2e7d9a457836693a0f9bc7
164
py
Python
letsadd/rando/urls.py
richardcornish/addtwo
7ac3845718b67e4bad7894f92b36d468b43fd350
[ "BSD-3-Clause" ]
1
2021-05-22T21:52:35.000Z
2021-05-22T21:52:35.000Z
letsadd/rando/urls.py
richardcornish/letsadd
7ac3845718b67e4bad7894f92b36d468b43fd350
[ "BSD-3-Clause" ]
null
null
null
letsadd/rando/urls.py
richardcornish/letsadd
7ac3845718b67e4bad7894f92b36d468b43fd350
[ "BSD-3-Clause" ]
null
null
null
from django.urls import path from .views import RandomFormView app_name = 'rando' urlpatterns = [ path('', RandomFormView.as_view(), name='random_form'), ]
14.909091
59
0.713415
20
164
5.7
0.75
0
0
0
0
0
0
0
0
0
0
0
0.158537
164
10
60
16.4
0.826087
0
0
0
0
0
0.097561
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
85db8a48afd37cc9937ed00b6445db6e1de1b6f2
511
py
Python
test/test_misra_guideline.py
rschuitema/misra
e451f7b08f41bc2e0234897bfcce84a71d2c2af9
[ "MIT" ]
null
null
null
test/test_misra_guideline.py
rschuitema/misra
e451f7b08f41bc2e0234897bfcce84a71d2c2af9
[ "MIT" ]
1
2018-04-02T07:46:26.000Z
2018-04-02T07:46:26.000Z
test/test_misra_guideline.py
rschuitema/misra
e451f7b08f41bc2e0234897bfcce84a71d2c2af9
[ "MIT" ]
null
null
null
import pytest from src.misra.violation import Violation from src.misra.misra_guideline import MisraGuideline def test_creation(): the_guideline = MisraGuideline(("id-123", "classification", "category", "group", "description")) assert "id-123" == the_guideline.get_id() assert "classification" == the_guideline.get_classification() assert "category" == the_guideline.get_category() assert "group" == the_guideline.get_group() assert "description" == the_guideline.get_description()
36.5
100
0.741683
58
511
6.310345
0.344828
0.196721
0.204918
0
0
0
0
0
0
0
0
0.013575
0.135029
511
13
101
39.307692
0.81448
0
0
0
0
0
0.172211
0
0
0
0
0
0.5
1
0.1
false
0
0.3
0
0.4
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
2
85e98d2509655a65d752df7245a09e3876e7deb8
1,282
py
Python
ifx_db/tests/test_144_BindParamInsertStmtPARAM_FILE.py
ifxdb/PythonIfxDB
a9c64e8ade1329b7102f0bf356c0e4b6d230ca95
[ "Apache-2.0" ]
3
2017-05-01T10:22:27.000Z
2021-12-29T11:02:34.000Z
ifx_db/tests/test_144_BindParamInsertStmtPARAM_FILE.py
ifxdb/PythonIfxDB
a9c64e8ade1329b7102f0bf356c0e4b6d230ca95
[ "Apache-2.0" ]
1
2020-01-07T12:56:26.000Z
2020-01-07T12:56:26.000Z
ifx_db/tests/test_144_BindParamInsertStmtPARAM_FILE.py
ifxdb/PythonIfxDB
a9c64e8ade1329b7102f0bf356c0e4b6d230ca95
[ "Apache-2.0" ]
3
2017-05-10T16:03:25.000Z
2018-03-19T14:59:41.000Z
# # Licensed Materials - Property of IBM # # (c) Copyright IBM Corp. 2007-2008 # import unittest, sys, os import ifx_db import config from testfunctions import IfxDbTestFunctions class IfxDbTestCase(unittest.TestCase): def test_144_BindParamInsertStmtPARAM_FILE(self): obj = IfxDbTestFunctions() obj.assert_expect(self.run_test_144) def run_test_144(self): conn = ifx_db.connect(config.ConnStr, config.user, config.password) if conn: # Drop the test table, in case it exists drop = 'DROP TABLE pictures' try: result = ifx_db.exec_immediate(conn, drop) except: pass # Create the test table create = 'CREATE TABLE pictures (id INTEGER, picture BLOB)' result = ifx_db.exec_immediate(conn, create) stmt = ifx_db.prepare(conn, "INSERT INTO pictures VALUES (0, ?)") picture = os.path.dirname(os.path.abspath(__file__)) + "/pic1.jpg" rc = ifx_db.bind_param(stmt, 1, picture, ifx_db.SQL_PARAM_INPUT, ifx_db.SQL_BINARY) rc = ifx_db.execute(stmt) num = ifx_db.num_rows(stmt) print num else: print "Connection failed." #__END__ #__LUW_EXPECTED__ #1 #__ZOS_EXPECTED__ #1 #__SYSTEMI_EXPECTED__ #1 #__IDS_EXPECTED__ #1
23.309091
89
0.670827
168
1,282
4.803571
0.529762
0.061958
0.024783
0.037175
0.069393
0.069393
0
0
0
0
0
0.024515
0.236349
1,282
54
90
23.740741
0.799796
0.164587
0
0
0
0
0.121673
0
0
0
0
0
0.038462
0
null
null
0.076923
0.153846
null
null
0.076923
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
85f378f1b94d01bd3a18f6a2783dd1f461d0878a
1,071
py
Python
book_center/tests/bc_auth/forms/test_sign_in_form.py
geodimitrov/Python-Web-Framework-SoftUni
06b7e11aee0024a564d1b266d5ed6271351ac116
[ "MIT" ]
null
null
null
book_center/tests/bc_auth/forms/test_sign_in_form.py
geodimitrov/Python-Web-Framework-SoftUni
06b7e11aee0024a564d1b266d5ed6271351ac116
[ "MIT" ]
null
null
null
book_center/tests/bc_auth/forms/test_sign_in_form.py
geodimitrov/Python-Web-Framework-SoftUni
06b7e11aee0024a564d1b266d5ed6271351ac116
[ "MIT" ]
null
null
null
from book_center.bc_auth.forms.auth import SignInForm from django.test import TestCase class SignInFormTests(TestCase): # Test labels def test_sign_in_form_username_label__expect_empty_label(self): expected_label = '' form = SignInForm() self.assertEqual(expected_label, form['username'].label) def test_sign_in_form_password_label__expect_empty_label(self): expected_label = '' form = SignInForm() self.assertEqual(expected_label, form['password'].label) # Test placeholders def test_sign_ip_form_username_placeholder__expect_correct_placeholder(self): expected_placeholder = 'Enter your username' form = SignInForm() self.assertEqual(expected_placeholder, form.fields['username'].widget.attrs['placeholder']) def test_sign_in_form_password_placeholder__expect_correct_placeholder(self): expected_placeholder = 'Enter your password' form = SignInForm() self.assertEqual(expected_placeholder, form.fields['password'].widget.attrs['placeholder'])
39.666667
99
0.74043
121
1,071
6.173554
0.289256
0.037483
0.058902
0.155288
0.649264
0.626506
0.559572
0.559572
0.404284
0.2249
0
0
0.172736
1,071
27
100
39.666667
0.843115
0.027078
0
0.315789
0
0
0.088462
0
0
0
0
0
0.210526
1
0.210526
false
0.263158
0.105263
0
0.368421
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
c81ec286c949c6a6f394f61c6594aebfe7aeed8c
975
py
Python
Program Internship and files/original(2).py
Mohit-Sharma1/ml_by_ittools
33762fdaaa3e853d97749e4e5e326fd86ee03930
[ "MIT" ]
null
null
null
Program Internship and files/original(2).py
Mohit-Sharma1/ml_by_ittools
33762fdaaa3e853d97749e4e5e326fd86ee03930
[ "MIT" ]
null
null
null
Program Internship and files/original(2).py
Mohit-Sharma1/ml_by_ittools
33762fdaaa3e853d97749e4e5e326fd86ee03930
[ "MIT" ]
null
null
null
import numpy as np x = np.array([100,400,500,600]) #each member 'a' y = np.array([10,15,20,25]) #each member 'b' condition = np.array([True,True,False,False]) #each menber cond #use loops indirectly to perform this z = [a if cond else b for a,cond,b in zip(x,condition,y)] print z #np.where(#condition,#value for yes, #value for No) z2 = np.where(condition,x,y) print z2 z3 = np.where(x>0,0,1) print z3 #Standard functions of numpy #sum x print x.sum() n = np.array([[1,2],[3,4]]) #column sum print n.sum(0) print x.mean() print x.std() print x.var() #logical operations - and / or operations condition2 = np.array([True,False,True]) print condition2.any() #or operator print condition2.all() #and operator #sorting in numpy arrays unsorted_array = np.array([1,2,8,10,7,3]) unsorted_array.sort() print unsorted_array arr2 = np.array(['solid','solid','solid','liquid','liquid','gas','gas']) print np.unique(arr2) print np.in1d(['solid','gas','plasma'],arr2)
19.117647
72
0.687179
176
975
3.789773
0.443182
0.073463
0.032984
0.026987
0
0
0
0
0
0
0
0.054502
0.134359
975
51
73
19.117647
0.735782
0.26359
0
0
0
0
0.066761
0
0
0
0
0
0
0
null
null
0
0.04
null
null
0.52
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
2
c832ecc66fbe29b0140cf78e68ee95c29307c08e
386
py
Python
wallfly/admin.py
trcm/sacerdos
f54daf38fdfe285c34ce64741f884ac54a5ec034
[ "MIT" ]
null
null
null
wallfly/admin.py
trcm/sacerdos
f54daf38fdfe285c34ce64741f884ac54a5ec034
[ "MIT" ]
null
null
null
wallfly/admin.py
trcm/sacerdos
f54daf38fdfe285c34ce64741f884ac54a5ec034
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.models import User from wallfly.models import * # Regsiter the models for use with with django backend admin during development admin.site.register(Property) admin.site.register(Owner) admin.site.register(Agent) admin.site.register(Tenant) admin.site.register(Issue) admin.site.register(Financial) admin.site.register(WFUser)
27.571429
79
0.821244
56
386
5.660714
0.464286
0.198738
0.375394
0
0
0
0
0
0
0
0
0
0.088083
386
13
80
29.692308
0.900568
0.199482
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.3
0
0.3
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
c83680a605582ceb27654727b676e95650da11b4
1,436
py
Python
TxfmPlotHelper.py
dtauxe/hackcu-ad
7870b741244f8f04cd87ae79896ef825425dcbd1
[ "Apache-2.0" ]
null
null
null
TxfmPlotHelper.py
dtauxe/hackcu-ad
7870b741244f8f04cd87ae79896ef825425dcbd1
[ "Apache-2.0" ]
null
null
null
TxfmPlotHelper.py
dtauxe/hackcu-ad
7870b741244f8f04cd87ae79896ef825425dcbd1
[ "Apache-2.0" ]
null
null
null
# Used by the window to calculate the transforms import sympy as sp import numpy as np from numpy import e, pi from sympy.integrals import laplace_transform as Laplace from sympy.integrals import fourier_transform as Fourier from sympy.integrals.transforms import inverse_laplace_transform as InvLaplace from sympy.integrals.transforms import inverse_fourier_transform as InvFourier from sympy import plot, Heaviside, sin, cos, tan, exp, re, im, symbols u = Heaviside I = j = 1j t, n, s, z, w = symbols("t n s z w") class TxfmPlotHelper: def __init__(self): pass # Calculate a transform def Transform(self, expr, txfm): if (txfm == 'Z'): raise Exception x = 'w' if txfm.endswith('Fourier') else 's' # Transformed unit f = eval(expr, globals(), locals()) #print(f) if (txfm == 'Fourier' or txfm == 'Laplace'): F = eval(txfm+"(f, t, "+x+")", globals(), locals()) elif (txfm == 'InvFourier' or txfm == 'InvLaplace'): F = eval(txfm+"(f, "+x+", t)", globals(), locals()) return (f, F) # Generate a sympy plot def plot(self, expr, x): #f = eval(expr, globals(), locals()) #if (x == 'w'): # Fourier - convert from f to w #f = f(w/(2*pi)) #expr = str(expr).replace('w', "w/(2*pi)") return eval("plot("+str(expr)+",("+x+",-2*pi, 2*pi), show=False)", globals(), locals())
35.02439
95
0.600975
202
1,436
4.222772
0.361386
0.052755
0.084408
0.056272
0.159437
0.096131
0
0
0
0
0
0.004638
0.249304
1,436
40
96
35.9
0.786642
0.174791
0
0
0
0
0.086882
0
0
0
0
0
0
1
0.115385
false
0.038462
0.307692
0.038462
0.538462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
c84339496f8d045308cea97223826457efec711a
1,729
py
Python
blog/models.py
yangfeiffei/Dsystem
8c4b677151d8a9777c265b0a8744c068d122e780
[ "MIT" ]
null
null
null
blog/models.py
yangfeiffei/Dsystem
8c4b677151d8a9777c265b0a8744c068d122e780
[ "MIT" ]
null
null
null
blog/models.py
yangfeiffei/Dsystem
8c4b677151d8a9777c265b0a8744c068d122e780
[ "MIT" ]
null
null
null
from django.db import models from django.core.urlresolvers import reverse from user.models import UserProfile # Create your models here. class Tag(models.Model): name = models.CharField('标签',max_length=32) brief = models.CharField('摘要',max_length=32,blank=True,null=True) def __str__(self): return self.name class Articles(models.Model): title = models.CharField('文章',max_length=128,) # author = models.ForeignKey(UserProfile,verbose_name='作者',blank=True) content = models.TextField('内容') mod_time = models.DateField('修改时间',auto_now=True) type_choice = ( (1,'原创'), (2,'转载'), (3,'翻译'), ) article_type = models.IntegerField('文章类型',choices=type_choice,default=1) tags = models.ManyToManyField('Tag',blank=True) def get_absolute_url(self): return reverse('blog:detail', kwargs={'article_id': self.pk}) class Meta: ordering = ['-mod_time'] def __str__(self): return self.title class Comments(models.Model): vister = models.CharField('访客', max_length=16) pub_time = models.DateTimeField(u'评论时间', auto_now_add=True) title = models.CharField('标题',max_length=128, blank=True, null=True) upper_comments = models.ForeignKey('self', related_name="lower_comments", blank=True,null=True) article = models.ForeignKey(Articles) content = models.TextField('评论') user_agent = models.CharField('浏览器',max_length=16,blank=True,null=True) remote_host = models.CharField('客户端地址',max_length=16,blank=True,null=True) def __str__(self): return '%s-%s comment at %s' % (self.id, self.vister, self.pub_time)
32.018519
78
0.653557
222
1,729
4.918919
0.427928
0.096154
0.059524
0.077839
0.118132
0.096154
0.096154
0.06044
0
0
0
0.014652
0.210526
1,729
53
79
32.622642
0.785348
0.053788
0
0.078947
0
0
0.067402
0
0
0
0
0
0
1
0.105263
false
0
0.078947
0.105263
0.815789
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
2
c849ffbad2b9fe0912643bea7a2d0482ae14a28d
152
py
Python
03-Lists_Basics/Exercises/2-Multiples_List.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
03-Lists_Basics/Exercises/2-Multiples_List.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
03-Lists_Basics/Exercises/2-Multiples_List.py
eclipse-ib/Software-University-Fundamentals_Module
994ef75c70d1bae8e615dbb789aeffd6e0a42c34
[ "MIT" ]
null
null
null
factor = int(input()) count = int(input()) list = [] counter = factor for _ in range(count): list.append(counter) counter += factor print(list)
16.888889
24
0.651316
20
152
4.9
0.55
0.163265
0
0
0
0
0
0
0
0
0
0
0.190789
152
9
25
16.888889
0.796748
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.125
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c84b994aebb6a3e0662cdb88d0d8f6328c4bc503
253
py
Python
v0/urls.py
DhruvThakker/registration_api
d070b47d0ab1a902937c01a0677729c1f9fd970e
[ "MIT" ]
1
2018-03-28T19:04:00.000Z
2018-03-28T19:04:00.000Z
v0/urls.py
DhruvThakker/registration_api
d070b47d0ab1a902937c01a0677729c1f9fd970e
[ "MIT" ]
null
null
null
v0/urls.py
DhruvThakker/registration_api
d070b47d0ab1a902937c01a0677729c1f9fd970e
[ "MIT" ]
2
2018-04-05T18:10:07.000Z
2019-07-16T18:11:14.000Z
from django.conf.urls import url, include import views from rest_framework.routers import DefaultRouter user_router = DefaultRouter() user_router.register(r'register', views.UserViewSet) urlpatterns = [ url(r'^', include(user_router.urls)), ]
16.866667
52
0.766798
32
253
5.9375
0.5625
0.157895
0.242105
0
0
0
0
0
0
0
0
0
0.126482
253
14
53
18.071429
0.859729
0
0
0
0
0
0.035573
0
0
0
0
0
0
1
0
false
0
0.375
0
0.375
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
c84bd153f83eefdb1376c664afc2d47722a4fadf
140
py
Python
drf_compose/__init__.py
IamAbbey/drf_compose
a4eb3d6bcf6f807dd37eba9d88b02d2e7167901f
[ "BSD-3-Clause" ]
4
2021-11-08T09:02:24.000Z
2022-01-23T19:41:27.000Z
drf_compose/__init__.py
IamAbbey/drf_compose
a4eb3d6bcf6f807dd37eba9d88b02d2e7167901f
[ "BSD-3-Clause" ]
null
null
null
drf_compose/__init__.py
IamAbbey/drf_compose
a4eb3d6bcf6f807dd37eba9d88b02d2e7167901f
[ "BSD-3-Clause" ]
null
null
null
"""Top-level package for DRF Compose.""" __author__ = """Sotunde Abiodun""" __email__ = "sotundeabiodun00@gmail.com" __version__ = "0.1.1"
23.333333
40
0.707143
17
140
5.117647
0.941176
0
0
0
0
0
0
0
0
0
0
0.040323
0.114286
140
5
41
28
0.66129
0.242857
0
0
0
0
0.46
0.26
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c8528d2b8969eb7118b24f1f570e7e54a6dd3df0
294
py
Python
src/sima/workflow/iteration.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/workflow/iteration.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/workflow/iteration.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# Generated with Iteration # from enum import Enum from enum import auto class Iteration(Enum): """""" COLUMN = auto() GRID = auto() def label(self): if self == Iteration.COLUMN: return "Column" if self == Iteration.GRID: return "Grid"
19.6
36
0.571429
33
294
5.090909
0.454545
0.095238
0.166667
0
0
0
0
0
0
0
0
0
0.319728
294
15
37
19.6
0.84
0.081633
0
0
1
0
0.038314
0
0
0
0
0
0
1
0.1
false
0
0.2
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
c08d819f06fa471f47d2757b3401deb38afb6467
4,037
py
Python
tests/tests_forms.py
yohanlebret/wagtail-snapshotpublisher
cec9276c81c9ac91950b4d621868cc16e8935d28
[ "MIT" ]
null
null
null
tests/tests_forms.py
yohanlebret/wagtail-snapshotpublisher
cec9276c81c9ac91950b4d621868cc16e8935d28
[ "MIT" ]
1
2020-04-20T14:08:21.000Z
2020-04-20T14:08:25.000Z
tests/tests_forms.py
yohanlebret/wagtail-snapshotpublisher
cec9276c81c9ac91950b4d621868cc16e8935d28
[ "MIT" ]
1
2021-04-11T07:36:35.000Z
2021-04-11T07:36:35.000Z
""" .. module:: tests.tests_forms """ import json from django.db.models import Q from django.utils import timezone from wagtail.tests.utils import WagtailPageTests from wagtailsnapshotpublisher.models import WSSPContentRelease from wagtailsnapshotpublisher.forms import PublishReleaseForm, FrozenReleasesForm class PublishReleaseFormTests(WagtailPageTests): """ FormTests """ def setUp(self): """ setUp """ # def test_form_clean(self): # """ test_form_clean """ # # publish_datetime in the future # data = { # 'publish_type': 'schedule_date', # 'publish_datetime': timezone.now() + timezone.timedelta(hours=1), # } # form = PublishReleaseForm(data) # self.assertTrue(form.is_valid()) # # publish_datetime in the past # data = { # 'publish_type': 'schedule_date', # 'publish_datetime': timezone.now() - timezone.timedelta(hours=1), # } # form = PublishReleaseForm(data) # self.assertFalse(form.is_valid()) # publish_datetime_errors = json.loads(form['publish_datetime'].errors.as_json()) # publish_datetime_error_codes = [publish_datetime_error['code'] \ # for publish_datetime_error in publish_datetime_errors] # self.assertTrue('publish_datetime_in_future' in publish_datetime_error_codes) class FrozenReleasesFormTests(WagtailPageTests): """ FrozenReleasesFormTests """ def setUp(self): """ setUp """ # def test_form_init(self): # """ test_form_init """ # # Create ContentRelease1 # content_release1 = WSSPContentRelease( # title='release1', # site_code='site1', # version='0.1', # status=1, # publish_datetime=timezone.now() - timezone.timedelta(hours=1), # ) # content_release1.save() # # one live release # data = {} # form = FrozenReleasesForm('site1', data) # self.assertTrue(form.fields['releases'].queryset is None) # # Create ContentRelease # content_release2 = WSSPContentRelease( # title='release2', # site_code='site1', # version='0.2', # status=1, # publish_datetime=timezone.now() + timezone.timedelta(hours=1), # ) # content_release2.save() # content_release3 = WSSPContentRelease( # title='release3', # site_code='site1', # version='0.3', # status=0, # publish_datetime=timezone.now() + timezone.timedelta(hours=2), # ) # content_release3.save() # content_release4 = WSSPContentRelease( # title='release4', # site_code='site2', # version='0.4', # status=1, # publish_datetime=timezone.now() + timezone.timedelta(hours=2), # ) # content_release4.save() # content_release5 = WSSPContentRelease( # title='release5', # site_code='site1', # version='0.5', # status=1, # publish_datetime=timezone.now() - timezone.timedelta(hours=2), # ) # content_release5.save() # content_release6 = WSSPContentRelease( # title='release6', # site_code='site1', # version='0.6', # status=1, # publish_datetime=timezone.now() - timezone.timedelta(hours=2), # ) # content_release6.save() # data = {} # form = FrozenReleasesForm('site1', data) # self.assertEqual(form.fields['releases'].queryset.count(), 2) # self.assertQuerysetEqual(form.fields['releases'].queryset, # WSSPContentRelease.objects.filter( # Q(title='release1') | Q(title='release2') # ).order_by('publish_datetime', 'title'), transform=lambda x: x)
32.821138
98
0.568739
357
4,037
6.252101
0.263305
0.127688
0.082437
0.09319
0.391577
0.321237
0.28629
0.261201
0.261201
0.236111
0
0.019971
0.305425
4,037
122
99
33.090164
0.776034
0.753282
0
0.2
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.6
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
c0af01a88762602be23077b3d63a7bd805ddfc59
537
py
Python
insta/migrations/0003_auto_20200106_0720.py
Josephat-n/instagram
a06ba7d928ba15d55cc4264788f6d34e294ab60a
[ "MIT" ]
null
null
null
insta/migrations/0003_auto_20200106_0720.py
Josephat-n/instagram
a06ba7d928ba15d55cc4264788f6d34e294ab60a
[ "MIT" ]
6
2020-01-06T11:14:10.000Z
2021-06-10T19:38:25.000Z
insta/migrations/0003_auto_20200106_0720.py
josphat-njoroge/instagram
a06ba7d928ba15d55cc4264788f6d34e294ab60a
[ "MIT" ]
null
null
null
# Generated by Django 2.1 on 2020-01-06 04:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('insta', '0002_profile_name'), ] operations = [ migrations.AlterField( model_name='image', name='image_comments', field=models.TextField(blank=True), ), migrations.AlterField( model_name='image', name='image_likes', field=models.IntegerField(blank=True), ), ]
22.375
50
0.573557
53
537
5.698113
0.641509
0.119205
0.165563
0.192053
0.284768
0.284768
0.284768
0
0
0
0
0.04878
0.312849
537
23
51
23.347826
0.769648
0.080074
0
0.352941
1
0
0.115854
0
0
0
0
0
0
1
0
false
0
0.058824
0
0.235294
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c0df2543d5d861e0f6becebd30b8cbebc327b4f7
337
py
Python
Droplets/constants.py
hopehhchen/Droplets
69b94f013dd0fcc14335fdc073ae5513b7a25319
[ "MIT" ]
null
null
null
Droplets/constants.py
hopehhchen/Droplets
69b94f013dd0fcc14335fdc073ae5513b7a25319
[ "MIT" ]
null
null
null
Droplets/constants.py
hopehhchen/Droplets
69b94f013dd0fcc14335fdc073ae5513b7a25319
[ "MIT" ]
null
null
null
# import numpy as np # import astropy.units as u import astropy.constants as c # import styles # distances to the regions distances = {'L1688': 137.3*u.pc, 'B18': 135.*u.pc, 'L1688_e': 6.*u.pc, 'B18_e': 20.*u.pc} # mass of the NH3 molecule and an average particle in ISM. mass = {'NH3': 17.031*u.u, 'average': 2.37*u.u}
19.823529
58
0.64095
62
337
3.451613
0.596774
0.056075
0.056075
0
0
0
0
0
0
0
0
0.118519
0.198813
337
16
59
21.0625
0.674074
0.240356
0
0
0
0
0.12
0
0
0
0
0
0
1
0
false
0
0.571429
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
c0e9daeabbb72cfb73f0f0816340f1baea913435
692
py
Python
project/__init__.py
ThoNogueira/githubstars
afeb44e88797cb79a3fc47756bfaf15c5c731f1b
[ "MIT" ]
null
null
null
project/__init__.py
ThoNogueira/githubstars
afeb44e88797cb79a3fc47756bfaf15c5c731f1b
[ "MIT" ]
null
null
null
project/__init__.py
ThoNogueira/githubstars
afeb44e88797cb79a3fc47756bfaf15c5c731f1b
[ "MIT" ]
null
null
null
import os from flask import Flask, request, jsonify, abort from flask_cors import CORS from flask_babel import Babel from flask_migrate import Migrate, MigrateCommand from flask_sqlalchemy import SQLAlchemy from flask_marshmallow import Marshmallow from project.config import configure_app db = SQLAlchemy() ma = Marshmallow() def create_app(): app = Flask(__name__) configure_app(app) babel = Babel(app) db.init_app(app) ma.init_app(app) migrate = Migrate(app, db) CORS(app) from project.models import sqlalchemy app.register_blueprint(sqlalchemy.bp) from project.controllers import routes app.register_blueprint(routes.bp) return app
21.625
49
0.757225
93
692
5.462366
0.322581
0.106299
0.03937
0
0
0
0
0
0
0
0
0
0.179191
692
31
50
22.322581
0.894366
0
0
0
0
0
0
0
0
0
0
0
0
1
0.043478
false
0
0.434783
0
0.521739
0.086957
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
c0ec71567a85d080cc20c94d761ba730ea2b065c
342
py
Python
make/makeUtils/fileSystemUtils.py
BellCrow/DoctorDll
81604f0172a8b6c59206f87297bf37820bbb5dac
[ "CC0-1.0" ]
1
2020-06-04T13:47:27.000Z
2020-06-04T13:47:27.000Z
make/makeUtils/fileSystemUtils.py
BellCrow/DoctorDll
81604f0172a8b6c59206f87297bf37820bbb5dac
[ "CC0-1.0" ]
null
null
null
make/makeUtils/fileSystemUtils.py
BellCrow/DoctorDll
81604f0172a8b6c59206f87297bf37820bbb5dac
[ "CC0-1.0" ]
null
null
null
import sys import os ''' Returns the base of the whole repository structure. From there you can make easy path concatenation. ''' def getWorkspaceBaseFolder(): pathOfThisScriptFile = os.path.abspath(__file__) workSpaceFolderPath = os.path.abspath(os.path.join(pathOfThisScriptFile, "../../..")) return workSpaceFolderPath
34.2
104
0.739766
37
342
6.72973
0.702703
0.072289
0.104418
0
0
0
0
0
0
0
0
0
0.154971
342
10
105
34.2
0.861592
0
0
0
0
0
0.034632
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
c0f3dd09aa1c04b4fb4fa72d9df3692c35b5d061
478
py
Python
reconchess/__init__.py
ginop/reconchess
2b70ae34f84778d8c16873fd44a6eaafe9bf5ab5
[ "BSD-3-Clause" ]
null
null
null
reconchess/__init__.py
ginop/reconchess
2b70ae34f84778d8c16873fd44a6eaafe9bf5ab5
[ "BSD-3-Clause" ]
2
2019-10-24T17:28:56.000Z
2019-10-25T14:51:58.000Z
reconchess/__init__.py
ginop/reconchess
2b70ae34f84778d8c16873fd44a6eaafe9bf5ab5
[ "BSD-3-Clause" ]
null
null
null
__version__ = '1.6.4' from .game import Game, LocalGame, RemoteGame from .player import Player, load_player from .types import * from .utilities import is_illegal_castle, is_psuedo_legal_castle, ChessJSONEncoder, ChessJSONDecoder from .play import play_local_game, play_remote_game, play_turn, notify_opponent_move_results, play_sense, play_move, \ play_multiprocessing_local_game from .history import Turn, GameHistory, GameHistoryEncoder, GameHistoryDecoder import chess
43.454545
118
0.83682
63
478
5.984127
0.555556
0.047745
0
0
0
0
0
0
0
0
0
0.007009
0.104603
478
10
119
47.8
0.873832
0
0
0
0
0
0.01046
0
0
0
0
0
0
1
0
false
0
0.777778
0
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
c0f55a23358cd58ff329451b09a03f777cb038d9
294
py
Python
openlobby/core/migrations/0003_auto_20180117_0030.py
openlobby/openlobby-server
b7a1a2b73e903c4da57970926844b0639dce5aae
[ "MIT" ]
7
2017-11-23T15:24:50.000Z
2018-11-29T21:47:55.000Z
openlobby/core/migrations/0003_auto_20180117_0030.py
openlobby/openlobby-server
b7a1a2b73e903c4da57970926844b0639dce5aae
[ "MIT" ]
20
2018-02-21T22:25:42.000Z
2020-06-05T17:22:36.000Z
openlobby/core/migrations/0003_auto_20180117_0030.py
openlobby/openlobby-server
b7a1a2b73e903c4da57970926844b0639dce5aae
[ "MIT" ]
3
2018-03-08T10:05:01.000Z
2018-08-16T14:36:28.000Z
# Generated by Django 2.0.1 on 2018-01-16 23:30 from django.db import migrations class Migration(migrations.Migration): dependencies = [("core", "0002_auto_20180116_2349")] operations = [ migrations.RenameField(model_name="user", old_name="extras", new_name="extra") ]
22.615385
86
0.70068
39
294
5.128205
0.846154
0
0
0
0
0
0
0
0
0
0
0.127049
0.170068
294
12
87
24.5
0.692623
0.153061
0
0
1
0
0.17004
0.093117
0
0
0
0
0
1
0
false
0
0.166667
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
c0f62e29585896002a003413fa739ef6985b375b
682
py
Python
examples/server/reactivestreams.py
Pennsieve/streaming-agent
5e29fbdf318b9f4464029074768e4b717c9350fd
[ "Apache-2.0" ]
null
null
null
examples/server/reactivestreams.py
Pennsieve/streaming-agent
5e29fbdf318b9f4464029074768e4b717c9350fd
[ "Apache-2.0" ]
null
null
null
examples/server/reactivestreams.py
Pennsieve/streaming-agent
5e29fbdf318b9f4464029074768e4b717c9350fd
[ "Apache-2.0" ]
null
null
null
# # Reactive Streams Implementation # from abc import ABC, abstractmethod class Subscription(ABC): @abstractmethod def request(self, N: int): ... @abstractmethod def cancel(self): ... class Subscriber: @abstractmethod def onSubscribe(self, subscription: Subscription): ... @abstractmethod def onNext(self, item): ... @abstractmethod def onError(self, error: Exception): ... @abstractmethod def onComplete(self): ... class Publisher(ABC): @abstractmethod def subscribe(self, subscriber: Subscriber): ... @abstractmethod def request(self, N): ...
16.634146
54
0.599707
58
682
7.051724
0.431034
0.332518
0.0978
0.136919
0.141809
0
0
0
0
0
0
0
0.28739
682
40
55
17.05
0.841564
0.045455
0
0.571429
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.035714
0
0.428571
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
23994ddfcdca32bf125359b2ae31deab6e9af9f9
328
py
Python
dqn/q_prediction.py
cnnr-adams/DQN-TicTacToe
cf171357c0a0dc1b2877317d79046ddffe9d60c6
[ "MIT" ]
null
null
null
dqn/q_prediction.py
cnnr-adams/DQN-TicTacToe
cf171357c0a0dc1b2877317d79046ddffe9d60c6
[ "MIT" ]
null
null
null
dqn/q_prediction.py
cnnr-adams/DQN-TicTacToe
cf171357c0a0dc1b2877317d79046ddffe9d60c6
[ "MIT" ]
null
null
null
import numpy as np class QPredictor(): def __init__(self, model): self.model = model def predict(self, state): pred = self.model.predict(np.array([state]))[0] return pred def train(self, train_X, train_Y): self.model.fit(np.array(train_X), np.array(train_Y), epochs=1, verbose=0)
23.428571
81
0.631098
49
328
4.061224
0.469388
0.180905
0.120603
0
0
0
0
0
0
0
0
0.011905
0.231707
328
13
82
25.230769
0.777778
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.111111
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
23b298ea09c883005474e654c05898df69f10155
891
py
Python
src/lesson4/interfaces.py
kpnr/otus_2109_hkm_mail_ru
80966fdc8afd02bfd85091147cc09735a3aeeb9c
[ "Unlicense" ]
null
null
null
src/lesson4/interfaces.py
kpnr/otus_2109_hkm_mail_ru
80966fdc8afd02bfd85091147cc09735a3aeeb9c
[ "Unlicense" ]
null
null
null
src/lesson4/interfaces.py
kpnr/otus_2109_hkm_mail_ru
80966fdc8afd02bfd85091147cc09735a3aeeb9c
[ "Unlicense" ]
null
null
null
"""Интерфейсы для работы с Аттракторами""" from abc import abstractmethod from typing import Optional from lesson3.interfaces import GenericCommand, GenericInterface class CommandQueueInterface: """Очередь команд Аттрактора""" @abstractmethod def read(self) -> GenericCommand: """Получение команды из очереди с ожиданием""" @abstractmethod def write(self, command: GenericCommand) -> None: """Постановка команды в очередь выполнения""" class AttractorInterface: """Интерфейс Аттрактора""" @abstractmethod def start(self, queue: CommandQueueInterface) -> None: """Привязка очереди команд к Аттрактору""" @abstractmethod def queue_get(self) -> CommandQueueInterface: """Получение очереди команд, к которой привязан Аттрактор""" class StopCommandLoop(StopIteration): """Исключение для остановки аттрактора"""
27.84375
68
0.720539
83
891
7.722892
0.590361
0.106084
0.084243
0
0
0
0
0
0
0
0
0.001377
0.185185
891
32
69
27.84375
0.881543
0.327722
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.214286
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
23b95ed88c35ab232a8d0b2f35722f75fe829365
542
py
Python
api/flags/migrations/0010_flaggingrule_excluded_values.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
api/flags/migrations/0010_flaggingrule_excluded_values.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
api/flags/migrations/0010_flaggingrule_excluded_values.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
null
null
null
# Generated by Django 2.2.16 on 2021-01-04 15:57 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("flags", "0009_auto_20201229_1454"), ] operations = [ migrations.AddField( model_name="flaggingrule", name="excluded_values", field=django.contrib.postgres.fields.ArrayField( base_field=models.TextField(default=""), default=list, size=None ), ), ]
24.636364
80
0.621771
57
542
5.807018
0.736842
0.07855
0.126888
0.163142
0
0
0
0
0
0
0
0.080605
0.267528
542
21
81
25.809524
0.753149
0.084871
0
0.133333
1
0
0.111336
0.046559
0
0
0
0
0
1
0
false
0
0.133333
0
0.333333
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
23cfa52ec2a41ff55ca0b9dd0d77da9b79b6614c
2,483
py
Python
router_stats.py
Blindstealer/routerStats
3f0a652d4fd5d4d9721a2250af728da8e15b7e1e
[ "MIT" ]
2
2016-05-13T19:06:50.000Z
2016-06-12T16:58:36.000Z
router_stats.py
Blindstealer/routerStats
3f0a652d4fd5d4d9721a2250af728da8e15b7e1e
[ "MIT" ]
1
2016-05-31T08:24:12.000Z
2016-06-01T20:04:02.000Z
router_stats.py
Blindstealer/routerStats
3f0a652d4fd5d4d9721a2250af728da8e15b7e1e
[ "MIT" ]
null
null
null
#!/usr/bin/python # Simple script that allows to interrogate a router via telnet and gather info about its connection status # Currently supported models: # - TP Link WD8970v1 import sys import telnetlib import time import os import getopt ## Constants ## LOG_FILE_HEADER = "Timestamp\tDW rate\tUP rate\tSNR DW\tSNR UP\n" LOG_FILE="./connection.txt" # TODO add to config file LOGGED_VALUES= {'downstreamCurrRate': 1, 'upstreamCurrRate':2, 'downstreamNoiseMargin':3, 'upstreamNoiseMargin':4} DELIMITER = "\t" ## Variables ## global host global user global password global config_file def retrieve_config(config_file): global host global user global password if os.path.isfile(config_file): with open(config_file) as f: for line in f: arr_line = line.split("=") if len(arr_line) == 2: key = arr_line[0]; value = arr_line[1] if key == "host": host = value; elif key == "user": user = value elif key == "password": password = value; else: exit def retrieve_info(): tn = telnetlib.Telnet(host) tn.read_until("username:") tn.write(user.strip() + "\n") tn.read_until("password:") tn.write(password.strip() + "\n") tn.write("adsl show info\n") tn.write("logout\n") tn_output = tn.read_all() arr_tn_output = tn_output.split("\n") result_row = [time.time(), "-", "-", "-", "-"] for row in arr_tn_output: element = row.split("="); if len(element) == 2: key = element[0]; value = element[1]; if key in LOGGED_VALUES: result_row[LOGGED_VALUES[key]] = value.replace("\r", ""); return result_row; def dump_to_file(result_row): write_header = False if not os.path.exists(LOG_FILE): write_header = True f = open(LOG_FILE, "a") if write_header: f.write(LOG_FILE_HEADER) f.write(str(result_row[0]) + DELIMITER + str(result_row[1]) + DELIMITER + str(result_row[2]) + DELIMITER + str(result_row[3]) + DELIMITER + str(result_row[4]) + "\n") f.close def usage(): pass #TODO def main(): global host global user global password host = "localhost" config_file="./default.cfg" try: opts, args = getopt.getopt(sys.argv[1:], "hf:", ["help"]) except getopt.GetoptError as err: print str(err) usage() sys.exit(2) for o, a in opts: if o in ("-h", "--help"): usage() sys.exit() elif o in ("-f"): config_file = a else: assert False, "unhandled option" retrieve_config(config_file); dump_to_file(retrieve_info()) if __name__ == "__main__": main()
23.647619
167
0.665727
367
2,483
4.346049
0.359673
0.050784
0.037618
0.052665
0.06395
0.06395
0
0
0
0
0
0.010859
0.184052
2,483
104
168
23.875
0.776407
0.087797
0
0.151163
0
0
0.122168
0.009329
0
0
0
0.009615
0.011628
0
null
null
0.093023
0.05814
null
null
0.011628
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
2
23d05143a1ce69fc1aef9c9be51b356a381274fb
509
py
Python
tests/test_class_children.py
FermiParadox/ipy_student_exercises
9e74406255c01672516b2d06dabc6e5f6822e3ad
[ "MIT" ]
null
null
null
tests/test_class_children.py
FermiParadox/ipy_student_exercises
9e74406255c01672516b2d06dabc6e5f6822e3ad
[ "MIT" ]
null
null
null
tests/test_class_children.py
FermiParadox/ipy_student_exercises
9e74406255c01672516b2d06dabc6e5f6822e3ad
[ "MIT" ]
null
null
null
from unittest import TestCase from arbitrary_pieces import class_children class Test_class_children(TestCase): def test_class_children(self): class A(object): pass class B1(A): pass class B2(A): pass class C(B1): pass class MultInhC(B1, B2): pass self.assertSetEqual({B1, B2, C, MultInhC}, class_children(A)) def test_parent_is_not_child(self): class A(object): pass class B1(A): pass self.assertNotIn(A, class_children(A))
25.45
69
0.654224
71
509
4.521127
0.338028
0.202492
0.105919
0.099688
0.199377
0.199377
0.199377
0.199377
0.199377
0
0
0.020997
0.251473
509
19
70
26.789474
0.821522
0
0
0.285714
0
0
0
0
0
0
0
0
0.142857
1
0.142857
false
0.5
0.142857
0
0.857143
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
23d490bfdb604bd12fe6294c034672b22095a40d
1,929
py
Python
app/models.py
Mzazi25/60Seconds
b836b4de5f32fbf20e7334f08a42d02ba380f541
[ "Unlicense" ]
null
null
null
app/models.py
Mzazi25/60Seconds
b836b4de5f32fbf20e7334f08a42d02ba380f541
[ "Unlicense" ]
null
null
null
app/models.py
Mzazi25/60Seconds
b836b4de5f32fbf20e7334f08a42d02ba380f541
[ "Unlicense" ]
null
null
null
from . import db from werkzeug.security import generate_password_hash,check_password_hash from flask_login import UserMixin from . import login_manager from datetime import datetime @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(UserMixin,db.Model): __tablename__ = 'users' id = db.Column(db.Integer,primary_key = True) username = db.Column(db.String(255),index = True) email = db.Column(db.String(255),unique = True,index = True) password_hash = db.Column(db.String(255)) # liked = db.relationship('Review',backref = 'user',lazy = "dynamic") @property def password(self): raise AttributeError('You cannnot read the password attribute') @password.setter def password(self, password): self.password_hash = generate_password_hash(password) def verify_password(self,password): return check_password_hash(self.password_hash,password) def __repr__(self): return f'User {self.username}' class Pitch (db.Model): __tablename__= "pitchs" """ Added class for Pitches """ id = db.Column(db.Integer, primary_key=True, autoincrement = True) message = db.Column(db.String(), unique=False,nullable=False) category = db.Column(db.String(20),nullable=False) created_at = db.Column(db.DateTime(), default=datetime.utcnow(), nullable=False) user_id = db.Column(db.Integer,db.ForeignKey('users.id') ) likes = db.relationship('PostLike', backref='pitchs', lazy='dynamic') class PostLike(db.Model): __tablename__= 'post_like' id = db.Column(db.Integer, primary_key=True) users_id = db.Column(db.Integer,db.ForeignKey('users.id') ) pitch_id = db.Column(db.Integer,db.ForeignKey('pitchs.id') ) comment = db.Column(db.String(), unique=False, nullable=False) created = db.Column(db.DateTime(), default=datetime.utcnow(), nullable=False)
33.258621
84
0.706065
256
1,929
5.152344
0.304688
0.084913
0.106141
0.054587
0.346475
0.30326
0.295679
0.272176
0.136467
0
0
0.00682
0.163815
1,929
57
85
33.842105
0.810911
0.034733
0
0.051282
1
0
0.068719
0
0
0
0
0
0
1
0.128205
false
0.230769
0.128205
0.076923
0.871795
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
23f0c203989c1adbe331ead89a7ac917526875cf
15,085
py
Python
protocol/impl/facebook_publish_pb2.py
pymedia/pyspotify2
6c51c0f59d9cdf66e9bcb26e092f0709b6b0969d
[ "Apache-2.0" ]
10
2017-08-23T16:31:01.000Z
2021-02-25T09:31:42.000Z
protocol/impl/facebook_publish_pb2.py
ykelle/spotipy-control
f2f25b86b4e40f5769fb7b74f6dabcfa19cbc2ff
[ "Apache-2.0" ]
1
2017-09-02T10:43:05.000Z
2017-10-12T00:26:24.000Z
protocol/impl/facebook_publish_pb2.py
ykelle/spotipy-control
f2f25b86b4e40f5769fb7b74f6dabcfa19cbc2ff
[ "Apache-2.0" ]
2
2019-10-17T19:02:53.000Z
2020-01-03T00:08:24.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: facebook-publish.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='facebook-publish.proto', package='', syntax='proto2', serialized_pb=_b('\n\x16\x66\x61\x63\x65\x62ook-publish.proto\"7\n\nEventReply\x12\x0e\n\x06queued\x18\x01 \x01(\x05\x12\x19\n\x05retry\x18\x02 \x01(\x0b\x32\n.RetryInfo\"3\n\tRetryInfo\x12\x13\n\x0bretry_delay\x18\x01 \x01(\x05\x12\x11\n\tmax_retry\x18\x02 \x01(\x05\"%\n\x02Id\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x12\n\nstart_time\x18\x02 \x01(\x03\">\n\x05Start\x12\x0e\n\x06length\x18\x01 \x01(\x05\x12\x13\n\x0b\x63ontext_uri\x18\x02 \x01(\t\x12\x10\n\x08\x65nd_time\x18\x03 \x01(\x03\"\x18\n\x04Seek\x12\x10\n\x08\x65nd_time\x18\x01 \x01(\x03\"1\n\x05Pause\x12\x16\n\x0eseconds_played\x18\x01 \x01(\x05\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x03\"2\n\x06Resume\x12\x16\n\x0eseconds_played\x18\x01 \x01(\x05\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x03\"/\n\x03\x45nd\x12\x16\n\x0eseconds_played\x18\x01 \x01(\x05\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x03\"\x87\x01\n\x05\x45vent\x12\x0f\n\x02id\x18\x01 \x01(\x0b\x32\x03.Id\x12\x15\n\x05start\x18\x02 \x01(\x0b\x32\x06.Start\x12\x13\n\x04seek\x18\x03 \x01(\x0b\x32\x05.Seek\x12\x15\n\x05pause\x18\x04 \x01(\x0b\x32\x06.Pause\x12\x17\n\x06resume\x18\x05 \x01(\x0b\x32\x07.Resume\x12\x11\n\x03\x65nd\x18\x06 \x01(\x0b\x32\x04.End') ) _EVENTREPLY = _descriptor.Descriptor( name='EventReply', full_name='EventReply', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='queued', full_name='EventReply.queued', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='retry', full_name='EventReply.retry', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=26, serialized_end=81, ) _RETRYINFO = _descriptor.Descriptor( name='RetryInfo', full_name='RetryInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='retry_delay', full_name='RetryInfo.retry_delay', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='max_retry', full_name='RetryInfo.max_retry', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=83, serialized_end=134, ) _ID = _descriptor.Descriptor( name='Id', full_name='Id', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='uri', full_name='Id.uri', 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, options=None), _descriptor.FieldDescriptor( name='start_time', full_name='Id.start_time', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=136, serialized_end=173, ) _START = _descriptor.Descriptor( name='Start', full_name='Start', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='length', full_name='Start.length', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='context_uri', full_name='Start.context_uri', 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, options=None), _descriptor.FieldDescriptor( name='end_time', full_name='Start.end_time', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=175, serialized_end=237, ) _SEEK = _descriptor.Descriptor( name='Seek', full_name='Seek', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='end_time', full_name='Seek.end_time', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=239, serialized_end=263, ) _PAUSE = _descriptor.Descriptor( name='Pause', full_name='Pause', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='seconds_played', full_name='Pause.seconds_played', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='end_time', full_name='Pause.end_time', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=265, serialized_end=314, ) _RESUME = _descriptor.Descriptor( name='Resume', full_name='Resume', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='seconds_played', full_name='Resume.seconds_played', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='end_time', full_name='Resume.end_time', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=316, serialized_end=366, ) _END = _descriptor.Descriptor( name='End', full_name='End', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='seconds_played', full_name='End.seconds_played', index=0, number=1, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='end_time', full_name='End.end_time', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=368, serialized_end=415, ) _EVENT = _descriptor.Descriptor( name='Event', full_name='Event', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='id', full_name='Event.id', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='start', full_name='Event.start', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='seek', full_name='Event.seek', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='pause', full_name='Event.pause', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='resume', full_name='Event.resume', index=4, number=5, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='end', full_name='Event.end', index=5, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto2', extension_ranges=[], oneofs=[ ], serialized_start=418, serialized_end=553, ) _EVENTREPLY.fields_by_name['retry'].message_type = _RETRYINFO _EVENT.fields_by_name['id'].message_type = _ID _EVENT.fields_by_name['start'].message_type = _START _EVENT.fields_by_name['seek'].message_type = _SEEK _EVENT.fields_by_name['pause'].message_type = _PAUSE _EVENT.fields_by_name['resume'].message_type = _RESUME _EVENT.fields_by_name['end'].message_type = _END DESCRIPTOR.message_types_by_name['EventReply'] = _EVENTREPLY DESCRIPTOR.message_types_by_name['RetryInfo'] = _RETRYINFO DESCRIPTOR.message_types_by_name['Id'] = _ID DESCRIPTOR.message_types_by_name['Start'] = _START DESCRIPTOR.message_types_by_name['Seek'] = _SEEK DESCRIPTOR.message_types_by_name['Pause'] = _PAUSE DESCRIPTOR.message_types_by_name['Resume'] = _RESUME DESCRIPTOR.message_types_by_name['End'] = _END DESCRIPTOR.message_types_by_name['Event'] = _EVENT _sym_db.RegisterFileDescriptor(DESCRIPTOR) EventReply = _reflection.GeneratedProtocolMessageType('EventReply', (_message.Message,), dict( DESCRIPTOR = _EVENTREPLY, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:EventReply) )) _sym_db.RegisterMessage(EventReply) RetryInfo = _reflection.GeneratedProtocolMessageType('RetryInfo', (_message.Message,), dict( DESCRIPTOR = _RETRYINFO, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:RetryInfo) )) _sym_db.RegisterMessage(RetryInfo) Id = _reflection.GeneratedProtocolMessageType('Id', (_message.Message,), dict( DESCRIPTOR = _ID, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:Id) )) _sym_db.RegisterMessage(Id) Start = _reflection.GeneratedProtocolMessageType('Start', (_message.Message,), dict( DESCRIPTOR = _START, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:Start) )) _sym_db.RegisterMessage(Start) Seek = _reflection.GeneratedProtocolMessageType('Seek', (_message.Message,), dict( DESCRIPTOR = _SEEK, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:Seek) )) _sym_db.RegisterMessage(Seek) Pause = _reflection.GeneratedProtocolMessageType('Pause', (_message.Message,), dict( DESCRIPTOR = _PAUSE, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:Pause) )) _sym_db.RegisterMessage(Pause) Resume = _reflection.GeneratedProtocolMessageType('Resume', (_message.Message,), dict( DESCRIPTOR = _RESUME, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:Resume) )) _sym_db.RegisterMessage(Resume) End = _reflection.GeneratedProtocolMessageType('End', (_message.Message,), dict( DESCRIPTOR = _END, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:End) )) _sym_db.RegisterMessage(End) Event = _reflection.GeneratedProtocolMessageType('Event', (_message.Message,), dict( DESCRIPTOR = _EVENT, __module__ = 'facebook_publish_pb2' # @@protoc_insertion_point(class_scope:Event) )) _sym_db.RegisterMessage(Event) # @@protoc_insertion_point(module_scope)
31.427083
1,187
0.718794
1,985
15,085
5.165239
0.090176
0.058519
0.054423
0.034331
0.667122
0.626451
0.616405
0.610651
0.610651
0.56325
0
0.044774
0.145708
15,085
479
1,188
31.492693
0.750834
0.037123
0
0.665888
1
0.002336
0.147888
0.083178
0
0
0
0
0
1
0
false
0
0.014019
0
0.014019
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
23f70c332b231e9c6bc36cdf37ec4ff1b2f849ee
206
py
Python
contact/api_urls.py
dzejkobi/institution-comparisoner
3f7ff16bd2b5065a95607bf895c9d28f8e9182a4
[ "MIT" ]
null
null
null
contact/api_urls.py
dzejkobi/institution-comparisoner
3f7ff16bd2b5065a95607bf895c9d28f8e9182a4
[ "MIT" ]
null
null
null
contact/api_urls.py
dzejkobi/institution-comparisoner
3f7ff16bd2b5065a95607bf895c9d28f8e9182a4
[ "MIT" ]
null
null
null
from django.urls import path from .api_views import ContactMessageView urlpatterns = ( path( 'contact/message/', ContactMessageView.as_view(), name='contact-message' ), )
15.846154
41
0.645631
20
206
6.55
0.7
0.21374
0
0
0
0
0
0
0
0
0
0
0.252427
206
12
42
17.166667
0.850649
0
0
0
0
0
0.150485
0
0
0
0
0
0
1
0
false
0
0.222222
0
0.222222
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
23fdb9673a10de9f2256784bc4469726dc872b30
389
py
Python
src/release_changelog/__init__.py
djpugh/sphinx-gh-changelog
529b143ab2b1a8eff95d69a923c2e60b694cb58e
[ "MIT" ]
null
null
null
src/release_changelog/__init__.py
djpugh/sphinx-gh-changelog
529b143ab2b1a8eff95d69a923c2e60b694cb58e
[ "MIT" ]
1
2020-06-20T08:01:15.000Z
2020-07-27T07:23:48.000Z
src/release_changelog/__init__.py
djpugh/sphinx-gh-changelog
529b143ab2b1a8eff95d69a923c2e60b694cb58e
[ "MIT" ]
1
2020-06-25T12:36:50.000Z
2020-06-25T12:36:50.000Z
from typing import Any, Dict import sphinx from sphinx.application import Sphinx from release_changelog.core import Changelog from ._version import get_versions __version__ = get_versions()['version'] del get_versions def setup(app: Sphinx) -> Dict[str, Any]: app.add_directive('changelog', Changelog) return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
25.933333
78
0.781491
51
389
5.627451
0.509804
0.114983
0.111498
0
0
0
0
0
0
0
0
0
0.125964
389
14
79
27.785714
0.844118
0
0
0
0
0
0.105398
0
0
0
0
0
0
1
0.1
false
0
0.5
0
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
23ffcbd5544cd4c3eaeb91909ad33a9c46d69c48
507
py
Python
examples/sms_status.py
electrokean/messages-python-sdk
eb1f23b64a4917fe7fa3538da8f3cf5ea88c3bb5
[ "Apache-2.0" ]
null
null
null
examples/sms_status.py
electrokean/messages-python-sdk
eb1f23b64a4917fe7fa3538da8f3cf5ea88c3bb5
[ "Apache-2.0" ]
null
null
null
examples/sms_status.py
electrokean/messages-python-sdk
eb1f23b64a4917fe7fa3538da8f3cf5ea88c3bb5
[ "Apache-2.0" ]
null
null
null
# Configuration parameters and credentials from message_media_messages.message_media_messages_client import MessageMediaMessagesClient import sys import json auth_user_name = 'YOUR_API_KEY' # The username to use with basic authentication auth_password = 'YOUR_API_SECRET' # The password to use with basic authentication client = MessageMediaMessagesClient(auth_user_name, auth_password) messages_client = client.messages message_id = 'messageId' result = messages_client.get_message_status(message_id)
31.6875
91
0.850099
65
507
6.307692
0.507692
0.102439
0.097561
0.068293
0.136585
0
0
0
0
0
0
0
0.104536
507
15
92
33.8
0.903084
0.260355
0
0
0
0
0.097035
0
0
0
0
0
0
1
0
false
0.222222
0.333333
0
0.333333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
2
9b0b29a62d79deb8da81d74764952eedfad23b06
366
py
Python
templates/django_app_name/tests/factories.py
luiscberrocal/django_ansible_config
0eca2c7a7d7a515efbd143a7b33334f9a0c2f2c5
[ "MIT" ]
null
null
null
templates/django_app_name/tests/factories.py
luiscberrocal/django_ansible_config
0eca2c7a7d7a515efbd143a7b33334f9a0c2f2c5
[ "MIT" ]
8
2021-01-04T18:15:53.000Z
2021-03-14T13:53:31.000Z
templates/django_app_name/tests/factories.py
luiscberrocal/django_ansible_config
0eca2c7a7d7a515efbd143a7b33334f9a0c2f2c5
[ "MIT" ]
null
null
null
import string from decimal import Decimal from django.conf import settings from factory import Iterator, lazy_attribute from factory import LazyAttribute from factory import SubFactory from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyText from faker import Factory as FakerFactory from pytz import timezone faker = FakerFactory.create()
28.153846
45
0.855191
48
366
6.5
0.458333
0.176282
0.163462
0
0
0
0
0
0
0
0
0
0.122951
366
13
46
28.153846
0.971963
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.909091
0
0.909091
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
f1aa6382f0750f79457b8d8e4114d844354791db
148
py
Python
addition/apps.py
Shyamvegi/cloudSEK
1e6f1ded386b86f50e27be16e675988d57599bc2
[ "MIT" ]
null
null
null
addition/apps.py
Shyamvegi/cloudSEK
1e6f1ded386b86f50e27be16e675988d57599bc2
[ "MIT" ]
null
null
null
addition/apps.py
Shyamvegi/cloudSEK
1e6f1ded386b86f50e27be16e675988d57599bc2
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AdditionConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'addition'
21.142857
56
0.763514
17
148
6.529412
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.148649
148
6
57
24.666667
0.880952
0
0
0
0
0
0.25
0.195946
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
f1abe360b119e1cee174c1b8080c28fc992b01c2
533
py
Python
Dataset/Leetcode/test/101/585.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/test/101/585.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/test/101/585.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def issub(self, root1 ,root2): if root1==None and root2==None: return True if (root1==None and root2!=None) or (root1!=None and root2==None): return False if root1.val != root2.val: return False if self.issub(root1.left, root2.right)==False or self.issub(root1.right, root2.left)==False: return False return True def XXX(self, root): if root==None: return True return self.issub(root.left, root.right)
31.352941
100
0.58349
72
533
4.319444
0.263889
0.067524
0.115756
0.163987
0.254019
0.254019
0
0
0
0
0
0.037838
0.305816
533
16
101
33.3125
0.802703
0
0
0.357143
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
f1ba211c0957fdc216b0bc87e3ea9a59818015d4
597
py
Python
4/save1_passed.py
rayjustinhuang/BitesofPy
03b694c5259ff607621419d9677c5caff90a6057
[ "MIT" ]
null
null
null
4/save1_passed.py
rayjustinhuang/BitesofPy
03b694c5259ff607621419d9677c5caff90a6057
[ "MIT" ]
null
null
null
4/save1_passed.py
rayjustinhuang/BitesofPy
03b694c5259ff607621419d9677c5caff90a6057
[ "MIT" ]
null
null
null
import os from collections import Counter import urllib.request # prep tempfile = os.path.join('/tmp', 'feed') urllib.request.urlretrieve('http://bit.ly/2zD8d8b', tempfile) with open(tempfile) as f: content = f.read().lower() # start coding # print(content) import re def get_pybites_top_tags(n=10): """use Counter to get the top 10 PyBites tags from the feed data already loaded into the content variable""" pattern = r'<category>([^<]+)</category>' tags = re.findall(pattern,content) return Counter(tags).most_common(n) pass # print(get_pybites_top_tags())
22.111111
63
0.700168
86
597
4.77907
0.604651
0.06326
0.06326
0.082725
0
0
0
0
0
0
0
0.014085
0.167504
597
27
64
22.111111
0.812877
0.278057
0
0
0
0
0.137019
0.067308
0
0
0
0
0
1
0.076923
false
0.076923
0.307692
0
0.461538
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
2
f1c875d6ad51bc0fa0969f4c2ec2d2da054137d4
599
py
Python
facebook_problems/problem_41.py
loftwah/Daily-Coding-Problem
0327f0b4f69ef419436846c831110795c7a3c1fe
[ "MIT" ]
129
2018-10-14T17:52:29.000Z
2022-01-29T15:45:57.000Z
facebook_problems/problem_41.py
loftwah/Daily-Coding-Problem
0327f0b4f69ef419436846c831110795c7a3c1fe
[ "MIT" ]
2
2019-11-30T23:28:23.000Z
2020-01-03T16:30:32.000Z
facebook_problems/problem_41.py
loftwah/Daily-Coding-Problem
0327f0b4f69ef419436846c831110795c7a3c1fe
[ "MIT" ]
60
2019-02-21T09:18:31.000Z
2022-03-25T21:01:04.000Z
"""This problem was asked by Facebook. We have some historical clickstream data gathered from our site anonymously using cookies. The histories contain URLs that users have visited in chronological order. Write a function that takes two users' browsing histories as input and returns the longest contiguous sequence of URLs that appear in both. For example, given the following two users' histories: user1 = ['/home', '/register', '/login', '/user', '/one', '/two'] user2 = ['/home', '/red', '/login', '/user', '/one', '/pink'] You should return the following: ['/login', '/user', '/one'] """
37.4375
91
0.712855
83
599
5.144578
0.73494
0.063232
0.084309
0
0
0
0
0
0
0
0
0.003945
0.153589
599
16
92
37.4375
0.838264
0.988314
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
f1cfef13a4170f67e5902ded11a73b4365c3448c
954
py
Python
tests/milvus_http_test/locust_file.py
mabergerx/milvus
1c48f7f4e47252f8aa2b3c09c9289a9444f5887c
[ "Apache-2.0" ]
3
2020-03-13T10:10:08.000Z
2022-01-30T07:12:36.000Z
tests/milvus_http_test/locust_file.py
mppmys/milvus
8605a7f12276c4a9b3b2772535c9575b199bb101
[ "Apache-2.0" ]
2
2020-08-20T07:17:50.000Z
2020-08-21T04:21:34.000Z
tests/milvus_http_test/locust_file.py
mppmys/milvus
8605a7f12276c4a9b3b2772535c9575b199bb101
[ "Apache-2.0" ]
1
2021-04-19T08:33:19.000Z
2021-04-19T08:33:19.000Z
import pdb import random from locust import User, task, between from locust_task import MilvusTask from utils import * from constants import * url = "http://192.168.1.29:19121/" collection_name = "sift_128_euclidean" headers = {'Content-Type': "application/json"} default_query, default_query_vectors = gen_query_vectors(default_float_vec_field_name, default_entities, default_top_k, default_nq) class HttpTest(User): wait_time = between(0, 0.1) client = MilvusTask(url) # client.clear_db() # client.create_collection(collection_name, default_fields) # @task # def insert(self): # response = self.client.insert(collection_name, default_entities) @task def search(self): response = self.client.search(collection_name, default_query) # res = response['result'] # assert response['num'] == default_nq # assert len(res) == default_nq # assert len(res[0]) == default_top_k
29.8125
131
0.708595
124
954
5.209677
0.475806
0.086687
0.097523
0.068111
0.065015
0
0
0
0
0
0
0.026958
0.183438
954
31
132
30.774194
0.802311
0.310273
0
0
0
0
0.111111
0
0
0
0
0
0
1
0.0625
false
0
0.375
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
f1d76aa3e39ffbf4938a21478177f7104e87457e
314
py
Python
DailyAssingments/Week2/Day1Assignment.py
smooth-dasilva/Smoothstack-Workload
165ac6df72c7765a594fa472131def1ab2e44c78
[ "MIT" ]
null
null
null
DailyAssingments/Week2/Day1Assignment.py
smooth-dasilva/Smoothstack-Workload
165ac6df72c7765a594fa472131def1ab2e44c78
[ "MIT" ]
null
null
null
DailyAssingments/Week2/Day1Assignment.py
smooth-dasilva/Smoothstack-Workload
165ac6df72c7765a594fa472131def1ab2e44c78
[ "MIT" ]
null
null
null
#1 import numpy as np #2 print(np.zeros(10)) #3 print(np.ones(10)) #4 print(list(map(lambda OnesToFive: OnesToFive*5 , np.ones(10)))) #5 print(np.arange(10,51)) #6 print(list(filter( lambda OnlyEvens : OnlyEvens%2==0,np.arange(10,51) ))) #7 #8 print(np.random.randint(0, 8, (3,3) )) #9 print(np.random.rand(1))
15.7
74
0.66879
61
314
3.442623
0.47541
0.166667
0.07619
0.114286
0
0
0
0
0
0
0
0.111111
0.111465
314
19
75
16.526316
0.641577
0.028662
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.125
0
0.125
0.875
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
2
f1e8723a75b41fa025e86f306f43df718996d390
81
py
Python
cosmos/galaxies/moderation/models/moderation/__init__.py
MrFreemanser/Bot
b17e0ddf95ea475da38f8e270affd6c5709b2cb1
[ "MIT" ]
null
null
null
cosmos/galaxies/moderation/models/moderation/__init__.py
MrFreemanser/Bot
b17e0ddf95ea475da38f8e270affd6c5709b2cb1
[ "MIT" ]
null
null
null
cosmos/galaxies/moderation/models/moderation/__init__.py
MrFreemanser/Bot
b17e0ddf95ea475da38f8e270affd6c5709b2cb1
[ "MIT" ]
null
null
null
from .moderation import ModerationAction __all__ = [ "ModerationAction", ]
11.571429
40
0.728395
6
81
9.166667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.185185
81
6
41
13.5
0.833333
0
0
0
0
0
0.197531
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7b0cee701cfc991aa4d67ed29b00d93d9af4015c
9,117
py
Python
pcb/points.py
JohnDMcMaster/uvscada
0b2bc4af49c51060d385da003fda13540cf9af4e
[ "BSD-2-Clause" ]
16
2015-10-27T07:27:21.000Z
2020-11-13T20:05:49.000Z
pcb/points.py
JohnDMcMaster/uvscada
0b2bc4af49c51060d385da003fda13540cf9af4e
[ "BSD-2-Clause" ]
null
null
null
pcb/points.py
JohnDMcMaster/uvscada
0b2bc4af49c51060d385da003fda13540cf9af4e
[ "BSD-2-Clause" ]
8
2016-05-15T04:41:40.000Z
2021-02-04T09:15:29.000Z
import math def simple(): ''' 3.14 * 0.5 = 1.57 1.57 / 40 = 0.03925 take half => 0.019625 20 mil diameter pads rond 6 mil fab rule? 20 mil hole, 10 mil ring each side should be fine eh pretty tight lets shrink slightly ''' D = 0.5 R = D / 2 PINS = 40 for i in xrange(PINS): pin = i + 1 angle = (i + 0.5) * 2 * math.pi / PINS if angle > 2 * math.pi: angle -= 2 * math.pi angle = -angle x = R * math.sin(angle) y = R * math.cos(angle) print '% 3d: % 4d x % 4d y % 5d r' % (pin, 1000 * x, 1000 * y, -360 * angle / 3.14 / 2 ) ''' autogen pcad.lia simple .dxf may also work figured out how to import .lia do that OSH rules https://oshpark.com/guidelines 6 mil minimum trace width 6 mil minimum spacing at least 15 mil clearances from traces to the edge of the board 13 mil minimum drill size 7 mil minimum annular ring pcbway rules http://www.pcbway.com/capabilities.html drill size Min drill size is 0.2mm, 7.9 mil max drill is 6.3mm. Any holes greater than 6.3mm or smaller than 0.3mm will be subject to extra charges. 6.3: 248 mil 0.3: 11.8 mil Min Width of Annular Ring 0.15mm(6mil) Minimum Diameter of Plated Half Holes 0.6mm eeeeh that messes up what I'm trying to do 23.6 mil actually maybe its okay so in summary current hole: 13 annular ring: 7 net size: 27 move to hole: 12 annular ring: 6 net size: 24 eliminated most but not all need 1 more mil hole 12 0.5 * 3.14159 = 1.570795 1.570795 / 28 = 0.056099821 56 mil 6 mil spacing min 7 mil minimum annular ring 0.1" fencepost ref 40 68 9 mil ring say 9 mil spacing 9 mil ring 56 - 9 - 2 * 9 = 29 hole wait no hole just do it evenly 56/2 = 28 ''' def header(): return '''\ ACCEL_ASCII "POINTS.LIA" (asciiHeader (asciiVersion 3 0) (timeStamp 2017 1 7 0 54 1) (program "points.py" "1.0.0") (copyright "points.py") (headerString "") (fileUnits Mil) (guidString "{00000000-0000-0000-0000-000000000000}") ) (library "Library_1" (padStyleDef "(Default)" (holeDiam 30mil) (startRange 1) (endRange 2) (padShape (layerNumRef 1) (padShapeType Oval) (shapeWidth 60mil) (shapeHeight 60mil) ) (padShape (layerNumRef 2) (padShapeType Oval) (shapeWidth 60mil) (shapeHeight 60mil) ) (padShape (layerType Signal) (padShapeType Oval) (shapeWidth 60mil) (shapeHeight 60mil) ) (padShape (layerType Plane) (padShapeType NoConnect) (shapeWidth 0.0) (shapeHeight 0.0) ) (padShape (layerType NonSignal) (padShapeType Oval) (shapeWidth 0mil) (shapeHeight 0mil) ) ) (padStyleDef "EF20X60TOP1" (holeDiam 0mil) (startRange 1) (endRange 2) (padShape (layerNumRef 1) (padShapeType Oval) (shapeWidth 20mil) (shapeHeight 60mil) ) (padShape (layerNumRef 2) (padShapeType Ellipse) (shapeWidth 0.0) (shapeHeight 0.0) ) (padShape (layerType Signal) (padShapeType Oval) (shapeWidth 0.0) (shapeHeight 0.0) ) (padShape (layerType Plane) (padShapeType NoConnect) (shapeWidth 0.0) (shapeHeight 0.0) ) (padShape (layerType NonSignal) (padShapeType Oval) (shapeWidth 0mil) (shapeHeight 0mil) ) ) (padStyleDef "P:EX30Y30D201" (holeDiam 12mil) (startRange 1) (endRange 2) (padShape (layerNumRef 1) (padShapeType Oval) (shapeWidth 24mil) (shapeHeight 24mil) ) (padShape (layerNumRef 2) (padShapeType Oval) (shapeWidth 24mil) (shapeHeight 24mil) ) (padShape (layerType Signal) (padShapeType Oval) (shapeWidth 24mil) (shapeHeight 24mil) ) (padShape (layerType Plane) (padShapeType NoConnect) (shapeWidth 0.0) (shapeHeight 0.0) ) (padShape (layerType NonSignal) (padShapeType Oval) (shapeWidth 0mil) (shapeHeight 0mil) ) ) (padStyleDef "RECT28" (holeDiam 0mil) (startRange 1) (endRange 2) (padShape (layerNumRef 1) (padShapeType Rect) (shapeWidth 28mil) (shapeHeight 28mil) ) (padShape (layerNumRef 2) (padShapeType Ellipse) (shapeWidth 0.0) (shapeHeight 0.0) ) (padShape (layerType Signal) (padShapeType Rect) (shapeWidth 28mil) (shapeHeight 28mil) ) (padShape (layerType Plane) (padShapeType NoConnect) (shapeWidth 0.0) (shapeHeight 0.0) ) (padShape (layerType NonSignal) (padShapeType Oval) (shapeWidth 0mil) (shapeHeight 0mil) ) ) (viaStyleDef "(Default)" (holeDiam 28mil) (startRange 1) (endRange 2) (viaShape (layerNumRef 1) (viaShapeType Ellipse) (shapeWidth 50mil) (shapeHeight 50mil) ) (viaShape (layerNumRef 2) (viaShapeType Ellipse) (shapeWidth 50mil) (shapeHeight 50mil) ) (viaShape (layerType Signal) (viaShapeType Ellipse) (shapeWidth 50mil) (shapeHeight 50mil) ) (viaShape (layerType Plane) (viaShapeType NoConnect) (shapeWidth 0.0) (shapeHeight 0.0) ) (viaShape (layerType NonSignal) (viaShapeType Ellipse) (shapeWidth 0mil) (shapeHeight 0mil) ) ) (textStyleDef "(Default)" (font (fontType Stroke) (fontFamily Modern) (fontFace "Quality") (fontHeight 80mil) (strokeWidth 10mil) ) (textStyleAllowTType False) (textStyleDisplayTType False) ) (textStyleDef "(DefaultTTF)" (font (fontType Stroke) (fontFamily SanSerif) (fontFace "QUALITY") (fontHeight 100.0) (strokeWidth 10.0) ) (font (fontType TrueType) (fontFamily Modern) (fontFace "Arial") (fontHeight 125.0) (strokeWidth 0.19843 mm) (fontWeight 400) (fontCharSet 0) (fontOutPrecision 7) (fontClipPrecision 32) (fontQuality 1) (fontPitchAndFamily 6) ) (textStyleAllowTType True) (textStyleDisplayTType True) ) (patternDefExtended "ROUND40-0.5_1" (originalName "ROUND40-0.5") (patternGraphicsNameRef "Primary") (patternGraphicsDef (patternGraphicsNameDef "Primary") (multiLayer ''' def footer(pins): s = '''\ ) (layerContents (layerNumRef 10) (arc (pt 0mil 0mil) (radius 250mil) (startAngle 0.0) (sweepAngle 360.0) (width 10mil) ) ) (layerContents (layerNumRef 6) (attr "RefDes" "" (pt -266.767mil 294.091mil) (isVisible True) (textStyleRef "(Default)") ) (attr "Type" "" (pt -266.767mil -389mil) (isVisible True) (textStyleRef "(Default)") ) ) ) ) (compDef "ROUND40-0.5_1" (originalName "ROUND40-0.5") (compHeader (sourceLibrary "") (numPins 40) (numParts 1) (alts (ieeeAlt False) (deMorganAlt False)) (refDesPrefix "") ) ''' for i in xrange(pins): ''' (compPin "1" (partNum 1) (symPinNum 1) (gateEq 0) (pinEq 0) ) (compPin "2" (partNum 1) (symPinNum 1) (gateEq 0) (pinEq 0) ) (compPin "3" (partNum 1) (symPinNum 1) (gateEq 0) (pinEq 0) ) ... (compPin "40" (partNum 1) (symPinNum 1) (gateEq 0) (pinEq 0) ) ''' pin = i + 1 s += ' (compPin "%d" (partNum 1) (symPinNum 1) (gateEq 0) (pinEq 0) )\n' % (pin,) s += '''\ (attachedPattern (patternNum 1) (patternName "ROUND40-0.5") (numPads 40) (padPinMap ''' for i in xrange(pins): ''' (padNum 1) (compPinRef "1") (padNum 2) (compPinRef "2") (padNum 3) (compPinRef "3") ... (padNum 40) (compPinRef "40") ''' pin = i + 1 s += ' (padNum %d) (compPinRef "%d")\n' % (pin, pin) s += '''\ ) ) ) ) ''' return s def auto(PINS=40, D=0.5, padStyleRef="EF20X60TOP1"): R = D / 2 s = header() for i in xrange(PINS): pin = i + 1 angler = (i + 0.5) * 2 * math.pi / PINS angler = -angler angled = angler * 180 / math.pi x = R * math.sin(angler) y = R * math.cos(angler) ''' (pad (padNum 1) (padStyleRef "EF20X60TOP1") (pt -19mil 249mil) (rotation 4.0)(defaultPinDes "1")) (pad (padNum 2) (padStyleRef "EF20X60TOP1") (pt -58mil 243mil) (rotation 13.0)(defaultPinDes "2")) (pad (padNum 3) (padStyleRef "EF20X60TOP1") (pt -95mil 230mil) (rotation 22.0)(defaultPinDes "3")) ''' # Rotation CW # Need to counter above rotation l = ' (pad (padNum %d) (padStyleRef "%s") (pt %dmil %dmil) (rotation %0.1f)(defaultPinDes "%d"))\n' % (pin, padStyleRef, 1000 * x, 1000 * y, -angled, pin) s += l s += footer(PINS) print s # Original design # Elongated oval pad sliced in the middle #auto(PINS=40, D=0.5, padStyleRef="EF20X60TOP1") # castillation #auto(PINS=40, D=0.5, padStyleRef="P:EX30Y30D201") # diameter # pad size/2 # solder mask expansion # edge clearance #auto(PINS=28, D=0.5+0.056/2+2*0.004+2*0.006, padStyleRef="RECT28") auto(PINS=28, D=0.45+0.056/2+2*0.004+2*0.006, padStyleRef="RECT28")
28.490625
169
0.599101
1,096
9,117
4.979927
0.306569
0.006596
0.057164
0.033712
0.423782
0.400147
0.389886
0.340051
0.227006
0.206119
0
0.093935
0.278381
9,117
319
170
28.579937
0.735674
0.036196
0
0.270115
0
0.074713
0.814713
0.020077
0
0
0
0
0
0
null
null
0
0.005747
null
null
0.011494
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
7b17e29071fb62128c63736a9765d72f65e41bfb
33,096
py
Python
bookwormMARC/bookwormMARC.py
Bookworm-project/Bookworm-MARC
f3526716f225779a53a952479a98a088b8adce83
[ "MIT" ]
4
2016-05-05T01:36:04.000Z
2017-09-18T21:32:40.000Z
bookwormMARC/bookwormMARC.py
Bookworm-project/Bookworm-MARC
f3526716f225779a53a952479a98a088b8adce83
[ "MIT" ]
13
2016-04-08T15:05:21.000Z
2017-08-24T00:21:13.000Z
bookwormMARC/bookwormMARC.py
Bookworm-project/Bookworm-MARC
f3526716f225779a53a952479a98a088b8adce83
[ "MIT" ]
null
null
null
import regex as re import pymarc import json from pymarc import Record,Field import logging import os import csv """ Module extending pymarc to pull out metadata categories from MARC records in a format that can be directly ingested into a Bookworm. """ """ TODO 2. Integrate any additional fields from https://github.com/aristus/copymine-harvard/blob/master/marc.py 3. Further parsing of LC classification 4. LC subject headings from field 650. 5. Physical dimensions from field 300. 6. Make URL generation more general than just for Hathi. 7. Field 974['u'] is the correct filename for Hathi, but usually '001' or something will be better. """ with open(os.path.join(os.path.dirname(__file__), 'data', 'language-codes.csv'), mode='r') as f: lang_lookup = dict(csv.reader(f)) with open(os.path.join(os.path.dirname(__file__), 'data', 'country-codes.csv'), mode='r') as f: cntry_lookup = dict(csv.reader(f)) # Encoding unexpected values where the intent is clear for bad_code in ['xxx', '|||', ' ']: lang_lookup[bad_code] = 'Unknown' for bad_code in ['xxx', '|||', '###', ' ']: cntry_lookup[bad_code] = 'Unknown' def integerize(string,allow_cutter_numbers=True): """ Turns a number into a string. If the number is a Cutter number like "A435", extracts the letter part into a tuple so the result is ("A",435). This preserves sortability. """ if string is None: return None try: return int(string) except ValueError: return (string[0],int(string[1:])) class LCCallNumber(list): """ An LCC is a tuple of six elements. (The exact number of elements is subject to change in later revisions.) This means that they can be sorted and compared in a variety of useful ways that the raw strings can not. """ def __init__(self,string): cleaned = self.clean(string) components = self.split_number(cleaned) return list.__init__(self,components) def __cmp__(self,objecta): print self print objecta a = tuple(self) b = tuple(objecta) if a > b: return 1 if a == b: return 0 if a < b: return -1 def subsumes(self,other_call_number): """ A call number can trail off into vagueness with a number of None elements. So "AK 101" is taken to subsume "AK 101.E35". Any field includes itself. So be careful of infinite recursion. I don't currently use this code. """ truthiness = True for (a,b) in zip(self,other_call_number): if a != b: if a is not None: truthiness = False return truthiness def next_unincluded_class(self): vals = [i for i in self] vals.reverse() # Bump recursively, because some tuple elements # are tuple themselves (such as Cutter Numbers) def bump(tuplee): listed = list(tuplee) listed.reverse() for (i, element) in enumerate(listed): if element is None: continue if isinstance(element,int): listed[i] = element + 1 break if isinstance(element,str): listed[i] = increment(element) break if isinstance(element,tuple): listed[i] = bump(element) break listed.reverse() return tuple(listed) new_version = bump(self) # reclass phony = self.__class__("A") for (k,v) in enumerate(new_version): phony[k] = v return phony @staticmethod def integerize(string,allow_cutter_numbers=True): """ Turns a string into a sortable number. If the number is a Cutter number, extracts the letter part. Doesn't handle decimals. """ if string is None: return None try: return int(string) except ValueError: return (string[0],int(string[1:])) @staticmethod def split_number(string): alpha = r'(?P<classalph>[A-Z]+)' class_number = r'((?P<classno_whole>\d+)(\.(?P<classno_decimal>\w?\d+)?)?)?' date1 = r'( ?(?P<date1>\d\w\w+))?' cutter1 = r'( ?\.?(?P<cutter1>[A-Z]\d+))?' date2 = r'(?P<date2>[\. ]\d\w+)?' cutter2 = r'( ?\.?(?P<cutter2>[A-Z]\d+))?' # At this point, I punt. To extend, see # https://www.oclc.org/bibformats/en/0xx/050.html therest = r'(?P<therest>[^\t]+)?' full_regex = alpha + " ?" + class_number + date1 + cutter1 + date2 + cutter2 + therest mymatch = re.match(full_regex,string) integerize = LCCallNumber.integerize try: return [mymatch.group('classalph'), integerize(mymatch.group('classno_whole')), integerize(mymatch.group('classno_decimal')), mymatch.group('date1'), integerize(mymatch.group('cutter1')), mymatch.group('date2'), integerize(mymatch.group('cutter2')), mymatch.group('therest') ] except AttributeError: raise TypeError("Unparseable LC Number: '%s'" % string) @staticmethod def clean(string): string = string.encode("ascii","replace") string = string.replace("(","") string = string.replace(")","") return string def increment(string): """ for "A", return "B" for "AC", return "AD" After AZ comes `A[`. That's OK for my purposes. """ rest = string[:-1] last = chr(ord(string[-1]) + 1) #print rest+last return rest + last def lcc_range(string): """ Takes a string, returns a tuple of two LCClassNumbers, the start and end of the range. """ string = string.encode("ascii","replace") string = string.replace("(","") string = string.replace(")","") if string.endswith("A-Z"): # TMI in the schedules when they're alphabetical. # I don't care. string.replace("A-Z","") if "-" not in string: # A range of self length. return (LCCallNumber(string), LCCallNumber(string)) parts = string.split("-") if re.search(r"^\d",parts[1]): header = re.sub("^([A-Z]+).*",r"\1",parts[0]) elif re.search(r"^\.",parts[1]): header = re.sub(r"^([A-Z]+\d)+\..*",r"\1",parts[0]) elif re.search(r"^[A-Z]",parts[1]): header = re.sub(r"^([A-Z]+\d)+\..[A-Z]*",r"\1.",parts[0]) else: header = " " parts[1] = header + parts[1] return ( LCCallNumber(parts[0]), LCCallNumber(parts[1]) ) class LCClass(object): def __init__(self, record): if record['050'] is not None: self.field = record['050'] elif record['053'] is not None: self.field = record['053'] else: self.field = None if self.field is not None: self.indicator1 = self.field.indicator1 self.string = self.field['a'] def from_loc(self): if not self.indicator1 in [0,"0",""]: return False return True def split(self): if self.field is None or self.string is None: return dict() #LC classifications cannot include non-ascii characters, so we just coerce. lcclass = self.string.encode("ascii",'replace') #This regex defines an LC classification. mymatch = re.match(r"^(?P<lc1>[A-Z]+) ?(?P<lc2>[\.\d]+)", lcclass) if mymatch: returnt = {'lc0':lcclass[0],'lc1':mymatch.group('lc1'),'lc2':mymatch.group('lc2')} return returnt else: return(dict()) def parse(self): if self.field is None: return dict() else: value = self.split() value['lc_class_from_lc'] = self.from_loc() return value class Leader(object): """ Parses elements out of the MARC leader. """ def __init__(self,record): self.data = record.leader def resource_type(self): """ I use the leader to determine the resource type according to this table from MARC, except that I separate "manuscripts" from "books" Dependencies Field 008/18-34 Configuration If Leader/06 = a and Leader/07 = a, c, d, or m: Books If Leader/06 = a and Leader/07 = b, i, or s: Continuing Resources If Leader/06 = t: Books If Leader/06 = c, d, i, or j: Music If Leader/06 = e, or f: Maps If Leader/06 = g, k, o, or r: Visual Materials If Leader/06 = m: Computer Files If Leader/06 = p: Mixed Materials """ L6 = self.data[6] L7 = self.data[7] if L6 == "a" and L7 in ["a","c","d","m"]: return "book" if L6 == "a" and L7 in ["b","i","s"]: return "serial" if L6 == "t": return "manuscript" if L6 in ["c","d","i","j"]: return "music" if L6 in ["e","f"]: return "map" if L6 in ["g","k","o","r"]: return "visual materials" if L6=="m": return "computer files" if L6=="p": return "mixed materials" return "not present" class F008(object): def __init__(self, record, resource_type="unknown", warn_bad_value=True): ''' resource_type: For better handling of fields specific to a resource type like music or books. warn_bad_value: For closed class fields, warn when the value does not fit the lookup and return a code. If False, throws an error. ''' self.data = record['008'].data self.resource_type = resource_type self.warn_bad_value = warn_bad_value if len(self.data) != 40: self.correct_short() if 'U+' in self.data: logging.warn('Malformed 008 field: %s' % self.data) self.correct_malformed() def correct_short(self): l = len(self.data) if len(self.data) == 38: # Assume 38 and 39 are missing self.data += '|u' elif len(self.data) == 39: # Assume 39 is missing self.data += 'u' else: # throw your hands up and give up # Actually, right pad to 40 chars, then pass to correct_malformed logging.error("008 short in unaccountable way: %s" % self.data) self.data = self.data.ljust(40, ' ') self.correct_malformed() def correct_malformed(self): ''' Go backwards, and reset unexpected codes to 'Unknown' ''' errs = 0 if self.data[33] not in self.lit_lookup: errs += 1 self.data = self.data[:33] + 'u' + self.data[34:] if self.data[28] not in self.gov_lookup: errs += 1 self.data = self.data[:28] + ' ' + self.data[29:] if self.data[22] not in self.target_audience_lookup: errs += 1 self.data = self.data[:22] + '#' + self.data[23:] if errs >= 2: # Set lang to 'No information provided' self.data = self.data[:35] + '###' + self.data[39:] def cataloging_source(self): return self.data[-1] def language(self): lcode = self.language_code() try: return lang_lookup[lcode] except: if self.warn_bad_value: logging.warn("No language for %s, returning just the MARC code" % lcode) return lcode else: raise def language_code(self): return self.data[35:38] lit_lookup = { "0": "Not fiction", "1": "Fiction", "d": "Dramas", "e": "Essays", "f": "Novels", "h": "Humor, satires, etc.", "i": "Letters", "j": "Short stories", "m": "Mixed forms", "p": "Poetry", "s": "Speeches", "u": "Unknown", "|": "No attempt to code", " ": "Unknown" } def literary_form(self): code = self.data[33] if self.resource_type in ['serials']: return "Undefined" try: return self.lit_lookup[code] except: if self.warn_bad_value: logging.warn("No literary form for code %s, returning just the MARC code" % code) return code else: raise gov_lookup = {'#': 'Not a government publication', 'a': 'Autonomous or semi-autonomous component', 'c': 'Multilocal', 'f': 'Federal/national', 'i': 'International intergovernmental', 'l': 'Local', 'm': 'Multistate', 'o': 'Government publication-level undetermined', 's': 'State, provincial, territorial, dependent, etc.', 'u': 'Unknown if item is government publication', 'z': 'Other', '|': 'No attempt to code', ' ': 'Unknown' } def government_document(self): code = self.data[28] try: if self.resource_type in ["mixed materials", "music"]: return "Undefined" else: return self.gov_lookup[code] except: if self.warn_bad_value: logging.warn("Bad government lookup. Often an indicator of malformed 008: %s" % code) return "Unknown" else: raise target_audience_lookup = { "#": "Unknown or not specified", "a": "Preschool", "b": "Primary", "c": "Pre-adolescent", "d": "Adolescent", "e": "Adult", "f": "Specialized", "g": "General", "j": "Juvenile", "|": "No attempt to code", " ": "Unknown" } def target_audience(self): code = self.data[22] if self.resource_type in ['maps', 'mixed materials']: return "Undefined" try: return self.target_audience_lookup[code] except KeyError: if self.warn_bad_value: logging.warn("Bad target audience, %s" % code) return "Unknown or not specified" else: raise def country(self): code = self.cntry_code() results = dict() if code.strip() not in cntry_lookup: return results state_code, cntry_code = code[:2], code[2] cntry_code_ref = dict(u='USA', c='Canada', k='United Kingdom', a='Australia', r='Soviet Union') if cntry_code in cntry_code_ref: try: results['publication_country'] = cntry_code_ref[cntry_code] if state_code not in ['xx', ' ']: # ' x' shouldn't be valid, but the intent seems clear enough to assume the same as 'xx#' results['publication_state'] = cntry_lookup[code] except: if self.warn_bad_value: logging.warn("Illegal country sub-division for %s" % code) return results else: raise else: try: results['publication_country'] = cntry_lookup[code.strip()] except: if self.warn_bad_value: logging.warn("Illegal publication country for %s" % code) results['publication_country'] = code return results else: raise return results def cntry_code(self): """ The marc-country is in 15:18 """ code = self.data[15:18] if code in ['|||']: code = 'xx ' return code def marc_record_created(self): try: yy = self.data[0:2] mm = self.data[2:4] dd = self.data[4:6] # MARC fields are vulnerable to the Y2K bug. if int(yy) < 30: yyyy = "20" + yy else: yyyy = "19" + yy return "-".join([yyyy,mm,dd]) except ValueError: return None def as_dict(self): value = dict() for attribute in [ "marc_record_created" , "language" , "cataloging_source" , "government_document" , "literary_form" , "target_audience" ]: try: value[attribute] = getattr(self,attribute)() except IndexError: # There are some malformed JSON even here. pass # Attributes that return a dictionary with multiple keys for attribute in [ "country" ]: try: result = getattr(self,attribute)() for key in result: value[key] = result[key] except: pass return value class Author(object): """ A general purpose extraction class to handle a MARC author field. """ def __init__(self,record): self.field = record self.parse_dates() def parse_dates(self): if self.field['d'] is None: self.birth=None self.death=None return try: (self.birth,self.death) = self.field['d'].split("-") except ValueError: self.birth=None self.death=None return self.birth = normalize_year(self.birth) self.death = normalize_year(self.death) def name(self): return self.field.value() def as_dict(self,prefix=""): return {prefix + "name":self.name(),prefix + "birth":self.birth,prefix + "death":self.death} """ From http://www.loc.gov/marc/bibliographic/bd260.html: Subfield $c ends with a period (.), hyphen (-) for open-ended dates, a closing bracket (]) or closing parenthesis ()). If subfield $c is followed by some other subfield, the period is omitted. The original REGEX: YEAR_REGEX = re.compile(r'[\d]{4}') ^^ it's too simple, and only catches complete 4-digit dates. """ YEAR_REGEX = re.compile(r'([\d]{4}|[\d]{3}|([\d]{2}(?![ ]?cm)))') """ Okay, here are some possibilities that we have to deal with: 186-?] [185-?] [189?] 187?] 184[5?] [186-] c19 -- is the 19th century, or a misinterpretaion of 260$c19 ? cl9l6] M. D. LXXIII. M. D. LXVIII. M.DCC.LXI. 191 18-- 18 -19 MDCCLXXIX. MDCCLXX-LXXXIX] 19 cm. these get matched wrong 5682 [1921] as does this... This new function covers the 2, 3, and 4 digit segmented cases. Now to convert roman numerals... There seem to be a number of cases of `l` being substituted for `1`. """ def normalize_year(year_string): """ Attempt to normalize a year string. Returns the most recent year that can be extracted from year_string as an integer. """ # if not year_string: # return None # matches = YEAR_REGEX.findall(year_string) # return max(map(int, matches)) if matches else None if not year_string: return None # l9l6 --> 1916 year_string = year_string.replace('l', '1') matches = YEAR_REGEX.findall(year_string) if not matches: return None matches = map(lambda x: x[0], matches) y = max(matches, key=lambda x: len(x)) y = "{:0<4}".format(y) # ljust w/ 0s return int(y) # Extending some convenience functions onto pymarc.Record class BRecord(pymarc.Record): def parse_authors(self): """ THIS DOESN"T YET HANDLE CORPORATE AUTHORS (FIELD 110) """ if hasattr(self,"authors"): return self.authors self.authors = [] for field in self.get_fields('100'): author = Author(field) self.authors.append(author) return self.authors def parse_lc_class(self, **kwargs): classification = LCClass(self) return classification.parse() def parse_008(self, **kwargs): f008 = F008(self, resource_type=self.resource_type(), **kwargs) return f008.as_dict() def record_date(self): """ Field 260 is the first place to look for year. But this can be overridden by field 945y in Hathi metadata. """ try: y = normalize_year(self['260']['c']) if y is None: y = normalize_year(self.pubyear()) except TypeError: # when there is no self['260'] y = normalize_year(self.pubyear()) return y def first_publisher(self): try: return self['260']['b'] except TypeError: return None except KeyError: return None def first_place(self): try: return self['260']['a'] except KeyError: return None except TypeError: return None def lccn(self): try: return self['010'].value() except: return None def cataloging_source(self): try: return self['040']['a'] except KeyError: return None except TypeError: return None def resource_type(self): leader = Leader(self) return leader.resource_type() def author_age(self): try: self.parse_authors() return self.date() - self.authors[0].birth except: raise def subject_places(self): fields = [] for field in self.get_fields('043'): if 'a' in field: fields.append(field['a']) return fields def serial_killer_guess(self): """ Implements the Aiden-Michel serial-killer algorithm as described at http://dx.doi.org/10.1126/science.1199644 http://science.sciencemag.org.ezproxy.neu.edu/content/331/6014/176.figures-only. I don't think this is likely to be that useful for most users; it's here to test the algorithm. """ titles = set(re.findall(r"\w+",self.title().lower())) try: author = set(re.findall("\w+",self.first_author()["first_author_name"].lower())) except KeyError: author = set([]) title_blacklist = set(["advances", "almanac", "annual", "bibliography", "biennial", "bulletin", "catalog", "catalogue", "census", "conference", "conferences", "congress", "congressional", "digest", "digest", "directory", "hearings", "index", "journal", "magazine", "meeting", "meetings", "monthly", "papers", "periodical", "proceedings", "progress", "quarterly", "report", "reports", "review", "revista", "serial", "society", "subcommittee", "symposium", "transactions", "volume", "yearbook", "yearly"]) author_blacklist = set(["the", "of", "and", "administration", "congress", "international", "national", "federal", "state", "american", "british", "consortium", "university", "office", "america", "united", "states", "britain", "ireland", "canada", "australia", "institute", "research", "committee", "subcommittee", "court", "association", "foundation", "board", "bureau", "house", "senate", "dept", "department", "state", "council", "club", "school", "network", "online", "company", "co", "us", "u.s.", "survey", "agency", "academy", "commission", "press", "publishing", "publishers", "academic", "cambridge", "sciencedirect", "kluwer", "oxford", "interscience", "library", "on", "society", "service", "affairs", "division", "commerce", "public", "foreign", "government", "agriculture", "science", "engineers", "stanford", "medical", "energy", "laboratory", "economic", "geological", "assembly", "alabama", "alaska", "american", "arizona", "arkansas", "california", "colorado", "connecticut", "delaware", "columbia", "district", "florida", "georgia", "guam", "hawaii", "idaho", "illinois", "indiana", "iowa", "kansas", "kentucky", "louisiana", "maine", "maryland", "massachusetts", "michigan", "minnesota", "mississippi", "missouri", "montana", "nebraska", "nevada", "hampshire", "jersey", "mexico", "york", "ohio", "oklahoma", "oregon", "pennsylvania", "north", "south", "tennessee", "texas", "utah", "vermont", "wisconsin", "wyoming"]) if len(titles.intersection(title_blacklist)) + len(author.intersection(author_blacklist)): return "serial" return "book" def first_author(self, **kwargs): authors = self.parse_authors() try: return authors[0].as_dict(prefix="first_author_") except IndexError: return {} def bookworm_dict(self, **kwargs): """ Reformat the record as a dictionary for use with Bookworm. This does not include Hathi-specific fields. """ master_record = dict() # Individual fields first. for field in ["record_date","title","first_publisher","first_place","cataloging_source","subject_places","resource_type","serial_killer_guess"]: try: val = getattr(self,field)() except AttributeError: continue if val is not None and val!=[]: master_record[field] = val if val is None and field == "record_date": # We need a date, even if we don't know it. master_record[field] = val # Then methods that return dicts dicts = [self.parse_lc_class(**kwargs) ,self.first_author(**kwargs) ,self.parse_008(**kwargs) ] for dicto in dicts: for (k,val) in dicto.iteritems(): if val is not None and val != []: master_record[k] = val return master_record def hathi_bookworm_dicts(self, **kwargs): """ Hathi does use one record for one book; instead, it stores many volumes under a record. So we use field 974 to represent these. Also, Hathi has permalinks, which MARC records may not. """ # First, grab the normal MARC info. master_record = self.bookworm_dict(**kwargs) for field in self.get_fields('974'): """ Each entry in 974 is a separate scan of a record. In some cases, there may be loads of volumes with separate years. """ local_info = dict() for (k,v) in master_record.iteritems(): local_info[k] = v for (k,v) in scan_data(field).iteritems(): if v is not None: if k == "additional_title": try: local_info["title"] += ("--- " + v) except KeyError: local_info["title"] = v # Don't overwrite the title, just append with a triple dash continue local_info[k] = v local_info["permalink"] = "https://babel.hathitrust.org/cgi/pt?id=" + local_info["filename"] try: if local_info["item_date"] and local_info["item_date"] is not None: local_info["date"] = local_info["item_date"] else: local_info["date"] = local_info["record_date"] except KeyError: local_info["date"] = local_info["record_date"] try: local_info["searchstring"] = "<a target='_blank' href=%(permalink)s>%(author)s,<em>%(title)s</em> (%(date)s)" % local_info except KeyError: try: # There is no author; there should be a title, though local_info['searchstring'] = "<a target='_blank' href=%(permalink)s><em>%(title)s</em> (%(date)s)" % local_info except KeyError: local_info['searchstring'] = "<a target='_blank' href=%(permalink)s>[No title] (%(date)s)" % local_info yield local_info _library_lookups = {u"mdp" : "University of Michigan", u"miu" : "University of Michigan", u"miua" : "University of Michigan", u"miun" : "University of Michigan", u"wu" : "University of Wisconsin", u"inu" : "Indiana University", u"uc1" : "University of California", u"uc2" : "University of California", u"pst" : "Penn State University", u"umn" : "University of Minnesota", u"nnc1" : "Columbia University", u"nnc2" : "Columbia University", u"nyp" : "New York Public Library", u"uiuc" : "University of Illinois", u"njp" : "Princeton University", u"yale" : "Yale University", u"chi" : "University of Chicago", u"coo" : "Cornell University", u"ucm" : "Universidad Complutense de Madrid", u"loc" : "Library of Congress", u"ien" : "Northwestern University", u"hvd" : "Harvard University", u"uva" : "University of Virginia", u"dul1" : "Duke University", u"ncs1" : "North Carolina State University", u"nc01" : "University of North Carolina", u"pur1" : "Purdue University", u"pur2" : "Purdue University", u"mdl" : "Minnesota Digital Library", u"usu" : "Utah State University Press", u"gri" : "Getty Research Institute", u"uiug" : "University of Illinois", u"psia" : "Penn State University", u"bc" : "Boston College", u"ufl1" : "University of Florida", u"ufl2" : "University of Florida", u"txa" : "Texas A&M University", u"keio" : "Keio University", u"osu" : "The Ohio State University", u"uma" : "University of Massachusets", u"udel" : "University of Delaware", u"caia" : "Clark Art Institute Library",u"pur":"Purdue University"} def scan_data(field): """ field: a 974 field parsed by pymarc.Field. HathiTrust records use a special MARC field, 974, to store additional data. This extracts some useful information, including: 1. Scanning library (eg, Michigan) 2. Scanning partner (eg, Google) 3. Additional titles (eg, volume numbers) 4. Date (for serial volumes bundled under a single MARC record) """ global _library_lookups try: code = field['u'].split(".",1)[0] library = _library_lookups[code] except KeyError: library = "Unknown" return { "contributing_library":library, # Field 'd' is for when the rights were changed. Who cares? "rights_changed_date":"-".join([field['d'][:4], field['d'][4:6], field['d'][6:8]]), "scanner":field['s'], "filename":field['u'], "additional_title":field['z'], "item_date":normalize_year(field['y']) } def subfield_reduce(subfields): value = [] if isinstance(subfields,dict): subfields = [subfields] for subfield in subfields: value.append(subfield['code']) try: value.append(subfield['#text']) except KeyError: # Some records have a code but no text. I'm assuming that # means the space is just empty. value.append("") return value def parse_record(entry): """ Create a pymarc.Record instance from a row in the DPLA Hathi dump. pymarc's onboard MarcJSON parser assumes a slightly different format than the DPLA/Hathi one (tuples instead of keyed dictionaries) so I've just altered the record ingest code from there. """ entryRaw = json.loads(entry)["_source"]["originalRecord"] rec = BRecord() rec.leader = entryRaw['leader'] for field in entryRaw['datafield']: try: subfields = field['subfield'] try: fld = Field(tag=field['tag'],subfields=subfield_reduce(subfields),indicators=[field['ind1'], field['ind2']]) except KeyError: # Sometimes 035 fields raise rec.add_field(fld) except KeyError: try: fld = Field(tag=field['tag'],data=field['#text']) rec.add_field(fld) except KeyError: print field raise for field in entryRaw['controlfield']: try: fld = Field(tag=field['tag'],data=field['#text']) except KeyError: fld = Field(tag=field['tag'],data="") rec.add_field(fld) return rec
35.246006
1,519
0.544718
3,863
33,096
4.592286
0.246699
0.017587
0.006764
0.006313
0.157215
0.123224
0.09115
0.07159
0.067249
0.039177
0
0.019065
0.328015
33,096
938
1,520
35.283582
0.778597
0.045655
0
0.327787
0
0.003328
0.196721
0.012024
0
0
0
0.001066
0
0
null
null
0.003328
0.011647
null
null
0.004992
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
7b2765c13808fabc066238959f16a24a6216243c
117
py
Python
tests.py
Mkiukaji/certmon
ed71dc70100c089521bdcfadcedff3f730485398
[ "MIT" ]
1
2018-06-07T15:01:52.000Z
2018-06-07T15:01:52.000Z
tests.py
Mkiukaji/certmon
ed71dc70100c089521bdcfadcedff3f730485398
[ "MIT" ]
null
null
null
tests.py
Mkiukaji/certmon
ed71dc70100c089521bdcfadcedff3f730485398
[ "MIT" ]
null
null
null
from Certmon import app with app.test_client() as c: response = c.get('/') assert response.status_code == 200
29.25
38
0.692308
18
117
4.388889
0.833333
0
0
0
0
0
0
0
0
0
0
0.031579
0.188034
117
4
38
29.25
0.8
0
0
0
0
0
0.008475
0
0
0
0
0
0.25
1
0
false
0
0.25
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7b2bc8534f63771b8395d97ad1af9fcba31e6c81
862
py
Python
scripts/quest/q3527s.py
pantskun/swordiemen
fc33ffec168e6611587fdc75de8270f6827a4176
[ "MIT" ]
null
null
null
scripts/quest/q3527s.py
pantskun/swordiemen
fc33ffec168e6611587fdc75de8270f6827a4176
[ "MIT" ]
null
null
null
scripts/quest/q3527s.py
pantskun/swordiemen
fc33ffec168e6611587fdc75de8270f6827a4176
[ "MIT" ]
null
null
null
# In Search for the Lost Memory [Explorer Pirate + Jett] (3527) recoveredMemory = 7081 kyrin = 1090000 sm.setSpeakerID(kyrin) sm.sendNext("A stable position, with a calm demanor-- but I can tell you're hiding your explosive attacking abilities-- " "you've become quite an impressive pirate, #h #. It's been a while.") sm.sendSay("You used to be a kid that was scared of water-- and look at you now. " "I knew you'd grow to a formidable pirate, but like this? I am thrilled to see you all grown up like this.") sm.sendSay("What I can tell you is-- keep going. " "As the person responsible for making you a pirate, I have no doubt in my mind that you still have room to grow-- " "and that you will become an even more powerful force.") sm.startQuest(parentID) sm.completeQuest(parentID) sm.startQuest(recoveredMemory) sm.setQRValue(recoveredMemory, "1", False)
45.368421
121
0.74826
148
862
4.358108
0.648649
0.012403
0.024806
0.034109
0
0
0
0
0
0
0
0.022161
0.162413
862
19
122
45.368421
0.871191
0.070766
0
0
0
0.214286
0.68875
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
9e28b4530edf7f4d87c7519c7e15fbce6046df15
473
py
Python
ml/ex02/costs.py
AlexanderChristian/private_courses
c80f3526af539e35f93b460f3909f669aaef573c
[ "MIT" ]
null
null
null
ml/ex02/costs.py
AlexanderChristian/private_courses
c80f3526af539e35f93b460f3909f669aaef573c
[ "MIT" ]
6
2020-03-04T20:52:39.000Z
2022-03-31T00:33:07.000Z
ml/ex02/solution/costs.py
AlexanderChristian/private_courses
c80f3526af539e35f93b460f3909f669aaef573c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """a function used to compute the loss.""" import numpy as np def calculate_mse(e): """Calculate the mse for vector e.""" return 1/2*np.mean(e**2) def calculate_mae(e): """Calculate the mae for vector e.""" return np.mean(np.abs(e)) def compute_loss(y, tx, w): """Calculate the loss. You can calculate the loss using mse or mae. """ e = y - tx.dot(w) return calculate_mse(e) # return calculate_mae(e)
18.92
48
0.613108
78
473
3.653846
0.435897
0.168421
0.091228
0.112281
0
0
0
0
0
0
0
0.01105
0.234672
473
24
49
19.708333
0.776243
0.450317
0
0
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0.125
0
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
9e2c10c22412be712bde3542385aebb35841d7eb
7,332
py
Python
01_strings_interpolacao/04_strings_metodos.py
smartao/estudos_python
252a2e592ff929dfc6c06fc09b42cb7063ad0b5a
[ "MIT" ]
null
null
null
01_strings_interpolacao/04_strings_metodos.py
smartao/estudos_python
252a2e592ff929dfc6c06fc09b42cb7063ad0b5a
[ "MIT" ]
9
2019-11-15T14:21:43.000Z
2020-03-15T14:37:13.000Z
01_strings_interpolacao/04_strings_metodos.py
smartao/estudos_python
252a2e592ff929dfc6c06fc09b42cb7063ad0b5a
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import pyperclip ''' String puras Podemos inserir um r antes das pastas de inicio em uma string para transofrmá-la em uma string pura (raw string), com isso a string ignorará todos os caracteres de scape ''' print('Exemplo de um string pura:') print(r'\n\t That is Carlos \'s cat.') ''' Strings em multiplas linhas ''' print('''\nTeste de 'String' de Multiplas linhas ''') ''' Indexacao e Slices As String usam indices e slices (Fatias) do mesmo modo que as listas ''' print('\nTeste de slice string') spam = 'Hello World!' print(spam[0]) # Primeiro caractere print(spam[4]) # Quinta caractere print(spam[-1]) # Ultimo caractere print(spam[0:5]) # do 0 ao 5 print(spam[:5]) # do 0 ao 5 print(spam[6:]) # do 6 até o final ''' Operadores in e not in com strings Os operadora in e not in podem ser usados com strings assim como em valores de listas ''' print('\nTeste de strings:') print('Hello' in 'Hello World') # True print('Hello' in 'Hello') # True print('HELLO' in 'Hello World') # False print('' in 'spam') # True print('cats' not in 'cats and dogs') # False ''' upper(), lower(), title() Retornam um nova string em que todas as letras da string original foram convertidas para maiusculas ou minusculas. Os métodos não alteram a string em si, mas retornam novos valores de strings Os métodos upper() e lower() serão úteis caso seja necessário fazer uma comparação sen kevar en cibta a diferença de maisculas e minusculas ''' print('\nTeste dos métodos upper e lower') spam = 'Hello World' spam = spam.upper() print(spam) spam = spam.lower() print(spam) spam = spam.title() # Primeira letra maisuculas print(spam) print('\nComparando strings:') print('How are you?') feeling = 'GREATE' if feeling.lower() == 'greate': print('I feel greate too') # Como os métodos retornam string, # podemos chamar os métodos de string nesses valores print('\nTeste de aninhamento de métodos') print('Hello'.upper()) print('Hello'.upper().lower()) print('Hello'.upper().lower().upper()) print('Hello'.upper().lower().upper().lower()) ''' isupper(), islower() Retornarão um valor booleano True se a string tiver pelo menos uma letra e todas as letras forem maiusculas ou minusculas, respectivalmente. ''' print('\nTeste dos métodos isupper() e islower()') spam = 'Hello World' print(spam.islower()) # False print(spam.isupper()) # False print('HELLO'.isupper()) # True print('abc12345'.islower()) # True print('12345'.islower()) # False print('12345'.isupper()) # False ''' Métodos de string isXa isalpha() retornará True se a string for constituida somente de letras e não estiver vazia isalnum() retornará True se a string for constituida somente de letas e numeros e não estiver vazia isdeciamal() retornará True se a string for constituida somente de caracteres numéricos e não estiver vazia isspace() retornará True se a string for constituida somente de espaços, tabulações e quebras de linhas e não estiver vazia istitle() retornará True se a string for constituida somente de palavras que comecer com uma letras maiuscula seguida de letas minusculas Esse métodos são úteis para validar dados de entrada de usuúario, exemplo ''' while True: print('\nEnter you age:') age = input() if age.isdecimal(): break print('Please enter a number for your age.') print('tks') ''' startswith() endswith() Retornarão True se o valor de string com o qual forem chamados comeceçar ou terminar (respectivamente) com a string passada para o método ''' print('\nTeste dos metodos startswith e endswith') print('Hello world!'.endswith('world!')) # True print('abc123'.startswith('abcdef')) # False print('abc123'.endswith('12')) # False print('Hello world!'.startswith('Hello world!')) # True print('Hello world!'.endswith('Hello world!')) # True ''' join() O método join() é útil quando temos uma lista de strings que devem ser unidas em um único valor de string. Esse método é interessante pois podemos usar uma separador dos itens ''' listanimals = ['cats', 'dogs', 'bears'] stringanimals = ', '.join(listanimals) print('\nTeste1 do metodo join:') print(stringanimals) stringanimals = ' '.join(listanimals) print('Teste2 do metodo join, usando um separador') print(stringanimals) ''' split() O método split faz o inverso do join. É chamado em um valor de string e retorna uma lista de strings. Um uso comum esta em dividir uma string de multiplas linhas nos caracteres de quebra de linha ''' frase = 'My name is Simon' print('\nTeste1 do método split:') print(frase.split()) print('\nTeste2 do método split, usando um separador') print(frase.split('is')) spam = '''Dear Alice, How have you been? I am fine. There is a container in the fridge that is labeled "Milk Experiment". Please do not drink it. Sincerely Bob''' print('\nTeste2 do método split, usando um separador\n') print(spam.split('\n')) ''' Justificando texto rjust(), ljust(), center() Os métodos de string retornam uma versão preenchida da string em que são chamadas com espeços inseridos para justificar o texto 1 - Argumemto é um inteiro referente ao tamanho da string justificada Perceba que se o inteiro for menor que o tamanho da string, nada acontecera! 2 - Argumento opcional, especifica o caractere de preenchimento ''' print('\nTeste dos métodos rsjust e ljust:') hello = 'Hello world' print(hello.rjust(20)) print(hello.ljust(30)) print(hello.rjust(15, '*')) print(hello.ljust(25, '-')) print(hello.center(15)) print(hello.center(25, '=')) ''' Esse métodos serão especialmente úteis quando for necessário exibir dados tabulares que tiverem o espacámento correto, Exemplo: ''' print('\nExemplo mais complexo do ljust, rjust e center:\n') def printPicnic(ItemDict, leftWidth, rightWidth): print('PICNIC ITEMS'.center(leftWidth + rightWidth, '-')) for k, v in ItemDict.items(): print(k.ljust(leftWidth, '.') + str(v).rjust(rightWidth)) picnicItems = {'sandwiches': 4, 'apples': 12, 'cups': 4, 'cookies': 8000} printPicnic(picnicItems, 12, 5) # Executando uma vez printPicnic(picnicItems, 20, 7) # Executando segunda vez ''' strip(), rstrip(), lstrip() removendo espaços em brancos strip() retornará uma nova string sem caracteres de espacos em branco no inicio ou fim lstrip() rstrip()s Removerao caracteres de espacoes em branco das extremidades da esquerda e direita respectivamente Opcionalmente, um argumento do tipo string especifica quais caracteres deverao ser removidos, nao importando a ordem ''' print('\nTestando metodos para remover os espacos:') spam = ' Hello World ' print(spam.strip()) print(spam.lstrip()) print(spam.rstrip()) spam = 'SpamSpamBaconSpamEggsSpamSpamSpam' print(spam.strip('ampS')) ''' Copiando e colando strings com módulo pyperclip O modulo pyperclip tem as funcoes de copy() e paste() capazes de enviar e receber textos do clipboard (area de tranferencia) do seu computador Enviar a saída de seu programa para o clipboard facilitará colá em um email, um processador de texto uo em outro software Necessario usar o import pyperclip para funcionar pip3 install pyperclip ''' print('\nExemplo de pyperclip:') pyperclip.copy('The text to be copied to the clipboard.') print(pyperclip.paste()) # Fontes # Livro Automatiando tarefas maçantes com python # Capitulo 6, Manipulação de strings
28.091954
78
0.731042
1,076
7,332
4.981413
0.358736
0.031716
0.007836
0.014552
0.107836
0.063619
0.063619
0.057649
0.041978
0
0
0.011505
0.158347
7,332
260
79
28.2
0.857073
0.059465
0
0.090909
0
0
0.390214
0.009967
0
0
0
0.046154
0
1
0.009091
false
0
0.009091
0
0.018182
0.672727
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
1
0
2
9e35ea944ec0c202d43a6c194a0d1181957c94eb
84
py
Python
aircraft_framework_win/framework_PhD/framework/profile_code.py
AlejandroRios/IAANDOCAC-aircraft-framework
9768e9736af70e20e8ef1cc0ad6501f3a28dbb47
[ "Apache-2.0" ]
null
null
null
aircraft_framework_win/framework_PhD/framework/profile_code.py
AlejandroRios/IAANDOCAC-aircraft-framework
9768e9736af70e20e8ef1cc0ad6501f3a28dbb47
[ "Apache-2.0" ]
null
null
null
aircraft_framework_win/framework_PhD/framework/profile_code.py
AlejandroRios/IAANDOCAC-aircraft-framework
9768e9736af70e20e8ef1cc0ad6501f3a28dbb47
[ "Apache-2.0" ]
null
null
null
import pstats p = pstats.Stats('file.prof') p.sort_stats('cumtime') p.print_stats(5)
21
29
0.75
15
84
4.066667
0.666667
0
0
0
0
0
0
0
0
0
0
0.012821
0.071429
84
4
30
21
0.769231
0
0
0
0
0
0.188235
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
9e3d38722b7c0878ffe49de1a1bd75ecdf8e6ab1
1,992
py
Python
dft/harmonic_oscillator.py
jordan-melendez/dft_emulator
123966d3a30b0e53d2ee9f6cf3210606d6a80ebd
[ "MIT" ]
null
null
null
dft/harmonic_oscillator.py
jordan-melendez/dft_emulator
123966d3a30b0e53d2ee9f6cf3210606d6a80ebd
[ "MIT" ]
null
null
null
dft/harmonic_oscillator.py
jordan-melendez/dft_emulator
123966d3a30b0e53d2ee9f6cf3210606d6a80ebd
[ "MIT" ]
null
null
null
from scipy.special import eval_genlaguerre, gammaln import numpy as np from .constants import hbar_c, pi def compute_omega(mass, b): R"""Returns omega in units of MeV Parameters ---------- mass b """ return hbar_c ** 2 / (mass * b ** 2) def ho_radial_wf(r, n, ell, b): r"""The radial wave function u_{nl} for the 3d isotropic harmonic oscillator. These are normalized such that \int |u_nl(r)|**2 dr = 1 Parameters ---------- r : The distance in fm n : The n quantum number ell : The angular momentum quantum number b : The oscillator parameter # mass : # Mass in MeV # omega : # The harmonic oscillator angular frequency in MeV Returns ------- u_nl """ # b = 1 / np.sqrt(mass * omega / hbar_c) # N_{nl} = 2 Gamma(n) / [b * Gamma(n + l + 1/2)] norm = np.sqrt(2 * np.exp(gammaln(n) - np.log(b) - gammaln(n + ell + 0.5))) y = r / b y2 = y ** 2 laguerre = eval_genlaguerre(n - 1, ell + 0.5, y2) return norm * y ** (ell + 1) * np.exp(-y2 / 2) * laguerre def ho_energy(n, ell, omega): R"""The energy of the harmonic oscillator Note that N = 2 (n - 1) + ell. Parameters ---------- n ell omega Returns ------- """ return omega * (2 * (n - 1) + ell + 3 / 2) def ho_density(r, n_max, g, b): rho = np.zeros(len(r)) for ell in range(n_max+1): max_idx = maximum_wf_index(n_max=n_max, ell=ell) for i in range(max_idx+1): n = i + 1 # n starts at 1, not 0 u_nl = ho_radial_wf(r=r, n=n, ell=ell, b=b) rho += (2 * ell + 1) * u_nl ** 2 rho *= g / (4 * pi * r ** 2) return rho def total_fermions(n_max, g): return g * (n_max + 1) * (n_max + 2) * (n_max + 3) / 6 def total_fermions_one_shell(N, g): return g * (N + 1) * (N + 2) / 2 def maximum_wf_index(n_max, ell): return int(np.floor((n_max - ell) / 2))
22.133333
81
0.532631
323
1,992
3.167183
0.291022
0.039101
0.014663
0.021505
0.035191
0
0
0
0
0
0
0.033161
0.318775
1,992
89
82
22.382022
0.720707
0.34739
0
0
0
0
0
0
0
0
0
0
0
1
0.21875
false
0
0.09375
0.09375
0.53125
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
9e41f09cad5ffa179c502783978b88e68435c61a
142
py
Python
redactor/settings/LanguageSettings.py
BrickText/BrickText
1a4f5330bf89e74b169866df02502663d91fc4a5
[ "MIT" ]
2
2017-10-02T20:50:03.000Z
2021-03-26T23:05:27.000Z
redactor/settings/LanguageSettings.py
BrickText/BrickText
1a4f5330bf89e74b169866df02502663d91fc4a5
[ "MIT" ]
1
2017-03-17T20:47:04.000Z
2017-04-25T07:59:05.000Z
redactor/settings/LanguageSettings.py
BrickText/BrickText
1a4f5330bf89e74b169866df02502663d91fc4a5
[ "MIT" ]
1
2019-04-02T23:20:05.000Z
2019-04-02T23:20:05.000Z
languages = { "c": "c", "cpp": "cpp", "cc": "cpp", "cs": "csharp", "java": "java", "py": "python", "rb": "ruby" }
14.2
19
0.366197
15
142
3.466667
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.323944
142
9
20
15.777778
0.541667
0
0
0
0
0
0.302817
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
9e549b4fb4b4e8c5623114b9c7e98ab333d32dbb
7,278
py
Python
netboxers/models/dnsmasq_dhcp.py
okoeroo/netbox-tools
fab502ad038fc0395e5d54435a2ba90189d8a6cf
[ "MIT" ]
5
2020-08-31T22:56:07.000Z
2021-08-09T18:41:39.000Z
netboxers/models/dnsmasq_dhcp.py
okoeroo/netbox-tools
fab502ad038fc0395e5d54435a2ba90189d8a6cf
[ "MIT" ]
null
null
null
netboxers/models/dnsmasq_dhcp.py
okoeroo/netbox-tools
fab502ad038fc0395e5d54435a2ba90189d8a6cf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 class DNSMasq_DHCP_Generic_Switchable: def __init__(self, name, value): self.name = name self.value = value def __str__(self): if self.value is None: return self.name elif self.value is not None: return self.name + "=" + self.value class DNSMasq_DHCP_Option: def __init__(self, option, value): scope = None self.option = option self.value = value def __init__(self, scope, option, value): self.scope = scope self.option = option self.value = value def get_scope(self): return self.scope def get_option(self): return self.option def get_value(self): return self.value def get_comment(self): if self.get_option() == "3": return "# Default Gateway" elif self.get_option() == "6": return "# Default DNS" elif self.get_option() == "42": return "# Default NTP" else: return "" def __add__(self, o): return self.get_str() + o def __str__(self): return self.get_str() def get_str(self): res = [] if self.get_scope() is not None: res.append(str(self.get_scope())) res.append(str(self.get_option())) res.append(str(self.get_value())) return "dhcp-option=" + \ ",".join(res) + \ " " + \ str(self.get_comment()) class DNSMasq_DHCP_Range: def __init__(self, range_min, range_max, netmask, lease_time): scope = None self.range_min = range_min self.range_max = range_max self.netmask = netmask self.lease_time = lease_time def __init__(self, scope, range_min, range_max, netmask, lease_time): self.scope = scope self.range_min = range_min self.range_max = range_max self.netmask = netmask self.lease_time = lease_time def get_scope(self): return self.scope def get_range_min(self): return self.range_min def get_range_max(self): return self.range_max def get_netmask(self): return self.netmask def get_lease_time(self): return self.lease_time def __add__(self, o): return self.get_str() + o def __str__(self): return self.get_str() def get_str(self): res = [] if self.get_scope() is not None: res.append(str(self.get_scope())) res.append(str(self.get_range_min())) res.append(str(self.get_range_max())) res.append(str(self.get_netmask())) res.append(str(self.get_lease_time())) return "dhcp-range=" + \ ",".join(res) class DNSMasq_DHCP_Host: def __init__(self, mac_address, hostname, ip_address, lease_time): scope = None self.mac_address = mac_address self.hostname = hostname self.ip_address = ip_address self.lease_time = lease_time def __init__(self, scope, mac_address, hostname, ip_address, lease_time): self.scope = scope self.mac_address = mac_address self.hostname = hostname self.ip_address = ip_address self.lease_time = lease_time def get_scope(self): return self.scope def get_mac_address(self): return self.mac_address def get_hostname(self): return self.hostname def get_ip_address(self): return self.ip_address def get_lease_time(self): return self.lease_time def __add__(self, o): return self.get_str() + o def __str__(self): return self.get_str() def get_str(self): res = [] if self.get_scope() is not None: res.append(str(self.get_scope())) res.append(str(self.get_mac_address())) res.append(str(self.get_hostname())) res.append(str(self.get_ip_address())) res.append(str(self.get_lease_time())) return "dhcp-host=" + \ ",".join(res) class DNSMasq_DHCP_Section: def __init__(self): self.site = None self.role = None self.vlan_id = None self.vlan_name = None self.vrf_name = None self.prefix = None self.dhcp_options = [] self.dhcp_ranges = [] self.dhcp_hosts = [] def set_site(self, site): self.site = site def set_role(self, role): self.role = role def set_vlan_id(self, vlan_id): self.vlan_id = vlan_id def set_vlan_name(self, vlan_name): self.vlan_name = vlan_name def set_vrf_name(self, vrf_name): self.vrf_name = vrf_name def set_prefix(self, prefix): self.prefix = prefix def append_dhcp_option(self, dhcp_option): self.dhcp_options.append(dhcp_option) def append_dhcp_range(self, dhcp_range): self.dhcp_ranges.append(dhcp_range) def append_dhcp_host(self, dhcp_host): self.dhcp_hosts.append(dhcp_host) def get_header(self): # Example ### Site: Home ### Role: Untagged ### Vlan: 66 (Home VLAN) with ID: 66 ### VRF: vrf_66_homelan ### Prefix: 192.168.1.0/24 res = [] if self.site is not None: res.append("### Site: " + self.site) if self.role is not None: res.append("### Role: " + self.role) if self.vlan_id is not None and self.vlan_name is not None: res.append("### Vlan: " + self.vlan_name + " with ID: " + str(self.vlan_id)) elif self.vlan_id is not None: res.append("### Vlan ID: " + str(self.vlan_id)) elif self.vlan_name is not None: res.append("### Vlan: " + self.vlan_name) if self.vrf_name is not None: res.append("### VRF: " + self.vrf_name) if self.prefix is not None: res.append("### Prefix: " + self.prefix) return "\n".join(res) def get_options(self): return self.dhcp_options def get_ranges(self): return self.dhcp_ranges def get_hosts(self): return self.dhcp_hosts class DNSMasq_DHCP_Config: def __init__(self): self.dhcp_config_generic_switches = [] self.dhcp_config_sections = [] def append_to_dhcp_config_generic_switches(self, obj): self.dhcp_config_generic_switches.append(obj) def append_to_dhcp_config_sections(self, obj): self.dhcp_config_sections.append(obj) def print(self): print(self) def __str__(self): res = [] for sw in self.dhcp_config_generic_switches: res.append(str(sw)) for sec in self.dhcp_config_sections: res.append(str("")) res.append(str("")) res.append(str(sec.get_header())) res.append(str("")) for opts in sec.get_options(): res.append(str(opts)) res.append(str("")) for ran in sec.get_ranges(): res.append(str(ran)) res.append(str("")) for host in sec.get_hosts(): res.append(str(host)) return "\n".join(res)
25.010309
91
0.57612
946
7,278
4.153277
0.090909
0.06872
0.070247
0.05294
0.509544
0.398066
0.349453
0.298804
0.287096
0.251973
0
0.004203
0.313548
7,278
290
92
25.096552
0.782226
0.019923
0
0.38806
0
0
0.026848
0
0
0
0
0
0
1
0.248756
false
0
0
0.109453
0.442786
0.00995
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
2
9e768cc654e4022bf5e732d056acf0441c87450d
121,704
py
Python
src/python_pachyderm/client/pfs/pfs_pb2.py
suneeta-mall/python-pachyderm
d61db58ee358e6340bc78375791d68e1ee17231e
[ "Apache-2.0" ]
null
null
null
src/python_pachyderm/client/pfs/pfs_pb2.py
suneeta-mall/python-pachyderm
d61db58ee358e6340bc78375791d68e1ee17231e
[ "Apache-2.0" ]
null
null
null
src/python_pachyderm/client/pfs/pfs_pb2.py
suneeta-mall/python-pachyderm
d61db58ee358e6340bc78375791d68e1ee17231e
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: client/pfs/pfs.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 from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 from python_pachyderm.client.auth import auth_pb2 as client_dot_auth_dot_auth__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='client/pfs/pfs.proto', package='pfs', syntax='proto3', serialized_pb=_b('\n\x14\x63lient/pfs/pfs.proto\x12\x03pfs\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x16\x63lient/auth/auth.proto\"\x14\n\x04Repo\x12\x0c\n\x04name\x18\x01 \x01(\t\"5\n\nBranchInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x04head\x18\x02 \x01(\x0b\x32\x0b.pfs.Commit\"3\n\x0b\x42ranchInfos\x12$\n\x0b\x62ranch_info\x18\x01 \x03(\x0b\x32\x0f.pfs.BranchInfo\"1\n\x04\x46ile\x12\x1b\n\x06\x63ommit\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\x12\x0c\n\x04path\x18\x02 \x01(\t\"\x15\n\x05\x42lock\x12\x0c\n\x04hash\x18\x01 \x01(\t\"\x16\n\x06Object\x12\x0c\n\x04hash\x18\x01 \x01(\t\"\x13\n\x03Tag\x12\x0c\n\x04name\x18\x01 \x01(\t\"\xbe\x01\n\x08RepoInfo\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\x12+\n\x07\x63reated\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nsize_bytes\x18\x03 \x01(\x04\x12\x1d\n\nprovenance\x18\x04 \x03(\x0b\x32\t.pfs.Repo\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12$\n\tauth_info\x18\x06 \x01(\x0b\x32\x11.pfs.RepoAuthInfo\"1\n\x0cRepoAuthInfo\x12!\n\x0c\x61\x63\x63\x65ss_level\x18\x01 \x01(\x0e\x32\x0b.auth.Scope\"-\n\x06\x43ommit\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\x12\n\n\x02id\x18\x02 \x01(\t\"\x8d\x02\n\nCommitInfo\x12\x1b\n\x06\x63ommit\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\x12\x13\n\x0b\x64\x65scription\x18\x08 \x01(\t\x12\"\n\rparent_commit\x18\x02 \x01(\x0b\x32\x0b.pfs.Commit\x12+\n\x07started\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x66inished\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nsize_bytes\x18\x05 \x01(\x04\x12\x1f\n\nprovenance\x18\x06 \x03(\x0b\x32\x0b.pfs.Commit\x12\x19\n\x04tree\x18\x07 \x01(\x0b\x32\x0b.pfs.Object\"\x97\x01\n\x08\x46ileInfo\x12\x17\n\x04\x66ile\x18\x01 \x01(\x0b\x32\t.pfs.File\x12 \n\tfile_type\x18\x02 \x01(\x0e\x32\r.pfs.FileType\x12\x12\n\nsize_bytes\x18\x03 \x01(\x04\x12\x10\n\x08\x63hildren\x18\x06 \x03(\t\x12\x1c\n\x07objects\x18\x08 \x03(\x0b\x32\x0b.pfs.Object\x12\x0c\n\x04hash\x18\x07 \x01(\x0c\")\n\tByteRange\x12\r\n\x05lower\x18\x01 \x01(\x04\x12\r\n\x05upper\x18\x02 \x01(\x04\"D\n\x08\x42lockRef\x12\x19\n\x05\x62lock\x18\x01 \x01(\x0b\x32\n.pfs.Block\x12\x1d\n\x05range\x18\x02 \x01(\x0b\x32\x0e.pfs.ByteRange\"K\n\nObjectInfo\x12\x1b\n\x06object\x18\x01 \x01(\x0b\x32\x0b.pfs.Object\x12 \n\tblock_ref\x18\x02 \x01(\x0b\x32\r.pfs.BlockRef\"p\n\x11\x43reateRepoRequest\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\x12\x1d\n\nprovenance\x18\x02 \x03(\x0b\x32\t.pfs.Repo\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0e\n\x06update\x18\x04 \x01(\x08\"-\n\x12InspectRepoRequest\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\"0\n\x0fListRepoRequest\x12\x1d\n\nprovenance\x18\x01 \x03(\x0b\x32\t.pfs.Repo\"4\n\x10ListRepoResponse\x12 \n\trepo_info\x18\x01 \x03(\x0b\x32\r.pfs.RepoInfo\"H\n\x11\x44\x65leteRepoRequest\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x12\x0b\n\x03\x61ll\x18\x03 \x01(\x08\"w\n\x12StartCommitRequest\x12\x1b\n\x06parent\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x03 \x01(\t\x12\x1f\n\nprovenance\x18\x02 \x03(\x0b\x32\x0b.pfs.Commit\"}\n\x12\x42uildCommitRequest\x12\x1b\n\x06parent\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\x12\x0e\n\x06\x62ranch\x18\x04 \x01(\t\x12\x1f\n\nprovenance\x18\x02 \x03(\x0b\x32\x0b.pfs.Commit\x12\x19\n\x04tree\x18\x03 \x01(\x0b\x32\x0b.pfs.Object\"G\n\x13\x46inishCommitRequest\x12\x1b\n\x06\x63ommit\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"3\n\x14InspectCommitRequest\x12\x1b\n\x06\x63ommit\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\"p\n\x11ListCommitRequest\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\x12\x19\n\x04\x66rom\x18\x02 \x01(\x0b\x32\x0b.pfs.Commit\x12\x17\n\x02to\x18\x03 \x01(\x0b\x32\x0b.pfs.Commit\x12\x0e\n\x06number\x18\x04 \x01(\x04\"3\n\x0b\x43ommitInfos\x12$\n\x0b\x63ommit_info\x18\x01 \x03(\x0b\x32\x0f.pfs.CommitInfo\",\n\x11ListBranchRequest\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\"?\n\x10SetBranchRequest\x12\x1b\n\x06\x63ommit\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\x12\x0e\n\x06\x62ranch\x18\x02 \x01(\t\">\n\x13\x44\x65leteBranchRequest\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\x12\x0e\n\x06\x62ranch\x18\x02 \x01(\t\"2\n\x13\x44\x65leteCommitRequest\x12\x1b\n\x06\x63ommit\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\"O\n\x12\x46lushCommitRequest\x12\x1c\n\x07\x63ommits\x18\x01 \x03(\x0b\x32\x0b.pfs.Commit\x12\x1b\n\x08to_repos\x18\x02 \x03(\x0b\x32\t.pfs.Repo\"\\\n\x16SubscribeCommitRequest\x12\x17\n\x04repo\x18\x01 \x01(\x0b\x32\t.pfs.Repo\x12\x0e\n\x06\x62ranch\x18\x02 \x01(\t\x12\x19\n\x04\x66rom\x18\x03 \x01(\x0b\x32\x0b.pfs.Commit\"S\n\x0eGetFileRequest\x12\x17\n\x04\x66ile\x18\x01 \x01(\x0b\x32\t.pfs.File\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\x12\x12\n\nsize_bytes\x18\x03 \x01(\x03\"\x1f\n\x0eOverwriteIndex\x12\r\n\x05index\x18\x01 \x01(\x03\"\xe6\x01\n\x0ePutFileRequest\x12\x17\n\x04\x66ile\x18\x01 \x01(\x0b\x32\t.pfs.File\x12\r\n\x05value\x18\x03 \x01(\x0c\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x11\n\trecursive\x18\x06 \x01(\x08\x12!\n\tdelimiter\x18\x07 \x01(\x0e\x32\x0e.pfs.Delimiter\x12\x1a\n\x12target_file_datums\x18\x08 \x01(\x03\x12\x19\n\x11target_file_bytes\x18\t \x01(\x03\x12,\n\x0foverwrite_index\x18\n \x01(\x0b\x32\x13.pfs.OverwriteIndexJ\x04\x08\x02\x10\x03\"f\n\rPutFileRecord\x12\x12\n\nsize_bytes\x18\x01 \x01(\x03\x12\x13\n\x0bobject_hash\x18\x02 \x01(\t\x12,\n\x0foverwrite_index\x18\x03 \x01(\x0b\x32\x13.pfs.OverwriteIndex\"W\n\x0ePutFileRecords\x12\r\n\x05split\x18\x01 \x01(\x08\x12#\n\x07records\x18\x02 \x03(\x0b\x32\x12.pfs.PutFileRecord\x12\x11\n\ttombstone\x18\x03 \x01(\x08\"T\n\x0f\x43opyFileRequest\x12\x16\n\x03src\x18\x01 \x01(\x0b\x32\t.pfs.File\x12\x16\n\x03\x64st\x18\x02 \x01(\x0b\x32\t.pfs.File\x12\x11\n\toverwrite\x18\x03 \x01(\x08\"-\n\x12InspectFileRequest\x12\x17\n\x04\x66ile\x18\x01 \x01(\x0b\x32\t.pfs.File\"8\n\x0fListFileRequest\x12\x17\n\x04\x66ile\x18\x01 \x01(\x0b\x32\t.pfs.File\x12\x0c\n\x04\x66ull\x18\x02 \x01(\x08\"?\n\x0fGlobFileRequest\x12\x1b\n\x06\x63ommit\x18\x01 \x01(\x0b\x32\x0b.pfs.Commit\x12\x0f\n\x07pattern\x18\x02 \x01(\t\"-\n\tFileInfos\x12 \n\tfile_info\x18\x01 \x03(\x0b\x32\r.pfs.FileInfo\"\\\n\x0f\x44iffFileRequest\x12\x1b\n\x08new_file\x18\x01 \x01(\x0b\x32\t.pfs.File\x12\x1b\n\x08old_file\x18\x02 \x01(\x0b\x32\t.pfs.File\x12\x0f\n\x07shallow\x18\x03 \x01(\x08\"V\n\x10\x44iffFileResponse\x12 \n\tnew_files\x18\x01 \x03(\x0b\x32\r.pfs.FileInfo\x12 \n\told_files\x18\x02 \x03(\x0b\x32\r.pfs.FileInfo\",\n\x11\x44\x65leteFileRequest\x12\x17\n\x04\x66ile\x18\x01 \x01(\x0b\x32\t.pfs.File\"9\n\x10PutObjectRequest\x12\r\n\x05value\x18\x01 \x01(\x0c\x12\x16\n\x04tags\x18\x02 \x03(\x0b\x32\x08.pfs.Tag\"o\n\x11GetObjectsRequest\x12\x1c\n\x07objects\x18\x01 \x03(\x0b\x32\x0b.pfs.Object\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x04\x12\x12\n\nsize_bytes\x18\x03 \x01(\x04\x12\x12\n\ntotal_size\x18\x04 \x01(\x04\"G\n\x10TagObjectRequest\x12\x1b\n\x06object\x18\x01 \x01(\x0b\x32\x0b.pfs.Object\x12\x16\n\x04tags\x18\x02 \x03(\x0b\x32\x08.pfs.Tag\"\x14\n\x12ListObjectsRequest\"8\n\x0fListTagsRequest\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x15\n\rincludeObject\x18\x02 \x01(\x08\"<\n\x10ListTagsResponse\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x1b\n\x06object\x18\x02 \x01(\x0b\x32\x0b.pfs.Object\"4\n\x14\x44\x65leteObjectsRequest\x12\x1c\n\x07objects\x18\x01 \x03(\x0b\x32\x0b.pfs.Object\"\x17\n\x15\x44\x65leteObjectsResponse\"!\n\x11\x44\x65leteTagsRequest\x12\x0c\n\x04tags\x18\x01 \x03(\t\"\x14\n\x12\x44\x65leteTagsResponse\"1\n\x12\x43heckObjectRequest\x12\x1b\n\x06object\x18\x01 \x01(\x0b\x32\x0b.pfs.Object\"%\n\x13\x43heckObjectResponse\x12\x0e\n\x06\x65xists\x18\x01 \x01(\x08\"\'\n\x07Objects\x12\x1c\n\x07objects\x18\x01 \x03(\x0b\x32\x0b.pfs.Object\"\xe0\x01\n\x0bObjectIndex\x12.\n\x07objects\x18\x01 \x03(\x0b\x32\x1d.pfs.ObjectIndex.ObjectsEntry\x12(\n\x04tags\x18\x02 \x03(\x0b\x32\x1a.pfs.ObjectIndex.TagsEntry\x1a=\n\x0cObjectsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1c\n\x05value\x18\x02 \x01(\x0b\x32\r.pfs.BlockRef:\x02\x38\x01\x1a\x38\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1a\n\x05value\x18\x02 \x01(\x0b\x32\x0b.pfs.Object:\x02\x38\x01*+\n\x08\x46ileType\x12\x0c\n\x08RESERVED\x10\x00\x12\x08\n\x04\x46ILE\x10\x01\x12\x07\n\x03\x44IR\x10\x02*)\n\tDelimiter\x12\x08\n\x04NONE\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x08\n\x04LINE\x10\x02\x32\xf1\x0c\n\x03\x41PI\x12>\n\nCreateRepo\x12\x16.pfs.CreateRepoRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x37\n\x0bInspectRepo\x12\x17.pfs.InspectRepoRequest\x1a\r.pfs.RepoInfo\"\x00\x12\x39\n\x08ListRepo\x12\x14.pfs.ListRepoRequest\x1a\x15.pfs.ListRepoResponse\"\x00\x12>\n\nDeleteRepo\x12\x16.pfs.DeleteRepoRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x35\n\x0bStartCommit\x12\x17.pfs.StartCommitRequest\x1a\x0b.pfs.Commit\"\x00\x12\x42\n\x0c\x46inishCommit\x12\x18.pfs.FinishCommitRequest\x1a\x16.google.protobuf.Empty\"\x00\x12=\n\rInspectCommit\x12\x19.pfs.InspectCommitRequest\x1a\x0f.pfs.CommitInfo\"\x00\x12\x38\n\nListCommit\x12\x16.pfs.ListCommitRequest\x1a\x10.pfs.CommitInfos\"\x00\x12?\n\x10ListCommitStream\x12\x16.pfs.ListCommitRequest\x1a\x0f.pfs.CommitInfo\"\x00\x30\x01\x12\x42\n\x0c\x44\x65leteCommit\x12\x18.pfs.DeleteCommitRequest\x1a\x16.google.protobuf.Empty\"\x00\x12;\n\x0b\x46lushCommit\x12\x17.pfs.FlushCommitRequest\x1a\x0f.pfs.CommitInfo\"\x00\x30\x01\x12\x43\n\x0fSubscribeCommit\x12\x1b.pfs.SubscribeCommitRequest\x1a\x0f.pfs.CommitInfo\"\x00\x30\x01\x12\x35\n\x0b\x42uildCommit\x12\x17.pfs.BuildCommitRequest\x1a\x0b.pfs.Commit\"\x00\x12\x38\n\nListBranch\x12\x16.pfs.ListBranchRequest\x1a\x10.pfs.BranchInfos\"\x00\x12<\n\tSetBranch\x12\x15.pfs.SetBranchRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x42\n\x0c\x44\x65leteBranch\x12\x18.pfs.DeleteBranchRequest\x1a\x16.google.protobuf.Empty\"\x00\x12:\n\x07PutFile\x12\x13.pfs.PutFileRequest\x1a\x16.google.protobuf.Empty\"\x00(\x01\x12:\n\x08\x43opyFile\x12\x14.pfs.CopyFileRequest\x1a\x16.google.protobuf.Empty\"\x00\x12?\n\x07GetFile\x12\x13.pfs.GetFileRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12\x37\n\x0bInspectFile\x12\x17.pfs.InspectFileRequest\x1a\r.pfs.FileInfo\"\x00\x12\x32\n\x08ListFile\x12\x14.pfs.ListFileRequest\x1a\x0e.pfs.FileInfos\"\x00\x12\x39\n\x0eListFileStream\x12\x14.pfs.ListFileRequest\x1a\r.pfs.FileInfo\"\x00\x30\x01\x12\x32\n\x08GlobFile\x12\x14.pfs.GlobFileRequest\x1a\x0e.pfs.FileInfos\"\x00\x12\x39\n\x0eGlobFileStream\x12\x14.pfs.GlobFileRequest\x1a\r.pfs.FileInfo\"\x00\x30\x01\x12\x39\n\x08\x44iffFile\x12\x14.pfs.DiffFileRequest\x1a\x15.pfs.DiffFileResponse\"\x00\x12>\n\nDeleteFile\x12\x16.pfs.DeleteFileRequest\x1a\x16.google.protobuf.Empty\"\x00\x12=\n\tDeleteAll\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x32\xce\x06\n\tObjectAPI\x12\x33\n\tPutObject\x12\x15.pfs.PutObjectRequest\x1a\x0b.pfs.Object\"\x00(\x01\x12\x39\n\x0ePutObjectSplit\x12\x15.pfs.PutObjectRequest\x1a\x0c.pfs.Objects\"\x00(\x01\x12\x39\n\tGetObject\x12\x0b.pfs.Object\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12\x45\n\nGetObjects\x12\x16.pfs.GetObjectsRequest\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12<\n\tTagObject\x12\x15.pfs.TagObjectRequest\x1a\x16.google.protobuf.Empty\"\x00\x12/\n\rInspectObject\x12\x0b.pfs.Object\x1a\x0f.pfs.ObjectInfo\"\x00\x12\x42\n\x0b\x43heckObject\x12\x17.pfs.CheckObjectRequest\x1a\x18.pfs.CheckObjectResponse\"\x00\x12\x37\n\x0bListObjects\x12\x17.pfs.ListObjectsRequest\x1a\x0b.pfs.Object\"\x00\x30\x01\x12H\n\rDeleteObjects\x12\x19.pfs.DeleteObjectsRequest\x1a\x1a.pfs.DeleteObjectsResponse\"\x00\x12\x33\n\x06GetTag\x12\x08.pfs.Tag\x1a\x1b.google.protobuf.BytesValue\"\x00\x30\x01\x12)\n\nInspectTag\x12\x08.pfs.Tag\x1a\x0f.pfs.ObjectInfo\"\x00\x12;\n\x08ListTags\x12\x14.pfs.ListTagsRequest\x1a\x15.pfs.ListTagsResponse\"\x00\x30\x01\x12?\n\nDeleteTags\x12\x16.pfs.DeleteTagsRequest\x1a\x17.pfs.DeleteTagsResponse\"\x00\x12;\n\x07\x43ompact\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x62\x06proto3') , dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,client_dot_auth_dot_auth__pb2.DESCRIPTOR,]) _FILETYPE = _descriptor.EnumDescriptor( name='FileType', full_name='pfs.FileType', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='RESERVED', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='FILE', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='DIR', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=4541, serialized_end=4584, ) _sym_db.RegisterEnumDescriptor(_FILETYPE) FileType = enum_type_wrapper.EnumTypeWrapper(_FILETYPE) _DELIMITER = _descriptor.EnumDescriptor( name='Delimiter', full_name='pfs.Delimiter', filename=None, file=DESCRIPTOR, values=[ _descriptor.EnumValueDescriptor( name='NONE', index=0, number=0, options=None, type=None), _descriptor.EnumValueDescriptor( name='JSON', index=1, number=1, options=None, type=None), _descriptor.EnumValueDescriptor( name='LINE', index=2, number=2, options=None, type=None), ], containing_type=None, options=None, serialized_start=4586, serialized_end=4627, ) _sym_db.RegisterEnumDescriptor(_DELIMITER) Delimiter = enum_type_wrapper.EnumTypeWrapper(_DELIMITER) RESERVED = 0 FILE = 1 DIR = 2 NONE = 0 JSON = 1 LINE = 2 _REPO = _descriptor.Descriptor( name='Repo', full_name='pfs.Repo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='name', full_name='pfs.Repo.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=147, serialized_end=167, ) _BRANCHINFO = _descriptor.Descriptor( name='BranchInfo', full_name='pfs.BranchInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='name', full_name='pfs.BranchInfo.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='head', full_name='pfs.BranchInfo.head', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=169, serialized_end=222, ) _BRANCHINFOS = _descriptor.Descriptor( name='BranchInfos', full_name='pfs.BranchInfos', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='branch_info', full_name='pfs.BranchInfos.branch_info', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=224, serialized_end=275, ) _FILE = _descriptor.Descriptor( name='File', full_name='pfs.File', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit', full_name='pfs.File.commit', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='path', full_name='pfs.File.path', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=277, serialized_end=326, ) _BLOCK = _descriptor.Descriptor( name='Block', full_name='pfs.Block', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='hash', full_name='pfs.Block.hash', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=328, serialized_end=349, ) _OBJECT = _descriptor.Descriptor( name='Object', full_name='pfs.Object', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='hash', full_name='pfs.Object.hash', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=351, serialized_end=373, ) _TAG = _descriptor.Descriptor( name='Tag', full_name='pfs.Tag', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='name', full_name='pfs.Tag.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=375, serialized_end=394, ) _REPOINFO = _descriptor.Descriptor( name='RepoInfo', full_name='pfs.RepoInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.RepoInfo.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='created', full_name='pfs.RepoInfo.created', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='size_bytes', full_name='pfs.RepoInfo.size_bytes', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='provenance', full_name='pfs.RepoInfo.provenance', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='pfs.RepoInfo.description', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='auth_info', full_name='pfs.RepoInfo.auth_info', index=5, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=397, serialized_end=587, ) _REPOAUTHINFO = _descriptor.Descriptor( name='RepoAuthInfo', full_name='pfs.RepoAuthInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='access_level', full_name='pfs.RepoAuthInfo.access_level', index=0, number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=589, serialized_end=638, ) _COMMIT = _descriptor.Descriptor( name='Commit', full_name='pfs.Commit', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.Commit.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='id', full_name='pfs.Commit.id', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=640, serialized_end=685, ) _COMMITINFO = _descriptor.Descriptor( name='CommitInfo', full_name='pfs.CommitInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit', full_name='pfs.CommitInfo.commit', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='pfs.CommitInfo.description', index=1, number=8, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='parent_commit', full_name='pfs.CommitInfo.parent_commit', index=2, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='started', full_name='pfs.CommitInfo.started', index=3, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='finished', full_name='pfs.CommitInfo.finished', index=4, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='size_bytes', full_name='pfs.CommitInfo.size_bytes', index=5, 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='provenance', full_name='pfs.CommitInfo.provenance', index=6, number=6, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tree', full_name='pfs.CommitInfo.tree', index=7, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=688, serialized_end=957, ) _FILEINFO = _descriptor.Descriptor( name='FileInfo', full_name='pfs.FileInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='file', full_name='pfs.FileInfo.file', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='file_type', full_name='pfs.FileInfo.file_type', index=1, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='size_bytes', full_name='pfs.FileInfo.size_bytes', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='children', full_name='pfs.FileInfo.children', index=3, number=6, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='objects', full_name='pfs.FileInfo.objects', index=4, number=8, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='hash', full_name='pfs.FileInfo.hash', index=5, 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=960, serialized_end=1111, ) _BYTERANGE = _descriptor.Descriptor( name='ByteRange', full_name='pfs.ByteRange', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='lower', full_name='pfs.ByteRange.lower', index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='upper', full_name='pfs.ByteRange.upper', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1113, serialized_end=1154, ) _BLOCKREF = _descriptor.Descriptor( name='BlockRef', full_name='pfs.BlockRef', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='block', full_name='pfs.BlockRef.block', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='range', full_name='pfs.BlockRef.range', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1156, serialized_end=1224, ) _OBJECTINFO = _descriptor.Descriptor( name='ObjectInfo', full_name='pfs.ObjectInfo', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='object', full_name='pfs.ObjectInfo.object', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='block_ref', full_name='pfs.ObjectInfo.block_ref', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1226, serialized_end=1301, ) _CREATEREPOREQUEST = _descriptor.Descriptor( name='CreateRepoRequest', full_name='pfs.CreateRepoRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.CreateRepoRequest.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='provenance', full_name='pfs.CreateRepoRequest.provenance', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='pfs.CreateRepoRequest.description', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='update', full_name='pfs.CreateRepoRequest.update', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1303, serialized_end=1415, ) _INSPECTREPOREQUEST = _descriptor.Descriptor( name='InspectRepoRequest', full_name='pfs.InspectRepoRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.InspectRepoRequest.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1417, serialized_end=1462, ) _LISTREPOREQUEST = _descriptor.Descriptor( name='ListRepoRequest', full_name='pfs.ListRepoRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='provenance', full_name='pfs.ListRepoRequest.provenance', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1464, serialized_end=1512, ) _LISTREPORESPONSE = _descriptor.Descriptor( name='ListRepoResponse', full_name='pfs.ListRepoResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo_info', full_name='pfs.ListRepoResponse.repo_info', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1514, serialized_end=1566, ) _DELETEREPOREQUEST = _descriptor.Descriptor( name='DeleteRepoRequest', full_name='pfs.DeleteRepoRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.DeleteRepoRequest.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='force', full_name='pfs.DeleteRepoRequest.force', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='all', full_name='pfs.DeleteRepoRequest.all', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1568, serialized_end=1640, ) _STARTCOMMITREQUEST = _descriptor.Descriptor( name='StartCommitRequest', full_name='pfs.StartCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='parent', full_name='pfs.StartCommitRequest.parent', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='pfs.StartCommitRequest.description', index=1, 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='branch', full_name='pfs.StartCommitRequest.branch', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='provenance', full_name='pfs.StartCommitRequest.provenance', index=3, 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1642, serialized_end=1761, ) _BUILDCOMMITREQUEST = _descriptor.Descriptor( name='BuildCommitRequest', full_name='pfs.BuildCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='parent', full_name='pfs.BuildCommitRequest.parent', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='branch', full_name='pfs.BuildCommitRequest.branch', index=1, 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='provenance', full_name='pfs.BuildCommitRequest.provenance', index=2, 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tree', full_name='pfs.BuildCommitRequest.tree', index=3, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1763, serialized_end=1888, ) _FINISHCOMMITREQUEST = _descriptor.Descriptor( name='FinishCommitRequest', full_name='pfs.FinishCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit', full_name='pfs.FinishCommitRequest.commit', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='description', full_name='pfs.FinishCommitRequest.description', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1890, serialized_end=1961, ) _INSPECTCOMMITREQUEST = _descriptor.Descriptor( name='InspectCommitRequest', full_name='pfs.InspectCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit', full_name='pfs.InspectCommitRequest.commit', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1963, serialized_end=2014, ) _LISTCOMMITREQUEST = _descriptor.Descriptor( name='ListCommitRequest', full_name='pfs.ListCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.ListCommitRequest.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='from', full_name='pfs.ListCommitRequest.from', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='to', full_name='pfs.ListCommitRequest.to', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='number', full_name='pfs.ListCommitRequest.number', index=3, number=4, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2016, serialized_end=2128, ) _COMMITINFOS = _descriptor.Descriptor( name='CommitInfos', full_name='pfs.CommitInfos', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit_info', full_name='pfs.CommitInfos.commit_info', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2130, serialized_end=2181, ) _LISTBRANCHREQUEST = _descriptor.Descriptor( name='ListBranchRequest', full_name='pfs.ListBranchRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.ListBranchRequest.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2183, serialized_end=2227, ) _SETBRANCHREQUEST = _descriptor.Descriptor( name='SetBranchRequest', full_name='pfs.SetBranchRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit', full_name='pfs.SetBranchRequest.commit', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='branch', full_name='pfs.SetBranchRequest.branch', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2229, serialized_end=2292, ) _DELETEBRANCHREQUEST = _descriptor.Descriptor( name='DeleteBranchRequest', full_name='pfs.DeleteBranchRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.DeleteBranchRequest.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='branch', full_name='pfs.DeleteBranchRequest.branch', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2294, serialized_end=2356, ) _DELETECOMMITREQUEST = _descriptor.Descriptor( name='DeleteCommitRequest', full_name='pfs.DeleteCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit', full_name='pfs.DeleteCommitRequest.commit', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2358, serialized_end=2408, ) _FLUSHCOMMITREQUEST = _descriptor.Descriptor( name='FlushCommitRequest', full_name='pfs.FlushCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commits', full_name='pfs.FlushCommitRequest.commits', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='to_repos', full_name='pfs.FlushCommitRequest.to_repos', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2410, serialized_end=2489, ) _SUBSCRIBECOMMITREQUEST = _descriptor.Descriptor( name='SubscribeCommitRequest', full_name='pfs.SubscribeCommitRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='repo', full_name='pfs.SubscribeCommitRequest.repo', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='branch', full_name='pfs.SubscribeCommitRequest.branch', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='from', full_name='pfs.SubscribeCommitRequest.from', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2491, serialized_end=2583, ) _GETFILEREQUEST = _descriptor.Descriptor( name='GetFileRequest', full_name='pfs.GetFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='file', full_name='pfs.GetFileRequest.file', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='offset_bytes', full_name='pfs.GetFileRequest.offset_bytes', index=1, number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='size_bytes', full_name='pfs.GetFileRequest.size_bytes', index=2, number=3, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2585, serialized_end=2668, ) _OVERWRITEINDEX = _descriptor.Descriptor( name='OverwriteIndex', full_name='pfs.OverwriteIndex', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='index', full_name='pfs.OverwriteIndex.index', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2670, serialized_end=2701, ) _PUTFILEREQUEST = _descriptor.Descriptor( name='PutFileRequest', full_name='pfs.PutFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='file', full_name='pfs.PutFileRequest.file', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='pfs.PutFileRequest.value', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='url', full_name='pfs.PutFileRequest.url', index=2, 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='recursive', full_name='pfs.PutFileRequest.recursive', index=3, 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='delimiter', full_name='pfs.PutFileRequest.delimiter', index=4, number=7, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='target_file_datums', full_name='pfs.PutFileRequest.target_file_datums', index=5, number=8, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='target_file_bytes', full_name='pfs.PutFileRequest.target_file_bytes', index=6, number=9, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='overwrite_index', full_name='pfs.PutFileRequest.overwrite_index', index=7, number=10, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2704, serialized_end=2934, ) _PUTFILERECORD = _descriptor.Descriptor( name='PutFileRecord', full_name='pfs.PutFileRecord', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='size_bytes', full_name='pfs.PutFileRecord.size_bytes', index=0, number=1, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='object_hash', full_name='pfs.PutFileRecord.object_hash', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='overwrite_index', full_name='pfs.PutFileRecord.overwrite_index', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=2936, serialized_end=3038, ) _PUTFILERECORDS = _descriptor.Descriptor( name='PutFileRecords', full_name='pfs.PutFileRecords', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='split', full_name='pfs.PutFileRecords.split', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='records', full_name='pfs.PutFileRecords.records', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tombstone', full_name='pfs.PutFileRecords.tombstone', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3040, serialized_end=3127, ) _COPYFILEREQUEST = _descriptor.Descriptor( name='CopyFileRequest', full_name='pfs.CopyFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='src', full_name='pfs.CopyFileRequest.src', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='dst', full_name='pfs.CopyFileRequest.dst', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='overwrite', full_name='pfs.CopyFileRequest.overwrite', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3129, serialized_end=3213, ) _INSPECTFILEREQUEST = _descriptor.Descriptor( name='InspectFileRequest', full_name='pfs.InspectFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='file', full_name='pfs.InspectFileRequest.file', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3215, serialized_end=3260, ) _LISTFILEREQUEST = _descriptor.Descriptor( name='ListFileRequest', full_name='pfs.ListFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='file', full_name='pfs.ListFileRequest.file', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='full', full_name='pfs.ListFileRequest.full', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3262, serialized_end=3318, ) _GLOBFILEREQUEST = _descriptor.Descriptor( name='GlobFileRequest', full_name='pfs.GlobFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='commit', full_name='pfs.GlobFileRequest.commit', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='pattern', full_name='pfs.GlobFileRequest.pattern', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3320, serialized_end=3383, ) _FILEINFOS = _descriptor.Descriptor( name='FileInfos', full_name='pfs.FileInfos', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='file_info', full_name='pfs.FileInfos.file_info', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3385, serialized_end=3430, ) _DIFFFILEREQUEST = _descriptor.Descriptor( name='DiffFileRequest', full_name='pfs.DiffFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='new_file', full_name='pfs.DiffFileRequest.new_file', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='old_file', full_name='pfs.DiffFileRequest.old_file', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='shallow', full_name='pfs.DiffFileRequest.shallow', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3432, serialized_end=3524, ) _DIFFFILERESPONSE = _descriptor.Descriptor( name='DiffFileResponse', full_name='pfs.DiffFileResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='new_files', full_name='pfs.DiffFileResponse.new_files', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='old_files', full_name='pfs.DiffFileResponse.old_files', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3526, serialized_end=3612, ) _DELETEFILEREQUEST = _descriptor.Descriptor( name='DeleteFileRequest', full_name='pfs.DeleteFileRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='file', full_name='pfs.DeleteFileRequest.file', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3614, serialized_end=3658, ) _PUTOBJECTREQUEST = _descriptor.Descriptor( name='PutObjectRequest', full_name='pfs.PutObjectRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='value', full_name='pfs.PutObjectRequest.value', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tags', full_name='pfs.PutObjectRequest.tags', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3660, serialized_end=3717, ) _GETOBJECTSREQUEST = _descriptor.Descriptor( name='GetObjectsRequest', full_name='pfs.GetObjectsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='objects', full_name='pfs.GetObjectsRequest.objects', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='offset_bytes', full_name='pfs.GetObjectsRequest.offset_bytes', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='size_bytes', full_name='pfs.GetObjectsRequest.size_bytes', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='total_size', full_name='pfs.GetObjectsRequest.total_size', index=3, number=4, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3719, serialized_end=3830, ) _TAGOBJECTREQUEST = _descriptor.Descriptor( name='TagObjectRequest', full_name='pfs.TagObjectRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='object', full_name='pfs.TagObjectRequest.object', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tags', full_name='pfs.TagObjectRequest.tags', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3832, serialized_end=3903, ) _LISTOBJECTSREQUEST = _descriptor.Descriptor( name='ListObjectsRequest', full_name='pfs.ListObjectsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3905, serialized_end=3925, ) _LISTTAGSREQUEST = _descriptor.Descriptor( name='ListTagsRequest', full_name='pfs.ListTagsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='prefix', full_name='pfs.ListTagsRequest.prefix', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='includeObject', full_name='pfs.ListTagsRequest.includeObject', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3927, serialized_end=3983, ) _LISTTAGSRESPONSE = _descriptor.Descriptor( name='ListTagsResponse', full_name='pfs.ListTagsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='tag', full_name='pfs.ListTagsResponse.tag', 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, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='object', full_name='pfs.ListTagsResponse.object', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=3985, serialized_end=4045, ) _DELETEOBJECTSREQUEST = _descriptor.Descriptor( name='DeleteObjectsRequest', full_name='pfs.DeleteObjectsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='objects', full_name='pfs.DeleteObjectsRequest.objects', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4047, serialized_end=4099, ) _DELETEOBJECTSRESPONSE = _descriptor.Descriptor( name='DeleteObjectsResponse', full_name='pfs.DeleteObjectsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4101, serialized_end=4124, ) _DELETETAGSREQUEST = _descriptor.Descriptor( name='DeleteTagsRequest', full_name='pfs.DeleteTagsRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='tags', full_name='pfs.DeleteTagsRequest.tags', index=0, number=1, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4126, serialized_end=4159, ) _DELETETAGSRESPONSE = _descriptor.Descriptor( name='DeleteTagsResponse', full_name='pfs.DeleteTagsResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4161, serialized_end=4181, ) _CHECKOBJECTREQUEST = _descriptor.Descriptor( name='CheckObjectRequest', full_name='pfs.CheckObjectRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='object', full_name='pfs.CheckObjectRequest.object', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4183, serialized_end=4232, ) _CHECKOBJECTRESPONSE = _descriptor.Descriptor( name='CheckObjectResponse', full_name='pfs.CheckObjectResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='exists', full_name='pfs.CheckObjectResponse.exists', index=0, number=1, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4234, serialized_end=4271, ) _OBJECTS = _descriptor.Descriptor( name='Objects', full_name='pfs.Objects', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='objects', full_name='pfs.Objects.objects', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4273, serialized_end=4312, ) _OBJECTINDEX_OBJECTSENTRY = _descriptor.Descriptor( name='ObjectsEntry', full_name='pfs.ObjectIndex.ObjectsEntry', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='key', full_name='pfs.ObjectIndex.ObjectsEntry.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='pfs.ObjectIndex.ObjectsEntry.value', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4420, serialized_end=4481, ) _OBJECTINDEX_TAGSENTRY = _descriptor.Descriptor( name='TagsEntry', full_name='pfs.ObjectIndex.TagsEntry', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='key', full_name='pfs.ObjectIndex.TagsEntry.key', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='value', full_name='pfs.ObjectIndex.TagsEntry.value', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], options=_descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')), is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4483, serialized_end=4539, ) _OBJECTINDEX = _descriptor.Descriptor( name='ObjectIndex', full_name='pfs.ObjectIndex', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='objects', full_name='pfs.ObjectIndex.objects', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='tags', full_name='pfs.ObjectIndex.tags', 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, options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[_OBJECTINDEX_OBJECTSENTRY, _OBJECTINDEX_TAGSENTRY, ], enum_types=[ ], options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=4315, serialized_end=4539, ) _BRANCHINFO.fields_by_name['head'].message_type = _COMMIT _BRANCHINFOS.fields_by_name['branch_info'].message_type = _BRANCHINFO _FILE.fields_by_name['commit'].message_type = _COMMIT _REPOINFO.fields_by_name['repo'].message_type = _REPO _REPOINFO.fields_by_name['created'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _REPOINFO.fields_by_name['provenance'].message_type = _REPO _REPOINFO.fields_by_name['auth_info'].message_type = _REPOAUTHINFO _REPOAUTHINFO.fields_by_name['access_level'].enum_type = client_dot_auth_dot_auth__pb2._SCOPE _COMMIT.fields_by_name['repo'].message_type = _REPO _COMMITINFO.fields_by_name['commit'].message_type = _COMMIT _COMMITINFO.fields_by_name['parent_commit'].message_type = _COMMIT _COMMITINFO.fields_by_name['started'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _COMMITINFO.fields_by_name['finished'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP _COMMITINFO.fields_by_name['provenance'].message_type = _COMMIT _COMMITINFO.fields_by_name['tree'].message_type = _OBJECT _FILEINFO.fields_by_name['file'].message_type = _FILE _FILEINFO.fields_by_name['file_type'].enum_type = _FILETYPE _FILEINFO.fields_by_name['objects'].message_type = _OBJECT _BLOCKREF.fields_by_name['block'].message_type = _BLOCK _BLOCKREF.fields_by_name['range'].message_type = _BYTERANGE _OBJECTINFO.fields_by_name['object'].message_type = _OBJECT _OBJECTINFO.fields_by_name['block_ref'].message_type = _BLOCKREF _CREATEREPOREQUEST.fields_by_name['repo'].message_type = _REPO _CREATEREPOREQUEST.fields_by_name['provenance'].message_type = _REPO _INSPECTREPOREQUEST.fields_by_name['repo'].message_type = _REPO _LISTREPOREQUEST.fields_by_name['provenance'].message_type = _REPO _LISTREPORESPONSE.fields_by_name['repo_info'].message_type = _REPOINFO _DELETEREPOREQUEST.fields_by_name['repo'].message_type = _REPO _STARTCOMMITREQUEST.fields_by_name['parent'].message_type = _COMMIT _STARTCOMMITREQUEST.fields_by_name['provenance'].message_type = _COMMIT _BUILDCOMMITREQUEST.fields_by_name['parent'].message_type = _COMMIT _BUILDCOMMITREQUEST.fields_by_name['provenance'].message_type = _COMMIT _BUILDCOMMITREQUEST.fields_by_name['tree'].message_type = _OBJECT _FINISHCOMMITREQUEST.fields_by_name['commit'].message_type = _COMMIT _INSPECTCOMMITREQUEST.fields_by_name['commit'].message_type = _COMMIT _LISTCOMMITREQUEST.fields_by_name['repo'].message_type = _REPO _LISTCOMMITREQUEST.fields_by_name['from'].message_type = _COMMIT _LISTCOMMITREQUEST.fields_by_name['to'].message_type = _COMMIT _COMMITINFOS.fields_by_name['commit_info'].message_type = _COMMITINFO _LISTBRANCHREQUEST.fields_by_name['repo'].message_type = _REPO _SETBRANCHREQUEST.fields_by_name['commit'].message_type = _COMMIT _DELETEBRANCHREQUEST.fields_by_name['repo'].message_type = _REPO _DELETECOMMITREQUEST.fields_by_name['commit'].message_type = _COMMIT _FLUSHCOMMITREQUEST.fields_by_name['commits'].message_type = _COMMIT _FLUSHCOMMITREQUEST.fields_by_name['to_repos'].message_type = _REPO _SUBSCRIBECOMMITREQUEST.fields_by_name['repo'].message_type = _REPO _SUBSCRIBECOMMITREQUEST.fields_by_name['from'].message_type = _COMMIT _GETFILEREQUEST.fields_by_name['file'].message_type = _FILE _PUTFILEREQUEST.fields_by_name['file'].message_type = _FILE _PUTFILEREQUEST.fields_by_name['delimiter'].enum_type = _DELIMITER _PUTFILEREQUEST.fields_by_name['overwrite_index'].message_type = _OVERWRITEINDEX _PUTFILERECORD.fields_by_name['overwrite_index'].message_type = _OVERWRITEINDEX _PUTFILERECORDS.fields_by_name['records'].message_type = _PUTFILERECORD _COPYFILEREQUEST.fields_by_name['src'].message_type = _FILE _COPYFILEREQUEST.fields_by_name['dst'].message_type = _FILE _INSPECTFILEREQUEST.fields_by_name['file'].message_type = _FILE _LISTFILEREQUEST.fields_by_name['file'].message_type = _FILE _GLOBFILEREQUEST.fields_by_name['commit'].message_type = _COMMIT _FILEINFOS.fields_by_name['file_info'].message_type = _FILEINFO _DIFFFILEREQUEST.fields_by_name['new_file'].message_type = _FILE _DIFFFILEREQUEST.fields_by_name['old_file'].message_type = _FILE _DIFFFILERESPONSE.fields_by_name['new_files'].message_type = _FILEINFO _DIFFFILERESPONSE.fields_by_name['old_files'].message_type = _FILEINFO _DELETEFILEREQUEST.fields_by_name['file'].message_type = _FILE _PUTOBJECTREQUEST.fields_by_name['tags'].message_type = _TAG _GETOBJECTSREQUEST.fields_by_name['objects'].message_type = _OBJECT _TAGOBJECTREQUEST.fields_by_name['object'].message_type = _OBJECT _TAGOBJECTREQUEST.fields_by_name['tags'].message_type = _TAG _LISTTAGSRESPONSE.fields_by_name['object'].message_type = _OBJECT _DELETEOBJECTSREQUEST.fields_by_name['objects'].message_type = _OBJECT _CHECKOBJECTREQUEST.fields_by_name['object'].message_type = _OBJECT _OBJECTS.fields_by_name['objects'].message_type = _OBJECT _OBJECTINDEX_OBJECTSENTRY.fields_by_name['value'].message_type = _BLOCKREF _OBJECTINDEX_OBJECTSENTRY.containing_type = _OBJECTINDEX _OBJECTINDEX_TAGSENTRY.fields_by_name['value'].message_type = _OBJECT _OBJECTINDEX_TAGSENTRY.containing_type = _OBJECTINDEX _OBJECTINDEX.fields_by_name['objects'].message_type = _OBJECTINDEX_OBJECTSENTRY _OBJECTINDEX.fields_by_name['tags'].message_type = _OBJECTINDEX_TAGSENTRY DESCRIPTOR.message_types_by_name['Repo'] = _REPO DESCRIPTOR.message_types_by_name['BranchInfo'] = _BRANCHINFO DESCRIPTOR.message_types_by_name['BranchInfos'] = _BRANCHINFOS DESCRIPTOR.message_types_by_name['File'] = _FILE DESCRIPTOR.message_types_by_name['Block'] = _BLOCK DESCRIPTOR.message_types_by_name['Object'] = _OBJECT DESCRIPTOR.message_types_by_name['Tag'] = _TAG DESCRIPTOR.message_types_by_name['RepoInfo'] = _REPOINFO DESCRIPTOR.message_types_by_name['RepoAuthInfo'] = _REPOAUTHINFO DESCRIPTOR.message_types_by_name['Commit'] = _COMMIT DESCRIPTOR.message_types_by_name['CommitInfo'] = _COMMITINFO DESCRIPTOR.message_types_by_name['FileInfo'] = _FILEINFO DESCRIPTOR.message_types_by_name['ByteRange'] = _BYTERANGE DESCRIPTOR.message_types_by_name['BlockRef'] = _BLOCKREF DESCRIPTOR.message_types_by_name['ObjectInfo'] = _OBJECTINFO DESCRIPTOR.message_types_by_name['CreateRepoRequest'] = _CREATEREPOREQUEST DESCRIPTOR.message_types_by_name['InspectRepoRequest'] = _INSPECTREPOREQUEST DESCRIPTOR.message_types_by_name['ListRepoRequest'] = _LISTREPOREQUEST DESCRIPTOR.message_types_by_name['ListRepoResponse'] = _LISTREPORESPONSE DESCRIPTOR.message_types_by_name['DeleteRepoRequest'] = _DELETEREPOREQUEST DESCRIPTOR.message_types_by_name['StartCommitRequest'] = _STARTCOMMITREQUEST DESCRIPTOR.message_types_by_name['BuildCommitRequest'] = _BUILDCOMMITREQUEST DESCRIPTOR.message_types_by_name['FinishCommitRequest'] = _FINISHCOMMITREQUEST DESCRIPTOR.message_types_by_name['InspectCommitRequest'] = _INSPECTCOMMITREQUEST DESCRIPTOR.message_types_by_name['ListCommitRequest'] = _LISTCOMMITREQUEST DESCRIPTOR.message_types_by_name['CommitInfos'] = _COMMITINFOS DESCRIPTOR.message_types_by_name['ListBranchRequest'] = _LISTBRANCHREQUEST DESCRIPTOR.message_types_by_name['SetBranchRequest'] = _SETBRANCHREQUEST DESCRIPTOR.message_types_by_name['DeleteBranchRequest'] = _DELETEBRANCHREQUEST DESCRIPTOR.message_types_by_name['DeleteCommitRequest'] = _DELETECOMMITREQUEST DESCRIPTOR.message_types_by_name['FlushCommitRequest'] = _FLUSHCOMMITREQUEST DESCRIPTOR.message_types_by_name['SubscribeCommitRequest'] = _SUBSCRIBECOMMITREQUEST DESCRIPTOR.message_types_by_name['GetFileRequest'] = _GETFILEREQUEST DESCRIPTOR.message_types_by_name['OverwriteIndex'] = _OVERWRITEINDEX DESCRIPTOR.message_types_by_name['PutFileRequest'] = _PUTFILEREQUEST DESCRIPTOR.message_types_by_name['PutFileRecord'] = _PUTFILERECORD DESCRIPTOR.message_types_by_name['PutFileRecords'] = _PUTFILERECORDS DESCRIPTOR.message_types_by_name['CopyFileRequest'] = _COPYFILEREQUEST DESCRIPTOR.message_types_by_name['InspectFileRequest'] = _INSPECTFILEREQUEST DESCRIPTOR.message_types_by_name['ListFileRequest'] = _LISTFILEREQUEST DESCRIPTOR.message_types_by_name['GlobFileRequest'] = _GLOBFILEREQUEST DESCRIPTOR.message_types_by_name['FileInfos'] = _FILEINFOS DESCRIPTOR.message_types_by_name['DiffFileRequest'] = _DIFFFILEREQUEST DESCRIPTOR.message_types_by_name['DiffFileResponse'] = _DIFFFILERESPONSE DESCRIPTOR.message_types_by_name['DeleteFileRequest'] = _DELETEFILEREQUEST DESCRIPTOR.message_types_by_name['PutObjectRequest'] = _PUTOBJECTREQUEST DESCRIPTOR.message_types_by_name['GetObjectsRequest'] = _GETOBJECTSREQUEST DESCRIPTOR.message_types_by_name['TagObjectRequest'] = _TAGOBJECTREQUEST DESCRIPTOR.message_types_by_name['ListObjectsRequest'] = _LISTOBJECTSREQUEST DESCRIPTOR.message_types_by_name['ListTagsRequest'] = _LISTTAGSREQUEST DESCRIPTOR.message_types_by_name['ListTagsResponse'] = _LISTTAGSRESPONSE DESCRIPTOR.message_types_by_name['DeleteObjectsRequest'] = _DELETEOBJECTSREQUEST DESCRIPTOR.message_types_by_name['DeleteObjectsResponse'] = _DELETEOBJECTSRESPONSE DESCRIPTOR.message_types_by_name['DeleteTagsRequest'] = _DELETETAGSREQUEST DESCRIPTOR.message_types_by_name['DeleteTagsResponse'] = _DELETETAGSRESPONSE DESCRIPTOR.message_types_by_name['CheckObjectRequest'] = _CHECKOBJECTREQUEST DESCRIPTOR.message_types_by_name['CheckObjectResponse'] = _CHECKOBJECTRESPONSE DESCRIPTOR.message_types_by_name['Objects'] = _OBJECTS DESCRIPTOR.message_types_by_name['ObjectIndex'] = _OBJECTINDEX DESCRIPTOR.enum_types_by_name['FileType'] = _FILETYPE DESCRIPTOR.enum_types_by_name['Delimiter'] = _DELIMITER _sym_db.RegisterFileDescriptor(DESCRIPTOR) Repo = _reflection.GeneratedProtocolMessageType('Repo', (_message.Message,), dict( DESCRIPTOR = _REPO, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.Repo) )) _sym_db.RegisterMessage(Repo) BranchInfo = _reflection.GeneratedProtocolMessageType('BranchInfo', (_message.Message,), dict( DESCRIPTOR = _BRANCHINFO, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.BranchInfo) )) _sym_db.RegisterMessage(BranchInfo) BranchInfos = _reflection.GeneratedProtocolMessageType('BranchInfos', (_message.Message,), dict( DESCRIPTOR = _BRANCHINFOS, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.BranchInfos) )) _sym_db.RegisterMessage(BranchInfos) File = _reflection.GeneratedProtocolMessageType('File', (_message.Message,), dict( DESCRIPTOR = _FILE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.File) )) _sym_db.RegisterMessage(File) Block = _reflection.GeneratedProtocolMessageType('Block', (_message.Message,), dict( DESCRIPTOR = _BLOCK, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.Block) )) _sym_db.RegisterMessage(Block) Object = _reflection.GeneratedProtocolMessageType('Object', (_message.Message,), dict( DESCRIPTOR = _OBJECT, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.Object) )) _sym_db.RegisterMessage(Object) Tag = _reflection.GeneratedProtocolMessageType('Tag', (_message.Message,), dict( DESCRIPTOR = _TAG, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.Tag) )) _sym_db.RegisterMessage(Tag) RepoInfo = _reflection.GeneratedProtocolMessageType('RepoInfo', (_message.Message,), dict( DESCRIPTOR = _REPOINFO, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.RepoInfo) )) _sym_db.RegisterMessage(RepoInfo) RepoAuthInfo = _reflection.GeneratedProtocolMessageType('RepoAuthInfo', (_message.Message,), dict( DESCRIPTOR = _REPOAUTHINFO, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.RepoAuthInfo) )) _sym_db.RegisterMessage(RepoAuthInfo) Commit = _reflection.GeneratedProtocolMessageType('Commit', (_message.Message,), dict( DESCRIPTOR = _COMMIT, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.Commit) )) _sym_db.RegisterMessage(Commit) CommitInfo = _reflection.GeneratedProtocolMessageType('CommitInfo', (_message.Message,), dict( DESCRIPTOR = _COMMITINFO, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.CommitInfo) )) _sym_db.RegisterMessage(CommitInfo) FileInfo = _reflection.GeneratedProtocolMessageType('FileInfo', (_message.Message,), dict( DESCRIPTOR = _FILEINFO, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.FileInfo) )) _sym_db.RegisterMessage(FileInfo) ByteRange = _reflection.GeneratedProtocolMessageType('ByteRange', (_message.Message,), dict( DESCRIPTOR = _BYTERANGE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ByteRange) )) _sym_db.RegisterMessage(ByteRange) BlockRef = _reflection.GeneratedProtocolMessageType('BlockRef', (_message.Message,), dict( DESCRIPTOR = _BLOCKREF, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.BlockRef) )) _sym_db.RegisterMessage(BlockRef) ObjectInfo = _reflection.GeneratedProtocolMessageType('ObjectInfo', (_message.Message,), dict( DESCRIPTOR = _OBJECTINFO, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ObjectInfo) )) _sym_db.RegisterMessage(ObjectInfo) CreateRepoRequest = _reflection.GeneratedProtocolMessageType('CreateRepoRequest', (_message.Message,), dict( DESCRIPTOR = _CREATEREPOREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.CreateRepoRequest) )) _sym_db.RegisterMessage(CreateRepoRequest) InspectRepoRequest = _reflection.GeneratedProtocolMessageType('InspectRepoRequest', (_message.Message,), dict( DESCRIPTOR = _INSPECTREPOREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.InspectRepoRequest) )) _sym_db.RegisterMessage(InspectRepoRequest) ListRepoRequest = _reflection.GeneratedProtocolMessageType('ListRepoRequest', (_message.Message,), dict( DESCRIPTOR = _LISTREPOREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListRepoRequest) )) _sym_db.RegisterMessage(ListRepoRequest) ListRepoResponse = _reflection.GeneratedProtocolMessageType('ListRepoResponse', (_message.Message,), dict( DESCRIPTOR = _LISTREPORESPONSE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListRepoResponse) )) _sym_db.RegisterMessage(ListRepoResponse) DeleteRepoRequest = _reflection.GeneratedProtocolMessageType('DeleteRepoRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEREPOREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteRepoRequest) )) _sym_db.RegisterMessage(DeleteRepoRequest) StartCommitRequest = _reflection.GeneratedProtocolMessageType('StartCommitRequest', (_message.Message,), dict( DESCRIPTOR = _STARTCOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.StartCommitRequest) )) _sym_db.RegisterMessage(StartCommitRequest) BuildCommitRequest = _reflection.GeneratedProtocolMessageType('BuildCommitRequest', (_message.Message,), dict( DESCRIPTOR = _BUILDCOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.BuildCommitRequest) )) _sym_db.RegisterMessage(BuildCommitRequest) FinishCommitRequest = _reflection.GeneratedProtocolMessageType('FinishCommitRequest', (_message.Message,), dict( DESCRIPTOR = _FINISHCOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.FinishCommitRequest) )) _sym_db.RegisterMessage(FinishCommitRequest) InspectCommitRequest = _reflection.GeneratedProtocolMessageType('InspectCommitRequest', (_message.Message,), dict( DESCRIPTOR = _INSPECTCOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.InspectCommitRequest) )) _sym_db.RegisterMessage(InspectCommitRequest) ListCommitRequest = _reflection.GeneratedProtocolMessageType('ListCommitRequest', (_message.Message,), dict( DESCRIPTOR = _LISTCOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListCommitRequest) )) _sym_db.RegisterMessage(ListCommitRequest) CommitInfos = _reflection.GeneratedProtocolMessageType('CommitInfos', (_message.Message,), dict( DESCRIPTOR = _COMMITINFOS, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.CommitInfos) )) _sym_db.RegisterMessage(CommitInfos) ListBranchRequest = _reflection.GeneratedProtocolMessageType('ListBranchRequest', (_message.Message,), dict( DESCRIPTOR = _LISTBRANCHREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListBranchRequest) )) _sym_db.RegisterMessage(ListBranchRequest) SetBranchRequest = _reflection.GeneratedProtocolMessageType('SetBranchRequest', (_message.Message,), dict( DESCRIPTOR = _SETBRANCHREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.SetBranchRequest) )) _sym_db.RegisterMessage(SetBranchRequest) DeleteBranchRequest = _reflection.GeneratedProtocolMessageType('DeleteBranchRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEBRANCHREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteBranchRequest) )) _sym_db.RegisterMessage(DeleteBranchRequest) DeleteCommitRequest = _reflection.GeneratedProtocolMessageType('DeleteCommitRequest', (_message.Message,), dict( DESCRIPTOR = _DELETECOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteCommitRequest) )) _sym_db.RegisterMessage(DeleteCommitRequest) FlushCommitRequest = _reflection.GeneratedProtocolMessageType('FlushCommitRequest', (_message.Message,), dict( DESCRIPTOR = _FLUSHCOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.FlushCommitRequest) )) _sym_db.RegisterMessage(FlushCommitRequest) SubscribeCommitRequest = _reflection.GeneratedProtocolMessageType('SubscribeCommitRequest', (_message.Message,), dict( DESCRIPTOR = _SUBSCRIBECOMMITREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.SubscribeCommitRequest) )) _sym_db.RegisterMessage(SubscribeCommitRequest) GetFileRequest = _reflection.GeneratedProtocolMessageType('GetFileRequest', (_message.Message,), dict( DESCRIPTOR = _GETFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.GetFileRequest) )) _sym_db.RegisterMessage(GetFileRequest) OverwriteIndex = _reflection.GeneratedProtocolMessageType('OverwriteIndex', (_message.Message,), dict( DESCRIPTOR = _OVERWRITEINDEX, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.OverwriteIndex) )) _sym_db.RegisterMessage(OverwriteIndex) PutFileRequest = _reflection.GeneratedProtocolMessageType('PutFileRequest', (_message.Message,), dict( DESCRIPTOR = _PUTFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.PutFileRequest) )) _sym_db.RegisterMessage(PutFileRequest) PutFileRecord = _reflection.GeneratedProtocolMessageType('PutFileRecord', (_message.Message,), dict( DESCRIPTOR = _PUTFILERECORD, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.PutFileRecord) )) _sym_db.RegisterMessage(PutFileRecord) PutFileRecords = _reflection.GeneratedProtocolMessageType('PutFileRecords', (_message.Message,), dict( DESCRIPTOR = _PUTFILERECORDS, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.PutFileRecords) )) _sym_db.RegisterMessage(PutFileRecords) CopyFileRequest = _reflection.GeneratedProtocolMessageType('CopyFileRequest', (_message.Message,), dict( DESCRIPTOR = _COPYFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.CopyFileRequest) )) _sym_db.RegisterMessage(CopyFileRequest) InspectFileRequest = _reflection.GeneratedProtocolMessageType('InspectFileRequest', (_message.Message,), dict( DESCRIPTOR = _INSPECTFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.InspectFileRequest) )) _sym_db.RegisterMessage(InspectFileRequest) ListFileRequest = _reflection.GeneratedProtocolMessageType('ListFileRequest', (_message.Message,), dict( DESCRIPTOR = _LISTFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListFileRequest) )) _sym_db.RegisterMessage(ListFileRequest) GlobFileRequest = _reflection.GeneratedProtocolMessageType('GlobFileRequest', (_message.Message,), dict( DESCRIPTOR = _GLOBFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.GlobFileRequest) )) _sym_db.RegisterMessage(GlobFileRequest) FileInfos = _reflection.GeneratedProtocolMessageType('FileInfos', (_message.Message,), dict( DESCRIPTOR = _FILEINFOS, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.FileInfos) )) _sym_db.RegisterMessage(FileInfos) DiffFileRequest = _reflection.GeneratedProtocolMessageType('DiffFileRequest', (_message.Message,), dict( DESCRIPTOR = _DIFFFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DiffFileRequest) )) _sym_db.RegisterMessage(DiffFileRequest) DiffFileResponse = _reflection.GeneratedProtocolMessageType('DiffFileResponse', (_message.Message,), dict( DESCRIPTOR = _DIFFFILERESPONSE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DiffFileResponse) )) _sym_db.RegisterMessage(DiffFileResponse) DeleteFileRequest = _reflection.GeneratedProtocolMessageType('DeleteFileRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEFILEREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteFileRequest) )) _sym_db.RegisterMessage(DeleteFileRequest) PutObjectRequest = _reflection.GeneratedProtocolMessageType('PutObjectRequest', (_message.Message,), dict( DESCRIPTOR = _PUTOBJECTREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.PutObjectRequest) )) _sym_db.RegisterMessage(PutObjectRequest) GetObjectsRequest = _reflection.GeneratedProtocolMessageType('GetObjectsRequest', (_message.Message,), dict( DESCRIPTOR = _GETOBJECTSREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.GetObjectsRequest) )) _sym_db.RegisterMessage(GetObjectsRequest) TagObjectRequest = _reflection.GeneratedProtocolMessageType('TagObjectRequest', (_message.Message,), dict( DESCRIPTOR = _TAGOBJECTREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.TagObjectRequest) )) _sym_db.RegisterMessage(TagObjectRequest) ListObjectsRequest = _reflection.GeneratedProtocolMessageType('ListObjectsRequest', (_message.Message,), dict( DESCRIPTOR = _LISTOBJECTSREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListObjectsRequest) )) _sym_db.RegisterMessage(ListObjectsRequest) ListTagsRequest = _reflection.GeneratedProtocolMessageType('ListTagsRequest', (_message.Message,), dict( DESCRIPTOR = _LISTTAGSREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListTagsRequest) )) _sym_db.RegisterMessage(ListTagsRequest) ListTagsResponse = _reflection.GeneratedProtocolMessageType('ListTagsResponse', (_message.Message,), dict( DESCRIPTOR = _LISTTAGSRESPONSE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ListTagsResponse) )) _sym_db.RegisterMessage(ListTagsResponse) DeleteObjectsRequest = _reflection.GeneratedProtocolMessageType('DeleteObjectsRequest', (_message.Message,), dict( DESCRIPTOR = _DELETEOBJECTSREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteObjectsRequest) )) _sym_db.RegisterMessage(DeleteObjectsRequest) DeleteObjectsResponse = _reflection.GeneratedProtocolMessageType('DeleteObjectsResponse', (_message.Message,), dict( DESCRIPTOR = _DELETEOBJECTSRESPONSE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteObjectsResponse) )) _sym_db.RegisterMessage(DeleteObjectsResponse) DeleteTagsRequest = _reflection.GeneratedProtocolMessageType('DeleteTagsRequest', (_message.Message,), dict( DESCRIPTOR = _DELETETAGSREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteTagsRequest) )) _sym_db.RegisterMessage(DeleteTagsRequest) DeleteTagsResponse = _reflection.GeneratedProtocolMessageType('DeleteTagsResponse', (_message.Message,), dict( DESCRIPTOR = _DELETETAGSRESPONSE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.DeleteTagsResponse) )) _sym_db.RegisterMessage(DeleteTagsResponse) CheckObjectRequest = _reflection.GeneratedProtocolMessageType('CheckObjectRequest', (_message.Message,), dict( DESCRIPTOR = _CHECKOBJECTREQUEST, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.CheckObjectRequest) )) _sym_db.RegisterMessage(CheckObjectRequest) CheckObjectResponse = _reflection.GeneratedProtocolMessageType('CheckObjectResponse', (_message.Message,), dict( DESCRIPTOR = _CHECKOBJECTRESPONSE, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.CheckObjectResponse) )) _sym_db.RegisterMessage(CheckObjectResponse) Objects = _reflection.GeneratedProtocolMessageType('Objects', (_message.Message,), dict( DESCRIPTOR = _OBJECTS, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.Objects) )) _sym_db.RegisterMessage(Objects) ObjectIndex = _reflection.GeneratedProtocolMessageType('ObjectIndex', (_message.Message,), dict( ObjectsEntry = _reflection.GeneratedProtocolMessageType('ObjectsEntry', (_message.Message,), dict( DESCRIPTOR = _OBJECTINDEX_OBJECTSENTRY, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ObjectIndex.ObjectsEntry) )) , TagsEntry = _reflection.GeneratedProtocolMessageType('TagsEntry', (_message.Message,), dict( DESCRIPTOR = _OBJECTINDEX_TAGSENTRY, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ObjectIndex.TagsEntry) )) , DESCRIPTOR = _OBJECTINDEX, __module__ = 'client.pfs.pfs_pb2' # @@protoc_insertion_point(class_scope:pfs.ObjectIndex) )) _sym_db.RegisterMessage(ObjectIndex) _sym_db.RegisterMessage(ObjectIndex.ObjectsEntry) _sym_db.RegisterMessage(ObjectIndex.TagsEntry) _OBJECTINDEX_OBJECTSENTRY.has_options = True _OBJECTINDEX_OBJECTSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _OBJECTINDEX_TAGSENTRY.has_options = True _OBJECTINDEX_TAGSENTRY._options = _descriptor._ParseOptions(descriptor_pb2.MessageOptions(), _b('8\001')) _API = _descriptor.ServiceDescriptor( name='API', full_name='pfs.API', file=DESCRIPTOR, index=0, options=None, serialized_start=4630, serialized_end=6279, methods=[ _descriptor.MethodDescriptor( name='CreateRepo', full_name='pfs.API.CreateRepo', index=0, containing_service=None, input_type=_CREATEREPOREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='InspectRepo', full_name='pfs.API.InspectRepo', index=1, containing_service=None, input_type=_INSPECTREPOREQUEST, output_type=_REPOINFO, options=None, ), _descriptor.MethodDescriptor( name='ListRepo', full_name='pfs.API.ListRepo', index=2, containing_service=None, input_type=_LISTREPOREQUEST, output_type=_LISTREPORESPONSE, options=None, ), _descriptor.MethodDescriptor( name='DeleteRepo', full_name='pfs.API.DeleteRepo', index=3, containing_service=None, input_type=_DELETEREPOREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='StartCommit', full_name='pfs.API.StartCommit', index=4, containing_service=None, input_type=_STARTCOMMITREQUEST, output_type=_COMMIT, options=None, ), _descriptor.MethodDescriptor( name='FinishCommit', full_name='pfs.API.FinishCommit', index=5, containing_service=None, input_type=_FINISHCOMMITREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='InspectCommit', full_name='pfs.API.InspectCommit', index=6, containing_service=None, input_type=_INSPECTCOMMITREQUEST, output_type=_COMMITINFO, options=None, ), _descriptor.MethodDescriptor( name='ListCommit', full_name='pfs.API.ListCommit', index=7, containing_service=None, input_type=_LISTCOMMITREQUEST, output_type=_COMMITINFOS, options=None, ), _descriptor.MethodDescriptor( name='ListCommitStream', full_name='pfs.API.ListCommitStream', index=8, containing_service=None, input_type=_LISTCOMMITREQUEST, output_type=_COMMITINFO, options=None, ), _descriptor.MethodDescriptor( name='DeleteCommit', full_name='pfs.API.DeleteCommit', index=9, containing_service=None, input_type=_DELETECOMMITREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='FlushCommit', full_name='pfs.API.FlushCommit', index=10, containing_service=None, input_type=_FLUSHCOMMITREQUEST, output_type=_COMMITINFO, options=None, ), _descriptor.MethodDescriptor( name='SubscribeCommit', full_name='pfs.API.SubscribeCommit', index=11, containing_service=None, input_type=_SUBSCRIBECOMMITREQUEST, output_type=_COMMITINFO, options=None, ), _descriptor.MethodDescriptor( name='BuildCommit', full_name='pfs.API.BuildCommit', index=12, containing_service=None, input_type=_BUILDCOMMITREQUEST, output_type=_COMMIT, options=None, ), _descriptor.MethodDescriptor( name='ListBranch', full_name='pfs.API.ListBranch', index=13, containing_service=None, input_type=_LISTBRANCHREQUEST, output_type=_BRANCHINFOS, options=None, ), _descriptor.MethodDescriptor( name='SetBranch', full_name='pfs.API.SetBranch', index=14, containing_service=None, input_type=_SETBRANCHREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='DeleteBranch', full_name='pfs.API.DeleteBranch', index=15, containing_service=None, input_type=_DELETEBRANCHREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='PutFile', full_name='pfs.API.PutFile', index=16, containing_service=None, input_type=_PUTFILEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='CopyFile', full_name='pfs.API.CopyFile', index=17, containing_service=None, input_type=_COPYFILEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='GetFile', full_name='pfs.API.GetFile', index=18, containing_service=None, input_type=_GETFILEREQUEST, output_type=google_dot_protobuf_dot_wrappers__pb2._BYTESVALUE, options=None, ), _descriptor.MethodDescriptor( name='InspectFile', full_name='pfs.API.InspectFile', index=19, containing_service=None, input_type=_INSPECTFILEREQUEST, output_type=_FILEINFO, options=None, ), _descriptor.MethodDescriptor( name='ListFile', full_name='pfs.API.ListFile', index=20, containing_service=None, input_type=_LISTFILEREQUEST, output_type=_FILEINFOS, options=None, ), _descriptor.MethodDescriptor( name='ListFileStream', full_name='pfs.API.ListFileStream', index=21, containing_service=None, input_type=_LISTFILEREQUEST, output_type=_FILEINFO, options=None, ), _descriptor.MethodDescriptor( name='GlobFile', full_name='pfs.API.GlobFile', index=22, containing_service=None, input_type=_GLOBFILEREQUEST, output_type=_FILEINFOS, options=None, ), _descriptor.MethodDescriptor( name='GlobFileStream', full_name='pfs.API.GlobFileStream', index=23, containing_service=None, input_type=_GLOBFILEREQUEST, output_type=_FILEINFO, options=None, ), _descriptor.MethodDescriptor( name='DiffFile', full_name='pfs.API.DiffFile', index=24, containing_service=None, input_type=_DIFFFILEREQUEST, output_type=_DIFFFILERESPONSE, options=None, ), _descriptor.MethodDescriptor( name='DeleteFile', full_name='pfs.API.DeleteFile', index=25, containing_service=None, input_type=_DELETEFILEREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='DeleteAll', full_name='pfs.API.DeleteAll', index=26, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), ]) _sym_db.RegisterServiceDescriptor(_API) DESCRIPTOR.services_by_name['API'] = _API _OBJECTAPI = _descriptor.ServiceDescriptor( name='ObjectAPI', full_name='pfs.ObjectAPI', file=DESCRIPTOR, index=1, options=None, serialized_start=6282, serialized_end=7128, methods=[ _descriptor.MethodDescriptor( name='PutObject', full_name='pfs.ObjectAPI.PutObject', index=0, containing_service=None, input_type=_PUTOBJECTREQUEST, output_type=_OBJECT, options=None, ), _descriptor.MethodDescriptor( name='PutObjectSplit', full_name='pfs.ObjectAPI.PutObjectSplit', index=1, containing_service=None, input_type=_PUTOBJECTREQUEST, output_type=_OBJECTS, options=None, ), _descriptor.MethodDescriptor( name='GetObject', full_name='pfs.ObjectAPI.GetObject', index=2, containing_service=None, input_type=_OBJECT, output_type=google_dot_protobuf_dot_wrappers__pb2._BYTESVALUE, options=None, ), _descriptor.MethodDescriptor( name='GetObjects', full_name='pfs.ObjectAPI.GetObjects', index=3, containing_service=None, input_type=_GETOBJECTSREQUEST, output_type=google_dot_protobuf_dot_wrappers__pb2._BYTESVALUE, options=None, ), _descriptor.MethodDescriptor( name='TagObject', full_name='pfs.ObjectAPI.TagObject', index=4, containing_service=None, input_type=_TAGOBJECTREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), _descriptor.MethodDescriptor( name='InspectObject', full_name='pfs.ObjectAPI.InspectObject', index=5, containing_service=None, input_type=_OBJECT, output_type=_OBJECTINFO, options=None, ), _descriptor.MethodDescriptor( name='CheckObject', full_name='pfs.ObjectAPI.CheckObject', index=6, containing_service=None, input_type=_CHECKOBJECTREQUEST, output_type=_CHECKOBJECTRESPONSE, options=None, ), _descriptor.MethodDescriptor( name='ListObjects', full_name='pfs.ObjectAPI.ListObjects', index=7, containing_service=None, input_type=_LISTOBJECTSREQUEST, output_type=_OBJECT, options=None, ), _descriptor.MethodDescriptor( name='DeleteObjects', full_name='pfs.ObjectAPI.DeleteObjects', index=8, containing_service=None, input_type=_DELETEOBJECTSREQUEST, output_type=_DELETEOBJECTSRESPONSE, options=None, ), _descriptor.MethodDescriptor( name='GetTag', full_name='pfs.ObjectAPI.GetTag', index=9, containing_service=None, input_type=_TAG, output_type=google_dot_protobuf_dot_wrappers__pb2._BYTESVALUE, options=None, ), _descriptor.MethodDescriptor( name='InspectTag', full_name='pfs.ObjectAPI.InspectTag', index=10, containing_service=None, input_type=_TAG, output_type=_OBJECTINFO, options=None, ), _descriptor.MethodDescriptor( name='ListTags', full_name='pfs.ObjectAPI.ListTags', index=11, containing_service=None, input_type=_LISTTAGSREQUEST, output_type=_LISTTAGSRESPONSE, options=None, ), _descriptor.MethodDescriptor( name='DeleteTags', full_name='pfs.ObjectAPI.DeleteTags', index=12, containing_service=None, input_type=_DELETETAGSREQUEST, output_type=_DELETETAGSRESPONSE, options=None, ), _descriptor.MethodDescriptor( name='Compact', full_name='pfs.ObjectAPI.Compact', index=13, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, options=None, ), ]) _sym_db.RegisterServiceDescriptor(_OBJECTAPI) DESCRIPTOR.services_by_name['ObjectAPI'] = _OBJECTAPI # @@protoc_insertion_point(module_scope)
35.307224
12,137
0.740953
14,831
121,704
5.797249
0.045243
0.042987
0.030321
0.034032
0.652497
0.60438
0.596297
0.563742
0.531769
0.525849
0
0.040871
0.128895
121,704
3,446
12,138
35.31747
0.770122
0.030032
0
0.67243
1
0.006916
0.183611
0.120246
0
0
0
0
0
1
0
false
0
0.003458
0
0.003458
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
9e85701cfa3b7fc141d79ede491d35511f289931
75
py
Python
biobb_ml/resampling/__init__.py
bioexcel/biobb_ml
f99346ef7885d3a62de47dab738a01db4b27467a
[ "Apache-2.0" ]
null
null
null
biobb_ml/resampling/__init__.py
bioexcel/biobb_ml
f99346ef7885d3a62de47dab738a01db4b27467a
[ "Apache-2.0" ]
5
2021-06-30T11:24:14.000Z
2021-08-04T12:53:00.000Z
biobb_ml/resampling/__init__.py
bioexcel/biobb_ml
f99346ef7885d3a62de47dab738a01db4b27467a
[ "Apache-2.0" ]
null
null
null
name = "resampling" __all__ = ["oversampling","undersampling","resampling"]
37.5
55
0.746667
6
75
8.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.066667
75
2
55
37.5
0.742857
0
0
0
0
0
0.592105
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
9e8d5f33a4c015f816e17785279eb7d62b32bf06
614
py
Python
bloom/ll/_compat.py
A5rocks/bloom
c5426bf1a8070187736fca8fea3a487cafb76bda
[ "Apache-2.0" ]
7
2021-05-01T03:55:54.000Z
2022-02-02T02:02:16.000Z
bloom/ll/_compat.py
A5rocks/bloom
c5426bf1a8070187736fca8fea3a487cafb76bda
[ "Apache-2.0" ]
13
2021-05-05T01:10:43.000Z
2021-09-02T00:21:52.000Z
bloom/ll/_compat.py
A5rocks/bloom
c5426bf1a8070187736fca8fea3a487cafb76bda
[ "Apache-2.0" ]
null
null
null
# internal compatibility module from __future__ import annotations import sys if sys.version_info < (3, 8): import typing from typing_extensions import Literal, TypedDict def get_args(tp: object) -> typing.Tuple[object, ...]: # this implementation sucks but whatever (it's just a backport :^) if isinstance(tp, typing._Final): # type: ignore[attr-defined] args: typing.Tuple[object, ...] = tp.__args__ return args else: return () else: from typing import Literal, TypedDict, get_args __all__ = ('TypedDict', 'Literal', 'get_args')
26.695652
74
0.651466
73
614
5.232877
0.575342
0.054974
0.115183
0
0
0
0
0
0
0
0
0.00431
0.2443
614
22
75
27.909091
0.818966
0.197068
0
0.142857
0
0
0.04908
0
0
0
0
0
0
1
0.071429
false
0
0.357143
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
9e8f67d1ac4c946e55d6a82e389e5867f0c7967e
13,382
py
Python
collector_center_sdk/api/template/create_configuration_template_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
collector_center_sdk/api/template/create_configuration_template_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
collector_center_sdk/api/template/create_configuration_template_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: create_configuration_template.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from collector_center_sdk.model.collector_center import script_pb2 as collector__center__sdk_dot_model_dot_collector__center_dot_script__pb2 from collector_center_sdk.model.collector_center import target_range_pb2 as collector__center__sdk_dot_model_dot_collector__center_dot_target__range__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='create_configuration_template.proto', package='template', syntax='proto3', serialized_options=None, serialized_pb=_b('\n#create_configuration_template.proto\x12\x08template\x1a\x38\x63ollector_center_sdk/model/collector_center/script.proto\x1a>collector_center_sdk/model/collector_center/target_range.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xf1\x02\n\"CreateConfigurationTemplateRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x06kwargs\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x0f\n\x07timeout\x18\x03 \x01(\x05\x12#\n\x03\x65nv\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x10\n\x08\x64isabled\x18\x05 \x01(\x08\x12\x0e\n\x06labels\x18\x06 \x03(\t\x12(\n\x06script\x18\x07 \x01(\x0b\x32\x18.collector_center.Script\x12\x15\n\rignoreInvalid\x18\x08 \x01(\x08\x12\x32\n\x0btargetRange\x18\t \x01(\x0b\x32\x1d.collector_center.TargetRange\x12\x10\n\x08interval\x18\n \x01(\x05\x12\x10\n\x08\x63\x61\x63heTtl\x18\x0b \x01(\x05\x12\x11\n\ttimeRange\x18\x0c \x01(\t\x12\x11\n\tclazzName\x18\r \x01(\t\"1\n#CreateConfigurationTemplateResponse\x12\n\n\x02id\x18\x01 \x01(\t\"\x9b\x01\n*CreateConfigurationTemplateResponseWrapper\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x13\n\x0b\x63odeExplain\x18\x02 \x01(\t\x12\r\n\x05\x65rror\x18\x03 \x01(\t\x12;\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32-.template.CreateConfigurationTemplateResponseb\x06proto3') , dependencies=[collector__center__sdk_dot_model_dot_collector__center_dot_script__pb2.DESCRIPTOR,collector__center__sdk_dot_model_dot_collector__center_dot_target__range__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) _CREATECONFIGURATIONTEMPLATEREQUEST = _descriptor.Descriptor( name='CreateConfigurationTemplateRequest', full_name='template.CreateConfigurationTemplateRequest', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='name', full_name='template.CreateConfigurationTemplateRequest.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='kwargs', full_name='template.CreateConfigurationTemplateRequest.kwargs', 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='timeout', full_name='template.CreateConfigurationTemplateRequest.timeout', 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='env', full_name='template.CreateConfigurationTemplateRequest.env', 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='disabled', full_name='template.CreateConfigurationTemplateRequest.disabled', 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='labels', full_name='template.CreateConfigurationTemplateRequest.labels', index=5, number=6, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='script', full_name='template.CreateConfigurationTemplateRequest.script', 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='ignoreInvalid', full_name='template.CreateConfigurationTemplateRequest.ignoreInvalid', 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='targetRange', full_name='template.CreateConfigurationTemplateRequest.targetRange', 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='interval', full_name='template.CreateConfigurationTemplateRequest.interval', index=9, number=10, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='cacheTtl', full_name='template.CreateConfigurationTemplateRequest.cacheTtl', 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), _descriptor.FieldDescriptor( name='timeRange', full_name='template.CreateConfigurationTemplateRequest.timeRange', index=11, number=12, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( name='clazzName', full_name='template.CreateConfigurationTemplateRequest.clazzName', index=12, number=13, type=9, cpp_type=9, label=1, has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=202, serialized_end=571, ) _CREATECONFIGURATIONTEMPLATERESPONSE = _descriptor.Descriptor( name='CreateConfigurationTemplateResponse', full_name='template.CreateConfigurationTemplateResponse', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='id', full_name='template.CreateConfigurationTemplateResponse.id', 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='proto3', extension_ranges=[], oneofs=[ ], serialized_start=573, serialized_end=622, ) _CREATECONFIGURATIONTEMPLATERESPONSEWRAPPER = _descriptor.Descriptor( name='CreateConfigurationTemplateResponseWrapper', full_name='template.CreateConfigurationTemplateResponseWrapper', filename=None, file=DESCRIPTOR, containing_type=None, fields=[ _descriptor.FieldDescriptor( name='code', full_name='template.CreateConfigurationTemplateResponseWrapper.code', 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='codeExplain', full_name='template.CreateConfigurationTemplateResponseWrapper.codeExplain', 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='error', full_name='template.CreateConfigurationTemplateResponseWrapper.error', 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='data', full_name='template.CreateConfigurationTemplateResponseWrapper.data', index=3, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=625, serialized_end=780, ) _CREATECONFIGURATIONTEMPLATEREQUEST.fields_by_name['kwargs'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE _CREATECONFIGURATIONTEMPLATEREQUEST.fields_by_name['env'].message_type = google_dot_protobuf_dot_struct__pb2._VALUE _CREATECONFIGURATIONTEMPLATEREQUEST.fields_by_name['script'].message_type = collector__center__sdk_dot_model_dot_collector__center_dot_script__pb2._SCRIPT _CREATECONFIGURATIONTEMPLATEREQUEST.fields_by_name['targetRange'].message_type = collector__center__sdk_dot_model_dot_collector__center_dot_target__range__pb2._TARGETRANGE _CREATECONFIGURATIONTEMPLATERESPONSEWRAPPER.fields_by_name['data'].message_type = _CREATECONFIGURATIONTEMPLATERESPONSE DESCRIPTOR.message_types_by_name['CreateConfigurationTemplateRequest'] = _CREATECONFIGURATIONTEMPLATEREQUEST DESCRIPTOR.message_types_by_name['CreateConfigurationTemplateResponse'] = _CREATECONFIGURATIONTEMPLATERESPONSE DESCRIPTOR.message_types_by_name['CreateConfigurationTemplateResponseWrapper'] = _CREATECONFIGURATIONTEMPLATERESPONSEWRAPPER _sym_db.RegisterFileDescriptor(DESCRIPTOR) CreateConfigurationTemplateRequest = _reflection.GeneratedProtocolMessageType('CreateConfigurationTemplateRequest', (_message.Message,), { 'DESCRIPTOR' : _CREATECONFIGURATIONTEMPLATEREQUEST, '__module__' : 'create_configuration_template_pb2' # @@protoc_insertion_point(class_scope:template.CreateConfigurationTemplateRequest) }) _sym_db.RegisterMessage(CreateConfigurationTemplateRequest) CreateConfigurationTemplateResponse = _reflection.GeneratedProtocolMessageType('CreateConfigurationTemplateResponse', (_message.Message,), { 'DESCRIPTOR' : _CREATECONFIGURATIONTEMPLATERESPONSE, '__module__' : 'create_configuration_template_pb2' # @@protoc_insertion_point(class_scope:template.CreateConfigurationTemplateResponse) }) _sym_db.RegisterMessage(CreateConfigurationTemplateResponse) CreateConfigurationTemplateResponseWrapper = _reflection.GeneratedProtocolMessageType('CreateConfigurationTemplateResponseWrapper', (_message.Message,), { 'DESCRIPTOR' : _CREATECONFIGURATIONTEMPLATERESPONSEWRAPPER, '__module__' : 'create_configuration_template_pb2' # @@protoc_insertion_point(class_scope:template.CreateConfigurationTemplateResponseWrapper) }) _sym_db.RegisterMessage(CreateConfigurationTemplateResponseWrapper) # @@protoc_insertion_point(module_scope)
50.882129
1,268
0.78344
1,558
13,382
6.408858
0.120668
0.045669
0.046269
0.036054
0.549524
0.535203
0.513771
0.505959
0.489534
0.489534
0
0.035119
0.108429
13,382
262
1,269
51.076336
0.801777
0.033627
0
0.636752
1
0.004274
0.23849
0.215275
0
0
0
0
0
1
0
false
0
0.034188
0
0.034188
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
9ea604a4feadad356d7e1404e2e522c90ac87d8b
131
py
Python
paypal/standard/ipn/tests/test_urls.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
paypal/standard/ipn/tests/test_urls.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
paypal/standard/ipn/tests/test_urls.py
igloox/django-paypal
65c7002888133c904f0c80cd87d85fc91e0dd78d
[ "Unlicense", "MIT" ]
null
null
null
from django.conf.urls import url, include, patterns urlpatterns = patterns('paypal.standard.ipn.views', (r'^ipn/$', 'ipn'), )
21.833333
51
0.687023
17
131
5.294118
0.823529
0
0
0
0
0
0
0
0
0
0
0
0.129771
131
5
52
26.2
0.789474
0
0
0
0
0
0.259542
0.19084
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
9eb4689c4b843e03636be5ffb9aef6e514cd6b8b
504
py
Python
inbound_email/errors.py
patrickdessalle/django-inbound-email
7bbc9cd5dd7db386daf6ed8533b7ce18ac5b1937
[ "MIT" ]
55
2015-04-12T04:23:46.000Z
2018-12-04T11:53:25.000Z
inbound_email/errors.py
patrickdessalle/django-inbound-email
7bbc9cd5dd7db386daf6ed8533b7ce18ac5b1937
[ "MIT" ]
14
2016-06-16T19:46:43.000Z
2018-12-04T13:06:42.000Z
inbound_email/errors.py
patrickdessalle/django-inbound-email
7bbc9cd5dd7db386daf6ed8533b7ce18ac5b1937
[ "MIT" ]
6
2016-04-19T16:40:43.000Z
2018-07-25T16:06:48.000Z
class RequestParseError(Exception): """Error raised when the inbound request could not be parsed.""" pass class AttachmentTooLargeError(Exception): """Error raised when an attachment is too large.""" def __init__(self, email, filename, size): super(AttachmentTooLargeError, self) self.email = email self.filename = filename self.size = size class AuthenticationError(Exception): """Error raised when the request is not authenticated.""" pass
25.2
68
0.688492
55
504
6.236364
0.527273
0.122449
0.174927
0.209913
0.157434
0
0
0
0
0
0
0
0.222222
504
19
69
26.526316
0.875
0.309524
0
0.2
0
0
0
0
0
0
0
0
0
1
0.1
false
0.2
0
0
0.4
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
7b4a1ec6621497b2a83cc6cfa191e50a5659f316
2,012
py
Python
helpers.py
sparkgeo/stac-fastapi-locust
8400e54d76d8047e9a305f1dfd56231adad251b4
[ "MIT" ]
1
2022-03-16T20:35:17.000Z
2022-03-16T20:35:17.000Z
helpers.py
jonhealy1/stac-fastapi-locust
8400e54d76d8047e9a305f1dfd56231adad251b4
[ "MIT" ]
1
2022-03-23T17:40:04.000Z
2022-03-23T17:40:04.000Z
helpers.py
jonhealy1/stac-fastapi-locust
8400e54d76d8047e9a305f1dfd56231adad251b4
[ "MIT" ]
2
2022-03-17T08:18:01.000Z
2022-03-22T06:58:46.000Z
test_item = { "stac_version": "1.0.0", "stac_extensions": [], "type": "Feature", "id": "20201211_223832_CS2", "bbox": [ 172.91173669923782, 1.3438851951615003, 172.95469614953714, 1.3690476620161975 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 172.91173669923782, 1.3438851951615003 ], [ 172.95469614953714, 1.3438851951615003 ], [ 172.95469614953714, 1.3690476620161975 ], [ 172.91173669923782, 1.3690476620161975 ], [ 172.91173669923782, 1.3438851951615003 ] ] ] }, "properties": { "datetime": "2020-12-11T22:38:32.125000Z" }, "collection": "simple-collection", "links": [ { "rel": "collection", "href": "./collection.json", "type": "application/json", "title": "Simple Example Collection" }, { "rel": "root", "href": "./collection.json", "type": "application/json", "title": "Simple Example Collection" }, { "rel": "parent", "href": "./collection.json", "type": "application/json", "title": "Simple Example Collection" } ], "assets": { "visual": { "href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.tif", "type": "image/tiff; application=geotiff; profile=cloud-optimized", "title": "3-Band Visual", "roles": [ "visual" ] }, "thumbnail": { "href": "https://storage.googleapis.com/open-cogs/stac-examples/20201211_223832_CS2.jpg", "title": "Thumbnail", "type": "image/jpeg", "roles": [ "thumbnail" ] } } }
24.536585
97
0.457753
146
2,012
6.246575
0.431507
0.074561
0.078947
0.111842
0.608553
0.551535
0.479167
0.365132
0.365132
0.365132
0
0.250612
0.391153
2,012
81
98
24.839506
0.493878
0
0
0.37037
0
0
0.364314
0.024851
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7b5335b28734da87605a2f6a927c9bf9ce767765
261
py
Python
output/models/nist_data/atomic/short/schema_instance/nistschema_sv_iv_atomic_short_min_exclusive_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/short/schema_instance/nistschema_sv_iv_atomic_short_min_exclusive_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/short/schema_instance/nistschema_sv_iv_atomic_short_min_exclusive_4_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.short.schema_instance.nistschema_sv_iv_atomic_short_min_exclusive_4_xsd.nistschema_sv_iv_atomic_short_min_exclusive_4 import NistschemaSvIvAtomicShortMinExclusive4 __all__ = [ "NistschemaSvIvAtomicShortMinExclusive4", ]
43.5
199
0.896552
30
261
7.1
0.633333
0.15493
0.131455
0.187793
0.356808
0.356808
0.356808
0.356808
0
0
0
0.016194
0.05364
261
5
200
52.2
0.846154
0
0
0
0
0
0.145594
0.145594
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7b6e23c43a5e45aa9fc500b2ccf8c993a77975de
15,200
py
Python
pysnmp-with-texts/ASCEND-MIBVDSLNET-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/ASCEND-MIBVDSLNET-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/ASCEND-MIBVDSLNET-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ASCEND-MIBVDSLNET-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBVDSLNET-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:28:54 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # configuration, = mibBuilder.importSymbols("ASCEND-MIB", "configuration") OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Counter32, Counter64, Integer32, Bits, TimeTicks, ObjectIdentity, Unsigned32, iso, NotificationType, MibIdentifier, ModuleIdentity, Gauge32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Counter64", "Integer32", "Bits", "TimeTicks", "ObjectIdentity", "Unsigned32", "iso", "NotificationType", "MibIdentifier", "ModuleIdentity", "Gauge32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") class DisplayString(OctetString): pass mibvdslNetworkProfile = MibIdentifier((1, 3, 6, 1, 4, 1, 529, 23, 9)) mibvdslNetworkProfileTable = MibTable((1, 3, 6, 1, 4, 1, 529, 23, 9, 1), ) if mibBuilder.loadTexts: mibvdslNetworkProfileTable.setStatus('mandatory') if mibBuilder.loadTexts: mibvdslNetworkProfileTable.setDescription('A list of mibvdslNetworkProfile profile entries.') mibvdslNetworkProfileEntry = MibTableRow((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1), ).setIndexNames((0, "ASCEND-MIBVDSLNET-MIB", "vdslNetworkProfile-Shelf-o"), (0, "ASCEND-MIBVDSLNET-MIB", "vdslNetworkProfile-Slot-o"), (0, "ASCEND-MIBVDSLNET-MIB", "vdslNetworkProfile-Item-o")) if mibBuilder.loadTexts: mibvdslNetworkProfileEntry.setStatus('mandatory') if mibBuilder.loadTexts: mibvdslNetworkProfileEntry.setDescription('A mibvdslNetworkProfile entry containing objects that maps to the parameters of mibvdslNetworkProfile profile.') vdslNetworkProfile_Shelf_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 1), Integer32()).setLabel("vdslNetworkProfile-Shelf-o").setMaxAccess("readonly") if mibBuilder.loadTexts: vdslNetworkProfile_Shelf_o.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_Shelf_o.setDescription('') vdslNetworkProfile_Slot_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 2), Integer32()).setLabel("vdslNetworkProfile-Slot-o").setMaxAccess("readonly") if mibBuilder.loadTexts: vdslNetworkProfile_Slot_o.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_Slot_o.setDescription('') vdslNetworkProfile_Item_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 3), Integer32()).setLabel("vdslNetworkProfile-Item-o").setMaxAccess("readonly") if mibBuilder.loadTexts: vdslNetworkProfile_Item_o.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_Item_o.setDescription('') vdslNetworkProfile_Name = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 4), DisplayString()).setLabel("vdslNetworkProfile-Name").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_Name.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_Name.setDescription('For future use. The current design does not use the name field but instead references Vdsl lines by the physical address; we may in the future support referencing Vdsl lines by name as well as by address. The name consists of a null terminated ascii string supplied by the user; it defaults to the ascii form of the Vdsl line physical address.') vdslNetworkProfile_PhysicalAddress_Shelf = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("anyShelf", 1), ("shelf1", 2), ("shelf2", 3), ("shelf3", 4), ("shelf4", 5), ("shelf5", 6), ("shelf6", 7), ("shelf7", 8), ("shelf8", 9), ("shelf9", 10)))).setLabel("vdslNetworkProfile-PhysicalAddress-Shelf").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_PhysicalAddress_Shelf.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_PhysicalAddress_Shelf.setDescription('The number of the shelf that the addressed physical device resides on.') vdslNetworkProfile_PhysicalAddress_Slot = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 55, 56, 57, 58, 49, 50, 42, 53, 54, 45, 46, 51, 59))).clone(namedValues=NamedValues(("anySlot", 1), ("slot1", 2), ("slot2", 3), ("slot3", 4), ("slot4", 5), ("slot5", 6), ("slot6", 7), ("slot7", 8), ("slot8", 9), ("slot9", 10), ("slot10", 11), ("slot11", 12), ("slot12", 13), ("slot13", 14), ("slot14", 15), ("slot15", 16), ("slot16", 17), ("slot17", 18), ("slot18", 19), ("slot19", 20), ("slot20", 21), ("slot21", 22), ("slot22", 23), ("slot23", 24), ("slot24", 25), ("slot25", 26), ("slot26", 27), ("slot27", 28), ("slot28", 29), ("slot29", 30), ("slot30", 31), ("slot31", 32), ("slot32", 33), ("slot33", 34), ("slot34", 35), ("slot35", 36), ("slot36", 37), ("slot37", 38), ("slot38", 39), ("slot39", 40), ("slot40", 41), ("aLim", 55), ("bLim", 56), ("cLim", 57), ("dLim", 58), ("leftController", 49), ("rightController", 50), ("controller", 42), ("firstControlModule", 53), ("secondControlModule", 54), ("trunkModule1", 45), ("trunkModule2", 46), ("controlModule", 51), ("slotPrimary", 59)))).setLabel("vdslNetworkProfile-PhysicalAddress-Slot").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_PhysicalAddress_Slot.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_PhysicalAddress_Slot.setDescription('The number of the slot that the addressed physical device resides on.') vdslNetworkProfile_PhysicalAddress_ItemNumber = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 13), Integer32()).setLabel("vdslNetworkProfile-PhysicalAddress-ItemNumber").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_PhysicalAddress_ItemNumber.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_PhysicalAddress_ItemNumber.setDescription('A number that specifies an addressable entity within the context of shelf and slot.') vdslNetworkProfile_Enabled = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("no", 1), ("yes", 2)))).setLabel("vdslNetworkProfile-Enabled").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_Enabled.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_Enabled.setDescription('TRUE if the line is enabled, otherwise FALSE.') vdslNetworkProfile_SparingMode = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("inactive", 1), ("manual", 2), ("automatic", 3)))).setLabel("vdslNetworkProfile-SparingMode").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_SparingMode.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_SparingMode.setDescription('Port sparing operational mode for this port.') vdslNetworkProfile_IgnoreLineup = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("systemDefined", 1), ("no", 2), ("yes", 3)))).setLabel("vdslNetworkProfile-IgnoreLineup").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_IgnoreLineup.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_IgnoreLineup.setDescription('Ignore line up value for this port.') vdslNetworkProfile_LineConfig_NailedGroup = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 19), Integer32()).setLabel("vdslNetworkProfile-LineConfig-NailedGroup").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_NailedGroup.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_NailedGroup.setDescription('A number that identifies the this unique physical DSL line.') vdslNetworkProfile_LineConfig_VpSwitchingVpi = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 20), Integer32()).setLabel("vdslNetworkProfile-LineConfig-VpSwitchingVpi").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_VpSwitchingVpi.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_VpSwitchingVpi.setDescription('The Vpi to be used for the VP switching. Rest of the VPIs within valid vpi-vci-range will be used for the VC switching. Changes in this range will take effect immediately. THE USER SHOULD BE VERY CAREFUL WHILE CHANGING THIS VALUE BECAUSE ALL CONNECTIONS ON THE LIM WHERE THIS PORT BELONGS WILL BE DROPPED IN ORDER TO MAKE THIS NEW VALUE EFFECTIVE IMMEDIATELY.') vdslNetworkProfile_LineConfig_UpStreamFixedRate = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("n-1206667", 1), ("n-965333", 2), ("n-1930667", 3), ("n-3861333", 4)))).setLabel("vdslNetworkProfile-LineConfig-UpStreamFixedRate").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_UpStreamFixedRate.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_UpStreamFixedRate.setDescription('The following Up/Down stream rate relationships are supported: (0.965Mbps/19.306Mbps); (1.930Mbps/11.463Mbps); (3.861Mbps/11.463Mbps); (3.861Mbps/15.626Mbps). Up Stream range: 0.965Mbps - 3.861Mbps.') vdslNetworkProfile_LineConfig_DownStreamFixedRate = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 23), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("n-1206667", 1), ("n-11463333", 2), ("n-15626333", 3), ("n-19306667", 4)))).setLabel("vdslNetworkProfile-LineConfig-DownStreamFixedRate").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_DownStreamFixedRate.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_DownStreamFixedRate.setDescription('The following Up/Down stream rate relationships are supported: (0.965Mbps/19.306Mbps); (1.930Mbps/11.463Mbps); (3.861Mbps/11.463Mbps); (3.861Mbps/15.626Mbps). Down Stream range: 11.463Mbps - 15.626Mbps.') vdslNetworkProfile_LineConfig_ConfigLoopback = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("disable", 1), ("digital", 2), ("analog", 3)))).setLabel("vdslNetworkProfile-LineConfig-ConfigLoopback").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_ConfigLoopback.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_ConfigLoopback.setDescription('Configuration of different modem loopbacks.') vdslNetworkProfile_LineConfig_PsdValue = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("n-53dbm", 1), ("n-60dbm", 2)))).setLabel("vdslNetworkProfile-LineConfig-PsdValue").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_PsdValue.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_PsdValue.setDescription('Configuration of PSD parameter. It defines the power that is allowed to be sent to the line.') vdslNetworkProfile_LineConfig_LinkStatecmd = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(16, 1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("autoConnectCmd", 16), ("disconnectState", 1), ("connectState", 2), ("quietState", 3), ("idleReqState", 4), ("backToServState", 5), ("changeIdleParamState", 6), ("changeWarmStartParamState", 7), ("changeCurrentParamState", 8)))).setLabel("vdslNetworkProfile-LineConfig-LinkStatecmd").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_LinkStatecmd.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_LineConfig_LinkStatecmd.setDescription('Sets the link connect state. Use this to control status of the VDSL link connect state machine. The auto-connect-cmd will train modem up to the final service. All the other commands are used to manualy operate the VDSL link connect state machine.') vdslNetworkProfile_Action_o = MibScalar((1, 3, 6, 1, 4, 1, 529, 23, 9, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("noAction", 1), ("createProfile", 2), ("deleteProfile", 3)))).setLabel("vdslNetworkProfile-Action-o").setMaxAccess("readwrite") if mibBuilder.loadTexts: vdslNetworkProfile_Action_o.setStatus('mandatory') if mibBuilder.loadTexts: vdslNetworkProfile_Action_o.setDescription('') mibBuilder.exportSymbols("ASCEND-MIBVDSLNET-MIB", vdslNetworkProfile_Slot_o=vdslNetworkProfile_Slot_o, vdslNetworkProfile_Name=vdslNetworkProfile_Name, vdslNetworkProfile_LineConfig_LinkStatecmd=vdslNetworkProfile_LineConfig_LinkStatecmd, vdslNetworkProfile_LineConfig_VpSwitchingVpi=vdslNetworkProfile_LineConfig_VpSwitchingVpi, vdslNetworkProfile_PhysicalAddress_Slot=vdslNetworkProfile_PhysicalAddress_Slot, vdslNetworkProfile_PhysicalAddress_Shelf=vdslNetworkProfile_PhysicalAddress_Shelf, mibvdslNetworkProfileTable=mibvdslNetworkProfileTable, vdslNetworkProfile_IgnoreLineup=vdslNetworkProfile_IgnoreLineup, vdslNetworkProfile_SparingMode=vdslNetworkProfile_SparingMode, vdslNetworkProfile_PhysicalAddress_ItemNumber=vdslNetworkProfile_PhysicalAddress_ItemNumber, vdslNetworkProfile_LineConfig_PsdValue=vdslNetworkProfile_LineConfig_PsdValue, vdslNetworkProfile_LineConfig_DownStreamFixedRate=vdslNetworkProfile_LineConfig_DownStreamFixedRate, vdslNetworkProfile_Enabled=vdslNetworkProfile_Enabled, vdslNetworkProfile_LineConfig_NailedGroup=vdslNetworkProfile_LineConfig_NailedGroup, DisplayString=DisplayString, vdslNetworkProfile_Action_o=vdslNetworkProfile_Action_o, vdslNetworkProfile_Shelf_o=vdslNetworkProfile_Shelf_o, mibvdslNetworkProfile=mibvdslNetworkProfile, mibvdslNetworkProfileEntry=mibvdslNetworkProfileEntry, vdslNetworkProfile_Item_o=vdslNetworkProfile_Item_o, vdslNetworkProfile_LineConfig_UpStreamFixedRate=vdslNetworkProfile_LineConfig_UpStreamFixedRate, vdslNetworkProfile_LineConfig_ConfigLoopback=vdslNetworkProfile_LineConfig_ConfigLoopback)
190
1,571
0.785855
1,743
15,200
6.761331
0.232358
0.099788
0.071277
0.119134
0.497751
0.418413
0.335087
0.181332
0.180653
0.167416
0
0.06764
0.075987
15,200
79
1,572
192.405063
0.771449
0.022105
0
0
0
0.070423
0.297812
0.076809
0
0
0
0
0
1
0
false
0.014085
0.098592
0
0.112676
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
7b88ca2709d18931becb58a1df7843ee6dd8302a
489
py
Python
src/projects/migrations/0005_default_cluster_settings.py
unikubehq/projects
0df69eafa2a0d2664a22c7a5866d4512ac4d57fe
[ "Apache-2.0" ]
1
2021-10-05T13:17:03.000Z
2021-10-05T13:17:03.000Z
src/projects/migrations/0005_default_cluster_settings.py
unikubehq/projects
0df69eafa2a0d2664a22c7a5866d4512ac4d57fe
[ "Apache-2.0" ]
48
2021-07-06T07:24:36.000Z
2022-03-24T08:27:30.000Z
src/projects/migrations/0005_default_cluster_settings.py
unikubehq/projects
0df69eafa2a0d2664a22c7a5866d4512ac4d57fe
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.23 on 2021-06-01 19:15 from django.db import migrations from projects.models import Project def forwards_func(apps, schema_editor): for instance in Project.objects.all(): if not hasattr(instance, "cluster_settings"): instance.add_cluster_settings() class Migration(migrations.Migration): dependencies = [ ("projects", "0004_clustersettings_helmoverrides"), ] operations = [migrations.RunPython(forwards_func)]
22.227273
59
0.715746
58
489
5.896552
0.741379
0.070175
0
0
0
0
0
0
0
0
0
0.050378
0.188139
489
21
60
23.285714
0.811083
0.09407
0
0
1
0
0.131519
0.077098
0
0
0
0
0
1
0.090909
false
0
0.181818
0
0.545455
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
7b9683fe426942446d9a97ef49099c3da5c48609
2,021
py
Python
transmute_core/tests/test_signature.py
yunstanford/transmute-core
a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe
[ "MIT" ]
42
2016-06-04T00:16:16.000Z
2021-06-11T02:09:31.000Z
transmute_core/tests/test_signature.py
yunstanford/transmute-core
a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe
[ "MIT" ]
55
2016-06-11T13:58:46.000Z
2021-12-21T06:29:20.000Z
transmute_core/tests/test_signature.py
yunstanford/transmute-core
a8e5dd055f0f3d39327d71dd61bf0ee147f59ebe
[ "MIT" ]
18
2016-05-18T20:50:53.000Z
2021-11-18T09:09:59.000Z
from transmute_core.compat import getfullargspec from transmute_core import annotate from transmute_core.function.signature import FunctionSignature, NoDefault def test_signature(): @annotate({"x": int, "y": float, "width": int, "height": float}) def make_square(x, y, width=None, height=12): pass argspec = getfullargspec(make_square) signature = FunctionSignature.from_argspec(argspec) assert len(signature.args) == 2 assert signature.args[0].name == "x" assert signature.args[0].default == NoDefault assert signature.args[0].type == int assert len(signature.kwargs) == 2 assert signature.kwargs["width"].name == "width" assert signature.kwargs["width"].default is None assert signature.kwargs["width"].type == int def test_signature_no_kwargs(): @annotate({"x": int, "y": int, "return": int}) def make_square(x, y): return x * y argspec = getfullargspec(make_square) signature = FunctionSignature.from_argspec(argspec) assert len(signature.args) == 2 assert signature.args[0].name == "x" assert signature.args[0].default == NoDefault assert signature.args[0].type == int assert signature.args[1].name == "y" assert signature.args[1].default == NoDefault assert signature.args[1].type == int assert len(signature.kwargs) == 0 def test_self_signature(): def square(self, resource, multiplier=None): pass argspec = getfullargspec(square) signature = FunctionSignature.from_argspec(argspec) assert len(signature.args) == 1 assert len(signature.kwargs) == 1 assert signature.kwargs["multiplier"].name == "multiplier" def test_get_signature(): def square(self, resource, multiplier=None): pass argspec = getfullargspec(square) signature = FunctionSignature.from_argspec(argspec) arg = signature.get_argument("resource") assert arg.name == "resource" kwarg = signature.get_argument("multiplier") assert kwarg.name == "multiplier"
31.578125
74
0.694211
244
2,021
5.663934
0.184426
0.1411
0.123734
0.086831
0.54848
0.501447
0.465991
0.465991
0.465991
0.465991
0
0.010278
0.181593
2,021
63
75
32.079365
0.825272
0
0
0.4375
0
0
0.04948
0
0
0
0
0
0.4375
1
0.166667
false
0.0625
0.0625
0.020833
0.25
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
1
0
0
0
0
0
2
7b9cf0ee0b0268981c8fb31ad786e260d80af259
876
py
Python
ros2_batch_job/vendor/osrf_pycommon/tests/unit/test_process_utils/impl_aep_trollius.py
taewoong0627/ci
12766009d19fe668aa1e59a6069a9b446ed77fba
[ "Apache-2.0" ]
31
2016-09-28T16:55:15.000Z
2022-03-06T15:24:48.000Z
ros2_batch_job/vendor/osrf_pycommon/tests/unit/test_process_utils/impl_aep_trollius.py
taewoong0627/ci
12766009d19fe668aa1e59a6069a9b446ed77fba
[ "Apache-2.0" ]
473
2016-10-17T16:08:17.000Z
2022-03-30T17:56:40.000Z
ros2_batch_job/vendor/osrf_pycommon/tests/unit/test_process_utils/impl_aep_trollius.py
taewoong0627/ci
12766009d19fe668aa1e59a6069a9b446ed77fba
[ "Apache-2.0" ]
34
2017-07-11T23:25:11.000Z
2022-03-06T08:39:23.000Z
from osrf_pycommon.process_utils import asyncio from osrf_pycommon.process_utils.async_execute_process import async_execute_process from osrf_pycommon.process_utils import get_loop # allow module to be importable for --cover-inclusive try: from osrf_pycommon.process_utils.async_execute_process_trollius import From except ImportError: TROLLIUS_FOUND = False else: TROLLIUS_FOUND = True from osrf_pycommon.process_utils.async_execute_process_trollius import Return from .impl_aep_protocol import create_protocol loop = get_loop() @asyncio.coroutine def run(cmd, **kwargs): transport, protocol = yield From(async_execute_process( create_protocol(), cmd, **kwargs)) retcode = yield asyncio.From(protocol.complete) raise Return(protocol.stdout_buffer, protocol.stderr_buffer, retcode)
33.692308
83
0.759132
109
876
5.807339
0.412844
0.063191
0.126382
0.181675
0.374408
0.374408
0.266983
0.266983
0.192733
0.192733
0
0
0.181507
876
25
84
35.04
0.882845
0.058219
0
0
0
0
0
0
0
0
0
0
0
1
0.052632
false
0
0.368421
0
0.421053
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
2
7ba57bfef2515aca7ad9b784f00c5fde52d5ac7a
2,475
py
Python
fusioncharts/samples/combination_chart.py
ashoksiri/django-wrapper
3c6e91a9a799dcc2cc1738289e95e6448207aff5
[ "MIT" ]
null
null
null
fusioncharts/samples/combination_chart.py
ashoksiri/django-wrapper
3c6e91a9a799dcc2cc1738289e95e6448207aff5
[ "MIT" ]
null
null
null
fusioncharts/samples/combination_chart.py
ashoksiri/django-wrapper
3c6e91a9a799dcc2cc1738289e95e6448207aff5
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse # Include the `fusioncharts.py` file which has required functions to embed the charts in html page from ..fusioncharts import FusionCharts # Loading Data from a Static JSON String # It is a example to show a mscombi 2d chart where data is passed as JSON string format. # The `chart` method is defined to load chart data from an JSON string. def chart(request): # Create an object for the mscombi2d chart using the FusionCharts class constructor mscombi2d = FusionCharts("mscombi2d", "ex1" , "600", "400", "chart-1", "json", # The data is passed as a string in the `dataSource` as parameter. """{ "chart": { "caption": "App Publishing Trend", "subCaption": "2012-2016", "xAxisName": "Years", "formatnumberscale": "0", "numberSuffix": "K", "showvalues":"0", "theme": "fint" }, "categories": [{ "category": [{ "label": "2012" }, { "label": "2013" }, { "label": "2014" }, { "label": "2015" }, { "label": "2016" }] }], "dataset": [{ "seriesname": "iOS App Store", "renderAs": "Spline", "data": [{ "value": "125" }, { "value": "300" }, { "value": "480" }, { "value": "800" }, { "value": "1100" }] }, { "seriesname": "Google Play Store", "renderAs": "SplineArea", "data": [{ "value": "70" }, { "value": "150" }, { "value": "350" }, { "value": "600" },{ "value": "1400" }] }, { "seriesname": "Amazon AppStore", "data": [{ "value": "10" }, { "value": "100" }, { "value": "300" }, { "value": "600" },{ "value": "900" }] }] }""") # returning complete JavaScript and HTML code, which is used to generate chart in the browsers. return render(request, 'index.html', {'output' : mscombi2d.render()})
29.464286
100
0.427071
206
2,475
5.131068
0.558252
0.028382
0.022706
0.02649
0
0
0
0
0
0
0
0.062723
0.433131
2,475
83
101
29.819277
0.690663
0.215354
0
0
0
0
0.140187
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
c88a6fa37be18590dad961da5b139ba081724c58
304
py
Python
gui/intlineedit.py
rrpg/world-editor
d67cb605103189da95a91e29843c896eeeb011ae
[ "MIT" ]
1
2016-01-15T01:03:25.000Z
2016-01-15T01:03:25.000Z
gui/intlineedit.py
rrpg/world-editor
d67cb605103189da95a91e29843c896eeeb011ae
[ "MIT" ]
null
null
null
gui/intlineedit.py
rrpg/world-editor
d67cb605103189da95a91e29843c896eeeb011ae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from PyQt4 import QtGui class intLineEdit(QtGui.QLineEdit): """ Overload of the QLineEdit widget to have only integer values. Should be replaced with a spinbox widget """ def value(self): """ The value must always return an integer """ return int(self.text())
15.2
62
0.680921
42
304
4.928571
0.809524
0
0
0
0
0
0
0
0
0
0
0.008299
0.207237
304
19
63
16
0.850622
0.542763
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
c88da392d536836d2e753648abb00e40b88cc106
106
py
Python
sklearn_extensions/kernel_regression/__init__.py
zacker150/sklearn-extensions
329f3efdb8c3c3a367b264f7c76c76411a784530
[ "BSD-3-Clause" ]
null
null
null
sklearn_extensions/kernel_regression/__init__.py
zacker150/sklearn-extensions
329f3efdb8c3c3a367b264f7c76c76411a784530
[ "BSD-3-Clause" ]
null
null
null
sklearn_extensions/kernel_regression/__init__.py
zacker150/sklearn-extensions
329f3efdb8c3c3a367b264f7c76c76411a784530
[ "BSD-3-Clause" ]
null
null
null
from sklearn_extensions.kernel_regression.kr import KernelRegression __all__ = [ 'KernelRegression' ]
21.2
68
0.811321
10
106
8
0.9
0
0
0
0
0
0
0
0
0
0
0
0.122642
106
5
69
21.2
0.860215
0
0
0
0
0
0.149533
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c8a1031eadfeb6ac6a2e43bd9796164569d86696
1,011
py
Python
rosetta_cipher/cli.py
LumberjackOtters/rosetta-cipher
17c17df979e0c9d4d111fd7284b0231dfa862208
[ "MIT" ]
null
null
null
rosetta_cipher/cli.py
LumberjackOtters/rosetta-cipher
17c17df979e0c9d4d111fd7284b0231dfa862208
[ "MIT" ]
null
null
null
rosetta_cipher/cli.py
LumberjackOtters/rosetta-cipher
17c17df979e0c9d4d111fd7284b0231dfa862208
[ "MIT" ]
null
null
null
import click from rosetta_cipher import cipher @click.group() @click.version_option(cipher.get_version()) def process(): """Generate version names that are human readables""" pass @process.command() @click.option("--length", "-l", default=2) @click.option("--retry", "-r", default=0) @click.option("--separator", "-s", default="_", help="Separator") @click.option("--capitalize", "-c", default=False, help="capitalize or not") def random(length, retry, separator, capitalize): print(cipher.get_random_name(length, retry, separator, capitalize)) @process.command() @click.argument("obj", default="") @click.option("--length", "-l", default=2) @click.option("--retry", "-r", default=0) @click.option("--separator", "-s", default="_", help="Separator") @click.option("--capitalize", "-c", default=False, help="capitalize or not") def name(obj, length, retry, separator, capitalize): print(cipher.get_name(obj, length, retry, separator, capitalize)) if __name__ == "__main__": process()
30.636364
76
0.689416
126
1,011
5.404762
0.325397
0.129222
0.117474
0.176211
0.628488
0.628488
0.563877
0.434655
0.434655
0.434655
0
0.004425
0.105836
1,011
32
77
31.59375
0.748894
0.046489
0
0.434783
1
0
0.163883
0
0
0
0
0
0
1
0.130435
false
0.043478
0.086957
0
0.217391
0.086957
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c8a3ccfd61c2b3aea523e8eb9ae5c97f7bbe0cfa
317
py
Python
hugging_go/board_factory.py
Chicoryn/hugging_go
4a7e63d40cd9a9bd687fb11e67675acdebfdd2b4
[ "Apache-2.0" ]
null
null
null
hugging_go/board_factory.py
Chicoryn/hugging_go
4a7e63d40cd9a9bd687fb11e67675acdebfdd2b4
[ "Apache-2.0" ]
3
2022-01-23T09:47:07.000Z
2022-01-23T21:19:11.000Z
hugging_go/board_factory.py
Chicoryn/hugging_go
4a7e63d40cd9a9bd687fb11e67675acdebfdd2b4
[ "Apache-2.0" ]
null
null
null
from collections import namedtuple BoardSequence = namedtuple('BoardSequence', ['sequence', 'komi']) class BoardFactory: def build(self, board_size, komi): assert board_size == 19, 'only 19×19 boards are supported' return BoardSequence( sequence=[], komi=komi )
24.384615
66
0.634069
33
317
6.060606
0.666667
0.23
0.25
0
0
0
0
0
0
0
0
0.025751
0.264984
317
12
67
26.416667
0.828326
0
0
0
0
0
0.176656
0
0
0
0
0
0.111111
1
0.111111
false
0
0.111111
0
0.444444
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c8b54691da16bc2a4fabff5cadf6aa53b2748ead
4,595
py
Python
queries/mortar.py
anandkp92/relaxed-brick-queries
74dee68d51f82666a133a08a9c0979aaa77569dc
[ "BSD-3-Clause" ]
null
null
null
queries/mortar.py
anandkp92/relaxed-brick-queries
74dee68d51f82666a133a08a9c0979aaa77569dc
[ "BSD-3-Clause" ]
null
null
null
queries/mortar.py
anandkp92/relaxed-brick-queries
74dee68d51f82666a133a08a9c0979aaa77569dc
[ "BSD-3-Clause" ]
null
null
null
queries = [ """SELECT * WHERE { ?s ?p ?o }""", """SELECT ?point ?point_type WHERE { ?point rdf:type brick:Point . ?point rdf:type ?point_type }""", "SELECT ?meter WHERE { ?meter rdf:type brick:Green_Button_Meter }", """ SELECT ?t WHERE { ?t rdf:type brick:Weather_Temperature_Sensor }""", """SELECT ?sensor WHERE { ?sensor rdf:type brick:Zone_Air_Temperature_Sensor . ?sensor brick:isPointOf ?equip }""", """SELECT ?sp WHERE { ?sp rdf:type brick:Zone_Air_Temperature_Setpoint . ?sp brick:isPointOf ?equip }""", "SELECT ?meter WHERE { ?meter rdf:type brick:Building_Electric_Meter }", "SELECT ?point WHERE { ?point rdf:type brick:Occupancy_Sensor }", """SELECT ?tstat ?room ?zone ?state ?temp ?hsp ?csp WHERE { ?tstat brick:hasLocation ?room . ?zone brick:hasPart ?room . ?tstat brick:hasPoint ?state . ?tstat brick:hasPoint ?temp . ?tstat brick:hasPoint ?hsp . ?tstat brick:hasPoint ?csp . ?zone rdf:type brick:Zone . ?tstat rdf:type brick:Thermostat . ?state rdf:type brick:Thermostat_Status . ?temp rdf:type brick:Temperature_Sensor . ?hsp rdf:type brick:Supply_Air_Temperature_Heating_Setpoint . ?csp rdf:type brick:Supply_Air_Temperature_Cooling_Setpoint } """, """SELECT ?sensor ?sp ?equip WHERE { ?sensor rdf:type brick:Air_Flow_Sensor . ?sp rdf:type brick:Air_Flow_Setpoint . ?sensor brick:isPointOf ?equip . ?sp brick:isPointOf ?equip }""", """SELECT ?cooling_point ?heating_point ?ahu WHERE { ?cooling_point rdf:type brick:Cooling_Valve_Command . ?heating_point rdf:type brick:Heating_Valve_Command . ?ahu brick:hasPoint ?cooling_point . ?ahu brick:hasPoint ?heating_point }""", """SELECT * WHERE { ?equip rdf:type brick:VAV . ?equip brick:isFedBy ?ahu . ?ahu brick:hasPoint ?upstream_ta . ?equip brick:hasPoint ?dnstream_ta . ?upstream_ta rdf:type brick:Supply_Air_Temperature_Sensor . ?dnstream_ta rdf:type brick:Supply_Air_Temperature_Sensor . ?equip brick:hasPoint ?vlv . ?vlv rdf:type brick:Valve_Command }""", """SELECT * WHERE { ?equip rdf:type brick:VAV . ?equip brick:hasPoint ?air_flow . ?air_flow rdf:type brick:Supply_Air_Flow_Sensor }""", """SELECT * WHERE { ?vlv rdf:type brick:Valve_Command . ?vlv rdf:type ?vlv_type . ?equip brick:hasPoint ?vlv . ?equip rdf:type brick:Air_Handling_Unit . ?air_temps rdf:type brick:Supply_Air_Temperature_Sensor . ?equip brick:hasPoint ?air_temps . ?air_temps rdf:type ?temp_type }""", """SELECT * WHERE { ?vlv rdf:type brick:Valve_Command . ?vlv rdf:type ?vlv_type . ?equip brick:hasPoint ?vlv . ?equip rdf:type brick:Air_Handling_Unit . ?air_temps rdf:type brick:Return_Air_Temperature_Sensor . ?equip brick:hasPoint ?air_temps . ?air_temps rdf:type ?temp_type }""", """SELECT ?vav WHERE { ?vav rdf:type brick:VAV }""", #"""SELECT DISTINCT ?sensor ?room #WHERE { # # ?sensor rdf:type brick:Zone_Temperature_Sensor . # ?room rdf:type brick:Room . # ?vav rdf:type brick:VAV . # ?zone rdf:type brick:HVAC_Zone . # # ?vav brick:feeds+ ?zone . # ?zone brick:hasPart ?room . # # {?sensor brick:isPointOf ?vav } # UNION # {?sensor brick:isPointOf ?room } #}""", """SELECT ?sensor ?room WHERE { ?sensor rdf:type brick:Zone_Temperature_Sensor . ?room rdf:type brick:Room . ?vav rdf:type brick:VAV . ?zone rdf:type brick:HVAC_Zone . ?vav brick:feeds+ ?zone . ?zone brick:hasPart ?room . ?vav brick:hasPoint ?sensor }""", # """SELECT ?vlv_cmd ?vav # WHERE { # { ?vlv_cmd rdf:type brick:Reheat_Valve_Command } # UNION # { ?vlv_cmd rdf:type brick:Cooling_Valve_Command } # ?vav rdf:type brick:VAV . # ?vav brick:hasPoint+ ?vlv_cmd . # }""", """SELECT ?floor ?room ?zone WHERE { ?floor rdf:type brick:Floor . ?room rdf:type brick:Room . ?zone rdf:type brick:HVAC_Zone . ?room brick:isPartOf+ ?floor . ?room brick:isPartOf+ ?zone }""", ]
37.357724
75
0.584331
534
4,595
4.855805
0.116105
0.132279
0.203625
0.041651
0.558427
0.465098
0.369456
0.344003
0.327806
0.296182
0
0
0.297062
4,595
122
76
37.663934
0.802786
0.117519
0
0
0
0
0.679443
0.261324
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c8ba91cade1f923df69caa7d6c388af1ed35afdf
29,956
py
Python
twx/twx.py
Deepandx/twx
d9633f12f3647b1e54ba87b70b39df3b7e02b4eb
[ "MIT" ]
35
2015-06-26T22:14:38.000Z
2021-07-18T16:55:38.000Z
twx/twx.py
Deepandx/twx
d9633f12f3647b1e54ba87b70b39df3b7e02b4eb
[ "MIT" ]
5
2015-06-24T19:07:01.000Z
2015-06-29T17:02:55.000Z
twx/twx.py
Deepandx/twx
d9633f12f3647b1e54ba87b70b39df3b7e02b4eb
[ "MIT" ]
15
2015-06-14T08:26:26.000Z
2020-09-30T19:04:06.000Z
from enum import Enum from threading import Thread from . import botapi import mimetypes from datetime import datetime from abc import ABCMeta, abstractmethod import collections class Message: def __init__(self): self.id = None self.flags = None self.mention = None self.out = None self.unread = None self.service = None self.sender = None self.receiver = None self.text = None self.media = {} self.date = None self.fwd_src = None self.fwd_date = None self.reply = None self.action = None @property def src(self): return self.sender @property def dest(self): return self.receiver def load_photo(self, on_success): raise NotImplementedError() def load_video(self, on_success): raise NotImplementedError() def load_video_thumb(self, on_success): raise NotImplementedError() def load_audio(self, on_success): raise NotImplementedError() def load_document(self, on_success): raise NotImplementedError() def load_document_thumb(self, on_success): raise NotImplementedError() def delete_msg(self): raise NotImplementedError() class PeerType(str, Enum): GROUP = 'group' USER = 'user' SECRET_CHAT = 'secret_chat' class Peer: def __init__(self, twx, peer_id: int, peer_type: PeerType): """ :param twx: twx.TWX instance associated with this peer. :param peer_type: Peer type as a class :return: New generic peer """ self.twx = twx self._id = peer_id self._type = peer_type self.name = None def send_message(self, text: str, reply: int=None, link_preview: bool=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send message to this peer. :param text: Text to send. :param reply: Message object or message_id to reply to. :param link_preview: Whether or not to show the link preview for this message :param on_success: Callback to call when call is complete. :type reply: int or Message """ self.twx.send_message(self, text=text, reply=reply, link_preview=link_preview, on_success=on_success, reply_markup=reply_markup) def message_search(self, text: str, on_success: callable, min_date: datetime=None, max_date: datetime=None, max_id: int=None, offset: int=0, limit: int=255): self.twx.message_search(text, on_success, self, min_date=min_date, max_date=max_date, max_id=max_id, offset=offset, limit=limit) def get_history(self, on_success, offset=0, limit=255): raise NotImplemented() def send_typing(self): self.twx.send_chat_action(self, botapi.ChatAction.TEXT) def send_typing_abort(self): pass def forward_message(self, message: Message=None, on_success: callable=None): """ Forward message to this peer. :param message: Message to forward to peer. :param on_success: Callback to call when call is complete. :return: """ self.twx.forward_message(self, message, on_success=on_success) def send_photo(self, photo: str, caption: str=None, reply: Message=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send photo to this peer. :param photo: File path to photo to send. :param caption: Caption for photo :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ self.twx.send_photo(peer=self, photo=photo, caption=caption, reply=reply, reply_markup=reply_markup, on_success=on_success) def send_audio(self, audio: str, reply: Message=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send audio clip to this peer. :param audio: File path to audio to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ self.twx.send_audio(peer=self, audio=audio, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup) def send_document(self, document: str, reply: Message=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send document to this peer. :param document: File path to document to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ self.twx.send_document(peer=self, document=document, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup) def send_sticker(self, sticker: str, reply: Message=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send sticker to this peer. :param sticker: File path to sticker to send. :param reply: Message object. :param on_success: Callback to call when call is complete. :type reply: int or Message """ self.twx.send_sticker(peer=self, sticker=sticker, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup) def send_video(self, video: str, reply: Message=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send video to this peer. :param video: File path to video to send. :param reply: Message object. :param on_success: Callback to call when call is complete. :type reply: int or Message """ self.twx.send_video(peer=self, video=video, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup) def send_location(self, latitude: float, longitude: float, reply: Message=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send location to this peer. :param latitude: Latitude of the location. :param longitude: Longitude of the location. :param reply: Message object. :param on_success: Callback to call when call is complete. :type reply: int or Message """ self.twx.send_location(peer=self, latitude=latitude, longitude=longitude, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup) def mark_read(self): pass @property def id(self): return self._id @property def type(self): return self._type class Group(Peer): def __init__(self, twx, peer_id: int): super().__init__(twx, peer_id, PeerType.GROUP) self.type_name = 'chat' self.title = None def rename_chat(self, name): raise NotImplementedError() def add_user(self, user, on_success=None): raise NotImplementedError() def remove_user(self, user, on_success=None): raise NotImplementedError() class User(Peer): def __init__(self, twx, peer_id: int): super().__init__(twx, peer_id, PeerType.USER) self.type_name = 'user' self.user_status = {'online': None, 'when': None} self.phone = None self.first_name = None self.last_name = None class SecretChat(Peer): def __init__(self, twx, peer_id: int): super().__init__(twx, peer_id, PeerType.SECRET_CHAT) self.user_id = None class TWX(metaclass=ABCMeta): def __init__(self): self._on_msg_receive = None self._on_user_update = None self._on_chat_update = None self._on_secret_chat_update = None @abstractmethod def start(self): """ Starts the client's main loop. """ pass @property @abstractmethod def bot_id(self): """ :returns: The telegram ID of the current bot. """ pass @property def on_msg_receive(self, msg: Message) -> callable: return self._on_msg_receive(msg) @on_msg_receive.setter def on_msg_receive(self, on_success: callable): self._on_msg_receive = on_success @property def on_user_update(self) -> callable: return self._on_user_update @on_user_update.setter def on_user_update(self, on_success): self._on_user_update = on_success @property def on_chat_update(self) -> callable: return self._on_chat_update @on_chat_update.setter def on_chat_update(self, on_success): self._on_chat_update = on_success @property def on_secret_chat_update(self) -> callable: return self._on_secret_chat_update @on_secret_chat_update.setter def on_secret_chat_update(self, on_success): self._on_secret_chat_update = on_success @abstractmethod def send_message(self, peer: Peer, text: str, reply: int=None, link_preview: bool=None, on_success: callable=None): """ Send message to peer. :param peer: Peer to send message to. :param text: Text to send. :param reply: Message object or message_id to reply to. :param link_preview: Whether or not to show the link preview for this message :param on_success: Callback to call when call is complete. """ pass @abstractmethod def forward_message(self, peer: Peer, message: Message): """ Use this method to forward messages of any kind. :param peer: Peer to send forwarded message too. :param message: Message to be forwarded. :returns: On success, the sent Message is returned. """ pass @abstractmethod def send_photo(self, peer: Peer, photo: str, caption: str=None, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send photo to peer. :param peer: Peer to send message to. :param photo: File path to photo to send. :param caption: Caption for photo :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ pass @abstractmethod def send_audio(self, peer: Peer, audio: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send audio clip to peer. :param peer: Peer to send message to. :param audio: File path to audio to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ pass @abstractmethod def send_document(self, peer: Peer, document: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send document to peer. :param peer: Peer to send message to. :param document: File path to document to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ pass @abstractmethod def send_sticker(self, peer: Peer, sticker: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send sticker to peer. :param peer: Peer to send message to. :param sticker: File path to sticker to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ pass @abstractmethod def send_video(self, peer: Peer, video: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send video to peer. :param peer: Peer to send message to. :param video: File path to video to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ pass @abstractmethod def send_location(self, peer: Peer, latitude: float, longitude: float, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send location to peer. :param peer: Peer to send message to. :param latitude: Latitude of the location. :param longitude: Longitude of the location. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ pass @abstractmethod def send_chat_action(self, peer: Peer, action: botapi.ChatAction, on_success: callable=None): """ Send status to peer. :param peer: Peer to send status to. :param action: Type of action to send to peer. :param on_success: Callback to call when call is complete. """ pass @abstractmethod def get_user_profile_photos(self, peer: Peer, on_success: callable, offset: int=None, limit: int=None): pass @abstractmethod def get_contact_list(self, on_success: callable=None): """ Retrieve contact list. :param on_success: Callback to call when server returns of contacts. If not specified, just load the local version """ pass @abstractmethod def add_contact(self, phone_number: str, first_name: str, last_name: str=None, on_success: callable=None): """ Add contact by phone number and name (last_name is optional). :param phone: Valid phone number for contact. :param first_name: First name to use. :param last_name: Last name to use. Optional. :param on_success: Callback to call when adding, will contain success status and the current contact list. """ pass @abstractmethod def del_contact(self, peer: Peer, on_success: callable=None): """ Delete peer from contact list :param peer: Peer to delete :param on_success: Callback to call when deleting, will contain success status and the current contact list. """ pass @abstractmethod def message_search(self, text: str, on_success: callable, peer: Peer=None, min_date: datetime=None, max_date: datetime=None, max_id: int=None, offset: int=0, limit: int=255): """ Search for messages. :param text: Text to search for in messages :param on_success: Callback to call containing all the matching messages. :param peer: Peer to search, if None, search all dialogs. :param min_date: Start search from this datetime. :param max_date: Send search at this datetime. :param max_id: Don't return any messages after this Message or message_id. :param offset: Number of messages to skip. :param limit: How many messages to return. :return: """ pass @abstractmethod def set_profile_photo(self, file_path: str, on_success: callable=None): """ Sets the profile photo for the bot. :param file_path: Path to image file :param on_success: Callback to call with the status """ pass @abstractmethod def create_secret_chat(self, user: User, on_success: callable): """ Create a secret chat with the user. :param user: User to start secret chat with. :param on_success: Will return the chat and meta information. """ pass @abstractmethod def create_group_chat(self, user_list: list, name: str, on_success: callable=None): """ Create a new group with the specified list of users, must be at least 2 users. :param user_list: List of Peers. :param name: Name of group. :param on_success: """ pass @abstractmethod def status_online(self): """ Sets bot's status to online. """ pass @abstractmethod def status_offline(self): """ Sets bot's status to offline. """ pass def get_mimetype(file_path): return mimetypes.guess_type(file_path, strict=False)[0] or 'application/octet-stream' class TWXBotApi(TWX): class UpdateThread(Thread): def __init__(self, twx): super().__init__() self.twx = twx self.update_offset = 0 def run(self): while True: botapi.get_updates(offset=self.update_offset, timeout=300, on_success=self.new_updates, **self.twx.request_args).run().wait() def new_updates(self, updates): for update in updates: self.twx.process_update(update) self.update_offset = update.update_id + 1 def __init__(self, token): super().__init__() self._bot_user = botapi.User(None, None, None, None) self.update_loop = TWXBotApi.UpdateThread(self) self.request_args = dict( token=token, request_method=botapi.RequestMethod.POST ) self.update_bot_info() def start(self): """ Starts the long polling update loop. """ self.update_loop.start() def process_update(self, update: botapi.Update): try: print(update) except Exception: import sys print(update.__str__().encode().decode(sys.stdout.encoding)) msg = update.message if msg: if any([msg.text, msg.audio, msg.document, msg.photo, msg.video, msg.sticker, msg.location, msg.contact]): self._on_msg_receive(msg=self._to_twx_msg(msg)) @property def bot_id(self): return self._bot_user.id def update_bot_info(self): self._bot_user = botapi.get_me(**self.request_args).run().wait() def send_message(self, peer: Peer, text: str, reply: int=None, link_preview: bool=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send message to peer. :param peer: Peer to send message to. :param text: Text to send. :param reply: Message object or message_id to reply to. :param link_preview: Whether or not to show the link preview for this message :param on_success: Callback to call when call is complete. :type reply: int or Message """ if isinstance(reply, Message): reply = reply.id botapi.send_message(chat_id=peer.id, text=text, disable_web_page_preview=not link_preview, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup, **self.request_args).run() def forward_message(self, peer: Peer, message: Message, on_success: callable=None): """ Use this method to forward messages of any kind. :param peer: Peer to send forwarded message too. :param message: Message to be forwarded. :param on_success: Callback to call when call is complete. :returns: On success, the sent Message is returned. """ botapi.forward_message(peer.id, message.sender.id, message.id, **self.request_args).run() def send_photo(self, peer: Peer, photo: str, caption: str=None, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send photo to peer. :param peer: Peer to send message to. :param photo: File path to photo to send. :param caption: Caption for photo :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ if isinstance(reply, Message): reply = reply.id photo = botapi.InputFile('photo', botapi.InputFileInfo(photo, open(photo, 'rb'), get_mimetype(photo))) botapi.send_photo(chat_id=peer.id, photo=photo, caption=caption, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup, **self.request_args).run() def send_audio(self, peer: Peer, audio: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send audio clip to peer. :param peer: Peer to send message to. :param audio: File path to audio to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ if isinstance(reply, Message): reply = reply.id audio = botapi.InputFile('audio', botapi.InputFileInfo(audio, open(audio, 'rb'), get_mimetype(audio))) botapi.send_audio(chat_id=peer.id, audio=audio, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup, **self.request_args).run() def send_document(self, peer: Peer, document: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send document to peer. :param peer: Peer to send message to. :param document: File path to document to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ if isinstance(reply, Message): reply = reply.id document = botapi.InputFile('document', botapi.InputFileInfo(document, open(document, 'rb'), get_mimetype(document))) botapi.send_document(chat_id=peer.id, document=document, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup, **self.request_args).run() def send_sticker(self, peer: Peer, sticker: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send sticker to peer. :param peer: Peer to send message to. :param sticker: File path to sticker to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ if isinstance(reply, Message): reply = reply.id sticker = botapi.InputFile('sticker', botapi.InputFileInfo(sticker, open(sticker, 'rb'), get_mimetype(sticker))) botapi.send_sticker(chat_id=peer.id, sticker=sticker, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup, **self.request_args).run() def send_video(self, peer: Peer, video: str, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send video to peer. :param peer: Peer to send message to. :param video: File path to video to send. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ if isinstance(reply, Message): reply = reply.id video = botapi.InputFile('video', botapi.InputFileInfo(video, open(video, 'rb'), get_mimetype(video))) botapi.send_video(chat_id=peer.id, video=video, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup, **self.request_args).run() def send_location(self, peer: Peer, latitude: float, longitude: float, reply: int=None, on_success: callable=None, reply_markup: botapi.ReplyMarkup=None): """ Send location to peer. :param peer: Peer to send message to. :param latitude: Latitude of the location. :param longitude: Longitude of the location. :param reply: Message object or message_id to reply to. :param on_success: Callback to call when call is complete. :type reply: int or Message """ if isinstance(reply, Message): reply = reply.id botapi.send_location(chat_id=peer.id, latitude=latitude, longitude=longitude, reply_to_message_id=reply, on_success=on_success, reply_markup=reply_markup, **self.request_args).run() def send_chat_action(self, peer: Peer, action: botapi.ChatAction, on_success: callable=None): """ Send status to peer. :param peer: Peer to send status to. :param action: Type of action to send to peer. :param on_success: Callback to call when call is complete. """ botapi.send_chat_action(chat_id=peer.id, action=action, on_success=on_success, **self.request_args).run() def get_user_profile_photos(self, user: User, on_success: callable, offset: int=None, limit: int=None): # """ # Get user profile photos. # :param user: User to get profile photos. # :param on_success: Callback with the requested photos # :param offset: Sequential number of the first photo to be returned. By default, all photos are returned. # :param limit: Limits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100. # """ botapi.get_user_profile_photos(user_id=user.id, on_success=on_success, offset=offset, limit=limit, **self.request_args).run() # region Unsupported in botapi def get_contact_list(self, on_success=None): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def add_contact(self, phone, first_name, last_name=None, on_success=None): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def del_contact(self, peer, on_success=None): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def message_search(self, text, on_success, peer=None, min_date=None, max_date=None, max_id=None, offset=0, limit=255): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def set_profile_photo(self, file_path: str, on_success: callable=None): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def create_secret_chat(self, user, on_success=None): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def create_group_chat(self, user_list, name, on_success=None): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def status_online(self): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() def status_offline(self): """ Unsupported in the Bot API """ raise TWXUnsupportedMethod() # endregion def _to_twx_msg(self, msg: botapi.Message): twx_msg = Message() twx_msg.id = msg.message_id twx_msg.mention = self._bot_user.username and msg.text and \ '@{}'.format(self._bot_user.username.lower()) in msg.text.lower() twx_msg.out = False # BotApi will never include it's own messages. twx_msg.unread = False # BotApi has no read/unread twx_msg.service = any([msg.new_chat_member, msg.left_chat_member, msg.new_chat_title, msg.new_chat_photo, msg.delete_chat_photo, msg.group_chat_created]) twx_msg.sender = self._to_twx_peer(msg.sender) twx_msg.receiver = self._to_twx_peer(msg.chat) twx_msg.text = msg.text twx_msg.media = {} twx_msg.date = datetime.fromtimestamp(msg.date) twx_msg.fwd_src = self._to_twx_peer(msg.forward_from) if msg.forward_from else None twx_msg.fwd_date = datetime.fromtimestamp(msg.forward_date) if msg.forward_date else None twx_msg.reply = self._to_twx_msg(msg.reply_to_message) if msg.reply_to_message else None twx_msg.action = None # TODO: Implement service messages return twx_msg def _to_twx_peer(self, peer): user = isinstance(peer, botapi.User) if user: twx_peer = User(self, peer.id) twx_peer.first_name = peer.first_name twx_peer.last_name = peer.last_name twx_peer.username = peer.username else: twx_peer = Group(self, peer.id) twx_peer.title = peer.title return twx_peer class TWXUnsupportedMethod(Exception): pass class TWXException(Exception): pass TWX.register(TWXBotApi)
35.747017
122
0.621278
3,800
29,956
4.724474
0.072632
0.06517
0.035036
0.036261
0.647747
0.610873
0.580571
0.557288
0.524481
0.509386
0
0.001417
0.293063
29,956
837
123
35.789725
0.846296
0.291795
0
0.406824
0
0
0.005552
0.001269
0
0
0
0.001195
0
1
0.24147
false
0.065617
0.020997
0.026247
0.330709
0.005249
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
c8c11f728d96a2aa4cc1f799d03d49639a343b25
538
py
Python
_/0349_04_Code/16.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_04_Code/16.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
_/0349_04_Code/16.py
paullewallencom/javascript-978-1-8495-1034-9
7e539d042c644931a9ef2418f66d260a1c6892eb
[ "Apache-2.0" ]
null
null
null
try: start = int(request.POST[u'start']) except: start = 0 try: results_per_page = int(request.POST[u'results_per_page']) except: results_per_page = RESULTS_PER_PAGE returned_results = results[start:start + results_per_page] json_serializer = serializers.get_serialized(u'json')() response = HttpResponse() response[u'Content-type'] = u'text/json' json_serializer.serialize([returned_results, len(results)], ensure_ascii = False, stream = response) return response
35.866667
104
0.680297
66
538
5.30303
0.439394
0.142857
0.2
0.085714
0
0
0
0
0
0
0
0.002353
0.210037
538
14
105
38.428571
0.821176
0
0
0.285714
0
0
0.085502
0
0
0
0
0
0
0
null
null
0
0
null
null
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
2
c8dead56a7d23059f2d2d33f3135ec1981be0597
1,172
py
Python
tests/test_ldap.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
null
null
null
tests/test_ldap.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
4
2021-06-08T20:20:08.000Z
2022-03-11T23:30:22.000Z
tests/test_ldap.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
null
null
null
""" run with nosetests -v --nocapture or nosetests -v """ from __future__ import print_function import sys import getpass from cloudmesh.user.cm_userLDAP import cm_userLDAP from cloudmesh_base.util import HEADING from cloudmesh_base.ConfigDict import ConfigDict from cloudmesh_base.util import path_expand from pprint import pprint from cloudmesh_base.locations import config_file class Test_cloudmesh: username = ConfigDict( filename=config_file("/cloudmesh.yaml")).get("cloudmesh.hpc.username") filename = "etc/cloudmesh.yaml" def setup(self): self.idp = cm_userLDAP() self.idp.connect("fg-ldap", "ldap") self.idp.refresh() def tearDown(self): pass def test_me(self): print("USERNAME", self.username) user = self.idp.find_one({'cm_user_id': self.username}) print(user) def test_list(self): users = self.idp.list() pprint(users) pprint(self.idp.users) def test_auth(self): password = getpass.getpass() if self.idp.authenticate(self.username, password): print("SUCCESS") else: print("FAILED")
21.703704
78
0.667235
146
1,172
5.205479
0.39726
0.064474
0.089474
0.055263
0.071053
0
0
0
0
0
0
0
0.228669
1,172
53
79
22.113208
0.840708
0.044369
0
0
0
0
0.087309
0.019802
0
0
0
0
0
1
0.151515
false
0.121212
0.272727
0
0.515152
0.242424
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
2
c8e59f0360064be243debebc8eca2baa4ee76e25
322
py
Python
boucanpy/core/base/responses.py
bbhunter/boucanpy
7d2fb105e7b1e90653a511534fb878bb62d02f17
[ "MIT" ]
34
2019-11-16T17:22:15.000Z
2022-02-11T23:12:46.000Z
boucanpy/core/base/responses.py
bbhunter/boucanpy
7d2fb105e7b1e90653a511534fb878bb62d02f17
[ "MIT" ]
1
2021-02-09T09:34:55.000Z
2021-02-10T21:46:20.000Z
boucanpy/core/base/responses.py
bbhunter/boucanpy
7d2fb105e7b1e90653a511534fb878bb62d02f17
[ "MIT" ]
9
2019-11-18T22:18:07.000Z
2021-02-08T13:23:51.000Z
from typing import List, Optional from pydantic import BaseModel from boucanpy.core.pagination.responses import PaginationResponse class MessageResponse(BaseModel): text: str type: str class BaseResponse(BaseModel): messages: List[MessageResponse] = [] pagination: Optional[PaginationResponse] = None
21.466667
65
0.776398
33
322
7.575758
0.606061
0
0
0
0
0
0
0
0
0
0
0
0.15528
322
14
66
23
0.919118
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
2
c8f06f1e7da2790ee5b80dee84b310e6b62ecd21
3,398
py
Python
palets/oracal641.py
rame0/py_img_colors_detect
5bb6a2c20c332174d7a09ad1f364eb6e967d4c38
[ "MIT" ]
4
2020-03-30T15:16:34.000Z
2021-08-04T17:03:58.000Z
palets/oracal641.py
rame0/py_img_colors_detect
5bb6a2c20c332174d7a09ad1f364eb6e967d4c38
[ "MIT" ]
null
null
null
palets/oracal641.py
rame0/py_img_colors_detect
5bb6a2c20c332174d7a09ad1f364eb6e967d4c38
[ "MIT" ]
1
2021-08-06T08:13:19.000Z
2021-08-06T08:13:19.000Z
pallet_color = [ (231, 234, 238), # 010 White (252, 166, 0), # 020Golden yellow (232, 167, 0), # 019 Signal yellow (254, 198, 0), # 021 Yellow (242, 203, 0), # 022 Light yellow (241, 225, 14), # 025 Brimstone yellow (116, 2, 16), # 312 Burgundy (145, 8, 20), # 030 Dark red (175, 0, 11), # 031 Red (199, 12, 0), # 032 Light red (211, 48, 0), # 047 Orange red (221, 68, 0), # 034 Orange (236, 102, 0), # 036 Light orange (255, 109, 0), # 035 Pastel orange (65, 40, 114), # 404 Purple (93, 43, 104), # 040 Violet (120, 95, 162), # 043 Lavender (186, 148, 188), # 042 Lilac (195, 40, 106), # 041 Pink (239, 135, 184), # 045 Soft pink (19, 29, 57), # 562 Deep sea blue (15, 17, 58), # 518 Steel blue (28, 47, 94), # 050 Dark blue (13, 31, 106), # 065 Cobalt blue (23, 43, 121), # 049 King blue (27, 47, 170), # 086 Brilliant blue (0, 58, 120), # 057 Blue (0, 65, 142), # 057 Traffic blue (0, 69, 131), # 051 Gentian blue (0, 79, 159), # 098 Gentian (0, 94, 173), # 052 Azure blue (0, 116, 187), # 084 Sky blue (0, 136, 195), # 053 Light blue (67, 162, 211), # 056 Ice blue (0, 131, 142), # 066 Turquoise blue (0, 155, 151), # 054 Turquoise (95, 206, 183), # 055 Mint (0, 60, 36), # 060 Dark green (0, 82, 54), # 613 Forest green (0, 122, 77), # 061 Green (0, 120, 63), # 068 Grass green (0, 137, 58), # 062 Light green (35, 155, 17), # 064 Yellow green (106, 167, 47), # 063 Lime-tree green (85, 51, 28), # 080 Brown (175, 89, 30), # 083 Nut brown (168, 135, 90), # 081 Light brown (205, 192, 158), # 082 Beige (231, 210, 147), # 023 Cream (6, 6, 7), # 070 Black (75, 76, 76), # 073 Dark grey (117, 125, 124), # 071 Grey (128, 133, 136), # 076 Telegrey (138, 143, 140), # 074 Middle grey (192, 195, 195), # 072 Light grey (111, 114, 116), # 090 Silver grey (121, 101, 50), # 091 Gold (105, 64, 30), # 092 Copper ] pallet_color_name = [ "010 White", "020Golden yellow", "019 Signal yellow", "021 Yellow", "022 Light yellow", "025 Brimstone yellow", "312 Burgundy", "030 Dark red", "031 Red", "032 Light red", "047 Orange red", "034 Orange", "036 Light orange", "035 Pastel orange", "404 Purple", "040 Violet", "043 Lavender", "042 Lilac", "041 Pink", "045 Soft pink", "562 Deep sea blue", "518 Steel blue", "050 Dark blue", "065 Cobalt blue", "049 King blue", "086 Brilliant blue", "057 Blue", "057 Traffic blue", "051 Gentian blue", "098 Gentian", "052 Azure blue", "084 Sky blue", "053 Light blue", "056 Ice blue", "066 Turquoise blue", "054 Turquoise", "055 Mint", "060 Dark green", "613 Forest green", "061 Green", "068 Grass green", "062 Light green", "064 Yellow green", "063 Lime-tree green", "080 Brown", "083 Nut brown", "081 Light brown", "082 Beige", "023 Cream", "070 Black", "073 Dark grey", "071 Grey", "076 Telegrey", "074 Middle grey", "072 Light grey", "090 Silver grey", "091 Gold", "092 Copper", ]
28.082645
43
0.512066
483
3,398
3.596273
0.457557
0.023028
0.017271
0.01612
0
0
0
0
0
0
0
0.332599
0.33196
3,398
120
44
28.316667
0.432599
0.245733
0
0
0
0
0.310703
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
cda23220fcd33ed86b3b8a8f1006632cedbd989f
331
py
Python
PythonLearning/v0024.py
JoaoG10110/Python
495044d61bb8d6ec3542433a3f54dd1f8177cb08
[ "MIT" ]
null
null
null
PythonLearning/v0024.py
JoaoG10110/Python
495044d61bb8d6ec3542433a3f54dd1f8177cb08
[ "MIT" ]
null
null
null
PythonLearning/v0024.py
JoaoG10110/Python
495044d61bb8d6ec3542433a3f54dd1f8177cb08
[ "MIT" ]
null
null
null
a = int(input('Digite o primeiro número: ')) b = int(input('Digite o segundo número: ')) c = int(input('Digite o terceiro número: ')) menor = a if b<a and b<c: menor = b if c<a and c<b: menor = c maior = a if b>a and b>c: maior = b if c>a and c>b: maior = c print(f'O maior valor é {maior}.') print(f'O menor valor é {menor}')
20.6875
44
0.625378
71
331
2.915493
0.267606
0.077295
0.202899
0.217391
0.193237
0.193237
0.193237
0
0
0
0
0
0.208459
331
15
45
22.066667
0.790076
0
0
0
0
0
0.374622
0
0
0
0
0
0
1
0
false
0
0
0
0
0.133333
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
cdaf67929f29ce9d34b43d64f32c4a3f408c6a05
6,977
py
Python
sleepdungeon/sprites/enemy_saber.py
robuf/sleepdungeon
d4b0b06eb5037b16ab5ded2a331763fe2df10ab1
[ "MIT" ]
6
2018-12-13T17:35:40.000Z
2020-02-22T21:53:01.000Z
sleepdungeon/sprites/enemy_saber.py
robuf/sleepdungeon
d4b0b06eb5037b16ab5ded2a331763fe2df10ab1
[ "MIT" ]
1
2018-11-21T06:14:13.000Z
2018-11-21T07:34:00.000Z
sleepdungeon/sprites/enemy_saber.py
robuf/sleepdungeon
d4b0b06eb5037b16ab5ded2a331763fe2df10ab1
[ "MIT" ]
1
2018-11-15T17:37:51.000Z
2018-11-15T17:37:51.000Z
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from .enemy import Enemy from .weapons import Sword from ..base.game_constants import SpriteType from ..base.sprite import Sprite from .. import res from ..base.game_constants import Facing import pygame class EnemySaber(Enemy): __BASE_SWORD_UP_SURFACE: pygame.Surface = None __BASE_SWORD_DOWN_SURFACE: pygame.Surface = None __BASE_SWORD_LEFT_SURFACE: pygame.Surface = None __BASE_SWORD_RIGHT_SURFACE: pygame.Surface = None __SURFACE_SWORD_UP: pygame.Surface = None __SURFACE_SWORD_DOWN: pygame.Surface = None __SURFACE_SWORD_LEFT: pygame.Surface = None __SURFACE_SWORD_RIGHT: pygame.Surface = None __BASE_SWORD_ATTACK_UP_SURFACE: pygame.Surface = None __BASE_SWORD_ATTACK_DOWN_SURFACE: pygame.Surface = None __BASE_SWORD_ATTACK_LEFT_SURFACE: pygame.Surface = None __BASE_SWORD_ATTACK_RIGHT_SURFACE: pygame.Surface = None __SURFACE_SWORD_ATTACK_UP: pygame.Surface = None __SURFACE_SWORD_ATTACK_DOWN: pygame.Surface = None __SURFACE_SWORD_ATTACK_LEFT: pygame.Surface = None __SURFACE_SWORD_ATTACK_RIGHT: pygame.Surface = None _WIDTH = 1 _HEIGHT = 1.5 _ANIMATION_LENGTH = 4 _MILISECONDS_PER_FRAME = 200 _MOVE_COOLDOWN = 400 def __init__(self): super().__init__([1, 1.5]) self.animation_i = 0 self.frame_cooldown = 0 self.lifes = 3 self.max_lifes = 3 self.selected_weapon = Sword() self.weapon_list = [self.selected_weapon] def _image(self) -> pygame.Surface: if self.attack_phase == 0: if self.facing == Facing.FACING_UP: img = EnemySaber.__SURFACE_SWORD_UP elif self.facing == Facing.FACING_DOWN: img = EnemySaber.__SURFACE_SWORD_DOWN if self.facing == Facing.FACING_LEFT: img = EnemySaber.__SURFACE_SWORD_LEFT elif self.facing == Facing.FACING_RIGHT: img = EnemySaber.__SURFACE_SWORD_RIGHT else: if self.facing == Facing.FACING_UP: img = EnemySaber.__SURFACE_SWORD_ATTACK_UP elif self.facing == Facing.FACING_DOWN: img = EnemySaber.__SURFACE_SWORD_ATTACK_DOWN if self.facing == Facing.FACING_LEFT: img = EnemySaber.__SURFACE_SWORD_ATTACK_LEFT elif self.facing == Facing.FACING_RIGHT: img = EnemySaber.__SURFACE_SWORD_ATTACK_RIGHT if self.attack_phase == 0: return img.subsurface( pygame.Rect( self.tile_size * self.animation_i, 0, self.tile_size * self.width, self.tile_size * self.height ) ) else: factor = 1.5 if self.facing == Facing.FACING_UP or self.facing == Facing.FACING_DOWN: factor = 1 - 0 return img.subsurface( pygame.Rect( self.tile_size * factor * (self.attack_phase - 1), 0, self.tile_size * factor * self.width, self.tile_size * self.height ) ) @property def rect(self) -> pygame.Rect: rect = super().rect if self.attack_phase > 0 and self.facing == Facing.FACING_LEFT: rect.inflate_ip(self.width * self.tile_size // 2, 0) rect.move_ip(-self.tile_size // 4, 0) return rect @property def sprite_type(self) -> SpriteType: return SpriteType.ENEMY @classmethod def update_render_context(cls, render_context): if not cls.__BASE_SWORD_UP_SURFACE: cls.__BASE_SWORD_UP_SURFACE = pygame.image.load(res.IMG_DIR + "enemy/saber/walk/up.png").convert_alpha() cls.__BASE_SWORD_DOWN_SURFACE = pygame.image.load( res.IMG_DIR + "enemy/saber/walk/down.png").convert_alpha() cls.__BASE_SWORD_LEFT_SURFACE = pygame.image.load( res.IMG_DIR + "enemy/saber/walk/left.png").convert_alpha() cls.__BASE_SWORD_RIGHT_SURFACE = pygame.image.load( res.IMG_DIR + "enemy/saber/walk/right.png").convert_alpha() cls.__BASE_SWORD_ATTACK_UP_SURFACE = pygame.image.load( res.IMG_DIR + "enemy/saber/attack/up.png").convert_alpha() cls.__BASE_SWORD_ATTACK_DOWN_SURFACE = pygame.image.load( res.IMG_DIR + "enemy/saber/attack/down.png").convert_alpha() cls.__BASE_SWORD_ATTACK_LEFT_SURFACE = pygame.image.load( res.IMG_DIR + "enemy/saber/attack/left.png").convert_alpha() cls.__BASE_SWORD_ATTACK_RIGHT_SURFACE = pygame.image.load( res.IMG_DIR + "enemy/saber/attack/right.png").convert_alpha() cls.__SURFACE_SWORD_UP = pygame.transform.smoothscale( cls.__BASE_SWORD_UP_SURFACE, ( int(cls._WIDTH * cls.tile_size * cls._ANIMATION_LENGTH), int(cls._HEIGHT * cls.tile_size) ) ) cls.__SURFACE_SWORD_DOWN = pygame.transform.smoothscale( cls.__BASE_SWORD_DOWN_SURFACE, ( int(cls._WIDTH * cls.tile_size * cls._ANIMATION_LENGTH), int(cls._HEIGHT * cls.tile_size) ) ) cls.__SURFACE_SWORD_LEFT = pygame.transform.smoothscale( cls.__BASE_SWORD_LEFT_SURFACE, ( int(cls._WIDTH * cls.tile_size * cls._ANIMATION_LENGTH), int(cls._HEIGHT * cls.tile_size) ) ) cls.__SURFACE_SWORD_RIGHT = pygame.transform.smoothscale( cls.__BASE_SWORD_RIGHT_SURFACE, ( int(cls._WIDTH * cls.tile_size * cls._ANIMATION_LENGTH), int(cls._HEIGHT * cls.tile_size) ) ) cls.__SURFACE_SWORD_ATTACK_UP = pygame.transform.smoothscale( cls.__BASE_SWORD_ATTACK_UP_SURFACE, ( int(cls._WIDTH * cls.tile_size * 2), int(cls._HEIGHT * cls.tile_size) ) ) cls.__SURFACE_SWORD_ATTACK_DOWN = pygame.transform.smoothscale( cls.__BASE_SWORD_ATTACK_DOWN_SURFACE, ( int(cls._WIDTH * cls.tile_size * 2), int(cls._HEIGHT * cls.tile_size) ) ) cls.__SURFACE_SWORD_ATTACK_LEFT = pygame.transform.smoothscale( cls.__BASE_SWORD_ATTACK_LEFT_SURFACE, ( int(cls._WIDTH * 1.5 * cls.tile_size * 2), int(cls._HEIGHT * cls.tile_size) ) ) cls.__SURFACE_SWORD_ATTACK_RIGHT = pygame.transform.smoothscale( cls.__BASE_SWORD_ATTACK_RIGHT_SURFACE, ( int(cls._WIDTH * 1.5 * cls.tile_size * 2), int(cls._HEIGHT * cls.tile_size) ) )
37.713514
116
0.600831
806
6,977
4.758065
0.111663
0.05867
0.053194
0.063103
0.830508
0.736636
0.662321
0.409126
0.405997
0.384094
0
0.008542
0.312025
6,977
184
117
37.918478
0.790417
0.006306
0
0.236025
0
0
0.029722
0.029722
0
0
0
0
0
1
0.031056
false
0
0.043478
0.006211
0.236025
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
cdb28a382362b071bdffce6401b37b895332e88a
2,072
py
Python
code/inout/io_mri.py
olmozavala/Prostate_and_PZ_DL_Segmentation_Code
0960967221caa0e6311ee4751488b58f7c3f1933
[ "AFL-3.0" ]
7
2019-07-04T02:43:12.000Z
2022-03-28T17:58:06.000Z
code/inout/io_mri.py
olmozavala/Prostate_and_PZ_DL_Segmentation_Code
0960967221caa0e6311ee4751488b58f7c3f1933
[ "AFL-3.0" ]
1
2020-02-09T15:30:37.000Z
2020-02-14T18:24:43.000Z
code/inout/io_mri.py
olmozavala/Prostate_and_PZ_DL_Segmentation_Code
0960967221caa0e6311ee4751488b58f7c3f1933
[ "AFL-3.0" ]
1
2019-03-16T07:13:23.000Z
2019-03-16T07:13:23.000Z
from os.path import join import numpy as np import SimpleITK as sitk def readImgAndProstate(inFolder, current_folder): '''Reads the HR and orginal of transversal and prostate''' img_tra_original = sitk.ReadImage(join(inFolder, current_folder, 'img_tra.nrrd')) ctr_pro = sitk.ReadImage(join(inFolder, current_folder, 'ctr_pro.nrrd')) img_tra_HR = sitk.ReadImage(join(inFolder, current_folder,'hr_tra.nrrd')) ctr_pro_HR = sitk.ReadImage(join(inFolder, current_folder, 'hr_ctr_pro.nrrd')) startROI = [int(x) for x in np.loadtxt(join(inFolder, current_folder, 'start_ROI.csv'))] sizeROI = [int(x) for x in np.loadtxt(join(inFolder, current_folder, 'size_ROI.csv'))] roi_ctr_pro = sitk.ReadImage(join(inFolder, current_folder, 'roi_ctr_pro.nrrd')) return [img_tra_original, img_tra_HR, ctr_pro, ctr_pro_HR, roi_ctr_pro, startROI, sizeROI] def readROI(inFolder, current_folder, type_segmentation): ''' Reads the roi files. tra,sag,cor for prostate and pz and tra,bval,adc for lesion''' roi_img_tra = sitk.ReadImage(join(inFolder, current_folder, 'roi_tra.nrrd')) if type_segmentation == 'PZ' or type_segmentation == 'Prostate': roi_img_sag = sitk.ReadImage(join(inFolder, current_folder, 'roi_sag.nrrd')) roi_img_cor = sitk.ReadImage(join(inFolder, current_folder, 'roi_cor.nrrd')) return [roi_img_tra,roi_img_sag,roi_img_cor] if type_segmentation == 'Lesion': roi_img_bval = sitk.ReadImage(join(inFolder, current_folder, 'roi_bval.nrrd')) roi_img_adc = sitk.ReadImage(join(inFolder, current_folder, 'roi_adc.nrrd')) return [roi_img_tra, roi_img_adc, roi_img_bval] def readPZ(inFolder, current_folder, multistream, img_size): '''Obtains the NN input data for case prostate or PZ''' ctr_pz_HR = sitk.ReadImage(join(inFolder, current_folder, 'hr_ctr_pz.nrrd')) ctr_pz = sitk.ReadImage(join(inFolder, current_folder, 'ctr_pz.nrrd')) roi_ctr_pz = sitk.ReadImage(join(inFolder, current_folder, 'roi_ctr_pz.nrrd')) return [ctr_pz, ctr_pz_HR, roi_ctr_pz]
51.8
94
0.736969
315
2,072
4.555556
0.193651
0.188153
0.263415
0.261324
0.491289
0.491289
0.464808
0.282927
0.124042
0.061324
0
0
0.144305
2,072
39
95
53.128205
0.809363
0.08832
0
0
0
0
0.111111
0
0
0
0
0
0
1
0.111111
false
0
0.111111
0
0.37037
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2