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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a6e5a1cc7254e671f0204d15eea63d88fdebdf2
| 341
|
py
|
Python
|
enthought/chaco/__init__.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 3
|
2016-12-09T06:05:18.000Z
|
2018-03-01T13:00:29.000Z
|
enthought/chaco/__init__.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | 1
|
2020-12-02T00:51:32.000Z
|
2020-12-02T08:48:55.000Z
|
enthought/chaco/__init__.py
|
enthought/etsproxy
|
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
|
[
"BSD-3-Clause"
] | null | null | null |
#-----------------------------------------------------------------------------
#
# Copyright (c) 2005 by Enthought, Inc.
# All rights reserved.
#
#-----------------------------------------------------------------------------
""" Two-dimensionsal plotting application toolkit.
Part of the Chaco project of the Enthought Tool Suite.
"""
| 34.1
| 78
| 0.381232
| 24
| 341
| 5.416667
| 0.875
| 0.076923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013158
| 0.108504
| 341
| 9
| 79
| 37.888889
| 0.414474
| 0.929619
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
1a9957b11c8b50a2984c89a0f9f2b56a9180949c
| 4,993
|
py
|
Python
|
rdr_service/model/bq_site.py
|
all-of-us/raw-data-repository
|
d28ad957557587b03ff9c63d55dd55e0508f91d8
|
[
"BSD-3-Clause"
] | 39
|
2017-10-13T19:16:27.000Z
|
2021-09-24T16:58:21.000Z
|
rdr_service/model/bq_site.py
|
all-of-us/raw-data-repository
|
d28ad957557587b03ff9c63d55dd55e0508f91d8
|
[
"BSD-3-Clause"
] | 312
|
2017-09-08T15:42:13.000Z
|
2022-03-23T18:21:40.000Z
|
rdr_service/model/bq_site.py
|
all-of-us/raw-data-repository
|
d28ad957557587b03ff9c63d55dd55e0508f91d8
|
[
"BSD-3-Clause"
] | 19
|
2017-09-15T13:58:00.000Z
|
2022-02-07T18:33:20.000Z
|
from enum import Enum
from rdr_service.model.bq_base import BQTable, BQSchema, BQView, BQField, BQFieldTypeEnum, BQFieldModeEnum
# TODO: Revert to using site_enums.py when they have been updated to Python 3.7 Enum classes.
class BQSiteStatus(Enum):
""" The active scheduling status of a site. """
UNSET = 0
ACTIVE = 1
INACTIVE = 2
class BQEnrollingStatus(Enum):
""" The actively enrolling status of a site. """
UNSET = 0
ACTIVE = 1
INACTIVE = 2
class BQDigitalSchedulingStatus(Enum):
""" The status of a sites digital scheduling capability. """
UNSET = 0
ACTIVE = 1
INACTIVE = 2
class BQObsoleteStatusEnum(Enum):
""" If an organization is obsolete but referenced in other tables. """
ACTIVE = 0
OBSOLETE = 1
class BQSiteSchema(BQSchema):
id = BQField('id', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.REQUIRED)
created = BQField('created', BQFieldTypeEnum.DATETIME, BQFieldModeEnum.REQUIRED)
modified = BQField('modified', BQFieldTypeEnum.DATETIME, BQFieldModeEnum.REQUIRED)
hpo_id = BQField('hpo_id', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.NULLABLE)
organization_id = BQField('organization_id', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.NULLABLE)
site_id = BQField('site_id', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.REQUIRED)
site_name = BQField('site_name', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
# The Google group for the site; this is a unique key used externally.
google_group = BQField('google_group', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
mayolink_client_number = BQField('mayolink_client_number', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.NULLABLE)
site_status = BQField('site_status', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE,
fld_enum=BQSiteStatus)
site_status_id = BQField('site_status_id', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.NULLABLE,
fld_enum=BQSiteStatus)
enrolling_status = BQField('enrolling_status', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE,
fld_enum=BQEnrollingStatus)
enrolling_status_id = BQField('enrolling_status_id', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.NULLABLE,
fld_enum=BQEnrollingStatus)
digital_scheduling_status = BQField('digital_scheduling_status', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE,
fld_enum=BQDigitalSchedulingStatus)
digital_scheduling_status_id = BQField('digital_scheduling_status_id', BQFieldTypeEnum.INTEGER,
BQFieldModeEnum.NULLABLE, fld_enum=BQDigitalSchedulingStatus)
schedule_instructions = BQField('schedule_instructions', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
schedule_instructions_es = BQField('schedule_instructions_es', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
launch_date = BQField('launch_date', BQFieldTypeEnum.DATE, BQFieldModeEnum.NULLABLE)
notes = BQField('notes', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
notes_es = BQField('notes_es', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
latitude = BQField('latitude', BQFieldTypeEnum.FLOAT, BQFieldModeEnum.NULLABLE)
longitude = BQField('longitude', BQFieldTypeEnum.FLOAT, BQFieldModeEnum.NULLABLE)
time_zone_id = BQField('time_zone_id', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
directions = BQField('directions', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
physical_location_name = BQField('physical_location_name', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
address_1 = BQField('address_1', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
address_2 = BQField('address_2', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
city = BQField('city', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
state = BQField('state', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
zip_code = BQField('zip_code', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
phone_number = BQField('phone_number', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
admin_emails = BQField('admin_emails', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
link = BQField('link', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
is_obsolete = BQField('is_obsolete', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE,
fld_enum=BQObsoleteStatusEnum)
is_obsolete_id = BQField('is_obsolete_id', BQFieldTypeEnum.INTEGER, BQFieldModeEnum.NULLABLE,
fld_enum=BQObsoleteStatusEnum)
site_type = BQField('site_type', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE)
class BQSite(BQTable):
""" Organization Site BigQuery Table """
__tablename__ = 'site'
__schema__ = BQSiteSchema
class BQSiteView(BQView):
__viewname__ = 'v_site'
__viewdescr__ = 'Site View'
__table__ = BQSite
__pk_id__ = 'site_id'
| 52.557895
| 118
| 0.741839
| 491
| 4,993
| 7.319756
| 0.242363
| 0.204786
| 0.220367
| 0.269338
| 0.333333
| 0.15665
| 0.14246
| 0.072343
| 0.022259
| 0.022259
| 0
| 0.004107
| 0.171039
| 4,993
| 94
| 119
| 53.117021
| 0.864218
| 0.079311
| 0
| 0.214286
| 0
| 0
| 0.099452
| 0.031106
| 0
| 0
| 0
| 0.010638
| 0
| 1
| 0
| false
| 0
| 0.028571
| 0
| 0.885714
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
1aae5d527966807aaffa9ba9f6cb5f9323d506db
| 3,379
|
py
|
Python
|
take2/designalgo1/karatsuba_test.py
|
ligregni/coursera
|
6b1e4181b37b8e8cdfa2e327b93f67f5a644ee68
|
[
"BSD-3-Clause"
] | null | null | null |
take2/designalgo1/karatsuba_test.py
|
ligregni/coursera
|
6b1e4181b37b8e8cdfa2e327b93f67f5a644ee68
|
[
"BSD-3-Clause"
] | null | null | null |
take2/designalgo1/karatsuba_test.py
|
ligregni/coursera
|
6b1e4181b37b8e8cdfa2e327b93f67f5a644ee68
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/python3
import unittest
import karatsuba
class AdditionTest(unittest.TestCase):
def test_zero_when_two_zeroes(self):
self.assertEqual(karatsuba.add('0', '0'), '0')
def test_single_digit_a_when_b_is_zero(self):
self.assertEqual(karatsuba.add('9', '0'), '9')
def test_single_digit_b_when_a_is_zero(self):
self.assertEqual(karatsuba.add('0', '9'), '9')
def test_a_when_b_is_zero(self):
self.assertEqual(karatsuba.add('9876200', '0'), '9876200')
def test_b_when_a_is_zero(self):
self.assertEqual(karatsuba.add('0', '9876200'), '9876200')
def test_a_plus_b_no_carry_needed(self):
self.assertEqual(karatsuba.add('1111', '2222'), '3333')
def test_a_plus_b_carry_needed(self):
self.assertEqual(karatsuba.add('1', '9999'), '10000')
def test_a_plus_b_large_b_larger_a(self):
self.assertEqual(karatsuba.add('123456', '9999'), '133455')
def test_a_plus_b_large_a_larger_b(self):
self.assertEqual(karatsuba.add('9999', '123456'), '133455')
class SubtractionTest(unittest.TestCase):
def test_zero_when_two_zeroes(self):
self.assertEqual(karatsuba.subtract('0', '0'), '0')
def test_zero_when_equal(self):
self.assertEqual(karatsuba.subtract('1234', '1234'), '0')
def test_minuendo_when_substraendo_is_zero(self):
self.assertEqual(karatsuba.subtract('1234', '0'), '1234')
def test_subtraction_minus_one(self):
self.assertEqual(karatsuba.subtract('1234', '1'), '1233')
def test_subtraction_minus_all_but_one(self):
self.assertEqual(karatsuba.subtract('1234', '1233'), '1')
def test_subtraction_no_borrow(self):
self.assertEqual(karatsuba.subtract('9876', '4321'), '5555')
def test_subtraction_borrow_follows(self):
self.assertEqual(karatsuba.subtract('10000', '1'), '9999')
def test_subtraction_borrow(self):
self.assertEqual(karatsuba.subtract('10000', '1234'), '8766')
class GetHalvesTest(unittest.TestCase):
def test_halves_large_number_even_digits(self):
self.assertEqual(karatsuba.get_halves('12345678', 4), ('1234', '5678'))
def test_halves_large_number_odd_digits(self):
self.assertEqual(karatsuba.get_halves('1234567', 4), ('123', '4567'))
def test_halves_small_number_one_and_one(self):
self.assertEqual(karatsuba.get_halves('12', 1), ('1', '2'))
def test_halves_small_number_large_n(self):
self.assertEqual(karatsuba.get_halves('12', 2), ('0', '12'))
def test_halves_small_number_largest_n(self):
self.assertEqual(karatsuba.get_halves('12', 3), ('0', '12'))
class MultiplicationTest(unittest.TestCase):
def test_multiply_by_zero_a(self):
self.assertEqual(karatsuba.multiply('1234', '0'), '0')
def test_multiply_by_zero_b(self):
self.assertEqual(karatsuba.multiply('0', '1234'), '0')
def test_multiply_by_one_a(self):
self.assertEqual(karatsuba.multiply('1234', '1'), '1234')
def test_multiply_by_one_b(self):
self.assertEqual(karatsuba.multiply('1', '1234'), '1234')
def test_multiply_one_digit(self):
self.assertEqual(karatsuba.multiply('2', '7'), '14')
def test_multiply_many_digits(self):
self.assertEqual(karatsuba.multiply('46', '134'), '6164')
def test_multiply_many_digits_two(self):
self.assertEqual(karatsuba.multiply('100', '46'), '4600')
def test_multiply_many_digits_long(self):
self.assertEqual(karatsuba.multiply('1234', '5678'), '7006652')
| 31.287037
| 75
| 0.723587
| 470
| 3,379
| 4.9
| 0.193617
| 0.091185
| 0.247503
| 0.364742
| 0.713852
| 0.493704
| 0.333044
| 0.169344
| 0.134607
| 0.134607
| 0
| 0.094952
| 0.114827
| 3,379
| 107
| 76
| 31.579439
| 0.675025
| 0.005031
| 0
| 0.030303
| 0
| 0
| 0.082738
| 0
| 0
| 0
| 0
| 0
| 0.454545
| 1
| 0.454545
| false
| 0
| 0.030303
| 0
| 0.545455
| 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
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
1ab9f2e1e85f9571552532b38a47f52080616a3f
| 126
|
py
|
Python
|
config.py
|
JosiahDub/LittleFreePiBerry
|
cd983241a1642c1aceb480370472d328ce3c71b6
|
[
"Apache-2.0"
] | null | null | null |
config.py
|
JosiahDub/LittleFreePiBerry
|
cd983241a1642c1aceb480370472d328ce3c71b6
|
[
"Apache-2.0"
] | null | null | null |
config.py
|
JosiahDub/LittleFreePiBerry
|
cd983241a1642c1aceb480370472d328ce3c71b6
|
[
"Apache-2.0"
] | null | null | null |
import os
# For testing outside of the Pi
if os.uname()[4][:3] == 'arm':
import picamera
# camera = picamera.PiCamera()
| 15.75
| 31
| 0.650794
| 19
| 126
| 4.315789
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019802
| 0.198413
| 126
| 7
| 32
| 18
| 0.792079
| 0.460317
| 0
| 0
| 0
| 0
| 0.046154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
46cab53b7608bdfdcf16cd65ff5a4adf7bc9cd8c
| 145
|
py
|
Python
|
backhaul/obj/attr.py
|
tmacro/backhaul
|
0e234b1ad5d0998d6a116051feb9087482dc8bb4
|
[
"BSD-3-Clause"
] | 1
|
2019-05-13T20:10:57.000Z
|
2019-05-13T20:10:57.000Z
|
backhaul/obj/attr.py
|
tmacro/backhaul
|
0e234b1ad5d0998d6a116051feb9087482dc8bb4
|
[
"BSD-3-Clause"
] | 4
|
2021-03-18T23:26:46.000Z
|
2022-03-11T23:44:27.000Z
|
backhaul/obj/attr.py
|
tmacro/backhaul
|
0e234b1ad5d0998d6a116051feb9087482dc8bb4
|
[
"BSD-3-Clause"
] | null | null | null |
BASE_ATTR_TMPL = '_attr_{name}'
BASE_ATTR_GET_TMPL = '_attr__get_{name}'
BASE_ATTR_SET_TMPL = '_attr__set_{name}'
def mixin(cls):
return cls
| 16.111111
| 40
| 0.758621
| 24
| 145
| 3.833333
| 0.416667
| 0.26087
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117241
| 145
| 8
| 41
| 18.125
| 0.71875
| 0
| 0
| 0
| 0
| 0
| 0.321678
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0.2
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
46f070735f3add148bb1041275893f760fb6ae55
| 111
|
py
|
Python
|
gbnet/__init__.py
|
umbibio/gbnet
|
0e478d764cfa02eaed3e32d11d03c240c78e2ff6
|
[
"MIT"
] | null | null | null |
gbnet/__init__.py
|
umbibio/gbnet
|
0e478d764cfa02eaed3e32d11d03c240c78e2ff6
|
[
"MIT"
] | null | null | null |
gbnet/__init__.py
|
umbibio/gbnet
|
0e478d764cfa02eaed3e32d11d03c240c78e2ff6
|
[
"MIT"
] | 1
|
2019-06-10T16:19:58.000Z
|
2019-06-10T16:19:58.000Z
|
from .ModelORNOR import PyModelORNOR as ModelORNOR
from .tools import genData
from ._version import __version__
| 37
| 50
| 0.855856
| 14
| 111
| 6.428571
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117117
| 111
| 3
| 51
| 37
| 0.918367
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
20390a52e22e4f1610ba4a518a0cc3087e6c86f1
| 31
|
py
|
Python
|
network_moments/torch/utils/tests/__init__.py
|
ModarTensai/network_moments
|
aadd4dacb12d7238c66e6a77c3c56fc84242a0fd
|
[
"MIT"
] | 6
|
2018-07-28T17:06:01.000Z
|
2020-08-17T00:14:27.000Z
|
network_moments/torch/utils/tests/__init__.py
|
xmodar/network_moments
|
aadd4dacb12d7238c66e6a77c3c56fc84242a0fd
|
[
"MIT"
] | null | null | null |
network_moments/torch/utils/tests/__init__.py
|
xmodar/network_moments
|
aadd4dacb12d7238c66e6a77c3c56fc84242a0fd
|
[
"MIT"
] | 1
|
2018-08-09T14:23:20.000Z
|
2018-08-09T14:23:20.000Z
|
from .tests import *
del tests
| 10.333333
| 20
| 0.741935
| 5
| 31
| 4.6
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.193548
| 31
| 3
| 21
| 10.333333
| 0.92
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
6447ebc2b4cd6a83ada1993455c3e2f6a8257aba
| 92
|
py
|
Python
|
src/cms/forms/regions/__init__.py
|
S10MC2015/cms-django
|
b08f2be60a9db6c8079ee923de2cd8912f550b12
|
[
"Apache-2.0"
] | null | null | null |
src/cms/forms/regions/__init__.py
|
S10MC2015/cms-django
|
b08f2be60a9db6c8079ee923de2cd8912f550b12
|
[
"Apache-2.0"
] | null | null | null |
src/cms/forms/regions/__init__.py
|
S10MC2015/cms-django
|
b08f2be60a9db6c8079ee923de2cd8912f550b12
|
[
"Apache-2.0"
] | null | null | null |
"""
Forms for creating and modifying region objects
"""
from .region_form import RegionForm
| 18.4
| 47
| 0.782609
| 12
| 92
| 5.916667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141304
| 92
| 4
| 48
| 23
| 0.898734
| 0.51087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
647850fe1bfe2d11c80dd00a935b6477f0fd6f1b
| 169
|
py
|
Python
|
nipype/interfaces/nipy/__init__.py
|
sebastientourbier/nipype
|
99c5904176481520c5bf42a501aae1a12184e672
|
[
"Apache-2.0"
] | 2
|
2019-01-25T18:20:51.000Z
|
2019-07-30T20:51:51.000Z
|
nipype/interfaces/nipy/__init__.py
|
sebastientourbier/nipype
|
99c5904176481520c5bf42a501aae1a12184e672
|
[
"Apache-2.0"
] | null | null | null |
nipype/interfaces/nipy/__init__.py
|
sebastientourbier/nipype
|
99c5904176481520c5bf42a501aae1a12184e672
|
[
"Apache-2.0"
] | 2
|
2018-01-25T19:48:17.000Z
|
2019-01-25T18:20:52.000Z
|
# -*- coding: utf-8 -*-
from .model import FitGLM, EstimateContrast
from .preprocess import ComputeMask, FmriRealign4d, SpaceTimeRealigner
from .utils import Similarity
| 33.8
| 70
| 0.792899
| 18
| 169
| 7.444444
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013423
| 0.118343
| 169
| 4
| 71
| 42.25
| 0.885906
| 0.12426
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
64c43d68a71625faccb3ebcc3f7fe5bce5d6e423
| 155
|
py
|
Python
|
myAppModule/handlers/home/home.py
|
JohnCC330/DreamHost.cherrypy
|
9f7ba47f6ba7006e8c380040c3af4e61460cb2e1
|
[
"MIT"
] | null | null | null |
myAppModule/handlers/home/home.py
|
JohnCC330/DreamHost.cherrypy
|
9f7ba47f6ba7006e8c380040c3af4e61460cb2e1
|
[
"MIT"
] | null | null | null |
myAppModule/handlers/home/home.py
|
JohnCC330/DreamHost.cherrypy
|
9f7ba47f6ba7006e8c380040c3af4e61460cb2e1
|
[
"MIT"
] | 1
|
2022-01-27T04:43:15.000Z
|
2022-01-27T04:43:15.000Z
|
import cherrypy
from myAppModule import tools
class Home(object):
@cherrypy.expose
def index(self):
return tools.render('home.html', {})
| 17.222222
| 44
| 0.683871
| 19
| 155
| 5.578947
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.206452
| 155
| 8
| 45
| 19.375
| 0.861789
| 0
| 0
| 0
| 0
| 0
| 0.058442
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 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
| 1
| 1
| 1
| 0
|
0
| 5
|
b3933c34cfb16a0cdb233522e361c673202b61f3
| 52,877
|
py
|
Python
|
leelagame_streamlit.py
|
rcsmit/newagebullshitgenerator
|
04a0cb8f464b37aa786564f43c38efd95b6ef9de
|
[
"MIT"
] | null | null | null |
leelagame_streamlit.py
|
rcsmit/newagebullshitgenerator
|
04a0cb8f464b37aa786564f43c38efd95b6ef9de
|
[
"MIT"
] | null | null | null |
leelagame_streamlit.py
|
rcsmit/newagebullshitgenerator
|
04a0cb8f464b37aa786564f43c38efd95b6ef9de
|
[
"MIT"
] | null | null | null |
# # -*- coding: utf-8 -*-
# """
# Created on Thu Oct 22 12:04:30 2020
# @author: rcxsm
# """
# # -*- coding: utf-8 -*-
# """
# Created on Wed Oct 21 23:40:39 2020
# @author: rcxsm
# """
# # Leela game
# # https://www.maa.org/sites/default/files/pdf/upload_library/22/Polya/Cheteyan-2012.pdf
# """
# https://irgp2.ru/en/igra-lila-moi-opyt-ispolzovaniya-nastolnaya-igra-leela-lila---lila-igra/
# Rules of the game LILA:
# Participants put their symbols on cell 68 (Cosmic Consciousness).
# Sitting around the playing field, participants take turns throwing a bone,
# passing it clockwise to a neighbor.
# To enter the game, you need to throw six points, then the player goes to cell
# number 1 (Gate of Life) and from there, immediately, to cell number 6 (Misconception).
# Until the player rolls six, he remains on the cell of Cosmic Consciousness (68)
# and cannot be born in the game.
# TO IMPLEMENT
# Each time a player drops the number six (with the exception of the first six,
# which led the player to his birth in the game),
# he rolls the dice again. If six rolls again,
# the player rolls the die again. As a result, all numbers are summed up.
# A player takes as many steps as total points.
# Exception: if six drops out three times in a row, they are not summed,
# but are reset. The player rolls the dice again and takes as many steps
# as there were points in the fourth throw.
# TODO
# If a player rolls four or more
# sixes in a row, he continues to roll the dice until a number other than
# six falls out, and then he goes forward by the number of steps equal to the total
# sum of all points thrown, and then passes the dice.
# DONE
# Arrows and Snakes, symbolizing Virtues and Vices on the path, accelerate the
# player’s movement and strengthen his internal awareness.
# An arrow moves the player up. When a player hits the base of the Arrow, he
# rises up through the body of the Arrow to the cell where its tip is located.
# The snake lowers the player down. If the head of the Snake is located in the
# cage where the player got, he falls down her body down to the cage where her
# tail is located.
# DONE
# The game ends when the player enters cell 68 (Cosmic Consciousness) -
# either along the Arrow from the cell of Spiritual Devotion, or during a
# gradual ascent, for example, from cell 66, throwing a deuce.
# DONE
# If the player reaches the eighth row, but, without falling on
# the cell of Cosmic Consciousness (68), goes further and stops
# at the cells with numbers 69, 70 or 71, he must wait until
# either the exact number of steps that separates him from the cell
# 72 falls out ( Darkness), or a small number that allows him to advance
# two or one step forward (for 69, 1, 2 or 3 are suitable, for 70 - 1 or 2,
# for 71 - only one).
# In this case, the player needs to go down to cell 51 (Earth) using the
# Snake on cell 72 (Darkness).
# If a player enters the Absolute cage (69), he must wait until
# the serpent of Darkness (72) returns him to the ground (51)
# so that he can continue his path to Cosmic Consciousness (68)
# either by gradually moving upward, or, having thrown the three,
# through the field of Spiritual Devotion, from where the arrow
# leads the player directly to his goal. On cell 71, all numbers
# except one are useless for him - just like on cell 67 he can no
# longer use the six that has fallen out. If a unit falls, then he
# enters field 68 and the game ends, but it will continue if two,
# three, four, five, or six fall.
# -------------------------------------------------
# 100 vakken spel
# https://www.jstor.org/stable/3619261?seq=1
# #ladders
# 1,38
# 4,14
# 9,31
# 21,42
# 28,84
# 36,44
# 51,67
# 71,91
# 80,100
# #snakes
# 16,6
# 47,26
# 49,11
# 56,53
# 62,19
# 64,60
# 87,24
# 93,73
# 95,75
# 98,78
# """
import random
import sys
import time
from plotly.graph_objs import Bar, Layout
from plotly import offline
from matplotlib import pyplot as plt
from collections import Counter
import streamlit as st
squares = [
[1, 'Birth', 'janma', 'Entrance to samsara. The six fell out - the sixth element (consciousness) is connected with five material elements (ether, air, fire, water and earth). The unit is the root of creation, an independent person, the search for its own unique path.',0, 7],
[2, 'Illusion', 'Maya', 'The game of hide and seek begins with himself. Awareness of unity (yoga) with the Higher Consciousness is inferior to the feeling of disunity, false self-identification, ego, duality (number two). This feeling is created by maya - the illusory power of the Higher Consciousness. Maya is the tail of the serpent of darkness (tamas).',1, 7],
[3, 'Anger', 'krodha', 'Anger is the first and most base manifestation of the ego when obstacles arise in the realization of one`s false “I” and, as a result, insecurity. Anger is the tail of the snake of Egoism. Anger lowers to the level of the first chakra and burns all achievements, depriving the mind. Anger can also purify and develop perseverance and firmness of character, if its cause is not selfishness and it is not directed at anyone specifically. The three symbolizes dynamism, and the dynamics can be both negative and positive.',2, 7],
[4, 'Greed', 'lobha', 'Selfishness, dissatisfaction and insecurity give rise to greed, money-grubbing, the desire to secure their place in the Game. Greed is the tail of the snake of jealousy. Material support is the main concern of the player at the level of the first chakra. Even with everything you need, such a player still feels empty. And to drown out this feeling, he is trying to take possession of more and more material wealth. Greed makes a person shortsighted, but can also be aimed at love, the acquisition of spiritual experience and knowledge, which can work for the good. Four symbolizes completeness. The desire for completeness at this gross material level turns into greed.',3, 7],
[5, 'The physical plane', 'bhu-loka', 'Earthly, the roughest plane of being, the first of seven locks (levels of existence). On this plane, the player is completely absorbed in material achievements related to the body. If the problems associated with the physical plan are not resolved, you will not be able to rise higher. There are no ascending arrows from this dense plane, and the tails of seven snakes lead here, lowering the player from other, higher planes. Pass and gradually implement this plan of being will have all the players. Five is the number of material elements: ether, air, fire, water, earth. There are also five facets of the senses, organs of gross interaction with matter: ears — for sound, skin — for touch, eyes — for perception of shape and color, tongue — for sensation of taste and nose — for smell.',4, 7],
[6, 'Delusion', 'moss', 'The fallacy of kinship, dependence, obsession, which obscures the gaze of the player, preventing him from seeing things as they are, and causing them to reborn. Unlike maya, which is the world of illusion itself, delusion is what binds the player to this world. Misconception stems from a misunderstanding of the laws of the Dharma, World Order, Ecumenical Religion, the Laws of the Game. Misconception is the first cell that a player enters after he rolls the six. The tail of the serpent of godlessness or lack of true religiosity also leads into this field. The six is \u200b\u200bassociated with creative activity and is in balance, but this illusory balance can become an obstacle to moving on, creating the illusion of comfort within the framework of materialism, egoism and sensual pleasures. Those in this field continue to suffer from anger and greed.',5, 7],
[7, 'Vanity', 'Mada', 'Vanity is self-deception, pride, intoxication with imaginary or genuine greatness and virtues. Vanity is the result of bad communication (the tail of a snake called "Bad company"), and bad communication is the result of bad desires. Seven is a number symbolizing the problems of adaptation, by its nature the seven is lonely and seeks to complete, to create a society around itself. This is the number of writers and artists who, in the absence of development, are in false pride and unrealistic dreams. They love the shocking and overthrow of the foundations, tend to create their own religion and spend their lives in entertainment.',6, 7],
[8, 'Greed', 'Matsarya', 'Vanity leads to greed - a person thinks that he deserves everything that others have and even more. And he is ready to do anything to take possession of what belongs to others. Greed is strongly associated with envy - it is at the tail of the snake of envy. Greed is envy combined with greed. Eight is a number that, when multiplied by any other, decreases, and when multiplied by nine, it first increases, and then again comes to 8. The subtle decreases when the gross grows. And so on until there is penetration into the essence of the gross, and then it becomes subtle again. Knowing the gross brings wisdom and allows you to move on.',7, 7],
[9, 'The sensual plan', 'kama-loka', 'The ninth square completes the first level and leads to the second, which begins with purification. Without going through the sensual plane, it is impossible to rise higher. Kama is a desire that is an incentive to development. But this desire is gross. The tail of the snake of ignorance or the gradual exploration of the first chakra leads here. Nine symbolizes completeness and perfection.',8, 7],
[10, 'Cleansing', 'tapa', 'Beginning of the second level. Loss of energy on the first level creates a feeling of emptiness and dissatisfaction, even despite a sense of comfort. Then the player’s attention turns to purification. Here the arrow begins, leading to the heavenly plane and allowing you to immediately overcome all the problems of the second level.',8, 6],
[11, 'Entertainment', 'gandharva', 'Gandharvas are celestial musicians. Their life is dedicated to entertaining others and having fun. After cleansing, they pass to this level and fill the players with inner joy and lightness, a sense of rhythm and harmony, and the ability to hear the music of the spheres. They are already free from feelings of insecurity and preoccupation with material well-being, which is characteristic of the first level.',7, 6],
[12, 'Envy', 'Irasia', 'The first snake. It returns the player to the greed cell to the first level. This is the first fall due to insecurity and the inability to come to terms with the fact that the other can also be on the second level or even higher.',6, 6],
[13, 'Nullity', 'antariksha', 'Antariksha is a plane located between the physical plane and the heavens (swarga-loka). Here the player is in a "suspended" state: neither in heaven, nor on earth, in fact, to nothing. The state of antariksha is the tail of the snake of negative intelligence and comes from a lack of understanding of its purpose, existential fear and a sense of instability. The player feels a sense of inner emptiness, finds no place for himself and is in constant alarm and loss. All this is a byproduct of switching to the second chakra. The player wastes his little energy on sensual pleasures and, quickly exhausted, loses interest in life and the game. This is the main problem of the second chakra. Replenishment of energy reserves allows him to move on.',5, 6],
[14, 'The astral plane', 'bhuvar-loka', 'The astral plane is a dimension of psychic space located between the earth and heaven. This is a plan of dreams, dreams, fruitful creativity and imagination. The player has already met his material needs and now he sees that life is much more interesting and diverse than he could have imagined, being concerned about earning a livelihood. The player`s creative imagination is released, he spends time in pleasures, sexuality becomes the main means of self-expression. The player has already overcome the earthly plan, and his imagination gives him an idea of \u200b\u200bheaven. The danger is that dreams and sensuality take the player away from reality, depleting his vital energy.',4, 6],
[15, 'Plan of fantasy', 'naga-loka', 'Naga-loka, the world of magic snakes - the abode of those who are completely immersed in their fantasies. This abode is underground. The player lives in a fantasy world, where the possibilities of life are expanded to incredible boundaries and the usual restrictions for a person do not apply. All the player’s energy is directed to the study of this world and manifests itself in the creation of works of art, new ideas and discoveries. On the astral plane, the player begins to realize his abilities, here he is completely absorbed by this dimension of psychic space.',3, 6],
[16, 'Jealousy', 'dvesha', 'Jealousy arises from a feeling of self-doubt. Suspicion and inability to trust loved ones deprives the player of a feeling of reliability, security and returns him to the first level in the arms of greed. To regain self-confidence and tomorrow, the player needs to go through the first level again in order to deal with the causes of uncertainty.',2, 6],
[17, 'Compassion', 'daya', 'Compassion, mercy, empathy is a divine quality that is so strong that it raises a player from the second chakra to the eighth, to the plane of the Absolute. In the strongest form, compassion is manifested when it is directed at the enemies, when the player “turns his cheek”, instead of “giving change”. Compassion and forgiveness develops not least thanks to the imagination, which allows us to imagine what the other person feels and thinks, why he is forced to act in this way and not otherwise, obeying the rules of the great Game of the universe. Compassion pushes the boundaries of the false "I", closer to the Absolute, but does not relieve karma. Therefore, the player will have to move on until he is bitten by the serpent of Tamoguna and returns him to the ground to complete his mission.',1, 6],
[18, 'The plan of joy', 'harsha-loka', 'Here, at the end of the second level, a feeling of deep satisfaction comes to the player. A journey through envy, insignificance, jealousy ... and the world of fantasies comes to an end - the player is approaching reality. He managed to pass the first chakra, and now he does not feel fear and is completely confident in himself. Rising above sensual desires, he completed the second stage. Ahead of him is a joyful fulfillment of karma yoga and his joy has no limits.',0, 6],
[19, 'The plan of karma', 'karma-loka', 'No matter what level the player is at, he will strive for satisfaction, moreover, at that level. In the first two chakras, this desire manifests itself as a desire for money and sex. In the third chakra, the main need is self-affirmation, the achievement of strength and influence. Fantasies give way to understanding the real situation and the law of karma, the law of interaction and retribution, which is behind the world order. Karma (action) creates fetters, but it can also destroy them.',0, 5],
[20, 'Charity', 'given', 'It raises the player above the problems of this level, and he moves one level up to the balance plan located at the level of the heart chakra. Entering this field, the player identifies himself with the Divine, Good present in everything, and performs actions aimed at the benefit of others, without expecting any benefit for himself. These actions fill the player with joy that accompanies the rise of energies to higher levels. Charity satisfies the evolving ego and frees the player from the shackles of the third chakra.',1, 5],
[21, 'Atonement', 'samana papa', 'Gradually, the player realizes that in the process of satisfying feelings, he could harm others, and now this bad karma interferes with his development. It is time for repentance and correction of mistakes. Repentance also helps those who have not yet adapted to the high level of the third chakra. The player atones for his mistakes, following the principles of Dharma, universal religion, and tunes in to a higher level of vibration.',2, 5],
[22, 'The Dharma Plan', 'Dharma Loka', 'Dharma are universal principles that harmonize a world that seems chaotic. Dharma is the laws of life in the universe, following which creates the conditions for overcoming the lower planes of being. From the Dharma plan, the player rises immediately to the seventh level, in the field of positive intelligence. Dharma is originally a property of everything in this world. Ten basic qualities that distinguish those who follow the dharma: firmness, forgiveness, self-control, restraint, purity, control over the senses and organs of action, intelligence, correct knowledge, truth and lack of anger.',3, 5],
[23, 'Heavenly Plan', 'Swarga Loka', 'The third among the seven planes of being. On this plane, thinking comes first. The creatures that inhabit this plan emit light. In the first chakra, the player seeks security and tries to take possession of many things that could support his physical existence. In the second, he explores the world of feelings and seeks pleasure. Rising to the third plan, he opens a new dimension - the image of paradise created by thought, of the world, which satisfies his understanding of happiness and satisfies his ego, the desire for self-identification and eternal life in happiness and pleasure.',4, 5],
[24, 'Bad company', 'ku-sanga-loka', 'In search of self-identification, characteristic of the third chakra, the player is looking for a group of other people who could support him. At the same time, he risks getting into the society of people who retreat in their actions from the laws of the Dharma. This is a "bad company." The force created by the group serves as a basis for the ego and self-conceit of the player, and, stung by a snake, the player returns to the first chakra - in the field of vanity.',5, 5],
[25, 'Good company', 'su-sanga-loka', 'A good company at the third level is a community of people helping each other realize their best qualities and expand their ego. This community gathers around a spiritual teacher with a developed fourth and fifth chakra. In contrast, a bad company usually gathers around a charismatic leader with a developed third chakra. The result of staying in a bad company is the development of self-esteem, while in a favorable society a person develops the ability to compassion. Good communication is essential for moving to higher levels.',6, 5],
[26, 'Sorrow', 'dukkha', 'Joy is a state of expansion, and sadness is a state of contraction. In spiritual practice, sadness arises from the awareness of one`s inability to approach the divine - due to problems with the first and second chakras. But there is a way out - selfless service, the best cure for sadness.',7, 5],
[27, 'Selfless Case', 'Paramartha', 'If charity involves actions performed from time to time, then selfless service is a constant position, a way of being. Param means "higher," and artha is the goal for which the action is performed. Everything that is done for a higher purpose is paramartha. Higher may mean God or some other idea to which the player decided to devote his life. Selfless service is the renunciation of oneself and one`s self-identification for a higher purpose. Individuality ceases to exist as a separate unit, becoming part of a larger whole. The arrow of service takes the player to the human plane, on the fifth level.',8, 5],
[28, 'True religiosity', 'sudharma', 'Sudharma is life in harmony with the laws of the Game. Sudharma is understanding your place in the Game and following your own dharma. Sudharma is the individual path to liberation. As soon as a player begins to understand Sudharma, he becomes religious inwardly, and religion becomes a way of his life. Rituals lose their meaning, life itself turns into a constant worship. And the player becomes ready for the transition to the ascetic plan, to the sixth level.',8, 4],
[29, 'Atheism or lack of religiosity', 'adharma', 'Adharma is the non-observance of the laws of the Dharma, an action contrary to one’s inner nature. The cause of adharmic activity is often too much self-confidence. A person who has reached a certain spiritual level can begin to consider himself a god, capable of independently determining what is good and what is bad, without taking into account the laws of the universe, common to all. Such a person is bitten by a snake of vanity and he rolls down to the first level. Avoid this allows true faith, based on an understanding of the foundations of being and humility.',7, 4],
[30, 'Good trends', 'uttama-gati', 'Good trends are manifested in a player spontaneously if he moves in harmony with the laws of the macrocosm. While he vibrates on the three lower planes, these trends do not develop. Their growth begins only here, in the fourth chakra, since it requires the achievement of a certain degree of internal balance. Maintaining good trends is helped by breathing control, meditation (especially in the early morning), vegetarianism, sweats, scripture study, and all the virtues mentioned in this game. All this will help stabilize and reduce the waste of energy through the lower chakras.',6, 4],
[31, 'The plan of holiness', 'yaksha-loka', 'Yakshas are ethereal creatures that live in heaven. A player who falls on the plan of holiness experiences divine grace, oneness with the Divine, and the ability to see the manifestation of His grace throughout creation. This unity transcends simple intellectual understanding and becomes a real part of everyday life. The player’s attention is drawn primarily to the comprehension of the nature of the divine existence and the presence of the Divine in all creation.',5, 4],
[32, 'Plan of equilibrium', 'mahar-loka', 'The first three lokas serve as an arena where the jiva (individual consciousness) lives, developing in a series of new and new rebirths. In this fourth lock, the player rises above the physical level, desires and thoughts, and lives in a state of balance in the invisible world. In the heart center, male and female energy are balanced. Here, the player overcomes the intellectual understanding of the Divine that is characteristic of the third chakra, and moves towards a direct emotional experience of His presence inside his “I”, exuding love with his words and deeds.',4, 4],
[33, 'Fragrance plan', 'gandha loka', 'Gandha-loka is the level of divine aromas. Being at this level, the player not only acquires the ability to feel the subtlest aromas of physical and metaphysical nature, but also begins to exude a pleasant aroma. His bodily secretions are no longer malodorous.',3, 4],
[34, 'The plan of taste', 'race-loka', 'Race is pure shades of emotions, sensations, moods, tastes. When a player falls into the plan of taste, his taste in every sense of the word is refined. He becomes a connoisseur and connoisseur of good taste, recognized by all.',2, 4],
[35, 'Purgatory', 'naraka-loka', 'Naraka-loka is the abode of the God of death, where there is cleansing from the most subtle pollution and sins. Here the player is suffering physical and moral suffering, repents, realizes the nature of unnatural sin, gets rid of negativity and affirms his dharma.',1, 4],
[36, 'Clarity of consciousness', 'svachchha', 'Clarity of consciousness is the light that fills a player when he leaves the fourth level to enter the fifth, where a person becomes a man with a capital letter. In Sanskrit, the word svachcha means "pure, clear, transparent." This transparency is the result of the purification process through which the player passes through the Naraka Loka (human sphere). There is no place for rationality, intellectual understanding. Devotion and faith help to overcome this condition, and the player enters the level of living knowledge. All doubts go away and absolute transparency remains. The player has visited the plans of aroma and taste and is now ready to join the upward flow of energy, lifting him to the fifth chakra.',0, 4],
[37, 'Wisdom', 'jnana or jnana', 'Pure wisdom, free from judgment and judgment, is the power that elevates a player to a plan of bliss located in the eighth row outside the chakras. A player who understands his role in the game and the nature of the actions that will enable him to fulfill this role lives in bliss. Jnana is awareness, but not final realization. Jnana is an insight into the essence, but not the essence.',0, 3],
[38, '', 'Prana Loka', 'Prana is the life force. In Sanskrit, it is a synonym for life and the name of the breath of life that we receive with each breath. Prana is the “spirit” in the body, the connection of the soul and the physical shell. Consciousness leaves the body with prana. With the help of pranayama, yoga raises prana on the spine and reaches various siddhis - mystical perfection.',1, 3],
[39, '', 'Apana Loka', 'Apana is, in contrast to prana, the energy that goes down and is responsible for bodily secretions. This is the main force that helps cleanse the body. The mixture of prana and apana causes the awakening of kundalini - the colossal energy contained in the base of the spine. Kundalini bestows physical immortality and supernatural abilities.',2, 3],
[40, '', 'Vyana-loka', 'Vyana takes pranic energy in the lungs and distributes it throughout all body systems. This vital energy is responsible for the flow of blood, the secretion of glands, the movement of the body down and up, as well as for opening and closing the eyelids. Together with prana and apana, they are responsible for the normal functioning of the body. Full control over prana, apana and vyana allows the yogi to get rid of bodily influence and direct his energy to the higher chakras. The player’s understanding of the divine presence in the whole creation, acquired during a journey through the fourth chakra, makes him seek the Divine within himself, and so his attention turns to the processes occurring in his body and reflecting the processes of the macrocosm. His consciousness and experience expand, erasing the line between internal and external.',3, 3],
[41, 'The human plan', 'jana-loka', 'Jana-loka (or jnana-loka, the realm of wisdom), the fifth plan of the fifth level, is the abode of the Siddhas (creatures that have reached a high degree of development and have powers that allow them to perform actions that are “supernatural” for people on the lower planes) and saints constantly immersed in the contemplation of Lord Visnu. The element of air prevails here, and the bodies of beings on this plane are composed of pure wisdom that is not subject to desires. On this plane, the player comprehends the true meaning of what it means to be human. Often this is achieved directly during the transition from the level of the third chakra with an arrow leading from the field of selfless service.',4, 3],
[42, 'Agni Plan', 'Agni Loka', 'Agni or fire - fire is the source of both colors and forms that make up the essence of the world of phenomena. Fire is a gross manifestation of energy, its vehicle. The player who falls into this plane understands that his body is also only a means, an object of sacrifice. That is why in the fire they see a mediator between man and God. All religious rituals are performed in the presence of Agni as an eternal witness and accepting the sacrifice. Fire is present in all creation; nothing can be hidden from it. He is a witness who excludes any deception and self-deception.',5, 3],
[43, 'The birth of man', 'manusya janma', 'Passing through the Agni plan prepares the player for a real birth. Conceived in the second chakra, fed and raised in the third, filled with human emotions in the fourth, the player is now ready for the resurrection of his true human being - for a second birth. He becomes a double-born, Brahman - a follower of the Absolute Truth, Brahman.',6, 3],
[44, 'Ignorance', 'Avidya', 'Vidya means "knowledge, knowledge," and - the prefix of negation. Lack of knowledge is ignorance. Knowledge is the player’s understanding of his role in the game, wherever he is at the moment. A player who enters the field of ignorance, forgets about the illusory nature of being and becomes attached to certain emotional states or sensory perceptions. The energy of a player stung by a snake of ignorance drops to the level of the first chakra and the plan of sensuality. Loss of understanding of the nature of maya (illusion) leads to clouding of his intellect and leads to identification with certain states.',7, 3],
[45, 'Right knowledge', 'suvidya', 'If jnana is an awareness of the truth, “right knowledge” includes awareness and behavior (practice). This combination raises the player to the eighth plan, on the field of cosmic good. And now only one step separates him from the goal. He realizes himself as a macrocosm in a microcosm, an ocean enclosed in a drop. Correct knowledge adds a new dimension to jnana, awareness of the unity of the past, present and future. The field of correct knowledge completes the passage of the fifth chakra, the fifth row of the game. At this stage, the player reaches full awareness of his unity with the cosmos, he connects with the ultimate reality and is elevated to the plan of Rudra (Shiva), the plan of the cosmic good.',8, 3],
[46, 'Distinction', 'Viveka', 'The ability to distinguish is the ability to listen to your inner voice, which tells you what is right and what is not. Viveka could not appear in the game before. A player can get here only after passing through the field of correct knowledge (45). If a player falls on the arrow of the right knowledge, he immediately rises to the plan of the cosmic good. Otherwise, he has to resort to the ability to distinguish to determine the further course of the game. The ability to distinguish raises the plan of happiness. At the level of the sixth chakra, a person overcomes the influence of gross matter and becomes able to see the past, present and future in any direction - he opens a third eye. But the subtle influence of maya remains. The inner voice or the voice of the Lord in the heart acts as a reliable guide.',8, 2],
[47, 'Plan of Neutrality', 'Saraswati', 'In the sixth chakra, the negative and positive influence of the chakras and energies gradually disappears and only the neutral remains. The Sarasvati plan is the kingdom of the goddess who bears the same name. Here the player is surrounded by pure music and lives in a state of vidya, knowledge. Saraswati, the deity of learning and beauty, gives him the opportunity to achieve equilibrium and be beyond the influence of the energy fields of existence. Now he can just watch the game.',7, 2],
[48, 'The Solar Plan', 'Yamuna', 'In the sixth chakra, the player establishes a balance between the male, solar principle and the female, moon. This harmonious fusion of elements creates the “I” of the observer, which is neither male nor female, but represents a harmonious combination of both. Below the sixth chakra, the solar and lunar energies are intertwined with each other, here they merge and become one. This feeling of a single whole characterizes the plan of asceticism. Awareness of solar energy comes on the solar plane, but this energy does not affect the observer standing in the Yamuna River and sensing how the hot solar energy of creation and destruction, life and death, passes through it. Yamuna - Sister of the God of Death of the Pit',6, 2],
[49, 'Lunar plan', 'ganga', 'The player who falls into this plane is at the source of the attractive and enveloping female magnetic energy or psychic energy, which balances the solar energy of creativity.',5, 2],
[50, 'Plan of asceticism', 'tapa-loka', 'Just as in the fifth chakra, knowledge was of primary importance for the player, here, on the ascetic plane, all the aspirations of the player are aimed at the hard work of repentance and austerity. The word tapas means "asceticism", "mortification of the flesh", "burning." This is the practice of meditation of self-denial. Tapa-loka is inhabited by great yogis and ascetics, who have gone along a path from which there is no return, immersed in deep asceticism, whose goal is to advance up to the next level, satya-loka. The player can enter tapa-loka directly through the practice of sudharma (the plan of religiosity) in the fourth chakra or gradually, moving through the fifth chakra, developing consciousness and mastering the system of lunar and solar energy.',4, 2],
[51, 'Earth', 'prithivi', 'Earth symbolizes the great maternal principle. This is the scene on which the mind plays its eternal game known as Leela. Here, the player understands that the earth is not just soil, but Mother Earth. The player opens up new patterns and harmonies, new ways of playing, previously hidden from him in the fog created by involvement in the lower chakras. Despite the fact that her children cut her body and burn her soul, the Earth gives them diamonds, gold, platinum. She selflessly follows the law of the Dharma and does not distinguish between high and low. That is why the earth’s field is located in the sixth chakra. We see her body, the physical plane of the first chakra. What we cannot see is her spirit, her understanding, generosity and kindness, her greatness. This is the understanding that comes to the player when he reaches the sixth chakra. If a player fails to achieve Cosmic Consciousness, he will have to return to Mother Earth again and from here start again to a higher goal.',3, 2],
[52, 'Plan of violence', 'chimsa loka', 'The player who has reached the sixth chakra is aware of the unity of everything. Human bodies serve only as transient forms. The true essence of all players exists outside the realm of names and forms. The player knows that death is just a change of life scenario. There is a danger that the player will begin to resort to violence, realizing that his actions ultimately do no real harm to other players. But he has not yet completely freed himself from karma, and violation of the laws of dharma will entail a fall to the fourth level - in Purgatory.',2, 2],
[53, 'The plan of liquids', 'jala-loka', 'Water is cold in nature, it absorbs heat, bringing coolness. The heat of asceticism of the sixth chakra, austerities, makes the player cruel. He needs to go through the clear waters of the liquid plane in order to extinguish the burning energy of violence and turn it into the even warmth of spiritual love.',1, 2],
[54, 'Plan of spiritual devotion', 'bhakti-loka', 'Bhakti, or spiritual devotion, is based on the statement: "Love is God, and God is love." A bhakta devotee loves his deity. The deity is beloved, and the devotee is in love. Bhakti is the immediate method; it is the shortest path to the Divine. All yoga and all knowledge, jnana, rests on the cornerstone of true faith, true devotion and love, true bhakti. There is nothing higher than love, and bhakti is the religion of love. Jnana makes the player a sage, while bhakti turns him into a divine child on the lap of his Mother under the benevolent protection of the Father. The sage has a long way to go to meet the Lord. Bhakta is always surrounded by its Divinity, present in the myriad of its forms and names in every part of life experience.',0, 2],
[55, 'Selfishness', 'ahamkara', 'Ahamkara is a feeling of separation of one’s existence. When all the player’s attention is directed exclusively to the satisfaction of his desires, even spiritual ones, he becomes an egoist. Satisfaction of spiritual and material desires pushes into the background love, humility, sincerity, attentiveness to others and all other dharmic qualities. Self-focus contradicts the spiritual path - the path from oneself to the Divine. As soon as obstacles arise for satisfying desires, such a player falls into the old trap of anger and falls to the first level.',0, 1],
[56, 'Plan of primordial vibrations', 'Omkara', 'Om is the one sound present throughout the universe, manifested and unmanifest. It is the subtlest of the forms in which energy exists. Omkara is a plan of vibrations that produce this cosmic sound in harmony with all other vibrations. The player who gets here realizes that Om is a vibration that fills all the elements of being.',1, 1],
[57, 'Gas plan', 'vayu-loka', 'Vayu-loka (literally "plan of the air") is located in the area of \u200b\u200bsatya-loka, the plane of reality, in the seventh row of the playing board. This vayu is not that wind, or air, which is on the physical or earthly plane. This is the essence of the physical element of air. Vayu-loka is a plan where a player becomes a stream of energy, with which the whole atmosphere moves, overcoming gravity. Enlightened souls with light bodies dwell here, who have not yet reached satya-loka - the plane of reality. In the sixth chakra we met with the plan of liquids, but the liquid still has a shape. Gas does not have any particular shape. Liquid has weight; gas does not. The player is no longer burdened by anything; he has gained true freedom of action. He becomes a creature that is not subject to gravity and has no form.',2, 1],
[58, 'Plan of radiance', 'teja-loka', 'Teja is the light that was created in the beginning. The world that we perceive in an awake state is a world of phenomena and forms, a phenomenal world that exists in the light (tedzha) from which it materializes. This world is similar to the world of our dreams, but it is not. This state is completely “made” of light and truly enlightened dwell in it.',3, 1],
[59, 'Plan of Reality', 'Satya Loka', 'Satya-loka - the last plan of the seven main locks located in the spinal column of the playing board. Here the player reaches the world of Shabd-Brahman and is on the verge of liberation from the cycle of rebirth. He has reached the highest plane, beyond which is Vaikuntha, the seat of Cosmic Consciousness. On this plane, the player is affirmed in Reality. Here the player reaches his highest chakra and himself becomes a reality, a realized being. He is in a blissful state of samadhi, like a drop in the ocean. But even here, the player has not yet reached liberation. Here, at the seventh level of the game, there are three snakes. The first is egoism. The second is negative intelligence. The third is tamas. Having reached the plan of reality, the player escaped one of these snakes, but two are waiting for him in front, challenging his desire for liberation.',4, 1],
[60, 'Positive Intelligence', 'Subuddhi', 'Subuddhi is the correct understanding that comes only with the attainment of the plan of reality. After the player has reached satya-loka, his consciousness becomes perfect and free from duality and he comprehends the Divine in all forms and phenomena of this world. Such a consciousness is subuddhi.',5, 1],
[61, 'Negative Intelligence', 'Durbuddhi', 'If the player does not follow the laws of the Dharma, doubting the cosmic nature of being and the divine presence in each of his experiences, he is stung by a snake of negative intelligence, dropping down to the plane of insignificance. He did not learn to accept everything that the world offers him, to use all the opportunities for development, and to see God`s hand in everything. Now he has to go through all the vibrational plans related to the second chakra, unless the arrows of compassion and charity help. If he does not resort to the help of these arrows, he will have to redeem his negativity (cell 21 - redemption) and again find the Dharma or choose a completely new course of action.',6, 1],
[62, 'Happiness', 'Sukha', 'Happiness, or sukha, comes to the player when his consciousness tells him that he is very close to the goal, giving him confidence that he is approaching liberation. The feelings he experiences are indescribable; they cannot be described in words. He feels the happiness that a river experiences when connecting to the ocean after a journey of a thousand miles. It is a feeling of merging with its source. If, being in such a happy state, the player does not neglect his karma, does not become lazy and passive, he has a real chance to achieve Cosmic Consciousness during this life. But if he is so overwhelmed by the experience of happiness that he forgets about the need to act, feeling that his mission is close to the end, the tamas snake lurking next to him is ready to swallow him, returning his energy to the level of the first chakra.',7, 1],
[63, 'Darkness', 'Tamas', 'In Sanskrit, the word tamas means "darkness." Tamas is the snake of darkness, the longest snake in the game, which ruthlessly pulls the player into the illusion from the radiance of the plan of reality. In the seventh chakra, tamas is the ignorance that arises from attachment to sensory perception. This ignorance comes after the player realizes a state of happiness and thinks that this is the end of the need to fulfill karma. But here the player still cannot stop all activity. He forgot that until he reaches liberation, the game is not over. Inaction is an attempt to avoid the law of karma. Tamas is an attribute of tamoguna, its manifestation in the microcosm. When the same power is discussed as an attribute of prakriti in the eighth row of the game, it is called Tamoguna.',8, 1],
[64, 'The phenomenal plan', 'prakriti-loka', 'Manifested prakriti is a material world consisting of elements - earth, water, fire, air and ether (akasha), as well as mind (manas), intellect (buddhi) and ego (ahamkara). These are the eight gross manifestations of prakriti. Divine prakriti is Maya-Shakti, the illusory energy of God, the shadow of God.',8, 0],
[65, 'Plan of the inner space', 'uranta-loka', 'Leaving behind the seventh row and realizing the existence of prakriti, the player begins to penetrate the source of all phenomena of the phenomenal world - the great consciousness. The player merges with him, and at that moment all duality disappears. The player receives the pure experience of immense dimensions, the infinite space lying inside his "I".',7, 0],
[66, 'The Bliss Plan', 'Ananda Loka', 'Consciousness is described as truth, being and bliss - Satchitanananda. Ananda is the highest truth, the essence of being. In the process of creation, the "I" is gradually covered with five shells. Of these, the first and most subtle — anandamaya-kosh — is the body of pure being, pure experience of consciousness. This is the body of bliss, in the center of which is Cosmic Consciousness. During the period corresponding to creation, it acts as an individual consciousness.',6, 0],
[67, 'Plan of the cosmic good', 'Rudra-loka', 'Rudra is one of the names of Shiva. All creation goes through three phases. The manifestation is accompanied by the maintenance of the arising form and inevitably ends with decay or destruction. These three processes - creation, maintenance (preservation) and destruction are carried out by the three forces of the Most High, who was not created by anyone, but who creates everything. Out of his will, the Creator (Brahma), the Guardian (Vishnu) and the Destroyer (Shiva) were born. These three forces are interdependent and interconnected. Creation takes place according to the will of the Lord; according to his will, creation is preserved and destroyed in the end. Without the destruction of false self-identification - the concept of a separate reality, an individual ego - true union (yoga) is impossible. Thus, Shiva, destroying the false ego, unites the individual consciousness with its cosmic source. Rudra-loka is one of the three central squares of the top row of the playing board, where there are divine forces responsible for the entire creation, which everyone seeking liberation seeks to unite with. The desire for the right knowledge leads the player to the seat of Shiva. Here he comes to the realization of the cosmic good, the essence of which is truth, and form is beauty.',5,0 ],
[68, 'Cosmic Consciousness', 'Vaikuntha-loka', 'Towering above all the locks, beyond all limits, is Vaikuntha - the lock of Cosmic Consciousness, the life force (prana) of all manifest reality. This loka also consists of an element called Mahat, which serves as the source of all other elements. Before the start of the game, the participant accepts the importance and significance of this plan of Genesis, which will always be his goal. Vaikuntha is the abode of Vishnu, a place that every follower of Hinduism hopes to achieve by completing its existence in its current form. Here is Cosmic Consciousness, because Vishnu, being the Truth, is the patron and protector of consciousness in its ascent. Points falling on the dice of karma correspond to the level of vibration of the player. The bone determines both the player’s position on the field and the distance traveled and the path ahead. The player can follow the discipline of ashtanga yoga, the octal path, gradually passing level after level. Or, following the Dharma, become a bhakta - a spiritual devotee. All paths lead to one goal. Whatever the player’s path is among all the innumerable possibilities, he has now reached the Vishnu monastery. Vishnu serving the essence of creation, Truth. It is located directly above the plane of reality, because Truth is the highest reality. The game ends. What will happen now depends on the player. The nature of the space game is simple - it is the discovery of new combinations. With what new karmas, with what kind of fellow travelers will the player be able to re-enter the game, trying again to find a state that will be his real haven? He can continue this game of hide and seek with himself or forever remain outside the game. Or he may return back to Earth to help other seekers reach their goal.',4, 0],
[69, 'Plan of the Absolute', 'Brahma-loka', 'Rudra is located on one side of Vaikuntha-loka, and Brahma is on the other. Together they form the triad of Brahma, Vishnu and Shiva in the center of the top row of the playing board. Those who are fortified in the truth live here, not afraid of a subsequent return to the fulfillment of karmic roles. Practitioners of mercy come here, they are in the abode of Brahma, not knowing fear. Brahma is the creator of the material world, the active principle of the noumenon, a force that transforms consciousness into countless forms and reflections. His abode is Brahma-loka. The player reaching this place merges with this absolute power, this subtle principle. Although Brahma-loka is located next to the plan of Cosmic Consciousness, Brahma cannot give the player liberation. The game must go on. Brahma determines the form of the game, but there is something else besides form. Only Truth comprehended on the path of spiritual devotion or by gradually moving up the ladder of yoga to the Highest Good (Shiva) can grant final liberation.',3, 0],
[70, 'Sattvaguna', '', 'Sattva itself is the mode of virtue that contributes to the fulfillment of the Dharma. Sattvaguna is synonymous with concepts such as light, essence, true nature and higher levels of vibration. The calm, unperturbed state of meditation leading to samadhi is realized when sattva prevails. But the three gunas in the world of karma always exist together and sattva sooner or later becomes mixed with rajas (passion) or tamas (ignorance). Unclean sattva is always subject to the effects of karma. Pure sattva is not different from Cosmic Consciousness, Supreme Truth. Sat means "truth."',2, 0],
[71, 'Rajoguna', '', 'Rajoguna is an activity in consciousness, or active consciousness. A player who has reached the eighth row, but who has failed in an attempt to realize Cosmic Consciousness, is carried forward by the forces of karma, activity. This activity is the cause of all suffering, it presupposes the presence of a figure who inevitably falls victim to his ambitions and the expectation of the fruits of the activity. Any obstacle to the desired goal gives rise to pain and suffering.',1, 0],
[72, 'Tamoguna', '', 'Tamoguna hides the truth so that the rope seems to be a snake, and the snake - a rope. Darkness is the main sign of Tamoguna, and its nature is passivity. The player who gets here immediately leaves the level of cosmic forces and returns to earth to search for a new way of climbing. What happens next depends only on the player and that One, which is the Truth.',0, 0],
]
specials= (
#ladders
[10,23],
[17,69],
[20,32],
[22,60],
[27,41],
[28,50],
[45,67],
[37,66],
[46,62],
[54,68],
#snakes
[63,2],
[55,3],
[16,4],
[29,6],
[24,7],
[12,8],
[44,9],
[52,35],
[72,51])
results=[]
def throw_dice(numberofrounds):
""" Throw the dice """
number = random.randint(0,5)
number_thrown = number + 1
#print (f"{play}/{numberofrounds} - You have thrown { number_thrown}")
numberofrounds +=1
return number_thrown, numberofrounds
def give_explanation(a):
for s in squares:
if s[0]== a :
if s[1]=="":
explanation_header.write (f"Square {s[0]}. {s[2]}")
elif s[2]=="":
explanation_header.write (f"{s[0]}. {s[1]}")
else:
explanation_header.write (f"{s[0]}. {s[1]} ({s[2]})")
explanation_txt.write (s[3])
def playgame(started, number_of_rounds, current_position):
from random import random
random_number = str(int(100000* random()))
st.write(random_number)
if st.button ("Roll dice x", key = random_number):
st.write("I roll the dice")
st.stop()
after_rolling_dice(started, number_of_rounds, current_position)
else:
st.write("Dontknowhwy")
def after_rolling_dice(started, numberofrounds, currentposition):
thrown, numberofrounds = throw_dice(numberofrounds)
st.write (f" {numberofrounds}. You have thrown {thrown}")
# TO DO
# Exception: if six drops out three times in a row, they are not summed,
# but are reset. If a player rolls four or more
# sixes in a row, he continues to roll the dice until a number other than
# six falls out, and then he goes forward by the number of steps equal
# to the total sum of all points thrown,
# and then passes the dice.
if (started == False and thrown == 6) or (started == True):
if (started == False and thrown == 6):
started = True
oldposition = currentposition
currentposition += thrown
if currentposition > 72:
currentposition = currentposition - thrown-tempthrown
st.write (f"You stay at {currentposition}")
else:
st.write (f" ({oldposition} + {thrown} = {currentposition})\n ")
give_explanation (currentposition)
for value in specials:
if currentposition == (value[0]):
currentposition = value[1]
if value[0]>value[1]:
st.write(f"Oh no!!!! You go from {value[0]} to {value[1]}\n")
give_explanation(value[1])
break
else:
st.write(f"Whoop whoop!! You go from {value[0]} to {value[1]}\n")
give_explanation(value[1])
break
if currentposition == 68: #COSMIC CONSCIOUSNESS
st.write ("YOU MADE IT")
else:
playgame(started, numberofrounds, currentposition)
else:
# Player didn't throw a 6 yet to start
st.write ("You have to throw a 6 to start")
playgame(started, numberofrounds, currentposition)
def main():
st.title ("Leela game")
global you_have_thrown, explanation_header, explanation_text, you_move, press_enter, button_place
button_place =st.empty()
you_have_thrown = st.empty()
explanation_header = st.empty()
explanation_text = st.empty()
you_move = st.empty()
press_enter = st.empty()
started = False
playgame(started, 0,0)
global numberofrounds
global currentposition
global play
global numberofgames
global printregel
global started
global tempthrown
global zesnumber_thrown
global r
global printregel
global started
numberofgames = 1
numberofrounds = 0
currentposition = 0
tempthrown = 0
zesnumber_thrown = False
started = False
r = 1
printregel=[]
debug = True
#explanation = True
# https://irgp2.ru/en/igra-lila-moi-opyt-ispolzovaniya-kosmicheskaya-igra-dzhagat-lila/
main()
| 146.473684
| 1,820
| 0.754922
| 8,756
| 52,877
| 4.554705
| 0.20032
| 0.0168
| 0.004288
| 0.002407
| 0.069833
| 0.04185
| 0.029212
| 0.021313
| 0.017101
| 0.014995
| 0
| 0.01362
| 0.189099
| 52,877
| 360
| 1,821
| 146.880556
| 0.916321
| 0.08064
| 0
| 0.09375
| 0
| 0.375
| 0.884061
| 0.000928
| 0
| 0
| 0
| 0.002778
| 0
| 1
| 0.026042
| false
| 0.078125
| 0.057292
| 0
| 0.088542
| 0.015625
| 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
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b3abc506b7bea591c7d83bf7e9f7d21e7b359fb0
| 216
|
py
|
Python
|
tgbotscenario/asynchronous/scenes/scene.py
|
Abstract-X/tgbotscenario
|
bd79ff5548b9fa33c198cfda36c6533e35127dfc
|
[
"MIT"
] | 4
|
2021-07-12T17:40:41.000Z
|
2022-02-20T17:55:45.000Z
|
tgbotscenario/asynchronous/scenes/scene.py
|
Abstract-X/tgbotscenario
|
bd79ff5548b9fa33c198cfda36c6533e35127dfc
|
[
"MIT"
] | 1
|
2021-07-30T18:08:36.000Z
|
2021-07-30T18:08:36.000Z
|
tgbotscenario/asynchronous/scenes/scene.py
|
Abstract-X/tgbotscenario
|
bd79ff5548b9fa33c198cfda36c6533e35127dfc
|
[
"MIT"
] | 1
|
2021-07-25T15:59:34.000Z
|
2021-07-25T15:59:34.000Z
|
from tgbotscenario.common import scene
class BaseScene(scene.BaseScene):
async def process_enter(self, event, data) -> None:
pass
async def process_exit(self, event, data) -> None:
pass
| 16.615385
| 55
| 0.671296
| 27
| 216
| 5.296296
| 0.62963
| 0.111888
| 0.20979
| 0.237762
| 0.293706
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.240741
| 216
| 12
| 56
| 18
| 0.871951
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.166667
| 0
| 0.333333
| 0
| 1
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
b3acb5fd56916a15bbce82f1b737368424dc601d
| 52
|
py
|
Python
|
paperboy/scheduler/airflow/__init__.py
|
chris-aeviator/paperboy
|
604c912c3530cd37fb07dcf22321d9dde15465ee
|
[
"Apache-2.0"
] | 233
|
2018-11-01T09:17:08.000Z
|
2022-03-22T08:27:24.000Z
|
paperboy/scheduler/airflow/__init__.py
|
chris-aeviator/paperboy
|
604c912c3530cd37fb07dcf22321d9dde15465ee
|
[
"Apache-2.0"
] | 99
|
2018-10-17T21:48:42.000Z
|
2021-05-07T08:33:36.000Z
|
paperboy/scheduler/airflow/__init__.py
|
chris-aeviator/paperboy
|
604c912c3530cd37fb07dcf22321d9dde15465ee
|
[
"Apache-2.0"
] | 29
|
2018-11-01T11:33:08.000Z
|
2022-01-12T22:12:19.000Z
|
from .airflow import AirflowScheduler # noqa: F401
| 26
| 51
| 0.788462
| 6
| 52
| 6.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068182
| 0.153846
| 52
| 1
| 52
| 52
| 0.863636
| 0.192308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
b3b394b0880ca95c54681487d74c8649e9239c3e
| 96
|
py
|
Python
|
venv/lib/python3.8/site-packages/numpy/distutils/tests/test_mingw32ccompiler.py
|
GiulianaPola/select_repeats
|
17a0d053d4f874e42cf654dd142168c2ec8fbd11
|
[
"MIT"
] | 2
|
2022-03-13T01:58:52.000Z
|
2022-03-31T06:07:54.000Z
|
venv/lib/python3.8/site-packages/numpy/distutils/tests/test_mingw32ccompiler.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | 19
|
2021-11-20T04:09:18.000Z
|
2022-03-23T15:05:55.000Z
|
venv/lib/python3.8/site-packages/numpy/distutils/tests/test_mingw32ccompiler.py
|
DesmoSearch/Desmobot
|
b70b45df3485351f471080deb5c785c4bc5c4beb
|
[
"MIT"
] | null | null | null |
/home/runner/.cache/pip/pool/ac/c0/bc/f88c813a2b9955f02892557f2a70fda95781fe1155bdbe5d4adc5f934f
| 96
| 96
| 0.895833
| 9
| 96
| 9.555556
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.385417
| 0
| 96
| 1
| 96
| 96
| 0.510417
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
b3c972ad1ddd0f16167c418fdd5542ff692c7a78
| 1,980
|
py
|
Python
|
external_apps/threadedcomments/urls.py
|
davemerwin/blue-channel
|
67a1a7fcc512574e6522aa57633f9d69c25c8906
|
[
"BSD-3-Clause"
] | 4
|
2016-05-08T06:07:50.000Z
|
2021-11-21T19:41:40.000Z
|
external_apps/threadedcomments/urls.py
|
davemerwin/blue-channel
|
67a1a7fcc512574e6522aa57633f9d69c25c8906
|
[
"BSD-3-Clause"
] | null | null | null |
external_apps/threadedcomments/urls.py
|
davemerwin/blue-channel
|
67a1a7fcc512574e6522aa57633f9d69c25c8906
|
[
"BSD-3-Clause"
] | 3
|
2017-07-09T02:14:54.000Z
|
2021-07-13T19:16:59.000Z
|
from django.conf.urls.defaults import patterns, url
from threadedcomments.models import FreeThreadedComment
import views
free = {'model' : FreeThreadedComment}
urlpatterns = patterns('',
### Comments ###
url(r'^comment/(?P<content_type>\d+)/(?P<object_id>\d+)/$', views.comment, name="tc_comment"),
url(r'^comment/(?P<content_type>\d+)/(?P<object_id>\d+)/(?P<parent_id>\d+)/$', views.comment, name="tc_comment_parent"),
url(r'^comment/(?P<object_id>\d+)/delete/$', views.comment_delete, name="tc_comment_delete"),
url(r'^comment/(?P<edit_id>\d+)/edit/$', views.comment, name="tc_comment_edit"),
### Comments (AJAX) ###
url(r'^comment/(?P<content_type>\d+)/(?P<object_id>\d+)/(?P<ajax>json|xml)/$', views.comment, name="tc_comment_ajax"),
url(r'^comment/(?P<content_type>\d+)/(?P<object_id>\d+)/(?P<parent_id>\d+)/(?P<ajax>json|xml)/$', views.comment, name="tc_comment_parent_ajax"),
url(r'^comment/(?P<edit_id>\d+)/edit/(?P<ajax>json|xml)/$', views.comment, name="tc_comment_edit_ajax"),
### Free Comments ###
url(r'^freecomment/(?P<content_type>\d+)/(?P<object_id>\d+)/$', views.free_comment, name="tc_free_comment"),
url(r'^freecomment/(?P<content_type>\d+)/(?P<object_id>\d+)/(?P<parent_id>\d+)/$', views.free_comment, name="tc_free_comment_parent"),
url(r'^freecomment/(?P<object_id>\d+)/delete/$', views.comment_delete, free, name="tc_free_comment_delete"),
url(r'^freecomment/(?P<edit_id>\d+)/edit/$', views.free_comment, name="tc_free_comment_edit"),
### Free Comments (AJAX) ###
url(r'^freecomment/(?P<content_type>\d+)/(?P<object_id>\d+)/(?P<ajax>json|xml)/$', views.free_comment, name="tc_free_comment_ajax"),
url(r'^freecomment/(?P<content_type>\d+)/(?P<object_id>\d+)/(?P<parent_id>\d+)/(?P<ajax>json|xml)/$', views.free_comment, name="tc_free_comment_parent_ajax"),
url(r'^freecomment/(?P<edit_id>\d+)/edit/(?P<ajax>json|xml)/$', views.free_comment, name="tc_free_comment_edit_ajax"),
)
| 68.275862
| 162
| 0.668182
| 306
| 1,980
| 4.091503
| 0.107843
| 0.043131
| 0.124601
| 0.079872
| 0.782748
| 0.776358
| 0.740415
| 0.708466
| 0.551118
| 0.482428
| 0
| 0
| 0.080303
| 1,980
| 29
| 163
| 68.275862
| 0.687534
| 0.031313
| 0
| 0
| 0
| 0.3
| 0.580032
| 0.498679
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.15
| 0
| 0.15
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
37414d5882580f7c776eff0209d59569c8da0780
| 127
|
py
|
Python
|
Blob_Lib/assimp-5.2.3/assimp/port/PyAssimp/pyassimp/__init__.py
|
antholuo/Blob_Traffic
|
5d6acf88044e9abc63c0ff356714179eaa4b75bf
|
[
"MIT"
] | null | null | null |
Blob_Lib/assimp-5.2.3/assimp/port/PyAssimp/pyassimp/__init__.py
|
antholuo/Blob_Traffic
|
5d6acf88044e9abc63c0ff356714179eaa4b75bf
|
[
"MIT"
] | null | null | null |
Blob_Lib/assimp-5.2.3/assimp/port/PyAssimp/pyassimp/__init__.py
|
antholuo/Blob_Traffic
|
5d6acf88044e9abc63c0ff356714179eaa4b75bf
|
[
"MIT"
] | null | null | null |
version https://git-lfs.github.com/spec/v1
oid sha256:2b490dcb6e959ba03ed55e65493de2972eb256c34b51b8aa93a0190c59b69c92
size 20
| 31.75
| 75
| 0.88189
| 13
| 127
| 8.615385
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.38843
| 0.047244
| 127
| 3
| 76
| 42.333333
| 0.53719
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
37510404bd6761284f493909ed81dca08e548068
| 133
|
py
|
Python
|
utils/accuracy.py
|
mrityunjai01/copy_stmpyramid_2
|
8f3324a955f82c896829428d53b0153b0430482c
|
[
"MIT"
] | null | null | null |
utils/accuracy.py
|
mrityunjai01/copy_stmpyramid_2
|
8f3324a955f82c896829428d53b0153b0430482c
|
[
"MIT"
] | null | null | null |
utils/accuracy.py
|
mrityunjai01/copy_stmpyramid_2
|
8f3324a955f82c896829428d53b0153b0430482c
|
[
"MIT"
] | 1
|
2022-02-25T06:29:27.000Z
|
2022-02-25T06:29:27.000Z
|
import numpy as np
from random import seed
np.random.seed(1)
seed(1)
def accuracy(a,b):
return np.mean(np.array(a)==np.array(b))
| 19
| 44
| 0.706767
| 27
| 133
| 3.481481
| 0.555556
| 0.106383
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017391
| 0.135338
| 133
| 7
| 44
| 19
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 0.666667
| 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
| 1
| 1
| 1
| 0
|
0
| 5
|
378b844b52e34f5de835f15c751760fbd715bbee
| 111
|
py
|
Python
|
ctabench/__init__.py
|
cta-observatory/cta-benchmarks
|
da500d2e15da97cd8826d9abc107e517ca6f2893
|
[
"MIT"
] | 4
|
2019-01-24T09:58:23.000Z
|
2020-10-01T08:11:37.000Z
|
ctabench/__init__.py
|
cta-observatory/cta-benchmarks
|
da500d2e15da97cd8826d9abc107e517ca6f2893
|
[
"MIT"
] | 10
|
2018-12-12T10:34:34.000Z
|
2020-10-01T11:50:31.000Z
|
ctabench/__init__.py
|
cta-observatory/cta-benchmarks
|
da500d2e15da97cd8826d9abc107e517ca6f2893
|
[
"MIT"
] | 9
|
2018-12-11T13:01:46.000Z
|
2019-11-22T10:01:01.000Z
|
__version__ = 0.1
from . import dl0
from . import dl1
from . import dl2
from . import dl3
from .core import *
| 13.875
| 19
| 0.711712
| 18
| 111
| 4.166667
| 0.555556
| 0.533333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0.216216
| 111
| 7
| 20
| 15.857143
| 0.793103
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.833333
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
37ace01b8fe76f3ba8bd9d8fcbd79c3741b3a585
| 61
|
py
|
Python
|
run3.py
|
paulo-pieretti/aulagit
|
15c75d991aadd99ffadf6311dafa40844751feca
|
[
"MIT"
] | null | null | null |
run3.py
|
paulo-pieretti/aulagit
|
15c75d991aadd99ffadf6311dafa40844751feca
|
[
"MIT"
] | null | null | null |
run3.py
|
paulo-pieretti/aulagit
|
15c75d991aadd99ffadf6311dafa40844751feca
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
print "running 3 (testando branches)"
| 10.166667
| 38
| 0.688525
| 8
| 61
| 5.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.039216
| 0.163934
| 61
| 5
| 39
| 12.2
| 0.784314
| 0.278689
| 0
| 0
| 0
| 0
| 0.697674
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 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
| 1
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
37bf3df11cb56f6754f834b3f66dfe687b7525f3
| 256
|
py
|
Python
|
vortex_auth/__init__.py
|
sihrc/vortex-auth
|
729701628b4e7e446ac86bbc85640e9c997b869f
|
[
"MIT"
] | null | null | null |
vortex_auth/__init__.py
|
sihrc/vortex-auth
|
729701628b4e7e446ac86bbc85640e9c997b869f
|
[
"MIT"
] | null | null | null |
vortex_auth/__init__.py
|
sihrc/vortex-auth
|
729701628b4e7e446ac86bbc85640e9c997b869f
|
[
"MIT"
] | null | null | null |
"""
vortex auth plugin
---------------
Author: Chris Lee
Email: sihrc.c.lee@gmail.com
"""
from .middleware import * # noqa
from .errors import * # noqa
from .holder import * # noqa
from .config import * # noqa
from .token import TokenManager # noqa
| 18.285714
| 39
| 0.652344
| 33
| 256
| 5.060606
| 0.606061
| 0.239521
| 0.335329
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1875
| 256
| 13
| 40
| 19.692308
| 0.802885
| 0.421875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
37c1d460943ee005e6b7baa0f799a0f83abae85e
| 48
|
py
|
Python
|
ecommerce/taxes/taxes/exceptions.py
|
NetstationPL/example_event_source_ecommerce
|
67e673e91da4e24ff88d17e34e69a312da65b80d
|
[
"MIT"
] | null | null | null |
ecommerce/taxes/taxes/exceptions.py
|
NetstationPL/example_event_source_ecommerce
|
67e673e91da4e24ff88d17e34e69a312da65b80d
|
[
"MIT"
] | null | null | null |
ecommerce/taxes/taxes/exceptions.py
|
NetstationPL/example_event_source_ecommerce
|
67e673e91da4e24ff88d17e34e69a312da65b80d
|
[
"MIT"
] | null | null | null |
class VatRateNotApplicable(Exception):
pass
| 16
| 38
| 0.791667
| 4
| 48
| 9.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145833
| 48
| 2
| 39
| 24
| 0.926829
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
806e2758045e35e3864064ddb387824040d1fef4
| 46
|
py
|
Python
|
code/abc103_b_02.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | 3
|
2019-08-16T16:55:48.000Z
|
2021-04-11T10:21:40.000Z
|
code/abc103_b_02.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | null | null | null |
code/abc103_b_02.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | null | null | null |
print("Yes" if input() in input()*2 else "No")
| 46
| 46
| 0.630435
| 9
| 46
| 3.222222
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025
| 0.130435
| 46
| 1
| 46
| 46
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0.106383
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
8072f3a6e28e3f23cf6e125b1e666d8a5a922fba
| 72
|
py
|
Python
|
pytorch_widedeep/models/tabular/resnet/__init__.py
|
TangleSpace/pytorch-widedeep
|
ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff
|
[
"MIT"
] | null | null | null |
pytorch_widedeep/models/tabular/resnet/__init__.py
|
TangleSpace/pytorch-widedeep
|
ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff
|
[
"MIT"
] | null | null | null |
pytorch_widedeep/models/tabular/resnet/__init__.py
|
TangleSpace/pytorch-widedeep
|
ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff
|
[
"MIT"
] | null | null | null |
from pytorch_widedeep.models.tabular.resnet.tab_resnet import TabResnet
| 36
| 71
| 0.888889
| 10
| 72
| 6.2
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.055556
| 72
| 1
| 72
| 72
| 0.911765
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
809d0ef720bde5441d475b612f105c7bcad8a7b2
| 128
|
py
|
Python
|
django_typograf/exceptions.py
|
movermeyer/django-typograf
|
fbb1cb6b4ea3a591bca72e2172819007aac625b7
|
[
"MIT"
] | 1
|
2015-03-24T12:10:27.000Z
|
2015-03-24T12:10:27.000Z
|
django_typograf/exceptions.py
|
movermeyer/django-typograf
|
fbb1cb6b4ea3a591bca72e2172819007aac625b7
|
[
"MIT"
] | 3
|
2020-02-11T22:28:37.000Z
|
2021-06-10T17:44:50.000Z
|
django_typograf/exceptions.py
|
movermeyer/django-typograf
|
fbb1cb6b4ea3a591bca72e2172819007aac625b7
|
[
"MIT"
] | 1
|
2018-03-04T20:29:11.000Z
|
2018-03-04T20:29:11.000Z
|
from django.core.exceptions import FieldError
class TypografFieldError(FieldError):
""" Typograf exception """
pass
| 14.222222
| 45
| 0.734375
| 12
| 128
| 7.833333
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179688
| 128
| 8
| 46
| 16
| 0.895238
| 0.140625
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 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
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
80aa76a2389b81befe8a20ba4e25be6776c94c18
| 90
|
py
|
Python
|
app/sources/admin.py
|
esdevop/mymodb
|
392f1024d32cb1e19f39841a7811a4b990813909
|
[
"MIT"
] | null | null | null |
app/sources/admin.py
|
esdevop/mymodb
|
392f1024d32cb1e19f39841a7811a4b990813909
|
[
"MIT"
] | 3
|
2021-08-13T10:10:21.000Z
|
2021-08-16T10:10:04.000Z
|
app/sources/admin.py
|
esdevop/mymodb
|
392f1024d32cb1e19f39841a7811a4b990813909
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from .models import Source
admin.site.register(Source)
| 15
| 32
| 0.811111
| 13
| 90
| 5.615385
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122222
| 90
| 5
| 33
| 18
| 0.924051
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
80dba95d79279518287a316bc7be8a82c6e78e02
| 258
|
py
|
Python
|
examples/dagster_examples/bay_bikes/repository.py
|
nmbrgts/dagster
|
c0897431a667bdf4fa0a9e3eb0241d4a18889070
|
[
"Apache-2.0"
] | null | null | null |
examples/dagster_examples/bay_bikes/repository.py
|
nmbrgts/dagster
|
c0897431a667bdf4fa0a9e3eb0241d4a18889070
|
[
"Apache-2.0"
] | null | null | null |
examples/dagster_examples/bay_bikes/repository.py
|
nmbrgts/dagster
|
c0897431a667bdf4fa0a9e3eb0241d4a18889070
|
[
"Apache-2.0"
] | null | null | null |
from dagster import RepositoryDefinition
from .pipelines import download_csv_pipeline
def define_repo():
return RepositoryDefinition(
name='bay_bikes_demo',
pipeline_dict={'download_csv_pipeline': lambda: download_csv_pipeline},
)
| 23.454545
| 79
| 0.75969
| 28
| 258
| 6.642857
| 0.642857
| 0.177419
| 0.306452
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170543
| 258
| 10
| 80
| 25.8
| 0.869159
| 0
| 0
| 0
| 0
| 0
| 0.135659
| 0.081395
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0
| 0.285714
| 0.142857
| 0.571429
| 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
| 1
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
80ddee0a0f353933c328f677a8f5faf17b6d1ef5
| 694
|
py
|
Python
|
pvlib_python/test/test_pvl_absoluteairmass.py
|
cwhanse/PVLIB_Python
|
4ed3dbb9dfd4d4fc9f594580809fc3c09fa8e93d
|
[
"BSD-3-Clause"
] | 4
|
2017-08-31T21:09:14.000Z
|
2020-09-09T18:47:32.000Z
|
pvlib_python/test/test_pvl_absoluteairmass.py
|
cwhanse/PVLIB_Python
|
4ed3dbb9dfd4d4fc9f594580809fc3c09fa8e93d
|
[
"BSD-3-Clause"
] | null | null | null |
pvlib_python/test/test_pvl_absoluteairmass.py
|
cwhanse/PVLIB_Python
|
4ed3dbb9dfd4d4fc9f594580809fc3c09fa8e93d
|
[
"BSD-3-Clause"
] | 1
|
2020-09-09T18:47:40.000Z
|
2020-09-09T18:47:40.000Z
|
import unittest
from .. import pvl_absoluteairmass
from nose.tools import *
import numpy as np
reload(pvl_absoluteairmass)
def test_nan():
pvl_absoluteairmass.pvl_absoluteairmass(AMrelative=np.nan,Pressure=1)
def test_non_array():
pvl_absoluteairmass.pvl_absoluteairmass(AMrelative=1,Pressure=1)
@raises(Exception)
def test_numeric():
pvl_absoluteairmass.pvl_absoluteairmass(AMrelative='g',Pressure=1)
@raises(Exception)
def test_numeric_2():
pvl_absoluteairmass.pvl_absoluteairmass(AMrelative=1,Pressure='g')
def test_logical_2():
pvl_absoluteairmass.pvl_absoluteairmass(AMrelative=-1,Pressure=1)
def main():
unittest.main()
if __name__ == '__main__':
main()
| 20.411765
| 71
| 0.783862
| 88
| 694
| 5.863636
| 0.318182
| 0.418605
| 0.203488
| 0.348837
| 0.635659
| 0.457364
| 0.457364
| 0.327519
| 0
| 0
| 0
| 0.014516
| 0.106628
| 694
| 34
| 72
| 20.411765
| 0.817742
| 0
| 0
| 0.095238
| 0
| 0
| 0.014409
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| true
| 0
| 0.190476
| 0
| 0.47619
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
80e716912a8136d7c44543fa9a7a8d3df3375080
| 106
|
py
|
Python
|
snuggle/mediawiki/__init__.py
|
halfak/snuggle
|
384818aaf8a783013b076ada3c74226f10e5dc18
|
[
"MIT"
] | 2
|
2021-04-26T20:34:25.000Z
|
2021-11-12T11:26:57.000Z
|
snuggle/mediawiki/__init__.py
|
halfak/snuggle
|
384818aaf8a783013b076ada3c74226f10e5dc18
|
[
"MIT"
] | null | null | null |
snuggle/mediawiki/__init__.py
|
halfak/snuggle
|
384818aaf8a783013b076ada3c74226f10e5dc18
|
[
"MIT"
] | null | null | null |
from . import threads
from .api import API
from .oauth import OAuth
from .user_actions import UserActions
| 21.2
| 37
| 0.811321
| 16
| 106
| 5.3125
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150943
| 106
| 4
| 38
| 26.5
| 0.944444
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
038d2a0ee0de3e23d4fdfabab9d374904627f57e
| 51
|
py
|
Python
|
src/githyperlink/__init__.py
|
tfiers/deeplink-git-remote
|
e88464ab0d00d17544daae4d887aac547f4eeebb
|
[
"MIT"
] | 2
|
2022-03-04T21:15:53.000Z
|
2022-03-07T10:59:24.000Z
|
src/githyperlink/__init__.py
|
tfiers/deeplink-git-remote
|
e88464ab0d00d17544daae4d887aac547f4eeebb
|
[
"MIT"
] | null | null | null |
src/githyperlink/__init__.py
|
tfiers/deeplink-git-remote
|
e88464ab0d00d17544daae4d887aac547f4eeebb
|
[
"MIT"
] | null | null | null |
from .main import get_hyperlink, to_hyperlink_base
| 25.5
| 50
| 0.862745
| 8
| 51
| 5.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.098039
| 51
| 1
| 51
| 51
| 0.891304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
03a6a8b9a2657ca9aa99209173cc395f3e0a86ff
| 11,605
|
py
|
Python
|
enocean/protocol/tests/test_packet_creation.py
|
j5lien/enocean
|
6de1a50b143a34423b5072880a19413098dda6be
|
[
"MIT"
] | 65
|
2015-02-19T12:31:06.000Z
|
2022-03-24T23:10:21.000Z
|
enocean/protocol/tests/test_packet_creation.py
|
j5lien/enocean
|
6de1a50b143a34423b5072880a19413098dda6be
|
[
"MIT"
] | 124
|
2015-06-18T15:17:15.000Z
|
2022-02-26T17:22:12.000Z
|
enocean/protocol/tests/test_packet_creation.py
|
j5lien/enocean
|
6de1a50b143a34423b5072880a19413098dda6be
|
[
"MIT"
] | 92
|
2015-01-04T09:26:09.000Z
|
2022-03-06T10:25:26.000Z
|
# -*- encoding: utf-8 -*-
from __future__ import print_function, unicode_literals, division, absolute_import
from nose.tools import raises
from enocean.protocol.packet import Packet, RadioPacket
from enocean.protocol.constants import PACKET, RORG
from enocean.decorators import timing
@timing(1000)
def test_packet_assembly():
PACKET_CONTENT_1 = bytearray([
0x55,
0x00, 0x0A, 0x00, 0x01,
0x80,
0xA5, 0x00, 0x00, 0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00,
0x18
])
PACKET_CONTENT_2 = bytearray([
0x55,
0x00, 0x0A, 0x07, 0x01,
0xEB,
0xA5, 0x00, 0x00, 0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0xE4
])
PACKET_CONTENT_3 = bytearray([
0x55,
0x00, 0x0A, 0x07, 0x01,
0xEB,
0xA5, 0x32, 0x20, 0x89, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x43
])
PACKET_CONTENT_4 = bytearray([
0x55,
0x00, 0x0A, 0x07, 0x01,
0xEB,
0xA5, 0x32, 0x00, 0x00, 0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x80
])
# manually assemble packet
packet = Packet(PACKET.RADIO_ERP1)
packet.rorg = RORG.BS4
sender_bytes = [(0xdeadbeef >> i & 0xff) for i in (24, 16, 8, 0)]
data = [0, 0, 0, 0]
packet.data = [packet.rorg] + data + sender_bytes + [0]
# test content
packet_serialized = packet.build()
assert len(packet_serialized) == len(PACKET_CONTENT_1)
assert list(packet_serialized) == list(PACKET_CONTENT_1)
# set optional data
sub_tel_num = 3
destination = [255, 255, 255, 255] # broadcast
dbm = 0xff
security = 0
packet.optional = [sub_tel_num] + destination + [dbm] + [security]
# test content
packet_serialized = packet.build()
assert len(packet_serialized) == len(PACKET_CONTENT_2)
assert list(packet_serialized) == list(PACKET_CONTENT_2)
# update data based on EEP
packet.select_eep(0x20, 0x01, 1)
prop = {
'CV': 50,
'TMP': 21.5,
'ES': 'true',
}
packet.set_eep(prop)
# test content
packet_serialized = packet.build()
assert len(packet_serialized) == len(PACKET_CONTENT_3)
assert list(packet_serialized) == list(PACKET_CONTENT_3)
assert packet.rorg_func == 0x20
assert packet.rorg_type == 0x01
# Test the easier method of sending packets.
packet = Packet.create(PACKET.RADIO_ERP1, rorg=RORG.BS4, rorg_func=0x20, rorg_type=0x01,
learn=True, direction=1, **prop)
packet_serialized = packet.build()
assert len(packet_serialized) == len(PACKET_CONTENT_3)
assert list(packet_serialized) == list(PACKET_CONTENT_3)
assert packet.rorg_func == 0x20
assert packet.rorg_type == 0x01
# Test creating RadioPacket directly.
packet = RadioPacket.create(rorg=RORG.BS4, rorg_func=0x20, rorg_type=0x01, learn=True, direction=2, SP=50)
packet_serialized = packet.build()
assert len(packet_serialized) == len(PACKET_CONTENT_4)
assert list(packet_serialized) == list(PACKET_CONTENT_4)
assert packet.rorg_func == 0x20
assert packet.rorg_type == 0x01
# Corresponds to the tests done in test_eep
@timing(1000)
def test_temperature():
TEMPERATURE = bytearray([
0x55,
0x00, 0x0A, 0x07, 0x01,
0xEB,
0xA5, 0x00, 0x00, 0x55, 0x08, 0x01, 0x81, 0xB7, 0x44, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x5C
])
packet = RadioPacket.create(rorg=RORG.BS4, rorg_func=0x02, rorg_type=0x05,
sender=[0x01, 0x81, 0xB7, 0x44], TMP=26.66666666666666666666666666666666666666666667)
packet_serialized = packet.build()
assert len(packet_serialized) == len(TEMPERATURE)
assert list(packet_serialized) == list(TEMPERATURE)
assert packet.learn is False
TEMPERATURE = bytearray([
0x55,
0x00, 0x0A, 0x07, 0x01,
0xEB,
0xA5, 0x00, 0x00, 0x55, 0x00, 0x01, 0x81, 0xB7, 0x44, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0xE0
])
packet = RadioPacket.create(rorg=RORG.BS4, rorg_func=0x02, rorg_type=0x05, sender=[0x01, 0x81, 0xB7, 0x44],
learn=True, TMP=26.66666666666666666666666666666666666666666667)
packet_serialized = packet.build()
assert len(packet_serialized) == len(TEMPERATURE)
assert packet.learn is True
# Corresponds to the tests done in test_eep
@timing(1000)
def test_magnetic_switch():
MAGNETIC_SWITCH = bytearray([
0x55,
0x00, 0x07, 0x07, 0x01,
0x7A,
0xD5, 0x08, 0x01, 0x82, 0x5D, 0xAB, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0xBA
])
packet = RadioPacket.create(rorg=RORG.BS1, rorg_func=0x00, rorg_type=0x01, sender=[0x01, 0x82, 0x5D, 0xAB],
CO='open')
packet_serialized = packet.build()
assert len(packet_serialized) == len(MAGNETIC_SWITCH)
assert list(packet_serialized) == list(MAGNETIC_SWITCH)
assert packet.learn is False
MAGNETIC_SWITCH = bytearray([
0x55,
0x00, 0x07, 0x07, 0x01,
0x7A,
0xD5, 0x00, 0x01, 0x82, 0x5D, 0xAB, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x06
])
packet = RadioPacket.create(rorg=RORG.BS1, rorg_func=0x00, rorg_type=0x01, sender=[0x01, 0x82, 0x5D, 0xAB],
learn=True, CO='open')
packet_serialized = packet.build()
assert len(packet_serialized) == len(MAGNETIC_SWITCH)
assert list(packet_serialized) == list(MAGNETIC_SWITCH)
assert packet.learn is True
MAGNETIC_SWITCH = bytearray([
0x55,
0x00, 0x07, 0x07, 0x01,
0x7A,
0xD5, 0x09, 0x01, 0x82, 0x5D, 0xAB, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x2E
])
packet = RadioPacket.create(rorg=RORG.BS1, rorg_func=0x00, rorg_type=0x01, sender=[0x01, 0x82, 0x5D, 0xAB],
CO='closed')
packet_serialized = packet.build()
assert len(packet_serialized) == len(MAGNETIC_SWITCH)
assert list(packet_serialized) == list(MAGNETIC_SWITCH)
assert packet.learn is False
MAGNETIC_SWITCH = bytearray([
0x55,
0x00, 0x07, 0x07, 0x01,
0x7A,
0xD5, 0x01, 0x01, 0x82, 0x5D, 0xAB, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x92
])
packet = RadioPacket.create(rorg=RORG.BS1, rorg_func=0x00, rorg_type=0x01, sender=[0x01, 0x82, 0x5D, 0xAB],
learn=True, CO='closed')
packet_serialized = packet.build()
assert len(packet_serialized) == len(MAGNETIC_SWITCH)
assert list(packet_serialized) == list(MAGNETIC_SWITCH)
assert packet.learn is True
@timing(1000)
def test_switch():
SWITCH = bytearray([
0x55,
0x00, 0x07, 0x07, 0x01,
0x7A,
0xF6, 0x50, 0x00, 0x29, 0x89, 0x79, 0x30,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x61
])
# test also enum setting by integer value with EB0
packet = RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79],
SA='No 2nd action',
EB=1,
R1='Button BI',
T21=True,
NU=True,
)
packet_serialized = packet.build()
assert len(packet_serialized) == len(SWITCH)
assert list(packet_serialized) == list(SWITCH)
SWITCH = bytearray([
0x55,
0x00, 0x07, 0x07, 0x01,
0x7A,
0xF6, 0x00, 0x00, 0x29, 0x89, 0x79, 0x20,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0xD2
])
packet = RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79],
SA='No 2nd action',
EB='released',
T21=True,
NU=False,
)
packet_serialized = packet.build()
assert len(packet_serialized) == len(SWITCH)
assert list(packet_serialized) == list(SWITCH)
@timing(1000)
@raises(ValueError)
def test_illegal_eep_enum1():
RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79], EB='inexisting')
@raises(ValueError)
@timing(1000)
def test_illegal_eep_enum2():
RadioPacket.create(rorg=RORG.RPS, rorg_func=0x02, rorg_type=0x02, sender=[0x00, 0x29, 0x89, 0x79], EB=2)
# Corresponds to the tests done in test_eep
@timing(1000)
def test_packets_with_destination():
TEMPERATURE = bytearray([
0x55,
0x00, 0x0A, 0x07, 0x01,
0xEB,
0xA5, 0x00, 0x00, 0x55, 0x08, 0x01, 0x81, 0xB7, 0x44, 0x00,
0x03, 0xDE, 0xAD, 0xBE, 0xEF, 0xFF, 0x00,
0x5F
])
packet = RadioPacket.create(rorg=RORG.BS4, rorg_func=0x02, rorg_type=0x05, sender=[0x01, 0x81, 0xB7, 0x44],
destination=[0xDE, 0xAD, 0xBE, 0xEF],
TMP=26.66666666666666666666666666666666666666666667)
packet_serialized = packet.build()
assert len(packet_serialized) == len(TEMPERATURE)
assert list(packet_serialized) == list(TEMPERATURE)
assert packet.learn is False
assert packet.sender_int == 25278276
assert packet.destination_int == 3735928559
MAGNETIC_SWITCH = bytearray([
0x55,
0x00, 0x07, 0x07, 0x01,
0x7A,
0xD5, 0x08, 0x01, 0x82, 0x5D, 0xAB, 0x00,
0x03, 0xDE, 0xAD, 0xBE, 0xEF, 0xFF, 0x00,
0xB9
])
packet = RadioPacket.create(rorg=RORG.BS1, rorg_func=0x00, rorg_type=0x01, sender=[0x01, 0x82, 0x5D, 0xAB],
destination=[0xDE, 0xAD, 0xBE, 0xEF], CO='open')
packet_serialized = packet.build()
assert len(packet_serialized) == len(MAGNETIC_SWITCH)
assert list(packet_serialized) == list(MAGNETIC_SWITCH)
assert packet.learn is False
@timing(1000)
def test_vld():
SWITCH = bytearray([
0x55,
0x00, 0x09, 0x07, 0x01,
0x56,
0xD2, 0x01, 0x1E, 0x64, 0xDE, 0xAD, 0xBE, 0xEF, 0x00,
0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x5A
])
packet = RadioPacket.create(rorg=RORG.VLD, rorg_func=0x01, rorg_type=0x01, command=1, DV=0, IO=0x1E, OV=0x64)
packet_serialized = packet.build()
assert len(packet_serialized) == len(SWITCH)
assert list(packet_serialized) == list(SWITCH)
assert packet.parsed['CMD']['raw_value'] == 0x01
assert packet.parsed['IO']['raw_value'] == 0x1E
assert packet.parsed['IO']['value'] == 'All output channels supported by the device'
assert packet.parsed['DV']['value'] == 'Switch to new output value'
assert packet.parsed['OV']['value'] == 'Output value 100% or ON'
def test_fails():
try:
Packet.create(PACKET.RESPONSE, 0xA5, 0x01, 0x01)
assert False
except ValueError:
assert True
try:
Packet.create(PACKET.RADIO_ERP1, 0xA6, 0x01, 0x01)
assert False
except ValueError:
assert True
try:
Packet.create(PACKET.RADIO_ERP1, 0xA5, 0x01, 0x01, destination='ASDASDASD')
assert False
except ValueError:
assert True
try:
Packet.create(PACKET.RADIO_ERP1, 0xA5, 0x01, 0x01, sender='ASDASDASD')
assert False
except ValueError:
assert True
| 34.53869
| 119
| 0.613615
| 1,392
| 11,605
| 4.993534
| 0.147989
| 0.055244
| 0.062149
| 0.055244
| 0.763343
| 0.744785
| 0.744785
| 0.710258
| 0.700043
| 0.688246
| 0
| 0.155373
| 0.27514
| 11,605
| 335
| 120
| 34.641791
| 0.670946
| 0.033951
| 0
| 0.637324
| 0
| 0
| 0.021615
| 0
| 0
| 0
| 0.159164
| 0
| 0.211268
| 1
| 0.03169
| false
| 0
| 0.017606
| 0
| 0.049296
| 0.003521
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
03b80bf04c48dc3b0c3363fde946520662bd8acd
| 164
|
py
|
Python
|
auto_ab/__init__.py
|
educauchy/auto-ab
|
ba69b9802948fb49cc10ba6ec85cddc3daf0b482
|
[
"MIT"
] | null | null | null |
auto_ab/__init__.py
|
educauchy/auto-ab
|
ba69b9802948fb49cc10ba6ec85cddc3daf0b482
|
[
"MIT"
] | null | null | null |
auto_ab/__init__.py
|
educauchy/auto-ab
|
ba69b9802948fb49cc10ba6ec85cddc3daf0b482
|
[
"MIT"
] | null | null | null |
from .abtest import ABTest
from .splitter import Splitter
from .variance_reduction import VarianceReduction
from .graphics import Graphics
from .pulse import Pulse
| 27.333333
| 49
| 0.847561
| 21
| 164
| 6.571429
| 0.428571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 164
| 5
| 50
| 32.8
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
03bac09834643b80b9c4963979d5799c75fc9c66
| 115
|
py
|
Python
|
prometheus_adaptive_cards/preprocessing/__init__.py
|
trallnag/prometheus-adaptive-cards
|
884cfca5212db821900f5700ccf0fbfa3e8459ca
|
[
"Apache-2.0"
] | null | null | null |
prometheus_adaptive_cards/preprocessing/__init__.py
|
trallnag/prometheus-adaptive-cards
|
884cfca5212db821900f5700ccf0fbfa3e8459ca
|
[
"Apache-2.0"
] | null | null | null |
prometheus_adaptive_cards/preprocessing/__init__.py
|
trallnag/prometheus-adaptive-cards
|
884cfca5212db821900f5700ccf0fbfa3e8459ca
|
[
"Apache-2.0"
] | null | null | null |
"""Copyright © 2020 Tim Schwenke - Licensed under the Apache License 2.0"""
from .preprocessing import preprocess
| 28.75
| 75
| 0.765217
| 16
| 115
| 5.5625
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.061224
| 0.147826
| 115
| 3
| 76
| 38.333333
| 0.836735
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
03d73af19bd0dd3e93e837d4eeecdc6092eb05b4
| 134
|
py
|
Python
|
api/models/__init__.py
|
plastboks/Flaskmarks-API
|
32b1bd6b7f07c666d395dfa0aa598f66340bb34e
|
[
"MIT"
] | null | null | null |
api/models/__init__.py
|
plastboks/Flaskmarks-API
|
32b1bd6b7f07c666d395dfa0aa598f66340bb34e
|
[
"MIT"
] | null | null | null |
api/models/__init__.py
|
plastboks/Flaskmarks-API
|
32b1bd6b7f07c666d395dfa0aa598f66340bb34e
|
[
"MIT"
] | null | null | null |
# package
from .user import User
from .mark import Mark
from .tag import Tag
from .apikey import ApiKey
from .setting import Setting
| 16.75
| 28
| 0.783582
| 21
| 134
| 5
| 0.380952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171642
| 134
| 7
| 29
| 19.142857
| 0.945946
| 0.052239
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ff1439246ecc393005474eeb7fe2833ee7535505
| 309
|
py
|
Python
|
kaggle_environments/envs/mab/agents.py
|
titoeb/kaggle-environments
|
b043a9588ef14018816a47b93b841cbcbd9ba906
|
[
"Apache-2.0"
] | 214
|
2020-01-04T00:03:19.000Z
|
2022-03-28T02:23:10.000Z
|
kaggle_environments/envs/mab/agents.py
|
titoeb/kaggle-environments
|
b043a9588ef14018816a47b93b841cbcbd9ba906
|
[
"Apache-2.0"
] | 87
|
2020-01-07T18:12:23.000Z
|
2022-03-31T23:51:47.000Z
|
kaggle_environments/envs/mab/agents.py
|
titoeb/kaggle-environments
|
b043a9588ef14018816a47b93b841cbcbd9ba906
|
[
"Apache-2.0"
] | 156
|
2020-01-04T02:23:00.000Z
|
2022-03-25T11:53:36.000Z
|
import random
def random_agent(observation, configuration):
return random.randrange(configuration.banditCount - 1)
def round_robin_agent(observation, configuration):
return observation.step % configuration.banditCount
agents = {
"random": random_agent,
"round_robin": round_robin_agent
}
| 20.6
| 58
| 0.770227
| 33
| 309
| 7
| 0.424242
| 0.12987
| 0.251082
| 0.30303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003788
| 0.145631
| 309
| 15
| 59
| 20.6
| 0.871212
| 0
| 0
| 0
| 0
| 0
| 0.054839
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.222222
| 0.555556
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
ff1596f0dbd7aa344b568dfd5c8ce682792336f5
| 19
|
py
|
Python
|
quantstats/version.py
|
jiangrongbo/quantstats
|
efe84c1111cec856a028e3179dd64bff312b6b62
|
[
"Apache-2.0"
] | 1
|
2021-11-13T04:29:57.000Z
|
2021-11-13T04:29:57.000Z
|
quantstats/version.py
|
jiangrongbo/quantstats
|
efe84c1111cec856a028e3179dd64bff312b6b62
|
[
"Apache-2.0"
] | null | null | null |
quantstats/version.py
|
jiangrongbo/quantstats
|
efe84c1111cec856a028e3179dd64bff312b6b62
|
[
"Apache-2.0"
] | null | null | null |
version = "0.0.45"
| 9.5
| 18
| 0.578947
| 4
| 19
| 2.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0.157895
| 19
| 1
| 19
| 19
| 0.4375
| 0
| 0
| 0
| 0
| 0
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
206eca72ebd94c641fedd19d9fa0e2c89663a308
| 460
|
py
|
Python
|
live/Hack_TrackColors/__init__.py
|
faroit/midihack
|
5ce927576c4967499e164d95262a8391173c23ab
|
[
"CC0-1.0"
] | 4
|
2016-03-13T14:14:21.000Z
|
2016-09-11T11:54:36.000Z
|
live/Hack_TrackColors/__init__.py
|
faroit/midihack
|
5ce927576c4967499e164d95262a8391173c23ab
|
[
"CC0-1.0"
] | null | null | null |
live/Hack_TrackColors/__init__.py
|
faroit/midihack
|
5ce927576c4967499e164d95262a8391173c23ab
|
[
"CC0-1.0"
] | 1
|
2018-09-09T08:37:44.000Z
|
2018-09-09T08:37:44.000Z
|
# -*- coding: utf-8 -*-
#****************************************************************************************
# File: __init__.py
#
# Copyright: 2014 Ableton AG, Berlin. All Rights reserved
#****************************************************************************************
"""
Init script for the TrackColors hack.
"""
def create_instance(c_instance):
from Hack_TrackColors import Hack_TrackColors
return Hack_TrackColors(c_instance)
| 30.666667
| 89
| 0.43913
| 36
| 460
| 5.333333
| 0.722222
| 0.234375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012225
| 0.11087
| 460
| 14
| 90
| 32.857143
| 0.457213
| 0.684783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2081c8058ad91c3625b414a7cebb272d01e070c7
| 66
|
py
|
Python
|
hypergan/backends/tpu_backend.py
|
limberc/HyperGAN
|
b074e74abf0ed9b81bd52084706e3707a47e0fe2
|
[
"MIT"
] | 889
|
2016-08-27T01:37:35.000Z
|
2018-10-07T19:47:56.000Z
|
hypergan/backends/tpu_backend.py
|
limberc/HyperGAN
|
b074e74abf0ed9b81bd52084706e3707a47e0fe2
|
[
"MIT"
] | 101
|
2016-11-30T03:34:02.000Z
|
2018-10-02T13:50:52.000Z
|
hypergan/backends/tpu_backend.py
|
limberc/HyperGAN
|
b074e74abf0ed9b81bd52084706e3707a47e0fe2
|
[
"MIT"
] | 145
|
2016-09-27T06:56:24.000Z
|
2018-09-25T16:09:28.000Z
|
from .backend import Backend
class TPUBackend(Backend):
pass
| 13.2
| 28
| 0.757576
| 8
| 66
| 6.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.181818
| 66
| 4
| 29
| 16.5
| 0.925926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.333333
| 0.333333
| 0
| 0.666667
| 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
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
20888ad00a2c89fc95b8f993ec1cddc47e8a299c
| 193
|
py
|
Python
|
astropy/io/misc/__init__.py
|
jayvdb/astropy
|
bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f
|
[
"BSD-3-Clause"
] | 445
|
2019-01-26T13:50:26.000Z
|
2022-03-18T05:17:38.000Z
|
astropy/io/misc/__init__.py
|
jayvdb/astropy
|
bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f
|
[
"BSD-3-Clause"
] | 242
|
2019-01-29T15:48:27.000Z
|
2022-03-31T22:09:21.000Z
|
astropy/io/misc/__init__.py
|
jayvdb/astropy
|
bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f
|
[
"BSD-3-Clause"
] | 31
|
2019-03-10T09:51:27.000Z
|
2022-02-14T23:11:12.000Z
|
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This package contains miscellaneous utility functions for data
input/output with astropy.
"""
from .pickle_helpers import *
| 24.125
| 63
| 0.777202
| 27
| 193
| 5.518519
| 0.962963
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006098
| 0.150259
| 193
| 7
| 64
| 27.571429
| 0.902439
| 0.787565
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
20aa4b7448d4f3abdee67c03da4aa5da01636d6e
| 298
|
py
|
Python
|
src/billing/forms.py
|
paveu/srvup_rest
|
97491df4106d5e8b951c6117770fe74072612e49
|
[
"MIT"
] | 1
|
2015-10-10T16:49:30.000Z
|
2015-10-10T16:49:30.000Z
|
src/billing/forms.py
|
paveu/srvup_rest
|
97491df4106d5e8b951c6117770fe74072612e49
|
[
"MIT"
] | null | null | null |
src/billing/forms.py
|
paveu/srvup_rest
|
97491df4106d5e8b951c6117770fe74072612e49
|
[
"MIT"
] | null | null | null |
from django import forms
from django.conf import settings
class UpgradePayuForm(forms.Form):
amount = forms.CharField(required=True, widget=forms.TextInput(attrs={'readonly':'True'}), initial=settings.TOTAL_AMOUNT)
description = forms.CharField(required=True, initial='Message to admin')
| 42.571429
| 126
| 0.778523
| 37
| 298
| 6.243243
| 0.621622
| 0.08658
| 0.190476
| 0.225108
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.104027
| 298
| 7
| 127
| 42.571429
| 0.865169
| 0
| 0
| 0
| 0
| 0
| 0.093645
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 1
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
20ab8b597a34dee79a0c531b6b790c55b97f8797
| 154
|
py
|
Python
|
proteinbert/__init__.py
|
SauravMaheshkar/ProteinBERT
|
ce859f2de2a9e4ff5e8b2d25780f1eafc2bdb499
|
[
"MIT"
] | null | null | null |
proteinbert/__init__.py
|
SauravMaheshkar/ProteinBERT
|
ce859f2de2a9e4ff5e8b2d25780f1eafc2bdb499
|
[
"MIT"
] | 3
|
2021-06-24T15:36:06.000Z
|
2021-06-26T13:20:22.000Z
|
proteinbert/__init__.py
|
SauravMaheshkar/ProteinBERT
|
ce859f2de2a9e4ff5e8b2d25780f1eafc2bdb499
|
[
"MIT"
] | null | null | null |
from .attention import * # noqa
from .layers import * # noqa
from .model import ProteinBERT # noqa
from .utils import * # noqa
__version__ = "0.0.1"
| 22
| 38
| 0.688312
| 21
| 154
| 4.857143
| 0.52381
| 0.294118
| 0.27451
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.02459
| 0.207792
| 154
| 6
| 39
| 25.666667
| 0.811475
| 0.123377
| 0
| 0
| 0
| 0
| 0.038462
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
20acae38f003830ba79bef090033173d2758ada3
| 122
|
py
|
Python
|
polynomial_enumeration.py
|
NicoEssi/Scientific_Python
|
78315b4fade592ed40f61e57498d26337675be9d
|
[
"MIT"
] | null | null | null |
polynomial_enumeration.py
|
NicoEssi/Scientific_Python
|
78315b4fade592ed40f61e57498d26337675be9d
|
[
"MIT"
] | null | null | null |
polynomial_enumeration.py
|
NicoEssi/Scientific_Python
|
78315b4fade592ed40f61e57498d26337675be9d
|
[
"MIT"
] | null | null | null |
import numpy as np
def polynomial(x, coeff):
return sum(a * x**i for i, a in enumerate(coeff))
polynomial(1, (2, 4))
| 20.333333
| 53
| 0.655738
| 23
| 122
| 3.478261
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030612
| 0.196721
| 122
| 6
| 54
| 20.333333
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 0.75
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
45488083d4a4075486606e3ea1cb05e921b96a09
| 248
|
py
|
Python
|
backend/controller/personal_color_controller.py
|
jphacks/C_2013
|
add1fd94307c76e20dd6bbe9eaec8d66707a14b2
|
[
"MIT"
] | 1
|
2021-01-07T00:59:06.000Z
|
2021-01-07T00:59:06.000Z
|
backend/controller/personal_color_controller.py
|
jphacks/C_2013
|
add1fd94307c76e20dd6bbe9eaec8d66707a14b2
|
[
"MIT"
] | 29
|
2020-11-02T13:18:41.000Z
|
2020-11-08T22:36:05.000Z
|
backend/controller/personal_color_controller.py
|
jphacks/C_2013
|
add1fd94307c76e20dd6bbe9eaec8d66707a14b2
|
[
"MIT"
] | null | null | null |
import cv2
import numpy as np
from personal_color import predict_Personal_Color
def predict_personal_color(img):
rate = predict_Personal_Color(img)
result = max(rate)
return {'result': result}
if __name__ == "__main__":
pass
| 14.588235
| 49
| 0.725806
| 33
| 248
| 5
| 0.575758
| 0.315152
| 0.363636
| 0.278788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005025
| 0.197581
| 248
| 16
| 50
| 15.5
| 0.824121
| 0
| 0
| 0
| 0
| 0
| 0.056452
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0.111111
| 0.333333
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 1
| 0
| 0
| 0
|
0
| 5
|
45539e98cb16863af7519fdc50ef4debfc158335
| 20,024
|
py
|
Python
|
src/parsetab.py
|
jeremystevens/Lay-Z-Lang
|
a1a6fd1564276da19f9c1b9c455dbd2f5e0e6b17
|
[
"BSD-2-Clause"
] | null | null | null |
src/parsetab.py
|
jeremystevens/Lay-Z-Lang
|
a1a6fd1564276da19f9c1b9c455dbd2f5e0e6b17
|
[
"BSD-2-Clause"
] | null | null | null |
src/parsetab.py
|
jeremystevens/Lay-Z-Lang
|
a1a6fd1564276da19f9c1b9c455dbd2f5e0e6b17
|
[
"BSD-2-Clause"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftPLUSMINUSleftTIMESDIVIDEPERCENTrightUMINUSCIRCLE COMMA DIVIDE DO DOUBLE DOUBLE_CONST ECHO ELSE ENDIF ENDSUBROUTINE ENDWHILE EQUALITY EQUALS FOR GREATER_EQUAL GREATER_THAN IF INPUT INT INT_CONST LBRACKET LESS_EQUAL LESS_THAN LPAREN MINUS NEWLINE NEXT NOT_EQUALITY OUTPUT PERCENT PLUS PRINT RBRACKET RETURN RPAREN STRING_CONST SUBROUTINE THEN TIMES TO VAR WHILEstatement : stmt_liststmt_list : simple_stmt\n | stmt_list NEWLINE simple_stmtif_stmt : IF expression THEN NEWLINE stmt_list NEWLINE ENDIF\n | IF expression THEN NEWLINE stmt_list NEWLINE ELSE NEWLINE stmt_list NEWLINE ENDIF\n | IF expression THEN NEWLINE stmt_list NEWLINE ELSE if_stmtwhile_stmt : WHILE expression DO NEWLINE stmt_list NEWLINE ENDWHILEfor_stmt : FOR assignment_stmt TO expression NEWLINE stmt_list NEWLINE NEXT VARsimple_stmt : expression\n | expr_list\n | arg_list\n | assignment_stmt\n | array_decl_stmt\n | if_stmt\n | while_stmt\n | for_stmt\n | output_stmt\n | input_stmt\n | function_stmt\n | return_stmtarray_decl_stmt : DOUBLE array_index\n | INT array_indexassignment_stmt : VAR EQUALS expressionassignment_stmt : array_index EQUALS expressioninput_stmt : INPUT VAR\n | INPUT array_indexoutput_stmt : OUTPUT expressionreturn_stmt : RETURN expressionfunction_header : INT SUBROUTINE VAR LPAREN arg_list RPAREN\n | DOUBLE SUBROUTINE VAR LPAREN arg_list RPAREN\n | INT SUBROUTINE VAR LPAREN RPAREN\n | DOUBLE SUBROUTINE VAR LPAREN RPARENfunction_stmt : function_header NEWLINE stmt_list NEWLINE ENDSUBROUTINEarg_list : INT VAR\n | DOUBLE VAR\n | arg_list COMMA INT VAR\n | arg_list COMMA DOUBLE VARexpr_list : expression COMMA expression\n | expr_list COMMA expressionexpression : expression PLUS expression\n | expression MINUS expression\n | expression TIMES expression\n | expression DIVIDE expression\n | expression PERCENT expressionexpression : expression LESS_THAN expression\n | expression GREATER_THAN expression\n | expression LESS_EQUAL expression\n | expression GREATER_EQUAL expression\n | expression EQUALITY expression\n | expression NOT_EQUALITY expressionexpression : MINUS expression %prec UMINUSexpression : LPAREN expression RPARENexpression : VAR LPAREN expression RPAREN\n | VAR LPAREN expr_list RPAREN\n | VAR LPAREN RPARENexpression : array_indexarray_index : VAR LBRACKET expression RBRACKETexpression : literalliteral : INT_CONSTliteral : DOUBLE_CONSTliteral : STRING_CONSTexpression : VAR'
_lr_action_items = {'MINUS':([0,4,16,17,18,19,20,23,24,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,53,54,55,62,63,67,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,99,103,104,105,108,109,110,111,120,126,127,132,133,138,],[16,35,16,16,-62,-56,-58,16,16,16,16,-59,-60,-61,16,16,16,16,16,16,16,16,16,16,16,16,16,16,-51,-62,-56,35,16,16,16,16,35,35,35,16,35,-40,-41,-42,-43,-44,35,35,35,35,35,35,35,35,-52,35,-55,35,35,35,16,-53,-54,-57,16,16,35,16,16,16,16,16,16,16,]),'LPAREN':([0,16,17,18,23,24,26,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,49,52,53,54,55,70,95,96,99,108,109,111,120,126,127,132,133,138,],[17,17,17,52,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,52,17,17,17,17,17,106,107,17,17,17,17,17,17,17,17,17,17,]),'VAR':([0,16,17,21,22,23,24,25,26,27,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,52,53,54,55,58,61,70,86,87,99,108,109,111,112,115,120,126,127,132,133,135,138,],[18,49,49,56,59,49,49,65,49,68,49,18,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,95,96,18,101,102,49,18,18,18,122,124,18,18,18,18,18,137,18,]),'INT':([0,33,47,70,106,107,108,109,111,120,126,127,132,133,138,],[21,21,86,21,112,112,21,21,21,21,21,21,21,21,21,]),'DOUBLE':([0,33,47,70,106,107,108,109,111,120,126,127,132,133,138,],[22,22,87,22,115,115,22,22,22,22,22,22,22,22,22,]),'IF':([0,33,70,108,109,111,120,126,127,130,132,133,138,],[23,23,23,23,23,23,23,23,23,23,23,23,23,]),'WHILE':([0,33,70,108,109,111,120,126,127,132,133,138,],[24,24,24,24,24,24,24,24,24,24,24,24,]),'FOR':([0,33,70,108,109,111,120,126,127,132,133,138,],[25,25,25,25,25,25,25,25,25,25,25,25,]),'OUTPUT':([0,33,70,108,109,111,120,126,127,132,133,138,],[26,26,26,26,26,26,26,26,26,26,26,26,]),'INPUT':([0,33,70,108,109,111,120,126,127,132,133,138,],[27,27,27,27,27,27,27,27,27,27,27,27,]),'RETURN':([0,33,70,108,109,111,120,126,127,132,133,138,],[29,29,29,29,29,29,29,29,29,29,29,29,]),'INT_CONST':([0,16,17,23,24,26,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,52,53,54,55,70,99,108,109,111,120,126,127,132,133,138,],[30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,]),'DOUBLE_CONST':([0,16,17,23,24,26,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,52,53,54,55,70,99,108,109,111,120,126,127,132,133,138,],[31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,]),'STRING_CONST':([0,16,17,23,24,26,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,52,53,54,55,70,99,108,109,111,120,126,127,132,133,138,],[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,]),'$end':([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,19,20,30,31,32,48,49,50,56,57,59,60,67,68,69,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,88,90,92,94,101,102,103,104,105,121,129,131,134,137,139,],[0,-1,-2,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-62,-56,-58,-59,-60,-61,-51,-62,-56,-34,-22,-35,-21,-27,-25,-26,-28,-3,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-38,-39,-52,-55,-23,-24,-36,-37,-53,-54,-57,-33,-4,-7,-6,-8,-5,]),'NEWLINE':([2,3,4,5,6,7,8,9,10,11,12,13,14,15,18,19,20,28,30,31,32,48,49,50,56,57,59,60,67,68,69,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,88,90,92,94,97,98,100,101,102,103,104,105,110,114,117,118,119,121,123,125,128,129,130,131,134,136,137,139,],[33,-2,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-62,-56,-58,70,-59,-60,-61,-51,-62,-56,-34,-22,-35,-21,-27,-25,-26,-28,-3,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-38,-39,-52,-55,-23,-24,108,109,111,-36,-37,-53,-54,-57,120,-31,-32,126,127,-33,-29,-30,132,-4,133,-7,-6,138,-8,-5,]),'PLUS':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[34,-62,-56,-58,-59,-60,-61,-51,-62,-56,34,34,34,34,34,-40,-41,-42,-43,-44,34,34,34,34,34,34,34,34,-52,34,-55,34,34,34,-53,-54,-57,34,]),'TIMES':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[36,-62,-56,-58,-59,-60,-61,-51,-62,-56,36,36,36,36,36,36,36,-42,-43,-44,36,36,36,36,36,36,36,36,-52,36,-55,36,36,36,-53,-54,-57,36,]),'DIVIDE':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[37,-62,-56,-58,-59,-60,-61,-51,-62,-56,37,37,37,37,37,37,37,-42,-43,-44,37,37,37,37,37,37,37,37,-52,37,-55,37,37,37,-53,-54,-57,37,]),'PERCENT':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[38,-62,-56,-58,-59,-60,-61,-51,-62,-56,38,38,38,38,38,38,38,-42,-43,-44,38,38,38,38,38,38,38,38,-52,38,-55,38,38,38,-53,-54,-57,38,]),'LESS_THAN':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[39,-62,-56,-58,-59,-60,-61,-51,-62,-56,39,39,39,39,39,-40,-41,-42,-43,-44,39,39,39,39,39,39,39,39,-52,39,-55,39,39,39,-53,-54,-57,39,]),'GREATER_THAN':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[40,-62,-56,-58,-59,-60,-61,-51,-62,-56,40,40,40,40,40,-40,-41,-42,-43,-44,40,40,40,40,40,40,40,40,-52,40,-55,40,40,40,-53,-54,-57,40,]),'LESS_EQUAL':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[41,-62,-56,-58,-59,-60,-61,-51,-62,-56,41,41,41,41,41,-40,-41,-42,-43,-44,41,41,41,41,41,41,41,41,-52,41,-55,41,41,41,-53,-54,-57,41,]),'GREATER_EQUAL':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[42,-62,-56,-58,-59,-60,-61,-51,-62,-56,42,42,42,42,42,-40,-41,-42,-43,-44,42,42,42,42,42,42,42,42,-52,42,-55,42,42,42,-53,-54,-57,42,]),'EQUALITY':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[43,-62,-56,-58,-59,-60,-61,-51,-62,-56,43,43,43,43,43,-40,-41,-42,-43,-44,43,43,43,43,43,43,43,43,-52,43,-55,43,43,43,-53,-54,-57,43,]),'NOT_EQUALITY':([4,18,19,20,30,31,32,48,49,50,51,62,63,67,71,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,92,93,94,103,104,105,110,],[44,-62,-56,-58,-59,-60,-61,-51,-62,-56,44,44,44,44,44,-40,-41,-42,-43,-44,44,44,44,44,44,44,44,44,-52,44,-55,44,44,44,-53,-54,-57,44,]),'COMMA':([4,5,6,18,19,20,30,31,32,48,49,50,56,59,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,91,101,102,103,104,105,113,116,122,124,],[45,46,47,-62,-56,-58,-59,-60,-61,-51,-62,-56,-34,-35,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-38,-39,-52,45,-55,46,-36,-37,-53,-54,-57,47,47,-34,-35,]),'EQUALS':([18,19,65,66,105,],[53,55,53,55,-57,]),'LBRACKET':([18,49,56,59,65,68,],[54,54,54,54,54,54,]),'RPAREN':([20,30,31,32,48,49,50,51,52,73,74,75,76,77,78,79,80,81,82,83,84,85,88,89,90,91,101,102,103,104,105,106,107,113,116,122,124,],[-58,-59,-60,-61,-51,-62,-56,88,90,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-38,-39,-52,103,-55,104,-36,-37,-53,-54,-57,114,117,123,125,-34,-35,]),'THEN':([20,30,31,32,48,49,50,62,73,74,75,76,77,78,79,80,81,82,83,88,90,103,104,105,],[-58,-59,-60,-61,-51,-62,-56,97,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-52,-55,-53,-54,-57,]),'DO':([20,30,31,32,48,49,50,63,73,74,75,76,77,78,79,80,81,82,83,88,90,103,104,105,],[-58,-59,-60,-61,-51,-62,-56,98,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-52,-55,-53,-54,-57,]),'TO':([20,30,31,32,48,49,50,64,73,74,75,76,77,78,79,80,81,82,83,88,90,92,94,103,104,105,],[-58,-59,-60,-61,-51,-62,-56,99,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-52,-55,-23,-24,-53,-54,-57,]),'RBRACKET':([20,30,31,32,48,49,50,73,74,75,76,77,78,79,80,81,82,83,88,90,93,103,104,105,],[-58,-59,-60,-61,-51,-62,-56,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-52,-55,105,-53,-54,-57,]),'SUBROUTINE':([21,22,],[58,61,]),'ENDSUBROUTINE':([111,],[121,]),'ENDIF':([126,138,],[129,139,]),'ELSE':([126,],[130,]),'ENDWHILE':([127,],[131,]),'NEXT':([132,],[135,]),}
_lr_action = {}
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'statement':([0,],[1,]),'stmt_list':([0,70,108,109,120,133,],[2,100,118,119,128,136,]),'simple_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[3,72,3,3,3,72,3,72,72,72,3,72,]),'expression':([0,16,17,23,24,26,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,52,53,54,55,70,99,108,109,111,120,126,127,132,133,138,],[4,48,51,62,63,67,71,4,73,74,75,76,77,78,79,80,81,82,83,84,85,89,92,93,94,4,110,4,4,4,4,4,4,4,4,4,]),'expr_list':([0,33,52,70,108,109,111,120,126,127,132,133,138,],[5,5,91,5,5,5,5,5,5,5,5,5,5,]),'arg_list':([0,33,70,106,107,108,109,111,120,126,127,132,133,138,],[6,6,6,113,116,6,6,6,6,6,6,6,6,6,]),'assignment_stmt':([0,25,33,70,108,109,111,120,126,127,132,133,138,],[7,64,7,7,7,7,7,7,7,7,7,7,7,]),'array_decl_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[8,8,8,8,8,8,8,8,8,8,8,8,]),'if_stmt':([0,33,70,108,109,111,120,126,127,130,132,133,138,],[9,9,9,9,9,9,9,9,9,134,9,9,9,]),'while_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[10,10,10,10,10,10,10,10,10,10,10,10,]),'for_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[11,11,11,11,11,11,11,11,11,11,11,11,]),'output_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[12,12,12,12,12,12,12,12,12,12,12,12,]),'input_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[13,13,13,13,13,13,13,13,13,13,13,13,]),'function_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[14,14,14,14,14,14,14,14,14,14,14,14,]),'return_stmt':([0,33,70,108,109,111,120,126,127,132,133,138,],[15,15,15,15,15,15,15,15,15,15,15,15,]),'array_index':([0,16,17,21,22,23,24,25,26,27,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,52,53,54,55,70,99,108,109,111,120,126,127,132,133,138,],[19,50,50,57,60,50,50,66,50,69,50,19,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,19,50,19,19,19,19,19,19,19,19,19,]),'literal':([0,16,17,23,24,26,29,33,34,35,36,37,38,39,40,41,42,43,44,45,46,52,53,54,55,70,99,108,109,111,120,126,127,132,133,138,],[20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,]),'function_header':([0,33,70,108,109,111,120,126,127,132,133,138,],[28,28,28,28,28,28,28,28,28,28,28,28,]),}
_lr_goto = {}
for _k, _v in _lr_goto_items.items():
for _x, _y in zip(_v[0], _v[1]):
if not _x in _lr_goto: _lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> statement","S'",1,None,None,None),
('statement -> stmt_list','statement',1,'p_statement','lz_parser.py',56),
('stmt_list -> simple_stmt','stmt_list',1,'p_stmt_list','lz_parser.py',61),
('stmt_list -> stmt_list NEWLINE simple_stmt','stmt_list',3,'p_stmt_list','lz_parser.py',62),
('if_stmt -> IF expression THEN NEWLINE stmt_list NEWLINE ENDIF','if_stmt',7,'p_if_stmt','lz_parser.py',71),
('if_stmt -> IF expression THEN NEWLINE stmt_list NEWLINE ELSE NEWLINE stmt_list NEWLINE ENDIF','if_stmt',11,'p_if_stmt','lz_parser.py',72),
('if_stmt -> IF expression THEN NEWLINE stmt_list NEWLINE ELSE if_stmt','if_stmt',8,'p_if_stmt','lz_parser.py',73),
('while_stmt -> WHILE expression DO NEWLINE stmt_list NEWLINE ENDWHILE','while_stmt',7,'p_while_stmt','lz_parser.py',85),
('for_stmt -> FOR assignment_stmt TO expression NEWLINE stmt_list NEWLINE NEXT VAR','for_stmt',9,'p_for_stmt','lz_parser.py',90),
('simple_stmt -> expression','simple_stmt',1,'p_simple_stmt','lz_parser.py',95),
('simple_stmt -> expr_list','simple_stmt',1,'p_simple_stmt','lz_parser.py',96),
('simple_stmt -> arg_list','simple_stmt',1,'p_simple_stmt','lz_parser.py',97),
('simple_stmt -> assignment_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',98),
('simple_stmt -> array_decl_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',99),
('simple_stmt -> if_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',100),
('simple_stmt -> while_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',101),
('simple_stmt -> for_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',102),
('simple_stmt -> output_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',103),
('simple_stmt -> input_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',104),
('simple_stmt -> function_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',105),
('simple_stmt -> return_stmt','simple_stmt',1,'p_simple_stmt','lz_parser.py',106),
('array_decl_stmt -> DOUBLE array_index','array_decl_stmt',2,'p_array_decl_stmt','lz_parser.py',111),
('array_decl_stmt -> INT array_index','array_decl_stmt',2,'p_array_decl_stmt','lz_parser.py',112),
('assignment_stmt -> VAR EQUALS expression','assignment_stmt',3,'p_assignment_stmt','lz_parser.py',127),
('assignment_stmt -> array_index EQUALS expression','assignment_stmt',3,'p_array_assign_stmt','lz_parser.py',140),
('input_stmt -> INPUT VAR','input_stmt',2,'p_input_stmt','lz_parser.py',149),
('input_stmt -> INPUT array_index','input_stmt',2,'p_input_stmt','lz_parser.py',150),
('output_stmt -> OUTPUT expression','output_stmt',2,'p_output_stmt','lz_parser.py',169),
('return_stmt -> RETURN expression','return_stmt',2,'p_return_stmt','lz_parser.py',174),
('function_header -> INT SUBROUTINE VAR LPAREN arg_list RPAREN','function_header',6,'p_function_header','lz_parser.py',179),
('function_header -> DOUBLE SUBROUTINE VAR LPAREN arg_list RPAREN','function_header',6,'p_function_header','lz_parser.py',180),
('function_header -> INT SUBROUTINE VAR LPAREN RPAREN','function_header',5,'p_function_header','lz_parser.py',181),
('function_header -> DOUBLE SUBROUTINE VAR LPAREN RPAREN','function_header',5,'p_function_header','lz_parser.py',182),
('function_stmt -> function_header NEWLINE stmt_list NEWLINE ENDSUBROUTINE','function_stmt',5,'p_function_stmt','lz_parser.py',210),
('arg_list -> INT VAR','arg_list',2,'p_arg_list','lz_parser.py',219),
('arg_list -> DOUBLE VAR','arg_list',2,'p_arg_list','lz_parser.py',220),
('arg_list -> arg_list COMMA INT VAR','arg_list',4,'p_arg_list','lz_parser.py',221),
('arg_list -> arg_list COMMA DOUBLE VAR','arg_list',4,'p_arg_list','lz_parser.py',222),
('expr_list -> expression COMMA expression','expr_list',3,'p_expr_list','lz_parser.py',239),
('expr_list -> expr_list COMMA expression','expr_list',3,'p_expr_list','lz_parser.py',240),
('expression -> expression PLUS expression','expression',3,'p_expression_arithmetic_binop','lz_parser.py',249),
('expression -> expression MINUS expression','expression',3,'p_expression_arithmetic_binop','lz_parser.py',250),
('expression -> expression TIMES expression','expression',3,'p_expression_arithmetic_binop','lz_parser.py',251),
('expression -> expression DIVIDE expression','expression',3,'p_expression_arithmetic_binop','lz_parser.py',252),
('expression -> expression PERCENT expression','expression',3,'p_expression_arithmetic_binop','lz_parser.py',253),
('expression -> expression LESS_THAN expression','expression',3,'p_expression_comp_binop','lz_parser.py',295),
('expression -> expression GREATER_THAN expression','expression',3,'p_expression_comp_binop','lz_parser.py',296),
('expression -> expression LESS_EQUAL expression','expression',3,'p_expression_comp_binop','lz_parser.py',297),
('expression -> expression GREATER_EQUAL expression','expression',3,'p_expression_comp_binop','lz_parser.py',298),
('expression -> expression EQUALITY expression','expression',3,'p_expression_comp_binop','lz_parser.py',299),
('expression -> expression NOT_EQUALITY expression','expression',3,'p_expression_comp_binop','lz_parser.py',300),
('expression -> MINUS expression','expression',2,'p_expression_unop','lz_parser.py',322),
('expression -> LPAREN expression RPAREN','expression',3,'p_expression_group','lz_parser.py',327),
('expression -> VAR LPAREN expression RPAREN','expression',4,'p_expression_func_call','lz_parser.py',332),
('expression -> VAR LPAREN expr_list RPAREN','expression',4,'p_expression_func_call','lz_parser.py',333),
('expression -> VAR LPAREN RPAREN','expression',3,'p_expression_func_call','lz_parser.py',334),
('expression -> array_index','expression',1,'p_expression_array_expr','lz_parser.py',352),
('array_index -> VAR LBRACKET expression RBRACKET','array_index',4,'p_expression_array_val','lz_parser.py',357),
('expression -> literal','expression',1,'p_expression_literal','lz_parser.py',365),
('literal -> INT_CONST','literal',1,'p_literal_int_constant','lz_parser.py',370),
('literal -> DOUBLE_CONST','literal',1,'p_literal_double_constant','lz_parser.py',375),
('literal -> STRING_CONST','literal',1,'p_literal_string_constant','lz_parser.py',380),
('expression -> VAR','expression',1,'p_expression_var','lz_parser.py',385),
]
| 215.311828
| 7,915
| 0.660408
| 4,194
| 20,024
| 3.036004
| 0.072723
| 0.038954
| 0.048692
| 0.020734
| 0.629859
| 0.58423
| 0.56224
| 0.525014
| 0.505144
| 0.477107
| 0
| 0.323683
| 0.078905
| 20,024
| 92
| 7,916
| 217.652174
| 0.366678
| 0.004195
| 0
| 0.02439
| 1
| 0.012195
| 0.422272
| 0.036519
| 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
| 1
| 1
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
45613d20a90022310fedfa609fefcdc63a941bc2
| 147
|
py
|
Python
|
sikipages/admin.py
|
Sikilabs/sikilabs
|
7dbb4a76d28429a6e0e9d6960571d3f8ea7fde29
|
[
"MIT"
] | null | null | null |
sikipages/admin.py
|
Sikilabs/sikilabs
|
7dbb4a76d28429a6e0e9d6960571d3f8ea7fde29
|
[
"MIT"
] | null | null | null |
sikipages/admin.py
|
Sikilabs/sikilabs
|
7dbb4a76d28429a6e0e9d6960571d3f8ea7fde29
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from mezzanine.pages.admin import PageAdmin
from .models import SikiPage
admin.site.register(SikiPage, PageAdmin)
| 29.4
| 43
| 0.843537
| 20
| 147
| 6.2
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.095238
| 147
| 5
| 44
| 29.4
| 0.932331
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
4585031548c3fb8b8737bb0e0d47cdba1e367334
| 104
|
py
|
Python
|
wisps/simulations/__init__.py
|
caganze/WISPS
|
81b91f8b49c7345ab68b7c4eb480716985e8905c
|
[
"MIT"
] | null | null | null |
wisps/simulations/__init__.py
|
caganze/WISPS
|
81b91f8b49c7345ab68b7c4eb480716985e8905c
|
[
"MIT"
] | 7
|
2021-02-02T21:51:56.000Z
|
2022-01-13T00:57:45.000Z
|
wisps/simulations/__init__.py
|
caganze/wisps
|
6572201f94a6af6d1c0a306f2f447215d4330bd7
|
[
"MIT"
] | null | null | null |
from .initialize import *
from .core import *
from .selection_function import *
#from .binaries import *
| 26
| 33
| 0.769231
| 13
| 104
| 6.076923
| 0.538462
| 0.379747
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 104
| 4
| 34
| 26
| 0.88764
| 0.221154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
45b8dabf32d3e32abdf2da62f8cb3c305c9afc5f
| 808
|
py
|
Python
|
scripts/propertiesReader.py
|
aditprab/tesla-cl-tools
|
b1df7a451cdbf3f80feb10bf96ea3bc3f7904489
|
[
"MIT"
] | 1
|
2019-06-25T21:44:57.000Z
|
2019-06-25T21:44:57.000Z
|
scripts/propertiesReader.py
|
aditprab/tesla-cl-tools
|
b1df7a451cdbf3f80feb10bf96ea3bc3f7904489
|
[
"MIT"
] | 1
|
2019-04-05T20:43:12.000Z
|
2019-04-05T20:43:12.000Z
|
scripts/propertiesReader.py
|
aditprab/tesla-cl-tools
|
b1df7a451cdbf3f80feb10bf96ea3bc3f7904489
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
import ConfigParser
import os
config = ConfigParser.RawConfigParser()
try:
config.read('/tmp/Configurations.properties')
except Exception as e :
print(str(e))
def getAuthTokenUrl():
return config.get('urls', 'baseUrl') + config.get('urls', 'tokenEndpoint')
def getChargeStateUrl():
return config.get('urls', 'baseUrl') + config.get('urls', 'chargeStatusEndpoint')
def getVehiclesUrl():
return config.get('urls', 'baseUrl') + config.get('urls', 'vehiclesEndpoint')
def getUsername():
return config.get('auth', 'username')
def getPassword():
return config.get('auth', 'password')
def getUserAgent():
return config.get('auth', 'user-agent')
def getClientId():
return config.get('auth', 'client-id')
def getClientSecret():
return config.get('auth', 'client-secret')
| 22.444444
| 85
| 0.714109
| 95
| 808
| 6.073684
| 0.463158
| 0.171577
| 0.207972
| 0.164645
| 0.289428
| 0.202773
| 0.202773
| 0.202773
| 0
| 0
| 0
| 0
| 0.111386
| 808
| 35
| 86
| 23.085714
| 0.803621
| 0.024752
| 0
| 0
| 0
| 0
| 0.243964
| 0.038119
| 0
| 0
| 0
| 0
| 0
| 1
| 0.347826
| false
| 0.086957
| 0.086957
| 0.347826
| 0.782609
| 0.043478
| 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
| 1
| 0
| 1
| 0
| 1
| 0
| 0
|
0
| 5
|
2fb2fe4c29cc6c32aebbd076e1612b3b7ef50adc
| 4,542
|
py
|
Python
|
clfpy/auth_client.py
|
CloudiFacturing/cfpy
|
09ad23907ba05b94797ad215e652c57e002de0bf
|
[
"Zlib"
] | null | null | null |
clfpy/auth_client.py
|
CloudiFacturing/cfpy
|
09ad23907ba05b94797ad215e652c57e002de0bf
|
[
"Zlib"
] | 3
|
2019-07-15T10:48:14.000Z
|
2020-12-04T12:44:10.000Z
|
clfpy/auth_client.py
|
SemWES/clfpy
|
09ad23907ba05b94797ad215e652c57e002de0bf
|
[
"Zlib"
] | 3
|
2018-07-06T08:08:51.000Z
|
2019-03-20T09:12:13.000Z
|
"""Lightweight SOAP client to communicate with the authentication manager"""
from clfpy import SoapClient
class AuthClient(SoapClient):
"""Lightweight AuthManager SOAP client
Create by passing a WSDL URL:
auth = AuthClient(<wsdl>)
"""
def __init__(self, wsdl_url):
super(AuthClient, self).__init__(wsdl_url)
def get_session_token(self, username, project, password):
return self.method_call('getSessionToken', [username, password,
project])
def get_token_info(self, session_token):
return self.method_call('getTokenInfo', [session_token])
def get_token_info_complete(self, session_token):
return self.method_call('getTokenInfoComplete', [session_token])
def validate_session_token(self, session_token):
return self.method_call('validateSessionToken', [session_token])
def get_username(self, session_token):
return self.method_call('getUsername', [session_token])
def get_project(self, session_token):
return self.method_call('getProject', [session_token])
def get_roles(self, session_token):
return self.method_call('getRoles', [session_token])
def get_email(self, session_token):
return self.method_call('getEmail', [session_token])
def get_endpoint(self, session_token, component):
return self.method_call('getEndpoint', [session_token, component])
def get_openstack_token(self, session_token):
return self.method_call('getOpenStackToken', [session_token])
def count_workflows(self):
return self.method_call('countWorkflows', [])
class AuthUsersClient(SoapClient):
"""Lightweight AuthManager/Users SOAP client
Create by passing a WSDL URL:
auth_users = AuthUsersClient(<wsdl>)
"""
def __init__(self, wsdl_url):
super(AuthUsersClient, self).__init__(wsdl_url)
def list_users(self, token):
return self.method_call('listUsers', [token])
def create_user(self, token, username, password, email, description,
project_ID):
return self.method_call('createUser', [token, username, password,
email, description, project_ID])
def delete_user(self, token, user_ID):
return self.method_call('deleteUser', [token, user_ID])
def deactivate_user(self, token, user_ID):
return self.method_call('deactivateUser', [token, user_ID])
def add_user_to_project(self, token, user_ID, project_ID):
return self.method_call('addToProject', [token, user_ID, project_ID])
def change_password(self, token, user_ID, old_password, new_password):
return self.method_call('changePassword', [token, user_ID,
old_password, new_password])
def reset_password(self, token, user_ID):
return self.method_call('resetPassword', [token, user_ID])
def update_email(self, token, new_email):
return self.method_call('updateEmail', [token, new_email])
def assign_role_to_user(self, token, user_ID, project_ID, rolename):
return self.method_call('assignRole', [token, user_ID, project_ID,
rolename])
def withdraw_role_from_user(self, token, user_ID, project_ID, rolename):
return self.method_call('withdrawRole', [token, user_ID, project_ID,
rolename])
def list_possible_roles(self, token):
return self.method_call('listPossibleRoles', [token])
def list_roles_for_user_in_project(self, token, user_ID, project_ID):
return self.method_call('listRolesForUserInProject', [token, user_ID,
project_ID])
class AuthProjectsClient(SoapClient):
"""Lightweight AuthManager/Projects SOAP client
Create by passing a WSDL URL:
auth_projects = AuthProjectsClient(<wsdl>)
"""
def __init__(self, wsdl_url):
super(AuthProjectsClient, self).__init__(wsdl_url)
def list_projects(self, token):
return self.method_call('listProjects', [token])
def create_project(self, token, project_name, description):
return self.method_call('createProject', [token, project_name,
description])
def delete_project(self, token, project_ID):
return self.method_call('deleteProject', [token, project_ID])
| 37.229508
| 79
| 0.656319
| 509
| 4,542
| 5.552063
| 0.188605
| 0.092003
| 0.147205
| 0.184006
| 0.47523
| 0.430644
| 0.36695
| 0.184006
| 0.142604
| 0.075725
| 0
| 0
| 0.244606
| 4,542
| 121
| 80
| 37.53719
| 0.823667
| 0.088948
| 0
| 0.071429
| 0
| 0
| 0.083619
| 0.00613
| 0
| 0
| 0
| 0
| 0
| 1
| 0.414286
| false
| 0.128571
| 0.014286
| 0.371429
| 0.842857
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 5
|
2fe79f5e6a3bee675a0e800c9abe50e3fb804d32
| 24
|
py
|
Python
|
subtraction/subtraction.py
|
Dhivyadharshinidd/hackers
|
621abffcf5de3e091f7fdf9c34ae2348e808fa2d
|
[
"MIT"
] | null | null | null |
subtraction/subtraction.py
|
Dhivyadharshinidd/hackers
|
621abffcf5de3e091f7fdf9c34ae2348e808fa2d
|
[
"MIT"
] | null | null | null |
subtraction/subtraction.py
|
Dhivyadharshinidd/hackers
|
621abffcf5de3e091f7fdf9c34ae2348e808fa2d
|
[
"MIT"
] | null | null | null |
a=4
b=2
c=a-b
print(c)
| 4
| 8
| 0.541667
| 9
| 24
| 1.444444
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0.208333
| 24
| 5
| 9
| 4.8
| 0.578947
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.25
| 1
| 1
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
2ffd5a01ae1c6307c96d8cc93ffe5ba558069a76
| 21,818
|
py
|
Python
|
ibmcloud_python_sdk/power/volume.py
|
mor120/ibmcloud-python-sdk
|
a828c67dd47a12e743774632b923985768e3e21b
|
[
"Apache-2.0"
] | 2
|
2021-05-31T23:41:34.000Z
|
2021-09-08T13:49:30.000Z
|
ibmcloud_python_sdk/power/volume.py
|
jamesregis/ibmcloud-python-sdk
|
90d00d9ac903c68b1e3084f4aab5f58614cea89b
|
[
"Apache-2.0"
] | 5
|
2021-07-22T01:31:37.000Z
|
2022-03-13T08:29:54.000Z
|
ibmcloud_python_sdk/power/volume.py
|
jamesregis/ibmcloud-python-sdk
|
90d00d9ac903c68b1e3084f4aab5f58614cea89b
|
[
"Apache-2.0"
] | 4
|
2021-06-11T15:38:47.000Z
|
2022-02-27T16:03:27.000Z
|
import json
from ibmcloud_python_sdk.config import params
from ibmcloud_python_sdk.utils.common import query_wrapper as qw
from ibmcloud_python_sdk.power import get_power_headers as headers
from ibmcloud_python_sdk.utils.common import resource_not_found
from ibmcloud_python_sdk.utils.common import resource_deleted
from ibmcloud_python_sdk.utils.common import resource_created
from ibmcloud_python_sdk.power import instance
from ibmcloud_python_sdk.power import pvm
from ibmcloud_python_sdk.utils.common import check_args
class Volume():
def __init__(self):
self.cfg = params()
self.instance = instance.Instance()
self.pvm = pvm.Pvm()
def get_volumes(self, instance):
"""Retrieve volume list from cloud instance
:param instance: Cloud instance ID
:type instance: str
:return: Volume list
:rtype: list
"""
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/volumes".format(
ci_info["name"]))
# Return data
return qw("power", "GET", path, headers())["data"]
except Exception as error:
print("Error fetching volume list for cloud instance {}."
" {}".format(instance, error))
def get_volume(self, instance, volume):
"""Retrieve specific volume by name or by ID
:param instance: Cloud instance ID
:type instance: str
:param volume: Volume name or ID
:type volume: str
:return: Volume information
:rtype: dict
"""
by_name = self.get_volume_by_name(instance, volume)
if "errors" in by_name:
for key_name in by_name["errors"]:
if key_name["code"] == "not_found":
by_id = self.get_volume_by_id(instance, volume)
if "errors" in by_id:
return by_id
return by_id
else:
return by_name
else:
return by_name
def get_volume_by_id(self, instance, id):
"""Retrieve specific volume by ID
:param instance: Cloud instance ID
:type instance: str
:param id: Volume ID
:type id: str
:return: Volume information
:rtype: dict
"""
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/volumes/{}".format(
ci_info["name"], id))
# Return data
return qw("power", "GET", path, headers())["data"]
except Exception as error:
print("Error fetching volume with ID {} for cloud instance {}."
" {}".format(id, instance, error))
def get_volume_by_name(self, instance, name):
"""Retrieve specific volume by name
:param instance: Cloud instance ID
:type instance: str
:param name: Volume name
:type name: str
:return: Volume information
:rtype: dict
"""
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Retrieve volumes
data = self.get_volumes(ci_info["name"])
if "errors" in data:
return data
# Loop over volumes until filter match
for volume in data['volumes']:
if volume["name"] == name:
# Return data
return volume
# Return error if no volume is found
return resource_not_found()
except Exception as error:
print("Error fetching volume with name {} for cloud instance {}."
" {}".format(name, instance, error))
def get_pvm_volumes(self, instance, pvm):
"""Retrieve volumes list for Power Virtual Instance
:param instance: Cloud instance ID
:type instance: str
:param pvm: Power Virtual Instance name or ID
:type pvm: str
:return: PVM volume list
:rtype: list
"""
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Check if pvm exists and retrieve information
pvm_info = self.pvm.get_pvm(instance, pvm)
if "errors" in pvm_info:
return pvm_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/pvm-instances/{}"
"/volumes".format(ci_info["name"],
pvm_info["pvmInstanceID"]))
# Return data
return qw("power", "GET", path, headers())["data"]
except Exception as error:
print("Error fetching volume list for Power Virtual Instance list"
" for cloud instance {}. {}".format(instance, error))
def get_pvm_volume(self, instance, pvm, volume):
"""Retrieve specific volume from Power Virtual Instance by name or by ID
:param instance: Cloud instance ID
:type instance: str
:param pvm: Power Virtual Instance name or ID
:type pvm: str
:param volume: Volume name or ID
:type volume: str
:return: PVM volume information
:rtype: dict
"""
by_name = self.get_pvm_volume_by_name(instance, pvm, volume)
if "errors" in by_name:
for key_name in by_name["errors"]:
if key_name["code"] == "not_found":
by_id = self.get_pvm_volume_by_id(instance, pvm, volume)
if "errors" in by_id:
return by_id
return by_id
else:
return by_name
else:
return by_name
def get_pvm_volume_by_id(self, instance, pvm, id):
"""Retrieve specific volume from Power Virtual Instance by ID
:param instance: Cloud instance ID
:type instance: str
:param pvm: Power Virtual Instance name or ID
:type pvm: str
:param id: Volume ID
:type id: str
:return: PVM volume information
:rtype: dict
"""
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Check if pvm exists and retrieve information
pvm_info = self.pvm.get_pvm(instance, pvm)
if "errors" in pvm_info:
return pvm_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/pvm-instances/{}"
"/networks/{}".format(ci_info["name"],
pvm_info["pvmInstanceID"],
id))
# Return data
return qw("power", "GET", path, headers())["data"]
except Exception as error:
print("Error fetching volume with ID {} from Power Virtual"
" Instance {} for cloud instance {}. {}".format(
id, pvm, instance, error))
def get_pvm_volume_by_name(self, instance, pvm, name):
"""Retrieve specific volume from Power Virtual Instance by name
:param instance: Cloud instance ID
:type instance: str
:param pvm: Power Virtual Instance name or ID
:type pvm: str
:param name: Volume name
:type name: str
:return: PVM volume information
:rtype: dict
"""
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Check if pvm exists and retrieve information
pvm_info = self.pvm.get_pvm(instance, pvm)
if "errors" in pvm_info:
return pvm_info
# Retrieve volume
data = self.get_pvm_volumes(ci_info["name"],
pvm_info["pvmInstanceID"])
if "errors" in data:
return data
# Loop over volumes until filter match
for volume in data['volumes']:
if volume["name"] == name:
# Return data
return volume
# Return error if no volume is found
return resource_not_found()
except Exception as error:
print("Error fetching volume with name {} from Power Virtual"
" Instance {} for cloud instance {}. {}".format(
name, pvm, instance, error))
def create_volume(self, **kwargs):
"""Create volume
:param instance: Cloud instance ID
:type instance: str
:param size: Volume size
:type size: int
:param name: Volume name
:type name: str
:param disk_type: Type of Disk, required if affinity_policy not used
:type disk_type: str, optional
:param pool: Volume pool where the volume will be located
:type pool: str, optional
:param shareable: Indicates if the volume is shareable between VMs
:type shareable: str, optional
:param affinity_policy: Affinity policy for data volume being created;
requires affinity_volume to be specified
:type affinity_policy: str, optional
:param affinity_volume: Volume (ID or Name) to base volume affinity
policy against; required if affinity_policy provided
:type affinity_volume: str, optional
:return: Volume information
:rtype: dict
"""
args = ["instance", "size", "name"]
check_args(args, **kwargs)
# Build dict of argument and assign default value when needed
args = {
'instance': kwargs.get('instance'),
'size': kwargs.get('size'),
'name': kwargs.get('name'),
'diskType': kwargs.get('disk_type'),
'volumePool': kwargs.get('pool'),
'shareable': kwargs.get('shareable'),
'affinityPolicy': kwargs.get('affinity_policy'),
'affinityVolume': kwargs.get('affinity_volume'),
}
# Construct payload
payload = {}
for key, value in args.items():
if key != "instance" and value is not None:
payload[key] = value
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/volumes".format(
ci_info["name"]))
# Return data
return qw("power", "POST", path, headers(),
json.dumps(payload))["data"]
except Exception as error:
print("Error creating volume for cloud instance {}. {}".format(
args['instance'], error))
def clone_volume(self, **kwargs):
"""Create a clone from a volume
:param instance: Instance name or ID
:type instance: str
:param volumes: List of volumes to be cloned
:type volumes: list
:param name: Display name for the new cloned volumes. Cloned Volume
names will be prefixed with 'clone-'. If multiple volumes cloned
they will be suffix with a '-' and an incremental number starting
with 1.
:type name: str
:param prefix_name: Prefix to use when naming the new cloned volumes
:type prefix_name: str, optional
:return: Volume clone information
:rtype: dict
"""
args = ["instance", "volumes", "name"]
check_args(args, **kwargs)
# Build dict of argument and assign default value when needed
args = {
'instance': kwargs.get('instance'),
'volumeIDs': kwargs.get('volumes'),
'displayName': kwargs.get('name'),
'namingPrefix': kwargs.get('prefix_name'),
}
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(args['instance'])
if "errors" in ci_info:
return ci_info
# Construct payload
payload = {}
for key, value in args.items():
if key != "instance" and value is not None:
if key == "volumeIDs":
vl = []
for volume in args["volumeIDs"]:
vol_info = self.get_volume(ci_info["name"], volume)
if "errors" in vol_info:
return vol_info
vl.append(vol_info["volumeID"])
payload["volumeIDs"] = vl
payload[key] = value
try:
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/volumes/clone".format(
ci_info["name"]))
# Return data
return qw("power", "POST", path, headers(),
json.dumps(payload))["data"]
except Exception as error:
print("Error creating clone from volume(s) {} for cloud instance"
" {}. {}".format(args["volumeIDs"], args['instance'], error))
def attach_volume(self, **kwargs):
"""Attach volume to a Power Virtual Instance
:param instance: Instance name or ID
:type instance: str
:param pvm: Power Virtual Instance name or ID
:type pvm: str
:param volume: Volume name or ID
:type volume: str
:return: Attachment status
:rtype: dict
"""
args = ["instance", "pvm", "volume"]
check_args(args, **kwargs)
# Build dict of argument and assign default value when needed
args = {
'instance': kwargs.get('instance'),
'pvm': kwargs.get('pvm'),
'volume': kwargs.get('volume'),
}
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(args['instance'])
if "errors" in ci_info:
return ci_info
# Check if pvm exists and retrieve information
pvm_info = self.pvm.get_pvm(args['instance'], args['pvm'])
if "errors" in pvm_info:
return pvm_info
# Check if volume exists and retrieve information
vol_info = self.get_volume(ci_info["name"], args["volume"])
if "errors" in vol_info:
return vol_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/pvm-instances/{}"
"/volumes/{}".format(ci_info["name"],
pvm_info["pvmInstanceID"],
vol_info["volumeID"]))
data = qw("power", "POST", path, headers())
# Return data
if data["response"].status != 200:
return data["data"]
# Return status
payload = {"status": "attached"}
return resource_created(payload)
except Exception as error:
print("Error attaching volume {} to Power Virtual Instance {}"
" from cloud instance {}. {}".format(
args["volume"], args['pvm'], args['instance'], error))
def detach_volume(self, **kwargs):
"""Detach volume to a Power Virtual Instance
:param instance: Instance name or ID
:type instance: str
:param pvm: Power Virtual Instance name or ID
:type pvm: str
:param volume: Volume name or ID
:type volume: str
:return: Dettachement status
:rtype: dict
"""
args = ["instance", "pvm", "volume"]
check_args(args, **kwargs)
# Build dict of argument and assign default value when needed
args = {
'instance': kwargs.get('instance'),
'pvm': kwargs.get('pvm'),
'volume': kwargs.get('volume'),
}
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(args['instance'])
if "errors" in ci_info:
return ci_info
# Check if pvm exists and retrieve information
pvm_info = self.pvm.get_pvm(args['instance'], args['pvm'])
if "errors" in pvm_info:
return pvm_info
# Check if volume exists and retrieve information
vol_info = self.get_volume(ci_info["name"], args["volume"])
if "errors" in vol_info:
return vol_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/pvm-instances/{}"
"/volumes/{}".format(ci_info["name"],
pvm_info["pvmInstanceID"],
vol_info["volumeID"]))
data = qw("power", "DELETE", path, headers())
# Return data
if data["response"].status != 202:
return data["data"]
# Return status
payload = {"status": "detached"}
return resource_deleted(payload)
except Exception as error:
print("Error detaching volume {} from Power Virtual Instance {}"
" for cloud instance {}. {}".format(
args["volume"], args['pvm'], args['instance'], error))
def boot_volume(self, **kwargs):
"""Set boot volume to a Power Virtual Instance
:param instance: Instance name or ID
:type instance: str
:param pvm: Power Virtual Instance name or ID
:type pvm: str
:param volume: Volume name or ID
:return: Boot status
:rtype: dict
"""
args = ["instance", "pvm", "volume"]
check_args(args, **kwargs)
# Build dict of argument and assign default value when needed
args = {
'instance': kwargs.get('instance'),
'pvm': kwargs.get('pvm'),
'volume': kwargs.get('volume'),
}
try:
# Check if cloud instance exists and retrieve information
ci_info = self.instance.get_instance(args['instance'])
if "errors" in ci_info:
return ci_info
# Check if pvm exists and retrieve information
pvm_info = self.pvm.get_pvm(args['instance'], args['pvm'])
if "errors" in pvm_info:
return pvm_info
# Check if volume exists and retrieve information
vol_info = self.get_volume(ci_info["name"], args["volume"])
if "errors" in vol_info:
return vol_info
# Connect to api endpoint for cloud-instances
path = ("/pcloud/v1/cloud-instances/{}/pvm-instances/{}"
"/volumes/{}/setboot".format(ci_info["name"],
pvm_info["pvmInstanceID"],
vol_info["volumeID"]))
data = qw("power", "PUT", path, headers())
# Return data
if data["response"].status != 200:
return data["data"]
# Return status
payload = {"status": "booted"}
return resource_created(payload)
except Exception as error:
print("Error setting boot to volume {} from Power Virtual Instance"
" {} for cloud instance {}. {}".format(
args["volume"], args['pvm'], args['instance'], error))
def delete_volume(self, instance, volume):
"""Delete volume from cloud instance
:param instance: Instance name or ID
:type instance: str
:param volume: Volume name or ID
:type volume: str
:return: Deletion status
:rtype: dict
"""
try:
ci_info = self.instance.get_instance(instance)
if "errors" in ci_info:
return ci_info
# Check if volume exists and retrieve information
vol_info = self.get_volume(ci_info["name"], volume)
if "errors" in vol_info:
return vol_info
path = ("/pcloud/v1/cloud-instances/{}/volumes/{}".format(
ci_info["name"], vol_info["volumeID"]))
data = qw("power", "DELETE", path, headers())
# Return data
if data["response"].status != 200:
return data["data"]
# Return status
return resource_deleted()
except Exception as error:
print("Error deleting volume {} from cloud instance {}. {}".format(
volume, instance, error))
| 36.363333
| 80
| 0.545055
| 2,389
| 21,818
| 4.875262
| 0.074508
| 0.027303
| 0.024899
| 0.050485
| 0.807933
| 0.769039
| 0.750923
| 0.729888
| 0.699493
| 0.668756
| 0
| 0.00165
| 0.361216
| 21,818
| 599
| 81
| 36.42404
| 0.834039
| 0.279173
| 0
| 0.673333
| 0
| 0
| 0.175481
| 0.029327
| 0
| 0
| 0
| 0
| 0
| 1
| 0.05
| false
| 0
| 0.033333
| 0
| 0.256667
| 0.04
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
ff30864e9262a538d72b7b9c3e30dc4524f907ef
| 84
|
py
|
Python
|
atest/testdata/test_libraries/MyLibDir/SubPackage/__init__.py
|
rdagum/robotframework
|
b7069d505374e9f09a140ed5a9727d2a40716446
|
[
"ECL-2.0",
"Apache-2.0"
] | 7,073
|
2015-01-01T17:19:16.000Z
|
2022-03-31T22:01:29.000Z
|
atest/testdata/test_libraries/MyLibDir/SubPackage/__init__.py
|
imust6226/robotframework
|
08c56fef2ebc64d682c7f99acd77c480d8d0e028
|
[
"ECL-2.0",
"Apache-2.0"
] | 2,412
|
2015-01-02T09:29:05.000Z
|
2022-03-31T13:10:46.000Z
|
atest/testdata/test_libraries/MyLibDir/SubPackage/__init__.py
|
3mdeb/robotframework
|
6006ce0b3d5fc6b45c5eb040dc859acd64bfa846
|
[
"ECL-2.0",
"Apache-2.0"
] | 2,298
|
2015-01-03T02:47:15.000Z
|
2022-03-31T02:00:16.000Z
|
class SubPackage:
def keyword_in_mylibdir_subpackage_class(self):
pass
| 16.8
| 51
| 0.738095
| 10
| 84
| 5.8
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 84
| 4
| 52
| 21
| 0.878788
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.666667
| 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
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 5
|
ff37bbbb39a160490216d72e3c6734de01209348
| 23
|
py
|
Python
|
prestashop_erpnext_connector/prestashoperpnextconnector/doctype/synchronization/__init__.py
|
nikha1/prestashop_erpnext_connector
|
23d8b276fc4e287c7e84eefe418367d54bfc087c
|
[
"MIT"
] | 1
|
2022-01-05T16:00:21.000Z
|
2022-01-05T16:00:21.000Z
|
prestashop_erpnext_connector/prestashoperpnextconnector/doctype/synchronization/__init__.py
|
nikha1/prestashop_erpnext_connector
|
23d8b276fc4e287c7e84eefe418367d54bfc087c
|
[
"MIT"
] | null | null | null |
prestashop_erpnext_connector/prestashoperpnextconnector/doctype/synchronization/__init__.py
|
nikha1/prestashop_erpnext_connector
|
23d8b276fc4e287c7e84eefe418367d54bfc087c
|
[
"MIT"
] | 1
|
2021-12-25T15:56:54.000Z
|
2021-12-25T15:56:54.000Z
|
from . import category
| 11.5
| 22
| 0.782609
| 3
| 23
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173913
| 23
| 2
| 22
| 11.5
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
ff3c524cc37b4870277c8aff687709c30665f5ae
| 28
|
py
|
Python
|
PyFi/__init__.py
|
vubon/pyfi
|
fddd8149fe3e1ce2cde2a8512c9b155667b72184
|
[
"MIT"
] | 2
|
2020-07-08T18:03:25.000Z
|
2020-07-08T20:31:04.000Z
|
PyFi/__init__.py
|
vubon/pyfi
|
fddd8149fe3e1ce2cde2a8512c9b155667b72184
|
[
"MIT"
] | null | null | null |
PyFi/__init__.py
|
vubon/pyfi
|
fddd8149fe3e1ce2cde2a8512c9b155667b72184
|
[
"MIT"
] | null | null | null |
from PyFi.pyfi import main
| 9.333333
| 26
| 0.785714
| 5
| 28
| 4.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 28
| 2
| 27
| 14
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
ff4407150757fff3762146ef8f2fd72233e9cf4a
| 101
|
py
|
Python
|
backend/app/item/__init__.py
|
GJCav/thywy
|
3c458bccdd23bab78b6a8bd65603c7845e643d70
|
[
"MIT"
] | 8
|
2022-01-23T07:30:06.000Z
|
2022-02-15T03:39:25.000Z
|
backend/app/item/__init__.py
|
Dr-Left/thuwy
|
3c458bccdd23bab78b6a8bd65603c7845e643d70
|
[
"MIT"
] | 5
|
2022-01-21T03:31:22.000Z
|
2022-03-04T00:01:59.000Z
|
backend/app/item/__init__.py
|
Dr-Left/thuwy
|
3c458bccdd23bab78b6a8bd65603c7845e643d70
|
[
"MIT"
] | 2
|
2022-01-23T08:09:46.000Z
|
2022-02-24T05:55:02.000Z
|
from flask import Blueprint
itemRouter = Blueprint("item", __name__)
from . import api as item_api
| 16.833333
| 40
| 0.772277
| 14
| 101
| 5.214286
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.158416
| 101
| 5
| 41
| 20.2
| 0.858824
| 0
| 0
| 0
| 0
| 0
| 0.039604
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0.666667
| 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
| 1
| 0
| 1
| 1
|
0
| 5
|
ff4912c574a9b3d4300d3965e11b531e0d5976a4
| 76
|
py
|
Python
|
dense/__init__.py
|
julijanjug/lip2dense_v2
|
8a1147f7da1949908b703ba13cbb4dc454d22161
|
[
"MIT"
] | null | null | null |
dense/__init__.py
|
julijanjug/lip2dense_v2
|
8a1147f7da1949908b703ba13cbb4dc454d22161
|
[
"MIT"
] | null | null | null |
dense/__init__.py
|
julijanjug/lip2dense_v2
|
8a1147f7da1949908b703ba13cbb4dc454d22161
|
[
"MIT"
] | null | null | null |
from .dp_model import DensePoseNetModel
from .coco_reader import COCOReader
| 25.333333
| 39
| 0.868421
| 10
| 76
| 6.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 76
| 2
| 40
| 38
| 0.941176
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
ff745594e0f38adef5c20305dd2d99d54f6454d4
| 144
|
py
|
Python
|
Python 3 - Curso completo/exercicio003.py
|
PedroMunizdeMatos/Estudos-e-Projetos
|
5949c1f2a80100c1e2db56c7b60f5f0475c0d1dc
|
[
"MIT"
] | null | null | null |
Python 3 - Curso completo/exercicio003.py
|
PedroMunizdeMatos/Estudos-e-Projetos
|
5949c1f2a80100c1e2db56c7b60f5f0475c0d1dc
|
[
"MIT"
] | null | null | null |
Python 3 - Curso completo/exercicio003.py
|
PedroMunizdeMatos/Estudos-e-Projetos
|
5949c1f2a80100c1e2db56c7b60f5f0475c0d1dc
|
[
"MIT"
] | null | null | null |
n = int(input('Digite um número: '))
print('O número que precede {} é: {}'.format(n, n-1))
print('O número que sucede {} é: {}'.format(n, n+1))
| 36
| 53
| 0.597222
| 26
| 144
| 3.307692
| 0.538462
| 0.139535
| 0.27907
| 0.348837
| 0.232558
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016393
| 0.152778
| 144
| 3
| 54
| 48
| 0.688525
| 0
| 0
| 0
| 0
| 0
| 0.520833
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0
| 0
| null | 0
| 1
| 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
| 1
|
0
| 5
|
ff97cb0e11cf933f79c775138a2035395f7a50d9
| 386
|
py
|
Python
|
layers/admin.py
|
JinIgarashi/postgis2qfield
|
31e3a2e954708e979b98a007ff75cb0b405e381b
|
[
"MIT"
] | 2
|
2021-01-12T09:24:27.000Z
|
2021-07-12T08:56:16.000Z
|
layers/admin.py
|
JinIgarashi/postgis2qfield
|
31e3a2e954708e979b98a007ff75cb0b405e381b
|
[
"MIT"
] | 10
|
2020-02-22T05:46:00.000Z
|
2021-05-04T07:55:37.000Z
|
layers/admin.py
|
JinIgarashi/postgis2qfield
|
31e3a2e954708e979b98a007ff75cb0b405e381b
|
[
"MIT"
] | 2
|
2020-08-06T17:58:55.000Z
|
2021-07-12T08:56:23.000Z
|
from layers.layer_base import LayerBase
class District(LayerBase):
def __init__(self):
super().__init__("district")
class Sector(LayerBase):
def __init__(self):
super().__init__("sector")
class Cell(LayerBase):
def __init__(self):
super().__init__("cell")
class Village(LayerBase):
def __init__(self):
super().__init__("village")
| 17.545455
| 39
| 0.65544
| 42
| 386
| 5.238095
| 0.357143
| 0.218182
| 0.290909
| 0.363636
| 0.527273
| 0.527273
| 0
| 0
| 0
| 0
| 0
| 0
| 0.207254
| 386
| 21
| 40
| 18.380952
| 0.718954
| 0
| 0
| 0.307692
| 0
| 0
| 0.064767
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.307692
| false
| 0
| 0.076923
| 0
| 0.692308
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
ff9b0d977186ecd1b9eb9701eec4be5e5cd66048
| 201
|
py
|
Python
|
clubsuite/suite/models/mdl_activity.py
|
lazyCodes7/Clubspot
|
39ddee5adcd6e40f7552fd9048282225ff058abd
|
[
"MIT"
] | 5
|
2021-09-19T15:09:51.000Z
|
2021-09-20T06:43:27.000Z
|
clubsuite/suite/models/mdl_activity.py
|
lazyCodes7/Clubspot
|
39ddee5adcd6e40f7552fd9048282225ff058abd
|
[
"MIT"
] | null | null | null |
clubsuite/suite/models/mdl_activity.py
|
lazyCodes7/Clubspot
|
39ddee5adcd6e40f7552fd9048282225ff058abd
|
[
"MIT"
] | 1
|
2021-09-20T13:27:13.000Z
|
2021-09-20T13:27:13.000Z
|
from django.db import models
from django.utils import timezone
class Activity(models.Model):
activity = models.TextField(default="",null=True)
def __str__(self):
return self.activity
| 22.333333
| 53
| 0.731343
| 26
| 201
| 5.5
| 0.692308
| 0.13986
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174129
| 201
| 9
| 54
| 22.333333
| 0.861446
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0.166667
| 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
| 1
| 1
| 1
| 0
|
0
| 5
|
ff9cfbb42830440d5aef164721390723354e9247
| 41
|
py
|
Python
|
log.py
|
leishuping1023/python33
|
1712374ef236209e66b59d172cc1c81aa825f719
|
[
"MIT"
] | null | null | null |
log.py
|
leishuping1023/python33
|
1712374ef236209e66b59d172cc1c81aa825f719
|
[
"MIT"
] | null | null | null |
log.py
|
leishuping1023/python33
|
1712374ef236209e66b59d172cc1c81aa825f719
|
[
"MIT"
] | null | null | null |
i = 1
def index():
return 'hello'
b =10
| 8.2
| 15
| 0.585366
| 8
| 41
| 3
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 0.243902
| 41
| 4
| 16
| 10.25
| 0.677419
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 0.5
| 0
| 1
| 1
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
4441c15c12ff267d16b4a879d01bfda77615933d
| 147
|
py
|
Python
|
py/mater/__init__.py
|
DCGenomics/MATER
|
1b1a6c858467db564e8b7f8524be504c2bcfe992
|
[
"MIT"
] | 4
|
2020-04-30T07:27:14.000Z
|
2020-08-06T06:37:31.000Z
|
py/mater/__init__.py
|
DCGenomics/MATER
|
1b1a6c858467db564e8b7f8524be504c2bcfe992
|
[
"MIT"
] | null | null | null |
py/mater/__init__.py
|
DCGenomics/MATER
|
1b1a6c858467db564e8b7f8524be504c2bcfe992
|
[
"MIT"
] | 1
|
2020-05-11T15:29:09.000Z
|
2020-05-11T15:29:09.000Z
|
import sys
from ._version import get_versions
__version__ = get_versions()['version']
sys.stderr.write(f"MATER({__version__})\n")
del get_versions
| 24.5
| 43
| 0.789116
| 21
| 147
| 4.952381
| 0.571429
| 0.317308
| 0.346154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081633
| 147
| 5
| 44
| 29.4
| 0.77037
| 0
| 0
| 0
| 0
| 0
| 0.197279
| 0.14966
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
924ada52ddcf5924398be40023d90dd587ba6315
| 116
|
py
|
Python
|
cake/workers/__init__.py
|
beckermr/cake
|
e0930dfdc59f42e484bb9a7a9fbf0c7d8398ac65
|
[
"BSD-3-Clause"
] | null | null | null |
cake/workers/__init__.py
|
beckermr/cake
|
e0930dfdc59f42e484bb9a7a9fbf0c7d8398ac65
|
[
"BSD-3-Clause"
] | 20
|
2016-02-22T21:11:31.000Z
|
2017-04-25T05:58:30.000Z
|
cake/workers/__init__.py
|
beckermr/cake
|
e0930dfdc59f42e484bb9a7a9fbf0c7d8398ac65
|
[
"BSD-3-Clause"
] | null | null | null |
# flake8: noqa
from .serialworker import SerialWorker
from .pmpworker import PMPWorker
from .base import BaseWorker
| 23.2
| 38
| 0.827586
| 14
| 116
| 6.857143
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009901
| 0.12931
| 116
| 4
| 39
| 29
| 0.940594
| 0.103448
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9271c72ea646b4880e80934b3068ba3c4048b5ab
| 127
|
py
|
Python
|
mac_desktop/toggle.py
|
looking-for-a-job/mac-desktop.py
|
e0146dc0b299eccd006b6998b0e8afe7bca12617
|
[
"Unlicense"
] | 2
|
2020-10-09T22:41:54.000Z
|
2021-03-15T01:07:32.000Z
|
mac_desktop/toggle.py
|
looking-for-a-job/mac-desktop.py
|
e0146dc0b299eccd006b6998b0e8afe7bca12617
|
[
"Unlicense"
] | null | null | null |
mac_desktop/toggle.py
|
looking-for-a-job/mac-desktop.py
|
e0146dc0b299eccd006b6998b0e8afe7bca12617
|
[
"Unlicense"
] | null | null | null |
#!/usr/bin/env python
"""toggle Desktop (show/hide)"""
import mac_desktop
if __name__ == "__main__":
mac_desktop.toggle()
| 18.142857
| 32
| 0.692913
| 17
| 127
| 4.588235
| 0.764706
| 0.25641
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.133858
| 127
| 6
| 33
| 21.166667
| 0.709091
| 0.370079
| 0
| 0
| 0
| 0
| 0.108108
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
92a87305801e4a3cf16a99a08c30a5d5d4522322
| 67
|
py
|
Python
|
src/xbrief/margin/vector_margin/__init__.py
|
pydget/xbrief
|
9e91927a98754b0fca1fa55eae9a785b15e963f9
|
[
"MIT"
] | null | null | null |
src/xbrief/margin/vector_margin/__init__.py
|
pydget/xbrief
|
9e91927a98754b0fca1fa55eae9a785b15e963f9
|
[
"MIT"
] | null | null | null |
src/xbrief/margin/vector_margin/__init__.py
|
pydget/xbrief
|
9e91927a98754b0fca1fa55eae9a785b15e963f9
|
[
"MIT"
] | null | null | null |
from .vector_margin import VectorMargin
from .sizing import sizing
| 22.333333
| 39
| 0.850746
| 9
| 67
| 6.222222
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119403
| 67
| 2
| 40
| 33.5
| 0.949153
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
2b984d023c64c71db4fb0516f892f418ac0cb220
| 1,725
|
py
|
Python
|
src/typecode/_vendor/pygments/lexers/compiled.py
|
tardyp/typecode
|
45011e9fc72ed149aeba554665487d5505e0fb00
|
[
"Apache-2.0"
] | null | null | null |
src/typecode/_vendor/pygments/lexers/compiled.py
|
tardyp/typecode
|
45011e9fc72ed149aeba554665487d5505e0fb00
|
[
"Apache-2.0"
] | null | null | null |
src/typecode/_vendor/pygments/lexers/compiled.py
|
tardyp/typecode
|
45011e9fc72ed149aeba554665487d5505e0fb00
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf-8 -*-
"""
pygments.lexers.compiled
~~~~~~~~~~~~~~~~~~~~~~~~
Just export lexer classes previously contained in this module.
:copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from typecode._vendor.pygments.lexers.jvm import JavaLexer, ScalaLexer
from typecode._vendor.pygments.lexers.c_cpp import CLexer, CppLexer
from typecode._vendor.pygments.lexers.d import DLexer
from typecode._vendor.pygments.lexers.objective import ObjectiveCLexer, \
ObjectiveCppLexer, LogosLexer
from typecode._vendor.pygments.lexers.go import GoLexer
from typecode._vendor.pygments.lexers.rust import RustLexer
from typecode._vendor.pygments.lexers.c_like import ECLexer, ValaLexer, CudaLexer
from typecode._vendor.pygments.lexers.pascal import DelphiLexer, Modula2Lexer, AdaLexer
from typecode._vendor.pygments.lexers.business import CobolLexer, CobolFreeformatLexer
from typecode._vendor.pygments.lexers.fortran import FortranLexer
from typecode._vendor.pygments.lexers.prolog import PrologLexer
from typecode._vendor.pygments.lexers.python import CythonLexer
from typecode._vendor.pygments.lexers.graphics import GLShaderLexer
from typecode._vendor.pygments.lexers.ml import OcamlLexer
from typecode._vendor.pygments.lexers.basic import BlitzBasicLexer, BlitzMaxLexer, MonkeyLexer
from typecode._vendor.pygments.lexers.dylan import DylanLexer, DylanLidLexer, DylanConsoleLexer
from typecode._vendor.pygments.lexers.ooc import OocLexer
from typecode._vendor.pygments.lexers.felix import FelixLexer
from typecode._vendor.pygments.lexers.nimrod import NimrodLexer
from typecode._vendor.pygments.lexers.crystal import CrystalLexer
__all__ = []
| 49.285714
| 95
| 0.822609
| 207
| 1,725
| 6.729469
| 0.415459
| 0.211055
| 0.258435
| 0.373295
| 0.460876
| 0.04738
| 0
| 0
| 0
| 0
| 0
| 0.006382
| 0.091594
| 1,725
| 34
| 96
| 50.735294
| 0.882578
| 0.141449
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.909091
| 0
| 0.909091
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
|
0
| 5
|
2bad677e61b3e51562a2a9473316e11cd8cc61ec
| 14
|
py
|
Python
|
test/run/t385.py
|
timmartin/skulpt
|
2e3a3fbbaccc12baa29094a717ceec491a8a6750
|
[
"MIT"
] | 2,671
|
2015-01-03T08:23:25.000Z
|
2022-03-31T06:15:48.000Z
|
test/run/t385.py
|
timmartin/skulpt
|
2e3a3fbbaccc12baa29094a717ceec491a8a6750
|
[
"MIT"
] | 972
|
2015-01-05T08:11:00.000Z
|
2022-03-29T13:47:15.000Z
|
test/run/t385.py
|
timmartin/skulpt
|
2e3a3fbbaccc12baa29094a717ceec491a8a6750
|
[
"MIT"
] | 845
|
2015-01-03T19:53:36.000Z
|
2022-03-29T18:34:22.000Z
|
print 3 >> -3
| 7
| 13
| 0.5
| 3
| 14
| 2.333333
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.285714
| 14
| 1
| 14
| 14
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 1
| 1
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
2bf38be128ffb37e4bb7d294cba6d314f61a3702
| 85
|
py
|
Python
|
django_prices_vatlayer/admin.py
|
korycins/django-prices-vatlayer
|
865607b8d557c49e6519d764118bcc93d27bd8c1
|
[
"BSD-3-Clause"
] | 12
|
2017-01-21T11:54:22.000Z
|
2021-09-08T14:53:59.000Z
|
django_prices_vatlayer/admin.py
|
korycins/django-prices-vatlayer
|
865607b8d557c49e6519d764118bcc93d27bd8c1
|
[
"BSD-3-Clause"
] | 13
|
2020-03-24T17:53:51.000Z
|
2022-02-10T20:01:14.000Z
|
myvenv/lib/python3.6/site-packages/django_prices_vatlayer/admin.py
|
yog240597/saleor
|
b75a23827a4ec2ce91637f0afe6808c9d09da00a
|
[
"CC-BY-4.0"
] | 14
|
2017-01-17T11:19:14.000Z
|
2021-09-08T14:54:36.000Z
|
from django.contrib import admin
from .models import VAT
admin.site.register(VAT)
| 12.142857
| 32
| 0.788235
| 13
| 85
| 5.153846
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.141176
| 85
| 6
| 33
| 14.166667
| 0.917808
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
9218f43ffc1575e20274c26ef7c592e2f967f9ef
| 116
|
py
|
Python
|
wrex/data/base_model.py
|
mikiTesf/wrex-py
|
6098e237c75efe0e63a0bea0943d5a2d25a240b8
|
[
"MIT"
] | 1
|
2020-03-20T11:31:58.000Z
|
2020-03-20T11:31:58.000Z
|
wrex/data/base_model.py
|
mikiTesf/wrex-py
|
6098e237c75efe0e63a0bea0943d5a2d25a240b8
|
[
"MIT"
] | null | null | null |
wrex/data/base_model.py
|
mikiTesf/wrex-py
|
6098e237c75efe0e63a0bea0943d5a2d25a240b8
|
[
"MIT"
] | null | null | null |
from wrex.data import db
from peewee import Model
class BaseModel(Model):
class Meta:
database = db
| 11.6
| 24
| 0.681034
| 16
| 116
| 4.9375
| 0.6875
| 0.253165
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.267241
| 116
| 9
| 25
| 12.888889
| 0.929412
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a61b1f3fa971332289a2f48f87a8682a599db047
| 112
|
py
|
Python
|
app/api/graphql.py
|
metamapper-io/metamapper
|
376716e72bcaca62f1ec09ca9a13a0346e5502f9
|
[
"BSD-2-Clause"
] | 3
|
2020-06-14T01:28:39.000Z
|
2020-06-15T23:52:29.000Z
|
app/api/graphql.py
|
metamapper-io/metamapper
|
376716e72bcaca62f1ec09ca9a13a0346e5502f9
|
[
"BSD-2-Clause"
] | null | null | null |
app/api/graphql.py
|
metamapper-io/metamapper
|
376716e72bcaca62f1ec09ca9a13a0346e5502f9
|
[
"BSD-2-Clause"
] | null | null | null |
# -*- coding: utf-8 -*-
# flake8: noqa
from app.api.queries import Query
from app.api.mutations import Mutation
| 22.4
| 38
| 0.723214
| 17
| 112
| 4.764706
| 0.764706
| 0.17284
| 0.246914
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.020833
| 0.142857
| 112
| 4
| 39
| 28
| 0.822917
| 0.303571
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
a6329a2bf31cfb12bca4fe341aa8e0840d703be9
| 73
|
py
|
Python
|
project/cloudmesh/cluster/providers/__init__.py
|
cybertraining-dsc/fa19-516-153
|
e6e3952a74f8a711221ea8e1c461567526267d51
|
[
"Apache-2.0"
] | null | null | null |
project/cloudmesh/cluster/providers/__init__.py
|
cybertraining-dsc/fa19-516-153
|
e6e3952a74f8a711221ea8e1c461567526267d51
|
[
"Apache-2.0"
] | null | null | null |
project/cloudmesh/cluster/providers/__init__.py
|
cybertraining-dsc/fa19-516-153
|
e6e3952a74f8a711221ea8e1c461567526267d51
|
[
"Apache-2.0"
] | 1
|
2019-09-20T02:13:45.000Z
|
2019-09-20T02:13:45.000Z
|
from .kubernetes import KubernetesCluster
from .nomad import NomadCluster
| 36.5
| 41
| 0.876712
| 8
| 73
| 8
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09589
| 73
| 2
| 42
| 36.5
| 0.969697
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a634063e821759c5e1b987cf229722285612e2a9
| 140
|
py
|
Python
|
python/rna-transcription/rna_transcription.py
|
baduker/exercism.io
|
7e1b9ea20aa6f6b0fea947911053cd3e196c0642
|
[
"MIT"
] | null | null | null |
python/rna-transcription/rna_transcription.py
|
baduker/exercism.io
|
7e1b9ea20aa6f6b0fea947911053cd3e196c0642
|
[
"MIT"
] | null | null | null |
python/rna-transcription/rna_transcription.py
|
baduker/exercism.io
|
7e1b9ea20aa6f6b0fea947911053cd3e196c0642
|
[
"MIT"
] | null | null | null |
def to_rna(dna_strand):
d = {"A": "U", "T": "A", "G": "C", "C": "G"}
return ''.join(d.get(nucleotide) for nucleotide in dna_strand)
| 35
| 66
| 0.55
| 24
| 140
| 3.083333
| 0.708333
| 0.243243
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185714
| 140
| 3
| 67
| 46.666667
| 0.649123
| 0
| 0
| 0
| 0
| 0
| 0.057143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 5
|
a647da0ab551801f3962a128f3f412c19add6adc
| 7,213
|
py
|
Python
|
mvpa_itab/script/carlo/episodic_memory/searchlight.py
|
robbisg/mvpa_itab_wu
|
e3cdb198a21349672f601cd34381e0895fa6484c
|
[
"MIT"
] | 1
|
2022-01-12T08:59:22.000Z
|
2022-01-12T08:59:22.000Z
|
mvpa_itab/script/carlo/episodic_memory/searchlight.py
|
robbisg/mvpa_itab_wu
|
e3cdb198a21349672f601cd34381e0895fa6484c
|
[
"MIT"
] | 46
|
2016-08-04T14:49:37.000Z
|
2022-03-09T08:47:48.000Z
|
mvpa_itab/script/carlo/episodic_memory/searchlight.py
|
robbisg/mvpa_itab_wu
|
e3cdb198a21349672f601cd34381e0895fa6484c
|
[
"MIT"
] | null | null | null |
from pyitab.io.loader import DataLoader
from pyitab.preprocessing.pipelines import PreprocessingPipeline
from sklearn.model_selection import *
from pyitab.analysis.searchlight import SearchLight
from sklearn.pipeline import Pipeline
from sklearn.svm.classes import SVC
from pyitab.analysis.iterator import AnalysisIterator
from pyitab.analysis.pipeline import AnalysisPipeline
from pyitab.analysis.configurator import AnalysisConfigurator
import os
from pyitab.utils import enable_logging
root = enable_logging()
conf_file = "/home/carlos/fmri/carlo_ofp/ofp_new.conf"
#conf_file = "/media/robbis/DATA/fmri/carlo_ofp/ofp.conf"
loader = DataLoader(configuration_file=conf_file, task='OFP_NORES')
ds = loader.fetch()
import numpy as np
######################## Across Memory ##################################
_default_options = {
'target_trans__target': ["memory_status"],
}
_default_config = {
'prepro': ['sample_slicer', 'target_trans'],
'sample_slicer__memory_status': ['L', 'F'],
'sample_slicer__evidence': [1],
'target_trans__target': "memory_status",
'estimator': [('clf', SVC(C=1, kernel='linear'))],
'estimator__clf__C': 1,
'estimator__clf__kernel': 'linear',
'cv': LeaveOneGroupOut,
#'cv__n_splits': 50,
#'cv__test_size': 0.25,
'scores': ['accuracy'],
'analysis': SearchLight,
'analysis__n_jobs': 15,
'analysis__permutation': 0,
'analysis__radius': 9,
'analysis__verbose': 0,
'kwargs__cv_attr': 'subject',
}
iterator = AnalysisIterator(_default_options, ScriptConfigurator(**_default_config))
for conf in iterator:
kwargs = conf._get_kwargs()
a = AnalysisPipeline(conf, name="across_memory").fit(ds, **kwargs)
a.save()
################# Across Decision ########################
_default_options = {
'target_trans__target': ["decision"],
}
_default_config = {
'prepro': ['sample_slicer', 'target_trans', 'balancer'],
'sample_slicer__decision': ['L', 'F'],
'sample_slicer__evidence': [1],
'target_trans__target': "decision",
"balancer__attr": 'subject',
'estimator': [('clf', SVC(C=1, kernel='linear'))],
'estimator__clf__C': 1,
'estimator__clf__kernel': 'linear',
'cv': LeaveOneGroupOut,
#'cv__n_splits': 50,
#'cv__test_size': 0.25,
'scores': ['accuracy'],
'analysis': SearchLight,
'analysis__n_jobs': 15,
'analysis__permutation': 0,
'analysis__radius': 9,
'analysis__verbose': 1,
'kwargs__cv_attr': 'subject',
}
iterator = AnalysisIterator(_default_options, ScriptConfigurator(**_default_config))
for conf in iterator:
kwargs = conf._get_kwargs()
a = AnalysisPipeline(conf, name="across_decision").fit(ds, **kwargs)
a.save()
############ Within subjects decision ###############
_default_options = {
'sample_slicer__subject': [[s] for s in np.unique(ds.sa.subject)],
'cv__n_splits': [3, 5]
}
_default_config = {
'prepro': ['sample_slicer', 'target_trans', 'balancer'],
'sample_slicer__decision': ['L', 'F'],
'sample_slicer__evidence': [1],
'target_trans__target': "decision",
"balancer__attr": 'chunks',
'estimator': [('clf', SVC(C=1, kernel='linear'))],
'estimator__clf__C': 1,
'estimator__clf__kernel': 'linear',
'cv': StratifiedKFold,
'cv__n_splits': 3,
#'cv__test_size': 0.25,
'scores': ['accuracy'],
'analysis': SearchLight,
'analysis__n_jobs': 15,
'analysis__permutation': 0,
'analysis__radius': 9,
'analysis__verbose': 0,
'kwargs__cv_attr': 'subject',
}
iterator = AnalysisIterator(_default_options, ScriptConfigurator(**_default_config))
for conf in iterator:
kwargs = conf._get_kwargs()
a = AnalysisPipeline(conf, name="within_decision").fit(ds, **kwargs)
a.save()
############ Within subjects memory ###############
_default_options = {
'sample_slicer__subject': [[s] for s in np.unique(ds.sa.subject)],
'cv__n_splits':[3, 5]
}
_default_config = {
'prepro': ['sample_slicer', 'target_trans', 'balancer'],
'sample_slicer__memory_status': ['L', 'F'],
'sample_slicer__evidence': [1],
'target_trans__target': "memory_status",
"balancer__attr": 'chunks',
'estimator': [('clf', SVC(C=1, kernel='linear'))],
'estimator__clf__C': 1,
'estimator__clf__kernel': 'linear',
'cv': StratifiedKFold,
'cv__n_splits': 3,
#'cv__test_size': 0.25,
'scores': ['accuracy'],
'analysis': SearchLight,
'analysis__n_jobs': 15,
'analysis__permutation': 0,
'analysis__radius': 9,
'analysis__verbose': 0,
'kwargs__cv_attr': 'chunks',
}
iterator = AnalysisIterator(_default_options, ScriptConfigurator(**_default_config))
for conf in iterator:
kwargs = conf._get_kwargs()
a = AnalysisPipeline(conf, name="within_memory").fit(ds, **kwargs)
a.save()
| 35.014563
| 90
| 0.444059
| 548
| 7,213
| 5.421533
| 0.193431
| 0.056547
| 0.034332
| 0.033659
| 0.774823
| 0.749916
| 0.735106
| 0.720969
| 0.695389
| 0.695389
| 0
| 0.013261
| 0.435464
| 7,213
| 206
| 91
| 35.014563
| 0.716356
| 0.037155
| 0
| 0.723577
| 0
| 0
| 0.221928
| 0.066313
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.097561
| 0
| 0.097561
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
a690c38c0d2fac4fa6dff75ea8eb73b1adb90108
| 155
|
py
|
Python
|
python/testData/skeletons/BinaryStandardModule.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2018-12-29T09:53:39.000Z
|
2018-12-29T09:53:42.000Z
|
python/testData/skeletons/BinaryStandardModule.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 173
|
2018-07-05T13:59:39.000Z
|
2018-08-09T01:12:03.000Z
|
python/testData/skeletons/BinaryStandardModule.py
|
jnthn/intellij-community
|
8fa7c8a3ace62400c838e0d5926a7be106aa8557
|
[
"Apache-2.0"
] | 2
|
2020-03-15T08:57:37.000Z
|
2020-04-07T04:48:14.000Z
|
import binascii
import datetime
import <error descr="No module named nonexistent">nonexistent</error>
print(binascii)
print(datetime)
print(nonexistent)
| 17.222222
| 69
| 0.812903
| 19
| 155
| 6.631579
| 0.526316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.096774
| 155
| 8
| 70
| 19.375
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.174194
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 0.5
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 5
|
a6af691b9e01f4b8dec2b12935fbed26ae331857
| 71
|
py
|
Python
|
bioeval/__init__.py
|
savkov/bioeval
|
b8f055ecad47050dc9add9d2df2327bddc639827
|
[
"MIT"
] | 4
|
2015-11-25T09:10:16.000Z
|
2019-06-26T22:08:48.000Z
|
bioeval/__init__.py
|
savkov/bioeval
|
b8f055ecad47050dc9add9d2df2327bddc639827
|
[
"MIT"
] | null | null | null |
bioeval/__init__.py
|
savkov/bioeval
|
b8f055ecad47050dc9add9d2df2327bddc639827
|
[
"MIT"
] | null | null | null |
from bioeval.core import evaluate, evaluate_df, get_ncor # noqa: F401
| 35.5
| 70
| 0.788732
| 11
| 71
| 4.909091
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04918
| 0.140845
| 71
| 1
| 71
| 71
| 0.836066
| 0.140845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
a6b62fea749fe78e528915c2c424f737878de32b
| 211
|
py
|
Python
|
articlestudy/cli/cli.py
|
Jay184/articlestudy
|
48a2ffb8d72baaa1ee28ece1e91fc7b45d8158b9
|
[
"MIT"
] | null | null | null |
articlestudy/cli/cli.py
|
Jay184/articlestudy
|
48a2ffb8d72baaa1ee28ece1e91fc7b45d8158b9
|
[
"MIT"
] | 1
|
2021-07-03T14:11:54.000Z
|
2021-07-03T17:39:06.000Z
|
articlestudy/cli/cli.py
|
Jay184/articlestudy
|
48a2ffb8d72baaa1ee28ece1e91fc7b45d8158b9
|
[
"MIT"
] | null | null | null |
import click
from .articlestudy import commands
@click.group()
def entry_point():
pass
entry_point.add_command(commands.serve)
entry_point.add_command(commands.add)
entry_point.add_command(commands.list)
| 17.583333
| 39
| 0.810427
| 30
| 211
| 5.466667
| 0.466667
| 0.243902
| 0.237805
| 0.365854
| 0.512195
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.094787
| 211
| 11
| 40
| 19.181818
| 0.858639
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| true
| 0.125
| 0.25
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
a6ec79e07c8ec5667977f1b89dbdd810b183f34c
| 59
|
py
|
Python
|
cargan/preprocess/__init__.py
|
mdc202002/cargan
|
5bfb44a1d8c2de8126e8053bed6078ad2e20819c
|
[
"MIT"
] | 72
|
2021-10-20T01:17:54.000Z
|
2022-02-22T07:40:35.000Z
|
cargan/preprocess/__init__.py
|
mdc202002/cargan
|
5bfb44a1d8c2de8126e8053bed6078ad2e20819c
|
[
"MIT"
] | 7
|
2021-10-21T21:44:00.000Z
|
2022-03-17T18:24:42.000Z
|
cargan/preprocess/__init__.py
|
mdc202002/cargan
|
5bfb44a1d8c2de8126e8053bed6078ad2e20819c
|
[
"MIT"
] | 16
|
2021-10-20T02:07:46.000Z
|
2022-03-16T08:18:37.000Z
|
from .core import *
from . import mels
from . import pitch
| 14.75
| 19
| 0.728814
| 9
| 59
| 4.777778
| 0.555556
| 0.465116
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.20339
| 59
| 3
| 20
| 19.666667
| 0.914894
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
4719056d000bee86e6581e7aa998417ba1ac7aee
| 35
|
py
|
Python
|
plugins/mod_chatter/__init__.py
|
StarryPy/StarryPy-Historic
|
b9dbd552b8c4631a5a8e9dda98b7ba447eca59da
|
[
"WTFPL"
] | 38
|
2015-02-12T11:57:59.000Z
|
2018-11-15T16:03:45.000Z
|
plugins/mod_chatter/__init__.py
|
StarryPy/StarryPy-Historic
|
b9dbd552b8c4631a5a8e9dda98b7ba447eca59da
|
[
"WTFPL"
] | 68
|
2015-02-05T23:29:47.000Z
|
2017-12-27T08:26:25.000Z
|
plugins/mod_chatter/__init__.py
|
StarryPy/StarryPy-Historic
|
b9dbd552b8c4631a5a8e9dda98b7ba447eca59da
|
[
"WTFPL"
] | 21
|
2015-02-06T18:58:21.000Z
|
2017-12-24T20:08:59.000Z
|
from mod_chatter import ModChatter
| 17.5
| 34
| 0.885714
| 5
| 35
| 6
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 35
| 1
| 35
| 35
| 0.967742
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
472e9fb567932e7a9021ee1d1e3dd6bc267c6bb2
| 215
|
py
|
Python
|
crawlers/weboob-crawler/weboobCrawler/capabilities/__init__.py
|
Phyks/medonay
|
742e7aac18c7dd7935cca528a6083af88fb64e53
|
[
"MIT"
] | 1
|
2018-07-27T12:42:14.000Z
|
2018-07-27T12:42:14.000Z
|
crawlers/weboob-crawler/weboobCrawler/capabilities/__init__.py
|
Phyks/medonay
|
742e7aac18c7dd7935cca528a6083af88fb64e53
|
[
"MIT"
] | 9
|
2018-04-06T19:24:38.000Z
|
2018-05-31T12:39:19.000Z
|
crawlers/weboob-crawler/weboobCrawler/capabilities/__init__.py
|
Phyks/medonay
|
742e7aac18c7dd7935cca528a6083af88fb64e53
|
[
"MIT"
] | null | null | null |
from weboobCrawler.capabilities import CapDocument
from weboobCrawler.capabilities import CapCalendarEvent
SUPPORTED_CAPS = {
'CapDocument': CapDocument.fetch,
'CapCalendarEvent': CapCalendarEvent.fetch,
}
| 26.875
| 55
| 0.813953
| 18
| 215
| 9.666667
| 0.5
| 0.195402
| 0.333333
| 0.402299
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116279
| 215
| 7
| 56
| 30.714286
| 0.915789
| 0
| 0
| 0
| 0
| 0
| 0.125581
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 1
| 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
| 1
| 0
| 0
| 0
|
0
| 5
|
5b82a620f229ca4c46bdd134203a33a00bb20144
| 7,189
|
py
|
Python
|
test/PR_test/integration_test/op/tensorop/model/test_modelop.py
|
DwijayDS/fastestimator
|
9b288cb2bd870f971ec4cee09d0b3205e1316a94
|
[
"Apache-2.0"
] | 57
|
2019-05-21T21:29:26.000Z
|
2022-02-23T05:55:21.000Z
|
test/PR_test/integration_test/op/tensorop/model/test_modelop.py
|
vbvg2008/fastestimator
|
6061a4fbbeb62a2194ef82ba8017f651710d0c65
|
[
"Apache-2.0"
] | 93
|
2019-05-23T18:36:07.000Z
|
2022-03-23T17:15:55.000Z
|
test/PR_test/integration_test/op/tensorop/model/test_modelop.py
|
vbvg2008/fastestimator
|
6061a4fbbeb62a2194ef82ba8017f651710d0c65
|
[
"Apache-2.0"
] | 47
|
2019-05-09T15:41:37.000Z
|
2022-03-26T17:00:08.000Z
|
# Copyright 2020 The FastEstimator Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
import unittest
import numpy as np
import tensorflow as tf
import torch
import fastestimator as fe
from fastestimator.op.tensorop.model import ModelOp
from fastestimator.test.unittest_util import OneLayerTorchModel, is_equal, one_layer_tf_model, multi_layer_tf_model, \
MultiLayerTorchModel
class TestModelOp(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.state = {'mode': 'train', 'epoch': 1}
cls.tf_input_data = tf.constant([[1.0, 1.0, 1.0], [1.0, -1.0, -0.5]])
cls.torch_input_data = torch.Tensor([[1.0, 1.0, 1.0], [1.0, -1.0, -0.5]])
cls.output = np.array([[6.0], [-2.5]])
# Big inputs
cls.tf_input_data_big = tf.constant([[1.0, 1.0, 1.0, 1.0], [0.6, -0.5, -0.8, 1.2]])
cls.torch_input_data_big = torch.Tensor([[1.0, 1.0, 1.0, 1.0], [0.6, -0.5, -0.8, 1.2]])
cls.output_big = np.array([[40.0], [9.4]])
cls.embedding_output = np.array([[10.0, 15.0], [2.0, 3.7]])
def test_tf_input(self):
model = fe.build(model_fn=one_layer_tf_model, optimizer_fn="adam")
op = ModelOp(inputs='x', outputs='x', model=model)
op.build(framework='tf', device=None)
with self.subTest("Eager"):
output = op.forward(data=self.tf_input_data, state=self.state)
self.assertTrue(is_equal(output.numpy(), self.output))
forward_fn = tf.function(op.forward)
with self.subTest("Static Call 1"):
output = forward_fn(data=self.tf_input_data, state=self.state)
self.assertTrue(is_equal(output.numpy(), self.output))
with self.subTest("Static Call 2"):
output = forward_fn(data=self.tf_input_data, state=self.state)
self.assertTrue(is_equal(output.numpy(), self.output))
def test_tf_multi_output_str(self):
model = fe.build(model_fn=multi_layer_tf_model, optimizer_fn="adam")
op = ModelOp(inputs='x', outputs=['y', 'embedding'], model=model, intermediate_layers='fc1')
op.build(framework='tf', device=None)
with self.subTest("Eager"):
y, embedding = op.forward(data=self.tf_input_data_big, state=self.state)
self.assertTrue(np.allclose(y.numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.numpy(), self.embedding_output, atol=1e-4))
forward_fn = tf.function(op.forward)
with self.subTest("Static Call 1"):
y, embedding = forward_fn(data=self.tf_input_data_big, state=self.state)
self.assertTrue(np.allclose(y.numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.numpy(), self.embedding_output, atol=1e-4))
with self.subTest("Static Call 2"):
y, embedding = forward_fn(data=self.tf_input_data_big, state=self.state)
self.assertTrue(np.allclose(y.numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.numpy(), self.embedding_output, atol=1e-4))
def test_tf_multi_output_int(self):
model = fe.build(model_fn=multi_layer_tf_model, optimizer_fn="adam")
op = ModelOp(inputs='x', outputs=['y', 'embedding'], model=model, intermediate_layers=1)
op.build(framework='tf', device=None)
with self.subTest("Eager"):
y, embedding = op.forward(data=self.tf_input_data_big, state=self.state)
self.assertTrue(np.allclose(y.numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.numpy(), self.embedding_output, atol=1e-4))
forward_fn = tf.function(op.forward)
with self.subTest("Static Call 1"):
y, embedding = forward_fn(data=self.tf_input_data_big, state=self.state)
self.assertTrue(np.allclose(y.numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.numpy(), self.embedding_output, atol=1e-4))
with self.subTest("Static Call 2"):
y, embedding = forward_fn(data=self.tf_input_data_big, state=self.state)
self.assertTrue(np.allclose(y.numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.numpy(), self.embedding_output, atol=1e-4))
def test_torch_input(self):
model = fe.build(model_fn=OneLayerTorchModel, optimizer_fn="adam")
self.torch_input_data = self.torch_input_data.to("cuda:0" if torch.cuda.is_available() else "cpu")
model.to("cuda:0" if torch.cuda.is_available() else "cpu")
op = ModelOp(inputs='x', outputs='x', model=model)
op.build(framework='torch', device=torch.device("cuda:0" if torch.cuda.is_available() else "cpu"))
output = op.forward(data=self.torch_input_data, state=self.state)
output = output.to("cpu")
self.assertTrue(is_equal(output.detach().numpy(), self.output))
def test_torch_multi_output_str(self):
model = fe.build(model_fn=MultiLayerTorchModel, optimizer_fn="adam")
self.torch_input_data_big = self.torch_input_data_big.to("cuda:0" if torch.cuda.is_available() else "cpu")
model.to("cuda:0" if torch.cuda.is_available() else "cpu")
op = ModelOp(inputs='x', outputs=['y', 'embedding'], model=model, intermediate_layers='fc1')
op.build(framework='torch', device=torch.device("cuda:0" if torch.cuda.is_available() else "cpu"))
y, embedding = op.forward(data=self.torch_input_data_big, state=self.state)
y = y.to("cpu")
embedding = embedding.to('cpu')
self.assertTrue(np.allclose(y.detach().numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.detach().numpy(), self.embedding_output, atol=1e-4))
def test_torch_multi_output_int(self):
model = fe.build(model_fn=MultiLayerTorchModel, optimizer_fn="adam")
self.torch_input_data_big = self.torch_input_data_big.to("cuda:0" if torch.cuda.is_available() else "cpu")
model.to("cuda:0" if torch.cuda.is_available() else "cpu")
op = ModelOp(inputs='x', outputs=['y', 'embedding'], model=model, intermediate_layers=1)
op.build(framework='torch', device=torch.device("cuda:0" if torch.cuda.is_available() else "cpu"))
y, embedding = op.forward(data=self.torch_input_data_big, state=self.state)
y = y.to("cpu")
embedding = embedding.to('cpu')
self.assertTrue(np.allclose(y.detach().numpy(), self.output_big, atol=1e-4))
self.assertTrue(np.allclose(embedding.detach().numpy(), self.embedding_output, atol=1e-4))
| 57.975806
| 118
| 0.66254
| 1,048
| 7,189
| 4.400763
| 0.14313
| 0.042931
| 0.055507
| 0.083261
| 0.784909
| 0.761275
| 0.755637
| 0.727667
| 0.727667
| 0.715525
| 0
| 0.022909
| 0.180275
| 7,189
| 123
| 119
| 58.447154
| 0.759715
| 0.093754
| 0
| 0.673469
| 0
| 0
| 0.046469
| 0
| 0
| 0
| 0
| 0
| 0.204082
| 1
| 0.071429
| false
| 0
| 0.071429
| 0
| 0.153061
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
5bf7a8469741e91cd384c0f0039bf7d0836b5948
| 409
|
py
|
Python
|
aispace/datasets/data_transformers/__init__.py
|
SmileGoat/AiSpace
|
35fc120667e4263c99b300815e0bf018f5064a40
|
[
"Apache-2.0"
] | 32
|
2020-01-16T07:59:03.000Z
|
2022-03-31T09:24:00.000Z
|
aispace/datasets/data_transformers/__init__.py
|
SmileGoat/AiSpace
|
35fc120667e4263c99b300815e0bf018f5064a40
|
[
"Apache-2.0"
] | 9
|
2020-06-05T03:27:06.000Z
|
2022-03-12T01:00:17.000Z
|
aispace/datasets/data_transformers/__init__.py
|
SmileGoat/AiSpace
|
35fc120667e4263c99b300815e0bf018f5064a40
|
[
"Apache-2.0"
] | 3
|
2020-06-09T02:22:50.000Z
|
2021-07-19T06:07:07.000Z
|
# -*- coding: utf-8 -*-
# @Time : 2020-01-10 15:41
# @Author : yingyuankai
# @Email : yingyuankai@aliyun.com
# @File : __init__.py
from .clue_transformer import *
from .base_transformer import BaseTransformer
from .duee_transformer import DuEETriggerTransformer
from .dureader_transformer import *
from .ewn_transformer import *
from .gov_title_transformer import *
from .idiom_transformer import *
| 29.214286
| 52
| 0.757946
| 49
| 409
| 6.081633
| 0.612245
| 0.399329
| 0.281879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.037249
| 0.146699
| 409
| 14
| 53
| 29.214286
| 0.816619
| 0.315403
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
5bfff52394f4ac43cfc2fcafd75300432d2466c7
| 77
|
py
|
Python
|
ujopendata/kma/__init__.py
|
uujei/ujopendata
|
876e1d36ae468291473325f8b71b9ceb03b4dce3
|
[
"MIT"
] | null | null | null |
ujopendata/kma/__init__.py
|
uujei/ujopendata
|
876e1d36ae468291473325f8b71b9ceb03b4dce3
|
[
"MIT"
] | null | null | null |
ujopendata/kma/__init__.py
|
uujei/ujopendata
|
876e1d36ae468291473325f8b71b9ceb03b4dce3
|
[
"MIT"
] | null | null | null |
from .VilageFcstInfoService_2_0 import *
from .AsosHourlyInfoService import *
| 38.5
| 40
| 0.857143
| 8
| 77
| 8
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028571
| 0.090909
| 77
| 2
| 41
| 38.5
| 0.885714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
754a5886907fc70aa0a07b47afe40a099489f0da
| 4,995
|
py
|
Python
|
tests/integration/mongodb/factory/exctnt.py
|
RaenonX/Jelly-Bot-API
|
c7da1e91783dce3a2b71b955b3a22b68db9056cf
|
[
"MIT"
] | 5
|
2020-08-26T20:12:00.000Z
|
2020-12-11T16:39:22.000Z
|
tests/integration/mongodb/factory/exctnt.py
|
RaenonX/Jelly-Bot
|
c7da1e91783dce3a2b71b955b3a22b68db9056cf
|
[
"MIT"
] | 234
|
2019-12-14T03:45:19.000Z
|
2020-08-26T18:55:19.000Z
|
tests/integration/mongodb/factory/exctnt.py
|
RaenonX/Jelly-Bot-API
|
c7da1e91783dce3a2b71b955b3a22b68db9056cf
|
[
"MIT"
] | 2
|
2019-10-23T15:21:15.000Z
|
2020-05-22T09:35:55.000Z
|
from bson import ObjectId
from extutils.dt import now_utc_aware
from flags import ExtraContentType
from models import ExtraContentModel
from mongodb.factory.exctnt import ExtraContentManager
from mongodb.factory.results import WriteOutcome
from tests.base import TestDatabaseMixin, TestModelMixin, TestTimeComparisonMixin
from strres.msghandle import ToSiteReason
__all__ = ["TestExtraContentManager"]
class TestExtraContentManager(TestModelMixin, TestTimeComparisonMixin, TestDatabaseMixin):
CHANNEL_OID = ObjectId()
@staticmethod
def obj_to_clear():
return [ExtraContentManager]
def test_rec_extra_message(self):
rec_time = now_utc_aware(for_mongo=True)
result = ExtraContentManager.record_extra_message(self.CHANNEL_OID, [(ToSiteReason.FORCED_ONSITE, "A")], "T")
self.assertEqual(result.outcome, WriteOutcome.O_INSERTED)
self.assertTrue(result.success)
self.assertIsNone(result.exception)
self.assertModelEqual(
result.model,
ExtraContentModel(Type=ExtraContentType.EXTRA_MESSAGE, Title="T",
Content=[(str(ToSiteReason.FORCED_ONSITE), "A")],
Timestamp=result.model.timestamp, ChannelOid=self.CHANNEL_OID))
self.assertTimeDifferenceLessEqual(result.model.timestamp, rec_time, 2)
def test_rec_no_title(self):
rec_time = now_utc_aware(for_mongo=True)
result = ExtraContentManager.record_content(ExtraContentType.EXTRA_MESSAGE, self.CHANNEL_OID,
[(str(ToSiteReason.FORCED_ONSITE), "A")], "T")
self.assertEqual(result.outcome, WriteOutcome.O_INSERTED)
self.assertTrue(result.success)
self.assertIsNone(result.exception)
self.assertModelEqual(
result.model,
ExtraContentModel(Type=ExtraContentType.EXTRA_MESSAGE, Title="T",
Content=[(str(ToSiteReason.FORCED_ONSITE), "A")],
Timestamp=result.model.timestamp, ChannelOid=self.CHANNEL_OID))
self.assertTimeDifferenceLessEqual(result.model.timestamp, rec_time, 2)
def test_rec_no_content(self):
result = ExtraContentManager.record_content(ExtraContentType.EXTRA_MESSAGE, self.CHANNEL_OID, [], "T")
self.assertEqual(result.outcome, WriteOutcome.X_EMPTY_CONTENT)
self.assertFalse(result.success)
self.assertIsNone(result.exception)
self.assertIsNone(result.model)
def test_rec_content_pure_text(self):
rec_time = now_utc_aware(for_mongo=True)
result = ExtraContentManager.record_content(ExtraContentType.PURE_TEXT, self.CHANNEL_OID, "ABCDE", "T")
self.assertEqual(result.outcome, WriteOutcome.O_INSERTED)
self.assertTrue(result.success)
self.assertIsNone(result.exception)
self.assertModelEqual(
result.model,
ExtraContentModel(Type=ExtraContentType.PURE_TEXT, Title="T", Content="ABCDE",
Timestamp=result.model.timestamp, ChannelOid=self.CHANNEL_OID))
self.assertTimeDifferenceLessEqual(result.model.timestamp, rec_time, 2)
def test_rec_content_ex_message(self):
rec_time = now_utc_aware(for_mongo=True)
result = ExtraContentManager.record_content(ExtraContentType.EXTRA_MESSAGE, self.CHANNEL_OID,
[(str(ToSiteReason.FORCED_ONSITE), "A")], "T")
self.assertEqual(result.outcome, WriteOutcome.O_INSERTED)
self.assertTrue(result.success)
self.assertIsNone(result.exception)
self.assertModelEqual(
result.model,
ExtraContentModel(Type=ExtraContentType.EXTRA_MESSAGE, Title="T",
Content=[(str(ToSiteReason.FORCED_ONSITE), "A")],
Timestamp=result.model.timestamp, ChannelOid=self.CHANNEL_OID))
self.assertTimeDifferenceLessEqual(result.model.timestamp, rec_time, 2)
def test_rec_ar_search(self):
ar_oids = [ObjectId(), ObjectId()]
rec_time = now_utc_aware(for_mongo=True)
result = ExtraContentManager.record_content(ExtraContentType.AUTO_REPLY_SEARCH, self.CHANNEL_OID, ar_oids, "T")
self.assertEqual(result.outcome, WriteOutcome.O_INSERTED)
self.assertTrue(result.success)
self.assertIsNone(result.exception)
self.assertModelEqual(
result.model,
ExtraContentModel(Type=ExtraContentType.AUTO_REPLY_SEARCH, Title="T", Content=ar_oids,
Timestamp=result.model.timestamp, ChannelOid=self.CHANNEL_OID))
self.assertTimeDifferenceLessEqual(result.model.timestamp, rec_time, 2)
def test_get_content(self):
result = ExtraContentManager.record_content(ExtraContentType.PURE_TEXT, self.CHANNEL_OID, "ABCDE", "T")
self.assertEqual(ExtraContentManager.get_content(result.model_id), result.model)
| 47.571429
| 119
| 0.691291
| 505
| 4,995
| 6.625743
| 0.170297
| 0.059175
| 0.050209
| 0.04483
| 0.765392
| 0.757621
| 0.745368
| 0.724447
| 0.724447
| 0.724447
| 0
| 0.001278
| 0.216617
| 4,995
| 104
| 120
| 48.028846
| 0.853821
| 0
| 0
| 0.630952
| 0
| 0
| 0.011211
| 0.004605
| 0
| 0
| 0
| 0
| 0.357143
| 1
| 0.095238
| false
| 0
| 0.095238
| 0.011905
| 0.22619
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
f347fdc3a1431e868f7634d39e370433f712c0ef
| 41
|
py
|
Python
|
tests/__init__.py
|
knoxilla/siws_doodad
|
cd65f84c5bbe17a96366d07e39bc9bf278efa3e7
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
knoxilla/siws_doodad
|
cd65f84c5bbe17a96366d07e39bc9bf278efa3e7
|
[
"MIT"
] | null | null | null |
tests/__init__.py
|
knoxilla/siws_doodad
|
cd65f84c5bbe17a96366d07e39bc9bf278efa3e7
|
[
"MIT"
] | null | null | null |
"""Unit test package for siws_doodad."""
| 20.5
| 40
| 0.707317
| 6
| 41
| 4.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121951
| 41
| 1
| 41
| 41
| 0.777778
| 0.829268
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f3502e8c2dd064fce02d443b3f493aa5ef04dbc2
| 1,367
|
py
|
Python
|
python/anyascii/_data/_0c9.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_0c9.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
python/anyascii/_data/_0c9.py
|
casept/anyascii
|
d4f426b91751254b68eaa84c6cd23099edd668e6
|
[
"ISC"
] | null | null | null |
b='Jun Junj Junh Jud Jul Julg Julm Julb Juls Jult Julp Julh Jum Jub Jubs Jus Juss Jung Juj Juch Juk Jut Jup Juh Jwo Jwog Jwokk Jwogs Jwon Jwonj Jwonh Jwod Jwol Jwolg Jwolm Jwolb Jwols Jwolt Jwolp Jwolh Jwom Jwob Jwobs Jwos Jwoss Jwong Jwoj Jwoch Jwok Jwot Jwop Jwoh Jwe Jweg Jwekk Jwegs Jwen Jwenj Jwenh Jwed Jwel Jwelg Jwelm Jwelb Jwels Jwelt Jwelp Jwelh Jwem Jweb Jwebs Jwes Jwess Jweng Jwej Jwech Jwek Jwet Jwep Jweh Jwi Jwig Jwikk Jwigs Jwin Jwinj Jwinh Jwid Jwil Jwilg Jwilm Jwilb Jwils Jwilt Jwilp Jwilh Jwim Jwib Jwibs Jwis Jwiss Jwing Jwij Jwich Jwik Jwit Jwip Jwih Jyu Jyug Jyukk Jyugs Jyun Jyunj Jyunh Jyud Jyul Jyulg Jyulm Jyulb Jyuls Jyult Jyulp Jyulh Jyum Jyub Jyubs Jyus Jyuss Jyung Jyuj Jyuch Jyuk Jyut Jyup Jyuh Jeu Jeug Jeukk Jeugs Jeun Jeunj Jeunh Jeud Jeul Jeulg Jeulm Jeulb Jeuls Jeult Jeulp Jeulh Jeum Jeub Jeubs Jeus Jeuss Jeung Jeuj Jeuch Jeuk Jeut Jeup Jeuh Jui Juig Juikk Juigs Juin Juinj Juinh Juid Juil Juilg Juilm Juilb Juils Juilt Juilp Juilh Juim Juib Juibs Juis Juiss Juing Juij Juich Juik Juit Juip Juih Ji Jig Jikk Jigs Jin Jinj Jinh Jid Jil Jilg Jilm Jilb Jils Jilt Jilp Jilh Jim Jib Jibs Jis Jiss Jing Jij Jich Jik Jit Jip Jih Jja Jjag Jjakk Jjags Jjan Jjanj Jjanh Jjad Jjal Jjalg Jjalm Jjalb Jjals Jjalt Jjalp Jjalh Jjam Jjab Jjabs Jjas Jjass Jjang Jjaj Jjach Jjak Jjat Jjap Jjah Jjae Jjaeg Jjaekk Jjaegs Jjaen Jjaenj Jjaenh Jjaed'
| 1,367
| 1,367
| 0.811266
| 257
| 1,367
| 4.315175
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.18654
| 1,367
| 1
| 1,367
| 1,367
| 0.997302
| 0
| 0
| 0
| 0
| 1
| 0.996345
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f363cad5037fa3282d9d9755ef493c461fa61dd7
| 6,740
|
py
|
Python
|
procurement_portal/records/migrations/0001_initial.py
|
rikusv/procurement-portal-backend
|
a00eb1d9d9da7737a84d9c495db0f59b26839157
|
[
"MIT"
] | null | null | null |
procurement_portal/records/migrations/0001_initial.py
|
rikusv/procurement-portal-backend
|
a00eb1d9d9da7737a84d9c495db0f59b26839157
|
[
"MIT"
] | 19
|
2020-09-18T17:10:55.000Z
|
2020-10-18T09:54:16.000Z
|
procurement_portal/records/migrations/0001_initial.py
|
rikusv/procurement-portal-backend
|
a00eb1d9d9da7737a84d9c495db0f59b26839157
|
[
"MIT"
] | 2
|
2020-10-21T17:58:44.000Z
|
2022-02-13T17:21:22.000Z
|
# Generated by Django 2.2.16 on 2020-09-13 11:31
import django.db.models.deletion
import django_extensions.db.fields
from django.db import migrations, models
import procurement_portal.records.models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Dataset",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"created",
django_extensions.db.fields.CreationDateTimeField(
auto_now_add=True, verbose_name="created"
),
),
(
"modified",
django_extensions.db.fields.ModificationDateTimeField(
auto_now=True, verbose_name="modified"
),
),
("name", models.CharField(max_length=250)),
("description", models.TextField()),
("provenance", models.TextField()),
(
"online_source_url",
models.URLField(blank=True, max_length=300, null=True),
),
(
"trusted_archive_url",
models.URLField(blank=True, max_length=300, null=True),
),
("enabled", models.BooleanField(default=True)),
],
options={
"ordering": ("-modified", "-created"),
"get_latest_by": "modified",
"abstract": False,
},
),
migrations.CreateModel(
name="DatasetVersion",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"created",
django_extensions.db.fields.CreationDateTimeField(
auto_now_add=True, verbose_name="created"
),
),
(
"modified",
django_extensions.db.fields.ModificationDateTimeField(
auto_now=True, verbose_name="modified"
),
),
("description", models.TextField()),
(
"file",
models.FileField(
upload_to=procurement_portal.records.models.file_path
),
),
(
"dataset",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="records.Dataset",
),
),
],
options={
"ordering": ("-modified", "-created"),
"get_latest_by": "modified",
"abstract": False,
},
),
migrations.CreateModel(
name="Repository",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"created",
django_extensions.db.fields.CreationDateTimeField(
auto_now_add=True, verbose_name="created"
),
),
(
"modified",
django_extensions.db.fields.ModificationDateTimeField(
auto_now=True, verbose_name="modified"
),
),
("name", models.CharField(max_length=250)),
("description", models.TextField()),
],
options={
"ordering": ("-modified", "-created"),
"get_latest_by": "modified",
"abstract": False,
},
),
migrations.CreateModel(
name="PurchaseRecord",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"created",
django_extensions.db.fields.CreationDateTimeField(
auto_now_add=True, verbose_name="created"
),
),
(
"modified",
django_extensions.db.fields.ModificationDateTimeField(
auto_now=True, verbose_name="modified"
),
),
("supplier_name", models.CharField(max_length=500)),
(
"amount",
models.DecimalField(
blank=True, decimal_places=2, max_digits=20, null=True
),
),
(
"dataset_version",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="records.DatasetVersion",
),
),
],
options={
"ordering": ("-modified", "-created"),
"get_latest_by": "modified",
"abstract": False,
},
),
migrations.AddField(
model_name="dataset",
name="current_version",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to="records.DatasetVersion",
),
),
migrations.AddField(
model_name="dataset",
name="repository",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="records.Repository"
),
),
]
| 33.366337
| 84
| 0.391246
| 415
| 6,740
| 6.175904
| 0.226506
| 0.051502
| 0.063207
| 0.084276
| 0.724151
| 0.713227
| 0.687476
| 0.673039
| 0.673039
| 0.673039
| 0
| 0.010372
| 0.51365
| 6,740
| 201
| 85
| 33.532338
| 0.771507
| 0.006825
| 0
| 0.715026
| 1
| 0
| 0.097579
| 0.006575
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.020725
| 0
| 0.041451
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f36596ac37ae5bf4dd8e5540c9eccb37d843c6ec
| 90
|
py
|
Python
|
Check Strict Superset.py
|
jibinmathew691993/PythonHackerrank
|
14ab5b620435a006d5ccff17536bc01acd7c22dc
|
[
"MIT"
] | null | null | null |
Check Strict Superset.py
|
jibinmathew691993/PythonHackerrank
|
14ab5b620435a006d5ccff17536bc01acd7c22dc
|
[
"MIT"
] | null | null | null |
Check Strict Superset.py
|
jibinmathew691993/PythonHackerrank
|
14ab5b620435a006d5ccff17536bc01acd7c22dc
|
[
"MIT"
] | null | null | null |
A = set(input().split())
print(all(A>set(input().split()) for _ in range(int(input()))))
| 22.5
| 63
| 0.611111
| 15
| 90
| 3.6
| 0.666667
| 0.148148
| 0.333333
| 0.518519
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.1
| 90
| 3
| 64
| 30
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 1
| 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
| 1
|
0
| 5
|
f36f9eec770a0411382cdbcb294f3c92be6e0b27
| 2,001
|
py
|
Python
|
tests/simple_search_test.py
|
irina-voropaeva/python-selenium-automation
|
d23d2b1ad6bf2af60f6495e190de67c3a353b5ba
|
[
"MIT"
] | 1
|
2020-08-26T18:10:23.000Z
|
2020-08-26T18:10:23.000Z
|
tests/simple_search_test.py
|
irina-voropaeva/python-selenium-automation
|
d23d2b1ad6bf2af60f6495e190de67c3a353b5ba
|
[
"MIT"
] | null | null | null |
tests/simple_search_test.py
|
irina-voropaeva/python-selenium-automation
|
d23d2b1ad6bf2af60f6495e190de67c3a353b5ba
|
[
"MIT"
] | null | null | null |
import inspect
from tests.BaseTest import BaseTest
class TestSimpleSearch(BaseTest):
def test_search_with_entered_job_default_city(self):
self.config.log().info(inspect.currentframe().f_code.co_name + " test started")
search_text = "qa engineer"
self.config.log().info("hello from test")
self.search_block\
.enter_job(search_text)\
.click_on_the_search_button()
assert search_text in self.driver.title
def test_search_with_empty_job_and_default_city(self):
self.config.log().info(inspect.currentframe().f_code.co_name + " test started")
self.search_block\
.click_on_the_search_button()
assert self.search_block.is_title_for_empty_job_and_default_city_correct() is True
def test_search_with_empty_job_and_choosed_kherson_city(self):
self.config.log().info(inspect.currentframe().f_code.co_name + " test started")
self.search_block\
.click_city_field()\
.choose_city_kherson()\
.click_on_the_search_button()
assert self.search_block.is_title_for_empty_job_and_kherson_city_correct() is True
def test_search_with_empty_both_fields(self):
self.config.log().info(inspect.currentframe().f_code.co_name + " test started")
self.search_block\
.click_city_field()\
.click_city_field_clear_button()\
.click_on_the_search_button()
assert self.search_block.is_title_for_empty_job_and_city_correct() is True
def test_search_with_empty_job_and_entered_kherson_city(self):
self.config.log().info(inspect.currentframe().f_code.co_name + " test started")
city = "Херсон"
self.search_block\
.click_city_field()\
.click_city_field_clear_button()\
.enter_city(city)\
.click_on_the_search_button()
assert self.search_block.is_title_for_empty_job_and_kherson_city_correct() is False
| 32.803279
| 91
| 0.692154
| 267
| 2,001
| 4.719101
| 0.202247
| 0.071429
| 0.107143
| 0.080952
| 0.778571
| 0.773016
| 0.750794
| 0.728571
| 0.728571
| 0.707937
| 0
| 0
| 0.215892
| 2,001
| 60
| 92
| 33.35
| 0.803059
| 0
| 0
| 0.512821
| 0
| 0
| 0.048549
| 0
| 0
| 0
| 0
| 0
| 0.128205
| 1
| 0.128205
| false
| 0
| 0.051282
| 0
| 0.205128
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
f37262a9f62c7638f7964cb13e9d070b9ee95d3a
| 42
|
py
|
Python
|
pydesktime/__init__.py
|
utek/pydesktime
|
69563b66034920fb1f7f6c16f2ddaee82c92f5d0
|
[
"MIT"
] | null | null | null |
pydesktime/__init__.py
|
utek/pydesktime
|
69563b66034920fb1f7f6c16f2ddaee82c92f5d0
|
[
"MIT"
] | null | null | null |
pydesktime/__init__.py
|
utek/pydesktime
|
69563b66034920fb1f7f6c16f2ddaee82c92f5d0
|
[
"MIT"
] | null | null | null |
from pydesktime.desktime import DeskTime
| 21
| 41
| 0.857143
| 5
| 42
| 7.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.119048
| 42
| 1
| 42
| 42
| 0.972973
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
f380d23a502407ea0051078aa791fa1901cdc1f5
| 47
|
py
|
Python
|
tests/__init__.py
|
winni2k/streaming_pileupy
|
a82bd216af6ccc7b35dee88960a505a5b95b2bba
|
[
"MIT"
] | 2
|
2020-05-07T07:30:24.000Z
|
2020-05-07T13:01:53.000Z
|
tests/__init__.py
|
winni2k/streaming_pileupy
|
a82bd216af6ccc7b35dee88960a505a5b95b2bba
|
[
"MIT"
] | 7
|
2020-05-05T13:16:29.000Z
|
2021-02-20T12:52:03.000Z
|
tests/__init__.py
|
winni2k/streaming_pileupy
|
a82bd216af6ccc7b35dee88960a505a5b95b2bba
|
[
"MIT"
] | null | null | null |
"""Unit test package for streaming_pileupy."""
| 23.5
| 46
| 0.744681
| 6
| 47
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106383
| 47
| 1
| 47
| 47
| 0.809524
| 0.851064
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 5
|
f3c0deb5daeda995e1ae763826cb49329b0ffe33
| 4,258
|
py
|
Python
|
hucrl/environment/mujoco/half_cheetah.py
|
lioritan/hucrl
|
fb5b3aea0edf69a4169ab79d2908918111fc6072
|
[
"MIT"
] | 24
|
2020-12-05T20:10:27.000Z
|
2022-03-25T10:00:51.000Z
|
hucrl/environment/mujoco/half_cheetah.py
|
lioritan/hucrl
|
fb5b3aea0edf69a4169ab79d2908918111fc6072
|
[
"MIT"
] | 3
|
2021-02-04T10:07:30.000Z
|
2021-06-02T15:25:18.000Z
|
hucrl/environment/mujoco/half_cheetah.py
|
lioritan/hucrl
|
fb5b3aea0edf69a4169ab79d2908918111fc6072
|
[
"MIT"
] | 4
|
2021-04-04T12:36:40.000Z
|
2022-03-26T10:37:55.000Z
|
"""Half Cheetah CartPole environment from https://github.com/kchua/handful-of-trials."""
import os
import numpy as np
from gym import utils
try:
from gym.envs.mujoco import mujoco_env
class HalfCheetahEnv(mujoco_env.MujocoEnv, utils.EzPickle):
"""Half Cheetah environment for MBRL control.
References
----------
Chua, K., Calandra, R., McAllister, R., & Levine, S. (2018).
Deep reinforcement learning in a handful of trials using probabilistic dynamics
models. NeuRIPS.
https://github.com/kchua/handful-of-trials
"""
def __init__(self, action_cost=0.1):
self.action_cost = action_cost
self.prev_qpos = np.array([0])
dir_path = os.path.dirname(os.path.realpath(__file__))
mujoco_env.MujocoEnv.__init__(
self, f"{dir_path}/assets/half_cheetah.xml", 5
)
utils.EzPickle.__init__(self)
self.reset_model()
def step(self, action: np.ndarray):
"""See `AbstractEnvironment.step()'."""
self.prev_qpos = np.copy(self.sim.data.qpos.flat)
self.do_simulation(action, self.frame_skip)
ob = self._get_obs()
reward_ctrl = -np.square(action).sum()
reward_run = (ob[0] - self.prev_qpos[0]) / self.dt
reward = reward_run + self.action_cost * reward_ctrl
done = False
return (
ob,
reward,
done,
dict(reward_run=reward_run, reward_ctrl=self.action_cost * reward_ctrl),
)
def _get_obs(self):
return np.concatenate([self.sim.data.qpos.flat, self.sim.data.qvel.flat])
def reset_model(self):
"""Reset the model."""
qpos = self.init_qpos + np.random.normal(
loc=0, scale=0.001, size=self.model.nq
)
qvel = self.init_qvel + np.random.normal(
loc=0, scale=0.001, size=self.model.nv
)
self.set_state(qpos, qvel)
self.prev_qpos = np.copy(self.sim.data.qpos.flat)
return self._get_obs()
def viewer_setup(self):
"""Set-up the viewer."""
self.viewer.cam.distance = self.model.stat.extent * 0.25
self.viewer.cam.elevation = -55
class HalfCheetahEnvV2(HalfCheetahEnv):
"""Half Cheetah V2 environment for MBRL control.
References
----------
Chua, K., Calandra, R., McAllister, R., & Levine, S. (2018).
Deep reinforcement learning in a handful of trials using probabilistic dynamics
models. NeuRIPS.
https://github.com/kchua/handful-of-trials
"""
def __init__(self, action_cost=0.1):
super().__init__(action_cost)
def step(self, action: np.ndarray):
"""See `AbstractEnvironment.step()'."""
self.prev_qpos = np.copy(self.sim.data.qpos.flat)
self.do_simulation(action, self.frame_skip)
ob = self._get_obs()
reward_ctrl = -np.square(action).sum()
reward_run = ob[0]
reward = reward_run + self.action_cost * reward_ctrl
done = False
return (
ob,
reward,
done,
dict(reward_run=reward_run, reward_ctrl=self.action_cost * reward_ctrl),
)
def _get_obs(self):
return np.concatenate(
[
(self.sim.data.qpos.flat[:1] - self.prev_qpos[:1]) / self.dt,
self.sim.data.qpos.flat[1:],
self.sim.data.qvel.flat,
]
)
def reset_model(self):
"""Reset the model."""
qpos = self.init_qpos + np.random.normal(
loc=0, scale=0.001, size=self.model.nq
)
qvel = self.init_qvel + np.random.normal(
loc=0, scale=0.001, size=self.model.nv
)
self.set_state(qpos, qvel)
self.prev_qpos = np.copy(self.sim.data.qpos.flat)
return self._get_obs()
except Exception: # Mujoco not installed.
pass
| 33.265625
| 88
| 0.544622
| 501
| 4,258
| 4.453094
| 0.251497
| 0.040341
| 0.044375
| 0.047064
| 0.740027
| 0.740027
| 0.740027
| 0.713581
| 0.713581
| 0.713581
| 0
| 0.016679
| 0.338187
| 4,258
| 127
| 89
| 33.527559
| 0.775018
| 0.179662
| 0
| 0.54321
| 0
| 0
| 0.010186
| 0.010186
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| false
| 0.012346
| 0.049383
| 0.024691
| 0.259259
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 1
| 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
| 5
|
3423b6b6a93ca8a71a4b085e760f15ad969e470f
| 167
|
py
|
Python
|
awspider/servers/__init__.py
|
wehriam/awspider
|
3d3dc40208fb334a6b6cdaae92f5d5ea07295616
|
[
"MIT"
] | 2
|
2016-05-09T14:59:51.000Z
|
2021-11-22T02:35:39.000Z
|
awspider/servers/__init__.py
|
wehriam/awspider
|
3d3dc40208fb334a6b6cdaae92f5d5ea07295616
|
[
"MIT"
] | null | null | null |
awspider/servers/__init__.py
|
wehriam/awspider
|
3d3dc40208fb334a6b6cdaae92f5d5ea07295616
|
[
"MIT"
] | 2
|
2022-02-27T19:55:42.000Z
|
2022-03-08T07:20:53.000Z
|
from .data import DataServer
from .execution import ExecutionServer
from .interface import InterfaceServer
from .admin import AdminServer
#from .heap import HeapServer
| 33.4
| 38
| 0.850299
| 20
| 167
| 7.1
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.113772
| 167
| 5
| 39
| 33.4
| 0.959459
| 0.167665
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
caaa4a58b0529ba2cf488dea2999db72c11ed7f7
| 57
|
py
|
Python
|
mtorch/core/train/schedulers/__init__.py
|
NullConvergence/torch_temp
|
29a0d7190f0be6124f51bd85b8320cd8b3cef29a
|
[
"MIT"
] | 3
|
2019-08-08T13:23:50.000Z
|
2019-08-15T15:29:36.000Z
|
mtorch/core/train/schedulers/__init__.py
|
NullConvergence/torch-template
|
29a0d7190f0be6124f51bd85b8320cd8b3cef29a
|
[
"MIT"
] | 10
|
2019-09-20T21:25:22.000Z
|
2019-10-16T10:52:04.000Z
|
mtorch/core/train/schedulers/__init__.py
|
NullConvergence/mtorch
|
29a0d7190f0be6124f51bd85b8320cd8b3cef29a
|
[
"MIT"
] | 2
|
2019-08-08T13:23:52.000Z
|
2019-08-08T19:46:55.000Z
|
from .dynamic_lr import *
from .torch_scheduler import *
| 19
| 30
| 0.789474
| 8
| 57
| 5.375
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140351
| 57
| 2
| 31
| 28.5
| 0.877551
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
cac813afd8fc02361e77e97626f3426619a51072
| 44
|
py
|
Python
|
hello.py
|
jFranciscov/Python
|
53c54aab3e0fb13e0af6b62e82a55b7b3fd108d1
|
[
"Apache-2.0"
] | null | null | null |
hello.py
|
jFranciscov/Python
|
53c54aab3e0fb13e0af6b62e82a55b7b3fd108d1
|
[
"Apache-2.0"
] | null | null | null |
hello.py
|
jFranciscov/Python
|
53c54aab3e0fb13e0af6b62e82a55b7b3fd108d1
|
[
"Apache-2.0"
] | null | null | null |
# -*- coding: utf8 -*-
print('Hello world')
| 14.666667
| 22
| 0.568182
| 5
| 44
| 5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027027
| 0.159091
| 44
| 3
| 23
| 14.666667
| 0.648649
| 0.454545
| 0
| 0
| 0
| 0
| 0.478261
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 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
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 5
|
cacb1b26b5e498a1197ce1fc210ca214cc31d421
| 255
|
py
|
Python
|
tests/apitests/python/library/Harbor.py
|
mytting/harbor-arm64
|
76b7463cf11ed367eb38539c948941d1354de129
|
[
"MIT"
] | 5
|
2021-01-12T12:49:53.000Z
|
2021-11-16T15:58:29.000Z
|
tests/apitests/python/library/Harbor.py
|
mytting/harbor-arm64
|
76b7463cf11ed367eb38539c948941d1354de129
|
[
"MIT"
] | 1
|
2021-09-20T22:32:44.000Z
|
2021-09-21T09:59:42.000Z
|
tests/apitests/python/library/Harbor.py
|
mytting/harbor-arm64
|
76b7463cf11ed367eb38539c948941d1354de129
|
[
"MIT"
] | 2
|
2020-10-15T03:34:52.000Z
|
2021-01-12T12:49:52.000Z
|
# -*- coding: utf-8 -*-
import project
import label
import registry
import replication
import repository
import swagger_client
class Harbor(project.Project, label.Label,
registry.Registry, replication.Replication,
repository.Repository):
pass
| 21.25
| 47
| 0.776471
| 29
| 255
| 6.793103
| 0.482759
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004566
| 0.141176
| 255
| 12
| 48
| 21.25
| 0.894977
| 0.082353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.1
| 0.6
| 0
| 0.7
| 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
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 5
|
1b6509a3bfead9e0e4a27ae08a295a65e5771978
| 143
|
py
|
Python
|
pornhub/models/__init__.py
|
henryhau/pornhub-dl
|
a52027b11776b1b6cbb9abcc308dc078d15ced13
|
[
"MIT"
] | null | null | null |
pornhub/models/__init__.py
|
henryhau/pornhub-dl
|
a52027b11776b1b6cbb9abcc308dc078d15ced13
|
[
"MIT"
] | null | null | null |
pornhub/models/__init__.py
|
henryhau/pornhub-dl
|
a52027b11776b1b6cbb9abcc308dc078d15ced13
|
[
"MIT"
] | null | null | null |
"""Helper module for easy model imports."""
from .user import User # noqa
from .clip import Clip # noqa
from .playlist import Playlist # noqa
| 23.833333
| 43
| 0.734266
| 21
| 143
| 5
| 0.571429
| 0.152381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174825
| 143
| 5
| 44
| 28.6
| 0.889831
| 0.370629
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
1b7313bd325caf0cc08a8c002556645943dd9653
| 1,378
|
py
|
Python
|
urll/__init__.py
|
stevecj/pyurll
|
90b421b2f5aeac36bd39879311c288d0dfcc7725
|
[
"BSD-3-Clause"
] | null | null | null |
urll/__init__.py
|
stevecj/pyurll
|
90b421b2f5aeac36bd39879311c288d0dfcc7725
|
[
"BSD-3-Clause"
] | null | null | null |
urll/__init__.py
|
stevecj/pyurll
|
90b421b2f5aeac36bd39879311c288d0dfcc7725
|
[
"BSD-3-Clause"
] | null | null | null |
from .contexts import SimpleURLContext
_default_url_context = SimpleURLContext()
def url(url_text):
return _default_url_context.url(url_text)
def network_url(network_url_text):
return _default_url_context.network_url(network_url_text)
def fragment_part(fragment_part_text):
return _default_url_context.fragment_part(fragment_part_text)
def fragment(fragment_text):
return _default_url_context.fragment(fragment_text)
def origin(origin_text):
return _default_url_context.origin(origin_text)
def full_path(full_path_text):
return _default_url_context.full_path(full_path_text)
def scheme_part(scheme_part_text):
return _default_url_context.scheme_part(scheme_part_text)
def scheme(scheme_text):
return _default_url_context.scheme(scheme_text)
def netloc(netloc_text):
return _default_url_context.netloc(netloc_text)
def pathname(pathname_text):
return _default_url_context.pathname(pathname_text)
def query_part(query_part_text):
return _default_url_context.query_part(query_part_text)
def query(query_text):
return _default_url_context.query(query_text)
def hostname(hostname_text):
return _default_url_context.hostname(hostname_text)
def port_part(port_part_text):
return _default_url_context.port_part(port_part_text)
def port(port_value):
return _default_url_context.port(port_value)
| 21.2
| 65
| 0.816401
| 197
| 1,378
| 5.192893
| 0.116751
| 0.156403
| 0.265885
| 0.337243
| 0.663734
| 0.296188
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 1,378
| 64
| 66
| 21.53125
| 0.839212
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.46875
| false
| 0
| 0.03125
| 0.46875
| 0.96875
| 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
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 5
|
1b867651b0c95f5d39cb0d8a0d0895cc51de67f9
| 869
|
py
|
Python
|
Les_5/Task_16/test/test_phones.py
|
Manolaru/Python_train
|
27dcee184bd2d60ea7817070012e07dbf3be925f
|
[
"Apache-2.0"
] | null | null | null |
Les_5/Task_16/test/test_phones.py
|
Manolaru/Python_train
|
27dcee184bd2d60ea7817070012e07dbf3be925f
|
[
"Apache-2.0"
] | null | null | null |
Les_5/Task_16/test/test_phones.py
|
Manolaru/Python_train
|
27dcee184bd2d60ea7817070012e07dbf3be925f
|
[
"Apache-2.0"
] | null | null | null |
import re
def test_phones_on_home_page(app):
contact_from_home_page = app.user.get_user_list()[0]
contact_from_edit_page = app.user.get_contact_info_from_edit_page(0)
assert contact_from_home_page.home == clear(contact_from_edit_page.home)
assert contact_from_home_page.work == clear(contact_from_edit_page.work)
assert contact_from_home_page.mobile == clear(contact_from_edit_page.mobile)
def clear(s):
return re.sub("[() -]","",s)
# def test_phones_on_contact_view_page(app):
# contact_from_view_page = app.user.get_contact_from_view_page(0)
# contact_from_edit_page = app.user.get_contact_info_from_edit_page(0)
# assert contact_from_view_page.home == contact_from_edit_page.home
# assert contact_from_view_page.work == contact_from_edit_page.work
# assert contact_from_view_page.mobile == contact_from_edit_page.mobile
| 48.277778
| 80
| 0.792865
| 141
| 869
| 4.368794
| 0.177305
| 0.303571
| 0.194805
| 0.246753
| 0.707792
| 0.49026
| 0.49026
| 0.49026
| 0.230519
| 0.230519
| 0
| 0.005195
| 0.113924
| 869
| 18
| 81
| 48.277778
| 0.794805
| 0.456847
| 0
| 0
| 0
| 0
| 0.012876
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.222222
| false
| 0
| 0.111111
| 0.111111
| 0.444444
| 0
| 0
| 0
| 0
| null | 1
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 5
|
1b9588d89102cec70bed2b04fa4a99bcb409795c
| 167
|
py
|
Python
|
minitg_exceptions.py
|
MisakaMikoto-35c5/minitelegram
|
37da459dc04a593c79051af2ac5b5506ea9cc432
|
[
"MIT"
] | null | null | null |
minitg_exceptions.py
|
MisakaMikoto-35c5/minitelegram
|
37da459dc04a593c79051af2ac5b5506ea9cc432
|
[
"MIT"
] | null | null | null |
minitg_exceptions.py
|
MisakaMikoto-35c5/minitelegram
|
37da459dc04a593c79051af2ac5b5506ea9cc432
|
[
"MIT"
] | null | null | null |
class StopMessageProcessing(Exception):
pass
class TelegramServerError(RuntimeError):
pass
class MalformedMessageDetectedError(TelegramServerError):
pass
| 20.875
| 57
| 0.814371
| 12
| 167
| 11.333333
| 0.583333
| 0.132353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131737
| 167
| 8
| 58
| 20.875
| 0.937931
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 1
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
1b9cd0cc6f80a7de08d2a4702234acabe37b2cac
| 23,960
|
py
|
Python
|
python/prepData_DTU1.py
|
thomasnicolet/Paper_canteen_dilemma
|
e1cc51db694934717f4819849c6c40c3011905c7
|
[
"MIT"
] | null | null | null |
python/prepData_DTU1.py
|
thomasnicolet/Paper_canteen_dilemma
|
e1cc51db694934717f4819849c6c40c3011905c7
|
[
"MIT"
] | null | null | null |
python/prepData_DTU1.py
|
thomasnicolet/Paper_canteen_dilemma
|
e1cc51db694934717f4819849c6c40c3011905c7
|
[
"MIT"
] | 1
|
2020-11-29T18:12:33.000Z
|
2020-11-29T18:12:33.000Z
|
import numpy as np
import pandas as pd
pd.options.mode.chained_assignment = None # default='warn'
datafiles = [
'../RawData/DTU1/all_apps_wide_2019-04-09.csv',
]
def make_dataframe(df):
# take only the relevant columns in data sheet
df = df[[
'session.code',
'participant.code',
'participant.mturk_worker_id',
'canteen_dilemma_lsr.1.group.id_in_subsession',
'canteen_dilemma_lsr.2.group.id_in_subsession',
'canteen_dilemma_lsr.3.group.id_in_subsession',
'canteen_dilemma_lsr.4.group.id_in_subsession',
'canteen_dilemma_lsr.5.group.id_in_subsession',
'canteen_dilemma_lsr.6.group.id_in_subsession',
'canteen_dilemma_lsr.7.group.id_in_subsession',
'canteen_dilemma_lsr.8.group.id_in_subsession',
'canteen_dilemma_lsr.9.group.id_in_subsession',
'canteen_dilemma_lsr.10.group.id_in_subsession',
'canteen_dilemma_lsr.11.group.id_in_subsession',
'canteen_dilemma_lsr.12.group.id_in_subsession',
'canteen_dilemma_lsr.13.group.id_in_subsession',
'canteen_dilemma_lsr.14.group.id_in_subsession',
'canteen_dilemma_lsr.15.group.id_in_subsession',
'canteen_dilemma_lsr.16.group.id_in_subsession',
'canteen_dilemma_lsr.17.group.id_in_subsession',
'canteen_dilemma_lsr.18.group.id_in_subsession',
'canteen_dilemma_lsr.19.group.id_in_subsession',
'canteen_dilemma_lsr.20.group.id_in_subsession',
'canteen_dilemma_lsr.21.group.id_in_subsession',
'canteen_dilemma_lsr.22.group.id_in_subsession',
'canteen_dilemma_lsr.23.group.id_in_subsession',
'canteen_dilemma_lsr.24.group.id_in_subsession',
'canteen_dilemma_lsr.25.group.id_in_subsession',
'canteen_dilemma_lsr.26.group.id_in_subsession',
'canteen_dilemma_lsr.27.group.id_in_subsession',
'canteen_dilemma_lsr.28.group.id_in_subsession',
'canteen_dilemma_lsr.29.group.id_in_subsession',
'canteen_dilemma_lsr.30.group.id_in_subsession',
'canteen_dilemma_lsr.1.player.id_in_group',
'canteen_dilemma_lsr.2.player.id_in_group',
'canteen_dilemma_lsr.3.player.id_in_group',
'canteen_dilemma_lsr.4.player.id_in_group',
'canteen_dilemma_lsr.5.player.id_in_group',
'canteen_dilemma_lsr.6.player.id_in_group',
'canteen_dilemma_lsr.7.player.id_in_group',
'canteen_dilemma_lsr.8.player.id_in_group',
'canteen_dilemma_lsr.9.player.id_in_group',
'canteen_dilemma_lsr.10.player.id_in_group',
'canteen_dilemma_lsr.11.player.id_in_group',
'canteen_dilemma_lsr.12.player.id_in_group',
'canteen_dilemma_lsr.13.player.id_in_group',
'canteen_dilemma_lsr.14.player.id_in_group',
'canteen_dilemma_lsr.15.player.id_in_group',
'canteen_dilemma_lsr.16.player.id_in_group',
'canteen_dilemma_lsr.17.player.id_in_group',
'canteen_dilemma_lsr.18.player.id_in_group',
'canteen_dilemma_lsr.19.player.id_in_group',
'canteen_dilemma_lsr.20.player.id_in_group',
'canteen_dilemma_lsr.21.player.id_in_group',
'canteen_dilemma_lsr.22.player.id_in_group',
'canteen_dilemma_lsr.23.player.id_in_group',
'canteen_dilemma_lsr.24.player.id_in_group',
'canteen_dilemma_lsr.25.player.id_in_group',
'canteen_dilemma_lsr.26.player.id_in_group',
'canteen_dilemma_lsr.27.player.id_in_group',
'canteen_dilemma_lsr.28.player.id_in_group',
'canteen_dilemma_lsr.29.player.id_in_group',
'canteen_dilemma_lsr.30.player.id_in_group',
'canteen_dilemma_lsr.1.player.arrival_time',
'canteen_dilemma_lsr.2.player.arrival_time',
'canteen_dilemma_lsr.3.player.arrival_time',
'canteen_dilemma_lsr.4.player.arrival_time',
'canteen_dilemma_lsr.5.player.arrival_time',
'canteen_dilemma_lsr.6.player.arrival_time',
'canteen_dilemma_lsr.7.player.arrival_time',
'canteen_dilemma_lsr.8.player.arrival_time',
'canteen_dilemma_lsr.9.player.arrival_time',
'canteen_dilemma_lsr.10.player.arrival_time',
'canteen_dilemma_lsr.11.player.arrival_time',
'canteen_dilemma_lsr.12.player.arrival_time',
'canteen_dilemma_lsr.13.player.arrival_time',
'canteen_dilemma_lsr.14.player.arrival_time',
'canteen_dilemma_lsr.15.player.arrival_time',
'canteen_dilemma_lsr.16.player.arrival_time',
'canteen_dilemma_lsr.17.player.arrival_time',
'canteen_dilemma_lsr.18.player.arrival_time',
'canteen_dilemma_lsr.19.player.arrival_time',
'canteen_dilemma_lsr.20.player.arrival_time',
'canteen_dilemma_lsr.21.player.arrival_time',
'canteen_dilemma_lsr.22.player.arrival_time',
'canteen_dilemma_lsr.23.player.arrival_time',
'canteen_dilemma_lsr.24.player.arrival_time',
'canteen_dilemma_lsr.25.player.arrival_time',
'canteen_dilemma_lsr.26.player.arrival_time',
'canteen_dilemma_lsr.27.player.arrival_time',
'canteen_dilemma_lsr.28.player.arrival_time',
'canteen_dilemma_lsr.29.player.arrival_time',
'canteen_dilemma_lsr.30.player.arrival_time',
'canteen_dilemma_lsr.1.player.choice',
'canteen_dilemma_lsr.2.player.choice',
'canteen_dilemma_lsr.3.player.choice',
'canteen_dilemma_lsr.4.player.choice',
'canteen_dilemma_lsr.5.player.choice',
'canteen_dilemma_lsr.6.player.choice',
'canteen_dilemma_lsr.7.player.choice',
'canteen_dilemma_lsr.8.player.choice',
'canteen_dilemma_lsr.9.player.choice',
'canteen_dilemma_lsr.10.player.choice',
'canteen_dilemma_lsr.11.player.choice',
'canteen_dilemma_lsr.12.player.choice',
'canteen_dilemma_lsr.13.player.choice',
'canteen_dilemma_lsr.14.player.choice',
'canteen_dilemma_lsr.15.player.choice',
'canteen_dilemma_lsr.16.player.choice',
'canteen_dilemma_lsr.17.player.choice',
'canteen_dilemma_lsr.18.player.choice',
'canteen_dilemma_lsr.19.player.choice',
'canteen_dilemma_lsr.20.player.choice',
'canteen_dilemma_lsr.21.player.choice',
'canteen_dilemma_lsr.22.player.choice',
'canteen_dilemma_lsr.23.player.choice',
'canteen_dilemma_lsr.24.player.choice',
'canteen_dilemma_lsr.25.player.choice',
'canteen_dilemma_lsr.26.player.choice',
'canteen_dilemma_lsr.27.player.choice',
'canteen_dilemma_lsr.28.player.choice',
'canteen_dilemma_lsr.29.player.choice',
'canteen_dilemma_lsr.30.player.choice',
'canteen_dilemma_lsr.1.player.certainty',
'canteen_dilemma_lsr.2.player.certainty',
'canteen_dilemma_lsr.3.player.certainty',
'canteen_dilemma_lsr.4.player.certainty',
'canteen_dilemma_lsr.5.player.certainty',
'canteen_dilemma_lsr.6.player.certainty',
'canteen_dilemma_lsr.7.player.certainty',
'canteen_dilemma_lsr.8.player.certainty',
'canteen_dilemma_lsr.9.player.certainty',
'canteen_dilemma_lsr.10.player.certainty',
'canteen_dilemma_lsr.11.player.certainty',
'canteen_dilemma_lsr.12.player.certainty',
'canteen_dilemma_lsr.13.player.certainty',
'canteen_dilemma_lsr.14.player.certainty',
'canteen_dilemma_lsr.15.player.certainty',
'canteen_dilemma_lsr.16.player.certainty',
'canteen_dilemma_lsr.17.player.certainty',
'canteen_dilemma_lsr.18.player.certainty',
'canteen_dilemma_lsr.19.player.certainty',
'canteen_dilemma_lsr.20.player.certainty',
'canteen_dilemma_lsr.21.player.certainty',
'canteen_dilemma_lsr.22.player.certainty',
'canteen_dilemma_lsr.23.player.certainty',
'canteen_dilemma_lsr.24.player.certainty',
'canteen_dilemma_lsr.25.player.certainty',
'canteen_dilemma_lsr.26.player.certainty',
'canteen_dilemma_lsr.27.player.certainty',
'canteen_dilemma_lsr.28.player.certainty',
'canteen_dilemma_lsr.29.player.certainty',
'canteen_dilemma_lsr.30.player.certainty',
'canteen_dilemma_lsr.1.player.payoff',
'canteen_dilemma_lsr.2.player.payoff',
'canteen_dilemma_lsr.3.player.payoff',
'canteen_dilemma_lsr.4.player.payoff',
'canteen_dilemma_lsr.5.player.payoff',
'canteen_dilemma_lsr.6.player.payoff',
'canteen_dilemma_lsr.7.player.payoff',
'canteen_dilemma_lsr.8.player.payoff',
'canteen_dilemma_lsr.9.player.payoff',
'canteen_dilemma_lsr.10.player.payoff',
'canteen_dilemma_lsr.11.player.payoff',
'canteen_dilemma_lsr.12.player.payoff',
'canteen_dilemma_lsr.13.player.payoff',
'canteen_dilemma_lsr.14.player.payoff',
'canteen_dilemma_lsr.15.player.payoff',
'canteen_dilemma_lsr.16.player.payoff',
'canteen_dilemma_lsr.17.player.payoff',
'canteen_dilemma_lsr.18.player.payoff',
'canteen_dilemma_lsr.19.player.payoff',
'canteen_dilemma_lsr.20.player.payoff',
'canteen_dilemma_lsr.21.player.payoff',
'canteen_dilemma_lsr.22.player.payoff',
'canteen_dilemma_lsr.23.player.payoff',
'canteen_dilemma_lsr.24.player.payoff',
'canteen_dilemma_lsr.25.player.payoff',
'canteen_dilemma_lsr.26.player.payoff',
'canteen_dilemma_lsr.27.player.payoff',
'canteen_dilemma_lsr.28.player.payoff',
'canteen_dilemma_lsr.29.player.payoff',
'canteen_dilemma_lsr.30.player.payoff',
'canteen_dilemma_lsr.1.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.2.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.3.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.4.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.5.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.6.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.7.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.8.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.9.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.10.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.11.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.12.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.13.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.14.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.15.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.16.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.17.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.18.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.19.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.20.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.21.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.22.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.23.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.24.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.25.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.26.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.27.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.28.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.29.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.30.player.strategy_canteen_dilemma',
'canteen_dilemma_lsr.1.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.2.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.3.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.4.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.5.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.6.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.7.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.8.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.9.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.10.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.11.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.12.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.13.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.14.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.15.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.16.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.17.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.18.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.19.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.20.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.21.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.22.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.23.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.24.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.25.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.26.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.27.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.28.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.29.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.30.player.simple_common_knowledge_canteen_dilemma',
'canteen_dilemma_lsr.1.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.2.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.3.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.4.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.5.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.6.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.7.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.8.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.9.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.10.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.11.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.12.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.13.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.14.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.15.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.16.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.17.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.18.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.19.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.20.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.21.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.22.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.23.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.24.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.25.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.26.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.27.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.28.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.29.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.30.player.cutoff_canteen_dilemma',
'canteen_dilemma_lsr.1.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.2.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.3.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.4.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.5.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.6.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.7.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.8.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.9.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.10.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.11.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.12.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.13.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.14.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.15.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.16.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.17.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.18.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.19.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.20.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.21.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.22.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.23.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.24.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.25.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.26.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.27.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.28.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.29.player.fault_canteen_dilemma',
'canteen_dilemma_lsr.30.player.fault_canteen_dilemma',
'participant.payoff',
]]
# rename columns
df.columns = [
'session',
'code',
'turker',
'group1','group2','group3','group4','group5','group6','group7','group8','group9','group10',
'group11','group12','group13','group14','group15','group16','group17','group18','group19','group20',
'group21','group22','group23','group24','group25','group26','group27','group28','group29','group30',
'id_in_group1','id_in_group2','id_in_group3','id_in_group4','id_in_group5','id_in_group6','id_in_group7','id_in_group8','id_in_group9','id_in_group10',
'id_in_group11','id_in_group12','id_in_group13','id_in_group14','id_in_group15','id_in_group16','id_in_group17','id_in_group18','id_in_group19','id_in_group20',
'id_in_group21','id_in_group22','id_in_group23','id_in_group24','id_in_group25','id_in_group26','id_in_group27','id_in_group28','id_in_group29','id_in_group30',
'arrival1','arrival2','arrival3','arrival4','arrival5','arrival6','arrival7','arrival8','arrival9','arrival10',
'arrival11','arrival12','arrival13','arrival14','arrival15','arrival16','arrival17','arrival18','arrival19','arrival20',
'arrival21','arrival22','arrival23','arrival24','arrival25','arrival26','arrival27','arrival28','arrival29','arrival30',
'choice1','choice2','choice3','choice4','choice5','choice6','choice7','choice8','choice9','choice10',
'choice11','choice12','choice13','choice14','choice15','choice16','choice17','choice18','choice19','choice20',
'choice21','choice22','choice23','choice24','choice25','choice26','choice27','choice28','choice29','choice30',
'certainty1','certainty2','certainty3','certainty4','certainty5','certainty6','certainty7','certainty8','certainty9','certainty10',
'certainty11','certainty12','certainty13','certainty14','certainty15','certainty16','certainty17','certainty18','certainty19','certainty20',
'certainty21','certainty22','certainty23','certainty24','certainty25','certainty26','certainty27','certainty28','certainty29','certainty30',
'bonus1','bonus2','bonus3','bonus4','bonus5','bonus6','bonus7','bonus8','bonus9','bonus10',
'bonus11','bonus12','bonus13','bonus14','bonus15','bonus16','bonus17','bonus18','bonus19','bonus20',
'bonus21','bonus22','bonus23','bonus24','bonus25','bonus26','bonus27','bonus28','bonus29','bonus30',
'strategy1','strategy2','strategy3','strategy4','strategy5','strategy6','strategy7','strategy8','strategy9','strategy10',
'strategy11','strategy12','strategy13','strategy14','strategy15','strategy16','strategy17','strategy18','strategy19','strategy20',
'strategy21','strategy22','strategy23','strategy24','strategy25','strategy26','strategy27','strategy28','strategy29','strategy30',
'simple1','simple2','simple3','simple4','simple5','simple6','simple7','simple8','simple9','simple10',
'simple11','simple12','simple13','simple14','simple15','simple16','simple17','simple18','simple19','simple20',
'simple21','simple22','simple23','simple24','simple25','simple26','simple27','simple28','simple29','simple30',
'cutoff1','cutoff2','cutoff3','cutoff4','cutoff5','cutoff6','cutoff7','cutoff8','cutoff9','cutoff10',
'cutoff11','cutoff12','cutoff13','cutoff14','cutoff15','cutoff16','cutoff17','cutoff18','cutoff19','cutoff20',
'cutoff21','cutoff22','cutoff23','cutoff24','cutoff25','cutoff26','cutoff27','cutoff28','cutoff29','cutoff30',
'fault1','fault2','fault3','fault4','fault5','fault6','fault7','fault8','fault9','fault10',
'fault11','fault12','fault13','fault14','fault15','fault16','fault17','fault18','fault19','fault20',
'fault21','fault22','fault23','fault24','fault25','fault26','fault27','fault28','fault29','fault30',
'payoff',
]
df.reset_index(inplace=True)
df["id"] = df.index
df = pd.wide_to_long(df, stubnames=[
'group',
'id_in_group',
'arrival',
'choice',
'certainty',
'bonus',
'strategy',
'simple',
'cutoff',
'fault',
],
i='id', j='round').reset_index()
# remove all entries where bonus = 0:
df = df[df['bonus'] != 0]
# keep only relevant columns:
df = df[['session', 'code', 'turker', 'group', 'id_in_group', 'round', 'arrival',
'choice', 'certainty', 'bonus', 'strategy', 'simple',
'cutoff', 'fault', 'payoff']]
# sort and reset index
df = df.sort_values(['session', 'group', 'round', 'id_in_group'])
df.reset_index(inplace=True, drop=True)
print('number of players:', len(df.code.unique()))
# retain only the session which actually worked:
df = df[df.session == 'skcucks5']
print('removing test sessions')
print('players left =', len(df.code.unique()))
# hack here to populate the payoff column with the true payoffs
players = df.code.unique()
for player in players:
if df[df.code == player]['payoff'].unique().item() != -2:
pay = df[df.code == player]['bonus'].sum()
if pay < -30:
pay = -30
idxs = df.index[df.code == player].tolist()
for idx in idxs:
df.loc[idx, 'payoff'] = 30 + pay
# and subsequently find the -2 player and her colleague and remove them:
quitters = []
for player in players:
if df[df.code == player]['payoff'].unique().item() == -2:
# find the colleague who's payoff also needs to be removed
player_id_in_group = df[df.code == player]['id_in_group'].unique().item()
player_session = df[df.code == player]['session'].unique().item()
player_group = df[df.code == player]['group'].unique().item()
if player_id_in_group == 1:
colleague = df[(df.session == player_session) & (df.group == player_group) & (df.id_in_group == 2)]['code'].unique().item()
if player_id_in_group == 2:
colleague = df[(df.session == player_session) & (df.group == player_group) & (df.id_in_group == 1)]['code'].unique().item()
quitters.append(player)
quitters.append(colleague)
print('removing', len(quitters), 'quitters')
# and finaly remove the players:
for r in quitters:
df = df.drop(df[df.code == r].index)
print('players left =', len(df.code.unique()))
return df
# load datafiles
df_all = pd.DataFrame()
for datafile in datafiles:
df = pd.DataFrame(pd.read_csv(datafile, low_memory=False))
df_all = df_all.append(df, sort=True)
df_all = df_all[df_all['session.is_demo'] == 0]
df = make_dataframe(df_all)
# pd.set_option('display.max_columns', None)
# save
# df.to_csv('../data/DTU_allcd.csv')
# df.to_excel('../data/DTU_allcd.xlsx')
df = df.drop(['turker'], 1)
df.to_csv('../data/DTU1_anonymous.csv')
df.to_excel('../data/DTU1_anonymous.xlsx')
| 54.085779
| 168
| 0.734766
| 3,082
| 23,960
| 5.332252
| 0.144062
| 0.357795
| 0.310332
| 0.20275
| 0.753621
| 0.566691
| 0.504625
| 0.125958
| 0.11963
| 0.013752
| 0
| 0.050208
| 0.128005
| 23,960
| 442
| 169
| 54.208145
| 0.736371
| 0.023498
| 0
| 0.00978
| 0
| 0
| 0.726091
| 0.598118
| 0
| 0
| 0
| 0
| 0
| 1
| 0.002445
| false
| 0
| 0.00489
| 0
| 0.00978
| 0.012225
| 0
| 0
| 0
| null | 1
| 1
| 1
| 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
| 5
|
1bc5351e07e6dd05ed5c949e01d7e00ca0696323
| 39
|
py
|
Python
|
coffin/contrib/auth/forms.py
|
spothero/coffin
|
9ea6a9173cbfed592c5b4776c489dba8d9280d52
|
[
"BSD-3-Clause"
] | 1
|
2016-11-19T06:32:20.000Z
|
2016-11-19T06:32:20.000Z
|
coffin/contrib/auth/forms.py
|
spothero/coffin
|
9ea6a9173cbfed592c5b4776c489dba8d9280d52
|
[
"BSD-3-Clause"
] | null | null | null |
coffin/contrib/auth/forms.py
|
spothero/coffin
|
9ea6a9173cbfed592c5b4776c489dba8d9280d52
|
[
"BSD-3-Clause"
] | 1
|
2019-08-14T09:51:23.000Z
|
2019-08-14T09:51:23.000Z
|
from django.contrib.auth.forms import *
| 39
| 39
| 0.820513
| 6
| 39
| 5.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 39
| 1
| 39
| 39
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 5
|
1bd60fcaa02b6ed4ea3ec2f9993ae93bd7e725e9
| 142
|
py
|
Python
|
root/method/__init__.py
|
thasmarinho/root-image-compressor
|
499098013a56da533b69877919fc0737a399527f
|
[
"MIT"
] | null | null | null |
root/method/__init__.py
|
thasmarinho/root-image-compressor
|
499098013a56da533b69877919fc0737a399527f
|
[
"MIT"
] | 2
|
2021-06-08T20:35:32.000Z
|
2022-03-12T00:04:29.000Z
|
root/method/__init__.py
|
thasmarinho/root-image-compressor
|
499098013a56da533b69877919fc0737a399527f
|
[
"MIT"
] | null | null | null |
from .huffman import Huffman
from .huffman_with_scale import HuffmanWithScale
from .runlength import RunLength
from .strategy import Strategy
| 28.4
| 48
| 0.859155
| 18
| 142
| 6.666667
| 0.444444
| 0.183333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.112676
| 142
| 4
| 49
| 35.5
| 0.952381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 5
|
59fdeb9c2100bee8b15bb06aaef3f32bdec88f06
| 20
|
py
|
Python
|
example_project/some_modules/third_modules/a62.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
example_project/some_modules/third_modules/a62.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
example_project/some_modules/third_modules/a62.py
|
Yuriy-Leonov/cython_imports_limit_issue
|
2f9e7c02798fb52185dabfe6ce3811c439ca2839
|
[
"MIT"
] | null | null | null |
class A62:
pass
| 6.666667
| 10
| 0.6
| 3
| 20
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 0.35
| 20
| 2
| 11
| 10
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 1
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.