hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k โ | 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 247 | max_issues_repo_name stringlengths 4 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k โ | 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 247 | max_forks_repo_name stringlengths 4 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 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a2edae1fde1740b1290641cc2634614516685b6 | 382 | py | Python | dserver/__main__.py | dandk105/Asyncpyserver | 228671a7299214b503f440b8dea2773c3769e618 | [
"MIT"
] | null | null | null | dserver/__main__.py | dandk105/Asyncpyserver | 228671a7299214b503f440b8dea2773c3769e618 | [
"MIT"
] | null | null | null | dserver/__main__.py | dandk105/Asyncpyserver | 228671a7299214b503f440b8dea2773c3769e618 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# space level: 4
"""this module is the most importing in thie app.
"""
from dserver import ServerSocket as server
from config import ConfManage as conf
if __name__ == "__main__":
# would manage conf class
hostdata = conf("./conf/base.json")
hostdata.setup_logging()
server = se... | 22.470588 | 49 | 0.683246 | # -*- coding: utf-8 -*-
# space level: 4
"""this module is the most importing in thie app.
"""
from dserver import ServerSocket as server
from config import ConfManage as conf
if __name__ == "__main__":
# would manage conf class
hostdata = conf("./conf/base.json")
hostdata.setup_logging()
server = se... | 0 | 0 | 0 |
19bf9e0556d61188bc88bf1e77eb1fa49ee6106a | 239 | py | Python | app/utils.py | deviantthread/MagicFormula | f22d7d530929050c6cd2b20423c31f866751c7f6 | [
"Apache-2.0"
] | 17 | 2019-05-23T16:55:48.000Z | 2021-08-12T18:38:28.000Z | app/utils.py | deviantthread/MagicFormula | f22d7d530929050c6cd2b20423c31f866751c7f6 | [
"Apache-2.0"
] | 2 | 2020-01-30T16:45:30.000Z | 2020-05-08T21:35:00.000Z | app/utils.py | deviantthread/MagicFormula | f22d7d530929050c6cd2b20423c31f866751c7f6 | [
"Apache-2.0"
] | 6 | 2020-01-26T18:42:48.000Z | 2022-01-30T10:50:31.000Z | from . import db
# Add your own utility classes and functions here.
| 17.071429 | 50 | 0.631799 | from . import db
class ModelMixin(object):
def save(self):
# Save this model to the database.
db.session.add(self)
db.session.commit()
return self
# Add your own utility classes and functions here.
| 114 | 4 | 50 |
8122ac4323b3f9727d08324f79b9508409903093 | 4,073 | py | Python | SIGNUS/app/controllers/search.py | 837477/SIGNUS | cd395dfd45d2c36d09ec9a8069e6e52e19f058e8 | [
"MIT"
] | null | null | null | SIGNUS/app/controllers/search.py | 837477/SIGNUS | cd395dfd45d2c36d09ec9a8069e6e52e19f058e8 | [
"MIT"
] | null | null | null | SIGNUS/app/controllers/search.py | 837477/SIGNUS | cd395dfd45d2c36d09ec9a8069e6e52e19f058e8 | [
"MIT"
] | null | null | null | '''
Search Controller Module
'''
import math
from bson.json_util import dumps
from flask import current_app
from datetime import datetime
from app.models.mongodb.posts import Posts
from app.models.mongodb.user import User
from app.models.mongodb.search_log import SearchLog
def v1_search(mongo_cur, keywords, order, us... | 29.092857 | 89 | 0.57697 | '''
Search Controller Module
'''
import math
from bson.json_util import dumps
from flask import current_app
from datetime import datetime
from app.models.mongodb.posts import Posts
from app.models.mongodb.user import User
from app.models.mongodb.search_log import SearchLog
def v1_search(mongo_cur, keywords, order, us... | 0 | 0 | 0 |
ade08a55f673cefae524a9ff08cdfd340e5d3249 | 992 | py | Python | mgr/mgr/samples/urls.py | onap/vfc-gvnfm-vnfmgr | 237ff06c840543d78c715cc488692bc6a3cfb7bc | [
"Apache-2.0"
] | 1 | 2021-10-15T15:23:24.000Z | 2021-10-15T15:23:24.000Z | mgr/mgr/samples/urls.py | onap/vfc-gvnfm-vnfmgr | 237ff06c840543d78c715cc488692bc6a3cfb7bc | [
"Apache-2.0"
] | null | null | null | mgr/mgr/samples/urls.py | onap/vfc-gvnfm-vnfmgr | 237ff06c840543d78c715cc488692bc6a3cfb7bc | [
"Apache-2.0"
] | 1 | 2021-10-15T15:23:16.000Z | 2021-10-15T15:23:16.000Z | # Copyright 2017 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 41.333333 | 109 | 0.705645 | # Copyright 2017 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 0 | 0 | 0 |
2c7358c1382c40af8b18f20ce862f9e03188d010 | 956 | py | Python | brainex/experiments/meta.py | ebuntel/BrainExTemp | 991038155a6e9289af90da3d800210841ef23ff1 | [
"MIT"
] | 1 | 2020-09-04T16:15:26.000Z | 2020-09-04T16:15:26.000Z | brainex/experiments/meta.py | ebuntel/Brainextemp | 991038155a6e9289af90da3d800210841ef23ff1 | [
"MIT"
] | null | null | null | brainex/experiments/meta.py | ebuntel/Brainextemp | 991038155a6e9289af90da3d800210841ef23ff1 | [
"MIT"
] | null | null | null | # Jan28Report on General Accureacy #####################################################################################
# date = 'Jan-23-2020-22-N-noneSpark-R0-noOpt'
# notes = 'noneSpark-R0-noOpt'
# date = 'Jan-23-2020-21-N-UseSpark-R0-noOpt'
# notes = 'UseSpark-R0-noOpt'
# date = 'Jan-24-2020-2-N-UseSpark-R1-noOpt'
... | 45.52381 | 120 | 0.628661 | # Jan28Report on General Accureacy #####################################################################################
# date = 'Jan-23-2020-22-N-noneSpark-R0-noOpt'
# notes = 'noneSpark-R0-noOpt'
# date = 'Jan-23-2020-21-N-UseSpark-R0-noOpt'
# notes = 'UseSpark-R0-noOpt'
# date = 'Jan-24-2020-2-N-UseSpark-R1-noOpt'
... | 0 | 0 | 0 |
059ca706a2b105444ff5df27e29f6a31260c0ac2 | 6,285 | py | Python | exercises/city_temperature_prediction.py | ShaharZuntz/IML.HUJI | 5804904840ac0fbdaa5b4cbf2df9348d276927d1 | [
"MIT"
] | null | null | null | exercises/city_temperature_prediction.py | ShaharZuntz/IML.HUJI | 5804904840ac0fbdaa5b4cbf2df9348d276927d1 | [
"MIT"
] | null | null | null | exercises/city_temperature_prediction.py | ShaharZuntz/IML.HUJI | 5804904840ac0fbdaa5b4cbf2df9348d276927d1 | [
"MIT"
] | null | null | null | from typing import Tuple, Any, Union, List
import scipy.stats
from pandas import Series, DataFrame
from pandas.core.generic import NDFrame
from scipy.stats import zscore
from IMLearn.learners.regressors import PolynomialFitting
from IMLearn.utils import split_train_test
import numpy as np
import pandas as pd
import ... | 30.509709 | 79 | 0.688465 | from typing import Tuple, Any, Union, List
import scipy.stats
from pandas import Series, DataFrame
from pandas.core.generic import NDFrame
from scipy.stats import zscore
from IMLearn.learners.regressors import PolynomialFitting
from IMLearn.utils import split_train_test
import numpy as np
import pandas as pd
import ... | 0 | 0 | 0 |
c7325ba4a58ad20bab3d38c0047ad34ee324c512 | 1,736 | py | Python | scbt/actions.py | Jorch72/PythonBitTorrent | 53bb4420288e064f8ca2f6f2844a32afa0084b66 | [
"MIT"
] | 2 | 2015-06-16T02:04:03.000Z | 2017-01-05T19:44:29.000Z | scbt/actions.py | ddevault/scbt | 53bb4420288e064f8ca2f6f2844a32afa0084b66 | [
"MIT"
] | null | null | null | scbt/actions.py | ddevault/scbt | 53bb4420288e064f8ca2f6f2844a32afa0084b66 | [
"MIT"
] | null | null | null | import os
from datetime import datetime
from functools import wraps
actions = dict()
@action
@action
@action
# TODO: Remove this before releasing scbt
@action
| 30.45614 | 82 | 0.608295 | import os
from datetime import datetime
from functools import wraps
actions = dict()
def action(f):
@wraps(f)
def wrapper(*args, **kwargs):
return f(*args, **kwargs)
actions[f.__name__] = f
return wrapper
@action
def add_torrent(session, payload):
path = payload.get("path")
if not pat... | 1,461 | 0 | 111 |
24d6b029b931b5c92bfb749057647d092e4bcb99 | 4,305 | py | Python | Fb-Post-Inviter.py | rohitcoder/Automation-Scripts | 34656f2b237a582bf864570375a36eb3a3233143 | [
"Apache-2.0"
] | null | null | null | Fb-Post-Inviter.py | rohitcoder/Automation-Scripts | 34656f2b237a582bf864570375a36eb3a3233143 | [
"Apache-2.0"
] | null | null | null | Fb-Post-Inviter.py | rohitcoder/Automation-Scripts | 34656f2b237a582bf864570375a36eb3a3233143 | [
"Apache-2.0"
] | null | null | null | import requests
import json
from bs4 import BeautifulSoup
import urlparse
burp0_url = "https://business.facebook.com/ufi/reaction/profile/browser/fetch/?limit=5000&total_count=5000&ft_ent_identifier=108566350975276&fb_dtsg_ag=AQxhzRLE9rpjfoRo1DHdRZ0DSQntKVunKgX-keo45t7N2Q:AQzSCWY38h7fU8ix7KUq66CzW1lEBK6d7q6b9qF1GVuN... | 134.53125 | 923 | 0.801858 | import requests
import json
from bs4 import BeautifulSoup
import urlparse
burp0_url = "https://business.facebook.com/ufi/reaction/profile/browser/fetch/?limit=5000&total_count=5000&ft_ent_identifier=108566350975276&fb_dtsg_ag=AQxhzRLE9rpjfoRo1DHdRZ0DSQntKVunKgX-keo45t7N2Q:AQzSCWY38h7fU8ix7KUq66CzW1lEBK6d7q6b9qF1GVuN... | 0 | 0 | 0 |
042b672d0c1ff8faf6acd9ae05f3802f8aca03f6 | 397 | py | Python | contas/models.py | acaciojunio28/CRUD-django | 62b34a544ec5a14c53172e9240a1f0b448ed7b69 | [
"Apache-2.0"
] | null | null | null | contas/models.py | acaciojunio28/CRUD-django | 62b34a544ec5a14c53172e9240a1f0b448ed7b69 | [
"Apache-2.0"
] | null | null | null | contas/models.py | acaciojunio28/CRUD-django | 62b34a544ec5a14c53172e9240a1f0b448ed7b69 | [
"Apache-2.0"
] | null | null | null | from django.db import models
# Create your models here.
| 24.8125 | 54 | 0.745592 | from django.db import models
# Create your models here.
class categoria(models.Model):
nome=models.CharField(max_length=100)
dt_criaรงao=models.DateTimeField(auto_now_add=True)
class listar(models.Model):
nome = models.CharField(max_length=100)
valor= models.CharField(max_length=100)
unidade=model... | 22 | 273 | 46 |
7cb6858846589320c17fb4ea403321cc22f2fffc | 112 | py | Python | text/_cascade/element/_element.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/_cascade/element/_element.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/_cascade/element/_element.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | """
*Element*
A CSS Element.
"""
from abc import ABCMeta
| 8 | 27 | 0.625 | """
*Element*
A CSS Element.
"""
from abc import ABCMeta
class Element:
__metaclass__ = ABCMeta
| 0 | 21 | 23 |
3e0fbcb449b4cfa8bd257a18259a5527d4dbb40f | 641 | py | Python | portfolio/models.py | Aditya-aot/ION | 4789bb2e05fae48414eb829c3607c13a24349cd7 | [
"MIT"
] | null | null | null | portfolio/models.py | Aditya-aot/ION | 4789bb2e05fae48414eb829c3607c13a24349cd7 | [
"MIT"
] | null | null | null | portfolio/models.py | Aditya-aot/ION | 4789bb2e05fae48414eb829c3607c13a24349cd7 | [
"MIT"
] | 1 | 2022-02-16T10:43:57.000Z | 2022-02-16T10:43:57.000Z | from django.db import models
from django.conf import settings
from django.contrib.auth.models import User , auth
from django.utils import timezone
# Create your models here. | 33.736842 | 73 | 0.74103 | from django.db import models
from django.conf import settings
from django.contrib.auth.models import User , auth
from django.utils import timezone
# Create your models here.
class stock_port(models.Model) :
user = models.ForeignKey(User, on_delete=models.CASCADE, null = True)
name = models.TextField(null = ... | 0 | 419 | 46 |
b9bbe40517af05264261c3f6465a6deaa46f3523 | 786 | py | Python | zero_to_one_hundred/tests/test_main.py | fossabot/0to100 | 37faa1340b2ec8b87e5d4c268c8caf521ea164cb | [
"Apache-2.0"
] | null | null | null | zero_to_one_hundred/tests/test_main.py | fossabot/0to100 | 37faa1340b2ec8b87e5d4c268c8caf521ea164cb | [
"Apache-2.0"
] | null | null | null | zero_to_one_hundred/tests/test_main.py | fossabot/0to100 | 37faa1340b2ec8b87e5d4c268c8caf521ea164cb | [
"Apache-2.0"
] | null | null | null | """Unit tests."""
# pylint: disable=C0116,R0903,E0401,W0703,W1201,redefined-outer-name,missing-function-docstring,E0401,C0114,W0511,W1203,C0200,C0103,W1203
from main import run_main
def test_run_main(
get_args_create_section_processor,
get_args_refresh_links_processor,
get_args_refresh_puml_processor,
... | 34.173913 | 137 | 0.774809 | """Unit tests."""
# pylint: disable=C0116,R0903,E0401,W0703,W1201,redefined-outer-name,missing-function-docstring,E0401,C0114,W0511,W1203,C0200,C0103,W1203
from main import run_main
def test_run_main(
get_args_create_section_processor,
get_args_refresh_links_processor,
get_args_refresh_puml_processor,
... | 0 | 0 | 0 |
787dc141c06a378f136489d0c3368808772ea325 | 372 | py | Python | imaginarium/storage/__init__.py | LordFeratum/Imaginarium | ce52f5cad7727aab2e81fcf36f662f55dea9330a | [
"MIT"
] | null | null | null | imaginarium/storage/__init__.py | LordFeratum/Imaginarium | ce52f5cad7727aab2e81fcf36f662f55dea9330a | [
"MIT"
] | null | null | null | imaginarium/storage/__init__.py | LordFeratum/Imaginarium | ce52f5cad7727aab2e81fcf36f662f55dea9330a | [
"MIT"
] | null | null | null | from imaginarium.storage.utils import create_database_pool
| 21.882353 | 60 | 0.698925 | from imaginarium.storage.utils import create_database_pool
async def init_database(app=None, config=None):
if not config:
config = app['settings']
pool = await create_database_pool(config, loop=app.loop)
app['pool'] = pool
return pool
async def close_database(app=None, config=None):
ap... | 265 | 0 | 46 |
26d4c3e209fcea746298ce44734f73751b665d9a | 41 | py | Python | models/__init__.py | danilonumeroso/MEG | 86f2a664e22082b0ff5d01c8e0ad9618b64e9065 | [
"Apache-2.0"
] | 6 | 2020-10-26T13:53:01.000Z | 2021-03-12T14:26:43.000Z | models/__init__.py | danilonumeroso/Explainer | e133c150738f09998d0350e58dece4824ee58a76 | [
"Apache-2.0"
] | null | null | null | models/__init__.py | danilonumeroso/Explainer | e133c150738f09998d0350e58dece4824ee58a76 | [
"Apache-2.0"
] | 1 | 2021-03-13T01:08:12.000Z | 2021-03-13T01:08:12.000Z | from .GNNExplainer_ import GNNExplainer_
| 20.5 | 40 | 0.878049 | from .GNNExplainer_ import GNNExplainer_
| 0 | 0 | 0 |
0be7b146cbd549cf20b312471280a3ad2005e10a | 1,522 | py | Python | tests/import_helpers/test_internal_import_record.py | vemel/boto3_type_annotations | 88aa07a36f5626428c8d3878a4846d8cb667ea28 | [
"MIT"
] | 44 | 2019-11-09T04:29:31.000Z | 2022-02-11T10:51:41.000Z | tests/import_helpers/test_internal_import_record.py | vemel/boto3_type_annotations | 88aa07a36f5626428c8d3878a4846d8cb667ea28 | [
"MIT"
] | 28 | 2019-11-26T23:50:19.000Z | 2021-05-31T18:52:46.000Z | tests/import_helpers/test_internal_import_record.py | vemel/boto3_type_annotations | 88aa07a36f5626428c8d3878a4846d8cb667ea28 | [
"MIT"
] | 3 | 2019-11-09T16:43:04.000Z | 2019-12-20T15:05:33.000Z | import unittest
from unittest.mock import patch, MagicMock
from mypy_boto3_builder.import_helpers.internal_import_record import (
InternalImportRecord,
)
from mypy_boto3_builder.import_helpers.import_string import ImportString
| 40.052632 | 83 | 0.711564 | import unittest
from unittest.mock import patch, MagicMock
from mypy_boto3_builder.import_helpers.internal_import_record import (
InternalImportRecord,
)
from mypy_boto3_builder.import_helpers.import_string import ImportString
class ImportRecordTestCase(unittest.TestCase):
def test_init(self) -> None:
... | 1,020 | 246 | 23 |
97b25cd6b0226a96f557fe9a5069ec8525d806af | 5,335 | py | Python | src/tradingkit/statistics/statistics.py | vishalbelsare/tradingkit | a5dd5e1de828a930c3d4530a34f564b110edc076 | [
"MIT"
] | null | null | null | src/tradingkit/statistics/statistics.py | vishalbelsare/tradingkit | a5dd5e1de828a930c3d4530a34f564b110edc076 | [
"MIT"
] | null | null | null | src/tradingkit/statistics/statistics.py | vishalbelsare/tradingkit | a5dd5e1de828a930c3d4530a34f564b110edc076 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import numpy
from tradingkit.pubsub.core.event import Event
from tradingkit.pubsub.core.publisher import Publisher
from tradingkit.pubsub.core.subscriber import Subscriber
from tradingkit.pubsub.event.book import Book
from tradingkit.pubsub.event.candle import Candle
from trad... | 42.34127 | 126 | 0.653796 | from datetime import datetime, timedelta
import numpy
from tradingkit.pubsub.core.event import Event
from tradingkit.pubsub.core.publisher import Publisher
from tradingkit.pubsub.core.subscriber import Subscriber
from tradingkit.pubsub.event.book import Book
from tradingkit.pubsub.event.candle import Candle
from trad... | 4,400 | 19 | 293 |
40214a1ab4199e7b467be137d06ccce4b5727fd5 | 4,725 | py | Python | games/migrations/0001_initial.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | null | null | null | games/migrations/0001_initial.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | 171 | 2017-11-02T05:39:37.000Z | 2022-03-07T01:13:53.000Z | games/migrations/0001_initial.py | RevolutionTech/revolutiontech.ca | a3f0f1526812554938674c4fc9e7ea90ed4ffe6d | [
"0BSD"
] | 1 | 2018-01-13T08:11:26.000Z | 2018-01-13T08:11:26.000Z | import django.db.models.deletion
from django.db import migrations, models
| 33.510638 | 87 | 0.385397 | import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("basecategory", "0001_initial")]
operations = [
migrations.CreateModel(
name="Game",
fields=[
(
"id",
... | 0 | 4,627 | 23 |
c49eb4ba7231c1d4454481a1dbf49b5dc3297b57 | 931 | py | Python | tests/test_data_model.py | CtheSky/namecom | 16ad4a60a0d4b6d1fea2eed57674d5b020e272cf | [
"MIT"
] | 3 | 2018-08-15T06:16:57.000Z | 2020-12-28T07:34:42.000Z | tests/test_data_model.py | CtheSky/namecom | 16ad4a60a0d4b6d1fea2eed57674d5b020e272cf | [
"MIT"
] | 1 | 2019-09-17T06:52:45.000Z | 2019-09-18T07:24:58.000Z | tests/test_data_model.py | CtheSky/namecom | 16ad4a60a0d4b6d1fea2eed57674d5b020e272cf | [
"MIT"
] | null | null | null | import unittest
from namecom import Transfer, Domain
| 33.25 | 99 | 0.662728 | import unittest
from namecom import Transfer, Domain
class DataModelTestCase(unittest.TestCase):
def test_repr_hash(self):
transfer = Transfer(domainName='example.org', email='cthesky@yeah.net', status='Completed')
repr_str = repr(transfer)
got_transfer = eval(repr_str)
self.ass... | 778 | 22 | 77 |
1225db4ffd2b439dfc6fac24400a2380348b7109 | 1,655 | py | Python | sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # 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 ... | 37.613636 | 81 | 0.598792 | # 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 ... | 202 | 0 | 27 |
efd8688b990c88981e88b5bbf3bf4ad0c1cba2df | 10,767 | py | Python | android_env/components/emulator_console.py | majacQ/android_env | 3703c9883aa445e93f151dad9332aa6b8f32eea4 | [
"Apache-2.0"
] | 1 | 2021-06-07T13:58:24.000Z | 2021-06-07T13:58:24.000Z | android_env/components/emulator_console.py | smbale/android_env | 5ecfbfe56bb5843b298791d3c8c73b01a79e864a | [
"Apache-2.0"
] | null | null | null | android_env/components/emulator_console.py | smbale/android_env | 5ecfbfe56bb5843b298791d3c8c73b01a79e864a | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 DeepMind Technologies Limited.
#
# 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 applic... | 37.256055 | 80 | 0.663973 | # coding=utf-8
# Copyright 2021 DeepMind Technologies Limited.
#
# 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 applic... | 3,951 | 0 | 175 |
c679d6b045ca8f35b52d519de118dd8764302a1b | 712 | py | Python | ebiznes/apps/service/admin.py | kaniak274/EBiznes | 5dcb10020b5af6b7ae57a70060605f6e5324b03a | [
"MIT"
] | null | null | null | ebiznes/apps/service/admin.py | kaniak274/EBiznes | 5dcb10020b5af6b7ae57a70060605f6e5324b03a | [
"MIT"
] | 1 | 2019-10-30T06:26:36.000Z | 2019-11-20T17:07:25.000Z | ebiznes/apps/service/admin.py | kaniak274/EBiznes | 5dcb10020b5af6b7ae57a70060605f6e5324b03a | [
"MIT"
] | 1 | 2019-11-12T19:09:05.000Z | 2019-11-12T19:09:05.000Z | from django.contrib import admin
from .models import *
admin.site.register(Profession)
admin.site.register(Service, ServiceAdmin)
admin.site.register(Rating, RatingAdmin)
admin.site.register(Rent, RentAdmin)
admin.site.register(PriceList, PriceListAdmin)
admin.site.register(Order)
| 25.428571 | 79 | 0.738764 | from django.contrib import admin
from .models import *
class ServiceAdmin(admin.ModelAdmin):
list_display = ('__str__', 'owner', 'city', 'profession', 'account_number')
class RatingAdmin(admin.ModelAdmin):
list_display = ('__str__', 'owner', 'service', 'rating',)
class RentAdmin(admin.ModelAdmin):
li... | 0 | 331 | 92 |
f0b8252c4ee7fa9aab5d7395e5afdc323d3140df | 4,818 | py | Python | src/metrics/retrieval_metrics.py | philip-mueller/lovt | 91cf2094a0e140b8431b8e4ebadc56547a8df6b2 | [
"MIT"
] | 3 | 2021-12-15T07:53:36.000Z | 2022-01-05T17:02:45.000Z | src/metrics/retrieval_metrics.py | philip-mueller/lovt | 91cf2094a0e140b8431b8e4ebadc56547a8df6b2 | [
"MIT"
] | null | null | null | src/metrics/retrieval_metrics.py | philip-mueller/lovt | 91cf2094a0e140b8431b8e4ebadc56547a8df6b2 | [
"MIT"
] | 3 | 2021-12-14T11:17:43.000Z | 2021-12-16T07:35:43.000Z | import torch
from torch.nn import functional as F
from torchmetrics import Metric
from models.components.utils import AttentionMask
| 49.163265 | 125 | 0.65027 | import torch
from torch.nn import functional as F
from torchmetrics import Metric
from models.components.utils import AttentionMask
class LocalRetrievalMetrics(Metric):
def __init__(self, topk=(1, 5),
acc_name='top_{k}_acc',
weighted_acc_name='weighted_top_{k}_acc',
... | 2,741 | 1,921 | 23 |
569065124cbd11728d67697d3d36bb715343e14a | 294 | py | Python | pinakes/main/common/tests/functional/test_about.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | 2 | 2022-03-17T18:53:58.000Z | 2022-03-17T22:04:22.000Z | pinakes/main/common/tests/functional/test_about.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | 9 | 2022-03-18T08:22:57.000Z | 2022-03-30T17:14:49.000Z | pinakes/main/common/tests/functional/test_about.py | hsong-rh/pinakes | 2f08cb757ca64c866af3244686b92a3074fc7571 | [
"Apache-2.0"
] | 7 | 2022-03-17T22:03:08.000Z | 2022-03-28T21:28:34.000Z | """Test about view"""
import pytest
@pytest.mark.django_db
def test_about(api_request):
"""Test about GET endpoint"""
response = api_request("get", "common:about")
assert response.status_code == 200
assert "product_name" in response.data
assert "version" in response.data
| 24.5 | 49 | 0.707483 | """Test about view"""
import pytest
@pytest.mark.django_db
def test_about(api_request):
"""Test about GET endpoint"""
response = api_request("get", "common:about")
assert response.status_code == 200
assert "product_name" in response.data
assert "version" in response.data
| 0 | 0 | 0 |
36ba270c3402aa4a3591c37c11d1cf962bf5bbc1 | 366 | py | Python | StalinSort.py | joscha0/ExoticAlgorithms | 86601200e1bf590fbd246a6c6677ac6e850b9e1c | [
"MIT"
] | null | null | null | StalinSort.py | joscha0/ExoticAlgorithms | 86601200e1bf590fbd246a6c6677ac6e850b9e1c | [
"MIT"
] | null | null | null | StalinSort.py | joscha0/ExoticAlgorithms | 86601200e1bf590fbd246a6c6677ac6e850b9e1c | [
"MIT"
] | 2 | 2019-04-03T09:04:36.000Z | 2019-05-17T13:19:54.000Z |
if __name__ == "__main__":
list1 = [1,4,2,5,6,5,3]
print('\n\n-----Stalin Sorting Algorithm-----\n')
print('unsorted list: '+str(list1))
print('sorted list: '+str(stalinSort(list1))) | 28.153846 | 53 | 0.571038 | def stalinSort(lst):
sorted_list = [lst[0]]
for i in lst[1:]:
if i >= sorted_list[-1]:
sorted_list.append(i)
return sorted_list
if __name__ == "__main__":
list1 = [1,4,2,5,6,5,3]
print('\n\n-----Stalin Sorting Algorithm-----\n')
print('unsorted list: '+str(list1))
pri... | 138 | 0 | 22 |
f9e994ad70317ea383079aa8f894e5717769e495 | 834 | py | Python | unionchan/runlocal.py | mochidaz/union-chan | 410e77e33ce4263d0adff0c7303d9413eb5faab9 | [
"MIT"
] | 4 | 2020-07-19T13:41:42.000Z | 2020-08-03T05:47:59.000Z | unionchan/runlocal.py | mochidaz/union-chan | 410e77e33ce4263d0adff0c7303d9413eb5faab9 | [
"MIT"
] | 4 | 2020-11-13T18:59:33.000Z | 2022-02-10T02:14:45.000Z | unionchan/runlocal.py | mochidaz/union-chan | 410e77e33ce4263d0adff0c7303d9413eb5faab9 | [
"MIT"
] | 3 | 2020-07-19T16:07:25.000Z | 2021-01-31T13:45:03.000Z | import numpy
import tflearn
import tensorflow
import json
import random
import datetime
from utils.utils import net, label, kata, data, sekantung_kata
model = tflearn.DNN(net)
model.load("model/model.tfl")
if __name__ == '__main__':
chat()
| 23.828571 | 64 | 0.589928 | import numpy
import tflearn
import tensorflow
import json
import random
import datetime
from utils.utils import net, label, kata, data, sekantung_kata
model = tflearn.DNN(net)
model.load("model/model.tfl")
def chat():
while True:
content = str(input("Pengguna: "))
if content == "dadah":
... | 564 | 0 | 23 |
d151688d7ced74000a8d74c506785adc3588f6a1 | 668 | py | Python | pages/artefacts/contents/SSD/exercises/recursion.py | yinpinglai/ypinglai.github.io | f82e6380061ec30eb9d71739cedb9115671af565 | [
"CC-BY-3.0"
] | null | null | null | pages/artefacts/contents/SSD/exercises/recursion.py | yinpinglai/ypinglai.github.io | f82e6380061ec30eb9d71739cedb9115671af565 | [
"CC-BY-3.0"
] | null | null | null | pages/artefacts/contents/SSD/exercises/recursion.py | yinpinglai/ypinglai.github.io | f82e6380061ec30eb9d71739cedb9115671af565 | [
"CC-BY-3.0"
] | null | null | null |
if __name__ == '__main__':
n = 4
Solution().tower_of_hanoi(n, 'A', 'B', 'C')
| 30.363636 | 77 | 0.679641 | class Solution:
def tower_of_hanoi(self, n, source, destination, auxiliary):
'''Recursive function for solving the tower of hanoi problem'''
# Base case for the recursion function
if n == 1:
print(f'Move disk 1 from source {source} to destination {destination}')
return
# Move from s... | 0 | 562 | 22 |
f9075a7a8b5220a708c1cc2264c0723cb62d18d5 | 1,029 | py | Python | backend/app/app/crud/crud_item.py | L3RAT/passvortex | ddfac2d4969f2be60d19a9ca857e58939aa8f128 | [
"MIT"
] | null | null | null | backend/app/app/crud/crud_item.py | L3RAT/passvortex | ddfac2d4969f2be60d19a9ca857e58939aa8f128 | [
"MIT"
] | null | null | null | backend/app/app/crud/crud_item.py | L3RAT/passvortex | ddfac2d4969f2be60d19a9ca857e58939aa8f128 | [
"MIT"
] | null | null | null | from typing import List
from fastapi.encoders import jsonable_encoder
from sqlalchemy.orm import Session
from app.core.security import encrypt_secret
from app.crud.base import CRUDBase
from app.models.item import Item
from app.schemas.item import ItemCreate, ItemUpdate
import json
item = CRUDItem(Item)
| 27.810811 | 76 | 0.620991 | from typing import List
from fastapi.encoders import jsonable_encoder
from sqlalchemy.orm import Session
from app.core.security import encrypt_secret
from app.crud.base import CRUDBase
from app.models.item import Item
from app.schemas.item import ItemCreate, ItemUpdate
import json
class CRUDItem(CRUDBase[Item, ItemCre... | 613 | 34 | 76 |
d9c9d7b3236a94973bc2fb541d5f643b9f229cdf | 38 | py | Python | for2.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | for2.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | for2.py | praveenpmin/Python | 513fcde7430b03a187e2c7e58302b88645388eed | [
"MIT"
] | null | null | null | for i in range(0, 10):
print (i), | 19 | 23 | 0.526316 | for i in range(0, 10):
print (i), | 0 | 0 | 0 |
64608f911d582a4617181a86fb3474aee6b5f498 | 216 | py | Python | media_library/adapters/datasources/mongo_item_datasource/mongo/model.py | jpsalamarcara/every_angle_rec_test | 1595088bfdea580f2f9bb02b7ed9e6b3c97dc17b | [
"MIT"
] | null | null | null | media_library/adapters/datasources/mongo_item_datasource/mongo/model.py | jpsalamarcara/every_angle_rec_test | 1595088bfdea580f2f9bb02b7ed9e6b3c97dc17b | [
"MIT"
] | null | null | null | media_library/adapters/datasources/mongo_item_datasource/mongo/model.py | jpsalamarcara/every_angle_rec_test | 1595088bfdea580f2f9bb02b7ed9e6b3c97dc17b | [
"MIT"
] | null | null | null |
from mongoengine import *
| 24 | 43 | 0.74537 |
from mongoengine import *
class StoredItem(DynamicDocument):
uid = SequenceField(primary_key=True)
name = StringField(required=True)
media_type = StringField(required=True)
location = StringField() | 0 | 166 | 23 |
87717b27eb0ad86fca3a1abc5a9c047b441ba6f0 | 1,707 | py | Python | vendors/spiders/goudenton.py | nl-hugo/grapy | b72216f0a1c93286575d4c1d81c1f4825021dfec | [
"MIT"
] | 2 | 2018-08-02T20:33:44.000Z | 2018-11-14T12:57:28.000Z | vendors/spiders/goudenton.py | nl-hugo/grapy | b72216f0a1c93286575d4c1d81c1f4825021dfec | [
"MIT"
] | null | null | null | vendors/spiders/goudenton.py | nl-hugo/grapy | b72216f0a1c93286575d4c1d81c1f4825021dfec | [
"MIT"
] | 1 | 2019-01-10T16:19:35.000Z | 2019-01-10T16:19:35.000Z | # -*- coding: utf-8 -*-
import scrapy
from vendors.items import VendorWine
from vendors.utils import float_or_none
| 36.319149 | 98 | 0.625073 | # -*- coding: utf-8 -*-
import scrapy
from vendors.items import VendorWine
from vendors.utils import float_or_none
def find_property(response, label):
result = response.css('#product-attribute-specs-table') \
.xpath('//th[contains(text(), "{}")]/following-sibling::td/text()'.format(label)).get()
if r... | 249 | 1,294 | 46 |
565b740e0a2b43a85afca2d59fb2a573fac15d32 | 4,550 | py | Python | fisher_py/data/sequence_file_writer.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 3 | 2021-11-03T20:55:45.000Z | 2022-02-01T10:11:47.000Z | fisher_py/data/sequence_file_writer.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 2 | 2022-01-28T02:04:21.000Z | 2022-01-29T01:29:14.000Z | fisher_py/data/sequence_file_writer.py | abdelq/fisher_py | befb98732ba7c4e57858d158c68cda09ed829d66 | [
"MIT"
] | 1 | 2022-01-26T23:30:37.000Z | 2022-01-26T23:30:37.000Z | from fisher_py.net_wrapping import NetWrapperBase
from fisher_py.data import FileHeader, FileError, SequenceInfo
from fisher_py.data.business import SampleInformation, BracketType
from typing import List
| 29.934211 | 96 | 0.627253 | from fisher_py.net_wrapping import NetWrapperBase
from fisher_py.data import FileHeader, FileError, SequenceInfo
from fisher_py.data.business import SampleInformation, BracketType
from typing import List
class SequenceFileWriter(NetWrapperBase):
def __init__(self):
super().__init__()
self._fi... | 125 | 4,196 | 23 |
1a716336214a081c4e22fedb7d3a76054d86896e | 3,858 | py | Python | ir_datasets/datasets/clirmatrix.py | seanmacavaney/ir_datasets | a8e56f53bb06fcf11164fb0ffc4afc497a6e7507 | [
"Apache-2.0"
] | null | null | null | ir_datasets/datasets/clirmatrix.py | seanmacavaney/ir_datasets | a8e56f53bb06fcf11164fb0ffc4afc497a6e7507 | [
"Apache-2.0"
] | null | null | null | ir_datasets/datasets/clirmatrix.py | seanmacavaney/ir_datasets | a8e56f53bb06fcf11164fb0ffc4afc497a6e7507 | [
"Apache-2.0"
] | null | null | null | import contextlib
from pathlib import Path
from typing import NamedTuple
import ir_datasets
from ir_datasets.util import GzipExtract, DownloadConfig, _DownloadConfig
from ir_datasets.datasets.base import Dataset, YamlDocumentation
from ir_datasets.formats import TsvDocs, CLIRMatrixQueries, CLIRMatrixQrels
NAME = 'clir... | 44.860465 | 883 | 0.608087 | import contextlib
from pathlib import Path
from typing import NamedTuple
import ir_datasets
from ir_datasets.util import GzipExtract, DownloadConfig, _DownloadConfig
from ir_datasets.datasets.base import Dataset, YamlDocumentation
from ir_datasets.formats import TsvDocs, CLIRMatrixQueries, CLIRMatrixQrels
NAME = 'clir... | 3,348 | 0 | 23 |
f7e0dea9de8ac33acc29d4283d1db7dc1b9430a5 | 198 | py | Python | CSES/Dynamic_Programming/Dice_Combinations.py | kancharlaraju21/Competitive_Programming | 98dc9ff17ce42a5b884b0460c161b42bbb203f0e | [
"MIT"
] | null | null | null | CSES/Dynamic_Programming/Dice_Combinations.py | kancharlaraju21/Competitive_Programming | 98dc9ff17ce42a5b884b0460c161b42bbb203f0e | [
"MIT"
] | null | null | null | CSES/Dynamic_Programming/Dice_Combinations.py | kancharlaraju21/Competitive_Programming | 98dc9ff17ce42a5b884b0460c161b42bbb203f0e | [
"MIT"
] | null | null | null | n=int(input())
m=1000000007
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
for j in range(1,7):
if i-j >= 0:
dp[i]=(dp[i]+dp[i-j])%m
else:
break
print(dp[n]) | 18 | 35 | 0.449495 | n=int(input())
m=1000000007
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
for j in range(1,7):
if i-j >= 0:
dp[i]=(dp[i]+dp[i-j])%m
else:
break
print(dp[n]) | 0 | 0 | 0 |
035212274fe5f2c36cd9bf6f0401cf06e9c747da | 807 | py | Python | class_n_objects.py | ntnshrm87/OOP-Basics-Python | 4387c4c565266dc93fc8b03484dea59ef47f59c8 | [
"MIT"
] | 1 | 2018-06-28T16:20:45.000Z | 2018-06-28T16:20:45.000Z | class_n_objects.py | ntnshrm87/OOP-Basics-Python | 4387c4c565266dc93fc8b03484dea59ef47f59c8 | [
"MIT"
] | null | null | null | class_n_objects.py | ntnshrm87/OOP-Basics-Python | 4387c4c565266dc93fc8b03484dea59ef47f59c8 | [
"MIT"
] | null | null | null | # This is a small python snippet which introduces how to create a class with a constructor,
# some functions inside the class and their usage.
# Creating an instance of object
x = Store("Security Books")
# Adding items in stock
x.add_item("Gray Hat Hacking", 34)
x.add_item("Rafay Baloch", 34.42)
# Total of stock ite... | 27.827586 | 91 | 0.634449 | # This is a small python snippet which introduces how to create a class with a constructor,
# some functions inside the class and their usage.
class Store:
def __init__(self, name):
self.name = name
self.items = []
def add_item(self, name, price):
''' A function to add items in store l... | 53 | 358 | 23 |
095cbd232c26ef5dc95418fa6f5dfdff8df44a43 | 717 | py | Python | examples/other_api_requests.py | miguelmartinez1024/adobe_analytics | f32ac71ce1d25478fd3085c0136b8c4f49027b58 | [
"MIT"
] | 32 | 2018-01-26T19:17:25.000Z | 2019-12-05T14:26:20.000Z | examples/other_api_requests.py | miguelmartinez1024/adobe_analytics | f32ac71ce1d25478fd3085c0136b8c4f49027b58 | [
"MIT"
] | 14 | 2018-01-22T08:41:46.000Z | 2018-12-06T06:12:24.000Z | examples/other_api_requests.py | miguelmartinez1024/adobe_analytics | f32ac71ce1d25478fd3085c0136b8c4f49027b58 | [
"MIT"
] | 15 | 2018-07-12T17:25:22.000Z | 2020-03-12T16:28:15.000Z | """
The client class has a request method that allows all sorts of generic API requests to Adobe's v1.4 REST API.
To get a comprehensive overview of available APIs and methods check out the official Adobe Analytics API Explorer:
https://marketing.adobe.com/developer/api-explorer
"""
from adobe_analytics import Client
... | 28.68 | 114 | 0.684798 | """
The client class has a request method that allows all sorts of generic API requests to Adobe's v1.4 REST API.
To get a comprehensive overview of available APIs and methods check out the official Adobe Analytics API Explorer:
https://marketing.adobe.com/developer/api-explorer
"""
from adobe_analytics import Client
... | 0 | 0 | 0 |
64287cc0757e35ce2d45843039a9087d0ef05d47 | 406 | py | Python | test/test_complex.py | zsennenga/luabins_py | 30e3feca7f042777a3d9bef5aa510f406427dfc1 | [
"MIT"
] | null | null | null | test/test_complex.py | zsennenga/luabins_py | 30e3feca7f042777a3d9bef5aa510f406427dfc1 | [
"MIT"
] | null | null | null | test/test_complex.py | zsennenga/luabins_py | 30e3feca7f042777a3d9bef5aa510f406427dfc1 | [
"MIT"
] | 1 | 2022-03-09T23:54:47.000Z | 2022-03-09T23:54:47.000Z | import os
from io import BytesIO
from luabins import decode_luabins, encode_luabins
| 27.066667 | 63 | 0.67734 | import os
from io import BytesIO
from luabins import decode_luabins, encode_luabins
def test_debug():
path = os.path.join(os.path.dirname(__file__), "debug.bin")
with open(path, "rb") as f:
orig = f.read()
decode1 = decode_luabins(BytesIO(orig))
re_encoded = encode_luabins(decode1)
... | 297 | 0 | 23 |
ead51da1ae11b386408fc638228f708d544125c7 | 3,358 | py | Python | apps/article/tests.py | aplot249/my_blog | 7cfcd67991f0a6dc861847514e8d0fca2213fa8b | [
"MIT"
] | null | null | null | apps/article/tests.py | aplot249/my_blog | 7cfcd67991f0a6dc861847514e8d0fca2213fa8b | [
"MIT"
] | 5 | 2021-06-02T01:30:26.000Z | 2022-03-12T00:24:27.000Z | apps/article/tests.py | qq1788lover/my_blog | 7cfcd67991f0a6dc861847514e8d0fca2213fa8b | [
"MIT"
] | null | null | null | from django.test import TestCase
import datetime
from django.utils import timezone
from article.models import ArticlePost
from django.contrib.auth.models import User
from time import sleep
from django.urls import reverse
| 33.58 | 110 | 0.634306 | from django.test import TestCase
import datetime
from django.utils import timezone
from article.models import ArticlePost
from django.contrib.auth.models import User
from time import sleep
from django.urls import reverse
class ArticlePostModelTests(TestCase):
def test_was_created_recently_with_future_article(se... | 3,053 | 34 | 208 |
402a6f87b97039e102c823f882ab0d40841d486c | 1,914 | py | Python | tempo/mlserver.py | michaelcheah/tempo | 41687e76a62619ed73bf197a557513c287fe43dc | [
"Apache-2.0"
] | null | null | null | tempo/mlserver.py | michaelcheah/tempo | 41687e76a62619ed73bf197a557513c287fe43dc | [
"Apache-2.0"
] | null | null | null | tempo/mlserver.py | michaelcheah/tempo | 41687e76a62619ed73bf197a557513c287fe43dc | [
"Apache-2.0"
] | null | null | null | import json
import os
from mlserver import MLModel
from mlserver.types import InferenceRequest, InferenceResponse
from mlserver.utils import get_model_uri
from .serve.base import BaseModel
from .serve.constants import ENV_TEMPO_RUNTIME_OPTIONS
from .serve.loader import load
from .serve.metadata import ModelFramework,... | 31.377049 | 76 | 0.700627 | import json
import os
from mlserver import MLModel
from mlserver.types import InferenceRequest, InferenceResponse
from mlserver.utils import get_model_uri
from .serve.base import BaseModel
from .serve.constants import ENV_TEMPO_RUNTIME_OPTIONS
from .serve.loader import load
from .serve.metadata import ModelFramework,... | 1,369 | 11 | 153 |
724703dadf3641357af57821f330c5eb0d47c98b | 10,438 | py | Python | nets/joint_cnn.py | redwankarimsony/UniFAD | 0edd851573313bdf013ca8f8844f45413dfd5373 | [
"MIT"
] | null | null | null | nets/joint_cnn.py | redwankarimsony/UniFAD | 0edd851573313bdf013ca8f8844f45413dfd5373 | [
"MIT"
] | null | null | null | nets/joint_cnn.py | redwankarimsony/UniFAD | 0edd851573313bdf013ca8f8844f45413dfd5373 | [
"MIT"
] | 1 | 2022-02-11T05:02:46.000Z | 2022-02-11T05:02:46.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import tensorflow as tf
import tensorflow.contrib.slim as slim
model_params = {
'basic': ([0, 0, 0, 0], [16, 32, 64, 128]),
'test': ([0, 1, 2, 3, 2], [64, [64,128], [128,256], [256,512], [2... | 55.227513 | 120 | 0.587469 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import tensorflow as tf
import tensorflow.contrib.slim as slim
model_params = {
'basic': ([0, 0, 0, 0], [16, 32, 64, 128]),
'test': ([0, 1, 2, 3, 2], [64, [64,128], [128,256], [256,512], [2... | 5,041 | 0 | 115 |
c68cb9d7cbf1af2d8ca985b14341bae9e6bc9925 | 6,099 | py | Python | bin/decode-kubeconfig.py | dmrub/kubespray | b9801a61d2bd82cbca68fbf2b5e25362feb44733 | [
"Apache-2.0"
] | null | null | null | bin/decode-kubeconfig.py | dmrub/kubespray | b9801a61d2bd82cbca68fbf2b5e25362feb44733 | [
"Apache-2.0"
] | null | null | null | bin/decode-kubeconfig.py | dmrub/kubespray | b9801a61d2bd82cbca68fbf2b5e25362feb44733 | [
"Apache-2.0"
] | 1 | 2020-02-12T15:50:15.000Z | 2020-02-12T15:50:15.000Z | #!/usr/bin/env python
from __future__ import print_function
import logging
import sys
import os
import yaml
import base64
import subprocess
import tempfile
logger = logging.getLogger()
def run_command(command, env=None, cwd=None, stdin=None,
get_stdout=True, get_stderr=True):
"""returns triple (... | 34.653409 | 89 | 0.513691 | #!/usr/bin/env python
from __future__ import print_function
import logging
import sys
import os
import yaml
import base64
import subprocess
import tempfile
logger = logging.getLogger()
def run_command(command, env=None, cwd=None, stdin=None,
get_stdout=True, get_stderr=True):
"""returns triple (... | 2,362 | 15 | 118 |
7dbca43a3679dcbd7e5e666dbd9f4bab888170b5 | 218 | py | Python | app/api.py | darrenvong/local-lead-finder | 2391b46549b30eda237578f17c8f499536dd6a17 | [
"MIT"
] | 2 | 2022-02-13T08:22:56.000Z | 2022-02-14T01:31:28.000Z | app/api.py | darrenvong/local-lead-finder | 2391b46549b30eda237578f17c8f499536dd6a17 | [
"MIT"
] | null | null | null | app/api.py | darrenvong/local-lead-finder | 2391b46549b30eda237578f17c8f499536dd6a17 | [
"MIT"
] | null | null | null | from flask import render_template
from app import app
@app.route('/', methods=['GET', 'POST'])
if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0")
| 18.166667 | 40 | 0.665138 | from flask import render_template
from app import app
@app.route('/', methods=['GET', 'POST'])
def home():
return render_template('home.html')
if __name__ == '__main__':
app.run(debug=True, host="0.0.0.0")
| 30 | 0 | 22 |
1384aeebc5e42d066a37d9cabd196e83c0c37c35 | 12,239 | py | Python | tests/unit/pipelines/test_base_pipeline.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | tests/unit/pipelines/test_base_pipeline.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | tests/unit/pipelines/test_base_pipeline.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. 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:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 33.809392 | 80 | 0.745731 | # Copyright (c) ZenML GmbH 2021. 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:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 156 | 27 | 261 |
0da39b11eb48f74048d82c3a79d5b8d12a4a9d56 | 5,454 | py | Python | mmaction/models/heads/osbp_tsm_head.py | Haawron/mmaction2 | 5927ccc2936759df8977fb588640cbf158264afc | [
"Apache-2.0"
] | null | null | null | mmaction/models/heads/osbp_tsm_head.py | Haawron/mmaction2 | 5927ccc2936759df8977fb588640cbf158264afc | [
"Apache-2.0"
] | null | null | null | mmaction/models/heads/osbp_tsm_head.py | Haawron/mmaction2 | 5927ccc2936759df8977fb588640cbf158264afc | [
"Apache-2.0"
] | 1 | 2022-03-29T13:22:40.000Z | 2022-03-29T13:22:40.000Z | import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from torch.autograd import Function
import numpy as np
from ..builder import HEADS
from ...core import top_k_accuracy
from .base import AvgConsensus, BaseHead
@HEADS.register_module() | 35.415584 | 83 | 0.563073 | import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from torch.autograd import Function
import numpy as np
from ..builder import HEADS
from ...core import top_k_accuracy
from .base import AvgConsensus, BaseHead
class GradReverse(Function):
@staticmethod
def forward(ctx, x, target_idx_mask):
... | 3,532 | 1,622 | 45 |
dac48f3495e352413ea7eecbbc73238e87ac1463 | 1,169 | py | Python | better_tree/parser.py | antoniouaa/better-tree | d2030e23cf5eb2d94966741fb2917759afecd9fe | [
"MIT"
] | null | null | null | better_tree/parser.py | antoniouaa/better-tree | d2030e23cf5eb2d94966741fb2917759afecd9fe | [
"MIT"
] | 2 | 2021-11-05T12:24:39.000Z | 2021-11-29T14:37:45.000Z | better_tree/parser.py | antoniouaa/better-tree | d2030e23cf5eb2d94966741fb2917759afecd9fe | [
"MIT"
] | null | null | null | import sys
import argparse
PROG = "tree"
USAGE = "%(prog)s <Path> [options]"
DESCRIPTION = "Featureful tree utility in Python"
| 21.648148 | 55 | 0.558597 | import sys
import argparse
PROG = "tree"
USAGE = "%(prog)s <Path> [options]"
DESCRIPTION = "Featureful tree utility in Python"
class CLIParser(argparse.ArgumentParser):
def error(self, *args, **kwargs):
self.print_help()
sys.exit(1)
def assemble_parser() -> CLIParser:
parser = CLIParser(
... | 947 | 20 | 72 |
ac31baa26e1d3c94895d8932cf2b535d4808d75c | 638 | py | Python | backend/src/gloader/xml/sax/drivers2/drv_pyexpat.py | anrl/gini4 | d26649c8c02a1737159e48732cf1ee15ba2a604d | [
"MIT"
] | 11 | 2019-03-02T20:39:34.000Z | 2021-09-02T19:47:38.000Z | backend/src/gloader/xml/sax/drivers2/drv_pyexpat.py | anrl/gini4 | d26649c8c02a1737159e48732cf1ee15ba2a604d | [
"MIT"
] | 29 | 2019-01-17T15:44:48.000Z | 2021-06-02T00:19:40.000Z | backend/src/gloader/xml/sax/drivers2/drv_pyexpat.py | anrl/gini4 | d26649c8c02a1737159e48732cf1ee15ba2a604d | [
"MIT"
] | 11 | 2019-01-28T05:00:55.000Z | 2021-11-12T03:08:32.000Z | """
SAX driver for the Pyexpat C module, based on xml.sax.expatdriver.
$Id: drv_pyexpat.py,v 1.6 2000/09/26 19:53:43 loewis Exp $
"""
# XXX: todo list of old drv_pyexpat.py, check whether any of these
# have been fixed.
# Todo on driver:
# - make it support external entities (wait for pyexpat.c)
# - enable configur... | 30.380952 | 74 | 0.741379 | """
SAX driver for the Pyexpat C module, based on xml.sax.expatdriver.
$Id: drv_pyexpat.py,v 1.6 2000/09/26 19:53:43 loewis Exp $
"""
# XXX: todo list of old drv_pyexpat.py, check whether any of these
# have been fixed.
# Todo on driver:
# - make it support external entities (wait for pyexpat.c)
# - enable configur... | 0 | 0 | 0 |
dd220118b8a22188a6ab29bd9ce5820c867c1eb0 | 17,321 | py | Python | HW1/Roomba/Roomba.py | AnarchyKitten/AI-HOMEWORK | 79e4aa9ce897c9d83e526128fbfe57433f31d2d4 | [
"MIT"
] | 2 | 2020-02-10T19:06:20.000Z | 2020-04-01T18:23:05.000Z | HW1/Roomba/Roomba.py | AnarchyKitten/AI-HOMEWORK | 79e4aa9ce897c9d83e526128fbfe57433f31d2d4 | [
"MIT"
] | null | null | null | HW1/Roomba/Roomba.py | AnarchyKitten/AI-HOMEWORK | 79e4aa9ce897c9d83e526128fbfe57433f31d2d4 | [
"MIT"
] | 1 | 2022-03-09T19:33:22.000Z | 2022-03-09T19:33:22.000Z | import time
import random
from pprint import pprint
global env
env= {
"BATTERY_LEVEL": 100,
"SPOT": False,
"SPOT_LOCATION": (3.0, 7.0),
"GENERAL": False,
"DUSTY_SPOT": False,
"DUSTY_SPOT_LOCATION": (0.0, -4.0),
"HOME_PATH": [],
"LOCATION": (-3.0, 5.0),
"FACING": (0, 1)
}
NODE_INITI... | 29.307953 | 119 | 0.553836 | import time
import random
from pprint import pprint
global env
env= {
"BATTERY_LEVEL": 100,
"SPOT": False,
"SPOT_LOCATION": (3.0, 7.0),
"GENERAL": False,
"DUSTY_SPOT": False,
"DUSTY_SPOT_LOCATION": (0.0, -4.0),
"HOME_PATH": [],
"LOCATION": (-3.0, 5.0),
"FACING": (0, 1)
}
NODE_INITI... | 13,028 | 2,449 | 1,242 |
37546ff764e016562d941b3ee20057f64c4e4b6c | 387 | py | Python | 2020/noxfile.py | danoscarmike/adventofcode | 1395dd8dd684e4b23697c53e445b2114d64c2791 | [
"MIT"
] | null | null | null | 2020/noxfile.py | danoscarmike/adventofcode | 1395dd8dd684e4b23697c53e445b2114d64c2791 | [
"MIT"
] | null | null | null | 2020/noxfile.py | danoscarmike/adventofcode | 1395dd8dd684e4b23697c53e445b2114d64c2791 | [
"MIT"
] | null | null | null | import nox
BLACK_PATHS = ["helpers", "."]
@nox.session(python="3.8")
def blacken(session):
"""Run black.
Format code to uniform standard.
"""
session.install("black")
session.run(
"black",
*BLACK_PATHS,
)
@nox.session(python="3.8")
def unit(session):
"""Run the unit test... | 16.826087 | 36 | 0.591731 | import nox
BLACK_PATHS = ["helpers", "."]
@nox.session(python="3.8")
def blacken(session):
"""Run black.
Format code to uniform standard.
"""
session.install("black")
session.run(
"black",
*BLACK_PATHS,
)
@nox.session(python="3.8")
def unit(session):
"""Run the unit test... | 0 | 0 | 0 |
a5a9574abdde11cd0e70b802e9c87737ec3086a4 | 4,303 | py | Python | aioevent/emitter.py | travigd/aioevent | 1338e052664d0bb0767a5809f2c4fe5903b9a78f | [
"MIT"
] | null | null | null | aioevent/emitter.py | travigd/aioevent | 1338e052664d0bb0767a5809f2c4fe5903b9a78f | [
"MIT"
] | null | null | null | aioevent/emitter.py | travigd/aioevent | 1338e052664d0bb0767a5809f2c4fe5903b9a78f | [
"MIT"
] | null | null | null | """
Provides EventEmitter class.
"""
import asyncio
from functools import partial
from typing import (
Callable,
Dict,
Type,
Union,
Coroutine,
Set,
)
from .event import BaseEvent
from .subscription import Subscription
# pylint: disable=invalid-name
EventCallbackType = Callable[[BaseEvent], U... | 33.88189 | 97 | 0.633279 | """
Provides EventEmitter class.
"""
import asyncio
from functools import partial
from typing import (
Callable,
Dict,
Type,
Union,
Coroutine,
Set,
)
from .event import BaseEvent
from .subscription import Subscription
# pylint: disable=invalid-name
EventCallbackType = Callable[[BaseEvent], U... | 491 | 0 | 54 |
f5058bb46b1b8ce6b5bbfce558362f47d32b3f33 | 9,251 | py | Python | sandbox/src/CEDARDispersionTXTFixer.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 5 | 2016-05-28T14:12:28.000Z | 2021-04-22T10:23:12.000Z | sandbox/src/CEDARDispersionTXTFixer.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | null | null | null | sandbox/src/CEDARDispersionTXTFixer.py | sniemi/SamPy | e048756feca67197cf5f995afd7d75d8286e017b | [
"BSD-2-Clause"
] | 2 | 2015-07-13T10:04:10.000Z | 2021-04-22T10:23:23.000Z | #! /usr/bin/env python
'''
A script to fix CEDAR's ASCII dispersion solution output.
ABOUT:
This script can be used to modify .txt files that CEDAR produce when
dispersion solution output has been saved.
USAGE:
CEDARDispersionTXTFixer.py [-h] [-v] [-r] [-c] [-f] string [-o] srtring
... | 38.227273 | 125 | 0.535726 | #! /usr/bin/env python
'''
A script to fix CEDAR's ASCII dispersion solution output.
ABOUT:
This script can be used to modify .txt files that CEDAR produce when
dispersion solution output has been saved.
USAGE:
CEDARDispersionTXTFixer.py [-h] [-v] [-r] [-c] [-f] string [-o] srtring
... | 1,391 | 0 | 45 |
c83e1a47a5b871d41b07e55fee7a24c1853ca798 | 1,731 | py | Python | tutorial/bn/ip_bn.py | Xiaoming-Wang1/yambopy | 5b8cb6882657a4ff70dc3cf450d7ac0b5effc952 | [
"BSD-3-Clause"
] | 21 | 2016-04-07T20:53:29.000Z | 2021-05-14T08:06:02.000Z | tutorial/bn/ip_bn.py | Xiaoming-Wang1/yambopy | 5b8cb6882657a4ff70dc3cf450d7ac0b5effc952 | [
"BSD-3-Clause"
] | 22 | 2016-06-14T22:29:47.000Z | 2021-09-16T15:36:26.000Z | tutorial/bn/ip_bn.py | Xiaoming-Wang1/yambopy | 5b8cb6882657a4ff70dc3cf450d7ac0b5effc952 | [
"BSD-3-Clause"
] | 15 | 2016-06-14T18:40:57.000Z | 2021-08-07T13:17:43.000Z | #
# Author: Henrique Pereira Coutada Miranda
# Run a IP calculation using yambo
#
from __future__ import print_function
import sys
from yambopy import *
from qepy import *
import argparse
#parse options
parser = argparse.ArgumentParser(description='Test the yambopy script.')
parser.add_argument('-dg','--doublegrid', a... | 26.227273 | 92 | 0.656268 | #
# Author: Henrique Pereira Coutada Miranda
# Run a IP calculation using yambo
#
from __future__ import print_function
import sys
from yambopy import *
from qepy import *
import argparse
#parse options
parser = argparse.ArgumentParser(description='Test the yambopy script.')
parser.add_argument('-dg','--doublegrid', a... | 0 | 0 | 0 |
f1f7ec5076f3b1117487b59e537c55f9effc9a82 | 392 | py | Python | posthog/migrations/0169_person_properties_last_updated_at.py | asherf/posthog | 1e50704d76cba484e80b83f1e1f658bd6e98743a | [
"MIT"
] | null | null | null | posthog/migrations/0169_person_properties_last_updated_at.py | asherf/posthog | 1e50704d76cba484e80b83f1e1f658bd6e98743a | [
"MIT"
] | null | null | null | posthog/migrations/0169_person_properties_last_updated_at.py | asherf/posthog | 1e50704d76cba484e80b83f1e1f658bd6e98743a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.12 on 2021-09-21 16:11
from django.db import migrations, models
| 23.058824 | 105 | 0.665816 | # Generated by Django 3.1.12 on 2021-09-21 16:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0168_action_step_empty_string_reset"),
]
operations = [
migrations.AddField(
model_name="person", name="properties_l... | 0 | 277 | 23 |
b05a163fdb441b5073b8b789628c28f2e21a779e | 939 | py | Python | src/lib/datasets/dataset_factory.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | src/lib/datasets/dataset_factory.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | src/lib/datasets/dataset_factory.py | goodxue/CenterNet | 50e1726664337fb988542e3c2247a4c57ef74334 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .sample.ddd import DddDataset
from .sample.exdet import EXDetDataset
from .sample.ctdet import CTDetDataset
from .sample.multi_pose import MultiPoseDataset
from .dataset.coco import COCO
from .dataset.pas... | 23.475 | 65 | 0.779553 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .sample.ddd import DddDataset
from .sample.exdet import EXDetDataset
from .sample.ctdet import CTDetDataset
from .sample.multi_pose import MultiPoseDataset
from .dataset.coco import COCO
from .dataset.pas... | 102 | 0 | 23 |
5e3497501962f190bafae73c2c0a96641f61d801 | 637 | py | Python | submitify/migrations/0003_auto_20161124_0055.py | OpenFurry/submitify | 10ff1961fb76b100a5087197760611c925f295a7 | [
"MIT"
] | null | null | null | submitify/migrations/0003_auto_20161124_0055.py | OpenFurry/submitify | 10ff1961fb76b100a5087197760611c925f295a7 | [
"MIT"
] | 14 | 2016-11-20T22:07:56.000Z | 2021-06-10T18:26:45.000Z | submitify/migrations/0003_auto_20161124_0055.py | OpenFurry/submitify | 10ff1961fb76b100a5087197760611c925f295a7 | [
"MIT"
] | 1 | 2016-11-20T21:58:29.000Z | 2016-11-20T21:58:29.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-24 00:55
from __future__ import unicode_literals
from django.db import migrations, models
| 23.592593 | 48 | 0.585557 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-24 00:55
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('submitify', '0002_call_invite_only'),
]
operations = [
migrations.RenameFie... | 0 | 458 | 23 |
3651acbfff4d1dc6104b1163d9bcf7633f3d1ddf | 1,397 | py | Python | hata/discord/message/message_activity.py | Multiface24111/hata | cd28f9ef158e347363669cc8d1d49db0ff41aba0 | [
"0BSD"
] | 173 | 2019-06-14T20:25:00.000Z | 2022-03-21T19:36:10.000Z | hata/discord/message/message_activity.py | Tari-dev/hata | a5c3199c845858f997af3b0b2c18770fdc691897 | [
"0BSD"
] | 52 | 2020-01-03T17:05:14.000Z | 2022-03-31T11:39:50.000Z | hata/discord/message/message_activity.py | Tari-dev/hata | a5c3199c845858f997af3b0b2c18770fdc691897 | [
"0BSD"
] | 47 | 2019-11-09T08:46:45.000Z | 2022-03-31T14:33:34.000Z | __all__ = ('MessageActivity', )
from .preinstanced import MessageActivityType
class MessageActivity:
"""
Might be sent with a ``Message``, if it has rich presence-related chat embeds.
Attributes
----------
party_id : `str`
The message application's party's id. Can be empty string.
... | 31.044444 | 115 | 0.582677 | __all__ = ('MessageActivity', )
from .preinstanced import MessageActivityType
class MessageActivity:
"""
Might be sent with a ``Message``, if it has rich presence-related chat embeds.
Attributes
----------
party_id : `str`
The message application's party's id. Can be empty string.
... | 0 | 0 | 0 |
4f1411287da3b757cafc4c5908bcc279b74cb074 | 362 | py | Python | tests/base.py | plafer/rply | 6e16262dc6d434fc467eed83ed31ca764ba01a34 | [
"BSD-3-Clause"
] | 265 | 2015-01-10T04:49:05.000Z | 2022-03-25T10:54:35.000Z | tests/base.py | plafer/rply | 6e16262dc6d434fc467eed83ed31ca764ba01a34 | [
"BSD-3-Clause"
] | 59 | 2015-01-02T11:39:24.000Z | 2022-02-18T18:09:37.000Z | tests/base.py | plafer/rply | 6e16262dc6d434fc467eed83ed31ca764ba01a34 | [
"BSD-3-Clause"
] | 48 | 2015-03-23T14:15:45.000Z | 2021-04-20T17:49:09.000Z | import contextlib
import warnings
| 25.857143 | 55 | 0.640884 | import contextlib
import warnings
class BaseTests(object):
@contextlib.contextmanager
def assert_warns(self, cls, message):
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
yield
assert len(w) == 1
assert w[0].category is cls
... | 244 | 60 | 23 |
69d66d320bc54e270f4be98c63a8ea8984c25c33 | 19 | py | Python | venv/Lib/site-packages/suit/__init__.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/suit/__init__.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | 12 | 2019-12-04T23:48:45.000Z | 2022-03-11T23:53:30.000Z | venv/Lib/site-packages/suit/__init__.py | ryankibayhan/ryb-ecommerce | 15fa3bcb624be528926458b466ad7fe7fef5158e | [
"MIT"
] | null | null | null | VERSION = '0.2.26'
| 9.5 | 18 | 0.578947 | VERSION = '0.2.26'
| 0 | 0 | 0 |
0ee726969a8149a125a512c96fd40fc7e8e7cf2e | 868 | py | Python | app/main/forms.py | Wambuilucy/Pitch-App | 1cf4004a01e8efb483a30fb7d9a95791a42d673f | [
"Unlicense"
] | null | null | null | app/main/forms.py | Wambuilucy/Pitch-App | 1cf4004a01e8efb483a30fb7d9a95791a42d673f | [
"Unlicense"
] | 6 | 2020-02-14T12:13:40.000Z | 2020-02-14T12:13:47.000Z | app/main/forms.py | Wambuilucy/Pitch-App | 1cf4004a01e8efb483a30fb7d9a95791a42d673f | [
"Unlicense"
] | null | null | null |
from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,SubmitField,BooleanField,SubmitField,TextAreaField,RadioField
from wtforms.validators import Required,Email,EqualTo
from wtforms import ValidationError
| 36.166667 | 202 | 0.782258 |
from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,SubmitField,BooleanField,SubmitField,TextAreaField,RadioField
from wtforms.validators import Required,Email,EqualTo
from wtforms import ValidationError
class PitchForm(FlaskForm):
title = StringField('Title', validators=[Required()])
de... | 0 | 543 | 92 |
4608e090dd04c4c1000dee1d9306310138ac2957 | 1,050 | py | Python | setup.py | deepraj1729/TChatBot | f6800d1cb4a6a33d182022056d5b2a13b5ce5499 | [
"MIT"
] | 13 | 2020-06-22T12:48:32.000Z | 2021-09-22T16:39:37.000Z | setup.py | deepraj1729/TChatBot | f6800d1cb4a6a33d182022056d5b2a13b5ce5499 | [
"MIT"
] | 4 | 2020-06-22T12:46:51.000Z | 2022-02-09T23:27:23.000Z | setup.py | deepraj1729/TChatBot | f6800d1cb4a6a33d182022056d5b2a13b5ce5499 | [
"MIT"
] | 1 | 2020-06-29T04:06:31.000Z | 2020-06-29T04:06:31.000Z | from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.readlines()
setup(
name ='TChatBot',
version ='0.1.0',
author ='Deepraj Baidya',
author_email ='bdeeprajrkm1@gmail.com',
url ='https://github.com/deepraj1729/TChatBot',
description ='A ChatBot framew... | 28.378378 | 124 | 0.691429 | from setuptools import setup, find_packages
with open('requirements.txt') as f:
requirements = f.readlines()
def readme():
with open('README.md') as f:
README = f.read()
return README
setup(
name ='TChatBot',
version ='0.1.0',
author ='Deepraj Baidya',
author_email ='bdeeprajrkm1@gmail.com',
u... | 57 | 0 | 23 |
5860ee09204a4ac6d863ab5a06ec4a591bd5a665 | 7,435 | py | Python | fast_calvo_trainer.py | DDMAL/Calvo-classifier | 06e9a74b2221e130ec7eae1dfe462f9de1a5ffa3 | [
"MIT"
] | null | null | null | fast_calvo_trainer.py | DDMAL/Calvo-classifier | 06e9a74b2221e130ec7eae1dfe462f9de1a5ffa3 | [
"MIT"
] | 25 | 2017-07-17T19:49:57.000Z | 2021-05-21T14:29:34.000Z | fast_calvo_trainer.py | DDMAL/Calvo-classifier | 06e9a74b2221e130ec7eae1dfe462f9de1a5ffa3 | [
"MIT"
] | null | null | null | # -----------------------------------------------------------------------------
# Program Name: calvo_trainer.py
# Program Description: Rodan wrapper for Fast Calvo's classifier training
# -----------------------------------------------------------------------------
# Core
import logging
import sys
# Third-p... | 30.850622 | 139 | 0.456086 | # -----------------------------------------------------------------------------
# Program Name: calvo_trainer.py
# Program Description: Rodan wrapper for Fast Calvo's classifier training
# -----------------------------------------------------------------------------
# Core
import logging
import sys
# Third-p... | 1,321 | 5,471 | 23 |
588914580ea534a0bc749816d18c1c0951db33c0 | 1,056 | py | Python | tests/test_lz77.py | pynflate/pynflate | 3986b09fa64d28cb9e48cf84edfce67b73331e1b | [
"MIT"
] | 10 | 2019-09-09T18:09:46.000Z | 2021-12-28T07:09:31.000Z | tests/test_lz77.py | pynflate/pynflate | 3986b09fa64d28cb9e48cf84edfce67b73331e1b | [
"MIT"
] | null | null | null | tests/test_lz77.py | pynflate/pynflate | 3986b09fa64d28cb9e48cf84edfce67b73331e1b | [
"MIT"
] | 3 | 2020-03-18T12:58:47.000Z | 2021-05-29T19:26:07.000Z | from pynflate.lz77 import Lz77
| 27.076923 | 93 | 0.573864 | from pynflate.lz77 import Lz77
class TestLz77(object):
def test_empty(self):
lz77 = Lz77(6)
codewords = list(lz77.compress(''))
assert codewords == []
def test_one_char(self):
lz77 = Lz77(6)
original = 'x'
codewords = list(lz77.compress(original))
asse... | 892 | 2 | 130 |
588385b6915982914d17ba33c5bf2b9591cb5a8a | 4,645 | py | Python | apps/data/forms.py | akaytatsu/incricao_conferencia | 9ab774c6fe30cdb1a45d3732ade394df6e3b4258 | [
"MIT"
] | null | null | null | apps/data/forms.py | akaytatsu/incricao_conferencia | 9ab774c6fe30cdb1a45d3732ade394df6e3b4258 | [
"MIT"
] | 3 | 2019-12-22T22:07:48.000Z | 2019-12-23T21:38:31.000Z | apps/data/forms.py | akaytatsu/inscricao_conferencia | 9ab774c6fe30cdb1a45d3732ade394df6e3b4258 | [
"MIT"
] | null | null | null | from django import forms
from .models import Inscricao, Hospedagem
| 40.043103 | 102 | 0.518837 | from django import forms
from .models import Inscricao, Hospedagem
class InscricaoForm(forms.ModelForm):
_UF = [
{"value": "", "label": "Selecione ..."},
{"value": "AC", "label": "Acre"},
{"value": "AL", "label": "Alagoas"},
{"value": "AP", "label": "Amapรก"},
{"value": "A... | 889 | 3,664 | 46 |
41e4704bc53fa0011b5050b556c86a41c1d91375 | 1,955 | py | Python | integration/tests_ok/assert_xpath.py | jleverenz/hurl | b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3 | [
"Apache-2.0"
] | null | null | null | integration/tests_ok/assert_xpath.py | jleverenz/hurl | b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3 | [
"Apache-2.0"
] | null | null | null | integration/tests_ok/assert_xpath.py | jleverenz/hurl | b81ca8ab7e0e409ec0c074fd8e118721ff4d3fb3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from flask import Response
from app import app
@app.route("/assert-xpath")
@app.route("/assert-xpath-svg")
@app.route("/assert-xpath-simple-namespaces")
@app.route("/assert-xpath-namespaces")
| 32.04918 | 125 | 0.638875 | # coding=utf-8
from flask import Response
from app import app
@app.route("/assert-xpath")
def assert_xpath():
body = "<data>cafรฉ</data>"
return Response(body, mimetype="text/xml")
@app.route("/assert-xpath-svg")
def assert_xpath_svg():
body = """<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SV... | 1,653 | 0 | 88 |
0cc2ebc4ec9efcdb4db40c889232a078bc8dd01c | 587 | py | Python | labs/lab11/ex1/ex1.py | jamestiotio/dbsys | 26f545a51626ce232c0dc26b70ef206e71b273fc | [
"MIT"
] | null | null | null | labs/lab11/ex1/ex1.py | jamestiotio/dbsys | 26f545a51626ce232c0dc26b70ef206e71b273fc | [
"MIT"
] | null | null | null | labs/lab11/ex1/ex1.py | jamestiotio/dbsys | 26f545a51626ce232c0dc26b70ef206e71b273fc | [
"MIT"
] | null | null | null | # The `pyspark` shell command can be used to run an interactive shell for debugging purposes (preferably only on smaller datasets)
import sys
from pyspark import SparkContext, SparkConf
conf = SparkConf().setAppName("Ex1")
sc = SparkContext(conf=conf)
text_file = sc.textFile("hdfs://localhost:9000/input/")
output =... | 27.952381 | 130 | 0.708688 | # The `pyspark` shell command can be used to run an interactive shell for debugging purposes (preferably only on smaller datasets)
import sys
from pyspark import SparkContext, SparkConf
conf = SparkConf().setAppName("Ex1")
sc = SparkContext(conf=conf)
def foreach(record):
cols = record.split(",")
if len(cols... | 155 | 0 | 23 |
d867c00519f15569813bbab583a8d3dc80c57f7f | 23,428 | py | Python | sdk/yapily/models/payment_response.py | bs-yapily/yapily-sdk-python | 0bba45e351b674eb655425a51190f539c4e9896f | [
"MIT"
] | null | null | null | sdk/yapily/models/payment_response.py | bs-yapily/yapily-sdk-python | 0bba45e351b674eb655425a51190f539c4e9896f | [
"MIT"
] | null | null | null | sdk/yapily/models/payment_response.py | bs-yapily/yapily-sdk-python | 0bba45e351b674eb655425a51190f539c4e9896f | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
OpenAPI spec version: 0.0.155
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pp... | 32.403873 | 599 | 0.658827 | # coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
OpenAPI spec version: 0.0.155
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pp... | 0 | 0 | 0 |
4436123fe12faadfcf9bf87e38c7f22b95826828 | 12,769 | py | Python | twitter_virtual/twitter.py | juuuuuulian/twitter-virtual | 2a5eece80f6f832aa8a8d2355ed61eabd41d5126 | [
"MIT"
] | null | null | null | twitter_virtual/twitter.py | juuuuuulian/twitter-virtual | 2a5eece80f6f832aa8a8d2355ed61eabd41d5126 | [
"MIT"
] | null | null | null | twitter_virtual/twitter.py | juuuuuulian/twitter-virtual | 2a5eece80f6f832aa8a8d2355ed61eabd41d5126 | [
"MIT"
] | null | null | null | """Classes for interacting with the Twitter API."""
import datetime
import oauth2
from urllib.parse import urlencode
import json
from typing import Any
REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"
AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize"
ACCESS_TOKEN_URL = "https://api.twitter.com... | 43.431973 | 138 | 0.672331 | """Classes for interacting with the Twitter API."""
import datetime
import oauth2
from urllib.parse import urlencode
import json
from typing import Any
REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"
AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize"
ACCESS_TOKEN_URL = "https://api.twitter.com... | 0 | 0 | 0 |
0dc6e784914d2db2c7185e846d66295cb4f75743 | 2,566 | py | Python | Ene-Jun-2018/Ejemplos/SOLID/liskov-substitution.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ene-Jun-2018/Ejemplos/SOLID/liskov-substitution.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ene-Jun-2018/Ejemplos/SOLID/liskov-substitution.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | #snake_case
#camelCase
#StudlyCase
#kebab-case o slug
# Clase A
# Clase B
# Clase C
# Cliente utiliza Clase A o un contenedor con objetos tipo Clase A
# e.g. lista = [] de solo tipo Clase A
from typing import List
class Grupo:
"""docstring for Banda"""
class GrupoMusical(Grupo):
"""docstring for... | 28.511111 | 103 | 0.644583 | #snake_case
#camelCase
#StudlyCase
#kebab-case o slug
# Clase A
# Clase B
# Clase C
# Cliente utiliza Clase A o un contenedor con objetos tipo Clase A
# e.g. lista = [] de solo tipo Clase A
from typing import List
class Grupo:
"""docstring for Banda"""
def __init__(self, **args):
self.nombr... | 1,254 | 0 | 213 |
1c5fd36ae0b1a46a987890321b0748ee13ed63f6 | 7,739 | py | Python | navrep/envs/rosnavtrainencodedenv.py | ReykCS/navrep | 22ee4727268188414a8121f069e45c2ab798ca19 | [
"MIT"
] | null | null | null | navrep/envs/rosnavtrainencodedenv.py | ReykCS/navrep | 22ee4727268188414a8121f069e45c2ab798ca19 | [
"MIT"
] | null | null | null | navrep/envs/rosnavtrainencodedenv.py | ReykCS/navrep | 22ee4727268188414a8121f069e45c2ab798ca19 | [
"MIT"
] | null | null | null | from gym import spaces
import numpy as np
from scipy import interpolate
import yaml
from navrep.envs.navreptrainenv import NavRepTrainEnv
from navrep.rosnav_models.utils.reward import RewardCalculator
from navrep.rosnav_models.utils.reward import RewardCalculator
class RosnavTrainEncodedEnv(NavRepTrainEnv):
""" ... | 35.663594 | 127 | 0.580178 | from gym import spaces
import numpy as np
from scipy import interpolate
import yaml
from navrep.envs.navreptrainenv import NavRepTrainEnv
from navrep.rosnav_models.utils.reward import RewardCalculator
from navrep.rosnav_models.utils.reward import RewardCalculator
class RosnavTrainEncodedEnv(NavRepTrainEnv):
""" ... | 5,468 | 0 | 296 |
750d4d54e1b253e23bab9ee8400fd616fe262f8d | 3,303 | py | Python | preprocess_graph.py | HongyiZhu/EHI | 9fbbc6046546dd7fc6de5d831b4c941bc4404e02 | [
"MIT"
] | null | null | null | preprocess_graph.py | HongyiZhu/EHI | 9fbbc6046546dd7fc6de5d831b4c941bc4404e02 | [
"MIT"
] | null | null | null | preprocess_graph.py | HongyiZhu/EHI | 9fbbc6046546dd7fc6de5d831b4c941bc4404e02 | [
"MIT"
] | null | null | null | from ehi_utils import load_json, dict2dotdict
from mygraph import Graph_Int, Graph_Str
import argparse
import copy
import pickle
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Parser feature file generator")
parser.add_argument("--json_path", type=str, requ... | 40.777778 | 108 | 0.604299 | from ehi_utils import load_json, dict2dotdict
from mygraph import Graph_Int, Graph_Str
import argparse
import copy
import pickle
def main(configs):
timespells = configs.timespells
# load topology
graphs = []
graphs_str = []
for ts in range(1, int(timespells)+1):
... | 2,810 | 0 | 23 |
7c564ae4197ee90a4317cec74fc34502972ffc25 | 711 | py | Python | src/samples/pymxs/sphere_borg.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 88 | 2020-03-19T20:24:08.000Z | 2022-03-23T23:13:54.000Z | src/samples/pymxs/sphere_borg.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 5 | 2020-04-09T19:56:47.000Z | 2021-11-12T20:02:18.000Z | src/samples/pymxs/sphere_borg.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 22 | 2020-03-19T19:24:36.000Z | 2022-03-18T21:55:19.000Z | '''
Demonstrates creating objects, object instancing, and object translation.
'''
from pymxs import runtime as rt # pylint: disable=import-error
INST = rt.Name("instance")
def create_borg(obj, num, spacing):
"""Create a bunch of clones of the provided object"""
for i in range(num):
for j in range(... | 29.625 | 77 | 0.603376 | '''
Demonstrates creating objects, object instancing, and object translation.
'''
from pymxs import runtime as rt # pylint: disable=import-error
INST = rt.Name("instance")
def create_borg(obj, num, spacing):
"""Create a bunch of clones of the provided object"""
for i in range(num):
for j in range(... | 0 | 0 | 0 |
cb16fba592e0a2c039cc810b25e1c7db64991366 | 102 | py | Python | sandero.py | CptShock/AuroraModules | 4503326384ed34312be9d1d0f52242f1f8774eeb | [
"MIT"
] | null | null | null | sandero.py | CptShock/AuroraModules | 4503326384ed34312be9d1d0f52242f1f8774eeb | [
"MIT"
] | null | null | null | sandero.py | CptShock/AuroraModules | 4503326384ed34312be9d1d0f52242f1f8774eeb | [
"MIT"
] | null | null | null | import willie
@willie.module.commands('sandero') | 20.4 | 34 | 0.745098 | import willie
@willie.module.commands('sandero')
def sander(bot, trigger):
bot.say('PORN PORN PORN') | 31 | 0 | 22 |
e0bc0b030eda160521fc09b4031b333f5a25bc4b | 7,515 | py | Python | code/GA/mGA_2opt_numpyGA_2.py | KGJsGit/my_Optimization-studio | 1f3f78c22c58017f439c7be8b716a233be872ccc | [
"Apache-2.0"
] | 4 | 2020-06-02T08:27:36.000Z | 2022-03-16T15:09:46.000Z | code/GA/mGA_2opt_numpyGA_2.py | KGJsGit/my_Optimization-studio | 1f3f78c22c58017f439c7be8b716a233be872ccc | [
"Apache-2.0"
] | null | null | null | code/GA/mGA_2opt_numpyGA_2.py | KGJsGit/my_Optimization-studio | 1f3f78c22c58017f439c7be8b716a233be872ccc | [
"Apache-2.0"
] | 5 | 2021-04-21T11:52:33.000Z | 2022-01-15T09:14:45.000Z | import math
import numpy as np
import random
import timeit
from threading import Thread
import functools
dist_ar = [] # ๊ฑฐ๋ฆฌํ(global)
# limit_time = 36 # ์ ํ์๊ฐ(global)
cities_count = 0 # ๋์ ์(global)
dots_list = [] # ๋์ ๋ฆฌ์คํธ(global)
# Hyper Parameter
limits = (60) * 36 # ์ ํ์๊ฐ
MUT = 0.2 # ๋ณ์ดํ๋ฅ
SEL = 0.85 # ์ ํ์
chrCOUNT = ... | 30.925926 | 118 | 0.578709 | import math
import numpy as np
import random
import timeit
from threading import Thread
import functools
dist_ar = [] # ๊ฑฐ๋ฆฌํ(global)
# limit_time = 36 # ์ ํ์๊ฐ(global)
cities_count = 0 # ๋์ ์(global)
dots_list = [] # ๋์ ๋ฆฌ์คํธ(global)
# Hyper Parameter
limits = (60) * 36 # ์ ํ์๊ฐ
MUT = 0.2 # ๋ณ์ดํ๋ฅ
SEL = 0.85 # ์ ํ์
chrCOUNT = ... | 5,917 | 0 | 155 |
2bed9ddb6ad3a9d58c7b0651dc53406b3042e361 | 295 | py | Python | 0001/python3/euler_0001.py | jhanschoo/project_euler | 9bba193996aa6a7c39d7b254198903af2e84904c | [
"Apache-2.0"
] | null | null | null | 0001/python3/euler_0001.py | jhanschoo/project_euler | 9bba193996aa6a7c39d7b254198903af2e84904c | [
"Apache-2.0"
] | null | null | null | 0001/python3/euler_0001.py | jhanschoo/project_euler | 9bba193996aa6a7c39d7b254198903af2e84904c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
if __name__ == "__main__":
target = 999
answer = sum_divisible_upto(target, 3) + sum_divisible_upto(target, 5) - sum_divisible_upto(target, 3 * 5)
print(answer)
| 24.583333 | 110 | 0.627119 | #!/usr/bin/env python3
def sum_divisible_upto(target, d):
n = target // d
s = d * n * (n + 1) // 2
return s
if __name__ == "__main__":
target = 999
answer = sum_divisible_upto(target, 3) + sum_divisible_upto(target, 5) - sum_divisible_upto(target, 3 * 5)
print(answer)
| 75 | 0 | 23 |
eb0ca335a4680d238b42ee15cd2910e10d6942cc | 3,158 | py | Python | crawler/crawlers.py | CirXe0N/WebCrawler-Code-Challenge | 7a597759beaabf96e88ba852b883de6195bcb283 | [
"MIT"
] | null | null | null | crawler/crawlers.py | CirXe0N/WebCrawler-Code-Challenge | 7a597759beaabf96e88ba852b883de6195bcb283 | [
"MIT"
] | null | null | null | crawler/crawlers.py | CirXe0N/WebCrawler-Code-Challenge | 7a597759beaabf96e88ba852b883de6195bcb283 | [
"MIT"
] | null | null | null | import asyncio
import json
import logging
from pathlib import Path
from crawler.queues import UniqueQueue
from crawler.scrapers import URLScraper
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s: %(message)s",
datefmt="%H:%M:%S",
)
| 28.196429 | 79 | 0.569031 | import asyncio
import json
import logging
from pathlib import Path
from crawler.queues import UniqueQueue
from crawler.scrapers import URLScraper
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(levelname)s: %(message)s",
datefmt="%H:%M:%S",
)
class Crawler:
def __init__(self, initial_... | 255 | 2,607 | 23 |
8330bd7007f57511510cfe305c6c3ea32a0d30a9 | 2,518 | py | Python | alphafold/Data/Tools/hhblits.py | YaoYinYing/OpenFold2 | 57fd3cfba0bc70a2ca4c6943ba00e1c4892c1945 | [
"MIT"
] | null | null | null | alphafold/Data/Tools/hhblits.py | YaoYinYing/OpenFold2 | 57fd3cfba0bc70a2ca4c6943ba00e1c4892c1945 | [
"MIT"
] | null | null | null | alphafold/Data/Tools/hhblits.py | YaoYinYing/OpenFold2 | 57fd3cfba0bc70a2ca4c6943ba00e1c4892c1945 | [
"MIT"
] | null | null | null | from pathlib import Path
from alphafold.Data.Tools import utils
from typing import Optional, Callable, Any, Mapping, Sequence | 27.977778 | 121 | 0.656473 | from pathlib import Path
from alphafold.Data.Tools import utils
from typing import Optional, Callable, Any, Mapping, Sequence
class HHBlits:
_DEFAULT_P = 20
_DEFAULT_Z = 500
def __init__(self,
binary_path: Path,
databases: Sequence[Path],
n_cpu: int=4,
n_iter: int=3,
e_value: float=1e-3,
ma... | 2,294 | 76 | 23 |
c069958fbf792e5e39ba289824eccf81eabed4b8 | 2,491 | py | Python | server/simsvc/__init__.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | server/simsvc/__init__.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | server/simsvc/__init__.py | INTENS-FI/intens | b2a2131241a88b0d80a5091679d6efb6c56098fb | [
"MIT"
] | null | null | null | """Distributed simulation service.
"""
# Ensure .config is loaded - it sets up our Dask config.
from .config import Config
def create_app(**kws):
"""Create and return the simulation server Flask app.
kws is passed to the SocketIO constructor.
Also start up coroutines to periodically sync tasks a... | 36.632353 | 79 | 0.659173 | """Distributed simulation service.
"""
# Ensure .config is loaded - it sets up our Dask config.
from .config import Config
def create_app(**kws):
"""Create and return the simulation server Flask app.
kws is passed to the SocketIO constructor.
Also start up coroutines to periodically sync tasks a... | 247 | 0 | 60 |
2258584dfde8e66b7e016573d08f52b0d4c15a5c | 788 | py | Python | boboleetcode/Play-Leetcode-master/0226-Invert-Binary-Tree/py-0226/Solution2.py | yaominzh/CodeLrn2019 | adc727d92904c5c5d445a2621813dfa99474206d | [
"Apache-2.0"
] | 2 | 2021-03-25T05:26:55.000Z | 2021-04-20T03:33:24.000Z | boboleetcode/Play-Leetcode-master/0226-Invert-Binary-Tree/py-0226/Solution2.py | mcuallen/CodeLrn2019 | adc727d92904c5c5d445a2621813dfa99474206d | [
"Apache-2.0"
] | 6 | 2019-12-04T06:08:32.000Z | 2021-05-10T20:22:47.000Z | boboleetcode/Play-Leetcode-master/0226-Invert-Binary-Tree/py-0226/Solution2.py | mcuallen/CodeLrn2019 | adc727d92904c5c5d445a2621813dfa99474206d | [
"Apache-2.0"
] | null | null | null | # Source : https://leetcode.com/problems/invert-binary-tree/
# Author : penpenps
# Time : 2019-08-01
# BFS, iterative
# Time Complexity: O(n), the number of tree's nodes
# Space Complexity: O(n), the max node number by level
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# ... | 28.142857 | 60 | 0.57868 | # Source : https://leetcode.com/problems/invert-binary-tree/
# Author : penpenps
# Time : 2019-08-01
# BFS, iterative
# Time Complexity: O(n), the number of tree's nodes
# Space Complexity: O(n), the max node number by level
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# ... | 349 | -6 | 49 |
1dc3915d669aa9bfc68047f334962a2e28668c8c | 1,083 | py | Python | alipay/aop/api/response/AlipaySocialBaseQuestInstancesQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipaySocialBaseQuestInstancesQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipaySocialBaseQuestInstancesQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.QuestInstanceDTO import QuestInstanceDTO
| 32.818182 | 116 | 0.682364 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.QuestInstanceDTO import QuestInstanceDTO
class AlipaySocialBaseQuestInstancesQueryResponse(AlipayResponse):
def __init__(self):
super(AlipaySocialBaseQue... | 677 | 189 | 23 |
f7707bffeea7f123fa38fc412bc9a7d48ca9988e | 10,700 | py | Python | tacotron/models.py | rhoposit/tacotron2 | 2dad8df5ea50459789e16d9effb83fc2a25e42ed | [
"BSD-3-Clause"
] | null | null | null | tacotron/models.py | rhoposit/tacotron2 | 2dad8df5ea50459789e16d9effb83fc2a25e42ed | [
"BSD-3-Clause"
] | null | null | null | tacotron/models.py | rhoposit/tacotron2 | 2dad8df5ea50459789e16d9effb83fc2a25e42ed | [
"BSD-3-Clause"
] | null | null | null | # ==============================================================================
# Copyright (c) 2018, Yamagishi Laboratory, National Institute of Informatics
# Author: Yusuke Yasuda (yasuda@nii.ac.jp)
# All rights reserved.
# ==============================================================================
""" Models. ""... | 57.219251 | 152 | 0.538505 | # ==============================================================================
# Copyright (c) 2018, Yamagishi Laboratory, National Institute of Informatics
# Author: Yusuke Yasuda (yasuda@nii.ac.jp)
# All rights reserved.
# ==============================================================================
""" Models. ""... | 9,855 | 290 | 23 |
a014f0d726ae5f8dc4a25ff35886e47de774496b | 21,523 | py | Python | mirari/INT/models.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | null | null | null | mirari/INT/models.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | 18 | 2019-12-27T19:58:20.000Z | 2022-02-27T08:17:49.000Z | mirari/INT/models.py | gcastellan0s/mirariapp | 24a9db06d10f96c894d817ef7ccfeec2a25788b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from mirari.mirari.models import *
from .vars import *
########################################################################################
########################################################################################
VARS = {
'NAME':'Catรกlogo',
'PLURAL':'Catรกlogos',
... | 40.609434 | 222 | 0.565256 | # -*- coding: utf-8 -*-
from mirari.mirari.models import *
from .vars import *
########################################################################################
########################################################################################
VARS = {
'NAME':'Catรกlogo',
'PLURAL':'Catรกlogos',
... | 7,271 | 6,766 | 220 |
4394303aa2a3be1178c47d1ef15a6995ca8b3adb | 5,786 | py | Python | plateseg/predict.py | Pablo1990/platelet-unet-watershed | 66aab7620d2e1646e3d4d33fe85c1691c63353cb | [
"BSD-3-Clause"
] | null | null | null | plateseg/predict.py | Pablo1990/platelet-unet-watershed | 66aab7620d2e1646e3d4d33fe85c1691c63353cb | [
"BSD-3-Clause"
] | null | null | null | plateseg/predict.py | Pablo1990/platelet-unet-watershed | 66aab7620d2e1646e3d4d33fe85c1691c63353cb | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
import os
import itertools
import torch
from tqdm import tqdm
import numpy as np
import toolz as tz
import napari
from napari.qt import thread_worker
from skimage.exposure import rescale_intensity
from . import unet
from . import watershed as ws
u_state_fn = os.path.join(
os.path.dirname(__fi... | 31.107527 | 90 | 0.614587 | # coding: utf-8
import os
import itertools
import torch
from tqdm import tqdm
import numpy as np
import toolz as tz
import napari
from napari.qt import thread_worker
from skimage.exposure import rescale_intensity
from . import unet
from . import watershed as ws
u_state_fn = os.path.join(
os.path.dirname(__fi... | 2,290 | 0 | 126 |
dceca2c42994a429c1b0e9cd4184414aa609bdac | 184 | py | Python | caixiya/20180402/3.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | caixiya/20180402/3.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | caixiya/20180402/3.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | '''
3. ๅฉ็จmap()ๅฝๆฐๅฐ็จๆท่พๅ
ฅ็ไธ่ง่็่ฑๆๅๅญ,ๅไธบ้ฆๅญๆฏๅคงๅ,ๅ
ถไปๅญ็ฌฆๅฐๅ็ๅฝขๅผ
1) ๅๅฎ็จๆท่พๅ
ฅ็ๆฏ["lambDA", โLILYโ, โaliCeโ]
'''
l=["lambDA","LILY","aliCe"]
print(list(map([i[:1].upper()+i[1:].lower()for i in l,l])))
| 26.285714 | 60 | 0.608696 | '''
3. ๅฉ็จmap()ๅฝๆฐๅฐ็จๆท่พๅ
ฅ็ไธ่ง่็่ฑๆๅๅญ,ๅไธบ้ฆๅญๆฏๅคงๅ,ๅ
ถไปๅญ็ฌฆๅฐๅ็ๅฝขๅผ
1) ๅๅฎ็จๆท่พๅ
ฅ็ๆฏ["lambDA", โLILYโ, โaliCeโ]
'''
l=["lambDA","LILY","aliCe"]
print(list(map([i[:1].upper()+i[1:].lower()for i in l,l])))
| 0 | 0 | 0 |
1a60b05152fee6b8e79a1c93f39d5b6df1b11044 | 1,267 | py | Python | Python/103 ZigzagLevelOrderTraversalB.py | Fiona08/leetcode | cee3da122e1703cfde811a8f69c207d5ae780d37 | [
"MIT"
] | null | null | null | Python/103 ZigzagLevelOrderTraversalB.py | Fiona08/leetcode | cee3da122e1703cfde811a8f69c207d5ae780d37 | [
"MIT"
] | null | null | null | Python/103 ZigzagLevelOrderTraversalB.py | Fiona08/leetcode | cee3da122e1703cfde811a8f69c207d5ae780d37 | [
"MIT"
] | null | null | null | #103
# Time: O(n)
# Space: O(n)
# Given a binary tree, return the zigzag level order traversal of
# its nodes' values. (ie, from left to right, then right to left
# for the next level and alternate between).
#
# For example:
# Given binary tree [3,9,20,null,null,15,7],
# 3
# / \
# 9 20
# / \
# 1... | 25.34 | 66 | 0.58011 | #103
# Time: O(n)
# Space: O(n)
# Given a binary tree, return the zigzag level order traversal of
# its nodes' values. (ie, from left to right, then right to left
# for the next level and alternate between).
#
# For example:
# Given binary tree [3,9,20,null,null,15,7],
# 3
# / \
# 9 20
# / \
# 1... | 766 | -10 | 98 |
012e78c449d04b20ba8352cfe81717ccea4c5e45 | 1,050 | py | Python | setup.py | Marcdnd/electrum-server-cesc | 6e8c107b0994e032a92f0d7c4da7cb430294d6f3 | [
"MIT"
] | null | null | null | setup.py | Marcdnd/electrum-server-cesc | 6e8c107b0994e032a92f0d7c4da7cb430294d6f3 | [
"MIT"
] | null | null | null | setup.py | Marcdnd/electrum-server-cesc | 6e8c107b0994e032a92f0d7c4da7cb430294d6f3 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="electrum-server-cesc",
version="1.0.20160803",
scripts=['run_electrum_server_cesc','electrum-server-cesc'],
install_requires=['plyvel','jsonrpclib', 'irc >= 11, <=14.0'],
package_dir={
'electrumservercesc':'src'
},
py_modules=[
... | 33.870968 | 82 | 0.67619 | from setuptools import setup
setup(
name="electrum-server-cesc",
version="1.0.20160803",
scripts=['run_electrum_server_cesc','electrum-server-cesc'],
install_requires=['plyvel','jsonrpclib', 'irc >= 11, <=14.0'],
package_dir={
'electrumservercesc':'src'
},
py_modules=[
... | 0 | 0 | 0 |
5b03553fcf79469b760d1f2bea0a15ae5bbd561b | 13,549 | py | Python | toontown/estate/EstateLoader.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 8 | 2017-10-10T11:41:01.000Z | 2021-02-23T12:55:47.000Z | toontown/estate/EstateLoader.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | toontown/estate/EstateLoader.py | AnonymousDeveloper65535/open-toontown | 3d05c22a7d960ad843dde231140447c46973dba5 | [
"BSD-3-Clause"
] | 2 | 2019-04-06T16:18:23.000Z | 2021-02-25T06:25:01.000Z | from pandac.PandaModules import *
from toontown.toonbase.ToontownGlobals import *
from direct.interval.IntervalGlobal import *
from direct.fsm import ClassicFSM, State
from toontown.safezone import SafeZoneLoader
import random
from toontown.launcher import DownloadForceAcknowledge
import House
import Estate
import Hous... | 39.15896 | 158 | 0.624548 | from pandac.PandaModules import *
from toontown.toonbase.ToontownGlobals import *
from direct.interval.IntervalGlobal import *
from direct.fsm import ClassicFSM, State
from toontown.safezone import SafeZoneLoader
import random
from toontown.launcher import DownloadForceAcknowledge
import House
import Estate
import Hous... | 12,301 | 777 | 23 |
82f9d171ce9b99f1e448f065ffdf32684add905c | 22,630 | py | Python | theseus/geometry/se3.py | facebookresearch/theseus | 8e7756d88fe85a02f948c3a9337f8704f4cebda3 | [
"MIT"
] | 236 | 2021-12-03T15:59:29.000Z | 2022-03-30T23:18:33.000Z | theseus/geometry/se3.py | facebookresearch/theseus | 8e7756d88fe85a02f948c3a9337f8704f4cebda3 | [
"MIT"
] | 85 | 2021-12-06T07:04:11.000Z | 2022-03-31T20:29:26.000Z | theseus/geometry/se3.py | facebookresearch/theseus | 8e7756d88fe85a02f948c3a9337f8704f4cebda3 | [
"MIT"
] | 12 | 2021-12-03T22:02:44.000Z | 2022-03-20T14:58:27.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Optional, Union, cast
import torch
import theseus
import theseus.constants
from .lie_group import LieGroup
from ... | 37.037643 | 94 | 0.537826 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import List, Optional, Union, cast
import torch
import theseus
import theseus.constants
from .lie_group import LieGroup
from ... | 21,287 | 907 | 23 |
f76f31edd94cd0e55fff67cd5ce3c1f500f7d6a4 | 958 | py | Python | bulq/core/coders.py | koji-m/bulq | 78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a | [
"Apache-2.0"
] | null | null | null | bulq/core/coders.py | koji-m/bulq | 78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a | [
"Apache-2.0"
] | null | null | null | bulq/core/coders.py | koji-m/bulq | 78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a | [
"Apache-2.0"
] | null | null | null | import typing
import apache_beam as beam
| 21.288889 | 62 | 0.58142 | import typing
import apache_beam as beam
class Coders:
TABLE = {
'bytes': 'Bytes',
'utf8': 'UTF-8',
'utf_8': 'UTF-8',
}
CODERS = {
'Bytes': beam.coders.coders.BytesCoder,
'UTF-8': beam.coders.coders.StrUtf8Coder,
}
@classmethod
def get_coder(cls, code... | 455 | 279 | 180 |
e08170c920599293ff53c51e1245c2ecc19f92ac | 1,231 | py | Python | appengine/src/greenday_core/tests/test_youtube_thumbnails_cache_client.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 6 | 2018-07-31T16:48:07.000Z | 2020-02-01T03:17:51.000Z | appengine/src/greenday_core/tests/test_youtube_thumbnails_cache_client.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 41 | 2018-08-07T16:43:07.000Z | 2020-06-05T18:54:50.000Z | appengine/src/greenday_core/tests/test_youtube_thumbnails_cache_client.py | meedan/montage | 4da0116931edc9af91f226876330645837dc9bcc | [
"Apache-2.0"
] | 1 | 2018-08-07T16:40:18.000Z | 2018-08-07T16:40:18.000Z | """
Tests for :mod:`greenday_core.youtube_thumbnails_cache <greenday_core.youtube_thumbnails_cache>`
"""
from greenday_core.tests.base import AppengineTestBed
from greenday_core.youtube_thumbnails_cache import YTThumbnailsCache
class YTThumbnailClientTestCase(AppengineTestBed):
"""
Tests for :class:`g... | 41.033333 | 205 | 0.74411 | """
Tests for :mod:`greenday_core.youtube_thumbnails_cache <greenday_core.youtube_thumbnails_cache>`
"""
from greenday_core.tests.base import AppengineTestBed
from greenday_core.youtube_thumbnails_cache import YTThumbnailsCache
class YTThumbnailClientTestCase(AppengineTestBed):
"""
Tests for :class:`g... | 0 | 0 | 0 |
327770f23fbdf7de1641f8b54d4885dd27c86561 | 61,679 | py | Python | run_nerf_helpers.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | 1 | 2022-02-22T13:54:41.000Z | 2022-02-22T13:54:41.000Z | run_nerf_helpers.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | null | null | null | run_nerf_helpers.py | yashbhalgat/NeuralDiff | a480f2103384a4f5d77eb84abd977a200e6e6405 | [
"MIT"
] | null | null | null | import torch
# torch.autograd.set_detect_anomaly(True)
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import pdb
from skimage.metrics import structural_similarity, peak_signal_noise_ratio
from lpips import LPIPS
from hash_encoding import HashEmbedder, SHEncoder, XYZplusT_HashEmbedder
from tim... | 49.781275 | 169 | 0.564147 | import torch
# torch.autograd.set_detect_anomaly(True)
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import pdb
from skimage.metrics import structural_similarity, peak_signal_noise_ratio
from lpips import LPIPS
from hash_encoding import HashEmbedder, SHEncoder, XYZplusT_HashEmbedder
from tim... | 58,713 | 113 | 1,037 |
6284b2b3c014222e9b83ab9f6a59216c9c7e1517 | 1,482 | py | Python | tests/test_instruction.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 9 | 2019-07-22T23:54:05.000Z | 2020-11-05T06:26:04.000Z | tests/test_instruction.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 389 | 2019-07-03T04:39:11.000Z | 2022-03-28T14:06:11.000Z | tests/test_instruction.py | kurusugawa-computer/annofab-cli | 8edad492d439bc8fe64e9471464f545d07aba8b7 | [
"MIT"
] | 1 | 2021-08-30T14:22:04.000Z | 2021-08-30T14:22:04.000Z | import configparser
import os
from pathlib import Path
import annofabapi
from annofabcli.__main__ import main
out_dir = Path("./tests/out/instruction")
data_dir = Path("./tests/data/instruction")
# ใใญใธใงใฏใใใใใซ็งปๅใใ
os.chdir(os.path.dirname(os.path.abspath(__file__)) + "/../")
inifile = configparser.ConfigParser()
ini... | 26.464286 | 88 | 0.566802 | import configparser
import os
from pathlib import Path
import annofabapi
from annofabcli.__main__ import main
out_dir = Path("./tests/out/instruction")
data_dir = Path("./tests/data/instruction")
# ใใญใธใงใฏใใใใใซ็งปๅใใ
os.chdir(os.path.dirname(os.path.abspath(__file__)) + "/../")
inifile = configparser.ConfigParser()
ini... | 875 | 1 | 130 |
308da623381a511c3b36a31d7f59d74d631166a4 | 435 | py | Python | pacote-download/Ex65.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex65.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | pacote-download/Ex65.py | nkonai/Curso-em-video-Python | c05a60b3daa7d448e1e7f0d4d23f62df5d2c8df2 | [
"MIT"
] | null | null | null | soma = 0
count = 0
maior = 0
menor = 0
r = 'Y'
while r=='Y':
n = int(input('Digite um numero: '))
if count == 0 or n > maior:
maior = n
if count == 0 or n < menor:
menor = n
soma = soma + n
count = count + 1
r = str(input('Quer continuar? [Y/N]: ')).upper().strip()
media = soma/c... | 25.588235 | 70 | 0.551724 | soma = 0
count = 0
maior = 0
menor = 0
r = 'Y'
while r=='Y':
n = int(input('Digite um numero: '))
if count == 0 or n > maior:
maior = n
if count == 0 or n < menor:
menor = n
soma = soma + n
count = count + 1
r = str(input('Quer continuar? [Y/N]: ')).upper().strip()
media = soma/c... | 0 | 0 | 0 |
a276e3314627555c8de56733a50385417366f055 | 2,174 | py | Python | python/byteport/tests.py | gebart/byteport-api | 38504af42bd91ffafed4d813af14ccf88fdfe56d | [
"BSD-2-Clause"
] | null | null | null | python/byteport/tests.py | gebart/byteport-api | 38504af42bd91ffafed4d813af14ccf88fdfe56d | [
"BSD-2-Clause"
] | 2 | 2015-02-13T13:43:53.000Z | 2015-04-20T07:57:16.000Z | python/byteport/tests.py | gebart/byteport-api | 38504af42bd91ffafed4d813af14ccf88fdfe56d | [
"BSD-2-Clause"
] | 1 | 2017-12-18T01:38:46.000Z | 2017-12-18T01:38:46.000Z | import unittest
import datetime
from http_clients import ByteportHttpGetClient, ByteportHttpPostClient
| 36.233333 | 105 | 0.674793 | import unittest
import datetime
from http_clients import ByteportHttpGetClient, ByteportHttpPostClient
class TestHttpClients(unittest.TestCase):
hostname = 'localhost:8000'
# hostname = 'api.byteport.se'
byteport_api_store_url = 'http://%s/services/store/' % hostname
namespace = 'test'
device_u... | 1,798 | 248 | 23 |
9e73b1031062b8ac79a2adf8eaf63209234ac6e0 | 17,345 | py | Python | stackinawsgi/test/test_admin_admin.py | BenjamenMeyer/stackInAWSGI | 8ac6be173bb08addc09214ba7dc9f91727d0221a | [
"Apache-2.0"
] | 2 | 2016-08-12T19:11:13.000Z | 2017-11-19T20:52:47.000Z | stackinawsgi/test/test_admin_admin.py | BenjamenMeyer/stackInAWSGI | 8ac6be173bb08addc09214ba7dc9f91727d0221a | [
"Apache-2.0"
] | 16 | 2016-05-22T05:11:12.000Z | 2016-07-14T00:57:07.000Z | stackinawsgi/test/test_admin_admin.py | BenjamenMeyer/stackInAWSGI | 8ac6be173bb08addc09214ba7dc9f91727d0221a | [
"Apache-2.0"
] | 1 | 2016-05-15T19:01:35.000Z | 2016-05-15T19:01:35.000Z | """
Stack-In-A-WSGI: stackinawsgi.admin.admin.StackInAWsgiSessionManager
"""
import datetime
import json
import unittest
import ddt
from stackinabox.services.service import StackInABoxService
from stackinabox.services.hello import HelloService
from stackinawsgi.admin.admin import StackInAWsgiAdmin
from stackinawsgi.... | 30.808171 | 75 | 0.589853 | """
Stack-In-A-WSGI: stackinawsgi.admin.admin.StackInAWsgiSessionManager
"""
import datetime
import json
import unittest
import ddt
from stackinabox.services.service import StackInABoxService
from stackinabox.services.hello import HelloService
from stackinawsgi.admin.admin import StackInAWsgiAdmin
from stackinawsgi.... | 0 | 0 | 0 |
ea62194839d143d2c84ffdc76fc2a59e091dbad7 | 3,077 | py | Python | validation/prep_rm_subset.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 339 | 2015-01-04T13:23:04.000Z | 2022-03-25T23:09:09.000Z | validation/prep_rm_subset.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 39 | 2015-01-14T21:31:09.000Z | 2021-11-18T15:15:33.000Z | validation/prep_rm_subset.py | bgruening/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | [
"MIT"
] | 176 | 2015-01-10T17:40:44.000Z | 2022-03-25T05:14:21.000Z | """Prepare subset regions of full NIST NA12878 reference materials for evaluation.
Allows preparation of exome or targeted reference materials from
the full NIST NA12878 genome.
Requires:
vcflib: https://github.com/ekg/vcflib
bedtools: http://bedtools.readthedocs.org/en/latest/
Usage:
prep_rm_subset.py <input_... | 37.072289 | 89 | 0.588885 | """Prepare subset regions of full NIST NA12878 reference materials for evaluation.
Allows preparation of exome or targeted reference materials from
the full NIST NA12878 genome.
Requires:
vcflib: https://github.com/ekg/vcflib
bedtools: http://bedtools.readthedocs.org/en/latest/
Usage:
prep_rm_subset.py <input_... | 2,505 | 0 | 115 |
7eee2fbdb615744d318d8742d8eca13f0229393c | 2,768 | py | Python | biblification.py | olivierkes/bible_libre | 84c60e424c00da6171705b3e613240886640f3e5 | [
"Unlicense"
] | 1 | 2021-11-16T14:25:35.000Z | 2021-11-16T14:25:35.000Z | biblification.py | olivierkes/bible_libre | 84c60e424c00da6171705b3e613240886640f3e5 | [
"Unlicense"
] | null | null | null | biblification.py | olivierkes/bible_libre | 84c60e424c00da6171705b3e613240886640f3e5 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf8 -*-
import csv
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='This generates a t2t bible.')
parser.add_argument('-p', '--plan', help='plan to be used',
default="nouveau-testament-commente")
#parser.add_... | 32.186047 | 109 | 0.501445 | #!/usr/bin/python
# -*- coding: utf8 -*-
import csv
import argparse
def parseText(t):
t = t.replace("\\n\\q", " \n\n\t")
t = t.replace("\\n", " \n")
t = t.replace("\\q", "\t")
t = t.replace("\\p", " \n\n")
return t
def addMark(t):
i = -1
while t[i] in ["\n", "\t"]:
i -= 1
re... | 1,144 | 0 | 92 |
5471538f7c2ee28507998ade17fdbcced5321a8c | 1,087 | py | Python | src/foxdot/sandbox/180811_0506_compo_032.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | 4 | 2018-06-29T18:39:34.000Z | 2021-06-20T16:44:29.000Z | src/foxdot/sandbox/180811_0506_compo_032.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | src/foxdot/sandbox/180811_0506_compo_032.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | Scale.default = 'indian'
Root.default = 0
Clock.bpm = 80
print(Scale.names())
print(SynthDefs)
print(FxList)
print(PatternMethods)
print(Samples)
print(Clock.playing)
var.ch = var([0,1],[15,3])
~p1 >> play('W', amp=.5, dur=6, shape=.5, rate=.5, room=1, formant=[1,1,2])
~p2 >> play('m', amp=.8, dur=2/3, sample=[0,1,0... | 31.057143 | 120 | 0.582337 | Scale.default = 'indian'
Root.default = 0
Clock.bpm = 80
print(Scale.names())
print(SynthDefs)
print(FxList)
print(PatternMethods)
print(Samples)
print(Clock.playing)
var.ch = var([0,1],[15,3])
~p1 >> play('W', amp=.5, dur=6, shape=.5, rate=.5, room=1, formant=[1,1,2])
~p2 >> play('m', amp=.8, dur=2/3, sample=[0,1,0... | 0 | 0 | 0 |
8219ece2a6ff254575b95ea24d0cd5a196a8f886 | 4,237 | py | Python | graphene_auto/graphql_auto/query.py | ssshier/meta-realize | cc13309fa9e7e59044fb1c8e6e6b0a62caa7ca8c | [
"MIT"
] | 1 | 2021-12-18T09:12:58.000Z | 2021-12-18T09:12:58.000Z | graphene_auto/graphql_auto/query.py | ssshier/meta-realize | cc13309fa9e7e59044fb1c8e6e6b0a62caa7ca8c | [
"MIT"
] | null | null | null | graphene_auto/graphql_auto/query.py | ssshier/meta-realize | cc13309fa9e7e59044fb1c8e6e6b0a62caa7ca8c | [
"MIT"
] | null | null | null | from collections import OrderedDict
import graphene
from graphene.types.generic import GenericScalar
from graphene.types.objecttype import ObjectTypeOptions
from graphene_sqlalchemy import SQLAlchemyConnectionField
from graphene_sqlalchemy.types import sort_argument_for_object_type
from graphene_sqlalchemy_auto.filter... | 33.896 | 98 | 0.628275 | from collections import OrderedDict
import graphene
from graphene.types.generic import GenericScalar
from graphene.types.objecttype import ObjectTypeOptions
from graphene_sqlalchemy import SQLAlchemyConnectionField
from graphene_sqlalchemy.types import sort_argument_for_object_type
from graphene_sqlalchemy_auto.filter... | 915 | 2,509 | 144 |
ef4b06b997fac916729f1f37fe5a226c6c148e96 | 1,392 | py | Python | cms/stacks/templatetags/stack_tags.py | mightyiam/django-cms | 09bf76d2f3d81fdaebcfb7e9ed4ecd4769fa8c25 | [
"BSD-3-Clause"
] | 2 | 2018-05-17T02:49:49.000Z | 2019-08-20T02:07:44.000Z | cms/stacks/templatetags/stack_tags.py | mightyiam/django-cms | 09bf76d2f3d81fdaebcfb7e9ed4ecd4769fa8c25 | [
"BSD-3-Clause"
] | 2 | 2019-02-13T07:58:23.000Z | 2019-02-13T07:58:27.000Z | cms/stacks/templatetags/stack_tags.py | mightyiam/django-cms | 09bf76d2f3d81fdaebcfb7e9ed4ecd4769fa8c25 | [
"BSD-3-Clause"
] | null | null | null | from classytags.arguments import Argument
from classytags.core import Tag, Options
from django import template
from cms.plugin_rendering import render_placeholder
from cms.stacks.models import Stack
register = template.Library()
register.tag(StackNode)
| 33.95122 | 112 | 0.658764 | from classytags.arguments import Argument
from classytags.core import Tag, Options
from django import template
from cms.plugin_rendering import render_placeholder
from cms.stacks.models import Stack
register = template.Library()
class StackNode(Tag):
name = 'stack'
options = Options(
Argument('code... | 921 | 189 | 23 |
e5466609c1e8a5716819e3a17f2a6558dd33f7ad | 6,135 | py | Python | utils/lib/rr_graph/tracks.py | Fleker/symbiflow-arch-defs | 0be4b3ec85e4614b29258116492299f39cf59ae3 | [
"ISC"
] | null | null | null | utils/lib/rr_graph/tracks.py | Fleker/symbiflow-arch-defs | 0be4b3ec85e4614b29258116492299f39cf59ae3 | [
"ISC"
] | null | null | null | utils/lib/rr_graph/tracks.py | Fleker/symbiflow-arch-defs | 0be4b3ec85e4614b29258116492299f39cf59ae3 | [
"ISC"
] | null | null | null | from collections import namedtuple
import pprint
from enum import Enum
Track = namedtuple('Track', 'direction x_low x_high y_low y_high')
def make_tracks(xs, ys, points):
""" Give a list of xs columns and ys rows and points, return a list of
Track's and connections between the tracks.
An assert w... | 29.354067 | 90 | 0.545884 | from collections import namedtuple
import pprint
from enum import Enum
class Direction(Enum):
NO_SIDE = 0
LEFT = 1
RIGHT = 2
TOP = 3
BOTTOM = 4
Track = namedtuple('Track', 'direction x_low x_high y_low y_high')
def print_tracks(tracks):
pprint.pprint(tracks)
def make_tracks(xs, ys, points):
... | 1,530 | 1,274 | 92 |
d5efc68128591aad4024897c7fc12d3343ac12cf | 3,708 | py | Python | easypyqt/widget/buttongroupwidget.py | mafster/easypyqt4 | e3681de1a974741e74cc3b77cad3e599acef20ae | [
"MIT"
] | null | null | null | easypyqt/widget/buttongroupwidget.py | mafster/easypyqt4 | e3681de1a974741e74cc3b77cad3e599acef20ae | [
"MIT"
] | null | null | null | easypyqt/widget/buttongroupwidget.py | mafster/easypyqt4 | e3681de1a974741e74cc3b77cad3e599acef20ae | [
"MIT"
] | null | null | null | from PyQt4 import QtGui, QtCore
from easypyqt.widget import basicwidget
class ButtonGroupWidget(basicwidget.BasicWidget):
"""
A group of widgets with horizontal or vertical layout.
EXAMPLE::
buttonList = [('test1', 'TestONE'), ('test2', 'TestTWO')]
fw = ButtonGroupWidget(button_... | 31.423729 | 121 | 0.608414 | from PyQt4 import QtGui, QtCore
from easypyqt.widget import basicwidget
class ButtonGroupWidget(basicwidget.BasicWidget):
"""
A group of widgets with horizontal or vertical layout.
EXAMPLE::
buttonList = [('test1', 'TestONE'), ('test2', 'TestTWO')]
fw = ButtonGroupWidget(button_... | 267 | 0 | 54 |
7eb67fb923203b51676df835efeceb20c49ef936 | 1,812 | py | Python | tests/test_core_we_get.py | asnapper-net/we-get | ca88118d6bf18485ae1c45284d14b53df6adf40c | [
"MIT"
] | 131 | 2017-05-05T01:26:21.000Z | 2022-03-31T05:41:22.000Z | tests/test_core_we_get.py | asnapper-net/we-get | ca88118d6bf18485ae1c45284d14b53df6adf40c | [
"MIT"
] | 37 | 2017-05-04T20:48:20.000Z | 2022-03-21T12:17:19.000Z | tests/test_core_we_get.py | asnapper-net/we-get | ca88118d6bf18485ae1c45284d14b53df6adf40c | [
"MIT"
] | 19 | 2017-05-04T16:18:35.000Z | 2022-01-31T11:52:48.000Z | import pytest
from docopt import docopt, DocoptExit
from we_get.core.we_get import WG
from we_get.core import we_get
@pytest.mark.parametrize(
'argv, exp_res',
[
[None, {'arguments': None, 'parguments': {}, 'we_get_run': 0}],
[['--search', 'ubuntu'], {
'arguments': {
... | 28.3125 | 99 | 0.418874 | import pytest
from docopt import docopt, DocoptExit
from we_get.core.we_get import WG
from we_get.core import we_get
@pytest.mark.parametrize(
'argv, exp_res',
[
[None, {'arguments': None, 'parguments': {}, 'we_get_run': 0}],
[['--search', 'ubuntu'], {
'arguments': {
... | 439 | 0 | 44 |