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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b74d8e9763f51be71d9332444a4477006848a8de | 1,301 | py | Python | main/urls.py | guinslym/django-Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | 2 | 2017-07-31T13:52:40.000Z | 2017-09-19T15:07:09.000Z | main/urls.py | guinslym/Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | null | null | null | main/urls.py | guinslym/Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib import admin
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns
from django.views.decorators.cache import cache_page
from django.conf.urls import url, include, handler404, handler500
admin.autodiscover(... | 27.104167 | 69 | 0.687164 | 151 | 1,301 | 5.807947 | 0.337748 | 0.031927 | 0.063854 | 0.061574 | 0.086659 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021495 | 0.177556 | 1,301 | 48 | 70 | 27.104167 | 0.798131 | 0.152191 | 0 | 0.147059 | 0 | 0 | 0.193254 | 0.0866 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.235294 | 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 |
b751a3b9de29d209e3c48a06bc158c7966ca65b5 | 1,110 | py | Python | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | 3 | 2022-02-22T12:50:08.000Z | 2022-03-13T03:38:46.000Z | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from basicts.archs.AGCRN_arch.AGCN import AVWGCN
class AGCRNCell(nn.Module):
def __init__(self, node_num, dim_in, dim_out, cheb_k, embed_dim):
super(AGCRNCell, self).__init__()
self.node_num = node_num
self.hidden_dim = dim_out
self.gate ... | 42.692308 | 81 | 0.648649 | 172 | 1,110 | 3.906977 | 0.313953 | 0.080357 | 0.096726 | 0.049107 | 0.224702 | 0.15625 | 0 | 0 | 0 | 0 | 0 | 0.005889 | 0.235135 | 1,110 | 26 | 82 | 42.692308 | 0.78563 | 0.051351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.142857 | 0.047619 | 0.428571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7529f85e20a09a7d94f12902a504b82d6d2f333 | 1,763 | py | Python | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from numpy import log10, isnan
def signOfFeasible(p):
r = '-'
if p.isFeas(p.xk): r = '+'
return r
textOutputDict = {\
'objFunVal': lambda p: p.iterObjFunTextFormat % (-p.Fk if p.invertObjFunc else p.Fk),
'log10(maxResidual)': lambda p: '%0.2f' % log10(p.rk+1e-100),
'log10(MaxResidual/ConTol)':lambda p: '... | 37.510638 | 123 | 0.604651 | 241 | 1,763 | 4.327801 | 0.323651 | 0.067114 | 0.052733 | 0.034516 | 0.168744 | 0.084372 | 0.051774 | 0.051774 | 0 | 0 | 0 | 0.028868 | 0.233693 | 1,763 | 46 | 124 | 38.326087 | 0.743153 | 0.02439 | 0 | 0.051282 | 0 | 0 | 0.107746 | 0.01456 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076923 | false | 0.025641 | 0.025641 | 0 | 0.179487 | 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 |
b752f435d4eed268979210bf9a7cb3d5c6b5fde1 | 1,833 | py | Python | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | import os
from main import main
from pprint import pprint
def parse(lines):
# world bounds
wx = int(lines[0].split()[0])
wy = int(lines[0].split()[0])
# initial position
x = int(lines[1].split()[0])
y = int(lines[1].split()[1])
cmds = []
# command / step pair
it = iter(lines[2].... | 24.118421 | 73 | 0.505728 | 238 | 1,833 | 3.836134 | 0.323529 | 0.070099 | 0.03943 | 0.036145 | 0.072289 | 0 | 0 | 0 | 0 | 0 | 0 | 0.028549 | 0.312057 | 1,833 | 75 | 74 | 24.44 | 0.69548 | 0.063284 | 0 | 0 | 0 | 0 | 0.07377 | 0.031616 | 0 | 0 | 0 | 0 | 0 | 1 | 0.019608 | false | 0 | 0.058824 | 0 | 0.098039 | 0.078431 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b75565cf56b991351466f79c8a9946c1474351a6 | 5,749 | py | Python | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | import itertools
from typing import List, Tuple
from card_utils import deck
from card_utils.deck.utils import (
rank_partition,
suit_partition,
ranks_to_sorted_values
)
from card_utils.games.gin.deal import new_game
def deal_new_game():
""" shuffle up and deal each player 7 cards,
put one car... | 27.117925 | 83 | 0.584623 | 824 | 5,749 | 3.824029 | 0.192961 | 0.03491 | 0.026658 | 0.034275 | 0.23072 | 0.167883 | 0.071723 | 0.071723 | 0.057125 | 0.048873 | 0 | 0.020737 | 0.287006 | 5,749 | 211 | 84 | 27.246446 | 0.747987 | 0.227344 | 0 | 0.153846 | 0 | 0 | 0.034574 | 0.006963 | 0 | 0 | 0 | 0 | 0 | 1 | 0.105769 | false | 0 | 0.048077 | 0 | 0.317308 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7569ffd8bee128efc51f5bcf493cd00aa1b2d94 | 899 | py | Python | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | """
Testing of TestDice.
"""
from evennia.commands.default.tests import BaseEvenniaCommandTest
from mock import patch
from . import dice
@patch("evennia.contrib.rpg.dice.dice.randint", return_value=5)
class TestDice(BaseEvenniaCommandTest):
def test_roll_dice(self, mocked_randint):
self.assertEqual(dice... | 37.458333 | 100 | 0.657397 | 121 | 899 | 4.801653 | 0.429752 | 0.055077 | 0.098107 | 0.118761 | 0.239243 | 0.239243 | 0.187608 | 0.137694 | 0 | 0 | 0 | 0.069767 | 0.186874 | 899 | 23 | 101 | 39.086957 | 0.725034 | 0.022247 | 0 | 0 | 0 | 0.066667 | 0.241379 | 0.042529 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0.133333 | false | 0 | 0.2 | 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 |
b75755658b51065a953a59f32b666762d1790a50 | 9,247 | py | Python | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
import argparse
import logging
import signal
import time
from logging import debug, error, info, warning
import pythonosc.osc_server
import pythonosc.udp_client
from pythonosc.dispatcher import Dispatcher
import hid
LOG_FORMAT = '%(message)s'
POLL_INTERVAL = 1
# Supported USB relay vendor-id and... | 37.589431 | 106 | 0.54861 | 1,012 | 9,247 | 4.827075 | 0.216403 | 0.033777 | 0.019652 | 0.019652 | 0.21085 | 0.175026 | 0.161515 | 0.13654 | 0.112794 | 0.087001 | 0 | 0.015709 | 0.352871 | 9,247 | 245 | 107 | 37.742857 | 0.800635 | 0.010922 | 0 | 0.319249 | 0 | 0 | 0.125451 | 0.002297 | 0 | 0 | 0.009187 | 0 | 0 | 1 | 0.075117 | false | 0.00939 | 0.042254 | 0 | 0.140845 | 0.018779 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b757a3fb8db3b96f5cc0d1f1dd19f7847059351f | 1,408 | py | Python | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import os
path = "/Users/petermarinov/msci project/electrode data/test data/data/"
filenames = []
for f in os.listdir(path):
if not f.startswith('.'):
filenames.append(f)
i=-12
data = np.genfromtxt(path + filenames[i])
V = np.zeros((200,20... | 31.288889 | 139 | 0.496449 | 269 | 1,408 | 2.598513 | 0.249071 | 0.042918 | 0.051502 | 0.034335 | 0.346209 | 0.253219 | 0.220315 | 0.220315 | 0.220315 | 0.220315 | 0 | 0.110057 | 0.25142 | 1,408 | 45 | 140 | 31.288889 | 0.553131 | 0.15696 | 0 | 0.055556 | 0 | 0 | 0.126205 | 0.021034 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.083333 | 0 | 0.083333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b75be5ebe9cb0ad6772b99405564c425be4f2dda | 969 | py | Python | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 92 | 2016-11-14T01:39:55.000Z | 2022-03-27T17:23:41.000Z | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 1 | 2017-11-30T05:04:02.000Z | 2018-08-29T04:31:39.000Z | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 31 | 2017-05-17T18:50:18.000Z | 2022-03-12T03:08:00.000Z | # -*- coding: utf-8 -*-
# ***********************************
# Author: Pedro Jorge De Los Santos
# E-mail: delossantosmfq@gmail.com
# Blog: numython.github.io
# License: MIT License
# ***********************************
from nusa import *
"""
Logan, D. (2007). A first course in the finite element analysis.
... | 21.065217 | 64 | 0.585139 | 171 | 969 | 3.263158 | 0.473684 | 0.043011 | 0.075269 | 0.032258 | 0.111111 | 0.111111 | 0.089606 | 0.089606 | 0 | 0 | 0 | 0.08508 | 0.163055 | 969 | 45 | 65 | 21.533333 | 0.602959 | 0.337461 | 0 | 0 | 0 | 0 | 0.020873 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.04 | 0 | 0.04 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b75dd73022d3840c6328953902299b38ebc5ba18 | 2,919 | py | Python | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 13 | 2017-07-02T06:45:46.000Z | 2020-12-26T16:35:24.000Z | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 4 | 2017-07-22T00:09:41.000Z | 2017-12-15T15:54:33.000Z | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 25 | 2017-07-01T23:07:08.000Z | 2019-01-24T09:45:08.000Z | from data_reader.reader import CsvReader
from util import *
import numpy as np
import matplotlib.pyplot as plt
class LogisticRegression(object):
def __init__(self, learning_rate=0.01, epochs=50):
self.__epochs= epochs
self.__learning_rate = learning_rate
def fit(self, X, y):
self.w_ =... | 34.341176 | 148 | 0.656732 | 464 | 2,919 | 3.885776 | 0.25431 | 0.072102 | 0.035496 | 0.036606 | 0.13533 | 0.13533 | 0.110926 | 0.098724 | 0.043261 | 0.043261 | 0 | 0.02384 | 0.209661 | 2,919 | 84 | 149 | 34.75 | 0.757694 | 0.100719 | 0 | 0.072727 | 0 | 0 | 0.035919 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.127273 | false | 0 | 0.072727 | 0.054545 | 0.309091 | 0.054545 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b76161b7b67049e769a1af4d2aa06f728082679c | 2,695 | py | Python | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Created on March 18 2020
@author: Melchior du Lac
@description: Extract the taxonomy ID from an SBML file
"""
import argparse
import tempfile
import os
import logging
import shutil
import docker
def main(inputfile, output):
"""Call the extractTaxonomy docker to return the JSON file
... | 35 | 127 | 0.565121 | 289 | 2,695 | 5.15917 | 0.384083 | 0.037559 | 0.036217 | 0.016097 | 0.122066 | 0.122066 | 0.096579 | 0.096579 | 0.096579 | 0.096579 | 0 | 0.005549 | 0.331354 | 2,695 | 76 | 128 | 35.460526 | 0.821865 | 0.12987 | 0 | 0.226415 | 0 | 0 | 0.162771 | 0.050216 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018868 | false | 0 | 0.113208 | 0 | 0.132075 | 0.056604 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b76571e31217da708c1ce0ba259ecc1d18b070d9 | 1,878 | py | Python | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/Lolipop | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 6 | 2020-04-18T15:43:19.000Z | 2022-02-19T18:43:23.000Z | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/Lolipop | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 5 | 2020-05-04T16:09:03.000Z | 2020-10-13T03:52:56.000Z | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/muller_diagrams | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 3 | 2020-03-23T17:12:56.000Z | 2020-07-24T22:22:12.000Z | from pathlib import Path
import pandas
from muller.dataio import import_tables
from loguru import logger
DATA_FOLDER = Path(__file__).parent.parent / "data"
def test_filter_empty_trajectories():
input_column_0 = ['genotype-1', 'genotype-2', 'genotype-3', 'genotype-4', 'genotype-5', 'genotype-6']
input_column_1 = [... | 33.535714 | 102 | 0.746006 | 300 | 1,878 | 4.406667 | 0.19 | 0.066566 | 0.060514 | 0.054463 | 0.406959 | 0.344932 | 0.228442 | 0.030257 | 0.030257 | 0.030257 | 0 | 0.129207 | 0.113951 | 1,878 | 56 | 103 | 33.535714 | 0.665264 | 0.044196 | 0 | 0 | 0 | 0 | 0.081428 | 0 | 0 | 0 | 0 | 0 | 0.073171 | 1 | 0.02439 | false | 0 | 0.121951 | 0 | 0.146341 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b765d8a9e197945a8d8e649b5d2aab25a4ba41c1 | 1,548 | py | Python | posthog/apps.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | posthog/apps.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | posthog/apps.py | adamb70/posthog | 54ae8f0e70092f86b4aefbd93b56680dbd28b1c5 | [
"MIT"
] | null | null | null | import os
import sys
import posthoganalytics
from django.apps import AppConfig
from django.conf import settings
from posthog.utils import get_git_branch, get_git_commit, get_machine_id
from posthog.version import VERSION
class PostHogConfig(AppConfig):
name = "posthog"
verbose_name = "PostHog"
def read... | 34.4 | 111 | 0.628553 | 180 | 1,548 | 5.244444 | 0.444444 | 0.025424 | 0.028602 | 0.041314 | 0.03178 | 0 | 0 | 0 | 0 | 0 | 0 | 0.001825 | 0.29199 | 1,548 | 44 | 112 | 35.181818 | 0.859489 | 0.131137 | 0 | 0.0625 | 0 | 0 | 0.129851 | 0.01791 | 0 | 0 | 0 | 0 | 0 | 1 | 0.03125 | false | 0 | 0.25 | 0 | 0.375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b765edd3d7064dd1a82224294d673c2cee6bca1a | 836 | py | Python | src/task_timer.py | dlb-rl/pulse-rl | ebe78d2286b2199d18b86941fbc9990e0d5c354a | [
"MIT"
] | 4 | 2021-12-06T09:19:14.000Z | 2022-01-31T13:58:06.000Z | src/task_timer.py | dlb-rl/pulse-rl | ebe78d2286b2199d18b86941fbc9990e0d5c354a | [
"MIT"
] | null | null | null | src/task_timer.py | dlb-rl/pulse-rl | ebe78d2286b2199d18b86941fbc9990e0d5c354a | [
"MIT"
] | null | null | null | import os
import json
import time
from datetime import timedelta
class TaskTimer:
def __init__(self):
self.time_performance = {}
self.start_times = {}
def start(self, task):
self.start_times[task] = time.time()
print('--- [{}] Start "{}"'.format(time.ctime(self.start_times[ta... | 26.967742 | 85 | 0.574163 | 98 | 836 | 4.734694 | 0.346939 | 0.161638 | 0.163793 | 0.116379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.279904 | 836 | 30 | 86 | 27.866667 | 0.770764 | 0 | 0 | 0 | 0 | 0 | 0.086124 | 0.02512 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.166667 | 0 | 0.375 | 0.083333 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b769a2ddbb714e86c922fd616f0acb57b564206d | 5,192 | py | Python | db_query.py | UiOHive/FinseDashboard | 14184fbc425e87a4b9a13b3a9b31159b181cf357 | [
"MIT"
] | null | null | null | db_query.py | UiOHive/FinseDashboard | 14184fbc425e87a4b9a13b3a9b31159b181cf357 | [
"MIT"
] | null | null | null | db_query.py | UiOHive/FinseDashboard | 14184fbc425e87a4b9a13b3a9b31159b181cf357 | [
"MIT"
] | null | null | null | import datetime
import os, sys
import pprint
import requests
from pandas.io.json import json_normalize
import pandas as pd
URL = 'https://wsn.latice.eu/api/query/v2/'
#URL = 'http://localhost:8000/wsn/api/query/v2/'
#TOKEN = os.getenv('WSN_TOKEN')
TOKEN = os.getenv('WSN_TOKEN')
path = os.getcwd()
def query(
limi... | 28.217391 | 125 | 0.573575 | 620 | 5,192 | 4.674194 | 0.295161 | 0.031401 | 0.030366 | 0.028986 | 0.557971 | 0.511387 | 0.493444 | 0.493444 | 0.493444 | 0.493444 | 0 | 0.023685 | 0.300655 | 5,192 | 183 | 126 | 28.371585 | 0.774442 | 0.222843 | 0 | 0.661538 | 0 | 0 | 0.136671 | 0.050814 | 0 | 0 | 0.013517 | 0 | 0 | 1 | 0.030769 | false | 0 | 0.046154 | 0 | 0.107692 | 0.092308 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b76bc1e49faa136f8b812dcedd6dc878d0d8aa05 | 4,716 | py | Python | src/olympia/reviews/tests/test_models.py | leplatrem/addons-server | 8b5ebda6f33194aa9fce12c0453574e7f850e6ad | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviews/tests/test_models.py | leplatrem/addons-server | 8b5ebda6f33194aa9fce12c0453574e7f850e6ad | [
"BSD-3-Clause"
] | null | null | null | src/olympia/reviews/tests/test_models.py | leplatrem/addons-server | 8b5ebda6f33194aa9fce12c0453574e7f850e6ad | [
"BSD-3-Clause"
] | null | null | null | from django.utils import translation
from olympia import amo
from olympia.amo.tests import TestCase, ESTestCase
from olympia.addons.models import Addon
from olympia.reviews import tasks
from olympia.reviews.models import (
check_spam, GroupedRating, Review, ReviewFlag, Spam)
from olympia.users.models import UserPr... | 31.44 | 78 | 0.636556 | 621 | 4,716 | 4.719807 | 0.207729 | 0.06653 | 0.038212 | 0.042989 | 0.461617 | 0.421017 | 0.387581 | 0.296486 | 0.296486 | 0.269191 | 0 | 0.028827 | 0.242366 | 4,716 | 149 | 79 | 31.651007 | 0.791492 | 0.085878 | 0 | 0.376238 | 0 | 0 | 0.043468 | 0.005346 | 0 | 0 | 0 | 0 | 0.237624 | 1 | 0.148515 | false | 0 | 0.069307 | 0 | 0.316832 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b76e06eb55845d82a11e8d62864a8001b125af43 | 703 | py | Python | halo_app/infra/cache.py | halo-framework/halo-app | 98e057b2f433d97d903589ac75a6c2544174bac8 | [
"MIT"
] | null | null | null | halo_app/infra/cache.py | halo-framework/halo-app | 98e057b2f433d97d903589ac75a6c2544174bac8 | [
"MIT"
] | null | null | null | halo_app/infra/cache.py | halo-framework/halo-app | 98e057b2f433d97d903589ac75a6c2544174bac8 | [
"MIT"
] | null | null | null | from __future__ import annotations
import elasticache_auto_discovery
from pymemcache.client.hash import HashClient
# elasticache settings
elasticache_config_endpoint = "your-elasticache-cluster-endpoint:port"
nodes = elasticache_auto_discovery.discover(elasticache_config_endpoint)
nodes = map(lambda x: (x[1], int(x[2... | 25.107143 | 72 | 0.752489 | 91 | 703 | 5.648352 | 0.516484 | 0.081712 | 0.093385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003401 | 0.163585 | 703 | 27 | 73 | 26.037037 | 0.870748 | 0.237553 | 0 | 0 | 0 | 0 | 0.07393 | 0.07393 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.25 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b771162a3330c2472592fd5f42c757bebf6eb7a4 | 12,046 | py | Python | ext/ANTsPyNet/antspynet/utilities/mixture_density_utilities.py | tsmonteiro/fmri_proc | ee740cfa3c3a7ef8e1ee1ebd3b286a66712e0ec1 | [
"MIT"
] | 2 | 2021-11-16T10:00:33.000Z | 2021-12-13T02:57:40.000Z | ext/ANTsPyNet/antspynet/utilities/mixture_density_utilities.py | tsmonteiro/fmri_proc | ee740cfa3c3a7ef8e1ee1ebd3b286a66712e0ec1 | [
"MIT"
] | null | null | null | ext/ANTsPyNet/antspynet/utilities/mixture_density_utilities.py | tsmonteiro/fmri_proc | ee740cfa3c3a7ef8e1ee1ebd3b286a66712e0ec1 | [
"MIT"
] | 1 | 2021-12-13T02:57:27.000Z | 2021-12-13T02:57:27.000Z |
import keras.backend as K
from keras.engine import Layer, InputSpec
from keras.layers import Concatenate
from keras import initializers
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
class MixtureDensityLayer(Layer):
"""
Layer for modeling arbitrary functions using neural ne... | 30.651399 | 94 | 0.628341 | 1,347 | 12,046 | 5.374165 | 0.139569 | 0.044205 | 0.075149 | 0.072524 | 0.664318 | 0.588617 | 0.550352 | 0.537781 | 0.502556 | 0.459179 | 0 | 0.005899 | 0.282251 | 12,046 | 392 | 95 | 30.729592 | 0.831367 | 0.20953 | 0 | 0.398734 | 0 | 0 | 0.043204 | 0.006961 | 0 | 0 | 0 | 0 | 0 | 1 | 0.094937 | false | 0 | 0.044304 | 0 | 0.151899 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7712de7485aecf34c54bcaa9134a8c65cfc7aa6 | 1,481 | py | Python | test.py | pnawalramka/cowin | f8ce6286d38fc0616a385ac0a971c8947f71348c | [
"MIT"
] | null | null | null | test.py | pnawalramka/cowin | f8ce6286d38fc0616a385ac0a971c8947f71348c | [
"MIT"
] | null | null | null | test.py | pnawalramka/cowin | f8ce6286d38fc0616a385ac0a971c8947f71348c | [
"MIT"
] | null | null | null | import json
from unittest import mock, TestCase
import check_availability
json_data = \
"""
{
"centers": [
{
"center_id": 1234,
"name": "District General Hostpital",
"name_l": "",
"address": "45 M G Road",
"address_l": "",
"state_name": "Maharashtra",
"state_name_l": ""... | 21.779412 | 63 | 0.532073 | 160 | 1,481 | 4.7 | 0.56875 | 0.026596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.079808 | 0.297772 | 1,481 | 67 | 64 | 22.104478 | 0.643269 | 0 | 0 | 0 | 0 | 0 | 0.05298 | 0 | 0 | 0 | 0 | 0 | 0.142857 | 1 | 0.142857 | false | 0 | 0.214286 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7720c668afa28b45e212a7ec9a950d7f27725bb | 12,805 | py | Python | cemc/mcmc/cov_reaction_crd.py | davidkleiven/WangLandau | 0b253dd98033c53560fe95c76f5e38257834bdf6 | [
"MIT"
] | 2 | 2022-02-10T00:38:53.000Z | 2022-03-17T22:08:40.000Z | cemc/mcmc/cov_reaction_crd.py | davidkleiven/CEMC | 0b253dd98033c53560fe95c76f5e38257834bdf6 | [
"MIT"
] | 30 | 2018-05-21T14:52:00.000Z | 2021-02-24T07:45:09.000Z | cemc/mcmc/cov_reaction_crd.py | davidkleiven/WangLandau | 0b253dd98033c53560fe95c76f5e38257834bdf6 | [
"MIT"
] | 3 | 2018-10-09T14:03:32.000Z | 2022-02-09T05:36:05.000Z | import sys
from cemc.mcmc import ReactionCrdInitializer, ReactionCrdRangeConstraint
import numpy as np
from itertools import product
import time
from numpy.linalg import inv
class CouldNotFindValidStateError(Exception):
pass
class CovarianceCrdInitializer(ReactionCrdInitializer):
"""Initializer for various ... | 38.338323 | 109 | 0.617415 | 1,565 | 12,805 | 4.844728 | 0.202556 | 0.044579 | 0.034819 | 0.041546 | 0.181351 | 0.13598 | 0.095357 | 0.075046 | 0.064495 | 0.04669 | 0 | 0.009039 | 0.308786 | 12,805 | 334 | 110 | 38.338323 | 0.847588 | 0.266771 | 0 | 0.144385 | 0 | 0 | 0.048854 | 0.005503 | 0 | 0 | 0 | 0 | 0.026738 | 1 | 0.074866 | false | 0.005348 | 0.042781 | 0 | 0.197861 | 0.032086 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b77285d78a57f47f11411ca9d0f97da9f2e1f31c | 3,810 | py | Python | mysql/main.py | migachevalexey/BigQuery-integrations | d44546fbd3ff116e35ef90800ade2399e7266d9e | [
"MIT"
] | null | null | null | mysql/main.py | migachevalexey/BigQuery-integrations | d44546fbd3ff116e35ef90800ade2399e7266d9e | [
"MIT"
] | null | null | null | mysql/main.py | migachevalexey/BigQuery-integrations | d44546fbd3ff116e35ef90800ade2399e7266d9e | [
"MIT"
] | null | null | null | from google.cloud import bigquery
from mysql.connector import connect
import os
# writeable part of the filesystem for Cloud Functions instance
gc_write_dir = "/tmp"
def get_file_mysql(mysql_configuration):
"""
Querying data using Connector/Python via *host* MySQL server.
The function return the f... | 39.6875 | 193 | 0.664829 | 460 | 3,810 | 5.304348 | 0.295652 | 0.110656 | 0.012295 | 0.027049 | 0.15 | 0.067623 | 0.067623 | 0.067623 | 0.05082 | 0.05082 | 0 | 0.001378 | 0.238058 | 3,810 | 96 | 194 | 39.6875 | 0.839132 | 0.165617 | 0 | 0.203125 | 0 | 0 | 0.164198 | 0.007083 | 0 | 0 | 0 | 0 | 0 | 1 | 0.046875 | false | 0.015625 | 0.046875 | 0 | 0.109375 | 0.140625 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7728a4f2303e9918fa06fb3ec419829f1f73d23 | 2,413 | py | Python | arthur.carvalho/snakepro/game.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | 2 | 2021-01-24T01:04:34.000Z | 2021-05-06T16:25:53.000Z | arthur.carvalho/snakepro/game.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | null | null | null | arthur.carvalho/snakepro/game.py | LUDUSLab/stem-games | 347afa8b1511d76f8070fa69f27a49b57e551376 | [
"MIT"
] | 3 | 2021-01-26T21:35:43.000Z | 2021-05-06T16:06:47.000Z | from config import *
from fruit import *
from snakebody import *
from wall import *
def scoring(sp, ap):
global score
background_score = pygame.Surface(rectangle)
background_score.fill(color_gray)
score_text = score_font.render(f'Score: {score}', True, color_black, color_gray)
screen.blit(backg... | 25.135417 | 110 | 0.574803 | 302 | 2,413 | 4.380795 | 0.278146 | 0.116402 | 0.063492 | 0.048375 | 0.241119 | 0.14059 | 0.14059 | 0.081633 | 0.081633 | 0.081633 | 0 | 0.062006 | 0.318276 | 2,413 | 95 | 111 | 25.4 | 0.742249 | 0.006216 | 0 | 0.065574 | 0 | 0 | 0.034656 | 0.019207 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04918 | false | 0 | 0.065574 | 0 | 0.114754 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7728d4f3bcf2508223268aec9d55c9c7919b6a4 | 821 | py | Python | preprocessing_pipeline/so/util/log.py | sotorrent/preprocessing-pipeline | d407a56760fa5ab975dc2043c89f478bd7c89e99 | [
"Apache-2.0"
] | null | null | null | preprocessing_pipeline/so/util/log.py | sotorrent/preprocessing-pipeline | d407a56760fa5ab975dc2043c89f478bd7c89e99 | [
"Apache-2.0"
] | null | null | null | preprocessing_pipeline/so/util/log.py | sotorrent/preprocessing-pipeline | d407a56760fa5ab975dc2043c89f478bd7c89e99 | [
"Apache-2.0"
] | 1 | 2021-09-22T16:07:18.000Z | 2021-09-22T16:07:18.000Z | import logging
from preprocessing_pipeline.so.util.config import LOG_LEVEL
def initialize_logger(logger_name):
"""
Configure a named logger (see https://stackoverflow.com/a/43794480).
"""
# create logger for module
module_logger = logging.getLogger(logger_name)
# set lowest log level the log... | 30.407407 | 96 | 0.742996 | 102 | 821 | 5.803922 | 0.54902 | 0.101351 | 0.054054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011713 | 0.168088 | 821 | 26 | 97 | 31.576923 | 0.855051 | 0.282582 | 0 | 0 | 0 | 0 | 0.089474 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.166667 | 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 |
b7734741f7d6376de18287d5b5965809361df47f | 995 | py | Python | utilityFunction/CommandFunc.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | null | null | null | utilityFunction/CommandFunc.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | 3 | 2021-03-23T04:58:47.000Z | 2021-04-02T02:40:54.000Z | utilityFunction/CommandFunc.py | The-Fragment/FragmentFembot | bca0027b423753eb162590e8fd440a2c1e65d133 | [
"MIT"
] | null | null | null | import random
# Ex. takes in 2d20 and outputs the string Rolling 2 d20
def roll_str(rolls):
numDice = rolls.split('d')[0]
diceVal = rolls.split('d')[1]
if numDice == '':
numDice = int(1)
return "Rolling %s d%s" % (numDice, diceVal)
# Ex. takes in 2d20 and outputs resultString = 11, 19 result... | 27.638889 | 78 | 0.582915 | 128 | 995 | 4.523438 | 0.4375 | 0.069085 | 0.075993 | 0.044905 | 0.145078 | 0.079447 | 0 | 0 | 0 | 0 | 0 | 0.035663 | 0.295477 | 995 | 35 | 79 | 28.428571 | 0.7903 | 0.186935 | 0 | 0.071429 | 0 | 0 | 0.047205 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.035714 | 0 | 0.214286 | 0.035714 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b773ef3748302d9fb0e80bd06beb0fda6a677835 | 12,339 | py | Python | src/reviews/tests/test_forms.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 8 | 2016-01-29T11:53:40.000Z | 2020-03-02T22:42:02.000Z | src/reviews/tests/test_forms.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 289 | 2015-03-23T07:42:52.000Z | 2022-03-11T23:26:10.000Z | src/reviews/tests/test_forms.py | Talengi/phase | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | [
"MIT"
] | 7 | 2015-12-08T09:03:20.000Z | 2020-05-11T15:36:51.000Z | # -*- coding: utf-8 -*-
import datetime
from django.test import TestCase
from django.contrib.contenttypes.models import ContentType
from accounts.factories import UserFactory
from categories.factories import CategoryFactory
from documents.factories import DocumentFactory
from default_documents.models import Contrac... | 34.275 | 86 | 0.630359 | 1,313 | 12,339 | 5.766946 | 0.132521 | 0.049921 | 0.06075 | 0.057052 | 0.707607 | 0.675251 | 0.644216 | 0.634046 | 0.61252 | 0.59588 | 0 | 0.006292 | 0.265824 | 12,339 | 359 | 87 | 34.370474 | 0.829562 | 0.073993 | 0 | 0.697761 | 0 | 0 | 0.045855 | 0 | 0 | 0 | 0 | 0 | 0.160448 | 1 | 0.070896 | false | 0.014925 | 0.037313 | 0 | 0.119403 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b77448adc21f21e754acd95d28d79c117e90042e | 2,814 | py | Python | WWW/pycopia/WWW/HTML5simple.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 89 | 2015-03-26T11:25:20.000Z | 2022-01-12T06:25:14.000Z | WWW/pycopia/WWW/HTML5simple.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 1 | 2015-07-05T03:27:43.000Z | 2015-07-11T06:21:20.000Z | WWW/pycopia/WWW/HTML5simple.py | kdart/pycopia | 1446fabaedf8c6bdd4ab1fc3f0ea731e0ef8da9d | [
"Apache-2.0"
] | 30 | 2015-04-30T01:35:54.000Z | 2022-01-12T06:19:49.000Z | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
... | 35.620253 | 90 | 0.678749 | 354 | 2,814 | 5.279661 | 0.567797 | 0.032103 | 0.034243 | 0.025682 | 0.058855 | 0.044944 | 0.044944 | 0.044944 | 0.044944 | 0 | 0 | 0.012288 | 0.161336 | 2,814 | 78 | 91 | 36.076923 | 0.779661 | 0.281095 | 0 | 0 | 0 | 0.090909 | 0.569138 | 0.157816 | 0.022727 | 0 | 0 | 0 | 0 | 1 | 0.022727 | false | 0 | 0.090909 | 0.022727 | 0.136364 | 0.045455 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b777765b36345a7cbdc249bcc3d7922fbe5e7398 | 2,198 | py | Python | tests/backend/configobj.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | tests/backend/configobj.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | tests/backend/configobj.py | edyan/python-anyconfig | d237909a6e4848737539b80951b710238c72052f | [
"MIT"
] | null | null | null | #
# Copyright (C) 2013 - 2017 Satoru SATOH <ssato @ redhat.com>
# License: MIT
#
# pylint: disable=missing-docstring,invalid-name,too-few-public-methods
# pylint: disable=ungrouped-imports
from __future__ import absolute_import
import anyconfig.backend.configobj as TT
import tests.backend.common as TBC
from anyconfig... | 27.135802 | 76 | 0.589172 | 284 | 2,198 | 4.447183 | 0.401408 | 0.055424 | 0.035629 | 0.02692 | 0.424386 | 0.378464 | 0.308789 | 0.251781 | 0.194774 | 0.194774 | 0 | 0.04457 | 0.27525 | 2,198 | 80 | 77 | 27.475 | 0.748274 | 0.088262 | 0 | 0.037736 | 0 | 0 | 0.522044 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.018868 | 0.075472 | 0 | 0.226415 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b778baead541bab3544aa4b5bfec40bbfb0e7118 | 1,794 | py | Python | tests/test_spider.py | aezhov/sw_downloader | 325f6fe98579dda4f98613e4513fc46c7bd962c7 | [
"MIT"
] | 1 | 2020-01-23T06:56:34.000Z | 2020-01-23T06:56:34.000Z | tests/test_spider.py | aezhov/sw_downloader | 325f6fe98579dda4f98613e4513fc46c7bd962c7 | [
"MIT"
] | null | null | null | tests/test_spider.py | aezhov/sw_downloader | 325f6fe98579dda4f98613e4513fc46c7bd962c7 | [
"MIT"
] | 2 | 2020-01-23T06:56:36.000Z | 2020-01-24T05:34:25.000Z | import requests
from scrapy.http import HtmlResponse
from sw_downloader.sw_downloader.spiders.smashing_magazine \
import SmashingMagazineSpider
class TestSmashingMagazineSpider:
def test_ruleset(self):
url = ('https://www.smashingmagazine.com/category/wallpapers')
response = requests.get(url... | 39.866667 | 70 | 0.628763 | 188 | 1,794 | 5.840426 | 0.361702 | 0.076503 | 0.032787 | 0.040984 | 0.495446 | 0.430783 | 0.399818 | 0.399818 | 0.165756 | 0.165756 | 0 | 0.050575 | 0.272575 | 1,794 | 44 | 71 | 40.772727 | 0.790805 | 0 | 0 | 0.351351 | 0 | 0 | 0.141026 | 0.027871 | 0 | 0 | 0 | 0 | 0.108108 | 1 | 0.081081 | false | 0 | 0.081081 | 0 | 0.189189 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7794cab91544e360a3b3517961177ee512565ea | 4,289 | py | Python | rio/tasks.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | null | null | null | rio/tasks.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | 14 | 2016-04-14T04:18:41.000Z | 2016-05-12T03:46:37.000Z | rio/tasks.py | soasme/rio | e6b89634db8d3ad75ac7f7b25ddec5b19d4f66e2 | [
"MIT"
] | 1 | 2016-04-06T08:54:20.000Z | 2016-04-06T08:54:20.000Z | # -*- coding: utf-8 -*-
"""
rio.tasks
~~~~~~~~~~
Implement of rio tasks based on celery.
"""
from time import time
from celery import chord
from requests import ConnectionError
from celery.utils.log import get_task_logger
from rio.core import celery
from rio.core import sentry
from rio.utils.http import dispatch_w... | 26.312883 | 77 | 0.55211 | 463 | 4,289 | 4.971922 | 0.272138 | 0.031277 | 0.031277 | 0.020851 | 0.213293 | 0.172459 | 0.133797 | 0.08775 | 0.046047 | 0.046047 | 0 | 0.00164 | 0.289345 | 4,289 | 162 | 78 | 26.475309 | 0.753609 | 0.201212 | 0 | 0.231579 | 0 | 0 | 0.106562 | 0.008429 | 0 | 0 | 0 | 0 | 0 | 1 | 0.042105 | false | 0 | 0.115789 | 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 |
b77a241d42c4accce70a300b51e344bbc1b51e81 | 2,932 | py | Python | security_app/createuserpoolgroup.py | jagalembu/chalice_cognito_multi_tenancy | b1a6569e716848adfd5b443239fca1ae883d4f4b | [
"MIT"
] | null | null | null | security_app/createuserpoolgroup.py | jagalembu/chalice_cognito_multi_tenancy | b1a6569e716848adfd5b443239fca1ae883d4f4b | [
"MIT"
] | null | null | null | security_app/createuserpoolgroup.py | jagalembu/chalice_cognito_multi_tenancy | b1a6569e716848adfd5b443239fca1ae883d4f4b | [
"MIT"
] | null | null | null | import os
import uuid
import json
import argparse
import boto3
USERPOOL = {
'env_var_poolid': 'APPUSERPOOLID',
'env_var_cognito_url': 'COGNITOJWKSURL',
'env_var_pool_client': 'APPCLIENTID',
}
def create_user_pool(pool_name, region, stage):
client = boto3.client('cognito-idp')
resp = client.creat... | 30.863158 | 104 | 0.645634 | 358 | 2,932 | 5.013966 | 0.304469 | 0.062396 | 0.038997 | 0.053482 | 0.342618 | 0.296936 | 0.256825 | 0.210028 | 0.187187 | 0.187187 | 0 | 0.002628 | 0.221351 | 2,932 | 95 | 105 | 30.863158 | 0.783618 | 0.022169 | 0 | 0.175676 | 0 | 0.013514 | 0.196721 | 0.014649 | 0 | 0 | 0 | 0 | 0 | 1 | 0.094595 | false | 0 | 0.067568 | 0 | 0.175676 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7800aafff5c8094f397d2e3b7573a73689dfdba | 560 | py | Python | src/while_exit.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 25 | 2018-08-14T22:13:13.000Z | 2021-07-23T04:14:06.000Z | src/while_exit.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 1 | 2021-05-21T23:46:42.000Z | 2021-05-21T23:46:42.000Z | src/while_exit.py | Alex9808/py101 | 18c585c1433e8ec6f5e4962e556a781e0c3c3cd5 | [
"MIT"
] | 34 | 2018-07-30T20:48:17.000Z | 2022-02-04T19:01:27.000Z | #!/usr/bin/env python
''' Este programa se repetirá 3 veces o hasta que se ingrese
la palabra "despedida" y desplegará sólo el número de intentos
fallidos hasta que cualquiera de los eventos ocurentradara. Al
ingresar la palabra "termina" el programa se detendrá.'''
entrada = ""
suma = 0
while su... | 29.473684 | 67 | 0.630357 | 73 | 560 | 4.835616 | 0.671233 | 0.056657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009732 | 0.266071 | 560 | 18 | 68 | 31.111111 | 0.849148 | 0.460714 | 0 | 0 | 0 | 0 | 0.249057 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.181818 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7828d9ca80482a07e76866d18c12b99668834d3 | 2,582 | py | Python | selenium_wrapper/factory.py | dfeeley/selenium-wrapper | f69576802e7847d120a051a2902da5750b9c6203 | [
"MIT"
] | 1 | 2022-01-14T20:21:19.000Z | 2022-01-14T20:21:19.000Z | selenium_wrapper/factory.py | dfeeley/selenium-wrapper | f69576802e7847d120a051a2902da5750b9c6203 | [
"MIT"
] | null | null | null | selenium_wrapper/factory.py | dfeeley/selenium-wrapper | f69576802e7847d120a051a2902da5750b9c6203 | [
"MIT"
] | null | null | null | import os
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.chrome.options import Options
from .driver import Driver
def remote(url, browser="chrome", **kwargs):
if browser != "chrome":
raise ValueError(f"Browser {browser... | 39.723077 | 84 | 0.703718 | 300 | 2,582 | 5.903333 | 0.36 | 0.056465 | 0.071146 | 0.042914 | 0.212309 | 0.118577 | 0.080181 | 0.080181 | 0.080181 | 0.080181 | 0 | 0.021296 | 0.163439 | 2,582 | 64 | 85 | 40.34375 | 0.798611 | 0 | 0 | 0.107143 | 0 | 0.017857 | 0.326491 | 0.166925 | 0 | 0 | 0 | 0 | 0 | 1 | 0.053571 | false | 0 | 0.089286 | 0 | 0.196429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b782afffa41a32debaad33cd5a697c066dc182f8 | 14,153 | py | Python | networking_cisco/tests/unit/saf/agent/vdp/test_lldpad.py | arvindsharma16/networking-cisco | 2f38c25742296f07ab80479c152504353da0a1d4 | [
"Apache-2.0"
] | null | null | null | networking_cisco/tests/unit/saf/agent/vdp/test_lldpad.py | arvindsharma16/networking-cisco | 2f38c25742296f07ab80479c152504353da0a1d4 | [
"Apache-2.0"
] | null | null | null | networking_cisco/tests/unit/saf/agent/vdp/test_lldpad.py | arvindsharma16/networking-cisco | 2f38c25742296f07ab80479c152504353da0a1d4 | [
"Apache-2.0"
] | 1 | 2020-08-31T22:53:38.000Z | 2020-08-31T22:53:38.000Z | # Copyrigh 2015 Cisco Systems.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 50.366548 | 79 | 0.466191 | 1,391 | 14,153 | 4.550683 | 0.19051 | 0.030016 | 0.020221 | 0.025276 | 0.581675 | 0.523065 | 0.498578 | 0.465403 | 0.441706 | 0.40158 | 0 | 0.069091 | 0.438564 | 14,153 | 280 | 80 | 50.546429 | 0.727536 | 0.084434 | 0 | 0.436123 | 0 | 0 | 0.115971 | 0.058842 | 0 | 0 | 0 | 0 | 0.088106 | 1 | 0.057269 | false | 0.004405 | 0.030837 | 0 | 0.092511 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7836e4485ed6acdd7e26cba6a9e54fccf62bd20 | 15,656 | py | Python | py/prospect/viewer/cds.py | segasai/prospect | 0237fad5b04f5a982ba4178320e1ca5bb5fa408f | [
"BSD-3-Clause"
] | 4 | 2018-10-22T21:12:43.000Z | 2019-07-11T20:08:12.000Z | py/prospect/viewer/cds.py | segasai/prospect | 0237fad5b04f5a982ba4178320e1ca5bb5fa408f | [
"BSD-3-Clause"
] | 54 | 2019-12-07T08:24:53.000Z | 2022-02-25T10:17:59.000Z | py/prospect/viewer/cds.py | segasai/prospect | 0237fad5b04f5a982ba4178320e1ca5bb5fa408f | [
"BSD-3-Clause"
] | 5 | 2019-12-20T21:47:40.000Z | 2021-01-20T23:54:43.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
===================
prospect.viewer.cds
===================
Class containing all bokeh's ColumnDataSource objects needed in viewer.py
"""
import numpy as np
from pkg_resources import resource_filename
import bokeh.plotting a... | 45.37971 | 135 | 0.551993 | 1,809 | 15,656 | 4.614151 | 0.212825 | 0.031868 | 0.034144 | 0.03019 | 0.183539 | 0.12795 | 0.094645 | 0.085061 | 0.062777 | 0.062777 | 0 | 0.016928 | 0.324604 | 15,656 | 344 | 136 | 45.511628 | 0.772461 | 0.129918 | 0 | 0.152893 | 0 | 0 | 0.087838 | 0 | 0 | 0 | 0 | 0.002907 | 0.004132 | 1 | 0.03719 | false | 0 | 0.049587 | 0 | 0.099174 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b785c28b83b4fcf0dd190a336d9e93908aec9ec2 | 4,865 | py | Python | tests/test_32_read_registration.py | jschlyter/oidcendpoint | 3192e6043f00b22809f63329893c50bedbdeafbc | [
"Apache-2.0"
] | null | null | null | tests/test_32_read_registration.py | jschlyter/oidcendpoint | 3192e6043f00b22809f63329893c50bedbdeafbc | [
"Apache-2.0"
] | null | null | null | tests/test_32_read_registration.py | jschlyter/oidcendpoint | 3192e6043f00b22809f63329893c50bedbdeafbc | [
"Apache-2.0"
] | null | null | null | # -*- coding: latin-1 -*-
import json
import pytest
from oidcendpoint.endpoint_context import EndpointContext
from oidcendpoint.oidc.authorization import Authorization
from oidcendpoint.oidc.read_registration import RegistrationRead
from oidcendpoint.oidc.registration import Registration
from oidcendpoint.oidc.token i... | 35.510949 | 87 | 0.567523 | 454 | 4,865 | 5.790749 | 0.328194 | 0.048688 | 0.038037 | 0.039939 | 0.077976 | 0.019779 | 0 | 0 | 0 | 0 | 0 | 0.007797 | 0.288181 | 4,865 | 136 | 88 | 35.772059 | 0.751372 | 0.004728 | 0 | 0.03252 | 0 | 0 | 0.321281 | 0.055992 | 0 | 0 | 0 | 0 | 0.056911 | 1 | 0.01626 | false | 0.00813 | 0.073171 | 0 | 0.097561 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b786e3a7dfda3169fee4e233a099bad862bcb4ab | 621 | py | Python | 2013.6/2015.6.py | luisalvaradoar/olimpiada.ct | aea479116036abe1c9cca3b482fed61f275ed319 | [
"Apache-2.0"
] | null | null | null | 2013.6/2015.6.py | luisalvaradoar/olimpiada.ct | aea479116036abe1c9cca3b482fed61f275ed319 | [
"Apache-2.0"
] | null | null | null | 2013.6/2015.6.py | luisalvaradoar/olimpiada.ct | aea479116036abe1c9cca3b482fed61f275ed319 | [
"Apache-2.0"
] | null | null | null | def transaccion(retiro, saldo):
if retiro % 5 != 0:
return(saldo)
elif (saldo - retiro) < 0:
return(saldo)
elif saldo == retiro:
return(saldo)
else:
return(saldo - retiro - 0.5)
def main():
entrada = open("input.txt","r")
salida = open("output.txt","w")
T = ... | 19.40625 | 58 | 0.516908 | 79 | 621 | 4.063291 | 0.506329 | 0.137072 | 0.074766 | 0.099688 | 0.168224 | 0.168224 | 0 | 0 | 0 | 0 | 0 | 0.023364 | 0.310789 | 621 | 32 | 59 | 19.40625 | 0.726636 | 0.009662 | 0 | 0.136364 | 0 | 0 | 0.060163 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0 | 0 | 0.090909 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b78725b75722098cca7515b9adddc2dea857de17 | 538 | py | Python | hash.py | STR-Coding-Club/blockchain-demo | fae29a52d97c7595fa1e9d99527c4b034b721b8f | [
"MIT"
] | null | null | null | hash.py | STR-Coding-Club/blockchain-demo | fae29a52d97c7595fa1e9d99527c4b034b721b8f | [
"MIT"
] | null | null | null | hash.py | STR-Coding-Club/blockchain-demo | fae29a52d97c7595fa1e9d99527c4b034b721b8f | [
"MIT"
] | null | null | null | import hashlib, json
# def hash(to_hash):
# h = hashlib.md5()
# h.update(bytes(str(to_hash), 'utf-8'))
# return h.hexdigest()
def hash(to_hash, proof_of_work):
s = ''.join(str(_) for _ in (to_hash[:2])) #Add block number and previous hash to string
s += ''.join(str(_) for _ in (to_hash[2])) #Add l... | 24.454545 | 92 | 0.60223 | 89 | 538 | 3.47191 | 0.449438 | 0.097087 | 0.142395 | 0.084142 | 0.148867 | 0.148867 | 0.148867 | 0.148867 | 0.148867 | 0 | 0 | 0.02267 | 0.262082 | 538 | 21 | 93 | 25.619048 | 0.755668 | 0.418216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0.1 | 0 | 0.3 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b78782c19f15096aec39ba8d508066aa4591ae37 | 1,008 | py | Python | covid-modeling-master/generate_ma_csv.py | rdkap42/caedus-covid | f64a833bdf386708fcb9394f94026c48f8d474ee | [
"MIT"
] | 10 | 2020-03-17T21:21:50.000Z | 2020-04-30T02:30:47.000Z | covid-modeling-master/generate_ma_csv.py | rdkap42/caedus-covid | f64a833bdf386708fcb9394f94026c48f8d474ee | [
"MIT"
] | 5 | 2020-03-17T04:39:03.000Z | 2021-04-30T21:11:14.000Z | covid-modeling-master/generate_ma_csv.py | rdkap42/caedus-covid | f64a833bdf386708fcb9394f94026c48f8d474ee | [
"MIT"
] | null | null | null | import logging
import time
import numpy as np
from eda import ma_data, tx_data
from sir_fitting_us import seir_experiment, make_csv_from_tx_traj
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logger.info("Fitting model.")
# initial values taken from previous fit, used to seed MH sampler efficie... | 31.5 | 82 | 0.727183 | 161 | 1,008 | 4.31677 | 0.490683 | 0.060432 | 0.031655 | 0.03741 | 0.11223 | 0.063309 | 0.063309 | 0.063309 | 0.063309 | 0 | 0 | 0.046512 | 0.146825 | 1,008 | 31 | 83 | 32.516129 | 0.761628 | 0.178571 | 0 | 0 | 0 | 0 | 0.120219 | 0.028689 | 0 | 0 | 0 | 0 | 0.052632 | 1 | 0 | false | 0 | 0.263158 | 0 | 0.263158 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b78d491f7594796538d954c219bf7266a1779707 | 1,096 | py | Python | tests/init.py | touqir14/Emergent | 0782e1304702f3c95092953ce5da1d8ed69bbe6f | [
"MIT"
] | null | null | null | tests/init.py | touqir14/Emergent | 0782e1304702f3c95092953ce5da1d8ed69bbe6f | [
"MIT"
] | null | null | null | tests/init.py | touqir14/Emergent | 0782e1304702f3c95092953ce5da1d8ed69bbe6f | [
"MIT"
] | null | null | null | import pathlib
import os
import sys
from multiprocessing import resource_tracker
def modify_resource_tracker():
# See discussion: https://bugs.python.org/issue39959
# See source code: https://github.com/python/cpython/blob/master/Lib/multiprocessing/resource_tracker.py
rt = resource_tracker._resource_tracker
def... | 27.4 | 106 | 0.718978 | 136 | 1,096 | 5.558824 | 0.389706 | 0.15873 | 0.047619 | 0.042328 | 0.261905 | 0.261905 | 0.193122 | 0.193122 | 0.193122 | 0.193122 | 0 | 0.005537 | 0.176095 | 1,096 | 39 | 107 | 28.102564 | 0.831672 | 0.209854 | 0 | 0.230769 | 0 | 0 | 0.066279 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.153846 | 0 | 0.384615 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b78f243f121a8fb7c7eb83f7fd3d5745810817b9 | 12,586 | py | Python | data-processor/modules/wikia_handler.py | stephanietuerk/art-history-jobs | d10718ce7c8eb591cea9808945d01a2273425a58 | [
"MIT"
] | null | null | null | data-processor/modules/wikia_handler.py | stephanietuerk/art-history-jobs | d10718ce7c8eb591cea9808945d01a2273425a58 | [
"MIT"
] | null | null | null | data-processor/modules/wikia_handler.py | stephanietuerk/art-history-jobs | d10718ce7c8eb591cea9808945d01a2273425a58 | [
"MIT"
] | null | null | null | import csv
import re
import unicodedata
import bs4
import wikia
from modules import utils
from modules.config import Config
class WikiaHandler():
def __init__(self):
config = Config()
self.scraping_config = config.get_scraping_config()
self.parsing_config = config.get_parsing_config()
... | 44.161404 | 245 | 0.571667 | 1,543 | 12,586 | 4.400518 | 0.123785 | 0.038881 | 0.035346 | 0.025037 | 0.332842 | 0.266716 | 0.226951 | 0.213255 | 0.194698 | 0.113549 | 0 | 0.011799 | 0.326633 | 12,586 | 284 | 246 | 44.316901 | 0.789381 | 0.01017 | 0 | 0.206478 | 0 | 0 | 0.087047 | 0.008994 | 0 | 0 | 0 | 0 | 0 | 1 | 0.11336 | false | 0 | 0.02834 | 0.008097 | 0.263158 | 0.024292 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b78f91bde4f8867fdadaaee058845f1ee62f598c | 3,949 | py | Python | ucsmsdk/mometa/cimcvmedia/CimcvmediaExtMgmtRuleEntry.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/cimcvmedia/CimcvmediaExtMgmtRuleEntry.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/cimcvmedia/CimcvmediaExtMgmtRuleEntry.py | anoop1984/python_sdk | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for CimcvmediaExtMgmtRuleEntry ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class CimcvmediaExtMgmtRuleEntryConsts():
MOUNT_PROTOCOL_CIFS = "cifs... | 58.940299 | 248 | 0.66042 | 436 | 3,949 | 5.772936 | 0.254587 | 0.028605 | 0.143027 | 0.150179 | 0.24712 | 0.205006 | 0.131108 | 0.128725 | 0.128725 | 0.081049 | 0 | 0.03522 | 0.158774 | 3,949 | 66 | 249 | 59.833333 | 0.722456 | 0.033426 | 0 | 0 | 0 | 0.076923 | 0.303548 | 0.130092 | 0 | 0 | 0.005519 | 0 | 0 | 1 | 0.019231 | false | 0 | 0.076923 | 0 | 0.326923 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b791735533ee827f9ea58cc60b007fcd8bb18dbd | 2,295 | py | Python | LungCancer.py | SpiroGanas/Lung-Cancer-Machine-Learning | 4e38b3df9b560194f67ab03e9aaefad6c84216db | [
"MIT"
] | 1 | 2019-04-28T02:25:32.000Z | 2019-04-28T02:25:32.000Z | LungCancer.py | SpiroGanas/Lung-Cancer-Machine-Learning | 4e38b3df9b560194f67ab03e9aaefad6c84216db | [
"MIT"
] | null | null | null | LungCancer.py | SpiroGanas/Lung-Cancer-Machine-Learning | 4e38b3df9b560194f67ab03e9aaefad6c84216db | [
"MIT"
] | null | null | null | # Spiro Ganas
# 9/27/17
#
# Python 3 script to
######### NOTES ########################################
# 1. Each "slice" is a 512x512 image, stored in a single .dcm file.
# 2. A 3-dimensional CT Scan consists of between 94 and 541 slices (according to the Stage 1 data).
# 3. We need to rescale all the CT scans so... | 27.650602 | 127 | 0.662309 | 337 | 2,295 | 4.412463 | 0.504451 | 0.0269 | 0.047075 | 0.020175 | 0.092804 | 0.03228 | 0 | 0 | 0 | 0 | 0 | 0.022164 | 0.174292 | 2,295 | 82 | 128 | 27.987805 | 0.762533 | 0.461002 | 0 | 0 | 0 | 0 | 0.126815 | 0.025169 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.033333 | 0.2 | 0 | 0.2 | 0.2 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b791ac3d3021c73d2b06aeec225eba82f7ecf599 | 852 | py | Python | setup.py | LEGO-Robotics/aistorms | abfb6b978215507d331d9ade764310ee9d8c9448 | [
"MIT"
] | 1 | 2020-06-06T22:47:09.000Z | 2020-06-06T22:47:09.000Z | setup.py | AntoniLuongPham/LEGO-Mindstorms-AI | abfb6b978215507d331d9ade764310ee9d8c9448 | [
"MIT"
] | null | null | null | setup.py | AntoniLuongPham/LEGO-Mindstorms-AI | abfb6b978215507d331d9ade764310ee9d8c9448 | [
"MIT"
] | 1 | 2020-06-08T15:53:42.000Z | 2020-06-08T15:53:42.000Z | import json
import os
from setuptools import find_packages, setup
PACKAGE_NAMESPACE_NAME = 'aistorms'
METADATA_FILE_NAME = 'metadata.json'
REQUIREMENTS_FILE_NAME = 'requirements.txt'
_metadata = \
json.load(
open(os.path.join(
os.path.dirname(__file__),
PACKAGE_NAMESPAC... | 24.342857 | 60 | 0.676056 | 91 | 852 | 5.967033 | 0.43956 | 0.058932 | 0.073665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.207746 | 852 | 34 | 61 | 25.058824 | 0.804444 | 0 | 0 | 0 | 0 | 0 | 0.124413 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.115385 | 0 | 0.115385 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7936727533c1b6e64a5988a2f89fc499bcee832 | 23,430 | py | Python | tests/torch/pruning/test_model_pruning_analysis.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | null | null | null | tests/torch/pruning/test_model_pruning_analysis.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 1 | 2021-07-23T07:46:52.000Z | 2021-07-23T07:46:52.000Z | tests/torch/pruning/test_model_pruning_analysis.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | 51.721854 | 119 | 0.660606 | 2,415 | 23,430 | 6.068737 | 0.103934 | 0.032001 | 0.01426 | 0.023199 | 0.558474 | 0.465748 | 0.384348 | 0.310931 | 0.258938 | 0.253616 | 0 | 0.023491 | 0.260521 | 23,430 | 452 | 120 | 51.836283 | 0.822406 | 0.040077 | 0 | 0.28771 | 0 | 0 | 0.183579 | 0.163453 | 0 | 0 | 0 | 0 | 0.067039 | 1 | 0.047486 | false | 0 | 0.106145 | 0.011173 | 0.181564 | 0.002793 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b794d1e8ea63cc3bf3146f5e45ab36528d92826b | 22,826 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_wanphy_ui_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_wanphy_ui_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_wanphy_ui_oper.py | tkamata-test/ydk-py | b637e7853a8edbbd31fbc05afa3aa4110b31c5f9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ Cisco_IOS_XR_wanphy_ui_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR wanphy\-ui package operational data.
This module contains definitions
for the following management objects\:
wanphy\: WANPHY operational data
Copyright (c) 2013\-2016 by Cisco Systems, Inc.
All rights reserved.... | 30.434667 | 293 | 0.423596 | 2,019 | 22,826 | 4.575037 | 0.090144 | 0.033128 | 0.047743 | 0.0747 | 0.675327 | 0.657248 | 0.628018 | 0.536646 | 0.38021 | 0.283425 | 0 | 0.05715 | 0.49943 | 22,826 | 749 | 294 | 30.4753 | 0.751269 | 0.32095 | 0 | 0.461538 | 0 | 0.008097 | 0.058898 | 0.035104 | 0 | 0 | 0 | 0 | 0 | 1 | 0.089069 | false | 0 | 0.044534 | 0.008097 | 0.469636 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b79500b1906f3f8e77f736bcb5d3e403aa5d9a7d | 773 | py | Python | test/unit/solver/test_lamb.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | 23 | 2021-12-08T02:35:01.000Z | 2022-03-16T02:23:19.000Z | test/unit/solver/test_lamb.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | 4 | 2021-12-23T11:31:17.000Z | 2022-02-28T01:35:31.000Z | test/unit/solver/test_lamb.py | megvii-research/basecls | 6b395a0a888370b4523764afb78a5a7634a3f6cd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
import megengine as mge
import numpy as np
import pytest
from megengine.autodiff import GradManager
from basecls.solver.optimizer import LAMB
@pytest.mark.parametrize("weight_decay", [0.0, 0.001])
@pytest.mark.parametrize("betas", [(0.... | 26.655172 | 67 | 0.633894 | 119 | 773 | 4.058824 | 0.546218 | 0.091097 | 0.086957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052632 | 0.213454 | 773 | 28 | 68 | 27.607143 | 0.741776 | 0.100906 | 0 | 0 | 0 | 0 | 0.044733 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0 | 0.227273 | 0 | 0.272727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7961cc47beaac8f9cce44564f475f951b32b24b | 2,180 | py | Python | onenote-dump/__main__.py | genericmoniker/onenote-dump | 78b2ee2dcf854f6bc989d3081f42c97f245e49cc | [
"MIT"
] | 39 | 2019-07-17T06:08:56.000Z | 2022-03-22T09:48:58.000Z | onenote-dump/__main__.py | nicknickel/onenote-dump | 84607f89f8c14c51796ab660dc0e741af3ccf55c | [
"MIT"
] | 5 | 2020-07-02T02:44:38.000Z | 2021-11-11T18:16:13.000Z | onenote-dump/__main__.py | nicknickel/onenote-dump | 84607f89f8c14c51796ab660dc0e741af3ccf55c | [
"MIT"
] | 6 | 2020-11-01T12:46:56.000Z | 2022-01-12T22:24:50.000Z | import argparse
import logging
import os
import pathlib
import time
import log
import onenote_auth
import onenote
import pipeline
logger = logging.getLogger()
def main():
args = parse_args()
if args.verbose:
log.setup_logging(logging.DEBUG)
else:
log.setup_logging(logging.INFO)
# Al... | 27.25 | 76 | 0.624771 | 283 | 2,180 | 4.650177 | 0.388693 | 0.041033 | 0.077508 | 0.034195 | 0.052432 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003086 | 0.256881 | 2,180 | 79 | 77 | 27.594937 | 0.809259 | 0.029817 | 0 | 0.09375 | 0 | 0 | 0.166193 | 0.012784 | 0 | 0 | 0 | 0 | 0 | 1 | 0.03125 | false | 0 | 0.140625 | 0 | 0.1875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7971aac602f7d60f9d06ecc4d523b5988cef546 | 10,391 | py | Python | venv/lib/python3.8/site-packages/ansible_collections/community/aws/tests/unit/plugins/modules/test_data_pipeline.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | 7 | 2021-11-16T04:05:42.000Z | 2022-02-19T21:14:29.000Z | venv/lib/python3.8/site-packages/ansible_collections/community/aws/tests/unit/plugins/modules/test_data_pipeline.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | 1 | 2022-03-12T02:25:26.000Z | 2022-03-12T02:25:26.000Z | venv/lib/python3.8/site-packages/ansible_collections/community/aws/tests/unit/plugins/modules/test_data_pipeline.py | saeedya/docker-ansible | 6fb0cfc6bc4a5925b21380952a5a4502ec02119a | [
"Apache-2.0"
] | 1 | 2022-03-01T05:43:07.000Z | 2022-03-01T05:43:07.000Z | # (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import collections
import os
import json
import p... | 40.909449 | 128 | 0.698008 | 1,212 | 10,391 | 5.767327 | 0.188944 | 0.096137 | 0.042918 | 0.081545 | 0.623891 | 0.567525 | 0.525179 | 0.475393 | 0.444921 | 0.390987 | 0 | 0.010429 | 0.187951 | 10,391 | 253 | 129 | 41.071146 | 0.817966 | 0.091425 | 0 | 0.39548 | 0 | 0 | 0.189008 | 0.060912 | 0 | 0 | 0 | 0 | 0.129944 | 1 | 0.135593 | false | 0 | 0.056497 | 0 | 0.19774 | 0.00565 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7977b33c0e4a7ba789fa84d50fd2df4ed4339db | 3,433 | py | Python | Janela/Cadastro_clientes/Clientes.py | marcosj046/Treinando-Python-Tkinter | 7b88a6b6afba46e6c013b65b952723047c173901 | [
"MIT"
] | null | null | null | Janela/Cadastro_clientes/Clientes.py | marcosj046/Treinando-Python-Tkinter | 7b88a6b6afba46e6c013b65b952723047c173901 | [
"MIT"
] | null | null | null | Janela/Cadastro_clientes/Clientes.py | marcosj046/Treinando-Python-Tkinter | 7b88a6b6afba46e6c013b65b952723047c173901 | [
"MIT"
] | null | null | null | import sqlite3
import tkinter as tk
import pandas as pd
#----------------------------------------------
#Para criação do banco de dados retira o comentário (#) da linha 9 à 23 somente a primeira vez que rodar o cód,
#depois, basta comentar novamente.
#Criando o Banco de Dados
# conexao = sqlite3.connect('Clientes.db'... | 33.990099 | 171 | 0.669677 | 469 | 3,433 | 4.818763 | 0.287846 | 0.044248 | 0.044248 | 0.053097 | 0.269469 | 0.189823 | 0.166814 | 0.103097 | 0.076549 | 0.076549 | 0 | 0.029713 | 0.147102 | 3,433 | 101 | 172 | 33.990099 | 0.742145 | 0.312263 | 0 | 0.153846 | 0 | 0 | 0.132359 | 0.015041 | 0 | 0 | 0 | 0.009901 | 0 | 1 | 0.038462 | false | 0 | 0.057692 | 0 | 0.096154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b79823a97f320a9bd4990bfd614e964f079da76e | 14,382 | py | Python | pygitbucket/client.py | SimiCode/pygitbucket | 46a22fcc0292231905eb4e0e2da47f8a85743bbd | [
"MIT"
] | 1 | 2021-07-04T19:45:05.000Z | 2021-07-04T19:45:05.000Z | pygitbucket/client.py | SimiCode/pygitbucket | 46a22fcc0292231905eb4e0e2da47f8a85743bbd | [
"MIT"
] | null | null | null | pygitbucket/client.py | SimiCode/pygitbucket | 46a22fcc0292231905eb4e0e2da47f8a85743bbd | [
"MIT"
] | null | null | null | import math
import requests
from pygitbucket.exceptions import (
UnknownError,
InvalidIDError,
NotFoundIDError,
NotAuthenticatedError,
PermissionError,
)
class Client:
BASE_URL = "https://api.bitbucket.org/"
def __init__(self, user: str, password: str, owner=None):
"""Initial ses... | 28.821643 | 117 | 0.578779 | 1,531 | 14,382 | 5.30307 | 0.16917 | 0.105185 | 0.038798 | 0.035103 | 0.601675 | 0.546496 | 0.50351 | 0.466806 | 0.434536 | 0.410026 | 0 | 0.007302 | 0.333403 | 14,382 | 498 | 118 | 28.879518 | 0.839574 | 0.331456 | 0 | 0.335 | 0 | 0 | 0.173296 | 0.145147 | 0 | 0 | 0 | 0 | 0 | 1 | 0.145 | false | 0.03 | 0.015 | 0.01 | 0.315 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b798b33e304086ef9c7efe2c716e2e87dfcb993a | 3,594 | py | Python | viroconcom/read_write.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | null | null | null | viroconcom/read_write.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | 1 | 2020-05-18T11:06:28.000Z | 2020-05-18T11:06:28.000Z | viroconcom/read_write.py | adrdrew/viroconcom | 3eb748ba8e3e076eddd174a0fcdfee3917aa4045 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Reads datasets, reads and writes contour coordinates.
"""
import numpy as np
import csv
def read_ecbenchmark_dataset(path='datasets/1year_dataset_A.txt'):
"""
Reads a 2D dataset that uses a an ASCI format with ';' as a seperator.
This format... | 31.526316 | 107 | 0.574012 | 470 | 3,594 | 4.321277 | 0.261702 | 0.024618 | 0.047267 | 0.064008 | 0.56967 | 0.471689 | 0.39291 | 0.379124 | 0.350566 | 0.327917 | 0 | 0.011466 | 0.320534 | 3,594 | 113 | 108 | 31.80531 | 0.820229 | 0.502226 | 0 | 0.47619 | 0 | 0 | 0.046335 | 0.019364 | 0 | 0 | 0 | 0 | 0 | 1 | 0.071429 | false | 0 | 0.047619 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b798e6d01b3ed050802b1fbfc6ef1f267c2dd36a | 601 | py | Python | check_python_install/check_numba.py | sdpython/_check_python_install | 06a34e3b8559370c8c41b655ed2acc72c7f1bf34 | [
"MIT"
] | null | null | null | check_python_install/check_numba.py | sdpython/_check_python_install | 06a34e3b8559370c8c41b655ed2acc72c7f1bf34 | [
"MIT"
] | 2 | 2019-11-07T18:11:18.000Z | 2021-01-02T11:49:38.000Z | check_python_install/check_numba.py | sdpython/_check_python_install | 06a34e3b8559370c8c41b655ed2acc72c7f1bf34 | [
"MIT"
] | null | null | null | """
@file
@brief Test for :epkg:`cartopy`.
"""
import numpy
import numba
@numba.jit(nopython=True, parallel=True)
def logistic_regression(Y, X, w, iterations):
"Fits a logistic regression."
for _ in range(iterations):
w -= numpy.dot(((1.0 / (1.0 + numpy.exp(-Y * numpy.dot(X, w))) - 1.0) * Y), X)
r... | 24.04 | 86 | 0.62396 | 92 | 601 | 4.032609 | 0.423913 | 0.145553 | 0.121294 | 0.107817 | 0.113208 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026971 | 0.198003 | 601 | 24 | 87 | 25.041667 | 0.742739 | 0.166389 | 0 | 0 | 0 | 0 | 0.05336 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.153846 | 0 | 0.461538 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b799b353c37ba22ae18a337e8553a686eb6d2908 | 793 | py | Python | app/utils/to_file.py | MichelHanzenScheeren/SpectralClustering | be0a2645b965442d57c1fb016556d3003921f84a | [
"MIT"
] | null | null | null | app/utils/to_file.py | MichelHanzenScheeren/SpectralClustering | be0a2645b965442d57c1fb016556d3003921f84a | [
"MIT"
] | null | null | null | app/utils/to_file.py | MichelHanzenScheeren/SpectralClustering | be0a2645b965442d57c1fb016556d3003921f84a | [
"MIT"
] | null | null | null | class ToFile:
""" Classe que recebe uma instância de dados e os salva em um arquivo de saída. """
def __init__(self, path, data):
maxs = [len(x) + 4 for x in data.legend]
with open(path, 'w') as file:
file.write('id' + (' ' * 6))
for index, element in enumerate(data.legend):
file.write(... | 37.761905 | 85 | 0.538462 | 111 | 793 | 3.810811 | 0.45045 | 0.170213 | 0.070922 | 0.080378 | 0.141844 | 0.141844 | 0 | 0 | 0 | 0 | 0 | 0.010417 | 0.273644 | 793 | 20 | 86 | 39.65 | 0.723958 | 0.094578 | 0 | 0.111111 | 0 | 0 | 0.112676 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.055556 | false | 0 | 0 | 0 | 0.111111 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b79c02ce02e6d31db2455c7ba97e981d1dda98d5 | 3,564 | py | Python | sudoku/sudoku.py | Ostap2003/backtracking-team-project | 2a6fb2fc80dcdd286c76dbc3b546baf452098d98 | [
"MIT"
] | null | null | null | sudoku/sudoku.py | Ostap2003/backtracking-team-project | 2a6fb2fc80dcdd286c76dbc3b546baf452098d98 | [
"MIT"
] | null | null | null | sudoku/sudoku.py | Ostap2003/backtracking-team-project | 2a6fb2fc80dcdd286c76dbc3b546baf452098d98 | [
"MIT"
] | null | null | null |
from pprint import pprint
'''The module has class Grid for solving sudoku.
Grid should be given as a list of integers or a path to a file.
'''
class Grid():
'''Class for solving sudoku.
'''
def __init__(self, path= None, grid= None) -> None:
'''Initialize grid, columns, squares.
'''
... | 28.741935 | 81 | 0.45679 | 501 | 3,564 | 3.165669 | 0.191617 | 0.037831 | 0.030265 | 0.030265 | 0.218159 | 0.127995 | 0.095839 | 0.046658 | 0.03657 | 0.03657 | 0 | 0.059235 | 0.398429 | 3,564 | 123 | 82 | 28.97561 | 0.680504 | 0.191077 | 0 | 0.136986 | 0 | 0 | 0.012123 | 0 | 0 | 0 | 0 | 0 | 0.027397 | 1 | 0.082192 | false | 0 | 0.013699 | 0 | 0.191781 | 0.013699 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7a3ac719d785e13f7265ad9a05f4b664dd99826 | 3,685 | py | Python | MIssions_to_Mars/scrape_mars_mission.py | pwickliff1/web-scraping-challenge | 56e2b5e6905c17fce762aeb2ae1ad8cb0f48f8d6 | [
"ADSL"
] | null | null | null | MIssions_to_Mars/scrape_mars_mission.py | pwickliff1/web-scraping-challenge | 56e2b5e6905c17fce762aeb2ae1ad8cb0f48f8d6 | [
"ADSL"
] | null | null | null | MIssions_to_Mars/scrape_mars_mission.py | pwickliff1/web-scraping-challenge | 56e2b5e6905c17fce762aeb2ae1ad8cb0f48f8d6 | [
"ADSL"
] | null | null | null | # Dependencies
from bs4 import BeautifulSoup
import requests
import re
import pandas as pd
def scrape():
mars_data = {}
# Url of website to be scraped
url = 'https://mars.nasa.gov/news/'
response = requests.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
# get the lates... | 35.095238 | 172 | 0.686567 | 498 | 3,685 | 4.929719 | 0.325301 | 0.040326 | 0.038697 | 0.039104 | 0.292057 | 0.235438 | 0.193075 | 0.175967 | 0.175967 | 0.175967 | 0 | 0.014676 | 0.186431 | 3,685 | 104 | 173 | 35.432692 | 0.804203 | 0.179104 | 0 | 0.132075 | 0 | 0.132075 | 0.432333 | 0.05 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018868 | false | 0 | 0.075472 | 0 | 0.113208 | 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 |
b7a9d3a60ea32292f1f1a315f0e465e4cf861159 | 236 | py | Python | configs/semantic_guided/CE.py | hukkelas/full_body_anonymization | c61745b137c84ffb742ef6ab2f4721db4acf22b7 | [
"MIT"
] | 27 | 2022-01-06T20:15:24.000Z | 2022-03-29T11:54:49.000Z | configs/semantic_guided/CE.py | hukkelas/full_body_anonymization | c61745b137c84ffb742ef6ab2f4721db4acf22b7 | [
"MIT"
] | 2 | 2022-03-17T06:04:23.000Z | 2022-03-25T08:50:57.000Z | configs/semantic_guided/CE.py | hukkelas/full_body_anonymization | c61745b137c84ffb742ef6ab2f4721db4acf22b7 | [
"MIT"
] | 2 | 2022-01-07T13:16:59.000Z | 2022-01-16T02:10:50.000Z | _base_config_ = ["base.py"]
generator = dict(
input_cse=True,
use_cse=True
)
discriminator=dict(
pred_only_cse=False,
pred_only_semantic=True
)
loss = dict(
gan_criterion=dict(type="segmentation", seg_weight=.1)
)
| 15.733333 | 58 | 0.699153 | 32 | 236 | 4.8125 | 0.6875 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005128 | 0.173729 | 236 | 14 | 59 | 16.857143 | 0.784615 | 0 | 0 | 0 | 0 | 0 | 0.080508 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7ac37d5a23a4e9b74f4c14b649516c082ec539d | 676 | py | Python | test/compiler/test-encode.py | xupingmao/minipy | 5bce2f238925eb92fe9ff7d935f59ef68daa257a | [
"MIT"
] | 52 | 2016-07-11T10:14:35.000Z | 2021-12-09T09:10:43.000Z | test/compiler/test-encode.py | xupingmao/snake | c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4 | [
"MIT"
] | 13 | 2016-07-24T13:50:37.000Z | 2019-03-02T06:56:18.000Z | test/compiler/test-encode.py | xupingmao/snake | c956f151ed1ebd2faeaf1565352b59ca5a8fa0b4 | [
"MIT"
] | 9 | 2017-01-27T10:46:04.000Z | 2021-12-09T09:10:46.000Z | # -*- coding:utf-8 -*-
# @author xupingmao <578749341@qq.com>
# @since 2020/10/20 00:19:47
# @modified 2020/10/20 00:42:52
import sys
sys.path.append("src/python")
from mp_encode import *
def test_compile(fname):
input_fname = "test/compiler/case/%s-input.py" % fname
output_fname = "test/compiler/case/%s-o... | 25.037037 | 67 | 0.668639 | 101 | 676 | 4.376238 | 0.554455 | 0.099548 | 0.036199 | 0.045249 | 0.099548 | 0 | 0 | 0 | 0 | 0 | 0 | 0.067496 | 0.16716 | 676 | 26 | 68 | 26 | 0.717584 | 0.168639 | 0 | 0 | 0 | 0 | 0.276481 | 0.111311 | 0 | 0 | 0 | 0 | 0.066667 | 1 | 0.066667 | false | 0 | 0.133333 | 0 | 0.2 | 0.066667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7ad32170df3a150ccda1de3243e006af407c590 | 3,719 | py | Python | paragen/optim/__init__.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | null | null | null | paragen/optim/__init__.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | null | null | null | paragen/optim/__init__.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
from inspect import getfullargspec
import importlib
import json
import os
import logging
logger = logging.getLogger(__name__)
from torch.optim.optimizer import Optimizer
from paragen.optim.optimizer import Optimizer
from paragen.utils.rate_schedulers import create_rate_scheduler
from paragen... | 35.419048 | 112 | 0.633235 | 440 | 3,719 | 5.154545 | 0.284091 | 0.05291 | 0.028219 | 0.02381 | 0.179894 | 0.121693 | 0.056437 | 0.056437 | 0.056437 | 0.029101 | 0 | 0.004795 | 0.271041 | 3,719 | 104 | 113 | 35.759615 | 0.831796 | 0 | 0 | 0.046512 | 0 | 0 | 0.070199 | 0.006455 | 0 | 0 | 0 | 0 | 0 | 1 | 0.011628 | false | 0.023256 | 0.186047 | 0 | 0.209302 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7adb4099781c23875a3639ae37c4e4a5bb88239 | 2,860 | py | Python | joyvillage/joy/views.py | IreneMercy/Joy-Village-Backup | f038e33aa5c28337bc20c6fcd3273ef37d283564 | [
"MIT"
] | null | null | null | joyvillage/joy/views.py | IreneMercy/Joy-Village-Backup | f038e33aa5c28337bc20c6fcd3273ef37d283564 | [
"MIT"
] | 9 | 2021-03-19T09:58:55.000Z | 2022-03-12T00:22:50.000Z | joyvillage/joy/views.py | IreneMercy/Joy-Foundation | f038e33aa5c28337bc20c6fcd3273ef37d283564 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.shortcuts import render, redirect
from django.http import HttpResponse, HttpResponseRedirect
from .models import Events, Gallery, News, Careers, Partners
from django.core.mail import send_mail,BadHeaderError
from django.conf import settings
from.forms import ContactFo... | 29.484536 | 103 | 0.640909 | 316 | 2,860 | 5.702532 | 0.243671 | 0.059933 | 0.094895 | 0.024417 | 0.369589 | 0.369589 | 0.369589 | 0.369589 | 0.369589 | 0.369589 | 0 | 0.000462 | 0.242657 | 2,860 | 96 | 104 | 29.791667 | 0.831487 | 0 | 0 | 0.425 | 0 | 0 | 0.11958 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.1 | 0.0375 | 0.375 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7aff83ef7243e9bfde2d005caee3accba55ac07 | 612 | py | Python | dataprep/tests/data_connector/test_integration.py | dylanzxc/dataprep | 21ef62936eeec28495763f35fcb3cb07f71de6f6 | [
"MIT"
] | 1 | 2020-12-18T13:16:38.000Z | 2020-12-18T13:16:38.000Z | dataprep/tests/data_connector/test_integration.py | bexxmodd/dataprep | 3aaa626bfaf9270cf56ffb70280cbcd8031f3ac3 | [
"MIT"
] | null | null | null | dataprep/tests/data_connector/test_integration.py | bexxmodd/dataprep | 3aaa626bfaf9270cf56ffb70280cbcd8031f3ac3 | [
"MIT"
] | null | null | null | from ...data_connector import Connector
from os import environ
def test_data_connector() -> None:
token = environ["DATAPREP_DATA_CONNECTOR_YELP_TOKEN"]
dc = Connector("yelp", _auth={"access_token": token})
df = dc.query("businesses", term="ramen", location="vancouver")
assert len(df) > 0
dc.info... | 24.48 | 81 | 0.666667 | 79 | 612 | 5.012658 | 0.405063 | 0.090909 | 0.068182 | 0.143939 | 0.401515 | 0.280303 | 0.280303 | 0 | 0 | 0 | 0 | 0.033932 | 0.181373 | 612 | 24 | 82 | 25.5 | 0.756487 | 0 | 0 | 0 | 0 | 0 | 0.215686 | 0.055556 | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0.071429 | false | 0 | 0.142857 | 0 | 0.214286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b0446dcbe64c12f7cc04baa8e64d8c7155c9fb | 6,294 | py | Python | plot_helpers.py | aspuru-guzik-group/QNODE | 1ec3767c7b574eaeb7b0ec05d1be54983f8972bd | [
"MIT"
] | 14 | 2021-11-06T19:32:56.000Z | 2022-02-08T19:53:28.000Z | plot_helpers.py | aspuru-guzik-group/QNODE | 1ec3767c7b574eaeb7b0ec05d1be54983f8972bd | [
"MIT"
] | null | null | null | plot_helpers.py | aspuru-guzik-group/QNODE | 1ec3767c7b574eaeb7b0ec05d1be54983f8972bd | [
"MIT"
] | null | null | null | import os
import torch
import numpy as np
import math
import matplotlib.pyplot as plt
from matplotlib import cm
from qutip import *
import imageio
plt.rcParams['axes.labelsize'] = 16
from matplotlib import rc
rc('font', **{'family': 'serif', 'serif': ['Computer Modern']})
rc('text', usetex=True)
def animate_recon(xt,... | 35.965714 | 167 | 0.58659 | 910 | 6,294 | 3.978022 | 0.223077 | 0.024309 | 0.033425 | 0.038674 | 0.450829 | 0.398343 | 0.375138 | 0.343923 | 0.298343 | 0.274586 | 0 | 0.023561 | 0.2245 | 6,294 | 174 | 168 | 36.172414 | 0.718091 | 0.06959 | 0 | 0.306122 | 0 | 0 | 0.122123 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.095238 | false | 0 | 0.061224 | 0 | 0.210884 | 0.013605 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b1005f9392e0dbc05eef28e9be52e84c7d4a58 | 17,348 | py | Python | state.py | Lekensteyn/wgll | 11ac7925687bfc1866d3702f821230233fe3a8de | [
"MIT"
] | 1 | 2021-11-27T17:29:43.000Z | 2021-11-27T17:29:43.000Z | state.py | Lekensteyn/wgll | 11ac7925687bfc1866d3702f821230233fe3a8de | [
"MIT"
] | null | null | null | state.py | Lekensteyn/wgll | 11ac7925687bfc1866d3702f821230233fe3a8de | [
"MIT"
] | null | null | null | # State tracking for WireGuard protocol operations.
# Author: Peter Wu <peter@lekensteyn.nl>
# Licensed under the MIT license <http://opensource.org/licenses/MIT>.
import base64
import hashlib
import inspect
import socket
import traceback
from noise_wg import NoiseWG, crypto_scalarmult_base, aead_encrypt, aead_decryp... | 34.557769 | 85 | 0.606006 | 2,213 | 17,348 | 4.591957 | 0.131496 | 0.024601 | 0.016237 | 0.008266 | 0.286263 | 0.176245 | 0.139933 | 0.103523 | 0.082661 | 0.058453 | 0 | 0.020823 | 0.274729 | 17,348 | 501 | 86 | 34.626747 | 0.786838 | 0.057528 | 0 | 0.167095 | 0 | 0.005141 | 0.070063 | 0.002145 | 0 | 0 | 0 | 0 | 0.025707 | 1 | 0.156812 | false | 0 | 0.015424 | 0.046272 | 0.336761 | 0.012853 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b264987ed766841bcdbbf47f7266aa100f16c2 | 8,942 | py | Python | corehq/ex-submodules/couchforms/tests/test_analytics.py | caktus/commcare-hq | fae9c0f792b4889b768252d3895d9d1884ce0d3b | [
"BSD-3-Clause"
] | null | null | null | corehq/ex-submodules/couchforms/tests/test_analytics.py | caktus/commcare-hq | fae9c0f792b4889b768252d3895d9d1884ce0d3b | [
"BSD-3-Clause"
] | 40 | 2021-07-20T15:55:08.000Z | 2022-03-25T17:21:36.000Z | corehq/ex-submodules/couchforms/tests/test_analytics.py | caktus/commcare-hq | fae9c0f792b4889b768252d3895d9d1884ce0d3b | [
"BSD-3-Clause"
] | null | null | null | import datetime
import uuid
from django.test import TestCase
from mock import patch
from requests import ConnectionError
from couchforms.analytics import (
app_has_been_submitted_to_in_last_30_days,
domain_has_submission_in_last_30_days,
get_all_xmlns_app_id_pairs_submitted_to_in_domain,
get_exports_b... | 40.645455 | 113 | 0.674122 | 1,142 | 8,942 | 4.921191 | 0.133975 | 0.030961 | 0.039858 | 0.029893 | 0.55605 | 0.467616 | 0.418861 | 0.345018 | 0.291281 | 0.285409 | 0 | 0.007594 | 0.219526 | 8,942 | 219 | 114 | 40.83105 | 0.797679 | 0 | 0 | 0.278947 | 0 | 0 | 0.129166 | 0.082756 | 0 | 0 | 0 | 0 | 0.052632 | 1 | 0.078947 | false | 0 | 0.105263 | 0 | 0.210526 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b3ac20c4a0978bc24a666dd7cd9ac25c00bc3a | 7,486 | py | Python | amck/imat/download_data.py | aaronmckinstry706/imaterialist | ebed3f3bd9e231f0852aa30c7bbfafe94d5dbce1 | [
"MIT"
] | null | null | null | amck/imat/download_data.py | aaronmckinstry706/imaterialist | ebed3f3bd9e231f0852aa30c7bbfafe94d5dbce1 | [
"MIT"
] | null | null | null | amck/imat/download_data.py | aaronmckinstry706/imaterialist | ebed3f3bd9e231f0852aa30c7bbfafe94d5dbce1 | [
"MIT"
] | null | null | null | # Parts of code taken from https://www.kaggle.com/aloisiodn/python-3-download-multi-proc-prog-bar-resume by Dourado.
# Improvements on the original script:
# * you can choose which dataset to download;
# * uses threads instead of processes;
# * unpacks data into .../label/id.jpg directory structure, which can be ... | 41.821229 | 118 | 0.716137 | 1,024 | 7,486 | 5.017578 | 0.259766 | 0.045543 | 0.014013 | 0.023355 | 0.323667 | 0.264111 | 0.225963 | 0.199494 | 0.199494 | 0.183924 | 0 | 0.006487 | 0.176329 | 7,486 | 178 | 119 | 42.05618 | 0.826792 | 0.107534 | 0 | 0.251908 | 0 | 0.007634 | 0.191962 | 0.014997 | 0 | 0 | 0 | 0 | 0 | 1 | 0.022901 | false | 0.007634 | 0.091603 | 0 | 0.122137 | 0.007634 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b56be6d7b0d5e174db26b106b5f7914f624c31 | 2,437 | py | Python | tweet/common.py | skiwheelr/URS | 45746c945af2ea62a5ddb675c6a8e4e2fe4b5a93 | [
"MIT"
] | 4 | 2021-02-15T02:02:38.000Z | 2022-03-04T16:38:44.000Z | tweet/common.py | skiwheelr/URS | 45746c945af2ea62a5ddb675c6a8e4e2fe4b5a93 | [
"MIT"
] | null | null | null | tweet/common.py | skiwheelr/URS | 45746c945af2ea62a5ddb675c6a8e4e2fe4b5a93 | [
"MIT"
] | 2 | 2021-02-11T01:10:27.000Z | 2021-02-25T19:20:04.000Z | all
import tweepy, config, users, re, groupy
from tweepy import OAuthHandler
from tweepy import API
print(tweepy.__version__)
auth = OAuthHandler(config.consumer_key, config.consumer_secret)
auth.set_access_token(config.access_token,config.access_token_secret)
api = tweepy.API(auth)
from groupy.client import Client
cli... | 33.847222 | 120 | 0.636849 | 336 | 2,437 | 4.491071 | 0.235119 | 0.053678 | 0.071571 | 0.095427 | 0.616965 | 0.534129 | 0.493042 | 0.493042 | 0.493042 | 0.493042 | 0 | 0.012459 | 0.242511 | 2,437 | 71 | 121 | 34.323944 | 0.804984 | 0.116126 | 0 | 0.277778 | 0 | 0 | 0.082517 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018519 | false | 0 | 0.074074 | 0 | 0.092593 | 0.111111 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b6119291ad7a11b8a2999460f70e3f10db60c8 | 8,486 | py | Python | crystalpy/examples/PlotData1D.py | oasys-kit/crystalpy | 4852851c622ef914844178577dea4075e92cd8dd | [
"MIT"
] | null | null | null | crystalpy/examples/PlotData1D.py | oasys-kit/crystalpy | 4852851c622ef914844178577dea4075e92cd8dd | [
"MIT"
] | null | null | null | crystalpy/examples/PlotData1D.py | oasys-kit/crystalpy | 4852851c622ef914844178577dea4075e92cd8dd | [
"MIT"
] | null | null | null | """
---OK---
"""
from collections import OrderedDict
import copy
import numpy as np
from crystalpy.examples.Values import Interval
class PlotData1D(object):
"""
Represents a 1D plot. The graph data together with related information.
"""
def __init__(self, title, title_x_axis, title_y_axis):
... | 32.389313 | 111 | 0.582371 | 1,142 | 8,486 | 4.187391 | 0.165499 | 0.034504 | 0.013174 | 0.020075 | 0.375366 | 0.360937 | 0.28921 | 0.284609 | 0.254078 | 0.232748 | 0 | 0.005673 | 0.335258 | 8,486 | 261 | 112 | 32.51341 | 0.842049 | 0.363893 | 0 | 0.288288 | 0 | 0 | 0.067584 | 0.018773 | 0 | 0 | 0 | 0 | 0 | 1 | 0.126126 | false | 0 | 0.036036 | 0 | 0.243243 | 0.036036 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b6cb22cdbe422b0a500a1606789a7d83af799b | 38,534 | py | Python | hs_file_types/models/geofeature.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_file_types/models/geofeature.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | hs_file_types/models/geofeature.py | tommac7/hydroshare | 87c4543a55f98103d2614bf4c47f7904c3f9c029 | [
"BSD-3-Clause"
] | null | null | null | import os
import logging
import shutil
import zipfile
import xmltodict
from lxml import etree
from osgeo import ogr, osr
from django.core.exceptions import ValidationError
from django.db import models, transaction
from django.utils.html import strip_tags
from django.template import Template, Context
from dominate.ta... | 44.547977 | 100 | 0.61338 | 4,343 | 38,534 | 5.184204 | 0.12641 | 0.029314 | 0.027315 | 0.016789 | 0.284033 | 0.214524 | 0.138086 | 0.085321 | 0.047968 | 0.039129 | 0 | 0.004653 | 0.302849 | 38,534 | 864 | 101 | 44.599537 | 0.833457 | 0.175352 | 0 | 0.194444 | 0 | 0.001736 | 0.126272 | 0.015004 | 0 | 0 | 0 | 0 | 0 | 1 | 0.057292 | false | 0 | 0.032986 | 0.006944 | 0.166667 | 0.003472 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7b9397bbe8da7007b207fc6a20f4e6b29704b5a | 1,313 | py | Python | tests/test_node.py | mjholtkamp/py-iptree | 97025f03247dbc91424898fd28f7be1448d5fce5 | [
"Apache-2.0"
] | null | null | null | tests/test_node.py | mjholtkamp/py-iptree | 97025f03247dbc91424898fd28f7be1448d5fce5 | [
"Apache-2.0"
] | null | null | null | tests/test_node.py | mjholtkamp/py-iptree | 97025f03247dbc91424898fd28f7be1448d5fce5 | [
"Apache-2.0"
] | null | null | null | import unittest
from iptree import IPNode
class TestIPNode(unittest.TestCase):
def test_node_ipv4(self):
node = IPNode('0.0.0.0/0')
node.add(IPNode('127.0.0.1/32'))
assert '127.0.0.1/32' in node
assert '192.0.2.1/32' not in node
def test_node_ipv6(self):
node = IPNode... | 28.543478 | 62 | 0.552932 | 186 | 1,313 | 3.811828 | 0.268817 | 0.069111 | 0.062059 | 0.067701 | 0.239774 | 0.217207 | 0.090268 | 0.090268 | 0.090268 | 0.090268 | 0 | 0.095745 | 0.284082 | 1,313 | 45 | 63 | 29.177778 | 0.658511 | 0.039604 | 0 | 0.114286 | 0 | 0 | 0.146148 | 0 | 0 | 0 | 0 | 0 | 0.314286 | 1 | 0.142857 | false | 0 | 0.057143 | 0 | 0.228571 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7ba3cc002a49b7880bf396084b5e2214c7d5cdf | 1,239 | py | Python | locustfile_create_order.py | Ashutosh-Kaushik/ss-load-test-locust | 286e3cecad39f5ce991717e117392332a9810d64 | [
"Apache-2.0"
] | 1 | 2022-03-31T05:34:33.000Z | 2022-03-31T05:34:33.000Z | locustfile_create_order.py | Ashutosh-Kaushik/ss-load-test-locust | 286e3cecad39f5ce991717e117392332a9810d64 | [
"Apache-2.0"
] | null | null | null | locustfile_create_order.py | Ashutosh-Kaushik/ss-load-test-locust | 286e3cecad39f5ce991717e117392332a9810d64 | [
"Apache-2.0"
] | null | null | null | import csv
import random
import warnings
import os
from locust import HttpUser, task, between
body = {
"campaignid":"5kXk20gGDISJdM5el5IT",
"walletamount":"0"
}
header = {
"Host": "fkhapi.sastasundar.com",
"Apptype": "N",
"Appversion": "4.0.4",
"Appversioncode": "109",
"Deviceid": "81653d... | 25.8125 | 88 | 0.637611 | 129 | 1,239 | 6.069767 | 0.775194 | 0.043423 | 0.051086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.077612 | 0.188862 | 1,239 | 48 | 88 | 25.8125 | 0.701493 | 0 | 0 | 0 | 0 | 0 | 0.445161 | 0.064516 | 0 | 0 | 0 | 0 | 0 | 1 | 0.04878 | false | 0 | 0.121951 | 0 | 0.219512 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7bae45b9bc9f5897fbcca4960ef6f0a8e4b7699 | 1,358 | py | Python | compy/plot/grid.py | tilleyd/compy | b63188341d0c66c0ecd810e29918e569c519b296 | [
"MIT"
] | null | null | null | compy/plot/grid.py | tilleyd/compy | b63188341d0c66c0ecd810e29918e569c519b296 | [
"MIT"
] | null | null | null | compy/plot/grid.py | tilleyd/compy | b63188341d0c66c0ecd810e29918e569c519b296 | [
"MIT"
] | null | null | null | """Contains the grid class to create multiple figures."""
from typing import Optional, Tuple
from .figure import Figure
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
class Grid:
def __init__(
self, rows: int, cols: int, size: Optional[Tuple[float, float]] = None
):
""... | 29.521739 | 78 | 0.581001 | 172 | 1,358 | 4.552326 | 0.406977 | 0.038314 | 0.03576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.310751 | 1,358 | 45 | 79 | 30.177778 | 0.836538 | 0.266568 | 0 | 0 | 0 | 0 | 0.005382 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0 | 0.153846 | 0 | 0.384615 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7bb34b596fa5c54c79635a6e0d79f862d482ebf | 30,005 | py | Python | parallel_accel/shared/parallel_accel/shared/schemas/external.py | google/parallel_accel | b58fda1c3a22f2aaa9a97337d602cd72c49ee8be | [
"Apache-2.0"
] | 1 | 2021-12-19T21:17:02.000Z | 2021-12-19T21:17:02.000Z | parallel_accel/shared/parallel_accel/shared/schemas/external.py | google/parallel_accel | b58fda1c3a22f2aaa9a97337d602cd72c49ee8be | [
"Apache-2.0"
] | null | null | null | parallel_accel/shared/parallel_accel/shared/schemas/external.py | google/parallel_accel | b58fda1c3a22f2aaa9a97337d602cd72c49ee8be | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The ParallelAccel Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 28.549001 | 113 | 0.627629 | 3,021 | 30,005 | 6.139027 | 0.160212 | 0.028038 | 0.044484 | 0.020382 | 0.358244 | 0.305295 | 0.263507 | 0.238866 | 0.206406 | 0.162892 | 0 | 0.001882 | 0.256324 | 30,005 | 1,050 | 114 | 28.57619 | 0.829255 | 0.361673 | 0 | 0.241228 | 0 | 0 | 0.069854 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.048246 | false | 0 | 0.02193 | 0 | 0.337719 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7bb41a1d668770a899b52a1a2113000001bd07c | 1,040 | py | Python | godot-toolkit/godot_config_file.py | WiggleWizard/godot-toolkit | e17b7666ed80e3ab25ee65c43eb1ba9b13634070 | [
"MIT"
] | null | null | null | godot-toolkit/godot_config_file.py | WiggleWizard/godot-toolkit | e17b7666ed80e3ab25ee65c43eb1ba9b13634070 | [
"MIT"
] | null | null | null | godot-toolkit/godot_config_file.py | WiggleWizard/godot-toolkit | e17b7666ed80e3ab25ee65c43eb1ba9b13634070 | [
"MIT"
] | null | null | null | try:
from configparser import RawConfigParser
except ImportError:
from ConfigParser import RawConfigParser
class GodotConfigFile(RawConfigParser):
def write(self, fp):
"""Write an .ini-format representation of the configuration state."""
if self._defaults:
fp.write("[%s]\n" % D... | 41.6 | 79 | 0.5 | 116 | 1,040 | 4.405172 | 0.387931 | 0.09589 | 0.062622 | 0.052838 | 0.176125 | 0.109589 | 0.109589 | 0.109589 | 0.109589 | 0 | 0 | 0 | 0.325962 | 1,040 | 25 | 80 | 41.6 | 0.728959 | 0.060577 | 0 | 0.090909 | 0 | 0 | 0.063786 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0 | 0.136364 | 0 | 0.227273 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7bd5a3b425952bf3f2c75d16b604d8c223988c4 | 683 | py | Python | DMOJ/CCC/escape room.py | eddiegz/Personal-C | f7869826216e5c665f8f646502141f0dc680e545 | [
"MIT"
] | 3 | 2021-05-15T08:18:09.000Z | 2021-05-17T04:41:57.000Z | DMOJ/CCC/escape room.py | eddiegz/Personal-C | f7869826216e5c665f8f646502141f0dc680e545 | [
"MIT"
] | null | null | null | DMOJ/CCC/escape room.py | eddiegz/Personal-C | f7869826216e5c665f8f646502141f0dc680e545 | [
"MIT"
] | null | null | null | import collections
def cal(num):
i=1
f=factor[num]
while i*i<=num:
if num%i==0 and i<=max(n,m) and num//i<=max(n,m):
f.append(i)
i+=1
return num
def dfs(i,j):
if i==m-1 and j==n-1:
return True
if i>=m and j>=n or grid[i][j] in factor:
... | 22.032258 | 58 | 0.513909 | 124 | 683 | 2.830645 | 0.314516 | 0.034188 | 0.02849 | 0.034188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.023454 | 0.313324 | 683 | 30 | 59 | 22.766667 | 0.724947 | 0 | 0 | 0.148148 | 0 | 0 | 0.007657 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.074074 | false | 0 | 0.037037 | 0 | 0.296296 | 0.037037 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7bd809bb95458cc851905998de0d036112332ab | 2,556 | py | Python | volume_loader.py | xeTaiz/deep-volumetric-ambient-occlusion | 8492ad957f1440d5bf93139f7cf9ee4c7997b0e2 | [
"MIT"
] | 9 | 2020-08-24T20:03:17.000Z | 2022-02-17T07:38:55.000Z | volume_loader.py | xeTaiz/deep-volumetric-ambient-occlusion | 8492ad957f1440d5bf93139f7cf9ee4c7997b0e2 | [
"MIT"
] | null | null | null | volume_loader.py | xeTaiz/deep-volumetric-ambient-occlusion | 8492ad957f1440d5bf93139f7cf9ee4c7997b0e2 | [
"MIT"
] | 1 | 2021-07-12T01:39:24.000Z | 2021-07-12T01:39:24.000Z | import os
import pydicom
import numpy as np
import dicom_numpy
from utils import hidden_errors
from tf_utils import *
from pathlib import Path
def read_dicom_folder(dicom_folder, rescale=None):
''' Reads all .dcm files in `dicom_folder` and merges them to one volume
Returns:
The volume and the affine... | 44.068966 | 127 | 0.620892 | 349 | 2,556 | 4.358166 | 0.381089 | 0.050625 | 0.029586 | 0.018409 | 0.021039 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007659 | 0.28482 | 2,556 | 57 | 128 | 44.842105 | 0.824398 | 0.214398 | 0 | 0 | 0 | 0 | 0.051829 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.116279 | false | 0 | 0.186047 | 0 | 0.372093 | 0.023256 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7c03a0cfc79b571a75dfb907cc43fbd5d0b1bf0 | 5,056 | py | Python | sudoku_solver/gui.py | andrewhalle/sudoku_solver | 56b88c49a3637449507a9afa66ec3d617d2118a5 | [
"MIT"
] | null | null | null | sudoku_solver/gui.py | andrewhalle/sudoku_solver | 56b88c49a3637449507a9afa66ec3d617d2118a5 | [
"MIT"
] | null | null | null | sudoku_solver/gui.py | andrewhalle/sudoku_solver | 56b88c49a3637449507a9afa66ec3d617d2118a5 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtCore import Qt, QSize, QPoint
from PyQt5.QtWidgets import QApplication, QDialog, QWidget, QLabel, QPushButton, QVBoxLayout, QHBoxLayout
from PyQt5.QtGui import QPainter, QColor, QPen, QFont
from .sudoku import Sudoku
class SudokuWidget(QWidget):
def __init__(self, parent=None):
supe... | 36.637681 | 135 | 0.585443 | 627 | 5,056 | 4.601276 | 0.23445 | 0.110572 | 0.103986 | 0.055459 | 0.295321 | 0.190988 | 0.139688 | 0.116464 | 0.112305 | 0.112305 | 0 | 0.035754 | 0.286392 | 5,056 | 137 | 136 | 36.905109 | 0.763858 | 0 | 0 | 0.193277 | 0 | 0 | 0.023932 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.07563 | false | 0 | 0.042017 | 0 | 0.168067 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7c06f515d7439b0a77375fbc6fb115fb4977fe1 | 1,042 | py | Python | swarmlib/util/functions.py | nkoutsov/swarmlib | fa70a5d9de50de5dacd5d499eba3b6bb72c39c05 | [
"BSD-3-Clause"
] | null | null | null | swarmlib/util/functions.py | nkoutsov/swarmlib | fa70a5d9de50de5dacd5d499eba3b6bb72c39c05 | [
"BSD-3-Clause"
] | null | null | null | swarmlib/util/functions.py | nkoutsov/swarmlib | fa70a5d9de50de5dacd5d499eba3b6bb72c39c05 | [
"BSD-3-Clause"
] | null | null | null | # ------------------------------------------------------------------------------------------------------
# Copyright (c) Leo Hanisch. All rights reserved.
# Licensed under the BSD 3-Clause License. See LICENSE.txt in the project root for license information.
# ---------------------------------------------------------... | 33.612903 | 104 | 0.600768 | 114 | 1,042 | 5.377193 | 0.561404 | 0.114193 | 0.163132 | 0.11093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006719 | 0.142994 | 1,042 | 30 | 105 | 34.733333 | 0.679731 | 0.514395 | 0 | 0 | 0 | 0 | 0.026157 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.25 | 0.0625 | 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 |
b7c3aa3be6cad1fc615356fe4a0db24f49f796d6 | 898 | py | Python | source/_sample/scipy/interp_spline_interest.py | showa-yojyo/notebook | 82c15074c24d64a1dfcb70a526bc1deb2ecffe68 | [
"MIT"
] | 14 | 2016-04-13T08:10:02.000Z | 2021-04-19T09:42:51.000Z | source/_sample/scipy/interp_spline_interest.py | showa-yojyo/note | 5f262ecda3df132cb66206c465d16e174061d6b9 | [
"MIT"
] | 88 | 2017-09-27T15:07:05.000Z | 2019-10-02T04:05:03.000Z | source/_sample/scipy/interp_spline_interest.py | showa-yojyo/note | 5f262ecda3df132cb66206c465d16e174061d6b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""interp_spline_interest.py: Demonstrate spline interpolation.
"""
from scipy.interpolate import splrep, splev
import numpy as np
import matplotlib.pyplot as plt
# pylint: disable=invalid-name
# Interest rates of Jan, Feb, Mar, Jun, Dec.
x = np.array([1, 2, 3, 6, 12])
y = np.array([0.080, 0.100... | 24.944444 | 63 | 0.679287 | 148 | 898 | 4.101351 | 0.581081 | 0.019769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.055128 | 0.131403 | 898 | 35 | 64 | 25.657143 | 0.723077 | 0.2951 | 0 | 0 | 0 | 0 | 0.185484 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.157895 | 0 | 0.157895 | 0.263158 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7c3bf02cb16b87bf7d4abf283104f4f08eda387 | 1,351 | py | Python | Pytorch/Scratch CNN and Pytorch/part1-convnet/tests/test_sgd.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | 3 | 2022-01-16T14:46:57.000Z | 2022-02-20T22:40:16.000Z | Pytorch/Scratch CNN and Pytorch/part1-convnet/tests/test_sgd.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | null | null | null | Pytorch/Scratch CNN and Pytorch/part1-convnet/tests/test_sgd.py | Kuga23/Deep-Learning | 86980338208c702b6bfcbcfffdb18498e389a56b | [
"MIT"
] | 6 | 2021-09-29T11:42:37.000Z | 2022-02-02T02:33:51.000Z | import unittest
import numpy as np
from optimizer import SGD
from modules import ConvNet
from .utils import *
class TestSGD(unittest.TestCase):
""" The class containing all test cases for this assignment"""
def setUp(self):
"""Define the functions to be tested here."""
pass
def test_sgd(s... | 28.744681 | 104 | 0.624722 | 180 | 1,351 | 4.627778 | 0.416667 | 0.076831 | 0.057623 | 0.038415 | 0.398559 | 0.348139 | 0.348139 | 0.252101 | 0.252101 | 0.177671 | 0 | 0.041584 | 0.252406 | 1,351 | 46 | 105 | 29.369565 | 0.783168 | 0.091044 | 0 | 0.451613 | 0 | 0 | 0.058581 | 0.037954 | 0 | 0 | 0 | 0 | 0.064516 | 1 | 0.064516 | false | 0.032258 | 0.16129 | 0 | 0.258065 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7c4849c094e9c707d5b2331ea5e37f6828cbb6d | 1,583 | py | Python | 题源分类/LeetCode/LeetCode日刷/python/47.全排列-ii.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/47.全排列-ii.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | 题源分类/LeetCode/LeetCode日刷/python/47.全排列-ii.py | ZhengyangXu/Algorithm-Daily-Practice | 3017a3d476fc9a857026190ea4fae2911058df59 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=47 lang=python3
#
# [47] 全排列 II
#
# https://leetcode-cn.com/problems/permutations-ii/description/
#
# algorithms
# Medium (59.58%)
# Likes: 371
# Dislikes: 0
# Total Accepted: 78.7K
# Total Submissions: 132.1K
# Testcase Example: '[1,1,2]'
#
# 给定一个可包含重复数字的序列,返回所有不重复的全排列。
#
# 示例:
#
# ... | 21.986111 | 67 | 0.475679 | 193 | 1,583 | 3.917098 | 0.378238 | 0.039683 | 0.011905 | 0.099206 | 0.195767 | 0.166667 | 0.119048 | 0.119048 | 0.119048 | 0.119048 | 0 | 0.038961 | 0.367656 | 1,583 | 71 | 68 | 22.295775 | 0.713287 | 0.421984 | 0 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7c83d7466393b727423c1185dc55c5006258a81 | 859 | py | Python | anand.py | kyclark/py-grepper | ca7a17b1ffc2d666d62da6c80eb4cbc0bd2e547e | [
"MIT"
] | null | null | null | anand.py | kyclark/py-grepper | ca7a17b1ffc2d666d62da6c80eb4cbc0bd2e547e | [
"MIT"
] | null | null | null | anand.py | kyclark/py-grepper | ca7a17b1ffc2d666d62da6c80eb4cbc0bd2e547e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
orderNumbers = open("orders.txt", "r") #Order numbers to match
#Network path to a directory of files that has full details of the order
directoryEntries = os.scandir("")
outputFile = open("matchedData.dat", "w")
for entry in directoryEntries:
print("Currently parsing file ", en... | 31.814815 | 76 | 0.696158 | 117 | 859 | 5.111111 | 0.538462 | 0.035117 | 0.026756 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004451 | 0.215367 | 859 | 26 | 77 | 33.038462 | 0.882789 | 0.349243 | 0 | 0 | 0 | 0 | 0.099458 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.058824 | 0 | 0.058824 | 0.117647 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7c97b1397f5b96121b2b0909bc775d38cbcd523 | 2,968 | py | Python | tests/test_manager.py | Vizzuality/cog_worker | ae12d2fc42945fedfea4a22394247db9a73d867e | [
"MIT"
] | 24 | 2021-08-23T14:51:02.000Z | 2021-12-20T09:45:10.000Z | tests/test_manager.py | Vizzuality/cog_worker | ae12d2fc42945fedfea4a22394247db9a73d867e | [
"MIT"
] | null | null | null | tests/test_manager.py | Vizzuality/cog_worker | ae12d2fc42945fedfea4a22394247db9a73d867e | [
"MIT"
] | 1 | 2021-08-24T01:09:36.000Z | 2021-08-24T01:09:36.000Z | import pytest
import rasterio as rio
from rasterio.io import DatasetWriter
from cog_worker import Manager
from rasterio import MemoryFile, crs
TEST_COG = "tests/roads_cog.tif"
@pytest.fixture
def molleweide_manager():
return Manager(
proj="+proj=moll",
scale=50000,
)
@pytest.fixture
def sam... | 31.913978 | 83 | 0.686995 | 380 | 2,968 | 5.165789 | 0.273684 | 0.190525 | 0.058584 | 0.078961 | 0.239429 | 0.147733 | 0.147733 | 0.147733 | 0.091696 | 0.056037 | 0 | 0.061966 | 0.21159 | 2,968 | 92 | 84 | 32.26087 | 0.776923 | 0 | 0 | 0.161765 | 0 | 0 | 0.075809 | 0 | 0 | 0 | 0 | 0 | 0.191176 | 1 | 0.176471 | false | 0 | 0.073529 | 0.029412 | 0.294118 | 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 |
b7c9f4fcfbbd13ff61698bd25e58c747a3f4a5c0 | 1,031 | py | Python | CLIP/experiments/tagger/main_binary.py | ASAPP-H/clip2 | e8ba2a3cf4be01ec26bde5107c5a2813bddf8a3b | [
"MIT"
] | null | null | null | CLIP/experiments/tagger/main_binary.py | ASAPP-H/clip2 | e8ba2a3cf4be01ec26bde5107c5a2813bddf8a3b | [
"MIT"
] | 3 | 2021-09-08T02:07:49.000Z | 2022-03-12T00:33:51.000Z | CLIP/experiments/tagger/main_binary.py | ASAPP-H/clip2 | e8ba2a3cf4be01ec26bde5107c5a2813bddf8a3b | [
"MIT"
] | null | null | null | from train import train_model
from utils import *
import os
import sys
pwd = os.environ.get('CLIP_DIR')
DATA_DIR = "%s/data/processed/" % pwd
exp_name = "non_multilabel"
run_name = "sentence_structurel_with_crf"
train_file_name = "MIMIC_train_binary.csv"
dev_file_name = "MIMIC_val_binary.csv"
test_file_name = "test_b... | 25.775 | 72 | 0.696411 | 148 | 1,031 | 4.466216 | 0.439189 | 0.072617 | 0.09531 | 0.104387 | 0.172466 | 0.172466 | 0.172466 | 0.172466 | 0 | 0 | 0 | 0.007134 | 0.184287 | 1,031 | 39 | 73 | 26.435897 | 0.778835 | 0 | 0 | 0 | 0 | 0 | 0.198836 | 0.084384 | 0 | 0 | 0 | 0 | 0 | 1 | 0.030303 | false | 0 | 0.121212 | 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 |
b7cb98a29e28bbca96a3da9a3ddecb43eea2b232 | 2,918 | py | Python | hytra/plugins/transition_feature_vector_construction/transition_feature_subtraction.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/plugins/transition_feature_vector_construction/transition_feature_subtraction.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | hytra/plugins/transition_feature_vector_construction/transition_feature_subtraction.py | m-novikov/hytra | 0dc28deaa2571fa8bea63ca178f0e53cc1cd7508 | [
"MIT"
] | null | null | null | from hytra.pluginsystem import transition_feature_vector_construction_plugin
import numpy as np
from compiler.ast import flatten
class TransitionFeaturesSubtraction(
transition_feature_vector_construction_plugin.TransitionFeatureVectorConstructionPlugin
):
"""
Computes the subtraction of features in the f... | 35.585366 | 91 | 0.48732 | 208 | 2,918 | 6.798077 | 0.346154 | 0.127298 | 0.118812 | 0.114569 | 0.528996 | 0.471004 | 0.471004 | 0.471004 | 0.471004 | 0.471004 | 0 | 0.003683 | 0.441741 | 2,918 | 81 | 92 | 36.024691 | 0.864334 | 0.031186 | 0 | 0.454545 | 0 | 0 | 0.064034 | 0.009605 | 0 | 0 | 0 | 0 | 0.136364 | 1 | 0.030303 | false | 0 | 0.045455 | 0 | 0.121212 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7cbae55dbd90dfb87f2e9c515ec5098f54466ea | 5,438 | py | Python | sprites/player.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | null | null | null | sprites/player.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | null | null | null | sprites/player.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | 1 | 2022-03-29T15:38:18.000Z | 2022-03-29T15:38:18.000Z | from matplotlib.style import available
import pygame as pg
from sprites.character import Character
from pygame.math import Vector2
from settings import *
from math import cos, pi
from control import Controler
from sprites.gun import MachineGun, Pistol, Rifle
from managers.resourcemanager import ResourceManager as GR
fr... | 36.743243 | 142 | 0.590291 | 645 | 5,438 | 4.891473 | 0.249612 | 0.055784 | 0.068463 | 0.10935 | 0.293185 | 0.247861 | 0.202536 | 0.184786 | 0.163233 | 0.139778 | 0 | 0.013955 | 0.301581 | 5,438 | 148 | 143 | 36.743243 | 0.816746 | 0.087164 | 0 | 0.290909 | 0 | 0 | 0.014742 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.045455 | false | 0 | 0.090909 | 0 | 0.172727 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7cc1da3745ec1958d532f60dd1185d8b2057b84 | 10,198 | py | Python | mytardisbf/migrations/0001_initial_data.py | keithschulze/mytardisbf | cc15fc9af89cf96c4d860c41fe5b0f366d4ee0d6 | [
"MIT"
] | 2 | 2020-07-09T01:21:00.000Z | 2022-02-06T17:33:57.000Z | mytardisbf/migrations/0001_initial_data.py | keithschulze/mytardisbf | cc15fc9af89cf96c4d860c41fe5b0f366d4ee0d6 | [
"MIT"
] | 14 | 2015-07-21T05:12:58.000Z | 2017-11-16T10:46:30.000Z | mytardisbf/migrations/0001_initial_data.py | keithschulze/mytardisbf | cc15fc9af89cf96c4d860c41fe5b0f366d4ee0d6 | [
"MIT"
] | 4 | 2015-08-04T10:57:29.000Z | 2017-11-28T10:50:33.000Z | # -*- coding: utf-8 -*-
from django.db import migrations
from tardis.tardis_portal.models import (
Schema,
ParameterName,
DatafileParameter,
DatafileParameterSet
)
from mytardisbf.apps import (
OMESCHEMA,
BFSCHEMA
)
def forward_func(apps, schema_editor):
"""Create mytardisbf schemas and pa... | 24.995098 | 80 | 0.499314 | 886 | 10,198 | 5.507901 | 0.132054 | 0.044467 | 0.083197 | 0.11291 | 0.706352 | 0.7 | 0.7 | 0.650615 | 0.621721 | 0.557787 | 0 | 0.018942 | 0.39949 | 10,198 | 407 | 81 | 25.056511 | 0.777923 | 0.010983 | 0 | 0.650138 | 0 | 0 | 0.073052 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.008264 | false | 0 | 0.008264 | 0 | 0.024793 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d02035de2ed671a7db2b55074f9e4dd487d817 | 9,616 | py | Python | tests/scripts/thread-cert/border_router/MATN_05_ReregistrationToSameMulticastGroup.py | kkasperczyk-no/sdk-openthread | 385e19da1ae15f27872c2543b97276a42f102ead | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/border_router/MATN_05_ReregistrationToSameMulticastGroup.py | kkasperczyk-no/sdk-openthread | 385e19da1ae15f27872c2543b97276a42f102ead | [
"BSD-3-Clause"
] | null | null | null | tests/scripts/thread-cert/border_router/MATN_05_ReregistrationToSameMulticastGroup.py | kkasperczyk-no/sdk-openthread | 385e19da1ae15f27872c2543b97276a42f102ead | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2021, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 39.089431 | 119 | 0.629992 | 1,262 | 9,616 | 4.61252 | 0.250396 | 0.013915 | 0.042433 | 0.022848 | 0.469679 | 0.452843 | 0.449923 | 0.399244 | 0.379316 | 0.360763 | 0 | 0.030679 | 0.271215 | 9,616 | 245 | 120 | 39.24898 | 0.799943 | 0.419821 | 0 | 0.361538 | 0 | 0 | 0.067115 | 0.01255 | 0 | 0 | 0 | 0 | 0.053846 | 1 | 0.015385 | false | 0 | 0.053846 | 0 | 0.092308 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d0fb3e2eab434c02f0ab81e51febbe5297c8ae | 3,457 | py | Python | senseye_cameras/input/camera_pylon.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | 5 | 2020-03-20T17:07:35.000Z | 2022-01-25T23:48:52.000Z | senseye_cameras/input/camera_pylon.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | 5 | 2020-03-05T20:55:06.000Z | 2022-03-24T22:41:56.000Z | senseye_cameras/input/camera_pylon.py | senseye-inc/senseye-cameras | 9d9cdb95e64aaa8d08aa56bd9a79641263e65940 | [
"BSD-3-Clause"
] | null | null | null | import time
import logging
try:
from pypylon import pylon
except:
pylon = None
from . input import Input
log = logging.getLogger(__name__)
# writes the framenumber to the 8-11 bytes of the image as a big-endian set of octets
def encode_framenumber(np_image, n):
for i in range(4):
np_image[0][i+7]... | 33.563107 | 102 | 0.60486 | 422 | 3,457 | 4.879147 | 0.362559 | 0.08305 | 0.043711 | 0.020398 | 0.112676 | 0.074794 | 0.045653 | 0.045653 | 0.045653 | 0.045653 | 0 | 0.010212 | 0.291872 | 3,457 | 102 | 103 | 33.892157 | 0.830882 | 0.203645 | 0 | 0.071429 | 0 | 0 | 0.06934 | 0 | 0 | 0 | 0.002999 | 0 | 0 | 1 | 0.1 | false | 0 | 0.071429 | 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 |
b7d28e8d5b3bd12fe72a9a971fff5626e0a64791 | 3,100 | py | Python | vise/tests/util/phonopy/test_phonopy_input.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 16 | 2020-07-14T13:14:05.000Z | 2022-03-04T13:39:30.000Z | vise/tests/util/phonopy/test_phonopy_input.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 10 | 2021-03-15T20:47:45.000Z | 2021-08-19T00:47:12.000Z | vise/tests/util/phonopy/test_phonopy_input.py | kumagai-group/vise | 8adfe61ad8f31767ec562f02f271e2495f357cd4 | [
"MIT"
] | 6 | 2020-03-03T00:42:39.000Z | 2022-02-22T02:34:47.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021. Distributed under the terms of the MIT License.
from phonopy.interface.calculator import read_crystal_structure
from phonopy.structure.atoms import PhonopyAtoms
from vise.util.phonopy.phonopy_input import structure_to_phonopy_atoms
import numpy as np
def assert_same_phon... | 41.333333 | 73 | 0.59 | 341 | 3,100 | 5.099707 | 0.231672 | 0.027602 | 0.029327 | 0.025302 | 0.522714 | 0.466935 | 0.414031 | 0.346751 | 0.346751 | 0.346751 | 0 | 0.029144 | 0.291613 | 3,100 | 74 | 74 | 41.891892 | 0.76275 | 0.557742 | 0 | 0 | 0 | 0 | 0.014286 | 0 | 0 | 0 | 0 | 0 | 0.222222 | 1 | 0.111111 | false | 0 | 0.148148 | 0 | 0.259259 | 0.111111 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d2c3d5b85f7571232ad665184ca7a2e111ef5a | 1,419 | py | Python | 2020/day15.py | andypymont/adventofcode | 912aa48fc5b31ec9202fb9654380991fc62afcd1 | [
"MIT"
] | null | null | null | 2020/day15.py | andypymont/adventofcode | 912aa48fc5b31ec9202fb9654380991fc62afcd1 | [
"MIT"
] | null | null | null | 2020/day15.py | andypymont/adventofcode | 912aa48fc5b31ec9202fb9654380991fc62afcd1 | [
"MIT"
] | null | null | null | """
2020 Day 15
https://adventofcode.com/2020/day/15
"""
from collections import deque
from typing import Dict, Iterable, Optional
import aocd # type: ignore
class ElfMemoryGame:
def __init__(self, starting_numbers: Iterable[int]):
self.appearances: Dict[int, deque[int]] = {}
self.length = 0
... | 25.8 | 82 | 0.621564 | 181 | 1,419 | 4.745856 | 0.39779 | 0.093132 | 0.031432 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034807 | 0.250881 | 1,419 | 54 | 83 | 26.277778 | 0.773283 | 0.090909 | 0 | 0 | 0 | 0 | 0.038674 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.176471 | false | 0 | 0.088235 | 0.029412 | 0.352941 | 0.058824 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d54fe8e9a77f05bf236b9a737834d1a8f3821a | 5,719 | py | Python | gqn_v2/gqn_predictor.py | goodmattg/tf-gqn | a2088761f11a9806500dcaf28edc28ecd7fc514e | [
"Apache-2.0"
] | null | null | null | gqn_v2/gqn_predictor.py | goodmattg/tf-gqn | a2088761f11a9806500dcaf28edc28ecd7fc514e | [
"Apache-2.0"
] | null | null | null | gqn_v2/gqn_predictor.py | goodmattg/tf-gqn | a2088761f11a9806500dcaf28edc28ecd7fc514e | [
"Apache-2.0"
] | null | null | null | """
Contains a canned predictor for a GQN.
"""
import os
import json
import numpy as np
import tensorflow as tf
from .gqn_graph import gqn_draw
from .gqn_params import create_gqn_config
def _normalize_pose(pose):
"""
Converts a camera pose into the GQN format.
Args:
pose: [x, y, z, yaw, pitch]; x, y, z i... | 36.660256 | 110 | 0.652736 | 874 | 5,719 | 4.022883 | 0.21167 | 0.037827 | 0.03413 | 0.012514 | 0.338737 | 0.292093 | 0.254551 | 0.229807 | 0.214164 | 0.214164 | 0 | 0.01415 | 0.209127 | 5,719 | 155 | 111 | 36.896774 | 0.76321 | 0.228012 | 0 | 0.154639 | 0 | 0 | 0.093618 | 0 | 0 | 0 | 0 | 0 | 0.051546 | 1 | 0.072165 | false | 0 | 0.061856 | 0 | 0.185567 | 0.030928 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d6284562e6fc98442dc3568881e4543f4597b6 | 6,054 | py | Python | mamba/post_solve_handling.py | xhochy/mamba | 249546a95abf358f116cc1b546bfb51e427001fd | [
"BSD-3-Clause"
] | null | null | null | mamba/post_solve_handling.py | xhochy/mamba | 249546a95abf358f116cc1b546bfb51e427001fd | [
"BSD-3-Clause"
] | null | null | null | mamba/post_solve_handling.py | xhochy/mamba | 249546a95abf358f116cc1b546bfb51e427001fd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2019, QuantStack
# SPDX-License-Identifier: BSD-3-Clause
from conda.base.constants import DepsModifier, UpdateModifier
from conda._vendor.boltons.setutils import IndexedSet
from conda.core.prefix_data import PrefixData
from conda.models.prefix_graph import PrefixGraph
from conda... | 47.669291 | 96 | 0.652296 | 827 | 6,054 | 4.53688 | 0.258767 | 0.063433 | 0.066631 | 0.019989 | 0.216418 | 0.135128 | 0.120203 | 0.085821 | 0.060768 | 0.045842 | 0 | 0.001832 | 0.278824 | 6,054 | 126 | 97 | 48.047619 | 0.857536 | 0.518335 | 0 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007937 | 0 | 1 | 0.022727 | false | 0 | 0.136364 | 0 | 0.227273 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d668041de4ae36e76a177a55158ac9e8eab418 | 264 | py | Python | Young Physicist.py | techonair/Codeforces | 1f854424e2de69ea4fdf7c6cde8ab04eddfb4566 | [
"MIT"
] | null | null | null | Young Physicist.py | techonair/Codeforces | 1f854424e2de69ea4fdf7c6cde8ab04eddfb4566 | [
"MIT"
] | null | null | null | Young Physicist.py | techonair/Codeforces | 1f854424e2de69ea4fdf7c6cde8ab04eddfb4566 | [
"MIT"
] | null | null | null | num = input()
lucky = 0
for i in num:
if i == '4' or i == '7':
lucky += 1
counter = 0
for c in str(lucky):
if c == '4' or c == '7':
counter += 1
if counter == len(str(lucky)):
print("YES")
else:
print("NO")
| 11 | 30 | 0.431818 | 41 | 264 | 2.780488 | 0.487805 | 0.070175 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.049689 | 0.390152 | 264 | 23 | 31 | 11.478261 | 0.658385 | 0 | 0 | 0 | 0 | 0 | 0.034483 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.153846 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d7bf07253855c146dc1edf490b5b90c54ec05e | 477 | py | Python | snakebids/utils/__init__.py | tkkuehn/snakebids | 641026ea91c84c4403f0a654d2aaf2bfa50eaa19 | [
"MIT"
] | null | null | null | snakebids/utils/__init__.py | tkkuehn/snakebids | 641026ea91c84c4403f0a654d2aaf2bfa50eaa19 | [
"MIT"
] | null | null | null | snakebids/utils/__init__.py | tkkuehn/snakebids | 641026ea91c84c4403f0a654d2aaf2bfa50eaa19 | [
"MIT"
] | null | null | null | from snakebids.utils.output import (
Mode,
get_time_hash,
prepare_output,
retrofit_output,
write_config_file,
write_output_mode,
)
from snakebids.utils.snakemake_io import (
glob_wildcards,
regex,
update_wildcard_constraints,
)
__all__ = [
"Mode",
"get_time_hash",
"glob_... | 18.346154 | 42 | 0.681342 | 52 | 477 | 5.730769 | 0.442308 | 0.087248 | 0.120805 | 0.100671 | 0.201342 | 0.201342 | 0 | 0 | 0 | 0 | 0 | 0 | 0.220126 | 477 | 25 | 43 | 19.08 | 0.801075 | 0 | 0 | 0 | 0 | 0 | 0.264151 | 0.056604 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.083333 | 0 | 0.083333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7d83061ac773421e6029dc4c038d3f9bc4b0679 | 659 | py | Python | examples/custom_renderer/custom_renderer.py | victorbenichoux/vizno | 87ed98f66914a27e4b71d835734ca2a17a09412f | [
"MIT"
] | 5 | 2020-12-02T08:46:06.000Z | 2022-01-15T12:58:27.000Z | examples/custom_renderer/custom_renderer.py | victorbenichoux/vizno | 87ed98f66914a27e4b71d835734ca2a17a09412f | [
"MIT"
] | null | null | null | examples/custom_renderer/custom_renderer.py | victorbenichoux/vizno | 87ed98f66914a27e4b71d835734ca2a17a09412f | [
"MIT"
] | null | null | null | import pydantic
from vizno.renderers import ContentConfiguration, render
from vizno.report import Report
class CustomObject(pydantic.BaseModel):
parameter: int
class CustomRenderConfiguration(ContentConfiguration):
parameter: int
@render.register
def _(obj: CustomObject):
return CustomRenderConfigura... | 19.969697 | 56 | 0.728376 | 69 | 659 | 6.913043 | 0.521739 | 0.037736 | 0.079665 | 0.1174 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01087 | 0.162367 | 659 | 32 | 57 | 20.59375 | 0.853261 | 0 | 0 | 0.173913 | 0 | 0 | 0.130501 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.043478 | false | 0 | 0.130435 | 0.043478 | 0.391304 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7da270be2ee04de235dd0dfc5b966c52ba7cf65 | 35,831 | py | Python | Wrangle OSM Dataset.py | Boykai/Project-3-Wrangle-OpenStreetMap-Dataset | 493a4346ae12fb0fe853d4d07e4e8b03ef6a430f | [
"MIT"
] | 1 | 2017-09-01T11:07:26.000Z | 2017-09-01T11:07:26.000Z | Wrangle OSM Dataset.py | Boykai/Project-3-Wrangle-OpenStreetMap-Dataset | 493a4346ae12fb0fe853d4d07e4e8b03ef6a430f | [
"MIT"
] | null | null | null | Wrangle OSM Dataset.py | Boykai/Project-3-Wrangle-OpenStreetMap-Dataset | 493a4346ae12fb0fe853d4d07e4e8b03ef6a430f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on Tue Jan 17 16:19:36 2017
@author: Boykai
'''
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xml.etree.cElementTree as ET # Use cElementTree or lxml if too slow
from collections import defaultdict
import re
import pprint
import string
import codecs
import json
import os
f... | 40.996568 | 127 | 0.471966 | 3,430 | 35,831 | 4.833236 | 0.177551 | 0.015683 | 0.013753 | 0.008686 | 0.31578 | 0.270298 | 0.231994 | 0.170708 | 0.160755 | 0.134033 | 0 | 0.016922 | 0.434317 | 35,831 | 874 | 128 | 40.996568 | 0.800977 | 0.252268 | 0 | 0.155419 | 0 | 0.006135 | 0.160587 | 0.010278 | 0 | 0 | 0 | 0 | 0 | 1 | 0.05317 | false | 0.006135 | 0.018405 | 0 | 0.114519 | 0.108384 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7defbba24700ce1dff5cfd0c991ccf13a0c39e0 | 1,857 | py | Python | part-2/2-iterators/Example-consuming_iterators_manually.py | boconlonton/python-deep-dive | c01591a4943c7b77d4d2cd90a8b23423280367a3 | [
"MIT"
] | null | null | null | part-2/2-iterators/Example-consuming_iterators_manually.py | boconlonton/python-deep-dive | c01591a4943c7b77d4d2cd90a8b23423280367a3 | [
"MIT"
] | null | null | null | part-2/2-iterators/Example-consuming_iterators_manually.py | boconlonton/python-deep-dive | c01591a4943c7b77d4d2cd90a8b23423280367a3 | [
"MIT"
] | null | null | null | """
Consuming Iterator manually
"""
from collections import namedtuple
def cast(data_type, value):
"""Cast the value into a correct data type"""
if data_type == 'DOUBLE':
return float(value)
elif data_type == 'STRING':
return str(value)
elif data_type == 'INT':
return int(value... | 27.308824 | 58 | 0.525579 | 228 | 1,857 | 4.135965 | 0.223684 | 0.057264 | 0.104984 | 0.079533 | 0.544008 | 0.544008 | 0.482503 | 0.446448 | 0.398727 | 0.398727 | 0 | 0.004688 | 0.310716 | 1,857 | 67 | 59 | 27.716418 | 0.732031 | 0.548196 | 0 | 0 | 0 | 0 | 0.044081 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.041667 | 0.041667 | 0.291667 | 0.041667 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7dfa49c85bfb3c402f6a966ce46d040dfc275f6 | 1,675 | py | Python | instance_server/services/startpage.py | Geierhaas/developer-observatory | f2e840ab9a283ea82353a8c5bbb6b1905567fbe4 | [
"MIT"
] | 4 | 2017-08-26T04:51:52.000Z | 2022-01-02T23:07:48.000Z | instance_server/services/startpage.py | Geierhaas/developer-observatory | f2e840ab9a283ea82353a8c5bbb6b1905567fbe4 | [
"MIT"
] | 3 | 2020-11-04T11:13:55.000Z | 2021-03-08T19:47:52.000Z | instance_server/services/startpage.py | Geierhaas/developer-observatory | f2e840ab9a283ea82353a8c5bbb6b1905567fbe4 | [
"MIT"
] | 6 | 2017-10-24T14:44:05.000Z | 2022-01-13T14:26:05.000Z | #! Copyright (C) 2017 Christian Stransky
#!
#! This software may be modified and distributed under the terms
#! of the MIT license. See the LICENSE file for details.
from flask import Flask, redirect, request, make_response
from shutil import copyfile
import json
import requests
import os.path
import uuid
... | 34.183673 | 110 | 0.677612 | 238 | 1,675 | 4.596639 | 0.453782 | 0.058501 | 0.032907 | 0.031079 | 0.056673 | 0.056673 | 0.056673 | 0.056673 | 0 | 0 | 0 | 0.011538 | 0.223881 | 1,675 | 48 | 111 | 34.895833 | 0.83 | 0.30806 | 0 | 0 | 0 | 0 | 0.139873 | 0.090827 | 0 | 0 | 0 | 0 | 0 | 1 | 0.033333 | false | 0 | 0.233333 | 0 | 0.3 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7e02aed4c2632acfe7ae12115128aac02a396d3 | 672 | py | Python | utils/linalg.py | cimat-ris/TrajectoryInference | 27d1d2d692df52b403cf6557ecba628f818cd380 | [
"Apache-2.0"
] | 6 | 2019-11-05T00:56:06.000Z | 2021-12-05T21:11:14.000Z | utils/linalg.py | cimat-ris/TrajectoryInference | 27d1d2d692df52b403cf6557ecba628f818cd380 | [
"Apache-2.0"
] | 2 | 2021-05-22T11:16:45.000Z | 2021-05-31T00:42:07.000Z | utils/linalg.py | cimat-ris/TrajectoryInference | 27d1d2d692df52b403cf6557ecba628f818cd380 | [
"Apache-2.0"
] | 1 | 2021-05-22T10:35:18.000Z | 2021-05-22T10:35:18.000Z | import numpy as np
import math
import logging
from termcolor import colored
# Check a matrix for: negative eigenvalues, asymmetry and negative diagonal values
def positive_definite(M,epsilon = 0.000001,verbose=False):
# Symmetrization
Mt = np.transpose(M)
M = (M + Mt)/2
eigenvalues = np.linalg.eigvals(... | 29.217391 | 82 | 0.616071 | 88 | 672 | 4.693182 | 0.5 | 0.09201 | 0.029056 | 0.053269 | 0.140436 | 0 | 0 | 0 | 0 | 0 | 0 | 0.027426 | 0.294643 | 672 | 22 | 83 | 30.545455 | 0.843882 | 0.141369 | 0 | 0.210526 | 0 | 0 | 0.080139 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.052632 | false | 0 | 0.210526 | 0 | 0.421053 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
b7e0fbad2360576b896a69e1a30c6d6156b68c38 | 282 | py | Python | problemsets/Codeforces/Python/A1020.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | problemsets/Codeforces/Python/A1020.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | problemsets/Codeforces/Python/A1020.py | juarezpaulino/coderemite | a4649d3f3a89d234457032d14a6646b3af339ac1 | [
"Apache-2.0"
] | null | null | null | """
*
* Author: Juarez Paulino(coderemite)
* Email: juarez.paulino@gmail.com
*
"""
I=lambda:map(int,input().split())
f=abs
n,_,a,b,k=I()
while k:
p,q,u,v=I()
P=[a,b]
if a<=q<=b:P+=[q]
if a<=v<=b:P+=[v]
print([min(f(q-x)+f(v-x)for x in P)+f(p-u),f(q-v)][p==u])
k-=1 | 17.625 | 59 | 0.521277 | 66 | 282 | 2.212121 | 0.469697 | 0.178082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004202 | 0.156028 | 282 | 16 | 60 | 17.625 | 0.609244 | 0.265957 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 |
b7e377e1a140ad61d79142b999a2e7a703c9e2ef | 1,284 | py | Python | idact/detail/config/validation/validate_scratch.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 5 | 2018-12-06T15:40:34.000Z | 2019-06-19T11:22:58.000Z | idact/detail/config/validation/validate_scratch.py | garstka/idact | b9c8405c94db362c4a51d6bfdf418b14f06f0da1 | [
"MIT"
] | 9 | 2018-12-06T16:35:26.000Z | 2019-04-28T19:01:40.000Z | idact/detail/config/validation/validate_scratch.py | intdata-bsc/idact | 54cb65a711c145351e205970c27c83e6393cccf5 | [
"MIT"
] | 2 | 2019-04-28T19:18:58.000Z | 2019-06-17T06:56:28.000Z | """This module contains a function for validating a scratch config entry."""
import re
from idact.detail.config.validation.validation_error_message import \
validation_error_message
VALID_SCRATCH_DESCRIPTION = 'Non-empty absolute path, or environment' \
' variable name.'
VALID_SCRATC... | 29.181818 | 96 | 0.660436 | 148 | 1,284 | 5.547297 | 0.52027 | 0.116931 | 0.107186 | 0.065773 | 0.241169 | 0.241169 | 0.241169 | 0.241169 | 0.241169 | 0.241169 | 0 | 0.002073 | 0.248442 | 1,284 | 43 | 97 | 29.860465 | 0.848705 | 0.273364 | 0 | 0.380952 | 0 | 0 | 0.114155 | 0.03653 | 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 |