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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6002ace185388c888ba705ff8de6efa12833e498 | 5,226 | py | Python | pylibcontainer/image.py | joaompinto/pylibcontainer | 794f12e7511dc2452521bad040a7873eff40f50b | [
"Apache-2.0"
] | 7 | 2018-05-14T14:35:29.000Z | 2020-12-04T11:26:19.000Z | pylibcontainer/image.py | joaompinto/pylibcontainer | 794f12e7511dc2452521bad040a7873eff40f50b | [
"Apache-2.0"
] | 8 | 2018-05-16T17:52:09.000Z | 2019-05-26T15:54:45.000Z | pylibcontainer/image.py | joaompinto/pylibcontainer | 794f12e7511dc2452521bad040a7873eff40f50b | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os
import shutil
import hashlib
import requests
import click
from tempfile import NamedTemporaryFile
from hashlib import sha256
from os.path import expanduser, join, exists, basename
from .utils import HumanSize
from .tar import extract_layer
from . import trust
from . impor... | 36.291667 | 88 | 0.670876 | 694 | 5,226 | 4.815562 | 0.268012 | 0.045482 | 0.021544 | 0.008079 | 0.109216 | 0.091562 | 0.063435 | 0.063435 | 0.041891 | 0.041891 | 0 | 0.015559 | 0.22522 | 5,226 | 143 | 89 | 36.545455 | 0.80983 | 0.044967 | 0 | 0.077586 | 0 | 0 | 0.116307 | 0.004473 | 0 | 0 | 0 | 0 | 0 | 1 | 0.043103 | false | 0 | 0.163793 | 0 | 0.267241 | 0.146552 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
600533785dbd02d51d6674d42a21d63ffcb7660b | 16,243 | py | Python | experiments/solve_different_methods.py | vishalbelsare/ags_nlp_solver | 3558e8aae5507285d0c5e74f163c01d09a9cb805 | [
"MIT"
] | 8 | 2018-10-23T11:19:26.000Z | 2022-01-10T19:18:45.000Z | experiments/solve_different_methods.py | sovrasov/Algorithm-of-Global-Search | 3558e8aae5507285d0c5e74f163c01d09a9cb805 | [
"MIT"
] | null | null | null | experiments/solve_different_methods.py | sovrasov/Algorithm-of-Global-Search | 3558e8aae5507285d0c5e74f163c01d09a9cb805 | [
"MIT"
] | 2 | 2018-10-07T20:02:40.000Z | 2018-10-23T11:19:29.000Z | import functools
import numpy as np
import math
import argparse
import ags_solver
import go_problems
import nlopt
import sys
from Simple import SimpleTuner
import itertools
from scipy.spatial import Delaunay
from scipy.optimize import differential_evolution
from scipy.optimize import basinhopping
from sdaopt import sda... | 38.490521 | 134 | 0.623284 | 2,053 | 16,243 | 4.772041 | 0.18753 | 0.026335 | 0.035827 | 0.016842 | 0.434521 | 0.336838 | 0.308462 | 0.302644 | 0.257324 | 0.250281 | 0 | 0.028512 | 0.261528 | 16,243 | 421 | 135 | 38.581948 | 0.788245 | 0.026904 | 0 | 0.433702 | 0 | 0 | 0.066485 | 0 | 0 | 0 | 0 | 0 | 0.002762 | 1 | 0.082873 | false | 0 | 0.063536 | 0 | 0.240331 | 0.013812 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6006beb0722b92f412b4c3f2503f64cd54b33641 | 8,288 | py | Python | src/py/fc.py | mattyschell/geodatabase-toiler | c8231999c3156bf41f9b80f151085afa97ba8586 | [
"CC0-1.0"
] | null | null | null | src/py/fc.py | mattyschell/geodatabase-toiler | c8231999c3156bf41f9b80f151085afa97ba8586 | [
"CC0-1.0"
] | 4 | 2021-04-05T16:03:30.000Z | 2022-03-02T21:28:06.000Z | src/py/fc.py | mattyschell/geodatabase-toiler | c8231999c3156bf41f9b80f151085afa97ba8586 | [
"CC0-1.0"
] | null | null | null | import arcpy
import logging
import pathlib
import subprocess
import gdb
import cx_sde
class Fc(object):
def __init__(self
,gdb
,name):
# gdb object
self.gdb = gdb
# ex BUILDING
self.name = name.upper()
# esri tools usually expect this C:/s... | 39.279621 | 132 | 0.532939 | 827 | 8,288 | 5.286578 | 0.38815 | 0.058554 | 0.047575 | 0.02333 | 0.138152 | 0.129231 | 0.119854 | 0.119854 | 0.096523 | 0.096523 | 0 | 0.015475 | 0.384049 | 8,288 | 210 | 133 | 39.466667 | 0.84094 | 0.330719 | 0 | 0.11 | 0 | 0 | 0.07968 | 0.004366 | 0 | 0 | 0 | 0.004762 | 0 | 1 | 0.14 | false | 0 | 0.06 | 0.03 | 0.33 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60072f56e1c7453c15f0f4342de268f2dd1b42f7 | 640 | py | Python | Machine learning book/3 - MultiLayer Perceptron/test_regression.py | dalmia/Lisa-Lab-Tutorials | ee1b0b4fcb82914085420bb289ebda09f248c8d1 | [
"MIT"
] | 25 | 2017-01-14T08:17:23.000Z | 2022-02-26T13:53:17.000Z | Machine learning book/3 - MultiLayer Perceptron/test_regression.py | dalmia/Lisa-Lab-Tutorials | ee1b0b4fcb82914085420bb289ebda09f248c8d1 | [
"MIT"
] | 1 | 2020-06-20T02:49:16.000Z | 2020-06-20T02:49:16.000Z | Machine learning book/3 - MultiLayer Perceptron/test_regression.py | dalmia/Lisa-Lab-Tutorials | ee1b0b4fcb82914085420bb289ebda09f248c8d1 | [
"MIT"
] | 6 | 2017-08-24T08:40:41.000Z | 2020-03-17T00:01:56.000Z | from numpy import *
import numpy as np
import matplotlib.pyplot as plt
from mlp import mlp
x = ones((1, 40)) * linspace(0, 1, 40)
t = sin(2 * pi * x) + cos(2 * pi * x) + np.random.randn(40) * 0.2
x = transpose(x)
t = transpose(t)
n_hidden = 3
eta = 0.25
n_iterations = 101
plt.plot(x, t, '.')
plt.show()
train = x[0:... | 21.333333 | 77 | 0.65 | 116 | 640 | 3.474138 | 0.387931 | 0.119107 | 0.126551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.06015 | 0.16875 | 640 | 29 | 78 | 22.068966 | 0.697368 | 0 | 0 | 0 | 0 | 0 | 0.010938 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.181818 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6009cc193c9712b5bd11ff6e9909ef949c64bd53 | 12,219 | py | Python | sdk/python/tekton_pipeline/models/v1beta1_embedded_task.py | jmcshane/experimental | 3c47c7e87bcdadc6172941169f3f24fc3f159ae0 | [
"Apache-2.0"
] | null | null | null | sdk/python/tekton_pipeline/models/v1beta1_embedded_task.py | jmcshane/experimental | 3c47c7e87bcdadc6172941169f3f24fc3f159ae0 | [
"Apache-2.0"
] | null | null | null | sdk/python/tekton_pipeline/models/v1beta1_embedded_task.py | jmcshane/experimental | 3c47c7e87bcdadc6172941169f3f24fc3f159ae0 | [
"Apache-2.0"
] | 1 | 2020-07-30T15:55:45.000Z | 2020-07-30T15:55:45.000Z | # Copyright 2020 The Tekton Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 31.903394 | 222 | 0.628857 | 1,364 | 12,219 | 5.56305 | 0.156892 | 0.049552 | 0.131787 | 0.114655 | 0.447812 | 0.394175 | 0.384159 | 0.191882 | 0.163416 | 0.163416 | 0 | 0.034101 | 0.289631 | 12,219 | 382 | 223 | 31.986911 | 0.840092 | 0.463868 | 0 | 0.089744 | 0 | 0 | 0.084214 | 0.01914 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.025641 | 0 | 0.320513 | 0.012821 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6009fd2ff57dced5db01fbc3398709e54f5b6bf1 | 3,122 | py | Python | tzp.py | gmlunesa/zhat | 3bf62625d102bd40274fcd39c91f21c169e334a8 | [
"MIT"
] | 1 | 2018-06-14T04:00:43.000Z | 2018-06-14T04:00:43.000Z | tzp.py | gmlunesa/zhat | 3bf62625d102bd40274fcd39c91f21c169e334a8 | [
"MIT"
] | null | null | null | tzp.py | gmlunesa/zhat | 3bf62625d102bd40274fcd39c91f21c169e334a8 | [
"MIT"
] | 1 | 2020-11-01T13:06:56.000Z | 2020-11-01T13:06:56.000Z | import zmq
import curses
import argparse
import configparser
import threading
import time
from curses import wrapper
from client import Client
from ui import UI
def parse_args():
parser = argparse.ArgumentParser(description='Client for teezeepee')
# Please specify your username
parser.add_argument('use... | 26.235294 | 99 | 0.65663 | 379 | 3,122 | 5.229551 | 0.335092 | 0.025227 | 0.036327 | 0.048436 | 0.178607 | 0.178607 | 0.119072 | 0 | 0 | 0 | 0 | 0.00791 | 0.230621 | 3,122 | 118 | 100 | 26.457627 | 0.817236 | 0.012812 | 0 | 0.154762 | 0 | 0 | 0.080247 | 0.014295 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047619 | false | 0.011905 | 0.107143 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
600de579e9f074f3a42976d366b7423013a654a6 | 5,270 | py | Python | exercise-09/programming_assignment/hopfield.py | AleRiccardi/technical-neural-network-course | bfcca623a9dc3f7f4c20e1efe39abe986cd8869e | [
"Apache-2.0"
] | null | null | null | exercise-09/programming_assignment/hopfield.py | AleRiccardi/technical-neural-network-course | bfcca623a9dc3f7f4c20e1efe39abe986cd8869e | [
"Apache-2.0"
] | null | null | null | exercise-09/programming_assignment/hopfield.py | AleRiccardi/technical-neural-network-course | bfcca623a9dc3f7f4c20e1efe39abe986cd8869e | [
"Apache-2.0"
] | null | null | null | import numpy as np
import random
letter_C = np.array([
[1, 1, 1, 1, 1],
[1, 0, 0, 0, 0],
[1, 0, 0, 0, 0],
[1, 0, 0, 0, 0],
[1, 1, 1, 1, 1],
])
noisy_C = np.array([
[1, 1, 1, 1, 1],
[0, 1, 0, 0, 1],
[1, 0, 0, 0, 0],
[1, 0, 0, 1, 0],
[1, 0, 1, 1, 1],
])
letter_I = np.array([
... | 27.164948 | 99 | 0.493548 | 809 | 5,270 | 3.060569 | 0.147095 | 0.045234 | 0.041195 | 0.03231 | 0.382068 | 0.299677 | 0.287964 | 0.287157 | 0.268578 | 0.263732 | 0 | 0.064562 | 0.332827 | 5,270 | 193 | 100 | 27.305699 | 0.639647 | 0.040228 | 0 | 0.437909 | 0 | 0 | 0.03645 | 0 | 0 | 0 | 0 | 0 | 0.019608 | 1 | 0.045752 | false | 0 | 0.013072 | 0 | 0.078431 | 0.098039 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60108a3d3357ef01dab42a6e413205a5ad651ed5 | 13,095 | py | Python | lrtc_lib/experiment_runners/experiment_runner.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 57 | 2020-11-18T15:13:06.000Z | 2022-03-28T22:33:26.000Z | lrtc_lib/experiment_runners/experiment_runner.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 5 | 2021-02-23T22:11:07.000Z | 2021-12-13T00:13:48.000Z | lrtc_lib/experiment_runners/experiment_runner.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 14 | 2021-02-10T08:55:27.000Z | 2022-02-23T22:37:54.000Z | # (c) Copyright IBM Corporation 2020.
# LICENSE: Apache License 2.0 (Apache-2.0)
# http://www.apache.org/licenses/LICENSE-2.0
import abc
import logging
import time
from collections import defaultdict
from typing import List
import numpy as np
from dataclasses import dataclass
logging.basicConfig(level=logging.INFO,... | 52.590361 | 136 | 0.72333 | 1,633 | 13,095 | 5.453154 | 0.150643 | 0.039528 | 0.041999 | 0.020663 | 0.448961 | 0.344862 | 0.266929 | 0.202358 | 0.163728 | 0.143515 | 0 | 0.001933 | 0.209775 | 13,095 | 248 | 137 | 52.802419 | 0.85862 | 0.113326 | 0 | 0.109827 | 0 | 0.017341 | 0.114004 | 0.024286 | 0 | 0 | 0 | 0 | 0 | 1 | 0.063584 | false | 0 | 0.115607 | 0.00578 | 0.300578 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6011674256a1e396b16faca45277694f253b2c3f | 909 | py | Python | contrast/environment/data.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | contrast/environment/data.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | 2 | 2018-09-19T06:49:03.000Z | 2019-06-28T10:47:37.000Z | contrast/environment/data.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | try:
from tango import DeviceProxy, DevError
except ModuleNotFoundError:
pass
class PathFixer(object):
"""
Basic pathfixer which takes a path manually.
"""
def __init__(self):
self.directory = None
class SdmPathFixer(object):
"""
MAX IV pathfixer which takes a path from a Tan... | 25.25 | 79 | 0.581958 | 102 | 909 | 5.088235 | 0.490196 | 0.069364 | 0.073218 | 0.077071 | 0.092486 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003295 | 0.332233 | 909 | 35 | 80 | 25.971429 | 0.85173 | 0.111111 | 0 | 0.083333 | 0 | 0 | 0.119691 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0.041667 | 0.041667 | 0 | 0.333333 | 0.083333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60121c6217810f4a6299e69b2f99282f9e977749 | 1,504 | py | Python | game_2048/views.py | fung04/csrw_game | 9673fdd311583057d5bf756dec7b99959d961d0c | [
"MIT"
] | null | null | null | game_2048/views.py | fung04/csrw_game | 9673fdd311583057d5bf756dec7b99959d961d0c | [
"MIT"
] | null | null | null | game_2048/views.py | fung04/csrw_game | 9673fdd311583057d5bf756dec7b99959d961d0c | [
"MIT"
] | null | null | null | import json
from django.contrib.auth.models import User
from django.http import JsonResponse
from django.shortcuts import redirect, render
from .models import Game2048
# Create your views here.
# test_user
# 8!S#5RP!WVMACg
def game(request):
return render(request, 'game_2048/index.html')
def set_result(req... | 27.851852 | 84 | 0.672207 | 208 | 1,504 | 4.735577 | 0.326923 | 0.137056 | 0.036548 | 0.034518 | 0.231472 | 0.188832 | 0.188832 | 0.188832 | 0.188832 | 0.188832 | 0 | 0.019248 | 0.240027 | 1,504 | 53 | 85 | 28.377358 | 0.84252 | 0.198803 | 0 | 0.142857 | 0 | 0 | 0.074539 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.107143 | false | 0 | 0.178571 | 0.035714 | 0.428571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6013883d7068c2a00e5b4b40942f112984e3413c | 7,417 | py | Python | arviz/plots/pairplot.py | gimbo/arviz | c1df1847aa5170ad2810ae3d705d576d2643e3ec | [
"Apache-2.0"
] | null | null | null | arviz/plots/pairplot.py | gimbo/arviz | c1df1847aa5170ad2810ae3d705d576d2643e3ec | [
"Apache-2.0"
] | null | null | null | arviz/plots/pairplot.py | gimbo/arviz | c1df1847aa5170ad2810ae3d705d576d2643e3ec | [
"Apache-2.0"
] | null | null | null | """Plot a scatter or hexbin of sampled parameters."""
import warnings
import numpy as np
from ..data import convert_to_dataset, convert_to_inference_data
from .plot_utils import xarray_to_ndarray, get_coords, get_plotting_function
from ..utils import _var_names
def plot_pair(
data,
group="posterior",
var... | 33.40991 | 99 | 0.62559 | 874 | 7,417 | 5.167048 | 0.255149 | 0.030115 | 0.014172 | 0.011957 | 0.141718 | 0.105182 | 0.067981 | 0.067981 | 0.032108 | 0.023472 | 0 | 0.003777 | 0.2861 | 7,417 | 221 | 100 | 33.561086 | 0.849103 | 0.450047 | 0 | 0.038095 | 0 | 0 | 0.147366 | 0 | 0 | 0 | 0 | 0.004525 | 0 | 1 | 0.009524 | false | 0 | 0.047619 | 0 | 0.066667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
601c3263a4fb21497920c0fe4c9459fa3c4066b9 | 844 | py | Python | oops/#016exceptions.py | krishankansal/PythonPrograms | 6d4d989068195b8c8dd9d71cf4f920fef1177cf2 | [
"MIT"
] | null | null | null | oops/#016exceptions.py | krishankansal/PythonPrograms | 6d4d989068195b8c8dd9d71cf4f920fef1177cf2 | [
"MIT"
] | null | null | null | oops/#016exceptions.py | krishankansal/PythonPrograms | 6d4d989068195b8c8dd9d71cf4f920fef1177cf2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 18 08:40:11 2020
@author: krishan
"""
def funny_division2(anumber):
try:
if anumber == 13:
raise ValueError("13 is an unlucky number")
return 100 / anumber
except (ZeroDivisionError, TypeError):
return "E... | 24.823529 | 55 | 0.609005 | 107 | 844 | 4.775701 | 0.560748 | 0.064579 | 0.07045 | 0.074364 | 0.489237 | 0.489237 | 0.489237 | 0.367906 | 0.367906 | 0.367906 | 0 | 0.061564 | 0.287915 | 844 | 33 | 56 | 25.575758 | 0.788686 | 0.120853 | 0 | 0.5 | 0 | 0 | 0.240437 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0 | 0 | 0.35 | 0.1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
601c880be1287d7f4ecd5a8ee1ee870db121bb75 | 4,129 | py | Python | config/simclr_config.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | 5 | 2020-08-24T17:57:51.000Z | 2021-06-06T18:18:19.000Z | config/simclr_config.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | null | null | null | config/simclr_config.py | denn-s/SimCLR | e2239ac52464b1271c3b8ad1ec4eb26f3b73c7d4 | [
"MIT"
] | 1 | 2020-08-29T00:35:36.000Z | 2020-08-29T00:35:36.000Z | import os
from datetime import datetime
import torch
from dataclasses import dataclass
class SimCLRConfig:
@dataclass()
class Base:
output_dir_path: str
log_dir_path: str
log_file_path: str
device: object
num_gpu: int
logger_name: str
@dataclass()
clas... | 28.475862 | 113 | 0.601356 | 489 | 4,129 | 4.813906 | 0.302658 | 0.045879 | 0.02124 | 0.020391 | 0.196686 | 0.180544 | 0.180544 | 0.168224 | 0.153781 | 0.139762 | 0 | 0.010915 | 0.312182 | 4,129 | 144 | 114 | 28.673611 | 0.817958 | 0.178736 | 0 | 0.378947 | 0 | 0 | 0.032573 | 0 | 0 | 0 | 0 | 0.006944 | 0 | 1 | 0.021053 | false | 0 | 0.042105 | 0.010526 | 0.157895 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
601e563b0639154915d91614f293088729954120 | 6,729 | py | Python | mldftdat/scripts/train_gp.py | mir-group/CiderPress | bf2b3536e6bd7432645c18dce5a745d63bc9df59 | [
"MIT"
] | 10 | 2021-09-09T06:51:57.000Z | 2021-12-17T09:48:41.000Z | mldftdat/scripts/train_gp.py | mir-group/CiderPress | bf2b3536e6bd7432645c18dce5a745d63bc9df59 | [
"MIT"
] | null | null | null | mldftdat/scripts/train_gp.py | mir-group/CiderPress | bf2b3536e6bd7432645c18dce5a745d63bc9df59 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
import os
import numpy as np
from joblib import dump
from mldftdat.workflow_utils import SAVE_ROOT
from mldftdat.models.gp import *
from mldftdat.data import load_descriptors, filter_descriptors
import yaml
def parse_settings(args):
fname = args.datasets_list[0]
if args.suff... | 43.412903 | 141 | 0.622975 | 966 | 6,729 | 4.212215 | 0.23499 | 0.055296 | 0.104448 | 0.023347 | 0.280659 | 0.140084 | 0.110101 | 0.092898 | 0.092898 | 0.059474 | 0 | 0.009117 | 0.233913 | 6,729 | 154 | 142 | 43.694805 | 0.780213 | 0.045921 | 0 | 0.121212 | 0 | 0.007576 | 0.194449 | 0 | 0 | 0 | 0 | 0 | 0.022727 | 1 | 0.030303 | false | 0 | 0.060606 | 0.007576 | 0.106061 | 0.037879 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
601f1b72f2f10dacace33b87801d53b05bfc4ed8 | 5,684 | py | Python | picoCTF-web/api/routes/admin.py | zaratec/picoCTF | b0a63f03625bb4657a8116f43bea26346ca6f010 | [
"MIT"
] | null | null | null | picoCTF-web/api/routes/admin.py | zaratec/picoCTF | b0a63f03625bb4657a8116f43bea26346ca6f010 | [
"MIT"
] | null | null | null | picoCTF-web/api/routes/admin.py | zaratec/picoCTF | b0a63f03625bb4657a8116f43bea26346ca6f010 | [
"MIT"
] | null | null | null | import api
import bson
from api.annotations import (
api_wrapper,
log_action,
require_admin,
require_login,
require_teacher
)
from api.common import WebError, WebSuccess
from flask import (
Blueprint,
Flask,
render_template,
request,
send_from_directory,
session
)
blueprint ... | 29.450777 | 106 | 0.714814 | 742 | 5,684 | 5.281671 | 0.198113 | 0.040827 | 0.065068 | 0.084205 | 0.331462 | 0.292166 | 0.276346 | 0.196989 | 0.116356 | 0.069916 | 0 | 0.00021 | 0.16133 | 5,684 | 192 | 107 | 29.604167 | 0.821901 | 0 | 0 | 0.275641 | 0 | 0 | 0.186312 | 0.029381 | 0 | 0 | 0 | 0 | 0 | 1 | 0.096154 | false | 0 | 0.032051 | 0.012821 | 0.294872 | 0.108974 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60226c7d97ac7aadd65011be5f070784ee3088d9 | 8,504 | py | Python | venv/lib/python3.9/site-packages/biorun/fetch.py | LucaCilibrasi/docker_viruclust | 88149c17fd4b94a54397d0cb4a9daece00122c49 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/biorun/fetch.py | LucaCilibrasi/docker_viruclust | 88149c17fd4b94a54397d0cb4a9daece00122c49 | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.9/site-packages/biorun/fetch.py | LucaCilibrasi/docker_viruclust | 88149c17fd4b94a54397d0cb4a9daece00122c49 | [
"Apache-2.0"
] | null | null | null | """
Handles functionality related to data storege.
"""
import sys, os, glob, re, gzip, json
from biorun import const, utils, objects, ncbi
from biorun.models import jsonrec
import biorun.libs.placlib as plac
# Module level logger.
logger = utils.logger
# A nicer error message on incorrect installation.
try:
from ... | 28.441472 | 94 | 0.61477 | 1,153 | 8,504 | 4.457069 | 0.243712 | 0.017513 | 0.031134 | 0.021794 | 0.272621 | 0.21366 | 0.177077 | 0.163067 | 0.111695 | 0.111695 | 0 | 0.004157 | 0.264581 | 8,504 | 299 | 95 | 28.441472 | 0.817557 | 0.200141 | 0 | 0.216049 | 0 | 0 | 0.114216 | 0.005468 | 0 | 0 | 0 | 0 | 0 | 1 | 0.074074 | false | 0 | 0.037037 | 0 | 0.160494 | 0.04321 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6022c4c8c548f73dbd95a825913c8b4639f2e4dc | 1,049 | py | Python | game/items/game_item.py | LaverdeS/Genetic_Algorithm_EGame | 89ff8c7870fa90768f4616cab6803227c8613396 | [
"MIT"
] | 2 | 2019-07-02T15:20:46.000Z | 2020-03-04T13:31:12.000Z | game/items/game_item.py | shivaa511/EGame | 6db10cb5cf7431093d2ab09a9e4049d6633fe792 | [
"MIT"
] | 2 | 2019-07-16T16:50:19.000Z | 2020-03-04T12:52:45.000Z | game/items/game_item.py | shivaa511/EGame | 6db10cb5cf7431093d2ab09a9e4049d6633fe792 | [
"MIT"
] | 8 | 2018-06-06T15:14:48.000Z | 2018-07-08T11:46:10.000Z | import numpy as np
from random import randint
from PyQt5.QtGui import QImage
from PyQt5.QtCore import QPointF
class GameItem():
def __init__(self, parent, boundary, position=None):
self.parent = parent
self.config = parent.config
self.items_config = self.config.items
if position i... | 37.464286 | 77 | 0.611058 | 121 | 1,049 | 5 | 0.396694 | 0.066116 | 0.042975 | 0.06281 | 0.109091 | 0.109091 | 0 | 0 | 0 | 0 | 0 | 0.010825 | 0.29552 | 1,049 | 28 | 78 | 37.464286 | 0.807848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.166667 | 0 | 0.291667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6022d662d09b473f63deec188827d3c36ba79479 | 6,750 | py | Python | source/deepsecurity/models/application_type_rights.py | felipecosta09/cloudone-workload-controltower-lifecycle | 7927c84d164058b034fc872701b5ee117641f4d1 | [
"Apache-2.0"
] | 1 | 2021-10-30T16:40:09.000Z | 2021-10-30T16:40:09.000Z | source/deepsecurity/models/application_type_rights.py | felipecosta09/cloudone-workload-controltower-lifecycle | 7927c84d164058b034fc872701b5ee117641f4d1 | [
"Apache-2.0"
] | 1 | 2021-07-28T20:19:03.000Z | 2021-07-28T20:19:03.000Z | source/deepsecurity/models/application_type_rights.py | felipecosta09/cloudone-workload-controltower-lifecycle | 7927c84d164058b034fc872701b5ee117641f4d1 | [
"Apache-2.0"
] | 1 | 2021-10-30T16:40:02.000Z | 2021-10-30T16:40:02.000Z | # coding: utf-8
"""
Trend Micro Deep Security API
Copyright 2018 - 2020 Trend Micro Incorporated.<br/>Get protected, stay secured, and keep informed with Trend Micro Deep Security's new RESTful API. Access system data and manage security configurations to automate your security workflows and integrate De... | 38.571429 | 311 | 0.663556 | 776 | 6,750 | 5.439433 | 0.189433 | 0.159204 | 0.099502 | 0.124378 | 0.627103 | 0.557451 | 0.498223 | 0.405117 | 0.336887 | 0.268183 | 0 | 0.015207 | 0.269333 | 6,750 | 174 | 312 | 38.793103 | 0.840633 | 0.349778 | 0 | 0.065789 | 0 | 0 | 0.085025 | 0.075974 | 0 | 0 | 0 | 0 | 0 | 1 | 0.157895 | false | 0 | 0.039474 | 0 | 0.355263 | 0.026316 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60254d5cf06d095bd8f90781b32cfb0d4a95c6e4 | 3,900 | py | Python | code-samples/aws_neptune.py | hardikvasa/database-journal | 7932b5a7fe909f8adb3a909183532b43d450da7b | [
"MIT"
] | 45 | 2019-06-07T07:12:09.000Z | 2022-03-20T19:58:53.000Z | code-samples/aws_neptune.py | hardikvasa/database-journal | 7932b5a7fe909f8adb3a909183532b43d450da7b | [
"MIT"
] | 1 | 2019-06-09T17:23:05.000Z | 2019-06-10T18:36:20.000Z | code-samples/aws_neptune.py | hardikvasa/database-journal | 7932b5a7fe909f8adb3a909183532b43d450da7b | [
"MIT"
] | 15 | 2019-06-07T07:12:12.000Z | 2022-01-02T01:09:53.000Z | from __future__ import print_function # Python 2/3 compatibility
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.strategies import *
from gremlin_python.driver.driver_remote_connection import DriverR... | 57.352941 | 136 | 0.704615 | 590 | 3,900 | 4.525424 | 0.19661 | 0.117978 | 0.048689 | 0.093633 | 0.543446 | 0.428839 | 0.365543 | 0.365543 | 0.354307 | 0.296255 | 0 | 0.018702 | 0.067692 | 3,900 | 68 | 137 | 57.352941 | 0.715622 | 0.112821 | 0 | 0 | 0 | 0 | 0.375 | 0.016821 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.136364 | 0 | 0.136364 | 0.340909 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6025b1cfb25bd8e7710a10ffd3f52c87c8e4a3b7 | 15,045 | py | Python | kits19cnn/io/preprocess_train.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | null | null | null | kits19cnn/io/preprocess_train.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | null | null | null | kits19cnn/io/preprocess_train.py | Ramsha04/kits19-2d-reproduce | 66678f1eda3688d6dc64389e9a80ae0b754a3052 | [
"Apache-2.0"
] | null | null | null | import os
from os.path import join, isdir
from pathlib import Path
from collections import defaultdict
from tqdm import tqdm
import nibabel as nib
import numpy as np
import json
from .resample import resample_patient
from .custom_augmentations import resize_data_and_seg, crop_to_bbox
class Preprocessor(object):
"... | 43.482659 | 97 | 0.571685 | 1,925 | 15,045 | 4.263377 | 0.16987 | 0.031193 | 0.020714 | 0.010235 | 0.296454 | 0.237602 | 0.212014 | 0.185208 | 0.130864 | 0.125746 | 0 | 0.008793 | 0.349884 | 15,045 | 345 | 98 | 43.608696 | 0.830283 | 0.339116 | 0 | 0.178571 | 0 | 0 | 0.103898 | 0.017038 | 0 | 0 | 0 | 0 | 0.029762 | 1 | 0.077381 | false | 0 | 0.059524 | 0 | 0.166667 | 0.029762 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6026a153525e13fa3c171bca805b17cf817349e3 | 1,558 | py | Python | setup.py | opywan/calm-dsl | 1d89436d039a39265a0ae806022be5b52e757ac0 | [
"Apache-2.0"
] | null | null | null | setup.py | opywan/calm-dsl | 1d89436d039a39265a0ae806022be5b52e757ac0 | [
"Apache-2.0"
] | null | null | null | setup.py | opywan/calm-dsl | 1d89436d039a39265a0ae806022be5b52e757ac0 | [
"Apache-2.0"
] | null | null | null | import sys
import setuptools
from setuptools.command.test import test as TestCommand
def read_file(filename):
with open(filename, "r", encoding='utf8') as f:
return f.read()
class PyTest(TestCommand):
"""PyTest"""
def finalize_options(self):
"""finalize_options"""
TestCommand.fi... | 28.327273 | 68 | 0.649551 | 176 | 1,558 | 5.596591 | 0.579545 | 0.032487 | 0.038579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005691 | 0.210526 | 1,558 | 54 | 69 | 28.851852 | 0.795122 | 0.021181 | 0 | 0 | 0 | 0 | 0.296885 | 0.014579 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.095238 | 0 | 0.214286 | 0.02381 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60285f227b486baa95c5fb739b65a5f1c6ce6e02 | 3,364 | py | Python | third_party/webrtc/src/chromium/src/tools/swarming_client/tests/logging_utils_test.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 8 | 2016-02-08T11:59:31.000Z | 2020-05-31T15:19:54.000Z | third_party/webrtc/src/chromium/src/tools/swarming_client/tests/logging_utils_test.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 1 | 2021-05-05T11:11:31.000Z | 2021-05-05T11:11:31.000Z | third_party/webrtc/src/chromium/src/tools/swarming_client/tests/logging_utils_test.py | bopopescu/webrtc-streaming-node | 727a441204344ff596401b0253caac372b714d91 | [
"MIT"
] | 7 | 2016-02-09T09:28:14.000Z | 2020-07-25T19:03:36.000Z | #!/usr/bin/env python
# Copyright 2015 The Swarming Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0 that
# can be found in the LICENSE file.
import logging
import os
import subprocess
import sys
import tempfile
import shutil
import unittest
import re
THIS_FILE... | 28.508475 | 80 | 0.67063 | 514 | 3,364 | 4.268482 | 0.344358 | 0.030994 | 0.043756 | 0.054695 | 0.175023 | 0.144941 | 0.111212 | 0.111212 | 0.06928 | 0.06928 | 0 | 0.009434 | 0.180737 | 3,364 | 117 | 81 | 28.752137 | 0.786647 | 0.162307 | 0 | 0.098765 | 0 | 0.024691 | 0.133524 | 0.039629 | 0 | 0 | 0 | 0 | 0.074074 | 1 | 0.111111 | false | 0 | 0.111111 | 0 | 0.283951 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
602b781497fe10bfa361f38ffbff943242a02399 | 3,392 | py | Python | 2021/d8b_bits.py | apie/advent-of-code | c49abec01b044166a688ade40ebb1e642f0e5ce0 | [
"MIT"
] | 4 | 2018-12-04T23:33:46.000Z | 2021-12-07T17:33:27.000Z | 2021/d8b_bits.py | apie/advent-of-code | c49abec01b044166a688ade40ebb1e642f0e5ce0 | [
"MIT"
] | 17 | 2018-12-12T23:32:09.000Z | 2020-01-04T15:50:31.000Z | 2021/d8b_bits.py | apie/advent-of-code | c49abec01b044166a688ade40ebb1e642f0e5ce0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pytest
import fileinput
from os.path import splitext, abspath
F_NAME = 'd8'
#implement day8 using bits
def find_ones(d):
'''count number of ones in binary number'''
ones = 0
while d > 0:
ones += d & 1
d >>= 1
return ones
# Assign each segment a 'wire'.
lut... | 26.294574 | 122 | 0.571934 | 477 | 3,392 | 3.97065 | 0.301887 | 0.025343 | 0.018479 | 0.022175 | 0.181626 | 0.129884 | 0.033791 | 0.033791 | 0.033791 | 0 | 0 | 0.053128 | 0.31191 | 3,392 | 128 | 123 | 26.5 | 0.758355 | 0.190153 | 0 | 0.141304 | 0 | 0 | 0.032042 | 0 | 0 | 0 | 0 | 0 | 0.043478 | 1 | 0.097826 | false | 0 | 0.043478 | 0.032609 | 0.206522 | 0.021739 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
602c28a9205e1c1670c905a216255ec8e326af0a | 8,931 | py | Python | frame_dataloader/spatial_dataloader.py | rizkiailham/two-stream-action-recognition-1 | 01221f668e62eb26e3593f4ecd3f257b6b6979ab | [
"Apache-2.0"
] | 67 | 2019-01-02T11:42:44.000Z | 2022-03-24T02:46:39.000Z | frame_dataloader/spatial_dataloader.py | rizkiailham/two-stream-action-recognition-1 | 01221f668e62eb26e3593f4ecd3f257b6b6979ab | [
"Apache-2.0"
] | 10 | 2019-02-06T17:12:23.000Z | 2021-11-10T08:05:27.000Z | frame_dataloader/spatial_dataloader.py | rizkiailham/two-stream-action-recognition-1 | 01221f668e62eb26e3593f4ecd3f257b6b6979ab | [
"Apache-2.0"
] | 25 | 2019-04-03T19:25:41.000Z | 2021-11-22T16:34:15.000Z | """
********************************
* Created by mohammed-alaa *
********************************
Spatial Dataloader implementing sequence api from keras (defines how to load a single item)
this loads batches of images for each iteration it returns [batch_size, height, width ,3] ndarrays
"""
import copy
import ran... | 42.127358 | 211 | 0.647744 | 1,174 | 8,931 | 4.632879 | 0.204429 | 0.034749 | 0.031072 | 0.036404 | 0.432616 | 0.337194 | 0.276521 | 0.254459 | 0.213275 | 0.181651 | 0 | 0.011505 | 0.250588 | 8,931 | 211 | 212 | 42.327014 | 0.801136 | 0.197962 | 0 | 0.15 | 0 | 0 | 0.027206 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.066667 | 0 | 0.258333 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
602c73ce30543054207480d8bbb3a3dcd0069abc | 2,762 | py | Python | day02/puzzle2.py | jack-beach/AdventOfCode2019 | a8ac53eaf03cd7595deb2a9aa798a2d17c21c513 | [
"MIT"
] | null | null | null | day02/puzzle2.py | jack-beach/AdventOfCode2019 | a8ac53eaf03cd7595deb2a9aa798a2d17c21c513 | [
"MIT"
] | 1 | 2019-12-05T19:21:46.000Z | 2019-12-05T19:21:46.000Z | day02/puzzle2.py | jack-beach/AdventOfCode2019 | a8ac53eaf03cd7595deb2a9aa798a2d17c21c513 | [
"MIT"
] | 1 | 2019-12-05T18:05:54.000Z | 2019-12-05T18:05:54.000Z | # stdlib imports
import copy
# vendor imports
import click
@click.command()
@click.argument("input_file", type=click.File("r"))
def main(input_file):
"""Put your puzzle execution code here"""
# Convert the comma-delimited string of numbers into a list of ints
masterRegister = list(
map(lambda op:... | 29.073684 | 77 | 0.542723 | 282 | 2,762 | 5.276596 | 0.43617 | 0.070565 | 0.020161 | 0.030914 | 0.100806 | 0.100806 | 0.100806 | 0.044355 | 0 | 0 | 0 | 0.024779 | 0.386314 | 2,762 | 94 | 78 | 29.382979 | 0.853097 | 0.281318 | 0 | 0.098039 | 0 | 0 | 0.035751 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.039216 | false | 0 | 0.039216 | 0 | 0.098039 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
602e5a99d805700346d56a51e68cf804e5858e7b | 6,174 | py | Python | oslo_messaging/_drivers/zmq_driver/client/publishers/zmq_dealer_publisher.py | devendermishrajio/oslo.messaging | 9e5fb5697d3f7259f01e3416af0582090d20859a | [
"Apache-1.1"
] | 1 | 2021-02-17T15:30:45.000Z | 2021-02-17T15:30:45.000Z | oslo_messaging/_drivers/zmq_driver/client/publishers/zmq_dealer_publisher.py | devendermishrajio/oslo.messaging | 9e5fb5697d3f7259f01e3416af0582090d20859a | [
"Apache-1.1"
] | null | null | null | oslo_messaging/_drivers/zmq_driver/client/publishers/zmq_dealer_publisher.py | devendermishrajio/oslo.messaging | 9e5fb5697d3f7259f01e3416af0582090d20859a | [
"Apache-1.1"
] | 2 | 2015-11-03T03:21:55.000Z | 2015-12-01T08:56:14.000Z | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 34.49162 | 78 | 0.679462 | 742 | 6,174 | 5.392183 | 0.264151 | 0.027993 | 0.020995 | 0.022494 | 0.485379 | 0.430892 | 0.35816 | 0.300425 | 0.245939 | 0.245939 | 0 | 0.002326 | 0.234046 | 6,174 | 178 | 79 | 34.685393 | 0.84373 | 0.154357 | 0 | 0.283019 | 0 | 0 | 0.058891 | 0 | 0 | 0 | 0 | 0 | 0.009434 | 1 | 0.188679 | false | 0 | 0.056604 | 0.009434 | 0.330189 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
602e5ff210d9605bb2e8229e3fbf0370c704bfb0 | 25,175 | py | Python | coba/environments/filters.py | mrucker/banditbenchmark | 0365291b3a0cf1d862d294e0386d0ccad3f360f1 | [
"BSD-3-Clause"
] | null | null | null | coba/environments/filters.py | mrucker/banditbenchmark | 0365291b3a0cf1d862d294e0386d0ccad3f360f1 | [
"BSD-3-Clause"
] | null | null | null | coba/environments/filters.py | mrucker/banditbenchmark | 0365291b3a0cf1d862d294e0386d0ccad3f360f1 | [
"BSD-3-Clause"
] | null | null | null | import pickle
import warnings
import collections.abc
from math import isnan
from statistics import mean, median, stdev, mode
from abc import abstractmethod, ABC
from numbers import Number
from collections import defaultdict
from itertools import islice, chain
from typing import Hashable, Optional, Sequence, Union, Ite... | 38.259878 | 130 | 0.623952 | 2,718 | 25,175 | 5.623252 | 0.128403 | 0.028265 | 0.01446 | 0.017993 | 0.355404 | 0.290762 | 0.249673 | 0.212641 | 0.140605 | 0.129482 | 0 | 0.00257 | 0.289057 | 25,175 | 657 | 131 | 38.318113 | 0.85138 | 0.11718 | 0 | 0.345324 | 0 | 0.002398 | 0.050797 | 0 | 0 | 0 | 0 | 0 | 0.007194 | 1 | 0.088729 | false | 0.016787 | 0.045564 | 0.021583 | 0.235012 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
602f71483df50285674a0fe43ba737fee526a84e | 6,553 | py | Python | python/cuml/preprocessing/LabelEncoder.py | egoolish/cuml | 5320eff78890b3e9129e04e13437496c0424820d | [
"Apache-2.0"
] | 7 | 2019-02-26T10:41:09.000Z | 2020-06-17T06:08:57.000Z | python/cuml/preprocessing/LabelEncoder.py | danielhanchen/cuml | fab74ca94fdbc5b49281660ce32a48cfd3d66f46 | [
"Apache-2.0"
] | null | null | null | python/cuml/preprocessing/LabelEncoder.py | danielhanchen/cuml | fab74ca94fdbc5b49281660ce32a48cfd3d66f46 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2019, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 27.649789 | 78 | 0.574546 | 806 | 6,553 | 4.583127 | 0.301489 | 0.062263 | 0.029778 | 0.020303 | 0.096914 | 0.060639 | 0.060639 | 0.033027 | 0.033027 | 0.025988 | 0 | 0.015921 | 0.338624 | 6,553 | 236 | 79 | 27.766949 | 0.83641 | 0.531512 | 0 | 0.209677 | 0 | 0 | 0.060916 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.129032 | false | 0 | 0.064516 | 0 | 0.33871 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6031df65367df99733ce016cb9fcdddefa51c5dc | 3,951 | py | Python | examples/python-guide/cross_validation_example.py | StatMixedML/GPBoost | 786d8be61c5c28da0690e167af636a6d777bf9e1 | [
"Apache-2.0"
] | 2 | 2020-04-12T06:12:17.000Z | 2020-04-12T15:34:01.000Z | examples/python-guide/cross_validation_example.py | StatMixedML/GPBoost | 786d8be61c5c28da0690e167af636a6d777bf9e1 | [
"Apache-2.0"
] | null | null | null | examples/python-guide/cross_validation_example.py | StatMixedML/GPBoost | 786d8be61c5c28da0690e167af636a6d777bf9e1 | [
"Apache-2.0"
] | 1 | 2020-04-12T15:34:12.000Z | 2020-04-12T15:34:12.000Z | # coding: utf-8
# pylint: disable = invalid-name, C0111
import gpboost as gpb
import numpy as np
from sklearn.metrics import mean_squared_error
import matplotlib.pyplot as plt
plt.style.use('ggplot')
#--------------------Cross validation for tree-boosting without GP or random effects----------------
print('Simulating ... | 35.276786 | 100 | 0.665148 | 616 | 3,951 | 4.152597 | 0.297078 | 0.027365 | 0.017592 | 0.018765 | 0.528538 | 0.519156 | 0.495309 | 0.471071 | 0.471071 | 0.437451 | 0 | 0.037082 | 0.174133 | 3,951 | 111 | 101 | 35.594595 | 0.746859 | 0.258162 | 0 | 0.555556 | 0 | 0 | 0.170588 | 0.009343 | 0 | 0 | 0 | 0 | 0 | 1 | 0.037037 | false | 0 | 0.049383 | 0 | 0.123457 | 0.098765 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60321018f94dd63905027338dadab96fc7adf06f | 2,230 | py | Python | synapse/rest/synapse/client/unsubscribe.py | Florian-Sabonchi/synapse | c95b04bb0e719d3f5de1714b442f95a39c6e3634 | [
"Apache-2.0"
] | null | null | null | synapse/rest/synapse/client/unsubscribe.py | Florian-Sabonchi/synapse | c95b04bb0e719d3f5de1714b442f95a39c6e3634 | [
"Apache-2.0"
] | null | null | null | synapse/rest/synapse/client/unsubscribe.py | Florian-Sabonchi/synapse | c95b04bb0e719d3f5de1714b442f95a39c6e3634 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 34.307692 | 80 | 0.689686 | 288 | 2,230 | 5.166667 | 0.486111 | 0.040323 | 0.030242 | 0.021505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008178 | 0.232287 | 2,230 | 64 | 81 | 34.84375 | 0.860981 | 0.304484 | 0 | 0 | 0 | 0 | 0.056505 | 0.016426 | 0 | 0 | 0 | 0 | 0 | 1 | 0.028571 | false | 0 | 0.171429 | 0 | 0.257143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
603213c5e7e394368a3f594930adb85245cbf3c3 | 4,859 | py | Python | pyhanabi/act_group.py | ravihammond/hanabi-convention-adaptation | 5dafa91742de8e8d5810e8213e0e2771818b2f54 | [
"MIT"
] | 1 | 2022-03-24T19:41:22.000Z | 2022-03-24T19:41:22.000Z | pyhanabi/act_group.py | ravihammond/hanabi-convention-adaptation | 5dafa91742de8e8d5810e8213e0e2771818b2f54 | [
"MIT"
] | null | null | null | pyhanabi/act_group.py | ravihammond/hanabi-convention-adaptation | 5dafa91742de8e8d5810e8213e0e2771818b2f54 | [
"MIT"
] | null | null | null | import set_path
import sys
import torch
set_path.append_sys_path()
import rela
import hanalearn
import utils
assert rela.__file__.endswith(".so")
assert hanalearn.__file__.endswith(".so")
class ActGroup:
def __init__(
self,
devices,
agent,
partner_weight,
seed,
n... | 31.967105 | 83 | 0.537148 | 506 | 4,859 | 4.869565 | 0.231225 | 0.03125 | 0.045455 | 0.025974 | 0.131899 | 0.081169 | 0.081169 | 0.043831 | 0.043831 | 0.043831 | 0 | 0.015963 | 0.381148 | 4,859 | 151 | 84 | 32.178808 | 0.803459 | 0.039309 | 0 | 0.174242 | 0 | 0 | 0.037411 | 0 | 0 | 0 | 0 | 0 | 0.015152 | 1 | 0.037879 | false | 0 | 0.045455 | 0 | 0.090909 | 0.007576 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
603237057511914da74cfc53cec432cce1013ccc | 1,128 | py | Python | A_source_code/carbon/code/make_mask.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | A_source_code/carbon/code/make_mask.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | A_source_code/carbon/code/make_mask.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ******************************************************
## Copyright 2019, PBL Netherlands Environmental Assessment Agency and Utrecht University.
## Reuse permitted under Gnu Public License, GPL v3.
# ******************************************************
from netCDF4 import Dataset
import numpy as np
import genera... | 31.333333 | 90 | 0.62766 | 159 | 1,128 | 4.194969 | 0.421384 | 0.053973 | 0.035982 | 0.053973 | 0.307346 | 0.242879 | 0.191904 | 0.157421 | 0.095952 | 0.095952 | 0 | 0.00655 | 0.187943 | 1,128 | 35 | 91 | 32.228571 | 0.721616 | 0.218972 | 0 | 0.153846 | 0 | 0 | 0.037757 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038462 | false | 0 | 0.269231 | 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 | 0 | 0 | 0 | 0 | 1 | 0 |
6032a6052ffc5ac0129ff8a333fbe0b572cb530c | 7,309 | py | Python | Code/Dataset.py | gitFloyd/AAI-Project-2 | c6bb4d389248c3385e58a0c399343322a6dd887f | [
"MIT"
] | null | null | null | Code/Dataset.py | gitFloyd/AAI-Project-2 | c6bb4d389248c3385e58a0c399343322a6dd887f | [
"MIT"
] | null | null | null | Code/Dataset.py | gitFloyd/AAI-Project-2 | c6bb4d389248c3385e58a0c399343322a6dd887f | [
"MIT"
] | null | null | null | from io import TextIOWrapper
import math
from typing import TypeVar
import random
import os
from Settings import Settings
class Dataset:
DataT = TypeVar('DataT')
WIN_NL = "\r\n"
LINUX_NL = "\n"
def __init__(self, path:str, filename:str, newline:str = WIN_NL) -> None:
self.path_ = path
self.f... | 24.363333 | 96 | 0.629498 | 1,000 | 7,309 | 4.457 | 0.184 | 0.030514 | 0.013462 | 0.016154 | 0.185775 | 0.118914 | 0.069554 | 0.032309 | 0.032309 | 0.014808 | 0 | 0.017167 | 0.242851 | 7,309 | 299 | 97 | 24.444816 | 0.788218 | 0.103981 | 0 | 0.148325 | 0 | 0 | 0.012856 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.114833 | false | 0.009569 | 0.028708 | 0.033493 | 0.320574 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6037477e26e980cdc81f047c4b3c12fc1cbcec38 | 2,321 | py | Python | mars/tensor/base/flip.py | tomzhang/mars-1 | 6f1d85e37eb1b383251314cb0ba13e06288af03d | [
"Apache-2.0"
] | 2 | 2019-03-29T04:11:10.000Z | 2020-07-08T10:19:54.000Z | mars/tensor/base/flip.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | mars/tensor/base/flip.py | JeffroMF/mars | 2805241ac55b50c4f6319baa41113fbf8c723832 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 25.228261 | 81 | 0.561827 | 326 | 2,321 | 3.993865 | 0.453988 | 0.046083 | 0.016129 | 0.024578 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033153 | 0.285222 | 2,321 | 91 | 82 | 25.505495 | 0.751658 | 0.75657 | 0 | 0 | 0 | 0 | 0.14876 | 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 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6037a51c2f59285acb270192ab5e41f437b7c589 | 1,876 | py | Python | tests/test_ops/test_upfirdn2d.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | tests/test_ops/test_upfirdn2d.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | tests/test_ops/test_upfirdn2d.py | imabackstabber/mmcv | b272c09b463f00fd7fdd455f7bd4a055f9995521 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch
_USING_PARROTS = True
try:
from parrots.autograd import gradcheck
except ImportError:
from torch.autograd import gradcheck, gradgradcheck
_USING_PARROTS = False
class TestUpFirDn2d:
"""Unit test for UpFirDn2d.
Here, we ju... | 31.79661 | 78 | 0.55597 | 221 | 1,876 | 4.61086 | 0.393665 | 0.075564 | 0.088322 | 0.111874 | 0.281649 | 0.281649 | 0.281649 | 0.281649 | 0.281649 | 0.281649 | 0 | 0.03135 | 0.336887 | 1,876 | 58 | 79 | 32.344828 | 0.787781 | 0.1242 | 0 | 0.409091 | 0 | 0 | 0.008025 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0 | 0.136364 | 0 | 0.204545 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6038e029f5aa9016bb06dc0180b3e06aac57209e | 852 | py | Python | dataset_creation/description_task2.py | rmorain/kirby | ef115dbaed4acd1b23c3e10ca3b496f05b9a2382 | [
"Apache-2.0"
] | 1 | 2021-08-30T11:46:20.000Z | 2021-08-30T11:46:20.000Z | dataset_creation/description_task2.py | rmorain/kirby | ef115dbaed4acd1b23c3e10ca3b496f05b9a2382 | [
"Apache-2.0"
] | 36 | 2020-11-18T20:19:33.000Z | 2021-08-03T23:31:12.000Z | dataset_creation/description_task2.py | rmorain/kirby | ef115dbaed4acd1b23c3e10ca3b496f05b9a2382 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from tqdm import tqdm
data_list = []
def get_questions(row):
global data_list
random_samples = df.sample(n=num_choices - 1)
distractors = random_samples["description"].tolist()
data = {
"question": "What is " + row["label"] + "?",
"correct": row["description"],
... | 24.342857 | 83 | 0.664319 | 110 | 852 | 4.918182 | 0.5 | 0.05915 | 0.07024 | 0.099815 | 0.121996 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007184 | 0.183099 | 852 | 34 | 84 | 25.058824 | 0.770115 | 0 | 0 | 0 | 0 | 0 | 0.252347 | 0.130282 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038462 | false | 0 | 0.115385 | 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 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
603b2fa764ceaa795942b2f9977849ffd27b7101 | 2,776 | py | Python | scarab/commands/attach.py | gonzoua/scarab | b86474527b7b2ec30710ae79ea3f1cf5b7a93005 | [
"BSD-2-Clause"
] | 5 | 2018-09-01T01:42:43.000Z | 2019-01-04T21:32:55.000Z | scarab/commands/attach.py | gonzoua/scarab | b86474527b7b2ec30710ae79ea3f1cf5b7a93005 | [
"BSD-2-Clause"
] | 1 | 2019-09-18T17:06:11.000Z | 2019-11-29T18:35:08.000Z | scarab/commands/attach.py | gonzoua/scarab | b86474527b7b2ec30710ae79ea3f1cf5b7a93005 | [
"BSD-2-Clause"
] | null | null | null | # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
"""
'attach' command implementation'''
"""
from base64 import b64encode
import argparse
import magic
from ..bugzilla import BugzillaError
from ..context import bugzilla_instance
from .. import ui
from .base import Base
class Command(Base):
"""Attach file to... | 39.098592 | 98 | 0.617075 | 331 | 2,776 | 5.069486 | 0.314199 | 0.065554 | 0.050656 | 0.027414 | 0.02503 | 0.02503 | 0 | 0 | 0 | 0 | 0 | 0.004356 | 0.255764 | 2,776 | 70 | 99 | 39.657143 | 0.807841 | 0.082853 | 0 | 0.153846 | 0 | 0 | 0.159064 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038462 | false | 0 | 0.134615 | 0 | 0.192308 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
603b6cd04fd9a00dac3c017eb36ba4659fec0677 | 330 | py | Python | LeetCode/python3/287.py | ZintrulCre/LeetCode_Archiver | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 279 | 2019-02-19T16:00:32.000Z | 2022-03-23T12:16:30.000Z | LeetCode/python3/287.py | ZintrulCre/LeetCode_Archiver | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 2 | 2019-03-31T08:03:06.000Z | 2021-03-07T04:54:32.000Z | LeetCode/python3/287.py | ZintrulCre/LeetCode_Crawler | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 12 | 2019-01-29T11:45:32.000Z | 2019-02-04T16:31:46.000Z | class Solution:
def findDuplicate(self, nums: List[int]) -> int:
p1, p2 = nums[0], nums[nums[0]]
while nums[p1] != nums[p2]:
p1 = nums[p1]
p2 = nums[nums[p2]]
p2 = 0
while nums[p1] != nums[p2]:
p1 = nums[p1]
p2 = nums[p2]
return... | 27.5 | 52 | 0.454545 | 44 | 330 | 3.409091 | 0.295455 | 0.2 | 0.16 | 0.16 | 0.426667 | 0.426667 | 0.426667 | 0.426667 | 0.426667 | 0.426667 | 0 | 0.095 | 0.393939 | 330 | 11 | 53 | 30 | 0.655 | 0 | 0 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0 | 0 | 0.272727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
603c4a28289b42faa48ea562130b7e8125179bd8 | 2,327 | py | Python | modules/google-earth-engine/docker/src/sepalinternal/gee.py | BuddyVolly/sepal | 6a2356a88940a36568b1d83ba3aeaae4283d5445 | [
"MIT"
] | 153 | 2015-10-23T09:00:08.000Z | 2022-03-19T03:24:04.000Z | modules/google-earth-engine/docker/src/sepalinternal/gee.py | BuddyVolly/sepal | 6a2356a88940a36568b1d83ba3aeaae4283d5445 | [
"MIT"
] | 165 | 2015-09-24T09:53:06.000Z | 2022-03-31T09:55:06.000Z | modules/google-earth-engine/docker/src/sepalinternal/gee.py | BuddyVolly/sepal | 6a2356a88940a36568b1d83ba3aeaae4283d5445 | [
"MIT"
] | 46 | 2016-07-10T10:40:09.000Z | 2021-11-14T01:07:33.000Z | import json
from threading import Semaphore
import ee
from flask import request
from google.auth import crypt
from google.oauth2 import service_account
from google.oauth2.credentials import Credentials
service_account_credentials = None
import logging
export_semaphore = Semaphore(5)
get_info_semaphore = Semaphore(2)... | 27.376471 | 74 | 0.685862 | 293 | 2,327 | 5.187713 | 0.327645 | 0.055263 | 0.098684 | 0.071053 | 0.116447 | 0.084211 | 0.084211 | 0.084211 | 0.084211 | 0.084211 | 0 | 0.002735 | 0.214439 | 2,327 | 84 | 75 | 27.702381 | 0.828775 | 0 | 0 | 0.090909 | 0 | 0 | 0.078642 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.106061 | false | 0 | 0.121212 | 0 | 0.257576 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
603e1db8585ef18d062d93564593d2084f744fc9 | 14,585 | py | Python | PyIK/src/litearm.py | AliShug/EvoArm | a5dea204914ee1e25867e4412e88d245329316f2 | [
"CC-BY-3.0"
] | 110 | 2017-01-13T17:19:18.000Z | 2022-02-20T06:50:03.000Z | PyIK/src/litearm.py | igcxl/EvoArm | a5dea204914ee1e25867e4412e88d245329316f2 | [
"CC-BY-3.0"
] | 1 | 2018-08-30T07:27:56.000Z | 2018-08-30T07:27:56.000Z | PyIK/src/litearm.py | igcxl/EvoArm | a5dea204914ee1e25867e4412e88d245329316f2 | [
"CC-BY-3.0"
] | 47 | 2017-03-10T20:34:01.000Z | 2021-11-18T03:44:06.000Z | from __future__ import print_function
import numpy as np
import struct
import solvers
import pid
from util import *
MOTORSPEED = 0.9
MOTORMARGIN = 1
MOTORSLOPE = 30
ERRORLIM = 5.0
class ArmConfig:
"""Holds an arm's proportions, limits and other configuration data"""
def __init__(self,
main... | 37.397436 | 98 | 0.58471 | 1,630 | 14,585 | 5.094479 | 0.176074 | 0.042148 | 0.01409 | 0.010959 | 0.212066 | 0.163656 | 0.142582 | 0.110549 | 0.079359 | 0.079359 | 0 | 0.02075 | 0.329242 | 14,585 | 389 | 99 | 37.493573 | 0.828069 | 0.117449 | 0 | 0.2 | 0 | 0 | 0.026805 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111864 | false | 0 | 0.020339 | 0.040678 | 0.237288 | 0.013559 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60422bea81360e85bf0b5cf68c083ffc23ea9d15 | 2,867 | py | Python | flux/migrations/versions/9ba67b798fa_add_request_system.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | flux/migrations/versions/9ba67b798fa_add_request_system.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | flux/migrations/versions/9ba67b798fa_add_request_system.py | siq/flux | ca7563deb9ebef14840bbf0cb7bab4d9478b2470 | [
"Linux-OpenIB"
] | null | null | null | """add_request_system
Revision: 9ba67b798fa
Revises: 31b92bf6506d
Created: 2013-07-23 02:49:09.342814
"""
revision = '9ba67b798fa'
down_revision = '31b92bf6506d'
from alembic import op
from spire.schema.fields import *
from spire.mesh import SurrogateType
from sqlalchemy import (Column, ForeignKey, ForeignKeyConstra... | 39.273973 | 87 | 0.659226 | 277 | 2,867 | 6.718412 | 0.231047 | 0.13971 | 0.163353 | 0.111231 | 0.51424 | 0.51424 | 0.475551 | 0.475551 | 0.475551 | 0.43525 | 0 | 0.020443 | 0.181025 | 2,867 | 72 | 88 | 39.819444 | 0.772147 | 0.034531 | 0 | 0.403226 | 0 | 0 | 0.161173 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032258 | false | 0 | 0.080645 | 0 | 0.112903 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
604745505e3f84cc6af47e088784a1a28b715d2a | 1,418 | py | Python | fsspec/tests/test_mapping.py | sodre/filesystem_spec | 5fe51c5e85366b57a11ed66637a940970372ea4b | [
"BSD-3-Clause"
] | null | null | null | fsspec/tests/test_mapping.py | sodre/filesystem_spec | 5fe51c5e85366b57a11ed66637a940970372ea4b | [
"BSD-3-Clause"
] | null | null | null | fsspec/tests/test_mapping.py | sodre/filesystem_spec | 5fe51c5e85366b57a11ed66637a940970372ea4b | [
"BSD-3-Clause"
] | null | null | null | import os
import fsspec
from fsspec.implementations.memory import MemoryFileSystem
import pickle
import pytest
def test_mapping_prefix(tmpdir):
tmpdir = str(tmpdir)
os.makedirs(os.path.join(tmpdir, "afolder"))
open(os.path.join(tmpdir, "afile"), "w").write("test")
open(os.path.join(tmpdir, "afolder", ... | 22.870968 | 76 | 0.612835 | 198 | 1,418 | 4.323232 | 0.358586 | 0.063084 | 0.046729 | 0.074766 | 0.273364 | 0.065421 | 0 | 0 | 0 | 0 | 0 | 0.016115 | 0.212271 | 1,418 | 61 | 77 | 23.245902 | 0.750224 | 0.062764 | 0 | 0.214286 | 0 | 0 | 0.116139 | 0 | 0 | 0 | 0 | 0 | 0.309524 | 1 | 0.095238 | false | 0 | 0.119048 | 0 | 0.214286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6047d157ca53f47cf0fb3523f60398cfb109d425 | 990 | py | Python | testedome/questions/quest_5.py | EderReisS/pythonChallenges | a880358c2cb4de0863f4b4cada36b3d439a8a018 | [
"MIT"
] | null | null | null | testedome/questions/quest_5.py | EderReisS/pythonChallenges | a880358c2cb4de0863f4b4cada36b3d439a8a018 | [
"MIT"
] | null | null | null | testedome/questions/quest_5.py | EderReisS/pythonChallenges | a880358c2cb4de0863f4b4cada36b3d439a8a018 | [
"MIT"
] | 1 | 2021-07-29T23:20:17.000Z | 2021-07-29T23:20:17.000Z | """
A
/ |
B C
'B, C'
"""
class CategoryTree:
def __init__(self):
self.root = {}
self.all_categories = []
def add_category(self, category, parent):
if category in self.all_categories:
raise KeyError(f"{category} exists")
if parent is None:
self.r... | 22 | 51 | 0.559596 | 124 | 990 | 4.290323 | 0.298387 | 0.105263 | 0.095865 | 0.071429 | 0.25188 | 0.172932 | 0.172932 | 0.172932 | 0.172932 | 0.172932 | 0 | 0 | 0.293939 | 990 | 44 | 52 | 22.5 | 0.761087 | 0.019192 | 0 | 0.153846 | 0 | 0 | 0.06875 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.115385 | false | 0 | 0 | 0 | 0.192308 | 0.076923 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
604a3acc24feaf58c41a047512c8f6cf4cc0bdd1 | 1,397 | py | Python | scripts/multiplayer/server.py | AgnirudraSil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | 3 | 2022-01-11T06:11:08.000Z | 2022-03-10T09:34:42.000Z | scripts/multiplayer/server.py | agnirudrasil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | null | null | null | scripts/multiplayer/server.py | agnirudrasil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | null | null | null | import pickle
import socket
import _thread
from scripts.multiplayer import game, board, tetriminos
server = "192.168.29.144"
port = 5555
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.bind((server, port))
except socket.error as e:
print(e)
s.listen()
print("Waiting for connection")
connected ... | 18.878378 | 65 | 0.536149 | 170 | 1,397 | 4.335294 | 0.458824 | 0.032564 | 0.048847 | 0.05156 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034254 | 0.352183 | 1,397 | 73 | 66 | 19.136986 | 0.780111 | 0 | 0 | 0.236364 | 0 | 0 | 0.055834 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018182 | false | 0.018182 | 0.072727 | 0 | 0.090909 | 0.090909 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
604b01d7a386918b107512b8c4b02b4727b0197f | 2,311 | py | Python | AdventOfCode/2018/src/day-03/app.py | AustinTSchaffer/DailyProgrammer | b16d9babb298ac5e879c514f9c4646b99c6860a8 | [
"MIT"
] | 1 | 2020-07-28T17:07:35.000Z | 2020-07-28T17:07:35.000Z | AdventOfCode/2018/src/day-03/app.py | AustinTSchaffer/DailyProgrammer | b16d9babb298ac5e879c514f9c4646b99c6860a8 | [
"MIT"
] | 5 | 2021-04-06T18:25:29.000Z | 2021-04-10T15:13:28.000Z | AdventOfCode/2018/src/day-03/app.py | AustinTSchaffer/DailyProgrammer | b16d9babb298ac5e879c514f9c4646b99c6860a8 | [
"MIT"
] | null | null | null | import os
import re
from collections import defaultdict
class Claim(object):
def __init__(self, data_row):
match = re.match(r'#(\d+) @ (\d+),(\d+): (\d+)x(\d+)', data_row)
self.id = int(match[1])
self.x = int(match[2])
self.y = int(match[3])
self.width = int(match[4])
... | 32.097222 | 73 | 0.638685 | 312 | 2,311 | 4.544872 | 0.400641 | 0.050776 | 0.076164 | 0.040197 | 0.091678 | 0.050776 | 0.050776 | 0 | 0 | 0 | 0 | 0.007084 | 0.266984 | 2,311 | 71 | 74 | 32.549296 | 0.829988 | 0.225011 | 0 | 0.041667 | 0 | 0 | 0.053295 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.104167 | false | 0 | 0.0625 | 0 | 0.229167 | 0.041667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
604ecfc2153a2b8f83182b3e8a28bd46fb2056eb | 8,479 | py | Python | tests/views/test_admin_committee_questions.py | Lunga001/pmg-cms-2 | 10cea3979711716817b0ba2a41987df73f2c7642 | [
"Apache-2.0"
] | 2 | 2019-06-11T20:46:43.000Z | 2020-08-27T22:50:32.000Z | tests/views/test_admin_committee_questions.py | Lunga001/pmg-cms-2 | 10cea3979711716817b0ba2a41987df73f2c7642 | [
"Apache-2.0"
] | 70 | 2017-05-26T14:04:06.000Z | 2021-06-30T10:21:58.000Z | tests/views/test_admin_committee_questions.py | OpenUpSA/pmg-cms-2 | ec5f259dae81674ac7a8cdb80f124a8b0f167780 | [
"Apache-2.0"
] | 4 | 2017-08-29T10:09:30.000Z | 2021-05-25T11:29:03.000Z | import os
from urllib.parse import urlparse, parse_qs
from builtins import str
from tests import PMGLiveServerTestCase
from pmg.models import db, Committee, CommitteeQuestion
from tests.fixtures import dbfixture, UserData, CommitteeData, MembershipData
from flask import escape
from io import BytesIO
class TestAdminCo... | 45.342246 | 927 | 0.644416 | 1,004 | 8,479 | 5.331673 | 0.276892 | 0.053241 | 0.055857 | 0.034747 | 0.594807 | 0.538577 | 0.530544 | 0.515599 | 0.515599 | 0.515599 | 0 | 0.021512 | 0.265361 | 8,479 | 186 | 928 | 45.586022 | 0.837855 | 0.06121 | 0 | 0.583893 | 0 | 0.026846 | 0.354471 | 0.046164 | 0 | 0 | 0 | 0 | 0.161074 | 1 | 0.040268 | false | 0 | 0.053691 | 0 | 0.107383 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60518bb19a47173a8268f88acf5e74e628053642 | 4,866 | py | Python | syloga/transform/evaluation.py | xaedes/python-symbolic-logic-to-gate | a0dc9be9e04290008cf709fac789d224ab8c14b0 | [
"MIT"
] | null | null | null | syloga/transform/evaluation.py | xaedes/python-symbolic-logic-to-gate | a0dc9be9e04290008cf709fac789d224ab8c14b0 | [
"MIT"
] | null | null | null | syloga/transform/evaluation.py | xaedes/python-symbolic-logic-to-gate | a0dc9be9e04290008cf709fac789d224ab8c14b0 | [
"MIT"
] | null | null | null |
from syloga.core.map_expression_args import map_expression_args
from syloga.utils.identity import identity
from syloga.ast.BooleanNot import BooleanNot
from syloga.ast.BooleanValue import BooleanValue
from syloga.ast.BooleanOr import BooleanOr
from syloga.ast.BooleanAnd import BooleanAnd
from syloga.ast.BooleanNand i... | 36.313433 | 102 | 0.621661 | 605 | 4,866 | 4.816529 | 0.117355 | 0.090597 | 0.048044 | 0.031229 | 0.411119 | 0.321208 | 0.229581 | 0.229581 | 0.200069 | 0.173301 | 0 | 0.004545 | 0.276613 | 4,866 | 133 | 103 | 36.586466 | 0.823295 | 0.088368 | 0 | 0.235955 | 0 | 0 | 0.003617 | 0 | 0 | 0 | 0 | 0 | 0.011236 | 1 | 0.022472 | false | 0 | 0.11236 | 0 | 0.393258 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
605202551fbb724a7df19cd7d70079bcc8b5e6d2 | 2,753 | py | Python | oscar/apps/customer/mixins.py | Idematica/django-oscar | 242a0654210d63ba75f798788916c8b2f7abb7fb | [
"BSD-3-Clause"
] | 1 | 2015-08-02T05:36:11.000Z | 2015-08-02T05:36:11.000Z | oscar/apps/customer/mixins.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/customer/mixins.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.contrib.auth import authenticate, login as auth_login
from django.contrib.sites.models import get_current_site
from django.db.models import get_model
from oscar.apps.customer.signals import user_registered
from oscar.core.loading import get_class
from oscar.core.compat impor... | 34.848101 | 79 | 0.670904 | 337 | 2,753 | 5.32641 | 0.430267 | 0.035097 | 0.020056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001458 | 0.252815 | 2,753 | 78 | 80 | 35.294872 | 0.871172 | 0.230294 | 0 | 0 | 0 | 0 | 0.066116 | 0.024793 | 0 | 0 | 0 | 0 | 0 | 1 | 0.086957 | false | 0.021739 | 0.152174 | 0.021739 | 0.413043 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60522d3489fa0c5b3c558dbb7d715900c3bb9392 | 2,421 | py | Python | plot_integral.py | vfloeser/TumorDelivery | a48252c17b50397b1f51be21c0cf65ade87e9000 | [
"Apache-2.0"
] | null | null | null | plot_integral.py | vfloeser/TumorDelivery | a48252c17b50397b1f51be21c0cf65ade87e9000 | [
"Apache-2.0"
] | null | null | null | plot_integral.py | vfloeser/TumorDelivery | a48252c17b50397b1f51be21c0cf65ade87e9000 | [
"Apache-2.0"
] | null | null | null | from parameters import *
from library_time import *
from paths import *
import numpy as np
import pylab as plt
import matplotlib.pyplot as mplt
mplt.rc('text', usetex=True)
mplt.rcParams.update({'font.size': 16})
import logging, getopt, sys
import time
import os
#####################################################... | 33.164384 | 90 | 0.467575 | 299 | 2,421 | 3.745819 | 0.41806 | 0.048214 | 0.040179 | 0.049107 | 0.1125 | 0.1125 | 0.073214 | 0.073214 | 0.073214 | 0.073214 | 0 | 0.052311 | 0.1867 | 2,421 | 73 | 91 | 33.164384 | 0.516506 | 0.077654 | 0 | 0 | 0 | 0 | 0.140476 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.176471 | 0 | 0.176471 | 0.039216 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
605585efa2db2b321777e037a609b7a6f87c04a9 | 686 | py | Python | main.py | Dr3xler/CookieConsentChecker | 816cdfb9d9dc741c57dbcd5e9c9ef59837196631 | [
"MIT"
] | null | null | null | main.py | Dr3xler/CookieConsentChecker | 816cdfb9d9dc741c57dbcd5e9c9ef59837196631 | [
"MIT"
] | 3 | 2021-04-29T22:57:09.000Z | 2021-05-03T15:32:39.000Z | main.py | Dr3xler/CookieConsentChecker | 816cdfb9d9dc741c57dbcd5e9c9ef59837196631 | [
"MIT"
] | 1 | 2021-08-29T09:53:09.000Z | 2021-08-29T09:53:09.000Z | from core import file_handling as file_h, driver_handling as driver_h
from website_handling import website_check as wc
from cookie_handling import cookie_compare
websites = file_h.website_reader()
driver = driver_h.webdriver_setup()
try:
wc.load_with_addon(driver, websites)
except:
print('ERROR: IN FIREFO... | 20.176471 | 73 | 0.781341 | 100 | 686 | 5.13 | 0.42 | 0.040936 | 0.050682 | 0.08577 | 0.413255 | 0.413255 | 0.2846 | 0.140351 | 0 | 0 | 0 | 0 | 0.150146 | 686 | 33 | 74 | 20.787879 | 0.879931 | 0.103499 | 0 | 0.526316 | 0 | 0 | 0.111475 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.157895 | 0 | 0.157895 | 0.105263 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60558cb725da5275f2069f7bb3c1bb96b154754f | 4,788 | py | Python | PyPBEC/OpticalMedium.py | photonbec/PyPBEC | fd68fa3e6206671e731bc0c2973af1f67d704f05 | [
"MIT"
] | 1 | 2020-09-07T10:21:52.000Z | 2020-09-07T10:21:52.000Z | PyPBEC/OpticalMedium.py | photonbec/PyPBEC | fd68fa3e6206671e731bc0c2973af1f67d704f05 | [
"MIT"
] | null | null | null | PyPBEC/OpticalMedium.py | photonbec/PyPBEC | fd68fa3e6206671e731bc0c2973af1f67d704f05 | [
"MIT"
] | 1 | 2022-02-04T00:00:59.000Z | 2022-02-04T00:00:59.000Z | import numpy as np
from scipy import constants as sc
from scipy.interpolate import interp1d
from pathlib import Path
from scipy.special import erf as Erf
import pandas as pd
import sys
import os
import csv
class OpticalMedium():
available_media = list()
available_media.append("Rhodamine6G")
def __init__(self, opt... | 38.304 | 154 | 0.746658 | 695 | 4,788 | 4.910791 | 0.238849 | 0.041899 | 0.007325 | 0.010255 | 0.43598 | 0.334603 | 0.293583 | 0.277176 | 0.21506 | 0.186932 | 0 | 0.024466 | 0.129282 | 4,788 | 125 | 155 | 38.304 | 0.794195 | 0.168546 | 0 | 0 | 0 | 0 | 0.120698 | 0.029007 | 0 | 0 | 0 | 0 | 0 | 1 | 0.115942 | false | 0.014493 | 0.130435 | 0.043478 | 0.376812 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60563aa2ef81de63dbaea0f3ad170ec8ec84759d | 1,251 | py | Python | corehq/apps/appstore/urls.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | corehq/apps/appstore/urls.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/appstore/urls.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls.defaults import url, include, patterns
from corehq.apps.appstore.dispatcher import AppstoreDispatcher
store_urls = patterns('corehq.apps.appstore.views',
url(r'^$', 'appstore_default', name="appstore_interfaces_default"),
AppstoreDispatcher.url_pattern(),
)
urlpatterns = patterns('corehq... | 46.333333 | 96 | 0.657074 | 157 | 1,251 | 5.050955 | 0.248408 | 0.065574 | 0.070618 | 0.083228 | 0.21942 | 0.15889 | 0.108449 | 0.108449 | 0 | 0 | 0 | 0 | 0.095124 | 1,251 | 26 | 97 | 48.115385 | 0.70053 | 0 | 0 | 0 | 0 | 0 | 0.5336 | 0.2784 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.15 | 0 | 0.15 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6057750dc6cf45d0cc166a95aaf751e85207651a | 2,667 | py | Python | faster-rcnn-vgg16-fpn/model/fpn.py | fengkaibit/faster-rcnn_vgg16_fpn | 354efd4b5f4d4a42e9c92f48501e02cd7f0c0cdb | [
"MIT"
] | 13 | 2019-05-21T13:19:56.000Z | 2022-02-27T14:36:43.000Z | faster-rcnn-vgg16-fpn/model/fpn.py | fengkaibit/faster-rcnn_vgg16_fpn | 354efd4b5f4d4a42e9c92f48501e02cd7f0c0cdb | [
"MIT"
] | 2 | 2019-06-27T07:02:33.000Z | 2021-06-30T15:51:12.000Z | faster-rcnn-vgg16-fpn/model/fpn.py | fengkaibit/faster-rcnn_vgg16_fpn | 354efd4b5f4d4a42e9c92f48501e02cd7f0c0cdb | [
"MIT"
] | 4 | 2019-05-21T13:19:56.000Z | 2021-06-29T01:10:31.000Z | from __future__ import absolute_import
import torch
from torch.nn import functional
class FPN(torch.nn.Module):
def __init__(self, out_channels):
super(FPN, self).__init__()
self.out_channels = out_channels
self.P5 = torch.nn.MaxPool2d(kernel_size=1, stride=2, padding=0)
self.P4_c... | 37.041667 | 99 | 0.640045 | 409 | 2,667 | 3.95599 | 0.278729 | 0.081582 | 0.101978 | 0.030902 | 0.302225 | 0.28492 | 0.28492 | 0.2089 | 0.2089 | 0.2089 | 0 | 0.066634 | 0.240345 | 2,667 | 72 | 100 | 37.041667 | 0.731984 | 0.235471 | 0 | 0 | 0 | 0 | 0.004199 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.105263 | false | 0 | 0.078947 | 0 | 0.263158 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6057d15e673e5e8174ccbf2844dfdc2c7b7a4b7d | 2,314 | py | Python | test/setups/finders/finders_test.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 40 | 2015-04-15T09:40:23.000Z | 2022-02-11T11:07:24.000Z | test/setups/finders/finders_test.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 19 | 2015-04-15T18:34:53.000Z | 2018-11-17T00:11:05.000Z | test/setups/finders/finders_test.py | bowlofstew/client | 0d5ae42aaf9863e3871828b6df06170aad17c560 | [
"MIT"
] | 22 | 2015-04-15T09:45:46.000Z | 2020-09-29T17:04:19.000Z | import unittest
from biicode.common.settings.version import Version
from mock import patch
from biicode.client.setups.finders.finders import gnu_version
from biicode.client.setups.rpi_cross_compiler import find_gnu_arm
from biicode.client.workspace.bii_paths import get_biicode_env_folder_path
GCC_VERSION_MAC = '''Con... | 44.5 | 139 | 0.709594 | 329 | 2,314 | 4.796353 | 0.370821 | 0.050697 | 0.009506 | 0.041825 | 0.413181 | 0.342205 | 0.321926 | 0.257288 | 0.257288 | 0.207858 | 0 | 0.032008 | 0.162921 | 2,314 | 51 | 140 | 45.372549 | 0.782654 | 0 | 0 | 0.142857 | 0 | 0.047619 | 0.39153 | 0.120138 | 0 | 0 | 0 | 0 | 0.142857 | 1 | 0.047619 | false | 0 | 0.142857 | 0 | 0.214286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
605a9a49370c1c190ccbd51f63a583f9a84128cd | 5,152 | py | Python | utilities.py | ameldocena/StratifiedAggregation | 0031fea120bff00c739eb6c3d654a5c6d3f094bb | [
"MIT"
] | null | null | null | utilities.py | ameldocena/StratifiedAggregation | 0031fea120bff00c739eb6c3d654a5c6d3f094bb | [
"MIT"
] | null | null | null | utilities.py | ameldocena/StratifiedAggregation | 0031fea120bff00c739eb6c3d654a5c6d3f094bb | [
"MIT"
] | null | null | null | import random
import numpy
#import tensorflow as tf
#import torch
from abc import abstractmethod
from sklearn.decomposition import PCA
from aggregators import FedAvg, MultiKrum, AlignedAvg, TrimmedMean, Median, StratifiedAggr
class SelectionStrategy:
# Unchanged from original work
@abstractmethod
def select_ro... | 39.030303 | 147 | 0.695652 | 627 | 5,152 | 5.567783 | 0.295056 | 0.051561 | 0.032083 | 0.030937 | 0.210828 | 0.118591 | 0.118591 | 0.07505 | 0.07505 | 0.044686 | 0 | 0.006144 | 0.21021 | 5,152 | 132 | 148 | 39.030303 | 0.851806 | 0.367818 | 0 | 0.071429 | 0 | 0 | 0.132491 | 0.013929 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.089286 | 0.017857 | 0.482143 | 0.071429 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
605ad59a9efe4d2c5632efa0fb33e3ddefc540bb | 1,301 | py | Python | game/player.py | b1naryth1ef/mmo | 400f66b0ac76896af2d7108ff3540c42614a32f0 | [
"BSD-2-Clause"
] | 7 | 2015-09-29T13:32:36.000Z | 2021-06-22T19:24:01.000Z | game/player.py | b1naryth1ef/mmo | 400f66b0ac76896af2d7108ff3540c42614a32f0 | [
"BSD-2-Clause"
] | null | null | null | game/player.py | b1naryth1ef/mmo | 400f66b0ac76896af2d7108ff3540c42614a32f0 | [
"BSD-2-Clause"
] | 1 | 2019-03-03T23:24:28.000Z | 2019-03-03T23:24:28.000Z | from sprites import PlayerSprite
import time
class Player(object):
def __init__(self, name, game):
self.name = name
self.pos = [50, 50]
self.do_blit = False
self.game = game
self.surf = game.SCREEN
self.lastMove = 99999999999
self.velo_def = [0, 0]
... | 30.255814 | 75 | 0.544965 | 186 | 1,301 | 3.752688 | 0.274194 | 0.08596 | 0.057307 | 0.08596 | 0.157593 | 0.094556 | 0.094556 | 0.094556 | 0.094556 | 0.094556 | 0 | 0.046591 | 0.323597 | 1,301 | 43 | 76 | 30.255814 | 0.746591 | 0.071483 | 0 | 0.117647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.088235 | false | 0 | 0.058824 | 0 | 0.176471 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
605b1532a73c491b1c591dcd0c51687f13109748 | 1,019 | py | Python | toys/layers/pool.py | cbarrick/toys | 0368036ddb7594c0b6e7cdc704aeec918786e58a | [
"MIT"
] | 1 | 2018-04-28T18:29:37.000Z | 2018-04-28T18:29:37.000Z | toys/layers/pool.py | cbarrick/csb | 0368036ddb7594c0b6e7cdc704aeec918786e58a | [
"MIT"
] | null | null | null | toys/layers/pool.py | cbarrick/csb | 0368036ddb7594c0b6e7cdc704aeec918786e58a | [
"MIT"
] | null | null | null | from typing import Sequence
import torch
from torch import nn
class MaxPool2d(nn.Module):
def __init__(self, kernel_size, **kwargs):
super().__init__()
stride = kwargs.setdefault('stride', kernel_size)
padding = kwargs.setdefault('padding', 0)
dilation = kwargs.setdefault('dilatio... | 33.966667 | 67 | 0.62316 | 125 | 1,019 | 4.88 | 0.328 | 0.131148 | 0.062295 | 0.065574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006527 | 0.248283 | 1,019 | 29 | 68 | 35.137931 | 0.789817 | 0 | 0 | 0 | 0 | 0 | 0.062807 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.125 | 0 | 0.291667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
605ed3488c51cb7e0a5749161c5e9f3896da6586 | 1,792 | py | Python | fastseg/model/utils.py | SeockHwa/Segmentation_mobileV3 | 01d90eeb32232346b8ed071eaf5d03322049be11 | [
"MIT"
] | 274 | 2020-08-12T00:29:30.000Z | 2022-03-29T18:24:40.000Z | fastseg/model/utils.py | dcmartin/fastseg | c30759e07a52c7370eda11a93396c79f2b141778 | [
"MIT"
] | 10 | 2020-08-13T06:15:14.000Z | 2021-03-30T16:12:31.000Z | fastseg/model/utils.py | dcmartin/fastseg | c30759e07a52c7370eda11a93396c79f2b141778 | [
"MIT"
] | 27 | 2020-08-12T00:29:21.000Z | 2021-12-09T02:32:36.000Z | import torch.nn as nn
from .efficientnet import EfficientNet_B4, EfficientNet_B0
from .mobilenetv3 import MobileNetV3_Large, MobileNetV3_Small
def get_trunk(trunk_name):
"""Retrieve the pretrained network trunk and channel counts"""
if trunk_name == 'efficientnet_b4':
backbone = EfficientNet_B4(pretra... | 35.137255 | 84 | 0.651786 | 235 | 1,792 | 4.719149 | 0.408511 | 0.048693 | 0.049594 | 0.064923 | 0.13706 | 0.13706 | 0.088368 | 0.066727 | 0.066727 | 0.066727 | 0 | 0.045865 | 0.257813 | 1,792 | 50 | 85 | 35.84 | 0.78797 | 0.140625 | 0 | 0.125 | 0 | 0 | 0.054749 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.075 | false | 0 | 0.075 | 0 | 0.225 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
606417a48449b07f2cec077fb5c3441648a8cb09 | 30,091 | py | Python | echopype/model/modelbase.py | leewujung/echopype-lfs-test | b76dcf42631d0ac9cef0efeced9be4afdc15e659 | [
"Apache-2.0"
] | null | null | null | echopype/model/modelbase.py | leewujung/echopype-lfs-test | b76dcf42631d0ac9cef0efeced9be4afdc15e659 | [
"Apache-2.0"
] | null | null | null | echopype/model/modelbase.py | leewujung/echopype-lfs-test | b76dcf42631d0ac9cef0efeced9be4afdc15e659 | [
"Apache-2.0"
] | null | null | null | """
echopype data model that keeps tracks of echo data and
its connection to data files.
"""
import os
import warnings
import datetime as dt
from echopype.utils import uwa
import numpy as np
import xarray as xr
class ModelBase(object):
"""Class for manipulating echo data that is already converted to netCDF."""
... | 47.763492 | 123 | 0.618557 | 4,041 | 30,091 | 4.377629 | 0.112348 | 0.042058 | 0.032561 | 0.024421 | 0.548785 | 0.501583 | 0.481402 | 0.439288 | 0.396099 | 0.364613 | 0 | 0.003939 | 0.299691 | 30,091 | 629 | 124 | 47.839428 | 0.835524 | 0.329534 | 0 | 0.269341 | 0 | 0 | 0.102349 | 0.002517 | 0 | 0 | 0 | 0.006359 | 0 | 1 | 0.091691 | false | 0 | 0.017192 | 0.022923 | 0.154728 | 0.077364 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60648a56773ceecb201aec8a10a45d6b2f493b08 | 2,755 | py | Python | Python/face_detect_camera/managers.py | abondar24/OpenCVBase | 9b23e3b31304e77ad1135d90efb41e3dc069194a | [
"Apache-2.0"
] | null | null | null | Python/face_detect_camera/managers.py | abondar24/OpenCVBase | 9b23e3b31304e77ad1135d90efb41e3dc069194a | [
"Apache-2.0"
] | null | null | null | Python/face_detect_camera/managers.py | abondar24/OpenCVBase | 9b23e3b31304e77ad1135d90efb41e3dc069194a | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import time
class CaptureManager(object):
def __init__(self, capture, preview_window_manager=None, should_mirror_preview = False):
self.preview_window_manager = preview_window_manager
self.should_mirror_preview = should_mirror_preview
self._capture = capture... | 28.697917 | 93 | 0.642468 | 334 | 2,755 | 4.967066 | 0.230539 | 0.048825 | 0.072333 | 0.057866 | 0.18264 | 0.100663 | 0.063291 | 0 | 0 | 0 | 0 | 0.006082 | 0.283848 | 2,755 | 95 | 94 | 29 | 0.834769 | 0.044646 | 0 | 0.238806 | 0 | 0 | 0.019421 | 0 | 0 | 0 | 0.001523 | 0 | 0.014925 | 1 | 0.179104 | false | 0 | 0.044776 | 0.044776 | 0.328358 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6064dc0f50d6a2d8e20ae50d87b6b6f9606110f6 | 6,937 | py | Python | ELLA/ELLA.py | micaelverissimo/lifelong_ringer | d2e7173ce08d1c087e811f6451cae1cb0e381076 | [
"MIT"
] | null | null | null | ELLA/ELLA.py | micaelverissimo/lifelong_ringer | d2e7173ce08d1c087e811f6451cae1cb0e381076 | [
"MIT"
] | null | null | null | ELLA/ELLA.py | micaelverissimo/lifelong_ringer | d2e7173ce08d1c087e811f6451cae1cb0e381076 | [
"MIT"
] | null | null | null | """ Alpha version of a version of ELLA that plays nicely with sklearn
@author: Paul Ruvolo
"""
from math import log
import numpy as np
from scipy.special import logsumexp
from scipy.linalg import sqrtm, inv, norm
from sklearn.linear_model import LinearRegression, Ridge, LogisticRegression, Lasso
import matplotlib.pyp... | 49.198582 | 119 | 0.618135 | 974 | 6,937 | 4.285421 | 0.213552 | 0.081696 | 0.057499 | 0.015812 | 0.376378 | 0.327743 | 0.295879 | 0.291088 | 0.287734 | 0.259224 | 0 | 0.010459 | 0.283264 | 6,937 | 141 | 120 | 49.198582 | 0.829043 | 0.313824 | 0 | 0.139241 | 0 | 0 | 0.03324 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.101266 | false | 0 | 0.088608 | 0 | 0.303797 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60652bf0a5fb58eb37f612eac700378eff72f02f | 1,970 | py | Python | webhook/utils.py | Myst1c-a/phen-cogs | 672f9022ddbbd9a84b0a05357347e99e64a776fc | [
"MIT"
] | null | null | null | webhook/utils.py | Myst1c-a/phen-cogs | 672f9022ddbbd9a84b0a05357347e99e64a776fc | [
"MIT"
] | null | null | null | webhook/utils.py | Myst1c-a/phen-cogs | 672f9022ddbbd9a84b0a05357347e99e64a776fc | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020-present phenom4n4n
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, pub... | 35.818182 | 96 | 0.740102 | 287 | 1,970 | 5.020906 | 0.56446 | 0.061069 | 0.018043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012891 | 0.173096 | 1,970 | 54 | 97 | 36.481481 | 0.8717 | 0.545178 | 0 | 0 | 0 | 0.043478 | 0.143018 | 0.100225 | 0 | 0 | 0 | 0 | 0 | 1 | 0.043478 | false | 0 | 0.130435 | 0 | 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 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6066634d419973bf2d50293d1e8b24d66fea6c84 | 3,554 | py | Python | feed/tests/test_consts.py | cul-it/arxiv-rss | 40c0e859528119cc8ba3700312cb8df095d95cdd | [
"MIT"
] | 4 | 2020-06-29T15:05:37.000Z | 2022-02-02T10:28:28.000Z | feed/tests/test_consts.py | arXiv/arxiv-feed | 82923d062e2524df94c22490cf936a988559ce66 | [
"MIT"
] | 12 | 2020-03-06T16:45:00.000Z | 2022-03-02T15:36:14.000Z | feed/tests/test_consts.py | cul-it/arxiv-rss | 40c0e859528119cc8ba3700312cb8df095d95cdd | [
"MIT"
] | 2 | 2020-12-06T16:30:06.000Z | 2021-11-05T12:29:08.000Z | import pytest
from feed.consts import FeedVersion
from feed.utils import randomize_case
from feed.errors import FeedVersionError
# FeedVersion.supported
def test_feed_version_supported():
assert FeedVersion.supported() == {
FeedVersion.RSS_2_0,
FeedVersion.ATOM_1_0,
}
# FeedVersion.get
... | 27.765625 | 69 | 0.652786 | 469 | 3,554 | 4.780384 | 0.102345 | 0.016949 | 0.024086 | 0.099911 | 0.694023 | 0.58876 | 0.552632 | 0.521409 | 0.444692 | 0.340321 | 0 | 0.044936 | 0.236072 | 3,554 | 127 | 70 | 27.984252 | 0.780847 | 0.060777 | 0 | 0.337349 | 0 | 0 | 0.051174 | 0 | 0 | 0 | 0 | 0 | 0.325301 | 1 | 0.060241 | false | 0 | 0.048193 | 0 | 0.108434 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
606899616433fe3e3273bc5fab025d75f1c9d731 | 3,953 | py | Python | turorials/Google/projects/01_02_TextClassification/01_02_main.py | Ubpa/LearnTF | 2c9f5d790a9911a860da1e0db4c7bb56a9eee5cb | [
"MIT"
] | null | null | null | turorials/Google/projects/01_02_TextClassification/01_02_main.py | Ubpa/LearnTF | 2c9f5d790a9911a860da1e0db4c7bb56a9eee5cb | [
"MIT"
] | null | null | null | turorials/Google/projects/01_02_TextClassification/01_02_main.py | Ubpa/LearnTF | 2c9f5d790a9911a860da1e0db4c7bb56a9eee5cb | [
"MIT"
] | null | null | null | #----------------
# 01_02 文本分类
#----------------
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
# TensorFlow's version : 1.12.0
print('TensorFlow\'s version : ', tf.__version__)
#----------------
# 1 下载 IMDB 数据集
#-... | 24.251534 | 86 | 0.583607 | 491 | 3,953 | 4.527495 | 0.336049 | 0.052632 | 0.026991 | 0.034188 | 0.17184 | 0.102564 | 0.064777 | 0.064777 | 0.064777 | 0 | 0 | 0.033773 | 0.213509 | 3,953 | 162 | 87 | 24.401235 | 0.681248 | 0.200354 | 0 | 0.184211 | 0 | 0 | 0.093329 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.013158 | false | 0 | 0.052632 | 0.013158 | 0.078947 | 0.105263 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6068adea6b26bf93c6fc76af394fa54701dacddb | 6,134 | py | Python | backend/api/urls.py | 12xiaoni/text-label | 7456c5e73d32bcfc81a02be7e0d748f162934d35 | [
"MIT"
] | null | null | null | backend/api/urls.py | 12xiaoni/text-label | 7456c5e73d32bcfc81a02be7e0d748f162934d35 | [
"MIT"
] | null | null | null | backend/api/urls.py | 12xiaoni/text-label | 7456c5e73d32bcfc81a02be7e0d748f162934d35 | [
"MIT"
] | null | null | null | from django.urls import include, path
from .views import (annotation, auto_labeling, comment, example, example_state,
health, label, project, tag, task)
from .views.tasks import category, relation, span, text
urlpatterns_project = [
path(
route='category-types',
view=label.Cate... | 28.798122 | 79 | 0.616074 | 637 | 6,134 | 5.698587 | 0.153846 | 0.099174 | 0.110193 | 0.060606 | 0.302755 | 0.179339 | 0.126171 | 0.019835 | 0 | 0 | 0 | 0 | 0.250408 | 6,134 | 212 | 80 | 28.933962 | 0.789474 | 0 | 0 | 0.38756 | 0 | 0 | 0.289208 | 0.194327 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.014354 | 0 | 0.014354 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6068f5688ef9ffee1272e2ce66f9f86a9888991e | 4,855 | py | Python | nwbwidgets/test/test_base.py | d-sot/nwb-jupyter-widgets | f9bf5c036c39f29e26b3cdb78198cccfa1b13cef | [
"BSD-3-Clause-LBNL"
] | null | null | null | nwbwidgets/test/test_base.py | d-sot/nwb-jupyter-widgets | f9bf5c036c39f29e26b3cdb78198cccfa1b13cef | [
"BSD-3-Clause-LBNL"
] | null | null | null | nwbwidgets/test/test_base.py | d-sot/nwb-jupyter-widgets | f9bf5c036c39f29e26b3cdb78198cccfa1b13cef | [
"BSD-3-Clause-LBNL"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pynwb import TimeSeries
from datetime import datetime
from dateutil.tz import tzlocal
from pynwb import NWBFile
from ipywidgets import widgets
from pynwb.core import DynamicTable
from pynwb.file import Subject
from nwbwidgets.view import defaul... | 32.366667 | 98 | 0.622039 | 575 | 4,855 | 5.069565 | 0.297391 | 0.031218 | 0.020583 | 0.03259 | 0.273413 | 0.242539 | 0.146141 | 0.136535 | 0.136535 | 0.13036 | 0 | 0.038701 | 0.270855 | 4,855 | 149 | 99 | 32.583893 | 0.784746 | 0 | 0 | 0.2 | 0 | 0 | 0.055613 | 0 | 0 | 0 | 0 | 0 | 0.054545 | 1 | 0.154545 | false | 0 | 0.145455 | 0 | 0.345455 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
606923d815b75242b92321d08cd16583deeb515a | 7,987 | py | Python | subliminal/video.py | orikad/subliminal | 5bd87a505f7a4cad2a3a872128110450c69da4f0 | [
"MIT"
] | null | null | null | subliminal/video.py | orikad/subliminal | 5bd87a505f7a4cad2a3a872128110450c69da4f0 | [
"MIT"
] | null | null | null | subliminal/video.py | orikad/subliminal | 5bd87a505f7a4cad2a3a872128110450c69da4f0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division
from datetime import datetime, timedelta
import logging
import os
from guessit import guessit
logger = logging.getLogger(__name__)
#: Video extensions
VIDEO_EXTENSIONS = ('.3g2', '.3gp', '.3gp2', '.3gpp', '.60d', '.ajp', '.asf', '.asx', '.avchd', '.avi', '.bik'... | 35.497778 | 116 | 0.597471 | 1,023 | 7,987 | 4.526882 | 0.203324 | 0.042108 | 0.041028 | 0.018355 | 0.495141 | 0.400561 | 0.315267 | 0.271216 | 0.199957 | 0.180091 | 0 | 0.00883 | 0.262677 | 7,987 | 224 | 117 | 35.65625 | 0.777551 | 0.287592 | 0 | 0.235294 | 0 | 0 | 0.149068 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.147059 | false | 0 | 0.04902 | 0.039216 | 0.392157 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
606d3133565f3d0c7f55e0387f7f06dca6adb6f2 | 7,097 | py | Python | shadowsocksr_cli/main.py | MaxSherry/ssr-command-client | e52ea0a74e2a1bbdd7e816e0e2670d66ebdbf159 | [
"MIT"
] | null | null | null | shadowsocksr_cli/main.py | MaxSherry/ssr-command-client | e52ea0a74e2a1bbdd7e816e0e2670d66ebdbf159 | [
"MIT"
] | null | null | null | shadowsocksr_cli/main.py | MaxSherry/ssr-command-client | e52ea0a74e2a1bbdd7e816e0e2670d66ebdbf159 | [
"MIT"
] | null | null | null | """
@author: tyrantlucifer
@contact: tyrantlucifer@gmail.com
@blog: https://tyrantlucifer.com
@file: main.py
@time: 2021/2/18 21:36
@desc: shadowsocksr-cli入口函数
"""
import argparse
import traceback
from shadowsocksr_cli.functions import *
def get_parser():
parser = argparse.ArgumentParser(description=color.blue(... | 52.962687 | 118 | 0.683106 | 927 | 7,097 | 5.035599 | 0.200647 | 0.055913 | 0.105613 | 0.048843 | 0.261354 | 0.209083 | 0.080977 | 0.053556 | 0.023993 | 0.023993 | 0 | 0.004358 | 0.19163 | 7,097 | 133 | 119 | 53.360902 | 0.809308 | 0.02184 | 0 | 0 | 0 | 0 | 0.246322 | 0.009807 | 0 | 0 | 0 | 0 | 0 | 1 | 0.017094 | false | 0 | 0.025641 | 0 | 0.059829 | 0.034188 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
606de86a65d9bb68c662f132a9f86b56feda8791 | 672 | py | Python | zad1.py | nadkkka/H8PW | 21b5d28bb42af163e7dad43368d21b550ae66618 | [
"MIT"
] | 6 | 2019-10-20T18:25:28.000Z | 2019-11-17T12:21:42.000Z | zad1.py | nadkkka/H8PW | 21b5d28bb42af163e7dad43368d21b550ae66618 | [
"MIT"
] | null | null | null | zad1.py | nadkkka/H8PW | 21b5d28bb42af163e7dad43368d21b550ae66618 | [
"MIT"
] | 4 | 2019-10-20T18:25:28.000Z | 2019-11-30T19:33:47.000Z |
def repleace_pattern(t,s,r):
assert len(t) > 0
assert len(s) > 0
assert len(r) > 0
assert len(t) >= len(s)
n = len(t)
m = len(s)
k = len(r)
idx = -1
for i in range(0, n):
if t[i] == s[0]:
pattern = True
for j in range(1,m):
... | 18.162162 | 58 | 0.383929 | 101 | 672 | 2.534653 | 0.29703 | 0.140625 | 0.117188 | 0.03125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.06044 | 0.458333 | 672 | 36 | 59 | 18.666667 | 0.642857 | 0 | 0 | 0.08 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.16 | 1 | 0.04 | false | 0 | 0 | 0 | 0.08 | 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 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
606dfbab5706a842277bbd2a3b9198129d579201 | 2,249 | py | Python | mycroft/client/enclosure/weather.py | Matjordan/mycroft-core | 8b64930f3b3dae671535fc3b096ce9d846c54f6d | [
"Apache-2.0"
] | null | null | null | mycroft/client/enclosure/weather.py | Matjordan/mycroft-core | 8b64930f3b3dae671535fc3b096ce9d846c54f6d | [
"Apache-2.0"
] | null | null | null | mycroft/client/enclosure/weather.py | Matjordan/mycroft-core | 8b64930f3b3dae671535fc3b096ce9d846c54f6d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 34.075758 | 77 | 0.56514 | 257 | 2,249 | 4.863813 | 0.48249 | 0.0616 | 0.0616 | 0.0256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011716 | 0.354824 | 2,249 | 65 | 78 | 34.6 | 0.849759 | 0.354824 | 0 | 0 | 0 | 0 | 0.143262 | 0.017731 | 0 | 0 | 0 | 0 | 0 | 1 | 0.09375 | false | 0 | 0 | 0 | 0.125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
606ffbed507972fed40e1f7c61ad9e16979a735d | 1,501 | py | Python | a_other_video/MCL-Motion-Focused-Contrastive-Learning/sts/motion_sts.py | alisure-fork/Video-Swin-Transformer | aa0a31bd4df0ad2cebdcfb2ad53df712fce79809 | [
"Apache-2.0"
] | null | null | null | a_other_video/MCL-Motion-Focused-Contrastive-Learning/sts/motion_sts.py | alisure-fork/Video-Swin-Transformer | aa0a31bd4df0ad2cebdcfb2ad53df712fce79809 | [
"Apache-2.0"
] | null | null | null | a_other_video/MCL-Motion-Focused-Contrastive-Learning/sts/motion_sts.py | alisure-fork/Video-Swin-Transformer | aa0a31bd4df0ad2cebdcfb2ad53df712fce79809 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
from scipy import ndimage
def compute_motion_boudary(flow_clip):
mx = np.array([[-1, 0, 1], [-1, 0, 1], [-1, 0, 1]])
my = np.array([[-1, -1, -1], [0, 0, 0], [1, 1, 1]])
dx_all = []
dy_all = []
mb_x = 0
mb_y = 0
for flow_img in flow_clip:
d_x = ndimage... | 24.209677 | 70 | 0.592938 | 250 | 1,501 | 3.256 | 0.228 | 0.014742 | 0.034398 | 0.04914 | 0.246929 | 0.178133 | 0.135135 | 0.04914 | 0.04914 | 0.04914 | 0 | 0.027907 | 0.283811 | 1,501 | 61 | 71 | 24.606557 | 0.729302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.068182 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6070e1255db727d4dd3901174951be184b84e950 | 2,691 | py | Python | Student Database/input_details.py | manas1410/Miscellaneous-Development | 8ffd2b586cb05b12ed0855d97c3015c8bb2a6c01 | [
"MIT"
] | null | null | null | Student Database/input_details.py | manas1410/Miscellaneous-Development | 8ffd2b586cb05b12ed0855d97c3015c8bb2a6c01 | [
"MIT"
] | null | null | null | Student Database/input_details.py | manas1410/Miscellaneous-Development | 8ffd2b586cb05b12ed0855d97c3015c8bb2a6c01 | [
"MIT"
] | null | null | null | from tkinter import*
import tkinter.font as font
import sqlite3
name2=''
regis2=''
branch2=''
def main():
inp=Tk()
inp.geometry("430x300")
inp.title("Enter The Details")
inp.iconbitmap("logo/spectrumlogo.ico")
f=font.Font(family='Bookman Old Style',size=15,weight='bold')
f1=f... | 25.149533 | 106 | 0.536603 | 339 | 2,691 | 4.20649 | 0.330383 | 0.049088 | 0.042076 | 0.037868 | 0.23913 | 0.23913 | 0.186536 | 0.140252 | 0.140252 | 0.140252 | 0 | 0.045479 | 0.313638 | 2,691 | 106 | 107 | 25.386792 | 0.726584 | 0.036046 | 0 | 0.151515 | 0 | 0 | 0.178773 | 0.008475 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0 | 0.075758 | 0 | 0.121212 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60720921ca305f9abf0188d61f032d72e5cdb0ce | 16,036 | py | Python | IQS5xx/IQS5xx.py | jakezimmerTHT/py_IQS5xx | 5f90be17ea0429eeeb3726c7647f0b7ad1fb7b06 | [
"MIT"
] | 1 | 2019-02-26T11:56:26.000Z | 2019-02-26T11:56:26.000Z | IQS5xx/IQS5xx.py | jakezimmerTHT/py_IQS5xx | 5f90be17ea0429eeeb3726c7647f0b7ad1fb7b06 | [
"MIT"
] | null | null | null | IQS5xx/IQS5xx.py | jakezimmerTHT/py_IQS5xx | 5f90be17ea0429eeeb3726c7647f0b7ad1fb7b06 | [
"MIT"
] | 1 | 2022-02-22T19:47:26.000Z | 2022-02-22T19:47:26.000Z | import unittest
import time
import logging
logging.basicConfig()
from intelhex import IntelHex
import Adafruit_GPIO.I2C as i2c
from gpiozero import OutputDevice
from gpiozero import DigitalInputDevice
from ctypes import c_uint8, c_uint16, c_uint32, cast, pointer, POINTER
from ctypes import create_string_buffer, Struct... | 41.760417 | 175 | 0.692816 | 1,876 | 16,036 | 5.686567 | 0.216951 | 0.023435 | 0.048088 | 0.052306 | 0.257218 | 0.219723 | 0.164886 | 0.125891 | 0.102925 | 0.102925 | 0 | 0.034518 | 0.215952 | 16,036 | 383 | 176 | 41.869452 | 0.813966 | 0.066725 | 0 | 0.118243 | 0 | 0 | 0.101038 | 0.00395 | 0 | 0 | 0.012186 | 0 | 0.040541 | 1 | 0.135135 | false | 0.013514 | 0.047297 | 0.016892 | 0.25 | 0.003378 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60736b2c5b81bc8177746e07c1771f09afc46a66 | 2,214 | py | Python | program.py | siddhi117/ADB_Homework | 1751b3cc2d5ec1584efdf7f8961507bc29179e49 | [
"MIT"
] | null | null | null | program.py | siddhi117/ADB_Homework | 1751b3cc2d5ec1584efdf7f8961507bc29179e49 | [
"MIT"
] | null | null | null | program.py | siddhi117/ADB_Homework | 1751b3cc2d5ec1584efdf7f8961507bc29179e49 | [
"MIT"
] | null | null | null | import sqlite3
from bottle import route, run,debug,template,request,redirect
@route('/todo')
def todo_list():
conn = sqlite3.connect('todo.db')
c = conn.cursor()
c.execute("SELECT id, task FROM todo WHERE status LIKE '1'")
result = c.fetchall()
c.close()
output = template('make_table', rows=res... | 27.333333 | 93 | 0.584914 | 297 | 2,214 | 4.289562 | 0.259259 | 0.054945 | 0.056515 | 0.086342 | 0.285714 | 0.245683 | 0.215856 | 0.178179 | 0.178179 | 0.178179 | 0 | 0.006031 | 0.251129 | 2,214 | 80 | 94 | 27.675 | 0.762364 | 0.037037 | 0 | 0.390625 | 0 | 0 | 0.21023 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.109375 | false | 0 | 0.03125 | 0 | 0.203125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60761440b9fc5de896572a3624d9ef4c6e6c7759 | 3,246 | py | Python | pipeline/metadata/maxmind.py | censoredplanet/censoredplanet-analysis | f5e5d82f890e47599bc0baa9a9390f3c5147a6f7 | [
"Apache-2.0"
] | 6 | 2021-06-02T11:15:12.000Z | 2022-03-04T12:09:35.000Z | pipeline/metadata/maxmind.py | censoredplanet/censoredplanet-analysis | f5e5d82f890e47599bc0baa9a9390f3c5147a6f7 | [
"Apache-2.0"
] | 24 | 2021-04-13T18:07:29.000Z | 2022-03-25T20:26:27.000Z | pipeline/metadata/maxmind.py | censoredplanet/censoredplanet-analysis | f5e5d82f890e47599bc0baa9a9390f3c5147a6f7 | [
"Apache-2.0"
] | 2 | 2021-06-02T11:30:21.000Z | 2021-08-20T12:17:12.000Z | """Module to initialize Maxmind databases and lookup IP metadata."""
import logging
import os
from typing import Optional, Tuple, NamedTuple
import geoip2.database
from pipeline.metadata.mmdb_reader import mmdb_reader
MAXMIND_CITY = 'GeoLite2-City.mmdb'
MAXMIND_ASN = 'GeoLite2-ASN.mmdb'
# Tuple(netblock, asn, as_n... | 30.336449 | 78 | 0.663586 | 417 | 3,246 | 4.997602 | 0.306954 | 0.043186 | 0.017274 | 0.020154 | 0.212092 | 0.169866 | 0.169866 | 0.137236 | 0.137236 | 0.137236 | 0 | 0.014412 | 0.230437 | 3,246 | 106 | 79 | 30.622642 | 0.819856 | 0.282193 | 0 | 0.122449 | 0 | 0 | 0.072184 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.122449 | false | 0.020408 | 0.102041 | 0.020408 | 0.387755 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60765090bf7eb3ddb56eaccfac94b3add8ca8a04 | 844 | py | Python | nas_big_data/combo/best/combo_4gpu_8_agebo/predict.py | deephyper/NASBigData | 18f083a402b80b1d006eada00db7287ff1802592 | [
"BSD-2-Clause"
] | 3 | 2020-08-07T12:05:12.000Z | 2021-04-05T19:38:37.000Z | nas_big_data/combo/best/combo_2gpu_8_agebo/predict.py | deephyper/NASBigData | 18f083a402b80b1d006eada00db7287ff1802592 | [
"BSD-2-Clause"
] | 2 | 2020-07-17T14:44:12.000Z | 2021-04-04T14:52:11.000Z | nas_big_data/combo/best/combo_4gpu_8_agebo/predict.py | deephyper/NASBigData | 18f083a402b80b1d006eada00db7287ff1802592 | [
"BSD-2-Clause"
] | 1 | 2021-03-28T01:49:21.000Z | 2021-03-28T01:49:21.000Z | import os
import numpy as np
import tensorflow as tf
from nas_big_data.combo.load_data import load_data_npz_gz
from deephyper.nas.run.util import create_dir
from deephyper.nas.train_utils import selectMetric
os.environ["CUDA_VISIBLE_DEVICES"] = ",".join([str(i) for i in range(4)])
HERE = os.path.dirname(os.path.absp... | 26.375 | 89 | 0.722749 | 135 | 844 | 4.296296 | 0.525926 | 0.041379 | 0.037931 | 0.044828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010667 | 0.111374 | 844 | 32 | 90 | 26.375 | 0.762667 | 0 | 0 | 0 | 0 | 0 | 0.107692 | 0.024852 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0.083333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6077a342275cffb372223916fb877af7a30c823c | 14,744 | py | Python | ship/utils/utilfunctions.py | duncan-r/SHIP | 2c4c22c77f9c18ea545d3bce70a36aebbd18256a | [
"MIT"
] | 6 | 2016-04-10T17:32:44.000Z | 2022-03-13T18:41:21.000Z | ship/utils/utilfunctions.py | duncan-r/SHIP | 2c4c22c77f9c18ea545d3bce70a36aebbd18256a | [
"MIT"
] | 19 | 2017-06-23T08:21:53.000Z | 2017-07-26T08:23:03.000Z | ship/utils/utilfunctions.py | duncan-r/SHIP | 2c4c22c77f9c18ea545d3bce70a36aebbd18256a | [
"MIT"
] | 6 | 2016-10-26T16:04:38.000Z | 2019-04-25T23:55:06.000Z | """
Summary:
Utility Functions that could be helpful in any part of the API.
All functions that are likely to be called across a number of classes
and Functions in the API should be grouped here for convenience.
Author:
Duncan Runnacles
Created:
01 Apr 2016
Copyri... | 30.151329 | 89 | 0.573928 | 1,889 | 14,744 | 4.426681 | 0.220222 | 0.012916 | 0.00574 | 0.003348 | 0.147931 | 0.114327 | 0.074145 | 0.059555 | 0.048075 | 0.038268 | 0 | 0.009148 | 0.332746 | 14,744 | 488 | 90 | 30.213115 | 0.840821 | 0.51994 | 0 | 0.267081 | 0 | 0 | 0.040543 | 0 | 0 | 0 | 0 | 0.002049 | 0 | 1 | 0.15528 | false | 0 | 0.031056 | 0 | 0.378882 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6077b8cff40a612dbe4bda3b40ee9c7455ae0910 | 1,244 | py | Python | FWCore/MessageService/test/u28_cerr_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | FWCore/MessageService/test/u28_cerr_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | FWCore/MessageService/test/u28_cerr_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | # u28_cerr_cfg.py:
#
# Non-regression test configuration file for MessageLogger service:
# distinct threshold level for linked destination, where
#
import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
import FWCore.Framework.test.cmsExceptionsFatal_cff
process.options = FWCore.Framework.test.cmsExc... | 29.619048 | 70 | 0.728296 | 137 | 1,244 | 6.547445 | 0.445255 | 0.173913 | 0.071349 | 0.082497 | 0.185061 | 0.095875 | 0.095875 | 0 | 0 | 0 | 0 | 0.009488 | 0.152733 | 1,244 | 41 | 71 | 30.341463 | 0.841556 | 0.110129 | 0 | 0 | 0 | 0 | 0.118074 | 0.035422 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.074074 | 0 | 0.074074 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
607a424b8a6541dc8b215105306da525113497c5 | 2,001 | py | Python | content/browse/utils.py | Revibe-Music/core-services | 6b11cf16ad2c35d948f3a5c0e7a161e5b7cfc1b2 | [
"MIT"
] | 2 | 2022-01-24T23:30:18.000Z | 2022-01-26T00:21:22.000Z | content/browse/utils.py | Revibe-Music/core-services | 6b11cf16ad2c35d948f3a5c0e7a161e5b7cfc1b2 | [
"MIT"
] | null | null | null | content/browse/utils.py | Revibe-Music/core-services | 6b11cf16ad2c35d948f3a5c0e7a161e5b7cfc1b2 | [
"MIT"
] | null | null | null | """
Created:04 Mar. 2020
Author: Jordan Prechac
"""
from revibe._helpers import const
from administration.utils import retrieve_variable
from content.models import Song, Album, Artist
from content.serializers import v1 as cnt_ser_v1
# -----------------------------------------------------------------------------
# _... | 34.5 | 127 | 0.710645 | 248 | 2,001 | 5.504032 | 0.294355 | 0.095238 | 0.023443 | 0.054945 | 0.580952 | 0.562637 | 0.515751 | 0.465934 | 0.43663 | 0.43663 | 0 | 0.015836 | 0.147926 | 2,001 | 58 | 128 | 34.5 | 0.784751 | 0.192404 | 0 | 0.1875 | 0 | 0 | 0.075578 | 0.017489 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.125 | 0 | 0.40625 | 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 | 0 | 0 | 0 | 0 | 1 | 0 |
607a5c3dca22f0d225966ee1a7f786fad681858e | 4,433 | py | Python | Segmentation/model.py | vasetrendafilov/ComputerVision | 5fcbe57fb1609ef44733aed0fab8c69d71fae21f | [
"MIT"
] | null | null | null | Segmentation/model.py | vasetrendafilov/ComputerVision | 5fcbe57fb1609ef44733aed0fab8c69d71fae21f | [
"MIT"
] | null | null | null | Segmentation/model.py | vasetrendafilov/ComputerVision | 5fcbe57fb1609ef44733aed0fab8c69d71fae21f | [
"MIT"
] | null | null | null | """
Authors: Elena Vasileva, Zoran Ivanovski
E-mail: elenavasileva95@gmail.com, mars@feit.ukim.edu.mk
Course: Mashinski vid, FEEIT, Spring 2021
Date: 09.03.2021
Description: function library
model operations: construction, loading, saving
Python version: 3.6
"""
# python imports
from keras.layers import ... | 47.666667 | 134 | 0.723438 | 560 | 4,433 | 5.578571 | 0.248214 | 0.060819 | 0.06338 | 0.120999 | 0.514725 | 0.473111 | 0.455186 | 0.455186 | 0.455186 | 0.455186 | 0 | 0.058425 | 0.135123 | 4,433 | 92 | 135 | 48.184783 | 0.75639 | 0.187007 | 0 | 0.045455 | 0 | 0 | 0.089805 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0 | 0.045455 | 0 | 0.136364 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
607a8097d7dacf319776f076e01a66d964066e6e | 631 | py | Python | Day24_Python/part1.py | Rog3rSm1th/PolyglotOfCode | a70f50b5c882139727cbdf75144a8346cb6c538b | [
"MIT"
] | 7 | 2021-03-23T14:08:01.000Z | 2021-05-17T16:24:16.000Z | Day24_Python/part1.py | Rog3rSm1th/PolyglotOfCode | a70f50b5c882139727cbdf75144a8346cb6c538b | [
"MIT"
] | null | null | null | Day24_Python/part1.py | Rog3rSm1th/PolyglotOfCode | a70f50b5c882139727cbdf75144a8346cb6c538b | [
"MIT"
] | 2 | 2021-04-29T22:03:02.000Z | 2022-01-18T15:55:42.000Z | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
from itertools import combinations
def solve(packages, groups):
total = sum(packages)
result = 9999999999999999
# we should use `for i in range(1, len(packages) - 2)` but it would
# make the computation significantly slower
for i in range(1, 7):
... | 30.047619 | 74 | 0.62916 | 86 | 631 | 4.593023 | 0.651163 | 0.065823 | 0.03038 | 0.055696 | 0.060759 | 0 | 0 | 0 | 0 | 0 | 0 | 0.048832 | 0.253566 | 631 | 21 | 75 | 30.047619 | 0.789809 | 0.239303 | 0 | 0 | 0 | 0 | 0.018868 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.083333 | 0 | 0.25 | 0.083333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
607b94247f45130f250e70bb74d679462531a2da | 5,921 | py | Python | generate-album.py | atomicparade/photo-album | 437bc18bb00da5ce27216d03b48b78d60a0ad3fd | [
"CC0-1.0",
"Unlicense"
] | null | null | null | generate-album.py | atomicparade/photo-album | 437bc18bb00da5ce27216d03b48b78d60a0ad3fd | [
"CC0-1.0",
"Unlicense"
] | null | null | null | generate-album.py | atomicparade/photo-album | 437bc18bb00da5ce27216d03b48b78d60a0ad3fd | [
"CC0-1.0",
"Unlicense"
] | null | null | null | import configparser
import math
import re
import urllib
from pathlib import Path
from PIL import Image
def get_images(image_directory, thumbnail_directory, thumbnail_size):
thumbnail_directory = Path(thumbnail_directory)
for file in [file for file in thumbnail_directory.glob('*')]:
file.unlink()
... | 22.861004 | 161 | 0.570174 | 704 | 5,921 | 4.667614 | 0.261364 | 0.05143 | 0.018259 | 0.017346 | 0.236458 | 0.176202 | 0.139379 | 0.110164 | 0.077298 | 0.053561 | 0 | 0.022917 | 0.270394 | 5,921 | 258 | 162 | 22.949612 | 0.737731 | 0.004898 | 0 | 0.306931 | 0 | 0.009901 | 0.474444 | 0.049244 | 0 | 0 | 0 | 0 | 0 | 1 | 0.024752 | false | 0 | 0.029703 | 0 | 0.069307 | 0.004951 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
607c6c12c8adb56d644bb03375a7a0619419eb1b | 4,385 | py | Python | tests/test_sne_truth.py | LSSTDESC/sims_TruthCatalog | 348f5d231997eed387aaa6e3fd4218c126e14cdb | [
"BSD-3-Clause"
] | 2 | 2020-02-04T22:59:41.000Z | 2020-03-19T00:17:09.000Z | tests/test_sne_truth.py | LSSTDESC/sims_TruthCatalog | 348f5d231997eed387aaa6e3fd4218c126e14cdb | [
"BSD-3-Clause"
] | 7 | 2020-02-10T21:59:19.000Z | 2021-04-27T16:31:26.000Z | tests/test_sne_truth.py | LSSTDESC/sims_TruthCatalog | 348f5d231997eed387aaa6e3fd4218c126e14cdb | [
"BSD-3-Clause"
] | null | null | null | """
Unit tests for SNIa truth catalog code.
"""
import os
import unittest
import sqlite3
import numpy as np
import pandas as pd
from desc.sims_truthcatalog import SNeTruthWriter, SNSynthPhotFactory
class SNSynthPhotFactoryTestCase(unittest.TestCase):
"""
Test case class for SNIa synthetic photometry factory c... | 41.367925 | 77 | 0.580844 | 517 | 4,385 | 4.696325 | 0.346228 | 0.032949 | 0.044481 | 0.066722 | 0.312191 | 0.291186 | 0.250824 | 0.22117 | 0.170923 | 0.170923 | 0 | 0.083944 | 0.315393 | 4,385 | 105 | 78 | 41.761905 | 0.72485 | 0.109008 | 0 | 0.068493 | 0 | 0 | 0.097587 | 0.030231 | 0 | 0 | 0 | 0 | 0.164384 | 1 | 0.082192 | false | 0 | 0.082192 | 0 | 0.191781 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
607dfd1e508e9c983974056179f2dfae1594aa2a | 10,053 | py | Python | testsite/management/commands/load_test_transactions.py | gikoluo/djaodjin-saas | badd7894ac327191008a1b3a0ebd0d07b55908c3 | [
"BSD-2-Clause"
] | null | null | null | testsite/management/commands/load_test_transactions.py | gikoluo/djaodjin-saas | badd7894ac327191008a1b3a0ebd0d07b55908c3 | [
"BSD-2-Clause"
] | null | null | null | testsite/management/commands/load_test_transactions.py | gikoluo/djaodjin-saas | badd7894ac327191008a1b3a0ebd0d07b55908c3 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2018, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | 34.90625 | 80 | 0.552372 | 979 | 10,053 | 5.52809 | 0.412666 | 0.036031 | 0.017554 | 0.013304 | 0.150776 | 0.110865 | 0.074649 | 0.074649 | 0.074649 | 0.063932 | 0 | 0.011879 | 0.355217 | 10,053 | 287 | 81 | 35.027875 | 0.823048 | 0.170496 | 0 | 0.105042 | 0 | 0 | 0.133864 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.008403 | false | 0.004202 | 0.05042 | 0 | 0.096639 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
607e7c80f119c1c9c55adbd71e291f8ae17a8b06 | 2,801 | py | Python | seq2seq_pt/s2s/xutils.py | magic282/SEASS | b780bf45b47d15145a148e5992bcd157c119d338 | [
"MIT"
] | 36 | 2018-05-25T01:09:21.000Z | 2022-01-25T02:45:18.000Z | seq2seq_pt/s2s/xutils.py | magic282/SEASS | b780bf45b47d15145a148e5992bcd157c119d338 | [
"MIT"
] | 11 | 2018-06-30T14:19:21.000Z | 2021-03-19T01:27:09.000Z | seq2seq_pt/s2s/xutils.py | magic282/SEASS | b780bf45b47d15145a148e5992bcd157c119d338 | [
"MIT"
] | 10 | 2018-06-06T03:15:51.000Z | 2022-01-25T02:45:44.000Z | import sys
import struct
def save_sf_model(model):
name_dicts = {'encoder.word_lut.weight': 'SrcWordEmbed_Embed_W',
'encoder.forward_gru.linear_input.weight': 'EncGRUL2R_GRU_W',
'encoder.forward_gru.linear_input.bias': 'EncGRUL2R_GRU_B',
'encoder.forward_gru.l... | 47.474576 | 87 | 0.593717 | 349 | 2,801 | 4.481375 | 0.277937 | 0.035806 | 0.035806 | 0.044118 | 0.182225 | 0.108696 | 0.071611 | 0 | 0 | 0 | 0 | 0.012225 | 0.269904 | 2,801 | 58 | 88 | 48.293103 | 0.752567 | 0.06819 | 0 | 0 | 0 | 0 | 0.387716 | 0.254894 | 0 | 0 | 0 | 0 | 0 | 1 | 0.02 | false | 0 | 0.04 | 0 | 0.06 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
608009fe5a0b2fb99700c8345bb126060be7366e | 4,219 | py | Python | pml-services/pml_storage.py | Novartis/Project-Mona-Lisa | f8fcef5b434470e2a17e97fceaef46615eda1b31 | [
"Apache-2.0"
] | 3 | 2017-10-17T14:49:54.000Z | 2021-01-12T23:37:33.000Z | pml-services/pml_storage.py | Novartis/Project-Mona-Lisa | f8fcef5b434470e2a17e97fceaef46615eda1b31 | [
"Apache-2.0"
] | 10 | 2019-12-16T20:37:22.000Z | 2021-05-21T14:35:39.000Z | pml-services/pml_storage.py | Novartis/Project-Mona-Lisa | f8fcef5b434470e2a17e97fceaef46615eda1b31 | [
"Apache-2.0"
] | 1 | 2018-09-12T17:06:18.000Z | 2018-09-12T17:06:18.000Z | # Copyright 2017 Novartis Institutes for BioMedical Research Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agre... | 35.754237 | 584 | 0.576677 | 516 | 4,219 | 4.608527 | 0.337209 | 0.014718 | 0.027334 | 0.021447 | 0.076114 | 0.06434 | 0.06434 | 0.06434 | 0.046257 | 0.046257 | 0 | 0.009045 | 0.344868 | 4,219 | 117 | 585 | 36.059829 | 0.851302 | 0.471913 | 0 | 0.104167 | 0 | 0 | 0.038908 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.145833 | false | 0 | 0.125 | 0 | 0.416667 | 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 | 0 | 0 | 0 | 0 | 1 | 0 |
6081b2d6561823daafb84e5aca2d32f42f1d920c | 3,196 | py | Python | binan.py | Nightleaf0512/PythonCryptoCurriencyPriceChecker | 9531d4a6978d280b4ca759d7ba24d3edf77fe5b2 | [
"CC0-1.0"
] | null | null | null | binan.py | Nightleaf0512/PythonCryptoCurriencyPriceChecker | 9531d4a6978d280b4ca759d7ba24d3edf77fe5b2 | [
"CC0-1.0"
] | null | null | null | binan.py | Nightleaf0512/PythonCryptoCurriencyPriceChecker | 9531d4a6978d280b4ca759d7ba24d3edf77fe5b2 | [
"CC0-1.0"
] | null | null | null | from binance.client import Client
import PySimpleGUI as sg
api_key = "your_binance_apikey"
secret_key = "your_binance_secretkey"
client = Client(api_key=api_key, api_secret=secret_key)
# price
def get_price(coin):
return round(float(client.get_symbol_ticker(symbol=f"{coin}USDT")['price']), 5)
def colu... | 42.613333 | 172 | 0.595432 | 453 | 3,196 | 4.028698 | 0.203091 | 0.043836 | 0.092055 | 0.118356 | 0.489315 | 0.387945 | 0.333699 | 0.31726 | 0.30411 | 0.30411 | 0 | 0.040173 | 0.205569 | 3,196 | 74 | 173 | 43.189189 | 0.677826 | 0.012203 | 0 | 0.115385 | 0 | 0 | 0.217095 | 0.056874 | 0 | 0 | 0 | 0 | 0 | 1 | 0.134615 | false | 0 | 0.038462 | 0.038462 | 0.307692 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
608211636fe7f97cd14766030248070475866342 | 1,026 | py | Python | saleor/graphql/ushop/bulk_mutations.py | nlkhagva/saleor | 0d75807d08ac49afcc904733724ac870e8359c10 | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/ushop/bulk_mutations.py | nlkhagva/saleor | 0d75807d08ac49afcc904733724ac870e8359c10 | [
"CC-BY-4.0"
] | 1 | 2022-02-15T03:31:12.000Z | 2022-02-15T03:31:12.000Z | saleor/graphql/ushop/bulk_mutations.py | nlkhagva/ushop | abf637eb6f7224e2d65d62d72a0c15139c64bb39 | [
"CC-BY-4.0"
] | null | null | null | import graphene
from ...unurshop.ushop import models
from ..core.mutations import BaseBulkMutation, ModelBulkDeleteMutation
class UshopBulkDelete(ModelBulkDeleteMutation):
class Arguments:
ids = graphene.List(
graphene.ID, required=True, description="List of ushop IDs to delete."
)
... | 28.5 | 87 | 0.660819 | 105 | 1,026 | 6.390476 | 0.485714 | 0.065574 | 0.102832 | 0.074516 | 0.354694 | 0.354694 | 0.354694 | 0.232489 | 0.232489 | 0.232489 | 0 | 0 | 0.251462 | 1,026 | 35 | 88 | 29.314286 | 0.873698 | 0 | 0 | 0.37037 | 0 | 0 | 0.164717 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.037037 | false | 0 | 0.111111 | 0 | 0.37037 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
608242d64b36989e754c60c8ef5cc3a72e5f5595 | 3,180 | py | Python | src/main/NLP/STRING_MATCH/scopus_ha_module_match.py | alvinajacquelyn/COMP0016_2 | fd57706a992e1e47af7c802320890e93a15fc0c7 | [
"MIT"
] | null | null | null | src/main/NLP/STRING_MATCH/scopus_ha_module_match.py | alvinajacquelyn/COMP0016_2 | fd57706a992e1e47af7c802320890e93a15fc0c7 | [
"MIT"
] | null | null | null | src/main/NLP/STRING_MATCH/scopus_ha_module_match.py | alvinajacquelyn/COMP0016_2 | fd57706a992e1e47af7c802320890e93a15fc0c7 | [
"MIT"
] | null | null | null | import os, sys, re
import json
import pandas as pd
import pymongo
from main.LOADERS.publication_loader import PublicationLoader
from main.MONGODB_PUSHERS.mongodb_pusher import MongoDbPusher
from main.NLP.PREPROCESSING.preprocessor import Preprocessor
class ScopusStringMatch_HAmodule():
def __ini... | 42.972973 | 136 | 0.610377 | 372 | 3,180 | 5.051075 | 0.38172 | 0.038318 | 0.00479 | 0.028739 | 0.036722 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004935 | 0.299057 | 3,180 | 74 | 137 | 42.972973 | 0.838044 | 0.203459 | 0 | 0.041667 | 0 | 0 | 0.090248 | 0.042344 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.145833 | 0 | 0.25 | 0.041667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60848af0afddec7b1d22b291ac9bd888d5799291 | 642 | py | Python | tools/urls.py | Cyberdeep/archerysec | a4b1a0c4f736bd70bdea693c7a7c479a69bb0f7d | [
"BSD-3-Clause"
] | null | null | null | tools/urls.py | Cyberdeep/archerysec | a4b1a0c4f736bd70bdea693c7a7c479a69bb0f7d | [
"BSD-3-Clause"
] | null | null | null | tools/urls.py | Cyberdeep/archerysec | a4b1a0c4f736bd70bdea693c7a7c479a69bb0f7d | [
"BSD-3-Clause"
] | 1 | 2018-08-12T17:29:35.000Z | 2018-08-12T17:29:35.000Z | # _
# /\ | |
# / \ _ __ ___| |__ ___ _ __ _ _
# / /\ \ | '__/ __| '_ \ / _ \ '__| | | |
# / ____ \| | | (__| | | | __/ | | |_| |
# /_/ \_\_| \___|_| |_|\___|_| \__, |
# __/ |
# |___/
# Copyright (C) 20... | 25.68 | 43 | 0.426791 | 43 | 642 | 5.046512 | 0.581395 | 0.179724 | 0.101382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.020779 | 0.400312 | 642 | 24 | 44 | 26.75 | 0.542857 | 0.534268 | 0 | 0 | 0 | 0 | 0.196296 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.181818 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6084e8784a7c8fb58869bc711fe87b2383807ac6 | 7,484 | py | Python | api/vm/base/utils.py | erigones/esdc-ce | 2e39211a8f5132d66e574d3a657906c7d3c406fe | [
"Apache-2.0"
] | 97 | 2016-11-15T14:44:23.000Z | 2022-03-13T18:09:15.000Z | api/vm/base/utils.py | erigones/esdc-ce | 2e39211a8f5132d66e574d3a657906c7d3c406fe | [
"Apache-2.0"
] | 334 | 2016-11-17T19:56:57.000Z | 2022-03-18T10:45:53.000Z | api/vm/base/utils.py | erigones/esdc-ce | 2e39211a8f5132d66e574d3a657906c7d3c406fe | [
"Apache-2.0"
] | 33 | 2017-01-02T16:04:13.000Z | 2022-02-07T19:20:24.000Z | from core.celery.config import ERIGONES_TASK_USER
from que.tasks import execute, get_task_logger
from vms.models import SnapshotDefine, Snapshot, BackupDefine, Backup, IPAddress
logger = get_task_logger(__name__)
def is_vm_missing(vm, msg):
"""
Check failed command output and return True if VM is not on comp... | 45.084337 | 120 | 0.67504 | 1,151 | 7,484 | 4.206777 | 0.220678 | 0.037175 | 0.039653 | 0.028914 | 0.332714 | 0.305865 | 0.276332 | 0.237092 | 0.188765 | 0.140851 | 0 | 0.004809 | 0.22194 | 7,484 | 165 | 121 | 45.357576 | 0.826722 | 0.266034 | 0 | 0.096774 | 0 | 0.043011 | 0.152031 | 0.005617 | 0 | 0 | 0 | 0 | 0 | 1 | 0.086022 | false | 0 | 0.064516 | 0 | 0.225806 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
60855d2a5eca63351c8e4dd3352e1f4b94d4ebb3 | 1,133 | py | Python | 993_Cousins-in-Binary-Tree.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | 3 | 2018-07-05T05:51:10.000Z | 2019-05-04T08:35:44.000Z | 993_Cousins-in-Binary-Tree.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | 993_Cousins-in-Binary-Tree.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isCousins(self, root: TreeNode, x: int, y: int) -> bool:
x_depth = None
x_parent = None... | 30.621622 | 75 | 0.485437 | 144 | 1,133 | 3.611111 | 0.236111 | 0.057692 | 0.046154 | 0.034615 | 0.119231 | 0.119231 | 0.119231 | 0.119231 | 0.119231 | 0.119231 | 0 | 0.012539 | 0.436893 | 1,133 | 36 | 76 | 31.472222 | 0.802508 | 0.157988 | 0 | 0.178571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6085668853e75c8ad16430458a509e22fa3b1078 | 5,433 | py | Python | docker-images/taigav2/taiga-back/tests/integration/test_tasks_tags.py | mattcongy/itshop | 6be025a9eaa7fe7f495b5777d1f0e5a3184121c9 | [
"MIT"
] | 1 | 2017-05-29T19:01:06.000Z | 2017-05-29T19:01:06.000Z | docker-images/taigav2/taiga-back/tests/integration/test_tasks_tags.py | mattcongy/itshop | 6be025a9eaa7fe7f495b5777d1f0e5a3184121c9 | [
"MIT"
] | null | null | null | docker-images/taigav2/taiga-back/tests/integration/test_tasks_tags.py | mattcongy/itshop | 6be025a9eaa7fe7f495b5777d1f0e5a3184121c9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2016 Anler Hernández ... | 33.537037 | 99 | 0.679735 | 711 | 5,433 | 5.063291 | 0.2391 | 0.083333 | 0.035 | 0.031111 | 0.644167 | 0.615833 | 0.584722 | 0.54 | 0.513333 | 0.513333 | 0 | 0.017065 | 0.191055 | 5,433 | 161 | 100 | 33.745342 | 0.802048 | 0.175778 | 0 | 0.622642 | 0 | 0 | 0.080511 | 0 | 0 | 0 | 0 | 0 | 0.216981 | 1 | 0.037736 | false | 0 | 0.056604 | 0 | 0.09434 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6085b11c27e78fe767fa371d2b33135501f31145 | 679 | py | Python | pytorchocr/postprocess/cls_postprocess.py | satchelwu/PaddleOCR2Pytorch | 6941565cfd4c45470cc3bf9d434c8c32267a33ef | [
"Apache-2.0"
] | 3 | 2021-04-23T12:31:07.000Z | 2021-11-17T04:39:38.000Z | pytorchocr/postprocess/cls_postprocess.py | satchelwu/PaddleOCR2Pytorch | 6941565cfd4c45470cc3bf9d434c8c32267a33ef | [
"Apache-2.0"
] | null | null | null | pytorchocr/postprocess/cls_postprocess.py | satchelwu/PaddleOCR2Pytorch | 6941565cfd4c45470cc3bf9d434c8c32267a33ef | [
"Apache-2.0"
] | 1 | 2022-03-24T03:31:34.000Z | 2022-03-24T03:31:34.000Z | import torch
class ClsPostProcess(object):
""" Convert between text-label and text-index """
def __init__(self, label_list, **kwargs):
super(ClsPostProcess, self).__init__()
self.label_list = label_list
def __call__(self, preds, label=None, *args, **kwargs):
if isinstance(preds, ... | 33.95 | 62 | 0.60972 | 87 | 679 | 4.505747 | 0.45977 | 0.114796 | 0.132653 | 0.086735 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006098 | 0.275405 | 679 | 20 | 63 | 33.95 | 0.79065 | 0.060383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0 | 0.066667 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6088008352658e01cb8328f084aae6c78e40e074 | 5,717 | py | Python | inference_folder.py | aba-ai-learning/Single-Human-Parsing-LIP | b1c0c91cef34dabf598231127886b669838fc085 | [
"MIT"
] | null | null | null | inference_folder.py | aba-ai-learning/Single-Human-Parsing-LIP | b1c0c91cef34dabf598231127886b669838fc085 | [
"MIT"
] | null | null | null | inference_folder.py | aba-ai-learning/Single-Human-Parsing-LIP | b1c0c91cef34dabf598231127886b669838fc085 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
import os
import argparse
import logging
import numpy as np
from PIL import Image
import matplotlib
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from torchvision import transforms
import cv2
import tqdm
from net.pspnet import PSPNet
models = {
... | 36.414013 | 113 | 0.575477 | 784 | 5,717 | 4.098214 | 0.315051 | 0.013694 | 0.009337 | 0.039216 | 0.171491 | 0.154373 | 0.151261 | 0.148148 | 0.131964 | 0.123249 | 0 | 0.079199 | 0.249082 | 5,717 | 156 | 114 | 36.647436 | 0.669229 | 0.034459 | 0 | 0.016129 | 0 | 0 | 0.10855 | 0.012162 | 0 | 0 | 0 | 0 | 0 | 1 | 0.040323 | false | 0 | 0.104839 | 0 | 0.169355 | 0.016129 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
608859a6a315773abcd6cc904b0d54529fd39c40 | 870 | py | Python | src/random_policy.py | shuvoxcd01/Policy-Evaluation | 6bfdfdaa67e1dd67edb75fcf5b4664f2584345ac | [
"Apache-2.0"
] | null | null | null | src/random_policy.py | shuvoxcd01/Policy-Evaluation | 6bfdfdaa67e1dd67edb75fcf5b4664f2584345ac | [
"Apache-2.0"
] | null | null | null | src/random_policy.py | shuvoxcd01/Policy-Evaluation | 6bfdfdaa67e1dd67edb75fcf5b4664f2584345ac | [
"Apache-2.0"
] | null | null | null | from src.gridworld_mdp import GridWorld
class EquiprobableRandomPolicy:
def __init__(self):
self.world_model = GridWorld()
def get_prob(self, selected_action, state):
assert state in self.world_model.states
assert selected_action in self.world_model.actions
num_all_possible_a... | 31.071429 | 79 | 0.651724 | 106 | 870 | 4.981132 | 0.330189 | 0.102273 | 0.159091 | 0.121212 | 0.314394 | 0.212121 | 0 | 0 | 0 | 0 | 0 | 0.009788 | 0.295402 | 870 | 27 | 80 | 32.222222 | 0.85155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.105263 | 1 | 0.105263 | false | 0 | 0.052632 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
6088d8cdd329f8f2bb36a7c2566daad3bd603e75 | 6,013 | py | Python | sktime/classification/feature_based/_summary_classifier.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | 1 | 2021-09-08T14:24:52.000Z | 2021-09-08T14:24:52.000Z | sktime/classification/feature_based/_summary_classifier.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | sktime/classification/feature_based/_summary_classifier.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Summary Classifier.
Pipeline classifier using the basic summary statistics and an estimator.
"""
__author__ = ["MatthewMiddlehurst"]
__all__ = ["SummaryClassifier"]
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sktime.base._base import _clone_estimator
from s... | 32.327957 | 82 | 0.617163 | 727 | 6,013 | 4.903714 | 0.27923 | 0.009537 | 0.028612 | 0.025245 | 0.20533 | 0.190182 | 0.173072 | 0.136045 | 0.11641 | 0.11641 | 0 | 0.009887 | 0.276734 | 6,013 | 185 | 83 | 32.502703 | 0.809841 | 0.479461 | 0 | 0.089552 | 0 | 0 | 0.043055 | 0.017971 | 0 | 0 | 0 | 0 | 0 | 1 | 0.059701 | false | 0 | 0.074627 | 0 | 0.223881 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
608982b20a5decc4b9d80d0fe548b89804a688a8 | 705 | py | Python | pypeln/thread/api/to_iterable_thread_test.py | quarckster/pypeln | f4160d0f4d4718b67f79a0707d7261d249459a4b | [
"MIT"
] | 1,281 | 2018-09-20T05:35:27.000Z | 2022-03-30T01:29:48.000Z | pypeln/thread/api/to_iterable_thread_test.py | webclinic017/pypeln | 5231806f2cac9d2019dacbbcf913484fd268b8c1 | [
"MIT"
] | 78 | 2018-09-18T20:38:12.000Z | 2022-03-30T20:16:02.000Z | pypeln/thread/api/to_iterable_thread_test.py | webclinic017/pypeln | 5231806f2cac9d2019dacbbcf913484fd268b8c1 | [
"MIT"
] | 88 | 2018-09-24T10:46:14.000Z | 2022-03-28T09:34:50.000Z | import typing as tp
from unittest import TestCase
import hypothesis as hp
from hypothesis import strategies as st
import pypeln as pl
import cytoolz as cz
MAX_EXAMPLES = 10
T = tp.TypeVar("T")
@hp.given(nums=st.lists(st.integers()))
@hp.settings(max_examples=MAX_EXAMPLES)
def test_from_to_iterable(nums: tp.List[int... | 23.5 | 46 | 0.721986 | 122 | 705 | 3.92623 | 0.311475 | 0.150313 | 0.125261 | 0.100209 | 0.242171 | 0.083507 | 0 | 0 | 0 | 0 | 0 | 0.010363 | 0.178723 | 705 | 29 | 47 | 24.310345 | 0.816926 | 0 | 0 | 0 | 0 | 0 | 0.001418 | 0 | 0 | 0 | 0 | 0 | 0.045455 | 1 | 0.045455 | false | 0 | 0.272727 | 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 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
608b4a53b9f9505194dcc39105a821f7c54562c8 | 12,881 | py | Python | acq4/drivers/ThorlabsMFC1/tmcm.py | aleonlein/acq4 | 4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555 | [
"MIT"
] | 1 | 2020-06-04T17:04:53.000Z | 2020-06-04T17:04:53.000Z | acq4/drivers/ThorlabsMFC1/tmcm.py | aleonlein/acq4 | 4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555 | [
"MIT"
] | 24 | 2016-09-27T17:25:24.000Z | 2017-03-02T21:00:11.000Z | acq4/drivers/ThorlabsMFC1/tmcm.py | sensapex/acq4 | 9561ba73caff42c609bd02270527858433862ad8 | [
"MIT"
] | 4 | 2016-10-19T06:39:36.000Z | 2019-09-30T21:06:45.000Z | from __future__ import print_function
"""
Low-level serial communication for Trinamic TMCM-140-42-SE controller
(used internally for the Thorlabs MFC1)
"""
import serial, struct, time, collections
try:
# this is nicer because it provides deadlock debugging information
from acq4.util.Mutex import RecursiveMut... | 27.760776 | 98 | 0.559273 | 1,523 | 12,881 | 4.593565 | 0.313854 | 0.031447 | 0.002573 | 0.013579 | 0.133791 | 0.098914 | 0.066609 | 0.055174 | 0.055174 | 0.055174 | 0 | 0.042631 | 0.322568 | 12,881 | 463 | 99 | 27.820734 | 0.759111 | 0.158373 | 0 | 0.124601 | 0 | 0 | 0.175805 | 0.034439 | 0 | 0 | 0 | 0 | 0.035144 | 1 | 0.099042 | false | 0 | 0.025559 | 0.009585 | 0.172524 | 0.003195 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
608ba712fb9a01badbb4b12d5b51c50071dede95 | 981 | py | Python | tests/generators/ios/test_core_data.py | brianleungwh/signals | d28d2722d681d390ebd21cd668d0b19f2f184451 | [
"MIT"
] | 3 | 2016-02-04T22:58:03.000Z | 2017-12-15T13:37:47.000Z | tests/generators/ios/test_core_data.py | brianleungwh/signals | d28d2722d681d390ebd21cd668d0b19f2f184451 | [
"MIT"
] | 37 | 2015-08-28T20:17:23.000Z | 2021-12-13T19:48:49.000Z | tests/generators/ios/test_core_data.py | brianleungwh/signals | d28d2722d681d390ebd21cd668d0b19f2f184451 | [
"MIT"
] | 6 | 2016-01-12T18:51:27.000Z | 2016-10-19T10:32:45.000Z | import unittest
from signals.generators.ios.core_data import get_current_version, get_core_data_from_folder
class CoreDataTestCase(unittest.TestCase):
def test_get_current_version(self):
version_name = get_current_version('./tests/files/doubledummy.xcdatamodeld')
self.assertEqual(version_name, 'du... | 49.05 | 91 | 0.768603 | 115 | 981 | 6.2 | 0.252174 | 0.134642 | 0.095372 | 0.084151 | 0.645161 | 0.586255 | 0.339411 | 0.232819 | 0.232819 | 0.232819 | 0 | 0.00237 | 0.139653 | 981 | 19 | 92 | 51.631579 | 0.842417 | 0 | 0 | 0.133333 | 0 | 0 | 0.236493 | 0.192661 | 0 | 0 | 0 | 0 | 0.266667 | 1 | 0.133333 | false | 0 | 0.133333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |