hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70f4f9a2f8e77773f4d700170933be3c3cb6593
1,970
py
Python
python_modules/dagster/dagster/core/execution/context/step.py
jake-billings/dagster
7a1548a1f246c48189f3d8109e831b744bceb7d4
[ "Apache-2.0" ]
1
2019-07-15T17:34:04.000Z
2019-07-15T17:34:04.000Z
python_modules/dagster/dagster/core/execution/context/step.py
jake-billings/dagster
7a1548a1f246c48189f3d8109e831b744bceb7d4
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/execution/context/step.py
jake-billings/dagster
7a1548a1f246c48189f3d8109e831b744bceb7d4
[ "Apache-2.0" ]
null
null
null
from dagster import check from .system import SystemStepExecutionContext class StepExecutionContext(object): __slots__ = ['_system_step_execution_context', '_legacy_context'] def __init__(self, system_step_execution_context): self._system_step_execution_context = check.inst_param( system...
28.142857
92
0.716751
from dagster import check from .system import SystemStepExecutionContext class StepExecutionContext(object): __slots__ = ['_system_step_execution_context', '_legacy_context'] def __init__(self, system_step_execution_context): self._system_step_execution_context = check.inst_param( system...
true
true
f70f4fab1f7787b020a92ba4a182e8dd17836149
746
py
Python
setup.py
yanoshi/yootto
27b48777d922de53d98a05011864804bf6c74883
[ "MIT" ]
5
2021-01-11T10:59:39.000Z
2021-03-22T07:07:45.000Z
setup.py
yanoshi/yootto
27b48777d922de53d98a05011864804bf6c74883
[ "MIT" ]
4
2021-01-11T07:03:50.000Z
2021-08-13T18:13:16.000Z
setup.py
yanoshi/yootto
27b48777d922de53d98a05011864804bf6c74883
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('requirements.txt') as requirements_file: install_requirements = requirements_file.read().splitlines() setup( name="yootto", version="0.1.5", description="yootto(ヨーッと) is tiny YouTube Music unofficial uploader", author="yanoshi", author_email...
29.84
73
0.647453
from setuptools import setup, find_packages with open('requirements.txt') as requirements_file: install_requirements = requirements_file.read().splitlines() setup( name="yootto", version="0.1.5", description="yootto(ヨーッと) is tiny YouTube Music unofficial uploader", author="yanoshi", author_email...
true
true
f70f5032fb844be87e596edfc4407fe50215388c
14,322
py
Python
synapse/events/utils.py
ricco386/synapse
0d464935f1771d966ab388d803349c7a2bf45ad9
[ "Apache-2.0" ]
null
null
null
synapse/events/utils.py
ricco386/synapse
0d464935f1771d966ab388d803349c7a2bf45ad9
[ "Apache-2.0" ]
null
null
null
synapse/events/utils.py
ricco386/synapse
0d464935f1771d966ab388d803349c7a2bf45ad9
[ "Apache-2.0" ]
2
2020-03-03T18:34:52.000Z
2022-03-31T11:06:18.000Z
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # 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...
31.134783
86
0.624633
import collections import re from typing import Mapping, Union from six import string_types from frozendict import frozendict from twisted.internet import defer from synapse.api.constants import EventTypes, RelationTypes from synapse.util.async_helpers import yieldable_gather_results from . import Ev...
true
true
f70f504cbb9797914e75e4bb397d591ff5e8ca28
3,224
py
Python
src/sentry/tagstore/v2/models/grouptagvalue.py
apragacz/sf-sentry
2fdd6c1195c29a1d401d1cd538c22ea68556699a
[ "BSD-3-Clause" ]
1
2018-03-05T15:40:12.000Z
2018-03-05T15:40:12.000Z
src/sentry/tagstore/v2/models/grouptagvalue.py
pkaminski/sentry
27e948283e27d93ca5192ca7b580830e092c25c7
[ "BSD-3-Clause" ]
1
2018-08-22T16:49:48.000Z
2018-08-22T16:49:48.000Z
src/sentry/tagstore/v2/models/grouptagvalue.py
pkaminski/sentry
27e948283e27d93ca5192ca7b580830e092c25c7
[ "BSD-3-Clause" ]
1
2018-07-02T09:46:44.000Z
2018-07-02T09:46:44.000Z
""" sentry.tagstore.v2.models.grouptagvalue ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2017 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import six from django.db import models, router, transaction, DataError from djan...
31.300971
82
0.623759
from __future__ import absolute_import import six from django.db import models, router, transaction, DataError from django.utils import timezone from sentry.api.serializers import Serializer, register from sentry.db.models import ( Model, BoundedPositiveIntegerField, BaseManager, FlexibleForeignKey, sane_repr ) ...
true
true
f70f507eef49a7c8fbcf5752023ba89d96e7f5af
30,399
py
Python
robotframework-ls/src/robotframework_ls/impl/libspec_manager.py
emanlove/robotframework-lsp
b0d8862d24e3bc1b72d8ce9412a671571520e7d9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robotframework-ls/src/robotframework_ls/impl/libspec_manager.py
emanlove/robotframework-lsp
b0d8862d24e3bc1b72d8ce9412a671571520e7d9
[ "ECL-2.0", "Apache-2.0" ]
1
2021-09-30T15:40:29.000Z
2021-09-30T15:40:29.000Z
robotframework-ls/src/robotframework_ls/impl/libspec_manager.py
emanlove/robotframework-lsp
b0d8862d24e3bc1b72d8ce9412a671571520e7d9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import os import sys from robotframework_ls.constants import NULL from robocode_ls_core.robotframework_log import get_logger log = get_logger(__name__) def _normfile(filename): return os.path.abspath(os.path.normpath(os.path.normcase(filename))) def _get_libspec_mutex_name(libspec_filename): from robocode_...
37.437192
107
0.596467
import os import sys from robotframework_ls.constants import NULL from robocode_ls_core.robotframework_log import get_logger log = get_logger(__name__) def _normfile(filename): return os.path.abspath(os.path.normpath(os.path.normcase(filename))) def _get_libspec_mutex_name(libspec_filename): from robocode_...
true
true
f70f508210f2ed61f04a9924a27265ba20a3c8c0
965
py
Python
019_removeNthNodeFromListEnd.py
stuti-rastogi/leetcode-python-solutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
4
2018-07-24T08:36:42.000Z
2019-08-25T17:48:47.000Z
019_removeNthNodeFromListEnd.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
019_removeNthNodeFromListEnd.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: if not head or not head.next: return None # make this st...
29.242424
97
0.554404
class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: if not head or not head.next: return None first = head count = 0 while first and count <= n: first = first.next count += 1 ...
true
true
f70f51695161b773142bb7af5d30320d1eec9d9a
85
py
Python
api/tacticalrmm/apiv3/apps.py
infinite8co/tacticalrmm
bd7ce5417ec672552ec3cba325318795ccde972e
[ "MIT" ]
903
2019-10-22T22:56:42.000Z
2022-03-18T14:15:54.000Z
api/tacticalrmm/apiv3/apps.py
infinite8co/tacticalrmm
bd7ce5417ec672552ec3cba325318795ccde972e
[ "MIT" ]
720
2019-12-07T08:11:26.000Z
2022-03-17T21:47:04.000Z
api/tacticalrmm/apiv3/apps.py
infinite8co/tacticalrmm
bd7ce5417ec672552ec3cba325318795ccde972e
[ "MIT" ]
231
2020-02-11T14:14:21.000Z
2022-03-16T21:23:10.000Z
from django.apps import AppConfig class Apiv3Config(AppConfig): name = "apiv3"
14.166667
33
0.741176
from django.apps import AppConfig class Apiv3Config(AppConfig): name = "apiv3"
true
true
f70f520361f1a11ee403835f6c6ca6e6e2b12a75
1,452
py
Python
samples/generated_samples/logging_v2_generated_config_service_v2_update_settings_sync.py
MtkN1/google-cloud-logging-patch
05a2f747ad9b233fa3b9890c7369a50d86cabba6
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/logging_v2_generated_config_service_v2_update_settings_sync.py
MtkN1/google-cloud-logging-patch
05a2f747ad9b233fa3b9890c7369a50d86cabba6
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/logging_v2_generated_config_service_v2_update_settings_sync.py
MtkN1/google-cloud-logging-patch
05a2f747ad9b233fa3b9890c7369a50d86cabba6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
31.565217
85
0.759642
from google.cloud import logging_v2 def sample_update_settings(): client = logging_v2.ConfigServiceV2Client() request = logging_v2.UpdateSettingsRequest( name="name_value", ) response = client.update_settings(request=request) print(response)...
true
true
f70f5392d9696765d55f2f1e0e641681b6ef353f
16,489
py
Python
geoviews/operation/projection.py
GonzalezDiazJ/pyviz_geoviews_clone
cac9afd1bc0d25313c84ea617300bbe40207d044
[ "BSD-3-Clause" ]
null
null
null
geoviews/operation/projection.py
GonzalezDiazJ/pyviz_geoviews_clone
cac9afd1bc0d25313c84ea617300bbe40207d044
[ "BSD-3-Clause" ]
null
null
null
geoviews/operation/projection.py
GonzalezDiazJ/pyviz_geoviews_clone
cac9afd1bc0d25313c84ea617300bbe40207d044
[ "BSD-3-Clause" ]
null
null
null
import param import numpy as np from cartopy import crs as ccrs from cartopy.img_transform import warp_array, _determine_bounds from holoviews.core.util import cartesian_product, get_param_values from holoviews.operation import Operation from shapely.geometry import Polygon, LineString, MultiPolygon, MultiLineString ...
39.73253
108
0.572321
import param import numpy as np from cartopy import crs as ccrs from cartopy.img_transform import warp_array, _determine_bounds from holoviews.core.util import cartesian_product, get_param_values from holoviews.operation import Operation from shapely.geometry import Polygon, LineString, MultiPolygon, MultiLineString ...
true
true
f70f53d11f6bad5ff3c69ec373295103fd57b32c
1,832
py
Python
end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
172
2020-02-15T20:14:16.000Z
2021-06-09T07:09:15.000Z
end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
410
2020-02-15T19:39:29.000Z
2021-06-09T19:28:57.000Z
end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
38
2020-04-12T09:36:27.000Z
2021-06-11T08:57:07.000Z
from typing import Any, Dict, Union import httpx from ...client import Client from ...types import UNSET, Response, Unset def _get_kwargs( *, client: Client, common: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: url = "{}/common_parameters".format(client.base_url) headers: Dict[str, Any...
20.355556
82
0.593341
from typing import Any, Dict, Union import httpx from ...client import Client from ...types import UNSET, Response, Unset def _get_kwargs( *, client: Client, common: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: url = "{}/common_parameters".format(client.base_url) headers: Dict[str, Any...
true
true
f70f54a84673a8794196351079055e57ac2e5bdf
3,370
py
Python
tests/conftest.py
ilko222/test_python
e77c3979bd9cef425716b8f26d2cdd4491b7ae17
[ "MIT" ]
null
null
null
tests/conftest.py
ilko222/test_python
e77c3979bd9cef425716b8f26d2cdd4491b7ae17
[ "MIT" ]
null
null
null
tests/conftest.py
ilko222/test_python
e77c3979bd9cef425716b8f26d2cdd4491b7ae17
[ "MIT" ]
null
null
null
import pytest import allure from _pytest.nodes import Item from _pytest.runner import CallInfo from selene.core.exceptions import TimeoutException from selene.support.shared import browser @pytest.fixture(scope='function', autouse=True) def browser_management(): """ Here, before yield, goes all "setup" co...
34.040404
93
0.660831
import pytest import allure from _pytest.nodes import Item from _pytest.runner import CallInfo from selene.core.exceptions import TimeoutException from selene.support.shared import browser @pytest.fixture(scope='function', autouse=True) def browser_management(): # An example of selene hook_wait_fai...
true
true
f70f54d4dd5967223a8d1a1372d9ffeaa51b56df
5,539
py
Python
public_talks/2016_02_26_columbia/get_tweets.py
kylepjohnson/ipython_notebooks
7f77ec06a70169cc479a6f912b4888789bf28ac4
[ "MIT" ]
9
2016-08-10T09:03:09.000Z
2021-01-06T21:34:20.000Z
public_talks/2016_02_26_columbia/get_tweets.py
kylepjohnson/ipython
7f77ec06a70169cc479a6f912b4888789bf28ac4
[ "MIT" ]
null
null
null
public_talks/2016_02_26_columbia/get_tweets.py
kylepjohnson/ipython
7f77ec06a70169cc479a6f912b4888789bf28ac4
[ "MIT" ]
3
2018-10-07T01:56:22.000Z
2021-01-06T21:33:28.000Z
#!/usr/bin/python # -*- coding: utf_8 -*- """Access and query Twitter's API with the simplistic twitter package (`pip install twitter`). """ from __future__ import print_function from __future__ import unicode_literals import csv import os import time from twitter import OAuth from twitter import Twitter def setup...
36.682119
104
0.596498
from __future__ import print_function from __future__ import unicode_literals import csv import os import time from twitter import OAuth from twitter import Twitter def setup_twitter(config_file='config.py'): config = {} execfile(config_file, config) twitter_obj = Twitter(auth=OAuth(config["access_k...
true
true
f70f54f0630586e54171415610e5bf23d7c87168
26,276
py
Python
q2_feature_table/plugin_setup.py
cguccione/q2-feature-table
90b75bb4848371bd640fe7c4baf14bc448d597c9
[ "BSD-3-Clause" ]
null
null
null
q2_feature_table/plugin_setup.py
cguccione/q2-feature-table
90b75bb4848371bd640fe7c4baf14bc448d597c9
[ "BSD-3-Clause" ]
null
null
null
q2_feature_table/plugin_setup.py
cguccione/q2-feature-table
90b75bb4848371bd640fe7c4baf14bc448d597c9
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2022, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
45.460208
79
0.614439
from qiime2.plugin import (Plugin, Int, Float, Range, Metadata, Str, Bool, Choices, MetadataColumn, Categorical, List, Citations, TypeMatch, TypeMap) import q2_feature_table from q2_types.feature_table import ( FeatureTable, Frequency, RelativeFrequency...
true
true
f70f557616fe80f5978c4f28c24fbbe3bf2fa1a3
2,795
py
Python
resampling/foundations_for_inference/gender_discrimination.py
necromuralist/resampling
0b48a51cb5f8e21a3f52508ecc74f12fa03d9b25
[ "MIT" ]
null
null
null
resampling/foundations_for_inference/gender_discrimination.py
necromuralist/resampling
0b48a51cb5f8e21a3f52508ecc74f12fa03d9b25
[ "MIT" ]
null
null
null
resampling/foundations_for_inference/gender_discrimination.py
necromuralist/resampling
0b48a51cb5f8e21a3f52508ecc74f12fa03d9b25
[ "MIT" ]
null
null
null
# pandas standard library import sys # third-party import pandas import matplotlib import matplotlib.pyplot as plot matplotlib.style.use('ggplot') GENDER_COUNT = 24 MALES_PROMOTED = 21 FEMALES_PROMOTED = 14 GENDER_DIFFERENCE = MALES_PROMOTED - FEMALES_PROMOTED FEMALES_NOT_PROMOTED = GENDER_COUNT - FEMALES_PROMOTED ...
39.928571
102
0.572093
import sys import pandas import matplotlib import matplotlib.pyplot as plot matplotlib.style.use('ggplot') GENDER_COUNT = 24 MALES_PROMOTED = 21 FEMALES_PROMOTED = 14 GENDER_DIFFERENCE = MALES_PROMOTED - FEMALES_PROMOTED FEMALES_NOT_PROMOTED = GENDER_COUNT - FEMALES_PROMOTED MALES_NOT_PROMOTED = GENDER_COUNT - MA...
true
true
f70f56d578d8a75e9fea3ab56d50aba5f5fd47bd
10,462
py
Python
utils/manipulator.py
hugeinteger/InterFaceGAN
59e75c0b4dcdbcea693b31ff11cf239c39e14ed1
[ "MIT" ]
null
null
null
utils/manipulator.py
hugeinteger/InterFaceGAN
59e75c0b4dcdbcea693b31ff11cf239c39e14ed1
[ "MIT" ]
null
null
null
utils/manipulator.py
hugeinteger/InterFaceGAN
59e75c0b4dcdbcea693b31ff11cf239c39e14ed1
[ "MIT" ]
null
null
null
# python3.7 """Utility functions for latent codes manipulation.""" import numpy as np from sklearn import svm from .logger import setup_logger __all__ = ['train_boundary', 'project_boundary', 'linear_interpolate'] def train_boundary(latent_codes, scores, chosen_num_or_ratio=0....
42.877049
80
0.688014
import numpy as np from sklearn import svm from .logger import setup_logger __all__ = ['train_boundary', 'project_boundary', 'linear_interpolate'] def train_boundary(latent_codes, scores, chosen_num_or_ratio=0.02, split_ratio=0.7, invalid...
true
true
f70f5789ebf11040a90ecc0c05c6851ad4bc8bd0
1,240
py
Python
setup.py
sliderSun/scrapy-djangoitem
f68e60806d6d0175b88943adcac78e002f17a43c
[ "BSD-3-Clause" ]
509
2015-08-11T23:04:42.000Z
2022-02-16T01:33:55.000Z
setup.py
sliderSun/scrapy-djangoitem
f68e60806d6d0175b88943adcac78e002f17a43c
[ "BSD-3-Clause" ]
19
2015-08-06T04:06:28.000Z
2021-09-28T00:38:50.000Z
setup.py
sliderSun/scrapy-djangoitem
f68e60806d6d0175b88943adcac78e002f17a43c
[ "BSD-3-Clause" ]
107
2015-09-03T20:21:56.000Z
2021-09-28T14:20:49.000Z
from setuptools import setup, find_packages setup( name='scrapy-djangoitem', version='1.1.1', url='https://github.com/scrapy-plugins/scrapy-djangoitem', description='Scrapy extension to write scraped items using Django models', long_description=open('README.rst').read(), author='Scrapy develop...
34.444444
78
0.607258
from setuptools import setup, find_packages setup( name='scrapy-djangoitem', version='1.1.1', url='https://github.com/scrapy-plugins/scrapy-djangoitem', description='Scrapy extension to write scraped items using Django models', long_description=open('README.rst').read(), author='Scrapy develop...
true
true
f70f59f0cd48a2f126ee48d3a32435225abc914a
1,310
py
Python
tests/subtractions/test_utils.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
39
2016-10-31T23:28:59.000Z
2022-01-15T00:00:42.000Z
tests/subtractions/test_utils.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
1,690
2017-02-07T23:39:48.000Z
2022-03-31T22:30:44.000Z
tests/subtractions/test_utils.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
25
2017-02-08T18:25:31.000Z
2021-09-20T22:55:25.000Z
import os import pytest from virtool.subtractions.utils import ( check_subtraction_file_type, get_subtraction_files, join_subtraction_path, rename_bowtie_files, ) def test_join_subtraction_path(tmp_path, config): assert join_subtraction_path(config, "bar") == tmp_path / "subtractions" / "bar" ...
27.87234
84
0.710687
import os import pytest from virtool.subtractions.utils import ( check_subtraction_file_type, get_subtraction_files, join_subtraction_path, rename_bowtie_files, ) def test_join_subtraction_path(tmp_path, config): assert join_subtraction_path(config, "bar") == tmp_path / "subtractions" / "bar" ...
true
true
f70f5aa44820a47f32419ad9f28bef8a4d2813ba
23,039
py
Python
reVX/least_cost_xmission/least_cost_xmission.py
NREL/reVX
4d62eb2c003c3b53b959f7a58bdc342d18098884
[ "BSD-3-Clause" ]
7
2020-04-06T00:29:55.000Z
2022-01-23T20:00:14.000Z
reVX/least_cost_xmission/least_cost_xmission.py
NREL/reVX
4d62eb2c003c3b53b959f7a58bdc342d18098884
[ "BSD-3-Clause" ]
67
2020-02-28T20:15:35.000Z
2022-03-31T21:34:52.000Z
reVX/least_cost_xmission/least_cost_xmission.py
NREL/reVX
4d62eb2c003c3b53b959f7a58bdc342d18098884
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Module to compute least cost xmission paths, distances, and costs one or more SC points """ from concurrent.futures import as_completed import geopandas as gpd import json import logging import numpy as np import os import pandas as pd from pyproj.crs import CRS import rasterio from scipy.sp...
39.11545
79
0.570164
from concurrent.futures import as_completed import geopandas as gpd import json import logging import numpy as np import os import pandas as pd from pyproj.crs import CRS import rasterio from scipy.spatial import cKDTree from shapely.geometry import Point import time from reV.handlers.exclusions import ExclusionLayer...
true
true
f70f5b4ab3752fa1ced9abdd8789bbb663073dde
5,427
py
Python
site-packages/oslo_service/_options.py
hariza17/freezer_libraries
e0bd890eba5e7438976fb3b4d66c41c128bab790
[ "PSF-2.0" ]
null
null
null
site-packages/oslo_service/_options.py
hariza17/freezer_libraries
e0bd890eba5e7438976fb3b4d66c41c128bab790
[ "PSF-2.0" ]
null
null
null
site-packages/oslo_service/_options.py
hariza17/freezer_libraries
e0bd890eba5e7438976fb3b4d66c41c128bab790
[ "PSF-2.0" ]
null
null
null
# Copyright 2015 Mirantis Inc. # # 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 agre...
45.605042
79
0.585775
from oslo_config import cfg help_for_backdoor_port = ( "Acceptable values are 0, <port>, and <start>:<end>, where 0 results " "in listening on a random tcp port number; <port> results in listening " "on the specified port number (and not enabling backdoor if that port " "is in use); and ...
true
true
f70f5cd57a1fd153f57517e918891d2f039f7ddc
425
py
Python
interpriters/__init__.py
yakumo-saki/smart_to_zabbix
04dd1debe0c831b4ec94962884543c989ad57730
[ "MIT" ]
null
null
null
interpriters/__init__.py
yakumo-saki/smart_to_zabbix
04dd1debe0c831b4ec94962884543c989ad57730
[ "MIT" ]
23
2021-08-30T14:59:27.000Z
2021-11-05T16:51:08.000Z
interpriters/__init__.py
yakumo-saki/smart_to_zabbix
04dd1debe0c831b4ec94962884543c989ad57730
[ "MIT" ]
null
null
null
from interpriters.smart.IntelX25Interpriter import IntelX25Interpriter from interpriters.smart.SmartBasicInterpriter import SmartBasicInterpriter from interpriters.smart.SanDiskInterpriter import SmartSanDiskInterpriter from interpriters.nvme.NvmeBasicInterpriter import NvmeBasicInterpriter SPECIAL_INTERPRITERS = [Sm...
53.125
74
0.884706
from interpriters.smart.IntelX25Interpriter import IntelX25Interpriter from interpriters.smart.SmartBasicInterpriter import SmartBasicInterpriter from interpriters.smart.SanDiskInterpriter import SmartSanDiskInterpriter from interpriters.nvme.NvmeBasicInterpriter import NvmeBasicInterpriter SPECIAL_INTERPRITERS = [Sm...
true
true
f70f5e7eb40489e986f62438a0124259082259d8
24,487
py
Python
morgana/GUIs/fluo.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
8
2021-09-08T10:49:53.000Z
2022-02-25T13:28:03.000Z
morgana/GUIs/fluo.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
null
null
null
morgana/GUIs/fluo.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
1
2021-11-24T08:10:41.000Z
2021-11-24T08:10:41.000Z
from PyQt5.QtWidgets import (QApplication, QComboBox, QGridLayout, QGroupBox, QLabel, QPushButton, QFileDialog, QMessageBox, QWidget, QSizePolicy, QCheckBox) from matplotlib.backends.backend_qt5agg import FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar impo...
43.883513
156
0.548822
from PyQt5.QtWidgets import (QApplication, QComboBox, QGridLayout, QGroupBox, QLabel, QPushButton, QFileDialog, QMessageBox, QWidget, QSizePolicy, QCheckBox) from matplotlib.backends.backend_qt5agg import FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar impo...
true
true
f70f5ed7f55124b815811b8e5f3e9fd3b4c6d9bc
28
py
Python
rpxdock/rosetta/__init__.py
willsheffler/tcdock
c7b8614221f4a94750054bfe5dfb12298e8d05b8
[ "Apache-2.0" ]
6
2020-09-08T09:31:52.000Z
2022-03-29T09:53:30.000Z
rpxdock/rosetta/__init__.py
willsheffler/tcdock
c7b8614221f4a94750054bfe5dfb12298e8d05b8
[ "Apache-2.0" ]
9
2020-04-13T21:11:50.000Z
2022-03-09T00:57:37.000Z
rpxdock/rosetta/__init__.py
willsheffler/tcdock
c7b8614221f4a94750054bfe5dfb12298e8d05b8
[ "Apache-2.0" ]
3
2020-04-13T20:04:20.000Z
2021-12-16T22:43:50.000Z
from .rosetta_util import *
14
27
0.785714
from .rosetta_util import *
true
true
f70f5fe84e1700532cb04c37da25039ecfc01520
1,202
py
Python
tests/test_graph.py
shawnbrown/toron
3a89273b5afbda17baf973f654a0947f6667ef4e
[ "Apache-2.0" ]
1
2015-08-15T18:28:16.000Z
2015-08-15T18:28:16.000Z
tests/test_graph.py
shawnbrown/gpn
70b9933277a66e884cced3f5fbc795e0e0cd2b9f
[ "Apache-2.0" ]
null
null
null
tests/test_graph.py
shawnbrown/gpn
70b9933277a66e884cced3f5fbc795e0e0cd2b9f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- try: from StringIO import StringIO except ImportError: from io import StringIO # New stdlib location in 3.0 from . import _unittest as unittest from .common import TempDirTestCase from toron.graph import Graph from toron._gpn_node import Node from toron import IN_MEMORY class TestIn...
30.820513
78
0.694676
try: from StringIO import StringIO except ImportError: from io import StringIO from . import _unittest as unittest from .common import TempDirTestCase from toron.graph import Graph from toron._gpn_node import Node from toron import IN_MEMORY class TestInstantiation(TempDirTestCase): def setUp(self): ...
true
true
f70f60c0f5ef6d0d238412ab8c0bcbba577b180c
3,261
py
Python
tensorflow/python/kernel_tests/softplus_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
65
2016-09-26T01:30:40.000Z
2021-08-11T17:00:41.000Z
tensorflow/python/kernel_tests/softplus_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
7
2017-07-13T09:40:59.000Z
2019-04-08T22:46:51.000Z
tensorflow/python/kernel_tests/softplus_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
38
2017-04-28T04:15:48.000Z
2019-09-28T05:11:46.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.835165
80
0.623735
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.ops import gradient_checker from tensorflow.python.ops import nn_ops import tensorflow.python.ops.nn...
true
true
f70f620578b48f44b3909f01dd65ebfbea4e404e
1,774
py
Python
rezip.py
costerwi/rezip
c5386b96d8ed81a91b191b019ba48cf8377be578
[ "Apache-2.0" ]
35
2016-09-03T12:15:15.000Z
2022-03-14T11:04:33.000Z
rezip.py
costerwi/rezip
c5386b96d8ed81a91b191b019ba48cf8377be578
[ "Apache-2.0" ]
4
2017-02-08T07:25:42.000Z
2019-06-07T01:58:27.000Z
rezip.py
costerwi/rezip
c5386b96d8ed81a91b191b019ba48cf8377be578
[ "Apache-2.0" ]
7
2017-01-25T13:48:12.000Z
2020-09-19T23:35:44.000Z
#!/usr/bin/env python """Read zip format file from stdin and write new zip to stdout. With the --store option the output will be an uncompressed zip. Uncompressed files are stored more efficiently in Git. https://github.com/costerwi/rezip """ import sys import io from zipfile import * import argparse parser = argpa...
35.48
78
0.683202
import sys import io from zipfile import * import argparse parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--store", help="Store data to stdout zip without compression", action="store_true") parser.add_argument("-d", "--deterministic", help="Remove any file metadat...
true
true
f70f62b25660fe1a403bdc5ec0c24fed82b48c60
1,202
py
Python
domonic/webapi/dragndrop.py
byteface/domonic
971c2ae6ce2253e302873d40fd5b6e46a8f9ca95
[ "MIT" ]
94
2020-07-12T12:02:07.000Z
2022-03-25T03:04:57.000Z
domonic/webapi/dragndrop.py
byteface/domonic
971c2ae6ce2253e302873d40fd5b6e46a8f9ca95
[ "MIT" ]
41
2021-06-02T10:51:58.000Z
2022-02-21T09:58:43.000Z
domonic/webapi/dragndrop.py
byteface/domonic
971c2ae6ce2253e302873d40fd5b6e46a8f9ca95
[ "MIT" ]
17
2021-06-10T00:34:27.000Z
2022-02-21T09:47:30.000Z
""" domonic.webapi.dragndrop ==================================== https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API """ from domonic.events import DragEvent class DataTransfer: def __init__(self): self.data = {} self.types = [] self.files = [] se...
20.724138
75
0.56406
from domonic.events import DragEvent class DataTransfer: def __init__(self): self.data = {} self.types = [] self.files = [] self.items = [] self.dropEffect = "" self.effectAllowed = "" def clearData(self, type): self.data[type] = "" self.types...
true
true
f70f62fe541c2c1b6d4e273273e528bf2f968458
3,533
py
Python
gfwanalysis/routes/api/v1/whrc_biomass_router.py
archelogos/gfw-umd-gee
b1f5492f798a775eee24517bccbc10da513663f6
[ "MIT" ]
5
2017-11-01T21:13:19.000Z
2022-03-03T09:26:19.000Z
gfwanalysis/routes/api/v1/whrc_biomass_router.py
gfw-api/gfw-umd-gee
b1f5492f798a775eee24517bccbc10da513663f6
[ "MIT" ]
11
2018-01-22T09:05:23.000Z
2019-09-20T11:55:57.000Z
gfwanalysis/routes/api/v1/whrc_biomass_router.py
gfw-api/gfw-umd-gee
b1f5492f798a775eee24517bccbc10da513663f6
[ "MIT" ]
3
2020-07-10T13:30:58.000Z
2020-10-14T07:43:12.000Z
"""API ROUTER""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from flask import jsonify, Blueprint from gfwanalysis.errors import WHRCBiomassError from gfwanalysis.middleware import get_geo_by_hash, get_geo_by_use, get_geo_by_wdpa, \ ...
37.585106
115
0.731956
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from flask import jsonify, Blueprint from gfwanalysis.errors import WHRCBiomassError from gfwanalysis.middleware import get_geo_by_hash, get_geo_by_use, get_geo_by_wdpa, \ get_geo_by_natio...
true
true
f70f63a933620850da4b7b78a47ed2fd877b2fba
9,951
py
Python
BayCatEncoder/code.py
libinruan/hierarchical_bayesian_target_encoder
7510028a8ad1dea308802c4ca3d3a05533a9c89b
[ "MIT" ]
1
2021-11-28T19:05:55.000Z
2021-11-28T19:05:55.000Z
BayCatEncoder/code.py
libinruan/hierarchical_bayesian_target_encoder
7510028a8ad1dea308802c4ca3d3a05533a9c89b
[ "MIT" ]
null
null
null
BayCatEncoder/code.py
libinruan/hierarchical_bayesian_target_encoder
7510028a8ad1dea308802c4ca3d3a05533a9c89b
[ "MIT" ]
1
2021-11-28T19:07:01.000Z
2021-11-28T19:07:01.000Z
#%% import numpy as np import pandas as pd import time from sklearn.base import BaseEstimator, TransformerMixin from collections import defaultdict from sklearn.model_selection import KFold, StratifiedKFold class Timer: def __enter__(self): self.start=time.time() return self def __exit__(...
44.226667
274
0.553613
import numpy as np import pandas as pd import time from sklearn.base import BaseEstimator, TransformerMixin from collections import defaultdict from sklearn.model_selection import KFold, StratifiedKFold class Timer: def __enter__(self): self.start=time.time() return self def __exit__(sel...
true
true
f70f64b1c0e459c2b611f15e5ff01ad74993ec1e
1,318
py
Python
commands/ports.py
retr0-13/routeros-scanner
9a834d3459aa4621db33dab32a50d6c297bda059
[ "MIT" ]
1
2022-03-17T00:19:41.000Z
2022-03-17T00:19:41.000Z
commands/ports.py
retr0-13/routeros-scanner
9a834d3459aa4621db33dab32a50d6c297bda059
[ "MIT" ]
null
null
null
commands/ports.py
retr0-13/routeros-scanner
9a834d3459aa4621db33dab32a50d6c297bda059
[ "MIT" ]
1
2022-03-22T10:47:12.000Z
2022-03-22T10:47:12.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from commands.basecommand import BaseCommand class Ports(BaseCommand): def __init__(self): self.__name__ = 'Ports' def run_ssh(self, sshc): res = self._ssh_data_with_header(sshc, '/ip service print detail') sus_...
28.652174
118
0.560698
from commands.basecommand import BaseCommand class Ports(BaseCommand): def __init__(self): self.__name__ = 'Ports' def run_ssh(self, sshc): res = self._ssh_data_with_header(sshc, '/ip service print detail') sus_dns, recommendation = self.check_results_ssh(res) return {'raw...
true
true
f70f675e28b12cb449e04ec8328c32afe56f38dc
1,876
py
Python
exercicios_resolvidos3/exercicios3/capitulo 09/exercicio-09-35.py
tiagosm1/Python_Nilo_Ney
b5380dcc8fcf64e9c047ebc353585caba3d7b397
[ "MIT" ]
null
null
null
exercicios_resolvidos3/exercicios3/capitulo 09/exercicio-09-35.py
tiagosm1/Python_Nilo_Ney
b5380dcc8fcf64e9c047ebc353585caba3d7b397
[ "MIT" ]
null
null
null
exercicios_resolvidos3/exercicios3/capitulo 09/exercicio-09-35.py
tiagosm1/Python_Nilo_Ney
b5380dcc8fcf64e9c047ebc353585caba3d7b397
[ "MIT" ]
null
null
null
############################################################################## # Parte do livro Introdução à Programação com Python # Autor: Nilo Ney Coutinho Menezes # Editora Novatec (c) 2010-2020 # Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8 # Segunda edição - Junho/2014 - ISBN 978-85-7522-408-3 # Terce...
29.3125
94
0.623134
true
true
f70f67632a3e49c17b9d54c76405c03ad7b33836
2,341
py
Python
bomber.py
SashaSarzh/InstagramDirectBomber
050f601860d6d1bd094cd209fba86a8f02ffc2b0
[ "Unlicense" ]
5
2020-10-13T13:16:43.000Z
2021-12-10T08:20:44.000Z
bomber.py
SashaSarzh/InstagramDirectBomber
050f601860d6d1bd094cd209fba86a8f02ffc2b0
[ "Unlicense" ]
1
2021-12-10T09:05:56.000Z
2021-12-10T09:05:56.000Z
bomber.py
SashaSarzh/InstagramDirectBomber
050f601860d6d1bd094cd209fba86a8f02ffc2b0
[ "Unlicense" ]
3
2020-10-13T16:03:57.000Z
2021-12-28T06:34:35.000Z
from InstagramAPI import InstagramAPI from colorama import Fore, Back, Style import getpass import sys import webbrowser import time import requests import json print(Fore.GREEN + """ ░░███╗░░███╗░░██╗░██████╗████████╗░░██╗██╗██████╗░░█████╗░███╗░░░███╗██████╗░██████╗░██████╗░ ░████║░░████╗░██║██╔════╝...
28.204819
125
0.470739
from InstagramAPI import InstagramAPI from colorama import Fore, Back, Style import getpass import sys import webbrowser import time import requests import json print(Fore.GREEN + """ ░░███╗░░███╗░░██╗░██████╗████████╗░░██╗██╗██████╗░░█████╗░███╗░░░███╗██████╗░██████╗░██████╗░ ░████║░░████╗░██║██╔════╝...
true
true
f70f68ac77916fe59476135cbaa77a1fc88fd642
17,623
py
Python
exports_and_stats.py
UB-Dortmund/mms
39dbb4bee68ee951ee0a5324c684b86a76d0ab6d
[ "Unlicense" ]
null
null
null
exports_and_stats.py
UB-Dortmund/mms
39dbb4bee68ee951ee0a5324c684b86a76d0ab6d
[ "Unlicense" ]
null
null
null
exports_and_stats.py
UB-Dortmund/mms
39dbb4bee68ee951ee0a5324c684b86a76d0ab6d
[ "Unlicense" ]
null
null
null
# The MIT License # # Copyright 2015-2017 University Library Bochum <bibliogaphie-ub@rub.de> and UB Dortmund <api.ub@tu-dortmund.de>. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software wit...
35.74645
130
0.511037
from __future__ import (absolute_import, division, print_function, unicode_literals) import logging import re from logging.handlers import RotatingFileHandler from bs4 import BeautifulSoup import requests import simplejson as json from flask import Flask, request, jsonify, url_for from flask im...
true
true
f70f69db064aa00e8a22d18234f4e4bfb925c067
5,053
py
Python
tools/harness-automation/autothreadharness/harness_controller.py
ltaoti/openthread
b24192267d56c9a175739d8b2a285bc4b701deaf
[ "BSD-3-Clause" ]
3
2018-06-20T11:13:33.000Z
2020-12-08T15:15:10.000Z
tools/harness-automation/autothreadharness/harness_controller.py
ltaoti/openthread
b24192267d56c9a175739d8b2a285bc4b701deaf
[ "BSD-3-Clause" ]
2
2017-03-23T07:47:54.000Z
2017-08-21T03:12:31.000Z
tools/harness-automation/autothreadharness/harness_controller.py
ltaoti/openthread
b24192267d56c9a175739d8b2a285bc4b701deaf
[ "BSD-3-Clause" ]
3
2017-08-29T01:31:57.000Z
2020-05-07T22:56:52.000Z
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 # notic...
36.883212
115
0.622798
import ConfigParser import logging import os import subprocess import time from autothreadharness import settings logger = logging.getLogger(__name__) HARNESS_SVN_VERSION_R44 = 1471 def _try_kill(proc): logger.info('Try kill process') times = 1 while proc.poll() is None: ...
true
true
f70f6bcb10f8446af8069e8b93a6ae0bef8dac89
4,415
py
Python
dragonchain/lib/dao/smart_contract_dao.py
cheeseandcereal/dragonchain
34d34e344b887c2a0eeb591ede2015cc2506a323
[ "Apache-2.0" ]
null
null
null
dragonchain/lib/dao/smart_contract_dao.py
cheeseandcereal/dragonchain
34d34e344b887c2a0eeb591ede2015cc2506a323
[ "Apache-2.0" ]
null
null
null
dragonchain/lib/dao/smart_contract_dao.py
cheeseandcereal/dragonchain
34d34e344b887c2a0eeb591ede2015cc2506a323
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Dragonchain, Inc. # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # 6. Tr...
43.284314
146
0.755379
from typing import List, Optional, Dict from dragonchain import logger from dragonchain import exceptions from dragonchain.lib.dto import smart_contract_model from dragonchain.lib.interfaces import storage from dragonchain.lib.database import redisearch from dragonchain.lib import faas FOLDER = "SMA...
true
true
f70f6c1aeecb37a118fbcfe765ce6106f98b5a2d
3,643
py
Python
paddle_quantum/QAOA/example/main.py
xinwang1/Quantum
0f56e36e9e6111547547ae1b6cd5df307b41c1ac
[ "Apache-2.0" ]
null
null
null
paddle_quantum/QAOA/example/main.py
xinwang1/Quantum
0f56e36e9e6111547547ae1b6cd5df307b41c1ac
[ "Apache-2.0" ]
null
null
null
paddle_quantum/QAOA/example/main.py
xinwang1/Quantum
0f56e36e9e6111547547ae1b6cd5df307b41c1ac
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
32.526786
113
0.681581
from paddle import fluid import os import numpy as np import matplotlib.pyplot as plt import networkx as nx from paddle_quantum.utils import pauli_str_to_matrix from paddle_quantum.QAOA.Paddle_QAOA import Paddle_QAOA from paddle_quantum.QAOA.QAOA_Prefunc import generate_graph, H_generator def main(N=...
true
true
f70f6c2e837dc663e4225ba197c388dee678dd48
624
py
Python
Algorithms/0091_Decode_Ways/Python/Decode_Ways_Solution_1.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
Algorithms/0091_Decode_Ways/Python/Decode_Ways_Solution_1.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
Algorithms/0091_Decode_Ways/Python/Decode_Ways_Solution_1.py
lht19900714/Leetcode_Solutions
dac7a038329a5c1f8a78e86cc6f49116b963f1fb
[ "MIT" ]
null
null
null
# Space: O(n) # Time: O(n) class Solution: def numDecodings(self, s: str) -> int: if len(s) == 0: return 0 self.cache = {} self.cache[''] = 1 def recursive(string): if string in self.cache: return self.cache[string] if string[0] == '0': return 0 ...
19.5
62
0.491987
class Solution: def numDecodings(self, s: str) -> int: if len(s) == 0: return 0 self.cache = {} self.cache[''] = 1 def recursive(string): if string in self.cache: return self.cache[string] if string[0] == '0': return 0 if len(string) == 1: ret...
true
true
f70f6d36aba38dbe1415ec7683f3960500689480
968
py
Python
tempest/api/compute/security_groups/base.py
KiranPawar72/tempest
1fef3dd92b083055793065dd0693454735ec2c01
[ "Apache-2.0" ]
3
2016-07-15T12:27:23.000Z
2021-04-23T04:41:10.000Z
tempest/api/compute/security_groups/base.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/security_groups/base.py
LIS/lis-tempest
8e6403b2d6de81c5d18ed867b4977385c8278b75
[ "Apache-2.0" ]
12
2016-07-14T18:13:05.000Z
2017-07-08T18:45:42.000Z
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
37.230769
78
0.737603
from tempest.api.compute import base class BaseSecurityGroupsTest(base.BaseV2ComputeTest): @classmethod def setup_credentials(cls): cls.set_network_resources(network=True, subnet=True) super(BaseSecurityGroupsTest, cls).setup_credentials()
true
true
f70f6ea82999764663604c0defd9f8fd956a3e54
43
py
Python
embedvideos/__init__.py
vkaracic/EmbedVideosXBlock
e0cd04b41d655d8e8e69c6c9c4c0a41c22600965
[ "MIT" ]
null
null
null
embedvideos/__init__.py
vkaracic/EmbedVideosXBlock
e0cd04b41d655d8e8e69c6c9c4c0a41c22600965
[ "MIT" ]
null
null
null
embedvideos/__init__.py
vkaracic/EmbedVideosXBlock
e0cd04b41d655d8e8e69c6c9c4c0a41c22600965
[ "MIT" ]
null
null
null
from .embedvideos import EmbedVideosXBlock
21.5
42
0.883721
from .embedvideos import EmbedVideosXBlock
true
true
f70f70495df42bcff3545d60f74aba312be6b44a
228
py
Python
vininfo/__init__.py
ghilesmeddour/vininfo
63cbf7dcdd9d106fb9c9a56d5c4f11c3dd794b1d
[ "BSD-3-Clause" ]
60
2018-07-28T14:53:57.000Z
2022-02-22T12:11:24.000Z
vininfo/__init__.py
ghilesmeddour/vininfo
63cbf7dcdd9d106fb9c9a56d5c4f11c3dd794b1d
[ "BSD-3-Clause" ]
16
2018-07-30T08:57:08.000Z
2021-12-25T09:20:03.000Z
vininfo/__init__.py
ghilesmeddour/vininfo
63cbf7dcdd9d106fb9c9a56d5c4f11c3dd794b1d
[ "BSD-3-Clause" ]
29
2018-07-30T08:36:07.000Z
2022-03-09T12:02:06.000Z
from .toolbox import Vin from .exceptions import ValidationError, VininfoException VERSION = (1, 6, 0) """Application version number tuple.""" VERSION_STR = '.'.join(map(str, VERSION)) """Application version number string."""
25.333333
57
0.736842
from .toolbox import Vin from .exceptions import ValidationError, VininfoException VERSION = (1, 6, 0) VERSION_STR = '.'.join(map(str, VERSION))
true
true
f70f70dc9554cc5a86433d7d1c74bb4e02d3ad76
46,498
py
Python
gbxml/gbxml.py
building-energy/gbxml
039edf6e33cccbb76dcda5fbb871aeb950ad0a87
[ "MIT" ]
5
2020-04-24T15:59:45.000Z
2022-02-23T14:40:14.000Z
gbxml/gbxml.py
building-energy/gbxml
039edf6e33cccbb76dcda5fbb871aeb950ad0a87
[ "MIT" ]
2
2021-07-05T12:09:09.000Z
2022-02-05T07:05:59.000Z
gbxml/gbxml.py
building-energy/gbxml
039edf6e33cccbb76dcda5fbb871aeb950ad0a87
[ "MIT" ]
1
2020-04-24T15:59:48.000Z
2020-04-24T15:59:48.000Z
# -*- coding: utf-8 -*- from lxml import etree import pkgutil from io import BytesIO from . import xml_functions, construction_functions, layer_functions from . import surface_functions, space_functions, building_functions from . import opening_functions, zone_functions class Gbxml(): "A class that represents a ...
31.652825
93
0.549486
from lxml import etree import pkgutil from io import BytesIO from . import xml_functions, construction_functions, layer_functions from . import surface_functions, space_functions, building_functions from . import opening_functions, zone_functions class Gbxml(): def __init__(self, gbxml_fp=...
true
true
f70f71544831b4d1ffff7c6948b00d3bdd751afe
38,151
py
Python
google/net/proto2/python/internal/python_message.py
vladushakov987/appengine_python3
0dd481c73e2537a50ee10f1b79cd65938087e555
[ "Apache-2.0" ]
null
null
null
google/net/proto2/python/internal/python_message.py
vladushakov987/appengine_python3
0dd481c73e2537a50ee10f1b79cd65938087e555
[ "Apache-2.0" ]
null
null
null
google/net/proto2/python/internal/python_message.py
vladushakov987/appengine_python3
0dd481c73e2537a50ee10f1b79cd65938087e555
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
30.182753
86
0.720925
from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import str from builtins import range from builtins import object import sys import six from six.moves import range if sys.version_info[0] < 3: try: from io impor...
true
true
f70f7266246a72a1f47bb872e52660dc84524048
167
py
Python
REL/ner/__init__.py
theblackcat102/REL
9daaf924d3b7ee75ba0738fd218ddbaeab989bd8
[ "MIT" ]
210
2020-02-27T14:10:57.000Z
2022-03-30T01:32:52.000Z
REL/ner/__init__.py
theblackcat102/REL
9daaf924d3b7ee75ba0738fd218ddbaeab989bd8
[ "MIT" ]
69
2020-03-06T09:58:43.000Z
2022-03-31T16:24:35.000Z
REL/ner/__init__.py
cnnlabs/REL
7e680a13fb26cb23d9ba9ea45efd01cb4c6c7871
[ "MIT" ]
57
2020-02-28T15:52:33.000Z
2022-03-16T11:28:19.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from REL.ner.base import NERBase, Span from REL.ner.flair_wrapper import load_flair_ner from REL.ner.ngram import Cmns
23.857143
48
0.748503
from REL.ner.base import NERBase, Span from REL.ner.flair_wrapper import load_flair_ner from REL.ner.ngram import Cmns
true
true
f70f729a2c7bd23c7413efdf4accb9acf8f8503f
411
py
Python
main.py
deadaf/tickets-bot
1f72668a6843cb67daa77e911057775f9d9a37f1
[ "MIT" ]
5
2021-02-05T05:50:29.000Z
2021-08-17T16:09:59.000Z
main.py
deadaf/tickets-bot
1f72668a6843cb67daa77e911057775f9d9a37f1
[ "MIT" ]
null
null
null
main.py
deadaf/tickets-bot
1f72668a6843cb67daa77e911057775f9d9a37f1
[ "MIT" ]
3
2021-03-20T13:01:16.000Z
2022-03-05T12:38:24.000Z
import discord from discord.ext import commands from discord.ext.commands import has_permissions, MissingPermissions import json import asyncio bot = commands.Bot(command_prefix=".") bot.remove_command("help") @bot.event async def on_ready(): print("Bot running with:") print("Username: ", bot.user.name) p...
19.571429
68
0.729927
import discord from discord.ext import commands from discord.ext.commands import has_permissions, MissingPermissions import json import asyncio bot = commands.Bot(command_prefix=".") bot.remove_command("help") @bot.event async def on_ready(): print("Bot running with:") print("Username: ", bot.user.name) p...
true
true
f70f73cdbebb8824480c01d15f16886fcde78be7
914
py
Python
corehq/motech/dhis2/migrations/0006_sqldhis2connection.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/motech/dhis2/migrations/0006_sqldhis2connection.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/motech/dhis2/migrations/0006_sqldhis2connection.py
dimagilg/commcare-hq
ea1786238eae556bb7f1cbd8d2460171af1b619c
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.26 on 2020-01-14 21:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('dhis2', '0005_delete_jsonapilog'), ] operations = [ mi...
31.517241
114
0.601751
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('dhis2', '0005_delete_jsonapilog'), ] operations = [ migrations.CreateModel( name='SQLDhis2Connection', ...
true
true
f70f74b17c66f2afe1b4d538e6f2c4b8da58986d
37,822
py
Python
src/pip/_internal/index/package_finder.py
Shivansh-007/pip
0c284520c6d068cb25ac89d9dbee0456c2eba23a
[ "MIT" ]
1
2022-03-14T20:15:00.000Z
2022-03-14T20:15:00.000Z
src/pip/_internal/index/package_finder.py
Shivansh-007/pip
0c284520c6d068cb25ac89d9dbee0456c2eba23a
[ "MIT" ]
1
2022-01-27T19:09:25.000Z
2022-01-27T19:09:25.000Z
src/pip/_internal/index/package_finder.py
Shivansh-007/pip
0c284520c6d068cb25ac89d9dbee0456c2eba23a
[ "MIT" ]
1
2021-09-27T11:14:58.000Z
2021-09-27T11:14:58.000Z
"""Routines related to PyPI, indexes""" # The following comment should be removed at some point in the future. # mypy: strict-optional=False import enum import functools import itertools import logging import re from typing import FrozenSet, Iterable, List, Optional, Set, Tuple, Union from pip._vendor.packaging impo...
36.684772
88
0.631749
import enum import functools import itertools import logging import re from typing import FrozenSet, Iterable, List, Optional, Set, Tuple, Union from pip._vendor.packaging import specifiers from pip._vendor.packaging.tags import Tag from pip._vendor.packaging.utils import canonicalize_name from pip._vendor.packagi...
true
true
f70f74c49693a3c8825166a36842545400ad789b
2,992
py
Python
algorithms/anchor_detector.py
songheony/AAA-multi
80a988d8d312664d8ca19dee82c844183cf4f55d
[ "MIT" ]
null
null
null
algorithms/anchor_detector.py
songheony/AAA-multi
80a988d8d312664d8ca19dee82c844183cf4f55d
[ "MIT" ]
null
null
null
algorithms/anchor_detector.py
songheony/AAA-multi
80a988d8d312664d8ca19dee82c844183cf4f55d
[ "MIT" ]
1
2021-03-01T06:58:15.000Z
2021-03-01T06:58:15.000Z
from .aaa_util import eval_results, get_summary, convert_df class AnchorDetector: def __init__(self, offline): self.offline = offline def initialize(self, seq_info): self.seq_info = seq_info self.previous_offline = None def fixed_detect(self, frame_idx, duration): feedbac...
35.2
85
0.60127
from .aaa_util import eval_results, get_summary, convert_df class AnchorDetector: def __init__(self, offline): self.offline = offline def initialize(self, seq_info): self.seq_info = seq_info self.previous_offline = None def fixed_detect(self, frame_idx, duration): feedbac...
true
true
f70f74dd4d6743c0e5a61696e8f4284ad3a589ae
300
py
Python
maxsmi/tests/test_maxsmi.py
t-kimber/maxsmi
d7d52a9ba95efb6b4219928425bb5de965c4b3b5
[ "MIT" ]
1
2021-01-22T17:56:54.000Z
2021-01-22T17:56:54.000Z
maxsmi/tests/test_maxsmi.py
t-kimber/maxsmi
d7d52a9ba95efb6b4219928425bb5de965c4b3b5
[ "MIT" ]
12
2020-10-16T10:13:56.000Z
2021-04-14T07:25:05.000Z
maxsmi/tests/test_maxsmi.py
t-kimber/maxsmi
d7d52a9ba95efb6b4219928425bb5de965c4b3b5
[ "MIT" ]
null
null
null
""" Unit and regression test for the maxsmi package. """ # Import package, test suite, and other packages as needed # import maxsmi # import pytest import sys def test_maxsmi_imported(): """Sample test, will always pass so long as import statement worked""" assert "maxsmi" in sys.modules
21.428571
74
0.73
import sys def test_maxsmi_imported(): assert "maxsmi" in sys.modules
true
true
f70f75b56fefe5b1ddf643a702b9df5d8dde9dd9
1,130
py
Python
catalyst/assets/__init__.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
catalyst/assets/__init__.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
catalyst/assets/__init__.py
guilhermeprokisch/catalyst
21e096b261912d9e905584178d6ee626072c23cb
[ "Apache-2.0" ]
null
null
null
# # Copyright 2015 Quantopian, Inc. # # 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...
26.27907
75
0.69646
from ._assets import ( Asset, Equity, Future, make_asset_array, CACHE_FILE_TEMPLATE ) from .assets import ( AssetFinder, AssetConvertible, PricingDataAssociable, ) from .asset_db_schema import ASSET_DB_VERSION from .asset_writer import AssetDBWriter __all_...
true
true
f70f76797352e63f38e9029343013e191ad89605
3,744
py
Python
ansible/plugins/action/sros.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ansible/plugins/action/sros.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/plugins/action/sros.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
36.705882
118
0.654647
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import sys import copy from ansible import constants as C from ansible.plugins.action.normal import ActionModule as _ActionModule from ansible.module_utils.sros import sros_argument_spec from ansible.module_utils...
true
true
f70f78983d59b550f32fb5bc0b61b997923e1baf
11,459
py
Python
graphsense/model/entity_tags.py
iknaio/graphsense-python
b61c66b6ec0bb9720036ae61777e90ce63a971cc
[ "MIT" ]
null
null
null
graphsense/model/entity_tags.py
iknaio/graphsense-python
b61c66b6ec0bb9720036ae61777e90ce63a971cc
[ "MIT" ]
1
2022-02-24T11:21:49.000Z
2022-02-24T11:21:49.000Z
graphsense/model/entity_tags.py
INTERPOL-Innovation-Centre/GraphSense-Maltego-transform
2a9b352289ab64903a7012c5d84cb4c6d8172ade
[ "MIT" ]
null
null
null
""" GraphSense API GraphSense API # noqa: E501 The version of the OpenAPI document: 0.5.1 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from graphsense.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, M...
42.128676
121
0.569421
import re import sys from graphsense.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) from .....
true
true
f70f79489ce5d6799a41c07cf1757179521b1ce4
2,632
py
Python
the_mechanic_backend/apps/stock/migrations/0003_sparecustomer_spareorder_sparesold.py
muthukumar4999/the-mechanic-backend
1e31affddf60d2de72445a85dd2055bdeba6f670
[ "MIT" ]
null
null
null
the_mechanic_backend/apps/stock/migrations/0003_sparecustomer_spareorder_sparesold.py
muthukumar4999/the-mechanic-backend
1e31affddf60d2de72445a85dd2055bdeba6f670
[ "MIT" ]
5
2020-06-05T22:30:20.000Z
2021-09-08T01:12:27.000Z
the_mechanic_backend/apps/stock/migrations/0003_sparecustomer_spareorder_sparesold.py
muthukumar4999/the-mechanic-backend
1e31affddf60d2de72445a85dd2055bdeba6f670
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2019-03-31 18:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODE...
49.660377
178
0.602204
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('stock', '0002_spare_store'), ...
true
true
f70f797573bfd52476fcff70d64ce151275711dc
3,122
py
Python
meteors.py
Stafferson/YandexLycP2
f5c50cc89ca6716612f0b91f2e22315c414d5541
[ "MIT" ]
null
null
null
meteors.py
Stafferson/YandexLycP2
f5c50cc89ca6716612f0b91f2e22315c414d5541
[ "MIT" ]
null
null
null
meteors.py
Stafferson/YandexLycP2
f5c50cc89ca6716612f0b91f2e22315c414d5541
[ "MIT" ]
null
null
null
import os import sys import random import pygame def load_image(name, colorkey=None): # not sure if this method is needed fullname = os.path.join('data', name) # если файл не существует, то выходим if not os.path.isfile(fullname): print(f"Файл с изображением '{fullname}' не найден") sys.e...
35.078652
100
0.601217
import os import sys import random import pygame def load_image(name, colorkey=None): fullname = os.path.join('data', name) if not os.path.isfile(fullname): print(f"Файл с изображением '{fullname}' не найден") sys.exit() image = pygame.image.load(fullname) return image enemi...
true
true
f70f79ef125a14fdd24574d066c3d6d527e43b4f
330
py
Python
flask_app/__init__.py
maawoo/S1GRASS-Webapp
b34335f2aaa64dff075b955b98ad01f062ba9891
[ "Unlicense" ]
null
null
null
flask_app/__init__.py
maawoo/S1GRASS-Webapp
b34335f2aaa64dff075b955b98ad01f062ba9891
[ "Unlicense" ]
1
2020-09-10T12:18:37.000Z
2020-09-10T12:18:37.000Z
flask_app/__init__.py
maawoo/S1GRASS-Webapp
b34335f2aaa64dff075b955b98ad01f062ba9891
[ "Unlicense" ]
2
2020-09-09T13:37:45.000Z
2021-04-23T18:57:24.000Z
from config import Config from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_bootstrap import Bootstrap app = Flask(__name__) app.config.from_object(Config) db = SQLAlchemy(app) migrate = Migrate(app, db) bootstrap = Bootstrap(app) from flask_app import route...
22
39
0.818182
from config import Config from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_bootstrap import Bootstrap app = Flask(__name__) app.config.from_object(Config) db = SQLAlchemy(app) migrate = Migrate(app, db) bootstrap = Bootstrap(app) from flask_app import route...
true
true
f70f7a2b99b2903b8866d778aaaf850f6f9f1fa1
6,688
py
Python
gammapy/utils/testing.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
1
2017-11-22T17:07:56.000Z
2017-11-22T17:07:56.000Z
gammapy/utils/testing.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
null
null
null
gammapy/utils/testing.py
Rishank2610/gammapy
3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76
[ "BSD-3-Clause" ]
1
2019-09-04T14:03:33.000Z
2019-09-04T14:03:33.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Utilities for testing""" import os import sys from numpy.testing import assert_allclose import astropy.units as u from astropy.coordinates import SkyCoord from astropy.time import Time __all__ = [ "requires_dependency", "requires_data", "mp...
27.866667
80
0.643541
import os import sys from numpy.testing import assert_allclose import astropy.units as u from astropy.coordinates import SkyCoord from astropy.time import Time __all__ = [ "requires_dependency", "requires_data", "mpl_plot_check", "assert_quantity_allclose", "assert_skycoord_allclose", "assert_...
true
true
f70f7a739c8358bfeaf9b03fd0832dae1581d974
1,088
py
Python
src/snlayers/snconv1d.py
Zihang97/PAGAN
9233fc54ecf49d6a82bb0794333d61f707439a68
[ "MIT" ]
29
2019-11-04T12:46:17.000Z
2022-02-19T10:06:16.000Z
src/snlayers/snconv1d.py
Zihang97/PAGAN
9233fc54ecf49d6a82bb0794333d61f707439a68
[ "MIT" ]
2
2020-07-05T04:15:57.000Z
2021-04-10T03:45:09.000Z
src/snlayers/snconv1d.py
Zihang97/PAGAN
9233fc54ecf49d6a82bb0794333d61f707439a68
[ "MIT" ]
9
2020-05-04T01:23:37.000Z
2021-07-13T06:47:02.000Z
# coding=utf-8 import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules import conv from torch.nn.modules.utils import _single from ..functions.max_sv import max_singular_value class SNConv1d(conv._ConvNd): def __init__(self, in_channels, out_channels, kernel_size, stride=1, paddin...
36.266667
117
0.682904
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules import conv from torch.nn.modules.utils import _single from ..functions.max_sv import max_singular_value class SNConv1d(conv._ConvNd): def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=...
true
true
f70f7a9a71e9c09452054da1066ca9dc4f363773
678
py
Python
tf_agents/agents/sac/__init__.py
FlorisHoogenboom/agents
2cd5a61e1838b52012271f1fb8617c29a55279a9
[ "Apache-2.0" ]
16
2020-09-23T06:21:49.000Z
2022-03-28T05:45:04.000Z
tf_agents/agents/sac/__init__.py
FlorisHoogenboom/agents
2cd5a61e1838b52012271f1fb8617c29a55279a9
[ "Apache-2.0" ]
13
2019-06-18T03:36:39.000Z
2019-08-28T18:30:29.000Z
tf_agents/agents/sac/__init__.py
FlorisHoogenboom/agents
2cd5a61e1838b52012271f1fb8617c29a55279a9
[ "Apache-2.0" ]
6
2020-10-09T06:33:23.000Z
2022-02-03T16:16:36.000Z
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
37.666667
74
0.759587
from tf_agents.agents.sac import sac_agent
true
true
f70f7ac9a07e731a63b7367bb5601c7b352c07cb
6,766
py
Python
src/classifiers.py
samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers
619c5c0b17438d1014f7ca7e4ce13cc44c45de3c
[ "MIT" ]
1
2020-11-17T16:09:13.000Z
2020-11-17T16:09:13.000Z
src/classifiers.py
samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers
619c5c0b17438d1014f7ca7e4ce13cc44c45de3c
[ "MIT" ]
null
null
null
src/classifiers.py
samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers
619c5c0b17438d1014f7ca7e4ce13cc44c45de3c
[ "MIT" ]
4
2019-07-05T02:03:02.000Z
2022-01-21T22:12:16.000Z
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ classifiers.py ] # Synopsis [ 'Naive Bayes' and 'Decision Tree' training, testing, and tunning functions ] # Author [ Ting-Wei Liu (Andi611) ] # Copyright [...
31.915094
149
0.649571
n.model_selection import cross_val_score from sklearn import metrics from sklearn import tree DISTRIBUTION = 'Multinominal' cross_validate = False self.MODEL = MODEL if self.MODEL == 'NEWS': self.models = { 'Guassian' : GaussianNB(), 'Multinominal' : MultinomialNB(alpha=0.065), 'Comp...
true
true
f70f7cdaa34aef41cecf2fa32f6c3bc75d3c6636
19
py
Python
xontrib/avox_poetry/__init__.py
jnoortheen/xontrib-avox-poetry
aef6fd087108ec66c53e473d9492ae99c357a00e
[ "MIT" ]
3
2021-02-21T05:46:52.000Z
2021-12-01T16:07:31.000Z
xontrib/avox_poetry/__init__.py
jnoortheen/xontrib-avox-poetry
aef6fd087108ec66c53e473d9492ae99c357a00e
[ "MIT" ]
3
2021-03-03T22:49:35.000Z
2022-03-17T15:40:19.000Z
xontrib/avox_poetry/__init__.py
jnoortheen/xontrib-avox-poetry
aef6fd087108ec66c53e473d9492ae99c357a00e
[ "MIT" ]
1
2022-03-20T18:20:54.000Z
2022-03-20T18:20:54.000Z
from . import venv
9.5
18
0.736842
from . import venv
true
true
f70f7e6d8c477abc39ccd009b82ebc37062afbec
561
py
Python
Curve/Parms.py
olesmith/SmtC
dfae5097f02192b60aae05b9d02404fcfe893be3
[ "CC0-1.0" ]
null
null
null
Curve/Parms.py
olesmith/SmtC
dfae5097f02192b60aae05b9d02404fcfe893be3
[ "CC0-1.0" ]
null
null
null
Curve/Parms.py
olesmith/SmtC
dfae5097f02192b60aae05b9d02404fcfe893be3
[ "CC0-1.0" ]
null
null
null
class Curve_Parms(): def Curve_Parms_Paths(self): return [str(self.a),str(self.b),str(self.c),str(self.NFrames)] def Curve_Parms_Path(self): return "/".join( self.Curve_Parms_Paths() ) def Curve_Parms_FileName(self,cname,fname,ext="svg"): fnames=self.Curve_Parms_Paths()...
22.44
71
0.561497
class Curve_Parms(): def Curve_Parms_Paths(self): return [str(self.a),str(self.b),str(self.c),str(self.NFrames)] def Curve_Parms_Path(self): return "/".join( self.Curve_Parms_Paths() ) def Curve_Parms_FileName(self,cname,fname,ext="svg"): fnames=self.Curve_Parms_Paths()...
true
true
f70f7e730fa4c4fa5d6d670b19ebb19549c82ecc
79,847
py
Python
src/opserver/test/test_analytics_uve.py
codilime/contrail-controller-arch
e87a974950fc1bbdc2b834212dbdfee5e94008de
[ "Apache-2.0" ]
null
null
null
src/opserver/test/test_analytics_uve.py
codilime/contrail-controller-arch
e87a974950fc1bbdc2b834212dbdfee5e94008de
[ "Apache-2.0" ]
null
null
null
src/opserver/test/test_analytics_uve.py
codilime/contrail-controller-arch
e87a974950fc1bbdc2b834212dbdfee5e94008de
[ "Apache-2.0" ]
1
2020-07-04T12:08:02.000Z
2020-07-04T12:08:02.000Z
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # analytics_uvetest.py # # UVE and Alarm tests # import os import sys import threading threading._DummyThread._Thread__stop = lambda x: 42 import signal import gevent from gevent import monkey monkey.patch_all() import unitt...
42.471809
85
0.36218
import os import sys import threading threading._DummyThread._Thread__stop = lambda x: 42 import signal import gevent from gevent import monkey monkey.patch_all() import unittest import testtools import fixtures import socket from utils.util import obj_to_dict, find_buildroot from utils.analytics_fixture im...
true
true
f70f7f844b3f8ee5ade345d734bba14d2d862c60
8,736
py
Python
PyPowerDNS/api.py
TheDJVG/PyPowerDNS
2e0e47c3bb7a7b20c08ddfa6f0cd93e663d02dc7
[ "MIT" ]
1
2021-04-05T21:40:34.000Z
2021-04-05T21:40:34.000Z
PyPowerDNS/api.py
TheDJVG/PyPowerDNS
2e0e47c3bb7a7b20c08ddfa6f0cd93e663d02dc7
[ "MIT" ]
1
2020-09-21T15:00:44.000Z
2020-09-22T00:38:15.000Z
PyPowerDNS/api.py
TheDJVG/PyPowerDNS
2e0e47c3bb7a7b20c08ddfa6f0cd93e663d02dc7
[ "MIT" ]
null
null
null
from .objects import Server, Zone, RRSet, Record, Comment, Cryptokey, Metadata, SearchResult, StatisticItem, \ MapStatisticItem, RingStatisticItem, SimpleStatisticItem, CacheFlushResult from .exceptions import PDNSApiException, PDNSApiNotFound import json from functools import partial import requests import loggin...
38.484581
110
0.615156
from .objects import Server, Zone, RRSet, Record, Comment, Cryptokey, Metadata, SearchResult, StatisticItem, \ MapStatisticItem, RingStatisticItem, SimpleStatisticItem, CacheFlushResult from .exceptions import PDNSApiException, PDNSApiNotFound import json from functools import partial import requests import loggin...
true
true
f70f80addbf2038f17208bc47e55b1fabb3e74e7
5,534
py
Python
ezcoach/ezcoach/agent.py
Pawel-M/EZ-Coach
ee078b8ab7409730e99cb38653d03aa574ab914b
[ "MIT" ]
1
2021-09-14T13:17:33.000Z
2021-09-14T13:17:33.000Z
ezcoach/ezcoach/agent.py
Pawel-M/EZ-Coach
ee078b8ab7409730e99cb38653d03aa574ab914b
[ "MIT" ]
null
null
null
ezcoach/ezcoach/agent.py
Pawel-M/EZ-Coach
ee078b8ab7409730e99cb38653d03aa574ab914b
[ "MIT" ]
null
null
null
""" The agent module contains three abstract classes that are subclassed in order to create algorithms. The classes are: * Player - for an algorithm that cannot learn and can only play * Learner - for a learning algorithm controlling a single agent * MultiLearner - for a learning algorithm of controlling a number of a...
36.893333
117
0.669859
import abc from typing import List, Iterable from ezcoach.enviroment import Manifest class Player(abc.ABC): @abc.abstractmethod def initialize(self, manifest: Manifest): @abc.abstractmethod def act(self, state): @classmethod def __subclasshook__(cls, obj): if cls is Player: ...
true
true
f70f81401c08d654abb1e9dcd49531c69b6cbd11
8,969
py
Python
ceilometer/tests/alarm/test_notifier.py
NeCTAR-RC/ceilometer
25cb8740b83bfbf5c526be816fa3ae10f936bff5
[ "Apache-2.0" ]
1
2015-02-26T03:23:09.000Z
2015-02-26T03:23:09.000Z
ceilometer/tests/alarm/test_notifier.py
NeCTAR-RC/ceilometer
25cb8740b83bfbf5c526be816fa3ae10f936bff5
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/alarm/test_notifier.py
NeCTAR-RC/ceilometer
25cb8740b83bfbf5c526be816fa3ae10f936bff5
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright © 2013 eNovance # # Author: Julien Danjou <julien@danjou.info> # # 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/...
42.709524
79
0.563051
import six.moves.urllib.parse as urlparse import mock import requests from ceilometer.alarm import service from ceilometer.openstack.common import context from ceilometer.openstack.common.fixture import config from ceilometer.openstack.common import test DATA_JSON = ('{"current": "ALARM", "alarm_id...
true
true
f70f82382935e2fef97fc4bfb9b6127666b2db6e
1,793
py
Python
app.py
ds19991999/CKUser
c66ebda6ef5068a79b816de2c57a443b25d7096d
[ "MIT" ]
null
null
null
app.py
ds19991999/CKUser
c66ebda6ef5068a79b816de2c57a443b25d7096d
[ "MIT" ]
null
null
null
app.py
ds19991999/CKUser
c66ebda6ef5068a79b816de2c57a443b25d7096d
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding:utf-8 -*- from ckuser import client,server import os def print_client_menu(): print("用户菜单:") print("-"*25) print("0"+"-"*10+"显示用户菜单"+"-"*10) print("1"+"-"*10+"显示服务菜单"+"-"*10) print("2"+"-"*10+"用户登录系统"+"-"*10) print("3"+"-"*10+"用户修改信息"+"-"*10) print("4"+"-"*10+"用户注册信息"+"-"*10) pr...
19.703297
34
0.557167
from ckuser import client,server import os def print_client_menu(): print("用户菜单:") print("-"*25) print("0"+"-"*10+"显示用户菜单"+"-"*10) print("1"+"-"*10+"显示服务菜单"+"-"*10) print("2"+"-"*10+"用户登录系统"+"-"*10) print("3"+"-"*10+"用户修改信息"+"-"*10) print("4"+"-"*10+"用户注册信息"+"-"*10) print("6"+"-"*10+"退出系统") def print_server...
true
true
f70f84ea78513abd82f40253fd127865d7f56a02
2,181
py
Python
sound_factory/sound_factory.py
jphacks/C_2008
65d7a1d3a90045b149397cdd1e038ab648bb842e
[ "MIT" ]
2
2020-11-28T05:10:48.000Z
2020-11-29T01:23:53.000Z
sound_factory/sound_factory.py
jphacks/C_2008
65d7a1d3a90045b149397cdd1e038ab648bb842e
[ "MIT" ]
5
2020-11-01T06:34:02.000Z
2020-11-01T06:37:46.000Z
sound_factory/sound_factory.py
jphacks/C_2008
65d7a1d3a90045b149397cdd1e038ab648bb842e
[ "MIT" ]
null
null
null
import os import re import argparse import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras.preprocessing.image import load_img, img_to_array IMAGE_SHAPE = [(224, 224), (240, 240), (260, 260), (300, 300), (380, 380), (456, 456), (528, 528), (600, 600)] def main(paths : list, mod...
41.942308
149
0.604768
import os import re import argparse import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras.preprocessing.image import load_img, img_to_array IMAGE_SHAPE = [(224, 224), (240, 240), (260, 260), (300, 300), (380, 380), (456, 456), (528, 528), (600, 600)] def main(paths : list, mod...
true
true
f70f862db871c216db3b2e5ea714abdc5fdf04bd
3,238
py
Python
scripts/load_file_into_mod.py
strategineer/crusader_kings_3_mods
e290c3e8e542875c0ced2d1b7a013eb85b2037fb
[ "MIT" ]
null
null
null
scripts/load_file_into_mod.py
strategineer/crusader_kings_3_mods
e290c3e8e542875c0ced2d1b7a013eb85b2037fb
[ "MIT" ]
null
null
null
scripts/load_file_into_mod.py
strategineer/crusader_kings_3_mods
e290c3e8e542875c0ced2d1b7a013eb85b2037fb
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import os import sys from shutil import copyfile import argparse from pathlib import Path import logging logging.basicConfig(level=logging.INFO) NUMBERED_FILENAME_SPLIT_CHARACTER = "_" parser = argparse.ArgumentParser(description='') parser.add_argument('filepath', help='') parser.add_argument('--...
39.012048
149
0.774552
import os import sys from shutil import copyfile import argparse from pathlib import Path import logging logging.basicConfig(level=logging.INFO) NUMBERED_FILENAME_SPLIT_CHARACTER = "_" parser = argparse.ArgumentParser(description='') parser.add_argument('filepath', help='') parser.add_argument('--force', '-f', acti...
true
true
f70f86fe1ee1ad646b17cffe4377c00e9ea1c90b
13,474
py
Python
chapter05/blackjack.py
bhomaidan1990/reinforcement-learning-an-introduction
fbf020d9da2daec3194a17f968ef29d12ebde6f6
[ "MIT" ]
12,197
2016-10-04T03:34:49.000Z
2022-03-31T12:55:36.000Z
chapter05/blackjack.py
bhomaidan1990/reinforcement-learning-an-introduction
fbf020d9da2daec3194a17f968ef29d12ebde6f6
[ "MIT" ]
134
2016-11-01T06:06:51.000Z
2022-02-07T00:12:01.000Z
chapter05/blackjack.py
bhomaidan1990/reinforcement-learning-an-introduction
fbf020d9da2daec3194a17f968ef29d12ebde6f6
[ "MIT" ]
4,738
2016-09-27T07:38:23.000Z
2022-03-31T10:09:14.000Z
####################################################################### # Copyright (C) # # 2016-2018 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # 2016 Kenta Shimada(hyperkentakun@gmail.com) # # 2017 Nicky van Foreest(vanfore...
36.318059
113
0.635149
_sum -= 12 dealer_card -= 1 if usable_ace: states_usable_ace_count[player_sum, dealer_card] += 1 states_usable_ace[player_sum, dealer_card] += reward else: states_no_usable_ace_count[player_sum, dealer_card] += 1 states_...
true
true
f70f874944a8646dbb751573e99b3ab43f3e5dcf
1,826
py
Python
image_preprocessing.py
kpullak/PlantPhenotyping
a0b5bd68787b0850ad1d4d56cab7767cc4f2dc61
[ "Apache-2.0" ]
null
null
null
image_preprocessing.py
kpullak/PlantPhenotyping
a0b5bd68787b0850ad1d4d56cab7767cc4f2dc61
[ "Apache-2.0" ]
null
null
null
image_preprocessing.py
kpullak/PlantPhenotyping
a0b5bd68787b0850ad1d4d56cab7767cc4f2dc61
[ "Apache-2.0" ]
null
null
null
import os import cv2 source_path = './test_images/' def processImage(filename, mImage): if '2019' in filename: # ---------------------------------- # Remove noise - by applying guassian blur on src image mImage = cv2.GaussianBlur(mImage, (5, 5), cv2.BORDER_DEFAULT) # pink rgb values - 255, 153, 255 # whit...
33.814815
93
0.646769
import os import cv2 source_path = './test_images/' def processImage(filename, mImage): if '2019' in filename: mImage = cv2.GaussianBlur(mImage, (5, 5), cv2.BORDER_DEFAULT) mImage[mImage >= 128] = 200 mImage[mImage < 128] = 0 new_name = source_path + os.path.splitext(filename)[0] +...
true
true
f70f87745a9dddf3fca3ea25b23a3a50d07f934b
765
py
Python
kur/engine/__init__.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
867
2016-12-05T20:24:23.000Z
2022-02-18T09:07:14.000Z
kur/engine/__init__.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
90
2017-01-14T22:46:23.000Z
2021-02-09T13:32:27.000Z
kur/engine/__init__.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
135
2017-01-18T19:21:20.000Z
2022-01-24T16:57:59.000Z
""" Copyright 2016 Deepgram Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
34.772727
79
0.789542
from .engine import Engine, ScopeStack from .passthrough_engine import PassthroughEngine from .jinja_engine import JinjaEngine
true
true
f70f8807470cc0430f7ec49eed3f61f2abc42cb2
14,684
py
Python
sphinx_ext/design_choice.py
friendly-traceback/docs
413a1d6980b605e2305d5b0ab5757f098a1700c1
[ "CC0-1.0" ]
null
null
null
sphinx_ext/design_choice.py
friendly-traceback/docs
413a1d6980b605e2305d5b0ab5757f098a1700c1
[ "CC0-1.0" ]
3
2021-07-17T17:19:47.000Z
2022-02-01T13:39:12.000Z
sphinx_ext/design_choice.py
friendly-traceback/docs
413a1d6980b605e2305d5b0ab5757f098a1700c1
[ "CC0-1.0" ]
1
2021-07-11T12:59:46.000Z
2021-07-11T12:59:46.000Z
""" design_choice ~~~~~~~~~~~~~~ IMPORTANT: This is a straightforward adaptation of sphinx's todo extension done by search/replace. Allow design_choices to be inserted into your documentation. Inclusion of design_choices can be switched of by a configuration variable. The design_choice_li...
36.078624
127
0.649346
import warnings from typing import Any, Dict, Iterable, List, Tuple, cast from docutils import nodes from docutils.nodes import Element, Node from docutils.parsers.rst import directives from docutils.parsers.rst.directives.admonitions import BaseAdmonition import sphinx from sphinx import addnodes from sphinx.appli...
true
true
f70f8831567b456197e476ae0d16b0a4367f7af6
4,769
py
Python
src/alias/azext_alias/_validators.py
PoisonousJohn/azure-cli-extensions
cf0d7b6c031ba844dd5e43cc4e07533b85ef1269
[ "MIT" ]
1
2018-09-22T14:53:04.000Z
2018-09-22T14:53:04.000Z
src/alias/azext_alias/_validators.py
PoisonousJohn/azure-cli-extensions
cf0d7b6c031ba844dd5e43cc4e07533b85ef1269
[ "MIT" ]
null
null
null
src/alias/azext_alias/_validators.py
PoisonousJohn/azure-cli-extensions
cf0d7b6c031ba844dd5e43cc4e07533b85ef1269
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
38.772358
117
0.681275
import re import shlex from knack.util import CLIError import azext_alias from azext_alias.argument import get_placeholders from azext_alias._const import ( COLLISION_CHECK_LEVEL_DEPTH, INVALID_ALIAS_COMMAND_ERROR, EMPTY_ALIAS_ERROR, INVALID_STARTING_CHAR_ERROR, INCONSISTENT_ARG_ERROR, CO...
true
true
f70f8a2f41f8fdb18d9b0a96c1d23e7abc0f59f7
1,752
py
Python
python/lvmieb/exceptions.py
sdss/OsuActor
bf3d92448e07cefc4c1346db04b1eb9b7e00dd41
[ "BSD-3-Clause" ]
2
2021-07-30T04:38:30.000Z
2021-08-13T13:34:04.000Z
python/lvmieb/exceptions.py
sdss/OsuActor
bf3d92448e07cefc4c1346db04b1eb9b7e00dd41
[ "BSD-3-Clause" ]
4
2021-06-03T12:01:00.000Z
2021-08-14T09:34:12.000Z
python/lvmieb/exceptions.py
sdss/osuactor
bf3d92448e07cefc4c1346db04b1eb9b7e00dd41
[ "BSD-3-Clause" ]
2
2021-05-04T06:19:39.000Z
2021-05-11T08:35:02.000Z
# -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Changgon Kim, Mingeyong Yang, Taeeun Kim # @Date: 2021-04-26 17:14 # @Last modified by: Changgon Kim from __future__ import absolute_import, division, print_function class LvmIebError(Exception): """A custom core LvmIeb exceptio...
23.052632
84
0.695205
from __future__ import absolute_import, division, print_function class LvmIebError(Exception): def __init__(self, message=None): message = "There has been an error" if not message else message super(LvmIebError, self).__init__(message) class LvmIebNotImplemented(LvmIebError): def...
true
true
f70f8a6fdb098ef333f9170579450717e8ff2c68
12,261
py
Python
common/manager.py
hxwork/OMNet
be88a734e7327def365e1875bbc7cd2fea1539b0
[ "MIT" ]
null
null
null
common/manager.py
hxwork/OMNet
be88a734e7327def365e1875bbc7cd2fea1539b0
[ "MIT" ]
null
null
null
common/manager.py
hxwork/OMNet
be88a734e7327def365e1875bbc7cd2fea1539b0
[ "MIT" ]
1
2021-11-14T12:56:40.000Z
2021-11-14T12:56:40.000Z
import os from collections import defaultdict import numpy as np import torch from termcolor import colored from torch.utils.tensorboard import SummaryWriter from common import utils class Manager(): def __init__(self, model, optimizer, scheduler, params, dataloaders, logger): # params stat...
45.077206
136
0.581437
import os from collections import defaultdict import numpy as np import torch from termcolor import colored from torch.utils.tensorboard import SummaryWriter from common import utils class Manager(): def __init__(self, model, optimizer, scheduler, params, dataloaders, logger): self...
true
true
f70f8c67ca5c8f4c4bc0844a6821081bdf4ce0d1
33,589
py
Python
Cogs/Strike.py
camielverdult/CorpBot.py
56cf3ee736625525d05f9f447b31e34baf93596d
[ "MIT" ]
null
null
null
Cogs/Strike.py
camielverdult/CorpBot.py
56cf3ee736625525d05f9f447b31e34baf93596d
[ "MIT" ]
null
null
null
Cogs/Strike.py
camielverdult/CorpBot.py
56cf3ee736625525d05f9f447b31e34baf93596d
[ "MIT" ]
null
null
null
import asyncio import discord import time import parsedatetime from datetime import datetime from operator import itemgetter from discord.ext import commands from Cogs import ReadableTime from Cogs import DisplayName from Cogs import Nullify def setup(bot): # Add the bot and deps settings = bot....
42.46397
139
0.541397
import asyncio import discord import time import parsedatetime from datetime import datetime from operator import itemgetter from discord.ext import commands from Cogs import ReadableTime from Cogs import DisplayName from Cogs import Nullify def setup(bot): settings = bot.get_cog("Settings") ...
true
true
f70f8da0066e2601d4d7d9e6e313a05b5a080127
19,727
py
Python
src/watchdog/observers/inotify_c.py
rec/watchdog
0224e4424daea365a41125c6691c3477ee1bf86f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/watchdog/observers/inotify_c.py
rec/watchdog
0224e4424daea365a41125c6691c3477ee1bf86f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/watchdog/observers/inotify_c.py
rec/watchdog
0224e4424daea365a41125c6691c3477ee1bf86f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 Google, Inc. # # 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.o...
33.54932
114
0.596441
from __future__ import with_statement import os import errno import struct import threading import ctypes import ctypes.util from functools import reduce from ctypes import c_int, c_char_p, c_uint32 from watchdog.utils import has_attribute from watchdog.utils import UnsupportedLibc from watchdog.utils....
true
true
f70f8e73132e3e8bee5eadba32f1938ebaba2aa7
319
py
Python
example/routes.py
fitahol/aiohttprest
b9f1a386b22ad03e53f2f0e74ed3b29da5bcc220
[ "Apache-2.0" ]
1
2017-03-14T23:39:55.000Z
2017-03-14T23:39:55.000Z
example/routes.py
fitahol/aiohttprest
b9f1a386b22ad03e53f2f0e74ed3b29da5bcc220
[ "Apache-2.0" ]
null
null
null
example/routes.py
fitahol/aiohttprest
b9f1a386b22ad03e53f2f0e74ed3b29da5bcc220
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 """ __created__ = '06/01/2017' __author__ = 'deling.ma' """ from aio_rest.routes import RouteCollector, Route from example.views import publish, IndexView routes = RouteCollector(prefix='/app', routes=[ Route('/', IndexView), Route('/publish', publish, method='GET'), ])
19.9375
49
0.689655
from aio_rest.routes import RouteCollector, Route from example.views import publish, IndexView routes = RouteCollector(prefix='/app', routes=[ Route('/', IndexView), Route('/publish', publish, method='GET'), ])
true
true
f70f8ec2299360b366ee181be4fd170341ad6326
869
py
Python
Inflearn_SungKim/1.LinearRegression/LinearRegression(placeholders).py
shinhaha/tensorflow
4647017a727985d64c5b0addee92f0ec516952c1
[ "MIT" ]
null
null
null
Inflearn_SungKim/1.LinearRegression/LinearRegression(placeholders).py
shinhaha/tensorflow
4647017a727985d64c5b0addee92f0ec516952c1
[ "MIT" ]
null
null
null
Inflearn_SungKim/1.LinearRegression/LinearRegression(placeholders).py
shinhaha/tensorflow
4647017a727985d64c5b0addee92f0ec516952c1
[ "MIT" ]
null
null
null
import tensorflow as tf #placeholder variable(scalar) X=tf.placeholder(tf.float32,shape=[None]) Y=tf.placeholder(tf.float32,shape=[None]) W=tf.Variable(tf.random_normal([1]),name='weight') b=tf.Variable(tf.random_normal([1]),name='bias') hypothesis=X*W+b #average cost=tf.reduce_mean(tf.square(hypothesis-Y)) optimiz...
27.15625
63
0.727273
import tensorflow as tf X=tf.placeholder(tf.float32,shape=[None]) Y=tf.placeholder(tf.float32,shape=[None]) W=tf.Variable(tf.random_normal([1]),name='weight') b=tf.Variable(tf.random_normal([1]),name='bias') hypothesis=X*W+b cost=tf.reduce_mean(tf.square(hypothesis-Y)) optimizer=tf.train.GradientDescentOptimizer(...
true
true
f70f8f560c5f80a9cb4578a691c38108667a8423
1,211
py
Python
deel/model/lstm.py
ghelia/deel
6ff67d7246daf12d1884357010dd82842fbc31d1
[ "MIT" ]
null
null
null
deel/model/lstm.py
ghelia/deel
6ff67d7246daf12d1884357010dd82842fbc31d1
[ "MIT" ]
null
null
null
deel/model/lstm.py
ghelia/deel
6ff67d7246daf12d1884357010dd82842fbc31d1
[ "MIT" ]
null
null
null
import chainer import chainer.functions as F import chainer.links as L """ Based on chainer official example https://github.com/pfnet/chainer/tree/master/examples/ptb Modified by shi3z March 28,2016 """ class RNNLM(chainer.Chain): """Recurrent neural net languabe model for penn tree bank corpus. This is...
28.162791
80
0.618497
import chainer import chainer.functions as F import chainer.links as L class RNNLM(chainer.Chain): def __init__(self, n_input_units=1000,n_vocab=100, n_units=100, train=True): super(RNNLM, self).__init__( inputVector= L.Linear(n_input_units, n_units), embed=L.EmbedID(n_vocab, n_uni...
true
true
f70f910ce1791081915a783482feb7b0db02c894
5,716
py
Python
src/films/tests/test_hdrfilm.py
tizian/layer-laboratory
008cc94b76127e9eb74227fcd3d0145da8ddec30
[ "CNRI-Python" ]
7
2020-07-24T03:19:59.000Z
2022-03-30T10:56:12.000Z
src/films/tests/test_hdrfilm.py
tizian/layer-laboratory
008cc94b76127e9eb74227fcd3d0145da8ddec30
[ "CNRI-Python" ]
1
2021-04-07T22:30:23.000Z
2021-04-08T00:55:36.000Z
src/films/tests/test_hdrfilm.py
tizian/layer-laboratory
008cc94b76127e9eb74227fcd3d0145da8ddec30
[ "CNRI-Python" ]
2
2020-06-08T08:25:09.000Z
2021-04-05T22:13:08.000Z
import mitsuba import pytest import os import enoki as ek def test01_construct(variant_scalar_rgb): from mitsuba.core.xml import load_string # With default reconstruction filter film = load_string("""<film version="2.0.0" type="hdrfilm"></film>""") assert film is not None assert film.reconstructi...
39.42069
101
0.603569
import mitsuba import pytest import os import enoki as ek def test01_construct(variant_scalar_rgb): from mitsuba.core.xml import load_string film = load_string("""<film version="2.0.0" type="hdrfilm"></film>""") assert film is not None assert film.reconstruction_filter() is not None fi...
true
true
f70f925d50a5f908572efb96b2f9609c818088a6
2,959
py
Python
tests/test_inline_functions/test_query.py
pyansys/pyansys
adf51893be746c632f40a9dc8c9247dbee138dda
[ "MIT" ]
1
2021-08-19T14:08:34.000Z
2021-08-19T14:08:34.000Z
tests/test_inline_functions/test_query.py
pyansys/pyansys
adf51893be746c632f40a9dc8c9247dbee138dda
[ "MIT" ]
null
null
null
tests/test_inline_functions/test_query.py
pyansys/pyansys
adf51893be746c632f40a9dc8c9247dbee138dda
[ "MIT" ]
null
null
null
import pytest class TestParseParameter: @pytest.mark.parametrize( "values", [ ("PARAMETER test = 4", 4.0), ("PARAMETER=4", 4.0), ("PARAMETER WARNING = 4", 4.0), ("PARAMETER = _=4", 4.0), ("WARNING = PARAMETER = 4", 4.0), ("PAR...
32.516484
79
0.57756
import pytest class TestParseParameter: @pytest.mark.parametrize( "values", [ ("PARAMETER test = 4", 4.0), ("PARAMETER=4", 4.0), ("PARAMETER WARNING = 4", 4.0), ("PARAMETER = _=4", 4.0), ("WARNING = PARAMETER = 4", 4.0), ("PAR...
true
true
f70f94b36a95bfd5abb974ec2563582a58d0197b
169
py
Python
app/src/imports/requests.py
jkulak/spotify-grabtrack
e6cd16709195ca6d2e186a3b8cc7ce1419b6aace
[ "MIT" ]
null
null
null
app/src/imports/requests.py
jkulak/spotify-grabtrack
e6cd16709195ca6d2e186a3b8cc7ce1419b6aace
[ "MIT" ]
13
2022-02-10T20:07:49.000Z
2022-03-27T20:07:21.000Z
app/src/imports/requests.py
jkulak/spotify-grabtrack
e6cd16709195ca6d2e186a3b8cc7ce1419b6aace
[ "MIT" ]
null
null
null
import requests_cache from requests_cache import SQLiteCache requests_cache.install_cache( "grabtrack_sqlite_cache", SQLiteCache("spotify_api_cache", timeout=30) )
24.142857
74
0.83432
import requests_cache from requests_cache import SQLiteCache requests_cache.install_cache( "grabtrack_sqlite_cache", SQLiteCache("spotify_api_cache", timeout=30) )
true
true
f70f95230083e964837c7ccf662a8d3e815a9abf
3,469
py
Python
gui/mon/views.py
erigones/esdc-ce
2e39211a8f5132d66e574d3a657906c7d3c406fe
[ "Apache-2.0" ]
97
2016-11-15T14:44:23.000Z
2022-03-13T18:09:15.000Z
gui/mon/views.py
erigones/esdc-ce
2e39211a8f5132d66e574d3a657906c7d3c406fe
[ "Apache-2.0" ]
334
2016-11-17T19:56:57.000Z
2022-03-18T10:45:53.000Z
gui/mon/views.py
erigones/esdc-ce
2e39211a8f5132d66e574d3a657906c7d3c406fe
[ "Apache-2.0" ]
33
2017-01-02T16:04:13.000Z
2022-02-07T19:20:24.000Z
import json from re import match from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from django.shortcuts import redirect, render from gui.mon.forms import BaseAlertFilterForm from gui.utils import collect_view_data from gui.decorators import ajax_required,...
29.649573
86
0.742289
import json from re import match from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from django.shortcuts import redirect, render from gui.mon.forms import BaseAlertFilterForm from gui.utils import collect_view_data from gui.decorators import ajax_required,...
true
true
f70f9523490f01a422da6c46e57bf7055ca504f2
515
py
Python
ucp_intro/07_mad_lib_game.py
matiasmasca/python
7631583820d51e3132bdb793fed28cc83f4877a2
[ "MIT" ]
null
null
null
ucp_intro/07_mad_lib_game.py
matiasmasca/python
7631583820d51e3132bdb793fed28cc83f4877a2
[ "MIT" ]
null
null
null
ucp_intro/07_mad_lib_game.py
matiasmasca/python
7631583820d51e3132bdb793fed28cc83f4877a2
[ "MIT" ]
null
null
null
# Primer juego... print("Mi poesia:") print("Las rosas son Rojas") print("Las violetas son Azules") print("Y yo te amo a ti") # Mad Libs # ingresar palabras random, adjetivos, verbos, sustantivos. print("Ahora te toca a vos") print("") color = input("Ingrese un color: ") sustantivo_plular = input("Ingrese un sustanti...
24.52381
62
0.702913
print("Mi poesia:") print("Las rosas son Rojas") print("Las violetas son Azules") print("Y yo te amo a ti") print("Ahora te toca a vos") print("") color = input("Ingrese un color: ") sustantivo_plular = input("Ingrese un sustantivo en plural: ") celebridad = input("Ingrese el nombre de una celebridad: ") print("...
true
true
f70f95734cfa15fb6dd93d15f2c9dd8ecf2607d6
178
py
Python
data/external/repositories/113677/KaggleBillionWordImputation-master/scripts/average.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/113677/KaggleBillionWordImputation-master/scripts/average.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/113677/KaggleBillionWordImputation-master/scripts/average.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
#!/usr/bin/env python import sys if __name__ == '__main__': total = 0.0 n = 0 for line in sys.stdin: total += float(line) n += 1 print total / n
16.181818
28
0.533708
import sys if __name__ == '__main__': total = 0.0 n = 0 for line in sys.stdin: total += float(line) n += 1 print total / n
false
true
f70f96b662e9909e240adb12a588cfe7baf1df63
14,338
py
Python
src/pytorch_metric_learning/utils/logging_presets.py
kvzhao/pytorch-metric-learning
9c8a94bd1a906317d5834f26d8a94e59d578b825
[ "MIT" ]
2
2020-08-11T03:42:15.000Z
2022-01-11T07:25:30.000Z
src/pytorch_metric_learning/utils/logging_presets.py
FadouaKhm/pytorch-metric-learning
9eb792bcfc1616b599e6ee457514e3cb3a7235dd
[ "MIT" ]
null
null
null
src/pytorch_metric_learning/utils/logging_presets.py
FadouaKhm/pytorch-metric-learning
9eb792bcfc1616b599e6ee457514e3cb3a7235dd
[ "MIT" ]
1
2021-03-15T04:24:52.000Z
2021-03-15T04:24:52.000Z
import logging from . import common_functions as c_f import os import torch from collections import defaultdict import sqlite3 # You can write your own hooks for logging. # But if you'd like something that just works, then use this HookContainer. # You'll need to install record-keeper and tensorboard. # pip ...
52.328467
160
0.625122
import logging from . import common_functions as c_f import os import torch from collections import defaultdict import sqlite3 # You'll need to install record-keeper and tensorboard. class HookContainer: def __init__(self, record_keeper, record_group_name_prefix=None, ...
true
true
f70f96f0024b1699103a63385d86facba9fae422
9,937
py
Python
xfer/contrib/xfer_leap/synthetic_data.py
apaleyes/xfer
99cd83424bc7e76a2c2def9d5b1dacd06f6e9eb5
[ "Apache-2.0" ]
null
null
null
xfer/contrib/xfer_leap/synthetic_data.py
apaleyes/xfer
99cd83424bc7e76a2c2def9d5b1dacd06f6e9eb5
[ "Apache-2.0" ]
null
null
null
xfer/contrib/xfer_leap/synthetic_data.py
apaleyes/xfer
99cd83424bc7e76a2c2def9d5b1dacd06f6e9eb5
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in th...
39.748
118
0.603301
import os import random import numpy as np import matplotlib.pyplot as plt from mxnet.gluon.data import ArrayDataset import mxnet from .data import MetaTaskDataContainer, TaskDataContainer from .config import DEFAULT_CONFIG_SYNTHETIC class MetaTaskSynthetic(MetaTaskDataContainer): def __init__(self...
true
true
f70f977c652da15ff9173d2b3951c11786d65299
6,282
py
Python
solution/10. regular-expression-match.py
sundaycat/Leetcode-Practice
65c3ab0f967331a095fd8a6eb2f3d7765cbf7d5a
[ "MIT" ]
null
null
null
solution/10. regular-expression-match.py
sundaycat/Leetcode-Practice
65c3ab0f967331a095fd8a6eb2f3d7765cbf7d5a
[ "MIT" ]
null
null
null
solution/10. regular-expression-match.py
sundaycat/Leetcode-Practice
65c3ab0f967331a095fd8a6eb2f3d7765cbf7d5a
[ "MIT" ]
null
null
null
''' A: suffix solution 1. subproblems: define dp(i, j) = is_match(s[i:], p[j:]), suffix 2. guess, 2.1 the current char in p is a '*' - use '*', repeat the char before it - do not use '*', skip to next char after '*' 2.2 current char in s and p are match, s[i] == p[j] or ...
32.381443
109
0.446832
class Solution: def isMatch(self, s: str, p: str) -> bool: return self.dp_bottom_up_suffix(s, p) def dfs_suffix(self, s, p, i, j, memo): if (i, j) in memo: return memo[(i, j)] if i >= len(s) and...
true
true
f70f988e2189afa8f9091db3302eee4536752431
5,172
py
Python
opentamp/src/policy_hooks/vae/run_training.py
Algorithmic-Alignment-Lab/openTAMP-legacy
3b7c3be164cc968ad77a928286d6460cd70a670e
[ "MIT" ]
2
2022-03-09T19:48:20.000Z
2022-03-26T17:31:07.000Z
opentamp/src/policy_hooks/vae/run_training.py
Algorithmic-Alignment-Lab/OpenTAMP
eecb950bd273da8cbed4394487630e8453f2c242
[ "MIT" ]
null
null
null
opentamp/src/policy_hooks/vae/run_training.py
Algorithmic-Alignment-Lab/OpenTAMP
eecb950bd273da8cbed4394487630e8453f2c242
[ "MIT" ]
null
null
null
import argparse import imp import importlib import random from opentamp.src.policy_hooks.vae.vae_main import MultiProcessMain def load_config(args, reload_module=None): config_file = args.config if config_file != '': if reload_module is not None: config_module = reload_module ...
45.769912
130
0.683875
import argparse import imp import importlib import random from opentamp.src.policy_hooks.vae.vae_main import MultiProcessMain def load_config(args, reload_module=None): config_file = args.config if config_file != '': if reload_module is not None: config_module = reload_module ...
true
true
f70f9b444405e0c9fb473ff45e8dc0b8422e10c7
2,325
py
Python
tests/test_action_tag_category_create.py
lingfish/stackstorm-vsphere
49199f5ebdc05b70b7504962e104642b0c30ba30
[ "Apache-2.0" ]
null
null
null
tests/test_action_tag_category_create.py
lingfish/stackstorm-vsphere
49199f5ebdc05b70b7504962e104642b0c30ba30
[ "Apache-2.0" ]
2
2019-03-25T18:03:02.000Z
2019-03-26T13:13:59.000Z
tests/test_action_tag_category_create.py
lingfish/stackstorm-vsphere
49199f5ebdc05b70b7504962e104642b0c30ba30
[ "Apache-2.0" ]
1
2021-03-05T10:12:21.000Z
2021-03-05T10:12:21.000Z
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
38.114754
79
0.669247
import mock from tag_category_create import CategoryCreate from vsphere_base_action_test_case import VsphereBaseActionTestCase __all__ = [ 'CategoryCreateTestCase' ] class CategoryCreateTestCase(VsphereBaseActionTestCase): __test__ = True action_cls = CategoryCreate @mock.patch("vmwar...
true
true
f70f9c881df168564cbf2431bbc2ebdf7e7f7ded
18,480
py
Python
tensorflow/contrib/data/python/ops/readers.py
idharmateja/tensorflow
4e108ef30d7cd7ae5e1c550ec5ae27e79b8c6e39
[ "Apache-2.0" ]
13
2018-07-23T18:53:35.000Z
2021-11-18T19:56:45.000Z
tensorflow/contrib/data/python/ops/readers.py
DandelionCN/tensorflow
1712002ad02f044f7569224bf465e0ea00e6a6c4
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/data/python/ops/readers.py
DandelionCN/tensorflow
1712002ad02f044f7569224bf465e0ea00e6a6c4
[ "Apache-2.0" ]
13
2018-09-07T13:28:38.000Z
2020-07-17T15:06:24.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.152542
80
0.676082
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.data.python.ops import interleave_ops from tensorflow.contrib.data.python.ops import shuffle_ops from tensorflow.python.data.ops import dataset_ops from tensorflow.python.d...
true
true
f70f9fbd792e49e3bb17519f8daf955fc3b614b8
3,041
py
Python
projects/api/main.py
lborro/projects
c971c2fc65cdb09310d0b3782cd7119203aa4db3
[ "Apache-2.0" ]
null
null
null
projects/api/main.py
lborro/projects
c971c2fc65cdb09310d0b3782cd7119203aa4db3
[ "Apache-2.0" ]
null
null
null
projects/api/main.py
lborro/projects
c971c2fc65cdb09310d0b3782cd7119203aa4db3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """WSGI server.""" import argparse import sys from flask import Flask, jsonify from flask_cors import CORS from werkzeug.exceptions import BadRequest, NotFound, MethodNotAllowed, \ Forbidden, InternalServerError from projects.api.compare_results import bp as compare_results_blueprint from ...
33.054348
100
0.74515
import argparse import sys from flask import Flask, jsonify from flask_cors import CORS from werkzeug.exceptions import BadRequest, NotFound, MethodNotAllowed, \ Forbidden, InternalServerError from projects.api.compare_results import bp as compare_results_blueprint from projects.api.experiments import bp as expe...
true
true
f70fa0d1d8aad41a969517b69bc42c6dd87cbd53
2,411
py
Python
codes/preprocess/collect_noise.py
yicrane/Real-SR
a6e380b791129b80fe58bf282089c0cfd9159b36
[ "Apache-2.0" ]
null
null
null
codes/preprocess/collect_noise.py
yicrane/Real-SR
a6e380b791129b80fe58bf282089c0cfd9159b36
[ "Apache-2.0" ]
null
null
null
codes/preprocess/collect_noise.py
yicrane/Real-SR
a6e380b791129b80fe58bf282089c0cfd9159b36
[ "Apache-2.0" ]
1
2021-07-07T13:56:30.000Z
2021-07-07T13:56:30.000Z
from PIL import Image import numpy as np import os.path as osp import glob import os import argparse import yaml parser = argparse.ArgumentParser(description='create a dataset') parser.add_argument('--dataset', default='df2k', type=str, help='selecting different datasets') parser.add_argument('--artifacts', default=''...
33.957746
113
0.623393
from PIL import Image import numpy as np import os.path as osp import glob import os import argparse import yaml parser = argparse.ArgumentParser(description='create a dataset') parser.add_argument('--dataset', default='df2k', type=str, help='selecting different datasets') parser.add_argument('--artifacts', default=''...
true
true
f70fa0e5384e444c718b501e35ff39db46d5b99a
6,872
py
Python
pennylane/transforms/__init__.py
XanaduAI/pennylane
0620b8a8bb56ff55bfc2130619fa0a5a1af2b2a4
[ "Apache-2.0" ]
539
2018-11-13T08:45:42.000Z
2020-07-27T18:17:16.000Z
pennylane/transforms/__init__.py
XanaduAI/pennylane
0620b8a8bb56ff55bfc2130619fa0a5a1af2b2a4
[ "Apache-2.0" ]
588
2018-11-14T10:21:47.000Z
2020-07-28T06:27:14.000Z
pennylane/transforms/__init__.py
XanaduAI/pennylane
0620b8a8bb56ff55bfc2130619fa0a5a1af2b2a4
[ "Apache-2.0" ]
165
2018-11-13T18:58:56.000Z
2020-07-27T17:18:17.000Z
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # 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...
30.008734
113
0.766589
from .batch_transform import batch_transform, map_batch_transform from .qfunc_transforms import make_tape, single_tape_transform, qfunc_transform from .op_transforms import op_transform from .adjoint import adjoint from .batch_params import batch_params from .batch_input import batch_input from .classical...
true
true
f70fa191b2427b7e00ffd7084a2710be0b35e10c
10,735
py
Python
src/m3_calling_functions_returning_values.py
DavidMutchler/03-AccumulatorsAndFunctionsWithParameters
548b9a527357e4a18c6ab3e0cc84c907c6e33d87
[ "MIT" ]
null
null
null
src/m3_calling_functions_returning_values.py
DavidMutchler/03-AccumulatorsAndFunctionsWithParameters
548b9a527357e4a18c6ab3e0cc84c907c6e33d87
[ "MIT" ]
null
null
null
src/m3_calling_functions_returning_values.py
DavidMutchler/03-AccumulatorsAndFunctionsWithParameters
548b9a527357e4a18c6ab3e0cc84c907c6e33d87
[ "MIT" ]
66
2018-03-08T12:57:23.000Z
2020-11-09T18:59:08.000Z
""" This module demonstrates and practices: -- using ARGUMENTs in function CALLs, -- having PARAMETERs in function DEFINITIONs, and -- RETURNING a value from a function, possibly CAPTURING the RETURNED VALUE in a VARIABLE. -- UNIT TESTING. Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda St...
41.447876
77
0.469213
import m3t_tester def main(): run_test_sum_of_digits() run_test_digits_in_cube() run_test_digits_in_power() run_test_fancy_sums_of_digits() def run_test_sum_of_digits(): ...
true
true
f70fa2944e0e3fcde401f3381a70b6633f36db93
5,384
py
Python
indieauth/views.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
indieauth/views.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
indieauth/views.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
from django.shortcuts import render, HttpResponseRedirect from django.urls import reverse from urllib.parse import urlencode, unquote import requests from bs4 import BeautifulSoup from django.utils.crypto import get_random_string from django.contrib import messages from urllib.parse import urlparse, urljoin from django...
40.481203
120
0.717125
from django.shortcuts import render, HttpResponseRedirect from django.urls import reverse from urllib.parse import urlencode, unquote import requests from bs4 import BeautifulSoup from django.utils.crypto import get_random_string from django.contrib import messages from urllib.parse import urlparse, urljoin from django...
true
true
f70fa2ec4e8ddf2e3938910c093b9fd6af4215c2
8,957
py
Python
mpf/devices/switch.py
cloudjor/mpf
1cf6bf18b0d81120383b0b128b0ebbfa1c62717c
[ "MIT" ]
null
null
null
mpf/devices/switch.py
cloudjor/mpf
1cf6bf18b0d81120383b0b128b0ebbfa1c62717c
[ "MIT" ]
null
null
null
mpf/devices/switch.py
cloudjor/mpf
1cf6bf18b0d81120383b0b128b0ebbfa1c62717c
[ "MIT" ]
null
null
null
"""Contains the Switch parent class.""" import asyncio from functools import partial from mpf.core.device_monitor import DeviceMonitor from mpf.core.machine import MachineController from mpf.core.system_wide_device import SystemWideDevice from mpf.core.utility_functions import Util from mpf.core.platform import Switch...
43.692683
119
0.635927
import asyncio from functools import partial from mpf.core.device_monitor import DeviceMonitor from mpf.core.machine import MachineController from mpf.core.system_wide_device import SystemWideDevice from mpf.core.utility_functions import Util from mpf.core.platform import SwitchConfig from mpf.devices.device_mixins im...
true
true
f70fa4716a8ad9de69464eb03d1b8acc667bcf25
8,629
py
Python
lucida/speechrecognition/kaldi_gstreamer_asr/kaldigstserver/decoder2.py
extremenelson/sirius
0bad428bb763fe404d01db5d9e08ee33a8f3776c
[ "BSD-3-Clause" ]
1,808
2015-12-23T09:38:57.000Z
2022-03-24T05:55:03.000Z
lucida/speechrecognition/kaldi_gstreamer_asr/kaldigstserver/decoder2.py
extremenelson/sirius
0bad428bb763fe404d01db5d9e08ee33a8f3776c
[ "BSD-3-Clause" ]
164
2015-12-22T17:32:16.000Z
2022-01-30T16:19:28.000Z
lucida/speechrecognition/kaldi_gstreamer_asr/kaldigstserver/decoder2.py
mrinformatics/lucida1604
f17fba20be9765c3464437f40e97278bba29b9d5
[ "BSD-3-Clause" ]
554
2015-12-23T11:29:34.000Z
2022-02-08T05:31:49.000Z
""" Created on May 17, 2013 @author: tanel """ import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst GObject.threads_init() Gst.init(None) import logging import thread import os logger = logging.getLogger(__name__) import pdb class DecoderPipeline2(object): def __init__(self, conf=...
38.013216
106
0.644918
import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst GObject.threads_init() Gst.init(None) import logging import thread import os logger = logging.getLogger(__name__) import pdb class DecoderPipeline2(object): def __init__(self, conf={}): logger.info("Creating decoder using...
true
true
f70fa47cf19e266644db800bdfe629f660dc9d2e
419
py
Python
Mundo 2 - Exercicios/61Exercicio.py
andrezzadede/Curso_Python_Guanabara_Mundo_2
e4ebf171f74809f8a65e846c59978db95c5d3b1b
[ "MIT" ]
null
null
null
Mundo 2 - Exercicios/61Exercicio.py
andrezzadede/Curso_Python_Guanabara_Mundo_2
e4ebf171f74809f8a65e846c59978db95c5d3b1b
[ "MIT" ]
null
null
null
Mundo 2 - Exercicios/61Exercicio.py
andrezzadede/Curso_Python_Guanabara_Mundo_2
e4ebf171f74809f8a65e846c59978db95c5d3b1b
[ "MIT" ]
null
null
null
print('---------- Bem vindo ao exercicio 61 ------') print('\033[32m Reçaca o desafio 51. Lendo o primeiro termo e a razao de uma PA. Mostrando os 10 primeiros termos da progressa usando a estrutura while\033[m') primeiro = int(input('Primeiro termo: ')) razao = int(input('Razão: ')) termo = primeiro c = 1 while c...
18.217391
159
0.618138
print('---------- Bem vindo ao exercicio 61 ------') print('\033[32m Reçaca o desafio 51. Lendo o primeiro termo e a razao de uma PA. Mostrando os 10 primeiros termos da progressa usando a estrutura while\033[m') primeiro = int(input('Primeiro termo: ')) razao = int(input('Razão: ')) termo = primeiro c = 1 while c...
true
true
f70fa4df361d80f9ecacef1088f93b318fd49fe6
2,056
py
Python
docs/conf.py
Moody-Tunes/spotify-client
496c72d915d92c29795a31a18cc9af26a9015b4b
[ "MIT" ]
1
2020-12-21T02:35:18.000Z
2020-12-21T02:35:18.000Z
docs/conf.py
Moody-Tunes/spotify-client
496c72d915d92c29795a31a18cc9af26a9015b4b
[ "MIT" ]
9
2020-09-04T15:35:23.000Z
2021-04-24T02:10:56.000Z
docs/conf.py
Moody-Tunes/spotify-client
496c72d915d92c29795a31a18cc9af26a9015b4b
[ "MIT" ]
2
2020-12-21T02:35:24.000Z
2020-12-29T07:38:16.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If exte...
35.448276
79
0.669747
import os import sys sys.path.insert(0, os.path.abspath('..')) project = 'spotify-client' copyright = '2020, MoodyTunes' author = 'MoodyTunes' with open("../VERSION", "r") as version_file: version = version_file.read().strip() release = version extensions = ['sphinx.ext.autodoc'] pygments_s...
true
true
f70fa5c21d44574a534aa9a438155cd0428d003d
946
py
Python
decorator/send_commands_netmiko.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-05T09:30:23.000Z
2022-03-09T13:27:56.000Z
decorator/send_commands_netmiko.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
null
null
null
decorator/send_commands_netmiko.py
levs72/pyneng-examples
d6288292dcf9d1ebc5a9db4a0d620bd11b4a2df9
[ "MIT" ]
11
2021-04-06T03:44:35.000Z
2022-03-04T21:20:40.000Z
from netmiko import ConnectHandler import yaml from pprint import pprint def send_show_command(device, show_command): with ConnectHandler(**device) as ssh: ssh.enable() result = ssh.send_command(show_command) return result def send_config_commands(device, config_commands): with ConnectHa...
27.028571
87
0.707188
from netmiko import ConnectHandler import yaml from pprint import pprint def send_show_command(device, show_command): with ConnectHandler(**device) as ssh: ssh.enable() result = ssh.send_command(show_command) return result def send_config_commands(device, config_commands): with ConnectHa...
true
true