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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f6df8963235e108bc0bff3c2625f3b6d7e38a0ef | 6,634 | py | Python | autolens/lens/plotters/sensitivity_fit_plotters.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | autolens/lens/plotters/sensitivity_fit_plotters.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | autolens/lens/plotters/sensitivity_fit_plotters.py | AshKelly/PyAutoLens | 043795966338a655339e61782253ad67cc3c14e6 | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
from autolens.data.array.plotters import plotter_util
from autolens.lens.plotters import lens_plotter_util
def plot_fit_subplot(
fit, should_plot_mask=True, extract_array_from_mask=False, zoom_around_mask=False, positions=None,
should_plot_image_plane_pix=True,
... | 55.747899 | 127 | 0.763793 | 911 | 6,634 | 5.194292 | 0.127333 | 0.035926 | 0.040575 | 0.063398 | 0.725275 | 0.715554 | 0.715554 | 0.699704 | 0.699704 | 0.676458 | 0 | 0.006553 | 0.14893 | 6,634 | 119 | 128 | 55.747899 | 0.831562 | 0.050347 | 0 | 0.62069 | 0 | 0 | 0.00622 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.011494 | false | 0 | 0.034483 | 0 | 0.045977 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f6e15a7ff5904b518c1e697c2b7f7bd499819849 | 793 | py | Python | boards/tests/test_cell.py | gcmac16/deeptoe | d92ffef553a03640479fb0dcd5e6fa1f4e6d1cd1 | [
"MIT"
] | null | null | null | boards/tests/test_cell.py | gcmac16/deeptoe | d92ffef553a03640479fb0dcd5e6fa1f4e6d1cd1 | [
"MIT"
] | null | null | null | boards/tests/test_cell.py | gcmac16/deeptoe | d92ffef553a03640479fb0dcd5e6fa1f4e6d1cd1 | [
"MIT"
] | null | null | null | import pytest
from ..cell import Cell
from ..exceptions import CellOccupiedError
def test_is_empty():
c = Cell('00')
assert c.is_empty
c.move('X')
assert not c.is_empty
def test_str():
c = Cell('00')
assert str(c) == '-'
c.move('X')
assert str(c) == 'X'
def test_error_on_double_... | 14.418182 | 42 | 0.553594 | 120 | 793 | 3.541667 | 0.291667 | 0.070588 | 0.082353 | 0.061176 | 0.061176 | 0.061176 | 0 | 0 | 0 | 0 | 0 | 0.045694 | 0.282472 | 793 | 54 | 43 | 14.685185 | 0.70123 | 0 | 0 | 0.264706 | 0 | 0 | 0.042875 | 0 | 0 | 0 | 0 | 0 | 0.235294 | 1 | 0.147059 | false | 0 | 0.088235 | 0 | 0.235294 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6e32f3fa61806614f5f5e9170af8b91f5de2f34 | 3,065 | py | Python | app.py | mariosky/fulltext-search | 873fa9f6233ad60a5caf09558fed9cf8e3e13c6e | [
"MIT"
] | 1 | 2021-05-26T15:43:29.000Z | 2021-05-26T15:43:29.000Z | app.py | mariosky/fulltext-search | 873fa9f6233ad60a5caf09558fed9cf8e3e13c6e | [
"MIT"
] | null | null | null | app.py | mariosky/fulltext-search | 873fa9f6233ad60a5caf09558fed9cf8e3e13c6e | [
"MIT"
] | null | null | null | from flask import Flask, request
from flask_httpauth import HTTPBasicAuth
from flaskr.title_search import get_title_content
from werkzeug.security import generate_password_hash, check_password_hash
from redisearch import Client, Query, TextField, IndexDefinition
import redis
from redis import ResponseError
import json
... | 23.945313 | 108 | 0.630669 | 374 | 3,065 | 5.008021 | 0.302139 | 0.038441 | 0.036305 | 0.042712 | 0.249867 | 0.148425 | 0.148425 | 0.148425 | 0.056594 | 0.056594 | 0 | 0.006372 | 0.231974 | 3,065 | 127 | 109 | 24.133858 | 0.789295 | 0.005546 | 0 | 0.258065 | 1 | 0 | 0.147406 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.064516 | false | 0.096774 | 0.107527 | 0 | 0.247312 | 0.021505 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 |
f6e3b5434694dec731a462ebd8a18fdc17ccf073 | 1,044 | py | Python | lcm/lcm_optimal_euclidean.py | mingrammer/funmath | c9b6105c0058519e8ed3c7ce155030b4ecdfd3db | [
"MIT"
] | 106 | 2017-07-15T18:48:56.000Z | 2021-03-10T07:45:06.000Z | lcm/lcm_optimal_euclidean.py | stzminjae/funmath | 3319b8ccfb67346a410bc2e40ca3398288c03244 | [
"MIT"
] | 7 | 2017-07-16T01:48:37.000Z | 2018-02-16T12:57:37.000Z | lcm/lcm_optimal_euclidean.py | stzminjae/funmath | 3319b8ccfb67346a410bc2e40ca3398288c03244 | [
"MIT"
] | 13 | 2017-07-15T19:47:00.000Z | 2020-10-19T08:17:34.000Z | def gcd_optimal_euclidean(a: int, b: int) -> int:
if b == 0:
return a
a, b = b, a % b
return gcd_optimal_euclidean(a, b)
def lcm_optimal_euclidean(a: int, b: int) -> int:
"""Return a LCM (Lowest Common Multiple) of given two integers using euclidean algorithm
This function uses euclidean ... | 29.828571 | 114 | 0.60728 | 173 | 1,044 | 3.572254 | 0.375723 | 0.20712 | 0.153722 | 0.097087 | 0.239482 | 0.087379 | 0.087379 | 0 | 0 | 0 | 0 | 0.099869 | 0.271073 | 1,044 | 34 | 115 | 30.705882 | 0.712221 | 0.66092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0 | 0 | 0.625 | 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 | 0 | 1 | 0 | 0 | 3 |
f6e3fa4794dda049119dfb9a8ab2d410227d18eb | 1,135 | py | Python | day-03/part-1/youyoun.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 8 | 2019-12-01T08:56:46.000Z | 2019-12-05T21:21:12.000Z | day-03/part-1/youyoun.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 10 | 2019-11-25T09:56:20.000Z | 2021-05-10T19:57:48.000Z | day-03/part-1/youyoun.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 5 | 2019-12-01T08:19:57.000Z | 2020-11-23T09:50:19.000Z | from tool.runners.python import SubmissionPy
def get_coords(steps):
x, y = 0, 0
coords = set()
for step in steps.split(","):
if step[0] == "R":
for i in range(x, x + int(step[1:])):
coords.add((i, y))
x = x + int(step[1:])
elif step[0] == "L":
... | 29.868421 | 66 | 0.462555 | 163 | 1,135 | 3.202454 | 0.337423 | 0.10728 | 0.122605 | 0.084291 | 0.377395 | 0.377395 | 0.360153 | 0.360153 | 0.360153 | 0.203065 | 0 | 0.039161 | 0.370044 | 1,135 | 37 | 67 | 30.675676 | 0.690909 | 0.066079 | 0 | 0.137931 | 0 | 0 | 0.004735 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.068966 | false | 0 | 0.034483 | 0 | 0.206897 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6e3fc4beae8b1f7a433dcce7cb12b7d34338dc4 | 5,104 | py | Python | niftynet/contrib/regression_weighted_sampler/isample_regression.py | elias-1/NiftyNet | 05cd2ffbff5043d9a40b524a6d72f6bd5cd072d2 | [
"Apache-2.0"
] | 2 | 2019-03-25T18:50:47.000Z | 2019-10-10T01:45:02.000Z | niftynet/contrib/regression_weighted_sampler/isample_regression.py | elias-1/NiftyNet | 05cd2ffbff5043d9a40b524a6d72f6bd5cd072d2 | [
"Apache-2.0"
] | null | null | null | niftynet/contrib/regression_weighted_sampler/isample_regression.py | elias-1/NiftyNet | 05cd2ffbff5043d9a40b524a6d72f6bd5cd072d2 | [
"Apache-2.0"
] | 2 | 2018-05-13T14:54:48.000Z | 2018-05-26T16:08:09.000Z | import os
import tensorflow as tf
from niftynet.application.regression_application import \
RegressionApplication, SUPPORTED_INPUT
from niftynet.engine.sampler_uniform import UniformSampler
from niftynet.engine.sampler_weighted import WeightedSampler
from niftynet.engine.application_variables import NETWORK_OUTPU... | 43.623932 | 75 | 0.651646 | 545 | 5,104 | 5.812844 | 0.288073 | 0.030934 | 0.049242 | 0.017677 | 0.229167 | 0.217803 | 0.137626 | 0.082702 | 0.082702 | 0.082702 | 0 | 0.002982 | 0.277234 | 5,104 | 116 | 76 | 44 | 0.855787 | 0.22453 | 0 | 0.105263 | 0 | 0 | 0.025426 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.026316 | false | 0 | 0.131579 | 0 | 0.197368 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6e75ecad1ceab57bbff84d8d994897e463d2b9c | 99 | py | Python | tests/test_empty.py | ErikBjare/eeg-notebooks | 73fd7ae7a723aafb41c36036da332b6e7e2a2b7b | [
"BSD-3-Clause"
] | null | null | null | tests/test_empty.py | ErikBjare/eeg-notebooks | 73fd7ae7a723aafb41c36036da332b6e7e2a2b7b | [
"BSD-3-Clause"
] | null | null | null | tests/test_empty.py | ErikBjare/eeg-notebooks | 73fd7ae7a723aafb41c36036da332b6e7e2a2b7b | [
"BSD-3-Clause"
] | null | null | null | def test_empty():
# Empty test that only imports eegnb, to make `pytest` pass
import eegnb
| 24.75 | 63 | 0.69697 | 15 | 99 | 4.533333 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.232323 | 99 | 3 | 64 | 33 | 0.894737 | 0.575758 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | true | 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 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 6 |
f6e7e8e4509bf31d9f510447d795576bf80ae64d | 723 | py | Python | observation/status.py | nosrio/pytun | 56ab9e216ccff57d6280835e20ccce7e062d39b8 | [
"Apache-2.0"
] | 1 | 2020-05-08T20:11:25.000Z | 2020-05-08T20:11:25.000Z | observation/status.py | nosrio/pytun | 56ab9e216ccff57d6280835e20ccce7e062d39b8 | [
"Apache-2.0"
] | 3 | 2020-11-10T12:17:30.000Z | 2021-06-04T16:17:32.000Z | observation/status.py | nosrio/pytun | 56ab9e216ccff57d6280835e20ccce7e062d39b8 | [
"Apache-2.0"
] | 1 | 2021-11-16T16:11:01.000Z | 2021-11-16T16:11:01.000Z | import datetime
from threading import RLock
class Status:
def __init__(self):
self.rlock = RLock()
self.status_data = {}
self.created_at = datetime.datetime.now()
def start_tunnel(self, tunnel_name):
with self.rlock:
if tunnel_name in self.status_data:
... | 30.125 | 93 | 0.607192 | 86 | 723 | 4.825581 | 0.337209 | 0.168675 | 0.20241 | 0.144578 | 0.318072 | 0.178313 | 0.178313 | 0.178313 | 0 | 0 | 0 | 0.003861 | 0.283541 | 723 | 23 | 94 | 31.434783 | 0.797297 | 0 | 0 | 0.111111 | 0 | 0 | 0.078838 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.111111 | 0 | 0.388889 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f6e9ac097d290b36827d579227b511e7d239d092 | 2,037 | py | Python | mayan/apps/navigation/widgets.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 3 | 2020-02-03T11:58:51.000Z | 2020-10-20T03:52:21.000Z | mayan/apps/navigation/widgets.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | null | null | null | mayan/apps/navigation/widgets.py | Dave360-crypto/mayan-edms | 9cd37537461347f79ff0429e4b8b16fd2446798d | [
"Apache-2.0"
] | 2 | 2020-10-24T11:10:06.000Z | 2021-03-03T20:05:38.000Z | from __future__ import absolute_import
import urlparse
from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.template import RequestContext, Variable
from django.template.defaultfilters import capfirst
from django.utils.safestring... | 39.173077 | 326 | 0.704467 | 259 | 2,037 | 5.366795 | 0.3861 | 0.05036 | 0.048921 | 0.04964 | 0.041727 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009541 | 0.17673 | 2,037 | 51 | 327 | 39.941176 | 0.81932 | 0 | 0 | 0.15 | 0 | 0.025 | 0.203731 | 0.071674 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05 | false | 0 | 0.3 | 0 | 0.475 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6e9d127c928e003e7e3f6cc2bec25c1baf82144 | 3,237 | py | Python | src/toja/views/contribute.py | scmmmh/the-old-joke-archive | cfc842de94d092aa43de794154bea7e5edd97b16 | [
"MIT"
] | null | null | null | src/toja/views/contribute.py | scmmmh/the-old-joke-archive | cfc842de94d092aa43de794154bea7e5edd97b16 | [
"MIT"
] | 12 | 2019-12-26T17:40:56.000Z | 2022-02-26T17:21:06.000Z | src/toja/views/contribute.py | scmmmh/the-old-joke-archive | cfc842de94d092aa43de794154bea7e5edd97b16 | [
"MIT"
] | null | null | null | from copy import deepcopy
from math import ceil
from pyramid.httpexceptions import HTTPForbidden
from pyramid.view import view_config
from sqlalchemy import and_
from ..models import Image
from ..session import require_logged_in
from ..config import ANNOTATIONS, JOKE_METADATA
from ..translation import _
@view_config... | 43.16 | 112 | 0.569045 | 318 | 3,237 | 5.707547 | 0.323899 | 0.022039 | 0.024793 | 0.031405 | 0.323416 | 0.263361 | 0.153168 | 0.060606 | 0.060606 | 0.060606 | 0 | 0.005755 | 0.302132 | 3,237 | 74 | 113 | 43.743243 | 0.797698 | 0.050355 | 0 | 0.21875 | 0 | 0 | 0.170046 | 0.051668 | 0 | 0 | 0 | 0 | 0 | 1 | 0.046875 | false | 0 | 0.140625 | 0 | 0.234375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6e9f1782f7b241fd84b50ed1c1ec48c21643259 | 1,357 | py | Python | src/peering/azext_peering/_client_factory.py | michimune/azure-cli-extensions | 697e2c674e5c0825d44c72d714542fe01331e107 | [
"MIT"
] | 1 | 2022-03-22T15:02:32.000Z | 2022-03-22T15:02:32.000Z | src/peering/azext_peering/_client_factory.py | michimune/azure-cli-extensions | 697e2c674e5c0825d44c72d714542fe01331e107 | [
"MIT"
] | 1 | 2018-11-19T05:12:58.000Z | 2018-11-19T05:12:58.000Z | src/peering/azext_peering/_client_factory.py | michimune/azure-cli-extensions | 697e2c674e5c0825d44c72d714542fe01331e107 | [
"MIT"
] | 1 | 2021-06-03T19:31:10.000Z | 2021-06-03T19:31:10.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 28.87234 | 94 | 0.67944 | 168 | 1,357 | 5.053571 | 0.279762 | 0.141343 | 0.141343 | 0.176678 | 0.375736 | 0.375736 | 0.375736 | 0.28033 | 0.157833 | 0 | 0 | 0 | 0.113486 | 1,357 | 46 | 95 | 29.5 | 0.705736 | 0.247605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.454545 | false | 0 | 0.090909 | 0.409091 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
f6ea28bc3d46bfe5dfcf89ab752488b9203ba424 | 6,877 | py | Python | pyfiles.py | geoffmcnamara/pyfiles | d38f060ace02703b6fc0b55da12af0ef4ba4857d | [
"MIT"
] | null | null | null | pyfiles.py | geoffmcnamara/pyfiles | d38f060ace02703b6fc0b55da12af0ef4ba4857d | [
"MIT"
] | null | null | null | pyfiles.py | geoffmcnamara/pyfiles | d38f060ace02703b6fc0b55da12af0ef4ba4857d | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# vim: set syntax=none nospell:
import subprocess
import os
import fnmatch
import datetime
from bottle import default_app, route, run, template, response, redirect, debug, error, static_file
from wraphtml import WrapHtml
# for WSGI use:
application = default_app()
# config option #
debug(Tru... | 29.26383 | 190 | 0.558383 | 818 | 6,877 | 4.596577 | 0.310513 | 0.023404 | 0.017021 | 0.021543 | 0.0875 | 0.0375 | 0.026064 | 0 | 0 | 0 | 0 | 0.004453 | 0.281518 | 6,877 | 234 | 191 | 29.388889 | 0.756527 | 0.499927 | 0 | 0.04878 | 0 | 0.012195 | 0.136995 | 0.022524 | 0.012195 | 0 | 0 | 0 | 0 | 1 | 0.060976 | false | 0 | 0.073171 | 0.012195 | 0.219512 | 0.060976 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6eadc908b3d82e2b72632699e16d0a7a0e120a2 | 207 | py | Python | Companyname/appgestion/admin.py | friedrrich/DesarrolloWebTest | 43425c7c5c9edf06aabb3c6e499dd72df89ee369 | [
"Apache-2.0"
] | null | null | null | Companyname/appgestion/admin.py | friedrrich/DesarrolloWebTest | 43425c7c5c9edf06aabb3c6e499dd72df89ee369 | [
"Apache-2.0"
] | null | null | null | Companyname/appgestion/admin.py | friedrrich/DesarrolloWebTest | 43425c7c5c9edf06aabb3c6e499dd72df89ee369 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# Register your models here.
from appgestion.models import Cliente,Articulo,Pedido
admin.site.register(Articulo)
admin.site.register(Cliente)
admin.site.register(Pedido)
| 18.818182 | 53 | 0.816425 | 28 | 207 | 6.035714 | 0.5 | 0.159763 | 0.301775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.096618 | 207 | 10 | 54 | 20.7 | 0.903743 | 0.125604 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.4 | 0 | 0.4 | 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 | 1 | 0 | 0 | 0 | 0 | 4 |
f6ebae9a56dd62c3e6ba8e8582ec9e6144ac2278 | 263 | py | Python | try_and_except.py | akkuldn/My_repo_akkul | ae5741f0e5e9e0d98429b974c679c96496dfea54 | [
"MIT"
] | null | null | null | try_and_except.py | akkuldn/My_repo_akkul | ae5741f0e5e9e0d98429b974c679c96496dfea54 | [
"MIT"
] | null | null | null | try_and_except.py | akkuldn/My_repo_akkul | ae5741f0e5e9e0d98429b974c679c96496dfea54 | [
"MIT"
] | null | null | null | a = [1, 2, 'a']
try:
print ("Second element = %d" %a[1])
# Throws error since there are only 3 elements in array
print ("thirdFourth element = %s" %a[2])
print("fourth element=%d"%a[4])
except Exception as e:
print ("Exception ",e) | 29.222222 | 60 | 0.577947 | 40 | 263 | 3.8 | 0.65 | 0.026316 | 0.118421 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.030928 | 0.262357 | 263 | 9 | 61 | 29.222222 | 0.752577 | 0.201521 | 0 | 0 | 0 | 0 | 0.341346 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.571429 | 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 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 2 |
f6ebf18ea1522aa199fc9077b5805d1d4bb86bed | 1,381 | py | Python | expression_builder/tests/test_brackets.py | django-advance-utils/expression-builder | 08dab5780ae3a8be90c4daa6b9950ad1af4d87a4 | [
"MIT"
] | null | null | null | expression_builder/tests/test_brackets.py | django-advance-utils/expression-builder | 08dab5780ae3a8be90c4daa6b9950ad1af4d87a4 | [
"MIT"
] | null | null | null | expression_builder/tests/test_brackets.py | django-advance-utils/expression-builder | 08dab5780ae3a8be90c4daa6b9950ad1af4d87a4 | [
"MIT"
] | null | null | null | import unittest
from expression_builder.expression_builder import ExpressionBuilder
class BracketsTests(unittest.TestCase):
# noinspection PyPep8Naming
def setUp(self):
self.exp = ExpressionBuilder()
def test_one(self):
result = self.exp.run_statement("(2 + 4) * 2")
self.assertEq... | 30.688889 | 74 | 0.636495 | 180 | 1,381 | 4.727778 | 0.255556 | 0.082256 | 0.148061 | 0.179788 | 0.500588 | 0.500588 | 0.426557 | 0.344301 | 0.235018 | 0.157462 | 0 | 0.043721 | 0.221579 | 1,381 | 45 | 75 | 30.688889 | 0.747907 | 0.018103 | 0 | 0 | 0 | 0 | 0.098155 | 0 | 0 | 0 | 0 | 0 | 0.28125 | 1 | 0.3125 | false | 0 | 0.0625 | 0 | 0.40625 | 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 | 0 | 0 | 0 | 0 | 2 |
f6ec0f45efebd772f014a2bd9b91bd010caa2083 | 201 | py | Python | conan/tools/google/__init__.py | Mu-L/conan | 7c24ec4bbd6e8c16cdcd879403aae742689bc36a | [
"MIT"
] | 1 | 2019-11-04T17:23:09.000Z | 2019-11-04T17:23:09.000Z | conan/tools/google/__init__.py | Mu-L/conan | 7c24ec4bbd6e8c16cdcd879403aae742689bc36a | [
"MIT"
] | 1 | 2020-11-05T16:16:49.000Z | 2020-11-05T16:16:49.000Z | conan/tools/google/__init__.py | Mattlk13/conan | 005fc53485557b0a570bb71670f2ca9c66082165 | [
"MIT"
] | null | null | null | from conan.tools.google.toolchain import BazelToolchain
from conan.tools.google.bazeldeps import BazelDeps
from conan.tools.google.bazel import Bazel
from conan.tools.google.layout import bazel_layout
| 40.2 | 55 | 0.860697 | 29 | 201 | 5.931034 | 0.344828 | 0.209302 | 0.325581 | 0.465116 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.079602 | 201 | 4 | 56 | 50.25 | 0.92973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 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 | 1 | 0 | 0 | 0 | 0 | 7 |
f6ec649c38937c1fef3f220168731774d308f112 | 6,343 | py | Python | Matsuoka/tripple_pend_ex.py | JacobSal/Neuromechanical_Models | 548f395327276864f8d0ea2450d565e91155853a | [
"MIT"
] | null | null | null | Matsuoka/tripple_pend_ex.py | JacobSal/Neuromechanical_Models | 548f395327276864f8d0ea2450d565e91155853a | [
"MIT"
] | null | null | null | Matsuoka/tripple_pend_ex.py | JacobSal/Neuromechanical_Models | 548f395327276864f8d0ea2450d565e91155853a | [
"MIT"
] | 1 | 2021-03-02T17:46:15.000Z | 2021-03-02T17:46:15.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 11 11:25:26 2021
@author: jsalm
"""
import matplotlib.pyplot as plt
import numpy as np
from sympy import symbols
from sympy.physics import mechanics
from sympy import Dummy, lambdify
from scipy.integrate import odeint
#animation functions
from matplotlib import animati... | 31.093137 | 95 | 0.578906 | 934 | 6,343 | 3.825482 | 0.300857 | 0.011755 | 0.013434 | 0.013434 | 0.104394 | 0.092079 | 0.059894 | 0.059894 | 0.059894 | 0.043101 | 0 | 0.023241 | 0.253823 | 6,343 | 204 | 95 | 31.093137 | 0.73146 | 0.267539 | 0 | 0.111111 | 0 | 0 | 0.027027 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0.008547 | 0.068376 | 0 | 0.213675 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6ec8c44996e7a72f62986aaf887de9edefb0ec5 | 722 | py | Python | hackerrank/captains_room.py | nityansuman/coding-python | b1569de95d1881a82fb32f394f24617cfdcdf4b7 | [
"Apache-2.0"
] | null | null | null | hackerrank/captains_room.py | nityansuman/coding-python | b1569de95d1881a82fb32f394f24617cfdcdf4b7 | [
"Apache-2.0"
] | null | null | null | hackerrank/captains_room.py | nityansuman/coding-python | b1569de95d1881a82fb32f394f24617cfdcdf4b7 | [
"Apache-2.0"
] | 2 | 2021-06-25T16:49:36.000Z | 2022-02-13T03:27:45.000Z | def find_captains_room(rooms, size):
all_guests = list(map(int, rooms))
unique_guests = set(all_guests)
sum_all_guests = sum(all_guests)
# Get the sum of all the unique room numbers
sum_unique_guests = sum(unique_guests)
# Get the difference, in the sum: the captains room will cause this difference
te... | 26.740741 | 80 | 0.707756 | 107 | 722 | 4.504673 | 0.373832 | 0.124481 | 0.074689 | 0.087137 | 0.172199 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001724 | 0.196676 | 722 | 26 | 81 | 27.769231 | 0.82931 | 0.322715 | 0 | 0 | 0 | 0 | 0.019737 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0 | 0 | 0.166667 | 0.083333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6eed7b3aed16016ddfb10a8b779b91942c2f42b | 16,196 | pyw | Python | frmStatPic1.pyw | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | frmStatPic1.pyw | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | frmStatPic1.pyw | iefan/army_holiday | 0c79cf89c4dbb16bd87ca754265821f82b298f13 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
import wx
#import wx.lib.buttons as buttons
import PyDatabase
import images
import string
import MyValidator
from PhrResource import ALPHA_ONLY, DIGIT_ONLY, strVersion, g_UnitSnNum
import MyThread
import time
import datetime
import types
import os
import matplotlib.pypl... | 38.379147 | 151 | 0.556866 | 1,926 | 16,196 | 4.614226 | 0.206646 | 0.017104 | 0.01069 | 0.01024 | 0.209407 | 0.12884 | 0.096095 | 0.089569 | 0.055474 | 0.055474 | 0 | 0.0283 | 0.304026 | 16,196 | 422 | 152 | 38.379147 | 0.760114 | 0.036984 | 0 | 0.131343 | 0 | 0 | 0.030207 | 0 | 0.002985 | 0 | 0 | 0 | 0 | 0 | null | null | 0.00597 | 0.038806 | null | null | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f6f03810010754a86c0317dca23f8a7eaa2dccb4 | 2,050 | py | Python | receptor/connection/sock.py | RedHatOfficial/receptor | 0eb9f0e3bd3b25bce948f7a2f43562f181a630a1 | [
"Apache-2.0"
] | 6 | 2020-07-12T05:56:21.000Z | 2022-03-09T11:43:53.000Z | receptor/connection/sock.py | RedHatOfficial/receptor | 0eb9f0e3bd3b25bce948f7a2f43562f181a630a1 | [
"Apache-2.0"
] | 7 | 2020-07-06T15:51:06.000Z | 2021-08-18T18:55:26.000Z | receptor/connection/sock.py | RedHatOfficial/receptor | 0eb9f0e3bd3b25bce948f7a2f43562f181a630a1 | [
"Apache-2.0"
] | 3 | 2020-06-25T21:03:42.000Z | 2021-08-09T01:27:48.000Z | import asyncio
import logging
from .base import Transport, log_ssl_detail
logger = logging.getLogger(__name__)
class RawSocket(Transport):
def __init__(self, reader, writer, chunk_size=2 ** 16):
self.reader = reader
self.writer = writer
self._closed = False
self.chunk_size = chun... | 26.973684 | 76 | 0.593171 | 242 | 2,050 | 4.859504 | 0.355372 | 0.045918 | 0.030612 | 0.028912 | 0.044218 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002774 | 0.296585 | 2,050 | 75 | 77 | 27.333333 | 0.81276 | 0 | 0 | 0 | 0 | 0 | 0.08439 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.065574 | false | 0 | 0.04918 | 0.016393 | 0.213115 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6f0e76eb0ed0258f23697f9b0e4b2681dfd51d6 | 297 | py | Python | easy/excel-sheet-column-title.py | trilliwon/LeetCode | d137df53fa2489821b3c17ac22f24d9a1ae86304 | [
"MIT"
] | null | null | null | easy/excel-sheet-column-title.py | trilliwon/LeetCode | d137df53fa2489821b3c17ac22f24d9a1ae86304 | [
"MIT"
] | null | null | null | easy/excel-sheet-column-title.py | trilliwon/LeetCode | d137df53fa2489821b3c17ac22f24d9a1ae86304 | [
"MIT"
] | null | null | null | class Solution:
def convertToTitle(self, n):
"""
:type n: int
:rtype: str
"""
ans = ''
while n != 0:
n -= 1
digit = n % 26
ans = chr(ord('A') + digit) + ans
n = n // 26
return ans
| 19.8 | 45 | 0.343434 | 31 | 297 | 3.290323 | 0.645161 | 0.058824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043165 | 0.531987 | 297 | 14 | 46 | 21.214286 | 0.690647 | 0.080808 | 0 | 0 | 0 | 0 | 0.004149 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f6f1242f3dff4a13c09f9cca00fa6595b77c32d7 | 434 | py | Python | echo.py | devopsprosiva/python | 07311d7597c0895554efe8013b57f218a0f11bb5 | [
"MIT"
] | null | null | null | echo.py | devopsprosiva/python | 07311d7597c0895554efe8013b57f218a0f11bb5 | [
"MIT"
] | null | null | null | echo.py | devopsprosiva/python | 07311d7597c0895554efe8013b57f218a0f11bb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# https://python-essentials.readthedocs.io/en/latest/echo.html
while True:
user_input = input("Enter some text: ")
try:
is_user_input_of_type_int = int(user_input)
print("You entered an integer " + user_input)
continue
except ValueError:
if user_input == 'quit':
prin... | 22.842105 | 62 | 0.665899 | 60 | 434 | 4.65 | 0.666667 | 0.193548 | 0.16129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.211982 | 434 | 18 | 63 | 24.111111 | 0.815789 | 0.186636 | 0 | 0 | 0 | 0 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6f15cefe9ad0d3236e47039b8b006b0931ac91a | 1,021 | py | Python | medium/560-subarray-sum-equals-k.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | 2 | 2021-03-14T11:38:26.000Z | 2021-03-14T11:38:30.000Z | medium/560-subarray-sum-equals-k.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | null | null | null | medium/560-subarray-sum-equals-k.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | 1 | 2022-01-17T19:33:23.000Z | 2022-01-17T19:33:23.000Z | '''
和为K的子数组
给定一个整数数组和一个整数 k,你需要找到该数组中和为 k 的连续的子数组的个数。
说明 :
数组的长度为 [1, 20,000]。
数组中元素的范围是 [-1000, 1000] ,且整数 k 的范围是 [-1e7, 1e7]。
'''
from typing import List
from collections import defaultdict
'''
思路:前缀和+哈希
依次从左到右计算前缀和,如果前缀和presum = k,则满足要求的子数组数量ans+1
如果以往的子数组前缀和等于presum-k,因为以往的子数组是从0..x,而当前前缀和是从0..i,i>x,必然有当前子数组前缀和减去... | 24.309524 | 84 | 0.63761 | 127 | 1,021 | 5.125984 | 0.606299 | 0.032258 | 0.02765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.047497 | 0.237023 | 1,021 | 41 | 85 | 24.902439 | 0.78819 | 0.184133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.117647 | 0 | 0.294118 | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6f2ad180c13071a9741435f918fec8c6729ea8e | 5,139 | py | Python | xclim/testing/tests/test_sdba/diagnostics.py | Ouranosinc/hailstorm | 494c850164a9f553eeeba66c6cc90fe398eb2094 | [
"Apache-2.0"
] | 1 | 2018-08-20T16:36:40.000Z | 2018-08-20T16:36:40.000Z | xclim/testing/tests/test_sdba/diagnostics.py | Ouranosinc/hailstorm | 494c850164a9f553eeeba66c6cc90fe398eb2094 | [
"Apache-2.0"
] | 3 | 2018-08-23T13:25:47.000Z | 2018-08-23T15:59:45.000Z | xclim/testing/tests/test_sdba/diagnostics.py | Ouranosinc/hailstorm | 494c850164a9f553eeeba66c6cc90fe398eb2094 | [
"Apache-2.0"
] | null | null | null | # noqa: D205,D400
"""
SDBA Diagnostic Testing Module
==============================
This module is meant to compare results with those expected from papers, or create figures illustrating the
behavior of sdba methods and utilities.
"""
from __future__ import annotations
import numpy as np
from scipy.stats import gaus... | 32.11875 | 111 | 0.628916 | 743 | 5,139 | 4.236878 | 0.277254 | 0.020013 | 0.028907 | 0.030496 | 0.286531 | 0.212834 | 0.163596 | 0.109276 | 0.076874 | 0.029225 | 0 | 0.030148 | 0.19965 | 5,139 | 159 | 112 | 32.320755 | 0.73523 | 0.134851 | 0 | 0.119266 | 0 | 0 | 0.099226 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.027523 | false | 0 | 0.06422 | 0 | 0.119266 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6f3823a31297d998087dce38ce8e2ef8a8e0fab | 648 | py | Python | tests/benchmarks/test_dbbench.py | leroyjvargis/workflows | 4d5c3a11c678c10cd0c8b7e043f66e4e62cc790b | [
"Apache-2.0"
] | 558 | 2020-04-27T12:05:39.000Z | 2022-03-28T15:20:22.000Z | tests/benchmarks/test_dbbench.py | leroyjvargis/workflows | 4d5c3a11c678c10cd0c8b7e043f66e4e62cc790b | [
"Apache-2.0"
] | 103 | 2020-04-27T21:44:55.000Z | 2022-03-29T21:36:10.000Z | tests/benchmarks/test_dbbench.py | leroyjvargis/workflows | 4d5c3a11c678c10cd0c8b7e043f66e4e62cc790b | [
"Apache-2.0"
] | 61 | 2020-04-22T11:02:14.000Z | 2022-03-14T19:32:17.000Z | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2021 Micron Technology, Inc. All rights reserved.
from pathlib import Path
from tools.dbbench import DBbenchTest
name = Path(__file__).stem
cli_params = "--num=900000000 --threads=32 --value_size=400"
cmdlist = [
f"--benchmarks=fillseq {cli_params} --histog... | 32.4 | 92 | 0.723765 | 88 | 648 | 5.147727 | 0.556818 | 0.099338 | 0.15894 | 0.16777 | 0.377483 | 0.377483 | 0.377483 | 0.300221 | 0.300221 | 0.216336 | 0 | 0.047038 | 0.114198 | 648 | 19 | 93 | 34.105263 | 0.74216 | 0.152778 | 0 | 0 | 0 | 0 | 0.563303 | 0.13578 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f6f4cecab3f86f240ef8bcd0d1c2f63037857663 | 910 | py | Python | API/main/migrations/0006_auto_20200414_0908.py | Ju99ernaut/grapeflowAPI | 0d6599775e5b666ad735160b65262624fea0bf99 | [
"MIT"
] | null | null | null | API/main/migrations/0006_auto_20200414_0908.py | Ju99ernaut/grapeflowAPI | 0d6599775e5b666ad735160b65262624fea0bf99 | [
"MIT"
] | null | null | null | API/main/migrations/0006_auto_20200414_0908.py | Ju99ernaut/grapeflowAPI | 0d6599775e5b666ad735160b65262624fea0bf99 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-04-14 07:08
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0005_auto_20200413_2105'),
]
operations = [
migrations.AlterField(
model_name='block',
... | 30.333333 | 113 | 0.60989 | 100 | 910 | 5.46 | 0.39 | 0.07326 | 0.102564 | 0.161172 | 0.600733 | 0.600733 | 0.600733 | 0.600733 | 0.600733 | 0.600733 | 0 | 0.050222 | 0.256044 | 910 | 29 | 114 | 31.37931 | 0.756278 | 0.049451 | 0 | 0.521739 | 1 | 0 | 0.117034 | 0.026651 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.086957 | 0 | 0.217391 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f6f56cdb2070cf0bbc1d4d28c70e844d719585b1 | 4,973 | py | Python | models/general_modules.py | zlijingtao/DAC20_reconstruction | c928cda1c8e492c05110d6c219c1ed529924e127 | [
"Apache-2.0"
] | 2 | 2021-03-13T19:27:04.000Z | 2021-11-17T17:14:19.000Z | models/general_modules.py | zlijingtao/DAC20_reconstruction | c928cda1c8e492c05110d6c219c1ed529924e127 | [
"Apache-2.0"
] | null | null | null | models/general_modules.py | zlijingtao/DAC20_reconstruction | c928cda1c8e492c05110d6c219c1ed529924e127 | [
"Apache-2.0"
] | null | null | null | import torch
import pdb
import torch.nn as nn
import torch.nn.functional as F
import math
from torch.autograd import Variable
from torch.autograd import Function
import numpy as np
def get_centroid(input, grain_size, num_bits, M2D):
if len(input.size()) == 2:
print(input.size())
print(grain_size)
... | 42.87069 | 164 | 0.658958 | 702 | 4,973 | 4.428775 | 0.159544 | 0.08395 | 0.035381 | 0.041171 | 0.487617 | 0.436475 | 0.413959 | 0.388871 | 0.357993 | 0.357993 | 0 | 0.025424 | 0.216972 | 4,973 | 115 | 165 | 43.243478 | 0.772984 | 0.013875 | 0 | 0.37 | 0 | 0 | 0.034068 | 0.011628 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.08 | 0 | 0.28 | 0.05 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6f5d0ec88d14c10c0ac57ddb348fc636518d866 | 2,133 | py | Python | public_html/API/newuser.py | jlambert23/COP4331 | 49ae9563d596d16d0aaa2095da43047f353b052c | [
"MIT"
] | null | null | null | public_html/API/newuser.py | jlambert23/COP4331 | 49ae9563d596d16d0aaa2095da43047f353b052c | [
"MIT"
] | null | null | null | public_html/API/newuser.py | jlambert23/COP4331 | 49ae9563d596d16d0aaa2095da43047f353b052c | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# coding: utf-8
import util
print("Content-Type: application/json\n\n")
def newuser(jsonPayload):
import pymysql
try:
firstname = jsonPayload['firstname']
lastname = jsonPayload['lastname']
username = jsonPayload['username']
password = jsonPayload['p... | 33.328125 | 168 | 0.591655 | 225 | 2,133 | 5.586667 | 0.475556 | 0.039777 | 0.071599 | 0.052506 | 0.060461 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003289 | 0.287389 | 2,133 | 63 | 169 | 33.857143 | 0.823684 | 0.167839 | 0 | 0.311111 | 0 | 0.022222 | 0.209394 | 0.036786 | 0 | 0 | 0 | 0 | 0 | 1 | 0.022222 | false | 0.066667 | 0.088889 | 0 | 0.2 | 0.022222 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
f6f61c548dca85e9fb4e47a43a333094a78bec72 | 1,816 | py | Python | kws_streaming/layers/preemphasis_test.py | egonrian/google-research | 8177adbe9ca0d7e5a9463b54581fe6dd27be0974 | [
"Apache-2.0"
] | 3 | 2021-01-18T04:46:49.000Z | 2021-03-05T09:21:40.000Z | kws_streaming/layers/preemphasis_test.py | JustinDurham/google-research | 9049acf9246c1b75170f0c6757e62a8f619a9db6 | [
"Apache-2.0"
] | 25 | 2020-07-25T08:53:09.000Z | 2022-03-12T00:43:02.000Z | kws_streaming/layers/preemphasis_test.py | JustinDurham/google-research | 9049acf9246c1b75170f0c6757e62a8f619a9db6 | [
"Apache-2.0"
] | 4 | 2021-02-08T10:25:45.000Z | 2021-04-17T14:46:26.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# 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 applicab... | 31.859649 | 74 | 0.736233 | 261 | 1,816 | 5 | 0.498084 | 0.045977 | 0.068966 | 0.050575 | 0.052107 | 0.052107 | 0 | 0 | 0 | 0 | 0 | 0.019282 | 0.171806 | 1,816 | 56 | 75 | 32.428571 | 0.848404 | 0.417952 | 0 | 0 | 0 | 0 | 0.007729 | 0 | 0 | 0 | 0 | 0 | 0.04 | 1 | 0.04 | false | 0 | 0.2 | 0 | 0.28 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6f7ca029395167d19947b07a6906680c9c59669 | 1,430 | py | Python | pymobiledevice3/services/dtfetchsymbols.py | iOSForensics/pymobiledevice3 | 6b148f4e58cc51cb44c18935913a3e6cec5b60d5 | [
"MIT"
] | 1 | 2022-01-20T16:53:15.000Z | 2022-01-20T16:53:15.000Z | pymobiledevice3/services/dtfetchsymbols.py | iOSForensics/pymobiledevice3 | 6b148f4e58cc51cb44c18935913a3e6cec5b60d5 | [
"MIT"
] | null | null | null | pymobiledevice3/services/dtfetchsymbols.py | iOSForensics/pymobiledevice3 | 6b148f4e58cc51cb44c18935913a3e6cec5b60d5 | [
"MIT"
] | null | null | null | import logging
import struct
import typing
from pymobiledevice3.exceptions import PyMobileDevice3Exception
from pymobiledevice3.lockdown import LockdownClient
class DtFetchSymbols(object):
SERVICE_NAME = 'com.apple.dt.fetchsymbols'
MAX_CHUNK = 1024 * 1024 * 10 # 10MB
CMD_LIST_FILES_PLIST = struct.pack('... | 31.777778 | 74 | 0.665734 | 173 | 1,430 | 5.312139 | 0.416185 | 0.047878 | 0.035909 | 0.062024 | 0.065288 | 0.065288 | 0 | 0 | 0 | 0 | 0 | 0.026268 | 0.227972 | 1,430 | 44 | 75 | 32.5 | 0.806159 | 0.024476 | 0 | 0 | 0 | 0 | 0.04454 | 0.01796 | 0 | 0 | 0.007184 | 0 | 0 | 1 | 0.125 | false | 0 | 0.15625 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6f7e4d65e58a6c7d423140cc20d3150a2eb357b | 4,460 | py | Python | contrib/samples/python/read_register.py | nanocortex/vscp | 0b1a51a35a886921179a8112c592547f84c9771a | [
"CC-BY-3.0"
] | null | null | null | contrib/samples/python/read_register.py | nanocortex/vscp | 0b1a51a35a886921179a8112c592547f84c9771a | [
"CC-BY-3.0"
] | null | null | null | contrib/samples/python/read_register.py | nanocortex/vscp | 0b1a51a35a886921179a8112c592547f84c9771a | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
"""
Read registers from a node connected to the vscp daemon.
This module can be used to test the speed of the register update.
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foun... | 27.875 | 94 | 0.613453 | 631 | 4,460 | 4.242472 | 0.309033 | 0.044826 | 0.035861 | 0.053792 | 0.279417 | 0.239074 | 0.206201 | 0.162495 | 0.162495 | 0.162495 | 0 | 0.021759 | 0.2787 | 4,460 | 159 | 95 | 28.050314 | 0.810382 | 0.088341 | 0 | 0.235955 | 0 | 0 | 0.141522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.044944 | null | null | 0.146067 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f6fa50ab9078aecf83c16af63647f98d64bc3aa7 | 106 | py | Python | super_material/__init__.py | pleroux0/super_material | b64d74afdeab7639dd1b220f8b23ade22d87c481 | [
"BSD-2-Clause"
] | 3 | 2020-10-20T00:37:59.000Z | 2021-07-17T12:59:52.000Z | super_material/__init__.py | pleroux0/super_material | b64d74afdeab7639dd1b220f8b23ade22d87c481 | [
"BSD-2-Clause"
] | null | null | null | super_material/__init__.py | pleroux0/super_material | b64d74afdeab7639dd1b220f8b23ade22d87c481 | [
"BSD-2-Clause"
] | 2 | 2020-10-02T14:31:07.000Z | 2021-08-15T10:00:29.000Z | __version__ = "1.0.0a"
__author__ = "Paul le Roux"
from .conductivity import *
from .gap_energy import *
| 17.666667 | 27 | 0.726415 | 15 | 106 | 4.533333 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033708 | 0.160377 | 106 | 5 | 28 | 21.2 | 0.730337 | 0 | 0 | 0 | 0 | 0 | 0.169811 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
f6fa9a5372f0502aa133f9af6ac549155abd19ad | 1,939 | py | Python | api/data_pipeline_api.py | sodalic/SpaceBlobCollector-backend | feeff8bf351c730b31cbfe7cddc26b7533a47b59 | [
"BSD-3-Clause"
] | null | null | null | api/data_pipeline_api.py | sodalic/SpaceBlobCollector-backend | feeff8bf351c730b31cbfe7cddc26b7533a47b59 | [
"BSD-3-Clause"
] | null | null | null | api/data_pipeline_api.py | sodalic/SpaceBlobCollector-backend | feeff8bf351c730b31cbfe7cddc26b7533a47b59 | [
"BSD-3-Clause"
] | null | null | null | import os
from flask import Blueprint, flash, redirect, abort
from database.study_models import Study
from libs.admin_authentication import authenticate_admin_study_access
from libs.sentry import make_error_sentry
from pipeline.boto_helpers import get_boto_client
from pipeline.configuration_getters import get... | 43.088889 | 96 | 0.738009 | 260 | 1,939 | 5.246154 | 0.415385 | 0.048387 | 0.028592 | 0.041056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001896 | 0.184116 | 1,939 | 44 | 97 | 44.068182 | 0.860303 | 0.141826 | 0 | 0 | 0 | 0 | 0.157825 | 0.022546 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.285714 | null | null | 0.107143 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f6faf53f3fd09e7ab28a9081de0a8f0200d7ee62 | 22,106 | py | Python | Data/FrackFinder/PA/2005-2010/Transformations_and_QAQC/MoorFrog/bin/task2shp.py | SkyTruth/CrowdProjects | eede4c97ca5195d8ad39ce353c962f588e52c6ad | [
"BSD-3-Clause"
] | 2 | 2015-05-23T06:57:32.000Z | 2016-08-21T17:50:32.000Z | Data/FrackFinder/PA/2013/Transformations_and_QAQC/MoorFrog/bin/task2shp.py | SkyTruth/CrowdProjects | eede4c97ca5195d8ad39ce353c962f588e52c6ad | [
"BSD-3-Clause"
] | 25 | 2015-01-08T16:00:08.000Z | 2017-05-04T17:37:23.000Z | Data/FrackFinder/PA/2013/Transformations_and_QAQC/MoorFrog/bin/task2shp.py | SkyTruth/CrowdProjects | eede4c97ca5195d8ad39ce353c962f588e52c6ad | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# This document is part of CrowdProjects
# https://github.com/skytruth/CrowdProjects
# =========================================================================== #
#
# Copyright (c) 2014, SkyTruth
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without... | 32.79822 | 117 | 0.566453 | 2,510 | 22,106 | 4.846215 | 0.159363 | 0.020388 | 0.010852 | 0.009865 | 0.518908 | 0.462759 | 0.434725 | 0.422065 | 0.399457 | 0.390579 | 0 | 0.007897 | 0.24957 | 22,106 | 673 | 118 | 32.846954 | 0.72536 | 0.272958 | 0 | 0.305085 | 0 | 0 | 0.274899 | 0.004216 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025424 | false | 0.002825 | 0.031073 | 0 | 0.096045 | 0.166667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6fb2d87aa49248212178e1f5ae0d3607c06265f | 561 | py | Python | tools/send_message_telegram.py | lucasayres/python-tools | 686b84986aae1b1714fa5645b1f2a3fd6ef8355d | [
"MIT"
] | 71 | 2018-06-28T17:38:15.000Z | 2022-02-08T17:42:42.000Z | tools/send_message_telegram.py | DalavanCloud/python-tools | 686b84986aae1b1714fa5645b1f2a3fd6ef8355d | [
"MIT"
] | null | null | null | tools/send_message_telegram.py | DalavanCloud/python-tools | 686b84986aae1b1714fa5645b1f2a3fd6ef8355d | [
"MIT"
] | 14 | 2018-07-08T03:29:29.000Z | 2022-03-22T21:04:39.000Z | # -*- coding: utf-8 -*-
import requests
def send_message_telegram(msg, chat_id, token):
"""Send a message to a telegram user. The token can be generated talking with @BotFather on telegram.
Args:
msg (str): Message.
chat_id (str): Number.
token (str): Authentication Key.
Returns:... | 28.05 | 120 | 0.641711 | 71 | 561 | 4.985915 | 0.633803 | 0.067797 | 0.050847 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00463 | 0.229947 | 561 | 19 | 121 | 29.526316 | 0.814815 | 0.475936 | 0 | 0 | 1 | 0 | 0.228682 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
f6fcf35ed47156314011ed648fe26e929556a6f5 | 354 | py | Python | python-tutorial/consumer/main.py | twissmueller/event-driven-architectures | d3b37c87dcee6db096eaecbe90feb90d5429ebfc | [
"MIT"
] | 16 | 2021-11-14T22:30:13.000Z | 2022-03-28T11:33:04.000Z | python-tutorial/consumer/main.py | twissmueller/event-driven-architectures | d3b37c87dcee6db096eaecbe90feb90d5429ebfc | [
"MIT"
] | null | null | null | python-tutorial/consumer/main.py | twissmueller/event-driven-architectures | d3b37c87dcee6db096eaecbe90feb90d5429ebfc | [
"MIT"
] | 7 | 2021-11-18T15:37:43.000Z | 2022-03-18T12:52:58.000Z | from kafka import KafkaConsumer
import json
from TimestampEvent import TimestampEvent
consumer = KafkaConsumer('timestamp', bootstrap_servers='localhost:9092', value_deserializer=lambda x: json.loads(x.decode('utf-8')))
for message in consumer:
timestampEvent = TimestampEvent(**(message.value))
print("Receiv... | 32.181818 | 133 | 0.782486 | 39 | 354 | 7.051282 | 0.641026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015873 | 0.110169 | 354 | 10 | 134 | 35.4 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0.107345 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
f6ff6690850f8c8bea40662924c37c303210909d | 4,133 | py | Python | dnppy/raster/degree_days.py | NASA-DEVELOP/dnppy | 8f7ef6f0653f5a4ea730ee557c72a2c89c06ce0b | [
"NASA-1.3"
] | 65 | 2015-09-10T12:59:56.000Z | 2022-02-27T22:09:03.000Z | dnppy/raster/degree_days.py | snowzm/dnppy | 8f7ef6f0653f5a4ea730ee557c72a2c89c06ce0b | [
"NASA-1.3"
] | 40 | 2015-04-08T19:23:30.000Z | 2015-08-04T15:53:11.000Z | dnppy/raster/degree_days.py | snowzm/dnppy | 8f7ef6f0653f5a4ea730ee557c72a2c89c06ce0b | [
"NASA-1.3"
] | 45 | 2015-08-14T19:09:38.000Z | 2022-02-15T18:53:16.000Z |
__all__ = ["degree_days"]
from to_numpy import to_numpy
from from_numpy import from_numpy
import numpy
def degree_days(T_base, Max, Min, NoData_Value, outpath = False, roof = False, floor = False):
"""
Inputs rasters for maximum and minimum temperatures, calculates Growing Degree Days
this function is ... | 36.575221 | 102 | 0.625696 | 593 | 4,133 | 4.305228 | 0.325464 | 0.011751 | 0.010576 | 0.015276 | 0.057971 | 0.032902 | 0 | 0 | 0 | 0 | 0 | 0.004197 | 0.308251 | 4,133 | 112 | 103 | 36.901786 | 0.888772 | 0.527704 | 0 | 0.170213 | 0 | 0 | 0.068145 | 0 | 0 | 0 | 0 | 0.008929 | 0 | 1 | 0.021277 | false | 0 | 0.06383 | 0 | 0.12766 | 0.06383 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
f6ffa1917b189d918c11e4522a284e7cf9b7bbb8 | 564 | py | Python | dsvfile/Models/Planets/VeinData.py | phoenixx-666/dsvread | 8a073c12343b2f0d34f9b728282dfefe10999f24 | [
"MIT"
] | 2 | 2021-03-01T19:57:20.000Z | 2021-08-02T20:54:48.000Z | dsvfile/Models/Planets/VeinData.py | phoenixx-666/dsvread | 8a073c12343b2f0d34f9b728282dfefe10999f24 | [
"MIT"
] | null | null | null | dsvfile/Models/Planets/VeinData.py | phoenixx-666/dsvread | 8a073c12343b2f0d34f9b728282dfefe10999f24 | [
"MIT"
] | null | null | null | from ...Fields import UInt8Field, Int16Field
from ...Fields.Enums import EVeinType16
from . import Model, Int32Field, FloatField
class VeinData(Model):
version = UInt8Field()
id = Int32Field()
veinType = EVeinType16()
modelIndex = Int16Field()
groupIndex = Int16Field()
amount = Int32Field()
... | 25.636364 | 44 | 0.675532 | 51 | 564 | 7.411765 | 0.54902 | 0.05291 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077273 | 0.219858 | 564 | 21 | 45 | 26.857143 | 0.781818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.157895 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
f6ffc84dd73dd6770247f6b84eac07007bd98522 | 3,277 | py | Python | code/Model/baselines/sentence-level-models/models/lstm.py | INK-USC/DS-RelationExtraction | eebcfa7fd2eda5bba92f3ef8158797cdf91e6981 | [
"MIT"
] | 156 | 2018-10-09T09:01:42.000Z | 2019-12-25T09:07:47.000Z | code/Model/baselines/sentence-level-models/models/lstm.py | pengdada98/USC-DS-RelationExtraction | eebcfa7fd2eda5bba92f3ef8158797cdf91e6981 | [
"MIT"
] | 10 | 2018-10-12T11:54:58.000Z | 2019-10-11T03:29:20.000Z | code/Model/baselines/sentence-level-models/models/lstm.py | pengdada98/USC-DS-RelationExtraction | eebcfa7fd2eda5bba92f3ef8158797cdf91e6981 | [
"MIT"
] | 64 | 2016-11-04T16:03:03.000Z | 2018-07-20T18:03:00.000Z | __author__ = 'Maosen'
import torch
import torch.nn as nn
import torch.nn.functional as F
import utils
from utils import pos2id, ner2id
import sys
from tqdm import tqdm
class LSTM(nn.Module):
def __init__(self, args, rel2id, word_emb=None):
super(LSTM, self).__init__()
# arguments
hidden, vocab_size, emb_dim, po... | 33.10101 | 122 | 0.728715 | 541 | 3,277 | 4.15342 | 0.216266 | 0.034268 | 0.026702 | 0.026702 | 0.207833 | 0.17312 | 0.131286 | 0.085892 | 0.085892 | 0.074766 | 0 | 0.01602 | 0.142814 | 3,277 | 98 | 123 | 33.438776 | 0.783909 | 0.172414 | 0 | 0 | 0 | 0 | 0.00223 | 0 | 0 | 0 | 0 | 0 | 0.016667 | 1 | 0.033333 | false | 0 | 0.116667 | 0 | 0.183333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1000dfbbd035c312db7ff448296e00fba1a7cd5e | 898 | py | Python | backend/ocr_core/config.py | WestonLu/chinese-ocr | d27bf720a47b9bf3aae6f306c94bad0a36056e56 | [
"MIT"
] | 1 | 2022-02-23T09:22:39.000Z | 2022-02-23T09:22:39.000Z | backend/ocr_core/config.py | luxu1220/chinese-ocr | d27bf720a47b9bf3aae6f306c94bad0a36056e56 | [
"MIT"
] | null | null | null | backend/ocr_core/config.py | luxu1220/chinese-ocr | d27bf720a47b9bf3aae6f306c94bad0a36056e56 | [
"MIT"
] | null | null | null | import os
filt_path = os.path.abspath(__file__)
father_path = os.path.abspath(os.path.dirname(filt_path) + os.path.sep + ".")
GPU_ID = "cpu"
dbnet_short_size = 960
det_model_type = "dbnet"
pse_scale = 1
model_path = os.path.join(father_path, "models/dbnet.onnx")
# crnn相关
nh = 256
crnn_vertical_model_path = os.path.... | 28.967742 | 80 | 0.671492 | 129 | 898 | 4.372093 | 0.48062 | 0.085106 | 0.124113 | 0.106383 | 0.262411 | 0.262411 | 0.262411 | 0.262411 | 0.138298 | 0 | 0 | 0.034341 | 0.18931 | 898 | 30 | 81 | 29.933333 | 0.740385 | 0.05902 | 0 | 0 | 0 | 0 | 0.210714 | 0.072619 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.047619 | 0 | 0.047619 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1001fbdf815fe1e81a9f259621fa2deb092ac084 | 1,265 | py | Python | src/merge_csv/merge_files.py | JoaquimXG/csv-merge | 2d0430b6dfe5ecb69e9bc18ba58b45678515cc69 | [
"MIT"
] | null | null | null | src/merge_csv/merge_files.py | JoaquimXG/csv-merge | 2d0430b6dfe5ecb69e9bc18ba58b45678515cc69 | [
"MIT"
] | null | null | null | src/merge_csv/merge_files.py | JoaquimXG/csv-merge | 2d0430b6dfe5ecb69e9bc18ba58b45678515cc69 | [
"MIT"
] | null | null | null | import pandas as pd
import logging
from .validate_options import validate_options
from .merge_dataframes import merge_dataframes_multiple_columns, merge_dataframes_single_column
def merge_files(left_file: str, right_file: str, columns: list, keep: str = 'none', keep_missing: str = 'none') -> pd.DataFrame:
"""
... | 39.53125 | 153 | 0.705929 | 177 | 1,265 | 4.858757 | 0.378531 | 0.087209 | 0.069767 | 0.069767 | 0.146512 | 0.146512 | 0.146512 | 0.081395 | 0.081395 | 0 | 0 | 0.001961 | 0.193676 | 1,265 | 32 | 154 | 39.53125 | 0.841176 | 0.371542 | 0 | 0 | 0 | 0 | 0.02961 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.285714 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1003af35da2655e5a0344e4ff2fe9e380b14c2cd | 993 | py | Python | app/migrations/0007_auto_20210701_0434.py | Divyanshukalola/Alchemeo | fd32b47450eb2fea9f1bdf4a2f253e5655aca1d4 | [
"MIT"
] | null | null | null | app/migrations/0007_auto_20210701_0434.py | Divyanshukalola/Alchemeo | fd32b47450eb2fea9f1bdf4a2f253e5655aca1d4 | [
"MIT"
] | null | null | null | app/migrations/0007_auto_20210701_0434.py | Divyanshukalola/Alchemeo | fd32b47450eb2fea9f1bdf4a2f253e5655aca1d4 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.10 on 2021-07-01 04:34
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0006_auto_20210701_0346'),
]
operations = [
migrations.AddField(
model_name='invoice',
name=... | 33.1 | 152 | 0.624371 | 112 | 993 | 5.419643 | 0.482143 | 0.09061 | 0.052718 | 0.065898 | 0.405272 | 0.31631 | 0.233937 | 0.233937 | 0.233937 | 0.233937 | 0 | 0.093243 | 0.254783 | 993 | 29 | 153 | 34.241379 | 0.727027 | 0.046324 | 0 | 0.304348 | 1 | 0 | 0.156614 | 0.024339 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.086957 | 0 | 0.217391 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
1003e56d44ba3bab8c9e2c86a4f9e739125ecbf8 | 1,231 | py | Python | dataset/file_table.py | hb-stone/FC-SOD | 1e084dde0d5bde4e90f633390ee74cbffdd67e76 | [
"MIT"
] | 12 | 2020-09-27T04:46:25.000Z | 2021-06-14T00:47:56.000Z | dataset/file_table.py | hb-stone/FC-SOD | 1e084dde0d5bde4e90f633390ee74cbffdd67e76 | [
"MIT"
] | 2 | 2021-06-15T11:03:31.000Z | 2021-09-17T01:02:00.000Z | dataset/file_table.py | hb-stone/FC-SOD | 1e084dde0d5bde4e90f633390ee74cbffdd67e76 | [
"MIT"
] | 1 | 2021-06-14T00:48:01.000Z | 2021-06-14T00:48:01.000Z | import os
from typing import Dict
from os.path import join as pathjoin
__ALL__ = ['get_dataset_path_by_name']
def get_dataset_path_by_name(dataset_name:str) -> Dict[str, str]:
root_dir = os.path.dirname(__file__)
if dataset_name not in "DUT-OMRON DUTS PASCAL-S SOD".split(" "):
raise NameError(f"the da... | 34.194444 | 75 | 0.718115 | 191 | 1,231 | 4.120419 | 0.240838 | 0.088945 | 0.076239 | 0.081321 | 0.448539 | 0.268107 | 0.083863 | 0 | 0 | 0 | 0 | 0 | 0.190902 | 1,231 | 35 | 76 | 35.171429 | 0.790161 | 0 | 0 | 0 | 0 | 0 | 0.122665 | 0.019496 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032258 | false | 0 | 0.129032 | 0 | 0.193548 | 0.096774 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1004ca4b7ce19372568058fbfdce28896aab01a3 | 961 | py | Python | ICS 101/Xmisc/week5_ex/permutation_example.py | herambchaudhari4121/NYU_Shanghai_CS | 27c73242a77348af273683f2756e6960f60126fd | [
"MIT"
] | null | null | null | ICS 101/Xmisc/week5_ex/permutation_example.py | herambchaudhari4121/NYU_Shanghai_CS | 27c73242a77348af273683f2756e6960f60126fd | [
"MIT"
] | null | null | null | ICS 101/Xmisc/week5_ex/permutation_example.py | herambchaudhari4121/NYU_Shanghai_CS | 27c73242a77348af273683f2756e6960f60126fd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 9 16:46:40 2021
@author: bing
"""
import copy
## The code only works for lists without repeated elements
def permute(nums, node=[], permutations=[]):
if len(node)==len(nums):
permutations.append(node[:])
return
for n in ... | 20.891304 | 58 | 0.532778 | 119 | 961 | 4.235294 | 0.478992 | 0.130952 | 0.095238 | 0.160714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.050147 | 0.294485 | 961 | 45 | 59 | 21.355556 | 0.693215 | 0.414152 | 0 | 0 | 0 | 0 | 0.037175 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.058824 | 0 | 0.235294 | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
1005b0ab01949ad9cd001c97ae464c7d77e2b32d | 1,579 | py | Python | catkin/src/distributed_robot_system/src/nodes/webcam_main.py | samuelwestlake/Multi-Tier-Robot-System | 93664413e68ac2080958527149729bd6b63429b5 | [
"MIT"
] | null | null | null | catkin/src/distributed_robot_system/src/nodes/webcam_main.py | samuelwestlake/Multi-Tier-Robot-System | 93664413e68ac2080958527149729bd6b63429b5 | [
"MIT"
] | null | null | null | catkin/src/distributed_robot_system/src/nodes/webcam_main.py | samuelwestlake/Multi-Tier-Robot-System | 93664413e68ac2080958527149729bd6b63429b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import cv2
import rospy
import numpy as np
from sensor_msgs.msg import CompressedImage
class CameraNode(object):
def __init__(self, camera=0, nb=0, buggy_nb=0, node_name="camera_node"):
self.vc = cv2.VideoCapture(camera) # Initialise instance of... | 45.114286 | 118 | 0.50855 | 156 | 1,579 | 5 | 0.512821 | 0.023077 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014831 | 0.402153 | 1,579 | 34 | 119 | 46.441176 | 0.811441 | 0.158961 | 0 | 0 | 0 | 0 | 0.030395 | 0 | 0 | 0 | 0.00304 | 0 | 0 | 1 | 0.074074 | false | 0 | 0.148148 | 0 | 0.259259 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1007a20dabb4322c12f531ddcead5c7ccd4b2801 | 680 | py | Python | src/image.py | adamsh25/RE | 99c631ba2049c0ba86357a3148a8442a5fd8ec0e | [
"MIT"
] | 105 | 2017-01-02T18:32:01.000Z | 2021-11-09T11:23:50.000Z | src/image.py | scvalencia/MNIST_ASCCI_challenge | 60f7880f2d5aebe2420b472a4af7c7f2e0ee9c45 | [
"MIT"
] | null | null | null | src/image.py | scvalencia/MNIST_ASCCI_challenge | 60f7880f2d5aebe2420b472a4af7c7f2e0ee9c45 | [
"MIT"
] | 24 | 2017-01-03T13:03:56.000Z | 2017-10-25T02:27:45.000Z | import cv2
import numpy
def write_MNIST_files():
file_object = open('../data/data.csv', 'r')
file_object.readline()
counters = {_ : 0 for _ in range(10)}
folders = {
0 : 'zero', 1 : 'one', 2 : 'two', 3 : 'three',
4 : 'four', 5 : 'five', 6 : 'six', 7 : 'seven',
8 : 'eight', 9 : 'nine'
}
for line in fil... | 24.285714 | 97 | 0.607353 | 96 | 680 | 4.177083 | 0.604167 | 0.099751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.039927 | 0.189706 | 680 | 28 | 98 | 24.285714 | 0.68784 | 0 | 0 | 0 | 0 | 0 | 0.117474 | 0 | 0.052632 | 0 | 0 | 0 | 0 | 1 | 0.052632 | false | 0 | 0.105263 | 0 | 0.157895 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1007f65a17fe2339f5dd2b0454b47b5dab03d134 | 1,119 | py | Python | tests/test_blog.py | derrokip34/Blog | ec6d6acb0c69ea42a8ea99c6836d943ad7417984 | [
"MIT"
] | null | null | null | tests/test_blog.py | derrokip34/Blog | ec6d6acb0c69ea42a8ea99c6836d943ad7417984 | [
"MIT"
] | null | null | null | tests/test_blog.py | derrokip34/Blog | ec6d6acb0c69ea42a8ea99c6836d943ad7417984 | [
"MIT"
] | null | null | null | import unittest
from app.models import Blog,User
from flask_login import current_user
from app import db
class TestBlogs(unittest.TestCase):
def setUp(self):
self.user_Derrick = User(username="derrokip34",password="zlatan",email="derrokip@gmail.com")
self.new_blog = Blog(blog_title="Batman",blog_c... | 34.96875 | 122 | 0.702413 | 158 | 1,119 | 4.78481 | 0.360759 | 0.074074 | 0.116402 | 0.079365 | 0.320106 | 0.195767 | 0 | 0 | 0 | 0 | 0 | 0.004334 | 0.175156 | 1,119 | 32 | 123 | 34.96875 | 0.814735 | 0 | 0 | 0.08 | 0 | 0 | 0.075 | 0 | 0 | 0 | 0 | 0 | 0.28 | 1 | 0.24 | false | 0.04 | 0.16 | 0 | 0.44 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
100958354158b69adde8e070d9d2162cbbf77d9f | 5,196 | py | Python | pyzscaler/zia/__init__.py | mitchos/pyZscaler | c4c83345bf26e2883b9555d20a90f9387a45e05e | [
"MIT"
] | 16 | 2021-07-09T00:20:31.000Z | 2022-02-17T19:29:26.000Z | pyzscaler/zia/__init__.py | mitchos/pyZscaler | c4c83345bf26e2883b9555d20a90f9387a45e05e | [
"MIT"
] | 62 | 2021-07-21T03:42:09.000Z | 2022-03-18T09:08:20.000Z | pyzscaler/zia/__init__.py | mitchos/pyZscaler | c4c83345bf26e2883b9555d20a90f9387a45e05e | [
"MIT"
] | 8 | 2021-09-11T08:14:53.000Z | 2022-03-25T20:14:41.000Z | import os
from restfly.session import APISession
from pyzscaler import __version__
from .admin_and_role_management import AdminAndRoleManagementAPI
from .audit_logs import AuditLogsAPI
from .config import ActivationAPI
from .dlp import DLPAPI
from .firewall import FirewallPolicyAPI
from .locations import LocationsAP... | 27.935484 | 117 | 0.645497 | 586 | 5,196 | 5.578498 | 0.206485 | 0.050474 | 0.073417 | 0.100948 | 0.198226 | 0.185378 | 0.160905 | 0.160905 | 0.046497 | 0 | 0 | 0.000775 | 0.255004 | 5,196 | 185 | 118 | 28.086486 | 0.84371 | 0.324673 | 0 | 0.166667 | 0 | 0 | 0.08141 | 0.030769 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0.022222 | 0.2 | 0 | 0.7 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
100a065e4d36bdc98eb6cfcabc84b98767d44b90 | 2,769 | py | Python | pytorchDL/tasks/image_segmentation/evaluator.py | Milogav/PytorchDL | 39d8e40cf430113003b2e03f81951d43118dc09a | [
"MIT"
] | null | null | null | pytorchDL/tasks/image_segmentation/evaluator.py | Milogav/PytorchDL | 39d8e40cf430113003b2e03f81951d43118dc09a | [
"MIT"
] | null | null | null | pytorchDL/tasks/image_segmentation/evaluator.py | Milogav/PytorchDL | 39d8e40cf430113003b2e03f81951d43118dc09a | [
"MIT"
] | null | null | null | import os
import json
import torch
from tqdm import tqdm
from pytorchDL.tasks.image_segmentation.predictor import Predictor
from pytorchDL.tasks.image_segmentation.data import Dataset
from pytorchDL.metrics import ConfusionMatrix
class Evaluator(Predictor):
def __init__(self, test_data_dir, out_dir, ckpt_path,... | 39 | 105 | 0.625135 | 347 | 2,769 | 4.645533 | 0.334294 | 0.033499 | 0.034119 | 0.027916 | 0.133995 | 0.029777 | 0.029777 | 0 | 0 | 0 | 0 | 0.003 | 0.277718 | 2,769 | 70 | 106 | 39.557143 | 0.803 | 0 | 0 | 0 | 0 | 0 | 0.116287 | 0.075117 | 0 | 0 | 0 | 0 | 0 | 1 | 0.037736 | false | 0 | 0.132075 | 0 | 0.188679 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
100a542603a26516265165b7195f68b21242cd95 | 2,457 | py | Python | script.module.urlresolver/lib/urlresolver/plugins/youtube.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | 1 | 2019-10-16T18:38:33.000Z | 2019-10-16T18:38:33.000Z | script.module.urlresolver/lib/urlresolver/plugins/youtube.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | null | null | null | script.module.urlresolver/lib/urlresolver/plugins/youtube.py | Reapercrew666/crypt | e1e0994f5323c6b454ac0f65fb2e579f7bea8e5a | [
"Beerware"
] | null | null | null | """
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | 36.671642 | 87 | 0.63777 | 330 | 2,457 | 4.660606 | 0.427273 | 0.039012 | 0.025358 | 0.037061 | 0.16775 | 0.036411 | 0 | 0 | 0 | 0 | 0 | 0.010354 | 0.253154 | 2,457 | 66 | 88 | 37.227273 | 0.827793 | 0.278388 | 0 | 0.05 | 0 | 0 | 0.202097 | 0.076296 | 0 | 0 | 0 | 0 | 0 | 1 | 0.15 | false | 0 | 0.15 | 0.025 | 0.55 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
100ad66b5c3e9588877b9fc6e88bd19765cc8458 | 240 | py | Python | tests/wintools/test_file.py | yukkun007/wintools | df6521e91a3dc2c34e5fc599abbc4ea81dedc313 | [
"MIT"
] | null | null | null | tests/wintools/test_file.py | yukkun007/wintools | df6521e91a3dc2c34e5fc599abbc4ea81dedc313 | [
"MIT"
] | 7 | 2021-09-27T20:48:49.000Z | 2021-10-07T15:10:01.000Z | tests/wintools/test_file.py | mozkzki/wintools | df6521e91a3dc2c34e5fc599abbc4ea81dedc313 | [
"MIT"
] | null | null | null | from wintools import print_files_info, print_info
FILES = ["./tests/resources/test.iso"]
class TestFile:
def test_print_files_info(self):
print_files_info(FILES)
def test_print_info(self):
print_info("./tests")
| 18.461538 | 49 | 0.704167 | 33 | 240 | 4.787879 | 0.424242 | 0.189873 | 0.265823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1875 | 240 | 12 | 50 | 20 | 0.810256 | 0 | 0 | 0 | 0 | 0 | 0.1375 | 0.108333 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0 | 0.571429 | 0.714286 | 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 | 0 | 1 | 1 | 0 | 4 |
100c4edfc29e88d0889447b1b17515a7614789cf | 1,232 | py | Python | setup.py | Polamreddykrishnareddy/PatternPackage | 893ab468a637cd70a0dd8f6d60f7f5c75a3db58f | [
"MIT"
] | null | null | null | setup.py | Polamreddykrishnareddy/PatternPackage | 893ab468a637cd70a0dd8f6d60f7f5c75a3db58f | [
"MIT"
] | null | null | null | setup.py | Polamreddykrishnareddy/PatternPackage | 893ab468a637cd70a0dd8f6d60f7f5c75a3db58f | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="PatternPackage-Polamreddykrishnareddy",
version="0.0.1",
author="Polamreddykrishnareddy",
author_email="krishnareddy40900@gmail.com",
description="I Build the python Patt... | 45.62963 | 405 | 0.717532 | 155 | 1,232 | 5.632258 | 0.716129 | 0.068729 | 0.043528 | 0.068729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01382 | 0.17776 | 1,232 | 26 | 406 | 47.384615 | 0.847976 | 0 | 0 | 0 | 0 | 0.041667 | 0.604708 | 0.105519 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.041667 | 0.041667 | 0 | 0.041667 | 0.041667 | 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 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
100d9789f6e6312613e49c7a269082eb46397dd5 | 3,832 | py | Python | chapter21casestudy2/GuessingApp/GuessingGame/wordgenerator.py | bpbpublications/Question-Bank-for-Exam-Success-Computer-Science-with-Python-Class-XII-CBSE-083- | c2ad485b5f9b7a304d4398539770c3a5916b2248 | [
"MIT"
] | null | null | null | chapter21casestudy2/GuessingApp/GuessingGame/wordgenerator.py | bpbpublications/Question-Bank-for-Exam-Success-Computer-Science-with-Python-Class-XII-CBSE-083- | c2ad485b5f9b7a304d4398539770c3a5916b2248 | [
"MIT"
] | null | null | null | chapter21casestudy2/GuessingApp/GuessingGame/wordgenerator.py | bpbpublications/Question-Bank-for-Exam-Success-Computer-Science-with-Python-Class-XII-CBSE-083- | c2ad485b5f9b7a304d4398539770c3a5916b2248 | [
"MIT"
] | 1 | 2020-12-17T22:49:47.000Z | 2020-12-17T22:49:47.000Z | words=['about','above','abuse','actor','acute','admit','adopt','adult','after','again','agent','agree','ahead','alarm','album','alert','alike','alive','allow','alone','along','alter','among','anger','Angle','angry','apart','apple','apply','arena','argue','arise','array','aside','asset','audio','audit','avoid','award','... | 547.428571 | 3,763 | 0.626305 | 479 | 3,832 | 5.010438 | 0.995825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004436 | 3,832 | 6 | 3,764 | 638.666667 | 0.629096 | 0 | 0 | 0 | 0 | 0 | 0.613856 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.25 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 7 |
100e1407ca4bf246b1686309281c924774e73b5d | 5,548 | py | Python | setup.py | johannesnicolaus/singlecell | 8b3f5719b236fb2b9783e4d2c3b419352bb3bf6f | [
"BSD-3-Clause"
] | null | null | null | setup.py | johannesnicolaus/singlecell | 8b3f5719b236fb2b9783e4d2c3b419352bb3bf6f | [
"BSD-3-Clause"
] | null | null | null | setup.py | johannesnicolaus/singlecell | 8b3f5719b236fb2b9783e4d2c3b419352bb3bf6f | [
"BSD-3-Clause"
] | null | null | null | # import sys
import os
import io
from setuptools import setup, find_packages, Command, Extension
from os import path
root = 'singlecell'
name = 'singlecell'
version = '0.1.0'
here = path.abspath(path.dirname(__file__))
description = ('SingleCell: A Python/Cython Package for Processing '
'Single-Cell ... | 27.879397 | 75 | 0.593367 | 615 | 5,548 | 5.195122 | 0.38374 | 0.037559 | 0.056338 | 0.065728 | 0.156182 | 0.119875 | 0.063224 | 0.063224 | 0.063224 | 0.049452 | 0 | 0.017625 | 0.263699 | 5,548 | 198 | 76 | 28.020202 | 0.764504 | 0.244232 | 0 | 0.186992 | 0 | 0 | 0.316233 | 0.087669 | 0 | 0 | 0 | 0 | 0 | 1 | 0.02439 | false | 0.02439 | 0.065041 | 0 | 0.105691 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
100e34c61df61bc865eac40d88e70b3034c2db4a | 276 | py | Python | clean.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | clean.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | clean.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | def remove_punctuation(input_string):
"""Return a str with punctuation chars stripped out"""
tran_table = str.maketrans('','', '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~')
output_string = input_string.translate(tran_table)
return output_string
pass | 30.666667 | 75 | 0.594203 | 28 | 276 | 5.571429 | 0.642857 | 0.141026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.195652 | 276 | 9 | 76 | 30.666667 | 0.702703 | 0.173913 | 0 | 0 | 0 | 0 | 0.03139 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0.2 | 0 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
100ecaddb56a4114729cfb6f919f5dd51de7ee8b | 1,322 | py | Python | set1/Aes_cipher.py | arunKumarNOP/Cryptopals-Solutions | 529474679972e17566a233de110f0b47078ef3b9 | [
"MIT"
] | null | null | null | set1/Aes_cipher.py | arunKumarNOP/Cryptopals-Solutions | 529474679972e17566a233de110f0b47078ef3b9 | [
"MIT"
] | null | null | null | set1/Aes_cipher.py | arunKumarNOP/Cryptopals-Solutions | 529474679972e17566a233de110f0b47078ef3b9 | [
"MIT"
] | null | null | null | from Crypto.Cipher import AES
from Xor import xorPlain
from set2.PkcsPadding import pkcs7_pad
def decrypt_ecb(ciphertxt, key):
encryptor = AES.new(key, AES.MODE_ECB)
return encryptor.decrypt(ciphertxt)
def encrypt_ecb(plaintxt, key):
encryptor = AES.new(key, AES.MODE_ECB)
if len(plaintxt)%len(key) !... | 27.541667 | 94 | 0.658094 | 182 | 1,322 | 4.664835 | 0.285714 | 0.077739 | 0.08245 | 0.060071 | 0.336867 | 0.226148 | 0.190813 | 0.190813 | 0.117786 | 0.117786 | 0 | 0.013208 | 0.198185 | 1,322 | 47 | 95 | 28.12766 | 0.787736 | 0.05295 | 0 | 0.181818 | 0 | 0 | 0.057554 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.090909 | null | null | 0.060606 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
100f590f093322ddd66390421e6b96818ed6e651 | 1,234 | py | Python | encode/tests/test_models.py | Ircam-Web/django-encode | 2c1c9d843865ec99fb5b45631d6f08a9c7cb86ce | [
"MIT"
] | 11 | 2015-03-11T20:48:13.000Z | 2021-12-14T14:17:39.000Z | encode/tests/test_models.py | Ircam-Web/django-encode | 2c1c9d843865ec99fb5b45631d6f08a9c7cb86ce | [
"MIT"
] | 2 | 2015-11-24T22:10:06.000Z | 2017-05-26T09:27:02.000Z | encode/tests/test_models.py | Ircam-Web/django-encode | 2c1c9d843865ec99fb5b45631d6f08a9c7cb86ce | [
"MIT"
] | 2 | 2019-08-09T17:29:41.000Z | 2020-08-31T16:47:27.000Z | # Copyright Collab 2014-2016
# See LICENSE for details.
"""
Tests for the :py:mod:`encode.models` module.
"""
from __future__ import unicode_literals
from django.core.files.base import ContentFile
from encode.models import Audio, Video, EncodingProfile
from encode.tests.helpers import WEBM_DATA, FileTestCase
clas... | 27.422222 | 67 | 0.65316 | 150 | 1,234 | 5.286667 | 0.56 | 0.045397 | 0.027743 | 0.032787 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010638 | 0.23825 | 1,234 | 44 | 68 | 28.045455 | 0.832979 | 0.311994 | 0 | 0 | 0 | 0 | 0.048177 | 0 | 0 | 0 | 0 | 0 | 0.133333 | 1 | 0.133333 | false | 0 | 0.266667 | 0 | 0.466667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
100f59c47d54d766ba3ff5cc46102e95afc2ab33 | 431 | py | Python | bflib/spells/magicuser/darkvision.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/spells/magicuser/darkvision.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/spells/magicuser/darkvision.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib import units
from bflib.characters import classes
from bflib.spells import listing
from bflib.spells.base import Spell
from bflib.spells.duration import SpellDuration
from bflib.spells.range import Touch
@listing.register_spell
class Darkvision(Spell):
name = "Darkvision"
class_level_map = {
... | 25.352941 | 62 | 0.763341 | 56 | 431 | 5.785714 | 0.446429 | 0.166667 | 0.185185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005571 | 0.167053 | 431 | 16 | 63 | 26.9375 | 0.896936 | 0 | 0 | 0 | 0 | 0 | 0.023202 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.785714 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
100fd6b5ec1d603eb5c012f65ffed656ba164f09 | 5,589 | py | Python | apps/tokenlizer.py | qsyao/cudaBERT | c93cb5ff0ccd387294a7229a9bef969c1375d0d6 | [
"Apache-2.0"
] | 88 | 2019-07-19T10:55:16.000Z | 2021-12-25T09:42:59.000Z | apps/tokenlizer.py | qsyao/cudaBERT | c93cb5ff0ccd387294a7229a9bef969c1375d0d6 | [
"Apache-2.0"
] | 3 | 2019-08-01T12:47:43.000Z | 2021-12-07T03:16:50.000Z | apps/tokenlizer.py | qsyao/cudaBERT | c93cb5ff0ccd387294a7229a9bef969c1375d0d6 | [
"Apache-2.0"
] | 12 | 2019-07-19T17:41:29.000Z | 2021-11-10T02:59:53.000Z | from pytorch_pretrained_bert.tokenization import BertTokenizer
tokenlizer = None
'''
Convert a input line from input_file to a tuple:
[index, line_raw_data , inputs_id, segments_id, mask]
record id_line
process inputs_id, segments_id, mask
record line_data(raw string in line from input_fi... | 37.510067 | 84 | 0.632671 | 787 | 5,589 | 4.311309 | 0.261753 | 0.007663 | 0.009726 | 0.01061 | 0.191866 | 0.150604 | 0.053935 | 0.05364 | 0.010021 | 0.010021 | 0 | 0.010758 | 0.284845 | 5,589 | 148 | 85 | 37.763514 | 0.838129 | 0.382358 | 0 | 0.191781 | 0 | 0 | 0.010251 | 0 | 0 | 0 | 0 | 0 | 0.041096 | 1 | 0.082192 | false | 0 | 0.013699 | 0 | 0.150685 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
101197a60898fb4d5c822eb8c2635b94b789f285 | 3,653 | py | Python | spider/ipSpider.py | SonnySmart/M3u8Downloader | 663b61ece071e6734ab60f82bd17ac222d90218c | [
"MIT"
] | 10 | 2019-11-20T19:09:50.000Z | 2022-02-26T00:40:32.000Z | spider/ipSpider.py | SonnySmart/M3u8Downloader | 663b61ece071e6734ab60f82bd17ac222d90218c | [
"MIT"
] | 1 | 2021-06-01T23:51:29.000Z | 2021-06-01T23:51:29.000Z | spider/ipSpider.py | SonnySmart/M3u8Downloader | 663b61ece071e6734ab60f82bd17ac222d90218c | [
"MIT"
] | 2 | 2020-02-21T20:59:18.000Z | 2020-09-24T15:05:59.000Z | # -*- coding: UTF-8 -*-
import requests
import urllib3
import threading
import json
import os
from bs4 import BeautifulSoup
class IpSpider:
url = 'http://www.xicidaili.com/nn/'
page = 1
maxPage = 10
checkUrl = 'https://www.ip.cn/'
needIpNum = 10
ipNum = 0
filePath = 'db/'
fileName = 'i... | 32.616071 | 145 | 0.514098 | 393 | 3,653 | 4.727735 | 0.366412 | 0.029064 | 0.043057 | 0.038751 | 0.093649 | 0.029064 | 0.029064 | 0.029064 | 0 | 0 | 0 | 0.023067 | 0.359157 | 3,653 | 111 | 146 | 32.90991 | 0.770611 | 0.022721 | 0 | 0.138298 | 0 | 0.010638 | 0.111735 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.042553 | false | 0 | 0.06383 | 0 | 0.265957 | 0.031915 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1012f3c009ffa34c2c9b80bf26d6395fbc58797a | 617 | py | Python | qwe/planning/blockSim.py | IEEERobotics/high-level | a50f2170ca81a16bd50b50f970f9e3fe9c656bfa | [
"BSD-2-Clause"
] | 1 | 2017-08-07T06:03:53.000Z | 2017-08-07T06:03:53.000Z | qwe/planning/blockSim.py | IEEERobotics/high-level | a50f2170ca81a16bd50b50f970f9e3fe9c656bfa | [
"BSD-2-Clause"
] | null | null | null | qwe/planning/blockSim.py | IEEERobotics/high-level | a50f2170ca81a16bd50b50f970f9e3fe9c656bfa | [
"BSD-2-Clause"
] | null | null | null | import Block;
class BlockSim:
def process(self, loc, count):
listofBlocks = []
filename = "./planning/" + str(loc) + ".txt"
f = open(filename, 'r')
data = f.read()
#print line
lines = data.split('\n')
#print len(lines)
for i in range(len(lines)):
items = lines[i].split()
blk = Block.Block(... | 19.903226 | 58 | 0.63047 | 84 | 617 | 4.630952 | 0.535714 | 0.041131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009921 | 0.183144 | 617 | 30 | 59 | 20.566667 | 0.761905 | 0.259319 | 0 | 0 | 0 | 0 | 0.039911 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.0625 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
10130fa6cc6d73e32a8210599ebb4ce228836f7b | 960 | py | Python | test/chat/chatserver.py | rahulsukla/cltpWS | aa20f69e121ff0ab81cd0e9e2e7a421c62b759ca | [
"MIT"
] | 1 | 2015-04-15T03:54:18.000Z | 2015-04-15T03:54:18.000Z | test/chat/chatserver.py | rahulsukla/cltpWS | aa20f69e121ff0ab81cd0e9e2e7a421c62b759ca | [
"MIT"
] | null | null | null | test/chat/chatserver.py | rahulsukla/cltpWS | aa20f69e121ff0ab81cd0e9e2e7a421c62b759ca | [
"MIT"
] | null | null | null | from bottle import request, route, run, static_file
chats = []
@route('/ping')
def ping():
print chats
return "pong"
@route('/chat', method = 'POST')
def save_chat():
if request.forms.get('user') is not None:
chats.append({ 'user': request.forms.get('user'),
'at': long(requ... | 25.945946 | 83 | 0.577083 | 126 | 960 | 4.293651 | 0.373016 | 0.088725 | 0.110906 | 0.07024 | 0.251386 | 0.251386 | 0.251386 | 0.251386 | 0.251386 | 0.251386 | 0 | 0.005384 | 0.226042 | 960 | 36 | 84 | 26.666667 | 0.722746 | 0 | 0 | 0.142857 | 0 | 0 | 0.110417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.035714 | null | null | 0.035714 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
101377cd066f70a4f80a4aa9efddee6dc1171b27 | 1,349 | py | Python | exp1/src/task3.py | bhshp/optimization | 8f1a476c263f2b49c3b166f55e2fcc0913050552 | [
"MIT"
] | null | null | null | exp1/src/task3.py | bhshp/optimization | 8f1a476c263f2b49c3b166f55e2fcc0913050552 | [
"MIT"
] | null | null | null | exp1/src/task3.py | bhshp/optimization | 8f1a476c263f2b49c3b166f55e2fcc0913050552 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from task2 import fit, l1_grad_descent
origin_image = cv2.imread('./data/lena.jpg')
n, m, channel = origin_image.shape
sigma = 20
noise_image = np.uint8(np.clip(np.random.normal(0, sigma, origin_image.shape)
+ origin_image, 0, 255))
cv2.imwrite('./data/nois... | 29.977778 | 77 | 0.550037 | 220 | 1,349 | 3.186364 | 0.268182 | 0.128388 | 0.064194 | 0.048502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042254 | 0.315789 | 1,349 | 44 | 78 | 30.659091 | 0.717226 | 0 | 0 | 0 | 0 | 0 | 0.042254 | 0.031134 | 0 | 0 | 0 | 0 | 0 | 1 | 0.027778 | false | 0 | 0.083333 | 0 | 0.138889 | 0.027778 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1013f4af0653cffeadf5679387a32197de8a9afa | 619 | py | Python | e30.py | Jeremiah-Bergkvist/ProjectEuler | 06ef7fd8641e47cb8b8738173d50c57c076af6dd | [
"MIT"
] | null | null | null | e30.py | Jeremiah-Bergkvist/ProjectEuler | 06ef7fd8641e47cb8b8738173d50c57c076af6dd | [
"MIT"
] | null | null | null | e30.py | Jeremiah-Bergkvist/ProjectEuler | 06ef7fd8641e47cb8b8738173d50c57c076af6dd | [
"MIT"
] | null | null | null |
def main():
# Maximum value needed to get calculate
# 9**5 == 59049
# 59049 * 5 == 295245
power = 5
start = 2
stop = power * 9**5
matches = []
for x in xrange(start, stop+1):
xstr = str(x)
xsum = 0
for y in xrange(len(xstr)):
xsum += int(... | 23.807692 | 44 | 0.453958 | 77 | 619 | 3.545455 | 0.454545 | 0.087912 | 0.043956 | 0.087912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.072022 | 0.416801 | 619 | 26 | 45 | 23.807692 | 0.684211 | 0.114701 | 0 | 0.095238 | 0 | 0 | 0.026975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.095238 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
10146477856bf3fb9a7d6889ff29df6b4dd4be0b | 2,513 | py | Python | datafiles/testscript.py | xiaoxinz-cisco/examples | ce1d1526346665bf797effb7b372a5030d2f9bfd | [
"Apache-2.0"
] | 81 | 2019-08-07T09:00:15.000Z | 2022-03-17T23:23:51.000Z | datafiles/testscript.py | xiaoxinz-cisco/examples | ce1d1526346665bf797effb7b372a5030d2f9bfd | [
"Apache-2.0"
] | 2 | 2019-07-30T03:09:50.000Z | 2021-09-28T13:08:00.000Z | datafiles/testscript.py | xiaoxinz-cisco/examples | ce1d1526346665bf797effb7b372a5030d2f9bfd | [
"Apache-2.0"
] | 41 | 2019-08-21T22:43:11.000Z | 2022-03-30T03:22:35.000Z | #!/usr/bin/env python
'''
This is a very short script intended to help the user undersand what datafiles
are, how to use them & how datafiles affect your script's normal execution.
First, run this script by itself:
bash$ python testscript.py
Now, add datafile:
bash$ python testscript.py -datafile data/simple_... | 29.564706 | 78 | 0.668922 | 359 | 2,513 | 4.417827 | 0.264624 | 0.113493 | 0.040984 | 0.069357 | 0.196091 | 0.139344 | 0.139344 | 0.086381 | 0.06053 | 0.06053 | 0 | 0.004098 | 0.223239 | 2,513 | 84 | 79 | 29.916667 | 0.808402 | 0.173498 | 0 | 0.153846 | 0 | 0 | 0.30706 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.115385 | false | 0 | 0.038462 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
1014a44dfeab5dc5a1bcbe3f568a4c2b8e25397c | 950 | py | Python | tf2utils/enums.py | offish/tf2-rgb-values | 7a526e9918afef9f79b7be37e81cd374df66c57d | [
"MIT"
] | 1 | 2019-06-16T15:55:38.000Z | 2019-06-16T15:55:38.000Z | tf2utils/enums.py | offish/tf2utils | 7a526e9918afef9f79b7be37e81cd374df66c57d | [
"MIT"
] | null | null | null | tf2utils/enums.py | offish/tf2utils | 7a526e9918afef9f79b7be37e81cd374df66c57d | [
"MIT"
] | 2 | 2019-03-14T18:58:32.000Z | 2019-04-12T11:02:14.000Z | import enum
class ETradeOfferState(enum.IntEnum):
Invalid = 1
Active = 2
Accepted = 3
Countered = 4
Expired = 5
Canceled = 6
Declined = 7
InvalidItems = 8
NeedsConfirmation = 9
CanceledBySecondFactor = 10
Escrow = 11
class EItemQuality(enum.IntEnum):
Normal = 0
Ge... | 14.393939 | 37 | 0.509474 | 124 | 950 | 3.903226 | 0.766129 | 0.068182 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15245 | 0.42 | 950 | 65 | 38 | 14.615385 | 0.725953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.016949 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
10159dc12ce248c5ab20867cf825a1f1750f06f7 | 372 | py | Python | beginner_contest/109/C.py | FGtatsuro/myatcoder | 25a3123be6a6311e7d1c25394987de3e35575ff4 | [
"MIT"
] | null | null | null | beginner_contest/109/C.py | FGtatsuro/myatcoder | 25a3123be6a6311e7d1c25394987de3e35575ff4 | [
"MIT"
] | null | null | null | beginner_contest/109/C.py | FGtatsuro/myatcoder | 25a3123be6a6311e7d1c25394987de3e35575ff4 | [
"MIT"
] | null | null | null | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
n, x = map(int, input().split())
point = list(map(int, input().split()))
diff = [0] * n
for i in range(n):
diff[i] = abs(point[i] - x)
def gcd(big, small):
if small == 0:
return big
else:
return gcd(small, big % small)
i... | 18.6 | 39 | 0.612903 | 58 | 372 | 3.931034 | 0.551724 | 0.052632 | 0.096491 | 0.140351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017241 | 0.22043 | 372 | 19 | 40 | 19.578947 | 0.768966 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0 | 0.133333 | 0 | 0.333333 | 0.066667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
101629a24b0565cb16ae5309c4126f52ea5e2bb8 | 1,369 | py | Python | returns/interfaces/lashable.py | ariebovenberg/returns | 1630e060a629082b2f9de62177d198a5b59e1929 | [
"BSD-2-Clause"
] | 3 | 2019-01-27T14:41:46.000Z | 2019-01-30T10:57:25.000Z | returns/interfaces/lashable.py | ariebovenberg/returns | 1630e060a629082b2f9de62177d198a5b59e1929 | [
"BSD-2-Clause"
] | 92 | 2022-01-03T01:14:21.000Z | 2022-03-30T00:32:09.000Z | returns/interfaces/lashable.py | ariebovenberg/returns | 1630e060a629082b2f9de62177d198a5b59e1929 | [
"BSD-2-Clause"
] | null | null | null | from abc import abstractmethod
from typing import Callable, Generic, NoReturn, TypeVar
from returns.primitives.hkt import KindN
_FirstType = TypeVar('_FirstType')
_SecondType = TypeVar('_SecondType')
_ThirdType = TypeVar('_ThirdType')
_UpdatedType = TypeVar('_UpdatedType')
_LashableType = TypeVar('_LashableType', bo... | 28.520833 | 71 | 0.707816 | 140 | 1,369 | 6.692857 | 0.514286 | 0.08111 | 0.059765 | 0.078975 | 0.14301 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001838 | 0.205259 | 1,369 | 47 | 72 | 29.12766 | 0.859375 | 0.345508 | 0 | 0 | 0 | 0 | 0.078502 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05 | false | 0 | 0.15 | 0 | 0.3 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
10162d06e2219ad8662267101a5ad7808681589b | 6,875 | py | Python | combinatorial_optim/sa_test_total.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | combinatorial_optim/sa_test_total.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | combinatorial_optim/sa_test_total.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | import os
import time
import glob
import numpy as np
import argparse
from detection_evaluation.nuscenes_eval_core import NuScenesEval
from detection_evaluation.label_parser import LabelParser
import co_utils as cu
def parse_args():
parser = argparse.ArgumentParser(description='arg parser')
# parser.add_argumen... | 39.739884 | 147 | 0.628509 | 1,063 | 6,875 | 3.757291 | 0.178739 | 0.03305 | 0.044066 | 0.0333 | 0.456435 | 0.436655 | 0.366299 | 0.348773 | 0.295193 | 0.255633 | 0 | 0.028121 | 0.234473 | 6,875 | 173 | 148 | 39.739884 | 0.730762 | 0.401164 | 0 | 0.120482 | 0 | 0 | 0.09663 | 0.027998 | 0 | 0 | 0 | 0 | 0 | 1 | 0.048193 | false | 0 | 0.120482 | 0 | 0.204819 | 0.060241 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
10170ff28699d7143f1d158e1501a5a54fa2ae72 | 1,158 | py | Python | unalikability-python/unalikability.py | cuevasclemente/unlikable-polyglot | ce9efb86df0b667124da394cfcc11c18b81e4849 | [
"MIT"
] | 1 | 2021-05-18T17:33:10.000Z | 2021-05-18T17:33:10.000Z | unalikability-python/unalikability.py | cuevasclemente/unlikable-polyglot | ce9efb86df0b667124da394cfcc11c18b81e4849 | [
"MIT"
] | 1 | 2021-05-18T17:36:44.000Z | 2021-05-18T18:51:34.000Z | unalikability-python/unalikability.py | cuevasclemente/unlikable-polyglot | ce9efb86df0b667124da394cfcc11c18b81e4849 | [
"MIT"
] | null | null | null | import collections
import math
def unalikeability(measurements: [int]) -> float:
"""
Unalikeability returns the unalikability measure
for `measurements`, assuming that
`measurements` is an array describing a
collection of measurements of a categorical
variable (i.e: perhaps the results of runnin... | 27.571429 | 65 | 0.576857 | 167 | 1,158 | 3.952096 | 0.407186 | 0.066667 | 0.081818 | 0.084848 | 0.136364 | 0.136364 | 0.136364 | 0.136364 | 0.081818 | 0 | 0 | 0.078049 | 0.291883 | 1,158 | 41 | 66 | 28.243902 | 0.726829 | 0.529361 | 0 | 0 | 0 | 0 | 0.017058 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.176471 | 0 | 0.352941 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
10179228ca75871b5e01551558e02842372500a8 | 8,769 | py | Python | pheweb/serve/components/autocomplete/sqlite_dao.py | FINNGEN/pheweb | 40fd83fce0b8e4f405d182dd63b9741c5ee5b280 | [
"MIT"
] | 4 | 2018-11-03T13:58:52.000Z | 2020-03-06T09:19:03.000Z | pheweb/serve/components/autocomplete/sqlite_dao.py | FINNGEN/pheweb | 40fd83fce0b8e4f405d182dd63b9741c5ee5b280 | [
"MIT"
] | 92 | 2018-05-17T18:07:01.000Z | 2022-03-29T00:37:30.000Z | pheweb/serve/components/autocomplete/sqlite_dao.py | FINNGEN/pheweb | 40fd83fce0b8e4f405d182dd63b9741c5ee5b280 | [
"MIT"
] | 4 | 2020-07-01T12:20:55.000Z | 2022-01-24T20:09:15.000Z |
from ....file_utils import get_filepath
from ...server_utils import parse_variant
from flask import url_for
from pathlib import Path
import urllib.parse
import itertools
import re
import copy
import sqlite3
from typing import List,Dict,Any,Optional,Iterator
# TODO: sort suggestions better.
# - It's good that hitting... | 48.988827 | 166 | 0.605884 | 1,011 | 8,769 | 5.091988 | 0.277943 | 0.012238 | 0.016317 | 0.019425 | 0.209207 | 0.158314 | 0.115773 | 0.103341 | 0.103341 | 0.088578 | 0 | 0.01372 | 0.285209 | 8,769 | 178 | 167 | 49.264045 | 0.807594 | 0.160908 | 0 | 0.191489 | 0 | 0 | 0.1024 | 0.013635 | 0 | 0 | 0 | 0.005618 | 0 | 1 | 0.092199 | false | 0 | 0.085106 | 0.014184 | 0.248227 | 0.014184 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
101891f3b9ed444afe6d924d40f4687201082a15 | 1,314 | py | Python | AI(BE)/rest_api/application.py | dev-taewon-kim/ai_web_RISKOUT_BTS | 6b5650f8ecf068185ad87af62074627aca566018 | [
"MIT"
] | 1 | 2021-11-04T07:54:58.000Z | 2021-11-04T07:54:58.000Z | AI(BE)/rest_api/application.py | mslee300/ai_web_RISKOUT_BTS | e01b3d27f68a0187b619920bf5c1f2de0cbc0f7d | [
"MIT"
] | null | null | null | AI(BE)/rest_api/application.py | mslee300/ai_web_RISKOUT_BTS | e01b3d27f68a0187b619920bf5c1f2de0cbc0f7d | [
"MIT"
] | null | null | null | import logging
import uvicorn
from fastapi import FastAPI, HTTPException
from starlette.middleware.cors import CORSMiddleware
from rest_api.controller.errors.http_error import http_error_handler
from rest_api.config import ROOT_PATH
logging.basicConfig(format="%(asctime)s %(message)s", datefmt="%m/%d/%Y %I:%M:%S %p"... | 27.957447 | 94 | 0.705479 | 174 | 1,314 | 5.126437 | 0.545977 | 0.011211 | 0.036996 | 0.047085 | 0.03139 | 0.03139 | 0 | 0 | 0 | 0 | 0 | 0.027223 | 0.161339 | 1,314 | 47 | 95 | 27.957447 | 0.782214 | 0.02207 | 0 | 0 | 0 | 0 | 0.131579 | 0 | 0 | 0 | 0 | 0.021277 | 0 | 1 | 0.041667 | false | 0 | 0.291667 | 0 | 0.375 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
101a132eac985f8e06fbc298f71166afb00448d1 | 4,603 | py | Python | rnn_text_classifier.py | kamei86i/rnn-classifier-tf | f56d7460dce8ee5ebd02b5ae773c1c5f899be125 | [
"Apache-2.0"
] | 1 | 2018-07-27T00:05:22.000Z | 2018-07-27T00:05:22.000Z | rnn_text_classifier.py | kamei86i/rnn-classifier-tf | f56d7460dce8ee5ebd02b5ae773c1c5f899be125 | [
"Apache-2.0"
] | null | null | null | rnn_text_classifier.py | kamei86i/rnn-classifier-tf | f56d7460dce8ee5ebd02b5ae773c1c5f899be125 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
class RnnTextClassifier:
def __init__(self, batch_size, sentence_length, embedding, cell_layer_size, cell_layer_num, num_classes, lam=1,
lr=0.001):
self.batch_size = batch_size
self.sentence_length = sentence_length
self.embedding = embedding
... | 44.68932 | 120 | 0.615034 | 597 | 4,603 | 4.522613 | 0.21608 | 0.04 | 0.033333 | 0.05 | 0.235185 | 0.136296 | 0.08 | 0.058519 | 0 | 0 | 0 | 0.008654 | 0.271997 | 4,603 | 102 | 121 | 45.127451 | 0.797076 | 0.019552 | 0 | 0.05 | 0 | 0 | 0.040373 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0875 | false | 0 | 0.0125 | 0 | 0.15 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
101a7d148874f545b161968d0a67f51310cf8392 | 4,705 | py | Python | scripts/run.py | peterkuma/shortwave-intermittency | 0ee86b3ad3117cbe22f342105a1b110905ed5183 | [
"MIT"
] | null | null | null | scripts/run.py | peterkuma/shortwave-intermittency | 0ee86b3ad3117cbe22f342105a1b110905ed5183 | [
"MIT"
] | null | null | null | scripts/run.py | peterkuma/shortwave-intermittency | 0ee86b3ad3117cbe22f342105a1b110905ed5183 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# run.py
#
# References:
#
# * Masek J. 2013. Single interval showtwave radiation scheme with
# parametrized optical saturation and spectral overlaps.
#
import sys
import os
from tempfile import NamedTemporaryFile
import subprocess
import numpy as np
from StringIO import StringIO
impo... | 21.004464 | 71 | 0.637832 | 644 | 4,705 | 4.509317 | 0.245342 | 0.115702 | 0.020661 | 0.037879 | 0.209022 | 0.162534 | 0.143939 | 0.091942 | 0.073003 | 0.073003 | 0 | 0.020938 | 0.198087 | 4,705 | 223 | 72 | 21.098655 | 0.748741 | 0.06865 | 0 | 0.182857 | 0 | 0 | 0.185652 | 0.049278 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.045714 | null | null | 0.028571 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
101abe09fb563597dc036618480bdb3605bcf35d | 357 | py | Python | app/rooms/utils.py | frikke/code-examples-python | ecb3d9c386501a584cab1b0b5c83e5b71b4c9a2f | [
"MIT"
] | null | null | null | app/rooms/utils.py | frikke/code-examples-python | ecb3d9c386501a584cab1b0b5c83e5b71b4c9a2f | [
"MIT"
] | null | null | null | app/rooms/utils.py | frikke/code-examples-python | ecb3d9c386501a584cab1b0b5c83e5b71b4c9a2f | [
"MIT"
] | null | null | null | from docusign_rooms import ApiClient
def create_rooms_api_client(access_token):
"""Create API client and construct API headers"""
api_client = ApiClient(host="https://demo.rooms.docusign.com/restapi")
api_client.set_default_header(
header_name="Authorization",
header_value=f"Bearer {access... | 29.75 | 74 | 0.733894 | 46 | 357 | 5.413043 | 0.608696 | 0.180723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.170868 | 357 | 11 | 75 | 32.454545 | 0.841216 | 0.120448 | 0 | 0 | 0 | 0 | 0.237013 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0 | 0.375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
101b647d45f6d31dee7304560ed30905d346ce80 | 4,776 | py | Python | GenerIter/app/generator.py | GridPresence/GenerIter | f0b74cd6c1d1bb9a23fccb28fa8b972f9eeccaf8 | [
"MIT"
] | 7 | 2021-01-07T19:03:10.000Z | 2021-03-05T08:05:17.000Z | GenerIter/app/generator.py | GridPresence/GenerIter | f0b74cd6c1d1bb9a23fccb28fa8b972f9eeccaf8 | [
"MIT"
] | 2 | 2021-01-26T12:45:58.000Z | 2021-02-15T11:06:14.000Z | GenerIter/app/generator.py | GridPresence/GenerIter | f0b74cd6c1d1bb9a23fccb28fa8b972f9eeccaf8 | [
"MIT"
] | 1 | 2021-01-24T05:21:28.000Z | 2021-01-24T05:21:28.000Z | #!/usr/bin/env python3
"""
App to generate music.
Copyright 2020 Thomas Jackson Park & Jeremy Pavier
"""
import os
import argparse
import sys
from pathlib import Path
from GenerIter.app.clibase import CLIBase
from GenerIter.selector import Selector
from GenerIter.config import Config
from GenerIter.factory import Pr... | 36.738462 | 122 | 0.555067 | 448 | 4,776 | 5.736607 | 0.270089 | 0.125681 | 0.084047 | 0.040467 | 0.275875 | 0.19144 | 0.163424 | 0.163424 | 0.163424 | 0.163424 | 0 | 0.002248 | 0.34799 | 4,776 | 129 | 123 | 37.023256 | 0.823057 | 0.052764 | 0 | 0.306122 | 1 | 0 | 0.0874 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05102 | false | 0.040816 | 0.102041 | 0 | 0.163265 | 0.010204 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
63d7946b710bcf849366eee7c627cc4c3a914d5e | 6,566 | py | Python | app.py | Nikita-Sukhwal/AatmSuraksha | 291ac685b2dee7758f19e1f7e97ab37312979db9 | [
"MIT"
] | 4 | 2021-02-12T16:46:42.000Z | 2021-02-12T17:02:51.000Z | app.py | Nikita-Sukhwal/AatmSuraksha | 291ac685b2dee7758f19e1f7e97ab37312979db9 | [
"MIT"
] | null | null | null | app.py | Nikita-Sukhwal/AatmSuraksha | 291ac685b2dee7758f19e1f7e97ab37312979db9 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, url_for, redirect, session
import pymongo
import mail
from location import lat, log #, location, city, state
import messagebird
import credentials
#set app as a Flask instance
app = Flask(__name__)
#encryption relies on secret keys so they could be run
app.secret_ke... | 36.276243 | 124 | 0.633567 | 807 | 6,566 | 5.017348 | 0.255266 | 0.051865 | 0.069153 | 0.027661 | 0.326253 | 0.297604 | 0.282786 | 0.162015 | 0.122005 | 0.103235 | 0 | 0.002841 | 0.249619 | 6,566 | 180 | 125 | 36.477778 | 0.818957 | 0.183064 | 0 | 0.361345 | 0 | 0.008403 | 0.183096 | 0.017241 | 0.016807 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0.084034 | 0.05042 | 0.008403 | 0.260504 | 0.05042 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
63d7d272c033f8694a10b24b5f90bdd7dd750995 | 107 | py | Python | apps/porteiros/admin.py | franric/Controle-Visitante | 5ca0c423885167c9d096e6f7ee48d238e64566f3 | [
"MIT"
] | null | null | null | apps/porteiros/admin.py | franric/Controle-Visitante | 5ca0c423885167c9d096e6f7ee48d238e64566f3 | [
"MIT"
] | null | null | null | apps/porteiros/admin.py | franric/Controle-Visitante | 5ca0c423885167c9d096e6f7ee48d238e64566f3 | [
"MIT"
] | null | null | null | from django.contrib import admin
from apps.porteiros.models import Porteiro
admin.site.register(Porteiro)
| 21.4 | 42 | 0.841121 | 15 | 107 | 6 | 0.733333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.093458 | 107 | 4 | 43 | 26.75 | 0.927835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 5 |
63da6938462c65e9252485f08e43d556eb29664b | 2,118 | py | Python | etox/apps/backend/mixins.py | a1xg/OpenTox | 52b807185a8113c83b7f5b9a2896974e9f02c8d0 | [
"Apache-2.0"
] | 1 | 2021-09-19T18:07:10.000Z | 2021-09-19T18:07:10.000Z | etox/apps/backend/mixins.py | a1xg/OpenTox | 52b807185a8113c83b7f5b9a2896974e9f02c8d0 | [
"Apache-2.0"
] | null | null | null | etox/apps/backend/mixins.py | a1xg/OpenTox | 52b807185a8113c83b7f5b9a2896974e9f02c8d0 | [
"Apache-2.0"
] | null | null | null | from .services.hazard_assessor import HazardMeter
from .services.ocr import ImageOCR
from .serializers import IngredientsSerializer, ProductSerializer, DetailsIngredientSerializer
from .services.text_blocks_screening import IngredientsBlockFinder
from .services.db_tools import DBQueries
from .services.ocr_settings impo... | 36.517241 | 108 | 0.616147 | 222 | 2,118 | 5.653153 | 0.306306 | 0.038247 | 0.038247 | 0.025498 | 0.084462 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006592 | 0.283758 | 2,118 | 57 | 109 | 37.157895 | 0.820699 | 0.010387 | 0 | 0 | 0 | 0 | 0.08978 | 0.021012 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.125 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63dcb009c572a33dac19bddf3657a147f2fcccc3 | 1,181 | py | Python | python-django-piscine/day04/d04/urls.py | maxdesalle/libft | 8845656e1f5cc1fec052cf97fc8f5839b2b590a8 | [
"Unlicense"
] | 3 | 2021-01-06T13:50:12.000Z | 2022-02-28T09:16:15.000Z | python-django-piscine/day04/d04/urls.py | maxdesalle/libft | 8845656e1f5cc1fec052cf97fc8f5839b2b590a8 | [
"Unlicense"
] | null | null | null | python-django-piscine/day04/d04/urls.py | maxdesalle/libft | 8845656e1f5cc1fec052cf97fc8f5839b2b590a8 | [
"Unlicense"
] | 1 | 2020-11-23T12:58:18.000Z | 2020-11-23T12:58:18.000Z | """d04 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 39.366667 | 88 | 0.721423 | 175 | 1,181 | 4.817143 | 0.382857 | 0.065243 | 0.017794 | 0.02847 | 0.19573 | 0.13879 | 0.088968 | 0 | 0 | 0 | 0 | 0.032161 | 0.157494 | 1,181 | 29 | 89 | 40.724138 | 0.815075 | 0.524132 | 0 | 0 | 0 | 0 | 0.281081 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.461538 | 0 | 0.461538 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
63dd7fae6c8c1a5d59b9d4ffad7b82f95f7d3cb7 | 3,122 | py | Python | spaghettifs/treetree.py | mgax/SpaghettiFS | 7782ed1a30910330f0380b70edf110262743374e | [
"MIT"
] | 3 | 2016-03-16T08:22:47.000Z | 2019-09-30T09:35:27.000Z | spaghettifs/treetree.py | mgax/SpaghettiFS | 7782ed1a30910330f0380b70edf110262743374e | [
"MIT"
] | null | null | null | spaghettifs/treetree.py | mgax/SpaghettiFS | 7782ed1a30910330f0380b70edf110262743374e | [
"MIT"
] | 4 | 2015-09-18T12:45:14.000Z | 2020-09-22T13:01:58.000Z | """
TreeTree is a wrapper over `easygit.EasyTree` that provides more efficient
storage of lists. Keys must be strings made up of digits, and they should
be as close as possible to the indices of a list.
"""
class TreeTree(object):
is_tree = True
def __init__(self, container, prefix='tt'):
self.contain... | 28.126126 | 76 | 0.528187 | 359 | 3,122 | 4.498607 | 0.239554 | 0.056347 | 0.040867 | 0.04644 | 0.431579 | 0.431579 | 0.411765 | 0.411765 | 0.260681 | 0.260681 | 0 | 0 | 0.38565 | 3,122 | 110 | 77 | 28.381818 | 0.842023 | 0.063421 | 0 | 0.511364 | 0 | 0 | 0.01989 | 0 | 0 | 0 | 0 | 0 | 0.011364 | 1 | 0.181818 | false | 0 | 0 | 0.022727 | 0.386364 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63def619e46b70dd31fc4852669b37e3e1d6df41 | 737 | py | Python | bot.py | rojserbest/contact-bot | 2763d115cec28ae1b27a6cd489ab79e885ec13ce | [
"MIT"
] | 3 | 2021-02-10T06:17:27.000Z | 2021-08-08T16:44:11.000Z | bot.py | rojserbest/contact-bot | 2763d115cec28ae1b27a6cd489ab79e885ec13ce | [
"MIT"
] | null | null | null | bot.py | rojserbest/contact-bot | 2763d115cec28ae1b27a6cd489ab79e885ec13ce | [
"MIT"
] | 2 | 2021-02-10T09:59:02.000Z | 2021-02-25T02:37:40.000Z | from telegram.ext import Updater, PicklePersistence
from config import BOT_TOKEN
updater = Updater(
BOT_TOKEN,
persistence=PicklePersistence(filename="data")
)
dp = updater.dispatcher
def main():
from handlers import all_handlers
for handler in all_handlers:
if len(handler) == 2:
... | 19.918919 | 51 | 0.514247 | 71 | 737 | 5.098592 | 0.464789 | 0.066298 | 0.066298 | 0.077348 | 0.176796 | 0.176796 | 0.176796 | 0.176796 | 0 | 0 | 0 | 0.013575 | 0.400271 | 737 | 36 | 52 | 20.472222 | 0.80543 | 0 | 0 | 0.214286 | 0 | 0 | 0.023066 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.035714 | false | 0 | 0.107143 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e06ea259c0e2b97e801a344e2061220ba0cacc | 951 | py | Python | D/D.py | staguchi0703/abc142 | d529a14a76586cb582cecec17ab6267736673937 | [
"MIT"
] | null | null | null | D/D.py | staguchi0703/abc142 | d529a14a76586cb582cecec17ab6267736673937 | [
"MIT"
] | null | null | null | D/D.py | staguchi0703/abc142 | d529a14a76586cb582cecec17ab6267736673937 | [
"MIT"
] | null | null | null | #
# VScodeで入力をテキストから読み込んで標準入力に渡す
import sys
import os
f=open(r'.\D\D_input.txt', 'r', encoding="utf-8")
# inputをフルパスで指定
# win10でファイルを作るとs-jisで保存されるため、読み込みをutf-8へエンコードする必要あり
# VScodeでinput file開くとutf8になってるんだけど中身は結局s-jisになっているらしい
sys.stdin=f
#
# 入力スニペット
# num = int(input())
# num_list = [int(item) for item in input().s... | 19.8125 | 54 | 0.604627 | 127 | 951 | 4.433071 | 0.472441 | 0.017762 | 0.035524 | 0.049734 | 0.092362 | 0.092362 | 0.092362 | 0 | 0 | 0 | 0 | 0.020408 | 0.227129 | 951 | 47 | 55 | 20.234043 | 0.745578 | 0.312303 | 0 | 0 | 0 | 0 | 0.034884 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.125 | 0 | 0.291667 | 0.041667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e0b323a1930c8792758cd6dfc42283e2496a50 | 1,769 | py | Python | sources/ebf-demo/scripts/cfilter.py | zwg0106/imx-yocto | e378ca25352a59d1ef84ee95f3386b7314f4565b | [
"MIT"
] | 1 | 2020-01-13T13:16:52.000Z | 2020-01-13T13:16:52.000Z | sources/ebf-demo/scripts/cfilter.py | zwg0106/imx-yocto | e378ca25352a59d1ef84ee95f3386b7314f4565b | [
"MIT"
] | 3 | 2019-11-20T02:53:01.000Z | 2019-12-26T03:00:15.000Z | sources/ebf-demo/scripts/cfilter.py | zwg0106/imx-yocto | e378ca25352a59d1ef84ee95f3386b7314f4565b | [
"MIT"
] | null | null | null | import time
import math
class ComplementaryFilter(object):
def __init__(self, gyroWeight=0.95):
self.gyroWeight = gyroWeight
self._reset()
def _reset(self):
self.last = 0
self.accelPos = [0, 0, 0]
self.gyroPos = [0, 0, 0]
self.filterPos = [0, 0, 0]
def inp... | 29.983051 | 123 | 0.57377 | 229 | 1,769 | 4.406114 | 0.379913 | 0.083251 | 0.071358 | 0.056492 | 0.053518 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037459 | 0.305823 | 1,769 | 58 | 124 | 30.5 | 0.784202 | 0.193895 | 0 | 0.060606 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.121212 | false | 0 | 0.060606 | 0 | 0.272727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e0ebde336a5f3eeb1ad190a79f282a9b028bed | 3,008 | py | Python | face_recognition/deep_learning/main_flow_processer.py | cclauss/TripletLossFace | 6da4ae571cf2fb912ab528afa3f0b9f1efe71767 | [
"MIT"
] | 88 | 2020-01-18T09:47:03.000Z | 2021-12-18T22:34:18.000Z | face_recognition/deep_learning/main_flow_processer.py | cclauss/TripletLossFace | 6da4ae571cf2fb912ab528afa3f0b9f1efe71767 | [
"MIT"
] | 4 | 2020-01-18T09:20:24.000Z | 2020-03-02T19:40:58.000Z | face_recognition/deep_learning/main_flow_processer.py | cclauss/TripletLossFace | 6da4ae571cf2fb912ab528afa3f0b9f1efe71767 | [
"MIT"
] | 40 | 2020-01-18T11:15:07.000Z | 2021-03-09T07:58:57.000Z | import sys
sys.path.append("../")
import json
import cv2, os
import numpy as np
import tensorflow as tf
from make_better_dataset_for_deepfake.main_data_creator import FaceExtractor
class Engine:
def load_image(self, path):
image = tf.io.read_file(path)
image = tf.image.decode_jpeg(image, channels=3)
image = ... | 27.345455 | 128 | 0.655918 | 459 | 3,008 | 4.119826 | 0.272331 | 0.042306 | 0.051824 | 0.031729 | 0.332628 | 0.258593 | 0.258593 | 0.228979 | 0.168694 | 0.168694 | 0 | 0.027678 | 0.17121 | 3,008 | 109 | 129 | 27.59633 | 0.730846 | 0.032247 | 0 | 0.170732 | 0 | 0 | 0.089126 | 0.044735 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04878 | false | 0 | 0.085366 | 0 | 0.195122 | 0.109756 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e142b8a3ac1fd9757268f4acda900e7ecba57e | 3,668 | py | Python | ops/models/schedule.py | dengshaochun/devOps | 58b5a37918ffca3340aa535af670b805c19a87ec | [
"MIT"
] | null | null | null | ops/models/schedule.py | dengshaochun/devOps | 58b5a37918ffca3340aa535af670b805c19a87ec | [
"MIT"
] | 3 | 2020-06-05T19:01:02.000Z | 2021-09-23T23:22:32.000Z | ops/models/schedule.py | dengshaochun/ansibleX | 58b5a37918ffca3340aa535af670b805c19a87ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/11/15 10:51
# @Author : Dengsc
# @Site :
# @File : schedule.py
# @Software: PyCharm
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django_celery_beat.models import (CrontabSchedule, IntervalSchedule)
fro... | 37.428571 | 73 | 0.658942 | 371 | 3,668 | 6.264151 | 0.25876 | 0.075732 | 0.066265 | 0.05852 | 0.523236 | 0.512048 | 0.483649 | 0.458692 | 0.458692 | 0.458692 | 0 | 0.00577 | 0.244002 | 3,668 | 97 | 74 | 37.814433 | 0.832312 | 0.038713 | 0 | 0.430556 | 0 | 0 | 0.144643 | 0.090935 | 0 | 0 | 0 | 0 | 0 | 1 | 0.027778 | false | 0 | 0.083333 | 0.013889 | 0.375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e2bca2d8584267cec472d15b17a95fc15a081c | 18,110 | py | Python | LAB4/bin/task_5.py | Yalfoosh/DUBUCE | 3f53923c27b1bce0ac592b20c5bb98649cb7fb75 | [
"Apache-2.0"
] | null | null | null | LAB4/bin/task_5.py | Yalfoosh/DUBUCE | 3f53923c27b1bce0ac592b20c5bb98649cb7fb75 | [
"Apache-2.0"
] | null | null | null | LAB4/bin/task_5.py | Yalfoosh/DUBUCE | 3f53923c27b1bce0ac592b20c5bb98649cb7fb75 | [
"Apache-2.0"
] | 1 | 2020-04-23T02:06:47.000Z | 2020-04-23T02:06:47.000Z | # Copyright 2020 Miljenko Šuflaj
#
# 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 a... | 34.693487 | 80 | 0.533186 | 2,069 | 18,110 | 4.537458 | 0.152731 | 0.047934 | 0.015339 | 0.02386 | 0.522369 | 0.480507 | 0.444078 | 0.395611 | 0.371538 | 0.371538 | 0 | 0.021983 | 0.374544 | 18,110 | 521 | 81 | 34.760077 | 0.806833 | 0.305798 | 0 | 0.35 | 0 | 0 | 0.016213 | 0.008194 | 0 | 0 | 0 | 0 | 0 | 1 | 0.079167 | false | 0 | 0.041667 | 0.041667 | 0.1875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e352cd8b57ca9e170046df83f9f887ff2cb243 | 2,024 | py | Python | Main.py | ahmetmutlugun/clone_bot | ced61f9af626345753f0a7decc512a9f1d8a224b | [
"Apache-2.0"
] | null | null | null | Main.py | ahmetmutlugun/clone_bot | ced61f9af626345753f0a7decc512a9f1d8a224b | [
"Apache-2.0"
] | null | null | null | Main.py | ahmetmutlugun/clone_bot | ced61f9af626345753f0a7decc512a9f1d8a224b | [
"Apache-2.0"
] | null | null | null | import discord
from discord.ext import commands
from discord.ext.commands import Bot
client: Bot = commands.Bot(command_prefix=['-'], case_insensitive=True, description="Train an AI to send messages.")
guilds = []
guild_ids = []
@client.event
async def on_ready():
await client.change_presence(activity=discord.Ga... | 27.351351 | 116 | 0.628953 | 298 | 2,024 | 4.197987 | 0.348993 | 0.070344 | 0.038369 | 0.044764 | 0.195843 | 0.147882 | 0.147882 | 0.073541 | 0.073541 | 0.073541 | 0 | 0.002559 | 0.227767 | 2,024 | 73 | 117 | 27.726027 | 0.797825 | 0 | 0 | 0.089286 | 0 | 0 | 0.18083 | 0.010375 | 0 | 0 | 0 | 0 | 0 | 1 | 0.053571 | false | 0 | 0.053571 | 0 | 0.196429 | 0.017857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e40a9d8fa982ae7027fd1e676365c6c684bb99 | 6,920 | py | Python | tester/src/sirv_gnrl_fifo.py | giraffe50/RISCV-M4F | 1b1ed756a8ea02c2d2a11d8472f8603847170ad8 | [
"Apache-2.0"
] | 3 | 2021-01-13T03:41:14.000Z | 2021-03-23T11:31:48.000Z | tester/src/sirv_gnrl_fifo.py | scutdig/LG-32HP | 1b1ed756a8ea02c2d2a11d8472f8603847170ad8 | [
"Apache-2.0"
] | 1 | 2021-03-01T09:32:59.000Z | 2021-03-01T09:32:59.000Z | tester/src/sirv_gnrl_fifo.py | scutdig/LG-32HP | 1b1ed756a8ea02c2d2a11d8472f8603847170ad8 | [
"Apache-2.0"
] | 4 | 2021-01-07T03:01:26.000Z | 2021-02-28T02:20:10.000Z | from pyhcl import *
from .sirv_gnrl_dffl import sirv_gnrl_dffl
from .sirv_gnrl_dfflr import sirv_gnrl_dfflr
from .sirv_gnrl_dfflrs import sirv_gnrl_dfflrs
def carray(el, len):
ary = []
for i in range(len):
ary.append(el)
return ary
def sirv_gnrl_fifo(CUT_READY: int = 0,
... | 34.949495 | 117 | 0.434104 | 980 | 6,920 | 2.762245 | 0.104082 | 0.051718 | 0.023273 | 0.048762 | 0.526413 | 0.37089 | 0.318803 | 0.210935 | 0.179165 | 0.146657 | 0 | 0.045747 | 0.371387 | 6,920 | 197 | 118 | 35.126904 | 0.576552 | 0.175578 | 0 | 0.144068 | 0 | 0 | 0.008603 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.016949 | false | 0 | 0.033898 | 0 | 0.194915 | 0.008475 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e478f68db4b89cfa3ff715867177085fa62d17 | 6,600 | py | Python | data.py | QTIM-Lab/rop | 1befc7c2910daa151105fdd2f5fac785d0515f48 | [
"MIT"
] | 1 | 2021-07-29T15:51:35.000Z | 2021-07-29T15:51:35.000Z | data.py | QTIM-Lab/rop | 1befc7c2910daa151105fdd2f5fac785d0515f48 | [
"MIT"
] | null | null | null | data.py | QTIM-Lab/rop | 1befc7c2910daa151105fdd2f5fac785d0515f48 | [
"MIT"
] | null | null | null | # ==================================================================== #
# #
# DATASET / DATALOADER #
# #
# ==========================... | 37.288136 | 84 | 0.455152 | 627 | 6,600 | 4.620415 | 0.301435 | 0.006213 | 0.01933 | 0.005523 | 0.11253 | 0.023473 | 0.023473 | 0.023473 | 0 | 0 | 0 | 0.017947 | 0.425909 | 6,600 | 176 | 85 | 37.5 | 0.746635 | 0.095 | 0 | 0.111111 | 0 | 0 | 0.032649 | 0 | 0 | 0 | 0 | 0 | 0.027778 | 1 | 0.069444 | false | 0 | 0.0625 | 0.013889 | 0.194444 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
63e53355de71c24919fc88789b079d2b1ce0b723 | 5,100 | py | Python | flask/app/main/routes.py | stevenbennettonline/ratemymolecule | 4591b2346743b9053ee1392f027d0b20d0f1da99 | [
"MIT"
] | 3 | 2021-06-16T00:27:45.000Z | 2022-01-11T13:23:06.000Z | flask/app/main/routes.py | stevenbennettonline/rate-my-molecule | 4591b2346743b9053ee1392f027d0b20d0f1da99 | [
"MIT"
] | 2 | 2021-06-16T08:41:58.000Z | 2021-06-16T08:42:05.000Z | flask/app/main/routes.py | stevenkbennett/ratemymolecule | 4591b2346743b9053ee1392f027d0b20d0f1da99 | [
"MIT"
] | null | null | null | from collections import Counter
import numpy as np
from flask import (Blueprint, flash, jsonify, redirect, render_template,
request, url_for)
from flask_login import current_user, login_required
from app import db
from app.auth.email import send_password_reset_email
from app.auth.forms import Reset... | 33.333333 | 78 | 0.647647 | 675 | 5,100 | 4.754074 | 0.194074 | 0.03272 | 0.039265 | 0.031162 | 0.371767 | 0.371767 | 0.336865 | 0.307261 | 0.307261 | 0.269243 | 0 | 0.001545 | 0.238431 | 5,100 | 152 | 79 | 33.552632 | 0.824665 | 0.141176 | 0 | 0.366071 | 0 | 0 | 0.107315 | 0.021555 | 0 | 0 | 0 | 0 | 0 | 1 | 0.098214 | false | 0.142857 | 0.071429 | 0.008929 | 0.3125 | 0.017857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
63e59bcf514276993297b798e6a593c65dcfaa90 | 101 | py | Python | backendcode/backendcode/meetingbotapi/apps.py | khadarkhaja/vergadering | c0e32868f9f66721c4d1ce4785a2c81f214cff0d | [
"Apache-2.0"
] | null | null | null | backendcode/backendcode/meetingbotapi/apps.py | khadarkhaja/vergadering | c0e32868f9f66721c4d1ce4785a2c81f214cff0d | [
"Apache-2.0"
] | 3 | 2020-06-05T17:52:31.000Z | 2021-06-10T20:01:01.000Z | backendcode/backendcode/meetingbotapi/apps.py | KhadarKR/vergadering | c0e32868f9f66721c4d1ce4785a2c81f214cff0d | [
"Apache-2.0"
] | 2 | 2018-03-09T16:07:53.000Z | 2018-03-09T16:23:49.000Z | from django.apps import AppConfig
class MeetingbotapiConfig(AppConfig):
name = 'meetingbotapi'
| 16.833333 | 37 | 0.782178 | 10 | 101 | 7.9 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.148515 | 101 | 5 | 38 | 20.2 | 0.918605 | 0 | 0 | 0 | 0 | 0 | 0.128713 | 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 |
63e70797bb6533aa7af56d1402997865c1e22f00 | 5,762 | py | Python | tests/conftest.py | brighthive/convert_descriptor_to_swagger | ac59504ddf70622fb76e68b23dfdf4555836d3bd | [
"MIT"
] | null | null | null | tests/conftest.py | brighthive/convert_descriptor_to_swagger | ac59504ddf70622fb76e68b23dfdf4555836d3bd | [
"MIT"
] | 3 | 2019-12-10T19:47:39.000Z | 2019-12-20T19:11:59.000Z | tests/conftest.py | brighthive/convert_descriptor_to_swagger | ac59504ddf70622fb76e68b23dfdf4555836d3bd | [
"MIT"
] | 1 | 2020-04-29T18:18:49.000Z | 2020-04-29T18:18:49.000Z | import pytest
@pytest.fixture
def people_descriptor():
people_descriptor = {
"api": {
"resource": "people",
"methods": [
{
"get": {"enabled": True, "secured": False, "grants": ["get:users"]},
"post": {"enabled": True, "secured... | 37.174194 | 109 | 0.264665 | 262 | 5,762 | 5.755725 | 0.251908 | 0.102122 | 0.167109 | 0.167772 | 0.537135 | 0.537135 | 0.537135 | 0.425729 | 0.319629 | 0.319629 | 0 | 0 | 0.60656 | 5,762 | 154 | 110 | 37.415584 | 0.665196 | 0 | 0 | 0.446667 | 0 | 0 | 0.224575 | 0.008157 | 0 | 0 | 0 | 0 | 0 | 1 | 0.013333 | false | 0 | 0.006667 | 0 | 0.033333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 |
63eafa1370aec52376e0eb5249d8c5a03ab04f00 | 3,652 | py | Python | fkie_node_manager_daemon/src/fkie_node_manager_daemon/exceptions.py | stertingen/multimaster_fkie | 95c2f5fae71c8337cc18b02db4e529b6900a91b2 | [
"BSD-3-Clause"
] | 1 | 2021-12-17T17:16:52.000Z | 2021-12-17T17:16:52.000Z | fkie_node_manager_daemon/src/fkie_node_manager_daemon/exceptions.py | stertingen/multimaster_fkie | 95c2f5fae71c8337cc18b02db4e529b6900a91b2 | [
"BSD-3-Clause"
] | null | null | null | fkie_node_manager_daemon/src/fkie_node_manager_daemon/exceptions.py | stertingen/multimaster_fkie | 95c2f5fae71c8337cc18b02db4e529b6900a91b2 | [
"BSD-3-Clause"
] | null | null | null | # Software License Agreement (BSD License)
#
# Copyright (c) 2018, Fraunhofer FKIE/CMS, Alexander Tiderko
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code mu... | 28.755906 | 93 | 0.705915 | 453 | 3,652 | 5.454746 | 0.359823 | 0.054634 | 0.032376 | 0.040469 | 0.347633 | 0.290571 | 0.273573 | 0.273573 | 0.234723 | 0.234723 | 0 | 0.002766 | 0.208105 | 3,652 | 126 | 94 | 28.984127 | 0.85166 | 0.424699 | 0 | 0.596491 | 0 | 0 | 0.034433 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0.087719 | 0.035088 | 0.175439 | 0.649123 | 0.017544 | 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 |
63ebf4963d4204c8dbbe68d7553ace82df66b666 | 27 | py | Python | robot2019-ros/tes.py | junhuizhou/ROS_Learning | bb3a0c867ba2bd147bbd59176cf1224c09a63914 | [
"MIT"
] | null | null | null | robot2019-ros/tes.py | junhuizhou/ROS_Learning | bb3a0c867ba2bd147bbd59176cf1224c09a63914 | [
"MIT"
] | 1 | 2021-05-07T07:30:11.000Z | 2021-05-07T07:30:11.000Z | robot2019-ros/tes.py | junhuizhou/ROS_Learning | bb3a0c867ba2bd147bbd59176cf1224c09a63914 | [
"MIT"
] | null | null | null | iii
fff
ff
qqqq
'fenzhi'
| 3.375 | 8 | 0.666667 | 5 | 27 | 3.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.259259 | 27 | 7 | 9 | 3.857143 | 0.9 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 5 |
63ebfe56217de2a71b781d285b140d7ffc405647 | 117 | py | Python | run.py | manugraj/ganimede | 2a9288d01768e09ef8f94252165960c78ab88df1 | [
"MIT"
] | 3 | 2021-06-23T06:08:58.000Z | 2022-01-15T20:56:54.000Z | run.py | manugraj/ganimede | 2a9288d01768e09ef8f94252165960c78ab88df1 | [
"MIT"
] | 2 | 2021-06-13T07:05:34.000Z | 2021-06-23T05:39:10.000Z | run.py | manugraj/ganimede | 2a9288d01768e09ef8f94252165960c78ab88df1 | [
"MIT"
] | 1 | 2022-02-01T08:32:59.000Z | 2022-02-01T08:32:59.000Z | import uvicorn
import src.main
if __name__ == '__main__':
uvicorn.run(src.main.app, host='0.0.0.0', port=8000)
| 16.714286 | 56 | 0.683761 | 20 | 117 | 3.6 | 0.6 | 0.083333 | 0.083333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 0.145299 | 117 | 6 | 57 | 19.5 | 0.64 | 0 | 0 | 0 | 0 | 0 | 0.128205 | 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 |
63ed2f6a1482852038d2f9ae5235dd2c3939a81d | 2,556 | py | Python | library/tutorial/06_module.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | library/tutorial/06_module.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | library/tutorial/06_module.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | import importlib
import time
import fibo
# import fibo as fib
"""
注解 出于效率的考虑,每个模块在每个解释器会话中只被导入一次。因此,如果你更改了你的模块,则必须重新启动解释器,
或者,如果它只是一个要交互式地测试的模块,请使用 importlib.reload(),例如 import importlib; importlib.reload(modulename)
"""
fibo.fib(1000)
fibo.fib2(100)
print(fibo.__name__)
time.sleep(20) ## 去修改fibo.py ,能看到修改后的结果
import... | 29.045455 | 212 | 0.811424 | 312 | 2,556 | 6.554487 | 0.615385 | 0.02934 | 0.031296 | 0.038142 | 0.076284 | 0.076284 | 0.076284 | 0.05379 | 0.037164 | 0 | 0 | 0.017514 | 0.084116 | 2,556 | 87 | 213 | 29.37931 | 0.856044 | 0.105634 | 0 | 0.181818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.454545 | 0 | 0.454545 | 0.181818 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 |
63ed58034bda81cab21aa5f59eaa6d0ba9a403da | 319 | py | Python | adminmgr/media/code/python/map2/BD_014_025_183_mapper.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 9 | 2019-11-08T02:05:27.000Z | 2021-12-13T12:06:35.000Z | adminmgr/media/code/python/map2/BD_014_025_183_mapper.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 6 | 2019-11-27T03:23:16.000Z | 2021-06-10T19:15:13.000Z | adminmgr/media/code/python/map2/BD_014_025_183_mapper.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 4 | 2019-11-26T17:04:27.000Z | 2021-12-13T11:57:03.000Z | #!/usr/bin/python3
import csv
import sys
batsman = ""
bowler = ""
runs = None
reader = []
myfile = sys.stdin
for line in myfile:
line = line.strip()
row = line.split(',')
if(row[0] == "ball"):
batsman = row[4]
bowler = row[6]
runs = int(row[7]) + int(row[8])
print("%s,%s,%d" % (batsman, bowler, runs))
| 15.190476 | 45 | 0.583072 | 49 | 319 | 3.795918 | 0.612245 | 0.139785 | 0.182796 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.023622 | 0.203762 | 319 | 20 | 46 | 15.95 | 0.708661 | 0.053292 | 0 | 0 | 0 | 0 | 0.043189 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.133333 | 0 | 0.133333 | 0.066667 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
63efa7f3316645c1c7ea8bae8301f606880ac73c | 240 | py | Python | Chapter 4/subscriber.py | PacktPublishing/Mastering-IPython-4 | d752f7ba38e0c9399a83d57da406fe26152f272b | [
"MIT"
] | 22 | 2016-06-07T07:52:35.000Z | 2021-11-08T13:12:21.000Z | Chapter 4/subscriber.py | PacktPublishing/Mastering-IPython-4 | d752f7ba38e0c9399a83d57da406fe26152f272b | [
"MIT"
] | 2 | 2016-05-23T08:20:54.000Z | 2018-07-02T08:21:32.000Z | Chapter 4/subscriber.py | PacktPublishing/Mastering-IPython-4 | d752f7ba38e0c9399a83d57da406fe26152f272b | [
"MIT"
] | 27 | 2016-05-23T08:19:51.000Z | 2021-08-31T02:46:00.000Z | import zmq
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect("tcp://localhost:5555")
socket.setsockopt_string(zmq.SUBSCRIBE, “weather”)
while True:
wtr = socket.recv_string()
print(“the weather is: “ + wtr)
| 20 | 50 | 0.7125 | 32 | 240 | 5.28125 | 0.625 | 0.118343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019324 | 0.1375 | 240 | 11 | 51 | 21.818182 | 0.797101 | 0 | 0 | 0 | 0 | 0 | 0.083682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.125 | null | null | 0.125 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
63f00ee89c5fd40dc28452a69994969bb19dc442 | 6,876 | py | Python | packages/vaex-core/vaex/file/cache.py | lrq3000/vaex | 00c83d1fe2b73330705ef63e649abc9dfc8f2478 | [
"MIT"
] | null | null | null | packages/vaex-core/vaex/file/cache.py | lrq3000/vaex | 00c83d1fe2b73330705ef63e649abc9dfc8f2478 | [
"MIT"
] | null | null | null | packages/vaex-core/vaex/file/cache.py | lrq3000/vaex | 00c83d1fe2b73330705ef63e649abc9dfc8f2478 | [
"MIT"
] | null | null | null | try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
import logging
import os
import mmap
import numpy as np
import vaex.utils
import vaex.file
DEFAULT_BLOCK_SIZE = 1024*1024*1 # 1mb by default
logger = logging.getLogger("vaex.file.cache")
class MMappedFile:
"""Sma... | 35.443299 | 133 | 0.596131 | 939 | 6,876 | 4.171459 | 0.197018 | 0.041358 | 0.027572 | 0.028593 | 0.209344 | 0.116416 | 0.080163 | 0.049017 | 0.016339 | 0.016339 | 0 | 0.008735 | 0.300756 | 6,876 | 193 | 134 | 35.626943 | 0.805948 | 0.105876 | 0 | 0.103448 | 0 | 0 | 0.029107 | 0.004933 | 0 | 0 | 0 | 0 | 0.013793 | 1 | 0.124138 | false | 0 | 0.062069 | 0.041379 | 0.262069 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |