hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c1fa13883070fa0500e4ad32b4f9fe914e19917d | 21,559 | py | Python | tola/views.py | meetdatastory/Activity-CE | 2692e591f08cea7c869c045577b3d9e20d3ed335 | [
"Apache-2.0"
] | null | null | null | tola/views.py | meetdatastory/Activity-CE | 2692e591f08cea7c869c045577b3d9e20d3ed335 | [
"Apache-2.0"
] | null | null | null | tola/views.py | meetdatastory/Activity-CE | 2692e591f08cea7c869c045577b3d9e20d3ed335 | [
"Apache-2.0"
] | null | null | null | from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.views.generic.list import ListView
from tola.forms import RegistrationForm, NewUserRegistrationForm, NewTolaUserRegistrationForm, BookmarkForm
from django.contrib import messages
from django.contrib.auth import logout
from django.http ... | 54.304786 | 353 | 0.689271 | 3,564 | 0.165314 | 0 | 0 | 15,190 | 0.704578 | 0 | 0 | 3,863 | 0.179183 |
c1fac333c6571737c3ec2918f3ba6fbd833a009a | 1,163 | py | Python | ct8_refresh/loggers.py | jakubkazimierczak/ct8_refresh | 252f1a80a64a6a249cf4d014d19b96291e4e5ad1 | [
"Apache-2.0"
] | null | null | null | ct8_refresh/loggers.py | jakubkazimierczak/ct8_refresh | 252f1a80a64a6a249cf4d014d19b96291e4e5ad1 | [
"Apache-2.0"
] | 3 | 2021-01-27T20:46:37.000Z | 2021-04-05T23:03:15.000Z | ct8_refresh/loggers.py | jakubkazimierczak/ct8_refresh | 252f1a80a64a6a249cf4d014d19b96291e4e5ad1 | [
"Apache-2.0"
] | null | null | null | import sys
from loguru import logger
from . import LOG_PATH
class Loggers:
def __init__(self, debug_switch=None):
self.file_handler_id = None
self.stderr_handler_id = None
# Initialise loggers
logger.remove() # Disable default logger
if debug_switch:
self.ad... | 29.820513 | 107 | 0.576096 | 1,098 | 0.94411 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.281169 |
c1facf349310b75831421e5671ac8c159795b995 | 60 | py | Python | thinc/neural/_classes/feed_forward.py | alephmelo/thinc | 5c4340eddbe1f21649f773bc68b4b0600cf414ba | [
"MIT"
] | 1 | 2018-10-30T07:19:27.000Z | 2018-10-30T07:19:27.000Z | thinc/neural/_classes/feed_forward.py | alephmelo/thinc | 5c4340eddbe1f21649f773bc68b4b0600cf414ba | [
"MIT"
] | 4 | 2020-07-26T02:10:42.000Z | 2021-03-31T18:48:58.000Z | thinc/neural/_classes/feed_forward.py | alephmelo/thinc | 5c4340eddbe1f21649f773bc68b4b0600cf414ba | [
"MIT"
] | 1 | 2020-11-18T06:18:15.000Z | 2020-11-18T06:18:15.000Z | from ...api import FeedForward # For backward compatibility
| 30 | 59 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.466667 |
c1fce5796c28ca9136dea1e831dd68b25a314665 | 2,525 | py | Python | examples/low_rank_psd_matrix_approximation.py | captain-pool/pymanopt | df94ab9e03b5fa3041668defe995d93b8715a6d7 | [
"BSD-3-Clause"
] | null | null | null | examples/low_rank_psd_matrix_approximation.py | captain-pool/pymanopt | df94ab9e03b5fa3041668defe995d93b8715a6d7 | [
"BSD-3-Clause"
] | null | null | null | examples/low_rank_psd_matrix_approximation.py | captain-pool/pymanopt | df94ab9e03b5fa3041668defe995d93b8715a6d7 | [
"BSD-3-Clause"
] | null | null | null | import autograd.numpy as np
import tensorflow as tf
import torch
from numpy import linalg as la
from numpy import random as rnd
import pymanopt
from examples._tools import ExampleRunner
from pymanopt.manifolds import PSDFixedRank
from pymanopt.solvers import TrustRegions
SUPPORTED_BACKENDS = ("Autograd", "Callable",... | 27.747253 | 77 | 0.640396 | 0 | 0 | 0 | 0 | 791 | 0.313267 | 0 | 0 | 239 | 0.094653 |
c1fe6fd1b978cb6ac6a4eeb2262f5e8f9c0f51af | 52 | py | Python | profiler/profiler/utils/safe_divide.py | Hydrospheredata/hydro-profiler | bca177f8d71d9d8c93091f9a9fdf9a337582e194 | [
"Apache-2.0"
] | null | null | null | profiler/profiler/utils/safe_divide.py | Hydrospheredata/hydro-profiler | bca177f8d71d9d8c93091f9a9fdf9a337582e194 | [
"Apache-2.0"
] | 14 | 2021-11-22T18:07:28.000Z | 2022-01-14T08:51:45.000Z | profiler/profiler/utils/safe_divide.py | Hydrospheredata/hydro-profiler | bca177f8d71d9d8c93091f9a9fdf9a337582e194 | [
"Apache-2.0"
] | 1 | 2021-11-19T11:16:50.000Z | 2021-11-19T11:16:50.000Z | def safe_divide(n, d):
return n / d if d else 0
| 17.333333 | 28 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c1ff13cd5a2a14922d1493e6df72e80cbcc12e44 | 534 | py | Python | saefportal/datasets/migrations/0020_auto_20210901_0612.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | null | null | null | saefportal/datasets/migrations/0020_auto_20210901_0612.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | null | null | null | saefportal/datasets/migrations/0020_auto_20210901_0612.py | harry-consulting/SAEF1 | 055d6e492ba76f90e3248b9da2985fdfe0c6b430 | [
"BSD-2-Clause"
] | 1 | 2020-12-16T15:02:52.000Z | 2020-12-16T15:02:52.000Z | # Generated by Django 3.1.6 on 2021-09-01 06:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('datasets', '0019_auto_20210826_2054'),
]
operations = [
migrations.RenameField(
model_name='connection',
old_name='connectio... | 22.25 | 48 | 0.580524 | 449 | 0.840824 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.303371 |
de01c9c6a2cc6004b6daacdf13757b0791068e89 | 343 | py | Python | cartes/__init__.py | xoolive/cartes | a9e8144e8e40eec66e2a21e96c46d09ad4f63853 | [
"MIT"
] | 20 | 2021-01-04T21:23:48.000Z | 2021-12-14T15:28:15.000Z | cartes/__init__.py | xoolive/cartes | a9e8144e8e40eec66e2a21e96c46d09ad4f63853 | [
"MIT"
] | null | null | null | cartes/__init__.py | xoolive/cartes | a9e8144e8e40eec66e2a21e96c46d09ad4f63853 | [
"MIT"
] | null | null | null | import warnings
import importlib_metadata
from tqdm import TqdmExperimentalWarning
# Monkey-patches GeoAxesSubplot for .set_extent()
from .utils import geoaxes # noqa: F401
__version__ = importlib_metadata.version("cartes")
# Silence this warning about autonotebook mode for tqdm
warnings.simplefilter("ignore", Tq... | 24.5 | 56 | 0.822157 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.38484 |
de03ad9d5c100d9cf2fd590826d8994ef9cf5a4e | 3,730 | py | Python | src/experiments/sparse_experiments_bipartite_auc.py | ChristianDjurhuus/RAA | b2eb1db527bcb09f35598c2bbf8dff2689ad599b | [
"MIT"
] | 1 | 2022-03-16T16:09:22.000Z | 2022-03-16T16:09:22.000Z | src/experiments/sparse_experiments_bipartite_auc.py | ChristianDjurhuus/RAA | b2eb1db527bcb09f35598c2bbf8dff2689ad599b | [
"MIT"
] | null | null | null | src/experiments/sparse_experiments_bipartite_auc.py | ChristianDjurhuus/RAA | b2eb1db527bcb09f35598c2bbf8dff2689ad599b | [
"MIT"
] | 1 | 2022-02-18T17:10:27.000Z | 2022-02-18T17:10:27.000Z | from src.models.train_DRRAA_module import DRRAA
from src.models.train_LSM_module import LSM
from src.models.train_BDRRAA_module import BDRRAA
import torch
import matplotlib.pyplot as plt
import numpy as np
import json
import scipy.stats as st
import matplotlib as mpl
def sparse_experiments(datasets, ks, sample_size, i... | 41.910112 | 176 | 0.617158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 815 | 0.218499 |
de03ce4debb8154861870509c00893c2a07d55d2 | 1,531 | py | Python | Tensorflow/XOR_multilayer_nn.py | ram1993/neuralnetwork | ef98557b07d2c08bbfb8610bb622d58ac5100ad1 | [
"MIT"
] | null | null | null | Tensorflow/XOR_multilayer_nn.py | ram1993/neuralnetwork | ef98557b07d2c08bbfb8610bb622d58ac5100ad1 | [
"MIT"
] | null | null | null | Tensorflow/XOR_multilayer_nn.py | ram1993/neuralnetwork | ef98557b07d2c08bbfb8610bb622d58ac5100ad1 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
tf.set_random_seed(234)
x_data = np.array([[0, 0], [0, 1], [1, 0], [1, 1]], dtype=np.float32)
y_data = np.array([[0], [1], [1], [0]], dtype=np.float32)
x = tf.placeholder(tf.float32, shape = [None,2])
y = tf.placeholder(tf.float32, shape=[None, 1])
w1 = tf.Variable(tf.rando... | 28.351852 | 92 | 0.662312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 0.044415 |
de070afa042a313c96fb5ec549097de43204f066 | 21,498 | py | Python | health.py | elvis124/health | ead2a9031ecc422cca78d2d79f8529f708ff42f4 | [
"MIT"
] | 1 | 2019-03-06T09:37:28.000Z | 2019-03-06T09:37:28.000Z | health.py | elvis124/health | ead2a9031ecc422cca78d2d79f8529f708ff42f4 | [
"MIT"
] | null | null | null | health.py | elvis124/health | ead2a9031ecc422cca78d2d79f8529f708ff42f4 | [
"MIT"
] | null | null | null | #importing neccesary libaries and mudules needed to support functions
from __future__ import unicode_literals
from kivy.app import App
from kivy.config import Config
Config.set('input', 'multitouchscreen1', 'tuio,192.168.2.22:3306')
Config.set('postproc','desktop','1')
Config.set('kivy','exit_on_escape','1')
Config.set... | 47.041575 | 323 | 0.642618 | 18,486 | 0.859894 | 0 | 0 | 0 | 0 | 0 | 0 | 3,896 | 0.181226 |
de077e70e5610936c78771d56c4e95d42be457e1 | 1,055 | py | Python | locust/test/test_zmqrpc.py | ioneyed/locust | a8c0d7d8c588f3980303358298870f2ea394ab93 | [
"MIT"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | locust/test/test_zmqrpc.py | ioneyed/locust | a8c0d7d8c588f3980303358298870f2ea394ab93 | [
"MIT"
] | 2 | 2019-02-23T18:54:22.000Z | 2019-11-09T01:30:32.000Z | locust/test/test_zmqrpc.py | ioneyed/locust | a8c0d7d8c588f3980303358298870f2ea394ab93 | [
"MIT"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | import unittest
from time import sleep
import zmq
from locust.rpc import zmqrpc, Message
PORT = 5557
class ZMQRPC_tests(unittest.TestCase):
def setUp(self):
self.server = zmqrpc.Server('*', PORT)
self.client = zmqrpc.Client('localhost', PORT, 'identity')
def tearDown(self):
self.serve... | 31.969697 | 74 | 0.645498 | 951 | 0.901422 | 0 | 0 | 0 | 0 | 0 | 0 | 208 | 0.197156 |
de08caba4ef0b21f76f6627b323b97de341fa90a | 5,106 | py | Python | mangrove/bootstrap/views/measure_view_generation_times.py | mariot/mangrove | 376bca99818c6cc1d08b1c726f46b364c69b0cc7 | [
"BSD-3-Clause"
] | null | null | null | mangrove/bootstrap/views/measure_view_generation_times.py | mariot/mangrove | 376bca99818c6cc1d08b1c726f46b364c69b0cc7 | [
"BSD-3-Clause"
] | null | null | null | mangrove/bootstrap/views/measure_view_generation_times.py | mariot/mangrove | 376bca99818c6cc1d08b1c726f46b364c69b0cc7 | [
"BSD-3-Clause"
] | null | null | null | import datetime
from mangrove.datastore.database import get_db_manager,\
_delete_db_and_remove_db_manager
from mangrove.bootstrap.initializer import _find_views
from pytz import UTC
import random
from mangrove.datastore.entity import Entity
from collections import defaultdict
class ViewGenerationTimer(object):
... | 39.276923 | 110 | 0.62123 | 4,595 | 0.899922 | 0 | 0 | 0 | 0 | 0 | 0 | 843 | 0.1651 |
de08ddb186608454e8bbaacbc67356a1a3584bf7 | 14,411 | py | Python | solace/scripts.py | Plurk/Solace | 752a98e3279f1e7e0dafd6281e90ba24cb733474 | [
"BSD-3-Clause"
] | 4 | 2015-10-28T22:23:07.000Z | 2021-08-25T15:21:25.000Z | solace/scripts.py | sfermigier/solace | 32d0b398643344c797a40a094689300c364de3b0 | [
"BSD-3-Clause"
] | null | null | null | solace/scripts.py | sfermigier/solace | 32d0b398643344c797a40a094689300c364de3b0 | [
"BSD-3-Clause"
] | 1 | 2018-11-25T17:52:22.000Z | 2018-11-25T17:52:22.000Z | # -*- coding: utf-8 -*-
"""
solace.scripts
~~~~~~~~~~~~~~
Provides some setup.py commands. The js-translation compiler is taken
from Sphinx, the Python documentation tool.
:copyright: (c) 2009 by Plurk Inc.
(c) 2009 by the Sphinx Team, see AUTHORS for more details.
:license: B... | 37.334197 | 78 | 0.546319 | 13,473 | 0.934911 | 0 | 0 | 0 | 0 | 0 | 0 | 3,602 | 0.249948 |
de0ab5307c2122a25d2bba0938220eeea800d063 | 85 | py | Python | config.py | hjdteny/nodemcu-pyflasher-vam | 7b51f132ff52e12306b25db70fde2a54affe8a86 | [
"MIT"
] | null | null | null | config.py | hjdteny/nodemcu-pyflasher-vam | 7b51f132ff52e12306b25db70fde2a54affe8a86 | [
"MIT"
] | null | null | null | config.py | hjdteny/nodemcu-pyflasher-vam | 7b51f132ff52e12306b25db70fde2a54affe8a86 | [
"MIT"
] | null | null | null | VERSION = "1.3"
TITLE = "Speedshield VAM Flash Utility"
EXENAME = "VAM-Flash-Utility" | 28.333333 | 39 | 0.729412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.647059 |
de0b24691296a4bf0f78e47b9d82fcf62408dc87 | 20,854 | py | Python | ingest_cmorph.py | monocongo/ingest_cmorph | 4af25f3626184cfb9a89efa4da6729b9b46ebbbf | [
"BSD-3-Clause"
] | 5 | 2018-02-14T00:39:35.000Z | 2022-01-14T15:09:13.000Z | ingest_cmorph.py | monocongo/ingest_cmorph | 4af25f3626184cfb9a89efa4da6729b9b46ebbbf | [
"BSD-3-Clause"
] | 13 | 2018-01-25T23:19:04.000Z | 2019-04-12T18:15:39.000Z | ingest_cmorph.py | monocongo/ingest_cmorph | 4af25f3626184cfb9a89efa4da6729b9b46ebbbf | [
"BSD-3-Clause"
] | 1 | 2020-04-29T23:30:32.000Z | 2020-04-29T23:30:32.000Z | import argparse
import bz2
import calendar
from datetime import datetime
# import ftplib
import gzip
import logging
import netCDF4
import numpy as np
import os
import shutil
import urllib.error
import urllib.request
import warnings
#-----------------------------------------------------------------------... | 47.180995 | 197 | 0.545363 | 0 | 0 | 103 | 0.004939 | 0 | 0 | 0 | 0 | 10,665 | 0.511413 |
de0c0866e0e73f56c68f46aa289f7a3a8ae8815a | 744 | py | Python | setup.py | patthoyts/tivoctl | e780548992e71420b5734fdf4fcae8874d018d81 | [
"MIT"
] | 2 | 2019-05-06T21:04:48.000Z | 2019-05-07T04:37:49.000Z | setup.py | patthoyts/tivoctl | e780548992e71420b5734fdf4fcae8874d018d81 | [
"MIT"
] | null | null | null | setup.py | patthoyts/tivoctl | e780548992e71420b5734fdf4fcae8874d018d81 | [
"MIT"
] | 2 | 2018-12-08T23:45:54.000Z | 2021-06-01T21:32:31.000Z | #!/usr/bin/env python
import setuptools
import tivoctl
setuptools.setup(
name=tivoctl.__title__,
version=tivoctl.__version__,
description=tivoctl.__doc__,
url=tivoctl.__url__,
author=tivoctl.__author__,
author_email=tivoctl.__author_email__,
license=tivoctl.__license__,
long_descriptio... | 25.655172 | 60 | 0.647849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.331989 |
de0d3355466a1d74003a1deace60e7eaab7653de | 8,065 | py | Python | src/aslc/GLSLBackend.py | ronsaldo/aslc | 1c9570434c33b89ce7c238bee6e81dcde9c91daf | [
"MIT"
] | null | null | null | src/aslc/GLSLBackend.py | ronsaldo/aslc | 1c9570434c33b89ce7c238bee6e81dcde9c91daf | [
"MIT"
] | null | null | null | src/aslc/GLSLBackend.py | ronsaldo/aslc | 1c9570434c33b89ce7c238bee6e81dcde9c91daf | [
"MIT"
] | null | null | null | import StringIO
from HLBackend import *
BasicTypeRawMapping = (
('void', 'void'),
('int', 'int'),
(VectorType.get(BasicType_Int, 2), 'ivec2'),
(VectorType.get(BasicType_Int, 3), 'ivec3'),
(VectorType.get(BasicType_Int, 4), 'ivec4'),
('float', 'float'),
(VectorType.get(BasicType_Float, 2), 'vec2'),
(VectorTyp... | 28.199301 | 144 | 0.722505 | 6,020 | 0.746435 | 0 | 0 | 0 | 0 | 0 | 0 | 857 | 0.106262 |
de0d4fbe0dcdc845431d0fb590e975c2c855b47f | 1,078 | py | Python | geoapps/simpegPF/Utils/__init__.py | RichardScottOZ/geoapps | 5b3c1d4fd11add45992e8b2497312ac014272b69 | [
"MIT"
] | 1 | 2022-02-18T16:24:53.000Z | 2022-02-18T16:24:53.000Z | geoapps/simpegPF/Utils/__init__.py | sebhmg/geoapps | 1463ba4ec3c914abdc7403e54eca0ee2bbc3f4f4 | [
"MIT"
] | null | null | null | geoapps/simpegPF/Utils/__init__.py | sebhmg/geoapps | 1463ba4ec3c914abdc7403e54eca0ee2bbc3f4f4 | [
"MIT"
] | null | null | null | from discretize.utils.interputils import interpmat
from .matutils import (
mkvc,
sdiag,
sdInv,
speye,
kron3,
spzeros,
ddx,
av,
av_extrap,
ndgrid,
ind2sub,
sub2ind,
getSubArray,
inv3X3BlockDiagonal,
inv2X2BlockDiagonal,
TensorType,
makePropertyTensor,
... | 21.137255 | 81 | 0.730983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de0da2ca4c0ba12fc1befb15406b1a9d25acd3b2 | 4,229 | py | Python | domipy/messages/__init__.py | soliveira/python-domintell | 64876f9d4dae9c29f354c3cfac755c22fa980a73 | [
"MIT"
] | null | null | null | domipy/messages/__init__.py | soliveira/python-domintell | 64876f9d4dae9c29f354c3cfac755c22fa980a73 | [
"MIT"
] | null | null | null | domipy/messages/__init__.py | soliveira/python-domintell | 64876f9d4dae9c29f354c3cfac755c22fa980a73 | [
"MIT"
] | null | null | null | """
:author: Thomas Delaet <thomas@delaet.org>
"""
# pylint: disable-msg=C0301
# appifo scan messages and system messages
from domipy.messages.appinfo_request import AppInfoRequest
from domipy.messages.module_info import ModuleInfoMessage
from domipy.messages.ping import Ping
from domipy.messages.hello import Hello
fro... | 56.386667 | 80 | 0.895011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.036415 |
de11b84d64c7ee5e90a81ea6db93a10f72c41fe6 | 8,823 | py | Python | ray_shuffling_data_loader/dataset.py | richardliaw/ray_shuffling_data_loader | 055a0d47f823d878087a2a2d3fe50483b525f685 | [
"Apache-2.0"
] | null | null | null | ray_shuffling_data_loader/dataset.py | richardliaw/ray_shuffling_data_loader | 055a0d47f823d878087a2a2d3fe50483b525f685 | [
"Apache-2.0"
] | null | null | null | ray_shuffling_data_loader/dataset.py | richardliaw/ray_shuffling_data_loader | 055a0d47f823d878087a2a2d3fe50483b525f685 | [
"Apache-2.0"
] | null | null | null | import functools
from typing import List, Iterable
import pandas as pd
import ray
from ray._private.utils import get_num_cpus
from ray_shuffling_data_loader.shuffle import shuffle
from ray_shuffling_data_loader.multiqueue import MultiQueue
MULTIQUEUE_ACTOR_NAME = "MultiQueue"
REDUCER_CLUSTER_CORE_SHARE = 0.6
class ... | 39.923077 | 79 | 0.607163 | 6,007 | 0.680834 | 2,359 | 0.267369 | 0 | 0 | 0 | 0 | 3,591 | 0.407004 |
de14580203ff2ebf6ca00267c60b3e970d34d7b5 | 93 | py | Python | divi.py | Shashanksinha9/hacktoberfest2021 | 20e66cb5d6d8d4879366cd921407d0c50eef0557 | [
"Apache-2.0"
] | 4 | 2021-10-01T17:56:54.000Z | 2021-10-11T05:49:20.000Z | divi.py | Shashanksinha9/hacktoberfest2021 | 20e66cb5d6d8d4879366cd921407d0c50eef0557 | [
"Apache-2.0"
] | 4 | 2021-10-01T13:50:00.000Z | 2021-10-11T05:52:12.000Z | divi.py | Shashanksinha9/hacktoberfest2021 | 20e66cb5d6d8d4879366cd921407d0c50eef0557 | [
"Apache-2.0"
] | 31 | 2021-09-29T14:15:57.000Z | 2021-10-16T03:32:24.000Z | name=input("Enter the name : ")
def greet(name):
print("Good day, "+ name )
greet(name)
| 15.5 | 31 | 0.623656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.333333 |
de14812da4cbab8dfe169e0a68268beebae12f71 | 230 | py | Python | HeavyFlavorAnalysis/Skimming/python/tauTo3MuSequences_cff.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | HeavyFlavorAnalysis/Skimming/python/tauTo3MuSequences_cff.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | HeavyFlavorAnalysis/Skimming/python/tauTo3MuSequences_cff.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
from HeavyFlavorAnalysis.Skimming.tauTo3MuHLTPath_cfi import *
from HeavyFlavorAnalysis.Skimming.tauTo3MuFilter_cfi import *
tauTo3MuSkim = cms.Sequence(tauTo3MuHLTFilter+tauTo3MuFilter)
| 32.857143 | 62 | 0.869565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de148a2bd0c9ed523e7886ae8641709d4250a936 | 693 | py | Python | dash_docs/chapters/dash_vtk/other/examples/t05_reader.py | wesleyacheng/dash-docs | c8510bf50d0ae55a56ae30f3057f2bfc6d3ca8d6 | [
"MIT"
] | 379 | 2017-06-21T14:35:52.000Z | 2022-03-20T01:47:14.000Z | dash_docs/chapters/dash_vtk/other/examples/t05_reader.py | wesleyacheng/dash-docs | c8510bf50d0ae55a56ae30f3057f2bfc6d3ca8d6 | [
"MIT"
] | 746 | 2017-06-21T19:58:17.000Z | 2022-03-23T14:51:24.000Z | dash_docs/chapters/dash_vtk/other/examples/t05_reader.py | wesleyacheng/dash-docs | c8510bf50d0ae55a56ae30f3057f2bfc6d3ca8d6 | [
"MIT"
] | 201 | 2017-06-21T21:53:19.000Z | 2022-03-17T13:23:55.000Z | import os
import dash
import dash_html_components as html
import dash_vtk
# Get it here: https://github.com/plotly/dash-vtk/blob/master/demos/data/cow-nonormals.obj
obj_file = "datasets/cow-nonormals.obj"
txt_content = None
with open(obj_file, 'r') as file:
txt_content = file.read()
content = dash_vtk.View([
... | 19.8 | 90 | 0.670996 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.266955 |
de149369b41d1ec4e6f661199e6f83b94f8b5653 | 416 | py | Python | day4/00_composition.py | jduell12/CS35_IntroPython_GP | 07036f884252497a9da0cd4aaeed017f3fe741bb | [
"MIT"
] | null | null | null | day4/00_composition.py | jduell12/CS35_IntroPython_GP | 07036f884252497a9da0cd4aaeed017f3fe741bb | [
"MIT"
] | null | null | null | day4/00_composition.py | jduell12/CS35_IntroPython_GP | 07036f884252497a9da0cd4aaeed017f3fe741bb | [
"MIT"
] | 1 | 2021-04-09T17:35:57.000Z | 2021-04-09T17:35:57.000Z |
"""
Inheritance
- a base class is the 'parent' class which other classes can inherit attributes from
- sub classes inherit from a parent class and can add more attributes to themselves in addition to the attributes inherited from the parent class
- think of sub class as a 'is-a' relationship of the parent class
C... | 27.733333 | 145 | 0.762019 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 414 | 0.995192 |
a9a5e57bf265778860430aa86749885c36d7995e | 7,281 | py | Python | traffic/build_dataset.py | daniele-canavese/fingerprinting | 180cffd8e3edda0fe99fac003832027e1388687a | [
"Apache-2.0"
] | null | null | null | traffic/build_dataset.py | daniele-canavese/fingerprinting | 180cffd8e3edda0fe99fac003832027e1388687a | [
"Apache-2.0"
] | null | null | null | traffic/build_dataset.py | daniele-canavese/fingerprinting | 180cffd8e3edda0fe99fac003832027e1388687a | [
"Apache-2.0"
] | null | null | null | from argparse import ArgumentParser
from glob import glob
from os import listdir
from os import system
from os import unlink
from os.path import isdir
from numpy import linspace
# Parses the input arguments.
from numpy import split
from pandas import DataFrame
from pandas import read_csv
parser = ArgumentParser(descr... | 41.605714 | 117 | 0.513391 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,323 | 0.31905 |
a9a67980e424c4f01050fbfb15319a06062ec61b | 3,792 | py | Python | dfm-i.py | gmlunesa/detectfacemask | 92add56de32ab28bf9179986876407d681a5d6b6 | [
"MIT"
] | 6 | 2020-11-20T13:28:43.000Z | 2021-12-16T06:42:46.000Z | dfm-i.py | gmlunesa/detectfacemask | 92add56de32ab28bf9179986876407d681a5d6b6 | [
"MIT"
] | null | null | null | dfm-i.py | gmlunesa/detectfacemask | 92add56de32ab28bf9179986876407d681a5d6b6 | [
"MIT"
] | null | null | null | # Import the necessary packages and libraries
import numpy as np
import argparse
import cv2
import os
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing.image import img_to_array
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input
# Arguments are expected to be the ... | 31.338843 | 79 | 0.709652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,552 | 0.409283 |
a9a7302bf2bdc1e18b089f25ec17e63f11337e81 | 22 | py | Python | Python/BackgroundApp/BackgroundApp/PythonHome/WinRTExtension.zip/WinRT/__init__.py | Carlosgm02/UWP-Languages | b5653c8f452b204645e3b6276caa95de2432f77e | [
"MIT"
] | 6 | 2019-10-30T08:41:15.000Z | 2021-02-24T09:20:46.000Z | Python/BackgroundApp/BackgroundApp/PythonHome/WinRTExtension.zip/WinRT/__init__.py | carlosgm02/uwp-languages | b5653c8f452b204645e3b6276caa95de2432f77e | [
"MIT"
] | null | null | null | Python/BackgroundApp/BackgroundApp/PythonHome/WinRTExtension.zip/WinRT/__init__.py | carlosgm02/uwp-languages | b5653c8f452b204645e3b6276caa95de2432f77e | [
"MIT"
] | null | null | null | from _winrt import *
| 11 | 21 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a9a7bb5db5244b6878098fc53823b91f4fc0297e | 439 | py | Python | ExerciciosdePython/ex065.py | aleksandromelo/Exercicios | 782ff539efa1286180eaf8df8c25c4eca7a5e669 | [
"MIT"
] | null | null | null | ExerciciosdePython/ex065.py | aleksandromelo/Exercicios | 782ff539efa1286180eaf8df8c25c4eca7a5e669 | [
"MIT"
] | null | null | null | ExerciciosdePython/ex065.py | aleksandromelo/Exercicios | 782ff539efa1286180eaf8df8c25c4eca7a5e669 | [
"MIT"
] | null | null | null | n = 0
op = ''
cont = 0
soma = 0
maior = 0
menor = 0
while op in 'Ss':
n = int(input('Digite um número: '))
op = str(input('Quer continuar? [S/N] ')).upper().strip()[0]
cont += 1
soma += n
media = soma / cont
if cont == 1:
maior = n
menor = n
else:
if n > maior:
... | 16.259259 | 64 | 0.457859 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.2 |
a9a915fa17967a2202dcf4b6b40dcb29d45aca39 | 4,482 | py | Python | hantek_wave_viewer/__init__.py | mattdavis90/hantek-wave-viewer | 5cb2b10ec56ef73015cd7b7a1c1d1983fa89cc07 | [
"MIT"
] | 3 | 2021-07-30T13:05:39.000Z | 2022-03-21T11:13:32.000Z | hantek_wave_viewer/__init__.py | mattdavis90/hantek-wave-viewer | 5cb2b10ec56ef73015cd7b7a1c1d1983fa89cc07 | [
"MIT"
] | 1 | 2022-01-02T13:37:45.000Z | 2022-01-02T16:18:22.000Z | hantek_wave_viewer/__init__.py | mattdavis90/hantek-wave-viewer | 5cb2b10ec56ef73015cd7b7a1c1d1983fa89cc07 | [
"MIT"
] | 2 | 2021-11-01T16:20:41.000Z | 2021-11-25T13:17:20.000Z | import click
import matplotlib.pyplot as plt
import matplotlib.transforms as transforms
import numpy as np
from kaitaistruct import KaitaiStructError
from matplotlib.ticker import MultipleLocator, NullFormatter
from .parser.hantek import Hantek
from .parser import conversions, utils
@click.argument("filename", type=... | 45.272727 | 107 | 0.694333 | 0 | 0 | 0 | 0 | 4,194 | 0.935743 | 0 | 0 | 700 | 0.15618 |
a9aa11beddbf453f76e21bbaf090fbb954fec6e5 | 1,102 | py | Python | test/test_phones.py | miaowization/PythonTraining | 32ff6ceedc3ba15efbc86b1bb8afbf65060690a1 | [
"Apache-2.0"
] | null | null | null | test/test_phones.py | miaowization/PythonTraining | 32ff6ceedc3ba15efbc86b1bb8afbf65060690a1 | [
"Apache-2.0"
] | null | null | null | test/test_phones.py | miaowization/PythonTraining | 32ff6ceedc3ba15efbc86b1bb8afbf65060690a1 | [
"Apache-2.0"
] | null | null | null | import re
import random
def test_phones_on_home_page(app):
contacts = app.contact.get_contact_list()
index = random.randrange(len((contacts)))
contact_from_home_page = app.contact.get_contact_list()[index]
contact_from_edit_page = app.contact.get_contact_info_from_edit_page(index)
assert contact_fr... | 47.913043 | 129 | 0.831216 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a9ab13c622bacfe72e062806000e550232c0a0df | 9,672 | py | Python | scanner/vuln-creator/vulns_creator.py | mercadolibre/afip-grails | d38daa57a66d3ccc71c481a35148c1136a2d867f | [
"Apache-2.0"
] | 22 | 2019-01-28T17:47:08.000Z | 2020-05-14T21:49:49.000Z | scanner/vuln-creator/vulns_creator.py | joaquinlpereyra-ml/afip-grails | 607211959394b6f05c064732398bde58cc009489 | [
"Apache-2.0"
] | null | null | null | scanner/vuln-creator/vulns_creator.py | joaquinlpereyra-ml/afip-grails | 607211959394b6f05c064732398bde58cc009489 | [
"Apache-2.0"
] | 1 | 2021-05-19T15:18:11.000Z | 2021-05-19T15:18:11.000Z | import requests
import code
import json
import os.path
from pathlib import Path
AFIP_GROOVY_PATH = '{}/scanner'.format(Path('.'))
class Problem:
def __init__(self, name, problem_dict):
self.name = name
for key in problem_dict:
setattr(self, key, problem_dict[key])
def __str__(self... | 41.689655 | 127 | 0.580438 | 7,979 | 0.824959 | 0 | 0 | 0 | 0 | 0 | 0 | 2,658 | 0.274814 |
a9ab94f9f5d611ce8b806cca6cd5a5489f613dbb | 543 | py | Python | heritage/migrations/0034_auto_20160223_1445.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | null | null | null | heritage/migrations/0034_auto_20160223_1445.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | 11 | 2020-03-24T15:29:46.000Z | 2022-03-11T23:14:48.000Z | heritage/migrations/0034_auto_20160223_1445.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('heritage', '0033_merge'),
]
operations = [
migrations.RemoveField(
model_name='sessionasset',
name='i... | 21.72 | 40 | 0.569061 | 434 | 0.799263 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.213628 |
a9aefe76b63591df69e485f31359a5e8e36a478c | 1,301 | py | Python | 15/tests.py | remihuguet/aoc2020 | c313c5b425dda92d949fd9ca4f18ff66f452794f | [
"MIT"
] | null | null | null | 15/tests.py | remihuguet/aoc2020 | c313c5b425dda92d949fd9ca4f18ff66f452794f | [
"MIT"
] | null | null | null | 15/tests.py | remihuguet/aoc2020 | c313c5b425dda92d949fd9ca4f18ff66f452794f | [
"MIT"
] | null | null | null | import pytest
import memory
inputs = [
(0, 3, 6, 436),
(1, 3, 2, 1),
(2, 1, 3, 10),
(1, 2, 3, 27),
(2, 3, 1, 78),
(3, 2, 1, 438),
(3, 1, 2, 1836)
]
@pytest.fixture(params=inputs)
def starting(request):
return list(request.param[:3]), request.param[-1]
def test_apply_rule_for_one_tur... | 23.654545 | 82 | 0.601845 | 0 | 0 | 0 | 0 | 221 | 0.169869 | 0 | 0 | 0 | 0 |
a9b0a0692415b86e04e3728ac107f178159ea369 | 4,883 | py | Python | Tools/Asynchronous_and_Constant_Input_API_call_checker/constant_input_parse_outfile.py | mlapistudy/ICSE2021_421 | c7fca3ba7d53917b3b6de28a8cb1d343b5959118 | [
"BSD-2-Clause"
] | 9 | 2021-04-06T15:02:58.000Z | 2022-03-07T03:36:22.000Z | Tools/Asynchronous_and_Constant_Input_API_call_checker/constant_input_parse_outfile.py | mlapistudy/ICSE2021_421 | c7fca3ba7d53917b3b6de28a8cb1d343b5959118 | [
"BSD-2-Clause"
] | null | null | null | Tools/Asynchronous_and_Constant_Input_API_call_checker/constant_input_parse_outfile.py | mlapistudy/ICSE2021_421 | c7fca3ba7d53917b3b6de28a8cb1d343b5959118 | [
"BSD-2-Clause"
] | 1 | 2022-02-22T16:21:30.000Z | 2022-02-22T16:21:30.000Z | import sys
import re
from utils.utils import print_writeofd
# First argument is whether or not to proceed with manual checking:
if sys.argv[1] == '-m':
MANUAL_CHECKING = True
elif sys.argv[1] == '-a':
MANUAL_CHECKING = False
else:
print("The first argument must be either -m or -a, see README.md for details... | 37.561538 | 166 | 0.589392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,227 | 0.456072 |
a9b112d0bd56a41caca4c0915a3d8b20397d3e01 | 10,319 | py | Python | seaice/tools/reader.py | andypbarrett/nsidc-seaice | 167a16309f7eaadd5c613b54a7df26eb1f48c2f3 | [
"MIT"
] | 2 | 2020-08-27T08:40:22.000Z | 2021-04-14T15:42:09.000Z | seaice/tools/reader.py | andypbarrett/nsidc-seaice | 167a16309f7eaadd5c613b54a7df26eb1f48c2f3 | [
"MIT"
] | null | null | null | seaice/tools/reader.py | andypbarrett/nsidc-seaice | 167a16309f7eaadd5c613b54a7df26eb1f48c2f3 | [
"MIT"
] | null | null | null | import calendar
import os
import re
import pandas as pd
REGIONAL_SHEETS = ['Baffin-Area-km^2',
'Baffin-Extent-km^2',
'Barents-Area-km^2',
'Barents-Extent-km^2',
'Beaufort-Area-km^2',
'Beaufort-Extent-km^2',
... | 36.72242 | 98 | 0.515069 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,261 | 0.316019 |
a9b19a34b450c33dfddc6881e62d1f7147ec860d | 599 | py | Python | examples/accelerate/numba.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | examples/accelerate/numba.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | examples/accelerate/numba.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : numba
# @Time : 2019-12-26 14:52
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
from numba import jit, njit, vectorize
import numpy as np
x = np.arange(10... | 20.655172 | 64 | 0.597663 | 0 | 0 | 0 | 0 | 254 | 0.397496 | 0 | 0 | 395 | 0.618153 |
a9b2db3f369fcfd5b77d040b3bc04025ef934688 | 7,215 | py | Python | experiment-2/02_gm_correlations_across_masks.py | NBCLab/power-replication | 7a938cac6fd132f8cbd76535255680aeb2e550cb | [
"Apache-2.0"
] | 1 | 2021-12-20T13:30:23.000Z | 2021-12-20T13:30:23.000Z | experiment-2/02_gm_correlations_across_masks.py | NBCLab/power-replication | 7a938cac6fd132f8cbd76535255680aeb2e550cb | [
"Apache-2.0"
] | 14 | 2020-12-21T15:58:45.000Z | 2022-03-16T22:20:25.000Z | experiment-2/02_gm_correlations_across_masks.py | NBCLab/power-replication | 7a938cac6fd132f8cbd76535255680aeb2e550cb | [
"Apache-2.0"
] | null | null | null | """Experiment 2, Analysis Group 2.
Comparing measures of global signal.
Mean cortical signal of MEDN correlated with signal of all gray matter
- Distribution of Pearson correlation coefficients
- Page 2, right column, first paragraph
Mean cortical signal of MEDN correlated with signal of whole brain
- Distribu... | 35.195122 | 98 | 0.60693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,601 | 0.499099 |
a9b2fc7d45738b3e7655e81adf3bd08e96111434 | 2,119 | py | Python | scripts/dataset_processing/ljspeech/create_token2idx_dict.py | PatrykNeubauer/NeMo | 3ada744b884dba5f233f22c6991fc6092c6ca8d0 | [
"Apache-2.0"
] | null | null | null | scripts/dataset_processing/ljspeech/create_token2idx_dict.py | PatrykNeubauer/NeMo | 3ada744b884dba5f233f22c6991fc6092c6ca8d0 | [
"Apache-2.0"
] | null | null | null | scripts/dataset_processing/ljspeech/create_token2idx_dict.py | PatrykNeubauer/NeMo | 3ada744b884dba5f233f22c6991fc6092c6ca8d0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 30.710145 | 84 | 0.641812 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 975 | 0.460123 |
a9b47fd15b255df5f1689bdd0c7eac646455b225 | 123 | py | Python | fortnitepy/ext/commands/typedefs.py | zw5/fortnitepy | 4aa1bbb58275fcd87a0ed28d80701ecdc55e923a | [
"MIT"
] | null | null | null | fortnitepy/ext/commands/typedefs.py | zw5/fortnitepy | 4aa1bbb58275fcd87a0ed28d80701ecdc55e923a | [
"MIT"
] | null | null | null | fortnitepy/ext/commands/typedefs.py | zw5/fortnitepy | 4aa1bbb58275fcd87a0ed28d80701ecdc55e923a | [
"MIT"
] | null | null | null | from typing import Union
from fortnitepy import FriendMessage, PartyMessage
Message = Union[FriendMessage, PartyMessage]
| 20.5 | 50 | 0.837398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a9b4cd658e27fcad2f69590611913292ad17226d | 1,087 | py | Python | projectoAdmVeh/negocio/tipoVehiculo.py | Jofemago/Administrador_vehiculos | 9e523498b2b5bc47d05d24cd0d02ba833abd07d6 | [
"MIT"
] | null | null | null | projectoAdmVeh/negocio/tipoVehiculo.py | Jofemago/Administrador_vehiculos | 9e523498b2b5bc47d05d24cd0d02ba833abd07d6 | [
"MIT"
] | null | null | null | projectoAdmVeh/negocio/tipoVehiculo.py | Jofemago/Administrador_vehiculos | 9e523498b2b5bc47d05d24cd0d02ba833abd07d6 | [
"MIT"
] | 1 | 2019-07-18T03:49:58.000Z | 2019-07-18T03:49:58.000Z | from modelo.BD_tipoVehiculo import _TipoVehiculo
from modelo.createDatabase import makeEngine
from modelo.createDatabase import makeBase
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
class TipoVehiculo:
base = makeBase()
eng = makeEngine()
def __init__(... | 20.509434 | 70 | 0.590616 | 754 | 0.693652 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.082797 |
a9b56b0379c4118f82605a6de23ecfa9e150dac1 | 3,454 | py | Python | mt_dnn/inference.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 2,075 | 2019-02-25T08:54:38.000Z | 2022-03-31T10:44:50.000Z | mt_dnn/inference.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 176 | 2019-03-12T02:58:42.000Z | 2022-03-22T20:17:23.000Z | mt_dnn/inference.py | anlewy/mt-dnn | eeb6f01ce0630e61a52b8c9c6f7537cd34978e45 | [
"MIT"
] | 437 | 2019-03-11T21:36:21.000Z | 2022-03-29T02:40:53.000Z | # coding=utf-8
# Copyright (c) Microsoft. All rights reserved.
import enum
from numpy.lib.arraysetops import isin
from numpy.lib.function_base import insert
from data_utils.metrics import calc_metrics
from mt_dnn.batcher import Collater
from data_utils.task_def import TaskType
from data_utils.utils_qa import postproces... | 36.357895 | 120 | 0.657209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 73 | 0.021135 |
a9b5d1f91dcab6368915c512048ca47cccd01d6f | 2,694 | py | Python | gffpal/scripts/rnammer2gff.py | darcyabjones/gffpal | 9e195d94f5c9e259fa26f4840fbd440e3b37f777 | [
"Apache-2.0"
] | 1 | 2019-12-09T13:57:42.000Z | 2019-12-09T13:57:42.000Z | gffpal/scripts/rnammer2gff.py | darcyabjones/gffpal | 9e195d94f5c9e259fa26f4840fbd440e3b37f777 | [
"Apache-2.0"
] | 1 | 2020-02-25T04:24:52.000Z | 2020-02-27T08:02:14.000Z | gffpal/scripts/rnammer2gff.py | darcyabjones/gffpal | 9e195d94f5c9e259fa26f4840fbd440e3b37f777 | [
"Apache-2.0"
] | 1 | 2019-12-09T13:57:44.000Z | 2019-12-09T13:57:44.000Z | import sys
import argparse
from copy import deepcopy
from typing import cast
from typing import List
from gffpal.gff import GFF
from gffpal.gff import GFF3Record
from gffpal.attributes import GFF3Attributes
import logging
logger = logging.getLogger(__name__)
TYPE_MAP = {
"euk": {
"5s_rrna": "rRNA_5S",
... | 23.840708 | 73 | 0.544172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.194135 |
a9b6978fd7689a0ce662a351c5883daf559bb70f | 700 | py | Python | luiz_otavio/exercises/ex014.py | felipefdeaguiar/-LearnPython3 | c5344da713533faafb10cadb6fc26a98d7c6bea6 | [
"MIT"
] | 1 | 2021-11-21T13:56:38.000Z | 2021-11-21T13:56:38.000Z | luiz_otavio/exercises/ex014.py | felipefdeaguiar/Python | c5344da713533faafb10cadb6fc26a98d7c6bea6 | [
"MIT"
] | null | null | null | luiz_otavio/exercises/ex014.py | felipefdeaguiar/Python | c5344da713533faafb10cadb6fc26a98d7c6bea6 | [
"MIT"
] | null | null | null | """
23.12.2020 - Felipe Ferreira de Aguiar
Manipulando Strings
* Strings Indices
* Fatiamento de Strings
* Funcões built-in len, abs, type, print
Documentação da aula abaixo:
https://docs.python.org/3/library/functions.html
https://docs.python.org/3/library/stdtypes.html
"""
# ! ind... | 22.580645 | 82 | 0.671429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 579 | 0.821277 |
a9b8040ed8f737b98e31e016b7a9276c10b17abd | 2,915 | py | Python | Python Scripts/happy-new-year.py | lazydinoz/HackFest21 | 84bfbfbb2c75a6511226a87d2e947984db878ba1 | [
"MIT"
] | 1 | 2021-11-12T10:51:19.000Z | 2021-11-12T10:51:19.000Z | Python Scripts/happy-new-year.py | lazydinoz/HackFest21 | 84bfbfbb2c75a6511226a87d2e947984db878ba1 | [
"MIT"
] | null | null | null | Python Scripts/happy-new-year.py | lazydinoz/HackFest21 | 84bfbfbb2c75a6511226a87d2e947984db878ba1 | [
"MIT"
] | null | null | null | # Visit pyGuru on Youtube
import turtle
t = turtle.Pen()
t.shape('turtle')
t.width(20)
t.speed(8)
t.up()
t.goto(-190,170)
t.down()
def h():
t.color('blue')
t.lt(90)
t.fd(100)
t.back(50)
t.rt(90)
t.fd(50)
t.lt(90)
t.fd(50)
t.back(100)
def a():
t.lt(90)
t.fd(100)
t.rt(90)
t.fd(50... | 10.958647 | 26 | 0.501544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 216 | 0.074099 |
a9b847c118bf2fb5a2a27bd55f6e9604914a2fac | 1,767 | py | Python | 9_Monitor_Data_Drift/1_Creating_data_drift_monitor.py | aditagrawal/Azure_ML | 30d7021c19aef8f56b05580cba25d38a5bc0b24e | [
"Unlicense"
] | null | null | null | 9_Monitor_Data_Drift/1_Creating_data_drift_monitor.py | aditagrawal/Azure_ML | 30d7021c19aef8f56b05580cba25d38a5bc0b24e | [
"Unlicense"
] | null | null | null | 9_Monitor_Data_Drift/1_Creating_data_drift_monitor.py | aditagrawal/Azure_ML | 30d7021c19aef8f56b05580cba25d38a5bc0b24e | [
"Unlicense"
] | null | null | null | ### Creating data drift monitor
from azureml.datadrift import DataDriftDetector
monitor = DataDriftDetector.create_from_datasets(workspace=ws,
name='dataset-drift-detector',
baseline_data_set=train_ds,
... | 57 | 263 | 0.534805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 587 | 0.332201 |
a9b897b26ef4a2a11ab551bfa5b0cdae3273a400 | 189 | py | Python | codeforces/231ATeam.py | Fr3ud/codingProblems | 8db943f5796385a4eeacc6fb0acfc846972cb058 | [
"Apache-2.0"
] | null | null | null | codeforces/231ATeam.py | Fr3ud/codingProblems | 8db943f5796385a4eeacc6fb0acfc846972cb058 | [
"Apache-2.0"
] | null | null | null | codeforces/231ATeam.py | Fr3ud/codingProblems | 8db943f5796385a4eeacc6fb0acfc846972cb058 | [
"Apache-2.0"
] | 2 | 2021-10-30T09:58:08.000Z | 2021-10-30T11:21:00.000Z | def sol(prblm):
_1 = prblm.count("1")
if _1 >= 2:
return 1
return 0
count = 0
for _ in range(int(input())):
prblm = input()
count += sol(prblm)
print(count)
| 12.6 | 29 | 0.534392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.015873 |
a9ba46bc07112c5c0befffe8d27b137867207f8f | 371 | py | Python | test/unit/api/test_network_provider_fullname.py | redmic-project/device-oag-buoy-modem | e905c53a5705695670512ff8f72bcc44c44421b1 | [
"MIT"
] | 2 | 2019-07-02T14:34:52.000Z | 2021-04-15T12:48:20.000Z | test/unit/api/test_network_provider_fullname.py | alzeih/python-vodem-vodafone-K4607-Z | d3b1f35d510b71b79ba9203993b5228006d9d8ee | [
"MIT"
] | null | null | null | test/unit/api/test_network_provider_fullname.py | alzeih/python-vodem-vodafone-K4607-Z | d3b1f35d510b71b79ba9203993b5228006d9d8ee | [
"MIT"
] | null | null | null | import unittest
from vodem.api import network_provider_fullname
class TestNetworkProviderFullname(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.valid_response = {
'network_provider_fullname': '',
}
def test_call(self):
resp = network_provider_fullname()
... | 21.823529 | 53 | 0.690027 | 303 | 0.816712 | 0 | 0 | 123 | 0.331536 | 0 | 0 | 29 | 0.078167 |
a9bbfd75a2ef05b8db8b8c94582084bcd100e96f | 2,419 | py | Python | user_tags/migrations/0001_initial.py | bitlabstudio/django-user-tags | b3f55d46cf4943ced266c112c49f4555b7bab74e | [
"MIT"
] | 3 | 2017-11-10T19:30:12.000Z | 2019-10-27T02:23:13.000Z | user_tags/migrations/0001_initial.py | bitmazk/django-user-tags | b3f55d46cf4943ced266c112c49f4555b7bab74e | [
"MIT"
] | 4 | 2018-04-13T14:49:58.000Z | 2021-06-10T20:34:57.000Z | user_tags/migrations/0001_initial.py | bitmazk/django-user-tags | b3f55d46cf4943ced266c112c49f4555b7bab74e | [
"MIT"
] | 1 | 2021-09-23T12:42:30.000Z | 2021-09-23T12:42:30.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-14 15:53
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('conten... | 39.016129 | 167 | 0.608929 | 2,195 | 0.9074 | 0 | 0 | 0 | 0 | 0 | 0 | 460 | 0.190161 |
a9bc2c278dd9ef86fef7b968518e3ca025ab6ba8 | 850 | py | Python | hardhat/recipes/python/hg_zipdoc.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/hg_zipdoc.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | hardhat/recipes/python/hg_zipdoc.py | stangelandcl/hardhat | 1ad0c5dec16728c0243023acb9594f435ef18f9c | [
"MIT"
] | null | null | null | import os
import shutil
from ..base import Downloader, Extractor, Recipe
class HgZipDocRecipe(Downloader, Extractor, Recipe):
def __init__(self, *args, **kwargs):
super(HgZipDocRecipe, self).__init__(*args, **kwargs)
self.sha256 = '0de7075c9be80856f3a1c8968f42cfa0' \
'9c44d09... | 34 | 76 | 0.614118 | 774 | 0.910588 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.243529 |
a9bd8dbf35bce6e926afc202bb829485abcb884b | 158 | py | Python | ml/shuffle.py | thevibegod/lms | 4b7f03acb44e63a3f6294c9224d6376ad22800c2 | [
"MIT"
] | null | null | null | ml/shuffle.py | thevibegod/lms | 4b7f03acb44e63a3f6294c9224d6376ad22800c2 | [
"MIT"
] | 6 | 2021-06-09T18:28:28.000Z | 2022-03-12T00:53:22.000Z | ml/shuffle.py | thevibegod/lms | 4b7f03acb44e63a3f6294c9224d6376ad22800c2 | [
"MIT"
] | null | null | null | import pandas as pd
df = pd.read_csv('dataset.csv', header=None)
ds = df.sample(frac=1)
ds.to_csv('shuffled_dataset.csv')
print('Shuffled Dataset Generated') | 26.333333 | 44 | 0.753165 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.398734 |
a9bf3baaff334d5d1c7c48eb7a8296df89e43617 | 3,616 | py | Python | tf1x/models/lca_conv_model.py | dpaiton/DeepSparseCoding | 5ea01fa8770794df5e13743aa3f2d85297c27eb1 | [
"MIT"
] | 12 | 2017-04-27T17:19:31.000Z | 2021-11-07T03:37:59.000Z | tf1x/models/lca_conv_model.py | dpaiton/DeepSparseCoding | 5ea01fa8770794df5e13743aa3f2d85297c27eb1 | [
"MIT"
] | 12 | 2018-03-21T01:16:25.000Z | 2022-02-10T00:21:58.000Z | tf1x/models/lca_conv_model.py | dpaiton/DeepSparseCoding | 5ea01fa8770794df5e13743aa3f2d85297c27eb1 | [
"MIT"
] | 12 | 2017-02-01T19:49:57.000Z | 2021-12-08T03:16:58.000Z | import numpy as np
import tensorflow as tf
import DeepSparseCoding.tf1x.utils.plot_functions as pf
import DeepSparseCoding.tf1x.utils.data_processing as dp
from DeepSparseCoding.tf1x.models.lca_model import LcaModel
from DeepSparseCoding.tf1x.modules.lca_conv_module import LcaConvModule
class LcaConvModel(LcaModel):
... | 42.541176 | 96 | 0.716538 | 3,325 | 0.919524 | 0 | 0 | 0 | 0 | 0 | 0 | 966 | 0.267146 |
a9bf620f1f16041d166e420a5fdf6a5cba0d0ebe | 3,130 | py | Python | tps/problems/forms/generic.py | akmohtashami/tps-web | 9dab3ffe97c21f658be30ce2f2711dd93e4ba60f | [
"MIT"
] | 5 | 2019-02-26T06:10:43.000Z | 2021-07-24T17:11:45.000Z | tps/problems/forms/generic.py | akmohtashami/tps-web | 9dab3ffe97c21f658be30ce2f2711dd93e4ba60f | [
"MIT"
] | 3 | 2019-08-15T13:56:03.000Z | 2021-06-10T18:43:16.000Z | tps/problems/forms/generic.py | jonathanirvings/tps-web | 46519347d4fc8bdced9b5bceb6cdee5ea4e508f2 | [
"MIT"
] | 2 | 2018-12-28T13:12:59.000Z | 2020-12-25T18:42:13.000Z | from django import forms
from django.core.exceptions import ValidationError
from django.forms.models import construct_instance, InlineForeignKeyField
from problems.forms.fields import AutoFilledField
class ProblemObjectForm(forms.Form):
def __init__(self, *args, **kwargs):
self.problem = kwargs.pop("prob... | 37.710843 | 89 | 0.667093 | 2,920 | 0.932907 | 0 | 0 | 0 | 0 | 0 | 0 | 604 | 0.192971 |
a9c0eb9661089aec6b023e06a45ffc338669fd5e | 762 | py | Python | examples/plot_regressor.py | pavelkomarov/projection-pursuit-regression | d8d4d0a72a0ba7f64d240bc3b14129ccd9c7cf9e | [
"BSD-3-Clause"
] | 29 | 2018-02-08T21:24:01.000Z | 2022-03-29T03:05:26.000Z | examples/plot_regressor.py | imanpalsingh/projection-pursuit | 307ad765d447e81dce909dfa9778db1610704315 | [
"BSD-3-Clause"
] | 1 | 2021-12-20T00:22:05.000Z | 2022-02-09T19:59:57.000Z | examples/plot_regressor.py | imanpalsingh/projection-pursuit | 307ad765d447e81dce909dfa9778db1610704315 | [
"BSD-3-Clause"
] | 11 | 2019-02-24T00:28:53.000Z | 2022-02-10T01:48:03.000Z | """ Plotting ProjectionPursuitRegressor
This example trains a regressor to fit data in R1 against only a single
output, so it can be visualized in 2D.
"""
import numpy as np
import sys
sys.path.append("..")
from skpp import ProjectionPursuitRegressor
from matplotlib import pyplot as plt
X = np.arange(100).reshape(100... | 28.222222 | 71 | 0.74147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.444882 |
a9c12d24b96133b1aff1f7db06bdcc87c693d8f2 | 3,323 | py | Python | web/http_server.py | telesoho/htmlcapture | ef78708fc79c6001a6fbaa1616a104075b6fb811 | [
"MIT"
] | null | null | null | web/http_server.py | telesoho/htmlcapture | ef78708fc79c6001a6fbaa1616a104075b6fb811 | [
"MIT"
] | null | null | null | web/http_server.py | telesoho/htmlcapture | ef78708fc79c6001a6fbaa1616a104075b6fb811 | [
"MIT"
] | null | null | null | import os
from flask import Flask, send_from_directory, request, redirect, url_for, flash
from flask_cors import CORS
from flask import render_template
from flask import url_for
from werkzeug.utils import secure_filename
import re
import subprocess
import json
web_dir = os.path.dirname(os.path.realpath(__file__))
roo... | 31.056075 | 90 | 0.592838 | 0 | 0 | 0 | 0 | 1,984 | 0.597051 | 0 | 0 | 778 | 0.234126 |
a9c14c4a8d16221e6534d0917e8a6861680f3692 | 483 | py | Python | sm64r/Level.py | andrelikesdogs/sm64-randomizer | 8c8d2f3e3b9f6b69d3595d78669aa120056b6f98 | [
"MIT"
] | 49 | 2019-07-01T16:19:32.000Z | 2022-03-28T16:15:36.000Z | sm64r/Level.py | andrelikesdogs/sm64-randomizer | 8c8d2f3e3b9f6b69d3595d78669aa120056b6f98 | [
"MIT"
] | 44 | 2019-10-19T18:19:56.000Z | 2022-03-25T22:53:20.000Z | sm64r/Level.py | andrelikesdogs/sm64-randomizer | 8c8d2f3e3b9f6b69d3595d78669aa120056b6f98 | [
"MIT"
] | 5 | 2020-03-13T22:56:56.000Z | 2021-12-05T03:37:30.000Z | from typing import List, Dict
from .Area import Area
class Level:
def __init__(self, course_id : int, name : str, properties : Dict = None, areas : List[Area] = None, offset : int = None):
self.course_id = course_id
self.name = name
self.properties = properties or {}
self.offset = offset
self.a... | 32.2 | 124 | 0.660455 | 428 | 0.886128 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.227743 |
a9c2e54eed94a614ce5ca1ba244a83aa4d8e44cc | 3,182 | py | Python | env/place_env.py | laiyao1/PPO-PyTorch | ce3d9ede43a8d1018bf66b2fc952b17e9fa6c844 | [
"MIT"
] | null | null | null | env/place_env.py | laiyao1/PPO-PyTorch | ce3d9ede43a8d1018bf66b2fc952b17e9fa6c844 | [
"MIT"
] | null | null | null | env/place_env.py | laiyao1/PPO-PyTorch | ce3d9ede43a8d1018bf66b2fc952b17e9fa6c844 | [
"MIT"
] | null | null | null | import math
from typing import Optional
import gym
from gym import spaces, logger
from gym.utils import seeding
import numpy as np
import sys
sys.path.append("..")
from place_db import PlaceDB
from build_graph import build_graph_from_placedb
class PlaceEnv(gym.Env):
def __init__(self, placedb, grid = 32):
... | 33.851064 | 104 | 0.574796 | 2,931 | 0.921119 | 0 | 0 | 0 | 0 | 0 | 0 | 425 | 0.133564 |
a9c311cfd77a2a5711f4d923436b80dcc24a6e7e | 1,045 | py | Python | arjuna/engine/unitee/markup/mrules.py | test-mile/arjuna | 21880b41e061e11bac2e600a3614684f8af75b2f | [
"Apache-2.0"
] | 9 | 2018-11-15T10:09:17.000Z | 2021-01-12T05:59:19.000Z | arjuna/engine/unitee/markup/mrules.py | test-mile/arjuna | 21880b41e061e11bac2e600a3614684f8af75b2f | [
"Apache-2.0"
] | 2 | 2019-07-01T15:33:46.000Z | 2019-07-12T13:04:08.000Z | arjuna/engine/unitee/markup/mrules.py | test-mile/arjuna | 21880b41e061e11bac2e600a3614684f8af75b2f | [
"Apache-2.0"
] | 4 | 2018-12-02T15:14:04.000Z | 2020-05-28T12:57:24.000Z | from arjuna.engine.unitee.enums import *
built_in_prop_type = {
BuiltInProp.ID : str,
BuiltInProp.PRIORITY : int,
BuiltInProp.THREADS : int,
BuiltInProp.NAME : str,
BuiltInProp.AUTHOR : str,
BuiltInProp.IDEA : str,
BuiltInProp.UNSTABLE : bool,
BuiltInProp.COMPONENT : str,
BuiltInPro... | 32.65625 | 101 | 0.625837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.058373 |
a9c3d53fc599904f6373e7e563f41224c6d22000 | 2,184 | py | Python | agents/prioritized_dqn_agent.py | itraveribon/banana_dqn_udacity | a3d51e6fdcbe148f4aba034f0d3d1f34eab828bb | [
"MIT"
] | null | null | null | agents/prioritized_dqn_agent.py | itraveribon/banana_dqn_udacity | a3d51e6fdcbe148f4aba034f0d3d1f34eab828bb | [
"MIT"
] | null | null | null | agents/prioritized_dqn_agent.py | itraveribon/banana_dqn_udacity | a3d51e6fdcbe148f4aba034f0d3d1f34eab828bb | [
"MIT"
] | null | null | null | import numpy as np
import torch
from agents import dqn_agent
from agents.prioritized_replay_buffer_sumtree import PrioritizedReplayBuffer
class PrioritizedAgent(dqn_agent.Agent):
"""Interacts with and learns from the environment."""
def __init__(self, state_size, action_size, seed):
"""Initialize an... | 37.016949 | 120 | 0.661172 | 2,041 | 0.934524 | 0 | 0 | 0 | 0 | 0 | 0 | 646 | 0.295788 |
a9c43e4cb570112915981a697cd3fa398af9d942 | 528 | py | Python | cmsplugin_pdf/cms_plugins.py | kaihoth/cmsplugin-pdf | 5708947e7d40e7101f22198b2e3637499ec967ed | [
"MIT"
] | null | null | null | cmsplugin_pdf/cms_plugins.py | kaihoth/cmsplugin-pdf | 5708947e7d40e7101f22198b2e3637499ec967ed | [
"MIT"
] | null | null | null | cmsplugin_pdf/cms_plugins.py | kaihoth/cmsplugin-pdf | 5708947e7d40e7101f22198b2e3637499ec967ed | [
"MIT"
] | 2 | 2021-01-15T12:01:24.000Z | 2021-04-08T11:39:49.000Z | """CMS Plugins for the ``cmsplugin_pdf`` app."""
from django.utils.translation import ugettext as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from .models import PDFPluginModel
class PDFPlugin(CMSPluginBase):
model = PDFPluginModel
name = _('PDF File')
render_temp... | 26.4 | 55 | 0.75 | 266 | 0.503788 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.195076 |
a9c4814c52edf43dbd36cb0343ece943f7363b17 | 487 | py | Python | solution/greedy/14916/main.py | jungyoonoh/baekjoon-1 | 2b4437a4b5e06244fa47fae6c7b7be0157d0f94f | [
"MIT"
] | 2,236 | 2019-08-05T00:36:59.000Z | 2022-03-31T16:03:53.000Z | solution/greedy/14916/main.py | jungyoonoh/baekjoon-1 | 2b4437a4b5e06244fa47fae6c7b7be0157d0f94f | [
"MIT"
] | 225 | 2020-12-17T10:20:45.000Z | 2022-01-05T17:44:16.000Z | solution/greedy/14916/main.py | jungyoonoh/baekjoon-1 | 2b4437a4b5e06244fa47fae6c7b7be0157d0f94f | [
"MIT"
] | 602 | 2019-08-05T00:46:25.000Z | 2022-03-31T13:38:23.000Z | # Authored by : gusdn3477
# Co-authored by : -
# Link : http://boj.kr/f274a6ac753440deb8c47de3ee127244
import sys
def input():
return sys.stdin.readline().rstrip()
N = int(input())
if N < 5:
if N % 2 != 0:
ans = -1
else:
ans = N // 2
else:
ct, N = divmod(N, 5)
if N == 0:
a... | 18.037037 | 55 | 0.445585 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.205339 |
a9c796d46fb219ea35769e65d84e8f2b0db9cb46 | 675 | py | Python | config.py | fernando-freires/Tank-Pong | 0fd3cf52d467c00d5b52013da7ee2feb8451382d | [
"MIT"
] | null | null | null | config.py | fernando-freires/Tank-Pong | 0fd3cf52d467c00d5b52013da7ee2feb8451382d | [
"MIT"
] | null | null | null | config.py | fernando-freires/Tank-Pong | 0fd3cf52d467c00d5b52013da7ee2feb8451382d | [
"MIT"
] | null | null | null | import pygame
pygame.font.init()
# Screen
screen_width = 800
screen_height = 550
# Colors
RED = (134, 28, 9)
YELLOW = (212, 169, 65)
WHITE = (255, 255, 255)
GREEN = (0, 127, 33)
BLUE = (0, 97, 148)
# Rectangles constants
RECT_1 = (20, 20)
RECT_2 = (60, 20)
RECT_3 = (20, 60)
RECT_4 = (30, 30)
RECT_5 = (20, 108)
RECT... | 15.697674 | 48 | 0.653333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.177778 |
a9c79fb37bd32e1b5430e2572ac344f70eb99c0b | 367 | py | Python | alpha_gomoku/cppboard/bitboard/setup.py | YouHuang67/alpha_gomoku | 885690d80f1d34d27bc39cbeee4388b50e3d7a23 | [
"MIT"
] | null | null | null | alpha_gomoku/cppboard/bitboard/setup.py | YouHuang67/alpha_gomoku | 885690d80f1d34d27bc39cbeee4388b50e3d7a23 | [
"MIT"
] | null | null | null | alpha_gomoku/cppboard/bitboard/setup.py | YouHuang67/alpha_gomoku | 885690d80f1d34d27bc39cbeee4388b50e3d7a23 | [
"MIT"
] | null | null | null | from distutils.core import setup, Extension
sources = ['board_wrap.cxx', 'board.cpp',
'board_bits.cpp', 'init.cpp',
'lineshapes.cpp', 'pns.cpp', 'shapes.cpp']
module = Extension(
'_board', sources=sources,
extra_compile_args=['/O2'],
language='c++'
)
setup(name='board',
ex... | 24.466667 | 53 | 0.607629 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.332425 |
a9c7ae6f19a724519a8e4f82da222706b5f300a7 | 5,088 | py | Python | citadel/api/pod.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | citadel/api/pod.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | citadel/api/pod.py | CMGS/citadel | 8363a598ed4422d6671f06bad7def3ebb848f441 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Pod / Node management API"""
from flask import g, abort
from citadel.libs.view import create_api_blueprint, user_require
from citadel.models.container import Container
from citadel.rpc.client import get_core
bp = create_api_blueprint('pod', __name__, 'pod')
def _get_pod(name):
pod =... | 41.704918 | 2,580 | 0.56191 | 0 | 0 | 0 | 0 | 4,641 | 0.912146 | 0 | 0 | 4,122 | 0.810142 |
a9c7e7b97223ab3a021b88e0c7b80b98f6271253 | 7,068 | py | Python | manafa/services/hunterService.py | RRua/petra-like | cfb6a978f69792845b029d41a1775f36f4d98119 | [
"MIT"
] | null | null | null | manafa/services/hunterService.py | RRua/petra-like | cfb6a978f69792845b029d41a1775f36f4d98119 | [
"MIT"
] | null | null | null | manafa/services/hunterService.py | RRua/petra-like | cfb6a978f69792845b029d41a1775f36f4d98119 | [
"MIT"
] | null | null | null | import time
from .service import Service
import re
from ..utils.Utils import execute_shell_command
from manafa.utils.Logger import log
class HunterService(Service):
def __init__(self, boot_time=0, output_res_folder="hunter"):
Service.__init__(self, output_res_folder)
self.trace = {}
sel... | 41.822485 | 104 | 0.563243 | 6,927 | 0.980051 | 0 | 0 | 318 | 0.044992 | 0 | 0 | 902 | 0.127617 |
a9c9cb26caef7f3a07130091e0579b96a33abecb | 1,650 | py | Python | Basic_if_then/BH4-test.py | BH4/Halite3-bots | 97eb4dcab6bccbfd1649bbac74ef06f0e22035de | [
"MIT"
] | null | null | null | Basic_if_then/BH4-test.py | BH4/Halite3-bots | 97eb4dcab6bccbfd1649bbac74ef06f0e22035de | [
"MIT"
] | null | null | null | Basic_if_then/BH4-test.py | BH4/Halite3-bots | 97eb4dcab6bccbfd1649bbac74ef06f0e22035de | [
"MIT"
] | null | null | null | import hlt
from hlt import constants
import logging
# Import my stuff
import strategies
import helpers
game = hlt.Game()
# Pre-processing area
ship_status = {}
ship_destination = {}
class parameters():
def __init__(self):
# Ship numbers
self.max_ships = 30
self.min_ships = 2
#... | 26.612903 | 102 | 0.704848 | 903 | 0.547273 | 0 | 0 | 0 | 0 | 0 | 0 | 322 | 0.195152 |
a9ca3bbd491dc6f1f8700dab6b863d90e4dcb170 | 2,481 | py | Python | multi_linugual_chatbot/mbot.py | HrushikeshShukla/multilingual_chatbot | 696b403ef4e5482e2f670924b557dd17375fc5a9 | [
"Apache-2.0"
] | null | null | null | multi_linugual_chatbot/mbot.py | HrushikeshShukla/multilingual_chatbot | 696b403ef4e5482e2f670924b557dd17375fc5a9 | [
"Apache-2.0"
] | null | null | null | multi_linugual_chatbot/mbot.py | HrushikeshShukla/multilingual_chatbot | 696b403ef4e5482e2f670924b557dd17375fc5a9 | [
"Apache-2.0"
] | null | null | null | # importing dependencies
import re
import inltk
import nltk
nltk.download('punkt')
import io
import random
import string
import warnings
warnings.filterwarnings('ignore')
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from googlesea... | 28.517241 | 94 | 0.731963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 648 | 0.240089 |
a9cb1d2561d4e913f2056aa2c9b69a723a641969 | 1,931 | py | Python | lbm/src/app/base_app.py | jviquerat/lbm | 96522a247d25ac533e6fdba90ddb90251f144a50 | [
"MIT"
] | 32 | 2020-11-13T07:49:34.000Z | 2022-03-31T08:36:52.000Z | lbm/src/app/base_app.py | elswit/lbm | 68b061f6f6bdb200a1e9e18531fd7bcad553f26f | [
"MIT"
] | 1 | 2022-02-17T11:44:14.000Z | 2022-03-25T12:56:11.000Z | lbm/src/app/base_app.py | elswit/lbm | 68b061f6f6bdb200a1e9e18531fd7bcad553f26f | [
"MIT"
] | 7 | 2021-07-18T22:37:41.000Z | 2022-03-29T21:57:55.000Z | # Generic imports
import math
# Custom imports
from lbm.src.utils.shapes import *
from lbm.src.core.obstacle import *
###############################################
### Base app
class base_app():
### Set inlet fields
def set_inlets(self, lattice, it):
pass
### Compute observables
def observ... | 27.585714 | 70 | 0.494045 | 1,749 | 0.905748 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.198861 |
a9cc574d34510a5a7c799bfb6ad7da4119b10d52 | 742 | py | Python | practiceset/hk/fraction_of_plusMinus.py | dipsuji/Phython-Learning | 78689d3436a8573695b869a19457875ac77fcee4 | [
"Apache-2.0"
] | 1 | 2021-12-06T05:09:10.000Z | 2021-12-06T05:09:10.000Z | practiceset/hk/fraction_of_plusMinus.py | dipsuji/Phython-Learning | 78689d3436a8573695b869a19457875ac77fcee4 | [
"Apache-2.0"
] | null | null | null | practiceset/hk/fraction_of_plusMinus.py | dipsuji/Phython-Learning | 78689d3436a8573695b869a19457875ac77fcee4 | [
"Apache-2.0"
] | 1 | 2021-12-06T05:09:16.000Z | 2021-12-06T05:09:16.000Z | def fraction_plusMinus(arr):
count_pos = 0
count_neg = 0
count_0 = 0
arr_len = len(arr)
# print(arr_len)
# print(arr)
for i in range(0, len(arr)):
if arr[i] > 0:
count_pos += 1
elif arr[i] < 0:
count_neg += 1
elif arr[i] == 0:
co... | 24.733333 | 67 | 0.56469 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.138814 |
a9ccbe1dd76a9b926989e24973b853a53bc7aeb8 | 7,731 | py | Python | fixture/contacts.py | annovikov/Python_education | f6d731c81d1cbfdd1085fb9893c1c123e4eae64f | [
"Apache-2.0"
] | null | null | null | fixture/contacts.py | annovikov/Python_education | f6d731c81d1cbfdd1085fb9893c1c123e4eae64f | [
"Apache-2.0"
] | null | null | null | fixture/contacts.py | annovikov/Python_education | f6d731c81d1cbfdd1085fb9893c1c123e4eae64f | [
"Apache-2.0"
] | null | null | null | from model.contact import ContactGroup
import re
class ContactHelper:
def __init__(self, app):
self.app = app
def add_new(self, contactgroup):
wd = self.app.wd
wd.find_element_by_link_text("add new").click()
self.fill_contact_form(contactgroup)
wd.find_element_by_xpath(... | 42.245902 | 194 | 0.653214 | 7,679 | 0.993274 | 0 | 0 | 0 | 0 | 0 | 0 | 1,131 | 0.146294 |
a9cde816018d4cde80fd4caa4025019fd37e3e92 | 2,377 | py | Python | src/ramstk/views/gtk3/widgets/widget.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 26 | 2019-05-15T02:03:47.000Z | 2022-02-21T07:28:11.000Z | src/ramstk/views/gtk3/widgets/widget.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 815 | 2019-05-10T12:31:52.000Z | 2022-03-31T12:56:26.000Z | src/ramstk/views/gtk3/widgets/widget.py | TahaEntezari/ramstk | f82e5b31ef5c4e33cc02252263247b99a9abe129 | [
"BSD-3-Clause"
] | 9 | 2019-04-20T23:06:29.000Z | 2022-01-24T21:21:04.000Z | # pylint: disable=non-parent-init-called
# -*- coding: utf-8 -*-
#
# ramstk.views.gtk3.widgets.widget.py is part of the RAMSTK Project
#
# All rights reserved.
# Copyright 2007 - 2020 Doyle Rowland doyle.rowland <AT> reliaqual <DOT> com
"""RAMSTK GTK3 Base Widget Module."""
# Standard Library Imports
from typing... | 31.693333 | 86 | 0.619689 | 1,969 | 0.828355 | 0 | 0 | 0 | 0 | 0 | 0 | 1,327 | 0.558267 |
a9ce2c37b0bb5981068f798cd85b5e4ebcafdcc4 | 1,011 | py | Python | openCv/script.py | tfrere/bras | fb7ae3720dd6bae0ccb3b3b5ec59ab18e760f48b | [
"Unlicense"
] | null | null | null | openCv/script.py | tfrere/bras | fb7ae3720dd6bae0ccb3b3b5ec59ab18e760f48b | [
"Unlicense"
] | null | null | null | openCv/script.py | tfrere/bras | fb7ae3720dd6bae0ccb3b3b5ec59ab18e760f48b | [
"Unlicense"
] | null | null | null | from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import numpy as np
import cv2
import picamera.array
camera = PiCamera()
camera.resolution = (800, 600)
camera.framerate =10
rawCapture = PiRGBArray(camera, size=(800, 600))
time.sleep(0.1)
face_cascade = cv2.CascadeClassifier('haarcascad... | 25.275 | 86 | 0.71909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.070227 |
a9cedc2010c3c6ab49074b7411de9c5f5d16a0f4 | 3,801 | py | Python | data_processing/fill_missing_data.py | irasus-technologies/EnergyBoost | c5fcd4ed58aedffe0c3c71cdc76f860c64bb1de1 | [
"MIT"
] | null | null | null | data_processing/fill_missing_data.py | irasus-technologies/EnergyBoost | c5fcd4ed58aedffe0c3c71cdc76f860c64bb1de1 | [
"MIT"
] | null | null | null | data_processing/fill_missing_data.py | irasus-technologies/EnergyBoost | c5fcd4ed58aedffe0c3c71cdc76f860c64bb1de1 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
from datetime import datetime
# In[2]:
hh_df = pd.read_csv('home_ac/processed_hhdata_86_2.csv')
# print(hh_df.shape)
# hh_df.head(15)
hh_df.drop_duplicates(subset ="localhour", keep = False, inplace = True)
print(hh_df.shape)
# In[3]:
hh_df['ho... | 29.465116 | 115 | 0.61247 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,183 | 0.574323 |
a9d05630a781b58d240403429a6be895d1c2a315 | 1,375 | py | Python | scripts/parse.py | yeshaokai/mmpose_for_maDLC | 84efe0ff00de3d916086c8c5579eae17c1ef43cb | [
"Apache-2.0"
] | 5 | 2022-01-13T15:06:45.000Z | 2022-01-28T19:39:54.000Z | scripts/parse.py | yeshaokai/mmpose_for_maDLC | 84efe0ff00de3d916086c8c5579eae17c1ef43cb | [
"Apache-2.0"
] | null | null | null | scripts/parse.py | yeshaokai/mmpose_for_maDLC | 84efe0ff00de3d916086c8c5579eae17c1ef43cb | [
"Apache-2.0"
] | 1 | 2022-01-13T11:46:55.000Z | 2022-01-13T11:46:55.000Z | import pandas as pd
import pickle
import json
def extract_uncropped_name(filename):
f = filename.split('/')[-1]
video_source = filename.split('/')[-2]
video_source = video_source.replace('_cropped','')
image_format = f.split('.')[-1]
image_prefix = f.split('c')[0]
new_name = video_source+... | 21.825397 | 82 | 0.664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.170182 |
a9d095ce36356e7ef30c09a4ee6e2a2426195379 | 1,072 | py | Python | python/strings/yahoo2.py | hs634/algorithms | e411d747eb27a1c784605e44111de2703f6dde4d | [
"MIT"
] | null | null | null | python/strings/yahoo2.py | hs634/algorithms | e411d747eb27a1c784605e44111de2703f6dde4d | [
"MIT"
] | null | null | null | python/strings/yahoo2.py | hs634/algorithms | e411d747eb27a1c784605e44111de2703f6dde4d | [
"MIT"
] | null | null | null | __author__ = 'harsh'
'''
Given two words, determine if the first word, or any anagram of it, appears in consecutive characters of the second word.
For instance, tea appears as an anagram in the last three letters of slate, but let does not appear as an anagram in actor
even though all the letters of let a... | 24.930233 | 126 | 0.624067 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 565 | 0.527052 |
a9d0c58d713f7b758640446cf6d2d1ffe15cf420 | 6,766 | py | Python | Depression-Language-Evaluation/app.py | Melody-Lin/LokiHub | 349f087b9d3d9d3fd4117f6288b3524015702b77 | [
"MIT"
] | 17 | 2020-11-25T07:40:18.000Z | 2022-03-07T03:29:18.000Z | Depression-Language-Evaluation/app.py | Melody-Lin/LokiHub | 349f087b9d3d9d3fd4117f6288b3524015702b77 | [
"MIT"
] | 8 | 2020-12-18T13:23:59.000Z | 2021-10-03T21:41:50.000Z | Depression-Language-Evaluation/app.py | Melody-Lin/LokiHub | 349f087b9d3d9d3fd4117f6288b3524015702b77 | [
"MIT"
] | 43 | 2020-12-02T09:03:57.000Z | 2021-12-23T03:30:25.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from flask import Flask, request, abort
from linebot import LineBotApi, WebhookHandler
from linebot.exceptions import InvalidSignatureError
from linebot.models import *
import json
from ArticutAPI import Articut
from decimal import Decimal, ROUND_HALF_UP
app = Fla... | 37.175824 | 147 | 0.60065 | 0 | 0 | 0 | 0 | 1,346 | 0.187465 | 0 | 0 | 1,997 | 0.278134 |
a9d0ce32cd89e66e535e007ce974d024f687913b | 3,505 | py | Python | backend/core/migrations/0001_initial.py | andreaabellera/Ecoyou | 7b12e8a0d910549eaabf9d0e5e2da0abc293ca36 | [
"MIT"
] | null | null | null | backend/core/migrations/0001_initial.py | andreaabellera/Ecoyou | 7b12e8a0d910549eaabf9d0e5e2da0abc293ca36 | [
"MIT"
] | null | null | null | backend/core/migrations/0001_initial.py | andreaabellera/Ecoyou | 7b12e8a0d910549eaabf9d0e5e2da0abc293ca36 | [
"MIT"
] | 1 | 2021-01-14T21:12:47.000Z | 2021-01-14T21:12:47.000Z | # Generated by Django 3.1.4 on 2021-01-08 02:38
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Badge',
fields=[
('id', models.AutoField(au... | 44.935897 | 114 | 0.562054 | 3,412 | 0.973466 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.138659 |
a9d1738da8a05824ce4234b5aff1abc4836bc453 | 256 | py | Python | Curso/ExMundo1/Ex031IfElse4PagarKm.py | DavidBitner/Aprendizado-Python | e1dcf18f9473c697fc2302f34a2d3e025ca6c969 | [
"MIT"
] | null | null | null | Curso/ExMundo1/Ex031IfElse4PagarKm.py | DavidBitner/Aprendizado-Python | e1dcf18f9473c697fc2302f34a2d3e025ca6c969 | [
"MIT"
] | null | null | null | Curso/ExMundo1/Ex031IfElse4PagarKm.py | DavidBitner/Aprendizado-Python | e1dcf18f9473c697fc2302f34a2d3e025ca6c969 | [
"MIT"
] | null | null | null | d = int(input('Digite a distância percorrida: Km '))
p = float
if d <= 200:
p = d * 0.50
print('Total a pagar pelos {}Km rodados é R${:.2f}'.format(d, p))
else:
p = d * 0.45
print('Total a pagar pelos {}Km rodados é R${:.2f}'.format(d, p))
| 28.444444 | 69 | 0.574219 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.498069 |
a9d3366cae5cc9d2f3c4639160a38329df539f7f | 20,236 | py | Python | tests/conftest.py | msonderegger/PolyglotDB | 583fd8ec14c2e34807b45b9f15fa19cffa130bfa | [
"MIT"
] | null | null | null | tests/conftest.py | msonderegger/PolyglotDB | 583fd8ec14c2e34807b45b9f15fa19cffa130bfa | [
"MIT"
] | null | null | null | tests/conftest.py | msonderegger/PolyglotDB | 583fd8ec14c2e34807b45b9f15fa19cffa130bfa | [
"MIT"
] | null | null | null | import pytest
import os
import sys
from polyglotdb.io.types.parsing import (SegmentTier, OrthographyTier,
GroupingTier, TextOrthographyTier,
TranscriptionTier,
TextTranscriptionTier, TextMorphemeT... | 35.815929 | 113 | 0.588308 | 0 | 0 | 0 | 0 | 19,320 | 0.953509 | 0 | 0 | 3,931 | 0.194008 |
a9d4e535fb54b53fe43d60caf81b0fdd805c0370 | 408 | py | Python | 02-mayan.py | vyskocilm/plenty-of-couscous | f8d2dc299ce0faf78f81648f370ed1e2a088ef77 | [
"BSD-3-Clause"
] | null | null | null | 02-mayan.py | vyskocilm/plenty-of-couscous | f8d2dc299ce0faf78f81648f370ed1e2a088ef77 | [
"BSD-3-Clause"
] | null | null | null | 02-mayan.py | vyskocilm/plenty-of-couscous | f8d2dc299ce0faf78f81648f370ed1e2a088ef77 | [
"BSD-3-Clause"
] | null | null | null | #:: 0-.| .-| .|||-| ::-| .||-| ||
print "".join(("".join((y for y in x)) for x in
( (chr (sum( (x if y != 0 else x*20 for y, x in
enumerate ( len(x) if x != "0" else 0 for x in
(x.replace('|',':.:').replace(':','..')for x in
y))))) for y in x) for x in((x.split() for x in
y)for y in (x.split('-') for x in(x[1:] for x... | 40.8 | 48 | 0.421569 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.259804 |
a9d5869d6b2fa94ae875350765d730ba155cbe5b | 1,512 | py | Python | bin/contentctl_project/contentctl_infrastructure/builder/security_content_investigation_builder.py | arjunkhunti-crest/security_content | 41e354485e5917d3366ef735a9c5b25a20d3b8cc | [
"Apache-2.0"
] | null | null | null | bin/contentctl_project/contentctl_infrastructure/builder/security_content_investigation_builder.py | arjunkhunti-crest/security_content | 41e354485e5917d3366ef735a9c5b25a20d3b8cc | [
"Apache-2.0"
] | null | null | null | bin/contentctl_project/contentctl_infrastructure/builder/security_content_investigation_builder.py | arjunkhunti-crest/security_content | 41e354485e5917d3366ef735a9c5b25a20d3b8cc | [
"Apache-2.0"
] | null | null | null | import re
import sys
from pydantic import ValidationError
from bin.contentctl_project.contentctl_core.application.builder.investigation_builder import InvestigationBuilder
from bin.contentctl_project.contentctl_core.domain.entities.investigation import Investigation
from bin.contentctl_project.contentctl_infrastructu... | 34.363636 | 221 | 0.691799 | 1,052 | 0.695767 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.060847 |
a9d679a3cfe8f4ed6ca4462fc2c4aebf02501562 | 626 | py | Python | test/base.py | itsmeCin/d2vs | d67f737620b0fe0aa479e9c66a834764f036bd68 | [
"MIT"
] | null | null | null | test/base.py | itsmeCin/d2vs | d67f737620b0fe0aa479e9c66a834764f036bd68 | [
"MIT"
] | null | null | null | test/base.py | itsmeCin/d2vs | d67f737620b0fe0aa479e9c66a834764f036bd68 | [
"MIT"
] | null | null | null | import numpy as np
from unittest import TestCase
from PIL import Image
from d2vs.ocr import OCR
class OCRTestCases(TestCase):
def setUp(self):
self.ocr = OCR()
def _img_to_np(self, path):
img = Image.open(path)
return np.asarray(img, dtype='uint8')
def _check_... | 25.04 | 73 | 0.627796 | 516 | 0.824281 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.011182 |
a9d8f74d2d05d2035a3088b326a56139ee5b3ff4 | 10,285 | py | Python | cumulus/steps/dev_tools/pipeline.py | john-shaskin/cumulus | 4687d83ab324e57d900d9888da62e2fb7f4505e9 | [
"MIT"
] | null | null | null | cumulus/steps/dev_tools/pipeline.py | john-shaskin/cumulus | 4687d83ab324e57d900d9888da62e2fb7f4505e9 | [
"MIT"
] | 11 | 2018-09-10T22:57:31.000Z | 2019-02-28T17:21:24.000Z | cumulus/steps/dev_tools/pipeline.py | john-shaskin/cumulus | 4687d83ab324e57d900d9888da62e2fb7f4505e9 | [
"MIT"
] | 3 | 2018-09-05T20:33:35.000Z | 2018-10-17T16:01:26.000Z |
import awacs
import awacs.aws
import awacs.awslambda
import awacs.codecommit
import awacs.ec2
import awacs.iam
import awacs.logs
import awacs.s3
import awacs.sts
import awacs.kms
import troposphere
from troposphere import codepipeline, Ref, iam
from troposphere.s3 import Bucket, VersioningConfiguration
import cumulus... | 37.673993 | 118 | 0.50841 | 9,914 | 0.963928 | 0 | 0 | 0 | 0 | 0 | 0 | 1,524 | 0.148177 |
a9d9b2323083a4b66b6d5fb8c072903336330ae4 | 13,539 | py | Python | all_functions/linux server/python GUI/wxpython_flash - Copy.py | Heroku-elasa/-heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | null | null | null | all_functions/linux server/python GUI/wxpython_flash - Copy.py | Heroku-elasa/-heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | 15 | 2021-03-18T20:25:13.000Z | 2022-03-02T14:54:33.000Z | all_functions/linux server/python GUI/wxpython_flash - Copy.py | Heroku-elasa/heroku-buildpack-python-ieee-new | 06ec2fda04d9e478ed2506400e460489b0ca91ab | [
"MIT"
] | 1 | 2017-03-04T16:48:55.000Z | 2017-03-04T16:48:55.000Z | """
GrooveWalrus: Flash Player
Copyright (C) 2009, 2010
11y3y3y3y43@gmail.com
http://groove-walrus.turnip-town.net
-----
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License... | 41.530675 | 168 | 0.626265 | 9,750 | 0.720142 | 0 | 0 | 0 | 0 | 0 | 0 | 5,901 | 0.435852 |
a9da06c2dab9036fffee0adcf12fef779efeb4ab | 308 | py | Python | sitetest/core/sandbox.py | ninapavlich/sitetest | 2f5942c5280e5e7516e28be669013ee74bf03da3 | [
"Apache-2.0"
] | 3 | 2017-10-17T13:44:51.000Z | 2018-11-17T15:43:08.000Z | sitetest/core/sandbox.py | ninapavlich/sitetest | 2f5942c5280e5e7516e28be669013ee74bf03da3 | [
"Apache-2.0"
] | 20 | 2015-01-06T21:06:14.000Z | 2021-12-13T19:58:56.000Z | sitetest/core/sandbox.py | ninapavlich/sitetest | 2f5942c5280e5e7516e28be669013ee74bf03da3 | [
"Apache-2.0"
] | null | null | null | import logging
import urllib2
logger = logging.getLogger('sitetest')
def reload_url(url, user_agent_string):
request = urllib2.Request(url)
request.add_header('User-agent', user_agent_string)
response = urllib2.urlopen(request)
logger.info("Response: %s: %s" % (response.code, response))
| 23.692308 | 63 | 0.730519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.12987 |
a9dabd49cf3a4d5bba971150c7530208c635b045 | 2,813 | py | Python | federation/tests/test_fetchers.py | weex/federation | 01357aacb04b076442ce5f803a0fc65df5a74d09 | [
"BSD-3-Clause"
] | 93 | 2016-11-26T10:52:13.000Z | 2022-01-15T20:07:35.000Z | federation/tests/test_fetchers.py | weex/federation | 01357aacb04b076442ce5f803a0fc65df5a74d09 | [
"BSD-3-Clause"
] | 75 | 2016-10-18T10:15:44.000Z | 2019-10-05T22:16:32.000Z | federation/tests/test_fetchers.py | weex/federation | 01357aacb04b076442ce5f803a0fc65df5a74d09 | [
"BSD-3-Clause"
] | 9 | 2017-04-08T08:03:45.000Z | 2021-09-13T22:00:48.000Z | from unittest.mock import patch, Mock, call
from federation.fetchers import retrieve_remote_profile, retrieve_remote_content
class TestRetrieveRemoteContent:
@patch("federation.fetchers.importlib.import_module")
def test_calls_activitypub_retrieve_and_parse_content(self, mock_import):
mock_retrieve =... | 50.232143 | 120 | 0.740135 | 2,681 | 0.953075 | 0 | 0 | 2,595 | 0.922503 | 0 | 0 | 670 | 0.23818 |
a9dd37febc5a7ea11a814b60ad8ec5a510d6ba88 | 278 | py | Python | siteblog/blog/templatetags/menu.py | wiky-avis/dartblog | af8cfcaa410006c62707fe1bfe8f94a2c5714b02 | [
"MIT"
] | null | null | null | siteblog/blog/templatetags/menu.py | wiky-avis/dartblog | af8cfcaa410006c62707fe1bfe8f94a2c5714b02 | [
"MIT"
] | 6 | 2021-06-09T18:05:22.000Z | 2022-03-12T00:56:37.000Z | siteblog/blog/templatetags/menu.py | wiky-avis/dartblog | af8cfcaa410006c62707fe1bfe8f94a2c5714b02 | [
"MIT"
] | null | null | null | from django import template
from blog.models import Category
register = template.Library()
@register.inclusion_tag('inc/menu_tpl.html')
def show_menu(menu_class='menu'):
categories = Category.objects.all()
return {'categories': categories, 'menu_class': menu_class}
| 23.166667 | 63 | 0.758993 | 0 | 0 | 0 | 0 | 182 | 0.654676 | 0 | 0 | 49 | 0.176259 |
a9de78e19fbd2362a60c1cdeb5bc9c8ec641c068 | 12,366 | py | Python | highway_env/envs/merge_out.py | jasonplato/High_SimulationPlatform | 8a0ed628ed824d08150ceff13487194212e95693 | [
"MIT"
] | null | null | null | highway_env/envs/merge_out.py | jasonplato/High_SimulationPlatform | 8a0ed628ed824d08150ceff13487194212e95693 | [
"MIT"
] | 1 | 2020-03-19T08:50:34.000Z | 2020-03-19T08:50:34.000Z | highway_env/envs/merge_out.py | jasonplato/Highway_SimulationPlatform | 8a0ed628ed824d08150ceff13487194212e95693 | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import numpy as np
from highway_env import utils
from highway_env.envs.abstract import AbstractEnv
from highway_env.road.lane import LineType, StraightLane, SineLane, LanesConcatenation
from highway_env.road.road import Road, RoadNetwork
from highway_env... | 49.662651 | 203 | 0.576257 | 11,802 | 0.954391 | 0 | 0 | 0 | 0 | 0 | 0 | 3,450 | 0.278991 |
a9de834288288f89d510cc750e968243a7eb1eb3 | 355 | py | Python | office365/sharepoint/listitems/listItem_collection.py | rikeshtailor/Office365-REST-Python-Client | ca7bfa1b22212137bb4e984c0457632163e89a43 | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/listitems/listItem_collection.py | rikeshtailor/Office365-REST-Python-Client | ca7bfa1b22212137bb4e984c0457632163e89a43 | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/listitems/listItem_collection.py | rikeshtailor/Office365-REST-Python-Client | ca7bfa1b22212137bb4e984c0457632163e89a43 | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.sharepoint.base_entity_collection import BaseEntityCollection
from office365.sharepoint.listitems.listitem import ListItem
class ListItemCollection(BaseEntityCollection):
"""List Item collection"""
def __init__(self, context, resource_path=None):
super(ListItemCollection, self).__init__... | 39.444444 | 82 | 0.811268 | 214 | 0.602817 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.073239 |
a9e038f65e8da59f86a3f7830fd28ce55cc2fa38 | 1,947 | py | Python | sprint.py | managedkaos/100-days-of-code-bot | dc7188917adb424b981d9deeeec6f5fe2fc97159 | [
"MIT"
] | null | null | null | sprint.py | managedkaos/100-days-of-code-bot | dc7188917adb424b981d9deeeec6f5fe2fc97159 | [
"MIT"
] | null | null | null | sprint.py | managedkaos/100-days-of-code-bot | dc7188917adb424b981d9deeeec6f5fe2fc97159 | [
"MIT"
] | null | null | null | # pylint: disable=C0114
# TODO: Convert this into a function XD
from datetime import date
from datetime import timedelta as delta
import os, requests, sys
length = delta(days = 100)
today = date.today()
# Sprint attributes:
# - start dates are 1/1, 5/1, and 9/1 (year dosen't matter)
# - end dates are 100 days after ... | 38.94 | 100 | 0.614792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 641 | 0.329224 |
a9e17bac878caca71bb8a3eaac1923a80b30d7b8 | 2,785 | py | Python | code/todo-app/final/chalicelib/db.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | code/todo-app/final/chalicelib/db.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | code/todo-app/final/chalicelib/db.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | from uuid import uuid4
from boto3.dynamodb.conditions import Key
DEFAULT_USERNAME = "default"
class TodoDB(object):
def list_items(self):
pass
def add_item(self, description, metadata=None):
pass
def get_item(self, uid):
pass
def delete_item(self, uid):
pass
def update_item(self, uid, description=None, sta... | 39.225352 | 169 | 0.735727 | 2,689 | 0.96553 | 0 | 0 | 0 | 0 | 0 | 0 | 241 | 0.086535 |
a9e2f40ec8188b47714aa6c85a2a8b8fcf7896b9 | 1,285 | py | Python | demo_data.py | lechemrc/DS-Unit-3-Sprint-2-SQL-and-Databases | edab19d5c73af7c6f15eb5dc3f31d2c5fce558fd | [
"MIT"
] | null | null | null | demo_data.py | lechemrc/DS-Unit-3-Sprint-2-SQL-and-Databases | edab19d5c73af7c6f15eb5dc3f31d2c5fce558fd | [
"MIT"
] | null | null | null | demo_data.py | lechemrc/DS-Unit-3-Sprint-2-SQL-and-Databases | edab19d5c73af7c6f15eb5dc3f31d2c5fce558fd | [
"MIT"
] | null | null | null | import sqlite3
sl_conn = sqlite3.connect('demo_data.sqlite3')
sl_cur = sl_conn.cursor()
# Creating table demo
table = """
CREATE TABLE demo(
s VARCHAR (10),
x INT,
y INT
);
"""
sl_cur.execute('DROP TABLE demo')
sl_cur.execute(table)
# Checking for table creation accura... | 22.946429 | 63 | 0.631907 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 794 | 0.617899 |
a9e3c1de91dc697b91606440bb81f175a4344975 | 4,679 | py | Python | code/edit.py | Seeyapm/MyDollarBot-BOTGo | f26b6ee49a2497406e2f8c783368164d6c386d28 | [
"MIT"
] | 1 | 2021-12-01T06:47:35.000Z | 2021-12-01T06:47:35.000Z | code/edit.py | Seeyapm/MyDollarBot-BOTGo | f26b6ee49a2497406e2f8c783368164d6c386d28 | [
"MIT"
] | 37 | 2021-11-04T05:41:29.000Z | 2021-11-05T03:31:44.000Z | code/edit.py | sak007/MyDollarBot | f26b6ee49a2497406e2f8c783368164d6c386d28 | [
"MIT"
] | 5 | 2021-11-18T18:23:50.000Z | 2022-01-09T16:02:50.000Z | import re
import helper
from telebot import types
def run(m, bot):
chat_id = m.chat.id
markup = types.ReplyKeyboardMarkup(one_time_keyboard=True)
markup.row_width = 2
for c in helper.getUserHistory(chat_id):
expense_data = c.split(',')
str_date = "Date=" + expense_data[0]
str_c... | 40.686957 | 123 | 0.653131 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.111776 |
a9e43bbbaca6ffcc52ea4dd9635c9d35894c2be1 | 2,910 | py | Python | sner/server/password_supervisor.py | bodik/sner4-web | cb054d79c587b2f8468c73a88754b7c0d5cd5a95 | [
"MIT"
] | 9 | 2019-05-15T11:33:43.000Z | 2022-02-17T04:05:28.000Z | sner/server/password_supervisor.py | bodik/sner4 | cb054d79c587b2f8468c73a88754b7c0d5cd5a95 | [
"MIT"
] | 1 | 2019-03-01T11:48:13.000Z | 2019-03-01T11:48:13.000Z | sner/server/password_supervisor.py | bodik/sner4-web | cb054d79c587b2f8468c73a88754b7c0d5cd5a95 | [
"MIT"
] | 3 | 2020-03-03T21:06:37.000Z | 2021-01-11T14:40:56.000Z | # This file is part of sner4 project governed by MIT license, see the LICENSE.txt file.
"""
password supervisor service
"""
import re
import secrets
import string
from crypt import crypt, mksalt, METHOD_SHA512 # pylint: disable=no-name-in-module
from hashlib import sha512
from hmac import compare_digest
class Passw... | 29.393939 | 141 | 0.627148 | 2,597 | 0.89244 | 0 | 0 | 2,231 | 0.766667 | 0 | 0 | 851 | 0.29244 |
a9e45a9537e83bc6e4c763dbf8b21bd0ddb46129 | 802 | py | Python | board/utility.py | ben741863140/cfsystem | 227e269f16533719251962f4d8caee8b51091d2f | [
"Apache-2.0"
] | 4 | 2018-02-22T01:59:07.000Z | 2020-07-09T06:28:46.000Z | board/utility.py | ben741863140/cfsystem | 227e269f16533719251962f4d8caee8b51091d2f | [
"Apache-2.0"
] | null | null | null | board/utility.py | ben741863140/cfsystem | 227e269f16533719251962f4d8caee8b51091d2f | [
"Apache-2.0"
] | null | null | null | import requests
from bs4 import BeautifulSoup
def get_rating(handle):
handle = str(handle)
url = 'http://codeforces.com/api/user.info?handles=' + handle
results = BeautifulSoup(requests.get(url).text, 'html.parser').text
results = eval(results)
if results['status'] != 'OK':
resul... | 30.846154 | 72 | 0.617207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.264851 |
a9e509c7d64ad4f3481c6bd6a8b0e4e0168ff090 | 11,320 | py | Python | testlunr/unit/storage/helper/utils/test_worker.py | PythonGirlSam/lunr | 9476436a46d377fab26674d41ac7444d98df1cbd | [
"Apache-2.0"
] | 6 | 2015-11-09T14:16:26.000Z | 2018-04-05T14:27:35.000Z | testlunr/unit/storage/helper/utils/test_worker.py | PythonGirlSam/lunr | 9476436a46d377fab26674d41ac7444d98df1cbd | [
"Apache-2.0"
] | 16 | 2016-01-28T20:16:47.000Z | 2019-03-07T07:30:29.000Z | testlunr/unit/storage/helper/utils/test_worker.py | SaumyaRackspace/lunr | 9476436a46d377fab26674d41ac7444d98df1cbd | [
"Apache-2.0"
] | 18 | 2015-10-23T10:10:52.000Z | 2020-12-15T07:11:52.000Z | #!/usr/bin/env python
# Copyright (c) 2011-2016 Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.359736 | 74 | 0.599205 | 10,092 | 0.891519 | 0 | 0 | 0 | 0 | 0 | 0 | 1,729 | 0.152739 |
a9e5663a61967eebf2017ef64a32596ecc3c2534 | 3,112 | py | Python | server/tests/unit/eb/test_eb.py | mdylan2/single-cell-explorer | 775e59fcf5c105bbe70edd17dbf1d2153c4f662c | [
"MIT"
] | 2 | 2021-08-30T16:32:16.000Z | 2022-03-25T22:36:23.000Z | server/tests/unit/eb/test_eb.py | mdylan2/single-cell-explorer | 775e59fcf5c105bbe70edd17dbf1d2153c4f662c | [
"MIT"
] | 194 | 2021-08-18T23:52:44.000Z | 2022-03-30T19:40:41.000Z | server/tests/unit/eb/test_eb.py | mdylan2/single-cell-explorer | 775e59fcf5c105bbe70edd17dbf1d2153c4f662c | [
"MIT"
] | 1 | 2022-01-21T09:20:15.000Z | 2022-01-21T09:20:15.000Z | import os
from unittest.mock import patch
import requests
import subprocess
import tempfile
import time
import unittest
from contextlib import contextmanager
from server.common.config.app_config import AppConfig
from server.tests import PROJECT_ROOT, FIXTURES_ROOT
@contextmanager
def run_eb_app(tempdirname):
ps... | 37.493976 | 119 | 0.641067 | 2,357 | 0.757391 | 466 | 0.149743 | 482 | 0.154884 | 0 | 0 | 658 | 0.21144 |
a9e6b321cbcd1edcb4eb0eb263701cc7fe1c4c75 | 1,966 | py | Python | RI/flask_server/tapi_server/models/tapi_connectivity_connection_ref.py | arthurMll/TAPI | e1171bb139c6791a953af09cfc2bc7ad928da73d | [
"Apache-2.0"
] | 57 | 2018-04-09T08:56:18.000Z | 2022-03-23T08:31:06.000Z | RI/flask_server/tapi_server/models/tapi_connectivity_connection_ref.py | arthurMll/TAPI | e1171bb139c6791a953af09cfc2bc7ad928da73d | [
"Apache-2.0"
] | 143 | 2016-06-08T04:09:54.000Z | 2018-02-23T10:45:59.000Z | RI/flask_server/tapi_server/models/tapi_connectivity_connection_ref.py | arthurMll/TAPI | e1171bb139c6791a953af09cfc2bc7ad928da73d | [
"Apache-2.0"
] | 64 | 2018-03-07T07:55:17.000Z | 2022-03-28T07:14:28.000Z | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from tapi_server.models.base_model_ import Model
from tapi_server import util
class TapiConnectivityConnectionRef(Model):
"""NOTE: This class is auto generated by... | 29.343284 | 105 | 0.677009 | 1,733 | 0.881485 | 0 | 0 | 1,030 | 0.523906 | 0 | 0 | 1,164 | 0.592065 |
a9e6e31bd3c6e72131078bf0a6956ecb4db026ee | 649 | py | Python | scheduling/common/input.py | makspll/OS-Scripts | 021b0a569ee0e64cb8a8e23cdd5b7ea6104a8d99 | [
"MIT"
] | null | null | null | scheduling/common/input.py | makspll/OS-Scripts | 021b0a569ee0e64cb8a8e23cdd5b7ea6104a8d99 | [
"MIT"
] | null | null | null | scheduling/common/input.py | makspll/OS-Scripts | 021b0a569ee0e64cb8a8e23cdd5b7ea6104a8d99 | [
"MIT"
] | null | null | null |
from typing import List
from enum import Enum
from .units import Process, Unit, Track
class Mode(Enum):
PROCESS = 0
DISK = 1
PAGE = 2
class Reader():
def __init__(self) -> None:
pass
def read(self,mode : Mode, path : str ) -> List[Unit]:
with open(path,"r") as f:
cr... | 20.935484 | 58 | 0.522342 | 555 | 0.855162 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.004622 |
a9e73606f7f41fdb21cfe2e7660f8da5614d729c | 957 | py | Python | pylisk/create_transaction.py | t-kimber/PyLisk | b303221eae5af85577866b61a665d58219f121cd | [
"MIT"
] | null | null | null | pylisk/create_transaction.py | t-kimber/PyLisk | b303221eae5af85577866b61a665d58219f121cd | [
"MIT"
] | 12 | 2021-12-15T13:21:06.000Z | 2022-01-26T13:05:38.000Z | pylisk/create_transaction.py | t-kimber/pylisk | b303221eae5af85577866b61a665d58219f121cd | [
"MIT"
] | null | null | null | """
Script to create a transaction.
"""
from hashlib import sha256
from pylisk.transaction import BalanceTransferTransaction
from pylisk.account import Account
def main():
address = "lskjks9w7v7wd6kg5gkt9eq5tvzu2w5vwfdc3ptkw"
acc = Account.from_info({"address": address})
bal_trs = BalanceTransferTransa... | 23.925 | 89 | 0.687565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.292581 |
a9e76e674583cf9bbe414aa9046751492cfebb42 | 3,362 | py | Python | test/test_exponential_family.py | nonconvexopt/pytorch_ssge | 3e07e1748d97bd227c66f76ee76c04dc3e8b4ec4 | [
"MIT"
] | null | null | null | test/test_exponential_family.py | nonconvexopt/pytorch_ssge | 3e07e1748d97bd227c66f76ee76c04dc3e8b4ec4 | [
"MIT"
] | 1 | 2022-01-11T10:37:49.000Z | 2022-01-11T10:37:49.000Z | test/test_exponential_family.py | nonconvexopt/pytorch_ssge | 3e07e1748d97bd227c66f76ee76c04dc3e8b4ec4 | [
"MIT"
] | null | null | null | import pytest
import torch
import gpytorch
from torch_ssge import SSGE
KERNELS = [
gpytorch.kernels.ScaleKernel(gpytorch.kernels.RBFKernel()),
gpytorch.kernels.ScaleKernel(gpytorch.kernels.MaternKernel()),
]
# Example is consist of (<sampler instance>)
# <sampler instance> should have '.sample' and 'log_pro... | 28.016667 | 95 | 0.533016 | 0 | 0 | 0 | 0 | 839 | 0.249554 | 0 | 0 | 396 | 0.117787 |