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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c61623b37bddc297ff4efcaa0c5fed293a59e6f0 | 12,000 | py | Python | model/tests.py | nosnhojn/poser | 9585459377392b2662dcc63174d465ba5a7581f4 | [
"BSD-3-Clause"
] | 1 | 2016-05-11T18:37:56.000Z | 2016-05-11T18:37:56.000Z | model/tests.py | nosnhojn/poser | 9585459377392b2662dcc63174d465ba5a7581f4 | [
"BSD-3-Clause"
] | null | null | null | model/tests.py | nosnhojn/poser | 9585459377392b2662dcc63174d465ba5a7581f4 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from model import Cell, Module, OutputType, CellType, Mux
import random
class CellTests (unittest.TestCase):
def setUp(self):
self.c = Cell()
def tearDown(self):
pass
def testAsyncOutputFalseWhenBothInputsFalse(self):
self.c.driveInputs([False, False])
self.assertFalse(self.c.... | 28.985507 | 91 | 0.694833 | 11,848 | 0.987333 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.000833 |
c6170afc30e453f2a312a63f60a55b9794498ce1 | 4,197 | py | Python | tests/components/smarttub/test_config_flow.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/smarttub/test_config_flow.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/smarttub/test_config_flow.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Test the smarttub config flow."""
from unittest.mock import patch
from smarttub import LoginFailed
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.smarttub.const import DOMAIN
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from tests.common import MockConfigEntry... | 33.309524 | 111 | 0.672147 | 0 | 0 | 0 | 0 | 0 | 0 | 3,864 | 0.920658 | 985 | 0.234691 |
c617ffba3ed7d86f83e8204d0efd8b5ec19f40d4 | 476 | py | Python | ex4.py | JasperStfun/OOP | fb6c084979c2550a01b8dd07a24c244d31f943a0 | [
"Apache-2.0"
] | null | null | null | ex4.py | JasperStfun/OOP | fb6c084979c2550a01b8dd07a24c244d31f943a0 | [
"Apache-2.0"
] | null | null | null | ex4.py | JasperStfun/OOP | fb6c084979c2550a01b8dd07a24c244d31f943a0 | [
"Apache-2.0"
] | null | null | null | class DefenerVector:
def __init__(self, v):
self.__v = v
def __enter__(self):
self.__temp = self.__v[:]
return self.__temp
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type is None:
self.__v[:] = self.__temp
return False
v1 = [1, 2, 3]
... | 21.636364 | 50 | 0.544118 | 303 | 0.636555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c61aff15e6261423fb5fd8677c7a2c1c475568d6 | 785 | py | Python | src/features/migrations/0025_enable_all_remote_config_feature_states.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | 1,259 | 2021-06-10T11:24:09.000Z | 2022-03-31T10:30:44.000Z | src/features/migrations/0025_enable_all_remote_config_feature_states.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | 392 | 2021-06-10T11:12:29.000Z | 2022-03-31T10:13:53.000Z | src/features/migrations/0025_enable_all_remote_config_feature_states.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | 58 | 2021-06-11T03:18:07.000Z | 2022-03-31T14:39:10.000Z | # Generated by Django 2.2.17 on 2021-01-10 12:35
from django.db import migrations
def enable_all_remote_config_feature_states(apps, schema_editor):
FeatureState = apps.get_model('features', 'FeatureState')
# update all existing remote config feature states to maintain current
# functionality when hiding... | 26.166667 | 76 | 0.723567 | 255 | 0.324841 | 0 | 0 | 0 | 0 | 0 | 0 | 291 | 0.370701 |
c61b4b710f700b7e7d84698ef9c73f9fe55fc76c | 1,488 | py | Python | tamcolors/tests/utils_tests/identifier_tests.py | cmcmarrow/tamcolors | 65a5f2455bbe35a739b98d14af158c3df7feb786 | [
"Apache-2.0"
] | 29 | 2020-07-17T23:46:17.000Z | 2022-02-06T05:36:44.000Z | tamcolors/tests/utils_tests/identifier_tests.py | sudo-nikhil/tamcolors | 65a5f2455bbe35a739b98d14af158c3df7feb786 | [
"Apache-2.0"
] | 42 | 2020-07-25T19:39:52.000Z | 2021-02-24T01:19:58.000Z | tamcolors/tests/utils_tests/identifier_tests.py | sudo-nikhil/tamcolors | 65a5f2455bbe35a739b98d14af158c3df7feb786 | [
"Apache-2.0"
] | 8 | 2020-07-18T23:02:48.000Z | 2020-12-30T04:07:35.000Z | # built in libraries
import unittest.mock
from tempfile import TemporaryDirectory
from os.path import join
# tamcolors libraries
from tamcolors.utils import identifier
class IdentifierTests(unittest.TestCase):
def test_globals(self):
self.assertIsInstance(identifier.IDENTIFIER_FILE_NAME, str)
se... | 41.333333 | 114 | 0.716398 | 1,315 | 0.883737 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.040323 |
c61b82fdb5df4f14bd3407dbc13cb9a344c9c650 | 2,847 | py | Python | source.py | FahimFBA/Invisible-Cloak-Using-Python | 4ed662f8ec6ab7bd90c5cf337d10ff8d2496843b | [
"MIT"
] | 2 | 2021-03-29T07:29:39.000Z | 2021-12-11T18:05:45.000Z | source.py | FahimFBA/Invisible-Cloak-Using-Python | 4ed662f8ec6ab7bd90c5cf337d10ff8d2496843b | [
"MIT"
] | 1 | 2021-12-12T06:37:32.000Z | 2021-12-12T16:36:19.000Z | source.py | FahimFBA/Invisible-Cloak-Using-Python | 4ed662f8ec6ab7bd90c5cf337d10ff8d2496843b | [
"MIT"
] | 2 | 2021-02-14T15:11:52.000Z | 2021-07-08T20:22:58.000Z | # start importing some modules
# importing OpenCV
import cv2
# using this module , we can process images and videos to identify objects, faces, or even handwriting of a human.
# importing NumPy
import numpy as np
# NumPy is usually imported under the np alias. NumPy is a Python library used for working with arrays. I... | 38.472973 | 250 | 0.724974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,895 | 0.665613 |
c61d0aed14163a5df84fbf6f3f9906dee796c9d6 | 207 | py | Python | keyvalues/__init__.py | JulioC/keyvalues-python | 45bd5aa8fff36372099d8fe855406a649294736f | [
"MIT"
] | 6 | 2016-04-19T22:54:20.000Z | 2021-01-12T04:49:30.000Z | keyvalues/__init__.py | JulioC/keyvalues-python | 45bd5aa8fff36372099d8fe855406a649294736f | [
"MIT"
] | 1 | 2017-06-23T03:47:02.000Z | 2017-09-27T01:25:43.000Z | keyvalues/__init__.py | JulioC/keyvalues-python | 45bd5aa8fff36372099d8fe855406a649294736f | [
"MIT"
] | 2 | 2016-02-01T00:16:39.000Z | 2017-06-23T02:35:09.000Z | __version_info__ = ('0', '1', '1')
__version__ = '.'.join(__version_info__)
from keyvalues.keyvalues import KeyValues
def load_keyvalues(filename):
kv = KeyValues()
kv.load(filename)
return kv
| 20.7 | 41 | 0.700483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.057971 |
c61dc702b237c15662d2418ed34215b2b2a25a9f | 1,999 | py | Python | rolling/apply.py | andrewcfreeman/rolling | 7cff8e45bbebaf64a5da1ad6e7d1a7619eebca17 | [
"MIT"
] | 189 | 2018-03-12T00:31:19.000Z | 2022-03-26T00:17:38.000Z | rolling/apply.py | andrewcfreeman/rolling | 7cff8e45bbebaf64a5da1ad6e7d1a7619eebca17 | [
"MIT"
] | 23 | 2017-12-31T17:50:48.000Z | 2021-11-27T15:31:54.000Z | rolling/apply.py | andrewcfreeman/rolling | 7cff8e45bbebaf64a5da1ad6e7d1a7619eebca17 | [
"MIT"
] | 7 | 2019-01-28T02:53:49.000Z | 2021-11-11T18:34:45.000Z | from collections import deque
from itertools import islice
from .base import RollingObject
class Apply(RollingObject):
"""
Iterator object that applies a function to
a rolling window over a Python iterable.
Parameters
----------
iterable : any iterable object
window_size : integer, the ... | 24.084337 | 82 | 0.62031 | 1,904 | 0.952476 | 0 | 0 | 145 | 0.072536 | 0 | 0 | 1,006 | 0.503252 |
c61de299d4e4c292c61a91562c711d62f7565f8f | 7,333 | py | Python | src/user/role_service.py | fugwenna/bunkbot | f438c6a7d1f2c1797755eb8287bc1499c0cf2a88 | [
"MIT"
] | 2 | 2017-05-10T03:41:12.000Z | 2017-08-12T12:51:44.000Z | src/user/role_service.py | fugwenna/bunkbot | f438c6a7d1f2c1797755eb8287bc1499c0cf2a88 | [
"MIT"
] | 13 | 2017-08-09T00:41:17.000Z | 2021-09-04T17:47:11.000Z | src/user/role_service.py | fugwenna/bunkbot | f438c6a7d1f2c1797755eb8287bc1499c0cf2a88 | [
"MIT"
] | 4 | 2017-05-10T01:15:03.000Z | 2021-03-02T03:49:45.000Z | from typing import List
from discord import Role, Color, role
from ..bunkbot import BunkBot
from ..channel.channel_service import ChannelService
from ..core.bunk_user import BunkUser
from ..core.service import Service
from ..db.database_service import DatabaseService
class RoleService(Service):
"""
... | 32.591111 | 138 | 0.569617 | 7,052 | 0.96168 | 0 | 0 | 0 | 0 | 5,381 | 0.733806 | 3,224 | 0.439656 |
c61e07f6e1d7dbddc3e330dbcdac65bf1c316ee7 | 2,166 | py | Python | src/dfd/models/interface.py | cicheck/dfd | b02752f958cfea2f85222e2b4b3ba7e265a6152d | [
"MIT"
] | null | null | null | src/dfd/models/interface.py | cicheck/dfd | b02752f958cfea2f85222e2b4b3ba7e265a6152d | [
"MIT"
] | 2 | 2021-12-31T17:44:20.000Z | 2021-12-31T19:51:11.000Z | src/dfd/models/interface.py | cicheck/dfd | b02752f958cfea2f85222e2b4b3ba7e265a6152d | [
"MIT"
] | null | null | null | from __future__ import annotations
import abc
import enum
import pathlib
import typing as t
class Prediction(enum.Enum):
"""Represents model prediction."""
def _generate_next_value_(name, start, count, last_values):
return name
REAL = enum.auto()
FAKE = enum.auto()
UNCERTAIN = enum.auto... | 27.769231 | 91 | 0.66205 | 2,067 | 0.954294 | 0 | 0 | 1,493 | 0.689289 | 0 | 0 | 940 | 0.43398 |
c61e8d5ec314a4c9be9e075977a63d201f07a9d2 | 502 | py | Python | chapter2/code/concurrency/threadPoolConcurrency.py | abbbhucho/Mastering-Python-for-Networking-and-Security | f4fb1131253e9daad8da501c297758fdcedfbac3 | [
"MIT"
] | 98 | 2018-05-13T20:41:43.000Z | 2022-03-31T00:24:01.000Z | chapter2/code/concurrency/threadPoolConcurrency.py | Cyb3rid10ts/Mastering-Python-for-Networking-and-Security | 4cf04d1758f17ae378b5e3422404e5b7a174a243 | [
"MIT"
] | null | null | null | chapter2/code/concurrency/threadPoolConcurrency.py | Cyb3rid10ts/Mastering-Python-for-Networking-and-Security | 4cf04d1758f17ae378b5e3422404e5b7a174a243 | [
"MIT"
] | 62 | 2018-06-19T13:46:34.000Z | 2022-02-11T05:47:24.000Z | #python 3
from concurrent.futures import ThreadPoolExecutor
import threading
import random
def view_thread():
print("Executing Thread")
print("Accesing thread : {}".format(threading.get_ident()))
print("Thread Executed {}".format(threading.current_thread()))
def main():
executor = ThreadPoolExecutor(m... | 27.888889 | 66 | 0.731076 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 0.157371 |
c6221c4f4c97c1af9d1e5e7738396af3bac3c4e6 | 1,591 | py | Python | doc/buildbot/sample_slave.py | elhigu/pocl | 726569646d3e95ef7625991aef11a2e84216076a | [
"MIT"
] | 1 | 2020-08-13T06:59:37.000Z | 2020-08-13T06:59:37.000Z | doc/buildbot/sample_slave.py | elhigu/pocl | 726569646d3e95ef7625991aef11a2e84216076a | [
"MIT"
] | null | null | null | doc/buildbot/sample_slave.py | elhigu/pocl | 726569646d3e95ef7625991aef11a2e84216076a | [
"MIT"
] | 1 | 2020-08-13T06:59:39.000Z | 2020-08-13T06:59:39.000Z | from buildbot.buildslave import BuildSlave
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.changes import filter
from buildbot.config import BuilderConfig
from buildbot.schedulers.forcesched import *
from poclfactory import createPoclFactory
# overrride the 'sample_slave' with a descriptive ... | 37 | 105 | 0.752986 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 928 | 0.583281 |
c6224896f978093621d6275c6b492b553a5f89f0 | 2,575 | py | Python | pqr/__init__.py | pittquantum/PittQuantumRepository | 5100ff264e76cb97e5eba2929558a08d0ed158f8 | [
"MIT"
] | 13 | 2015-10-11T00:52:52.000Z | 2022-03-04T16:26:40.000Z | pqr/__init__.py | pittquantum/backend | 5100ff264e76cb97e5eba2929558a08d0ed158f8 | [
"MIT"
] | 54 | 2015-05-06T07:33:06.000Z | 2015-07-07T05:09:08.000Z | pqr/__init__.py | pittquantum/backend | 5100ff264e76cb97e5eba2929558a08d0ed158f8 | [
"MIT"
] | 4 | 2017-03-03T03:58:50.000Z | 2020-01-23T03:55:30.000Z | from flask import Flask, url_for, request, session, abort
import os
import re
import base64
pqr = Flask(__name__)
# Determines the destination of the build. Only usefull if you're using
# Frozen-Flask
pqr.config['FREEZER_DESTINATION'] = os.path.dirname(os.path.abspath(__file__)) + '/../build'
# Function to easily f... | 33.441558 | 129 | 0.616311 | 0 | 0 | 0 | 0 | 210 | 0.081553 | 0 | 0 | 1,153 | 0.447767 |
c625108183edb6d267c158ee6b26a88a85fb2494 | 255 | py | Python | application/core/common_utils.py | solomonxie/lambda-application-demo | 35ac5e17985cdd5694eb154b527d3942ad52cad6 | [
"MIT"
] | null | null | null | application/core/common_utils.py | solomonxie/lambda-application-demo | 35ac5e17985cdd5694eb154b527d3942ad52cad6 | [
"MIT"
] | null | null | null | application/core/common_utils.py | solomonxie/lambda-application-demo | 35ac5e17985cdd5694eb154b527d3942ad52cad6 | [
"MIT"
] | null | null | null | import json
from urllib import request
def get_ip():
info = None
try:
resp = request.urlopen("http://ip-api.com/json/")
raw = resp.read()
info = json.loads(raw)
except Exception as e:
print(e)
return info
| 18.214286 | 57 | 0.580392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.098039 |
c625be4168c09da47fadb564f1e3637c6cb209e3 | 2,205 | py | Python | src/boxes/datatypes/calc.py | Peilonrayz/alphabet_learner | 13229e53215e3c050f106e00e34f90ca2d6fa256 | [
"MIT"
] | null | null | null | src/boxes/datatypes/calc.py | Peilonrayz/alphabet_learner | 13229e53215e3c050f106e00e34f90ca2d6fa256 | [
"MIT"
] | null | null | null | src/boxes/datatypes/calc.py | Peilonrayz/alphabet_learner | 13229e53215e3c050f106e00e34f90ca2d6fa256 | [
"MIT"
] | null | null | null | import collections.abc
from typing import Union, Sequence, Optional
from .primitives import Number
from .units import Unit, UnitTypes
_Value = Union[Unit, Number, float, int]
class Calc:
type: UnitTypes
@classmethod
def build(
cls,
values: Union[_Value, Sequence[_Value]],
opera... | 27.911392 | 84 | 0.576417 | 2,018 | 0.915193 | 0 | 0 | 765 | 0.346939 | 0 | 0 | 206 | 0.093424 |
c626517f412e73181fae98762e0e92e932f1d7ee | 676 | py | Python | dfrus/machine_code_match.py | dfint/dfrus | 84eb206d01e57ba2571b19c2bbbe7765c660fb55 | [
"MIT"
] | 1 | 2021-09-11T12:46:01.000Z | 2021-09-11T12:46:01.000Z | dfrus/machine_code_match.py | dfint/dfrus | 84eb206d01e57ba2571b19c2bbbe7765c660fb55 | [
"MIT"
] | 8 | 2021-10-29T18:54:54.000Z | 2021-11-29T08:18:05.000Z | dfrus/machine_code_match.py | dfint/dfrus | 84eb206d01e57ba2571b19c2bbbe7765c660fb55 | [
"MIT"
] | null | null | null | from .binio import from_dword
from .opcodes import Reg, mov_reg_imm, mov_acc_mem, mov_rm_reg, x0f_movups, Prefix
def match_mov_reg_imm32(b: bytes, reg: Reg, imm: int) -> bool:
assert len(b) == 5, b
return b[0] == mov_reg_imm | 8 | int(reg) and from_dword(b[1:]) == imm
def get_start(s):
i = None
if s... | 26 | 82 | 0.573964 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.04142 |
c6271a004e236807dbe7bcbd4263febf9681f51b | 964 | py | Python | tests/database/testmodel.py | LowieHuyghe/edmunds-python | 236d087746cb8802a8854b2706b8d3ff009e9209 | [
"Apache-2.0"
] | 4 | 2017-09-07T13:39:50.000Z | 2018-05-31T16:14:50.000Z | tests/database/testmodel.py | LowieHuyghe/edmunds-python | 236d087746cb8802a8854b2706b8d3ff009e9209 | [
"Apache-2.0"
] | 103 | 2017-03-19T15:58:21.000Z | 2018-07-11T20:36:17.000Z | tests/database/testmodel.py | LowieHuyghe/edmunds-python | 236d087746cb8802a8854b2706b8d3ff009e9209 | [
"Apache-2.0"
] | 2 | 2017-10-14T15:20:11.000Z | 2018-04-20T09:55:44.000Z |
from tests.testcase import TestCase
from edmunds.database.db import db, mapper, relationship, backref
from sqlalchemy.orm import mapper as sqlalchemy_mapper, relationship as sqlalchemy_relationship, backref as sqlalchemy_backref
from edmunds.database.databasemanager import DatabaseManager
from werkzeug.local import Lo... | 32.133333 | 126 | 0.745851 | 592 | 0.614108 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.092324 |
c6285b947189b318c16d99d170a80d0888fc3b1c | 6,485 | py | Python | pvlib/test/test_tracking.py | dacoex/pvlib-python | 38c0082f264a468015464aff1026a9ac864b4ed5 | [
"BSD-3-Clause"
] | null | null | null | pvlib/test/test_tracking.py | dacoex/pvlib-python | 38c0082f264a468015464aff1026a9ac864b4ed5 | [
"BSD-3-Clause"
] | null | null | null | pvlib/test/test_tracking.py | dacoex/pvlib-python | 38c0082f264a468015464aff1026a9ac864b4ed5 | [
"BSD-3-Clause"
] | 2 | 2017-03-08T18:38:05.000Z | 2018-06-08T07:29:03.000Z | import logging
pvl_logger = logging.getLogger('pvlib')
import datetime
import numpy as np
import pandas as pd
from nose.tools import raises, assert_almost_equals
from nose.plugins.skip import SkipTest
from pandas.util.testing import assert_frame_equal
from pvlib.location import Location
from pvlib import solarposit... | 39.30303 | 81 | 0.517039 | 0 | 0 | 0 | 0 | 393 | 0.060601 | 0 | 0 | 481 | 0.074171 |
c62888b176d698967ac4dee70756482d46d7f23e | 1,396 | py | Python | src/topgearAPI/carro.py | danilo94/ArduinoDashboard | f5dcbd8995c0f135ca0bd899aa9eefd9393eb46a | [
"MIT"
] | 2 | 2019-05-25T21:21:31.000Z | 2019-12-15T15:33:56.000Z | src/topgearAPI/carro.py | domsamuka/ArduinoDashboard | f5dcbd8995c0f135ca0bd899aa9eefd9393eb46a | [
"MIT"
] | null | null | null | src/topgearAPI/carro.py | domsamuka/ArduinoDashboard | f5dcbd8995c0f135ca0bd899aa9eefd9393eb46a | [
"MIT"
] | 2 | 2019-12-15T15:33:33.000Z | 2019-12-17T01:50:26.000Z | from MemoryHandler import *
from addresses import *
from struct import *
class carro (object):
def __init__(self):
self.velocidade=0
self.gasolina=0
self.pontos=0
self.posicao=0
self.rpm=0
self.nitro=0
self.gerenciadorMemoria = MemoryHandler("zsne... | 27.372549 | 149 | 0.588109 | 1,316 | 0.942693 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.024355 |
c628a854cb921505c3553f10d9c7e5209dafaeeb | 10,483 | py | Python | tests/test_base_api.py | yhegen/cumulocity-python-api | 729d29a518426fe118ed315df84020578a6961fb | [
"Apache-2.0"
] | 9 | 2021-02-16T08:53:08.000Z | 2022-02-15T11:58:19.000Z | tests/test_base_api.py | yhegen/cumulocity-python-api | 729d29a518426fe118ed315df84020578a6961fb | [
"Apache-2.0"
] | 4 | 2021-04-20T12:26:41.000Z | 2022-02-09T09:52:11.000Z | tests/test_base_api.py | yhegen/cumulocity-python-api | 729d29a518426fe118ed315df84020578a6961fb | [
"Apache-2.0"
] | 3 | 2021-04-26T23:05:32.000Z | 2021-12-09T14:13:58.000Z | # Copyright (c) 2020 Software AG,
# Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA,
# and/or its subsidiaries and/or its affiliates and/or their licensors.
# Use, reproduction, transfer, publication or disclosure is prohibited except
# as specifically provided for in your License Agreement with Softwar... | 35.900685 | 110 | 0.659258 | 0 | 0 | 0 | 0 | 4,740 | 0.452161 | 0 | 0 | 3,480 | 0.331966 |
c62b0f6c1dafe4863a081c29e104df05db4c301e | 866 | py | Python | src/xsdtools/jsonschema_generator.py | pietrodelugas/xsdtools | b30e5f6b41c079cca01b3fb8c36feee484df8e34 | [
"BSD-3-Clause"
] | 1 | 2020-12-17T04:50:47.000Z | 2020-12-17T04:50:47.000Z | src/xsdtools/jsonschema_generator.py | pietrodelugas/xsdtools | b30e5f6b41c079cca01b3fb8c36feee484df8e34 | [
"BSD-3-Clause"
] | null | null | null | src/xsdtools/jsonschema_generator.py | pietrodelugas/xsdtools | b30e5f6b41c079cca01b3fb8c36feee484df8e34 | [
"BSD-3-Clause"
] | 2 | 2021-07-21T10:38:08.000Z | 2021-09-16T17:50:25.000Z | #
# Copyright (c) 2020, Quantum Espresso Foundation and SISSA.
# Internazionale Superiore di Studi Avanzati). All rights reserved.
# This file is distributed under the terms of the BSD 3-Clause license.
# See the file 'LICENSE' in the root directory of the present distribution,
# or https://opensource.org/licenses/BSD-... | 29.862069 | 75 | 0.668591 | 482 | 0.556582 | 0 | 0 | 0 | 0 | 0 | 0 | 584 | 0.674365 |
c62d9b91a6c0cb24173d60044e7948da3e09c288 | 4,135 | py | Python | bright/tests/test_bright.py | bright-dev/bright | af3ff83d37880787443b1a8e785f375142d42882 | [
"WTFPL"
] | 3 | 2016-05-08T06:13:10.000Z | 2019-02-14T10:01:22.000Z | bright/tests/test_bright.py | bright-dev/bright | af3ff83d37880787443b1a8e785f375142d42882 | [
"WTFPL"
] | null | null | null | bright/tests/test_bright.py | bright-dev/bright | af3ff83d37880787443b1a8e785f375142d42882 | [
"WTFPL"
] | null | null | null | """Bright general tests"""
from unittest import TestCase
import nose
from nose.tools import assert_equal, assert_not_equal, assert_raises, raises, \
assert_almost_equal, assert_true, assert_false, with_setup
import os
import warnings
import tables as tb
import numpy as np
from pyne import nucname
import bright... | 28.517241 | 81 | 0.728174 | 0 | 0 | 0 | 0 | 1,826 | 0.441596 | 0 | 0 | 361 | 0.087304 |
c62dbdcf249b0771af08bd01ce1cb984ad5302f1 | 81 | py | Python | Dog_model/Dog/apps.py | cs-fullstack-2019-fall/django-models-cw-Deltonjr2 | 3fc667bed19201b75016798bd367d0bde9cb6c00 | [
"Apache-2.0"
] | null | null | null | Dog_model/Dog/apps.py | cs-fullstack-2019-fall/django-models-cw-Deltonjr2 | 3fc667bed19201b75016798bd367d0bde9cb6c00 | [
"Apache-2.0"
] | null | null | null | Dog_model/Dog/apps.py | cs-fullstack-2019-fall/django-models-cw-Deltonjr2 | 3fc667bed19201b75016798bd367d0bde9cb6c00 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class DogConfig(AppConfig):
name = 'Dog'
| 13.5 | 33 | 0.728395 | 44 | 0.54321 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.061728 |
c62e4d453948d4cfc525683440c2c6e5323bf2c9 | 2,568 | py | Python | tests/unittest_db.py | zaanposni/umfrageBot | 3e19dc0629cde394da2ae8706e6e043b4e87059d | [
"MIT"
] | 6 | 2019-08-15T20:19:38.000Z | 2021-02-28T21:33:19.000Z | tests/unittest_db.py | zaanposni/umfrageBot | 3e19dc0629cde394da2ae8706e6e043b4e87059d | [
"MIT"
] | 31 | 2019-08-14T08:42:08.000Z | 2020-05-07T13:43:43.000Z | tests/unittest_db.py | zaanposni/umfrageBot | 3e19dc0629cde394da2ae8706e6e043b4e87059d | [
"MIT"
] | 5 | 2019-08-17T13:39:53.000Z | 2020-04-01T07:25:51.000Z | import unittest
from pathlib import Path
import os
import shutil
import time
from src.bt_utils.handle_sqlite import DatabaseHandler
from src.bt_utils.get_content import content_dir
from sqlite3 import IntegrityError
class TestClass(unittest.TestCase):
def testDB(self):
if os.path.exists(content_dir):
... | 33.789474 | 84 | 0.628505 | 2,299 | 0.895249 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.22391 |
c62ff5ebe57088aca1b17d3ec477eb124d6fc9bd | 1,777 | py | Python | mxnet_load_model.py | whn09/mxnet-ssd | ff15817dbf6d3c6d3fc69fbf6bef4c4d61490159 | [
"MIT"
] | 1 | 2019-09-11T02:07:50.000Z | 2019-09-11T02:07:50.000Z | mxnet_load_model.py | whn09/mxnet-ssd | ff15817dbf6d3c6d3fc69fbf6bef4c4d61490159 | [
"MIT"
] | null | null | null | mxnet_load_model.py | whn09/mxnet-ssd | ff15817dbf6d3c6d3fc69fbf6bef4c4d61490159 | [
"MIT"
] | null | null | null | # load model and predicate
import mxnet as mx
import numpy as np
# define test data
batch_size = 1
num_batch = 1
filepath = 'frame-1.jpg'
DEFAULT_INPUT_SHAPE = 300
# load model
sym, arg_params, aux_params = mx.model.load_checkpoint("model/deploy_model_algo_1", 0) # load with net name and epoch num
mod = mx.mod.Modul... | 34.843137 | 121 | 0.747327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 842 | 0.473832 |
c63135668085d0506f3e10e5b3343cb3a4bdce5a | 577 | py | Python | dataMapper.py | cbrandl/csv_costanalyser | c4e2c53bb7f13e56aec07425e5c0e1f0bed6b8fa | [
"MIT"
] | null | null | null | dataMapper.py | cbrandl/csv_costanalyser | c4e2c53bb7f13e56aec07425e5c0e1f0bed6b8fa | [
"MIT"
] | null | null | null | dataMapper.py | cbrandl/csv_costanalyser | c4e2c53bb7f13e56aec07425e5c0e1f0bed6b8fa | [
"MIT"
] | null | null | null | class dataMapper:
def __init__(self, data):
self.__data = data
self.__structure = self.getDataStructure()
def getDataStructure(self):
headings = self.__data[0]
structure = {}
for key in headings:
structure[key.lower()] = ''
return structure
def m... | 27.47619 | 58 | 0.551127 | 576 | 0.998267 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0.003466 |
c63176fa74c364cbbea0d4a75b777050b148c47b | 2,778 | py | Python | tests/integrate_test/samples/sample_internal_call_scores/sample_link_score/sample_link_score.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 52 | 2018-08-24T02:28:43.000Z | 2021-07-06T04:44:22.000Z | tests/integrate_test/samples/sample_internal_call_scores/sample_link_score/sample_link_score.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 62 | 2018-09-17T06:59:16.000Z | 2021-12-15T06:02:51.000Z | tests/integrate_test/samples/sample_internal_call_scores/sample_link_score/sample_link_score.py | bayeshack2016/icon-service | 36cab484d2e41548d7f2f74526f127ee3a4423fc | [
"Apache-2.0"
] | 35 | 2018-09-14T02:42:10.000Z | 2022-02-05T10:34:46.000Z | from iconservice import *
class SampleInterface(InterfaceScore):
@interface
def set_value(self, value: int) -> None: pass
@interface
def get_value(self) -> int: pass
@interface
def get_db(self) -> IconScoreDatabase: pass
@interface
def fallback_via_internal_call(self) -> None: pass
... | 31.213483 | 94 | 0.688985 | 2,746 | 0.988481 | 0 | 0 | 1,992 | 0.717063 | 0 | 0 | 85 | 0.030598 |
c631f8352fb062e1fdfef1179ba0676d0f9d2d26 | 489 | py | Python | setup.py | ulicar/sentry-cli | c95a77f8b74ced7c41dc8ab61fd31fdf64c08880 | [
"MIT"
] | null | null | null | setup.py | ulicar/sentry-cli | c95a77f8b74ced7c41dc8ab61fd31fdf64c08880 | [
"MIT"
] | null | null | null | setup.py | ulicar/sentry-cli | c95a77f8b74ced7c41dc8ab61fd31fdf64c08880 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from setuptools import setup
setup(
name = "python-sentry",
version = "1.0",
author = "Josip Domsic",
author_email = "[email protected]",
description = ("Pure Python CLI for sentry, as well as client library"),
license = "MIT",
keywords = "python Sentry CLI",
... | 23.285714 | 76 | 0.580777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.482618 |
c6323bdd3e94514d523e80b9e992ba25f2230d0f | 790 | py | Python | crawler/src/config/config.py | HVHO/holiday-pharmacy | e641dca93ed0cc0e3ffa28f54a1da6a86c1cfe22 | [
"MIT"
] | null | null | null | crawler/src/config/config.py | HVHO/holiday-pharmacy | e641dca93ed0cc0e3ffa28f54a1da6a86c1cfe22 | [
"MIT"
] | null | null | null | crawler/src/config/config.py | HVHO/holiday-pharmacy | e641dca93ed0cc0e3ffa28f54a1da6a86c1cfe22 | [
"MIT"
] | null | null | null | import json
import os
def load_config():
PYTHON_ENV = os.getenv("PYTHON_ENV", default="DEV")
if PYTHON_ENV == "DEV":
with open("./crawler/src/config/config-dev.json") as f:
config = json.load(f)
host = config["database_host"]
name = config["database_name"]
... | 34.347826 | 96 | 0.594937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.325316 |
c633041a2c7d19a40de6c87bb53ba1dfc7b15b1a | 672 | py | Python | alexandriadocs/core/tests/test_models.py | srtab/alexandria-docs | 94b221a4140db23ad6d97a98c7cf521fbdefbc0a | [
"Apache-2.0"
] | 2 | 2017-03-26T22:38:49.000Z | 2017-04-22T11:28:07.000Z | alexandriadocs/core/tests/test_models.py | srtab/alexandriadocs | 94b221a4140db23ad6d97a98c7cf521fbdefbc0a | [
"Apache-2.0"
] | 22 | 2017-06-10T17:15:59.000Z | 2018-08-06T14:57:44.000Z | alexandriadocs/core/tests/test_models.py | srtab/alexandriadocs | 94b221a4140db23ad6d97a98c7cf521fbdefbc0a | [
"Apache-2.0"
] | 1 | 2018-08-04T08:12:47.000Z | 2018-08-04T08:12:47.000Z | # -*- coding: utf-8 -*-
from django.test import SimpleTestCase
from core.models import VisibilityMixin
class VisibilityMixinTest(SimpleTestCase):
def test_is_private(self):
visibility = VisibilityMixin()
self.assertTrue(visibility.is_private)
visibility = VisibilityMixin(
vis... | 30.545455 | 58 | 0.714286 | 565 | 0.840774 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.034226 |
c6337ba6bb736b172e7ae3a784113684d1641780 | 5,320 | py | Python | STResNet/plots/error_plots.py | vtsuperdarn/deep_leaning_on_GSP_TEC | f5989d1742be9c02edbcab37433f468cb2c5f771 | [
"MIT"
] | 9 | 2018-09-17T02:11:26.000Z | 2020-12-16T12:28:35.000Z | STResNet/plots/error_plots.py | vtsuperdarn/deep_leaning_on_GSP_TEC | f5989d1742be9c02edbcab37433f468cb2c5f771 | [
"MIT"
] | null | null | null | STResNet/plots/error_plots.py | vtsuperdarn/deep_leaning_on_GSP_TEC | f5989d1742be9c02edbcab37433f468cb2c5f771 | [
"MIT"
] | 6 | 2018-07-23T13:37:10.000Z | 2022-01-19T17:51:19.000Z | import datetime
import pandas
import seaborn as sns
import matplotlib.pyplot as plt
import os
import re
import glob
amean_err = []
astddev_err = []
amin_err = []
amax_err = []
rmean_err = []
rstddev_err = []
rmin_err = []
rmax_err = []
#loading the true and predicted tec maps for calculating the min/max error, mea... | 31.111111 | 140 | 0.71015 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 730 | 0.137218 |
c63435b48134fbdbc1eba24cadcae4cf22b07d3a | 1,969 | py | Python | online_judges/sub_two/sub_two_challenge.py | stephank007/python_challenges | dfd8d18c03a06735f6e4e02b0660007fe2d02f07 | [
"Apache-2.0"
] | null | null | null | online_judges/sub_two/sub_two_challenge.py | stephank007/python_challenges | dfd8d18c03a06735f6e4e02b0660007fe2d02f07 | [
"Apache-2.0"
] | null | null | null | online_judges/sub_two/sub_two_challenge.py | stephank007/python_challenges | dfd8d18c03a06735f6e4e02b0660007fe2d02f07 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges).
# # Challenge Notebook
# ## Problem: Sum of Two Integers (Subtraction Variant).
#
# See the [Lee... | 22.123596 | 181 | 0.643982 | 504 | 0.255967 | 0 | 0 | 0 | 0 | 0 | 0 | 1,335 | 0.678009 |
c6382fdd07fdfdca681e712305a912e00b66a929 | 1,262 | py | Python | src/ipdasite.services/ipdasite/services/interfaces/curator.py | NASA-PDS/planetarydata.org | 16731a251c22408b433117f7f01e29d004f11467 | [
"Apache-2.0"
] | null | null | null | src/ipdasite.services/ipdasite/services/interfaces/curator.py | NASA-PDS/planetarydata.org | 16731a251c22408b433117f7f01e29d004f11467 | [
"Apache-2.0"
] | 5 | 2021-03-19T21:41:19.000Z | 2022-02-11T14:55:14.000Z | src/ipdasite.services/ipdasite/services/interfaces/curator.py | NASA-PDS/planetarydata.org | 16731a251c22408b433117f7f01e29d004f11467 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# Copyright 2011 California Institute of Technology. ALL RIGHTS
# RESERVED. U.S. Government Sponsorship acknowledged.
'''Curator: interface'''
from zope.interface import Interface
from zope import schema
from ipdasite.services import ProjectMessageFactory as _
class ICurator(Interface):
'''A pe... | 33.210526 | 108 | 0.669572 | 979 | 0.775753 | 0 | 0 | 0 | 0 | 0 | 0 | 572 | 0.453249 |
c638b2c5e25cf3da6255a0d76be797621245e3cf | 23 | py | Python | deepnade/buml/Results/__init__.py | marinakiseleva/NADE | 69ea890fad1e775dfff2db6dad4dd9d11b6a343e | [
"BSD-3-Clause"
] | null | null | null | deepnade/buml/Results/__init__.py | marinakiseleva/NADE | 69ea890fad1e775dfff2db6dad4dd9d11b6a343e | [
"BSD-3-Clause"
] | null | null | null | deepnade/buml/Results/__init__.py | marinakiseleva/NADE | 69ea890fad1e775dfff2db6dad4dd9d11b6a343e | [
"BSD-3-Clause"
] | 1 | 2021-10-08T19:54:34.000Z | 2021-10-08T19:54:34.000Z | from .Results import *
| 11.5 | 22 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c6392cb56f54b8d5c8c4d8010af78d820fc779d5 | 472 | py | Python | main/migrations/0006_auto_20200120_1628.py | Code-and-Response/ISAC-SIMO-Repo-2 | 5b0cb0099e128dbacfdc53bf686ef2b069a51bc6 | [
"PostgreSQL",
"Apache-2.0"
] | 5 | 2021-08-16T16:32:41.000Z | 2022-02-22T03:47:49.000Z | main/migrations/0006_auto_20200120_1628.py | Code-and-Response/ISAC-SIMO-Repo-2 | 5b0cb0099e128dbacfdc53bf686ef2b069a51bc6 | [
"PostgreSQL",
"Apache-2.0"
] | 7 | 2021-04-12T14:48:48.000Z | 2022-02-14T08:30:57.000Z | main/migrations/0006_auto_20200120_1628.py | Code-and-Response/ISAC-SIMO-Repo-2 | 5b0cb0099e128dbacfdc53bf686ef2b069a51bc6 | [
"PostgreSQL",
"Apache-2.0"
] | 1 | 2021-04-28T14:28:34.000Z | 2021-04-28T14:28:34.000Z | # Generated by Django 3.0.2 on 2020-01-20 10:43
from django.db import migrations, models
import main.models
class Migration(migrations.Migration):
dependencies = [
('main', '0005_auto_20200120_1619'),
]
operations = [
migrations.AlterField(
model_name='user',
nam... | 23.6 | 123 | 0.637712 | 360 | 0.762712 | 0 | 0 | 0 | 0 | 0 | 0 | 129 | 0.273305 |
c63aa739c17a4e754a25a2ea9c3f099089da52a6 | 350 | py | Python | __init__.py | LLNL/ferdinand | af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70 | [
"Apache-2.0"
] | null | null | null | __init__.py | LLNL/ferdinand | af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70 | [
"Apache-2.0"
] | null | null | null | __init__.py | LLNL/ferdinand | af47b415ea1e9cb21a45b20d1f3854bc7f3a4d70 | [
"Apache-2.0"
] | null | null | null | ##############################################
# #
# Ferdinand 0.40, Ian Thompson, LLNL #
# #
# gnd,endf,fresco,azure,hyrma #
# #
######################################... | 38.888889 | 46 | 0.18 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.942857 |
c63aa7bd0e0701b71a3831892875ee207bc50f62 | 2,707 | py | Python | tests/test_chol.py | luk036/ellalgo | 8e83587b271f35c906c0d0aa4175dac153e5e29b | [
"MIT"
] | null | null | null | tests/test_chol.py | luk036/ellalgo | 8e83587b271f35c906c0d0aa4175dac153e5e29b | [
"MIT"
] | null | null | null | tests/test_chol.py | luk036/ellalgo | 8e83587b271f35c906c0d0aa4175dac153e5e29b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
from ellalgo.oracles.chol_ext import chol_ext
def test_chol1():
"""[summary]"""
l1 = [[25.0, 15.0, -5.0], [15.0, 18.0, 0.0], [-5.0, 0.0, 11.0]]
m1 = np.array(l1)
Q1 = chol_ext(len(m1))
assert Q1.factori... | 23.136752 | 68 | 0.472109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.12597 |
c63e00866b579ae084343dd771e2b18a8af736d6 | 867 | py | Python | TelloStuff/Tests/Tello.py | svg94/Drone_Prototype-dirty-implementation- | 53ea429714beff6966c2b9c82e0c96d53baca66c | [
"MIT"
] | null | null | null | TelloStuff/Tests/Tello.py | svg94/Drone_Prototype-dirty-implementation- | 53ea429714beff6966c2b9c82e0c96d53baca66c | [
"MIT"
] | null | null | null | TelloStuff/Tests/Tello.py | svg94/Drone_Prototype-dirty-implementation- | 53ea429714beff6966c2b9c82e0c96d53baca66c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from TelloSDKPy.djitellopy.tello import Tello
import cv2
import pygame
import numpy as np
import time
def main():
#Controller Init
pygame.init()
joysticks = []
for i in range(0,pygame.joystick.get_count()):
joysticks.append(pygame.joystick.Joystick(i))
joysticks[... | 24.083333 | 53 | 0.49827 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.092272 |
c63ed36ee241e548d81bdd20f997dcd995f3ec78 | 11,761 | py | Python | models/SPR.py | fresh-professor/DiverseCont | 4be198f5531a7efe2cb91b17066322a38d219127 | [
"MIT"
] | 21 | 2021-09-08T14:37:06.000Z | 2022-02-28T02:58:35.000Z | models/SPR.py | fresh-professor/DiverseCont | 4be198f5531a7efe2cb91b17066322a38d219127 | [
"MIT"
] | 1 | 2021-12-28T09:17:38.000Z | 2021-12-28T11:49:30.000Z | models/SPR.py | fresh-professor/DiverseCont | 4be198f5531a7efe2cb91b17066322a38d219127 | [
"MIT"
] | null | null | null | import os
from copy import deepcopy
import tqdm
import torch
import torch.nn.functional as F
import colorful
import numpy as np
import networkx as nx
from tensorboardX import SummaryWriter
from .reservoir import reservoir
from components import Net
from utils import BetaMixture1D
class SPR(torch.nn.Module):
""" Tr... | 43.884328 | 127 | 0.585239 | 11,478 | 0.975937 | 0 | 0 | 0 | 0 | 0 | 0 | 2,062 | 0.175325 |
c640ef3189a49dcfa1947c8d0c9f7d5961226015 | 6,602 | py | Python | tests/pyunity/testScene/testScene.py | rayzchen/PyUnity | 8ed436eca7a84f05190c1fa275c58da5c6059926 | [
"MIT"
] | null | null | null | tests/pyunity/testScene/testScene.py | rayzchen/PyUnity | 8ed436eca7a84f05190c1fa275c58da5c6059926 | [
"MIT"
] | null | null | null | tests/pyunity/testScene/testScene.py | rayzchen/PyUnity | 8ed436eca7a84f05190c1fa275c58da5c6059926 | [
"MIT"
] | null | null | null | # Copyright (c) 2020-2022 The PyUnity Team
# This file is licensed under the MIT License.
# See https://docs.pyunity.x10.bz/en/latest/license.html
from pyunity import (
SceneManager, Component, Camera, AudioListener, Light,
GameObject, Tag, Transform, GameObjectException,
ComponentException, Canvas, PyUnit... | 36.882682 | 85 | 0.628294 | 6,153 | 0.93199 | 0 | 0 | 0 | 0 | 0 | 0 | 915 | 0.138594 |
c64201468eb9a627a5893c74a3ccfcc9bf284d58 | 1,806 | py | Python | alembic_migration/alembic_handler.py | NASA-IMPACT/hls-sentinel2-downloader-serverless | e3e4f542fc805c6259f20a6dd932c98cccd4144c | [
"Apache-2.0"
] | null | null | null | alembic_migration/alembic_handler.py | NASA-IMPACT/hls-sentinel2-downloader-serverless | e3e4f542fc805c6259f20a6dd932c98cccd4144c | [
"Apache-2.0"
] | 2 | 2021-07-23T00:49:42.000Z | 2021-07-23T00:51:25.000Z | alembic_migration/alembic_handler.py | NASA-IMPACT/hls-sentinel2-downloader-serverless | e3e4f542fc805c6259f20a6dd932c98cccd4144c | [
"Apache-2.0"
] | null | null | null | import logging
import os
import alembic.command
import alembic.config
import cfnresponse
from db.session import get_session, get_session_maker
from retry import retry
from sqlalchemy.exc import OperationalError
def log(log_statement: str):
"""
Gets a Logger for the Lambda function with level logging.INFO and... | 30.1 | 87 | 0.668328 | 0 | 0 | 0 | 0 | 213 | 0.11794 | 0 | 0 | 587 | 0.325028 |
c642cc7668f9eaa2a24f87fd2cd2fe18ccbe3844 | 8,988 | py | Python | booksoai/oaipmh.py | scieloorg/books-oai | b0114f452c2bddb00ce6414a6926c57b548fb46a | [
"BSD-2-Clause"
] | 1 | 2019-03-16T04:44:08.000Z | 2019-03-16T04:44:08.000Z | booksoai/oaipmh.py | DalavanCloud/books-oai | b0114f452c2bddb00ce6414a6926c57b548fb46a | [
"BSD-2-Clause"
] | 2 | 2016-06-06T18:04:31.000Z | 2018-02-02T15:26:54.000Z | booksoai/oaipmh.py | DalavanCloud/books-oai | b0114f452c2bddb00ce6414a6926c57b548fb46a | [
"BSD-2-Clause"
] | 2 | 2016-06-06T18:03:54.000Z | 2019-03-16T04:43:56.000Z | from __future__ import unicode_literals
import plumber
from lxml import etree
from datetime import datetime
import pipeline
class BadArgumentError(Exception):
"""Raised when a Verb receives wrong args."""
class CannotDisseminateFormatError(Exception):
"""Raised when metadata format is not supported"""
... | 24.897507 | 100 | 0.576435 | 8,807 | 0.979862 | 0 | 0 | 0 | 0 | 0 | 0 | 1,136 | 0.126391 |
c642eb175ecb18dbaa59adf93fe2e5472ccf50d1 | 1,229 | py | Python | ch2/q25solution.py | kylepw/ctci | 7e2fcc6775db3789d0e425f4fb969acf6c44aad5 | [
"MIT"
] | null | null | null | ch2/q25solution.py | kylepw/ctci | 7e2fcc6775db3789d0e425f4fb969acf6c44aad5 | [
"MIT"
] | null | null | null | ch2/q25solution.py | kylepw/ctci | 7e2fcc6775db3789d0e425f4fb969acf6c44aad5 | [
"MIT"
] | null | null | null | from LinkedList import LinkedList
def sum_lists(ll_a, ll_b):
n1, n2 = ll_a.head, ll_b.head
ll = LinkedList()
carry = 0
while n1 or n2:
result = carry
if n1:
result += n1.value
n1 = n1.next
if n2:
result += n2.value
n2 = n2.next
... | 21.561404 | 52 | 0.570382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.109032 |
c646039bec76cea06e642add68741d31531aa8e2 | 5,147 | py | Python | cmdb-compliance/libs/server/server_common.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null | cmdb-compliance/libs/server/server_common.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | 1 | 2022-01-04T13:53:16.000Z | 2022-01-04T13:53:16.000Z | cmdb-optimization/libs/server/server_common.py | zjj1002/aws-cloud-cmdb-system | 47982007688e5db1272435891cb654ab11d0d60a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/5/15 14:44
# @Author : Fred Yangxiaofei
# @File : server_common.py
# @Role : server公用方法,记录日志,更新资产,推送密钥,主要给手动更新资产使用
from models.server import Server, AssetErrorLog, ServerDetail
from libs.db_context import DBContext
from libs.web_logs import ins_log... | 41.508065 | 120 | 0.541092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,026 | 0.191311 |
c6463fc79c5c1fa3ed6d7d6dc133cda7182d1756 | 1,607 | py | Python | src/test/serialization/codec/object/test_string_codec.py | typingtanuki/pyserialization | f4a0d9cff08b3a6ce8f83f3a258c4dce1367d151 | [
"Apache-2.0"
] | null | null | null | src/test/serialization/codec/object/test_string_codec.py | typingtanuki/pyserialization | f4a0d9cff08b3a6ce8f83f3a258c4dce1367d151 | [
"Apache-2.0"
] | null | null | null | src/test/serialization/codec/object/test_string_codec.py | typingtanuki/pyserialization | f4a0d9cff08b3a6ce8f83f3a258c4dce1367d151 | [
"Apache-2.0"
] | null | null | null | import unittest
from src.main.serialization.codec.codec import Codec
from src.main.serialization.codec.object.stringCodec import StringCodec
from src.main.serialization.codec.primitive.shortCodec import ShortCodec
from src.main.serialization.codec.utils.byteIo import ByteIo
from src.main.serialization.codec.utils.byte... | 40.175 | 116 | 0.654636 | 1,564 | 0.776179 | 0 | 0 | 0 | 0 | 0 | 0 | 998 | 0.495285 |
c647d169764fd3968e368f07e9481ecd112d4727 | 539 | py | Python | dataviz/ex1.py | jonaslindemann/compute-course-public | b8f55595ebbd790d79b525efdff17b8517154796 | [
"MIT"
] | 4 | 2021-09-12T12:07:01.000Z | 2021-09-29T17:38:34.000Z | dataviz/ex1.py | jonaslindemann/compute-course-public | b8f55595ebbd790d79b525efdff17b8517154796 | [
"MIT"
] | null | null | null | dataviz/ex1.py | jonaslindemann/compute-course-public | b8f55595ebbd790d79b525efdff17b8517154796 | [
"MIT"
] | 5 | 2020-10-24T16:02:31.000Z | 2021-09-28T20:57:46.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 7 14:58:44 2017
@author: Jonas Lindemann
"""
import numpy as np
import pyvtk as vtk
print("Reading from uvw.dat...")
xyzuvw = np.loadtxt('uvw.dat', skiprows=2)
print("Converting to points and vectors")
points = xyzuvw[:, 0:3].tolist()
vectors = xyzuvw[:... | 24.5 | 96 | 0.654917 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.350649 |
c6487ab8b368f34287f785fc89a730b8d8fe1f9f | 2,237 | py | Python | nginc/__init__.py | FlorianLudwig/nginc | 489546d1b0190047150bf3134071aa88c64f8c3d | [
"Apache-2.0"
] | 1 | 2015-11-01T12:16:17.000Z | 2015-11-01T12:16:17.000Z | nginc/__init__.py | FlorianLudwig/nginc | 489546d1b0190047150bf3134071aa88c64f8c3d | [
"Apache-2.0"
] | null | null | null | nginc/__init__.py | FlorianLudwig/nginc | 489546d1b0190047150bf3134071aa88c64f8c3d | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Florian Ludwig
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 30.22973 | 89 | 0.646848 | 0 | 0 | 0 | 0 | 184 | 0.082253 | 0 | 0 | 850 | 0.379973 |
c649c2159d59b04bdc795f0bcf96424017779542 | 1,417 | py | Python | Part 2 - Regression/Section 4 - Simple Linear Regression/practice_linear_regression.py | aditya30394/Machine-Learning-A-Z | 8caaf1f94f800fcc7bd594569593c4d713c32d9e | [
"MIT"
] | null | null | null | Part 2 - Regression/Section 4 - Simple Linear Regression/practice_linear_regression.py | aditya30394/Machine-Learning-A-Z | 8caaf1f94f800fcc7bd594569593c4d713c32d9e | [
"MIT"
] | null | null | null | Part 2 - Regression/Section 4 - Simple Linear Regression/practice_linear_regression.py | aditya30394/Machine-Learning-A-Z | 8caaf1f94f800fcc7bd594569593c4d713c32d9e | [
"MIT"
] | null | null | null | # Import important libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Read the data set
dataset = pd.read_csv('Salary_Data.csv')
X = dataset.iloc[:,:-1].values
y = dataset.iloc[:, 1].values
# Splitting the dataset into the Training set and Test set
from sklearn.model_selection import t... | 32.953488 | 94 | 0.762879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 689 | 0.486239 |
c64c0a450e0399b2acbc4deba8555735fd48b6da | 1,853 | py | Python | source/source_test.py | mengwangk/myinvestor-toolkit | 3dca9e1accfccf1583dcdbec80d1a0fe9dae2e81 | [
"MIT"
] | 7 | 2019-10-13T18:58:33.000Z | 2021-08-07T12:46:22.000Z | source/source_test.py | mengwangk/myinvestor-toolkit | 3dca9e1accfccf1583dcdbec80d1a0fe9dae2e81 | [
"MIT"
] | 7 | 2019-12-16T21:25:34.000Z | 2022-02-10T00:11:22.000Z | source/source_test.py | mengwangk/myinvestor-toolkit | 3dca9e1accfccf1583dcdbec80d1a0fe9dae2e81 | [
"MIT"
] | 4 | 2020-02-01T11:23:51.000Z | 2021-12-13T12:27:18.000Z | # -*- coding: utf-8 -*-
"""Test for various sources
Supported sources
- Yahoo Finance
- I3Investor - KLSe
"""
import datetime as dt
import string
import unittest
from source import YahooFinanceSource, GoogleFinanceSource
class SourceTest(unittest.TestCase):
_TEST_YAHOO_FINANCE_SYMBOL = '6742.KL'
_YAHOO_F... | 30.377049 | 114 | 0.679439 | 1,624 | 0.876417 | 0 | 0 | 1,033 | 0.557474 | 0 | 0 | 527 | 0.284404 |
c64e4b280de8cd0b21024951fd1499e577dd81d6 | 2,197 | py | Python | solver.py | n8henrie/knapsack | c52179e43a833d57f0df185d5d225444d1725204 | [
"MIT"
] | null | null | null | solver.py | n8henrie/knapsack | c52179e43a833d57f0df185d5d225444d1725204 | [
"MIT"
] | null | null | null | solver.py | n8henrie/knapsack | c52179e43a833d57f0df185d5d225444d1725204 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from collections import namedtuple
from itertools import combinations
import knapsack
def solve_it(input_data, language="rust"):
if language == "python":
return solve_it_python(input_data)
return solve_it_rust(input_data)
def solve_it_rust(input_data):
return knapsack.so... | 26.46988 | 129 | 0.61766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 395 | 0.179791 |
c65170e65e760d40c99c948a36c0e972a977e113 | 3,765 | py | Python | api/mon/utils.py | klebed/esdc-ce | 2c9e4591f344247d345a83880ba86777bb794460 | [
"Apache-2.0"
] | 97 | 2016-11-15T14:44:23.000Z | 2022-03-13T18:09:15.000Z | api/mon/utils.py | klebed/esdc-ce | 2c9e4591f344247d345a83880ba86777bb794460 | [
"Apache-2.0"
] | 334 | 2016-11-17T19:56:57.000Z | 2022-03-18T10:45:53.000Z | api/mon/utils.py | klebed/esdc-ce | 2c9e4591f344247d345a83880ba86777bb794460 | [
"Apache-2.0"
] | 33 | 2017-01-02T16:04:13.000Z | 2022-02-07T19:20:24.000Z | from django.conf import settings
from api.task.internal import InternalTask
from api.task.response import mgmt_task_response
from vms.utils import AttrDict
from vms.models import Vm
from que import TG_DC_UNBOUND, TG_DC_BOUND
class MonitoringGraph(AttrDict):
"""
Monitoring graph configuration.
"""
def... | 37.277228 | 106 | 0.619124 | 616 | 0.163612 | 0 | 0 | 0 | 0 | 0 | 0 | 1,016 | 0.269854 |
c653a244302b5a5341cd24081ae62a5772fcf996 | 3,291 | py | Python | src/mud/database/__init__.py | Martakan/YUMS | 57c8c02eac70a62233f9a48d78becb1a25bed64e | [
"MIT"
] | null | null | null | src/mud/database/__init__.py | Martakan/YUMS | 57c8c02eac70a62233f9a48d78becb1a25bed64e | [
"MIT"
] | null | null | null | src/mud/database/__init__.py | Martakan/YUMS | 57c8c02eac70a62233f9a48d78becb1a25bed64e | [
"MIT"
] | null | null | null | """
A modular, runtime re-loadable database package!
A thin wrapper around the Mongo DB library 'motor' with helper functions to abstract away
some more complex database operations.
"""
import sys as __sys
import importlib as __importlib
import motor.motor_asyncio
import asyncio
# names of the python modules/packag... | 43.88 | 112 | 0.679125 | 2,456 | 0.746278 | 0 | 0 | 0 | 0 | 0 | 0 | 2,137 | 0.649347 |
c6555d7ff4abb61b8057f24c0663ec8a607ba4a5 | 714 | py | Python | Pillow-4.3.0/Tests/test_image_toqpixmap.py | leorzz/simplemooc | 8b1c5e939d534b1fd729596df4c59fc69708b896 | [
"MIT"
] | null | null | null | Pillow-4.3.0/Tests/test_image_toqpixmap.py | leorzz/simplemooc | 8b1c5e939d534b1fd729596df4c59fc69708b896 | [
"MIT"
] | null | null | null | Pillow-4.3.0/Tests/test_image_toqpixmap.py | leorzz/simplemooc | 8b1c5e939d534b1fd729596df4c59fc69708b896 | [
"MIT"
] | null | null | null | from helper import unittest, PillowTestCase, hopper
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
from PIL import ImageQt
if ImageQt.qt_is_installed:
from PIL.ImageQt import QPixmap
class TestToQPixmap(PillowQPixmapTestCase, PillowTestCase):
def test_sanity(self):
PillowQtTestCas... | 25.5 | 64 | 0.666667 | 455 | 0.637255 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.091036 |
c6568e3f6207ae8a99ee488f843417b0e24ee7fa | 255 | py | Python | auth/serializers.py | sling254/the-hood | ce169abbdc368e1a7e92896abdf8237136456290 | [
"MIT"
] | null | null | null | auth/serializers.py | sling254/the-hood | ce169abbdc368e1a7e92896abdf8237136456290 | [
"MIT"
] | null | null | null | auth/serializers.py | sling254/the-hood | ce169abbdc368e1a7e92896abdf8237136456290 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from hood.models import UserProfile
class UserProfileSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = UserProfile
fields = ('bio', 'birth_date','picture','email','picture') | 36.428571 | 68 | 0.752941 | 179 | 0.701961 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.164706 |
c657d8bfb322dd5002f78a47fc6ad0b585ab1382 | 403 | py | Python | packages/markblocks/markblocks/lex/listlexer.py | stattikcms/stattik | 5c96d600d105461edb95a11d8050dee3c32edd1e | [
"MIT"
] | 1 | 2021-11-05T06:24:28.000Z | 2021-11-05T06:24:28.000Z | packages/markblocks/markblocks/lex/listlexer.py | stattikcms/stattik | 5c96d600d105461edb95a11d8050dee3c32edd1e | [
"MIT"
] | null | null | null | packages/markblocks/markblocks/lex/listlexer.py | stattikcms/stattik | 5c96d600d105461edb95a11d8050dee3c32edd1e | [
"MIT"
] | null | null | null | from .lexer import Lexer
class ListLexer(Lexer):
tokens = Lexer.tokens
fingerprints = [
(r'(?P<UL>^\*( +)?)', 'UL'),
(r'(?P<OL>^\d+.( +)?)', 'OL'),
]
def __init__(self):
super().__init__()
@_(r'^\*( +)?')
def UL(self, t):
return t
@_(r'^\d+.( +)?')
def ... | 18.318182 | 38 | 0.419355 | 377 | 0.935484 | 0 | 0 | 156 | 0.387097 | 0 | 0 | 76 | 0.188586 |
c658055ce83117b157d548c23979f1dfab0a6ef7 | 879 | py | Python | bdn/job/migrations/0002_auto_20180820_1444.py | OpenSourceUniversity/bdn | 8e8d5b4d63ff4cb9bdf7c5f23d07aa3ad3dd0121 | [
"MIT"
] | 1 | 2019-01-18T19:57:25.000Z | 2019-01-18T19:57:25.000Z | bdn/job/migrations/0002_auto_20180820_1444.py | OpenSourceUniversity/bdn | 8e8d5b4d63ff4cb9bdf7c5f23d07aa3ad3dd0121 | [
"MIT"
] | 3 | 2019-06-23T17:26:24.000Z | 2022-02-11T03:40:54.000Z | bdn/job/migrations/0002_auto_20180820_1444.py | OpenSourceUniversity/bdn | 8e8d5b4d63ff4cb9bdf7c5f23d07aa3ad3dd0121 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.2 on 2018-08-20 14:44
import django.contrib.postgres.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('job', '0002_auto_20180820_0901'),
]
operations = [
migrations.AlterField(
model_name='job'... | 29.3 | 150 | 0.609784 | 748 | 0.850967 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.166098 |
c6584a2c0e693053cb75307e5e476e2c82f9ab5b | 900 | py | Python | tripmining/model/coordinate.py | LinusDietz/tripmining | 0bb57268d623ce7bc6d36f10db529f0bf9645bd6 | [
"MIT"
] | 3 | 2020-03-20T10:26:18.000Z | 2021-03-12T11:25:31.000Z | tripmining/model/coordinate.py | LinusDietz/tripmining | 0bb57268d623ce7bc6d36f10db529f0bf9645bd6 | [
"MIT"
] | 3 | 2020-03-19T15:01:44.000Z | 2020-04-07T12:17:11.000Z | tripmining/model/coordinate.py | LinusDietz/tripmining | 0bb57268d623ce7bc6d36f10db529f0bf9645bd6 | [
"MIT"
] | 1 | 2020-01-27T13:11:09.000Z | 2020-01-27T13:11:09.000Z | import functools
import math
import operator
class Coordinate:
def __init__(self, lat, lng):
f_lat = float(lat)
if math.fabs(f_lat) > 180:
raise ValueError(f'The latitude must be between -180 and 180 degrees, but was {f_lat}!')
f_lng = float(lng)
if math.fabs(f_lng) > 1... | 29.032258 | 101 | 0.6 | 852 | 0.946667 | 0 | 0 | 0 | 0 | 0 | 0 | 168 | 0.186667 |
c659e8a42adf9d9a4fef0726f9fe5a262dddce52 | 315 | py | Python | odin-libraries/python/pyodin/odin_logger.py | elijah/odin | d181cd86b9909904ba97d8090098a4913c93a894 | [
"MIT"
] | null | null | null | odin-libraries/python/pyodin/odin_logger.py | elijah/odin | d181cd86b9909904ba97d8090098a4913c93a894 | [
"MIT"
] | null | null | null | odin-libraries/python/pyodin/odin_logger.py | elijah/odin | d181cd86b9909904ba97d8090098a4913c93a894 | [
"MIT"
] | null | null | null | from os import environ
from requests import post
class OdinLogger:
@classmethod
def log(cls, type, desc, value, id, timestamp):
response = post(url="http://localhost:3939/stats/add", data = type + "," + desc + "," + str(value) + "," + id + "," + str(timestamp))
return response.status_code
| 35 | 141 | 0.631746 | 264 | 0.838095 | 0 | 0 | 242 | 0.768254 | 0 | 0 | 45 | 0.142857 |
d65cc2e3aa44a8e72e75284f2813f4355fc088be | 14,673 | py | Python | g2p_aligner.py | ys10/Grapheme-PhonemeAlignment | b7108822bea6da6f1b14e9692affb05d24ae55cb | [
"MIT"
] | 4 | 2018-05-31T02:52:47.000Z | 2021-03-12T09:09:57.000Z | g2p_aligner.py | ys10/Grapheme-PhonemeAlignment | b7108822bea6da6f1b14e9692affb05d24ae55cb | [
"MIT"
] | 1 | 2018-03-05T02:30:39.000Z | 2018-03-05T02:30:39.000Z | g2p_aligner.py | ys10/Grapheme-PhonemeAlignment | b7108822bea6da6f1b14e9692affb05d24ae55cb | [
"MIT"
] | 1 | 2020-04-22T07:06:33.000Z | 2020-04-22T07:06:33.000Z | # coding=utf-8
import numpy as np
from itertools import combinations_with_replacement
from my_log import logging
def load_transcription(transcription_file_name):
"""
:return: a list of tuple:
[
(word: string, phones: list),
(word: string, phones: list),
...,
... | 37.146835 | 163 | 0.559395 | 10,220 | 0.696517 | 0 | 0 | 0 | 0 | 0 | 0 | 5,002 | 0.340898 |
d65ef125e43cf3342be46e1656a8eaaba3ec76c9 | 6,483 | py | Python | hw-10/rainwater-hw-10.py | rainwaterone/stat656 | c582fc8c6a55c377e2b57d1f7b10471d625d79db | [
"MIT"
] | null | null | null | hw-10/rainwater-hw-10.py | rainwaterone/stat656 | c582fc8c6a55c377e2b57d1f7b10471d625d79db | [
"MIT"
] | null | null | null | hw-10/rainwater-hw-10.py | rainwaterone/stat656 | c582fc8c6a55c377e2b57d1f7b10471d625d79db | [
"MIT"
] | null | null | null | """
STAT 656 HW-10
@author:Lee Rainwater
@heavy_lifting_by: Dr. Edward Jones
@date: 2020-07-29
"""
import pandas as pd
# Classes provided from AdvancedAnalytics ver 1.25
from AdvancedAnalytics.Text import text_analysis
from AdvancedAnalytics.Text import sentiment_analysis
from sklearn.feature_extrac... | 37.912281 | 100 | 0.653555 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,415 | 0.372513 |
d660266eecc102047200d3452d83cf102a416710 | 497 | py | Python | manokee/timing/timing.py | smiszym/manokee | afb63b8ce5ba3f83bb924965b8d5098a6d28c474 | [
"MIT"
] | null | null | null | manokee/timing/timing.py | smiszym/manokee | afb63b8ce5ba3f83bb924965b8d5098a6d28c474 | [
"MIT"
] | 14 | 2021-03-11T02:05:20.000Z | 2022-03-12T01:05:11.000Z | manokee/timing/timing.py | smiszym/manokee | afb63b8ce5ba3f83bb924965b8d5098a6d28c474 | [
"MIT"
] | null | null | null | class Timing:
def beat_to_seconds(self, beat_number: float) -> float:
"""
Convert beat number to seconds.
:param beat_number: Beat number counted from 0.
:return: Time in seconds.
"""
raise NotImplementedError
def seconds_to_beat(self, time: float) -> float:
... | 29.235294 | 59 | 0.597586 | 496 | 0.997988 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.569416 |
d6608bea94750fd60f161e8edb1c0de3cbc454f4 | 2,113 | py | Python | main.py | nizamphoenix/EDD2020 | e8d05c38019b98cc8c5e34fd4bc50baceb8d608a | [
"MIT"
] | 4 | 2020-06-08T03:19:57.000Z | 2021-10-13T09:40:23.000Z | main.py | nizamphoenix/EDD2020 | e8d05c38019b98cc8c5e34fd4bc50baceb8d608a | [
"MIT"
] | null | null | null | main.py | nizamphoenix/EDD2020 | e8d05c38019b98cc8c5e34fd4bc50baceb8d608a | [
"MIT"
] | null | null | null | from torch.utils.data import DataLoader
from torch.utils.data.sampler import SubsetRandomSampler
from meditorch.nn.models import UNetResNet
from torchsummary import summary
import torch.optim as optim
from torch.optim import lr_scheduler
from meditorch.nn import Trainer
from meditorch.utils.plot import plot_image_truem... | 35.216667 | 119 | 0.75769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 325 | 0.15381 |
d661b7759b3dc688b6b6db70c85b0949bed0d166 | 10,520 | py | Python | dist/geoapi/data/queries.py | tinyperegrine/geoapi | 63d50427adef7b8db727f2942b39791bdae32a4c | [
"MIT"
] | 2 | 2021-05-24T22:00:30.000Z | 2021-07-26T07:39:23.000Z | src/geoapi/data/queries.py | tinyperegrine/geoapi | 63d50427adef7b8db727f2942b39791bdae32a4c | [
"MIT"
] | 5 | 2021-03-19T03:42:09.000Z | 2022-03-11T23:59:20.000Z | src/geoapi/data/queries.py | tinyperegrine/geoapi | 63d50427adef7b8db727f2942b39791bdae32a4c | [
"MIT"
] | null | null | null | """Query Object for all read-only queries to the Real Property table
"""
import os
import logging
from time import time
from typing import List
import asyncio
import aiohttp
import aiofiles
import databases
from PIL import Image
import sqlalchemy
from sqlalchemy.sql import select, func
import geoapi.common.spatial_uti... | 39.400749 | 120 | 0.616825 | 9,954 | 0.946198 | 0 | 0 | 3,156 | 0.3 | 9,436 | 0.896958 | 3,021 | 0.287167 |
d6640fe2dcd11b0460e228747652381b73af179f | 1,685 | py | Python | src/api/proxy/proxy.py | HaoJiangGuo/fp-server | 9c00b8f0ee64049eb9f214c3efe1fdee977542a6 | [
"MIT"
] | 2 | 2018-08-17T06:56:21.000Z | 2019-01-08T03:10:32.000Z | src/api/proxy/proxy.py | HaoJiangGuo/fp-server | 9c00b8f0ee64049eb9f214c3efe1fdee977542a6 | [
"MIT"
] | null | null | null | src/api/proxy/proxy.py | HaoJiangGuo/fp-server | 9c00b8f0ee64049eb9f214c3efe1fdee977542a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
API for proxy
"""
from core import exceptions
from core.web import WebHandler
from service.proxy.serializers import ProxySerializer
from service.proxy.proxy import proxy_srv
from utils import log as logger
from utils.routes import route
def return_developing():
... | 23.402778 | 68 | 0.591691 | 1,239 | 0.735312 | 0 | 0 | 1,294 | 0.767953 | 1,114 | 0.661128 | 361 | 0.214243 |
d66723dcef2bb7193246b5983ca2285df66c7c28 | 2,058 | py | Python | projects/crawler_for_prodect_category/category_output/to_html.py | ice-melt/python-lib | 345e34fff7386d91acbb03a01fd4127c5dfed037 | [
"MIT"
] | null | null | null | projects/crawler_for_prodect_category/category_output/to_html.py | ice-melt/python-lib | 345e34fff7386d91acbb03a01fd4127c5dfed037 | [
"MIT"
] | null | null | null | projects/crawler_for_prodect_category/category_output/to_html.py | ice-melt/python-lib | 345e34fff7386d91acbb03a01fd4127c5dfed037 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from projects.crawler_for_prodect_category.category_output import output_utils
import codecs
Logger = output_utils.Logger
def output(filename, datas):
"""
将爬取的数据导出到html
:return:
"""
Logger.info('Output to html file, please wait ...')
# object_serialize('object.pkl',self.dat... | 43.787234 | 113 | 0.573372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,116 | 0.535509 |
d66748bfb42fb82f0c12adab0e031e9250276edd | 2,947 | py | Python | build/lib/WORC/featureprocessing/SelectIndividuals.py | Sikerdebaard/PREDICTFastr | e1f172c3606e6f33edf58008f958dcd1c0ac5b7b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | build/lib/WORC/featureprocessing/SelectIndividuals.py | Sikerdebaard/PREDICTFastr | e1f172c3606e6f33edf58008f958dcd1c0ac5b7b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | build/lib/WORC/featureprocessing/SelectIndividuals.py | Sikerdebaard/PREDICTFastr | e1f172c3606e6f33edf58008f958dcd1c0ac5b7b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016-2019 Biomedical Imaging Group Rotterdam, Departments of
# Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | 35.506024 | 88 | 0.635562 | 2,110 | 0.715982 | 0 | 0 | 0 | 0 | 0 | 0 | 2,213 | 0.750933 |
d667529945c63e9ee84e1cddf5e8de3b084ac4c0 | 5,567 | py | Python | hsv.py | FarinaMatteo/siv-project | fbac7c7c114db51d9fdcf90aba296906abdf91af | [
"MIT"
] | null | null | null | hsv.py | FarinaMatteo/siv-project | fbac7c7c114db51d9fdcf90aba296906abdf91af | [
"MIT"
] | null | null | null | hsv.py | FarinaMatteo/siv-project | fbac7c7c114db51d9fdcf90aba296906abdf91af | [
"MIT"
] | 1 | 2021-04-13T11:22:06.000Z | 2021-04-13T11:22:06.000Z | """
Background vs Foreground Image segmentation. The goal is to produce a segmentation map that imitates
videocalls tools like the ones implemented in Google Meet, Zoom without using Deep Learning- or Machine Learning-
based techniques.
This script does the following:
- builds a background model using the first 3s ... | 43.492188 | 126 | 0.623496 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,093 | 0.375966 |
d6690698841bc39fcf328d809c1ae9a9943d7b0f | 1,279 | py | Python | src/entities/relativeentity.py | alisonbento/steering-all | 99797f99180dd64189ea5ed85ff71b66bfd9cf6f | [
"MIT"
] | 3 | 2016-10-10T18:34:55.000Z | 2017-08-02T15:18:28.000Z | src/entities/relativeentity.py | alisonbento/steering-all | 99797f99180dd64189ea5ed85ff71b66bfd9cf6f | [
"MIT"
] | null | null | null | src/entities/relativeentity.py | alisonbento/steering-all | 99797f99180dd64189ea5ed85ff71b66bfd9cf6f | [
"MIT"
] | null | null | null | from entity import Entity
class RelativeEntity(Entity):
def __init__(self, width, height):
Entity.__init__(self, width, height)
self.margin = [0, 0, 0, 0]
def below(self, entity):
self.y = entity.y + entity.height + self.margin[1]
def above(self, entity):
self.y = entity.y - self.height - self... | 22.839286 | 63 | 0.641908 | 1,251 | 0.978108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d66b1cd60139d9cc3f50ee9f63aec7859add227e | 6,967 | py | Python | cuchem/cuchem/wf/cluster/gpurandomprojection.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | cuchem/cuchem/wf/cluster/gpurandomprojection.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | cuchem/cuchem/wf/cluster/gpurandomprojection.py | dorukozturk/cheminformatics | c0fa66dd4f4e6650d7286ae2be533c66b7a2b270 | [
"Apache-2.0"
] | null | null | null | #!/opt/conda/envs/rapids/bin/python3
#
# Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 35.912371 | 98 | 0.68724 | 4,772 | 0.684943 | 0 | 0 | 908 | 0.130329 | 0 | 0 | 1,203 | 0.172671 |
d66bd0ab7aebd9b29dfa99993c201e892a501872 | 4,688 | py | Python | calculate_iHSproportion.py | evodify/population-genetic-analyses | 5295f9d68736ac02fc5f3ece43dadd5bf4e98e6f | [
"MIT"
] | 3 | 2018-01-31T09:57:10.000Z | 2021-02-03T18:34:01.000Z | calculate_iHSproportion.py | evodify/population-genetic-analyses | 5295f9d68736ac02fc5f3ece43dadd5bf4e98e6f | [
"MIT"
] | null | null | null | calculate_iHSproportion.py | evodify/population-genetic-analyses | 5295f9d68736ac02fc5f3ece43dadd5bf4e98e6f | [
"MIT"
] | 1 | 2019-09-02T06:13:29.000Z | 2019-09-02T06:13:29.000Z | #! /usr/bin/env python
'''
This script calculates fractions of SNPs with iHS values above 2.0 over
genomic windows of specified size.
#Example input:
#CHROM POS iHS
chr1 14548 -3.32086
chr1 14670 -2.52
chr1 19796 0.977669
chr1 19798 3.604374
chr1 29412 -0.308192
chr1 29813 2.231736
chr1 29847 0.6594
chr1 29873 -2.0... | 24.544503 | 73 | 0.600256 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,014 | 0.429608 |
d66c0ed5c84f564a500b3ce340b852c977ab112f | 2,176 | py | Python | pkg/azure/resource_group.py | NihilBabu/xmigrate | c33d0b506a86a0ebef22df8ce299cd84f560d034 | [
"Apache-2.0"
] | 10 | 2021-01-02T11:59:46.000Z | 2021-06-14T04:38:45.000Z | pkg/azure/resource_group.py | NihilBabu/xmigrate | c33d0b506a86a0ebef22df8ce299cd84f560d034 | [
"Apache-2.0"
] | 12 | 2021-01-06T07:02:22.000Z | 2021-03-11T06:34:07.000Z | pkg/azure/resource_group.py | NihilBabu/xmigrate | c33d0b506a86a0ebef22df8ce299cd84f560d034 | [
"Apache-2.0"
] | 3 | 2021-01-10T12:33:52.000Z | 2021-04-12T14:29:13.000Z | # Import the needed management objects from the libraries. The azure.common library
# is installed automatically with the other libraries.
from azure.common.client_factory import get_client_from_cli_profile
from azure.mgmt.resource import ResourceManagementClient
from utils.dbconn import *
from utils.logger import *
fr... | 50.604651 | 108 | 0.68704 | 0 | 0 | 0 | 0 | 0 | 0 | 1,703 | 0.782629 | 572 | 0.262868 |
d66c1cc1ba3efab7c88083eacb18abf18bab0b53 | 1,049 | py | Python | forexml.py | brawnydawg/forexml | 62e623e6e7219ad8c7fbca05bf29ea79401741c5 | [
"MIT"
] | 2 | 2022-01-15T03:13:07.000Z | 2022-01-15T03:13:14.000Z | forexml.py | brawnydawg/forex.ml | 62e623e6e7219ad8c7fbca05bf29ea79401741c5 | [
"MIT"
] | null | null | null | forexml.py | brawnydawg/forex.ml | 62e623e6e7219ad8c7fbca05bf29ea79401741c5 | [
"MIT"
] | null | null | null | import numpy
from scipy import stats
from modules import controler
# To compile, us Auto Py to Exe:
# Step 1 - install Auto Py to Exe, if not already done
# To install the application run this line in cmd:
# pip install auto-py-to-exe
# To open the application run this line in cmd:
# auto-py-to-exe
# Step 2 - read the... | 26.897436 | 74 | 0.653003 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 537 | 0.511916 |
d66c664f346efdc6281f1b27109ddcac09232372 | 694 | py | Python | bench/bench_argcomplete.py | solackerman/pytest | 0fc00c02a7a39ebd6c57886a85580ea3341e76eb | [
"MIT"
] | 4 | 2020-09-09T15:28:01.000Z | 2021-12-01T00:59:56.000Z | bench/bench_argcomplete.py | solackerman/pytest | 0fc00c02a7a39ebd6c57886a85580ea3341e76eb | [
"MIT"
] | 7 | 2018-04-04T19:02:43.000Z | 2018-04-11T19:03:58.000Z | bench/bench_argcomplete.py | solackerman/pytest | 0fc00c02a7a39ebd6c57886a85580ea3341e76eb | [
"MIT"
] | 1 | 2021-04-06T20:06:58.000Z | 2021-04-06T20:06:58.000Z |
# 10000 iterations, just for relative comparison
# 2.7.5 3.3.2
# FilesCompleter 75.1109 69.2116
# FastFilesCompleter 0.7383 1.0760
if __name__ == '__main__':
import sys
import timeit
from argcomplete.completers import FilesCompleter
from _pytest._argcomplete im... | 34.7 | 80 | 0.631124 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 294 | 0.423631 |
d67095b77014549df9449d344e41a1c0d2d60ab6 | 374 | py | Python | catalog/bindings/gmd/valid_time.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/gmd/valid_time.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/gmd/valid_time.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from bindings.gmd.time_edge_property_type import TimePrimitivePropertyType
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
class ValidTime(TimePrimitivePropertyType):
"""
gml:validTime is a convenience property element.
"""
class Meta:
name = "validT... | 23.375 | 74 | 0.727273 | 205 | 0.548128 | 0 | 0 | 216 | 0.57754 | 0 | 0 | 131 | 0.350267 |
d670c4735ca674e296208c80467697f931ec147e | 2,020 | py | Python | docs/examples/arch/full_rhino.py | GeneKao/compas_assembly | 92fde9cd3948c1b9bb41b4ea7fc866392905182d | [
"MIT"
] | null | null | null | docs/examples/arch/full_rhino.py | GeneKao/compas_assembly | 92fde9cd3948c1b9bb41b4ea7fc866392905182d | [
"MIT"
] | null | null | null | docs/examples/arch/full_rhino.py | GeneKao/compas_assembly | 92fde9cd3948c1b9bb41b4ea7fc866392905182d | [
"MIT"
] | null | null | null | import os
from compas_assembly.datastructures import Assembly
from compas_assembly.geometry import Arch
from compas_assembly.rhino import AssemblyArtist
from compas.rpc import Proxy
proxy = Proxy()
proxy.restart_server()
try:
HERE = os.path.dirname(__file__)
except NameError:
HERE = os.getcwd()
DATA = os.p... | 29.275362 | 97 | 0.517327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,000 | 0.49505 |
d67132389d902c05a7f58bf458cc631ca552cd15 | 8,840 | py | Python | grinpy/functions/degree.py | somacdivad/grinpy | 597f9109b84f1c1aa8c8dd2ac5b572a05ba474de | [
"BSD-3-Clause"
] | 12 | 2019-08-27T11:04:09.000Z | 2022-03-03T07:38:42.000Z | grinpy/functions/degree.py | somacdivad/grinpy | 597f9109b84f1c1aa8c8dd2ac5b572a05ba474de | [
"BSD-3-Clause"
] | 18 | 2017-12-03T20:20:11.000Z | 2019-07-07T18:04:54.000Z | grinpy/functions/degree.py | somacdivad/grinpy | 597f9109b84f1c1aa8c8dd2ac5b572a05ba474de | [
"BSD-3-Clause"
] | 5 | 2017-11-28T22:43:05.000Z | 2021-07-02T08:48:43.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2017-2019 by
# David Amos <[email protected]>
# Randy Davila <[email protected]>
# BSD license.
#
# Authors: David Amos <[email protected]>
# Randy Davila <[email protected]>
"""Assorted degree related graph utilities.
"""
import collections
from grinpy i... | 21.82716 | 119 | 0.602149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,890 | 0.779412 |
d67252401050d3b5004b1ab15ef96c5d2e1fedcf | 76 | py | Python | tests/app/controller/webhook/github/events/__init__.py | angeleneleow/rocket2 | 649f49a94d123e78bfd014189e8fede31fa007f6 | [
"MIT"
] | null | null | null | tests/app/controller/webhook/github/events/__init__.py | angeleneleow/rocket2 | 649f49a94d123e78bfd014189e8fede31fa007f6 | [
"MIT"
] | null | null | null | tests/app/controller/webhook/github/events/__init__.py | angeleneleow/rocket2 | 649f49a94d123e78bfd014189e8fede31fa007f6 | [
"MIT"
] | null | null | null | """Contain the tests for the handlers of each supported GitHub webhook."""
| 38 | 75 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.973684 |
d673caa4093bd3809cb0be9e8da138d53b90b322 | 3,860 | py | Python | test/domain_types/test_polygon.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | null | null | null | test/domain_types/test_polygon.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | 6 | 2022-02-02T16:52:33.000Z | 2022-02-09T09:40:50.000Z | test/domain_types/test_polygon.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | null | null | null | # Pytests to test the Polygon domain type in the domain.json schema file
import pytest
from jsonschema.exceptions import ValidationError
pytestmark = pytest.mark.schema("/schemas/domain")
@pytest.mark.exhaustive
def test_valid_polygon_domain(validator, polygon_domain):
''' Tests an example of a Polygon domain '... | 33.275862 | 97 | 0.690933 | 0 | 0 | 0 | 0 | 170 | 0.044041 | 0 | 0 | 1,197 | 0.310104 |
d6756e24400a0d5ab6ef197f69d25560e3bddcc6 | 1,516 | py | Python | accounts/models.py | akahard2dj/DjangoBlackberry | 4e732d8650dc7d61cd79033d5072d836707b411f | [
"MIT"
] | null | null | null | accounts/models.py | akahard2dj/DjangoBlackberry | 4e732d8650dc7d61cd79033d5072d836707b411f | [
"MIT"
] | null | null | null | accounts/models.py | akahard2dj/DjangoBlackberry | 4e732d8650dc7d61cd79033d5072d836707b411f | [
"MIT"
] | null | null | null | from django.conf import settings
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from django.utils import timezone
from rest_framework.authtoken.models import Token
class BerryMan... | 26.596491 | 72 | 0.711082 | 1,019 | 0.672164 | 0 | 0 | 238 | 0.156992 | 0 | 0 | 51 | 0.033641 |
d6769c3069694a7ae83fbef15106d40f42aed309 | 1,012 | py | Python | tests/test_post.py | Alice-Githui/Blogger | 1ae481cc9f2af78e459314c0f09d1bd0ccff614d | [
"MIT"
] | null | null | null | tests/test_post.py | Alice-Githui/Blogger | 1ae481cc9f2af78e459314c0f09d1bd0ccff614d | [
"MIT"
] | null | null | null | tests/test_post.py | Alice-Githui/Blogger | 1ae481cc9f2af78e459314c0f09d1bd0ccff614d | [
"MIT"
] | null | null | null | import unittest
from app.models import Post,User
from app import db
class PostModelTest(unittest.TestCase):
def setUp(self):
self.user_Alice=User(username="Alice", password="potato", email="[email protected]")
self.new_post=Post(id=1,category="All", title="Great Things Take Time", blog="User Tests for b... | 37.481481 | 135 | 0.692688 | 943 | 0.931818 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.144269 |
d67a53433e748b3dfe2f8fbd06b9c917a36aef79 | 8,439 | py | Python | Game.py | KRHS-GameProgramming-2015/Manpac | 959bf7f5195a4edb528fbbf25b8896fcb28d5327 | [
"BSD-2-Clause"
] | null | null | null | Game.py | KRHS-GameProgramming-2015/Manpac | 959bf7f5195a4edb528fbbf25b8896fcb28d5327 | [
"BSD-2-Clause"
] | 3 | 2016-01-19T17:26:16.000Z | 2016-02-10T16:59:25.000Z | Game.py | KRHS-GameProgramming-2015/Manpac | 959bf7f5195a4edb528fbbf25b8896fcb28d5327 | [
"BSD-2-Clause"
] | null | null | null | import sys, pygame, math, random
from Wall import *
from Ghost import *
from Manpac import *
from Norb import *
from Score import *
pygame.init()
clock = pygame.time.Clock()
width = 700
height = 700
size = width, height
bgColor = r,g,b = 0, 0, 0
screen = pygame.display.set_mode(size)
while True:
ghosts = [Gh... | 31.371747 | 87 | 0.426472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.023699 |
d67b5cb25f09a20e3140a3f45e07da0db110f262 | 11,871 | py | Python | SNDG/WebServices/Offtarget.py | ezequieljsosa/sndg-bio | 5f709b5b572564ec1dfa40d090eca9a34295743e | [
"MIT"
] | null | null | null | SNDG/WebServices/Offtarget.py | ezequieljsosa/sndg-bio | 5f709b5b572564ec1dfa40d090eca9a34295743e | [
"MIT"
] | null | null | null | SNDG/WebServices/Offtarget.py | ezequieljsosa/sndg-bio | 5f709b5b572564ec1dfa40d090eca9a34295743e | [
"MIT"
] | 1 | 2020-09-01T15:57:54.000Z | 2020-09-01T15:57:54.000Z | import logging
import multiprocessing
import sys
from Bio import Entrez
from tqdm import tqdm
from SNDG import execute, mkdir
from SNDG.WebServices import download_file
from SNDG.WebServices.NCBI import NCBI
Entrez.email = '[email protected]'
_log = logging.getLogger(__name__)
from collections import defaultdi... | 29.6775 | 190 | 0.701289 | 4,262 | 0.359026 | 0 | 0 | 3,717 | 0.313116 | 0 | 0 | 6,120 | 0.515542 |
d67c213b9a36706b9d0346fd0b72cfdc78942fe2 | 855 | py | Python | palabox/processing/text/properly_cut_text.py | marcoboucas/palabox | d6e937db909daac0f9d3c5dff2309c29b5b68ea8 | [
"MIT"
] | null | null | null | palabox/processing/text/properly_cut_text.py | marcoboucas/palabox | d6e937db909daac0f9d3c5dff2309c29b5b68ea8 | [
"MIT"
] | null | null | null | palabox/processing/text/properly_cut_text.py | marcoboucas/palabox | d6e937db909daac0f9d3c5dff2309c29b5b68ea8 | [
"MIT"
] | null | null | null | """Cut properly some text."""
import re
END_OF_SENTENCE_CHARACTERS = {".", ";", "!", "?"}
def properly_cut_text(
text: str, start_idx: int, end_idx: int, nbr_before: int = 30, nbr_after: int = 30
) -> str:
"""Properly cut a text around some interval."""
str_length = len(text)
start_idx = max(0, star... | 27.580645 | 88 | 0.604678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.244444 |
d67c4663259aa37ae4097e44e2683c283befb25b | 1,307 | py | Python | Level2/Lessons17687/gamjapark.py | StudyForCoding/ProgrammersLevel | dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25 | [
"MIT"
] | null | null | null | Level2/Lessons17687/gamjapark.py | StudyForCoding/ProgrammersLevel | dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25 | [
"MIT"
] | null | null | null | Level2/Lessons17687/gamjapark.py | StudyForCoding/ProgrammersLevel | dc957b1c02cc4383a93b8cbf3d739e6c4d88aa25 | [
"MIT"
] | 1 | 2021-04-05T07:35:59.000Z | 2021-04-05T07:35:59.000Z | # [3차] n진수 게임
import string
tmp = string.digits+string.ascii_uppercase[:6]
def convert(n, base):
q, r = divmod(n, base)
if q == 0:
return tmp[r]
else:
return convert(q, base) + tmp[r]
def solution(n, t, m, p):
answer, nums = '', ''
count, cur = 0, 0
while count < t * m:
... | 22.534483 | 46 | 0.553175 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,197 | 0.714627 |
d67ed600e6c41963e2d457d2e537a8860f022e80 | 1,292 | py | Python | models/base.py | IlyaBizyaev/Im2Vec | 4fff000c84500c6e977c502519497e27e1f946f2 | [
"Apache-2.0"
] | null | null | null | models/base.py | IlyaBizyaev/Im2Vec | 4fff000c84500c6e977c502519497e27e1f946f2 | [
"Apache-2.0"
] | null | null | null | models/base.py | IlyaBizyaev/Im2Vec | 4fff000c84500c6e977c502519497e27e1f946f2 | [
"Apache-2.0"
] | null | null | null | from abc import abstractmethod
from typing import Any, List
import torch
def interpolate_vectors(v1: torch.Tensor, v2: torch.Tensor, n: int) -> torch.Tensor:
step = (v2 - v1) / (n - 1)
return torch.stack([v1 + i * step for i in range(n)], dim=0)
def reparameterize(mu: torch.Tensor, log_var: torch.Tensor) -... | 28.711111 | 84 | 0.648607 | 607 | 0.469814 | 0 | 0 | 185 | 0.143189 | 0 | 0 | 248 | 0.19195 |
d67f25d3516ae26ca8b76017de005e34113a7d6e | 7,293 | py | Python | process/triplifier.py | biocodellc/ontology-data-pipeline | f89dc159ab710368b3054bf8e8d70fb4c967527c | [
"BSD-3-Clause"
] | 13 | 2020-06-27T18:37:12.000Z | 2022-03-07T16:19:14.000Z | process/triplifier.py | biocodellc/ontology-data-pipeline | f89dc159ab710368b3054bf8e8d70fb4c967527c | [
"BSD-3-Clause"
] | 31 | 2019-01-05T18:39:37.000Z | 2021-12-13T19:43:40.000Z | process/triplifier.py | biocodellc/ontology-data-pipeline | f89dc159ab710368b3054bf8e8d70fb4c967527c | [
"BSD-3-Clause"
] | 1 | 2021-11-17T19:04:31.000Z | 2021-11-17T19:04:31.000Z | # -*- coding: utf-8 -*-
import re
import pandas as pd
import multiprocessing
from multiprocessing.dummy import Pool as ThreadPool
import logging
from .utils import isNull
class Triplifier(object):
def __init__(self, config):
self.config = config
self.integer_columns = []
for rule in self.c... | 39.209677 | 127 | 0.574935 | 7,119 | 0.976142 | 0 | 0 | 1,257 | 0.172357 | 0 | 0 | 2,364 | 0.324146 |
d680bcdee688777add2842ce0bdbc8ac9c241004 | 455 | py | Python | core/urls.py | tyronedamasceno/coffe-api | 8cbf48c35c5dbd9ddfbeb921140be1d96a48698f | [
"MIT"
] | null | null | null | core/urls.py | tyronedamasceno/coffe-api | 8cbf48c35c5dbd9ddfbeb921140be1d96a48698f | [
"MIT"
] | 8 | 2020-02-12T02:59:28.000Z | 2022-02-10T14:02:04.000Z | core/urls.py | tyronedamasceno/coffe-api | 8cbf48c35c5dbd9ddfbeb921140be1d96a48698f | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework import routers
from core import views
router = routers.DefaultRouter()
router.register('coffe_types', views.CoffeTypeViewSet, base_name='coffe_types')
router.register('harvests', views.HarvestViewSet, base_name='harvests')
router.register(
'storage_repor... | 22.75 | 79 | 0.771429 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.189011 |
d6812fee96c936a6d4abcdec5e68b3b5abdd5c3f | 409 | py | Python | api/core/models.py | vrmartins/poc-django-rest-framework | a4914c25c7decbe16f5233233e9da4dce57f64d8 | [
"MIT"
] | null | null | null | api/core/models.py | vrmartins/poc-django-rest-framework | a4914c25c7decbe16f5233233e9da4dce57f64d8 | [
"MIT"
] | 7 | 2020-04-05T14:25:37.000Z | 2021-09-22T18:50:16.000Z | api/core/models.py | vrmartins/poc-django-rest-framework | a4914c25c7decbe16f5233233e9da4dce57f64d8 | [
"MIT"
] | null | null | null | from django.db import models
from core.utils.cnpj_is_valid import cnpj_is_valid
class Customer(models.Model):
name = models.CharField(max_length=50, null=False, blank=False)
address = models.CharField(max_length=50, null=False, blank=False)
cnpj = models.CharField(max_length=14, unique=True, null=False, b... | 34.083333 | 108 | 0.750611 | 326 | 0.797066 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d681b7a1e2748c8e44788cf4efd924a9d9b41944 | 5,876 | py | Python | ros/src/waypoint_updater/waypoint_updater.py | ryan-jonesford/CarND-Capstone | f8095bb2b7370b0825a89d419c19884431dfb754 | [
"MIT"
] | null | null | null | ros/src/waypoint_updater/waypoint_updater.py | ryan-jonesford/CarND-Capstone | f8095bb2b7370b0825a89d419c19884431dfb754 | [
"MIT"
] | 3 | 2018-11-04T23:54:56.000Z | 2018-11-18T19:37:11.000Z | ros/src/waypoint_updater/waypoint_updater.py | ryan-jonesford/CarND-Capstone | f8095bb2b7370b0825a89d419c19884431dfb754 | [
"MIT"
] | 2 | 2018-10-29T23:45:15.000Z | 2018-11-04T21:43:16.000Z | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import PoseStamped
from styx_msgs.msg import Lane, Waypoint
from scipy.spatial import KDTree
import numpy as np
from std_msgs.msg import Int32
import math
'''
This node will publish waypoints from the car's current position to some `x` distance ahead.
As men... | 36.955975 | 131 | 0.615895 | 4,664 | 0.793737 | 0 | 0 | 0 | 0 | 0 | 0 | 1,230 | 0.209326 |
d681e5845812f47217df144a4c421bd1734a615c | 1,633 | py | Python | tools/configure.py | corrodedHash/sigmarsGarden | c6070005d9e01523c0b0deb2efbbfa5ffef0ce6f | [
"MIT"
] | null | null | null | tools/configure.py | corrodedHash/sigmarsGarden | c6070005d9e01523c0b0deb2efbbfa5ffef0ce6f | [
"MIT"
] | null | null | null | tools/configure.py | corrodedHash/sigmarsGarden | c6070005d9e01523c0b0deb2efbbfa5ffef0ce6f | [
"MIT"
] | null | null | null | from typing import Any
import cv2
import numpy as np
from sigmarsGarden.config import Configuration
from sigmarsGarden.parse import circle_coords
def configure(img: Any) -> Configuration:
cv2.namedWindow("configureDisplay")
# def click_and_crop(event, x, y, flags, param) -> None:
# print(event, x, ... | 24.014706 | 77 | 0.590325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.143295 |
d682adb11768d513c2f5a3a5ae14d06fb88db0b8 | 4,847 | py | Python | gpt2_generate.py | LindgeW/PreLM | 39a6b1c2fc0ccff7e8143f14d113cdfa79f63d79 | [
"Apache-2.0"
] | 1 | 2022-03-09T14:40:24.000Z | 2022-03-09T14:40:24.000Z | gpt2_generate.py | LindgeW/PreLM | 39a6b1c2fc0ccff7e8143f14d113cdfa79f63d79 | [
"Apache-2.0"
] | null | null | null | gpt2_generate.py | LindgeW/PreLM | 39a6b1c2fc0ccff7e8143f14d113cdfa79f63d79 | [
"Apache-2.0"
] | null | null | null | import torch
from transformers import GPT2Tokenizer, GPT2LMHeadModel
from torch.utils.data import TensorDataset, DataLoader
# reference: \transformers\generation_utils.py
def select_greedy(logits):
next_token_logits = logits[:, -1, :]
# Greedy decoding
next_token = torch.argmax(next_token_logits, dim=-1)
... | 39.08871 | 101 | 0.676295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,183 | 0.236837 |
d6848f01064221cf2643bf09ab3bba76151a40d4 | 205 | py | Python | main/PluginDemos/connectivityTest/Simulation/connectivityTest.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | null | null | null | main/PluginDemos/connectivityTest/Simulation/connectivityTest.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | null | null | null | main/PluginDemos/connectivityTest/Simulation/connectivityTest.py | JulianoGianlupi/nh-cc3d-4x-base-tool | c0f4aceebd4c5bf3ec39e831ef851e419b161259 | [
"CC0-1.0"
] | 1 | 2021-02-26T21:50:29.000Z | 2021-02-26T21:50:29.000Z | from cc3d import CompuCellSetup
from connectivityTestSteppables import connectivityTestSteppable
CompuCellSetup.register_steppable(steppable=connectivityTestSteppable(frequency=1))
CompuCellSetup.run()
| 25.625 | 83 | 0.887805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d6859b005c6f17914c88f345695e794297b1e815 | 59 | py | Python | models/genetic_algorithms/__init__.py | njellinas/ai-steroids | 40e0013bdacb8bee1236305c1384f6b5ac8bd807 | [
"MIT"
] | null | null | null | models/genetic_algorithms/__init__.py | njellinas/ai-steroids | 40e0013bdacb8bee1236305c1384f6b5ac8bd807 | [
"MIT"
] | null | null | null | models/genetic_algorithms/__init__.py | njellinas/ai-steroids | 40e0013bdacb8bee1236305c1384f6b5ac8bd807 | [
"MIT"
] | null | null | null | from models.genetic_algorithms.population import Population | 59 | 59 | 0.915254 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d6876109b60f86d0c814c99a79b62726595f011e | 167 | py | Python | webapp/campaigns/urls.py | AKarbas/datachef-interview-assignment | 04a69a0daf0ab5378a2e03913ac60818e3fb73d9 | [
"Intel"
] | null | null | null | webapp/campaigns/urls.py | AKarbas/datachef-interview-assignment | 04a69a0daf0ab5378a2e03913ac60818e3fb73d9 | [
"Intel"
] | null | null | null | webapp/campaigns/urls.py | AKarbas/datachef-interview-assignment | 04a69a0daf0ab5378a2e03913ac60818e3fb73d9 | [
"Intel"
] | null | null | null | from django.urls import path
from . import views
app_name = 'campaigns'
urlpatterns = [
path('<int:campaign_id>/', views.Campaign.as_view(), name='campaign'),
]
| 18.555556 | 74 | 0.700599 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.245509 |
d687affcc64565d8faf1f33b4994b4b1b73c74f1 | 1,470 | py | Python | src/test/test_imperfect_indicitive.py | shrutiichandra/spanish-conjugator | 2ebf41b92c14c3e47a873c52fdf4ce1d17bff5e0 | [
"MIT"
] | null | null | null | src/test/test_imperfect_indicitive.py | shrutiichandra/spanish-conjugator | 2ebf41b92c14c3e47a873c52fdf4ce1d17bff5e0 | [
"MIT"
] | null | null | null | src/test/test_imperfect_indicitive.py | shrutiichandra/spanish-conjugator | 2ebf41b92c14c3e47a873c52fdf4ce1d17bff5e0 | [
"MIT"
] | null | null | null | # -*- coding: iso-8859-15 -*-
import spanishconjugator
from spanishconjugator.SpanishConjugator import Conjugator
# ----------------------------------- Imperfect Indicative ----------------------------------- #
def test_imperfect_indicative_yo_ar():
expected = "hablaba"
assert Conjugator().conjugate('hablar',... | 39.72973 | 96 | 0.702041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 500 | 0.339905 |
d68824df1e94960138084688a7d3f88b19a19dff | 8,044 | py | Python | gradient_chaser.py | RobertOpitz/Gradient_Chaser | ca2011342d28798808769831655b74d9adfc6d26 | [
"MIT"
] | null | null | null | gradient_chaser.py | RobertOpitz/Gradient_Chaser | ca2011342d28798808769831655b74d9adfc6d26 | [
"MIT"
] | null | null | null | gradient_chaser.py | RobertOpitz/Gradient_Chaser | ca2011342d28798808769831655b74d9adfc6d26 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 17:37:31 2020
@author: robertopitz
"""
import numpy as np
from random import randrange
from math import isnan
import pygame as pg
def get_new_prey_pos(pos, board):
while True:
c = randrange(1,len(board)-1)
r = randrange(1,len... | 34.084746 | 80 | 0.441074 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,699 | 0.211213 |
d6885aadfed2400899af0bca8750fa5677a2b1f3 | 1,092 | py | Python | start.py | AlexeyProskuryakov/vknotifier | be58008dec0c967718fdbd70da615c1d4966d5b5 | [
"MIT"
] | null | null | null | start.py | AlexeyProskuryakov/vknotifier | be58008dec0c967718fdbd70da615c1d4966d5b5 | [
"MIT"
] | null | null | null | start.py | AlexeyProskuryakov/vknotifier | be58008dec0c967718fdbd70da615c1d4966d5b5 | [
"MIT"
] | null | null | null | # coding:utf-8
import ConfigParser
import sys
__author__ = '4ikist'
from core.engine import NotificatonIniter, TalkHandler, VKEventHandler
def load_config(prop_file):
cfg = ConfigParser.RawConfigParser()
cfg.read(prop_file)
api_name = dict(cfg.items('main'))['api_name']
api_credential... | 34.125 | 106 | 0.655678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.150183 |
d689694bd6143417bf16953605dd1dede7dec316 | 1,375 | py | Python | prior_config.py | ZENGXH/NPDRAW | 339d1d9b4880cce891cafe7c20198ef7c121a29e | [
"MIT"
] | 21 | 2021-06-28T18:29:28.000Z | 2022-03-13T09:12:07.000Z | prior_config.py | ZENGXH/NPDRAW | 339d1d9b4880cce891cafe7c20198ef7c121a29e | [
"MIT"
] | null | null | null | prior_config.py | ZENGXH/NPDRAW | 339d1d9b4880cce891cafe7c20198ef7c121a29e | [
"MIT"
] | 2 | 2021-07-05T02:29:32.000Z | 2021-11-02T08:25:14.000Z | from utils.yacs_config import CfgNode as CN
__C = CN()
cfg = __C
# cfg.canvas_init=0
cfg.use_vit=0
cfg.use_fast_vit=0
cfg.img_mean=-1
cfg.vit_mlp_dim=2048
cfg.vit_depth=8
cfg.vit_dropout=1
cfg.concat_one_hot=0
cfg.mask_out_prevloc_samples=0
#cfg.input_id_canvas=0
cfg.register_deprecated_key('input_id_canvas')
cfg.use_... | 22.177419 | 48 | 0.786909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.200727 |
d689def2b69b86b6725aa76fbe9f83cda3ccc692 | 1,769 | py | Python | 2021/09/main2.py | chirsz-ever/aoc | dbdc2e32fbef108752db87f3747ce5898a0775ce | [
"BSL-1.0"
] | null | null | null | 2021/09/main2.py | chirsz-ever/aoc | dbdc2e32fbef108752db87f3747ce5898a0775ce | [
"BSL-1.0"
] | null | null | null | 2021/09/main2.py | chirsz-ever/aoc | dbdc2e32fbef108752db87f3747ce5898a0775ce | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/env python3
import sys
from itertools import repeat, product
from operator import mul
from functools import reduce
inputFile = 'input'
if len(sys.argv) >= 2:
inputFile = sys.argv[1]
heightmap : list[list[int]] = []
with open(inputFile) as fin:
for line in fin:
heightmap.append([int(c) for ... | 26.80303 | 64 | 0.569248 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.048615 |
d689f1e24c703d9de5c7460fe0778d147ec02403 | 974 | py | Python | tpDcc/libs/qt/core/traymessage.py | tpDcc/tpQtLib | 26b6e893395633a1b189a1b73654891b7688648d | [
"MIT"
] | 3 | 2019-08-26T05:56:12.000Z | 2019-10-03T11:35:53.000Z | tpDcc/libs/qt/core/traymessage.py | tpDcc/tpQtLib | 26b6e893395633a1b189a1b73654891b7688648d | [
"MIT"
] | null | null | null | tpDcc/libs/qt/core/traymessage.py | tpDcc/tpQtLib | 26b6e893395633a1b189a1b73654891b7688648d | [
"MIT"
] | 1 | 2021-03-03T21:01:50.000Z | 2021-03-03T21:01:50.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains custom tray balloon
"""
from __future__ import print_function, division, absolute_import
from Qt.QtWidgets import QWidget, QSystemTrayIcon, QMenu
class TrayMessage(QWidget, object):
def __init__(self, parent=None):
super(TrayMessa... | 27.055556 | 68 | 0.677618 | 750 | 0.770021 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.174538 |