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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7e543a1539edd2bc645863389913b22de09fceee | 722 | py | Python | ro_py/economy.py | jmkd3v/ro.py | 7c50267ccc1eed333e73c5cfb0740aec00a62989 | [
"MIT"
] | null | null | null | ro_py/economy.py | jmkd3v/ro.py | 7c50267ccc1eed333e73c5cfb0740aec00a62989 | [
"MIT"
] | null | null | null | ro_py/economy.py | jmkd3v/ro.py | 7c50267ccc1eed333e73c5cfb0740aec00a62989 | [
"MIT"
] | null | null | null | """
This file houses functions and classes that pertain to the Roblox economy endpoints.
"""
from ro_py.utilities.url import url
endpoint = url("economy")
class Currency:
"""
Represents currency data.
"""
def __init__(self, currency_data):
self.robux = currency_data["robux"]
class Limited... | 24.896552 | 84 | 0.686981 | 558 | 0.772853 | 0 | 0 | 0 | 0 | 0 | 0 | 283 | 0.391967 |
7e550a8084b1674ea1aeeea565a6759f3741fb88 | 1,557 | py | Python | ask/qa/forms.py | kzn-bulat-s/abracadabra | 25d582a3d6fc6587772776479ef2f1d284fbe0e9 | [
"Unlicense"
] | null | null | null | ask/qa/forms.py | kzn-bulat-s/abracadabra | 25d582a3d6fc6587772776479ef2f1d284fbe0e9 | [
"Unlicense"
] | null | null | null | ask/qa/forms.py | kzn-bulat-s/abracadabra | 25d582a3d6fc6587772776479ef2f1d284fbe0e9 | [
"Unlicense"
] | null | null | null | from django import forms
from django.contrib.auth.models import User
from models import Question, Answer
class AskForm(forms.ModelForm):
class Meta:
model = Question
fields = ['title', 'text']
def save(self, commit=True):
question = super(AskForm, self).save(commit=False)
que... | 27.803571 | 67 | 0.594091 | 1,445 | 0.928067 | 0 | 0 | 0 | 0 | 0 | 0 | 139 | 0.089274 |
7e555fdeeb4c2079106c242cdd66f9f9ada341c5 | 7,720 | py | Python | tests/pow_tests.py | pythononwheels/coronadash | 876258d00f5b8bcccd4746713a15b3de54534fcf | [
"MIT"
] | null | null | null | tests/pow_tests.py | pythononwheels/coronadash | 876258d00f5b8bcccd4746713a15b3de54534fcf | [
"MIT"
] | null | null | null | tests/pow_tests.py | pythononwheels/coronadash | 876258d00f5b8bcccd4746713a15b3de54534fcf | [
"MIT"
] | null | null | null | #
# Pow Default Tests
#
#
# runtest script.
# runs test with respect to some paramters
# currently only os
import sys
import pytest
# possible sys.platform results:
# http://stackoverflow.com/questions/446209/possible-values-from-sys-platform
MODELNAME = "pow_test_model"
class TestClass:
@pytest.mark.notonosx
... | 34.159292 | 133 | 0.613731 | 7,087 | 0.918005 | 0 | 0 | 6,921 | 0.896503 | 0 | 0 | 2,530 | 0.32772 |
7e557776390bf717690c0ffe3d5af9bb9e5270df | 282 | py | Python | codility/python/fib.py | guvkon/aoc-2021 | 15c8d387f5bf218790d461d32dd948d6c667be6c | [
"MIT"
] | null | null | null | codility/python/fib.py | guvkon/aoc-2021 | 15c8d387f5bf218790d461d32dd948d6c667be6c | [
"MIT"
] | null | null | null | codility/python/fib.py | guvkon/aoc-2021 | 15c8d387f5bf218790d461d32dd948d6c667be6c | [
"MIT"
] | null | null | null | import math
def fib(n):
fib = [0] * (n + 1)
fib[1] = 1
for i in range(2, n + 1):
fib[i] = fib[i - 1] + fib[i - 2]
return fib[n]
def fib_formula(n):
return int((math.pow((1 + math.sqrt(5)) / 2, n) - math.pow((1 - math.sqrt(5)) / 2, n)) / math.sqrt(5))
| 21.692308 | 106 | 0.485816 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7e55c6c8ebd4a1c5ef44590495d1ea5a8940d7d2 | 1,886 | py | Python | src/pengbot/adapters/facebook/adapter.py | mariocesar/pengbot | 070854f92ac1314ee56f7f6cb9d27430b8f0fda8 | [
"MIT"
] | 1 | 2020-09-21T13:52:04.000Z | 2020-09-21T13:52:04.000Z | src/pengbot/adapters/facebook/adapter.py | mariocesar/pengbot | 070854f92ac1314ee56f7f6cb9d27430b8f0fda8 | [
"MIT"
] | null | null | null | src/pengbot/adapters/facebook/adapter.py | mariocesar/pengbot | 070854f92ac1314ee56f7f6cb9d27430b8f0fda8 | [
"MIT"
] | null | null | null | import json
from pengbot.utils import isbound
from .api import Facebook
from ..web import WebAdapter
class Adapter(WebAdapter):
_fbapi = None
@property
def fbapi(self):
if not self._fbapi:
self._fbapi = Facebook(self)
return self._fbapi
@WebAdapter.route('GET', r'/')
... | 31.966102 | 89 | 0.577943 | 1,780 | 0.943796 | 0 | 0 | 1,498 | 0.794274 | 0 | 0 | 426 | 0.225875 |
7e568b8ddcdfbfe7732b973a52875cd69daa8414 | 4,517 | py | Python | tests/test_policy_loading.py | alancinacio/advanced-security-compliance | 5b8c6951db2c895033d816274abc389f1413cddd | [
"MIT"
] | 83 | 2021-06-01T10:11:15.000Z | 2022-03-15T00:38:42.000Z | tests/test_policy_loading.py | alancinacio/advanced-security-compliance | 5b8c6951db2c895033d816274abc389f1413cddd | [
"MIT"
] | 30 | 2021-06-07T10:18:22.000Z | 2022-03-15T10:51:19.000Z | tests/test_policy_loading.py | alancinacio/advanced-security-compliance | 5b8c6951db2c895033d816274abc389f1413cddd | [
"MIT"
] | 15 | 2021-06-09T17:22:33.000Z | 2022-02-21T00:41:04.000Z | import os
import sys
import yaml
import uuid
import unittest
import tempfile
sys.path.append(".")
from ghascompliance.policy import Policy
class TestPolicyLoading(unittest.TestCase):
def setUp(self):
self.policy_file = self.genTempFile()
return super().setUp()
def tearDown(self):
# ... | 30.938356 | 88 | 0.587337 | 4,370 | 0.967456 | 0 | 0 | 0 | 0 | 0 | 0 | 1,123 | 0.248616 |
7e56afeffeb1143dfa4e1a4ffb0c6566c1c6fcad | 1,762 | py | Python | python/se3last-w3c/conftest.py | saucelabs-training/platform-config-tests | 11dfab8f9be2fe118ed0b0fa4adebb75a5f1a64c | [
"MIT"
] | 1 | 2021-11-17T22:29:42.000Z | 2021-11-17T22:29:42.000Z | python/se3last-w3c/conftest.py | saucelabs-training/platform-config-tests | 11dfab8f9be2fe118ed0b0fa4adebb75a5f1a64c | [
"MIT"
] | null | null | null | python/se3last-w3c/conftest.py | saucelabs-training/platform-config-tests | 11dfab8f9be2fe118ed0b0fa4adebb75a5f1a64c | [
"MIT"
] | 1 | 2021-11-17T22:29:35.000Z | 2021-11-17T22:29:35.000Z | import os
import sys
import time
import pytest
from appium import webdriver as appiumdriver
from selenium import webdriver
class Helpers:
@staticmethod
def validate_google(driver):
driver.get("http://google.com")
time.sleep(1)
result = 'passed' if driver.title == 'Google' else 'faile... | 33.245283 | 106 | 0.682179 | 1,583 | 0.898411 | 0 | 0 | 1,595 | 0.905221 | 0 | 0 | 432 | 0.245176 |
7e5889544c1792c28e15ce9c96d0ef027587112c | 1,242 | py | Python | PharmacoDI/write_pset_table.py | bhklab/PharmacoDI | a681b2549765190fd646971de9d99a4233cd1cac | [
"MIT"
] | null | null | null | PharmacoDI/write_pset_table.py | bhklab/PharmacoDI | a681b2549765190fd646971de9d99a4233cd1cac | [
"MIT"
] | 7 | 2021-08-05T15:37:11.000Z | 2021-10-15T15:51:44.000Z | PharmacoDI/write_pset_table.py | bhklab/PharmacoDI | a681b2549765190fd646971de9d99a4233cd1cac | [
"MIT"
] | null | null | null | import os
from datatable import dt, as_type
# -- Enable logging
from loguru import logger
import sys
logger_config = {
"handlers": [
{"sink": sys.stdout, "colorize": True, "format":
"<green>{time}</green> <level>{message}</level>"},
{"sink": f"logs/write_pset_tables.log",
"... | 31.05 | 83 | 0.651369 | 0 | 0 | 0 | 0 | 760 | 0.611916 | 0 | 0 | 682 | 0.549114 |
7e595646df56fa1ccc0f7430fce5f92524bd68a3 | 1,092 | py | Python | timemachines/skaters/orbt/orbitlgtskaterfactory.py | iklasky/timemachines | 1820fa9453d31d4daaeff75274a935c7455febe3 | [
"MIT"
] | 253 | 2021-01-08T17:33:30.000Z | 2022-03-21T17:32:36.000Z | timemachines/skaters/orbt/orbitlgtskaterfactory.py | iklasky/timemachines | 1820fa9453d31d4daaeff75274a935c7455febe3 | [
"MIT"
] | 65 | 2021-01-20T16:43:35.000Z | 2022-03-30T19:07:22.000Z | timemachines/skaters/orbt/orbitlgtskaterfactory.py | iklasky/timemachines | 1820fa9453d31d4daaeff75274a935c7455febe3 | [
"MIT"
] | 28 | 2021-02-04T14:58:30.000Z | 2022-01-17T04:35:17.000Z |
from timemachines.skaters.orbt.orbitinclusion import using_orbit
if using_orbit:
from timemachines.skaters.orbt.orbitwrappers import orbit_lgt_iskater
from timemachines.skatertools.utilities.conventions import Y_TYPE, A_TYPE, R_TYPE, E_TYPE, T_TYPE
from timemachines.skatertools.batch.batchskater import ba... | 45.5 | 126 | 0.638278 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.011905 |
7e597dddf299d58b91fda18f58fa608899357fa1 | 530 | py | Python | script/en_glue/preprocess/qnli.py | kunde122/ERNIE1 | 050327e968b2d7d9090ab882a5dd6b0fdeca80b4 | [
"Apache-2.0"
] | 1 | 2020-10-19T09:41:11.000Z | 2020-10-19T09:41:11.000Z | script/en_glue/preprocess/qnli.py | kunde122/ERNIE1 | 050327e968b2d7d9090ab882a5dd6b0fdeca80b4 | [
"Apache-2.0"
] | 1 | 2019-08-24T02:36:37.000Z | 2019-08-24T02:36:37.000Z | script/en_glue/preprocess/qnli.py | kunde122/ERNIE1 | 050327e968b2d7d9090ab882a5dd6b0fdeca80b4 | [
"Apache-2.0"
] | 1 | 2019-10-19T05:29:08.000Z | 2019-10-19T05:29:08.000Z | import sys
mapping = {'entailment': 1, 'not_entailment': 0}
i = 0
for line in sys.stdin:
arr = line.strip().split('\t')
s1 = arr[1]
s2 = arr[2]
if len(arr) == 4:
if i == 0:
i += 1
print('text_a\ttext_b\tlabel')
continue
s3 = arr[3]
print("{}\... | 23.043478 | 55 | 0.450943 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.209434 |
7e5a4b7a911240a4176bf8ae58a08ef0931285dc | 62 | py | Python | gsee/__init__.py | scene-connect/gsee | f5515fb2a20af9278e7ca11312388717760a8225 | [
"BSD-3-Clause"
] | null | null | null | gsee/__init__.py | scene-connect/gsee | f5515fb2a20af9278e7ca11312388717760a8225 | [
"BSD-3-Clause"
] | 5 | 2022-03-11T10:52:24.000Z | 2022-03-11T14:09:09.000Z | gsee/__init__.py | scene-connect/gsee | f5515fb2a20af9278e7ca11312388717760a8225 | [
"BSD-3-Clause"
] | null | null | null | __all__ = ["brl_model", "pv"]
from gsee import brl_model, pv
| 15.5 | 30 | 0.693548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.241935 |
7e5c4ac6eeaa4f1f47b3333663069355e76954d0 | 1,366 | py | Python | src/data_standardization/tests/test_boston_volume.py | nsteins/crash-model | 521a63e48a561298e694432d74caa3c385f913b6 | [
"MIT"
] | 54 | 2018-06-21T18:48:34.000Z | 2020-04-15T23:07:20.000Z | src/data_standardization/tests/test_boston_volume.py | nsteins/crash-model | 521a63e48a561298e694432d74caa3c385f913b6 | [
"MIT"
] | 172 | 2018-06-14T17:33:41.000Z | 2020-06-15T16:45:15.000Z | src/data_standardization/tests/test_boston_volume.py | nsteins/crash-model | 521a63e48a561298e694432d74caa3c385f913b6 | [
"MIT"
] | 25 | 2017-02-13T21:45:07.000Z | 2018-06-13T19:41:38.000Z | from ..boston_volume import BostonVolumeParser
import os
def test_is_readable_ATR():
parser = BostonVolumeParser(os.path.abspath(__file__))
bad = '7147_NA_NA_53_CLAPP-ST_DORCHESTER_24-HOURS_SPEED_02-25-2013.XLS'
assert not parser.is_readable_ATR(bad)
bad = '8652_NA_NA_0_SOUTHWEST-CORRIDOR_ROXBURY_4... | 26.784314 | 79 | 0.649341 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 454 | 0.332357 |
7e5d011b9be09b3a31687a7c84c1f20f5a3b8ceb | 3,626 | py | Python | custom_components/luxtronik/binary_sensor.py | WhistleMaster/luxtronik | b479257100def0bb6b668b5ae3e63ccd8ed60995 | [
"MIT"
] | 37 | 2018-11-01T20:30:55.000Z | 2022-03-25T20:57:29.000Z | custom_components/luxtronik/binary_sensor.py | WhistleMaster/luxtronik | b479257100def0bb6b668b5ae3e63ccd8ed60995 | [
"MIT"
] | 41 | 2019-04-08T07:32:35.000Z | 2022-03-28T18:32:55.000Z | custom_components/luxtronik/binary_sensor.py | WhistleMaster/luxtronik | b479257100def0bb6b668b5ae3e63ccd8ed60995 | [
"MIT"
] | 17 | 2019-04-03T09:02:13.000Z | 2022-03-04T19:51:10.000Z | """Support for Luxtronik heatpump binary states."""
import logging
import voluptuous as vol
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity
from homeassistant.const import CONF_FRIENDLY_NAME, CONF_ICON, CONF_ID, CONF_SENSORS
import homeassistant.helpers.config_validation as cv
f... | 29.241935 | 88 | 0.606178 | 1,366 | 0.376724 | 0 | 0 | 804 | 0.221732 | 0 | 0 | 527 | 0.145339 |
7e5e2458db8b5363508f982ca60fdfa04db827b4 | 1,298 | py | Python | Algorithms_easy/1065. Index Pairs of a String.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | 4 | 2020-08-11T20:45:15.000Z | 2021-03-12T00:33:34.000Z | Algorithms_easy/1065. Index Pairs of a String.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | Algorithms_easy/1065. Index Pairs of a String.py | VinceW0/Leetcode_Python_solutions | 09e9720afce21632372431606ebec4129eb79734 | [
"Xnet",
"X11"
] | null | null | null | """
1065. Index Pairs of a String
Easy
Given a text string and words (a list of strings), return all index pairs [i, j] so that the substring text[i]...text[j] is in the list of words.
Example 1:
Input: text = "thestoryofleetcodeandme", words = ["story","fleet","leetcode"]
Output: [[3,7],[9,13],[10,17]]
Example 2:
... | 30.904762 | 145 | 0.575501 | 476 | 0.366718 | 0 | 0 | 0 | 0 | 0 | 0 | 819 | 0.630971 |
7e602fe1c74aa3fb84a2c81524ea7c737c67eb63 | 233 | py | Python | setup.py | jsdnlb/Tangelo-challenge | 4cd83f5dcd5b870f2dba6a7f08d35fe1f60709ce | [
"MIT"
] | null | null | null | setup.py | jsdnlb/Tangelo-challenge | 4cd83f5dcd5b870f2dba6a7f08d35fe1f60709ce | [
"MIT"
] | 3 | 2022-02-11T00:32:38.000Z | 2022-02-11T14:29:33.000Z | setup.py | jsdnlb/tangelo-challenge | 4cd83f5dcd5b870f2dba6a7f08d35fe1f60709ce | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
# Building and Distributing Packages with Setuptools
# Documentation here: https://setuptools.pypa.io/en/latest/setuptools.html
setup(name='app', version='1.0', packages=find_packages())
| 33.285714 | 74 | 0.793991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 136 | 0.583691 |
7e61331f1d48012031893d41bd0fba4b33926051 | 804 | py | Python | sponsors/migrations/0038_auto_20210827_1223.py | Manny27nyc/pythondotorg | 257c96d3a94755451a5a5cdcd2abad1e27ea299b | [
"Apache-2.0"
] | 911 | 2015-01-03T22:16:06.000Z | 2022-03-31T23:56:22.000Z | sponsors/migrations/0038_auto_20210827_1223.py | Manny27nyc/pythondotorg | 257c96d3a94755451a5a5cdcd2abad1e27ea299b | [
"Apache-2.0"
] | 1,342 | 2015-01-02T16:14:45.000Z | 2022-03-28T08:01:20.000Z | sponsors/migrations/0038_auto_20210827_1223.py | Manny27nyc/pythondotorg | 257c96d3a94755451a5a5cdcd2abad1e27ea299b | [
"Apache-2.0"
] | 551 | 2015-01-04T02:17:31.000Z | 2022-03-23T11:59:25.000Z | # Generated by Django 2.0.13 on 2021-08-27 12:23
from django.db import migrations
def populate_sponsorship_package_fk(apps, schema_editor):
Sponsorship = apps.get_model('sponsors.Sponsorship')
SponsorshipPackage = apps.get_model('sponsors.SponsorshipPackage')
for sponsorship in Sponsorship.objects.all()... | 28.714286 | 88 | 0.70398 | 231 | 0.287313 | 0 | 0 | 0 | 0 | 0 | 0 | 135 | 0.16791 |
7e63755a2eb8725059fe0af8726fe1baae17c773 | 6,020 | py | Python | fugue_sql/workflow.py | LaurentErreca/fugue | 73d551b4d25b50b3d9051dd765e6111db2e3fc76 | [
"Apache-2.0"
] | null | null | null | fugue_sql/workflow.py | LaurentErreca/fugue | 73d551b4d25b50b3d9051dd765e6111db2e3fc76 | [
"Apache-2.0"
] | null | null | null | fugue_sql/workflow.py | LaurentErreca/fugue | 73d551b4d25b50b3d9051dd765e6111db2e3fc76 | [
"Apache-2.0"
] | null | null | null | from builtins import isinstance
from typing import Any, Dict, Tuple
from fugue import (
DataFrame,
FugueWorkflow,
WorkflowDataFrame,
WorkflowDataFrames,
Yielded,
)
from fugue.constants import FUGUE_CONF_SQL_IGNORE_CASE
from fugue.workflow import is_acceptable_raw_df
from fugue_sql._parse import Fug... | 31.851852 | 88 | 0.595349 | 2,203 | 0.365947 | 0 | 0 | 95 | 0.015781 | 0 | 0 | 2,917 | 0.484551 |
7e6449d6fe77effb19a71805ede2cc6094e439b0 | 347 | py | Python | project/WeiboTest/SpiderMain.py | zhengbomo/python_practice | 1bc5c4ff426f806639bbc01249e66747271ec398 | [
"MIT"
] | 2 | 2016-10-03T10:20:02.000Z | 2018-03-20T00:38:53.000Z | project/WeiboTest/SpiderMain.py | zhengbomo/python_practice | 1bc5c4ff426f806639bbc01249e66747271ec398 | [
"MIT"
] | 2 | 2019-10-08T07:13:44.000Z | 2019-10-08T07:13:46.000Z | project/WeiboTest/SpiderMain.py | zhengbomo/python_practice | 1bc5c4ff426f806639bbc01249e66747271ec398 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding:utf-8 -*-
from Spider import Spider
# 入口
spider = Spider()
fans = spider.get_my_fans()
for fan in fans:
spider.user_crawl(fan.user_id)
spider.status_crawl(fan.user_id)
followers = spider.get_my_follower()
for follower in followers:
spider.user_crawl(fan.user_id)
spider... | 19.277778 | 36 | 0.723343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.133903 |
7e66f22b59e0aa979c2af71f6719b6b98bfbe64a | 842 | py | Python | setup.py | konstanzer/insilico | a3b1f8352e0f2eeeb41ee94dc106e4fb02c8abf3 | [
"MIT"
] | 1 | 2021-11-22T16:25:17.000Z | 2021-11-22T16:25:17.000Z | setup.py | konstanzer/insilico | a3b1f8352e0f2eeeb41ee94dc106e4fb02c8abf3 | [
"MIT"
] | null | null | null | setup.py | konstanzer/insilico | a3b1f8352e0f2eeeb41ee94dc106e4fb02c8abf3 | [
"MIT"
] | null | null | null | from setuptools import setup
long_description = open("README.md").read()
setup(
name='insilico',
version='0.1.2',
description='A Python package to process & model ChEMBL data.',
long_description_content_type="text/markdown",
long_description=long_description,
classifiers=[
'License :: ... | 30.071429 | 67 | 0.648456 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 394 | 0.467933 |
7e67680b7ff285c7a73a411e68537d03ddc32e2e | 1,190 | py | Python | home/board/migrations/0004_add_closed_at.py | he0119/smart-home | bdd3a59a8c46c0fdc07ac3049bf589c7f95a2683 | [
"MIT"
] | null | null | null | home/board/migrations/0004_add_closed_at.py | he0119/smart-home | bdd3a59a8c46c0fdc07ac3049bf589c7f95a2683 | [
"MIT"
] | 223 | 2020-02-21T06:16:56.000Z | 2022-03-01T22:24:19.000Z | home/board/migrations/0004_add_closed_at.py | he0119/smart-home | bdd3a59a8c46c0fdc07ac3049bf589c7f95a2683 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-25 02:53
from django.db import migrations, models
def set_edited_at(apps, schema_editor):
"""修改话题的时间
将关闭话题的修改时间设置成创建时间
将其关闭时间设置成其修改时间
将置顶话题的修改时间设置成创建时间
"""
Topic = apps.get_model("board", "Topic")
for topic in Topic.objects.all():
if not top... | 24.791667 | 83 | 0.610924 | 580 | 0.436747 | 0 | 0 | 0 | 0 | 0 | 0 | 367 | 0.276355 |
7e6813b29c6eccafd45b8c9a108f2365b9ee6257 | 17,737 | py | Python | week_5/Service.py | aaaaaaaalesha/oop-and-design-patterns | 1076002e0066b334ed7c82b47985b7fcdcf6264f | [
"MIT"
] | null | null | null | week_5/Service.py | aaaaaaaalesha/oop-and-design-patterns | 1076002e0066b334ed7c82b47985b7fcdcf6264f | [
"MIT"
] | null | null | null | week_5/Service.py | aaaaaaaalesha/oop-and-design-patterns | 1076002e0066b334ed7c82b47985b7fcdcf6264f | [
"MIT"
] | null | null | null | import pygame
import random
import yaml
import os
import Objects
OBJECT_TEXTURE = os.path.join("texture", "objects")
ENEMY_TEXTURE = os.path.join("texture", "enemies")
ALLY_TEXTURE = os.path.join("texture", "ally")
def create_sprite(img, sprite_size, mmp_tile):
icon = pygame.image.load(img).convert_a... | 38.062232 | 108 | 0.462649 | 11,734 | 0.661555 | 0 | 0 | 1,585 | 0.089361 | 0 | 0 | 2,124 | 0.11975 |
7e6ac35a244c03c07d3dc37ad1b2d76ac2c72006 | 3,451 | py | Python | test/test_search.py | tomkralidis/sat-search | 48f00dc4ad8c317a131ca70b05ac4ab5d3fcdb4c | [
"MIT"
] | null | null | null | test/test_search.py | tomkralidis/sat-search | 48f00dc4ad8c317a131ca70b05ac4ab5d3fcdb4c | [
"MIT"
] | null | null | null | test/test_search.py | tomkralidis/sat-search | 48f00dc4ad8c317a131ca70b05ac4ab5d3fcdb4c | [
"MIT"
] | null | null | null | import os
import glob
import json
import unittest
import satsearch.config as config
from satstac import Item
from satsearch.search import SatSearchError, Search
class Test(unittest.TestCase):
path = os.path.dirname(__file__)
results = []
@classmethod
def setUpClass(cls):
fnames = glob.glob... | 34.858586 | 103 | 0.606201 | 3,285 | 0.951898 | 0 | 0 | 217 | 0.06288 | 0 | 0 | 680 | 0.197044 |
7e6ca5f5a32c06e55254d834d4ec7b22d2307f05 | 8,468 | py | Python | src/lck/django/common/forms.py | ar4s/kitdjango | 1da443296ac780ae002b66452df2251642374a13 | [
"MIT"
] | 10 | 2015-06-17T08:22:10.000Z | 2020-12-10T13:48:37.000Z | src/lck/django/common/forms.py | ar4s/kitdjango | 1da443296ac780ae002b66452df2251642374a13 | [
"MIT"
] | null | null | null | src/lck/django/common/forms.py | ar4s/kitdjango | 1da443296ac780ae002b66452df2251642374a13 | [
"MIT"
] | 8 | 2015-03-23T10:59:22.000Z | 2022-01-17T09:49:26.000Z | """
Albeit useful, this module is still somewhat a mess in a really early state of development. Beware, there be dragons.
"""
import datetime
import os
import re
from subprocess import check_call, CalledProcessError
from tempfile import NamedTemporaryFile
try:
from cStringIO import StringIO
except ImportError:
... | 35.430962 | 117 | 0.590694 | 7,626 | 0.900567 | 362 | 0.042749 | 63 | 0.00744 | 0 | 0 | 1,164 | 0.137459 |
7e6ce7954f14f677ee1fb45483daa4344da6bdb8 | 2,502 | py | Python | utils/model_utils.py | Pandinosaurus/PerceptualImageError | 0513613d1f575136ea52418e35f2cebc5a49f783 | [
"BSD-2-Clause"
] | null | null | null | utils/model_utils.py | Pandinosaurus/PerceptualImageError | 0513613d1f575136ea52418e35f2cebc5a49f783 | [
"BSD-2-Clause"
] | null | null | null | utils/model_utils.py | Pandinosaurus/PerceptualImageError | 0513613d1f575136ea52418e35f2cebc5a49f783 | [
"BSD-2-Clause"
] | null | null | null | import tensorflow as tf
def extract_image_patches(image_batch, patch_size,patch_stride):
patches = tf.extract_image_patches(images =image_batch,ksizes=[1,patch_size,patch_size,1],rates=[1,1,1,1],strides=[1,patch_stride,patch_stride,1],padding='VALID')
patches_shape = patches.get_shape().as_list()
return tf.reshap... | 42.40678 | 163 | 0.735412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 151 | 0.060352 |
7e6cf6505ad3c6585ee75f9c82d03c7ef24336fd | 7,302 | py | Python | kubelet/datadog_checks/kubelet/summary.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | kubelet/datadog_checks/kubelet/summary.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | kubelet/datadog_checks/kubelet/summary.py | tcpatterson/integrations-core | 3692601de09f8db60f42612b0d623509415bbb53 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
from __future__ import division
from fnmatch import fnmatch
from datadog_checks.base.utils.tagging import tagger
from .common import replace_container_rt_prefix, tags_for_docker, tags_for_pod
class SummaryS... | 47.109677 | 120 | 0.613667 | 6,995 | 0.957957 | 0 | 0 | 0 | 0 | 0 | 0 | 2,018 | 0.276363 |
7e6efd55ee5bacdaf7a9ad2f734f50df6af5bd9a | 2,027 | py | Python | Search_result/srr9.py | tanayz/Kaggle | 0dabcf5ccc2432cecd12f91fba9dfda64dc1afdd | [
"Apache-2.0"
] | null | null | null | Search_result/srr9.py | tanayz/Kaggle | 0dabcf5ccc2432cecd12f91fba9dfda64dc1afdd | [
"Apache-2.0"
] | null | null | null | Search_result/srr9.py | tanayz/Kaggle | 0dabcf5ccc2432cecd12f91fba9dfda64dc1afdd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Jul 5 06:34:04 2015
@author: tanay
"""
from lasagne.layers import InputLayer, DropoutLayer, DenseLayer
from lasagne.updates import nesterov_momentum
from lasagne.objectives import binary_crossentropy
from nolearn.lasagne import NeuralNet
import theano
from theano import tens... | 25.658228 | 66 | 0.730143 | 387 | 0.190923 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.166256 |
7e706c63ed781d4a98c0e2432ffb583ee2d4d55c | 1,795 | py | Python | typarser/_base_optarg.py | ermishechkin/typarser | 00d965f87718c837a2c246f0b5c61401e8a6e3c8 | [
"MIT"
] | null | null | null | typarser/_base_optarg.py | ermishechkin/typarser | 00d965f87718c837a2c246f0b5c61401e8a6e3c8 | [
"MIT"
] | null | null | null | typarser/_base_optarg.py | ermishechkin/typarser | 00d965f87718c837a2c246f0b5c61401e8a6e3c8 | [
"MIT"
] | null | null | null | from __future__ import annotations
import typing
from typing import Callable, Generic, Iterable, Literal, Optional, Tuple, Union
from ._base import RESULT, TYPE, BaseComponent
from ._internal_namespace import set_value
if typing.TYPE_CHECKING:
from ._base import Namespace
from .action import Action
NARGS... | 29.42623 | 79 | 0.622284 | 1,416 | 0.788858 | 0 | 0 | 521 | 0.290251 | 0 | 0 | 79 | 0.044011 |
7e706e01366d67075b4a31f867ccfdf06dd51be5 | 766 | py | Python | docs/tutorial/local.py | prodigyfinance/ml2p | a6df55e9ce81e68619fd2f2891981a39a9186651 | [
"0BSD"
] | 3 | 2021-10-11T05:35:45.000Z | 2022-02-21T09:54:16.000Z | docs/tutorial/local.py | hodgestar/ml2p | 3f82e7fbf79345cead67ee18de88589a1ae82b97 | [
"0BSD"
] | 7 | 2020-09-16T13:55:16.000Z | 2021-06-11T08:38:03.000Z | docs/tutorial/local.py | hodgestar/ml2p | 3f82e7fbf79345cead67ee18de88589a1ae82b97 | [
"0BSD"
] | 3 | 2020-09-15T14:38:25.000Z | 2020-09-17T20:35:35.000Z | # -*- coding: utf-8 -*-
""" Train the Boston house prices model on your local machine.
"""
import pandas as pd
from ml2p.core import LocalEnv
import model
def train(env):
""" Train and save the model locally. """
trainer = model.BostonModel().trainer(env)
trainer.train()
def predict(env):
""" Load... | 21.885714 | 62 | 0.644909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.349869 |
7e713a438f11abe5a5a8f398bae01323ba662ddc | 457 | py | Python | examples/decorator_args.py | gwilkes/botpie | 53d0313beb3f5710cab71ab30dc8a33831e8e6a4 | [
"MIT"
] | null | null | null | examples/decorator_args.py | gwilkes/botpie | 53d0313beb3f5710cab71ab30dc8a33831e8e6a4 | [
"MIT"
] | null | null | null | examples/decorator_args.py | gwilkes/botpie | 53d0313beb3f5710cab71ab30dc8a33831e8e6a4 | [
"MIT"
] | null | null | null | import botpie
import random
message = botpie.utils.argvstr()
bot = botpie.Bot("InfoBot")
@bot.command("sens")
@bot.argument("game", default="ow", nargs="?", help="pick a game")
def sens(game):
gamesens = {
"ow": "2.1",
"cod": "3",
"d2": "4"
}
sens = gamesens.get(game)... | 20.772727 | 67 | 0.562363 | 0 | 0 | 0 | 0 | 291 | 0.636761 | 0 | 0 | 102 | 0.223195 |
7e71b09e8c3b6c84f5eb91628da2d2611269feb8 | 3,242 | py | Python | src/PyMud/model/account.py | NichCritic/pymud | 583ec16f5a75dc7b45146564b39851291dc07b6c | [
"MIT"
] | null | null | null | src/PyMud/model/account.py | NichCritic/pymud | 583ec16f5a75dc7b45146564b39851291dc07b6c | [
"MIT"
] | null | null | null | src/PyMud/model/account.py | NichCritic/pymud | 583ec16f5a75dc7b45146564b39851291dc07b6c | [
"MIT"
] | null | null | null | '''
Created on Nov 27, 2011
@author: Nich
'''
import uuid
from model.base import Base
from sqlalchemy import Column, String, ForeignKey
from sqlalchemy.orm import relationship
class Account(Base):
__tablename__ = "account"
id = Column(String, primary_key=True)
first_name = Column(String)
last_... | 28.438596 | 114 | 0.623381 | 3,014 | 0.929673 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.058297 |
7e72844189e895886424dc16300b05e203165f43 | 46 | py | Python | elevadorJahNoUltimoAndarException.py | IpRocha1/dsoo_exercicio_6 | 69ece39b2189b3a17a9185dca8a6d17acb6b5aa5 | [
"MIT"
] | null | null | null | elevadorJahNoUltimoAndarException.py | IpRocha1/dsoo_exercicio_6 | 69ece39b2189b3a17a9185dca8a6d17acb6b5aa5 | [
"MIT"
] | null | null | null | elevadorJahNoUltimoAndarException.py | IpRocha1/dsoo_exercicio_6 | 69ece39b2189b3a17a9185dca8a6d17acb6b5aa5 | [
"MIT"
] | null | null | null | class ElevadorJahNoUltimoAndarException( ...
| 15.333333 | 44 | 0.826087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7e72b5817d31b0de3104c24886db921a7779c4b5 | 630 | py | Python | pysatModels/models/__init__.py | pysat/pysatModelUtils | e563c36531632cd68b4e15d2ac6099fa3cb45aef | [
"BSD-3-Clause"
] | null | null | null | pysatModels/models/__init__.py | pysat/pysatModelUtils | e563c36531632cd68b4e15d2ac6099fa3cb45aef | [
"BSD-3-Clause"
] | 17 | 2019-09-18T18:19:00.000Z | 2020-01-30T18:41:59.000Z | pysatModels/models/__init__.py | pysat/pysatModelUtils | e563c36531632cd68b4e15d2ac6099fa3cb45aef | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2022, pysat development team
# Full license can be found in License.md
# -----------------------------------------------------------------------------
"""Routines for loading model data into a pysat Instrument object."""
# Import key modules and skip F401 t... | 42 | 79 | 0.663492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 422 | 0.669841 |
7e72e12b97f96d60c1b664e0376ea773f0bdcd6f | 2,918 | py | Python | backend/accounts/serializers.py | hvitis/geodjango-rest-vue-boilerplate | bd825fdfc81430ecfac3fe7d3c06a6e1145de1cd | [
"MIT"
] | 5 | 2020-11-23T11:31:40.000Z | 2022-03-11T01:24:46.000Z | backend/accounts/serializers.py | hvitis/geodjango-rest-vue-boilerplate | bd825fdfc81430ecfac3fe7d3c06a6e1145de1cd | [
"MIT"
] | null | null | null | backend/accounts/serializers.py | hvitis/geodjango-rest-vue-boilerplate | bd825fdfc81430ecfac3fe7d3c06a6e1145de1cd | [
"MIT"
] | null | null | null | from rest_framework_gis.serializers import GeoFeatureModelSerializer, GeometrySerializerMethodField
from django.contrib.gis.geos import Point
from accounts.models import UserProfile
import datetime
from rest_framework_gis.pagination import GeoJsonPagination
from django.contrib.auth import get_user_model
from django.ut... | 30.715789 | 99 | 0.664839 | 2,324 | 0.796436 | 0 | 0 | 0 | 0 | 0 | 0 | 403 | 0.138108 |
7e7440fb1d1c7e95290bfc94cc2ad2a4debb8384 | 734 | py | Python | main.py | henryfox/encrypted-chat | c69ba786892dd870cb3fddd7da6ea77eadeb4a7e | [
"MIT"
] | null | null | null | main.py | henryfox/encrypted-chat | c69ba786892dd870cb3fddd7da6ea77eadeb4a7e | [
"MIT"
] | null | null | null | main.py | henryfox/encrypted-chat | c69ba786892dd870cb3fddd7da6ea77eadeb4a7e | [
"MIT"
] | null | null | null | import webapp2
import os
import jinja2
from google.appengine.ext import db
template_dir = os.path.join(os.path.dirname(__file__), "templates")
jinja_env = jinja2.Environment(loader = jinja2.FileSystemLoader(template_dir), autoescape = True)
class Handler(webapp2.RequestHandler):
def write(self, *a, **kw):
... | 27.185185 | 98 | 0.690736 | 416 | 0.566757 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.038147 |
7e74455914c904362f3673de521f4d7c1b0cced0 | 32,898 | py | Python | lib/data_processing.py | ofirmg/football2vec | 302dc89bcdb19d00a7bd23ae8d28c103bc2f0482 | [
"Apache-2.0"
] | 11 | 2021-10-01T15:14:41.000Z | 2022-03-31T02:26:08.000Z | lib/data_processing.py | ofirmg/football2vec | 302dc89bcdb19d00a7bd23ae8d28c103bc2f0482 | [
"Apache-2.0"
] | null | null | null | lib/data_processing.py | ofirmg/football2vec | 302dc89bcdb19d00a7bd23ae8d28c103bc2f0482 | [
"Apache-2.0"
] | 1 | 2022-03-17T17:38:06.000Z | 2022-03-17T17:38:06.000Z | """
Created on September 5 2021
Data processing module of football2vec. Contains classes: FootballTokenizer, Corpus.
Also contains the build_data_objects function and its nested function for building the core data objects.
@author: Ofir Magdaci (@Magdaci)
"""
import numpy as np
import pandas as pd
import ast
from t... | 54.466887 | 120 | 0.658338 | 7,652 | 0.232598 | 0 | 0 | 0 | 0 | 0 | 0 | 10,014 | 0.304395 |
7e74c6f460e27189aecb37d569cafb98fe35f2d1 | 5,782 | py | Python | ipyannotator/datasets/download.py | EnriqueMoran/ipyannotator | 5517f8ded24e9e1347d0d72c73d620778f7b3069 | [
"Apache-2.0"
] | 19 | 2020-10-12T19:52:10.000Z | 2022-02-07T18:23:26.000Z | ipyannotator/datasets/download.py | EnriqueMoran/ipyannotator | 5517f8ded24e9e1347d0d72c73d620778f7b3069 | [
"Apache-2.0"
] | 6 | 2021-08-02T09:36:32.000Z | 2022-01-05T15:29:30.000Z | ipyannotator/datasets/download.py | EnriqueMoran/ipyannotator | 5517f8ded24e9e1347d0d72c73d620778f7b3069 | [
"Apache-2.0"
] | 1 | 2020-12-01T22:42:01.000Z | 2020-12-01T22:42:01.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01a_datasets_download.ipynb (unless otherwise specified).
__all__ = ['get_cifar10', 'get_oxford_102_flowers', 'get_cub_200_2011']
# Internal Cell
import glob
import json
from pathlib import Path
import os
import subprocess
import tarfile
import urllib
import zlib
# In... | 35.042424 | 139 | 0.654272 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,780 | 0.307852 |
7e760bdc1f9d49e259f501565af56e9e0e123033 | 3,076 | py | Python | airflow/plugins/operators/code_analyzer/utils/analysis/file.py | teiresias-personal-data-discovery/teiresias-system | 50e9d08d6924480f120d2d4f9fbebdc6035a5c5b | [
"MIT"
] | 2 | 2021-09-06T17:32:48.000Z | 2022-02-24T19:58:41.000Z | airflow/plugins/operators/code_analyzer/utils/analysis/file.py | teiresias-personal-data-discovery/teiresias-system | 50e9d08d6924480f120d2d4f9fbebdc6035a5c5b | [
"MIT"
] | null | null | null | airflow/plugins/operators/code_analyzer/utils/analysis/file.py | teiresias-personal-data-discovery/teiresias-system | 50e9d08d6924480f120d2d4f9fbebdc6035a5c5b | [
"MIT"
] | null | null | null | from ruamel.yaml import YAML
from pathlib import Path
from mergedeep import merge
from operators.code_analyzer.utils.analysis.tool import map_tool_to_storage_finder
from operators.code_analyzer.utils.analysis.context import collect_context
from operators.code_analyzer.constants.common import TOOL_CHARACTERISTICS
def... | 41.567568 | 117 | 0.592653 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.108583 |
7e783fa3b3ae047ea9b8d8a178c888dc525a3a94 | 1,647 | py | Python | examples/openmv/simple_tracking.py | bherbruck/simple-tracker | ed237d29a2cc84d0a38aaa2b1e8da7599ff8586f | [
"MIT"
] | 3 | 2020-06-24T13:06:48.000Z | 2021-09-15T11:47:10.000Z | examples/openmv/simple_tracking.py | bherbruck/simple_tracker | ed237d29a2cc84d0a38aaa2b1e8da7599ff8586f | [
"MIT"
] | null | null | null | examples/openmv/simple_tracking.py | bherbruck/simple_tracker | ed237d29a2cc84d0a38aaa2b1e8da7599ff8586f | [
"MIT"
] | null | null | null | import sensor
import image
import time
import json
from simple_tracker import Tracker
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time=2000)
sensor.set_auto_gain(False)
sensor.set_auto_whitebal(False)
clock = time.clock()
green_threshold = [(44, 88, -50, 1... | 20.333333 | 65 | 0.625987 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.092896 |
7e78a3a398d259dcdea4bb0f21c1e2aa3da5c606 | 2,106 | py | Python | ExcelToNetcdf.py | aecryan/netcdf-excel-conversion | b4c3d244ee726ec67fc110bbbda6400a42dd3d3a | [
"MIT"
] | null | null | null | ExcelToNetcdf.py | aecryan/netcdf-excel-conversion | b4c3d244ee726ec67fc110bbbda6400a42dd3d3a | [
"MIT"
] | null | null | null | ExcelToNetcdf.py | aecryan/netcdf-excel-conversion | b4c3d244ee726ec67fc110bbbda6400a42dd3d3a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
#Project name: Excel --> netCDF
#Description: It receives an excel file with a predefined format and returns the equivalent file in netCDF format.
#Programmers: Amir \& Ashley
#Date: 07-09-2020
import pandas as pd
import xarray
import scipy
print("Enter the exact name of th... | 18.972973 | 115 | 0.673789 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 898 | 0.426401 |
7e79d9eb8ec6eeaae5636e4fa3a0bdb95504f949 | 2,583 | py | Python | scripts/make_mc_scenario.py | BayAreaMetro/Lasso | 189c6fbb2bb9d346ced7600531865db3e18ee23d | [
"Apache-2.0"
] | 2 | 2019-08-15T10:23:45.000Z | 2019-11-12T21:35:11.000Z | scripts/make_mc_scenario.py | BayAreaMetro/Lasso | 189c6fbb2bb9d346ced7600531865db3e18ee23d | [
"Apache-2.0"
] | 91 | 2020-01-06T14:53:22.000Z | 2022-02-24T17:41:32.000Z | scripts/make_mc_scenario.py | wsp-sag/client_met_council_wrangler_utilities | 62819d100af433de71b10e7c79d5b8003017eee1 | [
"Apache-2.0"
] | 2 | 2020-07-10T23:34:25.000Z | 2021-04-14T06:57:45.000Z | import os
import pandas as pd
from network_wrangler import RoadwayNetwork
from network_wrangler import TransitNetwork
from network_wrangler import ProjectCard
from network_wrangler import Scenario
from network_wrangler import WranglerLogger
from lasso import ModelRoadwayNetwork
import warnings
warnings.filterwarnings(... | 32.696203 | 86 | 0.711189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 800 | 0.309717 |
7e7a1ee381af8c15ff0068d49bcb9d24bce39bcc | 1,018 | py | Python | 973-k-closest-points-to-origin/973-k-closest-points-to-origin.py | jurayev/data-structures-algorithms-solutions | 7103294bafb60117fc77efe4913edcffbeb1ac7a | [
"MIT"
] | null | null | null | 973-k-closest-points-to-origin/973-k-closest-points-to-origin.py | jurayev/data-structures-algorithms-solutions | 7103294bafb60117fc77efe4913edcffbeb1ac7a | [
"MIT"
] | null | null | null | 973-k-closest-points-to-origin/973-k-closest-points-to-origin.py | jurayev/data-structures-algorithms-solutions | 7103294bafb60117fc77efe4913edcffbeb1ac7a | [
"MIT"
] | null | null | null | class Point:
def __init__(self, x, y):
self.x = x
self.y = y
self.dist = math.sqrt(x ** 2 + y ** 2)
class Solution:
"""
Quick Select algo:
Time best -> O(N)
Time worst -> O(N^2)
"""
def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]:
... | 31.8125 | 78 | 0.541257 | 1,007 | 0.989194 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.087426 |
7e7ab95088129de2b578b58bebe2a6b3e660cca5 | 6,571 | py | Python | Models/Camera.py | arlanschouwstra/Robotica-Groep-11 | 17cac9527c3cc3f94f5a8ab11741cb5e546c85c1 | [
"BSD-2-Clause"
] | null | null | null | Models/Camera.py | arlanschouwstra/Robotica-Groep-11 | 17cac9527c3cc3f94f5a8ab11741cb5e546c85c1 | [
"BSD-2-Clause"
] | null | null | null | Models/Camera.py | arlanschouwstra/Robotica-Groep-11 | 17cac9527c3cc3f94f5a8ab11741cb5e546c85c1 | [
"BSD-2-Clause"
] | null | null | null | # import the necessary packages
from collections import deque
import numpy as np
import argparse
import imutils
import cv2
import time
class Camera:
def __init__(self):
pass
def nothing(*arg):
pass
def detect(self):
# construct the argument parse and parse the arguments
... | 43.516556 | 144 | 0.547405 | 6,379 | 0.970781 | 0 | 0 | 0 | 0 | 0 | 0 | 2,287 | 0.348044 |
7e7afd9b5bc486f02d1d5c166ba6efa287e9c8ff | 2,217 | py | Python | custom_components/weatheralerts/sensor.py | ikifar2012/sensor.weatheralerts | 6e0b11c6c0c6223fdfb50e320662b2755b4c15f9 | [
"MIT"
] | null | null | null | custom_components/weatheralerts/sensor.py | ikifar2012/sensor.weatheralerts | 6e0b11c6c0c6223fdfb50e320662b2755b4c15f9 | [
"MIT"
] | null | null | null | custom_components/weatheralerts/sensor.py | ikifar2012/sensor.weatheralerts | 6e0b11c6c0c6223fdfb50e320662b2755b4c15f9 | [
"MIT"
] | null | null | null | """
A component which allows you to get information about next departure from spesified stop.
For more details about this component, please refer to the documentation at
https://github.com/custom-components/sensor.weatheralerts
"""
import voluptuous as vol
from datetime import timedelta
from homeassistant.helpers.ent... | 27.37037 | 89 | 0.691926 | 1,157 | 0.521876 | 0 | 0 | 526 | 0.237258 | 0 | 0 | 375 | 0.169147 |
7e7b1b72d7e2f3002b8b48e684583223e28c26f3 | 5,873 | py | Python | src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_automations_scenario.py | ZengTaoxu/azure-cli | 6be96de450da5ac9f07aafb22dd69880bea04792 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_automations_scenario.py | ZengTaoxu/azure-cli | 6be96de450da5ac9f07aafb22dd69880bea04792 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/security/tests/latest/test_security_automations_scenario.py | ZengTaoxu/azure-cli | 6be96de450da5ac9f07aafb22dd69880bea04792 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 85.115942 | 727 | 0.737443 | 5,404 | 0.920143 | 0 | 0 | 0 | 0 | 0 | 0 | 4,027 | 0.68568 |
7e7b5ff37c1e9db3b446dba397ba3a4bdbfa6aee | 997 | py | Python | trypython/stdlib/argparse_/argparse01.py | devlights/try-python | 67d1d26476794da81c8c76662486108ce03f8fb4 | [
"MIT"
] | 4 | 2019-10-21T11:42:11.000Z | 2020-03-12T16:35:51.000Z | trypython/stdlib/argparse_/argparse01.py | devlights/try-python | 67d1d26476794da81c8c76662486108ce03f8fb4 | [
"MIT"
] | 80 | 2017-02-08T07:55:37.000Z | 2021-10-06T06:30:30.000Z | trypython/stdlib/argparse_/argparse01.py | devlights/try-python | 67d1d26476794da81c8c76662486108ce03f8fb4 | [
"MIT"
] | 1 | 2020-03-12T04:37:17.000Z | 2020-03-12T04:37:17.000Z | """
argparse モジュールのサンプルです。
基本的な使い方について。
参考: http://bit.ly/2UXDCIG
"""
import argparse
import sys
from trypython.common.commoncls import SampleBase
from trypython.common.commonfunc import pr
class Sample(SampleBase):
def exec(self):
#
# argparse モジュールを使う場合の基本は以下の手順
#
# (1) argpars... | 23.186047 | 73 | 0.628887 | 806 | 0.69066 | 0 | 0 | 0 | 0 | 0 | 0 | 544 | 0.466153 |
7e7b93a9c5eda7c1107bcc3481dd998203dfcd7d | 949 | py | Python | scripts/check_masks.py | dyollb/segmantic | 8fe47340ff0f67812918f7070e3d6080e5d228ac | [
"MIT"
] | null | null | null | scripts/check_masks.py | dyollb/segmantic | 8fe47340ff0f67812918f7070e3d6080e5d228ac | [
"MIT"
] | 3 | 2021-09-24T20:32:23.000Z | 2022-03-14T10:54:13.000Z | scripts/check_masks.py | dyollb/segmantic | 8fe47340ff0f67812918f7070e3d6080e5d228ac | [
"MIT"
] | 2 | 2021-09-24T11:54:52.000Z | 2021-10-01T13:01:55.000Z | import logging
from pathlib import Path
import nibabel as nib
import numpy as np
import typer
def check_masks(directory: Path, file_glob: str = "*.nii.gz"):
logger = logging.getLogger(__file__)
for file_path in directory.glob(file_glob):
img = nib.load(f"{file_path}")
data = img.get_fdata()
... | 27.911765 | 71 | 0.559536 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.140148 |
7e7c1099ca5e6f0cb535351f8035469a042e59e5 | 10,296 | py | Python | draw_classes.py | Fs-agadir/StageDetect | af2841b41f80151e1f3092adbc266eb1d2b8db37 | [
"MIT"
] | null | null | null | draw_classes.py | Fs-agadir/StageDetect | af2841b41f80151e1f3092adbc266eb1d2b8db37 | [
"MIT"
] | null | null | null | draw_classes.py | Fs-agadir/StageDetect | af2841b41f80151e1f3092adbc266eb1d2b8db37 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, Fs-Agadir
# All rights reserved.
#from wx import App, ScreenDC #to get monitor resolution
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
import os, cv2
class Drawing:
def __init__(self):
pass
'''----drawing results tools----'''
# '... | 38.133333 | 163 | 0.54089 | 10,094 | 0.980381 | 0 | 0 | 0 | 0 | 0 | 0 | 2,505 | 0.243298 |
7e7c81aac02ad87573439958e43598f569160606 | 7,325 | py | Python | batch_gnome/batch_gnome/TAP/TAP_ext/test_TAP_ext.py | dylanrighi/GnomeTools | 08ad6810194141ac89a27c95fa9b9499376000ae | [
"Unlicense"
] | 2 | 2017-02-15T20:45:42.000Z | 2020-10-09T16:00:00.000Z | batch_gnome/batch_gnome/TAP/TAP_ext/test_TAP_ext.py | dylanrighi/GnomeTools | 08ad6810194141ac89a27c95fa9b9499376000ae | [
"Unlicense"
] | 10 | 2015-06-25T23:42:11.000Z | 2021-06-22T16:19:19.000Z | batch_gnome/batch_gnome/TAP/TAP_ext/test_TAP_ext.py | dylanrighi/GnomeTools | 08ad6810194141ac89a27c95fa9b9499376000ae | [
"Unlicense"
] | 15 | 2016-01-11T20:49:10.000Z | 2020-10-15T18:02:20.000Z | #!/usr/bin/env python2.3
"""
A simple test routine that tests at least some of the TAP_ext package
"""
import unittest
from Numeric import *
class CalcPolygonsTestCase(unittest.TestCase):
def testCalcPolygons(self):
pass
class check_receptorsTestCase(unittest.TestCase):
def test_check_recepto... | 26.348921 | 107 | 0.622526 | 2,867 | 0.391399 | 0 | 0 | 0 | 0 | 0 | 0 | 3,306 | 0.451331 |
7e7d5c74d34a346aa2f86f99938df07c5e5fd4cb | 89 | py | Python | ourteam/apps.py | Kgermando/parlementaires | ef9a464373ce2facbb6543be6d3b0d7d5c11200c | [
"Apache-2.0"
] | 1 | 2021-08-09T02:22:42.000Z | 2021-08-09T02:22:42.000Z | ourteam/apps.py | Kgermando/parlementaires | ef9a464373ce2facbb6543be6d3b0d7d5c11200c | [
"Apache-2.0"
] | null | null | null | ourteam/apps.py | Kgermando/parlementaires | ef9a464373ce2facbb6543be6d3b0d7d5c11200c | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class OurteamConfig(AppConfig):
name = 'ourteam'
| 14.833333 | 33 | 0.752809 | 52 | 0.58427 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.101124 |
7e7db118c7f4f3b7e95cfc69811f1d3a63168f03 | 381 | py | Python | backpack/extensions/secondorder/diag_ggn/permute.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 395 | 2019-10-04T09:37:52.000Z | 2022-03-29T18:00:56.000Z | backpack/extensions/secondorder/diag_ggn/permute.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 78 | 2019-10-11T18:56:43.000Z | 2022-03-23T01:49:54.000Z | backpack/extensions/secondorder/diag_ggn/permute.py | jabader97/backpack | 089daafa0d611e13901fd7ecf8a0d708ce7a5928 | [
"MIT"
] | 50 | 2019-10-03T16:31:10.000Z | 2022-03-15T19:36:14.000Z | """Module defining DiagGGNPermute."""
from backpack.core.derivatives.permute import PermuteDerivatives
from backpack.extensions.secondorder.diag_ggn.diag_ggn_base import DiagGGNBaseModule
class DiagGGNPermute(DiagGGNBaseModule):
"""DiagGGN extension of Permute."""
def __init__(self):
"""Initialize.""... | 31.75 | 84 | 0.76378 | 190 | 0.498688 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.233596 |
7e7dd5c8d80c1193d34c16e490af85436be7f87e | 1,703 | py | Python | tests.py | snandasena/disaster-response-pipeline | 709af8c5fcb520dae82dc3b75c30ab2609402f53 | [
"MIT"
] | null | null | null | tests.py | snandasena/disaster-response-pipeline | 709af8c5fcb520dae82dc3b75c30ab2609402f53 | [
"MIT"
] | null | null | null | tests.py | snandasena/disaster-response-pipeline | 709af8c5fcb520dae82dc3b75c30ab2609402f53 | [
"MIT"
] | null | null | null | import sys
import numpy as np
from sklearn.externals import joblib
sys.path.append("common")
from train_classifier import *
staring_verb_extractor = StartingVerbExtractor()
verb_count_extractor = VerbCountExtractor()
starting_modal_extractor = StartingModalExtractor()
noun_count_extractor = NounCountExtractor()
def... | 24.681159 | 79 | 0.72754 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 418 | 0.245449 |
7e7e872c4d53c683d43e32b7bedc06b65ba0d11b | 3,734 | py | Python | sendim/tests/graph.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | 1 | 2017-12-13T20:28:32.000Z | 2017-12-13T20:28:32.000Z | sendim/tests/graph.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | null | null | null | sendim/tests/graph.py | ZuluPro/snafu | dbd79da4617db315ba7e76a0af6805cc3b1cbae2 | [
"BSD-3-Clause"
] | null | null | null | """
"""
from django.utils import unittest
from django.core import management
from referentiel.models import Supervisor
from sendim.tests.defs import create_event, create_alert, internet_is_on
class Graph_TestCase(unittest.TestCase):
"""
Test communicaton with metrology.
"""
def setUp(self):
m... | 46.675 | 129 | 0.602839 | 3,538 | 0.947509 | 0 | 0 | 3,278 | 0.877879 | 0 | 0 | 1,686 | 0.451527 |
7e8134c8fd80b019bde539a2bf2a08fb9219b671 | 799 | py | Python | PipelineCreator/Testing/Python/ModuleTemplateTests.py | Connor-Bowley/SlicerPipelines | 2fe92230fc6333951b7d99c272f3f2c34739624d | [
"Apache-2.0"
] | null | null | null | PipelineCreator/Testing/Python/ModuleTemplateTests.py | Connor-Bowley/SlicerPipelines | 2fe92230fc6333951b7d99c272f3f2c34739624d | [
"Apache-2.0"
] | 9 | 2021-11-08T20:42:49.000Z | 2022-03-11T19:05:00.000Z | PipelineCreator/Testing/Python/ModuleTemplateTests.py | Connor-Bowley/SlicerPipelines | 2fe92230fc6333951b7d99c272f3f2c34739624d | [
"Apache-2.0"
] | 2 | 2022-01-21T09:13:40.000Z | 2022-02-09T21:16:31.000Z | import unittest
from PipelineCreatorLib._Private.ModuleTemplate import ModuleTemplate
class TestModuleTemplate(unittest.TestCase):
def test_simple(self):
t = ModuleTemplate("{{name}} is here")
self.assertEqual("frank is here", t.substitute({"name":"frank"}))
self.assertEqual("frank is here", t.safe_subs... | 33.291667 | 80 | 0.662078 | 662 | 0.828536 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.236546 |
7e82cf4b8fa8c9cf39f0aaa01ba1006d96672fc2 | 3,760 | py | Python | engine/logic/Transform.py | wkta/Python-Bataille-Navale | b6f725519cf1cf559e60ec766aa4f059463b1493 | [
"MIT"
] | null | null | null | engine/logic/Transform.py | wkta/Python-Bataille-Navale | b6f725519cf1cf559e60ec766aa4f059463b1493 | [
"MIT"
] | null | null | null | engine/logic/Transform.py | wkta/Python-Bataille-Navale | b6f725519cf1cf559e60ec766aa4f059463b1493 | [
"MIT"
] | 1 | 2019-12-03T15:42:38.000Z | 2019-12-03T15:42:38.000Z | # Copyright © 2019 CAILLAUD Jean-Baptiste.
from copy import copy
from engine.logic.Math import Mat3x3, Vector2, IDENTITY_MATRIX, ZERO_VECTOR, UNIT_VECTOR
class Transform:
"""
Simple transform.
Used to give information about the objects in the scene.
Attributes:
parent Parent transform o... | 39.578947 | 121 | 0.655585 | 3,602 | 0.957724 | 0 | 0 | 0 | 0 | 0 | 0 | 1,840 | 0.489232 |
7e840f48bfa9da0d3fea1df9c562b535318a1317 | 5,820 | py | Python | tools/key2java.py | rb-anssi/tataouine | 6aef17cc7f25f1d6ada38439991bdb6247dcc465 | [
"BSD-3-Clause"
] | null | null | null | tools/key2java.py | rb-anssi/tataouine | 6aef17cc7f25f1d6ada38439991bdb6247dcc465 | [
"BSD-3-Clause"
] | null | null | null | tools/key2java.py | rb-anssi/tataouine | 6aef17cc7f25f1d6ada38439991bdb6247dcc465 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os, array
# Import our local utils
from crypto_utils import *
def PrintUsage():
executable = os.path.basename(__file__)
print(u'\nkey2java\n\n\tUsage:\t{} token_priv_key.bin token_pub_key.bin platform_pub_key.bin shared_petpin.bin shared_petname.bin... | 40.416667 | 279 | 0.635739 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,860 | 0.319588 |
7e848495b8c58269c0b218c96feb0278fcd138df | 1,949 | py | Python | app/maze_selector.py | rpowel/maze | d98d7a39e6cc0abbd32323be1722fc1a126d8910 | [
"MIT"
] | null | null | null | app/maze_selector.py | rpowel/maze | d98d7a39e6cc0abbd32323be1722fc1a126d8910 | [
"MIT"
] | null | null | null | app/maze_selector.py | rpowel/maze | d98d7a39e6cc0abbd32323be1722fc1a126d8910 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 11 10:44:44 2020.
@author: powel
"""
import random
from random import randint
import numpy as np
from mazes import RandomMaze, PrimMaze, KruskalMaze, RecursiveDivisionMaze, MazeBase
from percolation import check_percolation
class Maze:
def _... | 27.450704 | 87 | 0.581837 | 1,506 | 0.772704 | 0 | 0 | 494 | 0.253463 | 0 | 0 | 185 | 0.09492 |
7e852564331f423fb21ea2215be78aaea0deff4c | 507 | py | Python | my_lambdata/iqr_oop.py | karlmanalo/lambdata-karlmanalo | e6058fd1b4a5eb64d0afaebdfa14b902fedf931e | [
"MIT"
] | null | null | null | my_lambdata/iqr_oop.py | karlmanalo/lambdata-karlmanalo | e6058fd1b4a5eb64d0afaebdfa14b902fedf931e | [
"MIT"
] | null | null | null | my_lambdata/iqr_oop.py | karlmanalo/lambdata-karlmanalo | e6058fd1b4a5eb64d0afaebdfa14b902fedf931e | [
"MIT"
] | 1 | 2020-05-06T21:26:50.000Z | 2020-05-06T21:26:50.000Z | # my_lambdata\iqr_oop.py
# IQR function written in terms of OOP
# Must feed in list of numbers
import numpy
import pandas
class Numbers():
def __init__(self):
pass
def iqr(self, X):
q1 = numpy.percentile(X, 25, interpolation='midpoint')
q3 = numpy.percentile(X, 75, interpolation=... | 22.043478 | 70 | 0.623274 | 271 | 0.534517 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.321499 |
7e85b0b404fa718713288ae4337dab0afce1d4af | 2,760 | py | Python | app/vendors/migrations/0030_auto_20180305_2301.py | snakrani/discovery | 99690f186a194cabef6a5d1ad18fca715be1e187 | [
"CC0-1.0"
] | null | null | null | app/vendors/migrations/0030_auto_20180305_2301.py | snakrani/discovery | 99690f186a194cabef6a5d1ad18fca715be1e187 | [
"CC0-1.0"
] | null | null | null | app/vendors/migrations/0030_auto_20180305_2301.py | snakrani/discovery | 99690f186a194cabef6a5d1ad18fca715be1e187 | [
"CC0-1.0"
] | null | null | null | # Generated by Django 2.0.2 on 2018-03-05 23:01
from django.db import migrations, models
import django.db.models.deletion
def migrate_membership(apps, schema_editor):
PoolPIID = apps.get_model('vendors', 'PoolPIID')
PoolMembership = apps.get_model('vendors', 'PoolMembership')
PoolMembershipZone = apps.ge... | 34.936709 | 156 | 0.593841 | 1,980 | 0.717391 | 0 | 0 | 0 | 0 | 0 | 0 | 493 | 0.178623 |
7e87f76640610e9de62b60abb07ac310224902a8 | 309 | py | Python | hcap_utils/contrib/allauth/login_form.py | fabiommendes/capacidade_hospitalar | 4f675b574573eb3f51e6be8a927ea230bf2712c7 | [
"MIT"
] | null | null | null | hcap_utils/contrib/allauth/login_form.py | fabiommendes/capacidade_hospitalar | 4f675b574573eb3f51e6be8a927ea230bf2712c7 | [
"MIT"
] | 31 | 2020-04-11T13:38:17.000Z | 2021-09-22T18:51:11.000Z | hcap_utils/contrib/allauth/login_form.py | fabiommendes/capacidade_hospitalar | 4f675b574573eb3f51e6be8a927ea230bf2712c7 | [
"MIT"
] | 1 | 2020-04-08T17:04:39.000Z | 2020-04-08T17:04:39.000Z | from allauth.account.forms import LoginForm as AllauthLoginForm
class LoginForm(AllauthLoginForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
del self.fields["login"].widget.attrs["placeholder"]
del self.fields["password"].widget.attrs["placeholder"]
| 34.333333 | 63 | 0.702265 | 242 | 0.783172 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.139159 |
7e892bbc2f9093e6ea3899715b53105db05324f3 | 402 | py | Python | community/migrations/0013_auto_20191108_0918.py | akarakoc/Communityverse | 73ecf51eae3f96cca865e0d7cc526b92c8ad6b5e | [
"MIT"
] | null | null | null | community/migrations/0013_auto_20191108_0918.py | akarakoc/Communityverse | 73ecf51eae3f96cca865e0d7cc526b92c8ad6b5e | [
"MIT"
] | 22 | 2019-11-09T23:23:11.000Z | 2019-12-23T09:38:29.000Z | community/migrations/0013_auto_20191108_0918.py | akarakoc/CommunityVerse | 73ecf51eae3f96cca865e0d7cc526b92c8ad6b5e | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-11-08 09:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('community', '0012_auto_20191107_1649'),
]
operations = [
migrations.AlterField(
model_name='communities',
name='comm... | 21.157895 | 53 | 0.614428 | 309 | 0.768657 | 0 | 0 | 0 | 0 | 0 | 0 | 110 | 0.273632 |
7e894bd8c2abebfa353b32928132bd335cf2f437 | 3,870 | py | Python | tests/test_api.py | gilbsgilbs/cruft | cc6571e0816bc5149e24ed7d23d90bdb9de8d65e | [
"MIT"
] | null | null | null | tests/test_api.py | gilbsgilbs/cruft | cc6571e0816bc5149e24ed7d23d90bdb9de8d65e | [
"MIT"
] | null | null | null | tests/test_api.py | gilbsgilbs/cruft | cc6571e0816bc5149e24ed7d23d90bdb9de8d65e | [
"MIT"
] | null | null | null | import json
import os
from pathlib import Path
from subprocess import run
import pytest
from examples import verify_and_test_examples
from git import Repo
import cruft
from cruft import exceptions
from cruft._commands.utils import get_cruft_file
def test_invalid_cookiecutter_repo(tmpdir):
with pytest.raises(exc... | 31.463415 | 92 | 0.701034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 739 | 0.190956 |
7e89cb57b76e7e255d355d36bbaa26056332ada5 | 4,303 | py | Python | analysis_engine/prepare_history_dataset.py | virdesai/stock-analysis-engine | 0ca501277c632150717ca499121a34f8f8c71ccb | [
"Apache-2.0"
] | 819 | 2018-09-16T20:33:11.000Z | 2022-03-30T21:18:23.000Z | analysis_engine/prepare_history_dataset.py | gvpathi/stock-analysis-engine | 0ca501277c632150717ca499121a34f8f8c71ccb | [
"Apache-2.0"
] | 14 | 2018-09-16T20:52:25.000Z | 2020-09-06T12:36:36.000Z | analysis_engine/prepare_history_dataset.py | gvpathi/stock-analysis-engine | 0ca501277c632150717ca499121a34f8f8c71ccb | [
"Apache-2.0"
] | 226 | 2018-09-16T20:04:32.000Z | 2022-03-31T01:41:14.000Z | """
Helper for loading a ``Trading History`` dataset
"""
import json
import zlib
import pandas as pd
import analysis_engine.consts as ae_consts
import spylunking.log.setup_logging as log_utils
log = log_utils.build_colorized_logger(name=__name__)
def prepare_history_dataset(
data,
compress=False,
... | 29.472603 | 77 | 0.595631 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,758 | 0.408552 |
7e8a45c72fe260a3444e4ee7e5fcd4dbca175324 | 935 | py | Python | scripts/count_git_changes.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 2,753 | 2015-01-02T11:34:13.000Z | 2022-03-25T07:04:27.000Z | scripts/count_git_changes.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 2,404 | 2015-01-02T19:31:41.000Z | 2022-03-09T10:58:22.000Z | scripts/count_git_changes.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 1,156 | 2015-01-03T01:57:21.000Z | 2022-03-26T01:06:28.000Z | import os
import sys
insertions=0
deletions=0
files=0
FROMVER=""
if len(sys.argv)>1:
FROMVER=sys.argv[1]
TOVER=""
if len(sys.argv)>2:
TOVER=sys.argv[2]
TMPNAME=os.tmpnam()
VER=""
if len(FROMVER)>0:
VER=FROMVER+'..'
if len(TOVER)>0:
if len(VER)==0:
VER='..'
VER=VER+TOVER
os.system('git log --oneline --shortstat... | 20.777778 | 65 | 0.628877 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 177 | 0.189305 |
7e8d50185ec0ee4eb697f713cf041be29429c89b | 439 | py | Python | pysaintcoinach/ex/language.py | icykoneko/saintcoinach-py | 66898385e1198203a7ec9da83787427bf6fe5c83 | [
"MIT"
] | 7 | 2019-11-20T17:24:49.000Z | 2022-03-29T04:17:53.000Z | pysaintcoinach/ex/language.py | icykoneko/saintcoinach-py | 66898385e1198203a7ec9da83787427bf6fe5c83 | [
"MIT"
] | 7 | 2019-04-08T07:36:46.000Z | 2022-01-17T22:51:54.000Z | pysaintcoinach/ex/language.py | icykoneko/saintcoinach-py | 66898385e1198203a7ec9da83787427bf6fe5c83 | [
"MIT"
] | 3 | 2019-04-08T08:24:22.000Z | 2021-06-27T22:19:15.000Z | from enum import Enum
class Language(Enum):
none = ""
japanese = "ja"
english = "en"
german = "de"
french = "fr"
chinese_simplified = "chs"
chinese_traditional = "cht"
korean = "ko"
unsupported = "?"
def get_code(self):
return self.value
def get_suffix(self):
... | 18.291667 | 31 | 0.523918 | 414 | 0.943052 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.091116 |
7e908ee2b8fb406fe3a6030c978abed370619859 | 929 | py | Python | Python_lxf/Python_Basic_Operation/Python_Basic/basicValueAndFunc/Filter.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 2 | 2019-01-24T15:06:59.000Z | 2019-01-25T07:34:45.000Z | Python_lxf/Python_Basic_Operation/Python_Basic/basicValueAndFunc/Filter.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-12-23T09:45:11.000Z | 2019-12-23T09:45:11.000Z | Python_lxf/Python_Basic_Operation/Python_Basic/basicValueAndFunc/Filter.py | QAlexBall/Learning_Py | 8a5987946928a9d86f6807555ed435ac604b2c44 | [
"MIT"
] | 1 | 2019-07-18T14:21:35.000Z | 2019-07-18T14:21:35.000Z | def is_odd(n):
return n % 2 == 1
def not_empty(s):
return s and s.strip()
a = list(filter(is_odd, [1, 2, 4, 5, 6, 7, 8]))
a = list(filter(lambda n : n % 2 == 1, [1, 2, 4, 5, 6, 7, 8, 9]))
b = list(filter(not_empty, ['A', '' , 'B', None, 'C', ' ']))
# filter 函数返回的是一个Iterator, 也就是一个惰性序列
print(a, b)
def _odd_iter():... | 21.113636 | 104 | 0.592034 | 0 | 0 | 470 | 0.436397 | 0 | 0 | 0 | 0 | 448 | 0.41597 |
7e9106857781db3212367ee35a3b48eb586b45ed | 40,855 | py | Python | toolcraft/storage/__base__.py | SpikingNeurons/toolcraft | 7290fa70a5d2680ebacf1bc421efaf09545f7c7e | [
"BSD-3-Clause"
] | 6 | 2021-04-06T09:27:48.000Z | 2021-12-17T02:13:11.000Z | toolcraft/storage/__base__.py | SpikingNeurons/toolcraft | 7290fa70a5d2680ebacf1bc421efaf09545f7c7e | [
"BSD-3-Clause"
] | 57 | 2021-03-19T07:33:13.000Z | 2022-03-30T18:59:29.000Z | toolcraft/storage/__base__.py | SpikingNeurons/toolcraft | 7290fa70a5d2680ebacf1bc421efaf09545f7c7e | [
"BSD-3-Clause"
] | 2 | 2021-04-08T18:24:36.000Z | 2021-04-08T22:40:50.000Z | """
Holds the base classes for storage module.
These are special hashables whose state can be serialized on disk.
"""
import typing as t
import pathlib
import datetime
import dataclasses
import abc
from .. import util, logger, settings
from .. import marshalling as m
from .. import error as e
from . import state
# n... | 39.819688 | 80 | 0.538465 | 40,215 | 0.984335 | 0 | 0 | 40,323 | 0.986978 | 0 | 0 | 23,172 | 0.567177 |
7e92ae2753098633b02262fd0da3be3a5595b241 | 1,951 | py | Python | scripts/pulp_test.py | rajiv256/cs531_proj_2 | 4fa4628da06e3558b9f8c2917c0e87d9c5287690 | [
"MIT"
] | null | null | null | scripts/pulp_test.py | rajiv256/cs531_proj_2 | 4fa4628da06e3558b9f8c2917c0e87d9c5287690 | [
"MIT"
] | null | null | null | scripts/pulp_test.py | rajiv256/cs531_proj_2 | 4fa4628da06e3558b9f8c2917c0e87d9c5287690 | [
"MIT"
] | null | null | null | import pulp as pl
def create_affine_expression(coeffs, var_names):
assert len(coeffs) == len(var_names)
n = len(coeffs)
X = [pl.LpVariable(var_names[i]) for i in range(n)]
affine = pl.LpAffineExpression([(X[i], coeffs[i]) for i in range(n)])
return affine
def create_constraint(coeffs, var_names,... | 28.275362 | 103 | 0.654024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 520 | 0.26653 |
7e935ec5d2ebb9f636c96a59cc60b230513b416f | 3,434 | py | Python | apps/user_app/models.py | lightless233/npiss | 8338f50d971600fe2b2366836ca2fb543f2276d5 | [
"MIT"
] | 1 | 2016-11-22T13:25:02.000Z | 2016-11-22T13:25:02.000Z | apps/user_app/models.py | LiGhT1EsS/npiss | 8338f50d971600fe2b2366836ca2fb543f2276d5 | [
"MIT"
] | 4 | 2020-06-05T17:28:20.000Z | 2022-03-11T23:15:49.000Z | apps/user_app/models.py | lightless233/npiss | 8338f50d971600fe2b2366836ca2fb543f2276d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# coding: utf8
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.hashers import make_password, check_password
__author__ = 'lightless'
__email__ = 'root@lightless.me'
class PissUser(models.Model):
"""
存储用户信息
"""
class Meta:
... | 31.796296 | 101 | 0.689284 | 3,402 | 0.932055 | 0 | 0 | 0 | 0 | 0 | 0 | 640 | 0.175342 |
7e95766c342499bfa038fc67107c66bd872341ac | 24 | py | Python | src/models/__init__.py | WorqHat/Stanford-MRnet-Challenge | 0a8a7438f55503307d5b6b0ddaaa3c50fa4d692b | [
"MIT"
] | 1 | 2021-06-27T18:22:57.000Z | 2021-06-27T18:22:57.000Z | src/models/__init__.py | WorqHat/Stanford-MRnet-Challenge | 0a8a7438f55503307d5b6b0ddaaa3c50fa4d692b | [
"MIT"
] | null | null | null | src/models/__init__.py | WorqHat/Stanford-MRnet-Challenge | 0a8a7438f55503307d5b6b0ddaaa3c50fa4d692b | [
"MIT"
] | 2 | 2020-05-28T07:30:39.000Z | 2021-06-27T18:22:59.000Z | from .MRnet import MRnet | 24 | 24 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7e97e798b9acfb3c7359d3f9ef7c17e46c59fef5 | 398 | py | Python | storage/models/production_data.py | aagarwal1999/194-web-app | 362efd32d964d780f213b4e5a97fd14b080329ba | [
"Apache-2.0"
] | null | null | null | storage/models/production_data.py | aagarwal1999/194-web-app | 362efd32d964d780f213b4e5a97fd14b080329ba | [
"Apache-2.0"
] | null | null | null | storage/models/production_data.py | aagarwal1999/194-web-app | 362efd32d964d780f213b4e5a97fd14b080329ba | [
"Apache-2.0"
] | null | null | null | from storage.shared import db
import datetime
import uuid
class ProductionData(db.Model):
id = db.Column(db.String(100), primary_key=True, default=lambda: str(uuid.uuid4()))
data = db.Column(db.Text, unique=False, nullable=False)
time = db.Column(db.DateTime, default=datetime.datetime.now)
one_line_su... | 24.875 | 87 | 0.731156 | 333 | 0.836683 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7e9894e1fe1b381787e323f05a879ce7b9f749fc | 2,478 | py | Python | nostrild/nostrild.py | nibalizer/galileo | f5d100adcfaa238d98ec2df93040eafc4d9e7420 | [
"Apache-2.0"
] | 1 | 2015-01-11T04:32:57.000Z | 2015-01-11T04:32:57.000Z | nostrild/nostrild.py | nibalizer/galileo | f5d100adcfaa238d98ec2df93040eafc4d9e7420 | [
"Apache-2.0"
] | 1 | 2015-01-12T01:17:07.000Z | 2015-01-12T01:17:07.000Z | nostrild/nostrild.py | nibalizer/galileo | f5d100adcfaa238d98ec2df93040eafc4d9e7420 | [
"Apache-2.0"
] | 2 | 2015-01-17T00:52:39.000Z | 2017-09-09T05:42:18.000Z | # nostrild
# authentication and user info daemon
import getent
import os
import yaml
import ldap
from itsdangerous import TimestampSigner
from flask import Flask, abort, request, jsonify
from flask_cors import CORS
app = Flask(__name__)
app.config['CORS_HEADERS'] = 'Content-Type'
cors = CORS(app)
def always_aut... | 22.324324 | 64 | 0.619048 | 0 | 0 | 0 | 0 | 1,070 | 0.4318 | 0 | 0 | 676 | 0.272801 |
7e98b2febab6aef339580ecaf31712e7927e5389 | 13,357 | py | Python | P3/regression.py | alepalenc/Aprendizaje-Automatico | b2a6daa29bbed29b3d042a51bc0425b1e80152e6 | [
"MIT"
] | null | null | null | P3/regression.py | alepalenc/Aprendizaje-Automatico | b2a6daa29bbed29b3d042a51bc0425b1e80152e6 | [
"MIT"
] | null | null | null | P3/regression.py | alepalenc/Aprendizaje-Automatico | b2a6daa29bbed29b3d042a51bc0425b1e80152e6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.feature_selection import VarianceThreshold
from sklearn.preprocessing import PolynomialFeatures, StandardScaler
from sklearn import metrics
from sklearn.bas... | 36.002695 | 147 | 0.589204 | 1,876 | 0.139823 | 0 | 0 | 0 | 0 | 0 | 0 | 4,339 | 0.323396 |
7e99f08d361c9ea4cb38904ff75221d141f1e187 | 1,838 | py | Python | Line_Bot_Server/LineUsers.py | STU-Idichi-Syoya/Linebot_ | 54941ec0baee40ac21eeed77a0e1d0da02631aea | [
"MIT"
] | null | null | null | Line_Bot_Server/LineUsers.py | STU-Idichi-Syoya/Linebot_ | 54941ec0baee40ac21eeed77a0e1d0da02631aea | [
"MIT"
] | null | null | null | Line_Bot_Server/LineUsers.py | STU-Idichi-Syoya/Linebot_ | 54941ec0baee40ac21eeed77a0e1d0da02631aea | [
"MIT"
] | null | null | null | from Line_Bot_Server.LineBot import line_bot_api
##### STATE #####
class LineUser:
def __init__(self,reply=None,userId=None):
'''line のユーザ情報クラス ここではreplayからUserIdを取得することも
できるし、そのままuserIdを入力できる。
そこからLine APIを通して、名前と ひとこと(status message)を取得する。
'''
#reply か userIdどちら... | 28.276923 | 63 | 0.605005 | 1,961 | 0.962218 | 0 | 0 | 0 | 0 | 0 | 0 | 527 | 0.258587 |
7e99f6ca30156fb9b0a9d2f84235cc68fb4723a3 | 841 | py | Python | wx/stc/mixins/DrawColumnEndMixin.py | dejbug/dejan7 | 0e3d9f4068cd7b39a3a992f4b21fa5042c88227b | [
"MIT"
] | null | null | null | wx/stc/mixins/DrawColumnEndMixin.py | dejbug/dejan7 | 0e3d9f4068cd7b39a3a992f4b21fa5042c88227b | [
"MIT"
] | null | null | null | wx/stc/mixins/DrawColumnEndMixin.py | dejbug/dejan7 | 0e3d9f4068cd7b39a3a992f4b21fa5042c88227b | [
"MIT"
] | null | null | null | import wx
import wx.stc
from dejan7.async.DelayedCall import *
from dejan7.wx.stc import GetRowWidths
class DrawColumnEndMixin(object):
def __init__(self, parent, color="GREY", delay=0.3, margins=[]):
self.sci = parent
self.pen = wx.Pen(color)
self.margins = margins
self.DelayedPaint = Delayed... | 22.72973 | 71 | 0.668252 | 729 | 0.866825 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.007134 |
7e9a6ec65ac1ad83068e34348790df72fdb98a91 | 177 | py | Python | Userful_Script/decimal_to_binary.py | abc907558136/Pytorch-learning | 24c3da7eb134e0b9058a6f8329a311196cbc528b | [
"Apache-2.0"
] | 1 | 2019-12-19T04:49:57.000Z | 2019-12-19T04:49:57.000Z | Userful_Script/decimal_to_binary.py | abc907558136/Pytorch-Learning | 24c3da7eb134e0b9058a6f8329a311196cbc528b | [
"Apache-2.0"
] | null | null | null | Userful_Script/decimal_to_binary.py | abc907558136/Pytorch-Learning | 24c3da7eb134e0b9058a6f8329a311196cbc528b | [
"Apache-2.0"
] | null | null | null | import numpy as np
# Represent each input by an array of its binary digits.
def binary_encode(i, num_digits):
return np.array([i >> d & 1 for d in range(num_digits)])[::-1] | 35.4 | 66 | 0.700565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.316384 |
7e9da2cb9c09decd20d0f9df4db1a688df669596 | 884 | py | Python | tools/telemetry/telemetry/core/platform/power_monitor/android_ds2784_power_monitor_unittest.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 231 | 2015-01-08T09:04:44.000Z | 2021-12-30T03:03:10.000Z | tools/telemetry/telemetry/core/platform/power_monitor/android_ds2784_power_monitor_unittest.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2017-02-14T21:55:58.000Z | 2017-02-14T21:55:58.000Z | tools/telemetry/telemetry/core/platform/power_monitor/android_ds2784_power_monitor_unittest.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 268 | 2015-01-21T05:53:28.000Z | 2022-03-25T22:09:01.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from telemetry.core.platform.power_monitor import android_ds2784_power_monitor
class DS2784PowerMonitorMonitorTest(unittest.TestCase):
d... | 35.36 | 78 | 0.636878 | 622 | 0.70362 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0.363122 |
7e9db911f3ba28aac3dc562f5cd602f52c2d9c10 | 1,231 | py | Python | apps/common/lookups.py | gis4dis/poster_new | cee983bfcfc90f581b18712d558bc9d8a83a400a | [
"BSD-3-Clause"
] | 4 | 2017-10-17T10:52:27.000Z | 2020-08-30T10:13:46.000Z | apps/common/lookups.py | gis4dis/poster_new | cee983bfcfc90f581b18712d558bc9d8a83a400a | [
"BSD-3-Clause"
] | 138 | 2017-10-13T09:09:02.000Z | 2020-06-05T18:55:33.000Z | apps/common/lookups.py | gis4dis/poster_new | cee983bfcfc90f581b18712d558bc9d8a83a400a | [
"BSD-3-Clause"
] | 2 | 2018-01-21T19:44:51.000Z | 2018-02-15T11:27:39.000Z | from django.contrib.postgres.fields import DateTimeRangeField
from django.db.models import Lookup
from psycopg2.extras import NumericRange
@DateTimeRangeField.register_lookup
class Duration(Lookup):
lookup_name = 'duration'
def as_sql(self, compiler, connection):
lhs, lhs_params = self.process_lhs(co... | 38.46875 | 115 | 0.665313 | 1,014 | 0.823721 | 0 | 0 | 1,086 | 0.88221 | 0 | 0 | 210 | 0.170593 |
7e9fa3c475c35098becd66c211b5ef3ab43f253f | 21,450 | py | Python | lib/pecoff/Executable.py | arizvisa/syringe | 9f8691d3e70b34d52ce83c8ea33be52d0887f0d6 | [
"BSD-2-Clause"
] | 25 | 2015-04-14T21:53:46.000Z | 2022-03-30T19:15:24.000Z | lib/pecoff/Executable.py | arizvisa/syringe | 9f8691d3e70b34d52ce83c8ea33be52d0887f0d6 | [
"BSD-2-Clause"
] | 5 | 2020-03-23T20:19:59.000Z | 2021-05-24T19:38:31.000Z | lib/pecoff/Executable.py | arizvisa/syringe | 9f8691d3e70b34d52ce83c8ea33be52d0887f0d6 | [
"BSD-2-Clause"
] | 7 | 2015-07-31T13:26:37.000Z | 2021-03-05T19:35:37.000Z | import logging, operator, functools, itertools, array, ptypes
from ptypes import *
from .headers import *
from . import portable
class Signature(pint.enum, uint16):
# We'll just store all signature types here
_values_ = [
('IMAGE_DOS_SIGNATURE', 0x5a4d),
('IMAGE_OS2_SIGNATURE', 0x454e),
... | 34.210526 | 214 | 0.58634 | 19,728 | 0.91972 | 0 | 0 | 10,194 | 0.475245 | 0 | 0 | 6,383 | 0.297576 |
7ea13c2421a842ac77b2ae86ea0d9775b78d7084 | 955 | py | Python | test/test_utils.py | undecidedzogvisrainbowvitalispotent-360/i2plib | 6edf51cd5d21cc745aa7e23cb98c582144884fa8 | [
"MIT"
] | 25 | 2018-09-05T16:44:05.000Z | 2022-02-16T18:32:32.000Z | test/test_utils.py | undecidedzogvisvitalispotent8stars360/i2plib | 6edf51cd5d21cc745aa7e23cb98c582144884fa8 | [
"MIT"
] | 2 | 2018-10-24T19:57:16.000Z | 2019-01-26T14:30:40.000Z | test/test_utils.py | undecidedzogvisvitalispotent8stars360/i2plib | 6edf51cd5d21cc745aa7e23cb98c582144884fa8 | [
"MIT"
] | 5 | 2018-10-24T18:01:46.000Z | 2020-12-15T18:16:14.000Z | import unittest
import os
import i2plib.sam
import i2plib.utils
class TestUtils(unittest.TestCase):
def test_session_id_generation(self):
sid = i2plib.utils.generate_session_id()
self.assertEqual(len(sid), 13)
sid = i2plib.utils.generate_session_id(8)
self.assertEqual(len(sid), 15... | 28.939394 | 77 | 0.66178 | 887 | 0.928796 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.094241 |
7ea185e9e7bf9f8a9049b8e9ecc9f23bee356df7 | 2,156 | py | Python | arm64/conditional.py | c01db33f/reil | 3deec3a3bb69aae51cc0d728d5f83156cfba2ab6 | [
"Apache-2.0"
] | 27 | 2015-03-16T13:28:00.000Z | 2021-08-02T02:58:23.000Z | arm64/conditional.py | c01db33f/pyreil | 3deec3a3bb69aae51cc0d728d5f83156cfba2ab6 | [
"Apache-2.0"
] | 2 | 2015-02-23T12:18:53.000Z | 2015-03-15T20:31:16.000Z | arm64/conditional.py | c01db33f/reil | 3deec3a3bb69aae51cc0d728d5f83156cfba2ab6 | [
"Apache-2.0"
] | 9 | 2016-03-22T18:59:12.000Z | 2022-02-05T08:18:28.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Mark Brand - c01db33f (at) gmail.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/licenses/LICENSE-2.... | 25.666667 | 77 | 0.581169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 984 | 0.456401 |
7ea23da5c7684f08a14ea23938ae0d58c8dbefb9 | 2,830 | py | Python | open_ocr/rpc_server_base.py | jpnewman/python_ocr_api | 1063a03c273438a8df55d6296b87940bf143aa60 | [
"MIT"
] | null | null | null | open_ocr/rpc_server_base.py | jpnewman/python_ocr_api | 1063a03c273438a8df55d6296b87940bf143aa60 | [
"MIT"
] | null | null | null | open_ocr/rpc_server_base.py | jpnewman/python_ocr_api | 1063a03c273438a8df55d6296b87940bf143aa60 | [
"MIT"
] | null | null | null |
import logging
import pika
LOGGER = logging.getLogger(__name__)
class RpcServer(object):
def __init__(cls, rabbit_config, logfile=None):
cls.rabbit_config = rabbit_config
cls.logfile = logfile
def _setup_logging(cls):
formatter = logging.Formatter('%(asctime)s %(levelname)s %(messa... | 36.282051 | 84 | 0.591166 | 2,761 | 0.975618 | 0 | 0 | 0 | 0 | 0 | 0 | 316 | 0.111661 |
7ea28e8e4d7addcc5853c2f95be5898c08fdb331 | 1,490 | py | Python | s64da_benchmark_toolkit/dbconn.py | a-masterov/s64da-benchmark-toolkit | b1af60c6a1c7d4c62ae9fb5ce04e2c7b59002b0b | [
"MIT"
] | 15 | 2020-03-27T09:40:12.000Z | 2022-03-25T19:55:53.000Z | s64da_benchmark_toolkit/dbconn.py | a-masterov/s64da-benchmark-toolkit | b1af60c6a1c7d4c62ae9fb5ce04e2c7b59002b0b | [
"MIT"
] | 43 | 2020-03-25T10:03:11.000Z | 2021-06-02T01:15:17.000Z | s64da_benchmark_toolkit/dbconn.py | a-masterov/s64da-benchmark-toolkit | b1af60c6a1c7d4c62ae9fb5ce04e2c7b59002b0b | [
"MIT"
] | 6 | 2020-10-08T11:32:40.000Z | 2021-11-17T21:20:44.000Z |
import logging
import time
import psycopg2
from psycopg2.extras import DictCursor
LOG = logging.getLogger()
class DBConn:
def __init__(self, dsn, statement_timeout=0, num_retries=120, retry_wait=1, use_dict_cursor = False):
self.dsn = dsn
self.conn = None
self.cursor = None
self... | 31.702128 | 109 | 0.624832 | 1,376 | 0.92349 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.130201 |
7ea4d785d48817245d9b222be270587ab13b327a | 436 | py | Python | examples/test_pos_boot_normal.py | zmdismai/tcf | 3903e0a2f444c3aa14647a5147a0df76a49e4195 | [
"Apache-2.0"
] | null | null | null | examples/test_pos_boot_normal.py | zmdismai/tcf | 3903e0a2f444c3aa14647a5147a0df76a49e4195 | [
"Apache-2.0"
] | null | null | null | examples/test_pos_boot_normal.py | zmdismai/tcf | 3903e0a2f444c3aa14647a5147a0df76a49e4195 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
import tcfl.tc
import tcfl.tl
import tcfl.pos
@tcfl.tc.interconnect("ipv4_addr")
@tcfl.tc.target('pos_capable')
class _test(tcfl.tc.tc_c):
"""
Boot a target to the provisioned OS (not Provisioning OS)
"""
def eval(self, ic, target):
ic.power.on()
target.pos.boot_nor... | 20.761905 | 61 | 0.646789 | 302 | 0.692661 | 0 | 0 | 368 | 0.844037 | 0 | 0 | 121 | 0.277523 |
7ea4f26b832f9d8e48b3a6b69e37f65806d63b1b | 1,367 | py | Python | ImGen.py | ibaranov-cp/ImGen_Circuit_Maker | 50c328ec0f62a77908dc3179de8fbf123f38caec | [
"BSD-3-Clause"
] | null | null | null | ImGen.py | ibaranov-cp/ImGen_Circuit_Maker | 50c328ec0f62a77908dc3179de8fbf123f38caec | [
"BSD-3-Clause"
] | null | null | null | ImGen.py | ibaranov-cp/ImGen_Circuit_Maker | 50c328ec0f62a77908dc3179de8fbf123f38caec | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#BSD 3-Clause License
#Copyright (c) 2017, Ilia Baranov
#############################################
# CHANGE THESE VARS AS NEEDED
size = 10 #size of squares in mils
invert = False #Color invert the image
image_name = "test.png" #name of the image, can be BMP, PNG or JPG
#########... | 23.982456 | 74 | 0.504755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 500 | 0.365764 |
7ea621576562b5fb32452a65b61e929a0460d182 | 13,564 | py | Python | ckan/tests/functional/test_publisher_auth.py | dadosgovbr/ckan | f2ed9a03581c3229cf01209baa9a02a71642e0b6 | [
"BSD-3-Clause"
] | 2 | 2015-11-05T12:04:52.000Z | 2017-08-09T11:29:11.000Z | ckan/tests/functional/test_publisher_auth.py | dadosgovbr/ckan | f2ed9a03581c3229cf01209baa9a02a71642e0b6 | [
"BSD-3-Clause"
] | null | null | null | ckan/tests/functional/test_publisher_auth.py | dadosgovbr/ckan | f2ed9a03581c3229cf01209baa9a02a71642e0b6 | [
"BSD-3-Clause"
] | null | null | null | import re
from nose.tools import assert_equal
import ckan.model as model
from ckan.lib.create_test_data import CreateTestData
from ckan.logic import NotAuthorized
from ckan.tests import *
from ckan.tests import setup_test_search_index
from base import FunctionalTestCase
from ckan.tests import search_related... | 35.60105 | 122 | 0.603804 | 13,158 | 0.970068 | 0 | 0 | 2,902 | 0.213949 | 0 | 0 | 2,356 | 0.173695 |
7ea6762aae019197866e6971cb35189f112a85c4 | 451 | py | Python | py/__main__.py | social-learning/data-structures | 84e9996150d14d7008e9d9d3cf37dcb586266802 | [
"MIT"
] | 2 | 2021-05-07T18:57:21.000Z | 2021-05-09T18:19:32.000Z | py/__main__.py | social-learning/data-structures | 84e9996150d14d7008e9d9d3cf37dcb586266802 | [
"MIT"
] | 3 | 2021-05-06T15:29:53.000Z | 2021-05-07T17:03:22.000Z | py/__main__.py | social-learning/data-structures | 84e9996150d14d7008e9d9d3cf37dcb586266802 | [
"MIT"
] | null | null | null | import src.data_structures.heap
from src.algorithms.misc import powerfulIntegers
class Solution:
def balancedStringSplit(self, s: str) -> int:
bal = 0
stack = []
for c in s:
if c not in stack:
stack.append(c)
else:
stack.pop()
bal += 1
re... | 21.47619 | 48 | 0.585366 | 246 | 0.545455 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.095344 |
7ea6ac2af6bb95e81265bf6707a8fafbd55ae5e0 | 1,121 | py | Python | src/EDA/cleanAcceptedLoans.py | simon555/cs109-FinalProject | 4a7c7b10c02150400fedb36a6c59da0ee06bbcce | [
"MIT"
] | 2 | 2018-11-23T07:12:23.000Z | 2018-11-27T22:13:51.000Z | src/EDA/cleanAcceptedLoans.py | simon555/cs109-FinalProject | 4a7c7b10c02150400fedb36a6c59da0ee06bbcce | [
"MIT"
] | null | null | null | src/EDA/cleanAcceptedLoans.py | simon555/cs109-FinalProject | 4a7c7b10c02150400fedb36a6c59da0ee06bbcce | [
"MIT"
] | 1 | 2018-11-26T17:10:18.000Z | 2018-11-26T17:10:18.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Nov 28 21:56:22 2018
@author: simon
"""
from src.EDA.clean_object import cleanObject
from src.EDA.clean_numeric import cleanNumeric
import pandas as pd
def cleanForDemo(filename):
"""
input : location of the file
output : fully cleaned dataset
... | 21.557692 | 103 | 0.617306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 412 | 0.367529 |
7ea6b0f17a7cddaf370fa292780a167ed669fcc8 | 318 | py | Python | answers/VanshBaijal/Day 6/Question1.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 22 | 2021-03-16T14:07:47.000Z | 2021-08-13T08:52:50.000Z | answers/VanshBaijal/Day 6/Question1.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 174 | 2021-03-16T21:16:40.000Z | 2021-06-12T05:19:51.000Z | answers/VanshBaijal/Day 6/Question1.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 135 | 2021-03-16T16:47:12.000Z | 2021-06-27T14:22:38.000Z | Candies = [int(x) for x in input("Enter the numbers with space: ").split()]
extraCandies=int(input("Enter the number of extra candies: "))
Output=[ ]
i=0
while(i<len(Candies)):
if(Candies[i]+extraCandies>=max(Candies)):
Output.append("True")
else:
Output.append("False")
i+=1
print(Output)
| 26.5 | 75 | 0.644654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.257862 |
7ea8f23726760ea2f3958ff9164e22aa48175835 | 2,031 | py | Python | i2c/motion_sensor.py | Matrix-Robotics/MatrixControl | 0e596be195b2324154bc6ec220172863e311ccb7 | [
"MIT"
] | 1 | 2021-07-15T07:33:43.000Z | 2021-07-15T07:33:43.000Z | i2c/motion_sensor.py | Matrix-Robotics/MatrixControl | 0e596be195b2324154bc6ec220172863e311ccb7 | [
"MIT"
] | 1 | 2021-08-12T09:08:10.000Z | 2021-08-12T09:08:10.000Z | i2c/motion_sensor.py | Matrix-Robotics/MatrixControl | 0e596be195b2324154bc6ec220172863e311ccb7 | [
"MIT"
] | null | null | null | class MotionSensor:
"""Get 9Dof data by using MotionSensor.
See [MatrixMotionSensor](https://matrix-robotics.github.io/MatrixMotionSensor/) for more details.
Parameters
----------
i2c_port : int
i2c_port is corresponding with I2C1, I2C2 ... sockets on board.
_dev : class
Matrix... | 29.867647 | 101 | 0.589857 | 2,029 | 0.999015 | 0 | 0 | 0 | 0 | 0 | 0 | 702 | 0.345643 |
7ea9cd90fdf10c43d54fa675ea898cdb76225e1f | 5,855 | py | Python | tests/test_search.py | omaralvarez/trakt.py | 93a6beb73cdd37ffb354d2e9c1892dc39d9c4baf | [
"MIT"
] | null | null | null | tests/test_search.py | omaralvarez/trakt.py | 93a6beb73cdd37ffb354d2e9c1892dc39d9c4baf | [
"MIT"
] | null | null | null | tests/test_search.py | omaralvarez/trakt.py | 93a6beb73cdd37ffb354d2e9c1892dc39d9c4baf | [
"MIT"
] | null | null | null | from tests.core.helpers import read
from six.moves.urllib_parse import urlparse, parse_qsl
from trakt import Trakt
import responses
def search_callback(request):
url = urlparse(request.url)
query = dict(parse_qsl(url.query))
if 'id' in query and 'id_type' in query:
path = 'fixtures/search/lookup... | 29.129353 | 91 | 0.554398 | 0 | 0 | 0 | 0 | 5,132 | 0.876516 | 0 | 0 | 1,577 | 0.269342 |
7ea9f178e2418d2c7e8986651448126d115fa230 | 4,828 | py | Python | test.py | XiaoyongNI/hybrid-inference | c268e1ada019e08f62e3f02fc6d5059130ec5358 | [
"MIT"
] | null | null | null | test.py | XiaoyongNI/hybrid-inference | c268e1ada019e08f62e3f02fc6d5059130ec5358 | [
"MIT"
] | null | null | null | test.py | XiaoyongNI/hybrid-inference | c268e1ada019e08f62e3f02fc6d5059130ec5358 | [
"MIT"
] | null | null | null | from utils import generic_utils as g_utils
import torch
import evaluation as eval
import torch.nn.functional as F
import losses
from datasets import nclt
from datasets import synthetic
from datasets import lorenz
import numpy as np
from utils import generic_utils as g_utils
import time
def test_kalman(args, model, tes... | 36.854962 | 107 | 0.615369 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.072908 |
7eab2e9233141229915ea54e3a9ad3980ec8ae2f | 1,418 | py | Python | nlt/debug/dataset.py | isabella232/neural-light-transport | 04acc39713be464e74e0393315c71416f67a3ef3 | [
"Apache-2.0"
] | 176 | 2020-08-13T02:31:07.000Z | 2022-03-24T05:50:55.000Z | nlt/debug/dataset.py | isabella232/neural-light-transport | 04acc39713be464e74e0393315c71416f67a3ef3 | [
"Apache-2.0"
] | 7 | 2020-11-16T05:07:08.000Z | 2022-02-07T04:19:44.000Z | nlt/debug/dataset.py | isabella232/neural-light-transport | 04acc39713be464e74e0393315c71416f67a3ef3 | [
"Apache-2.0"
] | 30 | 2020-08-13T07:03:34.000Z | 2022-03-23T18:55:26.000Z | # Copyright 2020 Google LLC
#
# 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 writing, ... | 29.541667 | 79 | 0.727786 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 686 | 0.48378 |
7eab677ffe16ca51d58be0908854da05e1f26c5f | 1,928 | py | Python | safirnotification/api.py | byrxiaochun/safir_notification_service | adc7e3ab2b61906480e50264bab0cccd47483189 | [
"Apache-2.0"
] | 1 | 2017-07-14T07:36:22.000Z | 2017-07-14T07:36:22.000Z | safirnotification/api.py | byrxiaochun/safir_notification_service | adc7e3ab2b61906480e50264bab0cccd47483189 | [
"Apache-2.0"
] | null | null | null | safirnotification/api.py | byrxiaochun/safir_notification_service | adc7e3ab2b61906480e50264bab0cccd47483189 | [
"Apache-2.0"
] | 2 | 2017-10-21T12:16:18.000Z | 2019-07-19T05:31:07.000Z | from __future__ import print_function
from flask import Flask
from flask import request
import argparse
import json
import sys
from safirnotification.alarm.alarm_handler import AlarmHandler
from safirnotification.utils import log
from safirnotification.utils.opts import ConfigOpts
LOG = log.get_logger()
Flask.get ... | 27.942029 | 73 | 0.608921 | 0 | 0 | 0 | 0 | 908 | 0.470954 | 0 | 0 | 376 | 0.195021 |
7eabea74e332a66d58fe03d710b978a1be03e172 | 4,259 | py | Python | slack_primitive_cli/command/chat.py | yuji38kwmt/slack-primitive-cli | 12e942d6ace6b71b874f0648bb3b6b5ac6c590a4 | [
"MIT"
] | null | null | null | slack_primitive_cli/command/chat.py | yuji38kwmt/slack-primitive-cli | 12e942d6ace6b71b874f0648bb3b6b5ac6c590a4 | [
"MIT"
] | 50 | 2020-06-29T06:17:23.000Z | 2022-03-28T15:01:33.000Z | slack_primitive_cli/command/chat.py | yuji38kwmt/slack-primitive-cli | 12e942d6ace6b71b874f0648bb3b6b5ac6c590a4 | [
"MIT"
] | null | null | null | import logging
import click
import slack_sdk
from slack_primitive_cli.common.utils import TOKEN_ENVVAR, TOKEN_HELP_MESSAGE, set_logger
logger = logging.getLogger(__name__)
@click.command(
name="chat.postMessage", help="Sends a message to a channel. See https://api.slack.com/methods/chat.postMessage "
)
@click.... | 36.401709 | 119 | 0.702043 | 0 | 0 | 0 | 0 | 4,078 | 0.957502 | 0 | 0 | 2,087 | 0.490021 |
7eac896f2fd732187498b92ce5df251097f85bad | 340 | py | Python | codewars/7 kyu/convert-number-to-string.py | sirken/coding-practice | 9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab | [
"MIT"
] | null | null | null | codewars/7 kyu/convert-number-to-string.py | sirken/coding-practice | 9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab | [
"MIT"
] | null | null | null | codewars/7 kyu/convert-number-to-string.py | sirken/coding-practice | 9c5e23b2c24f525a89a5e1d15ce3aec3ad1a01ab | [
"MIT"
] | null | null | null | from Test import Test, Test as test
'''
We need a function that can transform a number into a string.
What ways of achieving this do you know?
Examples:
number_to_string(123) /* returns '123' */
number_to_string(999) /* returns '999' */
'''
def number_to_string(num):
return str(num)
test.assert_equals(number_t... | 21.25 | 61 | 0.723529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 210 | 0.617647 |
7eae404b9ffdd90228dcb56445e0fd056fc2c5bc | 4,255 | py | Python | hummingbot/connector/derivative/binance_perpetual/binance_perpetual_utils.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 2 | 2022-03-03T10:00:27.000Z | 2022-03-08T13:57:56.000Z | hummingbot/connector/derivative/binance_perpetual/binance_perpetual_utils.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 6 | 2022-01-31T15:44:54.000Z | 2022-03-06T04:27:12.000Z | hummingbot/connector/derivative/binance_perpetual/binance_perpetual_utils.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 1 | 2022-03-31T07:04:49.000Z | 2022-03-31T07:04:49.000Z | import os
import socket
from typing import Any, Dict, Optional
import hummingbot.connector.derivative.binance_perpetual.constants as CONSTANTS
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.config.config_methods import using_exchange
from hummingbot.core.utils.tracking_nonce import g... | 37.324561 | 108 | 0.725969 | 387 | 0.090952 | 0 | 0 | 0 | 0 | 320 | 0.075206 | 1,334 | 0.313514 |
7eae90d3c01eaa4dde6516942f1304a7d7bfc497 | 1,247 | py | Python | Curso Udemy 2022/Curso_Luiz_Otavio/aula_75_ex.py | Matheusfarmaceutico/Exercicios-Python | d1821bd9d11ea0707074c5fe11dead2e85476ebd | [
"MIT"
] | null | null | null | Curso Udemy 2022/Curso_Luiz_Otavio/aula_75_ex.py | Matheusfarmaceutico/Exercicios-Python | d1821bd9d11ea0707074c5fe11dead2e85476ebd | [
"MIT"
] | null | null | null | Curso Udemy 2022/Curso_Luiz_Otavio/aula_75_ex.py | Matheusfarmaceutico/Exercicios-Python | d1821bd9d11ea0707074c5fe11dead2e85476ebd | [
"MIT"
] | null | null | null | def separador():
print("-="*30)
"""
Considerando duas listas de inteiros ou floats (lista A e lista B)
Some os valores nas listas retornando uma nova lista com os valores somados:
Se uma lista for maior que a outra, a soma só vai considerar o tamanho da
menor.
Exemplo:
lista_a = [1, 2, 3, 4, 5, 6, 7]
lista_b ... | 26.531915 | 122 | 0.690457 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 619 | 0.49362 |
7eaf36bdb4bd0189fe015e24c185548232a56d8e | 4,740 | py | Python | Functions_in_Python.py | sichkar-valentyn/Functions_in_Python | 896fdf6fbe186fe319f5ccaddf4d3952d78c32b0 | [
"MIT"
] | 1 | 2021-05-13T20:31:37.000Z | 2021-05-13T20:31:37.000Z | Functions_in_Python.py | sichkar-valentyn/Functions_in_Python | 896fdf6fbe186fe319f5ccaddf4d3952d78c32b0 | [
"MIT"
] | null | null | null | Functions_in_Python.py | sichkar-valentyn/Functions_in_Python | 896fdf6fbe186fe319f5ccaddf4d3952d78c32b0 | [
"MIT"
] | null | null | null | # File: Functions_in_Python.py
# Description: Creating functions in Python
# Environment: Spyder IDE in Anaconda environment
#
# MIT License
# Copyright (c) 2018 Valentyn N Sichkar
# github.com/sichkar-valentyn
#
# Reference to:
# [1] Valentyn N Sichkar. Creating functions in Python // GitHub platform [Electronic resou... | 41.946903 | 186 | 0.611181 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,309 | 0.487131 |
7eb022ba017c96463108c7ec8dbea1b02a79b2bf | 1,571 | py | Python | jaseci_serv/jaseci_serv/base/admin.py | Gorgeous-Patrick/jaseci | b423165fefbbc9574cd4467ee05728add7f47e5a | [
"MIT"
] | 6 | 2021-10-30T03:35:36.000Z | 2022-02-10T02:06:18.000Z | jaseci_serv/jaseci_serv/base/admin.py | Gorgeous-Patrick/jaseci | b423165fefbbc9574cd4467ee05728add7f47e5a | [
"MIT"
] | 85 | 2021-10-29T22:47:39.000Z | 2022-03-31T06:11:52.000Z | jaseci_serv/jaseci_serv/base/admin.py | Gorgeous-Patrick/jaseci | b423165fefbbc9574cd4467ee05728add7f47e5a | [
"MIT"
] | 12 | 2021-11-03T17:29:22.000Z | 2022-03-30T16:01:53.000Z | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from jaseci_serv.base import models
class UserAdmin(BaseUserAdmin):
"""
Customized user listing for admin page
"""
ordering = ["time_created"]
list_... | 24.936508 | 86 | 0.551878 | 1,211 | 0.770847 | 0 | 0 | 0 | 0 | 0 | 0 | 467 | 0.297263 |
7eb19e8b95185663f63c59aabd713e0c10af913c | 1,551 | py | Python | app.py | CoDeRgAnEsh/Rent-flask | 1a796196ebe613c7cea77ad6ac96ca91ca98070f | [
"MIT"
] | 3 | 2018-10-21T08:18:16.000Z | 2019-05-20T19:43:23.000Z | app.py | CoDeRgAnEsh/Rent-flask | 1a796196ebe613c7cea77ad6ac96ca91ca98070f | [
"MIT"
] | null | null | null | app.py | CoDeRgAnEsh/Rent-flask | 1a796196ebe613c7cea77ad6ac96ca91ca98070f | [
"MIT"
] | null | null | null | #!/usr/bin env python
import numpy as np
import pandas as pd
from flask import Flask, abort, jsonify, request
import pickle
# from flask_accept import accept
from flask_cors import CORS
with open('model.pkl', 'rb') as model:
xgb_model = pickle.load(model)
features = ['longitude', 'latitude', 'gym', 'lift', 'swi... | 26.741379 | 96 | 0.638298 | 0 | 0 | 0 | 0 | 570 | 0.367505 | 0 | 0 | 656 | 0.422953 |