hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d5304cc79bc58070de5359853e21e2a57ec1fd34 | 1,462 | py | Python | ancillary/TbDialog.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | ancillary/TbDialog.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | ancillary/TbDialog.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | """Modeless dialog displaying exception and traceback."""
import string
import tk_tools
import traceback
from tkinter import *
class TracebackDialog:
def __init__(self, master, exc, val, tb):
self.master = master
self.exc = exc
self.val = val
self.tb = tb
self.root = tk_... | 34 | 80 | 0.580027 |
d5305e04c5e0e8c6b20773612aa9800685082d23 | 545 | py | Python | manage.py | WangDaLei/Nicholas | c073f862df4688b7e04968e10cd58014f3509a60 | [
"MIT"
] | null | null | null | manage.py | WangDaLei/Nicholas | c073f862df4688b7e04968e10cd58014f3509a60 | [
"MIT"
] | 4 | 2020-02-11T23:22:08.000Z | 2022-03-02T14:56:03.000Z | manage.py | WangDaLei/Nicholas | c073f862df4688b7e04968e10cd58014f3509a60 | [
"MIT"
] | 1 | 2021-02-26T11:23:33.000Z | 2021-02-26T11:23:33.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "stock_project.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django... | 34.0625 | 77 | 0.689908 |
d530740d101e45fe19ae483ad59c2d76ede041da | 441 | py | Python | init/modules/simple_auth.py | davidhampgonsalves/mix-tree | f9907d30ed13340ffb31239176b4de0bbba86f6a | [
"MIT"
] | null | null | null | init/modules/simple_auth.py | davidhampgonsalves/mix-tree | f9907d30ed13340ffb31239176b4de0bbba86f6a | [
"MIT"
] | null | null | null | init/modules/simple_auth.py | davidhampgonsalves/mix-tree | f9907d30ed13340ffb31239176b4de0bbba86f6a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf8
from gluon.html import *
from gluon.http import *
from gluon.validators import *
from gluon.sqlhtml import *
class Auth:
@staticmethod
def isLoggedIn(session):
if session.logged_in:
if session.user and session.user.is_logged_in():
retur... | 21 | 60 | 0.634921 |
d530965690e0c3ccbc7150cc8e0533ddad9a07c4 | 1,705 | py | Python | tl/cli/combine-linearly.py | mtang724/table-linker | 67201fa3c35df244750892155239cafe4085e15a | [
"MIT"
] | null | null | null | tl/cli/combine-linearly.py | mtang724/table-linker | 67201fa3c35df244750892155239cafe4085e15a | [
"MIT"
] | null | null | null | tl/cli/combine-linearly.py | mtang724/table-linker | 67201fa3c35df244750892155239cafe4085e15a | [
"MIT"
] | null | null | null | import sys
import argparse
import traceback
import tl.exceptions
def parser():
return {
'help': 'linearly combines two or more score-columns for candidate knowledge graph objects '
'for each input cell value'
}
def add_arguments(parser):
"""
Parse Arguments
Args:
... | 36.276596 | 120 | 0.609384 |
d530a3c44bad20e75d04c82a0c25bd17043a9509 | 1,509 | py | Python | routes/common.py | pcworld/odie-server | 748e06470fe1573a67fbb4590fa30554efa115b1 | [
"MIT"
] | 9 | 2015-06-04T17:13:45.000Z | 2021-11-09T21:26:39.000Z | routes/common.py | pcworld/odie-server | 748e06470fe1573a67fbb4590fa30554efa115b1 | [
"MIT"
] | 49 | 2015-02-15T14:42:42.000Z | 2020-08-19T11:42:55.000Z | routes/common.py | pcworld/odie-server | 748e06470fe1573a67fbb4590fa30554efa115b1 | [
"MIT"
] | 8 | 2015-06-04T20:46:18.000Z | 2020-08-18T15:38:06.000Z | #! /usr/bin/env python3
import config
from login import get_user
from functools import partial
from marshmallow import fields, Schema
from marshmallow.utils import missing
from marshmallow.validate import OneOf
class IdSchema(Schema):
id = fields.Int(required=True)
class DocumentDumpSchema(IdSchema):
dep... | 32.804348 | 165 | 0.728297 |
d530acfac2540771bd70bc56700667c1494fcef3 | 1,273 | py | Python | examples/one/ephys/plot_raster_drift.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 38 | 2018-08-07T21:55:29.000Z | 2022-03-21T14:49:03.000Z | examples/one/ephys/plot_raster_drift.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 207 | 2018-07-25T15:10:48.000Z | 2022-03-08T13:23:08.000Z | examples/one/ephys/plot_raster_drift.py | int-brain-lab/ibllib | 93be6b98848758e05cdc9398caaf19e6a68f7386 | [
"MIT"
] | 35 | 2018-09-04T14:49:56.000Z | 2022-01-06T21:17:51.000Z | """
Compute drift for example sessions using:
https://github.com/int-brain-lab/ibllib/blob/master/brainbox/metrics/electrode_drift.py
and display raster plot below
"""
# Authors: Gaelle, Olivier
from brainbox.metrics.electrode_drift import estimate_drift
from one.api import ONE
import brainbox.plot as bbplot
import ma... | 28.288889 | 87 | 0.710134 |
d530bae91df488b6576b3d7831cb74fee979eef6 | 584 | py | Python | Modulo 3/ecuacion segundo grado.py | antonio343/clase | fda04a606246695aa5d93c8b2b5e2890a16d5973 | [
"MIT"
] | null | null | null | Modulo 3/ecuacion segundo grado.py | antonio343/clase | fda04a606246695aa5d93c8b2b5e2890a16d5973 | [
"MIT"
] | null | null | null | Modulo 3/ecuacion segundo grado.py | antonio343/clase | fda04a606246695aa5d93c8b2b5e2890a16d5973 | [
"MIT"
] | null | null | null | calculo =-1
while calculo <0:
xstr = input("Dame el parametro A de la ecuacion")
if (xstr.isdigit()):
a=int(xstr)
xstr = input("Dame el parametro B de la ecuacion")
if (xstr.isdigit()):
b=int(xstr)
xstr = input("Dame el parametro C de la ecuacion")
if ... | 34.352941 | 62 | 0.513699 |
d530fc69cba199f79f7f3bedfd5e15b9459d1376 | 3,887 | py | Python | pissuu/api.py | hyperoslo/pissuu | 7c0f771c371d1843a17eac4c4d3c8f76ba72ec99 | [
"MIT"
] | 1 | 2021-03-02T18:49:12.000Z | 2021-03-02T18:49:12.000Z | pissuu/api.py | hyperoslo/pissuu | 7c0f771c371d1843a17eac4c4d3c8f76ba72ec99 | [
"MIT"
] | null | null | null | pissuu/api.py | hyperoslo/pissuu | 7c0f771c371d1843a17eac4c4d3c8f76ba72ec99 | [
"MIT"
] | 3 | 2015-09-06T07:25:16.000Z | 2016-11-18T18:38:08.000Z | import requests
import md5
import json
class IssuuAPI(object):
def __init__(self, key, secret):
"""
Initialize an API client with the given ``key`` and ``secret``.
"""
self.key = key
self.secret = secret
def add_bookmark(self):
"""
Add a bookmark.
... | 22.33908 | 95 | 0.485207 |
d53104a39eff0479bd9b77442884e93c97c106ee | 57,292 | py | Python | sdk/storage/azure-storage-blob/azure/storage/blob/_models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/storage/azure-storage-blob/azure/storage/blob/_models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-blob/azure/storage/blob/_models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# pylint: ... | 43.044328 | 124 | 0.683603 |
d53134dc9b7c5fdf438a8eb8320510e4e31e9666 | 600 | py | Python | py2/mutate.py | KavrakiLab/APE-Gen | abf20392ef92648510e8dc9f3364dd2745d2773f | [
"BSD-3-Clause"
] | null | null | null | py2/mutate.py | KavrakiLab/APE-Gen | abf20392ef92648510e8dc9f3364dd2745d2773f | [
"BSD-3-Clause"
] | 4 | 2020-09-17T00:19:40.000Z | 2021-04-25T12:53:45.000Z | py2/mutate.py | KavrakiLab/APE-Gen | abf20392ef92648510e8dc9f3364dd2745d2773f | [
"BSD-3-Clause"
] | 4 | 2020-01-04T17:06:57.000Z | 2022-01-26T12:56:04.000Z | # pymol -qc mutate.py pdb selection new_residue
# example: pymol -qc mutate.py 0.pdb C/1/ ALA 0_mutated.pdb
# run for all the confs in the ensemble
# append all to one using mdconvert
from pymol import cmd
import sys
pdb, selection, mutant, output_name = sys.argv[-4:]
print "file:", pdb
print "selection:", selection... | 23.076923 | 59 | 0.745 |
d5313a78b709fa5a5c28946c019029fcdaea60b4 | 3,247 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/message_media_document.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/message_media_document.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/message_media_document.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 36.483146 | 110 | 0.631044 |
d531be7413d0544ac4afc1321f904d1f0801cf95 | 7,344 | py | Python | virtual/lib/python3.8/site-packages/connexion/resolver.py | dan-mutua/flaskwk3 | f7ee5a27d52005bedd757d6008102b9f82508521 | [
"MIT"
] | null | null | null | virtual/lib/python3.8/site-packages/connexion/resolver.py | dan-mutua/flaskwk3 | f7ee5a27d52005bedd757d6008102b9f82508521 | [
"MIT"
] | null | null | null | virtual/lib/python3.8/site-packages/connexion/resolver.py | dan-mutua/flaskwk3 | f7ee5a27d52005bedd757d6008102b9f82508521 | [
"MIT"
] | null | null | null | """
This module contains resolvers, functions that resolves the user defined view functions
from the operations defined in the OpenAPI spec.
"""
import logging
import sys
import connexion.utils as utils
from connexion.exceptions import ResolverError
logger = logging.getLogger('connexion.resolver')
class Resolution... | 34.317757 | 98 | 0.631264 |
d531d91073ecffcebd0863a9d039bd47b386a8a2 | 2,955 | py | Python | betfund_event_broker/flows/upcoming_events.py | betfund/betfund-event-broker | 524aec73d9cf66cbeeb0fab67e6816b836c1d98e | [
"MIT"
] | 1 | 2020-09-23T02:36:35.000Z | 2020-09-23T02:36:35.000Z | betfund_event_broker/flows/upcoming_events.py | betfund/betfund-event-broker | 524aec73d9cf66cbeeb0fab67e6816b836c1d98e | [
"MIT"
] | 5 | 2020-04-13T23:55:07.000Z | 2020-06-04T15:09:12.000Z | betfund_event_broker/flows/upcoming_events.py | betfund/betfund-event-broker | 524aec73d9cf66cbeeb0fab67e6816b836c1d98e | [
"MIT"
] | null | null | null | """Prefect Flow For Upcoming Events ETL."""
import os
from datetime import timedelta
from prefect import Flow, Parameter
from prefect.schedules import Schedule
from prefect.schedules.clocks import IntervalClock
from betfund_event_broker.flows.base_flow import EventBrokerFlow
from betfund_event_broker.tasks.bet365 imp... | 31.43617 | 74 | 0.596277 |
d531f57ec40935ad977db2dd63bfde84032e15f6 | 4,742 | py | Python | python/cuXfilter/charts/core/aggregate/core_datasize_indicator.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | 2 | 2019-03-06T02:10:05.000Z | 2020-05-06T06:33:02.000Z | python/cuXfilter/charts/core/aggregate/core_datasize_indicator.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | null | null | null | python/cuXfilter/charts/core/aggregate/core_datasize_indicator.py | AjayThorve/cuxfilter | 537ff67de80439a43e0bad7373558f5e25dcb112 | [
"Apache-2.0"
] | null | null | null | from typing import Type, Dict
import numpy as np, panel as pn
from .core_aggregate import BaseAggregateChart
from ....assets.numba_kernels import calc_value_counts, calc_groupby
from ....datatile import DataTile
from ....layouts import chart_view
class BaseDataSizeIndicator(BaseAggregateChart):
chart_type: str = ... | 31.613333 | 135 | 0.529102 |
d53215a955978c6f6d3d792c80b107e6fb5202c5 | 90 | py | Python | autorop/call/__init__.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/call/__init__.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/call/__init__.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | from autorop.call.custom import custom
from autorop.call.system_binsh import system_binsh
| 30 | 50 | 0.866667 |
d5323db29bba32be1b9e09587488291dd28dfa49 | 2,856 | py | Python | doc/scripts/build_calib_images_rst.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 107 | 2018-08-06T07:07:20.000Z | 2022-02-28T14:33:42.000Z | doc/scripts/build_calib_images_rst.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 889 | 2018-07-26T12:14:33.000Z | 2022-03-18T22:49:42.000Z | doc/scripts/build_calib_images_rst.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 74 | 2018-09-25T17:03:07.000Z | 2022-03-10T23:59:24.000Z | """
Dynamically build the rst documentation for the Calibration Images
"""
import os
import time
import numpy
from pkg_resources import resource_filename
from pypeit.utils import to_string, string_table
from pypeit.images import buildimage
from pypeit.flatfield import FlatImages
from pypeit.wavetilts import WaveTilts... | 31.043478 | 98 | 0.609594 |
d5323e69a018c459a02e435f748e5036246ebc4e | 10,170 | py | Python | cibuildwheel/__main__.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 371 | 2021-05-19T18:48:06.000Z | 2022-03-31T11:31:41.000Z | cibuildwheel/__main__.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 234 | 2021-05-19T19:25:42.000Z | 2022-03-29T19:03:00.000Z | cibuildwheel/__main__.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 56 | 2021-05-25T19:59:54.000Z | 2022-03-26T13:49:14.000Z | import argparse
import os
import shutil
import sys
import textwrap
from pathlib import Path
from tempfile import mkdtemp
from typing import List, Set, Union
import cibuildwheel
import cibuildwheel.linux
import cibuildwheel.macos
import cibuildwheel.util
import cibuildwheel.windows
from cibuildwheel.architecture import... | 34.358108 | 154 | 0.623107 |
d53288cfa42474eee4f89b227fe50fdbd1cc7595 | 4,996 | py | Python | sphinxcontrib/confluencebuilder/exceptions.py | TheDubliner/confluencebuilder | f92d63ae9949c52cf8639643073aacb249cacd62 | [
"BSD-2-Clause"
] | null | null | null | sphinxcontrib/confluencebuilder/exceptions.py | TheDubliner/confluencebuilder | f92d63ae9949c52cf8639643073aacb249cacd62 | [
"BSD-2-Clause"
] | null | null | null | sphinxcontrib/confluencebuilder/exceptions.py | TheDubliner/confluencebuilder | f92d63ae9949c52cf8639643073aacb249cacd62 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2017-2020 by the contributors (see AUTHORS file).
:license: BSD-2-Clause, see LICENSE for details.
"""
from sphinx.errors import ConfigError
from sphinx.errors import SphinxError
class ConfluenceError(SphinxError):
category = 'sphinxcontrib.confluencebuild... | 35.942446 | 80 | 0.529824 |
d532a195a72f7a7012039c2006d5816375acd0e5 | 2,349 | py | Python | networking_ovn/tests/functional/db/test_migrations.py | numansiddique/networking-ovn | 9357ddcb6c427486e6a1b3f012f87b9c4fab43a2 | [
"Apache-2.0"
] | null | null | null | networking_ovn/tests/functional/db/test_migrations.py | numansiddique/networking-ovn | 9357ddcb6c427486e6a1b3f012f87b9c4fab43a2 | [
"Apache-2.0"
] | null | null | null | networking_ovn/tests/functional/db/test_migrations.py | numansiddique/networking-ovn | 9357ddcb6c427486e6a1b3f012f87b9c4fab43a2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Red Hat, Inc.
# 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... | 36.138462 | 78 | 0.681567 |
d532a3b4f9a8dce8ee93389d13e83bd14d2b0cf7 | 27,422 | py | Python | git/test/test_index.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | 1 | 2020-10-15T06:16:48.000Z | 2020-10-15T06:16:48.000Z | git/test/test_index.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | null | null | null | git/test/test_index.py | yarikoptic/GitPython | 7576b282013249a2b20ccda4acacefd5e625ea39 | [
"BSD-3-Clause"
] | null | null | null | # test_index.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from git.test.lib import *
from git import *
import inspect
import os
import sys
import tempfile
... | 40.928358 | 140 | 0.611808 |
d532a932674b53e8fdf736ca01996ed5967a1d36 | 7,868 | py | Python | tests/dopamine/utils/threading_utils_test.py | arthurarg/dopamine | e8e31e0518de3621c81b9c8c3eb7ce3478267b65 | [
"Apache-2.0"
] | null | null | null | tests/dopamine/utils/threading_utils_test.py | arthurarg/dopamine | e8e31e0518de3621c81b9c8c3eb7ce3478267b65 | [
"Apache-2.0"
] | 15 | 2019-02-09T22:46:09.000Z | 2019-05-09T23:47:45.000Z | tests/dopamine/utils/threading_utils_test.py | wes-turner/dopamine | e8e31e0518de3621c81b9c8c3eb7ce3478267b65 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 39.144279 | 80 | 0.717844 |
d532c99d8829d1c4ef613c29429ea17bfb8e1110 | 1,009 | py | Python | localz.py | Yevhenii-Yatchenko/telegram-forwarder | b64b6c372723bc18b97136e7203ad0b1a305e8d0 | [
"Apache-2.0"
] | null | null | null | localz.py | Yevhenii-Yatchenko/telegram-forwarder | b64b6c372723bc18b97136e7203ad0b1a305e8d0 | [
"Apache-2.0"
] | null | null | null | localz.py | Yevhenii-Yatchenko/telegram-forwarder | b64b6c372723bc18b97136e7203ad0b1a305e8d0 | [
"Apache-2.0"
] | null | null | null | ADD_SENDER_COMMAND = '/Отчёт_Титан_Отослать'
ADD_SUBSCRIBER_COMMAND = '/Отчёт_Титан_Принять'
DELETE_SENDER_COMMAND = '/Не_Отчёт_Титан_Отослать'
DELETE_SUBSCRIBER_COMMAND = '/Не_Отчёт_Титан_Принять'
GET_SUBSCRIBERS_COMMAND = '/получить_подписчиков'
GET_SENDERS_COMMAND = '/получить_отправителей'
MSG_YOU_ARE_ALREADY_SU... | 38.807692 | 106 | 0.81665 |
d532d84f40d1d346d31f80358505d4ce21acb871 | 793 | py | Python | 169. Majority Element.py | Jorewang/LeetCode_Solutions | 0c483a915e2a8b3bfc4bcb4b5a35df3dd0dbe8ba | [
"Apache-2.0"
] | 2 | 2020-06-13T06:37:50.000Z | 2020-06-13T06:37:52.000Z | 169. Majority Element.py | Jorewang/LeetCode_Solutions | 0c483a915e2a8b3bfc4bcb4b5a35df3dd0dbe8ba | [
"Apache-2.0"
] | null | null | null | 169. Majority Element.py | Jorewang/LeetCode_Solutions | 0c483a915e2a8b3bfc4bcb4b5a35df3dd0dbe8ba | [
"Apache-2.0"
] | null | null | null | class Solution(object):
def majorityElement(self, nums):
nums.sort()
le = len(nums)
val = nums[0]
count = 0
for i in nums:
if i != val:
if count > le // 2:
return val
else:
count = 1
... | 23.323529 | 61 | 0.363178 |
d5332fca6d5b624aaf4399b261e5b22e113abae2 | 4,408 | py | Python | Notebooks/regrid_calipso.py | jenkayco/hacknostics | 4f980b17a2648cb6547cd2d8b442ae23253ab5e6 | [
"MIT"
] | 2 | 2019-06-04T20:10:46.000Z | 2021-06-07T21:10:39.000Z | Notebooks/regrid_calipso.py | jenkayco/hacknostics | 4f980b17a2648cb6547cd2d8b442ae23253ab5e6 | [
"MIT"
] | 2 | 2019-06-05T03:08:06.000Z | 2019-06-05T15:38:01.000Z | Notebooks/regrid_calipso.py | jenkayco/hacknostics | 4f980b17a2648cb6547cd2d8b442ae23253ab5e6 | [
"MIT"
] | 2 | 2019-06-05T03:11:35.000Z | 2019-06-05T05:33:45.000Z | import numpy as np
import xarray as xr
import xesmf as xe # <-- xesmf is a nice wrapper for regridding; requires ESMpy
from pathlib import Path
import logging
logging.basicConfig(level=logging.DEBUG)
def load_var(v, d):
fils = d[v]
if len(fils) == 1:
return xr.open_dataset(fils[0], decode_times=Fals... | 31.262411 | 171 | 0.670599 |
d5333dee7dd835ba8bd127ed5cba15872690b2f8 | 859 | py | Python | src/python/pants/backend/project_info/tasks/export_version.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/project_info/tasks/export_version.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/backend/project_info/tasks/export_version.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
# FORMAT_VERSION_NUMBER: Version number for identifying the export file format output. This
# number is shared between `export` and `export-dep-as-jar` task, so it should be changed
# when... | 50.529412 | 98 | 0.772992 |
d53348a025d34c2aa1e40258edbab0021041b14b | 2,468 | py | Python | tests/test_decorators/test_raises.py | m4ta1l/deal | 2a8e9bf412b8635b00a2b798dd8802375814a1c8 | [
"MIT"
] | 1 | 2020-09-05T13:54:16.000Z | 2020-09-05T13:54:16.000Z | tests/test_decorators/test_raises.py | m4ta1l/deal | 2a8e9bf412b8635b00a2b798dd8802375814a1c8 | [
"MIT"
] | 7 | 2020-09-05T13:54:28.000Z | 2020-11-27T05:59:19.000Z | tests/test_decorators/test_raises.py | Smirenost/deal | 2a8e9bf412b8635b00a2b798dd8802375814a1c8 | [
"MIT"
] | null | null | null | # external
import pytest
import urllib3
# project
import deal
# app
from .helpers import run_sync
def test_raises_expects_function_to_raise_error():
func = deal.raises(ZeroDivisionError)(lambda x: 1 / x)
with pytest.raises(ZeroDivisionError):
func(0)
func(2)
func = deal.raises(KeyError)(lam... | 25.443299 | 64 | 0.635737 |
d5338b822a3a1360030d276a3c760f2d2ab709bd | 3,516 | py | Python | player.py | polowis/neatevo | 165bbf81b2f55a85c945aed9cc6a817ee51ad476 | [
"MIT"
] | null | null | null | player.py | polowis/neatevo | 165bbf81b2f55a85c945aed9cc6a817ee51ad476 | [
"MIT"
] | null | null | null | player.py | polowis/neatevo | 165bbf81b2f55a85c945aed9cc6a817ee51ad476 | [
"MIT"
] | null | null | null | import random
import pygame
class Player:
MAX_ROTATION = 25
ROTATION_VELOCITY = 20
ANIMATION_TIME = 5
def __init__(self, win, img, x, y):
self.IMG = img
self.win = win
self.x = y
self.y = y
self.tilt = 0
self.tick_count = 0
self.vel = 0
... | 24.082192 | 88 | 0.470705 |
d533907c80389c7e6064779c9e03972148d2b4ca | 1,113 | py | Python | datawinners/location/models.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/location/models.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/location/models.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from django.contrib.gis.db import models
class LocationLevel(models.Model):
name_0 = models.CharField(max_length=75, null=True, blank=True)
name_1 = models.CharField(max_length=75, null=True, blank=True)
name_2 = models.CharField(max_length=75, null=True, blank=True)
name_3 = models.CharField(max_leng... | 27.146341 | 68 | 0.632525 |
d5339a58aa2bc16faf335d0003880df76dbecd92 | 8,452 | py | Python | statey/syms/stack.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | 4 | 2021-02-16T19:34:38.000Z | 2022-01-31T16:44:14.000Z | statey/syms/stack.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | statey/syms/stack.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | """
Modified from the Jinja code
"""
import contextlib
import dataclasses as dc
import platform
import sys
import textwrap as tw
from types import CodeType
from typing import Type as PyType, Any, Callable, Sequence, Optional
INTERNAL_CODE = set()
RESOLUTION_START = set()
@dc.dataclass(frozen=True)
class FrameSnap... | 29.449477 | 94 | 0.626834 |
d533a3064471b9c14fe2a17d88f4592221c78856 | 2,207 | py | Python | HW8/q1.py | sina-moammar/2020-Fall-Computational-Physics | f03e95b0a97022b628175fd06c301aecfdcf60af | [
"MIT"
] | null | null | null | HW8/q1.py | sina-moammar/2020-Fall-Computational-Physics | f03e95b0a97022b628175fd06c301aecfdcf60af | [
"MIT"
] | null | null | null | HW8/q1.py | sina-moammar/2020-Fall-Computational-Physics | f03e95b0a97022b628175fd06c301aecfdcf60af | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from ODE_methods import euler
def model_linear_func(t, a, b):
return a * t + b
def rc_circuit(q, t, params):
return 1 - q
def analytic_solution(t_s):
return 1 - np.exp(-t_s)
def find_error(derivatives_func, analy... | 31.528571 | 116 | 0.641142 |
d533e99f0ff7c49d8c90e86881dbd337835a3aa3 | 8,034 | py | Python | scraper/parser.py | Stimson-Center/stimson-web-scraper | c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f | [
"MIT"
] | 1 | 2020-09-11T01:13:27.000Z | 2020-09-11T01:13:27.000Z | scraper/parser.py | Stimson-Center/stimson-web-scraper | c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f | [
"MIT"
] | 15 | 2020-06-19T01:14:36.000Z | 2021-09-08T02:00:20.000Z | scraper/parser.py | Stimson-Center/stimson-web-scraper | c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Newspaper uses a lot of python-goose's parsing code. View theirlicense:
https://github.com/codelucas/newspaper/blob/master/GOOSE-LICENSE.txt
Parser objects will only contain operations that manipulate
or query an lxml or soup dom object generated from an article's html.
"""
import logging
i... | 30.316981 | 109 | 0.56236 |
d533f10c4563d997118fc9ddf7bc66bb79fcbb9e | 7,262 | py | Python | tests/test_info.py | ThomasRettig/ttfautohint-py | 996aeeafb37b7f983a85c8bbbe239733f3c9e1cf | [
"MIT"
] | 23 | 2017-12-17T00:13:29.000Z | 2022-03-31T15:39:23.000Z | tests/test_info.py | ThomasRettig/ttfautohint-py | 996aeeafb37b7f983a85c8bbbe239733f3c9e1cf | [
"MIT"
] | 16 | 2017-12-15T12:57:18.000Z | 2022-03-15T17:27:44.000Z | tests/test_info.py | ThomasRettig/ttfautohint-py | 996aeeafb37b7f983a85c8bbbe239733f3c9e1cf | [
"MIT"
] | 5 | 2018-01-17T11:30:54.000Z | 2022-02-08T01:46:47.000Z | import os
from contextlib import contextmanager
from ctypes import (
c_ushort, c_ubyte, POINTER, cast,
)
from ttfautohint._compat import iterbytes
from ttfautohint import memory, StemWidthMode
from ttfautohint.info import (
MutableByteString, InfoData, info_name_id_5, build_info_string,
name_string_is_wid... | 33.159817 | 78 | 0.597632 |
d53403b68500176a39b73966321a50f43cda8dd7 | 10,897 | py | Python | forge/blade/systems/visualizer/visualizer.py | narendasan/neural-mmo | 36a588db0021cccd7275cebef2cbdc5ee8eb40d5 | [
"MIT"
] | 4 | 2020-11-08T22:33:15.000Z | 2020-11-21T15:45:43.000Z | forge/blade/systems/visualizer/visualizer.py | ThomasCloarec/neural-mmo | 094744f49ad2cff179ec21e27285258903b70098 | [
"MIT"
] | 1 | 2021-09-30T07:57:46.000Z | 2021-10-02T00:39:11.000Z | forge/blade/systems/visualizer/visualizer.py | ThomasCloarec/neural-mmo | 094744f49ad2cff179ec21e27285258903b70098 | [
"MIT"
] | 2 | 2021-09-16T16:43:03.000Z | 2021-09-28T18:12:41.000Z | from pdb import set_trace as T
import time
import os
import ray
import sys
import json
import argparse
import pickle
import numpy as np
from scipy.interpolate import interp1d
from collections import defaultdict
from functools import partial
from threading import Thread
from random import random
import bokeh
from bo... | 31.313218 | 88 | 0.570616 |
d5341d2b48159b2dd45ff27d553299fc9cc7f338 | 3,706 | py | Python | hallo/test/modules/math/test_prime_factors.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2018-05-19T22:27:20.000Z | 2018-05-19T22:27:20.000Z | hallo/test/modules/math/test_prime_factors.py | joshcoales/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 75 | 2015-09-26T18:07:18.000Z | 2022-01-04T07:15:11.000Z | hallo/test/modules/math/test_prime_factors.py | SpangleLabs/Hallo | 17145d8f76552ecd4cbc5caef8924bd2cf0cbf24 | [
"MIT"
] | 1 | 2021-04-10T12:02:47.000Z | 2021-04-10T12:02:47.000Z | from hallo.events import EventMessage
def test_factors_simple(hallo_getter):
test_hallo = hallo_getter({"math"})
test_hallo.function_dispatcher.dispatch(
EventMessage(test_hallo.test_server, None, test_hallo.test_user, "factors 6")
)
data = test_hallo.test_server.get_send_data(1, test_hallo.te... | 40.725275 | 93 | 0.735294 |
d53443f12fd7730061c779bca61f29be54d0c5f7 | 1,382 | py | Python | sdk/eventhub/azure-eventhub/azure/eventhub/aio/_connection_manager_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/eventhub/azure-eventhub/azure/eventhub/aio/_connection_manager_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/eventhub/azure-eventhub/azure/eventhub/aio/_connection_manager_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 29.404255 | 94 | 0.586107 |
d534485ec9d98804a5b4f008c9df056410b9bda6 | 793 | py | Python | src/data_loading/download_data.py | PatBall1/DeepForestcast | f9444490d71b89aa7823e830cf7fbe6752c74d9a | [
"MIT"
] | null | null | null | src/data_loading/download_data.py | PatBall1/DeepForestcast | f9444490d71b89aa7823e830cf7fbe6752c74d9a | [
"MIT"
] | 1 | 2022-02-05T10:35:48.000Z | 2022-02-05T10:35:48.000Z | src/data_loading/download_data.py | PatBall1/DeepForestcast | f9444490d71b89aa7823e830cf7fbe6752c74d9a | [
"MIT"
] | null | null | null | import os
from Download_functions import download_data, import_boundary
# os.chdir('..')
os.getcwd()
# Define a name for the region
region = "Junin"
# Import boundary data
boundaryPath = "./inputs/departments_amazon1.shp"
buffer = import_boundary(boundaryPath, buffer=0.09)
# Import global grid
gridPath = "./inputs/... | 27.344828 | 82 | 0.737705 |
d5344c1c83bc0ce2610c6542768668571e114e28 | 740 | py | Python | scripts/jpg2mjpeg.py | talcron/frame-prediction-pytorch | 1a2fcc56c89ff031c2eba0547c5c898c6f8c3eab | [
"Apache-2.0"
] | 6 | 2021-02-16T22:30:40.000Z | 2022-02-17T06:44:11.000Z | scripts/jpg2mjpeg.py | talcron/frame-prediction-pytorch | 1a2fcc56c89ff031c2eba0547c5c898c6f8c3eab | [
"Apache-2.0"
] | null | null | null | scripts/jpg2mjpeg.py | talcron/frame-prediction-pytorch | 1a2fcc56c89ff031c2eba0547c5c898c6f8c3eab | [
"Apache-2.0"
] | null | null | null | import argparse
import glob
import os
parser = argparse.ArgumentParser()
parser.add_argument('--root-dir', required=True)
args = parser.parse_args()
files = glob.iglob(f'{args.root_dir}/**/*.mp4', recursive=True)
for path in files:
avi_path = f'{path[:-4]}.avi'
mjpeg_path = f'{path[:-4]}.mjpeg'
# Skip m... | 25.517241 | 76 | 0.659459 |
d534809799e549385ec042af4562e9f58c4bfe93 | 47,687 | py | Python | opendp/smartnoise/core/api_pb2.py | opendifferentialprivacy/whitenoise-core-python | a37dc5787ade35c33d29f70ec53b5dc92533f9f0 | [
"MIT"
] | 40 | 2020-04-25T17:12:57.000Z | 2020-10-16T15:35:40.000Z | opendp/smartnoise/core/api_pb2.py | opendifferentialprivacy/whitenoise-core-python | a37dc5787ade35c33d29f70ec53b5dc92533f9f0 | [
"MIT"
] | 18 | 2020-04-24T18:06:52.000Z | 2020-10-22T14:50:57.000Z | opendp/smartnoise/core/api_pb2.py | opendifferentialprivacy/whitenoise-core-python | a37dc5787ade35c33d29f70ec53b5dc92533f9f0 | [
"MIT"
] | 4 | 2020-04-27T20:36:27.000Z | 2020-05-21T14:09:05.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: api.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 ... | 44.650749 | 4,163 | 0.777843 |
d534a5763c298bca703a2765e8ef297d218bcdb3 | 93 | py | Python | Hydro/datapoint/apps.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | Hydro/datapoint/apps.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | Hydro/datapoint/apps.py | p-v-o-s/hydro | 34eaf227043c69b921650aa120516533d61c6854 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class DatapointConfig(AppConfig):
name = 'datapoint'
| 15.5 | 33 | 0.763441 |
d534aadb7966fe67e754f2fe3455fb01e296a2f9 | 5,972 | py | Python | tensorflow/python/kernel_tests/summary_tensor_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/kernel_tests/summary_tensor_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/summary_tensor_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.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 applica... | 34.923977 | 80 | 0.693737 |
d534fa5dbf0e156de83e025ab401e447c3ce8d7b | 47,209 | py | Python | pex/vendor/_vendored/setuptools/setuptools/msvc.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 2,160 | 2015-01-06T17:57:39.000Z | 2022-03-30T19:59:01.000Z | pex/vendor/_vendored/setuptools/setuptools/msvc.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1,242 | 2015-01-22T14:56:46.000Z | 2022-03-31T18:02:38.000Z | pex/vendor/_vendored/setuptools/setuptools/msvc.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 248 | 2015-01-15T13:34:50.000Z | 2022-03-26T01:24:18.000Z | """
Improved support for Microsoft Visual C++ compilers.
Known supported compilers:
--------------------------
Microsoft Visual C++ 9.0:
Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64)
Microsoft Windows SDK 6.1 (x86, x64, ia64)
Microsoft Windows SDK 7.0 (x86, x64, ia64)
Microsoft Visual C++ 10.0... | 27.9013 | 80 | 0.531869 |
d53520515cd8870ccd004d3e27041df8c220fecb | 10,002 | py | Python | python/l0698.py | daidaifan/leetcode-problem-solver | 1793eada501a2a18d05f118a98ac52e2edd12ef8 | [
"MIT"
] | null | null | null | python/l0698.py | daidaifan/leetcode-problem-solver | 1793eada501a2a18d05f118a98ac52e2edd12ef8 | [
"MIT"
] | null | null | null | python/l0698.py | daidaifan/leetcode-problem-solver | 1793eada501a2a18d05f118a98ac52e2edd12ef8 | [
"MIT"
] | null | null | null | """
Cpp solution with explanation in details
It's a very classical question.
Ref: http://www.geeksforgeeks.org/partition-set-k-subsets-equal-sum/
class Solution {
public:
// Method returns true if nums can be partitioned into K subsets
// with equal sum
bool canPartitionKSubsets(vector<int>& nums, int K)... | 35.978417 | 336 | 0.534393 |
d53534df8377aff540ec13b6a38b1f32e9d91614 | 7,473 | py | Python | scripts/train.py | nnupl/pneumonia_detection_xrays | 1cc47603ab2a4dc8633f63f01537135eae3511dc | [
"Apache-2.0"
] | 2 | 2021-03-14T13:37:51.000Z | 2022-02-26T04:18:30.000Z | scripts/train.py | Nishita-Kapoor/pneumonia_detection_xrays | 1cc47603ab2a4dc8633f63f01537135eae3511dc | [
"Apache-2.0"
] | null | null | null | scripts/train.py | Nishita-Kapoor/pneumonia_detection_xrays | 1cc47603ab2a4dc8633f63f01537135eae3511dc | [
"Apache-2.0"
] | null | null | null | import numpy as np
from timeit import default_timer as timer
import torch
from models.models import get_pretrained_model
from torch import cuda, optim
import torch.nn as nn
from torchsummary import summary
from data.dataloaders import create_dataloaders
import os
from tqdm import tqdm
from utils.utils import save_check... | 38.323077 | 118 | 0.578349 |
d53555f6cfb638f04309e77bd29232b9a23dbfff | 738 | py | Python | setup.py | jvdoorn/SpectrumAnalyzer | 264afaa795bd7246da2967d49b176361c454746e | [
"MIT"
] | 1 | 2020-12-29T18:02:04.000Z | 2020-12-29T18:02:04.000Z | setup.py | jvdoorn/SpectrumAnalyzer | 264afaa795bd7246da2967d49b176361c454746e | [
"MIT"
] | 5 | 2021-02-07T16:01:48.000Z | 2022-03-12T00:51:26.000Z | setup.py | jvdoorn/SpectrumAnalyzer | 264afaa795bd7246da2967d49b176361c454746e | [
"MIT"
] | null | null | null | import os
from setuptools import find_packages, setup
setup(
name="specc",
version=os.environ.get('PACKAGE_VERSION'),
author="Julian van Doorn",
author_email="jvdoorn@antarc.com",
url="https://github.com/jvdoorn/SpectrumAnalyzer",
packages=find_packages(exclude=("tests", "tests.*")),
licen... | 30.75 | 73 | 0.643631 |
d535671c055d778df0b8cd97e40c5f8be595a353 | 2,341 | py | Python | GLM/NPGLM/NPGLM.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 9 | 2020-11-20T17:43:36.000Z | 2021-02-26T22:18:59.000Z | GLM/NPGLM/NPGLM.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 1 | 2021-02-04T13:51:17.000Z | 2021-02-04T23:56:07.000Z | GLM/NPGLM/NPGLM.py | ys7yoo/npglm | 98cc040fff8a861e2d7e210fef049207f1714b2a | [
"MIT"
] | 1 | 2020-11-22T19:36:35.000Z | 2020-11-22T19:36:35.000Z | from GLM.GLM_Model.Model_Runner import Model_Runner
from GLM.GLM_Model import GLM_Model_GP, GLM_Model_MAP, GP_Covariate, MAP_Covariate
from GLM.GLM_Model.PoissonVariational import PoissonVariational
from Utils import utils, SpikeGen
from collections import OrderedDict
import torch
import pandas as pd
class NPGLM:
... | 39.016667 | 95 | 0.690303 |
d535cba1e6ec283de9421ffb7c58c855562b1546 | 1,854 | py | Python | source/project_extentions/git_project.py | AlexZettler/Python_Project_Starter | 9d73a3d6677e6eaeb30a53c4b5bb9449f3e9e94b | [
"MIT"
] | null | null | null | source/project_extentions/git_project.py | AlexZettler/Python_Project_Starter | 9d73a3d6677e6eaeb30a53c4b5bb9449f3e9e94b | [
"MIT"
] | null | null | null | source/project_extentions/git_project.py | AlexZettler/Python_Project_Starter | 9d73a3d6677e6eaeb30a53c4b5bb9449f3e9e94b | [
"MIT"
] | null | null | null | from manage_project import ProjectExtention, UnopenableProject
from manage_project import print_indent_title, get_indent, INDENTATION_LEVEL, TABS_PER_INDENT
import os
import git
import os.path as osp
import subprocess
import sys
class GitProject(ProjectExtention):
"""
This extention creates a git project and ... | 25.75 | 110 | 0.627832 |
d535ccd14d7e9dec8c9b6f7b47dab231e19b3b23 | 31,809 | py | Python | glue/qt/qtutil.py | JudoWill/glue | 7372b58d44f69107877fa87eeaf8209c0e4bfff2 | [
"BSD-3-Clause"
] | null | null | null | glue/qt/qtutil.py | JudoWill/glue | 7372b58d44f69107877fa87eeaf8209c0e4bfff2 | [
"BSD-3-Clause"
] | null | null | null | glue/qt/qtutil.py | JudoWill/glue | 7372b58d44f69107877fa87eeaf8209c0e4bfff2 | [
"BSD-3-Clause"
] | null | null | null | """
Various standalone utility code for
working with Qt
"""
from __future__ import absolute_import, division, print_function
import os
import pkg_resources
from matplotlib.colors import ColorConverter
from matplotlib import cm
import numpy as np
from ..external.axescache import AxesCache
from ..external.qt import Q... | 27.780786 | 79 | 0.595586 |
d535d99fe96d9a77224020a52dcbc8670e63554e | 409 | py | Python | pylint_django_translations/tests/input/warn_translatablemeta_requires_translatable_model.py | troyjfarrell/pylint_django_translations | b6c5349379024cdc5445499229bc31330591049a | [
"BSD-3-Clause"
] | null | null | null | pylint_django_translations/tests/input/warn_translatablemeta_requires_translatable_model.py | troyjfarrell/pylint_django_translations | b6c5349379024cdc5445499229bc31330591049a | [
"BSD-3-Clause"
] | null | null | null | pylint_django_translations/tests/input/warn_translatablemeta_requires_translatable_model.py | troyjfarrell/pylint_django_translations | b6c5349379024cdc5445499229bc31330591049a | [
"BSD-3-Clause"
] | null | null | null | """
This test verifies that a a "translatablemeta-modelclass" warning is triggered
when a "TranslatableMeta" class is found inside a class which is not a
descendant of "translations.models.Translatable".
"""
from typing import List
from django.db import models
class CrazyModel(models.Model):
"CrazyModel"
cla... | 27.266667 | 78 | 0.745721 |
d535dd4df6bb65fc8cbee52cd55f7ac116ea6733 | 9,237 | py | Python | semi_sync_lpa.py | matteoacrossi/emergent-entanglement-structures | 17d74fa7b2af5ba35304fdac5f28eaff66939e9a | [
"MIT"
] | null | null | null | semi_sync_lpa.py | matteoacrossi/emergent-entanglement-structures | 17d74fa7b2af5ba35304fdac5f28eaff66939e9a | [
"MIT"
] | null | null | null | semi_sync_lpa.py | matteoacrossi/emergent-entanglement-structures | 17d74fa7b2af5ba35304fdac5f28eaff66939e9a | [
"MIT"
] | null | null | null |
import warnings
import networkx as nx
from collections import Counter
def label_propagation_communities(G, weight=None):
"""Generates community sets determined by label propagation
Finds communities in `G` using a semi-synchronous label propagation
method[1]_. This method combines the advantages of both ... | 36.223529 | 92 | 0.621847 |
d5362dd1e390072a3ba4a2e0edfb7ccb307dc211 | 516 | py | Python | stats/test_runif.py | parrt/msan501-starterkit | aee40d78ba8b7fa49f9a11d2626945d831e9de97 | [
"BSD-2-Clause"
] | 3 | 2016-07-11T23:34:24.000Z | 2018-07-26T22:15:16.000Z | stats/test_runif.py | parrt/msan501-starterkit | aee40d78ba8b7fa49f9a11d2626945d831e9de97 | [
"BSD-2-Clause"
] | null | null | null | stats/test_runif.py | parrt/msan501-starterkit | aee40d78ba8b7fa49f9a11d2626945d831e9de97 | [
"BSD-2-Clause"
] | 16 | 2015-07-13T22:51:23.000Z | 2021-07-19T03:08:17.000Z | from stats import *
import numpy as np
seed_666 = [0.00521236192678, 0.604166903349, 0.233144581892,
0.460987861017, 0.822980116505, 0.826818094508,
0.331714398848, 0.1239014343, 0.411406287184,
0.505468696591]
seed_235423 = [0.8425073301617556, 0.02069802862624546, 0.8717671213074... | 27.157895 | 75 | 0.680233 |
d5364eb891ed540e3adc569bc203603a391d3621 | 274 | py | Python | spider/pixiv/test/test_theme_color.py | youyouzh/u_base | f2f81f837258df6f57cdfc3f3f579049935f5a22 | [
"Apache-2.0"
] | 4 | 2020-03-29T15:01:18.000Z | 2020-06-22T08:06:00.000Z | spider/pixiv/test/test_theme_color.py | youyouzh/python-base | 1959812d026faf9d23ff758ca06f1a13a3cce3c4 | [
"Apache-2.0"
] | null | null | null | spider/pixiv/test/test_theme_color.py | youyouzh/python-base | 1959812d026faf9d23ff758ca06f1a13a3cce3c4 | [
"Apache-2.0"
] | null | null | null | from spider.pixiv.arrange.theme_color import *
from u_base import u_unittest
def test_train_main_color():
illust_id = 21253971
illust_path = get_illust_file_path(illust_id)
clusters, label_count = rgb_kmeans(illust_path, True)
print(clusters, label_count)
| 27.4 | 57 | 0.781022 |
d53653d6c914904350a53fb1c680130f473f7571 | 3,752 | py | Python | pandas_ta/overlap/supertrend.py | MyBourse/pandas-ta | 5998e92e39b71cd79a6e75d7c599492181af5f65 | [
"MIT"
] | 2 | 2021-03-30T01:23:14.000Z | 2021-04-02T18:04:51.000Z | pandas_ta/overlap/supertrend.py | lukaszbinden/pandas-ta | 98478f8bf049a4c8748d6f3c795f4f335ced05ca | [
"MIT"
] | null | null | null | pandas_ta/overlap/supertrend.py | lukaszbinden/pandas-ta | 98478f8bf049a4c8748d6f3c795f4f335ced05ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import NaN as npNaN
from pandas import DataFrame
from pandas_ta.overlap import hl2
from pandas_ta.volatility import atr
from pandas_ta.utils import get_offset, verify_series
def supertrend(high, low, close, length=None, multiplier=None, offset=None, **kwargs):
"""Indicator: Supe... | 30.754098 | 95 | 0.627132 |
d536978ad6436a6bedb02141edd587f1433dc218 | 3,171 | py | Python | cumulusci/tasks/sfdx.py | hamedizadpanah-ibm/CumulusCI | eb93723e2da1ca66a7639b3197e6fab02d1bd24a | [
"BSD-3-Clause"
] | 1 | 2020-08-08T03:55:21.000Z | 2020-08-08T03:55:21.000Z | cumulusci/tasks/sfdx.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | cumulusci/tasks/sfdx.py | Julian88Tex/CumulusCI | 82d5fab71b61fbab53c1b5fc6001452fa3f97da8 | [
"BSD-3-Clause"
] | null | null | null | """ Wrapper tasks for the SFDX CLI
TODO: Instead of everyone overriding random attrs, especially as future
users subclass these tasks, we should expose an api for the string format
function. i.e. make it easy for subclasses to add to the string inherited
from the base.
Actually do this in Command. have it expose com... | 32.357143 | 88 | 0.66036 |
d536b71d1a501f678c3934d2cf5b4226167a1ed7 | 4,326 | py | Python | src/falconpy/event_streams.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | src/falconpy/event_streams.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | src/falconpy/event_streams.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | """
_______ __ _______ __ __ __
| _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----.
|. 1___| _| _ | | | | _ | 1___| _| _| | <| -__|
|. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|
|: 1 | |: 1 |
|::.. ... | 49.724138 | 126 | 0.633611 |
d536cac53ac369fccb6d74c62eb4cca3743d2395 | 24,379 | py | Python | libs/cliff/tests/test_formatters_table.py | PortSwigger/lightbulb-framework | 1c3dae2af902abc3cbab4e6b989e302f469d7a6a | [
"MIT"
] | 18 | 2018-02-07T20:50:30.000Z | 2022-02-28T22:49:52.000Z | libs/cliff/tests/test_formatters_table.py | PortSwigger/lightbulb-framework | 1c3dae2af902abc3cbab4e6b989e302f469d7a6a | [
"MIT"
] | null | null | null | libs/cliff/tests/test_formatters_table.py | PortSwigger/lightbulb-framework | 1c3dae2af902abc3cbab4e6b989e302f469d7a6a | [
"MIT"
] | 4 | 2019-08-26T18:43:08.000Z | 2020-08-07T23:01:13.000Z | #!/usr/bin/env python
#
# 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, s... | 38.944089 | 93 | 0.458879 |
d536da688a11f700208c4a8497eb2259d4e7ff05 | 5,735 | py | Python | rlkit/torch/irl/irl_trainer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/torch/irl/irl_trainer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/torch/irl/irl_trainer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import warnings
from typing import Any, Callable, Dict, List
import numpy as np
from gym.spaces import Box, Dict
from multiworld.core.multitask_env import MultitaskEnv
from rlkit import pythonplusplus as ppp
from rlkit.core.distribution import DictDistribution
from rlkit.envs.contextual import ContextualRewardFn
from... | 29.260204 | 83 | 0.632084 |
d536ea7948598994bc30a859e02bce8c71de51b4 | 11,961 | py | Python | lib/ics/event.py | welch/sportsball | 82d120b6f0e496fa2d9dbb991f4b41b72a023d60 | [
"MIT"
] | 4 | 2016-02-22T22:57:12.000Z | 2018-08-24T16:40:00.000Z | lib/ics/event.py | welch/sportsball | 82d120b6f0e496fa2d9dbb991f4b41b72a023d60 | [
"MIT"
] | 3 | 2018-08-24T16:41:51.000Z | 2019-07-22T15:26:09.000Z | lib/ics/event.py | welch/sportsball | 82d120b6f0e496fa2d9dbb991f4b41b72a023d60 | [
"MIT"
] | 2 | 2019-01-17T09:34:48.000Z | 2019-07-08T15:08:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from six import PY2, PY3, StringIO, string_types, text_type, integer_types
from six.moves import filter, map, range
import arrow
import copy
from datetime import timedelta
from .component import Component
from .ut... | 29.244499 | 92 | 0.592425 |
d53748c590c73df8f1f0e55d3eb0f11f418e24f4 | 3,091 | py | Python | topi/tests/python/test_topi_conv2d_nhwc.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | topi/tests/python/test_topi_conv2d_nhwc.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | topi/tests/python/test_topi_conv2d_nhwc.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 38.6375 | 100 | 0.681333 |
d5376373af427c3795e6ce7b1b2661162829de51 | 2,287 | py | Python | splunk_otel/cmd/bootstrap.py | dsmlaimaestro/splunk-otel-python | 6903279b64a1dc1b04b5f6873cf317e56da45641 | [
"ECL-2.0",
"Apache-2.0"
] | 30 | 2020-10-19T18:34:02.000Z | 2021-11-16T03:29:48.000Z | splunk_otel/cmd/bootstrap.py | dsmlaimaestro/splunk-otel-python | 6903279b64a1dc1b04b5f6873cf317e56da45641 | [
"ECL-2.0",
"Apache-2.0"
] | 134 | 2020-10-20T16:46:19.000Z | 2022-03-29T14:48:35.000Z | splunk_otel/cmd/bootstrap.py | dsmlaimaestro/splunk-otel-python | 6903279b64a1dc1b04b5f6873cf317e56da45641 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2020-10-21T02:38:36.000Z | 2022-03-01T14:57:04.000Z | # Copyright Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | 28.949367 | 93 | 0.655007 |
d53790529e3603560d365ed6311402d5848446ca | 11,257 | py | Python | eva_submission/eload_brokering.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | eva_submission/eload_brokering.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | eva_submission/eload_brokering.py | itsroops/eva-submission | 16c0860e020013ce1d1c2b8a3688676460269f40 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import subprocess
import yaml
from ebi_eva_common_pyutils import command_utils
from ebi_eva_common_pyutils.config import cfg
from eva_submission import NEXTFLOW_DIR
from eva_submission.ENA_submission.upload_to_ENA import ENAUploader, ENAUploaderAsync
from eva_submission.biosamples_submission i... | 50.254464 | 131 | 0.63063 |
d5379998e3aa0fb8dfa8e7b7b0d848f0116852f4 | 1,179 | py | Python | iseaformatter.py | torhve/saltibot | b4e8f9bc54f08bf4abe8e62ad4fa1cfe540ba280 | [
"BSD-3-Clause"
] | 2 | 2015-07-10T14:11:52.000Z | 2016-09-22T09:40:30.000Z | iseaformatter.py | torhve/saltibot | b4e8f9bc54f08bf4abe8e62ad4fa1cfe540ba280 | [
"BSD-3-Clause"
] | null | null | null | iseaformatter.py | torhve/saltibot | b4e8f9bc54f08bf4abe8e62ad4fa1cfe540ba280 | [
"BSD-3-Clause"
] | null | null | null | #/usr/bin/env python
# -*- coding: UTF-8
def IseaFormatter(data):
jid = data['jid']#[12:]
# Command or return
if 'return' in data:
success = 'FAIL!'
if data['success']:
success = 'SUCCESS!'
if type(data['return']) == type({}):
ok = 0
failed = 0
... | 25.630435 | 57 | 0.361323 |
d537c37ccaefe351dd8b7b3583fc8e507f1fc972 | 3,469 | py | Python | artellapipe/core/tag.py | ArtellaPipe/artellapipe | 3400f6a55f124f639143fe01c559059eaba23b22 | [
"MIT"
] | 7 | 2019-10-28T05:18:30.000Z | 2020-08-21T05:36:52.000Z | artellapipe/core/tag.py | tpoveda/artellapipe | 3400f6a55f124f639143fe01c559059eaba23b22 | [
"MIT"
] | 4 | 2020-01-22T02:41:54.000Z | 2020-03-17T10:49:12.000Z | artellapipe/core/tag.py | tpoveda/artellapipe | 3400f6a55f124f639143fe01c559059eaba23b22 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains definitions for tags in Artella
"""
from __future__ import print_function, division, absolute_import
__author__ = "Tomas Poveda"
__license__ = "MIT"
__maintainer__ = "Tomas Poveda"
__email__ = "tpovedatd@gmail.com"
import ast
import string
imp... | 29.649573 | 111 | 0.636495 |
d537caa96a36dc466849bc0c538e0d60eed82232 | 8,873 | py | Python | tests/python/pants_test/base/test_filesystem_build_file.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/base/test_filesystem_build_file.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/base/test_filesystem_build_file.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import si... | 43.282927 | 99 | 0.715654 |
d537cd3d07dc44eb420567e50e687d677e9cd9b8 | 5,430 | py | Python | digital_image_processing/edge_detection/canny.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | digital_image_processing/edge_detection/canny.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | digital_image_processing/edge_detection/canny.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 39.926471 | 114 | 0.567035 |
d53810a542a3f17dfee7b47763854f7af4181fe6 | 1,373 | py | Python | transforms/resize.py | huawei-noah/multi-hyp-awb | dd9818f13a6955d4e686ad17e43a42ea453d17d6 | [
"0BSD"
] | 73 | 2020-06-01T14:57:02.000Z | 2022-03-10T05:20:10.000Z | transforms/resize.py | huawei-noah/multi-hyp-awb | dd9818f13a6955d4e686ad17e43a42ea453d17d6 | [
"0BSD"
] | 13 | 2020-06-19T03:25:47.000Z | 2022-03-07T20:35:05.000Z | transforms/resize.py | huawei-noah/multi-hyp-awb | dd9818f13a6955d4e686ad17e43a42ea453d17d6 | [
"0BSD"
] | 16 | 2020-06-04T07:37:35.000Z | 2021-07-09T05:51:48.000Z | #Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#This program is free software; you can redistribute it and/or modify it under the terms of the BSD 0-Clause License.
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ... | 40.382353 | 227 | 0.643117 |
d53814d80d653cad2b4d65d2a03fb20dbf6c1bd7 | 612 | py | Python | seisloc/eqt.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | seisloc/eqt.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | seisloc/eqt.py | zijinping/relocation | 7de003ee1ef8587e8fcbeba1edd967cdf4c00637 | [
"MIT"
] | null | null | null | #!/usr/bin/evn python
# EQTransformer related functions
import obspy
from obspy import UTCDateTime
import os
def to_mseed(trace,out_folder="./"):
"""
Save the obspy trace to the format EQTransformer could recognized
"""
net = trace.stats.network
sta = trace.stats.station
chn = trace.stats.chan... | 26.608696 | 69 | 0.645425 |
d538183e33b28abf71b5659fd3e6199197e9e7b6 | 1,627 | py | Python | schedule/migrations/0014_use_autofields_for_pk.py | kimarakov/schedule | ca32e147bea5cd60aa7667ef5090095b339e32c9 | [
"BSD-3-Clause"
] | 1,065 | 2015-01-09T22:34:45.000Z | 2022-03-27T07:06:16.000Z | schedule/migrations/0014_use_autofields_for_pk.py | kimarakov/schedule | ca32e147bea5cd60aa7667ef5090095b339e32c9 | [
"BSD-3-Clause"
] | 411 | 2015-01-01T10:42:37.000Z | 2022-03-27T13:25:10.000Z | schedule/migrations/0014_use_autofields_for_pk.py | kimarakov/schedule | ca32e147bea5cd60aa7667ef5090095b339e32c9 | [
"BSD-3-Clause"
] | 402 | 2015-01-01T10:40:42.000Z | 2022-03-24T03:55:22.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("schedule", "0013_auto_20210502_2303"),
]
operations = [
migrations.AlterField(
model_name="calendar",
name="id",
field=models.AutoField(
... | 30.12963 | 87 | 0.532268 |
d53835658fbd554328e361976b8ba981a630b59f | 2,363 | py | Python | NBA Project/venv/Lib/site-packages/_plotly_utils/colors/qualitative.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/_plotly_utils/colors/qualitative.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/_plotly_utils/colors/qualitative.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | """
Qualitative color sequences are appropriate for data that has no natural ordering, such \
as categories, colors, names, countries etc. The color sequences in this module are \
mostly meant to be passed in as the `color_discrete_sequence` argument to various functions.
"""
from ._swatches import _swatches
def swa... | 15.966216 | 92 | 0.487093 |
d5383590868d3c486a1a7225e298dd9f6f0dfd7f | 7,080 | py | Python | homeassistant/components/aquostv/media_player.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/aquostv/media_player.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/aquostv/media_player.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for interface with an Aquos TV."""
import logging
import sharp_aquos_rc
import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
SUPPORT_PLAY,
SU... | 26.818182 | 84 | 0.625141 |
d5383fa260258318563befcd358e2fb6f3fb3bc2 | 2,927 | py | Python | google_drive_download.py | maso0310/bug | 170bf8e9b19d2640cf09fa98410bdb9ef7742c83 | [
"MIT"
] | 1 | 2020-05-25T16:55:05.000Z | 2020-05-25T16:55:05.000Z | google_drive_download.py | maso0310/bug | 170bf8e9b19d2640cf09fa98410bdb9ef7742c83 | [
"MIT"
] | 6 | 2020-03-24T16:17:20.000Z | 2021-12-13T19:50:38.000Z | google_drive_download.py | maso0310/bug | 170bf8e9b19d2640cf09fa98410bdb9ef7742c83 | [
"MIT"
] | null | null | null | from __future__ import print_function
import httplib2
import os
import io
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
from apiclient.http import MediaFileUpload
from apiclient.http import MediaIoBaseDownload
try:
... | 33.643678 | 76 | 0.667236 |
d5385025143623b3dc50329b65cd0972f5b8fd87 | 654 | py | Python | 03-image-manipulation/022-convolution_and_blurring.py | megatran/selflearning_openCV_ComputerVision | 9977c72451e5db6d581621f9bba6475020df493b | [
"MIT"
] | 3 | 2016-12-22T01:41:12.000Z | 2018-04-03T14:26:16.000Z | 03-image-manipulation/022-convolution_and_blurring.py | megatran/selflearning_openCV_ComputerVision | 9977c72451e5db6d581621f9bba6475020df493b | [
"MIT"
] | null | null | null | 03-image-manipulation/022-convolution_and_blurring.py | megatran/selflearning_openCV_ComputerVision | 9977c72451e5db6d581621f9bba6475020df493b | [
"MIT"
] | null | null | null | import cv2
import numpy as np
#load input image
source_input = "/Users/nhant/Google Drive/OnlineLearning/selflearning_CV_with_Python/practice_sources/images/elephant.jpg"
image = cv2.imread(source_input)
cv2.imshow("Original Image", image)
cv2.waitKey(0)
#creating 3*3 kernel
kernel_3x3 = np.ones((3,3), np.float32) /... | 25.153846 | 122 | 0.762997 |
d53865f2050105e4c401eeea1d8433ad05bf30b9 | 98 | py | Python | riscv_config/__init__.py | riscv/riscv-conf | 8c01729fc9e9b50f75fb1c8da074a9e149718adc | [
"BSD-3-Clause"
] | 27 | 2019-08-12T07:54:57.000Z | 2021-09-07T02:24:49.000Z | riscv_config/__init__.py | hemanthkumar17/riscv-config | 8c01729fc9e9b50f75fb1c8da074a9e149718adc | [
"BSD-3-Clause"
] | 32 | 2019-08-06T05:00:09.000Z | 2021-07-17T04:00:00.000Z | riscv_config/__init__.py | hemanthkumar17/riscv-config | 8c01729fc9e9b50f75fb1c8da074a9e149718adc | [
"BSD-3-Clause"
] | 15 | 2019-08-06T05:08:20.000Z | 2021-07-21T03:44:34.000Z | from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
__version__ = '2.12.1'
| 24.5 | 42 | 0.795918 |
d53868f51d54ea43798f689749954a337096fc25 | 3,829 | py | Python | app/recipe/tests/test_tags_api.py | iyersv/recipe-app-api | 5d54eabe58f15eac37162192cac80e9fc960e6ec | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | iyersv/recipe-app-api | 5d54eabe58f15eac37162192cac80e9fc960e6ec | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | iyersv/recipe-app-api | 5d54eabe58f15eac37162192cac80e9fc960e6ec | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag,Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
... | 33.295652 | 88 | 0.650039 |
d5387ba3d8d01f7ef6731b318f3d4394820b772f | 1,809 | py | Python | python/phonenumbers/data/region_PG.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/region_PG.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_PG.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. PG metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_PG = PhoneMetadata(id='PG', country_code=675, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[1-9]\\d{6,7}', possible_number_pattern=... | 95.210526 | 204 | 0.742952 |
d5389ed81fc885b35429453749bc12724ed723b9 | 1,666 | py | Python | alipay/aop/api/response/DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse(AlipayResponse):
def __init__(self):
super(DatadigitalFincloudGeneralsaasFaceCertifyQueryResponse, self).__init__()
... | 29.75 | 127 | 0.684874 |
d538b05e57b270018ddce0e409d5d802bcd96694 | 16,616 | py | Python | binaryIO.py | jpritt/boiler | c6f5d79dccddc9e662a648631bf3067ad907ed7a | [
"MIT"
] | 13 | 2016-02-22T23:18:03.000Z | 2020-05-28T11:38:09.000Z | binaryIO.py | jpritt/boiler | c6f5d79dccddc9e662a648631bf3067ad907ed7a | [
"MIT"
] | null | null | null | binaryIO.py | jpritt/boiler | c6f5d79dccddc9e662a648631bf3067ad907ed7a | [
"MIT"
] | 3 | 2016-06-02T13:08:05.000Z | 2018-08-15T18:38:16.000Z | import math
import cross_bundle_bucket
import time
from struct import *
# Reading/writing formats
formats = {1:'B', 2:'H', 4:'I', 8:'Q'}
byteVal = int(pow(2,8))
def valToBinary(numBytes, val):
''' Convert a value to a byte string which can then be written to a file
'''
return (val).to_bytes(numBytes, byt... | 26.843296 | 120 | 0.604658 |
d538eae2dfdd19794be57df2cd5d60ee5852a4cf | 5,522 | py | Python | flow/scheduling/torque.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | flow/scheduling/torque.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | flow/scheduling/torque.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
"""Implementation of the scheduling system for TORQUE schedulers.
This module implements the Scheduler and ClusterJob classes for TORQUE.
"""
from __future__ import print_fu... | 32.674556 | 97 | 0.60757 |
d538f41ef90c77cf5a52eab96fa21712edf306af | 4,944 | py | Python | panaroo/run_prokka.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 116 | 2019-11-28T07:54:26.000Z | 2022-03-31T03:20:44.000Z | panaroo/run_prokka.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 120 | 2019-12-08T21:01:46.000Z | 2022-03-30T04:11:52.000Z | panaroo/run_prokka.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 19 | 2019-12-19T05:34:03.000Z | 2022-03-19T05:54:51.000Z | import os
import argparse
from .prodigal import train_prodigal
from .isvalid import *
import subprocess
from joblib import Parallel, delayed
import shutil
import tempfile
from tqdm import tqdm
from .__init__ import __version__
def get_options():
import argparse
description = 'Re-run gene finding and annotat... | 32.741722 | 80 | 0.561286 |
d538fa466200b64228b8cab4a1e425f575bb59a5 | 1,254 | py | Python | quizzes/01/question_1/db.py | MrDDaye/cna_cp1895 | 31bcd185c2dbb336604bb5dd623e204fe79bf312 | [
"MIT"
] | null | null | null | quizzes/01/question_1/db.py | MrDDaye/cna_cp1895 | 31bcd185c2dbb336604bb5dd623e204fe79bf312 | [
"MIT"
] | null | null | null | quizzes/01/question_1/db.py | MrDDaye/cna_cp1895 | 31bcd185c2dbb336604bb5dd623e204fe79bf312 | [
"MIT"
] | null | null | null | """Baseball Team Manager file I/O."""
import csv
FILENAME: str = "players.txt"
def read_players() -> list[dict]:
"""Read players file and return a list of dictionaries."""
try:
players: list = []
with open(FILENAME, newline="") as file:
reader = csv.reader(file)
... | 33 | 63 | 0.559011 |
d5392ba2382a6d99bea510a6dc8252b0e41def61 | 7,437 | py | Python | tests/test_sink_producer.py | d2gex/producer-sink-zmq | 93714580b9ae81b8f8bf7cfaa9f025c06b778794 | [
"MIT"
] | null | null | null | tests/test_sink_producer.py | d2gex/producer-sink-zmq | 93714580b9ae81b8f8bf7cfaa9f025c06b778794 | [
"MIT"
] | null | null | null | tests/test_sink_producer.py | d2gex/producer-sink-zmq | 93714580b9ae81b8f8bf7cfaa9f025c06b778794 | [
"MIT"
] | null | null | null | import pytest
import multiprocessing
import time
from pymulproc import factory, mpq_protocol
from producer_sink import ipeer, sink, producer
from tests import utils as test_utils, stubs
def call_sink(cls, url, peer_name, comm, loops):
'''Call a sink-like stub
'''
s = cls(identity=peer_name, url=url)
... | 38.138462 | 120 | 0.600376 |
d539b8bbd55b44cce3dfba1bb7332a04f1cac71f | 2,432 | py | Python | summary_stats.py | tgphelps/bj-python | 0ef579bc7ab954b9bad5e2f5c061cda89aaf58bf | [
"MIT"
] | null | null | null | summary_stats.py | tgphelps/bj-python | 0ef579bc7ab954b9bad5e2f5c061cda89aaf58bf | [
"MIT"
] | null | null | null | summary_stats.py | tgphelps/bj-python | 0ef579bc7ab954b9bad5e2f5c061cda89aaf58bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Read the stats.txt file, and suumarize its contents. If there are
stats from different strategies in the file, ignore all that are not
the same as the first one found.
"""
import sys
from typing import Dict, List
import constants as const
STATS_FILE = 'stats.txt'
class Stats():
"Just ... | 23.843137 | 91 | 0.448602 |
d539d71ab267aac2966799cd46b7a63e7962f70e | 4,636 | py | Python | PyChat/client/protocol/ChatClientProtocol.py | leosartaj/PyChat | 9c22edc6ca89e2ff636b74a9cbd0a31bb44b1667 | [
"MIT"
] | 7 | 2015-02-06T16:53:45.000Z | 2018-09-22T10:11:44.000Z | PyChat/client/protocol/ChatClientProtocol.py | leosartaj/PyChat | 9c22edc6ca89e2ff636b74a9cbd0a31bb44b1667 | [
"MIT"
] | 3 | 2016-12-03T17:01:21.000Z | 2021-07-08T23:03:08.000Z | PyChat/client/protocol/ChatClientProtocol.py | leosartaj/PyChat | 9c22edc6ca89e2ff636b74a9cbd0a31bb44b1667 | [
"MIT"
] | 2 | 2016-12-03T17:01:58.000Z | 2016-12-26T10:46:20.000Z | #!/usr/bin/env python2
##
# PyChat
# https://github.com/leosartaj/PyChat.git
#
# Copyright (c) 2014 Sartaj Singh
# Licensed under the MIT license.
##
# system import
import os
# twisted imports
from twisted.internet import reactor, defer
from twisted.python import log
from twisted.protocols import basic
# user impo... | 28.975 | 88 | 0.589948 |
d53a1cd33e3eb619d6474093377b9521596563a3 | 13,425 | py | Python | deep-conus/02_variable_interpolator.py | mariajmolina/deep-conus | 33f9e2af3e39d9f03c7f9b8388fe9cd29224b624 | [
"MIT"
] | 5 | 2020-09-28T16:48:52.000Z | 2021-03-19T07:54:27.000Z | deep-conus/02_variable_interpolator.py | mariajmolina/deep-conus | 33f9e2af3e39d9f03c7f9b8388fe9cd29224b624 | [
"MIT"
] | null | null | null | deep-conus/02_variable_interpolator.py | mariajmolina/deep-conus | 33f9e2af3e39d9f03c7f9b8388fe9cd29224b624 | [
"MIT"
] | 2 | 2021-03-08T21:58:44.000Z | 2021-03-09T06:50:38.000Z | import xarray as xr
import numpy as np
class InterpolateVariable:
"""Class instantiation of InterpolateVariable:
Here we will be interpolating the respective variable onto 1, 3, 5, and 7 km above ground level (AGL).
Attributes:
climate (str): Whether to interpolate variable in the ``current`` or... | 44.75 | 167 | 0.569758 |
d53a35933888ca6fa6292fbe5f60f4ff417f91e9 | 9,471 | py | Python | pyeapi/api/ipinterfaces.py | devtodor/pyeapi-py3 | a1b7241d489527fd69d4fb5135f881ebd4dbb970 | [
"BSD-3-Clause"
] | null | null | null | pyeapi/api/ipinterfaces.py | devtodor/pyeapi-py3 | a1b7241d489527fd69d4fb5135f881ebd4dbb970 | [
"BSD-3-Clause"
] | null | null | null | pyeapi/api/ipinterfaces.py | devtodor/pyeapi-py3 | a1b7241d489527fd69d4fb5135f881ebd4dbb970 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2014, Arista Networks, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of condit... | 36.287356 | 80 | 0.640693 |
d53a64defd0727ac245bf75b2e41b29d82dc8cae | 1,480 | py | Python | src/logml/feature_importance/feature_importance_permutation.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | null | null | null | src/logml/feature_importance/feature_importance_permutation.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | 56 | 2019-09-10T19:00:38.000Z | 2022-02-10T00:35:57.000Z | src/logml/feature_importance/feature_importance_permutation.py | AstraZeneca-NGS/LogMl | cf254b358150f0f96a9dd2ea50de56acdc15bd56 | [
"MIT"
] | null | null | null |
from ..core.scatter_gather import scatter_all
from .feature_importance_model import FeatureImportanceModel
class FeatureImportancePermutation(FeatureImportanceModel):
"""
Estimate feature importance based on a model.
How it works: Suffle a column and analyze how model performance is
degraded. Most im... | 38.947368 | 90 | 0.718919 |
d53a66c2219dae9a3a181910f6e3acd24f155145 | 1,054 | py | Python | helpcenter/migrations/0001_initial.py | smalls12/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | 4 | 2017-07-30T17:43:36.000Z | 2021-09-14T04:26:37.000Z | helpcenter/migrations/0001_initial.py | cdriehuys/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | 20 | 2016-06-30T04:52:26.000Z | 2016-09-30T04:52:15.000Z | helpcenter/migrations/0001_initial.py | cdriehuys/django_helpcenter | e0118447871abad701056bc137d63e6fcd8abde6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-02 20:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateMod... | 39.037037 | 219 | 0.648956 |
d53a996bff7440e986460aac7dc57fa5d25bf049 | 265,815 | py | Python | tests/unit/gapic/compute_v1/test_instance_group_managers.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_instance_group_managers.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_instance_group_managers.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 39.368335 | 139 | 0.680187 |
d53a9f1c6ffa49e8e809838846019a83c923cfe1 | 759 | py | Python | mesonwrap/tools/serve.py | mesonbuild/wrapweb | c616627d7448fcadd601e838bedf1d717474cb1c | [
"Apache-2.0"
] | 22 | 2015-05-30T12:40:58.000Z | 2020-01-02T10:46:11.000Z | mesonwrap/tools/serve.py | mesonbuild/wrapweb | c616627d7448fcadd601e838bedf1d717474cb1c | [
"Apache-2.0"
] | 102 | 2015-05-30T17:12:02.000Z | 2020-01-25T11:20:35.000Z | mesonwrap/tools/serve.py | mesonbuild/wrapweb | c616627d7448fcadd601e838bedf1d717474cb1c | [
"Apache-2.0"
] | 8 | 2018-02-27T14:59:24.000Z | 2020-01-24T18:13:16.000Z | import argparse
from mesonwrap.tools import environment
from wrapweb import APP
def main(prog, args):
parser = argparse.ArgumentParser(prog)
parser.add_argument('--host', default='0.0.0.0')
parser.add_argument('--port', type=int, default=5000)
parser.add_argument('--secret-key')
parser.add_argume... | 33 | 70 | 0.665349 |
d53aa02a4277772e199c07ec26246c2bda2c315d | 5,942 | py | Python | examples/jbnmr_examples/s11_strip_plots/make_strip_plots.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 150 | 2015-01-16T12:24:13.000Z | 2022-03-03T18:01:18.000Z | examples/jbnmr_examples/s11_strip_plots/make_strip_plots.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 129 | 2015-01-13T04:58:56.000Z | 2022-03-02T13:39:16.000Z | examples/jbnmr_examples/s11_strip_plots/make_strip_plots.py | genematx/nmrglue | 8a24cf6cbd18451e552fc0673b84c42d1dcb69a2 | [
"BSD-3-Clause"
] | 88 | 2015-02-16T20:04:12.000Z | 2022-03-10T06:50:30.000Z | #! /usr/bin/env python
import nmrglue as ng
import numpy as np
import matplotlib.pyplot as plt
# NMRPipe files of spectra to create strip plots from
spectrum_1 = 'GB3-CN-3DCONCA-041007.fid/ft/test%03d.ft3'
spectrum_2 = 'GB3-CN-3DNCACX-040507.fid/ft/test%03d.ft3'
spectrum_3 = 'GB3-CN-3DNCOCX-040807.fid/ft/test%03d.ft3... | 36.679012 | 79 | 0.665264 |
d53acdedc801a12dca3ea7fe8c15850560b04b6a | 2,822 | py | Python | plugins/dbnd-spark/tests/conftest.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | plugins/dbnd-spark/tests/conftest.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | plugins/dbnd-spark/tests/conftest.py | dmytrostriletskyi/dbnd | d4a5f5167523e80439c9d64182cdc87b40cbc48f | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import pytest
from dbnd._core.tracking.schemas.column_stats import ColumnStatsArgs
from dbnd.testing.test_config_setter import add_test_configuration
pytest_plugins = [
"dbnd.testing.pytest_dbnd_plugin",
"dbnd.testing.pytest_dbnd_markers_plugin",
"dbnd.testing.pytest_dbnd_home_plugin"... | 26.622642 | 87 | 0.510985 |
d53ae4ecadd589c1bde47e1a021fe226a48c9d63 | 22 | py | Python | cadnano/strand/__init__.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 69 | 2015-01-13T02:54:40.000Z | 2022-03-27T14:25:51.000Z | cadnano/strand/__init__.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 127 | 2015-01-01T06:26:34.000Z | 2022-03-02T12:48:05.000Z | cadnano/strand/__init__.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 48 | 2015-01-22T19:57:49.000Z | 2022-03-27T14:27:53.000Z | from .strand import *
| 11 | 21 | 0.727273 |
d53ae50f76ceb2576ddc24e612ba89ba5e653d20 | 39,015 | py | Python | tests/test_sqs/test_sqs.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 2 | 2018-01-29T14:50:38.000Z | 2018-05-12T10:45:31.000Z | tests/test_sqs/test_sqs.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 1 | 2021-03-19T11:56:45.000Z | 2021-03-19T11:56:45.000Z | tests/test_sqs/test_sqs.py | harveywi/moto | 3a5d857a60c3a2d140ed2c8adfe8dcaf71a4cac8 | [
"Apache-2.0"
] | 12 | 2017-09-06T22:11:15.000Z | 2021-05-28T17:22:31.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import boto
import boto3
import botocore.exceptions
from botocore.exceptions import ClientError
from boto.exception import SQSError
from boto.sqs.message import RawMessage, Message
from freezegun import freeze_time
import base64
import json
imp... | 31.46371 | 124 | 0.682455 |
d53aebf6bf941d9fc08d5cf118aa7c69dc5ff2e7 | 1,373 | py | Python | actions/generic_query.py | macbluff/macbluff | 22ac08925cb73e57797ed675198bbb141855a2fa | [
"Apache-2.0"
] | 1 | 2019-08-26T02:31:43.000Z | 2019-08-26T02:31:43.000Z | actions/generic_query.py | macbluff/macbluff | 22ac08925cb73e57797ed675198bbb141855a2fa | [
"Apache-2.0"
] | 13 | 2019-04-08T19:37:30.000Z | 2022-03-31T16:17:37.000Z | actions/generic_query.py | macbluff/macbluff | 22ac08925cb73e57797ed675198bbb141855a2fa | [
"Apache-2.0"
] | 6 | 2019-04-08T19:22:41.000Z | 2021-10-11T18:42:08.000Z | from lib.base_action import BaseAction
class SQLQueryAction(BaseAction):
def __init__(self, config):
"""Creates a new BaseAction given a StackStorm config object (kwargs works too)
:param config: StackStorm configuration object for the pack
:returns: a new BaseAction
"""
su... | 37.108108 | 87 | 0.621996 |
d53b03546d04ff73f179d4ca2bf16b89ca0c78f6 | 107 | py | Python | info_proj/hw_site/views.py | adamkwolf/handwriting_cnn | 83cee31622b98f95660e5f09b9d4cf4f53b519ba | [
"Apache-2.0"
] | null | null | null | info_proj/hw_site/views.py | adamkwolf/handwriting_cnn | 83cee31622b98f95660e5f09b9d4cf4f53b519ba | [
"Apache-2.0"
] | null | null | null | info_proj/hw_site/views.py | adamkwolf/handwriting_cnn | 83cee31622b98f95660e5f09b9d4cf4f53b519ba | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
def index(request):
return render(request, 'hw_site/index.html')
| 17.833333 | 48 | 0.757009 |
d53b1a72f478ab3427c49988944646ee2299ecfd | 2,554 | py | Python | metric/core/builders.py | feymanpriv/pymetric | f7c4f354f87969142263c87e1fb33499b7b2d62a | [
"MIT"
] | 62 | 2020-08-26T11:06:37.000Z | 2022-03-29T03:26:00.000Z | metric/core/builders.py | ym547559398/pycls | f7c4f354f87969142263c87e1fb33499b7b2d62a | [
"MIT"
] | 2 | 2021-06-02T10:19:53.000Z | 2021-12-06T05:41:23.000Z | metric/core/builders.py | ym547559398/pycls | f7c4f354f87969142263c87e1fb33499b7b2d62a | [
"MIT"
] | 11 | 2020-09-14T12:26:17.000Z | 2021-10-04T06:29:35.000Z | #!/usr/bin/env python3
# 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.
"""Model and loss construction functions."""
import torch
from metric.core.config import cfg
from metric.modeling.bac... | 27.170213 | 86 | 0.69538 |
d53b2044015e081b81ba3975a2a465491a96fda6 | 45,982 | py | Python | seqio/feature_converters.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | 144 | 2021-04-16T00:43:10.000Z | 2022-03-21T08:51:27.000Z | seqio/feature_converters.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | 49 | 2021-04-26T06:28:51.000Z | 2022-03-28T23:55:16.000Z | seqio/feature_converters.py | ayushkumar63123/seqio | 23bcb59df59798074d7d5896a131980137c69ec8 | [
"Apache-2.0"
] | 13 | 2021-04-27T10:28:27.000Z | 2022-03-10T18:43:37.000Z | # Copyright 2021 The SeqIO Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 40.548501 | 88 | 0.677156 |
d53b38584fb7d3ed12a08502a1875345452f26e7 | 13,372 | py | Python | src/alfasim_sdk/_internal/context.py | prusse-martin/alfasim-sdk | f6992cb3c1c51e25bf55470508f406ee6c5a5e9b | [
"MIT"
] | null | null | null | src/alfasim_sdk/_internal/context.py | prusse-martin/alfasim-sdk | f6992cb3c1c51e25bf55470508f406ee6c5a5e9b | [
"MIT"
] | null | null | null | src/alfasim_sdk/_internal/context.py | prusse-martin/alfasim-sdk | f6992cb3c1c51e25bf55470508f406ee6c5a5e9b | [
"MIT"
] | null | null | null | from typing import List
from typing import Optional
import attr
from attr.validators import deep_iterable
from attr.validators import in_
from attr.validators import instance_of
from attr.validators import optional
from barril.units import Scalar
from alfasim_sdk._internal.constants import EmulsionModelType
from alfa... | 35.189474 | 140 | 0.678582 |
d53b418c6b9f4e60025a0624e9f29a0f91090aa3 | 2,116 | py | Python | vctl/get/datastores.py | GMH501/vctl-vsphere-cli | eaa26b79e13917ce06cf3a23f19a1c4b6761dffa | [
"Apache-2.0"
] | 1 | 2020-07-12T14:27:34.000Z | 2020-07-12T14:27:34.000Z | vctl/get/datastores.py | GMH501/vctl-vsphere-cli | eaa26b79e13917ce06cf3a23f19a1c4b6761dffa | [
"Apache-2.0"
] | 3 | 2021-03-25T23:59:37.000Z | 2021-06-02T02:28:17.000Z | vctl/get/datastores.py | GMH501/vctl-vsphere-cli | eaa26b79e13917ce06cf3a23f19a1c4b6761dffa | [
"Apache-2.0"
] | null | null | null | import click
from pyVmomi import vim, vmodl
from vctl.helpers.vmware import get_obj
from vctl.helpers.helpers import load_context
from vctl.helpers.auth import inject_token
from vctl.exceptions.exceptions import ContextNotFound
@click.command()
@click.option('--context', '-c',
help='the context you wan... | 35.864407 | 100 | 0.545841 |
d53b505661444d2f905685f94eaf21e9e7fffa2a | 20,705 | py | Python | pyquil/_parser/PyQuilListener.py | ecpeterson/pyquil | b0548d5c5f4ee75d4bcd301202a872a9152d212a | [
"Apache-2.0"
] | 2 | 2019-10-06T12:54:56.000Z | 2021-01-15T06:23:28.000Z | pyquil/_parser/PyQuilListener.py | ecpeterson/pyquil | b0548d5c5f4ee75d4bcd301202a872a9152d212a | [
"Apache-2.0"
] | 2 | 2019-06-02T03:16:24.000Z | 2019-06-04T05:16:06.000Z | pyquil/_parser/PyQuilListener.py | ecpeterson/pyquil | b0548d5c5f4ee75d4bcd301202a872a9152d212a | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright 2016-2017 Rigetti Computing
#
# 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... | 39.139887 | 129 | 0.629606 |
d53b7e096317ad4be584d2276d6427259d57105f | 1,688 | py | Python | app.py | Shashank7426/loanpredict | 8b92c1668962450088461d651d6f4de1505d2399 | [
"MIT"
] | null | null | null | app.py | Shashank7426/loanpredict | 8b92c1668962450088461d651d6f4de1505d2399 | [
"MIT"
] | null | null | null | app.py | Shashank7426/loanpredict | 8b92c1668962450088461d651d6f4de1505d2399 | [
"MIT"
] | 1 | 2021-09-12T16:09:05.000Z | 2021-09-12T16:09:05.000Z | # Importing essential libraries
from flask import Flask, render_template, request
import pickle
import numpy as np
app = Flask(__name__)
# Load the regression model
regressor = pickle.load(open('model1.pkl', 'rb'))
@app.route('/')
def home():
return render_template('index.html')
@app.route('/predict', methods=... | 33.098039 | 175 | 0.620261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.