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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d6022105f539b373686ecb740924ceca2daea15a | 5,338 | py | Python | src/camerasection.py | DaisyDriver/DaisyGUI-Enlightened | 46b052eeb929d26ce8260d7e6ccbb03fd1ef1849 | [
"MIT"
] | 1 | 2020-06-24T04:10:22.000Z | 2020-06-24T04:10:22.000Z | src/camerasection.py | DaisyDriver/DaisyGUI-Enlightened | 46b052eeb929d26ce8260d7e6ccbb03fd1ef1849 | [
"MIT"
] | null | null | null | src/camerasection.py | DaisyDriver/DaisyGUI-Enlightened | 46b052eeb929d26ce8260d7e6ccbb03fd1ef1849 | [
"MIT"
] | 1 | 2018-10-22T17:55:36.000Z | 2018-10-22T17:55:36.000Z | from threading import Thread
from picamera.array import PiRGBArray
from PyQt5.QtWidgets import *
from PyQt5.QtCore import pyqtSignal, pyqtSlot
from PyQt5.QtGui import QPixmap, QImage, QIcon
from src.camerasettings import SettingsWindow, CameraSettingsButton
class PreviewWindow(QLabel):
def __init__(self,... | 29.32967 | 122 | 0.717497 |
5756d6d3785f719ed5e12e3a095116cc4c33de61 | 3,468 | py | Python | env/Lib/site-packages/numpydoc/tests/test_full.py | camilorojase/GithubActionsTest | 7b448e365d31ec84bf55b68033a88bb00e8e5358 | [
"MIT"
] | null | null | null | env/Lib/site-packages/numpydoc/tests/test_full.py | camilorojase/GithubActionsTest | 7b448e365d31ec84bf55b68033a88bb00e8e5358 | [
"MIT"
] | 1 | 2022-03-02T16:12:06.000Z | 2022-03-02T16:12:06.000Z | env/Lib/site-packages/numpydoc/tests/test_full.py | camilorojase/GithubActionsTest | 7b448e365d31ec84bf55b68033a88bb00e8e5358 | [
"MIT"
] | null | null | null | import os.path as op
import re
import shutil
import pytest
import sphinx
from sphinx.application import Sphinx
from sphinx.util.docutils import docutils_namespace
# Test framework adapted from sphinx-gallery (BSD 3-clause)
@pytest.fixture(scope='module')
def sphinx_app(tmpdir_factory):
temp_dir = (tmpdir_factory... | 36.893617 | 88 | 0.664072 |
dc10c5ad0f7d4a4678a274c104e9a2b662f7e658 | 10,534 | py | Python | src/csaltTester/src/python/TestCSALT.py | IncompleteWorlds/GMAT_2020 | 624de54d00f43831a4d46b46703e069d5c8c92ff | [
"Apache-2.0"
] | null | null | null | src/csaltTester/src/python/TestCSALT.py | IncompleteWorlds/GMAT_2020 | 624de54d00f43831a4d46b46703e069d5c8c92ff | [
"Apache-2.0"
] | null | null | null | src/csaltTester/src/python/TestCSALT.py | IncompleteWorlds/GMAT_2020 | 624de54d00f43831a4d46b46703e069d5c8c92ff | [
"Apache-2.0"
] | null | null | null | import math
import os.path
import sys
import re
import OCHComparator
import SNOPTComparator
import LagrangeInterpolator
def ShowUsage():
print("\n------------------\nCSALT Test Program\n------------------\n" +
"Usage:\n\n python3 TestCSALT.py <compareType> <TestCase> [options]\n\n" +
"where\n\n <C... | 31.824773 | 128 | 0.567211 |
e60fbd0a2cbc2cb733e23ae981c3d5dbf389ae97 | 3,729 | py | Python | Models/UNet.py | Ritam9/DeepCFD | 5e8566d2546575945f3ecaa5c71c4efe433bf239 | [
"MIT"
] | 68 | 2020-04-21T12:35:56.000Z | 2022-03-31T06:16:06.000Z | Models/UNet.py | aero-cfd/DeepCFD | a8cd7351ebe5f2898036a9b5ed3a23c19ce2ac7e | [
"MIT"
] | 6 | 2020-06-12T08:44:16.000Z | 2022-01-16T13:06:49.000Z | Models/UNet.py | aero-cfd/DeepCFD | a8cd7351ebe5f2898036a9b5ed3a23c19ce2ac7e | [
"MIT"
] | 28 | 2020-04-21T06:43:56.000Z | 2022-02-12T13:41:03.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import weight_norm
from Models.AutoEncoder import create_layer
def create_encoder_block(in_channels, out_channels, kernel_size, wn=True, bn=True,
activation=nn.ReLU, layers=2):
encoder = []
for i in range(l... | 38.05102 | 134 | 0.624296 |
f144d2772ad1c490daf28ed3d618d12b452d4ce4 | 2,514 | py | Python | core/data.py | saapooch/finanalysis | b0975c8b20fbf0dd85abea5b28ac0ca26f79d018 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:49:51.000Z | 2021-12-20T03:49:51.000Z | core/data.py | saapooch/finanalysis | b0975c8b20fbf0dd85abea5b28ac0ca26f79d018 | [
"Apache-2.0"
] | null | null | null | core/data.py | saapooch/finanalysis | b0975c8b20fbf0dd85abea5b28ac0ca26f79d018 | [
"Apache-2.0"
] | null | null | null | from config.config import BaseConfig
from alpha_vantage.timeseries import TimeSeries
from alpha_vantage.techindicators import TechIndicators
api_key = BaseConfig.API_KEY
class Data(object):
def __init__(self, ticker = None):
self.ticker = ticker
self.ts = TimeSeries(key=api_key, output_format='pa... | 40.548387 | 127 | 0.658711 |
711243fd579c32384586550d3c35073fc50b7858 | 2,714 | py | Python | pyGinit/gitignoreList.py | AlphaBeta1906/pyGinit | 41dc079b3c324970e910c0a8746f282e03aa8f81 | [
"MIT"
] | 30 | 2021-06-05T04:25:59.000Z | 2022-02-26T12:18:03.000Z | pyGinit/gitignoreList.py | AlphaBeta1906/pyGinit | 41dc079b3c324970e910c0a8746f282e03aa8f81 | [
"MIT"
] | null | null | null | pyGinit/gitignoreList.py | AlphaBeta1906/pyGinit | 41dc079b3c324970e910c0a8746f282e03aa8f81 | [
"MIT"
] | 2 | 2021-07-01T13:11:51.000Z | 2021-09-23T14:06:15.000Z | gitignore = [
"None",
"Actionscript.gitignore",
"Ada.gitignore",
"Agda.gitignore",
"Android.gitignore",
"AppEngine.gitignore",
"AppceleratorTitanium.gitignore",
"ArchLinuxPackages.gitignore",
"Autotools.gitignore",
"C++.gitignore",
"C.gitignore",
"CFWheels.gitignore",
"CMake.gitignore",
"CUDA.gitignore",
"CakePHP.gitig... | 20.717557 | 34 | 0.750921 |
5cf156485f04f15030069bf7f0ec8636223c0889 | 1,733 | py | Python | tests/proxy_event_tests.py | depster26/public-lambda-helpers | 6fa3e1a7ba1e281e11ea85e384471f6abc300efd | [
"MIT"
] | null | null | null | tests/proxy_event_tests.py | depster26/public-lambda-helpers | 6fa3e1a7ba1e281e11ea85e384471f6abc300efd | [
"MIT"
] | null | null | null | tests/proxy_event_tests.py | depster26/public-lambda-helpers | 6fa3e1a7ba1e281e11ea85e384471f6abc300efd | [
"MIT"
] | null | null | null | import json
from decimal import Decimal
import pytest
from lambda_proxy_helpers_pkg.test_proxy_event import get_test_proxy_event, CognitoDetail
from lambda_proxy_helpers_pkg.lambda_proxy_response import LambdaProxyResponse
@pytest.fixture()
def cognito_obj():
return CognitoDetail(user_id='abcdef',
... | 34.66 | 91 | 0.624351 |
0f34ada270c182aba6192675a95b19165475649f | 1,920 | py | Python | ztag/annotations/FtpDdwrt.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 107 | 2015-10-13T16:03:21.000Z | 2021-11-08T10:53:07.000Z | ztag/annotations/FtpDdwrt.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 73 | 2015-10-14T17:27:10.000Z | 2018-10-01T14:32:44.000Z | ztag/annotations/FtpDdwrt.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 36 | 2015-10-14T17:13:20.000Z | 2021-10-05T19:41:10.000Z | import re
from ztag.annotation import Annotation
from ztag.annotation import OperatingSystem
from ztag.annotation import Type
from ztag.annotation import Manufacturer
from ztag import protocols
import ztag.test
class FtpDdwrt(Annotation):
protocol = protocols.FTP
subprotocol = protocols.FTP.BANNER
port = ... | 30.967742 | 75 | 0.572396 |
a9563ef14141c0132ac6bd257837463990a4e738 | 1,118 | py | Python | software/contrib/menu.py | Bridgee/EuroPi | 8c755fa6cf26e0e4715421324898a6b3c8eeb412 | [
"CC0-1.0"
] | null | null | null | software/contrib/menu.py | Bridgee/EuroPi | 8c755fa6cf26e0e4715421324898a6b3c8eeb412 | [
"CC0-1.0"
] | null | null | null | software/contrib/menu.py | Bridgee/EuroPi | 8c755fa6cf26e0e4715421324898a6b3c8eeb412 | [
"CC0-1.0"
] | null | null | null | """See menu.md for details."""
from bootloader import BootloaderMenu
from contrib.bernoulli_gates import BernoulliGates
from contrib.coin_toss import CoinToss
from contrib.consequencer import Consequencer
from contrib.cvecorder import CVecorder
from contrib.diagnostic import Diagnostic
from contrib.euclidean_rhythm im... | 26.619048 | 56 | 0.804114 |
2bc8cb6766ec45be38486321e3487d7d4431f089 | 9,616 | py | Python | tests/server/test_env.py | HigherEdgeSoftware/XRJV1-electrumx | 9f0e2e22e1fc6a34c7735314a43d3f0ec81082e6 | [
"MIT"
] | null | null | null | tests/server/test_env.py | HigherEdgeSoftware/XRJV1-electrumx | 9f0e2e22e1fc6a34c7735314a43d3f0ec81082e6 | [
"MIT"
] | null | null | null | tests/server/test_env.py | HigherEdgeSoftware/XRJV1-electrumx | 9f0e2e22e1fc6a34c7735314a43d3f0ec81082e6 | [
"MIT"
] | null | null | null | # Tests of server/env.py
import os
import random
import pytest
from server.env import Env, NetIdentity
import lib.coins as lib_coins
BASE_DAEMON_URL = 'http://username:password@hostname:321/'
BASE_DB_DIR = '/some/dir'
base_environ = {
'DB_DIRECTORY': BASE_DB_DIR,
'DAEMON_URL': BASE_DAEMON_URL,
'COIN':... | 28.876877 | 73 | 0.644863 |
2622401b4ba11a44f4ee74241ee8906fda89cafb | 12,418 | py | Python | ProjectFiles/bin/Release/2.80/scripts/addons/add_curve_extra_objects/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2019-07-08T15:51:14.000Z | 2019-07-08T15:51:14.000Z | ProjectFiles/bin/Release/2.80/scripts/addons/add_curve_extra_objects/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | ProjectFiles/bin/Release/2.80/scripts/addons/add_curve_extra_objects/__init__.py | BlazesRus/Bforartists | 126bdd9e47cc984fd97ba5299bfb92ec5278e754 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 38.565217 | 99 | 0.627879 |
2c16e9e8221a4e8420c9c682dfc2fd3cca3ccff4 | 2,212 | py | Python | auto_nag/scripts/workflow/p3_p4_p5.py | Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd | 28d999fcba9ad47d1dd0b2222880b71726ddd47c | [
"BSD-3-Clause"
] | null | null | null | auto_nag/scripts/workflow/p3_p4_p5.py | Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd | 28d999fcba9ad47d1dd0b2222880b71726ddd47c | [
"BSD-3-Clause"
] | null | null | null | auto_nag/scripts/workflow/p3_p4_p5.py | Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd | 28d999fcba9ad47d1dd0b2222880b71726ddd47c | [
"BSD-3-Clause"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from dateutil.relativedelta import relativedelta
from libmozdata import utils as lmdutils
from auto_nag.bzcleaner import... | 30.30137 | 224 | 0.591772 |
2e3309b83f097dddb3f690f23518c35ec903f4ce | 1,672 | py | Python | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/StructuralInstanceUsageFilter.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/StructuralInstanceUsageFilter.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/StructuralInstanceUsageFilter.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class StructuralInstanceUsageFilter(ElementSlowFilter, IDisposable):
"""
A filter used to find elements that are structural family instances (typically columns,beams or braces) of the given structural usage.
StructuralInstanceUsageFilter(structuralUsage: StructuralInstanceUsage,inverted: bool)
Struc... | 31.54717 | 221 | 0.678828 |
24e2dd088e7a8240933d082fed8ec277c37969eb | 9,283 | py | Python | sccsLocalNetLoopPcToPiWIP7success/sccsLocalClient.py | ninekorn/Python-2-way-local-network-communication-WIP | ce0338574f27e9799f83178320ce651ed27ccf5e | [
"MIT"
] | null | null | null | sccsLocalNetLoopPcToPiWIP7success/sccsLocalClient.py | ninekorn/Python-2-way-local-network-communication-WIP | ce0338574f27e9799f83178320ce651ed27ccf5e | [
"MIT"
] | null | null | null | sccsLocalNetLoopPcToPiWIP7success/sccsLocalClient.py | ninekorn/Python-2-way-local-network-communication-WIP | ce0338574f27e9799f83178320ce651ed27ccf5e | [
"MIT"
] | null | null | null | #made by ninekorn
import socket
import tqdm
import os
import time
import sys
#https://stackoverflow.com/questions/1271320/resetting-generator-object-in-python
import more_itertools as mit
SEPARATOR = "<SEPARATOR>"
BUFFER_SIZE = 4096 # send 4096 bytes each time step
hostmain = "0.0.0.0"
portmain = 5000
# the ip addre... | 35.703846 | 114 | 0.482064 |
992fcfb02543909402461a361bef2cfe476593a8 | 2,015 | py | Python | test/dlc_tests/sanity/quick_checks/test_generate_coverage_doc.py | whn09/deep-learning-containers | 45493c141ad7bcadc4293f3efa5b1ad983f942b7 | [
"Apache-2.0"
] | 1 | 2022-03-17T00:41:27.000Z | 2022-03-17T00:41:27.000Z | test/dlc_tests/sanity/quick_checks/test_generate_coverage_doc.py | nam-nd-d3/deep-learning-containers | 4c03f5cf7eda3276c6a03516e6823872bd8eeb42 | [
"Apache-2.0"
] | 19 | 2022-01-12T16:00:45.000Z | 2022-03-31T14:33:29.000Z | test/dlc_tests/sanity/quick_checks/test_generate_coverage_doc.py | ashahba/deep-learning-containers | 48c3948b3d11f4fe2aac6bb25e5d82230d777076 | [
"Apache-2.0"
] | 1 | 2021-03-03T23:51:53.000Z | 2021-03-03T23:51:53.000Z | import os
import boto3
import pytest
from botocore.exceptions import ClientError
from invoke.context import Context
from test.test_utils import LOGGER, is_mainline_context, is_graviton_architecture
from test.test_utils.test_reporting import get_test_coverage_file_path
ACCOUNT_ID = os.getenv("ACCOUNT_ID", boto3.cli... | 38.018868 | 112 | 0.716129 |
dd615022a9c0a59c4577f16a856830231b8063c1 | 8,530 | py | Python | qndiag/qndiag.py | hugorichard/qndiag | 64971cfd07162400dd9b48004ef87cac147cb444 | [
"MIT"
] | null | null | null | qndiag/qndiag.py | hugorichard/qndiag | 64971cfd07162400dd9b48004ef87cac147cb444 | [
"MIT"
] | null | null | null | qndiag/qndiag.py | hugorichard/qndiag | 64971cfd07162400dd9b48004ef87cac147cb444 | [
"MIT"
] | null | null | null | # Authors: Pierre Ablin <pierreablin@gmail.com>
#
# License: MIT
from time import time
import numpy as np
from scipy.linalg import expm
def qndiag(C, B0=None, weights=None, max_iter=1000, tol=1e-6,
lambda_min=1e-4, max_ls_tries=10, diag_only=False,
return_B_list=False, check_sympos=True, verbo... | 32.43346 | 79 | 0.592497 |
a7d6d603af5835c339e61cc7f3fc5013bcd0dade | 10,530 | py | Python | dhravyapy/assets.py | Glowwonyt/dhravyapy | 75407e4c4a88f3d56a4a36754025cedd509b8634 | [
"MIT"
] | null | null | null | dhravyapy/assets.py | Glowwonyt/dhravyapy | 75407e4c4a88f3d56a4a36754025cedd509b8634 | [
"MIT"
] | null | null | null | dhravyapy/assets.py | Glowwonyt/dhravyapy | 75407e4c4a88f3d56a4a36754025cedd509b8634 | [
"MIT"
] | null | null | null | from typing import *
from .http import HTTPClient
import aiofiles
from .errors import HTTPException
from .info import Info
class Meme:
"""
The class to get meme related data from the API
"""
def __init__(self, json: dict):
self.json = json
async def save(self, path: str) -> None:
... | 23.452116 | 90 | 0.506933 |
3245dd743551641ff88a07060175fc5a48789f2f | 16,384 | py | Python | movo_common/movo_third_party/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/wxxdot.py | zkytony/kinova-movo | 37d7454b2dc589d44133f3913f567b9cc321a66d | [
"BSD-3-Clause"
] | 2 | 2020-02-13T10:22:42.000Z | 2020-08-06T06:29:55.000Z | movo_common/movo_third_party/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/wxxdot.py | ALAN-NUS/kinova_movo | 05a0451f5c563359ae0ffe3280e1df85caec9e55 | [
"BSD-3-Clause"
] | null | null | null | movo_common/movo_third_party/executive_smach_visualization/smach_viewer/src/smach_viewer/xdot/wxxdot.py | ALAN-NUS/kinova_movo | 05a0451f5c563359ae0ffe3280e1df85caec9e55 | [
"BSD-3-Clause"
] | 1 | 2020-01-21T11:05:24.000Z | 2020-01-21T11:05:24.000Z | #!/usr/bin/env python
#
# wxpython widgets for using Jose Fonseca's cairo graphviz visualizer
# Copyright (c) 2010, Willow Garage, Inc.
#
# Source modified from Jose Fonseca's XDot pgtk widgets. That code is
# Copyright 2008 Jose Fonseca
#
# This program is free software: you can redistribute it and/or modify it
# unde... | 27.675676 | 103 | 0.649963 |
7dac4d2534b47a5014d8f236f60ad52e314e5966 | 10,786 | py | Python | python/src/aac/plugins/gen_protobuf/gen_protobuf_impl.py | Coffee2Bits/AaC | d70d983d69493f698c0221323f657c9df40db051 | [
"MIT"
] | null | null | null | python/src/aac/plugins/gen_protobuf/gen_protobuf_impl.py | Coffee2Bits/AaC | d70d983d69493f698c0221323f657c9df40db051 | [
"MIT"
] | 2 | 2022-02-17T00:29:32.000Z | 2022-02-20T22:58:21.000Z | python/src/aac/plugins/gen_protobuf/gen_protobuf_impl.py | Coffee2Bits/AaC | d70d983d69493f698c0221323f657c9df40db051 | [
"MIT"
] | null | null | null | """AaC Plugin implementation module for the aac-gen-protobuf plugin."""
# NOTE: It is safe to edit this file.
# This file is only initially generated by the aac gen-plugin, and it won't be overwritten if the file already exists.
from iteration_utilities import flatten
from aac import parser, util
from aac.plugins im... | 37.713287 | 153 | 0.714074 |
9b0b7e69dbf4092c75e91484d51effd8bbf99a93 | 28,409 | py | Python | xfel/merging/application/statistics/intensity_resolution_statistics.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/merging/application/statistics/intensity_resolution_statistics.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | xfel/merging/application/statistics/intensity_resolution_statistics.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
from six.moves import range
from xfel.merging.application.worker import worker
from dials.array_family import flex
import math
from libtbx import adopt_init_args
from libtbx.str_utils import format_value
from libtbx import table_utils
from xfel.merging.ap... | 49.927944 | 217 | 0.639762 |
1b5db226842ba45185f1dc659d619bc75ad9be21 | 1,707 | py | Python | examples/automl/automl_random_search_example.py | MatthewYee92/trains | f5f13658c335250165d9c57c0ba30abffdda4171 | [
"Apache-2.0"
] | 1 | 2021-05-06T13:33:36.000Z | 2021-05-06T13:33:36.000Z | examples/automl/automl_random_search_example.py | iridiumblue/trains | 101e5393d1ba73462a6a85df55a2dfb4b629cb0d | [
"Apache-2.0"
] | 4 | 2020-09-26T00:55:57.000Z | 2022-02-10T01:18:20.000Z | examples/automl/automl_random_search_example.py | iridiumblue/trains | 101e5393d1ba73462a6a85df55a2dfb4b629cb0d | [
"Apache-2.0"
] | null | null | null | from random import random, sample
from trains import Task
# define random search space,
# This is a simple random search
# (can be integrated with 'bayesian-optimization' 'hpbandster' etc.)
space = {
'batch_size': lambda: sample([64, 96, 128, 160, 192], 1)[0],
'layer_1': lambda: sample(range(128, 512, 32), 1)... | 37.108696 | 101 | 0.725835 |
06eaa251d20284906c2aef03faca8f0d127aa413 | 1,253 | py | Python | python/python-algorithm-intervew/9-stack-queue/23-implement-stack-using-queues-1.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | 1 | 2022-03-06T03:49:31.000Z | 2022-03-06T03:49:31.000Z | python/python-algorithm-intervew/9-stack-queue/23-implement-stack-using-queues-1.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | null | null | null | python/python-algorithm-intervew/9-stack-queue/23-implement-stack-using-queues-1.py | bum12ark/algorithm | b6e262b0c29a8b5fb551db5a177a40feebc411b4 | [
"MIT"
] | null | null | null | """
* 큐를 이용한 스택 구현
큐를 이용해 다음 연산을 지원하는 스택을 구현하라.
- push(x) : 요소 x를 스택에 삽입한다.
- pop() : 스택의 첫 번째 요소를 삭제한다.
- top() : 스택의 첫 번째 요소를 가져온다.
- empty() : 스택이 비어 있는지 여부를 리턴한다.
MyStack stack = new Stack();
stack.push(1);
stack.push(2);
stack.top(); // 2리턴
stack.pop(); // 2리턴
stack.empty(); // false 리턴
"""
import collections
c... | 20.883333 | 73 | 0.526736 |
28ec0fae6391b5c3b05b28cc65af4f1fef3e5cf4 | 2,605 | py | Python | ipyregulus/basetreeview.py | yarden-livnat/ipyregulus | 971ab02cd3676b9ea8c712fd3940d42d974c445d | [
"BSD-3-Clause"
] | 1 | 2018-09-06T17:07:41.000Z | 2018-09-06T17:07:41.000Z | ipyregulus/basetreeview.py | yarden-livnat/ipyregulus | 971ab02cd3676b9ea8c712fd3940d42d974c445d | [
"BSD-3-Clause"
] | 3 | 2021-03-10T09:24:25.000Z | 2022-01-22T10:49:25.000Z | ipyregulus/basetreeview.py | yarden-livnat/ipyregulus | 971ab02cd3676b9ea8c712fd3940d42d974c445d | [
"BSD-3-Clause"
] | 2 | 2018-08-30T19:11:05.000Z | 2020-01-07T16:29:01.000Z | # Copyright (c) University of Utah
from traitlets import Bool, Dict, Instance, Int, List, Tuple, Unicode, Set, validate, observe, HasTraits
from ipywidgets import register, widget_serialization
from regulus import HasTree, Tree
from ipyregulus.core.base import RegulusDOMWidget
from .tree import TreeWidget
def from_... | 31.768293 | 104 | 0.628023 |
f29e048f1755fd80923f87323d2b52f0cb7408b6 | 8,677 | py | Python | cybox/utils/normalize.py | Mattlk13/python-cybox | ee82c7da40ca4638e3ca8d70766150c0dace1b55 | [
"BSD-3-Clause"
] | null | null | null | cybox/utils/normalize.py | Mattlk13/python-cybox | ee82c7da40ca4638e3ca8d70766150c0dace1b55 | [
"BSD-3-Clause"
] | null | null | null | cybox/utils/normalize.py | Mattlk13/python-cybox | ee82c7da40ca4638e3ca8d70766150c0dace1b55 | [
"BSD-3-Clause"
] | null | null | null | # CybOX Object Normalization Methods
# For normalizing certain CybOX Objects to enable better correlation
# Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import re
from cybox.objects.file_object import File
from cybox.objects.win_registry_key_object import WinRe... | 64.753731 | 153 | 0.515155 |
4b41f56bacbd105d636ac514dd8d376ac8eeaf8b | 11,905 | py | Python | Tests/test_Clustalw_tool.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 2,856 | 2015-01-01T07:10:06.000Z | 2022-03-31T18:17:25.000Z | Tests/test_Clustalw_tool.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 3,429 | 2015-01-05T11:11:42.000Z | 2022-03-31T13:08:10.000Z | Tests/test_Clustalw_tool.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 1,619 | 2015-01-05T13:07:11.000Z | 2022-03-31T19:19:52.000Z | # Copyright 2008-2011 by Peter Cock. All rights reserved.
# Revisions copyright 2012 by Christian Brueffer. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# TODO - Clean up ... | 36.743827 | 87 | 0.631835 |
32685ea022a5777b4d8630f125a685114b5f9df1 | 411 | py | Python | actions/version.py | nzlosh/stackstorm-proxmox | fc4388f0b62dd1d4a360e9542eb55dea387149f4 | [
"Apache-2.0"
] | null | null | null | actions/version.py | nzlosh/stackstorm-proxmox | fc4388f0b62dd1d4a360e9542eb55dea387149f4 | [
"Apache-2.0"
] | null | null | null | actions/version.py | nzlosh/stackstorm-proxmox | fc4388f0b62dd1d4a360e9542eb55dea387149f4 | [
"Apache-2.0"
] | null | null | null | import json
from packlib.base import ProxmoxAction
class VersionAction(ProxmoxAction):
"""
API version details. The result also includes the global datacenter confguration.
"""
def run(self, profile_name=None):
super().run(profile_name)
# Only include non None arguments to pass throu... | 25.6875 | 85 | 0.690998 |
648c71afa44429324ac93fb52279acb3f4d66451 | 888 | py | Python | lino_book/projects/__init__.py | khchine5/book | b6272d33d49d12335d25cf0a2660f7996680b1d1 | [
"BSD-2-Clause"
] | 1 | 2018-01-12T14:09:58.000Z | 2018-01-12T14:09:58.000Z | lino_book/projects/__init__.py | khchine5/book | b6272d33d49d12335d25cf0a2660f7996680b1d1 | [
"BSD-2-Clause"
] | 4 | 2018-02-06T19:53:10.000Z | 2019-08-01T21:47:44.000Z | lino_book/projects/__init__.py | khchine5/book | b6272d33d49d12335d25cf0a2660f7996680b1d1 | [
"BSD-2-Clause"
] | null | null | null | """This package contains example applications included with the Lino
book. These can be used either out of the box or as a base for
derivated work.
See :doc:`/dev/projects` which explains how to try them.
Examples of localized Lino applications which are being used in the
real world.
.. autosummary::
:toctree:
... | 11.240506 | 68 | 0.657658 |
816288b839d4121b92d11af2405c6f043a647233 | 564 | py | Python | class_day07.py | yunjung-lee/class_python_data | 67ceab73e67ec63d408894a6ab016a8d25a4e30b | [
"MIT"
] | null | null | null | class_day07.py | yunjung-lee/class_python_data | 67ceab73e67ec63d408894a6ab016a8d25a4e30b | [
"MIT"
] | null | null | null | class_day07.py | yunjung-lee/class_python_data | 67ceab73e67ec63d408894a6ab016a8d25a4e30b | [
"MIT"
] | null | null | null | # (1) 통계 기반 데이터 분석 (부제: 영상 처리를 통한 데이터 분석 및 통계 처리)
#
# (2) 텍스트마이닝 기반 데이터 분석 (부제: 텍스트 기반 데이터 분석 및 처리)
#
# (3) 빅데이터 분석 결과 시각화 (부제 : 데이터베이스 기반 데이터 분석 및 GUI 시각화)
#
#
#
#
# 복습퀴즈1. 3개 csv 파일을 읽어서, Sales Amount의 총합계와 평균을 구한 후,
#
# print()로 출력한다.
#
# sales_january_2014.csv, sales_february_2014.csv, sales_march_2014.csv
#
#
... | 14.1 | 73 | 0.549645 |
daf5efaa8264c29dbe0f1fdfc338c9779f7b8960 | 26,128 | py | Python | tests/test_polya.py | wsmorgan/phonon-enumeration | 5d7a8d8e3403cc387bdd58cf98a23e4751ea34dd | [
"MIT-0"
] | 5 | 2016-06-17T05:39:27.000Z | 2021-05-30T21:02:08.000Z | tests/test_polya.py | wsmorgan/phonon-enumeration | 5d7a8d8e3403cc387bdd58cf98a23e4751ea34dd | [
"MIT-0"
] | 66 | 2016-04-02T05:02:08.000Z | 2018-07-05T19:43:09.000Z | tests/test_polya.py | wsmorgan/phonon-enumeration | 5d7a8d8e3403cc387bdd58cf98a23e4751ea34dd | [
"MIT-0"
] | 5 | 2017-03-15T21:28:44.000Z | 2020-01-09T14:44:45.000Z | """Methods for testing the subroutines in the polyaburnside module."""
import unittest as ut
from phenum.polyaburnside import polya
import pytest
class Testpolya(ut.TestCase):
"""Tests of the polya subroutine."""
def test_toy_2(self):
from phenum.grouptheory import a_group_gen
from phenum.phon... | 73.393258 | 910 | 0.491389 |
c4d4108b2319f9583ac6b13051f2486ef180fbd9 | 4,760 | py | Python | Analytics/shared_code/RHcomponents.py | crhaithcock/RushHour | 9c1854dd117e43ec38a6eacf74a8365a6e01f25c | [
"CC0-1.0"
] | null | null | null | Analytics/shared_code/RHcomponents.py | crhaithcock/RushHour | 9c1854dd117e43ec38a6eacf74a8365a6e01f25c | [
"CC0-1.0"
] | null | null | null | Analytics/shared_code/RHcomponents.py | crhaithcock/RushHour | 9c1854dd117e43ec38a6eacf74a8365a6e01f25c | [
"CC0-1.0"
] | null | null | null |
import numpy as np
import networkx as nx
import RHneighbors as nbrs
def gen_components(states):
'''
Input: set of states. Each element of the set is a tuple:
s: board as int
red_col: right most column covered by red_col
output: yielded output of graphs one at a... | 28.502994 | 105 | 0.534454 |
d3242fd069a18b3aef0533b34f98d84a4ac034f9 | 100 | py | Python | app/Connection/imap.py | alexanderscpo/UCi_Desktop | a923dd78d2f4df95fdd56c0afc52fc3557b8d4a7 | [
"MIT"
] | null | null | null | app/Connection/imap.py | alexanderscpo/UCi_Desktop | a923dd78d2f4df95fdd56c0afc52fc3557b8d4a7 | [
"MIT"
] | null | null | null | app/Connection/imap.py | alexanderscpo/UCi_Desktop | a923dd78d2f4df95fdd56c0afc52fc3557b8d4a7 | [
"MIT"
] | null | null | null | from imaplib import IMAP4
with IMAP4(host='imap.gmail.com') as client_imap:
client_imap.noop()
| 20 | 49 | 0.75 |
49eda6fd9e4d9b4f195463aff19bfea647a64343 | 2,633 | py | Python | Website Pinger.py | RAZERDK/WebsidePinger | d68b2ee4043cbf4d655a15ccf1530ce1a4119947 | [
"Apache-2.0"
] | null | null | null | Website Pinger.py | RAZERDK/WebsidePinger | d68b2ee4043cbf4d655a15ccf1530ce1a4119947 | [
"Apache-2.0"
] | null | null | null | Website Pinger.py | RAZERDK/WebsidePinger | d68b2ee4043cbf4d655a15ccf1530ce1a4119947 | [
"Apache-2.0"
] | null | null | null | import os
import time
hostnames = [
'Github.com',
#Du Kan bare Add Din Egen Webside/Ip Den Skal Pinge
]
for hostname in hostnames:
response = os.system('ping ' + hostname)
if response == 0:
print (hostname, 'Pinger')
print (hostname, 'Pinger')
print (hostname, 'Pinger')
... | 32.109756 | 62 | 0.544246 |
5a8b8595fd3031b430ccbc489431d9f7711d982c | 15,292 | py | Python | official/nlp/transformer/data_download.py | NasTul/models | 4fabd84c5c5e2b34a1b95431788f7801de036421 | [
"Apache-2.0"
] | 82,518 | 2016-02-05T12:07:23.000Z | 2022-03-31T23:09:47.000Z | official/nlp/transformer/data_download.py | NasTul/models | 4fabd84c5c5e2b34a1b95431788f7801de036421 | [
"Apache-2.0"
] | 9,021 | 2016-03-08T01:02:05.000Z | 2022-03-31T08:06:35.000Z | official/nlp/transformer/data_download.py | NasTul/models | 4fabd84c5c5e2b34a1b95431788f7801de036421 | [
"Apache-2.0"
] | 54,341 | 2016-02-06T17:19:55.000Z | 2022-03-31T10:27:44.000Z | # Copyright 2021 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... | 34.441441 | 80 | 0.688792 |
3e7a978683fb79965b67c220fa1c8ba237161312 | 23,726 | py | Python | auxiliary/reg_fig4.py | manuhuth/Replication-of-Bailey-2010- | dbf1cd6c1463d52b569bd2e7ce3ae4624451b422 | [
"MIT"
] | 1 | 2020-11-15T12:54:44.000Z | 2020-11-15T12:54:44.000Z | auxiliary/reg_fig5.py | manuhuth/Replication-of-Bailey-2010- | dbf1cd6c1463d52b569bd2e7ce3ae4624451b422 | [
"MIT"
] | null | null | null | auxiliary/reg_fig5.py | manuhuth/Replication-of-Bailey-2010- | dbf1cd6c1463d52b569bd2e7ce3ae4624451b422 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.axes as ax
import statsmodels.api as sm
import warnings as wn
def gen_Fig4_A(df):
"""Function to create the plot from Figure 6 in Bailey (2010)
Args:
-------
takes a data frame for ... | 34.788856 | 131 | 0.565961 |
f65c9ddf2339f82a2fe2e3e02b0d5d6805f7e2e6 | 244 | py | Python | test/regtests/__init__.py | pbrisk/dcf | c585e173e5ea3b529be7463787ddcd5cb93fffd3 | [
"Apache-2.0"
] | 7 | 2018-07-22T10:12:25.000Z | 2019-08-11T08:54:15.000Z | test/regtests/__init__.py | pbrisk/dcf | c585e173e5ea3b529be7463787ddcd5cb93fffd3 | [
"Apache-2.0"
] | null | null | null | test/regtests/__init__.py | pbrisk/dcf | c585e173e5ea3b529be7463787ddcd5cb93fffd3 | [
"Apache-2.0"
] | 1 | 2017-04-10T13:41:05.000Z | 2017-04-10T13:41:05.000Z | import sys
sys.path.append('dcf/')
sys.path.append('.')
sys.path.append('..')
from .pricer_regtests import *
from .model_regtests import *
from .product_regtests import *
from .forwardcurve_regtests import *
from .contingent_regtests import *
| 22.181818 | 36 | 0.762295 |
231e6711417b0981de2a674c219cd5ac2561a0e1 | 681 | py | Python | api/core/migrations/0014_diskclone.py | wh1te909/imagebackups | a0f94b6571a8ed9083cd4a02bf28ce4bfc2882c0 | [
"MIT"
] | 5 | 2019-11-18T09:04:05.000Z | 2021-12-09T03:36:34.000Z | api/core/migrations/0014_diskclone.py | wh1te909/imagebackups | a0f94b6571a8ed9083cd4a02bf28ce4bfc2882c0 | [
"MIT"
] | 12 | 2020-08-01T23:08:22.000Z | 2022-02-18T15:14:39.000Z | api/core/migrations/0014_diskclone.py | wh1te909/imagebackups | a0f94b6571a8ed9083cd4a02bf28ce4bfc2882c0 | [
"MIT"
] | 4 | 2020-07-26T05:14:23.000Z | 2021-08-28T02:03:08.000Z | # Generated by Django 3.0.1 on 2019-12-26 23:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0013_auto_20191219_2233'),
]
operations = [
migrations.CreateModel(
name='DiskClone',
fields=[
... | 29.608696 | 114 | 0.582966 |
a0b2fffebdac48f1ebf3d9878a27647dfa5fdd10 | 5,200 | py | Python | sentinelpy/request/validate_query_builder_args.py | UKHO/sentinelpy | aafadf93f68dbd7ebca6bdf354411e42e725cf69 | [
"MIT"
] | 2 | 2021-01-11T09:09:25.000Z | 2021-01-13T11:16:03.000Z | sentinelpy/request/validate_query_builder_args.py | UKHO/sentinelpy | aafadf93f68dbd7ebca6bdf354411e42e725cf69 | [
"MIT"
] | 32 | 2021-03-03T12:51:00.000Z | 2022-03-25T01:20:10.000Z | sentinelpy/request/validate_query_builder_args.py | UKHO/sentinelpy | aafadf93f68dbd7ebca6bdf354411e42e725cf69 | [
"MIT"
] | 1 | 2021-02-07T13:22:40.000Z | 2021-02-07T13:22:40.000Z | import re
from functools import reduce
from typing import Any, Optional
DATE_TIME_PATTERN = re.compile(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$")
RELATIVE_DATE_PATTERN = re.compile(r"^NOW(?:-\d+(?:MINUTE|HOUR|DAY|MONTH)S?)?$")
INTERSECTS_PATTERN = re.compile(r"(?s)^\"Intersects\(.*")
POLYGON_PATTERN = re.compil... | 31.90184 | 85 | 0.633269 |
df3c98145f284788560f1baafa5985346653cb08 | 1,790 | py | Python | evaluation/models/open-tsne.py | hyungkwonko/umato | 976e513a404152be9a727d48ca0e1a932e64bb70 | [
"MIT"
] | 3 | 2020-06-21T07:10:06.000Z | 2020-09-24T17:02:52.000Z | evaluation/models/open-tsne.py | hyungkwonko/umato | 976e513a404152be9a727d48ca0e1a932e64bb70 | [
"MIT"
] | null | null | null | evaluation/models/open-tsne.py | hyungkwonko/umato | 976e513a404152be9a727d48ca0e1a932e64bb70 | [
"MIT"
] | null | null | null | from openTSNE import TSNE
from sklearn.decomposition import PCA
import argparse
import os
import numpy as np
from scipy.stats import loguniform
from .dataset import get_data, save_csv
parser = argparse.ArgumentParser(description="t-SNE embedding")
parser.add_argument("--data", type=str, help="choose dataset", required... | 42.619048 | 169 | 0.665922 |
5d0e4754031b73cc7c47a74891f12eb93d87cba6 | 4,327 | py | Python | contrib/seeds/generate-seeds.py | ruevers/Chronon | 3e5867921e847db4eb53c50e53a8c1cacd3f7810 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | ruevers/Chronon | 3e5867921e847db4eb53c50e53a8c1cacd3f7810 | [
"MIT"
] | null | null | null | contrib/seeds/generate-seeds.py | ruevers/Chronon | 3e5867921e847db4eb53c50e53a8c1cacd3f7810 | [
"MIT"
] | 1 | 2019-04-04T09:45:14.000Z | 2019-04-04T09:45:14.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... | 31.355072 | 98 | 0.581465 |
995681581b10b9bfcc0d80b77983096705b1e05f | 25,911 | py | Python | src/main/python/systemml/mlcontext.py | j143-zz/systemml | b48653e9259aa9625eb828d824307f04b04e2b95 | [
"Apache-2.0"
] | 15 | 2016-03-03T09:23:25.000Z | 2017-02-21T22:09:57.000Z | src/main/python/systemml/mlcontext.py | j143-zz/systemml | b48653e9259aa9625eb828d824307f04b04e2b95 | [
"Apache-2.0"
] | null | null | null | src/main/python/systemml/mlcontext.py | j143-zz/systemml | b48653e9259aa9625eb828d824307f04b04e2b95 | [
"Apache-2.0"
] | 10 | 2016-01-18T01:50:25.000Z | 2020-03-03T20:25:44.000Z | # -------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you unde... | 29.920323 | 154 | 0.597044 |
9c6f32e37dad8da8c8f59af44e8b0c88f6c68643 | 4,747 | py | Python | charts/prometheus/shard_prometheus_utils.py | awitten-yb/helm-charts | f4877fc07c224b8509e3bec7f2bba00a7a924469 | [
"Apache-2.0"
] | null | null | null | charts/prometheus/shard_prometheus_utils.py | awitten-yb/helm-charts | f4877fc07c224b8509e3bec7f2bba00a7a924469 | [
"Apache-2.0"
] | null | null | null | charts/prometheus/shard_prometheus_utils.py | awitten-yb/helm-charts | f4877fc07c224b8509e3bec7f2bba00a7a924469 | [
"Apache-2.0"
] | null | null | null |
import yaml
import json
import copy
import os
import re
import subprocess
from collections import namedtuple
from kubernetes import client, config
from kubernetes.client import api_client
from kubernetes.client.api import core_v1_api
# helm delete prom-test-shard-0 prom-test-shard-1 prom-test-shard-2 -n test-shard... | 38.593496 | 126 | 0.671371 |
b0aa79ecc7d896485cda19e5678ca7ac931936cc | 1,518 | py | Python | algorithms/divide_and_conquer.py | iafisher/algorithms-in-python | d0af4109029fb685a84b2ebf35888898aeed89be | [
"MIT"
] | null | null | null | algorithms/divide_and_conquer.py | iafisher/algorithms-in-python | d0af4109029fb685a84b2ebf35888898aeed89be | [
"MIT"
] | 2 | 2018-10-01T19:49:08.000Z | 2019-11-01T02:29:12.000Z | algorithms/divide_and_conquer.py | iafisher/algorithms-in-python | d0af4109029fb685a84b2ebf35888898aeed89be | [
"MIT"
] | 1 | 2022-03-08T15:03:59.000Z | 2022-03-08T15:03:59.000Z | """Divide-and-conquer algorithms divide a problem into two or more smaller
instances of the same problem.
Author: Ian Fisher (iafisher@protonmail.com)
Version: October 2018
"""
def merge_sort(lst: list) -> list:
"""Sort a list in ascending order. The original list is mutated and
returned. The sort is stable.... | 28.641509 | 77 | 0.582345 |
d15836d82dc553c29faa3c46d0a1a1c7250b4a6b | 9,387 | py | Python | globus_cli/helpers/local_server.py | glentner/globus-cli | a6542d6824cc123f60088bf2602cd7a0fdb0e64e | [
"Apache-2.0"
] | 47 | 2016-04-21T19:51:17.000Z | 2022-02-25T14:13:30.000Z | globus_cli/helpers/local_server.py | glentner/globus-cli | a6542d6824cc123f60088bf2602cd7a0fdb0e64e | [
"Apache-2.0"
] | 421 | 2016-04-20T18:45:24.000Z | 2022-03-14T14:50:41.000Z | globus_cli/helpers/local_server.py | glentner/globus-cli | a6542d6824cc123f60088bf2602cd7a0fdb0e64e | [
"Apache-2.0"
] | 20 | 2016-09-10T20:25:27.000Z | 2021-10-06T16:02:47.000Z | import http.client
import logging
import os
import queue
import sys
import threading
from contextlib import contextmanager
from http.server import BaseHTTPRequestHandler, HTTPServer
from string import Template
from urllib.parse import parse_qsl, urlparse
import click
class LocalServerError(Exception):
pass
def... | 64.737931 | 5,302 | 0.825929 |
ccdc4ea6944131767d35ea85a85e7aaec7704cab | 1,014 | py | Python | random-generator/models.py | Aiky30/generic-hospital-movement-and-disease-random-data-generator | 8923f019554c552a46effbc5deb00366c85cbe36 | [
"MIT"
] | null | null | null | random-generator/models.py | Aiky30/generic-hospital-movement-and-disease-random-data-generator | 8923f019554c552a46effbc5deb00366c85cbe36 | [
"MIT"
] | null | null | null | random-generator/models.py | Aiky30/generic-hospital-movement-and-disease-random-data-generator | 8923f019554c552a46effbc5deb00366c85cbe36 | [
"MIT"
] | null | null | null |
class Location:
def __init__(self, name="", admission_date=None, discharge_date=None):
self.name = name
self.admission_date = admission_date
self.discharge_date = discharge_date
class Isolate:
def __init__(self, id=None):
self.id = str(id)
self.individual_id = None
... | 23.045455 | 74 | 0.656805 |
a8a76dc33e9a3a266439fda03ef318419cea7d04 | 6,706 | py | Python | PHSD_analysis/__init__.py | pierre-moreau/PHSD_analysis | 9496a8b8cb8a415f81f234351abf501445515240 | [
"MIT"
] | null | null | null | PHSD_analysis/__init__.py | pierre-moreau/PHSD_analysis | 9496a8b8cb8a415f81f234351abf501445515240 | [
"MIT"
] | null | null | null | PHSD_analysis/__init__.py | pierre-moreau/PHSD_analysis | 9496a8b8cb8a415f81f234351abf501445515240 | [
"MIT"
] | null | null | null | """
To analyze and plot heavy-ion collision data produced by the Parton-Hadron-String Dynamics (PHSD) model.
"""
__version__ = '2.0.0'
from matplotlib.pyplot import rc
import matplotlib.pyplot as pl
import numpy as np
from particle import Particle
##########################################################... | 33.698492 | 120 | 0.563227 |
e0175d5196f32b6532ac111924cfe279c4188bc2 | 3,568 | py | Python | pi-cloud-components/pi-installation/swaggerlib/swagger_client/models/instructions.py | thatguycalledrob/gps-tracking | def6cdc6f3717b39b1af7635268c172f4015dc44 | [
"Unlicense"
] | null | null | null | pi-cloud-components/pi-installation/swaggerlib/swagger_client/models/instructions.py | thatguycalledrob/gps-tracking | def6cdc6f3717b39b1af7635268c172f4015dc44 | [
"Unlicense"
] | null | null | null | pi-cloud-components/pi-installation/swaggerlib/swagger_client/models/instructions.py | thatguycalledrob/gps-tracking | def6cdc6f3717b39b1af7635268c172f4015dc44 | [
"Unlicense"
] | null | null | null | # coding: utf-8
"""
Van Tracker Piside
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 0.0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
imp... | 29.00813 | 119 | 0.566704 |
7d90bd7d79c8958d95a78a7de3254828629b549d | 15,866 | py | Python | keras/initializers.py | reiserwang/keras | 9ab8070c77b047f8c519bd97cb38c33533639224 | [
"MIT"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | keras/initializers.py | reiserwang/keras | 9ab8070c77b047f8c519bd97cb38c33533639224 | [
"MIT"
] | 1 | 2018-11-15T02:00:31.000Z | 2021-12-06T02:20:32.000Z | keras/initializers.py | reiserwang/keras | 9ab8070c77b047f8c519bd97cb38c33533639224 | [
"MIT"
] | 1 | 2018-04-04T12:38:47.000Z | 2018-04-04T12:38:47.000Z | """Built-in weight initializers.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import six
from . import backend as K
from .utils.generic_utils import serialize_keras_object
from .utils.generic_utils import deserialize_keras_object
... | 31.480159 | 83 | 0.601349 |
c449a10d12d58088911bba22bed65d8dba54a068 | 15,680 | py | Python | ThirdParty/cinema/paraview/tpl/cinema_python/database/raster_wrangler.py | xj361685640/ParaView | 0a27eef5abc5a0c0472ab0bc806c4db881156e64 | [
"Apache-2.0",
"BSD-3-Clause"
] | 815 | 2015-01-03T02:14:04.000Z | 2022-03-26T07:48:07.000Z | ThirdParty/cinema/paraview/tpl/cinema_python/database/raster_wrangler.py | xj361685640/ParaView | 0a27eef5abc5a0c0472ab0bc806c4db881156e64 | [
"Apache-2.0",
"BSD-3-Clause"
] | 9 | 2015-04-28T20:10:37.000Z | 2021-08-20T18:19:01.000Z | ThirdParty/cinema/paraview/tpl/cinema_python/database/raster_wrangler.py | xj361685640/ParaView | 0a27eef5abc5a0c0472ab0bc806c4db881156e64 | [
"Apache-2.0",
"BSD-3-Clause"
] | 328 | 2015-01-22T23:11:46.000Z | 2022-03-14T06:07:52.000Z | """
Module that uses one of the available back end libraries to write out image
files for cinema's file store class.
"""
import numpy
import zlib
import os
import warnings
exrEnabled = False
try:
import oexr_helper as exr
exrEnabled = True
print(
"Imported OpenEXR, will default to *.exr for float ... | 36.212471 | 79 | 0.546429 |
2b5ec7a564fa02ac44699100d0aadd6371573366 | 12 | py | Python | taller/prueba.py | BrayanTorres2/Algoritmos_y_ProgramacionC3-C2 | 02e12d765c34bd5391883fb15b5310dd7415e92d | [
"MIT"
] | null | null | null | taller/prueba.py | BrayanTorres2/Algoritmos_y_ProgramacionC3-C2 | 02e12d765c34bd5391883fb15b5310dd7415e92d | [
"MIT"
] | null | null | null | taller/prueba.py | BrayanTorres2/Algoritmos_y_ProgramacionC3-C2 | 02e12d765c34bd5391883fb15b5310dd7415e92d | [
"MIT"
] | 13 | 2021-07-26T16:38:57.000Z | 2021-11-19T02:28:12.000Z | """prueba""" | 12 | 12 | 0.5 |
3dd2facef2565e869eecd54f9c47c6dfdf062154 | 13,017 | py | Python | tests/acme_tiny/acme_tiny.py | commonism/acmetk | 0dbbcd4b92a9347221753d4076553af047876b12 | [
"MIT"
] | 3 | 2021-03-15T11:25:22.000Z | 2021-04-01T09:05:07.000Z | tests/acme_tiny/acme_tiny.py | commonism/acmetk | 0dbbcd4b92a9347221753d4076553af047876b12 | [
"MIT"
] | 60 | 2021-03-16T13:28:56.000Z | 2021-04-03T14:07:31.000Z | tests/acme_tiny/acme_tiny.py | commonism/acmetk | 0dbbcd4b92a9347221753d4076553af047876b12 | [
"MIT"
] | 1 | 2021-03-15T11:25:05.000Z | 2021-03-15T11:25:05.000Z | #!/usr/bin/env python
# Copyright Daniel Roesler, under MIT license, see LICENSE at github.com/diafygi/acme-tiny
import argparse
import base64
import binascii
import hashlib
import json
import logging
import os
import re
import subprocess
import sys
import textwrap
import time
try:
from urllib.request import urlop... | 36.875354 | 106 | 0.595836 |
8cdf820d5e776878f79d33de2f8cb3262da432e2 | 4,770 | py | Python | assets/src/ba_data/python/bastd/ui/serverdialog.py | SahandAslani/ballistica | 7e3814cd2a1920ea8f5820cb1cdbb4dc5420d30e | [
"MIT"
] | null | null | null | assets/src/ba_data/python/bastd/ui/serverdialog.py | SahandAslani/ballistica | 7e3814cd2a1920ea8f5820cb1cdbb4dc5420d30e | [
"MIT"
] | null | null | null | assets/src/ba_data/python/bastd/ui/serverdialog.py | SahandAslani/ballistica | 7e3814cd2a1920ea8f5820cb1cdbb4dc5420d30e | [
"MIT"
] | null | null | null | # Copyright (c) 2011-2020 Eric Froemling
#
# 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,... | 41.478261 | 79 | 0.589727 |
4db7c76b783f878e6ab8b79a5df728c3d5a70fe4 | 225 | py | Python | openCam.py | Indra-Kumar-Chaudhary/computervision | 0a85abf1098549d3063fc5ed7046fa609ce1e29b | [
"MIT"
] | null | null | null | openCam.py | Indra-Kumar-Chaudhary/computervision | 0a85abf1098549d3063fc5ed7046fa609ce1e29b | [
"MIT"
] | null | null | null | openCam.py | Indra-Kumar-Chaudhary/computervision | 0a85abf1098549d3063fc5ed7046fa609ce1e29b | [
"MIT"
] | null | null | null | import cv2
# open camera with opencv for only one frame
cam = cv2.VideoCapture(0)
while cam.isOpened():
ret, frame = cam.read()
if cv2.waitKey(10) == ord('q'):
break
cv2.imshow('Granny Cam', frame)
| 17.307692 | 45 | 0.622222 |
5f17cd73ef6767acd0eeae9544b3ecde7f9a787f | 2,054 | py | Python | Empzxy Projects/Software Engineering/Software Simulations/Tkinter Splash Screen/main.py | Empzxy/Empzxy-2022-Projects-Overview | 223fa3e2bf3a3dd39a72ebe2f4dfb08c180ebf48 | [
"MIT"
] | null | null | null | Empzxy Projects/Software Engineering/Software Simulations/Tkinter Splash Screen/main.py | Empzxy/Empzxy-2022-Projects-Overview | 223fa3e2bf3a3dd39a72ebe2f4dfb08c180ebf48 | [
"MIT"
] | null | null | null | Empzxy Projects/Software Engineering/Software Simulations/Tkinter Splash Screen/main.py | Empzxy/Empzxy-2022-Projects-Overview | 223fa3e2bf3a3dd39a72ebe2f4dfb08c180ebf48 | [
"MIT"
] | null | null | null | from tkinter import ttk
from tkinter.ttk import Progressbar
from tkinter import *
w=Tk()
width_of_window = 427
height_of_window = 250
screen_width = w.winfo_screenwidth()
screen_height = w.winfo_screenheight()
x_coordinate = (screen_width/2)-(width_of_window/2)
y_coordinate = (screen_height/2)-(height_of_window/2)
w... | 18.672727 | 108 | 0.643622 |
88436fe77fbbe1135c5f6bb70a9a492b4d89cd36 | 22,623 | py | Python | extremeText/XT_GitHub/python/extremeText/tests/test_script.py | anonymouslorem/library_identification_vulnerability_report | 3eb1916b25bcf885640ed19954377edf45f7498a | [
"MIT"
] | 1 | 2022-01-05T02:27:43.000Z | 2022-01-05T02:27:43.000Z | extremeText/XT_GitHub/python/extremeText/tests/test_script.py | anonymouslorem/library_identification_vulnerability_report | 3eb1916b25bcf885640ed19954377edf45f7498a | [
"MIT"
] | null | null | null | extremeText/XT_GitHub/python/extremeText/tests/test_script.py | anonymouslorem/library_identification_vulnerability_report | 3eb1916b25bcf885640ed19954377edf45f7498a | [
"MIT"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ i... | 35.795886 | 94 | 0.543606 |
500a96b8e6904f32126b1c29e6eb2e6036f8b2a7 | 1,476 | py | Python | src/sentry/api/endpoints/organization_activity.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2019-03-04T12:45:54.000Z | 2019-03-04T12:45:55.000Z | src/sentry/api/endpoints/organization_activity.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/api/endpoints/organization_activity.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2018-07-02T09:46:44.000Z | 2018-07-02T09:46:44.000Z | from __future__ import absolute_import
from sentry.api.base import EnvironmentMixin
from sentry.api.bases import OrganizationMemberEndpoint
from sentry.api.paginator import DateTimePaginator
from sentry.api.serializers import serialize, OrganizationActivitySerializer
from sentry.models import Activity, OrganizationMem... | 41 | 91 | 0.666667 |
9efaa616224d00c636a5abc37135339c92707af0 | 3,230 | py | Python | openprocurement/auctions/geb/tests/cases/active_rectification.py | bdmbdsm/openprocurement.auctions.geb | 7d4db2c0c66fbe896dc76cead44bbb0f701c2353 | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/geb/tests/cases/active_rectification.py | bdmbdsm/openprocurement.auctions.geb | 7d4db2c0c66fbe896dc76cead44bbb0f701c2353 | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/geb/tests/cases/active_rectification.py | bdmbdsm/openprocurement.auctions.geb | 7d4db2c0c66fbe896dc76cead44bbb0f701c2353 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from openprocurement.auctions.core.tests.base import snitch
from openprocurement.auctions.geb.tests.base import (
test_auction_data,
BaseAuctionWebTest
)
from openprocurement.auctions.geb.tests.states import (Procedure)
from openprocurement.auctions.geb.tests.helpers i... | 35.108696 | 91 | 0.712693 |
f7216012bdabcc6a4f76ac1521c5236c58f42c7a | 393 | py | Python | bookitoBackend/User/urls.py | mazdakdev/Bookito | 38e18fee22aafea95429da01e9769acf2748f676 | [
"MIT"
] | 10 | 2021-12-09T04:39:03.000Z | 2022-02-07T05:42:29.000Z | bookitoBackend/User/urls.py | mazdakdev/Bookito | 38e18fee22aafea95429da01e9769acf2748f676 | [
"MIT"
] | 2 | 2022-02-07T18:12:54.000Z | 2022-02-10T10:27:37.000Z | bookitoBackend/User/urls.py | mazdakdev/Bookito | 38e18fee22aafea95429da01e9769acf2748f676 | [
"MIT"
] | null | null | null | from django.urls import path
from .api import *
from knox import views as knox_views
urlpatterns = [
#domain.dn/api/v1/register/ | POST
path('register/' , SignUpAPI.as_view() , name='register'),
#domain.dn/api/v1/register/ | POST
path('login/' , SignInAPI.as_view() , name='login'),
#domain.dn/ap... | 21.833333 | 62 | 0.64631 |
28eb741201cf6a737fdec4c99d5b455233bc44a9 | 3,672 | py | Python | venv1/Lib/site-packages/tensorflow/contrib/learn/python/learn/trainable.py | Soum-Soum/Tensorflow_Face_Finder | fec6c15d2df7012608511ad87f4b55731bf99478 | [
"Apache-2.0",
"MIT"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Lib/site-packages/tensorflow/contrib/learn/python/learn/trainable.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2021-05-20T00:58:04.000Z | 2021-05-20T00:58:04.000Z | Lib/site-packages/tensorflow/contrib/learn/python/learn/trainable.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.000Z | # 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... | 41.258427 | 94 | 0.64842 |
4e435530278028db0a161556288be3f425c611c7 | 15,396 | py | Python | api/python/logs/log_pb2.py | wahello/eve | fffc58c0a504ea26e1ad8b57832e205b8a390231 | [
"Apache-2.0"
] | null | null | null | api/python/logs/log_pb2.py | wahello/eve | fffc58c0a504ea26e1ad8b57832e205b8a390231 | [
"Apache-2.0"
] | null | null | null | api/python/logs/log_pb2.py | wahello/eve | fffc58c0a504ea26e1ad8b57832e205b8a390231 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: logs/log.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protob... | 44.49711 | 1,278 | 0.752793 |
5edbd3e052703fb99c5dd68362c2d79ad0de9060 | 690 | py | Python | CursoemVideo - Python 3/aula 12/ex038.py | GustavoVieiraa/CursoemVideo---Python-3 | eca8eeaa9ca65faec6bb4d3ede3a571a63f2179b | [
"MIT"
] | 1 | 2022-01-31T04:07:43.000Z | 2022-01-31T04:07:43.000Z | CursoemVideo - Python 3/aula 12/ex038.py | GustavoVieiraa/CursoemVideo---Python-3 | eca8eeaa9ca65faec6bb4d3ede3a571a63f2179b | [
"MIT"
] | null | null | null | CursoemVideo - Python 3/aula 12/ex038.py | GustavoVieiraa/CursoemVideo---Python-3 | eca8eeaa9ca65faec6bb4d3ede3a571a63f2179b | [
"MIT"
] | null | null | null | #// Escreva um programa que leia dois números inteiros e compare-os. mostrando na tela uma mensagem:
#// – O primeiro valor é maior
# // – O segundo valor é maior
# // – Não existe valor maior, os dois são iguais
print('============LEITOR DE NÚMEROS============')
n1 = int(input('INFORME PRIMEIRO Nº INTEIRO: '))
... | 38.333333 | 101 | 0.614493 |
0b136bab15acc16abbbe1acdd687908bb6c93cb0 | 523 | py | Python | pages/urls.py | PMurph/DJWiki | 664860d53a22635a928c550371e4857e11f46649 | [
"MIT"
] | null | null | null | pages/urls.py | PMurph/DJWiki | 664860d53a22635a928c550371e4857e11f46649 | [
"MIT"
] | null | null | null | pages/urls.py | PMurph/DJWiki | 664860d53a22635a928c550371e4857e11f46649 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^new/$', views.new, name='new'),
url(r'^create/$', views.create, name='create'),
url(r'^(?P<page_url>[^\s]+)/edit/$', views.edit, name='edit'),
url(r'^(?P<page_url>[^\s]+)/update/$', views.update, name='update'),
url(r'^(?P<... | 43.583333 | 77 | 0.606119 |
1db05abc510a429e24654a8dfe5a4a5ef591db4c | 560 | py | Python | querybuilder/paginator.py | wesokes/django-query-builder | 3cc53d33ee0a4ada515635e4be631167a774b457 | [
"MIT"
] | 110 | 2015-01-28T17:38:38.000Z | 2022-02-17T02:51:55.000Z | querybuilder/paginator.py | wesokes/django-query-builder | 3cc53d33ee0a4ada515635e4be631167a774b457 | [
"MIT"
] | 31 | 2015-02-17T19:57:29.000Z | 2021-08-30T03:44:55.000Z | querybuilder/paginator.py | wesokes/django-query-builder | 3cc53d33ee0a4ada515635e4be631167a774b457 | [
"MIT"
] | 33 | 2015-02-05T22:08:46.000Z | 2021-12-06T08:12:49.000Z | from django.core.paginator import Paginator
class QuerybuilderPaginator(Paginator):
def page(self, number):
"""
Returns a Page object for the given 1-based page number.
querybuilder expects the two numbers to be limit and offset. The limit will always be
the per_page value and the... | 35 | 93 | 0.675 |
f54adfdf0fb5b96dc5ac51f8bf2159ad97bbe7e9 | 587 | py | Python | bitmovin_api_sdk/encoding/encodings/muxings/webm/drm/speke/speke_drm_list_query_params.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/encoding/encodings/muxings/webm/drm/speke/speke_drm_list_query_params.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/encoding/encodings/muxings/webm/drm/speke/speke_drm_list_query_params.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | class SpekeDrmListQueryParams(object):
def __init__(self, offset=None, limit=None):
# type: (string_types, string_types) -> None
super(SpekeDrmListQueryParams, self).__init__()
self.offset = offset
self.limit = limit
@property
def openapi_types(self):
types = {
... | 22.576923 | 55 | 0.553663 |
a76b8b08c6d5b10bc27ee18698ca34ec50d7a51c | 526 | py | Python | src/tools/visum-transformer/fixed_times/src/fixed_times/io/lines.py | railtoolkit/OpenLinTim | 27eba8b6038946ce162e9f7bbc0bd23045029d51 | [
"MIT"
] | null | null | null | src/tools/visum-transformer/fixed_times/src/fixed_times/io/lines.py | railtoolkit/OpenLinTim | 27eba8b6038946ce162e9f7bbc0bd23045029d51 | [
"MIT"
] | null | null | null | src/tools/visum-transformer/fixed_times/src/fixed_times/io/lines.py | railtoolkit/OpenLinTim | 27eba8b6038946ce162e9f7bbc0bd23045029d51 | [
"MIT"
] | null | null | null | from typing import Dict, Tuple
def read_line_names(filename: str) -> Dict[int, Tuple[str, str, str]]:
names = {}
with open(filename) as input_file:
for line in input_file:
line = line.split("#")[0].strip()
if not line:
continue
values = line.split(";... | 32.875 | 103 | 0.519011 |
826907780d728ebc3f282af1b0b754e797ac24a5 | 1,911 | py | Python | pkg_blender/blendtorch/btb/duplex.py | kongdai123/pytorch-blender | 53c74d81d50532a71d06701b35b22c525c571ec1 | [
"MIT"
] | 381 | 2019-07-03T14:15:16.000Z | 2022-03-30T08:58:26.000Z | pkg_blender/blendtorch/btb/duplex.py | kongdai123/pytorch-blender | 53c74d81d50532a71d06701b35b22c525c571ec1 | [
"MIT"
] | 18 | 2020-01-15T17:36:08.000Z | 2021-12-31T08:37:54.000Z | pkg_blender/blendtorch/btb/duplex.py | kongdai123/pytorch-blender | 53c74d81d50532a71d06701b35b22c525c571ec1 | [
"MIT"
] | 34 | 2019-07-09T03:15:02.000Z | 2022-01-13T17:36:20.000Z | import zmq
import time
import os
import sys
from .constants import DEFAULT_TIMEOUTMS
class DuplexChannel:
'''Provides generic bidirectional communication with a single PyTorch instance.'''
def __init__(self, address, btid=None, lingerms=0, timeoutms=DEFAULT_TIMEOUTMS):
self.ctx = zmq.Context()
... | 28.522388 | 86 | 0.577708 |
8348991242af7d3af203ea0ed4c267b7659dcc4a | 139,115 | py | Python | tensorflow/python/distribute/distribute_lib.py | mlbileschi/tensorflow | 8702c47666ffe3940d1171516f5feb47ccc625b1 | [
"Apache-2.0"
] | 3 | 2020-08-11T13:13:52.000Z | 2020-11-09T12:59:16.000Z | tensorflow/python/distribute/distribute_lib.py | mlbileschi/tensorflow | 8702c47666ffe3940d1171516f5feb47ccc625b1 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/distribute/distribute_lib.py | mlbileschi/tensorflow | 8702c47666ffe3940d1171516f5feb47ccc625b1 | [
"Apache-2.0"
] | 1 | 2020-08-11T06:03:55.000Z | 2020-08-11T06:03:55.000Z | # Copyright 2018 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.963249 | 158 | 0.715538 |
adfbabffa37843ce449d012717cd05947bb4499b | 773 | py | Python | Handling OpenCV Trackbar/opencv_handling_opencv_trackbar_example2.py | christophmellauner/opencv-examples | 5f530f057dd62319ad3eb176dea303d4550e929f | [
"MIT"
] | null | null | null | Handling OpenCV Trackbar/opencv_handling_opencv_trackbar_example2.py | christophmellauner/opencv-examples | 5f530f057dd62319ad3eb176dea303d4550e929f | [
"MIT"
] | null | null | null | Handling OpenCV Trackbar/opencv_handling_opencv_trackbar_example2.py | christophmellauner/opencv-examples | 5f530f057dd62319ad3eb176dea303d4550e929f | [
"MIT"
] | 1 | 2021-04-12T17:06:28.000Z | 2021-04-12T17:06:28.000Z | import cv2 as cv
import numpy as np
def nothing(x):
print(x)
# create a black image and its window
cv.namedWindow('image')
cv.createTrackbar('CP', 'image', 10, 400, nothing)
switch = 'COLOR/GRAY'
cv.createTrackbar(switch, 'image', 0, 1, nothing)
while True:
image = cv.imread('../images/lena.jpg')
pos... | 20.342105 | 67 | 0.624838 |
3ee35946e4fbe6cbd0b688528f467e427a9d1ee9 | 399 | py | Python | answers/other/in sap/itertools.product().py | FeiZhan/Algo-Collection | 708c4a38112e0b381864809788b9e44ac5ae4d05 | [
"MIT"
] | 3 | 2015-09-04T21:32:31.000Z | 2020-12-06T00:37:32.000Z | answers/other/in sap/itertools.product().py | FeiZhan/Algo-Collection | 708c4a38112e0b381864809788b9e44ac5ae4d05 | [
"MIT"
] | null | null | null | answers/other/in sap/itertools.product().py | FeiZhan/Algo-Collection | 708c4a38112e0b381864809788b9e44ac5ae4d05 | [
"MIT"
] | null | null | null | #@result Submitted a few seconds ago • Score: 10.00 Status: Accepted Test Case #0: 0.01s Test Case #1: 0s Test Case #2: 0s Test Case #3: 0s Test Case #4: 0.01s Test Case #5: 0s
# Enter your code here. Read input from STDIN. Print output to STDOUT
import itertools
list0 = map(int, raw_input().split())
list1 = map(int,... | 49.875 | 176 | 0.706767 |
40e11b106b59034dd54bc6374ed70e6c03042f79 | 13,097 | py | Python | maximum_traverse_for_BigGAN.py | guanyuelee/DP-LaSE | 55f83dc04a84aa3d855939626ff165569a60d178 | [
"MIT"
] | null | null | null | maximum_traverse_for_BigGAN.py | guanyuelee/DP-LaSE | 55f83dc04a84aa3d855939626ff165569a60d178 | [
"MIT"
] | null | null | null | maximum_traverse_for_BigGAN.py | guanyuelee/DP-LaSE | 55f83dc04a84aa3d855939626ff165569a60d178 | [
"MIT"
] | null | null | null | import os
import pickle as pkl
import argparse
import numpy as np
import math
import torch
import torch.nn as nn
import torch.optim as optim
from derivable_models.derivable_generator import get_derivable_generator
from utils.file_utils import create_transformer_experiments_directory, get_generator_info, prepare_test_z... | 52.179283 | 156 | 0.654654 |
990901c0b8c8a2168fe59882ea2ec2f6663e6a52 | 868 | py | Python | course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/test_clf.py | rakeshdhote/machine-learning-engineering-for-production-public | d42956c94c557261f6e2081a9e37940a68106bd6 | [
"Apache-2.0"
] | 1 | 2022-03-18T20:13:11.000Z | 2022-03-18T20:13:11.000Z | course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/test_clf.py | rakeshdhote/machine-learning-engineering-for-production-public | d42956c94c557261f6e2081a9e37940a68106bd6 | [
"Apache-2.0"
] | null | null | null | course4/week3-ungraded-labs/C4_W3_Lab_4_Github_Actions/app/test_clf.py | rakeshdhote/machine-learning-engineering-for-production-public | d42956c94c557261f6e2081a9e37940a68106bd6 | [
"Apache-2.0"
] | null | null | null | import pickle
from main import clf
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
def test_pipeline_and_scaler():
# Check if clf is an instance of sklearn.pipeline.Pipeline
isPipeline = isinstance(clf, Pipeline)
assert isPipeline
if isPipeline:
# Ch... | 28.933333 | 63 | 0.679724 |
d57ed52f6b736616314ff5d14995d656f5179d06 | 1,651 | py | Python | tests/algorithms/step_update/test_linear_search.py | FGDBTKD/neupy | 1f5e1ae9364e8c7816df79678a4648c689d2a5d1 | [
"MIT"
] | null | null | null | tests/algorithms/step_update/test_linear_search.py | FGDBTKD/neupy | 1f5e1ae9364e8c7816df79678a4648c689d2a5d1 | [
"MIT"
] | null | null | null | tests/algorithms/step_update/test_linear_search.py | FGDBTKD/neupy | 1f5e1ae9364e8c7816df79678a4648c689d2a5d1 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn import datasets, preprocessing
from sklearn.model_selection import train_test_split
from neupy import algorithms, layers
from neupy.estimators import rmsle
from base import BaseTestCase
class LinearSearchTestCase(BaseTestCase):
def test_linear_search(self):
methods = [
... | 31.75 | 69 | 0.578437 |
b7586af8db522d2d2021285fd3be1616cb5662de | 366 | py | Python | makecss.py | Kuree/alarm_view | 89ee8c5f7f8b9eac25d6bb1b7a686d318906044a | [
"MIT"
] | 1 | 2021-07-07T09:05:51.000Z | 2021-07-07T09:05:51.000Z | makecss.py | Kuree/alarm_view | 89ee8c5f7f8b9eac25d6bb1b7a686d318906044a | [
"MIT"
] | null | null | null | makecss.py | Kuree/alarm_view | 89ee8c5f7f8b9eac25d6bb1b7a686d318906044a | [
"MIT"
] | null | null | null | css_string = ""
for i in range(128):
css = ""
for j in range(7):
if ((i & ( 1 << j)) >> j) == 1:
css += "#clock .digits div.d{0:07b} .d{1},\n".format(i, 7 - j)
if len(css) > 0:
css = css[:-2]
css += "{\nopacity:0;\n}\n\n";
css_string += css
with open("static/cl... | 26.142857 | 75 | 0.453552 |
3b9eaa7dfba9627323017e3c3056c84179fbe3a9 | 1,528 | py | Python | mesh_renderer/keras_api/model.py | jjennings955/tf_mesh_renderer | d7407b49af042202c1060402e6f8e04ebb75d967 | [
"Apache-2.0"
] | null | null | null | mesh_renderer/keras_api/model.py | jjennings955/tf_mesh_renderer | d7407b49af042202c1060402e6f8e04ebb75d967 | [
"Apache-2.0"
] | null | null | null | mesh_renderer/keras_api/model.py | jjennings955/tf_mesh_renderer | d7407b49af042202c1060402e6f8e04ebb75d967 | [
"Apache-2.0"
] | null | null | null | #vertices_world_space, faces, normals_world_space,vertex_diffuse_colors,
import keras
from keras import backend as K
import tensorflow as tf
import numpy as np
# x
def broadcast_matmul(A, B):
"Compute A @ B, broadcasting over the first `N-2` ranks"
with tf.variable_scope("broadcast_matmul"):
return tf.r... | 39.179487 | 75 | 0.623037 |
06b7000f7581a9e05435f5868df029d95eba7d1f | 9,228 | py | Python | cloudroast/networking/networks/api/security_groups/test_security_groups_create.py | melissa-kam/cloudroast | 59a3c8b058991d7144fa46e6d97be9bb5bb9deae | [
"Apache-2.0"
] | null | null | null | cloudroast/networking/networks/api/security_groups/test_security_groups_create.py | melissa-kam/cloudroast | 59a3c8b058991d7144fa46e6d97be9bb5bb9deae | [
"Apache-2.0"
] | null | null | null | cloudroast/networking/networks/api/security_groups/test_security_groups_create.py | melissa-kam/cloudroast | 59a3c8b058991d7144fa46e6d97be9bb5bb9deae | [
"Apache-2.0"
] | null | null | null | """
Copyright 2015 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 41.567568 | 78 | 0.654096 |
d6aa927ba5c00542866acb8e170816ac8223137b | 297 | py | Python | samples/ecs/app.py | Spencer-Doak/aws-serverless-centralized-logs | 69be5e5b170a655134aa81b191bda3379d68ba71 | [
"MIT-0"
] | 7 | 2021-06-17T16:51:01.000Z | 2021-12-23T03:43:29.000Z | samples/ecs/app.py | Spencer-Doak/aws-serverless-centralized-logs | 69be5e5b170a655134aa81b191bda3379d68ba71 | [
"MIT-0"
] | null | null | null | samples/ecs/app.py | Spencer-Doak/aws-serverless-centralized-logs | 69be5e5b170a655134aa81b191bda3379d68ba71 | [
"MIT-0"
] | 3 | 2021-06-21T09:15:36.000Z | 2022-02-24T01:16:09.000Z | from flask import Flask
app = Flask(__name__)
app.config.from_object(__name__)
@app.route('/', methods=['GET'])
def hello_world():
print('hello world', flush=True)
return 'Hello World!'
if __name__ == '__main__':
app.debug = True
app.run(host="0.0.0.0", port=80) | 19.8 | 37 | 0.626263 |
8825ae05d71b3b4b76fd3d9b545ebd4593d3082b | 2,109 | py | Python | fibonacci_files/timed_command_class.py | endremborza/fibonacci_langugae_comparison | 7b25723c092f9f01b4cc1bd8e9b17ee0ea8c5465 | [
"MIT"
] | null | null | null | fibonacci_files/timed_command_class.py | endremborza/fibonacci_langugae_comparison | 7b25723c092f9f01b4cc1bd8e9b17ee0ea8c5465 | [
"MIT"
] | null | null | null | fibonacci_files/timed_command_class.py | endremborza/fibonacci_langugae_comparison | 7b25723c092f9f01b4cc1bd8e9b17ee0ea8c5465 | [
"MIT"
] | 1 | 2020-03-10T17:55:20.000Z | 2020-03-10T17:55:20.000Z | import time
import subprocess
from typing import Union
START_TEXT = """
____________________________
#### {}
____________________________
"""
END_TEXT = """
DONE!!! ran in {0:0.3f} seconds
----------------------------
"""
PREPARE_TEXT = """
initially, preparing with:
{}
"""
PREPARE_DONE_TEXT = """
done in ... | 27.38961 | 110 | 0.591275 |
ac2f70605d77d06a745879df62225704e24df74b | 337 | py | Python | openpeerpower/components/transmission/errors.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/components/transmission/errors.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/components/transmission/errors.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Errors for the Transmission component."""
from openpeerpower.exceptions import OpenPeerPowerError
class AuthenticationError(OpenPeerPowerError):
"""Wrong Username or Password."""
class CannotConnect(OpenPeerPowerError):
"""Unable to connect to client."""
class UnknownError(OpenPeerPowerError):
"""U... | 22.466667 | 55 | 0.756677 |
e75bbf25d15f0572c36e7d3126e849816d949233 | 1,997 | py | Python | docs/architecture/api_draft/pilot_manager.py | eirrgang/radical.pilot | ceccd1867dd172935d602ff4c33a5ed4467e0dc8 | [
"MIT"
] | 47 | 2015-03-16T01:08:11.000Z | 2022-02-02T10:36:39.000Z | docs/architecture/api_draft/pilot_manager.py | eirrgang/radical.pilot | ceccd1867dd172935d602ff4c33a5ed4467e0dc8 | [
"MIT"
] | 1,856 | 2015-01-02T09:32:20.000Z | 2022-03-31T21:45:06.000Z | docs/architecture/api_draft/pilot_manager.py | eirrgang/radical.pilot | ceccd1867dd172935d602ff4c33a5ed4467e0dc8 | [
"MIT"
] | 28 | 2015-06-10T18:15:14.000Z | 2021-11-07T04:36:45.000Z |
from attributes import *
from constants import *
# ------------------------------------------------------------------------------
#
class PilotManager (Attributes) :
"""
PilotManager class.
Notes:
- cancel() not needed if PM is not a service, i.e. does not have state.
"""
# -----------... | 25.278481 | 90 | 0.387081 |
798b43b280a0517ee23c719f49a33b5d344809a0 | 38,200 | py | Python | src/signalalign/singleNucleotideProbabilities.py | UCSC-nanopore-cgl/signalAlign | 90041772403fe9f7142abc8a9103a7696e70f445 | [
"MIT"
] | 5 | 2019-08-03T14:43:49.000Z | 2021-12-20T00:39:05.000Z | src/signalalign/singleNucleotideProbabilities.py | UCSC-nanopore-cgl/signalAlign | 90041772403fe9f7142abc8a9103a7696e70f445 | [
"MIT"
] | 8 | 2018-06-13T00:32:34.000Z | 2021-12-20T01:06:13.000Z | src/signalalign/singleNucleotideProbabilities.py | UCSC-nanopore-cgl/signalAlign | 90041772403fe9f7142abc8a9103a7696e70f445 | [
"MIT"
] | 5 | 2017-07-24T20:29:41.000Z | 2020-01-03T17:16:29.000Z | #!/usr/bin/env python3
"""Run signal-to-reference alignments
"""
from __future__ import print_function
import numpy as np
import glob
import shutil
import subprocess
import os
import sys
import pysam
from argparse import ArgumentParser
from random import shuffle
from contextlib import closing
from py3helpers.utils imp... | 45.100354 | 132 | 0.617251 |
10e3b57299c2d38bf48865ec86a38a42665e0fa3 | 8,343 | py | Python | sktime/forecasting/arima.py | Multivin12/sktime | 3731c550a9ee708c5b485aeffbbc72ca0a9062bf | [
"BSD-3-Clause"
] | 1 | 2020-06-15T04:48:14.000Z | 2020-06-15T04:48:14.000Z | sktime/forecasting/arima.py | Multivin12/sktime | 3731c550a9ee708c5b485aeffbbc72ca0a9062bf | [
"BSD-3-Clause"
] | null | null | null | sktime/forecasting/arima.py | Multivin12/sktime | 3731c550a9ee708c5b485aeffbbc72ca0a9062bf | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3 -u
# coding: utf-8
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["Markus Löning"]
__all__ = [
"AutoARIMA"
]
import numpy as np
import pandas as pd
from sktime.forecasting.base._base import DEFAULT_ALPHA
from sktime.forecasting.base._sktime import Base... | 38.625 | 79 | 0.597866 |
2e81d92238307e8914769d6fc48d03befd6af2bf | 8,173 | py | Python | youtube_dl/extractor/youku.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/youku.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/youku.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import base64
from .common import InfoExtractor
from ..utils import ExtractorError
from ..compat import (
compat_urllib_parse,
compat_ord,
compat_urllib_request,
)
class YoukuIE(InfoExtractor):
IE_NAME = 'youku'
IE_DESC = '优酷'
_VALID_U... | 32.177165 | 94 | 0.476936 |
bde8fb1e437940cf171b6b541d4ae2f814381f66 | 8,352 | py | Python | source.py | someblue/DysonSphereProgramCalculator | 8591fb368f454e4031710e553cb5d3b8f0b59f22 | [
"MIT"
] | 32 | 2021-02-07T04:35:52.000Z | 2021-12-14T07:02:27.000Z | old_version_python/source.py | ladeca-d/DysonSphereProgramCalculator | 935e3f15aeba7b10f716bee54d98b36d6fca771c | [
"MIT"
] | null | null | null | old_version_python/source.py | ladeca-d/DysonSphereProgramCalculator | 935e3f15aeba7b10f716bee54d98b36d6fca771c | [
"MIT"
] | 11 | 2021-02-08T11:14:17.000Z | 2021-12-17T10:13:54.000Z | element = [['铁矿', '铜矿', '硅矿', '钛矿', '石矿', '煤矿', '原油', '', '', '', '水', '临界光子'],
['铁块', '铜块', '高纯硅块', '钛块', '石材', '高能石墨', '精炼油', '塑料', '石墨烯', '', '', ''],
['磁铁', '磁线圈', '晶格硅', '钛合金', '玻璃', '金刚石', '氢', '有机晶体', '可燃冰', '液氢燃料棒', '氘核燃料棒', '反物质燃料棒'],
['钢材', '电动机', '', '钛化玻璃', '棱镜', '', '', '',... | 46.143646 | 117 | 0.454143 |
df42970f1143b2615d6a04dd1b01c5e8fa656130 | 1,845 | py | Python | leetcode/102_binary_tree_level_order_traversal.py | coocos/leetcode | 007bbeb46fa4b32e1c92fc894edeb2100eb6ba21 | [
"MIT"
] | null | null | null | leetcode/102_binary_tree_level_order_traversal.py | coocos/leetcode | 007bbeb46fa4b32e1c92fc894edeb2100eb6ba21 | [
"MIT"
] | null | null | null | leetcode/102_binary_tree_level_order_traversal.py | coocos/leetcode | 007bbeb46fa4b32e1c92fc894edeb2100eb6ba21 | [
"MIT"
] | null | null | null | import unittest
import collections
from typing import List, Deque, Tuple
from leetcode.common import TreeNode
class Solution:
"""
This iterative solution keeps a queue of unvisited nodes and their depth
to implement the level order traversal.
The algorithm starts by queueing the root and its level, i... | 31.810345 | 79 | 0.630352 |
64b40d67a5451b71dc78456e6c49f54df3af3a07 | 2,209 | py | Python | src/data/process_common.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | 2 | 2020-08-18T18:43:09.000Z | 2020-08-18T20:05:59.000Z | src/data/process_common.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | null | null | null | src/data/process_common.py | PhilHarnish/forge | 663f19d759b94d84935c14915922070635a4af65 | [
"MIT"
] | null | null | null | import itertools
from typing import Iterable, List, Optional, Tuple
from data import iter_util
VOWELS = frozenset('aeiouyAEIOUY')
SPECIAL = frozenset('a') # "a" is a reasonable short word.
ALPHABET = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\'-'
WHITELIST = [chr(code) in ALPHABET for code in range(128)]
... | 28.688312 | 74 | 0.640109 |
ecb1aa39c5c3513b01cfe9ababd323ba09a836cd | 1,370 | py | Python | resource/process_barcodeerror.py | chungongyu/LRTK-SIM | 77c78e3edc25dc157cdf554cdf16a121c1d92848 | [
"MIT"
] | 2 | 2019-10-10T04:56:14.000Z | 2021-01-21T02:01:34.000Z | resource/process_barcodeerror.py | chungongyu/LRTK-SIM | 77c78e3edc25dc157cdf554cdf16a121c1d92848 | [
"MIT"
] | null | null | null | resource/process_barcodeerror.py | chungongyu/LRTK-SIM | 77c78e3edc25dc157cdf554cdf16a121c1d92848 | [
"MIT"
] | 2 | 2018-03-08T05:23:09.000Z | 2020-07-27T04:11:05.000Z | #This script is used to analyze the sequencing error profile
if __name__=="__main__":
f=open('error_profile_reads.txt',"r") # Opens file for reading
output = open('error_profile_reads_processed.txt', 'w')
i=0
for line in f:
if i==0:
i=i+1
output.write(line)
co... | 32.619048 | 66 | 0.445255 |
f208221dd0ddb070389012aa65a306cb5691d310 | 5,942 | py | Python | logstash/formatter.py | MWedl/python-logstash | d318f3c3a91576a6d86522506aad5e04c479ee60 | [
"MIT"
] | 1 | 2019-06-27T19:39:15.000Z | 2019-06-27T19:39:15.000Z | logstash/formatter.py | MWedl/python-logstash | d318f3c3a91576a6d86522506aad5e04c479ee60 | [
"MIT"
] | null | null | null | logstash/formatter.py | MWedl/python-logstash | d318f3c3a91576a6d86522506aad5e04c479ee60 | [
"MIT"
] | 1 | 2019-07-03T14:36:09.000Z | 2019-07-03T14:36:09.000Z | import traceback
import logging
import socket
import sys
from datetime import datetime
try:
import json
except ImportError:
import simplejson as json
class LogstashFormatterBase(logging.Formatter):
limit_stacktrace = 0
def __init__(self, message_type='Logstash', tags=None, fqdn=False, limit_stacktra... | 36.453988 | 134 | 0.567654 |
d2f092ce7117e3a43fda659e51b1e0c0d3cfb3aa | 3,696 | py | Python | azure-mgmt-logic/azure/mgmt/logic/models/workflow_version.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure/mgmt/logic/models/workflow_version.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure/mgmt/logic/models/workflow_version.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 40.173913 | 131 | 0.612284 |
77449bcf566ff15f59d9c4a4e4b445b927e92859 | 4,860 | py | Python | kivy_ios/recipes/zbarlight/__init__.py | psychowasp/kivy-ios | b4658eb9e9c5ab792cb4d3229286c5d4fd2ad361 | [
"MIT"
] | 1 | 2020-08-26T20:31:56.000Z | 2020-08-26T20:31:56.000Z | kivy_ios/recipes/zbarlight/__init__.py | psychowasp/kivy-ios | b4658eb9e9c5ab792cb4d3229286c5d4fd2ad361 | [
"MIT"
] | null | null | null | kivy_ios/recipes/zbarlight/__init__.py | psychowasp/kivy-ios | b4658eb9e9c5ab792cb4d3229286c5d4fd2ad361 | [
"MIT"
] | null | null | null | import os
from kivy_ios.toolchain import Recipe
from os.path import join
import sh
import fnmatch
from distutils.dir_util import copy_tree
class ZbarLightRecipe(Recipe):
version = '1.2'
url = 'https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz'
library = "zbarlight.a"
<<<<<<< HEAD:kivy_ios/r... | 45.420561 | 106 | 0.62037 |
aaa40c3a9255a16d7bf073a344c48601955ece80 | 551 | py | Python | src/flor-0.0.0-alpha/examples/parallelPlateFork.py | ucbrise/flor-camp2018 | a0b48bb2c058fb07dca1f6ac7ce2e34941146282 | [
"Apache-2.0"
] | 1 | 2019-04-24T05:02:06.000Z | 2019-04-24T05:02:06.000Z | src/flor-0.0.0-alpha/examples/parallelPlateFork.py | ucbrise/flor-camp2018 | a0b48bb2c058fb07dca1f6ac7ce2e34941146282 | [
"Apache-2.0"
] | null | null | null | src/flor-0.0.0-alpha/examples/parallelPlateFork.py | ucbrise/flor-camp2018 | a0b48bb2c058fb07dca1f6ac7ce2e34941146282 | [
"Apache-2.0"
] | 2 | 2019-08-09T20:31:00.000Z | 2021-08-04T02:34:26.000Z | import flor
ex = flor.Experiment('plate_demo')
ex.groundClient('git')
#your commit hash experience may vary
temp = flor.fork('plate_demo', '2d277bf689c6e20e5eb18886903bad543f0f3cae', ex.xp_state, "../../../temp")
# ones = ex.literal([1, 2], "ones")
# ones.forEach()
# tens = ex.literal([10, 100], "tens")
# tens.for... | 20.407407 | 104 | 0.655172 |
a29b7be30508222f8357024209b02415ef0499c0 | 16,137 | py | Python | l2explorer/l2explorer_env.py | lifelong-learning-systems/l2explorer | a82e5296210f967ea5727aff932dbd4a06b9ce50 | [
"MIT"
] | 1 | 2022-03-23T17:16:39.000Z | 2022-03-23T17:16:39.000Z | l2explorer/l2explorer_env.py | lifelong-learning-systems/l2explorer | a82e5296210f967ea5727aff932dbd4a06b9ce50 | [
"MIT"
] | null | null | null | l2explorer/l2explorer_env.py | lifelong-learning-systems/l2explorer | a82e5296210f967ea5727aff932dbd4a06b9ce50 | [
"MIT"
] | null | null | null | """
Copyright © 2021 The Johns Hopkins University Applied Physics Laboratory LLC
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,... | 44.454545 | 178 | 0.627688 |
7dc82d6fdfd97df50f159a06e8e9d2858482fa9d | 5,867 | py | Python | venv/Lib/site-packages/pandas/tests/util/test_assert_produces_warning.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/util/test_assert_produces_warning.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/util/test_assert_produces_warning.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | """"
Test module for testing ``pandas._testing.assert_produces_warning``.
"""
import warnings
import pytest
from pandas.errors import (
DtypeWarning,
PerformanceWarning,
)
import pandas._testing as tm
@pytest.fixture(
params=[
RuntimeWarning,
ResourceWarning,
... | 33.525714 | 87 | 0.672575 |
2336c190d9fa799148be3866fd4ce721fb28011f | 38,085 | py | Python | examples/speech_recognition/models/vggtransformer.py | yassirf/sequence-training | a7cd7a9bb2f4f1d76c4f62a62704e396ad029540 | [
"MIT"
] | null | null | null | examples/speech_recognition/models/vggtransformer.py | yassirf/sequence-training | a7cd7a9bb2f4f1d76c4f62a62704e396ad029540 | [
"MIT"
] | null | null | null | examples/speech_recognition/models/vggtransformer.py | yassirf/sequence-training | a7cd7a9bb2f4f1d76c4f62a62704e396ad029540 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import math
from collections.abc import Iterable
import torch
import torch.nn as nn
from examples.speech_recognition.data.dat... | 36.549904 | 88 | 0.605278 |
985f33f409ba196632fbf6953fc32a972282a546 | 523 | py | Python | init.py | aejester/Portfolio | 0006288b9fd1791d7033f728f9a6aeacf3557280 | [
"MIT"
] | null | null | null | init.py | aejester/Portfolio | 0006288b9fd1791d7033f728f9a6aeacf3557280 | [
"MIT"
] | null | null | null | init.py | aejester/Portfolio | 0006288b9fd1791d7033f728f9a6aeacf3557280 | [
"MIT"
] | null | null | null | import datetime
import time
def init():
amount = input("How many homework problems are there?\n>")
amount = int(amount)
for i in range(0, amount):
date = str(datetime.datetime.today()).split(" ")[0]
month = date.split("-")[1]
day = date.split("-")[2]
file = open("./homework/homework/homework"+month+""... | 14.527778 | 85 | 0.583174 |
3bed06cd3bf69c2270cca7719c1166e69eae5f8f | 1,468 | py | Python | fabrik/ext/virtualenv.py | Frojd/Fabrik | 9f2edbba97a7fd236b72a9b3010f6e912ab5c001 | [
"MIT"
] | 12 | 2015-11-03T20:41:29.000Z | 2019-02-15T17:13:27.000Z | fabrik/ext/virtualenv.py | Frojd/Fabrik | 9f2edbba97a7fd236b72a9b3010f6e912ab5c001 | [
"MIT"
] | 35 | 2015-08-23T17:10:00.000Z | 2017-05-10T12:08:57.000Z | fabrik/ext/virtualenv.py | Frojd/Fabrik | 9f2edbba97a7fd236b72a9b3010f6e912ab5c001 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
fabrik.ext.virtualenv
---------------------------
Holds methods for managing virtualenv.
"""
import os
from unipath import Path
from fabric.decorators import task
from fabric.operations import prompt
from fabric.state import env
from fabrik import paths
from ..logger import logger
@task... | 23.301587 | 74 | 0.657357 |
5fd7509d782faf03c8cfd793a16d2c33e0fac186 | 5,181 | py | Python | hcipy/hci.py | TheBubbleworks/python-hcipy | db210db2bb7b3ffdf44e0c47a1d71bedb748bcf9 | [
"MIT"
] | 16 | 2017-07-29T11:07:42.000Z | 2022-02-25T09:12:24.000Z | hcipy/hci.py | TheBubbleworks/python-hcipy | db210db2bb7b3ffdf44e0c47a1d71bedb748bcf9 | [
"MIT"
] | 3 | 2018-02-03T12:02:33.000Z | 2018-02-12T13:12:31.000Z | hcipy/hci.py | TheBubbleworks/python-hcipy | db210db2bb7b3ffdf44e0c47a1d71bedb748bcf9 | [
"MIT"
] | 8 | 2017-10-06T09:25:08.000Z | 2021-03-29T13:15:21.000Z | #!/usr/bin/python
# Bluetooth HCI Python library (Experimental)
#
# Pure Python and standard library based module for interacting with the Bluetooth HCI.
# There is no dependency on the PyBluez Python/Native libraries, bluetoothd service or D-Bus.
# This can be considered to be a Pythonisation of the NodeJS NoBLE/ B... | 30.839286 | 114 | 0.631924 |
b6aa3ef24631b9e0624b3cb966f8c1a15226097d | 8,193 | py | Python | pyrevolve/spec/msgs/body_pb2.py | BvDod/revolve | a8f181495d3ba7664b34f6f6bbfb4a611aebde33 | [
"Apache-1.1"
] | 24 | 2017-06-19T20:25:15.000Z | 2022-01-03T16:27:34.000Z | pyrevolve/spec/msgs/body_pb2.py | Ravi-Bossema/revolve | 46ece6f7dc137afcc0ddcde163ffcfe9548bd1ad | [
"Apache-1.1"
] | 51 | 2016-04-19T16:01:34.000Z | 2021-09-17T19:07:10.000Z | pyrevolve/spec/msgs/body_pb2.py | Ravi-Bossema/revolve | 46ece6f7dc137afcc0ddcde163ffcfe9548bd1ad | [
"Apache-1.1"
] | 37 | 2017-02-21T23:20:44.000Z | 2022-01-18T16:40:17.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: body.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflecti... | 37.75576 | 697 | 0.73636 |
5290a6078bafc136c9185314dc16c0a1e1bb4764 | 5,826 | py | Python | rest_framework/metadata.py | h0rn3t/django-rest-framework | 8c00a9262f434a0528a28f9e26ec3220ae70b584 | [
"BSD-3-Clause"
] | null | null | null | rest_framework/metadata.py | h0rn3t/django-rest-framework | 8c00a9262f434a0528a28f9e26ec3220ae70b584 | [
"BSD-3-Clause"
] | null | null | null | rest_framework/metadata.py | h0rn3t/django-rest-framework | 8c00a9262f434a0528a28f9e26ec3220ae70b584 | [
"BSD-3-Clause"
] | null | null | null | """
The metadata API is used to allow customization of how `OPTIONS` requests
are handled. We currently provide a single default implementation that returns
some fairly ad-hoc information about the view.
Future implementations might use JSON schema or other definitions in order
to return this information in a more sta... | 38.328947 | 95 | 0.620151 |
e19e3bddd77e004ff5e0974353a29a99813e7dfe | 646 | py | Python | examples/simpleio_map_range_simpletest.py | askpatrickw/Adafruit_CircuitPython_SimpleIO | c03fdd6d013247715ef42a8391977f674c51cc7a | [
"MIT"
] | null | null | null | examples/simpleio_map_range_simpletest.py | askpatrickw/Adafruit_CircuitPython_SimpleIO | c03fdd6d013247715ef42a8391977f674c51cc7a | [
"MIT"
] | null | null | null | examples/simpleio_map_range_simpletest.py | askpatrickw/Adafruit_CircuitPython_SimpleIO | c03fdd6d013247715ef42a8391977f674c51cc7a | [
"MIT"
] | null | null | null | """
'map_range_demo.py'.
=================================================
maps a number from one range to another
"""
import time
import simpleio
while True:
sensor_value = 150
# Map the sensor's range from 0<=sensor_value<=255 to 0<=sensor_value<=1023
print("original sensor value: ", sensor_value)
... | 28.086957 | 79 | 0.647059 |
dd5734fa99c5870b6d3355880bb4df66e47899a7 | 3,472 | py | Python | adapter/server.py | soxoj/maigret-adapter | 146593aea09cad417282e038c82ef7d4d33ff19b | [
"MIT"
] | 8 | 2021-08-07T13:54:48.000Z | 2022-02-26T09:30:46.000Z | adapter/server.py | soxoj/maigret-adapter | 146593aea09cad417282e038c82ef7d4d33ff19b | [
"MIT"
] | null | null | null | adapter/server.py | soxoj/maigret-adapter | 146593aea09cad417282e038c82ef7d4d33ff19b | [
"MIT"
] | 4 | 2021-08-07T13:54:49.000Z | 2022-02-08T22:26:02.000Z | import sys
from typing import List
from aiohttp import web
from aiohttp.web import HTTPNotFound
__version__ = "0.0.1"
class MaigretAdapterServer:
"""
HTTP server with maigret-compatible interface
"""
def __init__(self, addr):
self.addr = addr
self.services = {}
def make_ans... | 26.707692 | 81 | 0.539171 |
19ac602013b02d30f723b772c0251778406a4c7e | 8,614 | py | Python | benchmarks/isic/isic.py | paaatcha/my-thesis | e72644e0d7c8a4b6f75cf7e462d32001cbf2c75d | [
"MIT"
] | 5 | 2020-11-12T20:11:09.000Z | 2021-03-01T12:44:05.000Z | benchmarks/isic/isic.py | paaatcha/my-thesis | e72644e0d7c8a4b6f75cf7e462d32001cbf2c75d | [
"MIT"
] | null | null | null | benchmarks/isic/isic.py | paaatcha/my-thesis | e72644e0d7c8a4b6f75cf7e462d32001cbf2c75d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Autor: André Pacheco
Email: pacheco.comp@gmail.com
"""
import sys
sys.path.insert(0,'../../') # including the path to deep-tasks folder
sys.path.insert(0,'../../my_models') # including the path to my_models folder
from constants import RAUG_PATH
sys.path.insert(0,RAUG_PATH)
from raug.loade... | 46.562162 | 123 | 0.624565 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.