hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
793e7fffbdd5c89651bd754571e1af6c08b7b976 | 820 | py | Python | add-binary/solution.py | LYZhelloworld/Leetcode | 1ef3c8d3a75a20755e7474427224ed8757f97932 | [
"MIT"
] | null | null | null | add-binary/solution.py | LYZhelloworld/Leetcode | 1ef3c8d3a75a20755e7474427224ed8757f97932 | [
"MIT"
] | null | null | null | add-binary/solution.py | LYZhelloworld/Leetcode | 1ef3c8d3a75a20755e7474427224ed8757f97932 | [
"MIT"
] | null | null | null | class Solution:
def addBinary(self, a, b):
"""
:type a: str
:type b: str
:rtype: str
"""
x = [i == '1' for i in a[::-1]]
y = [i == '1' for i in b[::-1]]
r = []
carry = False
if len(x) > len(y):
y += [False] * (len(x) - len(... | 24.117647 | 57 | 0.4 |
793e81ebd98b987ef5fea1e69b37fa789775b1f4 | 7,321 | py | Python | dp_multiq/csmooth.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 23,901 | 2018-10-04T19:48:53.000Z | 2022-03-31T21:27:42.000Z | dp_multiq/csmooth.py | DionysisChristopoulos/google-research | 7f59ef421beef32ca16c2a7215be74f7eba01a0f | [
"Apache-2.0"
] | 891 | 2018-11-10T06:16:13.000Z | 2022-03-31T10:42:34.000Z | dp_multiq/csmooth.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 6,047 | 2018-10-12T06:31:02.000Z | 2022-03-31T13:59:28.000Z | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 41.129213 | 80 | 0.714656 |
793e8273f88b0f2b7ce110aa9b57d8e53036e64a | 11,313 | py | Python | code/python/Publisher/v3/fds/sdk/Publisher/model/account_directories_root.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/Publisher/v3/fds/sdk/Publisher/model/account_directories_root.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/Publisher/v3/fds/sdk/Publisher/model/account_directories_root.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Publisher API
Allow clients to fetch Publisher Analytics through APIs. # noqa: E501
The version of the OpenAPI document: 3
Contact: analytics.api.support@factset.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.Publisher.mod... | 43.015209 | 121 | 0.574472 |
793e8409b2a4d12488dff56ea216a81b3efed7f2 | 125 | py | Python | 6_command/no_command.py | hypersport/Head-First-Design-Patterns-Python | 0c8b831ae89ebbbef8b203b96508deb7e3063590 | [
"MIT"
] | null | null | null | 6_command/no_command.py | hypersport/Head-First-Design-Patterns-Python | 0c8b831ae89ebbbef8b203b96508deb7e3063590 | [
"MIT"
] | null | null | null | 6_command/no_command.py | hypersport/Head-First-Design-Patterns-Python | 0c8b831ae89ebbbef8b203b96508deb7e3063590 | [
"MIT"
] | null | null | null | from command import Command
class NoCommand(Command):
def excuse(self):
pass
def undo(self):
pass
| 12.5 | 27 | 0.616 |
793e845f73958f35d2ea7faa1847f8a8ad73e2ad | 11,688 | py | Python | aiida/tools/graph/graph_traversers.py | HaoZeke/aiida-core | 1a4cada67fe36353326dcebfe888ebc01a6c5b7b | [
"MIT",
"BSD-3-Clause"
] | null | null | null | aiida/tools/graph/graph_traversers.py | HaoZeke/aiida-core | 1a4cada67fe36353326dcebfe888ebc01a6c5b7b | [
"MIT",
"BSD-3-Clause"
] | 2 | 2019-03-06T11:23:42.000Z | 2020-03-09T09:34:07.000Z | aiida/tools/graph/graph_traversers.py | lorisercole/aiida-core | 84c2098318bf234641219e55795726f99dc25a16 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 42.194946 | 120 | 0.683864 |
793e84e38db8b2f0f59fe0fbf6ac97860583e373 | 3,245 | py | Python | predict.py | jhonatantirado/CheXNet-Keras | 264fd4ba889fe8d9f5dee48b4ba3f7c0018aa393 | [
"MIT"
] | null | null | null | predict.py | jhonatantirado/CheXNet-Keras | 264fd4ba889fe8d9f5dee48b4ba3f7c0018aa393 | [
"MIT"
] | null | null | null | predict.py | jhonatantirado/CheXNet-Keras | 264fd4ba889fe8d9f5dee48b4ba3f7c0018aa393 | [
"MIT"
] | null | null | null | from keras.models import load_model
from keras.preprocessing import image
import matplotlib.pyplot as plt
import numpy as np
import os
from configparser import ConfigParser
from models.keras import ModelFactory
import tensorflow as tf
def load_image(img_path, show=False):
img = image.load_img(img_path, target_si... | 33.112245 | 183 | 0.692142 |
793e86d829c9f48688ff289a9a6698a47d8a31e1 | 216 | py | Python | Python/Bank/cliente.py | GabrielRenan/Projects-to-Learn | 38bd7e1dfa6ff9ef5ae0e7e5bacaaf23147d71c0 | [
"MIT"
] | null | null | null | Python/Bank/cliente.py | GabrielRenan/Projects-to-Learn | 38bd7e1dfa6ff9ef5ae0e7e5bacaaf23147d71c0 | [
"MIT"
] | null | null | null | Python/Bank/cliente.py | GabrielRenan/Projects-to-Learn | 38bd7e1dfa6ff9ef5ae0e7e5bacaaf23147d71c0 | [
"MIT"
] | null | null | null |
class Cliente:
def __init__(self,nome):
self.__nome = nome
@property
def nome(self):
return self.__nome.title()
@nome.setter
def nome(self, nome):
self.__nome = nome | 18 | 34 | 0.574074 |
793e870b1b532063020eb34c42baea04b0444ddd | 369 | py | Python | wagtail/wagtailforms/urls.py | patphongs/wagtail | 32555f7a1c599c139e0f26c22907c9612af2e015 | [
"BSD-3-Clause"
] | 1 | 2019-11-06T10:51:42.000Z | 2019-11-06T10:51:42.000Z | wagtail/wagtailforms/urls.py | patphongs/wagtail | 32555f7a1c599c139e0f26c22907c9612af2e015 | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailforms/urls.py | patphongs/wagtail | 32555f7a1c599c139e0f26c22907c9612af2e015 | [
"BSD-3-Clause"
] | 2 | 2017-08-08T01:39:02.000Z | 2018-05-06T06:16:10.000Z | from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
from wagtail.wagtailforms import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^submissions/(\d+)/$', views.list_submissions, name='list_submissions'),
url(r'^submissions/(\d+)/delete/$', views.... | 30.75 | 92 | 0.731707 |
793e87565395cde7d73093136d453cee31661aa7 | 14,048 | py | Python | docs/conf.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | 1 | 2019-05-07T15:23:33.000Z | 2019-05-07T15:23:33.000Z | docs/conf.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | null | null | null | docs/conf.py | zhengknight/tensorpack | 726747313fb2f189dd195d32087897b16a23be0a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# flake8: noqa
# tensorpack documentation build configuration file, created by
# sphinx-quickstart on Sun Mar 27 01:41:24 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogener... | 32.518519 | 113 | 0.692981 |
793e876da4c6cb416ff291ce78dc2293f7f6312a | 1,123 | py | Python | satflow/run.py | lewtun/satflow | 6a675e4fa921b4dd023361b55cc2a5fa25b8f8ed | [
"MIT"
] | null | null | null | satflow/run.py | lewtun/satflow | 6a675e4fa921b4dd023361b55cc2a5fa25b8f8ed | [
"MIT"
] | null | null | null | satflow/run.py | lewtun/satflow | 6a675e4fa921b4dd023361b55cc2a5fa25b8f8ed | [
"MIT"
] | null | null | null | import os
os.environ["HYDRA_FULL_ERROR"] = "1"
import dotenv
import hydra
from omegaconf import DictConfig
# load environment variables from `.env` file if it exists
# recursively searches for `.env` in all folders starting from work dir
dotenv.load_dotenv(override=True)
@hydra.main(config_path="configs/", config_n... | 27.390244 | 76 | 0.723063 |
793e87e43756e35447b43ebef01209bf3cb56a58 | 946 | py | Python | ssepaperless/Organizer/urls.py | michaelkressaty/ssepaperless | d536f9106fd499e664d3c03fb6331b4feb1cc4ca | [
"BSD-3-Clause"
] | null | null | null | ssepaperless/Organizer/urls.py | michaelkressaty/ssepaperless | d536f9106fd499e664d3c03fb6331b4feb1cc4ca | [
"BSD-3-Clause"
] | null | null | null | ssepaperless/Organizer/urls.py | michaelkressaty/ssepaperless | d536f9106fd499e664d3c03fb6331b4feb1cc4ca | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^(?P<department_id>[0-9]+)/$', views.index2, name='index2'),
url(r'^(?P<department_id>[0-9]+)/Advisor/(?P<advisor_id>[0-9]+)/$' , views.advisorinfo, name= 'advisorinfo'),
url(r'^(?P<depart... | 59.125 | 137 | 0.634249 |
793e888b5ae5bf4a2f4ef1efef04be3249969d52 | 359 | py | Python | cloudstore/apps/api/migrations/0004_auto_20200823_2216.py | JonasUJ/cloudstore | 33dd9eb2a92c75d4f2034c07dc1c6f1d6d8d845d | [
"MIT"
] | null | null | null | cloudstore/apps/api/migrations/0004_auto_20200823_2216.py | JonasUJ/cloudstore | 33dd9eb2a92c75d4f2034c07dc1c6f1d6d8d845d | [
"MIT"
] | null | null | null | cloudstore/apps/api/migrations/0004_auto_20200823_2216.py | JonasUJ/cloudstore | 33dd9eb2a92c75d4f2034c07dc1c6f1d6d8d845d | [
"MIT"
] | 1 | 2020-10-08T19:53:21.000Z | 2020-10-08T19:53:21.000Z | # Generated by Django 3.0.8 on 2020-08-23 20:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0003_auto_20200802_1500'),
]
operations = [
migrations.RenameField(
model_name='folder',
old_name='parent',
... | 18.894737 | 47 | 0.579387 |
793e89591d849b89e64dc0b66300d2432fb4e950 | 632 | py | Python | nyc_data/manage.py | nyccto-rapicastillo/nyc-ppe | e6d5ba45cf2815f7659298103d3b5bc7210ed8cf | [
"MIT"
] | 3 | 2020-04-16T03:24:17.000Z | 2020-09-11T22:12:31.000Z | nyc_data/manage.py | nyccto-rapicastillo/nyc-ppe | e6d5ba45cf2815f7659298103d3b5bc7210ed8cf | [
"MIT"
] | 47 | 2020-04-10T20:02:09.000Z | 2021-09-08T02:05:09.000Z | nyc_data/manage.py | nyccto-rapicastillo/nyc-ppe | e6d5ba45cf2815f7659298103d3b5bc7210ed8cf | [
"MIT"
] | 1 | 2020-04-22T19:10:24.000Z | 2020-04-22T19:10:24.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nyc_data.settings.dev")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise I... | 28.727273 | 76 | 0.683544 |
793e89e1fd4d571e4f2b0c95fc34b2eff7c1130f | 978 | py | Python | tabpy/tabpy_server/handlers/service_info_handler.py | phantomcosmonaut/TabPy | 43cce449cdcb5c99202d68f1a6af4d355d3e3734 | [
"MIT"
] | null | null | null | tabpy/tabpy_server/handlers/service_info_handler.py | phantomcosmonaut/TabPy | 43cce449cdcb5c99202d68f1a6af4d355d3e3734 | [
"MIT"
] | null | null | null | tabpy/tabpy_server/handlers/service_info_handler.py | phantomcosmonaut/TabPy | 43cce449cdcb5c99202d68f1a6af4d355d3e3734 | [
"MIT"
] | null | null | null | import json
from tabpy.tabpy_server.app.SettingsParameters import SettingsParameters
from tabpy.tabpy_server.handlers.management_handler import ManagementHandler
class ServiceInfoHandler(ManagementHandler):
def initialize(self, app):
super(ServiceInfoHandler, self).initialize(app)
def get(self):
... | 42.521739 | 80 | 0.721881 |
793e8b1020aa202f8bae68561a80bba9afe4b12a | 63,065 | py | Python | mlflow/tracking/fluent.py | devlibx/mlflowx | 291c51161ec26450b1e79c8e4a32af960da79591 | [
"Apache-2.0"
] | 1 | 2021-12-13T20:52:08.000Z | 2021-12-13T20:52:08.000Z | mlflow/tracking/fluent.py | devlibx/mlflowx | 291c51161ec26450b1e79c8e4a32af960da79591 | [
"Apache-2.0"
] | 9 | 2021-08-04T06:41:49.000Z | 2022-01-10T10:10:52.000Z | mlflow/tracking/fluent.py | devlibx/mlflowx | 291c51161ec26450b1e79c8e4a32af960da79591 | [
"Apache-2.0"
] | 1 | 2021-03-01T10:09:32.000Z | 2021-03-01T10:09:32.000Z | """
Internal module implementing the fluent API, allowing management of an active
MLflow run. This module is exposed to users at the top-level :py:mod:`mlflow` module.
"""
import os
import atexit
import time
import logging
import inspect
from packaging.version import Version
from typing import Any, Dict, List, Optiona... | 39.049536 | 100 | 0.639864 |
793e8b7da49659a2fbffd8ae180d597ce3814940 | 20,365 | py | Python | pandas/tests/series/test_rank.py | sofiane87/pandas | 0de99558b497c5611cbe5d35d504763bd7692275 | [
"BSD-3-Clause"
] | 2 | 2019-11-13T18:20:29.000Z | 2020-04-18T02:58:39.000Z | pandas/tests/series/methods/test_rank.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/series/methods/test_rank.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | 2 | 2019-12-21T21:17:43.000Z | 2019-12-26T10:34:36.000Z | from itertools import chain, product
import numpy as np
import pytest
from pandas._libs.algos import Infinity, NegInfinity
from pandas._libs.tslib import iNaT
import pandas.util._test_decorators as td
from pandas import NaT, Series, Timestamp, date_range
from pandas.api.types import CategoricalDtype
import pandas.ut... | 35.917108 | 88 | 0.497569 |
793e8be004569a9671c3ba4ae8fa239d5feadcb1 | 35,336 | py | Python | homeassistant/config_entries.py | billyburly/home-assistant | 9795449d22783e77a0ca7b745f15c89a830c5cc6 | [
"Apache-2.0"
] | 5 | 2020-09-17T10:48:51.000Z | 2021-11-22T00:08:17.000Z | homeassistant/config_entries.py | billyburly/home-assistant | 9795449d22783e77a0ca7b745f15c89a830c5cc6 | [
"Apache-2.0"
] | 7 | 2016-04-09T20:56:30.000Z | 2016-04-19T21:28:46.000Z | homeassistant/config_entries.py | billyburly/home-assistant | 9795449d22783e77a0ca7b745f15c89a830c5cc6 | [
"Apache-2.0"
] | 2 | 2019-07-05T17:46:08.000Z | 2021-04-25T21:21:02.000Z | """Manage config entries in Home Assistant."""
import asyncio
import functools
import logging
from typing import Any, Callable, Dict, List, Optional, Set, Union, cast
import uuid
import weakref
import attr
from homeassistant import data_entry_flow, loader
from homeassistant.core import HomeAssistant, callback
from ho... | 33.944284 | 109 | 0.615123 |
793e8d20de7e33f68d878ebad87ea2a818be1374 | 31,858 | py | Python | Lib/test/test_exception_group.py | ErikBjare/cpython | b68431fadb3150134ac6ccbf501cdfeaf4c75678 | [
"0BSD"
] | 5 | 2021-12-03T23:11:53.000Z | 2022-01-08T21:02:50.000Z | Lib/test/test_exception_group.py | dalakatt/cpython | 2f49b97cc5426087b46515254b9a97a22ee8c807 | [
"0BSD"
] | 4 | 2021-12-01T14:06:09.000Z | 2022-03-24T21:55:25.000Z | Lib/test/test_exception_group.py | dalakatt/cpython | 2f49b97cc5426087b46515254b9a97a22ee8c807 | [
"0BSD"
] | 1 | 2022-03-24T19:52:47.000Z | 2022-03-24T19:52:47.000Z | import collections.abc
import traceback
import types
import unittest
class TestExceptionGroupTypeHierarchy(unittest.TestCase):
def test_exception_group_types(self):
self.assertTrue(issubclass(ExceptionGroup, Exception))
self.assertTrue(issubclass(ExceptionGroup, BaseExceptionGroup))
self.a... | 36.326112 | 81 | 0.60506 |
793e8d93fef2a82f83c9459a825b824fbf659e38 | 25,761 | py | Python | cumulusci/tasks/bulkdata/load.py | vazexqi/CumulusCI | 9075b30adc1ddcb7741df610d888330fa0233798 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/tasks/bulkdata/load.py | vazexqi/CumulusCI | 9075b30adc1ddcb7741df610d888330fa0233798 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/tasks/bulkdata/load.py | vazexqi/CumulusCI | 9075b30adc1ddcb7741df610d888330fa0233798 | [
"BSD-3-Clause"
] | 1 | 2021-06-03T01:10:17.000Z | 2021-06-03T01:10:17.000Z | from collections import defaultdict
from unittest.mock import MagicMock
from typing import Union
import tempfile
from contextlib import contextmanager
from sqlalchemy import Column, MetaData, Table, Unicode, create_engine, text, func
from sqlalchemy.orm import aliased, Session
from sqlalchemy.ext.automap import automa... | 40.632492 | 124 | 0.591437 |
793e8f586f4661f679f2e2a52aa1e3fb9841db72 | 17 | py | Python | python/testData/psi/FStringTerminatedByQuoteInsideStringLiteralInFormatPart.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/psi/FStringTerminatedByQuoteInsideStringLiteralInFormatPart.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/psi/FStringTerminatedByQuoteInsideStringLiteralInFormatPart.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | s = f'{42:{"'"}}' | 17 | 17 | 0.235294 |
793e901392b73523237f5290b5992bb69b90054a | 3,840 | py | Python | shapash/decomposition/contributions.py | peterdhansen/shapash | d866cced7aa01f6d162faa910e53d281d3e35e4c | [
"Apache-2.0"
] | 2 | 2021-01-15T13:40:00.000Z | 2021-01-15T13:40:58.000Z | shapash/decomposition/contributions.py | alisoncossette/shapash | d2a5e466450e8bef1e2eac055d78773747244489 | [
"Apache-2.0"
] | null | null | null | shapash/decomposition/contributions.py | alisoncossette/shapash | d2a5e466450e8bef1e2eac055d78773747244489 | [
"Apache-2.0"
] | null | null | null | """
Contributions
"""
import pandas as pd
import numpy as np
from shapash.utils.transform import preprocessing_tolist
from shapash.utils.transform import check_transformers
from shapash.utils.category_encoder_backend import calc_inv_contrib_ce
from shapash.utils.columntransformer_backend import calc_inv_contrib_ct
de... | 31.219512 | 94 | 0.67526 |
793e9020ee57eb84e3ee364212dfa7ea6d597ab1 | 1,749 | py | Python | scripts/_oldstuff/hdf5traits.py | heistermann/trmmlib | b32cf623737285073e4c61bd0e01a0fe8b26c329 | [
"MIT"
] | null | null | null | scripts/_oldstuff/hdf5traits.py | heistermann/trmmlib | b32cf623737285073e4c61bd0e01a0fe8b26c329 | [
"MIT"
] | null | null | null | scripts/_oldstuff/hdf5traits.py | heistermann/trmmlib | b32cf623737285073e4c61bd0e01a0fe8b26c329 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 04 13:08:35 2016
@author: heistermann
"""
# adapted with help from
# http://stackoverflow.com/questions/15023333/simple-tool-library-to-visualize-huge-python-dict
from traits.api import HasTraits, Instance
from traitsui.api import View, VGroup, Item, ValueEditor
from wr... | 30.155172 | 95 | 0.563751 |
793e906630e8a955a0d438d51b42c0514743474e | 50,575 | py | Python | synapse/storage/databases/main/stream.py | BearerPipelineTest/synapse-1 | 78b99de7c206b106340e12cdee0af9aa246bd5ad | [
"Apache-2.0"
] | null | null | null | synapse/storage/databases/main/stream.py | BearerPipelineTest/synapse-1 | 78b99de7c206b106340e12cdee0af9aa246bd5ad | [
"Apache-2.0"
] | null | null | null | synapse/storage/databases/main/stream.py | BearerPipelineTest/synapse-1 | 78b99de7c206b106340e12cdee0af9aa246bd5ad | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-2016 OpenMarket Ltd
# Copyright 2017 Vector Creations Ltd
# Copyright 2018-2019 New Vector Ltd
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# 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... | 35.666432 | 101 | 0.603697 |
793e918096ca989ab6e0a00b52b8e03a69f06e90 | 723 | py | Python | figlets/OLE.py | LeverImmy/SmojSubmit | 7b18812e8b9726184880d0016fc0d19679e50a8a | [
"MIT"
] | 12 | 2018-08-13T14:47:39.000Z | 2022-03-06T13:13:08.000Z | figlets/OLE.py | LeverImmy/SmojSubmit | 7b18812e8b9726184880d0016fc0d19679e50a8a | [
"MIT"
] | 3 | 2019-08-19T16:22:30.000Z | 2020-09-14T21:38:01.000Z | figlets/OLE.py | LeverImmy/SmojSubmit | 7b18812e8b9726184880d0016fc0d19679e50a8a | [
"MIT"
] | 2 | 2019-04-02T02:31:20.000Z | 2020-05-18T04:21:39.000Z | figlet = (
r" ___ _ _ _ _ _ _ _____ _ _ " + '\n'
r" / _ \ _ _| |_ _ __ _ _| |_ | | (_)_ __ ___ (_) |_ | ____|_ _____ ___ ___ __| | ___ __| |" + '\n'
r"| | | | | | | __| '_ \| | | | __| | | | | '_ ` _ \| | __| | _| ... | 80.333333 | 117 | 0.232365 |
793e92d6b6031cbfd2b7bc201aa42435574b6701 | 5,774 | py | Python | configs/carafe/faster_rcnn_r50_fpn_carafe_1x.py | JKingKong/mmdetection | cfa22397194c592c25bd19e2f9f2f60f1ea699d3 | [
"Apache-2.0"
] | null | null | null | configs/carafe/faster_rcnn_r50_fpn_carafe_1x.py | JKingKong/mmdetection | cfa22397194c592c25bd19e2f9f2f60f1ea699d3 | [
"Apache-2.0"
] | null | null | null | configs/carafe/faster_rcnn_r50_fpn_carafe_1x.py | JKingKong/mmdetection | cfa22397194c592c25bd19e2f9f2f60f1ea699d3 | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
style='pytorch'),
... | 30.550265 | 78 | 0.587807 |
793e92d75811f280ed1e3e3a6a92f8ca55df64f7 | 2,433 | py | Python | examples/plugins_manager.py | jspure/Pushkin-is-White-Theme | 1ef3757497237c94cdfc103e978af51a4e5f5459 | [
"MIT"
] | 5 | 2018-07-02T14:09:17.000Z | 2020-01-14T14:43:14.000Z | examples/plugins_manager.py | jspure/Pushkin-is-White-Theme | 1ef3757497237c94cdfc103e978af51a4e5f5459 | [
"MIT"
] | 2 | 2018-09-24T09:31:22.000Z | 2019-11-11T13:12:41.000Z | examples/plugins_manager.py | jspure/Pushkin-is-White-Theme | 1ef3757497237c94cdfc103e978af51a4e5f5459 | [
"MIT"
] | 1 | 2018-07-02T12:52:18.000Z | 2018-07-02T12:52:18.000Z | import os
import gixy
from gixy.plugins.plugin import Plugin
class PluginsManager(object):
def __init__(self, config=None):
self.imported = False
self.config = config
self._plugins = []
def import_plugins(self):
if self.imported:
return
fi... | 32.878378 | 107 | 0.577887 |
793e92e63f1b73d3f2100daa6879429cc90389b3 | 10,841 | py | Python | jina/proto/jina_pb2.py | sthagen/jina-ai-jina | a854da4f7cbafcf5d699a505dacfa4f27014fb62 | [
"Apache-2.0"
] | null | null | null | jina/proto/jina_pb2.py | sthagen/jina-ai-jina | a854da4f7cbafcf5d699a505dacfa4f27014fb62 | [
"Apache-2.0"
] | null | null | null | jina/proto/jina_pb2.py | sthagen/jina-ai-jina | a854da4f7cbafcf5d699a505dacfa4f27014fb62 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: jina.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import message as _message
from google.... | 60.904494 | 3,306 | 0.814685 |
793e92fc67806be9cae12afc54d655e82137fdd6 | 23 | py | Python | kde/__init__.py | dagobash/kde | bb00460a47cfe25563f401fad498f7cafaa51fcf | [
"MIT"
] | null | null | null | kde/__init__.py | dagobash/kde | bb00460a47cfe25563f401fad498f7cafaa51fcf | [
"MIT"
] | null | null | null | kde/__init__.py | dagobash/kde | bb00460a47cfe25563f401fad498f7cafaa51fcf | [
"MIT"
] | null | null | null | from kde.kde import KDE | 23 | 23 | 0.826087 |
793e93826ffbe91b74d0703d26a54205fe2a8707 | 12,497 | py | Python | evaluation_models/inception.py | KamilDeja/PyTorch-VAE | 7782de94bb3f0f11957932bdf2aacc307e8a12ff | [
"Apache-2.0"
] | null | null | null | evaluation_models/inception.py | KamilDeja/PyTorch-VAE | 7782de94bb3f0f11957932bdf2aacc307e8a12ff | [
"Apache-2.0"
] | null | null | null | evaluation_models/inception.py | KamilDeja/PyTorch-VAE | 7782de94bb3f0f11957932bdf2aacc307e8a12ff | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
import os
try:
from torchvision.models.utils import load_state_dict_from_url
except ImportError:
from torch.utils.model_zoo import load_url as load_state_dict_from_url
# Inception weights ported to Pytorch from
# http://down... | 36.648094 | 126 | 0.638633 |
793e946d0ed8db9b1060ad6efc9ac50eb6a8519c | 2,207 | py | Python | bin/run_sep_bfs.py | SEP-Graph/ppopp19-artifact | 576b2ddd78bd5efee3207fb0b3394bd79f61c3d7 | [
"Apache-2.0"
] | 1 | 2020-03-04T09:15:33.000Z | 2020-03-04T09:15:33.000Z | bin/run_sep_bfs.py | SEP-Graph/ppopp19-artifact | 576b2ddd78bd5efee3207fb0b3394bd79f61c3d7 | [
"Apache-2.0"
] | null | null | null | bin/run_sep_bfs.py | SEP-Graph/ppopp19-artifact | 576b2ddd78bd5efee3207fb0b3394bd79f61c3d7 | [
"Apache-2.0"
] | 1 | 2018-12-29T18:12:03.000Z | 2018-12-29T18:12:03.000Z | #!/usr/bin/env python3
from os.path import exists, join
from time import time
from sys import exit
from subprocess import getstatusoutput
from common import DATASET_ROOT, WORKSPACE_ROOT, LOG_ROOT, parse_all_metadata, get_gpu_ram
SEP_PATH = join(WORKSPACE_ROOT, "sep-graph")
SEP_BUILD_PATH = join(SEP_PATH, "build")
BFS_... | 33.953846 | 114 | 0.631174 |
793e952748361e48fd7753e76fbf3d8eec66ae09 | 222 | py | Python | Python3/Lists/clear_pop_remove.py | norbertosanchezdichi/TIL | 2e9719ddd288022f53b094a42679e849bdbcc625 | [
"MIT"
] | null | null | null | Python3/Lists/clear_pop_remove.py | norbertosanchezdichi/TIL | 2e9719ddd288022f53b094a42679e849bdbcc625 | [
"MIT"
] | null | null | null | Python3/Lists/clear_pop_remove.py | norbertosanchezdichi/TIL | 2e9719ddd288022f53b094a42679e849bdbcc625 | [
"MIT"
] | null | null | null | list = [10, 'heh', 'i\'m a dude', 'he\'s a dude', 'she\'s a dude']
print(list)
last_item = list.pop()
print(list)
print(f'Last item \'{last_item}\' has been popped.')
list.remove(10)
print(list)
list.clear()
print(list) | 18.5 | 66 | 0.63964 |
793e95efedcc7167fea997037908a13906af2351 | 10,251 | py | Python | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/inf.py | KrzysztofKoch1/edk2 | 4d621893471c6299de06aeac56f4c6cddc5c9ebe | [
"BSD-2-Clause"
] | 36 | 2017-03-09T08:14:35.000Z | 2022-03-21T03:44:33.000Z | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/inf.py | KrzysztofKoch1/edk2 | 4d621893471c6299de06aeac56f4c6cddc5c9ebe | [
"BSD-2-Clause"
] | 5 | 2019-09-17T22:39:25.000Z | 2021-04-22T01:44:17.000Z | BaseTools/Scripts/PackageDocumentTools/plugins/EdkPlugins/edk2/model/inf.py | KrzysztofKoch1/edk2 | 4d621893471c6299de06aeac56f4c6cddc5c9ebe | [
"BSD-2-Clause"
] | 14 | 2019-08-05T00:28:56.000Z | 2022-03-28T09:11:00.000Z | ## @file
#
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
# distribution. The full text of the license may be found at
# http://open... | 29.973684 | 114 | 0.571652 |
793e960d734dfd294165763109e5cc8dbd30b549 | 751 | py | Python | actions/hallucinationScoutAction.py | SC2-ND-bot/The-PPPP-Bot | f1f4bda5f773347d9d997f4a84b4514a98932d55 | [
"MIT"
] | null | null | null | actions/hallucinationScoutAction.py | SC2-ND-bot/The-PPPP-Bot | f1f4bda5f773347d9d997f4a84b4514a98932d55 | [
"MIT"
] | null | null | null | actions/hallucinationScoutAction.py | SC2-ND-bot/The-PPPP-Bot | f1f4bda5f773347d9d997f4a84b4514a98932d55 | [
"MIT"
] | null | null | null | from actions.action import Action
class HallucinationScoutAction(Action):
def __init__(self):
super().__init__()
self.cost = 2.0
self.scoutLocations = None
self.effects["scouting"] = True
def __repr__(self):
return "Hallucination Action Class"
def reset(self):
self.scoutLocations = None
def checkPr... | 24.225806 | 61 | 0.75233 |
793e9612e2aecad7fc00708c116f259334f1be4b | 309 | py | Python | rllib/offline/is_estimator.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 1 | 2022-03-07T06:40:06.000Z | 2022-03-07T06:40:06.000Z | rllib/offline/is_estimator.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 73 | 2021-09-25T07:11:39.000Z | 2022-03-26T07:10:59.000Z | rllib/offline/is_estimator.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 1 | 2019-09-24T16:24:49.000Z | 2019-09-24T16:24:49.000Z | from ray.rllib.offline.estimators.importance_sampling import ImportanceSampling
from ray.rllib.utils.deprecation import Deprecated
@Deprecated(
new="ray.rllib.offline.estimators.importance_sampling::ImportanceSampling",
error=False,
)
class ImportanceSamplingEstimator(ImportanceSampling):
pass
| 28.090909 | 79 | 0.825243 |
793e96a2ffcde6865164c93b510a37dff5314e65 | 6,680 | py | Python | roadpin_backend/app/cron_data/cron_new_taipei_city.py | g0v/roadpin | c2919552dd3ce0e3614a35466bae6d6a740e9368 | [
"CC-BY-3.0",
"Apache-2.0"
] | 5 | 2015-04-20T17:16:56.000Z | 2018-12-25T11:14:22.000Z | roadpin_backend/app/cron_data/cron_new_taipei_city.py | g0v/roadpin | c2919552dd3ce0e3614a35466bae6d6a740e9368 | [
"CC-BY-3.0",
"Apache-2.0"
] | 1 | 2016-06-20T02:55:27.000Z | 2016-06-21T15:37:19.000Z | roadpin_backend/app/cron_data/cron_new_taipei_city.py | g0v/roadpin | c2919552dd3ce0e3614a35466bae6d6a740e9368 | [
"CC-BY-3.0",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from app.constants import S_OK, S_ERR
import random
import math
import base64
import time
import ujson as json
from StringIO import StringIO
from datetime import datetime
import sys
import argparse
from lxml import html
from twisted.internet import reactor
from scrapy import log, signals
fr... | 27.377049 | 115 | 0.688024 |
793e96c05ec2725f94d692e932e132dd7f3d02b7 | 1,902 | py | Python | api_basebone/core/decorators.py | git-men/bsm-django | 46d1fcbd8ca379d20a3396fd7ea529ccf998f59d | [
"MIT"
] | 90 | 2020-12-07T04:49:43.000Z | 2022-03-31T08:24:35.000Z | api_basebone/core/decorators.py | flyowl/lightning | 946c98986c1c42bf8c28f203cdf8512262283c25 | [
"MIT"
] | 4 | 2021-01-11T16:10:55.000Z | 2022-02-18T12:13:23.000Z | api_basebone/core/decorators.py | flyowl/lightning | 946c98986c1c42bf8c28f203cdf8512262283c25 | [
"MIT"
] | 16 | 2020-12-07T12:32:05.000Z | 2022-01-30T05:36:51.000Z | from functools import wraps
from api_basebone.export.specs import FieldType
BSM_BATCH_ACTION = 'bsm_action_map'
BSM_CLIENT_BATCH_ACTION = 'bsm_client_action_map'
BSM_ADMIN_COMPUTED_FIELDS_MAP = 'bsm_admin_computed_fields_map'
def action(model, verbose_name='', manage=True):
"""
管理端批量操作的连接器
可以把动作连接到对应的模型... | 26.054795 | 79 | 0.654574 |
793e988b46aef7286ce6b56e7eba8e88be95400d | 619 | py | Python | effdet/data/parsers/parser_factory.py | SKA-INAF/efficientdet-pytorch | 8967bab88288d11e5547a7efa391adc0c987be47 | [
"Apache-2.0"
] | null | null | null | effdet/data/parsers/parser_factory.py | SKA-INAF/efficientdet-pytorch | 8967bab88288d11e5547a7efa391adc0c987be47 | [
"Apache-2.0"
] | null | null | null | effdet/data/parsers/parser_factory.py | SKA-INAF/efficientdet-pytorch | 8967bab88288d11e5547a7efa391adc0c987be47 | [
"Apache-2.0"
] | null | null | null | """ Parser factory
Copyright 2020 Ross Wightman
"""
from .parser_coco import CocoParser
from .parser_voc import VocParser
from .parser_open_images import OpenImagesParser
from .parser_radio_galaxy import RadioGalaxyParser
def create_parser(name, **kwargs):
if name == 'coco':
parser = CocoParser(**kwargs)... | 26.913043 | 56 | 0.684976 |
793e98b3b0af2be75fe4928d6d5fc6fe72ffef4e | 1,960 | py | Python | tridentstream/services/config/configservice.py | tridentstream/mediaserver | 5d47d766df2e8dca076e41348062567a569019fd | [
"MIT"
] | 6 | 2020-01-03T14:50:09.000Z | 2021-09-13T01:44:31.000Z | tridentstream/services/config/configservice.py | tidalstream/mediaserver | 5d47d766df2e8dca076e41348062567a569019fd | [
"MIT"
] | null | null | null | tridentstream/services/config/configservice.py | tidalstream/mediaserver | 5d47d766df2e8dca076e41348062567a569019fd | [
"MIT"
] | null | null | null | from unplugged import Schema
from ...plugins import ConfigPlugin
from .models import DefaultSetting, Setting
class ConfigConfigPlugin(ConfigPlugin):
plugin_name = "config"
config_schema = Schema
def __init__(self, config):
super(ConfigConfigPlugin, self).__init__(config)
self.schemas = ... | 31.111111 | 87 | 0.616837 |
793e9b1e0c97e3cd85ca94e6190e7809ee037606 | 684 | py | Python | tf2-neural-style-transfer/settings.py | ganfanhang/DeepLearningExamples | 1d940c60b2f45b925599cea81e97a40ae81c4d76 | [
"Apache-2.0"
] | 274 | 2020-01-28T08:12:55.000Z | 2022-03-28T02:28:31.000Z | tf2-neural-style-transfer/settings.py | ronlado74/DeepLearningExamples | 061c64abde7eb76ab7683616ebb9090814f13362 | [
"Apache-2.0"
] | 16 | 2020-03-23T04:01:37.000Z | 2022-02-10T01:52:51.000Z | tf2-neural-style-transfer/settings.py | ronlado74/DeepLearningExamples | 061c64abde7eb76ab7683616ebb9090814f13362 | [
"Apache-2.0"
] | 241 | 2020-02-03T03:17:42.000Z | 2022-03-28T09:04:05.000Z | # -*- coding: utf-8 -*-
# @File : settings.py
# @Author : AaronJny
# @Time : 2020/03/13
# @Desc :
# 内容特征层及loss加权系数
CONTENT_LAYERS = {'block4_conv2': 0.5, 'block5_conv2': 0.5}
# 风格特征层及loss加权系数
STYLE_LAYERS = {'block1_conv1': 0.2, 'block2_conv1': 0.2, 'block3_conv1': 0.2, 'block4_conv1': 0.2,
... | 19 | 99 | 0.671053 |
793e9b77aee1b283dcf82ea1e797a217923808a0 | 6,543 | py | Python | sar/scripts/uav_sar_simulation.py | cpswarm/complex_behaviors | 68f2a07180f6056f32c0ed16e9e21ac57794e2ed | [
"Apache-2.0"
] | 4 | 2019-09-18T20:42:59.000Z | 2021-02-17T04:50:28.000Z | sar/scripts/uav_sar_simulation.py | cpswarm/complex_behaviors | 68f2a07180f6056f32c0ed16e9e21ac57794e2ed | [
"Apache-2.0"
] | null | null | null | sar/scripts/uav_sar_simulation.py | cpswarm/complex_behaviors | 68f2a07180f6056f32c0ed16e9e21ac57794e2ed | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
import rospy
import smach
import smach_ros
import mavros_msgs
import std_srvs.srv
from cpswarm_msgs.msg import *
from swarmros.msg import *
# define state Idle
class Idle(smach.State):
def __init__(self):
smach.State.__init__(self, outcomes=['succeeded'])
def execute(self, us... | 32.231527 | 105 | 0.644811 |
793e9b9444545d79865f4e935068955867db83bc | 1,367 | py | Python | src/api-service/tests/test_task_config.py | tonybaloney/onefuzz | e0f2e9ed5aae006e0054387de7a0ff8c83c8f722 | [
"MIT"
] | 2,692 | 2020-09-15T17:54:21.000Z | 2022-03-31T11:58:57.000Z | src/api-service/tests/test_task_config.py | tonybaloney/onefuzz | e0f2e9ed5aae006e0054387de7a0ff8c83c8f722 | [
"MIT"
] | 980 | 2020-09-18T18:23:01.000Z | 2022-03-30T22:20:43.000Z | src/api-service/tests/test_task_config.py | nharper285/onefuzz | 1de2cc841d6fc885f8bcb6d032bf5b96ddb52493 | [
"MIT"
] | 177 | 2020-09-16T00:10:56.000Z | 2022-03-30T21:18:10.000Z | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from typing import Tuple
import pytest
from __app__.onefuzzlib.tasks.config import is_valid_blob_name
BlobNameTestCase = Tuple[str, bool]
BLOB_NAME_TEST_CASES = [
# Valid
("fuzz.exe", True),
("bin/fuzz.exe... | 23.568966 | 75 | 0.572056 |
793e9baebb5a0d66ce73900fcee710f26f661ad3 | 1,205 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/xdata/apis/ListInstanceInfoRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/xdata/apis/ListInstanceInfoRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/xdata/apis/ListInstanceInfoRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 28.690476 | 75 | 0.714523 |
793e9bb6c6e2f422d158d436958dc5110b478ebc | 2,603 | py | Python | code/data_clean.py | dongpengfei826153155/fiddler2jmeter | 68fcbe197bf0414eff0525f52df056cc89884259 | [
"Apache-2.0"
] | 13 | 2020-09-04T06:45:29.000Z | 2021-11-29T01:46:13.000Z | code/data_clean.py | dongpengfei826153155/fiddler2jmeter | 68fcbe197bf0414eff0525f52df056cc89884259 | [
"Apache-2.0"
] | null | null | null | code/data_clean.py | dongpengfei826153155/fiddler2jmeter | 68fcbe197bf0414eff0525f52df056cc89884259 | [
"Apache-2.0"
] | 7 | 2020-09-06T04:26:34.000Z | 2021-11-29T01:46:11.000Z | import re
# 数据清洗处理
class DataClean:
def __init__(self, jmeter_datas):
self.jmeter_datas = jmeter_datas
def select_jmeter_data(self, host_name=None, filter_url=None, distinct=False):
'''
数据清洗,得到想要的数据
:param host_name: HOST regexp匹配
:param filter_url: 需要去除的url
eg... | 41.31746 | 107 | 0.573569 |
793e9bd27063a005f26670ee28f494df45b4513d | 227 | py | Python | tests/context.py | ezrasavard/compound | d32e8f3ebbc1fc0209e94810a48461097b04515e | [
"MIT"
] | 1 | 2017-08-14T14:37:40.000Z | 2017-08-14T14:37:40.000Z | tests/context.py | ezrasavard/compound | d32e8f3ebbc1fc0209e94810a48461097b04515e | [
"MIT"
] | null | null | null | tests/context.py | ezrasavard/compound | d32e8f3ebbc1fc0209e94810a48461097b04515e | [
"MIT"
] | null | null | null | import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
'..')))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
'../compoundfin')))
import compoundfin
| 25.222222 | 74 | 0.709251 |
793e9bee8aedbc33e10729f3b21cb11aaa089df1 | 11,189 | py | Python | clients/client/python/ory_client/model/project_slug.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/project_slug.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/project_slug.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.42
Contact: support@ory.sh
Generated by: htt... | 43.536965 | 194 | 0.57199 |
793e9d9ef264fbf24b869b02296d4aa621ab42f1 | 28,573 | py | Python | alien4cloud-cloudify3-provider/src/test/resources/outputs/blueprints/openstack/tomcat/plugins/custom_wf_plugin/plugin/workflows.py | alien4cloud/alien4cloud-cloudify4-provider | 97faee855255eb0c3ce25bb3075c29acd11a63c5 | [
"Apache-2.0"
] | null | null | null | alien4cloud-cloudify3-provider/src/test/resources/outputs/blueprints/openstack/tomcat/plugins/custom_wf_plugin/plugin/workflows.py | alien4cloud/alien4cloud-cloudify4-provider | 97faee855255eb0c3ce25bb3075c29acd11a63c5 | [
"Apache-2.0"
] | 3 | 2015-12-04T15:27:22.000Z | 2016-04-08T11:32:43.000Z | alien4cloud-cloudify3-provider/src/test/resources/outputs/blueprints/openstack/tomcat/plugins/custom_wf_plugin/plugin/workflows.py | alien4cloud/alien4cloud-cloudify4-provider | 97faee855255eb0c3ce25bb3075c29acd11a63c5 | [
"Apache-2.0"
] | 16 | 2015-01-29T10:05:09.000Z | 2019-06-24T19:23:54.000Z | from cloudify.decorators import workflow
from cloudify.workflows import ctx
from cloudify.workflows import tasks as workflow_tasks
from utils import set_state_task
from utils import operation_task
from utils import link_tasks
from utils import CustomContext
from utils import generate_native_node_workflows
from utils im... | 58.075203 | 127 | 0.73146 |
793e9da2fa742db3574445e0e028ad412928ff35 | 611 | py | Python | ns/flow/flow.py | wsyCUHK/ns.py | 44f9c627a9d3b9b31a0799b9a9cea50560eda8a1 | [
"Apache-2.0"
] | 3 | 2021-06-17T01:57:43.000Z | 2021-12-16T11:53:31.000Z | ns/flow/flow.py | wsyCUHK/ns.py | 44f9c627a9d3b9b31a0799b9a9cea50560eda8a1 | [
"Apache-2.0"
] | null | null | null | ns/flow/flow.py | wsyCUHK/ns.py | 44f9c627a9d3b9b31a0799b9a9cea50560eda8a1 | [
"Apache-2.0"
] | null | null | null | class Flow:
def __init__(self,
fid,
src,
dst,
size=None,
start_time=None,
finish_time=None,
pkt_gen=None,
pkt_sink=None) -> None:
self.fid = fid
self.src = src
... | 25.458333 | 48 | 0.466448 |
793e9e17169f69013d2ece32d6c799ced555978c | 590 | py | Python | voxel_globe/websockets/migrations/0002_log_message_timestamp.py | ngageoint/voxel-globe | 91f386de652b704942165889c10468b2c4cf4eec | [
"MIT"
] | 28 | 2015-07-27T23:57:24.000Z | 2020-04-05T15:10:52.000Z | voxel_globe/websockets/migrations/0002_log_message_timestamp.py | VisionSystemsInc/voxel_globe | 6eb3fca5586726428e9d914f7b730ca164c64a52 | [
"MIT"
] | 50 | 2016-02-11T15:50:22.000Z | 2016-10-27T22:38:27.000Z | voxel_globe/websockets/migrations/0002_log_message_timestamp.py | ngageoint/voxel-globe | 91f386de652b704942165889c10468b2c4cf4eec | [
"MIT"
] | 8 | 2015-07-27T19:22:03.000Z | 2021-01-04T09:44:48.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('websockets', '0001_update_websocket_models'),
]
operations = [
migrati... | 25.652174 | 130 | 0.655932 |
793e9f5b22b07dba8a759e852f6676f028ee19ff | 102 | py | Python | src/app/config_default.py | cla7aye15I4nd/zhiyuan-salon-Q | 3e7c91fc466f6aeef7950034d9ed84928e539cb9 | [
"MIT"
] | 2 | 2021-05-25T07:33:44.000Z | 2021-05-25T07:35:11.000Z | src/app/config_default.py | cla7aye15I4nd/zhiyuan-salon-Q | 3e7c91fc466f6aeef7950034d9ed84928e539cb9 | [
"MIT"
] | null | null | null | src/app/config_default.py | cla7aye15I4nd/zhiyuan-salon-Q | 3e7c91fc466f6aeef7950034d9ed84928e539cb9 | [
"MIT"
] | null | null | null | SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///./user.db'
SECRET_KEY = ''
| 25.5 | 47 | 0.77451 |
793e9f9916e17c1a9232f00431eaeb26731c1e0b | 5,361 | py | Python | tests/protocols/test_irc.py | spaceone/circuits | ed6d5464f1f83034109ed3d23d126c715450cfd2 | [
"MIT"
] | null | null | null | tests/protocols/test_irc.py | spaceone/circuits | ed6d5464f1f83034109ed3d23d126c715450cfd2 | [
"MIT"
] | null | null | null | tests/protocols/test_irc.py | spaceone/circuits | ed6d5464f1f83034109ed3d23d126c715450cfd2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pytest
from pytest import fixture
from circuits import Component, Event, handler
from circuits.net.events import read, write
from circuits.protocols.irc import (
AWAY, INVITE, IRC, JOIN, KICK, MODE, NAMES, NICK, NOTICE, PART, PASS, PONG,
PRIVMSG, QUIT, TOPIC, USER, WHOIS, irc_color... | 33.092593 | 236 | 0.611267 |
793ea103f6ede73dc586316a863d7fffd5fc6dff | 134 | py | Python | src/browserist/browser/scroll/to_top_of_page.py | jakob-bagterp/browserist | 76bd916dd217b7da3759fd6ec3374191002dc091 | [
"Apache-2.0"
] | 2 | 2022-02-20T10:03:19.000Z | 2022-03-22T11:17:10.000Z | src/browserist/browser/scroll/to_top_of_page.py | jakob-bagterp/browserist | 76bd916dd217b7da3759fd6ec3374191002dc091 | [
"Apache-2.0"
] | null | null | null | src/browserist/browser/scroll/to_top_of_page.py | jakob-bagterp/browserist | 76bd916dd217b7da3759fd6ec3374191002dc091 | [
"Apache-2.0"
] | null | null | null | from .to_position import scroll_to_position
def scroll_to_top_of_page(driver: object) -> None:
scroll_to_position(driver, 0, 0)
| 22.333333 | 50 | 0.783582 |
793ea113d6d4fd41b35d10c3564067d48b713dd1 | 1,891 | py | Python | benchmark/startPyquil2707.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil2707.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startPyquil2707.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=43
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += CNOT(0,3) # number=10
... | 25.213333 | 64 | 0.56055 |
793ea1f806e761fd116844a9b2e81f1c386aa10b | 4,700 | py | Python | kgcnn/literature/GATv2.py | thegodone/gcnn_keras | 2009b9ab9a07c1a369849478812fcc2cb9799945 | [
"MIT"
] | null | null | null | kgcnn/literature/GATv2.py | thegodone/gcnn_keras | 2009b9ab9a07c1a369849478812fcc2cb9799945 | [
"MIT"
] | null | null | null | kgcnn/literature/GATv2.py | thegodone/gcnn_keras | 2009b9ab9a07c1a369849478812fcc2cb9799945 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow.keras as ks
from kgcnn.layers.casting import ChangeTensorType
from kgcnn.layers.conv.attention import AttentionHeadGATV2
from kgcnn.layers.keras import Concatenate, Dense, Average, Activation
from kgcnn.layers.mlp import MLP
from kgcnn.layers.pool.pooling import PoolingNodes
f... | 47.959184 | 120 | 0.635532 |
793ea2cbdc428bd05e80cd8878ca62180763c3b3 | 1,676 | py | Python | synergy/mx/tree_details.py | hwknsj/scheduler | 6740331360f49083c208085fb5a60ce80ebf418b | [
"BSD-3-Clause"
] | null | null | null | synergy/mx/tree_details.py | hwknsj/scheduler | 6740331360f49083c208085fb5a60ce80ebf418b | [
"BSD-3-Clause"
] | null | null | null | synergy/mx/tree_details.py | hwknsj/scheduler | 6740331360f49083c208085fb5a60ce80ebf418b | [
"BSD-3-Clause"
] | null | null | null | __author__ = 'Bohdan Mushkevych'
from werkzeug.utils import cached_property
from synergy.mx.base_request_handler import BaseRequestHandler
from synergy.mx.rest_model_factory import create_rest_timetable_tree, create_rest_managed_scheduler_entry
class TreeDetails(BaseRequestHandler):
def __init__(self, request, *... | 40.878049 | 105 | 0.655131 |
793ea2d497a8995a92e9bde98facf0a6c8112edd | 4,257 | py | Python | phaino/models/gaussian.py | vinicius-pirees/phaino | 4aa720505fef55b416149df664c4a8787e1491e5 | [
"MIT"
] | null | null | null | phaino/models/gaussian.py | vinicius-pirees/phaino | 4aa720505fef55b416149df664c4a8787e1491e5 | [
"MIT"
] | 4 | 2020-09-26T01:13:19.000Z | 2022-02-10T01:50:11.000Z | phaino/models/gaussian.py | vinicius-pirees/phaino | 4aa720505fef55b416149df664c4a8787e1491e5 | [
"MIT"
] | null | null | null | import os
import numpy as np
import scipy
from numpy import inf
from phaino.utils.spatio_temporal_gradient_features import process_frames
from phaino.utils.commons import frame_to_gray, reduce_frame
import pickle
from datetime import datetime
from phaino.config.config import PhainoConfiguration
config = PhainoConfigur... | 29.5625 | 123 | 0.606765 |
793ea35449988c46c2ba3832d970f1d6491e4913 | 1,274 | py | Python | src/boost_histogram/_internal/traits.py | kgizdov/boost-histogram | a456b89c703a2e69b32ca7de23448a133d5c59a3 | [
"BSD-3-Clause"
] | null | null | null | src/boost_histogram/_internal/traits.py | kgizdov/boost-histogram | a456b89c703a2e69b32ca7de23448a133d5c59a3 | [
"BSD-3-Clause"
] | null | null | null | src/boost_histogram/_internal/traits.py | kgizdov/boost-histogram | a456b89c703a2e69b32ca7de23448a133d5c59a3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# This is basically a dataclass from Python 3.7, with frozen=True
from typing import Any
_traits = (
"underflow",
"overflow",
"circular",
"growth",
"continuous",
"ordered",
)
# This can be converted to a immutable dataclass once Python < 3.7 is dropped.
class Traits... | 24.037736 | 83 | 0.567504 |
793ea36c6eec604fe884e406cff74048c297eee7 | 1,092 | py | Python | tests/tests_geomstats/test_errors.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | 10 | 2018-01-28T17:16:44.000Z | 2022-02-27T02:42:41.000Z | tests/tests_geomstats/test_errors.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | 67 | 2018-01-05T17:15:32.000Z | 2018-05-11T18:50:30.000Z | tests/tests_geomstats/test_errors.py | YannCabanes/geomstats | ce3f4bab6cd59c2f071371a46e336086771d0493 | [
"MIT"
] | 3 | 2021-11-12T23:57:46.000Z | 2021-12-04T10:05:42.000Z | """Unit tests for errors."""
import pytest
import geomstats.backend as gs
import geomstats.errors
import geomstats.tests
from geomstats.geometry.euclidean import Euclidean
from geomstats.geometry.spd_matrices import SPDMatrices
class TestBackends(geomstats.tests.TestCase):
def test_check_belongs(self):
... | 27.3 | 61 | 0.675824 |
793ea3e9afbe9e94040e74850dbcb754760637f7 | 15,610 | py | Python | motifx/motifx.py | EthanVn/MotifX | 4258ac72823bdc335f4f3d01fd03c8dc495e14ec | [
"MIT"
] | 1 | 2021-05-04T17:43:47.000Z | 2021-05-04T17:43:47.000Z | motifx/motifx.py | EthanVn/MotifX | 4258ac72823bdc335f4f3d01fd03c8dc495e14ec | [
"MIT"
] | null | null | null | motifx/motifx.py | EthanVn/MotifX | 4258ac72823bdc335f4f3d01fd03c8dc495e14ec | [
"MIT"
] | null | null | null | from scipy.sparse import csr_matrix, csc_matrix, lil_matrix
from .cache import Cache
import numpy as np
class MotifX(object):
def __init__(self, matrix, reformat=True, dtype=np.int32):
self.cache = Cache(matrix, reformat, dtype)
def M1(self) -> (csr_matrix, dict):
UT_csr: csr_matrix = self.ca... | 39.821429 | 101 | 0.422165 |
793ea4815e32580a920ae62b55656db101afb927 | 2,565 | py | Python | graph_plots/Data/data.py | DanShai/kivy-graph | 6537901d521247a13e186aaa8ecbaffdffdaf7ea | [
"MIT"
] | 3 | 2018-11-28T13:35:35.000Z | 2021-09-12T15:54:28.000Z | graph_plots/Data/data.py | DanShai/kivy-graph | 6537901d521247a13e186aaa8ecbaffdffdaf7ea | [
"MIT"
] | null | null | null | graph_plots/Data/data.py | DanShai/kivy-graph | 6537901d521247a13e186aaa8ecbaffdffdaf7ea | [
"MIT"
] | 1 | 2021-05-03T18:48:01.000Z | 2021-05-03T18:48:01.000Z | '''
@author: dan
'''
from __future__ import division
import numpy as np
from random import randint
from copy import deepcopy
from sklearn.datasets import make_moons, make_circles, make_classification
from sklearn.preprocessing import MinMaxScaler
class Adata(object):
def make2DDatas(self):
datasets ... | 32.468354 | 126 | 0.560234 |
793ea489f21d95b34570aed36b75cb5cc33c7755 | 2,072 | py | Python | b2validators/document.py | math-s/b2bit-validators | 35beb903eaf26524485a0b7ec9efc73c5f103fc5 | [
"MIT"
] | null | null | null | b2validators/document.py | math-s/b2bit-validators | 35beb903eaf26524485a0b7ec9efc73c5f103fc5 | [
"MIT"
] | null | null | null | b2validators/document.py | math-s/b2bit-validators | 35beb903eaf26524485a0b7ec9efc73c5f103fc5 | [
"MIT"
] | null | null | null | import re
from b2validators.exceptions import ValidationError
def validate_cnpj(value):
cnpj = re.sub("[^0-9]", "", value)
if len(cnpj) < 14:
raise ValidationError("O CNPJ precisa ter 14 dígitos.")
expected_cnpj = [int(digit) for digit in cnpj[:12] if digit.isdigit()]
cnpj_test = [int(digit) ... | 26.909091 | 74 | 0.601834 |
793ea49f27f6fc24701cf4cb928bea13ae0cab0e | 9,568 | py | Python | Alignment/APEEstimation/test/testApeestimator_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | Alignment/APEEstimation/test/testApeestimator_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | Alignment/APEEstimation/test/testApeestimator_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | import os
import FWCore.ParameterSet.Config as cms
##
## Setup command line options
##
import FWCore.ParameterSet.VarParsing as VarParsing
import sys
options = VarParsing.VarParsing ('standard')
options.register('sample', 'wlnu', VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.string, "... | 30.56869 | 134 | 0.749373 |
793ea5500fe5a11ec6ba119f9343eda150fb0c14 | 1,048 | py | Python | Line.py | TheoXiong7/chessboard-processing | cce2b03700881c07787b0def9a23e8606325939c | [
"MIT"
] | null | null | null | Line.py | TheoXiong7/chessboard-processing | cce2b03700881c07787b0def9a23e8606325939c | [
"MIT"
] | null | null | null | Line.py | TheoXiong7/chessboard-processing | cce2b03700881c07787b0def9a23e8606325939c | [
"MIT"
] | null | null | null | import numpy as np
class Line:
def __init__(self,x1,x2,y1,y2):
'''
Creates a Line object
'''
# Endpoints
self.x1 = x1
self.x2 = x2
self.y1 = y1
self.y2 = y2
# Change in x and y
self.dx = self.x2 - self.x1
self.dy = self.y2 - self.y1
# Orientation
if abs(self.dx) > abs(self.dy):
self.... | 24.372093 | 204 | 0.640267 |
793ea67ca80fd354ec4d3482a5408825a4ed8031 | 5,383 | py | Python | build/PureCloudPlatformClientV2/models/bu_async_schedule_run_response.py | cjohnson-ctl/platform-client-sdk-python | 38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100 | [
"MIT"
] | 10 | 2019-02-22T00:27:08.000Z | 2021-09-12T23:23:44.000Z | libs/PureCloudPlatformClientV2/models/bu_async_schedule_run_response.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 5 | 2018-06-07T08:32:00.000Z | 2021-07-28T17:37:26.000Z | libs/PureCloudPlatformClientV2/models/bu_async_schedule_run_response.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 6 | 2020-04-09T17:43:07.000Z | 2022-02-17T08:48:05.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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... | 28.786096 | 81 | 0.582761 |
793ea69aff6bb07f73aff3e7089f7cc2a617fa16 | 15,148 | py | Python | salt/modules/ciscoconfparse_mod.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | salt/modules/ciscoconfparse_mod.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 1 | 2017-07-10T21:44:39.000Z | 2017-07-10T21:44:39.000Z | salt/modules/ciscoconfparse_mod.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | """
Execution module for `ciscoconfparse <http://www.pennington.net/py/ciscoconfparse/index.html>`_
.. versionadded:: 2019.2.0
This module can be used for basic configuration parsing, audit or validation
for a variety of network platforms having Cisco IOS style configuration (one
space indentation), including: Cisco ... | 33.365639 | 131 | 0.610378 |
793ea701b1fe2c5bdd74adb61e8865a1413a48f6 | 10,214 | py | Python | src/reader/chemdner_corpus.py | admukhty/IHP | b812938582c77d7ab275f8ea04316a38b576323c | [
"MIT"
] | null | null | null | src/reader/chemdner_corpus.py | admukhty/IHP | b812938582c77d7ab275f8ea04316a38b576323c | [
"MIT"
] | null | null | null | src/reader/chemdner_corpus.py | admukhty/IHP | b812938582c77d7ab275f8ea04316a38b576323c | [
"MIT"
] | null | null | null | import codecs
import time
import sys
import logging
import argparse
import pickle
from operator import itemgetter
from pycorenlp import StanfordCoreNLP
import progressbar as pb
from subprocess import check_output
from text.corpus import Corpus
from text.document import Document
from config import config
... | 51.847716 | 123 | 0.593205 |
793ea7fe5fa58fc77b16c972f51062c8574a14db | 8,272 | py | Python | docs/conf.py | bwall/yara | 43ffdcc226325e208d01172cd27870d3e046d79f | [
"Apache-2.0"
] | 6 | 2019-09-02T14:21:04.000Z | 2021-10-01T01:54:46.000Z | docs/conf.py | Neo23x0/yara | 7cf4b24b052d9eede9b8288c0c250b58efaa13e1 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | Neo23x0/yara | 7cf4b24b052d9eede9b8288c0c250b58efaa13e1 | [
"Apache-2.0"
] | 8 | 2016-02-07T08:11:18.000Z | 2021-09-01T13:22:51.000Z | # -*- coding: utf-8 -*-
#
# yara documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 8 11:04:03 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | 30.865672 | 79 | 0.717239 |
793ea81f14931c4897720d87aa1f572077adc71a | 838 | py | Python | tests/test_data.py | keggsmurph21/jam | 1aee2c56961d58def4e1f24a3dea824ade04f02d | [
"MIT"
] | 1 | 2020-10-16T03:31:25.000Z | 2020-10-16T03:31:25.000Z | tests/test_data.py | keggsmurph21/jam | 1aee2c56961d58def4e1f24a3dea824ade04f02d | [
"MIT"
] | null | null | null | tests/test_data.py | keggsmurph21/jam | 1aee2c56961d58def4e1f24a3dea824ade04f02d | [
"MIT"
] | null | null | null | nested = {
"json": ["rigid", "better for data interchange"],
"toml": ["simple and readable", "easier to implement"],
"yaml": ["slim and flexible", "better for configuration"],
"object": {
"key": "value",
"array": [{"null_value": None}, {"boolean": True}, {"integer": 1}],
},
"para... | 34.916667 | 75 | 0.593079 |
793ea927834cdb96d321e16ae1409fa9b5ece1d3 | 5,536 | py | Python | examples/examples.py | gjdv/DegiroAPI | 578b97b1add42f6d5e031be8eb034314c51ec30f | [
"MIT"
] | null | null | null | examples/examples.py | gjdv/DegiroAPI | 578b97b1add42f6d5e031be8eb034314c51ec30f | [
"MIT"
] | null | null | null | examples/examples.py | gjdv/DegiroAPI | 578b97b1add42f6d5e031be8eb034314c51ec30f | [
"MIT"
] | 1 | 2022-01-23T11:15:17.000Z | 2022-01-23T11:15:17.000Z | import degiroapi
from degiroapi.product import Product
from degiroapi.order import Order
from degiroapi.utils import pretty_json
from datetime import datetime, timedelta
# login
degiro = degiroapi.DeGiro()
degiro.login("username", "password")
# login with 2fa
otp = input("Input Google Authenticator password:")
degir... | 43.590551 | 191 | 0.758851 |
793ea9435bd170011bc32e6d01e7ada53f178603 | 2,593 | py | Python | spider.py | trinathtiru/jaipal | 232b7a6742b4ec695b1eda5aa6010b1d8fb274a8 | [
"Apache-2.0"
] | null | null | null | spider.py | trinathtiru/jaipal | 232b7a6742b4ec695b1eda5aa6010b1d8fb274a8 | [
"Apache-2.0"
] | null | null | null | spider.py | trinathtiru/jaipal | 232b7a6742b4ec695b1eda5aa6010b1d8fb274a8 | [
"Apache-2.0"
] | null | null | null | from urllib.request import urlopen
from link_finder import LinkFinder
from domain import *
from general import *
class Spider:
project_name = ''
base_url = ''
domain_name = ''
queue_file = ''
crawled_file = ''
queue = set()
crawled = set()
def __init__(self, project_name, base_url, do... | 35.520548 | 96 | 0.639028 |
793ea9e4082cfdb90bd39771017d990592d4bcb9 | 4,916 | py | Python | examples/app_based_example.py | dokime7/flask-cors | caa7ba1e0df3f65e254fe9e31121491ad0e93a60 | [
"MIT"
] | null | null | null | examples/app_based_example.py | dokime7/flask-cors | caa7ba1e0df3f65e254fe9e31121491ad0e93a60 | [
"MIT"
] | null | null | null | examples/app_based_example.py | dokime7/flask-cors | caa7ba1e0df3f65e254fe9e31121491ad0e93a60 | [
"MIT"
] | null | null | null | """
Flask-Cors example
===================
This is a tiny Flask Application demonstrating Flask-Cors, making it simple
to add cross origin support to your flask app!
:copyright: (c) 2016 by Cory Dolphin.
:license: MIT/X11, see LICENSE for more details.
"""
from flask import Flask, jsonify
import logging
try:
fro... | 32.556291 | 99 | 0.641985 |
793eaa435d535277f474f280ac2b7b63e68bfbc0 | 8,196 | py | Python | homeassistant/components/zwave_js/entity.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 5 | 2020-12-15T04:09:01.000Z | 2022-03-11T21:34:24.000Z | homeassistant/components/zwave_js/entity.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 77 | 2020-07-16T16:43:09.000Z | 2022-03-31T06:14:37.000Z | homeassistant/components/zwave_js/entity.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Generic Z-Wave Entity Class."""
from __future__ import annotations
import logging
from zwave_js_server.client import Client as ZwaveClient
from zwave_js_server.const import NodeStatus
from zwave_js_server.model.value import Value as ZwaveValue, get_value_id
from homeassistant.config_entries import ConfigEntry
fro... | 33.453061 | 86 | 0.598829 |
793eaa6c3b9605410c7f4668cd9db5ac18caa17f | 5,412 | py | Python | pyqtgraph/graphicsItems/ArrowItem.py | StSav012/pyqtgraph | 65e17c4e3707eb3bd4d91cdc13504d9b150f4360 | [
"MIT"
] | 1 | 2022-01-30T20:04:51.000Z | 2022-01-30T20:04:51.000Z | pyqtgraph/graphicsItems/ArrowItem.py | StSav012/pyqtgraph | 65e17c4e3707eb3bd4d91cdc13504d9b150f4360 | [
"MIT"
] | null | null | null | pyqtgraph/graphicsItems/ArrowItem.py | StSav012/pyqtgraph | 65e17c4e3707eb3bd4d91cdc13504d9b150f4360 | [
"MIT"
] | null | null | null | from math import hypot
from .. import functions as fn
from ..Qt import QtGui, QtWidgets
__all__ = ['ArrowItem']
class ArrowItem(QtWidgets.QGraphicsPathItem):
"""
For displaying scale-invariant arrows.
For arrows pointing to a location on a curve, see CurveArrow
"""
def __init__(sel... | 36.567568 | 93 | 0.49612 |
793eaacc92317d3ab8302c3131c199248127e3c9 | 3,807 | py | Python | desertbot/modules/utils/StringUtils.py | DesertBot/DesertBot | 33b4fe03dae5ead23003e18b511179e0b03b061d | [
"MIT",
"BSD-3-Clause"
] | 7 | 2018-03-20T17:10:10.000Z | 2021-11-17T18:58:04.000Z | desertbot/modules/utils/StringUtils.py | DesertBot/DesertBot | 33b4fe03dae5ead23003e18b511179e0b03b061d | [
"MIT",
"BSD-3-Clause"
] | 109 | 2015-08-20T13:16:35.000Z | 2022-01-21T19:40:35.000Z | desertbot/modules/utils/StringUtils.py | DesertBot/DesertBot | 33b4fe03dae5ead23003e18b511179e0b03b061d | [
"MIT",
"BSD-3-Clause"
] | 7 | 2018-03-29T05:55:01.000Z | 2021-02-05T19:19:39.000Z | import json
import re
from collections import OrderedDict
from typing import List
from pyxdameraulevenshtein import normalized_damerau_levenshtein_distance as ndld
from twisted.plugin import IPlugin
from zope.interface import implementer
from desertbot.message import IRCMessage
from desertbot.moduleinterface import I... | 39.65625 | 111 | 0.63357 |
793eac9111aa62412e756ed54e444241ef79474e | 35,590 | py | Python | mmdet/models/dense_heads/gfl_head_fixlastscale.py | wuguikel/DCFANet | 3d6a7d767f89b7c95692d89bfb2951aeca2740f6 | [
"Apache-2.0"
] | null | null | null | mmdet/models/dense_heads/gfl_head_fixlastscale.py | wuguikel/DCFANet | 3d6a7d767f89b7c95692d89bfb2951aeca2740f6 | [
"Apache-2.0"
] | null | null | null | mmdet/models/dense_heads/gfl_head_fixlastscale.py | wuguikel/DCFANet | 3d6a7d767f89b7c95692d89bfb2951aeca2740f6 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import ConvModule, Scale, bias_init_with_prob, normal_init
from mmcv.runner import force_fp32
from mmdet.core import (anchor_inside_flags, bbox2distance, bbox_overlaps,
build_assigner, build_sampler, distance2bbox,... | 42.931242 | 80 | 0.558191 |
793eaecccff9f663269eef488d71f4b7da1b97ef | 7,547 | py | Python | builder/main.py | stanford-ssi/platform-atmelsam | d9fe6a3699c687e213e71bee91dd5f3836e79247 | [
"Apache-2.0"
] | null | null | null | builder/main.py | stanford-ssi/platform-atmelsam | d9fe6a3699c687e213e71bee91dd5f3836e79247 | [
"Apache-2.0"
] | null | null | null | builder/main.py | stanford-ssi/platform-atmelsam | d9fe6a3699c687e213e71bee91dd5f3836e79247 | [
"Apache-2.0"
] | 1 | 2022-01-15T13:19:10.000Z | 2022-01-15T13:19:10.000Z | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 30.309237 | 86 | 0.591891 |
793eaf12e8df5b69fbe0c625b09e8a6a110c4160 | 6,192 | py | Python | pretrained-model/vocoder/universal-melgan/universal-melgan-1024.py | ishine/malaya-speech | fd34afc7107af1656dff4b3201fa51dda54fde18 | [
"MIT"
] | 111 | 2020-08-31T04:58:54.000Z | 2022-03-29T15:44:18.000Z | pretrained-model/vocoder/universal-melgan/universal-melgan-1024.py | ishine/malaya-speech | fd34afc7107af1656dff4b3201fa51dda54fde18 | [
"MIT"
] | 14 | 2020-12-16T07:27:22.000Z | 2022-03-15T17:39:01.000Z | pretrained-model/vocoder/universal-melgan/universal-melgan-1024.py | ishine/malaya-speech | fd34afc7107af1656dff4b3201fa51dda54fde18 | [
"MIT"
] | 29 | 2021-02-09T08:57:15.000Z | 2022-03-12T14:09:19.000Z | import os
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
import tensorflow as tf
import numpy as np
from glob import glob
from itertools import cycle
import malaya_speech
import malaya_speech.train
from malaya_speech.train.model import universal_melgan as melgan
from malaya_speech.train.model import melgan as melgan_loss
i... | 28.534562 | 84 | 0.683463 |
793eafbf7cda80db650a33dde634dfb2104e463f | 6,493 | py | Python | Run.py | raghuslash/3D-BoundingBox | 8969f18ab585af1e2da0e6deae0f1cc72ce289e1 | [
"MIT"
] | 287 | 2018-12-09T11:53:53.000Z | 2022-03-24T12:12:07.000Z | Run.py | raghuslash/3D-BoundingBox | 8969f18ab585af1e2da0e6deae0f1cc72ce289e1 | [
"MIT"
] | 23 | 2019-02-28T06:56:14.000Z | 2022-03-04T23:15:54.000Z | Run.py | raghuslash/3D-BoundingBox | 8969f18ab585af1e2da0e6deae0f1cc72ce289e1 | [
"MIT"
] | 69 | 2018-12-17T12:20:31.000Z | 2022-03-23T08:50:05.000Z | """
Images must be in ./Kitti/testing/image_2/ and camera matricies in ./Kitti/testing/calib/
Uses YOLO to obtain 2D box, PyTorch to get 3D box, plots both
SPACE bar for next image, any other key to exit
"""
from torch_lib.Dataset import *
from library.Math import *
from library.Plotting import *
from torch_lib imp... | 32.143564 | 109 | 0.6142 |
793eb07c8974fbede5a5ee2bf3c4b09557c72b7b | 20,709 | py | Python | azure-mgmt-compute/tests/test_mgmt_compute.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | azure-mgmt-compute/tests/test_mgmt_compute.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-mgmt-compute/tests/test_mgmt_compute.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding: utf-8
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#---------------------------------------------------------------------... | 37.790146 | 194 | 0.612874 |
793eb15e446e70f77a79cca2e5f6d20af52000ec | 4,402 | py | Python | src/train.py | ShahRutav/dmcontrol-generalization-benchmark | 99365bd1d71581a67a9e7626c5ac676450c158a9 | [
"MIT"
] | 75 | 2020-11-30T07:59:09.000Z | 2022-03-30T21:26:53.000Z | src/train.py | ShahRutav/dmcontrol-generalization-benchmark | 99365bd1d71581a67a9e7626c5ac676450c158a9 | [
"MIT"
] | 12 | 2021-02-02T09:03:44.000Z | 2022-03-29T19:17:39.000Z | src/train.py | ShahRutav/dmcontrol-generalization-benchmark | 99365bd1d71581a67a9e7626c5ac676450c158a9 | [
"MIT"
] | 18 | 2020-12-04T03:48:34.000Z | 2022-03-21T15:10:08.000Z | import torch
import os
import numpy as np
import gym
import utils
import time
from arguments import parse_args
from env.wrappers import make_env
from algorithms.factory import make_agent
from logger import Logger
from video import VideoRecorder
def evaluate(env, agent, video, num_episodes, L, step, test_env=False):
... | 29.152318 | 109 | 0.732849 |
793eb251385fd93206d930f9b70651b5fe101398 | 2,384 | py | Python | wenker/location_updater/states.py | CitizenScienceCenter/c3s_tools | 36479905ffbeb2bdabbc2be145dfe4fe7258ef5d | [
"Apache-2.0"
] | null | null | null | wenker/location_updater/states.py | CitizenScienceCenter/c3s_tools | 36479905ffbeb2bdabbc2be145dfe4fe7258ef5d | [
"Apache-2.0"
] | 1 | 2022-03-22T22:11:21.000Z | 2022-03-22T22:11:21.000Z | wenker/location_updater/states.py | CitizenScienceCenter/c3s_tools | 36479905ffbeb2bdabbc2be145dfe4fe7258ef5d | [
"Apache-2.0"
] | null | null | null | import psycopg2
import csv, json
BOGEN = '/home/encima/Nextcloud/Documents/uzh/wenkerdaten.csv'
DB_STRING = 'postgresql://pybossa:testing@localhost:5430/cs'
UPDATE_STRING = "UPDATE tasks SET info = info || '(%s)' WHERE id = %s;"
UPDATE = "UPDATE tasks SET info = info || '{}' WHERE id = '{}';"
SELECT_STRING = "SELECT ... | 27.402299 | 85 | 0.50797 |
793eb2e88583657e20377067053657265a9b8905 | 103 | py | Python | tests/test_basic.py | neozenith/invoke-databricks-wheel-tasks | 4f13d00c826f5f46652443dbfd4d35c19b869503 | [
"MIT"
] | null | null | null | tests/test_basic.py | neozenith/invoke-databricks-wheel-tasks | 4f13d00c826f5f46652443dbfd4d35c19b869503 | [
"MIT"
] | null | null | null | tests/test_basic.py | neozenith/invoke-databricks-wheel-tasks | 4f13d00c826f5f46652443dbfd4d35c19b869503 | [
"MIT"
] | null | null | null | def test_placholder():
"""Placeholder test to pass CI until creating actual test suite."""
...
| 25.75 | 71 | 0.669903 |
793eb361e30c185e1bf8333d5957c3f5bce04999 | 472 | py | Python | python-ds-practice/14_compact/compact.py | MostFunGuy/SpringboardProjectsPublic | bbda3ba26ecf8a09e62df81583122cae83acc1e6 | [
"MIT"
] | null | null | null | python-ds-practice/14_compact/compact.py | MostFunGuy/SpringboardProjectsPublic | bbda3ba26ecf8a09e62df81583122cae83acc1e6 | [
"MIT"
] | null | null | null | python-ds-practice/14_compact/compact.py | MostFunGuy/SpringboardProjectsPublic | bbda3ba26ecf8a09e62df81583122cae83acc1e6 | [
"MIT"
] | null | null | null | def compact(lst):
"""Return a copy of lst with non-true elements removed.
>>> compact([0, 1, 2, '', [], False, (), None, 'All done'])
[1, 2, 'All done']
"""
return_list = []
for item in lst:
if item:
return_list.append(item)
return return_list
print(... | 27.764706 | 158 | 0.493644 |
793eb542cb6384a6e7a5f7bce47d5f6d0a0b9d97 | 1,757 | py | Python | test/record/parser/test_response_whois_nic_ck_status_registered.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | test/record/parser/test_response_whois_nic_ck_status_registered.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | test/record/parser/test_response_whois_nic_ck_status_registered.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null |
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
# spec/fixtures/responses/whois.nic.ck/status_registered
#
# and regenerate the tests with the following script
#
# $ scripts/generate_tests.py
#
from nose.tools import *
from dateutil.parser import parse ... | 34.45098 | 87 | 0.695504 |
793eb54e2a86c814466b30183a60e9cd18f7e2c6 | 1,988 | py | Python | python/40.combination-sum-ii.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 10 | 2019-09-15T00:23:57.000Z | 2022-01-05T12:53:42.000Z | python/40.combination-sum-ii.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 3 | 2021-06-30T00:39:26.000Z | 2021-08-01T07:13:59.000Z | python/40.combination-sum-ii.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 6 | 2020-02-08T02:55:22.000Z | 2022-01-02T22:48:18.000Z | #
# @lc app=leetcode id=40 lang=python3
#
# [40] Combination Sum II
#
# https://leetcode.com/problems/combination-sum-ii/description/
#
# algorithms
# Medium (49.91%)
# Likes: 2542
# Dislikes: 86
# Total Accepted: 392.7K
# Total Submissions: 782K
# Testcase Example: '[10,1,2,7,6,1,5]\n8'
#
# Given a collection o... | 20.926316 | 89 | 0.561871 |
793eb57377e9b4cf44881d9d01ed94107f7f710e | 7,177 | py | Python | code/ssw_composite_cmam_optimized2-wss_hotspots.py | kuchaale/grl_2020 | ddeca6955e6435c38d18be6ebca874fa037142b3 | [
"MIT"
] | null | null | null | code/ssw_composite_cmam_optimized2-wss_hotspots.py | kuchaale/grl_2020 | ddeca6955e6435c38d18be6ebca874fa037142b3 | [
"MIT"
] | null | null | null | code/ssw_composite_cmam_optimized2-wss_hotspots.py | kuchaale/grl_2020 | ddeca6955e6435c38d18be6ebca874fa037142b3 | [
"MIT"
] | null | null | null | import xarray as xr
import sys
import pandas as pd
import glob
from scipy import stats
import xarray.ufuncs as xrf
from itertools import product
from cftime import DatetimeNoLeap
#from dask.distributed import Client
#client = Client(set_as_default = True)
def open_date_file(file_path):
df = pd.read_csv(file_path,... | 36.065327 | 141 | 0.575031 |
793eb57e295884cb272e62a5347f077241a15dc1 | 3,096 | py | Python | AOC2020/4/1.py | Fapannen/Advent-of-Code | 6cdc4a4582d9e3a1761579f42abd01c7ecaf5561 | [
"MIT"
] | null | null | null | AOC2020/4/1.py | Fapannen/Advent-of-Code | 6cdc4a4582d9e3a1761579f42abd01c7ecaf5561 | [
"MIT"
] | null | null | null | AOC2020/4/1.py | Fapannen/Advent-of-Code | 6cdc4a4582d9e3a1761579f42abd01c7ecaf5561 | [
"MIT"
] | null | null | null | with open("input.txt", 'r') as f:
txt = f.read()
passports = txt.split("\n\n")
fix = [psp.replace("\n", " ") for psp in passports]
fields = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid']
count = 0
for passport in fix:
found = True
for field in fields:
if... | 29.769231 | 83 | 0.350129 |
793eb59f6dc96e9aebbb64db0b122c35d5531a80 | 520 | py | Python | examples/ex24_configuration.py | gramaziokohler/robotic_assembly_workshop | 252d9750175061fd7d4746a4701afd42882773a5 | [
"MIT"
] | 19 | 2019-02-08T13:07:49.000Z | 2020-12-21T12:41:51.000Z | examples/ex24_configuration.py | gramaziokohler/robotic_assembly_workshop | 252d9750175061fd7d4746a4701afd42882773a5 | [
"MIT"
] | 11 | 2019-01-31T09:32:11.000Z | 2020-11-06T14:12:21.000Z | examples/ex24_configuration.py | gramaziokohler/robotic_assembly_workshop | 252d9750175061fd7d4746a4701afd42882773a5 | [
"MIT"
] | 8 | 2019-03-05T13:38:27.000Z | 2021-04-13T07:01:52.000Z | from math import pi
from compas.robots import Joint
from compas_fab.robots import Configuration
print(Joint.REVOLUTE)
print(Joint.PRISMATIC)
print(Joint.FIXED)
values = [0] * 6
types = [Joint.REVOLUTE] * 6
config = Configuration(values, types)
config = Configuration([pi / 2, 3., 0.1], [Joint.REVOLUTE, Joint.PRISMAT... | 27.368421 | 101 | 0.715385 |
793eb6a72480a21ae64c4431aaac595eaf17e1e2 | 1,694 | py | Python | Meetup.py | sureshmallakuntla/Project3 | 0f90f5beda9b06b49d6279c2093ef580ccdcc66b | [
"MIT"
] | null | null | null | Meetup.py | sureshmallakuntla/Project3 | 0f90f5beda9b06b49d6279c2093ef580ccdcc66b | [
"MIT"
] | null | null | null | Meetup.py | sureshmallakuntla/Project3 | 0f90f5beda9b06b49d6279c2093ef580ccdcc66b | [
"MIT"
] | null | null | null | from __future__ import print_function
import json
import sys
from pyspark import SparkContext
from pyspark.streaming import StreamingContext
from pyspark.streaming.kafka import KafkaUtils
f_count = 0;
# Function to aggregate the city counts to the alreaddy existing value
def city_count(newValue, oldVal... | 32.576923 | 84 | 0.689492 |
793eb6ecb03ece9a9076ec213e957a43184e68c6 | 63,690 | py | Python | great_expectations/expectations/expectation.py | rishabh-bhargava/great_expectations | e3ce2d094536a2bc738f92e5686005390d694105 | [
"Apache-2.0"
] | 2 | 2022-01-28T15:51:32.000Z | 2022-02-02T05:07:58.000Z | great_expectations/expectations/expectation.py | rishabh-bhargava/great_expectations | e3ce2d094536a2bc738f92e5686005390d694105 | [
"Apache-2.0"
] | null | null | null | great_expectations/expectations/expectation.py | rishabh-bhargava/great_expectations | e3ce2d094536a2bc738f92e5686005390d694105 | [
"Apache-2.0"
] | null | null | null | import logging
import re
import traceback
from abc import ABC, ABCMeta, abstractmethod
from collections import Counter
from copy import deepcopy
from inspect import isabstract
from typing import Dict, List, Optional, Tuple
import pandas as pd
from great_expectations import __version__ as ge_version
from great_expecta... | 37.708703 | 137 | 0.58959 |
793eb739df12fa7a3dcb33f038bbffa2f3f10bde | 1,149 | py | Python | min_coin2.py | zmiddle/Coin_Change.py | 5dd14d6ab2a9310d30ea6a004dd652e0c25f5127 | [
"MIT"
] | null | null | null | min_coin2.py | zmiddle/Coin_Change.py | 5dd14d6ab2a9310d30ea6a004dd652e0c25f5127 | [
"MIT"
] | null | null | null | min_coin2.py | zmiddle/Coin_Change.py | 5dd14d6ab2a9310d30ea6a004dd652e0c25f5127 | [
"MIT"
] | null | null | null | #2. Given a value and a set of coins, return the optimal count of coins to achieve the value.
# Example: Can you rewrite this so that it will work when you're machine has run out of nickels?
# (and minimize the number of coins given [a reasonable amount])
def min_coin2(cents):
try:
cents == int(cents)
e... | 27.357143 | 96 | 0.466493 |
793eb83464ec233e8c1df61541772c3de5a7e935 | 3,003 | py | Python | Queue/DesignCircularQueue.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | 2 | 2021-01-31T03:42:01.000Z | 2021-01-31T03:43:08.000Z | Queue/DesignCircularQueue.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | null | null | null | Queue/DesignCircularQueue.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | 1 | 2021-01-31T03:42:02.000Z | 2021-01-31T03:42:02.000Z | class MyCircularQueue:
def __init__(self, k: int):
self.q = [None] * k
self.front_idx = -1
self.back_idx = -1
self.capacity = k
def display_elements(self):
print("The elements in the Queue are ")
print_str = ""
# add the elements to the print string
... | 30.333333 | 76 | 0.590077 |
793eb870bf620d1046e4865ddf3c8b3e73e00a81 | 13,502 | py | Python | neutron/services/firewall/fwaas_plugin.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 1 | 2016-04-19T08:20:19.000Z | 2016-04-19T08:20:19.000Z | neutron/services/firewall/fwaas_plugin.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | null | null | null | neutron/services/firewall/fwaas_plugin.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 Big Switch Networks, 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... | 42.863492 | 79 | 0.654273 |
793eb87b822a1075998491a87eecd690fa751f43 | 5,280 | py | Python | Script_PLSDA_RF_SVM.py | Gustoaxel/Statistical-autoencoder | f3328f9c2a45ef0f7fe4adf98af4a64d02d34afc | [
"MIT"
] | 1 | 2021-06-22T13:28:06.000Z | 2021-06-22T13:28:06.000Z | Script_PLSDA_RF_SVM.py | Gustoaxel/Statistical-autoencoder | f3328f9c2a45ef0f7fe4adf98af4a64d02d34afc | [
"MIT"
] | null | null | null | Script_PLSDA_RF_SVM.py | Gustoaxel/Statistical-autoencoder | f3328f9c2a45ef0f7fe4adf98af4a64d02d34afc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright I3S CNRS UCA
This code is an implementation of the other methods used for comparison in the article :
An efficient diagnostic that uses the latent space of a Non-Parametric Supervised Autoencoder
for metabolomic datasets of clinical studies.
Parameters :
- Seed (li... | 33.417722 | 135 | 0.598295 |
793eb8baf4bf182cd10adb297506a7f2e49242ca | 4,070 | py | Python | sdk/python/kulado_azure/apimanagement/product_policy.py | kulado/kulado-azure | f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/kulado_azure/apimanagement/product_policy.py | kulado/kulado-azure | f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/kulado_azure/apimanagement/product_policy.py | kulado/kulado-azure | f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Kulado Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import kulado
import kulado.runtime
from .. import utilities, tables
class ProductPolicy(kulado.CustomReso... | 45.222222 | 185 | 0.700246 |
793eb917b99db1a86686b1a2c599c0d20566212a | 2,837 | py | Python | zenodo_uploader.py | JunAishima/conda-pack-template | d40390606ed3af80c1fc3d731124728431a25788 | [
"BSD-3-Clause"
] | null | null | null | zenodo_uploader.py | JunAishima/conda-pack-template | d40390606ed3af80c1fc3d731124728431a25788 | [
"BSD-3-Clause"
] | null | null | null | zenodo_uploader.py | JunAishima/conda-pack-template | d40390606ed3af80c1fc3d731124728431a25788 | [
"BSD-3-Clause"
] | null | null | null | import os
import argparse
import requests
import yaml
import json
def upload_to_zenodo(
file_name_to_upload,
config_file,
zenodo_server="https://sandbox.zenodo.org/api/deposit/depositions",
):
filename = os.path.abspath(file_name_to_upload)
if not os.path.isfile(filename):
raise FileNotFou... | 34.597561 | 105 | 0.645753 |
793eb937d5e94b56a88d5977fb15c0e113593dc4 | 382 | py | Python | markdownme/fields.py | cbidici/cbsite | 594e327ad0c0bfa5015461eb243176c3aec7b68d | [
"MIT"
] | null | null | null | markdownme/fields.py | cbidici/cbsite | 594e327ad0c0bfa5015461eb243176c3aec7b68d | [
"MIT"
] | 1 | 2020-05-10T14:45:22.000Z | 2020-05-10T15:06:50.000Z | markdownme/fields.py | cbidici/cbsite | 594e327ad0c0bfa5015461eb243176c3aec7b68d | [
"MIT"
] | null | null | null | from django.db.models import TextField
from django.forms import fields
from .widgets import MarkdownWidget
class MarkdownField(TextField):
def __init__(self, rows=64, **kwargs):
super().__init__(**kwargs)
self.rows = rows
def formfield(self, **kwargs):
kwargs['widget'] = MarkdownWidg... | 25.466667 | 57 | 0.685864 |
793eb9489d4faf2a9b1b5a1d28ee724f8b239c78 | 5,294 | py | Python | plugins/modules/cp4s/cp4s_delete_case.py | IBM/cp4s-ansible-collection | c80a9f6869cd2f141befb744a516568cf9fb5b61 | [
"MIT"
] | null | null | null | plugins/modules/cp4s/cp4s_delete_case.py | IBM/cp4s-ansible-collection | c80a9f6869cd2f141befb744a516568cf9fb5b61 | [
"MIT"
] | 3 | 2021-02-17T15:23:32.000Z | 2021-02-22T13:40:38.000Z | plugins/modules/cp4s/cp4s_delete_case.py | IBM/cp4s-ansible-collection | c80a9f6869cd2f141befb744a516568cf9fb5b61 | [
"MIT"
] | 1 | 2021-01-29T21:43:08.000Z | 2021-01-29T21:43:08.000Z |
# Copyright: (c) 2021, Dara Meaney
# The MIT License
#
# 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 without restriction, including without limitation the rights to use, copy, modify, merge,... | 43.752066 | 462 | 0.729316 |
793eb964e0d3b2f7d10e7ed423165598b7541e4d | 4,691 | py | Python | goalsettrack/goalsettrack/settings.py | ingsoft-famaf/the-late-ones | 4641413890ae3713d415afca1d42462cc07405bf | [
"MIT"
] | null | null | null | goalsettrack/goalsettrack/settings.py | ingsoft-famaf/the-late-ones | 4641413890ae3713d415afca1d42462cc07405bf | [
"MIT"
] | null | null | null | goalsettrack/goalsettrack/settings.py | ingsoft-famaf/the-late-ones | 4641413890ae3713d415afca1d42462cc07405bf | [
"MIT"
] | null | null | null | """
Django settings for goalsettrack project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
impo... | 30.461039 | 107 | 0.690471 |
793eba7fa4539fe09f3ac5ceace84011ad6a730a | 1,389 | py | Python | msrest/version.py | bgklein/msrest-for-python | d5103970de1ec7f56375ae4da1b5738a71196c3f | [
"MIT"
] | null | null | null | msrest/version.py | bgklein/msrest-for-python | d5103970de1ec7f56375ae4da1b5738a71196c3f | [
"MIT"
] | null | null | null | msrest/version.py | bgklein/msrest-for-python | d5103970de1ec7f56375ae4da1b5738a71196c3f | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 47.896552 | 78 | 0.686105 |
793eba9b80ffa0c3e142db14dc245c198d8aabcf | 961 | py | Python | marqeta/response_models/identification_response_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/identification_response_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/identification_response_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models import datetime_object
import json
import re
class IdentificationResponseModel(object):
def __init__(self, json_response):
self.json_response = json_response
def __str__(self):
return json.dumps(self.json_response, default=self.... | 25.972973 | 118 | 0.702393 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.