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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a7e5f90b484f2a6b1a80514aa993869fef2c21e9
| 890
|
py
|
Python
|
angalabiri/blog/managers.py
|
dark-codr/ebiangala
|
0af3de29b2afa71df3e138cd16ecddc69fbd597d
|
[
"MIT"
] | 1
|
2021-03-25T14:06:23.000Z
|
2021-03-25T14:06:23.000Z
|
angalabiri/blog/managers.py
|
dark-codr/ebiangala
|
0af3de29b2afa71df3e138cd16ecddc69fbd597d
|
[
"MIT"
] | 5
|
2021-09-08T03:08:46.000Z
|
2022-03-12T00:56:35.000Z
|
angalabiri/blog/managers.py
|
me-edavids/ebiangala
|
0af3de29b2afa71df3e138cd16ecddc69fbd597d
|
[
"MIT"
] | null | null | null |
from django.db import models
from django.contrib.contenttypes.models import ContentType
class PostManager(models.Manager):
def get_queryset(self):
# All posts
return super().get_queryset()
def all_posts(self):
# All posts
return super().get_queryset().filter(draft=False)
def all_draft(self):
# All drafted posts
return super().get_queryset().filter(draft=True)
# class CommentManager(models.Manager):
# def get_queryset(self):
# return super().get_queryset()
# def all(self):
# return super().get_queryset().filter(parent=None)
# def filter_by_instance(self, instance):
# content_type = ContentType.objects.get_for_model(instance.__class__)
# obj_id = instance.id
# return super().get_queryset().filter(content_type=content_type, object_id= obj_id).filter(parent=None)
| 29.666667
| 112
| 0.677528
| 110
| 890
| 5.263636
| 0.336364
| 0.151986
| 0.145078
| 0.227979
| 0.464594
| 0.360967
| 0.202073
| 0
| 0
| 0
| 0
| 0
| 0.206742
| 890
| 29
| 113
| 30.689655
| 0.820113
| 0.538202
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.222222
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
c5333c5515ad78c60defdb9218e0cc73fab9a466
| 117
|
py
|
Python
|
readchar/__init__.py
|
3lixy/python-readchar
|
d854e0f73a392d35cb5f3b97ac1b57e5b5918f4d
|
[
"MIT"
] | null | null | null |
readchar/__init__.py
|
3lixy/python-readchar
|
d854e0f73a392d35cb5f3b97ac1b57e5b5918f4d
|
[
"MIT"
] | null | null | null |
readchar/__init__.py
|
3lixy/python-readchar
|
d854e0f73a392d35cb5f3b97ac1b57e5b5918f4d
|
[
"MIT"
] | null | null | null |
from .readchar import readchar, readkey
from . import key
__all__ = [readchar, readkey, key]
__version__ = '2.0.2'
| 16.714286
| 39
| 0.726496
| 16
| 117
| 4.8125
| 0.5625
| 0.38961
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030612
| 0.162393
| 117
| 6
| 40
| 19.5
| 0.755102
| 0
| 0
| 0
| 0
| 0
| 0.042735
| 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
|
c534938d5f10214f54cd2833f139f2821d2a47f1
| 184
|
py
|
Python
|
images/splunk/deployment/init_dmc.py
|
halr9000/docker-splunk-cluster
|
eebf20721fd7b88b1b9d92f919594a79c6758b10
|
[
"OLDAP-2.6",
"OLDAP-2.4"
] | null | null | null |
images/splunk/deployment/init_dmc.py
|
halr9000/docker-splunk-cluster
|
eebf20721fd7b88b1b9d92f919594a79c6758b10
|
[
"OLDAP-2.6",
"OLDAP-2.4"
] | null | null | null |
images/splunk/deployment/init_dmc.py
|
halr9000/docker-splunk-cluster
|
eebf20721fd7b88b1b9d92f919594a79c6758b10
|
[
"OLDAP-2.6",
"OLDAP-2.4"
] | 1
|
2021-08-09T09:18:21.000Z
|
2021-08-09T09:18:21.000Z
|
def configurations():
return {
"components": {
"kvstore": False,
"web": True,
"indexing": False,
"dmc": True
}
}
| 20.444444
| 30
| 0.391304
| 12
| 184
| 6
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.472826
| 184
| 9
| 31
| 20.444444
| 0.742268
| 0
| 0
| 0
| 0
| 0
| 0.167568
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| true
| 0
| 0
| 0.111111
| 0.222222
| 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
| 0
| 1
| 0
| 0
|
0
| 4
|
c575a50b0e1663bb554a9d81986d0c42871a98f2
| 73
|
py
|
Python
|
webnmap/__init__.py
|
jtdub/webnmap
|
3e2c4f6d0d668e83919ddb4b13a8f39b130f7b67
|
[
"MIT"
] | null | null | null |
webnmap/__init__.py
|
jtdub/webnmap
|
3e2c4f6d0d668e83919ddb4b13a8f39b130f7b67
|
[
"MIT"
] | null | null | null |
webnmap/__init__.py
|
jtdub/webnmap
|
3e2c4f6d0d668e83919ddb4b13a8f39b130f7b67
|
[
"MIT"
] | null | null | null |
from webnmap.celery import app as celery_app
__all__ = ('celery_app',)
| 14.6
| 44
| 0.753425
| 11
| 73
| 4.454545
| 0.636364
| 0.367347
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150685
| 73
| 4
| 45
| 18.25
| 0.790323
| 0
| 0
| 0
| 0
| 0
| 0.136986
| 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
|
3d77d6d2ee39d34226eaacfd678c5a03f29c0cd8
| 119
|
py
|
Python
|
scripts/lightsensors1.py
|
Shogo4402/pimouse_ros
|
235432b4d6821906c8d69755fedc25393faeacc0
|
[
"BSD-3-Clause"
] | null | null | null |
scripts/lightsensors1.py
|
Shogo4402/pimouse_ros
|
235432b4d6821906c8d69755fedc25393faeacc0
|
[
"BSD-3-Clause"
] | null | null | null |
scripts/lightsensors1.py
|
Shogo4402/pimouse_ros
|
235432b4d6821906c8d69755fedc25393faeacc0
|
[
"BSD-3-Clause"
] | null | null | null |
#!/usr/bin/env python3
import sys,rospy
from pimouse_ros.msg import LightSensorValues
rospy.init_node("lightsensors")
| 19.833333
| 45
| 0.815126
| 17
| 119
| 5.588235
| 0.882353
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009174
| 0.084034
| 119
| 5
| 46
| 23.8
| 0.862385
| 0.176471
| 0
| 0
| 0
| 0
| 0.123711
| 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
|
3d8c7a09cf43e260beda5642e7de8ecea93309eb
| 25
|
py
|
Python
|
src/jupyblog/__init__.py
|
edublancas/jupyblog
|
2b4ef21c8ce3aa0c977b558ef0e4fca036ee120d
|
[
"Apache-2.0"
] | null | null | null |
src/jupyblog/__init__.py
|
edublancas/jupyblog
|
2b4ef21c8ce3aa0c977b558ef0e4fca036ee120d
|
[
"Apache-2.0"
] | null | null | null |
src/jupyblog/__init__.py
|
edublancas/jupyblog
|
2b4ef21c8ce3aa0c977b558ef0e4fca036ee120d
|
[
"Apache-2.0"
] | null | null | null |
__version__ = '0.0.4dev'
| 12.5
| 24
| 0.68
| 4
| 25
| 3.25
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 0.12
| 25
| 1
| 25
| 25
| 0.454545
| 0
| 0
| 0
| 0
| 0
| 0.32
| 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
|
3dd0ba9caace50505050973cb03e270d5009d1e2
| 2,668
|
py
|
Python
|
cdg/generate_docs.py
|
imayobrown/cdg
|
21a44fda312ebe44093914834bf5e893ae6ee5ad
|
[
"MIT"
] | null | null | null |
cdg/generate_docs.py
|
imayobrown/cdg
|
21a44fda312ebe44093914834bf5e893ae6ee5ad
|
[
"MIT"
] | null | null | null |
cdg/generate_docs.py
|
imayobrown/cdg
|
21a44fda312ebe44093914834bf5e893ae6ee5ad
|
[
"MIT"
] | null | null | null |
'''
Functions/methods utilized to generate documentation
'''
import types
import os
import argparse
from argparse import ArgumentParser, _SubParsersAction
from importlib import import_module
# TODO: Maybe support importing by file path. Currently throws exception
def _import_parser_object(module, parser_name):
'''
Given module name and variable/function name within module get parser object.
If function given, that function should return an argparse object.
:param module: Fully qualified import path of the module where the function/variable can be found
:type module: String
:param parser_name: Name of the function that returns parser object or name of parser object itself (needs to be available in global scope)
:type parser_name: String
:rtype class: argparse.ArgumentParser
'''
imported_module = import_module(module)
imported_parser_name = getattr(imported_module, parser_name)
if isinstance(imported_parser_name, types.FunctionType):
imported_parser = imported_parser_name()
else:
imported_parser = imported_parser_name
if not isinstance(imported_parser, ArgumentParser):
raise Exception('Passed parser name does not yeild an instance of ArgumentParser. Type received: %s' % str(imported_parser))
return imported_parser
def _extract_arguments(parser):
print parser
def _extract_subcommands(parser):
'''
Extract subcommands if there are any.
Returns a dictionary of subcommands mapped to parser object
:param parser: Parser extracted from imported module
:type parser:class: argparse.ArgumentParser
:rtype class: Dict
'''
for action in parser._actions:
if isinstance(action, _SubParsersAction):
print 'Subactions: '
print action._get_subactions()
print
for subparser_name, subparser in action.choices.iteritems():
print subparser_name, subparser
print subparser._actions
print subparser.format_help()
def _extract_usage(parser):
'''
Extract usage information from parser
:param parser: Parser to extract usage from
:type parser:class: argparse.ArgumentParser
:rtype String
'''
return
def _extract_description(parser):
'''
Extract description from parser/subcommand
'''
return
def _extract_arguments(parser):
'''
Extract arguments and their descriptions from the parser/subcommand
'''
return
def generate_docs(prog, parser):
parser = _import_parser_object(prog, parser)
_extract_subcommands(parser)
# print(parser._actions[-1].choices['a'])
| 29.318681
| 143
| 0.719265
| 313
| 2,668
| 5.971246
| 0.335463
| 0.048154
| 0.038523
| 0.029963
| 0.079187
| 0.044944
| 0
| 0
| 0
| 0
| 0
| 0.000478
| 0.216267
| 2,668
| 90
| 144
| 29.644444
| 0.893352
| 0.041229
| 0
| 0.138889
| 1
| 0
| 0.065826
| 0
| 0
| 0
| 0
| 0.011111
| 0
| 0
| null | null | 0.027778
| 0.416667
| null | null | 0.194444
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
3de80e881563d477c6fcdac222a7d3ed625c2c35
| 32
|
py
|
Python
|
flask_app/env.py
|
Python-InstructorMelissa/week5session1
|
6196660fcb41a5b14ead169475b398a23c13304e
|
[
"MIT"
] | null | null | null |
flask_app/env.py
|
Python-InstructorMelissa/week5session1
|
6196660fcb41a5b14ead169475b398a23c13304e
|
[
"MIT"
] | null | null | null |
flask_app/env.py
|
Python-InstructorMelissa/week5session1
|
6196660fcb41a5b14ead169475b398a23c13304e
|
[
"MIT"
] | 2
|
2022-01-13T02:32:23.000Z
|
2022-03-10T19:16:50.000Z
|
KEY="MELISSA'S SUPER SECRET KEY"
| 32
| 32
| 0.78125
| 6
| 32
| 4.166667
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09375
| 32
| 1
| 32
| 32
| 0.862069
| 0
| 0
| 0
| 0
| 0
| 0.787879
| 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
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9abbde9a6087ea7bbff40a04f3abd450d29406eb
| 91
|
py
|
Python
|
Algorithms/01. Warmup/009. Birthday Cake Candles.py
|
stonehengee/HackerrankPractice
|
ec052e7447391e40d1919cf0b641ff5023da3da3
|
[
"MIT"
] | null | null | null |
Algorithms/01. Warmup/009. Birthday Cake Candles.py
|
stonehengee/HackerrankPractice
|
ec052e7447391e40d1919cf0b641ff5023da3da3
|
[
"MIT"
] | null | null | null |
Algorithms/01. Warmup/009. Birthday Cake Candles.py
|
stonehengee/HackerrankPractice
|
ec052e7447391e40d1919cf0b641ff5023da3da3
|
[
"MIT"
] | null | null | null |
# Problem: https://www.hackerrank.com/challenges/birthday-cake-candles/problem
# Score: 10
| 30.333333
| 78
| 0.78022
| 12
| 91
| 5.916667
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.023529
| 0.065934
| 91
| 2
| 79
| 45.5
| 0.811765
| 0.945055
| 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
|
9aca7b70384fad42d45dce7fe0739cd410df893a
| 148
|
py
|
Python
|
models/test.py
|
cughudson/Scenemap
|
fe17057987186f57a4b4ebda3281e4d8b4044e15
|
[
"MIT"
] | 2
|
2018-04-08T06:00:02.000Z
|
2018-10-04T01:44:00.000Z
|
models/test.py
|
cughudson/Scenemap
|
fe17057987186f57a4b4ebda3281e4d8b4044e15
|
[
"MIT"
] | null | null | null |
models/test.py
|
cughudson/Scenemap
|
fe17057987186f57a4b4ebda3281e4d8b4044e15
|
[
"MIT"
] | null | null | null |
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
#Run Cell
x = np.linspace(0, 20, 100)
plt.plot(x, np.sin(x))
plt.show()
| 18.5
| 31
| 0.72973
| 29
| 148
| 3.724138
| 0.62069
| 0.296296
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.047619
| 0.148649
| 148
| 8
| 32
| 18.5
| 0.809524
| 0.054054
| 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
|
9ad56e74990631c0742594265ab979654559c4d1
| 100
|
py
|
Python
|
thirdparty/patchmatchnet/datasets/__init__.py
|
swershrimpy/gtsfm
|
8d301eb3ef9172345a1ac1369fd4e19764d28946
|
[
"Apache-2.0"
] | 122
|
2021-02-07T23:01:58.000Z
|
2022-03-30T13:10:35.000Z
|
thirdparty/patchmatchnet/datasets/__init__.py
|
swershrimpy/gtsfm
|
8d301eb3ef9172345a1ac1369fd4e19764d28946
|
[
"Apache-2.0"
] | 273
|
2021-01-30T16:45:26.000Z
|
2022-03-16T15:02:33.000Z
|
thirdparty/patchmatchnet/datasets/__init__.py
|
swershrimpy/gtsfm
|
8d301eb3ef9172345a1ac1369fd4e19764d28946
|
[
"Apache-2.0"
] | 13
|
2021-03-12T03:01:27.000Z
|
2022-03-11T03:16:54.000Z
|
"""PatchmatchNet dataset module
reference: https://github.com/FangjinhuaWang/PatchmatchNet
"""
| 20
| 62
| 0.76
| 9
| 100
| 8.444444
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11
| 100
| 4
| 63
| 25
| 0.853933
| 0.87
| 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
|
9af27421412c4bf39660f33a5633a1c1325b9655
| 6,415
|
py
|
Python
|
src/yellowdog_client/scheduler/work_client_impl.py
|
yellowdog/yellowdog-sdk-python-public
|
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
|
[
"Apache-2.0"
] | null | null | null |
src/yellowdog_client/scheduler/work_client_impl.py
|
yellowdog/yellowdog-sdk-python-public
|
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
|
[
"Apache-2.0"
] | null | null | null |
src/yellowdog_client/scheduler/work_client_impl.py
|
yellowdog/yellowdog-sdk-python-public
|
da69a7d6e45c92933e34fefcaef8b5d98dcd6036
|
[
"Apache-2.0"
] | null | null | null |
from typing import Optional, List
from .work_client import WorkClient
from .work_service_proxy import WorkServiceProxy
from .work_requirement_helper import WorkRequirementHelper
from yellowdog_client.common.server_sent_events import SubscriptionManager
from yellowdog_client.common.server_sent_events import SubscriptionEventListener
from yellowdog_client.model import Identified
from yellowdog_client.model import WorkRequirement
from yellowdog_client.model import WorkRequirementStatus
from yellowdog_client.model import WorkRequirementSummary
from yellowdog_client.model import TaskGroup
from yellowdog_client.model import Task
from yellowdog_client.model import TaskSearch
from yellowdog_client.model import SliceReference
from yellowdog_client.model import Slice
class WorkClientImpl(WorkClient):
def __init__(self, service_proxy: WorkServiceProxy) -> None:
self.__service_proxy = service_proxy
self.__requirement_subscriptions = SubscriptionManager(
update_events_provider=self.__service_proxy.stream_work_requirement_updates,
class_type=WorkRequirement
)
@staticmethod
def _check_has_id(identified: Optional[Identified]) -> None:
if not identified:
raise ValueError("Provided entity may not be None")
if not identified.id:
raise ValueError(
"Provided %s has not yet been submitted to YellowDog Scheduler" % identified.__class__.__name__
)
def add_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
return self.__service_proxy.add_work_requirement(work_requirement)
def update_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
self._check_has_id(work_requirement)
return self.__service_proxy.update_work_requirement(work_requirement)
def get_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
return self.get_work_requirement_by_id(work_requirement.id)
def get_work_requirement_by_id(self, work_requirement_id: str) -> WorkRequirement:
return self.__service_proxy.get_work_requirement_by_id(work_requirement_id)
def get_work_requirement_by_name(self, namespace: str, work_requirement_name: str) -> WorkRequirement:
return self.__service_proxy.get_work_requirement_by_name(namespace, work_requirement_name)
def hold_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
return self.hold_work_requirement_by_id(work_requirement.id)
def hold_work_requirement_by_id(self, work_requirement_id: str) -> WorkRequirement:
return self.__service_proxy.transition_work_requirement(work_requirement_id, WorkRequirementStatus.HELD)
def start_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
return self.start_work_requirement_by_id(work_requirement.id)
def start_work_requirement_by_id(self, work_requirement_id: str) -> WorkRequirement:
return self.__service_proxy.transition_work_requirement(work_requirement_id, WorkRequirementStatus.WORKING)
def cancel_work_requirement(self, work_requirement: WorkRequirement) -> WorkRequirement:
return self.cancel_work_requirement_by_id(work_requirement.id)
def cancel_work_requirement_by_id(self, work_requirement_id: str) -> WorkRequirement:
return self.__service_proxy.transition_work_requirement(work_requirement_id, WorkRequirementStatus.CANCELLING)
def find_all_work_requirements(self) -> List[WorkRequirementSummary]:
return self.__service_proxy.find_all_work_requirements()
def add_work_requirement_listener(self, work_requirement: WorkRequirement, listener: SubscriptionEventListener[WorkRequirement]) -> None:
self._check_has_id(work_requirement)
self.add_work_requirement_listener_by_id(work_requirement.id, listener)
def add_work_requirement_listener_by_id(self, work_requirement_id: str, listener: SubscriptionEventListener[WorkRequirement]) -> None:
self.__requirement_subscriptions.add_listener(work_requirement_id, listener)
def remove_work_requirement_listener(self, listener: SubscriptionEventListener[WorkRequirement]) -> None:
self.__requirement_subscriptions.remove_listener(listener)
def get_work_requirement_helper(self, work_requirement: WorkRequirement) -> WorkRequirementHelper:
return WorkRequirementHelper(work_requirement, self)
def get_work_requirement_helper_by_id(self, work_requirement_id: str) -> WorkRequirementHelper:
work_requirement = self.get_work_requirement_by_id(work_requirement_id)
return self.get_work_requirement_helper(work_requirement)
def add_tasks_to_task_group(self, task_group: TaskGroup, tasks: List[Task]) -> List[Task]:
self._check_has_id(task_group)
return self.add_tasks_to_task_group_by_id(task_group.id, tasks)
def add_tasks_to_task_group_by_id(self, task_group_id: str, tasks: List[Task]) -> List[Task]:
return self.__service_proxy.add_tasks_to_task_group(task_group_id, tasks)
def add_tasks_to_task_group_by_name(self, namespace: str, requirement_name: str, task_group_name: str, tasks: List[Task]) -> List[Task]:
return self.__service_proxy.add_tasks_to_task_group_by_name(namespace, requirement_name, task_group_name, tasks)
def get_task(self, task: Task) -> Task:
return self.get_task_by_id(task.id)
def get_task_by_id(self, task_id: str) -> Task:
return self.__service_proxy.get_task_by_id(task_id)
def cancel_task(self, task: Task) -> Task:
self._check_has_id(task)
return self.cancel_task_by_id(task.id)
def cancel_task_by_id(self, task_id: str) -> Task:
return self.__service_proxy.cancel_task(task_id)
def find_tasks(self, search: TaskSearch) -> List[Task]:
slice = self.find_tasks_slice(search, SliceReference())
items = slice.items
while slice.nextSliceId is not None:
slice = self.find_tasks_slice(search, SliceReference(slice.nextSliceId))
items += slice.items
return items
def find_tasks_slice(self, search: TaskSearch, slice_reference: SliceReference) -> Slice:
return self.__service_proxy.find_tasks_slice(search, slice_reference)
def close(self) -> None:
self.__requirement_subscriptions.close()
| 49.728682
| 141
| 0.782853
| 786
| 6,415
| 5.952926
| 0.113232
| 0.211584
| 0.061765
| 0.061124
| 0.640949
| 0.482582
| 0.444112
| 0.353494
| 0.297713
| 0.209446
| 0
| 0
| 0.148246
| 6,415
| 128
| 142
| 50.117188
| 0.856332
| 0
| 0
| 0.021277
| 0
| 0
| 0.014341
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.308511
| false
| 0
| 0.159574
| 0.191489
| 0.723404
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
9affdd999dbd8d84a4492267f0353bed5cb67b8c
| 2,084
|
py
|
Python
|
tests/conftest.py
|
weiss-d/baby-crawler
|
dc4a9b2f6a47c86daa74d4b8f688941e4f3ad997
|
[
"MIT"
] | null | null | null |
tests/conftest.py
|
weiss-d/baby-crawler
|
dc4a9b2f6a47c86daa74d4b8f688941e4f3ad997
|
[
"MIT"
] | 60
|
2020-10-20T06:00:31.000Z
|
2022-03-08T13:04:49.000Z
|
tests/conftest.py
|
weiss-d/baby-crawler
|
dc4a9b2f6a47c86daa74d4b8f688941e4f3ad997
|
[
"MIT"
] | null | null | null |
import pytest
@pytest.fixture
def checkup_html() -> str:
return {
"html": """<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Page Title</title>
</head>
<body>
<a href="https://google.com/">Root domain link</a>
<a href="https://google.com/1.html">Normal link 1</a>
<a href="https://google.com/2.html">Normal link 2</a>
<a href="https://google.com/2.html">Duplicate link 2</a>
<a href="https://google.com/3.html#test">Normal link 3 with anchor</a>
<a href="https://google.com/picture.png">Link to an image.</a>
<a href="https://mail.google.com/">Subdomain link</a>
<a href="/4.html">Relative link</a>
<a rel="nofollow" href="https://google.com/nofollow">Nofollow link</a>
<a href="https://yandex.ru">Foreign link</a>
<a href="mailto:admin@gmail.com">Email link</a>
<a href="#fragment">Fragment link</a>
<a href="ftp://google.com">Non HTTP(S) link</a>
<a href="">Link with empty href</a>
<a>Link without a URL</a>
<title>Incorrect Title</title>
<p>Some stuff.</p>
</body>
</html>
""",
"title_nonempty_links": (
"Test Page Title",
{
"#fragment",
"/4.html",
"ftp://google.com",
"https://google.com/",
"https://google.com/1.html",
"https://google.com/2.html",
"https://google.com/3.html#test",
"https://google.com/picture.png",
"https://mail.google.com/",
"https://yandex.ru",
"mailto:admin@gmail.com",
},
),
"filter_result_wo_subdomains": [
"https://google.com/1.html",
"https://google.com/2.html",
"https://google.com/3.html",
"https://google.com/4.html",
],
"filter_result_subdomains": [
"https://google.com/1.html",
"https://google.com/2.html",
"https://google.com/3.html",
"https://google.com/4.html",
"https://mail.google.com",
],
}
| 32.5625
| 72
| 0.52975
| 276
| 2,084
| 3.971014
| 0.257246
| 0.205292
| 0.255474
| 0.131387
| 0.421533
| 0.330292
| 0.281934
| 0.281934
| 0.208942
| 0.208942
| 0
| 0.014314
| 0.262476
| 2,084
| 63
| 73
| 33.079365
| 0.698764
| 0
| 0
| 0.196721
| 0
| 0.04918
| 0.720729
| 0.087812
| 0
| 0
| 0
| 0
| 0
| 1
| 0.016393
| true
| 0
| 0.016393
| 0.016393
| 0.04918
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b104220d669f7186645dee08bbcec30a63ccfa00
| 642
|
py
|
Python
|
episimmer/utils/time.py
|
healthbadge/episimmer
|
fcb3f7df812be045e2a6d031cac42080ad850d60
|
[
"BSD-3-Clause"
] | 16
|
2021-04-26T14:52:32.000Z
|
2022-01-22T07:13:06.000Z
|
episimmer/utils/time.py
|
healthbadge/episimmer
|
fcb3f7df812be045e2a6d031cac42080ad850d60
|
[
"BSD-3-Clause"
] | 34
|
2021-05-21T12:53:24.000Z
|
2022-02-09T16:30:40.000Z
|
episimmer/utils/time.py
|
healthbadge/episimmer
|
fcb3f7df812be045e2a6d031cac42080ad850d60
|
[
"BSD-3-Clause"
] | 4
|
2021-04-08T07:52:06.000Z
|
2021-05-29T05:58:15.000Z
|
class Time():
current_world = None
current_time_step = None
@staticmethod
def get_current_world():
return Time.current_world
@staticmethod
def get_current_time_step():
return Time.current_time_step
@staticmethod
def reset():
Time.current_world = None
Time.current_time_step = None
@staticmethod
def new_world():
if Time.current_world is None:
Time.current_world = 0
else:
Time.current_world += 1
Time.current_time_step = 0
@staticmethod
def increment_current_time_step():
Time.current_time_step += 1
| 21.4
| 38
| 0.632399
| 76
| 642
| 5.013158
| 0.236842
| 0.288714
| 0.275591
| 0.199475
| 0.178478
| 0.178478
| 0
| 0
| 0
| 0
| 0
| 0.008889
| 0.299065
| 642
| 29
| 39
| 22.137931
| 0.837778
| 0
| 0
| 0.217391
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.217391
| false
| 0
| 0
| 0.086957
| 0.434783
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b11c9614f1ff29cde72a25ba5e2352592460c021
| 1,231
|
py
|
Python
|
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/semaphore_win32.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/semaphore_win32.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/semaphore_win32.py
|
JE-Chen/je_old_repo
|
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
|
[
"MIT"
] | null | null | null |
'''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import ctypes
_EXTENSION_NAME = 'GL_EXT_semaphore_win32'
def _f( function ):
return _p.createFunction( function,_p.PLATFORM.GL,'GL_EXT_semaphore_win32',error_checker=_errors._error_checker)
GL_D3D12_FENCE_VALUE_EXT=_C('GL_D3D12_FENCE_VALUE_EXT',0x9595)
GL_DEVICE_LUID_EXT=_C('GL_DEVICE_LUID_EXT',0x9599)
GL_DEVICE_NODE_MASK_EXT=_C('GL_DEVICE_NODE_MASK_EXT',0x959A)
GL_HANDLE_TYPE_D3D12_FENCE_EXT=_C('GL_HANDLE_TYPE_D3D12_FENCE_EXT',0x9594)
GL_HANDLE_TYPE_OPAQUE_WIN32_EXT=_C('GL_HANDLE_TYPE_OPAQUE_WIN32_EXT',0x9587)
GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT=_C('GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT',0x9588)
GL_LUID_SIZE_EXT=_C('GL_LUID_SIZE_EXT',8)
@_f
@_p.types(None,_cs.GLuint,_cs.GLenum,ctypes.c_void_p)
def glImportSemaphoreWin32HandleEXT(semaphore,handleType,handle):pass
@_f
@_p.types(None,_cs.GLuint,_cs.GLenum,ctypes.c_void_p)
def glImportSemaphoreWin32NameEXT(semaphore,handleType,name):pass
| 45.592593
| 117
| 0.823721
| 201
| 1,231
| 4.542289
| 0.343284
| 0.030668
| 0.046002
| 0.078861
| 0.427163
| 0.269441
| 0.186199
| 0.092004
| 0.092004
| 0.092004
| 0
| 0.051373
| 0.082859
| 1,231
| 26
| 118
| 47.346154
| 0.757307
| 0.081235
| 0
| 0.181818
| 1
| 0
| 0.201275
| 0.17031
| 0
| 0
| 0.032787
| 0
| 0
| 1
| 0.136364
| false
| 0.090909
| 0.363636
| 0.045455
| 0.545455
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
b13b995b6e5902c8a00fff510da9698e83832900
| 85
|
py
|
Python
|
ana/setup.py
|
Ruide/angr-dev
|
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
|
[
"BSD-2-Clause"
] | null | null | null |
ana/setup.py
|
Ruide/angr-dev
|
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
|
[
"BSD-2-Clause"
] | null | null | null |
ana/setup.py
|
Ruide/angr-dev
|
964dc80c758e25c698c2cbcc454ef5954c5fa0a0
|
[
"BSD-2-Clause"
] | null | null | null |
from distutils.core import setup
setup(name='ana', version='0.04', packages=['ana'])
| 28.333333
| 51
| 0.717647
| 13
| 85
| 4.692308
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038462
| 0.082353
| 85
| 2
| 52
| 42.5
| 0.74359
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 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
|
b1530769a4e38b15342d22f098e1ae26eafe3eb0
| 1,289
|
py
|
Python
|
jaxopt/__init__.py
|
mblondel/jaxopt
|
b76db8d8015cddc4afb5e2e0e45d6918373e7652
|
[
"Apache-2.0"
] | null | null | null |
jaxopt/__init__.py
|
mblondel/jaxopt
|
b76db8d8015cddc4afb5e2e0e45d6918373e7652
|
[
"Apache-2.0"
] | null | null | null |
jaxopt/__init__.py
|
mblondel/jaxopt
|
b76db8d8015cddc4afb5e2e0e45d6918373e7652
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from jaxopt._src import base
from jaxopt._src import implicit_diff
from jaxopt._src import linear_solve
from jaxopt._src import loop
from jaxopt._src import loss
from jaxopt._src import objectives
from jaxopt._src import perturbations
from jaxopt._src import projection
from jaxopt._src import prox
from jaxopt._src import tree_util
from jaxopt._src.bisection import Bisection
from jaxopt._src.block_cd import BlockCoordinateDescent
from jaxopt._src.gradient_descent import GradientDescent
from jaxopt._src.mirror_descent import MirrorDescent
from jaxopt._src.optax_wrapper import OptaxSolver
from jaxopt._src.proximal_gradient import ProximalGradient
from jaxopt._src.quadratic_prog import QuadraticProgramming
| 39.060606
| 74
| 0.821567
| 191
| 1,289
| 5.408377
| 0.507853
| 0.164569
| 0.21394
| 0.18393
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007143
| 0.131109
| 1,289
| 32
| 75
| 40.28125
| 0.915179
| 0.425136
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
b19bc10432ef45e948295ed75f2696e891ef659f
| 115
|
py
|
Python
|
src/django_mysql/exceptions.py
|
harvardinformatics/django-mysql
|
c560cd9ccbc44828efea997624a7fb2548bda0b9
|
[
"BSD-3-Clause"
] | 502
|
2015-02-20T18:01:08.000Z
|
2022-03-28T08:50:55.000Z
|
src/django_mysql/exceptions.py
|
harvardinformatics/django-mysql
|
c560cd9ccbc44828efea997624a7fb2548bda0b9
|
[
"BSD-3-Clause"
] | 427
|
2015-03-05T13:00:28.000Z
|
2022-02-16T21:57:33.000Z
|
src/django_mysql/exceptions.py
|
harvardinformatics/django-mysql
|
c560cd9ccbc44828efea997624a7fb2548bda0b9
|
[
"BSD-3-Clause"
] | 137
|
2015-03-11T10:35:35.000Z
|
2022-02-24T15:12:07.000Z
|
class TimeoutError(Exception):
"""
Indicates a database operation timed out in some way.
"""
pass
| 16.428571
| 57
| 0.643478
| 13
| 115
| 5.692308
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269565
| 115
| 6
| 58
| 19.166667
| 0.880952
| 0.46087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
b1ab28322abeb49b63fbcdb1566e31115e0ad577
| 6,631
|
py
|
Python
|
src/nlp/classification/tf1/traditional_cls/dataiter.py
|
wu-uw/OpenCompetition
|
9aa9d7a50ada1deb653d295dd8a7fe46321b9094
|
[
"Apache-2.0"
] | 15
|
2019-12-22T14:26:47.000Z
|
2020-11-02T10:57:37.000Z
|
src/nlp/classification/tf1/traditional_cls/dataiter.py
|
GT-JLU/OpenCompetition
|
5262fc5fa7efd7b483c1dc09cb7747dd75e37175
|
[
"Apache-2.0"
] | 2
|
2020-02-03T07:10:11.000Z
|
2020-02-11T16:38:56.000Z
|
src/nlp/classification/tf1/traditional_cls/dataiter.py
|
GT-JLU/OpenCompetition
|
5262fc5fa7efd7b483c1dc09cb7747dd75e37175
|
[
"Apache-2.0"
] | 12
|
2020-01-06T14:16:52.000Z
|
2020-05-23T14:12:30.000Z
|
# !/user/bin/python
# -*- coding:utf-8 -*-
"""
date: 2019-03-17
Description : 数据处理的dataset
"""
# import modules
import os, sys
curr_path = os.path.dirname(__file__)
sys.path.append(curr_path)
from torch.utils import data
import torch
__all__ = ["DataIter", "BertDataset"]
# define class
class BertDataset(object):
def __init__(self, data_dict):
"""
:param data_dict:
"""
super().__init__()
self.data_dict = data_dict
def __getitem__(self, index):
"""
:param index:
:return:
"""
try:
return {k: v[index] for k, v in self.data_dict.items()}
except:
print(index)
raise 0
def __len__(self):
"""
获取数据的长度
:return:
"""
return len(list(self.data_dict.values())[0])
class DataIter(object):
def __init__(self, batch_size, max_seq_length, num_works=4):
""""""
super().__init__()
self.batch_size = batch_size
self.max_seq_length = max_seq_length
self.num_works = num_works
def get_iter_for_bert(self, data_dict, shuffle, drop_last):
dataset = BertDataset(data_dict)
return data.DataLoader(dataset=dataset,
batch_size=self.batch_size,
shuffle=shuffle,
num_workers=self.num_works,
collate_fn=self.batch_dict_to_padded_dict_batch,
drop_last=drop_last)
def get_double_sentence_iter_for_bert(self, data_dict, shuffle, drop_last):
dataset = BertDataset(data_dict)
return data.DataLoader(dataset=dataset,
batch_size=self.batch_size,
shuffle=shuffle,
num_workers=self.num_works,
collate_fn=self.batch_dict_to_padded_dict_batch_double_sentence,
drop_last=drop_last)
def batch_dict_to_padded_dict_batch(self, batch_dict):
"""
[{}, {}, {}] --> {k1: [], k2: [], ....}
:param batch_dict:
:return:
"""
# 创建 batch_dict
keys = batch_dict[0].keys()
dict_batch = dict.fromkeys(keys)
for k in keys:
dict_batch[k] = list()
# 将传入的 batch [{}, {}, {}] 存储到 batch_dict 中 {k1: [], k2: [], ....}
for bat in batch_dict:
for k, v in bat.items():
dict_batch[k].append(v)
try:
# for k, v in dict_batch.items():
# a = self.padding_batch_list(v, self.max_seq_length)
# padded_dict_batch[k] = torch.LongTensor(a)
padded_dict_batch = dict()
for k, v in dict_batch.items():
if k not in ["features_list", "raw_x", "raw_y"]:
padded_dict_batch[k] = torch.LongTensor(self.padding_batch_list(v, self.max_seq_length))
else:
padded_dict_batch[k] = v
# padded_dict_batch = {k: torch.LongTensor(self.padding_batch_list(v, self.max_seq_length))
# for k, v in dict_batch.items()}
return padded_dict_batch
except:
return None
def batch_dict_to_padded_dict_batch_double_sentence(self, batch_dict):
"""
[{}, {}, {}] --> {k1: [], k2: [], ....}
:param batch_dict:
:return:
"""
# 创建 batch_dict
keys = batch_dict[0].keys()
dict_batch = dict.fromkeys(keys)
for k in keys:
dict_batch[k] = list()
# 将传入的 batch [{}, {}, {}] 存储到 batch_dict 中 {k1: [], k2: [], ....}
for bat in batch_dict:
for k, v in bat.items():
dict_batch[k].append(v)
try:
# for k, v in dict_batch.items():
# a = self.padding_batch_list(v, self.max_seq_length)
# padded_dict_batch[k] = torch.LongTensor(a)
# padded_dict_batch = {k: torch.LongTensor(self.padding_batch_list(v, self.max_seq_length))
# for k, v in dict_batch.items()}
padded_dict_batch = dict()
for k, v in dict_batch.items():
padded_dict_batch[k] = torch.LongTensor(self.padding_batch_list(v, self.max_seq_length))
return padded_dict_batch
except:
return None
def padding_batch_list(self, batch_list, max_sentence_length, pad_value=0):
"""
对输入的 [[list1], [list2], ....] 进行padding操作
注意:
该函数只会对 [[]] 形式的代码进行 padding,如不符合格式则返回原数据
:param batch_list:
:param max_sentence_length:
:param pad_value:
:return:
"""
try:
paded_batch_list = [b_l + [pad_value] * (max_sentence_length - len(b_l)) for b_l in batch_list]
return paded_batch_list
except:
return batch_list
class CCFDataIter(object):
def __init__(self, batch_size, max_seq_length, num_works=4):
""""""
super().__init__()
self.batch_size = batch_size
self.max_seq_length = max_seq_length
self.num_works = num_works
def get_iter_for_bert(self, data_dict, shuffle, drop_last):
dataset = BertDataset(data_dict)
return data.DataLoader(dataset=dataset,
batch_size=self.batch_size,
shuffle=shuffle,
num_workers=self.num_works,
collate_fn=self.batch_dict_to_padded_dict_batch,
drop_last=drop_last)
def batch_dict_to_padded_dict_batch(self, batch_dict):
"""
[{}, {}, {}] --> {k1: [], k2: [], ....}
:param batch_dict:
:return:
"""
# 创建 batch_dict
keys = batch_dict[0].keys()
dict_batch = dict.fromkeys(keys)
for k in keys:
dict_batch[k] = list()
# 将传入的 batch [{}, {}, {}] 存储到 batch_dict 中 {k1: [], k2: [], ....}
for bat in batch_dict:
for k, v in bat.items():
dict_batch[k].append(v)
return dict_batch
# main
if __name__ == "__main__":
data_dict = {"sentence": [[1, 2], [2, 3], [1, 2], [2, 3]],
"label": [1, 2, 1, 2],
"token_type_ids": [[0, 0], [0, 0], [0, 0], [0, 0]],
"mask": [[1, 1], [1, 1], [1, 1], [1, 1]]}
dataiter = DataIter(4, 7).get_iter_for_bert(data_dict, True)
for i in dataiter:
print(i)
| 32.99005
| 108
| 0.5233
| 783
| 6,631
| 4.090677
| 0.158365
| 0.092726
| 0.079613
| 0.021855
| 0.705589
| 0.705589
| 0.705589
| 0.700593
| 0.658757
| 0.658757
| 0
| 0.014262
| 0.354999
| 6,631
| 200
| 109
| 33.155
| 0.734627
| 0.202534
| 0
| 0.672727
| 0
| 0
| 0.016281
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.109091
| false
| 0
| 0.027273
| 0
| 0.272727
| 0.018182
| 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
|
4927955b29758b4e110ac78c939347b5db01a639
| 3,607
|
py
|
Python
|
ooobuild/cssdyn/drawing/framework/__init__.py
|
Amourspirit/ooo_uno_tmpl
|
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
|
[
"Apache-2.0"
] | null | null | null |
ooobuild/cssdyn/drawing/framework/__init__.py
|
Amourspirit/ooo_uno_tmpl
|
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
|
[
"Apache-2.0"
] | null | null | null |
ooobuild/cssdyn/drawing/framework/__init__.py
|
Amourspirit/ooo_uno_tmpl
|
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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.
#
from ....dyn.drawing.framework.anchor_binding_mode import AnchorBindingMode as AnchorBindingMode
from ....dyn.drawing.framework.basic_pane_factory import BasicPaneFactory as BasicPaneFactory
from ....dyn.drawing.framework.basic_tool_bar_factory import BasicToolBarFactory as BasicToolBarFactory
from ....dyn.drawing.framework.basic_view_factory import BasicViewFactory as BasicViewFactory
from ....dyn.drawing.framework.border_type import BorderType as BorderType
from ....dyn.drawing.framework.configuration import Configuration as Configuration
from ....dyn.drawing.framework.configuration_change_event import ConfigurationChangeEvent as ConfigurationChangeEvent
from ....dyn.drawing.framework.configuration_controller import ConfigurationController as ConfigurationController
from ....dyn.drawing.framework.module_controller import ModuleController as ModuleController
from ....dyn.drawing.framework.resource_activation_mode import ResourceActivationMode as ResourceActivationMode
from ....dyn.drawing.framework.resource_id import ResourceId as ResourceId
from ....dyn.drawing.framework.tab_bar_button import TabBarButton as TabBarButton
from ....dyn.drawing.framework.x_configuration import XConfiguration as XConfiguration
from ....dyn.drawing.framework.x_configuration_change_listener import XConfigurationChangeListener as XConfigurationChangeListener
from ....dyn.drawing.framework.x_configuration_change_request import XConfigurationChangeRequest as XConfigurationChangeRequest
from ....dyn.drawing.framework.x_configuration_controller import XConfigurationController as XConfigurationController
from ....dyn.drawing.framework.x_configuration_controller_broadcaster import XConfigurationControllerBroadcaster as XConfigurationControllerBroadcaster
from ....dyn.drawing.framework.x_configuration_controller_request_queue import XConfigurationControllerRequestQueue as XConfigurationControllerRequestQueue
from ....dyn.drawing.framework.x_controller_manager import XControllerManager as XControllerManager
from ....dyn.drawing.framework.x_module_controller import XModuleController as XModuleController
from ....dyn.drawing.framework.x_pane import XPane as XPane
from ....dyn.drawing.framework.x_pane2 import XPane2 as XPane2
from ....dyn.drawing.framework.x_pane_border_painter import XPaneBorderPainter as XPaneBorderPainter
from ....dyn.drawing.framework.x_relocatable_resource import XRelocatableResource as XRelocatableResource
from ....dyn.drawing.framework.x_resource import XResource as XResource
from ....dyn.drawing.framework.x_resource_factory import XResourceFactory as XResourceFactory
from ....dyn.drawing.framework.x_resource_factory_manager import XResourceFactoryManager as XResourceFactoryManager
from ....dyn.drawing.framework.x_resource_id import XResourceId as XResourceId
from ....dyn.drawing.framework.x_tab_bar import XTabBar as XTabBar
from ....dyn.drawing.framework.x_tool_bar import XToolBar as XToolBar
from ....dyn.drawing.framework.x_view import XView as XView
| 75.145833
| 155
| 0.84641
| 433
| 3,607
| 6.91455
| 0.307159
| 0.072478
| 0.144957
| 0.238143
| 0.295257
| 0.154309
| 0.10187
| 0
| 0
| 0
| 0
| 0.00362
| 0.080954
| 3,607
| 47
| 156
| 76.744681
| 0.899548
| 0.159689
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
493222ee4004cd454e2a219e0b790d22aa660e75
| 211
|
py
|
Python
|
tv_extract/data/__init__.py
|
rappdw/tv-extract
|
690e80324ad5afa904380cb07f5accd9b1479991
|
[
"MIT"
] | null | null | null |
tv_extract/data/__init__.py
|
rappdw/tv-extract
|
690e80324ad5afa904380cb07f5accd9b1479991
|
[
"MIT"
] | 3
|
2018-07-28T16:39:31.000Z
|
2018-08-07T22:35:43.000Z
|
tv_extract/data/__init__.py
|
rappdw/tv-extract
|
690e80324ad5afa904380cb07f5accd9b1479991
|
[
"MIT"
] | null | null | null |
from .config import Config
from .extract import Extract
from .revision import Revision
from .pr import PullRequest
from .file_info import FileInfo
from .repo import Repo
from .revision_graph import RevisionGraph
| 30.142857
| 41
| 0.838863
| 30
| 211
| 5.833333
| 0.433333
| 0.137143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127962
| 211
| 7
| 41
| 30.142857
| 0.951087
| 0
| 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
|
496a556e5751a4ed4659040a0cbb8778b147230a
| 561
|
py
|
Python
|
specHdl/rawdata/InterfacePI.py
|
huhub/prototypeTester
|
3ebb1af5afef26c678fad8d36f945ca2fd804b7d
|
[
"Apache-2.0"
] | null | null | null |
specHdl/rawdata/InterfacePI.py
|
huhub/prototypeTester
|
3ebb1af5afef26c678fad8d36f945ca2fd804b7d
|
[
"Apache-2.0"
] | null | null | null |
specHdl/rawdata/InterfacePI.py
|
huhub/prototypeTester
|
3ebb1af5afef26c678fad8d36f945ca2fd804b7d
|
[
"Apache-2.0"
] | null | null | null |
Interface = ['defaultVlanId', 'l2AclLabel', 'linkAggId', 'defaultPcp', 'qosPolicy', 'aft', 'isLinkAggMbr', 'ingressFilteringEn', 'portPoliceEn', 'l2SrcMatchDiscard', 'bpduDrop', 'stpDisable', 'forcePortBasedVlan', 'l2AclEn', 'l2AclHiPrio', 'ipv4ForceMacKey', 'ipv6ForceMacKey', 'replaceDscp', 'replaceCos', 'vlanPrioEn', 'macBasedVlanHiPrio', 'keepVlanTag', 'ingressL2SpanEn', 'aftDiscard', 'removeVlanTag', 'cos', 'dscp', 'routingEn', 'mcVlanDrop', 'tsnEn', 'l3AclEn', 'l3AclLabel', 'l3SpanEn', 'stpId', 'fid', 'fromRemoteSpan', 'isBpdu', 'stpState', 'stpIdx']
| 561
| 561
| 0.716578
| 40
| 561
| 10.05
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019194
| 0.071301
| 561
| 1
| 561
| 561
| 0.752399
| 0
| 0
| 0
| 0
| 0
| 0.699288
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
497e50c5bb2e87707ba477967f13b3ecd18789d1
| 35
|
py
|
Python
|
chapter04/counting_to_twenty.py
|
rafalmaziejuk/PythonCrashCourseSolutions
|
733a393c8ee0eeb4212ee7c1cd629c62eacb7cc4
|
[
"MIT"
] | null | null | null |
chapter04/counting_to_twenty.py
|
rafalmaziejuk/PythonCrashCourseSolutions
|
733a393c8ee0eeb4212ee7c1cd629c62eacb7cc4
|
[
"MIT"
] | null | null | null |
chapter04/counting_to_twenty.py
|
rafalmaziejuk/PythonCrashCourseSolutions
|
733a393c8ee0eeb4212ee7c1cd629c62eacb7cc4
|
[
"MIT"
] | null | null | null |
for i in range(1, 21):
print(i)
| 17.5
| 22
| 0.571429
| 8
| 35
| 2.5
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.115385
| 0.257143
| 35
| 2
| 23
| 17.5
| 0.653846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 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
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
498cc4d2973e0d83c629fa45b20085892a4d3b38
| 257
|
py
|
Python
|
exercicio29.py
|
LuizHps18/infosatc-lp-avaliativo-01
|
0b891d74a98705182175a53e023b6cbbe8cc880a
|
[
"MIT"
] | null | null | null |
exercicio29.py
|
LuizHps18/infosatc-lp-avaliativo-01
|
0b891d74a98705182175a53e023b6cbbe8cc880a
|
[
"MIT"
] | null | null | null |
exercicio29.py
|
LuizHps18/infosatc-lp-avaliativo-01
|
0b891d74a98705182175a53e023b6cbbe8cc880a
|
[
"MIT"
] | null | null | null |
n1 = float(input("Digite sua primeira nota: "))
n2 = float(input("Digite sua segunda nota: "))
n3 = float(input("Digite sua terceira nota: "))
n4 = float(input("Digite sua quarta nota: "))
media = (n1 + n2 + n3 + n4) / 4
print("Sua média é de: ",media)
| 32.125
| 47
| 0.638132
| 40
| 257
| 4.1
| 0.475
| 0.243902
| 0.390244
| 0.463415
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.043062
| 0.18677
| 257
| 8
| 48
| 32.125
| 0.741627
| 0
| 0
| 0
| 0
| 0
| 0.465116
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| null | 1
| 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
|
4997e2f1691cb514e9812e61655088ef5054505f
| 682
|
py
|
Python
|
bynge/lib/processor/audio.py
|
gutmensch/bynge
|
738b518e2615e0f2d4e668f86c0c7cdebaf8d084
|
[
"BSD-2-Clause"
] | null | null | null |
bynge/lib/processor/audio.py
|
gutmensch/bynge
|
738b518e2615e0f2d4e668f86c0c7cdebaf8d084
|
[
"BSD-2-Clause"
] | null | null | null |
bynge/lib/processor/audio.py
|
gutmensch/bynge
|
738b518e2615e0f2d4e668f86c0c7cdebaf8d084
|
[
"BSD-2-Clause"
] | null | null | null |
import time
from bynge import app
class AudioFileProcessor:
def __init__(self, uuid):
self.uuid = uuid
app.logger.info('processing task started')
def process(self):
app.logger.info(self.uuid)
time.sleep(10)
def store(self):
print(self.uuid)
def normalize(self):
print(self.uuid)
def recode(self):
print(self.uuid)
def read_tag(self):
print(self.uuid)
def write_tag(self):
print(self.uuid)
def get_data_hash(self):
print(self.uuid)
def is_duplicate(self):
print(self.uuid)
def __del__(self):
app.logger.info('processing task finished')
| 18.432432
| 51
| 0.605572
| 88
| 682
| 4.545455
| 0.375
| 0.2
| 0.2275
| 0.2975
| 0.5
| 0.115
| 0
| 0
| 0
| 0
| 0
| 0.004098
| 0.284457
| 682
| 37
| 51
| 18.432432
| 0.815574
| 0
| 0
| 0.28
| 0
| 0
| 0.068814
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0
| 0.08
| 0
| 0.52
| 0.28
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
499d150e4627885731baaf06644ed9c59d161670
| 410
|
py
|
Python
|
lambda/list_exceptions.py
|
pb30/LambdaMLM
|
587db496304aaa71e742268bd6bce637c2cec62d
|
[
"MIT"
] | 2
|
2016-08-29T16:21:41.000Z
|
2017-09-15T21:22:54.000Z
|
lambda/list_exceptions.py
|
pb30/LambdaMLM
|
587db496304aaa71e742268bd6bce637c2cec62d
|
[
"MIT"
] | 32
|
2016-02-06T21:27:14.000Z
|
2017-09-15T21:25:52.000Z
|
lambda/list_exceptions.py
|
pb30/LambdaMLM
|
587db496304aaa71e742268bd6bce637c2cec62d
|
[
"MIT"
] | 1
|
2017-09-15T21:30:57.000Z
|
2017-09-15T21:30:57.000Z
|
class UnknownList(Exception):
pass
class InsufficientPermissions(Exception):
pass
class AlreadySubscribed(Exception):
pass
class NotSubscribed(Exception):
pass
class ClosedSubscription(Exception):
pass
class ClosedUnsubscription(Exception):
pass
class UnknownFlag(Exception):
pass
class UnknownOption(Exception):
pass
class ModeratedMessageNotFound(Exception):
pass
| 15.185185
| 42
| 0.760976
| 36
| 410
| 8.666667
| 0.333333
| 0.375
| 0.461538
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173171
| 410
| 26
| 43
| 15.769231
| 0.920354
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
7701f5ff5ff1abcb52c39bd3c240c1eb8bb68579
| 95
|
py
|
Python
|
backend/solo_rog_api/tasks.py
|
Jaryt/solo
|
fd3b7e32942308509da0af1dc768fbf5059c554b
|
[
"MIT"
] | null | null | null |
backend/solo_rog_api/tasks.py
|
Jaryt/solo
|
fd3b7e32942308509da0af1dc768fbf5059c554b
|
[
"MIT"
] | null | null | null |
backend/solo_rog_api/tasks.py
|
Jaryt/solo
|
fd3b7e32942308509da0af1dc768fbf5059c554b
|
[
"MIT"
] | null | null | null |
from celery import shared_task
@shared_task
def debug_task(msg: str) -> None:
print(msg)
| 13.571429
| 33
| 0.726316
| 15
| 95
| 4.4
| 0.733333
| 0.30303
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178947
| 95
| 6
| 34
| 15.833333
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0
| 0.5
| 0.25
| 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
|
770bc6fe05ddc9de1ef136d045dd3a16bc6a4c17
| 246
|
py
|
Python
|
UnityEngine/JointAngleLimits2D/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
UnityEngine/JointAngleLimits2D/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
UnityEngine/JointAngleLimits2D/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
from UdonPie import UnityEngine
from UdonPie.Undefined import *
class JointAngleLimits2D:
def __new__(cls, arg1=None):
'''
:returns: JointAngleLimits2D
:rtype: UnityEngine.JointAngleLimits2D
'''
pass
| 20.5
| 46
| 0.654472
| 21
| 246
| 7.47619
| 0.714286
| 0.140127
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022222
| 0.268293
| 246
| 11
| 47
| 22.363636
| 0.85
| 0.272358
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.4
| 0
| 0.8
| 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
| 1
| 0
| 1
| 0
|
0
| 4
|
77165c11c2b4fe8f0692e327cf37e266d0811b7d
| 211
|
py
|
Python
|
tests/apps/app1/overrides/package.py
|
coboyoshi/uvicore
|
9cfdeeac83000b156fe48f068b4658edaf51c8de
|
[
"MIT"
] | 11
|
2021-03-22T22:07:49.000Z
|
2022-03-08T16:18:33.000Z
|
tests/apps/app1/overrides/package.py
|
coboyoshi/uvicore
|
9cfdeeac83000b156fe48f068b4658edaf51c8de
|
[
"MIT"
] | 12
|
2021-03-04T05:51:24.000Z
|
2021-09-22T05:16:18.000Z
|
tests/apps/app1/overrides/package.py
|
coboyoshi/uvicore
|
9cfdeeac83000b156fe48f068b4658edaf51c8de
|
[
"MIT"
] | 2
|
2021-03-25T14:49:56.000Z
|
2021-11-17T23:20:29.000Z
|
from __future__ import annotations
import uvicore
from uvicore.typing import Dict
# Pull original from Ioc
Base = uvicore.ioc.make('uvicore.package.package.Package_BASE')
class Package(Base):
custom1: str
| 21.1
| 63
| 0.791469
| 29
| 211
| 5.586207
| 0.551724
| 0.17284
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005464
| 0.132701
| 211
| 9
| 64
| 23.444444
| 0.879781
| 0.104265
| 0
| 0
| 0
| 0
| 0.192513
| 0.192513
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.833333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
773ad2458f71db73bc5d57db2561c65f85009219
| 556
|
py
|
Python
|
vision_genprog/utilities.py
|
sebastiengilbert73/tutorial_visiongp_classification
|
376202ab65f5c0d51f68e1defad7fbf448bb8558
|
[
"MIT"
] | 2
|
2021-07-14T20:03:18.000Z
|
2021-12-18T23:24:16.000Z
|
vision_genprog/utilities.py
|
sebastiengilbert73/tutorial_visiongp_classification
|
376202ab65f5c0d51f68e1defad7fbf448bb8558
|
[
"MIT"
] | null | null | null |
vision_genprog/utilities.py
|
sebastiengilbert73/tutorial_visiongp_classification
|
376202ab65f5c0d51f68e1defad7fbf448bb8558
|
[
"MIT"
] | null | null | null |
import base64
import numpy as np
def ArrayToString(array):
# Cf. https://stackoverflow.com/questions/30167538/convert-a-numpy-ndarray-to-stringor-bytes-and-convert-it-back-to-numpy-ndarray
return base64.binascii.b2a_base64(array.astype(float)).decode("ascii")
def StringTo1DArray(string_repr):
# Cf. https://stackoverflow.com/questions/30167538/convert-a-numpy-ndarray-to-stringor-bytes-and-convert-it-back-to-numpy-ndarray
return np.frombuffer(base64.binascii.a2b_base64(string_repr.encode("ascii"))).copy() # To have a writable array
| 46.333333
| 133
| 0.776978
| 80
| 556
| 5.35
| 0.4875
| 0.11215
| 0.093458
| 0.107477
| 0.518692
| 0.518692
| 0.518692
| 0.518692
| 0.518692
| 0.518692
| 0
| 0.056863
| 0.082734
| 556
| 11
| 134
| 50.545455
| 0.782353
| 0.503597
| 0
| 0
| 0
| 0
| 0.036765
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
773d1b8f8abc4b73a59eb06409d13a1a6d009d67
| 175
|
py
|
Python
|
main.py
|
mgroth0/mlib
|
0442ed51eab417b6972f885605afd351892a3a9a
|
[
"MIT"
] | 1
|
2020-06-16T17:26:45.000Z
|
2020-06-16T17:26:45.000Z
|
main.py
|
mgroth0/mlib
|
0442ed51eab417b6972f885605afd351892a3a9a
|
[
"MIT"
] | null | null | null |
main.py
|
mgroth0/mlib
|
0442ed51eab417b6972f885605afd351892a3a9a
|
[
"MIT"
] | null | null | null |
from mlib.proj.struct import Project
class MLIB(Project):
mbuild = True
def run(self, cfg):
pass
credits = ''
instructions = ''
configuration = ''
| 19.444444
| 36
| 0.605714
| 19
| 175
| 5.578947
| 0.894737
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.285714
| 175
| 8
| 37
| 21.875
| 0.848
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0.125
| 0.125
| 0
| 0.875
| 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
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
773fa3e217cf36b5f23f4fb408da14f1549f9a92
| 799
|
py
|
Python
|
imix/data/infocomp/__init__.py
|
inspur-hsslab/iMIX
|
99898de97ef8b45462ca1d6bf2542e423a73d769
|
[
"Apache-2.0"
] | 23
|
2021-06-26T08:45:19.000Z
|
2022-03-02T02:13:33.000Z
|
imix/data/infocomp/__init__.py
|
XChuanLee/iMIX
|
99898de97ef8b45462ca1d6bf2542e423a73d769
|
[
"Apache-2.0"
] | null | null | null |
imix/data/infocomp/__init__.py
|
XChuanLee/iMIX
|
99898de97ef8b45462ca1d6bf2542e423a73d769
|
[
"Apache-2.0"
] | 9
|
2021-06-10T02:36:20.000Z
|
2021-11-09T02:18:16.000Z
|
from .vqa_infocpler import VQAInfoCpler
from .gqa_infocpler import GQAInfoCpler
from .vizwiz_infocpler import VizWizInfoCpler
from .clevr_infocpler import ClevrInfoCpler
from .textvqa_infocpler import TextVQAInfoCpler
from .vcr_infocpler import VCRInfoCpler
from .refcoco_infocpler import RefCOCOInfoCpler
from .stvqa_infocpler import STVQAInfoCpler
from .ocrvqa_infocpler import OCRVQAInfoCpler
from .referit_infocpler import ReferitInfoCpler
from .refcocop_infocpler import RefCOCOpInfoCpler
from .refcocog_infocpler import RefCOCOgInfoCpler
from .refclef_infocpler import RefClefInfoCpler
from .hatefulememes_infocpler import HatefulMemesInfoCpler
from .visualentailment_infocpler import VisualEntailmentInfoCpler
from .lxmertpretrain_infocpler import LXMERTPreTrainInfoCpler
from .m4c import *
| 42.052632
| 65
| 0.891114
| 83
| 799
| 8.385542
| 0.433735
| 0.344828
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00137
| 0.086358
| 799
| 18
| 66
| 44.388889
| 0.952055
| 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
|
774bc4149713a2b3b9dd5d9118e4aaa35a077cac
| 100
|
py
|
Python
|
python/testData/paramInfo/NoArgsException.py
|
myvyang/intellij-community
|
8b5734173a6c2ae0e3c8627e884d8476692a6576
|
[
"Apache-2.0"
] | null | null | null |
python/testData/paramInfo/NoArgsException.py
|
myvyang/intellij-community
|
8b5734173a6c2ae0e3c8627e884d8476692a6576
|
[
"Apache-2.0"
] | 11
|
2017-02-27T22:35:32.000Z
|
2021-12-24T08:07:40.000Z
|
plugin/src/test/resources/paramInfo/NoArgsException.py
|
consulo/consulo-python
|
586c3eaee3f9c2cc87fb088dc81fb12ffa4b3a9d
|
[
"Apache-2.0"
] | 1
|
2020-11-27T10:36:50.000Z
|
2020-11-27T10:36:50.000Z
|
def function(param, param1):
pass
def result():
pass
function(result<arg1>(), result())
| 10
| 34
| 0.63
| 12
| 100
| 5.25
| 0.583333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.025316
| 0.21
| 100
| 9
| 35
| 11.111111
| 0.772152
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.4
| 0
| 0
| 0.4
| 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
|
775520541a838b68d267920925c09d189d2f986e
| 161
|
py
|
Python
|
buienradar/__init__.py
|
Shiqan/buienradar-api
|
5abdb0da6634bc45bd52f732640bfed1f0b21f20
|
[
"MIT"
] | null | null | null |
buienradar/__init__.py
|
Shiqan/buienradar-api
|
5abdb0da6634bc45bd52f732640bfed1f0b21f20
|
[
"MIT"
] | null | null | null |
buienradar/__init__.py
|
Shiqan/buienradar-api
|
5abdb0da6634bc45bd52f732640bfed1f0b21f20
|
[
"MIT"
] | null | null | null |
"""
buienradar-api
Simple wrapper for the buienradar API.
"""
__version__ = '0.0.1'
from .models import *
from .api import BuienradarApi, AsyncBuienradarApi
| 13.416667
| 50
| 0.73913
| 20
| 161
| 5.75
| 0.7
| 0.226087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.022059
| 0.15528
| 161
| 12
| 50
| 13.416667
| 0.823529
| 0.335404
| 0
| 0
| 0
| 0
| 0.05
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
91fad65d8d1fc90bbc35705548670963173f1841
| 155
|
py
|
Python
|
tests/test_progress.py
|
felidsche/trace-generator
|
e7042086e9dbfbf8fdd85a5888996448581f343e
|
[
"MIT"
] | 9
|
2020-02-21T03:35:40.000Z
|
2021-12-08T12:58:29.000Z
|
tests/test_progress.py
|
felidsche/trace-generator
|
e7042086e9dbfbf8fdd85a5888996448581f343e
|
[
"MIT"
] | 4
|
2020-01-10T08:28:48.000Z
|
2022-03-01T14:24:31.000Z
|
tests/test_progress.py
|
felidsche/trace-generator
|
e7042086e9dbfbf8fdd85a5888996448581f343e
|
[
"MIT"
] | 6
|
2019-10-28T05:25:03.000Z
|
2021-12-08T13:02:37.000Z
|
# coding: utf-8
from context import spar
from spar import progress
def test_bar():
print('\n')
for _ in progress.bar(range(10000)):
pass
| 15.5
| 40
| 0.651613
| 23
| 155
| 4.304348
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050847
| 0.23871
| 155
| 9
| 41
| 17.222222
| 0.788136
| 0.083871
| 0
| 0
| 0
| 0
| 0.014286
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.166667
| 0.333333
| 0
| 0.5
| 0.166667
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
6203fde6248b015727ef862609eb44d2f26316e4
| 169
|
py
|
Python
|
sample/add_guest_credential.py
|
austingarrigus/rubrik-sdk-for-python
|
4a9c7f2239282681af951d918d8e9530c65ec1dd
|
[
"MIT"
] | 4
|
2018-09-06T23:34:32.000Z
|
2018-10-08T15:04:22.000Z
|
sample/add_guest_credential.py
|
austingarrigus/rubrik-sdk-for-python
|
4a9c7f2239282681af951d918d8e9530c65ec1dd
|
[
"MIT"
] | 1
|
2018-09-05T22:20:12.000Z
|
2018-09-06T04:57:23.000Z
|
sample/add_guest_credential.py
|
austingarrigus/rubrik-sdk-for-python
|
4a9c7f2239282681af951d918d8e9530c65ec1dd
|
[
"MIT"
] | 3
|
2018-10-01T14:49:47.000Z
|
2018-10-03T15:41:12.000Z
|
import rubrik_cdm
rubrik = rubrik_cdm.Connect()
username = "pythonuser"
password = "python123!"
add_guest_credential = rubrik.add_guest_credential(username, password)
| 21.125
| 70
| 0.804734
| 20
| 169
| 6.5
| 0.55
| 0.138462
| 0.276923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.019737
| 0.100592
| 169
| 8
| 70
| 21.125
| 0.835526
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.4
| 0.2
| 0
| 0.2
| 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
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
621c89b79eb10b266ac0fed84d1046d990221fb5
| 132
|
py
|
Python
|
HW8/EX2/fairpy/cake/improve_ef4_algo/__init__.py
|
ShmuelLa/research-algorithms
|
43cab0e9c13ce9ddb9646f7539f1a865e86f9841
|
[
"MIT"
] | null | null | null |
HW8/EX2/fairpy/cake/improve_ef4_algo/__init__.py
|
ShmuelLa/research-algorithms
|
43cab0e9c13ce9ddb9646f7539f1a865e86f9841
|
[
"MIT"
] | null | null | null |
HW8/EX2/fairpy/cake/improve_ef4_algo/__init__.py
|
ShmuelLa/research-algorithms
|
43cab0e9c13ce9ddb9646f7539f1a865e86f9841
|
[
"MIT"
] | null | null | null |
# From https://stackoverflow.com/a/49375740/827927
# import os, sys
# sys.path.append(os.path.dirname(os.path.realpath(__file__)))
| 33
| 62
| 0.75
| 20
| 132
| 4.75
| 0.75
| 0.126316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114754
| 0.075758
| 132
| 3
| 63
| 44
| 0.663934
| 0.94697
| 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
|
6267fe88c1df90a43e3201c9d27b2b65e9610271
| 509
|
py
|
Python
|
installer/configurators/sonarqube_container.py
|
SauarvD/jazz-installer
|
ec1df0a1a67c3f76a721ecc441b9961c02b5c2c1
|
[
"Apache-2.0"
] | 27
|
2017-10-13T18:30:55.000Z
|
2020-11-23T22:30:34.000Z
|
installer/configurators/sonarqube_container.py
|
SauarvD/jazz-installer
|
ec1df0a1a67c3f76a721ecc441b9961c02b5c2c1
|
[
"Apache-2.0"
] | 176
|
2017-12-05T20:54:18.000Z
|
2021-06-01T23:43:30.000Z
|
installer/configurators/sonarqube_container.py
|
SauarvD/jazz-installer
|
ec1df0a1a67c3f76a721ecc441b9961c02b5c2c1
|
[
"Apache-2.0"
] | 74
|
2017-10-13T18:47:41.000Z
|
2022-01-05T09:44:19.000Z
|
from .common import get_tfvars_file, replace_tfvars, passwd_generator
def configure_sonarqube_container():
"""
Configure a containerized Sonar server.
"""
replace_tfvars("dockerizedSonarqube", "true", get_tfvars_file(), False)
replace_tfvars('sonar_username', "admin", get_tfvars_file())
replace_tfvars('sonar_passwd', passwd_generator(), get_tfvars_file())
replace_tfvars('codequality_type', 'sonarqube', get_tfvars_file())
replace_tfvars('codeq', 1, get_tfvars_file())
| 39.153846
| 75
| 0.742633
| 59
| 509
| 5.983051
| 0.440678
| 0.152975
| 0.220963
| 0.226629
| 0.294618
| 0
| 0
| 0
| 0
| 0
| 0
| 0.002273
| 0.13556
| 509
| 12
| 76
| 42.416667
| 0.8
| 0.076621
| 0
| 0
| 0
| 0
| 0.186667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| true
| 0.285714
| 0.142857
| 0
| 0.285714
| 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
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
65790c739fc2cb9df4170a16c58ef5dfb45c5df3
| 85
|
py
|
Python
|
braindecode/experiments/__init__.py
|
TonioBall/braindecode
|
d5b8d87d959c96ea8422e21099e1ef4b71b9d05a
|
[
"BSD-3-Clause"
] | 260
|
2016-10-20T10:59:34.000Z
|
2022-03-19T08:29:32.000Z
|
braindecode/experiments/__init__.py
|
TonioBall/braindecode
|
d5b8d87d959c96ea8422e21099e1ef4b71b9d05a
|
[
"BSD-3-Clause"
] | 50
|
2017-07-04T06:55:39.000Z
|
2019-06-03T08:58:12.000Z
|
braindecode/experiments/__init__.py
|
TonioBall/braindecode
|
d5b8d87d959c96ea8422e21099e1ef4b71b9d05a
|
[
"BSD-3-Clause"
] | 114
|
2017-08-07T00:47:34.000Z
|
2022-03-14T12:08:10.000Z
|
"""
Convenience classes for experiments, including monitoring and stop criteria.
"""
| 21.25
| 76
| 0.776471
| 9
| 85
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.129412
| 85
| 3
| 77
| 28.333333
| 0.891892
| 0.894118
| 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
|
65c2b8adb7d0a6c6c0b3979adfb07a47d990c630
| 39
|
py
|
Python
|
django/django-pyodbc-azure/DjangoWebProject1/__init__.py
|
garotogordo/azure-sql-database-samples
|
e7ae76f737805e8d0ecfb569cec37f7228b1cd44
|
[
"MIT"
] | 674
|
2015-05-14T19:38:53.000Z
|
2022-03-30T10:12:20.000Z
|
django/django-pyodbc-azure/DjangoWebProject1/__init__.py
|
protypeBasedOO/azure-sql-database-samples
|
77f6377590a8223d0ab8336eeaef78a51dbc3318
|
[
"MIT"
] | 9
|
2015-09-28T17:55:18.000Z
|
2020-11-11T09:23:42.000Z
|
django/django-pyodbc-azure/DjangoWebProject1/__init__.py
|
protypeBasedOO/azure-sql-database-samples
|
77f6377590a8223d0ab8336eeaef78a51dbc3318
|
[
"MIT"
] | 349
|
2015-09-22T18:38:22.000Z
|
2022-03-30T22:18:52.000Z
|
"""
Package for DjangoWebProject1.
"""
| 9.75
| 30
| 0.692308
| 3
| 39
| 9
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.029412
| 0.128205
| 39
| 3
| 31
| 13
| 0.764706
| 0.769231
| 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
|
65e8cafb9c022a4d317244f062539d88fb656255
| 217
|
py
|
Python
|
aulaDjango/py3.5/bin/django-admin.py
|
tmenegaz/django
|
9d3e9aa4737150ff57148cf178572fe9025284de
|
[
"CC-BY-3.0"
] | null | null | null |
aulaDjango/py3.5/bin/django-admin.py
|
tmenegaz/django
|
9d3e9aa4737150ff57148cf178572fe9025284de
|
[
"CC-BY-3.0"
] | null | null | null |
aulaDjango/py3.5/bin/django-admin.py
|
tmenegaz/django
|
9d3e9aa4737150ff57148cf178572fe9025284de
|
[
"CC-BY-3.0"
] | null | null | null |
#!/home/tmenegaz/Documentos/cimatec/2016.2/escolaTecnica/mundoSenai/django/aula/aulaDjango/py3.5/bin/python3.5
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 36.166667
| 110
| 0.806452
| 29
| 217
| 5.655172
| 0.862069
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044554
| 0.069124
| 217
| 5
| 111
| 43.4
| 0.767327
| 0.502304
| 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
|
02b20a9ce8cd8b947bb02dcaa498f50d93505f54
| 1,733
|
py
|
Python
|
app.py
|
whittlbc/flask-boiler
|
cb84c72494e1486c13a4cef0e45d8c473d68782e
|
[
"MIT"
] | null | null | null |
app.py
|
whittlbc/flask-boiler
|
cb84c72494e1486c13a4cef0e45d8c473d68782e
|
[
"MIT"
] | null | null | null |
app.py
|
whittlbc/flask-boiler
|
cb84c72494e1486c13a4cef0e45d8c473d68782e
|
[
"MIT"
] | null | null | null |
import os
from flask import Flask
from flask import jsonify
from flask import request
from functools import wraps
from utils import logger
# Create Flask app
app = Flask(__name__)
# import config vars
app.config.from_object(os.environ['APP_SETTINGS'])
# Create logger: (Ex: logger.info, logger.warning, logger.error)
logger = logger.get_logger(app)
# Home page route
@app.route('/')
def index():
return "Home"
# Another route
@app.route('/<name>')
def my_name(name):
return "Hey there {}!".format(name)
# JSON route
@app.route('/new')
def new_route():
response = jsonify({ 'key': 'val' })
return response
# Route with multiple methods:
@app.route('/multi_method', methods = ['GET', 'POST'])
def multi_method():
if request.method == 'GET':
return get_resp()
elif request.method == 'POST':
return "Heard Post"
def get_resp():
return "Heard Get"
def before_filter(f):
return f
def check_auth(username, password):
return username == 'admin' and password == 'secret'
def authenticate():
message = { 'message': "Authenticate." }
resp = jsonify(message)
resp.status_code = 401
resp.headers['WWW-Authenticate'] = 'Basic realm="Example"'
return resp
def auth_before_filter(f):
# Wrap the original function with this "decorated" one.
@wraps(f)
def decorated(*args, **kwargs):
auth = request.authorization
if not auth:
return authenticate()
elif not check_auth(auth.username, auth.password):
return authenticate()
return f(*args, **kwargs)
return decorated
# Route with before filters
@app.route('/with_before_filter')
@before_filter
@auth_before_filter
def with_before_filter():
return "All good."
if __name__ == '__main__':
app.run(debug = app.config['DEBUG'])
| 18.052083
| 64
| 0.704559
| 235
| 1,733
| 5.051064
| 0.365957
| 0.060657
| 0.037911
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00206
| 0.159838
| 1,733
| 95
| 65
| 18.242105
| 0.813187
| 0.143104
| 0
| 0.037037
| 0
| 0
| 0.136949
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.203704
| false
| 0.055556
| 0.111111
| 0.111111
| 0.574074
| 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
|
02ee1e07fbf6fdb7cf0c85417a88e8ae3cf86039
| 55
|
py
|
Python
|
steps/step52.py
|
tokupooh/DeZero
|
8405b72c0ffcf49a946ef6b3ac6fecae97da7c2c
|
[
"MIT"
] | null | null | null |
steps/step52.py
|
tokupooh/DeZero
|
8405b72c0ffcf49a946ef6b3ac6fecae97da7c2c
|
[
"MIT"
] | 3
|
2021-06-08T22:13:02.000Z
|
2022-01-13T03:12:07.000Z
|
steps/step52.py
|
tokupooh/DeZero
|
8405b72c0ffcf49a946ef6b3ac6fecae97da7c2c
|
[
"MIT"
] | null | null | null |
# No code for my practice
# Because I don't have GPUs.
| 18.333333
| 28
| 0.709091
| 11
| 55
| 3.545455
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.218182
| 55
| 2
| 29
| 27.5
| 0.906977
| 0.909091
| 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
|
f311a8e7f15575686b3d1a7cdff9fbc722cfb324
| 76
|
py
|
Python
|
expander_mixins/__init__.py
|
J-Adrian-Zimmer/ProgrammableServer
|
7a4a23d541d7ea9589f8d8b838001e38e01003c3
|
[
"MIT"
] | 2
|
2015-10-07T04:36:53.000Z
|
2015-10-18T00:21:13.000Z
|
expander_mixins/__init__.py
|
J-Adrian-Zimmer/ProgrammableServer
|
7a4a23d541d7ea9589f8d8b838001e38e01003c3
|
[
"MIT"
] | 1
|
2015-07-19T14:22:07.000Z
|
2015-07-19T14:22:07.000Z
|
expanders/__init__.py
|
J-Adrian-Zimmer/ProgrammableServer
|
7a4a23d541d7ea9589f8d8b838001e38e01003c3
|
[
"MIT"
] | null | null | null |
# This empty script exists so Python's module import mechanism
# will work.
| 25.333333
| 62
| 0.776316
| 12
| 76
| 4.916667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.171053
| 76
| 2
| 63
| 38
| 0.936508
| 0.934211
| 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
|
f3195bfb6be8a44dc541f633cd54b04fdf582961
| 235
|
py
|
Python
|
djcelery_pro/__init__.py
|
hardvic/django_celery_study_proj
|
c08572a4a405ca408e4082eca1c1f55bc72c5ea0
|
[
"Apache-2.0"
] | null | null | null |
djcelery_pro/__init__.py
|
hardvic/django_celery_study_proj
|
c08572a4a405ca408e4082eca1c1f55bc72c5ea0
|
[
"Apache-2.0"
] | null | null | null |
djcelery_pro/__init__.py
|
hardvic/django_celery_study_proj
|
c08572a4a405ca408e4082eca1c1f55bc72c5ea0
|
[
"Apache-2.0"
] | null | null | null |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
# This will make sure the app is always imported
# when Django starts so that shared_task will use this app
from .celery import app as celery_app
| 23.5
| 58
| 0.748936
| 39
| 235
| 4.333333
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005181
| 0.178723
| 235
| 9
| 59
| 26.111111
| 0.870466
| 0.621277
| 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
|
b84cdd15b2c71f45316ea9710eb07e903a49124d
| 63
|
py
|
Python
|
imagect/process/__init__.py
|
imagect/imagect
|
8a6759c2efaf31c10ef26d3238e71f8706724f44
|
[
"MIT"
] | null | null | null |
imagect/process/__init__.py
|
imagect/imagect
|
8a6759c2efaf31c10ef26d3238e71f8706724f44
|
[
"MIT"
] | null | null | null |
imagect/process/__init__.py
|
imagect/imagect
|
8a6759c2efaf31c10ef26d3238e71f8706724f44
|
[
"MIT"
] | null | null | null |
"""
image process detail
byte, int, float, double, rgb
"""
| 12.6
| 33
| 0.619048
| 8
| 63
| 4.875
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.222222
| 63
| 5
| 34
| 12.6
| 0.795918
| 0.857143
| 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
|
b884837ef99f21a1fe6b796cce7bca4461dc8c06
| 99
|
py
|
Python
|
onlinecourse/apps.py
|
ritwickjha99/onlineclass
|
1d0ea759c33ae4204d1ecaa5078b50ec9f3851ca
|
[
"Apache-2.0"
] | 5
|
2021-02-10T16:36:27.000Z
|
2022-02-18T10:40:41.000Z
|
onlinecourse/apps.py
|
ritwickjha99/onlineclass
|
1d0ea759c33ae4204d1ecaa5078b50ec9f3851ca
|
[
"Apache-2.0"
] | 10
|
2021-04-08T20:36:22.000Z
|
2022-03-12T00:52:45.000Z
|
onlinecourse/apps.py
|
ritwickjha99/onlineclass
|
1d0ea759c33ae4204d1ecaa5078b50ec9f3851ca
|
[
"Apache-2.0"
] | 380
|
2021-02-10T17:16:44.000Z
|
2022-03-31T13:39:36.000Z
|
from django.apps import AppConfig
class OnlinecourseConfig(AppConfig):
name = 'onlinecourse'
| 16.5
| 36
| 0.777778
| 10
| 99
| 7.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.151515
| 99
| 5
| 37
| 19.8
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 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
|
b217d2011a3a8cb1d4e0aa698e62509b178d4430
| 99
|
py
|
Python
|
telegram-admin/app/handlers/main/callbacks.py
|
D00Movenok/achtung
|
441053d7fe81090d8b3c27ad37c8bcdd71319e4d
|
[
"MIT"
] | 1
|
2022-03-08T15:41:36.000Z
|
2022-03-08T15:41:36.000Z
|
telegram-admin/app/handlers/main/callbacks.py
|
D00Movenok/achtung
|
441053d7fe81090d8b3c27ad37c8bcdd71319e4d
|
[
"MIT"
] | 1
|
2022-01-18T19:43:05.000Z
|
2022-01-18T19:43:05.000Z
|
telegram-admin/app/handlers/main/callbacks.py
|
D00Movenok/achtung
|
441053d7fe81090d8b3c27ad37c8bcdd71319e4d
|
[
"MIT"
] | null | null | null |
from aiogram.utils.callback_data import CallbackData
main_callback = CallbackData('main', 'menu')
| 24.75
| 52
| 0.808081
| 12
| 99
| 6.5
| 0.75
| 0.410256
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.090909
| 99
| 3
| 53
| 33
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0.080808
| 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
|
b21b12bfb363833f08b4b7f15e4bdba36458fc4f
| 120
|
py
|
Python
|
conexao_teste.py
|
GuiAquinoBR/Banco-de-dados-Python
|
1b98cb91011399b0d144d7c4055d8e93e2a2f0c0
|
[
"MIT"
] | null | null | null |
conexao_teste.py
|
GuiAquinoBR/Banco-de-dados-Python
|
1b98cb91011399b0d144d7c4055d8e93e2a2f0c0
|
[
"MIT"
] | null | null | null |
conexao_teste.py
|
GuiAquinoBR/Banco-de-dados-Python
|
1b98cb91011399b0d144d7c4055d8e93e2a2f0c0
|
[
"MIT"
] | null | null | null |
from db import nova_conexao
with nova_conexao() as conexao:
if conexao:
print('Conectado!')
print('Fim!')
| 15
| 31
| 0.666667
| 16
| 120
| 4.875
| 0.6875
| 0.282051
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.216667
| 120
| 7
| 32
| 17.142857
| 0.829787
| 0
| 0
| 0
| 0
| 0
| 0.116667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.2
| 0
| 0.2
| 0.4
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b2624e362b1c65f646b33cddb04d2c4a6803ba0f
| 109
|
py
|
Python
|
Beecrowd/Tired/1933 Tri-du.py
|
nazmul629/OJ-Problem_Solution
|
cf5e01ab8cf062441bfe901e12d98cbaa1d727f9
|
[
"MIT"
] | null | null | null |
Beecrowd/Tired/1933 Tri-du.py
|
nazmul629/OJ-Problem_Solution
|
cf5e01ab8cf062441bfe901e12d98cbaa1d727f9
|
[
"MIT"
] | null | null | null |
Beecrowd/Tired/1933 Tri-du.py
|
nazmul629/OJ-Problem_Solution
|
cf5e01ab8cf062441bfe901e12d98cbaa1d727f9
|
[
"MIT"
] | null | null | null |
a,b =map(int,input().split())
if (a>=1 and a<=13) and (b>=1 and b<=13):
if a>b:print(a)
else:print(b)
| 27.25
| 41
| 0.541284
| 26
| 109
| 2.269231
| 0.461538
| 0.067797
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.067416
| 0.183486
| 109
| 4
| 42
| 27.25
| 0.595506
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
a22c759e07fb875297681ea2cbc83e2d78798c33
| 165
|
py
|
Python
|
pyclopedia/p02_ref/p03_objective_oriented/p03_magic_attribute/p07__code__.py
|
MacHu-GWU/pyclopedia-project
|
c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee
|
[
"MIT"
] | null | null | null |
pyclopedia/p02_ref/p03_objective_oriented/p03_magic_attribute/p07__code__.py
|
MacHu-GWU/pyclopedia-project
|
c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee
|
[
"MIT"
] | null | null | null |
pyclopedia/p02_ref/p03_objective_oriented/p03_magic_attribute/p07__code__.py
|
MacHu-GWU/pyclopedia-project
|
c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
def add_two(a, b):
return a + b
if __name__ == "__main__":
# print(add_two.__code__)
pass
| 11
| 33
| 0.527273
| 23
| 165
| 3.173913
| 0.826087
| 0.164384
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008264
| 0.266667
| 165
| 14
| 34
| 11.785714
| 0.595041
| 0.424242
| 0
| 0
| 0
| 0
| 0.094118
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.25
| 0
| 0.25
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
|
0
| 4
|
a2417f41272438a2c03d9dcd3a0eabfc7ce96382
| 1,217
|
py
|
Python
|
Dashboard/company/migrations/0002_auto_20211225_1727.py
|
jyothiprakashpanaik/DashBoard-BackEnd1
|
a6aa85d9da0b0fc644f746898153c9c80433c68b
|
[
"Apache-2.0"
] | null | null | null |
Dashboard/company/migrations/0002_auto_20211225_1727.py
|
jyothiprakashpanaik/DashBoard-BackEnd1
|
a6aa85d9da0b0fc644f746898153c9c80433c68b
|
[
"Apache-2.0"
] | 25
|
2022-01-07T09:04:19.000Z
|
2022-02-27T17:51:16.000Z
|
Dashboard/company/migrations/0002_auto_20211225_1727.py
|
jyothiprakashpanaik/DashBoard-BackEnd1
|
a6aa85d9da0b0fc644f746898153c9c80433c68b
|
[
"Apache-2.0"
] | 2
|
2022-01-07T09:11:18.000Z
|
2022-01-11T06:07:17.000Z
|
# Generated by Django 3.2.8 on 2021-12-25 11:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('company', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='gim_mba',
name='company_ptr',
),
migrations.RemoveField(
model_name='gis_pg',
name='company_ptr',
),
migrations.RemoveField(
model_name='gis_ug',
name='company_ptr',
),
migrations.RemoveField(
model_name='git_pg',
name='company_ptr',
),
migrations.RemoveField(
model_name='git_ug',
name='company_ptr',
),
migrations.RemoveField(
model_name='pharmacy',
name='company_ptr',
),
migrations.DeleteModel(name='Gim_BBA_BCOM', ),
migrations.DeleteModel(name='Gim_MBA', ),
migrations.DeleteModel(name='Gis_pg', ),
migrations.DeleteModel(name='Gis_ug', ),
migrations.DeleteModel(name='Git_pg', ),
migrations.DeleteModel(name='Git_ug', ),
migrations.DeleteModel(name='Pharmacy', ),
]
| 27.044444
| 54
| 0.556286
| 114
| 1,217
| 5.719298
| 0.324561
| 0.22546
| 0.268405
| 0.276074
| 0.368098
| 0.368098
| 0.368098
| 0.368098
| 0
| 0
| 0
| 0.022892
| 0.317995
| 1,217
| 44
| 55
| 27.659091
| 0.762651
| 0.036976
| 0
| 0.473684
| 1
| 0
| 0.149573
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.026316
| 0
| 0.105263
| 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
|
a252fba2a9847c032e02152b51bae2581d908526
| 62
|
py
|
Python
|
iati/events/admin.py
|
andylolz/IATI-Standard-Website
|
b781b9fe6b6430f93826e530e9560183bf8fd310
|
[
"MIT"
] | null | null | null |
iati/events/admin.py
|
andylolz/IATI-Standard-Website
|
b781b9fe6b6430f93826e530e9560183bf8fd310
|
[
"MIT"
] | null | null | null |
iati/events/admin.py
|
andylolz/IATI-Standard-Website
|
b781b9fe6b6430f93826e530e9560183bf8fd310
|
[
"MIT"
] | null | null | null |
"""Module for registering admin models for the events app."""
| 31
| 61
| 0.741935
| 9
| 62
| 5.111111
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145161
| 62
| 1
| 62
| 62
| 0.867925
| 0.887097
| 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
|
a26009deae54bf036aa5ba4c856b1ef493e00d11
| 210
|
py
|
Python
|
src/garnet/storages.py
|
ukinti/garnet
|
22eb21b512d143b7da285254fec71668f58a62f8
|
[
"MIT"
] | 28
|
2020-06-01T11:42:38.000Z
|
2021-12-13T06:49:36.000Z
|
src/garnet/storages.py
|
ukinti/garnet
|
22eb21b512d143b7da285254fec71668f58a62f8
|
[
"MIT"
] | 6
|
2020-05-31T09:55:49.000Z
|
2021-08-17T18:04:15.000Z
|
src/garnet/storages.py
|
ukinti/garnet
|
22eb21b512d143b7da285254fec71668f58a62f8
|
[
"MIT"
] | 6
|
2020-06-01T11:16:39.000Z
|
2021-11-16T23:04:30.000Z
|
from _garnet.storages.base import BaseStorage
from _garnet.storages.dict import DictStorage
from _garnet.storages.json import JSONStorage
__all__ = (
"BaseStorage",
"JSONStorage",
"DictStorage",
)
| 21
| 45
| 0.761905
| 22
| 210
| 6.954545
| 0.5
| 0.196078
| 0.352941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.152381
| 210
| 9
| 46
| 23.333333
| 0.859551
| 0
| 0
| 0
| 0
| 0
| 0.157143
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.375
| 0
| 0.375
| 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
| 1
| 0
| 0
| 0
|
0
| 4
|
a28269f35219cd9148e5c60e44dd5d8057bde791
| 13,025
|
py
|
Python
|
tests/integration/test_hive_query/test.py
|
DevTeamBK/ClickHouse
|
f65b5d21594a07afb017a7cdaa718c5d1caa257d
|
[
"Apache-2.0"
] | 8,629
|
2016-06-14T21:03:01.000Z
|
2019-09-23T07:46:38.000Z
|
tests/integration/test_hive_query/test.py
|
yandex/ClickHouse
|
9371a1917a8f911c2f1df08243a51bf619dbed8c
|
[
"Apache-2.0"
] | 4,335
|
2016-06-15T12:58:31.000Z
|
2019-09-23T11:18:43.000Z
|
tests/integration/test_hive_query/test.py
|
DevTeamBK/ClickHouse
|
f65b5d21594a07afb017a7cdaa718c5d1caa257d
|
[
"Apache-2.0"
] | 1,700
|
2016-06-15T09:25:11.000Z
|
2019-09-23T11:16:38.000Z
|
import logging
import os
import time
import pytest
from helpers.cluster import ClickHouseCluster
from helpers.test_tools import TSV
logging.getLogger().setLevel(logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
@pytest.fixture(scope="module")
def started_cluster():
try:
cluster = ClickHouseCluster(__file__)
cluster.add_instance(
"h0_0_0",
main_configs=["configs/config.xml"],
extra_configs=["configs/hdfs-site.xml", "data/prepare_hive_data.sh"],
with_hive=True,
)
logging.info("Starting cluster ...")
cluster.start()
cluster.copy_file_to_container(
"roottesthivequery_hdfs1_1",
"/ClickHouse/tests/integration/test_hive_query/data/prepare_hive_data.sh",
"/prepare_hive_data.sh",
)
cluster.exec_in_container(
"roottesthivequery_hdfs1_1", ["bash", "-c", "bash /prepare_hive_data.sh"]
)
yield cluster
finally:
cluster.shutdown()
def test_create_parquet_table(started_cluster):
logging.info("Start testing creating hive table ...")
node = started_cluster.instances["h0_0_0"]
test_passed = False
for i in range(10):
node.query("set input_format_parquet_allow_missing_columns = true")
result = node.query(
"""
DROP TABLE IF EXISTS default.demo_parquet;
CREATE TABLE default.demo_parquet (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo') PARTITION BY(day)
"""
)
logging.info("create result {}".format(result))
if result.strip() == "":
test_passed = True
break
time.sleep(60)
assert test_passed
def test_create_parquet_table_1(started_cluster):
logging.info("Start testing creating hive table ...")
node = started_cluster.instances["h0_0_0"]
for i in range(10):
node.query("set input_format_parquet_allow_missing_columns = true")
result = node.query(
"""
DROP TABLE IF EXISTS default.demo_parquet_parts;
CREATE TABLE default.demo_parquet_parts (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String), `hour` String) ENGINE = Hive('thrift://hivetest:9083', 'test', 'parquet_demo') PARTITION BY(day, hour);
"""
)
logging.info("create result {}".format(result))
if result.strip() == "":
test_passed = True
break
time.sleep(60)
assert test_passed
def test_create_orc_table(started_cluster):
logging.info("Start testing creating hive table ...")
node = started_cluster.instances["h0_0_0"]
test_passed = False
for i in range(10):
result = node.query(
"""
DROP TABLE IF EXISTS default.demo_orc;
CREATE TABLE default.demo_orc (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo_orc') PARTITION BY(day)
"""
)
logging.info("create result {}".format(result))
if result.strip() == "":
test_passed = True
break
time.sleep(60)
assert test_passed
def test_create_text_table(started_cluster):
logging.info("Start testing creating hive table ...")
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
DROP TABLE IF EXISTS default.demo_text;
CREATE TABLE default.demo_text (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo_text') PARTITION BY (tuple())
"""
)
logging.info("create result {}".format(result))
assert result.strip() == ""
def test_parquet_groupby(started_cluster):
logging.info("Start testing groupby ...")
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
SELECT day, count(*) FROM default.demo_parquet group by day order by day
"""
)
expected_result = """2021-11-01 1
2021-11-05 2
2021-11-11 1
2021-11-16 2
"""
assert result == expected_result
def test_parquet_in_filter(started_cluster):
logging.info("Start testing groupby ...")
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
SELECT count(*) FROM default.demo_parquet_parts where day = '2021-11-05' and hour in ('00')
"""
)
expected_result = """2
"""
logging.info("query result:{}".format(result))
assert result == expected_result
def test_orc_groupby(started_cluster):
logging.info("Start testing groupby ...")
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
SELECT day, count(*) FROM default.demo_orc group by day order by day
"""
)
expected_result = """2021-11-01 1
2021-11-05 2
2021-11-11 1
2021-11-16 2
"""
assert result == expected_result
@pytest.mark.parametrize(
"table,use_local_cache_for_remote_storage,enable_orc_file_minmax_index,enable_orc_stripe_minmax_index",
[
pytest.param(
"demo_orc_no_cache_no_index",
"false",
"false",
"false",
id="demo_orc_no_cache_no_index",
),
pytest.param(
"demo_orc_with_cache_no_index",
"true",
"false",
"false",
id="demo_orc_with_cache_no_index",
),
pytest.param(
"demo_orc_no_cache_file_index",
"false",
"true",
"false",
id="demo_orc_no_cache_file_index",
),
pytest.param(
"demo_orc_with_cache_file_index",
"true",
"true",
"false",
id="demo_orc_with_cache_file_index",
),
pytest.param(
"demo_orc_no_cache_stripe_index",
"false",
"true",
"true",
id="demo_orc_no_cache_stripe_index",
),
pytest.param(
"demo_orc_with_cache_stripe_index",
"true",
"true",
"true",
id="demo_orc_with_cache_stripe_index",
),
],
)
def test_orc_minmax_index(
started_cluster,
table,
use_local_cache_for_remote_storage,
enable_orc_file_minmax_index,
enable_orc_stripe_minmax_index,
):
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
DROP TABLE IF EXISTS default.{table};
CREATE TABLE default.{table} (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo_orc') PARTITION BY(day)
SETTINGS enable_orc_file_minmax_index = {enable_orc_file_minmax_index}, enable_orc_stripe_minmax_index = {enable_orc_stripe_minmax_index};
""".format(
table=table,
enable_orc_file_minmax_index=enable_orc_file_minmax_index,
enable_orc_stripe_minmax_index=enable_orc_stripe_minmax_index,
)
)
assert result.strip() == ""
for i in range(2):
result = node.query(
"""
SELECT day, id, score FROM default.{table} where day >= '2021-11-05' and day <= '2021-11-16' and score >= 15 and score <= 30 order by day, id
SETTINGS use_local_cache_for_remote_storage = {use_local_cache_for_remote_storage}
""".format(
table=table,
use_local_cache_for_remote_storage=use_local_cache_for_remote_storage,
)
)
assert (
result
== """2021-11-05 abd 15
2021-11-16 aaa 22
"""
)
@pytest.mark.parametrize(
"table,use_local_cache_for_remote_storage,enable_parquet_rowgroup_minmax_index",
[
pytest.param(
"demo_parquet_no_cache_no_index",
"false",
"false",
id="demo_parquet_no_cache_no_index",
),
pytest.param(
"demo_parquet_with_cache_no_index",
"true",
"false",
id="demo_parquet_with_cache_no_index",
),
pytest.param(
"demo_parquet_no_cache_rowgroup_index",
"false",
"true",
id="demo_parquet_no_cache_rowgroup_index",
),
pytest.param(
"demo_parquet_with_cache_rowgroup_index",
"true",
"true",
id="demo_parquet_with_cache_rowgroup_index",
),
],
)
def test_parquet_minmax_index(
started_cluster,
table,
use_local_cache_for_remote_storage,
enable_parquet_rowgroup_minmax_index,
):
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
DROP TABLE IF EXISTS default.{table};
CREATE TABLE default.{table} (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo') PARTITION BY(day)
SETTINGS enable_parquet_rowgroup_minmax_index = {enable_parquet_rowgroup_minmax_index}
""".format(
table=table,
enable_parquet_rowgroup_minmax_index=enable_parquet_rowgroup_minmax_index,
)
)
assert result.strip() == ""
for i in range(2):
result = node.query(
"""
SELECT day, id, score FROM default.{table} where day >= '2021-11-05' and day <= '2021-11-16' and score >= 15 and score <= 30 order by day, id
SETTINGS use_local_cache_for_remote_storage = {use_local_cache_for_remote_storage}
""".format(
table=table,
use_local_cache_for_remote_storage=use_local_cache_for_remote_storage,
)
)
assert (
result
== """2021-11-05 abd 15
2021-11-16 aaa 22
"""
)
def test_hive_columns_prunning(started_cluster):
logging.info("Start testing groupby ...")
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
SELECT count(*) FROM default.demo_parquet_parts where day = '2021-11-05'
"""
)
expected_result = """4
"""
logging.info("query result:{}".format(result))
assert result == expected_result
def test_text_count(started_cluster):
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
SELECT day, count(*) FROM default.demo_orc group by day order by day SETTINGS format_csv_delimiter = '\x01'
"""
)
expected_result = """2021-11-01 1
2021-11-05 2
2021-11-11 1
2021-11-16 2
"""
assert result == expected_result
def test_parquet_groupby_with_cache(started_cluster):
logging.info("Start testing groupby ...")
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
SELECT day, count(*) FROM default.demo_parquet group by day order by day
"""
)
expected_result = """2021-11-01 1
2021-11-05 2
2021-11-11 1
2021-11-16 2
"""
assert result == expected_result
def test_parquet_groupby_by_hive_function(started_cluster):
logging.info("Start testing groupby ...")
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
SELECT day, count(*) FROM hive('thrift://hivetest:9083', 'test', 'demo', '`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)', 'day') group by day order by day
"""
)
expected_result = """2021-11-01 1
2021-11-05 2
2021-11-11 1
2021-11-16 2
"""
assert result == expected_result
def test_cache_read_bytes(started_cluster):
node = started_cluster.instances["h0_0_0"]
result = node.query(
"""
CREATE TABLE IF NOT EXISTS default.demo_parquet_1 (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo') PARTITION BY(day)
"""
)
test_passed = False
for i in range(10):
result = node.query(
"""
SELECT * FROM default.demo_parquet_1 settings input_format_parquet_allow_missing_columns = true
"""
)
node.query("system flush logs")
result = node.query(
"select sum(ProfileEvent_ExternalDataSourceLocalCacheReadBytes) from system.metric_log where ProfileEvent_ExternalDataSourceLocalCacheReadBytes > 0"
)
if result.strip() == "0":
logging.info("ProfileEvent_ExternalDataSourceLocalCacheReadBytes == 0")
time.sleep(10)
continue
test_passed = True
break
assert test_passed
def test_cache_dir_use(started_cluster):
node = started_cluster.instances["h0_0_0"]
result0 = node.exec_in_container(
["bash", "-c", "ls /tmp/clickhouse_local_cache | wc -l"]
)
result1 = node.exec_in_container(
["bash", "-c", "ls /tmp/clickhouse_local_cache1 | wc -l"]
)
assert result0 != "0" and result1 != "0"
| 31.690998
| 216
| 0.618503
| 1,569
| 13,025
| 4.845124
| 0.110261
| 0.05709
| 0.035517
| 0.053275
| 0.811365
| 0.782557
| 0.727046
| 0.667456
| 0.667456
| 0.64391
| 0
| 0.043034
| 0.263186
| 13,025
| 410
| 217
| 31.768293
| 0.749088
| 0
| 0
| 0.620579
| 0
| 0
| 0.252954
| 0.135941
| 0
| 0
| 0
| 0
| 0.054662
| 1
| 0.051447
| false
| 0.03537
| 0.019293
| 0
| 0.07074
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 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
|
a2861faed9c2cd8379895d2d127faca06c54eb0c
| 10,768
|
py
|
Python
|
tests/functional/test_cmd_line_call.py
|
fevral13/django-migration-linter
|
6fcc7b4719ab93acf3036cb27fc185de30be0bde
|
[
"Apache-2.0"
] | null | null | null |
tests/functional/test_cmd_line_call.py
|
fevral13/django-migration-linter
|
6fcc7b4719ab93acf3036cb27fc185de30be0bde
|
[
"Apache-2.0"
] | null | null | null |
tests/functional/test_cmd_line_call.py
|
fevral13/django-migration-linter
|
6fcc7b4719ab93acf3036cb27fc185de30be0bde
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2019 3YOURMIND GmbH
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import shutil
import unittest
from subprocess import Popen, PIPE
from django_migration_linter import utils, DEFAULT_CACHE_PATH
from tests import fixtures
import sys
class CallLinterFromCommandLineTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
super(CallLinterFromCommandLineTest, cls).setUpClass()
linter_name = 'django-migration-linter'
cls.linter_exec = '{0}/bin/{1}'.format(sys.prefix, linter_name) if hasattr(sys, 'real_prefix') else linter_name
def test_call_linter_cmd_line_working(self):
cmd = '{0} --no-cache {1}'.format(self.linter_exec, fixtures.CORRECT_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 6)
self.assertEqual(
sorted(lines[:4]),
sorted([
"(test_app1, 0001_initial)... OK",
"(test_app1, 0002_a_new_null_field)... OK",
"(test_app2, 0001_foo)... OK",
"(test_app3, 0001_initial)... OK",
])
)
def test_call_linter_cmd_line_errors(self):
cmd = '{0} --no-cache {1}'.format(
self.linter_exec,
fixtures.ADD_NOT_NULL_COLUMN_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertNotEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 5)
self.assertTrue(lines[0].endswith('OK'))
self.assertTrue(lines[1].endswith('ERR'))
self.assertTrue('RENAMING tables' in lines[2])
def test_call_linter_cmd_line_exclude_apps(self):
cmd = '{0} --no-cache {1} --exclude-apps test_app2'.format(
self.linter_exec,
fixtures.CORRECT_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 6)
self.assertEqual(
sorted(lines[:4]),
sorted([
"(test_app1, 0001_initial)... OK",
"(test_app1, 0002_a_new_null_field)... OK",
"(test_app2, 0001_foo)... IGNORE",
"(test_app3, 0001_initial)... OK",
])
)
def test_call_linter_cmd_line_include_apps(self):
cmd = '{0} --no-cache {1} --include-apps test_app2'.format(
self.linter_exec,
fixtures.CORRECT_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 6)
self.assertEqual(
sorted(lines[:4]),
sorted([
"(test_app1, 0001_initial)... IGNORE",
"(test_app1, 0002_a_new_null_field)... IGNORE",
"(test_app2, 0001_foo)... OK",
"(test_app3, 0001_initial)... IGNORE",
])
)
def test_call_linter_cmd_line_ignore_name(self):
cmd = '{0} --no-cache {1} --ignore-name 0001_initial'.format(
self.linter_exec,
fixtures.CORRECT_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 6)
self.assertEqual(
sorted(lines[:4]),
sorted([
"(test_app1, 0001_initial)... IGNORE",
"(test_app1, 0002_a_new_null_field)... OK",
"(test_app2, 0001_foo)... OK",
"(test_app3, 0001_initial)... IGNORE",
])
)
def test_call_linter_cmd_line_ignore_name_contains(self):
cmd = '{0} --no-cache {1} --ignore-name-contains 0001'.format(
self.linter_exec,
fixtures.CORRECT_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 6)
self.assertEqual(
sorted(lines[:4]),
sorted([
"(test_app1, 0001_initial)... IGNORE",
"(test_app1, 0002_a_new_null_field)... OK",
"(test_app2, 0001_foo)... IGNORE",
"(test_app3, 0001_initial)... IGNORE",
])
)
def test_call_linter_cmd_line_cache(self):
cache_file = os.path.join(DEFAULT_CACHE_PATH, 'test_correct_project.pickle')
if os.path.exists(cache_file):
os.remove(cache_file)
cmd = '{0} {1}'.format(
self.linter_exec,
fixtures.CORRECT_PROJECT
)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertTrue(os.path.exists(DEFAULT_CACHE_PATH))
def test_call_linter_cmd_line_cache_path(self):
if os.path.exists('/tmp/migration-linter-cache-tests/'):
shutil.rmtree('/tmp/migration-linter-cache-tests/')
cmd = '{0} {1} --cache-path={2}'.format(
self.linter_exec,
fixtures.CORRECT_PROJECT,
'/tmp/migration-linter-cache-tests/'
)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
self.assertTrue(os.path.exists('/tmp/migration-linter-cache-tests'))
def test_call_linter_cmd_line_no_cache(self):
cache_file = os.path.join(DEFAULT_CACHE_PATH, 'test_correct_project.pickle')
if os.path.exists(cache_file):
os.remove(cache_file)
cmd = '{0} --no-cache {1}'.format(
self.linter_exec,
fixtures.CORRECT_PROJECT
)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
self.assertFalse(os.path.exists(cache_file))
def test_call_linter_cmd_line_git_id(self):
cmd = '{0} --no-cache {1} d7125d5f4f0cc9623f670a66c54f131acc50032d'.format(
self.linter_exec,
fixtures.MULTI_COMMIT_PROJECT)
fixtures.prepare_git_project(fixtures.MULTI_COMMIT_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 3)
self.assertTrue(lines[0].endswith('OK'))
self.assertTrue(lines[1].startswith('*** Summary'))
def test_call_linter_with_deleted_migrations(self):
cmd = '{0} --no-cache {1} 154ecf6119325cc3b1f3f5a4e709bfbd61a4a4ba'.format(
self.linter_exec,
fixtures.DELETED_MIGRATION_PROJECT)
fixtures.prepare_git_project(fixtures.DELETED_MIGRATION_PROJECT)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 3)
self.assertTrue(lines[0].endswith('OK'))
self.assertTrue(lines[1].startswith('*** Summary'))
def test_call_from_within_project(self):
cmd = 'cd {0} && {1} --no-cache .'.format(
fixtures.CORRECT_PROJECT,
self.linter_exec)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 6)
self.assertEqual(
sorted(lines[:4]),
sorted([
"(test_app1, 0001_initial)... OK",
"(test_app1, 0002_a_new_null_field)... OK",
"(test_app2, 0001_foo)... OK",
"(test_app3, 0001_initial)... OK",
])
)
def test_call_project_non_git_root(self):
# could use tag: version_ok (but doesn't work in Travis)
cmd = '{0} --no-cache {1} 2c46f438a89972f9ce2d5151a825a5bfb7f7db4b'.format(
self.linter_exec,
fixtures.NON_GIT_ROOT_DJANGO_PROJECT)
fixtures.prepare_git_project(fixtures.NON_GIT_ROOT_GIT_FOLDER)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 3)
self.assertTrue(lines[0].endswith('OK'))
self.assertTrue(lines[1].startswith('*** Summary'))
def test_call_project_non_git_root_ko(self):
# could use tag: version_ko (but doesn't work in Travis)
cmd = '{0} --no-cache {1} 0140e142724fc58944797f9ddc2ebf964146339a'.format(
self.linter_exec,
fixtures.NON_GIT_ROOT_DJANGO_PROJECT)
fixtures.prepare_git_project(fixtures.NON_GIT_ROOT_GIT_FOLDER)
process = Popen(
cmd, shell=True, stdout=PIPE, stderr=PIPE)
process.wait()
self.assertNotEqual(process.returncode, 0)
lines = list(map(utils.clean_bytes_to_str, process.stdout.readlines()))
self.assertEqual(len(lines), 5)
self.assertTrue(lines[0].endswith('ERR'))
self.assertTrue(lines[2].endswith('OK'))
self.assertTrue(lines[3].startswith('*** Summary'))
| 38.873646
| 120
| 0.610698
| 1,261
| 10,768
| 5.003172
| 0.148295
| 0.066572
| 0.02441
| 0.044381
| 0.778095
| 0.740371
| 0.707402
| 0.684419
| 0.663497
| 0.663497
| 0
| 0.039635
| 0.266623
| 10,768
| 276
| 121
| 39.014493
| 0.759276
| 0.061014
| 0
| 0.71179
| 0
| 0
| 0.162705
| 0.053872
| 0
| 0
| 0
| 0
| 0.196507
| 1
| 0.065502
| false
| 0
| 0.030568
| 0
| 0.100437
| 0
| 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
|
a29e3c53621dbdc9869326aa4873c7ab24710818
| 231
|
py
|
Python
|
env_var.py
|
gve-sw/GVE_devnet_webexmeetingscheduler
|
14f8edaf43f914f594b15087dc4ca15eedf91770
|
[
"BSD-Source-Code"
] | 1
|
2021-05-21T07:50:28.000Z
|
2021-05-21T07:50:28.000Z
|
env_var.py
|
gve-sw/gve_devnet_webexmeetingscheduler
|
14f8edaf43f914f594b15087dc4ca15eedf91770
|
[
"BSD-Source-Code"
] | null | null | null |
env_var.py
|
gve-sw/gve_devnet_webexmeetingscheduler
|
14f8edaf43f914f594b15087dc4ca15eedf91770
|
[
"BSD-Source-Code"
] | null | null | null |
# webex integration credentials
webex_integration_client_id = ""
webex_integration_client_secret= ""
webex_integration_redirect_uri = "http://localhost:5000/webexoauth"
webex_integration_scope = "spark:all meeting:schedules_write"
| 38.5
| 67
| 0.844156
| 27
| 231
| 6.777778
| 0.666667
| 0.437158
| 0.240437
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018605
| 0.069264
| 231
| 5
| 68
| 46.2
| 0.832558
| 0.125541
| 0
| 0
| 0
| 0
| 0.325
| 0.115
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 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
|
a2a0b28202da2a908e3acc0ad97f985bf762db03
| 17
|
py
|
Python
|
raspi_peri/version.py
|
amaork/raspi-peri
|
8792bd985108082f3bf700f9aa076b3d401f05db
|
[
"MIT"
] | 90
|
2020-06-02T09:43:34.000Z
|
2022-03-18T12:04:11.000Z
|
raspi_peri/version.py
|
amaork/raspi-peri
|
8792bd985108082f3bf700f9aa076b3d401f05db
|
[
"MIT"
] | 8
|
2020-06-05T19:20:07.000Z
|
2022-03-17T10:14:30.000Z
|
raspi_peri/version.py
|
amaork/raspi-peri
|
8792bd985108082f3bf700f9aa076b3d401f05db
|
[
"MIT"
] | 8
|
2020-06-06T08:08:53.000Z
|
2022-03-19T16:38:18.000Z
|
version = '0.01'
| 8.5
| 16
| 0.588235
| 3
| 17
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 0.176471
| 17
| 1
| 17
| 17
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a2b2ef49dfb262288ebd4ed72b848bb9075d747c
| 208
|
py
|
Python
|
Menel/resources/regexes.py
|
05xapresses/Menel
|
7b79cdb51e613d8b4b1bdaa972338381c2936fa7
|
[
"MIT"
] | null | null | null |
Menel/resources/regexes.py
|
05xapresses/Menel
|
7b79cdb51e613d8b4b1bdaa972338381c2936fa7
|
[
"MIT"
] | null | null | null |
Menel/resources/regexes.py
|
05xapresses/Menel
|
7b79cdb51e613d8b4b1bdaa972338381c2936fa7
|
[
"MIT"
] | null | null | null |
import re
DISCORD_BOT_TOKEN = re.compile(r'(?:[\w\-=]+)\.(?:[\w\-=]+)\.(?:[\w\-=]+)', re.ASCII)
def mention(user_id: int) -> re.Pattern:
return re.compile(rf'<@!?{user_id}>', re.IGNORECASE | re.ASCII)
| 26
| 85
| 0.5625
| 30
| 208
| 3.766667
| 0.6
| 0.159292
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110577
| 208
| 8
| 86
| 26
| 0.610811
| 0
| 0
| 0
| 0
| 0
| 0.258373
| 0.191388
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.25
| 0.25
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a2be8fedd3f24af6ccb858cd38e3eecc75c8aa6e
| 1,696
|
py
|
Python
|
test/binding/Python3/test_binder_python_rigidbody.py
|
jdowlingmedley/biorbd
|
591a5372d815af626fa500047fe04743c76d7e13
|
[
"MIT"
] | null | null | null |
test/binding/Python3/test_binder_python_rigidbody.py
|
jdowlingmedley/biorbd
|
591a5372d815af626fa500047fe04743c76d7e13
|
[
"MIT"
] | null | null | null |
test/binding/Python3/test_binder_python_rigidbody.py
|
jdowlingmedley/biorbd
|
591a5372d815af626fa500047fe04743c76d7e13
|
[
"MIT"
] | null | null | null |
"""
Test for file IO
"""
from pathlib import Path
import numpy as np
import pytest
import biorbd
def test_load_model():
biorbd.Model('../../models/pyomecaman.bioMod')
def test_dof_ranges():
m = biorbd.Model('../../models/pyomecaman.bioMod')
pi = 3.14159265358979323846
# Pelvis
ranges = m.segment(0).ranges()
assert(ranges[0].min() == -10)
assert(ranges[0].max() == 10)
assert(ranges[1].min() == -10)
assert(ranges[1].max() == 10)
assert(ranges[2].min() == -pi)
assert(ranges[2].max() == pi)
# BrasD
ranges = m.segment(3).ranges()
assert(ranges[0].min() == -pi)
assert(ranges[0].max() == pi)
assert(ranges[1].min() == 0)
assert(ranges[1].max() == pi)
# BrasG
ranges = m.segment(4).ranges()
assert(ranges[0].min() == -pi)
assert(ranges[0].max() == pi)
assert(ranges[1].min() == 0)
assert(ranges[1].max() == pi)
# CuisseD
ranges = m.segment(5).ranges()
assert(ranges[0].min() == -pi / 12)
assert(ranges[0].max() == pi / 2 + pi / 3)
# JambeD
ranges = m.segment(6).ranges()
assert(ranges[0].min() == -pi / 2 - pi / 6)
assert(ranges[0].max() == 0)
# PiedD
ranges = m.segment(7).ranges()
assert(ranges[0].min() == -pi / 2)
assert(ranges[0].max() == pi / 2)
# CuisseG
ranges = m.segment(8).ranges()
assert(ranges[0].min() == -pi / 12)
assert(ranges[0].max() == pi / 2 + pi / 3)
# JambeG
ranges = m.segment(9).ranges()
assert(ranges[0].min() == -pi / 2 - pi / 6)
assert(ranges[0].max() == 0)
# PiedG
ranges = m.segment(10).ranges()
assert(ranges[0].min() == -pi / 2)
assert(ranges[0].max() == pi / 2)
| 23.555556
| 54
| 0.547759
| 240
| 1,696
| 3.854167
| 0.204167
| 0.337297
| 0.252973
| 0.184865
| 0.557838
| 0.462703
| 0.462703
| 0.462703
| 0.462703
| 0.462703
| 0
| 0.065134
| 0.230542
| 1,696
| 71
| 55
| 23.887324
| 0.643678
| 0.045991
| 0
| 0.454545
| 0
| 0
| 0.037453
| 0.037453
| 0
| 0
| 0
| 0
| 0.590909
| 1
| 0.045455
| false
| 0
| 0.090909
| 0
| 0.136364
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a2f66fe35d195b43fb4c51860f2e34b5a0abf889
| 22
|
py
|
Python
|
prosapient/__init__.py
|
alexsukhrin/tweets
|
e4e6392e964b905e9159ae4b247d9d5683b51c63
|
[
"MIT"
] | 2
|
2019-12-13T00:19:44.000Z
|
2020-06-26T09:48:41.000Z
|
prosapient/__init__.py
|
alexsukhrin/proSapient
|
e4e6392e964b905e9159ae4b247d9d5683b51c63
|
[
"MIT"
] | 1
|
2021-06-02T00:48:04.000Z
|
2021-06-02T00:48:04.000Z
|
prosapient/__init__.py
|
alexsukhrin/proSapient
|
e4e6392e964b905e9159ae4b247d9d5683b51c63
|
[
"MIT"
] | null | null | null |
__version__ = 'v.0.1'
| 11
| 21
| 0.636364
| 4
| 22
| 2.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.105263
| 0.136364
| 22
| 1
| 22
| 22
| 0.421053
| 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
|
a2f8e219a32fe162550fc6a158fc7648e08e0105
| 237
|
py
|
Python
|
code_all/day07/exercise02.py
|
testcg/python
|
4db4bd5d0e44af807d2df80cf8c8980b40cc03c4
|
[
"MIT"
] | null | null | null |
code_all/day07/exercise02.py
|
testcg/python
|
4db4bd5d0e44af807d2df80cf8c8980b40cc03c4
|
[
"MIT"
] | null | null | null |
code_all/day07/exercise02.py
|
testcg/python
|
4db4bd5d0e44af807d2df80cf8c8980b40cc03c4
|
[
"MIT"
] | null | null | null |
"""
******
######
******
######
"""
# 4 6
for r in range(4): # 0 1 2 3
for c in range(6):
if r % 2 == 0:
print("*", end="")
else:
print("#", end="")
print()
| 15.8
| 41
| 0.253165
| 26
| 237
| 2.307692
| 0.576923
| 0.233333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081301
| 0.481013
| 237
| 14
| 42
| 16.928571
| 0.406504
| 0.232068
| 0
| 0
| 0
| 0
| 0.012739
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.428571
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
0c3c463bb676987d23f70cadd28876b0af941c1c
| 212
|
py
|
Python
|
omgeo/services/__init__.py
|
flibbertigibbet/python-omgeo
|
e273181829f3a105810a007a515e124993f66e76
|
[
"MIT"
] | null | null | null |
omgeo/services/__init__.py
|
flibbertigibbet/python-omgeo
|
e273181829f3a105810a007a515e124993f66e76
|
[
"MIT"
] | null | null | null |
omgeo/services/__init__.py
|
flibbertigibbet/python-omgeo
|
e273181829f3a105810a007a515e124993f66e76
|
[
"MIT"
] | null | null | null |
from .bing import Bing
from .esri import EsriWGS
from .us_census import USCensus
from .mapquest import MapQuest, MapQuestSSL
from .nominatim import Nominatim
from .pelias import Pelias
from .google import Google
| 26.5
| 43
| 0.825472
| 30
| 212
| 5.8
| 0.433333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136792
| 212
| 7
| 44
| 30.285714
| 0.95082
| 0
| 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
|
0c62cba9f35d12bde06b6973125a65d7dbb2e167
| 100
|
py
|
Python
|
src/robots/__init__.py
|
sergioisidoro/django-robots
|
70da7606974b915d57e038f8bdf31c0b21be7e45
|
[
"BSD-3-Clause"
] | 252
|
2015-12-17T09:58:14.000Z
|
2022-03-31T15:54:33.000Z
|
src/robots/__init__.py
|
sergioisidoro/django-robots
|
70da7606974b915d57e038f8bdf31c0b21be7e45
|
[
"BSD-3-Clause"
] | 86
|
2015-12-20T22:58:37.000Z
|
2022-03-28T09:54:28.000Z
|
src/robots/__init__.py
|
sergioisidoro/django-robots
|
70da7606974b915d57e038f8bdf31c0b21be7e45
|
[
"BSD-3-Clause"
] | 64
|
2015-12-24T14:24:42.000Z
|
2022-03-24T18:22:39.000Z
|
from pkg_resources import get_distribution
__version__ = get_distribution("django-robots").version
| 25
| 55
| 0.85
| 12
| 100
| 6.5
| 0.75
| 0.384615
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08
| 100
| 3
| 56
| 33.333333
| 0.847826
| 0
| 0
| 0
| 0
| 0
| 0.13
| 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
|
a743d0ae5aa120ef88fd0cf1abd1e5117c265773
| 195
|
py
|
Python
|
scale_01.py
|
bobchengyang/SDP_RUN
|
f6976ed24255b026a68438085225293c780b0065
|
[
"MIT"
] | null | null | null |
scale_01.py
|
bobchengyang/SDP_RUN
|
f6976ed24255b026a68438085225293c780b0065
|
[
"MIT"
] | null | null | null |
scale_01.py
|
bobchengyang/SDP_RUN
|
f6976ed24255b026a68438085225293c780b0065
|
[
"MIT"
] | null | null | null |
def scale_01(feature,n_feature):
for i in range(n_feature):
feature_i=feature[:,i]
feature[:,i]=0+(feature_i-min(feature_i))/(max(feature_i)-min(feature_i))
return feature
| 39
| 81
| 0.671795
| 32
| 195
| 3.84375
| 0.40625
| 0.455285
| 0.243902
| 0.260163
| 0.308943
| 0
| 0
| 0
| 0
| 0
| 0
| 0.018519
| 0.169231
| 195
| 5
| 82
| 39
| 0.740741
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.4
| 0
| 0
| 0
| 0
| null | 1
| 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
|
a7750daea4c56fb89e28091a52cf36c9f50a86d4
| 87
|
py
|
Python
|
problem/10000~19999/16785/16785.py3.py
|
njw1204/BOJ-AC
|
1de41685725ae4657a7ff94e413febd97a888567
|
[
"MIT"
] | 1
|
2019-04-19T16:37:44.000Z
|
2019-04-19T16:37:44.000Z
|
problem/10000~19999/16785/16785.py3.py
|
njw1204/BOJ-AC
|
1de41685725ae4657a7ff94e413febd97a888567
|
[
"MIT"
] | 1
|
2019-04-20T11:42:44.000Z
|
2019-04-20T11:42:44.000Z
|
problem/10000~19999/16785/16785.py3.py
|
njw1204/BOJ-AC
|
1de41685725ae4657a7ff94e413febd97a888567
|
[
"MIT"
] | 3
|
2019-04-19T16:37:47.000Z
|
2021-10-25T00:45:00.000Z
|
a,b,c=map(int,input().split())
x,d=0,0
while x<c:
d+=1
x+=a
if d%7==0: x+=b
print(d)
| 12.428571
| 30
| 0.54023
| 26
| 87
| 1.807692
| 0.576923
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0.137931
| 87
| 7
| 31
| 12.428571
| 0.56
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.142857
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a792ebcbea6171f9d89c9265e5ad6e18bf5cd254
| 203
|
py
|
Python
|
python/test.py
|
owulveryck/min-char-rnn
|
f670fa34652f47503fb760b0476f9c10910cbd7c
|
[
"MIT"
] | 6
|
2017-10-31T08:15:59.000Z
|
2019-03-08T03:19:08.000Z
|
python/test.py
|
owulveryck/min-char-rnn
|
f670fa34652f47503fb760b0476f9c10910cbd7c
|
[
"MIT"
] | 1
|
2017-11-16T20:40:59.000Z
|
2017-11-22T13:52:49.000Z
|
python/test.py
|
owulveryck/min-char-rnn
|
f670fa34652f47503fb760b0476f9c10910cbd7c
|
[
"MIT"
] | 4
|
2017-11-14T03:28:04.000Z
|
2021-05-19T12:51:14.000Z
|
aa=11
b = 0
for a, b, c in zip([aa,12,13,14,15],
[21,22,23,24,25],
[31,32,33,34,35]):
a += 1
print "a: %s" % a
print "b: %s" % b
print "c: %s" % c
print aa
| 16.916667
| 37
| 0.394089
| 41
| 203
| 1.95122
| 0.634146
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.258065
| 0.389163
| 203
| 11
| 38
| 18.454545
| 0.387097
| 0
| 0
| 0
| 0
| 0
| 0.073892
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.4
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a7bf184863067f4c10bd21dcbea20fa28b2c25c1
| 17
|
py
|
Python
|
data/studio21_generated/introductory/4069/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4069/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
data/studio21_generated/introductory/4069/starter_code.py
|
vijaykumawat256/Prompt-Summarization
|
614f5911e2acd2933440d909de2b4f86653dc214
|
[
"Apache-2.0"
] | null | null | null |
def nth_fib(n):
| 8.5
| 15
| 0.647059
| 4
| 17
| 2.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 17
| 2
| 16
| 8.5
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ba72fe0226b809225b2480287a9e48f2d43f5f9
| 3,286
|
py
|
Python
|
NiaPy/tests/test_gso.py
|
tuahk/NiaPy
|
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
|
[
"MIT"
] | null | null | null |
NiaPy/tests/test_gso.py
|
tuahk/NiaPy
|
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
|
[
"MIT"
] | null | null | null |
NiaPy/tests/test_gso.py
|
tuahk/NiaPy
|
c863d801fda8e1949a3ca716a4de7c7ca3d0ea16
|
[
"MIT"
] | null | null | null |
# encoding=utf8
# pylint: disable=mixed-indentation, multiple-statements, old-style-class
from unittest import TestCase
from NiaPy.benchmarks.griewank import Griewank
from NiaPy.algorithms.basic import GlowwormSwarmOptimization, GlowwormSwarmOptimizationV1, GlowwormSwarmOptimizationV2, GlowwormSwarmOptimizationV3
class MyBenchmark:
def __init__(self):
self.Lower = -5.12
self.Upper = 5.12
@classmethod
def function(cls):
def evaluate(D, sol):
val = 0.0
for i in range(D): val = val + sol[i] * sol[i]
return val
return evaluate
class GSOTestCase(TestCase):
def setUp(self):
self.D = 40
self.gso_custom = GlowwormSwarmOptimization(D=self.D, nFES=1000, NP=35, a=7, Rmin=0.1, Rmax=3, benchmark=MyBenchmark())
self.gso_griewank = GlowwormSwarmOptimization(D=self.D, nFES=1000, NP=10, a=5, Rmin=0.01, Rmax=3, benchmark=Griewank())
def test_custom_works_fine(self):
fun = MyBenchmark().function()
x = self.gso_custom.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
def test_griewank_works_fine(self):
fun = Griewank().function()
x = self.gso_griewank.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
class GSOv1TestCase(TestCase):
def setUp(self):
self.D = 40
self.gso_custom = GlowwormSwarmOptimizationV1(D=self.D, nFES=1000, NP=35, a=7, Rmin=0.1, Rmax=3, benchmark=MyBenchmark())
self.gso_griewank = GlowwormSwarmOptimizationV1(D=self.D, nFES=1000, NP=10, a=5, Rmin=0.01, Rmax=3, benchmark=Griewank())
def test_custom_works_fine(self):
fun = MyBenchmark().function()
x = self.gso_custom.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
def test_griewank_works_fine(self):
fun = Griewank().function()
x = self.gso_griewank.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
class GSOv2TestCase(TestCase):
def setUp(self):
self.D = 40
self.gso_custom = GlowwormSwarmOptimizationV2(D=self.D, nFES=1000, NP=35, a=7, Rmin=0.1, Rmax=3, benchmark=MyBenchmark())
self.gso_griewank = GlowwormSwarmOptimizationV2(D=self.D, nFES=1000, NP=10, a=5, Rmin=0.01, Rmax=3, benchmark=Griewank())
def test_custom_works_fine(self):
fun = MyBenchmark().function()
x = self.gso_custom.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
def test_griewank_works_fine(self):
fun = Griewank().function()
x = self.gso_griewank.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
class GSOv3TestCase(TestCase):
def setUp(self):
self.D = 40
self.gso_custom = GlowwormSwarmOptimizationV3(D=self.D, nFES=1000, NP=35, a=7, Rmin=0.1, Rmax=3, benchmark=MyBenchmark())
self.gso_griewank = GlowwormSwarmOptimizationV3(D=self.D, nFES=1000, NP=10, a=5, Rmin=0.01, Rmax=3, benchmark=Griewank())
def test_custom_works_fine(self):
fun = MyBenchmark().function()
x = self.gso_custom.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
def test_griewank_works_fine(self):
fun = Griewank().function()
x = self.gso_griewank.run()
self.assertTrue(x)
self.assertAlmostEqual(fun(self.D, x[0]), x[1], delta=1e2)
# vim: tabstop=3 noexpandtab shiftwidth=3 softtabstop=3
| 35.333333
| 147
| 0.725198
| 497
| 3,286
| 4.706237
| 0.162978
| 0.042753
| 0.044463
| 0.034203
| 0.777683
| 0.777683
| 0.777683
| 0.687046
| 0.687046
| 0.687046
| 0
| 0.0513
| 0.122033
| 3,286
| 92
| 148
| 35.717391
| 0.759445
| 0.042301
| 0
| 0.648649
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.216216
| 1
| 0.202703
| false
| 0
| 0.040541
| 0
| 0.337838
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3ba8c17069da6c6ac25934ca5ccbdc53b25d4532
| 135
|
py
|
Python
|
Sem-5/PIP/Minor Assignment 8/A8Q3.py
|
rituraj-iter/ASSIGNMENTS
|
f317a2990bac43202314320d6d97356498c44603
|
[
"MIT"
] | 10
|
2021-04-24T11:46:48.000Z
|
2022-01-17T05:14:37.000Z
|
Sem-5/PIP/Minor Assignment 8/A8Q3.py
|
rituraj-iter/ASSIGNMENTS
|
f317a2990bac43202314320d6d97356498c44603
|
[
"MIT"
] | 2
|
2021-06-28T11:51:50.000Z
|
2021-11-01T08:21:53.000Z
|
Sem-5/PIP/Minor Assignment 8/A8Q3.py
|
rituraj-iter/ASSIGNMENTS
|
f317a2990bac43202314320d6d97356498c44603
|
[
"MIT"
] | 16
|
2021-04-24T11:46:58.000Z
|
2022-03-02T05:08:19.000Z
|
def power(n, m):
if m == 0:
return 1
elif m == 1:
return n
return (n*power(n, m-1))
print(power(2,3))
| 19.285714
| 29
| 0.451852
| 24
| 135
| 2.541667
| 0.5
| 0.196721
| 0.229508
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072289
| 0.385185
| 135
| 7
| 30
| 19.285714
| 0.662651
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0
| 0
| 0
| 0.571429
| 0.142857
| 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
|
3bb201ba87668c38866b9c772d1c623c95de077e
| 41
|
py
|
Python
|
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/M/Mo x unit.py
|
kuanpern/jupyterlab-snippets-multimenus
|
477f51cfdbad7409eab45abe53cf774cd70f380c
|
[
"BSD-3-Clause"
] | null | null | null |
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/M/Mo x unit.py
|
kuanpern/jupyterlab-snippets-multimenus
|
477f51cfdbad7409eab45abe53cf774cd70f380c
|
[
"BSD-3-Clause"
] | null | null | null |
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/M/Mo x unit.py
|
kuanpern/jupyterlab-snippets-multimenus
|
477f51cfdbad7409eab45abe53cf774cd70f380c
|
[
"BSD-3-Clause"
] | 1
|
2021-02-04T04:51:48.000Z
|
2021-02-04T04:51:48.000Z
|
constants.physical_constants["Mo x unit"]
| 41
| 41
| 0.829268
| 6
| 41
| 5.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.04878
| 41
| 1
| 41
| 41
| 0.846154
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 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
|
3bc8db3153b699fb32d56df66a761aa9e82f28de
| 139
|
py
|
Python
|
soap-client.py
|
assulthoni/soap-rest
|
f5ca9e6663219e8aa7580008305c8958bb1b0e61
|
[
"MIT"
] | null | null | null |
soap-client.py
|
assulthoni/soap-rest
|
f5ca9e6663219e8aa7580008305c8958bb1b0e61
|
[
"MIT"
] | null | null | null |
soap-client.py
|
assulthoni/soap-rest
|
f5ca9e6663219e8aa7580008305c8958bb1b0e61
|
[
"MIT"
] | null | null | null |
from suds.client import Client
hello_client = Client('http://localhost:7789/?wsdl')
print(type(hello_client.service.say_hello("Obing", 5)))
| 46.333333
| 55
| 0.776978
| 21
| 139
| 5
| 0.714286
| 0.209524
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.038168
| 0.057554
| 139
| 3
| 55
| 46.333333
| 0.763359
| 0
| 0
| 0
| 0
| 0
| 0.228571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 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
|
3be39808594a7be233f7975045f2245648623f0b
| 1,242
|
py
|
Python
|
Code/RenderPasses/AntialiasingFXAAPass.py
|
croxis/RenderPipeline
|
43482c03a835dd620e6d45b08e56fa5679742482
|
[
"WTFPL"
] | null | null | null |
Code/RenderPasses/AntialiasingFXAAPass.py
|
croxis/RenderPipeline
|
43482c03a835dd620e6d45b08e56fa5679742482
|
[
"WTFPL"
] | null | null | null |
Code/RenderPasses/AntialiasingFXAAPass.py
|
croxis/RenderPipeline
|
43482c03a835dd620e6d45b08e56fa5679742482
|
[
"WTFPL"
] | null | null | null |
from panda3d.core import NodePath, Shader, LVecBase2i, Texture, PTAFloat, Vec4
from ..Globals import Globals
from ..RenderPass import RenderPass
from ..RenderTarget import RenderTarget
class AntialiasingFXAAPass(RenderPass):
""" This render pass takes the scene color texture as input and performs
antialiasing. The result is an antialiased scene texture which can be
processed further.
This pass uses FXAA 3.11 by nvidia."""
def __init__(self):
RenderPass.__init__(self)
def getID(self):
return "AntialiasingPass"
def getRequiredInputs(self):
return {
"colorTex": ["TransparencyPass.resultTex", "LightingPass.resultTex"]
}
def create(self):
self.target = RenderTarget("Antialiasing FXAA")
self.target.addColorTexture()
self.target.prepareOffscreenBuffer()
def setShaders(self):
shader = Shader.load(Shader.SLGLSL,
"Shader/DefaultPostProcess.vertex",
"Shader/Antialiasing/FXAA/FXAA3.fragment")
self.target.setShader(shader)
return [shader]
def getOutputs(self):
return {
"AntialiasingPass.resultTex": lambda: self.target.getColorTexture(),
}
| 27
| 80
| 0.671498
| 124
| 1,242
| 6.66129
| 0.548387
| 0.060533
| 0.062954
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007407
| 0.23913
| 1,242
| 45
| 81
| 27.6
| 0.866667
| 0.157005
| 0
| 0.074074
| 0
| 0
| 0.181287
| 0.141326
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0.222222
| 0.148148
| 0.111111
| 0.555556
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
ce015416834750770d8b18e7f7913e90a77c627f
| 3,664
|
py
|
Python
|
sqds/migrations/0014_auto_20190819_1858.py
|
abey79/sqds
|
acab1d9c6d4a010fff9d8e89a5fdd9d94def7c89
|
[
"MIT"
] | null | null | null |
sqds/migrations/0014_auto_20190819_1858.py
|
abey79/sqds
|
acab1d9c6d4a010fff9d8e89a5fdd9d94def7c89
|
[
"MIT"
] | null | null | null |
sqds/migrations/0014_auto_20190819_1858.py
|
abey79/sqds
|
acab1d9c6d4a010fff9d8e89a5fdd9d94def7c89
|
[
"MIT"
] | null | null | null |
# Generated by Django 2.2.2 on 2019-08-19 18:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sqds', '0013_auto_20190701_0932'),
]
operations = [
migrations.AlterModelOptions(
name='category',
options={'verbose_name_plural': 'Categories'},
),
migrations.AlterModelOptions(
name='guild',
options={},
),
migrations.AlterModelOptions(
name='player',
options={},
),
migrations.AlterModelOptions(
name='playerunit',
options={},
),
migrations.AlterModelOptions(
name='unit',
options={},
),
migrations.AddField(
model_name='mod',
name='accuracy_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='critical_avoidance_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='critical_chance_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='critical_damage_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='defense_percent_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='defense_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='health_percent_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='health_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='offense_percent_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='offense_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='potency_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='primary_stat',
field=models.CharField(choices=[('OF', 'offense_percent'), ('DE', 'defense_percent'), ('PR', 'protection_percent'), ('HP', 'health_percent'), ('SP', 'speed'), ('AC', 'accuracy'), ('CA', 'critical_avoidance'), ('CC', 'critical_chance'), ('CD', 'critical_damage'), ('PO', 'potency'), ('TE', 'tenacity')], db_index=True, default='OF', max_length=50),
),
migrations.AddField(
model_name='mod',
name='protection_percent_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='protection_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='speed_roll',
field=models.SmallIntegerField(default=0),
),
migrations.AddField(
model_name='mod',
name='tenacity_roll',
field=models.SmallIntegerField(default=0),
),
]
| 32.140351
| 359
| 0.539574
| 309
| 3,664
| 6.226537
| 0.245955
| 0.149688
| 0.191268
| 0.224532
| 0.652807
| 0.652807
| 0.614345
| 0.586279
| 0.586279
| 0.586279
| 0
| 0.019568
| 0.330513
| 3,664
| 113
| 360
| 32.424779
| 0.764778
| 0.012282
| 0
| 0.719626
| 1
| 0
| 0.153166
| 0.019077
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.009346
| 0
| 0.037383
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ce0ad5b35e1b42bfa0bcad6f9d7b8820da2685c0
| 74
|
py
|
Python
|
gearbox_py/common/__init__.py
|
sColin16/gearbox_py
|
e9c8fb8a07c9342f15e0d0df0a746b6fb3de8dfc
|
[
"MIT"
] | null | null | null |
gearbox_py/common/__init__.py
|
sColin16/gearbox_py
|
e9c8fb8a07c9342f15e0d0df0a746b6fb3de8dfc
|
[
"MIT"
] | null | null | null |
gearbox_py/common/__init__.py
|
sColin16/gearbox_py
|
e9c8fb8a07c9342f15e0d0df0a746b6fb3de8dfc
|
[
"MIT"
] | null | null | null |
"""Implementations of the core classes leverage by multiple use-cases."""
| 37
| 73
| 0.77027
| 10
| 74
| 5.7
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121622
| 74
| 1
| 74
| 74
| 0.876923
| 0.905405
| 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
|
0207113e609b01a1d2c2da9d0a9c7c723e8307e4
| 90
|
py
|
Python
|
python/49.group-anagrams.py
|
stavanmehta/leetcode
|
1224e43ce29430c840e65daae3b343182e24709c
|
[
"Apache-2.0"
] | null | null | null |
python/49.group-anagrams.py
|
stavanmehta/leetcode
|
1224e43ce29430c840e65daae3b343182e24709c
|
[
"Apache-2.0"
] | null | null | null |
python/49.group-anagrams.py
|
stavanmehta/leetcode
|
1224e43ce29430c840e65daae3b343182e24709c
|
[
"Apache-2.0"
] | null | null | null |
class Solution:
def groupAnagrams(self, strs: List[str]) -> List[List[str]]:
| 22.5
| 64
| 0.611111
| 11
| 90
| 5
| 0.727273
| 0.254545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233333
| 90
| 3
| 65
| 30
| 0.797101
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
020c88a966ca2d983ea639961390648ac15a12ab
| 161
|
py
|
Python
|
setup.py
|
Rosuav/libtcodpy
|
7d76cac7cd3e6930f09558c6735ef44859ebb4e3
|
[
"Unlicense"
] | 3
|
2018-03-14T23:48:00.000Z
|
2019-02-15T17:50:21.000Z
|
setup.py
|
Rosuav/libtcodpy
|
7d76cac7cd3e6930f09558c6735ef44859ebb4e3
|
[
"Unlicense"
] | null | null | null |
setup.py
|
Rosuav/libtcodpy
|
7d76cac7cd3e6930f09558c6735ef44859ebb4e3
|
[
"Unlicense"
] | null | null | null |
from distutils.core import setup
from Cython.Build import cythonize
setup(
name = 'Python 3 bindings for libtcod',
ext_modules = cythonize("libtcodpy.pyx"),
)
| 23
| 42
| 0.770186
| 22
| 161
| 5.590909
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007194
| 0.136646
| 161
| 7
| 43
| 23
| 0.877698
| 0
| 0
| 0
| 0
| 0
| 0.259259
| 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
|
02455e9375c60d5e1ec222d69da6de44497ef2be
| 148
|
py
|
Python
|
Vincent/before meeting DT/pattern_minerals_REE/Experiment5.py
|
Vincentyao1995/Globalink2017-UBC
|
9b8ed92784d0f808c12863ffc29f261d247ea14e
|
[
"MIT"
] | null | null | null |
Vincent/before meeting DT/pattern_minerals_REE/Experiment5.py
|
Vincentyao1995/Globalink2017-UBC
|
9b8ed92784d0f808c12863ffc29f261d247ea14e
|
[
"MIT"
] | null | null | null |
Vincent/before meeting DT/pattern_minerals_REE/Experiment5.py
|
Vincentyao1995/Globalink2017-UBC
|
9b8ed92784d0f808c12863ffc29f261d247ea14e
|
[
"MIT"
] | null | null | null |
import proxy_depth as proxy
#kaolinite: 1350-1500, 2050-2250
proxy.output_proxy(fileOutName = 'kaolinite_proxy_band12.txt', bands = [[1350,1500]])
| 37
| 85
| 0.777027
| 22
| 148
| 5.090909
| 0.681818
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192593
| 0.087838
| 148
| 4
| 85
| 37
| 0.62963
| 0.209459
| 0
| 0
| 0
| 0
| 0.224138
| 0.224138
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
5a0bc1db8d2a9d8b45494c86ab4c9b1a5a0de528
| 247
|
py
|
Python
|
osbot_jupyter/lambdas/browser.py
|
pbx-gs/OSBot-Jupyter
|
4c05384c46b6ba818a6856bf016b829b737cd72c
|
[
"Apache-2.0"
] | null | null | null |
osbot_jupyter/lambdas/browser.py
|
pbx-gs/OSBot-Jupyter
|
4c05384c46b6ba818a6856bf016b829b737cd72c
|
[
"Apache-2.0"
] | 2
|
2020-02-02T18:27:23.000Z
|
2020-02-02T18:49:24.000Z
|
osbot_jupyter/lambdas/browser.py
|
pbx-gs/OSBot-Jupyter
|
4c05384c46b6ba818a6856bf016b829b737cd72c
|
[
"Apache-2.0"
] | 2
|
2019-12-15T23:36:37.000Z
|
2020-03-23T11:22:03.000Z
|
def run(event, context):
url = event.get('url')
if url:
from osbot_browser.browser.Browser_Lamdba_Helper import Browser_Lamdba_Helper
browser = Browser_Lamdba_Helper().setup()
return browser.get_screenshot_png(url)
| 35.285714
| 85
| 0.712551
| 32
| 247
| 5.21875
| 0.53125
| 0.251497
| 0.341317
| 0.311377
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.198381
| 247
| 6
| 86
| 41.166667
| 0.843434
| 0
| 0
| 0
| 0
| 0
| 0.012146
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.166667
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 1
| 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
|
5a358cd380a0daf4c114dd2df64638035102ef50
| 103
|
py
|
Python
|
exception_convenience/__init__.py
|
ThoenigAdrian/exception_convenience
|
6cda46135ac3892017f83b3b4a9ed53c165918fe
|
[
"MIT"
] | null | null | null |
exception_convenience/__init__.py
|
ThoenigAdrian/exception_convenience
|
6cda46135ac3892017f83b3b4a9ed53c165918fe
|
[
"MIT"
] | null | null | null |
exception_convenience/__init__.py
|
ThoenigAdrian/exception_convenience
|
6cda46135ac3892017f83b3b4a9ed53c165918fe
|
[
"MIT"
] | null | null | null |
standard_exceptions = (ArithmeticError, AttributeError, LookupError, NameError, TypeError, ValueError)
| 51.5
| 102
| 0.84466
| 8
| 103
| 10.75
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.07767
| 103
| 1
| 103
| 103
| 0.905263
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5a437978a7de43a51b936e27582f57289c673306
| 197
|
py
|
Python
|
tests/test_tree.py
|
warrenspe/bst
|
1656a1d2e45b404db0056f415084cef9f1e672d9
|
[
"MIT"
] | null | null | null |
tests/test_tree.py
|
warrenspe/bst
|
1656a1d2e45b404db0056f415084cef9f1e672d9
|
[
"MIT"
] | null | null | null |
tests/test_tree.py
|
warrenspe/bst
|
1656a1d2e45b404db0056f415084cef9f1e672d9
|
[
"MIT"
] | null | null | null |
# Project imports
import _testCase
class TestTree(_testCase.BSTTestCase):
"""
Tests generic-tree specific functionality of the bst library.
"""
def test_count(self):
pass
| 17.909091
| 65
| 0.685279
| 22
| 197
| 6
| 0.954545
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.233503
| 197
| 10
| 66
| 19.7
| 0.874172
| 0.395939
| 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
| 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
|
5a58200e1de0d67f21eb96f05caf9a6c51fa7daa
| 68
|
py
|
Python
|
Scripts/core/__init__.py
|
tsziming/TelegramBotBoilerplate
|
0ef528107a4f2e3e80c1b140ef9fd1d7cefbfae1
|
[
"MIT"
] | null | null | null |
Scripts/core/__init__.py
|
tsziming/TelegramBotBoilerplate
|
0ef528107a4f2e3e80c1b140ef9fd1d7cefbfae1
|
[
"MIT"
] | null | null | null |
Scripts/core/__init__.py
|
tsziming/TelegramBotBoilerplate
|
0ef528107a4f2e3e80c1b140ef9fd1d7cefbfae1
|
[
"MIT"
] | null | null | null |
"""Core package is a couple of helper-modules for other scripts."""
| 34
| 67
| 0.735294
| 11
| 68
| 4.545455
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 68
| 1
| 68
| 68
| 0.862069
| 0.897059
| 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
|
5a8a6b60d09016f2667238f3e0e957e2d12d5b01
| 443
|
py
|
Python
|
31_pycharm/PageSpider/tests/utilities/test_url_utilities.py
|
bluehenry/python.best.practices
|
99fde3557b0c423d3050e988e82a641ccd75b644
|
[
"MIT"
] | null | null | null |
31_pycharm/PageSpider/tests/utilities/test_url_utilities.py
|
bluehenry/python.best.practices
|
99fde3557b0c423d3050e988e82a641ccd75b644
|
[
"MIT"
] | null | null | null |
31_pycharm/PageSpider/tests/utilities/test_url_utilities.py
|
bluehenry/python.best.practices
|
99fde3557b0c423d3050e988e82a641ccd75b644
|
[
"MIT"
] | null | null | null |
import unittest
from utilities.url_utilities import load_urls_from_file
#
# def test_load_file():
# test_urls = load_urls_from_file("input.txt")
# assert (len(test_urls) > 1)
class UrlUtilitiesTest(unittest.TestCase):
def setUp(self) -> None:
pass
def tearDown(self) -> None:
pass
def test_load_file(self):
test_urls = load_urls_from_file("../../input.txt")
assert (len(test_urls) > 1)
| 22.15
| 58
| 0.6614
| 60
| 443
| 4.583333
| 0.383333
| 0.116364
| 0.130909
| 0.174545
| 0.363636
| 0.363636
| 0.363636
| 0.363636
| 0.363636
| 0.363636
| 0
| 0.00578
| 0.218962
| 443
| 19
| 59
| 23.315789
| 0.789017
| 0.230248
| 0
| 0.2
| 0
| 0
| 0.044643
| 0
| 0
| 0
| 0
| 0
| 0.1
| 1
| 0.3
| false
| 0.2
| 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
|
ce4f87a6fe140bc14abe3aadad135c517cb5249b
| 230
|
py
|
Python
|
src/baselines/__init__.py
|
abelrguezr/Deep-SAD-PyTorch
|
268ca21570a4a8dadc331a9dbf26ccade36ae5d9
|
[
"MIT"
] | null | null | null |
src/baselines/__init__.py
|
abelrguezr/Deep-SAD-PyTorch
|
268ca21570a4a8dadc331a9dbf26ccade36ae5d9
|
[
"MIT"
] | null | null | null |
src/baselines/__init__.py
|
abelrguezr/Deep-SAD-PyTorch
|
268ca21570a4a8dadc331a9dbf26ccade36ae5d9
|
[
"MIT"
] | null | null | null |
from .SemiDGM import SemiDeepGenerativeModel
from .ocsvm import OCSVM
from .kde import KDE
from .isoforest import IsoForest
from .ssad import SSAD
from .shallow_ssad.ssad_convex import ConvexSSAD
from .supervised import Supervised
| 32.857143
| 48
| 0.847826
| 31
| 230
| 6.225806
| 0.387097
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117391
| 230
| 7
| 49
| 32.857143
| 0.950739
| 0
| 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
|
ce52b3fdabb3ea10dfa145a822b277c8bdcfa783
| 60
|
py
|
Python
|
sql_to_python.py
|
Huelife/sql_to_python
|
b37056089b9baa52334f8c0ce8cc4a37b2668bf8
|
[
"MIT"
] | null | null | null |
sql_to_python.py
|
Huelife/sql_to_python
|
b37056089b9baa52334f8c0ce8cc4a37b2668bf8
|
[
"MIT"
] | null | null | null |
sql_to_python.py
|
Huelife/sql_to_python
|
b37056089b9baa52334f8c0ce8cc4a37b2668bf8
|
[
"MIT"
] | null | null | null |
#sql_to_python: Simple module using Python to pull SQL data
| 30
| 59
| 0.816667
| 11
| 60
| 4.272727
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 60
| 1
| 60
| 60
| 0.921569
| 0.966667
| 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
|
cea0f9897904c0747353fdd34e561bb7b58d3c41
| 218
|
py
|
Python
|
eahub/feedback/views.py
|
walambert/eahub.org
|
21b6111b2626e4739c249d0881d16fbc818094cb
|
[
"MIT"
] | 36
|
2019-02-22T23:07:14.000Z
|
2022-02-10T13:24:27.000Z
|
eahub/feedback/views.py
|
walambert/eahub.org
|
21b6111b2626e4739c249d0881d16fbc818094cb
|
[
"MIT"
] | 717
|
2019-02-21T22:07:55.000Z
|
2022-02-26T15:17:49.000Z
|
eahub/feedback/views.py
|
walambert/eahub.org
|
21b6111b2626e4739c249d0881d16fbc818094cb
|
[
"MIT"
] | 19
|
2019-04-14T14:37:56.000Z
|
2022-02-14T22:05:16.000Z
|
from django.views.generic.edit import CreateView
from eahub.feedback.models import Feedback
class FeedbackCreate(CreateView):
model = Feedback
fields = ["message", "email", "page_url"]
success_url = "/"
| 21.8
| 48
| 0.724771
| 25
| 218
| 6.24
| 0.76
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.165138
| 218
| 9
| 49
| 24.222222
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0.09633
| 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
|
ced04890abb5cdc8ccb43445f302a4550f818ba6
| 276
|
py
|
Python
|
main.py
|
RinLinux/scrapy-practice
|
2de67f024a8466fb3705ad6f785554e614d1714d
|
[
"MIT"
] | null | null | null |
main.py
|
RinLinux/scrapy-practice
|
2de67f024a8466fb3705ad6f785554e614d1714d
|
[
"MIT"
] | null | null | null |
main.py
|
RinLinux/scrapy-practice
|
2de67f024a8466fb3705ad6f785554e614d1714d
|
[
"MIT"
] | null | null | null |
# encoding: utf-8
"""
time: 2019/03/16/01/36
function: 用来启动爬虫项目
"""
from scrapy.cmdline import execute
import sys
import os
print(os.path.dirname(os.path.abspath("__file__")))
sys.path.append(os.path.dirname(os.path.abspath("__file__")))
# execute(['scrapy', 'crawl', ''])
| 18.4
| 61
| 0.706522
| 41
| 276
| 4.560976
| 0.609756
| 0.128342
| 0.139037
| 0.160428
| 0.320856
| 0.320856
| 0.320856
| 0
| 0
| 0
| 0
| 0.052
| 0.094203
| 276
| 14
| 62
| 19.714286
| 0.696
| 0.32971
| 0
| 0
| 0
| 0
| 0.090909
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0.2
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
0c763d2596bf90a4f57e4553db57674d4471e2b1
| 263
|
py
|
Python
|
src/sage/combinat/species/all.py
|
bopopescu/sage
|
2d495be78e0bdc7a0a635454290b27bb4f5f70f0
|
[
"BSL-1.0"
] | 4
|
2020-07-17T04:49:44.000Z
|
2020-07-29T06:33:51.000Z
|
src/sage/combinat/species/all.py
|
Ivo-Maffei/sage
|
467fbc70a08b552b3de33d9065204ee9cbfb02c7
|
[
"BSL-1.0"
] | 2
|
2018-10-30T13:40:20.000Z
|
2020-07-23T12:13:30.000Z
|
src/sage/combinat/species/all.py
|
dimpase/sage
|
468f23815ade42a2192b0a9cd378de8fdc594dcd
|
[
"BSL-1.0"
] | 7
|
2021-11-08T10:01:59.000Z
|
2022-03-03T11:25:52.000Z
|
r"""
Combinatorial species features that are imported by default in the interpreter namespace
"""
from __future__ import absolute_import
from .series import LazyPowerSeriesRing
from .recursive_species import CombinatorialSpecies
from . import library as species
| 29.222222
| 88
| 0.840304
| 32
| 263
| 6.71875
| 0.71875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125475
| 263
| 8
| 89
| 32.875
| 0.934783
| 0.334601
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.8
| 0
| 0.8
| 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
|
0c80d955fc66f7898808ade383d256bb75b7566f
| 132
|
py
|
Python
|
entrypoints/plugins/abc.py
|
sdruskat/poetry-entrypoints
|
1eff9333600a894acff2a49b9127e9501e0fa056
|
[
"MIT"
] | null | null | null |
entrypoints/plugins/abc.py
|
sdruskat/poetry-entrypoints
|
1eff9333600a894acff2a49b9127e9501e0fa056
|
[
"MIT"
] | null | null | null |
entrypoints/plugins/abc.py
|
sdruskat/poetry-entrypoints
|
1eff9333600a894acff2a49b9127e9501e0fa056
|
[
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class AbstractPlugin(ABC):
@staticmethod
@abstractmethod
def run():
pass
| 13.2
| 35
| 0.666667
| 13
| 132
| 6.769231
| 0.769231
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.265152
| 132
| 9
| 36
| 14.666667
| 0.907216
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0.166667
| 0.166667
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
0c9a726401a62d7a6930d9b371ea0eb080c6ae1d
| 768
|
py
|
Python
|
plugins/k8s/test/test_args.py
|
MrMarvin/cloudkeeper
|
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
|
[
"Apache-2.0"
] | 316
|
2021-07-08T12:54:19.000Z
|
2022-01-12T18:50:17.000Z
|
plugins/k8s/test/test_args.py
|
MrMarvin/cloudkeeper
|
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
|
[
"Apache-2.0"
] | 80
|
2021-07-30T23:55:50.000Z
|
2022-01-12T15:39:31.000Z
|
plugins/k8s/test/test_args.py
|
MrMarvin/cloudkeeper
|
cdca21c1a3b945da6e53a5dbb37a437e1d46f557
|
[
"Apache-2.0"
] | 14
|
2021-08-23T08:29:29.000Z
|
2022-01-08T04:42:28.000Z
|
from resotolib.args import get_arg_parser, ArgumentParser
from resoto_plugin_k8s import KubernetesCollectorPlugin
def test_args():
arg_parser = get_arg_parser()
KubernetesCollectorPlugin.add_args(arg_parser)
arg_parser.parse_args()
assert len(ArgumentParser.args.k8s_context) == 0
assert ArgumentParser.args.k8s_config is None
assert len(ArgumentParser.args.k8s_cluster) == 0
assert len(ArgumentParser.args.k8s_apiserver) == 0
assert len(ArgumentParser.args.k8s_token) == 0
assert len(ArgumentParser.args.k8s_cacert) == 0
assert len(ArgumentParser.args.k8s_collect) == 0
assert len(ArgumentParser.args.k8s_no_collect) == 0
assert ArgumentParser.args.k8s_pool_size == 5
assert ArgumentParser.args.k8s_fork is False
| 40.421053
| 57
| 0.773438
| 102
| 768
| 5.588235
| 0.333333
| 0.315789
| 0.368421
| 0.331579
| 0.475439
| 0.27193
| 0
| 0
| 0
| 0
| 0
| 0.028875
| 0.143229
| 768
| 18
| 58
| 42.666667
| 0.837386
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.625
| 1
| 0.0625
| false
| 0
| 0.125
| 0
| 0.1875
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0cfbbe178758bada7e5c6a16406bf938b1f6322c
| 209
|
py
|
Python
|
paa191t1/tests/dijkstra/datastructs/test_dijkstra_structs_vector.py
|
dmmoura/PAA-2021
|
435005f6494ece76f03807fb524e0d4a3e1d7222
|
[
"Apache-2.0"
] | null | null | null |
paa191t1/tests/dijkstra/datastructs/test_dijkstra_structs_vector.py
|
dmmoura/PAA-2021
|
435005f6494ece76f03807fb524e0d4a3e1d7222
|
[
"Apache-2.0"
] | null | null | null |
paa191t1/tests/dijkstra/datastructs/test_dijkstra_structs_vector.py
|
dmmoura/PAA-2021
|
435005f6494ece76f03807fb524e0d4a3e1d7222
|
[
"Apache-2.0"
] | null | null | null |
from paa191t1.dijkstra.datastructs.vector import Vector
from paa191t1.tests.dijkstra.datastructs.test_dijkstra_structs import TestStructsBase
class TestStructsVector(TestStructsBase):
struct = Vector()
| 26.125
| 85
| 0.842105
| 22
| 209
| 7.909091
| 0.590909
| 0.137931
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.042328
| 0.095694
| 209
| 7
| 86
| 29.857143
| 0.878307
| 0
| 0
| 0
| 0
| 0
| 0
| 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
|
0b3fdc705af4b2ad5dc4077043f33a03be6cd25f
| 205
|
py
|
Python
|
jskparser/ast/expr/markerannotationexpr.py
|
natebragg/java-sketch
|
f5ac26f2cc46ae4556f9a61c55afd37f55c961ff
|
[
"MIT"
] | 15
|
2015-12-15T18:33:50.000Z
|
2021-09-29T11:48:54.000Z
|
jskparser/ast/expr/markerannotationexpr.py
|
natebragg/java-sketch
|
f5ac26f2cc46ae4556f9a61c55afd37f55c961ff
|
[
"MIT"
] | 11
|
2015-11-16T22:14:58.000Z
|
2021-09-23T05:28:40.000Z
|
jskparser/ast/expr/markerannotationexpr.py
|
natebragg/java-sketch
|
f5ac26f2cc46ae4556f9a61c55afd37f55c961ff
|
[
"MIT"
] | 8
|
2015-11-16T21:50:08.000Z
|
2021-03-23T15:15:34.000Z
|
#!/usr/bin/env python
from .annotationexpr import AnnotationExpr
class MarkerAnnotationExpr(AnnotationExpr):
def __init__(self, kwargs={}):
super(MarkerAnnotationExpr, self).__init__(kwargs)
| 25.625
| 58
| 0.760976
| 20
| 205
| 7.4
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.131707
| 205
| 7
| 59
| 29.285714
| 0.831461
| 0.097561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 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
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
0b557a31423a3801199f5221d8857429bb314bb9
| 177
|
py
|
Python
|
cyder/cydns/soa/forms.py
|
ngokevin/chili
|
36c354ac567471d5e36dccf9eea5096c6b02d4b9
|
[
"BSD-3-Clause"
] | 2
|
2019-03-16T00:47:09.000Z
|
2022-03-04T14:39:08.000Z
|
cyder/cydns/soa/forms.py
|
ngokevin/chili
|
36c354ac567471d5e36dccf9eea5096c6b02d4b9
|
[
"BSD-3-Clause"
] | 1
|
2020-04-24T08:24:55.000Z
|
2020-04-24T08:24:55.000Z
|
cyder/cydns/soa/forms.py
|
ngokevin/chili
|
36c354ac567471d5e36dccf9eea5096c6b02d4b9
|
[
"BSD-3-Clause"
] | null | null | null |
from django.forms import ModelForm
from cyder.cydns.soa.models import SOA
class SOAForm(ModelForm):
class Meta:
model = SOA
exclude = ('serial', 'dirty',)
| 19.666667
| 38
| 0.666667
| 22
| 177
| 5.363636
| 0.727273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.231638
| 177
| 8
| 39
| 22.125
| 0.867647
| 0
| 0
| 0
| 0
| 0
| 0.062147
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 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
|
0b7eb623f3d72f6821630db426fccae094b9daba
| 585
|
py
|
Python
|
plugins/mimecast/komand_mimecast/actions/__init__.py
|
lukaszlaszuk/insightconnect-plugins
|
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
|
[
"MIT"
] | 46
|
2019-06-05T20:47:58.000Z
|
2022-03-29T10:18:01.000Z
|
plugins/mimecast/komand_mimecast/actions/__init__.py
|
lukaszlaszuk/insightconnect-plugins
|
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
|
[
"MIT"
] | 386
|
2019-06-07T20:20:39.000Z
|
2022-03-30T17:35:01.000Z
|
plugins/mimecast/komand_mimecast/actions/__init__.py
|
lukaszlaszuk/insightconnect-plugins
|
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
|
[
"MIT"
] | 43
|
2019-07-09T14:13:58.000Z
|
2022-03-28T12:04:46.000Z
|
# GENERATED BY KOMAND SDK - DO NOT EDIT
from .add_group_member.action import AddGroupMember
from .create_blocked_sender_policy.action import CreateBlockedSenderPolicy
from .create_managed_url.action import CreateManagedUrl
from .decode_url.action import DecodeUrl
from .delete_group_member.action import DeleteGroupMember
from .delete_managed_url.action import DeleteManagedUrl
from .find_groups.action import FindGroups
from .get_managed_url.action import GetManagedUrl
from .get_ttp_url_logs.action import GetTtpUrlLogs
from .permit_or_block_sender.action import PermitOrBlockSender
| 48.75
| 74
| 0.878632
| 78
| 585
| 6.320513
| 0.5
| 0.243408
| 0.121704
| 0.133874
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083761
| 585
| 11
| 75
| 53.181818
| 0.919776
| 0.063248
| 0
| 0
| 1
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0b86318b1efcad4fb814d9c4a5d13d201c747391
| 456
|
py
|
Python
|
matchbook/endpoints/logout.py
|
jackrhunt13/matchbook
|
a12ac26e272ddc004f2590b4f4ad8f4715f1df66
|
[
"MIT"
] | 11
|
2017-07-11T10:08:19.000Z
|
2021-01-22T17:08:44.000Z
|
matchbook/endpoints/logout.py
|
oddoneuk/matchbook
|
eb37817c4f6604097be406edf2df7f711586dcf6
|
[
"MIT"
] | 10
|
2017-07-14T23:43:25.000Z
|
2021-08-19T17:21:10.000Z
|
matchbook/endpoints/logout.py
|
oddoneuk/matchbook
|
eb37817c4f6604097be406edf2df7f711586dcf6
|
[
"MIT"
] | 9
|
2017-12-13T13:25:42.000Z
|
2021-07-16T18:24:23.000Z
|
from matchbook.endpoints.baseendpoint import BaseEndpoint
from matchbook.exceptions import AuthError
class Logout(BaseEndpoint):
def __call__(self, session=None):
response = self.request("DELETE", self.client.urn_main, 'security/session', data=self.data, session=session)
self.client.set_session_token(None, None)
@property
def data(self):
return {'username': self.client.username, 'password': self.client.password}
| 32.571429
| 116
| 0.734649
| 54
| 456
| 6.074074
| 0.518519
| 0.121951
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153509
| 456
| 13
| 117
| 35.076923
| 0.849741
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0.111111
| 0.222222
| 0.111111
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
0ba7db2870c107b06c613345b4bc051a36255370
| 254
|
py
|
Python
|
main.py
|
bells64/nok
|
209db1ca905ed3cfd258309806d4e3fe6a3011c1
|
[
"MIT"
] | null | null | null |
main.py
|
bells64/nok
|
209db1ca905ed3cfd258309806d4e3fe6a3011c1
|
[
"MIT"
] | null | null | null |
main.py
|
bells64/nok
|
209db1ca905ed3cfd258309806d4e3fe6a3011c1
|
[
"MIT"
] | null | null | null |
num_inpt = a = 7484
num_inpt_2 = b = 12312
while num_inpt != num_inpt_2: # nod
if num_inpt > num_inpt_2:
num_inpt = num_inpt - num_inpt_2
elif num_inpt_2 > num_inpt:
num_inpt_2 = num_inpt_2 - num_inpt
nok = a * b // num_inpt_2 #nok
print(nok)
| 25.4
| 37
| 0.69685
| 52
| 254
| 2.961538
| 0.25
| 0.681818
| 0.415584
| 0.454545
| 0.584416
| 0.383117
| 0.383117
| 0
| 0
| 0
| 0
| 0.085
| 0.212598
| 254
| 9
| 38
| 28.222222
| 0.685
| 0.023622
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.111111
| 0
| 0
| 0
| null | 1
| 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
|
0ba83c4283caa37e7dd3c69a368e53118c1a6c92
| 236
|
py
|
Python
|
tests/test_storage/test_mongo/__init__.py
|
sarthakgupta072/py-abac
|
7afcec37adc361a8c177c98044481aa5d2696303
|
[
"Apache-2.0"
] | 47
|
2019-10-17T03:23:01.000Z
|
2022-02-26T03:27:03.000Z
|
tests/test_storage/test_mongo/__init__.py
|
sarthakgupta072/py-abac
|
7afcec37adc361a8c177c98044481aa5d2696303
|
[
"Apache-2.0"
] | 17
|
2020-02-24T02:17:34.000Z
|
2022-02-15T20:11:19.000Z
|
tests/test_storage/test_mongo/__init__.py
|
ketgo/pyabac
|
8a44107a00f712bbb9c6cd3ecad155ef696cf035
|
[
"Apache-2.0"
] | 10
|
2019-12-24T04:13:21.000Z
|
2021-08-01T08:21:41.000Z
|
import os
from pymongo import MongoClient
DEFAULT_MONGODB_HOST = "mongodb://mongo:password@127.0.0.1:27017"
def create_client() -> MongoClient:
host = os.getenv("MONGODB_HOST", DEFAULT_MONGODB_HOST)
return MongoClient(host)
| 21.454545
| 65
| 0.758475
| 32
| 236
| 5.40625
| 0.59375
| 0.190751
| 0.208092
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.053659
| 0.131356
| 236
| 10
| 66
| 23.6
| 0.790244
| 0
| 0
| 0
| 0
| 0
| 0.220339
| 0.169492
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0.166667
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
e7e57a9a85fc556e6617c99296fc38a4c2b590e7
| 172
|
py
|
Python
|
badgeupdater/models.py
|
riichi/kcc3
|
7762cd273b1f1d78caafd2a85ed169c4a9403293
|
[
"MIT"
] | 2
|
2019-09-22T00:11:54.000Z
|
2019-09-22T10:55:31.000Z
|
badgeupdater/models.py
|
m4tx/kcc3
|
2cc9674d13483ee59fe7cb83e8b9c9e8b213ba47
|
[
"MIT"
] | 5
|
2021-04-08T20:11:53.000Z
|
2022-01-19T12:02:31.000Z
|
badgeupdater/models.py
|
riichi/kcc3
|
7762cd273b1f1d78caafd2a85ed169c4a9403293
|
[
"MIT"
] | null | null | null |
from dataclasses import dataclass
from typing import List
@dataclass
class BadgeUpdateRequest:
id: str
@dataclass
class BadgeUpdateResponse:
players: List[str]
| 13.230769
| 33
| 0.77907
| 19
| 172
| 7.052632
| 0.631579
| 0.208955
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174419
| 172
| 12
| 34
| 14.333333
| 0.943662
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.25
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
f02e1f14e4423a785c533b6960de9b1a09402a7b
| 565
|
py
|
Python
|
tests/test_utils.py
|
qhpea/datadictclass
|
a70231a2843ce5ad6dda5af073c9a20630ff46fe
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
qhpea/datadictclass
|
a70231a2843ce5ad6dda5af073c9a20630ff46fe
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
qhpea/datadictclass
|
a70231a2843ce5ad6dda5af073c9a20630ff46fe
|
[
"MIT"
] | null | null | null |
import typing
from smartcast import is_dict, is_int, is_bool, is_str, is_float, is_union, is_list
def test_is_union():
assert is_union(typing.Optional[int])
assert is_union(typing.Union[int, str])
def test_is_list():
assert is_list(typing.List)
assert is_list(typing.List[int])
assert is_list(list)
def test_is_dict():
assert is_dict(typing.Dict)
assert is_dict(typing.Dict[int, str])
assert is_dict(dict)
def test_is_primitive():
assert is_str(str)
assert is_int(int)
assert is_float(float)
assert is_bool(bool)
| 24.565217
| 83
| 0.723894
| 95
| 565
| 4.021053
| 0.178947
| 0.251309
| 0.094241
| 0.068063
| 0.251309
| 0.251309
| 0
| 0
| 0
| 0
| 0
| 0
| 0.173451
| 565
| 23
| 84
| 24.565217
| 0.817987
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.666667
| 1
| 0.222222
| true
| 0
| 0.111111
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
f03129dc9c00a510d30cfae1b4e712cf2d53a345
| 700
|
py
|
Python
|
src/config/export/statistics/abc.py
|
COAStatistics/alss
|
e1b14cb13de7b8455fa6835587cb1ceb16e4595c
|
[
"MIT"
] | null | null | null |
src/config/export/statistics/abc.py
|
COAStatistics/alss
|
e1b14cb13de7b8455fa6835587cb1ceb16e4595c
|
[
"MIT"
] | 81
|
2018-09-04T13:16:02.000Z
|
2022-03-11T23:20:40.000Z
|
src/config/export/statistics/abc.py
|
COAStatistics/alss
|
e1b14cb13de7b8455fa6835587cb1ceb16e4595c
|
[
"MIT"
] | 4
|
2018-08-21T22:17:59.000Z
|
2019-03-15T01:14:29.000Z
|
import abc
class BaseStatisticsQueryHelper(metaclass=abc.ABCMeta):
@abc.abstractmethod
def get_survey_qs(self):
pass
@abc.abstractmethod
def get_magnification_factor_map(self):
pass
@abc.abstractmethod
def get_survey_map(self):
pass
@abc.abstractmethod
def get_lack_farmer_ids(self):
pass
@classmethod
@abc.abstractmethod
def get_region(cls, survey):
pass
def __init__(self):
self.survey_qs = self.get_survey_qs()
self.magnification_factor_map = self.get_magnification_factor_map()
self.survey_map = self.get_survey_map()
self.lack_farmer_ids = self.get_lack_farmer_ids()
| 21.875
| 75
| 0.681429
| 85
| 700
| 5.247059
| 0.270588
| 0.09417
| 0.224215
| 0.257848
| 0.408072
| 0.221973
| 0.152466
| 0
| 0
| 0
| 0
| 0
| 0.24
| 700
| 31
| 76
| 22.580645
| 0.838346
| 0
| 0
| 0.434783
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.26087
| false
| 0.217391
| 0.043478
| 0
| 0.347826
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.