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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9a417a0a839c157704c0bb9c7d9a86e16b358f3e | 22,087 | py | Python | pdb_profiling/processors/uniprot/api.py | NatureGeorge/pdb-profiling | b29f93f90fccf03869a7a294932f61d8e0b3470c | [
"MIT"
] | 5 | 2020-10-27T12:02:00.000Z | 2021-11-05T06:51:59.000Z | pdb_profiling/processors/uniprot/api.py | NatureGeorge/pdb-profiling | b29f93f90fccf03869a7a294932f61d8e0b3470c | [
"MIT"
] | 9 | 2021-01-07T04:47:58.000Z | 2021-09-22T13:20:35.000Z | pdb_profiling/processors/uniprot/api.py | NatureGeorge/pdb-profiling | b29f93f90fccf03869a7a294932f61d8e0b3470c | [
"MIT"
] | null | null | null | # @Created Date: 2019-12-08 06:46:49 pm
# @Filename: api.py
# @Email: 1730416009@stu.suda.edu.cn
# @Author: ZeFeng Zhu
# @Last Modified: 2020-02-16 10:54:32 am
# @Copyright (c) 2020 MinghuiGroup, Soochow University
from typing import Iterable, Iterator, Optional, Union, Generator, Dict, List
from time import perf_coun... | 42.55684 | 186 | 0.55467 | 2,578 | 22,087 | 4.553918 | 0.165632 | 0.010562 | 0.011244 | 0.010307 | 0.230579 | 0.185349 | 0.141482 | 0.125724 | 0.102129 | 0.083816 | 0 | 0.008874 | 0.316295 | 22,087 | 518 | 187 | 42.638996 | 0.768558 | 0.019378 | 0 | 0.217054 | 0 | 0 | 0.089272 | 0.034603 | 0 | 0 | 0 | 0 | 0.015504 | 1 | 0.085271 | false | 0 | 0.116279 | 0.031008 | 0.302326 | 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 |
9a41e415317ae7c881f36ab4cbf51cbe613df940 | 9,409 | py | Python | hep_spt/stats/poisson.py | mramospe/hepspt | 11f74978a582ebc20e0a7765dafc78f0d1f1d5d5 | [
"MIT"
] | null | null | null | hep_spt/stats/poisson.py | mramospe/hepspt | 11f74978a582ebc20e0a7765dafc78f0d1f1d5d5 | [
"MIT"
] | null | null | null | hep_spt/stats/poisson.py | mramospe/hepspt | 11f74978a582ebc20e0a7765dafc78f0d1f1d5d5 | [
"MIT"
] | 1 | 2021-11-03T03:36:15.000Z | 2021-11-03T03:36:15.000Z | '''
Function and classes representing statistical tools.
'''
__author__ = ['Miguel Ramos Pernas']
__email__ = ['miguel.ramos.pernas@cern.ch']
from hep_spt.stats.core import chi2_one_dof, one_sigma
from hep_spt.core import decorate, taking_ndarray
from hep_spt import PACKAGE_PATH
import numpy as np
import os
from scip... | 27.755162 | 103 | 0.636199 | 1,359 | 9,409 | 4.282561 | 0.210449 | 0.035052 | 0.028866 | 0.026117 | 0.338832 | 0.324399 | 0.263574 | 0.251031 | 0.208591 | 0.180241 | 0 | 0.007745 | 0.245297 | 9,409 | 338 | 104 | 27.837278 | 0.811857 | 0.527793 | 0 | 0.150442 | 0 | 0 | 0.081703 | 0.007139 | 0 | 0 | 0 | 0 | 0 | 1 | 0.123894 | false | 0 | 0.070796 | 0.035398 | 0.292035 | 0.017699 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
9a47729e5dc9d9a2649d73a1b1f6d29309683f2b | 7,871 | py | Python | augmentation.py | Harlequln/C1M18X-Behavioural_Cloning | 0c49ad2432b2694848a7b83fddeea04c3306aa80 | [
"MIT"
] | null | null | null | augmentation.py | Harlequln/C1M18X-Behavioural_Cloning | 0c49ad2432b2694848a7b83fddeea04c3306aa80 | [
"MIT"
] | null | null | null | augmentation.py | Harlequln/C1M18X-Behavioural_Cloning | 0c49ad2432b2694848a7b83fddeea04c3306aa80 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import matplotlib.image as mpimg
from pathlib import Path
from model import *
CAMERA_STEERING_CORRECTION = 0.2
def image_path(sample, camera="center"):
""" Transform the sample path to the repository structure.
Args:
sample: a sample (row) of the data d... | 35.138393 | 81 | 0.632575 | 1,072 | 7,871 | 4.585821 | 0.203358 | 0.035801 | 0.009764 | 0.015256 | 0.256713 | 0.214809 | 0.189992 | 0.157038 | 0.112286 | 0.0476 | 0 | 0.018663 | 0.285224 | 7,871 | 223 | 82 | 35.295964 | 0.855137 | 0.48685 | 0 | 0.186667 | 0 | 0 | 0.025905 | 0.012069 | 0 | 0 | 0 | 0 | 0 | 1 | 0.16 | false | 0 | 0.066667 | 0 | 0.386667 | 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 |
9a483acc0e1727f56a550dc2b790cfba50c01c45 | 4,848 | py | Python | test_zeroshot.py | airbert-vln/airbert | a4f667db9fb4021094c738dd8d23739aee3785a5 | [
"MIT"
] | 17 | 2021-07-30T14:08:24.000Z | 2022-03-30T13:57:02.000Z | test_zeroshot.py | airbert-vln/airbert | a4f667db9fb4021094c738dd8d23739aee3785a5 | [
"MIT"
] | 4 | 2021-09-09T03:02:18.000Z | 2022-03-24T13:55:55.000Z | test_zeroshot.py | airbert-vln/airbert | a4f667db9fb4021094c738dd8d23739aee3785a5 | [
"MIT"
] | 2 | 2021-08-30T11:51:16.000Z | 2021-09-03T09:18:50.000Z | import json
import logging
from typing import List
import os
import sys
import numpy as np
import torch
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import AutoTokenizer, BertTokenizer
from vilbert.vilbert import BertConfig
from utils.cli import get_parser
from utils.dataset.commo... | 27.545455 | 88 | 0.65821 | 629 | 4,848 | 4.828299 | 0.310016 | 0.023049 | 0.011854 | 0.018439 | 0.115904 | 0.095489 | 0.046757 | 0.046757 | 0.023049 | 0 | 0 | 0.002884 | 0.213284 | 4,848 | 175 | 89 | 27.702857 | 0.793393 | 0.094472 | 0 | 0 | 0 | 0 | 0.109271 | 0.037727 | 0 | 0 | 0 | 0 | 0 | 1 | 0.036697 | false | 0 | 0.155963 | 0 | 0.220183 | 0.018349 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
9a49459be97466ed19cf1a661276df8eb41c082e | 3,184 | py | Python | refp.py | jon2718/ipycool_2.0 | 34cf74ee99f4a725b997c50a7742ba788ac2dacd | [
"MIT"
] | null | null | null | refp.py | jon2718/ipycool_2.0 | 34cf74ee99f4a725b997c50a7742ba788ac2dacd | [
"MIT"
] | null | null | null | refp.py | jon2718/ipycool_2.0 | 34cf74ee99f4a725b997c50a7742ba788ac2dacd | [
"MIT"
] | null | null | null | from modeledcommandparameter import *
from pseudoregion import *
class Refp(ModeledCommandParameter, PseudoRegion):
"""
Reference particle
"""
begtag = 'REFP'
endtag = ''
models = {
'model_descriptor': {'desc': 'Phase model',
'name': 'phmodref',
... | 38.829268 | 139 | 0.451005 | 308 | 3,184 | 4.50974 | 0.298701 | 0.063355 | 0.087113 | 0.061195 | 0.566595 | 0.563715 | 0.563715 | 0.539957 | 0.539957 | 0.539957 | 0 | 0.023289 | 0.339196 | 3,184 | 82 | 140 | 38.829268 | 0.636882 | 0.005653 | 0 | 0.484848 | 0 | 0.015152 | 0.347509 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.060606 | false | 0.030303 | 0.030303 | 0 | 0.151515 | 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 |
9a4a243b2c4f9a84354c254f16486d8c603e8178 | 10,620 | py | Python | utils/dataloaders.py | sinahmr/parted-vae | 261f0654de605c6a260784e47e9a17a737a1a985 | [
"MIT"
] | 5 | 2021-06-26T07:45:50.000Z | 2022-03-31T11:41:29.000Z | utils/dataloaders.py | sinahmr/parted-vae | 261f0654de605c6a260784e47e9a17a737a1a985 | [
"MIT"
] | null | null | null | utils/dataloaders.py | sinahmr/parted-vae | 261f0654de605c6a260784e47e9a17a737a1a985 | [
"MIT"
] | 1 | 2021-11-26T09:14:03.000Z | 2021-11-26T09:14:03.000Z | import numpy as np
import torch
from torch.nn import functional as F
from torch.utils.data import Dataset, DataLoader
from torchvision import datasets, transforms
from torchvision.utils import save_image
from utils.fast_tensor_dataloader import FastTensorDataLoader
def get_mnist_dataloaders(batch_size=128, path_to_d... | 44.06639 | 177 | 0.645104 | 1,409 | 10,620 | 4.635912 | 0.165366 | 0.028475 | 0.024495 | 0.022045 | 0.532149 | 0.490814 | 0.448714 | 0.376914 | 0.376914 | 0.326852 | 0 | 0.029893 | 0.234557 | 10,620 | 240 | 178 | 44.25 | 0.77365 | 0.166196 | 0 | 0.478528 | 0 | 0 | 0.029055 | 0.00261 | 0 | 0 | 0 | 0.004167 | 0 | 1 | 0.134969 | false | 0 | 0.042945 | 0.04908 | 0.300614 | 0.006135 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
9a4a26f9a634d7ab72a8a79970898804d2a1b1c4 | 1,780 | py | Python | posts.py | girish97115/anonymail | f2eb741464ce7b780e4de6de6043c6eed1e13b9a | [
"MIT"
] | null | null | null | posts.py | girish97115/anonymail | f2eb741464ce7b780e4de6de6043c6eed1e13b9a | [
"MIT"
] | null | null | null | posts.py | girish97115/anonymail | f2eb741464ce7b780e4de6de6043c6eed1e13b9a | [
"MIT"
] | null | null | null | from flask import (
Blueprint,session, flash, g, redirect, render_template, request, url_for
)
from werkzeug.exceptions import abort
from anonymail.auth import login_required
from anonymail.db import get_db
import datetime
now = datetime.datetime.now()
current_year = now.year
bp = Blueprint('posts', __name__)
@b... | 28.253968 | 78 | 0.580337 | 218 | 1,780 | 4.633028 | 0.357798 | 0.069307 | 0.079208 | 0.074257 | 0.114851 | 0.114851 | 0.114851 | 0.114851 | 0.114851 | 0.114851 | 0 | 0.002364 | 0.287079 | 1,780 | 63 | 79 | 28.253968 | 0.793538 | 0 | 0 | 0.163636 | 0 | 0 | 0.206625 | 0.012914 | 0 | 0 | 0 | 0 | 0 | 1 | 0.054545 | false | 0 | 0.090909 | 0.018182 | 0.218182 | 0.036364 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
9a4bcff10fc3fa7d7e56bb3812a166c957678a62 | 2,579 | py | Python | src/subroutines/array_subroutine.py | cyrilico/aoco-code-correction | 3a780df31eea6caaa37213f6347fb71565ce11e8 | [
"MIT"
] | 4 | 2020-08-30T08:56:57.000Z | 2020-08-31T21:32:03.000Z | src/subroutines/array_subroutine.py | cyrilico/aoco-code-correction | 3a780df31eea6caaa37213f6347fb71565ce11e8 | [
"MIT"
] | null | null | null | src/subroutines/array_subroutine.py | cyrilico/aoco-code-correction | 3a780df31eea6caaa37213f6347fb71565ce11e8 | [
"MIT"
] | 1 | 2020-10-01T22:15:33.000Z | 2020-10-01T22:15:33.000Z | from .subroutine import subroutine
from parameters.string_parameter import string_parameter as String
from parameters.numeric_parameter import numeric_parameter as Numeric
from parameters.array_parameter import array_parameter as Array
from ast import literal_eval
class array_subroutine(subroutine):
"""Subroutine... | 47.759259 | 154 | 0.606437 | 295 | 2,579 | 5.142373 | 0.294915 | 0.064601 | 0.027686 | 0.055372 | 0.142386 | 0.142386 | 0.059328 | 0.059328 | 0.059328 | 0.059328 | 0 | 0 | 0.288872 | 2,579 | 53 | 155 | 48.660377 | 0.827154 | 0.089957 | 0 | 0.170732 | 0 | 0 | 0.032092 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.121951 | false | 0 | 0.121951 | 0.04878 | 0.463415 | 0.04878 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
9a4cab617527bcae29b76af4b2c39e67572e4127 | 1,164 | py | Python | auth.py | nivw/onna_test | 518c726a656493a5efd7ed6f548f68b2f5350260 | [
"BSD-2-Clause"
] | null | null | null | auth.py | nivw/onna_test | 518c726a656493a5efd7ed6f548f68b2f5350260 | [
"BSD-2-Clause"
] | null | null | null | auth.py | nivw/onna_test | 518c726a656493a5efd7ed6f548f68b2f5350260 | [
"BSD-2-Clause"
] | 1 | 2020-06-24T16:52:59.000Z | 2020-06-24T16:52:59.000Z | import requests
import json
from config import config
from logbook import Logger, StreamHandler
import sys
StreamHandler(sys.stdout).push_application()
log = Logger('auth')
class Auth(object):
def __init__(self):
self.config = config
self.auth_code = self.token =None
def get_auth_code(self):... | 31.459459 | 83 | 0.629725 | 148 | 1,164 | 4.783784 | 0.317568 | 0.112994 | 0.101695 | 0.042373 | 0.053672 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001166 | 0.262887 | 1,164 | 36 | 84 | 32.333333 | 0.824009 | 0 | 0 | 0.133333 | 0 | 0 | 0.064433 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0 | 0.166667 | 0.033333 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
9a51a2dfb9ee0eb5c3e19b169561bb01b5b7ae90 | 4,063 | py | Python | application/api/generate_label.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | application/api/generate_label.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | application/api/generate_label.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | import numpy as np
import dnnlib.tflib as tflib
from training import dataset
tflib.init_tf()
class LabelGenerator:
def __init__(self, tfrecord_dir: str = None):
if tfrecord_dir:
self.training_set = dataset.TFRecordDataset(tfrecord_dir, shuffle_mb=0)
self.labels_available = True
... | 35.330435 | 99 | 0.502092 | 483 | 4,063 | 4.049689 | 0.204969 | 0.06135 | 0.050102 | 0.051125 | 0.468303 | 0.395194 | 0.326687 | 0.247444 | 0.247444 | 0.195297 | 0 | 0.057545 | 0.388383 | 4,063 | 114 | 100 | 35.640351 | 0.729577 | 0 | 0 | 0.41 | 0 | 0 | 0.027074 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04 | false | 0 | 0.03 | 0 | 0.14 | 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 |
9a51f5406e8b8b4afa3d8bc309049e92a8011b92 | 3,333 | py | Python | tests/test_urls.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 69 | 2015-10-03T20:27:53.000Z | 2021-04-06T05:26:18.000Z | tests/test_urls.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 73 | 2015-10-03T17:53:47.000Z | 2020-10-01T03:08:01.000Z | tests/test_urls.py | LaudateCorpus1/apostello | 1ace89d0d9e1f7a1760f6247d90a60a9787a4f12 | [
"MIT"
] | 29 | 2015-10-23T22:00:13.000Z | 2021-11-30T04:48:06.000Z | from collections import namedtuple
import pytest
from rest_framework.authtoken.models import Token
from tests.conftest import twilio_vcr
from apostello import models
StatusCode = namedtuple("StatusCode", "anon, user, staff")
@pytest.mark.slow
@pytest.mark.parametrize(
"url,status_code",
[
("/", Sta... | 40.646341 | 105 | 0.615362 | 429 | 3,333 | 4.682984 | 0.228438 | 0.037332 | 0.047785 | 0.038328 | 0.566949 | 0.501244 | 0.313091 | 0.206073 | 0.206073 | 0.206073 | 0 | 0.089519 | 0.19562 | 3,333 | 81 | 106 | 41.148148 | 0.659828 | 0.042004 | 0 | 0.190476 | 0 | 0 | 0.204294 | 0.03947 | 0 | 0 | 0 | 0 | 0.15873 | 1 | 0.095238 | false | 0 | 0.079365 | 0 | 0.206349 | 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 |
9a52f446636c4417f93211b5960e9ec09c902310 | 2,491 | py | Python | guestbook/main.py | bradmontgomery/mempy-flask-tutorial | 8113562460cfa837e7b26df29998e0b6950dd46f | [
"MIT"
] | 1 | 2018-01-10T17:54:18.000Z | 2018-01-10T17:54:18.000Z | guestbook/main.py | bradmontgomery/mempy-flask-tutorial | 8113562460cfa837e7b26df29998e0b6950dd46f | [
"MIT"
] | null | null | null | guestbook/main.py | bradmontgomery/mempy-flask-tutorial | 8113562460cfa837e7b26df29998e0b6950dd46f | [
"MIT"
] | null | null | null | """
A *really* simple guestbook flask app. Data is stored in a SQLite database that
looks something like the following:
+------------+------------------+------------+
| Name | Email | signed_on |
+============+==================+============+
| John Doe | jdoe@example.com | 2012-05-28 |
+------... | 29.654762 | 106 | 0.609394 | 302 | 2,491 | 4.92053 | 0.410596 | 0.030283 | 0.048452 | 0.05249 | 0.244953 | 0.188425 | 0.188425 | 0.188425 | 0.153432 | 0.153432 | 0 | 0.014933 | 0.193497 | 2,491 | 83 | 107 | 30.012048 | 0.724739 | 0.415496 | 0 | 0.235294 | 0 | 0 | 0.195636 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.117647 | false | 0 | 0.088235 | 0 | 0.294118 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
9a555159031db4d7f16f4b7224046ffb7dcc0810 | 25,673 | py | Python | lingvodoc/scripts/lingvodoc_converter.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 5 | 2017-03-30T18:02:11.000Z | 2021-07-20T16:02:34.000Z | lingvodoc/scripts/lingvodoc_converter.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 15 | 2016-02-24T13:16:59.000Z | 2021-09-03T11:47:15.000Z | lingvodoc/scripts/lingvodoc_converter.py | Winking-maniac/lingvodoc | f037bf0e91ccdf020469037220a43e63849aa24a | [
"Apache-2.0"
] | 22 | 2015-09-25T07:13:40.000Z | 2021-08-04T18:08:26.000Z | import sqlite3
import base64
import requests
import json
import hashlib
import logging
from lingvodoc.queue.client import QueueClient
def get_dict_attributes(sqconn):
dict_trav = sqconn.cursor()
dict_trav.execute("""SELECT
dict_name,
dict_identificator,
... | 51.346 | 159 | 0.569158 | 2,677 | 25,673 | 5.100859 | 0.109824 | 0.04394 | 0.029293 | 0.018455 | 0.598902 | 0.528378 | 0.475943 | 0.437129 | 0.394654 | 0.361626 | 0 | 0.009986 | 0.340825 | 25,673 | 499 | 160 | 51.448898 | 0.796904 | 0.022241 | 0 | 0.37296 | 0 | 0.002331 | 0.257024 | 0.059464 | 0 | 0 | 0 | 0.002004 | 0 | 1 | 0.025641 | false | 0.009324 | 0.020979 | 0 | 0.060606 | 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 |
9a56a9cb8a9973d77c62dc8bff13ecc6a5a858c1 | 1,550 | py | Python | tests/test_all.py | euranova/DAEMA | 29fec157c34afcc9abe95bc602a3012615b3c36b | [
"MIT"
] | 6 | 2021-09-17T02:09:29.000Z | 2022-03-20T04:15:15.000Z | tests/test_all.py | Jason-Xu-Ncepu/DAEMA | 29fec157c34afcc9abe95bc602a3012615b3c36b | [
"MIT"
] | null | null | null | tests/test_all.py | Jason-Xu-Ncepu/DAEMA | 29fec157c34afcc9abe95bc602a3012615b3c36b | [
"MIT"
] | 4 | 2021-06-29T22:57:18.000Z | 2022-03-09T09:19:17.000Z | """ Tests the code. """
from torch.utils.data import DataLoader
from models import MODELS
from pipeline import argument_parser
from pipeline.datasets import DATASETS, get_dataset
from run import main
def test_datasets():
""" Tests all the datasets defined in pipeline.datasets.DATASETS. """
for ds_name in DA... | 38.75 | 113 | 0.614839 | 212 | 1,550 | 4.358491 | 0.429245 | 0.025974 | 0.048701 | 0.032468 | 0.097403 | 0.04329 | 0 | 0 | 0 | 0 | 0 | 0.012777 | 0.242581 | 1,550 | 39 | 114 | 39.74359 | 0.774276 | 0.127097 | 0 | 0 | 0 | 0 | 0.19367 | 0.033911 | 0 | 0 | 0 | 0 | 0.153846 | 1 | 0.115385 | false | 0 | 0.192308 | 0 | 0.307692 | 0.038462 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
9a586ac04d9d83458edb9f23d9cb90fb787462de | 2,185 | py | Python | src/preprocessing.py | Wisteria30/GIM-RL | 085ba3b8c10590f82226cd1675ba96c5f90740f3 | [
"Apache-2.0"
] | 3 | 2021-10-15T00:57:05.000Z | 2021-12-16T13:00:05.000Z | src/preprocessing.py | Wisteria30/GIM-RL | 085ba3b8c10590f82226cd1675ba96c5f90740f3 | [
"Apache-2.0"
] | null | null | null | src/preprocessing.py | Wisteria30/GIM-RL | 085ba3b8c10590f82226cd1675ba96c5f90740f3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import random
import os
import sys
import torch
from src.agent import (
EpsilonGreedyAgent,
MaxAgent,
RandomAgent,
RandomCreateBVAgent,
ProbabilityAgent,
QAgent,
QAndUtilityAgent,
MultiEpsilonGreedyAgent,
MultiMaxAgent,
MultiProbabilit... | 27.3125 | 74 | 0.644851 | 260 | 2,185 | 5.353846 | 0.265385 | 0.068966 | 0.12069 | 0.112069 | 0.501437 | 0.466954 | 0.466954 | 0.466954 | 0.314655 | 0.270115 | 0 | 0.002367 | 0.226545 | 2,185 | 79 | 75 | 27.658228 | 0.821302 | 0.009611 | 0 | 0.382353 | 0 | 0 | 0.10407 | 0.020814 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.088235 | 0 | 0.176471 | 0.029412 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
9a5ad370a80119a4cd36243d371bcf4ccf37a3ae | 1,439 | py | Python | src/leaf/file_tools.py | Pix-00/olea-v2_flask_1_ | 7ddfa83a7a2a7dfbe55b78da002c1193f38781c0 | [
"Apache-2.0"
] | null | null | null | src/leaf/file_tools.py | Pix-00/olea-v2_flask_1_ | 7ddfa83a7a2a7dfbe55b78da002c1193f38781c0 | [
"Apache-2.0"
] | null | null | null | src/leaf/file_tools.py | Pix-00/olea-v2_flask_1_ | 7ddfa83a7a2a7dfbe55b78da002c1193f38781c0 | [
"Apache-2.0"
] | null | null | null | from hashlib import sha3_256
import magic
from enums import Dep, MangoType
MIME_MTYPE = {
'text/plain': MangoType.text,
'audio/flac': MangoType.audio_flac,
'audio/wav': MangoType.audio_wav,
'image/png': MangoType.picture_png,
'image/jpeg': MangoType.picture_jpg,
'video/x-matroska': MangoType.... | 24.810345 | 73 | 0.635858 | 187 | 1,439 | 4.748663 | 0.363636 | 0.060811 | 0.101351 | 0.070946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03 | 0.23558 | 1,439 | 57 | 74 | 25.245614 | 0.777273 | 0 | 0 | 0.133333 | 0 | 0 | 0.063238 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.044444 | false | 0 | 0.066667 | 0.022222 | 0.155556 | 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 |
9a61264c94a41a473e6cc008dcf849ae78b0596c | 898 | py | Python | akamai/cache_buster/bust_cache.py | famartinrh/cloud-services-config | 7dd4fe24fc09a62f360e3407629b1c2567a10260 | [
"MIT"
] | 11 | 2019-06-25T17:01:12.000Z | 2022-01-21T18:53:13.000Z | akamai/cache_buster/bust_cache.py | famartinrh/cloud-services-config | 7dd4fe24fc09a62f360e3407629b1c2567a10260 | [
"MIT"
] | 253 | 2019-05-24T12:48:32.000Z | 2022-03-29T11:00:25.000Z | akamai/cache_buster/bust_cache.py | famartinrh/cloud-services-config | 7dd4fe24fc09a62f360e3407629b1c2567a10260 | [
"MIT"
] | 93 | 2019-04-17T09:22:43.000Z | 2022-03-21T18:53:28.000Z | import sys
import subprocess
def main():
edgeRcPath = sys.argv[1]
branch = sys.argv[2]
navlist = sys.argv[3:]
domain = 'https://console.stage.redhat.com'
if 'prod' in branch:
domain = 'https://console.redhat.com'
if 'beta' in branch:
domain += '/beta'
purgeAssets = ['fed-mod... | 30.965517 | 105 | 0.615813 | 105 | 898 | 5.180952 | 0.504762 | 0.038603 | 0.066176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005874 | 0.241648 | 898 | 28 | 106 | 32.071429 | 0.792952 | 0 | 0 | 0 | 0 | 0 | 0.26392 | 0.087973 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038462 | false | 0 | 0.076923 | 0 | 0.115385 | 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 |
9a620af02d14a583cea144484597abc9077f8497 | 6,300 | py | Python | gryphon/dashboards/handlers/status.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 1,109 | 2019-06-20T19:23:27.000Z | 2022-03-20T14:03:43.000Z | gryphon/dashboards/handlers/status.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 63 | 2019-06-21T05:36:17.000Z | 2021-05-26T21:08:15.000Z | gryphon/dashboards/handlers/status.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 181 | 2019-06-20T19:42:05.000Z | 2022-03-21T13:05:13.000Z | # -*- coding: utf-8 -*-
from datetime import timedelta
import logging
from delorean import Delorean
import tornado.web
from gryphon.dashboards.handlers.admin_base import AdminBaseHandler
from gryphon.lib.exchange import exchange_factory
from gryphon.lib.models.order import Order
from gryphon.lib.models.exchange impor... | 33.157895 | 87 | 0.623968 | 690 | 6,300 | 5.381159 | 0.207246 | 0.032588 | 0.02801 | 0.021546 | 0.260167 | 0.214382 | 0.172906 | 0.16321 | 0.146512 | 0.114732 | 0 | 0.002682 | 0.289683 | 6,300 | 189 | 88 | 33.333333 | 0.827039 | 0.026508 | 0 | 0.131387 | 0 | 0 | 0.046073 | 0 | 0 | 0 | 0 | 0.005291 | 0 | 1 | 0.058394 | false | 0 | 0.080292 | 0 | 0.19708 | 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 |
9a63239cdeadf5547e515d79f10a494c6c3288e7 | 4,897 | py | Python | setup.py | Hydar-Zartash/TF_regression | ac7cef4c1f248664b57139ae40c582ec80b2355f | [
"MIT"
] | null | null | null | setup.py | Hydar-Zartash/TF_regression | ac7cef4c1f248664b57139ae40c582ec80b2355f | [
"MIT"
] | null | null | null | setup.py | Hydar-Zartash/TF_regression | ac7cef4c1f248664b57139ae40c582ec80b2355f | [
"MIT"
] | null | null | null | import yfinance as yf
import numpy as np
import pandas as pd
class StockSetup():
"""
The object of this class includes a dataframe, a classifier trained on it
and some associated test and prediction stats
"""
def __init__(self, ticker: str, target:int) -> None:
"""Initialize the ob... | 44.926606 | 195 | 0.596488 | 669 | 4,897 | 4.328849 | 0.301943 | 0.140884 | 0.041436 | 0.029351 | 0.217541 | 0.166091 | 0.149171 | 0.139503 | 0.09047 | 0.064227 | 0 | 0.033791 | 0.256688 | 4,897 | 109 | 196 | 44.926606 | 0.761813 | 0.37329 | 0 | 0 | 0 | 0 | 0.128457 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.186047 | false | 0 | 0.069767 | 0 | 0.302326 | 0.046512 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
9a636c8c285701e4e227ff48aaa2926973c39b10 | 1,893 | py | Python | netsuitesdk/api/custom_records.py | wolever/netsuite-sdk-py | 1b1c21e2a8a532fdbf54915e7e9d30b8b5fc2d08 | [
"MIT"
] | 47 | 2019-08-15T21:36:36.000Z | 2022-03-18T23:44:59.000Z | netsuitesdk/api/custom_records.py | wolever/netsuite-sdk-py | 1b1c21e2a8a532fdbf54915e7e9d30b8b5fc2d08 | [
"MIT"
] | 52 | 2019-06-17T09:43:04.000Z | 2022-03-22T05:00:53.000Z | netsuitesdk/api/custom_records.py | wolever/netsuite-sdk-py | 1b1c21e2a8a532fdbf54915e7e9d30b8b5fc2d08 | [
"MIT"
] | 55 | 2019-06-02T22:18:01.000Z | 2022-03-29T07:20:31.000Z | from collections import OrderedDict
from .base import ApiBase
import logging
logger = logging.getLogger(__name__)
class CustomRecords(ApiBase):
SIMPLE_FIELDS = [
'allowAttachments',
'allowInlineEditing',
'allowNumberingOverride',
'allowQuickSearch',
'altName',
'au... | 25.581081 | 77 | 0.59588 | 139 | 1,893 | 7.899281 | 0.604317 | 0.03643 | 0.043716 | 0.029144 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.293185 | 1,893 | 73 | 78 | 25.931507 | 0.820628 | 0 | 0 | 0 | 0 | 0 | 0.348653 | 0.057581 | 0 | 0 | 0 | 0 | 0.015873 | 1 | 0.031746 | false | 0 | 0.047619 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
9a67d0c9f6bb396b9d590ca653e1ee83e64bff97 | 3,421 | py | Python | ava/actives/shell_injection.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | 2 | 2019-03-26T15:37:48.000Z | 2020-01-03T03:47:30.000Z | ava/actives/shell_injection.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | 2 | 2021-03-25T21:27:09.000Z | 2021-06-01T21:20:04.000Z | ava/actives/shell_injection.py | indeedsecurity/ava-ce | 4483b301034a096b716646a470a6642b3df8ce61 | [
"Apache-2.0"
] | null | null | null | import re
from ava.common.check import _ValueCheck, _TimingCheck
from ava.common.exception import InvalidFormatException
# metadata
name = __name__
description = "checks for shell injection"
class ShellInjectionCheck(_ValueCheck):
"""
Checks for Shell Injection by executing the 'id' command. The payload use... | 31.385321 | 117 | 0.501315 | 358 | 3,421 | 4.734637 | 0.290503 | 0.053097 | 0.057817 | 0.074336 | 0.381711 | 0.325664 | 0.325664 | 0.19705 | 0.145133 | 0.130973 | 0 | 0.025968 | 0.358375 | 3,421 | 108 | 118 | 31.675926 | 0.746241 | 0.296405 | 0 | 0.096774 | 0 | 0.016129 | 0.260927 | 0.031347 | 0 | 0 | 0 | 0 | 0 | 1 | 0.064516 | false | 0 | 0.048387 | 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 |
7bd4c7d5599bd575e062c27d1c3e19928097f821 | 5,967 | py | Python | train.py | ProfessorHuang/2D-UNet-Pytorch | b3941e8dc0ac3e76b6eedb656f943f1bd66fa799 | [
"MIT"
] | 11 | 2020-12-09T10:38:47.000Z | 2022-03-07T13:12:48.000Z | train.py | lllllllllllll-llll/2D-UNet-Pytorch | b3941e8dc0ac3e76b6eedb656f943f1bd66fa799 | [
"MIT"
] | 3 | 2020-11-24T02:23:02.000Z | 2021-04-18T15:31:51.000Z | train.py | ProfessorHuang/2D-UNet-Pytorch | b3941e8dc0ac3e76b6eedb656f943f1bd66fa799 | [
"MIT"
] | 2 | 2021-04-07T06:17:46.000Z | 2021-11-11T07:41:46.000Z | import argparse
import logging
import os
import sys
import numpy as np
from tqdm import tqdm
import time
import torch
import torch.nn as nn
from torch import optim
from torch.utils.tensorboard import SummaryWriter
from torch.utils.data import DataLoader
from models.unet import UNet
from models.nested_unet import Nest... | 37.062112 | 121 | 0.622256 | 755 | 5,967 | 4.761589 | 0.25298 | 0.027538 | 0.03783 | 0.01669 | 0.176356 | 0.091794 | 0.061196 | 0.042281 | 0 | 0 | 0 | 0.011316 | 0.244679 | 5,967 | 160 | 122 | 37.29375 | 0.786332 | 0.012066 | 0 | 0.016 | 0 | 0 | 0.153794 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.016 | false | 0 | 0.144 | 0 | 0.168 | 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 |
7bd7513f32c35775cd41faee3dba10cf9bfca50a | 882 | py | Python | app/mod_tweepy/controllers.py | cbll/SocialDigger | 177a7b5bb1b295722e8d281a8f33678a02bd5ab0 | [
"Apache-2.0"
] | 3 | 2016-01-28T20:35:46.000Z | 2020-03-08T08:49:07.000Z | app/mod_tweepy/controllers.py | cbll/SocialDigger | 177a7b5bb1b295722e8d281a8f33678a02bd5ab0 | [
"Apache-2.0"
] | null | null | null | app/mod_tweepy/controllers.py | cbll/SocialDigger | 177a7b5bb1b295722e8d281a8f33678a02bd5ab0 | [
"Apache-2.0"
] | null | null | null | from flask import Flask
from flask.ext.tweepy import Tweepy
app = Flask(__name__)
app.config.setdefault('TWEEPY_CONSUMER_KEY', 'sve32G2LtUhvgyj64J0aaEPNk')
app.config.setdefault('TWEEPY_CONSUMER_SECRET', '0z4NmfjET4BrLiOGsspTkVKxzDK1Qv6Yb2oiHpZC9Vi0T9cY2X')
app.config.setdefault('TWEEPY_ACCESS_TOKEN_KEY', '1425531373-... | 38.347826 | 102 | 0.794785 | 100 | 882 | 6.76 | 0.46 | 0.053254 | 0.112426 | 0.147929 | 0.204142 | 0.106509 | 0 | 0 | 0 | 0 | 0 | 0.045623 | 0.080499 | 882 | 22 | 103 | 40.090909 | 0.787916 | 0 | 0 | 0 | 0 | 0 | 0.414302 | 0.273553 | 0 | 0 | 0 | 0 | 0 | 1 | 0.117647 | false | 0 | 0.117647 | 0 | 0.352941 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
7bd8f52d214214860defef756924562c2d718956 | 2,135 | py | Python | speed/__init__.py | Astrochamp/speed | e17b2d1de6590d08e5cfddf875b4445f20c1e08a | [
"MIT"
] | 1 | 2022-02-12T18:43:43.000Z | 2022-02-12T18:43:43.000Z | speed/__init__.py | Astrochamp/speed | e17b2d1de6590d08e5cfddf875b4445f20c1e08a | [
"MIT"
] | null | null | null | speed/__init__.py | Astrochamp/speed | e17b2d1de6590d08e5cfddf875b4445f20c1e08a | [
"MIT"
] | null | null | null | def showSpeed(func, r, *args):
'''Usage: showSpeed(function, runs)
You can also pass arguments into <function> like so:
showSpeed(function, runs, <other>, <args>, <here> ...)
showSpeed() prints the average execution time of <function> over <runs> runs
'''
def formatted(f):
import re
... | 31.865672 | 92 | 0.562061 | 266 | 2,135 | 4.383459 | 0.323308 | 0.06175 | 0.06175 | 0.024014 | 0.67753 | 0.634648 | 0.634648 | 0.634648 | 0.634648 | 0.557461 | 0 | 0.004024 | 0.301639 | 2,135 | 66 | 93 | 32.348485 | 0.778001 | 0.209368 | 0 | 0.679245 | 0 | 0 | 0.038953 | 0.034084 | 0 | 0 | 0 | 0 | 0 | 1 | 0.132075 | false | 0 | 0.09434 | 0 | 0.339623 | 0.018868 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
7bd9a84e5c6f84dbd90d1bc72cc33fccf0f2c06c | 9,106 | py | Python | polygonize.py | yaramohajerani/GL_learning | aa8d644024e48ba3e68398050f259b61d0660a2e | [
"MIT"
] | 7 | 2021-03-04T15:43:21.000Z | 2021-07-08T08:42:23.000Z | polygonize.py | yaramohajerani/GL_learning | aa8d644024e48ba3e68398050f259b61d0660a2e | [
"MIT"
] | null | null | null | polygonize.py | yaramohajerani/GL_learning | aa8d644024e48ba3e68398050f259b61d0660a2e | [
"MIT"
] | 2 | 2021-03-11T12:04:42.000Z | 2021-04-20T16:33:31.000Z | #!/usr/bin/env python
u"""
polygonize.py
Yara Mohajerani (Last update 09/2020)
Read output predictions and convert to shapefile lines
"""
import os
import sys
import rasterio
import numpy as np
import getopt
import shapefile
from skimage.measure import find_contours
from shapely.geometry import Polygon,LineString,Poin... | 32.992754 | 121 | 0.647595 | 1,509 | 9,106 | 3.795891 | 0.206759 | 0.021997 | 0.026187 | 0.015712 | 0.261697 | 0.185754 | 0.155203 | 0.148918 | 0.112954 | 0.09602 | 0 | 0.01023 | 0.184164 | 9,106 | 275 | 122 | 33.112727 | 0.760802 | 0.250494 | 0 | 0.16129 | 0 | 0.005376 | 0.143216 | 0.028998 | 0 | 0 | 0 | 0 | 0 | 1 | 0.005376 | false | 0 | 0.043011 | 0 | 0.048387 | 0.005376 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
7bdb2f5c5a190e7161ceacb56d31dd8753fd3925 | 4,573 | py | Python | test_autofit/graphical/regression/test_linear_regression.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | test_autofit/graphical/regression/test_linear_regression.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | test_autofit/graphical/regression/test_linear_regression.py | rhayes777/AutoFit | f5d769755b85a6188ec1736d0d754f27321c2f06 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from autofit.graphical import (
EPMeanField,
LaplaceOptimiser,
EPOptimiser,
Factor,
)
from autofit.messages import FixedMessage, NormalMessage
np.random.seed(1)
prior_std = 10.
error_std = 1.
a = np.array([[-1.3], [0.7]])
b = np.array([-0.5])
n_obs = 100
n_features,... | 26.9 | 84 | 0.659086 | 682 | 4,573 | 4.073314 | 0.159824 | 0.079194 | 0.059395 | 0.064795 | 0.37653 | 0.342693 | 0.25594 | 0.25594 | 0.212023 | 0.212023 | 0 | 0.020306 | 0.213864 | 4,573 | 170 | 85 | 26.9 | 0.752434 | 0.003499 | 0 | 0.24812 | 0 | 0 | 0.018218 | 0 | 0 | 0 | 0 | 0 | 0.052632 | 1 | 0.090226 | false | 0 | 0.030075 | 0.030075 | 0.172932 | 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 |
7bdbfbdb118df696ee04cd30b0904cea6a77354a | 1,716 | py | Python | src/linear/linear.py | RaulMurillo/cpp-torch | 30d0ee38c20f389e4b996d821952a48cccc70789 | [
"MIT"
] | null | null | null | src/linear/linear.py | RaulMurillo/cpp-torch | 30d0ee38c20f389e4b996d821952a48cccc70789 | [
"MIT"
] | null | null | null | src/linear/linear.py | RaulMurillo/cpp-torch | 30d0ee38c20f389e4b996d821952a48cccc70789 | [
"MIT"
] | null | null | null | import math
from torch import nn
import torch
import torch.nn.functional as F
import linear_cpu as linear
class LinearFunction(torch.autograd.Function):
@staticmethod
def forward(ctx, input, weights, bias, params):
is_bias = int(params[0])
outputs = linear.forward(input, weights, bias, is_bi... | 29.586207 | 79 | 0.666084 | 221 | 1,716 | 4.950226 | 0.294118 | 0.04936 | 0.058501 | 0.060329 | 0.133455 | 0.058501 | 0 | 0 | 0 | 0 | 0 | 0.006061 | 0.230769 | 1,716 | 57 | 80 | 30.105263 | 0.822727 | 0 | 0 | 0.102564 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.128205 | false | 0 | 0.128205 | 0.025641 | 0.384615 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
7bdf6ec04e7754ae150125e027e057b6d43b24d9 | 11,907 | py | Python | object_files_api/files_api.py | ndlib/mellon-manifest-pipeline | aa90494e73fbc30ce701771ac653d28d533217db | [
"Apache-2.0"
] | 1 | 2021-06-27T15:16:13.000Z | 2021-06-27T15:16:13.000Z | object_files_api/files_api.py | ndlib/marble-manifest-pipeline | abc036e4c81a8a5e938373a43153e2492a17cbf8 | [
"Apache-2.0"
] | 8 | 2019-11-05T18:58:23.000Z | 2021-09-03T14:54:42.000Z | object_files_api/files_api.py | ndlib/mellon-manifest-pipeline | aa90494e73fbc30ce701771ac653d28d533217db | [
"Apache-2.0"
] | null | null | null | """ Files API """
import boto3
import os
import io
from datetime import datetime, timedelta
import json
import time
from s3_helpers import write_s3_json, read_s3_json, delete_s3_key
from api_helpers import json_serial
from search_files import crawl_available_files, update_pdf_fields
from dynamo_helpers import add_file_... | 62.340314 | 259 | 0.646342 | 1,505 | 11,907 | 4.780731 | 0.163455 | 0.033357 | 0.022516 | 0.015566 | 0.361084 | 0.261015 | 0.218485 | 0.148436 | 0.105073 | 0.082557 | 0 | 0.004741 | 0.256068 | 11,907 | 190 | 260 | 62.668421 | 0.807519 | 0.099773 | 0 | 0.117647 | 0 | 0 | 0.12948 | 0.05076 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047059 | false | 0 | 0.076471 | 0 | 0.164706 | 0.011765 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
7be095f1c9c4b3f5f33d92d1c96cc497d62846c5 | 40,240 | py | Python | sampledb/frontend/projects.py | NicolasCARPi/sampledb | d6fd0f4d28d05010d7e0c022fbf2576e25435077 | [
"MIT"
] | null | null | null | sampledb/frontend/projects.py | NicolasCARPi/sampledb | d6fd0f4d28d05010d7e0c022fbf2576e25435077 | [
"MIT"
] | null | null | null | sampledb/frontend/projects.py | NicolasCARPi/sampledb | d6fd0f4d28d05010d7e0c022fbf2576e25435077 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
"""
import flask
import flask_login
import json
from flask_babel import _
from . import frontend
from .. import logic
from ..logic.object_permissions import Permissions
from ..logic.security_tokens import verify_token
from ..logic.languages import get_languages, get_language, get_language_by_lang... | 56.437588 | 256 | 0.675149 | 4,720 | 40,240 | 5.4375 | 0.060593 | 0.060316 | 0.033041 | 0.034366 | 0.672823 | 0.619209 | 0.542139 | 0.490395 | 0.448899 | 0.430859 | 0 | 0.001411 | 0.242768 | 40,240 | 712 | 257 | 56.516854 | 0.840865 | 0.008921 | 0 | 0.475336 | 0 | 0.001495 | 0.127377 | 0.009432 | 0 | 0 | 0 | 0 | 0 | 1 | 0.008969 | false | 0.005979 | 0.020927 | 0 | 0.119581 | 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 |
7be58215b629ccdaed1b12b4ee8ac016d5bf374b | 1,474 | py | Python | setup.py | caalle/caaalle | 3653155338fefde73579508ee83905a8ad8e3924 | [
"Apache-2.0"
] | null | null | null | setup.py | caalle/caaalle | 3653155338fefde73579508ee83905a8ad8e3924 | [
"Apache-2.0"
] | 4 | 2021-04-26T18:42:38.000Z | 2021-04-26T18:42:41.000Z | setup.py | caalle/caaalle | 3653155338fefde73579508ee83905a8ad8e3924 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import codecs
import os
import re
from setuptools import setup
with open('README.md', 'r') as f:
readme = f.read()
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
with codecs.open(os.path.join(here, *parts), 'r') as fp:
return fp.read()
def find_version(*f... | 26.321429 | 68 | 0.643148 | 177 | 1,474 | 5.101695 | 0.519774 | 0.084164 | 0.110742 | 0.115172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012007 | 0.208955 | 1,474 | 55 | 69 | 26.8 | 0.762436 | 0.014247 | 0 | 0 | 0 | 0 | 0.263774 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.042553 | false | 0 | 0.085106 | 0 | 0.170213 | 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 |
7be827f0693117abffb3e3ef853dcd8e6d5807a0 | 10,522 | py | Python | kevlar/tests/test_novel.py | johnsmith2077/kevlar | 3ed06dae62479e89ccd200391728c416d4df8052 | [
"MIT"
] | 24 | 2016-12-07T07:59:09.000Z | 2019-03-11T02:05:36.000Z | kevlar/tests/test_novel.py | johnsmith2077/kevlar | 3ed06dae62479e89ccd200391728c416d4df8052 | [
"MIT"
] | 325 | 2016-12-07T07:37:17.000Z | 2019-03-12T19:01:40.000Z | kevlar/tests/test_novel.py | standage/kevlar | 622d1869266550422e91a60119ddc7261eea434a | [
"MIT"
] | 8 | 2017-08-17T01:37:39.000Z | 2019-03-01T16:17:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------
# Copyright (c) 2016 The Regents of the University of California
#
# This file is part of kevlar (http://github.com/dib-lab/kevlar) and is
# licensed under the MIT license: see LICENSE.
# ----... | 37.180212 | 79 | 0.585535 | 1,306 | 10,522 | 4.64242 | 0.199081 | 0.02639 | 0.027874 | 0.040739 | 0.498763 | 0.427016 | 0.395349 | 0.381824 | 0.351146 | 0.331024 | 0 | 0.02712 | 0.229044 | 10,522 | 282 | 80 | 37.312057 | 0.720291 | 0.035735 | 0 | 0.350427 | 0 | 0 | 0.227089 | 0.069449 | 0 | 0 | 0 | 0 | 0.128205 | 1 | 0.051282 | false | 0 | 0.055556 | 0 | 0.106838 | 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 |
7bea7db6a9ed79dea66853c2fd9ed8df8241cc8b | 1,353 | py | Python | bot.py | egor5q/pvp-combat | 42d0f9df14e35c408deb7a360a9f7544ceae7dd7 | [
"MIT"
] | null | null | null | bot.py | egor5q/pvp-combat | 42d0f9df14e35c408deb7a360a9f7544ceae7dd7 | [
"MIT"
] | null | null | null | bot.py | egor5q/pvp-combat | 42d0f9df14e35c408deb7a360a9f7544ceae7dd7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import telebot
import time
import random
import threading
from emoji import emojize
from telebot import types
from pymongo import MongoClient
import traceback
token = os.environ['TELEGRAM_TOKEN']
bot = telebot.TeleBot(token)
#client=MongoClient(os.environ['database'])
#db=client.
#u... | 22.932203 | 115 | 0.625277 | 164 | 1,353 | 5.036585 | 0.47561 | 0.053269 | 0.039952 | 0.041162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016699 | 0.247598 | 1,353 | 58 | 116 | 23.327586 | 0.794695 | 0.064302 | 0 | 0 | 0 | 0 | 0.08254 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.25 | 0.055556 | 0.416667 | 0.027778 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
7bee6b98a8502317f53e2986edd1dc16f78c2ac7 | 50,039 | py | Python | simleague/simleague.py | Kuro-Rui/flare-cogs | f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d | [
"MIT"
] | 38 | 2021-03-07T17:13:10.000Z | 2022-02-28T19:50:00.000Z | simleague/simleague.py | Kuro-Rui/flare-cogs | f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d | [
"MIT"
] | 44 | 2021-03-12T19:13:32.000Z | 2022-03-18T10:20:52.000Z | simleague/simleague.py | Kuro-Rui/flare-cogs | f739e3a4a8c65bf0e10945d242ba0b82f96c6d3d | [
"MIT"
] | 33 | 2021-03-08T18:59:59.000Z | 2022-03-23T10:57:46.000Z | import asyncio
import logging
import random
import time
from abc import ABC
from typing import Literal, Optional
import aiohttp
import discord
from redbot.core import Config, bank, checks, commands
from redbot.core.utils.chat_formatting import box
from redbot.core.utils.menus import DEFAULT_CONTROLS, menu
from tabulat... | 43.85539 | 142 | 0.428846 | 4,680 | 50,039 | 4.551068 | 0.113675 | 0.033804 | 0.029297 | 0.037185 | 0.513123 | 0.476407 | 0.43387 | 0.392225 | 0.35997 | 0.352364 | 0 | 0.028665 | 0.465277 | 50,039 | 1,140 | 143 | 43.89386 | 0.767276 | 0.006915 | 0 | 0.457407 | 0 | 0.00463 | 0.074023 | 0.002471 | 0 | 0 | 0.000324 | 0 | 0 | 1 | 0.002778 | false | 0.001852 | 0.015741 | 0 | 0.056481 | 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 |
7befce5f0d88c105c0447661c3338248d03f3ae9 | 2,118 | py | Python | 7_neural_networks/4_DeepLearning2.py | edrmonteiro/DataSciencePython | 0a35fb085bc0b98b33e083d0e1b113a04caa3aac | [
"MIT"
] | null | null | null | 7_neural_networks/4_DeepLearning2.py | edrmonteiro/DataSciencePython | 0a35fb085bc0b98b33e083d0e1b113a04caa3aac | [
"MIT"
] | null | null | null | 7_neural_networks/4_DeepLearning2.py | edrmonteiro/DataSciencePython | 0a35fb085bc0b98b33e083d0e1b113a04caa3aac | [
"MIT"
] | null | null | null | """
Deep Learning
"""
import pandas as pd
from keras.models import Sequential
from keras.layers import Dense
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
from sklearn.preprocessing import StandardScaler
f... | 29.830986 | 119 | 0.767705 | 316 | 2,118 | 4.984177 | 0.452532 | 0.019048 | 0.024762 | 0.04381 | 0.07873 | 0.07873 | 0.07873 | 0.07873 | 0.07873 | 0.07873 | 0 | 0.015021 | 0.119924 | 2,118 | 70 | 120 | 30.257143 | 0.829936 | 0.1983 | 0 | 0 | 0 | 0 | 0.062649 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.02439 | 0.219512 | 0 | 0.219512 | 0.02439 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
7bf5401a73cd65b2b3dab4a303b9fc867d22f877 | 3,142 | py | Python | presta_connect.py | subteno-it/presta_connect | 7cc8f2f915b28ada40a03573651a3558e6503004 | [
"MIT"
] | null | null | null | presta_connect.py | subteno-it/presta_connect | 7cc8f2f915b28ada40a03573651a3558e6503004 | [
"MIT"
] | null | null | null | presta_connect.py | subteno-it/presta_connect | 7cc8f2f915b28ada40a03573651a3558e6503004 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Subteno IT
# License MIT License
import requests
import xmltodict
import string
import random
import io
class PrestaConnectError(RuntimeError):
pass
class PrestaConnect:
_BOUNDARY_CHARS = string.digits + string.ascii_letters
_STATUSES = (200, 201)
def __ini... | 34.911111 | 131 | 0.579885 | 380 | 3,142 | 4.660526 | 0.313158 | 0.039526 | 0.047995 | 0.038396 | 0.117448 | 0.097685 | 0.041784 | 0.041784 | 0 | 0 | 0 | 0.008014 | 0.285169 | 3,142 | 90 | 132 | 34.911111 | 0.780499 | 0.083386 | 0 | 0.030769 | 0 | 0 | 0.069841 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.169231 | false | 0.015385 | 0.076923 | 0.076923 | 0.461538 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
7bf8ba88150b609b31fa7978009e2b6cda410d96 | 1,702 | py | Python | examples/run_burgers.py | s274001/PINA | beb33f0da20581338c46f0c525775904b35a1130 | [
"MIT"
] | 4 | 2022-02-16T14:52:55.000Z | 2022-03-17T13:31:42.000Z | examples/run_burgers.py | s274001/PINA | beb33f0da20581338c46f0c525775904b35a1130 | [
"MIT"
] | 3 | 2022-02-17T08:57:42.000Z | 2022-03-28T08:41:53.000Z | examples/run_burgers.py | s274001/PINA | beb33f0da20581338c46f0c525775904b35a1130 | [
"MIT"
] | 7 | 2022-02-13T14:35:00.000Z | 2022-03-28T08:51:11.000Z | import argparse
import torch
from torch.nn import Softplus
from pina import PINN, Plotter
from pina.model import FeedForward
from problems.burgers import Burgers1D
class myFeature(torch.nn.Module):
"""
Feature: sin(pi*x)
"""
def __init__(self, idx):
super(myFeature, self).__init__()
s... | 28.366667 | 79 | 0.636898 | 212 | 1,702 | 4.90566 | 0.45283 | 0.042308 | 0.021154 | 0.038462 | 0.080769 | 0.080769 | 0.080769 | 0.080769 | 0.080769 | 0 | 0 | 0.024187 | 0.222679 | 1,702 | 59 | 80 | 28.847458 | 0.761905 | 0.010576 | 0 | 0 | 0 | 0 | 0.092326 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.044444 | false | 0 | 0.133333 | 0.022222 | 0.222222 | 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 |
7bf92b8ac984ff1d4af8bc11028ce720f6dccb7d | 2,072 | py | Python | questions/cousins-in-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 141 | 2017-12-12T21:45:53.000Z | 2022-03-25T07:03:39.000Z | questions/cousins-in-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 32 | 2015-10-05T14:09:52.000Z | 2021-05-30T10:28:41.000Z | questions/cousins-in-binary-tree/Solution.py | marcus-aurelianus/leetcode-solutions | 8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6 | [
"MIT"
] | 56 | 2015-09-30T05:23:28.000Z | 2022-03-08T07:57:11.000Z | """
In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1.
Two nodes of a binary tree are cousins if they have the same depth, but have different parents.
We are given the root of a binary tree with unique values, and the values x and y of two different nodes in the tree.
Re... | 28 | 117 | 0.531853 | 329 | 2,072 | 3.325228 | 0.246201 | 0.032907 | 0.040219 | 0.030165 | 0.23766 | 0.173675 | 0.173675 | 0.113346 | 0.113346 | 0.113346 | 0 | 0.059848 | 0.362934 | 2,072 | 74 | 118 | 28 | 0.768939 | 0.446911 | 0 | 0.392857 | 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 |
7bfad01ae563f31b06389bcaffa8bf4fb786658a | 456 | py | Python | utility_ai/models/action.py | TomasMaciulis/Utility-AI-API | 29144e4b5dc038854335bd11ed3b072ba1231ebc | [
"MIT"
] | null | null | null | utility_ai/models/action.py | TomasMaciulis/Utility-AI-API | 29144e4b5dc038854335bd11ed3b072ba1231ebc | [
"MIT"
] | null | null | null | utility_ai/models/action.py | TomasMaciulis/Utility-AI-API | 29144e4b5dc038854335bd11ed3b072ba1231ebc | [
"MIT"
] | null | null | null | from .configuration_entry import ConfigurationEntry
from utility_ai.traits.utility_score_trait import UtilityScoreTrait
class Action(ConfigurationEntry, UtilityScoreTrait):
def __init__(self, name: str, description: dict):
ConfigurationEntry.__init__(self, name, description)
UtilityScoreTrait.__i... | 30.4 | 67 | 0.699561 | 41 | 456 | 7.317073 | 0.585366 | 0.08 | 0.08 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.230263 | 456 | 14 | 68 | 32.571429 | 0.854701 | 0 | 0 | 0 | 0 | 0 | 0.046053 | 0.046053 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.181818 | 0 | 0.363636 | 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 |
7bfb0d85a9d2727156196fca82066ec05a53a3a0 | 1,119 | py | Python | widdy/styles.py | ubunatic/widdy | 1e5923d90010f27e352ad3eebb670c09752dd86b | [
"MIT"
] | 2 | 2018-05-30T17:23:46.000Z | 2019-08-29T20:32:27.000Z | widdy/styles.py | ubunatic/widdy | 1e5923d90010f27e352ad3eebb670c09752dd86b | [
"MIT"
] | null | null | null | widdy/styles.py | ubunatic/widdy | 1e5923d90010f27e352ad3eebb670c09752dd86b | [
"MIT"
] | null | null | null | from collections import namedtuple
Style = namedtuple('Style', 'name fg bg')
default_pal = {
Style('inv-black', 'black', 'light gray'),
Style('green-bold', 'dark green,bold', ''),
Style('red-bold', 'dark red,bold', ''),
Style('blue-bold', 'dark blue,bold', ''),
St... | 29.447368 | 61 | 0.489723 | 116 | 1,119 | 4.655172 | 0.189655 | 0.1 | 0.077778 | 0.074074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.319929 | 1,119 | 37 | 62 | 30.243243 | 0.709593 | 0 | 0 | 0 | 0 | 0 | 0.323503 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.033333 | 0 | 0.033333 | 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 |
7bfc0a90c6e361e602b8b4fb5d3bb23952ab70e8 | 3,468 | py | Python | nist_tools/combine_images.py | Nepherhotep/roboarchive-broom | a60c6038a5506c19edc6b74dbb47de525b246d2a | [
"MIT"
] | null | null | null | nist_tools/combine_images.py | Nepherhotep/roboarchive-broom | a60c6038a5506c19edc6b74dbb47de525b246d2a | [
"MIT"
] | null | null | null | nist_tools/combine_images.py | Nepherhotep/roboarchive-broom | a60c6038a5506c19edc6b74dbb47de525b246d2a | [
"MIT"
] | null | null | null | import os
import random
import cv2
import numpy as np
from gen_textures import add_noise, texture, blank_image
from nist_tools.extract_nist_text import BaseMain, parse_args, display
class CombineMain(BaseMain):
SRC_DIR = 'blurred'
DST_DIR = 'combined_raw'
BG_DIR = 'backgrounds'
SMPL_DIR = 'combined... | 31.527273 | 94 | 0.625144 | 489 | 3,468 | 4.188139 | 0.269939 | 0.058594 | 0.024414 | 0.03418 | 0.20752 | 0.13916 | 0.13916 | 0.099609 | 0.071289 | 0.041992 | 0 | 0.026974 | 0.262399 | 3,468 | 109 | 95 | 31.816514 | 0.773651 | 0.043253 | 0 | 0.028571 | 0 | 0 | 0.030504 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.085714 | 0.014286 | 0.314286 | 0.028571 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
7bfe07fff56233f17c17498061812fd747efa684 | 1,205 | py | Python | auto_funcs/look_for_date.py | rhysrushton/testauto | 9c32f40640f58703a0d063afbb647855fb680a61 | [
"MIT"
] | null | null | null | auto_funcs/look_for_date.py | rhysrushton/testauto | 9c32f40640f58703a0d063afbb647855fb680a61 | [
"MIT"
] | null | null | null | auto_funcs/look_for_date.py | rhysrushton/testauto | 9c32f40640f58703a0d063afbb647855fb680a61 | [
"MIT"
] | null | null | null | # this function looks for either the encounter date or the patient's date of birth
# so that we can avoid duplicate encounters.
import time
def look_for_date (date_string, driver):
print('looking for date')
date_present = False
for div in driver.find_elements_by_class_name('card.my-4.patient-card.assessme... | 30.125 | 99 | 0.637344 | 159 | 1,205 | 4.63522 | 0.421384 | 0.054274 | 0.081411 | 0.130258 | 0.398915 | 0.320217 | 0.320217 | 0.320217 | 0.320217 | 0.320217 | 0 | 0.005695 | 0.271369 | 1,205 | 39 | 100 | 30.897436 | 0.833713 | 0.237344 | 0 | 0.222222 | 0 | 0 | 0.207048 | 0.099119 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.055556 | 0 | 0.277778 | 0.222222 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
7bfefe9a585dfb51817f970316b20305a606310a | 1,047 | py | Python | app/api/apis/token_api.py | boceckts/ideahub | fbd48c53a5aaf7252a5461d0c0d2fe9d4eef9aed | [
"BSD-3-Clause"
] | null | null | null | app/api/apis/token_api.py | boceckts/ideahub | fbd48c53a5aaf7252a5461d0c0d2fe9d4eef9aed | [
"BSD-3-Clause"
] | null | null | null | app/api/apis/token_api.py | boceckts/ideahub | fbd48c53a5aaf7252a5461d0c0d2fe9d4eef9aed | [
"BSD-3-Clause"
] | null | null | null | from flask import g
from flask_restplus import Resource, marshal
from app import db
from app.api.namespaces.token_namespace import token_ns, token
from app.api.security.authentication import basic_auth, token_auth
@token_ns.route('', strict_slashes=False)
@token_ns.response(401, 'Unauthenticated')
@token_ns.response... | 32.71875 | 67 | 0.700096 | 136 | 1,047 | 5.191176 | 0.419118 | 0.069405 | 0.084986 | 0.072238 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021251 | 0.191022 | 1,047 | 31 | 68 | 33.774194 | 0.812279 | 0.040115 | 0 | 0.083333 | 0 | 0 | 0.115694 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.208333 | 0 | 0.416667 | 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 |
d0003ec058228de9777e23294e4fbffc93d7d212 | 4,816 | py | Python | docker_multiarch/tool.py | CynthiaProtector/helo | ad9e22363a92389b3fa519ecae9061c6ead28b05 | [
"Apache-2.0"
] | 399 | 2017-05-30T05:12:48.000Z | 2022-01-29T05:53:08.000Z | docker_multiarch/tool.py | greenpea0104/incubator-mxnet | fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf | [
"Apache-2.0"
] | 58 | 2017-05-30T23:25:32.000Z | 2019-11-18T09:30:54.000Z | docker_multiarch/tool.py | greenpea0104/incubator-mxnet | fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf | [
"Apache-2.0"
] | 107 | 2017-05-30T05:53:22.000Z | 2021-06-24T02:43:31.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache Licen... | 30.871795 | 108 | 0.65054 | 648 | 4,816 | 4.697531 | 0.376543 | 0.013798 | 0.014455 | 0.015769 | 0.034166 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0069 | 0.217608 | 4,816 | 155 | 109 | 31.070968 | 0.800955 | 0.232143 | 0 | 0.038835 | 0 | 0 | 0.170725 | 0.013406 | 0 | 0 | 0 | 0 | 0.019417 | 1 | 0.116505 | false | 0 | 0.07767 | 0.038835 | 0.271845 | 0.009709 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d003fb1f6605d874e72c3a666281e62431d7b2a8 | 3,283 | py | Python | 02module/module_containers.py | mayi140611/szzy_pytorch | 81978d75513bc9a1b85aec05023d14fa6f748674 | [
"Apache-2.0"
] | null | null | null | 02module/module_containers.py | mayi140611/szzy_pytorch | 81978d75513bc9a1b85aec05023d14fa6f748674 | [
"Apache-2.0"
] | null | null | null | 02module/module_containers.py | mayi140611/szzy_pytorch | 81978d75513bc9a1b85aec05023d14fa6f748674 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
# @file name : module_containers.py
# @author : tingsongyu
# @date : 2019-09-20 10:08:00
# @brief : 模型容器——Sequential, ModuleList, ModuleDict
"""
import torch
import torchvision
import torch.nn as nn
from collections import OrderedDict
# ============================ Sequenti... | 22.486301 | 76 | 0.540664 | 392 | 3,283 | 4.423469 | 0.257653 | 0.031142 | 0.025375 | 0.034602 | 0.363322 | 0.317186 | 0.235294 | 0.182814 | 0.182814 | 0.182814 | 0 | 0.052609 | 0.282059 | 3,283 | 145 | 77 | 22.641379 | 0.682223 | 0.180627 | 0 | 0.328947 | 0 | 0 | 0.027872 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.105263 | false | 0 | 0.052632 | 0 | 0.263158 | 0.013158 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d00408e74248e82eceb28ea83155d9b67a8bad9f | 2,124 | py | Python | tests/test_sample_images.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | tests/test_sample_images.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | 20 | 2019-07-15T21:49:29.000Z | 2020-01-09T14:35:03.000Z | tests/test_sample_images.py | olavosamp/semiauto-video-annotation | b1a46f9c0ad3bdcedab76b4cd730747ee2afd2fd | [
"MIT"
] | null | null | null | import pytest
import shutil as sh
import pandas as pd
from pathlib import Path
from glob import glob
import libs.dirs as dirs
from libs.iteration_manager import SampleImages
from libs.utils import copy_files, replace_symbols
class Te... | 34.819672 | 91 | 0.677966 | 243 | 2,124 | 5.740741 | 0.358025 | 0.057348 | 0.080287 | 0.043011 | 0.167742 | 0.058781 | 0.058781 | 0 | 0 | 0 | 0 | 0.007453 | 0.241996 | 2,124 | 61 | 92 | 34.819672 | 0.859006 | 0.078154 | 0 | 0.052632 | 0 | 0 | 0.064995 | 0.027636 | 0 | 0 | 0 | 0 | 0.131579 | 1 | 0.105263 | false | 0 | 0.210526 | 0 | 0.342105 | 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 |
d00676794b322b39517d8082c8b83c61f4836359 | 284 | py | Python | Unit 2/2.16/2.16.5 Black and White Squares.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | 1 | 2021-04-08T14:02:49.000Z | 2021-04-08T14:02:49.000Z | Unit 2/2.16/2.16.5 Black and White Squares.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | null | null | null | Unit 2/2.16/2.16.5 Black and White Squares.py | shashwat73/cse | 60e49307e57105cf9916c7329f53f891c5e81fdb | [
"MIT"
] | null | null | null | speed(0)
def make_square(i):
if i % 2 == 0:
begin_fill()
for i in range(4):
forward(25)
left(90)
end_fill()
penup()
setposition(-100, 0)
pendown()
for i in range (6):
pendown()
make_square(i)
penup()
forward(35)
| 14.947368 | 23 | 0.503521 | 40 | 284 | 3.475 | 0.625 | 0.143885 | 0.158273 | 0.158273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082418 | 0.359155 | 284 | 18 | 24 | 15.777778 | 0.681319 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.0625 | false | 0 | 0 | 0 | 0.0625 | 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 |
d0075df444476cd69e92bd3d5f61f5eff5a35b08 | 771 | py | Python | Q1/read.py | arpanmangal/Regression | 06969286d7db65a537e89ac37905310592542ca9 | [
"MIT"
] | null | null | null | Q1/read.py | arpanmangal/Regression | 06969286d7db65a537e89ac37905310592542ca9 | [
"MIT"
] | null | null | null | Q1/read.py | arpanmangal/Regression | 06969286d7db65a537e89ac37905310592542ca9 | [
"MIT"
] | null | null | null | """
Module for reading data from 'linearX.csv' and 'linearY.csv'
"""
import numpy as np
def loadData (x_file="ass1_data/linearX.csv", y_file="ass1_data/linearY.csv"):
"""
Loads the X, Y matrices.
Splits into training, validation and test sets
"""
X = np.genfromtxt(x_file)
Y = np.genfromtxt(y_... | 25.7 | 78 | 0.639429 | 124 | 771 | 3.822581 | 0.346774 | 0.126582 | 0.082278 | 0.037975 | 0.054852 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021417 | 0.212711 | 771 | 29 | 79 | 26.586207 | 0.759473 | 0.217899 | 0 | 0 | 0 | 0 | 0.072917 | 0.072917 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0 | 0.066667 | 0 | 0.2 | 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 |
d008c5731d8fedc349d8c20f7b0bc4f197dfbb75 | 1,172 | py | Python | utils/get_dic_question_id.py | Pxtri2156/M4C_inforgraphicsVQA | 8846ea01a9be726de03e8944c746203936334bc9 | [
"BSD-3-Clause"
] | 1 | 2022-02-15T14:46:15.000Z | 2022-02-15T14:46:15.000Z | utils/get_dic_question_id.py | Pxtri2156/M4C_inforgraphicsVQA | 8846ea01a9be726de03e8944c746203936334bc9 | [
"BSD-3-Clause"
] | null | null | null | utils/get_dic_question_id.py | Pxtri2156/M4C_inforgraphicsVQA | 8846ea01a9be726de03e8944c746203936334bc9 | [
"BSD-3-Clause"
] | 1 | 2022-02-13T11:15:11.000Z | 2022-02-13T11:15:11.000Z | import argparse
import json
from os import openpty
def create_dic_question_id(path):
set_name = ['train', 'val', 'test']
dic_qid = {}
for i in range(len(set_name)):
print("Processing, ", set_name[i])
annot_path = path.replace("change", set_name[i])
annot_fi = open(annot_path)
... | 29.3 | 96 | 0.595563 | 153 | 1,172 | 4.27451 | 0.418301 | 0.06422 | 0.051988 | 0.058104 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00939 | 0.273038 | 1,172 | 40 | 97 | 29.3 | 0.758216 | 0 | 0 | 0 | 0 | 0 | 0.12191 | 0.064791 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.083333 | 0 | 0.222222 | 0.055556 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d00b60aaa781272c43b31aa8c0398a217c133f07 | 1,863 | py | Python | admin_reskin/templatetags/sort_menu_items.py | cuongnb14/django-admin-reskin | 9245b60195892e8a3d51294ec70692714452bc29 | [
"MIT"
] | null | null | null | admin_reskin/templatetags/sort_menu_items.py | cuongnb14/django-admin-reskin | 9245b60195892e8a3d51294ec70692714452bc29 | [
"MIT"
] | null | null | null | admin_reskin/templatetags/sort_menu_items.py | cuongnb14/django-admin-reskin | 9245b60195892e8a3d51294ec70692714452bc29 | [
"MIT"
] | null | null | null | from django import template
from django.conf import settings
from ..models import Bookmark
register = template.Library()
RESKIN_MENU_APP_ORDER = settings.RESKIN_MENU_APP_ORDER
RESKIN_MENU_MODEL_ORDER = settings.RESKIN_MENU_MODEL_ORDER
RESKIN_APP_ICON = settings.RESKIN_APP_ICON
@register.filter
def sort_apps(apps):... | 27.397059 | 84 | 0.607085 | 228 | 1,863 | 4.684211 | 0.263158 | 0.074906 | 0.048689 | 0.067416 | 0.095506 | 0.095506 | 0.050562 | 0 | 0 | 0 | 0 | 0 | 0.278583 | 1,863 | 67 | 85 | 27.80597 | 0.794643 | 0 | 0 | 0.109091 | 0 | 0 | 0.154053 | 0.026302 | 0 | 0 | 0 | 0 | 0 | 1 | 0.036364 | false | 0 | 0.054545 | 0 | 0.127273 | 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 |
d00bef4cf659464b2641f10ea3856a63d0a1dab5 | 1,537 | py | Python | fda/db.py | tsbischof/fda510k | 40065cc873547ceaf992bd0f51e24fe2b2ea4387 | [
"BSD-2-Clause"
] | null | null | null | fda/db.py | tsbischof/fda510k | 40065cc873547ceaf992bd0f51e24fe2b2ea4387 | [
"BSD-2-Clause"
] | 3 | 2021-08-31T14:00:17.000Z | 2021-09-01T20:47:06.000Z | fda/db.py | tsbischof/fda | 40065cc873547ceaf992bd0f51e24fe2b2ea4387 | [
"BSD-2-Clause"
] | null | null | null | import os
import io
import urllib.request
import zipfile
import pandas
import fda
def get_510k_db(root_dir=os.path.join(fda.root_db_dir, "510k"),
force_download=False):
if not os.path.exists(root_dir):
os.makedirs(root_dir)
db_urls = [
"http://www.accessdata.fda.gov/... | 34.155556 | 84 | 0.63175 | 200 | 1,537 | 4.71 | 0.35 | 0.044586 | 0.10828 | 0.127389 | 0.334395 | 0.334395 | 0.334395 | 0.292994 | 0 | 0 | 0 | 0.030848 | 0.240729 | 1,537 | 44 | 85 | 34.931818 | 0.77635 | 0 | 0 | 0 | 0 | 0 | 0.243982 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.176471 | 0 | 0.235294 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d00e57b669e23409bb8d461e39ac2d007f53bbe7 | 4,657 | py | Python | inpr/get_num_plate.py | patrickn699/INPR | 737a3454a4b83e51e50937bb227ac7f8bc01d0e9 | [
"MIT"
] | 2 | 2021-09-25T06:00:40.000Z | 2021-10-14T13:24:43.000Z | inpr/get_num_plate.py | patrickn699/INPR | 737a3454a4b83e51e50937bb227ac7f8bc01d0e9 | [
"MIT"
] | null | null | null | inpr/get_num_plate.py | patrickn699/INPR | 737a3454a4b83e51e50937bb227ac7f8bc01d0e9 | [
"MIT"
] | 1 | 2022-01-27T11:39:10.000Z | 2022-01-27T11:39:10.000Z | import numpy as np
import matplotlib.pyplot as plt
import re as r
import easyocr
#import os
#os.environ['KMP_DUPLICATE_LIB_OK']='True'
re = easyocr.Reader(['en'])
#pl = []
chk = []
a = ''
a1 = ''
#pl = []
#sym = ['{', ']', '[', '}']
class get_number_plate:
def get_bboxes_from(self, output):
""" returns... | 26.01676 | 205 | 0.428817 | 613 | 4,657 | 3.176183 | 0.265905 | 0.016436 | 0.012327 | 0.012327 | 0.29019 | 0.273241 | 0.25886 | 0.25886 | 0.25886 | 0.25886 | 0 | 0.015504 | 0.390595 | 4,657 | 178 | 206 | 26.162921 | 0.670543 | 0.116384 | 0 | 0.041667 | 0 | 0 | 0.066263 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.097222 | false | 0 | 0.055556 | 0 | 0.263889 | 0.013889 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d00eac7a88a79181fbec1ff905386e4e480a89db | 3,632 | py | Python | client/nodes/detector_docker/sign_filter_node.py | CanboYe/BusEdge | 2e53e1d1d82559fc3e9f0029b2f0faf4e356b210 | [
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 2 | 2021-08-17T14:14:28.000Z | 2022-02-02T02:09:33.000Z | client/nodes/detector_docker/sign_filter_node.py | cmusatyalab/gabriel-BusEdge | 528a6ee337882c6e709375ecd7ec7e201083c825 | [
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | client/nodes/detector_docker/sign_filter_node.py | cmusatyalab/gabriel-BusEdge | 528a6ee337882c6e709375ecd7ec7e201083c825 | [
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2021-09-01T16:18:29.000Z | 2021-09-01T16:18:29.000Z | # SPDX-FileCopyrightText: 2021 Carnegie Mellon University
#
# SPDX-License-Identifier: Apache-2.0
import logging
import cv2
from busedge_protocol import busedge_pb2
from gabriel_protocol import gabriel_pb2
from sign_filter import SignFilter
logger = logging.getLogger(__name__)
import argparse
import multiprocessing... | 28.155039 | 87 | 0.681718 | 460 | 3,632 | 5.104348 | 0.382609 | 0.034072 | 0.012777 | 0.024276 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017302 | 0.220264 | 3,632 | 128 | 88 | 28.375 | 0.811794 | 0.071586 | 0 | 0.043956 | 0 | 0 | 0.096371 | 0.020524 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032967 | false | 0.021978 | 0.131868 | 0 | 0.164835 | 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 |
d01001102fad7912a59abc8be03d31f0294830cb | 3,095 | py | Python | collector/cli.py | mvinii94/aws-lambda-log-collector | 682850f282b70aa18663699c7e5e32bc4f6a8be1 | [
"MIT"
] | 4 | 2019-11-13T12:49:31.000Z | 2020-11-19T06:59:45.000Z | collector/cli.py | mvinii94/aws-lambda-log-collector | 682850f282b70aa18663699c7e5e32bc4f6a8be1 | [
"MIT"
] | null | null | null | collector/cli.py | mvinii94/aws-lambda-log-collector | 682850f282b70aa18663699c7e5e32bc4f6a8be1 | [
"MIT"
] | null | null | null | import click
from pathlib import Path
# Local imports
from .__init__ import *
from .utils import parse_time, create_dir, write_file, get_profiles, compress, INVALID_PROFILE, INVALID_DATES
from .lambda_log_collector import LambdaLogCollector
@click.command()
@click.version_option()
@click.option("--function-name", "-... | 41.824324 | 120 | 0.695315 | 416 | 3,095 | 4.894231 | 0.245192 | 0.044695 | 0.058448 | 0.079077 | 0.152259 | 0.107564 | 0.055501 | 0.04224 | 0.04224 | 0.04224 | 0 | 0.011462 | 0.182553 | 3,095 | 73 | 121 | 42.39726 | 0.793281 | 0.108562 | 0 | 0 | 0 | 0 | 0.106298 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.022727 | false | 0 | 0.113636 | 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 |
d01640b2fef264dfd84ea3721e0ecaa46ce8a2a7 | 2,072 | py | Python | common/data_helper.py | ThisIsSoSteve/Project-Tensorflow-Cars | 6cdfedceffa56ac0885ce2253dae4549859b2dbf | [
"MIT"
] | 1 | 2017-05-11T06:01:46.000Z | 2017-05-11T06:01:46.000Z | common/data_helper.py | ThisIsSoSteve/Project-Tensorflow-Cars | 6cdfedceffa56ac0885ce2253dae4549859b2dbf | [
"MIT"
] | 2 | 2017-05-11T10:03:16.000Z | 2017-06-21T18:25:00.000Z | common/data_helper.py | ThisIsSoSteve/Project-Tensorflow-Cars | 6cdfedceffa56ac0885ce2253dae4549859b2dbf | [
"MIT"
] | null | null | null | import glob
import pickle
from shutil import copy
from tqdm import tqdm
class DataHelper:
"""
helpers to transform and move data around add more as needed.
"""
def copy_specific_training_data_to_new_folder(self, source_folder_path, destination_folder_path,
... | 35.118644 | 100 | 0.639479 | 241 | 2,072 | 5.278008 | 0.360996 | 0.070755 | 0.082547 | 0.037736 | 0.16195 | 0.11478 | 0.11478 | 0 | 0 | 0 | 0 | 0 | 0.265444 | 2,072 | 59 | 101 | 35.118644 | 0.835742 | 0.393822 | 0 | 0 | 0 | 0 | 0.045416 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047619 | false | 0 | 0.190476 | 0 | 0.285714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d017493522e0d4e934860f36259d7cd6e8ff4de0 | 1,009 | py | Python | swifitool/faults/flp.py | chenoya/swifi-tool | 9386fab56e12d83cbe14024b5d5edac0fd1e3baf | [
"MIT"
] | null | null | null | swifitool/faults/flp.py | chenoya/swifi-tool | 9386fab56e12d83cbe14024b5d5edac0fd1e3baf | [
"MIT"
] | null | null | null | swifitool/faults/flp.py | chenoya/swifi-tool | 9386fab56e12d83cbe14024b5d5edac0fd1e3baf | [
"MIT"
] | null | null | null | from faults.faultmodel import FaultModel
from utils import *
class FLP(FaultModel):
name = 'FLP'
docs = ' FLP addr significance \t flip one specific bit'
nb_args = 2
def __init__(self, config, args):
super().__init__(config, args)
self.addr = parse_addr(args[0])
check_or_fa... | 34.793103 | 93 | 0.617443 | 132 | 1,009 | 4.522727 | 0.477273 | 0.067002 | 0.055276 | 0.040201 | 0.060302 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021739 | 0.270565 | 1,009 | 28 | 94 | 36.035714 | 0.789402 | 0 | 0 | 0 | 0 | 0 | 0.152626 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.130435 | false | 0 | 0.086957 | 0.043478 | 0.434783 | 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 |
d01a949b661519f2a818675ee51e8c4ae04571b0 | 3,120 | py | Python | MLGame/games/snake/ml/rule.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | MLGame/games/snake/ml/rule.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | MLGame/games/snake/ml/rule.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | """
The template of the script for playing the game in the ml mode
"""
class MLPlay:
def __init__(self):
"""
Constructor
"""
self.direction = 0#上下左右 :1,2,3,4
self.current_x = 0
self.current_y = 0
self.last_x = 0
self.last_y = 0
self.x_dir = 0... | 32.5 | 88 | 0.458013 | 387 | 3,120 | 3.498708 | 0.157623 | 0.17873 | 0.106352 | 0.039882 | 0.546529 | 0.519202 | 0.445347 | 0.405465 | 0.378877 | 0.353767 | 0 | 0.049042 | 0.43141 | 3,120 | 95 | 89 | 32.842105 | 0.714205 | 0.071154 | 0 | 0.458333 | 0 | 0 | 0.03946 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.041667 | false | 0.013889 | 0 | 0 | 0.25 | 0.013889 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d01ad5a73de06c489b92a116216a85d95752401d | 856 | py | Python | CodingInterviews/python/37_get_num_of_k_2.py | YorkFish/git_study | 6e023244daaa22e12b24e632e76a13e5066f2947 | [
"MIT"
] | null | null | null | CodingInterviews/python/37_get_num_of_k_2.py | YorkFish/git_study | 6e023244daaa22e12b24e632e76a13e5066f2947 | [
"MIT"
] | null | null | null | CodingInterviews/python/37_get_num_of_k_2.py | YorkFish/git_study | 6e023244daaa22e12b24e632e76a13e5066f2947 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding:utf-8
class Solution:
def GetNumberOfK(self, data, k):
if data == [] or k > data[-1]:
return 0
def binSearch(data, num):
left = 0
right = len(data) - 1
while left < right:
mid = left + (right - left) /... | 20.878049 | 48 | 0.408879 | 110 | 856 | 3.109091 | 0.345455 | 0.035088 | 0.035088 | 0.105263 | 0.116959 | 0.116959 | 0 | 0 | 0 | 0 | 0 | 0.066955 | 0.459112 | 856 | 40 | 49 | 21.4 | 0.671706 | 0.101636 | 0 | 0.08 | 0 | 0 | 0.010499 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.08 | false | 0 | 0 | 0 | 0.24 | 0.04 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d01bbe0df932770a9de781be883abde7e781fb15 | 23,356 | py | Python | PerceptualLoss.py | kirill-pinigin/DeepImageDenoiser | 9a228c821bd3960688a4ed35f47f4767d226b57c | [
"Apache-2.0"
] | null | null | null | PerceptualLoss.py | kirill-pinigin/DeepImageDenoiser | 9a228c821bd3960688a4ed35f47f4767d226b57c | [
"Apache-2.0"
] | null | null | null | PerceptualLoss.py | kirill-pinigin/DeepImageDenoiser | 9a228c821bd3960688a4ed35f47f4767d226b57c | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from torchvision import models
from torch.autograd import Variable
from torch.nn.parameter import Parameter
from DeepImageDenoiser import LR_THRESHOLD, DIMENSION, LEARNING_RATE
from NeuralModels import SpectralNorm
ITERATION_LIMIT = int(1e6)
SQUEEZENET_CONFIG = {'dnn' : models.squ... | 45.088803 | 163 | 0.630074 | 2,855 | 23,356 | 4.992644 | 0.091769 | 0.016697 | 0.015996 | 0.023993 | 0.6622 | 0.632665 | 0.585169 | 0.563351 | 0.534096 | 0.518381 | 0 | 0.030851 | 0.245033 | 23,356 | 517 | 164 | 45.176015 | 0.777519 | 0 | 0 | 0.472684 | 0 | 0 | 0.016441 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083135 | false | 0 | 0.016627 | 0.009501 | 0.171021 | 0.019002 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d0205b5caed2d6f638ffecd766f2e084e27abd9b | 11,517 | py | Python | Python/Unittest/Fixtures/tests.py | Gjacquenot/training-material | 16b29962bf5683f97a1072d961dd9f31e7468b8d | [
"CC-BY-4.0"
] | 115 | 2015-03-23T13:34:42.000Z | 2022-03-21T00:27:21.000Z | Python/Unittest/Fixtures/tests.py | Gjacquenot/training-material | 16b29962bf5683f97a1072d961dd9f31e7468b8d | [
"CC-BY-4.0"
] | 56 | 2015-02-25T15:04:26.000Z | 2022-01-03T07:42:48.000Z | Python/Unittest/Fixtures/tests.py | Gjacquenot/training-material | 16b29962bf5683f97a1072d961dd9f31e7468b8d | [
"CC-BY-4.0"
] | 59 | 2015-11-26T11:44:51.000Z | 2022-03-21T00:27:22.000Z | #!/usr/bin/env python
import os
import shutil
import sqlite3
import unittest
import init_db
'''name of database to use as master'''
master_name = 'projects.db'
def setUpModule():
'''create and fill the database'''
conn = sqlite3.connect(master_name)
init_db.execute_file(conn, 'create_db.sql')
init... | 36.33123 | 76 | 0.581488 | 1,284 | 11,517 | 4.976636 | 0.145639 | 0.064163 | 0.061189 | 0.05759 | 0.540219 | 0.438028 | 0.398122 | 0.355869 | 0.319718 | 0.280908 | 0 | 0.011418 | 0.323174 | 11,517 | 316 | 77 | 36.446203 | 0.808339 | 0.139272 | 0 | 0.418367 | 0 | 0 | 0.073825 | 0 | 0 | 0 | 0 | 0 | 0.096939 | 1 | 0.117347 | false | 0 | 0.02551 | 0 | 0.163265 | 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 |
d021199fc85a8a81bc13417b44056945e03b66e3 | 3,668 | py | Python | backend/ids/views/ids.py | block-id/wallet | b5479df7df0e5b5733f0ae262ffc17f9b923347d | [
"Apache-2.0"
] | null | null | null | backend/ids/views/ids.py | block-id/wallet | b5479df7df0e5b5733f0ae262ffc17f9b923347d | [
"Apache-2.0"
] | null | null | null | backend/ids/views/ids.py | block-id/wallet | b5479df7df0e5b5733f0ae262ffc17f9b923347d | [
"Apache-2.0"
] | 1 | 2021-12-31T17:27:44.000Z | 2021-12-31T17:27:44.000Z | import json
from django.http.response import JsonResponse
from django.db.models import Q
from django.contrib.auth import authenticate
from rest_framework import viewsets, mixins
from rest_framework.permissions import IsAuthenticated
from rest_framework.exceptions import ValidationError, AuthenticationFailed
from rest_... | 33.045045 | 88 | 0.634133 | 386 | 3,668 | 5.880829 | 0.305699 | 0.031718 | 0.030837 | 0.017621 | 0.039648 | 0.023789 | 0 | 0 | 0 | 0 | 0 | 0 | 0.272628 | 3,668 | 110 | 89 | 33.345455 | 0.850825 | 0.013631 | 0 | 0.086957 | 0 | 0 | 0.057831 | 0 | 0.01087 | 0 | 0 | 0 | 0.021739 | 1 | 0.043478 | false | 0.043478 | 0.173913 | 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 |
d0229c062e76ef7372542bd68ae2fdd99d5d9b15 | 1,257 | py | Python | pattern.py | surajwate/textpattern | 79869f932717bec47fc4a0e3e968c5a8321d8038 | [
"MIT"
] | null | null | null | pattern.py | surajwate/textpattern | 79869f932717bec47fc4a0e3e968c5a8321d8038 | [
"MIT"
] | null | null | null | pattern.py | surajwate/textpattern | 79869f932717bec47fc4a0e3e968c5a8321d8038 | [
"MIT"
] | null | null | null | def plusdash(plus, dash):
for i in range((plus-1)*dash + plus):
if i%(dash+1)==0:
print('+', end='')
else:
print('-', end='')
print('')
def pipe(pipe, space):
for i in range((pipe-1)*space + pipe):
if i % (space+1) == 0:
print('|', end='')
... | 22.854545 | 42 | 0.478123 | 170 | 1,257 | 3.535294 | 0.170588 | 0.079867 | 0.069884 | 0.12812 | 0.635607 | 0.59401 | 0.559068 | 0.509151 | 0.509151 | 0.386023 | 0 | 0.036145 | 0.339698 | 1,257 | 54 | 43 | 23.277778 | 0.687952 | 0 | 0 | 0.586957 | 0 | 0 | 0.010342 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.108696 | false | 0 | 0 | 0 | 0.108696 | 0.217391 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d028aa49515cb0d7956170029a3d7c9b7460dad7 | 2,624 | py | Python | src/apps/analysis/gen/edgeWeightBipartiteGaphGenerator.py | JacobFV/mln-analysis | f78a6531e5126f29e6895e9b8e4b4600110b3858 | [
"MIT"
] | null | null | null | src/apps/analysis/gen/edgeWeightBipartiteGaphGenerator.py | JacobFV/mln-analysis | f78a6531e5126f29e6895e9b8e4b4600110b3858 | [
"MIT"
] | null | null | null | src/apps/analysis/gen/edgeWeightBipartiteGaphGenerator.py | JacobFV/mln-analysis | f78a6531e5126f29e6895e9b8e4b4600110b3858 | [
"MIT"
] | null | null | null | import os
def get_comm_no(community_id, community_dict):
community_id = str(community_id)
if community_id in community_dict:
return community_dict[community_id]
else:
return 0
def edgeWeightBipartiteGraphGenerator(
layer1,
layer2,
layer1CommunityFile,
layer2CommunityFile,
... | 35.459459 | 76 | 0.671113 | 358 | 2,624 | 4.589385 | 0.223464 | 0.029215 | 0.087645 | 0.102252 | 0.483262 | 0.461351 | 0.336579 | 0.272672 | 0.174072 | 0.093731 | 0 | 0.0308 | 0.232851 | 2,624 | 73 | 77 | 35.945205 | 0.785395 | 0.036585 | 0 | 0.123077 | 0 | 0 | 0.011827 | 0.008564 | 0 | 0 | 0 | 0 | 0 | 1 | 0.030769 | false | 0 | 0.015385 | 0 | 0.076923 | 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 |
d029c8b65c82f8223b70d8ea031a22a8434f3b04 | 5,171 | py | Python | pubs/utils.py | WIPACrepo/publication-web-db | f5d77f43c89377449f4fbe952f6b1dcfc458c91a | [
"MIT"
] | null | null | null | pubs/utils.py | WIPACrepo/publication-web-db | f5d77f43c89377449f4fbe952f6b1dcfc458c91a | [
"MIT"
] | 16 | 2020-09-26T00:49:56.000Z | 2021-09-09T19:03:42.000Z | pubs/utils.py | WIPACrepo/publication-web-db | f5d77f43c89377449f4fbe952f6b1dcfc458c91a | [
"MIT"
] | null | null | null | from datetime import datetime
import logging
import json
import csv
from io import StringIO
import pymongo
from bson.objectid import ObjectId
from . import PUBLICATION_TYPES, PROJECTS, SITES
def nowstr():
return datetime.utcnow().isoformat()
def date_format(datestring):
if 'T' in datestring:
if '.' ... | 34.704698 | 143 | 0.602591 | 626 | 5,171 | 4.905751 | 0.185304 | 0.088571 | 0.019538 | 0.029306 | 0.362423 | 0.31423 | 0.294041 | 0.221752 | 0.205471 | 0.188212 | 0 | 0.001878 | 0.27925 | 5,171 | 148 | 144 | 34.939189 | 0.822109 | 0.007929 | 0 | 0.3 | 0 | 0 | 0.120182 | 0 | 0 | 0 | 0 | 0 | 0.192308 | 1 | 0.038462 | false | 0 | 0.069231 | 0.007692 | 0.130769 | 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 |
d030a03f345b6f7f695002177f49aa4bf23d3d3c | 2,471 | py | Python | src/ColorfulData_Package/ColorfulData.py | Alex8695/Colored | f72a5f5da041b73a8771c1b0f6ef80d5e0e83e7b | [
"MIT"
] | null | null | null | src/ColorfulData_Package/ColorfulData.py | Alex8695/Colored | f72a5f5da041b73a8771c1b0f6ef80d5e0e83e7b | [
"MIT"
] | null | null | null | src/ColorfulData_Package/ColorfulData.py | Alex8695/Colored | f72a5f5da041b73a8771c1b0f6ef80d5e0e83e7b | [
"MIT"
] | null | null | null | import numpy as np
from math import ceil,floor
class ColorfulData:
"""
Create custom evenly distributed color palete
\n`Get_Colors_Matched`: key,value relationship evenly distributed for given unique values
\n`Get_Colors`: Evenly distributed for given length
"""
@staticmethod
def Get_Color... | 39.222222 | 167 | 0.628086 | 290 | 2,471 | 5.175862 | 0.310345 | 0.055963 | 0.045303 | 0.055963 | 0.338441 | 0.338441 | 0.338441 | 0.290473 | 0.227848 | 0.227848 | 0 | 0.005495 | 0.263456 | 2,471 | 62 | 168 | 39.854839 | 0.819231 | 0.477135 | 0 | 0.133333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.066667 | false | 0 | 0.066667 | 0 | 0.233333 | 0.033333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d031d9ffaf0e038bf3ce7cef8d63034738a6cd8f | 6,453 | py | Python | Algorithms/SPO2CART.py | rtm2130/SPOTree | 0b92946a2d14202a1ca251201ddbb07892951e78 | [
"MIT"
] | 15 | 2020-03-06T23:07:09.000Z | 2022-03-30T09:46:30.000Z | Algorithms/SPO2CART.py | Tobias272727/SPOTree | 88e2e8423cb133f6c521bae5b8c7a0acba01ccab | [
"MIT"
] | 1 | 2020-09-14T14:32:03.000Z | 2020-10-16T02:39:24.000Z | Algorithms/SPO2CART.py | Tobias272727/SPOTree | 88e2e8423cb133f6c521bae5b8c7a0acba01ccab | [
"MIT"
] | 13 | 2020-04-04T16:43:56.000Z | 2022-03-27T05:28:19.000Z | """
Encodes SPOT MILP as the structure of a CART tree in order to apply CART's pruning method
Also supports traverse() which traverses the tree
"""
import numpy as np
from mtp_SPO2CART import MTP_SPO2CART
from decision_problem_solver import*
from scipy.spatial import distance
def truncate_train_x(train_x, train_x_pre... | 44.8125 | 162 | 0.712692 | 1,010 | 6,453 | 4.389109 | 0.272277 | 0.030453 | 0.024363 | 0.020302 | 0.228288 | 0.204827 | 0.116851 | 0.103316 | 0.103316 | 0.103316 | 0 | 0.007947 | 0.200527 | 6,453 | 144 | 163 | 44.8125 | 0.851328 | 0.266233 | 0 | 0.12069 | 0 | 0 | 0.041555 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.12069 | false | 0 | 0.068966 | 0.051724 | 0.241379 | 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 |
d037b0f6bf8c9bdca8f41dcdf3788289e4161b30 | 2,954 | py | Python | lib/m96_visualization.py | jaenrig-ifx/MID | a7284f50105575ed6675daeb8a70e144784a0550 | [
"MIT"
] | 2 | 2020-12-13T11:52:32.000Z | 2022-01-06T20:41:24.000Z | lib/m96_visualization.py | jaenrig-ifx/MID | a7284f50105575ed6675daeb8a70e144784a0550 | [
"MIT"
] | null | null | null | lib/m96_visualization.py | jaenrig-ifx/MID | a7284f50105575ed6675daeb8a70e144784a0550 | [
"MIT"
] | null | null | null | # This package uses tk to create a simple graphical
# output representing the iDrive state
import tkinter as tk
import numpy as np
# why not use the numpy native? but whatever
def rotate_2D(vector, angle):
r = np.array([[np.cos(angle), np.sin(angle)], [-np.sin(angle), np.cos(angle)]])
return r.d... | 38.868421 | 132 | 0.574475 | 493 | 2,954 | 3.36714 | 0.273834 | 0.062651 | 0.059036 | 0.057831 | 0.46988 | 0.383735 | 0.229518 | 0.193373 | 0.193373 | 0.171687 | 0 | 0.132541 | 0.259309 | 2,954 | 75 | 133 | 39.386667 | 0.626143 | 0.094787 | 0 | 0.039216 | 0 | 0 | 0.017747 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.039216 | 0 | 0.137255 | 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 |
d039ac9e3ce8ea272819341ba9dcf26eae196cff | 2,054 | py | Python | popoff/atom_types.py | pzarabadip/PopOff | 4a9db1ff264ab96196014388721a832aea0f7325 | [
"MIT"
] | 4 | 2021-06-18T12:22:50.000Z | 2021-12-27T16:00:31.000Z | popoff/atom_types.py | pzarabadip/PopOff | 4a9db1ff264ab96196014388721a832aea0f7325 | [
"MIT"
] | 1 | 2021-06-27T23:02:23.000Z | 2021-08-02T10:07:46.000Z | popoff/atom_types.py | pzarabadip/PopOff | 4a9db1ff264ab96196014388721a832aea0f7325 | [
"MIT"
] | 2 | 2021-06-22T10:39:06.000Z | 2021-12-27T17:52:16.000Z | class AtomType():
"""
Class for each atom type.
"""
def __init__( self, atom_type_index, label, element_type, mass, charge, core_shell=None ):
"""
Initialise an instance for each atom type in the structure.
Args:
atom_type_index (int): Integer index for this ato... | 36.678571 | 94 | 0.581792 | 257 | 2,054 | 4.521401 | 0.256809 | 0.096386 | 0.078313 | 0.025818 | 0.080895 | 0.056799 | 0.056799 | 0.056799 | 0 | 0 | 0 | 0 | 0.336904 | 2,054 | 55 | 95 | 37.345455 | 0.853157 | 0.304284 | 0 | 0 | 0 | 0 | 0.176565 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0 | 0 | 0.192308 | 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 |
d03a3dde95a4d151a055d00333559975c2f67791 | 2,116 | py | Python | fastreg/ols.py | ajferraro/fastreg | 32cdb15908480bd8d5a084126968c78b17010189 | [
"MIT"
] | null | null | null | fastreg/ols.py | ajferraro/fastreg | 32cdb15908480bd8d5a084126968c78b17010189 | [
"MIT"
] | 1 | 2017-11-28T16:21:09.000Z | 2017-11-28T17:19:04.000Z | fastreg/ols.py | ajferraro/fastreg | 32cdb15908480bd8d5a084126968c78b17010189 | [
"MIT"
] | 3 | 2017-11-28T16:56:25.000Z | 2021-02-18T18:18:46.000Z | import numpy as np
from scipy import stats
import utils
def fit(xdata, ydata):
"""Calculate 2D regression.
Args:
xdata (numpy.ndarray): 1D array of independent data [ntim],
where ntim is the number of time points (or other independent
points).
ydata (numpy.ndarray): 2... | 33.587302 | 75 | 0.614367 | 312 | 2,116 | 4.108974 | 0.384615 | 0.031201 | 0.043682 | 0.020281 | 0.131045 | 0.081123 | 0.049922 | 0.049922 | 0 | 0 | 0 | 0.021611 | 0.278355 | 2,116 | 62 | 76 | 34.129032 | 0.817944 | 0.45983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.038462 | false | 0 | 0.115385 | 0 | 0.192308 | 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 |
d03b6aeb253fdd06dec81e7fe877f6830639e18f | 796 | py | Python | event/timeout.py | dannl/hunter-sim-classic | e32cccc8431cc3e78b08067dd58e10fec52aac6a | [
"MIT"
] | null | null | null | event/timeout.py | dannl/hunter-sim-classic | e32cccc8431cc3e78b08067dd58e10fec52aac6a | [
"MIT"
] | null | null | null | event/timeout.py | dannl/hunter-sim-classic | e32cccc8431cc3e78b08067dd58e10fec52aac6a | [
"MIT"
] | null | null | null | from event import Event
class BuffTimeOut(Event):
def __init__(self, buff, rotation, engine, char_state, priority):
super().__init__('buff_time_out', priority)
self.buff = buff
self.rotation = rotation
self.engine = engine
self.char_state = char_state
def act(self):
... | 33.166667 | 77 | 0.653266 | 104 | 796 | 4.778846 | 0.298077 | 0.144869 | 0.084507 | 0.114688 | 0.382294 | 0.382294 | 0.382294 | 0.382294 | 0.382294 | 0.382294 | 0 | 0 | 0.238693 | 796 | 23 | 78 | 34.608696 | 0.820132 | 0.173367 | 0 | 0 | 0 | 0 | 0.019878 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.066667 | 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 |
d03c4e907665dac0cd64374cfeb54bcf34b259de | 2,017 | py | Python | server.py | shawkyelshazly1/Chat-App | 7cb27e9ad0e014409407bc7f2053caf406236797 | [
"MIT"
] | null | null | null | server.py | shawkyelshazly1/Chat-App | 7cb27e9ad0e014409407bc7f2053caf406236797 | [
"MIT"
] | null | null | null | server.py | shawkyelshazly1/Chat-App | 7cb27e9ad0e014409407bc7f2053caf406236797 | [
"MIT"
] | null | null | null | import socket
import threading
import json
PORT = 5000
SERVER = socket.gethostbyname(socket.gethostname())
ADDRESS = ('', PORT)
FORMAT = 'utf-8'
clients, names = [], []
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(ADDRESS)
def StartChat():
print(f'server is working on: {SERVER}')
... | 23.729412 | 89 | 0.562717 | 204 | 2,017 | 5.470588 | 0.387255 | 0.021505 | 0.021505 | 0.028674 | 0.078853 | 0.078853 | 0.078853 | 0.078853 | 0 | 0 | 0 | 0.011905 | 0.333664 | 2,017 | 84 | 90 | 24.011905 | 0.818452 | 0 | 0 | 0.209677 | 0 | 0 | 0.124442 | 0.040654 | 0 | 0 | 0 | 0 | 0 | 1 | 0.064516 | false | 0 | 0.048387 | 0 | 0.112903 | 0.096774 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d041f4ae9fd51d426b42247db152f3d516a92484 | 561 | py | Python | slam_recognition/filters/rgby.py | SimLeek/pySILEnT | feec2d1fb654d7c8dc25f610916f4e9b202a1092 | [
"Apache-2.0",
"MIT"
] | 5 | 2018-11-18T17:35:59.000Z | 2019-02-13T20:25:58.000Z | slam_recognition/filters/rgby.py | SimLeek/slam_recognition | feec2d1fb654d7c8dc25f610916f4e9b202a1092 | [
"Apache-2.0",
"MIT"
] | 12 | 2018-10-31T01:57:55.000Z | 2019-02-07T05:49:36.000Z | slam_recognition/filters/rgby.py | SimLeek/pySILEnT | feec2d1fb654d7c8dc25f610916f4e9b202a1092 | [
"Apache-2.0",
"MIT"
] | null | null | null | from slam_recognition.constant_convolutions.center_surround import rgby_3
from slam_recognition.util.get_dimensions import get_dimensions
import tensorflow as tf
def rgby_filter(tensor # type: tf.Tensor
):
n_dimensions = get_dimensions(tensor)
rgby = rgby_3(n_dimensions)
conv_rgby = tf.co... | 37.4 | 97 | 0.673797 | 76 | 561 | 4.763158 | 0.473684 | 0.107735 | 0.104972 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.032333 | 0.228164 | 561 | 14 | 98 | 40.071429 | 0.803695 | 0.026738 | 0 | 0 | 0 | 0 | 0.007353 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.272727 | 0 | 0.454545 | 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 |
d042d23ac886c0996046b66ccaa7d239f4bcb644 | 6,293 | py | Python | source/preprocessing/lm_text_generator.py | lzzhaha/self_talk | 238e5583c0f6ca0ed8a4a035b74f366d376bcd6d | [
"Apache-2.0"
] | 63 | 2020-04-14T03:40:12.000Z | 2022-03-30T07:10:20.000Z | source/preprocessing/lm_text_generator.py | lzzhaha/self_talk | 238e5583c0f6ca0ed8a4a035b74f366d376bcd6d | [
"Apache-2.0"
] | 2 | 2021-07-10T04:10:18.000Z | 2022-03-22T20:33:18.000Z | source/preprocessing/lm_text_generator.py | lzzhaha/self_talk | 238e5583c0f6ca0ed8a4a035b74f366d376bcd6d | [
"Apache-2.0"
] | 7 | 2020-12-06T03:22:17.000Z | 2022-03-25T09:27:19.000Z | """
Adapted from https://github.com/huggingface/transformers/blob/master/examples/run_generation.py
"""
import re
import torch
import logging
from typing import List
from collections import defaultdict
from transformers import GPT2Tokenizer, XLNetTokenizer, TransfoXLTokenizer, OpenAIGPTTokenizer
from transformers impo... | 39.33125 | 116 | 0.656444 | 801 | 6,293 | 5.037453 | 0.330836 | 0.028996 | 0.016357 | 0.015861 | 0.148451 | 0.134077 | 0.106815 | 0.093432 | 0.085502 | 0.085502 | 0 | 0.013407 | 0.253297 | 6,293 | 159 | 117 | 39.578616 | 0.845286 | 0.186715 | 0 | 0.084211 | 0 | 0.010526 | 0.202282 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.042105 | false | 0 | 0.073684 | 0 | 0.157895 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d04578120df1707824a754d31bbc073113fe0980 | 440 | py | Python | Python_ABC/2-7dictionary/countLetter.py | Chandler-Song/Python_Awesome | a44b8b79de7b429a00ac5798e7ecdc26c79a09ed | [
"MIT"
] | null | null | null | Python_ABC/2-7dictionary/countLetter.py | Chandler-Song/Python_Awesome | a44b8b79de7b429a00ac5798e7ecdc26c79a09ed | [
"MIT"
] | null | null | null | Python_ABC/2-7dictionary/countLetter.py | Chandler-Song/Python_Awesome | a44b8b79de7b429a00ac5798e7ecdc26c79a09ed | [
"MIT"
] | null | null | null | import pprint
# message
message = '''
Books and doors are the same thing books.
You open them, and you go through into another world.
'''
# split message to words into a list
words = message.split()
# define dictionary counter
count = {}
# traverse every word and accumulate
for word in words:
if not word[-1].isal... | 18.333333 | 53 | 0.702273 | 67 | 440 | 4.61194 | 0.61194 | 0.048544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011142 | 0.184091 | 440 | 24 | 54 | 18.333333 | 0.849582 | 0.247727 | 0 | 0 | 0 | 0 | 0.300614 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.071429 | 0 | 0.071429 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d04a7bba3d57ad48f159bb585e370285252259ef | 3,113 | py | Python | src/peachyprintertools.py | PeachyPrinter/tkpeachyprinter | d88dcb4891d19c4b81a7f4f072e120d05c02124c | [
"Apache-2.0"
] | 1 | 2017-03-08T02:48:19.000Z | 2017-03-08T02:48:19.000Z | src/peachyprintertools.py | PeachyPrinter/tkpeachyprinter | d88dcb4891d19c4b81a7f4f072e120d05c02124c | [
"Apache-2.0"
] | null | null | null | src/peachyprintertools.py | PeachyPrinter/tkpeachyprinter | d88dcb4891d19c4b81a7f4f072e120d05c02124c | [
"Apache-2.0"
] | 6 | 2016-05-12T04:10:18.000Z | 2020-02-15T09:55:00.000Z | #!/usr/bin/python
# -*- coding: iso-8859-1 -*-
import logging
from peachyprinter import config, PrinterAPI
import argparse
import os
import sys
import time
from Tkinter import *
from ui.main_ui import MainUI
class PeachyPrinterTools(Tk):
def __init__(self, parent, path):
Tk.__init__(self, parent)
... | 34.208791 | 186 | 0.666881 | 373 | 3,113 | 5.420912 | 0.38874 | 0.023739 | 0.031652 | 0.02275 | 0.105836 | 0.105836 | 0.0455 | 0.0455 | 0 | 0 | 0 | 0.004845 | 0.204305 | 3,113 | 90 | 187 | 34.588889 | 0.811465 | 0.013813 | 0 | 0.070423 | 0 | 0 | 0.158083 | 0.008475 | 0 | 0 | 0 | 0 | 0 | 1 | 0.070423 | false | 0 | 0.112676 | 0 | 0.197183 | 0.056338 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d04d2d19a25223c8c1cc1c6c129d213851622ac0 | 813 | py | Python | db/db_create.py | dafarz/base-service | 95791beac06c1ac58e0fa2050aa2cf3a3a22d8d7 | [
"MIT"
] | null | null | null | db/db_create.py | dafarz/base-service | 95791beac06c1ac58e0fa2050aa2cf3a3a22d8d7 | [
"MIT"
] | null | null | null | db/db_create.py | dafarz/base-service | 95791beac06c1ac58e0fa2050aa2cf3a3a22d8d7 | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from env_variables import SQL_ALCHEMY_URL
_db_url_without_db = '/'.join(SQL_ALCHEMY_URL.split('/')[:-1])
engine = create_engine(f'{_db_url_without_db}', isolation_level='AUTOCOMMIT', echo=True)
Session = sessionmaker(engine)
def create_dat... | 32.52 | 109 | 0.676507 | 101 | 813 | 5.079208 | 0.445545 | 0.136452 | 0.076023 | 0.054581 | 0.074074 | 0 | 0 | 0 | 0 | 0 | 0 | 0.00311 | 0.209102 | 813 | 24 | 110 | 33.875 | 0.794712 | 0 | 0 | 0 | 0 | 0 | 0.254613 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0 | 0.166667 | 0 | 0.222222 | 0.055556 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d04e92b69338a9a744afe83b7964f2f2ce880ffe | 2,382 | py | Python | util/data.py | arturb90/nl2pl | 2cd37bdd7c6f9f99349f1235001a1755ba169f4a | [
"MIT"
] | null | null | null | util/data.py | arturb90/nl2pl | 2cd37bdd7c6f9f99349f1235001a1755ba169f4a | [
"MIT"
] | null | null | null | util/data.py | arturb90/nl2pl | 2cd37bdd7c6f9f99349f1235001a1755ba169f4a | [
"MIT"
] | 1 | 2021-07-16T09:21:15.000Z | 2021-07-16T09:21:15.000Z | import torch
from random import random
from torch.nn.utils.rnn import pad_sequence
from torch.utils.data import Dataset
def collate_fn(batch):
'''
Batch-wise preprocessing and padding.
:param batch: the current batch.
:returns: padded sources, targets, alignments
stacks an... | 27.697674 | 73 | 0.615869 | 313 | 2,382 | 4.492013 | 0.28754 | 0.05761 | 0.07468 | 0.042674 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008163 | 0.280017 | 2,382 | 85 | 74 | 28.023529 | 0.811662 | 0.166667 | 0 | 0 | 0 | 0 | 0.021156 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.08 | false | 0 | 0.08 | 0.02 | 0.24 | 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 |
d050c2f9fe46941d4dbe952021eec4b5d9528020 | 6,548 | py | Python | mth5/io/lemi424.py | kujaku11/mth5 | b7681335871f3cd1b652276fd93c08554c7538ff | [
"MIT"
] | 5 | 2021-01-08T23:38:47.000Z | 2022-03-31T14:13:47.000Z | mth5/io/lemi424.py | kujaku11/mth5 | b7681335871f3cd1b652276fd93c08554c7538ff | [
"MIT"
] | 76 | 2020-09-04T02:35:19.000Z | 2022-03-31T22:18:09.000Z | mth5/io/lemi424.py | kujaku11/mth5 | b7681335871f3cd1b652276fd93c08554c7538ff | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue May 11 15:31:31 2021
:copyright:
Jared Peacock (jpeacock@usgs.gov)
:license: MIT
"""
from pathlib import Path
import pandas as pd
import numpy as np
import logging
from mth5.timeseries import ChannelTS, RunTS
from mt_metadata.timeseries import Station, Run
class LE... | 27.170124 | 81 | 0.464875 | 694 | 6,548 | 4.213256 | 0.257925 | 0.04104 | 0.028728 | 0.035568 | 0.25855 | 0.159371 | 0.127223 | 0.127223 | 0.107387 | 0.107387 | 0 | 0.021607 | 0.399206 | 6,548 | 240 | 82 | 27.283333 | 0.721657 | 0.144319 | 0 | 0.174699 | 0 | 0 | 0.114681 | 0.06205 | 0 | 0 | 0 | 0 | 0 | 1 | 0.084337 | false | 0 | 0.036145 | 0.006024 | 0.186747 | 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 |
d050d5f902907c952287689dc0a4c79b3535eea2 | 4,895 | py | Python | preprocessing/encoder.py | mjlaali/housing-model | 8f0286a4b1909b7e0218d9a8f1340b95d5b9463d | [
"Apache-2.0"
] | null | null | null | preprocessing/encoder.py | mjlaali/housing-model | 8f0286a4b1909b7e0218d9a8f1340b95d5b9463d | [
"Apache-2.0"
] | 3 | 2020-11-13T18:43:28.000Z | 2022-02-10T01:18:05.000Z | preprocessing/encoder.py | mjlaali/housing_model | 8f0286a4b1909b7e0218d9a8f1340b95d5b9463d | [
"Apache-2.0"
] | null | null | null | import abc
import logging
import os
import pickle
from collections import Counter
from datetime import datetime
from typing import List, Union
import numpy as np
_logger = logging.getLogger(__name__)
class Transformation(abc.ABC):
@abc.abstractmethod
def analyze(self, raw: object) -> object:
pass
... | 28.459302 | 102 | 0.614913 | 605 | 4,895 | 4.740496 | 0.242975 | 0.029289 | 0.039052 | 0.04742 | 0.216179 | 0.117155 | 0.022315 | 0.022315 | 0.022315 | 0.022315 | 0 | 0.006036 | 0.289275 | 4,895 | 171 | 103 | 28.625731 | 0.818339 | 0.017569 | 0 | 0.193798 | 0 | 0 | 0.058469 | 0.012276 | 0 | 0 | 0 | 0 | 0.015504 | 1 | 0.178295 | false | 0.031008 | 0.062016 | 0.054264 | 0.418605 | 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 |
d0526bab2f2fcce625c5809ae54737f104402629 | 2,402 | py | Python | tests/test_anglicize.py | hugovk/python-anglicize | 1284ec72026f78d56ff5e995328547565ddb4f0b | [
"BSD-2-Clause"
] | 1 | 2020-03-08T09:33:14.000Z | 2020-03-08T09:33:14.000Z | tests/test_anglicize.py | hugovk/python-anglicize | 1284ec72026f78d56ff5e995328547565ddb4f0b | [
"BSD-2-Clause"
] | 2 | 2020-03-08T16:45:08.000Z | 2020-03-08T20:34:04.000Z | tests/test_anglicize.py | hugovk/python-anglicize | 1284ec72026f78d56ff5e995328547565ddb4f0b | [
"BSD-2-Clause"
] | 1 | 2020-03-08T16:33:22.000Z | 2020-03-08T16:33:22.000Z | import pytest
from pytest import param as p
from anglicize import anglicize, build_mapping
@pytest.mark.parametrize(
"text, expected",
[
p("Abc 123", "Abc 123", id="noop"),
p("ĂaÂâÎîȘșȚț", "AaAaIiSsTt", id="romanian"),
p("ĄąĆćĘꣳŃńŹźŻż", "AaCcEeLlNnZzZz", id="polish"),
p("燃... | 37.53125 | 94 | 0.562448 | 224 | 2,402 | 6.03125 | 0.558036 | 0.026647 | 0.031088 | 0.005922 | 0.011843 | 0.011843 | 0.011843 | 0.011843 | 0 | 0 | 0 | 0.003348 | 0.253955 | 2,402 | 63 | 95 | 38.126984 | 0.747768 | 0.034971 | 0 | 0.070175 | 0 | 0 | 0.418394 | 0.088515 | 0 | 0 | 0 | 0 | 0.035088 | 1 | 0.035088 | false | 0 | 0.052632 | 0 | 0.087719 | 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 |
d0543092d21f71915cd4c279a74f105e00c18015 | 7,035 | py | Python | cogs/Reminders.py | noahkw/botw-bot | 8d8c9515a177c52270093fb64abf34d111535d16 | [
"MIT"
] | 1 | 2020-11-29T23:00:27.000Z | 2020-11-29T23:00:27.000Z | cogs/Reminders.py | noahkw/botw-bot | 8d8c9515a177c52270093fb64abf34d111535d16 | [
"MIT"
] | 18 | 2020-08-05T11:59:31.000Z | 2022-03-15T03:48:40.000Z | cogs/Reminders.py | noahkw/botw-bot | 8d8c9515a177c52270093fb64abf34d111535d16 | [
"MIT"
] | null | null | null | import logging
import re
from datetime import timezone
import pendulum
from aioscheduler import TimedScheduler
from dateparser import parse
from discord.ext import commands
from discord.ext.menus import MenuPages
import db
from cogs import CustomCog, AinitMixin
from cogs.Logging import log_usage
from const import UNI... | 33.341232 | 114 | 0.5828 | 825 | 7,035 | 4.831515 | 0.282424 | 0.050176 | 0.013046 | 0.016056 | 0.190416 | 0.157802 | 0.149774 | 0.149774 | 0.129704 | 0.089814 | 0 | 0.007995 | 0.324378 | 7,035 | 210 | 115 | 33.5 | 0.830633 | 0.045203 | 0 | 0.145695 | 0 | 0.006623 | 0.100343 | 0.028202 | 0 | 0 | 0 | 0 | 0.006623 | 1 | 0.02649 | false | 0.013245 | 0.099338 | 0 | 0.178808 | 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 |
d05487672c8369c2d9e228e3c2e3d6e6a8514f49 | 4,598 | py | Python | lambda/code/lambda_function.py | acloudfan/Amazon-Aurora-DAS-Setup | 9c5ca4ac3705e78e877fc51b9ba927a7d367d029 | [
"MIT-0"
] | null | null | null | lambda/code/lambda_function.py | acloudfan/Amazon-Aurora-DAS-Setup | 9c5ca4ac3705e78e877fc51b9ba927a7d367d029 | [
"MIT-0"
] | null | null | null | lambda/code/lambda_function.py | acloudfan/Amazon-Aurora-DAS-Setup | 9c5ca4ac3705e78e877fc51b9ba927a7d367d029 | [
"MIT-0"
] | 2 | 2021-05-25T16:14:13.000Z | 2022-01-14T14:04:49.000Z | import json
import base64
import os
import boto3
import zlib
# Used for decryption of the received payload
import aws_encryption_sdk
from aws_encryption_sdk import CommitmentPolicy
from aws_encryption_sdk.internal.crypto import WrappingKey
from aws_encryption_sdk.key_providers.raw import RawMasterKeyProvider
from aws_... | 38.316667 | 139 | 0.738582 | 502 | 4,598 | 6.464143 | 0.316733 | 0.028043 | 0.034515 | 0.044684 | 0.145146 | 0.127273 | 0.08567 | 0.08567 | 0.04869 | 0 | 0 | 0.008302 | 0.187908 | 4,598 | 119 | 140 | 38.638655 | 0.860739 | 0.182253 | 0 | 0 | 0 | 0 | 0.074659 | 0.033182 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.233333 | 0.016667 | 0.416667 | 0.016667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d05d10f97cc5c0bdb332b3fd013760d9dc94d719 | 9,449 | py | Python | Code/Maskrcnn-keras/Experiments2/our_preprocessing.py | SZamboni/NightPedestrianDetection | fc492e0bd3f6f99070975d08a229cc6ef969f9e8 | [
"MIT"
] | 3 | 2020-04-03T06:25:23.000Z | 2021-04-06T07:30:56.000Z | Code/Maskrcnn-keras/Experiments2/our_preprocessing.py | SZamboni/NightPedestrianDetection | fc492e0bd3f6f99070975d08a229cc6ef969f9e8 | [
"MIT"
] | null | null | null | Code/Maskrcnn-keras/Experiments2/our_preprocessing.py | SZamboni/NightPedestrianDetection | fc492e0bd3f6f99070975d08a229cc6ef969f9e8 | [
"MIT"
] | 1 | 2021-04-06T07:40:26.000Z | 2021-04-06T07:40:26.000Z | import cv2
import numpy as np
from skimage import exposure as ex
from skimage import data
from PIL import Image
import skfuzzy as fuzz
import math
import timeit
import time
'''
Histogram equalization with colour YCR_CB and histogram equalization only on Y
@img: the image to modify
@return: the image with the histogr... | 31.288079 | 105 | 0.650122 | 1,365 | 9,449 | 4.367766 | 0.184615 | 0.021469 | 0.01476 | 0.018786 | 0.353908 | 0.296377 | 0.238007 | 0.208487 | 0.155317 | 0.143408 | 0 | 0.042325 | 0.229866 | 9,449 | 301 | 106 | 31.392027 | 0.776969 | 0.112816 | 0 | 0.15528 | 0 | 0 | 0.000693 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.099379 | false | 0 | 0.068323 | 0 | 0.267081 | 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 |
d05de342ea54b26f257e91dab0c259cdcde355f4 | 1,812 | py | Python | bin/make_known_good_cice_masks.py | PRIMAVERA-H2020/pre-proc | 0c47636cbe32a13a9544f3e5ce9f4c778dc55078 | [
"BSD-3-Clause"
] | null | null | null | bin/make_known_good_cice_masks.py | PRIMAVERA-H2020/pre-proc | 0c47636cbe32a13a9544f3e5ce9f4c778dc55078 | [
"BSD-3-Clause"
] | null | null | null | bin/make_known_good_cice_masks.py | PRIMAVERA-H2020/pre-proc | 0c47636cbe32a13a9544f3e5ce9f4c778dc55078 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
make_known_good_cice_masks.py
Copy known good CICE masks for use in fixing the HadGEM CICE masks.
"""
import os
import numpy as np
from netCDF4 import Dataset
OUTPUT_DIR = "/gws/nopw/j04/primavera1/masks/HadGEM3Ocean_fixes/cice_masks"
def main():
"""main entry"""
rootgrp = Dataset... | 31.241379 | 78 | 0.642936 | 241 | 1,812 | 4.59751 | 0.302905 | 0.097473 | 0.054152 | 0.086643 | 0.655235 | 0.568592 | 0.568592 | 0.568592 | 0.564079 | 0.493682 | 0 | 0.059066 | 0.196468 | 1,812 | 57 | 79 | 31.789474 | 0.701923 | 0.071744 | 0 | 0.375 | 0 | 0 | 0.183942 | 0.130617 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025 | false | 0 | 0.075 | 0 | 0.1 | 0.075 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d05e5954805301cc10d8ab2d703ec21b5e037de7 | 756 | py | Python | config.py | raspberry9/tinypost | 6e4b4bf764e93f6d344fbdb9369f326f08146d00 | [
"MIT"
] | null | null | null | config.py | raspberry9/tinypost | 6e4b4bf764e93f6d344fbdb9369f326f08146d00 | [
"MIT"
] | null | null | null | config.py | raspberry9/tinypost | 6e4b4bf764e93f6d344fbdb9369f326f08146d00 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import configparser
class Config(object):
def __init__(self, filename):
logging.config.fileConfig(filename)
config = configparser.RawConfigParser()
config.read(filename)
for option, value in config.items(self.name):
try:
... | 26.068966 | 53 | 0.539683 | 76 | 756 | 5.223684 | 0.460526 | 0.110831 | 0.070529 | 0.080605 | 0.13602 | 0.13602 | 0 | 0 | 0 | 0 | 0 | 0.002058 | 0.357143 | 756 | 28 | 54 | 27 | 0.814815 | 0.027778 | 0 | 0 | 0 | 0 | 0.021858 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.047619 | false | 0 | 0.095238 | 0 | 0.190476 | 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 |
d05e5b044a9120637eea4c01afc5076feed78586 | 2,817 | py | Python | database/database.py | Valzavator/YouTubeTrendingVideosAnalysis | 4baca01a351a20bec04331936cd9f6eafaea815d | [
"MIT"
] | 2 | 2019-06-11T03:26:50.000Z | 2020-04-13T01:28:23.000Z | database/database.py | Valzavator/YouTubeTrendingVideosAnalysis | 4baca01a351a20bec04331936cd9f6eafaea815d | [
"MIT"
] | 2 | 2020-01-08T13:11:49.000Z | 2020-01-08T13:11:54.000Z | database/database.py | Valzavator/YouTubeTrendingVideosAnalysis | 4baca01a351a20bec04331936cd9f6eafaea815d | [
"MIT"
] | 1 | 2019-06-11T03:26:54.000Z | 2019-06-11T03:26:54.000Z | import os
import subprocess
from dotenv import load_dotenv
import pymongo
from pymongo import MongoClient
from pymongo.cursor import Cursor
from pymongo.errors import DuplicateKeyError, BulkWriteError
from util.args import Args
load_dotenv()
class Database:
def __init__(self, uri=Args.db_host()):
self.... | 28.17 | 95 | 0.649627 | 351 | 2,817 | 4.849003 | 0.262108 | 0.076381 | 0.098707 | 0.052879 | 0.318449 | 0.237368 | 0.219741 | 0.219741 | 0.171563 | 0.171563 | 0 | 0.000944 | 0.248136 | 2,817 | 99 | 96 | 28.454545 | 0.802644 | 0 | 0 | 0.147059 | 0 | 0 | 0.101526 | 0.047923 | 0 | 0 | 0 | 0 | 0 | 1 | 0.191176 | false | 0 | 0.117647 | 0.073529 | 0.485294 | 0.014706 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d0629421490c20c90017965031c7298c1372c640 | 4,066 | py | Python | messaging_components/services/service_docker.py | fgiorgetti/qpid-dispatch-tests | 164c609d28db87692eed53d5361aa1ee5c97375c | [
"Apache-2.0"
] | null | null | null | messaging_components/services/service_docker.py | fgiorgetti/qpid-dispatch-tests | 164c609d28db87692eed53d5361aa1ee5c97375c | [
"Apache-2.0"
] | null | null | null | messaging_components/services/service_docker.py | fgiorgetti/qpid-dispatch-tests | 164c609d28db87692eed53d5361aa1ee5c97375c | [
"Apache-2.0"
] | null | null | null | from enum import Enum
from typing import Union
from iqa_common.executor import Command, Execution, ExecutorAnsible, CommandAnsible, ExecutorContainer, \
CommandContainer, Executor
from iqa_common.utils.docker_util import DockerUtil
from messaging_abstract.component import Service, ServiceStatus
import logging
cl... | 38.72381 | 105 | 0.632809 | 415 | 4,066 | 6.043373 | 0.26988 | 0.04386 | 0.022329 | 0.037081 | 0.270734 | 0.20933 | 0.148724 | 0.148724 | 0.148724 | 0.148724 | 0 | 0 | 0.280374 | 4,066 | 104 | 106 | 39.096154 | 0.857143 | 0.128628 | 0 | 0.063492 | 0 | 0 | 0.085138 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.095238 | 0.047619 | 0.47619 | 0.015873 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d063b8972e4afe0fab8307dbfa94ac49321f94ea | 4,836 | py | Python | seatsvotes/bootstrap/abstracts.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | seatsvotes/bootstrap/abstracts.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | seatsvotes/bootstrap/abstracts.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | import numpy as np
from ..mixins import Preprocessor, AlwaysPredictPlotter, AdvantageEstimator
from warnings import warn
class Bootstrap(Preprocessor, AlwaysPredictPlotter, AdvantageEstimator):
def __init__(self, elex_frame, covariate_columns=None,
weight_column=None,
share_colum... | 49.85567 | 121 | 0.575889 | 548 | 4,836 | 4.928832 | 0.332117 | 0.033321 | 0.022214 | 0.03147 | 0.188819 | 0.105146 | 0.039985 | 0.039985 | 0.039985 | 0.039985 | 0 | 0.002608 | 0.365798 | 4,836 | 96 | 122 | 50.375 | 0.878057 | 0.399297 | 0 | 0 | 0 | 0 | 0.070046 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.058824 | false | 0 | 0.058824 | 0.019608 | 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 |
d064bc4db90fca2bed0f8cf38219eca21ad15605 | 1,657 | py | Python | lessons/cse-numpy/drums/drums-5.py | uiuc-cse/2014-01-30-cse | de30ff0afdbb2030c3a844b9cd138177f38d3b76 | [
"CC-BY-3.0"
] | 1 | 2021-04-21T23:05:51.000Z | 2021-04-21T23:05:51.000Z | lessons/cse-numpy/drums/drums-5.py | gitter-badger/2014-01-30-cse | de30ff0afdbb2030c3a844b9cd138177f38d3b76 | [
"CC-BY-3.0"
] | null | null | null | lessons/cse-numpy/drums/drums-5.py | gitter-badger/2014-01-30-cse | de30ff0afdbb2030c3a844b9cd138177f38d3b76 | [
"CC-BY-3.0"
] | 2 | 2016-03-12T02:28:13.000Z | 2017-05-01T20:43:22.000Z | from __future__ import division
import numpy as np
import scipy as sp
import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from scipy.special import jn, jn_zeros
import subprocess
def drumhead_height(n, k, distance, angle, t):
nth_zero = jn_zeros(n, k)
return np.cos(... | 31.865385 | 104 | 0.660229 | 304 | 1,657 | 3.503289 | 0.427632 | 0.014085 | 0.015023 | 0.033803 | 0.048826 | 0.016901 | 0 | 0 | 0 | 0 | 0 | 0.038856 | 0.176826 | 1,657 | 51 | 105 | 32.490196 | 0.741935 | 0.089318 | 0 | 0.05 | 0 | 0 | 0.083167 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025 | false | 0 | 0.225 | 0 | 0.275 | 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 |
d065e2da402db36ecb6c887992ef35dec831f741 | 704 | py | Python | QB5/spiders/qb5.py | smithgoo/Scrapy_books | b556714510473f324a2952b739d79c0c78f47398 | [
"MIT"
] | null | null | null | QB5/spiders/qb5.py | smithgoo/Scrapy_books | b556714510473f324a2952b739d79c0c78f47398 | [
"MIT"
] | null | null | null | QB5/spiders/qb5.py | smithgoo/Scrapy_books | b556714510473f324a2952b739d79c0c78f47398 | [
"MIT"
] | null | null | null | import scrapy
from bs4 import BeautifulSoup
import requests
from QB5.pipelines import dbHandle
from QB5.items import Qb5Item
class Qb5Spider(scrapy.Spider):
name = 'qb5'
allowed_domains = ['qb5.tw']
start_urls = ['https://qb5.tw']
def parse(self, response):
soup = BeautifulSoup(response.text)
... | 28.16 | 61 | 0.536932 | 78 | 704 | 4.794872 | 0.576923 | 0.037433 | 0.053476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.019881 | 0.285511 | 704 | 24 | 62 | 29.333333 | 0.723658 | 0.03125 | 0 | 0 | 0 | 0 | 0.121481 | 0.047407 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05 | false | 0 | 0.25 | 0 | 0.5 | 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 |
d06a5181661f5f73feeb7820ddebac2f55560f7e | 3,491 | py | Python | src/models/markov_chain.py | dballesteros7/master-thesis-2015 | 8c0bf9a6eef172fc8167a30780ae0666f8ea2d88 | [
"MIT"
] | null | null | null | src/models/markov_chain.py | dballesteros7/master-thesis-2015 | 8c0bf9a6eef172fc8167a30780ae0666f8ea2d88 | [
"MIT"
] | null | null | null | src/models/markov_chain.py | dballesteros7/master-thesis-2015 | 8c0bf9a6eef172fc8167a30780ae0666f8ea2d88 | [
"MIT"
] | null | null | null | import itertools
import numpy as np
import constants
from utils import file
class MarkovChain:
def __init__(self, n_items: int, pseudo_count: int = 1,
use_rejection: bool = True):
self.n_items = n_items
self.counts = np.empty(n_items)
self.first_order_counts = np.empty((n... | 42.573171 | 80 | 0.593813 | 436 | 3,491 | 4.444954 | 0.243119 | 0.0516 | 0.050568 | 0.072239 | 0.229102 | 0.189886 | 0.167183 | 0.167183 | 0.120743 | 0.049536 | 0 | 0.011556 | 0.30593 | 3,491 | 81 | 81 | 43.098765 | 0.788279 | 0.071899 | 0 | 0.095238 | 0 | 0 | 0.014547 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.063492 | false | 0 | 0.063492 | 0 | 0.15873 | 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 |
d06c950496205dbbc1ed9eef4c8c7e1dcbe953e8 | 1,668 | py | Python | tests/pipeline/nodes/dabble/test_check_large_groups.py | ericleehy/PeekingDuck | 8cf1be842235fa60bac13bc466cac09747a780ea | [
"Apache-2.0"
] | 1 | 2021-12-02T05:15:58.000Z | 2021-12-02T05:15:58.000Z | tests/pipeline/nodes/dabble/test_check_large_groups.py | ericleehy/PeekingDuck | 8cf1be842235fa60bac13bc466cac09747a780ea | [
"Apache-2.0"
] | null | null | null | tests/pipeline/nodes/dabble/test_check_large_groups.py | ericleehy/PeekingDuck | 8cf1be842235fa60bac13bc466cac09747a780ea | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 AI Singapore
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 34.040816 | 87 | 0.678657 | 229 | 1,668 | 4.777293 | 0.427948 | 0.140768 | 0.117002 | 0.109689 | 0.387569 | 0.387569 | 0.329068 | 0.329068 | 0.329068 | 0.25777 | 0 | 0.033708 | 0.19964 | 1,668 | 48 | 88 | 34.75 | 0.785768 | 0.329736 | 0 | 0.333333 | 0 | 0 | 0.161232 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0.166667 | false | 0 | 0.083333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d06e09e4639214f16deaafbd6112fa849f57cd73 | 2,684 | py | Python | src/seisspark/seisspark_context.py | kdeyev/SeisSpark | 528d22143acb72e78ed310091db07eb5d731ca09 | [
"ECL-2.0",
"Apache-2.0"
] | 11 | 2017-08-16T02:32:37.000Z | 2020-12-25T07:18:57.000Z | src/seisspark/seisspark_context.py | kdeyev/SeisSpark | 528d22143acb72e78ed310091db07eb5d731ca09 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-10-15T14:44:17.000Z | 2018-10-15T14:44:17.000Z | src/seisspark/seisspark_context.py | kdeyev/SeisSpark | 528d22143acb72e78ed310091db07eb5d731ca09 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2018-05-16T02:36:38.000Z | 2020-06-15T07:46:50.000Z | # =============================================================================
# Copyright (c) 2021 SeisSpark (https://github.com/kdeyev/SeisSpark).
#
# 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 Lice... | 38.342857 | 117 | 0.616617 | 315 | 2,684 | 5.11746 | 0.457143 | 0.037221 | 0.049628 | 0.062035 | 0.122829 | 0.122829 | 0.122829 | 0 | 0 | 0 | 0 | 0.00569 | 0.214232 | 2,684 | 69 | 118 | 38.898551 | 0.758653 | 0.40611 | 0 | 0 | 0 | 0 | 0.120613 | 0.078494 | 0 | 0 | 0 | 0 | 0 | 1 | 0.09375 | false | 0 | 0.125 | 0.03125 | 0.28125 | 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 |
d06f1cb2d99e6c91380d0f70f6e5f7c771735207 | 1,116 | py | Python | tests/parsers/notifications/test_Notification.py | Tberdy/python-amazon-mws-tools | 2925118ce113851a2d8db98ad7f99163154f4151 | [
"Unlicense"
] | 9 | 2017-03-28T12:58:36.000Z | 2020-03-02T14:42:32.000Z | tests/parsers/notifications/test_Notification.py | Tberdy/python-amazon-mws-tools | 2925118ce113851a2d8db98ad7f99163154f4151 | [
"Unlicense"
] | 5 | 2017-01-05T19:36:18.000Z | 2021-12-13T19:43:42.000Z | tests/parsers/notifications/test_Notification.py | Tberdy/python-amazon-mws-tools | 2925118ce113851a2d8db98ad7f99163154f4151 | [
"Unlicense"
] | 5 | 2017-02-15T17:29:02.000Z | 2019-03-06T07:30:55.000Z | from unittest import TestCase
from unittest import TestSuite
from unittest import main
from unittest import makeSuite
from mwstools.parsers.notifications import Notification
class Dummy(object):
"""
Only used for test_notification_payload since there is not actually a payload to test.
"""
def __init... | 20.666667 | 90 | 0.669355 | 112 | 1,116 | 6.419643 | 0.464286 | 0.066759 | 0.100139 | 0.075104 | 0.125174 | 0.125174 | 0 | 0 | 0 | 0 | 0 | 0 | 0.238351 | 1,116 | 53 | 91 | 21.056604 | 0.845882 | 0.077061 | 0 | 0 | 0 | 0 | 0.221893 | 0.086785 | 0 | 0 | 0 | 0 | 0.057143 | 1 | 0.142857 | false | 0.028571 | 0.142857 | 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 |
d06f2e4133f899f7d55993a62f6fac399373c048 | 1,025 | py | Python | sec_certs/config/configuration.py | J08nY/sec-certs | d25a4a7c830c587a45eb8e37d99f8794dec1a5eb | [
"MIT"
] | 2 | 2021-03-24T11:56:15.000Z | 2021-04-12T12:22:16.000Z | sec_certs/config/configuration.py | J08nY/sec-certs | d25a4a7c830c587a45eb8e37d99f8794dec1a5eb | [
"MIT"
] | 73 | 2021-04-12T14:04:04.000Z | 2022-03-31T15:40:26.000Z | sec_certs/config/configuration.py | J08nY/sec-certs | d25a4a7c830c587a45eb8e37d99f8794dec1a5eb | [
"MIT"
] | 3 | 2021-03-26T16:15:49.000Z | 2021-05-10T07:26:23.000Z | import json
from pathlib import Path
from typing import Union
import jsonschema
import yaml
class Configuration(object):
def load(self, filepath: Union[str, Path]):
with Path(filepath).open("r") as file:
state = yaml.load(file, Loader=yaml.FullLoader)
script_dir = Path(__file__).pare... | 27.702703 | 75 | 0.643902 | 127 | 1,025 | 4.992126 | 0.464567 | 0.07571 | 0.089905 | 0.0347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.242927 | 1,025 | 36 | 76 | 28.472222 | 0.81701 | 0 | 0 | 0 | 0 | 0 | 0.068293 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0 | 0.192308 | 0 | 0.384615 | 0.038462 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d0707615a365376fb262ae4ab58d6c156cbaf97a | 4,415 | py | Python | parlai/scripts/split_phrases.py | shigailowa/ParlAI | 5bb359cdacb8f2b92ba482273cdff20f0d147a72 | [
"MIT"
] | null | null | null | parlai/scripts/split_phrases.py | shigailowa/ParlAI | 5bb359cdacb8f2b92ba482273cdff20f0d147a72 | [
"MIT"
] | null | null | null | parlai/scripts/split_phrases.py | shigailowa/ParlAI | 5bb359cdacb8f2b92ba482273cdff20f0d147a72 | [
"MIT"
] | null | null | null | import nltk
from nltk.chunk.regexp import ChunkString, ChunkRule, ChinkRule
from nltk.tree import Tree
from nltk.chunk import RegexpParser
from nltk.corpus import conll2000
from nltk.tag import NgramTagger
#class for Unigram Chunking
class UnigramChunker(nltk.ChunkParserI):
def __init__(self, train_sents):
... | 29.433333 | 94 | 0.69966 | 590 | 4,415 | 5.045763 | 0.211864 | 0.040309 | 0.020155 | 0.048371 | 0.539805 | 0.436681 | 0.427276 | 0.414175 | 0.384615 | 0.384615 | 0 | 0.01228 | 0.188448 | 4,415 | 150 | 95 | 29.433333 | 0.818588 | 0.059343 | 0 | 0.405063 | 0 | 0 | 0.038809 | 0.009046 | 0 | 0 | 0 | 0 | 0 | 1 | 0.139241 | false | 0 | 0.075949 | 0 | 0.291139 | 0.075949 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d073713261d4accea1d939cebd542842ecae613a | 1,320 | py | Python | app/utils/zones.py | Xerrors/Meco-Server | f2111bab7691c0b567d5c3b3f38b83fee152a689 | [
"MIT"
] | 1 | 2021-07-28T11:24:02.000Z | 2021-07-28T11:24:02.000Z | app/utils/zones.py | Xerrors/Meco-Server | f2111bab7691c0b567d5c3b3f38b83fee152a689 | [
"MIT"
] | null | null | null | app/utils/zones.py | Xerrors/Meco-Server | f2111bab7691c0b567d5c3b3f38b83fee152a689 | [
"MIT"
] | null | null | null | import os
import json
from app.config import DATA_PATH
"""
_id: ID
date: 日期 eg "2020-02-06T15:24:59.942Z"
msg: 消息内容 eg "这是内容"
status: 状态 eg "😫" (a emoji)
"""
def get_zones():
with open(os.path.join(DATA_PATH, 'zone.json'), 'r') as f:
data = json.load(f)
return data['data']
de... | 18.082192 | 62 | 0.524242 | 198 | 1,320 | 3.348485 | 0.318182 | 0.048265 | 0.072398 | 0.081448 | 0.485671 | 0.485671 | 0.310709 | 0.310709 | 0.253394 | 0.15083 | 0 | 0.023965 | 0.304545 | 1,320 | 72 | 63 | 18.333333 | 0.697168 | 0.006061 | 0 | 0.348837 | 0 | 0 | 0.079765 | 0.028547 | 0 | 0 | 0 | 0 | 0 | 1 | 0.116279 | false | 0 | 0.069767 | 0 | 0.27907 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
d078c0acdf412550824a96d5fadcbd21aeb88416 | 2,534 | py | Python | fungal_automata/utils.py | ranyishere/fungal_automata_comap2021 | 1ef4f00a3e6f17413a60f6882dbee6f156aadfa0 | [
"MIT"
] | null | null | null | fungal_automata/utils.py | ranyishere/fungal_automata_comap2021 | 1ef4f00a3e6f17413a60f6882dbee6f156aadfa0 | [
"MIT"
] | null | null | null | fungal_automata/utils.py | ranyishere/fungal_automata_comap2021 | 1ef4f00a3e6f17413a60f6882dbee6f156aadfa0 | [
"MIT"
] | null | null | null | import random
import pprint
import matplotlib.pyplot as plt
import numpy as np
from cells import *
pp = pprint.PrettyPrinter(indent=2)
random.seed(5)
def get_image_from_state(cells, time, debug=False):
"""
Generates an image from the cell states
"""
# print("time: ", time)
img = []
for rix,... | 23.247706 | 83 | 0.54341 | 337 | 2,534 | 4.002967 | 0.216617 | 0.066716 | 0.062268 | 0.077835 | 0.645663 | 0.596738 | 0.572276 | 0.567828 | 0.539659 | 0.539659 | 0 | 0.014434 | 0.316496 | 2,534 | 108 | 84 | 23.462963 | 0.764434 | 0.226519 | 0 | 0.607143 | 0 | 0 | 0.018672 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.089286 | 0 | 0.232143 | 0.053571 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d07c7ec019295c93900e320c5fcec0bc4db8705b | 415 | py | Python | src/server/event_test.py | cnlohr/bridgesim | ff33b63db813eedfc8155c9fecda4c8f1c06ab60 | [
"MIT"
] | 4 | 2015-05-03T07:37:34.000Z | 2018-05-09T22:27:33.000Z | src/server/event_test.py | cnlohr/bridgesim | ff33b63db813eedfc8155c9fecda4c8f1c06ab60 | [
"MIT"
] | 1 | 2016-08-07T16:56:38.000Z | 2016-08-07T16:56:38.000Z | src/server/event_test.py | cnlohr/bridgesim | ff33b63db813eedfc8155c9fecda4c8f1c06ab60 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
import time
from events import *
def test1(foo, *args):
print("foo: %s otherargs: %s time: %06.3f" % (foo, args, time.time() % 100))
q = QueueExecutor()
q.addEvent(test1, time.time() + 3, 1, 5, "foo", "bar", "baz")
q.addEvent(test1, time.time() + .5, .3, 20, "foo2", "bar")
print("Main thread as... | 27.666667 | 78 | 0.621687 | 66 | 415 | 3.909091 | 0.545455 | 0.155039 | 0.108527 | 0.139535 | 0.170543 | 0 | 0 | 0 | 0 | 0 | 0 | 0.053521 | 0.144578 | 415 | 15 | 79 | 27.666667 | 0.673239 | 0.043373 | 0 | 0 | 0 | 0 | 0.269521 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.181818 | 0 | 0.272727 | 0.272727 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
d07d20e45fea750c32612fcddef24ffc98a05b67 | 1,845 | py | Python | gd/iter_utils.py | nekitdev/gd.py | b9d5e29c09f953f54b9b648fb677e987d9a8e103 | [
"MIT"
] | 58 | 2020-09-30T16:51:22.000Z | 2022-02-13T17:27:48.000Z | gd/iter_utils.py | NeKitDS/gd.py | b9d5e29c09f953f54b9b648fb677e987d9a8e103 | [
"MIT"
] | 30 | 2019-07-29T12:03:41.000Z | 2020-09-15T17:01:37.000Z | gd/iter_utils.py | NeKitDS/gd.py | b9d5e29c09f953f54b9b648fb677e987d9a8e103 | [
"MIT"
] | 20 | 2019-12-06T03:16:57.000Z | 2020-09-16T17:45:27.000Z | from typing import Any, Callable, Dict, Iterable, Mapping, Tuple, TypeVar, Union, cast, overload
__all__ = ("extract_iterable_from_tuple", "is_iterable", "item_to_tuple", "mapping_merge")
KT = TypeVar("KT")
VT = TypeVar("VT")
T = TypeVar("T")
def mapping_merge(*mappings: Mapping[KT, VT], **arguments: VT) -> Dict[K... | 24.276316 | 96 | 0.635772 | 243 | 1,845 | 4.621399 | 0.205761 | 0.088157 | 0.0748 | 0.085485 | 0.387355 | 0.353517 | 0.257346 | 0.15049 | 0.15049 | 0.110419 | 0 | 0.001382 | 0.215718 | 1,845 | 75 | 97 | 24.6 | 0.774706 | 0.055285 | 0 | 0.291667 | 0 | 0 | 0.039907 | 0.015616 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.020833 | 0 | 0.354167 | 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 |
d07d7eac9f05f51f4abf2075d7c3883791a41eb9 | 937 | py | Python | spacetime/distort_ss.py | uhrwecker/GRDonuts | 3087aeb5c169251bdb711b425dcc3040ff962da7 | [
"MIT"
] | null | null | null | spacetime/distort_ss.py | uhrwecker/GRDonuts | 3087aeb5c169251bdb711b425dcc3040ff962da7 | [
"MIT"
] | 25 | 2020-03-26T11:16:58.000Z | 2020-09-10T18:31:52.000Z | spacetime/distort_ss.py | uhrwecker/GRDonuts | 3087aeb5c169251bdb711b425dcc3040ff962da7 | [
"MIT"
] | null | null | null | import numpy as np
from spacetime.potential import Potential
class DistortedSchwarzschild(Potential):
def __init__(self, theta=np.pi/2, l=3.8, o=1, r_range=(2, 20),
num=10000, cont_without_eq=False, verbose=True):
super().__init__(r_range=r_range, num=num,
cont_wit... | 37.48 | 79 | 0.526147 | 143 | 937 | 3.321678 | 0.314685 | 0.084211 | 0.063158 | 0.050526 | 0.185263 | 0.088421 | 0.088421 | 0.088421 | 0 | 0 | 0 | 0.053125 | 0.316969 | 937 | 24 | 80 | 39.041667 | 0.689063 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.105263 | false | 0 | 0.105263 | 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 |