hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e21aa74fdbc519bddd054790b999af21ad2cf48d | 4,183 | py | Python | fixture/group.py | rooksever/python_training_skiba | be861d72d6f07fa1565ed12b97f6d4f04e6be1dc | [
"Apache-2.0"
] | null | null | null | fixture/group.py | rooksever/python_training_skiba | be861d72d6f07fa1565ed12b97f6d4f04e6be1dc | [
"Apache-2.0"
] | null | null | null | fixture/group.py | rooksever/python_training_skiba | be861d72d6f07fa1565ed12b97f6d4f04e6be1dc | [
"Apache-2.0"
] | null | null | null | from model.group import Group
class GroupHelper:
def __init__(self, app):
self.app = app
def open_groups_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0):
wd.find_element_by_link_text("groups").click(... | 33.464 | 117 | 0.634951 |
7a9f8b863701a4411fbf87fb790b83e1720ae23c | 4,790 | py | Python | mesh_tensorflow/utils.py | VonRosenchild/mesh | d26470554e086ea02e64154194097fbf517232bd | [
"Apache-2.0"
] | 1 | 2019-10-10T06:06:48.000Z | 2019-10-10T06:06:48.000Z | mesh_tensorflow/utils.py | HubBucket-Team/mesh | d26470554e086ea02e64154194097fbf517232bd | [
"Apache-2.0"
] | null | null | null | mesh_tensorflow/utils.py | HubBucket-Team/mesh | d26470554e086ea02e64154194097fbf517232bd | [
"Apache-2.0"
] | 1 | 2019-10-10T06:06:50.000Z | 2019-10-10T06:06:50.000Z | # coding=utf-8
# Copyright 2019 The Mesh TensorFlow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 34.460432 | 89 | 0.720877 |
fc6dc3f3d385779193597c4163f8dd085bab5e48 | 2,331 | py | Python | apps/modules/user/apis/adm_user.py | worry45678/osroom | 1191e306fea5613e9b1e454c0d11662d0ed26e7a | [
"BSD-2-Clause"
] | 1 | 2020-04-03T08:01:07.000Z | 2020-04-03T08:01:07.000Z | apps/modules/user/apis/adm_user.py | dhgdhg/osroom | 4d693eaab96503cadd391bf924bffedcd931a07c | [
"BSD-2-Clause"
] | null | null | null | apps/modules/user/apis/adm_user.py | dhgdhg/osroom | 4d693eaab96503cadd391bf924bffedcd931a07c | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*-coding:utf-8-*-
from flask import request
from apps.core.flask.login_manager import osr_login_required
from apps.configs.sys_config import METHOD_WARNING
from apps.core.blueprint import api
from apps.core.flask.permission import permission_required
from apps.core.flask.response import respon... | 27.423529 | 110 | 0.614329 |
dd034070809539ff94eb79ecc3208ab2777d63e5 | 21,375 | py | Python | tests/core/test_metric_result_integration.py | Tshimanga/pytorch-lightning | ff7305f74d4e097a45b6a4d8c0fff6d4f5aaa386 | [
"Apache-2.0"
] | 1 | 2021-12-17T15:33:29.000Z | 2021-12-17T15:33:29.000Z | tests/core/test_metric_result_integration.py | Tshimanga/pytorch-lightning | ff7305f74d4e097a45b6a4d8c0fff6d4f5aaa386 | [
"Apache-2.0"
] | null | null | null | tests/core/test_metric_result_integration.py | Tshimanga/pytorch-lightning | ff7305f74d4e097a45b6a4d8c0fff6d4f5aaa386 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 38.169643 | 116 | 0.63607 |
bb4f5863784c0167762e13d23195d3de4574f7c7 | 3,187 | py | Python | tests/test_mail_from_domain_provider.py | mvanholsteijn/cfn-ses-provider | 268f88205ddec7b4d286979834b251aa8319e430 | [
"Apache-2.0"
] | null | null | null | tests/test_mail_from_domain_provider.py | mvanholsteijn/cfn-ses-provider | 268f88205ddec7b4d286979834b251aa8319e430 | [
"Apache-2.0"
] | null | null | null | tests/test_mail_from_domain_provider.py | mvanholsteijn/cfn-ses-provider | 268f88205ddec7b4d286979834b251aa8319e430 | [
"Apache-2.0"
] | null | null | null | import uuid
import json
from mail_from_domain_provider import MailFromDomainProvider
def test_request_schema_has_correct_additional_properties():
mail_from_provider = MailFromDomainProvider()
assert "required" in mail_from_provider.request_schema
assert "Domain" in mail_from_provider.request_schema["requ... | 35.411111 | 86 | 0.66081 |
71fd5b6aab821a076772efe5323bf517ac1ad90a | 13,589 | py | Python | pandas/core/indexers.py | epizzigoni/pandas | 3b66021ecb74da2c35e16958121bd224d5de5264 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 6 | 2020-09-10T15:03:25.000Z | 2021-04-01T22:48:33.000Z | pandas/core/indexers.py | epizzigoni/pandas | 3b66021ecb74da2c35e16958121bd224d5de5264 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/indexers.py | epizzigoni/pandas | 3b66021ecb74da2c35e16958121bd224d5de5264 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2020-02-07T05:05:32.000Z | 2020-05-11T06:06:17.000Z | """
Low-dependency indexing utilities.
"""
import warnings
import numpy as np
from pandas._typing import Any, AnyArrayLike
from pandas.core.dtypes.common import (
is_array_like,
is_bool_dtype,
is_extension_array_dtype,
is_integer,
is_integer_dtype,
is_list_like,
)
from pandas.core.dtypes.gene... | 28.48847 | 88 | 0.592832 |
5faf7f57b4a4387c0c8991220b31354973078371 | 5,284 | py | Python | venv/Lib/site-packages/xero_python/payrolluk/models/address.py | RobMilinski/Xero-Starter-Branched-Test | c82382e674b34c2336ee164f5a079d6becd1ed46 | [
"MIT"
] | 77 | 2020-02-16T03:50:18.000Z | 2022-03-11T03:53:26.000Z | venv/Lib/site-packages/xero_python/payrolluk/models/address.py | RobMilinski/Xero-Starter-Branched-Test | c82382e674b34c2336ee164f5a079d6becd1ed46 | [
"MIT"
] | 50 | 2020-04-06T10:15:52.000Z | 2022-03-29T21:27:50.000Z | venv/Lib/site-packages/xero_python/payrolluk/models/address.py | RobMilinski/Xero-Starter-Branched-Test | c82382e674b34c2336ee164f5a079d6becd1ed46 | [
"MIT"
] | 27 | 2020-06-04T11:16:17.000Z | 2022-03-19T06:27:36.000Z | # coding: utf-8
"""
Xero Payroll UK
This is the Xero Payroll API for orgs in the UK region. # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
from xero_python.models import BaseModel
class Address(BaseModel):
"""NOTE: This class is a... | 26.552764 | 78 | 0.585352 |
0cb4596c854b8f1e86e007ab7c65d62740627392 | 3,523 | py | Python | azure-iot-device/azure/iot/device/provisioning/provisioning_device_client.py | necoh/azure-iot-sdk-python-preview | c17eccee9041d197e21c2f2df28b99014133960b | [
"MIT"
] | 35 | 2018-12-01T05:42:30.000Z | 2021-03-10T12:23:41.000Z | azure-iot-device/azure/iot/device/provisioning/provisioning_device_client.py | necoh/azure-iot-sdk-python-preview | c17eccee9041d197e21c2f2df28b99014133960b | [
"MIT"
] | 81 | 2018-11-20T20:01:43.000Z | 2019-09-06T23:57:17.000Z | azure-iot-device/azure/iot/device/provisioning/provisioning_device_client.py | necoh/azure-iot-sdk-python-preview | c17eccee9041d197e21c2f2df28b99014133960b | [
"MIT"
] | 18 | 2019-03-19T18:53:43.000Z | 2021-01-10T09:47:24.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
This m... | 44.594937 | 122 | 0.692875 |
58353348c1936db3db8e2d084c6681b73af829d9 | 6,024 | py | Python | DQMServices/Components/python/test/createElements.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | DQMServices/Components/python/test/createElements.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | DQMServices/Components/python/test/createElements.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | #!/usr/bin/env python
from builtins import range
import FWCore.ParameterSet.Config as cms
def createElements():
elements = list()
for i in range(0,10):
elements.append(cms.untracked.PSet(lowX = cms.untracked.double(0),
highX = cms.untracked.double(11),
... | 62.103093 | 107 | 0.452689 |
f90fa035f3ada405152e9f8ad950e13282b58b74 | 9,792 | py | Python | REBEL.py | root-user744/REBEL | f1e4fbc0f032bda38253f61e3a391a70815e8915 | [
"Apache-2.0"
] | 1 | 2021-01-11T11:27:48.000Z | 2021-01-11T11:27:48.000Z | REBEL.py | root-user744/REBEL | f1e4fbc0f032bda38253f61e3a391a70815e8915 | [
"Apache-2.0"
] | null | null | null | REBEL.py | root-user744/REBEL | f1e4fbc0f032bda38253f61e3a391a70815e8915 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
import subprocess
poster = """
\033[32m══════════════════════════════════════════════\033[0m
\033[31m██████\033[32m╗\033[0m \033[31m███████\0... | 43.327434 | 253 | 0.616932 |
9dfbb70b4c93cf57692ba576151a6d1a4e01010a | 5,054 | py | Python | tests/test_filesmodel.py | MarainInc/tmip-emat | 700514342cf263b484a4f42ac783100159dcddb2 | [
"BSD-3-Clause"
] | null | null | null | tests/test_filesmodel.py | MarainInc/tmip-emat | 700514342cf263b484a4f42ac783100159dcddb2 | [
"BSD-3-Clause"
] | null | null | null | tests/test_filesmodel.py | MarainInc/tmip-emat | 700514342cf263b484a4f42ac783100159dcddb2 | [
"BSD-3-Clause"
] | 1 | 2020-08-06T07:36:21.000Z | 2020-08-06T07:36:21.000Z |
import unittest
import os
from pytest import approx
import pandas as pd
import numpy as np
import emat
from emat.scope.scope import Scope
from emat.database.sqlite.sqlite_db import SQLiteDB
class TestCoreFilesMethods(unittest.TestCase):
def test_getters(self):
from emat.model.core_files.parsers impor... | 39.484375 | 92 | 0.600317 |
13b4413031a0f88e3ab61376515afe8132c830d0 | 3,279 | py | Python | libraries/base/qtWidgets/shuffleBox.py | PiRSquared17/r-orange | 6bc383f1db3c10c59e16b39daffc44df904ce031 | [
"Apache-2.0"
] | 1 | 2019-04-15T13:50:30.000Z | 2019-04-15T13:50:30.000Z | libraries/base/qtWidgets/shuffleBox.py | PiRSquared17/r-orange | 6bc383f1db3c10c59e16b39daffc44df904ce031 | [
"Apache-2.0"
] | null | null | null | libraries/base/qtWidgets/shuffleBox.py | PiRSquared17/r-orange | 6bc383f1db3c10c59e16b39daffc44df904ce031 | [
"Apache-2.0"
] | 1 | 2016-01-21T23:00:21.000Z | 2016-01-21T23:00:21.000Z | """Shuffle Box
This is a Red-R specific widget. The shuffleBox inherits from the listBox with the added ability that the order of items can be changed using the drag/drop feature (so they are shuffled). This is useful for setting the order in which items appear.
"""
from redRGUI import widgetState
from libraries.ba... | 49.681818 | 249 | 0.589814 |
e8097d5ea97775f66b4fa15a066f0b427f076e7d | 300 | py | Python | src/colusa/plugins/etr_techtarget.py | huuhoa/symphony | f8a364649634b4d864771b2c8a3103b714b6b9e2 | [
"MIT"
] | 6 | 2020-08-29T04:14:15.000Z | 2020-09-18T10:53:59.000Z | src/colusa/plugins/etr_techtarget.py | huuhoa/colusa | 07a0a60680c8085c5dca522e0237f7b5a5181dcb | [
"MIT"
] | 34 | 2021-09-07T15:17:38.000Z | 2022-03-25T15:16:40.000Z | src/colusa/plugins/etr_techtarget.py | huuhoa/colusa | 07a0a60680c8085c5dca522e0237f7b5a5181dcb | [
"MIT"
] | 2 | 2020-08-29T04:21:35.000Z | 2020-09-13T17:36:06.000Z | from colusa.etr import Extractor, register_extractor
@register_extractor('.techtarget.com/')
class TechTargetExtractor(Extractor):
def _find_main_content(self):
return self.bs.find('section', id='content-body')
def cleanup(self):
super(TechTargetExtractor, self).cleanup()
| 27.272727 | 57 | 0.733333 |
6ae3b1c132f7ff1220ac0d9c69c65cdfb99db7a8 | 5,150 | py | Python | Old/AutoShell0.2.py | frankie336/AutoShell | 3aef9fff7dfdcb10e8e8741585fd0331797358e8 | [
"MIT"
] | null | null | null | Old/AutoShell0.2.py | frankie336/AutoShell | 3aef9fff7dfdcb10e8e8741585fd0331797358e8 | [
"MIT"
] | null | null | null | Old/AutoShell0.2.py | frankie336/AutoShell | 3aef9fff7dfdcb10e8e8741585fd0331797358e8 | [
"MIT"
] | null | null | null | """
Created on Mon Jan 11 20:08:27 2021
#! Python 3.8
@author: Francis Neequaye
francis.neequaye@gmail.com
"""
"""
Script Instructions
_____
1.Enter the remote IP's addresses of
Cisco (or other) devices on each search
of the Hosts.dat file
2. Enter input commands on each line of
the Commands.dat file
"""
... | 22.587719 | 132 | 0.583107 |
38c0d2db0ede8d6f2b217ce9341f97115585b0db | 17,211 | py | Python | greentest/2.7pypy/test_httplib.py | Eugeny/gevent | adb7b838ed66c13abe5059605730bb4b4531bbcd | [
"MIT"
] | 70 | 2015-08-04T09:39:43.000Z | 2021-09-04T23:28:39.000Z | greentest/2.7pypy/test_httplib.py | Eugeny/gevent | adb7b838ed66c13abe5059605730bb4b4531bbcd | [
"MIT"
] | 8 | 2016-04-28T16:05:09.000Z | 2019-04-02T07:21:23.000Z | greentest/2.7pypy/test_httplib.py | Eugeny/gevent | adb7b838ed66c13abe5059605730bb4b4531bbcd | [
"MIT"
] | 299 | 2015-01-23T10:06:24.000Z | 2022-02-02T06:34:51.000Z | import httplib
import array
import httplib
import StringIO
import socket
import errno
import unittest
TestCase = unittest.TestCase
from test import test_support
HOST = test_support.HOST
class FakeSocket:
def __init__(self, text, fileclass=StringIO.StringIO):
self.text = text
self.fileclass = fil... | 36.463983 | 83 | 0.573587 |
19b8c64e356d3b03bae64110d7d302def1744ed1 | 413 | py | Python | src/args.py | mradbourne/jump-to-py | 42688123cfdf3e40330b5859d911d84d9a7601ca | [
"MIT"
] | null | null | null | src/args.py | mradbourne/jump-to-py | 42688123cfdf3e40330b5859d911d84d9a7601ca | [
"MIT"
] | null | null | null | src/args.py | mradbourne/jump-to-py | 42688123cfdf3e40330b5859d911d84d9a7601ca | [
"MIT"
] | null | null | null | import argparse
def get_args():
arg_parser = argparse.ArgumentParser(description='Process some integers.')
arg_parser.add_argument('command', metavar='N', type=str, nargs='+',
help='help here')
arg_parser.add_argument('--sum', dest='accumulate', action='store_const',
const=sum, default=max,... | 37.545455 | 78 | 0.68523 |
f2dc3e5ddf8d153d0a586aba52c1041f4d357b33 | 248 | py | Python | app_backend/databases/__init__.py | zhanghe06/bearing_project | 78a20fc321f72d3ae05c7ab7e52e01d02904e3fc | [
"MIT"
] | 1 | 2020-06-21T04:08:26.000Z | 2020-06-21T04:08:26.000Z | app_backend/databases/__init__.py | zhanghe06/bearing_project | 78a20fc321f72d3ae05c7ab7e52e01d02904e3fc | [
"MIT"
] | 13 | 2019-10-18T17:19:32.000Z | 2022-01-13T00:44:43.000Z | app_backend/databases/__init__.py | zhanghe06/bearing_project | 78a20fc321f72d3ae05c7ab7e52e01d02904e3fc | [
"MIT"
] | 5 | 2019-02-07T03:15:16.000Z | 2021-09-04T14:06:28.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: __init__.py
@time: 2020-02-29 23:23
"""
def func():
pass
class Main(object):
def __init__(self):
pass
if __name__ == '__main__':
pass
| 10.782609 | 26 | 0.612903 |
080c2ca58684fc90bb1a6259d2b86d039199c176 | 710 | py | Python | tests/exercises/travelling_salesman_test.py | AlexandraImbrisca/nondeterminism | f7935e22e4127abfefb29b5331805172c94e22f9 | [
"MIT"
] | 2 | 2022-02-11T17:20:31.000Z | 2022-02-24T09:36:23.000Z | tests/exercises/travelling_salesman_test.py | AlexandraImbrisca/nondeterminism | f7935e22e4127abfefb29b5331805172c94e22f9 | [
"MIT"
] | null | null | null | tests/exercises/travelling_salesman_test.py | AlexandraImbrisca/nondeterminism | f7935e22e4127abfefb29b5331805172c94e22f9 | [
"MIT"
] | null | null | null | import unittest
from helpers import Graph
from exercises import travelling_salesman
class TestTravellingSalesman(unittest.TestCase):
def setUp(self):
self.g1 = Graph([1, 2, 3], [(1, 2)])
self.g2 = Graph([1, 2, 3, 4], [(1, 2), (1, 4), (2, 3), (3, 4)])
self.g3 = Graph([1, 2, 3, 4],
... | 30.869565 | 75 | 0.571831 |
c75d80e269c62703f6a2b6f394c1cf133bc9a570 | 3,682 | py | Python | hexrd/ui/save_images_dialog.py | HEXRD/hexrdgui | d92915463f237e0521b5830655ae73bc5bcd9f80 | [
"BSD-3-Clause"
] | 13 | 2020-02-18T00:23:02.000Z | 2022-02-24T20:04:36.000Z | hexrd/ui/save_images_dialog.py | HEXRD/hexrdgui | d92915463f237e0521b5830655ae73bc5bcd9f80 | [
"BSD-3-Clause"
] | 656 | 2020-01-14T02:33:40.000Z | 2022-03-26T15:31:17.000Z | hexrd/ui/save_images_dialog.py | HEXRD/hexrdgui | d92915463f237e0521b5830655ae73bc5bcd9f80 | [
"BSD-3-Clause"
] | 6 | 2020-01-17T15:02:53.000Z | 2020-11-01T22:02:48.000Z | from PySide2.QtCore import QThreadPool
from PySide2.QtWidgets import QFileDialog, QInputDialog
from hexrd.ui.hexrd_config import HexrdConfig
from hexrd.ui.image_load_manager import ImageLoadManager
from hexrd.ui.ui_loader import UiLoader
from hexrd.ui.progress_dialog import ProgressDialog
from hexrd.ui.async_worker im... | 38.757895 | 78 | 0.606464 |
11050b66f71057821f0a2076fcbba0a4ad6f734e | 13,390 | py | Python | Arty-Z7-10/components/ext_sources/u-boot-ectf/tools/dtoc/dtoc.py | UNO-NULLify/eCTF19 | 1c1220445187bccb15e099760ba6cc42768af24c | [
"Apache-2.0"
] | 31 | 2018-01-16T17:11:44.000Z | 2022-03-16T13:51:24.000Z | Arty-Z7-10/components/ext_sources/u-boot-ectf/tools/dtoc/dtoc.py | UNO-NULLify/eCTF19 | 1c1220445187bccb15e099760ba6cc42768af24c | [
"Apache-2.0"
] | 1 | 2021-04-29T09:08:08.000Z | 2021-05-08T07:57:06.000Z | Arty-Z7-10/components/ext_sources/u-boot-ectf/tools/dtoc/dtoc.py | UNO-NULLify/eCTF19 | 1c1220445187bccb15e099760ba6cc42768af24c | [
"Apache-2.0"
] | 30 | 2018-05-02T08:43:27.000Z | 2022-01-23T03:25:54.000Z | #!/usr/bin/python
#
# Copyright (C) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# SPDX-License-Identifier: GPL-2.0+
#
import copy
from optparse import OptionError, OptionParser
import os
import struct
import sys
# Bring in the patman libraries
our_path = os.path.dirname(os.path.realpath(__file__))
... | 34.960836 | 85 | 0.557879 |
df788209b8b1bada71349320ba8150284952b204 | 4,555 | py | Python | mission_to_mars.py | ARMcK-hub/web-scraping-challenge | 9ced38c2e463271b8d1342713ea3e7a6b6bdba60 | [
"MIT"
] | null | null | null | mission_to_mars.py | ARMcK-hub/web-scraping-challenge | 9ced38c2e463271b8d1342713ea3e7a6b6bdba60 | [
"MIT"
] | 3 | 2022-02-24T08:26:31.000Z | 2022-02-28T05:40:13.000Z | mission_to_mars.py | ARMcK-hub/Mission-to-Mars | 20d470b08a7df554f8d26f248694574a2e190128 | [
"MIT"
] | null | null | null | '''
Mission to Mars Web Scrape Script
Author: Andrew McKinney
Creation Date: 2020-02-14
'''
# importing dependencies
from bs4 import BeautifulSoup
import requests
import pandas as pd
from splinter import Browser
def houston():
### Top NASA new title and paragraph
# defining web url
# NOTE: THIS HAS PRO... | 29.577922 | 120 | 0.661471 |
bd8b49bbdffdfe9a682449700fdcea41308a9520 | 5,371 | py | Python | interfaceTest/testCase/user/testAddAddress.py | liberjiang/interface_framework | ab25e93c1e079da3df8441fca620927061aae252 | [
"Apache-2.0"
] | null | null | null | interfaceTest/testCase/user/testAddAddress.py | liberjiang/interface_framework | ab25e93c1e079da3df8441fca620927061aae252 | [
"Apache-2.0"
] | null | null | null | interfaceTest/testCase/user/testAddAddress.py | liberjiang/interface_framework | ab25e93c1e079da3df8441fca620927061aae252 | [
"Apache-2.0"
] | null | null | null | import unittest
import paramunittest
import readConfig as readConfig
from common import Log as Log
from common import common
from common import configHttp as ConfigHttp
from common import businessCommon
addAddress_xls = common.get_xls("userCase.xlsx", "addAddress")
localReadConfig = readConfig.ReadConfig()
c... | 33.779874 | 204 | 0.566003 |
1ba7b97f7bceba8dcb82401b0dafd23b7f22bc66 | 1,165 | py | Python | polls/migrations/0001_initial.py | Etuloser/mysite | d7e50749581d186f74c30744dfd70ce4bf96524a | [
"BSD-3-Clause"
] | null | null | null | polls/migrations/0001_initial.py | Etuloser/mysite | d7e50749581d186f74c30744dfd70ce4bf96524a | [
"BSD-3-Clause"
] | null | null | null | polls/migrations/0001_initial.py | Etuloser/mysite | d7e50749581d186f74c30744dfd70ce4bf96524a | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.0.1 on 2018-01-25 02:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Choice',
fields=[
... | 31.486486 | 114 | 0.577682 |
c5d009e000f62ee6cf4552d7da9766f100d0bbab | 3,083 | py | Python | ddsp/training/data_preparation/prepare_tfrecord.py | jeonghopark/ddsp | 6858ba7df1d6bf6c2208e19bafd8aa5c473c57eb | [
"Apache-2.0"
] | 2 | 2020-02-07T01:03:29.000Z | 2020-04-24T13:53:05.000Z | ddsp/training/data_preparation/prepare_tfrecord.py | jeonghopark/ddsp | 6858ba7df1d6bf6c2208e19bafd8aa5c473c57eb | [
"Apache-2.0"
] | null | null | null | ddsp/training/data_preparation/prepare_tfrecord.py | jeonghopark/ddsp | 6858ba7df1d6bf6c2208e19bafd8aa5c473c57eb | [
"Apache-2.0"
] | 2 | 2020-04-07T06:10:15.000Z | 2020-05-16T04:36:10.000Z | # Copyright 2020 The DDSP Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 30.524752 | 80 | 0.733377 |
f7b503daa7da583c38d3832b58cd3f503df2ce44 | 223 | py | Python | tests/test_linotype.py | techdragon/linotype | 457915c0d2e895c235471a7a0ab32710bd9a8de5 | [
"BSD-2-Clause"
] | null | null | null | tests/test_linotype.py | techdragon/linotype | 457915c0d2e895c235471a7a0ab32710bd9a8de5 | [
"BSD-2-Clause"
] | null | null | null | tests/test_linotype.py | techdragon/linotype | 457915c0d2e895c235471a7a0ab32710bd9a8de5 | [
"BSD-2-Clause"
] | null | null | null |
from click.testing import CliRunner
from linotype.__main__ import main
def test_main():
runner = CliRunner()
result = runner.invoke(main, [])
assert result.output == '()\n'
assert result.exit_code == 0
| 17.153846 | 36 | 0.67713 |
9043b9f7990a9df2e0599006a628dcfbe512c534 | 1,182 | py | Python | azure/mgmt/network/v2016_09_01/models/effective_network_security_group_list_result.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | azure/mgmt/network/v2016_09_01/models/effective_network_security_group_list_result.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2016_09_01/models/effective_network_security_group_list_result.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # 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 ... | 35.818182 | 79 | 0.617597 |
16017decf0baaada2d9d5472a71a8503188fa41a | 2,539 | py | Python | CS116/a06-j4mai/a06-j4mai/a06q2.py | JohnMai1994/CS116-2018_Winter_Term | dc95e63b9b4ff853c0bb19432dbd09512d4740a1 | [
"MIT"
] | null | null | null | CS116/a06-j4mai/a06-j4mai/a06q2.py | JohnMai1994/CS116-2018_Winter_Term | dc95e63b9b4ff853c0bb19432dbd09512d4740a1 | [
"MIT"
] | null | null | null | CS116/a06-j4mai/a06-j4mai/a06q2.py | JohnMai1994/CS116-2018_Winter_Term | dc95e63b9b4ff853c0bb19432dbd09512d4740a1 | [
"MIT"
] | null | null | null | ##===============================================
## Jiadong Mai (20557203)
## CS 116 Winter 2018
## Assignment 06, Question 2
##===============================================
import check
# Question 2
# find_bigger(ints) consumes a (listof Int), ints, and returns a (listof Int)
# which values in the list that... | 40.301587 | 82 | 0.587239 |
b40bb74f7993fda1dd802c692002947f60e3619b | 499 | py | Python | arts-main/arts_core/migrations/0006_auto_20200211_1621.py | conix-center/arts | 3ee48a4de49be3c6df744673581720d3eeaa9923 | [
"BSD-3-Clause"
] | 3 | 2022-01-25T16:36:19.000Z | 2022-03-04T06:00:16.000Z | arts-main/arts_core/migrations/0006_auto_20200211_1621.py | conix-center/arts | 3ee48a4de49be3c6df744673581720d3eeaa9923 | [
"BSD-3-Clause"
] | 8 | 2020-09-17T18:13:47.000Z | 2022-02-23T20:55:59.000Z | arts-main/arts_core/migrations/0006_auto_20200211_1621.py | conix-center/arts | 3ee48a4de49be3c6df744673581720d3eeaa9923 | [
"BSD-3-Clause"
] | 1 | 2020-11-12T09:34:14.000Z | 2020-11-12T09:34:14.000Z | # Generated by Django 3.0.3 on 2020-02-11 16:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('arts_core', '0005_auto_20200210_1706'),
]
operations = [
migrations.AlterField(
model_name='mod... | 24.95 | 128 | 0.647295 |
4fcb674126a49190b28d9266b7075c64142f668f | 999 | py | Python | tspetl/stock_tool.py | jdgwartney/tsp-etl | 70540d3d13261849af512d97c153fc4f1e414bf5 | [
"Apache-2.0"
] | null | null | null | tspetl/stock_tool.py | jdgwartney/tsp-etl | 70540d3d13261849af512d97c153fc4f1e414bf5 | [
"Apache-2.0"
] | null | null | null | tspetl/stock_tool.py | jdgwartney/tsp-etl | 70540d3d13261849af512d97c153fc4f1e414bf5 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 BMC Software, 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 ... | 27 | 74 | 0.706707 |
c1a3cfa16a65cf4e0bc781c28ab20ed788c7f249 | 2,600 | py | Python | 1705/351/tempfiletest.py | bdbaddog/dummy-for-migration-attachments | ad3b46d50b4c4b5e79363ae2fdcab3f15e1435de | [
"MIT"
] | null | null | null | 1705/351/tempfiletest.py | bdbaddog/dummy-for-migration-attachments | ad3b46d50b4c4b5e79363ae2fdcab3f15e1435de | [
"MIT"
] | null | null | null | 1705/351/tempfiletest.py | bdbaddog/dummy-for-migration-attachments | ad3b46d50b4c4b5e79363ae2fdcab3f15e1435de | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, publish,
... | 30.232558 | 83 | 0.703077 |
1e4459c7be221a95b486ae16c1fa2ae7ba81d454 | 7,408 | py | Python | evalml/data_checks/id_columns_data_check.py | ColinRTaylor/evalml | ef4374494b50e22757f44edb753e54efbf71f430 | [
"BSD-3-Clause"
] | null | null | null | evalml/data_checks/id_columns_data_check.py | ColinRTaylor/evalml | ef4374494b50e22757f44edb753e54efbf71f430 | [
"BSD-3-Clause"
] | 1 | 2022-02-19T12:59:09.000Z | 2022-02-19T12:59:09.000Z | evalml/data_checks/id_columns_data_check.py | isabella232/evalml | 5b372d0dfac05ff9b7e41eb494a9df1bf2da4a9d | [
"BSD-3-Clause"
] | null | null | null | """Data check that checks if any of the features are likely to be ID columns."""
from evalml.data_checks import (
DataCheck,
DataCheckActionCode,
DataCheckActionOption,
DataCheckMessageCode,
DataCheckWarning,
)
from evalml.utils import infer_feature_types
class IDColumnsDataCheck(DataCheck):
"... | 40.26087 | 121 | 0.470572 |
5902c4103e325ab859e0b6bccadb77b72f64c38e | 807 | py | Python | examples/suggest.py | ericmc21/python-api | eacc3c7f2e14103ff4d2138b85905cefdb6946c6 | [
"Apache-2.0"
] | null | null | null | examples/suggest.py | ericmc21/python-api | eacc3c7f2e14103ff4d2138b85905cefdb6946c6 | [
"Apache-2.0"
] | null | null | null | examples/suggest.py | ericmc21/python-api | eacc3c7f2e14103ff4d2138b85905cefdb6946c6 | [
"Apache-2.0"
] | null | null | null | import config
config.setup_examples()
import infermedica_api
if __name__ == '__main__':
api = infermedica_api.get_api()
# Prepare the diagnosis request object
request = infermedica_api.Diagnosis(sex='male', age=30)
request.add_symptom('s_1193', 'present')
request.add_symptom('s_488', 'present')
... | 25.21875 | 59 | 0.582404 |
941cbf414ce71f3e04619fa1d65e9080e660d806 | 6,276 | py | Python | database.py | Shafiq-Kyazze/GazProm-Data-Engineering-Project | 70caec74e925f84272436b6c85acfe2918ab91ae | [
"MIT"
] | null | null | null | database.py | Shafiq-Kyazze/GazProm-Data-Engineering-Project | 70caec74e925f84272436b6c85acfe2918ab91ae | [
"MIT"
] | null | null | null | database.py | Shafiq-Kyazze/GazProm-Data-Engineering-Project | 70caec74e925f84272436b6c85acfe2918ab91ae | [
"MIT"
] | null | null | null | ##### database.py ####
from config import Database_URI
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
import os
import pandas as pd
from datetime import datetime
from models import HEADR,CONSU,Base
from sqlalchemy.exc import IntegrityError
import shutil
#Connecting to database
engine ... | 51.867769 | 143 | 0.662843 |
279d297050b7eb4b5ec43cc2a980a9250677d9fc | 3,201 | py | Python | test/test_search_entity.py | kryptoslogic/unpacme-python | 86529853f24ed00afa7e90b87fa64104dfc68dfe | [
"MIT"
] | null | null | null | test/test_search_entity.py | kryptoslogic/unpacme-python | 86529853f24ed00afa7e90b87fa64104dfc68dfe | [
"MIT"
] | null | null | null | test/test_search_entity.py | kryptoslogic/unpacme-python | 86529853f24ed00afa7e90b87fa64104dfc68dfe | [
"MIT"
] | null | null | null | """
UnpacMe
# Introduction Welcome to the UNPACME API! All the malware unpacking and file analysis features that you are familiar with on the [unpac.me](https://www.unpac.me/) website are available through our API. You can easily integrate our unpacker into your malware analysis pipeline and begin unpacking a... | 88.916667 | 2,573 | 0.739144 |
9b816d06f19a09f6df42533fd92081c66a2343d9 | 11,778 | py | Python | google/ads/googleads/v4/services/services/billing_setup_service/transports/grpc.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/services/services/billing_setup_service/transports/grpc.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v4/services/services/billing_setup_service/transports/grpc.py | batardo/google-ads-python | a39748521847e85138fca593f3be2681352ad024 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 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... | 41.471831 | 99 | 0.630667 |
43077cf62285f87e0dcd29ca4a761335b0191c06 | 62,785 | py | Python | YutanpaNet.py | MogicianEik/YutanpaNet | 04cd79c51be37d23888db067712946d5620976cf | [
"MIT"
] | null | null | null | YutanpaNet.py | MogicianEik/YutanpaNet | 04cd79c51be37d23888db067712946d5620976cf | [
"MIT"
] | null | null | null | YutanpaNet.py | MogicianEik/YutanpaNet | 04cd79c51be37d23888db067712946d5620976cf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
import networkx as nx
import math
import os
from hmmscanParser import hmmParser
import argparse
from toolz import unique
from Bio import SeqIO
import subprocess
import more_itertools as mit
import operator
import... | 48.632843 | 389 | 0.582432 |
404868d98d0d258657091e11cf84188edb0ff69e | 11,559 | py | Python | python/GafferTest/ComputeNodeTest.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | python/GafferTest/ComputeNodeTest.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | python/GafferTest/ComputeNodeTest.py | dboogert/gaffer | d2ce0eb7134a33ceee375d0a3676129a9bdcfbc6 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | 30.989276 | 107 | 0.652479 |
f687a40b299c1ba79ff792e3f3dfcad30aaba5cf | 1,418 | py | Python | software_testing/exercises/exercise5/kata_bowling.py | rafaelleinio/software-testing | 0cb9e95b65675121360a0e47ad127666c6c5ae7d | [
"MIT"
] | 1 | 2021-02-28T02:12:35.000Z | 2021-02-28T02:12:35.000Z | software_testing/exercises/exercise5/kata_bowling.py | rafaelleinio/software-testing | 0cb9e95b65675121360a0e47ad127666c6c5ae7d | [
"MIT"
] | null | null | null | software_testing/exercises/exercise5/kata_bowling.py | rafaelleinio/software-testing | 0cb9e95b65675121360a0e47ad127666c6c5ae7d | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import List
class KataBowling:
def __init__(self, rolls: List[int] = None):
self.rolls = rolls if rolls else []
def roll(self, round_score: int):
return KataBowling(rolls=self.rolls + [round_score])
@property
def score(self) -> int:
... | 30.826087 | 74 | 0.594499 |
b814468ae521cb1f61fc8db1f361d2a3eabbcc73 | 16,680 | py | Python | items/models.py | kgdunn/Django-app-Literature-database | d21358c9da6d470885a576a8944e4aa35a01ba7e | [
"BSD-2-Clause"
] | null | null | null | items/models.py | kgdunn/Django-app-Literature-database | d21358c9da6d470885a576a8944e4aa35a01ba7e | [
"BSD-2-Clause"
] | null | null | null | items/models.py | kgdunn/Django-app-Literature-database | d21358c9da6d470885a576a8944e4aa35a01ba7e | [
"BSD-2-Clause"
] | null | null | null | from django.db import models
from django.contrib import admin
from django.core.urlresolvers import reverse
from django.template.defaultfilters import slugify
from utils import unique_slugify
# Standard library imports
import re
import unicodedata
# Custom manager for the items
class LatestItemManager(models.Manager):... | 34.391753 | 83 | 0.547062 |
8d58aee32f2fbb8d3fd4aa72064c7c346bdea0a0 | 2,590 | py | Python | hypixel/guild.py | SomePr0grammer/aHypixel | 35a2db37fe780bfd31bc116796ea850c98d219d6 | [
"MIT"
] | null | null | null | hypixel/guild.py | SomePr0grammer/aHypixel | 35a2db37fe780bfd31bc116796ea850c98d219d6 | [
"MIT"
] | null | null | null | hypixel/guild.py | SomePr0grammer/aHypixel | 35a2db37fe780bfd31bc116796ea850c98d219d6 | [
"MIT"
] | null | null | null | from .errors import *
from .player import Player
import aiohttp
class Guild:
"""
Guild class. Represents a Hypixel guild.
Methods:
ʟ get_guild: Get a guild by parameters
parameters
ʟ *: Indicates the following parameters are positional (e.g: method(paramete... | 34.533333 | 103 | 0.420077 |
3ab688fd7fedd95e77b913c57780870bd1cf76c8 | 540 | py | Python | src/python/models/setup.py | openhisilicon/taranis | 4b852a64a9aba0a6db3e87ed6dc720b0889fb3e4 | [
"BSD-3-Clause"
] | 5 | 2020-07-20T09:24:27.000Z | 2021-11-16T11:07:51.000Z | src/python/models/setup.py | openhisilicon/taranis | 4b852a64a9aba0a6db3e87ed6dc720b0889fb3e4 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T00:44:47.000Z | 2021-06-02T00:44:47.000Z | src/python/models/setup.py | openhisilicon/taranis | 4b852a64a9aba0a6db3e87ed6dc720b0889fb3e4 | [
"BSD-3-Clause"
] | 1 | 2021-06-17T06:24:13.000Z | 2021-06-17T06:24:13.000Z | # coding: utf-8
"""
Taranis Client
"""
from setuptools import setup # noqa: H301
NAME = "taranis-cli"
VERSION = "0.2.3"
REQUIRES = ["grpcio==1.21.1", "grpcio-tools==1.21.1"]
setup(
name=NAME,
version=VERSION,
description="Taranis client",
author="Pierre Letessier",
author_email="",
url="... | 19.285714 | 53 | 0.62963 |
c9a6c5a7db6f0cdb245f980eba3536c0cb8bbff7 | 13,622 | py | Python | venv/lib/python3.6/site-packages/nlp/datasets/c4/8f34fcecc5ffb5e83c649d6dff3a6079f6312e65b5a26587c9c3e27b3b741c87/c4.py | MachineLearningBCAM/minimax-risk-classifier | 82586c632268c103de269bcbffa5f7849b174a29 | [
"MIT"
] | 2 | 2021-09-28T01:36:21.000Z | 2021-12-22T08:24:17.000Z | venv/lib/python3.6/site-packages/nlp/datasets/c4/8f34fcecc5ffb5e83c649d6dff3a6079f6312e65b5a26587c9c3e27b3b741c87/c4.py | MachineLearningBCAM/minimax-risk-classifier | 82586c632268c103de269bcbffa5f7849b174a29 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/nlp/datasets/c4/8f34fcecc5ffb5e83c649d6dff3a6079f6312e65b5a26587c9c3e27b3b741c87/c4.py | MachineLearningBCAM/minimax-risk-classifier | 82586c632268c103de269bcbffa5f7849b174a29 | [
"MIT"
] | 1 | 2020-12-08T10:36:30.000Z | 2020-12-08T10:36:30.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace NLP Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | 39.947214 | 181 | 0.62355 |
7e7c93527bba9d2d99de7d499ed3ce8ae26bffda | 161,748 | py | Python | lib/sqlalchemy/orm/query.py | leamingrad/sqlalchemy | 56fb68ca8620a211ca29b3d47d649dfa332d354a | [
"MIT"
] | null | null | null | lib/sqlalchemy/orm/query.py | leamingrad/sqlalchemy | 56fb68ca8620a211ca29b3d47d649dfa332d354a | [
"MIT"
] | null | null | null | lib/sqlalchemy/orm/query.py | leamingrad/sqlalchemy | 56fb68ca8620a211ca29b3d47d649dfa332d354a | [
"MIT"
] | null | null | null | # orm/query.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""The Query class and support.
Defines the :class:`.Query` class, the central
constru... | 37.200552 | 102 | 0.596236 |
6553d2f7a1f6788c9eab7c70882c8f6861f46714 | 463 | py | Python | hktm/lesson_contents/RenderContent_K362.py | karlneco/kanji-test-maker | de0ae52d8de28fe81be2ec49018acf1ad0f2308e | [
"MIT"
] | 2 | 2019-12-11T07:09:57.000Z | 2020-02-02T23:34:51.000Z | hktm/lesson_contents/RenderContent_K362.py | karlneco/kanji-test-maker | de0ae52d8de28fe81be2ec49018acf1ad0f2308e | [
"MIT"
] | 1 | 2021-10-04T05:59:17.000Z | 2021-10-04T05:59:17.000Z | hktm/lesson_contents/RenderContent_K362.py | karlneco/kanji-test-maker | de0ae52d8de28fe81be2ec49018acf1ad0f2308e | [
"MIT"
] | null | null | null | from hktm.lesson_contents.RenderContent_KT36 import RenderContentKT36
from yattag import Doc
class RenderContentK362(RenderContentKT36):
"""
This is the class for rendering kanji tests.
"""
#################################################################### constructor
def __init__(self,question_bundl... | 28.9375 | 80 | 0.557235 |
c1f5c366b3d15429d43775f7a7fb25d748f46729 | 3,219 | py | Python | src/streamlink/plugins/reuters.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/reuters.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/reuters.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | import logging
import re
from streamlink.plugin import Plugin, PluginError, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
log = logging.getLogger(__name__)
@pluginmatcher(re.compile(
r'https?://([\w-]+\.)*reuters\.(com|tv)'
))
class Reuters(Plugin):
_re_fus... | 36.168539 | 125 | 0.559491 |
b049d472c87039837e1eb8b9095d20454f87c7a4 | 314 | py | Python | Chapter07/codes/sobel.py | atpost/Computer-Vision-with-Python-3 | cb4c0c5d88b6cd291b5fff5c4a91f605d8b0f3c0 | [
"MIT"
] | 60 | 2017-09-12T16:38:00.000Z | 2022-03-28T15:24:37.000Z | Chapter07/codes/sobel.py | atpost/Computer-Vision-with-Python-3 | cb4c0c5d88b6cd291b5fff5c4a91f605d8b0f3c0 | [
"MIT"
] | 1 | 2020-03-02T16:10:56.000Z | 2020-07-30T05:12:10.000Z | Chapter07/codes/sobel.py | atpost/Computer-Vision-with-Python-3 | cb4c0c5d88b6cd291b5fff5c4a91f605d8b0f3c0 | [
"MIT"
] | 62 | 2017-09-06T09:18:42.000Z | 2022-03-24T14:34:45.000Z | import cv2
img = cv2.imread("image.jpg")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
x_edges = cv2.Sobel(gray,-1,1,0,ksize=5)
cv2.imwrite("sobel_edges_x.jpg", x_edges)
y_edges = cv2.Sobel(gray,-1,0,1,ksize=5)
cv2.imwrite("sobel_edges_y.jpg", y_edges)
cv2.imshow("xedges", x_edges)
cv2.imshow("yedges", y_edges)
| 31.4 | 44 | 0.732484 |
5294c83c40c73c02bbbd8b0d1c95386d3dc05924 | 3,452 | py | Python | main/courses/videos/tests/test_views_selenium.py | csev/class2go | f9419ae16448d20fc882170f95cfd1c4dc3331ca | [
"Apache-2.0"
] | 2 | 2015-10-31T23:12:52.000Z | 2021-01-19T11:03:00.000Z | main/courses/videos/tests/test_views_selenium.py | sunu/class2go | 653b1edd01d390ad387dd788e0fc2d89445fbcab | [
"Apache-2.0"
] | null | null | null | main/courses/videos/tests/test_views_selenium.py | sunu/class2go | 653b1edd01d390ad387dd788e0fc2d89445fbcab | [
"Apache-2.0"
] | null | null | null | from django.core.urlresolvers import reverse
from lxml import etree
from nose.plugins.attrib import attr
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
from test_harness.test_base_selenium import InstructorBase, StudentBase
def DEBUG(s):
"""A useful method for adding tracing to he... | 45.421053 | 101 | 0.659328 |
48d1830c47042a8cc7473d35bdff72f78ecba625 | 1,709 | py | Python | tests/tools/test_mean.py | Jakondak/differential-privacy-library | c26bab301f2554b52c8bd836b28091f2f2611cd4 | [
"MIT"
] | 1 | 2020-05-03T06:06:44.000Z | 2020-05-03T06:06:44.000Z | tests/tools/test_mean.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | null | null | null | tests/tools/test_mean.py | dohmatob/differential-privacy-library | 1a17bf0e3bf7d18d5c19258abbf81c27fd9a5e16 | [
"MIT"
] | 1 | 2022-01-02T11:29:30.000Z | 2022-01-02T11:29:30.000Z | from unittest import TestCase
import numpy as np
from diffprivlib.tools.utils import mean
from diffprivlib.utils import PrivacyLeakWarning
class TestMean(TestCase):
def test_not_none(self):
mech = mean
self.assertIsNotNone(mech)
def test_no_params(self):
a = np.array([1, 2, 3])
... | 27.564516 | 65 | 0.597425 |
3abefd360896c2c57f6387256de13e37952a314e | 9,229 | py | Python | decision reasoning/profiling report/temp_list/div.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | 1 | 2022-01-18T01:53:34.000Z | 2022-01-18T01:53:34.000Z | decision reasoning/profiling report/temp_list/div.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | null | null | null | decision reasoning/profiling report/temp_list/div.py | kidrabit/Data-Visualization-Lab-RND | baa19ee4e9f3422a052794e50791495632290b36 | [
"Apache-2.0"
] | null | null | null | def input_query_div(cnt_create, attributes, tasks, visType):
div = '''
<div id="vis''' + str(cnt_create) + '''" style="display: flex; height: 250px; margin-bottom: 5px; border: 3px solid #74788D;">
<div id="list">
<table>
<tr>
<th... | 82.401786 | 285 | 0.477842 |
0a20476ac032f075e17884970df9ef15cdca109c | 4,491 | py | Python | models.py | sharan-amutharasu/game-doble | f8f8e9c29b50b89e170d4f8019f9244b4f1f197f | [
"MIT"
] | null | null | null | models.py | sharan-amutharasu/game-doble | f8f8e9c29b50b89e170d4f8019f9244b4f1f197f | [
"MIT"
] | null | null | null | models.py | sharan-amutharasu/game-doble | f8f8e9c29b50b89e170d4f8019f9244b4f1f197f | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
#add_to_end: 2017-08-24 08:42:19.063507
from django.urls import reverse #Used to generate URLs by reversing the URL patterns
import uuid # Required for unique book instances
from django.contrib.auth.models import User
from datetime import datetime
#add_to_end: ... | 32.078571 | 97 | 0.764863 |
4600724508364a1d56a810feb294edee747f1b6b | 848 | py | Python | state.py | shreshthtuli/Achieve31 | 966fbd8b40d3a300b92adff6613d1a28bacc3272 | [
"MIT"
] | null | null | null | state.py | shreshthtuli/Achieve31 | 966fbd8b40d3a300b92adff6613d1a28bacc3272 | [
"MIT"
] | null | null | null | state.py | shreshthtuli/Achieve31 | 966fbd8b40d3a300b92adff6613d1a28bacc3272 | [
"MIT"
] | null | null | null | from utils import *
class State:
def __init__(self, dealer, mySum=0):
self.oneTwoThree = [False, False, False]
self.special = 0
self.sum = mySum
self.dealer = dealer
def action(self, card):
# print("Card = ", card)
if card <= 3 and card > 0 and not self.oneTwoTh... | 28.266667 | 108 | 0.522406 |
b06a6ffa4ae8f366c04af8241ee5d07488d86502 | 1,585 | py | Python | empower/cli/lteslices_commands/delete_lte_slice.py | ericbrinckhaus/empower-runtime-modified | ecd7c1e9f1c19a629abdcb5c55257377313246ea | [
"Apache-2.0"
] | null | null | null | empower/cli/lteslices_commands/delete_lte_slice.py | ericbrinckhaus/empower-runtime-modified | ecd7c1e9f1c19a629abdcb5c55257377313246ea | [
"Apache-2.0"
] | null | null | null | empower/cli/lteslices_commands/delete_lte_slice.py | ericbrinckhaus/empower-runtime-modified | ecd7c1e9f1c19a629abdcb5c55257377313246ea | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2019 Roberto Riggio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 28.818182 | 75 | 0.682019 |
c4cbb51422a76ecfb5555ef1ebcca4f34a37b1f2 | 2,298 | py | Python | hoods/views.py | badruu/neighborhood | 85d30f7451f921c533dc4463aad76ed2d39f8023 | [
"MIT"
] | null | null | null | hoods/views.py | badruu/neighborhood | 85d30f7451f921c533dc4463aad76ed2d39f8023 | [
"MIT"
] | 6 | 2021-03-19T01:10:18.000Z | 2022-03-11T23:49:18.000Z | hoods/views.py | badruu/neighborhood | 85d30f7451f921c533dc4463aad76ed2d39f8023 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.http import HttpResponse, Http404, HttpResponseRedirect
import datetime as dt
from .models import Hoods, Business
from users.models import Profile
from .forms import *
from django.contrib.auth.decorators import login_required
@login_required(login_url="/users/l... | 35.90625 | 142 | 0.67537 |
6bcaf858720334420cf6a5768c5cfa8cce603e67 | 600 | py | Python | tests/test_cli.py | OpenCorpora/opencorpora-tools | a4064b911347cbb1ded88e108e135186aeeb27e9 | [
"MIT"
] | 3 | 2017-02-24T17:25:28.000Z | 2019-02-27T22:09:54.000Z | tests/test_cli.py | OpenCorpora/opencorpora-tools | a4064b911347cbb1ded88e108e135186aeeb27e9 | [
"MIT"
] | null | null | null | tests/test_cli.py | OpenCorpora/opencorpora-tools | a4064b911347cbb1ded88e108e135186aeeb27e9 | [
"MIT"
] | 1 | 2020-10-18T21:38:21.000Z | 2020-10-18T21:38:21.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import mock
import unittest
import tempfile
from opencorpora import cli
class CliTest(unittest.TestCase):
@mock.patch('opencorpora.cli.urlopen')
def test_download(self, urlopen):
urlopen.return_value.read.return_value = ''
with tem... | 27.272727 | 51 | 0.588333 |
b96acdd4c0d3a9105bc459a96bbde7b13053eb66 | 10,971 | py | Python | test/finance/test_data_providers.py | charmerDark/qiskit-aqua | c1564af8792c6664670807614a378147fd04d28f | [
"Apache-2.0"
] | 83 | 2018-07-25T02:45:48.000Z | 2018-12-15T15:34:14.000Z | test/finance/test_data_providers.py | charmerDark/qiskit-aqua | c1564af8792c6664670807614a378147fd04d28f | [
"Apache-2.0"
] | 84 | 2018-07-24T13:30:37.000Z | 2018-12-14T20:22:23.000Z | test/finance/test_data_providers.py | charmerDark/qiskit-aqua | c1564af8792c6664670807614a378147fd04d28f | [
"Apache-2.0"
] | 42 | 2018-07-26T01:53:13.000Z | 2018-12-07T16:30:19.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 45.903766 | 100 | 0.591286 |
7cf0b4ccfab00fe4f6789c04ff855ff4d0b22f78 | 532 | py | Python | deformetrica/core/observations/__init__.py | coolteemf/coolteemf-deformetrica | f965d6ecc0d04f243e487468a9dafe9fe864eed2 | [
"MIT"
] | 2 | 2022-03-04T11:19:30.000Z | 2022-03-08T04:47:22.000Z | deformetrica/core/observations/__init__.py | lepennec/Deformetrica_multiscale | dbcb69962dd02f14dde5d63a9abc1de69112f273 | [
"MIT"
] | null | null | null | deformetrica/core/observations/__init__.py | lepennec/Deformetrica_multiscale | dbcb69962dd02f14dde5d63a9abc1de69112f273 | [
"MIT"
] | 1 | 2022-03-07T09:52:52.000Z | 2022-03-07T09:52:52.000Z |
# dataset
from .datasets.longitudinal_dataset import LongitudinalDataset
# landmarks
from .deformable_objects.landmarks.landmark import Landmark
from .deformable_objects.landmarks.point_cloud import PointCloud
from .deformable_objects.landmarks.poly_line import PolyLine
from .deformable_objects.landmarks.surface_mesh... | 35.466667 | 77 | 0.87406 |
e0a1ab755643a07eb5778ec7df6803ed4f9bed98 | 689 | py | Python | src/django_otp/plugins/otp_static/lib.py | jaap3/django-otp | d7980bf516018319158570cc75353c905375a3ab | [
"BSD-2-Clause"
] | 318 | 2019-08-27T15:57:05.000Z | 2022-03-30T08:38:29.000Z | src/django_otp/plugins/otp_static/lib.py | jaap3/django-otp | d7980bf516018319158570cc75353c905375a3ab | [
"BSD-2-Clause"
] | 77 | 2019-09-17T11:48:38.000Z | 2022-03-13T17:26:56.000Z | src/django_otp/plugins/otp_static/lib.py | jaap3/django-otp | d7980bf516018319158570cc75353c905375a3ab | [
"BSD-2-Clause"
] | 76 | 2019-08-30T20:29:40.000Z | 2022-03-30T09:14:36.000Z | from django.contrib.auth import get_user_model
from .models import StaticDevice, StaticToken
def add_static_token(username, token=None):
"""
Adds a random static token to the identified user.
This is the implementation for the management command of a similar name.
Returns the StaticToken object crea... | 28.708333 | 76 | 0.728592 |
795cdd96ffb7ec24409923999a5e32771fed4d26 | 52,902 | py | Python | auditok/core.py | phrase-loop-player/auditok | 7f08e14d482d624edb1498867400862f9d881ecf | [
"MIT"
] | null | null | null | auditok/core.py | phrase-loop-player/auditok | 7f08e14d482d624edb1498867400862f9d881ecf | [
"MIT"
] | null | null | null | auditok/core.py | phrase-loop-player/auditok | 7f08e14d482d624edb1498867400862f9d881ecf | [
"MIT"
] | null | null | null | """
.. autosummary::
:toctree: generated/
load
split
AudioRegion
StreamTokenizer
"""
import os
import math
from .util import AudioReader, DataValidator, AudioEnergyValidator
from .io import check_audio_data, to_file, player_for, get_audio_source
from .exceptions import TooSamllBlockDuration
try:
... | 36.259082 | 96 | 0.594609 |
32a79bf89c802d1d51223549312d705d2299f721 | 2,240 | py | Python | pypette/threadwrapper.py | csurfer/pypette | 4e0bfcc56d36d7fb56d381ffcd6e5e58cb9b3ca1 | [
"MIT"
] | 286 | 2017-10-28T10:08:42.000Z | 2022-02-24T06:55:08.000Z | pypette/threadwrapper.py | csurfer/pypette | 4e0bfcc56d36d7fb56d381ffcd6e5e58cb9b3ca1 | [
"MIT"
] | 14 | 2017-10-28T20:29:38.000Z | 2021-09-13T16:14:12.000Z | pypette/threadwrapper.py | csurfer/pypette | 4e0bfcc56d36d7fb56d381ffcd6e5e58cb9b3ca1 | [
"MIT"
] | 13 | 2017-10-29T03:17:19.000Z | 2022-02-21T14:53:06.000Z | # -*- coding: utf-8 -*-
"""
threadwrapper.api
~~~~~~~~~~~~~~~~~
Class definitions to create wrapper threads for jobs.
"""
import subprocess
from enum import Enum
from threading import Thread
from typing import Any, Optional
from .jobs import BashJob, Job
class ThreadState(Enum):
"""State in which a thread can ... | 25.747126 | 102 | 0.599554 |
39aa40925c8c3528abd5ae39d94a09117106796a | 868 | py | Python | pytest_cases/tests/issues/test_issue_pytest_70.py | pehala/python-pytest-cases | 59dca923f2fbcfc62884963090abc895c23de8cc | [
"BSD-3-Clause"
] | null | null | null | pytest_cases/tests/issues/test_issue_pytest_70.py | pehala/python-pytest-cases | 59dca923f2fbcfc62884963090abc895c23de8cc | [
"BSD-3-Clause"
] | null | null | null | pytest_cases/tests/issues/test_issue_pytest_70.py | pehala/python-pytest-cases | 59dca923f2fbcfc62884963090abc895c23de8cc | [
"BSD-3-Clause"
] | null | null | null | import pytest
from pytest_cases import fixture_ref, pytest_parametrize_plus, pytest_fixture_plus
@pytest_fixture_plus
@pytest_parametrize_plus("variant", ['A', 'B'])
def book1(variant):
return variant
@pytest.fixture
def book2():
return
@pytest_parametrize_plus("name", [
fixture_ref(book1),
'hi',
... | 27.125 | 83 | 0.624424 |
4ac3295d1ab1ea3cb6487826102dc63341ed421d | 797 | py | Python | data/contacts.py | L-A-V-S/python_training | f34794709931ba2b1c32fa58c9eea6cd6098e3ac | [
"Apache-2.0"
] | 1 | 2020-11-03T20:45:32.000Z | 2020-11-03T20:45:32.000Z | data/contacts.py | L-A-V-S/python_training | f34794709931ba2b1c32fa58c9eea6cd6098e3ac | [
"Apache-2.0"
] | null | null | null | data/contacts.py | L-A-V-S/python_training | f34794709931ba2b1c32fa58c9eea6cd6098e3ac | [
"Apache-2.0"
] | null | null | null | from model.contact import Contact
import random
import string
testdata = [
Contact(firstname="firstname1", middlename="middlename1", lastname="lastname1", nickname="nickname1"),
Contact(firstname="firstname2", middlename="middlename2", lastname="lastname2", nickname="nickname2")
]
#def random_string(prefix,... | 41.947368 | 178 | 0.720201 |
4ffe06343b1df24303291fca88815b7085792f34 | 7,686 | py | Python | src/melcloud/objects/device.py | gdude2002/melcloud | 6fe0f8ebdd37c83bdc2b2690d29713d2b200d7aa | [
"MIT"
] | 12 | 2018-12-08T18:03:40.000Z | 2021-12-21T17:41:34.000Z | src/melcloud/objects/device.py | gdude2002/melcloud | 6fe0f8ebdd37c83bdc2b2690d29713d2b200d7aa | [
"MIT"
] | 2 | 2020-05-28T18:35:09.000Z | 2020-05-29T08:57:08.000Z | src/melcloud/objects/device.py | gdude2002/melcloud | 6fe0f8ebdd37c83bdc2b2690d29713d2b200d7aa | [
"MIT"
] | 11 | 2018-04-16T11:36:45.000Z | 2021-12-30T22:41:08.000Z | # coding=utf-8
from datetime import datetime
from typing import List
from dataclasses import dataclass
from melcloud.objects.preset import Preset
from melcloud.objects.weather import WeatherObservation
from melcloud.utils import str_to_datetime
__author__ = "Gareth Coles"
@dataclass
class Device:
access_level:... | 30.141176 | 79 | 0.749024 |
f45c013457f2e9a5333876fe34105550b82152d6 | 4,622 | py | Python | composite.py | junkmd/Python-Tkinter-Widgets | b1f17d64ac7c7e9607722dbb27bbf7db3ac13242 | [
"MIT"
] | 1 | 2020-08-08T09:04:11.000Z | 2020-08-08T09:04:11.000Z | composite.py | junkmd/Python-Tkinter-Widgets | b1f17d64ac7c7e9607722dbb27bbf7db3ac13242 | [
"MIT"
] | null | null | null | composite.py | junkmd/Python-Tkinter-Widgets | b1f17d64ac7c7e9607722dbb27bbf7db3ac13242 | [
"MIT"
] | null | null | null | """Tkinter combination widgets' base classes."""
import tkinter as tk
from tkinter import ttk
TK_GEOMETRY_METHODS = tuple(set([
m for m in
list(tk.Pack.__dict__.keys()) +
list(tk.Grid.__dict__.keys()) +
list(tk.Place.__dict__.keys())
if m[0] != '_' and m != 'config' and m != 'configure'
]))
clas... | 37.577236 | 79 | 0.599091 |
7061475a3c45c3011b931a16c8e9ca8d9a47be35 | 13,752 | py | Python | django/db/transaction.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 3 | 2016-07-08T23:49:32.000Z | 2018-04-15T22:55:01.000Z | django/db/transaction.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 27 | 2017-02-05T15:57:04.000Z | 2018-04-15T22:57:26.000Z | django/db/transaction.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | null | null | null | """
This module implements a transaction manager that can be used to define
transaction handling in a request or view function. It is used by transaction
control middleware and decorators.
The transaction manager can be in managed or in auto state. Auto state means the
system is using a commit-on-save strategy (... | 36.28496 | 105 | 0.669066 |
cb2fd4c779152e90b7ffa00aba726562c13975c5 | 2,997 | py | Python | mmdet/models/utils/layer_utils.py | nob87208/LADet | 353cc6bd358de92a2a0242f594b08d15947e7560 | [
"Apache-2.0"
] | 1 | 2020-08-13T02:55:59.000Z | 2020-08-13T02:55:59.000Z | mmdet/models/utils/layer_utils.py | nob87208/LADet | 353cc6bd358de92a2a0242f594b08d15947e7560 | [
"Apache-2.0"
] | null | null | null | mmdet/models/utils/layer_utils.py | nob87208/LADet | 353cc6bd358de92a2a0242f594b08d15947e7560 | [
"Apache-2.0"
] | 2 | 2020-04-13T11:34:24.000Z | 2022-03-29T07:46:27.000Z | import torch
import warnings
import torch.nn as nn
from mmcv.cnn import kaiming_init, constant_init
from .norm import build_norm_layer
def Reorder(x, groups):
batchsize, num_channels, height, width = x.data.size()
channels_per_group = num_channels // groups
# reshape
x = x.view(ba... | 35.258824 | 145 | 0.549883 |
db8a17896202360e73a75a40248e87496bb53e2f | 75 | py | Python | rtsa-gui.py | Sout/pyrf | 6412d5630707632f61cfa2fae8ceafad580a207d | [
"BSD-3-Clause"
] | null | null | null | rtsa-gui.py | Sout/pyrf | 6412d5630707632f61cfa2fae8ceafad580a207d | [
"BSD-3-Clause"
] | null | null | null | rtsa-gui.py | Sout/pyrf | 6412d5630707632f61cfa2fae8ceafad580a207d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from pyrf.gui.spectrum_analyzer import main
main()
| 12.5 | 43 | 0.76 |
069578e5c4b11b411ddb05ee3eb20bad769971be | 2,669 | py | Python | 3rd-party/gdcm/Testing/Source/MediaStorageAndFileFormat/Python/TestModifyFields.py | oprogramadorreal/vize | 042c16f96d8790303563be6787200558e1ec00b2 | [
"MIT"
] | 47 | 2020-03-30T14:36:46.000Z | 2022-03-06T07:44:54.000Z | 3rd-party/gdcm/Testing/Source/MediaStorageAndFileFormat/Python/TestModifyFields.py | oprogramadorreal/vize | 042c16f96d8790303563be6787200558e1ec00b2 | [
"MIT"
] | null | null | null | 3rd-party/gdcm/Testing/Source/MediaStorageAndFileFormat/Python/TestModifyFields.py | oprogramadorreal/vize | 042c16f96d8790303563be6787200558e1ec00b2 | [
"MIT"
] | 8 | 2020-04-01T01:22:45.000Z | 2022-01-02T13:06:09.000Z | ############################################################################
#
# Program: GDCM (Grassroots DICOM). A DICOM library
#
# Copyright (c) 2006-2011 Mathieu Malaterre
# All rights reserved.
# See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
#
# This software is distributed ... | 31.4 | 89 | 0.644061 |
e6a4db12615f9ae1c18b4c36fff2225e9cb1355f | 2,612 | py | Python | src/receive_devices.py | EdrianI/openeew-seismology | 163b6447d125c88bd31fdad938893edb8910e790 | [
"Apache-2.0"
] | null | null | null | src/receive_devices.py | EdrianI/openeew-seismology | 163b6447d125c88bd31fdad938893edb8910e790 | [
"Apache-2.0"
] | null | null | null | src/receive_devices.py | EdrianI/openeew-seismology | 163b6447d125c88bd31fdad938893edb8910e790 | [
"Apache-2.0"
] | null | null | null | """This script receives device data from MQTT by subscribing to the iot-2/type/OpenEEW/id/+/mon"""
import json
from argparse import ArgumentParser
from paho.mqtt.client import Client as MqttClient
class DeviceReceiver:
"""This class subscribes to the MQTT and receivces raw data"""
def __init__(self, df_recei... | 34.826667 | 98 | 0.62098 |
5ec368d74dffb9c7a54bd59ebda99b7d9089454b | 100 | py | Python | probed/__main__.py | pyrustic/probed | f47e229f11e5951f7c72d0e539040120f948f86a | [
"MIT"
] | 1 | 2021-11-25T07:11:22.000Z | 2021-11-25T07:11:22.000Z | probed/__main__.py | pyrustic/probed | f47e229f11e5951f7c72d0e539040120f948f86a | [
"MIT"
] | null | null | null | probed/__main__.py | pyrustic/probed | f47e229f11e5951f7c72d0e539040120f948f86a | [
"MIT"
] | null | null | null | def main():
print("https://github.com/pyrustic/probed")
if __name__ == "__main__":
main()
| 14.285714 | 47 | 0.62 |
1ad3608e5e1ffcfa1a68311981bfb5d0cff2bd8f | 4,019 | py | Python | src/python/wiring.py | dulikvor/reactive | 993d0f91a5dbb4ea8dabc240605f46bf35b606e9 | [
"MIT"
] | null | null | null | src/python/wiring.py | dulikvor/reactive | 993d0f91a5dbb4ea8dabc240605f46bf35b606e9 | [
"MIT"
] | null | null | null | src/python/wiring.py | dulikvor/reactive | 993d0f91a5dbb4ea8dabc240605f46bf35b606e9 | [
"MIT"
] | 1 | 2020-07-28T00:00:00.000Z | 2020-07-28T00:00:00.000Z | import sys
from os.path import dirname, join
sys.path.append(join(dirname(__file__), '../../bin/'))
import _pyNode
from datetime import timedelta
class EdgeType(type):
def __getitem__(cls, item):
return Edge(item)
class Edge(metaclass=EdgeType):
__all__ = ['type']
def __init__(self, type):
... | 31.155039 | 140 | 0.605126 |
4e3d575f89426a24a333bf84cc036de721453ae0 | 976 | py | Python | Collect/SSEBop/__init__.py | ali1100/wa | 700e5014533c45f38a245c3abdeacc537cb307bc | [
"Apache-2.0"
] | 16 | 2017-04-27T21:22:37.000Z | 2020-10-21T12:57:03.000Z | Collect/SSEBop/__init__.py | ali1100/wa | 700e5014533c45f38a245c3abdeacc537cb307bc | [
"Apache-2.0"
] | 1 | 2017-06-17T08:07:53.000Z | 2017-08-22T12:28:37.000Z | Collect/SSEBop/__init__.py | wateraccounting/wa | 29ed8e7eac732135678a5d171cd5e53a54c95313 | [
"Apache-2.0"
] | 19 | 2016-10-24T13:24:34.000Z | 2020-02-03T17:42:22.000Z | # -*- coding: utf-8 -*-
"""
Authors: Tim Hessels and Gonzalo Espinoza
UNESCO-IHE 2017
Contact: t.hessels@unesco-ihe.org
g.espinoza@unesco-ihe.org
Repository: https://github.com/wateraccounting/wa
Module: Collect/SSEBop
Restrictions:
The data and this python file may not be distributed to others witho... | 30.5 | 80 | 0.740779 |
5ed5cc698e22b8fb8698cbf77b6e7774c3a542ae | 4,446 | py | Python | model.py | shakeelr/CarND-Behavioral-Cloning-P3 | 8542a965a329fe38722e67a206ca19ad03d912bb | [
"MIT"
] | null | null | null | model.py | shakeelr/CarND-Behavioral-Cloning-P3 | 8542a965a329fe38722e67a206ca19ad03d912bb | [
"MIT"
] | null | null | null | model.py | shakeelr/CarND-Behavioral-Cloning-P3 | 8542a965a329fe38722e67a206ca19ad03d912bb | [
"MIT"
] | null | null | null | import sklearn
import csv
import cv2
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Flatten, Dense, Lambda, Cropping2D, BatchNormalization, Dropout, Activation
from keras.layers.convolutional import C... | 34.2 | 127 | 0.680387 |
46781aa5acd71fd53b325d04589df23128000b74 | 14,570 | py | Python | configs/example/spec06_config.py | irene-lin/InvisiSpec-1.0 | 696ceb57d48f77da1385f2c9e10dc4615350e607 | [
"BSD-3-Clause"
] | 2 | 2020-03-05T23:49:12.000Z | 2020-03-07T22:12:42.000Z | configs/example/spec06_config.py | irene-lin/InvisiSpec-1.0 | 696ceb57d48f77da1385f2c9e10dc4615350e607 | [
"BSD-3-Clause"
] | null | null | null | configs/example/spec06_config.py | irene-lin/InvisiSpec-1.0 | 696ceb57d48f77da1385f2c9e10dc4615350e607 | [
"BSD-3-Clause"
] | 1 | 2020-09-27T06:39:53.000Z | 2020-09-27T06:39:53.000Z | # Copyright (c) 2012-2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | 35.798526 | 130 | 0.664653 |
6ca6a411eb5dc75a501b2e18ae7eb65bc635797c | 1,437 | py | Python | scripts/grant_cloud_admin.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | null | null | null | scripts/grant_cloud_admin.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | null | null | null | scripts/grant_cloud_admin.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | 1 | 2021-11-23T08:30:52.000Z | 2021-11-23T08:30:52.000Z | """ Grants cloud admin access to a user. """
import os
import SOAPpy
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "../lib"))
import appscale_info
import constants
def get_soap_accessor():
""" Returns the SOAP server accessor to deal with application and users.
Returns:
A soap server ac... | 25.660714 | 74 | 0.68128 |
8cfbc740a516692123ffb92c6ed4858ca26324d9 | 23,455 | py | Python | OptiTypePipeline.py | naumenko-sa/OptiType | 07c49bf6fc93e8846e8826df63100a0b069cbe40 | [
"BSD-3-Clause"
] | 137 | 2015-02-05T12:56:11.000Z | 2022-03-10T12:46:45.000Z | OptiTypePipeline.py | naumenko-sa/OptiType | 07c49bf6fc93e8846e8826df63100a0b069cbe40 | [
"BSD-3-Clause"
] | 98 | 2015-01-15T01:30:35.000Z | 2022-03-22T22:30:48.000Z | OptiTypePipeline.py | naumenko-sa/OptiType | 07c49bf6fc93e8846e8826df63100a0b069cbe40 | [
"BSD-3-Clause"
] | 76 | 2015-03-19T19:44:06.000Z | 2021-04-22T15:56:35.000Z | #!/usr/bin/env python
# coding=utf-8
"""
###################################################################
OptiType: precision HLA typing from next-generation sequencing data
###################################################################
Authors: András Szolek, Benjamin Schubert, Christopher Mohr
Date: August... | 53.550228 | 6,125 | 0.622724 |
52373d3ee0f44542bfffa8e81425bb9ba57f03df | 4,686 | py | Python | tests.py | squadran2003/TODO-api-with-flask | 50556c9a78c8a100ff67a5531c08688e48730ffe | [
"MIT"
] | null | null | null | tests.py | squadran2003/TODO-api-with-flask | 50556c9a78c8a100ff67a5531c08688e48730ffe | [
"MIT"
] | null | null | null | tests.py | squadran2003/TODO-api-with-flask | 50556c9a78c8a100ff67a5531c08688e48730ffe | [
"MIT"
] | null | null | null | import unittest
import datetime
import json
from app import app
import base64
from flask.ext.restful import url_for
import models
class TestTodoModel(unittest.TestCase):
def setUp(self):
self.user = models.User.get(username="andy")
self.todo = models.Todo.create(name="go swimming at 10",
... | 36.609375 | 79 | 0.567222 |
06e0a61335b751c4642608486cadb72acd2cff25 | 7,395 | py | Python | test/functional/p2p_leak.py | widecoin-project/widecoin | 143b190a61f95a4b7d40c5da484cdde8f0c5ac3f | [
"MIT"
] | 8 | 2021-04-17T16:11:50.000Z | 2021-06-23T05:30:39.000Z | test/functional/p2p_leak.py | widecoin-project/widecoin | 143b190a61f95a4b7d40c5da484cdde8f0c5ac3f | [
"MIT"
] | 1 | 2021-04-18T11:57:59.000Z | 2021-04-18T11:57:59.000Z | test/functional/p2p_leak.py | widecoin-project/widecoin | 143b190a61f95a4b7d40c5da484cdde8f0c5ac3f | [
"MIT"
] | 7 | 2021-04-17T16:04:12.000Z | 2021-06-10T00:54:53.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The Widecoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test message sending before handshake completion.
Before receiving a VERACK, a node should not send a... | 41.312849 | 125 | 0.727654 |
5d05596fb23af36b757e3261dc8f7d2bbe514f3a | 8,147 | py | Python | homeassistant/components/mailbox/__init__.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 5 | 2018-10-23T14:15:05.000Z | 2021-11-26T06:38:44.000Z | homeassistant/components/mailbox/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/mailbox/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 6 | 2019-07-06T00:43:13.000Z | 2021-01-16T13:27:06.000Z | """Support for Voice mailboxes."""
import asyncio
from contextlib import suppress
from datetime import timedelta
import logging
from aiohttp import web
from aiohttp.web_exceptions import HTTPNotFound
import async_timeout
from homeassistant.components.http import HomeAssistantView
from homeassistant.const import HTTP_... | 30.859848 | 83 | 0.651283 |
49c54517d0fdd8a8be6009182c2f8e6f61e1271e | 2,935 | py | Python | cirq-google/cirq_google/line/placement/optimization_test.py | Saibaba-Alapati/Cirq | 782efcd04c3bbf73a0d630306a3d1cfd9966521d | [
"Apache-2.0"
] | 3,326 | 2018-07-18T23:17:21.000Z | 2022-03-29T22:28:24.000Z | cirq-google/cirq_google/line/placement/optimization_test.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 3,443 | 2018-07-18T21:07:28.000Z | 2022-03-31T20:23:21.000Z | cirq-google/cirq_google/line/placement/optimization_test.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 865 | 2018-07-18T23:30:24.000Z | 2022-03-30T11:43:23.000Z | # Copyright 2018 The Cirq Developers
#
# 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... | 27.175926 | 93 | 0.59523 |
bc7369567f19c2580ddb182671193f0f800fe55b | 9,638 | py | Python | avalanche/evaluation/metrics/cpu_usage.py | coreylowman/avalanche | 9c1e7765f1577c400ec0c57260221bcffd9566a2 | [
"MIT"
] | 1 | 2021-12-26T21:08:19.000Z | 2021-12-26T21:08:19.000Z | avalanche/evaluation/metrics/cpu_usage.py | coreylowman/avalanche | 9c1e7765f1577c400ec0c57260221bcffd9566a2 | [
"MIT"
] | null | null | null | avalanche/evaluation/metrics/cpu_usage.py | coreylowman/avalanche | 9c1e7765f1577c400ec0c57260221bcffd9566a2 | [
"MIT"
] | null | null | null | ################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. ... | 29.655385 | 80 | 0.60469 |
930614da5510462a3ca06b6addc7183f604a8b9e | 1,220 | py | Python | reamber/algorithms/convert/BMSToSM.py | Eve-ning/reamber_base_py | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 10 | 2020-06-28T11:16:36.000Z | 2021-08-09T21:41:43.000Z | reamber/algorithms/convert/BMSToSM.py | Eve-ning/reamberPy | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 35 | 2020-06-18T13:05:50.000Z | 2022-02-18T10:13:35.000Z | reamber/algorithms/convert/BMSToSM.py | Eve-ning/reamber_base_py | 6d19c84f2c110b60e633b82b73e0516396466f56 | [
"MIT"
] | 2 | 2021-05-26T17:05:06.000Z | 2021-06-12T18:42:13.000Z | from unidecode import unidecode
from reamber.algorithms.convert.ConvertBase import ConvertBase
from reamber.bms.BMSMap import BMSMap
from reamber.sm.SMMap import SMMap
from reamber.sm.SMMapMeta import SMMapChartTypes
from reamber.sm.SMMapSet import SMMapSet
from reamber.sm.lists.SMBpmList import SMBpmList
from reamber... | 36.969697 | 107 | 0.696721 |
3ca4c849549cb72bb779265199e30c175a78b3ef | 3,017 | py | Python | app/lpd/gui/main_evr_tab.py | stfc-aeg/lpd-detector | 7bc0d9700a3d3992a4541f05e1434aba0d056dcc | [
"Apache-2.0"
] | null | null | null | app/lpd/gui/main_evr_tab.py | stfc-aeg/lpd-detector | 7bc0d9700a3d3992a4541f05e1434aba0d056dcc | [
"Apache-2.0"
] | 20 | 2018-10-04T07:36:22.000Z | 2020-05-18T13:10:42.000Z | app/lpd/gui/main_evr_tab.py | stfc-aeg/lpd-detector | 7bc0d9700a3d3992a4541f05e1434aba0d056dcc | [
"Apache-2.0"
] | null | null | null |
from PyQt4 import QtCore, QtGui
import time
import sys
from functools import partial
class LpdFemGuiMainEvrTab(object):
'''
Helper class to manage EVR tab in main window
'''
def __init__(self, app_main, mainWindow):
'''
Constructor
'''
self.app_main = app_main
... | 41.328767 | 127 | 0.695061 |
cd11b3d705fa17cb1fc16ee97eb5ee27977ffb57 | 3,171 | py | Python | coilfm/dejong.py | anon-coil/coil_gecco | 6b8aa410a944e1db26c3acdc77af71b3b5d4fe74 | [
"MIT"
] | 2 | 2022-02-15T08:39:26.000Z | 2022-02-17T11:51:06.000Z | coilfm/dejong.py | anon-coil/coil_gecco | 6b8aa410a944e1db26c3acdc77af71b3b5d4fe74 | [
"MIT"
] | null | null | null | coilfm/dejong.py | anon-coil/coil_gecco | 6b8aa410a944e1db26c3acdc77af71b3b5d4fe74 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
# Benchmark function
def dejong5(X1, X2):
n_vals = len(X1)
Y = np.full( (n_vals), np.nan)
for i in range(n_vals):
x1, x2 = X1[i], X2[i]
total = 0
A = np.zeros((2,25))
a = np.array([-32, -16, 0, 16, 32])
A[0,:... | 26.206612 | 93 | 0.568906 |
76eb4479782fb12f3d172e69146d8c65533dba89 | 2,413 | py | Python | my_christmas_bot.py | gastonginestet/christmas_bot | e90c01c8b1c91414560a6969125c98d8adaa28af | [
"MIT"
] | 1 | 2020-12-02T04:32:35.000Z | 2020-12-02T04:32:35.000Z | my_christmas_bot.py | gastonginestet/christmas_bot | e90c01c8b1c91414560a6969125c98d8adaa28af | [
"MIT"
] | null | null | null | my_christmas_bot.py | gastonginestet/christmas_bot | e90c01c8b1c91414560a6969125c98d8adaa28af | [
"MIT"
] | null | null | null | #! python
import tweepy
import time
import datetime
CONSUMER_KEY = 'your_consumer_key'
CONSUMER_SECRET = 'your_consumer_secret'
ACCESS_KEY = 'your_access_key :)'
ACCESS_SECRET = 'your_access_secret :O'
auth = tweepy.OAuthHandler(CONSUMER_KEY,CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = twee... | 29.426829 | 141 | 0.668877 |
43f2ba32e0833f6f4f10d9baae6b60c81b694863 | 647 | py | Python | blender/arm/logicnode/canvas_get_location.py | Sanva/armory | 61b2d008e3b73bd978966b3209b646d162923e18 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/canvas_get_location.py | Sanva/armory | 61b2d008e3b73bd978966b3209b646d162923e18 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/canvas_get_location.py | Sanva/armory | 61b2d008e3b73bd978966b3209b646d162923e18 | [
"Zlib"
] | null | null | null | import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class CanvasGetLocationNode(Node, ArmLogicTreeNode):
'''Get canvas element location'''
bl_idname = 'LNCanvasGetLocationNode'
bl_label = 'Canvas Get Location'
bl_icon = 'NONE'
def init(se... | 32.35 | 54 | 0.703246 |
cc4b16cc80ed29530fcd59249b5ea55352490468 | 4,527 | py | Python | nlplingo/oregon/event_models/uoregon/layers/crf.py | BBN-E/nlplingo | 32ff17b1320937faa3d3ebe727032f4b3e7a353d | [
"Apache-2.0"
] | 3 | 2020-10-22T13:28:00.000Z | 2022-03-24T19:57:22.000Z | nlplingo/oregon/event_models/uoregon/layers/crf.py | BBN-E/nlplingo | 32ff17b1320937faa3d3ebe727032f4b3e7a353d | [
"Apache-2.0"
] | null | null | null | nlplingo/oregon/event_models/uoregon/layers/crf.py | BBN-E/nlplingo | 32ff17b1320937faa3d3ebe727032f4b3e7a353d | [
"Apache-2.0"
] | 1 | 2020-10-22T13:29:51.000Z | 2020-10-22T13:29:51.000Z | import torch.nn as nn
import torch
class CRF(nn.Module):
def __init__(self, tag_map, opt):
super().__init__()
self.opt = opt
self.tag_map = tag_map
self.num_tags = len(tag_map)
# matrix of transition scores from j to i
self.trans = nn.Parameter(torch.randn(self.num_... | 44.382353 | 102 | 0.567263 |
54e1a17ba3c3233970cb4c4404275f5d2aebf831 | 454 | py | Python | Chapter 3/rnn_example.py | PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices | 390ae5868e023f0e417f5dca23eab69e848c5f91 | [
"MIT"
] | null | null | null | Chapter 3/rnn_example.py | PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices | 390ae5868e023f0e417f5dca23eab69e848c5f91 | [
"MIT"
] | null | null | null | Chapter 3/rnn_example.py | PacktPublishing/Machine-Learning-Model-Serving-Patterns-and-Best-Practices | 390ae5868e023f0e417f5dca23eab69e848c5f91 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
model = keras.Sequential()
# Add an Embedding layer expecting input vocab of size 1000, and
# output embedding dimension of size 64.
model.add(layers.Embedding(input_dim=1000, output_dim=64))
# Add a LSTM layer... | 26.705882 | 64 | 0.779736 |
1051fb1e31c8ce082760a089204cd3e4a850eb14 | 42,593 | gyp | Python | src/third_party/libjingle/libjingle.gyp | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | 9 | 2018-09-21T05:36:12.000Z | 2021-11-15T15:14:36.000Z | src/third_party/libjingle/libjingle.gyp | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | null | null | null | src/third_party/libjingle/libjingle.gyp | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | 3 | 2018-11-28T14:54:13.000Z | 2020-07-02T07:36:07.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.
{
'includes': [
'../../build/win_precompile.gypi',
],
'variables': {
'enabled_libjingle_device_manager%': 0,
'libjingle_additional_deps... | 46.754116 | 101 | 0.5943 |
204494a933c2d0d819d669f4937fb5d298c605d9 | 6,885 | py | Python | cloudrail/knowledge/utils/action_utils.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | cloudrail/knowledge/utils/action_utils.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | cloudrail/knowledge/utils/action_utils.py | my-devops-info/cloudrail-knowledge | b7c1bbd6fe1faeb79c105a01c0debbe24d031a0e | [
"MIT"
] | null | null | null | import functools
import logging
import re
from typing import Set, List, Optional, Iterable, Dict
@functools.lru_cache(maxsize=None)
def is_action_fully_defined(contained_action: str, container_action: str):
try:
if container_action == '*':
return True
if contained_action == '*':
... | 45.296053 | 141 | 0.726943 |
88437af62836d7de164e8d66f2918e6420066870 | 1,370 | py | Python | examples/demo0.py | gergelyk/python-indentedlogs | 4f44ba9d67e5a8def6d8c67675f4a2ccac50fd97 | [
"MIT"
] | null | null | null | examples/demo0.py | gergelyk/python-indentedlogs | 4f44ba9d67e5a8def6d8c67675f4a2ccac50fd97 | [
"MIT"
] | null | null | null | examples/demo0.py | gergelyk/python-indentedlogs | 4f44ba9d67e5a8def6d8c67675f4a2ccac50fd97 | [
"MIT"
] | null | null | null | import logging
fmt = '{asctime} {levelname:<8} {filename:>3}:{lineno:<3} {name:>10} {message}'
datefmt = '%Y-%m-%d %H:%M:%S'
logging.basicConfig(level='DEBUG', format=fmt, datefmt=datefmt, style='{')
log = logging.getLogger()
def bump_version():
pass
def configure():
log.debug(f"Collecting parameters")
... | 19.571429 | 79 | 0.670803 |
aa0e46854cbe3f24783514643a1adffb2c97541c | 2,660 | py | Python | src/plot_kernels_appendix.py | jhgoebbert/BSTIM-Covid19 | b927b1ab60ff915b988ff32b78189a0e61cceb45 | [
"MIT"
] | null | null | null | src/plot_kernels_appendix.py | jhgoebbert/BSTIM-Covid19 | b927b1ab60ff915b988ff32b78189a0e61cceb45 | [
"MIT"
] | null | null | null | src/plot_kernels_appendix.py | jhgoebbert/BSTIM-Covid19 | b927b1ab60ff915b988ff32b78189a0e61cceb45 | [
"MIT"
] | null | null | null |
from ModelInstance import ModelInstance
from matplotlib import rc
import matplotlib
import numpy as np
import pickle as pkl
from sampling_utils import *
from shared_utils import load_data, split_data
import datetime
from matplotlib import pyplot as plt
plt.style.use('ggplot')
matplotlib.rcParams['text.usetex'] = True
... | 32.439024 | 79 | 0.662782 |
7186854eccd12766509d49fa4d71cc0c16528ffa | 192 | py | Python | ex003.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | ex003.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | ex003.py | almmessias/CursoPython | 4cec6946f32002cbd5d3b802df11ea1ba74169f5 | [
"MIT"
] | null | null | null | valor1 = int (input ('Digite o primeiro valor: '))
valor2 = int (input ('Digite o segundo valor: '))
soma = valor1 + valor2
print ('A soma entre {} e {} vale {}'.format(valor1, valor2, soma)) | 38.4 | 67 | 0.651042 |
681450bd0014566fad289ba57936a4eec48fbc30 | 7,869 | py | Python | pyxel/ui/widget.py | sacredhotdog/pyxel | 08da48dbd1ac53c06cf8a383f28d66fd89f78f4a | [
"MIT"
] | null | null | null | pyxel/ui/widget.py | sacredhotdog/pyxel | 08da48dbd1ac53c06cf8a383f28d66fd89f78f4a | [
"MIT"
] | null | null | null | pyxel/ui/widget.py | sacredhotdog/pyxel | 08da48dbd1ac53c06cf8a383f28d66fd89f78f4a | [
"MIT"
] | null | null | null | import pyxel
from .constants import (
WIDGET_CLICK_DIST,
WIDGET_CLICK_TIME,
WIDGET_HOLD_TIME,
WIDGET_PANEL_COLOR,
WIDGET_REPEAT_TIME,
WIDGET_SHADOW_COLOR,
)
class Widget:
"""
Events:
__on_show()
__on_hide()
__on_enabled()
__on_disabled()
__on_mo... | 26.40604 | 82 | 0.577837 |
7325df797eee7cf16507071f4e32000bdc795e7c | 1,835 | py | Python | 2015/CVE-2015-4414/poc/pocsploit/CVE-2015-4414.py | hjyuan/reapoc | ef515e56c44c2590ff8601582bf6c08e076e7083 | [
"Apache-2.0"
] | 421 | 2021-12-07T08:46:40.000Z | 2022-03-31T12:42:16.000Z | 2015/CVE-2015-4414/poc/pocsploit/CVE-2015-4414.py | hjyuan/reapoc | ef515e56c44c2590ff8601582bf6c08e076e7083 | [
"Apache-2.0"
] | 5 | 2022-03-27T07:37:32.000Z | 2022-03-31T13:56:11.000Z | 2015/CVE-2015-4414/poc/pocsploit/CVE-2015-4414.py | hjyuan/reapoc | ef515e56c44c2590ff8601582bf6c08e076e7083 | [
"Apache-2.0"
] | 144 | 2021-12-07T11:06:14.000Z | 2022-03-31T07:41:35.000Z | import requests
# Vuln Base Info
def info():
return {
"author": "cckuailong",
"name": '''WordPress Plugin SE HTML5 Album Audio Player 1.1.0 - Directory Traversal''',
"description": '''Directory traversal vulnerability in download_audio.php in the SE HTML5 Album Audio Player (se-html5-album... | 28.671875 | 279 | 0.562398 |
e27e9489ff8753f3a60d4686d7f369a5249b39b4 | 668 | py | Python | manage.py | srivarkor/SampleAPI | 0cce27463dfd3669c0b92e923bf68ed4b0212de4 | [
"MIT"
] | null | null | null | manage.py | srivarkor/SampleAPI | 0cce27463dfd3669c0b92e923bf68ed4b0212de4 | [
"MIT"
] | null | null | null | manage.py | srivarkor/SampleAPI | 0cce27463dfd3669c0b92e923bf68ed4b0212de4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'UsersProject.settings')
try:
from django.core.management import execute_from_command_line
except... | 29.043478 | 76 | 0.681138 |
2cc9ce18c24704217fde3b579ff06dc5ad36fd87 | 1,644 | py | Python | deepdrive_zero/experiments/intersection_2_agents_fine_tune_test.py | shantanuwadnerkar/deepdrive-zero | 3134a5b092a53ff60e4207d7419fd6a19cb5a6e9 | [
"MIT"
] | null | null | null | deepdrive_zero/experiments/intersection_2_agents_fine_tune_test.py | shantanuwadnerkar/deepdrive-zero | 3134a5b092a53ff60e4207d7419fd6a19cb5a6e9 | [
"MIT"
] | null | null | null | deepdrive_zero/experiments/intersection_2_agents_fine_tune_test.py | shantanuwadnerkar/deepdrive-zero | 3134a5b092a53ff60e4207d7419fd6a19cb5a6e9 | [
"MIT"
] | null | null | null | import os
import sys
from deepdrive_zero.experiments import utils
from spinup.utils.run_utils import ExperimentGrid
from spinup import ppo_pytorch
import torch
experiment_name = os.path.basename(__file__)[:-3]
notes = """Adding yield to left input and reward"""
env_config = dict(
env_name='deepdrive-2d-intersect... | 31.615385 | 199 | 0.754866 |
266f6ed6d3e092c83d3c7800e37ff9b501807265 | 434 | py | Python | Codewars/8kyu/compare-within-margin/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codewars/8kyu/compare-within-margin/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codewars/8kyu/compare-within-margin/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python - 3.6.0
test.it('No margin')
test.assert_equals(close_compare(4, 5), -1)
test.assert_equals(close_compare(5, 5), 0)
test.assert_equals(close_compare(6, 5), 1)
test.it('With margin of 3')
test.assert_equals(close_compare(2, 5, 3), 0)
test.assert_equals(close_compare(5, 5, 3), 0)
test.assert_equals(close_compa... | 31 | 49 | 0.723502 |
874dad16c579924936a2e45f638241115bc94fca | 2,320 | py | Python | tatudashboard/exceptions.py | pinodeca/tatu-dashboard | 1685f7c862c2d3502abd51d9ff4f2a12b147680c | [
"Apache-2.0"
] | null | null | null | tatudashboard/exceptions.py | pinodeca/tatu-dashboard | 1685f7c862c2d3502abd51d9ff4f2a12b147680c | [
"Apache-2.0"
] | null | null | null | tatudashboard/exceptions.py | pinodeca/tatu-dashboard | 1685f7c862c2d3502abd51d9ff4f2a12b147680c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Rackspace Hosting.
#
# 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... | 23.673469 | 71 | 0.655172 |
c64d1070668087f8944cac487dc8e8cdf9fecabb | 236 | py | Python | tests/test_observables.py | mschneider/mango-explorer | ed50880ef80b31b679c9c89fa9bf0579391d71c9 | [
"MIT"
] | 1 | 2021-09-09T20:49:46.000Z | 2021-09-09T20:49:46.000Z | tests/test_observables.py | mschneider/mango-explorer | ed50880ef80b31b679c9c89fa9bf0579391d71c9 | [
"MIT"
] | null | null | null | tests/test_observables.py | mschneider/mango-explorer | ed50880ef80b31b679c9c89fa9bf0579391d71c9 | [
"MIT"
] | 2 | 2021-09-09T20:49:50.000Z | 2021-11-05T21:41:41.000Z | from .context import mango
import rx
def test_collecting_observer_subscriber():
items = ["a", "b", "c"]
actual = mango.CollectingObserverSubscriber()
rx.from_(items).subscribe(actual)
assert actual.collected == items
| 21.454545 | 49 | 0.711864 |
78f999daaed6f06f0a08a7b249caa79cd8f07ccb | 2,997 | py | Python | application/main/main_views.py | alchekroun/eloart | 2564ba2d25b584fcae4344cac55c048b0b6f2548 | [
"Unlicense"
] | null | null | null | application/main/main_views.py | alchekroun/eloart | 2564ba2d25b584fcae4344cac55c048b0b6f2548 | [
"Unlicense"
] | null | null | null | application/main/main_views.py | alchekroun/eloart | 2564ba2d25b584fcae4344cac55c048b0b6f2548 | [
"Unlicense"
] | null | null | null | import requests
from ..helpElo import newelo
from flask import Blueprint, render_template, redirect, url_for
from sqlalchemy.sql.expression import func
from application import db
from application.models import Piece
main_bp = Blueprint('main_bp', __name__, template_folder='templates', static_folder='static')
@main_... | 31.882979 | 114 | 0.682349 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.