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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8d7bc4a7b1fd2a7e27bed6d48bd0fbe8388449ff | 20,953 | py | Python | imapEmailClient.py | fjh1997/Socket-SMTP-POP3-IMAP | 2f1ddb4d1c08f435fcb59cb302fcff4e063ae2dd | [
"MIT"
] | 1 | 2021-10-31T07:15:39.000Z | 2021-10-31T07:15:39.000Z | imapEmailClient.py | fjh1997/Socket-SMTP-POP3-IMAP | 2f1ddb4d1c08f435fcb59cb302fcff4e063ae2dd | [
"MIT"
] | null | null | null | imapEmailClient.py | fjh1997/Socket-SMTP-POP3-IMAP | 2f1ddb4d1c08f435fcb59cb302fcff4e063ae2dd | [
"MIT"
] | null | null | null | import socket, ssl, base64, sys, time, math
print "Connecting.."
username = ""
password = ""
# Choose a mail server (e.g. Google mail server) and call it mailserver
mailserver = ('imap.163.com', 143)
# Create socket called clientSocket and establish a TCP connection with mailserver
#Fill in start
#sslSocket = ... | 31.795144 | 198 | 0.541211 | 2,625 | 20,953 | 4.157333 | 0.14019 | 0.016861 | 0.007147 | 0.006414 | 0.378081 | 0.334555 | 0.307157 | 0.273894 | 0.252451 | 0.228535 | 0 | 0.018032 | 0.309216 | 20,953 | 658 | 199 | 31.843465 | 0.73594 | 0.129146 | 0 | 0.419162 | 0 | 0 | 0.169798 | 0.033533 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.011976 | 0.001996 | null | null | 0.171657 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d801b2ff97e6c9d6ac2869c82a77e5f833e1468 | 399 | py | Python | djay/blueprints/command/context.py | aleontiev/django-cli | e10d1c5df732925ea37077ccecb36c57b118d9f9 | [
"MIT"
] | 24 | 2017-02-23T00:43:17.000Z | 2021-02-08T06:20:37.000Z | djay/blueprints/command/context.py | aleontiev/django-cli | e10d1c5df732925ea37077ccecb36c57b118d9f9 | [
"MIT"
] | 2 | 2017-02-23T21:22:41.000Z | 2020-04-10T09:20:37.000Z | djay/blueprints/command/context.py | aleontiev/django-cli | e10d1c5df732925ea37077ccecb36c57b118d9f9 | [
"MIT"
] | 3 | 2017-02-23T21:01:39.000Z | 2018-07-07T14:12:03.000Z | import click
import inflection
@click.command()
@click.argument("name")
@click.option("--doc")
def get_context(name, doc):
"""Generate a command with given name.
The command can be run immediately after generation.
For example:
dj generate command bar
dj run manage.py bar
"""
na... | 19.95 | 56 | 0.661654 | 53 | 399 | 4.962264 | 0.584906 | 0.053232 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.225564 | 399 | 19 | 57 | 21 | 0.851133 | 0.393484 | 0 | 0 | 1 | 0 | 0.074419 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.25 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d80629a8f787cda4920a79b145ab5b7a4e47038 | 2,639 | py | Python | tests/reader/test_iso19139.py | cehbrecht/md-ingestion | 895ae4ce36c54662301541f58a1fd3a900e0aeea | [
"Apache-2.0"
] | 4 | 2016-01-04T11:15:07.000Z | 2021-08-12T05:23:51.000Z | tests/reader/test_iso19139.py | cehbrecht/md-ingestion | 895ae4ce36c54662301541f58a1fd3a900e0aeea | [
"Apache-2.0"
] | 19 | 2015-06-04T10:02:53.000Z | 2020-09-21T12:46:00.000Z | tests/reader/test_iso19139.py | cehbrecht/md-ingestion | 895ae4ce36c54662301541f58a1fd3a900e0aeea | [
"Apache-2.0"
] | 7 | 2018-02-07T15:34:10.000Z | 2021-03-25T09:08:22.000Z | import os
import pytest
from mdingestion.reader import ISO19139Reader
from tests.common import TESTDATA_DIR
def test_envidat_iso19139():
point_file = os.path.join(
TESTDATA_DIR, 'envidat-iso19139', 'SET_1', 'xml', 'bbox_2ea750c6-4354-5f0a-9b67-2275d922d06f.xml')
reader = ISO19139Reader()
doc = ... | 47.981818 | 185 | 0.693066 | 352 | 2,639 | 5.09375 | 0.303977 | 0.046849 | 0.040156 | 0.062465 | 0.540435 | 0.540435 | 0.540435 | 0.523703 | 0.498606 | 0.498606 | 0 | 0.232517 | 0.149299 | 2,639 | 54 | 186 | 48.87037 | 0.566147 | 0.43615 | 0 | 0.392857 | 0 | 0 | 0.294881 | 0.088737 | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0.107143 | false | 0 | 0.142857 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d80a991c41f6addc035fc66c43b4e096ed357b0 | 26,584 | py | Python | printerc/printerc.py | lopezpdvn/printer73x | 94fe05399fff0ba277f2a8395c3626c347e2d833 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | 2 | 2015-11-08T06:37:46.000Z | 2016-10-05T20:35:49.000Z | printerc/printerc.py | lopezpdvn/printer73x | 94fe05399fff0ba277f2a8395c3626c347e2d833 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | null | null | null | printerc/printerc.py | lopezpdvn/printer73x | 94fe05399fff0ba277f2a8395c3626c347e2d833 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Author: Pedro I. López
# Contact: dreilopz@gmail.com
'''Numerical controller for the printer73x system.
**printerc** is an interactive command line interface for the numerical control
of the **printer73x** system. printerc drives printerm through mcircuit;
printerc stablishes a... | 31.72315 | 87 | 0.548977 | 3,198 | 26,584 | 4.41526 | 0.165729 | 0.016997 | 0.033994 | 0.030949 | 0.486261 | 0.449646 | 0.42762 | 0.413102 | 0.38796 | 0.353541 | 0 | 0.020216 | 0.311541 | 26,584 | 837 | 88 | 31.761051 | 0.751284 | 0.039648 | 0 | 0.551181 | 0 | 0 | 0.15645 | 0.001277 | 0 | 0 | 0 | 0 | 0.01378 | 0 | null | null | 0.009843 | 0.035433 | null | null | 0.116142 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d881c5e0356ef5daba67f9a60376e64301551ab | 8,429 | py | Python | basic_qlestimator.py | marwenbelkaid/basic-ql-model-fitting | 11e64829ebd3f49601a49ebc80a68bd0f82a5295 | [
"BSD-2-Clause"
] | null | null | null | basic_qlestimator.py | marwenbelkaid/basic-ql-model-fitting | 11e64829ebd3f49601a49ebc80a68bd0f82a5295 | [
"BSD-2-Clause"
] | null | null | null | basic_qlestimator.py | marwenbelkaid/basic-ql-model-fitting | 11e64829ebd3f49601a49ebc80a68bd0f82a5295 | [
"BSD-2-Clause"
] | null | null | null | from sklearn.base import BaseEstimator
import inspect
import numpy as np
import random
import math
''' Define softmax function '''
def softmax(opts, tau):
norm = 0
ret = []
for i in range(0,len(opts)):
ret.append(math.exp(opts[i]/tau))
norm += ret[i]
for i in range(0,len(opts)):
ret[i] /= norm
return re... | 26.095975 | 161 | 0.648476 | 1,302 | 8,429 | 4.039939 | 0.22427 | 0.005703 | 0.018631 | 0.012548 | 0.251141 | 0.221673 | 0.171483 | 0.147909 | 0.125856 | 0.085932 | 0 | 0.029936 | 0.227192 | 8,429 | 322 | 162 | 26.177019 | 0.777556 | 0.08364 | 0 | 0.160494 | 0 | 0.024691 | 0.091835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.030864 | null | null | 0.018519 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d8b43af1970cf0385e2f9cee6220f41ae019f74 | 180 | py | Python | PYTHON/pythonDesafios/desafio048.py | Santos1000/Curso-Python | 549223a1633f6f619c87554dd8078cf7841bb1df | [
"MIT"
] | null | null | null | PYTHON/pythonDesafios/desafio048.py | Santos1000/Curso-Python | 549223a1633f6f619c87554dd8078cf7841bb1df | [
"MIT"
] | null | null | null | PYTHON/pythonDesafios/desafio048.py | Santos1000/Curso-Python | 549223a1633f6f619c87554dd8078cf7841bb1df | [
"MIT"
] | null | null | null | cont = 0
soma = 0
for c in range(1, 501, 2):
if c % 3 ==0:
soma = soma + c
cont = cont + 1
print(f'A soma de todos os dos {cont} numeros impares sera:{soma} ')
| 22.5 | 68 | 0.544444 | 34 | 180 | 2.882353 | 0.647059 | 0.102041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081967 | 0.322222 | 180 | 7 | 69 | 25.714286 | 0.721311 | 0 | 0 | 0 | 0 | 0 | 0.322222 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d8b8c7d95306321e6b28d796a5dba0fd08bb193 | 2,416 | py | Python | TestMovimientos/unitary_derivative.py | JDanielGar/ConvolutionMovements | eca831af8570023650d158bf8171909577dc4ec5 | [
"Apache-2.0"
] | null | null | null | TestMovimientos/unitary_derivative.py | JDanielGar/ConvolutionMovements | eca831af8570023650d158bf8171909577dc4ec5 | [
"Apache-2.0"
] | null | null | null | TestMovimientos/unitary_derivative.py | JDanielGar/ConvolutionMovements | eca831af8570023650d158bf8171909577dc4ec5 | [
"Apache-2.0"
] | null | null | null | # 05 de Junio del 2018
# 31 Mayo 2018
import numpy as np
import matplotlib.pyplot as plt
from time import sleep
import cv2
class Recurrent_Photo:
'''
Recurrent Photo only for testing
'''
def __init__(self, iterations=100, resize=(1280, 720)):
self.camera = cv2.VideoCapture(0)
self.vi... | 27.146067 | 91 | 0.582368 | 303 | 2,416 | 4.564356 | 0.389439 | 0.045553 | 0.021692 | 0.030369 | 0.039046 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04881 | 0.304636 | 2,416 | 88 | 92 | 27.454545 | 0.774405 | 0.167219 | 0 | 0.153846 | 0 | 0 | 0.018838 | 0 | 0 | 0 | 0 | 0.011364 | 0 | 1 | 0.096154 | false | 0 | 0.076923 | 0 | 0.25 | 0.019231 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d99cf1edfa87cbbb85a533eb36d465a0bd5176d | 2,234 | py | Python | src/generators/adasyn.py | Arzik1987/prelim | 03d96558575cccff4ac85a3e8fb04944e34d1076 | [
"MIT"
] | 2 | 2021-10-16T06:25:30.000Z | 2021-10-21T13:11:00.000Z | src/generators/adasyn.py | Arzik1987/prelim | 03d96558575cccff4ac85a3e8fb04944e34d1076 | [
"MIT"
] | null | null | null | src/generators/adasyn.py | Arzik1987/prelim | 03d96558575cccff4ac85a3e8fb04944e34d1076 | [
"MIT"
] | null | null | null | import numpy as np
from imblearn.over_sampling import ADASYN
import warnings
from src.generators.rand import Gen_randu
class Gen_adasyn:
def __init__(self):
self.X_ = None
self.mname_ = "adasyn"
def fit(self, X, y=None, metamodel=None):
self.X_ = X.copy()
return self
def... | 33.343284 | 121 | 0.550134 | 284 | 2,234 | 4.137324 | 0.34507 | 0.074894 | 0.042553 | 0.046809 | 0.211064 | 0.16 | 0.122553 | 0.122553 | 0.122553 | 0 | 0 | 0.021486 | 0.270815 | 2,234 | 66 | 122 | 33.848485 | 0.699816 | 0.2641 | 0 | 0.111111 | 0 | 0 | 0.067692 | 0 | 0 | 0 | 0 | 0.015152 | 0 | 1 | 0.111111 | false | 0 | 0.138889 | 0.027778 | 0.361111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d9a402d26ef303023501236b0c678ba22e0f7f9 | 3,776 | py | Python | result_generator/result_feature_db/index_sift_color.py | shijack/feature_extract | 2c45750ea42a30a1f0b5cbe305edc4c8ab0461d7 | [
"MIT"
] | 1 | 2019-12-12T14:24:47.000Z | 2019-12-12T14:24:47.000Z | result_generator/result_feature_db/index_sift_color.py | shijack/feature_extract | 2c45750ea42a30a1f0b5cbe305edc4c8ab0461d7 | [
"MIT"
] | null | null | null | result_generator/result_feature_db/index_sift_color.py | shijack/feature_extract | 2c45750ea42a30a1f0b5cbe305edc4c8ab0461d7 | [
"MIT"
] | null | null | null | # coding=utf-8
import os
import shutil
import time
def get_dirs_child(path):
return [os.path.join(path, f) for f in os.listdir(path)]
def get_all_files_suffix(path, file_suffix='.jpg'):
all_file = []
for dirpath, dirnames, filenames in os.walk(path):
for name in filenames:
if name.en... | 41.043478 | 257 | 0.620498 | 483 | 3,776 | 4.606625 | 0.285714 | 0.03236 | 0.080899 | 0.091685 | 0.33618 | 0.320899 | 0.280449 | 0.245393 | 0.183371 | 0.138876 | 0 | 0.025931 | 0.20339 | 3,776 | 91 | 258 | 41.494505 | 0.713763 | 0.003178 | 0 | 0.092308 | 0 | 0.046154 | 0.33889 | 0.238863 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.046154 | null | null | 0.184615 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d9bebc9ef2d4467536ee85dc9bdd7b9d1c09b4d | 3,137 | py | Python | vagga2lithos/lithos.py | tailhook/vagga2lithos | fc174479b953b382e097dd51643ac2b4c2d56dee | [
"Apache-2.0",
"MIT"
] | 5 | 2016-11-18T03:19:02.000Z | 2019-04-16T19:52:50.000Z | vagga2lithos/lithos.py | tailhook/vagga2lithos | fc174479b953b382e097dd51643ac2b4c2d56dee | [
"Apache-2.0",
"MIT"
] | 1 | 2018-03-15T18:23:50.000Z | 2018-03-15T18:23:50.000Z | vagga2lithos/lithos.py | tailhook/vagga2lithos | fc174479b953b382e097dd51643ac2b4c2d56dee | [
"Apache-2.0",
"MIT"
] | null | null | null | import yaml
try:
from yaml import CSafeDumper as BaseDumper
from yaml import CSafeLoader as BaseLoader
except ImportError:
from yaml import SafeDumper as BaseDumper
from yaml import SafeLoader as BaseLoader
class Dumper(BaseDumper):
def statedir_repr(self, value):
return self.represent_m... | 31.059406 | 76 | 0.656041 | 405 | 3,137 | 4.903704 | 0.249383 | 0.020141 | 0.039275 | 0.057402 | 0.251762 | 0.199396 | 0.098691 | 0.079053 | 0.056395 | 0.056395 | 0 | 0.006465 | 0.21103 | 3,137 | 100 | 77 | 31.37 | 0.79596 | 0.003188 | 0 | 0.053333 | 0 | 0 | 0.09056 | 0.02688 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0.066667 | 0.08 | 0.093333 | 0.453333 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
8d9f0b25b8fa1fed0cccc3d1f31b2814b7ab4bb2 | 3,067 | py | Python | src/winograd_collection_manipulation/wsc_json_handler.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 6 | 2020-04-17T17:37:24.000Z | 2021-12-04T03:03:46.000Z | src/winograd_collection_manipulation/wsc_json_handler.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 62 | 2019-05-21T21:06:42.000Z | 2020-01-26T17:33:45.000Z | src/winograd_collection_manipulation/wsc_json_handler.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 1 | 2019-07-22T10:19:38.000Z | 2019-07-22T10:19:38.000Z | import json
import pandas as pd
from src.helpers.consts import WINOGRAD_SCHEMAS_FILE, WINOGRAD_SCHEMAS_ORIGINAL_FILE
def generate_df_from_original_json():
with open(WINOGRAD_SCHEMAS_ORIGINAL_FILE, 'r', encoding='utf-8') as fp:
wsc_json = json.load(fp)
rows = []
for i in range(0, len(wsc_json), ... | 43.814286 | 108 | 0.648843 | 360 | 3,067 | 5.211111 | 0.2 | 0.070896 | 0.063966 | 0.051173 | 0.45629 | 0.370469 | 0.233475 | 0.233475 | 0.171642 | 0.11194 | 0 | 0.005556 | 0.237039 | 3,067 | 69 | 109 | 44.449275 | 0.796154 | 0.006195 | 0 | 0.153846 | 1 | 0 | 0.248604 | 0.063054 | 0 | 0 | 0 | 0 | 0 | 1 | 0.057692 | false | 0 | 0.057692 | 0 | 0.153846 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8d9f8a869a2fb4336f1d943df0d65fb7d5113beb | 1,614 | py | Python | globmatinterpret.py | DonHaul/MultiCamCalAruco | 2ca3774f3e3d030baf5c0891865adce084f3400d | [
"MIT"
] | 1 | 2019-10-14T08:38:53.000Z | 2019-10-14T08:38:53.000Z | globmatinterpret.py | DonHaul/MultiCamCalAruco | 2ca3774f3e3d030baf5c0891865adce084f3400d | [
"MIT"
] | null | null | null | globmatinterpret.py | DonHaul/MultiCamCalAruco | 2ca3774f3e3d030baf5c0891865adce084f3400d | [
"MIT"
] | null | null | null |
import sys, os
sys.path.append('./libs')
import numpy as np
import scipy.io
from libs import *
import matlab.engine
import numpy as np
import scipy.io
def CalculateGlobICP():
eng = matlab.engine.start_matlab()
#create a list of numpy arrays
#50
eng.globalProcrustesWrapper(modelpc... | 22.732394 | 91 | 0.593556 | 217 | 1,614 | 4.410138 | 0.373272 | 0.033438 | 0.065831 | 0.068966 | 0.204807 | 0.192268 | 0.192268 | 0.133751 | 0.092999 | 0 | 0 | 0.017722 | 0.265799 | 1,614 | 71 | 92 | 22.732394 | 0.789873 | 0.164188 | 0 | 0.266667 | 0 | 0 | 0.066368 | 0.043997 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.233333 | null | null | 0.133333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8da2c64376e7c679d31c6fcd2603b0719aa5e683 | 238 | py | Python | extract.py | hiddeottens/shopify-scraper | 479d6ee3687448413ededb5f6205675614961ebc | [
"Apache-2.0"
] | null | null | null | extract.py | hiddeottens/shopify-scraper | 479d6ee3687448413ededb5f6205675614961ebc | [
"Apache-2.0"
] | null | null | null | extract.py | hiddeottens/shopify-scraper | 479d6ee3687448413ededb5f6205675614961ebc | [
"Apache-2.0"
] | null | null | null | path = './stores.csv'
import pandas as pd
from shopify import extract_products_json
result = ''
with open(path) as csvfile:
df = pd.read_csv(csvfile)
url = df['url']
products = extract_products_json(url)
print(products) | 19.833333 | 41 | 0.697479 | 34 | 238 | 4.735294 | 0.588235 | 0.186335 | 0.236025 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.193277 | 238 | 12 | 42 | 19.833333 | 0.838542 | 0 | 0 | 0 | 0 | 0 | 0.062762 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.222222 | 0 | 0.222222 | 0.111111 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
8da5a3f060ba4a587471d58841c807d41dd1a0c1 | 2,953 | py | Python | skbio/stats/distance/_anosim.py | JWDebelius/scikit-bio | 9df3edb46eb728f6efbd4f2db74529200ad40a77 | [
"BSD-3-Clause"
] | null | null | null | skbio/stats/distance/_anosim.py | JWDebelius/scikit-bio | 9df3edb46eb728f6efbd4f2db74529200ad40a77 | [
"BSD-3-Clause"
] | null | null | null | skbio/stats/distance/_anosim.py | JWDebelius/scikit-bio | 9df3edb46eb728f6efbd4f2db74529200ad40a77 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------... | 38.855263 | 79 | 0.651202 | 380 | 2,953 | 4.905263 | 0.492105 | 0.029506 | 0.032189 | 0.030043 | 0.022532 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012937 | 0.214697 | 2,953 | 75 | 80 | 39.373333 | 0.790858 | 0.571283 | 0 | 0 | 0 | 0 | 0.041061 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.190476 | 0 | 0.619048 | 0.047619 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
a5c2beedf402712d914b3a8ec5788420562a761b | 302 | py | Python | Network Simulations/Assignment 1/dataGenerator.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | Network Simulations/Assignment 1/dataGenerator.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | null | null | null | Network Simulations/Assignment 1/dataGenerator.py | neeladripal/bcse-lab | 915d2f535ae95a062438fc85980419646a3951ad | [
"MIT"
] | 1 | 2021-08-06T14:39:53.000Z | 2021-08-06T14:39:53.000Z | import random
# generate a random binary string
def generateMessage (size):
message = ''
for count in range(size):
message += str(random.randint(0,1))
return message
n = 32 * 10000 # size of data
file = open("testdata.txt", "w")
file.write(generateMessage(n))
file.close() | 20.133333 | 43 | 0.652318 | 41 | 302 | 4.804878 | 0.756098 | 0.111675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038298 | 0.221854 | 302 | 15 | 44 | 20.133333 | 0.8 | 0.145695 | 0 | 0 | 1 | 0 | 0.050781 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.1 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
a5c8710fb81693cdd15517cb2db0504cb50ff6bb | 1,336 | py | Python | films/migrations/0001_initial.py | LucaAlexandru/MediaTracker | 61b7613b0c7187ef4614acd9fb840f92819398aa | [
"MIT"
] | null | null | null | films/migrations/0001_initial.py | LucaAlexandru/MediaTracker | 61b7613b0c7187ef4614acd9fb840f92819398aa | [
"MIT"
] | null | null | null | films/migrations/0001_initial.py | LucaAlexandru/MediaTracker | 61b7613b0c7187ef4614acd9fb840f92819398aa | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-10-11 10:34
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 44.533333 | 240 | 0.587575 | 156 | 1,336 | 4.891026 | 0.461538 | 0.078637 | 0.036697 | 0.057667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.043977 | 0.217066 | 1,336 | 29 | 241 | 46.068966 | 0.685468 | 0.033683 | 0 | 0 | 1 | 0 | 0.148953 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.136364 | 0 | 0.318182 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
a5c91b030e449071c120c072196ee6b5aa2c8994 | 11,937 | py | Python | oculy/plotting/plots/axes.py | MatthieuDartiailh/oculy | 0cdae49aa1b546f26b31d14e944c7d481d368361 | [
"BSD-3-Clause"
] | null | null | null | oculy/plotting/plots/axes.py | MatthieuDartiailh/oculy | 0cdae49aa1b546f26b31d14e944c7d481d368361 | [
"BSD-3-Clause"
] | null | null | null | oculy/plotting/plots/axes.py | MatthieuDartiailh/oculy | 0cdae49aa1b546f26b31d14e944c7d481d368361 | [
"BSD-3-Clause"
] | 1 | 2022-03-21T12:14:19.000Z | 2022-03-21T12:14:19.000Z | # --------------------------------------------------------------------------------------
# Copyright 2020-2021 by Oculy Authors, see git history for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# --------------------------... | 26.585746 | 88 | 0.602078 | 1,471 | 11,937 | 4.755948 | 0.186268 | 0.050314 | 0.100629 | 0.110778 | 0.432962 | 0.365923 | 0.343196 | 0.292596 | 0.24514 | 0.24514 | 0 | 0.001666 | 0.295971 | 11,937 | 448 | 89 | 26.645089 | 0.830795 | 0.226941 | 0 | 0.484615 | 0 | 0.003846 | 0.070971 | 0 | 0 | 0 | 0 | 0.002232 | 0 | 1 | 0.165385 | false | 0.130769 | 0.026923 | 0 | 0.361538 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
a5d664a307d4274cfb097124871eb84d47fa124b | 748 | py | Python | swc-api/config.py | aehaynes/btcpokerstats | 1f545751e133dbab974b0acea61efa8502677dcb | [
"NCSA"
] | null | null | null | swc-api/config.py | aehaynes/btcpokerstats | 1f545751e133dbab974b0acea61efa8502677dcb | [
"NCSA"
] | null | null | null | swc-api/config.py | aehaynes/btcpokerstats | 1f545751e133dbab974b0acea61efa8502677dcb | [
"NCSA"
] | null | null | null | SWC_USERNAME = ['Irresonsibl','Irrsponsible', 'Irresponsibl']
SWC_PASSWORD = 'sealssuite'
SLEEP_MILLISECONDS = 750
GET_SESSION_URL = 'https://sealswithclubs.eu/sealsloginhandler.php?login=X&JSON=1&Version=v0.2.18'
USER_AGENT_STR = 'python-requests/1.1.0 CPython/2.7.3 Windows/7'
SERVICE_URL = 'sealswithclubs.eu'#'https:... | 39.368421 | 98 | 0.766043 | 104 | 748 | 5.288462 | 0.682692 | 0.145455 | 0.114545 | 0.087273 | 0.061818 | 0 | 0 | 0 | 0 | 0 | 0 | 0.030657 | 0.084225 | 748 | 18 | 99 | 41.555556 | 0.772263 | 0.057487 | 0 | 0 | 0 | 0.0625 | 0.503556 | 0.092461 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.0625 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
a5d7874b1b4f116bb492b089323c820feda45e50 | 1,274 | py | Python | merkle.py | makiolo/root_merkle_tree | b1f8baa1930ed534759203eb2a151724dd11cc7f | [
"MIT"
] | 2 | 2021-11-18T10:29:21.000Z | 2022-01-05T19:46:07.000Z | merkle.py | makiolo/root_merkle_tree | b1f8baa1930ed534759203eb2a151724dd11cc7f | [
"MIT"
] | null | null | null | merkle.py | makiolo/root_merkle_tree | b1f8baa1930ed534759203eb2a151724dd11cc7f | [
"MIT"
] | null | null | null | '''
Generate root merkle tree hash in python.
I use https://github.com/bitcoin/bitcoin as reference:
BlockBuildMerkleTree --> Satoshi implmentation
BlockMerkleRoot ---> new bitcoin core implementation
'''
import pandas as pd
from hashlib import sha256
from io import StringIO
# h( h(1) + h(2) )
# 0df4085b3a6... | 24.5 | 86 | 0.704082 | 169 | 1,274 | 5.159763 | 0.455621 | 0.011468 | 0.006881 | 0.009174 | 0.022936 | 0 | 0 | 0 | 0 | 0 | 0 | 0.151458 | 0.16562 | 1,274 | 51 | 87 | 24.980392 | 0.668862 | 0.39325 | 0 | 0 | 1 | 0 | 0.260238 | 0.229855 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0.041667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
a5dddff2120389c9fd0dcb2dd321286873fb5b67 | 8,603 | py | Python | proxmoxmanager/utils/classes/containers.py | igorlitvak/proxmoxmanager | 3cd31a394350dd555236fa363b37fcb9e86fa20c | [
"MIT"
] | null | null | null | proxmoxmanager/utils/classes/containers.py | igorlitvak/proxmoxmanager | 3cd31a394350dd555236fa363b37fcb9e86fa20c | [
"MIT"
] | null | null | null | proxmoxmanager/utils/classes/containers.py | igorlitvak/proxmoxmanager | 3cd31a394350dd555236fa363b37fcb9e86fa20c | [
"MIT"
] | null | null | null | from ..api import APIWrapper
from .nodes import ProxmoxNode, ProxmoxNodeDict
from .users import ProxmoxUser
from typing import Dict, List, Tuple, Any, Union
class ProxmoxContainer:
def __init__(self, api: APIWrapper, vmid: str, node: str):
self._api = api
self._vmid = vmid
self._node = nod... | 34.550201 | 120 | 0.594444 | 1,023 | 8,603 | 4.828935 | 0.168133 | 0.031174 | 0.026316 | 0.032389 | 0.409717 | 0.368219 | 0.324696 | 0.283401 | 0.283401 | 0.247368 | 0 | 0.009658 | 0.289899 | 8,603 | 248 | 121 | 34.689516 | 0.798985 | 0.217715 | 0 | 0.269841 | 0 | 0 | 0.072965 | 0.013071 | 0 | 0 | 0 | 0 | 0 | 1 | 0.253968 | false | 0 | 0.031746 | 0.02381 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
a5e31714682ceaf402d2be4e93d5d7bd4455a278 | 484 | py | Python | analyze.py | DMinghao/FreelancerJobAnalysis | 6900bb29746bc77d98a4e12966c1a075f059f08a | [
"MIT"
] | 2 | 2020-08-30T02:55:20.000Z | 2020-08-30T02:59:15.000Z | analyze.py | DMinghao/FreelancerJobAnalysis | 6900bb29746bc77d98a4e12966c1a075f059f08a | [
"MIT"
] | null | null | null | analyze.py | DMinghao/FreelancerJobAnalysis | 6900bb29746bc77d98a4e12966c1a075f059f08a | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import nltk
nltk.download('punkt')
import os
import nltk.corpus
from nltk.probability import FreqDist
from nltk.tokenize import word_tokenize
# read result
result = pd.read_csv("result.csv")
Tags = result["Tag"]
print(Tags)
allTag = ""
for row in result.index:
allTag = a... | 17.925926 | 46 | 0.733471 | 71 | 484 | 4.943662 | 0.507042 | 0.05698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019656 | 0.159091 | 484 | 27 | 47 | 17.925926 | 0.842752 | 0.07438 | 0 | 0 | 0 | 0 | 0.049438 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.388889 | 0 | 0.388889 | 0.111111 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
a5f18aef623e413f915c578c82df10f4912ef4a4 | 1,951 | py | Python | revivesocialmedia/revivesocialmedia.py | MSAdministrator/revive-social-media | 1152c79695000101a00f05a1cf38758367a3a1bf | [
"MIT"
] | null | null | null | revivesocialmedia/revivesocialmedia.py | MSAdministrator/revive-social-media | 1152c79695000101a00f05a1cf38758367a3a1bf | [
"MIT"
] | null | null | null | revivesocialmedia/revivesocialmedia.py | MSAdministrator/revive-social-media | 1152c79695000101a00f05a1cf38758367a3a1bf | [
"MIT"
] | null | null | null | from .opensourceprojects import OpenSourceProjects
from .blogposts import BlogPosts
from .posttweet import PostTweet
from .postlinkedin import PostLinkedIn
class ReviveSocialMedia:
_OSS_MESSAGE = 'OSS Project: {name} is {description}. Check it out! {url} #reviveposts'
_BLOG_MESSAGE = 'Blog Post: {name}. Chec... | 33.637931 | 139 | 0.542286 | 182 | 1,951 | 5.675824 | 0.247253 | 0.151016 | 0.061955 | 0.089061 | 0.304937 | 0.185866 | 0.185866 | 0.185866 | 0.106486 | 0.106486 | 0 | 0 | 0.344951 | 1,951 | 57 | 140 | 34.22807 | 0.808294 | 0.010764 | 0 | 0.36 | 0 | 0 | 0.175311 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04 | false | 0.08 | 0.08 | 0 | 0.18 | 0.08 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
a5f23c0164b3c9eb1c469cce6cb7e5ebe4453cf6 | 7,951 | py | Python | test_tools/simgen_ta.py | mpastyl/Arctium | 36867069a8dcec0a63e5c5c748022144fe5502b9 | [
"BSD-3-Clause"
] | null | null | null | test_tools/simgen_ta.py | mpastyl/Arctium | 36867069a8dcec0a63e5c5c748022144fe5502b9 | [
"BSD-3-Clause"
] | null | null | null | test_tools/simgen_ta.py | mpastyl/Arctium | 36867069a8dcec0a63e5c5c748022144fe5502b9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
import sys
import argparse
import traceback
ap = argparse.ArgumentParser(description='Simulation generator')
ap.add_argument('--basepath', required=False, default="../..",
help='Base path')
ap.add_argument('-c', '--config', required=False, default="params.py",
... | 30.463602 | 413 | 0.589737 | 1,127 | 7,951 | 3.933452 | 0.244898 | 0.028423 | 0.020302 | 0.016242 | 0.146176 | 0.102865 | 0.062035 | 0.062035 | 0.041732 | 0.032032 | 0 | 0.011473 | 0.254559 | 7,951 | 260 | 414 | 30.580769 | 0.73646 | 0.023393 | 0 | 0.085308 | 0 | 0.004739 | 0.217812 | 0.084676 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.052133 | null | null | 0.028436 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
a5fa821aacc8d142c34f13b13cc2bc50447defb4 | 1,205 | py | Python | examples/poisson/simulation.py | AbhilashReddyM/flowX | 57efa4c076d40d559ffc82ce541d340cf2519a3d | [
"BSD-3-Clause"
] | null | null | null | examples/poisson/simulation.py | AbhilashReddyM/flowX | 57efa4c076d40d559ffc82ce541d340cf2519a3d | [
"BSD-3-Clause"
] | 2 | 2020-04-14T20:00:37.000Z | 2020-04-17T21:26:23.000Z | examples/poisson/simulation.py | AbhilashReddyM/flowX | 57efa4c076d40d559ffc82ce541d340cf2519a3d | [
"BSD-3-Clause"
] | 3 | 2020-04-18T22:30:55.000Z | 2021-06-08T15:23:21.000Z | """User defined module for simulation."""
import numpy
def get_analytical(grid, asol, user_bc):
"""Compute and set the analytical solution.
Arguments
---------
grid : flowx.Grid object
Grid containing data.
asol : string
Name of the variable on the grid.
"""
X, Y = numpy... | 25.104167 | 76 | 0.565145 | 170 | 1,205 | 3.958824 | 0.282353 | 0.089153 | 0.095097 | 0.08321 | 0.736999 | 0.736999 | 0.644874 | 0.644874 | 0.508172 | 0.508172 | 0 | 0.01397 | 0.287137 | 1,205 | 47 | 77 | 25.638298 | 0.769499 | 0.317842 | 0 | 0.470588 | 0 | 0 | 0.024129 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.117647 | false | 0 | 0.058824 | 0 | 0.176471 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
a5fea9c0d2923f2952b96a6f67d5a37db827a430 | 791 | py | Python | Tree/identicalTree.py | jainanisha90/codepath_interviewBit | 3d7448fee80ee7bbc1f667db7e57ee698948a845 | [
"MIT"
] | null | null | null | Tree/identicalTree.py | jainanisha90/codepath_interviewBit | 3d7448fee80ee7bbc1f667db7e57ee698948a845 | [
"MIT"
] | null | null | null | Tree/identicalTree.py | jainanisha90/codepath_interviewBit | 3d7448fee80ee7bbc1f667db7e57ee698948a845 | [
"MIT"
] | null | null | null | # Definition for a binary tree node
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
# @param A : root node of tree
# @param B : root node of tree
# @return an integer
def isSameTree(self, A, B):
if A is None and... | 31.64 | 104 | 0.595449 | 118 | 791 | 3.889831 | 0.338983 | 0.019608 | 0.043573 | 0.061002 | 0.139434 | 0.139434 | 0.139434 | 0 | 0 | 0 | 0 | 0.030686 | 0.299621 | 791 | 24 | 105 | 32.958333 | 0.797834 | 0.151707 | 0 | 0 | 0 | 0 | 0.01203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57021ae58b8775623afaba96e2a8a8eaf4a702f0 | 1,608 | py | Python | src/trace_set/transform.py | ccberg/LA | df3929c9ab4b7cbfa38749363c5ccced010f3002 | [
"MIT"
] | 1 | 2021-12-28T03:27:42.000Z | 2021-12-28T03:27:42.000Z | src/trace_set/transform.py | ccberg/LA | df3929c9ab4b7cbfa38749363c5ccced010f3002 | [
"MIT"
] | null | null | null | src/trace_set/transform.py | ccberg/LA | df3929c9ab4b7cbfa38749363c5ccced010f3002 | [
"MIT"
] | null | null | null | import numpy as np
from src.dlla.hw import prepare_traces_dl
from tensorflow.python.keras.utils.np_utils import to_categorical
# TODO replace with mlp_hw notebook variants
from src.tools.dl import encode
from src.tools.la import balance
from src.trace_set.database import Database
from src.trace_set.pollution import P... | 32.16 | 105 | 0.720771 | 248 | 1,608 | 4.451613 | 0.350806 | 0.036232 | 0.059783 | 0.040761 | 0.333333 | 0.333333 | 0.333333 | 0.242754 | 0.242754 | 0.242754 | 0 | 0.023396 | 0.175995 | 1,608 | 50 | 106 | 32.16 | 0.809811 | 0.146144 | 0 | 0.275862 | 0 | 0 | 0.005957 | 0 | 0 | 0 | 0 | 0.02 | 0 | 1 | 0.068966 | false | 0 | 0.275862 | 0 | 0.413793 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57059917c157f394be329465522e5e0f4b52e69d | 5,758 | py | Python | diplomacy_research/models/datasets/feedable_dataset.py | wwongkamjan/dipnet_press | 787263c1b9484698904f525c8d78d0e333e1c0d9 | [
"MIT"
] | 39 | 2019-09-06T13:42:24.000Z | 2022-03-18T18:38:43.000Z | diplomacy_research/models/datasets/feedable_dataset.py | wwongkamjan/dipnet_press | 787263c1b9484698904f525c8d78d0e333e1c0d9 | [
"MIT"
] | 9 | 2019-09-19T22:35:32.000Z | 2022-02-24T18:04:57.000Z | diplomacy_research/models/datasets/feedable_dataset.py | wwongkamjan/dipnet_press | 787263c1b9484698904f525c8d78d0e333e1c0d9 | [
"MIT"
] | 8 | 2019-10-16T21:09:14.000Z | 2022-02-23T05:20:37.000Z | # ==============================================================================
# Copyright 2019 - Philip Paquette
#
# NOTICE: Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without rest... | 41.42446 | 120 | 0.653699 | 664 | 5,758 | 5.540663 | 0.350904 | 0.024463 | 0.017396 | 0.020658 | 0.14243 | 0.105463 | 0.082631 | 0.082631 | 0.082631 | 0.058712 | 0 | 0.000924 | 0.24835 | 5,758 | 138 | 121 | 41.724638 | 0.849122 | 0.462834 | 0 | 0.203125 | 0 | 0 | 0.012182 | 0 | 0 | 0 | 0 | 0 | 0.015625 | 1 | 0.21875 | false | 0 | 0.078125 | 0 | 0.390625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57076d7ba64a1147ac9fb04e63680984f0c3687e | 978 | py | Python | old_code/datawrangle.py | Napam/Stockybocky | e42791687c08a6b138569aacec11fb77b2ee1988 | [
"Apache-2.0"
] | 2 | 2020-01-27T08:17:54.000Z | 2020-01-27T08:56:25.000Z | old_code/datawrangle.py | Laohachot/Stockybocky | b5c9937b5eb102f530157d0278ad4897f23a2744 | [
"Apache-2.0"
] | 3 | 2020-08-05T15:04:30.000Z | 2021-03-31T20:05:07.000Z | old_code/datawrangle.py | Napam/Stockybocky | e42791687c08a6b138569aacec11fb77b2ee1988 | [
"Apache-2.0"
] | null | null | null | '''Combines oslo bors and yahoo data'''
import numpy as np
import pandas as pd
from pprint import pprint
import scrapeconfig as cng
def merge_bors_and_yahoo_dfs(bors_name: str, yahoo_name: str, result_filename: str):
'''
Get filenames for csv files from Oslo Bors and Yahoo Finance and merges them
... | 34.928571 | 95 | 0.718814 | 156 | 978 | 4.217949 | 0.429487 | 0.042553 | 0.072948 | 0.048632 | 0.06079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.210634 | 978 | 27 | 96 | 36.222222 | 0.852332 | 0.299591 | 0 | 0 | 0 | 0 | 0.012698 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0.307692 | 0 | 0.384615 | 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 | 1 | 0 | 0 | 0 | 0 | 1 |
570a5d39001e1c71f3deeab2b80a5796ea11c59e | 472 | py | Python | cpdb/analytics/migrations/0004_alter_searchtracking_query_type.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 25 | 2018-07-20T22:31:40.000Z | 2021-07-15T16:58:41.000Z | cpdb/analytics/migrations/0004_alter_searchtracking_query_type.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 13 | 2018-06-18T23:08:47.000Z | 2022-02-10T07:38:25.000Z | cpdb/analytics/migrations/0004_alter_searchtracking_query_type.py | invinst/CPDBv2_backend | b4e96d620ff7a437500f525f7e911651e4a18ef9 | [
"Apache-2.0"
] | 6 | 2018-05-17T21:59:43.000Z | 2020-11-17T00:30:26.000Z | # Generated by Django 2.1.3 on 2018-11-23 08:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('analytics', '0003_searchtracking'),
]
operations = [
migrations.AlterField(
model_name='searchtracking',
name='query... | 24.842105 | 126 | 0.618644 | 50 | 472 | 5.72 | 0.78 | 0.055944 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.059155 | 0.247881 | 472 | 18 | 127 | 26.222222 | 0.746479 | 0.095339 | 0 | 0 | 1 | 0 | 0.230588 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.083333 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
570a8f90ef87021332a3b5f44b69e2ed2da50d82 | 921 | py | Python | LaureatsBackEnd-master/laureats/migrations/0008_etudiant.py | SanaaCHAOU/laureat_management_ENSAT | d769714f9f8cb9ebf90e02577547ec348c011461 | [
"MIT"
] | null | null | null | LaureatsBackEnd-master/laureats/migrations/0008_etudiant.py | SanaaCHAOU/laureat_management_ENSAT | d769714f9f8cb9ebf90e02577547ec348c011461 | [
"MIT"
] | null | null | null | LaureatsBackEnd-master/laureats/migrations/0008_etudiant.py | SanaaCHAOU/laureat_management_ENSAT | d769714f9f8cb9ebf90e02577547ec348c011461 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-01-10 20:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('laureats', '0007_laureat_filiere'),
]
operations = [
migrations.CreateModel(
name='Etudiant',
... | 32.892857 | 194 | 0.59392 | 91 | 921 | 5.857143 | 0.659341 | 0.045028 | 0.052533 | 0.082552 | 0.116323 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037202 | 0.270358 | 921 | 27 | 195 | 34.111111 | 0.755952 | 0.04886 | 0 | 0 | 1 | 0 | 0.172769 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.095238 | 0 | 0.238095 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57110b1d439e7ceb669f0478be9492dc5c99d5bf | 2,809 | py | Python | S2.Surface_Normal/lib/helper.py | leoshine/Spherical_Regression | d19bc2f6f52982d4d58f5ddabe4231381d7facd7 | [
"BSD-2-Clause-FreeBSD"
] | 133 | 2019-04-12T20:52:08.000Z | 2021-12-09T06:34:39.000Z | S2.Surface_Normal/lib/helper.py | QUVA-Lab/Spherical_Regression | 6a3b2a19d00f27f2417cb9f2fe21df5963def5b3 | [
"BSD-2-Clause-FreeBSD"
] | 11 | 2019-06-21T04:07:04.000Z | 2022-03-03T07:48:41.000Z | S2.Surface_Normal/lib/helper.py | QUVA-Lab/Spherical_Regression | 6a3b2a19d00f27f2417cb9f2fe21df5963def5b3 | [
"BSD-2-Clause-FreeBSD"
] | 16 | 2019-04-18T15:55:48.000Z | 2021-12-14T09:01:57.000Z | # coding: utf8
"""
@Author : Shuai Liao
"""
import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
from easydict import EasyDict as edict
from collections import OrderedDict as odict
from itertools import product
def eval_cls(Preds, GTs):
acc = torch.mean((Preds==GTs).float(... | 32.287356 | 113 | 0.583482 | 398 | 2,809 | 4.005025 | 0.31407 | 0.03074 | 0.048934 | 0.045169 | 0.394605 | 0.325596 | 0.237139 | 0.157466 | 0.09724 | 0.09724 | 0 | 0.015252 | 0.299751 | 2,809 | 86 | 114 | 32.662791 | 0.795119 | 0.255607 | 0 | 0.408163 | 0 | 0 | 0.004413 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.183673 | false | 0.020408 | 0.142857 | 0 | 0.510204 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
5725907a93d4509530c6337b88012d9b98d9508b | 432 | py | Python | Web/EnterthePolygon/exif/front/migrations/0003_auto_20190318_2200.py | HackUCF/SunshineCTF-2019-Public | a6311eca2e4c1f1878bd41f65ba886c067cf9e6b | [
"MIT"
] | 9 | 2019-04-14T01:47:27.000Z | 2020-09-12T19:57:37.000Z | Web/EnterthePolygon/exif/front/migrations/0003_auto_20190318_2200.py | HackUCF/SunshineCTF-2019-Public | a6311eca2e4c1f1878bd41f65ba886c067cf9e6b | [
"MIT"
] | null | null | null | Web/EnterthePolygon/exif/front/migrations/0003_auto_20190318_2200.py | HackUCF/SunshineCTF-2019-Public | a6311eca2e4c1f1878bd41f65ba886c067cf9e6b | [
"MIT"
] | 4 | 2019-04-15T22:08:33.000Z | 2020-10-13T12:27:24.000Z | # Generated by Django 2.1.4 on 2019-03-18 22:00
from django.db import migrations, models
import front.models
class Migration(migrations.Migration):
dependencies = [
('front', '0002_images_filename'),
]
operations = [
migrations.AlterField(
model_name='images',
na... | 21.6 | 82 | 0.622685 | 49 | 432 | 5.387755 | 0.755102 | 0.083333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.059748 | 0.263889 | 432 | 19 | 83 | 22.736842 | 0.77044 | 0.104167 | 0 | 0 | 1 | 0 | 0.093506 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57263263fcf0d25be3b07699313a58ddee641ede | 2,091 | py | Python | util/summary_func.py | demetoir/ALLGANS | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 11 | 2018-01-25T15:31:54.000Z | 2019-12-17T06:12:57.000Z | util/summary_func.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 19 | 2018-01-29T16:12:09.000Z | 2018-02-15T15:56:48.000Z | util/summary_func.py | demetoir/ALLGANs | 2f972db5e9a65f18aee0695d817f4acc221e54da | [
"MIT"
] | 2 | 2018-02-06T00:31:55.000Z | 2018-02-19T15:29:10.000Z | """tensorflow summary util"""
import tensorflow as tf
def mean_summary(var):
"""mean scalar summary
:type var: tensorflow.Variable
:param var: variable to add summary
"""
with tf.name_scope(var.name.split(":")[0]):
mean = tf.reduce_mean(var)
tf.summary.scalar('mean', m... | 25.5 | 64 | 0.61406 | 272 | 2,091 | 4.628676 | 0.125 | 0.057188 | 0.07784 | 0.133439 | 0.678316 | 0.633042 | 0.587768 | 0.587768 | 0.587768 | 0.587768 | 0 | 0.005086 | 0.247728 | 2,091 | 81 | 65 | 25.814815 | 0.795296 | 0.342898 | 0 | 0.518519 | 0 | 0 | 0.043516 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.259259 | false | 0 | 0.037037 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
5728d86cfb39f61d026b751fc8213327aa99cb55 | 624 | py | Python | Super Ugly Number.py | quake0day/oj | c09333d1738f8735de0d5d825db6f4b707585670 | [
"MIT"
] | null | null | null | Super Ugly Number.py | quake0day/oj | c09333d1738f8735de0d5d825db6f4b707585670 | [
"MIT"
] | null | null | null | Super Ugly Number.py | quake0day/oj | c09333d1738f8735de0d5d825db6f4b707585670 | [
"MIT"
] | null | null | null | class Solution(object):
def nthSuperUglyNumber(self, n, primes):
"""
:type n: int
:type primes: List[int]
:rtype: int
"""
res = [1]
hashmap = {val:0 for val in primes}
m = [float('inf')] * len(primes)
while len(res) < n:
newm = [re... | 27.130435 | 56 | 0.466346 | 76 | 624 | 3.828947 | 0.552632 | 0.027491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032086 | 0.400641 | 624 | 23 | 57 | 27.130435 | 0.745989 | 0 | 0 | 0 | 0 | 0 | 0.005587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.0625 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57296cc29c724443520b69c2c443af8c8189bd17 | 2,432 | py | Python | pandasCSVread.py | apalom/Clustering_NHTS_Driving_Patterns | c85f0500863a4e8870bca0875e3d0d5c73343876 | [
"MIT"
] | 1 | 2021-11-08T11:21:27.000Z | 2021-11-08T11:21:27.000Z | pandasCSVread.py | apalom/Clustering_NHTS_Driving_Patterns | c85f0500863a4e8870bca0875e3d0d5c73343876 | [
"MIT"
] | null | null | null | pandasCSVread.py | apalom/Clustering_NHTS_Driving_Patterns | c85f0500863a4e8870bca0875e3d0d5c73343876 | [
"MIT"
] | 1 | 2021-12-06T08:12:11.000Z | 2021-12-06T08:12:11.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 18 22:57:53 2018
@author: Alex Palomino
"""
# import libraries
import pandas as pd
import timeit
# initialize values
start_time = timeit.default_timer()
<<<<<<< HEAD
# Import NHTS2009 Data
df0 = pd.read_csv(r'C:\Users\avi_b\Box\CS6140 Project\Data\CSV\D... | 35.246377 | 102 | 0.67352 | 325 | 2,432 | 4.984615 | 0.523077 | 0.012346 | 0.022222 | 0.02963 | 0.267901 | 0.233333 | 0.183951 | 0.141975 | 0.11358 | 0.11358 | 0 | 0.049583 | 0.162418 | 2,432 | 69 | 103 | 35.246377 | 0.745704 | 0.393914 | 0 | 0 | 0 | 0 | 0.352896 | 0.075457 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.107143 | null | null | 0.107143 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57382c7e92c7030dddf26c6725ab901a5d60d76c | 5,064 | py | Python | docs/code/surrogates/pce/plot_pce_sphere.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | docs/code/surrogates/pce/plot_pce_sphere.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | docs/code/surrogates/pce/plot_pce_sphere.py | SURGroup/UncertaintyQuantification | a94c8db47d07134ea2b3b0a3ca53ca818532c3e6 | [
"MIT"
] | null | null | null | """
Sinusoidal Function Sphere function (2 random inputs, scalar output)
======================================================================
In this example, PCE is used to generate a surrogate model for a given set of 2D data.
.. math:: f(x) = x_1^2 + x_2^2
**Description:** Dimensions: 2
**Input Domain:** T... | 23.663551 | 143 | 0.697867 | 782 | 5,064 | 4.370844 | 0.285166 | 0.016091 | 0.017554 | 0.026331 | 0.362785 | 0.3189 | 0.279403 | 0.174956 | 0.174956 | 0.174956 | 0 | 0.041648 | 0.127567 | 5,064 | 214 | 144 | 23.663551 | 0.732005 | 0.288112 | 0 | 0.290323 | 1 | 0 | 0.086625 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.010753 | false | 0 | 0.075269 | 0.010753 | 0.096774 | 0.075269 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
573db3d150cfb7fe480413f9afabb4ec21bdf9a7 | 644 | py | Python | on/ottawa/ed/definition.py | ajah/represent-canada-data | f79092442767faa0b4babe50a377408e8576c8c4 | [
"OML"
] | null | null | null | on/ottawa/ed/definition.py | ajah/represent-canada-data | f79092442767faa0b4babe50a377408e8576c8c4 | [
"OML"
] | null | null | null | on/ottawa/ed/definition.py | ajah/represent-canada-data | f79092442767faa0b4babe50a377408e8576c8c4 | [
"OML"
] | null | null | null | from datetime import date
import boundaries
boundaries.register('Ottawa wards',
domain='Ottawa, ON',
last_updated=date(2010, 8, 27),
name_func=boundaries.dashed_attr('WARD_EN'),
id_func=boundaries.attr('WARD_NUM'),
authority='City of Ottawa',
source_url='http://ottawa.ca/online_services/openda... | 37.882353 | 114 | 0.734472 | 91 | 644 | 5.032967 | 0.648352 | 0.045852 | 0.085153 | 0.098253 | 0.242358 | 0.242358 | 0.242358 | 0 | 0 | 0 | 0 | 0.046099 | 0.124224 | 644 | 16 | 115 | 40.25 | 0.765957 | 0 | 0 | 0 | 0 | 0.071429 | 0.529503 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.142857 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
5740d467fe22bb074c19128843a7559a349001a4 | 343 | py | Python | cogs/events.py | est73/cog-example | a6db06d8066733be5fac2d172364b4d0d37a7028 | [
"MIT"
] | null | null | null | cogs/events.py | est73/cog-example | a6db06d8066733be5fac2d172364b4d0d37a7028 | [
"MIT"
] | null | null | null | cogs/events.py | est73/cog-example | a6db06d8066733be5fac2d172364b4d0d37a7028 | [
"MIT"
] | null | null | null | from discord.ext import commands
class Events(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
print('Logged in as')
print(self.bot.user.name)
print(self.bot.user.id)
print('------')
def setup(bot):
bo... | 18.052632 | 33 | 0.597668 | 47 | 343 | 4.234043 | 0.531915 | 0.140704 | 0.120603 | 0.160804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.253644 | 343 | 18 | 34 | 19.055556 | 0.777344 | 0 | 0 | 0 | 0 | 0 | 0.052478 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.083333 | 0 | 0.333333 | 0.333333 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
57436220589cbf620b857c927fc6c2fb35de3e9a | 1,302 | py | Python | experiments/system_model_v3/recommended_params.py | trangnv/geb-simulations-h20 | df86e1ad1ff8e98cf2c3f6025d1626d260a3b125 | [
"MIT"
] | 7 | 2021-08-31T13:11:51.000Z | 2022-02-10T09:05:16.000Z | experiments/system_model_v3/recommended_params.py | trangnv/geb-simulations-h20 | df86e1ad1ff8e98cf2c3f6025d1626d260a3b125 | [
"MIT"
] | null | null | null | experiments/system_model_v3/recommended_params.py | trangnv/geb-simulations-h20 | df86e1ad1ff8e98cf2c3f6025d1626d260a3b125 | [
"MIT"
] | 8 | 2021-09-03T08:29:09.000Z | 2021-12-04T04:20:49.000Z | import datetime
import os
from models.system_model_v3.model.params.init import params
from models.system_model_v3.model.state_variables.init import state_variables
from models.constants import RAY
from experiments.system_model_v3.configure import configure_experiment
from experiments.system_model_v3.run import run_ex... | 30.27907 | 202 | 0.821813 | 174 | 1,302 | 5.775862 | 0.408046 | 0.043781 | 0.051741 | 0.041791 | 0.214925 | 0.159204 | 0.103483 | 0.103483 | 0 | 0 | 0 | 0.010195 | 0.096006 | 1,302 | 42 | 203 | 31 | 0.84367 | 0.075269 | 0 | 0 | 0 | 0 | 0.044167 | 0.02 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.346154 | 0 | 0.346154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
5748d8b2c5d8b990f71c67234ba2cab83b06d8c3 | 1,819 | py | Python | app/root.py | SRAlexander/PyAPI | 7c5a1e60bd9cebfe2b52452b526f467e632af6f2 | [
"MIT"
] | 1 | 2022-01-27T08:43:08.000Z | 2022-01-27T08:43:08.000Z | app/root.py | SRAlexander/PyAPI | 7c5a1e60bd9cebfe2b52452b526f467e632af6f2 | [
"MIT"
] | null | null | null | app/root.py | SRAlexander/PyAPI | 7c5a1e60bd9cebfe2b52452b526f467e632af6f2 | [
"MIT"
] | null | null | null | # coding:utf-8
import sys
from flask import Flask, jsonify
from flask_cors import CORS
from flask_migrate import Migrate
from flask_restplus import Api
from flasgger import Swagger
from alchemy.common.base import db
from marshmallow import Schema, fields, ValidationError, pre_load
from controllers import tests_cont... | 30.316667 | 98 | 0.727872 | 228 | 1,819 | 5.679825 | 0.464912 | 0.027799 | 0.020077 | 0.029344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000681 | 0.192413 | 1,819 | 59 | 99 | 30.830508 | 0.880871 | 0.214404 | 0 | 0 | 0 | 0 | 0.078929 | 0.016209 | 0 | 0 | 0 | 0 | 0 | 1 | 0.029412 | false | 0 | 0.323529 | 0 | 0.382353 | 0.088235 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
575949a34276367e701ad8918a6fffd5318c3b1e | 1,156 | py | Python | task_manager/tasks/filters.py | kunatastic/kunatastic-task-manager | 06f60d5ba8bb5bc1b10ab98b6475a64780341416 | [
"MIT"
] | null | null | null | task_manager/tasks/filters.py | kunatastic/kunatastic-task-manager | 06f60d5ba8bb5bc1b10ab98b6475a64780341416 | [
"MIT"
] | null | null | null | task_manager/tasks/filters.py | kunatastic/kunatastic-task-manager | 06f60d5ba8bb5bc1b10ab98b6475a64780341416 | [
"MIT"
] | null | null | null | from django_filters.filters import ChoiceFilter, DateFilter
from tasks.models import STATUS_CHOICES, Task, History
from django_filters.rest_framework import FilterSet
from django.db.models import Q
STATUS_CHOICES_CUSTOM = (
("COMPLETED","COMPLETED"),
("NOT_COMPLETED","NOT_COMPLETED")
)
class HistoryFilter(FilterSe... | 36.125 | 90 | 0.696367 | 129 | 1,156 | 5.992248 | 0.341085 | 0.03881 | 0.07762 | 0.056921 | 0.069858 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.204152 | 1,156 | 31 | 91 | 37.290323 | 0.840217 | 0 | 0 | 0.068966 | 0 | 0 | 0.148789 | 0.019896 | 0 | 0 | 0 | 0 | 0 | 1 | 0.068966 | false | 0 | 0.137931 | 0.034483 | 0.517241 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
9386cfcc4722a3eb9af68989502f890d8dd80242 | 2,041 | py | Python | exercise12/lib/ProtocolUtils.py | jdiegoh3/distributed_computing | 33088e741d35590d5699e8ecd9a35ff12b65f7f8 | [
"MIT"
] | null | null | null | exercise12/lib/ProtocolUtils.py | jdiegoh3/distributed_computing | 33088e741d35590d5699e8ecd9a35ff12b65f7f8 | [
"MIT"
] | null | null | null | exercise12/lib/ProtocolUtils.py | jdiegoh3/distributed_computing | 33088e741d35590d5699e8ecd9a35ff12b65f7f8 | [
"MIT"
] | null | null | null | from xmlrpc import client
from xmlrpc.server import SimpleXMLRPCServer
from xmlrpc.server import SimpleXMLRPCRequestHandler
import threading
import socketserver
class MessageHandler(object):
body = None
def __init__(self, message):
self.body = message.decode("utf-8")
def message_loads(self):
... | 27.581081 | 94 | 0.673689 | 227 | 2,041 | 5.863436 | 0.290749 | 0.047333 | 0.033058 | 0.033058 | 0.097671 | 0.097671 | 0 | 0 | 0 | 0 | 0 | 0.014725 | 0.234689 | 2,041 | 74 | 95 | 27.581081 | 0.837388 | 0 | 0 | 0.148148 | 0 | 0 | 0.010774 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.240741 | false | 0.037037 | 0.092593 | 0.037037 | 0.592593 | 0.018519 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
9394aa6b161052ab4cf6a55bb4fb281edfc81957 | 271 | py | Python | Array/10 Move all negative numbers to beginning and positive to end.py | ikaushikpal/DS-450-python | 9466f77fb9db9e6a5bb3f20aa89ba6332f49e848 | [
"MIT"
] | 3 | 2021-06-28T12:04:19.000Z | 2021-09-07T07:23:41.000Z | Array/10 Move all negative numbers to beginning and positive to end.py | SupriyoDam/DS-450-python | 5dc21ce61b3279e9bd9d6ef3ad236667227ca283 | [
"MIT"
] | null | null | null | Array/10 Move all negative numbers to beginning and positive to end.py | SupriyoDam/DS-450-python | 5dc21ce61b3279e9bd9d6ef3ad236667227ca283 | [
"MIT"
] | 1 | 2021-06-28T15:42:55.000Z | 2021-06-28T15:42:55.000Z | def rearrange(arr, n):
j = 0
for i in range(0, n):
if (arr[i] < 0):
arr[i], arr[j] = arr[j], arr[i]
j += 1
print(arr)
if __name__ == "__main__":
arr = [-1, 2, -3, 4, 5, 6, -7, 8, 9]
n = len(arr)
rearrange(arr, n)
| 19.357143 | 43 | 0.420664 | 47 | 271 | 2.255319 | 0.510638 | 0.113208 | 0.245283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.076923 | 0.376384 | 271 | 13 | 44 | 20.846154 | 0.550296 | 0 | 0 | 0 | 0 | 0 | 0.02952 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0 | 0 | 0.090909 | 0.090909 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
9399f5b0311145e906126fe8e1cb2461ab68a235 | 3,216 | py | Python | ntee/utils/abstract_db.py | studio-ousia/ntee | d69f017f1244f68495db2e96ae70e9ec44b6c32b | [
"Apache-2.0"
] | 87 | 2017-08-16T09:00:18.000Z | 2022-03-01T14:14:43.000Z | ntee/utils/abstract_db.py | studio-ousia/ntee | d69f017f1244f68495db2e96ae70e9ec44b6c32b | [
"Apache-2.0"
] | 2 | 2018-01-02T21:00:31.000Z | 2018-09-18T02:03:02.000Z | ntee/utils/abstract_db.py | studio-ousia/ntee | d69f017f1244f68495db2e96ae70e9ec44b6c32b | [
"Apache-2.0"
] | 22 | 2017-09-04T20:45:01.000Z | 2021-02-15T21:50:54.000Z | # -*- coding: utf-8 -*-
import click
import gzip
import os
import rdflib
import re
import urllib
from collections import defaultdict
from contextlib import closing
from functools import partial
from multiprocessing.pool import Pool
from shelve import DbfilenameShelf
from tokenizer import RegexpTokenizer
class Abstr... | 33.154639 | 97 | 0.595771 | 422 | 3,216 | 4.388626 | 0.338863 | 0.030238 | 0.023758 | 0.025918 | 0.173866 | 0.153348 | 0.153348 | 0.101512 | 0.058315 | 0.058315 | 0 | 0.0098 | 0.270211 | 3,216 | 96 | 98 | 33.5 | 0.779293 | 0.00653 | 0 | 0 | 0 | 0 | 0.107109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.162162 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93abba40361604beb1f7f26d77eb2e8f0bb14aeb | 730 | py | Python | test/autocomplete.py | mrHola21/Eterm | b0892e122d1e06ac9b3141413b6ef29dd17f042c | [
"MIT"
] | 12 | 2021-08-16T13:34:04.000Z | 2022-03-21T00:48:00.000Z | test/autocomplete.py | mrHola21/Eterm | b0892e122d1e06ac9b3141413b6ef29dd17f042c | [
"MIT"
] | 2 | 2021-09-04T13:26:28.000Z | 2022-02-12T17:01:09.000Z | test/autocomplete.py | mrHola21/Eterm | b0892e122d1e06ac9b3141413b6ef29dd17f042c | [
"MIT"
] | 1 | 2021-08-20T01:21:11.000Z | 2021-08-20T01:21:11.000Z | import getpass
import os_test
import readline
class MyCompleter:
def __init__(self, options):
self.options = sorted(options)
def complete(self, text, state):
if state == 0:
if text:
self.matches = [s for s in self.options
if s and s... | 24.333333 | 117 | 0.593151 | 85 | 730 | 4.988235 | 0.482353 | 0.103774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001965 | 0.30274 | 730 | 29 | 118 | 25.172414 | 0.831041 | 0 | 0 | 0 | 0 | 0 | 0.063014 | 0.034247 | 0 | 0 | 0 | 0 | 0 | 1 | 0.095238 | false | 0.095238 | 0.142857 | 0 | 0.380952 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
93b1b4bdb725d98ec055a27bb76a01427f99f59e | 768 | py | Python | mmdet/models/roi_heads/bbox_heads/__init__.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | mmdet/models/roi_heads/bbox_heads/__init__.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | mmdet/models/roi_heads/bbox_heads/__init__.py | liuyanyi/mmdetection | d2003536af6f08cb9bd7a75e0444eef03ace4bb3 | [
"Apache-2.0"
] | null | null | null | from .bbox_head import BBoxHead
from .convfc_bbox_head import (ConvFCBBoxHead, Shared2FCBBoxHead,
Shared4Conv1FCBBoxHead)
from .dii_head import DIIHead
from .double_bbox_head import DoubleConvFCBBoxHead
from .sabl_head import SABLHead
from .scnet_bbox_head import SCNetBBoxHead
from .rotat... | 42.666667 | 86 | 0.738281 | 57 | 768 | 9.719298 | 0.421053 | 0.108303 | 0.101083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0192 | 0.186198 | 768 | 17 | 87 | 45.176471 | 0.8672 | 0 | 0 | 0 | 0 | 0 | 0.266927 | 0.092448 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4375 | 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 | 1 | 0 | 0 | 0 | 0 | 1 |
93bcb2581a88994f66c5d5d288816d549367fdd6 | 788 | py | Python | AOC2018/day02.py | hbldh/AdventOfCode2016 | 9e737e07edddffdfd7a39c1dd410f9bce1192e4e | [
"MIT"
] | null | null | null | AOC2018/day02.py | hbldh/AdventOfCode2016 | 9e737e07edddffdfd7a39c1dd410f9bce1192e4e | [
"MIT"
] | null | null | null | AOC2018/day02.py | hbldh/AdventOfCode2016 | 9e737e07edddffdfd7a39c1dd410f9bce1192e4e | [
"MIT"
] | null | null | null | from collections import Counter
import difflib
def _checksum(r):
counter = Counter(r)
return int(any([x == 2 for x in counter.values()])), int(any([x == 3 for x in counter.values()]))
def _solve_1(rows):
d = [_checksum(row) for row in rows]
return sum([x[0] for x in d]) * sum([x[1] for x in d])
d... | 23.878788 | 101 | 0.596447 | 129 | 788 | 3.457364 | 0.348837 | 0.035874 | 0.053812 | 0.058296 | 0.085202 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028961 | 0.255076 | 788 | 32 | 102 | 24.625 | 0.730835 | 0 | 0 | 0 | 0 | 0 | 0.010152 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.190476 | false | 0 | 0.142857 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
93c031d8640efb30b995c8d4487c5ba51ffbb0fb | 8,889 | py | Python | archive/original_main.py | FDKevin0/Micro-Expression-with-Deep-Learning | 617a359f264a4ccc4b6c5b1eb68c56b08d9cc397 | [
"BSD-3-Clause-Attribution"
] | 249 | 2018-04-19T08:30:19.000Z | 2022-03-30T06:31:09.000Z | archive/original_main.py | FDKevin0/Micro-Expression-with-Deep-Learning | 617a359f264a4ccc4b6c5b1eb68c56b08d9cc397 | [
"BSD-3-Clause-Attribution"
] | 40 | 2018-05-17T03:02:06.000Z | 2021-04-16T02:28:24.000Z | archive/original_main.py | FDKevin0/Micro-Expression-with-Deep-Learning | 617a359f264a4ccc4b6c5b1eb68c56b08d9cc397 | [
"BSD-3-Clause-Attribution"
] | 111 | 2018-04-09T01:53:29.000Z | 2022-03-19T08:59:28.000Z |
import numpy as np
import sys
import math
import operator
import csv
import glob,os
import xlrd
import cv2
import pandas as pd
from sklearn.svm import SVC
from collections import Counter
from sklearn.metrics import confusion_matrix
import scipy.io as sio
from keras.models import Sequential
from keras.layers import L... | 29.433775 | 102 | 0.705366 | 1,425 | 8,889 | 4.277895 | 0.213333 | 0.025591 | 0.011811 | 0.018373 | 0.461778 | 0.436352 | 0.382874 | 0.339075 | 0.303478 | 0.292979 | 0 | 0.049532 | 0.134661 | 8,889 | 301 | 103 | 29.531561 | 0.74298 | 0 | 0 | 0.326923 | 0 | 0 | 0.128946 | 0.051097 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.100962 | null | null | 0.048077 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93cc44dcc5a1b28a24f27014a367ab75bfa40e95 | 8,394 | py | Python | logcausality/config.py | cpflat/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 20 | 2016-11-22T03:21:20.000Z | 2021-06-16T02:44:58.000Z | logcausality/config.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 1 | 2019-10-23T05:45:34.000Z | 2019-11-01T04:56:01.000Z | logcausality/config.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 8 | 2015-11-13T03:33:04.000Z | 2021-09-10T09:29:23.000Z | #!/usr/bin/env python
# coding: utf-8
import sys
import os
import datetime
import logging
import collections
import ConfigParser
DEFAULT_CONFIG_NAME = "/".join((os.path.dirname(__file__),
"config.conf.default"))
LOGGER_NAME = __name__.rpartition(".")[-1]
_logger = logging.getLogger(LOGGER_NAME)
_ch = logging.... | 29.978571 | 76 | 0.548964 | 1,001 | 8,394 | 4.509491 | 0.197802 | 0.026805 | 0.016615 | 0.019938 | 0.258972 | 0.219982 | 0.149756 | 0.144883 | 0.120071 | 0.120071 | 0 | 0.006431 | 0.333095 | 8,394 | 279 | 77 | 30.086022 | 0.799929 | 0.055635 | 0 | 0.252427 | 0 | 0 | 0.056272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.004854 | 0.043689 | null | null | 0.009709 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93cf8ffdd07c02695020aaefc8baf5c6d6cf4abf | 1,677 | py | Python | Torrent Checker/Torrent_ip_checker.py | Utkarsh1308/FunUtils | 13cdba449df8e9cedc0243dafeffdb9c88bdd61a | [
"MIT"
] | 48 | 2017-03-17T22:23:20.000Z | 2021-12-04T17:52:04.000Z | Torrent Checker/Torrent_ip_checker.py | Utkarsh1308/FunUtils | 13cdba449df8e9cedc0243dafeffdb9c88bdd61a | [
"MIT"
] | 23 | 2017-10-13T04:06:11.000Z | 2021-06-02T15:01:34.000Z | Torrent Checker/Torrent_ip_checker.py | Utkarsh1308/FunUtils | 13cdba449df8e9cedc0243dafeffdb9c88bdd61a | [
"MIT"
] | 83 | 2017-07-18T03:17:37.000Z | 2022-03-18T00:01:15.000Z | #!/usr/bin/python
import Tkinter
import ctypes
import tkMessageBox
import socket
import sys
import urllib2
import httplib
from bs4 import BeautifulSoup as BS
class window(Tkinter.Tk):
Ip_text = ''
def __init__(self,parent):
Tkinter.Tk.__init__(self,parent)
self.parent = parent
self.iconbitmap(default='eye.ico')... | 28.423729 | 85 | 0.711389 | 239 | 1,677 | 4.920502 | 0.51046 | 0.02551 | 0.02381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.024896 | 0.137746 | 1,677 | 58 | 86 | 28.913793 | 0.788382 | 0.009541 | 0 | 0 | 0 | 0 | 0.171687 | 0.024699 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.145455 | null | null | 0.036364 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93d18a8872fcbab7735e5bdf4bdc7150cb499cfc | 3,061 | py | Python | app.py | Dkadariya/SBN_pos_server | ffda38f36aef598520b59024c9967d5bbbab2190 | [
"MIT"
] | null | null | null | app.py | Dkadariya/SBN_pos_server | ffda38f36aef598520b59024c9967d5bbbab2190 | [
"MIT"
] | null | null | null | app.py | Dkadariya/SBN_pos_server | ffda38f36aef598520b59024c9967d5bbbab2190 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request
from flask_restful import Resource, Api
from flask_cors import CORS
from fileIO import commit_file
# importing methods from SQL handler module for CRUD operations
from sql_handler import get_item, insert_item, remove_item, sell_item, list_items
import json
app = Flask(__name_... | 33.271739 | 141 | 0.649134 | 408 | 3,061 | 4.735294 | 0.303922 | 0.041408 | 0.036232 | 0.018634 | 0.139752 | 0.120083 | 0.086957 | 0.086957 | 0.048654 | 0.048654 | 0 | 0.006189 | 0.261026 | 3,061 | 91 | 142 | 33.637363 | 0.847922 | 0.278994 | 0 | 0.224138 | 0 | 0.017241 | 0.143381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.103448 | null | null | 0.017241 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93d81c29761a0ba47dcb88ce0e86dde05cce2113 | 1,515 | py | Python | raypipe/core/rpipe/callback.py | billyyann/RayPipe | 52cff7a6806cc6e82463200ea851187e44a7ef19 | [
"MIT"
] | null | null | null | raypipe/core/rpipe/callback.py | billyyann/RayPipe | 52cff7a6806cc6e82463200ea851187e44a7ef19 | [
"MIT"
] | null | null | null | raypipe/core/rpipe/callback.py | billyyann/RayPipe | 52cff7a6806cc6e82463200ea851187e44a7ef19 | [
"MIT"
] | null | null | null | import os
from tensorflow.python.keras.callbacks import Callback, ModelCheckpoint
import ray.train as train
import zipfile
from raypipe import logger
from raypipe.core.distribution import object_store_impl
from raypipe.core.distribution.object_store import ObjectPath
from raypipe.core.rpipe.utils import zip_dir
cla... | 33.666667 | 85 | 0.689109 | 193 | 1,515 | 5.11399 | 0.38342 | 0.081054 | 0.045593 | 0.054711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003279 | 0.194719 | 1,515 | 44 | 86 | 34.431818 | 0.805738 | 0.015182 | 0 | 0 | 0 | 0 | 0.056338 | 0.022133 | 0 | 0 | 0 | 0.022727 | 0 | 1 | 0.121212 | false | 0 | 0.242424 | 0 | 0.424242 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93d9f3c524dc786cef616ea88a77907fa5a5f914 | 904 | py | Python | setup.py | jonspock/vdf-competition | e77dc86f438d4e734c68f6b6aa12b30a3dc65475 | [
"Apache-2.0"
] | 97 | 2018-10-04T18:10:42.000Z | 2021-08-23T10:37:06.000Z | setup.py | jonspock/vdf-competition | e77dc86f438d4e734c68f6b6aa12b30a3dc65475 | [
"Apache-2.0"
] | 4 | 2018-10-04T18:20:49.000Z | 2021-05-03T07:13:14.000Z | setup.py | jonspock/vdf-competition | e77dc86f438d4e734c68f6b6aa12b30a3dc65475 | [
"Apache-2.0"
] | 17 | 2018-10-08T18:08:21.000Z | 2022-01-12T00:54:32.000Z | #!/usr/bin/env python
from setuptools import setup
from inkfish.version import version
setup(
name="inkfish",
version=version,
packages=[
"inkfish",
],
author="Chia Network, Inc.",
entry_points={
'console_scripts':
[
'pot = inkfish.cmds:pot',
... | 27.393939 | 79 | 0.573009 | 90 | 904 | 5.722222 | 0.677778 | 0.11068 | 0.145631 | 0.151456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012403 | 0.286504 | 904 | 32 | 80 | 28.25 | 0.786047 | 0.022124 | 0 | 0 | 0 | 0 | 0.505096 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.071429 | 0 | 0.071429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93dca678bf47b0b5c87261618dae689a2be9bff6 | 751 | py | Python | vcflat/tests/test_HeaderExtraction/test_pop_header.py | arontommi/VCFlat | f707d8e564ec30c65e063eea305aa30cf698cc86 | [
"MIT"
] | 4 | 2019-11-29T12:59:12.000Z | 2020-01-28T15:30:44.000Z | vcflat/tests/test_HeaderExtraction/test_pop_header.py | arontommi/VCFlat | f707d8e564ec30c65e063eea305aa30cf698cc86 | [
"MIT"
] | 1 | 2022-01-04T22:58:58.000Z | 2022-01-04T22:58:58.000Z | vcflat/tests/test_HeaderExtraction/test_pop_header.py | arontommi/VCFlat | f707d8e564ec30c65e063eea305aa30cf698cc86 | [
"MIT"
] | 1 | 2020-01-28T15:31:29.000Z | 2020-01-28T15:31:29.000Z | import os
from vcflat.HeaderExtraction import VcfHeader, pop_header
def get_input():
test_data_dir = os.path.join(os.path.dirname(__file__), "..", "test_data")
i = os.path.join(test_data_dir, "test.snpeff.vcf")
return i
def get_no_chrom():
i = get_input()
vch = VcfHeader(i)
output = vch.get_... | 22.757576 | 78 | 0.671105 | 114 | 751 | 4.140351 | 0.403509 | 0.088983 | 0.084746 | 0.076271 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006678 | 0.202397 | 751 | 32 | 79 | 23.46875 | 0.781302 | 0.130493 | 0 | 0 | 0 | 0 | 0.041074 | 0 | 0 | 0 | 0 | 0 | 0.157895 | 1 | 0.263158 | false | 0 | 0.105263 | 0 | 0.473684 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93dcc7630912c75374fd03f6238e491e7b09266a | 2,363 | py | Python | learn_cedev/book/models.py | atthana/django_cedev | b0b8dab12f397c4049b224d20bb77e192c5a7758 | [
"MIT"
] | null | null | null | learn_cedev/book/models.py | atthana/django_cedev | b0b8dab12f397c4049b224d20bb77e192c5a7758 | [
"MIT"
] | null | null | null | learn_cedev/book/models.py | atthana/django_cedev | b0b8dab12f397c4049b224d20bb77e192c5a7758 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.html import format_html
BOOK_LEVEL_CHOICE = ( # โชว์ชุดหลัง แต่เซฟด้วยชุดหน้า เช่น โชว์ Basic แต่เซฟด้วย B นะ
('B', 'Basic'),
('M', 'Medium'),
('A', 'Advance'),
)
class Category(models.Model):
name = models.CharField(max_length=100)
class Meta:
... | 32.369863 | 123 | 0.677952 | 384 | 2,363 | 4.184896 | 0.40625 | 0.039203 | 0.067206 | 0.089608 | 0.184194 | 0.154947 | 0.120722 | 0.08463 | 0.08463 | 0.08463 | 0 | 0.011573 | 0.195514 | 2,363 | 72 | 124 | 32.819444 | 0.805366 | 0.146424 | 0 | 0.264151 | 0 | 0 | 0.044821 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.113208 | false | 0 | 0.037736 | 0.09434 | 0.754717 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
93e1e5ecf499f7af4a775e513731850c152dd6cd | 511 | py | Python | backend/logger/migrations/0003_requestlogger_sha1.py | AstroMatt/esa-subjective-time-perception | e23b09d1f13a8f51057178509beebd697789721f | [
"MIT"
] | 1 | 2017-02-25T10:32:01.000Z | 2017-02-25T10:32:01.000Z | backend/logger/migrations/0003_requestlogger_sha1.py | AstroMatt/esa-subjective-time-perception | e23b09d1f13a8f51057178509beebd697789721f | [
"MIT"
] | 23 | 2017-10-02T13:59:20.000Z | 2017-12-27T21:32:17.000Z | backend/logger/migrations/0003_requestlogger_sha1.py | AstroMatt/esa-time-perception | e23b09d1f13a8f51057178509beebd697789721f | [
"MIT"
] | 1 | 2021-02-08T17:13:56.000Z | 2021-02-08T17:13:56.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-15 12:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('logger', '0002_auto_20161231_1740'),
]
operations = [
migrations.AddField(
... | 24.333333 | 108 | 0.634051 | 59 | 511 | 5.305085 | 0.813559 | 0.051118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.095607 | 0.242661 | 511 | 20 | 109 | 25.55 | 0.713178 | 0.133072 | 0 | 0 | 1 | 0 | 0.113636 | 0.052273 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
93e64bf45db950b9497bc6125e6b7e86d6a1937c | 890 | py | Python | openstack_dashboard/dashboards/identity/signups/panel.py | sreenathmmenon/astttproject | 464fe20c8acf14afdfe03d1e4758e3df2b06196e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/identity/signups/panel.py | sreenathmmenon/astttproject | 464fe20c8acf14afdfe03d1e4758e3df2b06196e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/identity/signups/panel.py | sreenathmmenon/astttproject | 464fe20c8acf14afdfe03d1e4758e3df2b06196e | [
"Apache-2.0"
] | null | null | null | from django.utils.translation import ugettext_lazy as _
import horizon
from openstack_dashboard.local.local_settings import SIGNUP_ROLES, OPENSTACK_API_VERSIONS
from openstack_dashboard.dashboards.identity.signups.common import get_admin_ksclient
class Signups(horizon.Panel):
name = _("Signups")
slug = 'signu... | 34.230769 | 89 | 0.680899 | 110 | 890 | 5.327273 | 0.472727 | 0.056314 | 0.075085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001481 | 0.241573 | 890 | 25 | 90 | 35.6 | 0.866667 | 0.041573 | 0 | 0 | 0 | 0 | 0.042303 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.052632 | false | 0 | 0.210526 | 0 | 0.526316 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
93ecb6042fa51f598c695e62a135db5cccc67248 | 320 | py | Python | app/__init__.py | bjrnwnklr/random-poetry | 573cdeb7fd3fe23f139a056b79c5b334364ed0ed | [
"MIT"
] | null | null | null | app/__init__.py | bjrnwnklr/random-poetry | 573cdeb7fd3fe23f139a056b79c5b334364ed0ed | [
"MIT"
] | null | null | null | app/__init__.py | bjrnwnklr/random-poetry | 573cdeb7fd3fe23f139a056b79c5b334364ed0ed | [
"MIT"
] | null | null | null | from flask import Flask
from config import Config
from randompoetry import PoemFormRegistry, CorpusRegistry
app = Flask(__name__)
app.config.from_object(Config)
pfr = PoemFormRegistry.from_json('poemforms.json')
cr = CorpusRegistry()
# this has to be at the bottom to avoid circular references
from app import routes
| 24.615385 | 59 | 0.809375 | 44 | 320 | 5.75 | 0.568182 | 0.079051 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.13125 | 320 | 12 | 60 | 26.666667 | 0.910072 | 0.178125 | 0 | 0 | 0 | 0 | 0.05364 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
93f54496c18200d13c70c0bcc8b0a247246b9fd4 | 313 | py | Python | apps/paypal/urls.py | youssriaboelseod/pyerp | 9ef9873e2ff340010656f0c518bccf9d7a14dbaa | [
"MIT"
] | 115 | 2019-08-18T16:12:54.000Z | 2022-03-29T14:17:20.000Z | apps/paypal/urls.py | youssriaboelseod/pyerp | 9ef9873e2ff340010656f0c518bccf9d7a14dbaa | [
"MIT"
] | 22 | 2019-09-09T01:34:54.000Z | 2022-03-12T00:33:40.000Z | apps/paypal/urls.py | youssriaboelseod/pyerp | 9ef9873e2ff340010656f0c518bccf9d7a14dbaa | [
"MIT"
] | 83 | 2019-08-17T17:09:20.000Z | 2022-03-25T04:46:53.000Z | # Django Library
from django.urls import path
# Localfolder Library
from .views.paypal_config import UpdatePaypalConfigView
# http://www.secnot.com/django-shop-paypal-rest-1.html
app_name = 'paypal'
urlpatterns = [
path('paypal-config/<int:pk>', UpdatePaypalConfigView.as_view(), name='paypal-config'),
]
| 22.357143 | 91 | 0.757188 | 40 | 313 | 5.85 | 0.65 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003584 | 0.108626 | 313 | 13 | 92 | 24.076923 | 0.835125 | 0.277955 | 0 | 0 | 0 | 0 | 0.184685 | 0.099099 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 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 | 1 | 0 | 0 | 0 | 0 | 1 |
93fd137f9b805159f6901f88383d1760ae944cc2 | 1,028 | py | Python | example/hello_fastapi.py | ifplusor/ahserver | 26a6315d7a3b781d424c81bb3985016d9233e1b7 | [
"BSD-3-Clause"
] | 1 | 2019-10-08T07:57:32.000Z | 2019-10-08T07:57:32.000Z | example/hello_fastapi.py | ifplusor/ahserver | 26a6315d7a3b781d424c81bb3985016d9233e1b7 | [
"BSD-3-Clause"
] | null | null | null | example/hello_fastapi.py | ifplusor/ahserver | 26a6315d7a3b781d424c81bb3985016d9233e1b7 | [
"BSD-3-Clause"
] | null | null | null | # encoding=utf-8
if __name__ == "__main__":
import asyncio
import os
import uvloop
from ahserver.application.asgi import server
# 设置 uvloop
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
# 启动服务
server(
__file__ + ":app",
port=8080,
# port=8443,
... | 22.347826 | 69 | 0.569066 | 121 | 1,028 | 4.553719 | 0.512397 | 0.043557 | 0.036298 | 0.043557 | 0.112523 | 0.112523 | 0.112523 | 0.112523 | 0 | 0 | 0 | 0.013889 | 0.299611 | 1,028 | 45 | 70 | 22.844444 | 0.751389 | 0.057393 | 0 | 0 | 0 | 0 | 0.070613 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.137931 | false | 0 | 0.206897 | 0.103448 | 0.482759 | 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 | 1 | 0 | 0 | 0 | 1 |
93ffbfaed583ba5215eb76e45c8b5e4ee26fac42 | 1,929 | py | Python | game/migrations/0001_initial.py | vinsmokemau/ProyectoLoteria | ff27e0160e789e67417630145b609b8e37f2ee89 | [
"MIT"
] | null | null | null | game/migrations/0001_initial.py | vinsmokemau/ProyectoLoteria | ff27e0160e789e67417630145b609b8e37f2ee89 | [
"MIT"
] | null | null | null | game/migrations/0001_initial.py | vinsmokemau/ProyectoLoteria | ff27e0160e789e67417630145b609b8e37f2ee89 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-09-11 03:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('deck', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Boar... | 34.446429 | 129 | 0.541213 | 183 | 1,929 | 5.557377 | 0.36612 | 0.118977 | 0.055064 | 0.086529 | 0.393314 | 0.393314 | 0.393314 | 0.393314 | 0.393314 | 0.3412 | 0 | 0.016067 | 0.322447 | 1,929 | 55 | 130 | 35.072727 | 0.762051 | 0.023328 | 0 | 0.395833 | 1 | 0 | 0.145058 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.041667 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
9e01c406e06f5fde67448b12e11a970e55876724 | 224 | py | Python | BasicRead.py | Seeed-Studio/seeed-ardupy-si114x | e844f5f86a315d40c56c607cd9cc45f70d138761 | [
"MIT"
] | null | null | null | BasicRead.py | Seeed-Studio/seeed-ardupy-si114x | e844f5f86a315d40c56c607cd9cc45f70d138761 | [
"MIT"
] | null | null | null | BasicRead.py | Seeed-Studio/seeed-ardupy-si114x | e844f5f86a315d40c56c607cd9cc45f70d138761 | [
"MIT"
] | null | null | null | from arduino import grove_si114x
import time
SI1145 = grove_si114x()
while True:
print('Visible %03d UV %.2f IR %03d' % (SI1145.Visible , SI1145.UV/100 , SI1145.IR),end=" ")
print('\r', end='')
time.sleep(0.5)
| 22.4 | 96 | 0.647321 | 34 | 224 | 4.205882 | 0.617647 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.174863 | 0.183036 | 224 | 9 | 97 | 24.888889 | 0.606557 | 0 | 0 | 0 | 0 | 0 | 0.138393 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.285714 | 0 | 0.285714 | 0.285714 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
9e0f8ac62cd364e669a829a121f2d6f387f1e95a | 4,675 | py | Python | morph_net/framework/output_non_passthrough_op_handler.py | MohammadChalaki/morph-net | 83addae677195b4beba34a321ccf9c0cd55d5b62 | [
"Apache-2.0"
] | 1,061 | 2019-03-12T20:35:41.000Z | 2022-02-08T00:00:33.000Z | morph_net/framework/output_non_passthrough_op_handler.py | psyhicborg/morph-net | 0fb096d8d3b33eda9ab86c700cb6c07c9dbf10ee | [
"Apache-2.0"
] | 67 | 2019-03-16T18:50:59.000Z | 2021-09-03T13:28:42.000Z | morph_net/framework/output_non_passthrough_op_handler.py | psyhicborg/morph-net | 0fb096d8d3b33eda9ab86c700cb6c07c9dbf10ee | [
"Apache-2.0"
] | 168 | 2019-03-23T09:36:39.000Z | 2022-01-16T12:19:33.000Z | """OpHandler for OutputNonPassthrough ops.
OutputNonPassthrough ops take their regularizer from the output and do not
passthrough the regularizer to their input. This is the default OpHandler for
ops like Conv2D and MatMul when L1-gamma regularization is used.
"""
from __future__ import absolute_import
from __future_... | 37.103175 | 79 | 0.742888 | 683 | 4,675 | 4.727672 | 0.18448 | 0.059461 | 0.07061 | 0.044596 | 0.500774 | 0.371013 | 0.355218 | 0.270672 | 0.221121 | 0.198823 | 0 | 0.000803 | 0.20107 | 4,675 | 125 | 80 | 37.4 | 0.863722 | 0.390802 | 0 | 0.188679 | 0 | 0 | 0.027594 | 0 | 0 | 0 | 0 | 0.008 | 0 | 1 | 0.113208 | false | 0.056604 | 0.09434 | 0.037736 | 0.283019 | 0.018868 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
9e11feba884a0fb37dff81d882a30687a12c3ef7 | 806 | py | Python | core/src/trezor/messages/StellarPaymentOp.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | null | null | null | core/src/trezor/messages/StellarPaymentOp.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 1 | 2019-02-08T00:22:42.000Z | 2019-02-13T09:41:54.000Z | core/src/trezor/messages/StellarPaymentOp.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 2 | 2019-02-07T23:57:09.000Z | 2020-10-21T07:07:27.000Z | # Automatically generated by pb2py
# fmt: off
import protobuf as p
from .StellarAssetType import StellarAssetType
class StellarPaymentOp(p.MessageType):
MESSAGE_WIRE_TYPE = 211
def __init__(
self,
source_account: str = None,
destination_account: str = None,
asset: StellarAsse... | 26 | 57 | 0.610422 | 83 | 806 | 5.746988 | 0.506024 | 0.109015 | 0.071279 | 0.083857 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021127 | 0.295285 | 806 | 30 | 58 | 26.866667 | 0.818662 | 0.050868 | 0 | 0 | 1 | 0 | 0.057743 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.086957 | false | 0 | 0.086957 | 0.043478 | 0.304348 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
9e15dcc5addfeb9b1c3e96210aa1866ce2beac57 | 1,046 | py | Python | 2016/starter.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | 11 | 2019-12-03T06:32:37.000Z | 2021-12-24T12:23:57.000Z | 2016/starter.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | null | null | null | 2016/starter.py | iKevinY/advent | d160fb711a0a4d671f53cbd61088117e7ff0276a | [
"MIT"
] | 1 | 2019-12-07T06:21:31.000Z | 2019-12-07T06:21:31.000Z | import os # NOQA
import sys # NOQA
import re # NOQA
import math # NOQA
import fileinput
from collections import Counter, deque, namedtuple # NOQA
from itertools import count, product, permutations, combinations, combinations_with_replacement # NOQA
from utils import parse_line, mul, factors, memoize, primes, new... | 32.6875 | 103 | 0.628107 | 164 | 1,046 | 3.957317 | 0.432927 | 0.061633 | 0.03698 | 0.032357 | 0.146379 | 0.084746 | 0.061633 | 0 | 0 | 0 | 0 | 0.010376 | 0.262906 | 1,046 | 31 | 104 | 33.741935 | 0.831388 | 0.475143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0.0625 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
9e167504dd634ad5bf6ba222eb91d42f5cd5edb7 | 15,650 | py | Python | STN.py | newrotik/pySTN | 8db9fed6f173dca39d6b139ec9ecff94402abeb4 | [
"MIT"
] | 4 | 2018-03-17T20:08:28.000Z | 2021-09-11T09:06:24.000Z | STN.py | newrotik/pySTN | 8db9fed6f173dca39d6b139ec9ecff94402abeb4 | [
"MIT"
] | null | null | null | STN.py | newrotik/pySTN | 8db9fed6f173dca39d6b139ec9ecff94402abeb4 | [
"MIT"
] | 1 | 2020-07-25T10:54:34.000Z | 2020-07-25T10:54:34.000Z | __author__ = 'robin'
"""
Implementation of a scheduling system based on the STN model. The data of the problem is
in the __init__() method, and can be changed. Additional constraints can be included as functions
that return cvx.Constraints, and added in the STN.construst_nominal_model() method.
We pack everything in a... | 44.334278 | 120 | 0.521278 | 2,256 | 15,650 | 3.467642 | 0.14539 | 0.035792 | 0.04295 | 0.046018 | 0.40023 | 0.33606 | 0.263326 | 0.231369 | 0.202608 | 0.169372 | 0 | 0.03368 | 0.354952 | 15,650 | 352 | 121 | 44.460227 | 0.741258 | 0.124217 | 0 | 0.22381 | 0 | 0 | 0.022583 | 0 | 0 | 0 | 0 | 0.002841 | 0 | 0 | null | null | 0 | 0.014286 | null | null | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
9e25a36b57659aca7ff091421b68f7af24112973 | 1,425 | py | Python | mock_api/mock_gh_api.py | equinor/ms-continuus | 3117ba5989c7f7f7def3a66dc882961e66e53310 | [
"MIT"
] | null | null | null | mock_api/mock_gh_api.py | equinor/ms-continuus | 3117ba5989c7f7f7def3a66dc882961e66e53310 | [
"MIT"
] | 7 | 2021-01-13T13:43:47.000Z | 2021-04-21T07:57:28.000Z | mock_api/mock_gh_api.py | equinor/ms-continuus | 3117ba5989c7f7f7def3a66dc882961e66e53310 | [
"MIT"
] | null | null | null | import json
from copy import deepcopy
from random import randrange
from typing import List
import uvicorn
from fastapi import FastAPI, HTTPException, status
from pydantic import BaseModel
from starlette.responses import FileResponse
app = FastAPI()
class Repos(BaseModel):
repositories: List[str]
with open("mock_... | 24.568966 | 74 | 0.70386 | 195 | 1,425 | 5.020513 | 0.451282 | 0.040858 | 0.040858 | 0.053115 | 0.074566 | 0.051073 | 0 | 0 | 0 | 0 | 0 | 0.017413 | 0.153684 | 1,425 | 57 | 75 | 25 | 0.794362 | 0.075789 | 0 | 0 | 0 | 0 | 0.183409 | 0.08067 | 0 | 0 | 0 | 0 | 0 | 1 | 0.108108 | false | 0 | 0.216216 | 0.054054 | 0.513514 | 0.054054 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
9e2675e55965158f73d12b91841805771d4ef886 | 885 | py | Python | backend/stock/migrations/0024_auto_20210218_2347.py | fengxia41103/stock | 1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1 | [
"MIT"
] | 1 | 2021-09-30T05:25:08.000Z | 2021-09-30T05:25:08.000Z | backend/stock/migrations/0024_auto_20210218_2347.py | fengxia41103/stock | 1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1 | [
"MIT"
] | 8 | 2021-09-30T05:27:09.000Z | 2021-12-03T23:02:24.000Z | backend/stock/migrations/0024_auto_20210218_2347.py | fengxia41103/stock | 1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1 | [
"MIT"
] | 3 | 2021-09-29T05:11:45.000Z | 2021-10-31T07:26:31.000Z | # Generated by Django 3.1.6 on 2021-02-18 23:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stock', '0023_auto_20210216_1552'),
]
operations = [
migrations.RenameField(
model_name='balancesheet',
old_name='ac... | 30.517241 | 195 | 0.586441 | 92 | 885 | 5.532609 | 0.684783 | 0.053045 | 0.098232 | 0.113949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.059561 | 0.279096 | 885 | 28 | 196 | 31.607143 | 0.738245 | 0.050847 | 0 | 0.227273 | 1 | 0 | 0.225537 | 0.027446 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.045455 | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f50c10ba8bd7d0b9c73c258895ffa4546eaf1f1a | 1,370 | py | Python | meta/DesignDataPackage/iFAB/validate/validate.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | meta/DesignDataPackage/iFAB/validate/validate.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | meta/DesignDataPackage/iFAB/validate/validate.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | """
validate.py
Validate XML file against XSD schema using minixsd library.
Matthew Woodruff (mjw5407@arl.psu.edu)
The Pennsylvania State University
Applied Research Laboratory
2012
"""
import argparse
from collections import namedtuple
from minixsv.pyxsval import parseAndValidate
from genxmlif import GenXmlIfError
fro... | 29.148936 | 69 | 0.719708 | 162 | 1,370 | 6.006173 | 0.487654 | 0.049332 | 0.115108 | 0.101747 | 0.206578 | 0.166495 | 0.073998 | 0 | 0 | 0 | 0 | 0.010791 | 0.188321 | 1,370 | 46 | 70 | 29.782609 | 0.864209 | 0.033577 | 0 | 0.1 | 0 | 0 | 0.152155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.033333 | 0.166667 | null | null | 0.033333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f5183fc829b6c1bdb1d34405133e57b5b3c2f373 | 1,793 | py | Python | native_client/src/trusted/validator_ragel/check_dis_section.py | zipated/src | 2b8388091c71e442910a21ada3d97ae8bc1845d3 | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | native_client/src/trusted/validator_ragel/check_dis_section.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | native_client/src/trusted/validator_ragel/check_dis_section.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/python
# Copyright (c) 2013 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import subprocess
import sys
import tempfile
import objdump_parser
import test_format
class RdfaTestRunner(test_forma... | 27.584615 | 77 | 0.65198 | 224 | 1,793 | 5.116071 | 0.633929 | 0.026178 | 0.027923 | 0.036649 | 0.04014 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018868 | 0.231456 | 1,793 | 64 | 78 | 28.015625 | 0.812772 | 0.27942 | 0 | 0.052632 | 0 | 0 | 0.121685 | 0 | 0 | 0 | 0 | 0.015625 | 0.026316 | 1 | 0.078947 | false | 0 | 0.157895 | 0 | 0.315789 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f520b786910f36fa23c36c5a7b73ee176c0bfb91 | 1,548 | py | Python | src/DictionaryVector.py | Dorijan-Cirkveni/AutoSolvingMatrix | 3732d0215c22b9eae450c69ba84e75aecb337b0c | [
"MIT"
] | null | null | null | src/DictionaryVector.py | Dorijan-Cirkveni/AutoSolvingMatrix | 3732d0215c22b9eae450c69ba84e75aecb337b0c | [
"MIT"
] | null | null | null | src/DictionaryVector.py | Dorijan-Cirkveni/AutoSolvingMatrix | 3732d0215c22b9eae450c69ba84e75aecb337b0c | [
"MIT"
] | null | null | null | from src.VectorAbstract import VectorAbstract
class DictionaryVector(VectorAbstract):
def __init__(self, values=None):
if values is None:
values = dict()
self.values: dict = dict()
for e in values:
v = values[e]
if v != 0:
self.values[e] ... | 27.157895 | 63 | 0.544574 | 180 | 1,548 | 4.572222 | 0.283333 | 0.218712 | 0.066829 | 0.036452 | 0.055893 | 0.055893 | 0 | 0 | 0 | 0 | 0 | 0.015795 | 0.345607 | 1,548 | 56 | 64 | 27.642857 | 0.796644 | 0 | 0 | 0.06383 | 0 | 0 | 0.020026 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.12766 | false | 0 | 0.021277 | 0.042553 | 0.340426 | 0.042553 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f52e9a215f45f8d41fd35ea2b9398c0e1f9de4b4 | 335 | py | Python | 4_SC_project/students/urls.py | abdullah1107/Django-for-Begineers | 03b9025607df9a5318d9e3b736fa66d233fdc4de | [
"MIT"
] | null | null | null | 4_SC_project/students/urls.py | abdullah1107/Django-for-Begineers | 03b9025607df9a5318d9e3b736fa66d233fdc4de | [
"MIT"
] | null | null | null | 4_SC_project/students/urls.py | abdullah1107/Django-for-Begineers | 03b9025607df9a5318d9e3b736fa66d233fdc4de | [
"MIT"
] | null | null | null | from django.urls import path,include
from rest_framework import routers
from . import views
from students.views import StudentsView,StudentViewusingID
router = routers.DefaultRouter()
router.register('',views.StudentsView)
urlpatterns = [
#path('<int:pk>/', StudentViewusingID.as_view()),
path('', include(ro... | 22.333333 | 58 | 0.755224 | 38 | 335 | 6.605263 | 0.552632 | 0.087649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.119403 | 335 | 14 | 59 | 23.928571 | 0.850847 | 0.143284 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.444444 | 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 | 1 | 0 | 0 | 0 | 0 | 1 |
f5326f514cbc14ca5acc35e525cd8492cd0799d8 | 637 | py | Python | sources/migrations/0024_rename_owned_by_to_exportable_by.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | null | null | null | sources/migrations/0024_rename_owned_by_to_exportable_by.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | 16 | 2019-05-30T20:55:25.000Z | 2020-06-09T18:52:34.000Z | sources/migrations/0024_rename_owned_by_to_exportable_by.py | industrydive/sourcedive | eb8c4657a6c3182666dc15109bd982a5d5ba1325 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.10 on 2020-02-24 21:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sources', '0023_add_person_owned_by_field_for_dive_relationship'),
]
operations = [
migrations.RemoveField(
model_name='person'... | 27.695652 | 161 | 0.629513 | 73 | 637 | 5.287671 | 0.69863 | 0.036269 | 0.07772 | 0.098446 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042463 | 0.260597 | 637 | 22 | 162 | 28.954545 | 0.77707 | 0.072214 | 0 | 0.25 | 1 | 0 | 0.275042 | 0.088285 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.0625 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f5479c318c6d4997ad58f52d610d3dca2fc9930d | 1,099 | py | Python | tr/trans.py | hegistva/sync-reader | 2eceba5b1fd572b077a039ca20fac5c2da4d8a26 | [
"MIT"
] | null | null | null | tr/trans.py | hegistva/sync-reader | 2eceba5b1fd572b077a039ca20fac5c2da4d8a26 | [
"MIT"
] | null | null | null | tr/trans.py | hegistva/sync-reader | 2eceba5b1fd572b077a039ca20fac5c2da4d8a26 | [
"MIT"
] | null | null | null | from tr.books import book_manager
from tr.libs.trans import book_mapper
from tr.libs.trans import utils
from tr.libs.speech import aligner
book_id = '20000LeaguesUnderTheSea'
book_id = 'AroundTheWorldIn80Days'
# book_manager.downloadBook(book_id)
# book_mapper.mapChapter(utils.Lang.FRA, utils.Lang.ENG, book_id, 1, d... | 31.4 | 97 | 0.731574 | 172 | 1,099 | 4.569767 | 0.319767 | 0.091603 | 0.068702 | 0.101781 | 0.363868 | 0.305344 | 0.302799 | 0.114504 | 0 | 0 | 0 | 0.024211 | 0.135578 | 1,099 | 34 | 98 | 32.323529 | 0.803158 | 0.595086 | 0 | 0 | 0 | 0 | 0.185615 | 0.104408 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.363636 | 0 | 0.363636 | 0.181818 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
f55044e16ad4b2f56a00cf5c300cb5b7b40e4648 | 1,985 | py | Python | touchtechnology/news/templatetags/news.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | touchtechnology/news/templatetags/news.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | 28 | 2016-12-09T21:14:19.000Z | 2022-01-11T07:17:16.000Z | touchtechnology/news/templatetags/news.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | from django.core.paginator import Paginator
from django.template import Library
from django.utils.translation import ugettext_lazy as _
from touchtechnology.news.models import Article, Category
register = Library()
@register.filter("category")
def get_category(slug):
return Category.objects.get(slug=slug)
@reg... | 32.016129 | 72 | 0.66801 | 220 | 1,985 | 5.895455 | 0.331818 | 0.058597 | 0.046261 | 0.080956 | 0.229761 | 0.173477 | 0.173477 | 0.123362 | 0.123362 | 0.123362 | 0 | 0.001309 | 0.230227 | 1,985 | 61 | 73 | 32.540984 | 0.847513 | 0.08262 | 0 | 0.186047 | 0 | 0 | 0.111605 | 0.06663 | 0 | 0 | 0 | 0.016393 | 0 | 1 | 0.093023 | false | 0 | 0.093023 | 0.023256 | 0.27907 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f55ac3f75d4cbf920885da352d135d799ea4071a | 576 | py | Python | Python/strings/long2bin.py | ebouaziz/miscripts | 9520d31adfd8cf63a06d519b0c308f07dd107b90 | [
"MIT"
] | null | null | null | Python/strings/long2bin.py | ebouaziz/miscripts | 9520d31adfd8cf63a06d519b0c308f07dd107b90 | [
"MIT"
] | null | null | null | Python/strings/long2bin.py | ebouaziz/miscripts | 9520d31adfd8cf63a06d519b0c308f07dd107b90 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2.7
# Deal with long integer encoded as binary strings
# sample long integer
l = (2**32-2)*(2**32-3)*(2**32-7)
# input long integer
print "%x" % l
# create a list
ls = []
while l:
# extract each byte of the long integer and store it into the list
bot = l&((1<<8)-1)
l >>= 8
ls.app... | 22.153846 | 70 | 0.623264 | 106 | 576 | 3.386792 | 0.575472 | 0.122563 | 0.027855 | 0.038997 | 0.050139 | 0 | 0 | 0 | 0 | 0 | 0 | 0.050328 | 0.206597 | 576 | 25 | 71 | 23.04 | 0.73523 | 0.5 | 0 | 0 | 0 | 0 | 0.039568 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.181818 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f5727c3a2502e338d29c7168fe24cabe5b396d96 | 524 | py | Python | check_normals.py | panmari/seeing3d | 0a73576c70392276065094c96185e5ef53d6c2c1 | [
"MIT"
] | 56 | 2015-05-28T17:30:30.000Z | 2022-01-25T07:15:40.000Z | check_normals.py | panmari/seeing3d | 0a73576c70392276065094c96185e5ef53d6c2c1 | [
"MIT"
] | 4 | 2015-02-25T17:36:01.000Z | 2019-10-16T07:43:36.000Z | check_normals.py | dimatura/seeing3d | 0a73576c70392276065094c96185e5ef53d6c2c1 | [
"MIT"
] | 14 | 2015-02-20T19:48:14.000Z | 2020-07-10T06:41:12.000Z | #!/usr/bin/env python
"""
see if normals are plausible by looking at their norm.
"""
import sys
import Image
import numpy as np
import matplotlib.pyplot as pl
img_fname = sys.argv[1]
img = Image.open(img_fname)
imgarr = np.array(img).astype(np.float)/255.
print imgarr.shape
imgarr2 = 2.*imgarr - 1.
imgarr3 = (imga... | 16.903226 | 54 | 0.709924 | 84 | 524 | 4.404762 | 0.571429 | 0.043243 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.048565 | 0.135496 | 524 | 30 | 55 | 17.466667 | 0.768212 | 0.103053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.235294 | null | null | 0.117647 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f576a26a8664e3f44c0a75a5c8d48a6b007d7383 | 2,318 | py | Python | authors/apps/comments/models.py | MuhweziDeo/Ah-backend-xmen | 60c830977fa39a7eea9ab978a9ba0c3beb0c4d88 | [
"BSD-3-Clause"
] | 4 | 2019-01-07T09:15:17.000Z | 2020-11-09T09:58:54.000Z | authors/apps/comments/models.py | MuhweziDeo/Ah-backend-xmen | 60c830977fa39a7eea9ab978a9ba0c3beb0c4d88 | [
"BSD-3-Clause"
] | 34 | 2019-01-07T15:30:14.000Z | 2019-03-06T08:23:34.000Z | authors/apps/comments/models.py | MuhweziDeo/Ah-backend-xmen | 60c830977fa39a7eea9ab978a9ba0c3beb0c4d88 | [
"BSD-3-Clause"
] | 10 | 2018-12-18T14:43:52.000Z | 2020-02-07T08:27:50.000Z | from django.dispatch import receiver
from django.db.models.signals import pre_save
from django.db import models
from authors.apps.articles.models import Article
from authors.apps.profiles.models import Profile
from simple_history.models import HistoricalRecords
class Comment(models.Model):
"""
Handles CRUD on ... | 34.597015 | 90 | 0.743745 | 289 | 2,318 | 5.782007 | 0.294118 | 0.076601 | 0.067026 | 0.100539 | 0.485338 | 0.346499 | 0.274686 | 0.212448 | 0.064632 | 0 | 0 | 0.003075 | 0.158326 | 2,318 | 66 | 91 | 35.121212 | 0.853409 | 0.094047 | 0 | 0.139535 | 0 | 0 | 0.035311 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.093023 | false | 0 | 0.139535 | 0.093023 | 0.953488 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
f5773487bd6bc826b41c7b46306d9ab65bcb64af | 2,169 | py | Python | example_tf_loader_def.py | chunish/c- | b677fee91d7f4b06913bc7748388513f6e918d91 | [
"Apache-2.0"
] | null | null | null | example_tf_loader_def.py | chunish/c- | b677fee91d7f4b06913bc7748388513f6e918d91 | [
"Apache-2.0"
] | null | null | null | example_tf_loader_def.py | chunish/c- | b677fee91d7f4b06913bc7748388513f6e918d91 | [
"Apache-2.0"
] | null | null | null | # _*_ coding: utf-8 _*_
import os
import time
import numpy as np
import tensorflow as tf
class loader(object):
def __init__(self, batch_size=1, img_width=0, img_height=0):
self.batch_size = batch_size
self.img_w = img_width
self.img_h = img_height
self.batch_total = 0
def load_... | 32.863636 | 110 | 0.603504 | 295 | 2,169 | 4.145763 | 0.338983 | 0.051513 | 0.042518 | 0.022895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014839 | 0.285385 | 2,169 | 65 | 111 | 33.369231 | 0.774194 | 0.009682 | 0 | 0 | 0 | 0 | 0.030303 | 0.016317 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.078431 | null | null | 0.019608 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f57a1334e264b83de43bd7a6c9393a91e8939d51 | 4,275 | py | Python | streamz_ml/tests/test_stream_estimator.py | remiadon/streamz-ml | 70faa5a520560ad9675b280dc15424438f373b91 | [
"MIT"
] | 7 | 2019-07-26T18:14:54.000Z | 2022-01-26T16:50:59.000Z | streamz_ml/tests/test_stream_estimator.py | remiadon/streamz-ml | 70faa5a520560ad9675b280dc15424438f373b91 | [
"MIT"
] | 5 | 2019-06-17T14:18:39.000Z | 2019-08-18T14:59:34.000Z | streamz_ml/tests/test_stream_estimator.py | remiadon/streamz-ml | 70faa5a520560ad9675b280dc15424438f373b91 | [
"MIT"
] | null | null | null | import pytest
from itertools import product
from streamz_ml import StreamEstimator
import numpy as np
from streamz import Stream
import pandas as pd
from streamz.dataframe import DataFrame, Series
from streamz.utils_test import wait_for, await_for
def test_no_fit_method():
class MyEstimator():
def pred... | 29.895105 | 114 | 0.680702 | 591 | 4,275 | 4.654822 | 0.147208 | 0.008724 | 0.020356 | 0.02181 | 0.469284 | 0.433297 | 0.384587 | 0.322065 | 0.322065 | 0.322065 | 0 | 0.008472 | 0.199298 | 4,275 | 143 | 115 | 29.895105 | 0.795209 | 0 | 0 | 0.31068 | 0 | 0 | 0.012395 | 0 | 0 | 0 | 0 | 0 | 0.009709 | 1 | 0.165049 | false | 0.067961 | 0.07767 | 0.029126 | 0.368932 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
f57a650a6b828e708cbc194b79748973012ce494 | 238 | py | Python | tests/test_geckodriver.py | ramonmedeiros/geckodriver-binary | bb88834e47be6e545770c268a0be04992df24a67 | [
"MIT"
] | null | null | null | tests/test_geckodriver.py | ramonmedeiros/geckodriver-binary | bb88834e47be6e545770c268a0be04992df24a67 | [
"MIT"
] | null | null | null | tests/test_geckodriver.py | ramonmedeiros/geckodriver-binary | bb88834e47be6e545770c268a0be04992df24a67 | [
"MIT"
] | null | null | null | from selenium import webdriver
import geckodriver_binary # Adds geckodriver binary to path
def test_driver():
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.titl
driver.quit()
| 26.444444 | 60 | 0.726891 | 31 | 238 | 5.516129 | 0.709677 | 0.19883 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.172269 | 238 | 8 | 61 | 29.75 | 0.86802 | 0.130252 | 0 | 0 | 0 | 0 | 0.131707 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 1 | 0.142857 | false | 0 | 0.285714 | 0 | 0.428571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f57e15235f540c41bae90e3655b6b91fe07ee805 | 1,089 | py | Python | bapsflib/utils/exceptions.py | BaPSF/bapsflib | 999c88f813d3a7c5c244a77873850c5c5a4042b8 | [
"BSD-3-Clause"
] | 11 | 2018-07-05T21:37:52.000Z | 2022-01-05T00:41:52.000Z | bapsflib/utils/exceptions.py | BaPSF/bapsflib | 999c88f813d3a7c5c244a77873850c5c5a4042b8 | [
"BSD-3-Clause"
] | 54 | 2018-08-19T00:28:52.000Z | 2022-03-22T17:16:22.000Z | bapsflib/utils/exceptions.py | rocco8773/bapsflib | 999c88f813d3a7c5c244a77873850c5c5a4042b8 | [
"BSD-3-Clause"
] | 9 | 2018-08-18T00:16:07.000Z | 2022-03-18T00:06:33.000Z | # This file is part of the bapsflib package, a Python toolkit for the
# BaPSF group at UCLA.
#
# http://plasma.physics.ucla.edu/
#
# Copyright 2017-2018 Erik T. Everson and contributors
#
# License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full
# license terms and contributor agreement.
#
"""Exceptions s... | 21.78 | 69 | 0.699725 | 121 | 1,089 | 6.181818 | 0.553719 | 0.080214 | 0.120321 | 0.147059 | 0.330214 | 0.237968 | 0.237968 | 0.237968 | 0.237968 | 0.163102 | 0 | 0.015748 | 0.183655 | 1,089 | 49 | 70 | 22.22449 | 0.825647 | 0.48944 | 0 | 0.222222 | 0 | 0 | 0.22093 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0.222222 | 0 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
f5864e326e4eb2e957cdaeda5cd971919dfdf25a | 3,730 | py | Python | study_sample/enchance_oop/use_type/enhance_oop_type.py | dantefung/Python-Codebase | 7e154100a1016ad79ec5d6adc7c11f096ec1966b | [
"MIT"
] | null | null | null | study_sample/enchance_oop/use_type/enhance_oop_type.py | dantefung/Python-Codebase | 7e154100a1016ad79ec5d6adc7c11f096ec1966b | [
"MIT"
] | 5 | 2021-04-30T21:18:36.000Z | 2022-03-12T00:55:18.000Z | study_sample/enchance_oop/use_type/enhance_oop_type.py | dantefung/Python-Codebase | 7e154100a1016ad79ec5d6adc7c11f096ec1966b | [
"MIT"
] | null | null | null | ############
# use_type
############
# type()
'''
动态语言和静态语言最大的不同,就是函数和类的定义,【不是编译时定义的,而是运行时动态创建的。】
'''
# 比方说我们要定义一个Hello的class,就写一个hello.py模块:
'''
class Hello(object):
def hello(self, name='world'):
print('Hello, %s.' % name)
'''
# 当Python解释器载入hello模块时,就会依次执行该模块的所有语句,执行结果就是动态创建出一个
# Hello的class对象,测试如下:
fro... | 20.837989 | 119 | 0.745845 | 367 | 3,730 | 7.438692 | 0.607629 | 0.020513 | 0.012088 | 0.016484 | 0.032967 | 0.018315 | 0 | 0 | 0 | 0 | 0 | 0.005999 | 0.106166 | 3,730 | 178 | 120 | 20.955056 | 0.812837 | 0.068633 | 0 | 0.068966 | 0 | 0 | 0.050686 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.206897 | false | 0.034483 | 0.034483 | 0.034483 | 0.482759 | 0.137931 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
f586f00cf04850e5b275f0f300b227b3bac49030 | 331 | py | Python | src/dataloader/transforms.py | Rahul-fix/stereo-depth | b3722644ffe6268968bada1681cb2b6f4cd44a3b | [
"MIT"
] | null | null | null | src/dataloader/transforms.py | Rahul-fix/stereo-depth | b3722644ffe6268968bada1681cb2b6f4cd44a3b | [
"MIT"
] | null | null | null | src/dataloader/transforms.py | Rahul-fix/stereo-depth | b3722644ffe6268968bada1681cb2b6f4cd44a3b | [
"MIT"
] | null | null | null | import torch
from torchvision.transforms import Compose,Normalize,RandomCrop,RandomResizedCrop,Resize,RandomHorizontalFlip, ToTensor
from torchvision import transforms
def get_transforms():
normalize = Normalize(mean=[0.485, 0.456, 0.406],std=[0.229, 0.224, 0.225])
transform = Compose([normalize])
return ... | 30.090909 | 119 | 0.773414 | 41 | 331 | 6.219512 | 0.609756 | 0.117647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082474 | 0.120846 | 331 | 10 | 120 | 33.1 | 0.793814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.428571 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
f59bf0df64d86345d341b9174f8e3c47b8b97fac | 1,018 | py | Python | api/serializers.py | V-Holodov/pets_accounting | 300cb8748124b6f767e85404ee372b93b097098c | [
"MIT"
] | null | null | null | api/serializers.py | V-Holodov/pets_accounting | 300cb8748124b6f767e85404ee372b93b097098c | [
"MIT"
] | 1 | 2021-12-22T14:08:37.000Z | 2021-12-22T14:08:37.000Z | api/serializers.py | V-Holodov/pets_accounting | 300cb8748124b6f767e85404ee372b93b097098c | [
"MIT"
] | 1 | 2021-12-24T11:50:26.000Z | 2021-12-24T11:50:26.000Z | from rest_framework import serializers
from api.models import Pet, PetPhoto
class PetPhotoSerializer(serializers.ModelSerializer):
"""Serialization of pet photos."""
url = serializers.ImageField(source="photo")
class Meta:
model = PetPhoto
fields = ("id", "url")
def to_internal_val... | 23.674419 | 70 | 0.685658 | 106 | 1,018 | 6.481132 | 0.556604 | 0.075691 | 0.040757 | 0.110626 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001222 | 0.196464 | 1,018 | 42 | 71 | 24.238095 | 0.838631 | 0.115914 | 0 | 0.095238 | 0 | 0 | 0.048919 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047619 | false | 0 | 0.095238 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
f5a7fd7b4852a3cca6d9828d7e79a768241d7bc2 | 8,083 | py | Python | tests/test_series/__init__.py | smok-serwis/firanka | 88398491c9bfa10ac26c195dc1fbff8672002aca | [
"MIT"
] | null | null | null | tests/test_series/__init__.py | smok-serwis/firanka | 88398491c9bfa10ac26c195dc1fbff8672002aca | [
"MIT"
] | 5 | 2017-12-09T07:32:52.000Z | 2017-12-10T02:11:00.000Z | tests/test_series/__init__.py | smok-serwis/firanka | 88398491c9bfa10ac26c195dc1fbff8672002aca | [
"MIT"
] | null | null | null | import math
import unittest
from firanka.exceptions import NotInDomainError, DomainError
from firanka.intervals import Interval
from firanka.series import DiscreteSeries, FunctionSeries, ModuloSeries, \
LinearInterpolationSeries, Series
from .common import NOOP, HUGE_IDENTITY
class TestBase(unittest.TestCase):
... | 35.60793 | 90 | 0.548806 | 1,060 | 8,083 | 4.143396 | 0.10566 | 0.129781 | 0.013661 | 0.016393 | 0.596311 | 0.513206 | 0.493625 | 0.439435 | 0.356102 | 0.28643 | 0 | 0.068092 | 0.276877 | 8,083 | 226 | 91 | 35.765487 | 0.683319 | 0.005691 | 0 | 0.304878 | 0 | 0 | 0.023273 | 0 | 0 | 0 | 0 | 0 | 0.408537 | 1 | 0.152439 | false | 0 | 0.036585 | 0.006098 | 0.22561 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
1918139e1a73efa7274e8c894e1e27f89d287d70 | 339 | py | Python | suministrospr/utils/models.py | amberlowh/suministrospr | 4e9494dfc31f6feabc2710d04754bfa8678f54af | [
"Apache-2.0"
] | 42 | 2020-01-13T22:13:56.000Z | 2021-09-05T14:33:11.000Z | suministrospr/utils/models.py | amberlowh/suministrospr | 4e9494dfc31f6feabc2710d04754bfa8678f54af | [
"Apache-2.0"
] | 108 | 2020-01-13T22:19:32.000Z | 2021-03-13T18:23:03.000Z | suministrospr/utils/models.py | amberlowh/suministrospr | 4e9494dfc31f6feabc2710d04754bfa8678f54af | [
"Apache-2.0"
] | 19 | 2020-01-14T16:36:47.000Z | 2020-12-30T07:54:52.000Z | from django.db import models
from .fields import DateTimeCreatedField, DateTimeModifiedField
class BaseModel(models.Model):
created_at = DateTimeCreatedField()
modified_at = DateTimeModifiedField()
class Meta:
get_latest_by = "modified_at"
ordering = ("-modified_at", "-created_at")
... | 24.214286 | 63 | 0.713864 | 34 | 339 | 6.911765 | 0.617647 | 0.12766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.20354 | 339 | 13 | 64 | 26.076923 | 0.87037 | 0 | 0 | 0 | 0 | 0 | 0.100295 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.222222 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
19196dd38c46eb063ed8536fab36ba94780287f2 | 1,067 | py | Python | reseaut/apps/profiles/serializers.py | koladev32/Beta | 30a889f0e62dbb2bf518c1bba78ecc3913783ba6 | [
"Apache-2.0"
] | null | null | null | reseaut/apps/profiles/serializers.py | koladev32/Beta | 30a889f0e62dbb2bf518c1bba78ecc3913783ba6 | [
"Apache-2.0"
] | 3 | 2021-10-06T05:49:36.000Z | 2022-02-18T12:57:20.000Z | reseaut/apps/profiles/serializers.py | koladev32/Beta | 30a889f0e62dbb2bf518c1bba78ecc3913783ba6 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from .models import Profile
class ProfileSerializer(serializers.ModelSerializer):
last_name = serializers.CharField(source='user.last_name')
bio = serializers.CharField(allow_blank=True,required=False)
#work_domain = serializers.CharField(max_length=50)
image = se... | 31.382353 | 72 | 0.667291 | 116 | 1,067 | 6.008621 | 0.482759 | 0.045911 | 0.031564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015951 | 0.236176 | 1,067 | 34 | 73 | 31.382353 | 0.839264 | 0.060918 | 0 | 0.083333 | 0 | 0 | 0.108891 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.083333 | 0 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
1920941ead45150ececbc67aee827cbead09e079 | 1,160 | py | Python | applepushnotification/tests/test_basic.py | xiaohaifxb/applepushnotification | 43ebe5963fa9c48990dd57f6aaba6056a1e7470f | [
"BSD-3-Clause"
] | 7 | 2015-03-08T06:14:18.000Z | 2021-09-15T17:07:46.000Z | applepushnotification/tests/test_basic.py | xiaohaifxb/applepushnotification | 43ebe5963fa9c48990dd57f6aaba6056a1e7470f | [
"BSD-3-Clause"
] | null | null | null | applepushnotification/tests/test_basic.py | xiaohaifxb/applepushnotification | 43ebe5963fa9c48990dd57f6aaba6056a1e7470f | [
"BSD-3-Clause"
] | 3 | 2015-10-17T13:11:41.000Z | 2021-09-15T17:07:47.000Z | #!/usr/bin/env python
from applepushnotification import *
from unittest import TestCase
from applepushnotification.tests import TestAPNS
import struct, time
try:
import json
except ImportError, e:
import simplejson as json
class TestBasic(TestAPNS):
def test_construct_service(self):
service = self... | 29.74359 | 72 | 0.663793 | 133 | 1,160 | 5.669173 | 0.43609 | 0.092838 | 0.083554 | 0.055703 | 0.124668 | 0.124668 | 0.124668 | 0.124668 | 0 | 0 | 0 | 0.00905 | 0.237931 | 1,160 | 38 | 73 | 30.526316 | 0.843891 | 0.017241 | 0 | 0.125 | 0 | 0 | 0.007024 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0 | null | null | 0 | 0.21875 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
192b354de8f26b0be0abd4c5400151c7d38f4f2a | 5,484 | py | Python | config.py | Pandinosaurus/pnn.pytorch | 12fdc44cb48b3f391f947230b29156cd30363067 | [
"MIT"
] | 1 | 2018-12-05T06:42:51.000Z | 2018-12-05T06:42:51.000Z | config.py | Pandinosaurus/pnn.pytorch | 12fdc44cb48b3f391f947230b29156cd30363067 | [
"MIT"
] | null | null | null | config.py | Pandinosaurus/pnn.pytorch | 12fdc44cb48b3f391f947230b29156cd30363067 | [
"MIT"
] | null | null | null | # config.py
import os
import datetime
import argparse
result_path = "results/"
result_path = os.path.join(result_path, datetime.datetime.now().strftime('%Y-%m-%d_%H-%M-%S/'))
parser = argparse.ArgumentParser(description='Your project title goes here')
# ======================== Data Setings =========================... | 85.6875 | 138 | 0.700766 | 738 | 5,484 | 5.134146 | 0.227642 | 0.106888 | 0.2019 | 0.098707 | 0.420164 | 0.385062 | 0.271048 | 0.232515 | 0.10029 | 0.069675 | 0 | 0.010691 | 0.078957 | 5,484 | 64 | 139 | 85.6875 | 0.739458 | 0.062181 | 0 | 0 | 0 | 0 | 0.350915 | 0.020825 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.057692 | 0 | 0.057692 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
192c9ff8bad6539d96f620da3be71727d663de8f | 600 | py | Python | exercicios/exercicio087.py | Helton-Rubens/Python-3 | eb6d5ee71bcb2a2a80de4eaea942bd0c41d846b7 | [
"MIT"
] | null | null | null | exercicios/exercicio087.py | Helton-Rubens/Python-3 | eb6d5ee71bcb2a2a80de4eaea942bd0c41d846b7 | [
"MIT"
] | null | null | null | exercicios/exercicio087.py | Helton-Rubens/Python-3 | eb6d5ee71bcb2a2a80de4eaea942bd0c41d846b7 | [
"MIT"
] | null | null | null | matriz = [[], [], []]
par = 0
somatre = 0
for c in range(0, 3):
for i in range(0, 3):
matriz[c].append(int(input(f'Digite um valor para a posição [{c}/{i}]: ')))
if matriz[c][i] % 2 == 0:
par += matriz[c][i]
somatre = somatre + matriz[c][2]
print('=+'*28)
for c in range(0, 3):
pr... | 30 | 83 | 0.543333 | 104 | 600 | 3.134615 | 0.394231 | 0.107362 | 0.09816 | 0.110429 | 0.319018 | 0.288344 | 0 | 0 | 0 | 0 | 0 | 0.041304 | 0.233333 | 600 | 19 | 84 | 31.578947 | 0.667391 | 0 | 0 | 0.210526 | 0 | 0 | 0.328333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.421053 | 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 | 1 | 0 | 1 |
192d311eb4f7947a7c0e19e7aeb52ab995378078 | 5,191 | py | Python | src/contrail/vncNetwork.py | madhukar32/contrail-hybrid-cloud | aeabf419215d407245dd914f5957f15e42b2dfe4 | [
"Apache-2.0"
] | null | null | null | src/contrail/vncNetwork.py | madhukar32/contrail-hybrid-cloud | aeabf419215d407245dd914f5957f15e42b2dfe4 | [
"Apache-2.0"
] | null | null | null | src/contrail/vncNetwork.py | madhukar32/contrail-hybrid-cloud | aeabf419215d407245dd914f5957f15e42b2dfe4 | [
"Apache-2.0"
] | null | null | null | from vnc_api import vnc_api
from contrail.util import (readTenant, readNetwork)
from hybridLogger import hybridLogger
from exception import *
import uuid
class vncNetwork(hybridLogger):
def __init__(self, vnc, domain, tenantName ,logLevel='INFO'):
self.log = super(vncNetwork, self).log(level=logLevel... | 34.838926 | 128 | 0.610094 | 471 | 5,191 | 6.600849 | 0.282378 | 0.023159 | 0.02734 | 0.028948 | 0.138308 | 0.126086 | 0.099067 | 0.081055 | 0.081055 | 0.081055 | 0 | 0.001957 | 0.310923 | 5,191 | 148 | 129 | 35.074324 | 0.867207 | 0 | 0 | 0.27027 | 0 | 0 | 0.085758 | 0.004432 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.045045 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
193096b54701e30136eeb941a8bfefa14c97cc6e | 5,307 | py | Python | synapse/dispatcher.py | mrmuxl/synapse-agent | 615ccc8faefa0f7d66d070a7444fe57e67e3bae1 | [
"MIT"
] | 1 | 2016-06-23T05:56:53.000Z | 2016-06-23T05:56:53.000Z | synapse/dispatcher.py | mrmuxl/synapse-agent | 615ccc8faefa0f7d66d070a7444fe57e67e3bae1 | [
"MIT"
] | null | null | null | synapse/dispatcher.py | mrmuxl/synapse-agent | 615ccc8faefa0f7d66d070a7444fe57e67e3bae1 | [
"MIT"
] | null | null | null | import sys
import time
import signal
import socket
from Queue import Queue
from synapse.scheduler import SynSched
from synapse.amqp import AmqpSynapse, AmqpAdmin, AmqpError
from synapse.config import config
from synapse.controller import Controller
from synapse.logger import logger
from synapse.synapse_exceptions imp... | 33.377358 | 78 | 0.559261 | 508 | 5,307 | 5.767717 | 0.269685 | 0.037543 | 0.035836 | 0.052901 | 0.20273 | 0.14744 | 0.132423 | 0.08942 | 0.08942 | 0.08942 | 0 | 0 | 0.367251 | 5,307 | 158 | 79 | 33.588608 | 0.872543 | 0.058979 | 0 | 0.28972 | 0 | 0 | 0.043528 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.009346 | 0.11215 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
193da906a0a990c19b38ec3752ac45d6c57e1d89 | 1,205 | py | Python | light_draft/views.py | zerc/django-light-draft | 9b6da59deb48c7ea9a01831e0b346e6d232158ce | [
"MIT"
] | 8 | 2015-08-15T02:17:54.000Z | 2021-08-03T23:48:35.000Z | light_draft/views.py | zerc/django-light-draft | 9b6da59deb48c7ea9a01831e0b346e6d232158ce | [
"MIT"
] | 14 | 2015-06-13T20:34:29.000Z | 2021-06-10T17:24:14.000Z | light_draft/views.py | zerc/django-light-draft | 9b6da59deb48c7ea9a01831e0b346e6d232158ce | [
"MIT"
] | 3 | 2017-01-26T23:58:45.000Z | 2020-10-27T15:54:14.000Z | # coding: utf-8
from __future__ import unicode_literals
from django.http import Http404
from django.views.generic.detail import DetailView
from .utils import load_from_shapshot
from .exceptions import DraftError
class BaseDraftView(DetailView):
"""
View for loading data from model `snapshot`
"""
def... | 30.897436 | 78 | 0.643983 | 140 | 1,205 | 5.328571 | 0.421429 | 0.053619 | 0.088472 | 0.100536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010022 | 0.254772 | 1,205 | 38 | 79 | 31.710526 | 0.820713 | 0.048133 | 0 | 0.076923 | 0 | 0 | 0.064545 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.115385 | false | 0 | 0.192308 | 0 | 0.538462 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
193f7ff08a93ee6a0593a93e88cdf9d87c0b3569 | 7,781 | py | Python | tests/converter/test_url2netloc.py | Centaurioun/PyFunceble | 59b809f3322118f7824195752c6015220738d4a0 | [
"Apache-2.0"
] | 213 | 2017-11-19T16:00:29.000Z | 2022-03-30T20:51:35.000Z | tests/converter/test_url2netloc.py | Centaurioun/PyFunceble | 59b809f3322118f7824195752c6015220738d4a0 | [
"Apache-2.0"
] | 270 | 2018-01-10T12:42:41.000Z | 2022-03-22T00:03:23.000Z | tests/converter/test_url2netloc.py | Centaurioun/PyFunceble | 59b809f3322118f7824195752c6015220738d4a0 | [
"Apache-2.0"
] | 48 | 2017-12-09T22:53:49.000Z | 2022-01-29T15:50:52.000Z | """
The tool to check the availability or syntax of domain, IP or URL.
::
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ █... | 30.513725 | 88 | 0.608919 | 983 | 7,781 | 5.087487 | 0.205493 | 0.067586 | 0.038992 | 0.041592 | 0.65067 | 0.637872 | 0.617876 | 0.617876 | 0.617876 | 0.610078 | 0 | 0.007132 | 0.261149 | 7,781 | 254 | 89 | 30.633858 | 0.794747 | 0.421411 | 0 | 0.512195 | 0 | 0 | 0.124814 | 0.052854 | 0 | 0 | 0 | 0 | 0.158537 | 1 | 0.182927 | false | 0 | 0.036585 | 0 | 0.231707 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
194040506cd92fb80b481514bc0ef22307074c67 | 975 | py | Python | ex02-odd_or_even.py | lew18/practicepython.org-mysolutions | 99f70c2663f8a23355e04cc2502736f233661bc9 | [
"MIT"
] | null | null | null | ex02-odd_or_even.py | lew18/practicepython.org-mysolutions | 99f70c2663f8a23355e04cc2502736f233661bc9 | [
"MIT"
] | null | null | null | ex02-odd_or_even.py | lew18/practicepython.org-mysolutions | 99f70c2663f8a23355e04cc2502736f233661bc9 | [
"MIT"
] | null | null | null | """
https://www.practicepython.org
Exercise 2: Odd or Even
1 chile
Ask the user for a number. Depending on whether the number is even or odd,
print out an appropriate message to the user.
Hint: how does an even / odd number react differently when divided by 2?
Extras:
1. If the number is a multiple of 4, print out a ... | 30.46875 | 74 | 0.678974 | 164 | 975 | 4.036585 | 0.414634 | 0.060423 | 0.063444 | 0.072508 | 0.123867 | 0.072508 | 0 | 0 | 0 | 0 | 0 | 0.014194 | 0.205128 | 975 | 31 | 75 | 31.451613 | 0.84 | 0.562051 | 0 | 0.166667 | 0 | 0 | 0.318182 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.416667 | 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 | 1 | 0 | 1 |
1942bcdff2f63b986bb10641694baf042ab674b4 | 413 | py | Python | 2020-04-10/test_log.py | feieryouyiji/learningpy | e110ec72ec3e4246b5195028776cdbaa22d25678 | [
"MIT"
] | null | null | null | 2020-04-10/test_log.py | feieryouyiji/learningpy | e110ec72ec3e4246b5195028776cdbaa22d25678 | [
"MIT"
] | null | null | null | 2020-04-10/test_log.py | feieryouyiji/learningpy | e110ec72ec3e4246b5195028776cdbaa22d25678 | [
"MIT"
] | null | null | null | # # err_logging.py
# import logging
# def foo(s):
# return 10 / int(s)
# def bar(s):
# return foo(s) * 2
# def main():
# try:
# bar('0')
# except Exception as e:
# print("----出错了")
# logging.exception(e)
class FooError(ValueError):
pass
def foo(s):
n = int(s)
if n == ... | 12.90625 | 47 | 0.510896 | 59 | 413 | 3.559322 | 0.525424 | 0.057143 | 0.066667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02807 | 0.309927 | 413 | 31 | 48 | 13.322581 | 0.708772 | 0.506053 | 0 | 0 | 0 | 0 | 0.111111 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0.111111 | 0 | 0 | 0.333333 | 0.111111 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
194a5b07496279a3cca8f02ca2adad6163567e00 | 1,681 | py | Python | RhyAn/decomposer/medianNMF.py | kaveenr/rhyan | 5d603023e0fafa11079f3bbd3a48c9cbe8babb8f | [
"Apache-2.0"
] | null | null | null | RhyAn/decomposer/medianNMF.py | kaveenr/rhyan | 5d603023e0fafa11079f3bbd3a48c9cbe8babb8f | [
"Apache-2.0"
] | null | null | null | RhyAn/decomposer/medianNMF.py | kaveenr/rhyan | 5d603023e0fafa11079f3bbd3a48c9cbe8babb8f | [
"Apache-2.0"
] | 2 | 2019-11-04T05:59:07.000Z | 2020-09-21T20:25:46.000Z | import numpy as np
import scipy.signal as sp
import scipy.spatial.distance as sp_dist
import librosa
class MedianNMF:
y, sr = None,None
n_components = None
def __init__(self,y,sr,n_components = 5):
self.y, self.sr = y,sr
self.n_components = n_components
def decompose(self):
... | 33.62 | 88 | 0.66508 | 213 | 1,681 | 5.126761 | 0.399061 | 0.070513 | 0.027473 | 0.025641 | 0.038462 | 0.038462 | 0.038462 | 0 | 0 | 0 | 0 | 0.005573 | 0.252826 | 1,681 | 49 | 89 | 34.306122 | 0.863854 | 0.179655 | 0 | 0.066667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.133333 | 0.066667 | 0.566667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
19512f7c9840fefc26c0b2ca7297f9475a860e23 | 1,994 | py | Python | python/submit_jobstream_byid.py | WorkloadAutomation/TWSzOS_REST_API_Python_samples | da332ce2e19b189a8d2a20901a55ed1a3310a47b | [
"Apache-2.0"
] | 2 | 2021-02-02T09:15:31.000Z | 2021-02-02T09:15:33.000Z | python/submit_jobstream_byid.py | WorkloadAutomation/TWSzOS_REST_API_Python_samples | da332ce2e19b189a8d2a20901a55ed1a3310a47b | [
"Apache-2.0"
] | 2 | 2019-05-03T15:51:33.000Z | 2019-05-05T16:44:26.000Z | python/submit_jobstream_byid.py | WorkloadAutomation/TWSzOS_REST_API_Python_samples | da332ce2e19b189a8d2a20901a55ed1a3310a47b | [
"Apache-2.0"
] | 1 | 2019-05-03T15:38:35.000Z | 2019-05-03T15:38:35.000Z | #!/usr/bin/python
#############################################################################
# Licensed Materials - Property of HCL*
# (C) Copyright HCL Technologies Ltd. 2017, 2018 All rights reserved.
# * Trademark of HCL Technologies Limited
#######################################################################... | 33.79661 | 140 | 0.495486 | 199 | 1,994 | 4.929648 | 0.527638 | 0.036697 | 0.034659 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007279 | 0.104313 | 1,994 | 58 | 141 | 34.37931 | 0.541993 | 0.384152 | 0 | 0.083333 | 0 | 0 | 0.359508 | 0.072848 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.125 | null | null | 0.166667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
1956731d142292c1719a8d66a34399605dcec423 | 1,464 | py | Python | nemo_benchmark.py | KaySackey/Nemo | 3619d7b1a78ca85fcbd797c714e71811d11b892a | [
"BSD-2-Clause"
] | 9 | 2016-03-01T22:15:59.000Z | 2019-02-19T02:09:54.000Z | nemo_benchmark.py | KaySackey/Nemo | 3619d7b1a78ca85fcbd797c714e71811d11b892a | [
"BSD-2-Clause"
] | 1 | 2017-05-19T19:23:28.000Z | 2017-05-19T19:23:28.000Z | nemo_benchmark.py | KaySackey/Nemo | 3619d7b1a78ca85fcbd797c714e71811d11b892a | [
"BSD-2-Clause"
] | 2 | 2016-09-07T15:19:15.000Z | 2018-11-20T23:15:13.000Z | import sys
import timeit
from nemo.parser import NemoParser
from mako.template import Template
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
print 'A filename is required'
exit()
def nemo(str, debug=False):
NemoParser(debug=debug).parse(str)
# Return Nothing so mako won't render a result
... | 31.826087 | 98 | 0.69194 | 208 | 1,464 | 4.639423 | 0.240385 | 0.068394 | 0.074611 | 0.05285 | 0.515026 | 0.303627 | 0.179275 | 0.125389 | 0.089119 | 0.089119 | 0 | 0.023431 | 0.183743 | 1,464 | 45 | 99 | 32.533333 | 0.7841 | 0.030055 | 0 | 0.171429 | 0 | 0 | 0.216502 | 0.01763 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.114286 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.