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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a657192a2a6097dd374a729b11c2e62a804c6b55 | 6,581 | py | Python | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-09-15T10:10:26.000Z | 2021-09-15T10:10:26.000Z | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | null | null | null | bin/postprocess-exe.py | ktanidis2/Modified_CosmoSIS_for_galaxy_number_count_angular_power_spectra | 07e5d308c6a8641a369a3e0b8d13c4104988cd2b | [
"BSD-2-Clause"
] | 1 | 2021-06-11T15:29:43.000Z | 2021-06-11T15:29:43.000Z | #!/usr/bin/env python
from __future__ import print_function
from cosmosis.postprocessing.postprocess import postprocessor_for_sampler
from cosmosis.postprocessing.inputs import read_input
from cosmosis.postprocessing.plots import Tweaks
from cosmosis.runtime.utils import mkdir
import sys
import argparse
import os
par... | 53.072581 | 183 | 0.752925 | 1,021 | 6,581 | 4.760039 | 0.290891 | 0.076955 | 0.055967 | 0.035185 | 0.169342 | 0.100823 | 0.064198 | 0.034979 | 0 | 0 | 0 | 0.002952 | 0.124905 | 6,581 | 123 | 184 | 53.504065 | 0.840945 | 0.104543 | 0 | 0 | 0 | 0.02439 | 0.4355 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.012195 | false | 0 | 0.097561 | 0 | 0.121951 | 0.02439 | 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 |
a6571d51ba20f89c596630ca6b73cb59f6d6f6e4 | 224 | py | Python | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | Task 3.py | IsSveshuD/lab_10 | 7b6c6f69e9ee272e95300f325b1f1a251b3b07b6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding^ utf-8 -*-
def t():
r = 1
while 1:
ch = int(input())
if not ch: break
r *= ch
print(r)
return (r)
if __name__ == '__main__':
print(t())
| 13.176471 | 26 | 0.446429 | 31 | 224 | 2.967742 | 0.709677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028571 | 0.375 | 224 | 16 | 27 | 14 | 0.628571 | 0.191964 | 0 | 0 | 0 | 0 | 0.044693 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0 | 0 | 0.2 | 0.2 | 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 |
a6592e64bf1d5f88b19a5726eb07a0d0e13e1847 | 1,715 | py | Python | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | 2 | 2021-10-01T20:51:20.000Z | 2021-11-12T04:45:16.000Z | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | null | null | null | setup.py | AmineSoukara/PyAnime4Up | 495c6123a60e28e8a447da4152793c9201729e6a | [
"MIT"
] | null | null | null | """
PyAnime4Up
~~~~~~~~~
:Copyright: (c) 2021 By Amine Soukara <https://github.com/AmineSoukara>.
:License: MIT, See LICENSE For More Details.
:Description: A Selenium-less Python Anime4Up Library
"""
from setuptools import find_packages, setup
AUTHOR = "AmineSoukara"
EMAIL = "AmineSoukara@gmail.com"
URL = "https://g... | 30.625 | 77 | 0.653061 | 183 | 1,715 | 6.054645 | 0.535519 | 0.049639 | 0.063177 | 0.117329 | 0.211191 | 0.081227 | 0.081227 | 0 | 0 | 0 | 0 | 0.021106 | 0.198834 | 1,715 | 55 | 78 | 31.181818 | 0.785298 | 0.127114 | 0 | 0 | 0 | 0 | 0.515111 | 0.014775 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.025 | 0 | 0.025 | 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 |
a659c422f6fefeb24b335ffa862836f6bd0ada52 | 1,032 | py | Python | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | 2 | 2021-03-26T03:54:43.000Z | 2021-03-28T10:51:19.000Z | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | null | null | null | test/test_middleware.py | sunhailin-Leo/fastapi_apollo_middleware | 32351406141dbd87254efd4516288a556adbe72a | [
"MIT"
] | null | null | null | import time
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from fastapi_apollo_middleware.middleware import (
FastAPIApolloMiddleware,
startup_apollo_cycle_task,
)
@pytest.fixture(name="test_middleware")
def test_middleware():
def _test_middleware(**profiler_kwargs)... | 23.454545 | 71 | 0.669574 | 107 | 1,032 | 6.224299 | 0.35514 | 0.126126 | 0.076577 | 0.094595 | 0.072072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.243217 | 1,032 | 43 | 72 | 24 | 0.852753 | 0.006783 | 0 | 0.064516 | 0 | 0 | 0.086999 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.129032 | false | 0 | 0.16129 | 0.032258 | 0.451613 | 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 |
a65cc33c30371070823025c24bcfdcb3d64f61dc | 655 | py | Python | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | null | null | null | HW/final/test/preprocess.py | houzeyu2683/IRRHW | c44298ad14c468eff36bc75ebc63abdc9ba24d55 | [
"Apache-2.0"
] | 1 | 2022-01-16T03:40:34.000Z | 2022-01-16T03:40:34.000Z |
import pandas
'''
根據文本資料,建構 term document matrix 矩陣,
存放在指定的位置。
'''
information = pandas.read_csv("csv/information.csv")
import text
vocabulary = text.vocabulary()
vocabulary.build(content = information['abstract'], title=information['title_e'])
matrix = pandas.DataFrame(vocabulary.frequency, dtype='int')
matrix.i... | 22.586207 | 89 | 0.757252 | 81 | 655 | 6.08642 | 0.54321 | 0.056795 | 0.105477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011725 | 0.08855 | 655 | 28 | 90 | 23.392857 | 0.81407 | 0 | 0 | 0 | 0 | 0 | 0.151675 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.166667 | 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 |
a65d8a9e5583c81d0cc550a14888526c903f8d10 | 5,039 | py | Python | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | 2 | 2021-12-20T00:47:06.000Z | 2021-12-21T15:04:42.000Z | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | null | null | null | fai/files.py | st31ny/pyfai | e81aa4b6a62bb4b5f27b5dc7e83dc2fa93862846 | [
"MIT"
] | null | null | null | """ File Handling
=============
Pyfai strictly differentiates between virtual paths in the target system
(:any:`TargetPath`) and physical paths in the installer system
(:any:`InstallerPath`). While the former are always rooted in the target
system's filesystem root, only the latter can be resolved ... | 33.593333 | 86 | 0.670173 | 674 | 5,039 | 4.937685 | 0.292285 | 0.016526 | 0.019832 | 0.025541 | 0.095553 | 0.0622 | 0.022236 | 0 | 0 | 0 | 0 | 0.00356 | 0.219488 | 5,039 | 149 | 87 | 33.818792 | 0.842614 | 0.54872 | 0 | 0.224138 | 0 | 0 | 0.044799 | 0.011843 | 0 | 0 | 0 | 0 | 0.086207 | 1 | 0.086207 | false | 0 | 0.068966 | 0 | 0.189655 | 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 |
a65e4a75490f93c29d34c895001bf593d4b147ba | 1,595 | py | Python | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-09-04T09:01:03.000Z | 2022-01-04T20:09:00.000Z | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-12-15T08:11:22.000Z | 2020-12-29T19:11:13.000Z | libs/openldap/openldap.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 19 | 2017-09-05T19:16:21.000Z | 2020-10-18T12:46:06.000Z | import info
class subinfo(info.infoclass):
def setTargets(self):
for ver in ['2.4.28', '2.4.33', '2.4.36', '2.4.45']:
self.targets[ver] = ('ftp://ftp.openldap.org/pub/OpenLDAP/'
'openldap-release/openldap-' + ver + '.tgz')
self.targetInstSrc[ver] = ... | 43.108108 | 103 | 0.64326 | 187 | 1,595 | 5.433155 | 0.374332 | 0.035433 | 0.023622 | 0.088583 | 0.11811 | 0.11811 | 0.072835 | 0.072835 | 0.072835 | 0.072835 | 0 | 0.141304 | 0.192476 | 1,595 | 36 | 104 | 44.305556 | 0.647516 | 0.089028 | 0 | 0 | 0 | 0 | 0.348276 | 0.205517 | 0 | 0 | 0 | 0 | 0 | 1 | 0.12 | false | 0 | 0.08 | 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 |
a65e59791dc58d5a43721bf93a162bd5c1d59c87 | 4,610 | py | Python | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | cogs/fun/cog.py | uselessvevo/bonny-biboni-bot | ad6d0dc9e688dc9264638103bd07c8a95c2aaa56 | [
"MIT"
] | null | null | null | """
Description: Old fun module. Will be rewritten
Version: 0620/prototype
Author: useless_vevo
"""
# Standard library
import os
import hashlib
import requests
from io import BytesIO
# Discord
import discord
from discord.ext import commands
# Pillow/PIL
from PIL import Image
from PIL import ImageFont
from PIL import... | 35.736434 | 92 | 0.565727 | 562 | 4,610 | 4.414591 | 0.275801 | 0.056429 | 0.028214 | 0.032245 | 0.28295 | 0.208787 | 0.180572 | 0.108021 | 0.054817 | 0.054817 | 0 | 0.023499 | 0.335358 | 4,610 | 128 | 93 | 36.015625 | 0.786227 | 0.081562 | 0 | 0.139535 | 0 | 0 | 0.042705 | 0.028944 | 0 | 0 | 0 | 0 | 0 | 1 | 0.034884 | false | 0.011628 | 0.127907 | 0 | 0.197674 | 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 |
a6641926389cb84ab0fd992f95aedcd6c3ef503b | 1,079 | py | Python | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | tests/test_regions.py | luigialberti/pytriangle | 99ecafc299a692ef0f33e262bc7a1c912d3aa694 | [
"MIT"
] | null | null | null | import math
import triangle
import numpy
pointBoundary = [ (-1, -1),
(-1, 1.0),
( 0, 1.0),
( 0, -1),
( 1, 1),
( 1, -3)]
points = pointBoundary
segs = [(0, 1),(1, 2),(2, 3),(3, 0), (2, 4), (4, 5), (5, 3)]
# these are ph... | 22.957447 | 77 | 0.586654 | 174 | 1,079 | 3.603448 | 0.465517 | 0.022329 | 0.019139 | 0.012759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.065081 | 0.2595 | 1,079 | 46 | 78 | 23.456522 | 0.71965 | 0.414272 | 0 | 0 | 0 | 0 | 0.008052 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.136364 | 0 | 0.136364 | 0.090909 | 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 |
a665215b275a48c5f84ca29a35c2258cf294cefc | 4,703 | py | Python | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | 1 | 2017-02-09T14:52:25.000Z | 2017-02-09T14:52:25.000Z | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | null | null | null | src/Tester.py | ujjawalmisra/json-ws-test | bece383d414c12b8827afc59da5c7a98d4c46b0f | [
"MIT"
] | null | null | null | import argparse
import json
import pprint
import Logger
from executors.EndLoopExecutor import EndLoopExecutor
from executors.ExecutorFactory import ExecutorFactory
from DictUtils import DictUtils
class Tester:
__LOGGER = Logger.getLogger('Tester')
def __init__(self, configFilePath):
Tester.... | 37.624 | 94 | 0.51818 | 438 | 4,703 | 5.340183 | 0.251142 | 0.117999 | 0.12313 | 0.076956 | 0.264643 | 0.186404 | 0.179564 | 0.102608 | 0.078239 | 0 | 0 | 0.010906 | 0.298108 | 4,703 | 124 | 95 | 37.927419 | 0.697667 | 0.015097 | 0 | 0.22549 | 0 | 0 | 0.137208 | 0.027658 | 0.019608 | 0 | 0 | 0 | 0 | 1 | 0.078431 | false | 0.039216 | 0.068627 | 0.009804 | 0.22549 | 0.029412 | 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 |
a666e2b483e7e338818d32db2cd3f68b92fb8795 | 7,504 | py | Python | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | null | null | null | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | null | null | null | tests/L0/run_transformer/run_gpt_minimal_test.py | jpool-nv/apex | d36397d2b8ce5c8854997e4ec2828e056e8fda89 | [
"BSD-3-Clause"
] | 1 | 2021-12-20T00:49:01.000Z | 2021-12-20T00:49:01.000Z | from functools import partial
from typing import List
import time
import torch
from apex.transformer import parallel_state
from apex.transformer.tensor_parallel import model_parallel_cuda_manual_seed
from apex.transformer.pipeline_parallel.utils import setup_microbatch_calculator
from apex.transformer.pipeli... | 38.482051 | 244 | 0.678971 | 927 | 7,504 | 5.171521 | 0.257821 | 0.046099 | 0.047559 | 0.036504 | 0.38569 | 0.308719 | 0.19587 | 0.121193 | 0.055069 | 0.037547 | 0 | 0.016129 | 0.239872 | 7,504 | 194 | 245 | 38.680412 | 0.824334 | 0.087287 | 0 | 0.077922 | 0 | 0.006494 | 0.058504 | 0 | 0 | 0 | 0 | 0 | 0.006494 | 1 | 0.038961 | false | 0 | 0.103896 | 0 | 0.181818 | 0.045455 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
a66d35e9c6f79553a73555c39661a31163d7a94c | 16,851 | py | Python | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | null | null | null | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | null | null | null | src/auth/wxapi/wechat_api.py | zeroleo12345/authen | 700e5b6842aecc61c0a3f96bd5ef480fbeecbc46 | [
"MIT"
] | 1 | 2019-11-13T05:59:35.000Z | 2019-11-13T05:59:35.000Z | #coding:utf-8
import sys
import traceback
import time
import datetime
import pytz
import base64
import binascii
import hashlib
# 第三方库
from flask import Flask, request, redirect, jsonify, session, abort, render_template, Response
from decouple import config
# 自己的库
from mybase.mylog3 import log
from mybase.myencrypt2 im... | 46.808333 | 499 | 0.600142 | 1,980 | 16,851 | 4.927273 | 0.147475 | 0.045203 | 0.012915 | 0.0164 | 0.592661 | 0.545818 | 0.52132 | 0.49221 | 0.475707 | 0.449877 | 0 | 0.01198 | 0.261943 | 16,851 | 359 | 500 | 46.938719 | 0.772453 | 0.08949 | 0 | 0.408935 | 0 | 0.030928 | 0.21968 | 0.009742 | 0 | 0 | 0 | 0 | 0 | 1 | 0.037801 | false | 0.003436 | 0.061856 | 0 | 0.185567 | 0.003436 | 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 |
a66da1cf042e3419a188397e4e43b785aa423282 | 935 | py | Python | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | null | null | null | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | 1 | 2021-06-02T01:44:04.000Z | 2021-06-02T01:44:04.000Z | main.py | TheRockerfly/weather_app | 60e9dd8e535c0dfc318c8064bce6b31492943e93 | [
"MIT"
] | null | null | null | from pprint import pprint as pp
from flask import Flask, render_template, request
from module.weather import query_api
app = Flask(__name__)
@app.route('/')
def index():
return render_template(
'weather.html',
data=[{'name': 'Toronto'}, {'name': 'Montreal'}, {'name': 'Calgary'},
{'n... | 25.27027 | 80 | 0.571123 | 106 | 935 | 4.867925 | 0.481132 | 0.081395 | 0.077519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001422 | 0.248128 | 935 | 36 | 81 | 25.972222 | 0.732575 | 0 | 0 | 0.068966 | 0 | 0 | 0.218182 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.068966 | false | 0 | 0.103448 | 0.034483 | 0.241379 | 0.034483 | 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 |
a67191887ff2e4cbe5a722f8867e0bdf2eaf5490 | 1,256 | py | Python | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 1,379 | 2021-11-10T02:42:21.000Z | 2022-03-31T13:34:25.000Z | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 268 | 2021-11-10T14:07:34.000Z | 2022-03-31T02:25:20.000Z | audio/tests/backends/base.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 296 | 2021-11-15T02:37:11.000Z | 2022-03-31T12:14:46.000Z | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.885714 | 77 | 0.725318 | 175 | 1,256 | 5.16 | 0.588571 | 0.066445 | 0.046512 | 0.056478 | 0.093023 | 0.093023 | 0.093023 | 0 | 0 | 0 | 0 | 0.00779 | 0.182325 | 1,256 | 34 | 78 | 36.941176 | 0.87147 | 0.464172 | 0 | 0 | 0 | 0 | 0.162367 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1875 | false | 0 | 0.1875 | 0 | 0.4375 | 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 |
a671fe0e76961bcf5c4e0d73d1fd01eb4c998058 | 6,091 | py | Python | 07keras/09fasttext_multi_classification.py | KEVINYZY/python-tutorial | ae43536908eb8af56c34865f52a6e8644edc4fa3 | [
"Apache-2.0"
] | 2 | 2021-01-04T10:44:44.000Z | 2022-02-13T07:53:41.000Z | 07keras/09fasttext_multi_classification.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | null | null | null | 07keras/09fasttext_multi_classification.py | zm79287/python-tutorial | d0f7348e1da4ff954e3add66e1aae55d599283ee | [
"Apache-2.0"
] | 2 | 2020-11-23T08:58:51.000Z | 2022-02-13T07:53:42.000Z | # -*- coding: utf-8 -*-
# Author: XuMing <xuming624@qq.com>
# Brief: This example demonstrates the use of fasttext for text classification
# Bi-gram : 0.9056 test accuracy after 5 epochs.
import os
import keras
import numpy as np
from keras.layers import Dense
from keras.layers import Embedding
from keras.layers impor... | 34.805714 | 102 | 0.67099 | 937 | 6,091 | 4.149413 | 0.219851 | 0.024691 | 0.020576 | 0.021605 | 0.164095 | 0.14249 | 0.105453 | 0.088477 | 0.064815 | 0.024177 | 0 | 0.023337 | 0.197997 | 6,091 | 174 | 103 | 35.005747 | 0.772569 | 0.161221 | 0 | 0.025862 | 0 | 0 | 0.117494 | 0.034828 | 0 | 0 | 0 | 0 | 0.008621 | 1 | 0.034483 | false | 0 | 0.068966 | 0 | 0.137931 | 0.189655 | 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 |
a675137fe059ab035f6c8c74928e31aa79eec616 | 961 | py | Python | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | null | null | null | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | 10 | 2020-02-11T23:54:49.000Z | 2022-03-11T23:42:36.000Z | scrapy_store_project/goods/tasks.py | MaksNech/pylab2018_ht_22 | 5c862b23203e93bf4cbdf5f1e5777f29052f2f69 | [
"MIT"
] | 1 | 2020-12-02T09:32:19.000Z | 2020-12-02T09:32:19.000Z | import requests
import tempfile
from celery.task import task
from django.core import files
from celery.utils.log import get_task_logger
from .models import Bag
logger = get_task_logger(__name__)
@task(
name="save_goods_to_db"
)
def save_goods_to_db(items_list):
for item in items_list:
bag = Bag(
... | 24.025 | 58 | 0.591051 | 118 | 961 | 4.644068 | 0.457627 | 0.04927 | 0.047445 | 0.047445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00885 | 0.294485 | 961 | 39 | 59 | 24.641026 | 0.79941 | 0 | 0 | 0 | 0 | 0 | 0.064516 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032258 | false | 0 | 0.193548 | 0 | 0.225806 | 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 |
a6762cb2023d77e741f45f1530edf25cc49e8843 | 2,835 | py | Python | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | bokeh-app/main.py | jdkent/hrfViz | ab9cf3587cd8387388550f3bef3086ff866a7559 | [
"BSD-3-Clause"
] | null | null | null | ''' Present an interactive function explorer with slider widgets.
Scrub the sliders to change the properties of the ``hrf`` curve, or
type into the title text box to update the title of the plot.
Use the ``bokeh serve`` command to run the example by executing:
bokeh serve sliders.py
at your command prompt. Then nav... | 33.75 | 96 | 0.699824 | 462 | 2,835 | 4.218615 | 0.311688 | 0.010262 | 0.024628 | 0.010775 | 0.201129 | 0.201129 | 0.172396 | 0.147768 | 0.103643 | 0.103643 | 0 | 0.037288 | 0.167549 | 2,835 | 83 | 97 | 34.156627 | 0.788559 | 0.186243 | 0 | 0.041667 | 0 | 0 | 0.061928 | 0.015264 | 0 | 0 | 0 | 0 | 0 | 1 | 0.041667 | false | 0 | 0.145833 | 0 | 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 |
a67778c67ef1eefa67194e04daebceb9183fd006 | 682 | py | Python | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 227 | 2019-04-09T00:36:00.000Z | 2022-03-29T05:05:03.000Z | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 139 | 2019-06-14T01:53:11.000Z | 2022-02-16T11:08:40.000Z | python-leetcode/laozhang/tree/leetcode_814_.py | sweeneycai/cs-summary-reflection | c4220b153baa6b1b93a11c7e5637d42e3429481f | [
"Apache-2.0"
] | 89 | 2019-04-10T07:00:54.000Z | 2022-03-23T01:36:03.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# coding=utf-8
"""
814. 二叉树剪枝
"""
from laozhang import TreeNode
class Solution:
def pruneTree(self, root: TreeNode) -> TreeNode:
def helper(root: TreeNode) -> TreeNode:
if root:
helper(root.left)
helper(root.right)... | 28.416667 | 107 | 0.530792 | 85 | 682 | 4.258824 | 0.341176 | 0.132597 | 0.110497 | 0.055249 | 0.077348 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018433 | 0.363636 | 682 | 23 | 108 | 29.652174 | 0.815668 | 0.09824 | 0 | 0.142857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.071429 | 0 | 0.357143 | 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 |
a6777a5db732418a0a72fdae43c10c8041048b60 | 4,816 | py | Python | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | .pyinstaller/run_astropy_tests.py | lmichel/astropy | 67f944f6145ae4899e7bf6e335ffcb24c9493ac3 | [
"BSD-3-Clause"
] | null | null | null | import os
import shutil
import sys
import erfa # noqa
import pytest
import astropy # noqa
if len(sys.argv) == 3 and sys.argv[1] == '--astropy-root':
ROOT = sys.argv[2]
else:
# Make sure we don't allow any arguments to be passed - some tests call
# sys.executable which becomes this script when producing... | 44.592593 | 95 | 0.648463 | 662 | 4,816 | 4.55136 | 0.351964 | 0.04381 | 0.06306 | 0.056422 | 0.212745 | 0.176236 | 0.159642 | 0.107202 | 0.085961 | 0.070362 | 0 | 0.002447 | 0.236296 | 4,816 | 107 | 96 | 45.009346 | 0.816748 | 0.321429 | 0 | 0.0625 | 0 | 0 | 0.316342 | 0.100093 | 0 | 0 | 0 | 0.009346 | 0 | 1 | 0 | false | 0.015625 | 0.109375 | 0 | 0.109375 | 0.015625 | 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 |
a680b15fd060d64cf9e6fa6cd3e6835e870e01ee | 5,109 | py | Python | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | 2 | 2020-02-03T22:08:15.000Z | 2021-03-11T18:37:47.000Z | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations_Back_End | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | null | null | null | DataManagements/UserCatesDBManagement.py | CHUht/Hangout_Recommendations_Back_End | 477752da8259e821bb58487cdb9d483a6b208a3f | [
"MIT"
] | null | null | null | import sqlite3
from DataManagements.BackendAPIStaticList import singleton
from DataManagements.BackendAPIStaticList import cate_map
@singleton
class UserCatesManager:
def __init__(self):
pass
def dbconnect(self):
"""
connect to the database
:return: None
"""
sel... | 30.963636 | 83 | 0.562145 | 534 | 5,109 | 5.194757 | 0.245318 | 0.057678 | 0.049027 | 0.060562 | 0.359048 | 0.270728 | 0.204398 | 0.155732 | 0.105984 | 0.075703 | 0 | 0.007541 | 0.351145 | 5,109 | 164 | 84 | 31.152439 | 0.829261 | 0.188491 | 0 | 0.475248 | 0 | 0 | 0.210747 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.09901 | false | 0.009901 | 0.029703 | 0 | 0.178218 | 0.039604 | 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 |
a683a3c1e348a3f60fd5ed371539e1911665f6e6 | 2,255 | py | Python | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | pupillae/fons/generator/dice_roller.py | chomouri/pupillae | 7c178eee78e5bff224c8982ca0a3674ea8830e55 | [
"MIT"
] | null | null | null | import random
import re
# Third-party modules:
# Local modules:
# Function WAI:
def roll_3d6():
"""Rolls 3d6"""
total = 0
for i in range(3):
roll = random.randint(1, 6)
# print(f"Rolling 1d6: {roll}")
total += roll
return total
# Function WAI:
def roll_4d6d():
"""Rolls 4d6... | 27.5 | 77 | 0.536585 | 294 | 2,255 | 3.996599 | 0.340136 | 0.054468 | 0.071489 | 0.028085 | 0.29617 | 0.238298 | 0.166809 | 0.142979 | 0.142979 | 0.142979 | 0 | 0.024793 | 0.356098 | 2,255 | 81 | 78 | 27.839506 | 0.784435 | 0.122838 | 0 | 0.196721 | 0 | 0.016393 | 0.126595 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.081967 | false | 0 | 0.032787 | 0 | 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 |
a684db8114e6f751f36ca0a1f53bcfc8192318de | 3,088 | py | Python | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | 1 | 2019-10-21T08:54:32.000Z | 2019-10-21T08:54:32.000Z | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | 1 | 2021-06-02T00:33:01.000Z | 2021-06-02T00:33:01.000Z | tests/test_swaplink.py | aratz-lasa/py-swaplink | a1821953704215648749ccde65d6c4d9201998af | [
"MIT"
] | null | null | null | import asyncio
import random
from asyncio import Event
from typing import List, Any
import pytest
from swaplink import defaults
from tests.utils import setup_network_by_relative_loads
# for speeding up tests
defaults.HBEAT_SEND_FREQUENCY *= 0.3
defaults.HBEAT_CHECK_FREQUENCY *= 0.3
defaults.RPC_TIMEOUT *= 0.3
@pyt... | 29.692308 | 82 | 0.731865 | 414 | 3,088 | 5.142512 | 0.202899 | 0.050728 | 0.067637 | 0.051667 | 0.633631 | 0.581494 | 0.581494 | 0.564115 | 0.564115 | 0.542508 | 0 | 0.016881 | 0.194301 | 3,088 | 103 | 83 | 29.980583 | 0.838826 | 0.045013 | 0 | 0.487179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009709 | 0.051282 | 1 | 0.012821 | false | 0 | 0.089744 | 0 | 0.102564 | 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 |
a6850dc67dbc459d1feab97522a0718104e78923 | 846 | py | Python | opening_window.py | m3hrab/Snake-and-ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | 1 | 2021-10-04T04:01:49.000Z | 2021-10-04T04:01:49.000Z | opening_window.py | m3hrab/Snake-and-Ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | null | null | null | opening_window.py | m3hrab/Snake-and-Ladder-game | bc69d280eb893eb658701218b7b42e321e5c41f3 | [
"MIT"
] | null | null | null | import pygame
import time
class Intro():
"""
A class that represent opening window of the game
and this window hold the play button, music button,
game sound button
"""
def __init__(self,screen):
self.screen = screen
def show_open_window(self):
# load the i... | 24.171429 | 60 | 0.599291 | 105 | 846 | 4.647619 | 0.428571 | 0.122951 | 0.086066 | 0.07377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00354 | 0.332151 | 846 | 34 | 61 | 24.882353 | 0.860177 | 0.295508 | 0 | 0 | 0 | 0 | 0.030019 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.153846 | 0 | 0.384615 | 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 |
a68586830537b4c7d2e69cd8efe90faed5602e2b | 13,741 | py | Python | gewittergefahr/scripts/deep_learning_helper.py | dopplerchase/GewitterGefahr | 4415b08dd64f37eba5b1b9e8cc5aa9af24f96593 | [
"MIT"
] | 26 | 2018-10-04T01:07:35.000Z | 2022-01-29T08:49:32.000Z | gewittergefahr/scripts/deep_learning_helper.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 4 | 2017-12-25T02:01:08.000Z | 2018-12-19T01:54:21.000Z | gewittergefahr/scripts/deep_learning_helper.py | liuximarcus/GewitterGefahr | d819874d616f98a25187bfd3091073a2e6d5279e | [
"MIT"
] | 11 | 2017-12-10T23:05:29.000Z | 2022-01-29T08:49:33.000Z | """Handles input args for training deep-learning models."""
import numpy
from gewittergefahr.gg_utils import soundings
from gewittergefahr.deep_learning import cnn
from gewittergefahr.deep_learning import deep_learning_utils as dl_utils
TIME_FORMAT = '%Y-%m-%d-%H%M%S'
SOUNDING_HEIGHTS_M_AGL = soundings.DEFAULT_HEIGHT... | 40.414706 | 80 | 0.755695 | 1,893 | 13,741 | 5.07607 | 0.127839 | 0.049537 | 0.054844 | 0.080654 | 0.571652 | 0.492351 | 0.429805 | 0.335519 | 0.276199 | 0.229576 | 0 | 0.003885 | 0.157121 | 13,741 | 339 | 81 | 40.533923 | 0.825764 | 0.019358 | 0 | 0.22179 | 0 | 0.003891 | 0.320443 | 0.081133 | 0 | 0 | 0 | 0 | 0 | 1 | 0.003891 | false | 0 | 0.015564 | 0 | 0.023346 | 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 |
a6864cff30190d27e7138fb69ceaf1b96919cb06 | 1,859 | py | Python | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | 4 | 2022-02-17T22:26:14.000Z | 2022-03-31T05:45:53.000Z | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | 8 | 2022-02-19T01:37:16.000Z | 2022-03-29T21:12:29.000Z | custom_components/rinnaitouch/__init__.py | funtastix/rinnaitouch | 272b3a4dcd8bcb66a9656c3f9ca497a74a7244b6 | [
"MIT"
] | null | null | null | """Set up main entity."""
# pylint: disable=duplicate-code
import logging
from dataclasses import dataclass
from homeassistant.config_entries import ConfigEntry
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.const import CONF_HOST
from homeassistant.core import HomeAssistant
from homeassis... | 26.942029 | 95 | 0.731038 | 212 | 1,859 | 6.254717 | 0.415094 | 0.076923 | 0.033183 | 0.042232 | 0.057315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.18397 | 1,859 | 68 | 96 | 27.338235 | 0.874094 | 0.077999 | 0 | 0 | 0 | 0 | 0.016169 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.021739 | false | 0.021739 | 0.217391 | 0 | 0.369565 | 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 |
a686bc5588bf96d2912d72d16b95f0e69f7601c3 | 4,238 | py | Python | python/pydiffx/dom/writer.py | beanbaginc/diffx | d913b4c94fa91bdabd8083882bd1acbe451ed5f8 | [
"MIT"
] | null | null | null | python/pydiffx/dom/writer.py | beanbaginc/diffx | d913b4c94fa91bdabd8083882bd1acbe451ed5f8 | [
"MIT"
] | null | null | null | python/pydiffx/dom/writer.py | beanbaginc/diffx | d913b4c94fa91bdabd8083882bd1acbe451ed5f8 | [
"MIT"
] | 1 | 2022-02-20T16:29:08.000Z | 2022-02-20T16:29:08.000Z | """Writer for generating a DiffX file from DOM objects."""
from __future__ import unicode_literals
import six
from pydiffx.writer import DiffXWriter
from pydiffx.sections import CONTENT_SECTIONS
class DiffXDOMWriter(object):
"""A writer for generating a DiffX file from DOM objects.
This will write a :py:c... | 30.271429 | 77 | 0.596272 | 467 | 4,238 | 5.280514 | 0.261242 | 0.028386 | 0.041363 | 0.034063 | 0.317518 | 0.306164 | 0.226683 | 0.194242 | 0.164639 | 0.092457 | 0 | 0 | 0.327513 | 4,238 | 139 | 78 | 30.489209 | 0.865263 | 0.434875 | 0 | 0.040816 | 0 | 0 | 0.033103 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.102041 | false | 0 | 0.081633 | 0 | 0.285714 | 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 |
a687d7feca22a1b98095bff58c06be97ab2cb464 | 1,540 | py | Python | L3_numpy_pandas_2D/A_2D_data.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | L3_numpy_pandas_2D/A_2D_data.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | L3_numpy_pandas_2D/A_2D_data.py | angelmtenor/IDAFC | 9d23746fd02e4eda2569d75b3c7a1383277e6e78 | [
"MIT"
] | null | null | null | import numpy as np
# Subway ridership for 5 stations on 10 different days
ridership = np.array([
[0, 0, 2, 5, 0],
[1478, 3877, 3674, 2328, 2539],
[1613, 4088, 3991, 6461, 2691],
[1560, 3392, 3826, 4787, 2613],
[1608, 4802, 3932, 4477, 2705],
[1576, 3933, 3909, 4979, 2685],
[95, 229, 255, 49... | 28 | 76 | 0.63961 | 238 | 1,540 | 4.071429 | 0.52521 | 0.072239 | 0.04644 | 0.043344 | 0.173375 | 0.066047 | 0 | 0 | 0 | 0 | 0 | 0.164315 | 0.217532 | 1,540 | 54 | 77 | 28.518519 | 0.639834 | 0.343506 | 0 | 0.1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033333 | false | 0 | 0.033333 | 0 | 0.1 | 0.233333 | 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 |
a688464b1c3891545d1f144a4ff2e40f465e7ddf | 1,158 | py | Python | tests/init/feature.py | Carsten-Leue/ReduxPY | 3ca633c4d4d8a53418ee1049d571d1094feb14be | [
"MIT"
] | 13 | 2020-04-30T15:06:45.000Z | 2021-11-28T20:57:34.000Z | tests/init/feature.py | Carsten-Leue/ReduxPY | 3ca633c4d4d8a53418ee1049d571d1094feb14be | [
"MIT"
] | 4 | 2020-04-29T19:43:10.000Z | 2021-02-04T15:19:44.000Z | tests/init/feature.py | Carsten-Leue/ReduxPY | 3ca633c4d4d8a53418ee1049d571d1094feb14be | [
"MIT"
] | 4 | 2021-02-13T01:18:11.000Z | 2022-02-03T08:04:16.000Z | from typing import Any
from rx import Observable, pipe
from rx.operators import do_action, filter, map, ignore_elements
from redux import (
Epic,
Reducer,
ReduxFeatureModule,
combine_epics,
create_action,
create_feature_module,
handle_actions,
of_init_feature,
of_type,
select_ac... | 23.632653 | 78 | 0.736615 | 149 | 1,158 | 5.315436 | 0.275168 | 0.125 | 0.114899 | 0.07197 | 0.049242 | 0.049242 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185665 | 1,158 | 48 | 79 | 24.125 | 0.839873 | 0.02677 | 0 | 0 | 0 | 0 | 0.028029 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0.125 | 0.03125 | 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 |
a68ae2307a359f7e47d9b87116672f1fc3da5cfb | 909 | py | Python | backend/backend/urls.py | Zhiwei1996/Todoist | c260ac051e909243395c98e8b4f45a42abb548ea | [
"MIT"
] | null | null | null | backend/backend/urls.py | Zhiwei1996/Todoist | c260ac051e909243395c98e8b4f45a42abb548ea | [
"MIT"
] | null | null | null | backend/backend/urls.py | Zhiwei1996/Todoist | c260ac051e909243395c98e8b4f45a42abb548ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""backend URL Configuration
"""
from django.conf.urls import include, url
from django.contrib import admin
from rest_framework.schemas import get_schema_view
from rest_framework.documentation import include_docs_urls
from todoist import views
API_TITLE = 'Todoist API'... | 31.344828 | 88 | 0.665567 | 120 | 909 | 4.883333 | 0.4 | 0.040956 | 0.047782 | 0.068259 | 0.047782 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013699 | 0.19692 | 909 | 28 | 89 | 32.464286 | 0.789041 | 0.075908 | 0 | 0 | 0 | 0 | 0.201923 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.277778 | 0 | 0.277778 | 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 |
a68cf4ecb5b81e1cac7d631028ac2e152c08518b | 1,192 | py | Python | secs_to_time.py | bonny1992/oneplus-notificator-fixed | 2e47d8b21b3100332f2a59b95d79b49e0d680bae | [
"Apache-2.0"
] | null | null | null | secs_to_time.py | bonny1992/oneplus-notificator-fixed | 2e47d8b21b3100332f2a59b95d79b49e0d680bae | [
"Apache-2.0"
] | null | null | null | secs_to_time.py | bonny1992/oneplus-notificator-fixed | 2e47d8b21b3100332f2a59b95d79b49e0d680bae | [
"Apache-2.0"
] | null | null | null | import math
def secs_to_time(seconds):
if seconds < 60:
return "{seconds} secondi".format(
seconds = seconds
)
else:
if int(seconds / 60 / 60 / 24) > 0:
days = seconds / 60 / 60 / 24
return "{days} giorni, {hours} ore, {minutes} minuti, {seconds} secondi".... | 37.25 | 92 | 0.494128 | 135 | 1,192 | 4.333333 | 0.192593 | 0.107692 | 0.094017 | 0.138462 | 0.500855 | 0.420513 | 0.358974 | 0.088889 | 0 | 0 | 0 | 0.067445 | 0.353188 | 1,192 | 31 | 93 | 38.451613 | 0.69131 | 0 | 0 | 0 | 0 | 0 | 0.136745 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.034483 | false | 0 | 0.034483 | 0 | 0.206897 | 0.034483 | 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 |
a6929cee90954c7741a45c1aea4c6b9d650cee79 | 2,042 | py | Python | backend/jobs/tests.py | k3ndr1c/ML-Platform | 35af599602f94b386f13c9ba2c0fa2b678a54375 | [
"MIT"
] | null | null | null | backend/jobs/tests.py | k3ndr1c/ML-Platform | 35af599602f94b386f13c9ba2c0fa2b678a54375 | [
"MIT"
] | null | null | null | backend/jobs/tests.py | k3ndr1c/ML-Platform | 35af599602f94b386f13c9ba2c0fa2b678a54375 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from .models import Job, Prediction
from .serializers import JobSerializer, PredictionSerializer
CREATE_JOB_URL = reverse('jobs... | 30.029412 | 69 | 0.677767 | 250 | 2,042 | 5.348 | 0.356 | 0.044877 | 0.026926 | 0.04712 | 0.253553 | 0.253553 | 0.253553 | 0.153328 | 0.153328 | 0.153328 | 0 | 0.014393 | 0.217434 | 2,042 | 67 | 70 | 30.477612 | 0.822278 | 0.114104 | 0 | 0.190476 | 0 | 0 | 0.060742 | 0.011811 | 0 | 0 | 0 | 0 | 0.095238 | 1 | 0.166667 | false | 0.02381 | 0.166667 | 0.02381 | 0.428571 | 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 |
a693893f40cf33adad9c304b0df64f4d022f6bf1 | 22,949 | py | Python | swords/__init__.py | p-lambda/swords | 04ca75370d0ce098a7f4db68240fc8e79a4f7b3b | [
"CC-BY-3.0"
] | 25 | 2021-05-24T06:54:45.000Z | 2022-03-18T15:30:39.000Z | swords/__init__.py | p-lambda/swords | 04ca75370d0ce098a7f4db68240fc8e79a4f7b3b | [
"CC-BY-3.0"
] | 2 | 2021-06-11T02:39:47.000Z | 2021-09-20T15:06:46.000Z | swords/__init__.py | p-lambda/swords | 04ca75370d0ce098a7f4db68240fc8e79a4f7b3b | [
"CC-BY-3.0"
] | 2 | 2021-11-19T09:06:30.000Z | 2022-03-24T18:31:40.000Z | from collections import defaultdict
import copy
from enum import Enum
import hashlib
import json
# From UD v2: https://universaldependencies.org/u/pos/
class Pos(Enum):
UNKNOWN = 0
# Open class
ADJ = 1
ADV = 2
INTJ = 3
NOUN = 4
PROPN = 5
VERB = 6
# Closed class
ADP = 7
AUX = 8
CCONJ = 9
DET =... | 31.610193 | 137 | 0.657066 | 3,117 | 22,949 | 4.591594 | 0.095605 | 0.031861 | 0.011948 | 0.01076 | 0.514184 | 0.398407 | 0.320151 | 0.271241 | 0.251118 | 0.23903 | 0 | 0.00257 | 0.219966 | 22,949 | 725 | 138 | 31.653793 | 0.796939 | 0.028847 | 0 | 0.306667 | 0 | 0 | 0.123209 | 0.011247 | 0 | 0 | 0 | 0.001379 | 0.015 | 1 | 0.088333 | false | 0.001667 | 0.008333 | 0.028333 | 0.223333 | 0.001667 | 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 |
a69603d25cb114ace361699985f470a1488e41a6 | 7,239 | py | Python | src/gumbel_social_transformer/st_model_tcn.py | tedhuang96/gst | ac300d34e17fa2d6639c1df329ac1e8f80bccaec | [
"MIT"
] | 8 | 2021-11-28T21:16:27.000Z | 2022-03-22T06:56:16.000Z | src/gumbel_social_transformer/st_model_tcn.py | tedhuang96/gst | ac300d34e17fa2d6639c1df329ac1e8f80bccaec | [
"MIT"
] | null | null | null | src/gumbel_social_transformer/st_model_tcn.py | tedhuang96/gst | ac300d34e17fa2d6639c1df329ac1e8f80bccaec | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from src.gumbel_social_transformer.gumbel_social_transformer import GumbelSocialTransformer
from src.gumbel_social_transformer.temporal_convolution_net import TemporalConvolutionNet
def offset_error_square_full_partial(x_pred, x_target, loss_mask_ped, loss_mask_pred_seq):
assert... | 49.924138 | 166 | 0.644426 | 1,021 | 7,239 | 4.219393 | 0.152791 | 0.066852 | 0.038301 | 0.034123 | 0.368617 | 0.229573 | 0.127205 | 0.094243 | 0.048282 | 0.048282 | 0 | 0.018474 | 0.244785 | 7,239 | 145 | 167 | 49.924138 | 0.769526 | 0 | 0 | 0.085938 | 0 | 0 | 0.061188 | 0.020442 | 0 | 0 | 0 | 0 | 0.039063 | 1 | 0.046875 | false | 0 | 0.03125 | 0 | 0.125 | 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 |
a69669d6bb96032de0f69b7cc74ce536e85ea475 | 7,598 | py | Python | my_source/__myglobal.py | IBNBlank/Shooting_Stars | 38a642ab5a6d1cd59c480f11ae8eea9c86192a46 | [
"MIT"
] | 3 | 2018-07-28T15:00:16.000Z | 2021-07-15T12:21:58.000Z | my_source/__myglobal.py | IBNBlank/Shooting_Stars | 38a642ab5a6d1cd59c480f11ae8eea9c86192a46 | [
"MIT"
] | null | null | null | my_source/__myglobal.py | IBNBlank/Shooting_Stars | 38a642ab5a6d1cd59c480f11ae8eea9c86192a46 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: IBNBlank
# @Date: 2018-07-22 19:56:30
# @Last Modified by: IBNBlank
# @Last Modified time: 2018-07-28 22:19:12
import pygame
from os import path
##### Color Define #####
COLOR = {
"BLACK": (0,0,0),
"WHITE": (255,255,255),
"RED": (255,0,0),
"YELLOW": (255,255,0),
... | 39.572917 | 91 | 0.672809 | 1,101 | 7,598 | 4.355132 | 0.128065 | 0.123462 | 0.106361 | 0.134724 | 0.556413 | 0.448175 | 0.294473 | 0.279458 | 0.199583 | 0.189572 | 0 | 0.031449 | 0.154646 | 7,598 | 192 | 92 | 39.572917 | 0.715086 | 0.035931 | 0 | 0.077844 | 0 | 0 | 0.209019 | 0.00332 | 0 | 0 | 0 | 0 | 0 | 1 | 0.005988 | false | 0 | 0.011976 | 0 | 0.017964 | 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 |
a69754150f6815f08c8e7d520f80806f794c55ac | 1,845 | py | Python | python/example.py | LenakeTech/crowdin-hybrid-sso-examples | 7da0868f6537d6abb2f6004f428e15002535eb8d | [
"Apache-2.0"
] | 1 | 2021-06-08T14:29:53.000Z | 2021-06-08T14:29:53.000Z | python/example.py | LenakeTech/crowdin-hybrid-sso-examples | 7da0868f6537d6abb2f6004f428e15002535eb8d | [
"Apache-2.0"
] | null | null | null | python/example.py | LenakeTech/crowdin-hybrid-sso-examples | 7da0868f6537d6abb2f6004f428e15002535eb8d | [
"Apache-2.0"
] | 2 | 2021-03-31T02:59:45.000Z | 2021-09-08T10:54:19.000Z | # Copyright 2019 Crowdin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 30.245902 | 97 | 0.692683 | 266 | 1,845 | 4.725564 | 0.567669 | 0.038186 | 0.020684 | 0.025457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032552 | 0.16748 | 1,845 | 60 | 98 | 30.75 | 0.785807 | 0.304607 | 0 | 0 | 0 | 0 | 0.240536 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.052632 | false | 0 | 0.131579 | 0 | 0.236842 | 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 |
a69792fc01aa5b8cfd3d5c9274c48d77d86db356 | 6,928 | py | Python | chrischan-master/chrischan-master/main.py | b9king/Discord-Bots | e6b08eeeb8de0952726883cfce0717d4866eacc9 | [
"MIT"
] | null | null | null | chrischan-master/chrischan-master/main.py | b9king/Discord-Bots | e6b08eeeb8de0952726883cfce0717d4866eacc9 | [
"MIT"
] | null | null | null | chrischan-master/chrischan-master/main.py | b9king/Discord-Bots | e6b08eeeb8de0952726883cfce0717d4866eacc9 | [
"MIT"
] | null | null | null |
import discord
import helper
from helper import *
client=discord.Client()
@client.event
async def on_ready():
print('logged in as')
print(client.user.name)
print(client.user.id)
print('-----')
@client.event
async def on_guild_join(guild):
name = "**<:Png:590089990780878848> Christian Westo... | 34.81407 | 200 | 0.604648 | 819 | 6,928 | 4.943834 | 0.267399 | 0.048407 | 0.04001 | 0.048901 | 0.601383 | 0.541615 | 0.476167 | 0.466288 | 0.433193 | 0.433193 | 0.000289 | 0.041147 | 0.270352 | 6,928 | 198 | 201 | 34.989899 | 0.758853 | 0.043303 | 0 | 0.464789 | 0 | 0.014085 | 0.38544 | 0.025072 | 0 | 0 | 0.010874 | 0 | 0 | 1 | 0 | false | 0 | 0.021127 | 0 | 0.021127 | 0.028169 | 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 |
a6985ed0535d74a9aa8aab737b5e80423499a130 | 6,433 | py | Python | qtvscodestyle/vscode/color_registry_manager.py | Greatness7/QtVSCodeStyle | 2654ca967c7ae5db3ce3fb46657ace9f1104f6b9 | [
"MIT"
] | 8 | 2021-10-04T00:21:25.000Z | 2022-03-14T19:57:03.000Z | qtvscodestyle/vscode/color_registry_manager.py | Greatness7/QtVSCodeStyle | 2654ca967c7ae5db3ce3fb46657ace9f1104f6b9 | [
"MIT"
] | null | null | null | qtvscodestyle/vscode/color_registry_manager.py | Greatness7/QtVSCodeStyle | 2654ca967c7ae5db3ce3fb46657ace9f1104f6b9 | [
"MIT"
] | 3 | 2021-11-15T23:58:33.000Z | 2022-02-01T18:50:01.000Z | # =============================================================================================
# QtVSCodeStyle.
#
# Copyright (c) 2015- Microsoft Corporation
# Copyright (c) 2021- Yunosuke Ohsugi
#
# Distributed under the terms of the MIT License.
# See https://github.com/microsoft/vscode/blob/main/LICENSE.txt
#
#... | 41.237179 | 113 | 0.645733 | 705 | 6,433 | 5.625532 | 0.164539 | 0.110943 | 0.042864 | 0.047655 | 0.373424 | 0.266515 | 0.224155 | 0.159102 | 0.113464 | 0.067322 | 0 | 0.002979 | 0.217162 | 6,433 | 155 | 114 | 41.503226 | 0.784551 | 0.089849 | 0 | 0.082569 | 0 | 0 | 0.048296 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.119266 | false | 0.009174 | 0.036697 | 0.06422 | 0.46789 | 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 |
a69a0ad61363ec1a9cf3a9af6dcd2a95de3f22fa | 495 | py | Python | python/test_region.py | csd2022fuchuang/yolov5-opencv-cpp-python | 5b52dbffed6733a1353bd27a0001c09821ee0714 | [
"MIT"
] | null | null | null | python/test_region.py | csd2022fuchuang/yolov5-opencv-cpp-python | 5b52dbffed6733a1353bd27a0001c09821ee0714 | [
"MIT"
] | null | null | null | python/test_region.py | csd2022fuchuang/yolov5-opencv-cpp-python | 5b52dbffed6733a1353bd27a0001c09821ee0714 | [
"MIT"
] | 1 | 2022-03-24T09:01:45.000Z | 2022-03-24T09:01:45.000Z | from shapely.geometry import Polygon
import cv2
image = cv2.imread("a.png")
window_name = 'Image'
# Center coordinates
center_coordinates = (120, 50)
# Radius of circle
radius = 20
# Blue color in BGR
color = (255, 0, 0)
# Line thickness of 2 px
thickness = 2
# Using cv2.circle() method
# Draw a circle with blue l... | 19.8 | 71 | 0.739394 | 77 | 495 | 4.701299 | 0.506494 | 0.088398 | 0.082873 | 0.077348 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.053269 | 0.165657 | 495 | 25 | 72 | 19.8 | 0.823245 | 0.365657 | 0 | 0 | 0 | 0 | 0.032573 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.181818 | 0 | 0.181818 | 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 |
a69d50893a1048337e98b47e928f156375ca87ed | 8,247 | py | Python | pyNastran/converters/cart3d/test_cart3d.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/cart3d/test_cart3d.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/cart3d/test_cart3d.py | jtran10/pyNastran | 4aed8e05b91576c2b50ee835f0497a9aad1d2cb0 | [
"BSD-3-Clause"
] | null | null | null | """tests non-gui related Cart3d class/interface"""
from __future__ import print_function
import os
import unittest
from numpy import array_equal, allclose
import pyNastran
from pyNastran.converters.cart3d.cart3d import read_cart3d
from pyNastran.converters.cart3d.cart3d_to_nastran import cart3d_to_nastran_filename, ca... | 38.900943 | 111 | 0.600946 | 1,128 | 8,247 | 4.190603 | 0.151596 | 0.030463 | 0.038079 | 0.050349 | 0.539454 | 0.45568 | 0.356251 | 0.283478 | 0.232917 | 0.140681 | 0 | 0.068114 | 0.26834 | 8,247 | 211 | 112 | 39.085308 | 0.71528 | 0.089851 | 0 | 0.229814 | 0 | 0.006211 | 0.140516 | 0.006851 | 0 | 0 | 0 | 0 | 0.062112 | 1 | 0.055901 | false | 0 | 0.080745 | 0 | 0.142857 | 0.012422 | 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 |
a69e23253f289cfbf526d1538461b44447ecb128 | 2,260 | py | Python | python/evolution_reader.py | hzla/Pokeweb | 203f8449179a5a0aeb4fa5d48e483048f09b24d1 | [
"MIT"
] | 3 | 2021-03-30T22:07:40.000Z | 2021-06-11T02:32:06.000Z | python/evolution_reader.py | hzla/Pokeweb | 203f8449179a5a0aeb4fa5d48e483048f09b24d1 | [
"MIT"
] | 2 | 2021-07-03T18:04:09.000Z | 2022-01-12T18:02:30.000Z | python/evolution_reader.py | hzla/Pokeweb | 203f8449179a5a0aeb4fa5d48e483048f09b24d1 | [
"MIT"
] | 1 | 2021-09-06T18:20:23.000Z | 2021-09-06T18:20:23.000Z | import ndspy
import ndspy.rom
import code
import io
import os
import os.path
from os import path
import json
import copy
def set_global_vars():
global ROM_NAME, NARC_FORMAT, POKEDEX, METHODS, ITEMS, MOVES
with open(f'session_settings.json', "r") as outfile:
settings = json.load(outfile)
ROM_NAME = setting... | 25.681818 | 81 | 0.684071 | 369 | 2,260 | 4.01626 | 0.254743 | 0.04251 | 0.033063 | 0.032389 | 0.24359 | 0.152497 | 0.033738 | 0.033738 | 0.033738 | 0 | 0 | 0.014864 | 0.136726 | 2,260 | 87 | 82 | 25.977011 | 0.744746 | 0.04469 | 0 | 0.034483 | 0 | 0 | 0.203248 | 0.106729 | 0 | 0 | 0 | 0 | 0 | 1 | 0.086207 | false | 0 | 0.155172 | 0.017241 | 0.275862 | 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 |
a6a017b54a214e79dd2139fbb9e101b8d4539ba6 | 609 | py | Python | Python/797.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 1 | 2020-12-10T05:36:15.000Z | 2020-12-10T05:36:15.000Z | Python/797.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | null | null | null | Python/797.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 3 | 2020-04-06T05:55:08.000Z | 2021-08-29T14:26:54.000Z | class Solution:
def allPathsSourceTarget(self, graph: List[List[int]]) -> List[List[int]]:
N = len(graph) - 1
mappings = {}
for i, nodes in enumerate(graph):
mappings[i] = nodes
result = []
queue = deque([[0]])
while queue:
path = queu... | 27.681818 | 78 | 0.438424 | 58 | 609 | 4.603448 | 0.534483 | 0.059925 | 0.082397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009036 | 0.454844 | 609 | 22 | 79 | 27.681818 | 0.795181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0 | 0 | 0 | 0.166667 | 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 |
a6a02d8b5ce16766be107720170a139dd7634fa9 | 661 | py | Python | day-07/part-2/div.py | lypnol/adventofcode-2021 | 8ba277d698e8c59ca9cd554acc135473f5964b87 | [
"MIT"
] | 6 | 2021-11-29T15:32:27.000Z | 2021-12-10T12:24:26.000Z | day-07/part-2/div.py | lypnol/adventofcode-2021 | 8ba277d698e8c59ca9cd554acc135473f5964b87 | [
"MIT"
] | 9 | 2021-11-29T15:38:04.000Z | 2021-12-13T14:54:16.000Z | day-07/part-2/div.py | lypnol/adventofcode-2021 | 8ba277d698e8c59ca9cd554acc135473f5964b87 | [
"MIT"
] | 3 | 2021-12-02T19:11:44.000Z | 2021-12-22T20:52:47.000Z | from tool.runners.python import SubmissionPy
class DivSubmission(SubmissionPy):
def run(self, s):
"""
:param s: input in string format
:return: solution flag
"""
# Your code goes here
positions = [int(x) for x in s.split(",")]
min_pos, max_pos = min(position... | 23.607143 | 110 | 0.547655 | 88 | 661 | 4.056818 | 0.579545 | 0.022409 | 0.033613 | 0.067227 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019481 | 0.301059 | 661 | 27 | 111 | 24.481481 | 0.753247 | 0.220877 | 0 | 0 | 0 | 0 | 0.002169 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 1 | 0.153846 | false | 0 | 0.076923 | 0 | 0.384615 | 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 |
a6a05141e02ec09a3368291709071af8ba627d0b | 1,698 | py | Python | test/coreneuron/test_psolve.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | null | null | null | test/coreneuron/test_psolve.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | 1 | 2021-04-13T09:19:55.000Z | 2021-04-13T09:19:55.000Z | test/coreneuron/test_psolve.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | null | null | null | import os
import pytest
import sys
import traceback
enable_gpu = bool(os.environ.get("CORENRN_ENABLE_GPU", ""))
from neuron import h, gui
pc = h.ParallelContext()
def model():
pc.gid_clear()
for s in h.allsec():
h.delete_section(sec=s)
s = h.Section()
s.L = 10
s.diam = 10
s.insert("... | 22.64 | 72 | 0.567727 | 267 | 1,698 | 3.509363 | 0.438202 | 0.037353 | 0.009605 | 0.027748 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.031993 | 0.282097 | 1,698 | 74 | 73 | 22.945946 | 0.736669 | 0.099529 | 0 | 0.034483 | 0 | 0 | 0.036113 | 0 | 0 | 0 | 0 | 0 | 0.034483 | 1 | 0.051724 | false | 0 | 0.103448 | 0 | 0.172414 | 0.034483 | 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 |
a6a2e757449885213e04fced8e6ceed98541f40d | 431 | py | Python | docs/make_tutorials.py | jonholdship/SpectralRadex | 2c38e136b963aac43ec2b17101da56a83c9884e4 | [
"MIT"
] | 1 | 2020-09-23T10:57:03.000Z | 2020-09-23T10:57:03.000Z | docs/make_tutorials.py | jonholdship/SpectralRadex | 2c38e136b963aac43ec2b17101da56a83c9884e4 | [
"MIT"
] | null | null | null | docs/make_tutorials.py | jonholdship/SpectralRadex | 2c38e136b963aac43ec2b17101da56a83c9884e4 | [
"MIT"
] | null | null | null | import subprocess
import glob
import os
# Convert the tutorials
for fn in glob.glob("../examples/*.ipynb"):
name = os.path.splitext(os.path.split(fn)[1])[0]
outfn = os.path.join("tutorials", name + ".rst")
print("Building {0}...".format(name))
subprocess.check_call(
"jupyter nbconvert --templat... | 30.785714 | 76 | 0.63109 | 56 | 431 | 4.803571 | 0.660714 | 0.066915 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008746 | 0.204176 | 431 | 14 | 77 | 30.785714 | 0.77551 | 0.048724 | 0 | 0 | 0 | 0 | 0.332518 | 0.066015 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 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 |
a6a56754f5a359f5f3f898b5f76be76879351729 | 1,224 | py | Python | sorting/k_closest_points_to_origin.py | elenaborisova/A2SV-interview-prep | 02b7166a96d22221cd6adaedf14f845537f0752d | [
"MIT"
] | null | null | null | sorting/k_closest_points_to_origin.py | elenaborisova/A2SV-interview-prep | 02b7166a96d22221cd6adaedf14f845537f0752d | [
"MIT"
] | null | null | null | sorting/k_closest_points_to_origin.py | elenaborisova/A2SV-interview-prep | 02b7166a96d22221cd6adaedf14f845537f0752d | [
"MIT"
] | null | null | null | import math
import heapq
# Time: O(n * log n); Space: O(n)
# MinHeap
def k_closest(points, k):
distances = {} # O(n) space
h = [] # O(n) space
for point in points:
distance = math.sqrt(point[0] ** 2 + point[1] ** 2)
if distance not in distances:
distances[distance] = []
... | 23.538462 | 66 | 0.535948 | 188 | 1,224 | 3.457447 | 0.228723 | 0.018462 | 0.032308 | 0.046154 | 0.281538 | 0.144615 | 0.092308 | 0.092308 | 0.092308 | 0 | 0 | 0.035632 | 0.289216 | 1,224 | 51 | 67 | 24 | 0.711494 | 0.196895 | 0 | 0.322581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.064516 | false | 0 | 0.064516 | 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 |
a6a73500dcaa5434137903d1b0436c04ea1797ad | 270 | py | Python | src/guarded_suspension/receiver.py | tukeJonny/python_patterns | 3e14032030f60ea764ff50e3a5ac1b5dcda4b553 | [
"MIT"
] | null | null | null | src/guarded_suspension/receiver.py | tukeJonny/python_patterns | 3e14032030f60ea764ff50e3a5ac1b5dcda4b553 | [
"MIT"
] | null | null | null | src/guarded_suspension/receiver.py | tukeJonny/python_patterns | 3e14032030f60ea764ff50e3a5ac1b5dcda4b553 | [
"MIT"
] | null | null | null | #-*- coding: utf-8 -*-
from threading import Thread
class Receiver(Thread):
def __init__(self, queue):
super().__init__()
self.daemon = True
self.queue = queue
def run(self):
while True:
num = self.queue.get()
print("[<==] received {0}".format(num))
| 18 | 42 | 0.637037 | 36 | 270 | 4.555556 | 0.666667 | 0.164634 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009091 | 0.185185 | 270 | 14 | 43 | 19.285714 | 0.736364 | 0.077778 | 0 | 0 | 0 | 0 | 0.072581 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.1 | 0 | 0.4 | 0.1 | 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 |
a6a958c70054d2579b52a859472989d158f49b98 | 406 | py | Python | raspy/tests/test_IO/test_IOException.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/tests/test_IO/test_IOException.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/tests/test_IO/test_IOException.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | """Tests for IOException."""
from raspy.io.io_exception import IOException
class TestIOException(object):
"""Test methods for IOException."""
def test_io_exception(self):
"""Test the exception."""
caught = None
try:
raise IOException("This is a test.")
except Exc... | 21.368421 | 48 | 0.615764 | 44 | 406 | 5.613636 | 0.636364 | 0.11336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.283251 | 406 | 18 | 49 | 22.555556 | 0.848797 | 0.17734 | 0 | 0 | 0 | 0 | 0.04717 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 1 | 0.111111 | false | 0 | 0.111111 | 0 | 0.333333 | 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 |
a6aa1696a440193088edbc66879e995334f69dc4 | 1,634 | py | Python | languages/admin.py | City-of-Helsinki/kukkuu | 61f26bc622928fd04f6a397f832aaffff789e806 | [
"MIT"
] | null | null | null | languages/admin.py | City-of-Helsinki/kukkuu | 61f26bc622928fd04f6a397f832aaffff789e806 | [
"MIT"
] | 157 | 2019-10-08T07:58:59.000Z | 2022-03-20T23:00:17.000Z | languages/admin.py | City-of-Helsinki/kukkuu | 61f26bc622928fd04f6a397f832aaffff789e806 | [
"MIT"
] | 3 | 2019-10-07T12:06:26.000Z | 2022-01-25T14:03:14.000Z | from django.contrib import admin
from django.db.models import Count
from django.utils.translation import gettext_lazy as _
from parler.admin import TranslatableAdmin
from parler.utils.context import switch_language
from .models import Language
@admin.register(Language)
class LanguageAdmin(TranslatableAdmin):
lis... | 29.178571 | 86 | 0.653611 | 200 | 1,634 | 4.99 | 0.31 | 0.084168 | 0.08016 | 0.051102 | 0.218437 | 0.158317 | 0.074148 | 0.074148 | 0.074148 | 0.074148 | 0 | 0.003223 | 0.240514 | 1,634 | 55 | 87 | 29.709091 | 0.800967 | 0.017136 | 0 | 0.069767 | 0 | 0 | 0.163342 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.116279 | false | 0 | 0.139535 | 0.046512 | 0.488372 | 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 |
a6acbe27d3c0f67a17173db25575993280383538 | 13,656 | py | Python | Gearshift.py | TonyWhitley/gearbox | efdba8ecd88600418b39e38cdeccbb1f9a327ceb | [
"MIT"
] | null | null | null | Gearshift.py | TonyWhitley/gearbox | efdba8ecd88600418b39e38cdeccbb1f9a327ceb | [
"MIT"
] | null | null | null | Gearshift.py | TonyWhitley/gearbox | efdba8ecd88600418b39e38cdeccbb1f9a327ceb | [
"MIT"
] | null | null | null | # Gearshift.py - monitors the rFactor 2 shared memory values for the shifter
# and clutch and if a gear change is not done properly it repeatedly sends a
# "Neutral" key press to prevent the gear being selected.
#
# Inspired by http://www.richardjackett.com/grindingtranny
# I borrowed Grind_default.wav from there to ma... | 33.635468 | 110 | 0.614162 | 1,386 | 13,656 | 5.972583 | 0.262626 | 0.020295 | 0.009664 | 0.016671 | 0.196787 | 0.132278 | 0.09483 | 0.053636 | 0.053636 | 0.025127 | 0 | 0.008451 | 0.272115 | 13,656 | 405 | 111 | 33.718519 | 0.824346 | 0.16923 | 0 | 0.358885 | 0 | 0.006969 | 0.136206 | 0.004224 | 0 | 0 | 0 | 0 | 0 | 1 | 0.062718 | false | 0.027875 | 0.034843 | 0.003484 | 0.111498 | 0.020906 | 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 |
a6ad7b6a876ff429c200629b8a6d1cb6df41dea0 | 2,225 | py | Python | rooms/management/commands/seed_amenities.py | alstn2468/Django_Airbnb_Clone | eeb61e4a36320a0b269d96f47cc6755dbc4c40f8 | [
"MIT"
] | 5 | 2019-11-26T00:34:24.000Z | 2021-01-04T06:04:48.000Z | rooms/management/commands/seed_amenities.py | alstn2468/Django_Airbnb_Clone | eeb61e4a36320a0b269d96f47cc6755dbc4c40f8 | [
"MIT"
] | 3 | 2021-06-09T19:05:40.000Z | 2021-09-08T01:49:01.000Z | rooms/management/commands/seed_amenities.py | alstn2468/Django_Airbnb_Clone | eeb61e4a36320a0b269d96f47cc6755dbc4c40f8 | [
"MIT"
] | 6 | 2019-11-24T11:47:09.000Z | 2021-08-16T20:21:35.000Z | from core.management.commands.custom_command import CustomCommand
from rooms.models import Amenity
class Command(CustomCommand):
help = "Automatically create amenities"
def handle(self, *args, **options):
try:
amenities = [
"Air conditioning",
"Alarm Clock"... | 30.902778 | 84 | 0.417978 | 169 | 2,225 | 5.52071 | 0.668639 | 0.042872 | 0.064309 | 0.081458 | 0.132905 | 0.132905 | 0.132905 | 0 | 0 | 0 | 0 | 0.002595 | 0.480449 | 2,225 | 71 | 85 | 31.338028 | 0.800173 | 0 | 0 | 0 | 0 | 0 | 0.263371 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.015625 | false | 0 | 0.03125 | 0 | 0.078125 | 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 |
a6aecdaa9ab63d5c899f2872cb0bfd6fc69bc486 | 7,898 | py | Python | vision/image_classification/mobile/mobilenet_model.py | pedro-abundio-wang/image-classification | 952719d7561b9998add0daf71d61e55cb6103eaf | [
"Apache-2.0"
] | null | null | null | vision/image_classification/mobile/mobilenet_model.py | pedro-abundio-wang/image-classification | 952719d7561b9998add0daf71d61e55cb6103eaf | [
"Apache-2.0"
] | null | null | null | vision/image_classification/mobile/mobilenet_model.py | pedro-abundio-wang/image-classification | 952719d7561b9998add0daf71d61e55cb6103eaf | [
"Apache-2.0"
] | null | null | null | """MobileNet model for Keras.
Related papers
- https://arxiv.org/abs/1704.04861
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.keras import backend
from tensorflow.keras import models
from tensorflow.keras import layers
def _conv_bl... | 38.339806 | 103 | 0.661433 | 1,053 | 7,898 | 4.765432 | 0.17284 | 0.03069 | 0.074731 | 0.049223 | 0.56098 | 0.525707 | 0.482264 | 0.47489 | 0.465923 | 0.439219 | 0 | 0.032215 | 0.245379 | 7,898 | 205 | 104 | 38.526829 | 0.809732 | 0.373639 | 0 | 0.342857 | 0 | 0 | 0.057398 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.028571 | false | 0 | 0.057143 | 0 | 0.114286 | 0.009524 | 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 |
a6b0a6f69b4e8e457b33054cf5afa5f57a1ac191 | 943 | py | Python | tests/test_preprocessing.py | temuller/cosmo_phot | 011333f84486614cb9339d3874dc072c45ebed23 | [
"MIT"
] | null | null | null | tests/test_preprocessing.py | temuller/cosmo_phot | 011333f84486614cb9339d3874dc072c45ebed23 | [
"MIT"
] | null | null | null | tests/test_preprocessing.py | temuller/cosmo_phot | 011333f84486614cb9339d3874dc072c45ebed23 | [
"MIT"
] | null | null | null | import unittest
from hostphot.cutouts import download_images
from hostphot.coadd import coadd_images
from hostphot.image_masking import create_mask
class TestHostPhot(unittest.TestCase):
def test_preprocessing(self):
coadd_filters = 'riz'
survey = 'PS1'
name = 'SN2004eo'
host_ra, h... | 31.433333 | 81 | 0.623542 | 109 | 943 | 5.082569 | 0.412844 | 0.043321 | 0.072202 | 0.093863 | 0.142599 | 0.111913 | 0.111913 | 0.111913 | 0 | 0 | 0 | 0.033537 | 0.304348 | 943 | 29 | 82 | 32.517241 | 0.810976 | 0.04878 | 0 | 0 | 0 | 0 | 0.030235 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05 | false | 0 | 0.2 | 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 |
a6b264207fe8e823f52476d11d008957908297b6 | 4,395 | py | Python | bluetooth/objects/Device.py | Exus1/alfa-blue-me | 4b2f9f549967b44688e753a64b0578ebbfedf430 | [
"MIT"
] | null | null | null | bluetooth/objects/Device.py | Exus1/alfa-blue-me | 4b2f9f549967b44688e753a64b0578ebbfedf430 | [
"MIT"
] | 1 | 2020-07-06T14:36:18.000Z | 2021-01-27T09:13:12.000Z | bluetooth/objects/Device.py | Exus1/alfa-blue-me | 4b2f9f549967b44688e753a64b0578ebbfedf430 | [
"MIT"
] | null | null | null | import dbus
from module.EventBus import EventBus, mainEventBus
from bluetooth.objects.Player import Player
class Device:
event_bus: EventBus
__path: str
__dbus_obj: dbus.proxies.ProxyObject
__dbus_iface: dbus.proxies.Interface
__dbus_props_iface: dbus.proxies.Interface
__player_path: str = No... | 31.392857 | 100 | 0.619113 | 506 | 4,395 | 5.009881 | 0.193676 | 0.051282 | 0.042604 | 0.033531 | 0.251677 | 0.152268 | 0.134911 | 0.034714 | 0.034714 | 0.034714 | 0 | 0.010072 | 0.277133 | 4,395 | 139 | 101 | 31.618705 | 0.78785 | 0 | 0 | 0.168142 | 0 | 0 | 0.113993 | 0.03504 | 0 | 0 | 0 | 0 | 0 | 1 | 0.19469 | false | 0 | 0.026549 | 0.061947 | 0.39823 | 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 |
a6b2ccd85fff302304cf6c5368fb0672775dec55 | 2,213 | py | Python | objmap.py | runejuhl/bin | 948b246c92540e4d7451538879847513864c0219 | [
"MIT"
] | null | null | null | objmap.py | runejuhl/bin | 948b246c92540e4d7451538879847513864c0219 | [
"MIT"
] | null | null | null | objmap.py | runejuhl/bin | 948b246c92540e4d7451538879847513864c0219 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import subprocess
import re
import os.path
def main():
if len(sys.argv) < 2:
print('Missing argument')
sys.exit(-1)
exe = sys.argv[1]
if not os.path.isfile(exe):
print('Not a file, sir.')
exit(-2)
o = subprocess.check_output(['objd... | 29.118421 | 199 | 0.536376 | 289 | 2,213 | 4.069204 | 0.33564 | 0.059524 | 0.013605 | 0.02551 | 0.231293 | 0.204082 | 0.204082 | 0.204082 | 0.204082 | 0.204082 | 0 | 0.026429 | 0.264799 | 2,213 | 75 | 200 | 29.506667 | 0.696374 | 0.095798 | 0 | 0.244898 | 0 | 0.020408 | 0.197791 | 0.079317 | 0 | 0 | 0.004518 | 0 | 0 | 1 | 0.061224 | false | 0 | 0.081633 | 0 | 0.22449 | 0.061224 | 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 |
a6b55e4c1d8bfa3eac38de71d15f89c1f1da3226 | 641 | py | Python | analysis/cohort_pickle_checks.py | opensafely/covid-vaccine-not-received | 5b8c7e4219e654cf2fcf6f5013a5ef6e9256f26d | [
"MIT"
] | null | null | null | analysis/cohort_pickle_checks.py | opensafely/covid-vaccine-not-received | 5b8c7e4219e654cf2fcf6f5013a5ef6e9256f26d | [
"MIT"
] | null | null | null | analysis/cohort_pickle_checks.py | opensafely/covid-vaccine-not-received | 5b8c7e4219e654cf2fcf6f5013a5ef6e9256f26d | [
"MIT"
] | null | null | null | ''' Count number of declines with uncertain dates.
'''
import os
import pandas as pd
import numpy as np
input_path="output/cohort.pickle"
output_path="output/cohort_pickle_checks.csv"
backend = os.getenv("OPENSAFELY_BACKEND", "expectations")
cohort = pd.read_pickle(input_path)
cohort = cohort.loc[pd.notnull(cohort... | 24.653846 | 90 | 0.730109 | 93 | 641 | 4.892473 | 0.548387 | 0.03956 | 0.07033 | 0.096703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.022569 | 0.101404 | 641 | 25 | 91 | 25.64 | 0.767361 | 0.160686 | 0 | 0 | 0 | 0 | 0.339015 | 0.058712 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.230769 | 0 | 0.230769 | 0.076923 | 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 |
a6b73f047e331caed47c666c6df9c31375f316f1 | 2,794 | py | Python | archive/experiment_4_train.py | marjanin/tendon_stiffness | b1dc379b09bbf9c044410a6bc51afbee0cba2e05 | [
"MIT"
] | 1 | 2020-07-20T02:04:46.000Z | 2020-07-20T02:04:46.000Z | archive/experiment_4_train.py | marjanin/tendon_stiffness | b1dc379b09bbf9c044410a6bc51afbee0cba2e05 | [
"MIT"
] | null | null | null | archive/experiment_4_train.py | marjanin/tendon_stiffness | b1dc379b09bbf9c044410a6bc51afbee0cba2e05 | [
"MIT"
] | 1 | 2020-05-11T11:41:39.000Z | 2020-05-11T11:41:39.000Z | import gym
import numpy as np
from stable_baselines.common.policies import MlpPolicy as common_MlpPolicy
from stable_baselines.ddpg.policies import MlpPolicy as DDPG_MlpPolicy
from stable_baselines.common.vec_env import DummyVecEnv
from stable_baselines.ddpg.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise... | 39.914286 | 123 | 0.764853 | 387 | 2,794 | 5.30491 | 0.359173 | 0.031174 | 0.046274 | 0.029226 | 0.146128 | 0.146128 | 0.146128 | 0.097418 | 0.056503 | 0.056503 | 0 | 0.012971 | 0.117037 | 2,794 | 70 | 124 | 39.914286 | 0.819214 | 0.433787 | 0 | 0.064516 | 0 | 0 | 0.061648 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.225806 | 0 | 0.225806 | 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 |
a6b874afe3ecfcd5e956781905981e176b3e59f4 | 605 | py | Python | geotrek/settings/env_dev.py | GeotrekCE/Geotrek-admin | efcc7a6c2ccb6aee6b299b22f33f236dd8a23d91 | [
"BSD-2-Clause"
] | 50 | 2016-10-19T23:01:21.000Z | 2022-03-28T08:28:34.000Z | geotrek/settings/env_dev.py | GeotrekCE/Geotrek-admin | efcc7a6c2ccb6aee6b299b22f33f236dd8a23d91 | [
"BSD-2-Clause"
] | 1,422 | 2016-10-27T10:39:40.000Z | 2022-03-31T13:37:10.000Z | geotrek/settings/env_dev.py | GeotrekCE/Geotrek-admin | efcc7a6c2ccb6aee6b299b22f33f236dd8a23d91 | [
"BSD-2-Clause"
] | 46 | 2016-10-27T10:59:10.000Z | 2022-03-22T15:55:56.000Z | #
# Django Development
# ..........................
DEBUG = True
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
#
# Developper additions
# ..........................
INSTALLED_APPS = (
'django_extensions',
'debug_toolbar',
'drf_yasg',
) + INSTALLED_APPS
INTERNAL_IPS = type(str('c'), (... | 18.90625 | 70 | 0.578512 | 53 | 605 | 6.358491 | 0.735849 | 0.077151 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.133884 | 605 | 31 | 71 | 19.516129 | 0.64313 | 0.236364 | 0 | 0 | 0 | 0 | 0.411504 | 0.205752 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 |
a6b88d0c63863ec876ce31f9690f31d086738e0d | 1,629 | py | Python | parsing/accessDB.py | marquettecomputationalsocialscience/seniordesign1819 | cc11c6f46dbcb1c2fb69e1ef2017953f0e6b066f | [
"MIT"
] | 5 | 2018-08-30T19:15:21.000Z | 2019-03-25T17:13:39.000Z | parsing/accessDB.py | marquettecomputationalsocialscience/seniordesign1819 | cc11c6f46dbcb1c2fb69e1ef2017953f0e6b066f | [
"MIT"
] | 15 | 2018-09-03T18:39:25.000Z | 2019-05-15T07:00:43.000Z | parsing/accessDB.py | marquettecomputationalsocialscience/seniordesign1819 | cc11c6f46dbcb1c2fb69e1ef2017953f0e6b066f | [
"MIT"
] | 8 | 2018-09-03T19:11:33.000Z | 2018-11-14T22:32:22.000Z | import os
import pandas as pd
from datetime import datetime as dt
# Read raw data in
root = os.path.expanduser('../data/')
files = [root + f for f in os.listdir(root) if f.endswith('.csv') and f != 'addresses.csv']
dfs = [pd.read_csv(f, header=0, index_col='ID', parse_dates=['Date/Time']) for f in files]
df = pd.conc... | 41.769231 | 139 | 0.638428 | 217 | 1,629 | 4.764977 | 0.37788 | 0.185687 | 0.139265 | 0.081238 | 0.11412 | 0.11412 | 0.081238 | 0 | 0 | 0 | 0 | 0.003748 | 0.181093 | 1,629 | 39 | 140 | 41.769231 | 0.771364 | 0.055249 | 0 | 0 | 0 | 0 | 0.149089 | 0.013672 | 0 | 0 | 0 | 0 | 0 | 1 | 0.064516 | false | 0 | 0.096774 | 0 | 0.258065 | 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 |
a6bb84f81d229ef9b0b05112770f57fbf3a0daf2 | 1,007 | py | Python | main.py | leandrovrabelo/pico_max7219 | 16c695908c9e39740406dc60c650168b8b4d7a5d | [
"MIT"
] | 3 | 2021-04-02T09:06:39.000Z | 2021-12-22T11:13:43.000Z | main.py | leandrovrabelo/pico_max7219 | 16c695908c9e39740406dc60c650168b8b4d7a5d | [
"MIT"
] | null | null | null | main.py | leandrovrabelo/pico_max7219 | 16c695908c9e39740406dc60c650168b8b4d7a5d | [
"MIT"
] | 1 | 2021-11-06T21:01:42.000Z | 2021-11-06T21:01:42.000Z | from max7219 import Matrix8x8
from machine import Pin, SPI
from utime import sleep
if __name__ == '__main__':
CS = Pin(5, Pin.OUT) # GPIO5 pin 7
CLK = Pin(6) # GPIO6 pin 9
DIN = Pin(7) # GPIO7 pin 10
BRIGHTNESS = 3 # from 0 to 15
text1 = "Hello World!"
text2 = "PICO PI"
# C... | 27.972222 | 89 | 0.571003 | 139 | 1,007 | 4.035971 | 0.553957 | 0.01426 | 0.057041 | 0.060606 | 0.064171 | 0 | 0 | 0 | 0 | 0 | 0 | 0.070997 | 0.342602 | 1,007 | 36 | 90 | 27.972222 | 0.776435 | 0.226415 | 0 | 0.173913 | 0 | 0 | 0.036735 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.130435 | 0 | 0.130435 | 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 |
a6bc42fe55c00a39f6b5dcc77087968fc2014f3d | 3,319 | py | Python | tests/test_dynamicprinter.py | DerekYu177/Tooling | 4b1c0490375659e716be708db254cb4f1b8f2b6b | [
"MIT"
] | 2 | 2018-06-28T20:30:25.000Z | 2022-01-03T15:14:39.000Z | tests/test_dynamicprinter.py | DerekYu177/Tooling | 4b1c0490375659e716be708db254cb4f1b8f2b6b | [
"MIT"
] | 4 | 2018-06-26T23:33:14.000Z | 2018-07-09T00:44:17.000Z | tests/test_dynamicprinter.py | DerekYu177/dynamictableprint | 4b1c0490375659e716be708db254cb4f1b8f2b6b | [
"MIT"
] | null | null | null | """
Tests the table print extra module
"""
import unittest
from unittest import mock
import pandas as pd
from dynamictableprint.dynamicprinter import DynamicTablePrint
def mock_terminal_size(_):
"""
Does what it says
"""
return [80]
class TestDynamicTablePrint(unittest.TestCase):
"""
Tests t... | 31.018692 | 87 | 0.602591 | 374 | 3,319 | 5.128342 | 0.379679 | 0.086027 | 0.015641 | 0.028676 | 0.079249 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013288 | 0.297077 | 3,319 | 106 | 88 | 31.311321 | 0.80883 | 0.134378 | 0 | 0 | 0 | 0 | 0.086022 | 0 | 0 | 0 | 0 | 0 | 0.092308 | 1 | 0.123077 | false | 0 | 0.061538 | 0 | 0.215385 | 0.076923 | 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 |
a6c11429802da894fcfc47476b4c7e126e53cb6b | 1,778 | py | Python | pitfall/helpers/aws/utils.py | bincyber/pitfall | 680c33ae30a2ed1d2bbf742f74accc34b81b1f5b | [
"Apache-2.0"
] | 33 | 2019-11-06T03:45:55.000Z | 2020-12-15T09:14:42.000Z | pitfall/helpers/aws/utils.py | bincyber/pitfall | 680c33ae30a2ed1d2bbf742f74accc34b81b1f5b | [
"Apache-2.0"
] | 3 | 2019-11-19T19:02:44.000Z | 2020-03-29T17:52:11.000Z | pitfall/helpers/aws/utils.py | bincyber/pitfall | 680c33ae30a2ed1d2bbf742f74accc34b81b1f5b | [
"Apache-2.0"
] | 1 | 2020-07-29T07:33:52.000Z | 2020-07-29T07:33:52.000Z | # Copyright 2019 Ali (@bincyber)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 25.4 | 86 | 0.669854 | 258 | 1,778 | 4.546512 | 0.449612 | 0.051151 | 0.017903 | 0.02728 | 0.085251 | 0.063086 | 0.063086 | 0 | 0 | 0 | 0 | 0.010241 | 0.231159 | 1,778 | 69 | 87 | 25.768116 | 0.847842 | 0.564117 | 0 | 0 | 0 | 0 | 0.054015 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.136364 | false | 0 | 0.136364 | 0 | 0.409091 | 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 |
a6c6d6983ffc811129d05e0b916f71312c4f08b8 | 1,115 | py | Python | cmdbox/scaffold_templates/urls.py | vitorfs/cmdbox | 97806c02caf5947ec855286212e61db714e3fb02 | [
"MIT"
] | 1 | 2019-09-07T11:49:11.000Z | 2019-09-07T11:49:11.000Z | cmdbox/scaffold_templates/urls.py | vitorfs/cmdbox | 97806c02caf5947ec855286212e61db714e3fb02 | [
"MIT"
] | null | null | null | cmdbox/scaffold_templates/urls.py | vitorfs/cmdbox | 97806c02caf5947ec855286212e61db714e3fb02 | [
"MIT"
] | 2 | 2018-09-04T08:33:17.000Z | 2020-09-18T20:26:46.000Z | from django.conf.urls import url
from cmdbox.scaffold_templates import views
urlpatterns = [
url(r'^$', views.scaffold_templates, name='list'),
url(r'^(?P<slug>[^/]+)/$', views.details, name='details'),
url(r'^(?P<slug>[^/]+)/add-file/$', views.add_file, name='add_file'),
url(r'^(?P<slug>[^/]+)/add-f... | 53.095238 | 108 | 0.594619 | 166 | 1,115 | 3.825301 | 0.162651 | 0.075591 | 0.086614 | 0.155906 | 0.292913 | 0.181102 | 0.181102 | 0.181102 | 0.181102 | 0 | 0 | 0 | 0.095964 | 1,115 | 20 | 109 | 55.75 | 0.62996 | 0 | 0 | 0 | 0 | 0 | 0.451121 | 0.325561 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.117647 | 0 | 0.117647 | 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 |
a6c9952b1ebee49b75a8c48cec1cb1ca06df5caf | 2,653 | py | Python | [20]_break_AES_in_CTR_mode_statistically/analyzer_gui_entry.py | lucasg/Cryptopals | 095e80d0ab9acdda4e5804b45cdba932231086ff | [
"MIT"
] | 19 | 2016-08-01T03:45:39.000Z | 2022-02-01T19:48:52.000Z | [20]_break_AES_in_CTR_mode_statistically/analyzer_gui_entry.py | lucasg/Cryptopals | 095e80d0ab9acdda4e5804b45cdba932231086ff | [
"MIT"
] | null | null | null | [20]_break_AES_in_CTR_mode_statistically/analyzer_gui_entry.py | lucasg/Cryptopals | 095e80d0ab9acdda4e5804b45cdba932231086ff | [
"MIT"
] | 6 | 2019-04-27T02:09:46.000Z | 2021-04-05T15:09:51.000Z | # -*- coding: utf-8 -*-
import tkinter as tk
from tkinter import ttk
# Entry : a tkinter.Entry override which is more practical to use
# There is a label to the left and a button to the right (optionnals) :
#
# ----------------------------------------------
# | | | |
# | Label | Entry(redim) | Butto... | 24.33945 | 71 | 0.591406 | 338 | 2,653 | 4.56213 | 0.286982 | 0.046693 | 0.042153 | 0.014267 | 0.076524 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001023 | 0.263098 | 2,653 | 109 | 72 | 24.33945 | 0.787724 | 0.345646 | 0 | 0.12963 | 0 | 0 | 0.031085 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.037037 | 0.074074 | 0.296296 | 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 |
a6ca3f09187518fec89422b29515f0f9cc5492c9 | 4,756 | py | Python | slack_janitor/main.py | paraita/slack-janitor | 64b3bdf76967276743144d9ef2db7f3fb5deaaea | [
"MIT"
] | null | null | null | slack_janitor/main.py | paraita/slack-janitor | 64b3bdf76967276743144d9ef2db7f3fb5deaaea | [
"MIT"
] | null | null | null | slack_janitor/main.py | paraita/slack-janitor | 64b3bdf76967276743144d9ef2db7f3fb5deaaea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Bulk deletion of files on your Slack workspace
Requires a valid token from:
https://api.slack.com/custom-integrations/legacy-tokens
"""
import os
import sys
import json
import urllib.parse
import http.client
import calendar
import argparse
import time
from datetime import datetime, t... | 35.759398 | 170 | 0.626997 | 614 | 4,756 | 4.752443 | 0.306189 | 0.015422 | 0.023304 | 0.024674 | 0.290953 | 0.271761 | 0.242289 | 0.153873 | 0.153873 | 0.139136 | 0 | 0.005569 | 0.244954 | 4,756 | 132 | 171 | 36.030303 | 0.807018 | 0.065181 | 0 | 0.285714 | 0 | 0.008929 | 0.219556 | 0.007469 | 0 | 0 | 0 | 0 | 0 | 1 | 0.053571 | false | 0 | 0.080357 | 0 | 0.196429 | 0.116071 | 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 |
a6caf3fe4edf041c7511413b1ca3d3833f7691c2 | 22,030 | py | Python | executors/location.py | thevickypedia/jarvis | 4bea623bb9f1618509d4fcd77a696c638011799c | [
"MIT"
] | null | null | null | executors/location.py | thevickypedia/jarvis | 4bea623bb9f1618509d4fcd77a696c638011799c | [
"MIT"
] | null | null | null | executors/location.py | thevickypedia/jarvis | 4bea623bb9f1618509d4fcd77a696c638011799c | [
"MIT"
] | null | null | null | import json
import math
import os
import pathlib
import re
import socket
import ssl
import sys
import urllib.error
import urllib.request
import webbrowser
from difflib import SequenceMatcher
from typing import NoReturn, Tuple, Union
import certifi
import yaml
from geopy.distance import geodesic
from geopy.exc import G... | 44.236948 | 120 | 0.644303 | 2,749 | 22,030 | 5.073118 | 0.17279 | 0.030116 | 0.039008 | 0.030475 | 0.321239 | 0.255557 | 0.175678 | 0.114872 | 0.094579 | 0.063172 | 0 | 0.003086 | 0.249796 | 22,030 | 497 | 121 | 44.325956 | 0.840745 | 0.145801 | 0 | 0.281167 | 0 | 0.005305 | 0.195077 | 0.019918 | 0 | 0 | 0 | 0 | 0 | 1 | 0.03183 | false | 0.007958 | 0.079576 | 0 | 0.188329 | 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 |
a6d2975738e714400f26abe4b83b94afadae7e7d | 1,746 | py | Python | sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 36.375 | 76 | 0.63173 | 192 | 1,746 | 5.5625 | 0.505208 | 0.133895 | 0.127341 | 0.039326 | 0.093633 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000707 | 0.190149 | 1,746 | 47 | 77 | 37.148936 | 0.754597 | 0.56701 | 0 | 0 | 0 | 0 | 0.257184 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.058824 | 0 | 0.294118 | 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 |
a6d52658de85b23a61ea3688d54052bd4719e515 | 10,597 | py | Python | Chapter09/wallet/wallet_widgets/send_widget.py | HowToBeCalculated/Hands-On-Blockchain-for-Python-Developers | f9634259dd3dc509f36a5ccf3a5182c0d2ec79c4 | [
"MIT"
] | 62 | 2019-03-18T04:41:41.000Z | 2022-03-31T05:03:13.000Z | Chapter09/wallet/wallet_widgets/send_widget.py | HowToBeCalculated/Hands-On-Blockchain-for-Python-Developers | f9634259dd3dc509f36a5ccf3a5182c0d2ec79c4 | [
"MIT"
] | 2 | 2020-06-14T21:56:03.000Z | 2022-01-07T05:32:01.000Z | Chapter09/wallet/wallet_widgets/send_widget.py | HowToBeCalculated/Hands-On-Blockchain-for-Python-Developers | f9634259dd3dc509f36a5ccf3a5182c0d2ec79c4 | [
"MIT"
] | 42 | 2019-02-22T03:10:36.000Z | 2022-02-20T04:47:04.000Z | from PySide2.QtWidgets import (QWidget,
QGridLayout,
QVBoxLayout,
QHBoxLayout,
QPushButton,
QLabel,
QInputDialog,
... | 42.388 | 126 | 0.678116 | 1,083 | 10,597 | 6.376731 | 0.158818 | 0.033884 | 0.033015 | 0.060817 | 0.267593 | 0.181436 | 0.131914 | 0.071532 | 0.028092 | 0.028092 | 0 | 0.0036 | 0.239879 | 10,597 | 249 | 127 | 42.558233 | 0.853755 | 0 | 0 | 0.048077 | 0 | 0 | 0.031235 | 0.005945 | 0 | 0 | 0.003963 | 0 | 0 | 1 | 0.067308 | false | 0.019231 | 0.043269 | 0 | 0.120192 | 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 |
a6d68744f1e709ba14365f28499cedb2613a508d | 1,097 | py | Python | CodeInterview/python/chapter2.py | espang/books | 821c92833968dca8b8a0456464f2e33211601abb | [
"MIT"
] | null | null | null | CodeInterview/python/chapter2.py | espang/books | 821c92833968dca8b8a0456464f2e33211601abb | [
"MIT"
] | null | null | null | CodeInterview/python/chapter2.py | espang/books | 821c92833968dca8b8a0456464f2e33211601abb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 25 23:08:27 2016
@author: eikes
"""
class Node(object):
def __init__(self, value, next_node=None):
self.value = value
self.next_node = next_node
def has_next(self):
return self.next_node is not None
def __repr__(self):
vals =... | 24.377778 | 61 | 0.547858 | 150 | 1,097 | 3.84 | 0.373333 | 0.125 | 0.041667 | 0.055556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.023384 | 0.337284 | 1,097 | 45 | 62 | 24.377778 | 0.768913 | 0.111212 | 0 | 0.121212 | 0 | 0 | 0.009307 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.151515 | false | 0 | 0 | 0.030303 | 0.30303 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
a6d7926ffd9c46e7000b4eeb76ac9fcded9a18e3 | 2,878 | py | Python | dotup/__init__.py | audiolion/dotup | 8c7243d5606340288a7968a6ff3f64d331d5d0e0 | [
"MIT"
] | 4 | 2019-02-17T01:04:15.000Z | 2019-02-20T13:39:25.000Z | dotup/__init__.py | audiolion/dotup | 8c7243d5606340288a7968a6ff3f64d331d5d0e0 | [
"MIT"
] | 4 | 2019-02-17T00:57:32.000Z | 2019-02-17T22:32:11.000Z | dotup/__init__.py | audiolion/dotup | 8c7243d5606340288a7968a6ff3f64d331d5d0e0 | [
"MIT"
] | null | null | null | __version__ = '0.3.2'
import sys
import os
import pwd
from pathlib import Path
import click
import crayons
def update_symlink(directory, filename, force=None):
force = False if force is None else force
home = str(Path.home())
try:
os.symlink(f'{home}/{directory}/{filename}', f'{home}/{filename}'... | 29.979167 | 97 | 0.59451 | 324 | 2,878 | 5.179012 | 0.311728 | 0.11621 | 0.075089 | 0.052443 | 0.329559 | 0.18236 | 0.133492 | 0.133492 | 0.133492 | 0.133492 | 0 | 0.005652 | 0.262335 | 2,878 | 95 | 98 | 30.294737 | 0.784739 | 0.005559 | 0 | 0.192308 | 0 | 0.012821 | 0.32972 | 0.158741 | 0 | 0 | 0 | 0 | 0 | 1 | 0.051282 | false | 0 | 0.076923 | 0.012821 | 0.205128 | 0.089744 | 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 |
a6d9cb957ff30829049142edec6723b7649061c1 | 4,312 | py | Python | plugins/quetz_tos/quetz_tos/api.py | fcollonval/quetz | 6f604a29e13ef80d1b5e7ec48408841d0e4d482a | [
"BSD-3-Clause"
] | 108 | 2020-09-16T16:15:01.000Z | 2022-03-29T02:49:31.000Z | plugins/quetz_tos/quetz_tos/api.py | fcollonval/quetz | 6f604a29e13ef80d1b5e7ec48408841d0e4d482a | [
"BSD-3-Clause"
] | 317 | 2020-09-07T18:37:33.000Z | 2022-03-25T13:10:41.000Z | plugins/quetz_tos/quetz_tos/api.py | janjagusch/quetz | 4d88b4695166d310823a48e81e025983846afd05 | [
"BSD-3-Clause"
] | 36 | 2020-09-07T22:01:27.000Z | 2022-03-26T17:06:07.000Z | import os
import uuid
from tempfile import SpooledTemporaryFile
from fastapi import APIRouter, Depends, File, HTTPException, UploadFile, status
from sqlalchemy.orm.session import Session
from quetz import authorization, dao
from quetz.config import Config
from quetz.deps import get_dao, get_db, get_rules
from .db_mo... | 32.666667 | 85 | 0.629174 | 529 | 4,312 | 4.94896 | 0.283554 | 0.022918 | 0.032086 | 0.042781 | 0.347212 | 0.25783 | 0.196715 | 0.175325 | 0.149351 | 0.149351 | 0 | 0.006986 | 0.269712 | 4,312 | 131 | 86 | 32.916031 | 0.824389 | 0.073284 | 0 | 0.247706 | 0 | 0 | 0.114286 | 0.006266 | 0 | 0 | 0 | 0 | 0.018349 | 1 | 0.036697 | false | 0 | 0.082569 | 0 | 0.155963 | 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 |
a6da277871e2e14767fe369496d352e64e854912 | 1,546 | py | Python | tests/unit/dataactvalidator/test_a26_appropriations.py | chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend | 3de8cedf69d5a0c9fad8239734bd6291cf583936 | [
"CC0-1.0"
] | null | null | null | tests/unit/dataactvalidator/test_a26_appropriations.py | chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend | 3de8cedf69d5a0c9fad8239734bd6291cf583936 | [
"CC0-1.0"
] | null | null | null | tests/unit/dataactvalidator/test_a26_appropriations.py | chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend | 3de8cedf69d5a0c9fad8239734bd6291cf583936 | [
"CC0-1.0"
] | null | null | null | from tests.unit.dataactcore.factories.staging import AppropriationFactory
from tests.unit.dataactcore.factories.domain import SF133Factory
from tests.unit.dataactvalidator.utils import number_of_errors, query_columns
_FILE = 'a26_appropriations'
_TAS = 'a26_appropriations_tas'
def test_column_headers(database):
... | 37.707317 | 103 | 0.73674 | 200 | 1,546 | 5.48 | 0.32 | 0.032847 | 0.065693 | 0.087591 | 0.655109 | 0.594891 | 0.50365 | 0.50365 | 0.50365 | 0.50365 | 0 | 0.054323 | 0.154593 | 1,546 | 40 | 104 | 38.65 | 0.784239 | 0.143596 | 0 | 0.181818 | 0 | 0 | 0.082181 | 0.039171 | 0 | 0 | 0 | 0 | 0.136364 | 1 | 0.136364 | false | 0 | 0.136364 | 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 |
a6dba61497cd544b0b3b024aa19484ec4d75797d | 5,334 | py | Python | mysql.py | alphagov/fabric-scripts | c162a43acdef9dec41acd7b2127f2cdef78be347 | [
"MIT"
] | 46 | 2015-03-21T00:45:27.000Z | 2021-11-16T04:33:29.000Z | mysql.py | alphagov/fabric-scripts | c162a43acdef9dec41acd7b2127f2cdef78be347 | [
"MIT"
] | 123 | 2015-03-02T12:10:31.000Z | 2021-11-16T10:29:27.000Z | mysql.py | alphagov/fabric-scripts | c162a43acdef9dec41acd7b2127f2cdef78be347 | [
"MIT"
] | 19 | 2015-02-09T11:06:10.000Z | 2021-04-22T16:52:28.000Z | from fabric.api import abort, env, hide, run, settings, task
from fabric.operations import prompt
def run_mysql_command(cmd):
run('sudo -i mysql -e "{}"'.format(cmd))
def switch_slow_query_log(value):
run_mysql_command('SET GLOBAL slow_query_log = "{}"'.format(value))
@task
def stop_slow_query_log(*args):... | 35.324503 | 151 | 0.691226 | 790 | 5,334 | 4.487342 | 0.264557 | 0.042877 | 0.076164 | 0.018336 | 0.376869 | 0.304372 | 0.281241 | 0.241467 | 0.201128 | 0.160508 | 0 | 0.011671 | 0.19685 | 5,334 | 150 | 152 | 35.56 | 0.815826 | 0.290776 | 0 | 0.338028 | 0 | 0.056338 | 0.390184 | 0.041404 | 0 | 0 | 0 | 0 | 0 | 1 | 0.126761 | false | 0.042254 | 0.042254 | 0 | 0.169014 | 0.056338 | 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 |
a6dc1338864b8a9e2eb892ae7bb5fddbec7266c6 | 1,158 | py | Python | Experiment/stream.py | zainbaq/pyOpenBCI | 524d0263502ba5c3360be7a0fb4f1022dfe3108f | [
"MIT"
] | null | null | null | Experiment/stream.py | zainbaq/pyOpenBCI | 524d0263502ba5c3360be7a0fb4f1022dfe3108f | [
"MIT"
] | null | null | null | Experiment/stream.py | zainbaq/pyOpenBCI | 524d0263502ba5c3360be7a0fb4f1022dfe3108f | [
"MIT"
] | null | null | null | from pyOpenBCI import OpenBCIGanglion
from pylsl import StreamInfo, StreamOutlet
import numpy as np
import argparse
import json
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--config_path', type=str, default='config/board_config.json')
return parser.parse_args()
SCALE_FACTOR_EE... | 27.571429 | 86 | 0.753022 | 156 | 1,158 | 5.410256 | 0.487179 | 0.031991 | 0.049763 | 0.049763 | 0.092417 | 0.092417 | 0.092417 | 0.092417 | 0 | 0 | 0 | 0.021632 | 0.121762 | 1,158 | 41 | 87 | 28.243902 | 0.80826 | 0.070812 | 0 | 0 | 0 | 0 | 0.186916 | 0.02243 | 0 | 0 | 0 | 0 | 0 | 1 | 0.08 | false | 0 | 0.2 | 0 | 0.32 | 0.12 | 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 |
a6e3c38a31c4479f6488038ae2839813f652c121 | 17,672 | py | Python | source/methods_upload_user_stats.py | CheyenneNS/metrics | cfeeac6d01d99679897a998b193d630ada169c61 | [
"MIT"
] | null | null | null | source/methods_upload_user_stats.py | CheyenneNS/metrics | cfeeac6d01d99679897a998b193d630ada169c61 | [
"MIT"
] | null | null | null | source/methods_upload_user_stats.py | CheyenneNS/metrics | cfeeac6d01d99679897a998b193d630ada169c61 | [
"MIT"
] | null | null | null | from pymongo import MongoClient
from pymongo import ReadPreference
import json as _json
import os
import mysql.connector as mysql
import requests
requests.packages.urllib3.disable_warnings()
# NOTE get_user_info_from_auth2 sets up the initial dict.
#The following functions update certain fields in the dict.
# So get_... | 48.416438 | 139 | 0.589577 | 2,017 | 17,672 | 4.885969 | 0.164601 | 0.061187 | 0.087062 | 0.078843 | 0.388128 | 0.275799 | 0.216844 | 0.178995 | 0.150888 | 0.124099 | 0 | 0.00792 | 0.306983 | 17,672 | 364 | 140 | 48.549451 | 0.796767 | 0.115607 | 0 | 0.142857 | 0 | 0 | 0.194509 | 0.01753 | 0 | 0 | 0 | 0 | 0 | 1 | 0.021429 | false | 0.010714 | 0.021429 | 0 | 0.067857 | 0.039286 | 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 |
a6e5807938177f25388fc19a921008773b63bd36 | 1,096 | py | Python | profiles/tests.py | Jokotoye18/Learning_log | 7de278e252c9abd23a462cf6d7358e8ed22cb66f | [
"MIT"
] | null | null | null | profiles/tests.py | Jokotoye18/Learning_log | 7de278e252c9abd23a462cf6d7358e8ed22cb66f | [
"MIT"
] | 4 | 2021-03-30T13:25:57.000Z | 2021-09-22T19:04:09.000Z | profiles/tests.py | Jokotoye18/Learning_log | 7de278e252c9abd23a462cf6d7358e8ed22cb66f | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from.models import Profile
from allauth.account.forms import SignupForm
from django.urls import reverse
class ProfileModelTest(TestCase):
def setUp(self):
self.user = get_user_model().objects.create_user(
em... | 31.314286 | 76 | 0.642336 | 127 | 1,096 | 5.456693 | 0.354331 | 0.050505 | 0.11544 | 0.1443 | 0.206349 | 0.089466 | 0 | 0 | 0 | 0 | 0 | 0 | 0.231752 | 1,096 | 35 | 77 | 31.314286 | 0.82304 | 0 | 0 | 0 | 0 | 0 | 0.198724 | 0.041933 | 0 | 0 | 0 | 0 | 0.185185 | 1 | 0.111111 | false | 0 | 0.185185 | 0 | 0.444444 | 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 |
a6e7bb7bfc30d3b8e909b178aa21379802d6f3d7 | 26,013 | py | Python | pyro/infer/autoguide/gaussian.py | Jayanth-kumar5566/pyro | a98bb57e1704997a3e01c76a7820c0b1db909ee3 | [
"Apache-2.0"
] | 4,959 | 2017-11-03T14:39:17.000Z | 2019-02-04T16:14:30.000Z | pyro/infer/autoguide/gaussian.py | Jayanth-kumar5566/pyro | a98bb57e1704997a3e01c76a7820c0b1db909ee3 | [
"Apache-2.0"
] | 985 | 2017-11-03T14:27:56.000Z | 2019-02-02T18:52:54.000Z | pyro/infer/autoguide/gaussian.py | Jayanth-kumar5566/pyro | a98bb57e1704997a3e01c76a7820c0b1db909ee3 | [
"Apache-2.0"
] | 564 | 2017-11-03T15:05:55.000Z | 2019-01-31T14:02:29.000Z | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import itertools
from abc import ABCMeta, abstractmethod
from collections import OrderedDict, defaultdict
from contextlib import ExitStack
from types import SimpleNamespace
from typing import Callable, Dict, Optional, Set, Tuple, Union... | 41.290476 | 110 | 0.615462 | 3,143 | 26,013 | 4.878142 | 0.180719 | 0.018262 | 0.007827 | 0.010566 | 0.237412 | 0.186408 | 0.154579 | 0.117793 | 0.103118 | 0.098748 | 0 | 0.00897 | 0.284281 | 26,013 | 629 | 111 | 41.356121 | 0.814534 | 0.207934 | 0 | 0.187204 | 0 | 0 | 0.054453 | 0.002468 | 0 | 0 | 0 | 0 | 0.009479 | 1 | 0.054502 | false | 0 | 0.063981 | 0.004739 | 0.180095 | 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 |
a6eab1523ee5589b73c20527590238599c8dfd16 | 320 | py | Python | ABC/063/c.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/063/c.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/063/c.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | def main():
# input
N = int(input())
ss = [int(input()) for _ in range(N)]
# compute
ans = sum(ss)
for s in sorted(ss):
if ans%10==0 and s%10!=0:
ans -= s
# output
if ans%10 == 0:
print(0)
else:
print(ans)
if __name__ == '__main__':
main()
| 15.238095 | 41 | 0.453125 | 46 | 320 | 2.956522 | 0.478261 | 0.066176 | 0.102941 | 0.117647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.05102 | 0.3875 | 320 | 20 | 42 | 16 | 0.642857 | 0.0625 | 0 | 0 | 0 | 0 | 0.027027 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0 | 0 | 0.076923 | 0.153846 | 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 |
a6ecd6ac96ad20775915e71b1e12991c1fd7b239 | 4,711 | py | Python | ja_timex/timex.py | otokunaga2/ja-timex | 4534ecbb3d4e780d4777ed239bb832ce849fa0c1 | [
"MIT"
] | null | null | null | ja_timex/timex.py | otokunaga2/ja-timex | 4534ecbb3d4e780d4777ed239bb832ce849fa0c1 | [
"MIT"
] | null | null | null | ja_timex/timex.py | otokunaga2/ja-timex | 4534ecbb3d4e780d4777ed239bb832ce849fa0c1 | [
"MIT"
] | null | null | null | import re
from collections import defaultdict
from typing import DefaultDict, Dict, List
from ja_timex.number_normalizer import NumberNormalizer
from ja_timex.tag import TIMEX
from ja_timex.tagger import AbstimeTagger, DurationTagger, ReltimeTagger, SetTagger
from ja_timex.util import is_parial_pattern_of_number_expre... | 42.441441 | 116 | 0.659733 | 542 | 4,711 | 5.431734 | 0.197417 | 0.026155 | 0.035666 | 0.037364 | 0.189198 | 0.141304 | 0.118886 | 0.101223 | 0.101223 | 0.084239 | 0 | 0.002537 | 0.246869 | 4,711 | 110 | 117 | 42.827273 | 0.827227 | 0.032902 | 0 | 0 | 0 | 0 | 0.041795 | 0 | 0 | 0 | 0 | 0.009091 | 0 | 1 | 0.08642 | false | 0 | 0.08642 | 0.012346 | 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 |
a6ee6c5c06774806a22bfd966c8beb3678968a98 | 1,481 | py | Python | pydynamo_brain/pydynamo_brain/ui/tilefigs.py | ubcbraincircuits/pyDynamo | 006eb6edb5e54670574dbfdf7d249e9037f01ffc | [
"MIT"
] | 4 | 2021-12-16T22:32:47.000Z | 2022-01-03T05:42:12.000Z | pydynamo_brain/pydynamo_brain/ui/tilefigs.py | padster/pyDynamo | 006eb6edb5e54670574dbfdf7d249e9037f01ffc | [
"MIT"
] | 1 | 2021-11-15T18:14:20.000Z | 2021-11-15T18:14:36.000Z | pydynamo_brain/pydynamo_brain/ui/tilefigs.py | padster/pyDynamo | 006eb6edb5e54670574dbfdf7d249e9037f01ffc | [
"MIT"
] | 1 | 2022-01-21T23:03:24.000Z | 2022-01-21T23:03:24.000Z | import math
from PyQt5.QtCore import QRect
from PyQt5.QtWidgets import QDesktopWidget
# pyqt5 version of matlab tilefigs function
def tileFigs(stackWindows):
# Filter out only open windows:
stackWindows = [w for w in stackWindows if w is not None]
assert len(stackWindows) > 0
hspc = 10 # Horisontal... | 35.261905 | 81 | 0.609048 | 191 | 1,481 | 4.722513 | 0.492147 | 0.026608 | 0.049889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017992 | 0.286968 | 1,481 | 41 | 82 | 36.121951 | 0.836174 | 0.26266 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035714 | 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 |
a6f06952cd7645789cd9e5361ca955bdb8ae1570 | 2,126 | py | Python | gmmmml/policies/prediction.py | andycasey/gmmmml | 1acfeea14514fb7ed44ccdfadefc87f996fee86f | [
"MIT"
] | 3 | 2021-02-15T05:37:01.000Z | 2021-09-22T22:06:12.000Z | gmmmml/policies/prediction.py | andycasey/gmmmml | 1acfeea14514fb7ed44ccdfadefc87f996fee86f | [
"MIT"
] | null | null | null | gmmmml/policies/prediction.py | andycasey/gmmmml | 1acfeea14514fb7ed44ccdfadefc87f996fee86f | [
"MIT"
] | 1 | 2021-02-15T05:37:06.000Z | 2021-02-15T05:37:06.000Z |
import logging
import numpy as np
from .base import Policy
logger_name, *_ = __name__.split(".")
logger = logging.getLogger(logger_name)
class BasePredictionPolicy(Policy):
def __init__(self, *args, **kwargs):
super(BasePredictionPolicy, self).__init__(*args, **kwargs)
def predict(self, ... | 26.911392 | 95 | 0.623236 | 280 | 2,126 | 4.539286 | 0.321429 | 0.042486 | 0.04406 | 0.047207 | 0.451613 | 0.451613 | 0.346184 | 0.346184 | 0.346184 | 0.284815 | 0 | 0.013068 | 0.24412 | 2,126 | 79 | 96 | 26.911392 | 0.777847 | 0.062559 | 0 | 0.529412 | 0 | 0 | 0.117092 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.176471 | false | 0 | 0.088235 | 0.029412 | 0.470588 | 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 |
a6f0c204d86ffc44292e3d7658bed03896f0bc41 | 818 | py | Python | binarytree/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 79 | 2018-03-27T12:37:49.000Z | 2022-01-21T10:18:17.000Z | binarytree/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | null | null | null | binarytree/q16.py | pengfei-chen/algorithm_qa | c2ccdcb77004e88279d61e4e433ee49527fc34d6 | [
"MIT"
] | 27 | 2018-04-08T03:07:06.000Z | 2021-10-30T00:01:50.000Z | """
问题描述:给定一个有序数组sortArr,已知其中没有重复值,用这个有序数组生成一棵平衡二叉搜索树,并且该搜索二叉树
中序遍历结果与sortArr一致。
"""
from binarytree.toolcls import Node
from binarytree.q3 import PrintTree
class ReconstructBalancedBST:
@classmethod
def reconstruct(cls, arr):
if len(arr) == 0 or arr is None:
return None
return ... | 23.371429 | 65 | 0.643032 | 102 | 818 | 5.029412 | 0.45098 | 0.132554 | 0.116959 | 0.134503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.025974 | 0.246944 | 818 | 35 | 65 | 23.371429 | 0.806818 | 0.09291 | 0 | 0.2 | 0 | 0 | 0.010884 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.1 | 0 | 0.45 | 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 |
a6f1580c564937d6e53353810c7dfb2323b8dd6c | 1,988 | py | Python | tests/settings.py | acv-auctions/manifold | b798b0dd6c2f96395d47f700fd2ed0451b80331b | [
"Apache-2.0"
] | 2 | 2018-06-08T10:14:40.000Z | 2018-06-09T10:49:17.000Z | tests/settings.py | acv-auctions/manifold | b798b0dd6c2f96395d47f700fd2ed0451b80331b | [
"Apache-2.0"
] | 1 | 2019-01-15T18:38:51.000Z | 2019-01-15T18:38:51.000Z | tests/settings.py | acv-auctions/manifold | b798b0dd6c2f96395d47f700fd2ed0451b80331b | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018 ACV Auctions
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | 24.243902 | 72 | 0.598089 | 221 | 1,988 | 5.330317 | 0.628959 | 0.050934 | 0.022071 | 0.027165 | 0.067912 | 0.067912 | 0.067912 | 0.067912 | 0 | 0 | 0 | 0.019191 | 0.266097 | 1,988 | 81 | 73 | 24.54321 | 0.788211 | 0.309859 | 0 | 0.087719 | 0 | 0 | 0.391336 | 0.102056 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.035088 | 0 | 0.035088 | 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 |
a6f16c8c9f6389943041ded44b395967b6721d7b | 21,562 | py | Python | Source/osdr_ml_modeler/optimizer.py | ArqiSoft/ml-services | 0c9beacc4a98c3f55ed56969a8b7eb84c4209c21 | [
"MIT"
] | null | null | null | Source/osdr_ml_modeler/optimizer.py | ArqiSoft/ml-services | 0c9beacc4a98c3f55ed56969a8b7eb84c4209c21 | [
"MIT"
] | null | null | null | Source/osdr_ml_modeler/optimizer.py | ArqiSoft/ml-services | 0c9beacc4a98c3f55ed56969a8b7eb84c4209c21 | [
"MIT"
] | 2 | 2018-12-22T13:46:31.000Z | 2019-06-18T16:46:08.000Z | import csv
import json
import os
import shutil
from collections import OrderedDict
from time import time
import numpy
import redis
from sklearn import model_selection
from MLLogger import BaseMLLogger
from exception_handler import MLExceptionHandler
from general_helper import (
get_oauth, make_stream_from_sdf, ma... | 37.240069 | 85 | 0.621927 | 2,402 | 21,562 | 5.317652 | 0.169858 | 0.030063 | 0.012213 | 0.019025 | 0.339779 | 0.25593 | 0.216785 | 0.185783 | 0.154466 | 0.086119 | 0 | 0.012001 | 0.27734 | 21,562 | 578 | 86 | 37.304498 | 0.807727 | 0.163575 | 0 | 0.284314 | 0 | 0 | 0.126636 | 0.02465 | 0 | 0 | 0 | 0 | 0 | 1 | 0.022059 | false | 0 | 0.041667 | 0 | 0.080882 | 0.080882 | 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 |
a6f1f913f6a078effa24dda0c369361db5605649 | 1,415 | py | Python | tutorials/preprocessing/plot_extract_gfp_peaks.py | mscheltienne/pycrostates | be87adf69c94b2b179064f337acd8a49d01c305d | [
"BSD-3-Clause"
] | 1 | 2021-12-14T09:58:57.000Z | 2021-12-14T09:58:57.000Z | tutorials/preprocessing/plot_extract_gfp_peaks.py | mscheltienne/pycrostates | be87adf69c94b2b179064f337acd8a49d01c305d | [
"BSD-3-Clause"
] | null | null | null | tutorials/preprocessing/plot_extract_gfp_peaks.py | mscheltienne/pycrostates | be87adf69c94b2b179064f337acd8a49d01c305d | [
"BSD-3-Clause"
] | null | null | null | """
Global field power peaks extraction
===================================
This example demonstrates how to extract global field power (gfp) peaks for an eeg recording.
"""
#%%
# We start by loading some example data:
import mne
from mne.io import read_raw_eeglab
from pycrostates.datasets import lemon
raw_fname =... | 28.3 | 93 | 0.744876 | 214 | 1,415 | 4.775701 | 0.509346 | 0.039139 | 0.058708 | 0.035225 | 0.027397 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009039 | 0.139929 | 1,415 | 49 | 94 | 28.877551 | 0.830731 | 0.582332 | 0 | 0 | 0 | 0 | 0.040636 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.285714 | 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 |
a6fa1d12f414932e8c4b3f796cf576788abf842d | 2,284 | py | Python | setup.py | bluedynamics/souper.plone | 64afe8dc1f87f45c2e96e305f5fff2104ac21007 | [
"BSD-3-Clause"
] | 2 | 2015-05-05T15:16:44.000Z | 2019-07-09T12:53:52.000Z | setup.py | bluedynamics/souper.plone | 64afe8dc1f87f45c2e96e305f5fff2104ac21007 | [
"BSD-3-Clause"
] | 5 | 2015-06-02T06:42:00.000Z | 2021-02-13T15:31:29.000Z | setup.py | bluedynamics/souper.plone | 64afe8dc1f87f45c2e96e305f5fff2104ac21007 | [
"BSD-3-Clause"
] | 3 | 2015-05-05T15:17:25.000Z | 2018-10-12T11:10:55.000Z | from setuptools import setup, find_packages
import sys
import os
version = '1.3.2.dev0'
shortdesc = \
"Plone Souper Integration: Container for many lightweight queryable Records"
longdesc = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
longdesc += open(os.path.join(os.path.dirname(__file__), '... | 35.138462 | 83 | 0.572242 | 228 | 2,284 | 5.618421 | 0.495614 | 0.028103 | 0.117096 | 0.042155 | 0.135051 | 0.102264 | 0.102264 | 0.102264 | 0.102264 | 0.071819 | 0 | 0.016354 | 0.277145 | 2,284 | 64 | 84 | 35.6875 | 0.75954 | 0.031086 | 0 | 0.048387 | 0 | 0 | 0.469923 | 0.010855 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.048387 | 0 | 0.048387 | 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 |
a6ffa89ddaaff36c4e4467a85ca26b7f3d836ded | 3,118 | py | Python | tests/entities/test_member.py | rennerocha/asociate-old | 75e946a1db909299b1442a4bce3b78a2ddf2aafb | [
"MIT"
] | null | null | null | tests/entities/test_member.py | rennerocha/asociate-old | 75e946a1db909299b1442a4bce3b78a2ddf2aafb | [
"MIT"
] | null | null | null | tests/entities/test_member.py | rennerocha/asociate-old | 75e946a1db909299b1442a4bce3b78a2ddf2aafb | [
"MIT"
] | null | null | null | import uuid
import pytest
from asociate.entities.association import Association
from asociate.entities.member import Member
pytestmark = [
pytest.mark.entities,
]
def test_member_init():
member = Member(
first_name="Arthur",
last_name="Dent",
email="arthur.dent@deepthought.com",
... | 25.349593 | 78 | 0.653945 | 364 | 3,118 | 5.340659 | 0.164835 | 0.08642 | 0.053498 | 0.106996 | 0.511317 | 0.471193 | 0.471193 | 0.452675 | 0.43107 | 0.43107 | 0 | 0.038017 | 0.223861 | 3,118 | 122 | 79 | 25.557377 | 0.765289 | 0 | 0 | 0.505376 | 0 | 0 | 0.220334 | 0.079538 | 0 | 0 | 0 | 0 | 0.172043 | 1 | 0.096774 | false | 0 | 0.043011 | 0 | 0.139785 | 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 |
4701cb86fa4a2a5e7e7875805246fbc42f864585 | 2,256 | py | Python | manage_data.py | lastone9182/console-keep | 250b49653be9d370a1bb0f1c39c5f853c2eaa47e | [
"MIT"
] | null | null | null | manage_data.py | lastone9182/console-keep | 250b49653be9d370a1bb0f1c39c5f853c2eaa47e | [
"MIT"
] | null | null | null | manage_data.py | lastone9182/console-keep | 250b49653be9d370a1bb0f1c39c5f853c2eaa47e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import datetime
class Unit:
def __init__(self, element):
self.annotations = element['annotationsGroup']['annotations']
self.id = element['id']
self.parentId = element['parentId']
self.title = element['title'] if 'title' in element else ''
... | 31.333333 | 112 | 0.520833 | 278 | 2,256 | 4.104317 | 0.309353 | 0.021034 | 0.028922 | 0.029798 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007422 | 0.343085 | 2,256 | 72 | 112 | 31.333333 | 0.762483 | 0.009309 | 0 | 0.067797 | 0 | 0 | 0.093107 | 0.0094 | 0 | 0 | 0 | 0 | 0 | 1 | 0.135593 | false | 0 | 0.016949 | 0 | 0.220339 | 0.050847 | 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 |
47024e2477ee4ebf0940cce361da35002ab9f51a | 11,447 | py | Python | models/deoldify.py | wangruohui/DeOldify-OpenMMLab | 798b1b6675bfbc76d976a3cd6c87915c9b32dcdb | [
"MIT"
] | 6 | 2021-11-02T06:20:22.000Z | 2022-02-14T04:08:50.000Z | models/deoldify.py | wangruohui/DeOldify-OpenMMLab | 798b1b6675bfbc76d976a3cd6c87915c9b32dcdb | [
"MIT"
] | null | null | null | models/deoldify.py | wangruohui/DeOldify-OpenMMLab | 798b1b6675bfbc76d976a3cd6c87915c9b32dcdb | [
"MIT"
] | 1 | 2021-11-03T09:44:00.000Z | 2021-11-03T09:44:00.000Z | # Copyright (c) OpenMMLab. All rights reserved.
import numbers
import os.path as osp
import mmcv
import numpy as np
import torch
from mmcv.runner import auto_fp16
from mmedit.core import tensor2img
from mmedit.models.base import BaseModel
from mmedit.models.builder import build_backbone, build_component, build_loss
f... | 35.006116 | 106 | 0.599983 | 1,365 | 11,447 | 4.810256 | 0.164103 | 0.046299 | 0.019799 | 0.027414 | 0.328815 | 0.269571 | 0.205148 | 0.18474 | 0.175297 | 0.163722 | 0 | 0.003436 | 0.313619 | 11,447 | 326 | 107 | 35.113497 | 0.832252 | 0.353892 | 0 | 0.128571 | 0 | 0 | 0.073329 | 0.003548 | 0 | 0 | 0 | 0 | 0.007143 | 1 | 0.071429 | false | 0.007143 | 0.078571 | 0 | 0.221429 | 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 |
4702b4bd55352e823ec087a35e72ae44e05776e2 | 9,631 | py | Python | btceapi/trade.py | Queeq/btce-api | b9f1045e604e46d89574a960915c51d8076a5c6d | [
"MIT"
] | 1 | 2018-04-16T09:04:37.000Z | 2018-04-16T09:04:37.000Z | btceapi/trade.py | Queeq/btce-api | b9f1045e604e46d89574a960915c51d8076a5c6d | [
"MIT"
] | null | null | null | btceapi/trade.py | Queeq/btce-api | b9f1045e604e46d89574a960915c51d8076a5c6d | [
"MIT"
] | null | null | null | # Copyright (c) 2013 Alan McIntyre
import urllib
import hashlib
import hmac
import warnings
from datetime import datetime
from btceapi import common
from btceapi import keyhandler
class InvalidNonceException(Exception):
def __init__(self, method, expectedNonce, actualNonce):
Exception.__init__(self)
... | 36.206767 | 79 | 0.602326 | 1,155 | 9,631 | 4.911688 | 0.200866 | 0.011987 | 0.015512 | 0.029614 | 0.377402 | 0.323991 | 0.312004 | 0.312004 | 0.306187 | 0.306187 | 0 | 0.002931 | 0.291559 | 9,631 | 266 | 80 | 36.206767 | 0.828521 | 0.13903 | 0 | 0.267045 | 0 | 0 | 0.098006 | 0.002554 | 0 | 0 | 0 | 0 | 0 | 1 | 0.096591 | false | 0 | 0.039773 | 0.005682 | 0.238636 | 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 |
4702d3ea64c33128158593ce3ec94ea461005ad4 | 776 | py | Python | inventory_management/inventory/inventory.py | gmaher/blog_posts | 2db1c0f88adaa76a4bbd188fc3ac230ff9eaefb5 | [
"MIT"
] | null | null | null | inventory_management/inventory/inventory.py | gmaher/blog_posts | 2db1c0f88adaa76a4bbd188fc3ac230ff9eaefb5 | [
"MIT"
] | null | null | null | inventory_management/inventory/inventory.py | gmaher/blog_posts | 2db1c0f88adaa76a4bbd188fc3ac230ff9eaefb5 | [
"MIT"
] | 1 | 2019-12-15T17:17:10.000Z | 2019-12-15T17:17:10.000Z | import numpy as np
class Forecaster:
def __init__(self, c, m, sigma):
self.c = c
self.m = m
self.sigma = sigma
def predict(self, Y0, T):
Yhat = np.zeros((T+self.m))
Yhat[:self.m] = Y0
for i in range(self.m,T+self.m):
Yhat[i] = self.c + Yhat[... | 20.972973 | 76 | 0.45232 | 142 | 776 | 2.443662 | 0.274648 | 0.04611 | 0.025937 | 0.057637 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.039841 | 0.353093 | 776 | 36 | 77 | 21.555556 | 0.651394 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.115385 | false | 0 | 0.038462 | 0 | 0.269231 | 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 |
4703b8b3047a8ef94c23101c750894c129122120 | 1,388 | py | Python | chillpill_examples/cloud_hp_tuning_from_train_fn/run_hp_search.py | kevinbache/chillpill_examples | d9c5fac9972f1afbf7bb4e6b6e5388b9f52c73c3 | [
"MIT"
] | null | null | null | chillpill_examples/cloud_hp_tuning_from_train_fn/run_hp_search.py | kevinbache/chillpill_examples | d9c5fac9972f1afbf7bb4e6b6e5388b9f52c73c3 | [
"MIT"
] | null | null | null | chillpill_examples/cloud_hp_tuning_from_train_fn/run_hp_search.py | kevinbache/chillpill_examples | d9c5fac9972f1afbf7bb4e6b6e5388b9f52c73c3 | [
"MIT"
] | null | null | null | """This module runs a distributed hyperparameter tuning job on Google Cloud AI Platform."""
from pathlib import Path
import numpy as np
import chillpill
from chillpill import packages, params, search
from chillpill_examples.cloud_hp_tuning_from_train_fn import train
if __name__ == '__main__':
# Create a Cloud A... | 35.589744 | 91 | 0.713977 | 186 | 1,388 | 5.048387 | 0.526882 | 0.029819 | 0.028754 | 0.044728 | 0.063898 | 0.063898 | 0.063898 | 0 | 0 | 0 | 0 | 0.022183 | 0.18804 | 1,388 | 38 | 92 | 36.526316 | 0.811003 | 0.157061 | 0 | 0 | 0 | 0 | 0.061102 | 0.020654 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.178571 | 0 | 0.178571 | 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 |
4706c990a64c224b744ada7eefc49fc8bb2c5644 | 858 | py | Python | tests/timing/test_timing_encoding.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 1 | 2019-09-14T16:59:34.000Z | 2019-09-14T16:59:34.000Z | tests/timing/test_timing_encoding.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | null | null | null | tests/timing/test_timing_encoding.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 7 | 2020-01-19T14:40:08.000Z | 2022-01-14T12:50:30.000Z | """Tests timing of encoding classes
"""
import time
import numpy as np
import pandas as pd
#import matplotlib.pyplot as plt
from dsutils.encoding import MultiTargetEncoderLOO
def test_timing_MultiTargetEncoderLOO():
"""Tests timing of encoding.MultiTargetEncoderLOO"""
# Dummy data
N = 10000
Nc = ... | 22.578947 | 61 | 0.638695 | 125 | 858 | 4.28 | 0.448 | 0.059813 | 0.097196 | 0.104673 | 0.157009 | 0.123364 | 0.123364 | 0.123364 | 0.123364 | 0.123364 | 0 | 0.024854 | 0.202797 | 858 | 38 | 62 | 22.578947 | 0.75731 | 0.160839 | 0 | 0 | 0 | 0 | 0.042553 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05 | false | 0 | 0.2 | 0 | 0.25 | 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 |
47092f96a5b0022e0fac79b527512d8f3952d111 | 3,409 | py | Python | instagram/views.py | derrokip34/Instagram-Clone | 63fdff902382b5e4986667566a901cca748b5731 | [
"MIT"
] | null | null | null | instagram/views.py | derrokip34/Instagram-Clone | 63fdff902382b5e4986667566a901cca748b5731 | [
"MIT"
] | 4 | 2020-06-02T13:03:34.000Z | 2021-06-10T22:59:11.000Z | instagram/views.py | derrokip34/Instagram-Clone | 63fdff902382b5e4986667566a901cca748b5731 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from .models import Image,Profile,Comments
from .forms import UpdateProfile,UpdateUser,PostImageForm,CommentForm
from django.conf.urls import url
# Create your views here.
... | 37.054348 | 137 | 0.694045 | 431 | 3,409 | 5.306265 | 0.174014 | 0.096196 | 0.045912 | 0.045912 | 0.33756 | 0.259292 | 0.187582 | 0.155225 | 0.122868 | 0.080892 | 0 | 0.000358 | 0.180698 | 3,409 | 91 | 138 | 37.461538 | 0.818475 | 0.01672 | 0 | 0.324324 | 0 | 0 | 0.131084 | 0.007166 | 0 | 0 | 0 | 0 | 0 | 1 | 0.081081 | false | 0 | 0.081081 | 0 | 0.283784 | 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 |
4709430dc3111986d3531b884a393ec597c0e3c5 | 10,596 | py | Python | wahltraud/bot/bot.py | wdr-data/wahltraud | 0f972680f6cdbb66028aa8a39fc4a78a3e0ca08a | [
"RSA-MD"
] | 7 | 2017-07-02T12:25:45.000Z | 2019-05-27T10:39:41.000Z | wahltraud/bot/bot.py | wdr-data/wahltraud | 0f972680f6cdbb66028aa8a39fc4a78a3e0ca08a | [
"RSA-MD"
] | null | null | null | wahltraud/bot/bot.py | wdr-data/wahltraud | 0f972680f6cdbb66028aa8a39fc4a78a3e0ca08a | [
"RSA-MD"
] | null | null | null | import logging
from threading import Thread
from time import sleep
import os
import json
import schedule
#from django.utils.timezone import localtime, now
from apiai import ApiAI
from backend.models import Push, FacebookUser, Wiki
from .fb import send_text, send_buttons, button_postback, PAGE_TOKEN
from .handlers.pay... | 40.288973 | 147 | 0.60806 | 1,056 | 10,596 | 5.882576 | 0.283144 | 0.014166 | 0.022215 | 0.009015 | 0.037669 | 0.030908 | 0.030908 | 0.030908 | 0.030908 | 0.030908 | 0 | 0.012546 | 0.285391 | 10,596 | 262 | 148 | 40.442748 | 0.807845 | 0.057097 | 0 | 0.15942 | 0 | 0.004831 | 0.141267 | 0.012934 | 0 | 0 | 0 | 0.003817 | 0 | 1 | 0.024155 | false | 0.009662 | 0.077295 | 0 | 0.115942 | 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 |
470e472fe7ae958fe62d97b5ce9dca8b55363b3a | 4,994 | py | Python | dbix/postgresql.py | alexbodn/python-dbix | 769298cc510a95437d9d7e7641b616b6aec97ced | [
"Apache-2.0"
] | null | null | null | dbix/postgresql.py | alexbodn/python-dbix | 769298cc510a95437d9d7e7641b616b6aec97ced | [
"Apache-2.0"
] | 3 | 2021-03-25T21:40:41.000Z | 2021-11-15T17:46:46.000Z | dbix/postgresql.py | alexbodn/python-dbix | 769298cc510a95437d9d7e7641b616b6aec97ced | [
"Apache-2.0"
] | null | null | null |
from .sqlschema import SQLSchema, SQLResultSet
import psycopg2
import psycopg2.extensions as pe
class POSTGRESQLResultSet(SQLResultSet):
def perform_insert(self, script, param, pk_fields, table, new_key):
script += u' returning %s' % u','. join ([
self.schema.render_name(field) for field in pk_fields
])
... | 25.222222 | 94 | 0.692231 | 686 | 4,994 | 4.902332 | 0.236152 | 0.019625 | 0.016057 | 0.009515 | 0.369908 | 0.311924 | 0.250669 | 0.213797 | 0.119536 | 0.119536 | 0 | 0.002177 | 0.172006 | 4,994 | 197 | 95 | 25.350254 | 0.811125 | 0.010613 | 0 | 0.308176 | 0 | 0.018868 | 0.221266 | 0.0504 | 0 | 0 | 0 | 0 | 0 | 1 | 0.113208 | false | 0.018868 | 0.018868 | 0.025157 | 0.327044 | 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 |
470f91dbbbad1edd443e920c9753325697ced101 | 2,232 | py | Python | datahub/cleanup/cleanup_config.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 6 | 2019-12-02T16:11:24.000Z | 2022-03-18T10:02:02.000Z | datahub/cleanup/cleanup_config.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 1,696 | 2019-10-31T14:08:37.000Z | 2022-03-29T12:35:57.000Z | datahub/cleanup/cleanup_config.py | Staberinde/data-hub-api | 3d0467dbceaf62a47158eea412a3dba827073300 | [
"MIT"
] | 9 | 2019-11-22T12:42:03.000Z | 2021-09-03T14:25:05.000Z | from datetime import datetime
from typing import Any, Mapping, NamedTuple, Sequence, Union
from dateutil.relativedelta import relativedelta
from dateutil.utils import today
from django.db.models import Q
from django.utils.timezone import utc
class DatetimeLessThanCleanupFilter(NamedTuple):
"""Represents a filter... | 36 | 95 | 0.696237 | 291 | 2,232 | 5.243986 | 0.415808 | 0.039318 | 0.031455 | 0.026212 | 0.057667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.230735 | 2,232 | 61 | 96 | 36.590164 | 0.888759 | 0.433692 | 0 | 0 | 0 | 0 | 0.037736 | 0.037736 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0 | 0.2 | 0 | 0.633333 | 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 |
4711f0f7f0f4b6e8dfb47ed59210af2da72647a5 | 39,693 | py | Python | cinder/tests/unit/volume/drivers/test_hgst.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 1 | 2019-02-08T05:24:58.000Z | 2019-02-08T05:24:58.000Z | cinder/tests/unit/volume/drivers/test_hgst.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 1 | 2021-03-21T11:38:29.000Z | 2021-03-21T11:38:29.000Z | cinder/tests/unit/volume/drivers/test_hgst.py | rackerlabs/cinder | 4295ff0a64f781c3546f6c6e0816dbb8100133cb | [
"Apache-2.0"
] | 15 | 2017-01-12T10:35:10.000Z | 2019-04-19T08:22:10.000Z | # Copyright (c) 2015 HGST Inc
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 42.407051 | 78 | 0.586149 | 4,307 | 39,693 | 5.212213 | 0.142094 | 0.016838 | 0.016838 | 0.021649 | 0.648492 | 0.603011 | 0.580471 | 0.52813 | 0.490668 | 0.477126 | 0 | 0.043752 | 0.292319 | 39,693 | 935 | 79 | 42.452406 | 0.755429 | 0.128436 | 0 | 0.550781 | 0 | 0.00651 | 0.293947 | 0.043472 | 0 | 0 | 0 | 0 | 0.082031 | 1 | 0.052083 | false | 0.00651 | 0.010417 | 0 | 0.092448 | 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 |
47145db2bd97cca1e96b5c6c5f106f848f49e927 | 1,526 | py | Python | p287m/find_duplicate.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | 1 | 2020-02-20T12:04:46.000Z | 2020-02-20T12:04:46.000Z | p287m/find_duplicate.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | p287m/find_duplicate.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def findDuplicate(self, nums: List[int]) -> int:
lo, hi = 1, len(nums) - 1
while lo < hi:
mid = (lo + hi) // 2
lt, eq = 0, 0
for n in nums:
if n == mid:
eq += 1
elif lo <... | 25.433333 | 57 | 0.415465 | 209 | 1,526 | 3.033493 | 0.272727 | 0.031546 | 0.033123 | 0.031546 | 0.175079 | 0.029968 | 0 | 0 | 0 | 0 | 0 | 0.085352 | 0.431848 | 1,526 | 59 | 58 | 25.864407 | 0.645905 | 0.074705 | 0 | 0.041667 | 0 | 0 | 0.013504 | 0 | 0 | 0 | 0 | 0 | 0.041667 | 1 | 0.041667 | false | 0 | 0.020833 | 0 | 0.145833 | 0.020833 | 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 |
4715f519d8a21d72474f587c7da538635e521fe0 | 13,733 | py | Python | examples/gaussian_processes/plot_sparse_log_cox_gaussian_process_keras.py | ltiao/scribbles | 9f30ea92ee348154568a7791751634d1feaba774 | [
"MIT"
] | 1 | 2020-03-01T04:36:36.000Z | 2020-03-01T04:36:36.000Z | examples/gaussian_processes/plot_sparse_log_cox_gaussian_process_keras.py | ltiao/scribbles | 9f30ea92ee348154568a7791751634d1feaba774 | [
"MIT"
] | 3 | 2020-01-02T19:09:40.000Z | 2020-01-02T19:11:02.000Z | examples/gaussian_processes/plot_sparse_log_cox_gaussian_process_keras.py | ltiao/scribbles | 9f30ea92ee348154568a7791751634d1feaba774 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Variational Sparse Log Cox Gaussian Process
===========================================
Here we fit the hyperparameters of a Gaussian Process by maximizing the (log)
marginal likelihood. This is commonly referred to as empirical Bayes, or
type-II maximum likelihood estimation.
"""
# sphinx_... | 26.874755 | 82 | 0.675599 | 1,730 | 13,733 | 5.094798 | 0.220809 | 0.046177 | 0.066826 | 0.050147 | 0.355911 | 0.260041 | 0.199229 | 0.135126 | 0.068414 | 0.062968 | 0 | 0.013663 | 0.205927 | 13,733 | 510 | 83 | 26.927451 | 0.79459 | 0.106677 | 0 | 0.173432 | 0 | 0 | 0.066497 | 0.02878 | 0 | 0 | 0 | 0.001961 | 0 | 1 | 0.055351 | false | 0 | 0.04797 | 0.01845 | 0.154982 | 0.00369 | 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 |
471654000ff572cf541ee8cb15531d2329efd52d | 389 | py | Python | 06-sayi-tahmin-oyunu.py | omerkocadayi/WeWantEd--Python-a-Giris- | bedde84d0933d05a3a73b894c90c7d04736c3bba | [
"MIT"
] | 2 | 2017-03-26T13:02:42.000Z | 2017-04-03T00:50:19.000Z | 06-sayi-tahmin-oyunu.py | omerkocadayi/WeWantEd--Python-a-Giris- | bedde84d0933d05a3a73b894c90c7d04736c3bba | [
"MIT"
] | null | null | null | 06-sayi-tahmin-oyunu.py | omerkocadayi/WeWantEd--Python-a-Giris- | bedde84d0933d05a3a73b894c90c7d04736c3bba | [
"MIT"
] | null | null | null | import random
sayi = random.randint(1,100)
print ("Tahmin Oyununa Hos Geldiniz")
sayac=0
while True:
tahmin = int(input("Sayi Girin:"))
sayac += 1
if tahmin == sayi:
print ("\nTebrikler {} denemede bildiniz!" .format(sayac))
break
elif tahmin < sayi:
print ("Daha Buyuk Bir... | 20.473684 | 66 | 0.604113 | 49 | 389 | 4.795918 | 0.612245 | 0.114894 | 0.12766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021352 | 0.277635 | 389 | 18 | 67 | 21.611111 | 0.814947 | 0 | 0 | 0 | 0 | 0 | 0.311054 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.071429 | 0 | 0.071429 | 0.285714 | 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 |