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
c0c378b9b8a0ebb8d88b77024d6b1190eee6e552
120
py
Python
tests/module1.py
cyroilt/game
49dba23c8e361f8d870cb3260f3421ca9f9e16de
[ "BSD-3-Clause" ]
null
null
null
tests/module1.py
cyroilt/game
49dba23c8e361f8d870cb3260f3421ca9f9e16de
[ "BSD-3-Clause" ]
null
null
null
tests/module1.py
cyroilt/game
49dba23c8e361f8d870cb3260f3421ca9f9e16de
[ "BSD-3-Clause" ]
null
null
null
from validate_email import validate_email is_valid = validate_email("cyroil31@gmail.com", verify=True) print(is_valid)
40
61
0.825
18
120
5.222222
0.666667
0.414894
0
0
0
0
0
0
0
0
0
0.018182
0.083333
120
3
62
40
0.836364
0
0
0
0
0
0.151261
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
c0d659daa4b4d279c3cd42b18dda9b8fe839b753
60
py
Python
tests/test_tools_1c.py
Qwedfgr/tools_1c
0ab49b26511784948d620c8f45263333c64d4032
[ "MIT" ]
3
2020-02-21T17:41:31.000Z
2021-07-19T01:49:07.000Z
tests/test_tools_1c.py
Qwedfgr/tools_1c
0ab49b26511784948d620c8f45263333c64d4032
[ "MIT" ]
null
null
null
tests/test_tools_1c.py
Qwedfgr/tools_1c
0ab49b26511784948d620c8f45263333c64d4032
[ "MIT" ]
1
2020-02-21T17:45:31.000Z
2020-02-21T17:45:31.000Z
#!/usr/bin/env python """Tests for `tools_1c` package."""
12
35
0.633333
9
60
4.111111
1
0
0
0
0
0
0
0
0
0
0
0.019231
0.133333
60
4
36
15
0.692308
0.833333
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
c0f5e8ec0befa34840078954c82056631b1b706e
830
py
Python
scooter/migrations/0003_auto_20190821_2323.py
sknzl/django_scooter
f567d745057dbbcb72fb874fff3761d7b61781da
[ "MIT" ]
3
2019-12-12T22:57:47.000Z
2020-02-04T14:20:10.000Z
scooter/migrations/0003_auto_20190821_2323.py
sknzl/django_scooter
f567d745057dbbcb72fb874fff3761d7b61781da
[ "MIT" ]
6
2020-06-06T01:02:38.000Z
2022-02-10T14:02:01.000Z
scooter/migrations/0003_auto_20190821_2323.py
sknzl/django_scooter
f567d745057dbbcb72fb874fff3761d7b61781da
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-21 23:23 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('scooter', '0002_remove_scooter_last_activity_at'), ] operations = [ migrations.RenameField( model_name='scooter', old_name='updated_at', new_name='created', ), migrations.RenameField( model_name='scooter', old_name='created_at', new_name='updated', ), migrations.RenameField( model_name='scooteractivity', old_name='updated_at', new_name='created', ), migrations.RenameField( model_name='scooteractivity', old_name='created_at', new_name='updated', ), ]
24.411765
60
0.554217
78
830
5.628205
0.410256
0.191344
0.236902
0.273349
0.646925
0.646925
0.646925
0.273349
0.273349
0.273349
0
0.034608
0.338554
830
33
61
25.151515
0.765027
0.054217
0
0.740741
1
0
0.197957
0.045977
0
0
0
0
0
1
0
false
0
0.037037
0
0.148148
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
c0f620a5be7d14f0ee250e244273ba9980c749e6
105
py
Python
qaeval/generation/util.py
danieldeutsch/qaeval
dd7273183dd1b2c9995115310ef041daa953ca81
[ "Apache-2.0" ]
6
2020-10-30T17:34:05.000Z
2021-10-10T09:27:49.000Z
qaeval/generation/util.py
danieldeutsch/qaeval
dd7273183dd1b2c9995115310ef041daa953ca81
[ "Apache-2.0" ]
1
2020-10-02T03:20:09.000Z
2021-05-07T15:32:27.000Z
qaeval/generation/util.py
danieldeutsch/qaeval
dd7273183dd1b2c9995115310ef041daa953ca81
[ "Apache-2.0" ]
null
null
null
SPAN_START_TOKEN = '<m>' SPAN_END_TOKEN = '</m>' ALL_SPECIAL_TOKENS = [SPAN_START_TOKEN, SPAN_END_TOKEN]
26.25
55
0.761905
17
105
4.117647
0.470588
0.257143
0.4
0
0
0
0
0
0
0
0
0
0.095238
105
4
55
26.25
0.736842
0
0
0
0
0
0.066038
0
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
239587e2a20ff59bfc57794d86b8f552c806b426
89
py
Python
src/__init__.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
1
2019-06-17T17:01:17.000Z
2019-06-17T17:01:17.000Z
src/__init__.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
7
2021-02-08T20:46:15.000Z
2021-09-08T02:12:59.000Z
src/__init__.py
mehsoy/jaws
b79723c1fc549741494ebf5d948e94a44e971f2a
[ "MIT" ]
null
null
null
#!/usr/bin/python #-*- coding: utf-8 -*- #sys.path.append('../../') #import exceptions
12.714286
26
0.573034
11
89
4.636364
1
0
0
0
0
0
0
0
0
0
0
0.012658
0.11236
89
6
27
14.833333
0.632911
0.88764
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
23a71cf129997a48068790a7fc720732fe0adf38
4,430
py
Python
core_pe/block.py
astrofrog/dupeguru
d0a3f081dab21ea3d2fc69830c9e71a18078c150
[ "BSD-3-Clause" ]
1
2017-01-03T05:50:39.000Z
2017-01-03T05:50:39.000Z
core_pe/block.py
astrofrog/dupeguru
d0a3f081dab21ea3d2fc69830c9e71a18078c150
[ "BSD-3-Clause" ]
null
null
null
core_pe/block.py
astrofrog/dupeguru
d0a3f081dab21ea3d2fc69830c9e71a18078c150
[ "BSD-3-Clause" ]
null
null
null
# Created By: Virgil Dupras # Created On: 2006/09/01 # Copyright 2013 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "BSD" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licenses/bsd_license from ._block import NoBlocksError, DifferentBlockCountError, avgdiff, getblocks2 # Converted to C # def getblock(image): # """Returns a 3 sized tuple containing the mean color of 'image'. # # image: a PIL image or crop. # """ # if image.size[0]: # pixel_count = image.size[0] * image.size[1] # red = green = blue = 0 # for r,g,b in image.getdata(): # red += r # green += g # blue += b # return (red // pixel_count, green // pixel_count, blue // pixel_count) # else: # return (0,0,0) # This is not used anymore # def getblocks(image,blocksize): # """Returns a list of blocks (3 sized tuples). # # image: A PIL image to base the blocks on. # blocksize: The size of the blocks to be create. This is a single integer, defining # both width and height (blocks are square). # """ # if min(image.size) < blocksize: # return () # result = [] # for i in xrange(image.size[1] // blocksize): # for j in xrange(image.size[0] // blocksize): # box = (blocksize * j, blocksize * i, blocksize * (j + 1), blocksize * (i + 1)) # crop = image.crop(box) # result.append(getblock(crop)) # return result # Converted to C # def getblocks2(image,block_count_per_side): # """Returns a list of blocks (3 sized tuples). # # image: A PIL image to base the blocks on. # block_count_per_side: This integer determine the number of blocks the function will return. # If it is 10, for example, 100 blocks will be returns (10 width, 10 height). The blocks will not # necessarely cover square areas. The area covered by each block will be proportional to the image # itself. # """ # if not image.size[0]: # return [] # width,height = image.size # block_width = max(width // block_count_per_side,1) # block_height = max(height // block_count_per_side,1) # result = [] # for ih in range(block_count_per_side): # top = min(ih * block_height, height - block_height) # bottom = top + block_height # for iw in range(block_count_per_side): # left = min(iw * block_width, width - block_width) # right = left + block_width # box = (left,top,right,bottom) # crop = image.crop(box) # result.append(getblock(crop)) # return result # Converted to C # def diff(first, second): # """Returns the difference between the first block and the second. # # It returns an absolute sum of the 3 differences (RGB). # """ # r1, g1, b1 = first # r2, g2, b2 = second # return abs(r1 - r2) + abs(g1 - g2) + abs(b1 - b2) # Converted to C # def avgdiff(first, second, limit=768, min_iterations=1): # """Returns the average diff between first blocks and seconds. # # If the result surpasses limit, limit + 1 is returned, except if less than min_iterations # iterations have been made in the blocks. # """ # if len(first) != len(second): # raise DifferentBlockCountError # if not first: # raise NoBlocksError # count = len(first) # sum = 0 # zipped = izip(xrange(1, count + 1), first, second) # for i, first, second in zipped: # sum += diff(first, second) # if sum > limit * i and i >= min_iterations: # return limit + 1 # result = sum // count # if (not result) and sum: # result = 1 # return result # This is not used anymore # def maxdiff(first,second,limit=768): # """Returns the max diff between first blocks and seconds. # # If the result surpasses limit, the first max being over limit is returned. # """ # if len(first) != len(second): # raise DifferentBlockCountError # if not first: # raise NoBlocksError # result = 0 # zipped = zip(first,second) # for first,second in zipped: # result = max(result,diff(first,second)) # if result > limit: # return result # return result
36.01626
102
0.607901
594
4,430
4.474747
0.282828
0.037246
0.029345
0.038375
0.246802
0.233258
0.197893
0.197893
0.197893
0.197893
0
0.021069
0.282167
4,430
122
103
36.311475
0.81478
0.928442
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
23af479b8a13b4d58ed4221bce333ac9a5844a74
104
py
Python
creten/engines/CretenEngine.py
nardew/Creten
15ddb0b52e6f2afec2c79b3c731fccb34a2c63d6
[ "MIT" ]
9
2019-12-17T10:42:40.000Z
2021-12-02T23:07:05.000Z
creten/engines/CretenEngine.py
nardew/Creten
15ddb0b52e6f2afec2c79b3c731fccb34a2c63d6
[ "MIT" ]
null
null
null
creten/engines/CretenEngine.py
nardew/Creten
15ddb0b52e6f2afec2c79b3c731fccb34a2c63d6
[ "MIT" ]
6
2019-03-04T15:01:10.000Z
2022-01-12T23:22:55.000Z
from common.Logger import Logger class CretenEngine(object): def __init__(self): self.log = Logger()
20.8
32
0.759615
14
104
5.357143
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.134615
104
5
33
20.8
0.833333
0
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
23d1afc98b83ed76032b3cab7e66899c75520b36
1,174
py
Python
compotes/migrations/0004_alter_debt_created_alter_debt_updated_and_more.py
nim65s/compotes
9088007d4092616ccbb4b67bad813a381942bd49
[ "BSD-2-Clause" ]
null
null
null
compotes/migrations/0004_alter_debt_created_alter_debt_updated_and_more.py
nim65s/compotes
9088007d4092616ccbb4b67bad813a381942bd49
[ "BSD-2-Clause" ]
5
2022-03-13T10:09:33.000Z
2022-03-21T20:02:05.000Z
compotes/migrations/0004_alter_debt_created_alter_debt_updated_and_more.py
nim65s/compotes
9088007d4092616ccbb4b67bad813a381942bd49
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 4.0.3 on 2022-03-13 09:02 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("compotes", "0003_alter_debt_options_alter_part_options_and_more"), ] operations = [ migrations.AlterField( model_name="debt", name="created", field=models.DateTimeField(auto_now_add=True, verbose_name="created"), ), migrations.AlterField( model_name="debt", name="updated", field=models.DateTimeField(auto_now=True, verbose_name="updated"), ), migrations.AlterField( model_name="pool", name="created", field=models.DateTimeField(auto_now_add=True, verbose_name="created"), ), migrations.AlterField( model_name="pool", name="name", field=models.CharField(max_length=200, unique=True, verbose_name="name"), ), migrations.AlterField( model_name="pool", name="updated", field=models.DateTimeField(auto_now=True, verbose_name="updated"), ), ]
30.102564
85
0.588586
118
1,174
5.644068
0.398305
0.15015
0.187688
0.217718
0.647147
0.647147
0.48048
0.48048
0.48048
0.48048
0
0.026538
0.293867
1,174
38
86
30.894737
0.77684
0.03833
0
0.71875
1
0
0.126886
0.045253
0
0
0
0
0
1
0
false
0
0.03125
0
0.125
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
f1e8c2fecb251ce2cb63e54144b4574bebe0eaa0
79
py
Python
layers/__init__.py
lukovnikov/transformer_generalization
a538bfbba6877cd7a21e710f2535df2e9236ba52
[ "MIT" ]
47
2021-08-30T00:41:15.000Z
2022-01-24T02:49:17.000Z
layers/__init__.py
lukovnikov/transformer_generalization
a538bfbba6877cd7a21e710f2535df2e9236ba52
[ "MIT" ]
null
null
null
layers/__init__.py
lukovnikov/transformer_generalization
a538bfbba6877cd7a21e710f2535df2e9236ba52
[ "MIT" ]
5
2021-09-04T23:51:51.000Z
2022-03-10T14:03:24.000Z
from .transformer import Transformer from .tied_embedding import TiedEmbedding
26.333333
41
0.873418
9
79
7.555556
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.101266
79
2
42
39.5
0.957746
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
7b150f4d4d0d44b192282588a12e9ffba16b0355
93
py
Python
djangoWeb/visualSeg/apps.py
guopeiming/NNTranSegmentor
4496932bfb93f64de0d0c07236c1dd523e6577c3
[ "Apache-2.0" ]
null
null
null
djangoWeb/visualSeg/apps.py
guopeiming/NNTranSegmentor
4496932bfb93f64de0d0c07236c1dd523e6577c3
[ "Apache-2.0" ]
null
null
null
djangoWeb/visualSeg/apps.py
guopeiming/NNTranSegmentor
4496932bfb93f64de0d0c07236c1dd523e6577c3
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class VisualsegConfig(AppConfig): name = 'visualSeg'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7b151771111c0c32fadf13236c531e9f492ece1f
88
py
Python
config/settings/local.py
Sinha-Ujjawal/dots-connect-deta
cdb9ab69a22b8623a1265d565ee2e9dd91b1f1fe
[ "MIT" ]
null
null
null
config/settings/local.py
Sinha-Ujjawal/dots-connect-deta
cdb9ab69a22b8623a1265d565ee2e9dd91b1f1fe
[ "MIT" ]
null
null
null
config/settings/local.py
Sinha-Ujjawal/dots-connect-deta
cdb9ab69a22b8623a1265d565ee2e9dd91b1f1fe
[ "MIT" ]
null
null
null
from .base import * # noqa INSTALLED_APPS = [*INSTALLED_APPS, "django_extensions"]
22
56
0.715909
10
88
6
0.8
0.433333
0
0
0
0
0
0
0
0
0
0
0.170455
88
3
57
29.333333
0.821918
0.045455
0
0
0
0
0.21519
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
7b228a7daf92206711140c79275206e74ac46b90
111
py
Python
website/export_mysql.py
rungao/data_collect
6ff71b9a3625da2bc3177c019ba60d5442536d23
[ "MIT" ]
1
2019-09-27T09:03:08.000Z
2019-09-27T09:03:08.000Z
website/export_mysql.py
rungao/data_collect
6ff71b9a3625da2bc3177c019ba60d5442536d23
[ "MIT" ]
1
2021-06-02T00:22:47.000Z
2021-06-02T00:22:47.000Z
website/export_mysql.py
rungao/data_collect
6ff71b9a3625da2bc3177c019ba60d5442536d23
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 将每日的数据进行处理,并导出到MYSQL中,并对未生成的数据进行记录,可选择进行重跑或者手动重跑 """
15.857143
49
0.63964
11
111
6.454545
1
0
0
0
0
0
0
0
0
0
0
0.021277
0.153153
111
7
50
15.857143
0.734043
0.828829
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
7b28b93098dbf1d22ebe71f78d1bae6a27a3b5db
228
py
Python
fizzbuzz/fizzbuzz.py
Murto/fizzbuzz-unittest
3eacd32b940b975fb859e30eb50435499994b900
[ "MIT" ]
null
null
null
fizzbuzz/fizzbuzz.py
Murto/fizzbuzz-unittest
3eacd32b940b975fb859e30eb50435499994b900
[ "MIT" ]
null
null
null
fizzbuzz/fizzbuzz.py
Murto/fizzbuzz-unittest
3eacd32b940b975fb859e30eb50435499994b900
[ "MIT" ]
null
null
null
def fizzbuzz(num): if (num >= 0 and num % 3 == 0 and num % 5 == 0): return "Fizz Buzz" if (num >= 0 and num % 3 == 0): return "Fizz" if (num >= 0 and num % 5 == 0): return "Buzz" if (num >= 0): return ""
22.8
50
0.482456
39
228
2.820513
0.282051
0.181818
0.218182
0.245455
0.563636
0.518182
0.254545
0
0
0
0
0.078431
0.328947
228
9
51
25.333333
0.640523
0
0
0
0
0
0.074561
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.555556
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
9e3c1b0f6d0de06260526c2d85478752e0b7e648
209
py
Python
ExploitBot.py
cboulte1/BotFramework
d9d242f5b1cedd24cbbfac6f8ce3557eaff77723
[ "MIT" ]
null
null
null
ExploitBot.py
cboulte1/BotFramework
d9d242f5b1cedd24cbbfac6f8ce3557eaff77723
[ "MIT" ]
null
null
null
ExploitBot.py
cboulte1/BotFramework
d9d242f5b1cedd24cbbfac6f8ce3557eaff77723
[ "MIT" ]
null
null
null
from Bot import Bot _BotType = "ExploitBot" class ExploitBot(Bot): def __init__(self, dbURL, ccURL): super(ExploitBot, self).__init__(_BotType, dbURL, ccURL) def exploit(self): pass
19
64
0.669856
25
209
5.2
0.56
0.153846
0
0
0
0
0
0
0
0
0
0
0.22488
209
11
65
19
0.802469
0
0
0
0
0
0.047619
0
0
0
0
0
0
1
0.285714
false
0.142857
0.142857
0
0.571429
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
9e3f045cab6cd8f473a1f4531b4f2be9265ef49d
108
py
Python
config.py
lowell-dev-club/flask-workshop
c8de6b0d65ca2746566bc1573d732ee8fef6f75a
[ "MIT" ]
null
null
null
config.py
lowell-dev-club/flask-workshop
c8de6b0d65ca2746566bc1573d732ee8fef6f75a
[ "MIT" ]
null
null
null
config.py
lowell-dev-club/flask-workshop
c8de6b0d65ca2746566bc1573d732ee8fef6f75a
[ "MIT" ]
null
null
null
# Import urandom from os from os import urandom # Random security key for testing SECRET_KEY = urandom(32)
18
33
0.777778
17
108
4.882353
0.647059
0.313253
0
0
0
0
0
0
0
0
0
0.022472
0.175926
108
5
34
21.6
0.910112
0.5
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
9e455adeba7ceff8e5bc9ad2d50ee8f5c1552181
1,086
py
Python
samples/test.stats.py
SinHouse/qm3
b2436ad813dd13c0c14bdee5d95f30436bc0a04d
[ "MIT" ]
null
null
null
samples/test.stats.py
SinHouse/qm3
b2436ad813dd13c0c14bdee5d95f30436bc0a04d
[ "MIT" ]
null
null
null
samples/test.stats.py
SinHouse/qm3
b2436ad813dd13c0c14bdee5d95f30436bc0a04d
[ "MIT" ]
null
null
null
import qm3.maths.stats import qm3.maths.matrix print( qm3.maths.stats.stats( [ 0.388, 0.389, 0.410 ] ) ) print( qm3.maths.stats.autocorrelation( range( 10 ) ) ) print( qm3.maths.stats.autocorrelation( range( 10 ), 2 ) ) print( qm3.maths.stats.sampling_ratio( range( 10 ) ) ) print( 80*"-" ) print( qm3.maths.stats.k_means( [ 7, 4, 10, 16, 13, 7, 3, 5, 7, 3, 13, 14, 12, 11, 10, 7, 7, 5, 3, 3 ], 2 )[0] ) x = [ [ 7, 4, 10, 16, 13 ], [ 7, 7, 5, 3, 3 ], [ 7, 3, 5, 7, 3 ], [ 13, 14, 12, 11, 10 ] ] qm3.maths.matrix.mprint( sum( x, [] ), 4, 5 ) o = qm3.maths.stats.PCA( x ) print( o.val ) qm3.maths.matrix.mprint( o.select( [ 0,2,3 ] ), 3, 5 ) qm3.maths.matrix.mprint( o.select( [ 0,2,3 ], False ), 4, 5 ) print( 80*"-" ) import numpy print( qm3.maths.stats.npk_means( numpy.array( [ 7, 4, 10, 16, 13, 7, 3, 5, 7, 3, 13, 14, 12, 11, 10, 7, 7, 5, 3, 3 ] ), 2 )[0] ) x = numpy.array( [ 7, 4, 10, 16, 13, 7, 7, 5, 3, 3, 7, 3, 5, 7, 3, 13, 14, 12, 11, 10 ] ).reshape( (4,5) ) o = qm3.maths.stats.npPCA( x ) print( o.val ) print( o.select( [ 1,2,3 ] ) ) print( o.select( [ 1,2,3 ], False ) )
41.769231
129
0.556169
215
1,086
2.795349
0.195349
0.173045
0.194676
0.179701
0.565724
0.565724
0.462562
0.329451
0.296173
0.196339
0
0.198614
0.202578
1,086
25
130
43.44
0.495381
0
0
0.181818
0
0
0.001842
0
0
0
0
0
0
1
0
false
0
0.136364
0
0.136364
0.681818
0
0
0
null
0
1
1
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
9e95e9312137ab73712a58ad69c954afea086b34
129
py
Python
constants.py
MorbidMiyako/RankingBot
c89d8814ef94ab8e024f9ec439287d72455b6913
[ "MIT" ]
2
2020-06-03T20:19:33.000Z
2021-04-29T08:05:09.000Z
constants.py
MorbidMiyako/RankingBot
c89d8814ef94ab8e024f9ec439287d72455b6913
[ "MIT" ]
41
2020-06-09T11:11:37.000Z
2022-03-20T21:18:42.000Z
constants.py
MorbidMiyako/RankingBot
c89d8814ef94ab8e024f9ec439287d72455b6913
[ "MIT" ]
9
2020-05-27T19:04:55.000Z
2021-11-01T12:57:55.000Z
administrator_user_id = 403569083402158090 reaction_message_ids = [832010993542365184, 573059396259807232] current_year = 2021
21.5
63
0.860465
12
129
8.833333
1
0
0
0
0
0
0
0
0
0
0
0.495727
0.093023
129
5
64
25.8
0.410256
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9eb3dbd4f7e6d9eaacdb2de92663cda704e1b4b5
55,916
py
Python
mi/tests/test_sector_team_months.py
uktrade/export-wins-data
46caa444812e89abe504bec8c15aa7f7ba1a247e
[ "MIT" ]
5
2016-09-12T12:52:45.000Z
2020-03-24T14:43:13.000Z
mi/tests/test_sector_team_months.py
uktrade/export-wins-data
46caa444812e89abe504bec8c15aa7f7ba1a247e
[ "MIT" ]
435
2016-10-18T12:51:39.000Z
2021-06-09T17:22:08.000Z
mi/tests/test_sector_team_months.py
uktrade/export-wins-data
46caa444812e89abe504bec8c15aa7f7ba1a247e
[ "MIT" ]
2
2016-12-06T10:37:21.000Z
2017-02-22T17:27:43.000Z
import datetime import json from django.urls import reverse from freezegun import freeze_time from mi.models import FinancialYear from mi.tests.base_test_case import MiApiViewsBaseTestCase from mi.tests.test_sector_views import SectorTeamBaseTestCase from mi.utils import month_iterator @freeze_time(datetime.datetime(2017, 1, 31)) class SectorTeamMonthlyViewsTestCase(SectorTeamBaseTestCase): """ Tests covering SectorTeam Campaigns API endpoint """ url = reverse('mi:sector_team_months', kwargs={'team_id': 1}) + "?year=2016" expected_response = {} def setUp(self): super().setUp() self.expected_response = { "avg_time_to_confirm": 0.0, "hvcs": { "campaigns": [ 'HVC: E006', 'HVC: E019', 'HVC: E031', 'HVC: E072', 'HVC: E095', 'HVC: E115', 'HVC: E128', 'HVC: E160', 'HVC: E167', 'HVC: E191' ], "target": self.CAMPAIGN_TARGET * len(self.TEAM_1_HVCS) }, "months": [ { "date": "2016-04", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 2, "unconfirmed": 2 }, "value": { "confirmed": 0, "total": 200000, "unconfirmed": 200000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 2, "unconfirmed": 2 }, "value": { "confirmed": 0, "grand_total": 200000, "unconfirmed": 200000 } } }, "non_export": { "number": { "confirmed": 0, "total": 2, "unconfirmed": 2 }, "value": { "confirmed": 0, "total": 4600, "unconfirmed": 4600 } } } }, { "date": "2016-05", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 4, "unconfirmed": 4 }, "value": { "confirmed": 0, "total": 400000, "unconfirmed": 400000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 4, "unconfirmed": 4 }, "value": { "confirmed": 0, "grand_total": 400000, "unconfirmed": 400000 } } }, "non_export": { "number": { "confirmed": 0, "total": 4, "unconfirmed": 4 }, "value": { "confirmed": 0, "total": 9200, "unconfirmed": 9200 } } } }, { "date": "2016-06", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 5, "unconfirmed": 5 }, "value": { "confirmed": 0, "total": 500000, "unconfirmed": 500000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 5, "unconfirmed": 5 }, "value": { "confirmed": 0, "grand_total": 500000, "unconfirmed": 500000 } } }, "non_export": { "number": { "confirmed": 0, "total": 5, "unconfirmed": 5 }, "value": { "confirmed": 0, "total": 11500, "unconfirmed": 11500 } } } }, { "date": "2016-07", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 6, "unconfirmed": 6 }, "value": { "confirmed": 0, "total": 600000, "unconfirmed": 600000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 6, "unconfirmed": 6 }, "value": { "confirmed": 0, "grand_total": 600000, "unconfirmed": 600000 } } }, "non_export": { "number": { "confirmed": 0, "total": 6, "unconfirmed": 6 }, "value": { "confirmed": 0, "total": 13800, "unconfirmed": 13800 } } } }, { "date": "2016-08", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 7, "unconfirmed": 7 }, "value": { "confirmed": 0, "total": 700000, "unconfirmed": 700000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 7, "unconfirmed": 7 }, "value": { "confirmed": 0, "grand_total": 700000, "unconfirmed": 700000 } } }, "non_export": { "number": { "confirmed": 0, "total": 7, "unconfirmed": 7 }, "value": { "confirmed": 0, "total": 16100, "unconfirmed": 16100 } } } }, { "date": "2016-09", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 8, "unconfirmed": 8 }, "value": { "confirmed": 0, "total": 800000, "unconfirmed": 800000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 8, "unconfirmed": 8 }, "value": { "confirmed": 0, "grand_total": 800000, "unconfirmed": 800000 } } }, "non_export": { "number": { "confirmed": 0, "total": 8, "unconfirmed": 8 }, "value": { "confirmed": 0, "total": 18400, "unconfirmed": 18400 } } } }, { "date": "2016-10", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 9, "unconfirmed": 9 }, "value": { "confirmed": 0, "total": 900000, "unconfirmed": 900000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 9, "unconfirmed": 9 }, "value": { "confirmed": 0, "grand_total": 900000, "unconfirmed": 900000 } } }, "non_export": { "number": { "confirmed": 0, "total": 9, "unconfirmed": 9 }, "value": { "confirmed": 0, "total": 20700, "unconfirmed": 20700 } } } }, { "date": "2016-11", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 10, "unconfirmed": 10 }, "value": { "confirmed": 0, "total": 1000000, "unconfirmed": 1000000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 10, "unconfirmed": 10 }, "value": { "confirmed": 0, "grand_total": 1000000, "unconfirmed": 1000000 } } }, "non_export": { "number": { "confirmed": 0, "total": 10, "unconfirmed": 10 }, "value": { "confirmed": 0, "total": 23000, "unconfirmed": 23000 } } } }, { "date": "2016-12", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 11, "unconfirmed": 11 }, "value": { "confirmed": 0, "total": 1100000, "unconfirmed": 1100000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 11, "unconfirmed": 11 }, "value": { "confirmed": 0, "grand_total": 1100000, "unconfirmed": 1100000 } } }, "non_export": { "number": { "confirmed": 0, "total": 11, "unconfirmed": 11 }, "value": { "confirmed": 0, "total": 25300, "unconfirmed": 25300 } } } }, { "date": "2017-01", "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 12, "unconfirmed": 12 }, "value": { "confirmed": 0, "total": 1200000, "unconfirmed": 1200000 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 12, "unconfirmed": 12 }, "value": { "confirmed": 0, "grand_total": 1200000, "unconfirmed": 1200000 } } }, "non_export": { "number": { "confirmed": 0, "total": 12, "unconfirmed": 12 }, "value": { "confirmed": 0, "total": 27600, "unconfirmed": 27600 } } } } ], "name": "Financial & Professional Services" } def test_sector_team_month_1(self): """ Tests covering SectorTeam Campaigns API endpoint """ for i in range(4, 13): self._create_hvc_win(win_date=datetime.datetime(2016, i, 1)) # Add few random ones self._create_hvc_win(win_date=datetime.datetime(2017, 1, 1)) self._create_hvc_win(win_date=datetime.datetime(2016, 4, 1)) self._create_hvc_win(win_date=datetime.datetime(2016, 5, 1)) self.assertResponse() def test_sector_team_month_1_confirmed(self): """ Tests covering SectorTeam Campaigns API endpoint """ for i in range(4, 13): self._create_hvc_win(win_date=datetime.datetime(2016, i, 1), confirm=True, notify_date=datetime.datetime(2016, i, 1), response_date=datetime.datetime(2016, i, 2)) # Add few random ones self._create_hvc_win(win_date=datetime.datetime(2017, 1, 1), confirm=True, notify_date=datetime.datetime(2017, 1, 1), response_date=datetime.datetime(2017, 1, 2)) self._create_hvc_win(win_date=datetime.datetime(2016, 4, 1), confirm=True, notify_date=datetime.datetime(2016, 4, 1), response_date=datetime.datetime(2016, 4, 2)) self._create_hvc_win(win_date=datetime.datetime(2016, 5, 1), confirm=True, notify_date=datetime.datetime(2016, 5, 1), response_date=datetime.datetime(2016, 5, 2)) self.expected_response["avg_time_to_confirm"] = 1.0 self.expected_response["months"] = [ { "date": "2016-04", "totals": { "export": { "hvc": { "number": { "confirmed": 2, "total": 2, "unconfirmed": 0 }, "value": { "confirmed": 200000, "total": 200000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 2, "grand_total": 2, "unconfirmed": 0 }, "value": { "confirmed": 200000, "grand_total": 200000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 2, "total": 2, "unconfirmed": 0 }, "value": { "confirmed": 4600, "total": 4600, "unconfirmed": 0 } } } }, { "date": "2016-05", "totals": { "export": { "hvc": { "number": { "confirmed": 4, "total": 4, "unconfirmed": 0 }, "value": { "confirmed": 400000, "total": 400000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 4, "grand_total": 4, "unconfirmed": 0 }, "value": { "confirmed": 400000, "grand_total": 400000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 4, "total": 4, "unconfirmed": 0 }, "value": { "confirmed": 9200, "total": 9200, "unconfirmed": 0 } } } }, { "date": "2016-06", "totals": { "export": { "hvc": { "number": { "confirmed": 5, "total": 5, "unconfirmed": 0 }, "value": { "confirmed": 500000, "total": 500000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 5, "grand_total": 5, "unconfirmed": 0 }, "value": { "confirmed": 500000, "grand_total": 500000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 5, "total": 5, "unconfirmed": 0 }, "value": { "confirmed": 11500, "total": 11500, "unconfirmed": 0 } } } }, { "date": "2016-07", "totals": { "export": { "hvc": { "number": { "confirmed": 6, "total": 6, "unconfirmed": 0 }, "value": { "confirmed": 600000, "total": 600000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 6, "grand_total": 6, "unconfirmed": 0 }, "value": { "confirmed": 600000, "grand_total": 600000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 6, "total": 6, "unconfirmed": 0 }, "value": { "confirmed": 13800, "total": 13800, "unconfirmed": 0 } } } }, { "date": "2016-08", "totals": { "export": { "hvc": { "number": { "confirmed": 7, "total": 7, "unconfirmed": 0 }, "value": { "confirmed": 700000, "total": 700000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 7, "grand_total": 7, "unconfirmed": 0 }, "value": { "confirmed": 700000, "grand_total": 700000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 7, "total": 7, "unconfirmed": 0 }, "value": { "confirmed": 16100, "total": 16100, "unconfirmed": 0 } } } }, { "date": "2016-09", "totals": { "export": { "hvc": { "number": { "confirmed": 8, "total": 8, "unconfirmed": 0 }, "value": { "confirmed": 800000, "total": 800000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 8, "grand_total": 8, "unconfirmed": 0 }, "value": { "confirmed": 800000, "grand_total": 800000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 8, "total": 8, "unconfirmed": 0 }, "value": { "confirmed": 18400, "total": 18400, "unconfirmed": 0 } } } }, { "date": "2016-10", "totals": { "export": { "hvc": { "number": { "confirmed": 9, "total": 9, "unconfirmed": 0 }, "value": { "confirmed": 900000, "total": 900000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 9, "grand_total": 9, "unconfirmed": 0 }, "value": { "confirmed": 900000, "grand_total": 900000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 9, "total": 9, "unconfirmed": 0 }, "value": { "confirmed": 20700, "total": 20700, "unconfirmed": 0 } } } }, { "date": "2016-11", "totals": { "export": { "hvc": { "number": { "confirmed": 10, "total": 10, "unconfirmed": 0 }, "value": { "confirmed": 1000000, "total": 1000000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 10, "grand_total": 10, "unconfirmed": 0 }, "value": { "confirmed": 1000000, "grand_total": 1000000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 10, "total": 10, "unconfirmed": 0 }, "value": { "confirmed": 23000, "total": 23000, "unconfirmed": 0 } } } }, { "date": "2016-12", "totals": { "export": { "hvc": { "number": { "confirmed": 11, "total": 11, "unconfirmed": 0 }, "value": { "confirmed": 1100000, "total": 1100000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 11, "grand_total": 11, "unconfirmed": 0 }, "value": { "confirmed": 1100000, "grand_total": 1100000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 11, "total": 11, "unconfirmed": 0 }, "value": { "confirmed": 25300, "total": 25300, "unconfirmed": 0 } } } }, { "date": "2017-01", "totals": { "export": { "hvc": { "number": { "confirmed": 12, "total": 12, "unconfirmed": 0 }, "value": { "confirmed": 1200000, "total": 1200000, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 12, "grand_total": 12, "unconfirmed": 0 }, "value": { "confirmed": 1200000, "grand_total": 1200000, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 12, "total": 12, "unconfirmed": 0 }, "value": { "confirmed": 27600, "total": 27600, "unconfirmed": 0 } } } } ] self.assertResponse() def _test_sector_team_month_1_some_wins_out_of_date(self): """ Check that out of date, wins that were added with date that is not within current financial year are not accounted for """ for i in list(range(3, 13)) + [4, 5]: self._create_hvc_win(win_date=datetime.datetime(2016, i, 1)) # add few more random financial year wins, both in and out for i in [6, 12]: self._create_hvc_win(win_date=datetime.datetime(2015, i, 1)) self._create_hvc_win(win_date=datetime.datetime(2017, 1, 1)) for i in [4, 8]: self._create_hvc_win(win_date=datetime.datetime(2017, i, 1)) self.assertResponse() def test_months_no_wins(self): """ Test, when there are no wins, that the response still spread across all the months from starting from financial start till today (frozen date), albeit all 0 numbers """ def _setup_empty_months_response(): """ Helper to build response """ self.expected_response["months"] = [] fin_year = FinancialYear.objects.get(id=2016) for item in month_iterator(fin_year.start, datetime.datetime(2017, 1, 31)): month_str = '{:d}-{:02d}'.format(*item) month_dict = { "date": month_str, "totals": { "export": { "hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "non_hvc": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } }, "totals": { "number": { "confirmed": 0, "grand_total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "grand_total": 0, "unconfirmed": 0 } } }, "non_export": { "number": { "confirmed": 0, "total": 0, "unconfirmed": 0 }, "value": { "confirmed": 0, "total": 0, "unconfirmed": 0 } } } } self.expected_response["months"].append(month_dict) _setup_empty_months_response() self.assertResponse() def test_number_of_months_in_april(self): """ Check that there will only be one month aggregated data when we are in April, financial year start - with one win """ with freeze_time(self.fin_start_date): self._create_hvc_win(win_date=datetime.datetime(2016, 4, 1)) api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 1) def test_number_of_months_in_april_confirmed(self): """ Check that there will only be one month aggregated data when we are in April, financial year start - with one confirmed win """ with freeze_time(self.fin_start_date): self._create_hvc_win(win_date=datetime.datetime(2016, 4, 1), confirm=True) api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 1) def test_number_of_months_in_april_no_wins(self): """ Check that there will only be one month aggregated data when we are in April, financial year start - with no wins """ with freeze_time(self.fin_start_date): api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 1) def test_number_of_months_in_march_with_wins(self): """ Check that there will be 12 months aggregated data when we are in March, financial year end - with wins all the way """ with freeze_time(self.fin_end_date): for i in range(4, 13): self._create_hvc_win(win_date=datetime.datetime(2016, i, 1)) for i in range(1, 3): self._create_hvc_win(win_date=datetime.datetime(2017, i, 1)) api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 12) def test_number_of_months_in_march_with_confirmed_wins(self): """ Check that there will be 12 months aggregated data when we are in March, financial year end - with confirmed wins all the way """ with freeze_time(self.fin_end_date): for i in range(4, 13): self._create_hvc_win(win_date=datetime.datetime(2016, i, 1), confirm=True) for i in range(1, 3): self._create_hvc_win(win_date=datetime.datetime(2017, i, 1), confirm=True) api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 12) def test_number_of_months_in_march_with_no_wins(self): """ Check that there will be 12 months aggregated data when we are in March, financial year end - with no wins """ with freeze_time(self.fin_end_date): api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 12) def test_number_of_months_in_april_non_hvc(self): """ Check that there will only be one month aggregated data when we are in April, financial year start - with one non hvc win """ with freeze_time(self.fin_start_date): self._create_non_hvc_win(win_date=datetime.datetime(2016, 4, 1)) api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 1) def test_number_of_months_in_march_with_wins_non_hvc(self): """ Check that there will be 12 months aggregated data when we are in March, financial year end - with non hvc wins all the way """ with freeze_time(self.fin_end_date): for i in range(4, 13): self._create_non_hvc_win(win_date=datetime.datetime(2016, i, 1)) for i in range(1, 3): self._create_non_hvc_win(win_date=datetime.datetime(2017, i, 1)) api_response = self._get_api_response(self.url) response_decoded = json.loads(api_response.content.decode("utf-8"))["results"] self.assertEqual(len(response_decoded["months"]), 12)
40.90417
109
0.236283
2,649
55,916
4.844847
0.074745
0.084151
0.100514
0.109397
0.860293
0.786115
0.748481
0.673056
0.616487
0.535609
0
0.085326
0.681415
55,916
1,366
110
40.934114
0.635118
0.026897
0
0.662267
0
0
0.125714
0.000388
0
0
0
0
0.009317
1
0.01087
false
0
0.006211
0
0.01941
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7b730e792c5fc9bb12ff92990e0c69dd2b9ca51e
230
py
Python
App/admin.py
tacha1/E-platform
ad1fd7223e39c430606035f8aa0ecff33f45ff51
[ "MIT" ]
null
null
null
App/admin.py
tacha1/E-platform
ad1fd7223e39c430606035f8aa0ecff33f45ff51
[ "MIT" ]
null
null
null
App/admin.py
tacha1/E-platform
ad1fd7223e39c430606035f8aa0ecff33f45ff51
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import service,Profile,Comments,Rating # Register your models here. admin.site.register(service) admin.site.register(Profile) admin.site.register(Comments) admin.site.register(Rating)
28.75
51
0.826087
32
230
5.9375
0.4375
0.189474
0.357895
0
0
0
0
0
0
0
0
0
0.073913
230
8
52
28.75
0.892019
0.113043
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
7b8807521ca49c220e3f3ce9db799db3f4c155c7
346
py
Python
webapp/app/main/views.py
likit/medtech-webboard
fd52ce235de8dfbd1b6bacdd84ad12a6af8e564f
[ "MIT" ]
null
null
null
webapp/app/main/views.py
likit/medtech-webboard
fd52ce235de8dfbd1b6bacdd84ad12a6af8e564f
[ "MIT" ]
null
null
null
webapp/app/main/views.py
likit/medtech-webboard
fd52ce235de8dfbd1b6bacdd84ad12a6af8e564f
[ "MIT" ]
null
null
null
from . import main from flask import render_template # from ..models import Test @main.route('/') def index(): return render_template('index.html') # @main.route('/test/<test_id>', methods=['GET', 'POST']) # def test(test_id): # # test = Test.query.filter_by(id=test_id).first() # # return render_template('test.html', test=test)
23.066667
57
0.67052
49
346
4.591837
0.428571
0.142222
0.177778
0
0
0
0
0
0
0
0
0
0.147399
346
14
58
24.714286
0.762712
0.592486
0
0
0
0
0.082707
0
0
0
0
0
0
1
0.2
true
0
0.4
0.2
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
4
c89424a56ad9b5a7e5f9bae30acc769bdd7f6669
532
py
Python
src/main/python/org/broadinstitute/hellbender/vqsr_cnn/vqsr_cnn/__init__.py
sunboy0523/gatk
f06971ac0824ad7da38b878334df377c30457a23
[ "BSD-3-Clause" ]
1,273
2015-10-13T18:11:50.000Z
2022-03-28T09:25:13.000Z
src/main/python/org/broadinstitute/hellbender/vqsr_cnn/vqsr_cnn/__init__.py
sunboy0523/gatk
f06971ac0824ad7da38b878334df377c30457a23
[ "BSD-3-Clause" ]
6,471
2015-10-08T02:31:06.000Z
2022-03-31T17:55:25.000Z
src/main/python/org/broadinstitute/hellbender/vqsr_cnn/vqsr_cnn/__init__.py
sunboy0523/gatk
f06971ac0824ad7da38b878334df377c30457a23
[ "BSD-3-Clause" ]
598
2015-10-14T19:16:14.000Z
2022-03-29T10:03:03.000Z
from .models import build_2d_annotation_model_from_args, build_1d_annotation_model_from_args from .models import build_default_1d_annotation_model, build_default_2d_annotation_model from .models import start_session_get_args_and_model, train_model_from_generators from .tensor_maps import get_tensor_channel_map_from_args, tensor_shape_from_args from .arguments import parse_args, weight_path_from_args, annotations_from_args from .inference import score_and_write_batch from .plots import plot_roc_per_class from .defines import *
59.111111
92
0.900376
84
532
5.142857
0.428571
0.111111
0.111111
0.097222
0
0
0
0
0
0
0
0.008097
0.071429
532
8
93
66.5
0.866397
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
c8a9e87964cd19570b120b7055723be4717aa8c6
231
py
Python
conta/views.py
Danieli-Bauer/djangolivre
d06289cebe704463c0e0a639a93ff8debc73d687
[ "MIT" ]
null
null
null
conta/views.py
Danieli-Bauer/djangolivre
d06289cebe704463c0e0a639a93ff8debc73d687
[ "MIT" ]
1
2021-12-01T23:28:54.000Z
2021-12-01T23:28:54.000Z
conta/views.py
Danieli-Bauer/djangolivre
d06289cebe704463c0e0a639a93ff8debc73d687
[ "MIT" ]
4
2021-11-26T21:56:04.000Z
2021-11-30T23:35:43.000Z
from rest_framework import viewsets from conta.models import Conta from conta.serializer import ContaSerializer class ContaViewSet(viewsets.ModelViewSet): queryset = Conta.objects.all() serializer_class = ContaSerializer
25.666667
44
0.818182
26
231
7.192308
0.576923
0.096257
0
0
0
0
0
0
0
0
0
0
0.12987
231
8
45
28.875
0.930348
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
c8bd639ac27620fb65a1e00ad4f5d53bf87321cb
125
py
Python
optalg/line_search/__init__.py
ShkalikovOleh/OptAlg
03399eee50203dcba834a4d9ab48751142a6de2b
[ "MIT" ]
null
null
null
optalg/line_search/__init__.py
ShkalikovOleh/OptAlg
03399eee50203dcba834a4d9ab48751142a6de2b
[ "MIT" ]
3
2021-01-31T09:34:50.000Z
2021-02-21T09:01:42.000Z
optalg/line_search/__init__.py
ShkalikovOleh/OptAlg
03399eee50203dcba834a4d9ab48751142a6de2b
[ "MIT" ]
1
2022-03-31T14:02:20.000Z
2022-03-31T14:02:20.000Z
from .fixed import FixedStep from .armijo_backtracking import ArmijoBacktracking from .bisection_wolfe import BisectionWolfe
31.25
51
0.88
14
125
7.714286
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.096
125
3
52
41.666667
0.955752
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c8bf672be62bed00b064c527998594baf89e7710
6,821
py
Python
src/niveristand/clientapi/_factory.py
arnoldcsorvasi/niveristand-python
39e5593e10bb372c801d6fa521e8fc166dab8cfe
[ "MIT" ]
6
2018-07-04T10:59:43.000Z
2022-03-24T13:34:33.000Z
src/niveristand/clientapi/_factory.py
arnoldcsorvasi/niveristand-python
39e5593e10bb372c801d6fa521e8fc166dab8cfe
[ "MIT" ]
14
2018-11-05T20:05:33.000Z
2022-03-10T12:54:58.000Z
src/niveristand/clientapi/_factory.py
arnoldcsorvasi/niveristand-python
39e5593e10bb372c801d6fa521e8fc166dab8cfe
[ "MIT" ]
15
2018-07-04T07:58:49.000Z
2022-02-22T16:35:26.000Z
from niveristand.clientapi._dotnetclasswrapperbase import _DotNetClassWrapperBase from niveristand.clientapi._stimulusprofilesession import _StimulusProfileSession from niveristand.clientapi._workspace2 import _Workspace2 from NationalInstruments.VeriStand.ClientAPI import Factory as FactoryDotNet # noqa: I100 class _Factory(_DotNetClassWrapperBase): """ Provides access to the NI VeriStand system and the various interfaces available in the Execution API. Any code you write using this API must include a Factory constructor to access NI VeriStand. """ def __init__(self): super(_Factory, self).__init__(FactoryDotNet()) def get_existing_stimulus_profile_session(self, gateway_ip_address, session_id): """ Gets an instance that implements StimulusProfileSession interface. The instance can be used to automate the execution of an already deployed Stimulus Profile Session. Args: gateway_ip_address(str): Specifies the IP address of the VeriStand Gateway. session_id(str): Specifies the Session ID of the deployed Stimulus Profile Session. Returns: niveristand.clientapi._stimulusprofilesession._StimulusProfileSession : A StimulusProfileSession instance """ pass def get_new_stimulus_profile_session(self, gateway_ip_address, name, sequences, description): """ Gets an instance that implements StimulusProfileSession interface. The instance can be used to automate the execution of an already deployed Stimulus Profile Session. Args: gateway_ip_address(str): Specifies the IP address of the VeriStand Gateway. name(str): Specifies the name of the Stimulus Profile Session. sequences([niveristand.clientapi._sequencecallinfo._SequenceCallInfo]): Specifies the sequences to execute in the Stimulus Profile Session. description(str): Specifies a description for the Stimulus Profile Session. Returns: niveristand.clientapi._stimulusprofilesession._StimulusProfileSession : A StimulusProfileSession instance. """ return _StimulusProfileSession( self._dot_net_instance.GetIStimulusProfileSession( gateway_ip_address, name, [seq_call_info.dot_net_instance for seq_call_info in sequences], description)) def get_workspace2(self, gateway_ip_address): """ Gets an instance that implements the Workspace2 interface. The instance can be used use to manage connections between the VeriStand Gateway and one or more targets, to start and stop data logging operations, and to configure events for error and status notifications. This method allows you to specify the IP address of the VeriStand Gateway. Args: gateway_ip_address (str): Specifies the IP address of the VeriStand Gateway. Returns: niveristand.clientapi._workspace2._Workspace2: A Workspace2 instance. """ workspace2 = self._dot_net_instance.GetIWorkspace2(gateway_ip_address) return _Workspace2(workspace2) def get_localhost_workspace2(self): """ Gets an instance that implements the Workspace2 interface. The instance can be used to manage connections between the VeriStand Gateway and one or more targets, to start and stop data logging operations, and to configure events for error and status notifications. This method assumes that the VeriStand Gateway is running on the localhost. Returns: niveristand.clientapi._workspace2._Workspace2: A Workspace2 instance. """ workspace2 = self._dot_net_instance.GetIWorkspace2() return _Workspace2(workspace2) class _DefaultGatewayFactory(object): """ Provides access to the NI VeriStand system and the various interfaces available in the Execution API. All the instances that are created by this class are using the gateway at a default ip address. Any code you write using this API must include a Factory constructor to access NI VeriStand. """ _default_gateway_ip_address = "" _default_workspace = None @classmethod def set_default_gateway_ip_address(cls, gateway_ip_address): """ Sets the default ip address of the gateway. This ip address is to be used by work sessions that do not explicitly specify it for every operation. Args: gateway_ip_address (str): The default ip address of the VeriStand gateway. """ cls._default_gateway_ip_address = gateway_ip_address cls._default_gateway = _Factory().get_workspace2(gateway_ip_address) @classmethod def get_default_gateway_ip_address(cls): """ Gets the default ip address of the gateway. This ip address is to be used by default by work sessions that do not explicitly specify it for every operation. Returns: str: The default ip adderess of the VeriStand gateway. """ return cls._default_gateway_ip_address @classmethod def get_new_stimulus_profile_session(cls, name, sequences, description): """ Gets an instance that implements StimulusProfileSession interface. The instance can be used to automate the execution of an already deployed Stimulus Profile Session. Args: name(str): Specifies the name of the Stimulus Profile Session. sequences([niveristand.clientapi._sequencecallinfo._SequenceCallInfo]): Specifies the sequences to execute in the Stimulus Profile Session. description(str): Specifies a description for the Stimulus Profile Session. Returns: niveristand.clientapi._stimulusprofilesession._StimulusProfileSession : A StimulusProfileSession instance. """ return _Factory().\ get_new_stimulus_profile_session(cls._default_gateway_ip_address, name, sequences, description) @classmethod def get_workspace2(cls): """ Gets an instance that implements the Workspace2 interface. The instance can be used use to manage connections between the VeriStand Gateway and one or more targets, to start and stop data logging operations, and to configure events for error and status notifications. This method allows you to specify the IP address of the VeriStand Gateway. Returns: niveristand.clientapi._workspace2._Workspace2: A Workspace2 instance. """ if cls._default_workspace is None: cls._default_workspace = _Factory().get_workspace2("") return cls._default_workspace
40.844311
120
0.711333
785
6,821
6.006369
0.171975
0.055355
0.061082
0.023754
0.746129
0.721103
0.675716
0.6579
0.6579
0.6579
0
0.005806
0.242486
6,821
166
121
41.090361
0.906716
0.595807
0
0.146341
0
0
0
0
0
0
0
0
0
1
0.219512
false
0.02439
0.097561
0
0.560976
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
c8cda964d5808fb137991862f02688c70bce37d5
289
py
Python
src/services/__init__.py
antkrit/chat
5be816d81e959e6289876900a8b2918c0e741d58
[ "MIT" ]
null
null
null
src/services/__init__.py
antkrit/chat
5be816d81e959e6289876900a8b2918c0e741d58
[ "MIT" ]
null
null
null
src/services/__init__.py
antkrit/chat
5be816d81e959e6289876900a8b2918c0e741d58
[ "MIT" ]
null
null
null
# flake8: noqa F401 """This package contains modules defining models services. Modules: - `chat_service.py`: defines chat service - `message_service.py`: defines message service """ from src.services.chat_service import ChatService from src.services.message_service import MessageService
28.9
58
0.806228
37
289
6.189189
0.540541
0.144105
0.139738
0
0
0
0
0
0
0
0
0.015564
0.110727
289
9
59
32.111111
0.875486
0.602076
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
c8cf37cd6d8f8906f64db6873023dcef5b435017
35
py
Python
xentica/utils/__init__.py
a5kin/xentica
ca08fac9f85af71c9d6d98545a33d50323f851b3
[ "MIT" ]
23
2018-02-24T23:38:54.000Z
2022-02-16T15:20:46.000Z
xentica/utils/__init__.py
a5kin/xentica
ca08fac9f85af71c9d6d98545a33d50323f851b3
[ "MIT" ]
39
2017-11-20T21:54:30.000Z
2020-09-01T12:43:57.000Z
xentica/utils/__init__.py
a5kin/xentica
ca08fac9f85af71c9d6d98545a33d50323f851b3
[ "MIT" ]
4
2019-04-23T03:56:44.000Z
2021-05-14T11:12:54.000Z
"""The collection of utilities."""
17.5
34
0.685714
4
35
6
1
0
0
0
0
0
0
0
0
0
0
0
0.114286
35
1
35
35
0.774194
0.8
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
c8f9041c3d2ac386eddb3a1c20b43936905e0278
534
py
Python
twint/__init__.py
B3QL/twint
521eaf94b44443fe76973234c66069a74b9d79c7
[ "MIT" ]
1
2021-12-11T16:20:09.000Z
2021-12-11T16:20:09.000Z
twint/__init__.py
B3QL/twint
521eaf94b44443fe76973234c66069a74b9d79c7
[ "MIT" ]
null
null
null
twint/__init__.py
B3QL/twint
521eaf94b44443fe76973234c66069a74b9d79c7
[ "MIT" ]
1
2018-10-25T10:38:08.000Z
2018-10-25T10:38:08.000Z
''' TWINT - Twitter Intelligence Tool (formerly known as Tweep). See wiki on Github for in-depth details. https://github.com/haccer/twint/wiki Licensed under MIT License Copyright (c) 2018 Cody Zacharias ''' from .config import Config from . import run #import logging #logger = logging.getLogger() #handler = logging.FileHandler('twint.log') #formatter = logging.Formatter( # '%(asctime)s %(name)-12s %(levelname)-8s %(message)s') #handler.setFormatter(formatter) #logger.addHandler(handler) #logger.setLevel(logging.DEBUG)
26.7
63
0.745318
69
534
5.768116
0.724638
0
0
0
0
0
0
0
0
0
0
0.014894
0.11985
534
20
64
26.7
0.831915
0.870787
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
cdcb3a183aa6e6d3af2a696843804e08311a4bc3
607
py
Python
python_modules/dagster/dagster/core/definitions/executable.py
naralogics/dagster
16d599daa380b800149474fcaff2311b3f8f269a
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/executable.py
naralogics/dagster
16d599daa380b800149474fcaff2311b3f8f269a
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/executable.py
naralogics/dagster
16d599daa380b800149474fcaff2311b3f8f269a
[ "Apache-2.0" ]
null
null
null
from abc import ABCMeta, abstractmethod import six class ExecutablePipeline(six.with_metaclass(ABCMeta)): @abstractmethod def get_definition(self): pass @abstractmethod def build_sub_pipeline(self, solid_subset): pass class InMemoryExecutablePipeline(ExecutablePipeline, object): def __init__(self, pipeline_def): self._pipeline_def = pipeline_def def get_definition(self): return self._pipeline_def def build_sub_pipeline(self, solid_subset): return InMemoryExecutablePipeline(self._pipeline_def.build_sub_pipeline(solid_subset))
24.28
94
0.749588
67
607
6.432836
0.358209
0.12761
0.139211
0.132251
0.157773
0.157773
0.157773
0
0
0
0
0
0.184514
607
24
95
25.291667
0.870707
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.3125
false
0.125
0.125
0.125
0.6875
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
a8137a5266a38dfdee22e6b13768d7a28deecef6
147
py
Python
lastpass/errors.py
djvickery/ulauncher_lastpass_fix
a4a1b487e8016d533f7c55a083615c51f84c6904
[ "MIT" ]
6
2020-06-28T04:30:24.000Z
2021-05-27T16:32:20.000Z
lastpass/errors.py
djvickery/ulauncher_lastpass_fix
a4a1b487e8016d533f7c55a083615c51f84c6904
[ "MIT" ]
4
2020-06-30T14:48:56.000Z
2021-06-03T15:26:52.000Z
lastpass/errors.py
djvickery/ulauncher_lastpass_fix
a4a1b487e8016d533f7c55a083615c51f84c6904
[ "MIT" ]
3
2020-10-03T03:50:15.000Z
2021-07-06T19:23:10.000Z
class LastPassError(Exception): def __init__(self, output): self.output = output class CliNotInstalledException(Exception): pass
18.375
42
0.721088
14
147
7.285714
0.642857
0.196078
0
0
0
0
0
0
0
0
0
0
0.197279
147
7
43
21
0.864407
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.4
0
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
4
a82a76d2186514c7fd1ad1f5f5fede8354e11151
64
py
Python
Archived_Obsoleted/__init__.py
tccao/TwitterCrawlerAnalysis
4ae6258648c1cbbcf23b6e219d9fc4c9e3c24adc
[ "MIT" ]
null
null
null
Archived_Obsoleted/__init__.py
tccao/TwitterCrawlerAnalysis
4ae6258648c1cbbcf23b6e219d9fc4c9e3c24adc
[ "MIT" ]
null
null
null
Archived_Obsoleted/__init__.py
tccao/TwitterCrawlerAnalysis
4ae6258648c1cbbcf23b6e219d9fc4c9e3c24adc
[ "MIT" ]
null
null
null
__all__ = ["auth", "connect", "create_url","headers","imports"]
32
63
0.65625
7
64
5.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.078125
64
1
64
64
0.627119
0
0
0
0
0
0.546875
0
0
0
0
0
0
1
0
false
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b53b90750a01b8607ac49177a02c92828df8d58b
805
py
Python
tests/continuous_tests/interval_tests/test_contains_interval.py
lycantropos/topo
7d777468c98b31533c5e050c4425e528376b35b4
[ "MIT" ]
null
null
null
tests/continuous_tests/interval_tests/test_contains_interval.py
lycantropos/topo
7d777468c98b31533c5e050c4425e528376b35b4
[ "MIT" ]
2
2019-02-22T13:14:30.000Z
2019-04-08T18:28:39.000Z
tests/continuous_tests/interval_tests/test_contains_interval.py
lycantropos/topo
7d777468c98b31533c5e050c4425e528376b35b4
[ "MIT" ]
null
null
null
from tests.utils import implication from topo.continuous import Interval def test_antisymmetry(interval: Interval, other_interval: Interval) -> None: assert implication(interval.overlaps_interval(other_interval) and other_interval.overlaps_interval(interval), interval == other_interval) def test_reflexivity(interval: Interval) -> None: assert interval.overlaps_interval(interval) def test_transitivity(interval: Interval, other_interval: Interval, another_interval: Interval) -> None: assert implication(interval.overlaps_interval(other_interval) and other_interval.overlaps_interval(another_interval), interval.overlaps_interval(another_interval))
38.333333
78
0.690683
77
805
6.974026
0.246753
0.297952
0.268156
0.162011
0.603352
0.394786
0.394786
0.394786
0.394786
0.394786
0
0
0.244721
805
20
79
40.25
0.883224
0
0
0.142857
0
0
0
0
0
0
0
0
0.214286
1
0.214286
false
0
0.142857
0
0.357143
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
b5714ed930200c5f58a3340c1ce33f4333cdc511
1,144
py
Python
dev/Gems/CloudGemMetric/v1/AWS/common-code/Constant/metric_error_code.py
brianherrera/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Constant/metric_error_code.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Constant/metric_error_code.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
# # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or the license accompanying this file. Do not # remove or modify any license notices. This file is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # class Error(object): @staticmethod def exceeded_maximum_metric_capacity(): return "ErrorExceededMaximumMetricCapacity" @staticmethod def missing_attribute(): return "ErrorMissingAttributes" @staticmethod def is_not_lower(): return "ErrorNotLowerCase" @staticmethod def out_of_order(): return "ErrorOutOfOrder" @staticmethod def unable_to_sort(): return "ErrorNotSorted" @staticmethod def is_null(): return "ErrorNullValue" @staticmethod def empty_dataframe(): return "ErrorEmptyDataFrame"
27.902439
85
0.703671
136
1,144
5.830882
0.588235
0.132409
0.030265
0
0
0
0
0
0
0
0
0
0.229895
1,144
41
86
27.902439
0.900114
0.439685
0
0.318182
0
0
0.213946
0.088748
0
0
0
0
0
1
0.318182
true
0
0
0.318182
0.681818
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
4
b57a183d7a4ef5837c3fcb829bac96c34e009b3a
319
py
Python
lib/util/singleton.py
dstodev/Glass
a80e625e6f1451e58443e153fffc133e288c1b99
[ "MIT" ]
null
null
null
lib/util/singleton.py
dstodev/Glass
a80e625e6f1451e58443e153fffc133e288c1b99
[ "MIT" ]
null
null
null
lib/util/singleton.py
dstodev/Glass
a80e625e6f1451e58443e153fffc133e288c1b99
[ "MIT" ]
null
null
null
class Singleton(type): def __new__(meta, name, bases, attrs): attrs["_instance"] = None return super().__new__(meta, name, bases, attrs) def __call__(cls, *args, **kwargs): if not cls._instance: cls._instance = super().__call__(*args, **kwargs) return cls._instance
31.9
61
0.60815
37
319
4.702703
0.513514
0.189655
0.126437
0.183908
0.241379
0
0
0
0
0
0
0
0.253919
319
9
62
35.444444
0.731092
0
0
0
0
0
0.028213
0
0
0
0
0
0
1
0.25
false
0
0
0
0.625
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
a92d28e9a3059eb85ffe162236d3bdb3ad34645c
281
py
Python
tests/pineapple_core/test_types.py
societe-generale/Pineapple
2aad2fbd0d7e231608d1d02bce45a28cd22f82a8
[ "MIT" ]
null
null
null
tests/pineapple_core/test_types.py
societe-generale/Pineapple
2aad2fbd0d7e231608d1d02bce45a28cd22f82a8
[ "MIT" ]
null
null
null
tests/pineapple_core/test_types.py
societe-generale/Pineapple
2aad2fbd0d7e231608d1d02bce45a28cd22f82a8
[ "MIT" ]
null
null
null
import pytest from pineapple_core.core.types import PineappleType, Any def test_that_pineapple_type_is_abstract(): with pytest.raises(NotImplementedError): PineappleType().check(22) def test_that_pineapple_type_is_printable(): assert Any().__repr__() == "Any"
21.615385
56
0.765125
35
281
5.714286
0.628571
0.07
0.11
0.2
0.26
0.26
0
0
0
0
0
0.008264
0.13879
281
12
57
23.416667
0.818182
0
0
0
0
0
0.010676
0
0
0
0
0
0.142857
1
0.285714
true
0
0.285714
0
0.571429
0.142857
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
1
0
0
0
1
0
0
4
a9550a9421eead6979dee28b6a1ab28d69045ede
207
py
Python
assistant/src/app/bot/commands/utils.py
iterlace/knu_assistant
1a0139a04c80e63b5a698a86fc2cf446a3f3cfbb
[ "BSD-2-Clause" ]
1
2021-01-28T11:06:05.000Z
2021-01-28T11:06:05.000Z
assistant/src/app/bot/commands/utils.py
iterlace/knu_assistant
1a0139a04c80e63b5a698a86fc2cf446a3f3cfbb
[ "BSD-2-Clause" ]
null
null
null
assistant/src/app/bot/commands/utils.py
iterlace/knu_assistant
1a0139a04c80e63b5a698a86fc2cf446a3f3cfbb
[ "BSD-2-Clause" ]
null
null
null
from telegram import Update from telegram.ext import CallbackContext from app.bot.dictionaries import states def end(update: Update, ctx: CallbackContext): ctx.user_data.clear() return states.END
20.7
46
0.782609
28
207
5.75
0.607143
0.149068
0
0
0
0
0
0
0
0
0
0
0.149758
207
9
47
23
0.914773
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
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
a98c9e18a8945ed8b8b0e2e77b08e2d7b128cb35
241
py
Python
tests/unit/orchestrate/pods/container/env-checker/executor.py
hirakjyoti08/jina
437943dd2dab87e22b0662b2081f13250918ec01
[ "Apache-2.0" ]
1
2022-02-09T14:14:06.000Z
2022-02-09T14:14:06.000Z
tests/unit/orchestrate/pods/container/env-checker/executor.py
hirakjyoti08/jina
437943dd2dab87e22b0662b2081f13250918ec01
[ "Apache-2.0" ]
1
2022-03-08T18:46:28.000Z
2022-03-08T18:47:24.000Z
tests/unit/orchestrate/pods/container/env-checker/executor.py
hirakjyoti08/jina
437943dd2dab87e22b0662b2081f13250918ec01
[ "Apache-2.0" ]
1
2022-03-17T04:50:07.000Z
2022-03-17T04:50:07.000Z
import os from jina import Executor class EnvChecker(Executor): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) assert os.environ['key1'] == 'value1' assert os.environ['key2'] == 'value2'
24.1
45
0.626556
28
241
5.107143
0.678571
0.13986
0.20979
0
0
0
0
0
0
0
0
0.021164
0.215768
241
9
46
26.777778
0.73545
0
0
0
0
0
0.082988
0
0
0
0
0
0.285714
1
0.142857
false
0
0.285714
0
0.571429
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
a99d10c9a639593d1a7d5955dd3c943881272b3c
147
py
Python
src/controllers/__init__.py
OscarPedaVendere/sc2MultiAgentES
54df34eb94f00294c2bcd1ac5a0c14386c0bbceb
[ "Apache-2.0" ]
null
null
null
src/controllers/__init__.py
OscarPedaVendere/sc2MultiAgentES
54df34eb94f00294c2bcd1ac5a0c14386c0bbceb
[ "Apache-2.0" ]
4
2021-03-19T03:43:34.000Z
2022-01-13T01:39:12.000Z
src/controllers/__init__.py
OscarPedaVendere/sc2MultiAgentES
54df34eb94f00294c2bcd1ac5a0c14386c0bbceb
[ "Apache-2.0" ]
null
null
null
REGISTRY = {} from .basic_controller import BasicMAC from .es_controller import EsMAC REGISTRY["basic_mac"] = BasicMAC REGISTRY["es_mac"] = EsMAC
21
38
0.77551
19
147
5.789474
0.473684
0.290909
0
0
0
0
0
0
0
0
0
0
0.122449
147
7
39
21
0.852713
0
0
0
0
0
0.101351
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
a99f8a9d5a3ba986f8442be760d78c7011c3b74b
85
py
Python
staffs/__init__.py
kvklink/complete-OMR-pipeline
ca1a2890f8d5d716047efaca764b639523a984cb
[ "MIT" ]
1
2021-03-21T09:46:28.000Z
2021-03-21T09:46:28.000Z
staffs/__init__.py
kvklink/complete-OMR-pipeline
ca1a2890f8d5d716047efaca764b639523a984cb
[ "MIT" ]
null
null
null
staffs/__init__.py
kvklink/complete-OMR-pipeline
ca1a2890f8d5d716047efaca764b639523a984cb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Jun 13 17:56:31 2020 @author: super """
10.625
35
0.564706
14
85
3.428571
1
0
0
0
0
0
0
0
0
0
0
0.19403
0.211765
85
7
36
12.142857
0.522388
0.870588
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8d33bd56d431af44c202c524552f14e718567cec
24
py
Python
homeassistant/components/yr/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/yr/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:14:33.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/yr/__init__.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""The yr component."""
12
23
0.583333
3
24
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.125
24
1
24
24
0.666667
0.708333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8d6254db6ad172651e1a0263a3fa199c1feb2efd
814
py
Python
Variado_GeekUniversity/guppe/antes_apos_hooks.py
PauloFTeixeira/curso_python
9040c7dcc5262620f6330bb9637710bb8899bc6b
[ "MIT" ]
null
null
null
Variado_GeekUniversity/guppe/antes_apos_hooks.py
PauloFTeixeira/curso_python
9040c7dcc5262620f6330bb9637710bb8899bc6b
[ "MIT" ]
null
null
null
Variado_GeekUniversity/guppe/antes_apos_hooks.py
PauloFTeixeira/curso_python
9040c7dcc5262620f6330bb9637710bb8899bc6b
[ "MIT" ]
null
null
null
""" Unittest - Antes e após hooks ---- hooks - são os testes em si. Ou seja, a execução dos testes. ---- setup() -> é excutado antes de cada método de teste. É util para criarmos instâncias de objetos e outros dados; tearDown() -> é executado ao final de cada método de teste. É útil para excluir dados ou fechar conexões com bancos de dados. """ import unittest class ModuloTest(unittest.TestCase): def setUp(self): # Configurações do setUp() pass def test_primeiro(self): # setUp vai rodar antes do teste # tearDown() vai rodar após o teste. pass def test_segundo(self): # setUp vai rodar antes do teste # tearDown() vai rodar após o teste. pass def tearDown(self): # Configurações do tearDown() pass
19.853659
111
0.641278
112
814
4.642857
0.482143
0.061538
0.046154
0.053846
0.315385
0.315385
0.238462
0.238462
0.238462
0.238462
0
0
0.281327
814
40
112
20.35
0.888889
0.649877
0
0.4
0
0
0
0
0
0
0
0.05
0
1
0.4
false
0.4
0.1
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
0
0
1
0
0
4
8d88818def71f941f561a8dc6245ac0257424355
503
py
Python
09_bluetooth/OBEX.py
mumbo-pro/network-penetration
30fcc70a0bdb094e2339951785d4d72b0373a71f
[ "MIT" ]
3
2020-07-25T13:36:02.000Z
2021-06-03T19:59:13.000Z
09_bluetooth/OBEX.py
mumbo-pro/understanding-network-hacks
30fcc70a0bdb094e2339951785d4d72b0373a71f
[ "MIT" ]
null
null
null
09_bluetooth/OBEX.py
mumbo-pro/understanding-network-hacks
30fcc70a0bdb094e2339951785d4d72b0373a71f
[ "MIT" ]
2
2019-07-12T10:04:23.000Z
2019-07-18T17:57:59.000Z
#!/usr/bin/python 2 3 import sys 4 from os.path import basename 5 from lightblue.obex import OBEXClient 6 7 8 if len(sys.argv) < 4: 9 print sys.argv[0] + ": <btaddr> <channel> <file>" 10 sys.exit(0) 11 12 btaddr = sys.argv[1] 13 channel = int(sys.argv[2]) 14 my_file = sys.argv[3] 15 16 print "Sending %s to %s on channel %d" % (my_file, 17 btaddr, 18 channel) 19 20 obex = OBEXClient(btaddr, channel) 21 obex.connect() 22 obex.put({’name’: basename(my_file)}, open(my_file, "rb")) 23 obex.disconnect()
503
503
0.693837
96
503
3.59375
0.59375
0.101449
0
0
0
0
0
0
0
0
0
0.098361
0.151093
503
1
503
503
0.709602
0.996024
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8d99e356456dc54f2a8fc9a861e3433ab5ce0890
586
py
Python
employees/serializers.py
gallardowolfcode/test_django
f09a1cfefa0370fd8dd1390d7f99fd4f554b61fb
[ "MIT" ]
null
null
null
employees/serializers.py
gallardowolfcode/test_django
f09a1cfefa0370fd8dd1390d7f99fd4f554b61fb
[ "MIT" ]
null
null
null
employees/serializers.py
gallardowolfcode/test_django
f09a1cfefa0370fd8dd1390d7f99fd4f554b61fb
[ "MIT" ]
null
null
null
from rest_framework import serializers from django.contrib.auth.models import User from .models import Employee from .models import Request class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ['id', 'first_name'] class PostSerializer(serializers.ModelSerializer): user = UserSerializer class EmployeeSerializer(serializers.ModelSerializer): class Meta: model = Employee exclude = ['uuid'] class RequestSerializer(serializers.ModelSerializer): class Meta: model = Request exclude = []
24.416667
54
0.71843
57
586
7.350877
0.45614
0.24821
0.221957
0.250597
0.286396
0
0
0
0
0
0
0
0.206485
586
24
55
24.416667
0.901075
0
0
0.166667
0
0
0.027257
0
0
0
0
0
0
1
0
false
0
0.222222
0
0.666667
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
8d9d34603dfda8b9cd1a6d140b6bde9122759359
14,763
py
Python
training/src/tests/tests/python/sigmoid_cross_entropy_loss_test_2.py
steelONIONknight/bolt
9bd3d08f2abb14435ca3ad0179889e48fa7e9b47
[ "MIT" ]
null
null
null
training/src/tests/tests/python/sigmoid_cross_entropy_loss_test_2.py
steelONIONknight/bolt
9bd3d08f2abb14435ca3ad0179889e48fa7e9b47
[ "MIT" ]
null
null
null
training/src/tests/tests/python/sigmoid_cross_entropy_loss_test_2.py
steelONIONknight/bolt
9bd3d08f2abb14435ca3ad0179889e48fa7e9b47
[ "MIT" ]
null
null
null
# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import tensorflow as tf tf.compat.v1.enable_eager_execution() def _round_up_tf(x, multiple): # Tf version of remainder = x % multiple remainder = tf.mod(x, multiple) # Tf version of return x if remainder == 0 else x + multiple, -remainder x_round = tf.cond( tf.equal(remainder, tf.zeros(tf.shape(remainder), dtype=tf.int32)), lambda: x, lambda: x + multiple, -remainder, ) return x_round def sequence_mask(lengths, r, expand=True): """Returns a 2-D or 3-D tensorflow sequence mask depending on the argument 'expand'""" max_len = tf.reduce_max(lengths) max_len = _round_up_tf(max_len, tf.convert_to_tensor(r)) if expand: return tf.expand_dims( tf.sequence_mask(lengths, maxlen=max_len, dtype=tf.float32), axis=-1 ) return tf.sequence_mask(lengths, maxlen=max_len, dtype=tf.float32) def MaskedSigmoidCrossEntropy( targets, outputs, targets_lengths, outputs_per_step, cross_entropy_pos_weight, mask=None, ): """Computes a masked SigmoidCrossEntropy with logits""" # [batch_size, time_dimension] # example: # sequence_mask([1, 3, 2], 5) = [[1., 0., 0., 0., 0.], # [1., 1., 1., 0., 0.], # [1., 1., 0., 0., 0.]] # Note the maxlen argument that ensures mask shape is compatible with r>1 # This will by default mask the extra paddings caused by r>1 if mask is None: mask = sequence_mask(targets_lengths, outputs_per_step, False) print("mask", mask) with tf.control_dependencies([tf.assert_equal(tf.shape(targets), tf.shape(mask))]): # Use a weighted sigmoid cross entropy to measure the <stop_token> loss. Set hparams.cross_entropy_pos_weight to 1 # will have the same effect as vanilla tf.nn.sigmoid_cross_entropy_with_logits. losses = tf.nn.weighted_cross_entropy_with_logits( targets=targets, logits=outputs, pos_weight=cross_entropy_pos_weight ) print("losses", losses) with tf.control_dependencies([tf.assert_equal(tf.shape(mask), tf.shape(losses))]): masked_loss = losses * mask print("reduce_sum", tf.reduce_sum(masked_loss)) print( "count_nonzero", tf.reduce_sum(tf.count_nonzero(tf.greater(tf.abs(masked_loss), 1e-6))), ) return tf.reduce_sum(masked_loss) / tf.count_nonzero( tf.greater(tf.abs(masked_loss), 1e-6), dtype=tf.float32 ) stop_token_prediction = tf.Variable( [ [ -19.2554722, -19.2172222, -19.7487106, -23.2418308, -23.0357475, -19.9446392, -27.0010834, -26.6425743, -28.5018578, -28.0486679, -27.7838459, -26.1214581, -27.1233, -26.907362, -22.8142586, -27.0453434, -26.7594566, -26.5863934, -26.3179436, -26.0884037, -25.2211628, -24.620985, -24.5142632, -22.1174355, -23.2725945, -23.1596012, -21.0120411, -23.2527103, -23.1696, -18.9072666, -23.2554893, -23.1731701, -18.4311829, -24.0848808, -24.1499138, -15.960947, -25.0092278, -24.9623737, -19.1189365, -26.3438778, -26.154995, -29.2581463, -25.3176689, -25.2528896, -28.2736454, -25.7639732, -25.7637558, -26.8779392, -24.7767124, -24.7134781, -22.3563709, -23.5989647, -23.6536312, -19.5809612, -23.2020531, -23.299015, -22.2237759, -23.5046, -23.6222115, -23.6591587, -23.600338, -23.6569653, -21.160244, -24.86063, -24.9315052, -22.037775, -24.9977646, -25.026741, -21.9423466, -23.6845512, -23.8408508, -19.2570915, -24.6328468, -24.8431606, -22.6878662, -23.3660145, -23.6384182, -21.5760536, -25.1034832, -25.348238, -23.8637543, -26.663229, -26.7145176, -25.336668, -27.2477226, -27.306406, -25.7301979, -28.7218399, -28.8692188, -26.3121185, -29.7668476, -29.9222355, -27.5231705, -28.9869289, -29.1099186, -26.162838, -26.6737137, -26.6174068, -23.7669525, -25.5801525, -25.382597, -24.8046799, -23.8789845, -23.697506, -24.2769432, -22.6485615, -22.6902733, -19.4312019, -25.5100574, -25.7145748, -24.8000069, -25.820364, -25.8850422, -24.9364567, -25.5461807, -25.6516953, -23.3298531, -26.0074, -26.2451801, -25.3116417, -27.9871769, -28.2245426, -27.5163536, -27.2617893, -27.499155, -26.7148914, -27.917696, -28.1484642, -26.3882656, -26.1964741, -26.4671707, -21.5169525, -25.7654495, -25.956953, -21.4978657, -25.4474277, -25.5888271, -21.8175259, -27.0709019, -27.2391357, -25.4488678, -26.6593227, -26.9093361, -24.8338413, -25.5061531, -25.8105183, -23.624918, -25.6026173, -25.8815746, -24.5043125, -25.9096336, -26.0886726, -25.2726841, -26.928133, -27.0977306, -26.1994705, -27.3337383, -27.4392586, -26.3144608, -27.7289352, -27.8782, -24.213871, -25.7142906, -25.8960228, -22.7322845, -25.6535549, -25.8980904, -24.5248547, -26.2106419, -26.4627228, -26.0687141, -26.5431461, -26.7009983, -25.7237949, -26.6101112, -26.6817436, -25.3532429, -26.7699566, -26.9373798, -26.9421253, -26.6608849, -26.9125614, -24.117918, -26.2250576, -26.5464878, -23.1006, -27.6363869, -27.8620872, -25.3283138, -29.9514732, -30.1839752, -26.477644, -29.3066959, -29.4690552, -23.5445633, -29.1421337, -29.2640915, -22.4593296, -28.1416054, -28.2274284, -22.18853, -26.733387, -26.7894478, -21.491787, -26.1531353, -26.1881218, -20.6900272, -24.7998199, -24.7371349, -19.1967335, -21.245182, -21.1941013, -15.3086586, -21.5838165, -21.5323563, -16.0762138, -21.4765892, -21.4428558, -15.7436924, -22.4633045, -22.4034424, -16.9948044, -22.7169952, -22.6739521, -17.8596611, -21.7312, -21.6699924, -14.5657434, -20.6252861, -20.6077271, -13.4298716, -22.6423855, -22.5940323, -18.3120213, -23.1737137, -23.0944881, -17.6568565, -22.7808514, -22.6918087, -16.7538891, -22.4906845, -22.4037457, -16.9209671, -23.021389, -22.9521198, -17.1286907, -22.9245148, -22.8395557, -16.294363, -21.9706516, -21.9045429, -15.5770559, -22.0162334, -21.9441986, -16.1142902, -23.2365379, -23.1556301, -17.2457199, -21.6759892, -21.6193886, -14.4782619, -21.6260395, -21.6478901, -10.49055, ] ], dtype=tf.float32, ) stop_token_target = tf.Variable( [ [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, ] ], dtype=tf.float32, ) targets_lengths = tf.Variable([264], dtype=tf.int32) with tf.GradientTape() as tape: tape.watch(stop_token_prediction) stop_token_loss = MaskedSigmoidCrossEntropy( stop_token_target, stop_token_prediction, targets_lengths, 3, 1 ) print( tf.nn.weighted_cross_entropy_with_logits( targets=[0.0], logits=[-14.4782], pos_weight=1 ) ) print(stop_token_loss) g = tape.gradient(stop_token_loss, stop_token_prediction) # print(g)
22.712308
148
0.373095
1,395
14,763
3.882437
0.356272
0.099335
0.146233
0.192762
0.147895
0.112814
0.112814
0.112814
0.097674
0.081056
0
0.379355
0.527535
14,763
649
149
22.747304
0.397133
0.126126
0
0.448333
0
0
0.002564
0
0
0
0
0
0.003333
1
0.005
false
0
0.001667
0
0.013333
0.01
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8da214011eefba61ee1ac84120ce89720d66b1dd
193
py
Python
coins_project/coins/views.py
desecho/coins
2b5660cbe8108f421741114a5ef1d63f5753d299
[ "MIT" ]
null
null
null
coins_project/coins/views.py
desecho/coins
2b5660cbe8108f421741114a5ef1d63f5753d299
[ "MIT" ]
null
null
null
coins_project/coins/views.py
desecho/coins
2b5660cbe8108f421741114a5ef1d63f5753d299
[ "MIT" ]
null
null
null
from annoying.decorators import render_to from .models import Coin @render_to() def coins(request, template): coins = Coin.objects.all() return {'coins': coins, 'TEMPLATE': template}
21.444444
49
0.725389
25
193
5.52
0.6
0.115942
0
0
0
0
0
0
0
0
0
0
0.15544
193
8
50
24.125
0.846626
0
0
0
0
0
0.067358
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
a5c3d5dea9d13c56ee5b5977d381f45defdda51c
42
py
Python
wave/sound/drum/kick/roll/_roll.py
jedhsu/wave
a05d8f4b0a96722bdc2f5a514646c7a44681982b
[ "Apache-2.0" ]
null
null
null
wave/sound/drum/kick/roll/_roll.py
jedhsu/wave
a05d8f4b0a96722bdc2f5a514646c7a44681982b
[ "Apache-2.0" ]
null
null
null
wave/sound/drum/kick/roll/_roll.py
jedhsu/wave
a05d8f4b0a96722bdc2f5a514646c7a44681982b
[ "Apache-2.0" ]
null
null
null
__all__ = ["Roll"] class Roll: pass
7
18
0.571429
5
42
4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.285714
42
5
19
8.4
0.666667
0
0
0
0
0
0.095238
0
0
0
0
0
0
1
0
false
0.333333
0
0
0.333333
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
0
1
0
0
0
0
0
4
a5eca507fd07b762c4d96945bb09930b8b792f27
19
py
Python
src/backtest/__init__.py
jiangtiantu/JAB
39d91043619c337c07ade87a86f3f876b05ad3e3
[ "MIT" ]
3
2021-05-14T02:27:38.000Z
2021-11-17T11:08:33.000Z
src/backtest/__init__.py
WangChen663/time_series_analysis
e88cee1e414c0851853ef328264f4ffb1f3fa44c
[ "MIT" ]
null
null
null
src/backtest/__init__.py
WangChen663/time_series_analysis
e88cee1e414c0851853ef328264f4ffb1f3fa44c
[ "MIT" ]
null
null
null
__all__ = ['jab']
6.333333
17
0.526316
2
19
3
1
0
0
0
0
0
0
0
0
0
0
0
0.210526
19
3
17
6.333333
0.4
0
0
0
0
0
0.166667
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
a5fa028796462b0722f68976ede8689dd08567f4
165
py
Python
utils/clean_json5.py
bl0x/symbiflow-arch-defs
5fa5e71526e443d589971f2649d8b189df982d72
[ "ISC" ]
183
2017-12-29T12:08:32.000Z
2022-02-15T03:29:07.000Z
utils/clean_json5.py
bl0x/symbiflow-arch-defs
5fa5e71526e443d589971f2649d8b189df982d72
[ "ISC" ]
1,832
2017-12-29T14:47:27.000Z
2022-02-18T06:30:43.000Z
utils/clean_json5.py
bl0x/symbiflow-arch-defs
5fa5e71526e443d589971f2649d8b189df982d72
[ "ISC" ]
96
2017-12-30T12:00:45.000Z
2022-02-17T09:03:46.000Z
import pyjson5 import simplejson import sys def main(): simplejson.dump(pyjson5.load(sys.stdin), sys.stdout, indent=2) if __name__ == "__main__": main()
13.75
66
0.70303
22
165
4.909091
0.636364
0
0
0
0
0
0
0
0
0
0
0.021898
0.169697
165
11
67
15
0.766423
0
0
0
0
0
0.048485
0
0
0
0
0
0
1
0.142857
true
0
0.428571
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
a5fe962e2ae8fbd3b5a025f3d628a06f9d40a633
172
py
Python
moto/applicationautoscaling/__init__.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
5,460
2015-01-01T01:11:17.000Z
2022-03-31T23:45:38.000Z
moto/applicationautoscaling/__init__.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
4,475
2015-01-05T19:37:30.000Z
2022-03-31T13:55:12.000Z
moto/applicationautoscaling/__init__.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
1,831
2015-01-14T00:00:44.000Z
2022-03-31T20:30:04.000Z
from .models import applicationautoscaling_backends from ..core.models import base_decorator mock_applicationautoscaling = base_decorator(applicationautoscaling_backends)
34.4
77
0.889535
17
172
8.705882
0.529412
0.162162
0
0
0
0
0
0
0
0
0
0
0.069767
172
4
78
43
0.925
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
57299ef1c6e5fe65a50710c760d6b9d53e762ebd
36
py
Python
config.py
DSCVITBHOPAL/SAMPARK
4d6e8457a5ec67979934c79bf084a1f74a5777c5
[ "MIT" ]
null
null
null
config.py
DSCVITBHOPAL/SAMPARK
4d6e8457a5ec67979934c79bf084a1f74a5777c5
[ "MIT" ]
null
null
null
config.py
DSCVITBHOPAL/SAMPARK
4d6e8457a5ec67979934c79bf084a1f74a5777c5
[ "MIT" ]
2
2021-01-12T07:24:28.000Z
2021-02-13T04:43:17.000Z
VTAPIKEY="Put your VT API-KEY HERE"
18
35
0.75
7
36
3.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
1
36
36
0.870968
0
0
0
0
0
0.666667
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
57593a1f27b49de9e1e9a5584aa2e0ee054ff794
181
py
Python
Maths_And_Stats/Geometry/Manhattan_Distance/manhattan_dist.py
arslantalib3/algo_ds_101
a1293f407e00b8346f93e8770727f769e7add00e
[ "MIT" ]
182
2020-10-01T17:16:42.000Z
2021-10-04T17:52:49.000Z
Maths_And_Stats/Geometry/Manhattan_Distance/manhattan_dist.py
arslantalib3/algo_ds_101
a1293f407e00b8346f93e8770727f769e7add00e
[ "MIT" ]
759
2020-10-01T00:12:21.000Z
2021-10-04T19:35:11.000Z
Maths_And_Stats/Geometry/Manhattan_Distance/manhattan_dist.py
arslantalib3/algo_ds_101
a1293f407e00b8346f93e8770727f769e7add00e
[ "MIT" ]
1,176
2020-10-01T16:02:13.000Z
2021-10-04T19:20:19.000Z
def calcManhattanDist(x1, y1, x2, y2) -> float: return abs(x1 - x2) + abs(y1 - y2) def main(): print(calcManhattanDist(2, 5, 10, 14)) if __name__ == "__main__": main()
22.625
47
0.607735
26
181
3.923077
0.653846
0
0
0
0
0
0
0
0
0
0
0.098592
0.21547
181
8
48
22.625
0.619718
0
0
0
0
0
0.043956
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
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
1
0
0
0
1
0
0
0
4
9e1c6cff16c58fe94a9b6fdecf6165328e35d3e1
1,024
py
Python
CookiesPool/db.py
authetic-x/Web_Scraping
a1a4126cbe123cbde93680cea77c121507cff003
[ "MIT" ]
null
null
null
CookiesPool/db.py
authetic-x/Web_Scraping
a1a4126cbe123cbde93680cea77c121507cff003
[ "MIT" ]
null
null
null
CookiesPool/db.py
authetic-x/Web_Scraping
a1a4126cbe123cbde93680cea77c121507cff003
[ "MIT" ]
null
null
null
import random import redis from CookiesPool.config import * class RedisClient(): def __init__(self, type, website, host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWORD): self.db = redis.StrictRedis(host=host, port=port, password=password, decode_responses=True) self.type = type self.website = website def name(self): return "{type}:{website}".format(type=self.type, website=self.website) def set(self, username, value): return self.db.hset(self.name(), username, value) def get(self, username): return self.db.hget(self.name(), username) def delete(self, username): return self.db.hdel(self.name(), username) def count(self): return self.db.hlen(self.name()) def random(self): return random.choice(self.db.hvals(self.name())) def usernames(self): return self.db.hkeys(self.name()) def all(self): return self.db.hgetall(self.name())
28.444444
78
0.62207
129
1,024
4.875969
0.310078
0.076312
0.114467
0.076312
0.076312
0
0
0
0
0
0
0
0.25
1,024
36
79
28.444444
0.81901
0
0
0
0
0
0.01561
0
0
0
0
0
0
1
0.346154
false
0.076923
0.115385
0.307692
0.807692
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
f540af3d871c70c7a81ebcb4e3770a5303325aae
2,041
py
Python
shared/reaction_message.py
EDF-Lab/EDF
3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9
[ "MIT" ]
16
2022-02-11T14:49:04.000Z
2022-03-30T07:33:45.000Z
shared/reaction_message.py
EDF-Lab/EDF
3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9
[ "MIT" ]
1
2022-02-16T15:23:50.000Z
2022-02-21T15:30:21.000Z
shared/reaction_message.py
EDF-Lab/EDF
3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9
[ "MIT" ]
1
2022-03-24T10:52:28.000Z
2022-03-24T10:52:28.000Z
""" .. module:: reaction_message :platform: Unix :synopsis: A module that describes what the reaction should be when receiving a specific message. .. Copyright 2022 EDF .. moduleauthor:: Oscar RODRIGUEZ INFANTE, Tony ZHOU, Trang PHAM, Efflam OLLIVIER .. License:: This source code is licensed under the MIT License. """ class ReactionToIncomingMessage: """This is a class that contains any useful information about an incoming message and the reaction to it. """ def __init__(self): self.__message = None self.__extra_data = None self.__msg_type = None @property def message(self): return self.__message @message.setter def message(self, message): self.__message = message @property def extra_data(self): return self.__extra_data @extra_data.setter def extra_data(self, data): self.__extra_data = data @property def next_state(self): return self.__next_state @property def msg_type(self): return self.__msg_type @msg_type.setter def msg_type(self, type_msg): self.__msg_type = type_msg class SendMessage(ReactionToIncomingMessage): """This is a reaction to a message that tells it to send it. Inherits from ReactionToIncomingMessage. """ def __init__(self): super(SendMessage, self).__init__() class TerminateSession(ReactionToIncomingMessage): """This is a reaction to a message that tells it to end the session. Inherits from ReactionToIncomingMessage. """ pass class ChangeState(ReactionToIncomingMessage): """This is a reaction to a message that tells it to change the state. Inherits from ReactionToIncomingMessage. Not really used, so consider removing it. """ pass class PauseSession(ReactionToIncomingMessage): """This is a reaction to a message that tells it to pause the session. Inherits from ReactionToIncomingMessage. Not really used, to be implemented in later versions. """ pass
24.590361
119
0.697697
251
2,041
5.478088
0.342629
0.039273
0.112727
0.116364
0.297455
0.256
0.183273
0.183273
0.183273
0.183273
0
0.002546
0.230279
2,041
82
120
24.890244
0.872693
0.471338
0
0.257143
0
0
0
0
0
0
0
0
0
1
0.257143
false
0.085714
0
0.114286
0.514286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
f54c91c995d37cd120850a89ca37b77460c4de29
167
py
Python
rqalpha/mod/rqalpha_mod_alphaStar_utils/__init__.py
xclxxl414/rqalpha
a2a09dbd6e4af832dca2d113fb15f22d0aa6065f
[ "Apache-2.0" ]
null
null
null
rqalpha/mod/rqalpha_mod_alphaStar_utils/__init__.py
xclxxl414/rqalpha
a2a09dbd6e4af832dca2d113fb15f22d0aa6065f
[ "Apache-2.0" ]
null
null
null
rqalpha/mod/rqalpha_mod_alphaStar_utils/__init__.py
xclxxl414/rqalpha
a2a09dbd6e4af832dca2d113fb15f22d0aa6065f
[ "Apache-2.0" ]
1
2022-02-06T03:29:06.000Z
2022-02-06T03:29:06.000Z
#coding=utf-8 """ @author: evilXu @file: __init__.py.py @time: 2018/2/28 16:58 @description: """ def load_mod(): from .mod import UtilsMod return UtilsMod()
13.916667
29
0.658683
25
167
4.2
0.88
0
0
0
0
0
0
0
0
0
0
0.086957
0.173653
167
12
30
13.916667
0.673913
0.526946
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0.333333
0
1
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
1
0
1
0
0
0
0
4
f571cf8b74af89e9248afc7d3e72091149c49440
187
py
Python
src/daain/utils/zarr_utils.py
merantix/mxlabs-daain
0e87df5dd6e678939374dfadf44fc360d34425bb
[ "Apache-2.0" ]
14
2021-06-01T08:34:09.000Z
2022-02-01T15:45:27.000Z
src/daain/utils/zarr_utils.py
merantix/mxlabs-daain
0e87df5dd6e678939374dfadf44fc360d34425bb
[ "Apache-2.0" ]
null
null
null
src/daain/utils/zarr_utils.py
merantix/mxlabs-daain
0e87df5dd6e678939374dfadf44fc360d34425bb
[ "Apache-2.0" ]
2
2021-07-31T01:58:40.000Z
2022-01-24T14:04:26.000Z
def open_group(group, path): """Creates or loads the subgroup defined by `path`.""" if path in group: return group[path] else: return group.create_group(path)
26.714286
58
0.636364
26
187
4.5
0.615385
0.230769
0
0
0
0
0
0
0
0
0
0
0.256684
187
6
59
31.166667
0.841727
0.256684
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
f57fa41e0f0adc29baa0969c334723c98b693d3c
50
py
Python
src/api/run.py
turiphro/barcode-shopping-list
5311837867efdf7e79040c88ee95ccf29ec3c94c
[ "MIT" ]
2
2020-12-05T15:40:45.000Z
2021-04-20T17:01:11.000Z
src/api/run.py
turiphro/barcode-shopping-list
5311837867efdf7e79040c88ee95ccf29ec3c94c
[ "MIT" ]
null
null
null
src/api/run.py
turiphro/barcode-shopping-list
5311837867efdf7e79040c88ee95ccf29ec3c94c
[ "MIT" ]
null
null
null
from api_svc import create_api api = create_api()
16.666667
30
0.8
9
50
4.111111
0.555556
0.486486
0
0
0
0
0
0
0
0
0
0
0.14
50
3
31
16.666667
0.860465
0
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
f58d437570f8c1957c69d0dda3cc7fa207f26c60
85
py
Python
backend/birds/apps.py
nehakalbande/Birds-Voice-Recognition
da6492d3a3886e0baf148b8e7d13a35e88398f7d
[ "MIT" ]
1
2021-06-14T15:43:38.000Z
2021-06-14T15:43:38.000Z
backend/birds/apps.py
nehakalbande/Birds-Voice-Recognition
da6492d3a3886e0baf148b8e7d13a35e88398f7d
[ "MIT" ]
null
null
null
backend/birds/apps.py
nehakalbande/Birds-Voice-Recognition
da6492d3a3886e0baf148b8e7d13a35e88398f7d
[ "MIT" ]
null
null
null
from django.apps import AppConfig class BirdsConfig(AppConfig): name = 'birds'
14.166667
33
0.741176
10
85
6.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.176471
85
5
34
17
0.9
0
0
0
0
0
0.058824
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
192b18562504a79a90f218906ff986ef69af5134
353
py
Python
rasa_nlu_gao/training_data/__init__.py
1073521013/rasa_nlu_gq
6c8bea1b14390246b39770abc544986f4c7acf26
[ "Apache-2.0" ]
3
2020-08-03T00:21:04.000Z
2021-09-01T06:20:00.000Z
rasa_nlu_gao/training_data/__init__.py
1073521013/rasa_nlu_gq
6c8bea1b14390246b39770abc544986f4c7acf26
[ "Apache-2.0" ]
1
2022-02-10T06:42:23.000Z
2022-02-10T06:42:23.000Z
rasa_nlu_gao/training_data/__init__.py
1073521013/rasa_nlu_gq
6c8bea1b14390246b39770abc544986f4c7acf26
[ "Apache-2.0" ]
4
2019-06-06T08:05:22.000Z
2020-08-07T08:07:22.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from rasa_nlu_gao.training_data.message import Message from rasa_nlu_gao.training_data.training_data import TrainingData from rasa_nlu_gao.training_data.loading import load_data
32.090909
65
0.858357
51
353
5.352941
0.411765
0.14652
0.234432
0.153846
0.285714
0.285714
0
0
0
0
0
0.003145
0.09915
353
10
66
35.3
0.855346
0.05949
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.142857
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
1
0
1
0
1
0
0
4
194fff71b79dd6a7746ebb1ee4d2ecae8b3332ec
133
py
Python
cmd3/__init__.py
futuregrid/cmd3
266bf073457165679d918c238a220a3136f41ed5
[ "Apache-2.0" ]
1
2016-07-16T20:34:52.000Z
2016-07-16T20:34:52.000Z
cmd3/__init__.py
futuregrid/cmd3
266bf073457165679d918c238a220a3136f41ed5
[ "Apache-2.0" ]
null
null
null
cmd3/__init__.py
futuregrid/cmd3
266bf073457165679d918c238a220a3136f41ed5
[ "Apache-2.0" ]
null
null
null
import sys sys.path.append("..") import pkg_resources # part of setuptools __version__ = pkg_resources.require("cmd3")[0].version
19
54
0.75188
18
133
5.222222
0.722222
0.255319
0
0
0
0
0
0
0
0
0
0.016949
0.112782
133
6
55
22.166667
0.779661
0.135338
0
0
0
0
0.053571
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
5fd60a9ad22fb055696cb5b3612d171c1bf0d26f
2,043
py
Python
tests/gitlab_user/unit/FindUserByNameTest.py
flowpl/ansible_gitlab_content
83972d43da8a17b608cfe663915e41e908d8d916
[ "MIT" ]
3
2016-04-30T14:48:45.000Z
2021-02-08T04:43:13.000Z
tests/gitlab_user/unit/FindUserByNameTest.py
flowpl/ansible_gitlab
83972d43da8a17b608cfe663915e41e908d8d916
[ "MIT" ]
null
null
null
tests/gitlab_user/unit/FindUserByNameTest.py
flowpl/ansible_gitlab
83972d43da8a17b608cfe663915e41e908d8d916
[ "MIT" ]
1
2021-02-08T06:28:21.000Z
2021-02-08T06:28:21.000Z
# -*- encoding: utf-8 -*- import unittest import mock import library.gitlab_user class FindUserByNameTest(unittest.TestCase): @mock.patch('library.gitlab_user._send_request') def testAllOK(self, send_request_mock): send_request_mock.return_value = \ {'status': '200 OK'}, \ '[{"username":"someone","id":3,"name":"Test","email":"anyone@something.com"},{"username":"testusername","id":12,"name":"Test","email":"someone@something.com"}]' result = library.gitlab_user._find_user_by_name('http://somedomain.com/api/v3', '576932', 'testusername') self.assertEqual( {"username": "testusername", "id": 12, "name": "Test", "email": "someone@something.com"}, result ) self.assert_send_request_call(send_request_mock) @mock.patch('library.gitlab_user._send_request') def testRequestFailed(self, send_request_mock): send_request_mock.return_value = {'status': '500 Internal Server Error'}, '' result = library.gitlab_user._find_user_by_name('http://somedomain.com/api/v3', '576932', 'testusername') self.assertIsNone(result) self.assert_send_request_call(send_request_mock) @mock.patch('library.gitlab_user._send_request') def testUserNotFound(self, send_request_mock): send_request_mock.return_value = \ {'status': '200 OK'}, \ '[{"username":"someone","id":3,"name":"Test","email":"anyone@something.com"}]' result = library.gitlab_user._find_user_by_name('http://somedomain.com/api/v3', '576932', 'testusername') self.assertIsNone(result) self.assert_send_request_call(send_request_mock) def assert_send_request_call(self, send_request_mock): self.assertEquals('GET', send_request_mock.call_args_list[0][1]['method']) self.assertEquals('http://somedomain.com/api/v3/users', send_request_mock.call_args_list[0][1]['url']) self.assertEquals({'PRIVATE-TOKEN': '576932'}, send_request_mock.call_args_list[0][1]['headers'])
48.642857
172
0.677925
250
2,043
5.252
0.26
0.167555
0.148515
0.057883
0.766946
0.75019
0.75019
0.75019
0.653465
0.653465
0
0.029104
0.15908
2,043
41
173
49.829268
0.735157
0.011258
0
0.454545
0
0.060606
0.324083
0.175421
0
0
0
0
0.30303
1
0.121212
false
0
0.090909
0
0.242424
0
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
5fedc807546a74d258eb66e0d62e41550b9f6a84
109
py
Python
ezdisteach/model/structural/image.py
call-learning/ez-disteach
7636dfdbfb709769824266800ebba18be764ecc3
[ "MIT" ]
null
null
null
ezdisteach/model/structural/image.py
call-learning/ez-disteach
7636dfdbfb709769824266800ebba18be764ecc3
[ "MIT" ]
null
null
null
ezdisteach/model/structural/image.py
call-learning/ez-disteach
7636dfdbfb709769824266800ebba18be764ecc3
[ "MIT" ]
null
null
null
""" Image Model """ from ..base import Base class Image(Base): META_ATTRIBUTES = ['title', 'url']
10.9
38
0.59633
13
109
4.923077
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.229358
109
9
39
12.111111
0.761905
0.100917
0
0
0
0
0.095238
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
5ff1202c23bfc9704086bdf8f2702beb7a67649a
128
py
Python
test/__init__.py
akshayelangovan/fuzzy_template_akshay
b4e13741f18a2acad5b998d7487c992feec303fd
[ "MIT" ]
1
2022-02-22T23:54:34.000Z
2022-02-22T23:54:34.000Z
test/__init__.py
akshayelangovan/fuzzy_template_akshay
b4e13741f18a2acad5b998d7487c992feec303fd
[ "MIT" ]
null
null
null
test/__init__.py
akshayelangovan/fuzzy_template_akshay
b4e13741f18a2acad5b998d7487c992feec303fd
[ "MIT" ]
null
null
null
# This directory can be used to build unit tests for your project # This is very beneficial for collaborating on code as a team
42.666667
65
0.789063
23
128
4.391304
0.913043
0
0
0
0
0
0
0
0
0
0
0
0.195313
128
2
66
64
0.980583
0.960938
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
5ff54893c7378c3e4988dd2b2555a12e0d4f6f85
395
py
Python
dglt/contrib/moses/moses/model/gvae/__init__.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
3
2022-02-06T09:13:51.000Z
2022-02-19T15:03:35.000Z
dglt/contrib/moses/moses/model/gvae/__init__.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
1
2022-02-14T23:16:27.000Z
2022-02-14T23:16:27.000Z
dglt/contrib/moses/moses/model/gvae/__init__.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
null
null
null
from .config import get_train_parser as gvae_parser from .config import get_generate_parser as gvae_generate_parser #from .model_cvae import CVAE as GVAE #from .model_gvae import Model as GVAE from .model_gvae_v2 import Model as GVAE from .trainer import GVAETrainer from .generator import GVAEGenerator __all__ = ['gvae_parser', 'gvae_generate_parser', 'GVAE', 'GVAETrainer', 'GVAEGenerator']
39.5
89
0.817722
58
395
5.258621
0.293103
0.098361
0.098361
0.12459
0.229508
0
0
0
0
0
0
0.002865
0.116456
395
9
90
43.888889
0.87106
0.18481
0
0
1
0
0.184375
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
27022bfde28e0eaf229f8e2c6046c6b952dbd593
193
py
Python
app_metrics/exceptions.py
bencann-bubble/django-app-metrics
ed771f89dd3f9e9adb520aed3ec0c975589d22d4
[ "BSD-3-Clause" ]
121
2015-01-03T19:41:31.000Z
2022-02-28T11:43:57.000Z
app_metrics/exceptions.py
bencann-bubble/django-app-metrics
ed771f89dd3f9e9adb520aed3ec0c975589d22d4
[ "BSD-3-Clause" ]
7
2015-09-19T11:53:03.000Z
2020-07-20T02:34:14.000Z
app_metrics/exceptions.py
bencann-bubble/django-app-metrics
ed771f89dd3f9e9adb520aed3ec0c975589d22d4
[ "BSD-3-Clause" ]
27
2015-01-21T18:48:54.000Z
2022-02-14T05:37:41.000Z
class AppMetricsError(Exception): pass class InvalidMetricsBackend(AppMetricsError): pass class MetricError(AppMetricsError): pass class TimerError(AppMetricsError): pass
12.866667
45
0.761658
16
193
9.1875
0.4375
0.183673
0.326531
0
0
0
0
0
0
0
0
0
0.176166
193
14
46
13.785714
0.924528
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
270787d96373a193bcff5a819abac3328538164b
67
py
Python
pa2checker/__main__.py
aas-integration/integration-test2
dc9a9b4593cd59841f0d8348056cbff80a9c2a21
[ "MIT" ]
3
2016-10-10T20:18:51.000Z
2018-05-01T19:42:10.000Z
pa2checker/__main__.py
aas-integration/integration-test2
dc9a9b4593cd59841f0d8348056cbff80a9c2a21
[ "MIT" ]
38
2016-08-22T03:20:25.000Z
2018-06-11T19:13:05.000Z
pa2checker/__main__.py
aas-integration/integration-test2
dc9a9b4593cd59841f0d8348056cbff80a9c2a21
[ "MIT" ]
7
2016-08-29T17:37:42.000Z
2022-01-28T00:30:10.000Z
import pa2checker if __name__ == '__main__': pa2checker.main()
16.75
26
0.716418
7
67
5.714286
0.714286
0
0
0
0
0
0
0
0
0
0
0.035714
0.164179
67
4
27
16.75
0.678571
0
0
0
0
0
0.117647
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
2708931de8beafe8977a124e170ae572347c18af
198
py
Python
note_project/note_app/models.py
dasap89/django_note_app
498180efde152a2aa52e5adffe091b3b865fa611
[ "MIT" ]
null
null
null
note_project/note_app/models.py
dasap89/django_note_app
498180efde152a2aa52e5adffe091b3b865fa611
[ "MIT" ]
null
null
null
note_project/note_app/models.py
dasap89/django_note_app
498180efde152a2aa52e5adffe091b3b865fa611
[ "MIT" ]
null
null
null
from django.db import models class Note(models.Model): note_text = models.TextField() created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return note_text
19.8
56
0.717172
27
198
4.925926
0.777778
0.120301
0
0
0
0
0
0
0
0
0
0
0.19697
198
9
57
22
0.836478
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0.166667
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
2785a9b76d269aff0fc047dc13937f9b21b25bb6
164
py
Python
Dublin_Bikes/weather_predictor_scraper/run_weather_predictor.py
TeamCGS/Dublin_Bikes
bdd7f79da3761456aef15b1bf01d0e2615462dd4
[ "BSD-3-Clause" ]
null
null
null
Dublin_Bikes/weather_predictor_scraper/run_weather_predictor.py
TeamCGS/Dublin_Bikes
bdd7f79da3761456aef15b1bf01d0e2615462dd4
[ "BSD-3-Clause" ]
null
null
null
Dublin_Bikes/weather_predictor_scraper/run_weather_predictor.py
TeamCGS/Dublin_Bikes
bdd7f79da3761456aef15b1bf01d0e2615462dd4
[ "BSD-3-Clause" ]
null
null
null
import weather_predictor_scraper def main (): #scraper.main() Scraper1 = weather_predictor_scraper.Weather() Scraper1.getWeatherData() main()
18.222222
50
0.70122
16
164
6.9375
0.5
0.288288
0.414414
0
0
0
0
0
0
0
0
0.015267
0.20122
164
9
51
18.222222
0.832061
0.085366
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
27db371433c5a71065995f6ff53bb8081caa5f15
829
py
Python
password_generator/models.py
CoderSsVartak/password_generator
85c5a655b13645f6c6a46d2c6f8e8a3eae1a707f
[ "MIT" ]
null
null
null
password_generator/models.py
CoderSsVartak/password_generator
85c5a655b13645f6c6a46d2c6f8e8a3eae1a707f
[ "MIT" ]
null
null
null
password_generator/models.py
CoderSsVartak/password_generator
85c5a655b13645f6c6a46d2c6f8e8a3eae1a707f
[ "MIT" ]
1
2021-05-04T11:57:20.000Z
2021-05-04T11:57:20.000Z
from password_generator import db, login_manager from flask_login import UserMixin @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) class User(UserMixin, db.Model): __tablename__ = 'user' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(120), nullable=False) username = db.Column(db.String(20), unique=True, nullable=False) email = db.Column(db.String(120), unique=True, nullable=False) contact = db.Column(db.String(10), nullable=False) password = db.Column(db.String(120), nullable=False) sec_qns = db.Column(db.String(120), nullable=False) sec_ans = db.Column(db.String(30), nullable=False) def __repr__(self): return f"User('{self.username}', '{self.email}', '{self.password}')"
31.884615
77
0.68275
117
829
4.675214
0.376068
0.117002
0.146252
0.204753
0.221207
0.186472
0.186472
0.127971
0
0
0
0.026316
0.17491
829
25
78
33.16
0.773392
0
0
0
0
0
0.077307
0.028678
0
0
0
0
0
1
0.117647
false
0.176471
0.117647
0.117647
0.941176
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
1
1
0
0
4
27efd4108cfa7b13ba71ad0a4750f274c97baf61
258
py
Python
sec_dl/main.py
Peppershaker/sec_dl
30f0176409c8189fa223637e9734904d8ac94001
[ "MIT" ]
null
null
null
sec_dl/main.py
Peppershaker/sec_dl
30f0176409c8189fa223637e9734904d8ac94001
[ "MIT" ]
null
null
null
sec_dl/main.py
Peppershaker/sec_dl
30f0176409c8189fa223637e9734904d8ac94001
[ "MIT" ]
null
null
null
from sec_dl.utils.init_tables import init_all_tables from sec_dl.utils.scrape_all_filings import process_filings from sec_dl.utils.load_filings_idx import load_filings if __name__ == "__main__": init_all_tables() load_filings() process_filings()
32.25
59
0.813953
40
258
4.65
0.4
0.112903
0.145161
0.225806
0
0
0
0
0
0
0
0
0.120155
258
8
60
32.25
0.819383
0
0
0
0
0
0.030888
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
fda3c87e61ed0764fbf73a4a72e03a3feda37d16
155
py
Python
main.py
numericalresearch/cloudrisk
845c1882e48d5a80c1b9a8be336376aea99ba457
[ "BSD-3-Clause" ]
null
null
null
main.py
numericalresearch/cloudrisk
845c1882e48d5a80c1b9a8be336376aea99ba457
[ "BSD-3-Clause" ]
null
null
null
main.py
numericalresearch/cloudrisk
845c1882e48d5a80c1b9a8be336376aea99ba457
[ "BSD-3-Clause" ]
null
null
null
from azure.cosmos import CosmosClient import os url = os.environ['ACCOUNT_URI'] key = os.environ['ACCOUNT_KEY'] client = CosmosClient(url, credential=key)
25.833333
42
0.780645
22
155
5.409091
0.590909
0.151261
0.268908
0
0
0
0
0
0
0
0
0
0.103226
155
6
42
25.833333
0.856115
0
0
0
0
0
0.141026
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
fdbc179e9f37aec14b91dd48dbae66c786182a2c
259
py
Python
Jupyter/AODBW.py
MooersLab/jupyterlabpymolpysnipsplus
b886750d63372434df53d4d6d7cdad6cb02ae4e7
[ "MIT" ]
null
null
null
Jupyter/AODBW.py
MooersLab/jupyterlabpymolpysnipsplus
b886750d63372434df53d4d6d7cdad6cb02ae4e7
[ "MIT" ]
null
null
null
Jupyter/AODBW.py
MooersLab/jupyterlabpymolpysnipsplus
b886750d63372434df53d4d6d7cdad6cb02ae4e7
[ "MIT" ]
null
null
null
# Description: Run the AODBW function from the pymolshortcuts.py file to generate photorealistic effect with carbons colored black and all other atoms colored in grayscale. # Source: placeHolder """ cmd.do('cmd.do("AODBW")') """ cmd.do('cmd.do("AODBW")')
28.777778
173
0.737452
37
259
5.162162
0.72973
0.104712
0.08377
0.104712
0.157068
0
0
0
0
0
0
0
0.138996
259
8
174
32.375
0.856502
0.84556
0
0
1
0
0.483871
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
fdcfc1d0395a71f06e4aa1b38dc65d040c2eebed
188
py
Python
imgy/http.py
pirvanc/imgy
614aaa925bf054e577d09b824ba5d5fc35d66231
[ "MIT" ]
null
null
null
imgy/http.py
pirvanc/imgy
614aaa925bf054e577d09b824ba5d5fc35d66231
[ "MIT" ]
null
null
null
imgy/http.py
pirvanc/imgy
614aaa925bf054e577d09b824ba5d5fc35d66231
[ "MIT" ]
null
null
null
import requests import boto3 BUCKET_NAME = 'imgy' def upload_file(filename): # Create an S3 client raise NotImplementedError def download_file(): raise NotImplementedError
14.461538
29
0.755319
22
188
6.318182
0.772727
0.345324
0
0
0
0
0
0
0
0
0
0.013158
0.191489
188
12
30
15.666667
0.901316
0.101064
0
0.285714
0
0
0.023952
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0
0.571429
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
1
0
0
0
0
1
0
0
4
fdf577ba4213009ae3ec232ceb4d25ade9784a7d
333
py
Python
pytpp/attributes/generational_credential.py
Venafi/pytpp
42af655b2403b8c9447c86962abd4aaa0201f646
[ "MIT" ]
4
2022-02-04T23:58:55.000Z
2022-02-15T18:53:08.000Z
pytpp/attributes/generational_credential.py
Venafi/pytpp
42af655b2403b8c9447c86962abd4aaa0201f646
[ "MIT" ]
null
null
null
pytpp/attributes/generational_credential.py
Venafi/pytpp
42af655b2403b8c9447c86962abd4aaa0201f646
[ "MIT" ]
null
null
null
from pytpp.attributes._helper import IterableMeta, Attribute from pytpp.attributes.credential_base import CredentialBaseAttributes class GenerationalCredentialAttributes(CredentialBaseAttributes, metaclass=IterableMeta): __config_class__ = "Generational Credential" last = Attribute('Last') visibility = Attribute('Visibility')
37
89
0.84985
29
333
9.517241
0.586207
0.065217
0.137681
0
0
0
0
0
0
0
0
0
0.081081
333
8
90
41.625
0.901961
0
0
0
0
0
0.111111
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
fdfe4b88f913661a78c3017b55b095fa958ec045
117
py
Python
test.py
salvatoreraccardi/Poisson_Chart_Generator
95ed5611a82cfd130d9a3222b1d7e922abb8fc61
[ "MIT" ]
null
null
null
test.py
salvatoreraccardi/Poisson_Chart_Generator
95ed5611a82cfd130d9a3222b1d7e922abb8fc61
[ "MIT" ]
null
null
null
test.py
salvatoreraccardi/Poisson_Chart_Generator
95ed5611a82cfd130d9a3222b1d7e922abb8fc61
[ "MIT" ]
null
null
null
import math def poisson(n, mi): value = math.exp(-mi) * ( math.pow(mi, n) / math.factorial(n) ) return value
23.4
67
0.615385
19
117
3.789474
0.578947
0
0
0
0
0
0
0
0
0
0
0
0.213675
117
5
68
23.4
0.782609
0
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
fdff65d27b565dc559ea401d9e9bb00c587e6439
183
py
Python
cakes.py
s1782662/codewars
db423df43f5ec2202ff42f9bf87d1053a8d4aa43
[ "MIT" ]
null
null
null
cakes.py
s1782662/codewars
db423df43f5ec2202ff42f9bf87d1053a8d4aa43
[ "MIT" ]
null
null
null
cakes.py
s1782662/codewars
db423df43f5ec2202ff42f9bf87d1053a8d4aa43
[ "MIT" ]
null
null
null
recipes,available = {'flour': 500, 'sugar': 200, 'eggs': 1}, {'flour': 1200, 'sugar': 1200, 'eggs': 5, 'milk': 200} print(min([available.get(k,0) // recipes[k] for k in recipes]))
36.6
115
0.601093
28
183
3.928571
0.642857
0
0
0
0
0
0
0
0
0
0
0.127389
0.142077
183
4
116
45.75
0.573248
0
0
0
0
0
0.174863
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
e3390624a907c023ce5fdbfde4d99e17d471b412
7,337
py
Python
demo_image_processing.py
2e0byo/pygallica-autobib
d4be6938596805a0078c21f8351aa6a25c7c54e0
[ "MIT" ]
null
null
null
demo_image_processing.py
2e0byo/pygallica-autobib
d4be6938596805a0078c21f8351aa6a25c7c54e0
[ "MIT" ]
2
2021-05-12T09:42:23.000Z
2021-05-12T09:43:45.000Z
demo_image_processing.py
2e0byo/pygallica-autobib
d4be6938596805a0078c21f8351aa6a25c7c54e0
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import numpy as np from PIL import ImageOps from gallica_autobib.gallipy import Resource from gallica_autobib.process import extract_image from PyPDF4 import PdfFileReader from io import BytesIO import matplotlib.pyplot as plt import matplotlib.image as mpimg from matplotlib.patches import Rectangle from collections import namedtuple Point = namedtuple("Point", ["x", "y"]) Box = namedtuple("Box", ["upper", "lower"]) ark = "https://gallica.bnf.fr/ark:/12148/bpt6k65545564" r = Resource(ark) def fetch_stuff(pno): pg = r.content_sync(startview=pno, nviews=1, mode="pdf").value reader = PdfFileReader(BytesIO(pg)) data, type_ = extract_image(reader.getPage(2)) ocr = r.ocr_data_sync(view=pno).value soup = BeautifulSoup(ocr.decode()) upper_bound = [0, 0] lower_bound = [0, 0] page = soup.find("page") height, width = int(page.get("height")), int(page.get("width")) xscale = data.height / height yscale = data.width / width height *= yscale printspace = soup.find("printspace") text_height = round(int(printspace.get("height")) * yscale) text_width = round(int(printspace.get("width")) * xscale) vpos = int(printspace.get("vpos")) * yscale hpos = int(printspace.get("hpos")) * xscale upper = Point(round(hpos), round(vpos)) return upper, text_height, text_width, data, height def gen_doc_data(): pno = 128 upper, text_height, text_width, data, height = fetch_stuff(pno) fig, ax = plt.subplots() plt.imshow(data) text_box = ax.add_patch( Rectangle( upper, text_width, text_height, edgecolor="red", facecolor="none", lw=2 ) ) fig.savefig( "docs/img/content_box.svg", bbox_inches="tight", transparent=True, dpi=72 ) ax2 = ax.twiny() a = np.array(ImageOps.grayscale(data)) mean = a.mean(axis=1) ax2.plot(mean, range(len(mean)), label="mean") gradient = np.gradient(mean) + 70 ax2.plot(gradient, range(len(gradient)), color="green", label="differential") plt.legend() fig.savefig("docs/img/mean.svg", bbox_inches="tight", transparent=True, dpi=72) gstd = np.std(gradient) gmean = gradient.mean() ax2.vlines([gmean - 1.5 * gstd, gmean + 1.5 * gstd], 0, data.height, color="orange") fig.savefig( "docs/img/mean_bounds.svg", bbox_inches="tight", transparent=True, dpi=72 ) search = round(height * 0.05) upper_bound = upper.y - search search_height = text_height + 2 * search search_upper = Point(upper.x, upper_bound) search_box = ax.add_patch( Rectangle( search_upper, text_width, search_height, edgecolor="green", facecolor="none", lw=1, ) ) fig.savefig("docs/img/search.svg", bbox_inches="tight", transparent=True, dpi=72) upper_search = gradient[upper_bound : upper.y] lower_search = gradient[upper.y + text_height : upper_bound + search_height] lower_thresh = gmean - 1.5 * gstd upper_thresh = gmean + 1.5 * gstd peaked = 0 for up, x in enumerate(reversed(upper_search)): if not peaked and x >= upper_thresh: peaked = 1 if peaked and x <= lower_thresh: peaked = 2 print("Line above detected.") break up = up if peaked == 2 else 0 peaked = 0 for down, x in enumerate(lower_search): if not peaked and x <= lower_thresh: peaked = 1 if peaked and x >= upper_thresh: peaked = 2 print("Line below detected.") break down = down if peaked == 2 else 0 final_upper = Point(upper.x, upper.y - up) final_height = text_height + up + down search_box = ax.add_patch( Rectangle( final_upper, text_width, final_height, edgecolor="pink", facecolor="none", lw=1, ) ) fig.savefig("docs/img/searched.svg", bbox_inches="tight", transparent=True, dpi=72) stretch = round(height * 0.005) streched_upper = Point(final_upper[0] - stretch, final_upper[1] - 2 * stretch) stretched_width = text_width + 2 * stretch stretched_height = final_height + 4 * stretch fig, ax = plt.subplots() plt.imshow(data) final_box = ax.add_patch( Rectangle( streched_upper, stretched_width, stretched_height, edgecolor="black", facecolor="none", lw=1, ) ) fig.savefig("docs/img/stretched.svg", bbox_inches="tight", transparent=True, dpi=72) def process_page(pno): upper, text_height, text_width, data, height = fetch_stuff(pno) fig, ax = plt.subplots() plt.imshow(data) text_box = ax.add_patch( Rectangle( upper, text_width, text_height, edgecolor="red", facecolor="none", lw=2 ) ) ax2 = ax.twiny() a = np.array(ImageOps.grayscale(data)) mean = a.mean(axis=1) gradient = np.gradient(mean) + 70 ax2.plot(gradient, range(len(gradient)), color="green", label="differential") gstd = np.std(gradient) gmean = gradient.mean() ax2.vlines([gmean - 1.5 * gstd, gmean + 1.5 * gstd], 0, data.height, color="orange") search = round(height * 0.05) upper_bound = upper.y - search search_height = text_height + 2 * search search_upper = Point(upper.x, upper_bound) search_box = ax.add_patch( Rectangle( search_upper, text_width, search_height, edgecolor="green", facecolor="none", lw=1, ) ) upper_search = gradient[upper_bound : upper.y] lower_search = gradient[upper.y + text_height : upper_bound + search_height] lower_thresh = gmean - 1.5 * gstd upper_thresh = gmean + 1.5 * gstd peaked = 0 for up, x in enumerate(reversed(upper_search)): if not peaked and x >= upper_thresh: peaked = 1 if peaked and x <= lower_thresh: peaked = 2 print("Line above detected.") break up = up if peaked == 2 else 0 peaked = 0 for down, x in enumerate(lower_search): if not peaked and x <= lower_thresh: peaked = 1 if peaked and x >= upper_thresh: peaked = 2 print("Line below detected.") break down = down if peaked == 2 else 0 final_upper = Point(upper.x, upper.y - up) final_height = text_height + up + down search_box = ax.add_patch( Rectangle( final_upper, text_width, final_height, edgecolor="pink", facecolor="none", lw=1, ) ) stretch = round(height * 0.005) streched_upper = Point(final_upper[0] - stretch, final_upper[1] - 2 * stretch) stretched_width = text_width + 2 * stretch stretched_height = final_height + 4 * stretch final_box = ax.add_patch( Rectangle( streched_upper, stretched_width, stretched_height, edgecolor="black", facecolor="none", lw=1, ) ) gen_doc_data() # process_page(128) # process_page(136) # process_page(79) # process_page(136)
30.193416
88
0.60338
935
7,337
4.591444
0.170053
0.027952
0.014908
0.024225
0.736548
0.726765
0.726765
0.712089
0.6471
0.6471
0
0.025185
0.280224
7,337
242
89
30.318182
0.78773
0.009541
0
0.688995
0
0
0.064307
0.012531
0
0
0
0
0
1
0.014354
false
0
0.052632
0
0.07177
0.043062
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
e33fb4bf93f1b084c8ddd0e19b03d5287591547a
123
py
Python
handler.py
samsonjj/learning-code-deploy
3906e1cd222b1fa07e9a3189d498b25963349400
[ "Apache-2.0" ]
null
null
null
handler.py
samsonjj/learning-code-deploy
3906e1cd222b1fa07e9a3189d498b25963349400
[ "Apache-2.0" ]
null
null
null
handler.py
samsonjj/learning-code-deploy
3906e1cd222b1fa07e9a3189d498b25963349400
[ "Apache-2.0" ]
null
null
null
def handle_request(): print("hello world!") return "hello world!" if __name__ == '__main__': handle_request()
17.571429
26
0.650407
14
123
5
0.714286
0.371429
0
0
0
0
0
0
0
0
0
0
0.203252
123
6
27
20.5
0.714286
0
0
0
0
0
0.260163
0
0
0
0
0
0
1
0.2
true
0
0
0
0.4
0.2
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
e350d462a0db36f527fd49bef3a6cef8aa218a07
248
py
Python
plugins/dialectizer/lower.py
UltrosBot/Ultros
639efc11f73ebf7e8f47f0554aced00a559d9e2d
[ "Artistic-2.0" ]
16
2015-01-02T00:16:11.000Z
2019-06-03T06:23:11.000Z
plugins/dialectizer/lower.py
UltrosBot/Ultros
639efc11f73ebf7e8f47f0554aced00a559d9e2d
[ "Artistic-2.0" ]
31
2015-01-18T12:14:53.000Z
2018-01-07T13:32:29.000Z
plugins/dialectizer/lower.py
UltrosBot/Ultros
639efc11f73ebf7e8f47f0554aced00a559d9e2d
[ "Artistic-2.0" ]
9
2015-02-13T09:38:53.000Z
2020-11-29T19:59:32.000Z
# coding=utf-8 """ Lowercase dialectizer """ __author__ = "Gareth Coles" from plugins.dialectizer import Dialectizer class Lower(Dialectizer): """ Lowercase dialectizer """ def sub(self, string): return string.lower()
13.052632
43
0.66129
25
248
6.4
0.72
0.25
0
0
0
0
0
0
0
0
0
0.005181
0.221774
248
18
44
13.777778
0.823834
0.229839
0
0
0
0
0.071429
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
e35337fa9a37627ba458b965a5885017dc7239f1
592
py
Python
autocheck/__main__.py
htmue/python-autocheck
d97b2b21697e7bada5e33229efe075a668b3bbf3
[ "Unlicense" ]
4
2015-04-20T23:55:11.000Z
2016-08-26T10:38:11.000Z
autocheck/__main__.py
htmue/python-autocheck
d97b2b21697e7bada5e33229efe075a668b3bbf3
[ "Unlicense" ]
null
null
null
autocheck/__main__.py
htmue/python-autocheck
d97b2b21697e7bada5e33229efe075a668b3bbf3
[ "Unlicense" ]
null
null
null
# -*- coding:utf-8 -*- # Created by Hans-Thomas on 2011-05-13. #============================================================================= # __main__.py --- Test runner entry point #============================================================================= from __future__ import absolute_import, unicode_literals import os.path import sys from .main import main if sys.argv[0].endswith('__main__.py'): sys.argv[0:1] = [os.path.abspath(sys.executable), '-m', 'autocheck'] main() #............................................................................. # __main__.py
28.190476
78
0.415541
54
592
4.222222
0.648148
0.078947
0.070175
0
0
0
0
0
0
0
0
0.02243
0.096284
592
20
79
29.6
0.403738
0.58277
0
0
0
0
0.09205
0
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
e36129e68ed6d7a6c33e20e1ee089e4c0517f538
151
py
Python
Courses/1 month/3 week/day 5/123.py
emir-naiz/first_git_lesson
1fecf712290f6da3ef03deff518870d91638eb69
[ "MIT" ]
null
null
null
Courses/1 month/3 week/day 5/123.py
emir-naiz/first_git_lesson
1fecf712290f6da3ef03deff518870d91638eb69
[ "MIT" ]
null
null
null
Courses/1 month/3 week/day 5/123.py
emir-naiz/first_git_lesson
1fecf712290f6da3ef03deff518870d91638eb69
[ "MIT" ]
null
null
null
string = "Emir Nazira Zarina Aijana Sultan Danil Adis" string = string.replace('Emir', 'Baizak') string = string.replace('Nazira', 'l') print(string)
25.166667
54
0.721854
20
151
5.45
0.6
0.220183
0.348624
0
0
0
0
0
0
0
0
0
0.125828
151
6
55
25.166667
0.825758
0
0
0
0
0
0.394737
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
e3641a7fdc75852e9afd5539dd38436b40f27746
104
py
Python
abc/075/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
abc/075/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
abc/075/A.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
A, B, C = map(int, input().split()) if A == B: print(C) elif A == C: print(B) else: print(A)
14.857143
35
0.490385
20
104
2.55
0.55
0.078431
0
0
0
0
0
0
0
0
0
0
0.278846
104
7
36
14.857143
0.68
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0.428571
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
e36b102f3a9e8df98cb977fbc6e46a7d25cb2234
116
py
Python
ramda/remove.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
1
2022-03-14T07:35:13.000Z
2022-03-14T07:35:13.000Z
ramda/remove.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
3
2022-03-24T02:30:18.000Z
2022-03-31T07:46:04.000Z
ramda/remove.py
zydmayday/pamda
6740d0294f3bedbeeef3bbc3042a43dceb3239b2
[ "MIT" ]
null
null
null
from .private._curry3 import _curry3 remove = _curry3(lambda start, count, arr: arr[:start] + arr[start + count:])
29
77
0.724138
16
116
5.0625
0.5625
0.246914
0
0
0
0
0
0
0
0
0
0.03
0.137931
116
3
78
38.666667
0.78
0
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
8b657cc49dbf3600d2b63776448476d18909576d
246
py
Python
hdltools/codegen/__init__.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
2
2020-02-28T13:02:39.000Z
2021-06-30T09:15:35.000Z
hdltools/codegen/__init__.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
1
2020-03-22T17:32:45.000Z
2020-03-23T15:43:39.000Z
hdltools/codegen/__init__.py
brunosmmm/hdltools
a98ca8c4d168740fa229c939a7b1f31ea73eec24
[ "MIT" ]
null
null
null
"""Code generation primitives.""" import hdltools.verilog.codegen import hdltools.specc.codegen BUILTIN_CODE_GENERATORS = { "verilog": hdltools.verilog.codegen.VerilogCodeGenerator, "specc": hdltools.specc.codegen.SpecCCodeGenerator, }
24.6
61
0.784553
24
246
7.958333
0.5
0.146597
0.230366
0
0
0
0
0
0
0
0
0
0.101626
246
9
62
27.333333
0.864253
0.109756
0
0
0
0
0.056338
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
8b774a69af03bcaeee97496d1e1c622b6386368e
123
py
Python
1097.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
3
2020-11-25T19:05:31.000Z
2021-03-29T07:29:36.000Z
1097.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
1097.py
FahimFBA/URI-Problem-Solve
d718a95e5a873dffbce19d850998e8917ec87ebb
[ "Apache-2.0" ]
null
null
null
i = 1 j = 7 while(i<10): for x in range(3): print("I=%d J=%d" %(i,j)) j += -1 i += 2 j = i + 6
13.666667
33
0.341463
26
123
1.615385
0.576923
0
0
0
0
0
0
0
0
0
0
0.114286
0.430894
123
9
34
13.666667
0.485714
0
0
0
0
0
0.072581
0
0
0
0
0
0
1
0
false
0
0
0
0
0.125
1
0
1
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
8b87e66d4743ed28e552250b874d24e377cd7bf6
42
py
Python
media/transcripts/chess_byKNdsN.py
pandeyarjun242/submission
811fb8ed5854531848aa430c5c998b8e6c463137
[ "MIT" ]
null
null
null
media/transcripts/chess_byKNdsN.py
pandeyarjun242/submission
811fb8ed5854531848aa430c5c998b8e6c463137
[ "MIT" ]
null
null
null
media/transcripts/chess_byKNdsN.py
pandeyarjun242/submission
811fb8ed5854531848aa430c5c998b8e6c463137
[ "MIT" ]
null
null
null
class Black(): is_checkmated = False
14
26
0.666667
5
42
5.4
1
0
0
0
0
0
0
0
0
0
0
0
0.238095
42
2
27
21
0.84375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
8b925a1db501a1e691685298af3ab930a5064b76
166
py
Python
Coding/Python_Prgs/itertools.product().py
Phantom586/My_Codes
900c4e5e95ab833e4f78f1594e3b25178a74f1a7
[ "MIT" ]
null
null
null
Coding/Python_Prgs/itertools.product().py
Phantom586/My_Codes
900c4e5e95ab833e4f78f1594e3b25178a74f1a7
[ "MIT" ]
null
null
null
Coding/Python_Prgs/itertools.product().py
Phantom586/My_Codes
900c4e5e95ab833e4f78f1594e3b25178a74f1a7
[ "MIT" ]
null
null
null
from itertools import product A = list(map(int, input().split())) B = list(map(int, input().split())) prod = list(product(A, B)) for i in prod: print(i, end=' ')
23.714286
35
0.626506
28
166
3.714286
0.607143
0.153846
0.192308
0.288462
0.384615
0
0
0
0
0
0
0
0.162651
166
7
36
23.714286
0.748201
0
0
0
0
0
0.005988
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.166667
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8bb028783f2c1bd38bbe91a33c613a234bb51ec2
183
py
Python
gamma/ui_action_listener.py
ArtBIT/gamma
4ec03251fcd46cd7ae7b5123ad101064b0f9bdd1
[ "MIT" ]
15
2021-07-19T05:54:00.000Z
2022-03-16T10:24:30.000Z
gamma/ui_action_listener.py
ArtBIT/gamma
4ec03251fcd46cd7ae7b5123ad101064b0f9bdd1
[ "MIT" ]
1
2022-02-07T21:27:42.000Z
2022-02-09T12:32:28.000Z
gamma/ui_action_listener.py
ArtBIT/gamma
4ec03251fcd46cd7ae7b5123ad101064b0f9bdd1
[ "MIT" ]
3
2022-01-13T10:12:02.000Z
2022-02-08T11:55:29.000Z
class ActionListener: def __init__(self, function): self.function = function def execute(self): if self.function is not None: self.function()
22.875
37
0.606557
20
183
5.35
0.55
0.448598
0
0
0
0
0
0
0
0
0
0
0.311475
183
8
38
22.875
0.849206
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
8bc6312ec3edc6b472a0e28d2ba2b6117566b95e
176
py
Python
vubtt/commands/cmd_list.py
VUBTimetable/cli
9b5159ae3b750ee87a418a55a7bc239986f37b05
[ "MIT" ]
null
null
null
vubtt/commands/cmd_list.py
VUBTimetable/cli
9b5159ae3b750ee87a418a55a7bc239986f37b05
[ "MIT" ]
null
null
null
vubtt/commands/cmd_list.py
VUBTimetable/cli
9b5159ae3b750ee87a418a55a7bc239986f37b05
[ "MIT" ]
null
null
null
import click def cli(context): # read all from file # output all items # internal id (enumerate index), course name # internal activity id, activity name
19.555556
48
0.664773
23
176
5.086957
0.782609
0
0
0
0
0
0
0
0
0
0
0
0.272727
176
8
49
22
0.914063
0.670455
0
0
0
0
0
0
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
473f1b3f389250b1ed43cddf25eaeb8309285abd
333
py
Python
data-extraction/python-spark/fake_job.py
gabrielclimb/intro-to-ml-with-kubeflow-examples
cc5cf30212a88f1c5c97d4c65e6d35824f468669
[ "Apache-2.0" ]
150
2019-01-13T09:47:34.000Z
2022-03-27T18:43:39.000Z
data-extraction/python-spark/fake_job.py
gabrielclimb/intro-to-ml-with-kubeflow-examples
cc5cf30212a88f1c5c97d4c65e6d35824f468669
[ "Apache-2.0" ]
28
2019-03-20T09:31:19.000Z
2021-11-13T10:16:58.000Z
data-extraction/python-spark/fake_job.py
gabrielclimb/intro-to-ml-with-kubeflow-examples
cc5cf30212a88f1c5c97d4c65e6d35824f468669
[ "Apache-2.0" ]
63
2019-01-13T01:45:54.000Z
2022-03-18T04:28:56.000Z
# Yes we need both these imports #tag::imports[] from pyspark.sql import SparkSession from pyspark.sql.functions import col, to_date from pyspark.sql.types import * #end::imports[] from pyspark.sql.catalog import UserDefinedFunction import os #tag::basic_session[] session = SparkSession.builder.getOrCreate() #end::basic_session[]
25.615385
51
0.792793
46
333
5.673913
0.543478
0.168582
0.214559
0.16092
0
0
0
0
0
0
0
0
0.102102
333
12
52
27.75
0.87291
0.294294
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
475731af2dd17950c6cb5daf1636d15da86a3f69
191
py
Python
lemon/protocol/Register/RegisterStatus.py
lemon-chat/lemon-server-python
5947b52b3c4535ae54fe2705a830db07fdaf741d
[ "MIT" ]
null
null
null
lemon/protocol/Register/RegisterStatus.py
lemon-chat/lemon-server-python
5947b52b3c4535ae54fe2705a830db07fdaf741d
[ "MIT" ]
null
null
null
lemon/protocol/Register/RegisterStatus.py
lemon-chat/lemon-server-python
5947b52b3c4535ae54fe2705a830db07fdaf741d
[ "MIT" ]
null
null
null
# automatically generated by the FlatBuffers compiler, do not modify # namespace: Register class RegisterStatus(object): Success = 0 FailUnknown = 1 FailUserNameConflicted = 2
19.1
68
0.743455
20
191
7.1
1
0
0
0
0
0
0
0
0
0
0
0.019737
0.204188
191
9
69
21.222222
0.914474
0.450262
0
0
1
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
47ac7c220f7f5cb2e4e6a9c08244b74f98763773
228
py
Python
src/util/request_interceptor.py
SupriyaGupta17/hybrid_similarity_api
5917680642cb3efc641f5fe066d65dec54cff09d
[ "Apache-2.0" ]
null
null
null
src/util/request_interceptor.py
SupriyaGupta17/hybrid_similarity_api
5917680642cb3efc641f5fe066d65dec54cff09d
[ "Apache-2.0" ]
null
null
null
src/util/request_interceptor.py
SupriyaGupta17/hybrid_similarity_api
5917680642cb3efc641f5fe066d65dec54cff09d
[ "Apache-2.0" ]
null
null
null
""" request_interceptor.py ~~~~~~ Created By : Pankaj Suthar """ def intercept_request(request): """ intercept_request :param request: Flask Request Object :return: updated request """ pass
15.2
40
0.614035
22
228
6.227273
0.681818
0.233577
0
0
0
0
0
0
0
0
0
0
0.267544
228
14
41
16.285714
0.820359
0.596491
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
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
1
0
1
0
0
0
0
0
4
47e11491788daebc158e3c46c89dc052903f92d2
370
py
Python
hcc_ws/devel/lib/python2.7/dist-packages/darknet_ros_msgs/msg/__init__.py
Jackie890621/Localization_by_Apriltag
8c97467c46f6e241d9838ec86ac752e1065a831e
[ "MIT" ]
3
2021-08-20T03:25:37.000Z
2022-03-31T02:47:28.000Z
hcc_ws/devel/lib/python2.7/dist-packages/darknet_ros_msgs/msg/__init__.py
Jackie890621/Localization_by_Apriltag
8c97467c46f6e241d9838ec86ac752e1065a831e
[ "MIT" ]
null
null
null
hcc_ws/devel/lib/python2.7/dist-packages/darknet_ros_msgs/msg/__init__.py
Jackie890621/Localization_by_Apriltag
8c97467c46f6e241d9838ec86ac752e1065a831e
[ "MIT" ]
1
2021-03-31T06:27:31.000Z
2021-03-31T06:27:31.000Z
from ._BoundingBox import * from ._BoundingBoxes import * from ._CheckForObjectsAction import * from ._CheckForObjectsActionFeedback import * from ._CheckForObjectsActionGoal import * from ._CheckForObjectsActionResult import * from ._CheckForObjectsFeedback import * from ._CheckForObjectsGoal import * from ._CheckForObjectsResult import * from ._ObjectCount import *
33.636364
45
0.837838
30
370
10
0.4
0.3
0
0
0
0
0
0
0
0
0
0
0.108108
370
10
46
37
0.909091
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
47f11eb185a18b29a7d13469c796194bce3f1ca5
40
py
Python
core/apistatus.py
Karox/hakuf
bbb434df73bbe058cf5260064dcf6eb2f8e98cc9
[ "MIT" ]
7
2017-12-30T20:57:43.000Z
2020-03-22T00:15:26.000Z
core/apistatus.py
Karox/hakuf
bbb434df73bbe058cf5260064dcf6eb2f8e98cc9
[ "MIT" ]
null
null
null
core/apistatus.py
Karox/hakuf
bbb434df73bbe058cf5260064dcf6eb2f8e98cc9
[ "MIT" ]
3
2017-09-14T13:18:05.000Z
2020-02-10T15:56:54.000Z
class Api: enabled = False api = Api()
10
16
0.65
6
40
4.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.225
40
4
17
10
0.83871
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0.666667
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
0
0
0
0
1
0
0
4
47f3d6a037d1ebd6fc762378d829ed62cc0a70ed
329
py
Python
Core/ResponseBuilder.py
tinyurl-com-ItsBigBrainTimeXD/backend
4d360ed02aa5475279af03e4f4300dde6ccc3391
[ "MIT" ]
null
null
null
Core/ResponseBuilder.py
tinyurl-com-ItsBigBrainTimeXD/backend
4d360ed02aa5475279af03e4f4300dde6ccc3391
[ "MIT" ]
null
null
null
Core/ResponseBuilder.py
tinyurl-com-ItsBigBrainTimeXD/backend
4d360ed02aa5475279af03e4f4300dde6ccc3391
[ "MIT" ]
null
null
null
class ResponseBuilder(object): def __init__(self, status_code: int, result = None): """Builder for the response""" self.status_code = status_code self.result = result def get_response(self): return { 'result': self.result, 'status_code': self.status_code }
29.909091
56
0.592705
36
329
5.138889
0.472222
0.27027
0.227027
0
0
0
0
0
0
0
0
0
0.303951
329
11
57
29.909091
0.80786
0.072948
0
0
0
0
0.056667
0
0
0
0
0
0
1
0.222222
false
0
0
0.111111
0.444444
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
1
0
0
0
1
0
0
0
4
9a21dc02ae4f1893a3b958bfec158289134d3f0c
214
py
Python
tests/conftest.py
fredrikaverpil/mylittleci
a0b8c5e89a2e00867499f224fee5614059b38fa3
[ "MIT" ]
3
2020-04-28T10:43:57.000Z
2021-04-02T09:16:20.000Z
tests/conftest.py
fredrikaverpil/mylittleci
a0b8c5e89a2e00867499f224fee5614059b38fa3
[ "MIT" ]
2
2020-04-27T05:22:18.000Z
2020-05-15T06:54:42.000Z
tests/conftest.py
fredrikaverpil/mylittleci
a0b8c5e89a2e00867499f224fee5614059b38fa3
[ "MIT" ]
null
null
null
"""Pytest configuration.""" import pathlib import pytest @pytest.fixture(name="repo_root") def fixture_repo_root() -> pathlib.Path: """Return the repository root.""" return pathlib.Path("..").resolve()
17.833333
40
0.691589
25
214
5.8
0.56
0.110345
0
0
0
0
0
0
0
0
0
0
0.135514
214
11
41
19.454545
0.783784
0.228972
0
0
0
0
0.071429
0
0
0
0
0
0
1
0.2
true
0
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
1
0
1
0
1
0
0
4
9a2f14e9786ec0306f3caea635526e29a9c0c542
303
py
Python
examples/pwn/ex_plt.py
alissonbezerra/ptrlib
67a557acfa5069a66dd26670f53d94e63b023642
[ "MIT" ]
57
2019-12-08T00:02:14.000Z
2022-03-24T20:40:40.000Z
examples/pwn/ex_plt.py
alissonbezerra/ptrlib
67a557acfa5069a66dd26670f53d94e63b023642
[ "MIT" ]
3
2020-01-26T03:38:31.000Z
2020-06-21T13:42:46.000Z
examples/pwn/ex_plt.py
alissonbezerra/ptrlib
67a557acfa5069a66dd26670f53d94e63b023642
[ "MIT" ]
8
2020-04-20T08:17:57.000Z
2021-10-04T06:04:51.000Z
#!/usr/bin/env python from ptrlib import * # 64-bit binary elf = ELF("sample/test1") print(hex(elf.got("read"))) print(hex(elf.plt("read"))) print(hex(elf.symbol("main"))) # 32-bit binary elf = ELF("sample/test2") print(hex(elf.got("read"))) print(hex(elf.plt("read"))) print(hex(elf.symbol("main")))
20.2
30
0.663366
51
303
3.941176
0.431373
0.238806
0.328358
0.298507
0.776119
0.567164
0.567164
0.567164
0.567164
0.567164
0
0.021661
0.085809
303
14
31
21.642857
0.703971
0.158416
0
0.666667
0
0
0.190476
0
0
0
0
0
0
1
0
false
0
0.111111
0
0.111111
0.666667
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
9a321cae4a24f29b0c4f70291893006ea78ae2a6
142
py
Python
rdfserializer/apps.py
WSWCWaterDataExchange/WaDEControlledVocabulary
38abcd15d6f035b424df82318c75ef02f9f37185
[ "BSD-3-Clause" ]
5
2015-04-28T20:45:35.000Z
2020-10-10T20:24:16.000Z
rdfserializer/apps.py
WSWCWaterDataExchange/WaDEControlledVocabulary
38abcd15d6f035b424df82318c75ef02f9f37185
[ "BSD-3-Clause" ]
64
2015-04-27T22:24:05.000Z
2021-06-10T17:43:21.000Z
rdfserializer/apps.py
WSWCWaterDataExchange/WaDEControlledVocabulary
38abcd15d6f035b424df82318c75ef02f9f37185
[ "BSD-3-Clause" ]
7
2017-03-04T15:02:33.000Z
2022-01-18T22:11:12.000Z
from __future__ import unicode_literals from django.apps import AppConfig class RdfserializerConfig(AppConfig): name = 'rdfserializer'
17.75
39
0.809859
15
142
7.333333
0.8
0
0
0
0
0
0
0
0
0
0
0
0.140845
142
7
40
20.285714
0.901639
0
0
0
0
0
0.091549
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
9a46bfdedafa341ab285fdf133251d59026f0b67
1,952
py
Python
numpy/typing/tests/data/reveal/constants.py
AnirudhDagar/numpy
77bc3225e6f4badf83190ec300a0e10e56949644
[ "BSD-3-Clause" ]
5
2021-08-23T06:23:15.000Z
2022-02-05T07:27:30.000Z
numpy/typing/tests/data/reveal/constants.py
AnirudhDagar/numpy
77bc3225e6f4badf83190ec300a0e10e56949644
[ "BSD-3-Clause" ]
87
2021-07-01T21:01:26.000Z
2022-03-28T08:12:02.000Z
numpy/typing/tests/data/reveal/constants.py
AnirudhDagar/numpy
77bc3225e6f4badf83190ec300a0e10e56949644
[ "BSD-3-Clause" ]
1
2019-11-05T15:23:08.000Z
2019-11-05T15:23:08.000Z
import numpy as np reveal_type(np.Inf) # E: float reveal_type(np.Infinity) # E: float reveal_type(np.NAN) # E: float reveal_type(np.NINF) # E: float reveal_type(np.NZERO) # E: float reveal_type(np.NaN) # E: float reveal_type(np.PINF) # E: float reveal_type(np.PZERO) # E: float reveal_type(np.e) # E: float reveal_type(np.euler_gamma) # E: float reveal_type(np.inf) # E: float reveal_type(np.infty) # E: float reveal_type(np.nan) # E: float reveal_type(np.pi) # E: float reveal_type(np.ALLOW_THREADS) # E: int reveal_type(np.BUFSIZE) # E: Literal[8192] reveal_type(np.CLIP) # E: Literal[0] reveal_type(np.ERR_CALL) # E: Literal[3] reveal_type(np.ERR_DEFAULT) # E: Literal[521] reveal_type(np.ERR_IGNORE) # E: Literal[0] reveal_type(np.ERR_LOG) # E: Literal[5] reveal_type(np.ERR_PRINT) # E: Literal[4] reveal_type(np.ERR_RAISE) # E: Literal[2] reveal_type(np.ERR_WARN) # E: Literal[1] reveal_type(np.FLOATING_POINT_SUPPORT) # E: Literal[1] reveal_type(np.FPE_DIVIDEBYZERO) # E: Literal[1] reveal_type(np.FPE_INVALID) # E: Literal[8] reveal_type(np.FPE_OVERFLOW) # E: Literal[2] reveal_type(np.FPE_UNDERFLOW) # E: Literal[4] reveal_type(np.MAXDIMS) # E: Literal[32] reveal_type(np.MAY_SHARE_BOUNDS) # E: Literal[0] reveal_type(np.MAY_SHARE_EXACT) # E: Literal[-1] reveal_type(np.RAISE) # E: Literal[2] reveal_type(np.SHIFT_DIVIDEBYZERO) # E: Literal[0] reveal_type(np.SHIFT_INVALID) # E: Literal[9] reveal_type(np.SHIFT_OVERFLOW) # E: Literal[3] reveal_type(np.SHIFT_UNDERFLOW) # E: Literal[6] reveal_type(np.UFUNC_BUFSIZE_DEFAULT) # E: Literal[8192] reveal_type(np.WRAP) # E: Literal[1] reveal_type(np.tracemalloc_domain) # E: Literal[389047] reveal_type(np.little_endian) # E: bool reveal_type(np.True_) # E: numpy.bool_ reveal_type(np.False_) # E: numpy.bool_ reveal_type(np.UFUNC_PYVALS_NAME) # E: Literal['UFUNC_PYVALS'] reveal_type(np.sctypeDict) # E: dict reveal_type(np.sctypes) # E: TypedDict
36.830189
63
0.730533
338
1,952
3.982249
0.221893
0.341753
0.410104
0.166419
0.562407
0.470282
0.245914
0.135958
0.135958
0.086924
0
0.022767
0.122439
1,952
52
64
37.538462
0.762989
0.298668
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.021277
0
0.021277
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
9a6a2399b8c7d37acdf11fa32cf9815c04a1f974
816
py
Python
lib/systems/butanone.py
pulsar-chem/BPModule
f8e64e04fdb01947708f098e833600c459c2ff0e
[ "BSD-3-Clause" ]
null
null
null
lib/systems/butanone.py
pulsar-chem/BPModule
f8e64e04fdb01947708f098e833600c459c2ff0e
[ "BSD-3-Clause" ]
null
null
null
lib/systems/butanone.py
pulsar-chem/BPModule
f8e64e04fdb01947708f098e833600c459c2ff0e
[ "BSD-3-Clause" ]
null
null
null
import pulsar as psr def load_ref_system(): """ Returns butanone as found in the IQMol fragment library. All credit to https://github.com/nutjunkie/IQmol """ return psr.make_system(""" C 1.8315 -0.5838 -0.0465 C 0.5005 0.1194 0.0287 C -0.7017 -0.7997 -0.0095 C -2.0319 -0.0893 -0.0850 O 0.4197 1.3291 0.1161 H 1.9387 -1.0946 -1.0125 H 1.9124 -1.3434 0.7418 H 2.6813 0.1026 0.0625 H -0.6629 -1.4440 0.8918 H -0.5864 -1.4846 -0.8733 H -2.1884 0.5739 0.7758 H -2.8602 -0.8091 -0.1027 H -2.1111 0.5282 -0.9892 """)
38.857143
64
0.427696
120
816
2.883333
0.583333
0.023121
0
0
0
0
0
0
0
0
0
0.448276
0.466912
816
20
65
40.8
0.347126
0.128676
0
0
0
0
0.878437
0
0
0
0
0
0
1
0.058824
true
0
0.058824
0
0.176471
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
d03ee7c8c83275e56ab39e16f801059f3f53752e
119
py
Python
carts/admin.py
Moisestuli/karrata
962ce0c573214bfc83720727c9cacae823a8c372
[ "MIT" ]
null
null
null
carts/admin.py
Moisestuli/karrata
962ce0c573214bfc83720727c9cacae823a8c372
[ "MIT" ]
null
null
null
carts/admin.py
Moisestuli/karrata
962ce0c573214bfc83720727c9cacae823a8c372
[ "MIT" ]
null
null
null
from django.contrib import admin from carts.models import Cart admin.site.register(Cart) # Register your models here.
19.833333
32
0.806723
18
119
5.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.12605
119
5
33
23.8
0.923077
0.218487
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
d06876ee782ad5cd28806c3cc8dddcc68add3e83
3,236
py
Python
gerber/operations.py
Dheeraj8383/pcb-tools
cf4a61244519f0ba0889beab3d5a3db61c44362d
[ "Apache-2.0" ]
223
2015-01-01T08:29:15.000Z
2022-03-30T22:13:00.000Z
gerber/operations.py
Dheeraj8383/pcb-tools
cf4a61244519f0ba0889beab3d5a3db61c44362d
[ "Apache-2.0" ]
201
2015-01-25T19:27:28.000Z
2022-03-04T04:10:19.000Z
gerber/operations.py
Dheeraj8383/pcb-tools
cf4a61244519f0ba0889beab3d5a3db61c44362d
[ "Apache-2.0" ]
126
2015-01-27T18:34:08.000Z
2022-02-26T20:56:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # copyright 2015 Hamilton Kibbe <ham@hamiltonkib.be> # # 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. """ CAM File Operations =================== **Transformations and other operations performed on Gerber and Excellon files** """ import copy def to_inch(cam_file): """ Convert Gerber or Excellon file units to imperial Parameters ---------- cam_file : :class:`gerber.cam.CamFile` subclass Gerber or Excellon file to convert Returns ------- cam_file : :class:`gerber.cam.CamFile` subclass A deep copy of the source file with units converted to imperial. """ cam_file = copy.deepcopy(cam_file) cam_file.to_inch() return cam_file def to_metric(cam_file): """ Convert Gerber or Excellon file units to metric Parameters ---------- cam_file : :class:`gerber.cam.CamFile` subclass Gerber or Excellon file to convert Returns ------- cam_file : :class:`gerber.cam.CamFile` subclass A deep copy of the source file with units converted to metric. """ cam_file = copy.deepcopy(cam_file) cam_file.to_metric() return cam_file def offset(cam_file, x_offset, y_offset): """ Offset a Cam file by a specified amount in the X and Y directions. Parameters ---------- cam_file : :class:`gerber.cam.CamFile` subclass Gerber or Excellon file to offset x_offset : float Amount to offset the file in the X direction y_offset : float Amount to offset the file in the Y direction Returns ------- cam_file : :class:`gerber.cam.CamFile` subclass An offset deep copy of the source file. """ cam_file = copy.deepcopy(cam_file) cam_file.offset(x_offset, y_offset) return cam_file def scale(cam_file, x_scale, y_scale): """ Scale a Cam file by a specified amount in the X and Y directions. Parameters ---------- cam_file : :class:`gerber.cam.CamFile` subclass Gerber or Excellon file to scale x_scale : float X-axis scale factor y_scale : float Y-axis scale factor Returns ------- cam_file : :class:`gerber.cam.CamFile` subclass An scaled deep copy of the source file. """ # TODO pass def rotate(cam_file, angle): """ Rotate a Cam file a specified amount about the origin. Parameters ---------- cam_file : :class:`gerber.cam.CamFile` subclass Gerber or Excellon file to rotate angle : float Angle to rotate the file in degrees. Returns ------- cam_file : :class:`gerber.cam.CamFile` subclass An rotated deep copy of the source file. """ # TODO pass
25.480315
79
0.654203
451
3,236
4.603104
0.261641
0.104528
0.057803
0.086705
0.529383
0.529383
0.518304
0.518304
0.472543
0.298651
0
0.003682
0.244747
3,236
126
80
25.68254
0.845745
0.754944
0
0.470588
0
0
0
0
0
0
0
0.015873
0
1
0.294118
false
0.117647
0.058824
0
0.529412
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
0
0
1
0
0
4