hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2b5817ba438460ef7d6dca985889536c4db85761 | 977 | py | Python | run_spider.py | jen-soft/easy_web_crawler | 3c2c4ed612b4ef52b1306a948dd9adaa5ac80c4e | [
"MIT"
] | 1 | 2018-03-04T00:08:11.000Z | 2018-03-04T00:08:11.000Z | run_spider.py | jen-soft/easy_web_crawler | 3c2c4ed612b4ef52b1306a948dd9adaa5ac80c4e | [
"MIT"
] | 8 | 2021-02-08T20:19:31.000Z | 2022-03-11T23:17:07.000Z | run_spider.py | jen-soft/easy_web_crawler | 3c2c4ed612b4ef52b1306a948dd9adaa5ac80c4e | [
"MIT"
] | null | null | null | import os
from scrapy.crawler import CrawlerProcess
from scrapy.cmdline import execute, get_project_settings
from my_crawler.spiders.yts__am import YtsAmSpider
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
def main():
result_file_path = os.path.join(BASE_DIR, 'data/debug_data.json')
if os.path.exist... | 28.735294 | 80 | 0.639713 |
8a77969ce682f1699557944f973430668f5f0898 | 11,535 | py | Python | parallel_misc/mnist_replica.py | Animadversio/FloodFillNetwork-Notes | c4d207e53db1c2befc79fbc0ef0451d6f877c868 | [
"Apache-2.0"
] | 2 | 2019-03-09T22:07:10.000Z | 2019-07-30T11:55:59.000Z | parallel_misc/mnist_replica.py | Animadversio/FloodFillNetwork-Notes | c4d207e53db1c2befc79fbc0ef0451d6f877c868 | [
"Apache-2.0"
] | 1 | 2019-07-30T12:07:47.000Z | 2019-07-30T12:07:47.000Z | parallel_misc/mnist_replica.py | Animadversio/FloodFillNetwork-Notes | c4d207e53db1c2befc79fbc0ef0451d6f877c868 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.252747 | 99 | 0.641179 |
85f0008e600bee5a564459a66b9b0a316c267c5a | 8,357 | py | Python | PythonVirtEnv/Lib/site-packages/openpyxl/styles/stylesheet.py | zuhorski/EPL_Project | 2d2417652879cfbe33c44c003ad77b7222590849 | [
"MIT"
] | 6 | 2021-09-18T07:19:54.000Z | 2021-09-18T07:20:07.000Z | PythonVirtEnv/Lib/site-packages/openpyxl/styles/stylesheet.py | zuhorski/EPL_Project | 2d2417652879cfbe33c44c003ad77b7222590849 | [
"MIT"
] | 5 | 2021-08-06T09:41:32.000Z | 2021-08-17T08:37:47.000Z | PythonVirtEnv/Lib/site-packages/openpyxl/styles/stylesheet.py | zuhorski/EPL_Project | 2d2417652879cfbe33c44c003ad77b7222590849 | [
"MIT"
] | 3 | 2021-10-24T01:01:01.000Z | 2021-11-29T23:13:02.000Z | # Copyright (c) 2010-2021 openpyxl
from warnings import warn
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors import (
Typed,
)
from openpyxl.descriptors.sequence import NestedSequence
from openpyxl.descriptors.excel import ExtensionList
from openpyxl.utils.indexed_list import ... | 32.266409 | 80 | 0.658969 |
d11864d0e9ce8b34a08668d6a870cd9245569fcd | 115 | py | Python | commlib/transports/__init__.py | robotics-4-all/commlib-py | 9d56e0a2e13410feac0e10d9866a1c4a60ade2c7 | [
"MIT"
] | 1 | 2021-06-09T09:32:53.000Z | 2021-06-09T09:32:53.000Z | commlib/transports/__init__.py | robotics-4-all/commlib-py | 9d56e0a2e13410feac0e10d9866a1c4a60ade2c7 | [
"MIT"
] | 7 | 2022-03-10T23:57:25.000Z | 2022-03-13T19:12:54.000Z | commlib/transports/__init__.py | robotics-4-all/commlib-py | 9d56e0a2e13410feac0e10d9866a1c4a60ade2c7 | [
"MIT"
] | 1 | 2021-06-07T16:25:05.000Z | 2021-06-07T16:25:05.000Z | """Protocol Transports sub-package"""
__author__ = """Konstantinos Panayiotou"""
__email__ = 'klpanagi@gmail.com'
| 23 | 42 | 0.73913 |
24d15732a7fa222d1d3879eb0e633fe4e21b3fd7 | 3,702 | py | Python | shards/mishards/grpc_utils/grpc_args_parser.py | JinHai-CN/milvus | b9ae5983776aef497ef91e994a3a9ae120a98868 | [
"Apache-2.0"
] | 3 | 2020-01-20T02:35:25.000Z | 2020-04-29T03:54:21.000Z | shards/mishards/grpc_utils/grpc_args_parser.py | liangwlw/milvus | 7e7f626b9c7288c1c82f5dafed87d33897f4b64e | [
"Apache-2.0"
] | null | null | null | shards/mishards/grpc_utils/grpc_args_parser.py | liangwlw/milvus | 7e7f626b9c7288c1c82f5dafed87d33897f4b64e | [
"Apache-2.0"
] | 2 | 2021-03-15T11:47:38.000Z | 2021-03-15T12:27:16.000Z | import ujson
from milvus import Status
from functools import wraps
def error_status(func):
@wraps(func)
def inner(*args, **kwargs):
try:
results = func(*args, **kwargs)
except Exception as e:
return Status(code=Status.UNEXPECTED_ERROR, message=str(e)), None
ret... | 27.422222 | 81 | 0.657482 |
9841eaaed0ec90a0beb6803bc78cdb3248bac4a0 | 22,534 | py | Python | scripts/commands/open.py | tartakynov/enso | 3f5f7a3dcd15253889d40dc6414a24ad690ce74c | [
"BSD-3-Clause"
] | 6 | 2016-01-26T23:21:42.000Z | 2022-01-30T04:20:04.000Z | scripts/commands/open.py | tartakynov/enso | 3f5f7a3dcd15253889d40dc6414a24ad690ce74c | [
"BSD-3-Clause"
] | null | null | null | scripts/commands/open.py | tartakynov/enso | 3f5f7a3dcd15253889d40dc6414a24ad690ce74c | [
"BSD-3-Clause"
] | 4 | 2017-04-28T04:51:57.000Z | 2020-04-01T14:14:33.000Z | from win32com.shell import shell, shellcon
import os
import glob
import operator
import re
import time
import win32api
import win32con
import win32process
import pythoncom
import logging
unlearn_open_undo = []
my_documents_dir = shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, 0, 0)
LEARN_AS_DIR = os.path.join(my_d... | 35.542587 | 243 | 0.62581 |
d7e27d56dc3a7d8c931a6319b9c2fbe0ba5e9ce0 | 2,865 | py | Python | visu_regression_nn.py | NiteshBharadwaj/JDOT | 86412332f809f67584fda5b51b1b1e90097ac6b5 | [
"MIT"
] | 75 | 2017-10-31T08:44:41.000Z | 2022-03-04T13:18:46.000Z | visu_regression_nn.py | NiteshBharadwaj/JDOT | 86412332f809f67584fda5b51b1b1e90097ac6b5 | [
"MIT"
] | null | null | null | visu_regression_nn.py | NiteshBharadwaj/JDOT | 86412332f809f67584fda5b51b1b1e90097ac6b5 | [
"MIT"
] | 29 | 2017-10-18T06:21:46.000Z | 2022-02-15T09:22:08.000Z | # -*- coding: utf-8 -*-
"""
Neural network regression example for JDOT
"""
# Author: Remi Flamary <remi.flamary@unice.fr>
# Nicolas Courty <ncourty@irisa.fr>
#
# License: MIT License
import numpy as np
import pylab as pl
import jdot
#from sklearn import datasets
from scipy.spatial.distance import cdist
im... | 20.611511 | 113 | 0.682723 |
5fa0b6e1640307175a1935491c382843cd1faf72 | 1,754 | py | Python | invenio_previewer/api.py | max-moser/invenio-previewer | c2f86b9284f5c57a4b881e97735f5a9fbbc710b6 | [
"MIT"
] | 3 | 2015-08-19T12:50:16.000Z | 2020-12-14T04:06:04.000Z | invenio_previewer/api.py | max-moser/invenio-previewer | c2f86b9284f5c57a4b881e97735f5a9fbbc710b6 | [
"MIT"
] | 99 | 2015-09-13T17:59:28.000Z | 2022-03-08T17:21:34.000Z | invenio_previewer/api.py | max-moser/invenio-previewer | c2f86b9284f5c57a4b881e97735f5a9fbbc710b6 | [
"MIT"
] | 52 | 2015-08-13T13:42:26.000Z | 2022-03-28T07:54:17.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""File reader utility."""
from __future__ import absolute_import, print_function
f... | 24.704225 | 79 | 0.604333 |
212c2375bc1b80a3c18f8d94801c25b3d5a503fc | 15,408 | py | Python | venv/Lib/site-packages/win32comext/axscript/client/pyscript.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 150 | 2021-11-02T05:31:51.000Z | 2022-03-24T06:22:22.000Z | venv/Lib/site-packages/win32comext/axscript/client/pyscript.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 4 | 2021-12-01T11:55:58.000Z | 2022-02-24T16:14:37.000Z | venv/Lib/site-packages/win32comext/axscript/client/pyscript.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 33 | 2021-11-03T00:29:41.000Z | 2022-03-15T13:15:56.000Z | """Python ActiveX Scripting Implementation
This module implements the Python ActiveX Scripting client.
To register the implementation, simply "run" this Python program - ie
either double-click on it, or run "python.exe pyscript.py" from the
command line.
"""
import winerror
import win32com
import win32api
import pyt... | 34.469799 | 103 | 0.617796 |
d7d01df82a3ddcae975b4282dd7b1800f7bf5a09 | 2,231 | py | Python | setup.py | suzil/pycodestyle | a238201edd2883fcc0400df4a11cbb6fd5f6e5d7 | [
"MIT"
] | 1 | 2021-05-08T07:32:20.000Z | 2021-05-08T07:32:20.000Z | vimfiles/bundle/vim-python/submodules/pycodestyle/setup.py | OrangeGzY/vimrc | ddcaedce2effbbd1014eddbceebeb8c621cd9f95 | [
"MIT"
] | null | null | null | vimfiles/bundle/vim-python/submodules/pycodestyle/setup.py | OrangeGzY/vimrc | ddcaedce2effbbd1014eddbceebeb8c621cd9f95 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import with_statement
from setuptools import setup
def get_version():
with open('pycodestyle.py') as f:
for line in f:
if line.startswith('__version__'):
return eval(line.split('=')[-1])
def get_long_description():
descr = []
fo... | 32.808824 | 71 | 0.601076 |
b86b8dba2acecc88ac204e659fcc0ed45c4f7143 | 2,771 | py | Python | vergoldemich/strategies/adx_rsi.py | FMeirinhos/VergoldeMich | 69fd9f629bccfd2de8b74c9939755ece8135417a | [
"Unlicense"
] | 1 | 2020-02-13T16:53:36.000Z | 2020-02-13T16:53:36.000Z | vergoldemich/strategies/adx_rsi.py | FMeirinhos/VergoldeMich | 69fd9f629bccfd2de8b74c9939755ece8135417a | [
"Unlicense"
] | null | null | null | vergoldemich/strategies/adx_rsi.py | FMeirinhos/VergoldeMich | 69fd9f629bccfd2de8b74c9939755ece8135417a | [
"Unlicense"
] | null | null | null | from .signal import *
from .strategy import *
import talib
import numpy as np
class ADX_RSI(Strategy):
"""
Basic strategy based on RSI, BBs and ADX.
If RSI is satisfied, a timewindow of of trade is opened.
If the cross is satisfied within the timeframe, the trading is
"""
params = dict(
... | 31.850575 | 81 | 0.570913 |
b60a415b4419b55f4fd740aa53a8e4f44aaf6455 | 32,042 | py | Python | sklearn/calibration.py | myazann/scikit-learn | d30a419fd5589495e5d9fafb6968bb305bc0ae18 | [
"BSD-3-Clause"
] | 1 | 2021-06-20T01:00:38.000Z | 2021-06-20T01:00:38.000Z | sklearn/calibration.py | myazann/scikit-learn | d30a419fd5589495e5d9fafb6968bb305bc0ae18 | [
"BSD-3-Clause"
] | null | null | null | sklearn/calibration.py | myazann/scikit-learn | d30a419fd5589495e5d9fafb6968bb305bc0ae18 | [
"BSD-3-Clause"
] | 1 | 2021-03-17T03:23:50.000Z | 2021-03-17T03:23:50.000Z | """Calibration of predicted probabilities."""
# Author: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Balazs Kegl <balazs.kegl@gmail.com>
# Jan Hendrik Metzen <jhm@informatik.uni-bremen.de>
# Mathieu Blondel <mathieu@mblondel.org>
#
# License: BSD 3 clause
import warnings
from... | 35.961841 | 79 | 0.62468 |
63c8b1286a4c1b87deea9092cfd57d7e410da590 | 1,282 | py | Python | setup.py | snoop2head/kss | e607c572ab5678b3e3f40af95d4aa7c61e4dacb6 | [
"BSD-3-Clause"
] | null | null | null | setup.py | snoop2head/kss | e607c572ab5678b3e3f40af95d4aa7c61e4dacb6 | [
"BSD-3-Clause"
] | null | null | null | setup.py | snoop2head/kss | e607c572ab5678b3e3f40af95d4aa7c61e4dacb6 | [
"BSD-3-Clause"
] | null | null | null | import codecs
from setuptools import setup, find_packages
required = [
"emoji",
]
def read_file(filename, cb):
with codecs.open(filename, "r", "utf8") as f:
return cb(f)
with open("README.md", encoding="utf-8") as f:
long_description = f.read()
setup(
name="kss",
version="3.3.1.1",
... | 28.488889 | 61 | 0.630265 |
386f74e1506c0da2ecdca073106e93bdc9b063cb | 1,497 | py | Python | instagram/migrations/0006_auto_20190522_0937.py | badruu/insta | d09d82b123beb3b682f6047ac4ba4c254acf2cdd | [
"MIT"
] | 2 | 2019-12-23T03:00:47.000Z | 2022-02-28T17:25:34.000Z | instagram/migrations/0006_auto_20190522_0937.py | badruu/insta | d09d82b123beb3b682f6047ac4ba4c254acf2cdd | [
"MIT"
] | 5 | 2020-06-05T20:51:05.000Z | 2022-01-13T01:14:41.000Z | instagram/migrations/0006_auto_20190522_0937.py | badruu/insta | d09d82b123beb3b682f6047ac4ba4c254acf2cdd | [
"MIT"
] | 1 | 2022-02-28T17:19:50.000Z | 2022-02-28T17:19:50.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-05-22 06:37
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('instagram', '0005_auto_20190521_1559'),
]
operati... | 28.245283 | 114 | 0.550434 |
5d02bff33614c34530898671cde9f8d3e43b26e9 | 11,715 | py | Python | eva_submission/xlsx/xlsx_parser.py | sundarvenkata-EBI/eva-submission-1 | abc06a1a102ea1ad50e6308ba898d3dd726be70d | [
"Apache-2.0"
] | null | null | null | eva_submission/xlsx/xlsx_parser.py | sundarvenkata-EBI/eva-submission-1 | abc06a1a102ea1ad50e6308ba898d3dd726be70d | [
"Apache-2.0"
] | 14 | 2021-01-21T17:35:19.000Z | 2022-03-02T16:22:08.000Z | eva_submission/xlsx/xlsx_parser.py | sundarvenkata-EBI/eva-submission-1 | abc06a1a102ea1ad50e6308ba898d3dd726be70d | [
"Apache-2.0"
] | 8 | 2021-01-03T10:57:32.000Z | 2021-12-13T10:21:06.000Z | # Copyright 2020 EMBL - European Bioinformatics Institute
#
# 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... | 36.839623 | 136 | 0.627913 |
aa9d9d9b494e67c8cb073e7c651de6a9a03f20b7 | 2,007 | py | Python | keystoneclient/v2_0/ec2.py | dreamhost/python-keystoneclient | aa9761433065a260dc2b571deb10957347a76d4e | [
"Apache-1.1"
] | null | null | null | keystoneclient/v2_0/ec2.py | dreamhost/python-keystoneclient | aa9761433065a260dc2b571deb10957347a76d4e | [
"Apache-1.1"
] | null | null | null | keystoneclient/v2_0/ec2.py | dreamhost/python-keystoneclient | aa9761433065a260dc2b571deb10957347a76d4e | [
"Apache-1.1"
] | null | null | null | # Copyright 2011 OpenStack 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 b... | 31.857143 | 78 | 0.613852 |
438b1169c321488abf8a47fca4cb10baee795b17 | 649 | py | Python | jacquard/storage/tests/test_dummy.py | peteowlett/jacquard | 772fd633e521501688e0933482cba45f48c23ef9 | [
"MIT"
] | null | null | null | jacquard/storage/tests/test_dummy.py | peteowlett/jacquard | 772fd633e521501688e0933482cba45f48c23ef9 | [
"MIT"
] | null | null | null | jacquard/storage/tests/test_dummy.py | peteowlett/jacquard | 772fd633e521501688e0933482cba45f48c23ef9 | [
"MIT"
] | null | null | null | import unittest
import pytest
from jacquard.storage.dummy import DummyStore
from jacquard.storage.testing_utils import StorageGauntlet
class DummyGauntletTest(StorageGauntlet, unittest.TestCase):
def open_storage(self):
return DummyStore('')
def test_transaction_raises_error_for_bad_commit(self):
... | 27.041667 | 60 | 0.725732 |
43033bc1a58edf8e9acea7107eb1eeac4e33e6ed | 12,585 | py | Python | shark/shark/report/bom_rm_status/bom_rm_status.py | umaepoch/Shark | 2ebf715efba796f96c2d9807bbe930e354606492 | [
"MIT"
] | null | null | null | shark/shark/report/bom_rm_status/bom_rm_status.py | umaepoch/Shark | 2ebf715efba796f96c2d9807bbe930e354606492 | [
"MIT"
] | null | null | null | shark/shark/report/bom_rm_status/bom_rm_status.py | umaepoch/Shark | 2ebf715efba796f96c2d9807bbe930e354606492 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Epoch and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, msgprint
from erpnext.stock.stock_balance import get_balance_qty_from_sle
import datetime
import time
import math
import json
import ast
def execu... | 38.723077 | 332 | 0.717362 |
417e3728e138f7964791aa73ec1b8c7736edb2bf | 3,186 | py | Python | paper/scripts/qaoa_treewidth_times.py | TheoryInPractice/ConSequences | acf9dcfd931137cbca71251cd0c09c5009aee99d | [
"BSD-3-Clause"
] | 7 | 2018-10-23T21:59:50.000Z | 2021-06-18T23:49:12.000Z | paper/scripts/qaoa_treewidth_times.py | TheoryInPractice/ConSequences | acf9dcfd931137cbca71251cd0c09c5009aee99d | [
"BSD-3-Clause"
] | null | null | null | paper/scripts/qaoa_treewidth_times.py | TheoryInPractice/ConSequences | acf9dcfd931137cbca71251cd0c09c5009aee99d | [
"BSD-3-Clause"
] | 2 | 2019-11-04T06:06:10.000Z | 2020-03-03T06:41:35.000Z | #!/usr/bin/env python3
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import numpy as np
import sys
import warnings
from macros import colors
def algorithm_font(algorithm):
return r'\textsf{{{}}}'.format(algorithm)
def plot_treewidth_time_comparison(data_filename, plot_filename, verb... | 35.010989 | 75 | 0.47081 |
245ec3867e852f8453815580668a88d6cae3eff0 | 410 | py | Python | products/migrations/0003_product_detail.py | annakovesdi/eco-era-store | 0b83b168bb09bdd382dc5cee3f6d161dd90faa7b | [
"ADSL"
] | null | null | null | products/migrations/0003_product_detail.py | annakovesdi/eco-era-store | 0b83b168bb09bdd382dc5cee3f6d161dd90faa7b | [
"ADSL"
] | null | null | null | products/migrations/0003_product_detail.py | annakovesdi/eco-era-store | 0b83b168bb09bdd382dc5cee3f6d161dd90faa7b | [
"ADSL"
] | 1 | 2021-08-30T16:04:54.000Z | 2021-08-30T16:04:54.000Z | # Generated by Django 3.2.4 on 2021-07-24 09:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0002_auto_20210710_1053'),
]
operations = [
migrations.AddField(
model_name='product',
name='detail',
... | 21.578947 | 74 | 0.607317 |
dc5032299031a2b9d5c651f94c5cf51ee2f6f967 | 730 | py | Python | setup.py | DipanshuGolan/feature_analysis | 78361c3aeb433e005291a9b0ef118c5c8ca77362 | [
"MIT"
] | null | null | null | setup.py | DipanshuGolan/feature_analysis | 78361c3aeb433e005291a9b0ef118c5c8ca77362 | [
"MIT"
] | null | null | null | setup.py | DipanshuGolan/feature_analysis | 78361c3aeb433e005291a9b0ef118c5c8ca77362 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="Feature_Analysis",
version="0.0.1",
author="Dipanshu Golan",
author_email="dipanshugolan96@gmail.com",
description="It performs feature analysis for data preprocessing or usage of data in ... | 33.181818 | 108 | 0.690411 |
5c2a04dc979ef9c654034d2fb12e41ea9b4c5a60 | 3,463 | py | Python | asm/ops/abc.py | martmists-gh/pyasm | 038765f389b0403d37f3e0080da52d07f11827f9 | [
"MIT"
] | 1 | 2021-11-17T12:56:53.000Z | 2021-11-17T12:56:53.000Z | asm/ops/abc.py | martmists-gh/pyasm | 038765f389b0403d37f3e0080da52d07f11827f9 | [
"MIT"
] | null | null | null | asm/ops/abc.py | martmists-gh/pyasm | 038765f389b0403d37f3e0080da52d07f11827f9 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from struct import pack
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
from asm.serializer import Label, Serializer
@dataclass(eq=False)
class Opcode:
id: int
arg: object = 0
def serialize(self, ctx: 'Serializer') -> bytes:
return self.int_arg(self.... | 28.858333 | 96 | 0.616517 |
e224941ef001fda86a8d3a935291a495ee35d90e | 5,832 | py | Python | Amplo/Utils/io.py | Amplo-GmbH/AutoML | eb6cc83b6e4a3ddc7c3553e9c41d236e8b48c606 | [
"MIT"
] | 5 | 2022-01-07T13:34:37.000Z | 2022-03-17T06:40:28.000Z | Amplo/Utils/io.py | Amplo-GmbH/AutoML | eb6cc83b6e4a3ddc7c3553e9c41d236e8b48c606 | [
"MIT"
] | 5 | 2022-03-22T13:42:22.000Z | 2022-03-31T16:20:44.000Z | Amplo/Utils/io.py | Amplo-GmbH/AutoML | eb6cc83b6e4a3ddc7c3553e9c41d236e8b48c606 | [
"MIT"
] | 1 | 2021-12-17T22:41:11.000Z | 2021-12-17T22:41:11.000Z | import os
import json
import warnings
from typing import Union, Tuple
from pathlib import Path
import pandas as pd
__all__ = ['boolean_input', 'parse_json', 'read_pandas', 'merge_logs', 'get_log_metadata']
FILE_READERS = {'.csv': pd.read_csv, '.json': pd.read_json, '.xml': pd.read_xml,
'.feather': ... | 29.755102 | 109 | 0.567387 |
db74cee452d6a55a32bd429c4f178bed1e1f956d | 4,699 | py | Python | glartifacts/gitaly/proto/blob_pb2_grpc.py | TimothySprague/glartifacts | 1d2400593fa7fa261b15c1c7f3494daf009586f8 | [
"MIT"
] | null | null | null | glartifacts/gitaly/proto/blob_pb2_grpc.py | TimothySprague/glartifacts | 1d2400593fa7fa261b15c1c7f3494daf009586f8 | [
"MIT"
] | null | null | null | glartifacts/gitaly/proto/blob_pb2_grpc.py | TimothySprague/glartifacts | 1d2400593fa7fa261b15c1c7f3494daf009586f8 | [
"MIT"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from . import blob_pb2 as blob__pb2
class BlobServiceStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""... | 40.162393 | 84 | 0.752075 |
9962a8e8c1669afd2952248afe664e1ed0c33cf3 | 6,227 | py | Python | meido_mall/meido_mall/apps/goods/models.py | zhangbin9597/py22_django | 6b3ee1f4ade6b16d55496d8d695acfe5981ddd18 | [
"MIT"
] | null | null | null | meido_mall/meido_mall/apps/goods/models.py | zhangbin9597/py22_django | 6b3ee1f4ade6b16d55496d8d695acfe5981ddd18 | [
"MIT"
] | null | null | null | meido_mall/meido_mall/apps/goods/models.py | zhangbin9597/py22_django | 6b3ee1f4ade6b16d55496d8d695acfe5981ddd18 | [
"MIT"
] | null | null | null | from django.db import models
from meido_mall.utils.models import BaseModel
# Create your models here.
class GoodsCategory(BaseModel):
"""商品类别"""
name = models.CharField(max_length=10, verbose_name='名称')
parent = models.ForeignKey('self', related_name='subs', null=True, blank=True, on_delete=models.CASCADE,... | 35.180791 | 120 | 0.691987 |
3230a72c9482df9462d6bed80f699e2b059489c0 | 56 | py | Python | diggrtoolbox/unified_api/__init__.py | diggr/diggrtoolbox | 25f5cf73d5bc4d3a54096aa8417a42025693f0b6 | [
"MIT"
] | 2 | 2018-08-31T22:02:04.000Z | 2019-01-25T15:51:04.000Z | diggrtoolbox/unified_api/__init__.py | diggr/diggrtoolbox | 25f5cf73d5bc4d3a54096aa8417a42025693f0b6 | [
"MIT"
] | null | null | null | diggrtoolbox/unified_api/__init__.py | diggr/diggrtoolbox | 25f5cf73d5bc4d3a54096aa8417a42025693f0b6 | [
"MIT"
] | null | null | null | from .diggr_api import DiggrAPI
__all__ = ['DiggrAPI']
| 14 | 31 | 0.75 |
4a1de71dcd740ea68c0b556dce82fc3b88c4a6f5 | 662 | py | Python | third_party/cyw30739_sdk/btp_reader.py | carol-apple/connectedhomeip | b1d40eb423ba5c2f4bbe15ff42a2b5d1b78ba2ce | [
"Apache-2.0"
] | 1 | 2022-02-22T02:02:10.000Z | 2022-02-22T02:02:10.000Z | third_party/cyw30739_sdk/btp_reader.py | carol-apple/connectedhomeip | b1d40eb423ba5c2f4bbe15ff42a2b5d1b78ba2ce | [
"Apache-2.0"
] | null | null | null | third_party/cyw30739_sdk/btp_reader.py | carol-apple/connectedhomeip | b1d40eb423ba5c2f4bbe15ff42a2b5d1b78ba2ce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import json
import sys
def main():
btp_file = sys.argv[1]
items = {}
with open(btp_file) as btp:
for line in btp:
item = line.strip().split("=")
if len(item) == 2:
key = item[0].strip()
value = item[1].strip()
... | 20.6875 | 44 | 0.522659 |
63d5fe140552e8dc49e81763afe2f6d594753819 | 3,373 | py | Python | pii_generator/constants.py | AvinashRajPurohit/pii-data-generator | 92482575de2c093f2f49282fe3377924d6a6370d | [
"MIT"
] | 1 | 2021-12-14T23:19:12.000Z | 2021-12-14T23:19:12.000Z | pii_generator/constants.py | AvinashRajPurohit/pii-data-generator | 92482575de2c093f2f49282fe3377924d6a6370d | [
"MIT"
] | null | null | null | pii_generator/constants.py | AvinashRajPurohit/pii-data-generator | 92482575de2c093f2f49282fe3377924d6a6370d | [
"MIT"
] | null | null | null | from datetime import datetime
from google.cloud import bigquery
MASTER_CARD_PREFIXS = [
['5', '1'],
['5', '2'],
['5', '3'],
['5', '4'],
['5', '5']
]
VISA_PREFIXS = [
['4', '5', '3', '9'],
['4', '5', '5', '6'],
['4', '9', '1', '6'],
['4... | 31.231481 | 126 | 0.480878 |
14f01607389e1c35676e61339aad79b9b958e2e7 | 6,738 | py | Python | CarRentalAgencyManagement/print_helper.py | mantoomine/Amir_Projects | 1386a0234b279884e743185b4072c0c3e01ebe87 | [
"MIT"
] | null | null | null | CarRentalAgencyManagement/print_helper.py | mantoomine/Amir_Projects | 1386a0234b279884e743185b4072c0c3e01ebe87 | [
"MIT"
] | null | null | null | CarRentalAgencyManagement/print_helper.py | mantoomine/Amir_Projects | 1386a0234b279884e743185b4072c0c3e01ebe87 | [
"MIT"
] | null | null | null | import pyinputplus as pyip
def auto_company_menu():
print('Welcome to the lnu auto company')
print('Menu')
print('1: Manage customer')
print('2: Manage cars')
print('3: Manage leasing')
print('4: The most popular car')
print('5: The most high rated customer')
print('6: exit')
retur... | 29.168831 | 119 | 0.685367 |
00571b378ab2efe033a97ef545d1c4d82717e1ae | 1,078 | py | Python | send_email.py | Smendowski/hidden-communication-using-covert-channels | 47c04822925cedbac9a356e49705eae81db3419f | [
"MIT"
] | 4 | 2021-12-08T08:32:52.000Z | 2021-12-14T10:54:27.000Z | send_email.py | Smendowski/hidden-communication-using-covert-channels | 47c04822925cedbac9a356e49705eae81db3419f | [
"MIT"
] | null | null | null | send_email.py | Smendowski/hidden-communication-using-covert-channels | 47c04822925cedbac9a356e49705eae81db3419f | [
"MIT"
] | null | null | null | from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import smtplib, ssl
import lorem
import os
sender_email = os.environ.get("SCS_SENDER_EMAIL")
receiver_email = os.environ.get("SCS_RECEIVER_EMAIL")
password = os.environ.get("SCS_EMAIL_PASSWORD")
if... | 26.95 | 82 | 0.749536 |
8cfe0f5a58769543d05d013976434a5403ecd5f9 | 361 | py | Python | day7/d7p2.py | flowgrow/adventofcode2021 | b6e316a388726031ff500ce77d1ec5d5b7da0658 | [
"MIT"
] | null | null | null | day7/d7p2.py | flowgrow/adventofcode2021 | b6e316a388726031ff500ce77d1ec5d5b7da0658 | [
"MIT"
] | null | null | null | day7/d7p2.py | flowgrow/adventofcode2021 | b6e316a388726031ff500ce77d1ec5d5b7da0658 | [
"MIT"
] | null | null | null | input = open('input.txt', 'r')
data = list(map(int, input.readline().strip().split(',')))
data.sort()
min_data = min(data)
max_data = max(data)
spread = max_data - min_data
summed_fuel = [0] * spread
for key in data:
for i in range(min_data, max_data):
diff = abs(i - key)
summed_fuel[i] += (diff ... | 21.235294 | 58 | 0.620499 |
dac95bf184fa5089258b31851a1a105a90e75040 | 1,155 | py | Python | src/PySurprised/svms_preprocessing.py | FDUJiaG/PyML-Course | f606b5eab8dca928532263a9fe9c169549971d42 | [
"MIT"
] | 1 | 2020-05-21T08:23:08.000Z | 2020-05-21T08:23:08.000Z | src/PySurprised/svms_preprocessing.py | FDUJiaG/PyML-Course | f606b5eab8dca928532263a9fe9c169549971d42 | [
"MIT"
] | null | null | null | src/PySurprised/svms_preprocessing.py | FDUJiaG/PyML-Course | f606b5eab8dca928532263a9fe9c169549971d42 | [
"MIT"
] | 1 | 2020-12-07T07:04:34.000Z | 2020-12-07T07:04:34.000Z | from sklearn.model_selection import train_test_split
from sklearn.datasets import load_breast_cancer
from sklearn.svm import SVC
cancer = load_breast_cancer()
X_train, X_test, y_train, y_test = train_test_split(cancer.data, cancer.target, random_state=0)
# 计算训练集中每个特征的最小值
min_on_training = X_train.min(axis=0)
# 计算训练集... | 36.09375 | 95 | 0.779221 |
8d02ea67b6d2debc8bb1b368166ccb773abde142 | 3,576 | py | Python | lib/requests/structures.py | ihdavids/sublime-text-trello | ee54bfad5ba7128e560cf515db57d8c2ed586a42 | [
"MIT"
] | 303 | 2015-01-03T23:47:42.000Z | 2022-02-07T11:50:12.000Z | lib/requests/structures.py | ihdavids/sublime-text-trello | ee54bfad5ba7128e560cf515db57d8c2ed586a42 | [
"MIT"
] | 94 | 2015-01-01T00:26:48.000Z | 2021-08-24T10:40:25.000Z | vendor/packages/requests/requests/structures.py | willingc/new-mini-tasks | 9699f6b99f5dd2d4613b188bda58d8da6f44861e | [
"Apache-2.0"
] | 162 | 2015-01-01T00:21:16.000Z | 2022-02-23T02:36:04.000Z | # -*- coding: utf-8 -*-
"""
requests.structures
~~~~~~~~~~~~~~~~~~~
Data structures that power Requests.
"""
import os
import collections
from itertools import islice
class IteratorProxy(object):
"""docstring for IteratorProxy"""
def __init__(self, i):
self.i = i
# self.i = chain.from_iter... | 27.72093 | 75 | 0.608781 |
42071b842c972d845c50b57f1258dd14dc0f9e43 | 26,075 | py | Python | foundation/place.py | futursolo/furtherland | 33ead7d4e651ed3154c8047e3bdc4bb2871e4468 | [
"Apache-2.0"
] | null | null | null | foundation/place.py | futursolo/furtherland | 33ead7d4e651ed3154c8047e3bdc4bb2871e4468 | [
"Apache-2.0"
] | null | null | null | foundation/place.py | futursolo/furtherland | 33ead7d4e651ed3154c8047e3bdc4bb2871e4468 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2015 Futur Solo
#
# 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
#
# ... | 36.015193 | 78 | 0.548878 |
008ff549bcba37cdd266c0ed206db02f0bc12448 | 1,421 | py | Python | convert_image.py | MajFontana/pil-picture-mosaic | 336beb1f8d2e7066df3fe029b5260deb167ff866 | [
"MIT"
] | null | null | null | convert_image.py | MajFontana/pil-picture-mosaic | 336beb1f8d2e7066df3fe029b5260deb167ff866 | [
"MIT"
] | null | null | null | convert_image.py | MajFontana/pil-picture-mosaic | 336beb1f8d2e7066df3fe029b5260deb167ff866 | [
"MIT"
] | null | null | null | import os
import pickle
import random
from PIL import Image
IMAGE = "flock/HIRES/KittyHawk_E3_withLogo_001-1.jpg"
PALETTE = "PALETTE/"
MINRES = 35
RESAMP = Image.LANCZOS
PREVIEW_SCALE = 20
BLUEPRINT = "blueprint.png"
PREVIEW = "preview.png"
COOLDOWN = 1
RANDOMIZE_NOISE = True
path = os.path.join(PALETTE, "palette.pic... | 25.836364 | 92 | 0.611541 |
ab7a7ff86caa0abbb98ea192464297fcf49874ae | 121 | py | Python | tests/urls.py | htpeter/P | 050601f51efa21c6a10596c8e191fee3cbd4f533 | [
"MIT"
] | 1 | 2022-02-14T19:01:44.000Z | 2022-02-14T19:01:44.000Z | tests/urls.py | htpeter/P | 050601f51efa21c6a10596c8e191fee3cbd4f533 | [
"MIT"
] | null | null | null | tests/urls.py | htpeter/P | 050601f51efa21c6a10596c8e191fee3cbd4f533 | [
"MIT"
] | 1 | 2021-05-11T17:18:00.000Z | 2021-05-11T17:18:00.000Z | from django.urls import include, path
urlpatterns = [path("", include("project-name.urls", namespace="project-name"))]
| 24.2 | 80 | 0.727273 |
70451092c377cb7ffed33fa6e3d5499dff491729 | 4,396 | py | Python | src/k8s-configuration/azext_k8s_configuration/commands.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 1 | 2022-01-25T07:33:18.000Z | 2022-01-25T07:33:18.000Z | src/k8s-configuration/azext_k8s_configuration/commands.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | src/k8s-configuration/azext_k8s_configuration/commands.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 1 | 2022-03-10T22:13:02.000Z | 2022-03-10T22:13:02.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 38.902655 | 98 | 0.667197 |
44d71e1253eff59196ab4545f912e5f31937bd79 | 390 | py | Python | project/templatetags/app_filters.py | abhishekm47/restaurant-django | 56993f2269e27c9b932b5f172cdf4db1e95292aa | [
"MIT"
] | null | null | null | project/templatetags/app_filters.py | abhishekm47/restaurant-django | 56993f2269e27c9b932b5f172cdf4db1e95292aa | [
"MIT"
] | null | null | null | project/templatetags/app_filters.py | abhishekm47/restaurant-django | 56993f2269e27c9b932b5f172cdf4db1e95292aa | [
"MIT"
] | null | null | null | from django import template
register = template.Library()
@register.filter(name='previous')
def previous(some_list, current_index):
"""
Returns the previous element of the list using the current index if it exists.
Otherwise returns an empty string.
"""
try:
return some_list[int(current_i... | 27.857143 | 82 | 0.692308 |
769685e4f82ba1ee1e3e3a8b2c2ea0d6dfc12023 | 1,204 | py | Python | portscanner/classportscanner.py | Twiths/Ethical-hacking | 9d06326ca9890abfb396386fd00bc3d2eab49981 | [
"MIT"
] | null | null | null | portscanner/classportscanner.py | Twiths/Ethical-hacking | 9d06326ca9890abfb396386fd00bc3d2eab49981 | [
"MIT"
] | null | null | null | portscanner/classportscanner.py | Twiths/Ethical-hacking | 9d06326ca9890abfb396386fd00bc3d2eab49981 | [
"MIT"
] | null | null | null | import socket
from IPy import IP
from termcolor import colored
def scan(target):
converted_ip = check_ip(target)
print('\n' + '[- 0 scanning Target]: ' + str(target))
for port in range(1, 100):
scan_port(converted_ip, port)
#convert target name into ip address
def check_ip(ip):
try:
... | 25.083333 | 90 | 0.586379 |
d1abb706e5769ee8c5f6b42efd680ab5b9fa11bc | 2,467 | py | Python | dsa/challenges/queue_with_stacks/queue_with_stacks.py | joseph-zabaleta/data-structures-and-algorithms | b11b5ef50f52e3d505474fe5fffe4357933da251 | [
"MIT"
] | null | null | null | dsa/challenges/queue_with_stacks/queue_with_stacks.py | joseph-zabaleta/data-structures-and-algorithms | b11b5ef50f52e3d505474fe5fffe4357933da251 | [
"MIT"
] | null | null | null | dsa/challenges/queue_with_stacks/queue_with_stacks.py | joseph-zabaleta/data-structures-and-algorithms | b11b5ef50f52e3d505474fe5fffe4357933da251 | [
"MIT"
] | null | null | null | class Node:
def __init__(self, value, next_=None):
self.value = value
self.next = next_
if not isinstance(next_, Node) and next_ != None:
raise TypeError("Next must be a Node")
def __repr__(self):
return f"{self.value} : {self.next}"
class Stack:
def __init__(s... | 30.8375 | 138 | 0.591407 |
2b768ba843050b4077cac69e222ea05b37e0d41e | 31 | py | Python | lms/schoology/__init__.py | djpohly/lms | b092a8d1ae0aa3a7c7cfbb3e57ab82de65a3a7b2 | [
"MIT"
] | 2 | 2019-12-17T02:18:26.000Z | 2020-12-01T22:05:51.000Z | lms/schoology/__init__.py | djpohly/lms | b092a8d1ae0aa3a7c7cfbb3e57ab82de65a3a7b2 | [
"MIT"
] | null | null | null | lms/schoology/__init__.py | djpohly/lms | b092a8d1ae0aa3a7c7cfbb3e57ab82de65a3a7b2 | [
"MIT"
] | null | null | null | from .backend import Schoology
| 15.5 | 30 | 0.83871 |
a4b11d0196022f56e70d5a50c18851dbfa53a82f | 1,395 | py | Python | drivers/moveMotor.py | MFOSSociety/Automate-AI-Chess | 614d6bc587978ce083394169eb1d792f01ffc34b | [
"MIT"
] | 4 | 2019-06-26T10:09:50.000Z | 2020-11-21T07:55:59.000Z | drivers/moveMotor.py | MFOSSociety/Automate-AI-Chess | 614d6bc587978ce083394169eb1d792f01ffc34b | [
"MIT"
] | 2 | 2019-06-27T22:52:43.000Z | 2019-10-02T17:48:45.000Z | drivers/moveMotor.py | MFOSSociety/8-8 | 614d6bc587978ce083394169eb1d792f01ffc34b | [
"MIT"
] | 3 | 2019-06-30T18:40:22.000Z | 2019-10-16T09:42:56.000Z | from .motor1 import rotatemotor as rotateY
from .motor2 import rotatemotor as rotateX
from .ElectroMagnet import toggleMagnet
import time
motorcurentx = 0
motorcurenty = 0
xscale = 5
yscale = 5
half_square = 2
def moveMotor(move):
convertMove(move)
def trackInitial(x2,y2):
moveY(y2,0)
moveX(x2,0)
def moveX... | 19.928571 | 64 | 0.632258 |
c743c2653607bffc4779588f22f3a4c8918b54d6 | 2,192 | py | Python | cfgov/v1/tests/models/test_snippets.py | Colin-Seifer/consumerfinance.gov | a1a943f7170b498707d642d6be97b9a97a2b52e3 | [
"CC0-1.0"
] | 156 | 2015-01-16T15:16:46.000Z | 2020-08-04T04:48:01.000Z | cfgov/v1/tests/models/test_snippets.py | Colin-Seifer/consumerfinance.gov | a1a943f7170b498707d642d6be97b9a97a2b52e3 | [
"CC0-1.0"
] | 3,604 | 2015-01-05T22:09:12.000Z | 2020-08-14T17:09:19.000Z | cfgov/v1/tests/models/test_snippets.py | Colin-Seifer/consumerfinance.gov | a1a943f7170b498707d642d6be97b9a97a2b52e3 | [
"CC0-1.0"
] | 102 | 2015-01-28T14:51:18.000Z | 2020-08-10T00:00:39.000Z | # -*- coding: utf-8 -*-
from django.test import TestCase
from wagtail.core.models import Site
from wagtail.tests.testapp.models import SimplePage
from v1.blocks import ReusableTextChooserBlock
from v1.models.snippets import Contact, RelatedResource, ReusableText
class TestUnicodeCompatibility(TestCase):
def tes... | 36.533333 | 79 | 0.685219 |
0c697f23039fcc00712fd82b21c9a90a3c8267f5 | 460 | py | Python | tests.py | oeg-upm/tada-gam | 99f56d0cdfe39fc78f58480d274a22bb63698745 | [
"Apache-2.0"
] | 1 | 2019-05-23T13:52:13.000Z | 2019-05-23T13:52:13.000Z | tests.py | oeg-upm/tada-gam | 99f56d0cdfe39fc78f58480d274a22bb63698745 | [
"Apache-2.0"
] | null | null | null | tests.py | oeg-upm/tada-gam | 99f56d0cdfe39fc78f58480d274a22bb63698745 | [
"Apache-2.0"
] | null | null | null | import unittest
import captain
import subprocess
# def start_services():
# pass
class TestGam(unittest.TestCase):
def test_start_services(self):
subprocess.call(["docker-compose", "down"])
captain.parse_args(["up", "--services", "score=3", "combine=2"])
output = subprocess.check_out... | 21.904762 | 72 | 0.65 |
86cd351cd3133bb2d0790423f47b6319ecbbfaf1 | 1,186 | py | Python | Machinelearningalgorithms/svmwithlibrary.py | Lonakshi/Data-Analysis | 47f44bc0afd5e8891828651d0ba0a145d2f8b66b | [
"Apache-2.0"
] | null | null | null | Machinelearningalgorithms/svmwithlibrary.py | Lonakshi/Data-Analysis | 47f44bc0afd5e8891828651d0ba0a145d2f8b66b | [
"Apache-2.0"
] | null | null | null | Machinelearningalgorithms/svmwithlibrary.py | Lonakshi/Data-Analysis | 47f44bc0afd5e8891828651d0ba0a145d2f8b66b | [
"Apache-2.0"
] | null | null | null | import numpy as np
from sklearn import preprocessing,neighbors,svm
from sklearn.model_selection import train_test_split
import pandas as pd
df= pd.read_csv('breastcancer')
df.replace('?', -99999, inplace=True)
#we dont want an id column as it does not have any significance related to
#benign and malignant.
#k nea... | 21.962963 | 84 | 0.743676 |
22493603bc9ce0b9ecad617452c93da74a8eea2e | 538 | bzl | Python | js/packages/go-bridge/config.bzl | aeddi/berty-1 | 616f6419b19ca74bcef7f35b96bf249a5f55e70c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | js/packages/go-bridge/config.bzl | aeddi/berty-1 | 616f6419b19ca74bcef7f35b96bf249a5f55e70c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | js/packages/go-bridge/config.bzl | aeddi/berty-1 | 616f6419b19ca74bcef7f35b96bf249a5f55e70c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-07-10T06:28:24.000Z | 2020-07-10T06:28:24.000Z | load("@berty//go:config.bzl", "berty_go_config")
load("@co_znly_rules_gomobile//:repositories.bzl", "gomobile_repositories")
load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")
load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies")
def berty_bridge_confi... | 33.625 | 86 | 0.775093 |
753b6b221007d31942fc0d51f936a0c83dfae390 | 2,758 | py | Python | scrips/search_eval/run_selfcenter_eval_search_all_structs.py | lonelu/Metalprot | e51bee472c975aa171bdb6ee426a07ca69f110ee | [
"MIT"
] | null | null | null | scrips/search_eval/run_selfcenter_eval_search_all_structs.py | lonelu/Metalprot | e51bee472c975aa171bdb6ee426a07ca69f110ee | [
"MIT"
] | null | null | null | scrips/search_eval/run_selfcenter_eval_search_all_structs.py | lonelu/Metalprot | e51bee472c975aa171bdb6ee426a07ca69f110ee | [
"MIT"
] | null | null | null | import os
import sys
import prody as pr
import numpy as np
#You can either add the python package path.
#sys.path.append(r'/mnt/e/GitHub_Design/Metalprot')
from metalprot.search import search, search_eval
from metalprot.basic import filter
import pickle
import multiprocessing as mp
'''
python /mnt/e/GitHub_Design/Meta... | 30.988764 | 153 | 0.71066 |
18fe20b7932aad3e76a850204267bef6a51a75f6 | 1,661 | py | Python | main.py | arikarim/Rock_Paper_scissors_PYTHON | b95e80b473c2fb3276249f17879bcec2236ce9f2 | [
"MIT"
] | null | null | null | main.py | arikarim/Rock_Paper_scissors_PYTHON | b95e80b473c2fb3276249f17879bcec2236ce9f2 | [
"MIT"
] | null | null | null | main.py | arikarim/Rock_Paper_scissors_PYTHON | b95e80b473c2fb3276249f17879bcec2236ce9f2 | [
"MIT"
] | null | null | null | import random
import math
def play():
print('\n')
user = input("Enter your choice, 'R' for Rock, 'P' for Paper, 'S' for Scissors \n")
user = user.lower()
while user != 'r' and user != 'p' and user != 's':
print("Please enter a valid letter")
user = input("Enter your choice, 'R' for Rock... | 29.140351 | 121 | 0.577363 |
03dd871638c3469f2588798aa9779a1cfbb79485 | 58,465 | py | Python | google_images_download/google_images_download.py | lnowakow/google-images-download | 1655831e6760713544cb390883312f5acd05cfc2 | [
"MIT"
] | null | null | null | google_images_download/google_images_download.py | lnowakow/google-images-download | 1655831e6760713544cb390883312f5acd05cfc2 | [
"MIT"
] | null | null | null | google_images_download/google_images_download.py | lnowakow/google-images-download | 1655831e6760713544cb390883312f5acd05cfc2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# In[ ]:
# coding: utf-8
###### Searching and Downloading Google Images to the local disk ######
# Import Libraries
import sys
version = (3, 0)
cur_version = sys.version_info
if cur_version >= version: # If the Current Version of Python is 3.0 or above
import urllib.request
from urlli... | 50.314114 | 184 | 0.535927 |
e7ed4c2dbf01570225fb13554d97f130c296fe9d | 505 | py | Python | cride/circles/urls.py | DavidBarcenas/django-advance-course | 9cff5750d92d5039e84541c0799f72dbd361ac43 | [
"MIT"
] | null | null | null | cride/circles/urls.py | DavidBarcenas/django-advance-course | 9cff5750d92d5039e84541c0799f72dbd361ac43 | [
"MIT"
] | null | null | null | cride/circles/urls.py | DavidBarcenas/django-advance-course | 9cff5750d92d5039e84541c0799f72dbd361ac43 | [
"MIT"
] | null | null | null | from django.urls import path
from django.urls.conf import include
from rest_framework.routers import DefaultRouter
from .views import circles as circle_views
from .views import memberships as membership_views
router = DefaultRouter()
router.register(r'circles', circle_views.CircleViewSet, basename='circle')
router.r... | 25.25 | 74 | 0.768317 |
1874e1e47be6a911609fc38d242a7806cad93db8 | 3,508 | py | Python | ncovt_sample.py | Prateek23n/COVID19 | f0099fa1584586ea567c17df979fc6234f71f203 | [
"MIT"
] | null | null | null | ncovt_sample.py | Prateek23n/COVID19 | f0099fa1584586ea567c17df979fc6234f71f203 | [
"MIT"
] | null | null | null | ncovt_sample.py | Prateek23n/COVID19 | f0099fa1584586ea567c17df979fc6234f71f203 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import datetime
import time
import sqlite3
conn = sqlite3.connect('ncov.db')
c = conn.cursor()
#c.execute("INSERT INTO nCOV_test VALUES(976363)")
now = datetime.datetime.now()
print ("Data as on - " + str(now.strftime("%d/%m/%Y %H:%M:%S")))
URL = 'https://www... | 27.193798 | 135 | 0.6126 |
73f65b720a969f8426e34b506bbb408763dd5ced | 804 | py | Python | examples/configs/sac_config.py | patrickhart/jaxdl | 032df55292410c2976703213e67fff7bcafaedbe | [
"MIT"
] | 1 | 2022-02-09T09:19:40.000Z | 2022-02-09T09:19:40.000Z | examples/configs/sac_config.py | patrickhart/jaxdl | 032df55292410c2976703213e67fff7bcafaedbe | [
"MIT"
] | null | null | null | examples/configs/sac_config.py | patrickhart/jaxdl | 032df55292410c2976703213e67fff7bcafaedbe | [
"MIT"
] | null | null | null | import ml_collections
from jaxdl.rl.networks.actor_nets import create_normal_dist_policy_fn
from jaxdl.rl.networks.critic_nets import create_double_critic_network_fn
from jaxdl.rl.networks.temperature_nets import create_temperature_network_fn
def get_config():
config = ml_collections.ConfigDict()
config.algorith... | 33.5 | 76 | 0.800995 |
6bb6286f53cd919699c47b88ed20c921f608077b | 806 | py | Python | modules/app_settings.py | Nstalgic/Artemis | fb9ab745b08281268737a929273f631db5eb27b3 | [
"MIT"
] | 7 | 2021-06-17T14:51:14.000Z | 2021-09-20T05:54:05.000Z | modules/app_settings.py | Nstalgic/Artemis | fb9ab745b08281268737a929273f631db5eb27b3 | [
"MIT"
] | 2 | 2021-06-17T14:07:28.000Z | 2022-02-25T10:03:16.000Z | modules/app_settings.py | Nstalgic/Artemis | fb9ab745b08281268737a929273f631db5eb27b3 | [
"MIT"
] | 1 | 2021-11-10T13:23:12.000Z | 2021-11-10T13:23:12.000Z | """
///////////////////////////////////////////////////////////////
APPLICATION BY: MICHAEL HUFF
Artemis created with: Qt Designer and PySide6
JUNE 10, 2021
V: 1.0.0
///////////////////////////////////////////////////////////////
"""
class Settings:
ENABLE_CUSTOM_TITLE_BAR = True
MENU_WIDTH = 240
LEFT_BOX... | 29.851852 | 144 | 0.565757 |
3a6fb7b9b7c9577ec500e2a9d97b1d4be382154e | 285 | py | Python | crawler/crawler/utils/get_links_from_txt.py | tienduy-nguyen/ecommerce | fede82c80325670e5706efbc0877509cbe6d4fea | [
"MIT"
] | 5 | 2021-07-29T19:10:45.000Z | 2022-03-16T22:30:01.000Z | crawler/crawler/utils/get_links_from_txt.py | tienduy-nguyen/ecommerce | fede82c80325670e5706efbc0877509cbe6d4fea | [
"MIT"
] | null | null | null | crawler/crawler/utils/get_links_from_txt.py | tienduy-nguyen/ecommerce | fede82c80325670e5706efbc0877509cbe6d4fea | [
"MIT"
] | 2 | 2022-01-23T04:19:58.000Z | 2022-03-18T14:02:15.000Z | def get_links_from_txt(file):
links = []
with open(file, "r") as f:
try:
lines = f.readlines()
for line in lines:
if line.rstrip():
links.append(line.strip())
except:
pass
return links
| 23.75 | 46 | 0.459649 |
72909c64998a7b1b34eeef870c312ae1f1e5be41 | 210 | py | Python | twitter/cache.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | null | null | null | twitter/cache.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | 1 | 2021-05-27T11:03:53.000Z | 2021-05-27T11:03:53.000Z | twitter/cache.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | null | null | null | # memcached
FOLLOWINGS_PATTERN = 'followings:{user_id}'
USER_PROFILE_PATTERN = 'userprofile:{user_id}'
# redis
USER_TWEETS_PATTERN = 'user_tweets:{user_id}'
USER_NEWSFEEDS_PATTERN = 'user_newsfeeds:{user_id}'
| 26.25 | 51 | 0.795238 |
0156097955c3092bb422a51aee9e2c93064ff0b3 | 21,056 | py | Python | Packs/Elasticsearch/Integrations/Elasticsearch_v2/Elasticsearch_v2_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 1 | 2022-03-05T02:23:32.000Z | 2022-03-05T02:23:32.000Z | Packs/Elasticsearch/Integrations/Elasticsearch_v2/Elasticsearch_v2_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 42 | 2022-03-11T10:52:26.000Z | 2022-03-31T01:50:42.000Z | Packs/Elasticsearch/Integrations/Elasticsearch_v2/Elasticsearch_v2_test.py | SergeBakharev/content | d66cc274f5bf6f9f0e9ed7e4df1af7b6f305aacf | [
"MIT"
] | 2 | 2021-12-13T13:07:21.000Z | 2022-03-05T02:23:34.000Z | from datetime import datetime
from unittest.mock import patch
from dateutil.parser import parse
import requests
import unittest
from unittest import mock
"""MOCKED RESPONSES"""
ES_V6_RESPONSE = {
'took': 1,
'timed_out': False,
'_shards': {
'total': 5,
'successful': 5,
'skipped': 0,... | 29.782178 | 120 | 0.437358 |
91008bce97f368970f929047b1a8c9688332e8fd | 43,878 | py | Python | arrow/arrow.py | uburuntu/arrow | ada176d510a678b4d4654ec2120726e6bb97248b | [
"Apache-2.0"
] | null | null | null | arrow/arrow.py | uburuntu/arrow | ada176d510a678b4d4654ec2120726e6bb97248b | [
"Apache-2.0"
] | null | null | null | arrow/arrow.py | uburuntu/arrow | ada176d510a678b4d4654ec2120726e6bb97248b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Provides the :class:`Arrow <arrow.arrow.Arrow>` class, an enhanced ``datetime``
replacement.
"""
from __future__ import absolute_import
import calendar
import sys
import warnings
from datetime import datetime, timedelta, tzinfo
from math import trunc
from dateutil import tz as dateutil_t... | 31.589633 | 147 | 0.561511 |
e6caf4a50c5a107d849f3eec331039a6ec258128 | 158 | py | Python | sidekick/passwords/apps.py | ffroggy/sidekick | 8a1e461669991b853b331df052151332f499358b | [
"Apache-2.0"
] | 7 | 2018-01-19T23:19:01.000Z | 2018-10-26T23:42:18.000Z | sidekick/passwords/apps.py | ffroggy/sidekick | 8a1e461669991b853b331df052151332f499358b | [
"Apache-2.0"
] | 27 | 2018-01-20T23:35:09.000Z | 2018-10-01T23:16:01.000Z | sidekick/passwords/apps.py | ffroggy/sidekick | 8a1e461669991b853b331df052151332f499358b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class PasswordsConfig(AppConfig):
name = 'passwords'
| 17.555556 | 39 | 0.740506 |
f06c3006fa9095ce90f0d9bcd44f7f740a5a9823 | 15,882 | py | Python | code/wrappers.py | mmcaulif/F1Tenth-RL | dfa6b380440649f81309293164cec9c944c5422e | [
"MIT"
] | null | null | null | code/wrappers.py | mmcaulif/F1Tenth-RL | dfa6b380440649f81309293164cec9c944c5422e | [
"MIT"
] | null | null | null | code/wrappers.py | mmcaulif/F1Tenth-RL | dfa6b380440649f81309293164cec9c944c5422e | [
"MIT"
] | 1 | 2021-06-11T10:41:24.000Z | 2021-06-11T10:41:24.000Z | # MIT License
# Copyright (c) 2020 FT Autonomous Team One
# 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,... | 42.239362 | 144 | 0.59835 |
24a8b4a8c83eda7a7a89a48d89b024a9def27783 | 524 | py | Python | pyutilib/ply/__init__.py | PyUtilib/PyUtilib | d99406f2af1fb62268c34453a2fbe6bd4a7348f0 | [
"BSD-3-Clause"
] | 24 | 2016-04-02T10:00:02.000Z | 2021-03-02T16:40:18.000Z | pyutilib/ply/__init__.py | PyUtilib/PyUtilib | d99406f2af1fb62268c34453a2fbe6bd4a7348f0 | [
"BSD-3-Clause"
] | 105 | 2015-10-29T03:29:58.000Z | 2021-12-30T22:00:45.000Z | pyutilib/ply/__init__.py | PyUtilib/PyUtilib | d99406f2af1fb62268c34453a2fbe6bd4a7348f0 | [
"BSD-3-Clause"
] | 22 | 2016-01-21T15:35:25.000Z | 2021-05-15T20:17:44.000Z | # _________________________________________________________________________
#
# PyUtilib: A Python utility library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the BSD License.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains ... | 47.636364 | 92 | 0.828244 |
3d4ad754cfd114b62fcc55101b7622fabcb1b5ee | 154 | py | Python | CMSLogic/apps.py | AbhijithGanesh/Student-Portal-CMS | 2b29a4b5ee52c3e821de3e440bfbb02d12564ba4 | [
"BSD-3-Clause"
] | null | null | null | CMSLogic/apps.py | AbhijithGanesh/Student-Portal-CMS | 2b29a4b5ee52c3e821de3e440bfbb02d12564ba4 | [
"BSD-3-Clause"
] | 1 | 2021-10-11T04:36:54.000Z | 2021-10-11T04:36:54.000Z | CMSLogic/apps.py | AbhijithGanesh/Student-Portal-CMS | 2b29a4b5ee52c3e821de3e440bfbb02d12564ba4 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class CmslogicConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "CMSLogic"
| 22 | 57 | 0.733766 |
b7f7332ef1a2a611cdd58fe4cbc3aeb6b9151fb3 | 666 | py | Python | apps/profiles/forms.py | dxp/django-lms | 4d984f9e97f7d2695e3f3495f83d1b15ed8e88ba | [
"BSD-3-Clause"
] | null | null | null | apps/profiles/forms.py | dxp/django-lms | 4d984f9e97f7d2695e3f3495f83d1b15ed8e88ba | [
"BSD-3-Clause"
] | null | null | null | apps/profiles/forms.py | dxp/django-lms | 4d984f9e97f7d2695e3f3495f83d1b15ed8e88ba | [
"BSD-3-Clause"
] | 1 | 2021-05-12T02:53:01.000Z | 2021-05-12T02:53:01.000Z | from django import forms
from tinymce.widgets import TinyMCE
from libs.widgets import ShortNameClearableFileInput
class ProfileForm(forms.Form):
mugshot = forms.FileField(label = 'Profile image', required = False, widget=ShortNameClearableFileInput)
resume = forms.FileField(label = 'Resume', required = False,... | 39.176471 | 108 | 0.728228 |
f9e12d4a63caf37fbf36c0c69ba63a5ef64441a8 | 3,323 | py | Python | examples/pybullet/examples/saveRestoreState.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 9,136 | 2015-01-02T00:41:45.000Z | 2022-03-31T15:30:02.000Z | examples/pybullet/examples/saveRestoreState.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,424 | 2015-01-05T08:55:58.000Z | 2022-03-30T19:34:55.000Z | examples/pybullet/examples/saveRestoreState.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,921 | 2015-01-02T10:19:30.000Z | 2022-03-31T02:48:42.000Z | import pybullet as p
import math, time
import difflib, sys
import pybullet_data
numSteps = 500
numSteps2 = 30
p.connect(p.GUI, options="--width=1024 --height=768")
numObjects = 50
verbose = 0
p.setAdditionalSearchPath(pybullet_data.getDataPath())
logId = p.startStateLogging(p.STATE_LOGGING_PROFILE_TIMINGS, "saveRest... | 23.735714 | 86 | 0.695456 |
f36580b1fa4da7800769fdc06adf22ca86bd86f8 | 3,146 | py | Python | web/settings.py | slop3n/bachelors_degree | fdc32520419836dc0e29bb7ef0dbc30dcd99995f | [
"Apache-2.0"
] | null | null | null | web/settings.py | slop3n/bachelors_degree | fdc32520419836dc0e29bb7ef0dbc30dcd99995f | [
"Apache-2.0"
] | null | null | null | web/settings.py | slop3n/bachelors_degree | fdc32520419836dc0e29bb7ef0dbc30dcd99995f | [
"Apache-2.0"
] | null | null | null | """
Django settings for web project.
Generated by 'django-admin startproject' using Django 1.11.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
# ... | 25.786885 | 91 | 0.698029 |
c732d3a683d142ca556ae695413ad0919b3b985a | 131 | py | Python | server/proctor/examinees/urls.py | jphacks/B_2011 | 3888ab8b99274734cb6ba04a54ce2ede03fcb446 | [
"MIT"
] | 1 | 2021-12-18T22:34:46.000Z | 2021-12-18T22:34:46.000Z | server/proctor/examinees/urls.py | jphacks/B_2011 | 3888ab8b99274734cb6ba04a54ce2ede03fcb446 | [
"MIT"
] | 44 | 2020-11-02T06:28:36.000Z | 2020-11-27T23:33:17.000Z | server/proctor/examinees/urls.py | jphacks/B_2011 | 3888ab8b99274734cb6ba04a54ce2ede03fcb446 | [
"MIT"
] | null | null | null | from django.urls import path
from examinees import views
urlpatterns = [
path('list', views.ExamineeListAPIView.as_view()),
]
| 18.714286 | 54 | 0.748092 |
6426d8fbdc6aefcd50f0e08679eb3183104c61e7 | 510 | py | Python | python/setup.py | DylanAnderson/life | d331c29f2d07a2f880ce8ae2448e0520ffc7c554 | [
"MIT"
] | null | null | null | python/setup.py | DylanAnderson/life | d331c29f2d07a2f880ce8ae2448e0520ffc7c554 | [
"MIT"
] | null | null | null | python/setup.py | DylanAnderson/life | d331c29f2d07a2f880ce8ae2448e0520ffc7c554 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="life",
version="1.0.0",
description="Conway's game of life.",
author="Dylan Anderson",
url="https://github.com/DylanAnderson/life",
py_modules=["life"],
python_requires=">=3.6.0",
install_requires=["numpy"],
license="MIT",
classifiers=[
... | 25.5 | 49 | 0.6 |
98c2e5ea346ea45ccc3c98ff6ee4b073bf33d407 | 82 | py | Python | simple/lambdas/greet/lambda_function.py | tlinhart/aws-step-functions-demo | ef435e842213e5965555a8a3ad00f0a32fa06cc9 | [
"MIT"
] | null | null | null | simple/lambdas/greet/lambda_function.py | tlinhart/aws-step-functions-demo | ef435e842213e5965555a8a3ad00f0a32fa06cc9 | [
"MIT"
] | null | null | null | simple/lambdas/greet/lambda_function.py | tlinhart/aws-step-functions-demo | ef435e842213e5965555a8a3ad00f0a32fa06cc9 | [
"MIT"
] | null | null | null | def lambda_handler(event, context):
print(f'Hi, my name is {event["name"]}.')
| 27.333333 | 45 | 0.658537 |
1579a375d387d5e9c620b05a5ac35ce647feaf8e | 687 | py | Python | examples/basic/manyspheres.py | hadivafaii/vedo | 15f9adbd36d25c0212cbd4eb0c15af54c19f3819 | [
"CC0-1.0"
] | 836 | 2020-06-14T02:38:12.000Z | 2022-03-31T15:39:50.000Z | examples/basic/manyspheres.py | hadivafaii/vedo | 15f9adbd36d25c0212cbd4eb0c15af54c19f3819 | [
"CC0-1.0"
] | 418 | 2020-06-14T10:51:32.000Z | 2022-03-31T23:23:14.000Z | examples/basic/manyspheres.py | hadivafaii/vedo | 15f9adbd36d25c0212cbd4eb0c15af54c19f3819 | [
"CC0-1.0"
] | 136 | 2020-06-14T02:26:41.000Z | 2022-03-31T12:47:18.000Z | """Example that shows how to draw very large number
of spheres (same for Points, Lines) with different
colors or different radii, N="""
from vedo import show, Spheres
from random import gauss
N = 50000
cols = range(N) # color numbers
pts = [(gauss(0, 1), gauss(0, 2), gauss(0, 1)) for i in cols]
rads = [abs(pts[i][1]... | 34.35 | 68 | 0.673945 |
1bbec0769e3373f8624681a71275313cf67008cc | 1,734 | py | Python | sandbox_mediator/embed_string_to_rdata.py | SafeBreach-Labs/blog-snippets | 8ce37b5636c2bba55eaf0cb38aa55dec0235facc | [
"BSD-3-Clause"
] | 4 | 2018-03-19T08:21:01.000Z | 2021-03-09T04:29:25.000Z | sandbox_mediator/embed_string_to_rdata.py | SafeBreach-Labs/blog-snippets | 8ce37b5636c2bba55eaf0cb38aa55dec0235facc | [
"BSD-3-Clause"
] | null | null | null | sandbox_mediator/embed_string_to_rdata.py | SafeBreach-Labs/blog-snippets | 8ce37b5636c2bba55eaf0cb38aa55dec0235facc | [
"BSD-3-Clause"
] | 3 | 2017-07-31T08:07:14.000Z | 2018-04-13T01:59:21.000Z | #!/usr/bin/env python
import sys
import pefile
import logging
RDATA_SEC_NAME = ".rdata\x00\x00"
LOGGING_FORMAT = "[*] %(levelname)s - %(message)s"
OUT_FILE_SUFFIX = "_embeddedstring"
# Initialize logging
logging.basicConfig(format=LOGGING_FORMAT, level=logging.DEBUG)
def get_file_data(file):
data = ""
with open(... | 33.346154 | 97 | 0.746251 |
d81d9865f5bf2eb38b521262beece6b991add2e7 | 5,151 | py | Python | bootstrap.py | gturco/find_cns | 63e08d17d9c81e250ef2637216fbf947cc295823 | [
"MIT"
] | 4 | 2016-03-21T19:19:24.000Z | 2019-10-23T09:20:13.000Z | bootstrap.py | hengbingao/find_cns | 63e08d17d9c81e250ef2637216fbf947cc295823 | [
"MIT"
] | 10 | 2016-03-21T16:55:29.000Z | 2022-03-22T07:26:03.000Z | bootstrap.py | hengbingao/find_cns | 63e08d17d9c81e250ef2637216fbf947cc295823 | [
"MIT"
] | 5 | 2016-03-02T16:20:05.000Z | 2021-07-28T02:31:23.000Z | import os
import platform
import subprocess
import sys
def create_env(dir_name):
"""creates virtenv with pip and python 2.7"""
print >>sys.stderr, 'Make sure all requirements of INSTALL file are downloaded before running!!!'
create_env = subprocess.call(['virtualenv','--distribute', dir_name,'--python=pyth... | 60.6 | 165 | 0.677732 |
ed11a0d7dc723198b6df12b2a68f5ca124c6d527 | 3,030 | py | Python | src/models/debug_fetch_data.py | voreille/plc_seg | e2238bc3342d54531fcab74ac84d24a056f16645 | [
"MIT"
] | null | null | null | src/models/debug_fetch_data.py | voreille/plc_seg | e2238bc3342d54531fcab74ac84d24a056f16645 | [
"MIT"
] | null | null | null | src/models/debug_fetch_data.py | voreille/plc_seg | e2238bc3342d54531fcab74ac84d24a056f16645 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
from random import shuffle
import datetime
import dotenv
import h5py
import pandas as pd
from src.models.fetch_data_from_hdf5 import get_tf_data
project_dir = Path(__file__).resolve().parents[2]
dotenv_path = project_dir / ".env"
dotenv.load_dotenv(str(dotenv_path))
log_dir = proje... | 35.647059 | 88 | 0.644554 |
84751a636768bca7ce2d48644205ff3e02c6748d | 2,470 | py | Python | vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/tmp/x86_64-apple-darwin19/ports/libxslt/1.1.33/libxslt-1.1.33/win32/runtests.py | Burton-David/Jalpc | 5f22fbc245b0bb18220d3a61c3a5d20557e64288 | [
"MIT"
] | null | null | null | vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/tmp/x86_64-apple-darwin19/ports/libxslt/1.1.33/libxslt-1.1.33/win32/runtests.py | Burton-David/Jalpc | 5f22fbc245b0bb18220d3a61c3a5d20557e64288 | [
"MIT"
] | null | null | null | vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.4/ext/nokogiri/tmp/x86_64-apple-darwin19/ports/libxslt/1.1.33/libxslt-1.1.33/win32/runtests.py | Burton-David/Jalpc | 5f22fbc245b0bb18220d3a61c3a5d20557e64288 | [
"MIT"
] | 1 | 2019-03-27T16:24:43.000Z | 2019-03-27T16:24:43.000Z | import difflib
import io
import os
import sys
from os import path
from subprocess import Popen, PIPE
xsltproc = path.join(os.getcwd(), "win32", "bin.msvc", "xsltproc.exe")
if not path.isfile(xsltproc):
xsltproc = path.join(os.getcwd(), "win32", "bin.mingw", "xsltproc.exe")
if not path.isfile(xsltproc):
... | 28.390805 | 75 | 0.636437 |
5a95af4e4a2411970e6b7abff06dbfdb188cc523 | 2,553 | py | Python | betteranvils.py | Syriiin/mc-betteranvils | 23e818dfd06d8e8647bfffbe1e80fcb25a305444 | [
"MIT"
] | null | null | null | betteranvils.py | Syriiin/mc-betteranvils | 23e818dfd06d8e8647bfffbe1e80fcb25a305444 | [
"MIT"
] | null | null | null | betteranvils.py | Syriiin/mc-betteranvils | 23e818dfd06d8e8647bfffbe1e80fcb25a305444 | [
"MIT"
] | null | null | null | import os
import sys
from tqdm import tqdm
from nbt import nbt, region
world_path = sys.argv[1] or "./world/"
if not os.path.exists(world_path):
print("World folder not found. Specify path or place in directory with world folder.")
exit()
playerdata_path = os.path.join(world_path, "playerdata/")
region_path ... | 31.9125 | 129 | 0.595378 |
8d44a94a8110fe3f1599709a23d4c8478bc350fd | 1,999 | py | Python | docs/source/conf.py | SvenMarcus/hpc-rocket | b28917e7afe6e2e839d1ae58f2e21fba6e3eb61c | [
"MIT"
] | 7 | 2022-01-03T13:52:40.000Z | 2022-03-10T16:26:04.000Z | docs/source/conf.py | SvenMarcus/hpclaunch | 1a0459167bf5d7b26b1d7e46a1b1d073a4a55650 | [
"MIT"
] | 10 | 2021-09-16T15:25:04.000Z | 2021-11-10T13:22:07.000Z | docs/source/conf.py | SvenMarcus/hpclaunch | 1a0459167bf5d7b26b1d7e46a1b1d073a4a55650 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 32.770492 | 79 | 0.656328 |
354f6d922b92b37254a8bc4b4f073216fa62c186 | 1,063 | py | Python | backend/test/formacao_tests/formacao_home_tests.py | erikabarros/naguil | fcc1592b1ac4235b5c35615a1f3a13a1d0a081e9 | [
"MIT"
] | null | null | null | backend/test/formacao_tests/formacao_home_tests.py | erikabarros/naguil | fcc1592b1ac4235b5c35615a1f3a13a1d0a081e9 | [
"MIT"
] | null | null | null | backend/test/formacao_tests/formacao_home_tests.py | erikabarros/naguil | fcc1592b1ac4235b5c35615a1f3a13a1d0a081e9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from base import GAETestCase
from formacao_app.formacao_model import Formacao
from routes.formacaos.home import index, delete
from gaebusiness.business import CommandExecutionException
from gaegraph.model import Node
from mommygae import m... | 34.290323 | 83 | 0.761994 |
5289fbe5c9c466f0e0cdfa0a2e6a8607fc87876c | 1,083 | py | Python | setup.py | ihgazni2/pynoz | 828e84ff6d1496b1cea0cc488ef5558b772c39a6 | [
"MIT"
] | null | null | null | setup.py | ihgazni2/pynoz | 828e84ff6d1496b1cea0cc488ef5558b772c39a6 | [
"MIT"
] | null | null | null | setup.py | ihgazni2/pynoz | 828e84ff6d1496b1cea0cc488ef5558b772c39a6 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
requirements = []
setup(
name="pynoz",
version = "0.0.9", #@version@#
description="simple tools for time date timezone",
author="ihgazni2",
url="https://github.com/ihgazni2/pynoz",
author_email='',
license="MIT",
long_descri... | 22.5625 | 83 | 0.580794 |
1289b2df3f309065a954656bf7e686c09d3e6700 | 6,538 | py | Python | scripts/1_exp_runners/4_run_get_multi_get.py | gokul-uf/asl-fall-2017 | 83e882d9d4c52bdd279b4e3eed8cd7ac768e88d7 | [
"MIT"
] | 1 | 2018-06-13T16:57:59.000Z | 2018-06-13T16:57:59.000Z | scripts/1_exp_runners/4_run_get_multi_get.py | gokul-uf/asl-fall-2017 | 83e882d9d4c52bdd279b4e3eed8cd7ac768e88d7 | [
"MIT"
] | null | null | null | scripts/1_exp_runners/4_run_get_multi_get.py | gokul-uf/asl-fall-2017 | 83e882d9d4c52bdd279b4e3eed8cd7ac768e88d7 | [
"MIT"
] | null | null | null | from __future__ import print_function
from os import system
from time import sleep
# system = print
# sleep = print
'''
3 MT, 2 MW, 3 MC
'''
num_reps = 3
num_thread = 64
shard_modes = [True, False]
multi_gets = [1, 3, 6, 9]
def start_vms():
print("starting VMs")
for i in range(1, 9):
print("Starting ... | 45.089655 | 260 | 0.65647 |
1a5c6e8aec6b4c3f483a7683df7e9f62d5e77ba8 | 37,166 | py | Python | tensorflow/contrib/eager/python/network.py | master-hzz/tensorflow | 4b4b51cdd9e8c3c748b76dd8649bcd5556e84d76 | [
"Apache-2.0"
] | 2 | 2021-07-07T13:55:09.000Z | 2021-12-04T22:51:46.000Z | tensorflow/contrib/eager/python/network.py | Yeesn/tensorflow | 31b79e42b9e1643b3bcdc9df992eb3ce216804c5 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/eager/python/network.py | Yeesn/tensorflow | 31b79e42b9e1643b3bcdc9df992eb3ce216804c5 | [
"Apache-2.0"
] | 1 | 2019-01-10T08:34:08.000Z | 2019-01-10T08:34:08.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 44.192628 | 81 | 0.683958 |
57b4fbd7a86518318928d00196e1a8136c6f36db | 8,769 | py | Python | story/utils.py | mershant/AIDONE | f4fec23ad208446e91a91f76e97d3a707b368cc0 | [
"MIT"
] | null | null | null | story/utils.py | mershant/AIDONE | f4fec23ad208446e91a91f76e97d3a707b368cc0 | [
"MIT"
] | 5 | 2020-09-26T00:38:56.000Z | 2022-02-10T01:15:09.000Z | story/utils.py | mershant/AIDONE | f4fec23ad208446e91a91f76e97d3a707b368cc0 | [
"MIT"
] | null | null | null | # coding: utf-8
import re
from difflib import SequenceMatcher
import yaml
from profanityfilter import ProfanityFilter
from func_timeout import func_timeout, FunctionTimedOut
YAML_FILE = "story/story_data.yaml"
with open("story/censored_words.txt", "r") as f:
censored_words = [l.replace("\n", "") for... | 28.287097 | 133 | 0.550576 |
9f6ba9efb1ffa4a64483301d8a9ca68cbaa8139b | 1,638 | py | Python | homu/effects.py | Penguinum/Python-Homulib | 113bcceb813d749bedaf183c4516564f4a6b2bee | [
"MIT"
] | null | null | null | homu/effects.py | Penguinum/Python-Homulib | 113bcceb813d749bedaf183c4516564f4a6b2bee | [
"MIT"
] | null | null | null | homu/effects.py | Penguinum/Python-Homulib | 113bcceb813d749bedaf183c4516564f4a6b2bee | [
"MIT"
] | null | null | null | from ctypes import *
from homu import homulib
homulib.Delay_Create.restype = c_void_p
homulib.Delay_Start.argtypes = [c_void_p]
homulib.Delay_SetSize.argtypes = [c_void_p, c_double]
homulib.Delay_SetDecay.argtypes = [c_void_p, c_double]
homulib.Delay_NextSample.argtypes = [c_voi... | 29.25 | 61 | 0.694139 |
f7254bdd4bb068fb20e4ad809d0645054278cee9 | 5,620 | py | Python | SimpleLoggingServerToCsvFile.py | II43/SimpleLoggingServerToCsvFile | d3d50778041a5995e58b6a8f623519e3cb41a5ce | [
"MIT"
] | null | null | null | SimpleLoggingServerToCsvFile.py | II43/SimpleLoggingServerToCsvFile | d3d50778041a5995e58b6a8f623519e3cb41a5ce | [
"MIT"
] | null | null | null | SimpleLoggingServerToCsvFile.py | II43/SimpleLoggingServerToCsvFile | d3d50778041a5995e58b6a8f623519e3cb41a5ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Simple HTTP server in Python for logging events to CSV file
Motivation: Use this CSV file later for data agregation and plotting
Inspired by: Very simple HTTP server in Python for logging requests
https://gist.github.com/mdonkers/63e115cc0c79b4f6b8b3a6b797e485c7
Usage::
./SimpleLoggingS... | 37.972973 | 103 | 0.477224 |
530b33c70a164edb1ac37cce97a40edf0d370f7e | 4,231 | py | Python | jobs/pipeline.py | soyelherein/pyspark-tdd-template | 077746d9696efa5ec57c29000fbd17007cfbc107 | [
"Apache-2.0"
] | 1 | 2020-08-17T21:56:49.000Z | 2020-08-17T21:56:49.000Z | jobs/pipeline.py | soyelherein/pyspark-tdd-template | 077746d9696efa5ec57c29000fbd17007cfbc107 | [
"Apache-2.0"
] | null | null | null | jobs/pipeline.py | soyelherein/pyspark-tdd-template | 077746d9696efa5ec57c29000fbd17007cfbc107 | [
"Apache-2.0"
] | 3 | 2020-09-23T15:41:05.000Z | 2022-01-05T03:14:58.000Z | # Copyright 2020 soyel.alam@ucdconnect.ie
#
# 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... | 36.791304 | 119 | 0.620421 |
4f5f14932f615712666d24be6e16d19b9f92b292 | 70 | py | Python | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/A/atomic unit of 2nd hyperpolarizability.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/A/atomic unit of 2nd hyperpolarizability.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | null | null | null | example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/A/atomic unit of 2nd hyperpolarizability.py | kuanpern/jupyterlab-snippets-multimenus | 477f51cfdbad7409eab45abe53cf774cd70f380c | [
"BSD-3-Clause"
] | 1 | 2021-02-04T04:51:48.000Z | 2021-02-04T04:51:48.000Z | constants.physical_constants["atomic unit of 2nd hyperpolarizability"] | 70 | 70 | 0.871429 |
76c564e4266327921bfd7eddf3a9a363ddc18815 | 14,504 | py | Python | transform_binary_payload/src-payload-decoders/python/sentrius_rs1xx.py | arnd/aws-iot-core-lorawan | 945b7ceea07a17525cfdf15420a573a250fe1149 | [
"MIT-0"
] | 54 | 2020-12-15T21:57:58.000Z | 2022-03-27T14:05:14.000Z | transform_binary_payload/src-payload-decoders/python/sentrius_rs1xx.py | arnd/aws-iot-core-lorawan | 945b7ceea07a17525cfdf15420a573a250fe1149 | [
"MIT-0"
] | 20 | 2020-12-16T19:09:02.000Z | 2022-03-05T13:28:51.000Z | transform_binary_payload/src-payload-decoders/python/sentrius_rs1xx.py | arnd/aws-iot-core-lorawan | 945b7ceea07a17525cfdf15420a573a250fe1149 | [
"MIT-0"
] | 25 | 2020-12-16T01:18:22.000Z | 2022-03-04T12:05:24.000Z | # Copyright IoT Systems GmbH (www.iot-systems.at). All Rights Reserved.
# Affiliate of KaWa commerce GmbH, AWS Consulting Partner (www.kawa-commerce.com)
# SPDX-License-Identifier: MIT-0
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation file... | 40.971751 | 158 | 0.420091 |
2a37225b1ff1ac3d4951af1db0bbb18091eaf7a8 | 2,694 | py | Python | intent_classification/seed_transfer.py | YilunZhou/optimal-active-learning | 9ddd822377c42acb345681fcd638f912e8123c53 | [
"MIT"
] | 10 | 2021-01-30T21:48:34.000Z | 2022-03-18T10:39:47.000Z | intent_classification/seed_transfer.py | YilunZhou/optimal-active-learning | 9ddd822377c42acb345681fcd638f912e8123c53 | [
"MIT"
] | null | null | null | intent_classification/seed_transfer.py | YilunZhou/optimal-active-learning | 9ddd822377c42acb345681fcd638f912e8123c53 | [
"MIT"
] | 1 | 2022-02-12T11:48:00.000Z | 2022-02-12T11:48:00.000Z |
import shelve, argparse, os
import numpy as np
import matplotlib.pyplot as plt
import help_text as ht
def main(model='lstm', model_seeds=[0, 1, 2, 3, 4], domain='alarm', data_seed=0,
batchsize=20, max_epoch=100, patience=20, tot_acq=160):
qualities = np.zeros((len(model_seeds), len(model_seeds)))
qua... | 54.979592 | 122 | 0.659614 |
ee76ba7d6ef78d57b3a0b84f8840795756b7af8e | 95 | py | Python | DeepML/classifiers/layers.py | deepraj1729/DeepML | 5ecd57d370cac3252b000fc9e9ff2e6f0c965a1b | [
"MIT"
] | 9 | 2020-06-30T12:51:50.000Z | 2021-09-22T16:39:49.000Z | DeepML/classifiers/layers.py | deepraj1729/DeepML | 5ecd57d370cac3252b000fc9e9ff2e6f0c965a1b | [
"MIT"
] | null | null | null | DeepML/classifiers/layers.py | deepraj1729/DeepML | 5ecd57d370cac3252b000fc9e9ff2e6f0c965a1b | [
"MIT"
] | null | null | null | def Dense(input_layers =4):
pass
def Flatten():
pass
def Input(input_shape):
pass | 11.875 | 27 | 0.652632 |
2694eb6b4d4e3895368180fa607af5502e6fe0ce | 250 | py | Python | Django/DjangoT1.11_LTS/28_Latihan Blog + Name + Namespace/mywebsite/urls.py | Akhadafi/WEB-Framework | 4547a682ac1f007aa6f97512baf76b92ef1c9b9a | [
"MIT"
] | null | null | null | Django/DjangoT1.11_LTS/28_Latihan Blog + Name + Namespace/mywebsite/urls.py | Akhadafi/WEB-Framework | 4547a682ac1f007aa6f97512baf76b92ef1c9b9a | [
"MIT"
] | null | null | null | Django/DjangoT1.11_LTS/28_Latihan Blog + Name + Namespace/mywebsite/urls.py | Akhadafi/WEB-Framework | 4547a682ac1f007aa6f97512baf76b92ef1c9b9a | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from django.contrib import admin
from . import views
urlpatterns = [
url(r'^$', views.index, name = "index"),
url(r'^blog/',include('blog.urls', namespace="blog")),
url(r'^admin/',admin.site.urls),
]
| 22.727273 | 55 | 0.676 |
bbc4dabff550d360b182965292b575886a0fb7fd | 19,922 | py | Python | ansible/environments/prod/gce.py | Otus-DevOps-2018-05/donasktello_infra | d448ff79a1d161f34273ceb319ee02abbef7eeae | [
"MIT"
] | null | null | null | ansible/environments/prod/gce.py | Otus-DevOps-2018-05/donasktello_infra | d448ff79a1d161f34273ceb319ee02abbef7eeae | [
"MIT"
] | 3 | 2018-07-03T15:15:22.000Z | 2018-10-08T23:03:38.000Z | ansible/old/gce.py | Otus-DevOps-2018-05/lushndm_infra | c481830c051d3a3205f6ab7e070b8ba354af7b75 | [
"MIT"
] | 2 | 2018-12-06T12:41:53.000Z | 2018-12-06T12:55:44.000Z | #!/usr/bin/python
# Copyright 2013 Google Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later vers... | 36.892593 | 100 | 0.604206 |
ddb506ffffe5aff9bc92a0e5e3a7922306dd48e2 | 428 | py | Python | dojo/tests.py | bsomhz/tiesheet | d05fbcdbf43d20b05416b2f433f8c65a3d15118b | [
"BSD-3-Clause"
] | null | null | null | dojo/tests.py | bsomhz/tiesheet | d05fbcdbf43d20b05416b2f433f8c65a3d15118b | [
"BSD-3-Clause"
] | null | null | null | dojo/tests.py | bsomhz/tiesheet | d05fbcdbf43d20b05416b2f433f8c65a3d15118b | [
"BSD-3-Clause"
] | null | null | null | from dojo.models import Operator
from django.test import TestCase
# Create your tests here.
class UnitTestCase(TestCase):
def test_home_page_template(self):
response = self.client.get('/')
self.assertTemplateUsed(response, 'dojo/dojo.html')
def test_operator(self):
operator = Operat... | 23.777778 | 59 | 0.67757 |
c11bb7c3b8dcd2a58f82538520d805f9f7bcaa90 | 2,412 | py | Python | a10sdk/core/gslb/gslb_protocol_limit.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 16 | 2015-05-20T07:26:30.000Z | 2021-01-23T11:56:57.000Z | a10sdk/core/gslb/gslb_protocol_limit.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 6 | 2015-03-24T22:07:11.000Z | 2017-03-28T21:31:18.000Z | a10sdk/core/gslb/gslb_protocol_limit.py | deepfield/a10sdk-python | bfaa58099f51f085d5e91652d1d1a3fd5c529d5d | [
"Apache-2.0"
] | 23 | 2015-03-29T15:43:01.000Z | 2021-06-02T17:12:01.000Z | from a10sdk.common.A10BaseClass import A10BaseClass
class Limit(A10BaseClass):
"""Class Description::
Specify limit for GSLB Message Protocol.
Class limit supports CRUD Operations and inherits from `common/A10BaseClass`.
This class is the `"PARENT"` class for this module.`
:param ardt_respo... | 50.25 | 215 | 0.643035 |
f4aafd55f7f64f9a453575cb8b6222b1cedf7db0 | 5,046 | py | Python | sciwx/plugins/histogram.py | dada1437903138/imagepy | 65d9ce088894eef587054e04018f9d34ff65084f | [
"BSD-4-Clause"
] | null | null | null | sciwx/plugins/histogram.py | dada1437903138/imagepy | 65d9ce088894eef587054e04018f9d34ff65084f | [
"BSD-4-Clause"
] | null | null | null | sciwx/plugins/histogram.py | dada1437903138/imagepy | 65d9ce088894eef587054e04018f9d34ff65084f | [
"BSD-4-Clause"
] | null | null | null | from ..widgets import HistPanel, CMapPanel, FloatSlider, CMapSelCtrl
import wx, numpy as np
from sciapp import Source
class Histogram( wx.Panel ):
title = 'Histogram Widget'
def __init__( self, parent, app):
wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( 255,0 ), style... | 32.980392 | 129 | 0.686286 |
dadcb418fc94e8a4444e8d4af2a70ad3756237f1 | 30,080 | py | Python | patient/migrations/0019_auto__del_field_obstetrichistory_list_previous_obstetric_history__del_.py | aazhbd/medical_info01 | b08961089e6a7cdc567f879ab794e45067171418 | [
"BSD-3-Clause"
] | 1 | 2017-03-25T05:19:42.000Z | 2017-03-25T05:19:42.000Z | patient/migrations/0019_auto__del_field_obstetrichistory_list_previous_obstetric_history__del_.py | aazhbd/medical_info01 | b08961089e6a7cdc567f879ab794e45067171418 | [
"BSD-3-Clause"
] | null | null | null | patient/migrations/0019_auto__del_field_obstetrichistory_list_previous_obstetric_history__del_.py | aazhbd/medical_info01 | b08961089e6a7cdc567f879ab794e45067171418 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'ObstetricHistory.list_previous_obstetric_history'
db.delete_column(u'patient_obstetrichist... | 82.865014 | 187 | 0.581117 |
fcdfca03f9200fc10b3b7c401cea796a4eae0907 | 6,597 | py | Python | scripts/src/demo_mockchain.py | ltfschoen/pyethfinality | 6a1f3c73fd3f0cab1e4b6d1f2a902100931a17d1 | [
"BSD-3-Clause"
] | 1 | 2018-07-01T03:52:20.000Z | 2018-07-01T03:52:20.000Z | scripts/src/demo_mockchain.py | ltfschoen/pyethfinality | 6a1f3c73fd3f0cab1e4b6d1f2a902100931a17d1 | [
"BSD-3-Clause"
] | 8 | 2017-11-28T08:24:22.000Z | 2017-12-01T20:46:45.000Z | scripts/src/demo_mockchain.py | ltfschoen/pyethfinality | 6a1f3c73fd3f0cab1e4b6d1f2a902100931a17d1 | [
"BSD-3-Clause"
] | null | null | null | # Reference: https://gist.github.com/heikoheiko/a84b05c78d2971c26f2d3e3c49ec8d83
# Converted to Python 3 by Luke Schoen
import collections
import random
import json
import hashlib
import math
from datetime import datetime
def hexhash(x):
"""
Account address for given index
:param x:int
:return: addr... | 34.005155 | 95 | 0.629225 |
79bab41a2997a17f76d28de61fe290a3271a9f85 | 1,892 | py | Python | azure-batch/azure/batch/models/job_schedule_patch_parameter.py | Berryliao84/Python-Azure | a96ed6e8bbf4290372980a2919b31110da90b164 | [
"MIT"
] | 1 | 2017-10-29T15:14:35.000Z | 2017-10-29T15:14:35.000Z | azure-batch/azure/batch/models/job_schedule_patch_parameter.py | Berryliao84/Python-Azure | a96ed6e8bbf4290372980a2919b31110da90b164 | [
"MIT"
] | null | null | null | azure-batch/azure/batch/models/job_schedule_patch_parameter.py | Berryliao84/Python-Azure | a96ed6e8bbf4290372980a2919b31110da90b164 | [
"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 ... | 43 | 85 | 0.658034 |
f206e8141dcaedeb450ade911e1539fb9a4518bc | 200 | py | Python | coding/learn_pyspark/pyspark_demo.py | yatao91/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | 3 | 2021-05-25T16:58:52.000Z | 2022-02-05T09:37:17.000Z | coding/learn_pyspark/pyspark_demo.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | coding/learn_pyspark/pyspark_demo.py | yataosu/learning_road | e88dc43de98e35922bfc71c222ec71766851e618 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from pyspark import SparkConf, SparkContext
conf = SparkConf().setMaster("local").setAppName("My App")
sc = SparkContext(conf=conf)
if __name__ == '__main__':
print(sc)
| 20 | 58 | 0.685 |
110bd348a76066fb9b8f7f75040d56ccb412dfe4 | 2,160 | py | Python | src/api/auth/models/others.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 84 | 2021-06-30T06:20:23.000Z | 2022-03-22T03:05:49.000Z | src/api/auth/models/others.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 7 | 2021-06-30T06:21:16.000Z | 2022-03-29T07:36:13.000Z | src/api/auth/models/others.py | Chromico/bk-base | be822d9bbee544a958bed4831348185a75604791 | [
"MIT"
] | 40 | 2021-06-30T06:21:26.000Z | 2022-03-29T12:42:26.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
---------------------------------------------... | 40 | 111 | 0.718981 |
bdb86e7834a64aeb99eff7e7d74cc6334daf2703 | 3,552 | py | Python | pybn_exec.py | Nogarx/PyBN | 46493186a65c796f15312560e5d43a90b090a62d | [
"MIT"
] | 1 | 2021-04-23T15:40:10.000Z | 2021-04-23T15:40:10.000Z | pybn_exec.py | Nogarx/PyBN | 46493186a65c796f15312560e5d43a90b090a62d | [
"MIT"
] | null | null | null | pybn_exec.py | Nogarx/PyBN | 46493186a65c796f15312560e5d43a90b090a62d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import pybn.execution as execution
from pybn.networks import FuzzyBooleanNetwork
from pybn.graphs import uniform_graph
from pybn.observers import EntropyObserver, TransitionsObserver
import numpy as np
import argparse
import re
#--------------------------------------------------------------------... | 41.302326 | 136 | 0.588682 |
35b7a9f37db695d8601da7acb4cafce29b1e1fba | 121 | py | Python | Modulo 2/Lista06/6.py | BelfortJoao/Programacao-1 | 2d463744379ad3e4b0f5882ad923aae7ff80197a | [
"MIT"
] | 2 | 2021-08-17T14:02:13.000Z | 2021-08-19T02:37:28.000Z | Modulo 2/Lista06/6.py | BelfortJoao/Programacao-1 | 2d463744379ad3e4b0f5882ad923aae7ff80197a | [
"MIT"
] | null | null | null | Modulo 2/Lista06/6.py | BelfortJoao/Programacao-1 | 2d463744379ad3e4b0f5882ad923aae7ff80197a | [
"MIT"
] | 1 | 2021-09-05T20:18:45.000Z | 2021-09-05T20:18:45.000Z | n = int(input("Qual o tamanho do vetor?"))
x = [int(input()) for x in range(n)]
for i in range(0, n, 2):
print(x[i])
| 24.2 | 42 | 0.578512 |
827cab8ec2a93b797b537df3c99370d7b343d751 | 2,984 | py | Python | src/oci/data_integration/models/error_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/data_integration/models/error_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/data_integration/models/error_details.py | LaudateCorpus1/oci-python-sdk | b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 27.62963 | 245 | 0.617627 |
a24f9c3c9f9b32a8f6873c216950b28fc92d2712 | 4,725 | py | Python | RPG/bot_classes/locations/spaceship/computer.py | Flashweb14/TelegramRPG | 42619f7bb3059fd927a9eba5442c07d7e9430366 | [
"MIT"
] | 1 | 2020-04-15T11:52:19.000Z | 2020-04-15T11:52:19.000Z | RPG/bot_classes/locations/spaceship/computer.py | Flashweb14/TelegramRPG | 42619f7bb3059fd927a9eba5442c07d7e9430366 | [
"MIT"
] | null | null | null | RPG/bot_classes/locations/spaceship/computer.py | Flashweb14/TelegramRPG | 42619f7bb3059fd927a9eba5442c07d7e9430366 | [
"MIT"
] | 1 | 2020-05-07T13:16:22.000Z | 2020-05-07T13:16:22.000Z | from time import sleep
from datetime import datetime
from RPG.consts.game_states import COMPUTER
from RPG.bot_classes.base_handler import BaseHandler
class Computer(BaseHandler):
def __init__(self, game, spaceship):
super().__init__(game, COMPUTER)
self.spaceship = spaceship
def show(self, me... | 58.333333 | 116 | 0.528677 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.