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
64a4b01a94777368b7f0e1dcc327811b6c88828b
202
py
Python
tests/fixtures/task_specs/simple_with_list.py
ludwigschubert/flow-simulator
24e7813d8544fd16e760cbe8c482818e06c3a55b
[ "Apache-2.0" ]
null
null
null
tests/fixtures/task_specs/simple_with_list.py
ludwigschubert/flow-simulator
24e7813d8544fd16e760cbe8c482818e06c3a55b
[ "Apache-2.0" ]
null
null
null
tests/fixtures/task_specs/simple_with_list.py
ludwigschubert/flow-simulator
24e7813d8544fd16e760cbe8c482818e06c3a55b
[ "Apache-2.0" ]
null
null
null
x = [1,2,3] name = "/tests/fixtures/data/names/{name_id}.txt" output = "/tests/fixtures/data/salutations/{name_id}-{x}.txt" def main(): return "Hello {name} for the {x} time!".format(name=name, x=x)
28.857143
64
0.663366
35
202
3.771429
0.6
0.19697
0.257576
0
0
0
0
0
0
0
0
0.016667
0.108911
202
6
65
33.666667
0.716667
0
0
0
0
0
0.594059
0.445545
0
0
0
0
0
1
0.2
false
0
0
0.2
0.4
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
1
0
0
0
4
64b461278cb4633f672ff5f36c5d4bfdf622f82e
662
py
Python
libkge/embedding/interfaces.py
samehkamaleldin/libkge
c80e82a894ddc4160cc03034206e3c1f05d32b42
[ "Apache-2.0" ]
12
2019-10-08T08:42:04.000Z
2021-12-16T06:50:17.000Z
benchmarking/libkge/libkge/embedding/interfaces.py
hpi-sam/GNN-Effectants
e1204cb78bb91ffe3126df62d2d14b20da950694
[ "MIT" ]
null
null
null
benchmarking/libkge/libkge/embedding/interfaces.py
hpi-sam/GNN-Effectants
e1204cb78bb91ffe3126df62d2d14b20da950694
[ "MIT" ]
3
2020-03-11T02:34:38.000Z
2021-01-24T15:09:44.000Z
from abc import ABCMeta, abstractmethod class IExportable(ABCMeta): def __init__(self): """ """ pass @abstractmethod def export_to_file(self, filepath): """ Export model to file. Parameters ---------- filepath: str file path Returns ------- """ raise NotImplementedError("Not implemented") @abstractmethod def import_from_file(self, filepath): """ Import model from file Parameters ---------- filepath Returns ------- """ raise NotImplementedError("Not implemented")
16.974359
52
0.509063
51
662
6.45098
0.470588
0.103343
0.097264
0.206687
0.273556
0
0
0
0
0
0
0
0.371601
662
39
53
16.974359
0.790865
0.243202
0
0.4
0
0
0.082192
0
0
0
0
0
0
1
0.3
false
0.1
0.2
0
0.6
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
0
1
0
0
4
b37a890f8c43c83abd02e550ce7b0400d326f7a2
205
py
Python
aioclustermanager/nomad/node.py
sunbit/aioclustermanager
f5a2f4ba7936a75c7748cff9f77c3bfff1a3a61d
[ "BSD-3-Clause" ]
1
2020-03-24T16:15:56.000Z
2020-03-24T16:15:56.000Z
aioclustermanager/nomad/node.py
bloodbare/aioclustermanager
9abe7e9db7140854709c8044128e0153debe6971
[ "BSD-3-Clause" ]
8
2018-03-12T20:40:23.000Z
2018-06-05T18:35:16.000Z
aioclustermanager/nomad/node.py
onna/aioclustermanager
9abe7e9db7140854709c8044128e0153debe6971
[ "BSD-3-Clause" ]
2
2020-05-21T17:32:23.000Z
2021-05-11T12:17:56.000Z
from aioclustermanager.node import Node class NomadNode(Node): @property def id(self): return self._raw['Name'] @property def hostname(self): raise NotImplementedError()
17.083333
39
0.658537
22
205
6.090909
0.727273
0.164179
0
0
0
0
0
0
0
0
0
0
0.24878
205
11
40
18.636364
0.87013
0
0
0.25
0
0
0.019512
0
0
0
0
0
0
1
0.25
false
0
0.125
0.125
0.625
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
b3aeacedbebbed82f1a9504fbdd8167daef35ff6
138
py
Python
src/util/__init__.py
WardenAllen/Uranus
0d20cac631320b558254992c17678ddd1658587b
[ "MIT" ]
null
null
null
src/util/__init__.py
WardenAllen/Uranus
0d20cac631320b558254992c17678ddd1658587b
[ "MIT" ]
null
null
null
src/util/__init__.py
WardenAllen/Uranus
0d20cac631320b558254992c17678ddd1658587b
[ "MIT" ]
null
null
null
# !/usr/bin/python # -*- coding: utf-8 -*- # @Time : 2020/11/22 15:17 # @Author : WardenAllen # @File : __init__.py # @Brief :
17.25
29
0.536232
18
138
3.888889
1
0
0
0
0
0
0
0
0
0
0
0.125
0.246377
138
7
30
19.714286
0.548077
0.891304
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
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b3b3d1a744670c96895cc0b69581d3bd819d434b
178
py
Python
samples/python/KafkaTriggerMany/main.py
mym-kingbob/azure-functions-kafka-extension
7e1cb155b8ebe7533c910b7999e5f281021b5f0a
[ "MIT" ]
74
2019-04-14T16:48:25.000Z
2022-03-30T04:11:23.000Z
samples/python/KafkaTriggerMany/main.py
mym-kingbob/azure-functions-kafka-extension
7e1cb155b8ebe7533c910b7999e5f281021b5f0a
[ "MIT" ]
175
2019-04-10T20:55:27.000Z
2022-03-31T18:20:10.000Z
samples/python/KafkaTriggerMany/main.py
mym-kingbob/azure-functions-kafka-extension
7e1cb155b8ebe7533c910b7999e5f281021b5f0a
[ "MIT" ]
52
2019-04-10T19:54:39.000Z
2022-03-10T22:53:12.000Z
import logging import typing from azure.functions import KafkaEvent def main(kevents : typing.List[KafkaEvent]): for event in kevents: logging.info(event.get_body())
25.428571
44
0.752809
24
178
5.541667
0.708333
0
0
0
0
0
0
0
0
0
0
0
0.162921
178
7
45
25.428571
0.892617
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
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
0
0
1
0
1
0
0
4
b3ca1083aab324ba9772f1660e6a94bdfdc8f094
216
py
Python
mri_works/NodeEditor/modules/Yaml_Json/Json_tools.py
montigno/mri_works
8ec6ff1500aa34d3540e44e4b0148023cf821f61
[ "CECILL-B" ]
2
2020-08-20T21:00:53.000Z
2021-08-16T15:28:51.000Z
mri_works/NodeEditor/modules/Yaml_Json/Json_tools.py
montigno/mri_works
8ec6ff1500aa34d3540e44e4b0148023cf821f61
[ "CECILL-B" ]
3
2020-09-24T06:50:43.000Z
2020-12-15T11:02:04.000Z
mri_works/NodeEditor/modules/Yaml_Json/Json_tools.py
montigno/mri_works
8ec6ff1500aa34d3540e44e4b0148023cf821f61
[ "CECILL-B" ]
1
2020-08-20T21:00:59.000Z
2020-08-20T21:00:59.000Z
class outJson(): def __init__(self, json_file='path'): import json with open(json_file) as f: self.outJson = json.load(f) def dict_json(self: 'dict'): return self.outJson
24
41
0.587963
29
216
4.137931
0.551724
0.133333
0
0
0
0
0
0
0
0
0
0
0.296296
216
8
42
27
0.789474
0
0
0
0
0
0.037037
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
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
0
0
0
4
b6032427d8611decfc555b3496a3920f461d7a92
80
py
Python
start_timing.py
gholamw/DNS-QUIC
c020cbf69b3067eb5862a206a317b48feca798fe
[ "MIT" ]
null
null
null
start_timing.py
gholamw/DNS-QUIC
c020cbf69b3067eb5862a206a317b48feca798fe
[ "MIT" ]
null
null
null
start_timing.py
gholamw/DNS-QUIC
c020cbf69b3067eb5862a206a317b48feca798fe
[ "MIT" ]
null
null
null
import timeit start = timeit.timeit() #end = timeit.timeit() #print end - start
16
23
0.7125
11
80
5.181818
0.454545
0.421053
0
0
0
0
0
0
0
0
0
0
0.15
80
5
24
16
0.838235
0.475
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
0
4
b613ea2ec5028bdeeab9d2b99f503f0fe942ede9
1,810
py
Python
hypha/apply/determinations/migrations/0004_change_labels.py
maxpearl/hypha
e181ebadfb744aab34617bb766e746368d6f2de0
[ "BSD-3-Clause" ]
20
2021-04-08T16:38:49.000Z
2022-02-09T20:05:57.000Z
hypha/apply/determinations/migrations/0004_change_labels.py
maxpearl/hypha
e181ebadfb744aab34617bb766e746368d6f2de0
[ "BSD-3-Clause" ]
1,098
2017-12-15T11:23:03.000Z
2020-01-24T07:58:07.000Z
hypha/apply/determinations/migrations/0004_change_labels.py
maxpearl/hypha
e181ebadfb744aab34617bb766e746368d6f2de0
[ "BSD-3-Clause" ]
17
2020-02-07T14:55:54.000Z
2021-04-04T19:32:38.000Z
# Generated by Django 2.0.2 on 2018-06-22 14:23 from django.db import migrations, models import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('determinations', '0003_message_template_settings'), ] operations = [ migrations.AlterField( model_name='determination', name='outcome', field=models.IntegerField(choices=[(0, 'Dismissed'), (1, 'Needs more info'), (2, 'Approved')], default=1, verbose_name='Determination'), ), migrations.AlterField( model_name='determinationmessagesettings', name='concept_accepted', field=wagtail.core.fields.RichTextField(verbose_name='Approved'), ), migrations.AlterField( model_name='determinationmessagesettings', name='concept_rejected', field=wagtail.core.fields.RichTextField(verbose_name='Dismissed'), ), migrations.AlterField( model_name='determinationmessagesettings', name='proposal_accepted', field=wagtail.core.fields.RichTextField(verbose_name='Approved'), ), migrations.AlterField( model_name='determinationmessagesettings', name='proposal_rejected', field=wagtail.core.fields.RichTextField(verbose_name='Dismissed'), ), migrations.AlterField( model_name='determinationmessagesettings', name='request_accepted', field=wagtail.core.fields.RichTextField(verbose_name='Approved'), ), migrations.AlterField( model_name='determinationmessagesettings', name='request_rejected', field=wagtail.core.fields.RichTextField(verbose_name='Dismissed'), ), ]
36.2
148
0.631492
153
1,810
7.320261
0.333333
0.06875
0.10625
0.18125
0.700893
0.700893
0.700893
0.607143
0.607143
0.550893
0
0.017088
0.256354
1,810
49
149
36.938776
0.815007
0.024862
0
0.604651
1
0
0.241634
0.112309
0
0
0
0
0
1
0
false
0
0.046512
0
0.116279
0
0
0
0
null
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
37327305a29fe5cec6cb7af42edec8ee28b7409b
62
py
Python
rplugin/python3/nvim_diary_template/__init__.py
CrossR/nvim_notes
355bfec2339d1c6a612e1a89e6e4a3aed9e70f43
[ "MIT" ]
6
2019-01-11T23:09:32.000Z
2021-03-04T04:22:04.000Z
rplugin/python3/nvim_diary_template/__init__.py
CrossR/nvim_notes
355bfec2339d1c6a612e1a89e6e4a3aed9e70f43
[ "MIT" ]
20
2018-07-22T16:20:56.000Z
2019-11-10T14:11:05.000Z
rplugin/python3/nvim_diary_template/__init__.py
CrossR/nvim_notes
355bfec2339d1c6a612e1a89e6e4a3aed9e70f43
[ "MIT" ]
null
null
null
# pylint: disable=all from .plugin import DiaryTemplatePlugin
20.666667
39
0.822581
7
62
7.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.112903
62
2
40
31
0.927273
0.306452
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
0
0
0
4
374bd394d895835f411cf34bf7c2f178eb17241a
140
py
Python
akika_venv/lib/python3.6/site-packages/django_seo_js/middleware/__init__.py
laetitia123/akikatest
812f26155b6e3d003ac7e48c08c16df406e11086
[ "MIT" ]
183
2015-01-02T09:02:21.000Z
2022-02-24T05:09:08.000Z
akika_venv/lib/python3.6/site-packages/django_seo_js/middleware/__init__.py
laetitia123/akikatest
812f26155b6e3d003ac7e48c08c16df406e11086
[ "MIT" ]
31
2015-02-03T21:15:53.000Z
2022-03-22T15:07:01.000Z
akika_venv/lib/python3.6/site-packages/django_seo_js/middleware/__init__.py
laetitia123/akikatest
812f26155b6e3d003ac7e48c08c16df406e11086
[ "MIT" ]
55
2015-02-03T04:00:55.000Z
2022-02-24T05:09:10.000Z
from .escaped_fragment import EscapedFragmentMiddleware from .hashbang import HashBangMiddleware from .useragent import UserAgentMiddleware
35
55
0.892857
13
140
9.538462
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.085714
140
3
56
46.666667
0.96875
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
0
0
0
4
805ee2b54933550aeb3bc8b8cbada3b82ae02435
688
py
Python
datawinners/submission/location.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
1
2015-11-02T09:11:12.000Z
2015-11-02T09:11:12.000Z
datawinners/submission/location.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
datawinners/submission/location.py
ICT4H/dcs-web
fb0f53fad4401cfac1c1789ff28b9d5bda40c975
[ "Apache-2.0" ]
null
null
null
from datawinners.location.LocationTree import get_location_tree, get_location_hierarchy class LocationBridge(object): def __init__(self,location_tree=None,get_loc_hierarchy=None): self.location_tree = location_tree or get_location_tree() self.get_location_hierarchy = get_loc_hierarchy or get_location_hierarchy def get_location_hierarchy_for_geocode(self, lat, long): return self.location_tree.get_location_hierarchy_for_geocode( lat, long) def get_centroid(self, location, level): return self.location_tree.get_centroid(location,level) def get_location_hierarchy(self,lowest_level): self.get_location_hierarchy(lowest_level)
40.470588
87
0.792151
91
688
5.56044
0.274725
0.195652
0.27668
0.090909
0.274704
0
0
0
0
0
0
0
0.140988
688
16
88
43
0.856176
0
0
0
0
0
0
0
0
0
0
0
0
1
0.363636
false
0
0.090909
0.181818
0.727273
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
807b838282fb150e31445f38c3530dc0a69fc4e1
397
py
Python
letters/forms.py
deppiedave64/elternbrief
605c2eb455ec5d42a912198ed2c9663206924646
[ "Apache-2.0" ]
2
2019-05-26T16:43:52.000Z
2019-08-19T13:37:01.000Z
letters/forms.py
deppiedave64/elternbrief
605c2eb455ec5d42a912198ed2c9663206924646
[ "Apache-2.0" ]
1
2019-05-01T11:44:22.000Z
2019-05-06T18:06:52.000Z
letters/forms.py
deppiedave64/elternbrief
605c2eb455ec5d42a912198ed2c9663206924646
[ "Apache-2.0" ]
1
2019-05-06T12:57:49.000Z
2019-05-06T12:57:49.000Z
"""Form for the elternbrief application""" from django import forms class UserImportForm(forms.Form): """Simple form for uploading csv files for importing users.""" parents_file = forms.FileField(required=True, widget=forms.FileInput(attrs={'class': 'custom-file-input'})) students_file = forms.FileField(required=True, widget=forms.FileInput(attrs={'class': 'custom-file-input'}))
39.7
112
0.743073
50
397
5.86
0.56
0.047782
0.122867
0.177474
0.511945
0.511945
0.511945
0.511945
0.511945
0.511945
0
0
0.11335
397
9
113
44.111111
0.832386
0.234257
0
0
0
0
0.150171
0
0
0
0
0
0
1
0
false
0
0.5
0
1.25
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
808ae77129fa40da302f8269d77898d8b75826d7
236
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_hub_connector_domain.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_hub_connector_domain.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_hub_connector_domain.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
import frappe def execute(): if frappe.db.table_exists("Data Migration Connector"): frappe.db.sql(""" UPDATE `tabData Migration Connector` SET hostname = 'https://hubmarket.org' WHERE connector_name = 'Hub Connector' """)
26.222222
55
0.707627
29
236
5.689655
0.758621
0.09697
0
0
0
0
0
0
0
0
0
0
0.15678
236
9
56
26.222222
0.829146
0
0
0
0
0
0.637131
0
0
0
0
0
0
1
0.125
true
0
0.125
0
0.25
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
809a619f8c01da372e073aa7979ece38d58690dc
172
py
Python
towel/resources/__init__.py
enterstudio/towel
6892788527b8a111cbf5963e909964aabc96d740
[ "BSD-3-Clause" ]
null
null
null
towel/resources/__init__.py
enterstudio/towel
6892788527b8a111cbf5963e909964aabc96d740
[ "BSD-3-Clause" ]
null
null
null
towel/resources/__init__.py
enterstudio/towel
6892788527b8a111cbf5963e909964aabc96d740
[ "BSD-3-Clause" ]
null
null
null
# flake8: noqa from .base import (ModelResourceView, ListView, DetailView, FormView, AddView, EditView, LiveUpdateAfterEditMixin, LiveFormView, PickerView, DeleteView)
43
78
0.802326
15
172
9.2
1
0
0
0
0
0
0
0
0
0
0
0.006579
0.116279
172
3
79
57.333333
0.901316
0.069767
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
80a02d1625ef1cf572d03d09eb611ca20271d7eb
1,514
py
Python
src/sentry/plugins/bases/data_forwarding.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
src/sentry/plugins/bases/data_forwarding.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
src/sentry/plugins/bases/data_forwarding.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from sentry import tsdb, ratelimits from sentry.api.serializers import serialize from sentry.plugins.base import Plugin from sentry.plugins.base.configuration import react_plugin_config from sentry.plugins.status import PluginStatus class DataForwardingPlugin(Plugin): status = PluginStatus.BETA def configure(self, project, request): return react_plugin_config(self, project, request) def has_project_conf(self): return True def get_rate_limit(self): # number of requests, number of seconds (window) return (50, 1) def forward_event(self, payload): """ Forward the event and return a boolean if it was successful. """ raise NotImplementedError def get_event_payload(self, event): return serialize(event) def get_plugin_type(self): return "data-forwarding" def post_process(self, event, **kwargs): rl_key = u"{}:{}".format(self.conf_key, event.project.organization_id) # limit segment to 50 requests/second limit, window = self.get_rate_limit() if limit and window and ratelimits.is_limited(rl_key, limit=limit, window=window): return payload = self.get_event_payload(event) success = self.forward_event(event, payload) if success is False: # TODO(dcramer): record failure pass tsdb.incr(tsdb.models.project_total_forwarded, event.project.id, count=1)
31.541667
90
0.688243
189
1,514
5.349206
0.433862
0.049456
0.050445
0.041543
0
0
0
0
0
0
0
0.005159
0.231836
1,514
47
91
32.212766
0.864144
0.114927
0
0
0
0
0.015221
0
0
0
0
0.021277
0
1
0.233333
false
0.033333
0.2
0.166667
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
80db2ddc24af6510b5417ef8b83124fa15c9333f
21
py
Python
solutions/00_04.py
glemaitre/IBIOM-M2-deep-learning
001bf7834e57a7357326087d31049fc91ab8967f
[ "MIT" ]
null
null
null
solutions/00_04.py
glemaitre/IBIOM-M2-deep-learning
001bf7834e57a7357326087d31049fc91ab8967f
[ "MIT" ]
null
null
null
solutions/00_04.py
glemaitre/IBIOM-M2-deep-learning
001bf7834e57a7357326087d31049fc91ab8967f
[ "MIT" ]
null
null
null
digits["data"].shape
10.5
20
0.714286
3
21
5
1
0
0
0
0
0
0
0
0
0
0
0
0.047619
21
1
21
21
0.75
0
0
0
0
0
0.190476
0
0
0
0
0
0
1
0
true
0
0
0
0
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
0
0
0
0
0
4
80e7a85efb2c01a96d4e101b019122a6120fe0ef
55
py
Python
tests/__init__.py
oijkn/pyproject
381c810f4ec2f295ab2799220a560619bf07d03b
[ "MIT" ]
6
2021-04-15T11:49:34.000Z
2022-01-09T16:47:25.000Z
tests/__init__.py
oijkn/pyproject
381c810f4ec2f295ab2799220a560619bf07d03b
[ "MIT" ]
1
2021-11-24T17:07:46.000Z
2021-11-24T17:07:46.000Z
tests/__init__.py
oijkn/pyproject
381c810f4ec2f295ab2799220a560619bf07d03b
[ "MIT" ]
1
2021-11-24T17:09:23.000Z
2021-11-24T17:09:23.000Z
"""Automated testing gives you a good nights sleep."""
27.5
54
0.727273
8
55
5
1
0
0
0
0
0
0
0
0
0
0
0
0.145455
55
1
55
55
0.851064
0.872727
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
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
037e083024be95b238bd46911192b241364d3418
126
py
Python
simpletextgenerator/training_status.py
thtroyer/simple-text-generator
2b84d5fc5efa6311331210cabfb74e4305fcf947
[ "MIT" ]
1
2018-08-04T02:01:15.000Z
2018-08-04T02:01:15.000Z
simpletextgenerator/training_status.py
thtroyer/simple-text-generator
2b84d5fc5efa6311331210cabfb74e4305fcf947
[ "MIT" ]
21
2020-09-25T22:52:32.000Z
2021-07-07T01:40:27.000Z
simpletextgenerator/training_status.py
thtroyer/simple-text-generator
2b84d5fc5efa6311331210cabfb74e4305fcf947
[ "MIT" ]
1
2019-01-11T21:00:26.000Z
2019-01-11T21:00:26.000Z
class TrainingStatus: NEW = "NEW" NEW_LOAD_MODEL = "NEW_LOAD_MODEL" STARTED = "STARTED" FINISHED = "FINISHED"
21
37
0.65873
14
126
5.642857
0.5
0.151899
0.303797
0
0
0
0
0
0
0
0
0
0.238095
126
5
38
25.2
0.822917
0
0
0
0
0
0.253968
0
0
0
0
0
0
1
0
false
0
0
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
0
0
0
0
1
0
0
4
039c7891ccf5605eb88947c555b3f748ba52b68b
72
py
Python
bot/extensions.py
HarkonenBade/discord-bot
3321186b5df3d3453166db6d3c01e59d9860b4ed
[ "MIT" ]
null
null
null
bot/extensions.py
HarkonenBade/discord-bot
3321186b5df3d3453166db6d3c01e59d9860b4ed
[ "MIT" ]
null
null
null
bot/extensions.py
HarkonenBade/discord-bot
3321186b5df3d3453166db6d3c01e59d9860b4ed
[ "MIT" ]
null
null
null
import discord discord.Member.__str__ = lambda self: self.display_name
18
55
0.819444
10
72
5.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.111111
72
3
56
24
0.84375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
03b9226ae73738344bdc298309bfbc2fd7f0026a
968
py
Python
app_hotornot/migrations/0002_auto_20180910_1810.py
Audiotuete/backend_hotornot_api
0ef7025e0beed60420b2fcc048321e24cd2fb10a
[ "MIT" ]
null
null
null
app_hotornot/migrations/0002_auto_20180910_1810.py
Audiotuete/backend_hotornot_api
0ef7025e0beed60420b2fcc048321e24cd2fb10a
[ "MIT" ]
null
null
null
app_hotornot/migrations/0002_auto_20180910_1810.py
Audiotuete/backend_hotornot_api
0ef7025e0beed60420b2fcc048321e24cd2fb10a
[ "MIT" ]
null
null
null
# Generated by Django 2.0.8 on 2018-09-10 18:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app_hotornot', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='question', options={'ordering': ('order',)}, ), migrations.AlterModelOptions( name='questionmultiple', options={'ordering': ('order',)}, ), migrations.AlterModelOptions( name='questionopen', options={'ordering': ('order',)}, ), migrations.AlterModelOptions( name='questionyesorno', options={'ordering': ('order',)}, ), migrations.AddField( model_name='question', name='order', field=models.PositiveIntegerField(db_index=True, default=0, editable=False), preserve_default=False, ), ]
26.888889
88
0.549587
76
968
6.934211
0.565789
0.204934
0.235294
0.227704
0.290323
0.290323
0
0
0
0
0
0.030211
0.316116
968
35
89
27.657143
0.765861
0.046488
0
0.448276
1
0
0.152009
0
0
0
0
0
0
1
0
false
0
0.034483
0
0.137931
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
03f237798612410728d1392302fdbcf5340d700b
58
py
Python
hotsparser/__init__.py
HoTSStuff/HotSParser
b3cb39be68dad7864c28e14830af1987992da19e
[ "Apache-2.0" ]
null
null
null
hotsparser/__init__.py
HoTSStuff/HotSParser
b3cb39be68dad7864c28e14830af1987992da19e
[ "Apache-2.0" ]
null
null
null
hotsparser/__init__.py
HoTSStuff/HotSParser
b3cb39be68dad7864c28e14830af1987992da19e
[ "Apache-2.0" ]
null
null
null
""" A bottle app to parse Heroes of the Storm Replays """
14.5
49
0.689655
10
58
4
1
0
0
0
0
0
0
0
0
0
0
0
0.206897
58
3
50
19.333333
0.869565
0.844828
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
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
ff0b580c63ee3c2764fbb4f3b5b9de17f93ae82c
106
py
Python
meeting_rooms_ii/interval.py
mvgiacomello/leetcode-solutions
7b204131a6b381e8c0879bcda58c18ccb45a36f8
[ "Apache-2.0" ]
null
null
null
meeting_rooms_ii/interval.py
mvgiacomello/leetcode-solutions
7b204131a6b381e8c0879bcda58c18ccb45a36f8
[ "Apache-2.0" ]
null
null
null
meeting_rooms_ii/interval.py
mvgiacomello/leetcode-solutions
7b204131a6b381e8c0879bcda58c18ccb45a36f8
[ "Apache-2.0" ]
null
null
null
class Interval: def __init__(self, start=0, end=0): self.start = start self.end = end
21.2
39
0.584906
15
106
3.866667
0.533333
0.310345
0
0
0
0
0
0
0
0
0
0.027027
0.301887
106
4
40
26.5
0.756757
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
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
0
0
0
4
ff1892ac3b18a1fed71e89982330d87fe89022fb
1,456
py
Python
ejercicio1/ej1.py
mariaSerrabona/ejercicioPOO
989726294e5614e57a510511802dbbcfe94e966a
[ "Apache-2.0" ]
null
null
null
ejercicio1/ej1.py
mariaSerrabona/ejercicioPOO
989726294e5614e57a510511802dbbcfe94e966a
[ "Apache-2.0" ]
null
null
null
ejercicio1/ej1.py
mariaSerrabona/ejercicioPOO
989726294e5614e57a510511802dbbcfe94e966a
[ "Apache-2.0" ]
null
null
null
class Libro: #definimos todos los atributos que caracteizan a un libro isbn=0 #texto autor=0 titito=0 #texto año_de_publicacion=0 #texto idioma=0 #texto editor=0 ejemplares=0 #texto #ahora creamos el constructor def __init__(self, isbn,autor, titulo, año_de_publicacion, idioma,editor, ejemplares): self._isbn=isbn self._autor=autor self._titulo=titulo self._año_de_publicacion=año_de_publicacion self._idioma=idioma self._editor=editor self._ejemplares=ejemplares def getISBN(self): return self._isbn def setISBN(self, isbn): self._isbn=isbn def getAutor(self): return self._autor def setAutor(self, autor): self._autor=autor def getTitulo(self): return self._titulo def setTitulo(self, titulo): self._titulo=titulo def getAñoPublicacion(self): return self._año_de_publicacion def setAñoPublicacion(self, año_de_publicacion): self._año_de_publicacion=año_de_publicacion def getIdidoma(self): return self._idioma def setIdioma(self, idioma): self._idioma=idioma def getEditor(self): return self._editor def setEditor(self, editor): self._editor=editor def getEjemplares(self): return self._ejemplares def setEjemplares(self, ejemplares): self._ejemplares=ejemplares
24.266667
90
0.659341
172
1,456
5.343023
0.255814
0.043526
0.139282
0.087051
0.078346
0.078346
0.078346
0
0
0
0
0.006548
0.265797
1,456
59
91
24.677966
0.853134
0.074863
0
0.318182
0
0
0
0
0
0
0
0.016949
0
1
0.340909
false
0
0
0.159091
0.681818
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
ff18ee4e98b9d4de5b39e4cd8b584c99f340c38b
3,723
py
Python
autorequests/lib/url.py
Hexiro/autorequests
53923e6f089a34f5cc0babeed305c9b63f8f489b
[ "MIT" ]
29
2021-05-28T20:13:45.000Z
2022-03-24T22:26:07.000Z
autorequests/lib/url.py
Hexiro/autorequests
53923e6f089a34f5cc0babeed305c9b63f8f489b
[ "MIT" ]
5
2021-06-19T12:51:56.000Z
2021-10-17T01:43:18.000Z
autorequests/lib/url.py
Hexiro/autorequests
53923e6f089a34f5cc0babeed305c9b63f8f489b
[ "MIT" ]
3
2021-06-07T16:27:06.000Z
2021-07-20T20:49:38.000Z
import urllib.parse from typing import Dict, Optional, Tuple, Union, Any from ..utilities import parse_url_encoded class URL: def __init__(self, url: str): """ Uniform Resource Locator (URL) as per <scheme>://<net_loc>/<path>;<params>?<query>#<fragment> """ # https://www.rfc-editor.org/rfc/rfc1808.html#section-2.1 # urlsplit automatically appends `params` to the end of path parsed = urllib.parse.urlsplit(url) self._protocol: str = parsed.scheme self._path: str = parsed.path self._query: Dict[str, str] = parse_url_encoded(parsed.query) self._fragment: str = parsed.fragment # <user>:<password>@<host>:<port> # https://www.rfc-editor.org/rfc/rfc1738#section-3.1 self._network_location: str = parsed.netloc self._username: Optional[str] = None self._password: Optional[str] = None self._domain: str self._domain_name: str self._subdomain: Optional[str] = None # it would also make sense to default this to 80 # None means that there is none set explicitly in the url, however self._port: Optional[int] = None self._username, self._password, host = self._credentials(self._network_location) self._domain, self._port = self._domain_and_port(host) # subdomain, domain (this might break with domains like .co.uk) if self._domain.count(".") >= 2: self._subdomain, self._domain = self._domain.split(".", maxsplit=1) # domain name self._domain_name = self._domain.split(".")[0] def __repr__(self) -> str: return f"<URL {self.url}>" def __str__(self) -> str: return self.url def __eq__(self, other: Any) -> bool: if not isinstance(other, URL): return NotImplemented return self.url == other.url def __hash__(self) -> int: return hash(self.url) @staticmethod def _domain_and_port(host: str) -> Tuple[str, Optional[int]]: if ":" not in host: return host, None split = host.split(":", maxsplit=1) domain = split[0] port = int(split[1]) if split[1].isdigit() else None return domain, port @staticmethod def _credentials(network_location: str) -> Union[Tuple[Optional[str], Optional[str], str]]: if "@" not in network_location: return None, None, network_location credentials, host = network_location.split("@", maxsplit=1) username, password = credentials.split(":", maxsplit=1) return username, password, host @property def url(self) -> str: """url without query string params""" return f"{self.protocol}://{self.network_location}{self.path}{'#'+self.fragment if self.fragment else ''}" @property def protocol(self) -> str: return self._protocol @property def path(self) -> str: return self._path @property def query(self) -> Dict[str, str]: return self._query @property def fragment(self) -> str: return self._fragment @property def network_location(self) -> str: return self._network_location @property def username(self) -> Optional[str]: return self._username @property def password(self) -> Optional[str]: return self._password @property def domain(self) -> str: return self._domain @property def domain_name(self) -> str: return self._domain_name @property def subdomain(self) -> Optional[str]: return self._subdomain @property def port(self) -> Optional[int]: return self._port
30.268293
114
0.61617
452
3,723
4.900442
0.243363
0.058691
0.06456
0.053725
0.075395
0.020767
0
0
0
0
0
0.0084
0.264572
3,723
122
115
30.516393
0.800584
0.136449
0
0.168675
0
0.012048
0.037867
0.022089
0
0
0
0
0
1
0.228916
false
0.072289
0.036145
0.168675
0.53012
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
2066b92f0892bbd77a5f681cd411e3e398849986
146
py
Python
modder/utils/__init__.py
JokerQyou/ModderZ
a7ca9945a7010dac8f44c4c74659ce82e4fb20ff
[ "MIT" ]
1
2018-05-22T05:14:12.000Z
2018-05-22T05:14:12.000Z
modder/utils/__init__.py
JokerQyou/ModderZ
a7ca9945a7010dac8f44c4c74659ce82e4fb20ff
[ "MIT" ]
1
2017-10-22T15:34:48.000Z
2017-10-22T15:36:14.000Z
modder/utils/__init__.py
JokerQyou/ModderZ
a7ca9945a7010dac8f44c4c74659ce82e4fb20ff
[ "MIT" ]
null
null
null
# coding: utf-8 from .log_utils import get_logger from .desktop_notification import desktop_notify __all__ = ['get_logger', 'desktop_notify', ]
20.857143
48
0.780822
20
146
5.2
0.65
0.173077
0
0
0
0
0
0
0
0
0
0.007813
0.123288
146
6
49
24.333333
0.804688
0.089041
0
0
0
0
0.183206
0
0
0
0
0
0
1
0
false
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
0
0
1
0
1
0
0
4
206af13aebc968fd12aa51512f1c5756217c335d
105
py
Python
tests/modules/module1.py
rhhayward/py_load_modules
e5ad3e5f10a1512f19cb4364e9dfbae452a6fee0
[ "MIT" ]
null
null
null
tests/modules/module1.py
rhhayward/py_load_modules
e5ad3e5f10a1512f19cb4364e9dfbae452a6fee0
[ "MIT" ]
null
null
null
tests/modules/module1.py
rhhayward/py_load_modules
e5ad3e5f10a1512f19cb4364e9dfbae452a6fee0
[ "MIT" ]
null
null
null
from test_loading import SuperClass class SubClassOne(SuperClass): def __init__(self): pass
17.5
35
0.733333
12
105
6
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.209524
105
5
36
21
0.86747
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
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
1
0
1
0
0
0
0
0
4
2078f7148228a23275a8f3ba53ecebe4c8d03ed6
70
py
Python
man.py
MiltFra/HackTheBurgh2020
80b80c8ddf4d587555ccc40c07456e7b7270901b
[ "MIT" ]
null
null
null
man.py
MiltFra/HackTheBurgh2020
80b80c8ddf4d587555ccc40c07456e7b7270901b
[ "MIT" ]
null
null
null
man.py
MiltFra/HackTheBurgh2020
80b80c8ddf4d587555ccc40c07456e7b7270901b
[ "MIT" ]
null
null
null
import autotrader autotrader.send_order("SP-FUTURE", "BUY", 2933,197)
23.333333
51
0.771429
10
70
5.3
0.9
0
0
0
0
0
0
0
0
0
0
0.107692
0.071429
70
3
51
23.333333
0.707692
0
0
0
0
0
0.169014
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
2082eba95848e8bc35846d0d92262cf32f8e8b14
31,277
py
Python
tests/test_models.py
p768lwy3/torecsys
2251366268b4fbe6f8c3ab1628fa72a0db043dcd
[ "MIT" ]
92
2019-08-15T11:03:50.000Z
2022-03-12T01:21:05.000Z
tests/test_models.py
p768lwy3/torecsys
2251366268b4fbe6f8c3ab1628fa72a0db043dcd
[ "MIT" ]
3
2020-03-11T08:57:50.000Z
2021-01-06T01:39:47.000Z
tests/test_models.py
p768lwy3/torecsys
2251366268b4fbe6f8c3ab1628fa72a0db043dcd
[ "MIT" ]
16
2019-10-12T11:28:53.000Z
2022-03-28T14:04:12.000Z
import unittest from functools import partial import torch import torch.nn as nn from parameterized import parameterized from torchinfo import summary from torecsys.miners import UniformBatchMiner from torecsys.models import * from torecsys.utils.operations import inner_product_similarity device = 'cuda:0' if torch.cuda.is_available() else 'cpu' class AttentionalFactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = AttentionalFactorizationMachineModel( embed_size=embed_size, num_fields=num_fields, attn_size=16, use_bias=True, dropout_p=0.9 ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class DeepAndCrossNetworkModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 1 model = DeepAndCrossNetworkModel( inputs_size=embed_size, num_fields=num_fields, deep_output_size=4, deep_layer_sizes=[32, 16, 8], cross_num_layers=4, output_size=output_size, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU6() ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class DeepFieldAwareFactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = DeepFieldAwareFactorizationMachineModel( embed_size=embed_size, num_fields=num_fields, deep_output_size=4, deep_layer_sizes=[32, 16, 8], ffm_dropout_p=0.9, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU6() ) model = model.to(device) # Generate inputs for the layer field_emb_inp = torch.rand(batch_size, num_fields ** 2, embed_size) field_emb_inp.names = ('B', 'N', 'E',) field_emb_inp_size = field_emb_inp.size() summary(model, input_size=[field_emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(field_emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class DeepFactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = DeepFactorizationMachineModel( embed_size=embed_size, num_fields=num_fields, deep_layer_sizes=[16, 16, 16], fm_dropout_p=0.9, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class DeepMatchingCorrelationPredictionModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 16, 128), (16, 6, 32, 64), (32, 12, 64, 8) ]) def test_forward(self, batch_size: int, user_num_fields: int, item_num_fields: int, embed_size: int): model = DeepMatchingCorrelationPredictionModel( embed_size=embed_size, user_num_fields=user_num_fields, item_num_fields=item_num_fields, corr_output_size=8, match_output_size=8, corr_layer_sizes=[16, 16, 16], match_layer_sizes=[16, 16, 16], pred_layer_sizes=[16, 16, 16], corr_dropout_p=[0.9, 0.9, 0.9], match_dropout_p=[0.9, 0.9, 0.9], pred_dropout_p=[0.9, 0.9, 0.9], corr_activation=nn.ReLU(), match_activation=nn.ReLU(), pred_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer user_emb_inp = torch.rand(batch_size, user_num_fields, embed_size) user_emb_inp.names = ('B', 'N', 'E',) user_emb_inp_size = user_emb_inp.size() content_emb_inp = torch.rand(batch_size, item_num_fields, embed_size) content_emb_inp.names = ('B', 'N', 'E',) content_emb_inp_size = content_emb_inp.size() pos_emb_inp = torch.rand(batch_size, item_num_fields, embed_size) pos_emb_inp.names = ('B', 'N', 'E',) pos_emb_inp_size = pos_emb_inp.size() # num_neg_samples = 16 neg_emb_inp = torch.rand(batch_size, item_num_fields, embed_size) neg_emb_inp.names = ('B', 'N', 'E',) neg_emb_inp_size = neg_emb_inp.size() summary(model, input_size=[user_emb_inp_size, content_emb_inp_size, pos_emb_inp_size, neg_emb_inp_size], device=device, dtypes=[torch.float, torch.float, torch.float, torch.float]) # Forward y_pred, y_match, y_corr_pos, y_corr_neg = model.forward(user_emb_inp, content_emb_inp, pos_emb_inp, neg_emb_inp) self.assertEqual(y_pred.size(), (batch_size, 1)) self.assertEqual(y_match.size(), (batch_size, 1)) self.assertEqual(y_corr_pos.size(), (batch_size, 1)) self.assertEqual(y_corr_neg.size(), (batch_size, 1)) print(f'y_pred Size: {y_pred.size()},\n' f'y_match Size: {y_match.size()},\n' f'y_corr_pos Size: {y_corr_pos.size()},\n' f'y_corr_neg Size: {y_corr_neg.size()},\n') class DeepMixtureOfExpertsModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = DeepMixtureOfExpertsModel( embed_size=embed_size, num_fields=num_fields, num_experts=4, moe_layer_sizes=[16, 16, 16], deep_layer_sizes=[16, 16, 16], deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class ElaboratedEntireSpaceSupervisedMultiTaskModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = ElaboratedEntireSpaceSupervisedMultiTaskModel( num_fields=num_fields, layer_sizes=[16, 16, 16], dropout_p=[0.9, 0.9, 0.9], activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward prob_impress_to_click, prob_impress_to_d_action, prob_impress_to_buy = model.forward(emb_inp) self.assertEqual(prob_impress_to_click.size(), (batch_size, 1)) self.assertEqual(prob_impress_to_d_action.size(), (batch_size, 1)) self.assertEqual(prob_impress_to_buy.size(), (batch_size, 1)) print(f'Prob impress to click Size: {prob_impress_to_click.size()},\n' f'Prob impress to d action Size: {prob_impress_to_d_action.size()},\n' f'Prob impress to buy Size: {prob_impress_to_buy.size()},\n') class EntireSpaceMultiTaskModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = EntireSpaceMultiTaskModel( num_fields=num_fields, layer_sizes=[16, 16, 16], dropout_p=[0.9, 0.9, 0.9], activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward pcvr, pctr = model.forward(emb_inp) self.assertEqual(pcvr.size(), (batch_size, 1)) self.assertEqual(pctr.size(), (batch_size, 1)) print(f'pcvr Size: {pcvr.size()}\n' f'pctr Size: {pctr.names}') class FactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = FactorizationMachineModel(dropout_p=0.9) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class FactorizationMachineSupportedNeuralNetworkModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 4 model = FactorizationMachineSupportedNeuralNetworkModel( embed_size=embed_size, num_fields=num_fields, deep_output_size=output_size, deep_layer_sizes=[32, 32, 16], fm_dropout_p=0.9, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class FieldAttentiveDeepFieldAwareFactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 16 model = FieldAttentiveDeepFieldAwareFactorizationMachineModel( embed_size=embed_size, num_fields=num_fields, deep_output_size=output_size, deep_layer_sizes=[32, 32, 16], reduction=2, ffm_dropout_p=0.9, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer field_emb_inp = torch.rand(batch_size, num_fields ** 2, embed_size) field_emb_inp.names = ('B', 'N', 'E',) field_emb_inp_size = field_emb_inp.size() summary(model, input_size=[field_emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(field_emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class FieldAwareFactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = FieldAwareFactorizationMachineModel( num_fields=num_fields, dropout_p=0.9 ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() field_emb_inp = torch.rand(batch_size, num_fields ** 2, embed_size) field_emb_inp.names = ('B', 'N', 'E',) field_emb_inp_size = field_emb_inp.size() summary(model, input_size=[feat_inp_size, field_emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, field_emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class FeatureImportanceAndBilinearFeatureInteractionNetworkTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 1 model = FeatureImportanceAndBilinearFeatureInteractionNetwork( embed_size=embed_size, num_fields=num_fields, senet_reduction=4, deep_output_size=output_size, deep_layer_sizes=[16, 16, 16], bilinear_type='all', bilinear_bias=True, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU6() ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class LearningToRankWrapperTestCase(unittest.TestCase): @parameterized.expand([ (8, 128), (16, 64), (32, 8) ]) def test_forward(self, batch_size: int, embed_size: int): sample_size = 10 miner = UniformBatchMiner(sample_size=sample_size) model = MatrixFactorizationModel() wrapped = LearningToRankWrapper(model=model) wrapped = wrapped.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, 2, embed_size) # mine negative samples with miner # outputs: p, shape = (B, N, E) # outputs: n, shape = (B * N Neg, N, E) p, n = miner(emb_inp[:, 0], emb_inp[:, 1]) p.names = ('B', 'N', 'E',) n.names = ('B', 'N', 'E',) # p_size = p.size() # n_size = n.size() # summary(wrapped, input_size=[p_size, n_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = wrapped.forward(pos_inputs={'emb_inputs': p}, neg_inputs={'emb_inputs': n}) self.assertEqual(outputs['pos_outputs'].size(), (batch_size, 1)) self.assertEqual(outputs['neg_outputs'].size(), (batch_size * sample_size, 1)) print(f'Pos Output Size: {outputs["pos_outputs"].size()},\n' f'Pos Output Dimensions: {outputs["pos_outputs"].names},\n' f'Neg Output Size: {outputs["neg_outputs"].size()},\n' f'NegOutput Dimensions: {outputs["neg_outputs"].names}') class LogisticRegressionModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 1 model = LogisticRegressionModel( inputs_size=num_fields * embed_size, output_size=output_size ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class MatrixFactorizationModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 128), (16, 64), (32, 8) ]) def test_forward(self, batch_size: int, embed_size: int): model = MatrixFactorizationModel() model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, 2, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class MultiGateMixtureOfExpertsModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = MultiGateMixtureOfExpertsModel( embed_size=embed_size, num_fields=num_fields, num_tasks=4, num_experts=4, expert_output_size=1, expert_layer_sizes=[16, 16, 16], deep_layer_sizes=[16, 16, 16], expert_dropout_p=[0.9, 0.9, 0.9], deep_dropout_p=[0.9, 0.9, 0.9], expert_activation=nn.ReLU6(), deep_activation=nn.ReLU6() ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class NeuralCollaborativeFilteringModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 128), (16, 64), (32, 8) ]) def test_forward(self, batch_size: int, embed_size: int): model = NeuralCollaborativeFilteringModel( embed_size=embed_size, deep_output_size=8, deep_layer_sizes=[16, 16, 16], deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU6() ) model = model.to(device) # Generate inputs for the layer emb_inp = torch.rand(batch_size, 2, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[emb_inp_size], device=device, dtypes=[torch.float]) # Forward outputs = model.forward(emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class NeuralFactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): model = NeuralFactorizationMachineModel( embed_size=embed_size, deep_layer_sizes=[16, 16, 16], use_bias=True, fm_dropout_p=0.9, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class PersonalizedReRankingModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, length: int, embed_size: int): model = PersonalizedReRankingModel( embed_size=embed_size, max_num_position=length, encoding_size=16, num_heads=4, num_layers=2, use_bias=True, dropout=0.9, fnn_dropout_p=0.9, fnn_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.randint(0, length, (batch_size, length, embed_size)) feat_inp.names = ('B', 'L', 'E',) feat_inp_size = feat_inp.size() summary(model, input_size=[feat_inp_size], device=device, dtypes=[torch.int]) # Forward outputs = model.forward(feat_inp) self.assertEqual(outputs.size(), (batch_size, length)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class PositionBiasAwareLearningFrameworkModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): max_num_position = 32 pctr_model = NeuralFactorizationMachineModel( embed_size=embed_size, deep_layer_sizes=[16, 16, 16], use_bias=True, fm_dropout_p=0.9, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = PositionBiasAwareLearningFrameworkModel( pctr_model=pctr_model, output_size=1, max_num_position=max_num_position, layer_sizes=[16, 16, 16], dropout_p=[0.9, 0.9, 0.9], activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) # feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) # emb_inp_size = emb_inp.size() pos_inp = torch.randint(0, max_num_position, (batch_size,)) pos_inp.names = ('B',) # summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward({'feat_inputs': feat_inp, 'emb_inputs': emb_inp}, pos_inp) self.assertEqual(outputs.size(), (batch_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class ProductNeuralNetworkModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 1 model = ProductNeuralNetworkModel( embed_size=embed_size, num_fields=num_fields, deep_layer_sizes=[64, 32, 16], output_size=output_size, prod_method='outer', use_bias=True, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU6(), kernel_type='mat' ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class StarSpaceModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 128), (16, 64), (32, 8) ]) def test_forward(self, batch_size: int, embed_size: int): num_neg = 16 model = StarSpaceModel( embed_size=embed_size, num_neg=num_neg, similarity=partial(inner_product_similarity, dim=2) ) model = model.to(device) # Generate inputs for the layer samples_size = batch_size * (1 + num_neg) context_inp = torch.rand(samples_size, 1, embed_size) context_inp.names = ('B', 'N', 'E',) context_inp_size = context_inp.size() target_inp = torch.rand(samples_size, 1, embed_size) target_inp.names = ('B', 'N', 'E',) target_inp_size = target_inp.size() summary(model, input_size=[context_inp_size, target_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(context_inp, target_inp) self.assertEqual(outputs.size(), (samples_size, 1)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class WideAndDeepModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 1 model = WideAndDeepModel( embed_size=embed_size, num_fields=num_fields, deep_layer_sizes=[64, 32, 16], out_dropout_p=None, wide_dropout_p=None, deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') class XDeepFactorizationMachineModelTestCase(unittest.TestCase): @parameterized.expand([ (8, 4, 128), (16, 6, 64), (32, 12, 8) ]) def test_forward(self, batch_size: int, num_fields: int, embed_size: int): output_size = 1 model = XDeepFactorizationMachineModel( embed_size=embed_size, num_fields=num_fields, cin_layer_sizes=[64, 32, 16], deep_layer_sizes=[64, 32, 16], cin_is_direct=False, cin_use_bias=True, cin_use_batchnorm=True, cin_activation=nn.ReLU6(), deep_dropout_p=[0.9, 0.9, 0.9], deep_activation=nn.ReLU() ) model = model.to(device) # Generate inputs for the layer feat_inp = torch.rand(batch_size, num_fields, 1) feat_inp.names = ('B', 'N', 'E',) feat_inp_size = feat_inp.size() emb_inp = torch.rand(batch_size, num_fields, embed_size) emb_inp.names = ('B', 'N', 'E',) emb_inp_size = emb_inp.size() summary(model, input_size=[feat_inp_size, emb_inp_size], device=device, dtypes=[torch.float, torch.float]) # Forward outputs = model.forward(feat_inp, emb_inp) self.assertEqual(outputs.size(), (batch_size, output_size)) print(f'Output Size: {outputs.size()}, Output Dimensions: {outputs.names}') if __name__ == '__main__': unittest.main()
35.868119
120
0.606548
3,950
31,277
4.552152
0.051392
0.051054
0.041711
0.009343
0.777209
0.752961
0.722596
0.712085
0.690618
0.676381
0
0.032283
0.266138
31,277
871
121
35.9093
0.7511
0.043866
0
0.678733
0
0
0.072477
0.009215
0
0
0
0
0.048265
1
0.037707
false
0
0.016591
0
0.092006
0.037707
0
0
0
null
0
0
0
0
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
4
209b4832e26e988eb960b624c76045725c96386e
19
py
Python
ox_ui/assets/css/__init__.py
emin63/ox_ui
207c9acebb1f2ed90cb0142355601800bab13d4c
[ "BSD-2-Clause" ]
2
2019-10-08T04:06:37.000Z
2021-12-20T18:35:31.000Z
ox_ui/assets/css/__init__.py
emin63/ox_ui
207c9acebb1f2ed90cb0142355601800bab13d4c
[ "BSD-2-Clause" ]
4
2022-03-15T19:08:37.000Z
2022-03-31T17:39:43.000Z
ox_ui/assets/css/__init__.py
emin63/ox_ui
207c9acebb1f2ed90cb0142355601800bab13d4c
[ "BSD-2-Clause" ]
null
null
null
"""CSS assets. """
6.333333
14
0.473684
2
19
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.157895
19
2
15
9.5
0.5625
0.578947
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
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
20aece9f220b001ef699f0cf1c72a7216e8e517e
12,261
py
Python
api/python/tests/test_ml_featurizers.py
Nitin0309/Nitin-indigo-bugs
71f16ec2930fde8d46a6e6a0481b94e291c80f79
[ "Apache-2.0" ]
null
null
null
api/python/tests/test_ml_featurizers.py
Nitin0309/Nitin-indigo-bugs
71f16ec2930fde8d46a6e6a0481b94e291c80f79
[ "Apache-2.0" ]
null
null
null
api/python/tests/test_ml_featurizers.py
Nitin0309/Nitin-indigo-bugs
71f16ec2930fde8d46a6e6a0481b94e291c80f79
[ "Apache-2.0" ]
null
null
null
import torch # type: ignore from indigo.ml.mpp.featurizers import ( # type: ignore acid_pka_values, aromatic_bonds, atom_in_ring, atomic_charges, atomic_degrees, atomic_isotopes, atomic_masses, atomic_number, atomic_radicals, atomic_valences, basic_pka_values, bond_order, bond_stereo, implicit_hydrogens, stereocenter_types, topologies, ) from tests import TestIndigoBase class TestIndigoFeaturizers(TestIndigoBase): def assertTensorEqual(self, input: dict, expected: dict): for input_key, expected_key in zip(input, expected): assert input_key == expected_key assert torch.equal(input[input_key], expected[expected_key]) def test_node_featurizers(self): m1 = self.indigo.loadMolecule("c1ccccc1") m2 = self.indigo.loadMolecule("[2H][H]") m3 = self.indigo.loadMolecule("C[CH2]") m4 = self.indigo.loadMolecule("C1CC[C@H]([C@H](C1)Cl)Br") self.assertTensorEqual( atomic_number(m1), {"atomic": torch.tensor([6, 6, 6, 6, 6, 6]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_number(m2), {"atomic": torch.tensor([1, 1]).unsqueeze(1)} ) self.assertTensorEqual( atomic_number(m3), {"atomic": torch.tensor([6, 6]).unsqueeze(1)} ) self.assertTensorEqual( atomic_number(m4), {"atomic": torch.tensor([6, 6, 6, 6, 6, 6, 17, 35]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_degrees(m1), {"degrees": torch.tensor([2, 2, 2, 2, 2, 2]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_degrees(m2), {"degrees": torch.tensor([1, 1]).unsqueeze(1)} ) self.assertTensorEqual( atomic_degrees(m3), {"degrees": torch.tensor([1, 1]).unsqueeze(1)} ) self.assertTensorEqual( atomic_degrees(m4), {"degrees": torch.tensor([2, 2, 2, 3, 3, 2, 1, 1]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_isotopes(m1), {"isotopes": torch.tensor([0, 0, 0, 0, 0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_isotopes(m2), {"isotopes": torch.tensor([2, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_isotopes(m3), {"isotopes": torch.tensor([0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_isotopes(m4), {"isotopes": torch.tensor([0, 0, 0, 0, 0, 0, 0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_charges(m1), {"charges": torch.tensor([0, 0, 0, 0, 0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_charges(m2), {"charges": torch.tensor([0, 0]).unsqueeze(1)} ) self.assertTensorEqual( atomic_charges(m3), {"charges": torch.tensor([0, 0]).unsqueeze(1)} ) self.assertTensorEqual( atomic_charges(m4), {"charges": torch.tensor([0, 0, 0, 0, 0, 0, 0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_valences(m1), {"valences": torch.tensor([4, 4, 4, 4, 4, 4]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_valences(m2), {"valences": torch.tensor([1, 1]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_valences(m3), {"valences": torch.tensor([4, 4]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_valences(m4), {"valences": torch.tensor([4, 4, 4, 4, 4, 4, 1, 1]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_radicals(m1), {"radicals": torch.tensor([0, 0, 0, 0, 0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_radicals(m2), {"radicals": torch.tensor([0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_radicals(m3), {"radicals": torch.tensor([0, 1]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_radicals(m4), {"radicals": torch.tensor([0, 0, 0, 0, 0, 0, 0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atom_in_ring(m1), { "in_aromatic_ring": torch.tensor([1, 1, 1, 1, 1, 1]).unsqueeze( 1 ) }, ) self.assertTensorEqual( atom_in_ring(m2), {"in_aromatic_ring": torch.tensor([0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atom_in_ring(m3), {"in_aromatic_ring": torch.tensor([0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( atom_in_ring(m4), { "in_aromatic_ring": torch.tensor( [0, 0, 0, 0, 0, 0, 0, 0] ).unsqueeze(1) }, ) self.assertTensorEqual( stereocenter_types(m1), { "stereocenter_types": torch.tensor( [0, 0, 0, 0, 0, 0] ).unsqueeze(1) }, ) self.assertTensorEqual( stereocenter_types(m2), {"stereocenter_types": torch.tensor([0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( stereocenter_types(m3), {"stereocenter_types": torch.tensor([0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( stereocenter_types(m4), { "stereocenter_types": torch.tensor( [0, 0, 0, 1, 1, 0, 0, 0] ).unsqueeze(1) }, ) self.assertTensorEqual( implicit_hydrogens(m1), { "implicit_hydrogens": torch.tensor( [1, 1, 1, 1, 1, 1] ).unsqueeze(1) }, ) self.assertTensorEqual( implicit_hydrogens(m2), {"implicit_hydrogens": torch.tensor([0, 0]).unsqueeze(1)}, ) self.assertTensorEqual( implicit_hydrogens(m3), {"implicit_hydrogens": torch.tensor([3, 2]).unsqueeze(1)}, ) self.assertTensorEqual( implicit_hydrogens(m4), { "implicit_hydrogens": torch.tensor( [2, 2, 2, 1, 1, 2, 0, 0] ).unsqueeze(1) }, ) self.assertTensorEqual( acid_pka_values(m1), { "acid_pka_values": torch.tensor( [100.0, 100.0, 100.0, 100.0, 100.0, 100.0] ).unsqueeze(1) }, ) self.assertTensorEqual( acid_pka_values(m2), {"acid_pka_values": torch.tensor([100.0, 100.0]).unsqueeze(1)}, ) self.assertTensorEqual( acid_pka_values(m3), {"acid_pka_values": torch.tensor([100.0, 100.0]).unsqueeze(1)}, ) self.assertTensorEqual( acid_pka_values(m4), { "acid_pka_values": torch.tensor( [100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0] ).unsqueeze(1) }, ) self.assertTensorEqual( basic_pka_values(m1), { "basic_pka_values": torch.tensor( [-100.0, -100.0, -100.0, -100.0, -100.0, -100.0] ).unsqueeze(1) }, ) self.assertTensorEqual( basic_pka_values(m2), {"basic_pka_values": torch.tensor([-100.0, -100.0]).unsqueeze(1)}, ) self.assertTensorEqual( basic_pka_values(m3), {"basic_pka_values": torch.tensor([-100.0, -100.0]).unsqueeze(1)}, ) self.assertTensorEqual( basic_pka_values(m4), { "basic_pka_values": torch.tensor( [ -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, ] ).unsqueeze(1) }, ) self.assertTensorEqual( atomic_masses(m1), { "atomic_masses": torch.tensor( [12.0107, 12.0107, 12.0107, 12.0107, 12.0107, 12.0107] ).unsqueeze(1) }, ) self.assertTensorEqual( atomic_masses(m2), {"atomic_masses": torch.tensor([2.0141, 1.0079]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_masses(m3), {"atomic_masses": torch.tensor([12.0107, 12.0107]).unsqueeze(1)}, ) self.assertTensorEqual( atomic_masses(m4), { "atomic_masses": torch.tensor( [ 12.0107, 12.0107, 12.0107, 12.0107, 12.0107, 12.0107, 35.4530, 79.9040, ] ).unsqueeze(1) }, ) def test_edge_featurizers(self): m1 = self.indigo.loadMolecule("c1ccccc1") m2 = self.indigo.loadMolecule("[2H][H]") m3 = self.indigo.loadMolecule("C[CH2]") m4 = self.indigo.loadMolecule("C1CC[C@H]([C@H](C1)Cl)Br") self.assertTensorEqual( bond_order(m1), { "orders": torch.tensor( [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4] ).unsqueeze(1) }, ) self.assertTensorEqual( bond_order(m2), {"orders": torch.tensor([1, 1]).unsqueeze(1)} ) self.assertTensorEqual( bond_order(m3), {"orders": torch.tensor([1, 1]).unsqueeze(1)} ) self.assertTensorEqual( bond_order(m4), { "orders": torch.tensor( [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ).unsqueeze(1) }, ) self.assertTensorEqual( topologies(m1), { "topologies": torch.tensor( [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10] ).unsqueeze(1) }, ) self.assertTensorEqual( topologies(m2), {"topologies": torch.tensor([9, 9]).unsqueeze(1)} ) self.assertTensorEqual( topologies(m3), {"topologies": torch.tensor([9, 9]).unsqueeze(1)} ) self.assertTensorEqual( topologies(m4), { "topologies": torch.tensor( [10, 10, 10, 10, 10, 10, 9, 9, 10, 10, 10, 10, 10, 10, 9, 9] ).unsqueeze(1) }, ) self.assertTensorEqual( aromatic_bonds(m1), { "is_aromatic": torch.tensor( [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ).unsqueeze(1) }, ) self.assertTensorEqual( aromatic_bonds(m2), {"is_aromatic": torch.tensor([0, 0]).unsqueeze(1)} ) self.assertTensorEqual( aromatic_bonds(m3), {"is_aromatic": torch.tensor([0, 0]).unsqueeze(1)} ) self.assertTensorEqual( aromatic_bonds(m4), { "is_aromatic": torch.tensor( [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ).unsqueeze(1) }, ) self.assertTensorEqual( bond_stereo(m1), { "bond_stereo": torch.tensor( [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ).unsqueeze(1) }, ) self.assertTensorEqual( bond_stereo(m2), {"bond_stereo": torch.tensor([0, 0]).unsqueeze(1)} ) self.assertTensorEqual( bond_stereo(m3), {"bond_stereo": torch.tensor([0, 0]).unsqueeze(1)} ) self.assertTensorEqual( bond_stereo(m4), { "bond_stereo": torch.tensor( [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ).unsqueeze(1) }, )
30.806533
79
0.473942
1,241
12,261
4.566479
0.070911
0.037762
0.04235
0.047291
0.844186
0.819305
0.756308
0.712017
0.643727
0.573143
0
0.094257
0.382187
12,261
397
80
30.884131
0.653861
0.002039
0
0.354667
0
0
0.06556
0.003924
0
0
0
0
0.178667
1
0.008
false
0
0.008
0
0.018667
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
20d19b350695aa68323ad69977b7e4d8c17c64f6
97
py
Python
labellines/__init__.py
Bobo529019686/matplotlib-label-lines
9cf37e99a8581f0477f6495433f09d284cc452e0
[ "MIT" ]
null
null
null
labellines/__init__.py
Bobo529019686/matplotlib-label-lines
9cf37e99a8581f0477f6495433f09d284cc452e0
[ "MIT" ]
null
null
null
labellines/__init__.py
Bobo529019686/matplotlib-label-lines
9cf37e99a8581f0477f6495433f09d284cc452e0
[ "MIT" ]
null
null
null
from .core import labelLine, labelLines __all__ = [labelLine, labelLines] __version__ = "0.5.1"
19.4
39
0.752577
12
97
5.416667
0.833333
0.584615
0
0
0
0
0
0
0
0
0
0.035714
0.134021
97
4
40
24.25
0.738095
0
0
0
0
0
0.051546
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
4
20d2c58e63ca574b2e12f2c195f937788b2a893f
255
py
Python
Interface/admin.py
kemilio/eScavenge
8c2330f6f3f8fa50384a66ceed7c821fd6e19e08
[ "MIT" ]
null
null
null
Interface/admin.py
kemilio/eScavenge
8c2330f6f3f8fa50384a66ceed7c821fd6e19e08
[ "MIT" ]
null
null
null
Interface/admin.py
kemilio/eScavenge
8c2330f6f3f8fa50384a66ceed7c821fd6e19e08
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import HuntUser, HuntCommand, Landmark, Penalty, Game admin.site.register(HuntUser) admin.site.register(HuntCommand) admin.site.register(Landmark) admin.site.register(Penalty) admin.site.register(Game)
31.875
67
0.803922
33
255
6.212121
0.393939
0.219512
0.414634
0
0
0
0
0
0
0
0
0
0.094118
255
8
68
31.875
0.887446
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.285714
0
0.285714
0
0
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
1
0
0
0
0
0
0
4
20ea2459f45b615725d2cc572285e074dbe1130a
162
py
Python
tasks/urls.py
QizaiMing/ergo-project-manager
2b02b2ab6d9e48bfccbbca8c05180b07177dcb77
[ "MIT" ]
null
null
null
tasks/urls.py
QizaiMing/ergo-project-manager
2b02b2ab6d9e48bfccbbca8c05180b07177dcb77
[ "MIT" ]
3
2020-11-01T22:08:38.000Z
2022-03-12T00:49:00.000Z
tasks/urls.py
QizaiMing/ergo-project-manager
2b02b2ab6d9e48bfccbbca8c05180b07177dcb77
[ "MIT" ]
2
2021-01-03T07:17:16.000Z
2021-05-29T17:27:11.000Z
from django.urls import path from .views import ( tasks_list_view) app_name = 'tasks' urlpatterns = [ path('', tasks_list_view, name='tasks_list_view') ]
20.25
53
0.716049
23
162
4.73913
0.521739
0.247706
0.357798
0
0
0
0
0
0
0
0
0
0.166667
162
8
54
20.25
0.807407
0
0
0
0
0
0.122699
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
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
0
0
0
0
4
454949320a83f3a4604a7a6e6c6f6fb72dc42bef
112
py
Python
2019/glen.py
nyanthanya/Contoh-Program
924d79c34a92e77374228f1605a1d37b0fe37c70
[ "Unlicense" ]
105
2019-12-09T07:27:43.000Z
2022-01-28T16:34:37.000Z
2019/glen.py
nyanthanya/Contoh-Program
924d79c34a92e77374228f1605a1d37b0fe37c70
[ "Unlicense" ]
1
2021-12-11T21:25:47.000Z
2021-12-12T21:21:35.000Z
2019/glen.py
nyanthanya/Contoh-Program
924d79c34a92e77374228f1605a1d37b0fe37c70
[ "Unlicense" ]
9
2020-12-06T01:00:11.000Z
2021-12-14T00:48:43.000Z
def glen(generator): """ len implementation for generators. """ return sum(1 for _ in generator)
22.4
38
0.633929
13
112
5.384615
0.846154
0
0
0
0
0
0
0
0
0
0
0.012048
0.258929
112
5
39
22.4
0.831325
0.303571
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
4551a82bc0b4253a0313f98511d86093f37048ea
9,746
py
Python
terrascript/resource/openstack.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
terrascript/resource/openstack.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
terrascript/resource/openstack.py
amlodzianowski/python-terrascript
1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49
[ "BSD-2-Clause" ]
null
null
null
# terrascript/resource/openstack.py import terrascript class openstack_blockstorage_quotaset_v2(terrascript.Resource): pass class openstack_blockstorage_quotaset_v3(terrascript.Resource): pass class openstack_blockstorage_volume_v1(terrascript.Resource): pass class openstack_blockstorage_volume_v2(terrascript.Resource): pass class openstack_blockstorage_volume_v3(terrascript.Resource): pass class openstack_blockstorage_volume_attach_v2(terrascript.Resource): pass class openstack_blockstorage_volume_attach_v3(terrascript.Resource): pass class openstack_compute_flavor_v2(terrascript.Resource): pass class openstack_compute_flavor_access_v2(terrascript.Resource): pass class openstack_compute_instance_v2(terrascript.Resource): pass class openstack_compute_interface_attach_v2(terrascript.Resource): pass class openstack_compute_keypair_v2(terrascript.Resource): pass class openstack_compute_secgroup_v2(terrascript.Resource): pass class openstack_compute_servergroup_v2(terrascript.Resource): pass class openstack_compute_quotaset_v2(terrascript.Resource): pass class openstack_compute_floatingip_v2(terrascript.Resource): pass class openstack_compute_floatingip_associate_v2(terrascript.Resource): pass class openstack_compute_volume_attach_v2(terrascript.Resource): pass class openstack_containerinfra_clustertemplate_v1(terrascript.Resource): pass class openstack_containerinfra_cluster_v1(terrascript.Resource): pass class openstack_db_instance_v1(terrascript.Resource): pass class openstack_db_user_v1(terrascript.Resource): pass class openstack_db_configuration_v1(terrascript.Resource): pass class openstack_db_database_v1(terrascript.Resource): pass class openstack_dns_recordset_v2(terrascript.Resource): pass class openstack_dns_zone_v2(terrascript.Resource): pass class openstack_fw_firewall_v1(terrascript.Resource): pass class openstack_fw_policy_v1(terrascript.Resource): pass class openstack_fw_rule_v1(terrascript.Resource): pass class openstack_identity_endpoint_v3(terrascript.Resource): pass class openstack_identity_project_v3(terrascript.Resource): pass class openstack_identity_role_v3(terrascript.Resource): pass class openstack_identity_role_assignment_v3(terrascript.Resource): pass class openstack_identity_service_v3(terrascript.Resource): pass class openstack_identity_user_v3(terrascript.Resource): pass class openstack_identity_application_credential_v3(terrascript.Resource): pass class openstack_images_image_v2(terrascript.Resource): pass class openstack_images_image_access_v2(terrascript.Resource): pass class openstack_images_image_access_accept_v2(terrascript.Resource): pass class openstack_lb_member_v1(terrascript.Resource): pass class openstack_lb_monitor_v1(terrascript.Resource): pass class openstack_lb_pool_v1(terrascript.Resource): pass class openstack_lb_vip_v1(terrascript.Resource): pass class openstack_lb_loadbalancer_v2(terrascript.Resource): pass class openstack_lb_listener_v2(terrascript.Resource): pass class openstack_lb_pool_v2(terrascript.Resource): pass class openstack_lb_member_v2(terrascript.Resource): pass class openstack_lb_monitor_v2(terrascript.Resource): pass class openstack_lb_l7policy_v2(terrascript.Resource): pass class openstack_lb_l7rule_v2(terrascript.Resource): pass class openstack_networking_floatingip_v2(terrascript.Resource): pass class openstack_networking_floatingip_associate_v2(terrascript.Resource): pass class openstack_networking_network_v2(terrascript.Resource): pass class openstack_networking_port_v2(terrascript.Resource): pass class openstack_networking_rbac_policy_v2(terrascript.Resource): pass class openstack_networking_port_secgroup_associate_v2(terrascript.Resource): pass class openstack_networking_qos_bandwidth_limit_rule_v2(terrascript.Resource): pass class openstack_networking_qos_dscp_marking_rule_v2(terrascript.Resource): pass class openstack_networking_qos_minimum_bandwidth_rule_v2(terrascript.Resource): pass class openstack_networking_qos_policy_v2(terrascript.Resource): pass class openstack_networking_quota_v2(terrascript.Resource): pass class openstack_networking_router_v2(terrascript.Resource): pass class openstack_networking_router_interface_v2(terrascript.Resource): pass class openstack_networking_router_route_v2(terrascript.Resource): pass class openstack_networking_secgroup_v2(terrascript.Resource): pass class openstack_networking_secgroup_rule_v2(terrascript.Resource): pass class openstack_networking_subnet_v2(terrascript.Resource): pass class openstack_networking_subnet_route_v2(terrascript.Resource): pass class openstack_networking_subnetpool_v2(terrascript.Resource): pass class openstack_networking_addressscope_v2(terrascript.Resource): pass class openstack_networking_trunk_v2(terrascript.Resource): pass class openstack_objectstorage_container_v1(terrascript.Resource): pass class openstack_objectstorage_object_v1(terrascript.Resource): pass class openstack_objectstorage_tempurl_v1(terrascript.Resource): pass class openstack_orchestration_stack_v1(terrascript.Resource): pass class openstack_vpnaas_ipsec_policy_v2(terrascript.Resource): pass class openstack_vpnaas_service_v2(terrascript.Resource): pass class openstack_vpnaas_ike_policy_v2(terrascript.Resource): pass class openstack_vpnaas_endpoint_group_v2(terrascript.Resource): pass class openstack_vpnaas_site_connection_v2(terrascript.Resource): pass class openstack_sharedfilesystem_securityservice_v2(terrascript.Resource): pass class openstack_sharedfilesystem_sharenetwork_v2(terrascript.Resource): pass class openstack_sharedfilesystem_share_v2(terrascript.Resource): pass class openstack_sharedfilesystem_share_access_v2(terrascript.Resource): pass class openstack_keymanager_secret_v1(terrascript.Resource): pass class openstack_keymanager_container_v1(terrascript.Resource): pass __all__ = [ "openstack_blockstorage_quotaset_v2", "openstack_blockstorage_quotaset_v3", "openstack_blockstorage_volume_v1", "openstack_blockstorage_volume_v2", "openstack_blockstorage_volume_v3", "openstack_blockstorage_volume_attach_v2", "openstack_blockstorage_volume_attach_v3", "openstack_compute_flavor_v2", "openstack_compute_flavor_access_v2", "openstack_compute_instance_v2", "openstack_compute_interface_attach_v2", "openstack_compute_keypair_v2", "openstack_compute_secgroup_v2", "openstack_compute_servergroup_v2", "openstack_compute_quotaset_v2", "openstack_compute_floatingip_v2", "openstack_compute_floatingip_associate_v2", "openstack_compute_volume_attach_v2", "openstack_containerinfra_clustertemplate_v1", "openstack_containerinfra_cluster_v1", "openstack_db_instance_v1", "openstack_db_user_v1", "openstack_db_configuration_v1", "openstack_db_database_v1", "openstack_dns_recordset_v2", "openstack_dns_zone_v2", "openstack_fw_firewall_v1", "openstack_fw_policy_v1", "openstack_fw_rule_v1", "openstack_identity_endpoint_v3", "openstack_identity_project_v3", "openstack_identity_role_v3", "openstack_identity_role_assignment_v3", "openstack_identity_service_v3", "openstack_identity_user_v3", "openstack_identity_application_credential_v3", "openstack_images_image_v2", "openstack_images_image_access_v2", "openstack_images_image_access_accept_v2", "openstack_lb_member_v1", "openstack_lb_monitor_v1", "openstack_lb_pool_v1", "openstack_lb_vip_v1", "openstack_lb_loadbalancer_v2", "openstack_lb_listener_v2", "openstack_lb_pool_v2", "openstack_lb_member_v2", "openstack_lb_monitor_v2", "openstack_lb_l7policy_v2", "openstack_lb_l7rule_v2", "openstack_networking_floatingip_v2", "openstack_networking_floatingip_associate_v2", "openstack_networking_network_v2", "openstack_networking_port_v2", "openstack_networking_rbac_policy_v2", "openstack_networking_port_secgroup_associate_v2", "openstack_networking_qos_bandwidth_limit_rule_v2", "openstack_networking_qos_dscp_marking_rule_v2", "openstack_networking_qos_minimum_bandwidth_rule_v2", "openstack_networking_qos_policy_v2", "openstack_networking_quota_v2", "openstack_networking_router_v2", "openstack_networking_router_interface_v2", "openstack_networking_router_route_v2", "openstack_networking_secgroup_v2", "openstack_networking_secgroup_rule_v2", "openstack_networking_subnet_v2", "openstack_networking_subnet_route_v2", "openstack_networking_subnetpool_v2", "openstack_networking_addressscope_v2", "openstack_networking_trunk_v2", "openstack_objectstorage_container_v1", "openstack_objectstorage_object_v1", "openstack_objectstorage_tempurl_v1", "openstack_orchestration_stack_v1", "openstack_vpnaas_ipsec_policy_v2", "openstack_vpnaas_service_v2", "openstack_vpnaas_ike_policy_v2", "openstack_vpnaas_endpoint_group_v2", "openstack_vpnaas_site_connection_v2", "openstack_sharedfilesystem_securityservice_v2", "openstack_sharedfilesystem_sharenetwork_v2", "openstack_sharedfilesystem_share_v2", "openstack_sharedfilesystem_share_access_v2", "openstack_keymanager_secret_v1", "openstack_keymanager_container_v1", ]
22.251142
79
0.812846
1,107
9,746
6.625113
0.084914
0.225389
0.269703
0.324516
0.738751
0.626807
0.554541
0.273384
0.038178
0
0
0.020631
0.124667
9,746
437
80
22.30206
0.839058
0.003386
0
0.329502
0
0
0.281125
0.27093
0
0
0
0
0
1
0
false
0.329502
0.003831
0
0.333333
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
0
0
0
0
0
4
45869b62262449d169739e0d6cce932a0fec63d1
22
py
Python
bonobo/_version.py
winsmith/bonobo
6fb9f52bec43a23feac2db968dd4315d75d69910
[ "Apache-2.0" ]
243
2020-05-12T01:15:46.000Z
2022-03-21T22:07:57.000Z
bonobo/_version.py
winsmith/bonobo
6fb9f52bec43a23feac2db968dd4315d75d69910
[ "Apache-2.0" ]
495
2020-05-12T06:45:12.000Z
2022-03-31T07:14:02.000Z
bonobo/_version.py
winsmith/bonobo
6fb9f52bec43a23feac2db968dd4315d75d69910
[ "Apache-2.0" ]
37
2020-05-12T02:16:07.000Z
2021-08-11T06:00:16.000Z
__version__ = '0.5.2'
11
21
0.636364
4
22
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.136364
22
1
22
22
0.368421
0
0
0
0
0
0.227273
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
0
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
4
45977dc03a8340f1326eacee3de3d8e48c8410ae
607
py
Python
evalml/pipelines/components/estimators/regressors/__init__.py
ObinnaObeleagu/evalml
3b5bf62b08a5a5bc6485ba5387a08c32e1857473
[ "BSD-3-Clause" ]
1
2021-07-28T14:20:35.000Z
2021-07-28T14:20:35.000Z
evalml/pipelines/components/estimators/regressors/__init__.py
ObinnaObeleagu/evalml
3b5bf62b08a5a5bc6485ba5387a08c32e1857473
[ "BSD-3-Clause" ]
null
null
null
evalml/pipelines/components/estimators/regressors/__init__.py
ObinnaObeleagu/evalml
3b5bf62b08a5a5bc6485ba5387a08c32e1857473
[ "BSD-3-Clause" ]
null
null
null
from .elasticnet_regressor import ElasticNetRegressor from .linear_regressor import LinearRegressor from .lightgbm_regressor import LightGBMRegressor from .rf_regressor import RandomForestRegressor from .catboost_regressor import CatBoostRegressor from .xgboost_regressor import XGBoostRegressor from .et_regressor import ExtraTreesRegressor from .baseline_regressor import BaselineRegressor from .decision_tree_regressor import DecisionTreeRegressor from .time_series_baseline_estimator import TimeSeriesBaselineEstimator from .svm_regressor import SVMRegressor from .arima_regressor import ARIMARegressor
46.692308
71
0.901153
63
607
8.444444
0.47619
0.31015
0
0
0
0
0
0
0
0
0
0
0.079077
607
12
72
50.583333
0.951699
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
459828ee46d9573e11d51c1a80022f445e80fd24
4,970
py
Python
topics/grammars/hats/abs/getkwd.py
grammarware/slps
a39bb0f8454de8508269d4467f2501badbb2cc4a
[ "BSD-3-Clause" ]
19
2015-01-18T13:50:02.000Z
2021-11-08T11:23:22.000Z
topics/grammars/hats/abs/getkwd.py
grammarware/slps
a39bb0f8454de8508269d4467f2501badbb2cc4a
[ "BSD-3-Clause" ]
null
null
null
topics/grammars/hats/abs/getkwd.py
grammarware/slps
a39bb0f8454de8508269d4467f2501badbb2cc4a
[ "BSD-3-Clause" ]
13
2015-01-18T13:50:07.000Z
2020-05-26T10:10:18.000Z
kwds = ''' "module" { return sym(Terminals.MODULE); } "import" { return sym(Terminals.IMPORT); } "export" { return sym(Terminals.EXPORT); } "from" { return sym(Terminals.FROM); } "class" { return sym(Terminals.CLASS); } "interface" { return sym(Terminals.INTERFACE); } "extends" { return sym(Terminals.EXTENDS); } "data" { return sym(Terminals.DATA); } "def" { return sym(Terminals.DEF); } "implements" { return sym(Terminals.IMPLEMENTS); } "delta" { return sym(Terminals.DELTA); } "adds" { return sym(Terminals.ADDS); } "modifies" { return sym(Terminals.MODIFIES); } "removes" { return sym(Terminals.REMOVES); } "hasField" { return sym(Terminals.HASFIELD); } "hasMethod" { return sym(Terminals.HASMETHOD); } "hasInterface" { return sym(Terminals.HASINTERFACE); } "productline" { return sym(Terminals.PRODUCTLINE); } "features" { return sym(Terminals.OPTFEATURES); } "after" { return sym(Terminals.AFTER); } "when" { return sym(Terminals.WHEN); } "product" { return sym(Terminals.PRODUCT); } "while" { return sym(Terminals.WHILE); } "return" { return sym(Terminals.RETURN); } "skip" { return sym(Terminals.SKIP); } "get" { return sym(Terminals.GET); } "null" { return sym(Terminals.NULL); } "await" { return sym(Terminals.AWAIT); } "if" { return sym(Terminals.IF); } "then" { return sym(Terminals.THEN); } "else" { return sym(Terminals.ELSE); } "suspend" { return sym(Terminals.SUSPEND); } "duration" { return sym(Terminals.DURATION); } "new" { return sym(Terminals.NEW); } "this" { return sym(Terminals.THIS); } "core" { return sym(Terminals.CORE); } "original" { return sym(Terminals.ORIGINAL); } ".original" { return sym(Terminals.DOTORIGINAL); } "case" { return sym(Terminals.CASE); } "let" { return sym(Terminals.LET); } "in" { return sym(Terminals.IN); } "cog" { return sym(Terminals.COG); } "type" { return sym(Terminals.TYPE); } "assert" { return sym(Terminals.ASSERT); } "builtin" { return sym(Terminals.BUILTIN); } // "root" { return sym(Terminals.ROOT); } "extension" { return sym(Terminals.EXTENSION); } "group" { return sym(Terminals.GROUP); } "opt" { return sym(Terminals.OPT); } "oneof" { return sym(Terminals.ONEOF); } "allof" { return sym(Terminals.ALLOF); } //"Int" { return sym(Terminals.INT); } //"Bool" { return sym(Terminals.BOOL); } //"in" { return sym(Terminals.IN); } "ifin" { return sym(Terminals.IFIN); } "ifout" { return sym(Terminals.IFOUT); } "exclude" { return sym(Terminals.EXCLUDE); } "require" { return sym(Terminals.REQUIRE); } //"excludes" { return sym(Terminals.EXCLUDE); } //"requires" { return sym(Terminals.REQUIRE); } //"true" { return sym(Terminals.TRUE); } //"tt" { return sym(Terminals.TRUE); } //"false" { return sym(Terminals.FALSE); } //"ff" { return sym(Terminals.FALSE); } "(" { return sym(Terminals.LPAREN); } ")" { return sym(Terminals.RPAREN); } "{" { return sym(Terminals.LBRACE); } "}" { return sym(Terminals.RBRACE); } "[" { return sym(Terminals.LBRACKET); } "]" { return sym(Terminals.RBRACKET); } "," { return sym(Terminals.COMMA); } ";" { return sym(Terminals.SEMICOLON); } ":" { return sym(Terminals.COLON); } "?" { return sym(Terminals.QMARK); } ".." { return sym(Terminals.UNTIL); } "." { return sym(Terminals.DOT); } "!" { return sym(Terminals.BANG); } "=" { return sym(Terminals.ASSIGN); } "&" { return sym(Terminals.GUARDAND); } "==" { return sym(Terminals.EQEQ); } "!=" { return sym(Terminals.NOTEQ); } "=>" { return sym(Terminals.RARROW); } "->" { return sym(Terminals.IMPLIES); } "<->" { return sym(Terminals.EQUIV); } "+" { return sym(Terminals.PLUS); } "-" { return sym(Terminals.MINUS); } "*" { return sym(Terminals.MULT); } "/" { return sym(Terminals.DIV); } "%" { return sym(Terminals.MOD); } "&&" { return sym(Terminals.ANDAND); } "||" { return sym(Terminals.OROR); } "|" { return sym(Terminals.BAR); } "~" { return sym(Terminals.NEGATION); } "<" { return sym(Terminals.LT); } ">" { return sym(Terminals.GT); } "<=" { return sym(Terminals.LTEQ); } ">=" { return sym(Terminals.GTEQ); } "_" { return sym(Terminals.USCORE); } "'" { return sym(Terminals.PRIME); } ''' defs = {} for line in kwds.split('\n'): line = line.strip() if line.startswith('//'): continue elif line == '': continue else: name = line.split('Terminals.')[1].split(')')[0] defs[name] = line.split('"')[1] for a in defs: print 'lexical',a,'=', '"'+defs[a]+'"',';'
41.764706
54
0.568813
500
4,970
5.652
0.234
0.315287
0.630573
0.018401
0.01557
0
0
0
0
0
0
0.000796
0.241247
4,970
119
55
41.764706
0.748608
0
0
0.017544
0
0
0.946087
0.269966
0
0
0
0
0.008772
0
null
null
0
0.008772
null
null
0.008772
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
1
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
45b84e7b8d6c88d2a0e164fbc5faecc624b17979
982
py
Python
object_detection/vantara/lumada/config/communication_channel_config.py
cardosov/Hackathon2018ObjectDetector
bd71aead2e58e8cf9756d5b06b751b60f69b0165
[ "MIT" ]
null
null
null
object_detection/vantara/lumada/config/communication_channel_config.py
cardosov/Hackathon2018ObjectDetector
bd71aead2e58e8cf9756d5b06b751b60f69b0165
[ "MIT" ]
null
null
null
object_detection/vantara/lumada/config/communication_channel_config.py
cardosov/Hackathon2018ObjectDetector
bd71aead2e58e8cf9756d5b06b751b60f69b0165
[ "MIT" ]
null
null
null
""" Copyright (c) by Hitachi Data Systems, 2017. All rights reserved. """ from lumada.utils.validator import Validator class CommunicationChannelConfig: def __init__(self, hostname=None, username=None, password=None, requires_secure=True, trust_certs=False): self._hostname = Validator.validate_param(hostname, 'hostname') self._username = Validator.validate_param(username, 'username') self._password = Validator.validate_param(password, 'password') self._requires_secure = requires_secure self._trust_certs = trust_certs self._exchange = 'lumada' def get_hostname(self): return self._hostname def get_username(self): return self._username def get_password(self): return self._password def get_requires_secure(self): return self._requires_secure def get_trust_certs(self): return self._trust_certs def get_exchange(self): return self._exchange
28.882353
109
0.704684
113
982
5.814159
0.309735
0.054795
0.127854
0
0
0
0
0
0
0
0
0.005161
0.210794
982
33
110
29.757576
0.842581
0.066191
0
0
0
0
0.033149
0
0
0
0
0
0
1
0.333333
false
0.190476
0.047619
0.285714
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
45cefedb86b69c73fec685a2cb19f6427cc74f62
192
py
Python
superai/__init__.py
mysuperai/superai-sdk
796c411c6ab69209600bf727e8fd08c20f4d67b1
[ "Apache-2.0" ]
1
2020-12-03T18:18:16.000Z
2020-12-03T18:18:16.000Z
superai/__init__.py
mysuperai/superai-sdk
796c411c6ab69209600bf727e8fd08c20f4d67b1
[ "Apache-2.0" ]
13
2021-02-22T18:27:58.000Z
2022-02-10T08:14:10.000Z
superai/__init__.py
mysuperai/superai-sdk
796c411c6ab69209600bf727e8fd08c20f4d67b1
[ "Apache-2.0" ]
1
2021-04-27T12:38:47.000Z
2021-04-27T12:38:47.000Z
from __future__ import absolute_import, division, print_function, unicode_literals __version__ = "0.1.0.beta2" # Client comes first from .client import * from superai.config import settings
24
82
0.807292
26
192
5.538462
0.730769
0
0
0
0
0
0
0
0
0
0
0.02381
0.125
192
7
83
27.428571
0.833333
0.09375
0
0
0
0
0.063953
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b3214988f1409f29b6861fa43db207605ffda099
93
py
Python
komparasi/apps.py
yudhapatria96/sidang
67252d8ec11791444cfd2ed5330391775372afc6
[ "bzip2-1.0.6" ]
null
null
null
komparasi/apps.py
yudhapatria96/sidang
67252d8ec11791444cfd2ed5330391775372afc6
[ "bzip2-1.0.6" ]
6
2019-12-05T00:12:52.000Z
2022-02-10T09:47:41.000Z
komparasi/apps.py
yudhapatria96/sidang
67252d8ec11791444cfd2ed5330391775372afc6
[ "bzip2-1.0.6" ]
null
null
null
from django.apps import AppConfig class KomparasiConfig(AppConfig): name = 'komparasi'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b3279b12e44d1448099bfbdcf12507c1ef978788
11,674
py
Python
userbot/modules/ShivamCredits.py
theshashankk/javes-3.0
9b16914be1350f7f6ac034bd30e33992035301b9
[ "MIT" ]
null
null
null
userbot/modules/ShivamCredits.py
theshashankk/javes-3.0
9b16914be1350f7f6ac034bd30e33992035301b9
[ "MIT" ]
null
null
null
userbot/modules/ShivamCredits.py
theshashankk/javes-3.0
9b16914be1350f7f6ac034bd30e33992035301b9
[ "MIT" ]
null
null
null
from userbot.events import javes05 from userbot import CMD_HELP, bot as javes, LOGS, JAVES_NAME from userbot.javes_main.commands import rekcah05 from telethon.events import ChatAction #made by shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam from userbot import bot as javes, CMD_HELP #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam from userbot import TEMP_DOWNLOAD_DIRECTORY #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam import os,re, bs4, requests, io #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from telethon import events #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from pathlib import Path #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam from os import remove #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam from bs4 import BeautifulSoup #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from re import findall #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam from urllib.parse import quote_plus #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from requests import get #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from selenium import webdriver from selenium.webdriver.chrome.options import Options #Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from PIL import Image #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from telethon.tl.types import MessageMediaPhoto #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam import urllib from userbot import bot as borg import os #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam from bs4 import BeautifulSoup #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam opener = urllib.request.build_opener() ; useragent = 'Mozilla/5.0 (Linux; Android 9; SM-G960F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.70 Mobile Safari/537.36' ; opener.addheaders = [('User-agent', useragent)] #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam JAVES_NNAME = str(JAVES_NAME) if JAVES_NAME else str(JAVES_MSG) WAFU_CHATID=int(os.environ.get("WAFU_CHATID",-1001230114424)) async def ParseSauce(googleurl): source = opener.open(googleurl).read() soup = BeautifulSoup(source, 'html.parser') results = {'similar_images': '', 'best_guess': ''} try: for similar_image in soup.findAll('input', {'class': 'gLFyf'}): url = 'https://www.google.com/search?tbm=isch&q=' + \ urllib.parse.quote_plus(similar_image.get('value')) results['similar_images'] = url except BaseException: pass for best_guess in soup.findAll('div', attrs={'class': 'r5a77d'}): results['best_guess'] = best_guess.get_text() return results #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam async def scam(results, lim): single = opener.open(results['similar_images']).read() decoded = single.decode('utf-8') imglinks = [] counter = 0 pattern = r'^,\[\"(.*[!png|!jpg|!jpeg])\",[0-9]+,[0-9]+\]$' oboi = re.findall(pattern, decoded, re.I | re.M) for imglink in oboi: counter += 1 if not counter >= int(lim): imglinks.append(imglink) else: break return imglinks #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam async def chrome(chrome_options=None): if chrome_options is None: chrome_options = await options() if not os.path.isdir(TEMP_DOWNLOAD_DIRECTORY): os.mkdir(TEMP_DOWNLOAD_DIRECTORY) prefs = {'download.default_directory': TEMP_DOWNLOAD_DIRECTORY} chrome_options.add_experimental_option('prefs', prefs) driver = webdriver.Chrome(executable_path=CHROME_DRIVER, options=chrome_options) return driver #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Shivam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam @javes.on(events.NewMessage(incoming=True)) async def on_new_message(event): name = event.raw_text snip = """appeared! Add them to your harem by sending /protecc character name""" pattern = r"( |^|[^\w])" + re.escape(snip) + r"( |$|[^\w])" if re.search(pattern, name, flags=re.IGNORECASE): try: photo = io.BytesIO() await event.client.download_media(event.media, photo) image = Image.open(photo) name = "okgoogle.png" image.save(name, "PNG") image.close() searchUrl = 'https://www.google.com/searchbyimage/upload' multipart = { 'encoded_image': (name, open(name, 'rb')), 'image_content': '' } response = requests.post(searchUrl, files=multipart, allow_redirects=False) fetchUrl = response.headers['Location'] match = await ParseSauce(fetchUrl +"&preferences?hl=en&fg=1#languages") guess = match['best_guess'] guesss = guess[12:] #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam try: from userbot.modules.sql_helper.autowafu_sql import get_current_wafu_settings from userbot.modules.sql_helper.autowafu_sql import update_previous_wafu except AttributeError: return cws = get_current_wafu_settings(event.chat_id) if cws: await event.reply( f"/protecc {guesss}") else: await borg.send_message( WAFU_CHATID,f"/protecc {guesss}") except Exception as e: pass #Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made by Sh1vam#Made#Made by Shivam #Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam#Made by Shivam '''@javes.on(ChatAction) async def wafu_to_chat(event): try: from userbot.modules.sql_helper.autowafu_sql import get_current_wafu_settings from userbot.modules.sql_helper.autowafu_sql import update_previous_wafu except AttributeError: return cws = get_current_wafu_settings(event.chat_id) if cws:''' @javes05(outgoing=True, pattern=r"^!savewafu(?: |$)(.*)") async def save_wafu(event): try: from userbot.modules.sql_helper.autowafu_sql import add_wafu_setting except AttributeError: return await event.edit("`Running on Non-SQL mode!`") string = """appeared! Add them to your harem by sending /protecc character name""" msg_id = None if add_wafu_setting(event.chat_id, 0,string, msg_id) is True: await event.edit('Auto wafu mode on') else: await event.edit(f"`{JAVES_NNAME}`: **auto wafu already present**") @javes05(outgoing=True, pattern="^!checkwafu$") async def show_wafu(event): try: from userbot.modules.sql_helper.autowafu_sql import get_current_wafu_settings except AttributeError: await event.edit("`Running on Non-SQL mode!`") return cws = get_current_wafu_settings(event.chat_id) if not cws: await event.edit(f"`{JAVES_NNAME}`: **auto wafu not on.**") return else: await event.edit(f"`{JAVES_NNAME}`: **auto wafu on.**") @javes05(outgoing=True, pattern="^!clearwafu$") async def del_wafu(event): try: from userbot.modules.sql_helper.autowafu_sql import rm_wafu_setting except AttributeError: await event.edit("`Running on Non-SQL mode!`") return if rm_wafu_setting(event.chat_id) is True: await event.edit(f"`{JAVES_NNAME}`: **auto wafu stops**") else: await event.edit(f"`{JAVES_NNAME}`: ** no auto wafu on. **")
49.676596
361
0.667295
1,724
11,674
4.453596
0.145592
0.243813
0.276635
0.337588
0.66137
0.652383
0.648476
0.644699
0.631805
0.622167
0
0.028834
0.245417
11,674
234
362
49.888889
0.842774
0.375193
0
0.224638
0
0.007246
0.166927
0.019831
0
0
0
0
0
1
0
false
0.014493
0.195652
0
0.253623
0
0
0
0
null
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b331c8f070df33554e94442c41951503ebfacd22
796
py
Python
chibi_command/rabbitmq.py
dem4ply/chibi_command
49efc3070bdf40e5f27146379487345b1accd427
[ "WTFPL" ]
null
null
null
chibi_command/rabbitmq.py
dem4ply/chibi_command
49efc3070bdf40e5f27146379487345b1accd427
[ "WTFPL" ]
null
null
null
chibi_command/rabbitmq.py
dem4ply/chibi_command
49efc3070bdf40e5f27146379487345b1accd427
[ "WTFPL" ]
null
null
null
from chibi_command import Command class Rabbitmqctl( Command ): command = 'rabbitmqctl' captive = False @classmethod def add_user( cls, user, password ): return cls( 'add_user', user, password )() @classmethod def delete_user( cls, user ): return cls( 'delete_user', user )() @classmethod def set_user_tags( cls, user, tag ): return cls( 'set_user_tags', user, tag )() @classmethod def set_permissions( cls, vhost, user, conf='.*', write='.*', read='.*' ): return cls( 'set_permissions', '-p', vhost, user, conf, write, read )() @classmethod def add_vhost( cls, vhost ): return cls( 'add_vhost', vhost )() @classmethod def list_user( cls ): return cls( 'list_users', captive=True )()
25.677419
79
0.605528
93
796
5.021505
0.301075
0.179872
0.072805
0.077088
0.094218
0
0
0
0
0
0
0
0.256281
796
30
80
26.533333
0.788851
0
0
0.272727
0
0
0.106784
0
0
0
0
0
0
1
0.272727
false
0.090909
0.045455
0.272727
0.727273
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
b337abc868321e8eead65370e433751da76b70c6
222
py
Python
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.05-Abstract-Class-and-Abstract-Method.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.05-Abstract-Class-and-Abstract-Method.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.05-Abstract-Class-and-Abstract-Method.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
from abc import ABC, abstractmethod class Computer(ABC): @abstractmethod def process(self): pass class Laptop(Computer): def process(self): print("Running") com1 = Laptop() com1.process()
13.058824
35
0.648649
25
222
5.76
0.56
0.236111
0.194444
0
0
0
0
0
0
0
0
0.011905
0.243243
222
16
36
13.875
0.845238
0
0
0.2
0
0
0.031532
0
0
0
0
0
0
1
0.2
false
0.1
0.1
0
0.5
0.1
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
b33f475eb9a71b36667eea6f4a18c6a31d6ad7f9
240
py
Python
Project Πολυδιάστατες Δομές Δεδομένων/Quad_Tree/rebalance.py
DimosthenisMich/UndergraduateCeidProjects
9f99f2c44e41d06020f3a5e9aacc0cd4357ee833
[ "MIT" ]
6
2021-02-10T18:31:22.000Z
2022-03-03T17:49:30.000Z
Project Πολυδιάστατες Δομές Δεδομένων/Quad_Tree/rebalance.py
DimosthenisMich/UndergraduateCeidProjects
9f99f2c44e41d06020f3a5e9aacc0cd4357ee833
[ "MIT" ]
1
2020-09-30T19:16:39.000Z
2020-09-30T19:16:39.000Z
Project Πολυδιάστατες Δομές Δεδομένων/Quad_Tree/rebalance.py
DimitrisKostorrizos/UndergraduateCeidProjects
9f99f2c44e41d06020f3a5e9aacc0cd4357ee833
[ "MIT" ]
5
2021-11-24T21:34:15.000Z
2022-01-23T22:37:35.000Z
import build import gatherTreeNodes def rebalance(node,maxNodesPerQuad): gatherTreeNodes.gather_tree_nodes(node) # Gather all points root = build.build(gatherTreeNodes.general_list, maxNodesPerQuad) # Rebuild tree return root
26.666667
84
0.795833
27
240
6.962963
0.62963
0
0
0
0
0
0
0
0
0
0
0
0.141667
240
8
85
30
0.912621
0.125
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
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
0
0
1
0
1
0
0
4
2fa7c394b57ed817b7cda1d4223f3e5256ef77eb
301
py
Python
src/helperz.py
DreamingRaven/Serverus
3f15dcef92813809f9df1387d38c3d0a244d8cde
[ "MIT" ]
1
2018-11-07T16:21:09.000Z
2018-11-07T16:21:09.000Z
src/helperz.py
DreamingRaven/Serverus
3f15dcef92813809f9df1387d38c3d0a244d8cde
[ "MIT" ]
null
null
null
src/helperz.py
DreamingRaven/Serverus
3f15dcef92813809f9df1387d38c3d0a244d8cde
[ "MIT" ]
null
null
null
# @Author: George Onoufriou <georgeraven> # @Date: 2018-11-04 # @Filename: helpers.py # @Last modified by: georgeraven # @Last modified time: 2018-11-04 # @License: Please see LICENSE in project root. # @Copyright: George Onoufriou import os, sys def placeholder(): print("placeholder")
17.705882
47
0.700997
38
301
5.552632
0.736842
0.14218
0.075829
0
0
0
0
0
0
0
0
0.064516
0.17608
301
16
48
18.8125
0.78629
0.734219
0
0
0
0
0.152778
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
0.666667
0.333333
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
4
2fe6078967ade1448ad2286d3a611ec4a18da886
65
py
Python
python/args-test.py
honux77/practice
f92481740190b20ef352135c392c8a9bea58dcc7
[ "MIT" ]
152
2015-01-12T07:40:53.000Z
2022-03-20T15:51:35.000Z
python/args-test.py
Brielle-Choi/practice
f92481740190b20ef352135c392c8a9bea58dcc7
[ "MIT" ]
11
2015-01-12T07:45:54.000Z
2021-09-02T02:46:52.000Z
python/args-test.py
Brielle-Choi/practice
f92481740190b20ef352135c392c8a9bea58dcc7
[ "MIT" ]
32
2015-01-12T09:10:04.000Z
2022-03-02T09:18:17.000Z
a = [1, 2, 3, 4, 5,] print(*a) for i in a: print(i, end=' ')
13
21
0.430769
15
65
1.866667
0.733333
0
0
0
0
0
0
0
0
0
0
0.108696
0.292308
65
5
21
13
0.5
0
0
0
0
0
0.015152
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
0
0
1
0
4
64074775bd7ba09effd8d3a675c5e7c447cb833f
166
py
Python
mysite/templatetags/extras.py
gbriones1/django-skelleton
ee067594e3994f1bac5bf754f618d365bb5248d8
[ "BSD-3-Clause" ]
null
null
null
mysite/templatetags/extras.py
gbriones1/django-skelleton
ee067594e3994f1bac5bf754f618d365bb5248d8
[ "BSD-3-Clause" ]
10
2020-06-05T16:38:25.000Z
2022-03-11T23:12:12.000Z
mysite/templatetags/extras.py
gbriones1/django-skelleton
ee067594e3994f1bac5bf754f618d365bb5248d8
[ "BSD-3-Clause" ]
null
null
null
from django import template register = template.Library() def debug_var(value): # import pdb; pdb.set_trace() return "" register.filter('debug', debug_var)
18.444444
35
0.716867
22
166
5.272727
0.681818
0.137931
0
0
0
0
0
0
0
0
0
0
0.162651
166
9
35
18.444444
0.834532
0.162651
0
0
0
0
0.036232
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
640ebd486650c9dea4fd6667129222adfe8519ec
879
py
Python
sslic/models/ressl.py
gergopool/ssl
676d01b88a50acea9a3b6c406fc4b82de74ec7b3
[ "MIT" ]
1
2022-02-05T13:49:17.000Z
2022-02-05T13:49:17.000Z
sslic/models/ressl.py
gergopool/ssl
676d01b88a50acea9a3b6c406fc4b82de74ec7b3
[ "MIT" ]
null
null
null
sslic/models/ressl.py
gergopool/ssl
676d01b88a50acea9a3b6c406fc4b82de74ec7b3
[ "MIT" ]
null
null
null
from ..losses.ressl import ReSSLLoss from .momentum_model import MomentumModel __all__ = ['ressl_model'] class ReSSL(MomentumModel): default_loss = ReSSLLoss @classmethod def imagenet(cls, *args, **kwargs) -> MomentumModel: return super().imagenet(*args, dim=512, hidden_dim=4096, momentum=0.999, **kwargs) @classmethod def tiny_imagenet(cls, *args, **kwargs) -> MomentumModel: return super().tiny_imagenet(*args, dim=128, hidden_dim=128, momentum=0.996, **kwargs) @classmethod def cifar10(cls, *args, **kwargs) -> MomentumModel: return super().cifar10(*args, dim=128, hidden_dim=128, momentum=0.99, **kwargs) @classmethod def cifar100(cls, *args, **kwargs) -> MomentumModel: return super().cifar100(*args, dim=128, hidden_dim=128, momentum=0.99, **kwargs) def ressl_model() -> ReSSL: return ReSSL
30.310345
94
0.680319
107
879
5.457944
0.299065
0.061644
0.089041
0.178082
0.467466
0.467466
0.340753
0.186644
0.133562
0.133562
0
0.06768
0.176337
879
29
95
30.310345
0.73895
0
0
0.210526
0
0
0.0125
0
0
0
0
0
0
1
0.263158
false
0
0.105263
0.263158
0.736842
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
641d038ea53c8ff229981826df21fc7ad8c23c9e
153
py
Python
app/admin.py
LaurierCS/Pod5
2e5b9298ff2c5d7820993b9bcf980919a99c1474
[ "MIT" ]
null
null
null
app/admin.py
LaurierCS/Pod5
2e5b9298ff2c5d7820993b9bcf980919a99c1474
[ "MIT" ]
null
null
null
app/admin.py
LaurierCS/Pod5
2e5b9298ff2c5d7820993b9bcf980919a99c1474
[ "MIT" ]
null
null
null
# Imports from django.contrib import admin from .models import * # Register your models here. admin.site.register()#Model to register in the Admin site)
25.5
58
0.777778
23
153
5.173913
0.652174
0.151261
0
0
0
0
0
0
0
0
0
0
0.143791
153
6
58
25.5
0.908397
0.457516
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
0
0
0
4
ff5cf802ec37d7d08aa5f0fcc21ae7c4e767196e
795
py
Python
itasca/__init__.py
drozdovgrigoriy/itasca-python
edeb54a72699d10bab141c1eb47f5726312f3093
[ "BSD-3-Clause" ]
1
2022-03-11T15:09:25.000Z
2022-03-11T15:09:25.000Z
itasca/__init__.py
drozdovgrigoriy/itasca-python
edeb54a72699d10bab141c1eb47f5726312f3093
[ "BSD-3-Clause" ]
null
null
null
itasca/__init__.py
drozdovgrigoriy/itasca-python
edeb54a72699d10bab141c1eb47f5726312f3093
[ "BSD-3-Clause" ]
null
null
null
"""Python connectivity for Itasca software. This library implements a connection via sockets between Python and the numerical modeling software from Itasca Consulting Group. Functions are provided to read and write files in the Itasca FISH binary format. itascacg.com/software FLAC, FLAC3D, PFC2D, PFC3D, UDEC & 3DEC See https://github.com/jkfurtney/itasca-python for more information. """ __version__ = "2018.08.20" from .main import FLAC3D_Connection from .main import PFC3D_Connection from .main import FishBinaryReader from .main import FishBinaryWriter from .main import FLAC_Connection from .main import UDEC_Connection from .main import threeDEC_Connection from .main import UDECFishBinaryReader from .main import UDECFishBinaryWriter from .main import p2pLinkClient, p2pLinkServer
29.444444
68
0.822642
106
795
6.084906
0.54717
0.124031
0.217054
0.186047
0
0
0
0
0
0
0
0.023055
0.127044
795
26
69
30.576923
0.90634
0.485535
0
0
0
0
0.024876
0
0
0
0
0
0
1
0
false
0
0.909091
0
0.909091
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ff61abdf725b555db884ba406e0ef3417bbcccca
73
py
Python
dtgui/__init__.py
LaurentRDC/dtgui
e0bd5ce0db0d0bbaff71b5f338506a6915bbf68e
[ "MIT" ]
null
null
null
dtgui/__init__.py
LaurentRDC/dtgui
e0bd5ce0db0d0bbaff71b5f338506a6915bbf68e
[ "MIT" ]
null
null
null
dtgui/__init__.py
LaurentRDC/dtgui
e0bd5ce0db0d0bbaff71b5f338506a6915bbf68e
[ "MIT" ]
3
2018-07-05T14:11:03.000Z
2021-04-07T19:54:38.000Z
# Force use of PyQt5 import os os.environ["PYQTGRAPH_QT_LIB"] = "PyQt5"
14.6
40
0.726027
12
73
4.25
0.833333
0
0
0
0
0
0
0
0
0
0
0.032258
0.150685
73
4
41
18.25
0.790323
0.246575
0
0
0
0
0.396226
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ff68a309dfbfe9f27713ea3b6a0c9fa8cc94726c
68
py
Python
src/api/app_configs.py
EduardManzhula/stats_and_gender_prediction
2b661b3cd331c6672580462273c7c746b135adfd
[ "MIT" ]
null
null
null
src/api/app_configs.py
EduardManzhula/stats_and_gender_prediction
2b661b3cd331c6672580462273c7c746b135adfd
[ "MIT" ]
null
null
null
src/api/app_configs.py
EduardManzhula/stats_and_gender_prediction
2b661b3cd331c6672580462273c7c746b135adfd
[ "MIT" ]
null
null
null
DB_URL = "mysql://guest:relational@relational.fit.cvut.cz:3306/ftp"
34
67
0.764706
11
68
4.636364
0.909091
0
0
0
0
0
0
0
0
0
0
0.061538
0.044118
68
1
68
68
0.723077
0
0
0
0
0
0.823529
0.823529
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ff6b368cd5d41f6824080fe084193d59e33e673f
75
py
Python
go/src/infra/tools/vpython/vpythonsmoketest/testdata/child2/child.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
go/src/infra/tools/vpython/vpythonsmoketest/testdata/child2/child.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
go/src/infra/tools/vpython/vpythonsmoketest/testdata/child2/child.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env vpython import sys import six print "Child2", sys.argv[1]
10.714286
27
0.706667
13
75
4.076923
0.846154
0
0
0
0
0
0
0
0
0
0
0.03125
0.146667
75
6
28
12.5
0.796875
0.28
0
0
0
0
0.113208
0
0
0
0
0
0
0
null
null
0
0.666667
null
null
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
4
ff9312f5cd3b40d0705d8e80e5a5c2d5c620aec6
11,547
py
Python
api/python/src/jbw/environments.py
NishanthVAnand/jelly-bean-world
a43c603f8b9a07dc2d0bc0b04db1b42be451023f
[ "Apache-2.0" ]
57
2019-08-07T15:20:35.000Z
2022-02-28T11:57:55.000Z
api/python/src/jbw/environments.py
NishanthVAnand/jelly-bean-world
a43c603f8b9a07dc2d0bc0b04db1b42be451023f
[ "Apache-2.0" ]
5
2020-03-31T16:00:28.000Z
2021-10-05T05:34:06.000Z
api/python/src/jbw/environments.py
NishanthVAnand/jelly-bean-world
a43c603f8b9a07dc2d0bc0b04db1b42be451023f
[ "Apache-2.0" ]
11
2020-02-23T02:19:56.000Z
2022-03-02T18:35:03.000Z
# Copyright 2019, The Jelly Bean World 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. """Collection of JBW environments for OpenAI gym.""" from __future__ import absolute_import, division, print_function import numpy as np try: from gym.envs.registration import register modules_loaded = True except: modules_loaded = False from .agent import Agent from .direction import RelativeDirection from .item import * from .simulator import * from .visualizer import MapVisualizer, pi def make_config(): # specify the item types items = [] items.append(Item("banana", [0.0, 1.0, 0.0], [0.0, 1.0, 0.0], [1, 0, 0, 0], [0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[-5.3], interaction_fns=[ [InteractionFunction.PIECEWISE_BOX, 10.0, 200.0, 0.0, -6.0], # parameters for interaction between item 0 and item 0 [InteractionFunction.PIECEWISE_BOX, 200.0, 0.0, -6.0, -6.0], # parameters for interaction between item 0 and item 1 [InteractionFunction.PIECEWISE_BOX, 10.0, 200.0, 2.0, -100.0], # parameters for interaction between item 0 and item 2 [InteractionFunction.ZERO] # parameters for interaction between item 0 and item 3 ])) items.append(Item("onion", [1.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0, 1, 0, 0], [0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[-5.0], interaction_fns=[ [InteractionFunction.PIECEWISE_BOX, 200.0, 0.0, -6.0, -6.0], # parameters for interaction between item 1 and item 0 [InteractionFunction.ZERO], # parameters for interaction between item 1 and item 1 [InteractionFunction.PIECEWISE_BOX, 200.0, 0.0, -100.0, -100.0], # parameters for interaction between item 1 and item 2 [InteractionFunction.ZERO] # parameters for interaction between item 1 and item 3 ])) items.append(Item("jellybean", [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0, 0, 0, 0], [0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[-5.3], interaction_fns=[ [InteractionFunction.PIECEWISE_BOX, 10.0, 200.0, 2.0, -100.0], # parameters for interaction between item 2 and item 0 [InteractionFunction.PIECEWISE_BOX, 200.0, 0.0, -100.0, -100.0], # parameters for interaction between item 2 and item 1 [InteractionFunction.PIECEWISE_BOX, 10.0, 200.0, 0.0, -6.0], # parameters for interaction between item 2 and item 2 [InteractionFunction.ZERO] # parameters for interaction between item 2 and item 3 ])) items.append(Item("wall", [0.0, 0.0, 0.0], [0.5, 0.5, 0.5], [0, 0, 0, 1], [0, 0, 0, 0], True, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[0.0], interaction_fns=[ [InteractionFunction.ZERO], # parameters for interaction between item 3 and item 0 [InteractionFunction.ZERO], # parameters for interaction between item 3 and item 1 [InteractionFunction.ZERO], # parameters for interaction between item 3 and item 2 [InteractionFunction.CROSS, 10.0, 15.0, 20.0, -200.0, -20.0, 1.0] # parameters for interaction between item 3 and item 3 ])) # construct the simulator configuration return SimulatorConfig(max_steps_per_movement=1, vision_range=5, allowed_movement_directions=[ActionPolicy.ALLOWED, ActionPolicy.DISALLOWED, ActionPolicy.DISALLOWED, ActionPolicy.DISALLOWED], allowed_turn_directions=[ActionPolicy.DISALLOWED, ActionPolicy.DISALLOWED, ActionPolicy.ALLOWED, ActionPolicy.ALLOWED], no_op_allowed=False, patch_size=32, mcmc_num_iter=4000, items=items, agent_color=[0.0, 0.0, 1.0], agent_field_of_view=2*pi, collision_policy=MovementConflictPolicy.FIRST_COME_FIRST_SERVED, decay_param=0.4, diffusion_param=0.14, deleted_item_lifetime=2000) def make_v1_config(): """ This config file matches the config """ # specify the item types items = [] # ANOTHER discrepancy in paper. Paper lists interaction with wall, whereas Configurations.swift # lists interaction with tree. Maybe it's a wrong index? Maybe the paper is listed incorrectly? items.append(Item("banana", [1.92, 1.76, 0.40], [0.96, 0.88, 0.20], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[1.5], interaction_fns=[ [InteractionFunction.PIECEWISE_BOX, 10.0, 100.0, 0.0, -6.0], [InteractionFunction.ZERO], [InteractionFunction.PIECEWISE_BOX, 10.0, 100.0, 2.0, -100.0], [InteractionFunction.ZERO], [InteractionFunction.PIECEWISE_BOX, 50.0, 100.0, -100.0, -100.0], [InteractionFunction.ZERO] ])) # Onion has a discrepancy in intensity - in the paper it's listed as +1.5. items.append(Item("onion", [0.68, 0.01, 0.99], [0.68, 0.01, 0.99], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[-3.0], interaction_fns=[ [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.ZERO] ])) items.append(Item("jellybean", [1.64, 0.54, 0.40], [0.82, 0.27, 0.20], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[1.5], interaction_fns=[ [InteractionFunction.PIECEWISE_BOX, 10.0, 100.0, 2.0, -100.0], [InteractionFunction.ZERO], [InteractionFunction.PIECEWISE_BOX, 10.0, 100.0, 0.0, -6.0], [InteractionFunction.ZERO], [InteractionFunction.PIECEWISE_BOX, 50.0, 100.0, -100.0, -100.0], [InteractionFunction.ZERO] ])) items.append(Item("wall", [0.0, 0.0, 0.0], [0.20, 0.47, 0.67], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0], True, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[-12.0], interaction_fns=[ [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.CROSS, 20.0, 40.0, 8.0, -1000.0, -1000.0, -1.0], [InteractionFunction.ZERO], [InteractionFunction.ZERO] ])) items.append(Item("tree", [0.00, 0.47, 0.06], [0.00, 0.47, 0.06], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[2.0], interaction_fns=[ [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.ZERO], [InteractionFunction.PIECEWISE_BOX, 100.0, 500.0, 0.0, -0.1], [InteractionFunction.ZERO] ])) items.append(Item("truffle", [8.40, 4.80, 2.60], [0.42, 0.24, 0.13], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], False, 0.0, intensity_fn=IntensityFunction.CONSTANT, intensity_fn_args=[0.0], interaction_fns=[ [InteractionFunction.ZERO], # parameters for interaction between item 3 and item 0 [InteractionFunction.ZERO], # parameters for interaction between item 3 and item 1 [InteractionFunction.ZERO], # parameters for interaction between item 3 and item 2 [InteractionFunction.ZERO], # parameters for interaction between item 3 and item 2 [InteractionFunction.PIECEWISE_BOX, 4.0, 200.0, 2.0, 0.0], [InteractionFunction.PIECEWISE_BOX, 30.0, 1000.0, -0.3, -1.0], ])) # construct the simulator configuration return SimulatorConfig(max_steps_per_movement=1, vision_range=5, allowed_movement_directions=[ActionPolicy.ALLOWED, ActionPolicy.DISALLOWED, ActionPolicy.DISALLOWED, ActionPolicy.DISALLOWED], allowed_turn_directions=[ActionPolicy.DISALLOWED, ActionPolicy.DISALLOWED, ActionPolicy.ALLOWED, ActionPolicy.ALLOWED], no_op_allowed=False, patch_size=32, mcmc_num_iter=4000, items=items, agent_color=[0.0, 0.0, 1.0], agent_field_of_view=2*pi, collision_policy=MovementConflictPolicy.FIRST_COME_FIRST_SERVED, decay_param=0.4, diffusion_param=0.14, deleted_item_lifetime=2000) def case1_reward_fn(prev_items, items): """ Reference for item indicies: 0 - Banana: 0 reward 1 - Onion: -1 reward for every one collected 2 - JellyBean: +1 reward for every one collected 3 - Wall: 0 reward, cannot collect 4 - Tree: 0 reward, cannot collect 5 - Truffle: 0 reward """ reward_array = np.array([0, -1, 1, 0, 0, 0]) diff = items - prev_items return (diff * reward_array).sum().astype(np.float32) if modules_loaded: # Construct the simulator configuration. sim_config = make_config() # Create a reward function. reward_fn = lambda prev_items, items: len(items) - len(prev_items) register( id='JBW-v0', entry_point='jbw.environment:JBWEnv', kwargs={ 'sim_config': sim_config, 'reward_fn': reward_fn, 'render': False}) register( id='JBW-render-v0', entry_point='jbw.environment:JBWEnv', kwargs={ 'sim_config': sim_config, 'reward_fn': reward_fn, 'render': True}) sim_v1_config = make_v1_config() register( id='JBW-v1', entry_point='jbw.environment:JBWEnv', kwargs={ 'sim_config': sim_v1_config, 'reward_fn': case1_reward_fn, 'render': False}) register( id='JBW-render-v1', entry_point='jbw.environment:JBWEnv', kwargs={ 'sim_config': sim_v1_config, 'reward_fn': case1_reward_fn, 'render': True})
56.326829
156
0.585607
1,430
11,547
4.618182
0.172727
0.049364
0.052241
0.049061
0.739098
0.726832
0.70427
0.687311
0.670503
0.669897
0
0.083272
0.299039
11,547
204
157
56.602941
0.732641
0.209232
0
0.707792
0
0
0.031547
0.009741
0
0
0
0
0
1
0.019481
false
0
0.051948
0
0.090909
0.006494
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ffa92e0fa2e78a9d89d347670bfb23f1b622a1aa
255
py
Python
app/mod_home/forms.py
BrianLusina/tweetstream
6b60d779b3d4f5b615c62dc1ccc93e722ec6f9b9
[ "Apache-2.0" ]
null
null
null
app/mod_home/forms.py
BrianLusina/tweetstream
6b60d779b3d4f5b615c62dc1ccc93e722ec6f9b9
[ "Apache-2.0" ]
null
null
null
app/mod_home/forms.py
BrianLusina/tweetstream
6b60d779b3d4f5b615c62dc1ccc93e722ec6f9b9
[ "Apache-2.0" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, SubmitField from wtforms.validators import DataRequired class TopicsForm(FlaskForm): topic_name = StringField(validators=[DataRequired()]) submit_field = SubmitField("Get Topics")
28.333333
57
0.803922
28
255
7.214286
0.642857
0.108911
0
0
0
0
0
0
0
0
0
0
0.12549
255
8
58
31.875
0.90583
0
0
0
0
0
0.039216
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
440964465b5b3aa3ebddf95a03e130315379ce88
56
py
Python
minerva/utils.py
Samrat-Nakarmi/Minerva
4dd87ef102e4c83d26cdf8b6f12bad9d3fed4c7a
[ "MIT" ]
1
2021-02-03T12:54:48.000Z
2021-02-03T12:54:48.000Z
minerva/utils.py
Samrat-Nakarmi/Minerva
4dd87ef102e4c83d26cdf8b6f12bad9d3fed4c7a
[ "MIT" ]
1
2022-02-14T01:31:13.000Z
2022-02-14T01:31:13.000Z
edavids/utils/get_filename.py
me-edavids/profile
388758dcfd67da7f974fa3ebcef51c740a07ec60
[ "MIT" ]
null
null
null
def get_filename(filename): return filename.upper()
18.666667
27
0.75
7
56
5.857143
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.142857
56
2
28
28
0.854167
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
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
1
0
0
0
1
0
0
0
4
440ec22366e2b0c35c8fb7e60522bdb4e0a71e9c
207
py
Python
atest/resources/testlibs/cache_error.py
hugovk/SeleniumLibrary
489178c1beb16a4b90747ed35bad7dac80a1cc24
[ "ECL-2.0", "Apache-2.0" ]
792
2015-09-28T15:22:48.000Z
2022-03-27T21:31:34.000Z
atest/resources/testlibs/cache_error.py
hugovk/SeleniumLibrary
489178c1beb16a4b90747ed35bad7dac80a1cc24
[ "ECL-2.0", "Apache-2.0" ]
710
2015-08-20T13:31:20.000Z
2022-03-24T15:33:20.000Z
atest/resources/testlibs/cache_error.py
hugovk/SeleniumLibrary
489178c1beb16a4b90747ed35bad7dac80a1cc24
[ "ECL-2.0", "Apache-2.0" ]
429
2016-10-26T08:26:09.000Z
2022-03-28T23:19:42.000Z
from robot.libraries.BuiltIn import BuiltIn def invalidate_driver(): sl = BuiltIn().get_library_instance("SeleniumLibrary") sl.register_driver(None, "tidii") sl.register_driver(None, "foobar")
25.875
58
0.748792
25
207
6
0.68
0.133333
0.213333
0.266667
0
0
0
0
0
0
0
0
0.130435
207
7
59
29.571429
0.833333
0
0
0
0
0
0.125604
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.4
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
0
0
0
0
0
4
442b719a9d48cf361365c5c8b9bad366d527f63f
161
py
Python
problem0243.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0243.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0243.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
########################### # # #243 Resilience - Project Euler # https://projecteuler.net/problem=243 # # Code by Kevin Marciniak # ###########################
17.888889
38
0.465839
13
161
5.769231
0.923077
0
0
0
0
0
0
0
0
0
0
0.041958
0.111801
161
8
39
20.125
0.482517
0.565217
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
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
442c2729bfaa47af98f92fee0fb2fd949a4b8fa4
457
py
Python
test/test_utils.py
contentful-labs/contentful.py
d9eb4a68abcad33e4766e2be8c7b35e605210b5a
[ "Apache-2.0" ]
10
2015-12-01T07:18:43.000Z
2018-07-10T13:56:18.000Z
test/test_utils.py
contentful-labs/contentful.py
d9eb4a68abcad33e4766e2be8c7b35e605210b5a
[ "Apache-2.0" ]
11
2015-12-17T13:36:47.000Z
2018-10-11T22:19:07.000Z
test/test_utils.py
contentful-labs/contentful.py
d9eb4a68abcad33e4766e2be8c7b35e605210b5a
[ "Apache-2.0" ]
9
2015-12-15T16:02:25.000Z
2020-04-29T20:09:04.000Z
from contentful.cda import utils from contentful.cda.resources import Asset, ContentType, Entry, Space from test import BaseTestCase class UtilsTestCase(BaseTestCase): def test_class_for_type(self): self.assertIs(utils.class_for_type('Asset'), Asset) self.assertIs(utils.class_for_type('ContentType'), ContentType) self.assertIs(utils.class_for_type('Entry'), Entry) self.assertIs(utils.class_for_type('Space'), Space)
38.083333
71
0.752735
59
457
5.644068
0.322034
0.12012
0.18018
0.264264
0.348348
0.348348
0
0
0
0
0
0
0.142232
457
11
72
41.545455
0.84949
0
0
0
0
0
0.056893
0
0
0
0
0
0.444444
1
0.111111
false
0
0.333333
0
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
1
0
0
0
0
1
0
0
0
0
4
446741a21fd75f8a3618ae1c31645eb5797f3bed
842
py
Python
chain/crypto/bytebuffer.py
tsifrer/ark
c678091e226d79fabe4a2c554e1d8e704a5b5cec
[ "MIT" ]
5
2019-02-01T01:22:27.000Z
2019-05-24T12:20:38.000Z
chain/crypto/bytebuffer.py
tsifrer/ark
c678091e226d79fabe4a2c554e1d8e704a5b5cec
[ "MIT" ]
15
2019-03-29T13:12:10.000Z
2019-08-25T19:19:35.000Z
chain/crypto/bytebuffer.py
tsifrer/ark
c678091e226d79fabe4a2c554e1d8e704a5b5cec
[ "MIT" ]
4
2019-01-31T13:52:03.000Z
2020-08-12T02:12:03.000Z
from binary.unsigned_integer import read_bit32, read_bit64, read_bit8 # TODO: Put this into binary package class ByteBuffer(bytearray): def read_uint8(self): return read_bit8(self) def read_uint32(self): return read_bit32(self) def read_uint64(self): return read_bit64(self) def read_bytes(self, num_bytes, offset=0): return bytes(self[offset : offset + num_bytes]) def pop_uint8(self): data = read_bit8(self) del self[:1] return data def pop_uint32(self): data = read_bit32(self) del self[:4] return data def pop_uint64(self): data = read_bit64(self) del self[:8] return data def pop_bytes(self, num_bytes): data = self[:num_bytes] del self[:num_bytes] return bytes(data)
22.756757
69
0.622328
115
842
4.356522
0.286957
0.07984
0.095808
0.095808
0
0
0
0
0
0
0
0.048414
0.288599
842
36
70
23.388889
0.78798
0.04038
0
0.115385
0
0
0
0
0
0
0
0.027778
0
1
0.307692
false
0
0.038462
0.153846
0.692308
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
447669b7dcf510c0e1956405d495be48a8000b8d
2,144
py
Python
tests/fundings/validation_service_tests_.py
cbn-alpin/gefiproj-api
35e3f00dd71bcdd9ad751307ac379aa78d1545cf
[ "MIT" ]
2
2020-10-15T15:16:08.000Z
2020-11-06T10:41:13.000Z
tests/fundings/validation_service_tests_.py
cbn-alpin/gefiproj-api
35e3f00dd71bcdd9ad751307ac379aa78d1545cf
[ "MIT" ]
1
2020-11-14T19:40:14.000Z
2020-11-14T19:40:14.000Z
tests/fundings/validation_service_tests_.py
cbn-alpin/gefiproj-api
35e3f00dd71bcdd9ad751307ac379aa78d1545cf
[ "MIT" ]
null
null
null
import unittest from src.api.fundings.validation_service import FundingValidationService class ProjectValidationServiceTestCase(unittest.TestCase): def test_validate_post(self): funding = {'id_f': 1, 'id_p': 1, 'id_financeur': 1, 'montant_arrete_f': 4, 'statut_f': 'ANTR', 'date_solde_f': None} validation_errors = FundingValidationService.validate_post(funding) self.assertEqual(len(validation_errors), 0) funding['statut_f'] = 'SOLDE' validation_errors = FundingValidationService.validate_post(funding) self.assertEqual(len(validation_errors), 1) self.assertEqual(validation_errors[0]['field'], 'statut_f') funding['statut_f'] = 'ANTR' del funding['id_p'] validation_errors = FundingValidationService.validate_post(funding) self.assertEqual(len(validation_errors), 1) self.assertEqual(validation_errors[0]['field'], 'id_p') funding['id_p'] = 1 del funding['id_financeur'] validation_errors = FundingValidationService.validate_post(funding) self.assertEqual(len(validation_errors), 1) self.assertEqual(validation_errors[0]['field'], 'id_financeur') funding['id_financeur'] = 1 del funding['montant_arrete_f'] validation_errors = FundingValidationService.validate_post(funding) self.assertEqual(len(validation_errors), 1) self.assertEqual(validation_errors[0]['field'], 'montant_arrete_f') funding['montant_arrete_f'] = 10 del funding['statut_f'] validation_errors = FundingValidationService.validate_post(funding) self.assertEqual(len(validation_errors), 1) self.assertEqual(validation_errors[0]['field'], 'statut_f') funding['statut_f'] = 'ANTR' funding['statut_f'] = 'NO' validation_errors = FundingValidationService.validate_post(funding) self.assertEqual(len(validation_errors), 1) self.assertEqual(validation_errors[0]['field'], 'statut_f') funding['statut_f'] = 'ANTR' if __name__ == '__main__': unittest.main()
42.039216
82
0.679571
228
2,144
6.096491
0.184211
0.230216
0.201439
0.241727
0.690647
0.690647
0.690647
0.690647
0.690647
0.690647
0
0.012274
0.201959
2,144
50
83
42.88
0.800117
0
0
0.475
0
0
0.132929
0
0
0
0
0
0.325
1
0.025
false
0
0.05
0
0.1
0
0
0
0
null
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
44903506cec8d7e6cfc37c9d9943b2a097543315
85
py
Python
lfd_hw7/hw7_q3.py
MahmutOsmanovic/machine-learning-mooc-caltech
deca978e13f6d6950f06417c4d520e71904962d7
[ "MIT" ]
null
null
null
lfd_hw7/hw7_q3.py
MahmutOsmanovic/machine-learning-mooc-caltech
deca978e13f6d6950f06417c4d520e71904962d7
[ "MIT" ]
null
null
null
lfd_hw7/hw7_q3.py
MahmutOsmanovic/machine-learning-mooc-caltech
deca978e13f6d6950f06417c4d520e71904962d7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jun 3 17:25:24 2021 @author: Mahmu """
10.625
35
0.552941
14
85
3.357143
1
0
0
0
0
0
0
0
0
0
0
0.181818
0.223529
85
7
36
12.142857
0.530303
0.870588
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
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
922cc89db64e69f44ee82b8546bb344f730ca11e
15
py
Python
tackle/providers/system/tests/listdir/dirs/dir1/things.py
geometry-labs/tackle-box
83424a10416955ba983f0c14ec89bd79673a4282
[ "BSD-3-Clause" ]
1
2021-04-13T23:10:11.000Z
2021-04-13T23:10:11.000Z
tackle/providers/system/tests/listdir/dir/things.py
geometry-labs/tackle-box
83424a10416955ba983f0c14ec89bd79673a4282
[ "BSD-3-Clause" ]
4
2021-01-27T00:06:12.000Z
2021-02-12T01:20:32.000Z
tackle/providers/system/tests/listdir/dirs/dir2/things.py
geometry-labs/tackle-box
83424a10416955ba983f0c14ec89bd79673a4282
[ "BSD-3-Clause" ]
1
2021-05-07T05:07:29.000Z
2021-05-07T05:07:29.000Z
"""Fixture."""
7.5
14
0.466667
1
15
7
1
0
0
0
0
0
0
0
0
0
0
0
0.066667
15
1
15
15
0.5
0.533333
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
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
927ff146253bab5b542604ef8da3df3f7b17770b
190
py
Python
graphql_persist/renderers/__init__.py
flavors/django-graphql-persist
ff9acf108961f68831126c0f2d6e31b8b562390d
[ "MIT" ]
24
2018-04-14T03:07:11.000Z
2021-11-08T12:04:09.000Z
graphql_persist/renderers/__init__.py
urantialife/django-graphql-persist
ff9acf108961f68831126c0f2d6e31b8b562390d
[ "MIT" ]
1
2018-10-02T18:45:49.000Z
2018-10-02T18:45:49.000Z
graphql_persist/renderers/__init__.py
urantialife/django-graphql-persist
ff9acf108961f68831126c0f2d6e31b8b562390d
[ "MIT" ]
5
2018-07-02T07:03:54.000Z
2020-06-17T01:42:25.000Z
from .base import BaseRenderer, BaseStripTagsRenderer from .relay import StripRelayTagsRenderer __all__ = [ 'BaseRenderer', 'BaseStripTagsRenderer', 'StripRelayTagsRenderer', ]
21.111111
53
0.768421
13
190
10.923077
0.615385
0.464789
0
0
0
0
0
0
0
0
0
0
0.152632
190
8
54
23.75
0.881988
0
0
0
0
0
0.289474
0.226316
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0
1
0
1
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
0
0
0
0
0
4
929425d121fe8df77c3f3566e1e783da33e87651
90
py
Python
previous_programs/pyseg1.py
omar115/code_for_Kids
3f50ffb1d492c6ea5aa09688944aa01a0cadf1fd
[ "MIT" ]
null
null
null
previous_programs/pyseg1.py
omar115/code_for_Kids
3f50ffb1d492c6ea5aa09688944aa01a0cadf1fd
[ "MIT" ]
null
null
null
previous_programs/pyseg1.py
omar115/code_for_Kids
3f50ffb1d492c6ea5aa09688944aa01a0cadf1fd
[ "MIT" ]
2
2021-01-08T03:52:46.000Z
2021-04-01T19:16:12.000Z
import pygame #importing pygame library pygame.init() #initialize the pygame modules
30
47
0.777778
11
90
6.363636
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.166667
90
3
47
30
0.933333
0.588889
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
92b0b1a69c9e990068464ba8568699743e6e28b1
35
py
Python
FileReader/__init__.py
hanscje/PySearch
22d551f5fa5c41cc82e9e8205f0dcea78ede9338
[ "MIT" ]
null
null
null
FileReader/__init__.py
hanscje/PySearch
22d551f5fa5c41cc82e9e8205f0dcea78ede9338
[ "MIT" ]
null
null
null
FileReader/__init__.py
hanscje/PySearch
22d551f5fa5c41cc82e9e8205f0dcea78ede9338
[ "MIT" ]
null
null
null
''' Leser filer gitt filnavn '''
5.833333
24
0.6
4
35
5.25
1
0
0
0
0
0
0
0
0
0
0
0
0.228571
35
5
25
7
0.777778
0.685714
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
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
2b9b0e371b366f805709054e52f39ef6d571d30d
296
py
Python
toydl/nn/__init__.py
CharlesPikachu/pytoydl
861ebce6c7c40d155a6575330c08abbf07c9477d
[ "Apache-2.0" ]
18
2022-03-26T15:56:01.000Z
2022-03-30T11:31:27.000Z
toydl/nn/__init__.py
CharlesPikachu/pytoydl
861ebce6c7c40d155a6575330c08abbf07c9477d
[ "Apache-2.0" ]
null
null
null
toydl/nn/__init__.py
CharlesPikachu/pytoydl
861ebce6c7c40d155a6575330c08abbf07c9477d
[ "Apache-2.0" ]
1
2022-03-27T08:08:05.000Z
2022-03-27T08:08:05.000Z
'''initialize''' from .linear import Linear from .module import Module from .flatten import Flatten from .convolution import Conv2d from .sequential import Sequential from .criterion import MSELoss, CrossEntropy from .activation import Softmax, Sigmoid, Tanh, ReLU, LeakyReLU, ELU, SELU, Softplus
37
84
0.807432
37
296
6.459459
0.567568
0
0
0
0
0
0
0
0
0
0
0.003846
0.121622
296
8
84
37
0.915385
0.033784
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
2bb02e03aab91ab30e71668763a2af6ba9d109a0
62
py
Python
python/testData/formatter/attributeAlignmentInClassPatterns.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/formatter/attributeAlignmentInClassPatterns.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/formatter/attributeAlignmentInClassPatterns.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
match x: case Class(1, foo=2, bar=3): pass
12.4
17
0.451613
10
62
2.8
1
0
0
0
0
0
0
0
0
0
0
0.083333
0.419355
62
5
18
12.4
0.694444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.2
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
2bd2163bb16f5245de973785c7060666025eb36e
125
py
Python
versiongrid/__main__.py
rsnyman/versiongrid
0870f320f2b53f1071282692816fcbba1f9a0346
[ "MIT" ]
null
null
null
versiongrid/__main__.py
rsnyman/versiongrid
0870f320f2b53f1071282692816fcbba1f9a0346
[ "MIT" ]
null
null
null
versiongrid/__main__.py
rsnyman/versiongrid
0870f320f2b53f1071282692816fcbba1f9a0346
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from versiongrid import get_app if __name__ == "__main__": get_app().run(port=8080, debug=True)
17.857143
40
0.712
19
125
4.157895
0.894737
0.151899
0
0
0
0
0
0
0
0
0
0.046729
0.144
125
6
41
20.833333
0.691589
0.168
0
0
0
0
0.07767
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
920362c8f520a333f3e3d28070877f35947421ec
157
py
Python
survol/sources_types/nmap/__init__.py
rchateauneu/survol
ba66d3ec453b2d9dd3a8dabc6d53f71aa9ba8c78
[ "BSD-3-Clause" ]
9
2017-10-05T23:36:23.000Z
2021-08-09T15:40:03.000Z
survol/sources_types/nmap/__init__.py
rchateauneu/survol
ba66d3ec453b2d9dd3a8dabc6d53f71aa9ba8c78
[ "BSD-3-Clause" ]
21
2018-01-02T09:33:03.000Z
2018-08-27T11:09:52.000Z
survol/sources_types/nmap/__init__.py
rchateauneu/survol
ba66d3ec453b2d9dd3a8dabc6d53f71aa9ba8c78
[ "BSD-3-Clause" ]
4
2018-06-23T09:05:45.000Z
2021-01-22T15:36:50.000Z
""" Scripts using nmap """ # TODO: Check if nmap is accessible. def Usable(entity_type, entity_ids_arr): """Nmap must be accessible""" return True
15.7
40
0.681529
22
157
4.727273
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.197452
157
9
41
17.444444
0.825397
0.496815
0
0
0
0
0
0
0
0
0
0.111111
0
1
0.5
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
0
0
0
0
4
9215733498c13f3dc57c03ffa0560576a94c6889
3,686
py
Python
env/Lib/site-packages/OpenGL/GLES1/OES/required_internalformat.py
5gconnectedbike/Navio2
8c3f2b5d8bbbcea1fc08739945183c12b206712c
[ "BSD-3-Clause" ]
210
2016-04-09T14:26:00.000Z
2022-03-25T18:36:19.000Z
env/Lib/site-packages/OpenGL/GLES1/OES/required_internalformat.py
5gconnectedbike/Navio2
8c3f2b5d8bbbcea1fc08739945183c12b206712c
[ "BSD-3-Clause" ]
72
2016-09-04T09:30:19.000Z
2022-03-27T17:06:53.000Z
env/Lib/site-packages/OpenGL/GLES1/OES/required_internalformat.py
5gconnectedbike/Navio2
8c3f2b5d8bbbcea1fc08739945183c12b206712c
[ "BSD-3-Clause" ]
64
2016-04-09T14:26:49.000Z
2022-03-21T11:19:47.000Z
'''OpenGL extension OES.required_internalformat This module customises the behaviour of the OpenGL.raw.GLES1.OES.required_internalformat to provide a more Python-friendly API Overview (from the spec) The ES 1.1 API allows an implementation to store texture data internally with arbitrary precision, regardless of the format and type of the data supplied by the application. Similarly, ES allows an implementation to choose an arbitrary precision for the internal storage of image data allocated by glRenderbufferStorageOES. While this allows flexibility for implementations, it does mean that an application does not have a reliable means to request the implementation maintain a specific precision or to find out what precision the implementation will maintain for a given texture or renderbuffer image. For reference, "Desktop" OpenGL uses the <internalformat> argument to glTexImage*, glCopyTexImage* and glRenderbufferStorageEXT as a hint, defining the particular base format and precision that the application wants the implementation to maintain when storing the image data. Further, the application can choose an <internalformat> with a different base internal format than the source format specified by <format>. The implementation is not required to exactly match the precision specified by <internalformat> when choosing an internal storage precision, but it is required to match the base internal format of <internalformat>. In addition, ES 1.1 does not allow an implementation to fail a request to glTexImage2D for any of the legal <format> and <type> combinations listed in Table 3.4, even if the implementation does not natively support data stored in that external <format> and <type>. However, there are no additional requirements placed on the implementation. The ES implementation is free to store the texture data with lower precision than originally specified, for instance. Further, since ES removes the ability to query the texture object to find out what internal format it chose, there is no way for the application to find out that this has happened. This extension addresses the situation in two ways: 1) This extension introduces the ability for an application to specify the desired "sized" internal formats for texture image allocation. 2) This extension guarantees to maintain at least the specified precision of all available sized internal formats. An implementation that exports this extension is committing to support all of the legal values for <internalformat> in Tables 3.4, 3.4.x, and 3.4.y, subject to the extension dependencies described herein. That is to say, the implementation is guaranteeing that choosing an <internalformat> argument with a value from these tables will not cause an image allocation request to fail. Furthermore, it is guaranteeing that for any sized internal format, the renderbuffer or texture data will be stored with at least the precision prescribed by the sized internal format. The official definition of this extension is available here: http://www.opengl.org/registry/specs/OES/required_internalformat.txt ''' from OpenGL import platform, constant, arrays from OpenGL import extensions, wrapper import ctypes from OpenGL.raw.GLES1 import _types, _glgets from OpenGL.raw.GLES1.OES.required_internalformat import * from OpenGL.raw.GLES1.OES.required_internalformat import _EXTENSION_NAME def glInitRequiredInternalformatOES(): '''Return boolean indicating whether this extension is available''' from OpenGL import extensions return extensions.hasGLExtension( _EXTENSION_NAME ) ### END AUTOGENERATED SECTION
50.493151
78
0.801139
531
3,686
5.54049
0.374765
0.040449
0.042488
0.017335
0.046567
0.046567
0.033311
0.033311
0
0
0
0.006165
0.163863
3,686
73
79
50.493151
0.94841
0.975041
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
true
0
0.777778
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
a61594f632b0d3d0c910eeb641612e237e504366
1,904
py
Python
orbeon_xml_api/tests/controls/test_yesno_input.py
euroblaze/orbeon-xml-api
de8bdafdb0964dc7521f6cfbdb6e7c1350d0e0fd
[ "MIT" ]
2
2017-10-03T21:01:59.000Z
2018-11-25T14:56:56.000Z
orbeon_xml_api/tests/controls/test_yesno_input.py
euroblaze/orbeon-xml-api
de8bdafdb0964dc7521f6cfbdb6e7c1350d0e0fd
[ "MIT" ]
15
2017-06-21T22:03:10.000Z
2020-01-24T14:41:58.000Z
orbeon_xml_api/tests/controls/test_yesno_input.py
bobslee/orbeon_xml_api
de8bdafdb0964dc7521f6cfbdb6e7c1350d0e0fd
[ "MIT" ]
5
2018-01-19T07:39:18.000Z
2022-02-05T18:45:58.000Z
# -*- coding: utf-8 -*- # Copyright 2017-2018 Bob Leers (http://www.novacode.nl) # See LICENSE file for full licensing details. from . import CommonTestCase from ..controls import BooleanControl class YesnoInputTestCase(CommonTestCase): def setUp(self): super(YesnoInputTestCase, self).setUp() self.control = self.builder.controls['yesno-input'] def test_control(self): self.assertIsInstance(self.control, BooleanControl) def test_builder_bind(self): self.assertEqual(self.control._bind.id, 'yesno-input-bind') self.assertEqual(self.control._bind.name, 'yesno-input') def test_builder_parent(self): self.assertEqual(self.control._parent._bind.id, 'selection-controls-bind') self.assertEqual(self.control._parent._bind.name, 'selection-controls') self.assertEqual(self.control._parent._resource_element.label, 'Selection Controls') def test_builder_form(self): self.assertEqual(self.control._resource_element.label, 'Yes/No Answer') self.assertEqual(self.control._resource_element.hint, None) self.assertEqual(self.control.label, 'Yes/No Answer') self.assertEqual(self.control.hint, None) def test_builder_form_default_value(self): self.assertEqual(self.control.default_raw_value, 'false') self.assertEqual(self.control.default_value, False) def test_runner_value(self): self.assertEqual(self.runner.get_raw_value('yesno-input').text, 'true') self.assertEqual(self.runner.get_value('yesno-input'), True) def test_runner_form(self): self.assertEqual(self.runner.form.yesnoinput.label, 'Yes/No Answer') self.assertEqual(self.runner.form.yesnoinput.choice_label, 'Yes') self.assertEqual(self.runner.form.yesnoinput.choice_value, True) self.assertEqual(self.runner.form.yesnoinput.choice, {'Yes': True})
39.666667
92
0.720063
234
1,904
5.705128
0.260684
0.191011
0.241948
0.214232
0.504869
0.301124
0.17603
0.062921
0
0
0
0.005597
0.155462
1,904
47
93
40.510638
0.824627
0.06355
0
0
0
0
0.097246
0.012929
0
0
0
0
0.580645
1
0.258065
false
0
0.064516
0
0.354839
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
0
0
0
4
a61a78e1cab1f03c9d0461743ce06ad3357c0c65
88
py
Python
deepanimebot/wsgi.py
jmuddappa/DeepClassificationBot
70aaa6787cf02e8a6b49a913af6496bc0f288b35
[ "MIT" ]
null
null
null
deepanimebot/wsgi.py
jmuddappa/DeepClassificationBot
70aaa6787cf02e8a6b49a913af6496bc0f288b35
[ "MIT" ]
null
null
null
deepanimebot/wsgi.py
jmuddappa/DeepClassificationBot
70aaa6787cf02e8a6b49a913af6496bc0f288b35
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from deepanimebot.webapp import create_app app = create_app()
14.666667
42
0.693182
12
88
4.916667
0.75
0.305085
0
0
0
0
0
0
0
0
0
0.013514
0.159091
88
5
43
17.6
0.783784
0.238636
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
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
0
0
0
4
a63ae79dab43a45f9796020acdffd2b083f3767f
237
py
Python
ex006.py
thaisouza30/Exercicios-Python3-Curso-em-Video
ec9ccf57fae7bd86ec7a80efb1df779dd2128154
[ "Apache-2.0" ]
1
2021-02-01T17:22:11.000Z
2021-02-01T17:22:11.000Z
ex006.py
thaisouza30/Exercicios-Python3-Curso-em-Video
ec9ccf57fae7bd86ec7a80efb1df779dd2128154
[ "Apache-2.0" ]
null
null
null
ex006.py
thaisouza30/Exercicios-Python3-Curso-em-Video
ec9ccf57fae7bd86ec7a80efb1df779dd2128154
[ "Apache-2.0" ]
null
null
null
n = int(input('Digite um número:')) d = n * 2 t = n * 3 r = n ** (1/2) print('O dobro de {} é igual a {}'.format(n,d)) print('O triplo de {} é igual a {}'.format(n,t)) print('A raiz quadrada de {} é igual a {:.3f}'.format(n,r))
26.333333
60
0.535865
48
237
2.645833
0.5
0.070866
0.188976
0.212598
0.251969
0.251969
0
0
0
0
0
0.027322
0.227848
237
8
61
29.625
0.666667
0
0
0
0
0
0.473684
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
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
0
0
0
1
0
4
a653a0a0f95f45f0410d7198d1c7494621ed44b5
4,643
py
Python
python/src/all_sql_leave_one_out.py
antlr/groom
909c04b386c6d384344cd0d060dd1e3b4bde77a2
[ "BSD-2-Clause" ]
408
2016-04-21T09:40:08.000Z
2022-03-22T02:05:29.000Z
python/src/all_sql_leave_one_out.py
antlr/groom
909c04b386c6d384344cd0d060dd1e3b4bde77a2
[ "BSD-2-Clause" ]
25
2016-01-24T17:28:49.000Z
2021-05-05T19:17:55.000Z
python/src/all_sql_leave_one_out.py
antlr/groom
909c04b386c6d384344cd0d060dd1e3b4bde77a2
[ "BSD-2-Clause" ]
78
2016-02-14T07:22:21.000Z
2022-02-10T08:23:12.000Z
# # AUTO-GENERATED FILE. DO NOT EDIT # CodeBuff 1.4.15 'Wed May 18 13:26:32 PDT 2016' # import matplotlib.pyplot as plt sqlite_noisy_dist = [0.09836066, 0.022033898, 0.17368421, 0.2141707, 0.18779589, 0.14686924, 0.18441814, 0.054758802, 0.124442354, 0.3275449, 0.30130294, 0.18965517, 0.25156575, 0.17710997, 0.15145873, 0.07841709, 0.13931298, 0.05945604, 0.12756215, 0.17483108, 0.25382832, 0.1692503, 0.050943397, 0.29538462, 0.29448563, 0.096440874, 0.17417678, 0.10140562, 0.42797562, 0.18231541, 0.2881356, 0.12930804, 0.13706197, 0.4048535, 0.25200784, 0.2426739] sqlite_noisy_err = [0.13043478, 0.05154639, 0.16666667, 0.19277108, 0.21613833, 0.16488223, 0.20158103, 0.23076923, 0.3004695, 0.1767442, 0.2877698, 0.35341364, 0.14965986, 0.17948718, 0.13783784, 0.16071428, 0.2375, 0.0954142, 0.14021571, 0.3480663, 0.18771331, 0.11507192, 0.12962963, 0.25609756, 0.082474224, 0.17699115, 0.18137255, 0.12195122, 0.2031746, 0.20421052, 0.15662651, 0.24232633, 0.16241299, 0.15104167, 0.23387873, 0.20476191] sqlite_dist = [0.051136363, 0.12647554, 0.13404508, 0.1653944, 0.100965105, 0.13206628, 0.12976141, 0.053326294, 0.1389049, 0.29259777, 0.08171206, 0.073387094, 0.12825397, 0.16488846, 0.21766561, 0.17828201, 0.06295051, 0.12, 0.017766498, 0.08073557, 0.15343915, 0.1861004, 0.23136717, 0.042955328, 0.09806695, 0.04945904, 0.14314449, 0.045454547, 0.01772264, 0.3630448, 0.24878557, 0.06834991, 0.13519663, 0.23031302, 0.29133984, 0.20620084] sqlite_err = [0.02173913, 0.13095239, 0.09322034, 0.13978495, 0.112526536, 0.12707183, 0.20600858, 0.09163347, 0.1446281, 0.08108108, 0.06081081, 0.08365019, 0.088652484, 0.103896104, 0.13819095, 0.12345679, 0.086448595, 0.105882354, 0.033492822, 0.096352376, 0.11954766, 0.15254237, 0.14150943, 0.07826087, 0.109725684, 0.06410257, 0.120440066, 0.045454547, 0.02793296, 0.13432837, 0.14677104, 0.070336394, 0.11606218, 0.11358025, 0.16992882, 0.13303168] tsql_noisy_dist = [0.0726257, 0.022033898, 0.23188406, 0.18421052, 0.1662283, 0.14548802, 0.11126827, 0.16565247, 0.09313155, 0.39137214, 0.30509746, 0.26384366, 0.302714, 0.056074765, 0.11660079, 0.09351145, 0.066521004, 0.1731419, 0.09747056, 0.2146606, 0.29583976, 0.33452633, 0.035849057, 0.13214473, 0.09190809, 0.058553386, 0.15247019, 0.32157692, 0.23518687, 0.13145539, 0.12927757, 0.14373498, 0.3435682, 0.16183333, 0.2810994, 0.25643808] tsql_noisy_err = [0.13333334, 0.05102041, 0.20731707, 0.19318181, 0.24431819, 0.18859649, 0.2746479, 0.1983471, 0.22891566, 0.23041475, 0.39112905, 0.23404256, 0.21917808, 0.16788322, 0.16666667, 0.2125, 0.12280702, 0.35359117, 0.12654321, 0.19186492, 0.26993865, 0.07020548, 0.083333336, 0.25, 0.11873351, 0.112068966, 0.1407767, 0.13370998, 0.2079832, 0.087628864, 0.18769231, 0.24183007, 0.11627907, 0.13879408, 0.20209724, 0.21345165] tsql_dist = [0.051136363, 0.0994941, 0.107947804, 0.14492753, 0.09844054, 0.086391434, 0.13415655, 0.39455307, 0.040126715, 0.1723343, 0.089516126, 0.050583657, 0.09372893, 0.12512124, 0.29865205, 0.13614263, 0.047573283, 0.086045824, 0.01427372, 0.08557879, 0.106541604, 0.18301158, 0.04639175, 0.21465969, 0.054929577, 0.012269938, 0.11664296, 0.12520953, 0.024550635, 0.22519083, 0.117156476, 0.18596148, 0.118186206, 0.19769357, 0.19796954, 0.12833889] tsql_err = [0.02173913, 0.11764706, 0.075630255, 0.14893617, 0.08310992, 0.11612903, 0.13983051, 0.10358566, 0.09589041, 0.1125, 0.11026616, 0.046979867, 0.075, 0.07692308, 0.13, 0.083333336, 0.07339449, 0.11126374, 0.023809524, 0.10192024, 0.11556982, 0.09677419, 0.060869563, 0.1577287, 0.07263923, 0.007575758, 0.047826085, 0.10996564, 0.083798885, 0.14563107, 0.069536425, 0.07230769, 0.08527919, 0.1127451, 0.11852502, 0.07671601] language_data = [sqlite_dist, sqlite_err, sqlite_noisy_dist, sqlite_noisy_err, tsql_dist, tsql_err, tsql_noisy_dist, tsql_noisy_err] labels = ["sqlite\nn=36", "sqlite_err\nn=36", "sqlite_noisy\nn=36", "sqlite_noisy_err\nn=36", "tsql\nn=36", "tsql_err\nn=36", "tsql_noisy\nn=36", "tsql_noisy_err\nn=36"] fig = plt.figure() ax = plt.subplot(111) ax.boxplot(language_data, whis=[10, 90], # 10 and 90 % whiskers widths=.35, labels=labels) ax.set_xticklabels(labels, rotation=60, fontsize=8) plt.xticks(range(1,len(labels)+1), labels, rotation=60) ax.yaxis.grid(True, linestyle='-', which='major', color='lightgrey', alpha=0.5) ax.set_xlabel("Grammar and corpus size") ax.set_ylabel("Edit distance / size of file") ax.set_title("Leave-one-out Validation Using Edit Distance / Error Rate\nBetween Formatted and Original File") plt.tight_layout() fig.savefig('images/all_sql_leave_one_out.pdf', format='pdf') plt.show()
140.69697
456
0.7437
774
4,643
4.405685
0.483204
0.009384
0.008211
0.008798
0
0
0
0
0
0
0
0.625564
0.093474
4,643
32
457
145.09375
0.184604
0.021538
0
0
1
0
0.071192
0.011902
0
0
0
0
0
1
0
false
0
0.038462
0
0.038462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a6917d30d39c576a95090cfd10f0cc82205a48d3
285
py
Python
activitysim/abm/tables/__init__.py
SEMCOG/SEMCOG_ActSim
cc18cce84b2e4b5f380f58c7919953d2cd03ee73
[ "BSD-3-Clause" ]
null
null
null
activitysim/abm/tables/__init__.py
SEMCOG/SEMCOG_ActSim
cc18cce84b2e4b5f380f58c7919953d2cd03ee73
[ "BSD-3-Clause" ]
1
2021-06-30T23:39:37.000Z
2021-06-30T23:39:37.000Z
activitysim/abm/tables/__init__.py
SEMCOG/SEMCOG_ActSim
cc18cce84b2e4b5f380f58c7919953d2cd03ee73
[ "BSD-3-Clause" ]
null
null
null
# ActivitySim # See full license in LICENSE.txt. from . import households from . import persons from . import landuse from . import skims from . import tours from . import size_terms from . import trips from . import time_windows from . import shadow_pricing from . import table_dict
20.357143
34
0.778947
41
285
5.317073
0.536585
0.458716
0
0
0
0
0
0
0
0
0
0
0.17193
285
13
35
21.923077
0.923729
0.154386
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
a6dbdc89446022940fa3d39d8a5ae4dddbf2cb20
122
py
Python
src/columnize/menu/apps.py
StepanBakshayev/columnize
b4189ea1cb65635924f87fb61ebc8c069f6b023f
[ "MIT" ]
null
null
null
src/columnize/menu/apps.py
StepanBakshayev/columnize
b4189ea1cb65635924f87fb61ebc8c069f6b023f
[ "MIT" ]
null
null
null
src/columnize/menu/apps.py
StepanBakshayev/columnize
b4189ea1cb65635924f87fb61ebc8c069f6b023f
[ "MIT" ]
null
null
null
from django.apps import AppConfig class MenuConfig(AppConfig): name = 'columnize.menu' label = 'columnize_menu'
17.428571
33
0.729508
14
122
6.285714
0.785714
0.295455
0
0
0
0
0
0
0
0
0
0
0.180328
122
6
34
20.333333
0.88
0
0
0
0
0
0.229508
0
0
0
0
0
0
1
0
false
0
0.25
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
0
0
0
0
1
0
0
4
4708f05dc6e6de5209c8415b368eeb890cf68118
1,319
py
Python
ampel/template/ChannelWithProcsTemplate.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/template/ChannelWithProcsTemplate.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/template/ChannelWithProcsTemplate.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: Ampel-core/ampel/template/ChannelWithProcsTemplate.py # License: BSD-3-Clause # Author: valery brinnel <firstname.lastname@gmail.com> # Date: 16.10.2019 # Last Modified Date: 05.01.2022 # Last Modified By: valery brinnel <firstname.lastname@gmail.com> from ampel.log.AmpelLogger import AmpelLogger from typing import Any from ampel.config.builder.FirstPassConfig import FirstPassConfig from ampel.abstract.AbsChannelTemplate import AbsChannelTemplate from ampel.model.ChannelModel import ChannelModel class ChannelWithProcsTemplate(AbsChannelTemplate): """ Convenience class allowing channel definitions to include processes. """ # Note: not using list[ProcessModel] on purpose since embedded processes # might need template processing as well process: list[dict[str, Any]] def get_channel(self, logger: AmpelLogger) -> dict[str, Any]: return self.dict(include=ChannelModel.get_model_keys()) def get_processes(self, logger: AmpelLogger, first_pass_config: FirstPassConfig) -> list[dict[str, Any]]: # Note: not enforcing channel selection for t3 processes # as these could require template processing first return [ self.transfer_channel_parameters(p) for p in self.process ]
36.638889
106
0.74602
162
1,319
6.024691
0.561728
0.036885
0.030738
0.061475
0.077869
0.077869
0
0
0
0
0
0.017257
0.165277
1,319
35
107
37.685714
0.86921
0.480667
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0.142857
0.357143
0.142857
0.785714
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
1
1
0
0
4
4711e0c79a281f5fadf51d0a70146c25fa121cb6
117
py
Python
simplarchiver/example/file/__init__.py
yindaheng98/simple-archiver
9563679a455491734899eeaf6226f066da6dfc88
[ "MIT" ]
2
2021-10-01T10:37:33.000Z
2021-11-15T09:39:56.000Z
simplarchiver/example/file/__init__.py
yindaheng98/simple-archiver
9563679a455491734899eeaf6226f066da6dfc88
[ "MIT" ]
null
null
null
simplarchiver/example/file/__init__.py
yindaheng98/simple-archiver
9563679a455491734899eeaf6226f066da6dfc88
[ "MIT" ]
null
null
null
from .update import CentralizedUpdateDownloader from .file import FileFeeder, DirFeeder, WalkFeeder, ExtFilterFeeder
39
68
0.863248
11
117
9.181818
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.094017
117
2
69
58.5
0.95283
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
0
0
0
4
4721810ac69033766220e843cfad2f07c8f3ab95
257
py
Python
web/web/views.py
jnvilo/django-bootstrap-template
fb62caf32ae9a43d77d1da5a19c9834168d8f095
[ "MIT" ]
null
null
null
web/web/views.py
jnvilo/django-bootstrap-template
fb62caf32ae9a43d77d1da5a19c9834168d8f095
[ "MIT" ]
4
2021-03-30T14:15:36.000Z
2021-09-22T19:31:48.000Z
web/web/views.py
jnvilo/django-bootstrap-template
fb62caf32ae9a43d77d1da5a19c9834168d8f095
[ "MIT" ]
null
null
null
from django.views import View from django import http from django import shortcuts class BaseView(View): template_name = "base.html" def get(self, request, **kwargs): return shortcuts.render(request, self.template_name, )
23.363636
62
0.684825
32
257
5.4375
0.625
0.172414
0.183908
0
0
0
0
0
0
0
0
0
0.233463
257
11
63
23.363636
0.883249
0
0
0
0
0
0.034884
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0.142857
1
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
5b67e0d6dd2ae8a5694f4afff74385028cc70f2b
97
py
Python
python/testData/addImport/localImport.after.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/addImport/localImport.after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/addImport/localImport.after.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def func(): try: import module module # <ref> except: pass
12.125
21
0.42268
9
97
4.555556
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.494845
97
7
22
13.857143
0.836735
0.051546
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
true
0.166667
0.166667
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
5b76749e536646e392ae50b2df5848066ff99fd7
2,680
py
Python
forte/data/ontology/test/test_outputs/ft/onto/stanfordnlp_ontology.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
forte/data/ontology/test/test_outputs/ft/onto/stanfordnlp_ontology.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
13
2019-12-01T04:51:38.000Z
2020-02-11T23:55:11.000Z
forte/data/ontology/test/test_outputs/ft/onto/stanfordnlp_ontology.py
tcl326/forte
d0d7b8b97da5e1d507dfa7cd4ec51d96067770b8
[ "Apache-2.0" ]
null
null
null
# ***automatically_generated*** # flake8: noqa # mypy: ignore-errors # pylint: skip-file """ Automatically generated file. Do not change manually. """ import forte.data.data_pack import forte.data.ontology.top import ft.onto import typing __all__ = [] __all__.extend('Token') class Token(forte.data.ontology.top.Annotation): def __init__(self, pack: forte.data.base_pack.PackType, begin: int, end: int): super().__init__(pack, begin, end) self._lemma: typing.Optional[str] = None self._pos_tag: typing.Optional[str] = None self._upos: typing.Optional[str] = None self._xpos: typing.Optional[str] = None @property def lemma(self): return self._lemma def set_lemma(self, lemma: typing.Optional[str]): self.set_fields(_lemma=lemma) @property def pos_tag(self): return self._pos_tag def set_pos_tag(self, pos_tag: typing.Optional[str]): self.set_fields(_pos_tag=pos_tag) @property def upos(self): return self._upos def set_upos(self, upos: typing.Optional[str]): self.set_fields(_upos=upos) @property def xpos(self): return self._xpos def set_xpos(self, xpos: typing.Optional[str]): self.set_fields(_xpos=xpos) __all__.extend('Sentence') class Sentence(forte.data.ontology.top.Annotation): def __init__(self, pack: forte.data.base_pack.PackType, begin: int, end: int): super().__init__(pack, begin, end) self._tokens: typing.Optional[typing.List[ft.onto.stanfordnlp_ontology.Token]] = None @property def tokens(self): return self._tokens def set_tokens(self, tokens: typing.Optional[typing.List[ft.onto.stanfordnlp_ontology.Token]]): self.set_fields(_tokens=[item.tid for item in tokens]) __all__.extend('Document') class Document(forte.data.ontology.top.Annotation): def __init__(self, pack: forte.data.base_pack.PackType, begin: int, end: int): super().__init__(pack, begin, end) __all__.extend('Dependency') class Dependency(forte.data.ontology.top.Link): parent_type: ft.onto.stanfordnlp_ontology.Token = None child_type: ft.onto.stanfordnlp_ontology.Token = None def __init__(self, pack: forte.data.base_pack.PackType, parent: typing.Optional[forte.data.ontology.core.Entry] = None, child: typing.Optional[forte.data.ontology.core.Entry] = None): super().__init__(pack, parent, child) self._rel_type: typing.Optional[str] = None @property def rel_type(self): return self._rel_type def set_rel_type(self, rel_type: typing.Optional[str]): self.set_fields(_rel_type=rel_type)
26.534653
187
0.691045
362
2,680
4.81768
0.18232
0.112385
0.097477
0.057339
0.584862
0.53211
0.37328
0.329702
0.279243
0.256307
0
0.000457
0.183955
2,680
100
188
26.8
0.796982
0.050373
0
0.20339
1
0
0.012234
0
0
0
0
0
0
1
0.271186
false
0
0.067797
0.101695
0.542373
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
5bd7b4a61816559713cb77b56ff1187cf244f36d
47
py
Python
src/images/__init__.py
bartoszcholewa/django-learning
cd1e2c7f4b9753c9930cb83d350f8e84b4d3837b
[ "MIT" ]
3
2017-04-25T10:19:02.000Z
2017-06-07T12:50:30.000Z
src/images/__init__.py
bartoszcholewa/django-learning
cd1e2c7f4b9753c9930cb83d350f8e84b4d3837b
[ "MIT" ]
null
null
null
src/images/__init__.py
bartoszcholewa/django-learning
cd1e2c7f4b9753c9930cb83d350f8e84b4d3837b
[ "MIT" ]
null
null
null
default_app_config = 'images.apps.ImagesConfig'
47
47
0.851064
6
47
6.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.042553
47
1
47
47
0.844444
0
0
0
0
0
0.5
0.5
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
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
5be1ef5846bea87e71e1fa0aa314def275bb9883
24
py
Python
customjson/cards/__init__.py
nikrolls/customjson
643eee2b44e066ba5dd26d640fa47800782cd5a6
[ "MIT" ]
5
2019-01-06T22:06:25.000Z
2020-12-23T08:41:24.000Z
customjson/cards/__init__.py
nikrolls/customjson
643eee2b44e066ba5dd26d640fa47800782cd5a6
[ "MIT" ]
3
2019-01-12T23:12:07.000Z
2019-06-02T19:01:55.000Z
customjson/cards/__init__.py
nikrolls/customjson
643eee2b44e066ba5dd26d640fa47800782cd5a6
[ "MIT" ]
6
2019-04-05T01:37:23.000Z
2019-05-22T21:59:00.000Z
"""Initialize cards."""
12
23
0.625
2
24
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
24
1
24
24
0.681818
0.708333
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
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5be751c2aa284ed959be440cb855440f3af5471a
135
py
Python
python/11172.py
ThePeeps191/online-judge-solutions
1cc7d26233c7bd2da23b82ac0fd1d4132cf8d0ad
[ "MIT" ]
1
2022-03-14T22:53:44.000Z
2022-03-14T22:53:44.000Z
python/11172.py
ThePeeps191/online-judge-solutions
1cc7d26233c7bd2da23b82ac0fd1d4132cf8d0ad
[ "MIT" ]
null
null
null
python/11172.py
ThePeeps191/online-judge-solutions
1cc7d26233c7bd2da23b82ac0fd1d4132cf8d0ad
[ "MIT" ]
null
null
null
for _ in range(int(input())): a, b = [int(i) for i in input().split()] if a > b: print(">") elif a < b: print("<") else: print("=")
27
41
0.518519
24
135
2.875
0.541667
0.086957
0.202899
0
0
0
0
0
0
0
0
0
0.2
135
5
42
27
0.638889
0
0
0
0
0
0.022059
0
0
0
0
0
0
1
0
false
0
0
0
0
0.6
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
0
0
0
0
0
1
0
4
7513193e8171fb30cae7c4519e34b970306737a8
108
py
Python
fornecedor/admin.py
Moisestuli/karrata
962ce0c573214bfc83720727c9cacae823a8c372
[ "MIT" ]
null
null
null
fornecedor/admin.py
Moisestuli/karrata
962ce0c573214bfc83720727c9cacae823a8c372
[ "MIT" ]
null
null
null
fornecedor/admin.py
Moisestuli/karrata
962ce0c573214bfc83720727c9cacae823a8c372
[ "MIT" ]
null
null
null
from django.contrib import admin from fornecedor.models import Fornecedor admin.site.register(Fornecedor)
18
40
0.842593
14
108
6.5
0.642857
0
0
0
0
0
0
0
0
0
0
0
0.101852
108
5
41
21.6
0.938144
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
0
0
0
4
7555dd7722fe313b28f794803113b47431edad05
108
py
Python
flat_old_style_app/apps.py
thinkAmi-sandbox/Django_AppConfig-sample
14e2018dcaf31c6a615e615fb4b1ae713ea56416
[ "Unlicense" ]
null
null
null
flat_old_style_app/apps.py
thinkAmi-sandbox/Django_AppConfig-sample
14e2018dcaf31c6a615e615fb4b1ae713ea56416
[ "Unlicense" ]
null
null
null
flat_old_style_app/apps.py
thinkAmi-sandbox/Django_AppConfig-sample
14e2018dcaf31c6a615e615fb4b1ae713ea56416
[ "Unlicense" ]
null
null
null
from django.apps import AppConfig class FlatOldStyleAppConfig(AppConfig): name = 'flat_old_style_app'
18
39
0.796296
13
108
6.384615
0.923077
0
0
0
0
0
0
0
0
0
0
0
0.138889
108
5
40
21.6
0.892473
0
0
0
0
0
0.166667
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f3a6f7bd0d8c5e8a391a053dc772107e01d24263
245
py
Python
azure_monitor/src/azure_monitor/__init__.py
victoraugustolls/opentelemetry-exporters-python
301ebb4cc7268def80e39a3978cdcf249e9c38dd
[ "MIT" ]
null
null
null
azure_monitor/src/azure_monitor/__init__.py
victoraugustolls/opentelemetry-exporters-python
301ebb4cc7268def80e39a3978cdcf249e9c38dd
[ "MIT" ]
null
null
null
azure_monitor/src/azure_monitor/__init__.py
victoraugustolls/opentelemetry-exporters-python
301ebb4cc7268def80e39a3978cdcf249e9c38dd
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from azure_monitor.trace import AzureMonitorSpanExporter from azure_monitor.version import __version__ # noqa __all__ = ["AzureMonitorSpanExporter"]
35
59
0.820408
27
245
7.074074
0.740741
0.094241
0.167539
0
0
0
0
0
0
0
0
0
0.118367
245
6
60
40.833333
0.884259
0.383673
0
0
0
0
0.163265
0.163265
0
0
0
0
0
1
0
false
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
0
0
1
0
1
0
0
4
f3b3e70f61f0566d39f93d1f3973257411161204
74
py
Python
xeden/toolchain/__init__.py
flieger19/xEDEN
18eb090f6a9c91b7a891a2572ae43a3c2c691e5a
[ "MIT" ]
1
2020-09-18T18:40:40.000Z
2020-09-18T18:40:40.000Z
xeden/toolchain/__init__.py
flieger19/xEDEN
18eb090f6a9c91b7a891a2572ae43a3c2c691e5a
[ "MIT" ]
null
null
null
xeden/toolchain/__init__.py
flieger19/xEDEN
18eb090f6a9c91b7a891a2572ae43a3c2c691e5a
[ "MIT" ]
null
null
null
""" Documentation, License etc. @package X-EDEN Toolchain generation """
12.333333
36
0.72973
8
74
6.75
1
0
0
0
0
0
0
0
0
0
0
0
0.135135
74
5
37
14.8
0.84375
0.878378
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
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
f3ba28052bd18e41c206180f704398c723bf2635
1,411
py
Python
tests/029.py
abawchen/leetcode
41d3b172a7694a46a860fbcb0565a3acccd000f2
[ "MIT" ]
null
null
null
tests/029.py
abawchen/leetcode
41d3b172a7694a46a860fbcb0565a3acccd000f2
[ "MIT" ]
null
null
null
tests/029.py
abawchen/leetcode
41d3b172a7694a46a860fbcb0565a3acccd000f2
[ "MIT" ]
null
null
null
import unittest from operator import truediv import sys sys.path.append('./') solutions = __import__('solutions.029_divide_two_integers', fromlist='*') class Test029(unittest.TestCase): def test_divide(self): s = solutions.Solution() dividend, divisor = 49, 7 self.assertEqual(s.divide(dividend, divisor), self._divide(dividend, divisor)) dividend, divisor = 55, 7 self.assertEqual(s.divide(dividend, divisor), self._divide(dividend, divisor)) dividend, divisor = 56, 7 self.assertEqual(s.divide(dividend, divisor), self._divide(dividend, divisor)) dividend, divisor = 56+29, 7 self.assertEqual(s.divide(dividend, divisor), self._divide(dividend, divisor)) dividend, divisor = -1020450018, 2091335377 self.assertEqual(s.divide(dividend, divisor), self._divide(dividend, divisor)) dividend, divisor = -2147483648, -1 self.assertEqual(s.divide(dividend, divisor), 2147483647) dividend, divisor = -999511578, -2147483648 self.assertEqual(s.divide(dividend, divisor), self._divide(dividend, divisor)) dividend, divisor = -2147483648, 1 self.assertEqual(s.divide(dividend, divisor), self._divide(dividend, divisor)) def _divide(self, dividend, divisor): return int(truediv(dividend, divisor)) if __name__ == '__main__': unittest.main()
31.355556
86
0.678242
155
1,411
6.019355
0.264516
0.401929
0.337621
0.188639
0.633441
0.633441
0.633441
0.633441
0.633441
0.633441
0
0.080674
0.200567
1,411
44
87
32.068182
0.746454
0
0
0.25
0
0
0.031184
0.023388
0
0
0
0
0.285714
1
0.071429
false
0
0.142857
0.035714
0.285714
0
0
0
0
null
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f3bb3c9fead4d4ec5ed7df66887d32939402e380
259
py
Python
wsrpc_aiohttp/websocket/decorators.py
dizballanze/wsrpc-aiohttp
db75acfd331cceda420f4a6142399951eff13656
[ "MIT" ]
25
2017-09-25T19:45:24.000Z
2022-02-09T23:37:57.000Z
wsrpc_aiohttp/websocket/decorators.py
dizballanze/wsrpc-aiohttp
db75acfd331cceda420f4a6142399951eff13656
[ "MIT" ]
19
2017-08-08T08:55:40.000Z
2022-02-28T15:02:24.000Z
wsrpc_aiohttp/websocket/decorators.py
dizballanze/wsrpc-aiohttp
db75acfd331cceda420f4a6142399951eff13656
[ "MIT" ]
13
2017-09-13T11:01:41.000Z
2021-05-11T19:59:17.000Z
from functools import partial class ProxyBase(partial): pass class NoProxyFunction(ProxyBase): pass class ProxyFunction(ProxyBase): pass def noproxy(func): return NoProxyFunction(func) def proxy(func): return ProxyFunction(func)
11.772727
33
0.72973
28
259
6.75
0.5
0.095238
0
0
0
0
0
0
0
0
0
0
0.196911
259
21
34
12.333333
0.908654
0
0
0.272727
0
0
0
0
0
0
0
0
0
1
0.181818
false
0.272727
0.090909
0.181818
0.727273
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
4
f3c98f7f235397c5ca72e4826c1e22bdbfcbb84f
28
py
Python
config.py
Daniil-Pozdnyakov/Refresh_bot
5666b6abe12f5687fc8665cbf19477ef70510278
[ "MIT" ]
null
null
null
config.py
Daniil-Pozdnyakov/Refresh_bot
5666b6abe12f5687fc8665cbf19477ef70510278
[ "MIT" ]
null
null
null
config.py
Daniil-Pozdnyakov/Refresh_bot
5666b6abe12f5687fc8665cbf19477ef70510278
[ "MIT" ]
null
null
null
SLACK_API_KEY="Your API key"
28
28
0.821429
6
28
3.5
0.666667
0.571429
0
0
0
0
0
0
0
0
0
0
0.071429
28
1
28
28
0.807692
0
0
0
0
0
0.413793
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
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
0
0
0
0
0
4
45f096891383e10b64b3cecf4de511fc60e5e163
162
py
Python
example_snippets/multimenus_snippets/Snippets/SciPy/Integration and ODE solvers/Integrate given function object/General-purpose integration.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Integration and ODE solvers/Integrate given function object/General-purpose integration.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Integration and ODE solvers/Integrate given function object/General-purpose integration.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
from scipy import integrate def f(x, a, b): return a * x + b integral,error = integrate.quad(f, 0, 4.5, args=(2,1)) # integrates 2*x+1 print(integral, error)
32.4
74
0.660494
31
162
3.451613
0.677419
0.242991
0
0
0
0
0
0
0
0
0
0.052632
0.179012
162
5
75
32.4
0.75188
0.098765
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0.2
0
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
0
1
1
0
0
4
3401dab7126e0239b87ef3cd02922d203eb8d4f5
134
py
Python
api/urls.py
kneeraazon01/Site-monitoring-System
ac4e6e960556814a15e83b5d46c0421416be9da5
[ "Apache-2.0" ]
2
2021-04-10T19:16:00.000Z
2021-04-10T19:40:42.000Z
api/urls.py
kneeraazon01/Site-monitoring-System
ac4e6e960556814a15e83b5d46c0421416be9da5
[ "Apache-2.0" ]
null
null
null
api/urls.py
kneeraazon01/Site-monitoring-System
ac4e6e960556814a15e83b5d46c0421416be9da5
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views urlpatterns = [path("", views.apiOverview, name="home"), path("apis/", views.Apis)]
26.8
83
0.708955
18
134
5.277778
0.611111
0
0
0
0
0
0
0
0
0
0
0
0.119403
134
4
84
33.5
0.805085
0
0
0
0
0
0.067164
0
0
0
0
0
0
1
0
false
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
0
0
1
0
1
0
0
4
343898183c100b807de21653a2d1334cdb4f6aac
33
py
Python
notebooks/_solutions/13-raster-processing16.py
jorisvandenbossche/DS-python-geospatial
893a12edc5c203a75815f6dcb5f1e18c577c8cd5
[ "BSD-3-Clause" ]
58
2020-10-09T10:10:59.000Z
2022-03-07T14:58:07.000Z
notebooks/_solutions/13-raster-processing16.py
jorisvandenbossche/DS-python-geospatial
893a12edc5c203a75815f6dcb5f1e18c577c8cd5
[ "BSD-3-Clause" ]
24
2020-09-30T19:57:14.000Z
2021-10-05T07:21:09.000Z
notebooks/_solutions/13-raster-processing16.py
jorisvandenbossche/DS-python-geospatial
893a12edc5c203a75815f6dcb5f1e18c577c8cd5
[ "BSD-3-Clause" ]
19
2020-10-05T09:32:18.000Z
2022-03-20T00:09:14.000Z
land_use.plot.imshow(robust=True)
33
33
0.848485
6
33
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0
33
1
33
33
0.818182
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
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
0
0
0
0
0
4
34438e125ee685228c3b316b55ec9be33f7bd0f4
183
py
Python
venv/bin/django-admin.py
rupaltotale/To-do-list-webapp
1416077f71a703cca86ad59fda03fe7f77eddc96
[ "MIT" ]
1
2021-03-28T01:44:59.000Z
2021-03-28T01:44:59.000Z
venv/bin/django-admin.py
rupaltotale/To-do-list-webapp
1416077f71a703cca86ad59fda03fe7f77eddc96
[ "MIT" ]
5
2021-03-30T14:05:33.000Z
2021-09-22T19:28:39.000Z
venv/bin/django-admin.py
rupaltotale/list-it
1416077f71a703cca86ad59fda03fe7f77eddc96
[ "MIT" ]
null
null
null
#!/Users/rupalt/Desktop/Personal Projects/To-do-list-webapp/venv/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
30.5
76
0.79235
25
183
5.36
0.92
0
0
0
0
0
0
0
0
0
0
0.005988
0.087432
183
5
77
36.6
0.796407
0.409836
0
0
0
0
0.074766
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
cab698f605df0fbdcf1a69fb6feb5aa18468f1a3
497
py
Python
code-exercises-etc/playtime/lesson02_99bottles.py
hannahkwarren/CLaG-Sp2016
a75862d187176d9f2f1778eb6300056364292b44
[ "MIT" ]
null
null
null
code-exercises-etc/playtime/lesson02_99bottles.py
hannahkwarren/CLaG-Sp2016
a75862d187176d9f2f1778eb6300056364292b44
[ "MIT" ]
null
null
null
code-exercises-etc/playtime/lesson02_99bottles.py
hannahkwarren/CLaG-Sp2016
a75862d187176d9f2f1778eb6300056364292b44
[ "MIT" ]
null
null
null
# Can you make Python print out the song for 99 bottles of beer on the wall? # Helpful mnemonic: range(start, stop, step) for bottles in range(99, 1, -1): print "({0} bottles of beer on the wall, {0} bottles of beer...".format(bottles) print "Take one down, toss it around, {0} bottles of beer on the wall!".format(bottles - 1) #Stolen from KristenLinkLogan print "2 bottles of beer on the wall, 2 bottles of beer..." print "Take one down, toss it around, 1 bottle of beer on the wall!"
45.181818
95
0.704225
89
497
3.932584
0.404494
0.12
0.222857
0.157143
0.46
0.417143
0.291429
0
0
0
0
0.032419
0.193159
497
10
96
49.7
0.840399
0.291751
0
0
0
0
0.66092
0
0
0
0
0
0
0
null
null
0
0
null
null
0.8
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
4
cad7a29a35ff7662c5765d29a1820c57fb122363
23
py
Python
codes/sse/FirstPY.py
hiperwe/Grade1
e987d37cbae73d8ad1cb60007fc1497b08c4fa01
[ "MIT" ]
1
2019-07-21T16:41:22.000Z
2019-07-21T16:41:22.000Z
codes/sse/FirstPY.py
hiperwe/Grade1
e987d37cbae73d8ad1cb60007fc1497b08c4fa01
[ "MIT" ]
null
null
null
codes/sse/FirstPY.py
hiperwe/Grade1
e987d37cbae73d8ad1cb60007fc1497b08c4fa01
[ "MIT" ]
null
null
null
a = 5 b = 4 print(a+ b)
7.666667
11
0.478261
7
23
1.571429
0.714286
0
0
0
0
0
0
0
0
0
0
0.125
0.304348
23
3
11
7.666667
0.5625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
1
1
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
0
0
0
0
0
0
0
4
cade8a0e9598a83757dca205fcaf0046d85b424c
874
py
Python
gridaurora/zglow.py
scivision/gridaurora
89ae1b41826f971dd0e9a1329eb723116c9459c6
[ "BSD-2-Clause" ]
null
null
null
gridaurora/zglow.py
scivision/gridaurora
89ae1b41826f971dd0e9a1329eb723116c9459c6
[ "BSD-2-Clause" ]
null
null
null
gridaurora/zglow.py
scivision/gridaurora
89ae1b41826f971dd0e9a1329eb723116c9459c6
[ "BSD-2-Clause" ]
null
null
null
import numpy as np """ these are altitudes hard-coded into the old version of NCAR GLOW. """ def glowalt() -> np.ndarray: # z = range(80,110+1,1) z = np.arange(30.0, 110 + 1.0, 1.0) z = np.append(z, [111.5, 113.0, 114.5, 116.0]) z = np.append(z, np.arange(118, 150 + 2, 2.0)) z = np.append(z, np.arange(153, 168 + 3, 3.0)) z = np.append(z, np.arange(172, 180 + 4, 4.0)) z = np.append(z, np.arange(185, 205 + 5, 5)) z = np.append(z, np.arange(211, 223 + 6, 6)) z = np.append(z, np.arange(230, 244 + 7, 7)) z = np.append(z, np.arange(252, 300 + 8, 8)) z = np.append(z, np.arange(309, 345 + 9, 9)) z = np.append(z, np.arange(355, 395 + 10, 10)) z = np.append(z, np.arange(406, 428 + 11, 11)) z = np.append(z, [440.0, 453, 467, 482, 498, 515, 533, 551]) z = np.append(z, np.arange(570, 950 + 20, 20)) return z
33.615385
65
0.551487
176
874
2.738636
0.420455
0.155602
0.242739
0.26971
0.441909
0.419087
0.157676
0
0
0
0
0.232733
0.237986
874
25
66
34.96
0.490991
0.024027
0
0
0
0
0
0
0
0
0
0
0
1
0.058824
false
0
0.058824
0
0.176471
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4