hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
959646eef9433e3e87420a73eb27d8ede2fa91e0 | 1,460 | py | Python | python/dataingest/grammar/dmo/python_directory_loader.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/dataingest/grammar/dmo/python_directory_loader.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/dataingest/grammar/dmo/python_directory_loader.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
from typing import Optional
from base import BaseObject
class PythonDirectoryLoader(BaseObject):
""" Extract Python File from a Directory Path """
def __init__(self,
directory_path: str,
is_debug: bool = False):
... | 27.54717 | 103 | 0.574658 |
84d174cd455ea84f97632c778603bbe141b404b9 | 1,580 | py | Python | test/resource_test.py | IlluminatiFish/DotHub-DiscordBot | e34ac76e14fa7eaa09c43346b5505fd2371ec751 | [
"MIT"
] | null | null | null | test/resource_test.py | IlluminatiFish/DotHub-DiscordBot | e34ac76e14fa7eaa09c43346b5505fd2371ec751 | [
"MIT"
] | null | null | null | test/resource_test.py | IlluminatiFish/DotHub-DiscordBot | e34ac76e14fa7eaa09c43346b5505fd2371ec751 | [
"MIT"
] | null | null | null | from models.resource_item import ResourceItem
from models.resource import Resource
import unittest
class ResourceTest(unittest.TestCase):
resource_item_1 = ResourceItem("title1", "https://google.com.ar")
resource_item_2 = ResourceItem("title2", "https://google.com.cl", mini_description="google from chile")
reso... | 47.878788 | 150 | 0.66519 |
cd307db579ec2a192a2ffdfc16114caa0097c4d7 | 522 | py | Python | h2o/logo.py | H2O-YT/manim | ae65662823a95b1110536fae34e06d5c540cc424 | [
"MIT"
] | null | null | null | h2o/logo.py | H2O-YT/manim | ae65662823a95b1110536fae34e06d5c540cc424 | [
"MIT"
] | null | null | null | h2o/logo.py | H2O-YT/manim | ae65662823a95b1110536fae34e06d5c540cc424 | [
"MIT"
] | null | null | null | from manimlib.constants import WHITE
from manimlib.mobject.geometry import Circle
from manimlib.mobject.svg.tex_mobject import Tex
from manimlib.mobject.types.vectorized_mobject import VMobject
MY_GREEN = "#419425"
class H2OLogo(VMobject):
def __init__(self, surround_class=Circle, stroke_opacity=1.0):
... | 32.625 | 109 | 0.739464 |
8cb34be927f581fd23a76e6ef201f5c7e899157d | 6,933 | py | Python | homeassistant/components/dlna_dms/config_flow.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/dlna_dms/config_flow.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/dlna_dms/config_flow.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Config flow for DLNA DMS."""
from __future__ import annotations
import logging
from pprint import pformat
from typing import Any, cast
from urllib.parse import urlparse
from async_upnp_client.profiles.dlna import DmsDevice
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.compon... | 37.885246 | 88 | 0.666234 |
ae59337680c83336bf379ae350966c9f09140115 | 343 | py | Python | art/migrations/0004_auto_20200627_1202.py | brayokenya/The-Louvre | 4c01d3aafe1cb41b521aa3b06b9988979d967857 | [
"MIT"
] | null | null | null | art/migrations/0004_auto_20200627_1202.py | brayokenya/The-Louvre | 4c01d3aafe1cb41b521aa3b06b9988979d967857 | [
"MIT"
] | 7 | 2021-03-30T13:54:23.000Z | 2021-09-22T19:19:10.000Z | art/migrations/0004_auto_20200627_1202.py | brayokenya/The-Louvre | 4c01d3aafe1cb41b521aa3b06b9988979d967857 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-06-27 09:02
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('art', '0003_auto_20200626_1611'),
]
operations = [
migrations.AlterModelOptions(
name='pic',
options={'ordering': ['-pub_dat... | 19.055556 | 48 | 0.58309 |
e2c2f6f5c53fde5ee989aff4861d83530d7eebed | 6,706 | py | Python | swagger_client/api/transaction_summary_api.py | chbndrhnns/ahoi-client | 8bd25f541c05af17c82904fa250272514b7971f2 | [
"MIT"
] | null | null | null | swagger_client/api/transaction_summary_api.py | chbndrhnns/ahoi-client | 8bd25f541c05af17c82904fa250272514b7971f2 | [
"MIT"
] | null | null | null | swagger_client/api/transaction_summary_api.py | chbndrhnns/ahoi-client | 8bd25f541c05af17c82904fa250272514b7971f2 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
[AHOI cookbook](/ahoi/docs/cookbook/index.html) [Data Privacy](/sandboxmanager/#/privacy) [Terms of Service](/sandboxmanager/#/terms) [Imprint](https://sparkassen-hub.com/impressum/) © 2016‐2017 Starfinanz - Ein Unternehmen der Finanz Informatik # noqa: E501
OpenAPI sp... | 43.545455 | 277 | 0.631077 |
18104e8c9b7732e46700415b2c404b46321e2022 | 663 | py | Python | data/train/python/18104e8c9b7732e46700415b2c404b46321e2022app.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/18104e8c9b7732e46700415b2c404b46321e2022app.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/18104e8c9b7732e46700415b2c404b46321e2022app.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | import argparse
import json
import os
from urllib import urlencode
from cement.core import foundation, controller
from pulldb import interfaces
from pulldb import oauth
class BaseController(controller.CementBaseController):
class Meta:
label = 'base'
@controller.expose(aliases=['help'], aliases_only... | 20.71875 | 62 | 0.6546 |
ed2db70d6560ae6cc156e115595330c7fc8d8160 | 233 | py | Python | dsstock/stock/report/stock_raport/stock_raport.py | KKallas/Frappe-DS-Stock | 521714791faaf56ea0862a8f5de984e305d344cc | [
"MIT"
] | null | null | null | dsstock/stock/report/stock_raport/stock_raport.py | KKallas/Frappe-DS-Stock | 521714791faaf56ea0862a8f5de984e305d344cc | [
"MIT"
] | null | null | null | dsstock/stock/report/stock_raport/stock_raport.py | KKallas/Frappe-DS-Stock | 521714791faaf56ea0862a8f5de984e305d344cc | [
"MIT"
] | null | null | null | # Copyright (c) 2013, digitalsputnik and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
def execute(filters=None):
columns, data = [], []
return columns, data
| 23.3 | 53 | 0.772532 |
ec65dad7582455afe47559c87a07351966139f6b | 3,282 | py | Python | examples/uv/UV_tf_singletask.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 3,782 | 2016-02-21T03:53:11.000Z | 2022-03-31T16:10:26.000Z | examples/uv/UV_tf_singletask.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 2,666 | 2016-02-11T01:54:54.000Z | 2022-03-31T11:14:33.000Z | examples/uv/UV_tf_singletask.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 1,597 | 2016-02-21T03:10:08.000Z | 2022-03-30T13:21:28.000Z | """
Script that trains Tensorflow Multitask models on UV dataset.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import os
import numpy as np
import tempfile
import shutil
import deepchem as dc
###Load data###
shard_size = 2000
num_trials = 1
print("... | 30.388889 | 78 | 0.666667 |
6fe32073febb378982f34b683e6ee4bd2a9def77 | 1,630 | py | Python | pbu/default_options.py | ilfrich/python-basic-utils | 195aa0226477e7c83bb68ca5459b538a937c9994 | [
"Apache-2.0"
] | null | null | null | pbu/default_options.py | ilfrich/python-basic-utils | 195aa0226477e7c83bb68ca5459b538a937c9994 | [
"Apache-2.0"
] | 2 | 2020-02-13T11:15:16.000Z | 2020-02-13T11:16:54.000Z | pbu/default_options.py | ilfrich/python-basic-utils | 195aa0226477e7c83bb68ca5459b538a937c9994 | [
"Apache-2.0"
] | null | null | null | from typing import Any, List
def default_options(default: dict = {}, override: dict = None, allow_unknown_keys: bool = True):
"""
Combines the dictionaries provided as parameters into one, where keys in override will replace keys in default.
The inputs are not mutated.
:param default: the default dict... | 38.809524 | 117 | 0.706135 |
8490babeaa519c9697f4b3393c84c47cb7311a65 | 421 | py | Python | freecodecamp/brownie/FundMe/scripts/transact.py | People-Help-People/contract-collection | 003a481b8c7a8ed660f24098c4f7c5cdab4549dd | [
"MIT"
] | null | null | null | freecodecamp/brownie/FundMe/scripts/transact.py | People-Help-People/contract-collection | 003a481b8c7a8ed660f24098c4f7c5cdab4549dd | [
"MIT"
] | null | null | null | freecodecamp/brownie/FundMe/scripts/transact.py | People-Help-People/contract-collection | 003a481b8c7a8ed660f24098c4f7c5cdab4549dd | [
"MIT"
] | null | null | null | from brownie import accounts, FundMe
from scripts.helper import get_account
def fund():
fund_me = FundMe[-1]
account = get_account()
minimum_amount = fund_me.getEntranceFee()
fund_me.fund({"from": account, "value": minimum_amount})
def withdraw():
fund_me = FundMe[-1]
account = ... | 20.047619 | 61 | 0.63658 |
994cab1bd675ccc854ca9cc63429fb6862591eba | 6,985 | py | Python | gym_extensions/discrete/classic/cartpole.py | vBarbaros/gym-extensions | f17058459b36756cd9bb0877689ab29a729e9dd0 | [
"MIT"
] | 1 | 2018-06-06T21:30:49.000Z | 2018-06-06T21:30:49.000Z | gym_extensions/discrete/classic/cartpole.py | vBarbaros/gym-extensions | f17058459b36756cd9bb0877689ab29a729e9dd0 | [
"MIT"
] | null | null | null | gym_extensions/discrete/classic/cartpole.py | vBarbaros/gym-extensions | f17058459b36756cd9bb0877689ab29a729e9dd0 | [
"MIT"
] | 1 | 2019-01-27T12:09:43.000Z | 2019-01-27T12:09:43.000Z | """
Classic cart-pole system implemented by Rich Sutton et al.
Copied from https://webdocs.cs.ualberta.ca/~sutton/book/code/pole.c
"""
import logging
import math
import gym
from gym import spaces
from gym.utils import seeding
import numpy as np
logger = logging.getLogger(__name__)
def register_custom_cartpole(tag, g... | 38.169399 | 230 | 0.609878 |
24262e78acd4c62d1bedcf92ffcdab5349e9e5bc | 1,697 | py | Python | Chapter08/seleniumLocator.py | athertahir/web-scraping-with-python | 5f23f64133b383c555be26ea344522cf629045ea | [
"MIT"
] | null | null | null | Chapter08/seleniumLocator.py | athertahir/web-scraping-with-python | 5f23f64133b383c555be26ea344522cf629045ea | [
"MIT"
] | null | null | null | Chapter08/seleniumLocator.py | athertahir/web-scraping-with-python | 5f23f64133b383c555be26ea344522cf629045ea | [
"MIT"
] | null | null | null | from selenium import webdriver
chrome_path = '/home/scrapbook/tutorial/web-scraping-with-python/Chapter08/chromedriver'
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("--headless") # Runs Chrome in headless mode.
options.add_argument('--no-sandbox') # # Bypass OS securi... | 36.106383 | 104 | 0.786682 |
c96c0ced9f9705493ce0ba53eda7a618e8f2c893 | 4,517 | py | Python | container_service_extension/pksclient/models/v1/network_profile_request.py | YiouZhu1010/container-service-extension | f36bc250d226609b9a64e99073bb7a752ffb9f9b | [
"BSD-2-Clause"
] | 1 | 2019-02-22T22:10:02.000Z | 2019-02-22T22:10:02.000Z | container_service_extension/pksclient/models/v1/network_profile_request.py | YiouZhu1010/container-service-extension | f36bc250d226609b9a64e99073bb7a752ffb9f9b | [
"BSD-2-Clause"
] | null | null | null | container_service_extension/pksclient/models/v1/network_profile_request.py | YiouZhu1010/container-service-extension | f36bc250d226609b9a64e99073bb7a752ffb9f9b | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
"""
PKS
PKS API # noqa: E501
OpenAPI spec version: 1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class NetworkProfileRequest(object):
"""NOTE: This class is auto generated by the swagger code ... | 27.047904 | 96 | 0.574718 |
01667ef92e998b6f91968d85d39b0926da17a6b1 | 5,262 | py | Python | examples/toy_mixture_model_discrete_enumeration.py | kashif/pyro | b65b329d8b851c7402acaef9c176a8964caadaf3 | [
"Apache-2.0"
] | 2 | 2021-01-04T01:35:23.000Z | 2021-01-04T01:35:32.000Z | examples/toy_mixture_model_discrete_enumeration.py | kashif/pyro | b65b329d8b851c7402acaef9c176a8964caadaf3 | [
"Apache-2.0"
] | null | null | null | examples/toy_mixture_model_discrete_enumeration.py | kashif/pyro | b65b329d8b851c7402acaef9c176a8964caadaf3 | [
"Apache-2.0"
] | null | null | null | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
"""
A toy mixture model to provide a simple example for implementing discrete enumeration.
(A) -> [B] -> (C)
A is an observed Bernoulli variable with Beta prior.
B is a hidden variable which is a mixture of two Bernoulli distribu... | 38.977778 | 110 | 0.644812 |
ff4ccbfd416a30473e79e449f9e9fefaf2c52a02 | 688 | py | Python | setup.py | andyhu4023/backtest_pkg | 00f57244307a740245c6419c8a52cb07e80f171a | [
"MIT"
] | 3 | 2020-04-22T09:27:33.000Z | 2021-02-04T14:55:13.000Z | setup.py | andyhu4023/backtest_pkg | 00f57244307a740245c6419c8a52cb07e80f171a | [
"MIT"
] | 1 | 2021-02-04T14:54:06.000Z | 2021-02-04T14:54:06.000Z | setup.py | andyhu4023/backtest_pkg | 00f57244307a740245c6419c8a52cb07e80f171a | [
"MIT"
] | 1 | 2021-12-18T10:03:13.000Z | 2021-12-18T10:03:13.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="backtest_pkg",
version="0.2.0",
author="Andy Hu",
author_email="andyhu2014@gmail.com",
description="A package for backtesting portfolio strategies and trading signals",
long_descriptio... | 31.272727 | 85 | 0.678779 |
d60d16ff42d4d6a8eb0c612e97dcc58cfbde350e | 270 | py | Python | sololearn/thatsodd.py | ehlodex/Python3 | 126c4662d1371ec6cbc1f257bd3de5c1dcdc86a6 | [
"MIT"
] | null | null | null | sololearn/thatsodd.py | ehlodex/Python3 | 126c4662d1371ec6cbc1f257bd3de5c1dcdc86a6 | [
"MIT"
] | null | null | null | sololearn/thatsodd.py | ehlodex/Python3 | 126c4662d1371ec6cbc1f257bd3de5c1dcdc86a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env/ python3
"""SoloLearn > Code Coach > That's odd..."""
quantity = int(input('How many numbers? '))
sum = int(0)
for i in range(0, quantity):
number = int(input('Please type a number: '))
if number % 2 == 0:
sum = sum + number
print(sum)
| 20.769231 | 49 | 0.592593 |
0a7756d1b411f0ed732bac1d896d18b99b98f80a | 7,816 | py | Python | tests/test_managers.py | kmmbvnr/django-polymodels | 7a9b64b1851fea23a64d3d9421a69911e1669a49 | [
"MIT"
] | 1 | 2020-09-29T09:27:30.000Z | 2020-09-29T09:27:30.000Z | tests/test_managers.py | kmmbvnr/django-polymodels | 7a9b64b1851fea23a64d3d9421a69911e1669a49 | [
"MIT"
] | null | null | null | tests/test_managers.py | kmmbvnr/django-polymodels | 7a9b64b1851fea23a64d3d9421a69911e1669a49 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from polymodels.managers import PolymorphicManager
from .base import TestCase
from .models import Animal, BigSnake, HugeSnake, Mammal, Monkey, Snake, Zoo
class PolymorphicQuerySetTest(TestCa... | 46.248521 | 111 | 0.553096 |
89f7676ecc366d8dd11ef6260f8d50c950ce28e7 | 2,073 | py | Python | predict.py | mandalbiswadip/hierarchical-attention-networks | c1d15db91fdad075267a9b6943e06a1da7b076ad | [
"MIT"
] | 1 | 2019-08-29T09:53:43.000Z | 2019-08-29T09:53:43.000Z | predict.py | mandalbiswadip/hierarchical-attention-networks | c1d15db91fdad075267a9b6943e06a1da7b076ad | [
"MIT"
] | 1 | 2022-02-10T02:00:50.000Z | 2022-02-10T02:00:50.000Z | predict.py | mandalbiswadip/hierarchical-attention-networks | c1d15db91fdad075267a9b6943e06a1da7b076ad | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import pandas as pd
from models.text import CustomTokenizer
from models.model import word_list, max_sentences, maxlen
print("load")
MODEL_PATH = ""
# Note: also change the layer type (lstm vs attention) while loading
#=========================================... | 25.280488 | 83 | 0.643029 |
42126c197db5e8f75f40ff7a856b2f56272010fb | 2,683 | py | Python | Python/readTLEwriteCSV.py | kgkIEEE/Gemini2 | 23ac265c1191664a93c394d1ab2b11ad050876f1 | [
"MIT"
] | 1 | 2020-05-29T06:22:10.000Z | 2020-05-29T06:22:10.000Z | Python/readTLEwriteCSV.py | kgkIEEE/Gemini2 | 23ac265c1191664a93c394d1ab2b11ad050876f1 | [
"MIT"
] | null | null | null | Python/readTLEwriteCSV.py | kgkIEEE/Gemini2 | 23ac265c1191664a93c394d1ab2b11ad050876f1 | [
"MIT"
] | null | null | null | import argparse
import csv
from skyfield import api
from skyfield.api import EarthSatellite
from skyfield.constants import AU_KM, AU_M
from skyfield.sgp4lib import TEME_to_ITRF
from skyfield.api import Topos, load
# Read TLE file and write key parameters in CSV format
def readTLE(tleFilename):
# Open TLE filenam... | 33.5375 | 80 | 0.619456 |
95de7f2588e260a3254cd84e47f4fd36478f50cd | 1,061 | py | Python | src/intensio_obfuscator/obfuscation_examples/python/intermediate/input/basicRAT-example/core/toolkit.py | bbhunter/Intensio-Obfuscator | f66a22b50c19793edac673cfd7dc319405205c39 | [
"MIT"
] | 553 | 2019-06-08T17:47:41.000Z | 2022-03-29T03:12:11.000Z | intensio/test/python/intermediate/input/basicRAT-example/core/toolkit.py | Chudry/Intensio-Obfuscator | 62f6c8871704693ca79342efb03dcd2530d7614e | [
"MIT"
] | 69 | 2019-06-08T13:25:47.000Z | 2022-02-15T08:34:07.000Z | intensio/test/python/intermediate/input/basicRAT-example/core/toolkit.py | Chudry/Intensio-Obfuscator | 62f6c8871704693ca79342efb03dcd2530d7614e | [
"MIT"
] | 130 | 2019-06-08T18:44:13.000Z | 2022-03-27T01:00:52.000Z | # -*- coding: utf-8 -*-
#---------------------------------------------------------- [Lib] -----------------------------------------------------------#
import datetime
import os
import urllib
import zipfile
#--------------------------------------------------- [Function(s)/Class] --------------------------------------... | 28.675676 | 126 | 0.447691 |
e5cdd72385da843dd82d7a55ede32f2e86c71d49 | 656 | py | Python | cmd/suggestion/random/v1alpha2/main.py | samplise/katib | 08234c3eccd43b11484fd78c9352eafbdc9152d8 | [
"Apache-2.0"
] | 1 | 2020-11-08T17:04:21.000Z | 2020-11-08T17:04:21.000Z | cmd/suggestion/random/v1alpha2/main.py | samplise/katib | 08234c3eccd43b11484fd78c9352eafbdc9152d8 | [
"Apache-2.0"
] | null | null | null | cmd/suggestion/random/v1alpha2/main.py | samplise/katib | 08234c3eccd43b11484fd78c9352eafbdc9152d8 | [
"Apache-2.0"
] | 1 | 2020-08-03T15:42:48.000Z | 2020-08-03T15:42:48.000Z | import grpc
import time
from pkg.apis.manager.v1alpha2.python import api_pb2_grpc
from pkg.suggestion.v1alpha2.random_service import RandomService
from concurrent import futures
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
DEFAULT_PORT = "0.0.0.0:6789"
def serve():
server = grpc.server(futures.ThreadPoolExecutor(max_worker... | 27.333333 | 74 | 0.734756 |
e0b44ffa75c375976690b9d37df676899875c15b | 14,948 | py | Python | src/ipyradiant/visualization/cytoscape/interactive.py | pattersoniv/ipyradiant | bcfb88c09cadc732b0accbdd7c07be0342e2b918 | [
"BSD-3-Clause"
] | 5 | 2021-02-12T14:55:49.000Z | 2022-03-21T21:30:54.000Z | src/ipyradiant/visualization/cytoscape/interactive.py | pattersoniv/ipyradiant | bcfb88c09cadc732b0accbdd7c07be0342e2b918 | [
"BSD-3-Clause"
] | 92 | 2020-07-24T20:17:22.000Z | 2022-02-18T13:35:56.000Z | src/ipyradiant/visualization/cytoscape/interactive.py | pattersoniv/ipyradiant | bcfb88c09cadc732b0accbdd7c07be0342e2b918 | [
"BSD-3-Clause"
] | 6 | 2020-07-28T18:28:07.000Z | 2022-01-19T11:39:51.000Z | # Copyright (c) 2021 ipyradiant contributors.
# Distributed under the terms of the Modified BSD License.
import ipywidgets as W
import traitlets as T
from IPython.display import JSON, display
from networkx import Graph as NXGraph
from pandas import DataFrame
from rdflib.graph import Graph as RDFGraph
from rdflib.term ... | 35.760766 | 123 | 0.603559 |
672e3ab8a1a6fee1351eaceaaba2bb202e67a285 | 910 | py | Python | backend/clubs/migrations/0065_auto_20201218_1830.py | pennlabs/penn-clubs | 6165e56ee5745295adc14fe114c4973173c2cb43 | [
"MIT"
] | 23 | 2020-01-15T20:11:06.000Z | 2022-01-01T12:47:50.000Z | backend/clubs/migrations/0065_auto_20201218_1830.py | pennlabs/penn-clubs | 6165e56ee5745295adc14fe114c4973173c2cb43 | [
"MIT"
] | 397 | 2020-01-17T03:42:30.000Z | 2022-03-07T23:37:16.000Z | backend/clubs/migrations/0065_auto_20201218_1830.py | pennlabs/penn-clubs | 6165e56ee5745295adc14fe114c4973173c2cb43 | [
"MIT"
] | 7 | 2020-01-29T05:11:38.000Z | 2022-01-03T19:41:59.000Z | # Generated by Django 3.1.4 on 2020-12-18 23:30
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("clubs", "0064_auto_20201215_1904"),
]
operations = [
migrations.AddField(
model_name="club",
name="ics_... | 25.277778 | 65 | 0.568132 |
fd5f45ce54dbf36e6050a421f773bb06e628f2b4 | 10,721 | py | Python | packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py | miriad/plotly.py | f083bea25691ff64a30008f46f77fc1edc11ad63 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py | pythonthings/plotly.py | b770468d392bf89cbfc630e2c02bd54ec5db97a7 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py | pythonthings/plotly.py | b770468d392bf89cbfc630e2c02bd54ec5db97a7 | [
"MIT"
] | null | null | null | """
Module to test plotly.utils with optional dependencies.
"""
from __future__ import absolute_import
import datetime
import math
import decimal
from datetime import datetime as dt
from unittest import TestCase
import numpy as np
import pandas as pd
import pytz
from nose.plugins.attrib import attr
from pandas.util.... | 35.035948 | 88 | 0.594348 |
c051411636fc1556fa881099adaa7e199ce80376 | 525 | py | Python | src/action/migrations/0016_auto_20180522_2146.py | japesone/ontask_b | 17af441f9893c521d2e14011e7790ba4077e3318 | [
"MIT"
] | 3 | 2018-08-24T10:48:40.000Z | 2020-05-29T06:33:23.000Z | src/action/migrations/0016_auto_20180522_2146.py | japesone/ontask_b | 17af441f9893c521d2e14011e7790ba4077e3318 | [
"MIT"
] | null | null | null | src/action/migrations/0016_auto_20180522_2146.py | japesone/ontask_b | 17af441f9893c521d2e14011e7790ba4077e3318 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-05-22 12:16
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('action', '0015_condition_n_rows_selected_update'),
]
operations = [
migrations.Alt... | 21.875 | 60 | 0.6 |
d4b0359d949225a3d7c1aa0294cc6d5e19dc1fa7 | 10,718 | py | Python | tests/contrib/utils/base_gcp_system_test_case.py | FlyrInc/airflow-1 | 74b22337b45a1eb25585d52e35694e6b0eb81f03 | [
"Apache-2.0"
] | 2 | 2019-01-26T06:04:11.000Z | 2019-01-26T12:54:21.000Z | tests/contrib/utils/base_gcp_system_test_case.py | FlyrInc/airflow-1 | 74b22337b45a1eb25585d52e35694e6b0eb81f03 | [
"Apache-2.0"
] | 1 | 2019-02-19T01:15:12.000Z | 2019-02-19T01:15:12.000Z | tests/contrib/utils/base_gcp_system_test_case.py | FlyrInc/airflow-1 | 74b22337b45a1eb25585d52e35694e6b0eb81f03 | [
"Apache-2.0"
] | 2 | 2020-04-24T10:51:17.000Z | 2020-05-26T01:50:29.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 41.065134 | 89 | 0.64387 |
c7fa4e3ad3ae8075ddf7bf92b09c6d1045af716f | 1,242 | py | Python | xldlib/definitions/modules.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | xldlib/definitions/modules.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | xldlib/definitions/modules.py | Alexhuszagh/XLDiscoverer | 60937b1f7f2e23af4219eb26519d6b83fb4232d6 | [
"Apache-2.0",
"MIT"
] | null | null | null | '''
Definitions/modules
___________________
Simplifies imports between Python2 and 3 by specifying module
imports for specific types.
:copyright: (c) 2015 The Regents of the University of California.
:license: GNU GPL, see licenses/GNU GPLv3.txt for more details.
'''
# load modules/submodules... | 24.352941 | 75 | 0.668277 |
3c192923f719474b74af0e068cf308915dd6ba8e | 13,737 | py | Python | tensorflow_probability/python/distributions/pareto_test.py | mjul/tensorflow-probability | c733f06bccceb983f3e9db8e6e3c98b3bd4d23c9 | [
"Apache-2.0"
] | 1 | 2020-04-13T12:31:12.000Z | 2020-04-13T12:31:12.000Z | tensorflow_probability/python/distributions/pareto_test.py | mjul/tensorflow-probability | c733f06bccceb983f3e9db8e6e3c98b3bd4d23c9 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/pareto_test.py | mjul/tensorflow-probability | c733f06bccceb983f3e9db8e6e3c98b3bd4d23c9 | [
"Apache-2.0"
] | 1 | 2020-06-04T23:26:31.000Z | 2020-06-04T23:26:31.000Z | # Copyright 2018 The TensorFlow Probability Authors.
#
# 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 o... | 35.773438 | 78 | 0.665284 |
626479c978a12ab0814b9ddce1934cc5f5097416 | 2,998 | py | Python | experiments/ashvin/gcirl/airl/gail1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/gcirl/airl/gail1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/gcirl/airl/gail1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.launchers.arglauncher import run_variants
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.experiments.goal_distribution.irl_launcher import (
irl_experiment,
process_args
)
from rlkit.launchers.launcher_util import run_experiment
from multiworld.envs.pygame import PickAndPlaceEnv
from ... | 28.552381 | 72 | 0.585057 |
fd9dbc6ba72bd1f11f9ebfff33507edc325002dc | 3,453 | py | Python | tensorflow_probability/python/experimental/__init__.py | rmothukuru/probability | 24352279e5e255e054bfe9c7bdc7080ecb280fba | [
"Apache-2.0"
] | 1 | 2021-07-21T15:54:17.000Z | 2021-07-21T15:54:17.000Z | tensorflow_probability/python/experimental/__init__.py | rmothukuru/probability | 24352279e5e255e054bfe9c7bdc7080ecb280fba | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/experimental/__init__.py | rmothukuru/probability | 24352279e5e255e054bfe9c7bdc7080ecb280fba | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# 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 o... | 42.109756 | 94 | 0.797857 |
cff160213c801e80e6cd02a7d91970a71f42b6a4 | 37,600 | py | Python | plugins/camtrawl/python/viame/processes/camtrawl/algos.py | readicculus/VIAME | 3e65fa4ec9139f73f8f9f4b3c0f1b18ba6209733 | [
"BSD-3-Clause"
] | null | null | null | plugins/camtrawl/python/viame/processes/camtrawl/algos.py | readicculus/VIAME | 3e65fa4ec9139f73f8f9f4b3c0f1b18ba6209733 | [
"BSD-3-Clause"
] | null | null | null | plugins/camtrawl/python/viame/processes/camtrawl/algos.py | readicculus/VIAME | 3e65fa4ec9139f73f8f9f4b3c0f1b18ba6209733 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Reimplementation of matlab algorithms for fishlength detection in python.
The next step is to move them into kwiver.
TODO:
fix hard coded paths for doctests
"""
from __future__ import division, print_function
from collections import namedtuple
import cv2
import itertools as it
import nu... | 37.375746 | 124 | 0.572261 |
47c57b7ac4e38744b834409caec1fecf789f3f90 | 2,710 | py | Python | DeepCFR/workers/la/buffers/AdvReservoirBuffer.py | mohamedun/Deep-CFR | ec3a7fb06e11bd6cc65bb2bf6f16108ee41f7234 | [
"MIT"
] | 192 | 2019-06-19T13:11:04.000Z | 2022-03-30T05:55:57.000Z | DeepCFR/workers/la/buffers/AdvReservoirBuffer.py | mohamedun/Deep-CFR | ec3a7fb06e11bd6cc65bb2bf6f16108ee41f7234 | [
"MIT"
] | 7 | 2019-09-18T19:50:10.000Z | 2021-06-21T02:27:12.000Z | DeepCFR/workers/la/buffers/AdvReservoirBuffer.py | mohamedun/Deep-CFR | ec3a7fb06e11bd6cc65bb2bf6f16108ee41f7234 | [
"MIT"
] | 52 | 2019-07-07T23:08:37.000Z | 2022-01-08T08:11:25.000Z | import torch
from DeepCFR.workers.la.buffers._ReservoirBufferBase import ReservoirBufferBase as _ResBufBase
class AdvReservoirBuffer(_ResBufBase):
def __init__(self, owner, nn_type, max_size, env_bldr, iter_weighting_exponent):
super().__init__(owner=owner, max_size=max_size, env_bldr=env_bldr, nn_type=... | 37.123288 | 111 | 0.615867 |
241800e279dc3c8fafca63a9aa991cc7b9b0e02a | 1,188 | py | Python | counter_ordered.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | counter_ordered.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | counter_ordered.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | """
Created by akiselev on 2019-06-12
Input Format
A single line of input containing the string
.
Constraints
Output Format
Print the three most common characters along with their occurrence count each on a separate line.
Sort output in descending order of occurrence count.
If the occurrence count is the same... | 20.135593 | 127 | 0.68771 |
0e964bfdf519e06f1f1ea45c1fd188d418b3936a | 5,528 | py | Python | main.py | KL35-Ronaldo/Calculator-Bot | c9f08cf626876269acc2b5910bf75c2c0df8bf75 | [
"MIT"
] | null | null | null | main.py | KL35-Ronaldo/Calculator-Bot | c9f08cf626876269acc2b5910bf75c2c0df8bf75 | [
"MIT"
] | null | null | null | main.py | KL35-Ronaldo/Calculator-Bot | c9f08cf626876269acc2b5910bf75c2c0df8bf75 | [
"MIT"
] | null | null | null | from os import getenv
from pyrogram.types import *
from pyrogram import Client, filters
from traceback import format_exc as exc
Bot = Client(
session_name=getenv("SESSION_NAME", "Calculator Bot"),
api_id=int(getenv("API_ID", "0")),
api_hash=getenv("API_HASH", ""),
bot_token = getenv("BOT_TOKEN", ""),
... | 33.101796 | 116 | 0.52623 |
cbdba2fff9f67c5eb1304b70ee0b2ee734adcf3b | 811 | py | Python | office365/directory/subscribedSku.py | andrewcchoi/Office365-REST-Python-Client | 43db12ae532c804c75a3a34f7b0d7d79e30fdac3 | [
"MIT"
] | null | null | null | office365/directory/subscribedSku.py | andrewcchoi/Office365-REST-Python-Client | 43db12ae532c804c75a3a34f7b0d7d79e30fdac3 | [
"MIT"
] | null | null | null | office365/directory/subscribedSku.py | andrewcchoi/Office365-REST-Python-Client | 43db12ae532c804c75a3a34f7b0d7d79e30fdac3 | [
"MIT"
] | null | null | null | from office365.directory.servicePlanInfo import ServicePlanInfo
from office365.entity import Entity
from office365.entity_collection import EntityCollection
from office365.runtime.client_value_collection import ClientValueCollection
class SubscribedSku(Entity):
"""Contains information about a service SKU that a c... | 38.619048 | 95 | 0.762022 |
7e9a5868eaad5db08481423f21eea9fdb30d734a | 454 | py | Python | product/migrations/0012_auto_20200622_1430.py | IHIMEKPEN/Pegasus-beta | f2c1daf97225ef0bc21c0754de5717de65216bce | [
"MIT"
] | 2 | 2022-01-07T15:06:34.000Z | 2022-03-15T20:17:05.000Z | product/migrations/0012_auto_20200622_1430.py | IHIMEKPEN/Pegasus-beta | f2c1daf97225ef0bc21c0754de5717de65216bce | [
"MIT"
] | null | null | null | product/migrations/0012_auto_20200622_1430.py | IHIMEKPEN/Pegasus-beta | f2c1daf97225ef0bc21c0754de5717de65216bce | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-06-22 14:30
import autoslug.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('product', '0011_auto_20200622_1401'),
]
operations = [
migrations.AlterField(
model_name='order',
name=... | 22.7 | 108 | 0.632159 |
c6de4da30bf6784d860cf4044b877678439697a0 | 414 | py | Python | bot/main.py | NixProGaming/hyper | ff4de188c8dc3ee5c69830530c92e8a1bd8d8890 | [
"MIT"
] | null | null | null | bot/main.py | NixProGaming/hyper | ff4de188c8dc3ee5c69830530c92e8a1bd8d8890 | [
"MIT"
] | null | null | null | bot/main.py | NixProGaming/hyper | ff4de188c8dc3ee5c69830530c92e8a1bd8d8890 | [
"MIT"
] | null | null | null | import discord
import os
#import pynacl
#import dnspython
import server
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
TOKEN = os.getenv("NzcyMTA0MDY1NTc1ODEzMTMw.X51z8g.2o7hnez2L8yWaSCKW4vNCKS1pWs")
@bot.event
async def on_ready():
print(f"Logged in as {bot.user.name}({bot.user.id})")
@... | 19.714286 | 80 | 0.748792 |
32adc1d216f3c5a9f9995d65040305508429f520 | 6,481 | py | Python | homeassistant/components/nuheat/climate.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/nuheat/climate.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:34:57.000Z | 2022-03-12T00:59:48.000Z | homeassistant/components/nuheat/climate.py | VirtualL/home-assistant | 301829d02be8d865ab46c8901ac046d060849320 | [
"Apache-2.0"
] | null | null | null | """Support for NuHeat thermostats."""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
DOMAIN, STATE_AUTO, STATE_HEAT, STATE_IDLE, SUPPORT_HOLD_MODE,
SUPPORT_OPERATION_MODE, SU... | 30.00463 | 74 | 0.678753 |
8c2b2bddd67300af1624023c84463fb9487121e6 | 3,372 | py | Python | homeassistant/components/zha/core/channels/lighting.py | mikan-megane/core | 837220cce40890e296920d33a623adbc11bd15a6 | [
"Apache-2.0"
] | 5 | 2018-10-23T14:15:05.000Z | 2021-11-26T06:38:44.000Z | homeassistant/components/zha/core/channels/lighting.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/zha/core/channels/lighting.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 3 | 2022-01-17T20:10:54.000Z | 2022-01-17T20:17:22.000Z | """Lighting channels module for Zigbee Home Automation."""
from __future__ import annotations
from collections.abc import Coroutine
from contextlib import suppress
import zigpy.zcl.clusters.lighting as lighting
from .. import registries
from ..const import REPORT_CONFIG_DEFAULT
from .base import ClientChannel, Zigbe... | 34.762887 | 79 | 0.696619 |
2b83755bedf49d4a7ae7e69cab0a7d4277534490 | 347 | py | Python | examples/hello_world.py | web-i/ripple | d028fbf13bd3c2438c03ae896ac211c1f0c587b3 | [
"MIT"
] | 2 | 2015-01-28T13:20:12.000Z | 2015-03-28T14:58:33.000Z | examples/hello_world.py | web-i/ripple | d028fbf13bd3c2438c03ae896ac211c1f0c587b3 | [
"MIT"
] | null | null | null | examples/hello_world.py | web-i/ripple | d028fbf13bd3c2438c03ae896ac211c1f0c587b3 | [
"MIT"
] | null | null | null | '''
A simple webi application, run by wsgi adaptor.
'''
def hello(environ):
return 200, {'Content-Type': 'text/html'}, '<h3>Hello, from Ripple.</h3>'
if __name__ == '__main__':
import ripple.adaptors
from werkzeug.serving import run_simple
run_simple('localhost', 4000, ripple.adaptors.wsgi(hello), use_debugge... | 28.916667 | 98 | 0.723343 |
53f4f57290a59682491bbb6907798347bc03bb10 | 12,900 | py | Python | folding_v3.py | ctada/napCAD | 59377bcd2e958b48d7ded820b8a43db632049a2b | [
"MIT"
] | 7 | 2015-05-03T05:26:42.000Z | 2022-02-12T20:38:24.000Z | folding_v3.py | ctada/napCAD | 59377bcd2e958b48d7ded820b8a43db632049a2b | [
"MIT"
] | 1 | 2020-02-28T11:04:07.000Z | 2020-02-28T11:05:51.000Z | folding_v3.py | ctada/napCAD | 59377bcd2e958b48d7ded820b8a43db632049a2b | [
"MIT"
] | 4 | 2016-12-07T04:58:36.000Z | 2020-07-13T09:19:09.000Z | """Shivali Chandra
Restructured code that takes coordinates of sides and axes of rotation, and rotates the sides
until they meet, forming a closed 3D shape. As of 5/3/15 can fold cubes, square pyramids, and
other prisms with square bases.
"""
import numpy as np
import math
import collections
def find_intersection_d... | 41.4791 | 333 | 0.653721 |
69b971f81b4dc949fa0d88234559f961465f9fdd | 19,335 | py | Python | AmosPy/amosTokens.py | dschwen/AmosPy | 87deee623ca806e8acb08b85935de2b56a0e3585 | [
"OML",
"CNRI-Python-GPL-Compatible"
] | 1 | 2018-01-16T00:45:49.000Z | 2018-01-16T00:45:49.000Z | AmosPy/amosTokens.py | dschwen/AmosPy | 87deee623ca806e8acb08b85935de2b56a0e3585 | [
"OML",
"CNRI-Python-GPL-Compatible"
] | null | null | null | AmosPy/amosTokens.py | dschwen/AmosPy | 87deee623ca806e8acb08b85935de2b56a0e3585 | [
"OML",
"CNRI-Python-GPL-Compatible"
] | null | null | null | """Token table and code to deal with special cases."""
import struct
def readRem(byteStream):
"""The rem - remark/comment type tokens"""
commentLength = struct.unpack('bb', byteStream.read(2))[1]
bytesRead = 2
comment = struct.unpack('%ds' % commentLength, byteStream.read(commentLength))[0].rstrip("\x... | 24.443742 | 105 | 0.555883 |
208c3be07f867c7a15a47556bb33749a94550fee | 667 | py | Python | AltitudeProfile.py | arodland/IRI2016 | ab9873e597cc78cec40f11e133b83efdbe61ae7c | [
"MIT"
] | 1 | 2020-12-18T11:49:18.000Z | 2020-12-18T11:49:18.000Z | AltitudeProfile.py | arodland/IRI2016 | ab9873e597cc78cec40f11e133b83efdbe61ae7c | [
"MIT"
] | null | null | null | AltitudeProfile.py | arodland/IRI2016 | ab9873e597cc78cec40f11e133b83efdbe61ae7c | [
"MIT"
] | 1 | 2020-12-18T11:49:20.000Z | 2020-12-18T11:49:20.000Z | #!/usr/bin/env python
""" Height Profile Example """
import iri2016 as iri
from argparse import ArgumentParser
from matplotlib.pyplot import show
import iri2016.plots as piri
def main():
p = ArgumentParser()
p.add_argument('time', help='time of simulation')
p.add_argument('latlon', help='geodetic latitud... | 24.703704 | 75 | 0.643178 |
1e38a6a36bc36b6f446a015b928cd6ad70e2b2e8 | 367 | py | Python | setup.py | petr-fedorov/btfxwss | 42f00f0c78fb9962d47e6d24132a753b1823c54b | [
"MIT"
] | 1 | 2018-06-08T08:41:01.000Z | 2018-06-08T08:41:01.000Z | setup.py | qichwi/btfxwss | 42f00f0c78fb9962d47e6d24132a753b1823c54b | [
"MIT"
] | null | null | null | setup.py | qichwi/btfxwss | 42f00f0c78fb9962d47e6d24132a753b1823c54b | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(name='btfxwss', version='1.1.15', author='Nils Diefenbach',
author_email='23okrs20+pypi@mykolab.com',
url="https://github.com/nlsdfnbch/bitfinex_wss", license='LICENCSE',
packages=['btfxwss'], install_requires=['websocket-client'],
description="Python 3.5... | 40.777778 | 75 | 0.713896 |
84d6b58977a829de03cd97f433a8d631bf754889 | 1,444 | py | Python | senlin/drivers/base.py | chenyb4/senlin | 8b9ec31566890dc9989fe08e221172d37c0451b4 | [
"Apache-2.0"
] | null | null | null | senlin/drivers/base.py | chenyb4/senlin | 8b9ec31566890dc9989fe08e221172d37c0451b4 | [
"Apache-2.0"
] | null | null | null | senlin/drivers/base.py | chenyb4/senlin | 8b9ec31566890dc9989fe08e221172d37c0451b4 | [
"Apache-2.0"
] | null | null | null | # 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, software
# distributed unde... | 30.083333 | 75 | 0.713296 |
bc48384ff225fbea060eeed0a66e2d8319596c49 | 2,429 | py | Python | libs/labelDialog.py | cclauss/labelImg | 7cef42c8dfab32147ab29526e7ed6d73df16943e | [
"MIT"
] | 67 | 2018-02-03T01:25:55.000Z | 2022-03-08T09:02:20.000Z | libs/labelDialog.py | cclauss/labelImg | 7cef42c8dfab32147ab29526e7ed6d73df16943e | [
"MIT"
] | 1 | 2018-04-03T19:31:42.000Z | 2018-04-05T15:48:38.000Z | libs/labelDialog.py | cclauss/labelImg | 7cef42c8dfab32147ab29526e7ed6d73df16943e | [
"MIT"
] | 35 | 2018-07-18T07:39:00.000Z | 2022-03-08T12:13:42.000Z | try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from libs.lib import newIcon, labelValidator
BB = QDialogButtonBox
class LabelDialog(QDialog):
def __init__(self, text="Enter obje... | 33.736111 | 78 | 0.619185 |
cd2c632f74286975f7175a4186724ecbfe4be4f5 | 7,565 | py | Python | lib/historiad.py | HistoriaOffical/sentinel | 345fd0579ecd1ebab7ebfa9749e976709f023fda | [
"MIT"
] | null | null | null | lib/historiad.py | HistoriaOffical/sentinel | 345fd0579ecd1ebab7ebfa9749e976709f023fda | [
"MIT"
] | null | null | null | lib/historiad.py | HistoriaOffical/sentinel | 345fd0579ecd1ebab7ebfa9749e976709f023fda | [
"MIT"
] | 1 | 2019-06-05T00:37:57.000Z | 2019-06-05T00:37:57.000Z | """
historiad JSONRPC interface
"""
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib'))
import config
import base58
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
from masternode import Masternode
... | 35.186047 | 87 | 0.660145 |
f512d465b9f81f3dfb42c9052c989a132310ce31 | 2,702 | py | Python | day01.py | zzjwx/PythonByzzj | 16ce2eefd3042a771e4901cb6d1d6c86eb0a2b42 | [
"Apache-2.0"
] | null | null | null | day01.py | zzjwx/PythonByzzj | 16ce2eefd3042a771e4901cb6d1d6c86eb0a2b42 | [
"Apache-2.0"
] | null | null | null | day01.py | zzjwx/PythonByzzj | 16ce2eefd3042a771e4901cb6d1d6c86eb0a2b42 | [
"Apache-2.0"
] | null | null | null | # a = int(input('输入一个年份'))
# if (a % 4 ==0 and a % 100 !=0) or (a % 400 ==0):
# print ('%d 是闰年'%a )
# else:
# print ('%d 不是闰年'%a )
# 1
# celsius = float(input('请输入摄氏温度'))
# fahrenheit = 1.8 * celsius + 32
# print('%.1f摄氏度 = %.1f华氏度' % (celsius,fahrenheit))
# 2
# import math
# π = ... | 14.526882 | 52 | 0.492228 |
609663bba5c57af263d925ecab10273866907ed8 | 204 | py | Python | python_modules/dagster/dagster_tests/cli_tests/command_tests/file_with_local_import.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/dagster/dagster_tests/cli_tests/command_tests/file_with_local_import.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/dagster/dagster_tests/cli_tests/command_tests/file_with_local_import.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | import dummy_local_file # pylint:disable=import-error,unused-import
from dagster_tests.cli_tests.command_tests.test_cli_commands import ( # pylint:disable=unused-import
foo_pipeline,
qux_job,
)
| 34 | 101 | 0.803922 |
7b5fce4c359ae57d6a893349812735d131b5afcc | 4,072 | py | Python | neuralogic/core/settings/__init__.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | neuralogic/core/settings/__init__.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | neuralogic/core/settings/__init__.py | LukasZahradnik/PyNeurologic | 99025a92e86f772b139369acf75d08a3b506994d | [
"MIT"
] | null | null | null | from typing import Any, Optional
import weakref
from neuralogic.core.settings.settings_proxy import SettingsProxy
from neuralogic.core.enums import Optimizer, Initializer, ErrorFunction, Activation
class Settings:
def __init__(
self,
*,
optimizer: Optimizer = Optimizer.ADAM,
learn... | 30.616541 | 87 | 0.68443 |
d938dd20e67eafd942f071adfe1e1aec04796648 | 9,219 | py | Python | homeassistant/components/cloud/__init__.py | boojew/home-assistant | 697c331903f8a440a4ce324a4fb0788351dc86c3 | [
"Apache-2.0"
] | 3 | 2019-01-24T20:32:14.000Z | 2022-03-22T14:25:48.000Z | homeassistant/components/cloud/__init__.py | boojew/home-assistant | 697c331903f8a440a4ce324a4fb0788351dc86c3 | [
"Apache-2.0"
] | 6 | 2021-02-08T21:02:40.000Z | 2022-03-12T00:52:16.000Z | homeassistant/components/cloud/__init__.py | boojew/home-assistant | 697c331903f8a440a4ce324a4fb0788351dc86c3 | [
"Apache-2.0"
] | 1 | 2019-08-13T11:54:30.000Z | 2019-08-13T11:54:30.000Z | """
Component to integrate the Home Assistant cloud.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/cloud/
"""
from datetime import datetime, timedelta
import json
import logging
import os
import voluptuous as vol
from homeassistant.const import (
... | 33.893382 | 79 | 0.66569 |
7ca541c5a956aab370689451dd38bc323ed4404b | 380 | py | Python | yatube/posts/migrations/0003_auto_20220402_1623.py | DKSenior/yatube_project | 31a11cab68fc3dcfd8a88234a5bdbeda21de2891 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0003_auto_20220402_1623.py | DKSenior/yatube_project | 31a11cab68fc3dcfd8a88234a5bdbeda21de2891 | [
"MIT"
] | null | null | null | yatube/posts/migrations/0003_auto_20220402_1623.py | DKSenior/yatube_project | 31a11cab68fc3dcfd8a88234a5bdbeda21de2891 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.19 on 2022-04-02 13:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('posts', '0002_auto_20220331_1829'),
]
operations = [
migrations.AlterField(
model_name='group',
name='slug',
... | 20 | 48 | 0.592105 |
1c58e38cc53cdc621b9daae10b4646c09fadcc81 | 1,157 | py | Python | core/entity.py | kaiiyer/uba | c99bd0bf1c664bf4666963d9e87f1a0dcdd018b9 | [
"MIT"
] | null | null | null | core/entity.py | kaiiyer/uba | c99bd0bf1c664bf4666963d9e87f1a0dcdd018b9 | [
"MIT"
] | 1 | 2019-11-29T09:58:10.000Z | 2019-11-29T09:58:10.000Z | core/entity.py | kaiiyer/uba | c99bd0bf1c664bf4666963d9e87f1a0dcdd018b9 | [
"MIT"
] | null | null | null | '''
Copyright 2019-Present The OpenUB Platform Authors
This file is part of the OpenUB Platform library.
The OpenUB Platform is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, ... | 30.447368 | 75 | 0.74503 |
c05719d8e888db4e52c513c4a5780b6ccee44bed | 9,137 | py | Python | D_PostProcessSOMResults/accuracy_calculator.py | marccasian/KaryML-Framework | 367549f397f2d1d245358988670572a0546538f2 | [
"MIT"
] | 4 | 2020-06-12T07:56:26.000Z | 2021-03-29T22:37:21.000Z | D_PostProcessSOMResults/accuracy_calculator.py | marccasian/KaryML-Framework | 367549f397f2d1d245358988670572a0546538f2 | [
"MIT"
] | null | null | null | D_PostProcessSOMResults/accuracy_calculator.py | marccasian/KaryML-Framework | 367549f397f2d1d245358988670572a0546538f2 | [
"MIT"
] | null | null | null | import datetime
import traceback
import math
from D_PostProcessSOMResults.expected_karyotype_loader import ExpectedKaryotype
from a_Common.my_logger import LOGGER
from D_PostProcessSOMResults.SOM_results_constants import *
class AccuracyCalculator:
def __init__(self, pairs_file_path, dist_matrix_file_path):
... | 50.480663 | 120 | 0.600744 |
4ec8ad935201b0ed564ae201ec8a5eabb0edc26e | 910 | py | Python | dev/test_package_by_doc/explore_dash_graph_object.py | StefanHeng/test_ECG-Signal-Viewer | 4fc1849aa5d8ff9bf18d3662bc405d7f20663b64 | [
"MIT"
] | null | null | null | dev/test_package_by_doc/explore_dash_graph_object.py | StefanHeng/test_ECG-Signal-Viewer | 4fc1849aa5d8ff9bf18d3662bc405d7f20663b64 | [
"MIT"
] | null | null | null | dev/test_package_by_doc/explore_dash_graph_object.py | StefanHeng/test_ECG-Signal-Viewer | 4fc1849aa5d8ff9bf18d3662bc405d7f20663b64 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# import base64
# import io
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
# import plotly.express as px
# import pandas as pd
# import os
# import numpy as np
# from dash.dependencies import Input, Output # , State
# from sci... | 19.361702 | 58 | 0.636264 |
7d5714acd1b2f18bff09330a6e4a55ab885aedb5 | 3,983 | py | Python | 1D_Diffusion.py | bennski/1D_Diffusion | d811547eb5af1119b513b957ebae0acbdc76261f | [
"MIT"
] | 1 | 2021-11-25T21:56:04.000Z | 2021-11-25T21:56:04.000Z | 1D_Diffusion.py | bennski/1D_Diffusion | d811547eb5af1119b513b957ebae0acbdc76261f | [
"MIT"
] | null | null | null | 1D_Diffusion.py | bennski/1D_Diffusion | d811547eb5af1119b513b957ebae0acbdc76261f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 4 16:10:54 2016
@author: bennski
-----------------------------------------------------------------------------
Backward time, centered space (BTCS) scheme to solve the 1D diffusion equation
for a molecules outflowing from a meteorite into a warm little pond.
The eq... | 30.638462 | 133 | 0.592016 |
a2ef8a8b0d8d7292d2343f6a68e34bb712d7e975 | 117 | py | Python | kns/test_empty.py | Daiiqi/horikun_toulove | e506e399ea48816921c9ef9a8eea3538fec44bee | [
"Apache-2.0"
] | null | null | null | kns/test_empty.py | Daiiqi/horikun_toulove | e506e399ea48816921c9ef9a8eea3538fec44bee | [
"Apache-2.0"
] | null | null | null | kns/test_empty.py | Daiiqi/horikun_toulove | e506e399ea48816921c9ef9a8eea3538fec44bee | [
"Apache-2.0"
] | null | null | null | # 这是一段空代码,仅创建一个循环并输出log
log("接下来将输出3次”Hello Love!“")
for k in range (3):
log("Hello Love!")
wait(800)
| 16.714286 | 29 | 0.606838 |
ecafb6d02833e32df5aec25da3e5bcf5a9f80713 | 3,250 | py | Python | Robinhood/endpoints.py | apockill/Robinhood | 3df46da8d9bd31d27adcae9bc5d306282bb8a3a4 | [
"MIT"
] | null | null | null | Robinhood/endpoints.py | apockill/Robinhood | 3df46da8d9bd31d27adcae9bc5d306282bb8a3a4 | [
"MIT"
] | null | null | null | Robinhood/endpoints.py | apockill/Robinhood | 3df46da8d9bd31d27adcae9bc5d306282bb8a3a4 | [
"MIT"
] | null | null | null | api_url = "https://api.robinhood.com"
crypto_api_url = "https://nummus.robinhood.com"
def login():
return api_url + "/oauth2/token/"
def logout():
return api_url + "/oauth2/revoke_token/"
def investment_profile():
return api_url + "/user/investment_profile/"
def accounts():
return api_url + "/ac... | 20.967742 | 145 | 0.670462 |
df966786039d7f23e45fc41909c5a76b8ce9c400 | 2,194 | py | Python | neutron/tests/unit/vmware/__init__.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 7 | 2015-03-27T15:41:04.000Z | 2021-12-12T19:22:47.000Z | neutron/tests/unit/vmware/__init__.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 12 | 2015-01-08T18:30:45.000Z | 2015-03-13T21:04:15.000Z | neutron/tests/unit/vmware/__init__.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 7 | 2015-02-05T10:23:52.000Z | 2019-05-18T17:11:19.000Z | # Copyright 2013 OpenStack Foundation.
#
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 40.62963 | 79 | 0.767548 |
e6a5fd4ab28312b6a21cde9b843cd62ad86b3ded | 1,484 | py | Python | Codewars_Python/sudoku_solver.py | nlantau/Codewars_2020_2021 | 055fbf8785ddd52b9f8e8c2b59294ead01852467 | [
"MIT"
] | null | null | null | Codewars_Python/sudoku_solver.py | nlantau/Codewars_2020_2021 | 055fbf8785ddd52b9f8e8c2b59294ead01852467 | [
"MIT"
] | null | null | null | Codewars_Python/sudoku_solver.py | nlantau/Codewars_2020_2021 | 055fbf8785ddd52b9f8e8c2b59294ead01852467 | [
"MIT"
] | null | null | null | # nlantau, 2021-02-01
import numpy as np
puzzle = [[5,3,0,0,7,0,0,0,0],
[6,0,0,1,9,5,0,0,0],
[0,9,8,0,0,0,0,6,0],
[8,0,0,0,6,0,0,0,3],
[4,0,0,8,0,3,0,0,1],
[7,0,0,0,2,0,0,0,6],
[0,6,0,0,0,0,2,8,0],
[0,0,0,4,1,9,0,0,5],
[0,0,0,0,8,0,0,7,9]... | 23.1875 | 46 | 0.390836 |
c0edf4d006b03d5811a9abae8d27db41bab4b844 | 5,653 | py | Python | ambari-common/src/main/python/ambari_commons/os_utils.py | fangxingli/mambari | 6da9f6090d4d42623529b73413c8feb8b7f6fe45 | [
"Apache-2.0",
"MIT"
] | null | null | null | ambari-common/src/main/python/ambari_commons/os_utils.py | fangxingli/mambari | 6da9f6090d4d42623529b73413c8feb8b7f6fe45 | [
"Apache-2.0",
"MIT"
] | null | null | null | ambari-common/src/main/python/ambari_commons/os_utils.py | fangxingli/mambari | 6da9f6090d4d42623529b73413c8feb8b7f6fe45 | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | 31.405556 | 120 | 0.745268 |
95134bc42c51accf06c11af11701014a5dbbc73d | 5,523 | py | Python | gluon/sanitizer.py | arsfeld/fog-web2py | 32263a03d4183dcaf7537c87edcb4e574d4bec6e | [
"BSD-3-Clause"
] | null | null | null | gluon/sanitizer.py | arsfeld/fog-web2py | 32263a03d4183dcaf7537c87edcb4e574d4bec6e | [
"BSD-3-Clause"
] | null | null | null | gluon/sanitizer.py | arsfeld/fog-web2py | 32263a03d4183dcaf7537c87edcb4e574d4bec6e | [
"BSD-3-Clause"
] | 1 | 2019-03-13T08:20:25.000Z | 2019-03-13T08:20:25.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
::
# from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496942
# Title: Cross-site scripting (XSS) defense
# Submitter: Josh Goldfoot (other recipes)
# Last Updated: 2006/08/05
# Version no: 1.0
"""
from htmllib import HTMLParser
from ... | 28.91623 | 76 | 0.505703 |
b369048027eb471b57fa4d78c03b533ea14561d5 | 6,496 | py | Python | figures/code/Figure2.py | milo-lab/anthropogenic_mass | 5a0170a51d164c1cc98b232452e86feb1e4ee334 | [
"MIT"
] | 24 | 2020-12-09T19:09:52.000Z | 2022-03-26T14:04:32.000Z | figures/code/Figure2.py | milo-lab/anthropogenic_mass | 5a0170a51d164c1cc98b232452e86feb1e4ee334 | [
"MIT"
] | null | null | null | figures/code/Figure2.py | milo-lab/anthropogenic_mass | 5a0170a51d164c1cc98b232452e86feb1e4ee334 | [
"MIT"
] | 5 | 2020-12-10T03:40:12.000Z | 2021-06-27T11:53:48.000Z | # -*- coding: utf-8 -*-
import pandas as pd
import os
file_path = os.path.dirname(os.path.realpath(__file__))
# File uploads - figure2
anthro = (pd.read_excel(file_path + "/../../data/anthropogenic_mass_2015.xlsx", index_col='Year')).iloc[:,:7]
anthro_ext = (pd.read_excel(file_path + "/../../data/anthropoge... | 79.219512 | 213 | 0.658097 |
3d431a43a274af265fe39b66fd4b56d42f27c264 | 57 | py | Python | heat/nn/tests/__init__.py | shssf/heat | 9db0a936c92491fa5aa862f558cb385c9916216b | [
"MIT"
] | 105 | 2018-05-18T11:34:03.000Z | 2022-03-29T06:37:23.000Z | heat/nn/tests/__init__.py | shssf/heat | 9db0a936c92491fa5aa862f558cb385c9916216b | [
"MIT"
] | 909 | 2018-05-18T07:50:26.000Z | 2022-03-31T20:16:30.000Z | heat/nn/tests/__init__.py | shssf/heat | 9db0a936c92491fa5aa862f558cb385c9916216b | [
"MIT"
] | 28 | 2018-05-24T14:39:18.000Z | 2022-03-31T19:18:47.000Z | from .test_nn import *
from .test_data_parallel import *
| 19 | 33 | 0.789474 |
a6660a6697389f29b57cfdf909ec6c3269e862df | 21,266 | py | Python | azure-mgmt-network/azure/mgmt/network/v2017_09_01/network_management_client.py | wawon-msft/azure-sdk-for-python | 8004d3ac11f4b5d7a43a955c79527d21ebd68850 | [
"MIT"
] | 1 | 2018-07-23T08:59:24.000Z | 2018-07-23T08:59:24.000Z | azure-mgmt-network/azure/mgmt/network/v2017_09_01/network_management_client.py | wawon-msft/azure-sdk-for-python | 8004d3ac11f4b5d7a43a955c79527d21ebd68850 | [
"MIT"
] | null | null | null | azure-mgmt-network/azure/mgmt/network/v2017_09_01/network_management_client.py | wawon-msft/azure-sdk-for-python | 8004d3ac11f4b5d7a43a955c79527d21ebd68850 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 63.861862 | 159 | 0.791545 |
5be0bbbc171b7699601d7f8987142307d669b5c7 | 2,757 | py | Python | pythonx/LanguageClient_wrapper.py | SpaceVim/LanguageClient-neovim | fdd50f8453fda24455a12b41582996b452095448 | [
"MIT"
] | 5 | 2018-11-02T00:48:13.000Z | 2021-10-15T03:46:14.000Z | pythonx/LanguageClient_wrapper.py | SpaceVim/LanguageClient-neovim | fdd50f8453fda24455a12b41582996b452095448 | [
"MIT"
] | null | null | null | pythonx/LanguageClient_wrapper.py | SpaceVim/LanguageClient-neovim | fdd50f8453fda24455a12b41582996b452095448 | [
"MIT"
] | 3 | 2018-01-17T16:50:08.000Z | 2021-12-25T14:57:20.000Z | from LanguageClient import LanguageClient
import vim
lc = LanguageClient(vim)
def getState(*args):
return lc.getState_vim(args)
def registerServerCommands(*args):
return lc.registerServerCommands(args)
def alive_vim(*args):
return lc.alive_nvim(args)
def setLoggingLevel(*args):
return lc.setLog... | 18.503356 | 56 | 0.772216 |
bf9ff09c74561c85c0e0140c50592080a1bc9106 | 1,938 | py | Python | nucleus/istore/i_method_fetch.py | 1x-eng/PROTON | 2f27352f7eb9b46642325d800fcdb98ba5c99596 | [
"BSD-3-Clause"
] | 31 | 2018-09-28T05:00:02.000Z | 2021-11-09T11:06:57.000Z | nucleus/istore/i_method_fetch.py | PruthviKumarBK/PROTON | 2f27352f7eb9b46642325d800fcdb98ba5c99596 | [
"BSD-3-Clause"
] | 23 | 2019-05-17T08:48:07.000Z | 2020-01-20T22:34:28.000Z | nucleus/istore/i_method_fetch.py | 1x-eng/PROTON | 2f27352f7eb9b46642325d800fcdb98ba5c99596 | [
"BSD-3-Clause"
] | 7 | 2018-09-28T16:57:35.000Z | 2019-11-23T07:36:41.000Z | # BSD 3-Clause License
#
# Copyright (c) 2018, Pruthvi Kumar All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this list of c... | 47.268293 | 119 | 0.77451 |
bc7c3c45eb1369ecefff23026e276416d81c25c1 | 16,835 | py | Python | example/Funny_Strings/change_setting_gui.py | MoeinMavini/sema | 219cd1c7e04a03422ebb41a982d936da3ba18e6c | [
"MIT"
] | 1 | 2021-08-02T07:00:02.000Z | 2021-08-02T07:00:02.000Z | example/Funny_Strings/change_setting_gui.py | MoeinMavini/sema | 219cd1c7e04a03422ebb41a982d936da3ba18e6c | [
"MIT"
] | null | null | null | example/Funny_Strings/change_setting_gui.py | MoeinMavini/sema | 219cd1c7e04a03422ebb41a982d936da3ba18e6c | [
"MIT"
] | null | null | null | from sema.common import check, get, set
from sema import extract
import sys
import textwrap
import tkinter as tk
from tkinter import messagebox
import tkinter.ttk as ttk
import os
#If sema_files file is available in this directory, files written in there will be used.
#Otherwise line below will be used
dot_setting_lis... | 46.25 | 146 | 0.647461 |
d14739bf64e477e8cd12aad239d1869487c516c5 | 5,146 | py | Python | Router/routersploit/test/test_completer.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | Router/routersploit/test/test_completer.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | null | null | null | Router/routersploit/test/test_completer.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z | import unittest
import os
import pexpect
class RoutersploitCompleterTest(unittest.TestCase):
def __init__(self, methodName='runTest'):
super(RoutersploitCompleterTest, self).__init__(methodName)
self.cli_path = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, os.pardir, 'rsf.py'))
... | 27.967391 | 106 | 0.566848 |
7cc39bc13ba90ca3d39f420e5ffd733ba6bf3310 | 987 | py | Python | admin_panel_finder.py | TeamSOTD/Admin_Finder | 5b391e9f19d831391952f246b0e5cb7b12520a28 | [
"Apache-2.0"
] | null | null | null | admin_panel_finder.py | TeamSOTD/Admin_Finder | 5b391e9f19d831391952f246b0e5cb7b12520a28 | [
"Apache-2.0"
] | null | null | null | admin_panel_finder.py | TeamSOTD/Admin_Finder | 5b391e9f19d831391952f246b0e5cb7b12520a28 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from urllib2 import Request, urlopen, URLError, HTTPError
def Space(j):
i = 0
while i<=j:
print " ",
i+=1
def findAdmin():
f = open("link.txt","r");
link = raw_input("Silahkan Masukan Link Korban yg ingin di entot guys \n(ex : example.com or www.example.com ): "... | 23.5 | 115 | 0.568389 |
0a0c132d0e0dfca95664bb3b225282eb45078e1b | 22,694 | py | Python | pnc_cli/swagger_client/apis/products_api.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 2 | 2016-05-18T15:01:34.000Z | 2016-08-11T14:04:17.000Z | pnc_cli/swagger_client/apis/products_api.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 47 | 2016-06-23T19:58:40.000Z | 2020-03-10T17:58:11.000Z | pnc_cli/swagger_client/apis/products_api.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 21 | 2016-05-30T20:34:17.000Z | 2021-09-07T13:22:20.000Z | # coding: utf-8
"""
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# pytho... | 38.0134 | 105 | 0.547149 |
eb9f75ea37dc261d04dd1cf21e12dbc61512bb09 | 886 | py | Python | tests/test_plugin_oldlivestream.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | 1 | 2019-12-04T11:54:52.000Z | 2019-12-04T11:54:52.000Z | tests/test_plugin_oldlivestream.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | tests/test_plugin_oldlivestream.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | import unittest
from livecli.plugins.oldlivestream import OldLivestream
class TestPluginOldLivestream(unittest.TestCase):
def test_can_handle_url(self):
# should match
self.assertTrue(OldLivestream.can_handle_url("https://cdn.livestream.com/embed/channel"))
self.assertTrue(OldLivestream.c... | 46.631579 | 102 | 0.747178 |
61835aa31f935e567a3233ad70cb56e534c75a2c | 5,310 | py | Python | src/models/replay_buffer.py | rudyn2/tsad_v2 | 5ab48872b807b775e70465123a46b9bc9d7b6bbc | [
"MIT"
] | null | null | null | src/models/replay_buffer.py | rudyn2/tsad_v2 | 5ab48872b807b775e70465123a46b9bc9d7b6bbc | [
"MIT"
] | null | null | null | src/models/replay_buffer.py | rudyn2/tsad_v2 | 5ab48872b807b775e70465123a46b9bc9d7b6bbc | [
"MIT"
] | null | null | null | import numpy as np
import torch
import random
from collections import deque, namedtuple
def batch_to_torch(batch, device):
return {
k: torch.from_numpy(v).to(device=device, non_blocking=True)
for k, v in batch.items()
}
class ReplayBuffer(object):
def __init__(self, max_size):
self... | 35.165563 | 101 | 0.581356 |
1ce0e540c13b20af0031c47687a4edd0560bbb2d | 2,739 | py | Python | l-systems/model.py | complexbear/tinkering | 6ad260f065aa9938a760051816d916347271974d | [
"Apache-2.0"
] | null | null | null | l-systems/model.py | complexbear/tinkering | 6ad260f065aa9938a760051816d916347271974d | [
"Apache-2.0"
] | null | null | null | l-systems/model.py | complexbear/tinkering | 6ad260f065aa9938a760051816d916347271974d | [
"Apache-2.0"
] | null | null | null | '''
This module applies Rules to the document in iterative generations.
There are two modes in which this can be done
* Edge replacement
* Node replacement
Both generate the same document that describes the structure according
to the Rules used.
Node generation may be easier to use... | 32.223529 | 74 | 0.557138 |
01d064a995afa8d3edb007b012298a64611351b5 | 3,028 | py | Python | nettrix/benchmarks/bert/implementations/implementation_closed/convert_tf_checkpoint.py | CaoZhongZ/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 27 | 2021-07-01T00:34:52.000Z | 2022-03-29T08:49:53.000Z | nettrix/benchmarks/bert/implementations/implementation_closed/convert_tf_checkpoint.py | CaoZhongZ/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 21 | 2021-08-31T08:34:50.000Z | 2022-03-17T11:42:10.000Z | nettrix/benchmarks/bert/implementations/implementation_closed/convert_tf_checkpoint.py | CaoZhongZ/training_results_v1.0 | 8200377f425ae24b6ed6c2816b9273aab0996d43 | [
"Apache-2.0"
] | 39 | 2021-07-02T00:46:14.000Z | 2022-03-13T16:59:55.000Z | # Copyright (c) 2019 NVIDIA CORPORATION. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 35.623529 | 111 | 0.667437 |
1263d67e76e8dd014422fe7ab4ab2d65bf80fa25 | 15,096 | py | Python | Lib/site-packages/pycparser/c_generator.py | ldepaula3/TextAnalyticsApp | cd87f2017cf301266a82355d4c781de67b9c6ac9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/pycparser/c_generator.py | ldepaula3/TextAnalyticsApp | cd87f2017cf301266a82355d4c781de67b9c6ac9 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/pycparser/c_generator.py | ldepaula3/TextAnalyticsApp | cd87f2017cf301266a82355d4c781de67b9c6ac9 | [
"bzip2-1.0.6"
] | null | null | null | #------------------------------------------------------------------------------
# pycparser: c_generator.py
#
# C code generator from pycparser AST nodes.
#
# Eli Bendersky [https://eli.thegreenplace.net/]
# License: BSD
#------------------------------------------------------------------------------
from . impo... | 35.188811 | 81 | 0.514043 |
6bc441464e52d38ef20c9c50ddb7196f7804c634 | 941 | py | Python | hooks/extensions.py | n3storm/django-hooks | 26ea2150c9be110e90b9ee60fbfd1065ac30ab1d | [
"MIT"
] | 13 | 2015-04-24T01:30:08.000Z | 2022-03-31T04:34:44.000Z | hooks/extensions.py | n3storm/django-hooks | 26ea2150c9be110e90b9ee60fbfd1065ac30ab1d | [
"MIT"
] | 7 | 2015-05-06T09:26:40.000Z | 2021-01-02T12:01:20.000Z | hooks/extensions.py | n3storm/django-hooks | 26ea2150c9be110e90b9ee60fbfd1065ac30ab1d | [
"MIT"
] | 2 | 2017-11-18T17:31:47.000Z | 2019-05-21T08:58:46.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
__all__ = [
'autodiscover',
'apps',
'urls'
]
apps = []
urls = []
def autodiscover(import_path, app_config='Extension'):
# Relative path to the extension's package in
# dot notation such as 'my_app.extensions'
global... | 20.456522 | 76 | 0.585547 |
281d872dcff27854a25eac22ee09d0e140b3ef0a | 4,902 | py | Python | zerver/management/commands/send_to_email_mirror.py | alexagillman/zulip | 35c5e00f9d8443a435fb93e0d809980ce2e3285e | [
"Apache-2.0"
] | null | null | null | zerver/management/commands/send_to_email_mirror.py | alexagillman/zulip | 35c5e00f9d8443a435fb93e0d809980ce2e3285e | [
"Apache-2.0"
] | null | null | null | zerver/management/commands/send_to_email_mirror.py | alexagillman/zulip | 35c5e00f9d8443a435fb93e0d809980ce2e3285e | [
"Apache-2.0"
] | null | null | null | import email
import os
from email.message import Message
from email.mime.text import MIMEText
from typing import Dict, Optional
import ujson
from django.conf import settings
from django.core.management.base import CommandParser
from zerver.lib.email_mirror import mirror_email_message
from zerver.lib.email_mirror_help... | 41.897436 | 97 | 0.645655 |
667e25a73c00d4df89b5e0d97f743fecb052ea78 | 2,042 | py | Python | setup.py | BigEd/py65 | 57d5e7191362006c1d6fa20662da3e4854f1b7c2 | [
"BSD-3-Clause"
] | 1 | 2021-04-04T09:55:04.000Z | 2021-04-04T09:55:04.000Z | setup.py | BigEd/py65 | 57d5e7191362006c1d6fa20662da3e4854f1b7c2 | [
"BSD-3-Clause"
] | null | null | null | setup.py | BigEd/py65 | 57d5e7191362006c1d6fa20662da3e4854f1b7c2 | [
"BSD-3-Clause"
] | null | null | null | __version__ = '0.10-dev'
import os
import sys
if sys.version_info[:2] < (2, 4):
msg = ("Py65 requires Python 2.4 or better, you are attempting to "
"install it using version %s. Please install with a "
"supported version" % sys.version)
sys.stderr.write(msg)
sys.exit(1)
from setupt... | 29.171429 | 71 | 0.62047 |
a7992632672da0168630fcf72a6b224079b74cbb | 1,304 | py | Python | porn-sites/stripchat.com/stripchat_com-download-for-windows.py | lbry-lab/dirty-scripts | e781ed3c3738c8b788f79592e1b46aedc1ae5cce | [
"Unlicense"
] | null | null | null | porn-sites/stripchat.com/stripchat_com-download-for-windows.py | lbry-lab/dirty-scripts | e781ed3c3738c8b788f79592e1b46aedc1ae5cce | [
"Unlicense"
] | null | null | null | porn-sites/stripchat.com/stripchat_com-download-for-windows.py | lbry-lab/dirty-scripts | e781ed3c3738c8b788f79592e1b46aedc1ae5cce | [
"Unlicense"
] | null | null | null | import requests
import re
from datetime import datetime
import os
import time
headers = {'User-Agent': 'Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36',
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/a... | 42.064516 | 172 | 0.645706 |
75ccd24c10c2ecf4df25c72edd7edb5b13a7eedb | 1,750 | py | Python | 084/test_monopoly.py | bsamseth/project-euler | 60d70b117960f37411935bc18eab5bb2fca220e2 | [
"MIT"
] | null | null | null | 084/test_monopoly.py | bsamseth/project-euler | 60d70b117960f37411935bc18eab5bb2fca220e2 | [
"MIT"
] | null | null | null | 084/test_monopoly.py | bsamseth/project-euler | 60d70b117960f37411935bc18eab5bb2fca220e2 | [
"MIT"
] | null | null | null | from monopoly import *
def test_regmove():
g = Game()
g.move(5)
assert g.pos == squares['R1']
assert g.board[g.pos] == 1
assert sum(g.board) == 1
def test_chest_GO():
g = Game()
g.move(1)
assert g.pos == squares['A1']
g.CC.remove(squares['GO'])
g.CC.appendleft(squares['GO'])
... | 23.972603 | 39 | 0.570286 |
d520a10f766d07576679ab8451fcaf38a9d8411e | 6,236 | py | Python | astroquery/utils/schema.py | HarrietAkot/astroquery | ebeb1dd1d0abeed161aecf8c064ada1194b1b6a0 | [
"BSD-3-Clause"
] | null | null | null | astroquery/utils/schema.py | HarrietAkot/astroquery | ebeb1dd1d0abeed161aecf8c064ada1194b1b6a0 | [
"BSD-3-Clause"
] | null | null | null | astroquery/utils/schema.py | HarrietAkot/astroquery | ebeb1dd1d0abeed161aecf8c064ada1194b1b6a0 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
__version__ = '0.2.0'
class SchemaError(Exception):
"""Error during Schema validation."""
def __init__(self, autos, errors):
self.autos = autos if type(autos) is list else [autos]
self.errors = errors if type(errors) is list els... | 33.170213 | 79 | 0.496793 |
32dc79531616b686da457760e97f2f549502cce5 | 2,288 | py | Python | movieflix/src/authorization.py | konvoulgaris/university-projects | dfb5dfa00d329c6714ec46cc476c2138e593afee | [
"Apache-2.0"
] | 5 | 2021-12-05T17:45:00.000Z | 2022-01-11T14:08:53.000Z | movieflix/src/authorization.py | konvoulgaris/university-projects | dfb5dfa00d329c6714ec46cc476c2138e593afee | [
"Apache-2.0"
] | null | null | null | movieflix/src/authorization.py | konvoulgaris/university-projects | dfb5dfa00d329c6714ec46cc476c2138e593afee | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint, request, render_template, redirect, url_for, g, session
authorization = Blueprint("authorization", __name__)
@authorization.route("/login", methods=["GET", "POST"])
def login():
# Redirect if already logged in
if g.user:
return redirect("/")
if request.method == "GET... | 29.714286 | 99 | 0.557255 |
643916a6e5a6bc0f380a3eba3a51566a06041851 | 242 | py | Python | trigger/__init__.py | RheingoldRiver/misc-cogs | 3013af713999fa3ba5ae70f387febb8b43b33840 | [
"MIT"
] | null | null | null | trigger/__init__.py | RheingoldRiver/misc-cogs | 3013af713999fa3ba5ae70f387febb8b43b33840 | [
"MIT"
] | null | null | null | trigger/__init__.py | RheingoldRiver/misc-cogs | 3013af713999fa3ba5ae70f387febb8b43b33840 | [
"MIT"
] | null | null | null | from .trigger import Trigger
__red_end_user_data_statement__ = "Triggers are stored persistantly."
def setup(bot):
n = Trigger(bot)
bot.loop.create_task(n.save_stats())
bot.loop.create_task(n.load_triggers())
bot.add_cog(n)
| 24.2 | 69 | 0.735537 |
cb9875faee12d77eedc7f33d2c9cdb3c42fd0a28 | 2,015 | py | Python | commands.py | christopher-roelofs/7dtd-server-manager | 55a18def54516993f5f1664def2112b4b68a133e | [
"MIT"
] | null | null | null | commands.py | christopher-roelofs/7dtd-server-manager | 55a18def54516993f5f1664def2112b4b68a133e | [
"MIT"
] | null | null | null | commands.py | christopher-roelofs/7dtd-server-manager | 55a18def54516993f5f1664def2112b4b68a133e | [
"MIT"
] | null | null | null | __author__ = 'christopher'
import time
import telconn
import runtime
import logger
import memorydb
def teleport(player,location):
telconn.write_out("tele " + player + " " + location)
time.sleep(1)
telconn.write_out("tele " + player + " " + location)
time.sleep(1)
telconn.write_out("tele " + play... | 29.632353 | 79 | 0.653102 |
e51bfd75db5fef1ccaea2cd8bc4e1ba170aecf43 | 710 | py | Python | exercises/02-caproto.py | mattgibbs/melbourne2018workshop | c79a2e6dcef9ecfe92fdaac5149e87908ee75a17 | [
"BSD-3-Clause"
] | null | null | null | exercises/02-caproto.py | mattgibbs/melbourne2018workshop | c79a2e6dcef9ecfe92fdaac5149e87908ee75a17 | [
"BSD-3-Clause"
] | null | null | null | exercises/02-caproto.py | mattgibbs/melbourne2018workshop | c79a2e6dcef9ecfe92fdaac5149e87908ee75a17 | [
"BSD-3-Clause"
] | 1 | 2018-11-18T21:45:37.000Z | 2018-11-18T21:45:37.000Z | #!/usr/bin/env python3
from caproto.server import pvproperty, PVGroup, ioc_arg_parser, run
import time
class ForeverCounter(PVGroup):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# make unsigned
val = pvproperty(value=0, mock_record='ai')
# increment no more than on... | 28.4 | 67 | 0.68169 |
c572d238d8264e2ef24f5cf35dbbd244af9c7bb8 | 573 | py | Python | testDB.py | thebillington/DBManager | 22f7066c4860688e352c0b79a7b6ca589b7ceaf2 | [
"MIT"
] | null | null | null | testDB.py | thebillington/DBManager | 22f7066c4860688e352c0b79a7b6ca589b7ceaf2 | [
"MIT"
] | null | null | null | testDB.py | thebillington/DBManager | 22f7066c4860688e352c0b79a7b6ca589b7ceaf2 | [
"MIT"
] | null | null | null | # Import the DBManager
from DBManager import Database
# Create a new database object
db = Database("database.db", True)
# Execute the create tables sql file
# This should only be run the first time the code is executed
db.fTransaction("create_tables.sql")
# Get a username and password
uname = input("Enter... | 28.65 | 77 | 0.719023 |
f8cc1c8d06d668fab33f6153ae53935782b61787 | 2,660 | py | Python | scripts/create_fluseverity_figs/ILINet_F2_OR_time.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | 3 | 2018-03-29T23:02:43.000Z | 2020-08-10T12:01:50.000Z | scripts/create_fluseverity_figs/ILINet_F2_OR_time.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | null | null | null | scripts/create_fluseverity_figs/ILINet_F2_OR_time.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | null | null | null | #!/usr/bin/python
##############################################
###Python template
###Author: Elizabeth Lee
###Date: 6/18/14
###Function: OR of incidence in children to incidence in adults vs. week number. Incidence in children and adults is normalized by the size of the child and adult populations in the second cale... | 37.464789 | 233 | 0.711278 |
79c8070d184064952a2f8ad057d52c6a8a4c8e3b | 676 | py | Python | tests/binpacking/solver/test_factory.py | Jxtopher/binpacking | 6ce2a1cd071a0660c32f17f05298dde42942a2d9 | [
"MIT"
] | 1 | 2021-12-27T12:37:58.000Z | 2021-12-27T12:37:58.000Z | tests/binpacking/solver/test_factory.py | Jxtopher/binpacking | 6ce2a1cd071a0660c32f17f05298dde42942a2d9 | [
"MIT"
] | null | null | null | tests/binpacking/solver/test_factory.py | Jxtopher/binpacking | 6ce2a1cd071a0660c32f17f05298dde42942a2d9 | [
"MIT"
] | null | null | null | from tests.base import BaseTestCase
from binpacking.solver.factory import Factory
class FactoryTest(BaseTestCase):
def test_factory_csp_backtracking(self) -> None:
config = {
"seed": 0,
"dataStructure": "Domains",
"OptimizationAlgorithm": "Backtracking",
"B... | 30.727273 | 97 | 0.557692 |
efbe11a40a1212c87317e9fb93fb320106655efb | 1,734 | py | Python | app/api/v1/views/house_views.py | Cyrus-Muchiri/Kukodi | f6c2066f7676ea59733cdcd095e4cc5c770a7287 | [
"MIT"
] | null | null | null | app/api/v1/views/house_views.py | Cyrus-Muchiri/Kukodi | f6c2066f7676ea59733cdcd095e4cc5c770a7287 | [
"MIT"
] | null | null | null | app/api/v1/views/house_views.py | Cyrus-Muchiri/Kukodi | f6c2066f7676ea59733cdcd095e4cc5c770a7287 | [
"MIT"
] | 1 | 2020-06-20T10:30:15.000Z | 2020-06-20T10:30:15.000Z | import re
import psycopg2
from flask import Blueprint, request, jsonify
from app.api.v1.models.house_models import HouseRecords
from app.api.v1.models.database import init_db
from app.api.v1.utils.validators import validate_house_data
from app.api.v1.utils.token import login_required
INIT_DB = init_db()
HOUSE = Bluep... | 29.389831 | 101 | 0.684544 |
5a6a9c92ad1605e19de1033d70bf19b77ffb2d0f | 548 | py | Python | FitnessWatcherUI/manage.py | srasool2/SWDV-691-FitnessWatcherUI | a65e32329b98a217077cb5d1708d0afee9f5d3e1 | [
"MIT"
] | null | null | null | FitnessWatcherUI/manage.py | srasool2/SWDV-691-FitnessWatcherUI | a65e32329b98a217077cb5d1708d0afee9f5d3e1 | [
"MIT"
] | 13 | 2019-03-30T14:45:44.000Z | 2020-06-05T20:22:16.000Z | FitnessWatcherUI/manage.py | srasool2/SWDV-691-FitnessWatcherUI | a65e32329b98a217077cb5d1708d0afee9f5d3e1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'FitnessWatcherUI.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Dja... | 34.25 | 80 | 0.691606 |
e6b25a7d356bed0835fadef42ed9be730739bdf3 | 14,741 | py | Python | pyanp/limitmatrix.py | cznewt/pyanp | 2b90363ba3f9d60aef1e4f74c6cda9f5fda83561 | [
"MIT"
] | 1 | 2021-01-02T10:31:12.000Z | 2021-01-02T10:31:12.000Z | pyanp/limitmatrix.py | ArdalanMarandi/pyanp | 731fa2c6090e274843f854081610599a2001e00a | [
"MIT"
] | null | null | null | pyanp/limitmatrix.py | ArdalanMarandi/pyanp | 731fa2c6090e274843f854081610599a2001e00a | [
"MIT"
] | null | null | null | '''
Contains all limit matrix calculations
.. moduleauthor: Dr. Bill Adams
'''
import numpy as np
import pandas as pd
from copy import deepcopy
from pyanp.general import get_matrix
def _mat_pow2(mat, power):
'''
Calculates :math:`mat^N` where :math:`N \geq power` and N is a power of 2.
It does this by sq... | 35.181384 | 120 | 0.634828 |
db1c79475fb499942a8d0678e912185baf2d5906 | 1,609 | py | Python | setup.py | darthghandi/pytest-slickqa | 7c491702b8c43093f4fa20bfec8e95080de819c5 | [
"Apache-2.0"
] | 1 | 2016-12-05T21:13:30.000Z | 2016-12-05T21:13:30.000Z | setup.py | darthghandi/pytest-slickqa | 7c491702b8c43093f4fa20bfec8e95080de819c5 | [
"Apache-2.0"
] | null | null | null | setup.py | darthghandi/pytest-slickqa | 7c491702b8c43093f4fa20bfec8e95080de819c5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup
def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()
setup(
name='pytest-slickqa',
version='0.1.4',
author='Chris Saxe... | 32.18 | 70 | 0.619018 |
386aa26547c0e609e55c4249a453d1636d7b0738 | 628 | py | Python | runs/10KB/par-bro-iter06000.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null | runs/10KB/par-bro-iter06000.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null | runs/10KB/par-bro-iter06000.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null |
# Write results to this file
OUTFILE = 'runs/10KB/par-bro-iter06000.result.csv'
# Source computers for the requests
SOURCE = ['10.0.0.1']
# Should Bro be enabled on the source machines?
SOURCE_BRO = [True]
# Target machines for the requests (aka server)
TARGET = ['10.0.0.2']
# Should Bro be enabled on the target m... | 21.655172 | 68 | 0.721338 |
54e8519371470f857757c3983a01ad173f6fe7cf | 659 | py | Python | SOLID/es2/srp_step3.py | nick87ds/MaterialeSerate | 51627e47ff1d3c3ecfc9ce6741c04b91b3295359 | [
"MIT"
] | 12 | 2021-12-12T22:19:52.000Z | 2022-03-18T11:45:17.000Z | SOLID/es2/srp_step3.py | nick87ds/MaterialeSerate | 51627e47ff1d3c3ecfc9ce6741c04b91b3295359 | [
"MIT"
] | 1 | 2022-03-23T13:58:33.000Z | 2022-03-23T14:05:08.000Z | SOLID/es2/srp_step3.py | nick87ds/MaterialeSerate | 51627e47ff1d3c3ecfc9ce6741c04b91b3295359 | [
"MIT"
] | 7 | 2021-02-01T22:09:14.000Z | 2021-06-22T08:30:16.000Z | """
La classe degli animali sarà la punto ingresso/facciata (Facade) per la
gestione del database degli animali e gestione delle proprietà degli animali.
"""
class Animal:
def __init__(self, name: str):
self.name = name
self.db = AnimalDB()
def get_name(self):
return self.name
de... | 19.382353 | 77 | 0.647951 |
1f176144b8302cea5a842a60f138b88ed990114a | 500 | py | Python | server/vcr-server/api/v2/migrations/0004_auto_20180821_2221.py | brianorwhatever/aries-vcr | 96bb31a2f96406dfa2832dbd7790c46b60981e13 | [
"Apache-2.0"
] | 38 | 2019-01-07T02:49:55.000Z | 2020-01-27T17:26:09.000Z | server/vcr-server/api/v2/migrations/0004_auto_20180821_2221.py | brianorwhatever/aries-vcr | 96bb31a2f96406dfa2832dbd7790c46b60981e13 | [
"Apache-2.0"
] | 364 | 2019-01-07T20:22:15.000Z | 2020-03-10T21:59:23.000Z | server/vcr-server/api/v2/migrations/0004_auto_20180821_2221.py | brianorwhatever/aries-vcr | 96bb31a2f96406dfa2832dbd7790c46b60981e13 | [
"Apache-2.0"
] | 34 | 2019-01-04T19:16:04.000Z | 2020-02-20T19:24:25.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-08-21 22:21
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [("api_v2", "0003_auto_20180821_1840")]
operations = [
migrat... | 25 | 74 | 0.672 |
c2929fa156a593eb7d44f63cafc55da05b7c3dae | 1,415 | py | Python | tests/test_datatypes.py | vishwas1234567/finn | cbef52d20fce8574b358e7aee01cf4a8c26c5adf | [
"BSD-3-Clause"
] | null | null | null | tests/test_datatypes.py | vishwas1234567/finn | cbef52d20fce8574b358e7aee01cf4a8c26c5adf | [
"BSD-3-Clause"
] | null | null | null | tests/test_datatypes.py | vishwas1234567/finn | cbef52d20fce8574b358e7aee01cf4a8c26c5adf | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import finn.core.datatype as dt
def test_datatypes():
assert dt.DataType.BIPOLAR.allowed(-1)
assert dt.DataType.BIPOLAR.allowed(0) is False
assert dt.DataType.BINARY.allowed(-1) is False
assert dt.DataType.BINARY.allowed(1)
assert dt.DataType.UINT2.allowed(2)
assert dt... | 39.305556 | 52 | 0.721555 |
f1375a730648c93a44d9bd01738dc018485aa9f2 | 842 | py | Python | gbasm/core/constants.py | MrCairo/pygbasm | 96acf1f5dec168ff084b1095db8ca372fc17e7be | [
"MIT"
] | 2 | 2019-05-08T00:29:09.000Z | 2019-05-08T00:29:12.000Z | gbasm/core/constants.py | MrCairo/pygbasm | 96acf1f5dec168ff084b1095db8ca372fc17e7be | [
"MIT"
] | null | null | null | gbasm/core/constants.py | MrCairo/pygbasm | 96acf1f5dec168ff084b1095db8ca372fc17e7be | [
"MIT"
] | null | null | null | """
Commonly used constants
"""
from enum import Enum, IntEnum
DIR = "directive"
TOK = "tokens"
EXT = "extra"
NODE = "node" # Rpresents an internal tokenized node.
MULT = "MULTIPLE"
EQU = "EQU"
LBL = "LABEL"
INST = "INSTRUCTION"
STOR = "STORAGE"
SEC = "SECTION"
BAD = "INVALID"
class NodeType(Enum):
NODE = 1
... | 17.183673 | 73 | 0.595012 |
4773858c1cb33b9b79478f4869531aee084fab58 | 6,974 | py | Python | histoqc/AnnotationModule.py | kaczmarj/HistoQC | d31c11781f8ee86be64a08fd5200c6ef04b71365 | [
"BSD-3-Clause-Clear"
] | 140 | 2018-05-25T04:04:04.000Z | 2022-03-30T15:38:24.000Z | histoqc/AnnotationModule.py | kaczmarj/HistoQC | d31c11781f8ee86be64a08fd5200c6ef04b71365 | [
"BSD-3-Clause-Clear"
] | 300 | 2018-05-21T18:38:58.000Z | 2022-03-09T14:19:33.000Z | histoqc/AnnotationModule.py | kaczmarj/HistoQC | d31c11781f8ee86be64a08fd5200c6ef04b71365 | [
"BSD-3-Clause-Clear"
] | 66 | 2018-05-24T22:13:36.000Z | 2022-03-28T16:57:14.000Z | import logging
from histoqc.BaseImage import printMaskHelper
from skimage import io, img_as_ubyte
from skimage.draw import polygon
import os
from pathlib import PurePosixPath, Path
import json
import xml.etree.ElementTree as ET
import numpy as np
def get_points_from_xml(xml_fname):
"""
Parses the x... | 41.511905 | 213 | 0.636937 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.