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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a01f354a894c03ca4bd63c92ec784123f40b42e | 1,281 | py | Python | setup.py | a115/python-dating | cb02fc54ea505fe3dcf34c0c055b55c328b5daf0 | [
"MIT"
] | 1 | 2017-09-28T16:40:39.000Z | 2017-09-28T16:40:39.000Z | setup.py | a115/python-dating | cb02fc54ea505fe3dcf34c0c055b55c328b5daf0 | [
"MIT"
] | null | null | null | setup.py | a115/python-dating | cb02fc54ea505fe3dcf34c0c055b55c328b5daf0 | [
"MIT"
] | null | null | null | import os
from codecs import open
from setuptools import setup, find_packages
from dating import VERSION
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
try:
import pypandoc
long_description = pypandoc.conve... | 30.5 | 111 | 0.608119 |
4a01f37932d67ce7ea8f260f5cfc3df3c94a6f4c | 426 | py | Python | greenhouse/web/models.py | wnzlff/greenhouse-web | b26f4c9c7c360ab1cdcb2df0b9185f31530c0215 | [
"MIT"
] | 1 | 2021-06-28T13:26:34.000Z | 2021-06-28T13:26:34.000Z | greenhouse/web/models.py | wnzlff/greenhouse-web | b26f4c9c7c360ab1cdcb2df0b9185f31530c0215 | [
"MIT"
] | null | null | null | greenhouse/web/models.py | wnzlff/greenhouse-web | b26f4c9c7c360ab1cdcb2df0b9185f31530c0215 | [
"MIT"
] | null | null | null | from django.db import models
class GreenhouseData(models.Model):
value_id = models.AutoField(primary_key=True)
timestamp = models.DateTimeField(auto_now_add=True)
light_sufficient = models.BooleanField()
ventilator_on = models.BooleanField()
humidity_inside = models.IntegerField()
temperature_inside = mode... | 38.727273 | 53 | 0.800469 |
4a01f39782e8e171482cbc4a49866c76b2346c36 | 1,660 | py | Python | setup.py | geppi/pandaSDMX | 33ec2704af0da5b9d1564046cd4d9707060c9bf9 | [
"Apache-2.0"
] | null | null | null | setup.py | geppi/pandaSDMX | 33ec2704af0da5b9d1564046cd4d9707060c9bf9 | [
"Apache-2.0"
] | null | null | null | setup.py | geppi/pandaSDMX | 33ec2704af0da5b9d1564046cd4d9707060c9bf9 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages, setup
INSTALL_REQUIRES = [
'lxml>=3.6',
'pandas>=0.20',
'pydantic>=1.1',
'requests>=2.7',
'setuptools>19',
]
TESTS_REQUIRE = [
'pytest>=3.3',
'pytest-remotedata>=0.3.1',
'requests-mock>=1.4',
]
EXTRAS_REQUIRE = {
'cache': ['requests_cache'],
... | 30.740741 | 79 | 0.611446 |
4a01f5321b3800443e59f24c6e15d2c02819c77e | 1,472 | py | Python | net_encoder_decoder2D_plus.py | MuAuan/llightning-pytorch | 38dc9ed75dd8e6f4a2a05e5a10072a549dcbf4d6 | [
"MIT"
] | null | null | null | net_encoder_decoder2D_plus.py | MuAuan/llightning-pytorch | 38dc9ed75dd8e6f4a2a05e5a10072a549dcbf4d6 | [
"MIT"
] | null | null | null | net_encoder_decoder2D_plus.py | MuAuan/llightning-pytorch | 38dc9ed75dd8e6f4a2a05e5a10072a549dcbf4d6 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
class Encoder(nn.Module):
def __init__(self):
super(Encoder, self).__init__()
self.encoder = nn.Sequential(
nn.Conv2d(in_channels = 3, out_channels = 64,
kernel_size = 3, padding = 1),
nn.Re... | 35.047619 | 90 | 0.505435 |
4a01f534677b240bd0d9dc1fc6bc7ee1485aea9d | 21,772 | py | Python | zerver/worker/queue_processors.py | mahimg/zulip | 73a5c392640c5c1f96f9c94f5f271d8e4d9251ad | [
"Apache-2.0"
] | null | null | null | zerver/worker/queue_processors.py | mahimg/zulip | 73a5c392640c5c1f96f9c94f5f271d8e4d9251ad | [
"Apache-2.0"
] | null | null | null | zerver/worker/queue_processors.py | mahimg/zulip | 73a5c392640c5c1f96f9c94f5f271d8e4d9251ad | [
"Apache-2.0"
] | null | null | null | # Documented in https://zulip.readthedocs.io/en/latest/subsystems/queuing.html
from typing import Any, Callable, Dict, List, Mapping, Optional, cast
import signal
import sys
import os
from functools import wraps
import smtplib
import socket
from django.conf import settings
from django.db import connection
from djang... | 40.619403 | 110 | 0.661446 |
4a01f55ab0dbfdc34ed53ff0076d467845459af1 | 1,421 | py | Python | collector/gather.py | sweeneyngo/swvgio | 56a3f8413a253e08703eb11857aadac88f98ff87 | [
"MIT"
] | null | null | null | collector/gather.py | sweeneyngo/swvgio | 56a3f8413a253e08703eb11857aadac88f98ff87 | [
"MIT"
] | 2 | 2021-07-21T14:33:00.000Z | 2021-07-21T14:34:55.000Z | collector/gather.py | sweeneyngo/swvgio | 56a3f8413a253e08703eb11857aadac88f98ff87 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup, SoupStrainer
import httplib2
class Voca:
def __init__(self, link, title, artist):
self.link = link
self.title = title
self.artist = artist
"""
@return [
[Voca(link, title, artist), ... ],
[Voca(link, title, artist), ... ],
... | 23.683333 | 117 | 0.570725 |
4a01f6764f9afca4758d07b862e9e02509dfe70e | 9,183 | py | Python | sdk/python/pulumi_aws/codestarnotifications/notification_rule.py | michael-golden/pulumi-aws | 165e876e166ecab1870e857822247585d78aef64 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/codestarnotifications/notification_rule.py | michael-golden/pulumi-aws | 165e876e166ecab1870e857822247585d78aef64 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/codestarnotifications/notification_rule.py | michael-golden/pulumi-aws | 165e876e166ecab1870e857822247585d78aef64 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class NotificationRule(... | 51.016667 | 202 | 0.663182 |
4a01f7842476d7c7862fe908d9e333dc4bd726a3 | 2,214 | py | Python | setup.py | MadisonB14/geometry_analysis | 69ce485c5c0ecdfd3202aa8a0290bc2fdc43f743 | [
"BSD-3-Clause"
] | null | null | null | setup.py | MadisonB14/geometry_analysis | 69ce485c5c0ecdfd3202aa8a0290bc2fdc43f743 | [
"BSD-3-Clause"
] | null | null | null | setup.py | MadisonB14/geometry_analysis | 69ce485c5c0ecdfd3202aa8a0290bc2fdc43f743 | [
"BSD-3-Clause"
] | null | null | null | """
geometry_analysis
A python package for the MolSSSI Software Summer School.
"""
import sys
from setuptools import setup, find_packages
import versioneer
short_description = __doc__.split("\n")
# from https://github.com/pytest-dev/pytest-runner#conditional-requirement
needs_pytest = {'pytest', 'test', 'ptr'}.inters... | 36.9 | 118 | 0.703704 |
4a01f7e7fa311e0a5a52aa8c79e3859f7bb2f8da | 58,406 | py | Python | python/paddle/tensor/manipulation.py | Qengineering/Paddle | 6453ff055555e17c23727599663092c8a835ce9d | [
"Apache-2.0"
] | null | null | null | python/paddle/tensor/manipulation.py | Qengineering/Paddle | 6453ff055555e17c23727599663092c8a835ce9d | [
"Apache-2.0"
] | null | null | null | python/paddle/tensor/manipulation.py | Qengineering/Paddle | 6453ff055555e17c23727599663092c8a835ce9d | [
"Apache-2.0"
] | 1 | 2021-03-23T00:59:48.000Z | 2021-03-23T00:59:48.000Z | # Copyright (c) 2020 PaddlePaddle 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 app... | 37.901363 | 457 | 0.555131 |
4a01fa3d7a99cec1fb19a8d40c599f7782f1cbd5 | 2,825 | py | Python | pycessing/sketch_runner.py | kitao/pycessing | ab59dfbef7f52712e894f5b4d869c27f68bf3685 | [
"MIT"
] | null | null | null | pycessing/sketch_runner.py | kitao/pycessing | ab59dfbef7f52712e894f5b4d869c27f68bf3685 | [
"MIT"
] | null | null | null | pycessing/sketch_runner.py | kitao/pycessing | ab59dfbef7f52712e894f5b4d869c27f68bf3685 | [
"MIT"
] | null | null | null | import os
import sys
import settings
import sketch_info
import state_control
import watch_update
import gui
def load_library(name):
lib_dir = os.path.join(settings.COMMAND_LIB, name, 'library')
if load_all_jars(lib_dir):
return True
else:
print 'library not found -- {0}'.format(name)
return False... | 20.323741 | 73 | 0.67115 |
4a01faf0e4ed99a5babd3234ae5e12c9f77fbd5f | 1,757 | py | Python | Principal Components Analysis.py | harindi-git1994/PCA | 242ef2396198bbcd62c2f835d250878c732add33 | [
"MIT"
] | null | null | null | Principal Components Analysis.py | harindi-git1994/PCA | 242ef2396198bbcd62c2f835d250878c732add33 | [
"MIT"
] | null | null | null | Principal Components Analysis.py | harindi-git1994/PCA | 242ef2396198bbcd62c2f835d250878c732add33 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # PCA (Principal Components Analysis)
# ## wine.cvs
# In[16]:
#importing necessary libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import sklearn.decomposition as sk
from sklearn.decomposition import PCA
from sklearn.preprocessing import scale... | 10.845679 | 106 | 0.688674 |
4a01fb27b376230cc60a0ac29406f39855992469 | 6,459 | py | Python | docusign_esign/models/workspace_list.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | docusign_esign/models/workspace_list.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | docusign_esign/models/workspace_list.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | # 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.
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from p... | 29.493151 | 179 | 0.598699 |
4a01fb375bf0ce681ec450424a4efcc991d75fa8 | 4,974 | py | Python | tests/codebase/test_code_quality.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 12 | 2020-07-20T14:58:31.000Z | 2021-09-04T22:15:14.000Z | tests/codebase/test_code_quality.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 1 | 2020-09-05T02:46:20.000Z | 2020-09-05T02:46:20.000Z | tests/codebase/test_code_quality.py | kevin1kevin1k/bokeh | 9f34b5b710e2748ec803c12918ec1706098a3477 | [
"BSD-3-Clause"
] | 3 | 2019-03-27T23:27:05.000Z | 2020-08-05T19:03:19.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 36.306569 | 112 | 0.528749 |
4a01fb3ffc17fb03a61e383d701cf3ffe896d716 | 537 | py | Python | curso em video/python/mundo 2/ex 061.py | KenzoDezotti/cursoemvideo | 6eba03e67192f7384092192ed2cc1a8e59efd9b9 | [
"MIT"
] | null | null | null | curso em video/python/mundo 2/ex 061.py | KenzoDezotti/cursoemvideo | 6eba03e67192f7384092192ed2cc1a8e59efd9b9 | [
"MIT"
] | null | null | null | curso em video/python/mundo 2/ex 061.py | KenzoDezotti/cursoemvideo | 6eba03e67192f7384092192ed2cc1a8e59efd9b9 | [
"MIT"
] | null | null | null | # z=int(input('digite um ponto de inico para a P.A. : '))
x = int(input('digite a razão: '))
# for c in range(0,10):
# print(z, end=', ')
# z = z + x
# print(z)
w = 10
cont = 0
num1 = int(input('digite um ponto de inico para a P.A. : '))
print('os primeiros numeros da P.A. são: {}'.format(num1), end='-')
while w ... | 28.263158 | 67 | 0.562384 |
4a01fb5cb082f1800253c25517b9ac43808ffc09 | 29,237 | py | Python | IRIS_data_download/IRIS_download_support/obspy/core/inventory/util.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 2 | 2020-03-05T01:03:01.000Z | 2020-12-17T05:04:07.000Z | IRIS_data_download/IRIS_download_support/obspy/core/inventory/util.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 4 | 2021-03-31T19:25:55.000Z | 2021-12-13T20:32:46.000Z | IRIS_data_download/IRIS_download_support/obspy/core/inventory/util.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 2 | 2020-09-08T19:33:40.000Z | 2021-04-05T09:47:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Utility objects.
:copyright:
Lion Krischer (krischer@geophysik.uni-muenchen.de), 2013
:license:
GNU Lesser General Public License, Version 3
(https://www.gnu.org/copyleft/lesser.html)
"""
from __future__ import (absolute_import, division, print_function,
... | 33.8 | 79 | 0.625543 |
4a01fc65bf751adb385ee27f14149ec365da06af | 1,911 | py | Python | thecut/googleanalytics/migrations/0001_initial.py | thecut/thecut-googleanalytics | 8d0a9869829f15d5a630ed85e5d9a7ea9d4825fc | [
"Apache-2.0"
] | 1 | 2019-08-13T21:05:10.000Z | 2019-08-13T21:05:10.000Z | thecut/googleanalytics/migrations/0001_initial.py | thecut/thecut-googleanalytics | 8d0a9869829f15d5a630ed85e5d9a7ea9d4825fc | [
"Apache-2.0"
] | null | null | null | thecut/googleanalytics/migrations/0001_initial.py | thecut/thecut-googleanalytics | 8d0a9869829f15d5a630ed85e5d9a7ea9d4825fc | [
"Apache-2.0"
] | 2 | 2017-05-18T04:44:22.000Z | 2020-02-27T01:57:41.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import oauth2client.django_orm
class Migration(migrations.Migration):
dependencies = [
('sites', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Profile',... | 44.44186 | 229 | 0.618524 |
4a01fca0feb53ef5e987108efa7387678f3a176a | 109 | py | Python | esmvalcore/cmor/_fixes/cmip6/e3sm_1_0.py | markelg/ESMValCore | b2f7ffc3232f174dd5ebc50ad20b4a02d3517c2c | [
"Apache-2.0"
] | 26 | 2019-06-07T07:50:07.000Z | 2022-03-22T21:04:01.000Z | esmvalcore/cmor/_fixes/cmip6/e3sm_1_0.py | markelg/ESMValCore | b2f7ffc3232f174dd5ebc50ad20b4a02d3517c2c | [
"Apache-2.0"
] | 1,370 | 2019-06-06T09:03:07.000Z | 2022-03-31T04:37:20.000Z | esmvalcore/cmor/_fixes/cmip6/e3sm_1_0.py | zklaus/ESMValCore | 5656fb8b546eeb4d750a424de7ed56a237edfabb | [
"Apache-2.0"
] | 26 | 2019-07-03T13:08:48.000Z | 2022-03-02T16:08:47.000Z | """Fixes for E3SM-1-0 model."""
from ..common import ClFixHybridPressureCoord
Cl = ClFixHybridPressureCoord
| 21.8 | 45 | 0.779817 |
4a01fd0409d8b31b2d0e58c3a2de7cae61dccf7d | 2,568 | py | Python | research/compression/entropy_coder/dataset/gen_synthetic_dataset.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | 1 | 2019-09-11T09:41:11.000Z | 2019-09-11T09:41:11.000Z | research/compression/entropy_coder/dataset/gen_synthetic_dataset.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | research/compression/entropy_coder/dataset/gen_synthetic_dataset.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | # 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 ... | 28.533333 | 81 | 0.6581 |
4a01fd75de6859fd55b889286e85c9cba6b867ae | 521 | py | Python | pp/routing/test_route_south.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | 8 | 2020-08-25T11:25:18.000Z | 2022-03-27T11:32:11.000Z | pp/routing/test_route_south.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | null | null | null | pp/routing/test_route_south.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | 1 | 2022-03-04T07:03:29.000Z | 2022-03-04T07:03:29.000Z | import numpy as np
import pp
@pp.cell
def test_route_south():
c = pp.Component()
cr = c << pp.c.mmi2x2()
routes, ports = pp.routing.route_south(cr)
l1 = 17.207963267948966
l2 = 22.35796326794896
lengths = [l1, l2, l1, l2]
for r, length in zip(routes, lengths):
print(r.parent.leng... | 19.296296 | 50 | 0.621881 |
4a01fdea04e27e0a1adde9138ac9925bec28d6d6 | 950 | py | Python | function/handler.py | saidsef/tika-document-to-text | 3e1d71ccb2a67c62429d91cfe09f36fe23936caf | [
"MIT"
] | null | null | null | function/handler.py | saidsef/tika-document-to-text | 3e1d71ccb2a67c62429d91cfe09f36fe23936caf | [
"MIT"
] | 10 | 2022-01-14T12:07:27.000Z | 2022-03-01T15:36:56.000Z | function/handler.py | saidsef/tika-document-to-text | 3e1d71ccb2a67c62429d91cfe09f36fe23936caf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import logging
from os import environ
from json import loads
from subprocess import Popen, PIPE
logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
def byte2json(b):
doc = loads(b.decode("utf-8").replace("'", '"'))
if doc[0]["X-TIKA:content"]:
return doc[0]["X... | 24.358974 | 73 | 0.569474 |
4a01fdeeb926bfea9e93e0a1d6ef9862c346619f | 1,602 | py | Python | medium/86-partition-list.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | 2 | 2021-03-14T11:38:26.000Z | 2021-03-14T11:38:30.000Z | medium/86-partition-list.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | null | null | null | medium/86-partition-list.py | wanglongjiang/leetcode | c61d2e719e81575cfb5bde9d64e15cee7cf01ef3 | [
"MIT"
] | 1 | 2022-01-17T19:33:23.000Z | 2022-01-17T19:33:23.000Z | '''
分隔链表
给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。
你应当 保留 两个分区中每个节点的初始相对位置。
'''
from typing import List
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
'''
思路:从头搜索,所有找到的小于x的节点,都从原链表删除,加入链表lessLi。
遍历一次之后,所有小于x的节点都按照原顺序处于lessLi中... | 22.56338 | 68 | 0.54432 |
4a01fe9133d324ce02652d84e899ca1f2953cf4a | 4,258 | py | Python | chroma_core/services/lustre_audit/update_scan.py | intel-hpdd/-intel-manager-for-lustre | f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6 | [
"MIT"
] | 52 | 2018-09-13T03:26:23.000Z | 2022-03-25T16:51:37.000Z | chroma_core/services/lustre_audit/update_scan.py | intel-hpdd/-intel-manager-for-lustre | f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6 | [
"MIT"
] | 1,264 | 2018-06-15T19:50:57.000Z | 2022-03-28T08:19:04.000Z | chroma_core/services/lustre_audit/update_scan.py | whamcloud/intel-manager-for-lustre | f8a6f61205b42cc62f4bbcb8d81214ad4f215cd6 | [
"MIT"
] | 27 | 2018-06-18T08:51:59.000Z | 2022-03-16T15:35:34.000Z | #!/usr/bin/env python
# Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
from itertools import chain
from chroma_core.services import log_register
from chroma_core.models.host import ManagedHost
from chroma_core.services... | 37.681416 | 114 | 0.62635 |
4a01fef7ca6d7a770a883652bd2f5f384268c736 | 2,906 | py | Python | test/functional/mempool_resurrect.py | cicxcoin/cicoin | b48b11574ae38ae063670a755b9d50ef6960e1e8 | [
"MIT"
] | 3 | 2020-06-19T11:21:43.000Z | 2021-02-16T16:29:13.000Z | test/functional/mempool_resurrect.py | Madurajaya/cicoin | b48b11574ae38ae063670a755b9d50ef6960e1e8 | [
"MIT"
] | 1 | 2020-04-29T20:15:13.000Z | 2020-04-29T20:15:13.000Z | test/functional/mempool_resurrect.py | Madurajaya/cicoin | b48b11574ae38ae063670a755b9d50ef6960e1e8 | [
"MIT"
] | 4 | 2020-01-25T06:31:23.000Z | 2022-02-28T05:36:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Cicoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test resurrection of mined transactions when the blockchain is re-organized."""
from test_framework.blo... | 40.929577 | 123 | 0.674123 |
4a0200a9822e8b4649bb305ce78cf281e6d3a6c9 | 17,492 | py | Python | services/core/DNP3Agent/dnp3/mesa/agent.py | gnmerritt/volttron | ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3 | [
"Apache-2.0"
] | 406 | 2015-01-20T03:08:53.000Z | 2022-03-31T20:59:07.000Z | services/core/DNP3Agent/dnp3/mesa/agent.py | gnmerritt/volttron | ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3 | [
"Apache-2.0"
] | 2,031 | 2015-01-05T21:35:45.000Z | 2022-03-29T21:44:36.000Z | services/core/DNP3Agent/dnp3/mesa/agent.py | gnmerritt/volttron | ebfbf62bab77d46fd3e8d6aaca1fc4f33932ccf3 | [
"Apache-2.0"
] | 219 | 2015-01-20T14:53:57.000Z | 2022-03-06T00:37:41.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2018, 8minutenergy / Kisensum.
#
# 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.apa... | 49.412429 | 119 | 0.641665 |
4a0202127b085e8bb7120c42fe19074e81ce9949 | 2,936 | py | Python | uniflocpy/uMultiphaseFlow/friction_Bratland.py | Shabonasar/unifloc | 1f12d6b4110a9ff0e10817560ad99d55c9133954 | [
"MIT"
] | null | null | null | uniflocpy/uMultiphaseFlow/friction_Bratland.py | Shabonasar/unifloc | 1f12d6b4110a9ff0e10817560ad99d55c9133954 | [
"MIT"
] | null | null | null | uniflocpy/uMultiphaseFlow/friction_Bratland.py | Shabonasar/unifloc | 1f12d6b4110a9ff0e10817560ad99d55c9133954 | [
"MIT"
] | null | null | null | """
Модуль для рассчета коэффициента трения
по данным книги:
Bratland O. Pipe flow 1: single-phase flow assurance
//Fonte: http://www.drbratland.com/download-two-free-books-on-flow-assurance. – 2009.
"""
import scipy.optimize as sp # модуль для решения уравения
import math
class Friction():
"""
Модуль-класс ... | 38.631579 | 112 | 0.633174 |
4a02022d31dc93408706999271615cde7b5255e8 | 6,518 | py | Python | h2o-py/h2o/estimators/gbm.py | Bhanuprakash-ch/h2o-3 | c75bc5d2dc644cc8c09df755185a4cc6e34e0d1a | [
"Apache-2.0"
] | null | null | null | h2o-py/h2o/estimators/gbm.py | Bhanuprakash-ch/h2o-3 | c75bc5d2dc644cc8c09df755185a4cc6e34e0d1a | [
"Apache-2.0"
] | null | null | null | h2o-py/h2o/estimators/gbm.py | Bhanuprakash-ch/h2o-3 | c75bc5d2dc644cc8c09df755185a4cc6e34e0d1a | [
"Apache-2.0"
] | 1 | 2020-01-22T19:10:37.000Z | 2020-01-22T19:10:37.000Z | from .estimator_base import *
class H2OGradientBoostingEstimator(H2OEstimator):
"""
Builds gradient boosted classification trees, and gradient boosted regression trees on
a parsed data set. The default distribution function will guess the model type based on
the response column type run properly the response ... | 29.762557 | 90 | 0.722001 |
4a0202dd624cac1885a6578b14d9ed0e64291f49 | 30,957 | py | Python | tests/test_vlan.py | akokhan/sonic-swss | c7d8c2b77171b0dcbbb962306697601d0c2b73fa | [
"Apache-2.0"
] | null | null | null | tests/test_vlan.py | akokhan/sonic-swss | c7d8c2b77171b0dcbbb962306697601d0c2b73fa | [
"Apache-2.0"
] | 1 | 2021-11-30T01:19:59.000Z | 2021-11-30T01:19:59.000Z | tests/test_vlan.py | akokhan/sonic-swss | c7d8c2b77171b0dcbbb962306697601d0c2b73fa | [
"Apache-2.0"
] | 2 | 2019-07-16T03:36:44.000Z | 2019-07-17T02:15:37.000Z | from swsscommon import swsscommon
import time
import re
import json
import pytest
import platform
from distutils.version import StrictVersion
class TestVlan(object):
def setup_db(self, dvs):
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)
self.adb = swsscommon.DBConnector(1, dvs.redis_sock... | 37.984049 | 187 | 0.604096 |
4a02050f65843d9f8b08dd0dab52ae3b370d4ef9 | 37,764 | py | Python | mmtbx/hydrogens/tst_add_hydrogen_2.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | mmtbx/hydrogens/tst_add_hydrogen_2.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | mmtbx/hydrogens/tst_add_hydrogen_2.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
import time
import mmtbx.model
import iotbx.pdb
from mmtbx.hydrogens import reduce_hydrogen
from libtbx.utils import null_out
from libtbx.test_utils import approx_equal
# ------------------------------------------------------------------------------
def... | 58.639752 | 85 | 0.482841 |
4a0207ef42bdf2c818189af5f0e3be20407f4545 | 4,765 | py | Python | my-electron-app/src/components/python_terminal/python/Tools/demo/hanoi.py | diesisfox/ECE496 | 9864bfe2426d1f7e94776f63e3e477f37798754f | [
"MIT"
] | 1 | 2021-01-09T14:48:12.000Z | 2021-01-09T14:48:12.000Z | Tools/demo/hanoi.py | Krrishdhaneja/cpython | 9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578 | [
"0BSD"
] | 1 | 2021-02-24T02:25:12.000Z | 2021-02-24T02:25:12.000Z | my-electron-app/src/components/python_terminal/python/Tools/demo/hanoi.py | diesisfox/ECE496 | 9864bfe2426d1f7e94776f63e3e477f37798754f | [
"MIT"
] | 1 | 2022-03-28T19:28:45.000Z | 2022-03-28T19:28:45.000Z | #!/usr/bin/env python3
"""
Animated Towers of Hanoi using Tk with optional bitmap file in background.
Usage: hanoi.py [n [bitmapfile]]
n is the number of pieces to animate; default is 4, maximum 15.
The bitmap file can be any X11 bitmap file (look in /usr/include/X11/bitmaps for
samples); it is displayed ... | 30.741935 | 81 | 0.516055 |
4a0208045c7af48626b5b9197008b271edb7bd84 | 20,717 | py | Python | airflow/www/security.py | fxdmhtt/airflow | cf88f7bc7bbd3e9bf110e98f025759a96c130235 | [
"Apache-2.0"
] | 3 | 2016-05-12T07:36:24.000Z | 2018-08-18T15:04:23.000Z | airflow/www/security.py | fxdmhtt/airflow | cf88f7bc7bbd3e9bf110e98f025759a96c130235 | [
"Apache-2.0"
] | 3 | 2020-03-08T15:43:38.000Z | 2021-09-29T17:26:10.000Z | airflow/www/security.py | upjohnc/airflow-upjohn-k8s | caadbc1618d73e054de99138b0892cea3a9327c4 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2017-06-19T19:55:47.000Z | 2020-10-10T00:49:20.000Z | # -*- coding: utf-8 -*-
#
# 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
#... | 35.780656 | 107 | 0.582179 |
4a020958ce0637920478a7644e63de6df263eec7 | 2,271 | py | Python | faculty_cli/parse.py | ASIDataScience/faculty-cli | 9acbac4d6a84ba0728ad8ef1ea03045ad966e5fb | [
"Apache-2.0"
] | 3 | 2019-01-21T13:42:31.000Z | 2019-01-30T15:31:23.000Z | faculty_cli/parse.py | ASIDataScience/faculty-cli | 9acbac4d6a84ba0728ad8ef1ea03045ad966e5fb | [
"Apache-2.0"
] | 2 | 2019-01-23T13:40:44.000Z | 2019-01-30T12:17:42.000Z | faculty_cli/parse.py | ASIDataScience/faculty-cli | 9acbac4d6a84ba0728ad8ef1ea03045ad966e5fb | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2022 Faculty Science Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 29.115385 | 76 | 0.632321 |
4a020a327eb6648b8b5737634b2d7a1fedc35572 | 1,777 | py | Python | eleksdrawpy/util.py | basjacobs93/xy | 7f9bbd089e29785eb905567aa4a0aac25c650ebd | [
"MIT"
] | 4 | 2020-05-09T21:34:06.000Z | 2022-02-14T18:05:09.000Z | eleksdrawpy/util.py | basjacobs93/xy | 7f9bbd089e29785eb905567aa4a0aac25c650ebd | [
"MIT"
] | null | null | null | eleksdrawpy/util.py | basjacobs93/xy | 7f9bbd089e29785eb905567aa4a0aac25c650ebd | [
"MIT"
] | null | null | null | from .device import Device
from .drawing import Drawing
from shapely.geometry import LineString
import math
from .progress import Bar
import time
def simplify(points, tolerance=0.05):
if len(points) < 2:
return points
line = LineString(points)
line = line.simplify(tolerance)
return list(line.co... | 24.680556 | 50 | 0.558244 |
4a020c7fb035fe9f39bf947f05a987b91a921891 | 732 | py | Python | lambda/get_statement_result/index.py | aws-samples/redshift-data-api-with-step-functions-sample | 288bc3c4f3300d50d266aa9a23a998cdb9f5dbcb | [
"MIT-0"
] | 7 | 2021-07-16T04:48:58.000Z | 2021-11-08T21:09:12.000Z | lambda/get_statement_result/index.py | aws-samples/redshift-data-api-with-step-functions-sample | 288bc3c4f3300d50d266aa9a23a998cdb9f5dbcb | [
"MIT-0"
] | null | null | null | lambda/get_statement_result/index.py | aws-samples/redshift-data-api-with-step-functions-sample | 288bc3c4f3300d50d266aa9a23a998cdb9f5dbcb | [
"MIT-0"
] | 2 | 2021-09-24T02:19:35.000Z | 2021-10-25T00:38:40.000Z | import logging
import boto3
import time
logger = logging.getLogger()
logger.setLevel(logging.INFO)
rs_data = boto3.client("redshift-data")
def handler(event, context):
logger.info('Event: %s', event)
statement_id = event["statementId"]
results = []
# We fetch all the records just for demo purpose.
... | 22.875 | 53 | 0.625683 |
4a020c890edb1e9be6fe42ee28161d730a50f6cc | 596 | py | Python | PuppeteerLibrary/base/ipuppeteer_library.py | sdvicorp/robotframework-puppeteer | af6fa68b04c3cdac3a7662cffda6da2a5ace38d1 | [
"Apache-2.0"
] | 37 | 2019-10-28T01:35:43.000Z | 2022-03-31T04:11:49.000Z | PuppeteerLibrary/base/ipuppeteer_library.py | sdvicorp/robotframework-puppeteer | af6fa68b04c3cdac3a7662cffda6da2a5ace38d1 | [
"Apache-2.0"
] | 61 | 2020-07-16T00:18:22.000Z | 2022-03-24T07:12:05.000Z | PuppeteerLibrary/base/ipuppeteer_library.py | sdvicorp/robotframework-puppeteer | af6fa68b04c3cdac3a7662cffda6da2a5ace38d1 | [
"Apache-2.0"
] | 10 | 2020-03-03T05:28:05.000Z | 2022-02-14T10:03:44.000Z | from typing import List
from PuppeteerLibrary.library_context.ilibrary_context import iLibraryContext
from abc import ABC, abstractmethod
class iPuppeteerLibrary(ABC):
@abstractmethod
def get_current_library_context(self) -> iLibraryContext:
pass
@abstractmethod
def get_library_context_by_nam... | 27.090909 | 86 | 0.739933 |
4a020c9c08821925abccc4949832565b5eb2ebbb | 409 | py | Python | onnx_tf/handlers/backend/asin.py | malisit/onnx-tensorflow | 3eb41dc923f350ca533f1024f602a842dd55de45 | [
"Apache-2.0"
] | 1,110 | 2017-11-13T19:34:24.000Z | 2022-03-29T09:14:56.000Z | onnx_tf/handlers/backend/asin.py | malisit/onnx-tensorflow | 3eb41dc923f350ca533f1024f602a842dd55de45 | [
"Apache-2.0"
] | 768 | 2017-11-17T00:06:27.000Z | 2022-03-31T20:20:09.000Z | onnx_tf/handlers/backend/asin.py | malisit/onnx-tensorflow | 3eb41dc923f350ca533f1024f602a842dd55de45 | [
"Apache-2.0"
] | 281 | 2017-11-16T19:56:17.000Z | 2022-03-28T06:25:33.000Z | import tensorflow as tf
from onnx_tf.handlers.backend_handler import BackendHandler
from onnx_tf.handlers.handler import onnx_op
from onnx_tf.handlers.handler import tf_func
from .math_mixin import BasicMathMixin
@onnx_op("Asin")
@tf_func(tf.asin)
class Asin(BasicMathMixin, BackendHandler):
@classmethod
def ver... | 25.5625 | 59 | 0.801956 |
4a020d257aefa4eb1aa4ce0ecd9698a53031039d | 1,712 | py | Python | src/studio2021/__init__.py | Design-Machine-Group/studio2021 | ba410de6dfd54f33a02d03dab49e49cf5b286dce | [
"MIT"
] | 1 | 2021-01-29T17:53:58.000Z | 2021-01-29T17:53:58.000Z | src/studio2021/__init__.py | Design-Machine-Group/studio2021 | ba410de6dfd54f33a02d03dab49e49cf5b286dce | [
"MIT"
] | 1 | 2021-01-22T00:08:18.000Z | 2021-01-22T00:09:23.000Z | src/studio2021/__init__.py | Design-Machine-Group/studio2021 | ba410de6dfd54f33a02d03dab49e49cf5b286dce | [
"MIT"
] | null | null | null | """
********************************************************************************
studio2021
********************************************************************************
.. currentmodule:: studio2021
.. toctree::
:maxdepth: 1
"""
from __future__ import print_function
import os
import sys
__author__ ... | 27.612903 | 81 | 0.591706 |
4a020e7b7a3a24205383b39b04461eb5ad8848fc | 6,677 | py | Python | drawing/GraphDrawer.py | jaskier07/DocumentComparator | f5fbd55cb29640adf91a81150dfd73df361954d9 | [
"MIT"
] | 2 | 2020-01-14T18:17:50.000Z | 2021-06-10T21:02:46.000Z | drawing/GraphDrawer.py | jaskier07/DocumentComparator | f5fbd55cb29640adf91a81150dfd73df361954d9 | [
"MIT"
] | null | null | null | drawing/GraphDrawer.py | jaskier07/DocumentComparator | f5fbd55cb29640adf91a81150dfd73df361954d9 | [
"MIT"
] | null | null | null | import ctypes
import webbrowser
from threading import Thread
import dash
import dash_core_components as core
import dash_cytoscape as cyto
import dash_html_components as html
from drawing.CallbackProvider import CallbackProvider
from drawing.StylesheetProvider import StylesheetProvider
from utils.IOUtils import IOUti... | 33.552764 | 113 | 0.53527 |
4a020e9cfd602cba443e49d9da5f5c272cd24c24 | 375 | py | Python | src/nonflask_uploader/__init__.py | saungkertas/rest_by_python_flask | 28da9c74cc401ecffb8d7781664942a07818a26d | [
"MIT"
] | null | null | null | src/nonflask_uploader/__init__.py | saungkertas/rest_by_python_flask | 28da9c74cc401ecffb8d7781664942a07818a26d | [
"MIT"
] | null | null | null | src/nonflask_uploader/__init__.py | saungkertas/rest_by_python_flask | 28da9c74cc401ecffb8d7781664942a07818a26d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pkg_resources import get_distribution, DistributionNotFound
try:
# Change here if project is renamed and does not equal the package name
dist_name = 'non/flask_uploader'
__version__ = get_distribution(dist_name).version
except DistributionNotFound:
__version__ = 'unknown'
f... | 31.25 | 75 | 0.768 |
4a020fc3fc5d0f85631fb0a911c77caebcaafbd0 | 1,705 | py | Python | model-optimizer/extensions/front/tf/Unpack.py | mypopydev/dldt | 8cd639116b261adbbc8db860c09807c3be2cc2ca | [
"Apache-2.0"
] | 3 | 2019-07-08T09:03:03.000Z | 2020-09-09T10:34:17.000Z | model-optimizer/extensions/front/tf/Unpack.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 3 | 2020-11-13T18:59:18.000Z | 2022-02-10T02:14:53.000Z | model-optimizer/extensions/front/tf/Unpack.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 1 | 2018-12-14T07:56:02.000Z | 2018-12-14T07:56:02.000Z | """
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 37.888889 | 119 | 0.727859 |
4a020fdd79f0fc42c351f6da48ee0dcb7e1f228b | 2,763 | py | Python | common/pagination.py | govtrack/django-lorien-common | 27241ff72536b442dfd64fad8589398b8a6e9f4d | [
"BSD-3-Clause"
] | 1 | 2020-08-17T06:24:56.000Z | 2020-08-17T06:24:56.000Z | common/pagination.py | govtrack/django-lorien-common | 27241ff72536b442dfd64fad8589398b8a6e9f4d | [
"BSD-3-Clause"
] | null | null | null | common/pagination.py | govtrack/django-lorien-common | 27241ff72536b442dfd64fad8589398b8a6e9f4d | [
"BSD-3-Clause"
] | null | null | null | """
Django-common pagination module dramatically simplifies the pagination task.
You only have to do following things.
In view::
@render_to('foo_list.html')
def foo_list(request):
qs = Foo.objects.all()
page = paginate(qs, request)
return {'page': page,
}
In template... | 29.084211 | 92 | 0.624683 |
4a0210015f46deaeb2db1ecfe7909f45dd994e3a | 2,733 | py | Python | pyon/datastore/postgresql/test/test_pg_query.py | ooici/pyon | 122c629290d27f32f2f41dafd5c12469295e8acf | [
"BSD-2-Clause"
] | 2 | 2015-06-09T16:07:09.000Z | 2015-07-28T10:06:31.000Z | pyon/datastore/postgresql/test/test_pg_query.py | ooici/pyon | 122c629290d27f32f2f41dafd5c12469295e8acf | [
"BSD-2-Clause"
] | 3 | 2020-07-22T15:14:55.000Z | 2021-12-13T19:35:06.000Z | pyon/datastore/postgresql/test/test_pg_query.py | ooici/pyon | 122c629290d27f32f2f41dafd5c12469295e8acf | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
__author__ = 'Brian McKenna'
from nose.plugins.attrib import attr
from unittest import SkipTest
from mock import Mock, patch, ANY
from pyon.util.int_test import IonIntegrationTestCase
from pyon.util.unit_test import IonUnitTestCase
from pyon.datastore.datastore_query import DatastoreQueryBuil... | 47.947368 | 166 | 0.71094 |
4a0210a01c314590a57b744354b412470a071a82 | 6,911 | py | Python | mrcnn/scripts/train.py | tejasmhos/clomask | 49954f1c1aa8efa775fd8f509287de93c01f2ccc | [
"MIT"
] | 8 | 2019-03-22T19:48:33.000Z | 2019-08-31T06:38:58.000Z | mrcnn/scripts/train.py | tejasmhos/clomask | 49954f1c1aa8efa775fd8f509287de93c01f2ccc | [
"MIT"
] | 31 | 2018-10-25T09:33:13.000Z | 2021-08-25T15:29:08.000Z | mrcnn/scripts/train.py | tejasmhos/clomask | 49954f1c1aa8efa775fd8f509287de93c01f2ccc | [
"MIT"
] | 5 | 2018-11-02T19:52:47.000Z | 2020-04-15T04:27:37.000Z | """
Training module for maskrcnn on Bottles, Boxes and Candy bags.
"""
from config import *
import h5py
from imgaug import augmenters as iaa
from sklearn.model_selection import train_test_split
from random import randint
import numpy as np
import json
class ClomaskDataset(utils.Dataset):
"""
Class wrappe... | 35.994792 | 111 | 0.559687 |
4a0212828ab0cd6ffe2449048e5bb987dd07f6b2 | 7,979 | py | Python | www/coreweb.py | bjb421361141/demoProject | 66a4b2dea346831705342e2c1e3599814c079d51 | [
"Apache-2.0"
] | null | null | null | www/coreweb.py | bjb421361141/demoProject | 66a4b2dea346831705342e2c1e3599814c079d51 | [
"Apache-2.0"
] | null | null | null | www/coreweb.py | bjb421361141/demoProject | 66a4b2dea346831705342e2c1e3599814c079d51 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/8/18 11:02
# @Author : Baijb
import asyncio
import functools
import inspect
import logging
import os
import re
from urllib import parse
from aiohttp import web
from www.apis import APIError
_RE_HANDLE_NAME = re.compile(r'^[0-9a-zA-Z_.]+handler$') # ha... | 30.688462 | 118 | 0.577265 |
4a0212bd7afea26839a4d034679cd7fd8d24b780 | 1,253 | py | Python | cogs/newcomers.py | lifehackerhansol/Sycamore | 39b4574cd8224c2b4927992cadf22e4c4c368bd1 | [
"0BSD"
] | null | null | null | cogs/newcomers.py | lifehackerhansol/Sycamore | 39b4574cd8224c2b4927992cadf22e4c4c368bd1 | [
"0BSD"
] | 4 | 2021-05-25T06:48:00.000Z | 2022-02-03T18:41:57.000Z | cogs/newcomers.py | lifehackerhansol/Sycamore | 39b4574cd8224c2b4927992cadf22e4c4c368bd1 | [
"0BSD"
] | null | null | null | #
# ISC License
#
# Copyright (C) 2021 DS-Homebrew
# Copyright (C) 2021-present lifehackerhansol
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# T... | 29.833333 | 74 | 0.742219 |
4a0212e890d3ad287e083c26840ed54beef36e8a | 8,157 | py | Python | .venv/lib/python3.8/site-packages/pandas/tests/window/test_base_indexer.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 115 | 2020-06-18T15:00:58.000Z | 2022-03-02T10:13:19.000Z | .venv/lib/python3.8/site-packages/pandas/tests/window/test_base_indexer.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 21 | 2021-04-13T01:17:40.000Z | 2022-03-11T16:06:50.000Z | .venv/lib/python3.8/site-packages/pandas/tests/window/test_base_indexer.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 60 | 2020-07-22T14:53:10.000Z | 2022-03-23T10:17:59.000Z | import numpy as np
import pytest
from pandas import DataFrame, Series, date_range
import pandas._testing as tm
from pandas.api.indexers import BaseIndexer, FixedForwardWindowIndexer
from pandas.core.window.indexers import ExpandingIndexer, VariableOffsetWindowIndexer
from pandas.tseries.offsets import BusinessDay
d... | 31.863281 | 85 | 0.572147 |
4a02132654d4953ef71138b04fa109e55841e150 | 26,904 | py | Python | sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/models/_models.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/models/_models.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/automanage/azure-mgmt-automanage/azure/mgmt/automanage/models/_models.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 35.353482 | 140 | 0.651502 |
4a0213e98e70b2d516cb4df0cd929847cfbadb40 | 415 | py | Python | alura-python/games.py | wiltonpaulo/python-fullcourse | 5befe60221a2e6f8a567a11e2f449245c11b3447 | [
"MIT"
] | null | null | null | alura-python/games.py | wiltonpaulo/python-fullcourse | 5befe60221a2e6f8a567a11e2f449245c11b3447 | [
"MIT"
] | null | null | null | alura-python/games.py | wiltonpaulo/python-fullcourse | 5befe60221a2e6f8a567a11e2f449245c11b3447 | [
"MIT"
] | null | null | null | import guess
import hangman
print(f"*********************************")
print("*** Select one game to play ! ***")
print("*********************************")
print("(1) Hangman!")
print("(2) Guess the Number!")
game = int(input("Which game? "))
if (game == 1):
print(f"Playing -> Game: Hangman! ...")
hangman.... | 23.055556 | 52 | 0.491566 |
4a0214f9be05e82ed9e70aa7e1e90c035282ef8d | 2,607 | py | Python | src/emuvim/api/rest/network.py | xilouris/son-emu | 0eb78e7246730c70402a58551910ddf66927ada8 | [
"Apache-2.0"
] | null | null | null | src/emuvim/api/rest/network.py | xilouris/son-emu | 0eb78e7246730c70402a58551910ddf66927ada8 | [
"Apache-2.0"
] | null | null | null | src/emuvim/api/rest/network.py | xilouris/son-emu | 0eb78e7246730c70402a58551910ddf66927ada8 | [
"Apache-2.0"
] | null | null | null | import logging
from flask_restful import Resource
from flask import request
import json
logging.basicConfig(level=logging.INFO)
net = None
class NetworkAction(Resource):
"""
Add or remove chains between VNFs. These chain links are implemented as flow entries in the networks' SDN switches.
:param vnf_src... | 43.45 | 119 | 0.672804 |
4a0215b2d74a794ba0bce577562fe75e37c05ba3 | 43,088 | py | Python | utest/parsing/test_model.py | anilameec/robotframework | 8cd1680f9497c6991d6bcc7d057ab400f7151b9b | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-03-13T01:55:04.000Z | 2022-03-13T01:55:04.000Z | utest/parsing/test_model.py | anilameec/robotframework | 8cd1680f9497c6991d6bcc7d057ab400f7151b9b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | utest/parsing/test_model.py | anilameec/robotframework | 8cd1680f9497c6991d6bcc7d057ab400f7151b9b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import ast
import os
import unittest
import tempfile
from pathlib import Path
from robot.parsing import get_model, get_resource_model, ModelVisitor, ModelTransformer, Token
from robot.parsing.model.blocks import (
CommentSection, File, For, If, Try, While,
Keyword, KeywordSection, SettingSection, TestCase, Tes... | 35.728027 | 104 | 0.446203 |
4a0215edc6965fd1142bed1a86ecdc21b342314e | 3,119 | py | Python | src/models/data_factory.py | vinodrajendran001/aerial_segmentation | 44ce909fe1f6f218930c50825ce7452c8029b20f | [
"FTL"
] | null | null | null | src/models/data_factory.py | vinodrajendran001/aerial_segmentation | 44ce909fe1f6f218930c50825ce7452c8029b20f | [
"FTL"
] | 10 | 2021-03-30T14:17:16.000Z | 2022-03-12T00:50:30.000Z | src/models/data_factory.py | vinodrajendran001/aerial_segmentation | 44ce909fe1f6f218930c50825ce7452c8029b20f | [
"FTL"
] | null | null | null | # -*- coding: utf-8 -*-
import torch
import numpy as np
from torch.utils.data import Dataset
from skimage import transform as sk_transform
from skimage.io import imread
import os
from glob import glob
class Dataset(Dataset):
def __init__(self, split_file_image, split_file_label, using_onehot):
self.... | 35.443182 | 168 | 0.632895 |
4a02161285b197d286382d74ede48a738f6d153e | 14,158 | py | Python | tests/stix_translation/test_results_translation.py | priti-patil/stix-shifter | 26954598fb79dde4506987388592ec391ff8a10b | [
"Apache-2.0"
] | 33 | 2018-05-25T17:07:28.000Z | 2019-09-30T10:08:53.000Z | tests/stix_translation/test_results_translation.py | priti-patil/stix-shifter | 26954598fb79dde4506987388592ec391ff8a10b | [
"Apache-2.0"
] | 54 | 2018-06-01T18:17:24.000Z | 2019-09-30T18:36:15.000Z | tests/stix_translation/test_results_translation.py | subbyte/stix-shifter | 36d71c172a5fc5b97d872e623753b0dd1bf4fe6c | [
"Apache-2.0"
] | 37 | 2018-07-24T13:29:46.000Z | 2019-09-29T19:06:27.000Z | from stix_shifter_utils.stix_translation.src.json_to_stix import json_to_stix_translator
from stix_shifter_modules.mysql.entry_point import EntryPoint
from stix_shifter_utils.stix_translation.src.utils.transformer_utils import get_module_transformers
import json
MODULE = 'mysql'
RESULTS = 'results'
TRANSFORMERS = get_... | 47.99322 | 136 | 0.670646 |
4a02173eb57545ab3b16c691d67beb7894399305 | 1,438 | py | Python | scripts/sequential_tool.py | ripl-ttic/dense_visual_descriptors | 64bd1eb40aa7be047fa2a4fa0d3973d4c4e42ca8 | [
"BSD-3-Clause"
] | null | null | null | scripts/sequential_tool.py | ripl-ttic/dense_visual_descriptors | 64bd1eb40aa7be047fa2a4fa0d3973d4c4e42ca8 | [
"BSD-3-Clause"
] | null | null | null | scripts/sequential_tool.py | ripl-ttic/dense_visual_descriptors | 64bd1eb40aa7be047fa2a4fa0d3973d4c4e42ca8 | [
"BSD-3-Clause"
] | null | null | null | import os
import shutil
input_dir = "/media/kudo/Elements/data/pdc/logs_proto"
output_dir = "/media/kudo/Elements/data/sequential_pdc/logs_proto"
d = input_dir
count = 0
folders = [os.path.join(d, o) for o in os.listdir(d) if os.path.isdir(os.path.join(d,o))]
for folder_i, folder in enumerate(folders):
num_folder... | 36.871795 | 100 | 0.684979 |
4a0218bef60013ce56a78a1dd1bed1af0b8e944b | 8,863 | py | Python | pandas/tools/tests/test_tile.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 29 | 2015-01-08T19:20:37.000Z | 2021-04-20T08:25:56.000Z | pandas/tools/tests/test_tile.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 5 | 2021-03-19T08:36:48.000Z | 2022-01-13T01:52:34.000Z | pandas/tools/tests/test_tile.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 17 | 2015-02-01T18:12:04.000Z | 2020-06-15T14:13:04.000Z | import os
import nose
import numpy as np
from pandas.compat import zip
from pandas import DataFrame, Series, unique
import pandas.util.testing as tm
from pandas.util.testing import assertRaisesRegexp
import pandas.core.common as com
from pandas.core.algorithms import quantile
from pandas.tools.tile import cut, qcut
... | 32.704797 | 96 | 0.557937 |
4a0218fda4e5cb91090460b19f9ee3ce523f97a5 | 346 | py | Python | Filters/gaussian.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | Filters/gaussian.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | Filters/gaussian.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | # 多维高斯滤波器。
from skimage.filters import gaussian
from skimage import io, img_as_float
image = io.imread('/home/qiao/PythonProjects/Scikit-image_On_CT/Test_Img/4.jpg')
io.imshow(image)
io.show()
filtered_image = gaussian(image, 0.1)
io.imshow(filtered_image)
io.show()
filtered_image = gaussian(image, 0.6)
io.imshow... | 19.222222 | 80 | 0.771676 |
4a0219f5c9224891f53fe061ce3bea640866aa11 | 5,188 | py | Python | handler.py | qguv/serverless-telegram-bot | 14bac01411b75402a09ee268ed83b8d0fc35f57e | [
"MIT"
] | null | null | null | handler.py | qguv/serverless-telegram-bot | 14bac01411b75402a09ee268ed83b8d0fc35f57e | [
"MIT"
] | null | null | null | handler.py | qguv/serverless-telegram-bot | 14bac01411b75402a09ee268ed83b8d0fc35f57e | [
"MIT"
] | null | null | null | import json
import telegram
import os
import logging
import urllib.parse
import re
import requests
from base64 import b64decode
# Logging is cool!
logger = logging.getLogger()
if logger.handlers:
for handler in logger.handlers:
logger.removeHandler(handler)
logging.basicConfig(level=logging.INFO)
telno_r... | 26.070352 | 124 | 0.621049 |
4a021a5351707c9ab786d769ee31ae01a4668e76 | 2,037 | py | Python | nipy/testing/nosepatch.py | arokem/nipy | d6b2e862c65558bb5747c36140fd6261a7e1ecfe | [
"BSD-3-Clause"
] | 1 | 2016-03-08T15:01:06.000Z | 2016-03-08T15:01:06.000Z | nipy/testing/nosepatch.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | 1 | 2015-09-09T07:49:57.000Z | 2015-09-25T01:50:40.000Z | nipy/testing/nosepatch.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Monkeypatch nose to accept any callable as a method.
By default, nose's ismethod() fails for static methods.
Once this is fixed in upstream nose we can disable it.
Note: merely importing this module ca... | 36.375 | 75 | 0.62543 |
4a021cca467b73639e501f8ce8c417a2b0b223ef | 2,178 | py | Python | tests/test_parallel.py | benzatti/parallel | d5f44d53fc2633fe554fa6266e36c00ef6939d57 | [
"MIT"
] | null | null | null | tests/test_parallel.py | benzatti/parallel | d5f44d53fc2633fe554fa6266e36c00ef6939d57 | [
"MIT"
] | 6 | 2022-03-10T04:31:07.000Z | 2022-03-13T20:37:58.000Z | tests/test_parallel.py | benzatti/parallel | d5f44d53fc2633fe554fa6266e36c00ef6939d57 | [
"MIT"
] | null | null | null | from parallel import Parallel
import threading
import pytest
class Counter:
def __init__(self, initial_value):
self.lock = threading.RLock()
self.counter = initial_value
def increment(self):
with self.lock:
self.counter += 1
def add(self, x):
with self.lock:
... | 19.105263 | 53 | 0.61157 |
4a021d32e1abdaecb1ba2595eaffdaabf68200b8 | 1,245 | py | Python | python/113_path_sum_ii.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | null | null | null | python/113_path_sum_ii.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | null | null | null | python/113_path_sum_ii.py | ufjfeng/leetcode-soln | cbf2db0d81d5ef98f48c8d1df486559f89142bfd | [
"MIT"
] | 1 | 2019-11-22T19:28:11.000Z | 2019-11-22T19:28:11.000Z | """
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum
equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/ \
4 8
/ / \
11 13 4
/ \ / \
7 ... | 24.411765 | 80 | 0.469076 |
4a021d401bb0b12b97dc34a8e28e2b292128fef3 | 234 | py | Python | python/figurl/plugins/builtin/markdown/Markdown.py | magland/figurl | f254fb72cc23d95c5d53f8829d70e4621162c7f7 | [
"Apache-2.0"
] | 2 | 2021-12-03T14:29:01.000Z | 2022-01-28T16:07:49.000Z | python/figurl/plugins/builtin/markdown/Markdown.py | magland/figurl | f254fb72cc23d95c5d53f8829d70e4621162c7f7 | [
"Apache-2.0"
] | 21 | 2021-08-31T19:56:34.000Z | 2021-12-08T17:14:17.000Z | python/figurl/plugins/builtin/markdown/Markdown.py | magland/figurl | f254fb72cc23d95c5d53f8829d70e4621162c7f7 | [
"Apache-2.0"
] | null | null | null | from typing import List
from figurl.core.Figure import Figure
class Markdown(Figure):
def __init__(self, source: str):
data = {
'source': source
}
super().__init__(type='Markdown.1', data=data) | 26 | 54 | 0.619658 |
4a021e74fc9833babfd5183896f1ecacc698cad5 | 15,149 | py | Python | 2019Day11Part1.py | BenWichser/Advent_of_code_2019_day1_part1 | 61c0fe0461f06a85ec02c54cd8d61bdde54d37c7 | [
"MIT"
] | null | null | null | 2019Day11Part1.py | BenWichser/Advent_of_code_2019_day1_part1 | 61c0fe0461f06a85ec02c54cd8d61bdde54d37c7 | [
"MIT"
] | null | null | null | 2019Day11Part1.py | BenWichser/Advent_of_code_2019_day1_part1 | 61c0fe0461f06a85ec02c54cd8d61bdde54d37c7 | [
"MIT"
] | null | null | null | # Author: Ben Wichser
# Date: 12/11/2019
# Description: Paint the spaceship. How many sectors are painted? see www.adventofcode.com/2019 (day 11) for more information
code_list = [3, 8, 1005, 8, 339, 1106, 0, 11, 0, 0, 0, 104, 1, 104, 0, 3, 8, 1002, 8, -1, 10, 101, 1, 10, 10, 4, 10, 1008, 8, 0, 10, 4, 10, 1002, 8, ... | 43.406877 | 2,789 | 0.634629 |
4a021eb85ed52b336da356d90c3864cc6af5180e | 6,471 | py | Python | app/api/recipe_routes.py | michael-gann/larder | 3de59ef5b403215e42858ee4007bc7926506478c | [
"Unlicense"
] | null | null | null | app/api/recipe_routes.py | michael-gann/larder | 3de59ef5b403215e42858ee4007bc7926506478c | [
"Unlicense"
] | 2 | 2021-03-05T18:48:56.000Z | 2021-03-05T18:51:49.000Z | app/api/recipe_routes.py | michael-gann/larder | 3de59ef5b403215e42858ee4007bc7926506478c | [
"Unlicense"
] | null | null | null | from flask import Blueprint, jsonify, request
from app.models import Recipe, RecipeStep, RecipeIngredient, db
from sqlalchemy.orm import selectinload
from app.forms import RecipeForm
recipe_routes = Blueprint('recipes', __name__)
@recipe_routes.route("", methods=["GET"]) # get all recipes by current user
def recip... | 31.720588 | 89 | 0.585845 |
4a021fe2a484633fe2cfe8d9ed27170762c3c767 | 2,623 | py | Python | glearn/crf/stemmed.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | glearn/crf/stemmed.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | glearn/crf/stemmed.py | WeiShiwei/tornado_glearn | 5e74bbaaee4d2b8c5abf3b60cffbe54694a3bc6f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import collections
from time import time
from datetime import datetime
sys.path.append( os.path.join( os.path.abspath(os.path.dirname(__file__)) , '../../dependence'))
# from trie import Trie
# RIGHT_SYMBOL = '@'
from distutils.util import get_platform
sy... | 27.322917 | 96 | 0.693481 |
4a0220b9e920197af0cb4a90b5c4983898f5736c | 618 | py | Python | experiments/test_trafficAssignment.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | 1 | 2022-03-07T16:15:56.000Z | 2022-03-07T16:15:56.000Z | experiments/test_trafficAssignment.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | null | null | null | experiments/test_trafficAssignment.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | null | null | null | import src.tnet as tnet
import src.CARS as cars
netFile, gFile, fcoeffs = tnet.get_network_parameters('Braess1')
tNet = tnet.tNet(netFile=netFile, gFile=gFile, fcoeffs=fcoeffs)
tNet.solveMSA()
print([(i,j, tNet.G[i][j]['flow']) for i,j in tNet.G.edges()])
tNet.build_supergraph()
tNet = cars.solve_CARS_noRebalancin... | 29.428571 | 80 | 0.755663 |
4a022140425bf99bbbc8d131968824bbdce4c1b5 | 3,524 | py | Python | qecc/analyzer.py | huitaoshen/stabilizer-qecc-simulator | a4a551a588bd70a6978b8b136d7fade26eaaff7d | [
"MIT"
] | 11 | 2019-05-07T23:04:19.000Z | 2021-12-15T05:44:54.000Z | qecc/analyzer.py | huitaoshen/stabilizer-qecc-simulator | a4a551a588bd70a6978b8b136d7fade26eaaff7d | [
"MIT"
] | null | null | null | qecc/analyzer.py | huitaoshen/stabilizer-qecc-simulator | a4a551a588bd70a6978b8b136d7fade26eaaff7d | [
"MIT"
] | null | null | null | from qecc.StabilizerCode import StabilizerCode
from typing import Callable
import numpy as np
import csv
def generate_training_data(file_name: str, n: int, code: StabilizerCode, error_correction_method: str,
error_model: Callable, *args, **kwds):
"""
Generate [syndrome history, log... | 45.766234 | 118 | 0.61067 |
4a0221dd6fc2ff0a67e0ec758dbbe1faaf6fd7ce | 1,352 | py | Python | demos/paired_mrus_prostate/demo_train.py | mathpluscode/DeepReg | 80854094feafec998fa6237199066556c73f31f9 | [
"Apache-2.0"
] | null | null | null | demos/paired_mrus_prostate/demo_train.py | mathpluscode/DeepReg | 80854094feafec998fa6237199066556c73f31f9 | [
"Apache-2.0"
] | null | null | null | demos/paired_mrus_prostate/demo_train.py | mathpluscode/DeepReg | 80854094feafec998fa6237199066556c73f31f9 | [
"Apache-2.0"
] | null | null | null | import argparse
from datetime import datetime
from deepreg.train import train
name = "paired_mrus_prostate"
# parser is used to simplify testing
# please run the script with --no-test flag to ensure non-testing mode
# for instance:
# python script.py --no-test
parser = argparse.ArgumentParser()
parser.add_argument(... | 24.142857 | 70 | 0.612426 |
4a02227ec4d2343a4df6594c6d113412177ebb77 | 3,124 | py | Python | aiocometd/exceptions.py | robertmrk/aiocometd | 6c69ba505d02df334ebc551695d05c0427b92daf | [
"MIT"
] | 14 | 2018-12-02T17:15:59.000Z | 2022-02-27T12:37:50.000Z | aiocometd/exceptions.py | robertmrk/aiocometd | 6c69ba505d02df334ebc551695d05c0427b92daf | [
"MIT"
] | 14 | 2019-02-11T13:06:59.000Z | 2022-02-14T18:04:16.000Z | aiocometd/exceptions.py | robertmrk/aiocometd | 6c69ba505d02df334ebc551695d05c0427b92daf | [
"MIT"
] | 16 | 2019-03-11T13:13:29.000Z | 2022-02-27T11:30:59.000Z | """Exception types
Exception hierarchy::
AiocometdException
ClientError
ClientInvalidOperation
TransportError
TransportInvalidOperation
TransportTimeoutError
TransportConnectionClosed
ServerError
"""
from typing import Optional, List, cast
f... | 28.925926 | 78 | 0.664213 |
4a0222ac1b2bf5f61c0a48df0567bd73108325b1 | 1,744 | py | Python | demos/1d_fit_analysis.py | Suhwan-Dev/kalmaNN | 5ac85076a9b544ddb6dbe00cbf0bbf0727aca81e | [
"MIT"
] | null | null | null | demos/1d_fit_analysis.py | Suhwan-Dev/kalmaNN | 5ac85076a9b544ddb6dbe00cbf0bbf0727aca81e | [
"MIT"
] | null | null | null | demos/1d_fit_analysis.py | Suhwan-Dev/kalmaNN | 5ac85076a9b544ddb6dbe00cbf0bbf0727aca81e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Use the 1D data interpolation/extrapolation problem to benchmark convergence
variance. Comparison of training methods, EKF vs SGD.
"""
# Dependencies
from __future__ import division
import numpy as np;
npl = np.linalg
import matplotlib.pyplot as plt
import kalmann
# Get some noisy training... | 28.590164 | 117 | 0.699541 |
4a0223357cbd3de9d7e70c061602f0df6a64c9f9 | 746 | py | Python | aiohttp_tools/middlewares.py | imbolc/aiohttp_tools | b57cc286f7a89affeee8ee3f65197362f05d043d | [
"0BSD"
] | 1 | 2017-05-24T14:34:54.000Z | 2017-05-24T14:34:54.000Z | aiohttp_tools/middlewares.py | imbolc/aiohttp_tools | b57cc286f7a89affeee8ee3f65197362f05d043d | [
"0BSD"
] | null | null | null | aiohttp_tools/middlewares.py | imbolc/aiohttp_tools | b57cc286f7a89affeee8ee3f65197362f05d043d | [
"0BSD"
] | null | null | null | import logging
from aiohttp import web
log = logging.getLogger(__name__)
def fix_host(true_host: str):
@web.middleware
async def fix_host_middleware(request, handler):
if request.host != true_host:
requested_url = "{}://{}{}".format(
request.scheme, request.host, request.... | 27.62963 | 61 | 0.565684 |
4a022387b288bf84885123705a7d1c5eb34b0528 | 729 | py | Python | dags/utest/common/test_mysql.py | asdf-zxcv/airflow-dags | 033511deaaf07a662b30d35fd86ae866115baa28 | [
"Unlicense"
] | null | null | null | dags/utest/common/test_mysql.py | asdf-zxcv/airflow-dags | 033511deaaf07a662b30d35fd86ae866115baa28 | [
"Unlicense"
] | null | null | null | dags/utest/common/test_mysql.py | asdf-zxcv/airflow-dags | 033511deaaf07a662b30d35fd86ae866115baa28 | [
"Unlicense"
] | null | null | null | import unittest
from unittest import mock
from airflow.hooks.base import BaseHook
from airflow.models import Connection, Variable
class Test(unittest.TestCase):
def test_env(self):
with mock.patch.dict("os.environ", AIRFLOW_VAR_KEY="env-value"):
assert "env-value" == Variable.get("key")
... | 27 | 74 | 0.62963 |
4a02238e937b86800b5f5133cea62020d6575fcf | 86,610 | py | Python | cinder/volume/drivers/fujitsu/eternus_dx/eternus_dx_common.py | maydaycc/cinder | 2da0a68ea478913b20ecd1bafe0bde42ea18d840 | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/fujitsu/eternus_dx/eternus_dx_common.py | maydaycc/cinder | 2da0a68ea478913b20ecd1bafe0bde42ea18d840 | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/fujitsu/eternus_dx/eternus_dx_common.py | maydaycc/cinder | 2da0a68ea478913b20ecd1bafe0bde42ea18d840 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 FUJITSU LIMITED
# Copyright (c) 2012 EMC Corporation.
# Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the Licen... | 39.547945 | 79 | 0.529558 |
4a02243c25af8646b0670532674ab3f8d1cac960 | 1,499 | py | Python | pyqt/pyqt5-master/src/controls/QLineEditEchoMode.py | Ding-zhenke/Dcount-s-notebook | 16c29ac7d076c466e053f1b8db4a7f4e43f67a24 | [
"MIT"
] | null | null | null | pyqt/pyqt5-master/src/controls/QLineEditEchoMode.py | Ding-zhenke/Dcount-s-notebook | 16c29ac7d076c466e053f1b8db4a7f4e43f67a24 | [
"MIT"
] | null | null | null | pyqt/pyqt5-master/src/controls/QLineEditEchoMode.py | Ding-zhenke/Dcount-s-notebook | 16c29ac7d076c466e053f1b8db4a7f4e43f67a24 | [
"MIT"
] | 2 | 2019-06-18T05:53:26.000Z | 2019-06-19T03:26:02.000Z | '''
QLineEdit控件与回显模式
基本功能:输入单行的文本
EchoMode(回显模式)
4种回显模式
1. Normal
2. NoEcho
3. Password
4. PasswordEchoOnEdit
Mac : Command Windows:Control
'''
from PyQt5.QtWidgets import *
import sys
class QLineEditEchoMode(QWidget) :
def __init__(self):
super(QLineEditEchoMode,self).__init__()
self.ini... | 24.57377 | 76 | 0.708472 |
4a022448f6064e33833a466c26ececc0608389b6 | 2,237 | py | Python | {{cookiecutter.project_slug}}/backend/app/db/tipo_acordo/crud.py | souzjfe/conectar | 0603e955394765f3fc1a01bbd902be695bc44cba | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/backend/app/db/tipo_acordo/crud.py | souzjfe/conectar | 0603e955394765f3fc1a01bbd902be695bc44cba | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/backend/app/db/tipo_acordo/crud.py | souzjfe/conectar | 0603e955394765f3fc1a01bbd902be695bc44cba | [
"MIT"
] | null | null | null | from fastapi import HTTPException, status
from sqlalchemy.orm import Session
import typing as t
from app.db import models
from . import schemas
def get_tipo_acordo(db: Session, tipo_acordo_id: int) -> schemas.TipoAcordo:
tipo_acordo = (
db.query(models.TipoAcordo)
.filter(models.TipoAcordo.id ==... | 25.712644 | 79 | 0.676799 |
4a02246caa3e8db09e2997ed6087a0c8f91323f2 | 4,787 | py | Python | python/test/test_perimeter.py | beyse/voxel8 | 04ff337ece1bccbe6b785ae1a8190779a6619a64 | [
"MIT"
] | 66 | 2018-05-28T00:13:48.000Z | 2022-03-19T03:39:26.000Z | python/test/test_perimeter.py | beyse/voxel8 | 04ff337ece1bccbe6b785ae1a8190779a6619a64 | [
"MIT"
] | 29 | 2018-06-19T12:15:10.000Z | 2021-11-28T06:02:35.000Z | python/test/test_perimeter.py | beyse/voxel8 | 04ff337ece1bccbe6b785ae1a8190779a6619a64 | [
"MIT"
] | 46 | 2018-06-03T01:14:09.000Z | 2022-02-13T14:27:05.000Z | import numpy as np
import unittest
from stltovoxel import perimeter
class TestPerimeter(unittest.TestCase):
def test_lines_to_pixels(self):
test = [[(0, 0, 0), (3, 0, 0)],
[(9, 9, 0), (3, 9, 0)],
[(3, 0, 0), (9, 9, 0)],
[(3, 9, 0), (0, 0, 0)]]
actua... | 56.317647 | 111 | 0.577815 |
4a0224722b512d34c74d30101a3b53aff74c32eb | 12,805 | py | Python | healthcare/api-client/dicom/dicomweb.py | nilold/python-docs-samples | a6405189fc47dd41b90c185061293105eebd8a94 | [
"Apache-2.0"
] | 2 | 2021-08-04T19:13:44.000Z | 2021-10-04T02:47:49.000Z | healthcare/api-client/dicom/dicomweb.py | nilold/python-docs-samples | a6405189fc47dd41b90c185061293105eebd8a94 | [
"Apache-2.0"
] | 320 | 2020-11-08T21:02:43.000Z | 2022-02-10T10:43:29.000Z | healthcare/api-client/dicom/dicomweb.py | nilold/python-docs-samples | a6405189fc47dd41b90c185061293105eebd8a94 | [
"Apache-2.0"
] | 2 | 2019-11-04T18:25:20.000Z | 2019-11-05T14:35:28.000Z | # Copyright 2018 Google LLC 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 applicable law or ag... | 29.369266 | 79 | 0.642405 |
4a0225109b53b196d486a5820b8b35b71f8fbf32 | 2,184 | py | Python | youtube_dl/extractor/rumble.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 66,635 | 2019-03-10T21:34:18.000Z | 2022-03-31T23:50:31.000Z | youtube_dl/extractor/rumble.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 10,936 | 2019-03-10T21:35:47.000Z | 2022-03-31T23:46:52.000Z | youtube_dl/extractor/rumble.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 15,194 | 2019-03-10T21:09:27.000Z | 2022-03-31T22:13:49.000Z | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
determine_ext,
int_or_none,
parse_iso8601,
try_get,
)
class RumbleEmbedIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?rumble\.com/embed/(?:[0-9a-z]... | 32.117647 | 90 | 0.486264 |
4a022514e05eb6f903a2463e07ac3198958a0d90 | 15,996 | py | Python | rackets/src/rackets/sio_racket.py | alexoneill/15-love | bf7d1abbba7583d9686790d06b31b7fff5e8fcf4 | [
"MIT"
] | 1 | 2017-04-30T13:06:02.000Z | 2017-04-30T13:06:02.000Z | rackets/src/rackets/sio_racket.py | alexoneill/15-love | bf7d1abbba7583d9686790d06b31b7fff5e8fcf4 | [
"MIT"
] | null | null | null | rackets/src/rackets/sio_racket.py | alexoneill/15-love | bf7d1abbba7583d9686790d06b31b7fff5e8fcf4 | [
"MIT"
] | null | null | null | # sio_racket.py
# aoneill - 04/28/17
import math
import mock
import random
import socketIO_client as sio
from libs import psmoveapi
from src.base import event
from src.base import racket
from src.events import clear_event
class GameState(object):
'''
Game states for the controller.
'''
COLOR_SELECTION = 0
... | 30.880309 | 80 | 0.625531 |
4a02251f3b1a446fe525091aa32fbdfc5072b672 | 16,371 | py | Python | tests/integration/offer/test_absolute_benefit.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/offer/test_absolute_benefit.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/offer/test_absolute_benefit.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from decimal import Decimal as D
from django.core.exceptions import ValidationError
from django.test import TestCase
import mock
from oscar.apps.offer import models
from oscar.apps.offer.utils import Applicator
from oscar.test.basket import add_product, add_products
from oscar.test import factories
clas... | 46.774286 | 130 | 0.679311 |
4a0225e0e4601daeae03d70b8965443baca73be4 | 2,059 | py | Python | examples/ad_manager/v202002/cms_metadata_service/get_all_cms_metadata_values.py | jasperan/googleads-python-lib | 6add9a7cc6148e98ada8097586a8eb1b47b2a8fd | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202002/cms_metadata_service/get_all_cms_metadata_values.py | jasperan/googleads-python-lib | 6add9a7cc6148e98ada8097586a8eb1b47b2a8fd | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202002/cms_metadata_service/get_all_cms_metadata_values.py | jasperan/googleads-python-lib | 6add9a7cc6148e98ada8097586a8eb1b47b2a8fd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 36.767857 | 80 | 0.721224 |
4a0226dee816f314e90de6a6bae95dbe4bf2ad0c | 5,947 | py | Python | signing_today_client/models/signature_status_changed_notification_document.py | signingtoday/signingtoday-sdk-python | ed267279622fb59f2ad8fa289157fc9cdf9d8a5b | [
"MIT"
] | null | null | null | signing_today_client/models/signature_status_changed_notification_document.py | signingtoday/signingtoday-sdk-python | ed267279622fb59f2ad8fa289157fc9cdf9d8a5b | [
"MIT"
] | null | null | null | signing_today_client/models/signature_status_changed_notification_document.py | signingtoday/signingtoday-sdk-python | ed267279622fb59f2ad8fa289157fc9cdf9d8a5b | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Signing Today Web
*Signing Today* is the perfect Digital Signature Gateway. Whenever in Your workflow You need to add one or more Digital Signatures to Your document, *Signing Today* is the right choice. You prepare Your documents, *Signing Today* takes care of all the rest: send invitatio... | 33.789773 | 557 | 0.633092 |
4a02279b35ad0ed3438abdea95231661ea353258 | 1,862 | py | Python | tools/telemetry/telemetry/page/page_measurement_unittest_base.py | anirudhSK/chromium | a8f23c87e656ab9ba49de9ccccbc53f614cdcb41 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/page/page_measurement_unittest_base.py | anirudhSK/chromium | a8f23c87e656ab9ba49de9ccccbc53f614cdcb41 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/page/page_measurement_unittest_base.py | anirudhSK/chromium | a8f23c87e656ab9ba49de9ccccbc53f614cdcb41 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2015-04-17T13:19:09.000Z | 2021-10-21T12:55:15.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from telemetry.core import util
from telemetry.page import page_runner
from telemetry.page import page as page_module
from telemetry.pag... | 37.24 | 80 | 0.749194 |
4a022a6319b9423c35a6989ab9a751215b2aaf76 | 854,077 | py | Python | machine-learning/nlp/text-generator/data/python_code.py | gizzmo25/pythoncode-tutorials | 39a413fc1da232ad6de7e5f1e8955564dc65448e | [
"MIT"
] | null | null | null | machine-learning/nlp/text-generator/data/python_code.py | gizzmo25/pythoncode-tutorials | 39a413fc1da232ad6de7e5f1e8955564dc65448e | [
"MIT"
] | null | null | null | machine-learning/nlp/text-generator/data/python_code.py | gizzmo25/pythoncode-tutorials | 39a413fc1da232ad6de7e5f1e8955564dc65448e | [
"MIT"
] | null | null | null | from constraint import Problem, Domain, AllDifferentConstraint
import matplotlib.pyplot as plt
import numpy as np
def _get_pairs(variables):
work = list(variables)
pairs = [ (work[i], work[i+1]) for i in range(len(work)-1) ]
return pairs
def n_queens(n=8):
def not_in_diagonal... | 33.686085 | 878 | 0.610527 |
4a022abc64e60bf6d1fb357a409978404426bade | 10,921 | py | Python | scripts/detector_eval/auto/evaluate_detectors.py | RichardLitt/Vesper | 5360844f42a06942e7684121c650b08cf8616285 | [
"MIT"
] | 29 | 2017-07-10T14:49:15.000Z | 2022-02-02T23:14:38.000Z | scripts/detector_eval/auto/evaluate_detectors.py | Tubbz-alt/Vesper | 76e5931ca0c7fbe070c53b1362ec246ec9007beb | [
"MIT"
] | 167 | 2015-03-17T14:45:22.000Z | 2022-03-30T21:00:05.000Z | scripts/detector_eval/auto/evaluate_detectors.py | Tubbz-alt/Vesper | 76e5931ca0c7fbe070c53b1362ec246ec9007beb | [
"MIT"
] | 4 | 2015-02-06T03:30:27.000Z | 2020-12-27T08:38:52.000Z | """
Plots precision-recall curves for detectors run on the BirdVox-full-night
recordings.
The inputs required by this script are:
1. CSV files produced by the run_detectors script. The directory containing
the files is specified by
scripts.pnf_energy_detector_eval.utils.WORKING_DIR_PATH. All CSV files in
the director... | 29.200535 | 78 | 0.64289 |
4a022c195e2a6c77cf636087eecd5ce3da91e1e5 | 114,741 | py | Python | salt/states/git.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | null | null | null | salt/states/git.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2019-09-06T13:57:28.000Z | 2019-09-06T13:57:28.000Z | salt/states/git.py | feth/salt | f4e610bb987d9529faca1f0ad1c339d3c4b3642b | [
"Apache-2.0"
] | 1 | 2020-09-30T16:09:48.000Z | 2020-09-30T16:09:48.000Z | # -*- coding: utf-8 -*-
'''
States to manage git repositories and git configuration
.. important::
Before using git over ssh, make sure your remote host fingerprint exists in
your ``~/.ssh/known_hosts`` file.
.. versionchanged:: 2015.8.8
This state module now requires git 1.6.5 (released 10 October 2009) ... | 38.790061 | 112 | 0.466843 |
4a022ca98d5379cda977460141b61b06616cd665 | 297 | py | Python | conversion/__init__.py | kallyas/PythonAlgorithms | e9b4c8dddad101ef0ff4bd4786d506f34f6f4d80 | [
"MIT"
] | 1 | 2022-02-23T19:22:44.000Z | 2022-02-23T19:22:44.000Z | conversion/__init__.py | kallyas/PythonAlgorithms | e9b4c8dddad101ef0ff4bd4786d506f34f6f4d80 | [
"MIT"
] | null | null | null | conversion/__init__.py | kallyas/PythonAlgorithms | e9b4c8dddad101ef0ff4bd4786d506f34f6f4d80 | [
"MIT"
] | null | null | null | from .binary_to_decimal import binary_to_decimal
from .decimal_to_binary import decimal_to_binary
from .hexa_decimal_to_decimal import hexa_decimal_to_decimal
from .decimal_to_hexa import decimal_to_hexa
from .octal_to_decimal import octal_to_decimal
from .decimal_to_octal import decimal_to_octal | 49.5 | 60 | 0.902357 |
4a022d98f1327fb09e40d480dceac2346563f08e | 6,007 | py | Python | pygazpar/datafileparser.py | LudovicRousseau/PyGazpar | ca1dd1c7a099a9722cdd98e24b4f8c30e2efcaa8 | [
"MIT"
] | null | null | null | pygazpar/datafileparser.py | LudovicRousseau/PyGazpar | ca1dd1c7a099a9722cdd98e24b4f8c30e2efcaa8 | [
"MIT"
] | null | null | null | pygazpar/datafileparser.py | LudovicRousseau/PyGazpar | ca1dd1c7a099a9722cdd98e24b4f8c30e2efcaa8 | [
"MIT"
] | null | null | null | import logging
from datetime import datetime
from pygazpar.enum import Frequency
from pygazpar.enum import PropertyName
from openpyxl.worksheet.worksheet import Worksheet
from openpyxl.cell.cell import Cell
from openpyxl import load_workbook
FIRST_DATA_LINE_NUMBER = 10
# --------------------------------------------... | 41.715278 | 126 | 0.598302 |
4a022d9e4e9845f40023e032d5862089a37cdd41 | 4,775 | py | Python | external/vulkancts/scripts/build_mustpass.py | paulthomson/VK-GL-CTS | 08de4618d38fb95b48a2bd8812f2e3d96f620df3 | [
"Apache-2.0"
] | 2 | 2019-04-04T12:53:11.000Z | 2020-09-01T15:27:15.000Z | external/vulkancts/scripts/build_mustpass.py | paulthomson/VK-GL-CTS | 08de4618d38fb95b48a2bd8812f2e3d96f620df3 | [
"Apache-2.0"
] | null | null | null | external/vulkancts/scripts/build_mustpass.py | paulthomson/VK-GL-CTS | 08de4618d38fb95b48a2bd8812f2e3d96f620df3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# Vulkan CTS
# ----------
#
# Copyright (c) 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy ... | 34.107143 | 131 | 0.659267 |
4a022db69cd54635b4a0ee777c028f0db9143751 | 27,890 | py | Python | examples/pytorch/text-classification/run_glue_no_trainer.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/text-classification/run_glue_no_trainer.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/text-classification/run_glue_no_trainer.py | shangz-ai/transformers | 75259b44bf2e2b98b5a4d431fb400b7190342a01 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. 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 r... | 44.129747 | 119 | 0.660559 |
4a022e2347e488268eb133457af3b0e0c12d7650 | 5,795 | py | Python | app/server/__init__.py | SSU-NC/toiot-sink-node-driver | 8611dad33f89432c4f1df572dc096f226f023f57 | [
"Apache-2.0"
] | 2 | 2020-11-18T05:16:38.000Z | 2021-07-06T08:47:27.000Z | app/server/__init__.py | SSU-NC/toiot-sink-node-driver | 8611dad33f89432c4f1df572dc096f226f023f57 | [
"Apache-2.0"
] | 4 | 2020-09-11T05:38:14.000Z | 2020-11-04T07:04:41.000Z | app/server/__init__.py | SSU-NC/toiot-sink-node-driver | 8611dad33f89432c4f1df572dc096f226f023f57 | [
"Apache-2.0"
] | 2 | 2021-01-07T14:42:30.000Z | 2021-07-23T02:49:12.000Z | import ast
import datetime
import json
import time
import threading
import socket
import paho.mqtt.client as mqtt
from flask import Flask
from flask import request
from kafka import KafkaProducer
from message.mqtt_message import MqttMessages
from .healthcheck import HealthCheck
from .actuator import Actuator
from .ht... | 30.824468 | 142 | 0.714927 |
4a022e72f965682bb57ab4f1f81d72bc1e626844 | 489 | py | Python | examples/websocket/delivery/index_price.py | AlfonsoAgAr/binance-futures-connector-python | f0bd2c7b0576503bf526ce6be329ca2dae90fefe | [
"MIT"
] | 58 | 2021-11-22T11:46:27.000Z | 2022-03-30T06:58:53.000Z | examples/websocket/delivery/index_price.py | sanjeevan121/binance-futures-connector-python | d820b73a15e9f64c80891a13694ca0c5d1693b90 | [
"MIT"
] | 15 | 2021-12-15T22:40:52.000Z | 2022-03-29T22:08:31.000Z | examples/websocket/delivery/index_price.py | sanjeevan121/binance-futures-connector-python | d820b73a15e9f64c80891a13694ca0c5d1693b90 | [
"MIT"
] | 28 | 2021-12-10T03:56:13.000Z | 2022-03-25T22:23:44.000Z | #!/usr/bin/env python
import time
import logging
from binance.lib.utils import config_logging
from binance.websocket.delivery.websocket_client import DeliveryWebsocketClient as Client
config_logging(logging, logging.DEBUG)
def message_handler(message):
print(message)
my_client = Client()
my_client.start()
my... | 17.464286 | 89 | 0.764826 |
4a02303bd41d0dfab71393f3d0265282e22ab486 | 7,552 | py | Python | library/python/pysandesh/sandesh_connection.py | rombie/contrail-sandesh | c2e2d7a0a6b2e3a3ace26b612628aaca256e3a38 | [
"Apache-2.0"
] | null | null | null | library/python/pysandesh/sandesh_connection.py | rombie/contrail-sandesh | c2e2d7a0a6b2e3a3ace26b612628aaca256e3a38 | [
"Apache-2.0"
] | null | null | null | library/python/pysandesh/sandesh_connection.py | rombie/contrail-sandesh | c2e2d7a0a6b2e3a3ace26b612628aaca256e3a38 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# Sandesh Connection
#
import gevent
import os
from transport import TTransport
from protocol import TXMLProtocol
from sandesh_session import SandeshSession, SandeshReader
from sandesh_state_machine import SandeshStateMachine, Event
from sandesh_u... | 41.043478 | 100 | 0.637579 |
4a023123b6ecaf6b93b66d41a0626cf376b63156 | 51,697 | py | Python | python/pyspark/sql/types.py | fusons/spark | 39e2bad6a866d27c3ca594d15e574a1da3ee84cc | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 147 | 2017-11-22T09:18:46.000Z | 2021-11-18T03:47:27.000Z | python/pyspark/sql/types.py | fusons/spark | 39e2bad6a866d27c3ca594d15e574a1da3ee84cc | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 95 | 2016-08-29T09:00:58.000Z | 2020-03-30T11:23:50.000Z | python/pyspark/sql/types.py | zhaolj66/spark-parent_2.11 | 10ac1f16d34cfbfad52758acadfa9af4907ba3a0 | [
"BSD-3-Clause-Open-MPI",
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"PostgreSQL",
"BSD-3-Clause"
] | 32 | 2017-11-23T00:21:26.000Z | 2021-06-15T15:30:31.000Z | #
# 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"); you may not us... | 32.991066 | 100 | 0.601969 |
4a023203b1db83849a80d4503a77e6a191933bcf | 8,032 | py | Python | InnerEye/ML/SSL/datamodules_and_datasets/datamodules.py | microsoft/InnerEye-DeepLearning | 6a4d334a996b69269d959d946e4d24a5ee2e9f55 | [
"MIT"
] | 402 | 2020-09-22T16:38:16.000Z | 2022-03-30T09:56:03.000Z | InnerEye/ML/SSL/datamodules_and_datasets/datamodules.py | wensincai/InnerEye-DeepLearning | ccb53d01ad0f1c20336588c0066059b8de5266fd | [
"MIT"
] | 259 | 2020-09-23T09:32:33.000Z | 2022-03-30T18:15:01.000Z | InnerEye/ML/SSL/datamodules_and_datasets/datamodules.py | wensincai/InnerEye-DeepLearning | ccb53d01ad0f1c20336588c0066059b8de5266fd | [
"MIT"
] | 112 | 2020-09-23T00:12:58.000Z | 2022-03-31T07:39:55.000Z | # ------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -------------------------------------------------------------------... | 46.97076 | 120 | 0.641185 |
4a0232e62453fbabfdf00a3185500c872579341c | 28,282 | py | Python | frappe/__init__.py | gangadharkadam/letzfrappe | 51a2108acddd5ae9c5a58238a2097476a3de1775 | [
"MIT"
] | null | null | null | frappe/__init__.py | gangadharkadam/letzfrappe | 51a2108acddd5ae9c5a58238a2097476a3de1775 | [
"MIT"
] | null | null | null | frappe/__init__.py | gangadharkadam/letzfrappe | 51a2108acddd5ae9c5a58238a2097476a3de1775 | [
"MIT"
] | 1 | 2018-03-22T00:24:53.000Z | 2018-03-22T00:24:53.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
"""
globals attached to frappe module
+ some utility functions that should probably be moved
"""
from __future__ import unicode_literals
from werkzeug.local import Local, release_local
import os, importlib, inspect, ... | 31.181918 | 176 | 0.726292 |
4a0233a885c3b910e3ba1f8dc27a8042869ff1ec | 297 | py | Python | MFAEngine/apps/api/migrations/0015_delete_tokenconfig.py | justicevR/mfa_authentication_factor_v0.1 | b7302904c3eaa00801ca4d78fb47797b16427ad4 | [
"MIT"
] | null | null | null | MFAEngine/apps/api/migrations/0015_delete_tokenconfig.py | justicevR/mfa_authentication_factor_v0.1 | b7302904c3eaa00801ca4d78fb47797b16427ad4 | [
"MIT"
] | null | null | null | MFAEngine/apps/api/migrations/0015_delete_tokenconfig.py | justicevR/mfa_authentication_factor_v0.1 | b7302904c3eaa00801ca4d78fb47797b16427ad4 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.6 on 2021-09-08 11:44
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0014_userenrolled_secret'),
]
operations = [
migrations.DeleteModel(
name='TokenConfig',
),
]
| 17.470588 | 47 | 0.606061 |
4a02349e8e027865efbbd9c70adac43480b8f78d | 2,536 | py | Python | controller/simple_switch_api.py | gustavo978/helpful | 59e3fd062cff4451c9bf8268df78a24f93ff67b7 | [
"Unlicense"
] | null | null | null | controller/simple_switch_api.py | gustavo978/helpful | 59e3fd062cff4451c9bf8268df78a24f93ff67b7 | [
"Unlicense"
] | null | null | null | controller/simple_switch_api.py | gustavo978/helpful | 59e3fd062cff4451c9bf8268df78a24f93ff67b7 | [
"Unlicense"
] | 2 | 2018-06-06T14:10:23.000Z | 2020-04-07T17:20:55.000Z | import runtime_CLI
import argparse
import cmd
import os
import sys
import struct
import json
import bmpy_utils as utils
from sswitch_runtime import SimpleSwitch
from scapy.all import *
from functools import wraps
import bmpy_utils as utils
from bm_runtime.standard import Standard
from bm_runtime.standard.ttypes impor... | 33.813333 | 97 | 0.693218 |
4a0234d78e4fb8791fe204b48e86336401c039cd | 16,762 | py | Python | test/functional/rpc_decodescript.py | bitcoin-rush/bitcoinrush | 4329a6a7b9ce7a2188225f4abfc307e68de7dae0 | [
"MIT"
] | null | null | null | test/functional/rpc_decodescript.py | bitcoin-rush/bitcoinrush | 4329a6a7b9ce7a2188225f4abfc307e68de7dae0 | [
"MIT"
] | null | null | null | test/functional/rpc_decodescript.py | bitcoin-rush/bitcoinrush | 4329a6a7b9ce7a2188225f4abfc307e68de7dae0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test decoding scripts via decodescript RPC command."""
from test_framework.messages import CTransactio... | 71.32766 | 761 | 0.76053 |
4a0237c9a5ae7f868e4d954b83cdaac9226adde8 | 505 | py | Python | server/openslides/motions/migrations/0042_motionpoll_change_fields_2.py | squeakyflamingo/dlrgjugend-OpenSlides | 4de9e140fe51b01b471dfc98ef3061617424acf8 | [
"MIT"
] | null | null | null | server/openslides/motions/migrations/0042_motionpoll_change_fields_2.py | squeakyflamingo/dlrgjugend-OpenSlides | 4de9e140fe51b01b471dfc98ef3061617424acf8 | [
"MIT"
] | 1 | 2021-04-24T18:11:26.000Z | 2021-04-24T18:11:26.000Z | server/openslides/motions/migrations/0042_motionpoll_change_fields_2.py | DLRG-Jugend-NDS/OpenSlides | 03704e4852821ccd67fe23adb6e2c38b67d93732 | [
"MIT"
] | null | null | null | # Generated by jsangmeister on 2021-03-22 12:44
from django.db import migrations
from ...poll.migrations.poll_migration_helper import (
calculate_vote_fields,
set_is_pseudoanonymized,
)
class Migration(migrations.Migration):
dependencies = [
("motions", "0041_motionpoll_change_fields_1"),
]... | 24.047619 | 79 | 0.718812 |
4a0237d28deff262bfc369fb4248b28cfcf419fc | 10,221 | py | Python | tests/test_autorelease_trigger.py | dazuma/releasetool | c1ca9218f5c28734c3eb03c01ef4fd78d8b61a01 | [
"Apache-2.0"
] | 23 | 2018-10-09T15:14:21.000Z | 2022-01-24T12:18:57.000Z | tests/test_autorelease_trigger.py | dazuma/releasetool | c1ca9218f5c28734c3eb03c01ef4fd78d8b61a01 | [
"Apache-2.0"
] | 160 | 2018-09-21T22:16:02.000Z | 2022-03-30T21:51:35.000Z | tests/test_autorelease_trigger.py | dazuma/releasetool | c1ca9218f5c28734c3eb03c01ef4fd78d8b61a01 | [
"Apache-2.0"
] | 19 | 2018-10-08T20:39:39.000Z | 2021-07-28T15:17:14.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.996283 | 88 | 0.695724 |
4a0238aa2d561f9a2c14028fa15795f9b76a23c0 | 9,285 | py | Python | selfdrive/controls/lib/driver_monitor.py | J7orWV8P9/openpilot | 24e83ea06121598d6f6aa6e37c53161aae141b4c | [
"MIT"
] | null | null | null | selfdrive/controls/lib/driver_monitor.py | J7orWV8P9/openpilot | 24e83ea06121598d6f6aa6e37c53161aae141b4c | [
"MIT"
] | null | null | null | selfdrive/controls/lib/driver_monitor.py | J7orWV8P9/openpilot | 24e83ea06121598d6f6aa6e37c53161aae141b4c | [
"MIT"
] | null | null | null | import numpy as np
from common.realtime import DT_CTRL, DT_DMON
from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET
from common.filter_simple import FirstOrderFilter
from common.stat_live import RunningStatFilter
_AWARENESS_TIME = 600. # 1.6 minutes limit without user touching steering whe... | 42.788018 | 161 | 0.746688 |
4a023ba726ae0536550a5aa234c4a270c439bd04 | 27 | py | Python | Calculator/Squareroot.py | Wve-program/IndividualCalculator | 5b57b2f873c0ca36bb909490d16b147ce2e00d08 | [
"MIT"
] | null | null | null | Calculator/Squareroot.py | Wve-program/IndividualCalculator | 5b57b2f873c0ca36bb909490d16b147ce2e00d08 | [
"MIT"
] | null | null | null | Calculator/Squareroot.py | Wve-program/IndividualCalculator | 5b57b2f873c0ca36bb909490d16b147ce2e00d08 | [
"MIT"
] | null | null | null | import math
math.sqrt( x )
| 9 | 14 | 0.703704 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.