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
774cefee346e229c873448657717d7f5afce9959
4,512
py
Python
niapy/algorithms/basic/__init__.py
eltociear/NiaPy
7884aefec8f013d9f8db5c1af7080a61dd19a31d
[ "MIT" ]
null
null
null
niapy/algorithms/basic/__init__.py
eltociear/NiaPy
7884aefec8f013d9f8db5c1af7080a61dd19a31d
[ "MIT" ]
null
null
null
niapy/algorithms/basic/__init__.py
eltociear/NiaPy
7884aefec8f013d9f8db5c1af7080a61dd19a31d
[ "MIT" ]
null
null
null
"""Implementation of basic nature-inspired algorithms.""" from niapy.algorithms.basic.abc import ArtificialBeeColonyAlgorithm from niapy.algorithms.basic.ba import BatAlgorithm from niapy.algorithms.basic.bea import BeesAlgorithm from niapy.algorithms.basic.bfoa import BacterialForagingOptimizationAlgorithm from niapy.algorithms.basic.ca import CamelAlgorithm from niapy.algorithms.basic.cro import CoralReefsOptimization from niapy.algorithms.basic.cs import CuckooSearch from niapy.algorithms.basic.cso import CatSwarmOptimization from niapy.algorithms.basic.de import DifferentialEvolution, MultiStrategyDifferentialEvolution, \ DynNpDifferentialEvolution, AgingNpDifferentialEvolution, DynNpMultiStrategyDifferentialEvolution, \ CrowdingDifferentialEvolution, multi_mutations from niapy.algorithms.basic.es import EvolutionStrategy1p1, EvolutionStrategyMp1, EvolutionStrategyMpL, \ EvolutionStrategyML, CovarianceMatrixAdaptionEvolutionStrategy from niapy.algorithms.basic.fa import FireflyAlgorithm from niapy.algorithms.basic.foa import ForestOptimizationAlgorithm from niapy.algorithms.basic.fpa import FlowerPollinationAlgorithm from niapy.algorithms.basic.fss import FishSchoolSearch from niapy.algorithms.basic.fwa import FireworksAlgorithm, EnhancedFireworksAlgorithm, DynamicFireworksAlgorithm, \ DynamicFireworksAlgorithmGauss, BareBonesFireworksAlgorithm from niapy.algorithms.basic.ga import GeneticAlgorithm from niapy.algorithms.basic.gsa import GravitationalSearchAlgorithm from niapy.algorithms.basic.gso import GlowwormSwarmOptimization, GlowwormSwarmOptimizationV1, \ GlowwormSwarmOptimizationV2, GlowwormSwarmOptimizationV3 from niapy.algorithms.basic.gwo import GreyWolfOptimizer from niapy.algorithms.basic.hho import HarrisHawksOptimization from niapy.algorithms.basic.hs import HarmonySearch, HarmonySearchV1 from niapy.algorithms.basic.kh import KrillHerdV1, KrillHerdV2, KrillHerdV3, KrillHerdV4, KrillHerdV11 from niapy.algorithms.basic.mbo import MonarchButterflyOptimization from niapy.algorithms.basic.mfo import MothFlameOptimizer from niapy.algorithms.basic.mke import MonkeyKingEvolutionV1, MonkeyKingEvolutionV2, MonkeyKingEvolutionV3 from niapy.algorithms.basic.pso import ParticleSwarmAlgorithm, ParticleSwarmOptimization, \ CenterParticleSwarmOptimization, ComprehensiveLearningParticleSwarmOptimizer, \ OppositionVelocityClampingParticleSwarmOptimization, MutatedCenterParticleSwarmOptimization, \ MutatedCenterUnifiedParticleSwarmOptimization, MutatedParticleSwarmOptimization from niapy.algorithms.basic.sca import SineCosineAlgorithm __all__ = [ 'BatAlgorithm', 'FireflyAlgorithm', 'DifferentialEvolution', 'CrowdingDifferentialEvolution', 'AgingNpDifferentialEvolution', 'DynNpDifferentialEvolution', 'MultiStrategyDifferentialEvolution', 'DynNpMultiStrategyDifferentialEvolution', 'multi_mutations', # 'AgingNpMultiMutationDifferentialEvolution', 'FlowerPollinationAlgorithm', 'GreyWolfOptimizer', 'CatSwarmOptimization', 'GeneticAlgorithm', 'ArtificialBeeColonyAlgorithm', 'ParticleSwarmAlgorithm', 'BareBonesFireworksAlgorithm', 'CamelAlgorithm', 'MonkeyKingEvolutionV1', 'MonkeyKingEvolutionV2', 'MonkeyKingEvolutionV3', 'EvolutionStrategy1p1', 'EvolutionStrategyMp1', 'EvolutionStrategyMpL', 'EvolutionStrategyML', 'CovarianceMatrixAdaptionEvolutionStrategy', 'SineCosineAlgorithm', 'GlowwormSwarmOptimization', 'GlowwormSwarmOptimizationV1', 'GlowwormSwarmOptimizationV2', 'GlowwormSwarmOptimizationV3', 'HarmonySearch', 'HarmonySearchV1', 'KrillHerdV1', 'KrillHerdV2', 'KrillHerdV3', 'KrillHerdV4', 'KrillHerdV11', 'FireworksAlgorithm', 'EnhancedFireworksAlgorithm', 'DynamicFireworksAlgorithm', 'DynamicFireworksAlgorithmGauss', 'GravitationalSearchAlgorithm', 'MothFlameOptimizer', 'FishSchoolSearch', 'CuckooSearch', 'CoralReefsOptimization', 'ForestOptimizationAlgorithm', 'MonarchButterflyOptimization', 'BeesAlgorithm', 'ParticleSwarmOptimization', 'MutatedParticleSwarmOptimization', 'MutatedCenterUnifiedParticleSwarmOptimization', 'MutatedCenterParticleSwarmOptimization', 'OppositionVelocityClampingParticleSwarmOptimization', 'ComprehensiveLearningParticleSwarmOptimizer', 'CenterParticleSwarmOptimization', 'HarrisHawksOptimization', 'BacterialForagingOptimizationAlgorithm' ]
45.12
115
0.824025
288
4,512
12.888889
0.336806
0.065463
0.1382
0.174569
0.094828
0
0
0
0
0
0
0.007948
0.107713
4,512
99
116
45.575758
0.914059
0.021498
0
0
0
0
0.310955
0.227262
0
0
0
0
0
1
0
false
0
0.284211
0
0.284211
0
0
0
1
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
91f516b7facfedd5f51d7cf246cce46168bba6b7
2,666
py
Python
testapp/tests.py
wilkes/milkman
dd25f068f0aa2e033b44ae53b8050413baf45f92
[ "MIT" ]
3
2016-01-26T10:20:32.000Z
2020-09-01T05:06:30.000Z
testapp/tests.py
wilkes/milkman
dd25f068f0aa2e033b44ae53b8050413baf45f92
[ "MIT" ]
null
null
null
testapp/tests.py
wilkes/milkman
dd25f068f0aa2e033b44ae53b8050413baf45f92
[ "MIT" ]
null
null
null
from milkman import * from testapp.models import * import unittest import types from django.db import models MODELS = [Root, Child] class ModelTest(unittest.TestCase): def tearDown(self): for m in MODELS: m._default_manager.all().delete() def test_create(self): r = milkman.deliver(Root) self.assertEqual(Root, r.__class__) self.assertTrue(bool(r.id)) assert r.name is not None def test_create_explicit(self): r = milkman.deliver(Root, name='foo') self.assertEqual('foo', r.name) def test_create_child(self): child = milkman.deliver(Child) assert child.root def test_optional_relation(self): sibling = milkman.deliver(Sibling) self.assertEqual(None, sibling.root) def test_recurs_on_grandchildren(self): gc = milkman.deliver(GrandChild) self.assertNotEqual(None, gc.parent.root) def test_m2m(self): aunt = milkman.deliver(Aunt) self.assertEquals(1, len(aunt.uncles.all())) self.assertEquals(1, len(Uncle.objects.all())) self.assertEquals(Uncle.objects.all()[0], aunt.uncles.all()[0]) def test_m2m_explicit(self): uncle = milkman.deliver(Uncle) aunt = milkman.deliver(Aunt, uncles=[uncle]) self.assertEquals(uncle, aunt.uncles.all()[0]) class RandomFieldTest(unittest.TestCase): def test_required_field(self): root = milkman.deliver(Root) assert root.name assert isinstance(root.boolean, types.BooleanType) class FieldTest(unittest.TestCase): def test_needs_generated_value(self): f = Root._meta.get_field('name') assert MilkTruck(None).needs_generated_value(f) assert not f.has_default() self.assertEqual('', f.get_default()) class FieldValueGeneratorTest(unittest.TestCase): def test_email_generator(self): f = models.EmailField() g = email_generator('test', 'fake.com')(f)() self.assertEquals('test1@fake.com', g.next()) self.assertEquals('test2@fake.com', g.next()) def test_random_str(self): self.assertEqual(8, len(random_string())) self.assertEqual('a' * 8, random_string(chars=['a'])) self.assertEqual('a' * 10, random_string(10, ['a'])) def test_random_choice_iterator(self): self.assertEqual([''],[x for x in random_choice_iterator()]) self.assertEqual([1],[x for x in random_choice_iterator([1])]) self.assertEqual(['', ''], [s for s in random_choice_iterator(size=2)]) self.assertEqual([1, 1], [s for s in random_choice_iterator([1], 2)])
33.746835
79
0.647037
336
2,666
4.988095
0.285714
0.050119
0.059666
0.052506
0.093079
0.064439
0.064439
0
0
0
0
0.010597
0.221305
2,666
78
80
34.179487
0.796724
0
0
0
0
0
0.020255
0
0
0
0
0
0.403226
1
0.209677
false
0
0.080645
0
0.354839
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
2
620da4e8a7e314a65ef0d8365692b5f8acab4a41
863
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractDustToRust.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractDustToRust.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractDustToRust.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractDustToRust(item): """ Parser for 'Dust to Rust' """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or 'preview' in item['title'].lower(): return None if 'Kyuuketsu Hime' in item['tags']: return buildReleaseMessageWithType(item, 'Kyuuketsu Hime wa Barairo no Yume o Miru', vol, chp, frag=frag, postfix=postfix) if 'Vampire Princess' in item['tags']: return buildReleaseMessageWithType(item, 'Kyuuketsu Hime wa Barairo no Yume o Miru', vol, chp, frag=frag, postfix=postfix) if 'Reincarnate into a Slime' in item['tags']: return buildReleaseMessageWithType(item, 'Tensei Shitara Slime Datta Ken', vol, chp, frag=frag, postfix=postfix) if 'Slime' in item['tags']: return buildReleaseMessageWithType(item, 'Tensei Shitara Slime Datta Ken', vol, chp, frag=frag, postfix=postfix) return False
53.9375
124
0.741599
117
863
5.470085
0.367521
0.046875
0.078125
0.1
0.678125
0.678125
0.678125
0.675
0.675
0.675
0
0
0.136732
863
16
125
53.9375
0.85906
0.028969
0
0.307692
0
0
0.279855
0
0
0
0
0
0
1
0.076923
false
0
0
0
0.538462
0
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
0
0
0
1
0
0
2
620df04d6a61a56854d45c1de855366f4e9b0014
1,880
py
Python
src/sage/groups/matrix_gps/morphism.py
LaisRast/sage
5fb2a6ea44400e469caee82748cf863ca0c5f724
[ "BSL-1.0" ]
null
null
null
src/sage/groups/matrix_gps/morphism.py
LaisRast/sage
5fb2a6ea44400e469caee82748cf863ca0c5f724
[ "BSL-1.0" ]
null
null
null
src/sage/groups/matrix_gps/morphism.py
LaisRast/sage
5fb2a6ea44400e469caee82748cf863ca0c5f724
[ "BSL-1.0" ]
null
null
null
""" Homomorphisms Between Matrix Groups Deprecated May, 2018; use :class:`sage.groups.libgap_morphism` instead. """ #***************************************************************************** # Copyright (C) 2006 David Joyner and William Stein <wstein@gmail.com> # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** from sage.misc.lazy_import import lazy_import def to_libgap(x): """ Helper to convert ``x`` to a LibGAP matrix or matrix group element. Deprecated; use the ``x.gap()`` method or ``libgap(x)`` instead. EXAMPLES:: sage: from sage.groups.matrix_gps.morphism import to_libgap sage: to_libgap(GL(2,3).gen(0)) doctest:...: DeprecationWarning: this function is deprecated. Use x.gap() or libgap(x) instead. See https://trac.sagemath.org/25444 for details. [ [ Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0 ] ] sage: to_libgap(matrix(QQ, [[1,2],[3,4]])) [ [ 1, 2 ], [ 3, 4 ] ] """ from sage.misc.superseded import deprecation deprecation(25444, "this function is deprecated." " Use x.gap() or libgap(x) instead.") try: return x.gap() except AttributeError: from sage.libs.gap.libgap import libgap return libgap(x) lazy_import('sage.groups.libgap_morphism', 'GroupMorphism_libgap', 'MatrixGroupMorphism_im_gens', deprecation=25444) lazy_import('sage.categories.morphism', 'Morphism', 'MatrixGroupMap', deprecation=25444) lazy_import('sage.categories.morphism', 'Morphism', 'MatrixGroupMorphism', deprecation=25444)
35.471698
78
0.593085
225
1,880
4.888889
0.453333
0.045455
0.024545
0.043636
0.194545
0.187273
0.187273
0.187273
0.085455
0.085455
0
0.034899
0.207447
1,880
52
79
36.153846
0.703356
0.583511
0
0.125
0
0
0.328632
0.143865
0
0
0
0
0
1
0.0625
false
0
0.375
0
0.5625
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
622d95347ec2f070bc6f30eee66c4e1376a353df
1,446
py
Python
tests/test_redis_event_counter.py
daniel-butler/atomicpuppy
dfb98ed44bb727a793754d93bfc49b3276a6918d
[ "MIT" ]
44
2015-07-08T14:19:39.000Z
2022-03-11T10:22:51.000Z
tests/test_redis_event_counter.py
daniel-butler/atomicpuppy
dfb98ed44bb727a793754d93bfc49b3276a6918d
[ "MIT" ]
50
2015-08-12T15:49:43.000Z
2021-10-07T09:29:20.000Z
tests/test_redis_event_counter.py
daniel-butler/atomicpuppy
dfb98ed44bb727a793754d93bfc49b3276a6918d
[ "MIT" ]
7
2015-07-09T14:14:22.000Z
2020-03-03T14:18:12.000Z
import fakeredis from unittest.mock import Mock from atomicpuppy.atomicpuppy import RedisCounter from .fakehttp import SpyLog from .fakes import FakeRedisCounter from redis import TimeoutError class When_redis_contains_no_information_for_a_stream: def given_an_empty_redis_counter(self): self.counter = FakeRedisCounter(instance="fred") def it_should_return_negative_one(self): assert(self.counter["my-stream"] == -1) class When_redis_contains_a_last_read_value_for_a_stream: last_read = 92837 def given_a_redis_instance_with_a_last_read_event(self): self.redis_server = fakeredis.FakeServer() self.redis = fakeredis.FakeStrictRedis(server=self.redis_server) self.redis.set('urn:atomicpuppy:fred:my-stream:position', self.last_read) def it_should_return_the_last_read_value(self): ctr = FakeRedisCounter(instance="fred", redis=self.redis) assert(ctr["my-stream"] == self.last_read) def cleanup_redis(self): self.redis.flushall() class When_setting_the_last_read_value: def given_an_empty_redis_instance(self): self.redis = fakeredis.FakeStrictRedis() self.ctr = FakeRedisCounter("instance") def because_we_record_an_event(self): self.ctr["my-stream"] = 10 def it_should_be_persisted_in_redis(self): assert(self.ctr["my-stream"] == 10) def cleanup_redis(self): self.redis.flushall()
29.510204
81
0.736515
193
1,446
5.19171
0.316062
0.071856
0.051896
0.043912
0.148703
0.108782
0.071856
0
0
0
0
0.008347
0.171508
1,446
48
82
30.125
0.828047
0
0
0.125
0
0
0.062932
0.026971
0
0
0
0
0.09375
1
0.28125
false
0
0.1875
0
0.59375
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
623c69dd2c9b5f8243458834c312384abc92c52e
564
py
Python
ch09/modadmin.py
remotephone/pythoncrashcourse
837d05c5ef4976621bd2206328254749a71d60ff
[ "Apache-2.0" ]
null
null
null
ch09/modadmin.py
remotephone/pythoncrashcourse
837d05c5ef4976621bd2206328254749a71d60ff
[ "Apache-2.0" ]
null
null
null
ch09/modadmin.py
remotephone/pythoncrashcourse
837d05c5ef4976621bd2206328254749a71d60ff
[ "Apache-2.0" ]
null
null
null
from moduser import User class Admin(User): """This is a special user with special rights.""" def __init__(self, first_name, last_name, zip, age): """Initialize attributes of the parent class.""" super().__init__(first_name, last_name, zip, age) self.privs = Privileges() class Privileges(): """This is a special user with special rights.""" def __init__(self): """Initialize attributes of the parent class.""" self.privs = ['read', 'write', 'delete'] def show_privs(self): print(self.privs)
31.333333
57
0.636525
72
564
4.75
0.458333
0.078947
0.040936
0.081871
0.614035
0.614035
0.269006
0.269006
0.269006
0.269006
0
0
0.23227
564
18
58
31.333333
0.789838
0.306738
0
0
0
0
0.040431
0
0
0
0
0
0
1
0.3
false
0
0.1
0
0.6
0.1
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
6253fcf006330ba0392af371cd052a583f8dbd8d
1,247
py
Python
ensconce/model/satypes.py
netwrkr/ensconce
eda938c67eb0af8fb7d3ccf668e07d2f76485aa5
[ "BSD-3-Clause" ]
1
2021-05-05T13:52:44.000Z
2021-05-05T13:52:44.000Z
ensconce/model/satypes.py
netwrkr/ensconce
eda938c67eb0af8fb7d3ccf668e07d2f76485aa5
[ "BSD-3-Clause" ]
null
null
null
ensconce/model/satypes.py
netwrkr/ensconce
eda938c67eb0af8fb7d3ccf668e07d2f76485aa5
[ "BSD-3-Clause" ]
null
null
null
import binascii import json from sqlalchemy import TypeDecorator, Text class Json(TypeDecorator): impl = Text def process_bind_param(self, value, dialect): if value is not None: value = json.dumps(value) return value def process_result_value(self, value, dialect): if value is not None: value = json.loads(value) return value class SimpleList(TypeDecorator): impl = Text def process_bind_param(self, value, dialect): if value == '': value = None if value is not None: if isinstance(value, (tuple, list)): value = ','.join(value) return value def process_result_value(self, value, dialect): if value == '': value = None if value is not None: value = value.split(',') return value class HexEncodedBinary(TypeDecorator): impl = Text def process_bind_param(self, value, dialect): if value is not None: value = binascii.hexlify(value) return value def process_result_value(self, value, dialect): if value is not None: value = binascii.unhexlify(value) return value
24.94
51
0.590217
143
1,247
5.062937
0.230769
0.077348
0.132597
0.149171
0.696133
0.696133
0.689227
0.689227
0.689227
0.689227
0
0
0.331195
1,247
50
52
24.94
0.868106
0
0
0.657895
0
0
0.001603
0
0
0
0
0
0
1
0.157895
false
0
0.078947
0
0.552632
0
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
0
0
0
1
0
0
2
626090566e9e02a63524fa334a1007fbe289cbbf
2,329
py
Python
src/calculate_cs2006_timescale.py
bdrummond1/um_post_proc
2dc1dcaa164772e09e77cd3f3e7d927f2237228a
[ "MIT" ]
1
2020-04-23T17:06:40.000Z
2020-04-23T17:06:40.000Z
src/calculate_cs2006_timescale.py
bdrummond1/um_post_proc
2dc1dcaa164772e09e77cd3f3e7d927f2237228a
[ "MIT" ]
null
null
null
src/calculate_cs2006_timescale.py
bdrummond1/um_post_proc
2dc1dcaa164772e09e77cd3f3e7d927f2237228a
[ "MIT" ]
null
null
null
from pylab import * # Script to Compute the CO-CH4 chemical timescale and dynamical timescale h2coeff = [3.10501126E+00,3.87207292E-04,3.65811209E-07,-2.74517202E-10,6.56030779E-14,-8.99596963E+02,-2.09912576E+00, 2.46899055E+00,6.53957408E-03,-1.47074304E-05,1.42487390E-08,-4.90075762E-12,-9.22698236E+02,1.10509172E-01] cocoeff = [ 3.02507800E+00,1.44268850E-03,-5.63082700E-07,1.01858130E-10,-6.91095100E-15,-1.42683500E+04,6.10821700E+00, 3.26245100E+00,1.51194090E-03,-3.88175500E-06,5.58194400E-09,-2.47495100E-12,-1.43105390E+04,4.84889700E+00] ch3ocoeff = [ 6.45804000E+00,3.22182000E-03,-5.09801000E-07,4.41966000E-11,-1.69366000E-15,-8.23233000E+02,-1.22475000E+01, 2.40571000E-01,1.87747000E-02,-2.13180000E-05,1.81151000E-08,-6.61230000E-12,1.35827000E+03,2.11815000E+01] P0 = 1.013250e+5 xh2 = 0.853 kb = 1.380620E-23 def compute_timescale(p,t): timescale = np.zeros(t.size) for i in range(t.size): if t[i] > 1000.: muh2 = h2coeff[0]*(1.-log(t[i])) - h2coeff[1]*t[i]/2. - h2coeff[2]*t[i]**2./6. - h2coeff[3]*t[i]**3./12. - h2coeff[4]*t[i]**4./20. + h2coeff[5]/t[i] - h2coeff[6] muco = cocoeff[0]*(1.-log(t[i])) - cocoeff[1]*t[i]/2. - cocoeff[2]*t[i]**2./6. - cocoeff[3]*t[i]**3./12. - cocoeff[4]*t[i]**4./20. + cocoeff[5]/t[i] - cocoeff[6] much3o = ch3ocoeff[0]*(1.-log(t[i])) - ch3ocoeff[1]*t[i]/2. - ch3ocoeff[2]*t[i]**2./6. - ch3ocoeff[3]*t[i]**3./12. - ch3ocoeff[4]*t[i]**4./20. + ch3ocoeff[5]/t[i] - ch3ocoeff[6] else: muh2 = h2coeff[7]*(1.-log(t[i])) - h2coeff[8]*t[i]/2. - h2coeff[9]*t[i]**2./6. - h2coeff[10]*t[i]**3./12. - h2coeff[11]*t[i]**4./20. + h2coeff[12]/t[i] - h2coeff[13] muco = cocoeff[7]*(1.-log(t[i])) - cocoeff[8]*t[i]/2. - cocoeff[9]*t[i]**2./6. - cocoeff[10]*t[i]**3./12. - cocoeff[11]*t[i]**4./20. + cocoeff[12]/t[i] - cocoeff[13] much3o = ch3ocoeff[7]*(1.-log(t[i])) - ch3ocoeff[8]*t[i]/2. - ch3ocoeff[9]*t[i]**2./6. - ch3ocoeff[10]*t[i]**3./12. - ch3ocoeff[11]*t[i]**4./20. + ch3ocoeff[12]/t[i] - ch3ocoeff[13] k0 = 1.4e-6*t[i]**(-1.2) k0 = k0*exp(-7800/t[i]) kinf = 1.5e11*t[i] kinf = kinf*exp(-12880/t[i]) n = p[i]/(kb*t[i]) n = n/(100.**3.) k = k0*kinf/(k0*n+kinf) keq = muco + 3./2.*muh2 - much3o keq = exp(-keq) timescale[i] = n*k*xh2**(3./2.)*(p[i]/P0)**(3./2.) timescale[i] = keq/timescale[i] return timescale
46.58
184
0.61228
460
2,329
3.097826
0.263043
0.058947
0.025263
0.025263
0.234386
0
0
0
0
0
0
0.324988
0.108201
2,329
50
185
46.58
0.361098
0.030485
0
0
0
0
0
0
0
0
0
0
0
1
0.030303
false
0
0.030303
0
0.090909
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
6264832a04513aaf0b529d5dc0cff68e395868a2
528
py
Python
labs/lab11/ex2/ex2.py
jamestiotio/dbsys
26f545a51626ce232c0dc26b70ef206e71b273fc
[ "MIT" ]
null
null
null
labs/lab11/ex2/ex2.py
jamestiotio/dbsys
26f545a51626ce232c0dc26b70ef206e71b273fc
[ "MIT" ]
null
null
null
labs/lab11/ex2/ex2.py
jamestiotio/dbsys
26f545a51626ce232c0dc26b70ef206e71b273fc
[ "MIT" ]
null
null
null
import sys from pyspark import SparkContext, SparkConf conf = SparkConf().setAppName("Ex2") sc = SparkContext(conf=conf) def ip_address(row): return (row[2], 1) def splitline(line): return line.split(",") def count(x, y): return x + y def to_csv(line): return ",".join([str(line[0]), str(line[1])]) text_file = sc.textFile("hdfs://localhost:9000/input/") output = text_file.map(splitline).map(ip_address).reduceByKey(count).map(to_csv) output.saveAsTextFile("hdfs://localhost:9000/output/") sc.stop()
18.857143
80
0.691288
77
528
4.662338
0.519481
0.050139
0.094708
0
0
0
0
0
0
0
0
0.028322
0.130682
528
27
81
19.555556
0.753813
0
0
0
0
0
0.117424
0.107955
0
0
0
0
0
1
0.25
false
0
0.125
0.25
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
62747c0f08214c6f62d62d87d3d7de1d28f3d4e4
3,131
py
Python
classy/models.py
Krocodial/DSC
91063b06b536e732e655ce7f1ad0b7c2caa61e0d
[ "Apache-2.0" ]
null
null
null
classy/models.py
Krocodial/DSC
91063b06b536e732e655ce7f1ad0b7c2caa61e0d
[ "Apache-2.0" ]
null
null
null
classy/models.py
Krocodial/DSC
91063b06b536e732e655ce7f1ad0b7c2caa61e0d
[ "Apache-2.0" ]
null
null
null
from django.db import models import datetime from django.utils import timezone # Create your models here. class classification_count(models.Model): classification_choices = ( ('Unclassified', 'unclassified'), ('PUBLIC', 'public'), ('CONFIDENTIAL', 'confidential'), ('PROTECTED A', 'protected_a'), ('PROTECTED B', 'protected_b'), ('PROTECTED C', 'protected_c'), ) classification_name = models.CharField(max_length=50, choices=classification_choices, null=True) count = models.IntegerField() date = models.DateField() class classification(models.Model): classification_choices = ( ('Unclassified', 'unclassified'), ('PUBLIC', 'public'), ('CONFIDENTIAL', 'confidential'), ('PROTECTED A', 'protected_a'), ('PROTECTED B', 'protected_b'), ('PROTECTED C', 'protected_c'), ) classification_name = models.CharField(max_length=50, choices=classification_choices, default='unclassified') schema = models.CharField(max_length=50, null=True) table_name = models.CharField(max_length=50, null=True) column_name = models.CharField(max_length=50, null=True) category = models.CharField(max_length=40, null=True) datasource_description = models.CharField(max_length=200, null=True) creation_date = models.DateTimeField(auto_now_add=True) created_by = models.CharField(max_length=50, null=True) state_choices = ( ('Active', 'Active'), ('Inactive', 'Inactive'), ('Pending', 'Pending'), ) state = models.CharField(max_length=15, choices=state_choices, null=True) summary = models.CharField(max_length=500, null=True) #date_added = models.DateTimeField(auto_now_add=True) #date_last_updated = models.DateTimeField(auto_now=True) class classification_exception(models.Model): classy = models.ForeignKey(classification, on_delete=models.CASCADE) class classification_logs(models.Model): classy = models.ForeignKey(classification, on_delete=models.CASCADE) action_time = models.DateTimeField(auto_now_add=True) action_flag = models.SmallIntegerField() n_classification = models.CharField(max_length=50, null=True) o_classification = models.CharField(max_length=50, null=True) user_id = models.CharField(max_length=100, null=True) state = models.CharField(max_length=15, null=True) approved_by = models.CharField(max_length=50, null=True) class classification_review_groups(models.Model): user = models.CharField(max_length=50, null=True) timestamp = models.DateTimeField(auto_now_add=True) class classification_review(models.Model): classy = models.ForeignKey(classification, on_delete=models.CASCADE) group = models.ForeignKey(classification_review_groups, on_delete=models.CASCADE, null=True) classification_name = models.CharField(max_length=50, null=True) schema = models.CharField(max_length=50, null=True) table_name = models.CharField(max_length=50, null=True) column_name = models.CharField(max_length=50, null=True) datasource_description = models.CharField(max_length=100, null=True) action_flag = models.SmallIntegerField() o_classification = models.CharField(max_length=50, null=True)
41.197368
113
0.757266
383
3,131
5.989556
0.208877
0.143854
0.172624
0.230166
0.703575
0.674804
0.590235
0.549259
0.437663
0.394943
0
0.017372
0.117534
3,131
75
114
41.746667
0.812885
0.04184
0
0.428571
0
0
0.10217
0
0
0
0
0
0
1
0
false
0
0.047619
0
0.714286
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
627a8cc734a3415dc33477edf97a62c210b9cd65
535
py
Python
decorators/unit_info_decorators.py
uoshvis/python-examples
2ec2fc9f4bb0870caef6d5e2f213e97c1b0b8a0c
[ "MIT" ]
null
null
null
decorators/unit_info_decorators.py
uoshvis/python-examples
2ec2fc9f4bb0870caef6d5e2f213e97c1b0b8a0c
[ "MIT" ]
null
null
null
decorators/unit_info_decorators.py
uoshvis/python-examples
2ec2fc9f4bb0870caef6d5e2f213e97c1b0b8a0c
[ "MIT" ]
null
null
null
import math def set_unit(unit): """Register a unit on a function""" def decorator_set_unit(func): func.unit = unit return func return decorator_set_unit @set_unit("cm^3") def volume(radius, height): return math.pi * radius**2 * height def main(): print(volume(3, 5)) print(volume.unit) if __name__ == '__main__': main() # The same result could be achieved with function annotations # import math # # def volume(radius, height) -> "cm^3": # return math.pi * radius**2 * height
16.71875
61
0.642991
76
535
4.342105
0.421053
0.084848
0.078788
0.127273
0.151515
0.151515
0
0
0
0
0
0.014634
0.233645
535
32
62
16.71875
0.790244
0.336449
0
0
0
0
0.034682
0
0
0
0
0
0
1
0.285714
false
0
0.071429
0.071429
0.571429
0.142857
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
628bca34bfd1134269cf6e4ee4a8cd01e16fd71f
235
py
Python
02 Algorithms/solutions/sum_numbers.py
ksetdekov/HSE_DS
619d5b84f9d9e97b58ca1f12c5914ec65456c2c8
[ "MIT" ]
1
2020-09-26T18:48:11.000Z
2020-09-26T18:48:11.000Z
02 Algorithms/solutions/sum_numbers.py
ksetdekov/HSE_DS
619d5b84f9d9e97b58ca1f12c5914ec65456c2c8
[ "MIT" ]
null
null
null
02 Algorithms/solutions/sum_numbers.py
ksetdekov/HSE_DS
619d5b84f9d9e97b58ca1f12c5914ec65456c2c8
[ "MIT" ]
null
null
null
N, M = list(map(int, input().split())) # N, M = (2, 3) def simple_add(n, m): if m == 0: return n elif m > 0: return simple_add(n + m, 0) else: return simple_add(n + m, 0) print(simple_add(N, M))
15.666667
38
0.497872
42
235
2.690476
0.428571
0.106195
0.353982
0.389381
0.318584
0.318584
0
0
0
0
0
0.037975
0.32766
235
14
39
16.785714
0.677215
0.055319
0
0.222222
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.444444
0.111111
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
628be9e395bde45929acdb5320777f910dc0e1b6
3,842
py
Python
helium/auth/admin.py
HeliumEdu/platform
54b82a40c21fd14d1b7f37d5f2afb51eea2f8cf5
[ "MIT" ]
15
2018-01-02T00:44:58.000Z
2022-03-19T21:38:29.000Z
helium/auth/admin.py
HeliumEdu/platform
54b82a40c21fd14d1b7f37d5f2afb51eea2f8cf5
[ "MIT" ]
327
2017-11-24T22:36:07.000Z
2022-02-10T08:09:08.000Z
helium/auth/admin.py
HeliumEdu/platform
54b82a40c21fd14d1b7f37d5f2afb51eea2f8cf5
[ "MIT" ]
3
2018-05-04T17:57:58.000Z
2021-11-18T13:58:46.000Z
from django import forms from django.contrib.admin import ModelAdmin from django.contrib.auth import admin, password_validation from django.contrib.auth import get_user_model from django.contrib.auth.forms import UserChangeForm, UserCreationForm from django.core import exceptions from rest_framework.authtoken.models import Token from helium.auth.models import UserProfile from helium.auth.models import UserSettings from helium.common.admin import admin_site, BaseModelAdmin __author__ = "Alex Laird" __copyright__ = "Copyright 2019, Helium Edu" __version__ = "1.4.38" class AdminUserCreationForm(UserCreationForm): def clean_password2(self): password1 = self.cleaned_data.get("password1") password2 = self.cleaned_data.get("password2") if password1 != password2: raise forms.ValidationError("You must enter matching passwords.") try: password_validation.validate_password(password=password1, user=get_user_model()) except exceptions.ValidationError as e: raise forms.ValidationError(list(e.messages)) return password1 def save(self, commit=True): super().save(commit) self.instance.is_active = True self.instance.save() return self.instance class UserAdmin(admin.UserAdmin, BaseModelAdmin): form = UserChangeForm add_form = AdminUserCreationForm list_display = ('email', 'username', 'created_at', 'last_login', 'is_active') list_filter = ( 'is_active', 'profile__phone_verified', 'settings__default_view', 'settings__receive_emails_from_admin',) search_fields = ('email', 'username') ordering = ('-last_login',) add_fieldsets = ( (None, { 'fields': ('username', 'email', 'password1', 'password2',), }), ) fieldsets = None filter_horizontal = () def get_readonly_fields(self, request, obj=None): if obj: return self.readonly_fields + ('created_at', 'last_login',) return self.readonly_fields class UserSettingsAdmin(BaseModelAdmin): list_display = ['time_zone', 'default_view', 'receive_emails_from_admin', 'get_user'] list_filter = ['default_view', 'week_starts_on', 'receive_emails_from_admin'] search_fields = ('user__email', 'user__username') ordering = ('user__username',) readonly_fields = ('user',) def get_user(self, obj): if obj.user: return obj.user.get_username() else: return '' def has_add_permission(self, request): return False get_user.short_description = 'User' get_user.admin_order_field = 'user__username' class UserProfileAdmin(BaseModelAdmin): list_display = ['phone', 'phone_verified', 'get_user'] search_fields = ('user__email', 'user__username') ordering = ('user__username',) readonly_fields = ('user',) def has_add_permission(self, request): return False def get_user(self, obj): if obj.user: return obj.user.get_username() else: return '' get_user.short_description = 'User' get_user.admin_order_field = 'user__username' class TokenAdmin(ModelAdmin): list_display = ['key', 'created', 'get_user'] search_fields = ('key', 'user__email', 'user__username') ordering = ('user__username',) readonly_fields = ('user', 'created') def get_user(self, obj): if obj.user: return obj.user.get_username() else: return '' get_user.short_description = 'User' get_user.admin_order_field = 'user__username' # Register the models in the Admin admin_site.register(get_user_model(), UserAdmin) admin_site.register(UserSettings, UserSettingsAdmin) admin_site.register(UserProfile, UserProfileAdmin) admin_site.register(Token, TokenAdmin)
30.251969
113
0.688444
435
3,842
5.774713
0.271264
0.041799
0.02707
0.02508
0.325637
0.283439
0.261147
0.261147
0.229697
0.229697
0
0.006217
0.204581
3,842
126
114
30.492063
0.815772
0.008329
0
0.344086
0
0
0.170431
0.034139
0
0
0
0
0
1
0.086022
false
0.096774
0.107527
0.021505
0.612903
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
655a17fb6c7a1ee375691bc4c6e6c5761763f29e
626
py
Python
class.py
KangFrank/Python_Start
5d09ef97dd3960d0cb1b99dca017fbc288dbc98c
[ "FSFAP" ]
2
2017-07-26T07:57:55.000Z
2018-09-30T14:39:21.000Z
class.py
KangFrank/Python_Start
5d09ef97dd3960d0cb1b99dca017fbc288dbc98c
[ "FSFAP" ]
null
null
null
class.py
KangFrank/Python_Start
5d09ef97dd3960d0cb1b99dca017fbc288dbc98c
[ "FSFAP" ]
null
null
null
class person: count=0 #class attribute def __init__(self,name="bol",age=23): #constructor self.__name=name #instance attribute self.__age=age #instance attribute person.count=person.count+1 def setname(self,name): self.__name=name def getname(self): return self.__name def displayInfo(self): #method print(self.name, self.age) name=property(getname,setname) def display(str): print(str) def displaydecorator(fn): def display_wrapper(str): print('Output:', end=" ") fn(str) return display_wrapper
24.076923
55
0.618211
75
626
4.973333
0.386667
0.128686
0.064343
0
0
0
0
0
0
0
0
0.008791
0.273163
626
25
56
25.04
0.810989
0.108626
0
0.1
0
0
0.020913
0
0
0
0
0
0
1
0.35
false
0
0
0.05
0.6
0.15
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
65654ce13ba261b61ae89256d263871c21dd71ad
1,770
py
Python
groupby-total/groupby-total.py
henrywkk/python-pandas
fea2038fdab87ebb19d05e03cdeff069f5e7101d
[ "MIT" ]
1
2019-09-22T08:24:35.000Z
2019-09-22T08:24:35.000Z
groupby-total/groupby-total.py
henrywkk/python-pandas
fea2038fdab87ebb19d05e03cdeff069f5e7101d
[ "MIT" ]
null
null
null
groupby-total/groupby-total.py
henrywkk/python-pandas
fea2038fdab87ebb19d05e03cdeff069f5e7101d
[ "MIT" ]
null
null
null
# Add aggregated/summary lines in Pandas dataframe import pandas as pd df = pd.DataFrame(data=[[2018, 'R1', 'C1', 1], [2018, 'R1', 'C2', 2], [2018, 'R1', 'C3', 3], [2018, 'R1', 'C4', 4], [2018, 'R1', 'C5', 5], [2018, 'R2', 'C6', 6], [2018, 'R2', 'C7', 7], [2018, 'R2', 'C8', 8], [2018, 'R2', 'C9', 9], [2018, 'R2', 'C10', 10]], columns=['Year', 'Region', 'Country', 'Spend']) print(df) # df # Year Region Country Spend # 0 2018 R1 C1 1 # 1 2018 R1 C2 2 # 2 2018 R1 C3 3 # 3 2018 R1 C4 4 # 4 2018 R1 C5 5 # 5 2018 R2 C6 6 # 6 2018 R2 C7 7 # 7 2018 R2 C8 8 # 8 2018 R2 C9 9 # 9 2018 R2 C10 10 df2 = df.groupby(['Year'])['Spend'].sum().reset_index() df3 = df.groupby(['Year', 'Region'])['Spend'].sum().reset_index() df = pd.concat([df, df2, df3], sort=False).fillna('All').sort_values(by=['Region', 'Country']) # df2 # Year Spend # 0 2018 55 # # df3 # Year Region Spend # 0 2018 R1 15 # 1 2018 R2 40 # # df # Year Region Country Spend # 0 2018 All All 55 # 0 2018 R1 All 15 # 0 2018 R1 C1 1 # 1 2018 R1 C2 2 # 2 2018 R1 C3 3 # 3 2018 R1 C4 4 # 4 2018 R1 C5 5 # 1 2018 R2 All 40 # 9 2018 R2 C10 10 # 5 2018 R2 C6 6 # 6 2018 R2 C7 7 # 7 2018 R2 C8 8 # 8 2018 R2 C9 9
32.181818
94
0.387006
237
1,770
2.877637
0.244726
0.14956
0.058651
0.039589
0.5
0.341642
0.341642
0.26393
0.26393
0.26393
0
0.316136
0.485311
1,770
54
95
32.777778
0.432492
0.512994
0
0
0
0
0.125
0
0
0
0
0
0
1
0
false
0
0.0625
0
0.0625
0.0625
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
6570a326722b9b2f0f343d25409266e7e060c24d
182
py
Python
pcapfilter/__init__.py
D3f0/pcapfilter
8613820555dda4a4f16f69203334566ae75289c5
[ "MIT" ]
null
null
null
pcapfilter/__init__.py
D3f0/pcapfilter
8613820555dda4a4f16f69203334566ae75289c5
[ "MIT" ]
41
2018-12-14T14:42:53.000Z
2022-01-28T10:50:51.000Z
pcapfilter/__init__.py
D3f0/pcapfilter
8613820555dda4a4f16f69203334566ae75289c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for PCap Filter.""" __author__ = """Nahuel Defossé""" __email__ = "nahuel.defosse+pip@gmail.com" __version__ = "__version__ = '0.2.1'"
22.75
42
0.653846
23
182
4.478261
0.913043
0
0
0
0
0
0
0
0
0
0
0.025316
0.131868
182
7
43
26
0.626582
0.313187
0
0
0
0
0.529412
0.235294
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
6572a9d2414f3fde99502db43886a05025df00a8
372
py
Python
shanbay/people.py
jinxia-shanbay-group/shanbay-api
3f049c903feb9359a4010404348656e8be1a3d8b
[ "Apache-2.0" ]
1
2019-03-03T02:16:48.000Z
2019-03-03T02:16:48.000Z
shanbay/people.py
jinxia-shanbay-group/shanbay-api
3f049c903feb9359a4010404348656e8be1a3d8b
[ "Apache-2.0" ]
null
null
null
shanbay/people.py
jinxia-shanbay-group/shanbay-api
3f049c903feb9359a4010404348656e8be1a3d8b
[ "Apache-2.0" ]
null
null
null
from .common import * class People: def __init__(self): ... @property def name(self): """昵称""" ... return def avator(self): """头像地址""" ... def readbooks(self): """扇贝读书""" ... def stats(self): """成长曲线""" ... def checkin(self): """打卡记录""" ...
12.827586
24
0.376344
30
372
4.533333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.435484
372
28
25
13.285714
0.647619
0.05914
0
0.375
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0.0625
0
0.5625
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
658224708495e086a401d027c1241f90c248205c
500
py
Python
apps/shop/search_indexes.py
samitnuk/online_shop
29af86e3138c7b70fd83e8a87b46af48a6036e95
[ "MIT" ]
3
2017-04-17T11:40:37.000Z
2020-02-17T20:00:53.000Z
apps/shop/search_indexes.py
samitnuk/online_shop
29af86e3138c7b70fd83e8a87b46af48a6036e95
[ "MIT" ]
1
2017-12-14T05:06:12.000Z
2017-12-14T05:06:12.000Z
apps/shop/search_indexes.py
samitnuk/online_shop
29af86e3138c7b70fd83e8a87b46af48a6036e95
[ "MIT" ]
null
null
null
from haystack import indexes from .models import Product class ProductIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.EdgeNgramField(document=True, use_template=True) name = indexes.CharField(model_attr='name') manufacturer = indexes.CharField(model_attr='manufacturer') description = indexes.CharField(model_attr='description') def get_model(self): return Product def index_queryset(self, using=None): return self.get_model().objects.all()
29.411765
67
0.744
58
500
6.293103
0.551724
0.131507
0.172603
0.205479
0
0
0
0
0
0
0
0
0.156
500
16
68
31.25
0.864929
0
0
0
0
0
0.054
0
0
0
0
0
0
1
0.181818
false
0
0.181818
0.181818
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
0
0
0
1
0
0
0
2
658ab7e25ecc99c626611cb9efb19f4fe2490026
196
py
Python
lib/fcm_django/__init__.py
eladgol/ZarizFlutter
0ff967bee0ebc5e16238dd5a39aa4a6611c4e98c
[ "MIT" ]
2
2018-10-24T05:00:11.000Z
2018-11-19T04:12:56.000Z
lib/fcm_django/__init__.py
eladgol/ZarizFlutter
0ff967bee0ebc5e16238dd5a39aa4a6611c4e98c
[ "MIT" ]
null
null
null
lib/fcm_django/__init__.py
eladgol/ZarizFlutter
0ff967bee0ebc5e16238dd5a39aa4a6611c4e98c
[ "MIT" ]
2
2019-01-22T03:00:27.000Z
2019-06-24T12:35:39.000Z
__author__ = "xTrinch" __email__ = "mojca.rojko@gmail.com" __version__ = "0.2.21" class NotificationError(Exception): pass default_app_config = 'fcm_django.apps.FcmDjangoConfig'
17.818182
55
0.719388
22
196
5.727273
1
0
0
0
0
0
0
0
0
0
0
0.02454
0.168367
196
10
56
19.6
0.748466
0
0
0
0
0
0.349462
0.27957
0
0
0
0
0
1
0
false
0.166667
0
0
0.166667
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
1
0
0
0
0
0
2
6592e359de74adb1ef123b04777de7a927553902
2,112
py
Python
flask_dance/utils.py
kerryhatcher/flask-dance
db7ace28e92bb21cf59c79c284d3f30d615c8ec0
[ "MIT" ]
836
2015-01-11T23:01:58.000Z
2022-03-28T07:32:52.000Z
flask_dance/utils.py
kerryhatcher/flask-dance
db7ace28e92bb21cf59c79c284d3f30d615c8ec0
[ "MIT" ]
353
2015-02-11T00:32:58.000Z
2022-03-28T14:45:38.000Z
flask_dance/utils.py
kerryhatcher/flask-dance
db7ace28e92bb21cf59c79c284d3f30d615c8ec0
[ "MIT" ]
189
2015-03-10T15:04:29.000Z
2022-03-16T21:49:11.000Z
import functools from datetime import datetime try: from datetime import timezone utc = timezone.utc except ImportError: from datetime import timedelta, tzinfo class UTC(tzinfo): def utcoffset(self, dt): return timedelta(0) def tzname(self, dt): return "UTC" def dst(self, dst): return timedelta(0) utc = UTC() try: from werkzeug.utils import invalidate_cached_property except ImportError: from werkzeug._internal import _missing def invalidate_cached_property(obj, name): obj.__dict__[name] = _missing class FakeCache: """ An object that mimics just enough of Flask-Caching's API to be compatible with our needs, but does nothing. """ def get(self, key): return None def set(self, key, value): return None def delete(self, key): return None def first(iterable, default=None, key=None): """ Return the first truthy value of an iterable. Shamelessly stolen from https://github.com/hynek/first """ if key is None: for el in iterable: if el: return el else: for el in iterable: if key(el): return el return default sentinel = object() def getattrd(obj, name, default=sentinel): """ Same as getattr(), but allows dot notation lookup Source: http://stackoverflow.com/a/14324459 """ try: return functools.reduce(getattr, name.split("."), obj) except AttributeError as e: if default is not sentinel: return default raise def timestamp_from_datetime(dt): """ Given a datetime, in UTC, return a float that represents the timestamp for that datetime. http://stackoverflow.com/questions/8777753/converting-datetime-date-to-utc-timestamp-in-python#8778548 """ dt = dt.replace(tzinfo=utc) if hasattr(dt, "timestamp") and callable(dt.timestamp): return dt.replace(tzinfo=utc).timestamp() return (dt - datetime(1970, 1, 1, tzinfo=utc)).total_seconds()
22.956522
106
0.632102
264
2,112
5.003788
0.424242
0.036336
0.040878
0.025738
0.056018
0
0
0
0
0
0
0.019646
0.276989
2,112
91
107
23.208791
0.845449
0.234848
0
0.313725
0
0
0.008469
0
0
0
0
0
0
1
0.196078
false
0
0.156863
0.117647
0.647059
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
65a6110a6d48753ff0ce32ff9d84b0dad124aebd
149
py
Python
configReader.py
nbdavied/auto-sui
a27b1de1537f194a1ceb9123edf3eef2eb7c6c44
[ "BSD-2-Clause" ]
null
null
null
configReader.py
nbdavied/auto-sui
a27b1de1537f194a1ceb9123edf3eef2eb7c6c44
[ "BSD-2-Clause" ]
null
null
null
configReader.py
nbdavied/auto-sui
a27b1de1537f194a1ceb9123edf3eef2eb7c6c44
[ "BSD-2-Clause" ]
null
null
null
import json def readConfig(): with open('conf.json') as conf: jconf = conf.read() conf = json.loads(jconf) return conf
16.555556
35
0.577181
19
149
4.526316
0.631579
0.186047
0
0
0
0
0
0
0
0
0
0
0.308725
149
8
36
18.625
0.834951
0
0
0
0
0
0.060403
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.5
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
65b34231976f6655aaa08be908b9d9394bb2598b
1,937
py
Python
examples/basic.py
thiagofigcosta/Pytho-
3dc12abe3524bb2fd5004a29751498ef2d3bbade
[ "MIT" ]
null
null
null
examples/basic.py
thiagofigcosta/Pytho-
3dc12abe3524bb2fd5004a29751498ef2d3bbade
[ "MIT" ]
null
null
null
examples/basic.py
thiagofigcosta/Pytho-
3dc12abe3524bb2fd5004a29751498ef2d3bbade
[ "MIT" ]
null
null
null
#!/bin/python3 import math import sys import basic_external_file as ext import basic_external_regularpy_file as py print('This is Pytho{\}') print('') print('Running over Python {}.{}.{}'.format(sys.version_info[0],sys.version_info[1],sys.version_info[2])) print('Several tabs here') print('Is 13 greater than 14?') if 13 > 14{ # comments after curly brackets print('Unfortunately not') } else { # fixed else if whitespace print('NEVER') } print('') print('10 reasons why you should use Pytho{\}') for i in range(10){ print ("{} Because I rate : and tab".format(i)) # no ident here } empty_dictionary = {} single_line_dictionary={"do we support dictionaries?":"Yes, we do support dictionaries"} multi_line_dictionary={ "Pytho{\}":"Rocks" } print() print(single_line_dictionary['do we support dictionaries?']) for key,value in multi_line_dictionary.items(){ print(key,value) } ext.print_ext_file() dict_arr=[] dict_arr.append({'dictionaries':'appended inline to array are now supported'}) dict_arr.append({'help us to improve':'send issues'}) dict_arr.append({'Workaround Oriented Programming':'for the win'}) print() for dictionary in dict_arr{ for k,v in dictionary.items(){ print('{} {}'.format(k,v)) } } py.print_lines() # Pytho{\}: Start regular Python for i in range(2): print() text='It is also possible to mix the syntaxes when the regular python syntax is in between \'# Pytho{\}: Start regular Python\' and \'# Pytho{\}: End regular Python\' lines' out='' for c in list(text): out+=c print (out) # Pytho{\}: End regular Python def printSomething(arg=''){ print('Print inside function - '+arg) } print() if 'in line ifs works' == 'in line ifs works' { print ('Inline ifs working')} if 1==1 { if ('in line ifs works' == 'in line ifs works') { printSomething ('Inline if()s working')} }
26.902778
174
0.660299
276
1,937
4.543478
0.434783
0.027911
0.028708
0.044657
0.116427
0.116427
0.116427
0.047847
0.047847
0
0
0.012133
0.191533
1,937
72
175
26.902778
0.788633
0.073309
0
0.107143
0
0
0.371146
0
0
0
0
0
0
0
null
null
0
0.071429
null
null
0.428571
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
2
65b9b63710589cf7e5dd50f13cb5768e2f3f60a3
188
py
Python
extra_tests/ctypes_tests/test_loading.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
1
2021-06-02T23:02:09.000Z
2021-06-02T23:02:09.000Z
extra_tests/ctypes_tests/test_loading.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
1
2021-03-30T18:08:41.000Z
2021-03-30T18:08:41.000Z
extra_tests/ctypes_tests/test_loading.py
olliemath/pypy
8b873bd0b8bf76075aba3d915c260789f26f5788
[ "Apache-2.0", "OpenSSL" ]
1
2022-03-30T11:42:37.000Z
2022-03-30T11:42:37.000Z
from ctypes import CDLL from ctypes.util import find_library def test__handle(): lib = find_library("c") if lib: cdll = CDLL(lib) assert type(cdll._handle) is int
20.888889
40
0.664894
28
188
4.285714
0.607143
0.166667
0
0
0
0
0
0
0
0
0
0
0.25
188
8
41
23.5
0.851064
0
0
0
0
0
0.005319
0
0
0
0
0
0.142857
1
0.142857
false
0
0.285714
0
0.428571
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
65d490267dabf9a0b2a0776e6cda6b59ca90f4b2
270
py
Python
tests/plot/__init__.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
6
2015-12-15T04:09:08.000Z
2020-02-21T01:40:57.000Z
tests/plot/__init__.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
null
null
null
tests/plot/__init__.py
pmacosta/putil
416cea52df8221981727e25d133e9b4e3f464798
[ "MIT" ]
2
2016-01-21T23:29:17.000Z
2020-02-21T01:41:05.000Z
# __init__.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111 # PyPI imports import matplotlib # Default to non-interactive PNG to avoid any # matplotlib back-end misconfiguration matplotlib.rcParams['backend'] = 'Agg'
24.545455
47
0.774074
36
270
5.694444
0.916667
0
0
0
0
0
0
0
0
0
0
0.051502
0.137037
270
10
48
27
0.828326
0.72963
0
0
0
0
0.153846
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
2
65ddb645c78b17bcf7c4c50aa15f847e7b4d382c
456
py
Python
Chapter06/example1/waiting.py
PacktPublishing/Daniel-Arbuckles-Mastering-Python
ecd1e78d95aedc832d8f5ceec4794374459e890a
[ "MIT" ]
28
2017-08-10T18:21:52.000Z
2021-11-22T11:13:01.000Z
Chapter06/example1/waiting.py
PacktPublishing/Daniel-Arbuckles-Mastering-Python
ecd1e78d95aedc832d8f5ceec4794374459e890a
[ "MIT" ]
2
2019-06-17T13:22:00.000Z
2019-06-17T14:06:18.000Z
Chapter06/example1/waiting.py
PacktPublishing/Daniel-Arbuckles-Mastering-Python
ecd1e78d95aedc832d8f5ceec4794374459e890a
[ "MIT" ]
20
2017-07-07T16:25:50.000Z
2022-01-11T15:57:18.000Z
from concurrent import futures class FooError(Exception): pass def foo(x, y): if x > y: raise FooError return y - x with futures.ProcessPoolExecutor() as pool: running = [pool.submit(foo, 5, 8), pool.submit(foo, 6, 9)] while running: done, running = futures.wait(running, timeout = 2.5) for future in done: data = future.result() ... do whatever we need with data ...
21.714286
60
0.578947
59
456
4.474576
0.661017
0.015152
0.098485
0
0
0
0
0
0
0
0
0.019231
0.315789
456
20
61
22.8
0.826923
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0.066667
0.066667
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
0
0
1
0
0
1
0
0
0
0
0
2
65e39ec195ce225f7d6c6f03af46bf7d2848975e
9,184
py
Python
metrics/code_eval/code_eval.py
WojciechKusa/datasets
1406a04c3e911cec2680d8bc513653e0cafcaaa4
[ "Apache-2.0" ]
10,608
2020-09-10T15:47:50.000Z
2022-03-31T22:51:47.000Z
metrics/code_eval/code_eval.py
realChainLife/datasets
98261e8b0b7be4dbaaa71ae188b950f7fbe51bbd
[ "Apache-2.0" ]
2,396
2020-09-10T14:55:31.000Z
2022-03-31T19:41:04.000Z
metrics/code_eval/code_eval.py
realChainLife/datasets
98261e8b0b7be4dbaaa71ae188b950f7fbe51bbd
[ "Apache-2.0" ]
1,530
2020-09-10T21:43:10.000Z
2022-03-31T01:59:12.000Z
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """The CodeEval metric estimates the pass@k metric for code synthesis. This is an evaluation harness for the HumanEval problem solving dataset described in the paper "Evaluating Large Language Models Trained on Code" (https://arxiv.org/abs/2107.03374).""" import itertools import os from collections import Counter, defaultdict from concurrent.futures import ThreadPoolExecutor, as_completed import numpy as np import datasets from .execute import check_correctness _CITATION = """\ @misc{chen2021evaluating, title={Evaluating Large Language Models Trained on Code}, author={Mark Chen and Jerry Tworek and Heewoo Jun and Qiming Yuan \ and Henrique Ponde de Oliveira Pinto and Jared Kaplan and Harri Edwards \ and Yuri Burda and Nicholas Joseph and Greg Brockman and Alex Ray \ and Raul Puri and Gretchen Krueger and Michael Petrov and Heidy Khlaaf \ and Girish Sastry and Pamela Mishkin and Brooke Chan and Scott Gray \ and Nick Ryder and Mikhail Pavlov and Alethea Power and Lukasz Kaiser \ and Mohammad Bavarian and Clemens Winter and Philippe Tillet \ and Felipe Petroski Such and Dave Cummings and Matthias Plappert \ and Fotios Chantzis and Elizabeth Barnes and Ariel Herbert-Voss \ and William Hebgen Guss and Alex Nichol and Alex Paino and Nikolas Tezak \ and Jie Tang and Igor Babuschkin and Suchir Balaji and Shantanu Jain \ and William Saunders and Christopher Hesse and Andrew N. Carr \ and Jan Leike and Josh Achiam and Vedant Misra and Evan Morikawa \ and Alec Radford and Matthew Knight and Miles Brundage and Mira Murati \ and Katie Mayer and Peter Welinder and Bob McGrew and Dario Amodei \ and Sam McCandlish and Ilya Sutskever and Wojciech Zaremba}, year={2021}, eprint={2107.03374}, archivePrefix={arXiv}, primaryClass={cs.LG} } """ _DESCRIPTION = """\ This metric implements the evaluation harness for the HumanEval problem solving dataset described in the paper "Evaluating Large Language Models Trained on Code" (https://arxiv.org/abs/2107.03374). """ _KWARGS_DESCRIPTION = """ Calculates how good are predictions given some references, using certain scores Args: predictions: list of candidates to evaluate. Each candidates should be a list of strings with several code candidates to solve the problem. references: a list with a test for each prediction. Each test should evaluate the correctness of a code candidate. k: number of code candidates to consider in the evaluation (Default: [1, 10, 100]) num_workers: number of workers used to evaluate the canidate programs (Default: 4). timeout: Returns: pass_at_k: dict with pass rates for each k results: dict with granular results of each unittest Examples: >>> code_eval = datasets.load_metric("code_eval") >>> test_cases = ["assert add(2,3)==5"] >>> candidates = [["def add(a,b): return a*b", "def add(a, b): return a+b"]] >>> pass_at_k, results = code_eval.compute(references=test_cases, predictions=candidates, k=[1, 2]) >>> print(pass_at_k) {'pass@1': 0.5, 'pass@2': 1.0} """ _WARNING = """ ################################################################################ !!!WARNING!!! ################################################################################ The "code_eval" metric executes untrusted model-generated code in Python. Although it is highly unlikely that model-generated code will do something overtly malicious in response to this test suite, model-generated code may act destructively due to a lack of model capability or alignment. Users are strongly encouraged to sandbox this evaluation suite so that it does not perform destructive actions on their host or network. For more information on how OpenAI sandboxes its code, see the paper "Evaluating Large Language Models Trained on Code" (https://arxiv.org/abs/2107.03374). Once you have read this disclaimer and taken appropriate precautions, set the environment variable HF_ALLOW_CODE_EVAL="1". Within Python you can to this with: >>> import os >>> os.environ["HF_ALLOW_CODE_EVAL"] = "1" ################################################################################\ """ _LICENSE = """The MIT License Copyright (c) OpenAI (https://openai.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.""" @datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION) class CodeEval(datasets.Metric): def _info(self): return datasets.MetricInfo( # This is the description that will appear on the metrics page. description=_DESCRIPTION, citation=_CITATION, inputs_description=_KWARGS_DESCRIPTION, # This defines the format of each prediction and reference features=datasets.Features( { "predictions": datasets.Sequence(datasets.Value("string")), "references": datasets.Value("string"), } ), homepage="https://github.com/openai/human-eval", codebase_urls=["https://github.com/openai/human-eval"], reference_urls=["https://github.com/openai/human-eval"], license=_LICENSE, ) def _compute(self, predictions, references, k=[1, 10, 100], num_workers=4, timeout=3.0): """Returns the scores""" if os.getenv("HF_ALLOW_CODE_EVAL", 0) != "1": raise ValueError(_WARNING) if os.name == "nt": raise NotImplementedError("This metric is currently not supported on Windows.") with ThreadPoolExecutor(max_workers=num_workers) as executor: futures = [] completion_id = Counter() n_samples = 0 results = defaultdict(list) for task_id, (candidates, test_case) in enumerate(zip(predictions, references)): for candidate in candidates: test_program = candidate + "\n" + test_case args = (test_program, timeout, task_id, completion_id[task_id]) future = executor.submit(check_correctness, *args) futures.append(future) completion_id[task_id] += 1 n_samples += 1 for future in as_completed(futures): result = future.result() results[result["task_id"]].append((result["completion_id"], result)) total, correct = [], [] for result in results.values(): result.sort() passed = [r[1]["passed"] for r in result] total.append(len(passed)) correct.append(sum(passed)) total = np.array(total) correct = np.array(correct) ks = k pass_at_k = {f"pass@{k}": estimate_pass_at_k(total, correct, k).mean() for k in ks if (total >= k).all()} return pass_at_k, results def estimate_pass_at_k(num_samples, num_correct, k): """Estimates pass@k of each problem and returns them in an array.""" def estimator(n: int, c: int, k: int) -> float: """Calculates 1 - comb(n - c, k) / comb(n, k).""" if n - c < k: return 1.0 return 1.0 - np.prod(1.0 - k / np.arange(n - c + 1, n + 1)) if isinstance(num_samples, int): num_samples_it = itertools.repeat(num_samples, len(num_correct)) else: assert len(num_samples) == len(num_correct) num_samples_it = iter(num_samples) return np.array([estimator(int(n), int(c), k) for n, c in zip(num_samples_it, num_correct)])
42.915888
113
0.678463
1,247
9,184
4.922213
0.394547
0.014337
0.007983
0.018899
0.102965
0.085044
0.080319
0.057511
0.057511
0.057511
0
0.013465
0.215592
9,184
213
114
43.117371
0.838562
0.122169
0
0.03871
0
0.019355
0.616496
0.054697
0
0
0
0
0.012903
1
0.025806
false
0.064516
0.051613
0.006452
0.116129
0.012903
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
0
1
0
0
0
0
0
2
65e6c620135eb8e203788470851a4da42dc1f654
11,629
py
Python
spacy/lang/zh/stop_words.py
algteam/spacy_zh_model
0b0cba1a3964aa426e5f96087849c90e69e2a89d
[ "MIT" ]
5
2019-04-19T06:27:29.000Z
2019-12-02T13:30:47.000Z
spacy/lang/zh/stop_words.py
algteam/spacy_zh_model
0b0cba1a3964aa426e5f96087849c90e69e2a89d
[ "MIT" ]
null
null
null
spacy/lang/zh/stop_words.py
algteam/spacy_zh_model
0b0cba1a3964aa426e5f96087849c90e69e2a89d
[ "MIT" ]
2
2019-04-19T06:27:18.000Z
2019-10-04T12:39:15.000Z
# coding: utf8 from __future__ import unicode_literals # Stop words STOP_WORDS = set(""" a about above across after afterwards again against all almost alone along already also although always am among amongst amount an and another any anyhow anyone anything anyway anywhere are around as at back be became because become becomes becoming been before beforehand behind being below beside besides between beyond both bottom but by call can cannot ca could did do does doing done down due during each eight either eleven else elsewhere empty enough even ever every everyone everything everywhere except few fifteen fifty first five for former formerly forty four from front full further get give go had has have he hence her here hereafter hereby herein hereupon hers herself him himself his how however hundred i if in indeed into is it its itself keep last latter latterly least less just made make many may me meanwhile might mine more moreover most mostly move much must my myself name namely neither never nevertheless next nine no nobody none noone nor not nothing now nowhere n't of off often on once one only onto or other others otherwise our ours ourselves out over own part per perhaps please put quite rather re really regarding same say see seem seemed seeming seems serious several she should show side since six sixty so some somehow someone something sometime sometimes somewhere still such take ten than that the their them themselves then thence there thereafter thereby therefore therein thereupon these they third this those though three through throughout thru thus to together too top toward towards twelve twenty two under until up unless upon us used using various very very via was we well were what whatever when whence whenever where whereafter whereas whereby wherein whereupon wherever whether which while whither who whoever whole whom whose why will with within without would yet you your yours yourself yourselves 'd 'll 'm 're 's 've 现在 嘿嘿 还要 要 嗳 赶早不赶晚 这些 日益 倒不如 逢 立地 不只 一般 豁然 将近 毫不 嗬 大张旗鼓 嗯 不可开交 " # ! & 全力 就算 ' $ % ... * + ( 她们 ) . / 各位 , - ︿ 3 2 1 不止 基本 0 不拘 7 这里 6 5 颇 4 ; : 如此 9 8 极度 ? > 首先 = < 也罢 @ A 见 当庭 隔夜 更 不少 不胜 \ _ 替 ^ 到目前为止 大大 除开 腾 暗中 而外 开始 ` 三番两次 宁可 这么 权时 结果 大多 除此以外 单单 如下 几度 何处 喂 如上 矣 喀 喏 ~ 吧哒 | 放量 即便 当年 不对 那 顷刻 本人 是 岂非 己 看 趁热 哪边 立马 乘势 啥 何况 这个 啦 人民 率尔 那种 仍然 不能 根据 并肩 相对而言 也好 啐 什么样 累年 啊 扑通 即使 开外 大概 依照 · 乃至 与否 总而言之 高低 切切 多次 比如说 不亦乐乎 如期 简言之 何妨 不管怎样 顺 顷 将才 呆呆地 略为 更为 大约 其次 倍加 满 不定 除了 都 之后 着 难道 不可 至 风雨无阻 陡然 为了 及至 对于 虽说 唉 彻夜 嘎嘎 臭 不同 大体上 自 ! # 来得及 哦 而 % $ 的 & 哪 ) 老 ( + 哩 * , 者 人人 比方 0 1 简而言之 这么些 2 3 4 5 6 不至于 7 这部 谁知 8 几时 9 屡 : ; < 应当 > 哼 ? 人家 如今 @ 哇 哈 哉 尽量 总的说来 继之 单纯 方才 哎 这么点儿 极 乘胜 八成 光是 倘或 哗 被 忽然 [ 从头 出去 哟 ] 咦 切不可 尽 哪年 竟然 是否 而况 加以 从此以后 省得 就 咳 我们 不力 各个 咱 充其极 | } 次第 ~ 岂止 { 某 尽管如此 偶而 看上去 截然 甚而 和 如常 任何 极端 接着 嘎登 咋 皆可 具体地说 凝神 这就是说 将 千万 好在 从早到晚 各自 咚 取道 纯粹 这种 只限 上去 恐怕 呢 莫非 虽然 碰巧 呸 紧接着 即若 本 等等 按照 呵 不单 具体说来 一旦 望 朝 纵 不要 呀 怎样 呃 轰然 有 每当 接连不断 呜 呐 不比 呕 纯 呗 各种 理应 连袂 吧 绝 什么 那里 后来 给 日渐 暗自 以免 经 不然 来 饱 别人 吱 看来 沙沙 同 趁势 切莫 从重 尽心尽力 切勿 果真 各 ¥ 要不是 白 并排 自己 保管 岂 差一点 默然 此中 能 吗 向 吓 藉以 不惟 的确 此后 让 待到 末##末 哪些 不然的话 其他 毫无 连声 趁早 归 几经 当 论 九 也 挨门挨户 挨次 乘 保险 从小 莫若 乒 彼 乎 刚好 么 如若 之 默默地 是的 嗡嗡 请勿 乃 为 得起 借此 该 汝 从此 然而 亲眼 略微 刚才 一定 反倒是 按时 临 个 倘若 差不多 从无到有 — 起来 ’ ‘ 反之则 弗 ” “ 何止 惯常 姑且 与其 … 哪个 反而 常言道 大抵 不再 且 到了儿 三 上 再者 不 并且 与 一 趁着 七 两者 等到 不经意 必 如何 来着 不由得 怎么样 尽管 知道 任 旁人 不管 由 个人 哪里 似的 以 甭 甫 倒不如说 用 均 其余 长此下去 们 莫 匆匆 多少 当着 就是说 他 既然 虽则 纵使 呼哧 沿 快 仅 联袂 没 或许 仍 来看 俺们 从 倘然 只是 往 大凡 而言 当真 待 因此 很 不如 据此 更进一步 那么样 纵然 得 不仅...而且 极为 尽然 略 长期以来 互 五 不妨 不止一次 地 —— 较比 必须 或是 向着 从古到今 在 尽如人意 了 毕竟 二 川流不息 确实 于 可以 你 并没有 当场 要不 那儿 纵令 恰巧 无宁 四 来讲 局外 近年来 因 并 但 起首 , 赶快 方 需要 即令 大略 将要 活 不特 然则 极了 何 但是 固 不独 何苦 一则 猛然 屡屡 传 到底 在下 设使 经过 至于 老老实实 猛然间 截至 譬如 很多 一切 别的 要么 趁机 。 、 越是 常   按期 何尝 》 《 〉 〈 动不动 不外 因为 使得 会 既 如果 按说 不大 带 自从 以便 宁肯 当下 不光 它们 之类 老大 尽可能 尔后 成年累月 如上所述 每个 彼此 从宽 俺 就此 粗 达旦 当口儿 归根结底 看起来 或多或少 当中 据我所知 据实 不免 遵照 固然 缕缕 换言之 策略地 居然 连日来 若 起见 比照 嘎 不成 不仅仅是 长话短说 因而 设若 不论 嘘 嘛 沿着 恍然 慢说 亲身 哼唷 故 便 以至 以致 本着 论说 除外 之所以 简直 前后 大家 嘻 果然 共总 嘿 敢 时候 不怎么 如次 依 鄙人 亲手 大 顿时 顺着 叮当 敞开儿 等 大面儿上 年复一年 冲 打开天窗说亮话 跟 上来 拿 假若 不曾 着呢 快要 此刻 而且 背靠背 假使 陈年 多多益善 另方面 冒 他人 到处 大体 下来 云云 全然 何须 为着 每逢 内 多 很少 尚且 只要 不仅仅 出 顷刻间 常常 趁 日臻 恰似 得天独厚 另外 敢情 率然 并无 届时 凭 每每 几 她 成为 他们 尔等 尽快 不消 如其 把 反之亦然 当即 奇 据悉 奈 前者 第 必定 [ 处处 ] 断然 绝非 总的来看 岂但 分期 古来 我们 啪达 顷刻之间 每次 别说 传闻 从优 总的来说 非徒 常言说得好 非得 由于 难说 可是 从今以后 比如 所 继而 不可抗拒 才 如 精光 凭借 略加 起 平素 绝对 赶 于是 打 一样 长线 每时每刻 不择手段 理该 共 拦腰 喔唷 其 仍旧 屡次 以及 当然 到头来 抑或 宁愿 一方面 举凡 只有 八 咱们 六 从新 兮 这样 不得已 管 十分 自个儿 呼啦 我 必将 串行 而论 或 牢牢 成心 光 哈哈 与此同时 其一 于是乎 此 看样子 换句话说 全身心 除非 有人 以至于 按理 也许 打从 照着 况且 独 除却 不了 不得 反手 成年 哎呀 关于 恰恰相反 这儿 累次 其中 动辄 立刻 倒是 毫无例外 从古至今 可见 诚然 莫不 怎么办 亲自 经常 决不 自各儿 这么样 不必 不得了 除去 由此可见 像 有些 挨个 不仅 进来 大事 全年 绝顶 社会主义 总之 当头 若是 竟 不外乎 要不然 如此等等 分期分批 那么 毋宁 立 其二 不会 .. 背地里 据 此间 哪儿 不怕 不问 每 为什么 没有 公然 那会儿 迫于 来不及 不起 千万千万 可能 正如 比 还有 借 倘 究竟 及其 不限 偏偏 据称 故此 谁 伙同 敢于 弹指之间 那些 窃 朝着 叮咚 临到 即将 哎哟 而已 尽心竭力 到头 亲口 已经 不但 出来 随着 不得不 非常 另一个 非但 如前所述 殆 -- 诸位 那时 即是说 按 谨 何时 此外 然后 勃然 从来 近几年来 近来 莫如 奋勇 比起 仅仅 故而 穷年累月 历 乌乎 怪不得 去 借以 主要 间或 方能 白白 除 反过来 全都 并没 过 除此之外 马上 迄 恰恰 传说 还 这 连 近 从速 上下 哪样 这边 从未 不能不 从不 及 那个 边 又 迟早 不知不觉 挨家挨户 多多少少 几番 有关 您 连同 较 互相 怎么 但愿 可 你们 凑巧 连日 叫 路经 阿 起先 另 二话没说 之一 这时 即或 连连 其后 各式 当儿 独自 它 宁 哪天 就是 乘机 常言说 不下 定 照 昂然 毫无保留地 趁便 屡次三番 甚至 那末 充其量 该当 另一方面 既...又 瑟瑟 的话 呜呼 或者 立时 反过来说 有的 挨着 再说 够瞧的 过于 零 就地 然 极其 何乐而不为 进去 单 随 起头 无论 怎 据说 综上所述 抽冷子 才能 怕 千 离 梆 极大 恰逢 半 大举 漫说 接下来 忽地 而是 即 难得 不但...而且 格外 怪 倘使 还是 从而 对 本身 乘隙 既是 理当 反倒 焉 可好 不满 交口 基本上 认为 这会儿 充分 并非 不迭 老是 倍感 鉴于 要是 反之 哪怕 除此而外 虽 一下 自身 任凭 几乎 顶多 靠 而又 不时 一个 否则 自家 三天两头 砰 啊呀 难怪 所以 发生 哗啦 多年来 罢了 大致 从轻 那边 那么些 不巧 完全 起初 某个 加之 大不了 归根到底 偶尔 应该 二话不说 日见 不是 大都 愤然 而后 多年前 例如 蛮 切 一些 多多 日复一日 较之 即刻 那样 齐 其它 则 不料 刚 初 决非 乘虚 恰如 能够 从严 故意 别 啊哟 从中 不已 加上 具体来说 较为 分头 直到 到 >> 隔日 多亏 假如 甚么 作为 暗地里 挨门逐户 恰好 其实 何必 万一 不过 某些 啊哈 基于 不日 尽早 刚巧 概 一来 同时 三番五次 为何 更加 绝不 除此 不常 进而 另行 急匆匆 通过 话说 若非 极力 存心 a able about above according accordingly across actually after afterwards again against ain't all allow allows almost alone along already also although always am among amongst an and another any anybody anyhow anyone anything anyway anyways anywhere apart appear appreciate appropriate are aren't around as a's aside ask asking associated at available away awfully be became because become becomes becoming been before beforehand behind being believe below beside besides best better between beyond both brief but by came can cannot cant can't cause causes certain certainly changes clearly c'mon co com come comes concerning consequently consider considering contain containing contains corresponding could couldn't course c's currently definitely described despite did didn't different do does doesn't doing done don't down downwards during each edu eg eight either else elsewhere enough entirely especially et etc even ever every everybody everyone everything everywhere ex exactly example except far few fifth first five followed following follows for former formerly forth four from further furthermore get gets getting given gives go goes going gone got gotten greetings had hadn't happens hardly has hasn't have haven't having he hello help hence her here hereafter hereby herein here's hereupon hers herself he's hi him himself his hither hopefully how howbeit however i'd ie if ignored i'll i'm immediate in inasmuch inc indeed indicate indicated indicates inner insofar instead into inward is isn't it it'd it'll its it's itself i've just keep keeps kept know known knows last lately later latter latterly least less lest let let's like liked likely little look looking looks ltd mainly many may maybe me mean meanwhile merely might more moreover most mostly much must my myself name namely nd near nearly necessary need needs neither never nevertheless new next nine no nobody non none noone nor normally not nothing novel now nowhere obviously of off often oh ok okay old on once one ones only onto or other others otherwise ought our ours ourselves out outside over overall own particular particularly per perhaps placed please plus possible presumably probably provides que quite qv rather rd re really reasonably regarding regardless regards relatively respectively right said same saw say saying says second secondly see seeing seem seemed seeming seems seen self selves sensible sent serious seriously seven several shall she should shouldn't since six so some somebody somehow someone something sometime sometimes somewhat somewhere soon sorry specified specify specifying still sub such sup sure take taken tell tends th than thank thanks thanx that thats that's the their theirs them themselves then thence there thereafter thereby therefore therein theres there's thereupon these they they'd they'll they're they've think third this thorough thoroughly those though three through throughout thru thus to together too took toward towards tried tries truly try trying t's twice two un under unfortunately unless unlikely until unto up upon us use used useful uses using usually value various very via viz vs want wants was wasn't way we we'd welcome well we'll went were we're weren't we've what whatever what's when whence whenever where whereafter whereas whereby wherein where's whereupon wherever whether which while whither who whoever whole whom who's whose why will willing wish with within without wonder won't would wouldn't yes yet you you'd you'll your you're yours yourself yourselves you've zero zt ZT zz ZZ 一 一下 一些 一切 一则 一天 一定 一方面 一旦 一时 一来 一样 一次 一片 一直 一致 一般 一起 一边 一面 万一 上下 上升 上去 上来 上述 上面 下列 下去 下来 下面 不一 不久 不仅 不会 不但 不光 不单 不变 不只 不可 不同 不够 不如 不得 不怕 不惟 不成 不拘 不敢 不断 不是 不比 不然 不特 不独 不管 不能 不要 不论 不足 不过 不问 与 与其 与否 与此同时 专门 且 两者 严格 严重 个 个人 个别 中小 中间 丰富 临 为 为主 为了 为什么 为什麽 为何 为着 主张 主要 举行 乃 乃至 么 之 之一 之前 之后 之後 之所以 之类 乌乎 乎 乘 也 也好 也是 也罢 了 了解 争取 于 于是 于是乎 云云 互相 产生 人们 人家 什么 什么样 什麽 今后 今天 今年 今後 仍然 从 从事 从而 他 他人 他们 他的 代替 以 以上 以下 以为 以便 以免 以前 以及 以后 以外 以後 以来 以至 以至于 以致 们 任 任何 任凭 任务 企图 伟大 似乎 似的 但 但是 何 何况 何处 何时 作为 你 你们 你的 使得 使用 例如 依 依照 依靠 促进 保持 俺 俺们 倘 倘使 倘或 倘然 倘若 假使 假如 假若 做到 像 允许 充分 先后 先後 先生 全部 全面 兮 共同 关于 其 其一 其中 其二 其他 其余 其它 其实 其次 具体 具体地说 具体说来 具有 再者 再说 冒 冲 决定 况且 准备 几 几乎 几时 凭 凭借 出去 出来 出现 分别 则 别 别的 别说 到 前后 前者 前进 前面 加之 加以 加入 加强 十分 即 即令 即使 即便 即或 即若 却不 原来 又 及 及其 及时 及至 双方 反之 反应 反映 反过来 反过来说 取得 受到 变成 另 另一方面 另外 只是 只有 只要 只限 叫 叫做 召开 叮咚 可 可以 可是 可能 可见 各 各个 各人 各位 各地 各种 各级 各自 合理 同 同一 同时 同样 后来 后面 向 向着 吓 吗 否则 吧 吧哒 吱 呀 呃 呕 呗 呜 呜呼 呢 周围 呵 呸 呼哧 咋 和 咚 咦 咱 咱们 咳 哇 哈 哈哈 哉 哎 哎呀 哎哟 哗 哟 哦 哩 哪 哪个 哪些 哪儿 哪天 哪年 哪怕 哪样 哪边 哪里 哼 哼唷 唉 啊 啐 啥 啦 啪达 喂 喏 喔唷 嗡嗡 嗬 嗯 嗳 嘎 嘎登 嘘 嘛 嘻 嘿 因 因为 因此 因而 固然 在 在下 地 坚决 坚持 基本 处理 复杂 多 多少 多数 多次 大力 大多数 大大 大家 大批 大约 大量 失去 她 她们 她的 好的 好象 如 如上所述 如下 如何 如其 如果 如此 如若 存在 宁 宁可 宁愿 宁肯 它 它们 它们的 它的 安全 完全 完成 实现 实际 宣布 容易 密切 对 对于 对应 将 少数 尔后 尚且 尤其 就 就是 就是说 尽 尽管 属于 岂但 左右 巨大 巩固 己 已经 帮助 常常 并 并不 并不是 并且 并没有 广大 广泛 应当 应用 应该 开外 开始 开展 引起 强烈 强调 归 当 当前 当时 当然 当着 形成 彻底 彼 彼此 往 往往 待 後来 後面 得 得出 得到 心里 必然 必要 必须 怎 怎么 怎么办 怎么样 怎样 怎麽 总之 总是 总的来看 总的来说 总的说来 总结 总而言之 恰恰相反 您 意思 愿意 慢说 成为 我 我们 我的 或 或是 或者 战斗 所 所以 所有 所谓 打 扩大 把 抑或 拿 按 按照 换句话说 换言之 据 掌握 接着 接著 故 故此 整个 方便 方面 旁人 无宁 无法 无论 既 既是 既然 时候 明显 明确 是 是否 是的 显然 显著 普通 普遍 更加 曾经 替 最后 最大 最好 最後 最近 最高 有 有些 有关 有利 有力 有所 有效 有时 有点 有的 有着 有著 望 朝 朝着 本 本着 来 来着 极了 构成 果然 果真 某 某个 某些 根据 根本 欢迎 正在 正如 正常 此 此外 此时 此间 毋宁 每 每个 每天 每年 每当 比 比如 比方 比较 毫不 没有 沿 沿着 注意 深入 清楚 满足 漫说 焉 然则 然后 然後 然而 照 照着 特别是 特殊 特点 现代 现在 甚么 甚而 甚至 用 由 由于 由此可见 的 的话 目前 直到 直接 相似 相信 相反 相同 相对 相对而言 相应 相当 相等 省得 看出 看到 看来 看看 看见 真是 真正 着 着呢 矣 知道 确定 离 积极 移动 突出 突然 立即 第 等 等等 管 紧接着 纵 纵令 纵使 纵然 练习 组成 经 经常 经过 结合 结果 给 绝对 继续 继而 维持 综上所述 罢了 考虑 者 而 而且 而况 而外 而已 而是 而言 联系 能 能否 能够 腾 自 自个儿 自从 自各儿 自家 自己 自身 至 至于 良好 若 若是 若非 范围 莫若 获得 虽 虽则 虽然 虽说 行为 行动 表明 表示 被 要 要不 要不是 要不然 要么 要是 要求 规定 觉得 认为 认真 认识 让 许多 论 设使 设若 该 说明 诸位 谁 谁知 赶 起 起来 起见 趁 趁着 越是 跟 转动 转变 转贴 较 较之 边 达到 迅速 过 过去 过来 运用 还是 还有 这 这个 这么 这么些 这么样 这么点儿 这些 这会儿 这儿 这就是说 这时 这样 这点 这种 这边 这里 这麽 进入 进步 进而 进行 连 连同 适应 适当 适用 逐步 逐渐 通常 通过 造成 遇到 遭到 避免 那 那个 那么 那么些 那么样 那些 那会儿 那儿 那时 那样 那边 那里 那麽 部分 鄙人 采取 里面 重大 重新 重要 鉴于 问题 防止 阿 附近 限制 除 除了 除此之外 除非 随 随着 随著 集中 需要 非但 非常 非徒 靠 顺 顺着 首先 高兴 是不是 说说 """.split())
4.292728
79
0.72861
2,947
11,629
2.877163
0.684086
0.002123
0.004718
0.006369
0.113457
0.104022
0.083029
0.083029
0.070291
0.055667
0
0.002433
0.257632
11,629
2,708
80
4.294313
0.978223
0.001978
0
0.28486
0
0
0.993278
0
0
0
0
0
0
1
0
false
0
0.000374
0
0.000374
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
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
65ef2e50d820c809e465dc5c9e95a47525cc186f
885
py
Python
medium/find_max_form.py
SeulYoung/leetcode
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
[ "BSD-3-Clause" ]
null
null
null
medium/find_max_form.py
SeulYoung/leetcode
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
[ "BSD-3-Clause" ]
null
null
null
medium/find_max_form.py
SeulYoung/leetcode
a3d7c0d025b20f1bba3daddd7681e2a211b83d90
[ "BSD-3-Clause" ]
null
null
null
from typing import List class Solution: def findMaxForm(self, strs: List[str], m: int, n: int) -> int: dp = [[0] * (n + 1) for _ in range(m + 1)] for s in strs: zeros = s.count('0') ones = s.count('1') for i in range(m, zeros - 1, -1): for j in range(n, ones - 1, -1): dp[i][j] = max(dp[i - zeros][j - ones] + 1, dp[i][j]) return dp[-1][-1] def findMaxForm(self, strs: List[str], m: int, n: int) -> int: dp = [[0] * (n + 1) for _ in range(m + 1)] for s in strs: zeros = s.count('0') ones = s.count('1') # 此处思路不同 for i in range(m - zeros, - 1, -1): for j in range(n - ones, - 1, -1): dp[i + zeros][j + ones] = max(dp[i][j] + 1, dp[i + zeros][j + ones]) return dp[-1][-1]
35.4
88
0.422599
139
885
2.676259
0.208633
0.075269
0.086022
0.072581
0.798387
0.763441
0.698925
0.698925
0.698925
0.698925
0
0.044944
0.39661
885
24
89
36.875
0.651685
0.00678
0
0.6
0
0
0.004561
0
0
0
0
0
0
1
0.1
false
0
0.05
0
0.3
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
02973f5812838b09017dabb176eb6e3269c8b479
3,391
py
Python
node/blockchain/models/node.py
thenewboston-developers/Node
e71a405f4867786a54dd17ddd97595dd3a630018
[ "MIT" ]
18
2021-11-30T04:02:13.000Z
2022-03-24T12:33:57.000Z
node/blockchain/models/node.py
thenewboston-developers/Node
e71a405f4867786a54dd17ddd97595dd3a630018
[ "MIT" ]
1
2022-02-04T17:07:38.000Z
2022-02-04T17:07:38.000Z
node/blockchain/models/node.py
thenewboston-developers/Node
e71a405f4867786a54dd17ddd97595dd3a630018
[ "MIT" ]
5
2022-01-31T05:28:13.000Z
2022-03-08T17:25:31.000Z
from typing import Collection from djongo.models.fields import DjongoManager from node.blockchain.inner_models import Node as PydanticNode from node.blockchain.types import NodeRole from node.core.managers import CustomQuerySet from .account_state import AccountState NODE_ROLES = set(NodeRole) class NodeQuerySet(CustomQuerySet): def filter_by_roles(self, roles: Collection[NodeRole]): # self.annotate() does not work with Djongo if not roles: return self.none() roles = set(roles) if roles == NODE_ROLES: return self assert not (roles - NODE_ROLES) from node.blockchain.models import Schedule assert {NodeRole.REGULAR_NODE, NodeRole.CONFIRMATION_VALIDATOR, NodeRole.PRIMARY_VALIDATOR} == NODE_ROLES next_block_schedule = Schedule.objects.get_schedule_for_next_block() primary_validator_identifier = next_block_schedule.node_identifier if next_block_schedule else None validator_identifiers = {item.node_identifier for item in Schedule.objects.all().order_by('_id')} if NodeRole.REGULAR_NODE in roles: if NodeRole.PRIMARY_VALIDATOR in roles: if NodeRole.CONFIRMATION_VALIDATOR in roles: raise AssertionError('Should have exited on previous shortcut guard condition') else: # regular and primary validator return self.exclude(_id__in=validator_identifiers - {primary_validator_identifier}) elif NodeRole.CONFIRMATION_VALIDATOR in roles: # regular and confirmation return self.exclude(_id=primary_validator_identifier) else: # only regular return self.exclude(_id__in=validator_identifiers) if NodeRole.PRIMARY_VALIDATOR in roles: if NodeRole.CONFIRMATION_VALIDATOR in roles: # only all validators return self.filter(_id__in=validator_identifiers) else: # only primary validator return self.filter(_id=primary_validator_identifier) elif NodeRole.CONFIRMATION_VALIDATOR in roles: # only confirmation validators return self.filter(_id__in=validator_identifiers - {primary_validator_identifier}) raise AssertionError('Should have exited on previous shortcut guard condition') def filter_confirmation_validators(self): return self.filter_by_roles((NodeRole.CONFIRMATION_VALIDATOR,)) class NodeManager(DjongoManager.from_queryset(NodeQuerySet)): # type: ignore def get_queryset(self): return super().get_queryset().filter(node__isnull=False) def is_confirmation_validator(self, identifier): return self.filter_by_roles((NodeRole.CONFIRMATION_VALIDATOR,)).filter(_id=identifier).exists() class Node(AccountState): objects = NodeManager() class Meta: proxy = True def get_node_attribute(self, name): return (self.node or {}).get(name) @property def identifier(self): return self._id @property def addresses(self): return self.get_node_attribute('addresses') @property def fee(self): return self.get_node_attribute('fee') def get_node(self) -> PydanticNode: return PydanticNode( identifier=self.identifier, addresses=self.addresses, fee=self.fee, )
35.322917
113
0.697434
380
3,391
6
0.234211
0.061404
0.089035
0.054386
0.345614
0.345614
0.315789
0.268421
0.178947
0.121053
0
0
0.23238
3,391
95
114
35.694737
0.875912
0.05721
0
0.212121
0
0
0.03921
0
0
0
0
0
0.060606
1
0.136364
false
0
0.106061
0.121212
0.560606
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
02a32d6eae54eb6dc6dd7973ef4e6c52c3eb8ce6
99
py
Python
submissions/abc137/a.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
1
2021-05-10T01:16:28.000Z
2021-05-10T01:16:28.000Z
submissions/abc137/a.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
3
2021-05-11T06:14:15.000Z
2021-06-19T08:18:36.000Z
submissions/abc137/a.py
m-star18/atcoder
08e475810516602fa088f87daf1eba590b4e07cc
[ "Unlicense" ]
null
null
null
import sys input = sys.stdin.readline a, b = map(int, input().split()) print(max(a+b, a-b, a*b))
14.142857
32
0.626263
20
99
3.1
0.6
0.129032
0.096774
0.129032
0
0
0
0
0
0
0
0
0.151515
99
6
33
16.5
0.738095
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
02b3a15180f5cf6e40b9230f13f6ac81ad3a0f98
377
py
Python
medium/property-based-testing/test_is_mail.py
saneravi/ML_Stuff
74e1ed7ba9f4dccb555792315a14ba6071150304
[ "MIT" ]
209
2015-01-02T03:47:12.000Z
2022-03-06T16:54:47.000Z
medium/property-based-testing/test_is_mail.py
Kerwin-Xie/algorithms
4347a9b7bf54ef378d16d26ef9e357ddc710664b
[ "MIT" ]
3
2015-12-06T14:40:34.000Z
2021-03-22T17:40:24.000Z
medium/property-based-testing/test_is_mail.py
Kerwin-Xie/algorithms
4347a9b7bf54ef378d16d26ef9e357ddc710664b
[ "MIT" ]
114
2015-01-31T08:37:10.000Z
2022-02-23T04:42:28.000Z
# Third party modules import hypothesis.strategies as s import mpu.string # Martins Python Utilities from hypothesis import given @given(s.emails()) def test_is_email(email): assert mpu.string.is_email(email), f"is_email({email}) returned False" @given(s.ip_addresses(v=4)) def test_is_ipv4(ip): assert mpu.string.is_ipv4(str(ip)), f"is_ipv4({ip}) returned False"
25.133333
74
0.750663
62
377
4.419355
0.483871
0.09854
0.131387
0.124088
0
0
0
0
0
0
0
0.012121
0.124668
377
14
75
26.928571
0.818182
0.116711
0
0
0
0
0.181818
0
0
0
0
0
0.222222
1
0.222222
false
0
0.333333
0
0.555556
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
1
0
0
0
0
2
02b954a4dd8e5d8154b360d78acb4ea964322d58
10,741
py
Python
skypages.py
kasekun/skytoy
00f04b847c8bcdf1b701c91441f9f46791181815
[ "MIT" ]
null
null
null
skypages.py
kasekun/skytoy
00f04b847c8bcdf1b701c91441f9f46791181815
[ "MIT" ]
null
null
null
skypages.py
kasekun/skytoy
00f04b847c8bcdf1b701c91441f9f46791181815
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author kasekun @name Jesse Swan """ import os.path import matplotlib matplotlib.use("TkAgg") from matplotlib.backends.backend_tkagg import ( FigureCanvasTkAgg, NavigationToolbar2Tk) from matplotlib.figure import Figure from matplotlib.widgets import Slider from astropy.visualization import PowerStretch, ImageNormalize, ZScaleInterval, LogStretch from astropy.io import fits import tkinter as tk from tkinter import ttk import json import os try: print(__file__) except: __file__ = os.path.abspath(os.path.join(os.curdir, 'jnk.jnk')) # ipython copy-paste hack thisdir = os.path.dirname(os.path.abspath(__file__)) datapath = os.path.join(thisdir, 'skydata') LARGE_FONT= ("Verdana", 12) """ TODO: Incorperate additional images into json and tkinter pages TODO: Match 'zoom' of image across all pages TODO: Relocate buttons for page toggling TODO: Relocate contrast and normalisation sliders TODO: Add additional normalisation options (currently 'LogNorm', 'Powernorm') TODO: Make selection of normalisation a button toggle within tkinter frames TODO: Add colourmap options to config (rather than 'cividis' default) TODO: Make modular classes less reliant on copy-paste """ class NavigationToolbar(NavigationToolbar2Tk): """ Customise the matplotlib navigation toolbar """ toolitems = [t for t in NavigationToolbar2Tk.toolitems if t[0] in ('Home', 'Pan', 'Zoom', 'Save')] class SkyToyClass(tk.Tk): """ Parent containter for pages of various sky images """ def __init__(self, *args, **kwargs): tk.Tk.__init__(self, *args, **kwargs) # tk.Tk.iconbitmap(self, default="clienticon.ico") tk.Tk.wm_title(self, "SkyToy") container = tk.Frame(self) container.pack(side="top", fill="both", expand = True) container.grid_rowconfigure(0, weight=1) container.grid_columnconfigure(0, weight=1) self.frames = {} for F in (UPage, GPage, RPage, IPage): frame = F(container, self) self.frames[F] = frame frame.grid(row=0, column=0, sticky="nsew") self.show_frame(UPage) def show_frame(self, cont): frame = self.frames[cont] frame.tkraise() class UPage(tk.Frame): """ Page for u-band photometry """ def __init__(self, parent, controller): tk.Frame.__init__(self,parent) label = tk.Label(self, text="u", font=LARGE_FONT) label.pack(pady=10,padx=10) button = ttk.Button(self, text="optical g", command=lambda: controller.show_frame(GPage)) button.pack() button2 = ttk.Button(self, text="optical r", command=lambda: controller.show_frame(RPage)) button2.pack() button3 = ttk.Button(self, text="optical i", command=lambda: controller.show_frame(IPage)) button3.pack() f = Figure(figsize=(8, 6)) a = f.add_subplot(111) f.subplots_adjust(left=0, bottom=0.005, right=1, top=1) a.get_xaxis().set_visible(False) a.get_yaxis().set_visible(False) # add axes for sliders ax_norma = f.add_axes([0.81, 0.1, 0.15, 0.025]) ax_contr = f.add_axes([0.81, 0.05, 0.15, 0.025]) hdu_list = fits.open(sky_image) hdu_list.info() img = hdu_list[0].data contrast = image_contrast interval = ZScaleInterval(contrast=contrast) vmin, vmax = interval.get_limits(img) stretch_options = {'LogStretch': LogStretch(power_normalise), 'PowerStretch': PowerStretch(power_normalise), } norm = ImageNormalize(vmin=vmin, vmax=vmax, stretch=stretch_options[image_scaling]) a.imshow(img, origin='lower', norm=norm, cmap='cividis') # Embedding In Tk canvas = FigureCanvasTkAgg(f, self) canvas.draw() canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=True) # Show ToolBar toolbar = NavigationToolbar(canvas, self) toolbar.update() # Activate Zoom toolbar.zoom(self) canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True) delta_f = 0.1 # add sliders s_norma = Slider(ax_norma, 'Normalise', 0.1, 5.0, valinit=power_normalise, valstep=delta_f) s_contr = Slider(ax_contr, 'Contrast', 0.1, 1.0, valinit=contrast) def update(val): n_norma = s_norma.val n_contr = s_contr.val # assign new values to contrast and normalise interval = ZScaleInterval(contrast=n_contr) vmin, vmax = interval.get_limits(img) norm = ImageNormalize(vmin=vmin, vmax=vmax, stretch=PowerStretch(n_norma)) a.imshow(img, origin='lower', norm=norm, cmap='cividis') # saving data to json file SaveJson(n_norma, n_contr) canvas.draw_idle() s_norma.on_changed(update) s_contr.on_changed(update) hdu_list.close() class GPage(tk.Frame): """ Page for g-band photometry """ def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text="optical g", font=LARGE_FONT) label.pack(pady=10,padx=10) button = ttk.Button(self, text="optical u", command=lambda: controller.show_frame(UPage)) button.pack() button2 = ttk.Button(self, text="optical r", command=lambda: controller.show_frame(RPage)) button2.pack() button3 = ttk.Button(self, text="optical i", command=lambda: controller.show_frame(IPage)) button3.pack() class RPage(tk.Frame): """ Page for r-band photometry """ def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text="optical r", font=LARGE_FONT) label.pack(pady=10,padx=10) button = ttk.Button(self, text="optical g", command=lambda: controller.show_frame(GPage)) button.pack() button2 = ttk.Button(self, text="optical u", command=lambda: controller.show_frame(UPage)) button2.pack() button3 = ttk.Button(self, text="optical i", command=lambda: controller.show_frame(IPage)) button3.pack() class IPage(tk.Frame): """ Page for i-band photometry """ def __init__(self, parent, controller): tk.Frame.__init__(self, parent) label = tk.Label(self, text="optical i", font=LARGE_FONT) label.pack(pady=10,padx=10) button = ttk.Button(self, text="optical g", command=lambda: controller.show_frame(GPage)) button.pack() button2 = ttk.Button(self, text="optical r", command=lambda: controller.show_frame(RPage)) button2.pack() button3 = ttk.Button(self, text="optical u", command=lambda: controller.show_frame(UPage)) button3.pack() f = Figure(figsize=(8, 6)) a = f.add_subplot(111) f.subplots_adjust(left=0, bottom=0.005, right=1, top=1) a.get_xaxis().set_visible(False) a.get_yaxis().set_visible(False) # add axes for sliders ax_norma = f.add_axes([0.81, 0.1, 0.15, 0.025]) ax_contr = f.add_axes([0.81, 0.05, 0.15, 0.025]) hdu_list = fits.open(sky_image) hdu_list.info() img = hdu_list[0].data contrast = image_contrast interval = ZScaleInterval(contrast=contrast) vmin, vmax = interval.get_limits(img) stretch_options = {'LogStretch': LogStretch(power_normalise), 'PowerStretch': PowerStretch(power_normalise), } norm = ImageNormalize(vmin=vmin, vmax=vmax, stretch=stretch_options[image_scaling]) a.imshow(img, origin='lower', norm=norm, cmap='cividis') # Embedding In Tk canvas = FigureCanvasTkAgg(f, self) canvas.draw() canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=True) # Show ToolBar toolbar = NavigationToolbar(canvas, self) toolbar.update() # Activate Zoom toolbar.zoom(self) canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True) delta_f = 0.1 # add sliders s_norma = Slider(ax_norma, 'Normalise', 0.1, 5.0, valinit=power_normalise, valstep=delta_f) s_contr = Slider(ax_contr, 'Contrast', 0.1, 1.0, valinit=contrast) def update(val): n_norma = s_norma.val n_contr = s_contr.val # assign new values to contrast and normalise interval = ZScaleInterval(contrast=n_contr) vmin, vmax = interval.get_limits(img) norm = ImageNormalize(vmin=vmin, vmax=vmax, stretch=PowerStretch(n_norma)) a.imshow(img, origin='lower', norm=norm, cmap='cividis') # saving data to json file SaveJson(n_norma, n_contr) canvas.draw_idle() s_norma.on_changed(update) s_contr.on_changed(update) hdu_list.close() def LoadJson(): """ Load configuration information :return: configuration values """ filepath = os.path.join(thisdir, 'sky_config.json') json_data = json.load(open(filepath)) json_path = json_data.get('path') json_image_scaling = json_data.get('image_scaling') json_image_contrast = json_data.get('image_contrast') json_max_saturation = json_data.get('max_saturation') json_power_normalise = json_data.get('power_normalise') return json_path, json_image_scaling, \ json_image_contrast, json_max_saturation, json_power_normalise # save dato to json file def SaveJson(p_normalise, contrast): """ Save slider adjusted values to config file :param p_normalise: slider-adjusted normalisation value :param contrast: slider-adjusted contrast value :return: None """ filepath = os.path.join(thisdir, 'sky_config.json') json_data = json.load(open(filepath)) json_data['power_normalise'] = p_normalise json_data['image_contrast'] = contrast jsonFile = open(filepath, 'w+') jsonFile.write(json.dumps(json_data, indent=2)) jsonFile.close() if __name__ == '__main__': image_path, image_scaling, image_contrast, \ max_saturation, power_normalise = LoadJson() sky_image = os.path.join(thisdir, image_path) app = SkyToyClass() app.mainloop() print('\nQuitting')
31.043353
118
0.624057
1,333
10,741
4.862716
0.196549
0.019747
0.034712
0.031472
0.661987
0.650108
0.62527
0.62527
0.62527
0.62527
0
0.017857
0.259659
10,741
345
119
31.133333
0.797284
0.080533
0
0.627551
0
0
0.049729
0
0
0
0
0.023188
0
1
0.05102
false
0
0.056122
0
0.147959
0.010204
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
1
0
0
0
0
0
0
0
0
0
0
2
02ba17b5ffe8271ae66bea3cfc698ea626a5218d
661
py
Python
scripts/gn_lib/gn_io/stec.py
HiTMonitor/ginan
f348e2683507cfeca65bb58880b3abc2f9c36bcf
[ "Apache-2.0" ]
1
2022-03-31T15:16:19.000Z
2022-03-31T15:16:19.000Z
scripts/gn_lib/gn_io/stec.py
hqy123-cmyk/ginan
b69593b584f75e03238c1c667796e2030391fbed
[ "Apache-2.0" ]
null
null
null
scripts/gn_lib/gn_io/stec.py
hqy123-cmyk/ginan
b69593b584f75e03238c1c667796e2030391fbed
[ "Apache-2.0" ]
null
null
null
from io import BytesIO as _BytesIO import pandas as _pd from ..gn_const import PRN_CATEGORY from ..gn_datetime import gpsweeksec2datetime as _gpsweeksec2datetime from .common import path2bytes def read_stec(path_or_bytes): stec = _pd.read_csv(_BytesIO(path2bytes(path_or_bytes)),comment='#',header=None,usecols=[1,2,3,4,5,6,7],names=['WEEK','TOW','SITE','SAT','VAL','VAR','LAYER'], # type:ignore dtype={1:int,2:int,3:object,4:PRN_CATEGORY,5:float,6:float,7:int}) # type:ignore datetime = _gpsweeksec2datetime(stec.WEEK.values,stec.TOW.values,as_j2000=True) return stec.drop(columns=['WEEK','TOW']).set_index([datetime,'SITE','SAT','LAYER'])
44.066667
176
0.739788
104
661
4.528846
0.528846
0.025478
0.046709
0
0
0
0
0
0
0
0
0.038206
0.089259
661
14
177
47.214286
0.744186
0.034796
0
0
0
0
0.070866
0
0
0
0
0
0
1
0.1
false
0
0.5
0
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
02ca9431a53b32f403ce8d73077f122c6db5a861
917
py
Python
leetCode/wordPattern.py
yskang/AlgorithmPracticeWithPython
f7129bd1924a7961489198f0ee052d2cd1e9cf40
[ "MIT" ]
null
null
null
leetCode/wordPattern.py
yskang/AlgorithmPracticeWithPython
f7129bd1924a7961489198f0ee052d2cd1e9cf40
[ "MIT" ]
1
2019-11-04T06:44:04.000Z
2019-11-04T06:46:55.000Z
leetCode/wordPattern.py
yskang/AlgorithmPractice
31b76e38b4c2f1e3e29fb029587662a745437912
[ "MIT" ]
null
null
null
class Solution(object): def wordPattern(self, pattern, str): dic = {} dic2 = {} words = str.split(" ") if len(pattern) != len(words): return False i = 0 for cha in pattern: if cha in dic.keys(): if dic[cha] != words[i]: return False else: dic[cha] = words[i] i += 1 i = 0 for word in words: if word in dic2.keys(): if dic2[word] != pattern[i]: return False else: dic2[word] = pattern[i] i += 1 return True solution = Solution() print(solution.wordPattern("abba", "dog cat cat dog")) print(solution.wordPattern("abba", "dog cat cat fish")) print(solution.wordPattern("aaaa", "dog cat cat dog")) print(solution.wordPattern("abba", "dog dog dog dog"))
26.970588
55
0.482007
106
917
4.169811
0.301887
0.117647
0.217195
0.190045
0.271493
0.271493
0.271493
0.19457
0.19457
0
0
0.01444
0.395856
917
34
56
26.970588
0.783394
0
0
0.310345
0
0
0.084967
0
0
0
0
0
0
1
0.034483
false
0
0
0
0.206897
0.137931
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
02cd3a054e3b6438b5ff615d0b5d198f2c4963fd
705
py
Python
voxel_globe/websockets/views.py
ngageoint/voxel-globe
91f386de652b704942165889c10468b2c4cf4eec
[ "MIT" ]
28
2015-07-27T23:57:24.000Z
2020-04-05T15:10:52.000Z
voxel_globe/websockets/views.py
VisionSystemsInc/voxel_globe
6eb3fca5586726428e9d914f7b730ca164c64a52
[ "MIT" ]
50
2016-02-11T15:50:22.000Z
2016-10-27T22:38:27.000Z
voxel_globe/websockets/views.py
ngageoint/voxel-globe
91f386de652b704942165889c10468b2c4cf4eec
[ "MIT" ]
8
2015-07-27T19:22:03.000Z
2021-01-04T09:44:48.000Z
from django.shortcuts import render ### Rest API setup import rest_framework.routers import rest_framework.viewsets import rest_framework.filters from voxel_globe.websockets.serializers import LogMessageSerializer from voxel_globe.websockets.models import LogMessage router = rest_framework.routers.DefaultRouter() class LogMessageViewSet(rest_framework.viewsets.ModelViewSet): queryset = LogMessage.objects.all() serializer_class = LogMessageSerializer filter_backends = (rest_framework.filters.DjangoFilterBackend,) filter_fields = ['message_text', 'message_type', 'task_id'] def get_queryset(self): return super(LogMessageViewSet, self).get_queryset().filter(owner=self.request.user)
35.25
88
0.825532
81
705
6.987654
0.555556
0.137809
0.100707
0.084806
0
0
0
0
0
0
0
0
0.09078
705
19
89
37.105263
0.882995
0.019858
0
0
0
0
0.045124
0
0
0
0
0
0
1
0.071429
false
0
0.428571
0.071429
0.928571
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
02dda7c58e02e9acd07331a1b8f4bab7a4865b71
1,483
py
Python
hash_tables.py
a-v-e-s/Academic
8823cac8d7d7b6308023e1ba10be43a3065b6b7e
[ "Unlicense" ]
null
null
null
hash_tables.py
a-v-e-s/Academic
8823cac8d7d7b6308023e1ba10be43a3065b6b7e
[ "Unlicense" ]
null
null
null
hash_tables.py
a-v-e-s/Academic
8823cac8d7d7b6308023e1ba10be43a3065b6b7e
[ "Unlicense" ]
null
null
null
class MyHashSet: def __init__(self): self.buckets = [] def hash(self, key: int) -> str: return chr(key) def add(self, key: int) -> None: val = self.hash(key) if val not in self.buckets: self.buckets.append(val) def remove(self, key: int) -> None: val = self.hash(key) if val in self.buckets: self.buckets.remove(val) def contains(self, key: int) -> bool: return self.hash(key) in self.buckets class MyHashMap: def __init__(self): self.buckets = [] @property def keys(self) -> list: return [x[0] for x in self.buckets] def put(self, key: int, value: int) -> None: if key in self.keys: index = 0 for bucket in self.buckets: if bucket[0] == key: self.buckets[index] = (key, value) break index += 1 else: self.buckets.append((key, value)) def get(self, key: int) -> int: if key in self.keys: for bucket in self.buckets: if bucket[0] == key: return bucket[1] else: return -1 def remove(self, key: int) -> None: if key in self.keys: for bucket in self.buckets: if bucket[0] == key: val = (bucket[0], bucket[1]) break self.buckets.remove(val)
26.017544
54
0.484154
182
1,483
3.901099
0.203297
0.216901
0.098592
0.059155
0.484507
0.35493
0.319718
0.278873
0.278873
0.230986
0
0.011325
0.404585
1,483
57
55
26.017544
0.792752
0
0
0.511111
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0
0.066667
0.377778
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
02ecd782f838a574833b1a78758d155e55291833
815
py
Python
src/Modules/Drivers/USB/test/test_USB_open.py
bopopescu/PyHouse_1
6444ed0b4c38ab59b9e419e4d54d65d598e6a54e
[ "MIT" ]
1
2016-09-21T19:30:21.000Z
2016-09-21T19:30:21.000Z
src/Modules/Drivers/USB/test/test_USB_open.py
bopopescu/PyHouse_1
6444ed0b4c38ab59b9e419e4d54d65d598e6a54e
[ "MIT" ]
null
null
null
src/Modules/Drivers/USB/test/test_USB_open.py
bopopescu/PyHouse_1
6444ed0b4c38ab59b9e419e4d54d65d598e6a54e
[ "MIT" ]
1
2020-07-23T11:13:36.000Z
2020-07-23T11:13:36.000Z
""" @name: PyHouse/src/Modules/Drivers/USB/test/test_USB_open.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2015-2015 by D. Brian Kimmel @license: MIT License @note: Created on Aug 15, 2015 @Summary: """ # Import system type stuff import xml.etree.ElementTree as ET from twisted.trial import unittest # Import PyMh files and modules. from test.xml_data import XML_LONG from test.testing_mixin import SetupPyHouseObj class SetupMixin(object): """ """ def setUp(self, p_root): self.m_pyhouse_obj = SetupPyHouseObj().BuildPyHouseObj(p_root) self.m_xml = SetupPyHouseObj().BuildXml(p_root) self.m_version = '1.4.0' class A01_API(SetupMixin, unittest.TestCase): """ """ # ## END DBK
22.638889
71
0.662577
108
815
4.87963
0.657407
0.028463
0.051233
0.056926
0
0
0
0
0
0
0
0.030111
0.225767
815
35
72
23.285714
0.805071
0.380368
0
0
0
0
0.011494
0
0
0
0
0
0
1
0.1
false
0
0.4
0
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
02f01e398c17f9b057fb96ab00b95aa6c0ca80b6
7,729
py
Python
lib/iapps/import_template_bigip.py
chen23/f5-dns-automation-demo
0354efaaefecd596369e2fb0e3f90de3d4773f74
[ "MIT" ]
20
2017-07-18T18:22:02.000Z
2021-04-03T07:49:21.000Z
lib/iapps/import_template_bigip.py
chen23/f5-dns-automation-demo
0354efaaefecd596369e2fb0e3f90de3d4773f74
[ "MIT" ]
2
2017-04-06T20:46:06.000Z
2018-04-11T13:30:44.000Z
lib/iapps/import_template_bigip.py
chen23/f5-dns-automation-demo
0354efaaefecd596369e2fb0e3f90de3d4773f74
[ "MIT" ]
24
2017-07-12T20:02:19.000Z
2021-06-23T19:07:31.000Z
#!/usr/bin/python # Copyright (c) 2017 F5 Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # import_template_bigip.py -- Import an iApp template to a BIG-IP system using the iControl-REST API # Documentation: see README.import_template_bigip import requests try: requests.packages.urllib3.disable_warnings() except: pass import json import argparse import os import sys # Setup and process arguments parser = argparse.ArgumentParser(description='Script to import an iApp template to a BIG-IP device') parser.add_argument("host", help="The IP/Hostname in <host>[:<port>] format of the BIG-IP device") parser.add_argument("name", help="The name iApp template") parser.add_argument("-a", "--apl", help="The path to the iApp apl layer file to import", default="iapp.apl") parser.add_argument("-c", "--checkonly",help="Only check to see if a template existings on the device", action="store_true") parser.add_argument("-d", "--dontsave", help="Don't automatically save the config", action="store_true") parser.add_argument("-i", "--impl", help="The path to the iApp implementation layer file to import", default="iapp.tcl") parser.add_argument("-m", "--macro", help="The path to the iApp HTML help file to import", default="iapp.macro") parser.add_argument("-n", "--html", help="The path to the iApp HTML help file to import", default="iapp.html") parser.add_argument("-o", "--overwrite",help="Overwrite an existing template definitions", action="store_true") parser.add_argument("-p", "--password", help="The BIG-IP password", default="admin") parser.add_argument("-r", "--modules", help="The BIG-IP TMOS modules required (ex: ltm,gtm)", default="") parser.add_argument("-u", "--username", help="The BIG-IP username", default="admin") parser.add_argument("-v", "--minver", help="The minimum version of BIG-IP TMOS required", default="11.0.0") parser.add_argument("-x", "--maxver", help="The maximum version of BIG-IP TMOS required", default="") parser.add_argument("--password-file", help="The BIG-IP password stored in a file", dest='password_file') args = parser.parse_args() password = args.password if args.password_file: password = open(args.password_file).readline().strip() # Create request session, set credentials, allow self-signed SSL cert s = requests.session() s.auth = (args.username, password) s.verify = False # Set our REST urls template_url = "https://%s/mgmt/tm/sys/application/template" % (args.host) save_url = "https://%s/mgmt/tm/sys/config" % (args.host) template_exist_url = "%s/%s" % (template_url, args.name) definition_url = "%s/actions/definition" % (template_exist_url) # Check to see if the template with the name specified in the arguments exists on the BIG-IP device resp = s.get(template_exist_url) # Check to see if authentication succeeded if resp.status_code == 401: print "[error] Authentication failed: %s" % (resp) sys.exit(1) if args.checkonly: if resp.status_code == 200: # The template exists exit 1 print "Template '%s' exists on %s" % (args.name, args.host) sys.exit(1) else: # Exit 0 print "Template '%s' does not exist on %s" % (args.name, args.host) sys.exit(0) # Get data from the file containing implementation layer TCL code (-i argument) with open(args.impl) as impl: impl_data = impl.read() impl.close() # Get data from the file containing presentation layer APL code (-a argument) with open(args.apl) as apl: apl_data = apl.read() apl.close() # OPTIONAL: Get data from the file containing HTML Help (-n argument) try: with open(args.html) as help: help_data = help.read() except IOError as error: print "[warning] HTML Help file \"%s\" not found, setting to blank" % (args.html) help_data = "" # OPTIONAL: Get data from the file containing the iApp macro (-m argument) try: with open(args.macro) as macro: macro_data = macro.read() except IOError as error: print "[warning] Macro file \"%s\" not found, setting to blank" % (args.macro) macro_data = "" # Setup our base JSON payload template_payload = {} template_payload["ignoreVerification"] = "false" template_payload["totalSigningStatus"] = "not-all-signed" template_payload["requiresBigipVersionMin"] = args.minver template_payload["requiresBigipVersionMax"] = args.maxver template_payload["requiresModules"] = args.modules.split(',') # The template exists and the -o argument (overwrite) was not specified. Print error and exit if resp.status_code == 200 and not args.overwrite: print "[error] A template named \"%s\" already exists on BIG-IP \"%s\". To overwrite please specify the '-o' flag" % (args.name, args.host) sys.exit(1) # Template does not already exist, create it if resp.status_code == 404: # Add in creation-specific JSON payload items template_payload["name"] = args.name template_payload["actions"] = [ {} ] template_payload["actions"][0]["name"] = "definition" template_payload["actions"][0]["roleAcl"] = [ "admin","manager","resource-admin" ] template_payload["actions"][0]["implementation"] = impl_data template_payload["actions"][0]["presentation"] = apl_data template_payload["actions"][0]["htmlHelp"] = help_data template_payload["actions"][0]["macro"] = macro_data # Send the REST call to create the template and print outcome resp = s.post(template_url, data=json.dumps(template_payload)) if resp.status_code != requests.codes.ok: print "[error] Template creation failed: %s" % (resp.json()) sys.exit(1) print "[success] Template \"%s\" created on BIG-IP \"%s\"" % (args.name, args.host) # Template exists and args.overwrite (-o) is TRUE so we will modify the existing template # We need to update in two steps: # 1) Update base template properties { minver, maxver, modules } # 2) Update the 'actions':[ {name:definition} ... ] subcollection with the new impl, apl, html and macro else: headers = { "Content-Type":"application/json" } # Step 1 resp = s.put(template_exist_url, data=json.dumps(template_payload), headers=headers) if resp.status_code != requests.codes.ok: print "[error] Base template properties update failed: %s" % (resp.json()) sys.exit(1) # Step 2 definition_payload = {} definition_payload["implementation"] = impl_data definition_payload["presentation"] = apl_data definition_payload["htmlHelp"] = help_data definition_payload["macro"] = macro_data resp = s.put(definition_url, data=json.dumps(definition_payload), headers=headers) if resp.status_code != requests.codes.ok: print "[error] Template definition properties update failed: %s" % (resp.json()) sys.exit(1) print "[success] Template \"%s\" updated on BIG-IP \"%s\"" % (args.name, args.host) # Save the config (unless -d option was specified) save_payload = { "command":"save" } if not args.dontsave: resp = s.post(save_url, data=json.dumps(save_payload)) if resp.status_code != requests.codes.ok: print "[error] save failed: %s" % (resp.json()) sys.exit(1) else: print "[success] Config saved"
44.676301
141
0.698926
1,105
7,729
4.80905
0.244344
0.045164
0.047986
0.024087
0.312194
0.262702
0.190629
0.131539
0.090516
0.080166
0
0.007145
0.167033
7,729
172
142
44.936047
0.818267
0.251391
0
0.169643
0
0
0.330665
0.01166
0
0
0
0
0
0
null
null
0.0625
0.089286
null
null
0.116071
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
02f6b9880820ae8de835dfa9120f3710c681bbbf
1,483
py
Python
Cifrado/encoder.py
arhcoder/ARH-coder
2ce129884ff0a5d094798885ab84f0b6a19d1bdc
[ "BSD-Source-Code" ]
1
2020-11-04T03:46:07.000Z
2020-11-04T03:46:07.000Z
Cifrado/encoder.py
arhcoder/ARH-Coder
2ce129884ff0a5d094798885ab84f0b6a19d1bdc
[ "BSD-Source-Code" ]
null
null
null
Cifrado/encoder.py
arhcoder/ARH-Coder
2ce129884ff0a5d094798885ab84f0b6a19d1bdc
[ "BSD-Source-Code" ]
null
null
null
from coders import keyLEN, keySUMA, keyMULTI # S = {0, ..., 55295} - {0, 7, ... 10, 13, 27, 128 ... 160}; NO = [0] + list(range(7, 11)) + [13, 27] + list(range(128, 161)) total = 55296 - len(NO) # Total = 55,256; def encode(password, message): code = "" LEN = keyLEN(password) SUMA = keySUMA(password) MULTI = keyMULTI(LEN, SUMA) # Ciclo que analiza todos los caracteres del mensaje. for index in range(0, len(message)): caracter = ord(message[index]) # Si el número de caracter actual, es primo. divisores = 0 for i in range (1, index+1): if index % i == 0: divisores += 1 # Si el número de caracter actual, es primo. if divisores == 2 or index == 2: pasos = LEN # Si el número de caracter actual, no es primo. else: # Si es par. if index % 2 == 0: pasos = SUMA # Si es impar. else: pasos = MULTI # Avanza la cantidad de pasos necesarios. ncaracter = caracter for i in range (1, pasos+1): ncaracter += 1 if ncaracter == total: ncaracter = 0 # Exluye los números {0, 7, ... 10, 13, 27, 128 ... 160} for i in range(0, len(NO)): if ncaracter == NO[i]: ncaracter = total + i # Genera el mensaje encriptado. code += chr(ncaracter) return code
29.66
64
0.50708
188
1,483
4
0.388298
0.037234
0.039894
0.047872
0.191489
0.159574
0.125
0.087766
0
0
0
0.079262
0.378962
1,483
50
65
29.66
0.737242
0.274444
0
0.064516
0
0
0
0
0
0
0
0.02
0
1
0.032258
false
0.096774
0.032258
0
0.096774
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
f303e03fa776f57402045bbf6feb6a3d59b30df6
8,611
py
Python
web/survey/migrations/0006_auto__del_field_experimentanswer_confidence__del_field_experimentanswe.py
sbreslav/mimic
ac1130cfbab75725bb0ddc6382314f85ad3ccb76
[ "MIT" ]
3
2018-01-08T09:01:37.000Z
2019-01-16T06:57:26.000Z
web/survey/migrations/0006_auto__del_field_experimentanswer_confidence__del_field_experimentanswe.py
sbreslav/mimic
ac1130cfbab75725bb0ddc6382314f85ad3ccb76
[ "MIT" ]
null
null
null
web/survey/migrations/0006_auto__del_field_experimentanswer_confidence__del_field_experimentanswe.py
sbreslav/mimic
ac1130cfbab75725bb0ddc6382314f85ad3ccb76
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'ExperimentAnswer.confidence' db.delete_column(u'survey_experimentanswer', 'confidence') # Deleting field 'ExperimentAnswerProcessed.bias' db.delete_column(u'survey_experimentanswerprocessed', 'bias') # Deleting field 'ExperimentAnswerProcessed.error' db.delete_column(u'survey_experimentanswerprocessed', 'error') def backwards(self, orm): # Adding field 'ExperimentAnswer.confidence' db.add_column(u'survey_experimentanswer', 'confidence', self.gf('django.db.models.fields.IntegerField')(default=0, null=True, blank=True), keep_default=False) # Adding field 'ExperimentAnswerProcessed.bias' db.add_column(u'survey_experimentanswerprocessed', 'bias', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=19, decimal_places=10), keep_default=False) # Adding field 'ExperimentAnswerProcessed.error' db.add_column(u'survey_experimentanswerprocessed', 'error', self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=19, decimal_places=10), keep_default=False) models = { u'survey.experiment': { 'Meta': {'unique_together': "(('user', 'survey'),)", 'object_name': 'Experiment'}, 'allMetaData': ('django.db.models.fields.TextField', [], {}), 'finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'http_referer': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'http_user_agent': ('django.db.models.fields.TextField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'remote_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), 'remote_host': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40', 'blank': 'True'}), 'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'survey': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.Survey']"}), 'survey_condition': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.ExperimentUser']"}), 'version': ('django.db.models.fields.IntegerField', [], {'default': '0'}) }, u'survey.experimentanswer': { 'Meta': {'unique_together': "(('experiment', 'question', 'user'),)", 'object_name': 'ExperimentAnswer'}, 'answer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'experiment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.Experiment']"}), 'finished': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'mouseData': ('django.db.models.fields.TextField', [], {}), 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.Question']"}), 'submitted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.ExperimentUser']"}) }, u'survey.experimentanswerprocessed': { 'Meta': {'object_name': 'ExperimentAnswerProcessed'}, 'answer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'clicks_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'confidence': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'cursor_y': ('django.db.models.fields.TextField', [], {}), 'elements': ('django.db.models.fields.TextField', [], {'null': 'True'}), 'experiment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.Experiment']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'init_event': ('django.db.models.fields.TextField', [], {}), 'keydown_event': ('django.db.models.fields.TextField', [], {}), 'keys_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'misc_event': ('django.db.models.fields.TextField', [], {}), 'mouse_click_event': ('django.db.models.fields.TextField', [], {}), 'mouse_move_event': ('django.db.models.fields.TextField', [], {}), 'processed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.Question']"}), 'scroll_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'scroll_event': ('django.db.models.fields.TextField', [], {}), 'source_answer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.ExperimentAnswer']"}), 'time': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '19', 'decimal_places': '10'}), 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.ExperimentUser']"}), 'window_h': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'window_w': ('django.db.models.fields.IntegerField', [], {'default': '0'}) }, u'survey.experimentuser': { 'Meta': {'object_name': 'ExperimentUser'}, u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'worker_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}) }, u'survey.question': { 'Meta': {'object_name': 'Question'}, 'base_template': ('django.db.models.fields.CharField', [], {'default': "'question_v2.html'", 'max_length': '255'}), 'correct_answer': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'data': ('django.db.models.fields.TextField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}), 'template': ('django.db.models.fields.CharField', [], {'max_length': '255'}) }, u'survey.survey': { 'Meta': {'object_name': 'Survey'}, 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'condition_count': ('django.db.models.fields.IntegerField', [], {'default': '4'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'pub_date': ('django.db.models.fields.DateTimeField', [], {}), 'questions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['survey.Question']", 'null': 'True', 'through': u"orm['survey.SurveyMembership']", 'blank': 'True'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '255'}), 'survey_code': ('django.db.models.fields.CharField', [], {'default': "'2lMGut4I4h'", 'max_length': '255'}), 'user_data_version': ('django.db.models.fields.CharField', [], {'default': "'1.4.0'", 'max_length': '255'}) }, u'survey.surveymembership': { 'Meta': {'unique_together': "(('survey', 'question'),)", 'object_name': 'SurveyMembership'}, 'desired_answers': ('django.db.models.fields.IntegerField', [], {'default': '1'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'order': ('django.db.models.fields.IntegerField', [], {}), 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.Question']"}), 'survey': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['survey.Survey']"}) } } complete_apps = ['survey']
68.34127
219
0.578911
861
8,611
5.691057
0.160279
0.11102
0.191429
0.273469
0.73551
0.65102
0.53449
0.445306
0.371429
0.352245
0
0.010129
0.197422
8,611
126
220
68.34127
0.698886
0.034723
0
0.233645
0
0
0.559904
0.363396
0
0
0
0
0
1
0.018692
false
0
0.037383
0
0.084112
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
f3059e7f6aac310bd55a0f130ed836588034384b
469
py
Python
Parallel_GAN_structure/sndcgan_zgp/ops/layers/activations.py
skang29/GANs
83e3338bf3611aafbd75f0df1272276e3bc07d46
[ "Apache-2.0" ]
2
2018-11-22T07:58:15.000Z
2018-12-20T00:42:59.000Z
Parallel_GAN_structure/sndcgan_zgp/ops/layers/activations.py
skang29/GANs
83e3338bf3611aafbd75f0df1272276e3bc07d46
[ "Apache-2.0" ]
null
null
null
Parallel_GAN_structure/sndcgan_zgp/ops/layers/activations.py
skang29/GANs
83e3338bf3611aafbd75f0df1272276e3bc07d46
[ "Apache-2.0" ]
1
2019-01-21T03:37:43.000Z
2019-01-21T03:37:43.000Z
"""" Layers / activations under tensorflow environment. Supports NCCL multi-gpu environment. To activate the environment, use code below in your main.py. >> os.environ['nccl_multigpu_env'] = 'true' """ __version__ = "1.0.0" import os import tensorflow as tf NCCL_FLAG = os.environ.get('nccl_multigpu_env') def lrelu(x, leak=0.2, tower_config=None): return tf.maximum(x, leak * x) def relu(x, tower_config=None): return tf.maximum(x, 0)
22.333333
52
0.692964
71
469
4.422535
0.605634
0.057325
0.095541
0.133758
0.197452
0.197452
0.197452
0
0
0
0
0.015666
0.183369
469
20
53
23.45
0.804178
0.413646
0
0
0
0
0.08871
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
0.75
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
f3114cfaf16fc730a9e59d536f8deba72dadc901
3,646
py
Python
susecon2015/stop.py
smithfarm/ceph-auto-aws
b8bb7e0cf9a36b540b7f576b4fe9ef58aa9285d4
[ "BSD-3-Clause" ]
26
2016-04-03T07:41:34.000Z
2021-12-01T19:45:54.000Z
susecon2015/stop.py
smithfarm/ceph-auto-aws
b8bb7e0cf9a36b540b7f576b4fe9ef58aa9285d4
[ "BSD-3-Clause" ]
35
2016-03-31T16:37:51.000Z
2018-02-12T09:52:56.000Z
susecon2015/stop.py
smithfarm/ceph-auto-aws
b8bb7e0cf9a36b540b7f576b4fe9ef58aa9285d4
[ "BSD-3-Clause" ]
9
2016-09-19T09:04:07.000Z
2022-03-29T08:31:01.000Z
#!/usr/bin/python # # stop.py # # Stop a Ceph cluster in AWS. # # Generate documentation from #PC comments: # $ grep -E '^ *#PC' stop.py | sed -e 's/#PC //'g # import argparse from aws_lib import SpinupError import init_lib from os.path import expanduser from runner_lib import runcommand import sys import yaml_lib #PC * This script (stop.py) makes the following assumptions: #PC * delegate number provided in argument is really the one you want to #PC stop #PC * each delegate is segregated into his or her own subnet in the YAML #PC * these delegate subnets defined in the YAML take the form #PC 10.0.[d].0/24, where [d] is the delegate number, and these subnets #PC really exist #PC * "stop" operation involves stopping instances (nothing else) #PC * in other words, the instances are assumed to use the default security #PC group, etc. #PC * aws.yaml present in current directory or --yaml option provided; #PC * Salt Master exists and is alone in subnet 10.0.0.0/24 #PC * If the above assumptions are fulfilled, the script should work. #PC * The following is a high-level description of what the script does. #PC * Parse command-line arguments. parser = argparse.ArgumentParser( description='Stop a Ceph cluster in AWS.' ) parser.add_argument( '--yaml', default='./aws.yaml', help="yaml file to read (defaults to ./aws.yaml)" ) parser.add_argument( 'delegate', help="Delegate number to stop", nargs='?' ) args = parser.parse_args() # Verify that delegate number was given on command line and that it is an integer. if args.delegate is None: raise SpinupError( "Must provide delegate number to stop" ) delegate = int(args.delegate) # Initialize dictionary for storage of globals (values that do not change, # but are discarded when the script exits). g = {} #PC * Parse YAML file. y = yaml_lib.parse_yaml( args.yaml ) #PC * Connect to region specified in YAML ("region"). # (i.e., get VPCConnection and EC2Connection objects). # FIXME: validate that the region exists y['region'] = yaml_lib.yaml_attr( y, 'region', 'eu-west-1' ) ( g['vpc_conn'], g['ec2_conn'] ) = init_lib.init_region( y['region'] ) print "Connected to region {}".format( y['region'] ) #PC * Connect to VPC specified in YAML ("vpc" -> "cidr-block"). n = yaml_lib.yaml_attr( y, 'vpc', None ) n['cidr-block'] = yaml_lib.yaml_attr( n, 'cidr-block', None ) n['name'] = yaml_lib.yaml_attr( n, 'name', 'susecon' ) print "Looking for VPC {}".format(n['cidr-block']) g['vpc_obj'] = init_lib.init_vpc( g['vpc_conn'], n['cidr-block'] ) #PC * Get Salt Master subnet (first one in "subnets" list). g['master_subnet'] = init_lib.init_subnet( g['vpc_conn'], g['vpc_obj'].id, y['subnets'][0]['cidr-block'] ) #PC * Get Salt Master instance (i.e., the sole instance in the Salt Master subnet). g['master_instance'] = init_lib.get_master_instance( g['ec2_conn'], g['master_subnet'].id ) print "Salt Master is {}".format( g['master_instance'].ip_address ) #PC * Determine subnet to stop. cidr_block = '10.0.{}.0/24'.format(delegate) #PC * Get subnet object (raise exception if it doesn't exist). g['subnet_obj'] = init_lib.init_subnet( g['vpc_conn'], g['vpc_obj'].id, cidr_block ) print "Stopping all instances in {} (and attached volumes)".format(cidr_block) #PC * Get all instances in the subnet. g['instances'] = g['ec2_conn'].get_only_instances( filters={ "subnet-id": g['subnet_obj'].id } ) #PC * Loop over the instances, stopping them. g['volumes'] = [] for i in g['instances']: g['ec2_conn'].stop_instances( instance_ids=[ i.id ] ) print "Done."
34.72381
84
0.6887
575
3,646
4.274783
0.332174
0.032954
0.017901
0.02441
0.104963
0.06428
0.027665
0.027665
0.027665
0.027665
0
0.008652
0.175809
3,646
104
85
35.057692
0.809318
0.476138
0
0.038462
1
0
0.310861
0
0
0
0
0.009615
0
0
null
null
0
0.134615
null
null
0.096154
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
f31f10022925a06368f2b0f1d78ff82facadba5d
1,144
py
Python
development/testsite/blog/migrations/0002_auto_20190126_1538.py
iggy12345/django_blog
59a4db1db6dbcd4aaf4fde9bf21245d7ff9faf97
[ "Apache-2.0" ]
null
null
null
development/testsite/blog/migrations/0002_auto_20190126_1538.py
iggy12345/django_blog
59a4db1db6dbcd4aaf4fde9bf21245d7ff9faf97
[ "Apache-2.0" ]
null
null
null
development/testsite/blog/migrations/0002_auto_20190126_1538.py
iggy12345/django_blog
59a4db1db6dbcd4aaf4fde9bf21245d7ff9faf97
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.5 on 2019-01-26 21:38 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('utils', '0001_initial'), ('blog', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='blogpost', name='author', ), migrations.RemoveField( model_name='blogpost', name='id', ), migrations.RemoveField( model_name='blogpost', name='is_posted', ), migrations.RemoveField( model_name='blogpost', name='pub_date', ), migrations.RemoveField( model_name='blogpost', name='text', ), migrations.AddField( model_name='blogpost', name='textpost_ptr', field=models.OneToOneField(auto_created=True, default=0, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='utils.TextPost'), preserve_default=False, ), ]
27.238095
188
0.564685
109
1,144
5.779817
0.522936
0.085714
0.161905
0.2
0.333333
0.333333
0
0
0
0
0
0.030691
0.316434
1,144
41
189
27.902439
0.774936
0.039336
0
0.485714
1
0
0.123974
0
0
0
0
0
0
1
0
false
0
0.057143
0
0.142857
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
b82cef26ca3dd8970b68447584f9ed3eb57583f6
1,975
py
Python
test/test_mdict.py
Viocalpan/bottle
357a0cb39cb8337f8467f5396e4b7caaa7e4f25c
[ "MIT" ]
6,086
2015-01-01T11:27:41.000Z
2022-03-30T19:35:50.000Z
test/test_mdict.py
Viocalpan/bottle
357a0cb39cb8337f8467f5396e4b7caaa7e4f25c
[ "MIT" ]
600
2015-01-01T13:02:13.000Z
2022-03-14T20:35:49.000Z
test/test_mdict.py
Viocalpan/bottle
357a0cb39cb8337f8467f5396e4b7caaa7e4f25c
[ "MIT" ]
1,556
2015-01-01T07:03:08.000Z
2022-03-15T13:44:53.000Z
import unittest from bottle import MultiDict, HeaderDict class TestMultiDict(unittest.TestCase): def test_isadict(self): """ MultiDict should behaves like a normal dict """ d, m = dict(a=5), MultiDict(a=5) d['key'], m['key'] = 'value', 'value' d['k2'], m['k2'] = 'v1', 'v1' d['k2'], m['k2'] = 'v2', 'v2' self.assertEqual(list(d.keys()), list(m.keys())) self.assertEqual(list(d.values()), list(m.values())) self.assertEqual(list(d.keys()), list(m.iterkeys())) self.assertEqual(list(d.values()), list(m.itervalues())) self.assertEqual(d.get('key'), m.get('key')) self.assertEqual(d.get('cay'), m.get('cay')) self.assertEqual(list(iter(d)), list(iter(m))) self.assertEqual([k for k in d], [k for k in m]) self.assertEqual(len(d), len(m)) self.assertEqual('key' in d, 'key' in m) self.assertEqual('cay' in d, 'cay' in m) self.assertRaises(KeyError, lambda: m['cay']) def test_ismulti(self): """ MultiDict has some special features """ m = MultiDict(a=5) m['a'] = 6 self.assertEqual([5, 6], m.getall('a')) self.assertEqual([], m.getall('b')) self.assertEqual([('a', 5), ('a', 6)], list(m.iterallitems())) def test_isheader(self): """ HeaderDict replaces by default and title()s its keys """ m = HeaderDict(abc_def=5) m['abc_def'] = 6 self.assertEqual(['6'], m.getall('abc_def')) m.append('abc_def', 7) self.assertEqual(['6', '7'], m.getall('abc_def')) self.assertEqual([('Abc-Def', '6'), ('Abc-Def', '7')], list(m.iterallitems())) def test_headergetbug(self): ''' Assure HeaderDict.get() to be case insensitive ''' d = HeaderDict() d['UPPER'] = 'UPPER' d['lower'] = 'lower' self.assertEqual(d.get('upper'), 'UPPER') self.assertEqual(d.get('LOWER'), 'lower')
41.145833
86
0.552911
265
1,975
4.086792
0.267925
0.263158
0.087719
0.073869
0.155125
0.110803
0.110803
0
0
0
0
0.016064
0.243544
1,975
47
87
42.021277
0.708835
0.092152
0
0
0
0
0.085456
0
0
0
0
0
0.512821
1
0.102564
false
0
0.051282
0
0.179487
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
2
b842145c0ad1b7253c5ba22691fd453ef486ea15
1,721
py
Python
NoteBooks/Curso de Python/Python/Examples/High_Patterns/Patrones de diseño/Conductuales/Visitors.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Python/Python/Examples/High_Patterns/Patrones de diseño/Conductuales/Visitors.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Python/Python/Examples/High_Patterns/Patrones de diseño/Conductuales/Visitors.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
''' Este snipet tiene como propósito dejar por escrito el uso del patrón de diseño de Visitors ''' class House(object): #The class being visited def accept(self, visitor): """Interface to accept a visitor""" visitor.visit(self) #Triggers the visiting operation! def work_on_hvac(self, hvac_specialist): print(self, "worked on by", hvac_specialist) #Note that we now have a reference to the HVAC specialist object in the house object! def work_on_electricity(self, electrician): print(self, "worked on by", electrician) #Note that we now have a reference to the electrician object in the house object! def __str__(self): """Simply return the class name when the House object is printed""" return self.__class__.__name__ class Visitor(object): """Abstract visitor""" def __str__(self): """Simply return the class name when the Visitor object is printed""" return self.__class__.__name__ class HvacSpecialist(Visitor): #Inherits from the parent class, Visitor """Concrete visitor: HVAC specialist""" def visit(self, house): house.work_on_hvac(self) #Note that the visitor now has a reference to the house object class Electrician(Visitor): #Inherits from the parent class, Visitor """Concrete visitor: electrician""" def visit(self, house): house.work_on_electricity(self) #Note that the visitor now has a reference to the house object #Create an HVAC specialist hv = HvacSpecialist() #Create an electrician e = Electrician() #Create a house home = House() #Let the house accept the HVAC specialist and work on the house by invoking the visit() method home.accept(hv) #Let the house accept the electrician and work on the house by invoking the visit() method home.accept(e)
30.732143
132
0.755375
259
1,721
4.888031
0.274131
0.056872
0.055292
0.047393
0.57267
0.511058
0.473934
0.4297
0.368088
0.230648
0
0
0.160953
1,721
55
133
31.290909
0.876731
0.575828
0
0.26087
0
0
0.035451
0
0
0
0
0
0
1
0.304348
false
0
0
0
0.565217
0.086957
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
b85ac378a6c28c916567f28451efb6ea5b0c3fba
532
py
Python
code/gifs-filter/c3d-models/setdiff.py
raingo/TGIF-Release
3e54d2f71418d8a2e9f5f61aa5be0edb9c0ac2b8
[ "BSD-3-Clause" ]
94
2016-04-07T15:07:13.000Z
2022-02-25T07:19:57.000Z
code/gifs-filter/c3d-models/setdiff.py
raingo/TGIF-Release
3e54d2f71418d8a2e9f5f61aa5be0edb9c0ac2b8
[ "BSD-3-Clause" ]
9
2016-08-22T15:35:27.000Z
2020-10-13T15:48:52.000Z
code/gifs-filter/c3d-models/setdiff.py
raingo/TGIF-Release
3e54d2f71418d8a2e9f5f61aa5be0edb9c0ac2b8
[ "BSD-3-Clause" ]
22
2016-04-07T15:39:57.000Z
2022-03-04T08:04:47.000Z
#!/usr/bin/env python """ Python source code - replace this with a description of the code and write the code below this text. """ def load_list(path): res = [] with open(path) as reader: for line in reader: res.append(line.strip()) return res def main(): import sys A = set(load_list(sys.argv[1])) B = set(load_list(sys.argv[2])) C = A - B for i in C: print i pass if __name__ == "__main__": main() # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
16.625
100
0.599624
82
532
3.756098
0.634146
0.077922
0.071429
0.090909
0.116883
0
0
0
0
0
0
0.013089
0.281955
532
31
101
17.16129
0.793194
0.135338
0
0
0
0
0.022857
0
0
0
0
0
0
0
null
null
0.0625
0.0625
null
null
0.0625
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
b85ef8cf0e3ac8e5b4aa8adb3d64b52765eb210b
232
py
Python
threader.py
linksapprentice1/JeopardyPrepper
9004881bc88f5b4e9aead869a00d1d4613687dd8
[ "MIT" ]
null
null
null
threader.py
linksapprentice1/JeopardyPrepper
9004881bc88f5b4e9aead869a00d1d4613687dd8
[ "MIT" ]
null
null
null
threader.py
linksapprentice1/JeopardyPrepper
9004881bc88f5b4e9aead869a00d1d4613687dd8
[ "MIT" ]
null
null
null
from threading import Thread def makeThread(function, arguments): thread = Thread(target = function, args = arguments) thread.start() return thread def joinThreads(threads): for thread in threads: thread.join()
21.090909
55
0.715517
27
232
6.148148
0.62963
0.108434
0
0
0
0
0
0
0
0
0
0
0.198276
232
10
56
23.2
0.892473
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.5
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
1
0
0
0
0
0
0
0
2
b89b59aa1c05ddefb82fc9c0d70a051f2e162044
2,045
py
Python
src/ranks.py
mlohnrob/innkeeper
66b5e31e341b6e10436110dd97eeed90816959d4
[ "MIT" ]
null
null
null
src/ranks.py
mlohnrob/innkeeper
66b5e31e341b6e10436110dd97eeed90816959d4
[ "MIT" ]
null
null
null
src/ranks.py
mlohnrob/innkeeper
66b5e31e341b6e10436110dd97eeed90816959d4
[ "MIT" ]
null
null
null
# ranks.py from src.Database import DB rank_registry = {} # local imports class Rank: def __init__(self, rank, entry_rep, budget, name, role): """ rank - integer entry_rep - integer, reputation needed to qualify for rank budget - integer, award budget for rank members - added to credits every 6 hours role - discord.Role, role for rank members """ self.rank = rank self.entry_rep = entry_rep self.budget = budget self.role = role self.name = name def register(self, registry=rank_registry): if self.rank in registry: print('WARNING: rank ' + self.rank + 'is already registered. Overwriting.') registry[self.name] = self def assign_rank(self, userID, db: DB): ''' userID - integer rank - Rank object ''' db.set_rank(userID, self.rank) @staticmethod def getRankForRep(rep): highest_rank = list(rank_registry.values())[0] # TODO: can we improve on brute force? for (_, rank) in rank_registry.items(): if highest_rank.entry_rep < rank.entry_rep <= rep: highest_rank = rank return highest_rank ###--------------------------------------------------------------------------### ### Register Ranks ### ###--------------------------------------------------------------------------### Rank(1, 0, 1, "Beginner", None).register(rank_registry) Rank(2, 10, 2, "Script Kiddy", None).register(rank_registry) Rank(3, 25, 5, "Apprentice Junior Dev", None).register(rank_registry) Rank(4, 50, 10, "Junior Dev", None).register(rank_registry) Rank(5, 100, 20, "Apprentice Senior Dev", None).register(rank_registry) Rank(6, 500, 100, "Senior Dev", None).register(rank_registry) Rank(7, 1000, 200, "Software Architect", None).register(rank_registry) Rank(8, 5000, 1000, "Senior Lead Software Engineer", None).register(rank_registry)
35.258621
91
0.561858
236
2,045
4.745763
0.381356
0.128571
0.114286
0.171429
0.207143
0.132143
0.132143
0
0
0
0
0.031683
0.259169
2,045
57
92
35.877193
0.707591
0.25868
0
0
0
0
0.125618
0
0
0
0
0.017544
0
1
0.129032
false
0
0.032258
0
0.225806
0.032258
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
1
0
0
0
0
0
0
0
0
0
0
2
b8a3cb9e21e8982a2ea723b87ce48bdb153374bb
411
py
Python
VirusTotalAVBot/__init__.py
kenanismayilov335/VirusTotal-File-Scan-Bot
369e8bba10ce40cf9e9bdaeba018496e8509cd8d
[ "MIT" ]
null
null
null
VirusTotalAVBot/__init__.py
kenanismayilov335/VirusTotal-File-Scan-Bot
369e8bba10ce40cf9e9bdaeba018496e8509cd8d
[ "MIT" ]
null
null
null
VirusTotalAVBot/__init__.py
kenanismayilov335/VirusTotal-File-Scan-Bot
369e8bba10ce40cf9e9bdaeba018496e8509cd8d
[ "MIT" ]
6
2020-11-01T17:46:27.000Z
2022-03-01T14:34:17.000Z
import os BOT_TOKEN = os.environ.get('BOT_TOKEN') API_ID = int(os.environ.get('API_ID')) API_HASH = os.environ.get('API_HASH') BOT_USERNAME = os.environ.get('BOT_USERNAME') BOT_OWNER = os.environ.get('BOT_OWNER') PLUG_IN = dict(root="VirusTotalAVBot.modules") VT_API = os.environ.get('VT_API') GROUP_INFO_MSGS = os.environ.get('GROUP_INFO_MSGS') MAX_FILE_SIZE = int(os.environ.get('MAX_FILE_SIZE'))
34.25
53
0.737226
70
411
4.028571
0.357143
0.255319
0.340426
0.159574
0
0
0
0
0
0
0
0
0.099757
411
11
54
37.363636
0.762162
0
0
0
0
0
0.2525
0.0575
0
0
0
0
0
1
0
false
0
0.1
0
0.1
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
b8a9f04cfbf6acc65a125e6cba04dc6e7b36b600
2,469
py
Python
src/graph.py
sm2774us/Data-Structures-And-Algorithms-In-Python
a9d03cc3f9136178bfe87ec63ae63ddb53450277
[ "MIT" ]
33
2017-10-12T16:52:04.000Z
2021-11-29T13:39:37.000Z
src/graph.py
sm2774us/Data-Structures-And-Algorithms-In-Python
a9d03cc3f9136178bfe87ec63ae63ddb53450277
[ "MIT" ]
4
2017-03-28T04:09:58.000Z
2017-06-20T23:30:30.000Z
src/graph.py
sm2774us/Data-Structures-And-Algorithms-In-Python
a9d03cc3f9136178bfe87ec63ae63ddb53450277
[ "MIT" ]
13
2017-04-15T15:09:29.000Z
2021-06-09T10:45:44.000Z
"""Python implementation of a Graph Data structure.""" class Graph(object): """ Graph implementation. Graph data structure supports following methods: nodes(): return a list of all nodes in the graph. edges(): return a list of all edges in the graph. add_node(n): adds a new node 'n' to the graph. add_edge(n1, n2): adds a new edge to the graph connecting 'n1' and 'n2', if either n1 or n2 are not already present in the graph, they should be added. del_node(n): deletes the node 'n' from the graph, raises an error if no such node exists. del_edge(n1, n2): deletes the edge connecting 'n1' and 'n2' from the graph, raises an error if no such edge exists. has_node(n): True if node 'n' is contained in the graph, False if not. neighbors(n): returns the list of all nodes connected to 'n' by edges, raises an error if n is not in g. adjacent(n1, n2): returns True if there is an edge connecting n1 and n2, False if not, raises an error if either of the supplied nodes are not in g. """ def __init__(self, data=None): """Initialize graph.""" self.graph = {} if data: for i in data: self.add_node(i) def nodes(self): """Return a list of all nodes in the graph.""" return list(self.graph.keys()) def edges(self): """Return a list of all edges in the graph.""" return [edge for edges in self.graph.values() for edge in edges] def add_node(self, n): """Add a new node to the graph.""" self.graph.setdefault(n, set()) def add_edge(self, n1, n2): """Add new edge to the graph.""" self.graph.setdefault(n1, set([n2])) self.graph.setdefault(n2, set()) self.graph[n1].add(n2) def del_node(self, n): """Delete the node 'n' from the graph.""" del self.graph[n] for k in self.graph: self.graph[k].discard(n) def del_edge(self, n1, n2): """Delete the edge connecting n1 and n2.""" self.graph[n1].remove(n2) def has_node(self, n): """Return boolean if 'n' is in the graph.""" return n in self.graph def neighbors(self, n): """Return the list of all nodes connected to n by edges.""" return self.graph[n] def adjacent(self, n1, n2): """Return boolean if there is an edge connecting n1 and n2.""" return n2 in self.neighbors(n1)
34.291667
79
0.611179
395
2,469
3.782278
0.2
0.074967
0.046854
0.056894
0.329317
0.313253
0.218206
0.218206
0.218206
0.048193
0
0.018539
0.27906
2,469
71
80
34.774648
0.820787
0.539085
0
0
0
0
0
0
0
0
0
0
0
1
0.357143
false
0
0
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
1
0
0
0
0
1
0
0
2
b21a05677a751dd263166cbeee4eb2c02a7b420b
476
py
Python
reservation/validators.py
cgu-ist/ist3032019spring-project1
c4ee97e8a0766aee2fd6654c11b2b6759293e42e
[ "MIT" ]
null
null
null
reservation/validators.py
cgu-ist/ist3032019spring-project1
c4ee97e8a0766aee2fd6654c11b2b6759293e42e
[ "MIT" ]
1
2021-03-19T22:49:44.000Z
2021-03-19T22:49:44.000Z
reservation/validators.py
cgu-ist/ist3032019spring-project1
c4ee97e8a0766aee2fd6654c11b2b6759293e42e
[ "MIT" ]
null
null
null
import datetime from django.core.exceptions import ValidationError def validate_start_time(start_time): validate_time('start_time', start_time) def validate_end_time(end_time): validate_time('end_time', end_time) def validate_time(name, time): if time < datetime.time(hour=8, minute=0, second=0) or time > datetime.time(hour=20, minute=0, second=0): raise ValidationError("reservation time should be between 8:00am to 8:00pm", params={name: time})
26.444444
109
0.747899
72
476
4.763889
0.416667
0.104956
0.113703
0.104956
0
0
0
0
0
0
0
0.031863
0.142857
476
17
110
28
0.808824
0
0
0
0
0
0.14557
0
0
0
0
0
0
1
0.333333
false
0
0.222222
0
0.555556
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
b21bec2c8fba2f2929d74b712a43348ced8510c5
314
py
Python
tests/data/sum_wet.conflux.py
GeoscienceAustralia/dea-conflux
1af77dda18190943e1368fef8deb4426662bb4a8
[ "Apache-2.0" ]
1
2021-10-06T08:52:51.000Z
2021-10-06T08:52:51.000Z
tests/data/sum_wet.conflux.py
GeoscienceAustralia/dea-conflux
1af77dda18190943e1368fef8deb4426662bb4a8
[ "Apache-2.0" ]
14
2021-08-18T05:38:05.000Z
2022-01-14T03:04:11.000Z
tests/data/sum_wet.conflux.py
GeoscienceAustralia/dea-conflux
1af77dda18190943e1368fef8deb4426662bb4a8
[ "Apache-2.0" ]
1
2021-11-05T02:40:45.000Z
2021-11-05T02:40:45.000Z
import xarray as xr product_name = 'sum_wet' version = '0.0.1' resolution = (-30, 30) output_crs = 'EPSG:3577' input_products = { 'ga_ls_wo_3': ['water'], } def transform(inputs: xr.Dataset) -> xr.Dataset: return inputs == 128 def summarise(inputs: xr.Dataset) -> xr.Dataset: return inputs.sum()
16.526316
48
0.66242
46
314
4.369565
0.673913
0.179104
0.149254
0.169154
0.358209
0.358209
0.358209
0
0
0
0
0.058366
0.181529
314
18
49
17.444444
0.723735
0
0
0
0
0
0.11465
0
0
0
0
0
0
1
0.166667
false
0
0.083333
0.166667
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
0
0
0
0
1
0
0
0
2
b22281eb507e0150733b799d99ff9010bce1e663
425
py
Python
deprecated_code/users_deprecated/model.py
anapenedos/PhosQuest
5a0b363b55850b25f67382b3fa4d227b3ec1c2df
[ "Apache-2.0" ]
2
2019-06-08T10:30:53.000Z
2021-06-29T13:58:56.000Z
deprecated_code/users_deprecated/model.py
anapenedos/PhosQuest
5a0b363b55850b25f67382b3fa4d227b3ec1c2df
[ "Apache-2.0" ]
null
null
null
deprecated_code/users_deprecated/model.py
anapenedos/PhosQuest
5a0b363b55850b25f67382b3fa4d227b3ec1c2df
[ "Apache-2.0" ]
1
2021-06-21T22:11:04.000Z
2021-06-21T22:11:04.000Z
##module for user model - user db import from package from PhosQuest_app import db class User(db.Model): """ Class for db model for email and passwords""" id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(120), unique=True, nullable=False) password = db.Column(db.String(60), nullable=False) def __repr__(self): #string print method return f"User('{self.email}')"
32.692308
66
0.68
63
425
4.492063
0.539683
0.084806
0.106007
0.113074
0
0
0
0
0
0
0
0.01462
0.195294
425
13
67
32.692308
0.812866
0.265882
0
0
0
0
0.065789
0
0
0
0
0
0
1
0.142857
false
0.142857
0.142857
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
1
0
1
0
0
0
2
b2231a37ea42bad04df09f4fe0b5570bbbcba000
3,062
py
Python
cc/utils/cc_constant.py
xz-dev/cc-attack
5002807a18cf61701fd182db8e7e225c9126acdb
[ "MIT" ]
2
2020-11-22T17:56:55.000Z
2021-02-27T03:24:35.000Z
cc/utils/cc_constant.py
xz-dev/cc-attack
5002807a18cf61701fd182db8e7e225c9126acdb
[ "MIT" ]
null
null
null
cc/utils/cc_constant.py
xz-dev/cc-attack
5002807a18cf61701fd182db8e7e225c9126acdb
[ "MIT" ]
4
2020-11-24T09:00:50.000Z
2021-08-13T07:34:29.000Z
acceptall = [ "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n", "Accept-Encoding: gzip, deflate\r\n", "Accept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n", "Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: iso-8859-1\r\nAccept-Encoding: gzip\r\n", "Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n", "Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*\r\nAccept-Language: en-US,en;q=0.5\r\n", "Accept: text/html, application/xhtml+xml, image/jxr, */*\r\nAccept-Encoding: gzip\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n", "Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Encoding: gzip\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n," "Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\n", "Accept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n", "Accept: text/html, application/xhtml+xml", "Accept-Language: en-US,en;q=0.5\r\n", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\n", "Accept: text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n", ] referers = [ "https://www.google.com/search?q=", "https://check-host.net/", "https://www.facebook.com/", "https://www.youtube.com/", "https://www.fbi.com/", "https://www.bing.com/search?q=", "https://r.search.yahoo.com/", "https://www.cia.gov/index.html", "https://vk.com/profile.php?redirect=", "https://www.usatoday.com/search/results?q=", "https://help.baidu.com/searchResult?keywords=", "https://steamcommunity.com/market/search?q=", "https://www.ted.com/search?q=", "https://play.google.com/store/search?q=", "https://www.qwant.com/search?q=", "https://soda.demo.socrata.com/resource/4tka-6guv.json?$q=", "https://www.google.ad/search?q=", "https://www.google.ae/search?q=", "https://www.google.com.af/search?q=", "https://www.google.com.ag/search?q=", "https://www.google.com.ai/search?q=", "https://www.google.al/search?q=", "https://www.google.am/search?q=", "https://www.google.co.ao/search?q=", ] post_data = "" cookies = ""
63.791667
251
0.654148
561
3,062
3.568627
0.16934
0.037962
0.023976
0.025974
0.632867
0.586913
0.50999
0.506494
0.506494
0.496504
0
0.050162
0.095036
3,062
47
252
65.148936
0.67232
0
0
0
0
0.266667
0.878511
0.385369
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
b234fdaf279af90ad59573708dacc7a09ec81b45
130
py
Python
src/make_notebooks/__init__.py
marskar/make_notebooks
43083c00a6afdacc52b5ebbe575515394f8467e1
[ "MIT" ]
null
null
null
src/make_notebooks/__init__.py
marskar/make_notebooks
43083c00a6afdacc52b5ebbe575515394f8467e1
[ "MIT" ]
null
null
null
src/make_notebooks/__init__.py
marskar/make_notebooks
43083c00a6afdacc52b5ebbe575515394f8467e1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Top-level package for Make Notebooks.""" __author__ = """Martin Skarzynski""" __version__ = '0.0.1'
16.25
43
0.623077
16
130
4.5625
0.9375
0
0
0
0
0
0
0
0
0
0
0.036364
0.153846
130
7
44
18.571429
0.627273
0.461538
0
0
0
0
0.349206
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
b235512c6815bd80274801ff12bb85a2a3e5cc3e
2,667
py
Python
_pytest/test_eventrouter.py
andrewbolster/wee-slack
f458097ff53e6e34bf6b47f62687c7ee55ed95a4
[ "MIT" ]
null
null
null
_pytest/test_eventrouter.py
andrewbolster/wee-slack
f458097ff53e6e34bf6b47f62687c7ee55ed95a4
[ "MIT" ]
null
null
null
_pytest/test_eventrouter.py
andrewbolster/wee-slack
f458097ff53e6e34bf6b47f62687c7ee55ed95a4
[ "MIT" ]
null
null
null
import pytest from wee_slack import EventRouter, ProcessNotImplemented, SlackRequest def test_EventRouter(mock_weechat): # Sending valid json adds to the queue. e = EventRouter() e.receive_json('{}') assert len(e.queue) == 1 # Handling an event removes from the queue. e = EventRouter() # Create a function to test we are called e.proc['testfunc'] = lambda x, y: x e.receive_json('{"type": "testfunc"}') e.handle_next() assert len(e.queue) == 0 # Handling a local event removes from the queue. e = EventRouter() # Create a function to test we are called e.proc['local_testfunc'] = lambda x, y: x e.receive_json('{"type": "local_testfunc"}') e.handle_next() assert len(e.queue) == 0 # Handling an event without an associated processor # raises an exception. e = EventRouter() # Create a function to test we are called e.receive_json('{"type": "testfunc"}') with pytest.raises(ProcessNotImplemented): e.handle_next() def test_EventRouterReceivedata(mock_weechat): e = EventRouter() context = e.store_context(SlackRequest('xoxoxoxox', "rtm.startold", {"meh": "blah"})) print context e.receive_httprequest_callback(context, 1, -1, ' {"JSON": "MEH", ', 4) #print len(e.reply_buffer) context = e.store_context(SlackRequest('xoxoxoxox', "rtm.startold", {"meh": "blah"})) print context e.receive_httprequest_callback(context, 1, -1, ' "JSON2": "MEH", ', 4) #print len(e.reply_buffer) context = e.store_context(SlackRequest('xoxoxoxox', "rtm.startold", {"meh": "blah"})) print context e.receive_httprequest_callback(context, 1, 0, ' "JSON3": "MEH"}', 4) #print len(e.reply_buffer) try: e.handle_next() e.handle_next() e.handle_next() e.handle_next() except: pass print e.context #assert False context = e.store_context(SlackRequest('xoxoxoxox', "rtm.start", {"meh": "blah"})) rtmstartdata = open('_pytest/data/http/rtm.start.json', 'r').read() e.receive_httprequest_callback(context, 1, -1, rtmstartdata[:5000], 4) e.receive_httprequest_callback(context, 1, 0, rtmstartdata[5000:], 4) e.handle_next() #print len(e.reply_buffer) #print e.teams for t in e.teams: #print vars(e.teams[t]) for c in e.teams[t].channels: pass #print c for u in e.teams[t].users: pass #print vars(u) # e = EventRouter() # # Create a function to test we are called # e.receive_json('{"type": "message"}') # e.handle_next() # assert False #assert False
30.655172
89
0.632546
352
2,667
4.678977
0.25
0.048573
0.060109
0.081967
0.606557
0.589557
0.589557
0.503947
0.503947
0.437158
0
0.013605
0.228346
2,667
86
90
31.011628
0.786686
0.238845
0
0.530612
0
0
0.140648
0.01596
0
0
0
0
0.061224
0
null
null
0.061224
0.040816
null
null
0.081633
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
b23cf453a626dccd97e929b942f28ce690163fcc
3,364
py
Python
PyOpenGL-3.0.2/OpenGL/raw/GL/NV/video_capture.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/NV/video_capture.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/NV/video_capture.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_NV_video_capture' def _f( function ): return _p.createFunction( function,_p.GL,'GL_NV_video_capture',False) _p.unpack_constants( """GL_VIDEO_BUFFER_NV 0x9020 GL_VIDEO_BUFFER_BINDING_NV 0x9021 GL_FIELD_UPPER_NV 0x9022 GL_FIELD_LOWER_NV 0x9023 GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 GL_VIDEO_BUFFER_PITCH_NV 0x9028 GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D GL_PARTIAL_SUCCESS_NV 0x902E GL_SUCCESS_NV 0x902F GL_FAILURE_NV 0x9030 GL_YCBYCR8_422_NV 0x9031 GL_YCBAYCR8A_4224_NV 0x9032 GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C""", globals()) glget.addGLGetConstant( GL_VIDEO_BUFFER_BINDING_NV, (1,) ) @_f @_p.types(None,_cs.GLuint) def glBeginVideoCaptureNV( video_capture_slot ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,_cs.GLintptrARB) def glBindVideoCaptureStreamBufferNV( video_capture_slot,stream,frame_region,offset ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,_cs.GLenum,_cs.GLuint) def glBindVideoCaptureStreamTextureNV( video_capture_slot,stream,frame_region,target,texture ):pass @_f @_p.types(None,_cs.GLuint) def glEndVideoCaptureNV( video_capture_slot ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLenum,arrays.GLintArray) def glGetVideoCaptureivNV( video_capture_slot,pname,params ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,arrays.GLintArray) def glGetVideoCaptureStreamivNV( video_capture_slot,stream,pname,params ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,arrays.GLfloatArray) def glGetVideoCaptureStreamfvNV( video_capture_slot,stream,pname,params ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,arrays.GLdoubleArray) def glGetVideoCaptureStreamdvNV( video_capture_slot,stream,pname,params ):pass @_f @_p.types(_cs.GLenum,_cs.GLuint,arrays.GLuintArray,arrays.GLuint64Array) def glVideoCaptureNV( video_capture_slot,sequence_num,capture_time ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,arrays.GLintArray) def glVideoCaptureStreamParameterivNV( video_capture_slot,stream,pname,params ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,arrays.GLfloatArray) def glVideoCaptureStreamParameterfvNV( video_capture_slot,stream,pname,params ):pass @_f @_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,arrays.GLdoubleArray) def glVideoCaptureStreamParameterdvNV( video_capture_slot,stream,pname,params ):pass def glInitVideoCaptureNV(): '''Return boolean indicating whether this extension is available''' from OpenGL import extensions return extensions.hasGLExtension( EXTENSION_NAME )
42.05
99
0.860285
490
3,364
5.446939
0.291837
0.10341
0.063694
0.045335
0.338704
0.322218
0.29749
0.256276
0.256276
0.256276
0
0.075024
0.060939
3,364
79
100
42.582278
0.769864
0.03478
0
0.266667
1
0
0.342707
0.224042
0
0
0.05377
0
0
1
0.186667
false
0.16
0.053333
0.013333
0.266667
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
b2538323320b856dd652fbfe88a1410a8f3717a0
1,059
py
Python
tests/test_pass.py
MisanthropicBit/pytest-pep257
cf9a6ff92132906a0851acdfa5a0ff422c46f8c0
[ "MIT" ]
null
null
null
tests/test_pass.py
MisanthropicBit/pytest-pep257
cf9a6ff92132906a0851acdfa5a0ff422c46f8c0
[ "MIT" ]
null
null
null
tests/test_pass.py
MisanthropicBit/pytest-pep257
cf9a6ff92132906a0851acdfa5a0ff422c46f8c0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """Remembered the module's doc-string.""" # D100: Missing module doc-string import sys import pytest # Missing doc-string from method class class pass_D101(object): """D100 at public class level.""" def pass_D102(self): """Doc-string from public method.""" pass def pass_D103(): """Doc-string from public function. D203, D204: Blank lines before and after public function """ pass def pass_D209(): """Multi-line doc-string should be... ...on separate lines. """ def pass_D301(): r"""Use raw string literals if any backslashes are present. Like this \ """ pass @pytest.mark.skipif(sys.version_info[0] >= 3, reason='Test only valid for Python 2') def pass_D302(): u"""Use Unicode string literals if there are any Unicode characters... ...in your strîng """ pass def pass_D401(): """Use imperative descriptions.""" pass
17.65
77
0.583569
133
1,059
4.586466
0.609023
0.088525
0.063934
0.062295
0
0
0
0
0
0
0
0.049465
0.293673
1,059
59
78
17.949153
0.766043
0.508971
0
0.277778
0
0
0.074271
0
0
0
0
0
0
1
0.333333
false
0.666667
0.111111
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
2
b269e7f5e1875e2d1703f245135f922df8ed97c0
215
py
Python
UVa 623 - 500 factorial/sample/main.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
1
2020-11-24T03:17:21.000Z
2020-11-24T03:17:21.000Z
UVa 623 - 500 factorial/sample/main.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
null
null
null
UVa 623 - 500 factorial/sample/main.py
tadvi/uva
0ac0cbdf593879b4fb02a3efc09adbb031cb47d5
[ "MIT" ]
1
2021-04-11T16:22:31.000Z
2021-04-11T16:22:31.000Z
factorial = [0] * 600 a = 1 for i in range(1, 500 + 1): a *= i factorial[i] = a print factorial f = open('input.txt') for line in f: n = int(line) print(line.strip() + '!') print(factorial[n])
15.357143
29
0.548837
36
215
3.277778
0.527778
0.237288
0
0
0
0
0
0
0
0
0
0.064103
0.274419
215
13
30
16.538462
0.692308
0
0
0
0
0
0.046512
0
0
0
0
0
0
0
null
null
0
0
null
null
0.272727
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
1
0
0
0
0
0
0
0
0
2
b26e852e04c6b3232ebadac94f256b5574ff13ef
3,479
py
Python
runner_gridworld.py
willwhitney/exploration-reimplementation
5e2ca54119529b8bf9235bfbad92e38a6781fbd5
[ "Apache-2.0" ]
2
2020-08-24T15:59:59.000Z
2020-08-24T17:03:30.000Z
runner_gridworld.py
willwhitney/exploration-reimplementation
5e2ca54119529b8bf9235bfbad92e38a6781fbd5
[ "Apache-2.0" ]
null
null
null
runner_gridworld.py
willwhitney/exploration-reimplementation
5e2ca54119529b8bf9235bfbad92e38a6781fbd5
[ "Apache-2.0" ]
null
null
null
import itertools import os import subprocess import sys import asyncio import copy import glob import shutil from pathlib import Path from runner_utils import main, slurm_main, construct_varying_keys, construct_jobs local = '--local' in sys.argv greene = '--greene' in sys.argv dry_run = '--dry-run' in sys.argv GPUS = [0, 1, 2, 3] MULTIPLEX = 4 # basename = "grid40_warmstart_v6_lowlr_updates1" # grid = [ # { # # define the task # "_main": ["main_gridworld_warmstart.py"], # "eval_every": [1], # "env": ["gridworld"], # "task": ["default"], # "env_size": [40], # "max_steps": [100], # "max_episodes": [500], # "video_every": [99999999], # "warmup_steps": [2000], # "seed": list(range(4)), # "no_exploration": [True, False], # # density settings # "n_state_bins": [40], # "n_action_bins": [4], # # novelty Q settings # "uniform_update_candidates": [True], # "n_updates_per_step": [10], # "update_target_every": [10], # # task policy settings # "policy_updates_per_step": [1], # "policy_lr": [1e-4], # }, # { # # define the task # "_main": ["main_gridworld_warmstart_bbe.py"], # "eval_every": [1], # "env": ["gridworld"], # "task": ["default"], # "env_size": [40], # "max_steps": [100], # "max_episodes": [500], # "video_every": [99999999], # "warmup_steps": [2000], # "seed": list(range(4)), # # density settings # "n_state_bins": [40], # "n_action_bins": [4], # # bbe settings # "bonus_scale": [0.1, 1,], # # task policy settings # "policy_updates_per_step": [1], # "policy_lr": [1e-4], # }, # ] basename = "neurips_grid40_visualize_v2_longer" grid = [ { # define the task "_main": ["main.py"], "eval_every": [1], "env": ["gridworld"], "task": ["default"], "env_size": [40], "max_steps": [100], "max_episodes": [1000], "save_replay_every": [20], "video_every": [99999999], "seed": list(range(1)), "no_exploration": [True, False], # density settings "n_state_bins": [40], "n_action_bins": [4], # novelty Q settings "uniform_update_candidates": [True], "n_updates_per_step": [10], "update_target_every": [10], # task policy settings "policy_updates_per_step": [1], "policy_lr": [1e-4], }, { # define the task "_main": ["main_bbe.py"], "eval_every": [1], "env": ["gridworld"], "task": ["default"], "env_size": [40], "max_steps": [100], "max_episodes": [1000], "save_replay_every": [20], "video_every": [99999999], "seed": list(range(1)), # density settings "n_state_bins": [40], "n_action_bins": [4], # bbe settings "bonus_scale": [1,], # task policy settings "policy_updates_per_step": [1], "policy_lr": [1e-4], }, ] if __name__ == '__main__': jobs = construct_jobs(grid, basename) if local: asyncio.run(main(jobs, MULTIPLEX=MULTIPLEX, GPUS=GPUS, dry_run=dry_run)) else: slurm_main(jobs, MULTIPLEX=MULTIPLEX, greene=greene, dry_run=dry_run)
24.85
81
0.522851
380
3,479
4.486842
0.263158
0.021114
0.049267
0.039883
0.707331
0.707331
0.690323
0.656892
0.656892
0.656892
0
0.055648
0.307847
3,479
139
82
25.028777
0.652409
0.440069
0
0.42623
0
0
0.256506
0.055762
0
0
0
0
0
1
0
false
0
0.163934
0
0.163934
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
b287e3e032793cec6d094475465f9e5a95b45894
623
py
Python
_rf_gbdt_fea.py
ghandzhipeng/kaggle-avazu
8ecb291c7a12bd91a8e545367e4f0ae532e72fbe
[ "Apache-2.0" ]
null
null
null
_rf_gbdt_fea.py
ghandzhipeng/kaggle-avazu
8ecb291c7a12bd91a8e545367e4f0ae532e72fbe
[ "Apache-2.0" ]
null
null
null
_rf_gbdt_fea.py
ghandzhipeng/kaggle-avazu
8ecb291c7a12bd91a8e545367e4f0ae532e72fbe
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np import scipy as sc import scipy.sparse as sp from sklearn.utils import check_random_state import pylab import sys import time import utils from utils import * import os from sklearn.datasets import dump_svmlight_file from joblib import dump, load t0tv_mx_save = load(utils.tmp_data_path + 't0tv_mx3.joblib_dat') t0tv_mx3 = t0tv_mx_save['t0tv_mx'] click_values = t0tv_mx_save['click'] day_values = t0tv_mx_save['day'] print "t0tv_mx3 loaded with shape", t0tv_mx3.shape dump_svmlight_file(t0tv_mx3,click_values, sys.argv[1]+'/rf_gbdt.dat',zero_based=True,multilabel=False) exit(1)
25.958333
102
0.805778
109
623
4.348624
0.46789
0.063291
0.084388
0.067511
0
0
0
0
0
0
0
0.030797
0.113965
623
23
103
27.086957
0.827899
0
0
0
0
0
0.11557
0
0
0
0
0
0
0
null
null
0
0.65
null
null
0.05
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
2
b28f2a772cf3a6bd5b569a2094d4137fa6da1909
2,313
py
Python
tests/test_servo.py
walchko/pyGeckoQuadruped
e95ab53297a5f8e57da2d9344b59f2efde5724ab
[ "MIT" ]
4
2019-02-08T00:47:32.000Z
2020-03-03T07:34:05.000Z
tests/test_servo.py
walchko/pyGeckoQuadruped
e95ab53297a5f8e57da2d9344b59f2efde5724ab
[ "MIT" ]
1
2016-07-02T21:57:36.000Z
2016-07-02T21:57:36.000Z
tests/test_servo.py
walchko/pyGeckoQuadruped
e95ab53297a5f8e57da2d9344b59f2efde5724ab
[ "MIT" ]
1
2016-08-08T23:32:29.000Z
2016-08-08T23:32:29.000Z
#!/usr/bin/env python ############################################## # The MIT License (MIT) # Copyright (c) 2016 Kevin Walchko # see LICENSE for full details ############################################## from __future__ import print_function from __future__ import division from nose.tools import raises import sys sys.path.insert(0, '..') from quadruped.Servo import Servo # from pyxl320 import DummySerial def test_limits(): s = Servo(15) s.setServoLimits(0, 0, 180) s.angle = 0; assert(s.angle == 0) s.angle = 45; assert(s.angle == 45) s.angle = 90; assert(s.angle == 90) s.angle = 180; assert(s.angle == 180) s.angle = 270; assert(s.angle == 180), "{}".format(s.angle) s.angle = -45; assert(s.angle == 0) s.angle = -90; assert(s.angle == 0) s.angle = -270; assert(s.angle == 0) s.setServoLimits(150, -90, 90) s.angle = 0; assert(s.angle == 0) s.angle = 45; assert(s.angle == 45) s.angle = 90; assert(s.angle == 90) s.angle = 180; assert(s.angle == 90) s.angle = 270; assert(s.angle == 90) s.angle = -45; assert(s.angle == -45) s.angle = -90; assert(s.angle == -90) s.angle = -270; assert(s.angle == -90) @raises(Exception) def test_fail2(): s = Servo(15) s.setServoLimits(0, 180, 0) # min > max ... error # def checks(): # check = lambda x, a, b: max(min(b, x), a) # print('0 in [0,180]:', check(0, 0, 180)) # print('90 in [0,180]:', check(90, 0, 180)) # print('180 in [0,180]:', check(180, 0, 180)) # print('-90 in [0,180]:', check(-90, 0, 180)) # print('-180 in [0,180]:', check(-180, 0, 180)) # print('--------------------') # print('these are wrong! Cannot reverse order') # print('0 in [180,0]:', check(0, 180, 0)) # print('45 in [180,0]:', check(45, 180, 0)) # print('90 in [180,0]:', check(90, 180, 0)) # print('180 in [180,0]:', check(180, 180, 0)) # print('-90 in [180,0]:', check(-90, 180, 0)) # print('-180 in [180,0]:', check(-180, 180, 0)) # print('--------------------') # print('0 in [-180,0]:', check(0, -180, 0)) # print('90 in [-180,0]:', check(90, -180, 0)) # print('180 in [-180,0]:', check(180, -180, 0)) # print('-90 in [-180,0]:', check(-90, -180, 0)) # print('-45 in [-180,0]:', check(-45, -180, 0)) # print('-180 in [-180,0]:', check(-180, -180, 0)) if __name__ == "__main__": print('run this with "nosetests -v test_servo.py"')
32.577465
60
0.558582
380
2,313
3.347368
0.194737
0.15566
0.150943
0.103774
0.630503
0.628931
0.525157
0.525157
0.525157
0.525157
0
0.157379
0.162127
2,313
70
61
33.042857
0.498968
0.47687
0
0.25
0
0
0.049541
0
0
0
0
0
0.5
1
0.0625
false
0
0.15625
0
0.21875
0.0625
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
2
b2ab54d13c2e0ba520c5e0bd2cd5ed55fbd66a6e
247
py
Python
output/models/nist_data/list_pkg/float_pkg/schema_instance/nistschema_sv_iv_list_float_min_length_3_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/float_pkg/schema_instance/nistschema_sv_iv_list_float_min_length_3_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/float_pkg/schema_instance/nistschema_sv_iv_list_float_min_length_3_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.list_pkg.float_pkg.schema_instance.nistschema_sv_iv_list_float_min_length_3_xsd.nistschema_sv_iv_list_float_min_length_3 import NistschemaSvIvListFloatMinLength3 __all__ = [ "NistschemaSvIvListFloatMinLength3", ]
41.166667
190
0.890688
32
247
6.15625
0.625
0.121827
0.142132
0.182741
0.335025
0.335025
0.335025
0.335025
0
0
0
0.017167
0.05668
247
5
191
49.4
0.828326
0
0
0
0
0
0.133603
0.133603
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
b2ae4aa2891e937d746141b8d177bad92bdf2432
3,323
py
Python
exec/compressible_mui/RUN_COadsPt111_SF/params.py
etpalmer63/FHDeX
c79a8d4b817a269e294304c2caef830fc41ed0f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
exec/compressible_mui/RUN_COadsPt111_SF/params.py
etpalmer63/FHDeX
c79a8d4b817a269e294304c2caef830fc41ed0f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
exec/compressible_mui/RUN_COadsPt111_SF/params.py
etpalmer63/FHDeX
c79a8d4b817a269e294304c2caef830fc41ed0f9
[ "BSD-3-Clause-LBNL" ]
null
null
null
import math # cgs units Runiv = 8.31446261815324e7 # universal gas constant kB = 1.38064852e-16 # Boltzmann constant Navo = 6.0221409e23 # Avogadro constant ########## # molecular weights M1 = 28.01 # CO M2 = 4.0026 # He print "- molecular masses: [%.2f, %.2f]" % (M1,M2) # mass fractions Y1 = 0.2 Y2 = 1-Y1 print "- mass fractions: [%.3f, %.3f]" % (Y1,Y2) # mole fractions tmp = Y1/M1+Y2/M2 X1 = Y1/M1/tmp X2 = Y2/M2/tmp print "- mole fractions: [%.3f, %.3f]" % (X1,X2) # average molecular weight Mavg = 1/(Y1/M1+Y2/M2) mavg = Mavg/Navo print "- average molecular weight = %.2f" % Mavg print "- average mass of a gas molecule = %e\n" % mavg ########## temp = 1000. # room temperature pres = 1.01325e6 # atmospheric pressure rho = pres*Mavg/Runiv/temp # total mass density print "- temperature = %f" % temp print "- pressure = %e" % pres print "- total mass density = %e\n" % rho ########## ntot = pres/kB/temp n1 = X1*ntot n2 = X2*ntot m1 = M1/Navo m2 = M2/Navo print "- total number density = %e" % ntot print "- number density of spec1 = %e" % n1 print "- number density of spec2 = %e\n" % n2 ########## lat_const = 2.8e-8 n1x = 300 n1y = 150 dx = n1x*lat_const dy = n1y*lat_const*math.sqrt(3) dz = dx dV = dx*dy*dz n2x = 8 n2y = 8 n2z = 8 Lx = n2x*dx Ly = n2y*dy Lz = n2z*dz print "- lattice constant for Pt(111): %e" % lat_const print "- dx (FHD) = %e" % dx print "- dy (FHD) = %e" % dy print "- dz (FHD) = %e" % dz print "- dV (FHD) = %e" % dV print "- Lx = %e" % Lx print "- Ly = %e" % Ly print "- Lz = %e\n" % Lz ########## n1s = 2*n1x*n1y print "- total number of sites per dxFHD*dyFHD = %d" % n1s Ntot = ntot*dV N1 = n1*dV N2 = n2*dV print "- total number of gas molecules in dV = %.3e" % Ntot print "- number of gas molecules of spec1 in dV = %.3e" % N1 print "- number of gas molecules of spec2 in dV = %.3e\n" % N2 ########## p1torr = pres*X1/1.01325e6*760 k1ads = 2e5*p1torr print "- p1 in torr = %e" % p1torr print "- k1ads = %e" % k1ads k1des = 1.25e15*math.exp(-1.514/(8.617e-5*temp)) print "- temp in K = %e" % temp print "- k1des = %e" % k1des theta1 = k1ads/(k1ads+k1des) print "- eq coverage of spec1: %e\n" % theta1 ########## dt = 1e-12 print "- dt (FHD) = %e" % dt print "- max mean number of ads events per dxFHD*dyFHD per dt = %e" % (n1s*k1ads*dt) print "- max mean number of des events per dxFHD*dyFHD per dt = %e\n" % (n1s*k1des*dt) ########## rho1 = n1*m1 rho2 = n2*m2 drho1sq = rho1**2/N1 drho2sq = rho2**2/N2 drhosq = drho1sq+drho2sq djasq = rho*kB*temp/dV dEsq = (kB*temp)**2/dV*(2.5*3.5*rho1/m1+1.5*2.5*rho2/m2) dTsq = temp**2/dV/(2.5*n1+1.5*n2) print "drhosq = %e" % drhosq print "drho1sq = %e" % drho1sq print "drho2sq = %e" % drho2sq print "djasq = %e\n" % djasq print "drhosq*dV = %e\t%e\t%e\t%e" % (drhosq*dV,2*drhosq*dV,0.5*drhosq*dV,1.5*drhosq*dV) print "drho1sq*dV = %e\t%e\t%e\t%e" % (drho1sq*dV,2*drho1sq*dV,0.5*drho1sq*dV,1.5*drho1sq*dV) print "drho2sq*dV = %e\t%e\t%e\t%e" % (drho2sq*dV,2*drho2sq*dV,0.5*drho2sq*dV,1.5*drho2sq*dV) print "djasq*dV = %e\t%e\t%e\t%e" % (djasq*dV,2*djasq*dV,0.5*djasq*dV,1.5*djasq*dV) print "dEsq*dV = %e\t%e\t%e\t%e" % (dEsq*dV,2*dEsq*dV,0.5*dEsq*dV,1.5*dEsq*dV) print "dTsq*dV = %e\t%e\t%e\t%e" % (dTsq*dV,2*dTsq*dV,0.5*dTsq*dV,1.5*dTsq*dV)
22.760274
93
0.596148
608
3,323
3.251645
0.222039
0.018209
0.027314
0.024279
0.11128
0.102175
0.052605
0.027314
0
0
0
0.10394
0.198014
3,323
145
94
22.917241
0.637899
0.061992
0
0
0
0
0.347006
0
0
0
0
0
0
0
null
null
0
0.01087
null
null
0.445652
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
2
a2344dc5283aa724b353b60ac4d0eed2a972aafc
4,558
py
Python
simplesmsforms/smsform.py
AndreLesa/simplesmsforms
6ea4971d38b1e8ce6c77e3fee675d9b30d39777b
[ "MIT" ]
null
null
null
simplesmsforms/smsform.py
AndreLesa/simplesmsforms
6ea4971d38b1e8ce6c77e3fee675d9b30d39777b
[ "MIT" ]
null
null
null
simplesmsforms/smsform.py
AndreLesa/simplesmsforms
6ea4971d38b1e8ce6c77e3fee675d9b30d39777b
[ "MIT" ]
null
null
null
import re import itertools from smsform_exceptions import SMSFieldException, MissingRequiredFieldException # SMS Form def to_string(item): if isinstance(item, list): return ",".join(item) if isinstance(item, str): return item class SMSForm(object): """The SMS form represents the entire text SMS passed in from the user as a represented as a string. It contains all the necessary declarion of the expected SMS format, It is the entry point for all SMS processing and will initate the validation and processing of a text message. USAGE class MotherForm(SMSForm): keyword = 'register' first_name = PrefixField(prefixes=fn) last_name = PrefixField(prefixes=ln) age = PrefixField(ag) ward = PrefixField(prefixes=wd) """ keyword = "" def parse_text(self, text=None): if not text: text = self.original_text """parses the passed in text to return a nice list of the passed in fields WITHOUT the form keyword""" fields = text.split(" ") return [field.strip() for field in fields[1:] if field != ""] def bind_fields(self, text_string): """Binds the passed in text fields with the form fields and returns a dict that looks like: {field_name: ("prefix", "value")} """ """ bound_fields = itertools.izip_longest( self.get_fields(), text_fields, fillvalue=" ") """ bound_fields = () for expected_field in self.get_fields(): for prefix_regex in expected_field.get_field_regex(): compiled_regex = re.compile(prefix_regex["regex"], re.IGNORECASE) match = compiled_regex.findall(text_string) if match: bound_field = ( expected_field, (prefix_regex["prefix"], to_string(match)) ) bound_fields += (bound_field, ) expected_field.accepted_prefix = prefix_regex["prefix"] break return bound_fields def get_fields(self): """Must return a list of the fields to be included in the form""" raise NotImplementedError def validate_form(self, bound_fields): """Responsible for converting fields to valid python objects and doing any field based validation TODO: Terrible doing validation and conversion to python in this method""" passed_validation = True errors = [] python_fields = () bound_fields_dict = self.bound_fields_to_bound_dict(bound_fields) for field in self.get_fields(): field_name = field.name try: value = bound_fields_dict[field]['value'] prefix = bound_fields_dict[field]['prefix'] valid_obj = field.process_field(value, prefix) except SMSFieldException, e: errors.append(e) passed_validation = False except KeyError, e: if field.required: errors.append(MissingRequiredFieldException(field_name)) passed_validation = False else: pass else: python_fields += ((field, (prefix, valid_obj)),) return passed_validation, python_fields, errors def bound_fields_to_bound_dict(self, bound_fields): bound_dict = {} for bound_field in bound_fields: field_name = bound_field[0] prefix, value = bound_field[1][0], bound_field[1][1] bound_dict[field_name] = {"value":value, "prefix":prefix} return bound_dict def process_form(self, original_text): bound_fields = self.bind_fields(original_text) passed_validation, python_fields, errors = self.validate_form(bound_fields) #The bound fields in here have a structure that binds the actual field #functions to the field and prefix. We transform that to (field name, (prefix, text)) transformed_bound_fields = () for bound_field in python_fields: prefix_with_text = (bound_field[1][0], bound_field[1][1]) transformed_bound_fields += (( (bound_field[0].name, prefix_with_text) ,)) return passed_validation, transformed_bound_fields, errors
38.302521
93
0.594559
514
4,558
5.075875
0.276265
0.080107
0.016865
0.015332
0.076658
0.018398
0.018398
0.018398
0
0
0
0.003592
0.328214
4,558
118
94
38.627119
0.848465
0.035323
0
0.055556
0
0
0.013133
0
0
0
0
0.008475
0
0
null
null
0.097222
0.041667
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
0
0
1
0
0
1
0
0
0
0
0
2
a2451097d54e716a196161c6224dc9696fa3d3e0
14,062
py
Python
terra_sdk/protobuf/cosmos/auth/v1beta1/auth_pb2.py
sejalsahni/terra.py
0fd84969441c58427a21448520697c3ab3ec2d0c
[ "MIT" ]
24
2021-05-30T05:48:33.000Z
2021-10-07T04:47:15.000Z
terra_sdk/protobuf/cosmos/auth/v1beta1/auth_pb2.py
sejalsahni/terra.py
0fd84969441c58427a21448520697c3ab3ec2d0c
[ "MIT" ]
18
2021-05-30T09:05:26.000Z
2021-10-17T07:12:12.000Z
terra_sdk/protobuf/cosmos/auth/v1beta1/auth_pb2.py
sejalsahni/terra.py
0fd84969441c58427a21448520697c3ab3ec2d0c
[ "MIT" ]
10
2021-02-11T00:56:04.000Z
2021-05-27T08:37:49.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: cosmos/auth/v1beta1/auth.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from cosmos_proto import cosmos_pb2 as cosmos__proto_dot_cosmos__pb2 from gogoproto import gogo_pb2 as gogoproto_dot_gogo__pb2 from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name="cosmos/auth/v1beta1/auth.proto", package="cosmos.auth.v1beta1", syntax="proto3", serialized_options=b"Z)github.com/cosmos/cosmos-sdk/x/auth/types", create_key=_descriptor._internal_create_key, serialized_pb=b'\n\x1e\x63osmos/auth/v1beta1/auth.proto\x12\x13\x63osmos.auth.v1beta1\x1a\x19\x63osmos_proto/cosmos.proto\x1a\x14gogoproto/gogo.proto\x1a\x19google/protobuf/any.proto"\xd3\x01\n\x0b\x42\x61seAccount\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12T\n\x07pub_key\x18\x02 \x01(\x0b\x32\x14.google.protobuf.AnyB-\xea\xde\x1f\x14public_key,omitempty\xf2\xde\x1f\x11yaml:"public_key"\x12\x31\n\x0e\x61\x63\x63ount_number\x18\x03 \x01(\x04\x42\x19\xf2\xde\x1f\x15yaml:"account_number"\x12\x10\n\x08sequence\x18\x04 \x01(\x04:\x18\x88\xa0\x1f\x00\x98\xa0\x1f\x00\xe8\xa0\x1f\x00\xd2\xb4-\x08\x41\x63\x63ountI"\xa3\x01\n\rModuleAccount\x12S\n\x0c\x62\x61se_account\x18\x01 \x01(\x0b\x32 .cosmos.auth.v1beta1.BaseAccountB\x1b\xd0\xde\x1f\x01\xf2\xde\x1f\x13yaml:"base_account"\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0bpermissions\x18\x03 \x03(\t:\x1a\x88\xa0\x1f\x00\x98\xa0\x1f\x00\xd2\xb4-\x0eModuleAccountI"\xff\x02\n\x06Params\x12;\n\x13max_memo_characters\x18\x01 \x01(\x04\x42\x1e\xf2\xde\x1f\x1ayaml:"max_memo_characters"\x12-\n\x0ctx_sig_limit\x18\x02 \x01(\x04\x42\x17\xf2\xde\x1f\x13yaml:"tx_sig_limit"\x12?\n\x15tx_size_cost_per_byte\x18\x03 \x01(\x04\x42 \xf2\xde\x1f\x1cyaml:"tx_size_cost_per_byte"\x12[\n\x17sig_verify_cost_ed25519\x18\x04 \x01(\x04\x42:\xe2\xde\x1f\x14SigVerifyCostED25519\xf2\xde\x1f\x1eyaml:"sig_verify_cost_ed25519"\x12\x61\n\x19sig_verify_cost_secp256k1\x18\x05 \x01(\x04\x42>\xe2\xde\x1f\x16SigVerifyCostSecp256k1\xf2\xde\x1f yaml:"sig_verify_cost_secp256k1":\x08\xe8\xa0\x1f\x01\x98\xa0\x1f\x00\x42+Z)github.com/cosmos/cosmos-sdk/x/auth/typesb\x06proto3', dependencies=[ cosmos__proto_dot_cosmos__pb2.DESCRIPTOR, gogoproto_dot_gogo__pb2.DESCRIPTOR, google_dot_protobuf_dot_any__pb2.DESCRIPTOR, ], ) _BASEACCOUNT = _descriptor.Descriptor( name="BaseAccount", full_name="cosmos.auth.v1beta1.BaseAccount", filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="address", full_name="cosmos.auth.v1beta1.BaseAccount.address", index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="pub_key", full_name="cosmos.auth.v1beta1.BaseAccount.pub_key", index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\352\336\037\024public_key,omitempty\362\336\037\021yaml:"public_key"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="account_number", full_name="cosmos.auth.v1beta1.BaseAccount.account_number", index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\362\336\037\025yaml:"account_number"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sequence", full_name="cosmos.auth.v1beta1.BaseAccount.sequence", index=3, number=4, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], serialized_options=b"\210\240\037\000\230\240\037\000\350\240\037\000\322\264-\010AccountI", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=132, serialized_end=343, ) _MODULEACCOUNT = _descriptor.Descriptor( name="ModuleAccount", full_name="cosmos.auth.v1beta1.ModuleAccount", filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="base_account", full_name="cosmos.auth.v1beta1.ModuleAccount.base_account", index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\320\336\037\001\362\336\037\023yaml:"base_account"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="name", full_name="cosmos.auth.v1beta1.ModuleAccount.name", index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode("utf-8"), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="permissions", full_name="cosmos.auth.v1beta1.ModuleAccount.permissions", index=2, number=3, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], serialized_options=b"\210\240\037\000\230\240\037\000\322\264-\016ModuleAccountI", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=346, serialized_end=509, ) _PARAMS = _descriptor.Descriptor( name="Params", full_name="cosmos.auth.v1beta1.Params", filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name="max_memo_characters", full_name="cosmos.auth.v1beta1.Params.max_memo_characters", index=0, number=1, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\362\336\037\032yaml:"max_memo_characters"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tx_sig_limit", full_name="cosmos.auth.v1beta1.Params.tx_sig_limit", index=1, number=2, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\362\336\037\023yaml:"tx_sig_limit"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="tx_size_cost_per_byte", full_name="cosmos.auth.v1beta1.Params.tx_size_cost_per_byte", index=2, number=3, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\362\336\037\034yaml:"tx_size_cost_per_byte"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sig_verify_cost_ed25519", full_name="cosmos.auth.v1beta1.Params.sig_verify_cost_ed25519", index=3, number=4, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\342\336\037\024SigVerifyCostED25519\362\336\037\036yaml:"sig_verify_cost_ed25519"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), _descriptor.FieldDescriptor( name="sig_verify_cost_secp256k1", full_name="cosmos.auth.v1beta1.Params.sig_verify_cost_secp256k1", index=4, number=5, type=4, cpp_type=4, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\342\336\037\026SigVerifyCostSecp256k1\362\336\037 yaml:"sig_verify_cost_secp256k1"', file=DESCRIPTOR, create_key=_descriptor._internal_create_key, ), ], extensions=[], nested_types=[], enum_types=[], serialized_options=b"\350\240\037\001\230\240\037\000", is_extendable=False, syntax="proto3", extension_ranges=[], oneofs=[], serialized_start=512, serialized_end=895, ) _BASEACCOUNT.fields_by_name[ "pub_key" ].message_type = google_dot_protobuf_dot_any__pb2._ANY _MODULEACCOUNT.fields_by_name["base_account"].message_type = _BASEACCOUNT DESCRIPTOR.message_types_by_name["BaseAccount"] = _BASEACCOUNT DESCRIPTOR.message_types_by_name["ModuleAccount"] = _MODULEACCOUNT DESCRIPTOR.message_types_by_name["Params"] = _PARAMS _sym_db.RegisterFileDescriptor(DESCRIPTOR) BaseAccount = _reflection.GeneratedProtocolMessageType( "BaseAccount", (_message.Message,), { "DESCRIPTOR": _BASEACCOUNT, "__module__": "cosmos.auth.v1beta1.auth_pb2" # @@protoc_insertion_point(class_scope:cosmos.auth.v1beta1.BaseAccount) }, ) _sym_db.RegisterMessage(BaseAccount) ModuleAccount = _reflection.GeneratedProtocolMessageType( "ModuleAccount", (_message.Message,), { "DESCRIPTOR": _MODULEACCOUNT, "__module__": "cosmos.auth.v1beta1.auth_pb2" # @@protoc_insertion_point(class_scope:cosmos.auth.v1beta1.ModuleAccount) }, ) _sym_db.RegisterMessage(ModuleAccount) Params = _reflection.GeneratedProtocolMessageType( "Params", (_message.Message,), { "DESCRIPTOR": _PARAMS, "__module__": "cosmos.auth.v1beta1.auth_pb2" # @@protoc_insertion_point(class_scope:cosmos.auth.v1beta1.Params) }, ) _sym_db.RegisterMessage(Params) DESCRIPTOR._options = None _BASEACCOUNT.fields_by_name["pub_key"]._options = None _BASEACCOUNT.fields_by_name["account_number"]._options = None _BASEACCOUNT._options = None _MODULEACCOUNT.fields_by_name["base_account"]._options = None _MODULEACCOUNT._options = None _PARAMS.fields_by_name["max_memo_characters"]._options = None _PARAMS.fields_by_name["tx_sig_limit"]._options = None _PARAMS.fields_by_name["tx_size_cost_per_byte"]._options = None _PARAMS.fields_by_name["sig_verify_cost_ed25519"]._options = None _PARAMS.fields_by_name["sig_verify_cost_secp256k1"]._options = None _PARAMS._options = None # @@protoc_insertion_point(module_scope)
36.715405
1,611
0.640094
1,622
14,062
5.225031
0.146732
0.036814
0.050147
0.039646
0.64826
0.598466
0.497699
0.4741
0.461357
0.441062
0
0.076096
0.252382
14,062
382
1,612
36.811518
0.730049
0.030579
0
0.674157
1
0.011236
0.255893
0.224906
0
0
0
0
0
1
0
false
0
0.019663
0
0.019663
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a25e2468878cc9d0b4aa2d0013af63bd5291d66b
490
py
Python
14-sitstema-archivos/eliminar_ficheros.py
tulcas/master-python
ddac8aa1bf3e6448fe237eac239d27ce3fda705c
[ "MIT" ]
null
null
null
14-sitstema-archivos/eliminar_ficheros.py
tulcas/master-python
ddac8aa1bf3e6448fe237eac239d27ce3fda705c
[ "MIT" ]
null
null
null
14-sitstema-archivos/eliminar_ficheros.py
tulcas/master-python
ddac8aa1bf3e6448fe237eac239d27ce3fda705c
[ "MIT" ]
null
null
null
# Eliminar from io import open import pathlib import shutil import os # Eliminar ''' ruta_origen = str( pathlib.Path().absolute() ) + "/fichero_texto_movido.txt" ruta_origen = str( pathlib.Path().absolute() ) + "/fichero_texto_copia.txt" os.remove(ruta_origen) ''' # Comprobar si existe import os.path # print(os.path.abspath("../") ) if os.path.isfile(os.path.abspath("./" + "fichero_texto_copia.txt") ) == True: print(f"Existe el fichero ") else: print("El ficheno NO existe")
22.272727
78
0.697959
69
490
4.826087
0.463768
0.072072
0.078078
0.12012
0.264264
0.264264
0.264264
0.264264
0
0
0
0
0.136735
490
22
79
22.272727
0.787234
0.138776
0
0
0
0
0.268085
0.097872
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
0.222222
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
a270c5fabad1d8ca50773d39bcce2bbf778ecade
6,514
py
Python
darling_ansible/python_venv/lib/python3.7/site-packages/oci/core/models/dedicated_vm_host_instance_summary.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
null
null
null
darling_ansible/python_venv/lib/python3.7/site-packages/oci/core/models/dedicated_vm_host_instance_summary.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
null
null
null
darling_ansible/python_venv/lib/python3.7/site-packages/oci/core/models/dedicated_vm_host_instance_summary.py
revnav/sandbox
f9c8422233d093b76821686b6c249417502cf61d
[ "Apache-2.0" ]
1
2020-06-25T03:12:58.000Z
2020-06-25T03:12:58.000Z
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class DedicatedVmHostInstanceSummary(object): """ Condensed instance data when listing instances on a dedicated VM host. """ def __init__(self, **kwargs): """ Initializes a new DedicatedVmHostInstanceSummary object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class): :param availability_domain: The value to assign to the availability_domain property of this DedicatedVmHostInstanceSummary. :type availability_domain: str :param compartment_id: The value to assign to the compartment_id property of this DedicatedVmHostInstanceSummary. :type compartment_id: str :param instance_id: The value to assign to the instance_id property of this DedicatedVmHostInstanceSummary. :type instance_id: str :param shape: The value to assign to the shape property of this DedicatedVmHostInstanceSummary. :type shape: str :param time_created: The value to assign to the time_created property of this DedicatedVmHostInstanceSummary. :type time_created: datetime """ self.swagger_types = { 'availability_domain': 'str', 'compartment_id': 'str', 'instance_id': 'str', 'shape': 'str', 'time_created': 'datetime' } self.attribute_map = { 'availability_domain': 'availabilityDomain', 'compartment_id': 'compartmentId', 'instance_id': 'instanceId', 'shape': 'shape', 'time_created': 'timeCreated' } self._availability_domain = None self._compartment_id = None self._instance_id = None self._shape = None self._time_created = None @property def availability_domain(self): """ **[Required]** Gets the availability_domain of this DedicatedVmHostInstanceSummary. The availability domain the virtual machine instance is running in. Example: `Uocm:PHX-AD-1` :return: The availability_domain of this DedicatedVmHostInstanceSummary. :rtype: str """ return self._availability_domain @availability_domain.setter def availability_domain(self, availability_domain): """ Sets the availability_domain of this DedicatedVmHostInstanceSummary. The availability domain the virtual machine instance is running in. Example: `Uocm:PHX-AD-1` :param availability_domain: The availability_domain of this DedicatedVmHostInstanceSummary. :type: str """ self._availability_domain = availability_domain @property def compartment_id(self): """ **[Required]** Gets the compartment_id of this DedicatedVmHostInstanceSummary. The OCID of the compartment that contains the virtual machine instance. :return: The compartment_id of this DedicatedVmHostInstanceSummary. :rtype: str """ return self._compartment_id @compartment_id.setter def compartment_id(self, compartment_id): """ Sets the compartment_id of this DedicatedVmHostInstanceSummary. The OCID of the compartment that contains the virtual machine instance. :param compartment_id: The compartment_id of this DedicatedVmHostInstanceSummary. :type: str """ self._compartment_id = compartment_id @property def instance_id(self): """ **[Required]** Gets the instance_id of this DedicatedVmHostInstanceSummary. The OCID of the virtual machine instance. :return: The instance_id of this DedicatedVmHostInstanceSummary. :rtype: str """ return self._instance_id @instance_id.setter def instance_id(self, instance_id): """ Sets the instance_id of this DedicatedVmHostInstanceSummary. The OCID of the virtual machine instance. :param instance_id: The instance_id of this DedicatedVmHostInstanceSummary. :type: str """ self._instance_id = instance_id @property def shape(self): """ **[Required]** Gets the shape of this DedicatedVmHostInstanceSummary. The shape of the VM instance. :return: The shape of this DedicatedVmHostInstanceSummary. :rtype: str """ return self._shape @shape.setter def shape(self, shape): """ Sets the shape of this DedicatedVmHostInstanceSummary. The shape of the VM instance. :param shape: The shape of this DedicatedVmHostInstanceSummary. :type: str """ self._shape = shape @property def time_created(self): """ **[Required]** Gets the time_created of this DedicatedVmHostInstanceSummary. The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z` :return: The time_created of this DedicatedVmHostInstanceSummary. :rtype: datetime """ return self._time_created @time_created.setter def time_created(self, time_created): """ Sets the time_created of this DedicatedVmHostInstanceSummary. The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z` :param time_created: The time_created of this DedicatedVmHostInstanceSummary. :type: datetime """ self._time_created = time_created def __repr__(self): return formatted_flat_dict(self) def __eq__(self, other): if other is None: return False return self.__dict__ == other.__dict__ def __ne__(self, other): return not self == other
32.08867
245
0.663033
711
6,514
5.890295
0.208158
0.037249
0.2149
0.095511
0.569484
0.457259
0.347182
0.287011
0.260267
0.260267
0
0.013014
0.268652
6,514
202
246
32.247525
0.866079
0.555112
0
0.080645
0
0
0.089438
0
0
0
0
0
0
1
0.225806
false
0
0.032258
0.032258
0.419355
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
1
0
0
0
0
0
0
0
2
a28f3c71132d4ce15dcadac0473621eb7523eaf9
84
py
Python
src/sqlizer/filetype.py
sqlizer-io/sqlizer-client-py
6fccd4e51bad8ee74008298d10fa17d108fb6d96
[ "MIT" ]
11
2021-05-12T15:45:25.000Z
2022-02-27T22:40:51.000Z
src/sqlizer/filetype.py
sqlizer-io/sqlizer-client-py
6fccd4e51bad8ee74008298d10fa17d108fb6d96
[ "MIT" ]
1
2021-10-06T08:46:07.000Z
2021-10-06T08:46:07.000Z
src/sqlizer/filetype.py
sqlizer-io/sqlizer-client-py
6fccd4e51bad8ee74008298d10fa17d108fb6d96
[ "MIT" ]
null
null
null
class FileType: CSV = 'csv' XLSX = 'xlsx' JSON = 'json' XML = 'xml'
14
17
0.488095
10
84
4.1
0.6
0
0
0
0
0
0
0
0
0
0
0
0.357143
84
6
18
14
0.759259
0
0
0
0
0
0.166667
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a2922fa9ef26a731e80e38f44acec7c14a2058f6
37,972
py
Python
mps/countries.py
Smarties89/mps
c3885329ea9ea52c1d60559658df55ba01b3b612
[ "MIT" ]
2
2015-10-08T22:06:18.000Z
2017-04-30T18:03:41.000Z
mps/countries.py
Smarties89/mps
c3885329ea9ea52c1d60559658df55ba01b3b612
[ "MIT" ]
null
null
null
mps/countries.py
Smarties89/mps
c3885329ea9ea52c1d60559658df55ba01b3b612
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- countries_data = [ { 'name': u'Afghanistan', 'alpha2': u'AF', 'alpha3': u'AFG', 'numeric': 4, 'independent': True, }, { 'name': u'Åland Islands', 'alpha2': u'AX', 'alpha3': u'ALA', 'numeric': 248, 'independent': False, }, { 'name': u'Albania', 'alpha2': u'AL', 'alpha3': u'ALB', 'numeric': 8, 'independent': True, }, { 'name': u'Algeria', 'alpha2': u'DZ', 'alpha3': u'DZA', 'numeric': 12, 'independent': True, }, { 'name': u'American Samoa', 'alpha2': u'AS', 'alpha3': u'ASM', 'numeric': 16, 'independent': False, }, { 'name': u'Andorra', 'alpha2': u'AD', 'alpha3': u'AND', 'numeric': 20, 'independent': True, }, { 'name': u'Angola', 'alpha2': u'AO', 'alpha3': u'AGO', 'numeric': 24, 'independent': True, }, { 'name': u'Anguilla', 'alpha2': u'AI', 'alpha3': u'AIA', 'numeric': 660, 'independent': False, }, { 'name': u'Antarctica', 'alpha2': u'AQ', 'alpha3': u'ATA', 'numeric': 10, 'independent': False, }, { 'name': u'Antigua and Barbuda', 'alpha2': u'AG', 'alpha3': u'ATG', 'numeric': 28, 'independent': True, }, { 'name': u'Argentina', 'alpha2': u'AR', 'alpha3': u'ARG', 'numeric': 32, 'independent': True, }, { 'name': u'Armenia', 'alpha2': u'AM', 'alpha3': u'ARM', 'numeric': 51, 'independent': True, }, { 'name': u'Aruba', 'alpha2': u'AW', 'alpha3': u'ABW', 'numeric': 533, 'independent': False, }, { 'name': u'Australia', 'alpha2': u'AU', 'alpha3': u'AUS', 'numeric': 36, 'independent': True, }, { 'name': u'Austria', 'alpha2': u'AT', 'alpha3': u'AUT', 'numeric': 40, 'independent': True, }, { 'name': u'Azerbaijan', 'alpha2': u'AZ', 'alpha3': u'AZE', 'numeric': 31, 'independent': True, }, { 'name': u'Bahamas', 'alpha2': u'BS', 'alpha3': u'BHS', 'numeric': 44, 'independent': True, }, { 'name': u'Bahrain', 'alpha2': u'BH', 'alpha3': u'BHR', 'numeric': 48, 'independent': True, }, { 'name': u'Bangladesh', 'alpha2': u'BD', 'alpha3': u'BGD', 'numeric': 50, 'independent': True, }, { 'name': u'Barbados', 'alpha2': u'BB', 'alpha3': u'BRB', 'numeric': 52, 'independent': True, }, { 'name': u'Belarus', 'alpha2': u'BY', 'alpha3': u'BLR', 'numeric': 112, 'independent': True, }, { 'name': u'Belgium', 'alpha2': u'BE', 'alpha3': u'BEL', 'numeric': 56, 'independent': True, }, { 'name': u'Belize', 'alpha2': u'BZ', 'alpha3': u'BLZ', 'numeric': 84, 'independent': True, }, { 'name': u'Benin', 'alpha2': u'BJ', 'alpha3': u'BEN', 'numeric': 204, 'independent': True, }, { 'name': u'Bermuda', 'alpha2': u'BM', 'alpha3': u'BMU', 'numeric': 60, 'independent': False, }, { 'name': u'Bhutan', 'alpha2': u'BT', 'alpha3': u'BTN', 'numeric': 64, 'independent': True, }, { 'name': u'Bolivia (Plurinational State of)', 'alpha2': u'BO', 'alpha3': u'BOL', 'numeric': 68, 'independent': True, }, { 'name': u'"Bonaire, Sint Eustatius and Saba"', 'alpha2': u'BQ', 'alpha3': u'BES', 'numeric': 535, 'independent': False, }, { 'name': u'Bosnia and Herzegovina', 'alpha2': u'BA', 'alpha3': u'BIH', 'numeric': 70, 'independent': True, }, { 'name': u'Botswana', 'alpha2': u'BW', 'alpha3': u'BWA', 'numeric': 72, 'independent': True, }, { 'name': u'Bouvet Island', 'alpha2': u'BV', 'alpha3': u'BVT', 'numeric': 74, 'independent': False, }, { 'name': u'Brazil', 'alpha2': u'BR', 'alpha3': u'BRA', 'numeric': 76, 'independent': True, }, { 'name': u'British Indian Ocean Territory', 'alpha2': u'IO', 'alpha3': u'IOT', 'numeric': 86, 'independent': False, }, { 'name': u'Brunei Darussalam', 'alpha2': u'BN', 'alpha3': u'BRN', 'numeric': 96, 'independent': True, }, { 'name': u'Bulgaria', 'alpha2': u'BG', 'alpha3': u'BGR', 'numeric': 100, 'independent': True, }, { 'name': u'Burkina Faso', 'alpha2': u'BF', 'alpha3': u'BFA', 'numeric': 854, 'independent': True, }, { 'name': u'Burundi', 'alpha2': u'BI', 'alpha3': u'BDI', 'numeric': 108, 'independent': True, }, { 'name': u'Cabo Verde', 'alpha2': u'CV', 'alpha3': u'CPV', 'numeric': 132, 'independent': True, }, { 'name': u'Cambodia', 'alpha2': u'KH', 'alpha3': u'KHM', 'numeric': 116, 'independent': True, }, { 'name': u'Cameroon', 'alpha2': u'CM', 'alpha3': u'CMR', 'numeric': 120, 'independent': True, }, { 'name': u'Canada', 'alpha2': u'CA', 'alpha3': u'CAN', 'numeric': 124, 'independent': True, }, { 'name': u'Cayman Islands', 'alpha2': u'KY', 'alpha3': u'CYM', 'numeric': 136, 'independent': True, }, { 'name': u'Central African Republic', 'alpha2': u'CF', 'alpha3': u'CAF', 'numeric': 140, 'independent': True, }, { 'name': u'Chad', 'alpha2': u'TD', 'alpha3': u'TCD', 'numeric': 148, 'independent': True, }, { 'name': u'Chile', 'alpha2': u'CL', 'alpha3': u'CHL', 'numeric': 152, 'independent': True, }, { 'name': u'China', 'alpha2': u'CN', 'alpha3': u'CHN', 'numeric': 156, 'independent': True, }, { 'name': u'Christmas Island', 'alpha2': u'CX', 'alpha3': u'CXR', 'numeric': 162, 'independent': False, }, { 'name': u'Cocos (Keeling) Islands', 'alpha2': u'CC', 'alpha3': u'CCK', 'numeric': 166, 'independent': False, }, { 'name': u'Colombia', 'alpha2': u'CO', 'alpha3': u'COL', 'numeric': 170, 'independent': True, }, { 'name': u'Comoros', 'alpha2': u'KM', 'alpha3': u'COM', 'numeric': 174, 'independent': True, }, { 'name': u'Congo', 'alpha2': u'CG', 'alpha3': u'COG', 'numeric': 178, 'independent': True, }, { 'name': u'Congo (Democratic Republic of the)', 'alpha2': u'CD', 'alpha3': u'COD', 'numeric': 180, 'independent': True, }, { 'name': u'Cook Islands', 'alpha2': u'CK', 'alpha3': u'COK', 'numeric': 184, 'independent': False, }, { 'name': u'Costa Rica', 'alpha2': u'CR', 'alpha3': u'CRI', 'numeric': 188, 'independent': True, }, { 'name': u'Côte d\'Ivoire', 'alpha2': u'CI', 'alpha3': u'CIV', 'numeric': 384, 'independent': True, }, { 'name': u'Croatia', 'alpha2': u'HR', 'alpha3': u'HRV', 'numeric': 191, 'independent': True, }, { 'name': u'Cuba', 'alpha2': u'CU', 'alpha3': u'CUB', 'numeric': 192, 'independent': True, }, { 'name': u'Curaçao', 'alpha2': u'CW', 'alpha3': u'CUW', 'numeric': 531, 'independent': False, }, { 'name': u'Cyprus', 'alpha2': u'CY', 'alpha3': u'CYP', 'numeric': 196, 'independent': True, }, { 'name': u'Czechia', 'alpha2': u'CZ', 'alpha3': u'CZE', 'numeric': 203, 'independent': True, }, { 'name': u'Denmark', 'alpha2': u'DK', 'alpha3': u'DNK', 'numeric': 208, 'independent': True, }, { 'name': u'Djibouti', 'alpha2': u'DJ', 'alpha3': u'DJI', 'numeric': 262, 'independent': True, }, { 'name': u'Dominica', 'alpha2': u'DM', 'alpha3': u'DMA', 'numeric': 212, 'independent': True, }, { 'name': u'Dominican Republic', 'alpha2': u'DO', 'alpha3': u'DOM', 'numeric': 214, 'independent': True, }, { 'name': u'Ecuador', 'alpha2': u'EC', 'alpha3': u'ECU', 'numeric': 218, 'independent': True, }, { 'name': u'Egypt', 'alpha2': u'EG', 'alpha3': u'EGY', 'numeric': 818, 'independent': True, }, { 'name': u'El Salvador', 'alpha2': u'SV', 'alpha3': u'SLV', 'numeric': 222, 'independent': True, }, { 'name': u'Equatorial Guinea', 'alpha2': u'GQ', 'alpha3': u'GNQ', 'numeric': 226, 'independent': True, }, { 'name': u'Eritrea', 'alpha2': u'ER', 'alpha3': u'ERI', 'numeric': 232, 'independent': True, }, { 'name': u'Estonia', 'alpha2': u'EE', 'alpha3': u'EST', 'numeric': 233, 'independent': True, }, { 'name': u'Ethiopia', 'alpha2': u'ET', 'alpha3': u'ETH', 'numeric': 231, 'independent': True, }, { 'name': u'Falkland Islands (Malvinas)', 'alpha2': u'FK', 'alpha3': u'FLK', 'numeric': 238, 'independent': False, }, { 'name': u'Faroe Islands', 'alpha2': u'FO', 'alpha3': u'FRO', 'numeric': 234, 'independent': False, }, { 'name': u'Fiji', 'alpha2': u'FJ', 'alpha3': u'FJI', 'numeric': 242, 'independent': True, }, { 'name': u'Finland', 'alpha2': u'FI', 'alpha3': u'FIN', 'numeric': 246, 'independent': True, }, { 'name': u'France', 'alpha2': u'FR', 'alpha3': u'FRA', 'numeric': 250, 'independent': True, }, { 'name': u'French Guiana', 'alpha2': u'GF', 'alpha3': u'GUF', 'numeric': 254, 'independent': False, }, { 'name': u'French Polynesia', 'alpha2': u'PF', 'alpha3': u'PYF', 'numeric': 258, 'independent': False, }, { 'name': u'French Southern Territories', 'alpha2': u'TF', 'alpha3': u'ATF', 'numeric': 260, 'independent': False, }, { 'name': u'Gabon', 'alpha2': u'GA', 'alpha3': u'GAB', 'numeric': 266, 'independent': True, }, { 'name': u'Gambia', 'alpha2': u'GM', 'alpha3': u'GMB', 'numeric': 270, 'independent': True, }, { 'name': u'Georgia', 'alpha2': u'GE', 'alpha3': u'GEO', 'numeric': 268, 'independent': True, }, { 'name': u'Germany', 'alpha2': u'DE', 'alpha3': u'DEU', 'numeric': 276, 'independent': True, }, { 'name': u'Ghana', 'alpha2': u'GH', 'alpha3': u'GHA', 'numeric': 288, 'independent': True, }, { 'name': u'Gibraltar', 'alpha2': u'GI', 'alpha3': u'GIB', 'numeric': 292, 'independent': True, }, { 'name': u'Greece', 'alpha2': u'GR', 'alpha3': u'GRC', 'numeric': 300, 'independent': True, }, { 'name': u'Greenland', 'alpha2': u'GL', 'alpha3': u'GRL', 'numeric': 304, 'independent': False, }, { 'name': u'Grenada', 'alpha2': u'GD', 'alpha3': u'GRD', 'numeric': 308, 'independent': True, }, { 'name': u'Guadeloupe', 'alpha2': u'GP', 'alpha3': u'GLP', 'numeric': 312, 'independent': False, }, { 'name': u'Guam', 'alpha2': u'GU', 'alpha3': u'GUM', 'numeric': 316, 'independent': False, }, { 'name': u'Guatemala', 'alpha2': u'GT', 'alpha3': u'GTM', 'numeric': 320, 'independent': True, }, { 'name': u'Guernsey', 'alpha2': u'GG', 'alpha3': u'GGY', 'numeric': 831, 'independent': False, }, { 'name': u'Guinea', 'alpha2': u'GN', 'alpha3': u'GIN', 'numeric': 324, 'independent': True, }, { 'name': u'Guinea-Bissau', 'alpha2': u'GW', 'alpha3': u'GNB', 'numeric': 624, 'independent': True, }, { 'name': u'Guyana', 'alpha2': u'GY', 'alpha3': u'GUY', 'numeric': 328, 'independent': True, }, { 'name': u'Haiti', 'alpha2': u'HT', 'alpha3': u'HTI', 'numeric': 332, 'independent': True, }, { 'name': u'Heard Island and McDonald Islands', 'alpha2': u'HM', 'alpha3': u'HMD', 'numeric': 334, 'independent': False, }, { 'name': u'Holy See', 'alpha2': u'VA', 'alpha3': u'VAT', 'numeric': 336, 'independent': True, }, { 'name': u'Honduras', 'alpha2': u'HN', 'alpha3': u'HND', 'numeric': 340, 'independent': True, }, { 'name': u'Hong Kong', 'alpha2': u'HK', 'alpha3': u'HKG', 'numeric': 344, 'independent': False, }, { 'name': u'Hungary', 'alpha2': u'HU', 'alpha3': u'HUN', 'numeric': 348, 'independent': True, }, { 'name': u'Iceland', 'alpha2': u'IS', 'alpha3': u'ISL', 'numeric': 352, 'independent': True, }, { 'name': u'India', 'alpha2': u'IN', 'alpha3': u'IND', 'numeric': 356, 'independent': True, }, { 'name': u'Indonesia', 'alpha2': u'ID', 'alpha3': u'IDN', 'numeric': 360, 'independent': True, }, { 'name': u'Iran (Islamic Republic of)', 'alpha2': u'IR', 'alpha3': u'IRN', 'numeric': 364, 'independent': True, }, { 'name': u'Iraq', 'alpha2': u'IQ', 'alpha3': u'IRQ', 'numeric': 368, 'independent': True, }, { 'name': u'Ireland', 'alpha2': u'IE', 'alpha3': u'IRL', 'numeric': 372, 'independent': True, }, { 'name': u'Isle of Man', 'alpha2': u'IM', 'alpha3': u'IMN', 'numeric': 833, 'independent': False, }, { 'name': u'Israel', 'alpha2': u'IL', 'alpha3': u'ISR', 'numeric': 376, 'independent': True, }, { 'name': u'Italy', 'alpha2': u'IT', 'alpha3': u'ITA', 'numeric': 380, 'independent': True, }, { 'name': u'Jamaica', 'alpha2': u'JM', 'alpha3': u'JAM', 'numeric': 388, 'independent': True, }, { 'name': u'Japan', 'alpha2': u'JP', 'alpha3': u'JPN', 'numeric': 392, 'independent': True, }, { 'name': u'Jersey', 'alpha2': u'JE', 'alpha3': u'JEY', 'numeric': 832, 'independent': False, }, { 'name': u'Jordan', 'alpha2': u'JO', 'alpha3': u'JOR', 'numeric': 400, 'independent': True, }, { 'name': u'Kazakhstan', 'alpha2': u'KZ', 'alpha3': u'KAZ', 'numeric': 398, 'independent': True, }, { 'name': u'Kenya', 'alpha2': u'KE', 'alpha3': u'KEN', 'numeric': 404, 'independent': True, }, { 'name': u'Kiribati', 'alpha2': u'KI', 'alpha3': u'KIR', 'numeric': 296, 'independent': True, }, { 'name': u'Korea (Democratic People\'s Republic of)', 'alpha2': u'KP', 'alpha3': u'PRK', 'numeric': 408, 'independent': True, }, { 'name': u'Korea (Republic of)', 'alpha2': u'KR', 'alpha3': u'KOR', 'numeric': 410, 'independent': True, }, { 'name': u'Kuwait', 'alpha2': u'KW', 'alpha3': u'KWT', 'numeric': 414, 'independent': True, }, { 'name': u'Kyrgyzstan', 'alpha2': u'KG', 'alpha3': u'KGZ', 'numeric': 417, 'independent': True, }, { 'name': u'Lao People\'s Democratic Republic', 'alpha2': u'LA', 'alpha3': u'LAO', 'numeric': 418, 'independent': True, }, { 'name': u'Latvia', 'alpha2': u'LV', 'alpha3': u'LVA', 'numeric': 428, 'independent': True, }, { 'name': u'Lebanon', 'alpha2': u'LB', 'alpha3': u'LBN', 'numeric': 422, 'independent': True, }, { 'name': u'Lesotho', 'alpha2': u'LS', 'alpha3': u'LSO', 'numeric': 426, 'independent': True, }, { 'name': u'Liberia', 'alpha2': u'LR', 'alpha3': u'LBR', 'numeric': 430, 'independent': True, }, { 'name': u'Libya', 'alpha2': u'LY', 'alpha3': u'LBY', 'numeric': 434, 'independent': True, }, { 'name': u'Liechtenstein', 'alpha2': u'LI', 'alpha3': u'LIE', 'numeric': 438, 'independent': True, }, { 'name': u'Lithuania', 'alpha2': u'LT', 'alpha3': u'LTU', 'numeric': 440, 'independent': True, }, { 'name': u'Luxembourg', 'alpha2': u'LU', 'alpha3': u'LUX', 'numeric': 442, 'independent': True, }, { 'name': u'Macao', 'alpha2': u'MO', 'alpha3': u'MAC', 'numeric': 446, 'independent': False, }, { 'name': u'Macedonia (the former Yugoslav Republic of)', 'alpha2': u'MK', 'alpha3': u'MKD', 'numeric': 807, 'independent': True, }, { 'name': u'Madagascar', 'alpha2': u'MG', 'alpha3': u'MDG', 'numeric': 450, 'independent': True, }, { 'name': u'Malawi', 'alpha2': u'MW', 'alpha3': u'MWI', 'numeric': 454, 'independent': True, }, { 'name': u'Malaysia', 'alpha2': u'MY', 'alpha3': u'MYS', 'numeric': 458, 'independent': True, }, { 'name': u'Maldives', 'alpha2': u'MV', 'alpha3': u'MDV', 'numeric': 462, 'independent': True, }, { 'name': u'Mali', 'alpha2': u'ML', 'alpha3': u'MLI', 'numeric': 466, 'independent': True, }, { 'name': u'Malta', 'alpha2': u'MT', 'alpha3': u'MLT', 'numeric': 470, 'independent': True, }, { 'name': u'Marshall Islands', 'alpha2': u'MH', 'alpha3': u'MHL', 'numeric': 584, 'independent': True, }, { 'name': u'Martinique', 'alpha2': u'MQ', 'alpha3': u'MTQ', 'numeric': 474, 'independent': False, }, { 'name': u'Mauritania', 'alpha2': u'MR', 'alpha3': u'MRT', 'numeric': 478, 'independent': True, }, { 'name': u'Mauritius', 'alpha2': u'MU', 'alpha3': u'MUS', 'numeric': 480, 'independent': True, }, { 'name': u'Mayotte', 'alpha2': u'YT', 'alpha3': u'MYT', 'numeric': 175, 'independent': False, }, { 'name': u'Mexico', 'alpha2': u'MX', 'alpha3': u'MEX', 'numeric': 484, 'independent': True, }, { 'name': u'Micronesia (Federated States of)', 'alpha2': u'FM', 'alpha3': u'FSM', 'numeric': 583, 'independent': True, }, { 'name': u'Moldova (Republic of)', 'alpha2': u'MD', 'alpha3': u'MDA', 'numeric': 498, 'independent': True, }, { 'name': u'Monaco', 'alpha2': u'MC', 'alpha3': u'MCO', 'numeric': 492, 'independent': True, }, { 'name': u'Mongolia', 'alpha2': u'MN', 'alpha3': u'MNG', 'numeric': 496, 'independent': True, }, { 'name': u'Montenegro', 'alpha2': u'ME', 'alpha3': u'MNE', 'numeric': 499, 'independent': True, }, { 'name': u'Montserrat', 'alpha2': u'MS', 'alpha3': u'MSR', 'numeric': 500, 'independent': False, }, { 'name': u'Morocco', 'alpha2': u'MA', 'alpha3': u'MAR', 'numeric': 504, 'independent': True, }, { 'name': u'Mozambique', 'alpha2': u'MZ', 'alpha3': u'MOZ', 'numeric': 508, 'independent': True, }, { 'name': u'Myanmar', 'alpha2': u'MM', 'alpha3': u'MMR', 'numeric': 104, 'independent': True, }, { 'name': u'Namibia', 'alpha2': u'NA', 'alpha3': u'NAM', 'numeric': 516, 'independent': True, }, { 'name': u'Nauru', 'alpha2': u'NR', 'alpha3': u'NRU', 'numeric': 520, 'independent': True, }, { 'name': u'Nepal', 'alpha2': u'NP', 'alpha3': u'NPL', 'numeric': 524, 'independent': True, }, { 'name': u'Netherlands', 'alpha2': u'NL', 'alpha3': u'NLD', 'numeric': 528, 'independent': True, }, { 'name': u'New Caledonia', 'alpha2': u'NC', 'alpha3': u'NCL', 'numeric': 540, 'independent': False, }, { 'name': u'New Zealand', 'alpha2': u'NZ', 'alpha3': u'NZL', 'numeric': 554, 'independent': True, }, { 'name': u'Nicaragua', 'alpha2': u'NI', 'alpha3': u'NIC', 'numeric': 558, 'independent': True, }, { 'name': u'Niger', 'alpha2': u'NE', 'alpha3': u'NER', 'numeric': 562, 'independent': True, }, { 'name': u'Nigeria', 'alpha2': u'NG', 'alpha3': u'NGA', 'numeric': 566, 'independent': True, }, { 'name': u'Niue', 'alpha2': u'NU', 'alpha3': u'NIU', 'numeric': 570, 'independent': False, }, { 'name': u'Norfolk Island', 'alpha2': u'NF', 'alpha3': u'NFK', 'numeric': 574, 'independent': False, }, { 'name': u'Northern Mariana Islands', 'alpha2': u'MP', 'alpha3': u'MNP', 'numeric': 580, 'independent': False, }, { 'name': u'Norway', 'alpha2': u'NO', 'alpha3': u'NOR', 'numeric': 578, 'independent': True, }, { 'name': u'Oman', 'alpha2': u'OM', 'alpha3': u'OMN', 'numeric': 512, 'independent': True, }, { 'name': u'Pakistan', 'alpha2': u'PK', 'alpha3': u'PAK', 'numeric': 586, 'independent': True, }, { 'name': u'Palau', 'alpha2': u'PW', 'alpha3': u'PLW', 'numeric': 585, 'independent': True, }, { 'name': u'"Palestine, State of"', 'alpha2': u'PS', 'alpha3': u'PSE', 'numeric': 275, 'independent': False, }, { 'name': u'Panama', 'alpha2': u'PA', 'alpha3': u'PAN', 'numeric': 591, 'independent': True, }, { 'name': u'Papua New Guinea', 'alpha2': u'PG', 'alpha3': u'PNG', 'numeric': 598, 'independent': True, }, { 'name': u'Paraguay', 'alpha2': u'PY', 'alpha3': u'PRY', 'numeric': 600, 'independent': True, }, { 'name': u'Peru', 'alpha2': u'PE', 'alpha3': u'PER', 'numeric': 604, 'independent': True, }, { 'name': u'Philippines', 'alpha2': u'PH', 'alpha3': u'PHL', 'numeric': 608, 'independent': True, }, { 'name': u'Pitcairn', 'alpha2': u'PN', 'alpha3': u'PCN', 'numeric': 612, 'independent': False, }, { 'name': u'Poland', 'alpha2': u'PL', 'alpha3': u'POL', 'numeric': 616, 'independent': True, }, { 'name': u'Portugal', 'alpha2': u'PT', 'alpha3': u'PRT', 'numeric': 620, 'independent': True, }, { 'name': u'Puerto Rico', 'alpha2': u'PR', 'alpha3': u'PRI', 'numeric': 630, 'independent': False, }, { 'name': u'Qatar', 'alpha2': u'QA', 'alpha3': u'QAT', 'numeric': 634, 'independent': True, }, { 'name': u'Réunion', 'alpha2': u'RE', 'alpha3': u'REU', 'numeric': 638, 'independent': False, }, { 'name': u'Romania', 'alpha2': u'RO', 'alpha3': u'ROU', 'numeric': 642, 'independent': True, }, { 'name': u'Russian Federation', 'alpha2': u'RU', 'alpha3': u'RUS', 'numeric': 643, 'independent': True, }, { 'name': u'Rwanda', 'alpha2': u'RW', 'alpha3': u'RWA', 'numeric': 646, 'independent': True, }, { 'name': u'Saint Barthélemy', 'alpha2': u'BL', 'alpha3': u'BLM', 'numeric': 652, 'independent': False, }, { 'name': u'"Saint Helena, Ascension and Tristan da Cunha"', 'alpha2': u'SH', 'alpha3': u'SHN', 'numeric': 654, 'independent': False, }, { 'name': u'Saint Kitts and Nevis', 'alpha2': u'KN', 'alpha3': u'KNA', 'numeric': 659, 'independent': True, }, { 'name': u'Saint Lucia', 'alpha2': u'LC', 'alpha3': u'LCA', 'numeric': 662, 'independent': True, }, { 'name': u'Saint Martin (French part)', 'alpha2': u'MF', 'alpha3': u'MAF', 'numeric': 663, 'independent': False, }, { 'name': u'Saint Pierre and Miquelon', 'alpha2': u'PM', 'alpha3': u'SPM', 'numeric': 666, 'independent': False, }, { 'name': u'Saint Vincent and the Grenadines', 'alpha2': u'VC', 'alpha3': u'VCT', 'numeric': 670, 'independent': True, }, { 'name': u'Samoa', 'alpha2': u'WS', 'alpha3': u'WSM', 'numeric': 882, 'independent': True, }, { 'name': u'San Marino', 'alpha2': u'SM', 'alpha3': u'SMR', 'numeric': 674, 'independent': True, }, { 'name': u'Sao Tome and Principe', 'alpha2': u'ST', 'alpha3': u'STP', 'numeric': 678, 'independent': True, }, { 'name': u'Saudi Arabia', 'alpha2': u'SA', 'alpha3': u'SAU', 'numeric': 682, 'independent': True, }, { 'name': u'Senegal', 'alpha2': u'SN', 'alpha3': u'SEN', 'numeric': 686, 'independent': True, }, { 'name': u'Serbia', 'alpha2': u'RS', 'alpha3': u'SRB', 'numeric': 688, 'independent': True, }, { 'name': u'Seychelles', 'alpha2': u'SC', 'alpha3': u'SYC', 'numeric': 690, 'independent': True, }, { 'name': u'Sierra Leone', 'alpha2': u'SL', 'alpha3': u'SLE', 'numeric': 694, 'independent': True, }, { 'name': u'Singapore', 'alpha2': u'SG', 'alpha3': u'SGP', 'numeric': 702, 'independent': True, }, { 'name': u'Sint Maarten (Dutch part)', 'alpha2': u'SX', 'alpha3': u'SXM', 'numeric': 534, 'independent': False, }, { 'name': u'Slovakia', 'alpha2': u'SK', 'alpha3': u'SVK', 'numeric': 703, 'independent': True, }, { 'name': u'Slovenia', 'alpha2': u'SI', 'alpha3': u'SVN', 'numeric': 705, 'independent': True, }, { 'name': u'Solomon Islands', 'alpha2': u'SB', 'alpha3': u'SLB', 'numeric': 90, 'independent': True, }, { 'name': u'Somalia', 'alpha2': u'SO', 'alpha3': u'SOM', 'numeric': 706, 'independent': True, }, { 'name': u'South Africa', 'alpha2': u'ZA', 'alpha3': u'ZAF', 'numeric': 710, 'independent': True, }, { 'name': u'South Georgia and the South Sandwich Islands', 'alpha2': u'GS', 'alpha3': u'SGS', 'numeric': 239, 'independent': False, }, { 'name': u'South Sudan', 'alpha2': u'SS', 'alpha3': u'SSD', 'numeric': 728, 'independent': True, }, { 'name': u'Spain', 'alpha2': u'ES', 'alpha3': u'ESP', 'numeric': 724, 'independent': True, }, { 'name': u'Sri Lanka', 'alpha2': u'LK', 'alpha3': u'LKA', 'numeric': 144, 'independent': True, }, { 'name': u'Sudan', 'alpha2': u'SD', 'alpha3': u'SDN', 'numeric': 729, 'independent': True, }, { 'name': u'Suriname', 'alpha2': u'SR', 'alpha3': u'SUR', 'numeric': 740, 'independent': True, }, { 'name': u'Svalbard and Jan Mayen', 'alpha2': u'SJ', 'alpha3': u'SJM', 'numeric': 744, 'independent': False, }, { 'name': u'Swaziland', 'alpha2': u'SZ', 'alpha3': u'SWZ', 'numeric': 748, 'independent': True, }, { 'name': u'Sweden', 'alpha2': u'SE', 'alpha3': u'SWE', 'numeric': 752, 'independent': True, }, { 'name': u'Switzerland', 'alpha2': u'CH', 'alpha3': u'CHE', 'numeric': 756, 'independent': True, }, { 'name': u'Syrian Arab Republic', 'alpha2': u'SY', 'alpha3': u'SYR', 'numeric': 760, 'independent': True, }, { 'name': u'"Taiwan, Province of China[a]"', 'alpha2': u'TW', 'alpha3': u'TWN', 'numeric': 158, 'independent': False, }, { 'name': u'Tajikistan', 'alpha2': u'TJ', 'alpha3': u'TJK', 'numeric': 762, 'independent': True, }, { 'name': u'"Tanzania, United Republic of"', 'alpha2': u'TZ', 'alpha3': u'TZA', 'numeric': 834, 'independent': True, }, { 'name': u'Thailand', 'alpha2': u'TH', 'alpha3': u'THA', 'numeric': 764, 'independent': True, }, { 'name': u'Timor-Leste', 'alpha2': u'TL', 'alpha3': u'TLS', 'numeric': 626, 'independent': True, }, { 'name': u'Togo', 'alpha2': u'TG', 'alpha3': u'TGO', 'numeric': 768, 'independent': True, }, { 'name': u'Tokelau', 'alpha2': u'TK', 'alpha3': u'TKL', 'numeric': 772, 'independent': False, }, { 'name': u'Tonga', 'alpha2': u'TO', 'alpha3': u'TON', 'numeric': 776, 'independent': True, }, { 'name': u'Trinidad and Tobago', 'alpha2': u'TT', 'alpha3': u'TTO', 'numeric': 780, 'independent': True, }, { 'name': u'Tunisia', 'alpha2': u'TN', 'alpha3': u'TUN', 'numeric': 788, 'independent': True, }, { 'name': u'Turkey', 'alpha2': u'TR', 'alpha3': u'TUR', 'numeric': 792, 'independent': True, }, { 'name': u'Turkmenistan', 'alpha2': u'TM', 'alpha3': u'TKM', 'numeric': 795, 'independent': True, }, { 'name': u'Turks and Caicos Islands', 'alpha2': u'TC', 'alpha3': u'TCA', 'numeric': 796, 'independent': False, }, { 'name': u'Tuvalu', 'alpha2': u'TV', 'alpha3': u'TUV', 'numeric': 798, 'independent': True, }, { 'name': u'Uganda', 'alpha2': u'UG', 'alpha3': u'UGA', 'numeric': 800, 'independent': True, }, { 'name': u'Ukraine', 'alpha2': u'UA', 'alpha3': u'UKR', 'numeric': 804, 'independent': True, }, { 'name': u'United Arab Emirates', 'alpha2': u'AE', 'alpha3': u'ARE', 'numeric': 784, 'independent': True, }, { 'name': u'United Kingdom of Great Britain and Northern Ireland', 'alpha2': u'GB', 'alpha3': u'GBR', 'numeric': 826, 'independent': True, }, { 'name': u'United States of America', 'alpha2': u'US', 'alpha3': u'USA', 'numeric': 840, 'independent': True, }, { 'name': u'United States Minor Outlying Islands', 'alpha2': u'UM', 'alpha3': u'UMI', 'numeric': 581, 'independent': False, }, { 'name': u'Uruguay', 'alpha2': u'UY', 'alpha3': u'URY', 'numeric': 858, 'independent': True, }, { 'name': u'Uzbekistan', 'alpha2': u'UZ', 'alpha3': u'UZB', 'numeric': 860, 'independent': True, }, { 'name': u'Vanuatu', 'alpha2': u'VU', 'alpha3': u'VUT', 'numeric': 548, 'independent': True, }, { 'name': u'Venezuela (Bolivarian Republic of)', 'alpha2': u'VE', 'alpha3': u'VEN', 'numeric': 862, 'independent': True, }, { 'name': u'Viet Nam', 'alpha2': u'VN', 'alpha3': u'VNM', 'numeric': 704, 'independent': True, }, { 'name': u'Virgin Islands (British)', 'alpha2': u'VG', 'alpha3': u'VGB', 'numeric': 92, 'independent': False, }, { 'name': u'Virgin Islands (U.S.)', 'alpha2': u'VI', 'alpha3': u'VIR', 'numeric': 850, 'independent': False, }, { 'name': u'Wallis and Futuna', 'alpha2': u'WF', 'alpha3': u'WLF', 'numeric': 876, 'independent': False, }, { 'name': u'Western Sahara', 'alpha2': u'EH', 'alpha3': u'ESH', 'numeric': 732, 'independent': False, }, { 'name': u'Yemen', 'alpha2': u'YE', 'alpha3': u'YEM', 'numeric': 887, 'independent': True, }, { 'name': u'Zambia', 'alpha2': u'ZM', 'alpha3': u'ZMB', 'numeric': 894, 'independent': True, }, { 'name': u'Zimbabwe', 'alpha2': u'ZW', 'alpha3': u'ZWE', 'numeric': 716, 'independent': True, }, ] def by_name(name): for country in countries_data: if name.lower() == country['name'].lower(): return country else: return None def by_alpha2(alpha2): for country in countries_data: if alpha2.lower() == country['alpha2'].lower(): return country else: return None def by_alpha3(alpha3): for country in countries_data: if alpha3.lower() == country['alpha3'].lower(): return country else: return None def by_numeric(numeric): for country in countries_data: if numeric == country['numeric']: return country else: return None
21.332584
72
0.40256
3,495
37,972
4.371102
0.31073
0.081495
0.242521
0.255286
0.048766
0.018525
0.007266
0.007266
0
0
0
0.053971
0.403719
37,972
1,779
73
21.344576
0.620749
0.000553
0
0.149802
0
0
0.330997
0
0
0
0
0
0
1
0.002261
false
0
0
0
0.006783
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a2acc92929ab7a95d895027573d8cd4bcb0dbffe
1,303
py
Python
test/random_csv/test_CategoryColumn.py
PhilipBuhr/randomCsv
34b1da62134077dfe4db2682ee0da386ef380c1d
[ "MIT" ]
null
null
null
test/random_csv/test_CategoryColumn.py
PhilipBuhr/randomCsv
34b1da62134077dfe4db2682ee0da386ef380c1d
[ "MIT" ]
null
null
null
test/random_csv/test_CategoryColumn.py
PhilipBuhr/randomCsv
34b1da62134077dfe4db2682ee0da386ef380c1d
[ "MIT" ]
null
null
null
import numpy as np from randomcsv.CategoryColumn import CategoryColumn def test_should_pick_class_at_random(): column = CategoryColumn('Class', ['A', 'B', 'C'], random_state=42) series = column.generate_entries(5) assert series.at[0] == 'C' assert series.at[1] == 'A' assert series.at[2] == 'C' assert series.at[3] == 'C' assert series.at[4] == 'A' def test_can_set_type_of_classes(): column = CategoryColumn('IntClass', [1, 2, 3], random_state=42) series = column.generate_entries(5) assert series.at[0] == 3 assert series.at[1] == 1 assert series.at[2] == 3 assert series.at[3] == 3 assert series.at[4] == 1 def test_default_null_elements_are_chosen_by_pandas(): column = CategoryColumn("Category", [1, 2, 3], null_ratio=0.5, random_state=42) series = column.generate_entries(5) assert np.isnan(series[0]) assert series[1] == 1 assert series[2] == 3 assert series[3] == 3 assert np.isnan(series[4]) def test_null_elements_can_be_set(): column = CategoryColumn("Category", [1, 2, 3], null_ratio=0.5, null_element=-1, random_state=42) series = column.generate_entries(5) assert series[0] == -1 assert series[1] == 1 assert series[2] == 3 assert series[3] == 3 assert series[4] == -1
30.302326
100
0.653876
198
1,303
4.136364
0.242424
0.263736
0.17094
0.092796
0.478632
0.478632
0.478632
0.478632
0.478632
0.421245
0
0.056298
0.195702
1,303
42
101
31.02381
0.725191
0
0
0.294118
0
0
0.028396
0
0
0
0
0
0.588235
1
0.117647
false
0
0.058824
0
0.176471
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
2
a2ad44a47ee8bb3d19d9c5b1fd0b3c05c54c2a3c
684
py
Python
src/vigorish/scrape/bbref_boxscores/models/pbp_other.py
a-luna/vigorish
6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6
[ "MIT" ]
2
2021-07-15T13:53:33.000Z
2021-07-25T17:03:29.000Z
src/vigorish/scrape/bbref_boxscores/models/pbp_other.py
a-luna/vigorish
6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6
[ "MIT" ]
650
2019-05-18T07:00:12.000Z
2022-01-21T19:38:55.000Z
src/vigorish/scrape/bbref_boxscores/models/pbp_other.py
a-luna/vigorish
6cede5ced76c7d2c9ad0aacdbd2b18c2f1ee4ee6
[ "MIT" ]
2
2020-03-28T21:01:31.000Z
2022-01-06T05:16:11.000Z
from dataclasses import dataclass from vigorish.enums import PlayByPlayEvent @dataclass class BBRefPlayByPlayMiscEvent: """Information describing a challenged play or other game event.""" inning_id: str = "" inning_label: str = "" pbp_table_row_number: str = "0" description: str = "" @property def event_type(self): return PlayByPlayEvent.MISC def as_dict(self): return { "__bbref_pbp_misc_event__": True, "inning_id": self.inning_id, "inning_label": self.inning_label, "pbp_table_row_number": int(self.pbp_table_row_number), "description": self.description, }
25.333333
71
0.649123
76
684
5.526316
0.513158
0.057143
0.078571
0.121429
0
0
0
0
0
0
0
0.001976
0.260234
684
26
72
26.307692
0.828063
0.089181
0
0
0
0
0.124797
0.038898
0
0
0
0
0
1
0.105263
false
0
0.105263
0.105263
0.578947
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
a2bfcceb3dc71912e82a45d488f0a0db99183752
2,738
py
Python
classificacao/naive_bayes_credit_data.py
ldynczuki/ml-python-curso
6988568fe2283a057957830345b5323d05cf7de5
[ "MIT" ]
null
null
null
classificacao/naive_bayes_credit_data.py
ldynczuki/ml-python-curso
6988568fe2283a057957830345b5323d05cf7de5
[ "MIT" ]
null
null
null
classificacao/naive_bayes_credit_data.py
ldynczuki/ml-python-curso
6988568fe2283a057957830345b5323d05cf7de5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 19 16:00:21 2019 @author: lucas """ import pandas as pd import numpy as np from sklearn.impute import SimpleImputer from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from sklearn.naive_bayes import GaussianNB from sklearn.metrics import confusion_matrix, accuracy_score base = pd.read_csv('credit-data.csv') base.loc[base.age < 0, 'age'] = 40.92 previsores = base.iloc[:, 1:4].values classe = base.iloc[:, 4].values imputer = SimpleImputer(missing_values=np.nan, strategy='mean') imputer = imputer.fit(previsores[:, 1:4]) previsores[:, 1:4] = imputer.transform(previsores[:, 1:4]) scaler = StandardScaler() previsores = scaler.fit_transform(previsores) # Divisão da base de dados em dados de treino e dados de teste previsores_treinamento, previsores_teste, classe_treinamento, classe_teste = train_test_split(previsores, classe, test_size=0.25, random_state=0) # Criação da instância da classe GaussianNB classificador = GaussianNB() # Criação do modelo de classificação utilizando Naive-Bayes classificador.fit(previsores_treinamento, classe_treinamento) # NOTA: A linha acima vai criar uma tabela de probabilidades do NB de acordo # com os dados previsores de treinamento e indicando a qual classe eles são # por isso, passamos como 2ª parâmetro a classe treinamento. # Neste momento vamos chamar o método predict() que irá prever o resultado # os dados previsores_teste de teste de acordo com a tabela de probabilidades # que foi criada anteriormente. previsoes = classificador.predict(previsores_teste) # Neste momento iremos comparar os resultados previstos de acordo com o # algoritmo NB que está armazenado na variável "previsoes" com o resultado # já conhecido que está na variável "classe_teste". precisao = accuracy_score(classe_teste, previsoes) matriz = confusion_matrix(classe_teste, previsoes) # EXPLICANDO A MATRIZ DE CONFUSÃO: # O resultado retornado da função confusion_matrix() será uma matriz, onde # as linhas serão os valores da classe_teste, ou seja, os valores corretos # e as colunas são os valores da variável prevista (previsoes) # a intersecção da linha e coluna apresentará os valores onde o algortimo # acertou, ou seja, na linha 0 e coluna 0 terá os valores onde a classe 0 # é o valor 0 e a coluna 0 os valores previstos, com isso, o valor da # intersecção será a quantidade de acertos do algoritmo # já a linha 0 e coluna 1 terá os valores onde era correto o valor 0 # mas o algoritmo previu que era 1, com isso, esse valor contido na célula # são a quantidade de erros do algoritmo. # Portanto, a matriz de confusão é utilizada para visualizar os acertos e # os erros.
41.484848
145
0.783784
422
2,738
5.018957
0.412322
0.029745
0.016997
0.016053
0
0
0
0
0
0
0
0.018003
0.147918
2,738
65
146
42.123077
0.889841
0.586194
0
0
0
0
0.020018
0
0
0
0
0.015385
0
1
0
false
0
0.318182
0
0.318182
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
1
0
0
0
0
2
a2c50c0b0723eb80dd70a5e3330adb35d4348aa7
616
py
Python
pavo/cli/_errors.py
getpavo/pavo
8b751a296d4acf4dc3fdb7290c096f5ac23e8451
[ "MIT" ]
1
2021-08-07T15:08:51.000Z
2021-08-07T15:08:51.000Z
pavo/cli/_errors.py
jackmanapp/core
1150bdcaa4700d8dc1ee04f843058ab072193f3a
[ "MIT" ]
1
2021-07-13T09:09:37.000Z
2021-07-13T09:09:38.000Z
pavo/cli/_errors.py
jackmanapp/core
1150bdcaa4700d8dc1ee04f843058ab072193f3a
[ "MIT" ]
null
null
null
from pavo.core import PavoException class CliError(PavoException): """Parent class of all errors that occur when using CLI.""" class UnspecifiedCommandError(CliError): """Please specify a command to run Pavo.""" class UnknownCommandError(CliError): """The specified command could not be found, are you sure it is imported?""" class InvalidExecutionDirectoryError(CliError): """You are executing Pavo in an invalid Pavo project. Please create or navigate to a project.""" class MessageHandlerAlreadyExists(CliError): """The message handler you are trying to register, already exists."""
28
100
0.75
76
616
6.078947
0.684211
0.047619
0
0
0
0
0
0
0
0
0
0
0.162338
616
21
101
29.333333
0.895349
0.51461
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.166667
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
2
a2c5bc9e69b09cecdd9c0377a15c18c2d83959c0
433
py
Python
diagrams/digitalocean/storage.py
houmam/diagrams
eaf3e98304014e847c347bfae19bbfb3fe91abb2
[ "MIT" ]
1
2022-03-29T07:05:46.000Z
2022-03-29T07:05:46.000Z
diagrams/digitalocean/storage.py
loftwah/diagrams
e45804b48d5360fe5bae1b785db6527db5a57d16
[ "MIT" ]
null
null
null
diagrams/digitalocean/storage.py
loftwah/diagrams
e45804b48d5360fe5bae1b785db6527db5a57d16
[ "MIT" ]
1
2022-03-01T03:33:20.000Z
2022-03-01T03:33:20.000Z
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _DigitalOcean class _Storage(_DigitalOcean): _type = "storage" _icon_dir = "resources/digitalocean/storage" class Folder(_Storage): _icon = "folder.png" class Space(_Storage): _icon = "space.png" class VolumeSnapshot(_Storage): _icon = "volume-snapshot.png" class Volume(_Storage): _icon = "volume.png" # Aliases
15.464286
68
0.704388
50
433
5.82
0.54
0.189003
0.116838
0
0
0
0
0
0
0
0
0
0.189376
433
27
69
16.037037
0.82906
0.170901
0
0
1
0
0.238764
0.08427
0
0
0
0
0
1
0
false
0
0.083333
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
a2ce66a5b6b075ac4d6e88a69b0fe2fe9093f342
853
py
Python
time_conversions.py
oliviadrake/CA3
f49b1fbb59b0270ca55d651c3dcb4be92ba789f3
[ "MIT" ]
1
2021-04-21T14:44:30.000Z
2021-04-21T14:44:30.000Z
time_conversions.py
oliviadrake/CA3
f49b1fbb59b0270ca55d651c3dcb4be92ba789f3
[ "MIT" ]
null
null
null
time_conversions.py
oliviadrake/CA3
f49b1fbb59b0270ca55d651c3dcb4be92ba789f3
[ "MIT" ]
null
null
null
''' collection of functions that convert times to different formats ''' import time def current_time() -> str: ''' Returns the current time in HHMM format ''' return str(time.gmtime().tm_hour) + ":" + str(time.gmtime().tm_min) def minutes_to_seconds(minutes: int) -> int: '''Converts minutes to seconds''' return int(minutes)*60 def hours_to_minutes(hours: int) -> int: '''Converts hours to minutes''' return int(hours)*60 def hhmm_to_seconds(hhmm: str) -> int: '''Converts time in the HHMM format into seconds''' if len(hhmm.split(':')) != 2: return None return minutes_to_seconds(hours_to_minutes(hhmm.split(':')[0])) + \ minutes_to_seconds(hhmm.split(':')[1]) def days_to_seconds(days_from_now: int) -> int: ''' Converts days into seconds ''' return days_from_now * 24 * 60 * 60
26.65625
71
0.655334
121
853
4.446281
0.347107
0.100372
0.118959
0.055762
0
0
0
0
0
0
0
0.018978
0.196952
853
31
72
27.516129
0.766423
0.271981
0
0
0
0
0.006826
0
0
0
0
0
0
1
0.357143
false
0
0.071429
0
0.857143
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
a2da048adc5e5227124d91209ac390f6082e2afa
1,561
py
Python
0237 Delete Node in a Linked List.py
AtharvRedij/leetcode-solutions
7194d202302989d53c241b12c9befb06923b1510
[ "MIT" ]
null
null
null
0237 Delete Node in a Linked List.py
AtharvRedij/leetcode-solutions
7194d202302989d53c241b12c9befb06923b1510
[ "MIT" ]
null
null
null
0237 Delete Node in a Linked List.py
AtharvRedij/leetcode-solutions
7194d202302989d53c241b12c9befb06923b1510
[ "MIT" ]
1
2021-03-06T06:15:48.000Z
2021-03-06T06:15:48.000Z
''' URL: https://leetcode.com/problems/delete-node-in-a-linked-list/ Difficulty: Easy Description: Delete Node in a Linked List Write a function to delete a node in a singly-linked list. You will not be given access to the head of the list, instead you will be given access to the node to be deleted directly. It is guaranteed that the node to be deleted is not a tail node in the list. Example 1: Input: head = [4,5,1,9], node = 5 Output: [4,1,9] Explanation: You are given the second node with value 5, the linked list should become 4 -> 1 -> 9 after calling your function. Example 2: Input: head = [4,5,1,9], node = 1 Output: [4,5,9] Explanation: You are given the third node with value 1, the linked list should become 4 -> 5 -> 9 after calling your function. Example 3: Input: head = [1,2,3,4], node = 3 Output: [1,2,4] Example 4: Input: head = [0,1], node = 0 Output: [1] Example 5: Input: head = [-3,5,-99], node = -3 Output: [5,-99] Constraints: The number of the nodes in the given list is in the range [2, 1000]. -1000 <= Node.val <= 1000 The value of each node in the list is unique. The node to be deleted is in the list and is not a tail node ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def deleteNode(self, node): """ :type node: ListNode :rtype: void Do not return anything, modify node in-place instead. """ node.val = node.next.val node.next = node.next.next
24.390625
181
0.664958
274
1,561
3.773723
0.313869
0.034816
0.020309
0.031915
0.352998
0.27853
0.032882
0
0
0
0
0.051452
0.228059
1,561
63
182
24.777778
0.806639
0.885971
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
2
a2dc3bbc30d9d773a7e40aa8acb59959851cbf76
59,465
py
Python
onyx/split_registries/block.py
Double-Felix/Onyx
51e7d59d02ec861e06ab99599f5644c05ee2b371
[ "MIT" ]
24
2020-08-15T01:38:56.000Z
2020-11-11T01:28:45.000Z
onyx/split_registries/block.py
DoubleF3lix/onyx
51e7d59d02ec861e06ab99599f5644c05ee2b371
[ "MIT" ]
4
2021-03-15T23:30:41.000Z
2021-10-19T01:43:30.000Z
onyx/split_registries/block.py
DoubleF3lix/onyx
51e7d59d02ec861e06ab99599f5644c05ee2b371
[ "MIT" ]
3
2020-11-28T10:10:09.000Z
2021-08-24T01:31:05.000Z
import enum class block(enum.Enum): """ block * acacia_button * acacia_door * acacia_fence * acacia_fence_gate * acacia_leaves * acacia_log * acacia_planks * acacia_pressure_plate * acacia_sapling * acacia_sign * acacia_slab * acacia_stairs * acacia_trapdoor * acacia_wall_sign * acacia_wood * activator_rail * air * allium * amethyst_block * amethyst_cluster * ancient_debris * andesite * andesite_slab * andesite_stairs * andesite_wall * anvil * attached_melon_stem * attached_pumpkin_stem * azalea * azalea_leaves * azure_bluet * bamboo * bamboo_sapling * barrel * barrier * basalt * beacon * bedrock * bee_nest * beehive * beetroots * bell * big_dripleaf * big_dripleaf_stem * birch_button * birch_door * birch_fence * birch_fence_gate * birch_leaves * birch_log * birch_planks * birch_pressure_plate * birch_sapling * birch_sign * birch_slab * birch_stairs * birch_trapdoor * birch_wall_sign * birch_wood * black_banner * black_bed * black_candle * black_candle_cake * black_carpet * black_concrete * black_concrete_powder * black_glazed_terracotta * black_shulker_box * black_stained_glass * black_stained_glass_pane * black_terracotta * black_wall_banner * black_wool * blackstone * blackstone_slab * blackstone_stairs * blackstone_wall * blast_furnace * blue_banner * blue_bed * blue_candle * blue_candle_cake * blue_carpet * blue_concrete * blue_concrete_powder * blue_glazed_terracotta * blue_ice * blue_orchid * blue_shulker_box * blue_stained_glass * blue_stained_glass_pane * blue_terracotta * blue_wall_banner * blue_wool * bone_block * bookshelf * brain_coral * brain_coral_block * brain_coral_fan * brain_coral_wall_fan * brewing_stand * brick_slab * brick_stairs * brick_wall * bricks * brown_banner * brown_bed * brown_candle * brown_candle_cake * brown_carpet * brown_concrete * brown_concrete_powder * brown_glazed_terracotta * brown_mushroom * brown_mushroom_block * brown_shulker_box * brown_stained_glass * brown_stained_glass_pane * brown_terracotta * brown_wall_banner * brown_wool * bubble_column * bubble_coral * bubble_coral_block * bubble_coral_fan * bubble_coral_wall_fan * budding_amethyst * cactus * cake * calcite * campfire * candle * candle_cake * carrots * cartography_table * carved_pumpkin * cauldron * cave_air * cave_vines * cave_vines_plant * chain * chain_command_block * chest * chipped_anvil * chiseled_deepslate * chiseled_nether_bricks * chiseled_polished_blackstone * chiseled_quartz_block * chiseled_red_sandstone * chiseled_sandstone * chiseled_stone_bricks * chorus_flower * chorus_plant * clay * coal_block * coal_ore * coarse_dirt * cobbled_deepslate * cobbled_deepslate_slab * cobbled_deepslate_stairs * cobbled_deepslate_wall * cobblestone * cobblestone_slab * cobblestone_stairs * cobblestone_wall * cobweb * cocoa * command_block * comparator * composter * conduit * copper_block * copper_ore * cornflower * cracked_deepslate_bricks * cracked_deepslate_tiles * cracked_nether_bricks * cracked_polished_blackstone_bricks * cracked_stone_bricks * crafting_table * creeper_head * creeper_wall_head * crimson_button * crimson_door * crimson_fence * crimson_fence_gate * crimson_fungus * crimson_hyphae * crimson_nylium * crimson_planks * crimson_pressure_plate * crimson_roots * crimson_sign * crimson_slab * crimson_stairs * crimson_stem * crimson_trapdoor * crimson_wall_sign * crying_obsidian * cut_copper * cut_copper_slab * cut_copper_stairs * cut_red_sandstone * cut_red_sandstone_slab * cut_sandstone * cut_sandstone_slab * cyan_banner * cyan_bed * cyan_candle * cyan_candle_cake * cyan_carpet * cyan_concrete * cyan_concrete_powder * cyan_glazed_terracotta * cyan_shulker_box * cyan_stained_glass * cyan_stained_glass_pane * cyan_terracotta * cyan_wall_banner * cyan_wool * damaged_anvil * dandelion * dark_oak_button * dark_oak_door * dark_oak_fence * dark_oak_fence_gate * dark_oak_leaves * dark_oak_log * dark_oak_planks * dark_oak_pressure_plate * dark_oak_sapling * dark_oak_sign * dark_oak_slab * dark_oak_stairs * dark_oak_trapdoor * dark_oak_wall_sign * dark_oak_wood * dark_prismarine * dark_prismarine_slab * dark_prismarine_stairs * daylight_detector * dead_brain_coral * dead_brain_coral_block * dead_brain_coral_fan * dead_brain_coral_wall_fan * dead_bubble_coral * dead_bubble_coral_block * dead_bubble_coral_fan * dead_bubble_coral_wall_fan * dead_bush * dead_fire_coral * dead_fire_coral_block * dead_fire_coral_fan * dead_fire_coral_wall_fan * dead_horn_coral * dead_horn_coral_block * dead_horn_coral_fan * dead_horn_coral_wall_fan * dead_tube_coral * dead_tube_coral_block * dead_tube_coral_fan * dead_tube_coral_wall_fan * deepslate * deepslate_brick_slab * deepslate_brick_stairs * deepslate_brick_wall * deepslate_bricks * deepslate_coal_ore * deepslate_copper_ore * deepslate_diamond_ore * deepslate_emerald_ore * deepslate_gold_ore * deepslate_iron_ore * deepslate_lapis_ore * deepslate_redstone_ore * deepslate_tile_slab * deepslate_tile_stairs * deepslate_tile_wall * deepslate_tiles * detector_rail * diamond_block * diamond_ore * diorite * diorite_slab * diorite_stairs * diorite_wall * dirt * dirt_path * dispenser * dragon_egg * dragon_head * dragon_wall_head * dried_kelp_block * dripstone_block * dropper * emerald_block * emerald_ore * enchanting_table * end_gateway * end_portal * end_portal_frame * end_rod * end_stone * end_stone_brick_slab * end_stone_brick_stairs * end_stone_brick_wall * end_stone_bricks * ender_chest * exposed_copper * exposed_cut_copper * exposed_cut_copper_slab * exposed_cut_copper_stairs * farmland * fern * fire * fire_coral * fire_coral_block * fire_coral_fan * fire_coral_wall_fan * fletching_table * flower_pot * flowering_azalea * flowering_azalea_leaves * frosted_ice * furnace * gilded_blackstone * glass * glass_pane * glow_lichen * glowstone * gold_block * gold_ore * granite * granite_slab * granite_stairs * granite_wall * grass * grass_block * gravel * gray_banner * gray_bed * gray_candle * gray_candle_cake * gray_carpet * gray_concrete * gray_concrete_powder * gray_glazed_terracotta * gray_shulker_box * gray_stained_glass * gray_stained_glass_pane * gray_terracotta * gray_wall_banner * gray_wool * green_banner * green_bed * green_candle * green_candle_cake * green_carpet * green_concrete * green_concrete_powder * green_glazed_terracotta * green_shulker_box * green_stained_glass * green_stained_glass_pane * green_terracotta * green_wall_banner * green_wool * grindstone * hanging_roots * hay_block * heavy_weighted_pressure_plate * honey_block * honeycomb_block * hopper * horn_coral * horn_coral_block * horn_coral_fan * horn_coral_wall_fan * ice * infested_chiseled_stone_bricks * infested_cobblestone * infested_cracked_stone_bricks * infested_deepslate * infested_mossy_stone_bricks * infested_stone * infested_stone_bricks * iron_bars * iron_block * iron_door * iron_ore * iron_trapdoor * jack_o_lantern * jigsaw * jukebox * jungle_button * jungle_door * jungle_fence * jungle_fence_gate * jungle_leaves * jungle_log * jungle_planks * jungle_pressure_plate * jungle_sapling * jungle_sign * jungle_slab * jungle_stairs * jungle_trapdoor * jungle_wall_sign * jungle_wood * kelp * kelp_plant * ladder * lantern * lapis_block * lapis_ore * large_amethyst_bud * large_fern * lava * lava_cauldron * lectern * lever * light * light_blue_banner * light_blue_bed * light_blue_candle * light_blue_candle_cake * light_blue_carpet * light_blue_concrete * light_blue_concrete_powder * light_blue_glazed_terracotta * light_blue_shulker_box * light_blue_stained_glass * light_blue_stained_glass_pane * light_blue_terracotta * light_blue_wall_banner * light_blue_wool * light_gray_banner * light_gray_bed * light_gray_candle * light_gray_candle_cake * light_gray_carpet * light_gray_concrete * light_gray_concrete_powder * light_gray_glazed_terracotta * light_gray_shulker_box * light_gray_stained_glass * light_gray_stained_glass_pane * light_gray_terracotta * light_gray_wall_banner * light_gray_wool * light_weighted_pressure_plate * lightning_rod * lilac * lily_of_the_valley * lily_pad * lime_banner * lime_bed * lime_candle * lime_candle_cake * lime_carpet * lime_concrete * lime_concrete_powder * lime_glazed_terracotta * lime_shulker_box * lime_stained_glass * lime_stained_glass_pane * lime_terracotta * lime_wall_banner * lime_wool * lodestone * loom * magenta_banner * magenta_bed * magenta_candle * magenta_candle_cake * magenta_carpet * magenta_concrete * magenta_concrete_powder * magenta_glazed_terracotta * magenta_shulker_box * magenta_stained_glass * magenta_stained_glass_pane * magenta_terracotta * magenta_wall_banner * magenta_wool * magma_block * medium_amethyst_bud * melon * melon_stem * moss_block * moss_carpet * mossy_cobblestone * mossy_cobblestone_slab * mossy_cobblestone_stairs * mossy_cobblestone_wall * mossy_stone_brick_slab * mossy_stone_brick_stairs * mossy_stone_brick_wall * mossy_stone_bricks * moving_piston * mushroom_stem * mycelium * nether_brick_fence * nether_brick_slab * nether_brick_stairs * nether_brick_wall * nether_bricks * nether_gold_ore * nether_portal * nether_quartz_ore * nether_sprouts * nether_wart * nether_wart_block * netherite_block * netherrack * note_block * oak_button * oak_door * oak_fence * oak_fence_gate * oak_leaves * oak_log * oak_planks * oak_pressure_plate * oak_sapling * oak_sign * oak_slab * oak_stairs * oak_trapdoor * oak_wall_sign * oak_wood * observer * obsidian * orange_banner * orange_bed * orange_candle * orange_candle_cake * orange_carpet * orange_concrete * orange_concrete_powder * orange_glazed_terracotta * orange_shulker_box * orange_stained_glass * orange_stained_glass_pane * orange_terracotta * orange_tulip * orange_wall_banner * orange_wool * oxeye_daisy * oxidized_copper * oxidized_cut_copper * oxidized_cut_copper_slab * oxidized_cut_copper_stairs * packed_ice * peony * petrified_oak_slab * pink_banner * pink_bed * pink_candle * pink_candle_cake * pink_carpet * pink_concrete * pink_concrete_powder * pink_glazed_terracotta * pink_shulker_box * pink_stained_glass * pink_stained_glass_pane * pink_terracotta * pink_tulip * pink_wall_banner * pink_wool * piston * piston_head * player_head * player_wall_head * podzol * pointed_dripstone * polished_andesite * polished_andesite_slab * polished_andesite_stairs * polished_basalt * polished_blackstone * polished_blackstone_brick_slab * polished_blackstone_brick_stairs * polished_blackstone_brick_wall * polished_blackstone_bricks * polished_blackstone_button * polished_blackstone_pressure_plate * polished_blackstone_slab * polished_blackstone_stairs * polished_blackstone_wall * polished_deepslate * polished_deepslate_slab * polished_deepslate_stairs * polished_deepslate_wall * polished_diorite * polished_diorite_slab * polished_diorite_stairs * polished_granite * polished_granite_slab * polished_granite_stairs * poppy * potatoes * potted_acacia_sapling * potted_allium * potted_azalea_bush * potted_azure_bluet * potted_bamboo * potted_birch_sapling * potted_blue_orchid * potted_brown_mushroom * potted_cactus * potted_cornflower * potted_crimson_fungus * potted_crimson_roots * potted_dandelion * potted_dark_oak_sapling * potted_dead_bush * potted_fern * potted_flowering_azalea_bush * potted_jungle_sapling * potted_lily_of_the_valley * potted_oak_sapling * potted_orange_tulip * potted_oxeye_daisy * potted_pink_tulip * potted_poppy * potted_red_mushroom * potted_red_tulip * potted_spruce_sapling * potted_warped_fungus * potted_warped_roots * potted_white_tulip * potted_wither_rose * powder_snow * powder_snow_cauldron * powered_rail * prismarine * prismarine_brick_slab * prismarine_brick_stairs * prismarine_bricks * prismarine_slab * prismarine_stairs * prismarine_wall * pumpkin * pumpkin_stem * purple_banner * purple_bed * purple_candle * purple_candle_cake * purple_carpet * purple_concrete * purple_concrete_powder * purple_glazed_terracotta * purple_shulker_box * purple_stained_glass * purple_stained_glass_pane * purple_terracotta * purple_wall_banner * purple_wool * purpur_block * purpur_pillar * purpur_slab * purpur_stairs * quartz_block * quartz_bricks * quartz_pillar * quartz_slab * quartz_stairs * rail * raw_copper_block * raw_gold_block * raw_iron_block * red_banner * red_bed * red_candle * red_candle_cake * red_carpet * red_concrete * red_concrete_powder * red_glazed_terracotta * red_mushroom * red_mushroom_block * red_nether_brick_slab * red_nether_brick_stairs * red_nether_brick_wall * red_nether_bricks * red_sand * red_sandstone * red_sandstone_slab * red_sandstone_stairs * red_sandstone_wall * red_shulker_box * red_stained_glass * red_stained_glass_pane * red_terracotta * red_tulip * red_wall_banner * red_wool * redstone_block * redstone_lamp * redstone_ore * redstone_torch * redstone_wall_torch * redstone_wire * repeater * repeating_command_block * respawn_anchor * rooted_dirt * rose_bush * sand * sandstone * sandstone_slab * sandstone_stairs * sandstone_wall * scaffolding * sculk_sensor * sea_lantern * sea_pickle * seagrass * shroomlight * shulker_box * skeleton_skull * skeleton_wall_skull * slime_block * small_amethyst_bud * small_dripleaf * smithing_table * smoker * smooth_basalt * smooth_quartz * smooth_quartz_slab * smooth_quartz_stairs * smooth_red_sandstone * smooth_red_sandstone_slab * smooth_red_sandstone_stairs * smooth_sandstone * smooth_sandstone_slab * smooth_sandstone_stairs * smooth_stone * smooth_stone_slab * snow * snow_block * soul_campfire * soul_fire * soul_lantern * soul_sand * soul_soil * soul_torch * soul_wall_torch * spawner * sponge * spore_blossom * spruce_button * spruce_door * spruce_fence * spruce_fence_gate * spruce_leaves * spruce_log * spruce_planks * spruce_pressure_plate * spruce_sapling * spruce_sign * spruce_slab * spruce_stairs * spruce_trapdoor * spruce_wall_sign * spruce_wood * sticky_piston * stone * stone_brick_slab * stone_brick_stairs * stone_brick_wall * stone_bricks * stone_button * stone_pressure_plate * stone_slab * stone_stairs * stonecutter * stripped_acacia_log * stripped_acacia_wood * stripped_birch_log * stripped_birch_wood * stripped_crimson_hyphae * stripped_crimson_stem * stripped_dark_oak_log * stripped_dark_oak_wood * stripped_jungle_log * stripped_jungle_wood * stripped_oak_log * stripped_oak_wood * stripped_spruce_log * stripped_spruce_wood * stripped_warped_hyphae * stripped_warped_stem * structure_block * structure_void * sugar_cane * sunflower * sweet_berry_bush * tall_grass * tall_seagrass * target * terracotta * tinted_glass * tnt * torch * trapped_chest * tripwire * tripwire_hook * tube_coral * tube_coral_block * tube_coral_fan * tube_coral_wall_fan * tuff * turtle_egg * twisting_vines * twisting_vines_plant * vine * void_air * wall_torch * warped_button * warped_door * warped_fence * warped_fence_gate * warped_fungus * warped_hyphae * warped_nylium * warped_planks * warped_pressure_plate * warped_roots * warped_sign * warped_slab * warped_stairs * warped_stem * warped_trapdoor * warped_wall_sign * warped_wart_block * water * water_cauldron * waxed_copper_block * waxed_cut_copper * waxed_cut_copper_slab * waxed_cut_copper_stairs * waxed_exposed_copper * waxed_exposed_cut_copper * waxed_exposed_cut_copper_slab * waxed_exposed_cut_copper_stairs * waxed_oxidized_copper * waxed_oxidized_cut_copper * waxed_oxidized_cut_copper_slab * waxed_oxidized_cut_copper_stairs * waxed_weathered_copper * waxed_weathered_cut_copper * waxed_weathered_cut_copper_slab * waxed_weathered_cut_copper_stairs * weathered_copper * weathered_cut_copper * weathered_cut_copper_slab * weathered_cut_copper_stairs * weeping_vines * weeping_vines_plant * wet_sponge * wheat * white_banner * white_bed * white_candle * white_candle_cake * white_carpet * white_concrete * white_concrete_powder * white_glazed_terracotta * white_shulker_box * white_stained_glass * white_stained_glass_pane * white_terracotta * white_tulip * white_wall_banner * white_wool * wither_rose * wither_skeleton_skull * wither_skeleton_wall_skull * yellow_banner * yellow_bed * yellow_candle * yellow_candle_cake * yellow_carpet * yellow_concrete * yellow_concrete_powder * yellow_glazed_terracotta * yellow_shulker_box * yellow_stained_glass * yellow_stained_glass_pane * yellow_terracotta * yellow_wall_banner * yellow_wool * zombie_head * zombie_wall_head """ acacia_button = "minecraft:acacia_button" acacia_door = "minecraft:acacia_door" acacia_fence = "minecraft:acacia_fence" acacia_fence_gate = "minecraft:acacia_fence_gate" acacia_leaves = "minecraft:acacia_leaves" acacia_log = "minecraft:acacia_log" acacia_planks = "minecraft:acacia_planks" acacia_pressure_plate = "minecraft:acacia_pressure_plate" acacia_sapling = "minecraft:acacia_sapling" acacia_sign = "minecraft:acacia_sign" acacia_slab = "minecraft:acacia_slab" acacia_stairs = "minecraft:acacia_stairs" acacia_trapdoor = "minecraft:acacia_trapdoor" acacia_wall_sign = "minecraft:acacia_wall_sign" acacia_wood = "minecraft:acacia_wood" activator_rail = "minecraft:activator_rail" air = "minecraft:air" allium = "minecraft:allium" amethyst_block = "minecraft:amethyst_block" amethyst_cluster = "minecraft:amethyst_cluster" ancient_debris = "minecraft:ancient_debris" andesite = "minecraft:andesite" andesite_slab = "minecraft:andesite_slab" andesite_stairs = "minecraft:andesite_stairs" andesite_wall = "minecraft:andesite_wall" anvil = "minecraft:anvil" attached_melon_stem = "minecraft:attached_melon_stem" attached_pumpkin_stem = "minecraft:attached_pumpkin_stem" azalea = "minecraft:azalea" azalea_leaves = "minecraft:azalea_leaves" azure_bluet = "minecraft:azure_bluet" bamboo = "minecraft:bamboo" bamboo_sapling = "minecraft:bamboo_sapling" barrel = "minecraft:barrel" barrier = "minecraft:barrier" basalt = "minecraft:basalt" beacon = "minecraft:beacon" bedrock = "minecraft:bedrock" bee_nest = "minecraft:bee_nest" beehive = "minecraft:beehive" beetroots = "minecraft:beetroots" bell = "minecraft:bell" big_dripleaf = "minecraft:big_dripleaf" big_dripleaf_stem = "minecraft:big_dripleaf_stem" birch_button = "minecraft:birch_button" birch_door = "minecraft:birch_door" birch_fence = "minecraft:birch_fence" birch_fence_gate = "minecraft:birch_fence_gate" birch_leaves = "minecraft:birch_leaves" birch_log = "minecraft:birch_log" birch_planks = "minecraft:birch_planks" birch_pressure_plate = "minecraft:birch_pressure_plate" birch_sapling = "minecraft:birch_sapling" birch_sign = "minecraft:birch_sign" birch_slab = "minecraft:birch_slab" birch_stairs = "minecraft:birch_stairs" birch_trapdoor = "minecraft:birch_trapdoor" birch_wall_sign = "minecraft:birch_wall_sign" birch_wood = "minecraft:birch_wood" black_banner = "minecraft:black_banner" black_bed = "minecraft:black_bed" black_candle = "minecraft:black_candle" black_candle_cake = "minecraft:black_candle_cake" black_carpet = "minecraft:black_carpet" black_concrete = "minecraft:black_concrete" black_concrete_powder = "minecraft:black_concrete_powder" black_glazed_terracotta = "minecraft:black_glazed_terracotta" black_shulker_box = "minecraft:black_shulker_box" black_stained_glass = "minecraft:black_stained_glass" black_stained_glass_pane = "minecraft:black_stained_glass_pane" black_terracotta = "minecraft:black_terracotta" black_wall_banner = "minecraft:black_wall_banner" black_wool = "minecraft:black_wool" blackstone = "minecraft:blackstone" blackstone_slab = "minecraft:blackstone_slab" blackstone_stairs = "minecraft:blackstone_stairs" blackstone_wall = "minecraft:blackstone_wall" blast_furnace = "minecraft:blast_furnace" blue_banner = "minecraft:blue_banner" blue_bed = "minecraft:blue_bed" blue_candle = "minecraft:blue_candle" blue_candle_cake = "minecraft:blue_candle_cake" blue_carpet = "minecraft:blue_carpet" blue_concrete = "minecraft:blue_concrete" blue_concrete_powder = "minecraft:blue_concrete_powder" blue_glazed_terracotta = "minecraft:blue_glazed_terracotta" blue_ice = "minecraft:blue_ice" blue_orchid = "minecraft:blue_orchid" blue_shulker_box = "minecraft:blue_shulker_box" blue_stained_glass = "minecraft:blue_stained_glass" blue_stained_glass_pane = "minecraft:blue_stained_glass_pane" blue_terracotta = "minecraft:blue_terracotta" blue_wall_banner = "minecraft:blue_wall_banner" blue_wool = "minecraft:blue_wool" bone_block = "minecraft:bone_block" bookshelf = "minecraft:bookshelf" brain_coral = "minecraft:brain_coral" brain_coral_block = "minecraft:brain_coral_block" brain_coral_fan = "minecraft:brain_coral_fan" brain_coral_wall_fan = "minecraft:brain_coral_wall_fan" brewing_stand = "minecraft:brewing_stand" brick_slab = "minecraft:brick_slab" brick_stairs = "minecraft:brick_stairs" brick_wall = "minecraft:brick_wall" bricks = "minecraft:bricks" brown_banner = "minecraft:brown_banner" brown_bed = "minecraft:brown_bed" brown_candle = "minecraft:brown_candle" brown_candle_cake = "minecraft:brown_candle_cake" brown_carpet = "minecraft:brown_carpet" brown_concrete = "minecraft:brown_concrete" brown_concrete_powder = "minecraft:brown_concrete_powder" brown_glazed_terracotta = "minecraft:brown_glazed_terracotta" brown_mushroom = "minecraft:brown_mushroom" brown_mushroom_block = "minecraft:brown_mushroom_block" brown_shulker_box = "minecraft:brown_shulker_box" brown_stained_glass = "minecraft:brown_stained_glass" brown_stained_glass_pane = "minecraft:brown_stained_glass_pane" brown_terracotta = "minecraft:brown_terracotta" brown_wall_banner = "minecraft:brown_wall_banner" brown_wool = "minecraft:brown_wool" bubble_column = "minecraft:bubble_column" bubble_coral = "minecraft:bubble_coral" bubble_coral_block = "minecraft:bubble_coral_block" bubble_coral_fan = "minecraft:bubble_coral_fan" bubble_coral_wall_fan = "minecraft:bubble_coral_wall_fan" budding_amethyst = "minecraft:budding_amethyst" cactus = "minecraft:cactus" cake = "minecraft:cake" calcite = "minecraft:calcite" campfire = "minecraft:campfire" candle = "minecraft:candle" candle_cake = "minecraft:candle_cake" carrots = "minecraft:carrots" cartography_table = "minecraft:cartography_table" carved_pumpkin = "minecraft:carved_pumpkin" cauldron = "minecraft:cauldron" cave_air = "minecraft:cave_air" cave_vines = "minecraft:cave_vines" cave_vines_plant = "minecraft:cave_vines_plant" chain = "minecraft:chain" chain_command_block = "minecraft:chain_command_block" chest = "minecraft:chest" chipped_anvil = "minecraft:chipped_anvil" chiseled_deepslate = "minecraft:chiseled_deepslate" chiseled_nether_bricks = "minecraft:chiseled_nether_bricks" chiseled_polished_blackstone = "minecraft:chiseled_polished_blackstone" chiseled_quartz_block = "minecraft:chiseled_quartz_block" chiseled_red_sandstone = "minecraft:chiseled_red_sandstone" chiseled_sandstone = "minecraft:chiseled_sandstone" chiseled_stone_bricks = "minecraft:chiseled_stone_bricks" chorus_flower = "minecraft:chorus_flower" chorus_plant = "minecraft:chorus_plant" clay = "minecraft:clay" coal_block = "minecraft:coal_block" coal_ore = "minecraft:coal_ore" coarse_dirt = "minecraft:coarse_dirt" cobbled_deepslate = "minecraft:cobbled_deepslate" cobbled_deepslate_slab = "minecraft:cobbled_deepslate_slab" cobbled_deepslate_stairs = "minecraft:cobbled_deepslate_stairs" cobbled_deepslate_wall = "minecraft:cobbled_deepslate_wall" cobblestone = "minecraft:cobblestone" cobblestone_slab = "minecraft:cobblestone_slab" cobblestone_stairs = "minecraft:cobblestone_stairs" cobblestone_wall = "minecraft:cobblestone_wall" cobweb = "minecraft:cobweb" cocoa = "minecraft:cocoa" command_block = "minecraft:command_block" comparator = "minecraft:comparator" composter = "minecraft:composter" conduit = "minecraft:conduit" copper_block = "minecraft:copper_block" copper_ore = "minecraft:copper_ore" cornflower = "minecraft:cornflower" cracked_deepslate_bricks = "minecraft:cracked_deepslate_bricks" cracked_deepslate_tiles = "minecraft:cracked_deepslate_tiles" cracked_nether_bricks = "minecraft:cracked_nether_bricks" cracked_polished_blackstone_bricks = "minecraft:cracked_polished_blackstone_bricks" cracked_stone_bricks = "minecraft:cracked_stone_bricks" crafting_table = "minecraft:crafting_table" creeper_head = "minecraft:creeper_head" creeper_wall_head = "minecraft:creeper_wall_head" crimson_button = "minecraft:crimson_button" crimson_door = "minecraft:crimson_door" crimson_fence = "minecraft:crimson_fence" crimson_fence_gate = "minecraft:crimson_fence_gate" crimson_fungus = "minecraft:crimson_fungus" crimson_hyphae = "minecraft:crimson_hyphae" crimson_nylium = "minecraft:crimson_nylium" crimson_planks = "minecraft:crimson_planks" crimson_pressure_plate = "minecraft:crimson_pressure_plate" crimson_roots = "minecraft:crimson_roots" crimson_sign = "minecraft:crimson_sign" crimson_slab = "minecraft:crimson_slab" crimson_stairs = "minecraft:crimson_stairs" crimson_stem = "minecraft:crimson_stem" crimson_trapdoor = "minecraft:crimson_trapdoor" crimson_wall_sign = "minecraft:crimson_wall_sign" crying_obsidian = "minecraft:crying_obsidian" cut_copper = "minecraft:cut_copper" cut_copper_slab = "minecraft:cut_copper_slab" cut_copper_stairs = "minecraft:cut_copper_stairs" cut_red_sandstone = "minecraft:cut_red_sandstone" cut_red_sandstone_slab = "minecraft:cut_red_sandstone_slab" cut_sandstone = "minecraft:cut_sandstone" cut_sandstone_slab = "minecraft:cut_sandstone_slab" cyan_banner = "minecraft:cyan_banner" cyan_bed = "minecraft:cyan_bed" cyan_candle = "minecraft:cyan_candle" cyan_candle_cake = "minecraft:cyan_candle_cake" cyan_carpet = "minecraft:cyan_carpet" cyan_concrete = "minecraft:cyan_concrete" cyan_concrete_powder = "minecraft:cyan_concrete_powder" cyan_glazed_terracotta = "minecraft:cyan_glazed_terracotta" cyan_shulker_box = "minecraft:cyan_shulker_box" cyan_stained_glass = "minecraft:cyan_stained_glass" cyan_stained_glass_pane = "minecraft:cyan_stained_glass_pane" cyan_terracotta = "minecraft:cyan_terracotta" cyan_wall_banner = "minecraft:cyan_wall_banner" cyan_wool = "minecraft:cyan_wool" damaged_anvil = "minecraft:damaged_anvil" dandelion = "minecraft:dandelion" dark_oak_button = "minecraft:dark_oak_button" dark_oak_door = "minecraft:dark_oak_door" dark_oak_fence = "minecraft:dark_oak_fence" dark_oak_fence_gate = "minecraft:dark_oak_fence_gate" dark_oak_leaves = "minecraft:dark_oak_leaves" dark_oak_log = "minecraft:dark_oak_log" dark_oak_planks = "minecraft:dark_oak_planks" dark_oak_pressure_plate = "minecraft:dark_oak_pressure_plate" dark_oak_sapling = "minecraft:dark_oak_sapling" dark_oak_sign = "minecraft:dark_oak_sign" dark_oak_slab = "minecraft:dark_oak_slab" dark_oak_stairs = "minecraft:dark_oak_stairs" dark_oak_trapdoor = "minecraft:dark_oak_trapdoor" dark_oak_wall_sign = "minecraft:dark_oak_wall_sign" dark_oak_wood = "minecraft:dark_oak_wood" dark_prismarine = "minecraft:dark_prismarine" dark_prismarine_slab = "minecraft:dark_prismarine_slab" dark_prismarine_stairs = "minecraft:dark_prismarine_stairs" daylight_detector = "minecraft:daylight_detector" dead_brain_coral = "minecraft:dead_brain_coral" dead_brain_coral_block = "minecraft:dead_brain_coral_block" dead_brain_coral_fan = "minecraft:dead_brain_coral_fan" dead_brain_coral_wall_fan = "minecraft:dead_brain_coral_wall_fan" dead_bubble_coral = "minecraft:dead_bubble_coral" dead_bubble_coral_block = "minecraft:dead_bubble_coral_block" dead_bubble_coral_fan = "minecraft:dead_bubble_coral_fan" dead_bubble_coral_wall_fan = "minecraft:dead_bubble_coral_wall_fan" dead_bush = "minecraft:dead_bush" dead_fire_coral = "minecraft:dead_fire_coral" dead_fire_coral_block = "minecraft:dead_fire_coral_block" dead_fire_coral_fan = "minecraft:dead_fire_coral_fan" dead_fire_coral_wall_fan = "minecraft:dead_fire_coral_wall_fan" dead_horn_coral = "minecraft:dead_horn_coral" dead_horn_coral_block = "minecraft:dead_horn_coral_block" dead_horn_coral_fan = "minecraft:dead_horn_coral_fan" dead_horn_coral_wall_fan = "minecraft:dead_horn_coral_wall_fan" dead_tube_coral = "minecraft:dead_tube_coral" dead_tube_coral_block = "minecraft:dead_tube_coral_block" dead_tube_coral_fan = "minecraft:dead_tube_coral_fan" dead_tube_coral_wall_fan = "minecraft:dead_tube_coral_wall_fan" deepslate = "minecraft:deepslate" deepslate_brick_slab = "minecraft:deepslate_brick_slab" deepslate_brick_stairs = "minecraft:deepslate_brick_stairs" deepslate_brick_wall = "minecraft:deepslate_brick_wall" deepslate_bricks = "minecraft:deepslate_bricks" deepslate_coal_ore = "minecraft:deepslate_coal_ore" deepslate_copper_ore = "minecraft:deepslate_copper_ore" deepslate_diamond_ore = "minecraft:deepslate_diamond_ore" deepslate_emerald_ore = "minecraft:deepslate_emerald_ore" deepslate_gold_ore = "minecraft:deepslate_gold_ore" deepslate_iron_ore = "minecraft:deepslate_iron_ore" deepslate_lapis_ore = "minecraft:deepslate_lapis_ore" deepslate_redstone_ore = "minecraft:deepslate_redstone_ore" deepslate_tile_slab = "minecraft:deepslate_tile_slab" deepslate_tile_stairs = "minecraft:deepslate_tile_stairs" deepslate_tile_wall = "minecraft:deepslate_tile_wall" deepslate_tiles = "minecraft:deepslate_tiles" detector_rail = "minecraft:detector_rail" diamond_block = "minecraft:diamond_block" diamond_ore = "minecraft:diamond_ore" diorite = "minecraft:diorite" diorite_slab = "minecraft:diorite_slab" diorite_stairs = "minecraft:diorite_stairs" diorite_wall = "minecraft:diorite_wall" dirt = "minecraft:dirt" dirt_path = "minecraft:dirt_path" dispenser = "minecraft:dispenser" dragon_egg = "minecraft:dragon_egg" dragon_head = "minecraft:dragon_head" dragon_wall_head = "minecraft:dragon_wall_head" dried_kelp_block = "minecraft:dried_kelp_block" dripstone_block = "minecraft:dripstone_block" dropper = "minecraft:dropper" emerald_block = "minecraft:emerald_block" emerald_ore = "minecraft:emerald_ore" enchanting_table = "minecraft:enchanting_table" end_gateway = "minecraft:end_gateway" end_portal = "minecraft:end_portal" end_portal_frame = "minecraft:end_portal_frame" end_rod = "minecraft:end_rod" end_stone = "minecraft:end_stone" end_stone_brick_slab = "minecraft:end_stone_brick_slab" end_stone_brick_stairs = "minecraft:end_stone_brick_stairs" end_stone_brick_wall = "minecraft:end_stone_brick_wall" end_stone_bricks = "minecraft:end_stone_bricks" ender_chest = "minecraft:ender_chest" exposed_copper = "minecraft:exposed_copper" exposed_cut_copper = "minecraft:exposed_cut_copper" exposed_cut_copper_slab = "minecraft:exposed_cut_copper_slab" exposed_cut_copper_stairs = "minecraft:exposed_cut_copper_stairs" farmland = "minecraft:farmland" fern = "minecraft:fern" fire = "minecraft:fire" fire_coral = "minecraft:fire_coral" fire_coral_block = "minecraft:fire_coral_block" fire_coral_fan = "minecraft:fire_coral_fan" fire_coral_wall_fan = "minecraft:fire_coral_wall_fan" fletching_table = "minecraft:fletching_table" flower_pot = "minecraft:flower_pot" flowering_azalea = "minecraft:flowering_azalea" flowering_azalea_leaves = "minecraft:flowering_azalea_leaves" frosted_ice = "minecraft:frosted_ice" furnace = "minecraft:furnace" gilded_blackstone = "minecraft:gilded_blackstone" glass = "minecraft:glass" glass_pane = "minecraft:glass_pane" glow_lichen = "minecraft:glow_lichen" glowstone = "minecraft:glowstone" gold_block = "minecraft:gold_block" gold_ore = "minecraft:gold_ore" granite = "minecraft:granite" granite_slab = "minecraft:granite_slab" granite_stairs = "minecraft:granite_stairs" granite_wall = "minecraft:granite_wall" grass = "minecraft:grass" grass_block = "minecraft:grass_block" gravel = "minecraft:gravel" gray_banner = "minecraft:gray_banner" gray_bed = "minecraft:gray_bed" gray_candle = "minecraft:gray_candle" gray_candle_cake = "minecraft:gray_candle_cake" gray_carpet = "minecraft:gray_carpet" gray_concrete = "minecraft:gray_concrete" gray_concrete_powder = "minecraft:gray_concrete_powder" gray_glazed_terracotta = "minecraft:gray_glazed_terracotta" gray_shulker_box = "minecraft:gray_shulker_box" gray_stained_glass = "minecraft:gray_stained_glass" gray_stained_glass_pane = "minecraft:gray_stained_glass_pane" gray_terracotta = "minecraft:gray_terracotta" gray_wall_banner = "minecraft:gray_wall_banner" gray_wool = "minecraft:gray_wool" green_banner = "minecraft:green_banner" green_bed = "minecraft:green_bed" green_candle = "minecraft:green_candle" green_candle_cake = "minecraft:green_candle_cake" green_carpet = "minecraft:green_carpet" green_concrete = "minecraft:green_concrete" green_concrete_powder = "minecraft:green_concrete_powder" green_glazed_terracotta = "minecraft:green_glazed_terracotta" green_shulker_box = "minecraft:green_shulker_box" green_stained_glass = "minecraft:green_stained_glass" green_stained_glass_pane = "minecraft:green_stained_glass_pane" green_terracotta = "minecraft:green_terracotta" green_wall_banner = "minecraft:green_wall_banner" green_wool = "minecraft:green_wool" grindstone = "minecraft:grindstone" hanging_roots = "minecraft:hanging_roots" hay_block = "minecraft:hay_block" heavy_weighted_pressure_plate = "minecraft:heavy_weighted_pressure_plate" honey_block = "minecraft:honey_block" honeycomb_block = "minecraft:honeycomb_block" hopper = "minecraft:hopper" horn_coral = "minecraft:horn_coral" horn_coral_block = "minecraft:horn_coral_block" horn_coral_fan = "minecraft:horn_coral_fan" horn_coral_wall_fan = "minecraft:horn_coral_wall_fan" ice = "minecraft:ice" infested_chiseled_stone_bricks = "minecraft:infested_chiseled_stone_bricks" infested_cobblestone = "minecraft:infested_cobblestone" infested_cracked_stone_bricks = "minecraft:infested_cracked_stone_bricks" infested_deepslate = "minecraft:infested_deepslate" infested_mossy_stone_bricks = "minecraft:infested_mossy_stone_bricks" infested_stone = "minecraft:infested_stone" infested_stone_bricks = "minecraft:infested_stone_bricks" iron_bars = "minecraft:iron_bars" iron_block = "minecraft:iron_block" iron_door = "minecraft:iron_door" iron_ore = "minecraft:iron_ore" iron_trapdoor = "minecraft:iron_trapdoor" jack_o_lantern = "minecraft:jack_o_lantern" jigsaw = "minecraft:jigsaw" jukebox = "minecraft:jukebox" jungle_button = "minecraft:jungle_button" jungle_door = "minecraft:jungle_door" jungle_fence = "minecraft:jungle_fence" jungle_fence_gate = "minecraft:jungle_fence_gate" jungle_leaves = "minecraft:jungle_leaves" jungle_log = "minecraft:jungle_log" jungle_planks = "minecraft:jungle_planks" jungle_pressure_plate = "minecraft:jungle_pressure_plate" jungle_sapling = "minecraft:jungle_sapling" jungle_sign = "minecraft:jungle_sign" jungle_slab = "minecraft:jungle_slab" jungle_stairs = "minecraft:jungle_stairs" jungle_trapdoor = "minecraft:jungle_trapdoor" jungle_wall_sign = "minecraft:jungle_wall_sign" jungle_wood = "minecraft:jungle_wood" kelp = "minecraft:kelp" kelp_plant = "minecraft:kelp_plant" ladder = "minecraft:ladder" lantern = "minecraft:lantern" lapis_block = "minecraft:lapis_block" lapis_ore = "minecraft:lapis_ore" large_amethyst_bud = "minecraft:large_amethyst_bud" large_fern = "minecraft:large_fern" lava = "minecraft:lava" lava_cauldron = "minecraft:lava_cauldron" lectern = "minecraft:lectern" lever = "minecraft:lever" light = "minecraft:light" light_blue_banner = "minecraft:light_blue_banner" light_blue_bed = "minecraft:light_blue_bed" light_blue_candle = "minecraft:light_blue_candle" light_blue_candle_cake = "minecraft:light_blue_candle_cake" light_blue_carpet = "minecraft:light_blue_carpet" light_blue_concrete = "minecraft:light_blue_concrete" light_blue_concrete_powder = "minecraft:light_blue_concrete_powder" light_blue_glazed_terracotta = "minecraft:light_blue_glazed_terracotta" light_blue_shulker_box = "minecraft:light_blue_shulker_box" light_blue_stained_glass = "minecraft:light_blue_stained_glass" light_blue_stained_glass_pane = "minecraft:light_blue_stained_glass_pane" light_blue_terracotta = "minecraft:light_blue_terracotta" light_blue_wall_banner = "minecraft:light_blue_wall_banner" light_blue_wool = "minecraft:light_blue_wool" light_gray_banner = "minecraft:light_gray_banner" light_gray_bed = "minecraft:light_gray_bed" light_gray_candle = "minecraft:light_gray_candle" light_gray_candle_cake = "minecraft:light_gray_candle_cake" light_gray_carpet = "minecraft:light_gray_carpet" light_gray_concrete = "minecraft:light_gray_concrete" light_gray_concrete_powder = "minecraft:light_gray_concrete_powder" light_gray_glazed_terracotta = "minecraft:light_gray_glazed_terracotta" light_gray_shulker_box = "minecraft:light_gray_shulker_box" light_gray_stained_glass = "minecraft:light_gray_stained_glass" light_gray_stained_glass_pane = "minecraft:light_gray_stained_glass_pane" light_gray_terracotta = "minecraft:light_gray_terracotta" light_gray_wall_banner = "minecraft:light_gray_wall_banner" light_gray_wool = "minecraft:light_gray_wool" light_weighted_pressure_plate = "minecraft:light_weighted_pressure_plate" lightning_rod = "minecraft:lightning_rod" lilac = "minecraft:lilac" lily_of_the_valley = "minecraft:lily_of_the_valley" lily_pad = "minecraft:lily_pad" lime_banner = "minecraft:lime_banner" lime_bed = "minecraft:lime_bed" lime_candle = "minecraft:lime_candle" lime_candle_cake = "minecraft:lime_candle_cake" lime_carpet = "minecraft:lime_carpet" lime_concrete = "minecraft:lime_concrete" lime_concrete_powder = "minecraft:lime_concrete_powder" lime_glazed_terracotta = "minecraft:lime_glazed_terracotta" lime_shulker_box = "minecraft:lime_shulker_box" lime_stained_glass = "minecraft:lime_stained_glass" lime_stained_glass_pane = "minecraft:lime_stained_glass_pane" lime_terracotta = "minecraft:lime_terracotta" lime_wall_banner = "minecraft:lime_wall_banner" lime_wool = "minecraft:lime_wool" lodestone = "minecraft:lodestone" loom = "minecraft:loom" magenta_banner = "minecraft:magenta_banner" magenta_bed = "minecraft:magenta_bed" magenta_candle = "minecraft:magenta_candle" magenta_candle_cake = "minecraft:magenta_candle_cake" magenta_carpet = "minecraft:magenta_carpet" magenta_concrete = "minecraft:magenta_concrete" magenta_concrete_powder = "minecraft:magenta_concrete_powder" magenta_glazed_terracotta = "minecraft:magenta_glazed_terracotta" magenta_shulker_box = "minecraft:magenta_shulker_box" magenta_stained_glass = "minecraft:magenta_stained_glass" magenta_stained_glass_pane = "minecraft:magenta_stained_glass_pane" magenta_terracotta = "minecraft:magenta_terracotta" magenta_wall_banner = "minecraft:magenta_wall_banner" magenta_wool = "minecraft:magenta_wool" magma_block = "minecraft:magma_block" medium_amethyst_bud = "minecraft:medium_amethyst_bud" melon = "minecraft:melon" melon_stem = "minecraft:melon_stem" moss_block = "minecraft:moss_block" moss_carpet = "minecraft:moss_carpet" mossy_cobblestone = "minecraft:mossy_cobblestone" mossy_cobblestone_slab = "minecraft:mossy_cobblestone_slab" mossy_cobblestone_stairs = "minecraft:mossy_cobblestone_stairs" mossy_cobblestone_wall = "minecraft:mossy_cobblestone_wall" mossy_stone_brick_slab = "minecraft:mossy_stone_brick_slab" mossy_stone_brick_stairs = "minecraft:mossy_stone_brick_stairs" mossy_stone_brick_wall = "minecraft:mossy_stone_brick_wall" mossy_stone_bricks = "minecraft:mossy_stone_bricks" moving_piston = "minecraft:moving_piston" mushroom_stem = "minecraft:mushroom_stem" mycelium = "minecraft:mycelium" nether_brick_fence = "minecraft:nether_brick_fence" nether_brick_slab = "minecraft:nether_brick_slab" nether_brick_stairs = "minecraft:nether_brick_stairs" nether_brick_wall = "minecraft:nether_brick_wall" nether_bricks = "minecraft:nether_bricks" nether_gold_ore = "minecraft:nether_gold_ore" nether_portal = "minecraft:nether_portal" nether_quartz_ore = "minecraft:nether_quartz_ore" nether_sprouts = "minecraft:nether_sprouts" nether_wart = "minecraft:nether_wart" nether_wart_block = "minecraft:nether_wart_block" netherite_block = "minecraft:netherite_block" netherrack = "minecraft:netherrack" note_block = "minecraft:note_block" oak_button = "minecraft:oak_button" oak_door = "minecraft:oak_door" oak_fence = "minecraft:oak_fence" oak_fence_gate = "minecraft:oak_fence_gate" oak_leaves = "minecraft:oak_leaves" oak_log = "minecraft:oak_log" oak_planks = "minecraft:oak_planks" oak_pressure_plate = "minecraft:oak_pressure_plate" oak_sapling = "minecraft:oak_sapling" oak_sign = "minecraft:oak_sign" oak_slab = "minecraft:oak_slab" oak_stairs = "minecraft:oak_stairs" oak_trapdoor = "minecraft:oak_trapdoor" oak_wall_sign = "minecraft:oak_wall_sign" oak_wood = "minecraft:oak_wood" observer = "minecraft:observer" obsidian = "minecraft:obsidian" orange_banner = "minecraft:orange_banner" orange_bed = "minecraft:orange_bed" orange_candle = "minecraft:orange_candle" orange_candle_cake = "minecraft:orange_candle_cake" orange_carpet = "minecraft:orange_carpet" orange_concrete = "minecraft:orange_concrete" orange_concrete_powder = "minecraft:orange_concrete_powder" orange_glazed_terracotta = "minecraft:orange_glazed_terracotta" orange_shulker_box = "minecraft:orange_shulker_box" orange_stained_glass = "minecraft:orange_stained_glass" orange_stained_glass_pane = "minecraft:orange_stained_glass_pane" orange_terracotta = "minecraft:orange_terracotta" orange_tulip = "minecraft:orange_tulip" orange_wall_banner = "minecraft:orange_wall_banner" orange_wool = "minecraft:orange_wool" oxeye_daisy = "minecraft:oxeye_daisy" oxidized_copper = "minecraft:oxidized_copper" oxidized_cut_copper = "minecraft:oxidized_cut_copper" oxidized_cut_copper_slab = "minecraft:oxidized_cut_copper_slab" oxidized_cut_copper_stairs = "minecraft:oxidized_cut_copper_stairs" packed_ice = "minecraft:packed_ice" peony = "minecraft:peony" petrified_oak_slab = "minecraft:petrified_oak_slab" pink_banner = "minecraft:pink_banner" pink_bed = "minecraft:pink_bed" pink_candle = "minecraft:pink_candle" pink_candle_cake = "minecraft:pink_candle_cake" pink_carpet = "minecraft:pink_carpet" pink_concrete = "minecraft:pink_concrete" pink_concrete_powder = "minecraft:pink_concrete_powder" pink_glazed_terracotta = "minecraft:pink_glazed_terracotta" pink_shulker_box = "minecraft:pink_shulker_box" pink_stained_glass = "minecraft:pink_stained_glass" pink_stained_glass_pane = "minecraft:pink_stained_glass_pane" pink_terracotta = "minecraft:pink_terracotta" pink_tulip = "minecraft:pink_tulip" pink_wall_banner = "minecraft:pink_wall_banner" pink_wool = "minecraft:pink_wool" piston = "minecraft:piston" piston_head = "minecraft:piston_head" player_head = "minecraft:player_head" player_wall_head = "minecraft:player_wall_head" podzol = "minecraft:podzol" pointed_dripstone = "minecraft:pointed_dripstone" polished_andesite = "minecraft:polished_andesite" polished_andesite_slab = "minecraft:polished_andesite_slab" polished_andesite_stairs = "minecraft:polished_andesite_stairs" polished_basalt = "minecraft:polished_basalt" polished_blackstone = "minecraft:polished_blackstone" polished_blackstone_brick_slab = "minecraft:polished_blackstone_brick_slab" polished_blackstone_brick_stairs = "minecraft:polished_blackstone_brick_stairs" polished_blackstone_brick_wall = "minecraft:polished_blackstone_brick_wall" polished_blackstone_bricks = "minecraft:polished_blackstone_bricks" polished_blackstone_button = "minecraft:polished_blackstone_button" polished_blackstone_pressure_plate = "minecraft:polished_blackstone_pressure_plate" polished_blackstone_slab = "minecraft:polished_blackstone_slab" polished_blackstone_stairs = "minecraft:polished_blackstone_stairs" polished_blackstone_wall = "minecraft:polished_blackstone_wall" polished_deepslate = "minecraft:polished_deepslate" polished_deepslate_slab = "minecraft:polished_deepslate_slab" polished_deepslate_stairs = "minecraft:polished_deepslate_stairs" polished_deepslate_wall = "minecraft:polished_deepslate_wall" polished_diorite = "minecraft:polished_diorite" polished_diorite_slab = "minecraft:polished_diorite_slab" polished_diorite_stairs = "minecraft:polished_diorite_stairs" polished_granite = "minecraft:polished_granite" polished_granite_slab = "minecraft:polished_granite_slab" polished_granite_stairs = "minecraft:polished_granite_stairs" poppy = "minecraft:poppy" potatoes = "minecraft:potatoes" potted_acacia_sapling = "minecraft:potted_acacia_sapling" potted_allium = "minecraft:potted_allium" potted_azalea_bush = "minecraft:potted_azalea_bush" potted_azure_bluet = "minecraft:potted_azure_bluet" potted_bamboo = "minecraft:potted_bamboo" potted_birch_sapling = "minecraft:potted_birch_sapling" potted_blue_orchid = "minecraft:potted_blue_orchid" potted_brown_mushroom = "minecraft:potted_brown_mushroom" potted_cactus = "minecraft:potted_cactus" potted_cornflower = "minecraft:potted_cornflower" potted_crimson_fungus = "minecraft:potted_crimson_fungus" potted_crimson_roots = "minecraft:potted_crimson_roots" potted_dandelion = "minecraft:potted_dandelion" potted_dark_oak_sapling = "minecraft:potted_dark_oak_sapling" potted_dead_bush = "minecraft:potted_dead_bush" potted_fern = "minecraft:potted_fern" potted_flowering_azalea_bush = "minecraft:potted_flowering_azalea_bush" potted_jungle_sapling = "minecraft:potted_jungle_sapling" potted_lily_of_the_valley = "minecraft:potted_lily_of_the_valley" potted_oak_sapling = "minecraft:potted_oak_sapling" potted_orange_tulip = "minecraft:potted_orange_tulip" potted_oxeye_daisy = "minecraft:potted_oxeye_daisy" potted_pink_tulip = "minecraft:potted_pink_tulip" potted_poppy = "minecraft:potted_poppy" potted_red_mushroom = "minecraft:potted_red_mushroom" potted_red_tulip = "minecraft:potted_red_tulip" potted_spruce_sapling = "minecraft:potted_spruce_sapling" potted_warped_fungus = "minecraft:potted_warped_fungus" potted_warped_roots = "minecraft:potted_warped_roots" potted_white_tulip = "minecraft:potted_white_tulip" potted_wither_rose = "minecraft:potted_wither_rose" powder_snow = "minecraft:powder_snow" powder_snow_cauldron = "minecraft:powder_snow_cauldron" powered_rail = "minecraft:powered_rail" prismarine = "minecraft:prismarine" prismarine_brick_slab = "minecraft:prismarine_brick_slab" prismarine_brick_stairs = "minecraft:prismarine_brick_stairs" prismarine_bricks = "minecraft:prismarine_bricks" prismarine_slab = "minecraft:prismarine_slab" prismarine_stairs = "minecraft:prismarine_stairs" prismarine_wall = "minecraft:prismarine_wall" pumpkin = "minecraft:pumpkin" pumpkin_stem = "minecraft:pumpkin_stem" purple_banner = "minecraft:purple_banner" purple_bed = "minecraft:purple_bed" purple_candle = "minecraft:purple_candle" purple_candle_cake = "minecraft:purple_candle_cake" purple_carpet = "minecraft:purple_carpet" purple_concrete = "minecraft:purple_concrete" purple_concrete_powder = "minecraft:purple_concrete_powder" purple_glazed_terracotta = "minecraft:purple_glazed_terracotta" purple_shulker_box = "minecraft:purple_shulker_box" purple_stained_glass = "minecraft:purple_stained_glass" purple_stained_glass_pane = "minecraft:purple_stained_glass_pane" purple_terracotta = "minecraft:purple_terracotta" purple_wall_banner = "minecraft:purple_wall_banner" purple_wool = "minecraft:purple_wool" purpur_block = "minecraft:purpur_block" purpur_pillar = "minecraft:purpur_pillar" purpur_slab = "minecraft:purpur_slab" purpur_stairs = "minecraft:purpur_stairs" quartz_block = "minecraft:quartz_block" quartz_bricks = "minecraft:quartz_bricks" quartz_pillar = "minecraft:quartz_pillar" quartz_slab = "minecraft:quartz_slab" quartz_stairs = "minecraft:quartz_stairs" rail = "minecraft:rail" raw_copper_block = "minecraft:raw_copper_block" raw_gold_block = "minecraft:raw_gold_block" raw_iron_block = "minecraft:raw_iron_block" red_banner = "minecraft:red_banner" red_bed = "minecraft:red_bed" red_candle = "minecraft:red_candle" red_candle_cake = "minecraft:red_candle_cake" red_carpet = "minecraft:red_carpet" red_concrete = "minecraft:red_concrete" red_concrete_powder = "minecraft:red_concrete_powder" red_glazed_terracotta = "minecraft:red_glazed_terracotta" red_mushroom = "minecraft:red_mushroom" red_mushroom_block = "minecraft:red_mushroom_block" red_nether_brick_slab = "minecraft:red_nether_brick_slab" red_nether_brick_stairs = "minecraft:red_nether_brick_stairs" red_nether_brick_wall = "minecraft:red_nether_brick_wall" red_nether_bricks = "minecraft:red_nether_bricks" red_sand = "minecraft:red_sand" red_sandstone = "minecraft:red_sandstone" red_sandstone_slab = "minecraft:red_sandstone_slab" red_sandstone_stairs = "minecraft:red_sandstone_stairs" red_sandstone_wall = "minecraft:red_sandstone_wall" red_shulker_box = "minecraft:red_shulker_box" red_stained_glass = "minecraft:red_stained_glass" red_stained_glass_pane = "minecraft:red_stained_glass_pane" red_terracotta = "minecraft:red_terracotta" red_tulip = "minecraft:red_tulip" red_wall_banner = "minecraft:red_wall_banner" red_wool = "minecraft:red_wool" redstone_block = "minecraft:redstone_block" redstone_lamp = "minecraft:redstone_lamp" redstone_ore = "minecraft:redstone_ore" redstone_torch = "minecraft:redstone_torch" redstone_wall_torch = "minecraft:redstone_wall_torch" redstone_wire = "minecraft:redstone_wire" repeater = "minecraft:repeater" repeating_command_block = "minecraft:repeating_command_block" respawn_anchor = "minecraft:respawn_anchor" rooted_dirt = "minecraft:rooted_dirt" rose_bush = "minecraft:rose_bush" sand = "minecraft:sand" sandstone = "minecraft:sandstone" sandstone_slab = "minecraft:sandstone_slab" sandstone_stairs = "minecraft:sandstone_stairs" sandstone_wall = "minecraft:sandstone_wall" scaffolding = "minecraft:scaffolding" sculk_sensor = "minecraft:sculk_sensor" sea_lantern = "minecraft:sea_lantern" sea_pickle = "minecraft:sea_pickle" seagrass = "minecraft:seagrass" shroomlight = "minecraft:shroomlight" shulker_box = "minecraft:shulker_box" skeleton_skull = "minecraft:skeleton_skull" skeleton_wall_skull = "minecraft:skeleton_wall_skull" slime_block = "minecraft:slime_block" small_amethyst_bud = "minecraft:small_amethyst_bud" small_dripleaf = "minecraft:small_dripleaf" smithing_table = "minecraft:smithing_table" smoker = "minecraft:smoker" smooth_basalt = "minecraft:smooth_basalt" smooth_quartz = "minecraft:smooth_quartz" smooth_quartz_slab = "minecraft:smooth_quartz_slab" smooth_quartz_stairs = "minecraft:smooth_quartz_stairs" smooth_red_sandstone = "minecraft:smooth_red_sandstone" smooth_red_sandstone_slab = "minecraft:smooth_red_sandstone_slab" smooth_red_sandstone_stairs = "minecraft:smooth_red_sandstone_stairs" smooth_sandstone = "minecraft:smooth_sandstone" smooth_sandstone_slab = "minecraft:smooth_sandstone_slab" smooth_sandstone_stairs = "minecraft:smooth_sandstone_stairs" smooth_stone = "minecraft:smooth_stone" smooth_stone_slab = "minecraft:smooth_stone_slab" snow = "minecraft:snow" snow_block = "minecraft:snow_block" soul_campfire = "minecraft:soul_campfire" soul_fire = "minecraft:soul_fire" soul_lantern = "minecraft:soul_lantern" soul_sand = "minecraft:soul_sand" soul_soil = "minecraft:soul_soil" soul_torch = "minecraft:soul_torch" soul_wall_torch = "minecraft:soul_wall_torch" spawner = "minecraft:spawner" sponge = "minecraft:sponge" spore_blossom = "minecraft:spore_blossom" spruce_button = "minecraft:spruce_button" spruce_door = "minecraft:spruce_door" spruce_fence = "minecraft:spruce_fence" spruce_fence_gate = "minecraft:spruce_fence_gate" spruce_leaves = "minecraft:spruce_leaves" spruce_log = "minecraft:spruce_log" spruce_planks = "minecraft:spruce_planks" spruce_pressure_plate = "minecraft:spruce_pressure_plate" spruce_sapling = "minecraft:spruce_sapling" spruce_sign = "minecraft:spruce_sign" spruce_slab = "minecraft:spruce_slab" spruce_stairs = "minecraft:spruce_stairs" spruce_trapdoor = "minecraft:spruce_trapdoor" spruce_wall_sign = "minecraft:spruce_wall_sign" spruce_wood = "minecraft:spruce_wood" sticky_piston = "minecraft:sticky_piston" stone = "minecraft:stone" stone_brick_slab = "minecraft:stone_brick_slab" stone_brick_stairs = "minecraft:stone_brick_stairs" stone_brick_wall = "minecraft:stone_brick_wall" stone_bricks = "minecraft:stone_bricks" stone_button = "minecraft:stone_button" stone_pressure_plate = "minecraft:stone_pressure_plate" stone_slab = "minecraft:stone_slab" stone_stairs = "minecraft:stone_stairs" stonecutter = "minecraft:stonecutter" stripped_acacia_log = "minecraft:stripped_acacia_log" stripped_acacia_wood = "minecraft:stripped_acacia_wood" stripped_birch_log = "minecraft:stripped_birch_log" stripped_birch_wood = "minecraft:stripped_birch_wood" stripped_crimson_hyphae = "minecraft:stripped_crimson_hyphae" stripped_crimson_stem = "minecraft:stripped_crimson_stem" stripped_dark_oak_log = "minecraft:stripped_dark_oak_log" stripped_dark_oak_wood = "minecraft:stripped_dark_oak_wood" stripped_jungle_log = "minecraft:stripped_jungle_log" stripped_jungle_wood = "minecraft:stripped_jungle_wood" stripped_oak_log = "minecraft:stripped_oak_log" stripped_oak_wood = "minecraft:stripped_oak_wood" stripped_spruce_log = "minecraft:stripped_spruce_log" stripped_spruce_wood = "minecraft:stripped_spruce_wood" stripped_warped_hyphae = "minecraft:stripped_warped_hyphae" stripped_warped_stem = "minecraft:stripped_warped_stem" structure_block = "minecraft:structure_block" structure_void = "minecraft:structure_void" sugar_cane = "minecraft:sugar_cane" sunflower = "minecraft:sunflower" sweet_berry_bush = "minecraft:sweet_berry_bush" tall_grass = "minecraft:tall_grass" tall_seagrass = "minecraft:tall_seagrass" target = "minecraft:target" terracotta = "minecraft:terracotta" tinted_glass = "minecraft:tinted_glass" tnt = "minecraft:tnt" torch = "minecraft:torch" trapped_chest = "minecraft:trapped_chest" tripwire = "minecraft:tripwire" tripwire_hook = "minecraft:tripwire_hook" tube_coral = "minecraft:tube_coral" tube_coral_block = "minecraft:tube_coral_block" tube_coral_fan = "minecraft:tube_coral_fan" tube_coral_wall_fan = "minecraft:tube_coral_wall_fan" tuff = "minecraft:tuff" turtle_egg = "minecraft:turtle_egg" twisting_vines = "minecraft:twisting_vines" twisting_vines_plant = "minecraft:twisting_vines_plant" vine = "minecraft:vine" void_air = "minecraft:void_air" wall_torch = "minecraft:wall_torch" warped_button = "minecraft:warped_button" warped_door = "minecraft:warped_door" warped_fence = "minecraft:warped_fence" warped_fence_gate = "minecraft:warped_fence_gate" warped_fungus = "minecraft:warped_fungus" warped_hyphae = "minecraft:warped_hyphae" warped_nylium = "minecraft:warped_nylium" warped_planks = "minecraft:warped_planks" warped_pressure_plate = "minecraft:warped_pressure_plate" warped_roots = "minecraft:warped_roots" warped_sign = "minecraft:warped_sign" warped_slab = "minecraft:warped_slab" warped_stairs = "minecraft:warped_stairs" warped_stem = "minecraft:warped_stem" warped_trapdoor = "minecraft:warped_trapdoor" warped_wall_sign = "minecraft:warped_wall_sign" warped_wart_block = "minecraft:warped_wart_block" water = "minecraft:water" water_cauldron = "minecraft:water_cauldron" waxed_copper_block = "minecraft:waxed_copper_block" waxed_cut_copper = "minecraft:waxed_cut_copper" waxed_cut_copper_slab = "minecraft:waxed_cut_copper_slab" waxed_cut_copper_stairs = "minecraft:waxed_cut_copper_stairs" waxed_exposed_copper = "minecraft:waxed_exposed_copper" waxed_exposed_cut_copper = "minecraft:waxed_exposed_cut_copper" waxed_exposed_cut_copper_slab = "minecraft:waxed_exposed_cut_copper_slab" waxed_exposed_cut_copper_stairs = "minecraft:waxed_exposed_cut_copper_stairs" waxed_oxidized_copper = "minecraft:waxed_oxidized_copper" waxed_oxidized_cut_copper = "minecraft:waxed_oxidized_cut_copper" waxed_oxidized_cut_copper_slab = "minecraft:waxed_oxidized_cut_copper_slab" waxed_oxidized_cut_copper_stairs = "minecraft:waxed_oxidized_cut_copper_stairs" waxed_weathered_copper = "minecraft:waxed_weathered_copper" waxed_weathered_cut_copper = "minecraft:waxed_weathered_cut_copper" waxed_weathered_cut_copper_slab = "minecraft:waxed_weathered_cut_copper_slab" waxed_weathered_cut_copper_stairs = "minecraft:waxed_weathered_cut_copper_stairs" weathered_copper = "minecraft:weathered_copper" weathered_cut_copper = "minecraft:weathered_cut_copper" weathered_cut_copper_slab = "minecraft:weathered_cut_copper_slab" weathered_cut_copper_stairs = "minecraft:weathered_cut_copper_stairs" weeping_vines = "minecraft:weeping_vines" weeping_vines_plant = "minecraft:weeping_vines_plant" wet_sponge = "minecraft:wet_sponge" wheat = "minecraft:wheat" white_banner = "minecraft:white_banner" white_bed = "minecraft:white_bed" white_candle = "minecraft:white_candle" white_candle_cake = "minecraft:white_candle_cake" white_carpet = "minecraft:white_carpet" white_concrete = "minecraft:white_concrete" white_concrete_powder = "minecraft:white_concrete_powder" white_glazed_terracotta = "minecraft:white_glazed_terracotta" white_shulker_box = "minecraft:white_shulker_box" white_stained_glass = "minecraft:white_stained_glass" white_stained_glass_pane = "minecraft:white_stained_glass_pane" white_terracotta = "minecraft:white_terracotta" white_tulip = "minecraft:white_tulip" white_wall_banner = "minecraft:white_wall_banner" white_wool = "minecraft:white_wool" wither_rose = "minecraft:wither_rose" wither_skeleton_skull = "minecraft:wither_skeleton_skull" wither_skeleton_wall_skull = "minecraft:wither_skeleton_wall_skull" yellow_banner = "minecraft:yellow_banner" yellow_bed = "minecraft:yellow_bed" yellow_candle = "minecraft:yellow_candle" yellow_candle_cake = "minecraft:yellow_candle_cake" yellow_carpet = "minecraft:yellow_carpet" yellow_concrete = "minecraft:yellow_concrete" yellow_concrete_powder = "minecraft:yellow_concrete_powder" yellow_glazed_terracotta = "minecraft:yellow_glazed_terracotta" yellow_shulker_box = "minecraft:yellow_shulker_box" yellow_stained_glass = "minecraft:yellow_stained_glass" yellow_stained_glass_pane = "minecraft:yellow_stained_glass_pane" yellow_terracotta = "minecraft:yellow_terracotta" yellow_wall_banner = "minecraft:yellow_wall_banner" yellow_wool = "minecraft:yellow_wool" zombie_head = "minecraft:zombie_head" zombie_wall_head = "minecraft:zombie_wall_head"
32.944598
84
0.818397
7,508
59,465
5.961241
0.043154
0.025739
0.017159
0.008937
0.593203
0.371852
0.166991
0.07572
0.024354
0.007239
0
0
0.105928
59,465
1,804
85
32.96286
0.841835
0.272715
0
0
0
0
0.531342
0.449811
0
0
0
0
0
1
0
false
0
0.001111
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
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
2
a2e02eab078bd16eed207f0dec892a0d4d4f7188
383
py
Python
backend/classes/messages.py
heshikirihasebe/fastapi-instagram-clone
7bc265a62160171c5c5c1b2f18b3c86833cb64e7
[ "MIT" ]
1
2022-02-08T19:35:22.000Z
2022-02-08T19:35:22.000Z
backend/classes/messages.py
heshikirihasebe/fastapi-instagram-clone
7bc265a62160171c5c5c1b2f18b3c86833cb64e7
[ "MIT" ]
null
null
null
backend/classes/messages.py
heshikirihasebe/fastapi-instagram-clone
7bc265a62160171c5c5c1b2f18b3c86833cb64e7
[ "MIT" ]
null
null
null
class Messages: USERS_1 = 'Username already exists.' USERS_2 = 'Email already exists.' USERS_3 = 'Password and Confirm Password must be same.' USERS_4 = 'Username or Password is incorrect.' USERS_5 = 'Your email address is not verified.' TOKENS_1 = 'Token does not exist.' TOKENS_2 = 'User does not exist.' TOKENS_3 = 'Your email has been verified.'
34.818182
59
0.684073
55
383
4.618182
0.581818
0.102362
0.141732
0.141732
0
0
0
0
0
0
0
0.027119
0.229765
383
10
60
38.3
0.833898
0
0
0
0
0
0.592689
0
0
0
0
0
0
1
0
false
0.222222
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
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
2
a2e5546861e18ab3b5996c14c8e933fe14e83823
1,724
py
Python
GraphStructure.py
lucioreis/cutWidthProblem
338657fba5a5b183f7e8cbbae4d17cfe52ab0368
[ "MIT" ]
null
null
null
GraphStructure.py
lucioreis/cutWidthProblem
338657fba5a5b183f7e8cbbae4d17cfe52ab0368
[ "MIT" ]
null
null
null
GraphStructure.py
lucioreis/cutWidthProblem
338657fba5a5b183f7e8cbbae4d17cfe52ab0368
[ "MIT" ]
null
null
null
import numpy as np class Graph(object): def __init__(self, name, num_vertices, num_arcs, arcs): self.instance_name = name self.num_vertices = num_vertices self.vertices = [i for i in range(1, num_vertices+1)] self.num_arcs = num_arcs self.arcs = [vertice for pair in arcs for vertice in pair] self.index = 0 def __str__(self): return self.__str_arcs() def __getitem__(self, indice): return self.arcs[indice] def __next__(self): try: v1 = self.arcs[self.index] v2 = self.arcs[self.index+1] self.index += 2 return (v1, v2) except IndexError: self.index = 0 raise StopIteration def __iter__(self): return self def __repr__(self): return "\n***\nname: %s\nn_vertices: %d ,n_edges: %d, n_arcs:%d \n%s\n" % ( self.instance_name, self.num_vertices, self.edges, self.num_arcs, __str_arcs() ) def __len__(self): return len(self.arcs) def __format__(self, format_spec): return self.__str__() def swap(one, other): indx_one = self.vertice.index(one) indx_other = self.vertice.index(other) self.vertice[indx_one], self.vertice[indx_other] = self.vertice[indx_other], self.vertice[indx_one] for vertice in self.arcs: if vertice == one: vertice = other if vertice == other: vertice = one def __str_arcs(self): _str_ = "({} {})|"*(len(self.arcs)//2) _str_ = "<|{}|>\n".format(_str_) return _str_.format(*self.arcs)
28.262295
107
0.553364
215
1,724
4.093023
0.246512
0.072727
0.072727
0.068182
0.092045
0.0625
0.0625
0
0
0
0
0.009549
0.331787
1,724
60
108
28.733333
0.75434
0
0
0.040816
0
0.020408
0.045244
0
0
0
0
0
0
1
0.204082
false
0
0.020408
0.122449
0.408163
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
a2e7fc519ce31140bac0bd2fd12dfa3c2c297c44
923
py
Python
analysis/notebooks/DriveControl/env.py
dwes7/bobble_controllers
8d33153bdc33a7dc3bfbf9996df80a0ffde3dda2
[ "BSD-3-Clause" ]
64
2019-04-20T09:23:59.000Z
2022-03-22T06:14:56.000Z
analysis/notebooks/DriveControl/env.py
dwes7/bobble_controllers
8d33153bdc33a7dc3bfbf9996df80a0ffde3dda2
[ "BSD-3-Clause" ]
13
2019-08-12T19:27:34.000Z
2022-03-22T05:56:16.000Z
analysis/notebooks/DriveControl/env.py
dwes7/bobble_controllers
8d33153bdc33a7dc3bfbf9996df80a0ffde3dda2
[ "BSD-3-Clause" ]
18
2019-04-22T19:48:19.000Z
2021-08-05T14:02:00.000Z
# Establish the analysis environment used with Jupyter Notebook import os, sys os.sys.path.append('/home/mike/.local/lib/python2.7/site-packages/') import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import numpy as np import scipy import scipy.fftpack import math from analysis_tools.parsing import * from analysis_tools.plots import * from analysis_tools.filters import * # Set some global plotting configs. We want these for all plots sns.set_context("poster", font_scale=1.1) #sns.set_palette("Dark2") # Set paths to relevant data directories and config files drive_fwd_bwd_data_home = os.path.abspath(os.path.join('data', 'drive_fwd_bwd')) drive_square_data_home = os.path.abspath(os.path.join('data', 'drive_square')) # Load configs and data df = parse_all_runs_in_dir(drive_fwd_bwd_data_home) df.update(parse_all_runs_in_dir(drive_square_data_home))
31.827586
80
0.802817
153
923
4.640523
0.51634
0.04507
0.071831
0.064789
0.209859
0.174648
0.112676
0.112676
0.112676
0.112676
0
0.006046
0.104009
923
28
81
32.964286
0.852479
0.24377
0
0
0
0
0.127352
0.06657
0
0
0
0
0
1
0
false
0
0.631579
0
0.631579
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
a2ecf5d8a99ac240e90c3ca46f88d042eb917cb1
2,325
py
Python
setup.py
eegemberdiev/probablepeople
48a51e83393135aef4874db244be60216f49d8ae
[ "MIT" ]
505
2015-02-06T13:51:47.000Z
2022-03-01T00:53:48.000Z
setup.py
eegemberdiev/probablepeople
48a51e83393135aef4874db244be60216f49d8ae
[ "MIT" ]
98
2015-02-06T15:19:08.000Z
2021-11-19T20:45:38.000Z
setup.py
eegemberdiev/probablepeople
48a51e83393135aef4874db244be60216f49d8ae
[ "MIT" ]
69
2015-02-05T11:16:25.000Z
2022-03-22T06:18:17.000Z
try: from setuptools import setup except ImportError : raise ImportError("setuptools module required, please go to https://pypi.python.org/pypi/setuptools and follow the instructions for installing setuptools") setup( version='0.5.4', url='https://github.com/datamade/probablepeople', description='Parse romanized names & companies using advanced NLP methods', name='probablepeople', packages=['probablepeople'], package_data={'probablepeople' : ['generic_learned_settings.crfsuite', 'person_learned_settings.crfsuite', 'company_learned_settings.crfsuite']}, license='The MIT License: http://www.opensource.org/licenses/mit-license.php', install_requires=[ 'python-crfsuite>=0.8', 'probableparsing', 'future>=0.14', 'doublemetaphone'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Information Analysis'], long_description=""" probablepeople is a python library for parsing unstructured romanized name or company strings into components, using conditional random fields. From the python interpreter: >>> import probablepeople >>> probablepeople.parse('Mr George "Gob" Bluth II') [('Mr', 'PrefixMarital'), ('George', 'GivenName'), ('"Gob"', 'Nickname'), ('Bluth', 'Surname'), ('II', 'SuffixGenerational')] >>> probablepeople.parse('Sitwell Housing Inc') [('Sitwell', 'CorporationName'), ('Housing', 'CorporationName'), ('Inc', 'CorporationLegalType')] """ )
41.517857
159
0.610753
210
2,325
6.719048
0.604762
0.053863
0.070872
0.05528
0
0
0
0
0
0
0
0.009265
0.257204
2,325
55
160
42.272727
0.807759
0
0
0
0
0.039216
0.738065
0.103656
0
0
0
0
0
1
0
true
0
0.078431
0
0.078431
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
a2fa126c5d86d31b68509d340de3c22fa1d59110
354
py
Python
openvqa/utils/make_mask.py
AcceptedDoge/openvqa
060e6b76a6a9fb86363a104fc34ce10bd2daa6f4
[ "Apache-2.0" ]
274
2019-07-07T05:00:07.000Z
2022-03-30T03:49:26.000Z
openvqa/utils/make_mask.py
AcceptedDoge/openvqa
060e6b76a6a9fb86363a104fc34ce10bd2daa6f4
[ "Apache-2.0" ]
24
2019-08-11T19:32:01.000Z
2022-03-12T04:53:45.000Z
openvqa/utils/make_mask.py
AcceptedDoge/openvqa
060e6b76a6a9fb86363a104fc34ce10bd2daa6f4
[ "Apache-2.0" ]
73
2019-07-10T11:49:10.000Z
2022-03-30T02:12:13.000Z
# -------------------------------------------------------- # OpenVQA # Written by Yuhao Cui https://github.com/cuiyuhao1996 # -------------------------------------------------------- import torch # Masking the sequence mask def make_mask(feature): return (torch.sum( torch.abs(feature), dim=-1 ) == 0).unsqueeze(1).unsqueeze(2)
25.285714
58
0.440678
32
354
4.84375
0.8125
0
0
0
0
0
0
0
0
0
0
0.026667
0.152542
354
14
59
25.285714
0.49
0.564972
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0.166667
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
2
a2fd38f160723eb7dcf2485e9fa2a6cd2549768c
2,432
py
Python
test.py
animesh0123/Protocol_script
6affc53289424cdf231762da665553d38debc74a
[ "MIT" ]
null
null
null
test.py
animesh0123/Protocol_script
6affc53289424cdf231762da665553d38debc74a
[ "MIT" ]
null
null
null
test.py
animesh0123/Protocol_script
6affc53289424cdf231762da665553d38debc74a
[ "MIT" ]
null
null
null
def code_function(): #function begin############################################ global code code=""" `include "{0}_env.sv" class {0}_model_base_test extends uvm_test; `uvm_component_utils({0}_model_base_test) //--------------------------------------- // env instance //--------------------------------------- {0}_model_env env; //--------------------------------------- // constructor //--------------------------------------- function new(string name = "{0}_model_base_test",uvm_component parent=null); super.new(name,parent); endfunction : new //--------------------------------------- // build_phase //--------------------------------------- virtual function void build_phase(uvm_phase phase); super.build_phase(phase); // Create the env env = {0}_model_env::type_id::create("env", this); endfunction : build_phase //--------------------------------------- // end_of_elobaration phase //--------------------------------------- virtual function void end_of_elaboration(); //print's the topology print(); endfunction //--------------------------------------- // end_of_elobaration phase //--------------------------------------- function void report_phase(uvm_phase phase); uvm_report_server svr; super.report_phase(phase); svr = uvm_report_server::get_server(); if(svr.get_severity_count(UVM_FATAL)+svr.get_severity_count(UVM_ERROR)>0) begin `uvm_info(get_type_name(), "---------------------------------------", UVM_NONE) `uvm_info(get_type_name(), "---- TEST FAIL ----", UVM_NONE) `uvm_info(get_type_name(), "---------------------------------------", UVM_NONE) end else begin `uvm_info(get_type_name(), "---------------------------------------", UVM_NONE) `uvm_info(get_type_name(), "---- TEST PASS ----", UVM_NONE) `uvm_info(get_type_name(), "---------------------------------------", UVM_NONE) end endfunction endclass : {0}_model_base_test """.format(protocol_name) print(code) #function end############################################ fh=open("protocol.csv","r") for protocol_name in fh: protocol_name=protocol_name.strip("\n") fph=open('{0}_test.sv'.format(protocol_name),"w") code_function() fph.write(code)
30.78481
85
0.455181
230
2,432
4.469565
0.304348
0.035019
0.058366
0.081712
0.212062
0.169261
0.169261
0.169261
0.169261
0.169261
0
0.004532
0.183388
2,432
78
86
31.179487
0.513092
0.010691
0
0.344828
0
0
0.880771
0.48857
0
0
0
0
0
1
0.017241
false
0.017241
0
0
0.017241
0.051724
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
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0c229747189f5f6b65672cbc230c2329b48b603d
2,927
py
Python
social_network/social_network/settings/base.py
OSAMAMOHAMED1234/django_projects
ef4ac976411ae5ae8e91a2665314b2d7e0bcf7e9
[ "MIT" ]
3
2018-05-02T20:37:11.000Z
2020-10-15T17:19:26.000Z
social_network/social_network/settings/base.py
OSAMAMOHAMED1234/django_projects
ef4ac976411ae5ae8e91a2665314b2d7e0bcf7e9
[ "MIT" ]
1
2019-06-10T21:35:13.000Z
2019-06-10T21:35:13.000Z
social_network/social_network/settings/base.py
OSAMAMOHAMED1234/django_projects
ef4ac976411ae5ae8e91a2665314b2d7e0bcf7e9
[ "MIT" ]
null
null
null
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # SECRET_KEY = 'dqh#2deu1)#l1m(p))22_gn4x@33$^9g7zi*^0m(e9z182+%bc' SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'accounts.apps.AccountsConfig', 'home.apps.HomeConfig', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', # 'social_network.middleware.LoginRequiredMiddleware' ] ROOT_URLCONF = 'social_network.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')] , 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'social_network.wsgi.application' AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True STATIC_URL = '/static/' MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'social_network/media/') LOGIN_REDIRECT_URL = '/home/' LOGIN_URL = '/account/login/' LOGIN_EXEMPT_URL = ( r'^account/logout/$', r'^account/register/$', r'^account/profile/edit/reset_password/$', r'^account/profile/edit/reset_password/done/$', r'^account/profile/edit/reset_password/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', r'^account/profile/edit/reset_password/complete/$', ) DEFAULT_FROM_EMAIL = 'osama.buy.sell@gmail.com' SERVER_EMAIL = 'osama.buy.sell@gmail.com' EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = 'osama.buy.sell@gmail.com' EMAIL_HOST_PASSWORD = 'chnuxoeikqtyeclg' EMAIL_USE_TLS = True
27.87619
93
0.690468
317
2,927
6.18612
0.416404
0.099439
0.060683
0.042835
0.225905
0.208567
0.022947
0.022947
0
0
0
0.010599
0.161941
2,927
104
94
28.144231
0.78883
0.039289
0
0
0
0.012195
0.569291
0.474172
0
0
0
0
0
1
0
false
0.121951
0.012195
0
0.012195
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
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
0c30525d232987613d3458682d58a8b8179affdc
166
py
Python
src/model/game/agent/manualagent.py
Jagermeister/expeditions
b5cfece24aa84da8342e0e1b457b8dab775d7a15
[ "MIT" ]
null
null
null
src/model/game/agent/manualagent.py
Jagermeister/expeditions
b5cfece24aa84da8342e0e1b457b8dab775d7a15
[ "MIT" ]
null
null
null
src/model/game/agent/manualagent.py
Jagermeister/expeditions
b5cfece24aa84da8342e0e1b457b8dab775d7a15
[ "MIT" ]
null
null
null
from .agent import Agent class ManualAgent(Agent): name = 'Manual' def move_from_state(self): self.model.state_display() return int(input())
20.75
34
0.656627
21
166
5.047619
0.761905
0
0
0
0
0
0
0
0
0
0
0
0.23494
166
8
35
20.75
0.834646
0
0
0
0
0
0.035928
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.833333
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
0c3260f8db855d31d1baa7a5d73b8d24f6e67590
3,049
py
Python
filterizePy/test/test_greenscale.py
chaomander2018/filterizePy
304a2c1e136569beb387622ed8994d753e29dfa4
[ "MIT" ]
null
null
null
filterizePy/test/test_greenscale.py
chaomander2018/filterizePy
304a2c1e136569beb387622ed8994d753e29dfa4
[ "MIT" ]
10
2019-02-06T19:59:22.000Z
2019-03-05T23:00:02.000Z
filterizePy/test/test_greenscale.py
chaomander2018/filterizePy
304a2c1e136569beb387622ed8994d753e29dfa4
[ "MIT" ]
2
2019-02-06T04:33:52.000Z
2019-02-06T07:19:38.000Z
# Copyright 2019 Akansha Vashisth # Licensed under the MIT License (the "License"). # you may not use this file except in compliance with the License. # You may obtain a copy of the License at https://mit-license.org # February 2019 # This script tests color function of filterizePy package. import pytest import numpy as np import pandas as pd import os import imghdr import skimage.io from filterizePy.greenscale import greenscale def test_greenscale_white(): # White image testing test_img = np.array([[[255, 255, 255],[255, 255, 255],[255, 255, 255]] , [[255, 255, 255],[255, 255, 255],[255, 255, 255]], [[255, 255, 255],[255, 255, 255],[255, 255, 255]], [[255, 255, 255],[255, 255, 255],[255, 255, 255]], [[255, 255, 255],[255, 255, 255],[255, 255, 255]]], dtype = "uint8") gs_test_img = np.array([[[ 0, 230, 0],[ 0, 230, 0],[ 0, 230, 0]], [[ 0, 230, 0],[ 0, 230, 0],[ 0, 230, 0]], [[ 0, 230, 0],[ 0, 230, 0],[ 0, 230, 0]], [[ 0, 230, 0],[ 0, 230, 0],[ 0, 230, 0]], [[ 0, 230, 0],[ 0, 230, 0],[ 0, 230, 0]]], dtype = "uint8") greenscale("test_img/test_img.png") output_expected = skimage.io.imread("test_img/gs_test_img.png") assert np.array_equal(output_expected, gs_test_img), "The greenscale function does not work properly." def test_greenscale_black(): # Black image testing test_img_black = np.array([[[0, 0, 0]]], dtype = "uint8") gs_test_img_black = np.array([[[0, 0, 0]]], dtype = "uint8") greenscale("test_img/test_img_black.jpeg") output_expected = skimage.io.imread("test_img/test_img_black.jpeg") assert np.array_equal(output_expected, gs_test_img_black), "The greenscale function does not work properly." def test_same_size(): # Checking input and output size input_img = "test_img/test_original.jpg" greenscale(input_img) input_img = skimage.io.imread('test_img/test_original.jpg') output_img = skimage.io.imread('test_img/gs_test_original.jpg') assert input_img.shape == output_img.shape, "Input and output dimensions do not match" def check_output_type(): input_img = "test_img/test_original.jpg" greenscale(input_img) input_img = skimage.io.imread('test_img/test_original.jpg') output_img = skimage.io.imread('test_img/gs_test_original.jpg') assert imghdr.what(output_img) in ['png','jpeg','gif','bmp','jpg'] and imghdr.what(output_img)==imghdr.what(input_img),"The output image has a different file formatest_img" def test_input_img(): input_img = "test_img/test_original.jpg" greenscale(input_img) with pytest.raises(FileNotFoundError): greenscale("not a file path") def test_invalid_input(): with pytest.raises(AttributeError): greenscale(123) def test_invalid_input_type_error(): with pytest.raises(FileNotFoundError): greenscale("Hi")
43.557143
176
0.636274
437
3,049
4.26087
0.221968
0.141783
0.207841
0.270677
0.56928
0.511815
0.498389
0.456498
0.425349
0.330827
0
0.097633
0.224008
3,049
69
177
44.188406
0.689349
0.114792
0
0.36
0
0
0.195984
0.107475
0
0
0
0
0.08
1
0.14
false
0
0.14
0
0.28
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0c370dfb0d3d90bfa2911839e7650a9cbf787c97
2,002
py
Python
pychron/igsn/tasks/preferences.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/igsn/tasks/preferences.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/igsn/tasks/preferences.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2015 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # =============================================================================== # ============= enthought library imports ======================= from __future__ import absolute_import from envisage.ui.tasks.preferences_pane import PreferencesPane from traits.api import Str, Password, BaseStr from traitsui.api import View, Item, VGroup from pychron.envisage.tasks.base_preferences_helper import BasePreferencesHelper class UserCodeStr(BaseStr): def validate(self, obj, name, value): if len(value) < 3: self.error(obj, name, value) else: return value class IGSNPreferences(BasePreferencesHelper): preferences_path = "pychron.igsn" username = Str password = Password user_code = UserCodeStr class IGSNPreferencesPane(PreferencesPane): model_factory = IGSNPreferences category = "IGSN" def traits_view(self): auth_grp = VGroup( Item("username"), Item("password"), show_border=True, label="Authentication" ) v = View( VGroup( Item( "user_code", tooltip="Three+ alphanumeric characters used as a sample prefix", ), auth_grp, ) ) return v # ============= EOF =============================================
31.777778
88
0.585914
208
2,002
5.5625
0.620192
0.051858
0.022472
0.027658
0
0
0
0
0
0
0
0.005799
0.224775
2,002
62
89
32.290323
0.739691
0.414585
0
0
0
0
0.094454
0
0
0
0
0
0
1
0.060606
false
0.090909
0.151515
0
0.545455
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
2
0c38aa7b50c0c43e73c62ee122df2d4c2b2e5c3f
276
py
Python
vedastr/datasets/__init__.py
YacobBY/vedastr
2353780489b58d2398b9af49d238ef0df3f45f2a
[ "Apache-2.0" ]
null
null
null
vedastr/datasets/__init__.py
YacobBY/vedastr
2353780489b58d2398b9af49d238ef0df3f45f2a
[ "Apache-2.0" ]
null
null
null
vedastr/datasets/__init__.py
YacobBY/vedastr
2353780489b58d2398b9af49d238ef0df3f45f2a
[ "Apache-2.0" ]
null
null
null
from .lmdb_dataset import LmdbDataset from .fold_dataset import FolderDataset from .txt_datasets import TxtDataset from .concat_dataset import ConcatDatasets from .builder import build_datasets __all__ = [ 'LmdbDataset', 'build_datasets', 'FolderDataset', 'TxtDataset' ]
27.6
66
0.811594
31
276
6.903226
0.483871
0.182243
0
0
0
0
0
0
0
0
0
0
0.119565
276
10
67
27.6
0.880658
0
0
0
0
0
0.173285
0
0
0
0
0
0
1
0
false
0
0.625
0
0.625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
2
0c4027d92a955ad4298f8df066f01632ca8a5a60
1,872
py
Python
conekt/models/relationships/cluster_similarity.py
legumeinfo/CoNekT
709a4980cfa255cafd456b268e274db2b4b1f5fb
[ "MIT" ]
14
2018-08-20T03:07:21.000Z
2021-11-04T11:15:31.000Z
conekt/models/relationships/cluster_similarity.py
mutwil/CoNekT
f4a4496a87d14b15bcf587975b31a2edc24c6bf7
[ "MIT" ]
9
2018-07-17T15:30:47.000Z
2021-07-05T13:11:54.000Z
conekt/models/relationships/cluster_similarity.py
mutwil/CoNekT
f4a4496a87d14b15bcf587975b31a2edc24c6bf7
[ "MIT" ]
3
2019-08-05T09:16:34.000Z
2019-12-04T23:59:28.000Z
from conekt import db class CoexpressionClusterSimilarity(db.Model): __tablename__ = 'coexpression_cluster_similarity' __table_args__ = {'extend_existing': True} id = db.Column(db.Integer, primary_key=True) source_id = db.Column(db.Integer, db.ForeignKey('coexpression_clusters.id', ondelete='CASCADE')) target_id = db.Column(db.Integer, db.ForeignKey('coexpression_clusters.id', ondelete='CASCADE')) gene_family_method_id = db.Column('gene_family_method_id', db.Integer, db.ForeignKey('gene_family_methods.id', ondelete='CASCADE'), index=True) jaccard_index = db.Column(db.Float, index=True) p_value = db.Column(db.Float, index=True) corrected_p_value = db.Column(db.Float, index=True) source = db.relationship('CoexpressionCluster', backref=db.backref('similarity_sources', lazy='dynamic', passive_deletes=True), lazy='joined', foreign_keys=[source_id]) target = db.relationship('CoexpressionCluster', backref=db.backref('similarity_targets', lazy='dynamic', passive_deletes=True) , lazy='joined', foreign_keys=[target_id]) gene_family_method = db.relationship('GeneFamilyMethod', backref=db.backref('CoexpressionClusterSimilarities', passive_deletes=True), lazy='joined') @staticmethod def empty_table(): """ Delete all content from this table. Use carefully ! """ CoexpressionClusterSimilarity.query.delete()
48
135
0.558761
168
1,872
5.982143
0.363095
0.055721
0.059701
0.035821
0.522388
0.435821
0.41194
0.294527
0.234826
0.135323
0
0
0.343483
1,872
38
136
49.263158
0.817738
0.027244
0
0.076923
0
0
0.173066
0.085142
0
0
0
0
0
1
0.038462
false
0.115385
0.038462
0
0.576923
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
0c4397645e246108bd4c7a61c446a9d5855c0a2a
496
py
Python
Ago-Dic-2017/GeorginaValenzuela/Primer Parcial/television.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2017/GeorginaValenzuela/Primer Parcial/television.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2017/GeorginaValenzuela/Primer Parcial/television.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
class Television(Electrodomestico) def __init__(self, modelo, marca, color, numSerie, voltaje): super().__init__(modelo, marca, color, numSerie, voltaje) self.pulgadas = pulgadas #Metodo getter y setter de pulgadas def get_pulgadas(self): return self.pulgadas def set_pulgadas(self): self.pulgadas = pulgadas #Metodo para conectarse a internet solo manda un mensaje def conectarse_internet print ("Estas conectado a internet"):
29.176471
65
0.691532
58
496
5.724138
0.551724
0.108434
0.096386
0.144578
0.186747
0
0
0
0
0
0
0
0.233871
496
16
66
31
0.873684
0.179435
0
0.2
0
0
0.064198
0
0
0
0
0.0625
0
0
null
null
0
0
null
null
0.1
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
0c4bebec021f3600328d4ec8ebbc184674ca3576
186
py
Python
Ladder 11/Python/027.Petya and Strings.py
purush34/a2oj-solutions
1ce6e2647b2f2ae47d3c03337ae4af1a7d5c8edb
[ "MIT" ]
null
null
null
Ladder 11/Python/027.Petya and Strings.py
purush34/a2oj-solutions
1ce6e2647b2f2ae47d3c03337ae4af1a7d5c8edb
[ "MIT" ]
1
2021-12-01T06:53:18.000Z
2021-12-01T07:09:31.000Z
Ladder 11/Python/027.Petya and Strings.py
purush34/a2oj-solutions
1ce6e2647b2f2ae47d3c03337ae4af1a7d5c8edb
[ "MIT" ]
4
2021-10-31T16:36:28.000Z
2021-12-01T05:48:31.000Z
x = list(input().lower()) y = list(input().lower()) for i,j in zip(x,y): if i>j: print("1") break elif i<j: print("-1") break else: print("0")
16.909091
25
0.451613
30
186
2.8
0.566667
0.071429
0.333333
0.190476
0.309524
0
0
0
0
0
0
0.02439
0.33871
186
11
26
16.909091
0.658537
0
0
0.181818
0
0
0.02139
0
0
0
0
0
0
1
0
false
0
0
0
0
0.272727
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
0c55265dfd038fd90a707d4e207c8933050fe621
3,996
py
Python
cloudrun/api.py
cloudruninc/cloudrun-python
dbe95bc2b4a60fdf8cfc5ad10485aa70677944dc
[ "MIT" ]
7
2017-08-12T16:54:21.000Z
2021-11-29T12:26:20.000Z
cloudrun/api.py
cloudruninc/cloudrun-python
dbe95bc2b4a60fdf8cfc5ad10485aa70677944dc
[ "MIT" ]
16
2017-08-12T16:19:39.000Z
2019-11-02T21:52:29.000Z
cloudrun/api.py
cloudruninc/cloudrun-python
dbe95bc2b4a60fdf8cfc5ad10485aa70677944dc
[ "MIT" ]
null
null
null
""" api.py """ import requests class Api: """First layer above HTTP API requests.""" def __init__(self, url, token, debug=False, timer=False): """Returns a new Cloudrun session.""" self.base_url = url.rstrip('/') self.token = token self.debug = debug self.timer = timer self.headers = {'Authorization': 'Bearer ' + self.token} def create_run(self, model, version): """Creates a new run.""" url = self.base_url + '/runs' headers = {'Authorization': 'Bearer ' + self.token} data = {'model': model, 'version': version} r = requests.post(url, headers=headers, data=data) return r.status_code, r.json() def delete_run(self, runid): """Deletes an existing run.""" url = self.base_url + '/runs/' + runid headers = {'Authorization': 'Bearer ' + self.token} r = requests.delete(url, headers=headers) return r.status_code, r.json() def get_run(self, runid): """Returns an existing run.""" url = self.base_url + '/runs/' + runid headers = {'Authorization': 'Bearer ' + self.token} r = requests.get(url, headers=headers) return r.status_code, r.json() def patch_run(self, runid, json_patch): """Applies a JSON patch to a run.""" url = self.base_url + '/runs/' + runid headers = {'Authorization': 'Bearer ' + self.token} r = requests.patch(url, headers=headers, json=json_patch) return r.status_code, r.json() def start_run(self, runid): """Starts a run.""" url = self.base_url + '/runs/' + runid + '/start' headers = {'Authorization': 'Bearer ' + self.token} r = requests.post(url, headers=headers) return r.status_code, r.json() def upload_file(self, runid, filename): """Uploads a file to a run.""" headers = {'Authorization': 'Bearer ' + self.token, 'Origin': 'cloudrun.co'} url = self.base_url + '/runs/' + runid + '/input' files = {'file': open(filename, 'rb')} r = requests.post(url, headers=headers, files=files) return r.status_code, r.json() def get_forecast(self, forecast_id): """Returns a forecast object.""" return self._get('/forecasts/' + forecast_id) def get_forecasts_due_to_run(self): """Returns all pending forecasts that are due to run.""" return self._get('/forecasts-due-to-run') def patch_forecast(self, forecast_id, json_patch): """Updates forecast attributes.""" return self._patch('/forecasts/' + forecast_id, json_patch) def start_forecast_run(self, forecast_id): """Starts the forecast that has been created.""" return self._post('/run-forecast/' + forecast_id) def complete_forecast(self, forecast_id): """Stops the forecast and marks as complete (admin only).""" return self._post('/complete-forecast/' + forecast_id) def fail_forecast(self, forecast_id): """Stops the forecast and marks with error status (admin only).""" return self._post('/fail-forecast/' + forecast_id) def stop_forecast(self, forecast_id): """Stops the forecast and marks as stopped.""" return self._post('/stop-forecast/' + forecast_id) def get_region(self, region_id): """Returns the region object.""" return self._get('/regions/' + region_id) def _get(self, path): return self._send_request('get', path) def _post(self, path): return self._send_request('post', path) def _patch(self, path, json): return self._send_request('patch', path, json) def _send_request(self, verb, path, json=None): full_url = self.base_url + '/' + path.lstrip('/') request_method = getattr(requests, verb) response = request_method(full_url, headers=self.headers, json=json) return response.status_code, response.json()
36.327273
76
0.608609
495
3,996
4.755556
0.20202
0.050977
0.037383
0.08921
0.428207
0.347069
0.276551
0.236619
0.211555
0.192014
0
0
0.248749
3,996
109
77
36.66055
0.784144
0.137137
0
0.205882
0
0
0.104762
0.00625
0
0
0
0
0
1
0.279412
false
0
0.014706
0.044118
0.573529
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
0c5bde7292a56d41804ffe09baf86e8dc59fb8ac
616
py
Python
trump_net/debug_app.py
iandennismiller/trump-net
a20eee04f5b0ba2283e593712482172fc8a5d551
[ "MIT" ]
null
null
null
trump_net/debug_app.py
iandennismiller/trump-net
a20eee04f5b0ba2283e593712482172fc8a5d551
[ "MIT" ]
null
null
null
trump_net/debug_app.py
iandennismiller/trump-net
a20eee04f5b0ba2283e593712482172fc8a5d551
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # situation (c) Ian Dennis Miller from flask_diamond import Diamond class DebugApp(Diamond): pass def create_app(): application = DebugApp() application.facet("configuration") application.facet("logs") application.facet("database") application.facet("marshalling") # application.facet("blueprints") # application.facet("accounts") # application.facet("signals") # application.facet("forms") # application.facet("error_handlers") # application.facet("request_handlers") # application.facet("administration") return(application.app)
24.64
43
0.693182
60
616
7.05
0.55
0.416076
0.113475
0
0
0
0
0
0
0
0
0.001949
0.167208
616
24
44
25.666667
0.822612
0.456169
0
0
0
0
0.110769
0
0
0
0
0
0
1
0.1
false
0.1
0.1
0
0.3
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
2
a7494d5269f8f3b3cb2b295e73aa362ab7a0edb0
2,128
py
Python
lib/encoding.py
nolange/VimModelines
40e70173d7d091c2d4a4a60636f7ca10a88cbfa2
[ "MIT" ]
8
2018-01-14T16:20:29.000Z
2022-03-30T23:35:38.000Z
lib/encoding.py
nolange/VimModelines
40e70173d7d091c2d4a4a60636f7ca10a88cbfa2
[ "MIT" ]
17
2017-12-10T04:36:27.000Z
2021-04-03T18:09:43.000Z
lib/encoding.py
nolange/VimModelines
40e70173d7d091c2d4a4a60636f7ca10a88cbfa2
[ "MIT" ]
4
2018-04-10T01:15:21.000Z
2021-04-03T18:13:05.000Z
# vim: set ts=4 sw=4 et fileencoding=utf-8: '''Vim encoding mappings to Sublime Text''' ENCODING_MAP = { 'latin1': 'Western (Windows 1252)', 'koi8-r': 'Cyrillic (KOI8-R)', 'koi8-u': 'Cyrillic (KOI8-U)', 'macroman': 'Western (Mac Roman)', 'iso-8859-1': 'Western (ISO 8859-1)', 'iso-8859-2': 'Central European (ISO 8859-2)', 'iso-8859-3': 'Western (ISO 8859-3)', 'iso-8859-4': 'Baltic (ISO 8859-4)', 'iso-8859-5': 'Cyrillic (ISO 8859-5)', 'iso-8859-6': 'Arabic (ISO 8859-6)', 'iso-8859-7': 'Greek (ISO 8859-7)', 'iso-8859-8': 'Hebrew (ISO 8859-8)', 'iso-8859-9': 'Turkish (ISO 8859-9)', 'iso-8859-10': 'Nordic (ISO 8859-10)', 'iso-8859-13': 'Estonian (ISO 8859-13)', 'iso-8859-14': 'Celtic (ISO 8859-14)', 'iso-8859-15': 'Western (ISO 8859-15)', 'iso-8859-16': 'Romanian (ISO 8859-16)', 'cp437': 'DOS (CP 437)', 'cp737': None, 'cp775': None, 'cp850': None, 'cp852': None, 'cp855': None, 'cp857': None, 'cp860': None, 'cp861': None, 'cp862': None, 'cp863': None, 'cp865': None, 'cp866': 'Cyrillic (Windows 866)', 'cp869': None, 'cp874': None, 'cp1250': 'Central European (Windows 1250)', 'cp1251': 'Cyrillic (Windows 1251)', 'cp1252': 'Western (Windows 1252)', 'cp1253': 'Greek (Windows 1253)', 'cp1254': 'Turkish (Windows 1254)', 'cp1255': 'Hebrew (Windows 1255)', 'cp1256': 'Arabic (Windows 1256)', 'cp1257': 'Baltic (Windows 1257)', 'cp1258': 'Vietnamese (Windows 1258)', 'cp932': None, 'euc-jp': None, 'sjis ': None, 'cp949': None, 'euc-kr': None, 'cp936': None, 'euc-cn': None, 'cp950': None, 'big5': None, 'euc-tw': None, 'utf-8': 'utf-8', 'ucs-2le': 'utf-16 le', 'utf-16': 'utf-16 be', 'utf-16le': 'utf-16 le', 'ucs-4': None, 'ucs-4le': None }
33.25
53
0.480263
255
2,128
4.003922
0.415686
0.191969
0.041136
0
0
0
0
0
0
0
0
0.215416
0.317199
2,128
63
54
33.777778
0.487268
0.037594
0
0
0
0
0.503428
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a74a87c770eb64223b1edab2728da5976c4fa8e8
375
py
Python
pyCHAMP/solver/vmc.py
NLESC-JCER/pyCHAMP
97523237b3521a426d664b6e2972257045ff8f5e
[ "Apache-2.0" ]
4
2019-05-15T13:09:23.000Z
2021-03-28T09:10:11.000Z
pyCHAMP/solver/vmc.py
NLESC-JCER/pyCHAMP
97523237b3521a426d664b6e2972257045ff8f5e
[ "Apache-2.0" ]
14
2019-04-23T15:05:07.000Z
2019-08-14T13:21:07.000Z
pyCHAMP/solver/vmc.py
NLESC-JCER/pyCHAMP
97523237b3521a426d664b6e2972257045ff8f5e
[ "Apache-2.0" ]
1
2019-09-30T22:55:53.000Z
2019-09-30T22:55:53.000Z
from functools import partial from pyCHAMP.solver.solver_base import SolverBase class VMC(SolverBase): def __init__(self, wf=None, sampler=None, optimizer=None): SolverBase.__init__(self, wf, sampler, optimizer) def sample(self, param): partial_pdf = partial(self.wf.pdf, param) pos = self.sampler.generate(partial_pdf) return pos
26.785714
62
0.706667
48
375
5.291667
0.479167
0.070866
0.07874
0
0
0
0
0
0
0
0
0
0.2
375
13
63
28.846154
0.846667
0
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
2
a75a78aae1de852f3b10d6475fe3ea2edaba4717
668
py
Python
navigator/auth/authorizations/allow_hosts.py
jelitox/navigator-api
202efaff10e3d4bea8082dddbb7fad807f90bf11
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
navigator/auth/authorizations/allow_hosts.py
jelitox/navigator-api
202efaff10e3d4bea8082dddbb7fad807f90bf11
[ "Apache-2.0", "BSD-3-Clause" ]
92
2020-10-17T17:48:02.000Z
2022-03-31T10:30:25.000Z
navigator/auth/authorizations/allow_hosts.py
jelitox/navigator-api
202efaff10e3d4bea8082dddbb7fad807f90bf11
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
""" Authorization based on Allowed HOSTS lists.""" import fnmatch import logging from .base import BaseAuthzHandler from navigator.conf import ALLOWED_HOSTS from aiohttp import web class authz_allow_hosts(BaseAuthzHandler): """ Allowed Hosts. Check if Origin is on the Allowed Hosts List. """ async def check_authorization(self, request: web.Request) -> bool: origin = request.host if request.host else request.headers["origin"] for key in ALLOWED_HOSTS: # print(origin, ALLOWED_HOSTS, key, fnmatch.fnmatch(origin, key)) if fnmatch.fnmatch(origin, key): return True return False
31.809524
77
0.685629
82
668
5.512195
0.487805
0.159292
0.088496
0.10177
0
0
0
0
0
0
0
0
0.236527
668
20
78
33.4
0.886275
0.257485
0
0
0
0
0.012766
0
0
0
0
0
0
1
0
false
0
0.416667
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
a75e2a628c901e46edb7f25a3e450e8c121a5cc1
32,662
py
Python
pysnmp/NNCEXTPVC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/NNCEXTPVC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/NNCEXTPVC-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 NNCEXTPVC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NNCEXTPVC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:13:11 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) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") nncExtensions, = mibBuilder.importSymbols("NNCGNI0001-SMI", "nncExtensions") ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup") Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, iso, MibIdentifier, TimeTicks, Counter64, ObjectIdentity, IpAddress, Unsigned32, NotificationType, ModuleIdentity, Bits, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "iso", "MibIdentifier", "TimeTicks", "Counter64", "ObjectIdentity", "IpAddress", "Unsigned32", "NotificationType", "ModuleIdentity", "Bits", "Gauge32") DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention") nncExtPvc = ModuleIdentity((1, 3, 6, 1, 4, 1, 123, 3, 79)) if mibBuilder.loadTexts: nncExtPvc.setLastUpdated('200101261907Z') if mibBuilder.loadTexts: nncExtPvc.setOrganization('Alcatel Networks Corporation') nncExtPvcObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 1)) nncExtPvcGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 3)) nncExtPvcCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 4)) nncCrPvpcTable = MibTable((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1), ) if mibBuilder.loadTexts: nncCrPvpcTable.setStatus('current') nncCrPvpcTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1), ).setIndexNames((0, "NNCEXTPVC-MIB", "nncCrPvpcSrcIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvpcSrcVpi"), (0, "NNCEXTPVC-MIB", "nncCrPvpcDstIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvpcDstVpi")) if mibBuilder.loadTexts: nncCrPvpcTableEntry.setStatus('current') nncCrPvpcSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: nncCrPvpcSrcIfIndex.setStatus('current') nncCrPvpcSrcVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))) if mibBuilder.loadTexts: nncCrPvpcSrcVpi.setStatus('current') nncCrPvpcDstIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 3), InterfaceIndex()) if mibBuilder.loadTexts: nncCrPvpcDstIfIndex.setStatus('current') nncCrPvpcDstVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))) if mibBuilder.loadTexts: nncCrPvpcDstVpi.setStatus('current') nncCrPvpcCastType = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("p2p", 1), ("p2mp", 2))).clone('p2p')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcCastType.setStatus('current') nncCrPvpcFwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdServiceCategory.setStatus('current') nncCrPvpcBwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdServiceCategory.setStatus('current') nncCrPvpcFwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdAbrDynTrfcIcr.setStatus('current') nncCrPvpcFwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdAbrDynTrfcRif.setStatus('current') nncCrPvpcFwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdAbrDynTrfcRdf.setStatus('current') nncCrPvpcBwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdAbrDynTrfcIcr.setStatus('current') nncCrPvpcBwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdAbrDynTrfcRif.setStatus('current') nncCrPvpcBwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdAbrDynTrfcRdf.setStatus('current') nncCrPvpcSrcBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcSrcBillingFlag.setStatus('current') nncCrPvpcDstBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcDstBillingFlag.setStatus('current') nncCrPvpcFwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmTrafficDescriptor.setStatus('current') nncCrPvpcFwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmPolicingOption.setStatus('current') nncCrPvpcFwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketOneRate.setStatus('current') nncCrPvpcFwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketOneCdvt.setStatus('current') nncCrPvpcFwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketTwoRate.setStatus('current') nncCrPvpcFwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketTwoMbs.setStatus('current') nncCrPvpcFwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmCdv.setStatus('current') nncCrPvpcFwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcFwdTmClr.setStatus('current') nncCrPvpcBwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmTrafficDescriptor.setStatus('current') nncCrPvpcBwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmPolicingOption.setStatus('current') nncCrPvpcBwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketOneRate.setStatus('current') nncCrPvpcBwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 27), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketOneCdvt.setStatus('current') nncCrPvpcBwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 28), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketTwoRate.setStatus('current') nncCrPvpcBwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketTwoMbs.setStatus('current') nncCrPvpcBwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmCdv.setStatus('current') nncCrPvpcBwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 31), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcBwdTmClr.setStatus('current') nncCrPvpcSrcAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcSrcAlsConfig.setStatus('current') nncCrPvpcDstAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcDstAlsConfig.setStatus('current') nncCrPvpcCreator = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 34), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 9))).clone(namedValues=NamedValues(("unknown", 0), ("nmti", 1), ("nm5620", 2), ("snmp", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nncCrPvpcCreator.setStatus('current') nncCrPvpcRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 35), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvpcRowStatus.setStatus('current') nncCrPvccTable = MibTable((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2), ) if mibBuilder.loadTexts: nncCrPvccTable.setStatus('current') nncCrPvccTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1), ).setIndexNames((0, "NNCEXTPVC-MIB", "nncCrPvccSrcIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvccSrcVpi"), (0, "NNCEXTPVC-MIB", "nncCrPvccSrcVci"), (0, "NNCEXTPVC-MIB", "nncCrPvccDstIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvccDstVpi"), (0, "NNCEXTPVC-MIB", "nncCrPvccDstVci")) if mibBuilder.loadTexts: nncCrPvccTableEntry.setStatus('current') nncCrPvccSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: nncCrPvccSrcIfIndex.setStatus('current') nncCrPvccSrcVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))) if mibBuilder.loadTexts: nncCrPvccSrcVpi.setStatus('current') nncCrPvccSrcVci = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: nncCrPvccSrcVci.setStatus('current') nncCrPvccDstIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 4), InterfaceIndex()) if mibBuilder.loadTexts: nncCrPvccDstIfIndex.setStatus('current') nncCrPvccDstVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))) if mibBuilder.loadTexts: nncCrPvccDstVpi.setStatus('current') nncCrPvccDstVci = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))) if mibBuilder.loadTexts: nncCrPvccDstVci.setStatus('current') nncCrPvccCastType = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("p2p", 1), ("p2mp", 2))).clone('p2p')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccCastType.setStatus('current') nncCrPvccFwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdServiceCategory.setStatus('current') nncCrPvccBwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdServiceCategory.setStatus('current') nncCrPvccFwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdAbrDynTrfcIcr.setStatus('current') nncCrPvccFwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdAbrDynTrfcRif.setStatus('current') nncCrPvccFwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdAbrDynTrfcRdf.setStatus('current') nncCrPvccBwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdAbrDynTrfcIcr.setStatus('current') nncCrPvccBwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdAbrDynTrfcRif.setStatus('current') nncCrPvccBwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdAbrDynTrfcRdf.setStatus('current') nncCrPvccSrcBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccSrcBillingFlag.setStatus('current') nncCrPvccDstBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccDstBillingFlag.setStatus('current') nncCrPvccFwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmTrafficDescriptor.setStatus('current') nncCrPvccFwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmPolicingOption.setStatus('current') nncCrPvccFwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmBucketOneRate.setStatus('current') nncCrPvccFwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmBucketOneCdvt.setStatus('current') nncCrPvccFwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmBucketTwoRate.setStatus('current') nncCrPvccFwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmBucketTwoMbs.setStatus('current') nncCrPvccFwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmCdv.setStatus('current') nncCrPvccFwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmClr.setStatus('current') nncCrPvccFwdTmFrameDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccFwdTmFrameDiscard.setStatus('current') nncCrPvccBwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmTrafficDescriptor.setStatus('current') nncCrPvccBwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmPolicingOption.setStatus('current') nncCrPvccBwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmBucketOneRate.setStatus('current') nncCrPvccBwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmBucketOneCdvt.setStatus('current') nncCrPvccBwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 31), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmBucketTwoRate.setStatus('current') nncCrPvccBwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 32), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmBucketTwoMbs.setStatus('current') nncCrPvccBwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 33), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmCdv.setStatus('current') nncCrPvccBwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 34), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmClr.setStatus('current') nncCrPvccBwdTmFrameDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 35), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccBwdTmFrameDiscard.setStatus('current') nncCrPvccSrcAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 36), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccSrcAlsConfig.setStatus('current') nncCrPvccDstAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 37), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccDstAlsConfig.setStatus('current') nncCrPvccCreator = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 38), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 9))).clone(namedValues=NamedValues(("unknown", 0), ("nmti", 1), ("nm5620", 2), ("snmp", 9)))).setMaxAccess("readonly") if mibBuilder.loadTexts: nncCrPvccCreator.setStatus('current') nncCrPvccRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 39), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: nncCrPvccRowStatus.setStatus('current') nncCrPvpcGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 123, 3, 79, 3, 1)).setObjects(("NNCEXTPVC-MIB", "nncCrPvpcSrcIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvpcSrcVpi"), ("NNCEXTPVC-MIB", "nncCrPvpcDstIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvpcDstVpi"), ("NNCEXTPVC-MIB", "nncCrPvpcCastType"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvpcSrcBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvpcDstBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvpcSrcAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvpcDstAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvpcCreator"), ("NNCEXTPVC-MIB", "nncCrPvpcRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): nncCrPvpcGroup = nncCrPvpcGroup.setStatus('current') nncCrPvccGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 123, 3, 79, 3, 2)).setObjects(("NNCEXTPVC-MIB", "nncCrPvccSrcIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvccSrcVpi"), ("NNCEXTPVC-MIB", "nncCrPvccSrcVci"), ("NNCEXTPVC-MIB", "nncCrPvccDstIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvccDstVpi"), ("NNCEXTPVC-MIB", "nncCrPvccDstVci"), ("NNCEXTPVC-MIB", "nncCrPvccCastType"), ("NNCEXTPVC-MIB", "nncCrPvccFwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvccBwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvccFwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvccFwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvccFwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvccBwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvccBwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvccBwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvccSrcBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvccDstBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmFrameDiscard"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmFrameDiscard"), ("NNCEXTPVC-MIB", "nncCrPvccSrcAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvccDstAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvccCreator"), ("NNCEXTPVC-MIB", "nncCrPvccRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): nncCrPvccGroup = nncCrPvccGroup.setStatus('current') nncPvcCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 123, 3, 79, 4, 1)).setObjects(("NNCEXTPVC-MIB", "nncCrPvpcGroup"), ("NNCEXTPVC-MIB", "nncCrPvccGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): nncPvcCompliance = nncPvcCompliance.setStatus('current') mibBuilder.exportSymbols("NNCEXTPVC-MIB", nncCrPvpcBwdTmClr=nncCrPvpcBwdTmClr, nncCrPvpcSrcBillingFlag=nncCrPvpcSrcBillingFlag, nncCrPvccDstIfIndex=nncCrPvccDstIfIndex, nncExtPvcGroups=nncExtPvcGroups, nncCrPvpcFwdAbrDynTrfcIcr=nncCrPvpcFwdAbrDynTrfcIcr, nncCrPvccFwdAbrDynTrfcIcr=nncCrPvccFwdAbrDynTrfcIcr, nncCrPvpcFwdServiceCategory=nncCrPvpcFwdServiceCategory, nncCrPvpcTableEntry=nncCrPvpcTableEntry, nncCrPvccCastType=nncCrPvccCastType, nncCrPvccBwdAbrDynTrfcRif=nncCrPvccBwdAbrDynTrfcRif, nncCrPvccBwdAbrDynTrfcIcr=nncCrPvccBwdAbrDynTrfcIcr, nncCrPvpcFwdTmBucketTwoMbs=nncCrPvpcFwdTmBucketTwoMbs, nncCrPvccCreator=nncCrPvccCreator, nncCrPvccFwdTmBucketTwoRate=nncCrPvccFwdTmBucketTwoRate, nncCrPvpcSrcIfIndex=nncCrPvpcSrcIfIndex, nncCrPvccBwdTmBucketTwoRate=nncCrPvccBwdTmBucketTwoRate, nncCrPvpcBwdAbrDynTrfcIcr=nncCrPvpcBwdAbrDynTrfcIcr, nncCrPvpcBwdTmBucketOneCdvt=nncCrPvpcBwdTmBucketOneCdvt, nncCrPvccFwdTmFrameDiscard=nncCrPvccFwdTmFrameDiscard, nncCrPvccDstVci=nncCrPvccDstVci, nncExtPvcObjects=nncExtPvcObjects, nncCrPvpcDstIfIndex=nncCrPvpcDstIfIndex, nncCrPvccTableEntry=nncCrPvccTableEntry, nncCrPvccSrcVci=nncCrPvccSrcVci, nncCrPvccRowStatus=nncCrPvccRowStatus, PYSNMP_MODULE_ID=nncExtPvc, nncCrPvccSrcVpi=nncCrPvccSrcVpi, nncCrPvccFwdTmBucketTwoMbs=nncCrPvccFwdTmBucketTwoMbs, nncCrPvccBwdTmFrameDiscard=nncCrPvccBwdTmFrameDiscard, nncCrPvpcFwdAbrDynTrfcRdf=nncCrPvpcFwdAbrDynTrfcRdf, nncCrPvccFwdTmCdv=nncCrPvccFwdTmCdv, nncCrPvpcDstAlsConfig=nncCrPvpcDstAlsConfig, nncCrPvpcBwdServiceCategory=nncCrPvpcBwdServiceCategory, nncCrPvpcFwdTmPolicingOption=nncCrPvpcFwdTmPolicingOption, nncPvcCompliance=nncPvcCompliance, nncCrPvpcBwdTmTrafficDescriptor=nncCrPvpcBwdTmTrafficDescriptor, nncCrPvccFwdTmTrafficDescriptor=nncCrPvccFwdTmTrafficDescriptor, nncCrPvccBwdTmBucketTwoMbs=nncCrPvccBwdTmBucketTwoMbs, nncCrPvccBwdTmPolicingOption=nncCrPvccBwdTmPolicingOption, nncCrPvccFwdTmBucketOneRate=nncCrPvccFwdTmBucketOneRate, nncCrPvccBwdAbrDynTrfcRdf=nncCrPvccBwdAbrDynTrfcRdf, nncCrPvccSrcBillingFlag=nncCrPvccSrcBillingFlag, nncCrPvccFwdTmBucketOneCdvt=nncCrPvccFwdTmBucketOneCdvt, nncCrPvccBwdTmBucketOneRate=nncCrPvccBwdTmBucketOneRate, nncCrPvpcTable=nncCrPvpcTable, nncCrPvpcDstBillingFlag=nncCrPvpcDstBillingFlag, nncCrPvpcFwdTmCdv=nncCrPvpcFwdTmCdv, nncCrPvccDstBillingFlag=nncCrPvccDstBillingFlag, nncCrPvccFwdAbrDynTrfcRdf=nncCrPvccFwdAbrDynTrfcRdf, nncExtPvc=nncExtPvc, nncExtPvcCompliances=nncExtPvcCompliances, nncCrPvccFwdTmClr=nncCrPvccFwdTmClr, nncCrPvpcDstVpi=nncCrPvpcDstVpi, nncCrPvpcBwdAbrDynTrfcRdf=nncCrPvpcBwdAbrDynTrfcRdf, nncCrPvpcSrcVpi=nncCrPvpcSrcVpi, nncCrPvpcFwdTmTrafficDescriptor=nncCrPvpcFwdTmTrafficDescriptor, nncCrPvccSrcIfIndex=nncCrPvccSrcIfIndex, nncCrPvpcFwdTmClr=nncCrPvpcFwdTmClr, nncCrPvccSrcAlsConfig=nncCrPvccSrcAlsConfig, nncCrPvccBwdTmClr=nncCrPvccBwdTmClr, nncCrPvpcCastType=nncCrPvpcCastType, nncCrPvpcFwdAbrDynTrfcRif=nncCrPvpcFwdAbrDynTrfcRif, nncCrPvccTable=nncCrPvccTable, nncCrPvpcRowStatus=nncCrPvpcRowStatus, nncCrPvpcBwdTmBucketTwoRate=nncCrPvpcBwdTmBucketTwoRate, nncCrPvccBwdServiceCategory=nncCrPvccBwdServiceCategory, nncCrPvpcGroup=nncCrPvpcGroup, nncCrPvccGroup=nncCrPvccGroup, nncCrPvpcBwdTmCdv=nncCrPvpcBwdTmCdv, nncCrPvccBwdTmCdv=nncCrPvccBwdTmCdv, nncCrPvpcBwdTmPolicingOption=nncCrPvpcBwdTmPolicingOption, nncCrPvpcFwdTmBucketOneRate=nncCrPvpcFwdTmBucketOneRate, nncCrPvpcBwdAbrDynTrfcRif=nncCrPvpcBwdAbrDynTrfcRif, nncCrPvpcFwdTmBucketTwoRate=nncCrPvpcFwdTmBucketTwoRate, nncCrPvpcBwdTmBucketTwoMbs=nncCrPvpcBwdTmBucketTwoMbs, nncCrPvccBwdTmBucketOneCdvt=nncCrPvccBwdTmBucketOneCdvt, nncCrPvccFwdAbrDynTrfcRif=nncCrPvccFwdAbrDynTrfcRif, nncCrPvccDstVpi=nncCrPvccDstVpi, nncCrPvccBwdTmTrafficDescriptor=nncCrPvccBwdTmTrafficDescriptor, nncCrPvccDstAlsConfig=nncCrPvccDstAlsConfig, nncCrPvpcSrcAlsConfig=nncCrPvpcSrcAlsConfig, nncCrPvpcBwdTmBucketOneRate=nncCrPvpcBwdTmBucketOneRate, nncCrPvpcCreator=nncCrPvpcCreator, nncCrPvpcFwdTmBucketOneCdvt=nncCrPvpcFwdTmBucketOneCdvt, nncCrPvccFwdServiceCategory=nncCrPvccFwdServiceCategory, nncCrPvccFwdTmPolicingOption=nncCrPvccFwdTmPolicingOption)
172.814815
4,072
0.768753
3,377
32,662
7.434705
0.074919
0.042538
0.010157
0.013542
0.485084
0.472896
0.465249
0.464452
0.464452
0.451866
0
0.073794
0.069806
32,662
188
4,073
173.734043
0.752584
0.009797
0
0.016667
0
0
0.175332
0.041567
0
0
0
0
0
1
0
false
0
0.044444
0
0.044444
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
2
a76894b0cf42a03fee6d58a32d758921b40e0b36
293
py
Python
1247.py
pgw00/Beakjoon-python
677bf6ece5be4843a37aace02edaa29c532721fb
[ "MIT" ]
null
null
null
1247.py
pgw00/Beakjoon-python
677bf6ece5be4843a37aace02edaa29c532721fb
[ "MIT" ]
null
null
null
1247.py
pgw00/Beakjoon-python
677bf6ece5be4843a37aace02edaa29c532721fb
[ "MIT" ]
null
null
null
import sys for i in range(3): N = int(sys.stdin.readline()) sum = 0 for j in range(N): sum+=int(sys.stdin.readline()) if sum > 0: print('+') elif sum <0: print('-') else: print('0')
15.421053
38
0.385666
35
293
3.228571
0.514286
0.106195
0.19469
0.336283
0
0
0
0
0
0
0
0.032468
0.474403
293
18
39
16.277778
0.701299
0
0
0
0
0
0.010239
0
0
0
0
0
0
1
0
false
0
0.083333
0
0.083333
0.25
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
a771dbfad7b2de6faa0fa87ef398da6ed9ddbbc8
154
py
Python
CodeInterview/[cutz]compression_str.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
3
2019-11-26T14:31:01.000Z
2020-01-10T18:19:46.000Z
CodeInterview/[cutz]compression_str.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
null
null
null
CodeInterview/[cutz]compression_str.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
null
null
null
from collections import defaultdict def solve(s): hash_dict = defaultdict(int) for i in range(len(s)): hash_dict[s[i]] += 1 return
15.4
35
0.62987
23
154
4.130435
0.73913
0.105263
0.189474
0
0
0
0
0
0
0
0
0.008772
0.25974
154
10
36
15.4
0.824561
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.5
0
1
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
0
0
0
2