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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7956b867b68c4203c61f992050480225252973e4 | 3,485 | py | Python | lux/core/groupby.py | Moh-Yakoub/lux | 127806f653602afeea92d6cb45917401c0ee366e | [
"Apache-2.0"
] | 1 | 2021-04-01T13:57:02.000Z | 2021-04-01T13:57:02.000Z | lux/core/groupby.py | Moh-Yakoub/lux | 127806f653602afeea92d6cb45917401c0ee366e | [
"Apache-2.0"
] | null | null | null | lux/core/groupby.py | Moh-Yakoub/lux | 127806f653602afeea92d6cb45917401c0ee366e | [
"Apache-2.0"
] | 1 | 2020-05-21T03:24:46.000Z | 2020-05-21T03:24:46.000Z | import pandas as pd
class LuxGroupBy(pd.core.groupby.groupby.GroupBy):
_metadata = [
"_intent",
"_inferred_intent",
"_data_type",
"unique_values",
"cardinality",
"_rec_info",
"_min_max",
"_current_vis",
"_widget",
"_recommendation",
... | 34.85 | 84 | 0.626973 |
7956b9f26e6efef0c818cf11c3679719db284e90 | 749 | py | Python | pandas/tests/indexes/period/test_scalar_compat.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 5 | 2019-07-26T15:22:41.000Z | 2021-09-28T09:22:17.000Z | pandas/tests/indexes/period/test_scalar_compat.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | 16 | 2021-03-19T09:44:52.000Z | 2022-03-12T00:22:14.000Z | pandas/tests/indexes/period/test_scalar_compat.py | ivan-vasilev/pandas | 4071dde86e33434e1bee8304fa62074949f813cc | [
"BSD-3-Clause"
] | 9 | 2020-02-05T10:24:12.000Z | 2020-02-10T13:08:50.000Z | """Tests for PeriodIndex behaving like a vectorized Period scalar"""
from pandas import Timedelta, date_range, period_range
import pandas.util.testing as tm
class TestPeriodIndexOps:
def test_start_time(self):
index = period_range(freq="M", start="2016-01-01", end="2016-05-31")
expected_index = d... | 41.611111 | 78 | 0.687583 |
7956bb1bc2205dfb49ecad3eee05e8e996a6f76c | 7,397 | py | Python | ftpclient.py | ryanshim/cpsc558-minimal-ftp | 076389fc7b49319b98deda776aa26453c52321a9 | [
"MIT"
] | null | null | null | ftpclient.py | ryanshim/cpsc558-minimal-ftp | 076389fc7b49319b98deda776aa26453c52321a9 | [
"MIT"
] | null | null | null | ftpclient.py | ryanshim/cpsc558-minimal-ftp | 076389fc7b49319b98deda776aa26453c52321a9 | [
"MIT"
] | null | null | null | """ Simple implementation of a FTP client program used for pedagogical
purposes. Current commands supported:
get <filename>: retrieve the file specified by filename.
put <filename>: send the file to the server specified by filename.
cd <path>: change the current working directory to the specified path.
... | 34.891509 | 80 | 0.584426 |
7956bc0d25c06cc3e0ba079d10e1db799a17c5bb | 990 | py | Python | table.py | TeamZombeavers/collabothon2021 | db9ddbb2a189c776e41243c484d8fdf639a6c2b0 | [
"Apache-2.0"
] | null | null | null | table.py | TeamZombeavers/collabothon2021 | db9ddbb2a189c776e41243c484d8fdf639a6c2b0 | [
"Apache-2.0"
] | null | null | null | table.py | TeamZombeavers/collabothon2021 | db9ddbb2a189c776e41243c484d8fdf639a6c2b0 | [
"Apache-2.0"
] | null | null | null | from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, DateFormatter, TableColumn
from bokeh.io import output_file, show
from google.cloud import bigquery
api_key = 'AIzaSyCCKJAMQRcfWjlXJMQhzsVA22FbAGqEDZM'
GCP_PROJECT = 'collabothon21-team-a'
DATASET_NAME = 'testlodz'
TABLE_NAME = 'tre... | 31.935484 | 71 | 0.728283 |
7956bc2be2fa66a580b90e3e3249ec6e93b86018 | 202 | py | Python | silent.py | ilhomidin/remote-screenshot | f2cf3477979e3ed1eb53d4f40cd25784454fe9fc | [
"MIT"
] | null | null | null | silent.py | ilhomidin/remote-screenshot | f2cf3477979e3ed1eb53d4f40cd25784454fe9fc | [
"MIT"
] | null | null | null | silent.py | ilhomidin/remote-screenshot | f2cf3477979e3ed1eb53d4f40cd25784454fe9fc | [
"MIT"
] | null | null | null | """
Run remscreen without any output.
Write stdout to the `remscreen.log` file.
"""
import subprocess
with open("remscreen.log", "w") as file:
subprocess.Popen("python remscreen.py", stdout=file)
| 20.2 | 56 | 0.717822 |
7956bd29bf080526aa02c9987f07218234aeba46 | 5,678 | py | Python | ccoin.py | xczh/ccoin | a3f080f6113d74ec775a78dd44a9bbca3728b3f9 | [
"Apache-2.0"
] | 1 | 2016-03-02T07:41:31.000Z | 2016-03-02T07:41:31.000Z | ccoin.py | xczh/ccoin | a3f080f6113d74ec775a78dd44a9bbca3728b3f9 | [
"Apache-2.0"
] | 1 | 2015-07-07T10:14:57.000Z | 2015-07-07T12:28:44.000Z | ccoin.py | xczh/ccoin | a3f080f6113d74ec775a78dd44a9bbca3728b3f9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#coding:utf-8
"""
Purpose: ccoin Main
Author: xczh <christopher.winnie2012@gmail.com>
Copyright (c) 2015 xczh. All rights reserved.
"""
import conf
import logging
import sys
import os
import time
from login import Login
from modules import Requests
from modules.PushCode import PushCodeMo... | 34.621951 | 137 | 0.549313 |
7956bd70187eb2b75154b4aa24ceba3e786f46c1 | 730 | py | Python | fileuploads/migrations/0036_auto_20170106_1336.py | fr33ky/signalserver | ce360cd89732c9d9270d7af04e38e55f6570d6a7 | [
"MIT"
] | 23 | 2016-03-24T00:31:47.000Z | 2022-02-10T21:27:53.000Z | fileuploads/migrations/0036_auto_20170106_1336.py | fr33ky/signalserver | ce360cd89732c9d9270d7af04e38e55f6570d6a7 | [
"MIT"
] | 148 | 2016-04-03T00:22:55.000Z | 2020-08-01T20:08:03.000Z | fileuploads/migrations/0036_auto_20170106_1336.py | fr33ky/signalserver | ce360cd89732c9d9270d7af04e38e55f6570d6a7 | [
"MIT"
] | 11 | 2016-04-24T03:31:31.000Z | 2019-09-03T16:51:08.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.dev20160107235441 on 2017-01-06 18:36
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('signals', '0012_output_user_name'),
('groups', '0005_auto_20161209_2... | 26.071429 | 64 | 0.60274 |
7956bdd90403bc85e55ac1c95acc19eb7ede9263 | 59,560 | py | Python | Lib/test/test_generators.py | Golfist/cpython | c4750959acbfc3057f12aaec832483ba30898d1c | [
"PSF-2.0"
] | 27 | 2017-04-21T14:57:04.000Z | 2021-11-03T22:10:38.000Z | Lib/test/test_generators.py | Golfist/cpython | c4750959acbfc3057f12aaec832483ba30898d1c | [
"PSF-2.0"
] | null | null | null | Lib/test/test_generators.py | Golfist/cpython | c4750959acbfc3057f12aaec832483ba30898d1c | [
"PSF-2.0"
] | 9 | 2017-04-26T14:14:05.000Z | 2020-12-14T16:26:41.000Z | import copy
import gc
import pickle
import sys
import unittest
import warnings
import weakref
import inspect
from test import support
class FinalizationTest(unittest.TestCase):
def test_frame_resurrect(self):
# A generator frame can be resurrected by a generator's finalization.
def gen():
... | 27.03586 | 88 | 0.524765 |
7956bde1be6db88cae951ab2ff45825dfdec9ee6 | 1,140 | py | Python | tests/source/github_org_test.py | KindDragon/all-repos | 88f50d7bf10247bb14dd82b6f8b18957b2a9941d | [
"MIT"
] | null | null | null | tests/source/github_org_test.py | KindDragon/all-repos | 88f50d7bf10247bb14dd82b6f8b18957b2a9941d | [
"MIT"
] | null | null | null | tests/source/github_org_test.py | KindDragon/all-repos | 88f50d7bf10247bb14dd82b6f8b18957b2a9941d | [
"MIT"
] | 1 | 2022-03-31T04:09:55.000Z | 2022-03-31T04:09:55.000Z | from __future__ import annotations
import json
import pytest
from all_repos.source.github_org import list_repos
from all_repos.source.github_org import Settings
from testing.mock_http import FakeResponse
from testing.mock_http import urlopen_side_effect
from tests.source.github_test import _resource_json
@pytest.f... | 27.142857 | 76 | 0.65614 |
7956bf0b196b8080912aa802b1092ed0c2e3163a | 29,549 | py | Python | research/object_detection/protos/optimizer_pb2.py | beraterenterzi/tf_car_licence | 3872a0539d5472b9241d8ff5170aecebb9eac5e6 | [
"MIT"
] | 3 | 2022-03-05T10:46:52.000Z | 2022-03-22T06:00:05.000Z | research/object_detection/protos/optimizer_pb2.py | beraterenterzi/tf_car_licence | 3872a0539d5472b9241d8ff5170aecebb9eac5e6 | [
"MIT"
] | null | null | null | research/object_detection/protos/optimizer_pb2.py | beraterenterzi/tf_car_licence | 3872a0539d5472b9241d8ff5170aecebb9eac5e6 | [
"MIT"
] | 1 | 2019-10-04T21:46:56.000Z | 2019-10-04T21:46:56.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/optimizer.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _messag... | 46.533858 | 3,028 | 0.776913 |
7956bf2ecb980f3c0b27da958de7b678ade7e74e | 1,029 | py | Python | pure_protobuf/io_.py | yoyonel/protobuf | ef03946ffa1a4f18791490972e4b2f99e1888cdf | [
"MIT"
] | 132 | 2015-07-25T14:40:39.000Z | 2022-03-30T19:37:01.000Z | pure_protobuf/io_.py | yoyonel/protobuf | ef03946ffa1a4f18791490972e4b2f99e1888cdf | [
"MIT"
] | 36 | 2016-09-02T20:03:16.000Z | 2022-03-09T16:52:11.000Z | pure_protobuf/io_.py | yoyonel/protobuf | ef03946ffa1a4f18791490972e4b2f99e1888cdf | [
"MIT"
] | 15 | 2015-02-27T03:00:04.000Z | 2022-02-07T10:55:09.000Z | """
`pure-protobuf` contributors © 2011-2019
"""
from abc import ABC, abstractmethod
from io import BytesIO
from typing import Any, BinaryIO, Union
# Type hinting doesn't recognize `BytesIO` as an instance of `BinaryIO`.
IO = Union[BinaryIO, BytesIO]
class Dumps(ABC):
@abstractmethod
def dump(self, value: A... | 23.386364 | 72 | 0.586006 |
7956bf424119502f8edba0d4261928617f89b343 | 6,248 | py | Python | python-api/terrain_flattening.py | EskedarT/gee_s1_ard | 2d463c2e94f4f1674d6284f03cb90201d1f3f717 | [
"MIT"
] | 1 | 2021-05-19T09:31:09.000Z | 2021-05-19T09:31:09.000Z | python-api/terrain_flattening.py | EskedarT/gee_s1_ard | 2d463c2e94f4f1674d6284f03cb90201d1f3f717 | [
"MIT"
] | null | null | null | python-api/terrain_flattening.py | EskedarT/gee_s1_ard | 2d463c2e94f4f1674d6284f03cb90201d1f3f717 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Version: v1.0
Date: 2021-03-12
Description: This code is adopted from
Vollrath, A., Mullissa, A., & Reiche, J. (2020).
Angular-Based Radiometric Slope Correction for Sentinel-1 on Google Earth Engine.
Remote Sensing, 12(11), [1867]. https://doi.org/10.3390/rs1211186... | 30.330097 | 128 | 0.589149 |
7956c0bb34cf16180ddb4260d356a7683b9c5658 | 26,292 | py | Python | lxml/html/clean.py | kmbn/zeit-now-filter-feeds | a138b5d5f4b5113ad0f64dea9db1f1fd0d2cf687 | [
"MIT"
] | null | null | null | lxml/html/clean.py | kmbn/zeit-now-filter-feeds | a138b5d5f4b5113ad0f64dea9db1f1fd0d2cf687 | [
"MIT"
] | null | null | null | lxml/html/clean.py | kmbn/zeit-now-filter-feeds | a138b5d5f4b5113ad0f64dea9db1f1fd0d2cf687 | [
"MIT"
] | null | null | null | """A cleanup tool for HTML.
Removes unwanted tags and content. See the `Cleaner` class for
details.
"""
import re
import copy
try:
from urlparse import urlsplit
except ImportError:
# Python 3
from urllib.parse import urlsplit
from lxml import etree
from lxml.html import defs
from lxml.html import fromst... | 34.012937 | 133 | 0.56907 |
7956c0e0c17f091db89a1e7331a20b9b969050a5 | 422 | py | Python | usersettings/migrations/0013_auto_20200324_1134.py | christianwgd/photos | b0c3343325a556d25217e9678f6142d4dcb03f51 | [
"MIT"
] | null | null | null | usersettings/migrations/0013_auto_20200324_1134.py | christianwgd/photos | b0c3343325a556d25217e9678f6142d4dcb03f51 | [
"MIT"
] | 6 | 2021-03-19T20:39:25.000Z | 2022-02-10T16:18:00.000Z | usersettings/migrations/0013_auto_20200324_1134.py | christianwgd/photos | b0c3343325a556d25217e9678f6142d4dcb03f51 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-24 10:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('usersettings', '0012_auto_20200310_1735'),
]
operations = [
migrations.AlterField(
model_name='theme',
name='name',
... | 22.210526 | 84 | 0.613744 |
7956c17dd42fe54ea5ef912f4a4659c833e2ff6b | 7,741 | py | Python | sunpy/net/_attrs.py | sashank27/sunpy | 72fbed58a47ba599c8729a955ddaf874f8b9b5b4 | [
"BSD-2-Clause"
] | 2 | 2020-07-02T13:01:42.000Z | 2020-08-27T20:05:31.000Z | sunpy/net/_attrs.py | sashank27/sunpy | 72fbed58a47ba599c8729a955ddaf874f8b9b5b4 | [
"BSD-2-Clause"
] | null | null | null | sunpy/net/_attrs.py | sashank27/sunpy | 72fbed58a47ba599c8729a955ddaf874f8b9b5b4 | [
"BSD-2-Clause"
] | null | null | null | """
Implementation of global attrs.
These are defined in here to keep the `sunpy.net.attrs` namespace clean, and to
prevent circular imports.
"""
import collections
import astropy.units as u
from sunpy.time import TimeRange, parse_time
from sunpy.time.time import _variables_for_parse_time_docstring
from sunpy.util.d... | 31.46748 | 117 | 0.629247 |
7956c2745cb5bf844a17956e09dbf41677336ed5 | 174 | py | Python | grl/algos/p2sro/p2sro_manager/__init__.py | indylab/xdo | 1ddd92aa56ba10fa468396de8f8824c83ba9d0ba | [
"MIT"
] | 12 | 2021-03-12T07:18:52.000Z | 2022-03-15T22:30:44.000Z | grl/algos/p2sro/p2sro_manager/__init__.py | indylab/xdo | 1ddd92aa56ba10fa468396de8f8824c83ba9d0ba | [
"MIT"
] | 1 | 2021-11-22T16:39:46.000Z | 2022-02-02T22:13:03.000Z | grl/algos/p2sro/p2sro_manager/__init__.py | indylab/xdo | 1ddd92aa56ba10fa468396de8f8824c83ba9d0ba | [
"MIT"
] | 4 | 2021-06-21T03:54:45.000Z | 2022-01-13T10:28:26.000Z | from .logger import P2SROManagerLogger, SimpleP2SROManagerLogger
from .p2sro_manager import P2SROManager
from .remote import P2SROManagerWithServer, RemoteP2SROManagerClient
| 43.5 | 68 | 0.890805 |
7956c2bfa3a57fbaba8f6002c297d5f3a64e9308 | 517 | py | Python | mplhep/cms.py | HDembinski/mplhep | 5ae7601bd8922074dfc1ee92fc81f590a9efa7d5 | [
"MIT"
] | null | null | null | mplhep/cms.py | HDembinski/mplhep | 5ae7601bd8922074dfc1ee92fc81f590a9efa7d5 | [
"MIT"
] | null | null | null | mplhep/cms.py | HDembinski/mplhep | 5ae7601bd8922074dfc1ee92fc81f590a9efa7d5 | [
"MIT"
] | null | null | null | # Log styles
from . import styles_cms as style
from . import label as label_base
from . label import lumitext
__all__ = [style, lumitext]
# Experiment wrappers:
def cmstext(text="", **kwargs):
return label_base._exptext("CMS", text=text, italic=(False, True), **kwargs)
def cmslabel(**kwargs):
r... | 22.478261 | 81 | 0.663443 |
7956c2f3bb51f27179325db906261b8228693070 | 6,891 | py | Python | ivy_tests/test_ivy/helpers.py | saurbhc/ivy | 20b327b4fab543b26ad5a18acf4deddd6e3c804b | [
"Apache-2.0"
] | 1 | 2022-02-15T02:07:07.000Z | 2022-02-15T02:07:07.000Z | ivy_tests/test_ivy/helpers.py | saurbhc/ivy | 20b327b4fab543b26ad5a18acf4deddd6e3c804b | [
"Apache-2.0"
] | 1 | 2022-03-08T13:29:20.000Z | 2022-03-08T13:29:20.000Z | ivy_tests/test_ivy/helpers.py | saurbhc/ivy | 20b327b4fab543b26ad5a18acf4deddd6e3c804b | [
"Apache-2.0"
] | null | null | null | """
Collection of helpers for ivy unit tests
"""
# global
import ivy
try:
import numpy as _np
except ImportError:
_np = None
try:
import jax.numpy as _jnp
except ImportError:
_jnp = None
try:
import tensorflow as _tf
_tf_version = float('.'.join(_tf.__version__.split('.')[0:2]))
if _tf_vers... | 31.75576 | 94 | 0.669424 |
7956c35f336edfe71b4c11d4b589e06760b7259d | 1,296 | py | Python | ebnmpy/estimators/point_exponential.py | kclamar/ebnmpy | fc3d7126757c4184c7cb442312f1db5b78d73a3b | [
"MIT"
] | null | null | null | ebnmpy/estimators/point_exponential.py | kclamar/ebnmpy | fc3d7126757c4184c7cb442312f1db5b78d73a3b | [
"MIT"
] | null | null | null | ebnmpy/estimators/point_exponential.py | kclamar/ebnmpy | fc3d7126757c4184c7cb442312f1db5b78d73a3b | [
"MIT"
] | null | null | null | from ..point_exponential import (
pe_initpar,
pe_nllik,
pe_partog,
pe_postcomp,
pe_postsamp,
pe_precomp,
pe_scalepar,
pe_summres,
)
from .parametric import ParametricEBNM
class PointExponentialEBNM(ParametricEBNM):
@property
def _class_name(self) -> str:
return "gammami... | 28.173913 | 89 | 0.660494 |
7956c41005ba0b9bd32dcd896fe5c39a9c3e97e5 | 81 | py | Python | 30.strings/10.isdigit.py | robinson-1985/python-zero-dnc | df510d67e453611fcd320df1397cdb9ca47fecb8 | [
"MIT"
] | null | null | null | 30.strings/10.isdigit.py | robinson-1985/python-zero-dnc | df510d67e453611fcd320df1397cdb9ca47fecb8 | [
"MIT"
] | null | null | null | 30.strings/10.isdigit.py | robinson-1985/python-zero-dnc | df510d67e453611fcd320df1397cdb9ca47fecb8 | [
"MIT"
] | null | null | null | # 9. isdigit() -> Retorna um booleano dizendo se todos os caracteres são dígitos. | 81 | 81 | 0.753086 |
7956c425310e134a8aa0b920d1c48eaebea29a79 | 5,757 | py | Python | cvxpy/reductions/solvers/qp_solvers/cplex_qpif.py | QiuWJX/cvxpy | fd1c225b0cdf541618e292cae1a4c7ea25ddc934 | [
"ECL-2.0",
"Apache-2.0"
] | 556 | 2021-04-20T03:19:49.000Z | 2022-03-30T12:31:38.000Z | cvxpy/reductions/solvers/qp_solvers/cplex_qpif.py | QiuWJX/cvxpy | fd1c225b0cdf541618e292cae1a4c7ea25ddc934 | [
"ECL-2.0",
"Apache-2.0"
] | 358 | 2021-04-20T08:17:49.000Z | 2022-03-31T21:16:28.000Z | cvxpy/reductions/solvers/qp_solvers/cplex_qpif.py | phschiele/cvxpy | a43aed7447b87f6d0fbc6f71ae5c7b84183f3369 | [
"ECL-2.0",
"Apache-2.0"
] | 131 | 2021-04-21T09:00:12.000Z | 2022-03-29T04:43:51.000Z | import numpy as np
import cvxpy.interface as intf
import cvxpy.settings as s
from cvxpy.reductions.solution import Solution, failure_solution
from cvxpy.reductions.solvers.conic_solvers.cplex_conif import (
get_status, hide_solver_output, set_parameters,)
from cvxpy.reductions.solvers.qp_solvers.qp_solver import Q... | 33.47093 | 100 | 0.538127 |
7956c462d9d94c8cd75a6c8e41f034905baaf3e8 | 506 | py | Python | aula3/teste5aula3.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | aula3/teste5aula3.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | aula3/teste5aula3.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | print('Insira o valor de 3 angulos de um triangulo: ')
a1 = float(input('Valor 1: '))
a2 = float(input('Valor 2: '))
a3 = float(input('Valor 3: '))
if a1 + a2 + a3 != 180:
print('Os valores não formam um triangulo. "A soma dos angulos internos de um triangulo sempre é igual a 180."')
elif a1 == 90 or a2 == 90 or a3... | 42.166667 | 116 | 0.642292 |
7956c594f3267a7ff5d977866703f7a90d668ede | 2,343 | py | Python | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-01-19T10:36:09.000Z | 2021-01-29T01:14:45.000Z | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 2 | 2016-02-20T13:09:38.000Z | 2016-03-08T06:47:47.000Z | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-02-19T16:52:57.000Z | 2017-05-16T03:06:43.000Z | from PyQt4 import QtGui, QtCore
import settings
import os
import subprocess
class ThumbContextMenu(QtGui.QMenu):
def __init__(self):
super(ThumbContextMenu, self).__init__()
# disabled, since it has been broken in the old ElementsBrowser for a few months and no one complained
# self.addAct... | 38.409836 | 110 | 0.665813 |
7956c5e7b8a20a01d4cd44709b059e153d0d7718 | 1,482 | py | Python | tests/test_clean.py | jpivarski/jupyter-book | bbc43bc427508bea4062aaf35471ee0750e4e2a1 | [
"BSD-3-Clause"
] | 9 | 2020-02-28T22:27:36.000Z | 2020-04-20T11:31:35.000Z | tests/test_clean.py | jpivarski/jupyter-book | bbc43bc427508bea4062aaf35471ee0750e4e2a1 | [
"BSD-3-Clause"
] | 96 | 2020-02-29T20:00:48.000Z | 2020-04-28T21:40:51.000Z | tests/test_clean.py | jpivarski/jupyter-book | bbc43bc427508bea4062aaf35471ee0750e4e2a1 | [
"BSD-3-Clause"
] | 7 | 2020-03-10T17:26:27.000Z | 2020-04-23T19:46:32.000Z | """Testing clean functionality of the CLI."""
from pathlib import Path
from subprocess import run, PIPE
import pytest
path_tests = Path(__file__).parent.resolve()
path_books = path_tests.joinpath("books")
path_root = path_tests.parent
def test_clean_book(tmpdir):
path = path_books.joinpath("clean_cache")
b... | 29.058824 | 64 | 0.668016 |
7956c7cc66193c5bab60b863405870dea431bb57 | 17,558 | py | Python | lib/pybind11/tests/test_python_types.py | idscan/pydegensac | ccb015f1e9fe28bae507643d1d6b8f741a49564d | [
"MIT"
] | 273 | 2018-04-10T13:38:06.000Z | 2022-03-31T16:06:59.000Z | lib/pybind11/tests/test_python_types.py | idscan/pydegensac | ccb015f1e9fe28bae507643d1d6b8f741a49564d | [
"MIT"
] | 32 | 2018-06-14T07:06:16.000Z | 2022-03-17T18:39:47.000Z | lib/pybind11/tests/test_python_types.py | idscan/pydegensac | ccb015f1e9fe28bae507643d1d6b8f741a49564d | [
"MIT"
] | 68 | 2018-02-24T06:04:02.000Z | 2022-03-19T10:42:09.000Z | # Python < 3 needs this: coding=utf-8
import pytest
from pybind11_tests import ExamplePythonTypes, ConstructorStats, has_optional, has_exp_optional
def test_repr():
# In Python 3.3+, repr() accesses __qualname__
assert "pybind11_type" in repr(type(ExamplePythonTypes))
assert "ExamplePythonTypes" in repr(... | 32.757463 | 107 | 0.644493 |
7956c85a0fdd581dd6926dc6f37437839781c67b | 649 | py | Python | mediadecoder/soundrenderers/__init__.py | dschreij/Python-Media-decoder | f01b02d790f2abc52d9792e43076cf4cb7d3ce51 | [
"MIT"
] | 8 | 2016-05-30T07:30:29.000Z | 2017-07-14T23:36:06.000Z | mediadecoder/soundrenderers/__init__.py | open-cogsci/python-mediadecoder | f01b02d790f2abc52d9792e43076cf4cb7d3ce51 | [
"MIT"
] | 4 | 2016-08-04T12:52:48.000Z | 2018-07-16T20:21:45.000Z | mediadecoder/soundrenderers/__init__.py | open-cogsci/python-mediadecoder | f01b02d790f2abc52d9792e43076cf4cb7d3ce51 | [
"MIT"
] | 3 | 2016-05-30T14:56:14.000Z | 2016-06-23T10:36:20.000Z | import warnings
try:
from mediadecoder.soundrenderers.pyaudiorenderer import SoundrendererPyAudio
except Exception as e:
warnings.warn("Could not import pyaudio sound renderer: {}".format(e))
try:
from mediadecoder.soundrenderers.pygamerenderer import SoundrendererPygame
except Exception as e:
warnings.warn("Coul... | 32.45 | 85 | 0.813559 |
7956c9e49ab2bcc2d773f0891188091c45e56fe8 | 416 | py | Python | baekjoon/18111/minecraft.py | ucyang/AlgoEx | 465c88f04b9449c06ee5c9a684ded5aba8ccf399 | [
"MIT"
] | null | null | null | baekjoon/18111/minecraft.py | ucyang/AlgoEx | 465c88f04b9449c06ee5c9a684ded5aba8ccf399 | [
"MIT"
] | null | null | null | baekjoon/18111/minecraft.py | ucyang/AlgoEx | 465c88f04b9449c06ee5c9a684ded5aba8ccf399 | [
"MIT"
] | null | null | null | import sys
input = lambda: sys.stdin.readline().rstrip()
N, _, B = map(int, input().split())
a = []
for _ in range(N):
a += map(int, input().split())
min_t = -1
for h in range(min(a), max(a) + 1):
b, t = B, 0
for v in a:
b += v - h
t += 2 * (v - h) if v > h else h - v
if b < 0:
... | 18.909091 | 45 | 0.473558 |
7956cbf4da7132028944b6813e891f64f104d3f8 | 211 | py | Python | gen_stack.py | Globidev/push-swap | d3c6f1c7ab6b33d7281eff4895b3d0e4c291fe77 | [
"MIT"
] | null | null | null | gen_stack.py | Globidev/push-swap | d3c6f1c7ab6b33d7281eff4895b3d0e4c291fe77 | [
"MIT"
] | null | null | null | gen_stack.py | Globidev/push-swap | d3c6f1c7ab6b33d7281eff4895b3d0e4c291fe77 | [
"MIT"
] | null | null | null | from random import shuffle, seed
from sys import argv
size = int(argv[1])
try:
seed(int(argv[2]))
except:
pass
data_set = list(range(size))
shuffle(data_set)
print(' '.join(f'{i}' for i in data_set))
| 15.071429 | 41 | 0.672986 |
7956cc0765e00935db690e020b497edebbc3cd95 | 1,727 | py | Python | chp7/finetune_bert_spc.py | Sheldoer/plm-nlp-code | 04127d137c8bd40bc1412bee863640b9d909ddf9 | [
"Apache-2.0"
] | 330 | 2021-07-25T13:46:18.000Z | 2022-03-29T08:52:09.000Z | chp7/finetune_bert_spc.py | Sheldoer/plm-nlp-code | 04127d137c8bd40bc1412bee863640b9d909ddf9 | [
"Apache-2.0"
] | 11 | 2021-07-29T16:37:19.000Z | 2022-03-29T05:14:26.000Z | chp7/finetune_bert_spc.py | Sheldoer/plm-nlp-code | 04127d137c8bd40bc1412bee863640b9d909ddf9 | [
"Apache-2.0"
] | 107 | 2021-07-26T08:30:43.000Z | 2022-03-21T15:34:47.000Z | # Defined in Section 7.4.3.2
import numpy as np
from datasets import load_dataset, load_metric
from transformers import BertTokenizerFast, BertForSequenceClassification, TrainingArguments, Trainer
# 加载训练数据、分词器、预训练模型以及评价方法
dataset = load_dataset('glue', 'rte')
tokenizer = BertTokenizerFast.from_pretrained('bert-base-c... | 34.54 | 105 | 0.738854 |
7956cc4dc263468d53ee09ae951ba08640876dce | 1,142 | py | Python | RealSenseSDK/API_test.py | cutz-j/AR-project | 50d4f407a4f2c42e12bf2bcd54c436df6fa3c9fa | [
"MIT"
] | null | null | null | RealSenseSDK/API_test.py | cutz-j/AR-project | 50d4f407a4f2c42e12bf2bcd54c436df6fa3c9fa | [
"MIT"
] | null | null | null | RealSenseSDK/API_test.py | cutz-j/AR-project | 50d4f407a4f2c42e12bf2bcd54c436df6fa3c9fa | [
"MIT"
] | null | null | null | ### pyrealsense2 INSTRUCTION ###
import pyrealsense2 as rs
import numpy as np
from PIL import Image
import matplotlib.pyplot as plt
pipeline = rs.pipeline()
pipeline.start()
#try:
# while True:
# frames = pipeline.wait_for_frames()
# depth = frames.get_depth_frame()
#
# if not depth:
#... | 26.55814 | 57 | 0.548161 |
7956ccc2a95a3dab0ee70564cdd95e42454f0bfd | 4,886 | py | Python | savecode/threeyears/idownclient/scout/plugin/sonar/sonardomainwhois.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2019-05-19T11:54:26.000Z | 2019-05-19T12:03:49.000Z | savecode/threeyears/idownclient/scout/plugin/sonar/sonardomainwhois.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 1 | 2020-11-27T07:55:15.000Z | 2020-11-27T07:55:15.000Z | savecode/threeyears/idownclient/scout/plugin/sonar/sonardomainwhois.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2021-09-06T18:06:12.000Z | 2021-12-31T07:44:43.000Z | """
使用sonar查询domian的whois信息
create by judy 2019/07/16
"""
import datetime
import json
import traceback
import requests
from commonbaby.mslog import MsLogger, MsLogManager
from datacontract.iscoutdataset.iscouttask import IscoutTask
from idownclient.config_scouter import scouter_config
from ....clientdatafeedback.scou... | 36.462687 | 114 | 0.576341 |
7956cd1617f219397d8110116771b0295d8c82ad | 2,772 | py | Python | setup.py | selmaneislam/rdootl | 0ec936d998bdf1d2614d53c7fa57fbed28bd54aa | [
"MIT"
] | null | null | null | setup.py | selmaneislam/rdootl | 0ec936d998bdf1d2614d53c7fa57fbed28bd54aa | [
"MIT"
] | null | null | null | setup.py | selmaneislam/rdootl | 0ec936d998bdf1d2614d53c7fa57fbed28bd54aa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
raise RuntimeError('setuptools is required')
import versioneer
DESCRIPTION = 'Functions for reproducible timeseries analysis of photovoltaic systems.'
LONG_DESCRIPTION = """
RdTools is an open-source library to support reproducibl... | 23.692308 | 87 | 0.642136 |
7956cded2fa180c0ffd8e292515fa03940312a80 | 1,091 | py | Python | api/tacticalrmm/agents/urls.py | jeffreyvh/tacticalrmm | dcfb1732954c2c165e82e6b24686e27f9f909eb3 | [
"MIT"
] | null | null | null | api/tacticalrmm/agents/urls.py | jeffreyvh/tacticalrmm | dcfb1732954c2c165e82e6b24686e27f9f909eb3 | [
"MIT"
] | null | null | null | api/tacticalrmm/agents/urls.py | jeffreyvh/tacticalrmm | dcfb1732954c2c165e82e6b24686e27f9f909eb3 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path("listagents/", views.list_agents),
path("listagentsnodetail/", views.list_agents_no_detail),
path("byclient/<client>/", views.by_client),
path("bysite/<client>/<site>/", views.by_site),
path("overdueaction/", views.overdue_action... | 40.407407 | 68 | 0.679193 |
7956ce13f6c42fdead393fba1f1ebf5f7af8a49e | 7,674 | py | Python | heat/tests/openstack/designate/test_zone.py | HyunJin-Jeong/heat | 8353fddf9ebfb0eca67d6f2b2feb529031acff89 | [
"Apache-2.0"
] | 1 | 2020-06-18T01:05:29.000Z | 2020-06-18T01:05:29.000Z | heat/tests/openstack/designate/test_zone.py | HyunJin-Jeong/heat | 8353fddf9ebfb0eca67d6f2b2feb529031acff89 | [
"Apache-2.0"
] | null | null | null | heat/tests/openstack/designate/test_zone.py | HyunJin-Jeong/heat | 8353fddf9ebfb0eca67d6f2b2feb529031acff89 | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 35.859813 | 79 | 0.611936 |
7956ceb80ac510918935561c08bba696729a7b78 | 644 | py | Python | Python_3/Easy/Find_a_string.py | NagiLam/HackerRank | f83e00f2af72f978d248f7955e71f3885932a58f | [
"MIT"
] | null | null | null | Python_3/Easy/Find_a_string.py | NagiLam/HackerRank | f83e00f2af72f978d248f7955e71f3885932a58f | [
"MIT"
] | null | null | null | Python_3/Easy/Find_a_string.py | NagiLam/HackerRank | f83e00f2af72f978d248f7955e71f3885932a58f | [
"MIT"
] | null | null | null | """ Problem: Find a string || Task:
In this challenge, the user enters a string and a substring.
You have to print the number of times that the substring occurs in the given string.
String traversal will take place from left to right, not from right to left.
NOTE: String letters are case-sensitive.
Created on Tue ... | 28 | 85 | 0.689441 |
7956cfacd84a7e14983e5de7aae0877a55318bdf | 14,864 | py | Python | package/views.py | krekotenko/iclub-python | 3452d5d5ea5103ede5ec370ac075955bac2f2bdf | [
"MIT"
] | null | null | null | package/views.py | krekotenko/iclub-python | 3452d5d5ea5103ede5ec370ac075955bac2f2bdf | [
"MIT"
] | null | null | null | package/views.py | krekotenko/iclub-python | 3452d5d5ea5103ede5ec370ac075955bac2f2bdf | [
"MIT"
] | null | null | null | import importlib
import json
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.cache import cache
from django.core.urlresolvers import reverse
from django.db.models import Q, Count
from django.http import HttpResponseRedirect... | 34.974118 | 356 | 0.665164 |
7956cfb185ca62f58915bfc2da13443944572a73 | 5,106 | py | Python | src/hu_entity/legacy_entity_finder.py | hutomadotAI/entity_recogniser | 6390c65190b826fb98bc3505f41f3f0ce6837ef9 | [
"Apache-2.0"
] | 4 | 2019-06-01T12:28:28.000Z | 2020-09-29T21:01:17.000Z | src/hu_entity/legacy_entity_finder.py | hutomadotAI/entity_recogniser | 6390c65190b826fb98bc3505f41f3f0ce6837ef9 | [
"Apache-2.0"
] | null | null | null | src/hu_entity/legacy_entity_finder.py | hutomadotAI/entity_recogniser | 6390c65190b826fb98bc3505f41f3f0ce6837ef9 | [
"Apache-2.0"
] | 1 | 2020-08-19T19:28:55.000Z | 2020-08-19T19:28:55.000Z | import marisa_trie
import string
import re
import sre_constants
import logging
from collections import defaultdict
def _get_logger():
logger = logging.getLogger('hu_entity.entity_finder')
return logger
class LegacyEntityFinder:
def __init__(self):
self.logger = _get_logger()
self.entity... | 41.512195 | 98 | 0.658441 |
7956cfc414c9309df13b9fe9238026e3a7faf0de | 9,326 | py | Python | docs/conf.py | sam-mi/django-template-theming | a152cfdf59c77b344463309c15b5d490f6e94e7c | [
"MIT"
] | 5 | 2015-11-01T03:25:11.000Z | 2018-10-29T10:09:55.000Z | docs/conf.py | sam-mi/django-template-theming | a152cfdf59c77b344463309c15b5d490f6e94e7c | [
"MIT"
] | 1 | 2018-02-09T21:00:29.000Z | 2018-02-09T21:00:29.000Z | docs/conf.py | sam-mi/django-template-theming | a152cfdf59c77b344463309c15b5d490f6e94e7c | [
"MIT"
] | 1 | 2018-02-02T05:16:41.000Z | 2018-02-02T05:16:41.000Z | # -*- coding: utf-8 -*-
#
# Django Template Theming documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 31 09:17:19 2015.
#
# 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.494774 | 85 | 0.720566 |
7956d13dd2cb89339c8d23cde1dedec8509d38e7 | 1,836 | py | Python | vendor-local/lib/python/django_browserid/admin.py | jgmize/nucleus | 1fd9d069103b7be00f5815ae1f3eac6ba0e3530d | [
"BSD-3-Clause"
] | null | null | null | vendor-local/lib/python/django_browserid/admin.py | jgmize/nucleus | 1fd9d069103b7be00f5815ae1f3eac6ba0e3530d | [
"BSD-3-Clause"
] | null | null | null | vendor-local/lib/python/django_browserid/admin.py | jgmize/nucleus | 1fd9d069103b7be00f5815ae1f3eac6ba0e3530d | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.admin.sites import AdminSite, site as admin_site
class BrowserIDAdminSite(AdminSite):
"""Support logging in to the admin interface via BrowserID."""
login_template = 'browserid/admin_login.html'
#: If True, include the normal username and password form as well as
#: the BrowserID ... | 34.641509 | 76 | 0.666667 |
7956d19dd3933058b2319c21a0dba8d43a354180 | 3,259 | py | Python | slider-agent/src/main/python/jinja2/setup.py | turningme/incubator-retired-slider | 1d4f519d763210f46e327338be72efa99e65cb5d | [
"Apache-2.0"
] | 60 | 2015-01-05T10:51:11.000Z | 2018-12-15T03:48:09.000Z | slider-agent/src/main/python/jinja2/setup.py | turningme/incubator-retired-slider | 1d4f519d763210f46e327338be72efa99e65cb5d | [
"Apache-2.0"
] | 1 | 2021-11-04T13:31:30.000Z | 2021-11-04T13:31:30.000Z | ambari-common/src/main/python/jinja2/setup.py | isabella232/incubator-ambari | bf747346312170834c6beb89a60c8624b47aa288 | [
"Apache-2.0"
] | 87 | 2015-01-14T05:14:15.000Z | 2018-12-25T14:14:56.000Z | # -*- coding: utf-8 -*-
"""
Jinja2
~~~~~~
Jinja2 is a template engine written in pure Python. It provides a
`Django`_ inspired non-XML syntax but supports inline expressions and
an optional `sandboxed`_ environment.
Nutshell
--------
Here a small example of a Jinja template::
{% extends 'base.html' %}
{% b... | 29.36036 | 75 | 0.631175 |
7956d1acf23dab83293e67238c186140727ea1c5 | 1,838 | py | Python | config.env.py | jabbate19/conditional | 20013459438d80bca06a844da250e2543c84186e | [
"MIT"
] | 9 | 2016-08-21T19:27:24.000Z | 2019-09-12T06:56:49.000Z | config.env.py | jabbate19/conditional | 20013459438d80bca06a844da250e2543c84186e | [
"MIT"
] | 237 | 2016-08-21T18:08:58.000Z | 2022-03-28T17:01:36.000Z | config.env.py | jabbate19/conditional | 20013459438d80bca06a844da250e2543c84186e | [
"MIT"
] | 31 | 2016-08-22T23:46:48.000Z | 2022-03-26T22:37:39.000Z | import json
import secrets
import os
from os import environ as env
# Fetch the version number from the npm package file
with open(os.path.join(os.getcwd(), "package.json")) as package_file:
VERSION = json.load(package_file)["version"]
# Flask config
DEBUG = env.get("CONDITIONAL_DEBUG", "false").lower() == "true"
... | 36.76 | 106 | 0.745375 |
7956d2a3feea39e7d4a0a93d52cab9e568c42f2c | 2,392 | py | Python | ambari-server/src/main/resources/stacks/ADH/1.4/services/RANGER_KMS/package/scripts/kms_server.py | kuhella/ambari | 9396c17b0305665d31d7a4f4525be857958b5d4c | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/ADH/1.4/services/RANGER_KMS/package/scripts/kms_server.py | kuhella/ambari | 9396c17b0305665d31d7a4f4525be857958b5d4c | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/ADH/1.4/services/RANGER_KMS/package/scripts/kms_server.py | kuhella/ambari | 9396c17b0305665d31d7a4f4525be857958b5d4c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | 28.819277 | 72 | 0.748328 |
7956d3e4b56cfbd0c4d903480fa16b8b485a9522 | 5,697 | py | Python | pysnmp-with-texts/DNOS-KEYING-PRIVATE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/DNOS-KEYING-PRIVATE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/DNOS-KEYING-PRIVATE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DNOS-KEYING-PRIVATE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DNOS-KEYING-PRIVATE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:51:39 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... | 121.212766 | 546 | 0.791118 |
7956d43349a05d201e5acdf042b310b9a7f3e88f | 50 | py | Python | languages/python/cyclicimports/badcase2/bar.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | 2 | 2018-07-20T10:15:49.000Z | 2018-07-20T10:16:54.000Z | languages/python/cyclicimports/badcase2/bar.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | 2 | 2018-06-26T09:12:44.000Z | 2019-12-18T00:09:14.000Z | languages/python/cyclicimports/badcase2/bar.py | JiniousChoi/encyclopedia-in-code | 77bc551a03a2a3e3808e50016ece14adb5cfbd96 | [
"MIT"
] | null | null | null | from foo import abc
print(abc)
xyz = 5
print(xyz)
| 10 | 19 | 0.72 |
7956d4944e42856b84a4cdc6ae178a42926b4303 | 11,627 | py | Python | gui.py | Hack-a-thingie/terminalvelociraptor | ec96034d59a422b81ed9188ef861b79f6d0b2132 | [
"MIT"
] | null | null | null | gui.py | Hack-a-thingie/terminalvelociraptor | ec96034d59a422b81ed9188ef861b79f6d0b2132 | [
"MIT"
] | null | null | null | gui.py | Hack-a-thingie/terminalvelociraptor | ec96034d59a422b81ed9188ef861b79f6d0b2132 | [
"MIT"
] | null | null | null | #------------gui.py------------------------------------------------------------#
# gui for academic terminal card game
#
# Purpose: This file has been created during the hack-a-thingie 2016 event and
# will be using curses to create the terminal ui for playing the game.
#
# Notes: importing game ... | 28.358537 | 100 | 0.546229 |
7956d4f4495cc6b9511b7c06cc4407e6e37a7032 | 1,936 | py | Python | opentuner-master/examples/tsp/tsp.py | SapientsUOM/JATT | cf932938b1ca67fdda78bdd651e458c3193c21ad | [
"MIT"
] | 1 | 2018-08-10T07:26:07.000Z | 2018-08-10T07:26:07.000Z | opentuner-master/examples/tsp/tsp.py | SapientsUOM/JATT | cf932938b1ca67fdda78bdd651e458c3193c21ad | [
"MIT"
] | null | null | null | opentuner-master/examples/tsp/tsp.py | SapientsUOM/JATT | cf932938b1ca67fdda78bdd651e458c3193c21ad | [
"MIT"
] | 5 | 2017-01-18T00:41:28.000Z | 2021-07-29T02:25:12.000Z | #!/usr/bin/env python
#
# This is a simple testcase purely for testing the autotuner
#
# http://en.wikipedia.org/wiki/Rosenbrock_function
#
# Also supports some other test functions taken from:
# http://en.wikipedia.org/wiki/Test_functions_for_optimization
#
import adddeps #fix sys.path
import argparse
import logging... | 30.730159 | 85 | 0.682335 |
7956d566358486626deae2e04f66f2f75c4fa4c3 | 31,707 | py | Python | pde/trackers/trackers.py | noah-ziethen/py-pde | b88e86439290c31284a4ac665a8e9ff34d08b494 | [
"MIT"
] | null | null | null | pde/trackers/trackers.py | noah-ziethen/py-pde | b88e86439290c31284a4ac665a8e9ff34d08b494 | [
"MIT"
] | null | null | null | pde/trackers/trackers.py | noah-ziethen/py-pde | b88e86439290c31284a4ac665a8e9ff34d08b494 | [
"MIT"
] | null | null | null | """
Module defining classes for tracking results from simulations.
The trackers defined in this module are:
.. autosummary::
:nosignatures:
CallbackTracker
ProgressTracker
PrintTracker
PlotTracker
DataTracker
SteadyStateTracker
RuntimeTracker
ConsistencyTracker
MaterialConservationTrack... | 37.478723 | 80 | 0.556344 |
7956d5778eddb65e6ad464cec097c3a26c931868 | 149 | py | Python | initialize_weights.py | catskillsresearch/openasr20 | b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e | [
"Apache-2.0"
] | null | null | null | initialize_weights.py | catskillsresearch/openasr20 | b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e | [
"Apache-2.0"
] | null | null | null | initialize_weights.py | catskillsresearch/openasr20 | b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e | [
"Apache-2.0"
] | 1 | 2021-07-28T02:13:21.000Z | 2021-07-28T02:13:21.000Z | import torch.nn as nn
def initialize_weights(m):
if hasattr(m, 'weight') and m.weight.dim() > 1:
nn.init.xavier_uniform_(m.weight.data)
| 24.833333 | 51 | 0.677852 |
7956d5b28bd0c1527877118117deec5195856527 | 2,233 | py | Python | TropicalGeometry/TropicalSemiring.py | SymmetricChaos/FiniteFields | 65258e06b7f04ce15223c1bc0c2384ef5e9cec1a | [
"MIT"
] | 1 | 2021-08-22T15:03:59.000Z | 2021-08-22T15:03:59.000Z | TropicalGeometry/TropicalSemiring.py | SymmetricChaos/NumberTheory | 65258e06b7f04ce15223c1bc0c2384ef5e9cec1a | [
"MIT"
] | null | null | null | TropicalGeometry/TropicalSemiring.py | SymmetricChaos/NumberTheory | 65258e06b7f04ce15223c1bc0c2384ef5e9cec1a | [
"MIT"
] | null | null | null | class Tropical:
def __init__(self,val):
self.val = val
# Relations
def __lt__(self,other):
if type(other) == Tropical:
return self.val-other.val < 0
else:
return self.val-other < 0
def __gt__(self,other):
if type(other) == Tropical:
... | 23.505263 | 48 | 0.506046 |
7956d67415f9e5d250febb11a07b298fc0d236e8 | 2,690 | py | Python | pyagentx3/agent.py | Temien/PyAgentX3 | 8f29ee160825fb049b5cacdbce4ef33418fb7dd3 | [
"BSD-2-Clause"
] | null | null | null | pyagentx3/agent.py | Temien/PyAgentX3 | 8f29ee160825fb049b5cacdbce4ef33418fb7dd3 | [
"BSD-2-Clause"
] | 3 | 2021-07-20T13:58:29.000Z | 2022-03-07T14:47:21.000Z | pyagentx3/agent.py | Temien/PyAgentX3 | 8f29ee160825fb049b5cacdbce4ef33418fb7dd3 | [
"BSD-2-Clause"
] | 3 | 2021-07-04T00:03:43.000Z | 2022-03-23T07:44:03.000Z | # -*- coding: utf-8 -*-
# --------------------------------------------
import logging
class NullHandler(logging.Handler):
def emit(self, record):
pass
logger = logging.getLogger('pyagentx3.agent')
logger.addHandler(NullHandler())
# --------------------------------------------
import time
from queue import... | 28.315789 | 75 | 0.560223 |
7956d7000b3730376dc18d5559f5916a9235fdcb | 3,228 | py | Python | issuer_controller/test/issue_credential_resource_test.py | WadeBarnes/mines-digital-trust | f07df4a347d49a523b37a066ff8d6b753be110ef | [
"Apache-2.0"
] | null | null | null | issuer_controller/test/issue_credential_resource_test.py | WadeBarnes/mines-digital-trust | f07df4a347d49a523b37a066ff8d6b753be110ef | [
"Apache-2.0"
] | null | null | null | issuer_controller/test/issue_credential_resource_test.py | WadeBarnes/mines-digital-trust | f07df4a347d49a523b37a066ff8d6b753be110ef | [
"Apache-2.0"
] | null | null | null | import pytest,threading,json, random
from time import sleep
from unittest.mock import MagicMock, patch, PropertyMock
from app import issuer, credential
test_send_credential = [
{
"schema": "my-registration.empr",
"version": "1.0.0",
"attributes": {
"corp_num": "ABC12345",
... | 31.339806 | 87 | 0.599442 |
7956d70872889926ac0d0887bdfc404c12bc2f0c | 4,657 | py | Python | rf_protocol_validator.py | DMTF/Redfish-Protocol-Validator | 657aae079d5e490c4196ef50d64d5fa9d86cd584 | [
"FSFAP"
] | 2 | 2020-10-01T15:30:13.000Z | 2022-03-02T18:38:51.000Z | rf_protocol_validator.py | DMTF/Redfish-Protocol-Validator | 657aae079d5e490c4196ef50d64d5fa9d86cd584 | [
"FSFAP"
] | 34 | 2020-09-29T14:54:57.000Z | 2022-03-22T12:43:57.000Z | rf_protocol_validator.py | DMTF/Redfish-Protocol-Validator | 657aae079d5e490c4196ef50d64d5fa9d86cd584 | [
"FSFAP"
] | 3 | 2020-07-24T15:17:57.000Z | 2021-03-31T02:37:33.000Z | # Copyright Notice:
# Copyright 2020 DMTF. All rights reserved.
# License: BSD 3-Clause License. For full text see link:
# https://github.com/DMTF/Redfish-Protocol-Validator/blob/master/LICENSE.md
import argparse
import logging
import sys
from datetime import datetime
from pathlib import Path
import requests
from... | 41.954955 | 79 | 0.703242 |
7956d78f3f2642f351093cb28dec7d329440efaf | 1,007 | py | Python | Python/Test_Typing_Speed/test_typing_speed.py | iamakkkhil/Rotten-Scripts | 116ae502271d699db88add5fd1cf733d01134b7d | [
"MIT"
] | 1,127 | 2020-02-16T04:14:00.000Z | 2022-03-31T21:37:24.000Z | Python/Test_Typing_Speed/test_typing_speed.py | iamakkkhil/Rotten-Scripts | 116ae502271d699db88add5fd1cf733d01134b7d | [
"MIT"
] | 1,123 | 2020-06-20T04:00:11.000Z | 2022-03-31T13:23:45.000Z | Python/Test_Typing_Speed/test_typing_speed.py | iamakkkhil/Rotten-Scripts | 116ae502271d699db88add5fd1cf733d01134b7d | [
"MIT"
] | 669 | 2020-05-30T16:14:43.000Z | 2022-03-31T14:36:11.000Z | # Python Script to test your Typing Speed
from time import time
print()
print("NO NEW LINE IS THERE, WRITE CONTINUOUSLY(just SPACES)")
s = (
"this is a simple paragraph that is meant to be nice and"
" easy to type which is why there will be no commas no periods "
"or any capital letters so i guess this me... | 25.175 | 73 | 0.633565 |
7956d950d68aae525daba920d5aaca06631d00e6 | 11,255 | py | Python | laika/downloader.py | mengyou658/laika | cdf08816f9e1d7e1f9e12e565d6f4fca6742ef8e | [
"MIT"
] | null | null | null | laika/downloader.py | mengyou658/laika | cdf08816f9e1d7e1f9e12e565d6f4fca6742ef8e | [
"MIT"
] | null | null | null | laika/downloader.py | mengyou658/laika | cdf08816f9e1d7e1f9e12e565d6f4fca6742ef8e | [
"MIT"
] | null | null | null | import certifi
import ftplib
import gzip
import os
import urllib.request
import pycurl
from datetime import datetime
from urllib.parse import urlparse
from io import BytesIO
from .constants import SECS_IN_DAY, SECS_IN_WEEK
from .gps_time import GPSTime
from .unlzw import unlzw
dir_path = os.path.dirname(os.path.real... | 32.909357 | 112 | 0.683163 |
7956da327d34e493ebf213da8790d4eb288c9007 | 842 | py | Python | wishlist/views.py | randomowo/randomowo.ru | f00ddd1e6bfcd9cb30d2f164a4f2c0188e42f8f1 | [
"MIT"
] | null | null | null | wishlist/views.py | randomowo/randomowo.ru | f00ddd1e6bfcd9cb30d2f164a4f2c0188e42f8f1 | [
"MIT"
] | null | null | null | wishlist/views.py | randomowo/randomowo.ru | f00ddd1e6bfcd9cb30d2f164a4f2c0188e42f8f1 | [
"MIT"
] | null | null | null | """
"""
from django.shortcuts import render
from wishlist.forms import WishForm
from wishlist.models import Wish
def wish_list(request):
"""
"""
added = False
if request.method == "POST":
form = WishForm(request.POST)
if form.is_valid():
title = form.cleaned_data["title"]
... | 27.16129 | 52 | 0.567696 |
7956dac4e367a7f2064c23b999f7944fe83d4826 | 9,796 | py | Python | e2e-tests/test_client.py | addyess/lightkube | 3d2f4ab41bf9daa168e923f3b820d9379d6d56b6 | [
"MIT"
] | null | null | null | e2e-tests/test_client.py | addyess/lightkube | 3d2f4ab41bf9daa168e923f3b820d9379d6d56b6 | [
"MIT"
] | null | null | null | e2e-tests/test_client.py | addyess/lightkube | 3d2f4ab41bf9daa168e923f3b820d9379d6d56b6 | [
"MIT"
] | null | null | null | import time
from datetime import datetime
import pytest
from lightkube import Client, ApiError, AsyncClient
from lightkube.types import PatchType
from lightkube.resources.core_v1 import Pod, Node, ConfigMap, Service, Namespace
from lightkube.resources.apps_v1 import Deployment
from lightkube.models.meta_v1 import Obj... | 30.517134 | 110 | 0.626684 |
7956db1bb6ae173e72a87e94616c60b8a02bbab8 | 326 | py | Python | models/__init__.py | IgorIvkin/Children | a43bbfae3f9390b12df83099437ff6bde7bfcc5d | [
"Apache-2.0"
] | null | null | null | models/__init__.py | IgorIvkin/Children | a43bbfae3f9390b12df83099437ff6bde7bfcc5d | [
"Apache-2.0"
] | null | null | null | models/__init__.py | IgorIvkin/Children | a43bbfae3f9390b12df83099437ff6bde7bfcc5d | [
"Apache-2.0"
] | null | null | null | import os
import importlib
# Imports all the modules from this package (models).
# We need this code to make migration framework working.
for module in os.listdir(os.path.dirname(__file__)):
if module == '__init__.py' or module[-3:] != '.py':
continue
importlib.import_module(__package__ + '.' + module[... | 32.6 | 60 | 0.696319 |
7956db43348c0cc0f3d372e92a2e343f5aa62013 | 5,860 | py | Python | tensorflow/contrib/gan/python/eval/python/summaries_test.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 5 | 2019-05-23T02:59:21.000Z | 2020-02-05T08:20:23.000Z | tensorflow/contrib/gan/python/eval/python/summaries_test.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/gan/python/eval/python/summaries_test.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 2 | 2019-07-04T00:47:02.000Z | 2019-07-08T08:47:05.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... | 40.136986 | 81 | 0.725939 |
7956dcb800aea83db15e0f4d67a36465f62281c0 | 221 | py | Python | books_app/books_app/books/admin.py | BoyanPeychinov/python_web_basics | 2f892ac119f7fe3a5c03fc5e7b35670dc609a70f | [
"MIT"
] | 1 | 2021-07-20T12:16:34.000Z | 2021-07-20T12:16:34.000Z | books_app/books_app/books/admin.py | BoyanPeychinov/python_web_basics | 2f892ac119f7fe3a5c03fc5e7b35670dc609a70f | [
"MIT"
] | null | null | null | books_app/books_app/books/admin.py | BoyanPeychinov/python_web_basics | 2f892ac119f7fe3a5c03fc5e7b35670dc609a70f | [
"MIT"
] | null | null | null | from django.contrib import admin
from books_app.books.models import Book, Author
@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
pass
@admin.register(Author)
class AuthorAdmin(admin.ModelAdmin):
pass | 17 | 47 | 0.778281 |
7956dd0280162ab12213e2c5c63643464e02ab75 | 445 | py | Python | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/__init__.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/__init__.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | 10 | 2020-06-05T19:42:26.000Z | 2022-03-11T23:38:35.000Z | code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/__init__.py | jhkuang11/UniTrade | 5f68b853926e167936b58c8543b8f95ebd6f5211 | [
"MIT"
] | null | null | null | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
from pgadmin.util... | 26.176471 | 74 | 0.494382 |
7956dd2d67cc23b3e4168199ecf51890e6f12e18 | 47,465 | py | Python | model/models.py | irenetrampoline/clustering-interval-censored | f6ab06a6cf3098ffe006d1b95d1b4f1d158b0bc4 | [
"MIT"
] | 1 | 2022-02-03T08:47:45.000Z | 2022-02-03T08:47:45.000Z | model/models.py | irenetrampoline/clustering-interval-censored | f6ab06a6cf3098ffe006d1b95d1b4f1d158b0bc4 | [
"MIT"
] | null | null | null | model/models.py | irenetrampoline/clustering-interval-censored | f6ab06a6cf3098ffe006d1b95d1b4f1d158b0bc4 | [
"MIT"
] | null | null | null | import logging
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
# torch.manual_seed(0)
# torch.backends.cudnn.deterministic = True
# torch.backends.cudnn.benchmark = False
from pyro.distributions import MultivariateNormal, Normal, Independent
from sklearn.cluster import KMeans, ... | 41.893204 | 243 | 0.558601 |
7956dd6db9fe0ad639f4534081cadbd9d4c556a0 | 3,383 | py | Python | gdsfactory/mask/merge_test_metadata.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | gdsfactory/mask/merge_test_metadata.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | gdsfactory/mask/merge_test_metadata.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | """Merge mask metadata with test labels to return test_metadata """
import warnings
from pathlib import Path
from typing import Any, Dict, List, Optional
from omegaconf import DictConfig, OmegaConf
from gdsfactory.config import logger
from gdsfactory.types import PathType
def parse_csv_data(
csv_labels_path: Pa... | 31.036697 | 85 | 0.652675 |
7956dd97b5ecebd536d8d1f9afb936ed5ebec034 | 6,391 | py | Python | homeassistant/components/sensor/min_max.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 2 | 2020-08-29T07:24:56.000Z | 2020-10-27T21:47:35.000Z | homeassistant/components/sensor/min_max.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 6 | 2021-02-08T20:25:50.000Z | 2022-03-11T23:27:53.000Z | homeassistant/components/sensor/min_max.py | robin13/home-assistant | 4976569e304c23975d34ec88e2dfb94e84ab1f1c | [
"Apache-2.0"
] | 3 | 2018-09-14T07:34:09.000Z | 2018-09-29T12:57:10.000Z | """
Support for displaying the minimal and the maximal value.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.min_max/
"""
import asyncio
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassist... | 31.17561 | 79 | 0.644031 |
7956dd9954a869adae25776f34d9cfad6f7f2ede | 1,912 | py | Python | mp/data/pytorch/domain_prediction_dataset_wrapper.py | MECLabTUDA/OOD-Gen | f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e | [
"MIT"
] | null | null | null | mp/data/pytorch/domain_prediction_dataset_wrapper.py | MECLabTUDA/OOD-Gen | f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e | [
"MIT"
] | null | null | null | mp/data/pytorch/domain_prediction_dataset_wrapper.py | MECLabTUDA/OOD-Gen | f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e | [
"MIT"
] | null | null | null | from mp.data.pytorch.pytorch_dataset import PytorchDataset
from mp.data.datasets.dataset import Instance
import copy
import torch
class DomainPredictionDatasetWrapper(PytorchDataset):
r"""Wraps a PytorchDataset to reuse its instances.x and replacing the labels"""
def __init__(self, pytorch_ds, target_idx):
... | 40.680851 | 97 | 0.671548 |
7956dfced705294acdce6e72df5792f2b820a965 | 259 | py | Python | ver1_0/openassembly/api/models.py | fragro/Open-Assembly | e9679ff5e7ae9881fa5781d763288ed2f40b014d | [
"BSD-3-Clause"
] | 1 | 2015-11-05T08:22:19.000Z | 2015-11-05T08:22:19.000Z | ver1_0/openassembly/api/models.py | fragro/Open-Assembly | e9679ff5e7ae9881fa5781d763288ed2f40b014d | [
"BSD-3-Clause"
] | null | null | null | ver1_0/openassembly/api/models.py | fragro/Open-Assembly | e9679ff5e7ae9881fa5781d763288ed2f40b014d | [
"BSD-3-Clause"
] | 1 | 2018-02-03T18:25:41.000Z | 2018-02-03T18:25:41.000Z | from django.db import models
# Create your models here.
from piston.handler import BaseHandler
from myapp.models import Blogpost
class BlogpostHandler(BaseHandler):
allowed_methods = ('GET',)
model = Blogpost
def read(self, request, post_slug): | 23.545455 | 38 | 0.756757 |
7956dfd4e0075131f805cc94204a3ea4fccbca27 | 46,710 | py | Python | bayes_opt/visualization/vis_presentation.py | AndRossi/OpenKE_BayesianOpt | 31db25eb8406c6cf803e2187402290e466c0e824 | [
"MIT"
] | 2 | 2020-08-01T03:00:24.000Z | 2020-08-18T02:08:21.000Z | bayes_opt/visualization/vis_presentation.py | AndRossi/OpenKE_BayesianOpt | 31db25eb8406c6cf803e2187402290e466c0e824 | [
"MIT"
] | null | null | null | bayes_opt/visualization/vis_presentation.py | AndRossi/OpenKE_BayesianOpt | 31db25eb8406c6cf803e2187402290e466c0e824 | [
"MIT"
] | 1 | 2020-08-18T02:08:23.000Z | 2020-08-18T02:08:23.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 27 23:22:32 2016
@author: Vu
"""
from __future__ import division
import sys
sys.path.insert(0,'../../')
sys.path.insert(0,'..')
import numpy as np
#import mayavi.mlab as mlab
#from scipy.stats import norm
#import matplotlib as plt
from mpl_toolkits.mplot3d... | 40.336788 | 141 | 0.634939 |
7956e03f6717fe92b16db1846063a9cf33884351 | 1,909 | py | Python | api/api_date.py | MrLai/Django-Data-quality-system | 0e9113b5b851d7ed411cbd1231c5c13bb0428ee3 | [
"MIT"
] | 148 | 2020-01-06T10:39:16.000Z | 2022-03-17T09:32:31.000Z | api/api_date.py | MrLai/Django-Data-quality-system | 0e9113b5b851d7ed411cbd1231c5c13bb0428ee3 | [
"MIT"
] | 15 | 2020-06-12T05:17:06.000Z | 2022-02-10T16:50:44.000Z | api/api_date.py | MrLai/Django-Data-quality-system | 0e9113b5b851d7ed411cbd1231c5c13bb0428ee3 | [
"MIT"
] | 57 | 2020-01-10T06:18:20.000Z | 2022-03-22T03:27:02.000Z | from django.http.response import HttpResponse, JsonResponse
from django.views.decorators.http import require_http_methods
import datetime
import math
import sys
sys.path.insert(0, '..')
from mysite import db_config
from utils import functions as f
@require_http_methods(['GET'])
def year_list(request):
'''查询已有检核结... | 26.513889 | 72 | 0.647983 |
7956e13e453f9ff770e44fc2bb4ac6fbdd685ea2 | 485 | py | Python | solution-bank/pattern/solution_13.py | anishLearnsToCode/python-training-1 | ef5d6b64f888e167faecd1410563173dcc27f319 | [
"MIT"
] | 3 | 2021-01-05T18:00:14.000Z | 2021-11-28T15:43:04.000Z | solution-bank/pattern/solution_13.py | anishLearnsToCode/python-training-1 | ef5d6b64f888e167faecd1410563173dcc27f319 | [
"MIT"
] | null | null | null | solution-bank/pattern/solution_13.py | anishLearnsToCode/python-training-1 | ef5d6b64f888e167faecd1410563173dcc27f319 | [
"MIT"
] | null | null | null | rows = int(input())
# upper triangle
for i in range(rows):
# spaces
print(end=' ' * (rows - 1 - i))
# first star
print(end='*')
# spaces
print(end=' ' * (2 * i - 1))
# second star
print('' if i is 0 else '*')
# lower triangle
for i in range(rows - 1):
# spaces
print(end=' ' ... | 16.166667 | 43 | 0.478351 |
7956e5c77ac5c2a1421005ac1c5b3b4ca36a2e9b | 8,262 | py | Python | other/DaSiamRPN/code/run_SiamRPN.py | shenjl/asimo | 6aad2c89bb5eb3ca59c85521934fe854d1a0e0e6 | [
"MIT"
] | null | null | null | other/DaSiamRPN/code/run_SiamRPN.py | shenjl/asimo | 6aad2c89bb5eb3ca59c85521934fe854d1a0e0e6 | [
"MIT"
] | null | null | null | other/DaSiamRPN/code/run_SiamRPN.py | shenjl/asimo | 6aad2c89bb5eb3ca59c85521934fe854d1a0e0e6 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# DaSiamRPN
# Licensed under The MIT License
# Written by Qiang Wang (wangqiang2015 at ia.ac.cn)
# --------------------------------------------------------
import numpy as np
from torch.autograd import Variable
import torch.nn.functional as F
from utils impor... | 33.722449 | 120 | 0.605543 |
7956e686ff51cf303fa48f86ce5eb1be2f759f7c | 983 | py | Python | cases.py | reidac/covid19-curve-your-county | ab3ec4e6f3249844cda35fbceff3676976a5c914 | [
"BSD-3-Clause"
] | null | null | null | cases.py | reidac/covid19-curve-your-county | ab3ec4e6f3249844cda35fbceff3676976a5c914 | [
"BSD-3-Clause"
] | 1 | 2020-04-09T21:08:32.000Z | 2020-04-09T21:11:09.000Z | cases.py | reidac/covid19-curve-your-county | ab3ec4e6f3249844cda35fbceff3676976a5c914 | [
"BSD-3-Clause"
] | 1 | 2020-04-09T20:15:45.000Z | 2020-04-09T20:15:45.000Z | import matplotlib.pyplot as plt
import numpy as np
import os
import get_dc_data
# Cumulative figure.
casedata = get_dc_data.retrieve(download=False)
f2 = plt.figure(figsize=(6,4))
plt.suptitle("COVID-19 Data Summary, District of Columbia ",
fontweight="bold")
plt.title("github.com/reidac/covid19-curve-... | 29.787879 | 114 | 0.734486 |
7956e76b7be92923dda4e84bc1c8d750a357e00f | 25,350 | py | Python | meshio/_vtk.py | yuan-feng/meshio | a58b9080e5b288320df2bee1bf4d03097184f3d2 | [
"MIT"
] | null | null | null | meshio/_vtk.py | yuan-feng/meshio | a58b9080e5b288320df2bee1bf4d03097184f3d2 | [
"MIT"
] | null | null | null | meshio/_vtk.py | yuan-feng/meshio | a58b9080e5b288320df2bee1bf4d03097184f3d2 | [
"MIT"
] | null | null | null | """
I/O for VTK <https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf>.
"""
import logging
from functools import reduce
import numpy
from .__about__ import __version__
from ._common import raw_from_cell_data
from ._exceptions import ReadError, WriteError
from ._files import open_file
from ._mesh import Mes... | 32.54172 | 92 | 0.564103 |
7956e7c26497cae11cb2e5e108e7847dfbedab0a | 4,111 | py | Python | botc/commands/abilities/tb/read.py | Xinverse/BOTC-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-06-21T17:20:17.000Z | 2020-06-21T17:20:17.000Z | botc/commands/abilities/tb/read.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-07-07T03:47:44.000Z | 2020-07-07T03:47:44.000Z | botc/commands/abilities/tb/read.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2022-02-18T00:42:19.000Z | 2022-02-18T00:42:19.000Z | """Read command"""
import botutils
import discord
import traceback
import json
from discord.ext import commands
from botc import check_if_is_player, check_if_is_night, check_if_dm, RoleCannotUseCommand, \
check_if_player_really_alive, check_if_can_read, PlayerParser, AbilityForbidden, \
NotAPlayer, BOTCUtils, ... | 39.528846 | 121 | 0.633423 |
7956e87c4063087aca37349365e4c697810c154d | 9,582 | py | Python | ceph/ceph_admin/orch.py | hmaheswa/cephci | b75c1e58e1222865c81c0558ff98b3708dc4236a | [
"MIT"
] | null | null | null | ceph/ceph_admin/orch.py | hmaheswa/cephci | b75c1e58e1222865c81c0558ff98b3708dc4236a | [
"MIT"
] | null | null | null | ceph/ceph_admin/orch.py | hmaheswa/cephci | b75c1e58e1222865c81c0558ff98b3708dc4236a | [
"MIT"
] | null | null | null | """
Module that interacts with the orchestrator CLI.
Provide the interfaces to ceph orch and in turn manage the orchestration engine.
"""
from datetime import datetime, timedelta
from json import loads
from time import sleep
from ceph.ceph import ResourceNotFoundError
from utility.log import Log
from .ceph import Ce... | 29.392638 | 100 | 0.567836 |
7956e8f8d0ec0fef2a695bd6195a66b5f1e4e0e9 | 420 | py | Python | docs/python/attachments/animals.py | Benbinbin/blog-data | e98b6560253bb6a1aa35e08b4ba36d03194920d1 | [
"MIT"
] | null | null | null | docs/python/attachments/animals.py | Benbinbin/blog-data | e98b6560253bb6a1aa35e08b4ba36d03194920d1 | [
"MIT"
] | null | null | null | docs/python/attachments/animals.py | Benbinbin/blog-data | e98b6560253bb6a1aa35e08b4ba36d03194920d1 | [
"MIT"
] | null | null | null |
class Dog:
def speak(self):
print("Woof!")
def __init__(self, name):
self.name = name
def hear(self, words):
if self.name in words:
self.speak()
class Husky(Dog):
origin = "Siberia"
def speak(self):
print("Awoo!")
class Chihuahua(Dog):
origin =... | 14 | 30 | 0.538095 |
7956ea4ffbb947ac325d8cc8e4460087f45235c4 | 15,548 | py | Python | Sizmek/Sizmek.hype-export.py | tumult/hype-export-scripts | 2cf96ceeeadd238ac25211b2003028abe75738fc | [
"MIT"
] | 27 | 2016-12-12T19:03:26.000Z | 2021-12-10T11:12:52.000Z | Sizmek/Sizmek.hype-export.py | tumult/hype-export-scripts | 2cf96ceeeadd238ac25211b2003028abe75738fc | [
"MIT"
] | 4 | 2017-05-31T10:21:39.000Z | 2020-05-05T00:28:06.000Z | Sizmek/Sizmek.hype-export.py | tumult/hype-export-scripts | 2cf96ceeeadd238ac25211b2003028abe75738fc | [
"MIT"
] | 15 | 2017-02-16T19:01:34.000Z | 2020-05-09T08:32:14.000Z | #!/usr/bin/python
# Sizmek.hype-export.py
# Export Script for Tumult Hype to produce ads for Sizmek MDX
#
# Installation, usage, and additional info:
# https://tumult.com/hype/export-scripts/
#
# MIT License
# Copyright (c) 2017 Tumult Inc.
#
import argparse
import json
import sys
import distutils.util
import... | 38.107843 | 231 | 0.726524 |
7956ea67e59e32a27b23179ef9215810b98c7b73 | 3,182 | py | Python | astrality/filewatcher.py | JakobGM/Astrality | 72935b616f9a6a2e9254e9cd9319b525c596e8f0 | [
"MIT"
] | 111 | 2018-03-19T12:56:35.000Z | 2022-02-05T11:19:04.000Z | astrality/filewatcher.py | JakobGM/Astrality | 72935b616f9a6a2e9254e9cd9319b525c596e8f0 | [
"MIT"
] | 120 | 2018-02-22T11:23:08.000Z | 2021-03-25T22:13:47.000Z | astrality/filewatcher.py | JakobGM/Astrality | 72935b616f9a6a2e9254e9cd9319b525c596e8f0 | [
"MIT"
] | 7 | 2018-04-06T14:28:33.000Z | 2020-03-18T20:25:59.000Z | """Module for directory modification watching."""
from pathlib import Path
import logging
from sys import platform
from typing import Callable
from watchdog.events import FileModifiedEvent, FileSystemEventHandler
from watchdog.observers import Observer
class DirectoryWatcher:
"""A directory watcher class."""
... | 34.215054 | 76 | 0.582652 |
7956eaeeb3503e0cf6cf7c7be20a13b781d3dba4 | 637 | py | Python | setup.py | D-Krystek/storybook | b632e0657c74f1163df2777376b2366801aaa849 | [
"MIT"
] | null | null | null | setup.py | D-Krystek/storybook | b632e0657c74f1163df2777376b2366801aaa849 | [
"MIT"
] | 2 | 2020-09-12T00:13:28.000Z | 2020-09-18T02:24:30.000Z | setup.py | D-Krystek/storybook | b632e0657c74f1163df2777376b2366801aaa849 | [
"MIT"
] | 1 | 2020-10-06T21:38:28.000Z | 2020-10-06T21:38:28.000Z | """
A collaboration in Python.
"""
from os import path
from setuptools import find_packages, setup
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()
setup(
name="storybook",
version="0.0.0",
des... | 25.48 | 73 | 0.703297 |
7956ebd0519151afc62dcf94e95f6580627b163b | 23,920 | py | Python | src/rene.py | logesh0304/Rene | 20769ce41358bfa97356c214aab9bee0c72fd08b | [
"MIT"
] | 1 | 2020-11-04T17:18:19.000Z | 2020-11-04T17:18:19.000Z | src/rene.py | logesh0304/Rene | 20769ce41358bfa97356c214aab9bee0c72fd08b | [
"MIT"
] | null | null | null | src/rene.py | logesh0304/Rene | 20769ce41358bfa97356c214aab9bee0c72fd08b | [
"MIT"
] | null | null | null | # The MIT License
#
# Copyright 2020 Logesh0304.
#
# 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, ... | 42.562278 | 174 | 0.571405 |
7956ec01da3f37774c5a7d2b876352d8ebdc6938 | 541 | py | Python | tweeter.py | asa1896/GameOfLifeBot | 2ae71c466e26d94cd2821c974befc865fc83bb63 | [
"Unlicense",
"MIT"
] | null | null | null | tweeter.py | asa1896/GameOfLifeBot | 2ae71c466e26d94cd2821c974befc865fc83bb63 | [
"Unlicense",
"MIT"
] | null | null | null | tweeter.py | asa1896/GameOfLifeBot | 2ae71c466e26d94cd2821c974befc865fc83bb63 | [
"Unlicense",
"MIT"
] | null | null | null | #Script for tweeting
import tweepy as tp
from os import environ
def Tweeter(img,msg):
consumer_key = environ['API_KEY']
consumer_secret_key = environ['API_SECRET_KEY']
access_token = environ['ACCESS_TOKEN']
access_token_secret = environ['ACCESS_TOKEN_SECRET']
auth = tp.OAuthHandler(consumer_key,c... | 30.055556 | 61 | 0.750462 |
7956ed06f3461e4da7bad25fccc9d4c1cebe7320 | 148 | py | Python | AtCoder/ABC/170-179/ABC177_C1.py | sireline/PyCode | 8578467710c3c1faa89499f5d732507f5d9a584c | [
"MIT"
] | null | null | null | AtCoder/ABC/170-179/ABC177_C1.py | sireline/PyCode | 8578467710c3c1faa89499f5d732507f5d9a584c | [
"MIT"
] | null | null | null | AtCoder/ABC/170-179/ABC177_C1.py | sireline/PyCode | 8578467710c3c1faa89499f5d732507f5d9a584c | [
"MIT"
] | null | null | null | from itertools import combinations
N = int(input())
A = [int(n) for n in input().split()]
print(sum([i*j for i,j in combinations(A, 2)])%(10**9+7)) | 29.6 | 57 | 0.648649 |
7956ee23ba2977cd409c7b196d45bbe59ad18347 | 267 | py | Python | code.py | Meenakshi0907/serversideprocessing | 070b352cdcd06c2f3f40c96e7b781c8b8671ef3d | [
"BSD-3-Clause"
] | null | null | null | code.py | Meenakshi0907/serversideprocessing | 070b352cdcd06c2f3f40c96e7b781c8b8671ef3d | [
"BSD-3-Clause"
] | null | null | null | code.py | Meenakshi0907/serversideprocessing | 070b352cdcd06c2f3f40c96e7b781c8b8671ef3d | [
"BSD-3-Clause"
] | null | null | null | import { Component } from "@angular/core";
@Component({
selector:'student-detail',
templateUrl:'./student.saveetha.in'
})
export class StudentComponent{
registerNumber:string;
name:string;
constructor(){
this.registerNumber="212221230057";
this.name="meenakshi"
}
}
| 17.8 | 42 | 0.7603 |
7956ee31f92cc3751d400bc4b5f077cae918d325 | 4,130 | py | Python | ctm_saas_client/models/role_header.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | ctm_saas_client/models/role_header.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | ctm_saas_client/models/role_header.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
"""
Control-M Services
Provides access to BMC Control-M Services # noqa: E501
OpenAPI spec version: 9.20.30
Contact: customer_support@bmc.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from ctm_saas_cl... | 26.818182 | 87 | 0.562712 |
7956ee5a9ebf488ff8d03d9808a5ea29f67d56b7 | 2,507 | py | Python | Python_ABC/2-8ReadWriteFile/1plainText.py | Chandler-Song/Python_Awesome | a44b8b79de7b429a00ac5798e7ecdc26c79a09ed | [
"MIT"
] | null | null | null | Python_ABC/2-8ReadWriteFile/1plainText.py | Chandler-Song/Python_Awesome | a44b8b79de7b429a00ac5798e7ecdc26c79a09ed | [
"MIT"
] | null | null | null | Python_ABC/2-8ReadWriteFile/1plainText.py | Chandler-Song/Python_Awesome | a44b8b79de7b429a00ac5798e7ecdc26c79a09ed | [
"MIT"
] | null | null | null | # Jeanette = open('Jeanette.txt')
# quote = Jeanette.read()
# print(quote)
# print(Jeanette.closed)
# Jeanette.close()
# print(Jeanette.closed)
#
#
# with open('Jeanette.txt', mode='a+') as Jeanette:
# Jeanette.write("\nFrom Jeanette\n")
# Jeanette.seek(0)
# quote = Jeanette.read()
# print(quote)
# print(Jeanette.... | 24.339806 | 158 | 0.680096 |
7956ee89157f619c8401a8c47b7596ece2482a29 | 7,057 | py | Python | docusign_esign/models/user.py | joekohlsdorf/docusign-esign-python-client | 40407544f79c88716d36fabf36f65c3ef1a5c3ba | [
"MIT"
] | 58 | 2017-10-18T23:06:57.000Z | 2021-04-15T23:14:58.000Z | docusign_esign/models/user.py | joekohlsdorf/docusign-esign-python-client | 40407544f79c88716d36fabf36f65c3ef1a5c3ba | [
"MIT"
] | 49 | 2017-10-27T05:54:09.000Z | 2021-04-29T22:06:17.000Z | docusign_esign/models/user.py | joekohlsdorf/docusign-esign-python-client | 40407544f79c88716d36fabf36f65c3ef1a5c3ba | [
"MIT"
] | 49 | 2017-09-16T07:23:41.000Z | 2021-05-07T20:21:20.000Z | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | 27.352713 | 151 | 0.578433 |
7956ef4d3fdd8361a6c5fcd394edd39f37127914 | 4,176 | py | Python | asyncdynamo/async_aws_sts.py | homm/asyncdynamo | 6c1097e727fdc3e87bc0429fae1e1e5547b2eb4a | [
"Apache-2.0"
] | null | null | null | asyncdynamo/async_aws_sts.py | homm/asyncdynamo | 6c1097e727fdc3e87bc0429fae1e1e5547b2eb4a | [
"Apache-2.0"
] | 2 | 2019-04-20T15:43:28.000Z | 2019-04-30T06:59:10.000Z | asyncdynamo/async_aws_sts.py | homm/asyncdynamo | 6c1097e727fdc3e87bc0429fae1e1e5547b2eb4a | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
#
# Copyright 2012 bit.ly
#
# 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 ... | 37.963636 | 94 | 0.643439 |
7956ef4dcf65af8fcd2479b2bedf0e00e362ebb0 | 3,388 | py | Python | Lib/hTools2/dialogs/glyphs/anchors_rename.py | gferreira/hTools2 | a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c | [
"BSD-3-Clause"
] | 11 | 2015-01-06T15:43:56.000Z | 2019-07-27T00:35:20.000Z | Lib/hTools2/dialogs/glyphs/anchors_rename.py | gferreira/hTools2 | a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c | [
"BSD-3-Clause"
] | 2 | 2017-05-17T10:11:46.000Z | 2018-11-21T21:43:43.000Z | Lib/hTools2/dialogs/glyphs/anchors_rename.py | gferreira/hTools2 | a75a671b81a0f4ce5c82b2ad3e2f971ca3e3d98c | [
"BSD-3-Clause"
] | 4 | 2015-01-10T13:58:50.000Z | 2019-12-18T15:40:14.000Z | # [h] rename anchors in selected glyphs
from mojo.roboFont import CurrentFont
from vanilla import *
from hTools2 import hDialog
from hTools2.modules.anchors import rename_anchor
from hTools2.modules.fontutils import get_glyphs
from hTools2.modules.messages import no_glyph_selected, no_font_open
class renameAnchorsDia... | 34.927835 | 81 | 0.519185 |
7956f08474fa1dcf8e2b3050c7c0c18be8fbf740 | 818 | py | Python | src/python/pants/backend/jvm/targets/annotation_processor.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | 1 | 2020-08-26T03:30:31.000Z | 2020-08-26T03:30:31.000Z | src/python/pants/backend/jvm/targets/annotation_processor.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | 1 | 2019-07-29T16:58:21.000Z | 2019-07-29T16:58:21.000Z | src/python/pants/backend/jvm/targets/annotation_processor.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.jvm.targets.exportable_jvm_library import ExportableJvmLibrary
class AnnotationProcessor(ExportableJvmLibrary):
"""A Java library containing annotation processors.
... | 34.083333 | 81 | 0.732274 |
7956f0ea374f8634bc17292482a7e17b88402d21 | 2,814 | py | Python | service-mgmt-tools/sm-tools/sm_tools/sm_action.py | starlingx-staging/stx-ha | 77d4e0c27c2144e192bb1cfc3fbc40509526cc39 | [
"Apache-2.0"
] | null | null | null | service-mgmt-tools/sm-tools/sm_tools/sm_action.py | starlingx-staging/stx-ha | 77d4e0c27c2144e192bb1cfc3fbc40509526cc39 | [
"Apache-2.0"
] | null | null | null | service-mgmt-tools/sm-tools/sm_tools/sm_action.py | starlingx-staging/stx-ha | 77d4e0c27c2144e192bb1cfc3fbc40509526cc39 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import os
import sys
import argparse
import sqlite3
from sm_api_msg_utils import restart_service as restart_service
from sm_api_msg_utils import restart_service_safe as restart_service_safe
from sm_api_msg_utils import database_r... | 31.617978 | 80 | 0.598792 |
7956f240b6125c7e493e9505da5a96427d2a8a36 | 8,291 | py | Python | sktime/transformers/dictionary_based/SAX.py | ashishpatel26/sktime | 24a79695f63bec1f6abf9f517d4e6dc792c306e7 | [
"BSD-3-Clause"
] | 1 | 2020-07-16T08:36:50.000Z | 2020-07-16T08:36:50.000Z | sktime/transformers/dictionary_based/SAX.py | ClaudiaSanches/sktime | 63e7839e80ca6d5fe5fc4f33389ec3bcacd8aa59 | [
"BSD-3-Clause"
] | null | null | null | sktime/transformers/dictionary_based/SAX.py | ClaudiaSanches/sktime | 63e7839e80ca6d5fe5fc4f33389ec3bcacd8aa59 | [
"BSD-3-Clause"
] | 1 | 2020-10-08T20:55:55.000Z | 2020-10-08T20:55:55.000Z | import sys
import numpy as np
import pandas as pd
import sktime.transformers.shapelets as shapelets
from sktime.transformers.dictionary_based.PAA import PAA
from sktime.utils.load_data import load_from_tsfile_to_dataframe as load_ts
from sktime.transformers.base import BaseTransformer
# TO DO: verify this returned ... | 37.179372 | 181 | 0.603908 |
7956f2ede37ba77f86d5d95e1f98a47d11197074 | 5,624 | py | Python | source/conf.py | timothijoe/DI-engine-docs | e8607933e0e7ea0056aa9c95ac27bd731333310e | [
"Apache-2.0"
] | null | null | null | source/conf.py | timothijoe/DI-engine-docs | e8607933e0e7ea0056aa9c95ac27bd731333310e | [
"Apache-2.0"
] | null | null | null | source/conf.py | timothijoe/DI-engine-docs | e8607933e0e7ea0056aa9c95ac27bd731333310e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 31.418994 | 116 | 0.651316 |
7956f3309d2c3fc2df50d945a4a6f2f6471545f2 | 7,879 | py | Python | doc/source/conf.py | openstack/blazar-specs | 9794657234f7d46c7d3d826b92bc37ee54a2af97 | [
"Apache-2.0"
] | 2 | 2018-10-25T08:38:11.000Z | 2019-01-28T21:52:46.000Z | doc/source/conf.py | openstack/blazar-specs | 9794657234f7d46c7d3d826b92bc37ee54a2af97 | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | openstack/blazar-specs | 9794657234f7d46c7d3d826b92bc37ee54a2af97 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 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 agreed to in writ... | 32.692946 | 80 | 0.707069 |
7956f39a1144f36eacb2ef46c210d42c6a484359 | 440 | py | Python | tracpro/polls/migrations/0005_auto_20150127_1329.py | rapidpro/tracpro | a68a782a7ff9bb0ccee85368132d8847c280fea3 | [
"BSD-3-Clause"
] | 5 | 2015-07-21T15:58:31.000Z | 2019-09-14T22:34:00.000Z | tracpro/polls/migrations/0005_auto_20150127_1329.py | rapidpro/tracpro | a68a782a7ff9bb0ccee85368132d8847c280fea3 | [
"BSD-3-Clause"
] | 197 | 2015-03-24T15:26:04.000Z | 2017-11-28T19:24:37.000Z | tracpro/polls/migrations/0005_auto_20150127_1329.py | rapidpro/tracpro | a68a782a7ff9bb0ccee85368132d8847c280fea3 | [
"BSD-3-Clause"
] | 10 | 2015-03-24T12:26:36.000Z | 2017-02-21T13:08:57.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('polls', '0004_auto_20150126_1417'),
]
operations = [
migrations.AlterField(
model_name='issue',
name... | 20.952381 | 49 | 0.604545 |
7956f69d564be5ce306f9cf1850011acba49142d | 130 | py | Python | comment/urls.py | AutonomousCrazyshaking/music | 0180c0ae382860f1840fcdb31355df240321dfa3 | [
"MIT"
] | null | null | null | comment/urls.py | AutonomousCrazyshaking/music | 0180c0ae382860f1840fcdb31355df240321dfa3 | [
"MIT"
] | null | null | null | comment/urls.py | AutonomousCrazyshaking/music | 0180c0ae382860f1840fcdb31355df240321dfa3 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import *
urlpatterns = [
path('<int:id>.html', commentView, name='comment')
] | 18.571429 | 55 | 0.653846 |
7956f81d3a6aa57a33f59feaa5ed78620192b584 | 24 | py | Python | netplotz/__init__.py | bmswens/netplotz | f3e533ef6f66cf721462243155a325c20e78d1fa | [
"MIT"
] | null | null | null | netplotz/__init__.py | bmswens/netplotz | f3e533ef6f66cf721462243155a325c20e78d1fa | [
"MIT"
] | null | null | null | netplotz/__init__.py | bmswens/netplotz | f3e533ef6f66cf721462243155a325c20e78d1fa | [
"MIT"
] | null | null | null | from .netplotz import *
| 12 | 23 | 0.75 |
7956f832ed8df2f0fc787a3abc631e1d4cfc50cd | 2,317 | py | Python | examples/bspump-lookup.py | thatch/BitSwanPump | 98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f | [
"BSD-3-Clause"
] | 1 | 2020-08-20T12:56:58.000Z | 2020-08-20T12:56:58.000Z | examples/bspump-lookup.py | thatch/BitSwanPump | 98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f | [
"BSD-3-Clause"
] | null | null | null | examples/bspump-lookup.py | thatch/BitSwanPump | 98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import logging
import bspump
import bspump.common
import bspump.file
import bspump.trigger
###
L = logging.getLogger(__name__)
###
class SamplePipeline(bspump.Pipeline):
def __init__(self, app, pipeline_id):
super().__init__(app, pipeline_id)
svc = app.get_service("bspump.PumpService... | 24.648936 | 82 | 0.724644 |
7956f83728d1fbf29a7cc6b06d500a2506f16918 | 373 | py | Python | source_code/2-1-beautifulsoup-basic.py | VickyMin1994/easy-scraping-tutorial | 75b7ffc79da397afa95342022c29cd72520f155f | [
"MIT"
] | 708 | 2017-12-29T05:32:34.000Z | 2022-03-25T14:29:05.000Z | source_code/2-1-beautifulsoup-basic.py | VickyMin1994/easy-scraping-tutorial | 75b7ffc79da397afa95342022c29cd72520f155f | [
"MIT"
] | 6 | 2018-01-06T07:58:31.000Z | 2020-10-26T15:57:46.000Z | source_code/2-1-beautifulsoup-basic.py | VickyMin1994/easy-scraping-tutorial | 75b7ffc79da397afa95342022c29cd72520f155f | [
"MIT"
] | 609 | 2017-12-29T10:04:20.000Z | 2022-03-23T18:32:37.000Z | from bs4 import BeautifulSoup
from urllib.request import urlopen
# if has Chinese, apply decode()
html = urlopen("https://mofanpy.com/static/scraping/basic-structure.html").read().decode('utf-8')
soup = BeautifulSoup(html, features='lxml')
print(soup.h1)
print('\n', soup.p)
all_href = soup.find_all('a')
all_href = [... | 23.3125 | 97 | 0.718499 |
7956f8d538372cef43087e9d3f1eb30551514f50 | 8,195 | py | Python | docs/conf.py | PetrDlouhy/django-like-lookup | 78767e66c270f55b6ee59f7bbf3b94af3a5251e0 | [
"MIT"
] | 2 | 2020-01-30T07:47:29.000Z | 2021-05-30T11:42:23.000Z | docs/conf.py | PetrDlouhy/django-like-lookup | 78767e66c270f55b6ee59f7bbf3b94af3a5251e0 | [
"MIT"
] | null | null | null | docs/conf.py | PetrDlouhy/django-like-lookup | 78767e66c270f55b6ee59f7bbf3b94af3a5251e0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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.
#
# ... | 32.137255 | 80 | 0.718243 |
7956fa9d149cd0cbacdf01d283e213282ea63faf | 4,048 | py | Python | papers/pretty.py | RCHG/papers | e12f4917fbcedb37c3765c81b600578e7ea1f53f | [
"MIT"
] | null | null | null | papers/pretty.py | RCHG/papers | e12f4917fbcedb37c3765c81b600578e7ea1f53f | [
"MIT"
] | null | null | null | papers/pretty.py | RCHG/papers | e12f4917fbcedb37c3765c81b600578e7ea1f53f | [
"MIT"
] | null | null | null | import papers.boxea as boxea
import csv
import pickle
# import pandas as pd
class bcol:
# https://stackoverflow.com/a/287944/2192272
HEAD = '\033[95m'
BLUE = '\033[94m'
GREEN = '\033[92m'
WARN = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
ULINE... | 34.016807 | 93 | 0.599308 |
7956fcb49b5800f29c9dffeb44cc407ce0cb5971 | 2,172 | py | Python | tests/contrib/sqlalchemy/test_mysql.py | SzySteve/dd-trace-py | 90d1d5981c72ea312c21ac04e5be47521d0f0f2e | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contrib/sqlalchemy/test_mysql.py | SzySteve/dd-trace-py | 90d1d5981c72ea312c21ac04e5be47521d0f0f2e | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-12-22T16:56:55.000Z | 2020-12-22T16:56:55.000Z | tests/contrib/sqlalchemy/test_mysql.py | kenferrara/dd-trace-py | 12e52e0ab804061e72b0f76214f5e4bb475ae20f | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-12-22T16:54:02.000Z | 2020-12-22T16:54:02.000Z | from sqlalchemy.exc import ProgrammingError
import pytest
from .mixins import SQLAlchemyTestMixin
from ..config import MYSQL_CONFIG
from ... import TracerTestCase, assert_is_measured
class MysqlConnectorTestCase(SQLAlchemyTestMixin, TracerTestCase):
"""TestCase for mysql-connector engine"""
VENDOR = 'mysql'
... | 40.981132 | 119 | 0.674954 |
7956fcfa6d566bc3d7c32d33f331a4c040855668 | 2,010 | py | Python | main.py | karipov/gpa-calculator | fd7995e35124f0b128085a360176a31ca123621e | [
"MIT"
] | null | null | null | main.py | karipov/gpa-calculator | fd7995e35124f0b128085a360176a31ca123621e | [
"MIT"
] | null | null | null | main.py | karipov/gpa-calculator | fd7995e35124f0b128085a360176a31ca123621e | [
"MIT"
] | null | null | null | import telebot
import config
import values
import dbhandler
from textparser import check_entry, parse_entry
bot = telebot.TeleBot(config.KEY)
def calculate_gpa(subject_list):
grade_list = [x[1] for x in subject_list] # no need for subject names
total_gpa = 0 # a counter
for grade in grade_list:
t... | 30 | 77 | 0.694527 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.