hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | 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 130 | 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 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
304ef5cef3e0a6f6f6da377089a2f9f447bd40ce | 1,991 | py | Python | tests/unit/test_lidar.py | tukiains/actris-cloudnet | 26f2607b890630146469cfa410fce99438ceee3f | [
"MIT"
] | 13 | 2020-02-16T06:52:51.000Z | 2022-03-10T09:43:19.000Z | tests/unit/test_lidar.py | tukiains/actris-cloudnet | 26f2607b890630146469cfa410fce99438ceee3f | [
"MIT"
] | 17 | 2020-01-15T10:47:08.000Z | 2022-03-28T13:08:23.000Z | tests/unit/test_lidar.py | tukiains/actris-cloudnet | 26f2607b890630146469cfa410fce99438ceee3f | [
"MIT"
] | 12 | 2020-03-03T16:45:13.000Z | 2022-03-23T08:02:43.000Z | import numpy.ma as ma
WAVELENGTH = 900.0
| 34.929825 | 72 | 0.588649 | import numpy as np
import numpy.ma as ma
from numpy.testing import assert_array_equal
import pytest
import netCDF4
from cloudnetpy.categorize.lidar import Lidar
WAVELENGTH = 900.0
@pytest.fixture(scope='session')
def fake_lidar_file(tmpdir_factory):
"""Creates a simple lidar file for testing."""
file_name = ... | 0 | 1,259 | 0 | 0 | 0 | 479 | 0 | 29 | 179 |
f8eefa185a49def0174464251e27beb1238c9c88 | 93,179 | py | Python | src/west/manifest.py | Mierunski/west | 38e656b05ea8f4c8d80b953f6d88b1ed604d11f8 | [
"Apache-2.0"
] | null | null | null | src/west/manifest.py | Mierunski/west | 38e656b05ea8f4c8d80b953f6d88b1ed604d11f8 | [
"Apache-2.0"
] | null | null | null | src/west/manifest.py | Mierunski/west | 38e656b05ea8f4c8d80b953f6d88b1ed604d11f8 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, 2019, 2020 Nordic Semiconductor ASA
# Copyright 2018, 2019 Foundries.io Ltd
#
# SPDX-License-Identifier: Apache-2.0
'''
Parser and abstract data types for west manifests.
'''
import errno
import logging
import os
import re
from typing import Any, Callable, Dict, List, Optional, Union
from packag... | 39.701321 | 79 | 0.598 | # Copyright (c) 2018, 2019, 2020 Nordic Semiconductor ASA
# Copyright 2018, 2019 Foundries.io Ltd
#
# SPDX-License-Identifier: Apache-2.0
'''
Parser and abstract data types for west manifests.
'''
import configparser
import enum
import errno
import logging
import os
from pathlib import PurePosixPath, Path
import re
i... | 0 | 6,371 | 0 | 69,336 | 0 | 8,656 | 0 | 57 | 910 |
3ef495b179a0baa8a6d9d01ab07b1bb3069f3b75 | 1,680 | py | Python | menus/migrations/0005_auto_20200715_0348.py | theNegativeEntropy/digitalmenu | ae28932bbf00607e484a965ca90043250708f32c | [
"MIT"
] | null | null | null | menus/migrations/0005_auto_20200715_0348.py | theNegativeEntropy/digitalmenu | ae28932bbf00607e484a965ca90043250708f32c | [
"MIT"
] | 5 | 2021-03-30T13:48:07.000Z | 2021-09-22T19:14:57.000Z | menus/migrations/0005_auto_20200715_0348.py | theNegativeEntropy/digitalmenu | ae28932bbf00607e484a965ca90043250708f32c | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-07-15 03:48
| 35 | 122 | 0.618452 | # Generated by Django 3.0.7 on 2020-07-15 03:48
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('shops', '0005_shop_owner... | 0 | 0 | 0 | 1,500 | 0 | 0 | 0 | 41 | 90 |
96101e6dfb54b9aad38ea32b1d50d5f0cdb04c34 | 3,570 | py | Python | examples/005_evaluation_new_oversampler.py | szghlm/smote_variants | 9066ddbd526b18bb273746c1b989e8e07a35abd2 | [
"MIT"
] | 271 | 2020-01-18T09:04:35.000Z | 2022-03-31T11:49:12.000Z | examples/005_evaluation_new_oversampler.py | szghlm/smote_variants | 9066ddbd526b18bb273746c1b989e8e07a35abd2 | [
"MIT"
] | 19 | 2020-05-04T18:24:03.000Z | 2022-03-21T23:44:43.000Z | examples/005_evaluation_new_oversampler.py | szghlm/smote_variants | 9066ddbd526b18bb273746c1b989e8e07a35abd2 | [
"MIT"
] | 70 | 2020-01-18T15:01:43.000Z | 2022-03-28T15:10:19.000Z |
# coding: utf-8
# # Evaluation of the new oversampler on the standard database foldings
#
# In this notebook we give an example evaluating a new oversampler on the standard 104 imbalanced datasets. The evaluation is highly similar to that illustrated in the notebook ```002_evaluation_multiple_datasets``` with the di... | 34 | 503 | 0.715126 |
# coding: utf-8
# # Evaluation of the new oversampler on the standard database foldings
#
# In this notebook we give an example evaluating a new oversampler on the standard 104 imbalanced datasets. The evaluation is highly similar to that illustrated in the notebook ```002_evaluation_multiple_datasets``` with the di... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 |
ac7310b49e080a4f14ed384393fb879b330580a7 | 94 | py | Python | graph_sage.py | ejhill24/compound-pcfg | f871541d4a462d4bf37d3349f4746a139411a6e1 | [
"MIT"
] | 1 | 2021-01-08T20:16:16.000Z | 2021-01-08T20:16:16.000Z | graph_sage.py | ejhill24/compound-pcfg | f871541d4a462d4bf37d3349f4746a139411a6e1 | [
"MIT"
] | null | null | null | graph_sage.py | ejhill24/compound-pcfg | f871541d4a462d4bf37d3349f4746a139411a6e1 | [
"MIT"
] | null | null | null | import tensorflow as tf
print(tf.__version__)
| 18.8 | 28 | 0.829787 | import numpy as np
import tensorflow as tf
from tensorflow import keras
print(tf.__version__)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 44 |
389c4cf76abd71174620e665c96ceb58dd5d4a51 | 3,601 | py | Python | recipes/Python/579031_Simple_way_find_number_perfect_square_numbers/recipe-579031.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/579031_Simple_way_find_number_perfect_square_numbers/recipe-579031.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/579031_Simple_way_find_number_perfect_square_numbers/recipe-579031.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | #
# Question: given a range a,b, find the total number of perfect square numbers in the given range.
#
import cmath
def find_perfect_square_count(a, b, verbose=False):
'''
The strategy here is not to iterate through the set of possible integer values and check for is_perfect_square()
each time... | 36.744898 | 120 | 0.609275 | #
# Question: given a range a,b, find the total number of perfect square numbers in the given range.
#
import cmath
def find_perfect_square_count(a, b, verbose=False):
'''
The strategy here is not to iterate through the set of possible integer values and check for is_perfect_square()
each time... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4f983a891333bfd8abc2163e6fb14ef469fc9b6e | 1,598 | py | Python | src/beanmachine/ppl/experimental/tests/mala/single_site_metropolis_adjusted_langevin_algorithm_conjugate_test_nightly.py | facebookresearch/beanmachine | 225114d9964b90c3a49adddc4387b4a47d1b4262 | [
"MIT"
] | 177 | 2021-12-12T14:19:05.000Z | 2022-03-24T05:48:10.000Z | src/beanmachine/ppl/experimental/tests/mala/single_site_metropolis_adjusted_langevin_algorithm_conjugate_test_nightly.py | facebookresearch/beanmachine | 225114d9964b90c3a49adddc4387b4a47d1b4262 | [
"MIT"
] | 171 | 2021-12-11T06:12:05.000Z | 2022-03-31T20:26:29.000Z | src/beanmachine/ppl/experimental/tests/mala/single_site_metropolis_adjusted_langevin_algorithm_conjugate_test_nightly.py | facebookresearch/beanmachine | 225114d9964b90c3a49adddc4387b4a47d1b4262 | [
"MIT"
] | 31 | 2021-12-11T06:27:19.000Z | 2022-03-25T13:31:56.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.
| 38.047619 | 88 | 0.770964 | # 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.
import unittest
from beanmachine.ppl.experimental.mala import (
SingleSiteMetropolisAdapatedLangevinAlgorithm,
)
from beanmachine.ppl.t... | 0 | 0 | 0 | 1,198 | 0 | 0 | 0 | 129 | 91 |
74fab2d630a219aeb732e879cee862c7eb741a42 | 256 | py | Python | src/dashboard/__init__.py | onubot/caterbot | 6dfe807292bc39a46c3e3b0bab30e0fc80e7f40c | [
"MIT"
] | null | null | null | src/dashboard/__init__.py | onubot/caterbot | 6dfe807292bc39a46c3e3b0bab30e0fc80e7f40c | [
"MIT"
] | null | null | null | src/dashboard/__init__.py | onubot/caterbot | 6dfe807292bc39a46c3e3b0bab30e0fc80e7f40c | [
"MIT"
] | null | null | null | # Dashboard blueprint
from flask.blueprints import Blueprint
from config import api_version
dash = Blueprint(
"dashboard",
__name__,
url_prefix=f"/api/{api_version}/dashboard",
template_folder="templates/dashboard",
)
| 19.692308 | 47 | 0.746094 | # Dashboard blueprint
from flask.blueprints import Blueprint
from config import api_version
dash = Blueprint(
"dashboard",
__name__,
url_prefix=f"/api/{api_version}/dashboard",
template_folder="templates/dashboard",
)
from . import views
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -2 | 23 |
3f4591585d913e9b03db0e770ca385d819aed200 | 204 | py | Python | setup.py | qianjing2020/twitoff | a223e8f4a3dfecd582c18c92f8ac9212a01d4570 | [
"MIT"
] | null | null | null | setup.py | qianjing2020/twitoff | a223e8f4a3dfecd582c18c92f8ac9212a01d4570 | [
"MIT"
] | null | null | null | setup.py | qianjing2020/twitoff | a223e8f4a3dfecd582c18c92f8ac9212a01d4570 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="twitoff_app",
packages=['twitoff_app'],
include_package_data=True,
install_requires=[
'flask',
],
) | 20.4 | 53 | 0.647059 | from setuptools import _install_setup_requires, setup
setup(
name="twitoff_app",
packages=['twitoff_app'],
include_package_data=True,
install_requires=[
'flask',
],
) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0 |
cb41ee7d3e036aa5ad0ab1e0ff5773c0ce2b3d49 | 387 | py | Python | svn-multilog.py | jonathancone/svn-utils | 1d9715db3299d26cca802de63719abec34f478f5 | [
"Apache-2.0"
] | 25 | 2016-03-07T13:45:33.000Z | 2022-01-31T03:49:45.000Z | svn-multilog.py | jonathancone/svn-utils | 1d9715db3299d26cca802de63719abec34f478f5 | [
"Apache-2.0"
] | 1 | 2017-08-14T08:25:03.000Z | 2017-08-14T08:25:03.000Z | svn-multilog.py | jonathancone/svn-utils | 1d9715db3299d26cca802de63719abec34f478f5 | [
"Apache-2.0"
] | 13 | 2017-09-29T15:38:36.000Z | 2022-03-21T19:13:03.000Z | from subprocess import call
import sys
projects_file = sys.argv[1]
svn_path = sys.argv[2]
oldest_rev = sys.argv[3]
with open(projects_file) as f:
repo_paths = f.readlines()
print [svn_path + line[:-1] for line in repo_paths]
paths = [svn_path + line[:-1] for line in repo_paths]
for path in paths:
call(['svn'... | 24.1875 | 79 | 0.671835 | from subprocess import call
import sys
projects_file = sys.argv[1]
svn_path = sys.argv[2]
oldest_rev = sys.argv[3]
with open(projects_file) as f:
repo_paths = f.readlines()
print [svn_path + line[:-1] for line in repo_paths]
paths = [svn_path + line[:-1] for line in repo_paths]
for path in paths:
call(['svn'... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3ba0d2c32c0376fb690dd41868b71959bbf7546b | 399 | py | Python | FUNDASTORE/APPS/PRINCIPAL/migrations/0004_auto_20210212_1545.py | rm-claudio22/VENV00-FUNDASTORE | 6764cf40fb44b5306e8d89f667fba87303824101 | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRINCIPAL/migrations/0004_auto_20210212_1545.py | rm-claudio22/VENV00-FUNDASTORE | 6764cf40fb44b5306e8d89f667fba87303824101 | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRINCIPAL/migrations/0004_auto_20210212_1545.py | rm-claudio22/VENV00-FUNDASTORE | 6764cf40fb44b5306e8d89f667fba87303824101 | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.1.5 on 2021-02-12 20:45
| 21 | 54 | 0.611529 | # Generated by Django 3.1.5 on 2021-02-12 20:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('PRINCIPAL', '0003_blog_blg_descripcion'),
]
operations = [
migrations.AlterField(
model_name='blog',
name='blg_fecha... | 0 | 0 | 0 | 285 | 0 | 0 | 0 | 19 | 46 |
226547bc8a9448ea4c0ccefbeac4eeb16bdbdebc | 535 | py | Python | gdksite/base/migrations/0032_auto_20191027_0009.py | vgrivtsov/moygdk | 74d63299c7326bcae92a17b61d978ad91f0d5552 | [
"MIT"
] | null | null | null | gdksite/base/migrations/0032_auto_20191027_0009.py | vgrivtsov/moygdk | 74d63299c7326bcae92a17b61d978ad91f0d5552 | [
"MIT"
] | 17 | 2020-02-11T23:35:05.000Z | 2022-03-11T23:39:52.000Z | gdksite/base/migrations/0032_auto_20191027_0009.py | vgrivtsov/moygdk | 74d63299c7326bcae92a17b61d978ad91f0d5552 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-26 14:09
| 28.157895 | 191 | 0.635514 | # Generated by Django 2.2.6 on 2019-10-26 14:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('base', '0031_auto_20191027_0008'),
]
operations = [
migrations.AlterField(
model_name='collectivepage',
name='club_p... | 86 | 0 | 0 | 378 | 0 | 0 | 0 | 19 | 46 |
5730081bea00d705475d9337e15311d3a32ef259 | 2,285 | py | Python | examples/voice_record.py | LonelyGuy12/disnake-ext-audiorec | 81a52db6d54d36635e01a674340e94c55a408261 | [
"MIT"
] | null | null | null | examples/voice_record.py | LonelyGuy12/disnake-ext-audiorec | 81a52db6d54d36635e01a674340e94c55a408261 | [
"MIT"
] | null | null | null | examples/voice_record.py | LonelyGuy12/disnake-ext-audiorec | 81a52db6d54d36635e01a674340e94c55a408261 | [
"MIT"
] | null | null | null | import os
import logging
from disnake.ext import commands
logging.basicConfig(level=logging.INFO)
bot = commands.Bot(command_prefix=commands.when_mentioned_or("+"),
description='Relatively simple recording bot example')
bot.add_cog(Recorder(bot))
bot.run(os.environ['TOKEN'])
| 30.466667 | 93 | 0.633698 | import asyncio
import os
import io
import disnake
import logging
from disnake.ext import commands
from disnake.ext.audiorec import NativeVoiceClient
logging.basicConfig(level=logging.INFO)
class Recorder(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.... | 0 | 1,633 | 0 | 195 | 0 | 0 | 0 | 3 | 143 |
dcd53b89abf8828ecc57c2431b9d8699bf94cd04 | 3,075 | py | Python | utility/functions.py | mfschmidt/PyGEST | 3d5e9f5f29ad3d51d3786ea8c39ac89ae792db3b | [
"MIT"
] | null | null | null | utility/functions.py | mfschmidt/PyGEST | 3d5e9f5f29ad3d51d3786ea8c39ac89ae792db3b | [
"MIT"
] | 1 | 2020-09-20T03:20:14.000Z | 2020-09-20T03:20:14.000Z | utility/functions.py | mfschmidt/PyGEST | 3d5e9f5f29ad3d51d3786ea8c39ac89ae792db3b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
The following functions are a miscellaneous collection of utility functions
that can be useful in making code shorter and easier to read.
"""
def shortened_hash(s, n):
""" Return a shortened string with the first and last bits of a hash
:param s: the full string to shorten
:par... | 34.943182 | 99 | 0.59252 | #!/usr/bin/env python3
"""
The following functions are a miscellaneous collection of utility functions
that can be useful in making code shorter and easier to read.
"""
def shortened_hash(s, n):
""" Return a shortened string with the first and last bits of a hash
:param s: the full string to shorten
:par... | 27 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
32c7d714838071b24865cbd45577385baa9961ff | 316 | py | Python | Chapter01/05_triple_quotes.py | add54/ADMIN_SYS_PYTHON | 5a6d9705537c8663c8f7b0f45d29ccc87b6096e7 | [
"MIT"
] | 116 | 2018-12-21T01:05:47.000Z | 2022-03-23T21:41:41.000Z | Chapter01/05_triple_quotes.py | add54/ADMIN_SYS_PYTHON | 5a6d9705537c8663c8f7b0f45d29ccc87b6096e7 | [
"MIT"
] | 2 | 2021-03-31T19:36:19.000Z | 2021-06-10T22:29:26.000Z | Chapter01/05_triple_quotes.py | add54/ADMIN_SYS_PYTHON | 5a6d9705537c8663c8f7b0f45d29ccc87b6096e7 | [
"MIT"
] | 147 | 2018-12-19T14:10:32.000Z | 2022-03-20T11:03:20.000Z | #!/usr/bin/python3
para_str = """ Python is a scripting language which was created by
Guido van Rossum in 1991, \t which is used in various sectors such as \n Game Development, GIS Programming, Software Development, web development,
Data Analytics and Machine learning, System Scripting etc.
"""
print (para_str)
| 35.111111 | 147 | 0.768987 | #!/usr/bin/python3
para_str = """ Python is a scripting language which was created by
Guido van Rossum in 1991, \t which is used in various sectors such as \n Game Development, GIS Programming, Software Development, web development,
Data Analytics and Machine learning, System Scripting etc.
"""
print (para_str)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c4adcf6b8e6adab89e31fe3c85f893680eacd1b0 | 4,216 | py | Python | I18nLibrary/__init__.py | qahive/robotframework-i18n | 7f0e86ff14dcc7ba7030380c34dff82a95a8ec78 | [
"Apache-2.0"
] | 3 | 2020-01-16T00:52:48.000Z | 2021-11-15T04:55:02.000Z | I18nLibrary/__init__.py | qahive/robotframework-i18n | 7f0e86ff14dcc7ba7030380c34dff82a95a8ec78 | [
"Apache-2.0"
] | 1 | 2020-06-10T04:46:24.000Z | 2020-06-15T11:16:09.000Z | I18nLibrary/__init__.py | qahive/robotframework-i18n | 7f0e86ff14dcc7ba7030380c34dff82a95a8ec78 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Atthaboon S.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.66087 | 95 | 0.650617 | # Copyright 2020 Atthaboon S.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 0 | 0 | 0 | 3,528 | 0 | 0 | 0 | 0 | 89 |
90b5b1db45e1f95fb16ea33e2e6c4e344dfe41b6 | 5,548 | py | Python | vmprof/__init__.py | kayhayen/vmprof-python | 66c46aa7bb10b3c580b4e71f9a32469a175b5263 | [
"MIT"
] | 430 | 2015-01-31T13:41:07.000Z | 2022-01-24T02:04:23.000Z | vmprof/__init__.py | kayhayen/vmprof-python | 66c46aa7bb10b3c580b4e71f9a32469a175b5263 | [
"MIT"
] | 202 | 2015-02-06T19:01:38.000Z | 2022-03-22T15:15:20.000Z | vmprof/__init__.py | kayhayen/vmprof-python | 66c46aa7bb10b3c580b4e71f9a32469a175b5263 | [
"MIT"
] | 59 | 2015-02-08T16:06:28.000Z | 2022-01-11T00:12:37.000Z | import os
import sys
try:
from shutil import which
except ImportError:
from backports.shutil_which import which
import _vmprof
from vmprof import cli
from vmprof.reader import (MARKER_NATIVE_SYMBOLS, FdWrapper, LogReaderState, LogReaderDumpNative)
from vmprof.stats import Stats
from vmprof.profiler import Pr... | 40.202899 | 114 | 0.671053 | import os
import sys
try:
from shutil import which
except ImportError:
from backports.shutil_which import which
import _vmprof
from vmprof import cli
from vmprof.reader import (MARKER_NATIVE_SYMBOLS, FdWrapper,
LogReaderState, LogReaderDumpNative)
from vmprof.stats import Stats
from vmprof.profiler i... | 0 | 0 | 0 | 0 | 0 | 2,474 | 0 | 8 | 98 |
4a6c2654322f5a24ecf864246ad64a6fb7032e8a | 8,178 | py | Python | lte/protos/ha_orc8r_pb2.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lte/protos/ha_orc8r_pb2.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lte/protos/ha_orc8r_pb2.py | aweimeow/enodebd | e1cd20693153e6b85e5d1bf9d21af2501c358601 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: lte/protos/ha_orc8r.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from go... | 38.394366 | 791 | 0.79934 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: lte/protos/ha_orc8r.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from go... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bb5cbb4070bf18e7e184de9d99bffef9ee62901f | 5,348 | py | Python | xirl/pretrain.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-19T04:26:12.000Z | 2022-03-19T04:26:12.000Z | xirl/pretrain.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | xirl/pretrain.py | gunpowder78/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 30.913295 | 78 | 0.672588 | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 0 | 3,716 | 0 | 0 | 0 | 0 | 0 | 85 | 244 |
f519766e303a1b626be87cea373205c6323bff6f | 2,634 | py | Python | pkg/factory/creator/_creator.py | shrohilla/kafka-func-core-tool-test | 110815f74bd035758542526c74ebaa55ce51046f | [
"Apache-2.0"
] | null | null | null | pkg/factory/creator/_creator.py | shrohilla/kafka-func-core-tool-test | 110815f74bd035758542526c74ebaa55ce51046f | [
"Apache-2.0"
] | null | null | null | pkg/factory/creator/_creator.py | shrohilla/kafka-func-core-tool-test | 110815f74bd035758542526c74ebaa55ce51046f | [
"Apache-2.0"
] | null | null | null |
factory_instance = CreatorFactory() | 37.628571 | 78 | 0.684131 | from pkg.creator._creator import Creator
from pkg.creator.app_plan._app_plan import FunctionPlanCreator
from pkg.creator.az_resources._az_resources import AzureResourceCreator
from pkg.creator.function_app._function_app import FunctionAppCreator
from pkg.creator.local_function._local_function import LocalFunctionAppCre... | 0 | 0 | 0 | 1,961 | 0 | 26 | 0 | 366 | 244 |
6ceabea02b2033f21ca38076603889cc89287471 | 1,030 | py | Python | transactional_mail/templatetags/email_tags.py | vinaypai/django-transactional-mail | 547785237d5bd6108fef348c89e4ff13c5ccc8c1 | [
"MIT"
] | null | null | null | transactional_mail/templatetags/email_tags.py | vinaypai/django-transactional-mail | 547785237d5bd6108fef348c89e4ff13c5ccc8c1 | [
"MIT"
] | null | null | null | transactional_mail/templatetags/email_tags.py | vinaypai/django-transactional-mail | 547785237d5bd6108fef348c89e4ff13c5ccc8c1 | [
"MIT"
] | null | null | null | """Template tags to make e-mail styling less painful"""
from django import template
register = template.Library()
_styles = None
| 27.105263 | 97 | 0.703883 | """Template tags to make e-mail styling less painful"""
import cssutils
from django import template
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.contrib.staticfiles import finders
from django.utils.safestring import mark_safe
register = template.Library()
_styl... | 0 | 213 | 0 | 0 | 0 | 439 | 0 | 88 | 156 |
7b540622cb95c7a1c0b29a096f777060135be33d | 10,931 | py | Python | cannab/create_submission_speed.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 27 | 2020-03-04T05:54:48.000Z | 2022-01-05T07:07:44.000Z | cannab/create_submission_speed.py | CosmiQ/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 1 | 2020-07-14T10:35:50.000Z | 2020-07-14T10:35:50.000Z | cannab/create_submission_speed.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 7 | 2020-03-07T21:42:57.000Z | 2022-01-07T10:49:50.000Z | # -*- coding: utf-8 -*-
import os
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["NUMEXPR_NUM_THREADS"] = "1"
os.environ["OMP_NUM_THREADS"] = "1"
from os import path, listdir
import numpy as np
np.random.seed(1)
import random
random.seed(1)
import pandas as pd
import timeit
import sys
sys.setrecursionlimit(10000)
fr... | 33.024169 | 151 | 0.565456 | # -*- coding: utf-8 -*-
import os
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["NUMEXPR_NUM_THREADS"] = "1"
os.environ["OMP_NUM_THREADS"] = "1"
from os import path, listdir
import numpy as np
np.random.seed(1)
import random
random.seed(1)
import pandas as pd
import timeit
import cv2
from tqdm import tqdm
import sy... | 0 | 0 | 0 | 0 | 0 | 4,991 | 0 | 52 | 201 |
0600c6d422557755a49f0f4fa55a1f9a73774a50 | 6,425 | py | Python | haruhi_dl/extractor/weibo.py | haruhi-dl/haruhi-dl | 0526e2add4c263209cad55347efa9a2dfe6c3fa6 | [
"Unlicense"
] | 32 | 2021-01-18T03:52:17.000Z | 2022-02-17T20:43:39.000Z | haruhi_dl/extractor/weibo.py | haruhi-dl/haruhi-dl | 0526e2add4c263209cad55347efa9a2dfe6c3fa6 | [
"Unlicense"
] | 12 | 2021-02-06T08:12:08.000Z | 2021-12-11T23:17:41.000Z | haruhi_dl/extractor/weibo.py | haruhi-dl/haruhi-dl | 0526e2add4c263209cad55347efa9a2dfe6c3fa6 | [
"Unlicense"
] | 6 | 2021-01-29T16:46:31.000Z | 2022-01-20T18:40:03.000Z | # coding: utf-8
from __future__ import unicode_literals
| 36.095506 | 148 | 0.50428 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
import json
import random
import re
from ..compat import (
compat_parse_qs,
compat_str,
)
from ..utils import (
js_to_json,
strip_jsonp,
urlencode_postdata,
)
class WeiboIE(InfoExtractor):
_VALID_URL =... | 135 | 0 | 0 | 6,060 | 0 | 0 | 0 | 81 | 181 |
36ef0dd7e0463788bad2d380b4d3cdd7c13fbdba | 1,230 | py | Python | common/utils/path.py | tower000/sublime_a_file_icon | dd27dcf54ba018a42d75c2ed533f9de0f7df69d4 | [
"MIT"
] | 3 | 2019-05-22T06:23:53.000Z | 2019-06-29T02:28:23.000Z | common/utils/path.py | themilkman/a-file-icon | 2daa81d114e9f1c7f5fa1f30455db1f91966667b | [
"MIT"
] | 1 | 2021-06-10T11:31:33.000Z | 2021-06-10T11:31:33.000Z | common/utils/path.py | mallowigi/a-file-icon | cd0d53b707593e8ec5fca1acd9342734beb9f983 | [
"MIT"
] | 4 | 2018-12-17T10:51:38.000Z | 2021-11-27T14:32:30.000Z |
from .. import settings
| 25.625 | 71 | 0.660163 | import os
import sublime
from .. import settings
def get_package_archive():
return os.path.join(sublime.installed_packages_path(),
settings.PACKAGE_ARCH)
def get_package_folder():
return os.path.join(sublime.packages_path(), settings.PACKAGE_NAME)
def get_package_icons():
retu... | 0 | 0 | 0 | 0 | 0 | 964 | 0 | -19 | 251 |
021b57886f000670438a5ae0f288f7cee9e50927 | 983 | py | Python | class1/e8_ciscoconfparse_v2.py | ktbyers/pynet_wantonik | 601bce26142b6741202c2bdafb9e0d0cec1b3c78 | [
"Apache-2.0"
] | 2 | 2017-05-11T12:05:15.000Z | 2021-07-15T18:13:19.000Z | class1/e8_ciscoconfparse_v2.py | ktbyers/pynet_wantonik | 601bce26142b6741202c2bdafb9e0d0cec1b3c78 | [
"Apache-2.0"
] | null | null | null | class1/e8_ciscoconfparse_v2.py | ktbyers/pynet_wantonik | 601bce26142b6741202c2bdafb9e0d0cec1b3c78 | [
"Apache-2.0"
] | 1 | 2017-05-11T12:05:18.000Z | 2017-05-11T12:05:18.000Z | #!/usr/bin/env pytho
'''
This script parses cisco.txt file and searches for 'crypto map CRYPTO' lines using CCP module.
Then it displays childrens indented multiple times for each element of crypto_map variable (list).
'''
import pprint
from ciscoconfparse import CiscoConfParse
fo = open('cisco.txt', 'r') # Openin... | 42.73913 | 98 | 0.766022 | #!/usr/bin/env pytho
'''
This script parses cisco.txt file and searches for 'crypto map CRYPTO' lines using CCP module.
Then it displays childrens indented multiple times for each element of crypto_map variable (list).
'''
import pprint
from ciscoconfparse import CiscoConfParse
fo = open('cisco.txt', 'r') # Openin... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3f5bc935d0411f46bef1792e263ae6b4c4c6c37e | 5,219 | py | Python | test/test_validation.py | rajivpatel36/pyesg | f16939f6de003c55fc89d8e1bd11af03011ee0aa | [
"MIT"
] | null | null | null | test/test_validation.py | rajivpatel36/pyesg | f16939f6de003c55fc89d8e1bd11af03011ee0aa | [
"MIT"
] | null | null | null | test/test_validation.py | rajivpatel36/pyesg | f16939f6de003c55fc89d8e1bd11af03011ee0aa | [
"MIT"
] | null | null | null | from pyesg.configuration import validation_configuration as valid_config
from pyesg.validation.run import validate_simulations
config = PyESGConfiguration()
config.number_of_projection_steps = 30
config.number_of_batches = 1
config.number_of_simulations = 100000
config.projection_frequency = 'annually'
config.random_s... | 31.823171 | 74 | 0.721211 | from pyesg.configuration import validation_configuration as valid_config
from pyesg.validation.run import validate_simulations
from pyesg.configuration.pyesg_configuration import *
config = PyESGConfiguration()
config.number_of_projection_steps = 30
config.number_of_batches = 1
config.number_of_simulations = 100000
co... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 22 |
a9f10f7c8bcf5e0dd3b721bf09970610f2d2f830 | 6,625 | py | Python | testsuite/runtests.py | LaplaceKorea/Concuerror | 87e63f10ac615bf2eeac5b0916ef54d11a933e0b | [
"BSD-2-Clause"
] | 21 | 2015-01-08T05:47:56.000Z | 2019-06-27T13:31:14.000Z | testsuite/runtests.py | LaplaceKorea/Concuerror | 87e63f10ac615bf2eeac5b0916ef54d11a933e0b | [
"BSD-2-Clause"
] | 4 | 2015-05-27T12:46:48.000Z | 2015-05-27T12:47:33.000Z | testsuite/runtests.py | mariachris/Concuerror | 87e63f10ac615bf2eeac5b0916ef54d11a933e0b | [
"BSD-2-Clause"
] | 6 | 2015-03-05T00:29:04.000Z | 2021-08-17T16:05:02.000Z | #!/usr/bin/env python
import os
import re
import sys
import glob
import subprocess
from ctypes import c_int
from multiprocessing import Process, Lock, Value, BoundedSemaphore, cpu_count
#---------------------------------------------------------------------
# Extract scenarios from the specified test
#-------------... | 29.842342 | 78 | 0.560604 | #!/usr/bin/env python
import os
import re
import sys
import glob
import subprocess
from ctypes import c_int
from multiprocessing import Process, Lock, Value, BoundedSemaphore, cpu_count
#---------------------------------------------------------------------
# Extract scenarios from the specified test
def runTest(test... | 0 | 0 | 0 | 0 | 0 | 3,913 | 0 | 0 | 90 |
7cc29cf11219a7ab5ae33a724505475581157527 | 2,890 | py | Python | go_make_venv.py | illuscio-dev/make_scripts | 9db5243761e1dc05afc7ea1fa36c2f3956456361 | [
"MIT"
] | 1 | 2021-05-03T06:23:12.000Z | 2021-05-03T06:23:12.000Z | go_make_venv.py | opencinemac/make_scripts | be06facb8a99e6375695df57b775b5f743d52f76 | [
"MIT"
] | null | null | null | go_make_venv.py | opencinemac/make_scripts | be06facb8a99e6375695df57b775b5f743d52f76 | [
"MIT"
] | 1 | 2021-04-28T22:25:07.000Z | 2021-04-28T22:25:07.000Z | import venv
import sys
import pathlib
import platform
from configparser import ConfigParser
CONFIG_PATH: pathlib.Path = pathlib.Path(__file__).parent.parent.parent / "setup.cfg"
PLATFORM = platform.system()
def load_cfg() -> ConfigParser:
"""
loads library config file
:return: loaded `ConfigParser` obje... | 27.788462 | 86 | 0.680277 | import venv
import sys
import pathlib
import platform
from configparser import ConfigParser
CONFIG_PATH: pathlib.Path = pathlib.Path(__file__).parent.parent.parent / "setup.cfg"
PLATFORM = platform.system()
def load_cfg() -> ConfigParser:
"""
loads library config file
:return: loaded `ConfigParser` obje... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
07edeeb03434484a568e9f4426cf7e4049646292 | 9,060 | py | Python | Procedurals/BSPDungeonGenerator.py | sidav/ShadowPriest | 0ab3f9e4dde03237dff7389d0654112f1d1994e9 | [
"MIT"
] | 1 | 2017-12-12T15:34:54.000Z | 2017-12-12T15:34:54.000Z | Procedurals/BSPDungeonGenerator.py | sidav/ShadowPriest | 0ab3f9e4dde03237dff7389d0654112f1d1994e9 | [
"MIT"
] | null | null | null | Procedurals/BSPDungeonGenerator.py | sidav/ShadowPriest | 0ab3f9e4dde03237dff7389d0654112f1d1994e9 | [
"MIT"
] | null | null | null | #############################################################################
_LCG_X = None #
#
#############################################################################
_MIN_SP... | 40.995475 | 168 | 0.487528 | #############################################################################
def _random(min, max): #IT'S JUST A WRAPPER. Min, max inclusive! #
return _rand(max-min+1)+min #
#
_LCG_X =... | 0 | 0 | 0 | 3,164 | 0 | 4,855 | 0 | 0 | 295 |
25841aec8d34dd1399a61fd5df3b0157891726bc | 891 | py | Python | boosup/boosup/performance/urls.py | developertqw2017/migrationDjango | f7256ec2af51da1179d2f957e1aa896191b7b514 | [
"MIT"
] | null | null | null | boosup/boosup/performance/urls.py | developertqw2017/migrationDjango | f7256ec2af51da1179d2f957e1aa896191b7b514 | [
"MIT"
] | 16 | 2020-02-11T23:19:19.000Z | 2022-03-11T23:33:40.000Z | boosup/boosup/performance/urls.py | developertqw2017/migrationDjango | f7256ec2af51da1179d2f957e1aa896191b7b514 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding=utf8
'''
Created on 2016/9/19
@author: cloudy
'''
from django.conf.urls import url
from . import views
urlpatterns = [
#
url(r'^index/$',views.index,name='index'),
#post url
url(r'^echart/$',views.echart,name='echart'),
#
url(r'^setting/$',views.setting,name='sett... | 23.447368 | 69 | 0.618406 | #!/usr/bin/env python
#coding=utf8
'''
Created on 2016/9/19
@author: cloudy
'''
from django.conf.urls import url
from . import views
urlpatterns = [
#绩效首页
url(r'^index/$',views.index,name='index'),
#绩效趋势post 请求url
url(r'^echart/$',views.echart,name='echart'),
#绩效设置
url(r'^setting/$',views.set... | 192 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
fce02a6f6198d19f7d8e63f6dc38abbbcb34ee90 | 2,642 | py | Python | vehicle_tracking/license-plate-ocr.py | nickchenchj/darknet | 49e0dcfed005a8982e4fc80885f234e9cffee4c8 | [
"BSD-3-Clause"
] | null | null | null | vehicle_tracking/license-plate-ocr.py | nickchenchj/darknet | 49e0dcfed005a8982e4fc80885f234e9cffee4c8 | [
"BSD-3-Clause"
] | null | null | null | vehicle_tracking/license-plate-ocr.py | nickchenchj/darknet | 49e0dcfed005a8982e4fc80885f234e9cffee4c8 | [
"BSD-3-Clause"
] | null | null | null | import sys
import traceback
import darknet.python.darknet as dn
from os.path import splitext, basename
from glob import glob
from darknet.python.darknet import detect
from src.label import dknet_label_conversion
from src.utils import nms
if __name__ == '__main__':
try:
input_dir = sys.argv[1]... | 30.72093 | 98 | 0.520818 | import sys
import cv2
import numpy as np
import traceback
import darknet.python.darknet as dn
from os.path import splitext, basename
from glob import glob
from darknet.python.darknet import detect
from src.label import dknet_label_conversion
from src.utils im... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 44 |
dbf2ab7c80207b2d8cadfbed64731197538a2e95 | 2,625 | py | Python | toontown/rpc/ToontownRPCHandlerBase.py | MasterLoopyBM/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 1 | 2020-02-07T18:15:12.000Z | 2020-02-07T18:15:12.000Z | toontown/rpc/ToontownRPCHandlerBase.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | null | null | null | toontown/rpc/ToontownRPCHandlerBase.py | journeyfan/toontown-journey | 7a4db507e5c1c38a014fc65588086d9655aaa5b4 | [
"MIT"
] | 2 | 2020-09-26T20:37:18.000Z | 2020-11-15T20:55:33.000Z |
UNKNOWN = 700
USER = 100
COMMUNITY_MANAGER = 200
MODERATOR = 300
ARTIST = 400
PROGRAMMER = 500
ADMINISTRATOR = 600
SYSTEM_ADMINISTRATOR = 700
rpcmethod = RPCMethod
| 30.523256 | 91 | 0.629714 | import base64
from direct.directnotify.DirectNotifyGlobal import directNotify
import json
import time
from Crypto.Cipher import AES
UNKNOWN = 700
USER = 100
COMMUNITY_MANAGER = 200
MODERATOR = 300
ARTIST = 400
PROGRAMMER = 500
ADMINISTRATOR = 600
SYSTEM_ADMINISTRATOR = 700
class RPCMethod:
def __init__(self, a... | 0 | 0 | 0 | 2,276 | 0 | 0 | 0 | 22 | 157 |
dc8a4c0c98ba3c54cc164d9bbee0155c0196abfc | 901 | py | Python | hedp/eos/ionmix.py | luli/hedp | ab78879106ef2d7b6e54ac6a69d24439ec8c9a8b | [
"CECILL-B"
] | 9 | 2015-04-07T12:45:40.000Z | 2020-10-26T14:40:49.000Z | hedp/eos/ionmix.py | luli/hedp | ab78879106ef2d7b6e54ac6a69d24439ec8c9a8b | [
"CECILL-B"
] | 9 | 2015-10-20T13:01:09.000Z | 2016-09-09T15:24:36.000Z | hedp/eos/ionmix.py | luli/hedp | ab78879106ef2d7b6e54ac6a69d24439ec8c9a8b | [
"CECILL-B"
] | 12 | 2015-12-17T14:24:29.000Z | 2021-04-26T13:42:48.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright CNRS 2012
# Roman Yurchak (LULI)
# This software is governed by the CeCILL-B license under French law and
# abiding by the rules of distribution of free software.
from scipy.constants import N_A
def ionmix_validity(rho, temp, Zbar, Abar):
"""
Returns the di... | 27.30303 | 72 | 0.642619 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright CNRS 2012
# Roman Yurchak (LULI)
# This software is governed by the CeCILL-B license under French law and
# abiding by the rules of distribution of free software.
import numpy as np
from scipy.constants import N_A
def ionmix_validity(rho, temp, Zbar, Abar):
""... | 12 | 0 | 0 | 0 | 0 | 0 | 0 | -3 | 23 |
7a50d68592a2409060080bce73ef482f58f014a7 | 17,986 | py | Python | du/trial.py | diogo149/doo | d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f | [
"MIT"
] | 1 | 2016-11-17T06:34:39.000Z | 2016-11-17T06:34:39.000Z | du/trial.py | diogo149/doo | d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f | [
"MIT"
] | null | null | null | du/trial.py | diogo149/doo | d83a1715fb9d4e5eac9f5d3d384a45cfc26fec2f | [
"MIT"
] | null | null | null | """
trial is a way of creating a project
features:
- copies the source of the file you're using to run it
(to have a copy of the file)
(WARNING: there can be a race condition if the file changes before the trial
code is run - the earlier you import du, the less likely this is to
occur, due to the cache_inspe... | 34.992218 | 79 | 0.609752 | """
trial is a way of creating a project
features:
- copies the source of the file you're using to run it
(to have a copy of the file)
(WARNING: there can be a race condition if the file changes before the trial
code is run - the earlier you import du, the less likely this is to
occur, due to the cache_inspe... | 0 | 6,729 | 0 | 4,876 | 0 | 637 | 0 | -3 | 360 |
56f7f2d6cb9004200230d63ce87f7e661b04685d | 938 | py | Python | raytracing/examples/invariantAndEfficiency.py | himbeles/RayTracing | 3ea14d0df25c46b9749a344723d29cc29436e539 | [
"MIT"
] | 91 | 2019-01-31T17:25:09.000Z | 2022-03-19T11:03:05.000Z | raytracing/examples/invariantAndEfficiency.py | himbeles/RayTracing | 3ea14d0df25c46b9749a344723d29cc29436e539 | [
"MIT"
] | 267 | 2019-02-02T18:53:55.000Z | 2022-01-11T11:39:25.000Z | raytracing/examples/invariantAndEfficiency.py | himbeles/RayTracing | 3ea14d0df25c46b9749a344723d29cc29436e539 | [
"MIT"
] | 28 | 2019-01-30T15:40:40.000Z | 2022-03-10T22:36:53.000Z |
"""
The Lagrange invariant is a constant defining the collection efficiency of an optical system. The Lagrange
invariant is calculated using the principal and axial rays, whether the optical invariant is calculated with
another combination of rays. This code uses the optical invariant to characterize the ray transmis... | 42.636364 | 108 | 0.797441 | import envexamples # modifies path
from raytracing import *
"""
The Lagrange invariant is a constant defining the collection efficiency of an optical system. The Lagrange
invariant is calculated using the principal and axial rays, whether the optical invariant is calculated with
another combination of rays. This cod... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 |
13df5f2771a7524de6b7fc38586380e421f8cad0 | 215 | py | Python | src/result_raw.py | Aculisme/zero_algorithms | 3b5c80bdb663dade07578e010aeffd3aa501fdf1 | [
"MIT"
] | 4 | 2019-06-30T15:30:18.000Z | 2019-06-30T15:36:30.000Z | src/result_raw.py | Aculisme/zero_algorithms | 3b5c80bdb663dade07578e010aeffd3aa501fdf1 | [
"MIT"
] | null | null | null | src/result_raw.py | Aculisme/zero_algorithms | 3b5c80bdb663dade07578e010aeffd3aa501fdf1 | [
"MIT"
] | null | null | null | from .methods import Newton
from .function_examples import f_root
if __name__ == '__main__':
# change the method and function as desired
v = Newton(**f_root).solve(**f_root)
print(v) | 26.875 | 47 | 0.716279 | from .methods import Bisection, Newton, Secant
from .function_examples import f_root
if __name__ == '__main__':
# change the method and function as desired
v = Newton(**f_root).solve(**f_root)
print(v) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 0 |
cfcab80f6d377877211013744990692d255ba505 | 204 | py | Python | nonebug/mixin/__init__.py | nonebot/nonebug | 40fcd4f3eff8f4b2118e95938fabc3d77ff6819c | [
"MIT"
] | 9 | 2021-10-09T05:19:13.000Z | 2022-03-18T15:18:00.000Z | nonebug/mixin/__init__.py | AkiraXie/nonebug | 5556f94f3e85a26602fc015013e9fbdda07f8c71 | [
"MIT"
] | 2 | 2021-11-23T06:29:20.000Z | 2022-03-18T15:51:51.000Z | nonebug/mixin/__init__.py | AkiraXie/nonebug | 5556f94f3e85a26602fc015013e9fbdda07f8c71 | [
"MIT"
] | 1 | 2022-02-19T08:57:50.000Z | 2022-02-19T08:57:50.000Z | from .driver import DriverMixin as DriverMixin
from .process import ProcessMixin as ProcessMixin
from .call_api import CallApiMixin as CallApiMixin
from .dependent import DependentMixin as DependentMixin
| 40.8 | 55 | 0.862745 | from .driver import DriverMixin as DriverMixin
from .process import ProcessMixin as ProcessMixin
from .call_api import CallApiMixin as CallApiMixin
from .dependent import DependentMixin as DependentMixin
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bf143c74f7e3d07b8e12b01f9a1477c8eb4b225b | 3,471 | py | Python | GubaCrawler/GubaCrawler/settings.py | Alexanderli0816/Spiders-for-Chinese-Stock-Comments | 75224bd9b35aa2823238de28b9a7d202abd0bd17 | [
"MIT"
] | 1 | 2020-07-18T14:08:22.000Z | 2020-07-18T14:08:22.000Z | GubaCrawler/GubaCrawler/settings.py | Alexanderli0816/Spiders-for-Chinese-Stock-Comments | 75224bd9b35aa2823238de28b9a7d202abd0bd17 | [
"MIT"
] | null | null | null | GubaCrawler/GubaCrawler/settings.py | Alexanderli0816/Spiders-for-Chinese-Stock-Comments | 75224bd9b35aa2823238de28b9a7d202abd0bd17 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for GubaCrawler project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest... | 36.15625 | 103 | 0.785364 | # -*- coding: utf-8 -*-
# Scrapy settings for GubaCrawler project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fc37ef57f6ac984d04a92879ab385d15255a5e73 | 1,187 | py | Python | exec.py | developerHaneum/Progress | cb921222f9f9f04ad8c0fc8af78f4b75f72bc543 | [
"MIT"
] | null | null | null | exec.py | developerHaneum/Progress | cb921222f9f9f04ad8c0fc8af78f4b75f72bc543 | [
"MIT"
] | null | null | null | exec.py | developerHaneum/Progress | cb921222f9f9f04ad8c0fc8af78f4b75f72bc543 | [
"MIT"
] | null | null | null | # (progress)
#
# ?
print("-- Progress --")
clock = datetime.now()
line = 0
file = "File/progress_{}.md".format(clock.day) #
texts = ''
while True:
line += 1
text = input("%d: "%line)
if text == "q": #
Save(texts, file)
exit()
if text == "q!": #
isfile = Isfile(file)
... | 24.729167 | 56 | 0.443976 | # 기록장 (progress)
import pickle
from datetime import *
import os.path
# 작성함수
def Save(text, log):
with open(log, "wb") as file:
return pickle.dump(text, file)
# 파일이 존재하는가?
def Isfile(file):
if os.path.isfile(file): # True
return 1
else: # False
return -1
print("-- Progress --")
clock ... | 144 | 0 | 0 | 0 | 0 | 157 | 0 | -14 | 110 |
82dd39215f31889f78650f985a55e4b6d358dbe2 | 697 | py | Python | aoc2020/day09/part1.py | shoreofwonder/adventofcode | 15fd2f761533a48b456e510b0a59f7cbc64e8e91 | [
"MIT"
] | null | null | null | aoc2020/day09/part1.py | shoreofwonder/adventofcode | 15fd2f761533a48b456e510b0a59f7cbc64e8e91 | [
"MIT"
] | null | null | null | aoc2020/day09/part1.py | shoreofwonder/adventofcode | 15fd2f761533a48b456e510b0a59f7cbc64e8e91 | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main() | 21.121212 | 52 | 0.522238 |
def read_input():
# for puzzles where each input line is an object
with open('input.txt') as fh:
for line in fh.readlines():
yield int(line.strip())
def is_sum_of_two_in(num, buf):
for i in range(len(buf)):
for j in range(i+1,len(buf)):
if num==buf[i]+buf[j]:
... | 0 | 0 | 0 | 0 | 155 | 432 | 0 | 0 | 69 |
9ee1069e0a49ec2f308cfb595f27703f270a6808 | 3,816 | py | Python | game_engine/tiles.py | brandontrabucco/game_engine | c32fd7d6b04afb428f2c3d46c56bf31623f856bf | [
"MIT"
] | null | null | null | game_engine/tiles.py | brandontrabucco/game_engine | c32fd7d6b04afb428f2c3d46c56bf31623f856bf | [
"MIT"
] | null | null | null | game_engine/tiles.py | brandontrabucco/game_engine | c32fd7d6b04afb428f2c3d46c56bf31623f856bf | [
"MIT"
] | null | null | null | '''Author: Brandon Trabucco, Copyright 2019
Helper functions to display and run a simple game'''
####################################
# lets make some game tiles to use #
####################################
| 24.941176 | 85 | 0.60718 | '''Author: Brandon Trabucco, Copyright 2019
Helper functions to display and run a simple game'''
from game_engine.colors import *
from game_engine.drawable import Drawable
from game_engine.entity import Entity
from game_engine.interactables import *
####################################
# lets make some game tiles t... | 0 | 0 | 0 | 3,164 | 0 | 0 | 0 | 65 | 365 |
49e6e8c76fb19d8b76b327c10be6ecacb8a85a53 | 4,387 | py | Python | anomalib/core/model/k_center_greedy.py | TheaperDeng/anomalib | f1c8a6b553b82a8974ccc9fd27aa5f9b939d5917 | [
"Apache-2.0"
] | null | null | null | anomalib/core/model/k_center_greedy.py | TheaperDeng/anomalib | f1c8a6b553b82a8974ccc9fd27aa5f9b939d5917 | [
"Apache-2.0"
] | null | null | null | anomalib/core/model/k_center_greedy.py | TheaperDeng/anomalib | f1c8a6b553b82a8974ccc9fd27aa5f9b939d5917 | [
"Apache-2.0"
] | null | null | null | """This module comprises PatchCore Sampling Methods for the embedding.
- k Center Greedy Method
Returns points that minimizes the maximum distance of any point to a center.
. https://arxiv.org/abs/1708.00489
"""
| 32.496296 | 106 | 0.62708 | """This module comprises PatchCore Sampling Methods for the embedding.
- k Center Greedy Method
Returns points that minimizes the maximum distance of any point to a center.
. https://arxiv.org/abs/1708.00489
"""
from typing import List, Optional
import torch
import torch.nn.functional as F
from torch import ... | 0 | 0 | 0 | 3,962 | 0 | 0 | 0 | 67 | 136 |
672fef1691a8537c32627337c5c56d1950d05e21 | 9,458 | py | Python | CrvDatabase/CrvUtilities/myTime.py | Mu2e/CRVHardwareDB | d288a78fef89244e80e528fce946d043623ca25a | [
"Apache-2.0"
] | null | null | null | CrvDatabase/CrvUtilities/myTime.py | Mu2e/CRVHardwareDB | d288a78fef89244e80e528fce946d043623ca25a | [
"Apache-2.0"
] | null | null | null | CrvDatabase/CrvUtilities/myTime.py | Mu2e/CRVHardwareDB | d288a78fef89244e80e528fce946d043623ca25a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
## File = 'myTime.py"
#
# A python script to return the time and
# date from the computer when called.
# Written by Merrill Jenkins 2014Dec17
# Department of Physics
# University of South Alabama
# Mobile, AL 36688
# U... | 49.260417 | 114 | 0.561218 | # -*- coding: utf-8 -*-
## File = 'myTime.py"
#
# A python script to return the time and
# date from the computer when called.
# Written by Merrill Jenkins 2014Dec17
# Department of Physics
# University of South Alabama
# Mobile, AL 36688
# U... | 0 | 0 | 0 | 5,323 | 0 | 0 | 0 | -3 | 44 |
50b6c1aa906181c9736f81e540fc75e98009ba53 | 1,551 | py | Python | execnet_ssh.py | dimaqq/recipes | e424ef3ab68a38f9cabc47ee142147fa578f2c81 | [
"MIT"
] | null | null | null | execnet_ssh.py | dimaqq/recipes | e424ef3ab68a38f9cabc47ee142147fa578f2c81 | [
"MIT"
] | 1 | 2015-12-15T12:59:37.000Z | 2015-12-15T12:59:37.000Z | execnet_ssh.py | dimaqq/recipes | e424ef3ab68a38f9cabc47ee142147fa578f2c81 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import execnet, execnet.gateway, execnet.multi
execnet.multi.Group.makeportgateway = makeportgateway
execnet.makeportgateway = execnet.multi.default_group.makeportgateway
# originally posted as http://code.activestate.com/recipes/577545-monkey-patch-execnet-with-more-ssh-settings-port-i/
| 41.918919 | 117 | 0.656351 | #!/usr/bin/python
import execnet, execnet.gateway, execnet.multi
class SshPortGateway(execnet.gateway.SshGateway):
def __init__(self, sshaddress, id, remotepython = None,
ssh_config=None,
ssh_port=None,
ssh_identity=None,
ssh_batchmode=None):
self.remote... | 0 | 0 | 0 | 729 | 0 | 470 | 0 | 0 | 44 |
d1201202ecf22025525f0b8320d9ec26d1233ee1 | 1,458 | py | Python | language/gen_lang.py | HeadCrab654/Marutools | 427bea3730fb9da6e4a5cf81e244586f833df51a | [
"MIT"
] | null | null | null | language/gen_lang.py | HeadCrab654/Marutools | 427bea3730fb9da6e4a5cf81e244586f833df51a | [
"MIT"
] | null | null | null | language/gen_lang.py | HeadCrab654/Marutools | 427bea3730fb9da6e4a5cf81e244586f833df51a | [
"MIT"
] | null | null | null | src_lang = ["ja_JP","ja"]
import os
from langs import same
cd=os.path.join(os.getcwd(),"language")
#cd = "/home/maruo//program/Marutools/language"
import googletrans, json, os
os.chdir(cd)
if input(f'The lang file will be save at "{cd}". Is it OK? [y/n]')!="y": exit()
translator=googletrans.Translator()
src = json.lo... | 31.695652 | 89 | 0.537037 | src_lang = ["ja_JP","ja"]
import os
from langs import langs, same
cd=os.path.join(os.getcwd(),"language")
#cd = "/home/maruo/ドキュメント/program/Marutools/language"
import babel, googletrans, json, os, sys
os.chdir(cd)
if input(f'The lang file will be save at "{cd}". Is it OK? [y/n]')!="y": exit()
translator=googletrans.Tr... | 18 | 0 | 0 | 0 | 0 | 844 | 0 | 19 | 22 |
c6082463e10bff6dddab92e94bb14ad3f5baa382 | 3,716 | py | Python | moltres-thermal-fluids/validation-assembly/postprocessing.py | arfc/mhtgr350-benchmark | 18f7b3fe5742dabb1114c3bf7760b84590d16062 | [
"BSD-3-Clause"
] | 1 | 2021-07-24T16:20:34.000Z | 2021-07-24T16:20:34.000Z | moltres-thermal-fluids/validation-assembly/postprocessing.py | arfc/mhtgr350-benchmark | 18f7b3fe5742dabb1114c3bf7760b84590d16062 | [
"BSD-3-Clause"
] | 51 | 2020-05-26T16:17:57.000Z | 2021-02-22T20:08:59.000Z | moltres-thermal-fluids/validation-assembly/postprocessing.py | robfairh/mhtgr350-benchmark | a99d440bef498d781a1a4a193b876fc1611d1d03 | [
"BSD-3-Clause"
] | 2 | 2020-01-02T19:22:59.000Z | 2020-01-11T15:42:36.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
from matplotlib.cbook import get_sample_data
import matplotlib.patches as mpatches
def add_legends_val_fuel(figure, save):
'''
This function adds legends to the assembly model validation problem mesh.
Parameters:
-------... | 32.884956 | 77 | 0.613294 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
from matplotlib.cbook import get_sample_data
import matplotlib.patches as mpatches
def add_legends_val_fuel(figure, save):
'''
This function adds legends to the assembly model validation problem mesh.
Parameters:
-------... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
154f62db1ae15f6bc3122f16ce7c1c68774ac98d | 82 | py | Python | enthought/tvtk/indenter.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/tvtk/indenter.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/tvtk/indenter.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from __future__ import absolute_import
| 20.5 | 38 | 0.829268 | # proxy module
from __future__ import absolute_import
from tvtk.indenter import *
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 22 |
d57dd501a164f45834c0c8ea6086685a5f5ec1e2 | 3,389 | py | Python | Example Usage.py | StJude-HTB/Echo-Combination-Builder | 33eee3d8e8a80201c4dda1fe5a53406a6a763147 | [
"MIT"
] | null | null | null | Example Usage.py | StJude-HTB/Echo-Combination-Builder | 33eee3d8e8a80201c4dda1fe5a53406a6a763147 | [
"MIT"
] | null | null | null | Example Usage.py | StJude-HTB/Echo-Combination-Builder | 33eee3d8e8a80201c4dda1fe5a53406a6a763147 | [
"MIT"
] | null | null | null | import combination_builder as Combine
# 1. Set Values and Initialize a Combinations Object
map_filepath = "Example_Files\\ExamplePlatemap.txt"
concentration_file = "Example_Files\\Example_Final_Concs.csv"
save_filepath = "Example_Files\\ExampleOutput3.csv"
cmt_filepath = "Example_Files\\ExampleOutput4.cmt"
backfill_... | 32.27619 | 69 | 0.757746 | import combination_builder as Combine
# 1. Set Values and Initialize a Combinations Object
map_filepath = "Example_Files\\ExamplePlatemap.txt"
concentration_file = "Example_Files\\Example_Final_Concs.csv"
save_filepath = "Example_Files\\ExampleOutput3.csv"
cmt_filepath = "Example_Files\\ExampleOutput4.cmt"
backfill_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4381ae45f56072ce96f10960b4e1cca233ea2aba | 877 | py | Python | src/ipaparser/_code/features/backness.py | danmysak/ipa-parser | bb4f5fc1a8f95ef87793d2ffd79430a9a0ffbeaf | [
"MIT"
] | null | null | null | src/ipaparser/_code/features/backness.py | danmysak/ipa-parser | bb4f5fc1a8f95ef87793d2ffd79430a9a0ffbeaf | [
"MIT"
] | null | null | null | src/ipaparser/_code/features/backness.py | danmysak/ipa-parser | bb4f5fc1a8f95ef87793d2ffd79430a9a0ffbeaf | [
"MIT"
] | null | null | null | from .feature import assert_feature_mapping
__all__ = [
'Backness',
'BacknessCategory',
]
BACKNESS_TO_CATEGORY = assert_feature_mapping({
Backness.FRONT: BacknessCategory.ABOUT_FRONT,
Backness.NEAR_FRONT: BacknessCategory.ABOUT_FRONT,
Backness.CENTRAL: BacknessCategory.ABOUT_CENTRAL,
Backne... | 23.702703 | 72 | 0.718358 | from .feature import assert_feature_mapping, Feature
__all__ = [
'Backness',
'BacknessCategory',
]
class BacknessCategory(Feature):
ABOUT_FRONT = 'about front'
ABOUT_CENTRAL = 'about central'
ABOUT_BACK = 'about back'
class Backness(Feature):
"""
https://en.wikipedia.org/wiki/Internatio... | 0 | 0 | 0 | 408 | 0 | 0 | 0 | 9 | 46 |
72fd4dfd20221814709dbfce3780d99650dbdc35 | 1,634 | py | Python | compare_speed_test.py | NobuyukiInoue/get_tw_follower | f3fa186e6fd528e83b12b4550622ee31dffb653d | [
"MIT"
] | 1 | 2018-08-24T08:54:49.000Z | 2018-08-24T08:54:49.000Z | compare_speed_test.py | NobuyukiInoue/get_tw_follower | f3fa186e6fd528e83b12b4550622ee31dffb653d | [
"MIT"
] | null | null | null | compare_speed_test.py | NobuyukiInoue/get_tw_follower | f3fa186e6fd528e83b12b4550622ee31dffb653d | [
"MIT"
] | null | null | null | # coding: utf-8
if __name__ == "__main__":
main()
| 23.014085 | 59 | 0.5153 | # coding: utf-8
import sys
import os
from datetime import datetime
import time
from mylibs import my_fileList
from mylibs import my_csv
def main():
args = sys.argv
argc = len(args)
if argc <= 2:
print("Usage: python %s file1 file2" %(args[0]))
exit(0)
my_fileList.fileCheck(args[1])
... | 186 | 0 | 0 | 0 | 0 | 1,372 | 0 | -12 | 156 |
3a5e4f4a68ccd4bb0a7bda575d7f681b3cce5c29 | 203 | py | Python | example/logger_instance.py | Troppydash/tdlogging | eb9fdcd3851082528af4aecf167313291bff95aa | [
"MIT"
] | null | null | null | example/logger_instance.py | Troppydash/tdlogging | eb9fdcd3851082528af4aecf167313291bff95aa | [
"MIT"
] | null | null | null | example/logger_instance.py | Troppydash/tdlogging | eb9fdcd3851082528af4aecf167313291bff95aa | [
"MIT"
] | null | null | null | from tdlogging.tdlogger import TDLogger
from tdlogging.tdprinter import CoolPrinter
logger = TDLogger(alias="My Custom Logger", printer=CoolPrinter()).config()
| 29 | 83 | 0.812808 | from tdlogging.tdlogger import TDLogger
from tdlogging.tdprinter import TDPrinter, BoxPrinter, OneLinerPrinter, CoolPrinter
logger = TDLogger(alias="My Custom Logger", printer=CoolPrinter()).config()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0 |
0e21f6dbc9f58de742fd12c5bcd16fbb9899d1d3 | 1,213 | py | Python | tapispy/clients/subscribe.py | tapis-project/tapispy | fc7d5e79f8b5a73fa0517e6129f737dd753c2561 | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | tapispy/clients/subscribe.py | tapis-project/tapispy | fc7d5e79f8b5a73fa0517e6129f737dd753c2561 | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | tapispy/clients/subscribe.py | tapis-project/tapispy | fc7d5e79f8b5a73fa0517e6129f737dd753c2561 | [
"Python-2.0",
"OLDAP-2.3"
] | null | null | null | """
subscribe.py
Subscribe to TACC apis
"""
import getpass
import requests
from .exceptions import AgaveClientError
from ..utils import handle_bad_response_status_code
def clients_subscribe(username, client_... | 28.880952 | 80 | 0.605936 | """
subscribe.py
Subscribe to TACC apis
"""
import getpass
import requests
from .exceptions import AgaveClientError
from ..utils import handle_bad_response_status_code
def clients_subscribe(username, client_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c94f84642ef0bd7f67524ef1a93130334a9ec7a5 | 5,046 | py | Python | avatar/sampling.py | Julian-Theis/AVATAR | 24fcd6eaa26f413be528a160d865d5d7e49a780b | [
"MIT"
] | 7 | 2020-12-22T12:09:14.000Z | 2022-03-29T12:50:35.000Z | avatar/sampling.py | ProminentLab/AVATAR | a20c767d8739a52f538927b4ec3d528952263d5a | [
"MIT"
] | 10 | 2020-11-13T17:45:59.000Z | 2022-02-10T00:50:38.000Z | avatar/sampling.py | ProminentLab/AVATAR | a20c767d8739a52f538927b4ec3d528952263d5a | [
"MIT"
] | 2 | 2020-03-26T22:27:27.000Z | 2020-07-07T22:36:41.000Z | import argparse
import os
import tensorflow as tf
import numpy as np
from avatar.util.LoadRelgan import LoadRelgan
from avatar.util.MHGAN import MHGAN
from avatar.util.util import writeToFile, readTraces
from conf.settings import DATA_PATH
WORK_PATH = os.path.abspath(os.getcwd())
if __name__ == "__main__":
np.ra... | 39.421875 | 141 | 0.591954 | import argparse
import os
import tensorflow as tf
import numpy as np
from avatar.util.LoadRelgan import LoadRelgan
from avatar.util.MHGAN import MHGAN
from avatar.util.util import writeToFile, readTraces
from conf.settings import DATA_PATH
WORK_PATH = os.path.abspath(os.getcwd())
if __name__ == "__main__":
np.ra... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
21a4d2fc23090f4d2bc7f32818872893c449fdaf | 2,273 | py | Python | bca4abm/processors/abm/auto_ownership.py | steventrev/in_midstates_bca | f762637a0b8976fa835320cb3b31a5eb5c423dfa | [
"BSD-3-Clause"
] | null | null | null | bca4abm/processors/abm/auto_ownership.py | steventrev/in_midstates_bca | f762637a0b8976fa835320cb3b31a5eb5c423dfa | [
"BSD-3-Clause"
] | null | null | null | bca4abm/processors/abm/auto_ownership.py | steventrev/in_midstates_bca | f762637a0b8976fa835320cb3b31a5eb5c423dfa | [
"BSD-3-Clause"
] | null | null | null | # bca4abm
# See full license in LICENSE.txt.
import logging
logger = logging.getLogger(__name__)
"""
auto ownership processor
"""
| 28.061728 | 87 | 0.671359 | # bca4abm
# See full license in LICENSE.txt.
import logging
import os
import pandas as pd
from activitysim.core import config
from activitysim.core import inject
from activitysim.core import tracing
from activitysim.core import assign
from bca4abm import bca4abm as bca
from ...util.misc import add_result_columns, a... | 0 | 1,790 | 0 | 0 | 0 | 0 | 0 | 99 | 248 |
f7e070da0f23eb08611f8b580a86d465c08e6775 | 7,531 | py | Python | text_processing.py | HLTLUTB/TextAnalysis | 909c94f2b2b6ce4341fe696c69adfbdd8d7bbb4f | [
"MIT"
] | null | null | null | text_processing.py | HLTLUTB/TextAnalysis | 909c94f2b2b6ce4341fe696c69adfbdd8d7bbb4f | [
"MIT"
] | null | null | null | text_processing.py | HLTLUTB/TextAnalysis | 909c94f2b2b6ce4341fe696c69adfbdd8d7bbb4f | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
tp_es = TextProcessing(lang='es')
result_es = tp_es.nlp(
'Ahora a la gente todo le parece txico, ms si dices lo que sientes o te molestay NO, txico es quedarse '
'callado por miedo a arruinar algo. Hay que aprender a quererse primero.')
for i in result_es:
... | 42.308989 | 121 | 0.519984 | import re
import nltk
import spacy
import unicodedata
import requests
from spacy_syllables import SpacySyllables
from bs4 import BeautifulSoup
from nltk import TweetTokenizer
from spacy.lang.es import Spanish
from spacy.lang.en import English
from nltk.util import ngrams
class TextProcessing(object):
name = 'Text... | 69 | 6,311 | 0 | 364 | 0 | 0 | 0 | 30 | 265 |
52ac87c232d657f3f64271b0f50b5de7541b8d38 | 887 | py | Python | migrations/versions/0208_fix_unique_index.py | tlwr/notifications-api | 88a6b7729edb9be41ce3e7c027f1452b7b6d00d2 | [
"MIT"
] | 51 | 2016-04-03T23:36:17.000Z | 2022-03-21T20:04:52.000Z | migrations/versions/0208_fix_unique_index.py | tlwr/notifications-api | 88a6b7729edb9be41ce3e7c027f1452b7b6d00d2 | [
"MIT"
] | 1,335 | 2015-12-15T14:28:50.000Z | 2022-03-30T16:24:27.000Z | migrations/versions/0208_fix_unique_index.py | tlwr/notifications-api | 88a6b7729edb9be41ce3e7c027f1452b7b6d00d2 | [
"MIT"
] | 30 | 2016-01-08T19:05:32.000Z | 2021-12-20T16:37:23.000Z | """
Revision ID: 0208_fix_unique_index
Revises: 0207_set_callback_history_type
Create Date: 2018-07-25 13:55:24.941794
"""
revision = '84c3b6eb16b3'
down_revision = '0207_set_callback_history_type'
| 36.958333 | 117 | 0.793687 | """
Revision ID: 0208_fix_unique_index
Revises: 0207_set_callback_history_type
Create Date: 2018-07-25 13:55:24.941794
"""
from alembic import op
revision = '84c3b6eb16b3'
down_revision = '0207_set_callback_history_type'
def upgrade():
op.create_unique_constraint('uix_service_callback_type', 'service_callback_... | 0 | 0 | 0 | 0 | 0 | 615 | 0 | 1 | 68 |
93456449dc042f5f46459ee1062a64d1c629d322 | 291 | py | Python | 1768.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 6 | 2021-04-13T00:33:43.000Z | 2022-02-10T10:23:59.000Z | 1768.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | null | null | null | 1768.py | heltonricardo/URI | 160cca22d94aa667177c9ebf2a1c9864c5e55b41 | [
"MIT"
] | 3 | 2021-03-23T18:42:24.000Z | 2022-02-10T10:24:07.000Z | while True:
try:
n = int(input())
except EOFError: break
lim = int(n // 2)
for i in range(1, n+1, 2):
print(' ' * lim, end='')
lim -= 1
print('*' * i)
print((int(n // 2) * ' ') + '*')
print((int(n // 2) - 1) * ' ' + '***')
print()
| 22.384615 | 42 | 0.378007 | while True:
try:
n = int(input())
except EOFError: break
lim = int(n // 2)
for i in range(1, n+1, 2):
print(' ' * lim, end='')
lim -= 1
print('*' * i)
print((int(n // 2) * ' ') + '*')
print((int(n // 2) - 1) * ' ' + '***')
print()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3e1c020bdac07485f2ec00f3cc69ee79f0b9de5d | 2,521 | py | Python | Natalie Assistant/utils/Hotword_Detector.py | JafarAbbas33/Natalie-Assistant-Windows-x86- | fb9cb716d4da5abae1cd5e1fe8bd7509b3068e9d | [
"Apache-2.0"
] | null | null | null | Natalie Assistant/utils/Hotword_Detector.py | JafarAbbas33/Natalie-Assistant-Windows-x86- | fb9cb716d4da5abae1cd5e1fe8bd7509b3068e9d | [
"Apache-2.0"
] | null | null | null | Natalie Assistant/utils/Hotword_Detector.py | JafarAbbas33/Natalie-Assistant-Windows-x86- | fb9cb716d4da5abae1cd5e1fe8bd7509b3068e9d | [
"Apache-2.0"
] | null | null | null |
import time
from pynput import keyboard as kb
from pynput.keyboard import Listener
from pynput.keyboard import Controller as kb2
kb = kb2()
driver = None
listener = Listener(on_release=wait_for_esc)
listener.start()
if __name__ == "__main__":
initialize_driver()
while True:
... | 27.107527 | 128 | 0.645775 |
import sys, os, time
from selenium import webdriver
from selenium.webdriver.chrome.options import *
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
import time
from pynput import keyboard as kb
fro... | 6 | 0 | 0 | 0 | 0 | 1,787 | 0 | 130 | 242 |
65d097834349dee08312b5bd4433faeac557c837 | 3,664 | py | Python | problems/12/Solver.py | tmct/adventOfCode2016 | bd5699ca179b873f9da01514903b1dd493a46b7b | [
"MIT"
] | null | null | null | problems/12/Solver.py | tmct/adventOfCode2016 | bd5699ca179b873f9da01514903b1dd493a46b7b | [
"MIT"
] | null | null | null | problems/12/Solver.py | tmct/adventOfCode2016 | bd5699ca179b873f9da01514903b1dd493a46b7b | [
"MIT"
] | null | null | null |
ABCD = 'abcd'
copy_regex = r'cpy (\S+) (\S+)'
inc_regex = r'inc ([abcd])'
dec_regex = r'dec ([abcd])'
jump_regex = r'jnz (\S+) (-?\d+)'
| 33.925926 | 96 | 0.580513 | import re
ABCD = 'abcd'
copy_regex = r'cpy (\S+) (\S+)'
inc_regex = r'inc ([abcd])'
dec_regex = r'dec ([abcd])'
jump_regex = r'jnz (\S+) (-?\d+)'
class Solver:
def __init__(self):
self.registers = [0, 0, 0, 0]
self.instructions = None
self.current_instruction_index = 0
self.number... | 0 | 0 | 0 | 3,493 | 0 | 0 | 0 | -12 | 45 |
ad6eb6abd34ea03303229fcbef80df0fde370882 | 8,810 | py | Python | app/user/routes.py | NiketanG/TF_Quiz | 0dc91db5df4cae3035aea84e9baf969309b6ad93 | [
"MIT"
] | 1 | 2020-07-25T03:26:45.000Z | 2020-07-25T03:26:45.000Z | app/user/routes.py | NiketanG/TF_Quiz | 0dc91db5df4cae3035aea84e9baf969309b6ad93 | [
"MIT"
] | 26 | 2020-05-29T23:22:57.000Z | 2021-05-25T19:57:02.000Z | app/user/routes.py | NiketanG/TF_Quiz | 0dc91db5df4cae3035aea84e9baf969309b6ad93 | [
"MIT"
] | null | null | null | from flask import (Blueprint)
user = Blueprint("user", __name__)
| 30.37931 | 88 | 0.600795 | from flask import (
render_template,
jsonify,
Blueprint,
redirect,
url_for,
flash,
request,
session,
send_file,
send_from_directory,
current_app as app,
)
from flask_socketio import leave_room, join_room
from flask_login import login_required, current_user, logout_user, login... | 0 | 7,977 | 0 | 0 | 0 | 0 | 0 | 304 | 451 |
fe618e7e320db3a034eb4b4abc24eafce8284bbf | 11,435 | py | Python | isympy.py | venimaster/sympy | d68f2996b04ab7aa214c05d8a1ae86a83ac43cc4 | [
"BSD-3-Clause"
] | 2 | 2018-12-05T02:30:43.000Z | 2020-11-14T01:43:15.000Z | isympy.py | venimaster/sympy | d68f2996b04ab7aa214c05d8a1ae86a83ac43cc4 | [
"BSD-3-Clause"
] | 1 | 2017-10-23T06:56:43.000Z | 2017-10-23T06:56:43.000Z | isympy.py | venimaster/sympy | d68f2996b04ab7aa214c05d8a1ae86a83ac43cc4 | [
"BSD-3-Clause"
] | 1 | 2020-01-01T19:49:22.000Z | 2020-01-01T19:49:22.000Z | # XXX: Don't put a newline here, or it will add an extra line with
# isympy --help
# |
# v
"""Python shell for SymPy.
This is just a normal Python shell (IPython shell if you have the
IPython package installed), that executes the following commands for
the user:
>>> from __future__ import division
>>> from ... | 33.049133 | 110 | 0.65282 | # XXX: Don't put a newline here, or it will add an extra line with
# isympy --help
# |
# v
"""Python shell for SymPy.
This is just a normal Python shell (IPython shell if you have the
IPython package installed), that executes the following commands for
the user:
>>> from __future__ import division
>>> from ... | 0 | 0 | 0 | 0 | 0 | 5,044 | 0 | -23 | 68 |
3e9f24e06981b0ecd4283ddd8131951990eded76 | 252 | py | Python | src/zulu/__init__.py | dgilland/zulu | f911dd34d3ad2487edf4bb8b5c751eaef25e4f9f | [
"MIT"
] | 53 | 2016-07-18T03:13:36.000Z | 2022-02-08T01:57:15.000Z | src/zulu/__init__.py | dgilland/zulu | f911dd34d3ad2487edf4bb8b5c751eaef25e4f9f | [
"MIT"
] | 25 | 2016-07-26T17:49:17.000Z | 2020-01-15T02:46:32.000Z | src/zulu/__init__.py | dgilland/zulu | f911dd34d3ad2487edf4bb8b5c751eaef25e4f9f | [
"MIT"
] | 2 | 2016-07-21T02:01:05.000Z | 2020-01-14T11:46:43.000Z | """The zulu library."""
__version__ = "2.0.0"
| 25.2 | 67 | 0.757937 | """The zulu library."""
__version__ = "2.0.0"
from .api import create, now, parse, parse_delta, range, span_range
from .delta import Delta, to_seconds
from .parser import ISO8601, TIMESTAMP, ParseError
from .timer import Timer
from .zulu import Zulu
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 111 |
4b049ccd70302ff5e5b678152937325762c83e11 | 2,363 | py | Python | data/PerspectiveAPI/api.py | andy-techen/better-social-media | 4cd85afe0f39447de5313cc3d70789982da18dd9 | [
"MIT"
] | null | null | null | data/PerspectiveAPI/api.py | andy-techen/better-social-media | 4cd85afe0f39447de5313cc3d70789982da18dd9 | [
"MIT"
] | null | null | null | data/PerspectiveAPI/api.py | andy-techen/better-social-media | 4cd85afe0f39447de5313cc3d70789982da18dd9 | [
"MIT"
] | null | null | null | from googleapiclient import discovery
import os
from dotenv import load_dotenv
load_dotenv()
# # # Testing connection
# def implicit():
# from google.cloud import storage
# # If you don't specify credentials when constructing the client, the
# # client library will look for credentials in the environment.... | 31.506667 | 107 | 0.635633 | from googleapiclient import discovery
import json
import os
from dotenv import load_dotenv
import time
load_dotenv()
# # # Testing connection
# def implicit():
# from google.cloud import storage
# # If you don't specify credentials when constructing the client, the
# # client library will look for credent... | 0 | 0 | 0 | 0 | 0 | 1,145 | 0 | -20 | 67 |
dcedffa3d3a79e33199c8be73411410ff7e27faa | 15,896 | py | Python | genshin/client/components/base.py | thesadru/genshin.py | 806b8d0dd059a06605e66dead917fdf550a552bc | [
"MIT"
] | 63 | 2021-10-04T19:53:54.000Z | 2022-03-30T07:21:03.000Z | genshin/client/components/base.py | thesadru/genshin.py | 806b8d0dd059a06605e66dead917fdf550a552bc | [
"MIT"
] | 17 | 2021-11-16T20:42:52.000Z | 2022-03-31T10:11:52.000Z | genshin/client/components/base.py | thesadru/genshin.py | 806b8d0dd059a06605e66dead917fdf550a552bc | [
"MIT"
] | 10 | 2021-10-16T22:41:41.000Z | 2022-02-19T17:55:23.000Z | """Base ABC Client."""
__all__ = ["BaseClient"]
| 33.821277 | 148 | 0.606631 | """Base ABC Client."""
import abc
import asyncio
import base64
import json
import logging
import os
import typing
import urllib.parse
import aiohttp.typedefs
import yarl
from genshin import constants, errors, types, utility
from genshin.client import cache as client_cache
from genshin.client import manager, routes
fr... | 0 | 4,220 | 6,608 | 4,543 | 0 | 0 | 0 | 98 | 377 |
480820a2e79a81a714cb12022eafa163d41b1b42 | 1,424 | py | Python | tests/test_kotoba_player_py.py | eteeeeeerminal/kotoba-player-py | 7eaf97fd62114fdf744e1442b6267a4bcf931bff | [
"MIT"
] | null | null | null | tests/test_kotoba_player_py.py | eteeeeeerminal/kotoba-player-py | 7eaf97fd62114fdf744e1442b6267a4bcf931bff | [
"MIT"
] | 1 | 2021-05-16T13:58:21.000Z | 2021-05-16T14:01:54.000Z | tests/test_kotoba_player_py.py | eteeeeeerminal/kotoba-player-py | 7eaf97fd62114fdf744e1442b6267a4bcf931bff | [
"MIT"
] | null | null | null | from kotoba_player_py.exceptions import InputFormatError | 33.116279 | 91 | 0.693118 | from kotoba_player_py.exceptions import InputFormatError
import pytest
from kotoba_player_py import (
__version__, KotobaPlayer, InputFormatError
)
from kotoba_player_py.api import (
mask_noun_word
)
def test_version():
assert __version__ == '0.1.0'
@pytest.fixture
def player():
return KotobaPlayer()... | 390 | 34 | 0 | 0 | 0 | 937 | 0 | 85 | 182 |
0631b9526d2ea5ec291656b3480b1fabbc14772e | 4,572 | py | Python | Etc/dt_example.py | wahur666/VisualLogo | 36ff0e0108882a4c45e1dd7d4454d573d4439dcd | [
"Apache-2.0"
] | null | null | null | Etc/dt_example.py | wahur666/VisualLogo | 36ff0e0108882a4c45e1dd7d4454d573d4439dcd | [
"Apache-2.0"
] | null | null | null | Etc/dt_example.py | wahur666/VisualLogo | 36ff0e0108882a4c45e1dd7d4454d573d4439dcd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
This example mirrors the 8-direction movement example here:
https://github.com/Mekire/meks-pygame-samples/blob/master/eight_dir_move.py
The difference is that this example uses delta time.
Delta time is a method of assuring that updates are unaffected by
changes in framerate.
"""
import os
... | 29.882353 | 79 | 0.594269 | #!/usr/bin/env python
"""
This example mirrors the 8-direction movement example here:
https://github.com/Mekire/meks-pygame-samples/blob/master/eight_dir_move.py
The difference is that this example uses delta time.
Delta time is a method of assuring that updates are unaffected by
changes in framerate.
"""
import os
... | 0 | 0 | 0 | 3,594 | 0 | 0 | 0 | 0 | 46 |
7e2e4fd2a627180d3f3c6d71c557a343f69f0a53 | 34 | py | Python | app/contests/tests/code_test_files/trash.py | uva-slp/pico | 3a4f20ea5e9359e2e4b770442fa59ae8e0bf30ed | [
"MIT"
] | 1 | 2017-09-20T23:29:59.000Z | 2017-09-20T23:29:59.000Z | app/contests/tests/code_test_files/trash.py | uva-slp/pico | 3a4f20ea5e9359e2e4b770442fa59ae8e0bf30ed | [
"MIT"
] | null | null | null | app/contests/tests/code_test_files/trash.py | uva-slp/pico | 3a4f20ea5e9359e2e4b770442fa59ae8e0bf30ed | [
"MIT"
] | null | null | null | print(
if __name == "man:
BANANA
| 6.8 | 18 | 0.647059 | print(
if __name == "man:
BANANA
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
fb4dd0ead0a76ea3d1213b56dbed70f0035fc2b0 | 1,808 | py | Python | projectparallelprogrammeren/montecarlo_v0.py | fury106/ProjectParallelProgrammeren | fd3c198edaca5bcb19d8e665561e8cd14824e894 | [
"MIT"
] | null | null | null | projectparallelprogrammeren/montecarlo_v0.py | fury106/ProjectParallelProgrammeren | fd3c198edaca5bcb19d8e665561e8cd14824e894 | [
"MIT"
] | null | null | null | projectparallelprogrammeren/montecarlo_v0.py | fury106/ProjectParallelProgrammeren | fd3c198edaca5bcb19d8e665561e8cd14824e894 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Module projectparallelprogrammeren.montecarlo_v0
=================================================================
simulatie v0: alles in Python (op genereren van de getallen na)
"""
import math
from statistics import stdev
from projectparallelprogrammeren import atomen
from et_stopwatch... | 31.172414 | 116 | 0.714049 | # -*- coding: utf-8 -*-
"""
Module projectparallelprogrammeren.montecarlo_v0
=================================================================
simulatie v0: alles in Python (op genereren van de getallen na)
"""
import math
import numpy as np
from statistics import stdev
import projectparallelprogrammeren
from proje... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 110 |
fb6e37f128873af57493c80c3f8cfa9a2e7b7cbc | 5,467 | py | Python | qiniuManager/test/command_test.py | hellflame/qiniu | 8f40c70fd6eb3178ac1410ca46f3584661cf994b | [
"MIT"
] | null | null | null | qiniuManager/test/command_test.py | hellflame/qiniu | 8f40c70fd6eb3178ac1410ca46f3584661cf994b | [
"MIT"
] | null | null | null | qiniuManager/test/command_test.py | hellflame/qiniu | 8f40c70fd6eb3178ac1410ca46f3584661cf994b | [
"MIT"
] | null | null | null | # coding=utf8
import unittest
if __name__ == '__main__':
unittest.main(verbosity=2)
| 41.416667 | 113 | 0.659777 | # coding=utf8
import unittest
import string
import random
import shlex
from qiniuManager.run import *
class ParserTest(unittest.TestCase):
def setUp(self):
_, self.parser = parser()
@staticmethod
def generate_random_target(length):
target = string.ascii_letters + string.digits + ' '
... | 0 | 206 | 0 | 5,074 | 0 | 0 | 0 | -16 | 112 |
c95a2270f100d93dd3f3e5f2ca7cac7015dd6a7a | 173 | py | Python | phashlib/__init__.py | fake-name/phashlib | 80acf8a8358452952782c120f063f767bf703196 | [
"BSD-2-Clause"
] | null | null | null | phashlib/__init__.py | fake-name/phashlib | 80acf8a8358452952782c120f063f767bf703196 | [
"BSD-2-Clause"
] | null | null | null | phashlib/__init__.py | fake-name/phashlib | 80acf8a8358452952782c120f063f767bf703196 | [
"BSD-2-Clause"
] | null | null | null | # scanner init | 24.714286 | 33 | 0.83237 | # scanner init
from .hashFile import ImageHash
from .hashFile import phash
from .hashFile import hashFile
from .hashFile import getHashDict
from .hashFile import getMd5Hash | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 111 |
36df6bbfb43aa0bf86f90c7e3f073796ecb7d4af | 1,054 | py | Python | Q071.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | Q071.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | Q071.py | Linchin/python_leetcode_git | 3d08ab04bbdbd2ce268f33c501fbb149662872c7 | [
"MIT"
] | null | null | null | """
71
medium
simplify path
"""
path1 = "/home/"
path2 = "/../"
path3 = "/home//foo/"
path4 = "/a/./b/../../c/"
path5 = "/../"
path6 = "/..."
path7 = "/a//b////c/d//././/.."
sol = Solution()
print(sol.simplifyPath(path7))
| 20.269231 | 53 | 0.393738 | """
71
medium
simplify path
"""
class Solution:
def simplifyPath(self, path: str) -> str:
# into the maze of corner cases
# wrong answers
stack = []
curr = ""
dots = ""
for i in range(len(path)):
if path[i] == "/":
if curr:
... | 0 | 0 | 0 | 802 | 0 | 0 | 0 | 0 | 23 |
984fde5f3dfef9e521720e9272a43d4f529ce4f7 | 24,768 | py | Python | tests/test_31_auth_service.py | asymworks/jadetree-backend | 5764d9971ef3fdc85b0b9cd51fad82076f464ae4 | [
"BSD-3-Clause"
] | 7 | 2021-11-02T05:58:58.000Z | 2022-03-04T22:16:20.000Z | tests/test_31_auth_service.py | asymworks/jadetree-backend | 5764d9971ef3fdc85b0b9cd51fad82076f464ae4 | [
"BSD-3-Clause"
] | 5 | 2021-01-27T14:18:01.000Z | 2022-03-04T22:03:49.000Z | tests/test_31_auth_service.py | asymworks/jadetree-backend | 5764d9971ef3fdc85b0b9cd51fad82076f464ae4 | [
"BSD-3-Clause"
] | null | null | null | """Test Authentication and Authorization Service."""
import datetime
import re
from arrow import utcnow
from flask import current_app
import pytest # noqa: F401
from jadetree.domain.models import User
from jadetree.exc import AuthError, DomainError, JwtPayloadError, NoResults
from jadetree.mail import mail
from jad... | 37.81374 | 116 | 0.691497 | """Test Authentication and Authorization Service."""
import datetime
import re
from arrow import utcnow
from flask import current_app
import pytest # noqa: F401
from jadetree.domain.models import User
from jadetree.exc import AuthError, DomainError, JwtPayloadError, NoResults
from jadetree.mail import mail
from jad... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5a3558a4e4e85fe8c19de89983db6a8b9d4b653a | 168 | py | Python | Others/nikkei/nikkei2019-qual/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | Others/nikkei/nikkei2019-qual/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | Others/nikkei/nikkei2019-qual/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
if __name__ == '__main__':
main()
| 15.272727 | 40 | 0.446429 | # -*- coding: utf-8 -*-
def main():
n, a, b = map(int, input().split())
print(min(a, b), max(0, a + b - n))
if __name__ == '__main__':
main()
| 0 | 0 | 0 | 0 | 0 | 72 | 0 | 0 | 25 |
2cecf13f2e03af177c86a12e714fa35166b94c11 | 227 | py | Python | teams/admin.py | alex-phillips/snipt | e47a632316362b4df76bf389e7c74acdee5ba4e1 | [
"MIT"
] | null | null | null | teams/admin.py | alex-phillips/snipt | e47a632316362b4df76bf389e7c74acdee5ba4e1 | [
"MIT"
] | null | null | null | teams/admin.py | alex-phillips/snipt | e47a632316362b4df76bf389e7c74acdee5ba4e1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from teams.models import Team
admin.site.register(Team, TeamAdmin)
| 22.7 | 59 | 0.718062 | from django.contrib import admin
from teams.models import Team
class TeamAdmin(admin.ModelAdmin):
list_display = ('name', 'owner', 'created', 'modified')
ordering = ('-created',)
admin.site.register(Team, TeamAdmin)
| 0 | 0 | 0 | 102 | 0 | 0 | 0 | 0 | 23 |
277c4d993e1f5e5760f1cdc1bfe7c05ee5ed8cb5 | 421 | py | Python | examples/ipc/server.py | Oxel40/python-helpers | eb81073f7abe575b86c9c96f7b669060f7ab564b | [
"MIT"
] | null | null | null | examples/ipc/server.py | Oxel40/python-helpers | eb81073f7abe575b86c9c96f7b669060f7ab564b | [
"MIT"
] | null | null | null | examples/ipc/server.py | Oxel40/python-helpers | eb81073f7abe575b86c9c96f7b669060f7ab564b | [
"MIT"
] | null | null | null | import helpers.ipc as ipc
address = ('localhost', 6000)
router = ipc.Router(address, authkey=b'test')
router.serve()
| 13.15625 | 45 | 0.646081 | import helpers.ipc as ipc
import numpy as np
from enum import Enum
class en(Enum):
A = 1
B = 2
C = 3
address = ('localhost', 6000)
router = ipc.Router(address, authkey=b'test')
@router.expose
def test(one, two, three):
return (three, two, one)
@router.expose
def arrmax(arr: np.ndarray):
retu... | 0 | 139 | 0 | 24 | 0 | 0 | 0 | -3 | 136 |
4c501b1d014d183845eabbe6c2f8385cfd2ebd9d | 1,593 | py | Python | Problem_6/problem_6.py | vaxherra/algorithmic-problems | 8966a220bc5ee4c82f01ff81f95a464ad43fc660 | [
"MIT"
] | null | null | null | Problem_6/problem_6.py | vaxherra/algorithmic-problems | 8966a220bc5ee4c82f01ff81f95a464ad43fc660 | [
"MIT"
] | null | null | null | Problem_6/problem_6.py | vaxherra/algorithmic-problems | 8966a220bc5ee4c82f01ff81f95a464ad43fc660 | [
"MIT"
] | null | null | null | import random
def get_min_max(ints):
"""
Return a tuple(min, max) out of list of unsorted integers.
Args:
ints(list): list of integers containing one or more integers
"""
if len(ints) == 0:
return None, None
min_v, max_v = ints[0], ints[0]
for num in ints[1:]:
# ... | 23.776119 | 89 | 0.608286 | import random
def get_min_max(ints):
"""
Return a tuple(min, max) out of list of unsorted integers.
Args:
ints(list): list of integers containing one or more integers
"""
if len(ints) == 0:
return None, None
min_v, max_v = ints[0], ints[0]
for num in ints[1:]:
# ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
de755d841b0851b65aa5223ebc2104ea54d12c09 | 677 | py | Python | leetcode/3.Longest-Substring-Without-Repeating-Characters/Longest Substring Without Repeating Characters.py | chengjinlee/leetcode | 6bd8dc71ea406536fc1b53aa10f1e967d002ee7a | [
"MIT"
] | null | null | null | leetcode/3.Longest-Substring-Without-Repeating-Characters/Longest Substring Without Repeating Characters.py | chengjinlee/leetcode | 6bd8dc71ea406536fc1b53aa10f1e967d002ee7a | [
"MIT"
] | null | null | null | leetcode/3.Longest-Substring-Without-Repeating-Characters/Longest Substring Without Repeating Characters.py | chengjinlee/leetcode | 6bd8dc71ea406536fc1b53aa10f1e967d002ee7a | [
"MIT"
] | null | null | null | #Codeing-Utf8
| 32.238095 | 64 | 0.435746 | #Codeing-Utf8
class Solution(object):
def lengthOfLongestSubstring(self, s):
"""
:type s: str
:rtype: int
"""
start = 0 #记录子字符串的起点
maxlen = #记录最长子字符串的长度
dict = {} #用字典记录所有不重复的字符
for i in range(len(s)): #进行赋值
di... | 222 | 0 | 0 | 567 | 0 | 0 | 0 | 0 | 22 |
0589bed8eb7ebb2ae174ce5e263299dc945d7b37 | 1,908 | py | Python | src/wrapper/joystick.py | KrbDevelopment/LCD-Matrix | f5064ace1bb42b7e8cacbf91434bf0064a6812a6 | [
"MIT"
] | null | null | null | src/wrapper/joystick.py | KrbDevelopment/LCD-Matrix | f5064ace1bb42b7e8cacbf91434bf0064a6812a6 | [
"MIT"
] | null | null | null | src/wrapper/joystick.py | KrbDevelopment/LCD-Matrix | f5064ace1bb42b7e8cacbf91434bf0064a6812a6 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
| 30.285714 | 85 | 0.643606 | import RPi.GPIO as GPIO
class Keymap:
"""BCM keymap for joystick buttons"""
UP = 6
DOWN = 19
LEFT = 5
RIGHT = 26
PRESS = 13
class Joystick:
def __init__(self, up, down, left, right, click):
self.up = up
self.down = down
self.left = left
self.right = right
... | 0 | 0 | 0 | 1,836 | 0 | 0 | 0 | 0 | 46 |
cc11208d8f68e92d2bf0b7a5d45a04af655caaf3 | 6,719 | py | Python | nrf5_mesh/tools/dfu/bootloader_verify.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 15 | 2019-02-25T20:25:29.000Z | 2021-02-27T17:57:38.000Z | nrf5_mesh/tools/dfu/bootloader_verify.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 3 | 2020-02-21T22:35:38.000Z | 2020-10-05T02:25:30.000Z | nrf5_mesh/tools/dfu/bootloader_verify.py | aberke/city-science-bike-swarm | 797e803014fc0c3878016309a62460a736140958 | [
"MIT"
] | 5 | 2019-06-29T21:03:57.000Z | 2021-06-15T06:16:20.000Z | # Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | 37.327778 | 117 | 0.656943 | # Copyright (c) 2010 - 2020, Nordic Semiconductor ASA
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | 0 | 0 | 0 | 0 | 0 | 4,286 | 0 | -37 | 272 |
f73c725d0cdd3666e8953a2d622f89e473ce65e4 | 1,166 | py | Python | ms_deisotope/spectrum_graph.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 18 | 2017-09-01T12:26:12.000Z | 2022-02-23T02:31:29.000Z | ms_deisotope/spectrum_graph.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 19 | 2017-03-12T20:40:36.000Z | 2022-03-31T22:50:47.000Z | ms_deisotope/spectrum_graph.py | mstim/ms_deisotope | 29f4f466e92e66b65a2d21eca714aa627caa21db | [
"Apache-2.0"
] | 14 | 2016-05-06T02:25:30.000Z | 2022-03-31T14:40:06.000Z | from ms_deisotope._c.spectrum_graph import (MassWrapper)
amino_acids = [
MassWrapper('G', 57.02146372057),
MassWrapper('A', 71.03711378471),
MassWrapper('S', 87.03202840427),
MassWrapper('P', 97.05276384884999),
MassWrapper('V', 99.06841391299),
MassWrapper('T', 101.04767846841),
MassWrappe... | 30.684211 | 74 | 0.680103 | from ms_deisotope._c.spectrum_graph import (
PathFinder,
MassWrapper,
PeakGroupNode,
PeakNode,
NodeBase,
Path,
SpectrumGraph)
amino_acids = [
MassWrapper('G', 57.02146372057),
MassWrapper('A', 71.03711378471),
MassWrapper('S', 87.03202840427),
MassWrapper('P', 97.05276384884... | 0 | 0 | 0 | 0 | 0 | 234 | 0 | 97 | 23 |
64b796283abd0ea351e03bd6097b94b4b6fdc97a | 3,708 | py | Python | benchmarking_platform_p3/configuration_file_I.py | mc-robinson/benchmarking_platform_p23 | 200e6883cab30ab3dd2ddba0ecc48d1c570e8e2c | [
"Unlicense"
] | 5 | 2020-03-02T18:34:14.000Z | 2021-08-28T07:49:16.000Z | benchmarking_platform_p3/configuration_file_I.py | mc-robinson/benchmarking_platform_p23 | 200e6883cab30ab3dd2ddba0ecc48d1c570e8e2c | [
"Unlicense"
] | null | null | null | benchmarking_platform_p3/configuration_file_I.py | mc-robinson/benchmarking_platform_p23 | 200e6883cab30ab3dd2ddba0ecc48d1c570e8e2c | [
"Unlicense"
] | 1 | 2020-08-11T03:02:29.000Z | 2020-08-11T03:02:29.000Z | #
# $Id$
#
# configuration file for benchmarking platform
#
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * R... | 21.433526 | 76 | 0.639428 | #
# $Id$
#
# configuration file for benchmarking platform
#
#
# Copyright (c) 2013, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * R... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
be2752c1c105c9e85d125d843959e412ce28c2f2 | 238 | py | Python | test.py | jmhuer/DJITelloAutonomy2 | d276f7727d3a14fadb54c04d0771839bbe3ae14c | [
"MIT"
] | null | null | null | test.py | jmhuer/DJITelloAutonomy2 | d276f7727d3a14fadb54c04d0771839bbe3ae14c | [
"MIT"
] | null | null | null | test.py | jmhuer/DJITelloAutonomy2 | d276f7727d3a14fadb54c04d0771839bbe3ae14c | [
"MIT"
] | null | null | null | import cv2
camera = cv2.VideoCapture(0)
camera.set(3, 1280)
while True:
ret, image = camera.read()
cv2.imshow('Webcam', image)
if cv2.waitKey(0) & 0xFF == ord('q'):
break
camera.release()
cv2.destroyAllWindows()
| 14 | 41 | 0.634454 | import cv2
camera = cv2.VideoCapture(0)
camera.set(3, 1280)
while True:
ret, image = camera.read()
cv2.imshow('Webcam', image)
if cv2.waitKey(0) & 0xFF == ord('q'):
break
camera.release()
cv2.destroyAllWindows()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d073f6b78b438a73b30cc80d16ab50c08aaa3b4f | 959 | py | Python | ml/statistics.py | vibour/emotion-theme-recognition | 9d67d88d3b672006379114d474a1aaef6538b9be | [
"MIT"
] | 7 | 2021-11-23T15:41:21.000Z | 2022-03-16T08:10:26.000Z | ml/statistics.py | vibour/emotion-theme-recognition | 9d67d88d3b672006379114d474a1aaef6538b9be | [
"MIT"
] | null | null | null | ml/statistics.py | vibour/emotion-theme-recognition | 9d67d88d3b672006379114d474a1aaef6538b9be | [
"MIT"
] | null | null | null | """Calculate mean and std of data"""
import math
from typing import Dict
import torch
from tqdm import tqdm
import ml.utils
from ml.experiment import Experiment
def calculate_stats(exp: Experiment) -> Dict[str, float]:
"""Calculate mean and std of data"""
avg = ml.utils.RunningAverage()
sq_avg = ml.ut... | 23.975 | 68 | 0.586027 | """Calculate mean and std of data"""
import math
from typing import Dict
import torch
from tqdm import tqdm
import ml.utils
from ml.experiment import Experiment
def calculate_stats(exp: Experiment) -> Dict[str, float]:
"""Calculate mean and std of data"""
avg = ml.utils.RunningAverage()
sq_avg = ml.ut... | 0 | 0 | 0 | 0 | 0 | 16 | 0 | 0 | 31 |
7841965a569d4d2b02cd4d588131dbf92bae4896 | 822 | py | Python | day04/partone.py | ephraim/adventofcode | 52bc215b29c120d7c6f74413acb9091503d6f6ec | [
"MIT"
] | null | null | null | day04/partone.py | ephraim/adventofcode | 52bc215b29c120d7c6f74413acb9091503d6f6ec | [
"MIT"
] | null | null | null | day04/partone.py | ephraim/adventofcode | 52bc215b29c120d7c6f74413acb9091503d6f6ec | [
"MIT"
] | null | null | null | import os
import sys
if __name__ == "__main__":
data = None
wdir = os.path.dirname(sys.argv[0])
with open(os.path.join(wdir, "input.txt")) as f:
data = f.readlines()
passports = 0
pp = {}
for d in data:
d = d.strip("\n")
if not d:
if validate(pp):
... | 21.631579 | 68 | 0.454988 | import os
import sys
import re
if __name__ == "__main__":
data = None
wdir = os.path.dirname(sys.argv[0])
with open(os.path.join(wdir, "input.txt")) as f:
data = f.readlines()
def validate(pp):
needed = [ "byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid" ]
valid = True
fo... | 0 | 0 | 0 | 0 | 0 | 220 | 0 | -12 | 49 |
6fc139c628fff968c9bbedb45a1d87648ceaa785 | 1,226 | py | Python | 90.py | StormyaP/Voith_Hackathon | 3e7fdca617bec41172892b5960fa394c9a7643dc | [
"MIT"
] | null | null | null | 90.py | StormyaP/Voith_Hackathon | 3e7fdca617bec41172892b5960fa394c9a7643dc | [
"MIT"
] | null | null | null | 90.py | StormyaP/Voith_Hackathon | 3e7fdca617bec41172892b5960fa394c9a7643dc | [
"MIT"
] | null | null | null |
if __name__ == '__main__':
main()
print("End") | 35.028571 | 88 | 0.588907 | import csv
import numpy as np
def main():
filename = 'data/test_bench_validate.csv'
with open(filename, newline='') as csvfile:
testbench_list = list(csv.reader(csvfile, delimiter=',', quotechar='|'))
filename = 'data/assembly_validate.csv'
with open(filename, newline='') as csvfile:
... | 0 | 0 | 0 | 0 | 0 | 1,116 | 0 | -14 | 67 |
1820e413024564a4aab74a55fd9bc9b780e0d8f1 | 3,035 | py | Python | src/others/JVMDescriptorToJSON.py | RRua/AnaDroid | 7417b117a50149a6f210cd334de71b814db8d6c7 | [
"MIT"
] | 7 | 2019-01-17T18:37:59.000Z | 2020-11-16T13:42:29.000Z | src/others/JVMDescriptorToJSON.py | RRua/AnaDroid | 7417b117a50149a6f210cd334de71b814db8d6c7 | [
"MIT"
] | null | null | null | src/others/JVMDescriptorToJSON.py | RRua/AnaDroid | 7417b117a50149a6f210cd334de71b814db8d6c7 | [
"MIT"
] | null | null | null |
import sys
knownRetTypes = {
"V" : "Void" ,
"Z" : "boolean",
"B" : "byte",
"S" : "short",
"C" : "char",
"I" : "int",
"J" : "long",
"F" :"float",
"D" : "double"
}
if __name__== "__main__":
if len(sys.argv) > 1:
print("parsing descriptors of file " + sys.argv[1] )
parseDescriptorsFile(sys.argv[1]... | 24.674797 | 107 | 0.611203 |
import re,sys, json
knownRetTypes = {
"V" : "Void" ,
"Z" : "boolean",
"B" : "byte",
"S" : "short",
"C" : "char",
"I" : "int",
"J" : "long",
"F" :"float",
"D" : "double"
}
def inferType(st):
if(len(st)>0):
if "[" in st:
#array . ex: I[]
return "[" + inferType(st[1:]) + "]"
if len(st) >1:
retur... | 0 | 0 | 0 | 0 | 0 | 2,495 | 0 | 9 | 161 |
b9747b0736b980260aab984b289f61d68e837926 | 3,878 | py | Python | tests/render2/test_logging.py | ace-ecosystem/ACE | d17b5ef4bccf923ec6be5115fabe40f0627dab2d | [
"Apache-2.0"
] | 24 | 2019-09-21T21:09:45.000Z | 2022-03-15T19:48:13.000Z | tests/render2/test_logging.py | ace-ecosystem/ACE | d17b5ef4bccf923ec6be5115fabe40f0627dab2d | [
"Apache-2.0"
] | 54 | 2019-09-16T20:06:30.000Z | 2021-08-18T22:22:08.000Z | tests/render2/test_logging.py | ace-ecosystem/ACE | d17b5ef4bccf923ec6be5115fabe40f0627dab2d | [
"Apache-2.0"
] | 9 | 2019-09-08T13:35:55.000Z | 2021-01-03T15:23:37.000Z |
from render2.src.shared.shared_logging import TRUNCATE_TEXT, TRUNCATE_LENGTH
LONG_STRING = "zxcvbnmasdfghjklqwertyuiop1234567890zxcvbnmasdfghjklqwertyu" \
"iop1234567890zxcvbnmasdzxcvkjapeorijfaldkcfjadfjapsoeifjadf"
TRUNCATED_STRING = f"{LONG_STRING[:(64 - TRUNCATE_LENGTH)]}{TRUNCATE_TEXT}"
# --------... | 33.145299 | 116 | 0.689273 | import pytest
from render2.src.shared.shared_logging import get_logger, truncate, prep_for_logging, TRUNCATE_TEXT, TRUNCATE_LENGTH
LONG_STRING = "zxcvbnmasdfghjklqwertyuiop1234567890zxcvbnmasdfghjklqwertyu" \
"iop1234567890zxcvbnmasdzxcvkjapeorijfaldkcfjadfjapsoeifjadf"
TRUNCATED_STRING = f"{LONG_STRING... | 0 | 3,233 | 0 | 0 | 0 | 0 | 0 | 32 | 160 |
1360b1509138f330e4ce58ff72522720d598c5e7 | 546 | py | Python | atmcorr/reflectance/worldview.py | DHI-GRAS/atmcorr | 55e584c7971009065b47ece9d3d215bfe8335d04 | [
"MIT"
] | 5 | 2019-09-03T17:13:57.000Z | 2021-12-01T03:22:11.000Z | atmcorr/reflectance/worldview.py | DHI-GRAS/atmcorr | 55e584c7971009065b47ece9d3d215bfe8335d04 | [
"MIT"
] | 1 | 2021-04-28T08:11:37.000Z | 2021-04-28T09:52:02.000Z | atmcorr/reflectance/worldview.py | DHI-GRAS/atmcorr | 55e584c7971009065b47ece9d3d215bfe8335d04 | [
"MIT"
] | 1 | 2021-03-31T02:13:08.000Z | 2021-03-31T02:13:08.000Z | from dg_calibration import reflectance
def toa_reflectance(radata, mtdFile, band_ids):
"""Estimate toa reflectance from radiometric data
ignoring atmospheric, topographic and BRDF effects
Parameters
----------
radata : ndarray shape (nbands, ny, nx)
radiance data
mtdFile : str
... | 23.73913 | 82 | 0.663004 | from dg_calibration import reflectance
def toa_reflectance(radata, mtdFile, band_ids):
"""Estimate toa reflectance from radiometric data
ignoring atmospheric, topographic and BRDF effects
Parameters
----------
radata : ndarray shape (nbands, ny, nx)
radiance data
mtdFile : str
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7f68299122102c1ee4f94f3c756c5f55a44708b9 | 5,897 | py | Python | urbansprawl/population/data_extract.py | Oslandia/urbansprawl | afbc1da6ce640569571d26900a2cc97a063fb0a9 | [
"MIT"
] | 7 | 2019-01-07T14:41:48.000Z | 2020-07-01T06:50:17.000Z | urbansprawl/population/data_extract.py | Oslandia/urbansprawl | afbc1da6ce640569571d26900a2cc97a063fb0a9 | [
"MIT"
] | 6 | 2019-01-08T10:16:36.000Z | 2019-03-01T18:33:14.000Z | urbansprawl/population/data_extract.py | Oslandia/urbansprawl | afbc1da6ce640569571d26900a2cc97a063fb0a9 | [
"MIT"
] | 1 | 2019-01-21T08:51:49.000Z | 2019-01-21T08:51:49.000Z | ###############
# Repository: https://github.com/lgervasoni/urbansprawl
# MIT License
###############
from shapely.geometry import GeometryCollection
import geopandas as gpd
import pandas as pd
import os
import numpy as np
import osmnx as ox
from osmnx import log
from .utils import get_population_extract_filename
D... | 31.875676 | 87 | 0.624216 | ###############
# Repository: https://github.com/lgervasoni/urbansprawl
# MIT License
###############
from shapely.geometry import GeometryCollection
import geopandas as gpd
import pandas as pd
import os
import numpy as np
import osmnx as ox
from osmnx import log
from .utils import get_population_extract_filename
D... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
219f55a5acb6cf2f6e7f670cfe0a6f221de36ff3 | 3,591 | py | Python | lib/datasets/referit.py | BryanPlummer/phrase_detection | febe4d2e02a0467850cdf97fb3d3c3c5592be9a2 | [
"MIT"
] | 7 | 2019-11-15T13:16:55.000Z | 2021-11-10T18:19:58.000Z | lib/datasets/referit.py | BryanPlummer/phrase_detection | febe4d2e02a0467850cdf97fb3d3c3c5592be9a2 | [
"MIT"
] | 1 | 2021-09-07T13:28:49.000Z | 2021-09-07T13:28:49.000Z | lib/datasets/referit.py | BryanPlummer/phrase_detection | febe4d2e02a0467850cdf97fb3d3c3c5592be9a2 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Tensorflow Phrase Detection
# Licensed under The MIT License [see LICENSE for details]
# Written by Bryan Plummer based on code from Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
from __future_... | 32.645455 | 85 | 0.67335 | # --------------------------------------------------------
# Tensorflow Phrase Detection
# Licensed under The MIT License [see LICENSE for details]
# Written by Bryan Plummer based on code from Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
from __future_... | 0 | 0 | 0 | 2,865 | 0 | 0 | 0 | -39 | 310 |
f1bb3279a0638f314a5a5053219e49caf2ab56fb | 1,319 | py | Python | utils/radiate_dataset.py | BerensRWU/Radiate-Complex-YOLO | f9d7ccfe585f4285b6fb195e8211072ef433879b | [
"MIT"
] | null | null | null | utils/radiate_dataset.py | BerensRWU/Radiate-Complex-YOLO | f9d7ccfe585f4285b6fb195e8211072ef433879b | [
"MIT"
] | null | null | null | utils/radiate_dataset.py | BerensRWU/Radiate-Complex-YOLO | f9d7ccfe585f4285b6fb195e8211072ef433879b | [
"MIT"
] | null | null | null | from __future__ import division
import utils.radiate_utils as radiate_utils
| 29.977273 | 69 | 0.679303 | from __future__ import division
import glob, os
import numpy as np
import cv2
import torch.utils.data as torch_data
import yaml
import utils.radiate_utils as radiate_utils
from utils.calibration import Calibration
class RadiateDataset(torch_data.Dataset):
def __init__(self, root_dir, split='train'):
self.... | 0 | 0 | 0 | 1,082 | 0 | 0 | 0 | 6 | 155 |
c44f44e958d4dc3376cab2ae19d9ac874ece080f | 518 | py | Python | examples/full/app/api/pilots/controllers.py | rbw0/flask-journey | 6181f59a7b5eef6a85b86ce6ed7d03c91f6bd285 | [
"MIT"
] | 14 | 2018-03-10T05:55:04.000Z | 2018-06-18T09:14:53.000Z | examples/full/app/api/pilots/controllers.py | rbw/flask-journey | 6181f59a7b5eef6a85b86ce6ed7d03c91f6bd285 | [
"MIT"
] | 6 | 2018-03-11T01:24:08.000Z | 2018-03-12T16:13:44.000Z | examples/full/app/api/pilots/controllers.py | rbw/flask-journey | 6181f59a7b5eef6a85b86ce6ed7d03c91f6bd285 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Blueprint
bp = Blueprint('pilots', __name__)
| 22.521739 | 83 | 0.720077 | # -*- coding: utf-8 -*-
from flask import Blueprint
from flask_journey import route
from .services import get_pilots, get_pilot
from .schemas import pilot, pilots, query
bp = Blueprint('pilots', __name__)
@route(bp, '/<pilot_id>', methods=['GET'], marshal_with=pilot)
def get_one(pilot_id):
return get_pilot(pi... | 0 | 260 | 0 | 0 | 0 | 0 | 0 | 52 | 113 |
8fccc2b51a05ade08d1e523b5d619126a0c84acf | 220 | py | Python | setup.py | IdanAtias/redis-on-k8s | a20acaf44f37adcd41a1fc5c360fba1bacd2528e | [
"MIT"
] | null | null | null | setup.py | IdanAtias/redis-on-k8s | a20acaf44f37adcd41a1fc5c360fba1bacd2528e | [
"MIT"
] | null | null | null | setup.py | IdanAtias/redis-on-k8s | a20acaf44f37adcd41a1fc5c360fba1bacd2528e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import find_packages, setup
setup(
name="redisfe",
version="0.0.1",
packages=find_packages(),
entry_points={"console_scripts": ("redisfe=redisfe.main:main",)},
)
| 20 | 69 | 0.654545 | # -*- coding: utf-8 -*-
from setuptools import find_packages, setup
setup(
name="redisfe",
version="0.0.1",
packages=find_packages(),
entry_points={"console_scripts": ("redisfe=redisfe.main:main",)},
)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
84d4a220f29f0e0bd994f0f18dd49fb101ca5d4f | 2,752 | py | Python | code/introduction/matplotlib-timeline.py | geo7/scientific-visualization-book | 71f6bac4db7ee2f26e88052fe7faa800303d8b00 | [
"BSD-2-Clause"
] | 2 | 2021-11-17T15:10:09.000Z | 2021-12-24T13:31:10.000Z | code/introduction/matplotlib-timeline.py | WuShichao/scientific-visualization-book | 389766215aa6b234ed1cf560a3768437d41d1d37 | [
"BSD-2-Clause"
] | 1 | 2021-12-12T11:37:48.000Z | 2021-12-12T11:39:00.000Z | code/introduction/matplotlib-timeline.py | WuShichao/scientific-visualization-book | 389766215aa6b234ed1cf560a3768437d41d1d37 | [
"BSD-2-Clause"
] | 2 | 2021-12-30T12:20:07.000Z | 2022-02-24T06:36:41.000Z | # ----------------------------------------------------------------------------
# Title: Scientific Visualisation - Python & Matplotlib
# Author: Nicolas P. Rougier
# License: BSD
# ----------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
fig =... | 31.632184 | 86 | 0.560683 | # ----------------------------------------------------------------------------
# Title: Scientific Visualisation - Python & Matplotlib
# Author: Nicolas P. Rougier
# License: BSD
# ----------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
def an... | 0 | 0 | 0 | 0 | 0 | 552 | 0 | 0 | 23 |
50bcb74ff72e68b78833e7e63920662728bd17d0 | 4,798 | py | Python | src/_speedup.py | Kefan-pauline/HER-CPRAND | 131a284a486ecc34baa7d1d766836ab7dda12087 | [
"MIT"
] | null | null | null | src/_speedup.py | Kefan-pauline/HER-CPRAND | 131a284a486ecc34baa7d1d766836ab7dda12087 | [
"MIT"
] | null | null | null | src/_speedup.py | Kefan-pauline/HER-CPRAND | 131a284a486ecc34baa7d1d766836ab7dda12087 | [
"MIT"
] | null | null | null | import tensorly as tl
import numpy as np
from src._als import als, nn_als
from src._herals import her_Als, nn_her_Als
from src._cprand import CPRAND, nn_CPRAND
from src._hercprand import her_CPRAND, nn_her_CPRAND
from src._base import init_factors, random_init_fac
import copy
import matplotlib.pyplot as plt
def speedu... | 42.460177 | 198 | 0.626928 | import tensorly as tl
import numpy as np
from src._als import als,nn_als
from src._herals import her_Als,nn_her_Als
from src._cprand import CPRAND, nn_CPRAND
from src._hercprand import her_CPRAND,nn_her_CPRAND
from src._base import init_factors,random_init_fac
import copy
import matplotlib.pyplot as plt
def speedup(li... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 0 |
07062acf91bc80ff83e15bd2102da27551a695f9 | 586 | py | Python | main.py | pizen/liturgical-today | bb141173bd37c2f2409dc74ce222dc62bfad844f | [
"MIT"
] | null | null | null | main.py | pizen/liturgical-today | bb141173bd37c2f2409dc74ce222dc62bfad844f | [
"MIT"
] | null | null | null | main.py | pizen/liturgical-today | bb141173bd37c2f2409dc74ce222dc62bfad844f | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
if __name__ == '__main__':
app.run(host='127.0.0.1', port=8080, debug=True)
| 20.928571 | 52 | 0.667235 | from datetime import date
from flask import abort, Flask, Response
import json
from pyliturgical import calendar
app = Flask(__name__)
@app.route('/reformed/<date_str>')
def reformed(date_str):
try:
d = date.fromisoformat(date_str)
except Exception:
abort(400)
resp = Response(
js... | 0 | 344 | 0 | 0 | 0 | 0 | 0 | 23 | 89 |
46974bc9e27f73be1af4d1ab4cde572896bb9a44 | 9,212 | py | Python | code_captioning/class_ende.py | 201528014227051/ARNet | e7779d6af1a8990712d8e8e4a72e4c1ed138f60e | [
"MIT"
] | 9 | 2018-07-11T11:34:09.000Z | 2021-11-21T15:37:18.000Z | code_captioning/class_ende.py | 201528014227051/ARNet | e7779d6af1a8990712d8e8e4a72e4c1ed138f60e | [
"MIT"
] | null | null | null | code_captioning/class_ende.py | 201528014227051/ARNet | e7779d6af1a8990712d8e8e4a72e4c1ed138f60e | [
"MIT"
] | 2 | 2018-10-19T03:57:51.000Z | 2018-12-01T17:13:36.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch.nn as nn
| 41.309417 | 119 | 0.606057 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import ipdb
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import *
from classLSTMCore import LSTMCore
class EncodeDecode(nn.Module):
... | 24 | 0 | 0 | 8,897 | 0 | 0 | 0 | -4 | 179 |
5d2fae479dc054bce8a8026cf03aca7d52d024b4 | 996 | py | Python | tests/test_graph_io.py | rhysnewell/spacegraphcats | e4d8b29171af0d1c8507066021be3b6a50c7802b | [
"BSD-3-Clause"
] | 96 | 2016-05-13T12:13:07.000Z | 2021-12-17T21:01:17.000Z | tests/test_graph_io.py | rhysnewell/spacegraphcats | e4d8b29171af0d1c8507066021be3b6a50c7802b | [
"BSD-3-Clause"
] | 421 | 2016-05-17T20:47:16.000Z | 2022-03-08T00:35:32.000Z | tests/test_graph_io.py | rhysnewell/spacegraphcats | e4d8b29171af0d1c8507066021be3b6a50c7802b | [
"BSD-3-Clause"
] | 17 | 2016-10-13T17:13:17.000Z | 2021-06-02T18:19:34.000Z | import unittest
if __name__ == "__main__":
unittest.main()
| 24.9 | 70 | 0.63755 | import unittest
from io import StringIO
from spacegraphcats.catlas.graph_io import read_from_gxt, write_to_gxt
from spacegraphcats.catlas.graph import Graph
class IOTest(unittest.TestCase):
def test_writing_and_reading(self):
f = StringIO()
graph = Graph(5)
graph.add_arc(1, 0).add_arc(2,... | 0 | 0 | 0 | 765 | 0 | 0 | 0 | 75 | 90 |
e8bd989197609c3dd25e513b44bbf56175e59919 | 16,715 | py | Python | models/bidi_rnn_iou_predictor_model.py | maksay/seq-train | 1af93c6e8e5db93a88c872a66546f6f4bd921551 | [
"MIT"
] | 11 | 2019-07-08T07:40:56.000Z | 2020-10-12T08:27:21.000Z | models/bidi_rnn_iou_predictor_model.py | maksay/seq-train | 1af93c6e8e5db93a88c872a66546f6f4bd921551 | [
"MIT"
] | 1 | 2019-07-09T02:23:08.000Z | 2019-07-09T02:23:08.000Z | models/bidi_rnn_iou_predictor_model.py | maksay/seq-train | 1af93c6e8e5db93a88c872a66546f6f4bd921551 | [
"MIT"
] | 3 | 2019-07-08T08:20:38.000Z | 2021-02-03T15:16:39.000Z |
# Three heads acting on the rnn output of size batchxlengthxoutput_size
# They predict IoU, whether the Gt exists, and the shift to GT bounding box
# IoU between two bounding boxes computation in TF
# such that IoU with GT could be optimized.
| 45.544959 | 80 | 0.494167 | from models.base_model import BaseModel
import tensorflow as tf
import numpy as np
from label_storage import LabelStorage
from tqdm import tqdm
import time
from copy import deepcopy
def sequence_embedding(input_seq,
feat_dim,
embedding_size,
rnn_cel... | 0 | 0 | 0 | 11,153 | 0 | 4,997 | 0 | 28 | 290 |
46e6f5da826b8c139db5aa3d6a375bea6c1783d2 | 701 | py | Python | multauth/api/urls.py | andrenerd/django-multiform-authentication | 4a8b94ebd660cc7afc7dcdedcc12344ef85e6615 | [
"MIT"
] | 7 | 2020-08-28T16:17:02.000Z | 2021-11-11T18:01:20.000Z | multauth/api/urls.py | andrenerd/django-multiform-authentication | 4a8b94ebd660cc7afc7dcdedcc12344ef85e6615 | [
"MIT"
] | null | null | null | multauth/api/urls.py | andrenerd/django-multiform-authentication | 4a8b94ebd660cc7afc7dcdedcc12344ef85e6615 | [
"MIT"
] | 2 | 2021-01-06T04:11:28.000Z | 2021-05-19T14:43:52.000Z | from django.urls import include, path
from .me import views as me_views
from .auth import views as auth_views
from .services import urls as services_urls
app_name = 'multauth'
urlpatterns = [
path('me/', me_views.MeView.as_view(), name='me'),
path('me/password/', me_views.MePasswordView.as_view(), name='me-... | 35.05 | 106 | 0.71612 | from django.urls import include, path
from .me import views as me_views
from .auth import views as auth_views
from .services import urls as services_urls
app_name = 'multauth'
urlpatterns = [
path('me/', me_views.MeView.as_view(), name='me'),
path('me/password/', me_views.MePasswordView.as_view(), name='me-... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |