hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | 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 239 | max_issues_repo_name stringlengths 5 130 | 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 239 | max_forks_repo_name stringlengths 5 130 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
795fd1b92ed79bf948082d2ce22b25394f380691 | 6,504 | py | Python | test/test_helper.py | clarkerubber/openrouteservice-py | ec75b9277b8a411a1138cd523839532d9d25d364 | [
"Apache-2.0"
] | null | null | null | test/test_helper.py | clarkerubber/openrouteservice-py | ec75b9277b8a411a1138cd523839532d9d25d364 | [
"Apache-2.0"
] | null | null | null | test/test_helper.py | clarkerubber/openrouteservice-py | ec75b9277b8a411a1138cd523839532d9d25d364 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
PARAM_POINT = [8.34234, 48.23424]
PARAM_LINE = [[8.34234, 48.23424], [8.34423, 48.26424]]
PARAM_POLY = [[(8.34234, 48.23424), (8.34423, 48.26424)]]
PARAM_INT_BIG = 500
PARAM_INT_SMALL = 50
PARAM_LIST_ONE = [PARAM_INT_SMALL, PARAM_INT_SMALL]
PARAM_LIST_TWO = [PARAM_LIST_ONE, PARAM_LIST_ONE]
PA... | 56.068966 | 82 | 0.347171 |
795fd21d0001911f1a14b9a624ccc7c1f96d54fe | 860 | py | Python | lambdata_adrianduplessis/df_utils.py | AdrianduPlessis/lambdata_adrianduplessis | af61bd8859a392018e9a788d2ee57fb30caf54c3 | [
"MIT"
] | null | null | null | lambdata_adrianduplessis/df_utils.py | AdrianduPlessis/lambdata_adrianduplessis | af61bd8859a392018e9a788d2ee57fb30caf54c3 | [
"MIT"
] | 4 | 2020-03-24T18:14:24.000Z | 2021-06-02T00:47:45.000Z | lambdata_adrianduplessis/df_utils.py | AdrianduPlessis/lambdata_adrianduplessis | af61bd8859a392018e9a788d2ee57fb30caf54c3 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
ONES = pd.Series(np.ones(20))
ZEROS = pd.Series(np.zeros(20))
def remove_observations_with_outliers(df, zscore=3):
'''
TODO
'''
# Outlier removal
from scipy import stats
# Get subset within 'zscore' (default=3) stdev
df_cleaned = df[(
np.ab... | 20.47619 | 83 | 0.632558 |
795fd2ac07fd511cf502fcbc0919d55ae96c708a | 19,598 | py | Python | test/helper.py | artemutin/beets | 44963598e8bdfed1fcf064b947aad1012123acc5 | [
"MIT"
] | null | null | null | test/helper.py | artemutin/beets | 44963598e8bdfed1fcf064b947aad1012123acc5 | [
"MIT"
] | null | null | null | test/helper.py | artemutin/beets | 44963598e8bdfed1fcf064b947aad1012123acc5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Thomas Scholtes.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation ... | 32.663333 | 78 | 0.60746 |
795fd2b2ed6faec2b47a4ca2ff2f75e7cf152e1b | 1,160 | py | Python | servo/data/helios_rev0_inas.py | neverware-mirrors/hdctools | dd7f911bb9051e615af7fcb71d921bd481f934fb | [
"BSD-3-Clause"
] | null | null | null | servo/data/helios_rev0_inas.py | neverware-mirrors/hdctools | dd7f911bb9051e615af7fcb71d921bd481f934fb | [
"BSD-3-Clause"
] | null | null | null | servo/data/helios_rev0_inas.py | neverware-mirrors/hdctools | dd7f911bb9051e615af7fcb71d921bd481f934fb | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config_type='servod'
inas = [('ina3221', '0x40:0', 'pp3300_g', 3.30, 0.005, 'rem', True),
('ina3221', '0x40:1', 'pp5000_a', ... | 61.052632 | 80 | 0.509483 |
795fd3fbb206a51541724853d10c4c760234d0e9 | 389 | py | Python | tardis/__about__.py | maxfischer2781/tardis | a83ba0a02d2f153a8ab95b84ec78bc6ababa57a5 | [
"MIT"
] | 11 | 2019-06-06T14:44:56.000Z | 2021-12-17T19:46:18.000Z | tardis/__about__.py | stefan-k/tardis | d26af13b56ab55cdbddd27ec3332cc74093d487a | [
"MIT"
] | 165 | 2019-04-26T09:31:19.000Z | 2022-03-09T16:45:45.000Z | tardis/__about__.py | stefan-k/tardis | d26af13b56ab55cdbddd27ec3332cc74093d487a | [
"MIT"
] | 12 | 2019-06-06T14:06:15.000Z | 2021-12-21T12:31:03.000Z | __title__ = "tardis"
__package__ = "cobald-tardis"
__summary__ = "Transparent Adaptive Resource Dynamic Integration System"
__url__ = "https://github.com/matterminers/tardis"
__version__ = "0.6.0"
__author__ = "Manuel Giffels, Matthias Schnepf"
__email__ = "giffels@gmail.com"
__copyright__ = "2018 - 2021 %s and Contri... | 35.363636 | 72 | 0.773779 |
795fd3fe6d7d7b004dd81e70f06dba806a77ae6d | 200 | py | Python | examples/example_modules/module_2.py | vladcalin/pymicroservice | 325a49d17621b9d45ffd2b5eca6f0de284de8ba4 | [
"MIT"
] | 2 | 2016-12-17T13:09:14.000Z | 2016-12-31T18:38:57.000Z | examples/example_modules/module_2.py | vladcalin/pymicroservice | 325a49d17621b9d45ffd2b5eca6f0de284de8ba4 | [
"MIT"
] | 15 | 2016-11-27T13:28:25.000Z | 2017-01-10T09:09:30.000Z | examples/example_modules/module_2.py | vladcalin/pymicroservice | 325a49d17621b9d45ffd2b5eca6f0de284de8ba4 | [
"MIT"
] | null | null | null | from gemstone.core.modules import Module
import gemstone
class SecondModule(Module):
@gemstone.exposed_method("module2.say_hello")
def say_hello(self):
return "Hello from module 2!"
| 22.222222 | 49 | 0.74 |
795fd40eb4cb886a61b02c66dbbd32fc61adb9de | 7,072 | py | Python | src/pynamodb_polymorph/custom_attr.py | roryj-vendia/pynamodb-polymorph | 06aebc8059bbd05c4e61c0428cbd068dfe4a7021 | [
"MIT"
] | null | null | null | src/pynamodb_polymorph/custom_attr.py | roryj-vendia/pynamodb-polymorph | 06aebc8059bbd05c4e61c0428cbd068dfe4a7021 | [
"MIT"
] | null | null | null | src/pynamodb_polymorph/custom_attr.py | roryj-vendia/pynamodb-polymorph | 06aebc8059bbd05c4e61c0428cbd068dfe4a7021 | [
"MIT"
] | null | null | null | import typing as t
from datetime import datetime, timezone
from string import Template
import urllib.parse
import ulid
from pynamodb.attributes import NumberAttribute, UnicodeAttribute
class CompoundTemplateAttribute(UnicodeAttribute):
"""Creates a compound STRING attribute out of multiple other attributes from ... | 32.440367 | 194 | 0.645221 |
795fd4355962d6706ab7d9e7feb242ce8c396b5e | 561 | gyp | Python | Engine/package.gyp | Marisa-Chan/surreal | fd8136209941347a4f83645c461a0249dc85a281 | [
"Artistic-1.0"
] | 4 | 2016-12-22T01:42:44.000Z | 2018-09-21T22:13:23.000Z | Engine/package.gyp | Marisa-Chan/surreal | fd8136209941347a4f83645c461a0249dc85a281 | [
"Artistic-1.0"
] | null | null | null | Engine/package.gyp | Marisa-Chan/surreal | fd8136209941347a4f83645c461a0249dc85a281 | [
"Artistic-1.0"
] | null | null | null | {
"targets": [
{
"target_name": "Engine",
"type": "none",
"configurations": {
"Debug": {},
"Release": {}
},
"all_dependent_settings": {
"include_dirs": [ "Inc" ]
},
"direct_dependent_settings": {
"conditions": [
["OS == 'linux'", {
"libraries": [ "-lEngine" ]
}],... | 16.5 | 41 | 0.434938 |
795fd6a764295a277e1323b74578b1af27d57565 | 2,467 | py | Python | repos/lopq/scripts/query_runtime.py | pune-lug/DeepVideoAnalytics | 2650037040dca49b0f537df576af123dae8cef97 | [
"Apache-2.0"
] | 573 | 2016-01-04T20:11:35.000Z | 2022-03-14T14:21:41.000Z | repos/lopq/scripts/query_runtime.py | pune-lug/DeepVideoAnalytics | 2650037040dca49b0f537df576af123dae8cef97 | [
"Apache-2.0"
] | 27 | 2016-01-11T19:47:55.000Z | 2020-03-05T03:48:36.000Z | repos/lopq/scripts/query_runtime.py | pune-lug/DeepVideoAnalytics | 2650037040dca49b0f537df576af123dae8cef97 | [
"Apache-2.0"
] | 141 | 2016-01-07T01:55:00.000Z | 2021-11-06T06:26:15.000Z | # Copyright 2015, Yahoo Inc.
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
from math import sqrt, ceil
def multiseq_flops(V, D):
"""
Given the number of coarse clusters and the dimension of the data,
compute the number of flops t... | 36.279412 | 122 | 0.690717 |
795fd6d9b458f894450aaf9862bfc49b492fb874 | 2,891 | py | Python | coursera-compinvest1-master/coursera-compinvest1-master/homework/homework/homework2/homework2.py | telefar/stockEye | 2556c951af5e813460ee44951542cd918986578b | [
"BSD-3-Clause"
] | null | null | null | coursera-compinvest1-master/coursera-compinvest1-master/homework/homework/homework2/homework2.py | telefar/stockEye | 2556c951af5e813460ee44951542cd918986578b | [
"BSD-3-Clause"
] | null | null | null | coursera-compinvest1-master/coursera-compinvest1-master/homework/homework/homework2/homework2.py | telefar/stockEye | 2556c951af5e813460ee44951542cd918986578b | [
"BSD-3-Clause"
] | null | null | null | '''
(c) 2013 Remy Marquis
Computational Investing @ Georgia Tech
Homework 1
Event profiler study.
'''
import pandas as pd
import numpy as np
import math
import copy
import QSTK.qstkutil.qsdateutil as du
import datetime as dt
import QSTK.qstkutil.DataAccess as da
import QSTK.qstkutil.tsutil as tsu
import QSTK.qstkstud... | 31.423913 | 84 | 0.668281 |
795fd7138ac861d635965c4974ef6ff7433197e5 | 128 | py | Python | src/meltano/core/plugin/model/base.py | siilats/meltano | 404605c83f441c3fc2b729e26416c6caa8b0ed0b | [
"MIT"
] | 122 | 2021-06-21T17:30:29.000Z | 2022-03-25T06:21:38.000Z | src/meltano/core/plugin/model/base.py | siilats/meltano | 404605c83f441c3fc2b729e26416c6caa8b0ed0b | [
"MIT"
] | null | null | null | src/meltano/core/plugin/model/base.py | siilats/meltano | 404605c83f441c3fc2b729e26416c6caa8b0ed0b | [
"MIT"
] | 21 | 2021-06-22T10:08:15.000Z | 2022-03-18T08:57:02.000Z | from meltano.core.plugin import BasePlugin, PluginType
class ModelPlugin(BasePlugin):
__plugin_type__ = PluginType.MODELS
| 21.333333 | 54 | 0.8125 |
795fd872221c91c833c4c006f3d627561cb7f688 | 3,685 | py | Python | twisted/test/test_doc.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 7 | 2015-04-28T13:26:11.000Z | 2020-02-09T17:01:04.000Z | twisted/test/test_doc.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 4 | 2017-02-19T23:58:13.000Z | 2019-11-01T15:31:22.000Z | twisted/test/test_doc.py | ioggstream/twisted | 34f9b1e3f097685839000c656332c66ee85be5d8 | [
"Unlicense",
"MIT"
] | 6 | 2017-02-13T09:11:02.000Z | 2021-06-29T11:22:18.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
import inspect, glob
from os import path
from twisted.trial import unittest
from twisted.python import reflect
from twisted.python.modules import getModule
def errorInFile(f, line=17, name=''):
"""
Return a filename formatted so emacs ... | 35.095238 | 105 | 0.555224 |
795fda386e460a0f380180805b775f7668d9b394 | 1,991 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/privacy_key_chat_invite.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/privacy_key_chat_invite.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/privacy_key_chat_invite.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.109375 | 103 | 0.632848 |
795fdae2d2ac58cc4707e88dc428d45eb610b498 | 4,178 | py | Python | icedid/peloader/icedid_peloader.py | futex/mwcfg-modules | a65bc69fd302215485f2ea62c4fd35c6b8f04397 | [
"BSD-3-Clause"
] | 23 | 2021-05-01T19:19:36.000Z | 2022-03-19T22:10:25.000Z | icedid/peloader/icedid_peloader.py | futex/mwcfg-modules | a65bc69fd302215485f2ea62c4fd35c6b8f04397 | [
"BSD-3-Clause"
] | 3 | 2021-05-01T22:10:32.000Z | 2021-05-15T13:35:22.000Z | icedid/peloader/icedid_peloader.py | futex/mwcfg-modules | a65bc69fd302215485f2ea62c4fd35c6b8f04397 | [
"BSD-3-Clause"
] | 8 | 2021-05-01T21:13:54.000Z | 2021-11-22T06:53:54.000Z | import binascii
import collections
import logging
import math
import malduck
from malduck.extractor import Extractor
log = logging.getLogger(__name__)
__author__ = "myrtus0x0"
__version__ = "1.0.1"
class IcedIDPELoader(Extractor):
"""
IcedID PELoader Config Extractor
"""
family = 'icedid_peloader'
... | 31.179104 | 96 | 0.565103 |
795fdaf3bf8b48288c49a86d0da59db4085d2b2d | 2,329 | py | Python | ucsmsdk/mometa/storage/StorageVirtualDriveContainer.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/storage/StorageVirtualDriveContainer.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/storage/StorageVirtualDriveContainer.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for StorageVirtualDriveContainer ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class StorageVirtualDriveContainerConsts:
pass
class StorageVirtualDriveContainer(ManagedObj... | 50.630435 | 282 | 0.667239 |
795fdbada6ee478d8ce47930c884f4aa1f010c1f | 5,295 | py | Python | selfdrive/controls/lib/desire_helper.py | snnae/openpilot | ee4ca0fc6e547e020ceb9ee819a930d380dbfab9 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/desire_helper.py | snnae/openpilot | ee4ca0fc6e547e020ceb9ee819a930d380dbfab9 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/desire_helper.py | snnae/openpilot | ee4ca0fc6e547e020ceb9ee819a930d380dbfab9 | [
"MIT"
] | null | null | null | from cereal import log
from common.conversions import Conversions as CV
from common.realtime import DT_MDL
from common.params import Params
params = Params()
LaneChangeState = log.LateralPlan.LaneChangeState
LaneChangeDirection = log.LateralPlan.LaneChangeDirection
LANE_CHANGE_SPEED_MIN = 1 * CV.MPH_TO_MS
LANE_CHANG... | 43.04878 | 133 | 0.74221 |
795fdc2a01b29839e01d1246d965ee9e46260a2d | 598 | py | Python | aula73/modulo.py | jessicsous/Curso_Python | 94c9b70ec03022b21ac23bf85918aa20ce4cfdd1 | [
"MIT"
] | 1 | 2021-09-21T01:50:10.000Z | 2021-09-21T01:50:10.000Z | aula73/modulo.py | jessicsous/Curso_Python | 94c9b70ec03022b21ac23bf85918aa20ce4cfdd1 | [
"MIT"
] | null | null | null | aula73/modulo.py | jessicsous/Curso_Python | 94c9b70ec03022b21ac23bf85918aa20ce4cfdd1 | [
"MIT"
] | 1 | 2021-10-04T19:49:04.000Z | 2021-10-04T19:49:04.000Z | def soma(x: float, y: float) -> float:
return x + y
if __name__ == '__main__': # se o modulo tiver sendo executado diretamente, executa os prints.
# se for importado não será mais executado junto da importação.
print(soma(10, 20))
print(soma(20, 20))
'o processo anterior também pode ser usado com uma fun... | 27.181818 | 95 | 0.675585 |
795fdc5665bca24140db244e61a292c620ef2171 | 1,465 | py | Python | setuptools/tests/test_glibc.py | pexip/os-python-setuptools | bfec09fbab09139aa355ec8d8edd1203727fcff2 | [
"MIT"
] | 5 | 2019-03-15T02:20:19.000Z | 2020-01-14T04:24:21.000Z | setuptools/tests/test_glibc.py | pexip/os-python-setuptools | bfec09fbab09139aa355ec8d8edd1203727fcff2 | [
"MIT"
] | 6 | 2020-01-31T18:04:48.000Z | 2021-06-05T10:53:55.000Z | setuptools/tests/test_glibc.py | pexip/os-python-setuptools | bfec09fbab09139aa355ec8d8edd1203727fcff2 | [
"MIT"
] | 5 | 2017-08-26T12:11:14.000Z | 2019-10-07T02:01:06.000Z | import warnings
import pytest
from setuptools.glibc import check_glibc_version
__metaclass__ = type
@pytest.fixture(params=[
"2.20",
# used by "linaro glibc", see gh-3588
"2.20-2014.11",
# weird possibilities that I just made up
"2.20+dev",
"2.20-custom",
"2.20.1",
])
def two_twenty... | 27.641509 | 74 | 0.631399 |
795fdd079f830dfcf29a3f4ff712a99797427b02 | 34,470 | py | Python | tests/gis_tests/gdal_tests/test_raster.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/gis_tests/gdal_tests/test_raster.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/gis_tests/gdal_tests/test_raster.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | import os
import shutil
import struct
import tempfile
import zipfile
from unittest import mock
from django.contrib.gis.gdal import GDALRaster, SpatialReference
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.raster.band import GDALBand
from django.contrib.gis.shortcuts import numpy... | 35.68323 | 95 | 0.478097 |
795fdddba8394304fda1337c3706f38837b3f29d | 4,536 | py | Python | scripts/popgen/transform.py | gglin001/poptorch | 61f38ed2d8c6b672e023862eb698865fa7f4724e | [
"MIT"
] | 128 | 2020-12-08T22:22:46.000Z | 2022-03-23T10:54:26.000Z | scripts/popgen/transform.py | gglin001/poptorch | 61f38ed2d8c6b672e023862eb698865fa7f4724e | [
"MIT"
] | 4 | 2021-06-22T14:26:28.000Z | 2022-02-15T11:25:05.000Z | scripts/popgen/transform.py | gglin001/poptorch | 61f38ed2d8c6b672e023862eb698865fa7f4724e | [
"MIT"
] | 7 | 2020-12-09T20:32:56.000Z | 2022-01-18T16:12:24.000Z | # Copyright (c) 2020 Graphcore Ltd. All rights reserved
from popgen import registry, Value, ConstantFloat
from popgen.values import InputValue
# generate_complex_ops(value)
#
# Apply simplification rules to the expression rooted at the parameter.
# New values are annotated with the applied transformation.
# Paramete... | 32.4 | 83 | 0.652116 |
795fddfcf119d5d7c7d2c1e81ffda2af0bd7494b | 410 | py | Python | tracklater/tests/test_slack.py | Eerovil/thyme-toggl-cli | 65216bd70576508cce8d1301f307f3910d67d9c9 | [
"MIT"
] | 110 | 2019-05-19T13:06:50.000Z | 2021-12-18T11:51:34.000Z | tracklater/tests/test_slack.py | Eerovil/thyme-toggl-cli | 65216bd70576508cce8d1301f307f3910d67d9c9 | [
"MIT"
] | 33 | 2019-05-19T13:21:07.000Z | 2021-03-12T05:52:08.000Z | tracklater/tests/test_slack.py | Eerovil/thyme-toggl-cli | 65216bd70576508cce8d1301f307f3910d67d9c9 | [
"MIT"
] | 5 | 2019-08-08T14:57:23.000Z | 2019-12-28T19:30:21.000Z | from tracklater.timemodules.slack import Parser
import pytest
import os
from datetime import datetime, timedelta
DIRECTORY = os.path.dirname(os.path.realpath(__file__))
@pytest.fixture()
def parser():
_parser = Parser(datetime.utcnow() - timedelta(days=7), datetime.utcnow())
return _parser
def test_get_e... | 18.636364 | 78 | 0.709756 |
795fde191c2aac0fa25ef7a575ae57ad247f20a4 | 294 | py | Python | src/python/bap/__init__.py | BombDash/bap | 0fdb32ff6556f4a0369e675023eca75c7e3b5a32 | [
"MIT"
] | null | null | null | src/python/bap/__init__.py | BombDash/bap | 0fdb32ff6556f4a0369e675023eca75c7e3b5a32 | [
"MIT"
] | null | null | null | src/python/bap/__init__.py | BombDash/bap | 0fdb32ff6556f4a0369e675023eca75c7e3b5a32 | [
"MIT"
] | null | null | null | """General bapman library. Provides API for package management"""
from .pkginfo import PkgInfo, Person, Version
from .package import pack as genpkg, unpack as extract_pkg
from .pkgcontrol import install, uninstall
from .db import Database
from . import repo
version = Version(0, 3, 2, 'dev')
| 29.4 | 65 | 0.768707 |
795fdf3f46226357445f7e343b398e5f5abec26f | 5,869 | py | Python | misc/mesh_from_bone_envelopes.py | 0b5vr/VRM_IMPORTER_for_Blender2_8 | b78cd8b6106a80eb2f7cb91e62babcfa88677975 | [
"MIT"
] | 1 | 2022-01-15T08:32:10.000Z | 2022-01-15T08:32:10.000Z | misc/mesh_from_bone_envelopes.py | 0b5vr/VRM_IMPORTER_for_Blender2_8 | b78cd8b6106a80eb2f7cb91e62babcfa88677975 | [
"MIT"
] | null | null | null | misc/mesh_from_bone_envelopes.py | 0b5vr/VRM_IMPORTER_for_Blender2_8 | b78cd8b6106a80eb2f7cb91e62babcfa88677975 | [
"MIT"
] | null | null | null | import bpy
from mathutils import Vector
from math import ceil
class ICYP_OT_MAKE_MESH_FROM_BONE_ENVELOPES(bpy.types.Operator):
bl_idname = "icyp.make_mesh_from_envelopes"
bl_label = "(WIP)basic mesh for vrm"
bl_description = "Create mesh along with a simple setup for VRM export"
bl_options = {"REGISTE... | 39.389262 | 86 | 0.593628 |
795fdf455e386102c3c62a4bea94f4c5c85c1f80 | 3,626 | py | Python | resources/lib/storeMySqlSetup.py | ahpohl/plugin.video.mediathekview | c52484a267c51b298a71f436eb320d903dc31347 | [
"MIT"
] | 53 | 2018-01-12T12:43:52.000Z | 2022-02-05T19:42:39.000Z | resources/lib/storeMySqlSetup.py | ahpohl/plugin.video.mediathekview | c52484a267c51b298a71f436eb320d903dc31347 | [
"MIT"
] | 176 | 2018-01-09T09:13:31.000Z | 2022-02-13T11:27:47.000Z | resources/lib/storeMySqlSetup.py | ahpohl/plugin.video.mediathekview | c52484a267c51b298a71f436eb320d903dc31347 | [
"MIT"
] | 29 | 2018-01-12T01:42:50.000Z | 2022-02-05T19:42:54.000Z | # -*- coding: utf-8 -*-
"""
The local SQlite database module
Copyright 2017-2019, Leo Moll
SPDX-License-Identifier: MIT
"""
# pylint: disable=too-many-lines,line-too-long
import resources.lib.appContext as appContext
class StoreMySQLSetup(object):
def __init__(self, dbCon):
self.logger = appContext.MVL... | 36.626263 | 134 | 0.589079 |
795fdfa01d4e3d92ca69208ad7a7a25ecc12279d | 967 | py | Python | anima.py | diegotg2000/Prueba30 | df83f108fe7b1122f2fec39c1cc6f922416901e7 | [
"MIT"
] | null | null | null | anima.py | diegotg2000/Prueba30 | df83f108fe7b1122f2fec39c1cc6f922416901e7 | [
"MIT"
] | null | null | null | anima.py | diegotg2000/Prueba30 | df83f108fe7b1122f2fec39c1cc6f922416901e7 | [
"MIT"
] | null | null | null | import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import imageio
vec=np.loadtxt('datos.txt',usecols=0)
Z=np.zeros(shape=(401,201))
for i in range(401):
Z[i,:]=vec[i*201:(i+1)*201]
def plot_for_offset(i):
# Data for plotting
x = np.arange(201)/201
s = Z[i]
fig, ax = plt.... | 25.447368 | 80 | 0.632885 |
795fe02dc98c3356b6cd48dce9ab8339d09d3239 | 548 | py | Python | synlib/descriptions/NOR4X1.py | vhnatyk/vlsistuff | 0981097bd19a0c482728dcc5048a3615ac9a9a90 | [
"MIT"
] | 26 | 2018-03-17T18:14:22.000Z | 2022-03-14T07:23:13.000Z | synlib/descriptions/NOR4X1.py | psumesh/vlsistuff | 1fe64b093d0581d99c7d826b74c31b8655fa0b31 | [
"MIT"
] | 1 | 2019-10-16T10:31:11.000Z | 2019-10-17T04:14:53.000Z | synlib/descriptions/NOR4X1.py | psumesh/vlsistuff | 1fe64b093d0581d99c7d826b74c31b8655fa0b31 | [
"MIT"
] | 7 | 2018-07-16T07:51:25.000Z | 2022-02-15T14:22:54.000Z | Desc = cellDescClass("NOR4X1")
Desc.properties["cell_leakage_power"] = "280.786014"
Desc.properties["cell_footprint"] = "nor4"
Desc.properties["area"] = "19.958400"
Desc.pinOrder = ['A', 'B', 'C', 'D', 'Y']
Desc.add_arc("A","Y","combi")
Desc.add_arc("B","Y","combi")
Desc.add_arc("C","Y","combi")
Desc.add_arc("D","Y","c... | 30.444444 | 52 | 0.662409 |
795fe177f1bdf4b59281f5ef9de58d4b5dc85574 | 5,921 | py | Python | msgraph/cli/command_modules/usersactions/azext_usersactions/vendored_sdks/usersactions/operations/_userscalendargroupscalendarscalendarviewcalendar_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | msgraph/cli/command_modules/usersactions/azext_usersactions/vendored_sdks/usersactions/operations/_userscalendargroupscalendarscalendarviewcalendar_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | 22 | 2022-03-29T22:54:37.000Z | 2022-03-29T22:55:27.000Z | msgraph/cli/command_modules/usersactions/azext_usersactions/vendored_sdks/usersactions/operations/_userscalendargroupscalendarscalendarviewcalendar_operations.py | microsoftgraph/msgraph-cli-archived | 489f70bf4ede1ce67b84bfb31e66da3e4db76062 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.341667 | 218 | 0.699037 |
795fe1804aa92a4984ff4fb5047046140d0d6266 | 399 | py | Python | startup.py | PleXone2019/firebase-micropython-esp32 | fdf20fd5bb729c098a0e1d2c49a24ef8e4f37a8c | [
"MIT"
] | 42 | 2017-06-09T06:49:04.000Z | 2022-02-15T09:12:18.000Z | startup.py | PleXone2019/firebase-micropython-esp32 | fdf20fd5bb729c098a0e1d2c49a24ef8e4f37a8c | [
"MIT"
] | 8 | 2017-09-30T20:11:22.000Z | 2022-01-27T00:43:39.000Z | startup.py | PleXone2019/firebase-micropython-esp32 | fdf20fd5bb729c098a0e1d2c49a24ef8e4f37a8c | [
"MIT"
] | 22 | 2017-08-21T20:46:51.000Z | 2022-03-15T10:26:28.000Z | import sys
def wlan_connect(ssid=sys.argv[1], password=sys.argv[2]):
import network
wlan = network.WLAN(network.STA_IF)
if not wlan.active() or not wlan.isconnected():
wlan.active(True)
print('connecting to:', ssid)
wlan.connect(ssid, password)
while not wlan.isconnected():
... | 26.6 | 57 | 0.639098 |
795fe220730c7cefd3cd0fef95f15a987ea935db | 19,673 | py | Python | libqtile/widget/battery.py | maxjcohen/qtile | 05d49561e179930ecb78f7749f52d857128431d1 | [
"MIT"
] | null | null | null | libqtile/widget/battery.py | maxjcohen/qtile | 05d49561e179930ecb78f7749f52d857128431d1 | [
"MIT"
] | null | null | null | libqtile/widget/battery.py | maxjcohen/qtile | 05d49561e179930ecb78f7749f52d857128431d1 | [
"MIT"
] | null | null | null | # Copyright (c) 2011 matt
# Copyright (c) 2011 Paul Colomiets
# Copyright (c) 2011-2014 Tycho Andersen
# Copyright (c) 2012 dmpayton
# Copyright (c) 2012 hbc
# Copyright (c) 2012 Tim Neumann
# Copyright (c) 2012 uberj
# Copyright (c) 2012-2013 Craig Barnes
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2014 Sean Vig
... | 34.213913 | 114 | 0.601688 |
795fe2652d5140efcf92f9c79e5ea7a03003ded7 | 4,017 | py | Python | budget-rnn/src/controllers/noise_generators.py | tejaskannan/ml-models | ad5acad2c0ce75773062ffcdff088a6fbe5ffc17 | [
"Apache-2.0"
] | 1 | 2021-06-28T15:40:41.000Z | 2021-06-28T15:40:41.000Z | budget-rnn/src/controllers/noise_generators.py | tejaskannan/ml-models | ad5acad2c0ce75773062ffcdff088a6fbe5ffc17 | [
"Apache-2.0"
] | 5 | 2021-03-04T19:42:15.000Z | 2022-02-10T05:46:15.000Z | budget-rnn/src/controllers/noise_generators.py | tejaskannan/budget-rnn | ad5acad2c0ce75773062ffcdff088a6fbe5ffc17 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from typing import Optional, Dict, Any, Iterable
class NoiseGenerator:
def __init__(self, max_time: int, loc: float, scale: float, seed: int):
self._max_time = max_time
self._loc = loc
self._scale = scale
self._rand = np.random.RandomState(seed=seed)
se... | 37.194444 | 158 | 0.59298 |
795fe35cfeeed30d45f1f9af168ae31714a2ba06 | 415 | py | Python | docmaker/hacks/convert_single_row_tables.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | docmaker/hacks/convert_single_row_tables.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | docmaker/hacks/convert_single_row_tables.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | from docx import Document
from docmaker.hooks import Hook
@Hook("pre_finalize_docx")
def convert_single_row_tables(ctx):
d = Document(ctx.docxfile)
style_name = ctx.get("hacks.single_row_table_style") or "Normal Table"
if style_name not in d.styles:
return
for table in d.tables:
if ... | 21.842105 | 74 | 0.679518 |
795fe382ce734d43fef70035b47058a866fb2594 | 5,609 | py | Python | sdk/python/pulumi_azure_nextgen/devices/v20200901preview/dps_certificate.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/devices/v20200901preview/dps_certificate.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/devices/v20200901preview/dps_certificate.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 43.48062 | 537 | 0.65698 |
795fe6804f9de63427542ba987384392ff6f4000 | 236 | py | Python | hackerrank/Algorithms/Circular Array Rotation/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | 4 | 2020-07-24T01:59:50.000Z | 2021-07-24T15:14:08.000Z | hackerrank/Algorithms/Circular Array Rotation/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | hackerrank/Algorithms/Circular Array Rotation/test.py | ATrain951/01.python-com_Qproject | c164dd093954d006538020bdf2e59e716b24d67c | [
"MIT"
] | null | null | null | import unittest
import solution
class TestQ(unittest.TestCase):
def test_case_0(self):
self.assertEqual(solution.circularArrayRotation([1, 2, 3], 2, [0, 1, 2]), [2, 3, 1])
if __name__ == '__main__':
unittest.main()
| 18.153846 | 92 | 0.661017 |
795fe79ca866890986ddcfd0816eb1a4c909fecd | 81,965 | py | Python | python/paddle/fluid/incubate/fleet/parameter_server/pslib/ps_pb2.py | qingfengwuhen/Paddle | cff5e2c173afc4431085b9382c716be7a9b91759 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/incubate/fleet/parameter_server/pslib/ps_pb2.py | qingfengwuhen/Paddle | cff5e2c173afc4431085b9382c716be7a9b91759 | [
"Apache-2.0"
] | 1 | 2019-07-30T05:22:32.000Z | 2019-07-30T05:22:32.000Z | python/paddle/fluid/incubate/fleet/parameter_server/pslib/ps_pb2.py | qingfengwuhen/Paddle | cff5e2c173afc4431085b9382c716be7a9b91759 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.550962 | 6,906 | 0.602379 |
795fe9aaad344362c9b37a13b07562aaad8513c9 | 8,230 | py | Python | tests/ci/pr_info.py | s-kat/ClickHouse | e1a58d08894f981edca09c287ccff76250017b74 | [
"Apache-2.0"
] | 2 | 2022-01-09T06:22:58.000Z | 2022-02-02T01:27:45.000Z | tests/ci/pr_info.py | s-kat/ClickHouse | e1a58d08894f981edca09c287ccff76250017b74 | [
"Apache-2.0"
] | null | null | null | tests/ci/pr_info.py | s-kat/ClickHouse | e1a58d08894f981edca09c287ccff76250017b74 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import json
import os
import urllib
import requests
from unidiff import PatchSet
from env_helper import GITHUB_REPOSITORY, GITHUB_SERVER_URL, GITHUB_RUN_ID, GITHUB_EVENT_PATH
DIFF_IN_DOCUMENTATION_EXT = [".html", ".md", ".yml", ".txt", ".css", ".js", ".xml", ".ico", ".conf", ".svg", ".png",
... | 41.15 | 124 | 0.583961 |
795fecdb38c9200fe9f7b3c490b89cbab6a870dc | 2,880 | py | Python | gemelli/scripts/tests/test_standalone_ctf.py | lisa55asil/gemelli | cc15f9d575b7d26c9eecf4ac0b38ea1f35bf76e6 | [
"BSD-3-Clause"
] | null | null | null | gemelli/scripts/tests/test_standalone_ctf.py | lisa55asil/gemelli | cc15f9d575b7d26c9eecf4ac0b38ea1f35bf76e6 | [
"BSD-3-Clause"
] | null | null | null | gemelli/scripts/tests/test_standalone_ctf.py | lisa55asil/gemelli | cc15f9d575b7d26c9eecf4ac0b38ea1f35bf76e6 | [
"BSD-3-Clause"
] | null | null | null | from gemelli.scripts._standalone_ctf import standalone_ctf
import unittest
import pandas as pd
from os.path import sep as os_path_sep
from click.testing import CliRunner
from skbio.util import get_data_path
from numpy.testing import assert_allclose
from gemelli.testing import absolute_sort
class Test_standalone_rpca(... | 38.918919 | 73 | 0.559722 |
795fece976b262811459d905216be88f5d11e30b | 24,441 | bzl | Python | haskell/defs.bzl | ugniusb/rules_haskell | a18f17f9b3ac21a13f51890a366df64c05b43d53 | [
"Apache-2.0"
] | null | null | null | haskell/defs.bzl | ugniusb/rules_haskell | a18f17f9b3ac21a13f51890a366df64c05b43d53 | [
"Apache-2.0"
] | null | null | null | haskell/defs.bzl | ugniusb/rules_haskell | a18f17f9b3ac21a13f51890a366df64c05b43d53 | [
"Apache-2.0"
] | null | null | null | """Core Haskell rules"""
load(
":haddock.bzl",
_haskell_doc = "haskell_doc",
_haskell_doc_aspect = "haskell_doc_aspect",
)
load(
":private/haskell_impl.bzl",
_haskell_binary_impl = "haskell_binary_impl",
_haskell_import_impl = "haskell_import_impl",
_haskell_library_impl = "haskell_library_... | 37.717593 | 263 | 0.648009 |
795fee6f256c9fb49e31e0a3c6c335cfde86b34d | 1,719 | py | Python | dogapp/app.py | hrgupta/dogapp | ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a | [
"MIT"
] | null | null | null | dogapp/app.py | hrgupta/dogapp | ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a | [
"MIT"
] | null | null | null | dogapp/app.py | hrgupta/dogapp | ea1c22293abc1c3f6e4b3bf2775cb7fa612f735a | [
"MIT"
] | null | null | null | import os
import sys
from numpy.lib import utils
sys.path.append(".")
import json
from http import HTTPStatus
from fastapi import FastAPI, Path
from fastapi.responses import RedirectResponse
from pydantic import BaseModel
from dogapp import dogconfig, predict, models, utils
app = FastAPI(
title="Dog Identifica... | 26.859375 | 101 | 0.647469 |
795ff047bfd72852e12c256b63d71a1143061ff9 | 141 | py | Python | tests/__init__.py | SciFin-Team/SciFin | e4e3d1a32e060c911e43d89df833b3ad078ba6df | [
"MIT"
] | 9 | 2020-08-07T02:58:44.000Z | 2021-10-05T16:37:07.000Z | tests/__init__.py | SciFin-Team/SciFin | e4e3d1a32e060c911e43d89df833b3ad078ba6df | [
"MIT"
] | 9 | 2020-08-30T09:55:23.000Z | 2020-10-15T20:06:36.000Z | tests/__init__.py | SciFin-Team/SciFin | e4e3d1a32e060c911e43d89df833b3ad078ba6df | [
"MIT"
] | 5 | 2020-08-17T10:35:26.000Z | 2020-11-13T17:46:33.000Z | # __init__.py
__version__ = "0.1.0"
__author__ = "Fabien Nugier"
"""
The :mod:`scifin.tests` module includes methods for unit tests.
"""
| 12.818182 | 63 | 0.680851 |
795ff27f5ca8cce3b59ba2bb7535602a99c067ad | 96 | py | Python | data_regist/apps.py | topology-lab/topology-charts | 583049e02b89fdd7b9cf6f64e61f915b3c838334 | [
"MIT"
] | 1 | 2015-04-24T12:53:14.000Z | 2015-04-24T12:53:14.000Z | data_regist/apps.py | topology-lab/topology-charts | 583049e02b89fdd7b9cf6f64e61f915b3c838334 | [
"MIT"
] | null | null | null | data_regist/apps.py | topology-lab/topology-charts | 583049e02b89fdd7b9cf6f64e61f915b3c838334 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class DataRegistConfig(AppConfig):
name = 'data_regist'
| 16 | 34 | 0.770833 |
795ff2e0f2e3472dad961ddbf6c3e4f6f0e57c1a | 9,408 | py | Python | baselines/her/experiment/train.py | ruizhaogit/mep | 0653ab47718d818504644387ed85b8538b5fb210 | [
"MIT"
] | 22 | 2019-05-27T06:27:06.000Z | 2022-01-11T05:16:33.000Z | baselines/her/experiment/train.py | ruizhaogit/mep | 0653ab47718d818504644387ed85b8538b5fb210 | [
"MIT"
] | 1 | 2021-03-22T14:13:04.000Z | 2021-03-22T14:13:04.000Z | baselines/her/experiment/train.py | ruizhaogit/mep | 0653ab47718d818504644387ed85b8538b5fb210 | [
"MIT"
] | 7 | 2019-08-11T22:13:40.000Z | 2021-01-22T06:07:31.000Z | import os
import sys
import click
import numpy as np
import json
from mpi4py import MPI
from baselines import logger
from baselines.common import set_global_seeds
from baselines.common.mpi_moments import mpi_moments
import baselines.her.experiment.config as config
from baselines.her.rollout import RolloutWorker
from ... | 42.188341 | 184 | 0.675702 |
795ff3461edaa997a497b8066b9f1bada35dc35d | 3,098 | py | Python | MOOC/Computer-Science-and-Python/Lecture 3.py | datasciencesg/knowledge-base | 3afbe82b7a89e8e51a33ce38209e7ce619a6e015 | [
"MIT"
] | 40 | 2017-09-04T09:44:29.000Z | 2021-06-26T18:37:01.000Z | MOOC/Computer-Science-and-Python/Lecture 3.py | datasciencesg/knowledge-base | 3afbe82b7a89e8e51a33ce38209e7ce619a6e015 | [
"MIT"
] | 2 | 2018-12-20T07:18:27.000Z | 2019-02-22T17:09:56.000Z | MOOC/Computer-Science-and-Python/Lecture 3.py | datasciencesg/knowledge-base | 3afbe82b7a89e8e51a33ce38209e7ce619a6e015 | [
"MIT"
] | 14 | 2015-08-19T16:01:36.000Z | 2020-07-09T07:59:42.000Z | ## Week 2
x = int(raw_input('Enter an integer: '))
ans = 0
while ans**3 < abs(x):
ans = ans + 1
if ans**3 != abs(x):
print(str(x) + ' is not a perfect cube')
else:
if x < 0:
ans = -ans
print ('Cube root of ' + str(x) + ' is ' + str(ans))
num = 0
while num <= 5:
print num
num += 1
... | 16.391534 | 69 | 0.53938 |
795ff426f26a8f7f7ce36aaf88f2b1fe2b2b8cd8 | 519 | py | Python | ROMs/cut3.py | ThomazPom/PB2K | 02a4b6b028a0d32a73fd4e1d52e8f05c866e09df | [
"Apache-2.0"
] | null | null | null | ROMs/cut3.py | ThomazPom/PB2K | 02a4b6b028a0d32a73fd4e1d52e8f05c866e09df | [
"Apache-2.0"
] | null | null | null | ROMs/cut3.py | ThomazPom/PB2K | 02a4b6b028a0d32a73fd4e1d52e8f05c866e09df | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
import array
import numpy as np
full = np.fromfile('pb2k.rom',dtype=np.uint8)
expansion_size = 0x40 * 512
system_size = full.size - expansion_size
bios = np.empty((expansion_size,),dtype=np.uint8)
system = np.empty((system_size,),dtype=np.uint8)
yy = 0
for x in range(0,expansion_size):... | 14.828571 | 49 | 0.685934 |
795ff522142da0d88c58c03493c4aa7b69e504da | 1,392 | py | Python | src/services/serviceHandler.py | Grant-Steinfeld/python-ubi-openshift | 82fb2d4a4093a5b67c68a3443da23532f59a230c | [
"Apache-2.0"
] | 7 | 2020-04-21T21:23:39.000Z | 2022-02-16T11:09:58.000Z | src/services/serviceHandler.py | Grant-Steinfeld/python-ubi-openshift | 82fb2d4a4093a5b67c68a3443da23532f59a230c | [
"Apache-2.0"
] | 3 | 2020-02-18T21:57:04.000Z | 2020-03-26T20:37:22.000Z | src/services/serviceHandler.py | Grant-Steinfeld/python-ubi-openshift | 82fb2d4a4093a5b67c68a3443da23532f59a230c | [
"Apache-2.0"
] | 13 | 2020-04-27T19:56:43.000Z | 2022-03-31T03:53:22.000Z | from urllib.request import urlopen, Request # noqa: 401
from urllib.error import HTTPError # noqa: 401
import json
import logging
logger = logging.getLogger(__name__)
BASE_URL_ENDPOINT = "https://api.exchangeratesapi.io/"
HEADERS = {
"Accept": "application/json",
"Content-Type": "application/json",
}
clas... | 24.421053 | 83 | 0.730603 |
795ff5ad4504e9cd343b03ebd026d81dea9c75cf | 4,946 | py | Python | src/Control/Identify.py | Zeing/CaptchaReader | dfeb7683c70132573e06b95c73a8125c8ffbd22a | [
"MIT"
] | 2 | 2015-03-20T13:04:34.000Z | 2015-03-20T13:04:42.000Z | src/Control/Identify.py | Zeing/CaptchaReader | dfeb7683c70132573e06b95c73a8125c8ffbd22a | [
"MIT"
] | null | null | null | src/Control/Identify.py | Zeing/CaptchaReader | dfeb7683c70132573e06b95c73a8125c8ffbd22a | [
"MIT"
] | 5 | 2015-10-28T16:28:01.000Z | 2021-06-22T10:49:10.000Z | '''
Created on Aug 28, 2014
@author: Jason Guo E-mail: zqguo@zqguo.com
'''
import cStringIO
import datetime
from sklearn.externals import joblib
from PIL import Image
import config
class Identify():
'''
Usage: to identify the captcha.
Input: the string of captcha image
Output: the string of captch... | 33.646259 | 87 | 0.537808 |
795ff5b3b99d58886be95db429158791cfb59c12 | 2,632 | py | Python | web_app/pages.py | joejcollins/WomertonFarm | 96167530d37f5aab6ae91cc8ff4583a86740e3f4 | [
"MIT"
] | null | null | null | web_app/pages.py | joejcollins/WomertonFarm | 96167530d37f5aab6ae91cc8ff4583a86740e3f4 | [
"MIT"
] | 1 | 2021-06-02T00:18:04.000Z | 2021-06-02T00:18:04.000Z | web_app/pages.py | joejcollins/WomertonFarm | 96167530d37f5aab6ae91cc8ff4583a86740e3f4 | [
"MIT"
] | null | null | null | import logging
import webapp2
import config
import re
import json
import models
from google.appengine.api import mail
'''
Base controller to deal with 500 errors
'''
class base_page_controller(webapp2.RequestHandler):
""" Base pag controller """
def handle_exception(self, exception, debug):
# Log the e... | 34.181818 | 111 | 0.615881 |
795ff6f3a40d9d4bef3b5c7829d67eda247bfc69 | 8,086 | py | Python | designate/tests/unit/producer/test_tasks.py | cleosson-daitan/designate | 37b3fa2ea454183e4a5c6a099eca5129959d10e1 | [
"Apache-2.0"
] | 1 | 2022-02-18T11:19:35.000Z | 2022-02-18T11:19:35.000Z | designate/tests/unit/producer/test_tasks.py | sapcc/designate | c3f084751006a2fe7562f137930542c4759d6fd9 | [
"Apache-2.0"
] | null | null | null | designate/tests/unit/producer/test_tasks.py | sapcc/designate | c3f084751006a2fe7562f137930542c4759d6fd9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hpe.com>
#
# 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/lic... | 32.736842 | 77 | 0.653475 |
795ff7f3b2bb5af43fb5dac243cca91dc2f9d898 | 16,608 | py | Python | tests/node/test_maxpool.py | gglin001/onnx_jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | 9 | 2021-04-12T02:37:14.000Z | 2022-03-28T23:31:40.000Z | tests/node/test_maxpool.py | gglin001/onnx-jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | null | null | null | tests/node/test_maxpool.py | gglin001/onnx-jax | 08e2a1181250db48f4436f6430903fc895a3a1d6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import onnx
from tests.node.pool_op_common import get_output_shape, get_pad_shape, pool
from tests.tools import expect
class MaxPool:
@staticmethod
def export_maxpool_2d_uint8(): # type: () -> None
"""
input_shape: [1, 1, 5, 5]
output_shape: [1, 1, 5, 5]
pa... | 31.694656 | 88 | 0.426782 |
795ff9412354558149bec3fff5306c7faaa8bddd | 1,702 | py | Python | fanficdownloader/adapters/adapter_fictionpresscom.py | google-code-export/fanficdownloader | 868a8aa97da8ffe5e2ff8060d8378634acc8b22e | [
"Apache-2.0"
] | null | null | null | fanficdownloader/adapters/adapter_fictionpresscom.py | google-code-export/fanficdownloader | 868a8aa97da8ffe5e2ff8060d8378634acc8b22e | [
"Apache-2.0"
] | null | null | null | fanficdownloader/adapters/adapter_fictionpresscom.py | google-code-export/fanficdownloader | 868a8aa97da8ffe5e2ff8060d8378634acc8b22e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team
#
# 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 require... | 32.730769 | 181 | 0.705053 |
795ff989c5b9823b382407d9a2accef0aa5a7131 | 16,464 | py | Python | appengine/monorail/proto/tracker_pb2.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/proto/tracker_pb2.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/proto/tracker_pb2.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is govered by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""The Monorail issue tracker uses ProtoRPC for storing business objects."""
from protorpc impo... | 40.452088 | 79 | 0.762087 |
795ffad7fb27e0c5dab717794aa3378767667e63 | 2,480 | py | Python | model/src/sub_layers.py | qkaren/converse_reading_cmr | d06d981be12930cff8458e2b1b81be4f5df3a329 | [
"MIT"
] | 87 | 2019-06-07T18:16:30.000Z | 2021-11-27T08:18:45.000Z | model/src/sub_layers.py | qkaren/converse_reading_cmr | d06d981be12930cff8458e2b1b81be4f5df3a329 | [
"MIT"
] | 11 | 2019-06-19T20:53:27.000Z | 2021-05-07T01:05:01.000Z | model/src/sub_layers.py | qkaren/converse_reading_cmr | d06d981be12930cff8458e2b1b81be4f5df3a329 | [
"MIT"
] | 17 | 2019-06-08T01:50:23.000Z | 2022-02-16T07:12:15.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
class PositionwiseNN(nn.Module):
def __init__(self, idim, hdim, dropout=None):
super(PositionwiseNN, self).__init__()
self.w_0 = nn.Conv1d(idim, hdim, 1)
self.w_1 = nn.Conv1d(hdim, h... | 33.066667 | 102 | 0.606452 |
795ffad9bd56c387f63c3d503f2521c2e19c984e | 5,140 | py | Python | kivymd/uix/behaviors/backgroundcolorbehavior.py | ZurMaD/KivyMD | 384a84a104d73bc72c1e130b4f393f1f0620a175 | [
"MIT"
] | 1 | 2020-06-16T03:54:09.000Z | 2020-06-16T03:54:09.000Z | kivymd/uix/behaviors/backgroundcolorbehavior.py | ZurMaD/KivyMD | 384a84a104d73bc72c1e130b4f393f1f0620a175 | [
"MIT"
] | 1 | 2020-06-06T07:57:03.000Z | 2020-06-06T07:57:03.000Z | kivymd/uix/behaviors/backgroundcolorbehavior.py | ZurMaD/KivyMD | 384a84a104d73bc72c1e130b4f393f1f0620a175 | [
"MIT"
] | null | null | null | """
Behaviors/Background Color
==========================
.. note:: The following classes are intended for in-house use of the library.
"""
__all__ = ("BackgroundColorBehavior", "SpecificBackgroundColorBehavior")
from kivy.lang import Builder
from kivy.properties import (
BoundedNumericProperty,
ListProperty... | 30.963855 | 88 | 0.623346 |
795ffb5577993ae2d3efedc050b2434ff0aea339 | 2,043 | py | Python | avocado/wallet/sign_coin_solutions.py | avocado-fork-workaround/avocado-blockchain | c177ef0356384a4ed91822a437edb4d7a8717cef | [
"Apache-2.0"
] | 16 | 2021-07-07T08:21:28.000Z | 2022-02-09T04:28:42.000Z | avocado/wallet/sign_coin_solutions.py | avocado-fork-workaround/avocado-blockchain | c177ef0356384a4ed91822a437edb4d7a8717cef | [
"Apache-2.0"
] | null | null | null | avocado/wallet/sign_coin_solutions.py | avocado-fork-workaround/avocado-blockchain | c177ef0356384a4ed91822a437edb4d7a8717cef | [
"Apache-2.0"
] | 1 | 2021-08-18T16:39:49.000Z | 2021-08-18T16:39:49.000Z | import inspect
from typing import List, Any
import blspy
from blspy import AugSchemeMPL
from avocado.types.coin_solution import CoinSolution
from avocado.types.spend_bundle import SpendBundle
from avocado.util.condition_tools import conditions_dict_for_solution, pkm_pairs_for_conditions_dict
async def sign_coin_sol... | 39.288462 | 110 | 0.690162 |
795ffc7436bd06e0b2adad7a59908dfa41dab0c6 | 10,750 | py | Python | f5/bigip/tm/security/test/functional/test_protected_servers.py | hixio-mh/f5-common-python | 53038d44afa381b70f6e2bb459f7b9b943f3172d | [
"Apache-2.0"
] | 272 | 2016-02-23T06:05:44.000Z | 2022-02-20T02:09:32.000Z | f5/bigip/tm/security/test/functional/test_protected_servers.py | hixio-mh/f5-common-python | 53038d44afa381b70f6e2bb459f7b9b943f3172d | [
"Apache-2.0"
] | 1,103 | 2016-02-11T17:48:03.000Z | 2022-02-15T17:13:37.000Z | f5/bigip/tm/security/test/functional/test_protected_servers.py | hixio-mh/f5-common-python | 53038d44afa381b70f6e2bb459f7b9b943f3172d | [
"Apache-2.0"
] | 167 | 2016-02-11T17:48:21.000Z | 2022-01-17T20:13:05.000Z | # Copyright 2018 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 49.311927 | 155 | 0.720093 |
795ffc779fc3e60e97da7d18b61173b15a096292 | 4,734 | py | Python | yoconfigurator/dicts.py | yola/yoconfigurator | e8d4c7c2827608604722fcf7332caa190ce77c8a | [
"MIT"
] | null | null | null | yoconfigurator/dicts.py | yola/yoconfigurator | e8d4c7c2827608604722fcf7332caa190ce77c8a | [
"MIT"
] | 12 | 2015-01-08T19:50:09.000Z | 2018-01-17T21:35:04.000Z | yoconfigurator/dicts.py | yola/yoconfigurator | e8d4c7c2827608604722fcf7332caa190ce77c8a | [
"MIT"
] | null | null | null | """Module for DotDict data structure and DotDict helpers."""
class DotDict(dict):
"""
A dictionary with attribute access.
On creation/assignment, child dicts and list-of-dicts will be converted to
DotDict.
This is a cleaner way to read a dict in the templates
instead of using dict['field'],... | 31.56 | 78 | 0.575201 |
795ffe6baeb6f3fe01349c227b00b2407612713d | 466 | py | Python | dex/utils/ReturnCode.py | TomWeaver18/dexter | d89b66ca6a0d1ba29a4c32f152773a34ce2881e8 | [
"MIT"
] | null | null | null | dex/utils/ReturnCode.py | TomWeaver18/dexter | d89b66ca6a0d1ba29a4c32f152773a34ce2881e8 | [
"MIT"
] | null | null | null | dex/utils/ReturnCode.py | TomWeaver18/dexter | d89b66ca6a0d1ba29a4c32f152773a34ce2881e8 | [
"MIT"
] | null | null | null | from enum import Enum
class ReturnCode(Enum):
"""Used to indicate whole program success status."""
OK = 0
_ERROR = 1 # Unhandled exceptions result in exit(1) by default.
# Usage of _ERROR is discouraged:
# If the program cannot run, raise an exception.
... | 33.285714 | 73 | 0.579399 |
795ffe74b53b398b79e72e8726bc5465bbd80258 | 16,852 | py | Python | python/pyspark/pandas/tests/test_typedef.py | nolanliou/spark | 20750a3f9e13a2f02860859f87bbc38a18cba85e | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2021-06-29T01:32:35.000Z | 2021-08-19T15:20:26.000Z | python/pyspark/pandas/tests/test_typedef.py | nolanliou/spark | 20750a3f9e13a2f02860859f87bbc38a18cba85e | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 29 | 2021-06-02T09:17:28.000Z | 2022-03-14T01:35:18.000Z | python/pyspark/pandas/tests/test_typedef.py | nolanliou/spark | 20750a3f9e13a2f02860859f87bbc38a18cba85e | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2017-03-04T15:26:52.000Z | 2021-12-17T17:42:52.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 38.387244 | 100 | 0.618858 |
795ffed7d38279b528f1ffa5be5076c75de72029 | 222 | py | Python | pywmlg/preprocessing.py | warwick-machine-learning-group/pywmlg | 03fb908d1622cef556406f88e9d29f43f91c2e9e | [
"MIT"
] | 1 | 2021-11-10T11:55:44.000Z | 2021-11-10T11:55:44.000Z | pywmlg/preprocessing.py | warwick-machine-learning-group/pywmlg | 03fb908d1622cef556406f88e9d29f43f91c2e9e | [
"MIT"
] | 1 | 2021-10-21T16:21:35.000Z | 2021-10-21T16:21:35.000Z | pywmlg/preprocessing.py | warwick-machine-learning-group/pywmlg | 03fb908d1622cef556406f88e9d29f43f91c2e9e | [
"MIT"
] | null | null | null | """Functions for preprocessing datasets"""
import numpy as np
import numpy.typing as npt
def remove_rows_with_nans(data: npt.NDArray) -> npt.ArrayLike:
"""Remove NaNs"""
return data[~np.isnan(data).any(axis=1)]
| 22.2 | 62 | 0.716216 |
795ffeefa1794776087f6a17451be86a4f7c9661 | 14,724 | py | Python | pandas/core/indexes/numeric.py | BenRussert/pandas | 9179e633b1e54ac31c5ea42ec0ec24e9a1709aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2018-11-11T22:18:13.000Z | 2018-11-11T22:18:13.000Z | pandas/core/indexes/numeric.py | BenRussert/pandas | 9179e633b1e54ac31c5ea42ec0ec24e9a1709aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexes/numeric.py | BenRussert/pandas | 9179e633b1e54ac31c5ea42ec0ec24e9a1709aae | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import warnings
import numpy as np
from pandas._libs import index as libindex
from pandas.core.dtypes.common import (
is_dtype_equal,
pandas_dtype,
needs_i8_conversion,
is_integer_dtype,
is_float,
is_bool,
is_bool_dtype,
is_scalar)
from pandas.core.dtypes.missing import isna
from panda... | 32.503311 | 78 | 0.611043 |
7960009ab3bf773ab5eaacb7375f28e6be8eb1de | 889 | py | Python | Problems/aexp/linkedList/removeDuplicatesFromLinkedList.py | codyveladev/ds-alg-practice | f2456c64e838ba8e73286b3b1f60b4c450d52ecd | [
"MIT"
] | null | null | null | Problems/aexp/linkedList/removeDuplicatesFromLinkedList.py | codyveladev/ds-alg-practice | f2456c64e838ba8e73286b3b1f60b4c450d52ecd | [
"MIT"
] | null | null | null | Problems/aexp/linkedList/removeDuplicatesFromLinkedList.py | codyveladev/ds-alg-practice | f2456c64e838ba8e73286b3b1f60b4c450d52ecd | [
"MIT"
] | null | null | null | # This is an input class. Do not edit.
class LinkedList:
def __init__(self, value):
self.value = value
self.next = None
def removeDuplicatesFromLinkedList(linkedList):
# Write your code here.
# Have two pointers
# 1. Current Node
# 2. Next Node
# Check if the current node is equal to th... | 29.633333 | 61 | 0.709786 |
7960022a0ca17f3c877ee16f7c833f4cc4058d96 | 463 | py | Python | users/migrations/0006_auto_20210503_1115.py | leienshu/voip-check | bb71004495206ad4ca86f157c6e6c57c3ee232eb | [
"MIT"
] | null | null | null | users/migrations/0006_auto_20210503_1115.py | leienshu/voip-check | bb71004495206ad4ca86f157c6e6c57c3ee232eb | [
"MIT"
] | 1 | 2021-05-18T02:32:49.000Z | 2021-10-17T13:36:28.000Z | users/migrations/0006_auto_20210503_1115.py | leienshu/voip-check | bb71004495206ad4ca86f157c6e6c57c3ee232eb | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-05-03 03:15
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('users', '0005_whiteips'),
]
operations = [
migrations.RenameModel(
old_name='Whiteips',
new_name='Whiteip',
),
... | 20.130435 | 47 | 0.552916 |
79600340a3c062bc2714b855ce1e3e4bcb5d9719 | 3,264 | py | Python | monitoring/monitoring-client.py | CJHouser/piman | 019f4d4162fcd9087589b8ff2112a52e6f7ecb3d | [
"MIT"
] | 1 | 2020-01-18T09:10:11.000Z | 2020-01-18T09:10:11.000Z | monitoring/monitoring-client.py | CJHouser/piman | 019f4d4162fcd9087589b8ff2112a52e6f7ecb3d | [
"MIT"
] | null | null | null | monitoring/monitoring-client.py | CJHouser/piman | 019f4d4162fcd9087589b8ff2112a52e6f7ecb3d | [
"MIT"
] | null | null | null | """
This script runs on the manager pi
it will poll the slave pis via HTTP GET request to port 3000
"""
import json
import time
import requests
import configparser
from sys import argv
config = configparser.ConfigParser()
log_path = ""
def alert(data):
print_to_file(data)
url = config['DEFAULT']['slack']
... | 33.306122 | 142 | 0.589767 |
796003ebba37ccba0c868acb561ef9f28c5d37d7 | 48,528 | py | Python | lib/sqlalchemy/orm/loading.py | hugovk/sqlalchemy | bfd66239250190114560114ef2ed324d58abedf3 | [
"MIT"
] | null | null | null | lib/sqlalchemy/orm/loading.py | hugovk/sqlalchemy | bfd66239250190114560114ef2ed324d58abedf3 | [
"MIT"
] | null | null | null | lib/sqlalchemy/orm/loading.py | hugovk/sqlalchemy | bfd66239250190114560114ef2ed324d58abedf3 | [
"MIT"
] | null | null | null | # orm/loading.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""private module containing functions used to convert database
rows into object ins... | 33.467586 | 96 | 0.585435 |
7960045958a91d372655527afc5be74123c575fa | 8,507 | py | Python | work_configs/cell/cell_qi_50.py | CarnoZhao/mmdetection | b85eaffdf1af28eaffcc2263110a059237cf5b23 | [
"Apache-2.0"
] | 10 | 2021-12-31T02:30:30.000Z | 2022-03-16T03:13:26.000Z | work_configs/cell/cell_qi_50.py | CarnoZhao/mmdetection | b85eaffdf1af28eaffcc2263110a059237cf5b23 | [
"Apache-2.0"
] | null | null | null | work_configs/cell/cell_qi_50.py | CarnoZhao/mmdetection | b85eaffdf1af28eaffcc2263110a059237cf5b23 | [
"Apache-2.0"
] | 4 | 2022-01-02T02:14:53.000Z | 2022-01-14T13:24:06.000Z | num_classes = 3
num_stages = 6
num_proposals = 500
model = dict(
type='QueryInst',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style=... | 37.148472 | 113 | 0.558716 |
796005340d7b01f1f5f84b770f6b603bb602efe7 | 7,425 | py | Python | xblock/_version.py | edx-solutions/XBlock | 1d28ccb25f321fadb0c5b62ce8583e55efec96ab | [
"Apache-2.0"
] | 1 | 2015-04-27T07:44:33.000Z | 2015-04-27T07:44:33.000Z | xblock/_version.py | edx-solutions/XBlock | 1d28ccb25f321fadb0c5b62ce8583e55efec96ab | [
"Apache-2.0"
] | 5 | 2015-01-14T07:38:27.000Z | 2015-12-23T09:52:07.000Z | xblock/_version.py | edx-solutions/XBlock | 1d28ccb25f321fadb0c5b62ce8583e55efec96ab | [
"Apache-2.0"
] | null | null | null |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 40.353261 | 87 | 0.610236 |
79600682b30775e1cdb1ebc2b2aa0a30e8843f64 | 204 | py | Python | examples/minitwit/battle.py | txdywy/flask | 5cf167b448267aedec8f5b2e30ad4ee0ad9b3f55 | [
"BSD-3-Clause"
] | 2 | 2015-08-07T18:01:01.000Z | 2015-08-14T03:29:10.000Z | examples/minitwit/battle.py | txdywy/flask | 5cf167b448267aedec8f5b2e30ad4ee0ad9b3f55 | [
"BSD-3-Clause"
] | 2 | 2015-03-30T05:28:35.000Z | 2015-06-28T01:08:50.000Z | examples/minitwit/battle.py | txdywy/flask | 5cf167b448267aedec8f5b2e30ad4ee0ad9b3f55 | [
"BSD-3-Clause"
] | 2 | 2015-03-04T05:06:55.000Z | 2015-03-29T22:46:19.000Z | #!/usr/bin/env python
import smash as s
import cache as c
f = c.rcache.get('smash_collect')
if not f:
c.rcache.set('smash_collect', '1')
s.auto_battle()
if not f:
c.rcache.set('smash_collect','')
| 20.4 | 38 | 0.676471 |
7960069d23007aea302a5a9edac4d03e079d678e | 990 | py | Python | tacker/policies/__init__.py | h1r0mu/tacker | 8c69dda51fcfe215c4878a86b82018d2b96e5561 | [
"Apache-2.0"
] | 116 | 2015-10-18T02:57:08.000Z | 2022-03-15T04:09:18.000Z | tacker/policies/__init__.py | h1r0mu/tacker | 8c69dda51fcfe215c4878a86b82018d2b96e5561 | [
"Apache-2.0"
] | 6 | 2016-11-07T22:15:54.000Z | 2021-05-09T06:13:08.000Z | tacker/policies/__init__.py | h1r0mu/tacker | 8c69dda51fcfe215c4878a86b82018d2b96e5561 | [
"Apache-2.0"
] | 166 | 2015-10-20T15:31:52.000Z | 2021-11-12T08:39:49.000Z | # Copyright (C) 2019 NTT DATA
# 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 ... | 30.9375 | 78 | 0.724242 |
796006e2933ee65777d6a14accc3002e74360e60 | 640 | py | Python | 2015/s2.py | Luke-zhang-04/CCC-Junior-Problems | 9fc52296113b333b9b5151202ff67d484d5be6f0 | [
"0BSD"
] | null | null | null | 2015/s2.py | Luke-zhang-04/CCC-Junior-Problems | 9fc52296113b333b9b5151202ff67d484d5be6f0 | [
"0BSD"
] | null | null | null | 2015/s2.py | Luke-zhang-04/CCC-Junior-Problems | 9fc52296113b333b9b5151202ff67d484d5be6f0 | [
"0BSD"
] | null | null | null | #!/bin/python
from typing import Dict
sizeMap = {"L": 2, "M": 1, "S": 0}
jerseyCount = int(input())
athleteCount = int(input())
fulfilledCount = 0
jerseys: Dict[int, int] = {}
for number in range(1, jerseyCount + 1):
jerseys[number] = sizeMap[input()]
requests = list(
map(
lambda details: (sizeMa... | 17.297297 | 63 | 0.598438 |
7960070a801e60d9d85a31a370f5eaf65df52445 | 3,496 | py | Python | changedet/algos/catalog.py | ashnair1/changedet | 24afd3f94b722e11095cd3f2729a2aedf1104ab8 | [
"MIT"
] | null | null | null | changedet/algos/catalog.py | ashnair1/changedet | 24afd3f94b722e11095cd3f2729a2aedf1104ab8 | [
"MIT"
] | 3 | 2021-12-16T07:46:34.000Z | 2022-01-13T05:53:23.000Z | changedet/algos/catalog.py | ashnair1/changedet | 24afd3f94b722e11095cd3f2729a2aedf1104ab8 | [
"MIT"
] | null | null | null | from collections import UserDict
from typing import TYPE_CHECKING, Callable, List, Type
from changedet.algos.base import MetaAlgo
# Refer https://github.com/python/typing/issues/60
if TYPE_CHECKING:
_Base = UserDict[str, Type[MetaAlgo]]
else:
_Base = UserDict
class AlgoCatalog_(_Base):
"""
A global... | 27.3125 | 98 | 0.589531 |
796007a377d0c87c84d7de194842840aef7721b9 | 1,975 | py | Python | tests/spawn/utils_test.py | drienyov/treadmill | ce21537cd9a2fdb0567ac2aa3de1afcb2f6861de | [
"Apache-2.0"
] | 2 | 2017-10-31T18:48:20.000Z | 2018-03-04T20:35:20.000Z | tests/spawn/utils_test.py | bretttegart/treadmill | 812109e31c503a6eddaee2d3f2e1faf2833b6aaf | [
"Apache-2.0"
] | null | null | null | tests/spawn/utils_test.py | bretttegart/treadmill | 812109e31c503a6eddaee2d3f2e1faf2833b6aaf | [
"Apache-2.0"
] | null | null | null | """Unit test for treadmill.spawn.utils.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
# Disable W0611: Unused import
import tests.treadmill_test_skip_windows # pylint: disable=W0611
from tread... | 39.5 | 78 | 0.70481 |
796007a3f300064a8f9986313c45de839b5cb7dc | 6,546 | py | Python | mapproxy/test/system/test_util_export.py | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 347 | 2015-01-19T15:47:08.000Z | 2022-03-23T20:33:17.000Z | mapproxy/test/system/test_util_export.py | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 374 | 2015-01-05T07:54:31.000Z | 2022-03-24T08:23:10.000Z | mapproxy/test/system/test_util_export.py | cunha17/mapproxy | 31f646bbd0465f566c2ac2ea39f8e794bea78dfc | [
"ECL-2.0",
"Apache-2.0"
] | 188 | 2015-01-07T00:59:28.000Z | 2022-03-15T09:05:57.000Z | # This file is part of the MapProxy project.
# Copyright (C) 2012 Omniscale <http://omniscale.de>
#
# 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... | 31.023697 | 82 | 0.500458 |
79600806e15bf272a9ff90c5998b60c8c80104db | 966 | py | Python | src/apps/management/admin.py | GoddessEyes/info_tbot | c7c5c818dc0c0c72aa15e6e4a85e7e28b4a7660d | [
"MIT"
] | null | null | null | src/apps/management/admin.py | GoddessEyes/info_tbot | c7c5c818dc0c0c72aa15e6e4a85e7e28b4a7660d | [
"MIT"
] | 4 | 2021-03-19T02:42:10.000Z | 2021-09-22T19:08:09.000Z | src/apps/management/admin.py | GoddessEyes/info_tbot | c7c5c818dc0c0c72aa15e6e4a85e7e28b4a7660d | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import gettext_lazy as _
from apps.management.models import CustomUser
@admin.register(CustomUser)
class CustomUserAdmin(UserAdmin):
fieldsets = (
(None, {'fields': ('username', 'password')}),
... | 30.1875 | 94 | 0.594203 |
796008a67825f674331bb77d31a4afe53007a8fd | 2,869 | py | Python | sql generator - count duplicate fields across rows in same table.py | MrSimonC/SQL-Generator | 5c61d44366a88bda69cdc71f80a2e274d4849565 | [
"MIT"
] | null | null | null | sql generator - count duplicate fields across rows in same table.py | MrSimonC/SQL-Generator | 5c61d44366a88bda69cdc71f80a2e274d4849565 | [
"MIT"
] | null | null | null | sql generator - count duplicate fields across rows in same table.py | MrSimonC/SQL-Generator | 5c61d44366a88bda69cdc71f80a2e274d4849565 | [
"MIT"
] | null | null | null | import itertools
def main():
"""Generates SQL for comparing rows in a table. Takes a list of fields to compare,
generates all combinations of those fields, compares each combination and counts amount"""
sql = '''DECLARE @resultants TABLE
(
[Duplicate Count] NVARCHAR(64)
, [Matched on] ... | 58.55102 | 330 | 0.607877 |
796009711b906904d4badeaec833d86c6f13137a | 5,191 | py | Python | models/resnet_models.py | elmirador/LearningBasedSamplingMatting | b846eda767e7cbb5f157ca79da43fe89db62e99d | [
"MIT"
] | 21 | 2019-10-28T03:24:59.000Z | 2021-03-12T02:09:06.000Z | models/resnet_models.py | TomoshibiAkira/LearningBasedSamplingMatting | b846eda767e7cbb5f157ca79da43fe89db62e99d | [
"MIT"
] | 5 | 2019-10-28T06:22:39.000Z | 2020-11-29T04:57:16.000Z | models/resnet_models.py | elmirador/LearningBasedSamplingMatting | b846eda767e7cbb5f157ca79da43fe89db62e99d | [
"MIT"
] | 6 | 2019-10-31T08:55:45.000Z | 2020-11-03T13:39:56.000Z | import torch.nn as nn
import torch
import torch.nn.functional as F
from .aspp import ASPP
affine_par = True
def conv3x3(in_planes, out_planes, stride=1):
"3x3 convolution with padding"
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)
class BasicBlock(nn.Module):
... | 34.838926 | 119 | 0.607205 |
7960098285b2237278ec4be0aa03dd2c28ed5494 | 893 | py | Python | test/test_excluded_scan_targets.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 61 | 2018-05-17T05:57:09.000Z | 2022-03-08T13:59:21.000Z | test/test_excluded_scan_targets.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 33 | 2018-06-26T16:21:14.000Z | 2022-03-03T20:55:47.000Z | test/test_excluded_scan_targets.py | kiblik/vm-console-client-python | 038f6d33e8b2654a558326c6eb87f09ee23e0e22 | [
"MIT"
] | 43 | 2018-02-24T05:45:53.000Z | 2022-03-31T22:15:16.000Z | # coding: utf-8
"""
Python InsightVM API Client
OpenAPI spec version: 3
Contact: support@rapid7.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import swagger_client
from swagger_client.models.excluded_scan_targets imp... | 22.897436 | 97 | 0.723404 |
7960098daaaab650794b3d9d4a9556769713afce | 6,690 | py | Python | conanfile_base.py | bincrafters/conan-gcc | ee2ca2b706a0b8f44e8f7ace334797c0fd0a4364 | [
"MIT"
] | 1 | 2020-09-21T12:23:38.000Z | 2020-09-21T12:23:38.000Z | conanfile_base.py | bincrafters/conan-gcc | ee2ca2b706a0b8f44e8f7ace334797c0fd0a4364 | [
"MIT"
] | null | null | null | conanfile_base.py | bincrafters/conan-gcc | ee2ca2b706a0b8f44e8f7ace334797c0fd0a4364 | [
"MIT"
] | 2 | 2020-09-21T11:07:22.000Z | 2021-09-04T23:14:10.000Z | # -*- coding: utf-8 -*-
from conans import ConanFile, AutoToolsBuildEnvironment, tools
from conans.errors import ConanException
import os
import shutil
import glob
class ConanFileBase(ConanFile):
version = "9.1.0"
description = "The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran... | 51.860465 | 120 | 0.593423 |
796009d3eeb91bc413967c1c83b6723fd10d846f | 677 | py | Python | lab3.py | isabellecalhoun/IA241-Lab-1 | 761cb59797b99250cf94ecb856e72baf9da8752b | [
"MIT"
] | null | null | null | lab3.py | isabellecalhoun/IA241-Lab-1 | 761cb59797b99250cf94ecb856e72baf9da8752b | [
"MIT"
] | null | null | null | lab3.py | isabellecalhoun/IA241-Lab-1 | 761cb59797b99250cf94ecb856e72baf9da8752b | [
"MIT"
] | null | null | null | '''
lab 3 list and set
'''
#3.1
str_list = ['a','d','e','b','c']
print(str_list)
str_list.sort()
print(str_list)
#3.2
str_list.append('f')
print(str_list)
#3.3
str_list.remove('d')
print(str_list)
#3.4
print(str_list[2])
#3.5
my_list = ['a','123', 123, 'b', 'B', 'False', False, 123, None, 'None']
print(len(set(... | 12.089286 | 71 | 0.545052 |
79600ac8e599adf100f91facdcea84a352f3d960 | 24,545 | py | Python | tests/plotting/test_plot_manager.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 10 | 2021-10-02T18:33:56.000Z | 2021-11-14T17:10:48.000Z | tests/plotting/test_plot_manager.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 14 | 2021-10-07T22:10:15.000Z | 2021-12-21T09:13:49.000Z | tests/plotting/test_plot_manager.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 6 | 2021-10-29T19:36:59.000Z | 2021-12-19T19:52:57.000Z | import logging
import time
from os import unlink
from pathlib import Path
from shutil import copy, move
from typing import Callable, Iterator, List, Optional
import pytest
from blspy import G1Element
from dataclasses import dataclass
from stai.plotting.util import (
PlotInfo,
PlotRefreshResult,
PlotRefresh... | 43.752228 | 120 | 0.714443 |
79600b426885afe2fff926530af95ddceb18a941 | 89,000 | py | Python | test_autogalaxy/plane/test_plane.py | Jammy2211/PyAutoGalaxy | d64f4fd56d3b7cd10b6fd6219015047465ab1dfa | [
"MIT"
] | 7 | 2021-05-29T08:46:29.000Z | 2022-01-23T14:06:20.000Z | test_autogalaxy/plane/test_plane.py | Jammy2211/PyAutoGalaxy | d64f4fd56d3b7cd10b6fd6219015047465ab1dfa | [
"MIT"
] | 3 | 2021-01-06T09:42:44.000Z | 2022-03-10T15:52:23.000Z | test_autogalaxy/plane/test_plane.py | Jammy2211/PyAutoGalaxy | d64f4fd56d3b7cd10b6fd6219015047465ab1dfa | [
"MIT"
] | 3 | 2021-02-10T07:45:16.000Z | 2022-01-21T17:36:40.000Z | import numpy as np
import pytest
from skimage import measure
import autogalaxy as ag
from autoarray.inversion.pixelizations.abstract import AbstractPixelization
from autoarray.inversion.regularization.abstract import AbstractRegularization
from autoarray.mock.mock import MockPixelization, MockRegularization... | 37.775891 | 121 | 0.584449 |
79600b680b3eb78363ffbc704d6d3cb303223744 | 89,992 | py | Python | dbReports/iondb/rundb/migrations/0104_auto__del_field_tfmetrics_matchMismatchHisto__del_field_tfmetrics_aveQ.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 125 | 2015-01-22T05:43:23.000Z | 2022-03-22T17:15:59.000Z | dbReports/iondb/rundb/migrations/0104_auto__del_field_tfmetrics_matchMismatchHisto__del_field_tfmetrics_aveQ.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 59 | 2015-02-10T09:13:06.000Z | 2021-11-11T02:32:38.000Z | dbReports/iondb/rundb/migrations/0104_auto__del_field_tfmetrics_matchMismatchHisto__del_field_tfmetrics_aveQ.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 98 | 2015-01-17T01:25:10.000Z | 2022-03-18T17:29:42.000Z | # Copyright (C) 2012 Ion Torrent Systems, Inc. All Rights Reserved
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'TFMetrics.matchMismatchHisto'
... | 80.710314 | 198 | 0.56994 |
79600b6a2f30a1eecfa6099bc1663c5c19b8c56a | 315 | py | Python | transcriptor/markers.py | kjaymiller/transcriptor | fc2a4cbf82dce4bb79f828f8f2ed3599861971ee | [
"MIT"
] | 13 | 2019-02-28T00:36:38.000Z | 2020-12-13T02:40:54.000Z | transcriptor/markers.py | kjaymiller/transcriptor | fc2a4cbf82dce4bb79f828f8f2ed3599861971ee | [
"MIT"
] | 10 | 2020-08-04T03:23:27.000Z | 2020-10-09T18:10:25.000Z | transcriptor/markers.py | kjaymiller/transcriptor | fc2a4cbf82dce4bb79f828f8f2ed3599861971ee | [
"MIT"
] | 2 | 2020-05-09T04:56:50.000Z | 2020-09-18T22:16:50.000Z | from transcriptor.speakers import Speaker
from dataclasses import dataclass
import typing
@dataclass
class Marker:
"""Content should only exist when there are no segments"""
speaker: typing.Optional[Speaker]= None
start_time: float=0.0
end_time: float=0.0
content: typing.Optional[str] = None
| 24.230769 | 62 | 0.746032 |
79600fdddc2d1b623a79a44916a72c805ff3ae88 | 247 | py | Python | Others/acl/abl/b/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | Others/acl/abl/b/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | Others/acl/abl/b/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
import sys
input = sys.stdin.readline
a, b, c, d = map(int, input().split())
if (d < a) or (c > b):
print('No')
else:
print('Yes')
if __name__ == '__main__':
main()
| 13.722222 | 42 | 0.469636 |
79601019e850485b7cdafd514a1d20ef3d617717 | 5,763 | py | Python | test/base/test_concurrency_py3k.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | test/base/test_concurrency_py3k.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | test/base/test_concurrency_py3k.py | petit87/sqlalchemy | 67d674bd63ca36ac32b23f96e2b19e9dac6b0863 | [
"MIT"
] | null | null | null | import asyncio
import threading
from sqlalchemy import exc
from sqlalchemy.testing import async_test
from sqlalchemy.testing import eq_
from sqlalchemy.testing import expect_raises
from sqlalchemy.testing import expect_raises_message
from sqlalchemy.testing import fixtures
from sqlalchemy.testing import is_true
from s... | 24.316456 | 79 | 0.584765 |
796010b35d8729ce0cd978c8cfa39f0b519ab114 | 10,177 | py | Python | cirq-google/cirq_google/engine/virtual_engine_factory.py | Hosseinberg/Cirq | 8b64834ba601e8b48394753c24800e16b36a59b1 | [
"Apache-2.0"
] | 1 | 2022-02-02T07:13:54.000Z | 2022-02-02T07:13:54.000Z | cirq-google/cirq_google/engine/virtual_engine_factory.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | null | null | null | cirq-google/cirq_google/engine/virtual_engine_factory.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 44.441048 | 98 | 0.742065 |
7960122f03387c317125235c55ab3ce55e889b93 | 3,027 | py | Python | hypha/public/mailchimp/views.py | maxpearl/hypha | e181ebadfb744aab34617bb766e746368d6f2de0 | [
"BSD-3-Clause"
] | 20 | 2021-04-08T16:38:49.000Z | 2022-02-09T20:05:57.000Z | hypha/public/mailchimp/views.py | maxpearl/hypha | e181ebadfb744aab34617bb766e746368d6f2de0 | [
"BSD-3-Clause"
] | 1,098 | 2017-12-15T11:23:03.000Z | 2020-01-24T07:58:07.000Z | hypha/public/mailchimp/views.py | maxpearl/hypha | e181ebadfb744aab34617bb766e746368d6f2de0 | [
"BSD-3-Clause"
] | 17 | 2020-02-07T14:55:54.000Z | 2021-04-04T19:32:38.000Z | import logging
import uuid
from django.conf import settings
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
from django.views.decorators.csrf import csrf_exempt
from django.views.gene... | 33.633333 | 114 | 0.635282 |
7960126c80570b9a8d7cbc9871bbb5cfdf68f5b9 | 12,525 | py | Python | scvi/data/anndata/_manager.py | Semih-Kurt/scvi-tools | 1bea2af8cc99e11d55a6925f09d978de5f6994fb | [
"BSD-3-Clause"
] | null | null | null | scvi/data/anndata/_manager.py | Semih-Kurt/scvi-tools | 1bea2af8cc99e11d55a6925f09d978de5f6994fb | [
"BSD-3-Clause"
] | null | null | null | scvi/data/anndata/_manager.py | Semih-Kurt/scvi-tools | 1bea2af8cc99e11d55a6925f09d978de5f6994fb | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
import sys
from collections import defaultdict
from typing import Optional, Sequence, Type
import numpy as np
import rich
from anndata import AnnData
import scvi
from scvi.utils import attrdict
from . import _constants
from ._utils import _assign_adata_uuid, get_anndata_attribute
... | 36.730205 | 131 | 0.631537 |
7960154d8f2711e0dbea0adcc2f72eca4448502f | 36,774 | py | Python | bigml/tests/test_36_compare_predictions.py | jaor/python | 35f69d2f3121f1b3dde43495cf145d4992796ad5 | [
"Apache-2.0"
] | 137 | 2015-01-12T06:04:10.000Z | 2022-03-06T21:00:04.000Z | bigml/tests/test_36_compare_predictions.py | jaor/python | 35f69d2f3121f1b3dde43495cf145d4992796ad5 | [
"Apache-2.0"
] | 78 | 2015-01-13T18:28:51.000Z | 2022-03-04T19:18:28.000Z | bigml/tests/test_36_compare_predictions.py | jaor/python | 35f69d2f3121f1b3dde43495cf145d4992796ad5 | [
"Apache-2.0"
] | 144 | 2015-01-16T06:13:33.000Z | 2022-03-29T17:53:16.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2017-2021 BigML
#
# 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 ... | 56.488479 | 198 | 0.590336 |
7960157d581189a5fb85ccff00ca0800a62bf497 | 670 | py | Python | py/py_0266_pseudo_square_root.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0266_pseudo_square_root.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0266_pseudo_square_root.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | # Solution of;
# Project Euler Problem 266: Pseudo Square Root
# https://projecteuler.net/problem=266
#
# The divisors of 12 are: 1,2,3,4,6 and 12. The largest divisor of 12 that
# does not exceed the square root of 12 is 3. We shall call the largest
# divisor of an integer n that does not exceed the square root of ... | 27.916667 | 79 | 0.691045 |
796015cb39090639f6ab725c0ba317b986e7fd00 | 3,223 | py | Python | mulearn/distributions.py | vishalbelsare/mulearn | 9a794abe8788b17993cfd58a17ca44f5de6984cf | [
"Apache-2.0"
] | 2 | 2021-07-23T09:43:33.000Z | 2021-08-23T20:46:00.000Z | mulearn/distributions.py | vishalbelsare/mulearn | 9a794abe8788b17993cfd58a17ca44f5de6984cf | [
"Apache-2.0"
] | null | null | null | mulearn/distributions.py | vishalbelsare/mulearn | 9a794abe8788b17993cfd58a17ca44f5de6984cf | [
"Apache-2.0"
] | 2 | 2020-05-01T07:42:41.000Z | 2021-08-23T20:46:02.000Z |
"""Mulearn distributions.
This module implements the kernel and fuzzifier distributions used in
randomized model selection.
"""
from scipy.stats import uniform
from scipy.stats import rv_continuous
from mulearn.kernel import GaussianKernel
from mulearn.fuzzifier import ExponentialFuzzifier
class GaussianKernelDis... | 41.320513 | 80 | 0.660565 |
7960160ab5c76f36608909c95283dbfe14fd8a29 | 204 | py | Python | main.py | PrimWILL/Stop_Cheating | 47e97ca63ba74cc8d007c0147a7ed6f11a7380f4 | [
"BSD-2-Clause"
] | null | null | null | main.py | PrimWILL/Stop_Cheating | 47e97ca63ba74cc8d007c0147a7ed6f11a7380f4 | [
"BSD-2-Clause"
] | null | null | null | main.py | PrimWILL/Stop_Cheating | 47e97ca63ba74cc8d007c0147a7ed6f11a7380f4 | [
"BSD-2-Clause"
] | 3 | 2021-05-20T16:06:26.000Z | 2021-06-08T06:46:41.000Z | from UIhandler import UIHandler
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
app = QtWidgets.QApplication(sys.argv)
uihandler = UIHandler()
uihandler.show_login_page()
sys.exit(app.exec_())
| 15.692308 | 42 | 0.784314 |
7960160c4e89f225e187a6790c25acc0203fd116 | 5,041 | py | Python | data_prep/Datasets/address_cleaner.py | LukaszMalucha/Ireland-Geocoder | 6b8a2b1ffb13f36cfc213281eb9b318b0bce00b3 | [
"MIT"
] | 2 | 2019-04-02T19:48:01.000Z | 2020-02-20T22:04:26.000Z | data_prep/Datasets/address_cleaner.py | LukaszMalucha/Ireland-Geocoder | 6b8a2b1ffb13f36cfc213281eb9b318b0bce00b3 | [
"MIT"
] | 3 | 2019-11-01T07:42:10.000Z | 2021-06-02T00:34:22.000Z | data_prep/Datasets/address_cleaner.py | LukaszMalucha/Ireland-Geocoder | 6b8a2b1ffb13f36cfc213281eb9b318b0bce00b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
#### Uploading dataset
dataset = pd.read_csv("addresses_for_task.csv")
### Separating parts of the address going backwards
######################################################################## COUNTY ################################################
## Desired coun... | 37.340741 | 128 | 0.626066 |
79601625d9f440e2f91b687b95ce530a38bcd384 | 24,328 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_receipt_async.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
from io import BytesIO
from datetime import date, time
from azure.core.exceptions import ServiceRequestError, ClientAuthenticationError, Ht... | 55.798165 | 154 | 0.727269 |
79601691c483d8289f6384e8079f8f38549bc4a0 | 882 | py | Python | axonius_api_client/cli/grp_system/grp_users/cmd_get_by_name.py | geransmith/axonius_api_client | 09fd564d62f0ddf7aa44db14a509eaafaf0c930f | [
"MIT"
] | null | null | null | axonius_api_client/cli/grp_system/grp_users/cmd_get_by_name.py | geransmith/axonius_api_client | 09fd564d62f0ddf7aa44db14a509eaafaf0c930f | [
"MIT"
] | 3 | 2021-05-18T14:28:30.000Z | 2021-09-06T20:01:56.000Z | axonius_api_client/cli/grp_system/grp_users/cmd_get_by_name.py | geransmith/axonius_api_client | 09fd564d62f0ddf7aa44db14a509eaafaf0c930f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Command line interface for Axonius API Client."""
from ...context import CONTEXT_SETTINGS, click
from ...options import AUTH, add_options
from .grp_common import EXPORT, handle_export
USER_NAME = click.option(
"--name",
"-n",
"name",
help="Name of user to get",
default=No... | 23.837838 | 69 | 0.679138 |
79601730058127fb03a86a44e32db4b723f377c9 | 1,224 | py | Python | storefront/product/migrations/0002_product.py | alvariux23/digitalstorefront | 0572dd83514b4c5c53091f99d6fc977ff03dda7d | [
"MIT"
] | null | null | null | storefront/product/migrations/0002_product.py | alvariux23/digitalstorefront | 0572dd83514b4c5c53091f99d6fc977ff03dda7d | [
"MIT"
] | null | null | null | storefront/product/migrations/0002_product.py | alvariux23/digitalstorefront | 0572dd83514b4c5c53091f99d6fc977ff03dda7d | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-09-22 23:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('product', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Product',
... | 38.25 | 141 | 0.580882 |
7960178e23d65a17eea019408ef9b7bee06b8f32 | 16,477 | py | Python | tests/fields/test_geo_fields.py | shellcodesniper/mongoengine | d76cb345be98045cde0fa078569cc8021c0d0162 | [
"MIT"
] | 3 | 2019-06-18T07:54:38.000Z | 2022-01-22T23:27:41.000Z | tests/fields/test_geo_fields.py | shellcodesniper/mongoengine | d76cb345be98045cde0fa078569cc8021c0d0162 | [
"MIT"
] | 1 | 2022-01-22T23:27:23.000Z | 2022-01-22T23:27:23.000Z | tests/fields/test_geo_fields.py | shellcodesniper/mongoengine | d76cb345be98045cde0fa078569cc8021c0d0162 | [
"MIT"
] | null | null | null | import unittest
from mongoengine import *
from tests.utils import MongoDBTestCase
class TestGeoField(MongoDBTestCase):
def _test_for_expected_error(self, Cls, loc, expected):
try:
Cls(loc=loc).validate()
self.fail("Should not validate the location {0}".format(loc))
except ... | 39.513189 | 152 | 0.60636 |
796017c1c13691344ad19a9e7315448076d29f93 | 11,335 | py | Python | titus/test/prettypfa/testClustering.py | jmilleralpine/hadrian | 6a438e0370487bbbac5e64a4d6d7a2728902d153 | [
"Apache-2.0"
] | 127 | 2015-08-05T17:08:35.000Z | 2019-10-17T07:07:08.000Z | titus/test/prettypfa/testClustering.py | jmilleralpine/hadrian | 6a438e0370487bbbac5e64a4d6d7a2728902d153 | [
"Apache-2.0"
] | 54 | 2015-11-20T02:21:29.000Z | 2019-11-23T20:17:23.000Z | titus/test/prettypfa/testClustering.py | jmilleralpine/hadrian | 6a438e0370487bbbac5e64a4d6d7a2728902d153 | [
"Apache-2.0"
] | 58 | 2015-05-27T18:19:29.000Z | 2019-05-23T12:37:17.000Z | #!/usr/bin/env python
# Copyright (C) 2014 Open Data ("Open Data" refers to
# one or more of the following companies: Open Data Partners LLC,
# Open Data Research LLC, or Open Data Capital LLC.)
#
# This file is part of Hadrian.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this... | 44.105058 | 117 | 0.605558 |
7960180d6080daf3b45507bec9e04de8743ac08b | 1,922 | py | Python | examples/pagination_sqlalchemy.py | liu-junyong/fastapi-pagination | ea56d891478ccdd22fd7b9ebb118504bf1002d1b | [
"MIT"
] | 315 | 2020-11-12T08:41:50.000Z | 2022-03-31T23:23:27.000Z | examples/pagination_sqlalchemy.py | liu-junyong/fastapi-pagination | ea56d891478ccdd22fd7b9ebb118504bf1002d1b | [
"MIT"
] | 280 | 2020-11-28T11:17:06.000Z | 2022-03-28T03:21:27.000Z | examples/pagination_sqlalchemy.py | liu-junyong/fastapi-pagination | ea56d891478ccdd22fd7b9ebb118504bf1002d1b | [
"MIT"
] | 50 | 2020-12-07T16:21:24.000Z | 2022-03-22T09:04:13.000Z | from typing import Any, Iterator
import uvicorn
from faker import Faker
from fastapi import Depends, FastAPI
from pydantic import BaseModel
from sqlalchemy import Column, Integer, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, sessionmaker
from fastap... | 22.348837 | 87 | 0.722164 |
79601891efbec2dfa6e78442bae8aadb45941a7e | 1,509 | py | Python | OOP/Encapsulation_exercise/pizza maker/project/pizza.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | 2 | 2022-03-05T13:17:12.000Z | 2022-03-05T13:17:16.000Z | OOP/Encapsulation_exercise/pizza maker/project/pizza.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | null | null | null | OOP/Encapsulation_exercise/pizza maker/project/pizza.py | petel3/Softuni_education | 4fd80f8c6ce6c3d6a838edecdb091dda2ed1084c | [
"MIT"
] | null | null | null | from project.topping import Topping
class Pizza:
def __init__(self, name, dough, toppings_capacity):
self.name = name
self.dough = dough
self.toppings_capacity = toppings_capacity
self.toppings={}
@property
def name(self):
return self.__name
@name.setter
d... | 29.588235 | 86 | 0.646123 |
796018ed1bcd583c4f482f9e7460647c0cd81b4c | 2,941 | py | Python | Filters/Points/Testing/Python/TestPointInterpolator2D2.py | bin1316/vtk | a873daced2763e7f16619ece18d2251a4fc8290f | [
"BSD-3-Clause"
] | null | null | null | Filters/Points/Testing/Python/TestPointInterpolator2D2.py | bin1316/vtk | a873daced2763e7f16619ece18d2251a4fc8290f | [
"BSD-3-Clause"
] | null | null | null | Filters/Points/Testing/Python/TestPointInterpolator2D2.py | bin1316/vtk | a873daced2763e7f16619ece18d2251a4fc8290f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Parameters for debugging
res = 200
math = vtk.vtkMath()
# create pipeline: use terrain dataset. Just for kicks we'll treat the elevations
# as a "point cloud" and interpolate the e... | 26.258929 | 81 | 0.767766 |
79601ac8e3fab05af847ec861ed424649aec752c | 1,367 | py | Python | ws/search/tests/test_impute_values.py | elmaestro08/mydig-webservice | 6bf3c8e90b5bf8dde05c5dcd0e17cf4dd5af5f90 | [
"MIT"
] | 2 | 2018-12-19T16:41:50.000Z | 2021-11-11T20:52:25.000Z | ws/search/tests/test_impute_values.py | research-software-company/mydig-webservice | 9628f72fed9f33d0fe341c3d8c3324cb198aae74 | [
"MIT"
] | 55 | 2017-06-09T15:53:56.000Z | 2018-04-16T23:53:30.000Z | ws/search/tests/test_impute_values.py | research-software-company/mydig-webservice | 9628f72fed9f33d0fe341c3d8c3324cb198aae74 | [
"MIT"
] | 12 | 2017-08-06T19:49:44.000Z | 2020-02-16T07:12:09.000Z | import unittest
import sys
import json
sys.path.append('../')
from response_converter import TimeSeries
class TestImputeTSValues(unittest.TestCase):
def setUp(self):
str_ts1 = """[["2012-08-01T00:00:00.000Z",1,null],["2012-09-01T00:00:00.000Z",1,416.1],
["2012-10-01T00:00:00.000Z",1,426.4],["201... | 42.71875 | 117 | 0.623263 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.