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
3a91417d1bf3a294713eeff38418dc60b661a159
81
py
Python
src/dnd/types.py
s-zhang/DnDnProbabilities
167caf78cc208a93a59f3a3725023482977cbbfd
[ "MIT" ]
null
null
null
src/dnd/types.py
s-zhang/DnDnProbabilities
167caf78cc208a93a59f3a3725023482977cbbfd
[ "MIT" ]
null
null
null
src/dnd/types.py
s-zhang/DnDnProbabilities
167caf78cc208a93a59f3a3725023482977cbbfd
[ "MIT" ]
null
null
null
from typing import Union from pmf.Pmf import Pmf IntDist = Union[int, Pmf[int]]
16.2
30
0.753086
14
81
4.357143
0.5
0
0
0
0
0
0
0
0
0
0
0
0.160494
81
4
31
20.25
0.897059
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
3a945a1016ba347b5dade1b07a826b21bb12b75c
268
py
Python
tools/wptrunner/wptrunner/executors/executoropera.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
tools/wptrunner/wptrunner/executors/executoropera.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
7,642
2018-05-28T09:38:03.000Z
2022-03-31T20:55:48.000Z
tools/wptrunner/wptrunner/executors/executoropera.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
from ..webdriver_server import OperaDriverServer from .base import WdspecExecutor, WdspecProtocol class OperaDriverProtocol(WdspecProtocol): server_cls = OperaDriverServer class OperaDriverWdspecExecutor(WdspecExecutor): protocol_cls = OperaDriverProtocol
24.363636
48
0.839552
22
268
10.090909
0.590909
0
0
0
0
0
0
0
0
0
0
0
0.115672
268
10
49
26.8
0.936709
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
3ae6dec0a63e75908a399d55ba9f6c2a27247d92
191
py
Python
dzo/__init__.py
moriaki3193/dzo
c0a221a8038879107a5fe07d2b9452abf51815b1
[ "MIT" ]
8
2019-07-27T11:48:55.000Z
2019-09-19T07:27:15.000Z
dzo/__init__.py
moriaki3193/dzo
c0a221a8038879107a5fe07d2b9452abf51815b1
[ "MIT" ]
7
2019-08-25T17:08:45.000Z
2019-09-14T14:04:49.000Z
dzo/__init__.py
moriaki3193/dzo
c0a221a8038879107a5fe07d2b9452abf51815b1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """dzo -- Python implemented portable and easy-to-use search engine. """ from .const import _VERSION __author__: str = 'Moriaki Saigusa' __version__: str = _VERSION
21.222222
68
0.701571
24
191
5.166667
0.875
0
0
0
0
0
0
0
0
0
0
0.006211
0.157068
191
8
69
23.875
0.763975
0.460733
0
0
0
0
0.15625
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
c929210e7c5c8c621a00167171817fabc58b625d
129
py
Python
openpipe_hooks/__init__.py
vvzen/open-pipe
cfd8a517275dff064695d6e14964db080268f72f
[ "MIT" ]
1
2022-03-18T12:12:04.000Z
2022-03-18T12:12:04.000Z
openpipe_hooks/__init__.py
vvzen/open-pipe
cfd8a517275dff064695d6e14964db080268f72f
[ "MIT" ]
5
2022-03-11T22:59:37.000Z
2022-03-25T17:21:14.000Z
openpipe_hooks/__init__.py
vvzen/open-pipe
cfd8a517275dff064695d6e14964db080268f72f
[ "MIT" ]
null
null
null
# If the client has defined its own hooks, this package will useless. # If not, we keep it just to make the import pass correctly
64.5
69
0.767442
24
129
4.125
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.193798
129
2
70
64.5
0.951923
0.968992
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
c93840d7dcadc8f55a45bd96112fcc0b10632f91
75
py
Python
basi_python/list _concept/remove_list.py
KMONISH/learning-challenge-season-2
be8271f3cbe958849e394807197d6179bbff5751
[ "MIT" ]
null
null
null
basi_python/list _concept/remove_list.py
KMONISH/learning-challenge-season-2
be8271f3cbe958849e394807197d6179bbff5751
[ "MIT" ]
null
null
null
basi_python/list _concept/remove_list.py
KMONISH/learning-challenge-season-2
be8271f3cbe958849e394807197d6179bbff5751
[ "MIT" ]
null
null
null
List = [2.3, 4.445, 3, 5.33, 1.054, 2.5] List.remove(4.445) print(List)
18.75
41
0.573333
18
75
2.388889
0.611111
0.186047
0
0
0
0
0
0
0
0
0
0.322581
0.173333
75
3
42
25
0.370968
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
c95c8d086d95a4c531647d6f3fbdc8c7c6dfd83d
318
py
Python
slurmer/__init__.py
jmigual/slurmer
05e5dbd27962107b804ea4afbff167eeacecc999
[ "MIT" ]
null
null
null
slurmer/__init__.py
jmigual/slurmer
05e5dbd27962107b804ea4afbff167eeacecc999
[ "MIT" ]
null
null
null
slurmer/__init__.py
jmigual/slurmer
05e5dbd27962107b804ea4afbff167eeacecc999
[ "MIT" ]
null
null
null
"""Slurmer package. Use this package to run tasks in a computing cluster. Supported task schedulers are: - `SLURM <https://slurm.schedmd.com/documentation.html>`_ """ from .task_runner import Task, TaskFailedError, TaskParameters, TaskResult __all__ = ["Task", "TaskFailedError", "TaskParameters", "TaskResult"]
35.333333
84
0.754717
36
318
6.5
0.777778
0.162393
0.282051
0.367521
0
0
0
0
0
0
0
0
0.122642
318
8
85
39.75
0.83871
0.515723
0
0
0
0
0.292517
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
c968ca36d9595212f0134f3dc45f84098a12a526
625
py
Python
source/tagger/_classification/logisticregression.py
chrka/cip-tagging-exercise
ca2d835c3676be624c15ae9cf26ab4ce05596d2d
[ "MIT" ]
null
null
null
source/tagger/_classification/logisticregression.py
chrka/cip-tagging-exercise
ca2d835c3676be624c15ae9cf26ab4ce05596d2d
[ "MIT" ]
null
null
null
source/tagger/_classification/logisticregression.py
chrka/cip-tagging-exercise
ca2d835c3676be624c15ae9cf26ab4ce05596d2d
[ "MIT" ]
null
null
null
from sklearn.base import BaseEstimator from sklearn.multiclass import OneVsRestClassifier from sklearn.linear_model import LogisticRegression as SKLearnLR class LogisticRegression(BaseEstimator): def __init__(self): pass def fit(self, X, y): # TODO: Consider pure (no penalty) LR # TODO: Look into convergence issues with other (faster) solvers # (Also running into some version-related issues.) self._clf = OneVsRestClassifier(SKLearnLR(solver='liblinear')) self._clf.fit(X, y) return self def predict(self, X): return self._clf.predict(X)
34.722222
72
0.6928
74
625
5.743243
0.594595
0.077647
0
0
0
0
0
0
0
0
0
0
0.2288
625
18
73
34.722222
0.881743
0.2448
0
0
0
0
0.01919
0
0
0
0
0.055556
0
1
0.25
false
0.083333
0.25
0.083333
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
0
0
1
0
0
4
c96b0e4cdd4905bc666cd4cec12532a069f8ce9a
87
py
Python
Ago-Dic-2019/Ricardo_Romero_Medina/Practica1/Practica_7-1.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ago-Dic-2019/Ricardo_Romero_Medina/Practica1/Practica_7-1.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ago-Dic-2019/Ricardo_Romero_Medina/Practica1/Practica_7-1.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
car=input("¿Que carro desea rentar? ") print("Deseo rentar un carro de la marca ",car)
29
47
0.712644
16
87
3.9375
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.149425
87
3
47
29
0.837838
0
0
0
0
0
0.670455
0
0
0
0
0
0
1
0
false
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
c96e1e04df28f0f153ebd9c74034e34bbc83875e
50
py
Python
torchlib/datasets/__init__.py
pedrodiamel/kaggle-tgs-salt-identification
0555296ae66122095560aea23ead16d23ebb5b2f
[ "MIT" ]
null
null
null
torchlib/datasets/__init__.py
pedrodiamel/kaggle-tgs-salt-identification
0555296ae66122095560aea23ead16d23ebb5b2f
[ "MIT" ]
null
null
null
torchlib/datasets/__init__.py
pedrodiamel/kaggle-tgs-salt-identification
0555296ae66122095560aea23ead16d23ebb5b2f
[ "MIT" ]
null
null
null
from .tgsdata import * from .imageutl import *
8.333333
23
0.7
6
50
5.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.22
50
5
24
10
0.897436
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
c97b17870b03ead6fc4b6e0cbbb4c40687ac5425
297
py
Python
iautomate/resources/execution_resource.py
iranianpep/iautomate
c187aedaf8f71c63e06a2112fbcf65f60217c5bc
[ "MIT" ]
null
null
null
iautomate/resources/execution_resource.py
iranianpep/iautomate
c187aedaf8f71c63e06a2112fbcf65f60217c5bc
[ "MIT" ]
null
null
null
iautomate/resources/execution_resource.py
iranianpep/iautomate
c187aedaf8f71c63e06a2112fbcf65f60217c5bc
[ "MIT" ]
null
null
null
from . import abstract_resource class ExecutionResource(abstract_resource.AbstractResource): def __init__(self, properties, global_variables=None): super(ExecutionResource, self).__init__(properties, global_variables) def run(self): self._run_shell_command(self.action)
29.7
77
0.771044
32
297
6.6875
0.59375
0.149533
0.233645
0
0
0
0
0
0
0
0
0
0.144781
297
9
78
33
0.84252
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
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
1
0
0
0
0
1
0
0
4
a31a2bc9822bdc23b182dd2d92bf184fdd62750d
751
py
Python
diary/apps.py
bbengfort/memorandi
4591d26c097513d67e11916583ed043e78e87816
[ "MIT" ]
null
null
null
diary/apps.py
bbengfort/memorandi
4591d26c097513d67e11916583ed043e78e87816
[ "MIT" ]
18
2020-12-02T16:37:21.000Z
2021-09-22T19:40:37.000Z
diary/apps.py
bbengfort/memorandi
4591d26c097513d67e11916583ed043e78e87816
[ "MIT" ]
null
null
null
# diary.apps # App specific configuration for lazy loading. # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Wed Dec 02 13:14:57 2020 -0500 # # Copyright (C) 2020 Bengfort.com # For license information, see LICENSE # # ID: apps.py [] benjamin@bengfort.com $ """ App specific configuration for lazy loading. """ ########################################################################## ## Imports ########################################################################## from django.apps import AppConfig ########################################################################## ## Configure App Here ########################################################################## class DiaryConfig(AppConfig): name = 'diary'
26.821429
74
0.431425
59
751
5.491525
0.644068
0.148148
0.148148
0.166667
0.234568
0.234568
0
0
0
0
0
0.029851
0.107856
751
27
75
27.814815
0.453731
0.438083
0
0
0
0
0.047619
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
0
0
0
null
0
0
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
1
0
1
0
0
4
a33713f9e7b5f9e8e60697305f17eee0de957a28
1,033
py
Python
quiz/models.py
gamersdestiny/fuzzyquizgame
74fe0c398da9c793bc9aa5a34d98a0f36cb4e6cc
[ "MIT" ]
null
null
null
quiz/models.py
gamersdestiny/fuzzyquizgame
74fe0c398da9c793bc9aa5a34d98a0f36cb4e6cc
[ "MIT" ]
null
null
null
quiz/models.py
gamersdestiny/fuzzyquizgame
74fe0c398da9c793bc9aa5a34d98a0f36cb4e6cc
[ "MIT" ]
null
null
null
from django.db import models class Question(models.Model): question = models.TextField() category = models.ForeignKey('Category', default=1, on_delete=models.DO_NOTHING, related_name='question') choice1 = models.CharField(max_length=50) choice2 = models.CharField(max_length=50) choice3 = models.CharField(max_length=50) choice4 = models.CharField(max_length=50) answer = models.CharField(max_length=50) answer2 = models.CharField(max_length=50, blank=True) answer3 = models.CharField(max_length=50, blank=True) answer4 = models.CharField(max_length=50, blank=True) def __str__(self): return self.question class Category(models.Model): categoryName = models.CharField(max_length=50) categoryDetails = models.TextField(blank=True) def __str__(self): return self.categoryName def get_category(self): return self.question__set.all() class Results(models.Model): question = models.ForeignKey(Question, on_delete=models.CASCADE) category = models.ForeignKey(Category, on_delete=models.CASCADE)
29.514286
106
0.774443
136
1,033
5.698529
0.323529
0.174194
0.209032
0.27871
0.4
0.19871
0.19871
0
0
0
0
0.028353
0.112294
1,033
34
107
30.382353
0.816794
0
0
0.083333
0
0
0.015489
0
0
0
0
0
0
1
0.125
false
0
0.041667
0.125
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
a3934517a154535c40745715151f4d3f9e82b111
189
py
Python
plotplayer/validators/__init__.py
Jman420/plotplayer
3a224fc38c2825c4166e7534970a792f0e96bd84
[ "Apache-2.0" ]
null
null
null
plotplayer/validators/__init__.py
Jman420/plotplayer
3a224fc38c2825c4166e7534970a792f0e96bd84
[ "Apache-2.0" ]
7
2018-06-20T19:44:45.000Z
2022-03-11T23:18:57.000Z
plotplayer/validators/__init__.py
Jman420/plotplayer
3a224fc38c2825c4166e7534970a792f0e96bd84
[ "Apache-2.0" ]
2
2018-04-08T14:36:13.000Z
2018-06-20T19:41:42.000Z
""" PlotPlayer Validators Subpackage contains various modules to support input and type validations. Public Modules: * type_validation - Contains methods to validating various types """
27
96
0.798942
22
189
6.818182
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.148148
189
6
97
31.5
0.931677
0.952381
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
6e6cd6b02614bdc92e077dbd8e675d2c85c63667
296
py
Python
src/colour.py
alvaropp/keep-exploring
d361616c79a61b0843bbc6052858f974f247891e
[ "MIT" ]
null
null
null
src/colour.py
alvaropp/keep-exploring
d361616c79a61b0843bbc6052858f974f247891e
[ "MIT" ]
4
2020-05-01T17:47:50.000Z
2020-05-18T11:35:07.000Z
src/colour.py
alvaropp/keep-exploring
d361616c79a61b0843bbc6052858f974f247891e
[ "MIT" ]
null
null
null
import numpy as np def compute_intensity(pos, pos_list, radius): return (norm(np.array(pos_list) - np.array(pos), axis=1) < radius).sum() def compute_colours(all_pos): colours = [compute_intensity(pos, all_pos, 1e-4) for pos in all_pos] colours /= max(colours) return colours
24.666667
76
0.702703
47
296
4.255319
0.489362
0.09
0.19
0
0
0
0
0
0
0
0
0.012245
0.172297
296
11
77
26.909091
0.804082
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
6e8074dc5add8b914fc1def1cbd2790b677c8d18
206
py
Python
scripts/video.py
isamumu/GazeVechicle
eacdc097819a757b7f3725ddc5eb7c16597eda28
[ "MIT" ]
2
2019-12-27T04:21:24.000Z
2020-11-16T09:28:36.000Z
scripts/video.py
isamumu/GazeVechicle
eacdc097819a757b7f3725ddc5eb7c16597eda28
[ "MIT" ]
1
2020-08-29T08:34:42.000Z
2020-08-29T08:34:42.000Z
scripts/video.py
isamumu/GazeVechicle
eacdc097819a757b7f3725ddc5eb7c16597eda28
[ "MIT" ]
2
2020-08-08T11:25:57.000Z
2020-11-16T09:28:37.000Z
import cv2 video_capture = cv2.VideoCapture(2) success, frame = video_capture.read() while(success): cv2.imshow("frame", frame) cv2.waitKey(10) success, frame = video_capture.read()
17.166667
41
0.674757
26
206
5.230769
0.5
0.264706
0.25
0.352941
0.411765
0
0
0
0
0
0
0.042424
0.199029
206
12
41
17.166667
0.781818
0
0
0.285714
0
0
0.024155
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
1
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
0
0
4
6e864ba71d709b2353a05ccbe95b57200ef40eb6
85
py
Python
src/aoc2015/day0.py
emauton/aoc2015
f321571b623a0e7acaa173be57506e64bd32765f
[ "MIT" ]
null
null
null
src/aoc2015/day0.py
emauton/aoc2015
f321571b623a0e7acaa173be57506e64bd32765f
[ "MIT" ]
null
null
null
src/aoc2015/day0.py
emauton/aoc2015
f321571b623a0e7acaa173be57506e64bd32765f
[ "MIT" ]
null
null
null
'''"Template" day module for AoC 2015''' def run(args): print(f'day0: {args}')
14.166667
40
0.6
13
85
3.923077
0.923077
0
0
0
0
0
0
0
0
0
0
0.072464
0.188235
85
5
41
17
0.666667
0.4
0
0
0
0
0.266667
0
0
0
0
0
0
1
0.5
false
0
0
0
0.5
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
1
0
0
0
0
0
1
0
4
6e95a12eef7e562ec87f15b165673aa3906c1ea3
144
py
Python
StockAnalysisSystem/porting/vnpy_chart/__init__.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
138
2018-01-03T03:32:49.000Z
2022-03-12T02:57:46.000Z
StockAnalysisSystem/porting/vnpy_chart/__init__.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
9
2018-01-01T03:16:24.000Z
2021-05-27T09:57:24.000Z
StockAnalysisSystem/porting/vnpy_chart/__init__.py
lifg2000/StockAnalysisSystem
b0bef50f5c1a9565e1a1f953fedbe7821601147c
[ "Apache-2.0" ]
50
2019-08-05T01:02:30.000Z
2022-03-07T00:52:14.000Z
from .widget import ChartWidget from .item import CandleItem, VolumeItem, ChartItem, MemoItem from .data import BarData from .constant import *
28.8
61
0.8125
18
144
6.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.131944
144
4
62
36
0.936
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
6e9d6ca9833d6d8dcd9cba3fd289c2c6fb30e67e
340
py
Python
california_housing_prices/room_density.py
Bartosz-D3V/ml-dataset-analysis
cb2458dcb7cecba01f52be5b12e816ca00ce7da4
[ "MIT" ]
null
null
null
california_housing_prices/room_density.py
Bartosz-D3V/ml-dataset-analysis
cb2458dcb7cecba01f52be5b12e816ca00ce7da4
[ "MIT" ]
null
null
null
california_housing_prices/room_density.py
Bartosz-D3V/ml-dataset-analysis
cb2458dcb7cecba01f52be5b12e816ca00ce7da4
[ "MIT" ]
null
null
null
from sklearn.base import BaseEstimator, TransformerMixin ''' Add new feature - proportion of rooms to households ''' class RoomDensity(BaseEstimator, TransformerMixin): def fit(self, X, y=None): return self def transform(self, X, y=None): X['room_density'] = X['total_rooms'] / X['households'] return X
21.25
62
0.670588
42
340
5.380952
0.642857
0.256637
0.053097
0.088496
0
0
0
0
0
0
0
0
0.214706
340
15
63
22.666667
0.846442
0
0
0
0
0
0.117438
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.857143
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
6ed46d84bac8888f9d4809115aade7839dda2abf
211
py
Python
poolink_backend/apps/board/admin.py
jaethewiederholen/Poolink_backend
3a1b28856bc8916aedb7735de8b64fef3269ef1b
[ "MIT" ]
null
null
null
poolink_backend/apps/board/admin.py
jaethewiederholen/Poolink_backend
3a1b28856bc8916aedb7735de8b64fef3269ef1b
[ "MIT" ]
null
null
null
poolink_backend/apps/board/admin.py
jaethewiederholen/Poolink_backend
3a1b28856bc8916aedb7735de8b64fef3269ef1b
[ "MIT" ]
null
null
null
from django.contrib import admin from poolink_backend.apps.board.models import Board @admin.register(Board) class BoardAdmin(admin.ModelAdmin): list_display = ("user", "id", "name", "bio", "scrap_count")
23.444444
63
0.744076
28
211
5.5
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.118483
211
8
64
26.375
0.827957
0
0
0
0
0
0.113744
0
0
0
0
0
0
1
0
false
0
0.4
0
0.8
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
42b538335190799187b06c65cf0b906ff4153ce4
128
py
Python
Tutoriales/locust/test.py
edaral3/so1-course
f7c3de1e49fef76111cf7cbfee8a0fc6d5bd8a8e
[ "Apache-2.0" ]
25
2021-02-12T23:23:55.000Z
2021-08-21T04:40:42.000Z
Tutoriales/locust/test.py
edaral3/so1-course
f7c3de1e49fef76111cf7cbfee8a0fc6d5bd8a8e
[ "Apache-2.0" ]
null
null
null
Tutoriales/locust/test.py
edaral3/so1-course
f7c3de1e49fef76111cf7cbfee8a0fc6d5bd8a8e
[ "Apache-2.0" ]
15
2021-02-12T23:55:32.000Z
2022-02-17T01:30:30.000Z
from locust import HttpUser, task, between class LoadTest(HttpUser): @task def test(self): self.client.get('/')
21.333333
42
0.65625
16
128
5.25
0.8125
0.285714
0
0
0
0
0
0
0
0
0
0
0.21875
128
6
43
21.333333
0.84
0
0
0
0
0
0.007752
0
0
0
0
0
0
1
0.2
false
0
0.2
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
42e40a08b348cf8cf3b2a277a0115a183a70fdef
67
py
Python
workflow/scripts/helpers/__init__.py
IMS-Bio2Core-Facility/polya_liftover
0a62a28c9f31850b07c63d03e43e0cfdf00b9d28
[ "MIT" ]
2
2022-02-20T21:05:08.000Z
2022-02-20T21:05:26.000Z
workflow/scripts/helpers/__init__.py
IMS-Bio2Core-Facility/polya_liftover
0a62a28c9f31850b07c63d03e43e0cfdf00b9d28
[ "MIT" ]
2
2022-01-14T15:57:42.000Z
2022-01-14T16:00:44.000Z
workflow/scripts/helpers/__init__.py
IMS-Bio2Core-Facility/polya_liftover
0a62a28c9f31850b07c63d03e43e0cfdf00b9d28
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Helper modules for analysis scripts."""
22.333333
42
0.61194
8
67
5.125
1
0
0
0
0
0
0
0
0
0
0
0.017544
0.149254
67
2
43
33.5
0.701754
0.880597
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
42f8e919ea720c089fc5a5f129c440ef37aa25f6
153
py
Python
math/0x00-linear_algebra/10-ill_use_my_scale.py
sebaslherrera/holbertonschool-machine_learning
a4c09230688700aee199f4099de32261104918be
[ "MIT" ]
null
null
null
math/0x00-linear_algebra/10-ill_use_my_scale.py
sebaslherrera/holbertonschool-machine_learning
a4c09230688700aee199f4099de32261104918be
[ "MIT" ]
null
null
null
math/0x00-linear_algebra/10-ill_use_my_scale.py
sebaslherrera/holbertonschool-machine_learning
a4c09230688700aee199f4099de32261104918be
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """I’ll Use My Scale module""" def np_shape(matrix): """calculates the shape of a numpy.ndarray""" return matrix.shape
17
49
0.666667
24
153
4.208333
0.875
0
0
0
0
0
0
0
0
0
0
0.008
0.183007
153
8
50
19.125
0.8
0.562092
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
42fec2a9bb7309a81db8276504147605a9c5c56d
145
py
Python
Dataset/Leetcode/train/70/119.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/70/119.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/70/119.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution(object): def XXX(self, n): g5=5**0.5 b=(((1+g5)/2)**(n+1)-((1-g5)/2)**(n+1))/g5 return int(round(b))
20.714286
50
0.448276
27
145
2.407407
0.592593
0.138462
0.123077
0.153846
0.184615
0
0
0
0
0
0
0.121495
0.262069
145
6
51
24.166667
0.485981
0
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
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
1
0
0
4
6e12c592c2a04cd4e03349dc13caa0cd4e46a0f1
440
py
Python
trasto/model/service_sensor.py
pablocm83/jpardobl-trastobrain
71ad4e759ffa58b742218eea8dce3af718ec70b6
[ "Apache-2.0" ]
15
2020-06-05T09:11:24.000Z
2022-03-08T04:39:55.000Z
trasto/model/service_sensor.py
pablocm83/jpardobl-trastobrain
71ad4e759ffa58b742218eea8dce3af718ec70b6
[ "Apache-2.0" ]
null
null
null
trasto/model/service_sensor.py
pablocm83/jpardobl-trastobrain
71ad4e759ffa58b742218eea8dce3af718ec70b6
[ "Apache-2.0" ]
5
2020-04-16T23:57:43.000Z
2021-07-04T18:46:54.000Z
from trasto.model.entities import EstadoHumorRepositoryInterface from trasto.model.value_entities import ResultadoAccion from trasto.model.events import EventRepositoryInterface class SensorInterface: def listen_to_task_result(self, evento_repo: EventRepositoryInterface) -> None: pass def update_humor_from_task_result(self, resultado: ResultadoAccion, humor_repo: EstadoHumorRepositoryInterface) -> None: pass
33.846154
124
0.815909
46
440
7.586957
0.543478
0.08596
0.12894
0
0
0
0
0
0
0
0
0
0.131818
440
13
125
33.846154
0.913613
0
0
0.25
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.375
0
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
1
0
1
0
0
4
2827138fdbf843f041ac14d2d50bbef9faf33cff
1,544
py
Python
Web_App/views.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
11
2021-04-04T03:16:44.000Z
2021-11-15T11:22:51.000Z
Web_App/views.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
6
2021-03-31T17:18:16.000Z
2021-07-06T07:21:51.000Z
Web_App/views.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
4
2021-03-31T17:03:20.000Z
2021-05-26T07:50:12.000Z
from django.shortcuts import render, redirect from django.http.response import StreamingHttpResponse from Web_App.SetupGame import StartSetup from Web_App.StartGame import Start from Web_App.models import BoundingBoxes from Web_App.Direct_Keys import * def home(request): return render(request, 'front_web_1.html') def game_page(request): return render(request, 'game_page.html') def game_car(request): return render(request, 'game_car.html') def game_mortal(request): return render(request, 'game_mortal.html') def about_us(request): return render(request, 'about_us.html') def start_setup_car(request): cam = StartSetup() Result_Setup_car = cam.get_frame() res = BoundingBoxes() res.Game_Name = GameName res.Face = list_to_string(Result_Setup_car[0]) res.Switches = listoflists_to_string(Result_Setup_car[1]) res.save() # request.session['id'] = res.id return render(request, 'game_car.html') def start_game_car(request): temp = Start(request) return render(request, 'game_car.html') def start_setup_mortal(request): cam = StartSetup() Result_Setup_mortal = cam.get_frame() res = BoundingBoxes() res.Game_Name = GameName res.Face = list_to_string(Result_Setup_mortal[0]) res.Switches = listoflists_to_string(Result_Setup_mortal[1]) res.save() # request.session['id'] = res.id return render(request, 'game_mortal.html') def start_game_mortal(request): temp = Start(request) return render(request, 'game_mortal.html')
25.311475
64
0.731865
214
1,544
5.042056
0.238318
0.100093
0.15848
0.168675
0.62836
0.526413
0.526413
0.465246
0.237257
0.237257
0
0.003858
0.160622
1,544
60
65
25.733333
0.828704
0.039508
0
0.4
0
0
0.087838
0
0
0
0
0
0
1
0.225
false
0
0.15
0.125
0.6
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
283af9ad0f3cfb831e7373b94d6d141b37a9f3d2
206
py
Python
tests/test_errors.py
ootiq/smax
88109d4f9dde436c9e8ab8c852904bce77dd1677
[ "Unlicense" ]
null
null
null
tests/test_errors.py
ootiq/smax
88109d4f9dde436c9e8ab8c852904bce77dd1677
[ "Unlicense" ]
null
null
null
tests/test_errors.py
ootiq/smax
88109d4f9dde436c9e8ab8c852904bce77dd1677
[ "Unlicense" ]
null
null
null
import pytest from smaxpy import Smax from smaxpy.errors import RequestError # test error handling def test_error_handling(): with pytest.raises(RequestError): _ = Smax("nonexistentwebsite")
18.727273
38
0.757282
24
206
6.375
0.583333
0.130719
0.222222
0
0
0
0
0
0
0
0
0
0.174757
206
10
39
20.6
0.9
0.092233
0
0
0
0
0.097297
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
0.666667
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
28560f37f22f7ef55a8734243d5d28d3a7ff9ae4
156
py
Python
boa3_test/test_sc/interop_test/runtime/InvocationCounterCantAssign.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/interop_test/runtime/InvocationCounterCantAssign.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/interop_test/runtime/InvocationCounterCantAssign.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from boa3.builtin.interop.runtime import invocation_counter def Main(example: int) -> int: invocation_counter = example return invocation_counter
22.285714
59
0.782051
19
156
6.263158
0.684211
0.428571
0
0
0
0
0
0
0
0
0
0.007576
0.153846
156
6
60
26
0.893939
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
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
28775aac2d4c3265a957f56feb84fc9c3a430955
40
py
Python
tdd3/lib/python3.7/hmac.py
yjj2100/flask-microservices-users
9778bd4ab643d1f0e7ed91f41126e415b083fd17
[ "Apache-2.0" ]
null
null
null
tdd3/lib/python3.7/hmac.py
yjj2100/flask-microservices-users
9778bd4ab643d1f0e7ed91f41126e415b083fd17
[ "Apache-2.0" ]
null
null
null
tdd3/lib/python3.7/hmac.py
yjj2100/flask-microservices-users
9778bd4ab643d1f0e7ed91f41126e415b083fd17
[ "Apache-2.0" ]
null
null
null
/usr/local/python3/lib/python3.7/hmac.py
40
40
0.8
8
40
4
0.875
0
0
0
0
0
0
0
0
0
0
0.075
0
40
1
40
40
0.725
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
288f4b3db1594cd1240e03184d1a19579b2a09e0
62
py
Python
meraki/run.py
storybook808/Meraki-Bulk-Configuration-Tool
65e240b89f16e02fd767f1e1a1742728c0f2cc0a
[ "MIT" ]
1
2018-06-28T17:00:07.000Z
2018-06-28T17:00:07.000Z
meraki/run.py
storybook808/Meraki-Bulk-Configuration-Tool
65e240b89f16e02fd767f1e1a1742728c0f2cc0a
[ "MIT" ]
null
null
null
meraki/run.py
storybook808/Meraki-Bulk-Configuration-Tool
65e240b89f16e02fd767f1e1a1742728c0f2cc0a
[ "MIT" ]
null
null
null
#!flask/bi.python from app import app app.run(debug = True)
10.333333
21
0.709677
11
62
4
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.16129
62
5
22
12.4
0.846154
0.258065
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
9556cfee647e0d00d8ca1ec8267603f001ea58f8
53
py
Python
hello.py
PowerSnail/cs3240-labdemo-hj5fb
6ee122cd34d06e617c081f736e9de9397e84733b
[ "MIT" ]
null
null
null
hello.py
PowerSnail/cs3240-labdemo-hj5fb
6ee122cd34d06e617c081f736e9de9397e84733b
[ "MIT" ]
null
null
null
hello.py
PowerSnail/cs3240-labdemo-hj5fb
6ee122cd34d06e617c081f736e9de9397e84733b
[ "MIT" ]
null
null
null
from helper import * # add a comment greeting('jin')
13.25
20
0.716981
8
53
4.75
1
0
0
0
0
0
0
0
0
0
0
0
0.169811
53
3
21
17.666667
0.863636
0.245283
0
0
0
0
0.078947
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
958651006ec6a706a04c7d0a9282549d2a10d415
7,407
py
Python
tests/messysoup_test.py
messysoup/messysoup
4e4a968414b56a822e360b3c3069e5fca95b2165
[ "MIT" ]
4
2021-12-28T04:06:24.000Z
2021-12-28T14:25:34.000Z
tests/messysoup_test.py
messysoup/messysoup
4e4a968414b56a822e360b3c3069e5fca95b2165
[ "MIT" ]
null
null
null
tests/messysoup_test.py
messysoup/messysoup
4e4a968414b56a822e360b3c3069e5fca95b2165
[ "MIT" ]
null
null
null
from messysoup.messysoup import * from messysoup.table.table import * import pytest def test_a(): assert a("test", href="test.domain") == "<a href=test.domain >test</a>\n" def test_abbreviation(): assert abbreviation("test") == "<abbr >test</abbr>\n" def test_address(): assert address('test') == "<address >\ntest</address>\n" def test_area(): assert area() == "<area >\n" def test_article(): assert article("test") == "<article >test</article>\n" def test_aside(): assert aside("test") == "<aside >test</aside>\n" def test_audio(): assert audio("test") == "<audio >test</audio>\n" def test_b(): assert b("test") == "<b >test</b>\n" def test_base(): assert base('test') == "<base href=test >\n" def test_bdi(): assert bdi("test") == "<bdi >test</bdi>\n" def test_bdo(): assert bdo("test", accesskey="test") == "<bdo accesskey=test >test</bdo>\n" def test_blockquote(): assert blockquote("test") == "<blockquote >test</blockquote>\n" def test_body(): assert body("test") == "<body >test</body>\n" def test_br(): assert br() == "<br>\n" def test_button(): assert button("test") == "<button >test</button>\n" def test_canvas(): assert canvas("test") == "<canvas >test</canvas>\n" def test_caption(): assert caption("test") == "<caption >test</caption>\n" def test_cite(): assert cite("test") == "<cite >test</cite>\n" def test_code(): assert code("test") == "<code >test</code>\n" def test_col(): assert col() == "<col >\n" def test_colgroup(): assert colgroup("test") == "<colgroup >test</colgroup>\n" def test_data(): assert data("test") == "<data >test</data>\n" def test_datalist(): assert datalist("test") == "<datalist >test</datalist>\n" def test_dd(): assert dd("test") == "<dd >test</dd>\n" def test_de(): assert de("test") == "<del >test</del>\n" def test_details(): assert details("test") == "<details >test</details>\n" def test_dfn(): assert dfn("test") == "<dfn >test</dfn>\n" def test_dialog(): assert dialog("test") == "<dialog >test</dialog>\n" def test_div(): assert div("test") == "<div >test</div>\n" def test_dl(): assert dl("test") == "<dl >test</dl>\n" def test_dt(): assert dt("test") == "<dt >test</dt>\n" def test_em(): assert em("test") == "<em >test</em>\n" def test_fieldset(): assert fieldset("test") == "<fieldset >test</fieldset>\n" def test_figcaption(): assert figcaption("test") == "<figcaption >test</figcaption>\n" def test_figure(): assert figure("test") == "<figure >test</figure>\n" def test_footer(): assert footer("test") == "<footer >test</footer>\n" def test_form(): assert form("test") == "<form >test</form>\n" def test_h1(): assert h1("test") == "<h1 >test</h1>\n" def test_h2(): assert h2("test") == "<h2 >test</h2>\n" def test_h3(): assert h3("test") == "<h3 >test</h3>\n" def test_h4(): assert h4("test") == "<h4 >test</h4>\n" def test_h5(): assert h5("test") == "<h5 >test</h5>\n" def test_h6(): assert h6("test") == "<h6 >test</h6>\n" def test_head(): assert head("test") == "<head >test</head>\n" def test_header(): assert header("test") == "<header >test</header>\n" def test_hr(): assert hr() == "<hr >\n" def test_htlm(): assert html("test") == "<html >test</html>\n" def test_i(): assert i("test") == "<i >test</i>\n" def test_iframe(): assert ifrmae("test") == "<iframe >test</iframe>\n" def test_img(): assert img() == "<img >\n" def test_input(): assert input_() == "<input >\n" def test_ins(): assert ins("test") == "<ins >test</ins>\n" def test_kdb(): assert kdb("test") == "<kdb >test</kdb>\n" def test_label(): assert label("test") == "<label >test</label>\n" def test_legend(): assert legend("test") == "<legend >test</legend>\n" def test_li(): assert li("test") == "<li >test</li>\n" def test_link(): assert link() == "<link >\n" def test_main(): assert main("test") == "<main >test</main>\n" def test_map_(): assert map_("test") == "<map >test</map>\n" def test_mark(): assert mark("test") == "<mark >test</mark>\n" def test_meta(): assert meta(charset="test") == "<meta charset=test >\n" def test_meter(): assert meter("test") == "<meter >test</meter>\n" def test_nav(): assert nav("test") == "<nav >test</nav>\n" def test_noscript(): assert noscript("test") == "<noscript >test</noscript>\n" def test_ol(): assert ol("test") == "<ol >test</ol>\n" def test_optgroup(): assert optgroup("test") == "<optgroup >test</optgroup>\n" def test_option(): assert option("test") == "<option >test</option>\n" def test_output(): assert output("test") == "<output >test</output>\n" def test_p(): assert p("test") == "<p >test</p>\n" def test_param(): assert param() == "<param >\n" def test_pre(): assert pre("test") == "<pre >test</pre>\n" def test_progress(): assert progress("test") == "<progress >test</progress>\n" def test_q(): assert q("test") == "<q >test</q>\n" def test_rp(): assert rp("test") == "<rp >test</rp>\n" def test_rt(): assert rt("test") == "<rt >test</rt>\n" def test_ruby(): assert ruby("test") == "<ruby >test</ruby>\n" def test_s(): assert s("test") == "<s >test</s>\n" def test_samp(): assert samp("test") == "<samp >test</samp>\n" def test_script(): assert script("test") == "<script >test</script>\n" def test_section(): assert section("test") == "<section >test</section>\n" def test_select(): assert select("test") == "<select >test</select>\n" def test_small(): assert small("test") == "<small >test</small>\n" def test_source(): assert source() == "<source >\n" def test_span(): assert span("test") == "<span >test</span>\n" def test_strong(): assert strong("test") == "<strong >test</strong>\n" def test_style(): assert style("test") == "<style >test</style>\n" def test_sub(): assert sub("test") == "<sub >test</sub>\n" def test_summary(): assert summary("test") == "<summary >test</summary>\n" def test_sup(): assert sup("test") == "<sup >test</sup>\n" def test_svg(): assert svg("test") == "<svg >test</svg>\n" def test_table(): assert table("test") == "<table >test</table>\n" def test_tbody(): assert tbody("test") == "<tbody >test</tbody>\n" def test_td(): assert td("test") == "<td >test</td>\n" def test_template(): assert template("test") == "<template >test</template>\n" def test_textarea(): assert textarea("test") == "<textarea >test</textarea>\n" def test_tfoot(): assert tfoot("test") == "<tfoot >test</tfoot>\n" def test_th(): assert th("test") == "<th >test</th>\n" def test_thead(): assert thead("test") == "<thead >test</thead>\n" def test_time(): assert time("test") == "<time >test</time>\n" def test_title(): assert title("test") == "<title >test</title>\n" def test_tr(): assert tr("test") == "<tr >test</tr>\n" def test_u(): assert u("test") == "<u >test</u>\n" def test_ul(): assert ul("test") == "<ul >test</ul>\n" def test_var(): assert var("test") == "<var >test</var>\n" def test_video(): assert video("test") == "<video >test</video>\n" def test_wbr(): assert wbr("test") == "<wbr >test</wbr>\n"
23.003106
80
0.578237
1,055
7,407
3.956398
0.116588
0.177767
0.201246
0.00575
0
0
0
0
0
0
0
0.003964
0.18253
7,407
322
81
23.003106
0.685384
0
0
0
0
0
0.345032
0
0
0
0
0
0.493023
1
0.493023
true
0
0.013953
0
0.506977
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
4
95c1c80320c7cae1b5cfd876cfad6116ec770ef7
170
py
Python
main/SteppableDemos/ReactionDiffusionSolverFE/RD_test/Simulation/ReactionDiffusion_2D.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteppableDemos/ReactionDiffusionSolverFE/RD_test/Simulation/ReactionDiffusion_2D.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
null
null
null
main/SteppableDemos/ReactionDiffusionSolverFE/RD_test/Simulation/ReactionDiffusion_2D.py
JulianoGianlupi/nh-cc3d-4x-base-tool
c0f4aceebd4c5bf3ec39e831ef851e419b161259
[ "CC0-1.0" ]
1
2021-02-26T21:50:29.000Z
2021-02-26T21:50:29.000Z
from cc3d import CompuCellSetup from .RD_steppables import FieldSteppable CompuCellSetup.register_steppable(steppable=FieldSteppable(frequency=1)) CompuCellSetup.run()
24.285714
72
0.864706
18
170
8.055556
0.666667
0
0
0
0
0
0
0
0
0
0
0.012658
0.070588
170
6
73
28.333333
0.905063
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
251efc2f381e5ada37c7c6c9e05c0d7fc84fbda0
493
py
Python
tests/test_user.py
slurps-mad-rips/dirs
288a10d45436e6b011f6fa9dd31343f7b77277bc
[ "MIT" ]
null
null
null
tests/test_user.py
slurps-mad-rips/dirs
288a10d45436e6b011f6fa9dd31343f7b77277bc
[ "MIT" ]
null
null
null
tests/test_user.py
slurps-mad-rips/dirs
288a10d45436e6b011f6fa9dd31343f7b77277bc
[ "MIT" ]
null
null
null
from dirs import User def test_config_home(): assert User.config_home().is_dir() def test_cache_home(): assert User.cache_home().is_dir() def test_data_home(): assert User.data_home().is_dir() def test_data(user: User): assert user.data == User.data_home() def test_config(user: User): assert user.config == User.config_home() assert user.config.is_dir() def test_cache(user: User): assert user.cache == User.cache_home() assert user.config.is_dir()
18.259259
44
0.697769
77
493
4.207792
0.168831
0.246914
0.216049
0.148148
0.478395
0.277778
0
0
0
0
0
0
0.170385
493
27
45
18.259259
0.792176
0
0
0.133333
0
0
0
0
0
0
0
0
0.533333
1
0.4
false
0
0.066667
0
0.466667
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
1
0
1
0
0
0
0
0
0
0
4
2529cdc6afd6c3e07f0992e9f97a8588ac64ecdf
80
py
Python
invest_ml/model_funcs.py
convergenceIM/invest-ML
478bd7783bf720ad3e07f2e8be26b19cbfa97620
[ "Apache-2.0" ]
6
2019-02-11T23:47:02.000Z
2022-02-23T10:46:48.000Z
invest_ml/model_funcs.py
convergenceIM/invest-ML
478bd7783bf720ad3e07f2e8be26b19cbfa97620
[ "Apache-2.0" ]
null
null
null
invest_ml/model_funcs.py
convergenceIM/invest-ML
478bd7783bf720ad3e07f2e8be26b19cbfa97620
[ "Apache-2.0" ]
4
2018-06-26T06:44:59.000Z
2022-02-07T06:50:54.000Z
''' Copyright Convergence Investement Management (2018) All rights reserved. '''
26.666667
72
0.775
8
80
7.75
1
0
0
0
0
0
0
0
0
0
0
0.056338
0.1125
80
3
73
26.666667
0.816901
0.9
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
2544319df7e8882402c0eecb308b9f90e2021d42
9,486
py
Python
lib/malpem/label_fusion.py
noxtoby/MALPEM
4b09b473437f35d8e46eb70b784a4ff3005ebde7
[ "BSD-3-Clause" ]
17
2015-10-30T19:05:56.000Z
2022-03-22T07:13:36.000Z
lib/malpem/label_fusion.py
noxtoby/MALPEM
4b09b473437f35d8e46eb70b784a4ff3005ebde7
[ "BSD-3-Clause" ]
11
2016-07-26T19:29:56.000Z
2021-10-01T22:11:20.000Z
lib/malpem/label_fusion.py
MIRTK/MALPEM
13a80efb2f1d041b8347e7cbc5366e38daff18f0
[ "BSD-3-Clause" ]
11
2016-09-18T07:05:42.000Z
2020-11-28T02:53:59.000Z
# Author: Christian Ledig # Imperial College London # August, 2015 # # see license file in project root directory import os import intensity_normalise import malpem.mytools # Gaussian weighted fusion (SD of kernel) sigma = 2.5 def lwf(input_file, a_images_scaled, a_labels, output_fusion, output_prob, output_dir): # DEFINITIONS binary_labelfusion = os.path.join(malpem.mytools.__malpem_path__, "lib", "irtk", "cl_gaussian_fusion") # END DEFINITIONS task_name = "locally weighted label fusion" start_time = malpem.mytools.start_task(task_name) malpem.mytools.ensure_file(input_file, "") log_dir = os.path.join(output_dir, "log/") malpem.mytools.check_ex_dir(log_dir) logfile = os.path.join(log_dir, "fusion-" + malpem.mytools.nifty_basename(input_file) + ".log") if len(a_images_scaled) != len(a_labels): print "--- ERROR: number of atlas images/labels not identical ---" exit(1) a_count = len(a_images_scaled) a_parameters = "" for i in range(len(a_images_scaled)): a_parameters = a_parameters + " " + a_labels[i] + " " + a_images_scaled[i] tmp_dir = os.path.join(output_dir, "tmp_fusion/") malpem.mytools.check_ex_dir(tmp_dir) input_scaled = os.path.join(tmp_dir, malpem.mytools.nifty_basename(input_file) + "_scaled.nii.gz") if not os.path.isfile(input_scaled): intensity_normalise.robust_rescale(input_file, input_scaled, output_dir) else: print "Skipping intensity normalisation (" + input_scaled + "): file exists" parameters_labelfusion = input_scaled + " " + str(sigma) + " " + str(a_count) + " " + \ a_parameters + " " + output_prob + " " + output_fusion malpem.mytools.execute_cmd(binary_labelfusion, parameters_labelfusion, logfile) malpem.mytools.ensure_file(output_fusion, "") malpem.mytools.finished_task(start_time, task_name) return True def create_tissue_seg(input_file, input_seg, output_seg, output_dir): # DEFINITIONS binary_segmaths = os.path.join(malpem.mytools.__malpem_path__, "lib", "niftyseg", "seg_maths") # NMM STRUCTURE IDs FOR RESPECTIVE TISSUE CLASSES vent_list = [1, 2, 21, 22, 23, 24] cgm_list = range(41, 139, 1) dgm_list = range(1, 41, 1) wm_list = [12, 13, 16, 17] other_list = [14, 15, 18, 33, 34] for i in wm_list: dgm_list.remove(i) for i in vent_list: dgm_list.remove(i) for i in other_list: dgm_list.remove(i) # END DEFINITIONS task_name = "creating tissue segmentation from structural segmentation" start_time = malpem.mytools.start_task(task_name) malpem.mytools.ensure_file(input_seg, "") log_dir = os.path.join(output_dir, "log/") malpem.mytools.check_ex_dir(log_dir) logfile = os.path.join(log_dir, "tissue-" + malpem.mytools.nifty_basename(input_file) + ".log") parameters_segmaths = input_seg + " -mul 0 " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) for i in vent_list: parameters_segmaths = input_seg + " -thr " + str(i-1) + " -uthr " + str(i+1) + " -bin -mul 1 -add " + \ output_seg + " " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) # DEEP GRAY MATTER, HANDLE CONSECUTIVE CLASSES SPECIAL TO ACCELERATE low = 0 high = 0 for i in dgm_list: if low == 0: low = i if high == 0: high = i elif high == i - 1: high = i else: parameters_segmaths = input_seg + " -thr " + str(low-1) + " -uthr " + str(high+1) + " -bin -mul 2 -add " + \ output_seg + " " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) low = i high = i if low > 0: parameters_segmaths = input_seg + " -thr " + str(low-1) + " -uthr " + str(high+1) + " -bin -mul 2 -add " + \ output_seg + " " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) # DONE DGM # CORTICAL GRAY MATTER, HANDLE CONSECUTIVE CLASSES SPECIAL TO ACCELERATE low = 0 high = 0 for i in cgm_list: if low == 0: low = i if high == 0: high = i elif high == i - 1: high = i else: parameters_segmaths = input_seg + " -thr " + str(low-1) + " -uthr " + str(high+1) + " -bin -mul 3 -add " + \ output_seg + " " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) low = i high = i if low > 0: parameters_segmaths = input_seg + " -thr " + str(low-1) + " -uthr " + str(high+1) + " -bin -mul 3 -add " + \ output_seg + " " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) # DONE CGM for i in wm_list: parameters_segmaths = input_seg + " -thr " + str(i-1) + " -uthr " + str(i+1) + " -bin -mul 4 -add " + \ output_seg + " " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) for i in other_list: parameters_segmaths = input_seg + " -thr " + str(i-1) + " -uthr " + str(i+1) + " -bin -mul 5 -add " + \ output_seg + " " + output_seg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) malpem.mytools.ensure_file(output_seg, "") malpem.mytools.finished_task(start_time, task_name) return True def create_tissue_maps(input_file, malpem_prob_dir, output_dir): # DEFINITIONS binary_segmaths = os.path.join(malpem.mytools.__malpem_path__, "lib", "niftyseg", "seg_maths") # NMM STRUCTURE IDs FOR RESPECTIVE TISSUE CLASSES vent_list = [1, 2, 21, 22, 23, 24] cgm_list = range(41, 139, 1) dgm_list = range(1, 41, 1) wm_list = [12, 13, 16, 17] other_list = [14, 15, 18, 33, 34] for i in wm_list: dgm_list.remove(i) for i in vent_list: dgm_list.remove(i) for i in other_list: dgm_list.remove(i) # END DEFINITIONS task_name = "creating tissue probability maps from structural segmentation maps" start_time = malpem.mytools.start_task(task_name) log_dir = os.path.join(output_dir, "log/") malpem.mytools.check_ex_dir(log_dir) logfile = os.path.join(log_dir, "tissue-maps-" + malpem.mytools.nifty_basename(input_file) + ".log") tissue_dummy = os.path.join(malpem_prob_dir, "posteriors_0.nii.gz") tissue_bg = os.path.join(malpem_prob_dir, "tissueMap_background.nii.gz") tissue_vent = os.path.join(malpem_prob_dir, "tissueMap_ventricles.nii.gz") tissue_dgm = os.path.join(malpem_prob_dir, "tissueMap_dGM.nii.gz") tissue_cgm = os.path.join(malpem_prob_dir, "tissueMap_cGM.nii.gz") tissue_wm = os.path.join(malpem_prob_dir, "tissueMap_WM.nii.gz") tissue_other = os.path.join(malpem_prob_dir, "tissueMap_other.nii.gz") malpem.mytools.ensure_file(tissue_dummy, "") parameters_segmaths = tissue_dummy + " -mul 0 " for i in vent_list: cur_map = os.path.join(malpem_prob_dir, "posteriors_" + str(i) + ".nii.gz") malpem.mytools.ensure_file(cur_map, "") parameters_segmaths += " -add " + cur_map parameters_segmaths += " " + tissue_vent malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) parameters_segmaths = tissue_dummy + " -mul 0 " for i in dgm_list: cur_map = os.path.join(malpem_prob_dir, "posteriors_" + str(i) + ".nii.gz") malpem.mytools.ensure_file(cur_map, "") parameters_segmaths += " -add " + cur_map parameters_segmaths += " " + tissue_dgm malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) parameters_segmaths = tissue_dummy + " -mul 0 " for i in cgm_list: cur_map = os.path.join(malpem_prob_dir, "posteriors_" + str(i) + ".nii.gz") malpem.mytools.ensure_file(cur_map, "") parameters_segmaths += " -add " + cur_map parameters_segmaths += " " + tissue_cgm malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) parameters_segmaths = tissue_dummy + " -mul 0 " for i in wm_list: cur_map = os.path.join(malpem_prob_dir, "posteriors_" + str(i) + ".nii.gz") malpem.mytools.ensure_file(cur_map, "") parameters_segmaths += " -add " + cur_map parameters_segmaths += " " + tissue_wm malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) parameters_segmaths = tissue_dummy + " -mul 0 " for i in other_list: cur_map = os.path.join(malpem_prob_dir, "posteriors_" + str(i) + ".nii.gz") malpem.mytools.ensure_file(cur_map, "") parameters_segmaths += " -add " + cur_map parameters_segmaths += " " + tissue_other malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) parameters_segmaths = tissue_dummy + " -add 1 -bin -sub " + tissue_vent + " -sub " + tissue_dgm + \ " -sub " + tissue_cgm + " -sub " + tissue_wm + " -sub " + tissue_other + " " + tissue_bg malpem.mytools.execute_cmd(binary_segmaths, parameters_segmaths, logfile) malpem.mytools.finished_task(start_time, task_name) return True
40.194915
120
0.641261
1,257
9,486
4.56961
0.128878
0.097319
0.040042
0.041783
0.784645
0.770717
0.735376
0.676358
0.663301
0.656511
0
0.017234
0.241514
9,486
235
121
40.365957
0.781098
0.053026
0
0.69186
0
0
0.111446
0.008478
0
0
0
0
0
0
null
null
0
0.017442
null
null
0.011628
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
2557d28e16942c8bdbb5c92220dde708b36dcf1a
504
py
Python
my_code.py
Athenian-Computer-Science/RB-author-content-assignment-template
1a5cef615e3e61a6d862a9d10533d57cb0fa2729
[ "Apache-2.0" ]
null
null
null
my_code.py
Athenian-Computer-Science/RB-author-content-assignment-template
1a5cef615e3e61a6d862a9d10533d57cb0fa2729
[ "Apache-2.0" ]
null
null
null
my_code.py
Athenian-Computer-Science/RB-author-content-assignment-template
1a5cef615e3e61a6d862a9d10533d57cb0fa2729
[ "Apache-2.0" ]
1
2021-04-10T22:21:35.000Z
2021-04-10T22:21:35.000Z
# @desc Add a short description or instruction here. This will show up at the top of the exercise. def function_name(parameter): # give your function a name and parameter(s) # have it do stuff return # what does it return? This will be what the user types when they predict the result. def main(): print(function_name(parameter1)) print(function_name(parameter2)) print(function_name(parameter3)) print(function_name(parameter4)) if __name__ == '__main__': main()
29.647059
99
0.71627
73
504
4.767123
0.630137
0.172414
0.195402
0
0
0
0
0
0
0
0
0.009975
0.204365
504
16
100
31.5
0.857855
0.47619
0
0
0
0
0.030888
0
0
0
0
0
0
1
0.222222
false
0
0
0.111111
0.333333
0.444444
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
1
0
4
25727141f38ae0807c411017bc1a0589e05460e3
154
py
Python
typeidea/file_from_pycharm.py
python-shell/cross_wall1
b7ffb97911a491253f34bbcedffe40f5f75e577a
[ "MIT" ]
null
null
null
typeidea/file_from_pycharm.py
python-shell/cross_wall1
b7ffb97911a491253f34bbcedffe40f5f75e577a
[ "MIT" ]
null
null
null
typeidea/file_from_pycharm.py
python-shell/cross_wall1
b7ffb97911a491253f34bbcedffe40f5f75e577a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2021/10/17 21:35 # @Author : jacson # @FileName: file_from_pycharm.py print("hello world!!!")
22
33
0.616883
23
154
4.043478
1
0
0
0
0
0
0
0
0
0
0
0.100775
0.162338
154
7
34
22
0.620155
0.779221
0
0
0
0
0.466667
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
c2671c2c49a67a4bbf231a05fce64ce917ed85d6
236
py
Python
ois_api_client/v3_0/dto/DetailedReason.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
7
2020-10-22T08:15:29.000Z
2022-01-27T07:59:39.000Z
ois_api_client/v3_0/dto/DetailedReason.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
null
null
null
ois_api_client/v3_0/dto/DetailedReason.py
peterkulik/ois_api_client
51dabcc9f920f89982c4419bb058f5a88193cee0
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass class DetailedReason: """Detailed justification of exemption :param case: Case notation with code :param reason: Case notation with text """ case: str reason: str
16.857143
42
0.70339
27
236
6.148148
0.666667
0.144578
0.192771
0
0
0
0
0
0
0
0
0
0.237288
236
13
43
18.153846
0.922222
0.474576
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.2
0
0.8
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
c267e107c3847b821d444bd48fe650a6e2cf17e6
174
py
Python
dph/util.py
jinscoe123/dph
ab36a09faa29b4110bba12ba276e66b8764c0c3a
[ "MIT" ]
2
2022-02-01T04:49:36.000Z
2022-03-25T12:22:27.000Z
dph/util.py
jinscoe123/dph
ab36a09faa29b4110bba12ba276e66b8764c0c3a
[ "MIT" ]
null
null
null
dph/util.py
jinscoe123/dph
ab36a09faa29b4110bba12ba276e66b8764c0c3a
[ "MIT" ]
1
2022-03-24T00:16:23.000Z
2022-03-24T00:16:23.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- from functools import reduce import operator __all__ = [ 'product' ] def product(*args): return reduce(operator.mul, args)
13.384615
37
0.666667
22
174
5.090909
0.772727
0
0
0
0
0
0
0
0
0
0
0.006993
0.178161
174
12
38
14.5
0.776224
0.218391
0
0
0
0
0.052239
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
c29957fb0335dbd65f00334a43842da2ffdd6f45
5,485
py
Python
tests/functional/user/test_delete.py
DavidWalshe93/The_Phoenix_Project
2e0e0af692d876b845f70d594acc7799c9a78e1e
[ "MIT" ]
null
null
null
tests/functional/user/test_delete.py
DavidWalshe93/The_Phoenix_Project
2e0e0af692d876b845f70d594acc7799c9a78e1e
[ "MIT" ]
9
2021-05-09T08:47:47.000Z
2021-05-17T14:42:15.000Z
tests/functional/user/test_delete.py
DavidWalshe93/The_Phoenix_Project
2e0e0af692d876b845f70d594acc7799c9a78e1e
[ "MIT" ]
1
2021-08-17T11:32:14.000Z
2021-08-17T11:32:14.000Z
""" Author: David Walshe Date: 15 May 2021 """ import json from copy import deepcopy import pytest from flask import Response from tests.functional.utils import FlaskTestRig, login, token_auth_header_field @FlaskTestRig.setup_app(n_users=3) def test_delete_me_no_auth_401(client_factory, make_users, **kwargs): """ Validate an Unauthorised error is returned when attempting to delete the current user. :endpoint: /api/v1/users/me :method: DELETE :auth: False :params: None :status: 401 :response: An unauthorised error. """ rig: FlaskTestRig = FlaskTestRig.extract_rig_from_kwargs(kwargs) expected = { "error": "Unauthorised", "message": "Invalid credentials." } # Make request and gather response. res: Response = rig.client.delete("/api/v1/users/me") # Get JSON data returned. data = json.loads(res.data) # Verify response matches expected. assert data == expected assert res.status_code == 401 @FlaskTestRig.setup_app(n_users=3) def test_delete_me_with_auth_user_200(client_factory, make_users, **kwargs): """ Validate the current user can close their account. :endpoint: /api/v1/users/me :method: DELETE :auth: True (Token) :params: None :status: 200 :response: A list of user objects. """ rig: FlaskTestRig = FlaskTestRig.extract_rig_from_kwargs(kwargs) expected = [{"username": "tinybear433", "id": 0}] # Acquire login token for first user. user = rig.get_first_user(keep_password=True) token = login(rig.client, user) # Make request and gather response. res: Response = rig.client.delete("/api/v1/users/me", headers=token_auth_header_field(token)) # Verify response matches expected. assert json.loads(res.data) == expected assert res.status_code == 200 login(rig.client, user, should_fail=True) @FlaskTestRig.setup_app(n_users=3) def test_delete_users_with_auth_user_401(client_factory, make_users, **kwargs): """ Validate a User role cannot bulk delete. :endpoint: /api/v1/users :method: DELETE :auth: True (Token) :params: None :status: 401 :response: 401 error and message. """ rig: FlaskTestRig = FlaskTestRig.extract_rig_from_kwargs(kwargs) expected = { 'error': 'Unauthorised', 'message': 'Invalid credentials.' } # Acquire login token for first user. user = rig.get_first_user(keep_password=True) token = login(rig.client, user) # Make request and gather response. res: Response = rig.client.delete("/api/v1/users", headers=token_auth_header_field(token)) # Verify response matches expected. assert json.loads(res.data) == expected assert res.status_code == 401 @FlaskTestRig.setup_app(n_users=10) def test_delete_users_with_auth_admin_200(client_factory, make_users, **kwargs): """ Validate a Admin role can bulk delete. :endpoint: /api/v1/users :method: DELETE :auth: True (Token) :params: None :status: 200 :response: id and username of deleted users. """ rig: FlaskTestRig = FlaskTestRig.extract_rig_from_kwargs(kwargs) users_to_delete = { "users": [ {"id": 0}, {"id": 2} ] } expected = rig.get_current_users(keep_email=True, keep_password=True) expected = [expected[0], expected[2]] expected_full = deepcopy(expected) _ = [item.pop("last_login") for item in expected] _ = [item.pop("email") for item in expected] _ = [item.pop("password") for item in expected] # Acquire login token for first user. user = rig.get_first_user(keep_password=True, admin_only=True) token = login(rig.client, user) # Make request and gather response. res: Response = rig.client.delete("/api/v1/users", headers=token_auth_header_field(token), data=json.dumps(users_to_delete)) # Verify response matches expected. assert json.loads(res.data) == expected assert res.status_code == 200 for user in expected_full: login(rig.client, user, should_fail=True) @FlaskTestRig.setup_app(n_users=10) @pytest.mark.parametrize("user_id", [3, 4, 5, 6, 7]) def test_delete_user_id_with_auth_admin_200(user_id, client_factory, make_users, **kwargs): """ Validate a User role cannot bulk delete. :endpoint: /api/v1/users :method: DELETE :auth: True (Token) :params: None :status: 200 :response: The username and id of the deleted user. """ rig: FlaskTestRig = FlaskTestRig.extract_rig_from_kwargs(kwargs) expected = rig.get_current_users(keep_email=True, keep_password=True)[user_id] expected_full = deepcopy(expected) _ = [expected.pop(item) for item in ["email", "last_login", "password"]] print(expected) # Acquire login token for first user. user = rig.get_first_user(keep_password=True, admin_only=True) token = login(rig.client, user) # Make request and gather response. res: Response = rig.client.delete(f"/api/v1/users/{user_id}", headers=token_auth_header_field(token)) # Verify response matches expected. assert json.loads(res.data) == [expected] assert res.status_code == 200 login(rig.client, expected_full, should_fail=True)
29.489247
97
0.660893
702
5,485
4.981481
0.173789
0.030884
0.028596
0.030884
0.758078
0.737203
0.711181
0.67658
0.64541
0.608808
0
0.01991
0.230811
5,485
185
98
29.648649
0.808959
0.280766
0
0.415584
0
0
0.067669
0.006176
0
0
0
0
0.12987
1
0.064935
false
0.103896
0.064935
0
0.12987
0.012987
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
c2a6b1c657acf2cc8ea87e3d5bcd4e1aa8479590
1,198
py
Python
main.py
franciskoinno/stock_scanner
32d000ebd407e7d1b9c9f1b661a3537731996500
[ "MIT" ]
null
null
null
main.py
franciskoinno/stock_scanner
32d000ebd407e7d1b9c9f1b661a3537731996500
[ "MIT" ]
null
null
null
main.py
franciskoinno/stock_scanner
32d000ebd407e7d1b9c9f1b661a3537731996500
[ "MIT" ]
null
null
null
from selenium import webdriver # github change # git change chrome_driver_path = r"C:\Users\Francis\Desktop\chromedriver_win32\chromedriver.exe" driver_long_lower_shadow = webdriver.Chrome(chrome_driver_path) driver_hammer = webdriver.Chrome(chrome_driver_path) driver_dragon = webdriver.Chrome(chrome_driver_path) driver_white = webdriver.Chrome(chrome_driver_path) driver_long_lower_shadow.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_lls,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3") driver_hammer.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_h,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3") driver_dragon.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_dd,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3") driver_white.get("https://finviz.com/screener.ashx?v=211&f=cap_smallover,fa_salesqoq_o5,sh_curvol_o50,sh_instown_o10,sh_price_o15,ta_candlestick_mw,ta_highlow52w_b0to10h,ta_sma200_sb50,ta_sma50_pa&ft=3")
85.571429
216
0.868114
208
1,198
4.5625
0.283654
0.063224
0.084299
0.113804
0.794521
0.794521
0.638567
0.638567
0.638567
0.638567
0
0.080479
0.025042
1,198
13
217
92.153846
0.732021
0.020033
0
0
0
0.4
0.676345
0.051238
0
0
0
0
0
1
0
false
0
0.1
0
0.1
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6c40766a21fe407baf153c5132e658d4494e77f6
84
py
Python
app/__init__.py
vyahello/trump-bullet
7648f9722471323ddec1aa6b6d7db38166bebc91
[ "Apache-2.0" ]
null
null
null
app/__init__.py
vyahello/trump-bullet
7648f9722471323ddec1aa6b6d7db38166bebc91
[ "Apache-2.0" ]
2
2021-08-29T08:39:16.000Z
2021-10-03T15:36:20.000Z
app/__init__.py
vyahello/trump-bullet
7648f9722471323ddec1aa6b6d7db38166bebc91
[ "Apache-2.0" ]
null
null
null
class PropertyError(Exception): """Represents game property error.""" pass
16.8
41
0.690476
8
84
7.25
1
0
0
0
0
0
0
0
0
0
0
0
0.190476
84
4
42
21
0.852941
0.369048
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
6c5bf0e50fc822e7c7db4086170bf5497108b19c
4,278
py
Python
VulnServer/GTER/exploit.py
cwinfosec/practice
c0010258799aa5c9f9e5cccec2ba8515b8424771
[ "MIT" ]
1
2020-10-03T07:57:42.000Z
2020-10-03T07:57:42.000Z
VulnServer/GTER/exploit.py
cwinfosec/practice
c0010258799aa5c9f9e5cccec2ba8515b8424771
[ "MIT" ]
null
null
null
VulnServer/GTER/exploit.py
cwinfosec/practice
c0010258799aa5c9f9e5cccec2ba8515b8424771
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Description: Vanilla Buffer Overflow w/ egghunter via "GTER" in VulnServer Author: Cody Winkler Contact: @cwinfosec (twitter) Date: 9/15/2019 Tested On: Windows XP SP2 EN [+] Usage: python expoit.py <IP> <PORT> $ python exploit.py 127.0.0.1 21 """ import socket # 0x625011AF | JMP ESP | essfunc.dll jmp_esp = "\xAF\x11\x50\x62" #nasm > add eax,9 #00000000 83C009 add eax,byte +0x9 #nasm > jmp eax #00000000 FFE0 jmp eax stage_1 = "\x83\xC0\x09\xFF\xE0" # d3rpd3rp egghunter # Length: 32 bytes egg_hunter = ("\x66\x81\xca\xff\x0f\x42\x52\x6a\x02\x58\xcd\x2e\x3c\x05\x5a\x74" "\xef\xb8\x64\x33\x72\x70\x8b\xfa\xaf\x75\xea\xaf\x75\xe7\xff\xe7") # msfvenom -p windows/shell_reverse_tcp LHOST=10.11.1.130 LPORT=443 EXITFUNC=thread -b "\x00" -e x86/shikata_ga_nai --platform windows --arch x86 -f C # Payload size: 351 bytes shellcode = ("\xbb\x31\x77\xa2\xc9\xdb\xd8\xd9\x74\x24\xf4\x5a\x2b\xc9\xb1" "\x52\x83\xea\xfc\x31\x5a\x0e\x03\x6b\x79\x40\x3c\x77\x6d\x06" "\xbf\x87\x6e\x67\x49\x62\x5f\xa7\x2d\xe7\xf0\x17\x25\xa5\xfc" "\xdc\x6b\x5d\x76\x90\xa3\x52\x3f\x1f\x92\x5d\xc0\x0c\xe6\xfc" "\x42\x4f\x3b\xde\x7b\x80\x4e\x1f\xbb\xfd\xa3\x4d\x14\x89\x16" "\x61\x11\xc7\xaa\x0a\x69\xc9\xaa\xef\x3a\xe8\x9b\xbe\x31\xb3" "\x3b\x41\x95\xcf\x75\x59\xfa\xea\xcc\xd2\xc8\x81\xce\x32\x01" "\x69\x7c\x7b\xad\x98\x7c\xbc\x0a\x43\x0b\xb4\x68\xfe\x0c\x03" "\x12\x24\x98\x97\xb4\xaf\x3a\x73\x44\x63\xdc\xf0\x4a\xc8\xaa" "\x5e\x4f\xcf\x7f\xd5\x6b\x44\x7e\x39\xfa\x1e\xa5\x9d\xa6\xc5" "\xc4\x84\x02\xab\xf9\xd6\xec\x14\x5c\x9d\x01\x40\xed\xfc\x4d" "\xa5\xdc\xfe\x8d\xa1\x57\x8d\xbf\x6e\xcc\x19\x8c\xe7\xca\xde" "\xf3\xdd\xab\x70\x0a\xde\xcb\x59\xc9\x8a\x9b\xf1\xf8\xb2\x77" "\x01\x04\x67\xd7\x51\xaa\xd8\x98\x01\x0a\x89\x70\x4b\x85\xf6" "\x61\x74\x4f\x9f\x08\x8f\x18\xaa\xc7\x8e\x5a\xc2\xd5\x90\x5b" "\xa8\x53\x76\x31\xde\x35\x21\xae\x47\x1c\xb9\x4f\x87\x8a\xc4" "\x50\x03\x39\x39\x1e\xe4\x34\x29\xf7\x04\x03\x13\x5e\x1a\xb9" "\x3b\x3c\x89\x26\xbb\x4b\xb2\xf0\xec\x1c\x04\x09\x78\xb1\x3f" "\xa3\x9e\x48\xd9\x8c\x1a\x97\x1a\x12\xa3\x5a\x26\x30\xb3\xa2" "\xa7\x7c\xe7\x7a\xfe\x2a\x51\x3d\xa8\x9c\x0b\x97\x07\x77\xdb" "\x6e\x64\x48\x9d\x6e\xa1\x3e\x41\xde\x1c\x07\x7e\xef\xc8\x8f" "\x07\x0d\x69\x6f\xd2\x95\x89\x92\xf6\xe3\x21\x0b\x93\x49\x2c" "\xac\x4e\x8d\x49\x2f\x7a\x6e\xae\x2f\x0f\x6b\xea\xf7\xfc\x01" "\x63\x92\x02\xb5\x84\xb7") # Total Length: 173 bytes buffer = "GTER /.:/" + egg_hunter buffer += "A"*(147-len(egg_hunter)) buffer += jmp_esp buffer += stage_1 buffer += "\x43"*11 try: print "[+] Connecting to target" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("10.11.1.128", 9999)) print s.recv(1024) print "[+] Sending stage 2 + shellcode" s.send("RTIME d3rpd3rp" + shellcode) print s.recv(1024) s.close() except: print "[-] Something went wrong :(" try: print "[+] Connecting to target" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("10.11.1.128", 9999)) print s.recv(1024) print "[+] Sending stage 1 payload with length: %d" % len(buffer) s.send(buffer) s.close() except: print "[-] Something went wrong :("
47.533333
234
0.507714
618
4,278
3.490291
0.517799
0.022253
0.006954
0.019471
0.141864
0.141864
0.141864
0.109411
0.109411
0.109411
0
0.208598
0.336606
4,278
89
235
48.067416
0.551445
0.184198
0
0.309091
0
0.454545
0.556279
0.475039
0
0
0
0
0
0
null
null
0
0.018182
null
null
0.163636
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
1
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
6c66fdd494ced66c026af22cb6d1a4eb05df1d25
173
py
Python
scraper_factory/core/exceptions.py
machinia/scraper-factory
79804f127ec9be692795ff1603f95730164a61f7
[ "MIT" ]
null
null
null
scraper_factory/core/exceptions.py
machinia/scraper-factory
79804f127ec9be692795ff1603f95730164a61f7
[ "MIT" ]
4
2021-03-31T19:20:43.000Z
2022-03-02T14:59:02.000Z
scraper_factory/core/exceptions.py
machinia/scraper-factory
79804f127ec9be692795ff1603f95730164a61f7
[ "MIT" ]
null
null
null
class ScraperFactoryException(Exception): pass class SpiderNotFoundError(ScraperFactoryException): pass class InvalidUrlError(ScraperFactoryException): pass
15.727273
51
0.803468
12
173
11.583333
0.5
0.129496
0
0
0
0
0
0
0
0
0
0
0.144509
173
10
52
17.3
0.939189
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
6658b856382d2d1209fd65ceceb70abc3ad9f2d6
320
py
Python
scripts/pfp_cfg.py
OzFlux/PFP_Classic
a567cc986c2e220d95a377ca129994b018f0248c
[ "BSD-3-Clause" ]
1
2021-01-17T20:53:39.000Z
2021-01-17T20:53:39.000Z
scripts/pfp_cfg.py
OzFlux/PFP_Classic
a567cc986c2e220d95a377ca129994b018f0248c
[ "BSD-3-Clause" ]
null
null
null
scripts/pfp_cfg.py
OzFlux/PFP_Classic
a567cc986c2e220d95a377ca129994b018f0248c
[ "BSD-3-Clause" ]
null
null
null
""" Utility routines for handling control file contents.""" def cfg_string_to_list(input_string): """ Convert a string containing items separated by commas into a list.""" if "," in input_string: output_list = input_string.split(",") else: output_list = [input_string] return output_list
35.555556
77
0.690625
42
320
5.02381
0.642857
0.208531
0.21327
0.199052
0
0
0
0
0
0
0
0
0.209375
320
9
78
35.555556
0.833992
0.371875
0
0
0
0
0.010582
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6660282845733e9c39f193e92c977befecc2cbb2
44
py
Python
week1.py
mitchell011/csws-week1
4d2817e6b31987df54250811107ae9f2ff4a8cdb
[ "Apache-2.0" ]
null
null
null
week1.py
mitchell011/csws-week1
4d2817e6b31987df54250811107ae9f2ff4a8cdb
[ "Apache-2.0" ]
null
null
null
week1.py
mitchell011/csws-week1
4d2817e6b31987df54250811107ae9f2ff4a8cdb
[ "Apache-2.0" ]
null
null
null
for x in range(10): print("Hello world")
22
24
0.636364
8
44
3.5
1
0
0
0
0
0
0
0
0
0
0
0.057143
0.204545
44
2
24
22
0.742857
0
0
0
0
0
0.244444
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
dd7e37dd7ca89241903805443586d682a7fe4b92
59
py
Python
setup.py
testmailqwerty12/fwdform2
db4d462f1c6261da4627d6aaff7ab6778be63511
[ "MIT" ]
6
2018-03-04T19:19:00.000Z
2018-09-20T02:33:52.000Z
setup.py
testmailqwerty12/fwdform2
db4d462f1c6261da4627d6aaff7ab6778be63511
[ "MIT" ]
6
2018-03-05T00:10:36.000Z
2021-05-16T14:09:44.000Z
setup.py
testmailqwerty12/fwdform2
db4d462f1c6261da4627d6aaff7ab6778be63511
[ "MIT" ]
1
2019-12-04T07:10:35.000Z
2019-12-04T07:10:35.000Z
#!/usr/bin/env python3 from app import db db.create_all()
11.8
22
0.728814
11
59
3.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0.019608
0.135593
59
4
23
14.75
0.803922
0.355932
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
06be60fcd83cf2fd985d36e09d1df34cfa141e3c
111
py
Python
flask_chassis/__init__.py
dabarrell/flask-microservice-chassis
435879b0f57a89d7d24ada7755fc9166381f93b9
[ "MIT" ]
2
2019-04-26T06:30:24.000Z
2020-04-22T02:31:39.000Z
flask_chassis/__init__.py
dabarrell/flask-microservice-chassis
435879b0f57a89d7d24ada7755fc9166381f93b9
[ "MIT" ]
null
null
null
flask_chassis/__init__.py
dabarrell/flask-microservice-chassis
435879b0f57a89d7d24ada7755fc9166381f93b9
[ "MIT" ]
null
null
null
from .flask_chassis import FlaskChassis from .utils import get_redis, get_db, _get_chassis __version__ = '0.1'
27.75
50
0.810811
17
111
4.764706
0.705882
0
0
0
0
0
0
0
0
0
0
0.020408
0.117117
111
4
51
27.75
0.806122
0
0
0
0
0
0.026786
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
06cc639259d817c94d2cf321ab50269715647c88
240
py
Python
slack_sdk/web/__init__.py
priya1puresoftware/python-slack-sdk
3503182feaaf4d41b57fd8bf10038ebc99f1f3c7
[ "MIT" ]
2,486
2016-11-03T14:31:43.000Z
2020-10-26T23:07:44.000Z
slack_sdk/web/__init__.py
priya1puresoftware/python-slack-sdk
3503182feaaf4d41b57fd8bf10038ebc99f1f3c7
[ "MIT" ]
721
2016-11-03T21:26:56.000Z
2020-10-26T12:41:29.000Z
slack_sdk/web/__init__.py
priya1puresoftware/python-slack-sdk
3503182feaaf4d41b57fd8bf10038ebc99f1f3c7
[ "MIT" ]
627
2016-11-02T19:04:19.000Z
2020-10-25T19:21:13.000Z
"""The Slack Web API allows you to build applications that interact with Slack in more complex ways than the integrations we provide out of the box.""" from .client import WebClient # noqa from .slack_response import SlackResponse # noqa
48
78
0.7875
37
240
5.081081
0.810811
0
0
0
0
0
0
0
0
0
0
0
0.166667
240
4
79
60
0.94
0.65
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
06f186f4075ad50e0123fb949bd6b7e88c053085
178
py
Python
proxyclient/tools/reboot.py
EricRabil/m1n1
0a1a9348c32e2e44374720cd9d68cbe81cf696df
[ "MIT" ]
1,604
2021-01-14T19:04:59.000Z
2022-03-31T18:34:16.000Z
proxyclient/tools/reboot.py
EricRabil/m1n1
0a1a9348c32e2e44374720cd9d68cbe81cf696df
[ "MIT" ]
105
2021-01-15T03:52:27.000Z
2022-03-30T22:16:52.000Z
proxyclient/tools/reboot.py
EricRabil/m1n1
0a1a9348c32e2e44374720cd9d68cbe81cf696df
[ "MIT" ]
96
2021-01-14T21:13:53.000Z
2022-03-31T12:14:14.000Z
#!/usr/bin/env python3 # SPDX-License-Identifier: MIT import sys, pathlib sys.path.append(str(pathlib.Path(__file__).resolve().parents[1])) from m1n1.setup import * p.reboot()
19.777778
65
0.741573
27
178
4.740741
0.851852
0
0
0
0
0
0
0
0
0
0
0.024691
0.089888
178
8
66
22.25
0.765432
0.280899
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
66074c27fa9ef9241ebdcf15673581074814d302
194
py
Python
example/project/wsgi.py
rterehov/Spirit
515894001da9d499852b7ebde25892d290e26c38
[ "MIT" ]
null
null
null
example/project/wsgi.py
rterehov/Spirit
515894001da9d499852b7ebde25892d290e26c38
[ "MIT" ]
null
null
null
example/project/wsgi.py
rterehov/Spirit
515894001da9d499852b7ebde25892d290e26c38
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.core.wsgi import get_wsgi_application # os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings.local_prod") application = get_wsgi_application()
27.714286
80
0.778351
25
194
5.76
0.72
0.097222
0.25
0
0
0
0
0
0
0
0
0.00565
0.087629
194
7
81
27.714286
0.80791
0.515464
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
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
6624614fc6595d537879b77ac99b6f40e388a32e
184
py
Python
python-if/exercise1.py
ATelders/learn-python
d9eaa392bebb57d7bafd98d78ffa0731ed371d11
[ "MIT" ]
null
null
null
python-if/exercise1.py
ATelders/learn-python
d9eaa392bebb57d7bafd98d78ffa0731ed371d11
[ "MIT" ]
null
null
null
python-if/exercise1.py
ATelders/learn-python
d9eaa392bebb57d7bafd98d78ffa0731ed371d11
[ "MIT" ]
null
null
null
value = '6' if value == '7': print('The value is 7') elif value == '8': print('The value is 8') else: print('The value is not one we are looking for') print('Finished!')
16.727273
52
0.592391
31
184
3.516129
0.548387
0.220183
0.357798
0.412844
0
0
0
0
0
0
0
0.035714
0.23913
184
10
53
18.4
0.742857
0
0
0
0
0
0.429348
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
662895c71730aee416732fdfd9164bc4170a491d
267
py
Python
back/babar_twitter/admin.py
dryvenn/babar3
6f193ddbc1170739d8b1bf39033ad64d9bc85747
[ "MIT" ]
null
null
null
back/babar_twitter/admin.py
dryvenn/babar3
6f193ddbc1170739d8b1bf39033ad64d9bc85747
[ "MIT" ]
null
null
null
back/babar_twitter/admin.py
dryvenn/babar3
6f193ddbc1170739d8b1bf39033ad64d9bc85747
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * class TweetAdmin(admin.ModelAdmin): fields = ['time', 'message', 'timestamp'] readonly_fields = ['time', 'message', 'timestamp'] list_filter = ['timestamp'] admin.site.register(Tweet, TweetAdmin)
22.25
54
0.700375
29
267
6.37931
0.655172
0.108108
0.183784
0.281081
0
0
0
0
0
0
0
0
0.153558
267
11
55
24.272727
0.818584
0
0
0
0
0
0.183521
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.857143
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
662e1fbecb03816bfca33d16e40a220d41e0bd98
261
py
Python
fabfile.py
sn1k/Vinos
d5108a2cfa089b046164c48ea20b299317759bb2
[ "MIT" ]
null
null
null
fabfile.py
sn1k/Vinos
d5108a2cfa089b046164c48ea20b299317759bb2
[ "MIT" ]
null
null
null
fabfile.py
sn1k/Vinos
d5108a2cfa089b046164c48ea20b299317759bb2
[ "MIT" ]
null
null
null
#Dock download & install def getDocker(): run('sudo apt-get update') run('sudo apt-get install -y docker.io') run('sudo docker pull sn1k/submodulo-alberto') #Ejecucion de docker def runDocker(): run('sudo docker run -p 80:80 -i -t sn1k/submodulo-alberto')
26.1
61
0.720307
42
261
4.47619
0.571429
0.148936
0.106383
0.138298
0
0
0
0
0
0
0
0.026667
0.137931
261
9
62
29
0.808889
0.16092
0
0
0
0
0.663594
0.202765
0
0
0
0
0
1
0.333333
true
0
0
0
0.333333
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
1
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
6634e049736d37616ff76da8db2817fe9b731877
643
py
Python
nxs_utils/common.py
microsoft/nxs
b271c0637576084b36bd0bd397a673fb348913b3
[ "MIT" ]
5
2022-03-23T21:27:42.000Z
2022-03-24T19:57:27.000Z
nxs_utils/common.py
microsoft/nxs
b271c0637576084b36bd0bd397a673fb348913b3
[ "MIT" ]
null
null
null
nxs_utils/common.py
microsoft/nxs
b271c0637576084b36bd0bd397a673fb348913b3
[ "MIT" ]
1
2022-03-23T21:27:44.000Z
2022-03-23T21:27:44.000Z
from __future__ import division, print_function, absolute_import import os import uuid import shutil import json import requests import time def generate_uuid() -> str: return str(uuid.uuid4()).replace('-','') def create_dir_if_needed(dir_path): if not os.path.exists(dir_path): os.makedirs(dir_path) def delete_and_create_dir(dir_path): if os.path.exists(dir_path): shutil.rmtree(dir_path) os.makedirs(dir_path) def delete_dir(dir_path): if os.path.exists(dir_path): shutil.rmtree(dir_path) def delete_file(file_path): if os.path.exists(file_path): os.remove(file_path)
22.172414
64
0.710731
98
643
4.377551
0.326531
0.16317
0.111888
0.104895
0.440559
0.370629
0.370629
0.370629
0.2331
0.2331
0
0.001905
0.183515
643
28
65
22.964286
0.815238
0
0
0.272727
1
0
0.001555
0
0
0
0
0
0
1
0.227273
false
0
0.318182
0.045455
0.590909
0.045455
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
664ffda7f8ea0ee88e17af8c757b09f1279cc369
8,371
py
Python
tests/components/synology_dsm/test_config_flow.py
dzmitov/core
7697ef7f5ec357ae5ab76237dc52af55fc044c36
[ "Apache-2.0" ]
1
2021-01-14T11:42:12.000Z
2021-01-14T11:42:12.000Z
tests/components/synology_dsm/test_config_flow.py
dzmitov/core
7697ef7f5ec357ae5ab76237dc52af55fc044c36
[ "Apache-2.0" ]
null
null
null
tests/components/synology_dsm/test_config_flow.py
dzmitov/core
7697ef7f5ec357ae5ab76237dc52af55fc044c36
[ "Apache-2.0" ]
null
null
null
"""Tests for the Synology DSM config flow.""" import logging from unittest.mock import MagicMock, Mock, patch import pytest from homeassistant import data_entry_flow from homeassistant.components.synology_dsm.const import ( CONF_VOLUMES, DEFAULT_NAME, DEFAULT_PORT, DEFAULT_PORT_SSL, DEFAULT_SSL, DOMAIN, ) from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_USER from homeassistant.const import ( CONF_DISKS, CONF_HOST, CONF_NAME, CONF_PASSWORD, CONF_PORT, CONF_SSL, CONF_USERNAME, ) from homeassistant.helpers.typing import HomeAssistantType from tests.common import MockConfigEntry _LOGGER = logging.getLogger(__name__) NAME = "My Syno" HOST = "nas.meontheinternet.com" SERIAL = "mySerial" HOST_2 = "nas.worldwide.me" SERIAL_2 = "mySerial2" PORT = 1234 SSL = True USERNAME = "Home_Assistant" PASSWORD = "password" @pytest.fixture(name="service") def mock_controller_service(): """Mock a successful service.""" with patch( "homeassistant.components.synology_dsm.config_flow.SynologyDSM" ) as service_mock: service_mock.return_value.login = Mock(return_value=True) service_mock.return_value.information = Mock(serial=SERIAL) service_mock.return_value.utilisation = Mock(cpu_user_load=1) service_mock.return_value.storage = Mock(disks_ids=[], volumes_ids=[]) yield service_mock @pytest.fixture(name="service_login_failed") def mock_controller_service_login_failed(): """Mock a failed login.""" with patch( "homeassistant.components.synology_dsm.config_flow.SynologyDSM" ) as service_mock: service_mock.return_value.login = Mock(return_value=False) yield service_mock @pytest.fixture(name="service_failed") def mock_controller_service_failed(): """Mock a failed service.""" with patch( "homeassistant.components.synology_dsm.config_flow.SynologyDSM" ) as service_mock: service_mock.return_value.login = Mock(return_value=True) service_mock.return_value.information = Mock(serial=None) service_mock.return_value.utilisation = Mock(cpu_user_load=None) service_mock.return_value.storage = Mock(disks_ids=None, volumes_ids=None) yield service_mock async def test_user(hass: HomeAssistantType, service: MagicMock): """Test user config.""" result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=None ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "user" # test with all provided result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data={ CONF_NAME: NAME, CONF_HOST: HOST, CONF_PORT: PORT, CONF_SSL: SSL, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD, }, ) assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY assert result["result"].unique_id == SERIAL assert result["title"] == HOST assert result["data"][CONF_NAME] == NAME assert result["data"][CONF_HOST] == HOST assert result["data"][CONF_PORT] == PORT assert result["data"][CONF_SSL] == SSL assert result["data"][CONF_USERNAME] == USERNAME assert result["data"][CONF_PASSWORD] == PASSWORD assert result["data"].get(CONF_DISKS) is None assert result["data"].get(CONF_VOLUMES) is None service.return_value.information = Mock(serial=SERIAL_2) # test without port + False SSL result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data={ CONF_NAME: NAME, CONF_HOST: HOST, CONF_SSL: False, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD, }, ) assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY assert result["result"].unique_id == SERIAL_2 assert result["title"] == HOST assert result["data"][CONF_NAME] == NAME assert result["data"][CONF_HOST] == HOST assert result["data"][CONF_PORT] == DEFAULT_PORT assert not result["data"][CONF_SSL] assert result["data"][CONF_USERNAME] == USERNAME assert result["data"][CONF_PASSWORD] == PASSWORD assert result["data"].get(CONF_DISKS) is None assert result["data"].get(CONF_VOLUMES) is None async def test_import(hass: HomeAssistantType, service: MagicMock): """Test import step.""" # import with minimum setup result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_IMPORT}, data={CONF_HOST: HOST, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD}, ) assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY assert result["result"].unique_id == SERIAL assert result["title"] == HOST assert result["data"][CONF_NAME] == DEFAULT_NAME assert result["data"][CONF_HOST] == HOST assert result["data"][CONF_PORT] == DEFAULT_PORT_SSL assert result["data"][CONF_SSL] == DEFAULT_SSL assert result["data"][CONF_USERNAME] == USERNAME assert result["data"][CONF_PASSWORD] == PASSWORD assert result["data"].get(CONF_DISKS) is None assert result["data"].get(CONF_VOLUMES) is None service.return_value.information = Mock(serial=SERIAL_2) # import with all result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_IMPORT}, data={ CONF_NAME: NAME, CONF_HOST: HOST_2, CONF_PORT: PORT, CONF_SSL: SSL, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD, CONF_DISKS: ["sda", "sdb", "sdc"], CONF_VOLUMES: ["volume_1"], }, ) assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY assert result["result"].unique_id == SERIAL_2 assert result["title"] == HOST_2 assert result["data"][CONF_NAME] == NAME assert result["data"][CONF_HOST] == HOST_2 assert result["data"][CONF_PORT] == PORT assert result["data"][CONF_SSL] == SSL assert result["data"][CONF_USERNAME] == USERNAME assert result["data"][CONF_PASSWORD] == PASSWORD assert result["data"][CONF_DISKS] == ["sda", "sdb", "sdc"] assert result["data"][CONF_VOLUMES] == ["volume_1"] async def test_abort_if_already_setup(hass: HomeAssistantType, service: MagicMock): """Test we abort if the account is already setup.""" MockConfigEntry( domain=DOMAIN, data={CONF_HOST: HOST, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD}, unique_id=SERIAL, ).add_to_hass(hass) # Should fail, same HOST:PORT (import) result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_IMPORT}, data={CONF_HOST: HOST, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD}, ) assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT assert result["reason"] == "already_configured" # Should fail, same HOST:PORT (flow) result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data={CONF_HOST: HOST, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD}, ) assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT assert result["reason"] == "already_configured" async def test_login_failed(hass: HomeAssistantType, service_login_failed: MagicMock): """Test when we have errors during connection.""" result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data={CONF_HOST: HOST, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD}, ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["errors"] == {CONF_USERNAME: "login"} async def test_connection_failed(hass: HomeAssistantType, service_failed: MagicMock): """Test when we have errors during connection.""" result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data={CONF_HOST: HOST, CONF_USERNAME: USERNAME, CONF_PASSWORD: PASSWORD}, ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["errors"] == {"base": "unknown"}
35.621277
86
0.680444
1,024
8,371
5.3125
0.12207
0.116912
0.091176
0.091912
0.757537
0.702941
0.701471
0.683088
0.668015
0.650368
0
0.002547
0.202724
8,371
234
87
35.773504
0.812556
0.03321
0
0.5625
0
0
0.087918
0.026172
0
0
0
0
0.28125
1
0.015625
false
0.078125
0.067708
0
0.083333
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
b07631da6e5a31f1ace8542a33e31062f75d697a
41
py
Python
cogs/gitcog.py
theneeldevs/modbot
b2981f4682816706a951eada60679b4b7058b08f
[ "MIT" ]
1
2021-09-02T20:55:19.000Z
2021-09-02T20:55:19.000Z
cogs/gitcog.py
SAXSN/modbot
f3bbb0b9e2551306c45e3c09eb83ccd2fcef7cca
[ "MIT" ]
null
null
null
cogs/gitcog.py
SAXSN/modbot
f3bbb0b9e2551306c45e3c09eb83ccd2fcef7cca
[ "MIT" ]
2
2020-01-04T00:19:23.000Z
2021-11-25T18:05:16.000Z
4jr where are you? need this, can I use?
20.5
40
0.707317
9
41
3.222222
1
0
0
0
0
0
0
0
0
0
0
0.03125
0.219512
41
1
41
41
0.875
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
b078b146934e2337c864a2b89d78f424fef45869
78
py
Python
locale/pot/api/plotting/_autosummary/pyvista-themes-_SliderStyleConfig-slider_length-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/plotting/_autosummary/pyvista-themes-_SliderStyleConfig-slider_length-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/plotting/_autosummary/pyvista-themes-_SliderStyleConfig-slider_length-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
import pyvista pyvista.global_theme.slider_styles.modern.slider_length = 0.02
26
62
0.858974
12
78
5.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0.041096
0.064103
78
2
63
39
0.835616
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
b07de906b4fae890b3eaccce394ff2c8056189e4
315
py
Python
src/Tools/Error/alternate_page.py
MarquesThiago/Manga_Downloader
eaa06a00aeef525f8fad20634a5c4829e579a66d
[ "MIT" ]
null
null
null
src/Tools/Error/alternate_page.py
MarquesThiago/Manga_Downloader
eaa06a00aeef525f8fad20634a5c4829e579a66d
[ "MIT" ]
null
null
null
src/Tools/Error/alternate_page.py
MarquesThiago/Manga_Downloader
eaa06a00aeef525f8fad20634a5c4829e579a66d
[ "MIT" ]
null
null
null
import os, sys sys.path.insert(0, './../Error/') from .Pattern.Controllers.alternate_page import (KeyError, NotFoundButtonAlternPg ) def ErrorIncorrectParseKey(): raise KeyError("Not indentificaed key persed") def ErrorButtonAlternate(): raise NotFoundButtonAlternPg("Not Found Button to Alternage Page")
35
83
0.774603
34
315
7.147059
0.764706
0
0
0
0
0
0
0
0
0
0
0.003597
0.11746
315
9
84
35
0.870504
0
0
0
0
0
0.231013
0
0
0
0
0
0
1
0.285714
true
0
0.285714
0
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
1
0
0
4
b085bdf6ec64074f58ab62f39667e43f3a3d7405
192
py
Python
problem/10000~19999/15803/15803.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/10000~19999/15803/15803.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/10000~19999/15803/15803.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
a,b=map(int,input().split()) c,d=map(int,input().split()) e,f=map(int,input().split()) if (a-c)*(d-f)==(b-d)*(c-e): print('WHERE IS MY CHICKEN?') else: print('WINNER WINNER CHICKEN DINNER!')
27.428571
39
0.619792
38
192
3.131579
0.5
0.151261
0.277311
0.403361
0
0
0
0
0
0
0
0
0.078125
192
7
39
27.428571
0.672316
0
0
0
0
0
0.253886
0
0
0
0
0
0
1
0
true
0
0
0
0
0.285714
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
1
0
0
0
0
0
0
4
b0c350cac839e709c6d4f44e5439f5f244e12d14
72
py
Python
src/wsgi.py
kumardeepak/user-mgmt
43f37fd1bf0a21ae3d17126b21e0b906145ecaf6
[ "MIT" ]
null
null
null
src/wsgi.py
kumardeepak/user-mgmt
43f37fd1bf0a21ae3d17126b21e0b906145ecaf6
[ "MIT" ]
null
null
null
src/wsgi.py
kumardeepak/user-mgmt
43f37fd1bf0a21ae3d17126b21e0b906145ecaf6
[ "MIT" ]
null
null
null
from app import server as user if __name__ == "__main__": user.run()
24
30
0.694444
11
72
3.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.194444
72
3
31
24
0.724138
0
0
0
0
0
0.109589
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
b0e62aad51ec2fdf0dfde9f5e9192bc392f1f50a
1,416
py
Python
fdk_client/platform/models/OpenApiOrderItem.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/OpenApiOrderItem.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
fdk_client/platform/models/OpenApiOrderItem.py
kavish-d/fdk-client-python
a1023eb530473322cb52e095fc4ceb226c1e6037
[ "MIT" ]
null
null
null
"""Platform Models.""" from marshmallow import fields, Schema from marshmallow.validate import OneOf from ..enums import * from ..models.BaseSchema import BaseSchema from .CartItemMeta import CartItemMeta from .OpenApiFiles import OpenApiFiles from .MultiTenderPaymentMethod import MultiTenderPaymentMethod class OpenApiOrderItem(BaseSchema): # Cart swagger.json employee_discount = fields.Float(required=False) coupon_effective_discount = fields.Float(required=False) cod_charges = fields.Float(required=False) price_effective = fields.Float(required=False) meta = fields.Nested(CartItemMeta, required=False) discount = fields.Float(required=False) loyalty_discount = fields.Float(required=False) quantity = fields.Int(required=False) price_marked = fields.Float(required=False) delivery_charges = fields.Float(required=False) files = fields.List(fields.Nested(OpenApiFiles, required=False), required=False) payment_methods = fields.List(fields.Nested(MultiTenderPaymentMethod, required=False), required=False) extra_meta = fields.Dict(required=False) cashback_applied = fields.Float(required=False) amount_paid = fields.Float(required=False) size = fields.Str(required=False) product_id = fields.Int(required=False)
17.268293
106
0.709746
147
1,416
6.748299
0.340136
0.248992
0.191532
0.241935
0.191532
0
0
0
0
0
0
0
0.204802
1,416
81
107
17.481481
0.880995
0.024718
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.28
0
1
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
b0f7190a03d0bd3300b3ddfdcea3e4e23563dd0c
41
py
Python
lang/Python/loops-downward-for-1.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/loops-downward-for-1.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/loops-downward-for-1.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
for i in range(10, -1, -1): print(i)
13.666667
27
0.512195
9
41
2.333333
0.777778
0
0
0
0
0
0
0
0
0
0
0.133333
0.268293
41
2
28
20.5
0.566667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
9fd78302631e3ad768c595c18b47b760b2525249
234
py
Python
src/about/views.py
parezj/PartsView
a59a3804b574b11efd8f0472deae4dae1c16eb67
[ "WTFPL" ]
3
2020-05-10T08:40:36.000Z
2020-10-28T18:09:31.000Z
src/about/views.py
parezj/PartsView
a59a3804b574b11efd8f0472deae4dae1c16eb67
[ "WTFPL" ]
1
2019-12-17T23:41:17.000Z
2019-12-17T23:42:43.000Z
src/about/views.py
parezj/PartsView
a59a3804b574b11efd8f0472deae4dae1c16eb67
[ "WTFPL" ]
1
2021-06-11T10:49:10.000Z
2021-06-11T10:49:10.000Z
from django.shortcuts import render class NameValue: def __init__(self, name, value): self.name = name self.value = value def about(request): return render(request, 'about/about.html')
21.272727
47
0.611111
27
234
5.148148
0.592593
0.115108
0
0
0
0
0
0
0
0
0
0
0.299145
234
10
48
23.4
0.847561
0
0
0
0
0
0.071429
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
b023ad107f173597195cff51d89a1c45705aced4
127
py
Python
userManagment/apps.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
userManagment/apps.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
userManagment/apps.py
uzairAK/serverom-panel
3dcde05ad618e6bef280db7d3180f926fe2ab1db
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.apps import AppConfig class UsermanagmentConfig(AppConfig): name = 'userManagment'
14.111111
37
0.700787
13
127
6.846154
0.923077
0
0
0
0
0
0
0
0
0
0
0.009524
0.173228
127
8
38
15.875
0.838095
0.165354
0
0
0
0
0.125
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
b035189eb2367ed80433d8a931f69c3980b171e5
208
py
Python
apps/research/managers.py
sebfest/homepage
6398ade235f93c10937b5f606e04558a614c2572
[ "MIT" ]
null
null
null
apps/research/managers.py
sebfest/homepage
6398ade235f93c10937b5f606e04558a614c2572
[ "MIT" ]
11
2020-02-12T00:12:44.000Z
2021-08-13T10:00:32.000Z
apps/research/managers.py
sebfest/homepage
6398ade235f93c10937b5f606e04558a614c2572
[ "MIT" ]
null
null
null
from django.db import models from django.db.models import Q class PaperQuerySet(models.QuerySet): def published(self): """Get all published items.""" return self.filter(Q(publish=True))
23.111111
43
0.697115
28
208
5.178571
0.678571
0.137931
0.165517
0
0
0
0
0
0
0
0
0
0.192308
208
8
44
26
0.863095
0.115385
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
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
b06ff2f22ce9a5462504adc885a9ad33ad32274d
1,786
py
Python
src/configs/config.py
kumardeepak/file-server
b94d87cadcc93c142a7d4f9bb368d75f7eda5671
[ "MIT" ]
null
null
null
src/configs/config.py
kumardeepak/file-server
b94d87cadcc93c142a7d4f9bb368d75f7eda5671
[ "MIT" ]
null
null
null
src/configs/config.py
kumardeepak/file-server
b94d87cadcc93c142a7d4f9bb368d75f7eda5671
[ "MIT" ]
null
null
null
import logging import os import configs from configs import development as dev_config logging.basicConfig( filename=os.getenv("SERVICE_LOG", "server.log"), level=logging.DEBUG, format="%(levelname)s: %(asctime)s \ pid:%(process)s module:%(module)s %(message)s", datefmt="%d/%m/%y %H:%M:%S", ) class AppConfig: @staticmethod def get_debug(): return os.getenv("DEBUG", dev_config.DEBUG) @staticmethod def get_api_url_prefix(): return "/api" @staticmethod def get_host(): return os.getenv("APP_HOST", dev_config.APP_HOST) @staticmethod def get_port(): return os.getenv("APP_PORT", dev_config.APP_PORT) @staticmethod def get_file_storage_path(): return os.getenv("FILE_STORAGE_PATH", dev_config.FILE_STORAGE_PATH) @staticmethod def get_enable_cors(): return os.getenv("ENABLE_CORS", dev_config.ENABLE_CORS) @staticmethod def get_jwt_secret_key(): return os.getenv("JWT_SECRET_KEY", dev_config.JWT_SECRET_KEY) @staticmethod def get_jwt_access_token_expiry_in_mins(): return os.getenv("JWT_ACCESS_TOKEN_EXPIRY_IN_MINS", dev_config.JWT_ACCESS_TOKEN_EXPIRY_IN_MINS) @staticmethod def get_jwt_refresh_token_expiry_in_days(): return os.getenv("JWT_REFRESH_TOKEN_EXPIRY_IN_DAYS", dev_config.JWT_REFRESH_TOKEN_EXPIRY_IN_DAYS) @staticmethod def get_redis_hostname(): return os.getenv("REDIS_HOSTNAME", dev_config.REDIS_HOSTNAME) @staticmethod def get_redis_port(): return os.getenv("REDIS_PORT", dev_config.REDIS_PORT) @staticmethod def get_supported_upload_file_types(): return os.getenv("SUPPORTED_UPLOAD_FILETYPES", dev_config.SUPPORTED_UPLOAD_FILETYPES)
28.806452
105
0.707727
238
1,786
4.936975
0.264706
0.091915
0.18383
0.053617
0.135319
0.135319
0
0
0
0
0
0
0.18981
1,786
61
106
29.278689
0.812025
0
0
0.25
0
0
0.12206
0.049832
0
0
0
0
0
1
0.25
true
0
0.083333
0.25
0.604167
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
0
0
0
4
c65bf4606b7257334c2f503b10a544b07737f644
295
py
Python
tests/unit_tests/test_version.py
realead/cyvml
c5fa3807cfde85ebdc4ee9a323daabc3600387cb
[ "MIT" ]
null
null
null
tests/unit_tests/test_version.py
realead/cyvml
c5fa3807cfde85ebdc4ee9a323daabc3600387cb
[ "MIT" ]
null
null
null
tests/unit_tests/test_version.py
realead/cyvml
c5fa3807cfde85ebdc4ee9a323daabc3600387cb
[ "MIT" ]
null
null
null
import unittest import cyvml class VersionTester(unittest.TestCase): def test_major(self): self.assertEqual(cyvml.__version__[0], 0) def test_minor(self): self.assertEqual(cyvml.__version__[1], 1) def test_last(self): self.assertEqual(cyvml.__version__[2], 0)
17.352941
47
0.705085
38
295
5.078947
0.447368
0.108808
0.295337
0.373057
0.481865
0
0
0
0
0
0
0.024793
0.179661
295
16
48
18.4375
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.333333
false
0
0.222222
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
c65ea3eb8fb158e78314849811c7ef6d43ca0c3f
73
py
Python
hdlConvertor/__init__.py
the-moog/hdlConvertor
5c8f5c6bf2bdceddf0c8cf6b5213d1b56b358f00
[ "MIT" ]
184
2016-08-12T14:26:52.000Z
2022-03-24T21:42:17.000Z
hdlConvertor/__init__.py
hdl4fpga/hdlConvertor
291991042135bf688ee2864cf7fb37d8e8a057db
[ "MIT" ]
142
2016-08-10T03:12:03.000Z
2022-03-30T17:35:06.000Z
hdlConvertor/__init__.py
hdl4fpga/hdlConvertor
291991042135bf688ee2864cf7fb37d8e8a057db
[ "MIT" ]
50
2016-08-06T10:38:29.000Z
2022-03-30T11:03:42.000Z
from ._hdlConvertor import HdlConvertorPy as HdlConvertor, ParseException
73
73
0.890411
7
73
9.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.082192
73
1
73
73
0.955224
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
c65f9daa80b8383b6e91e1b01f03c0d6ccce95a1
62
py
Python
optimus/engines/cudf/cudf.py
Pcosmin/Optimus
ef3306d1b752bbfb1959ddb9103786acb8e9b9ba
[ "Apache-2.0" ]
1,045
2017-07-17T17:59:46.000Z
2021-06-15T07:06:48.000Z
optimus/engines/cudf/cudf.py
rafaelang/Optimus
809088f41588c968b2e30210f98a494a497b07ff
[ "Apache-2.0" ]
955
2017-07-14T15:47:58.000Z
2021-05-27T14:16:24.000Z
optimus/engines/cudf/cudf.py
rafaelang/Optimus
809088f41588c968b2e30210f98a494a497b07ff
[ "Apache-2.0" ]
226
2017-08-04T20:41:33.000Z
2021-05-21T08:28:33.000Z
class CUDF: def __init__(self): self._cudf = None
15.5
25
0.596774
8
62
4
0.75
0
0
0
0
0
0
0
0
0
0
0
0.306452
62
3
26
20.666667
0.744186
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
c672a8a40d6b0a535e2af4aa740b93d1ace7cd30
513
py
Python
adict/__init__.py
arseniiv/adict
4dfa096161f9038b2d219389b4cea6bdd469ed76
[ "CC0-1.0" ]
null
null
null
adict/__init__.py
arseniiv/adict
4dfa096161f9038b2d219389b4cea6bdd469ed76
[ "CC0-1.0" ]
null
null
null
adict/__init__.py
arseniiv/adict
4dfa096161f9038b2d219389b4cea6bdd469ed76
[ "CC0-1.0" ]
null
null
null
# aDict — simple dictionary handling # # Authors: # arseniiv <arseniiv@gmail.com> # # To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. # You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. """adict package """ from adict._data import *
36.642857
213
0.764133
75
513
5.226667
0.786667
0.091837
0
0
0
0
0
0
0
0
0
0.006944
0.157895
513
13
214
39.461538
0.898148
0.902534
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
c68324feea2e66b897ea328c8954e153f0e905a9
66
py
Python
cue_queue/bin/__init__.py
JacksonMaxfield/queue-cue
b10d94759c9a8dd6cafd714297f66cc52a4cd571
[ "MIT" ]
3
2021-09-22T03:07:17.000Z
2022-02-19T03:21:58.000Z
cue_queue/bin/__init__.py
JacksonMaxfield/queue-cue
b10d94759c9a8dd6cafd714297f66cc52a4cd571
[ "MIT" ]
13
2021-09-24T05:40:18.000Z
2021-12-05T20:09:28.000Z
cue_queue/bin/__init__.py
JacksonMaxfield/queue-cue
b10d94759c9a8dd6cafd714297f66cc52a4cd571
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Bin scripts package for cue-queue."""
16.5
40
0.575758
9
66
4.222222
1
0
0
0
0
0
0
0
0
0
0
0.018182
0.166667
66
3
41
22
0.672727
0.863636
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
c69440ac5130d525f55a5673a55ed906896a08c1
77
py
Python
catcher_modules/service/__init__.py
anandsunderraman/catcher_modules
68fe25b54583f71adac44d664513c7d8428b199e
[ "Apache-2.0" ]
79
2021-02-04T11:20:43.000Z
2022-01-27T12:04:48.000Z
catcher_modules/service/__init__.py
anandsunderraman/catcher_modules
68fe25b54583f71adac44d664513c7d8428b199e
[ "Apache-2.0" ]
101
2021-02-12T18:26:16.000Z
2022-01-27T14:01:53.000Z
catcher_modules/service/__init__.py
anandsunderraman/catcher_modules
68fe25b54583f71adac44d664513c7d8428b199e
[ "Apache-2.0" ]
21
2021-02-02T12:59:08.000Z
2022-01-25T15:03:43.000Z
import logging logging.getLogger("elasticsearch").setLevel(logging.WARNING)
19.25
60
0.831169
8
77
8
0.75
0
0
0
0
0
0
0
0
0
0
0
0.051948
77
3
61
25.666667
0.876712
0
0
0
0
0
0.168831
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c69a713f7897f760d3fdb9f8e2af8700ee871603
103
py
Python
seabird/checks.py
nicholas512/seabird
23073b2b9a550b86ec155cbe43be9b50e50b8310
[ "BSD-3-Clause" ]
38
2015-04-15T08:57:44.000Z
2022-03-13T02:51:53.000Z
seabird/checks.py
nicholas512/seabird
23073b2b9a550b86ec155cbe43be9b50e50b8310
[ "BSD-3-Clause" ]
54
2015-01-28T03:53:43.000Z
2021-12-11T07:37:24.000Z
seabird/checks.py
nicholas512/seabird
23073b2b9a550b86ec155cbe43be9b50e50b8310
[ "BSD-3-Clause" ]
22
2015-09-22T12:24:22.000Z
2022-01-31T22:27:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Do a sequence of checks on the parsed CNV data """
14.714286
50
0.601942
17
103
3.647059
1
0
0
0
0
0
0
0
0
0
0
0.012195
0.203884
103
6
51
17.166667
0.743902
0.864078
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
c6b63fd98ea11cad1334e06e98adb0d3e9060366
288
py
Python
flowtorch/distributions/__init__.py
sankethvedula/flowtorch
44a0f0eff842dd33ca17b01f4e02d8cdda005aa8
[ "MIT" ]
207
2021-11-29T08:32:56.000Z
2022-03-24T15:13:16.000Z
flowtorch/distributions/__init__.py
sankethvedula/flowtorch
44a0f0eff842dd33ca17b01f4e02d8cdda005aa8
[ "MIT" ]
30
2020-12-29T04:42:38.000Z
2021-02-19T22:29:38.000Z
flowtorch/distributions/__init__.py
sankethvedula/flowtorch
44a0f0eff842dd33ca17b01f4e02d8cdda005aa8
[ "MIT" ]
13
2021-11-29T03:29:10.000Z
2022-03-31T19:52:37.000Z
# Copyright (c) Meta Platforms, Inc """ Warning: This file was generated by flowtorch/scripts/generate_imports.py Do not modify or delete! """ from flowtorch.distributions.flow import Flow from flowtorch.distributions.neals_funnel import NealsFunnel __all__ = ["Flow", "NealsFunnel"]
22.153846
73
0.78125
37
288
5.918919
0.783784
0.118721
0.237443
0
0
0
0
0
0
0
0
0
0.125
288
12
74
24
0.869048
0.461806
0
0
1
0
0.10274
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
c6de7567171844d96bc49fab3d11d32aa6a715fa
195
py
Python
w01/e13.py
Luccifer/PythonCoruseraHSE
653d6a24325789342f0d033717ba548dc6e90483
[ "Unlicense" ]
1
2020-01-12T12:55:07.000Z
2020-01-12T12:55:07.000Z
w01/e13.py
Luccifer/PythonCourseraHSE
653d6a24325789342f0d033717ba548dc6e90483
[ "Unlicense" ]
null
null
null
w01/e13.py
Luccifer/PythonCourseraHSE
653d6a24325789342f0d033717ba548dc6e90483
[ "Unlicense" ]
null
null
null
# Следующее и предыдущее num = int(input()) print("The next number for the number ", num, " is ", num + 1, ".\n" "The previous number for the number ", num, " is ", num - 1, ".", sep='')
27.857143
79
0.574359
29
195
3.862069
0.551724
0.160714
0.214286
0.321429
0.482143
0.482143
0.482143
0.482143
0
0
0
0.013423
0.235897
195
6
80
32.5
0.738255
0.112821
0
0
0
0
0.45614
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
c6ed375da70a848eb70e48e3835d4867b5380019
657
py
Python
src/animal_avatar/shapes/patterns.py
sprotg/animal-avatar-generator
c458686c7814f6681372007cae647298096c1166
[ "MIT" ]
1
2022-03-04T23:48:05.000Z
2022-03-04T23:48:05.000Z
src/animal_avatar/shapes/patterns.py
Nacht1gall/animal-avatar-generator
488bca540d0f939634aee2fee935b4acf637ae1a
[ "MIT" ]
null
null
null
src/animal_avatar/shapes/patterns.py
Nacht1gall/animal-avatar-generator
488bca540d0f939634aee2fee935b4acf637ae1a
[ "MIT" ]
2
2022-01-18T09:00:58.000Z
2022-01-18T09:01:22.000Z
from animal_avatar.utils.colors import darken PATTERNS = ( lambda color: f'<path fill="{darken(color, -30)}" ' 'd="M156 387.1c-57.8-12.3-96.7-42-96.7-107 0-9.4.8-18.6 2.4-27.6 ' '19.1 3.4 39.3 17 53.6 38.1a105 105 0 015 8.2 73.6 73.6 0 0021 ' '23.8c4.9 3.6 9.5 8.3 13.3 14 12.3 18.2 12.6 40 1.3 50.5z"/>', lambda color: f'<ellipse cx="323.8" cy="217.4" fill="{darken(color, -30)}" ' 'rx="52.3" ry="77.6" transform="rotate(-32.5 323.8 217.4)"/>', lambda color: f'<path fill="{darken(color, 30)}" ' 'd="M235 161.3c14.4 27.5 0 71-41.1 115.2-31.8 34.1-86.6 16.8-101-10.8s7.5-67.4 48.9-89 78.9-43 93.3-15.4z"/>', )
36.5
114
0.575342
158
657
2.386076
0.537975
0.087533
0.095491
0.135279
0.180371
0.180371
0.180371
0.180371
0.180371
0
0
0.374532
0.187215
657
17
115
38.647059
0.331461
0
0
0.214286
0
0.428571
0.726027
0.118721
0
0
0
0
0
1
0
false
0
0.071429
0
0.071429
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c6f25493c2ca3e89ee38b5ee0dd09ce64e40fb6e
178
py
Python
common/smoketest/key_vault_base_async.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-12-10T03:17:51.000Z
2020-12-10T03:17:51.000Z
common/smoketest/key_vault_base_async.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
common/smoketest/key_vault_base_async.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-07-31T16:33:36.000Z
2020-07-31T16:33:36.000Z
from key_vault_base import KeyVaultBase from azure.identity.aio import DefaultAzureCredential class KeyVaultBaseAsync(KeyVaultBase): credential_type = DefaultAzureCredential
35.6
53
0.870787
18
178
8.444444
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.095506
178
5
54
35.6
0.944099
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
05ea34031c7a10caa75cdd789877155c856bc690
124
py
Python
start.py
yiyedata/simplified-scrapy
ccfdc686c53b2da3dac733892d4f184f6293f002
[ "Apache-2.0" ]
7
2019-08-11T10:31:03.000Z
2021-03-08T10:07:52.000Z
start.py
yiyedata/simplified-scrapy
ccfdc686c53b2da3dac733892d4f184f6293f002
[ "Apache-2.0" ]
1
2020-12-29T02:30:18.000Z
2021-01-25T02:49:37.000Z
start.py
yiyedata/simplified-scrapy
ccfdc686c53b2da3dac733892d4f184f6293f002
[ "Apache-2.0" ]
4
2019-10-22T02:14:35.000Z
2021-05-13T07:01:56.000Z
#!/usr/bin/python #coding=utf-8 from simplified_scrapy.simplified_main import SimplifiedMain SimplifiedMain.startThread()
17.714286
60
0.830645
15
124
6.733333
0.866667
0
0
0
0
0
0
0
0
0
0
0.008696
0.072581
124
6
61
20.666667
0.869565
0.225806
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
05f834fd349ec5e6bf9231aa035288bfb037d8b0
1,461
py
Python
tools/spaceSwitcher/python/spaceswitcher/__init__.py
koborit/SpaceSwitcherSample
3951548b25736957f1cceb3b6edd4a7b1fc09593
[ "MIT" ]
null
null
null
tools/spaceSwitcher/python/spaceswitcher/__init__.py
koborit/SpaceSwitcherSample
3951548b25736957f1cceb3b6edd4a7b1fc09593
[ "MIT" ]
null
null
null
tools/spaceSwitcher/python/spaceswitcher/__init__.py
koborit/SpaceSwitcherSample
3951548b25736957f1cceb3b6edd4a7b1fc09593
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2017 Tsuyoshi Kobori 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. Documentation Portal module for main class and functions, designed to be the interface, i.e. the only module that the users of this tool need to import. Their actual implementation is split into sub modules below: spaceswitcher.core spaceswitcher.ui spaceswitcher.utils """ from .ui import launch_ui from .core import SpaceSwitcher, switch_space, delete_switch_space_constraints
37.461538
78
0.806297
227
1,461
5.167401
0.568282
0.075021
0.022165
0
0
0
0
0
0
0
0
0.003247
0.156742
1,461
38
79
38.447368
0.948864
0.919918
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
af02439f0f90a8e16035a4c030133c9de4925750
139
py
Python
app/test_app.py
Sadch/ws-github-concepts
0050a641615772ff05d69f01e631cfdc53c20d74
[ "MIT" ]
null
null
null
app/test_app.py
Sadch/ws-github-concepts
0050a641615772ff05d69f01e631cfdc53c20d74
[ "MIT" ]
null
null
null
app/test_app.py
Sadch/ws-github-concepts
0050a641615772ff05d69f01e631cfdc53c20d74
[ "MIT" ]
null
null
null
import pytest from run import app @pytest.fixture def client(): app.config["TESTING"] = True with app.test_client() as client
15.444444
36
0.690647
20
139
4.75
0.7
0
0
0
0
0
0
0
0
0
0
0
0.208633
139
8
37
17.375
0.863636
0
0
0
0
0
0.05036
0
0
0
0
0
0
0
null
null
0
0.333333
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
af5ffd18d1f919590a970231437b169a2d2915d7
97
py
Python
s3splitmerge/tests/__init__.py
MacHu-GWU/s3splitmerge-project
873892158f4a2d0ee20f291e5d3b2a80f0bae1ba
[ "MIT" ]
null
null
null
s3splitmerge/tests/__init__.py
MacHu-GWU/s3splitmerge-project
873892158f4a2d0ee20f291e5d3b2a80f0bae1ba
[ "MIT" ]
null
null
null
s3splitmerge/tests/__init__.py
MacHu-GWU/s3splitmerge-project
873892158f4a2d0ee20f291e5d3b2a80f0bae1ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ """ from .aws import ( boto_ses, s3_client, bucket, prefix, )
9.7
40
0.536082
12
97
4.166667
1
0
0
0
0
0
0
0
0
0
0
0.027027
0.237113
97
9
41
10.777778
0.648649
0.216495
0
0
0
0
0
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
af7c784b23d44674b031de33463d7bd5e31dedba
512
py
Python
app/user/views.py
default-sameer/count
69dc9cb6744e6582f042a938359e09f025bf7bd3
[ "MIT" ]
null
null
null
app/user/views.py
default-sameer/count
69dc9cb6744e6582f042a938359e09f025bf7bd3
[ "MIT" ]
null
null
null
app/user/views.py
default-sameer/count
69dc9cb6744e6582f042a938359e09f025bf7bd3
[ "MIT" ]
null
null
null
from app.user import user from flask import render_template from flask_login import login_required, current_user from .utlis import save_picture @user.route('/dashboard') @login_required def dashboard(): return render_template('users/dashboard.html', title='Dashboard') @user.route('/settings') @login_required def setting(): return render_template('users/setting.html', title='Setting') @user.route('/dash') @login_required def dash(): return render_template('users/dash.html', title='Setting')
24.380952
69
0.765625
68
512
5.602941
0.338235
0.146982
0.125984
0.19685
0
0
0
0
0
0
0
0
0.105469
512
20
70
25.6
0.831878
0
0
0.1875
0
0
0.195695
0
0
0
0
0
0
1
0.1875
true
0
0.25
0.1875
0.625
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
1
1
0
0
4
bb6330baab86dc9763aebcab474c417cc97b241e
2,984
py
Python
test_src/Pages/RegPage.py
BJanos87/Vizsgaremek-conduit-app
1ffb309389b0cbe68aca56bfde50ba8b17219d03
[ "MIT" ]
null
null
null
test_src/Pages/RegPage.py
BJanos87/Vizsgaremek-conduit-app
1ffb309389b0cbe68aca56bfde50ba8b17219d03
[ "MIT" ]
null
null
null
test_src/Pages/RegPage.py
BJanos87/Vizsgaremek-conduit-app
1ffb309389b0cbe68aca56bfde50ba8b17219d03
[ "MIT" ]
null
null
null
from test_src.Pages.base_commands import BaseCommands from test_src.Data.test_data import RegPgWebElements from test_src.Data.test_data import TestData class RegPage(BaseCommands): """constructor of the page class""" def __init__(self, driver): super().__init__(driver) """Page Actions for Registration Page""" """this used to check inputs displayed""" def is_inputs_displayed(self): return self.is_elements_displayed(RegPgWebElements.input_fields) """this used to check inputs attribute""" def is_inputs_placeholder(self): return self.check_elements_attribute(RegPgWebElements.input_fields, "placeholder", TestData.inputs_placeholder_value_reg) """this used to check Password type""" def is_password_type(self): return self.check_element_attribute(RegPgWebElements.input_password, "type", TestData.password_type_value) """this used to check Sign Up button is displayed""" def is_sign_up_btn_displayed(self): return self.is_element_displayed(RegPgWebElements.sign_up_btn) """this used to click on Sign Up button""" def click_sign_up_btn(self): self.do_click(RegPgWebElements.sign_up_btn) """this used to check Registration Failed msg is displayed""" def is_reg_failed_msg_displayed(self): return self.is_element_displayed(RegPgWebElements.reg_failed_msg) """this used to check Registration Failed msg text""" def reg_failed_msg_text(self): return self.get_element_text(RegPgWebElements.reg_failed_msg) """this used to check Registration Failed accept button is displayed""" def is_reg_failed_accept_btn_displayed(self): return self.is_element_displayed(RegPgWebElements.reg_failed_accept_btn) """this used to click on Registration Failed accept button""" def click_reg_failed_accept_btn(self): self.do_click(RegPgWebElements.reg_failed_accept_btn) """this used to check home button is displayed""" def is_home_btn_displayed(self): return self.is_element_displayed(RegPgWebElements.home_btn) """this used to click on the home button""" def click_home_btn(self): self.do_click(RegPgWebElements.home_btn) """this used to fill Reg page with valid data""" def fill_reg_valid(self): self.do_send_key_elements(RegPgWebElements.input_fields, TestData.reg_test_valid) """this used to fill Reg page with invalid email""" def fill_reg_invalid_email(self): self.do_send_key_elements(RegPgWebElements.input_fields, TestData.reg_test_invalid_email) """this used to fill Reg page with invalid password""" def fill_reg_invalid_password(self): self.do_send_key_elements(RegPgWebElements.input_fields, TestData.reg_test_invalid_password) """this used to fill Reg page with invalid username""" def fill_reg_invalid_username(self): self.do_send_key_elements(RegPgWebElements.input_fields, TestData.reg_test_invalid_username)
40.876712
129
0.754021
409
2,984
5.185819
0.156479
0.056577
0.070721
0.056577
0.590759
0.533239
0.455446
0.377181
0.302216
0.244224
0
0
0.164544
2,984
72
130
41.444444
0.850782
0.009719
0
0
0
0
0.006977
0
0
0
0
0
0
1
0.444444
false
0.111111
0.083333
0.222222
0.777778
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
bb901354b343efaae26e0fee8ea7c9bb5631749c
217
py
Python
z42/z42/lib/b64uuid.py
jumploop/collection_python
f66f18dc5ae50fce95679e0f4aee5e28b2543432
[ "MIT" ]
null
null
null
z42/z42/lib/b64uuid.py
jumploop/collection_python
f66f18dc5ae50fce95679e0f4aee5e28b2543432
[ "MIT" ]
null
null
null
z42/z42/lib/b64uuid.py
jumploop/collection_python
f66f18dc5ae50fce95679e0f4aee5e28b2543432
[ "MIT" ]
null
null
null
#!/usr/bin/env python #coding:utf-8 from uuid import uuid4 from base64 import urlsafe_b64encode def b64uuid(): return urlsafe_b64encode(uuid4().bytes).rstrip('=') if __name__ == '__main__': print b64uuid()
18.083333
55
0.718894
29
217
5.034483
0.793103
0.219178
0
0
0
0
0
0
0
0
0
0.07027
0.147465
217
11
56
19.727273
0.718919
0.147465
0
0
0
0
0.049451
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.166667
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
1
0
0
0
1
0
0
0
0
4
bbac70f68f43b7d53c06b54581a8583130be5b3d
200
py
Python
quick_sort.py
Snowerest/leetcodeQuestion-Python
f553014447dabd84a443706844ee6cd7b5c0b691
[ "MIT" ]
1
2020-07-17T10:49:28.000Z
2020-07-17T10:49:28.000Z
quick_sort.py
Snowerest/leetcodeQuestion-Python
f553014447dabd84a443706844ee6cd7b5c0b691
[ "MIT" ]
null
null
null
quick_sort.py
Snowerest/leetcodeQuestion-Python
f553014447dabd84a443706844ee6cd7b5c0b691
[ "MIT" ]
null
null
null
def quick_sort(nums: list) -> list: if len(nums) <= 1: return nums mid = nums[0] return quick_sort([i for i in nums if i < mid]) + [mid] + quick_sort([i for i in nums if i > mid])
33.333333
102
0.58
37
200
3.054054
0.378378
0.238938
0.176991
0.230089
0.460177
0.460177
0.460177
0.460177
0.460177
0.460177
0
0.013889
0.28
200
5
103
40
0.770833
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0
0
0.6
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
bbbe7cadb162d1efa51eebf4cd7ba5cd9d7979c0
101
py
Python
api_data_template.py
molibdenium/ftx_autolend
3f30c9ad3d2749517b52ad6780424b28115409d3
[ "MIT" ]
2
2021-03-28T16:35:54.000Z
2021-07-09T14:51:34.000Z
api_data_template.py
PAV-Laboratory/ftx_autolend
3f30c9ad3d2749517b52ad6780424b28115409d3
[ "MIT" ]
null
null
null
api_data_template.py
PAV-Laboratory/ftx_autolend
3f30c9ad3d2749517b52ad6780424b28115409d3
[ "MIT" ]
2
2021-07-31T21:09:54.000Z
2021-12-21T22:30:05.000Z
# -*- coding: utf-8 -*- ftx = { 'apiKey':"your_api_key_here" , 'secret':"your_api_secret_here", }
16.833333
33
0.613861
14
101
4
0.714286
0.25
0
0
0
0
0
0
0
0
0
0.011628
0.148515
101
5
34
20.2
0.639535
0.207921
0
0
0
0
0.628205
0
0
0
0
0
0
1
0
false
0
0
0
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
bbd0ea6245ab4491170f9d4eab8495647dff003b
119
py
Python
qiwi_api/exceptions.py
Helow19274/qiwi_api
bdd193d66cdd81704b9ec08f044690b7c366f455
[ "MIT" ]
9
2018-08-02T08:03:49.000Z
2021-03-15T20:42:46.000Z
qiwi_api/exceptions.py
Helow19274/qiwi_api
bdd193d66cdd81704b9ec08f044690b7c366f455
[ "MIT" ]
null
null
null
qiwi_api/exceptions.py
Helow19274/qiwi_api
bdd193d66cdd81704b9ec08f044690b7c366f455
[ "MIT" ]
null
null
null
class ApiError(Exception): pass class WrongToken(ApiError): pass class PermissionError(ApiError): pass
10.818182
32
0.714286
12
119
7.083333
0.5
0.211765
0
0
0
0
0
0
0
0
0
0
0.210084
119
10
33
11.9
0.904255
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
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
1
0
0
0
0
0
4
bbe3e4a23a12be402083c135f40088381b55e89d
98
py
Python
src/etools_permissions/apps.py
unicef/etools-permissions
7a6da87c9829290af3cea458314e60dd6d1239fd
[ "Apache-2.0" ]
null
null
null
src/etools_permissions/apps.py
unicef/etools-permissions
7a6da87c9829290af3cea458314e60dd6d1239fd
[ "Apache-2.0" ]
null
null
null
src/etools_permissions/apps.py
unicef/etools-permissions
7a6da87c9829290af3cea458314e60dd6d1239fd
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class RealmConfig(AppConfig): name = 'etools_permissions'
16.333333
33
0.77551
11
98
6.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.153061
98
5
34
19.6
0.903614
0
0
0
0
0
0.183673
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
a535343c5e866f1dc0e291c243dacf8c071671aa
167
py
Python
22.ParImpar.py
JDKdevStudio/Taller30Abril
fe8094b6669899aae50154a6d380ce583531699a
[ "CC0-1.0" ]
null
null
null
22.ParImpar.py
JDKdevStudio/Taller30Abril
fe8094b6669899aae50154a6d380ce583531699a
[ "CC0-1.0" ]
null
null
null
22.ParImpar.py
JDKdevStudio/Taller30Abril
fe8094b6669899aae50154a6d380ce583531699a
[ "CC0-1.0" ]
null
null
null
while True: numero= int(input("Escribir un numero= ")) if numero%2 == 0: print("El numero es par") else: print("El numero es impar")
23.857143
47
0.54491
23
167
3.956522
0.695652
0.153846
0.285714
0.32967
0
0
0
0
0
0
0
0.017699
0.323353
167
6
48
27.833333
0.787611
0
0
0
0
0
0.335404
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
a58e392875bebe788b3ee01d339973731c55c8d1
200
py
Python
shepherd/comm/__init__.py
iterait/shepherd
0847c9885584378dd68a48c40d03f9bb02b2b57c
[ "MIT" ]
5
2018-10-13T19:03:07.000Z
2019-02-25T06:44:27.000Z
shepherd/comm/__init__.py
iterait/shepherd
0847c9885584378dd68a48c40d03f9bb02b2b57c
[ "MIT" ]
62
2018-09-13T08:03:39.000Z
2022-01-03T09:05:54.000Z
shepherd/comm/__init__.py
iterait/shepherd
0847c9885584378dd68a48c40d03f9bb02b2b57c
[ "MIT" ]
null
null
null
"""Package with sockets/greenlets communication helpers.""" from .messages import * from .messenger import Messenger __all__ = ['Message', 'InputMessage', 'DoneMessage', 'ErrorMessage', 'Messenger']
33.333333
81
0.755
19
200
7.736842
0.789474
0
0
0
0
0
0
0
0
0
0
0
0.105
200
5
82
40
0.821229
0.265
0
0
0
0
0.361702
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
a5a8bd19ab6de1f7aba634c2e4c3a316d772e71b
134
py
Python
part-2/collect/sets.py
kumalee/python-101
30067b3ada2d620efd57a67b8693a0048f1474b5
[ "MIT" ]
null
null
null
part-2/collect/sets.py
kumalee/python-101
30067b3ada2d620efd57a67b8693a0048f1474b5
[ "MIT" ]
null
null
null
part-2/collect/sets.py
kumalee/python-101
30067b3ada2d620efd57a67b8693a0048f1474b5
[ "MIT" ]
null
null
null
#! /usr/bin/python # encoding: utf-8 s1 = set([1,2,3]) for s in s1: print s s1.add(4) print 's1.add(4)' print 's1 =', s1, '\n'
11.166667
22
0.544776
28
134
2.607143
0.642857
0.136986
0.164384
0.30137
0.328767
0
0
0
0
0
0
0.114286
0.216418
134
11
23
12.181818
0.580952
0.246269
0
0
0
0
0.151515
0
0
0
0
0
0
0
null
null
0
0
null
null
0.5
1
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
1
0
0
0
0
0
0
1
0
4
a5ad69aabc0b83223c95e25d0da761f22b89b5b9
7,655
py
Python
codes/plots.py
Wenupi/protoplanetary_disks
51f8decbec5415e1da9893316f03d32ca5ab27de
[ "MIT" ]
null
null
null
codes/plots.py
Wenupi/protoplanetary_disks
51f8decbec5415e1da9893316f03d32ca5ab27de
[ "MIT" ]
null
null
null
codes/plots.py
Wenupi/protoplanetary_disks
51f8decbec5415e1da9893316f03d32ca5ab27de
[ "MIT" ]
null
null
null
#PLOTS ################################################## #if(plot_opacity == True): # p_plot = np.linspace(2.0,6.0,21) # a_plot = np.logspace(np.log10(0.001),np.log10(10.),21) # # EXT_plot = EXT(a_plot,p_plot) # ALB_plot = ALB(a_plot,p_plot) # # plt.close() # fig = plt.figure() # ax = fig.add_subplot(111) # im = ax.imshow(EXT_plot, cmap='hot', origin='lower', interpolation='gaussian',aspect='auto') # cbar = fig.colorbar(im,orientation='vertical') # cbar.set_label(r"$\chi_{"+str(wl)+"\mathrm{cm}} [\mathrm{cm}^2/\mathrm{g}_{\mathrm{dust}}]$") # plt.xticks( np.linspace(0,len(a_plot)-1,len(a_plot)) , np.round_(np.log10(a_plot),decimals=2)) # plt.yticks( np.linspace(0,(len(p_plot)-1),len(p_plot)), np.round_(p_plot, decimals=2)) # plt.xticks(rotation=90) # plt.yticks(rotation=0) # plt.xlabel('$\log (a_{\mathrm{max}} [\mathrm{cm}])$') # plt.ylabel('$p$') # plt.savefig('Opacity/EXT_nu'+str(np.round(nu/1.e9,2))+'GHz.pdf', bbox_inches='tight') # print (' - Opacity/EXT_nu'+str(np.round(nu/1.e9,2))+'GHz.pdf saved!') # # plt.close() # fig = plt.figure() # ax = fig.add_subplot(111) # im = ax.imshow(ALB_plot, cmap='hot', origin='lower', interpolation='gaussian',aspect='auto') # cbar = fig.colorbar(im,orientation='vertical') # cbar.set_label(r"$\omega_{"+str(wl)+"\mathrm{cm}}$") # plt.xticks( np.linspace(0,len(a_plot)-1,len(a_plot)) , np.round_(np.log10(a_plot),decimals=2)) # plt.yticks( np.linspace(0,(len(p_plot)-1),len(p_plot)), np.round_(p_plot, decimals=2)) # plt.xticks(rotation=90) # plt.yticks(rotation=0) # plt.xlabel('$\log (a_{\mathrm{max}} [\mathrm{cm}])$') # plt.ylabel('$p$') # plt.savefig('Opacity/ALB_nu'+str(np.round(nu/1.e9,2))+'GHz.pdf', bbox_inches='tight') # print (' - Opacity/ALB_nu'+str(np.round(nu/1.e9,2))+'GHz.pdf saved!') ########################################################## if(plot_sky == True): plt.close() fig , ax = plt.subplots(nrows=2,ncols=2,figsize=(15,12)) fig.subplots_adjust(hspace=.15,wspace=.1) plt.suptitle('$\lambda = %.2f \ \mathrm{cm}; \ i = %.1f \ \mathrm{deg}$'%(wl,inc*180./np.pi)) ########################################################## if(intensity_log == True): im = ax[0][0].imshow(np.log10(Bright*1.e3), cmap='hot', origin='lower',aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)],interpolation='None') cbar = fig.colorbar(im,orientation='vertical',ax=ax[0][0]) cbar.set_label(r'$\log (I_{\nu})\ \mathrm{[mJy/pix]}$') im = ax[0][1].imshow(np.log10(conv_Bright*1.e3), cmap='hot', origin='lower',aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)],interpolation='None') cbar = fig.colorbar(im,orientation='vertical',ax=ax[0][1]) cbar.set_label(r'$\log (I_{\nu})\ \mathrm{[mJy/beam]}$') beam_d = patches.Circle((-0.75*length/2.,-0.75*length/2),radius=beam*distance/2.,facecolor='w', edgecolor='k') ax[0][1].add_patch(beam_d) else: im = ax[0][0].imshow(Bright*1.e3, cmap='hot', origin='lower',aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)],interpolation='None') cbar = fig.colorbar(im,orientation='vertical',ax=ax[0][0]) cbar.set_label(r'$I_{\nu} \ \mathrm{[mJy/pix]}$') im = ax[0][1].imshow(conv_Bright*1.e3, cmap='hot', origin='lower',aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)],interpolation='None') cbar = fig.colorbar(im,orientation='vertical',ax=ax[0][1]) cbar.set_label(r'$I_{\nu} \ \mathrm{[mJy/beam]}$') beam_d = patches.Circle((-0.75*length/2.,-0.75*length/2),radius=beam*distance/2.,facecolor='w', edgecolor='k') ax[0][1].add_patch(beam_d) ax[0][0].set_ylabel(r'$y \ \mathrm{[au]}$') ax[0][0].set_title(r'$\mathrm{Intensity \ Model}$') ax[0][0].set_xticks([]) ax[0][1].set_yticks([]) ax[0][1].set_xticks([]) ax[0][1].set_title(r'$\mathrm{Convolved \ intensity}$') ########################################################## if(np.nanmax(op_depth) > 1.): Contorno = True else: Contorno = False if(opacity_log == True): im = ax[1][0].imshow(np.log10(op_depth), cmap='hot_r', origin='lower',aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)],interpolation='None') cbar = fig.colorbar(im,orientation='vertical',ax=ax[1][0]) if(Contorno == True): con = ax[1][0].contour(np.log10(op_depth), levels=[0.0],colors='k',linestyles='dashed',origin='lower', aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)]) ax[1][0].plot([],[],'k--',label=r'$\tau_{\chi_{\nu}} = 1$') else: im = ax[1][0].imshow(op_depth, cmap='hot', origin='lower',aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)],interpolation='None') cbar = fig.colorbar(im,orientation='vertical',ax=ax[1][0]) if(Contorno == True): con = ax[1][0].contour(op_depth, levels=[1.0],colors='k',linestyles='dashed',origin='lower', aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)]) if (scattering == True): cbar.set_label(r'$\log (\tau_{\chi_{\nu}})$') else: cbar.set_label(r'$\log (\tau_{\kappa_{\nu}})$') im = ax[1][1].imshow(conv_TB, cmap='hot', origin='lower',aspect='auto', extent=[np.min(x_array),np.max(x_array),np.min(y_array),np.max(y_array)],interpolation='None') # ax[1][1].add_patch(beam_d) cbar = fig.colorbar(im,orientation='vertical',ax=ax[1][1]) cbar.set_label(r'$T_{\mathrm{B}} [\mathrm{K/beam}]$') ax[1][0].legend(loc=3,framealpha=0.2,fontsize=12) ax[1][0].set_ylabel(r'') ax[1][1].set_yticks([]) ax[1][0].set_title(r'$\mathrm{Optical \ depth \ model}$') for j in range(2): ax[1][j].set_xlabel(r'$x \ \mathrm{[au]}$') plt.savefig('Results/img/Diks_wl'+str(np.round(wl,2))+'_inc'+str(np.round(inc*180./np.pi,2))+'deg.pdf', bbox_inches='tight') print (' - Results/img/Diks_wl'+str(np.round(wl,2))+'_inc'+str(np.round(inc*180./np.pi,2))+'deg.pdf saved!') ########################################################## if(plot_Temperature == True): plt.close() fig , ax = plt.subplots(nrows=1,ncols=1,figsize=(14,6)) im = ax.imshow(np.log10(map_T),cmap='hot', origin='lower',aspect='auto', extent=[x_array[0],x_array[nx-1],z_temp[0],z_temp[len(z_temp)-1]],interpolation='None') ax.contour(np.log10(map_T), 4,colors='w',linestyles='dashed',origin='lower', aspect='auto', extent=[x_array[0],x_array[nx-1],z_temp[0],z_temp[len(z_temp)-1]]) cbar = fig.colorbar(im,orientation='vertical',ax=ax) cbar.set_label(r'$\log (T_{\mathrm{d}} [\mathrm{K}])$') ax.set_xlim(xmin=0.,xmax=Rout) ax.set_xlabel(r'$\varpi \ \mathrm{[au]}$',fontsize=16) ax.set_ylabel(r'$z \ \mathrm{[au]}$',fontsize=16) plt.savefig('Results/img/TemperatureStructure_Mdot'+str(Mdot*year/Msun)+'_Tstar'+str(Tstar)+'.pdf', bbox_inches='tight') print (' - Results/img/TemperatureStructure_Mdot'+str(Mdot*year/Msun)+'_Tstar'+str(Tstar)+'.pdf')
51.375839
129
0.569562
1,173
7,655
3.584825
0.14578
0.044946
0.034245
0.054935
0.764804
0.735315
0.718668
0.703686
0.678478
0.667301
0
0.033438
0.167864
7,655
148
130
51.722973
0.626688
0.231875
0
0.329268
0
0.012195
0.169726
0.017279
0
0
0
0
0
1
0
false
0
0
0
0
0.02439
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
3c399d8787441b242db97f6bdfce10de7dd2eb3f
2,698
py
Python
src/rez/tests/test_imports.py
maxnbk/rez
762c5cfce17eabde67eb5582498406eb3544daf0
[ "Apache-2.0" ]
null
null
null
src/rez/tests/test_imports.py
maxnbk/rez
762c5cfce17eabde67eb5582498406eb3544daf0
[ "Apache-2.0" ]
null
null
null
src/rez/tests/test_imports.py
maxnbk/rez
762c5cfce17eabde67eb5582498406eb3544daf0
[ "Apache-2.0" ]
1
2020-09-24T08:33:43.000Z
2020-09-24T08:33:43.000Z
# Copyright Contributors to the Rez project # # 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. """ test importing of all source """ from rez.tests.util import TestBase import unittest class TestImports(TestBase): def test_1(self): """import every file in rez.""" import rez # noqa import rez.build_process # noqa import rez.build_system # noqa import rez.bundle_context # noqa import rez.config # noqa import rez.developer_package # noqa import rez.exceptions # noqa import rez.package_cache # noqa import rez.package_copy # noqa import rez.package_filter # noqa import rez.package_help # noqa import rez.package_maker # noqa import rez.package_order # noqa import rez.package_repository # noqa import rez.package_resources # noqa import rez.package_search # noqa import rez.package_serialise # noqa import rez.package_test # noqa import rez.packages # noqa import rez.plugin_managers # noqa import rez.release_hook # noqa import rez.release_vcs # noqa import rez.resolved_context # noqa import rez.resolver # noqa import rez.rex # noqa import rez.rex_bindings # noqa import rez.serialise # noqa import rez.shells # noqa import rez.solver # noqa import rez.status # noqa import rez.suite # noqa import rez.system # noqa import rez.wrapper # noqa import rez.utils._version # noqa import rez.utils.backcompat # noqa import rez.utils.colorize # noqa import rez.utils.data_utils # noqa import rez.utils.filesystem # noqa import rez.utils.graph_utils # noqa import rez.utils.lint_helper # noqa import rez.utils.logging_ # noqa import rez.utils.platform_ # noqa import rez.utils.resources # noqa import rez.utils.schema # noqa import rez.utils.scope # noqa import rez.utils.memcached # noqa import rez.utils.yaml # noqa if __name__ == '__main__': unittest.main()
34.589744
74
0.653447
346
2,698
4.99422
0.375723
0.244792
0.346065
0.145833
0.02662
0
0
0
0
0
0
0.002583
0.282431
2,698
77
75
35.038961
0.889979
0.316531
0
0
0
0
0.004515
0
0
0
0
0
0
1
0.018868
false
0
0.943396
0
0.981132
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
3c766967845d635628bd6b35f922ed9920b4fe3a
5,403
py
Python
t2t_bert/distributed_bin/tf_serving_api.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
34
2018-12-19T01:00:57.000Z
2021-03-26T09:36:37.000Z
t2t_bert/distributed_bin/tf_serving_api.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
11
2018-12-25T03:37:59.000Z
2021-08-25T14:43:58.000Z
t2t_bert/distributed_bin/tf_serving_api.py
yyht/bert
480c909e0835a455606e829310ff949c9dd23549
[ "Apache-2.0" ]
9
2018-12-27T08:00:44.000Z
2020-06-08T03:05:14.000Z
# -*- coding: utf-8 -*- import requests import json import tensorflow as tf import sys,os father_path = os.path.join(os.getcwd()) print(father_path, "==father path==") def find_bert(father_path): if father_path.split("/")[-1] == "BERT": return father_path output_path = "" for fi in os.listdir(father_path): if fi == "BERT": output_path = os.path.join(father_path, fi) break else: if os.path.isdir(os.path.join(father_path, fi)): find_bert(os.path.join(father_path, fi)) else: continue return output_path bert_path = find_bert(father_path) t2t_bert_path = os.path.join(bert_path, "t2t_bert") sys.path.extend([bert_path, t2t_bert_path]) print(sys.path) from distributed_single_sentence_classification import tf_serving_data_prepare as single_sent_data_prepare from distributed_pair_sentence_classification import tf_serving_data_prepare as pair_sent_data_prepare flags = tf.flags FLAGS = flags.FLAGS ## Required parameters flags.DEFINE_string( "buckets", None, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "vocab", None, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_bool( "do_lower_case", True, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "url", None, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "port", None, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "model_name", None, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "signature_name", None, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "keyword_path", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "background_label", "正常", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "label_dict", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "segment_id_type", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "add_word_path", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "delete_word_path", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "input_data", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "output_path", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "task_type", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "model_type", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "tokenizer", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "with_char", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_string( "versions", "", "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") flags.DEFINE_integer( "max_seq_length", 64, "The config json file corresponding to the pre-trained BERT model. " "This specifies the model architecture.") def main(_): if FLAGS.task_type == "pair_sentence_classification": vocab_path = os.path.join(FLAGS.buckets, FLAGS.vocab) corpus_path = os.path.join(FLAGS.buckets, FLAGS.input_data) print(corpus_path, vocab_path) feed_dict = pair_sent_data_prepare.get_feeddict(FLAGS, vocab_path, corpus_path) output_path = os.path.join(FLAGS.buckets, FLAGS.output_path) elif FLAGS.task_type == "single_sentence_classification": vocab_path = os.path.join(FLAGS.buckets, FLAGS.vocab) corpus_path = os.path.join(FLAGS.buckets, FLAGS.input_data) print(corpus_path, vocab_path) feed_dict = single_sent_data_prepare.get_feeddict(FLAGS, vocab_path, corpus_path) output_path = os.path.join(FLAGS.buckets, FLAGS.output_path) results = requests.post("http://%s:%s/v1/models/%s/versions/%s:predict" % (FLAGS.url, FLAGS.port, FLAGS.model_name, FLAGS.versions), json=feed_dict) try: with tf.gfile.Open(output_path, "w") as fwobj: pred_lst = results.content.decode() json.dump(pred_lst, fwobj) print(results.content.decode()) except: predict_info = [] print(results.content.decode()) if __name__ == "__main__": tf.app.run()
30.698864
106
0.747733
770
5,403
5.075325
0.157143
0.05911
0.069857
0.091351
0.738229
0.73567
0.718782
0.718782
0.693193
0.693193
0
0.00173
0.144179
5,403
175
107
30.874286
0.843426
0.007588
0
0.52518
0
0
0.475551
0.010825
0
0
0
0
0
1
0.014388
false
0
0.043165
0
0.071942
0.043165
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
3c9947899b1aa540eb163a62b5646e0730b146ea
504
py
Python
raft/datastore/Idatastore.py
shrinivdeshmukh/simpleRAFT
1e8a1fdcc9bf8bd5ea36ca1ab96c3f79cc90884b
[ "MIT" ]
3
2021-07-23T09:43:28.000Z
2021-08-11T23:43:48.000Z
raft/datastore/Idatastore.py
shrinivdeshmukh/simpleRAFT
1e8a1fdcc9bf8bd5ea36ca1ab96c3f79cc90884b
[ "MIT" ]
null
null
null
raft/datastore/Idatastore.py
shrinivdeshmukh/simpleRAFT
1e8a1fdcc9bf8bd5ea36ca1ab96c3f79cc90884b
[ "MIT" ]
null
null
null
from abc import ABC, ABCMeta, abstractmethod class IDatastore(ABC): @abstractmethod def put(self, key: str, value: str): ''' Implement this function to insert data into database ''' @abstractmethod def get(self, key: str): ''' Implement this function to retrieve data from database ''' @abstractmethod def connect(self): ''' Implement this function to connect and interact with the database '''
21
62
0.593254
53
504
5.641509
0.528302
0.170569
0.210702
0.230769
0.173913
0
0
0
0
0
0
0
0.325397
504
23
63
21.913043
0.879412
0.343254
0
0.375
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0.125
0
0.625
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
b1b4a3cf55e2bb36d54c792d635d5834dcf74572
4,987
py
Python
tests/utils/test_image_utils.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
122
2021-02-07T23:01:58.000Z
2022-03-30T13:10:35.000Z
tests/utils/test_image_utils.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
273
2021-01-30T16:45:26.000Z
2022-03-16T15:02:33.000Z
tests/utils/test_image_utils.py
swershrimpy/gtsfm
8d301eb3ef9172345a1ac1369fd4e19764d28946
[ "Apache-2.0" ]
13
2021-03-12T03:01:27.000Z
2022-03-11T03:16:54.000Z
import numpy as np from gtsam import SfmTrack from gtsfm.common.image import Image import gtsfm.utils.images as image_utils def test_get_average_point_color(): """ Ensure 3d point color is computed as mean of RGB per 2d measurement.""" # random point; 2d measurements below are dummy locations (not actual projection) triangulated_pt = np.array([1, 2, 1]) track_3d = SfmTrack(triangulated_pt) # in camera 0 track_3d.add_measurement(idx=0, m=np.array([130, 80])) # in camera 1 track_3d.add_measurement(idx=1, m=np.array([10, 60])) img0 = np.zeros((100, 200, 3), dtype=np.uint8) img0[80, 130] = np.array([40, 50, 60]) img1 = np.zeros((100, 200, 3), dtype=np.uint8) img1[60, 10] = np.array([60, 70, 80]) images = {0: Image(img0), 1: Image(img1)} r, g, b = image_utils.get_average_point_color(track_3d, images) assert r == 50 assert g == 60 assert b == 70 def test_get_downsampling_factor_per_axis_leaveintact() -> None: """Ensure that image is left intact, when shorter side is smaller than max_resolution.""" img_h = 700 img_w = 1500 img = Image(np.zeros((img_h, img_w, 3), dtype=np.uint8)) max_resolution = 800 scale_u, scale_v, new_h, new_w = image_utils.get_downsampling_factor_per_axis(img_h, img_w, max_resolution) assert scale_u == 1.0 assert scale_v == 1.0 assert new_h == 700 assert new_w == 1500 def test_get_rescaling_factor_per_axis_upsample() -> None: """Ensure that max resolution constraint is met, when upsampling image. Resize a 700x1500 image, so that the shorter image side is EXACTLY 800 px. """ img_h = 700 img_w = 1500 img = Image(np.zeros((img_h, img_w, 3), dtype=np.uint8)) max_resolution = 800 scale_u, scale_v, new_h, new_w = image_utils.get_rescaling_factor_per_axis(img_h, img_w, max_resolution) # 8/7 will not give a clean integer division assert np.isclose(scale_u, 1.1427, atol=4) assert np.isclose(scale_v, 1.1429, atol=4) assert new_h == 800 assert new_w == 1714 def test_get_downsampling_factor_per_axis() -> None: """Ensure that max resolution constraint is met, when downsampling image. Resize a 700x1500 image, so that the shorter image side is AT MOST 600 px. Image is in landscape mode. """ img_h = 700 img_w = 1500 img = Image(np.zeros((img_h, img_w, 3), dtype=np.uint8)) max_resolution = 600 scale_u, scale_v, new_h, new_w = image_utils.get_downsampling_factor_per_axis(img_h, img_w, max_resolution) # Note that 600 / 700 = 0.85714 # 1500 * 0.85714 = 1285.7, which we round up to 1286. assert np.isclose(scale_u, 0.8573, atol=4) assert np.isclose(scale_v, 0.8571, atol=4) assert new_h == 600 assert new_w == 1286 def test_get_rescaling_factor_per_axis_downsample() -> None: """Ensure that max resolution constraint is met, when downsampling image. Resize a 700x1500 image, so that the shorter image side is EXACTLY 600 px. Image is in landscape mode. """ img_h = 700 img_w = 1500 img = Image(np.zeros((img_h, img_w, 3), dtype=np.uint8)) max_resolution = 600 scale_u, scale_v, new_h, new_w = image_utils.get_rescaling_factor_per_axis(img_h, img_w, max_resolution) # Note that 600 / 700 = 0.85714 # 1500 * 0.85714 = 1285.7, which we round up to 1286. assert np.isclose(scale_u, 0.8573, atol=4) assert np.isclose(scale_v, 0.8571, atol=4) assert new_h == 600 assert new_w == 1286 def test_get_downsampling_factor_per_axis_portrait() -> None: """Ensure that max resolution constraint is met, when downsampling image. Resize a 700x1500 image, so that the shorter image side is AT MOST 600 px. Image is in portrait mode. """ img_h = 1500 img_w = 700 img = Image(np.zeros((img_h, img_w, 3), dtype=np.uint8)) max_resolution = 600 scale_u, scale_v, new_h, new_w = image_utils.get_downsampling_factor_per_axis(img_h, img_w, max_resolution) # Note that 600 / 700 = 0.85714 # 1500 * 0.85714 = 1285.7, which we round up to 1286. assert np.isclose(scale_u, 0.8571, atol=4) assert np.isclose(scale_v, 0.8573, atol=4) assert new_h == 1286 assert new_w == 600 def test_get_rescaling_factor_per_axis_downsample_portrait() -> None: """Ensure that max resolution constraint is met, when downsampling image. Resize a 700x1500 image, so that the shorter image side is EXACTLY 600 px. Image is in portrait mode. """ img_h = 1500 img_w = 700 img = Image(np.zeros((img_h, img_w, 3), dtype=np.uint8)) max_resolution = 600 scale_u, scale_v, new_h, new_w = image_utils.get_rescaling_factor_per_axis(img_h, img_w, max_resolution) # Note that 600 / 700 = 0.85714 # 1500 * 0.85714 = 1285.7, which we round up to 1286. assert np.isclose(scale_v, 0.8571, atol=4) assert np.isclose(scale_u, 0.8573, atol=4) assert new_h == 1286 assert new_w == 600
34.874126
111
0.685783
840
4,987
3.857143
0.161905
0.072222
0.048148
0.02963
0.777469
0.751543
0.751543
0.704321
0.656173
0.641975
0
0.108906
0.211951
4,987
142
112
35.119718
0.715522
0.294967
0
0.564103
0
0
0
0
0
0
0
0
0.346154
1
0.089744
false
0
0.051282
0
0.141026
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
b1d89eb311ee4c6a30d48c1a8790edf7fffacc96
239
py
Python
backend/apps/question/serializers/category.py
xingxingzaixian/django-vue3.2-online-exam
1bf29174aee951238ee283df2796f47177e622ec
[ "MIT" ]
3
2022-03-27T12:58:23.000Z
2022-03-30T11:04:39.000Z
backend/apps/question/serializers/category.py
xingxingzaixian/django-vue3.2-online-exam
1bf29174aee951238ee283df2796f47177e622ec
[ "MIT" ]
null
null
null
backend/apps/question/serializers/category.py
xingxingzaixian/django-vue3.2-online-exam
1bf29174aee951238ee283df2796f47177e622ec
[ "MIT" ]
null
null
null
from rest_framework import serializers from question.models import TblQuestionCategory class QuestionCategorySerializer(serializers.ModelSerializer): class Meta: model = TblQuestionCategory fields = '__all__'
26.555556
63
0.757322
20
239
8.8
0.75
0
0
0
0
0
0
0
0
0
0
0
0.200837
239
9
64
26.555556
0.921466
0
0
0
0
0
0.030172
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b1dadba57d97005232d024c239a8776d53c3dd3d
87
py
Python
apps/baliza/apps.py
wisrovi/Server-Hospital-Smart-Bracelet
03b71f03da7450a14cb1c45e51c3ae9401058dc8
[ "MIT" ]
null
null
null
apps/baliza/apps.py
wisrovi/Server-Hospital-Smart-Bracelet
03b71f03da7450a14cb1c45e51c3ae9401058dc8
[ "MIT" ]
4
2021-03-19T10:58:51.000Z
2021-06-10T20:07:14.000Z
apps/baliza/apps.py
wisrovi/Server-Hospital-Smart-Bracelet
03b71f03da7450a14cb1c45e51c3ae9401058dc8
[ "MIT" ]
null
null
null
from django.apps import AppConfig class BalizaConfig(AppConfig): name = 'baliza'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
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
b1f3cf14b518ae8d30518f96c63cbf9efe83dcf9
107
py
Python
minimal_user/__init__.py
ionata/django-minimal-user
5d7c187151c4586c85c67de16b6635f864202b5d
[ "BSD-3-Clause" ]
null
null
null
minimal_user/__init__.py
ionata/django-minimal-user
5d7c187151c4586c85c67de16b6635f864202b5d
[ "BSD-3-Clause" ]
1
2017-11-21T22:11:15.000Z
2017-11-22T00:37:55.000Z
minimal_user/__init__.py
ionata/django-minimal-user
5d7c187151c4586c85c67de16b6635f864202b5d
[ "BSD-3-Clause" ]
null
null
null
from pkg_resources import get_distribution __version__ = get_distribution('django-minimal-user').version
21.4
61
0.841121
13
107
6.384615
0.769231
0.361446
0
0
0
0
0
0
0
0
0
0
0.084112
107
4
62
26.75
0.846939
0
0
0
0
0
0.17757
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