hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796e8ddf08cde23d3196d5b7dfe002d1b9a49c25 | 2,280 | py | Python | homeassistant/components/starline/device_tracker.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/starline/device_tracker.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | homeassistant/components/starline/device_tracker.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """StarLine device tracker."""
from homeassistant.components.device_tracker.config_entry import TrackerEntity
from homeassistant.components.device_tracker.const import SOURCE_TYPE_GPS
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_plat... | 34.029851 | 84 | 0.711842 |
796e8eadb44175f877640ddb5f5b1ec67ec62c98 | 360 | py | Python | python/fix-encoding/fix-cp1252-encoding.py | bmaupin/graveyard | 71d52fe6589ce13dfe7433906d1aa50df48c9f94 | [
"MIT"
] | 1 | 2019-11-23T10:44:58.000Z | 2019-11-23T10:44:58.000Z | python/fix-encoding/fix-cp1252-encoding.py | bmaupin/graveyard | 71d52fe6589ce13dfe7433906d1aa50df48c9f94 | [
"MIT"
] | 8 | 2020-07-16T07:14:12.000Z | 2020-10-14T17:25:33.000Z | python/fix-encoding/fix-cp1252-encoding.py | bmaupin/graveyard | 71d52fe6589ce13dfe7433906d1aa50df48c9f94 | [
"MIT"
] | 1 | 2019-11-23T10:45:00.000Z | 2019-11-23T10:45:00.000Z | #!/usr/bin/env python
import sys
def main():
if len(sys.argv) < 2:
sys.exit('Usage: {} INFILE OUTFILE'.format(sys.argv[0]))
with open(sys.argv[1], 'r') as infile, open(sys.argv[2], 'w') as outfile:
for line in infile:
outfile.write(line.decode("utf-8").encode("windows-1252"))
... | 22.5 | 77 | 0.583333 |
796e8ebb79e1e21af1cf4e12a632fa8c9811f43e | 8,557 | py | Python | toolset/run-tests.py | amitksingh1490/FrameworkBenchmarks | de9fa689b920e69049541599326ccff9b7670c19 | [
"BSD-3-Clause"
] | null | null | null | toolset/run-tests.py | amitksingh1490/FrameworkBenchmarks | de9fa689b920e69049541599326ccff9b7670c19 | [
"BSD-3-Clause"
] | null | null | null | toolset/run-tests.py | amitksingh1490/FrameworkBenchmarks | de9fa689b920e69049541599326ccff9b7670c19 | [
"BSD-3-Clause"
] | null | null | null | import argparse
import socket
import sys
import signal
import traceback
from toolset.benchmark.benchmarker import Benchmarker
from toolset.utils.scaffolding import Scaffolding
from toolset.utils.audit import Audit
from toolset.utils import cleaner
from toolset.utils.benchmark_config import BenchmarkConfig
from toolset.... | 32.660305 | 143 | 0.577305 |
796e8f3bcc56a199d68c04064efb7317ad10a081 | 4,831 | py | Python | test/functional/interface_zmq.py | Caprica01/DSW | abc4656631693ad9c9e6f770a32d6b347b623f39 | [
"MIT"
] | 10 | 2021-03-13T13:48:52.000Z | 2022-02-28T18:16:18.000Z | test/functional/interface_zmq.py | Tipu-at-decenomy/DSW | 63cf4b77d5c40e6f86966bdbe0f818a36363ebd1 | [
"MIT"
] | 12 | 2021-02-22T14:32:02.000Z | 2021-10-31T13:35:43.000Z | test/functional/interface_zmq.py | Tipu-at-decenomy/DSW | 63cf4b77d5c40e6f86966bdbe0f818a36363ebd1 | [
"MIT"
] | 12 | 2021-04-07T01:01:07.000Z | 2022-02-26T14:36:08.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the ZMQ notification interface."""
import configparser
import os
import struct
import time
from t... | 37.449612 | 148 | 0.633823 |
796e8fb13a5c6876bdd0b5f8d27ba1f49e6bcf42 | 36 | py | Python | xontrib_pipeliner_asttokens/version.py | anki-code/xontrib-pipeliner | 022071c86685746e6b6ccc64199fc1b9a36dff39 | [
"BSD-2-Clause"
] | 27 | 2020-05-02T17:02:51.000Z | 2022-03-16T04:53:47.000Z | xontrib_pipeliner_asttokens/version.py | anki-code/xontrib-pipeliner | 022071c86685746e6b6ccc64199fc1b9a36dff39 | [
"BSD-2-Clause"
] | 6 | 2020-05-05T11:43:59.000Z | 2022-03-21T08:03:56.000Z | xontrib_pipeliner_asttokens/version.py | anki-code/xontrib-pipeliner | 022071c86685746e6b6ccc64199fc1b9a36dff39 | [
"BSD-2-Clause"
] | 3 | 2021-09-12T11:24:01.000Z | 2022-03-18T20:19:15.000Z | __version__ = "2.0.5.dev2+g49e7e8c"
| 18 | 35 | 0.722222 |
796e905df59bc31b01371042b7976175175a47f0 | 4,556 | py | Python | platon-press-predding/batch_generate_signed_transfer.py | chenxiaodai/tools | 5d9a259be662d2f7e17e2cb8bbe0ce0b0a254ad8 | [
"MIT"
] | null | null | null | platon-press-predding/batch_generate_signed_transfer.py | chenxiaodai/tools | 5d9a259be662d2f7e17e2cb8bbe0ce0b0a254ad8 | [
"MIT"
] | 7 | 2020-06-06T01:48:48.000Z | 2022-03-12T00:26:36.000Z | platon-press-predding/batch_generate_signed_transfer.py | chenxiaodai/tools | 5d9a259be662d2f7e17e2cb8bbe0ce0b0a254ad8 | [
"MIT"
] | 1 | 2020-05-13T02:05:49.000Z | 2020-05-13T02:05:49.000Z | import datetime
import json
import os
import sys
import click
from hexbytes import HexBytes
from platon_utility import write_csv, read_csv, get_time_stamp
from client_sdk_python import Web3
from client_sdk_python.eth import Eth
from client_sdk_python.providers import HTTPProvider
# 生成未签名交易
def transfer_sign(from_ad... | 35.874016 | 117 | 0.602941 |
796e9067dcfd816c41f2cca720435a85a0bcf311 | 5,453 | py | Python | examples/test_printlobbychat.py | Enc0de-Git/pyrs | 8846031d24fee10b3d9b4f0ffe3f81df448e5dd6 | [
"BSD-3-Clause"
] | 3 | 2016-10-08T10:41:25.000Z | 2021-11-30T00:12:28.000Z | examples/test_printlobbychat.py | Enc0de-Git/pyrs | 8846031d24fee10b3d9b4f0ffe3f81df448e5dd6 | [
"BSD-3-Clause"
] | 1 | 2016-02-07T21:19:33.000Z | 2016-02-07T21:27:29.000Z | examples/test_printlobbychat.py | drbob/pyrs | 9adc07ff3bda6c382e73c47cb61c5be2000715ba | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Basic Example to connect to rs-nogui.
# You must edit this file with your username and password before running it.
#
import pyrs.comms
import pyrs.rpc
import pyrs.msgs
import time
# Message Definitions.
from pyrs.proto import core_pb2
from pyrs.proto import peers_pb2
from pyrs.proto import syste... | 29.160428 | 125 | 0.683477 |
796e90f5e9466b11af9458aa63b6a172278350b3 | 5,231 | py | Python | lib/models/cuboid_proposal_net.py | Yu-Yy/voxelpose-pytorch | ff5ba08e88625b75f2e0b0454db4de67fb950f09 | [
"MIT"
] | 2 | 2021-05-21T12:48:24.000Z | 2021-05-24T12:55:57.000Z | lib/models/cuboid_proposal_net.py | Yu-Yy/voxelpose-pytorch | ff5ba08e88625b75f2e0b0454db4de67fb950f09 | [
"MIT"
] | null | null | null | lib/models/cuboid_proposal_net.py | Yu-Yy/voxelpose-pytorch | ff5ba08e88625b75f2e0b0454db4de67fb950f09 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# ------------------------------------------------------------------------------
import torch
import torch.nn as nn
from models.v2v_net import ... | 43.231405 | 150 | 0.611355 |
796e90fae2d4fa00e66c39c6bbad04e28be37d95 | 26 | py | Python | app/resources/__init__.py | M4cs/SimplyBlog | 0b3b5e7605df269d71a556c70f705f65bed14664 | [
"MIT"
] | 10 | 2019-09-17T13:29:42.000Z | 2021-08-13T22:40:58.000Z | app/resources/__init__.py | M4cs/SimplyBlog | 0b3b5e7605df269d71a556c70f705f65bed14664 | [
"MIT"
] | null | null | null | app/resources/__init__.py | M4cs/SimplyBlog | 0b3b5e7605df269d71a556c70f705f65bed14664 | [
"MIT"
] | 1 | 2020-08-06T02:22:49.000Z | 2020-08-06T02:22:49.000Z | from .upload import Upload | 26 | 26 | 0.846154 |
796e917b9e0355c24c3c8df2232f185785e71ee4 | 740 | py | Python | migrations/versions/1595a25b603b_.py | moahmed-arafa/Borsa | 03c6b0acb6092e097519ee2dbfccc0148c71b5e6 | [
"Unlicense"
] | null | null | null | migrations/versions/1595a25b603b_.py | moahmed-arafa/Borsa | 03c6b0acb6092e097519ee2dbfccc0148c71b5e6 | [
"Unlicense"
] | null | null | null | migrations/versions/1595a25b603b_.py | moahmed-arafa/Borsa | 03c6b0acb6092e097519ee2dbfccc0148c71b5e6 | [
"Unlicense"
] | null | null | null | """empty message
Revision ID: 1595a25b603b
Revises: 2d70b2b7f421
Create Date: 2017-01-07 15:40:55.337138
"""
# revision identifiers, used by Alembic.
revision = '1595a25b603b'
down_revision = '2d70b2b7f421'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | 25.517241 | 81 | 0.695946 |
796e92b9b2a4eb1de6513af44b96ce1bace96a38 | 1,747 | py | Python | controller/ueditor.py | ximury/Blog | e30b3e61b26f2d28c9b9e4f6367068474ddd4d04 | [
"Apache-2.0"
] | null | null | null | controller/ueditor.py | ximury/Blog | e30b3e61b26f2d28c9b9e4f6367068474ddd4d04 | [
"Apache-2.0"
] | null | null | null | controller/ueditor.py | ximury/Blog | e30b3e61b26f2d28c9b9e4f6367068474ddd4d04 | [
"Apache-2.0"
] | null | null | null | import os
import time
from flask import Blueprint, abort, render_template, request, jsonify
from common.utility import compress_image
ueditor = Blueprint('ueditor', __name__)
@ueditor.route('/uedit', methods=['GET', 'POST'])
def uedit():
# 根据ueditor的接口定义规则,如果前端参数为action=config,
# 则表示试图请求后台的config.json文件,请求... | 33.596154 | 86 | 0.609616 |
796e92f001ca3e665416958590f59a045f45a225 | 608 | py | Python | wallpapers/helper/gnome.py | jabbalaci/Wallpaper-Downloader-and-Rotator-for-Gnome | 237109683ac8f62a1acf75eb8260dc4e323af105 | [
"CNRI-Python"
] | 1 | 2015-02-05T16:48:27.000Z | 2015-02-05T16:48:27.000Z | wallpapers/helper/gnome.py | jabbalaci/Wallpaper-Downloader-and-Rotator-for-Gnome | 237109683ac8f62a1acf75eb8260dc4e323af105 | [
"CNRI-Python"
] | null | null | null | wallpapers/helper/gnome.py | jabbalaci/Wallpaper-Downloader-and-Rotator-for-Gnome | 237109683ac8f62a1acf75eb8260dc4e323af105 | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/env python
"""
Interaction with Gnome.
Current options: set the wallpaper.
"""
import shlex
from subprocess import call, PIPE
def set_wallpaper_image(img, mode='stretched'):
"""Set the given file as wallpaper.
Possible modes: wallpaper, centered, scaled, stretched."""
cmd1 = "gconftool... | 26.434783 | 111 | 0.707237 |
796e9344a41a754f05f5422fc5e895905ec93625 | 36,818 | py | Python | src/ploomber/sources/notebooksource.py | jramirez857/ploomber | 94751fb46d5f0e2c4658463601e08a49f55ba08c | [
"Apache-2.0"
] | null | null | null | src/ploomber/sources/notebooksource.py | jramirez857/ploomber | 94751fb46d5f0e2c4658463601e08a49f55ba08c | [
"Apache-2.0"
] | null | null | null | src/ploomber/sources/notebooksource.py | jramirez857/ploomber | 94751fb46d5f0e2c4658463601e08a49f55ba08c | [
"Apache-2.0"
] | null | null | null | """
On languages and kernels
------------------------
NotebookSource represents source code in a Jupyter notebook format (language
agnostic). Apart from .ipynb, we also support any other extension supported
by jupytext.
Given a notebook, we have to know which language it is written in to extract
upstream/product varia... | 34.538462 | 148 | 0.621299 |
796e9417986165275c196db256e22827b0b33461 | 873 | py | Python | test_old.py | quasarswastik/CITS3002 | fa723114fe0728736a6bf0aea41c311286e166f2 | [
"MIT"
] | null | null | null | test_old.py | quasarswastik/CITS3002 | fa723114fe0728736a6bf0aea41c311286e166f2 | [
"MIT"
] | null | null | null | test_old.py | quasarswastik/CITS3002 | fa723114fe0728736a6bf0aea41c311286e166f2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# import http.server
import socket
import socketserver
import sys
def serverStart():
stn_name = sys.argv[1]
HOST = '127.0.0.1'
PORT = int(sys.argv[2])
# data = b'''HTTP/1.1 200 OK
# Content-Type: text/html
# Connection: Closed
# <html>
# <body>
# <h1>Hello from nc!</h1>
# </body>
#... | 20.785714 | 64 | 0.573883 |
796e957ecde7f168b5f006f899608be46d23e9fd | 651 | py | Python | WebMirror/management/rss_parser_funcs/feed_parse_extractEatapplepiesCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 193 | 2016-08-02T22:04:35.000Z | 2022-03-09T20:45:41.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractEatapplepiesCom.py | fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 533 | 2016-08-23T20:48:23.000Z | 2022-03-28T15:55:13.000Z | WebMirror/management/rss_parser_funcs/feed_parse_extractEatapplepiesCom.py | rrosajp/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | [
"BSD-3-Clause"
] | 19 | 2015-08-13T18:01:08.000Z | 2021-07-12T17:13:09.000Z | def extractEatapplepiesCom(item):
'''
Parser for 'eatapplepies.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('Trash of the Count\'s Family', 'Trash of the Count\'s Family', ... | 31 | 108 | 0.611367 |
796e9720e75cca1cf43894c4e36857d587b6c486 | 10,080 | py | Python | library/server.py | saxtouri/kamaki-ansible-role | b228506b715a47ef89f408406f255ec86d426eca | [
"Apache-2.0"
] | 1 | 2021-04-26T08:46:17.000Z | 2021-04-26T08:46:17.000Z | library/server.py | saxtouri/kamaki-ansible-role | b228506b715a47ef89f408406f255ec86d426eca | [
"Apache-2.0"
] | null | null | null | library/server.py | saxtouri/kamaki-ansible-role | b228506b715a47ef89f408406f255ec86d426eca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright 2018 Stavros Sachtouris <saxtouri@grnet.gr>
from kamaki.clients import ClientError
from kamaki.clients.cyclades import CycladesClient, CycladesNetworkClient
from kamaki.clients.network import NetworkClient
from kamaki.cli import logging
from kamaki.clients.utils import https
from ansible.m... | 37.752809 | 79 | 0.525298 |
796e977c972360a6c76496e7044cdf929f842e2a | 2,023 | py | Python | indelvcf/concat.py | ncod3/indelvcf | 83481bfe0913a62227c16ff91310a5982f9a4658 | [
"MIT"
] | null | null | null | indelvcf/concat.py | ncod3/indelvcf | 83481bfe0913a62227c16ff91310a5982f9a4658 | [
"MIT"
] | null | null | null | indelvcf/concat.py | ncod3/indelvcf | 83481bfe0913a62227c16ff91310a5982f9a4658 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import os
import errno
import time
import re
from indelvcf.logging_config import LogConf
log = LogConf.open_log(__name__)
# global configuration
import indelvcf.glv as glv
import indelvcf.utils as utl
class Concat(object):
def __init__(self):
pass
def run(self)... | 24.670732 | 77 | 0.52002 |
796e979302c75fdd278e23cf3a316098b9095acf | 5,103 | py | Python | python/pandas_meta.py | gavinln/db-metadata | efa1dcd96171c93527e7bb45b1ce6229820170ea | [
"Apache-2.0"
] | null | null | null | python/pandas_meta.py | gavinln/db-metadata | efa1dcd96171c93527e7bb45b1ce6229820170ea | [
"Apache-2.0"
] | null | null | null | python/pandas_meta.py | gavinln/db-metadata | efa1dcd96171c93527e7bb45b1ce6229820170ea | [
"Apache-2.0"
] | 1 | 2020-05-11T14:43:22.000Z | 2020-05-11T14:43:22.000Z | '''
Handling large data in Pandas 10 million to 100 million Pandas is built on
numpy. Numpy can work with numeric data like integers and floats very
efficiently. Pandas can store a much wider range of objects than numpy which
include numeric data, strings, dates and times. However the non-numpy types are
not stored ver... | 25.262376 | 79 | 0.632765 |
796e98f89e81896b702702f0ad9625e300644e7c | 374 | py | Python | pil_pillow__examples/square_to_circle__avatar/main.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | pil_pillow__examples/square_to_circle__avatar/main.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | pil_pillow__examples/square_to_circle__avatar/main.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
from PIL import Image, ImageDraw
img = Image.open('input.jpg')
bigsize = img.size[0] * 3, img.size[1] * 3
mask = Image.new('L', bigsize, 0)
draw = ImageDraw.Draw(mask)
draw.ellipse((0, 0) + bigsize, fill=255)
mask = mask.resize(img.size, Image... | 19.684211 | 45 | 0.671123 |
796e9a074f6a18b55f5f62f50e6a09a3a2b74076 | 6,940 | py | Python | aiida/restapi/api.py | ltalirz/aiida_core | 7d0d5a90bd546549b1f87a74567a86db5ff905f1 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2020-12-20T08:41:52.000Z | 2020-12-20T08:41:52.000Z | aiida/restapi/api.py | pranjalmish1/aiida-core | 6c60afb1c81b88a4864573803860ef38b9da5e99 | [
"MIT",
"BSD-3-Clause"
] | 3 | 2018-04-13T08:15:28.000Z | 2019-11-03T22:36:03.000Z | aiida/restapi/api.py | pranjalmish1/aiida-core | 6c60afb1c81b88a4864573803860ef38b9da5e99 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 33.52657 | 109 | 0.524207 |
796e9a271883a8bcc390488fbaafc781dbd9c2af | 1,107 | py | Python | saytex/layers/prettification.py | Sousho/saytex-lyx | 626b438baec950867bfd205912137b5f8e0475e3 | [
"MIT"
] | 2 | 2019-11-18T18:58:15.000Z | 2020-02-20T08:53:25.000Z | saytex/layers/prettification.py | Sousho/saytex-lyx | 626b438baec950867bfd205912137b5f8e0475e3 | [
"MIT"
] | 1 | 2022-02-15T00:05:25.000Z | 2022-02-15T00:54:17.000Z | saytex/layers/prettification.py | Sousho/saytex-lyx | 626b438baec950867bfd205912137b5f8e0475e3 | [
"MIT"
] | 1 | 2021-11-23T00:57:51.000Z | 2021-11-23T00:57:51.000Z | """
Does various things to produce prettier LaTeX strings, such as
inserting spaces into integrals.
"""
from .layer import SaytexLayer
import re
class PrettificationLayer(SaytexLayer):
def execute_layer(self, input_string):
"""
Adds spaces to integrals to produce prettier equations.
"""
... | 29.131579 | 82 | 0.658537 |
796e9ac248cc2ef6c9a18675665bbc2d921959b9 | 9,730 | py | Python | ci/test/distributed_run.py | sji15/oneflow | 523888bc251920c39021e7a0e063118d53c4cfd1 | [
"Apache-2.0"
] | null | null | null | ci/test/distributed_run.py | sji15/oneflow | 523888bc251920c39021e7a0e063118d53c4cfd1 | [
"Apache-2.0"
] | null | null | null | ci/test/distributed_run.py | sji15/oneflow | 523888bc251920c39021e7a0e063118d53c4cfd1 | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
import socket
import tempfile
from contextlib import closing
from subprocess import TimeoutExpired
import argparse
import uuid
FIX_SSH_PERMISSION = """
mkdir -p /run/sshd
chown root ~/.ssh
chmod 700 ~/.ssh
chown root ~/.ssh/*
chmod 600 ~/.ssh/*
chmod 400 ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rs... | 33.66782 | 297 | 0.668243 |
796e9d054009fe71a4c5e49bdb0b5c0c1e60eab5 | 691 | py | Python | glpi_ticket.py | storagebot/glpi-sdk-python | 6c869311e4ee7f039870767a9b8f0a28815003dd | [
"Apache-2.0"
] | null | null | null | glpi_ticket.py | storagebot/glpi-sdk-python | 6c869311e4ee7f039870767a9b8f0a28815003dd | [
"Apache-2.0"
] | null | null | null | glpi_ticket.py | storagebot/glpi-sdk-python | 6c869311e4ee7f039870767a9b8f0a28815003dd | [
"Apache-2.0"
] | null | null | null | from .glpi import GlpiService
class GlpiTicket(GlpiService):
""" Client for GLPI Ticket item """
def __init__(self, url, app_token, username,
password):
""" Construct an instance for Ticket item """
GlpiService.__init__(
self, url, app_token, username=username,
... | 28.791667 | 67 | 0.541245 |
796e9d4a2949e5514ca9ccc54a6ef9d724e8389e | 2,803 | py | Python | tests/views/test_verification.py | nigoroll/django-rest-framework-jwt | 737464f7a8b546165fdfc870b73c8059ed926327 | [
"MIT"
] | null | null | null | tests/views/test_verification.py | nigoroll/django-rest-framework-jwt | 737464f7a8b546165fdfc870b73c8059ed926327 | [
"MIT"
] | null | null | null | tests/views/test_verification.py | nigoroll/django-rest-framework-jwt | 737464f7a8b546165fdfc870b73c8059ed926327 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
def test_invalid_token_returns_validation_error(call_auth_verify_endpoint):
expected_output = {"non_field_errors": [_(... | 33.369048 | 76 | 0.780235 |
796e9e954e57e51d01abcbb8744d00c389b82256 | 19,154 | py | Python | storm_control/sc_hardware/photometrics/pvcam.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T20:25:59.000Z | 2021-03-17T20:25:59.000Z | storm_control/sc_hardware/photometrics/pvcam.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | null | null | null | storm_control/sc_hardware/photometrics/pvcam.py | BoettigerLab/scopeTest | 50c6601c952adf1d63c7f27b1aba8890e789c280 | [
"MIT"
] | 1 | 2021-03-17T21:24:35.000Z | 2021-03-17T21:24:35.000Z | #!/usr/bin/env python
"""
A ctypes based interface to the Photometrics PVCAM library.
Hazen 10/17, Alistair 10/20
"""
import ctypes
import numpy
import sys
import storm_control.sc_library.halExceptions as halExceptions
import storm_control.sc_hardware.photometrics.pvcam_constants as pvc
pvcam = None
def check(value... | 34.264758 | 224 | 0.561293 |
796e9fd530860de04db25945474332f56072d253 | 2,499 | py | Python | Project_Basic_struct/VoiceAssistant_main.py | SohamRatnaparkhi/Project | d5b556099752c5bc3894e63e2d055eda7a4e6d5e | [
"MIT"
] | null | null | null | Project_Basic_struct/VoiceAssistant_main.py | SohamRatnaparkhi/Project | d5b556099752c5bc3894e63e2d055eda7a4e6d5e | [
"MIT"
] | null | null | null | Project_Basic_struct/VoiceAssistant_main.py | SohamRatnaparkhi/Project | d5b556099752c5bc3894e63e2d055eda7a4e6d5e | [
"MIT"
] | null | null | null | from speakListen import *
from websiteWork import *
from textRead import *
from dictator import *
from menu import *
from speechtotext import *
from TextTospeech import *
def main():
start = 0
end = 0
if start == 0:
print("\nSay \"Hello Python\" to activate the Voice Assistant!")
start += ... | 31.632911 | 157 | 0.420168 |
796ea06c23be5da5d87f559c0c23cc095c0ec0e8 | 11,165 | py | Python | tests/cli/test_analyze.py | Exef/brownie | f111d299974f11e451b0acd790e12b40986659e4 | [
"MIT"
] | 1 | 2019-10-03T08:31:21.000Z | 2019-10-03T08:31:21.000Z | tests/cli/test_analyze.py | Exef/brownie | f111d299974f11e451b0acd790e12b40986659e4 | [
"MIT"
] | null | null | null | tests/cli/test_analyze.py | Exef/brownie | f111d299974f11e451b0acd790e12b40986659e4 | [
"MIT"
] | null | null | null | import json
from copy import deepcopy
from pathlib import Path
from unittest import mock
import pytest
from mythx_models.response import DetectedIssuesResponse
from brownie._cli.analyze import (
assemble_contract_jobs,
construct_request_from_artifact,
construct_source_dict_from_artifact,
get_contract_... | 35 | 583 | 0.683565 |
796ea076ff3a8e0ac3efc20cb95795e32f030eb1 | 9,182 | py | Python | plaso/parsers/java_idx.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | 3 | 2016-03-11T02:47:08.000Z | 2016-12-24T03:19:27.000Z | plaso/parsers/java_idx.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | null | null | null | plaso/parsers/java_idx.py | cvandeplas/plaso | b625a2c267ed09505cfac84c9593d8c0922852b1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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 L... | 39.748918 | 80 | 0.709867 |
796ea11b132a066bb3895d1f302487856b87403a | 4,871 | py | Python | python/biggles/random_partition.py | fbi-octopus/biggles | 2dac4f1748ab87242951239caf274f302be1143a | [
"Apache-2.0"
] | 1 | 2019-11-15T14:01:59.000Z | 2019-11-15T14:01:59.000Z | python/biggles/random_partition.py | fbi-octopus/biggles | 2dac4f1748ab87242951239caf274f302be1143a | [
"Apache-2.0"
] | null | null | null | python/biggles/random_partition.py | fbi-octopus/biggles | 2dac4f1748ab87242951239caf274f302be1143a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Create random partitions
Created on Thu May 19 11:47:48 2016
@author: vcn81216
"""
from _utilities import obs_dist
import numpy as np
SPEED_OF_LIGHT = 3.0
def valid_link(o1, o2):
'''Is the link between two observations valid?
The spatial distance must be <= SPEED_OF_LIGHT*(time ... | 37.469231 | 100 | 0.527202 |
796ea15c47a070d4bcbc403cb9109c0ed21aadf4 | 1,899 | py | Python | tools/delay_wav.py | RangHo/webrtc-delay-estimation | 44fd98ce1bf778d51e3a3593bcd3c8d8a300b294 | [
"BSD-3-Clause"
] | 3 | 2021-04-05T14:24:37.000Z | 2021-07-02T02:45:28.000Z | tools/delay_wav.py | jzi040941/webrtc-delay-estimation | 44fd98ce1bf778d51e3a3593bcd3c8d8a300b294 | [
"BSD-3-Clause"
] | null | null | null | tools/delay_wav.py | jzi040941/webrtc-delay-estimation | 44fd98ce1bf778d51e3a3593bcd3c8d8a300b294 | [
"BSD-3-Clause"
] | 4 | 2021-03-18T14:09:40.000Z | 2022-03-15T07:39:15.000Z | import argparse
import random
import wave
def delay_wav(filename: str, delay_samples: int, output_filename: str = None, randomize: bool = False):
"""
Creates a delayed copy of the given .wav file.
"""
input_wav = wave.open(filename, 'rb')
# Information required to create delayed waves
sample_... | 30.142857 | 103 | 0.652449 |
796ea1a80d0a124a0218c5c2372cffe8c0be192f | 1,528 | py | Python | tests/test_verify.py | heitorsampaio/Github-Crawler | dc4f9ac0c493d25ad0d0b7dc8ff607525186a30c | [
"MIT"
] | null | null | null | tests/test_verify.py | heitorsampaio/Github-Crawler | dc4f9ac0c493d25ad0d0b7dc8ff607525186a30c | [
"MIT"
] | null | null | null | tests/test_verify.py | heitorsampaio/Github-Crawler | dc4f9ac0c493d25ad0d0b7dc8ff607525186a30c | [
"MIT"
] | null | null | null | import unittest
import json
from GitCraw.verify import Verify
class TestVerify(unittest.TestCase):
def set_up(self):
self.verify = Verify()
def testKeywordsOk(self):
self.set_up()
result = self.verify.verified_type("Issues")
self.assertEqual(True,result)
def testKeywords... | 29.384615 | 61 | 0.627618 |
796ea20eb764f0af867f5b35adb007fdcb988cbb | 49,287 | py | Python | tensorflow/python/ops/parsing_ops.py | YuMS/tensorflow | a4b352bfddd518b540c30e456f3bc0027ba9351f | [
"Apache-2.0"
] | 1 | 2021-03-16T12:20:03.000Z | 2021-03-16T12:20:03.000Z | tensorflow/python/ops/parsing_ops.py | YuMS/tensorflow | a4b352bfddd518b540c30e456f3bc0027ba9351f | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/parsing_ops.py | YuMS/tensorflow | a4b352bfddd518b540c30e456f3bc0027ba9351f | [
"Apache-2.0"
] | 1 | 2021-03-16T12:20:05.000Z | 2021-03-16T12:20:05.000Z | # Copyright 2015 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.598963 | 119 | 0.679429 |
796ea281380c7630d2bd43888af0f7d8386aded4 | 3,587 | py | Python | iv_plan/src/pqp_if.py | ryhanai/iv-plan-hironx | 2f89293a55df4608cb35e6a9676db97b9e486e7d | [
"BSD-3-Clause"
] | null | null | null | iv_plan/src/pqp_if.py | ryhanai/iv-plan-hironx | 2f89293a55df4608cb35e6a9676db97b9e486e7d | [
"BSD-3-Clause"
] | null | null | null | iv_plan/src/pqp_if.py | ryhanai/iv-plan-hironx | 2f89293a55df4608cb35e6a9676db97b9e486e7d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from math import *
from numpy import *
import operator
#from set_env import *
import libcpqp as cpqp
def build_model(debug=False):
b1 = cpqp.PQP_Model()
b2 = cpqp.PQP_Model()
if debug:
print("loading tris into PQP_Model objects...")
a = 1.0
... | 26.969925 | 92 | 0.585726 |
796ea288e4c21dc80c5669dac3ac08645c488ef0 | 12,882 | py | Python | python/fastscore/v1/rest.py | modelop/fastscore-sdk | 2206a4b9294cd83b6b8c2470193070bdc35a9061 | [
"Apache-2.0"
] | 2 | 2018-06-05T19:14:30.000Z | 2019-02-06T17:15:10.000Z | python/fastscore/v1/rest.py | modelop/fastscore-sdk | 2206a4b9294cd83b6b8c2470193070bdc35a9061 | [
"Apache-2.0"
] | 2 | 2018-02-20T21:58:43.000Z | 2018-10-07T10:10:54.000Z | python/fastscore/v1/rest.py | modelop/fastscore-sdk | 2206a4b9294cd83b6b8c2470193070bdc35a9061 | [
"Apache-2.0"
] | 1 | 2017-12-29T20:38:06.000Z | 2017-12-29T20:38:06.000Z | # coding: utf-8
"""
FastScore API (proxy)
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 1.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
impor... | 41.15655 | 120 | 0.530663 |
796ea4bd972adcbe1152230a648a500c4b15bb1c | 1,045 | py | Python | docs/archive/slash/docking-example/scripts/read_struc.py | sjdv1982/seamless | 1b814341e74a56333c163f10e6f6ceab508b7df9 | [
"MIT"
] | 15 | 2017-06-07T12:49:12.000Z | 2020-07-25T18:06:04.000Z | docs/archive/slash/docking-example/scripts/read_struc.py | sjdv1982/seamless | 1b814341e74a56333c163f10e6f6ceab508b7df9 | [
"MIT"
] | 110 | 2016-06-21T23:20:44.000Z | 2022-02-24T16:15:22.000Z | docs/archive/slash/docking-example/scripts/read_struc.py | sjdv1982/seamless | 1b814341e74a56333c163f10e6f6ceab508b7df9 | [
"MIT"
] | 6 | 2016-06-21T11:19:22.000Z | 2019-01-21T13:45:39.000Z | import itertools
def read_next_struc(lines, firstline):
assert int(firstline[1:]) == 1
mode = 1
ret0,ret1 = [],[]
lenstruc = 1
for l in lines:
l = l.rstrip("\n")
if mode == 2 and l[0] == "#":
mode = 0
yield ret0,ret1
if mode == 0:
assert int(l[1:]) == lenstruc + 1
mode =... | 21.770833 | 63 | 0.557895 |
796ea5f4802223f20df0975374aded3579881ba1 | 425 | py | Python | core/views.py | vitorpvcampos/djmenu | 49f9984007c94474b50122d81727a96b9c6c56c3 | [
"MIT"
] | 10 | 2020-06-02T16:23:15.000Z | 2021-05-25T16:17:19.000Z | core/views.py | vitorpvcampos/djmenu | 49f9984007c94474b50122d81727a96b9c6c56c3 | [
"MIT"
] | 241 | 2019-11-18T14:57:29.000Z | 2022-03-18T16:09:38.000Z | core/views.py | vitorpvcampos/djmenu | 49f9984007c94474b50122d81727a96b9c6c56c3 | [
"MIT"
] | 3 | 2020-03-12T15:08:04.000Z | 2020-06-22T19:50:16.000Z | from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from core.facade import get_dashboard_data_summary
def index(request):
resumo = get_dashboard_data_summary()
return render(request, 'core/index.html', {'resumo': resumo})
@login_required
def dashboard(request):
... | 26.5625 | 65 | 0.771765 |
796ea62f9916a4bf05902373eaf7a33a8bd92dea | 8,163 | py | Python | lib/python/treadmill/services/cgroup_service.py | bretttegart/treadmill | 812109e31c503a6eddaee2d3f2e1faf2833b6aaf | [
"Apache-2.0"
] | 2 | 2017-10-31T18:48:20.000Z | 2018-03-04T20:35:20.000Z | lib/python/treadmill/services/cgroup_service.py | bretttegart/treadmill | 812109e31c503a6eddaee2d3f2e1faf2833b6aaf | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill/services/cgroup_service.py | bretttegart/treadmill | 812109e31c503a6eddaee2d3f2e1faf2833b6aaf | [
"Apache-2.0"
] | null | null | null | """Cgroup management service.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import errno
import logging
import os
import select
from treadmill import cgroups
from treadmill import cgutils
from treadmill import ... | 34.588983 | 78 | 0.559843 |
796ea6cb46346727528c413b964f6575b1a94109 | 5,353 | py | Python | tests/test_simulation_manager.py | WGibbs15/CSE591AngrPyrebox | de5adb02167ec7e546e68672de3507b6109f916b | [
"BSD-2-Clause"
] | 2 | 2018-05-02T17:41:36.000Z | 2020-05-18T02:49:16.000Z | tests/test_simulation_manager.py | WGibbs15/CSE591AngrPyrebox | de5adb02167ec7e546e68672de3507b6109f916b | [
"BSD-2-Clause"
] | null | null | null | tests/test_simulation_manager.py | WGibbs15/CSE591AngrPyrebox | de5adb02167ec7e546e68672de3507b6109f916b | [
"BSD-2-Clause"
] | null | null | null | import nose
import angr
import logging
l = logging.getLogger("angr_tests.managers")
logging.getLogger('angr.manager').setLevel('DEBUG')
import os
location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests'))
addresses_fauxware = {
'armel': 0x8524,
'armhf': 0x104c9, # add... | 39.360294 | 121 | 0.700729 |
796ea7135631ae442bc7b3d2e187f943f9a87558 | 1,320 | py | Python | battleship/ai/dummy.py | agonopol/battleship-ai | eef51e972b26e5454dfc0d3685d417cc429969b1 | [
"MIT"
] | null | null | null | battleship/ai/dummy.py | agonopol/battleship-ai | eef51e972b26e5454dfc0d3685d417cc429969b1 | [
"MIT"
] | null | null | null | battleship/ai/dummy.py | agonopol/battleship-ai | eef51e972b26e5454dfc0d3685d417cc429969b1 | [
"MIT"
] | null | null | null | from battleship.ship import Ship
from battleship.grid import Grid
from battleship.ai.player import Player, Outcome
import numpy as np
import random
class Dummy(Player):
def __init__(self, size):
super(Dummy, self).__init__()
self.size = size
self.grid = Grid(size)
self.mask = np.ze... | 29.333333 | 61 | 0.581061 |
796ea730e71b344262ec88684df3f38f5da69def | 3,518 | py | Python | post_statistics/tests/test_viewsets.py | WesGtoX/statistics-manager | b07ee255a7811ca851e06f9911e640a7b1dc271c | [
"MIT"
] | null | null | null | post_statistics/tests/test_viewsets.py | WesGtoX/statistics-manager | b07ee255a7811ca851e06f9911e640a7b1dc271c | [
"MIT"
] | null | null | null | post_statistics/tests/test_viewsets.py | WesGtoX/statistics-manager | b07ee255a7811ca851e06f9911e640a7b1dc271c | [
"MIT"
] | null | null | null | from django.urls import reverse
from rest_framework import status
from rest_framework.test import APITestCase, APIClient
from post_statistics.tests.fixture import StatisticFactory
from faker import Faker
faker = Faker()
class StatisticViewSetTests(APITestCase):
def setUp(self) -> None:
self.client = ... | 43.432099 | 107 | 0.670267 |
796ea7df5b07aa9113db882489594c37e0124c7c | 3,032 | py | Python | python/venv/lib/python2.7/site-packages/novaclient/v2/versions.py | sjsucohort6/openstack | 8471e6e599c3f52319926a582358358ef84cbadb | [
"MIT"
] | null | null | null | python/venv/lib/python2.7/site-packages/novaclient/v2/versions.py | sjsucohort6/openstack | 8471e6e599c3f52319926a582358358ef84cbadb | [
"MIT"
] | null | null | null | python/venv/lib/python2.7/site-packages/novaclient/v2/versions.py | sjsucohort6/openstack | 8471e6e599c3f52319926a582358358ef84cbadb | [
"MIT"
] | null | null | null | # Copyright 2014 NEC Corporation. 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 ... | 36.53012 | 78 | 0.62467 |
796ea931b6928cc697083725e74c6ee24f44ea17 | 658 | py | Python | apps/account/migrations/0021_auto_20190305_1536.py | lianxiaopang/camel-store-api | b8021250bf3d8cf7adc566deebdba55225148316 | [
"Apache-2.0"
] | 12 | 2020-02-01T01:52:01.000Z | 2021-04-28T15:06:43.000Z | apps/account/migrations/0021_auto_20190305_1536.py | lianxiaopang/camel-store-api | b8021250bf3d8cf7adc566deebdba55225148316 | [
"Apache-2.0"
] | 5 | 2020-02-06T08:07:58.000Z | 2020-06-02T13:03:45.000Z | apps/account/migrations/0021_auto_20190305_1536.py | lianxiaopang/camel-store-api | b8021250bf3d8cf7adc566deebdba55225148316 | [
"Apache-2.0"
] | 11 | 2020-02-03T13:07:46.000Z | 2020-11-29T01:44:06.000Z | # Generated by Django 2.1.7 on 2019-03-05 07:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0020_auto_20190301_1152'),
]
operations = [
migrations.AlterModelOptions(
name='wxuseraccount',
options={... | 28.608696 | 131 | 0.615502 |
796eaa4a09708f9ab6b9226e3b7bc361bd9ef696 | 689 | py | Python | hydroshare/__init__.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hydroshare/__init__.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hydroshare/__init__.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z |
import logging
# Import defusedexpat here so that it can patch the standard library's expat XML parser, which is used by
# rdflib and other libraries in other parts of the app.
try:
import defusedexpat
# Import logging after defusedexpat in case logging uses XML (who knows)
except ImportError:
msg = ("U... | 36.263158 | 105 | 0.724238 |
796eab24f3a6feda5dfcdacc449c26c5dc581ca8 | 2,215 | py | Python | src/cryptoadvance/specter/devices/coldcard.py | DerM007/specter-desktop | d8094a6261006ea792d8858dbc691da5b7eee7ad | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/devices/coldcard.py | DerM007/specter-desktop | d8094a6261006ea792d8858dbc691da5b7eee7ad | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/devices/coldcard.py | DerM007/specter-desktop | d8094a6261006ea792d8858dbc691da5b7eee7ad | [
"MIT"
] | null | null | null | import urllib
from .sd_card_device import SDCardDevice
from ..util.xpub import get_xpub_fingerprint
from ..helpers import to_ascii20
from embit.psbt import PSBT, DerivationPath
from embit import bip32
from binascii import b2a_base64, a2b_base64
from collections import OrderedDict
CC_TYPES = {"legacy": "BIP45", "p2sh-s... | 33.560606 | 87 | 0.626637 |
796eacece676ce654537c0309e2e1ef8a7b8b615 | 40,263 | py | Python | DCSCN.py | tehtea/dcscn-super-resolution | c0fbbb73785a1361ef85a43ea829125d1558dbe8 | [
"MIT"
] | 5 | 2019-07-15T07:09:16.000Z | 2021-08-18T13:50:16.000Z | DCSCN.py | tehtea/dcscn-super-resolution | c0fbbb73785a1361ef85a43ea829125d1558dbe8 | [
"MIT"
] | null | null | null | DCSCN.py | tehtea/dcscn-super-resolution | c0fbbb73785a1361ef85a43ea829125d1558dbe8 | [
"MIT"
] | null | null | null | """
Paper: "Fast and Accurate Image Super Resolution by Deep CNN with Skip Connection and Network in Network"
Ver: 2.0
DCSCN model implementation (Transposed-CNN / Pixel Shuffler version)
See Detail: https://github.com/jiny2001/dcscn-super-resolution/
Please note this model is updated version of the paper.
If you wan... | 49.281518 | 176 | 0.597968 |
796eaddb6e8224177cbc015bd8d09deaa313def9 | 5,598 | py | Python | aoc/event2016/day22/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2016/day22/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | aoc/event2016/day22/solve.py | rjbatista/AoC | 5c6ca4bcb376c24ec730eb12fd7044f5326ee473 | [
"MIT"
] | null | null | null | import re
import itertools
from collections import deque
from copy import deepcopy
########
# PART 1
_debug = False
def process_line(line):
m = re.match(r'/dev/grid/node-x(\d+)-y(\d+)\s+(\d+)T\s+(\d+)T\s+(\d+)T\s+\d+%', line)
if m:
return int(m.group(1)), int(m.group(2)), int(m.group(3)), int(m.grou... | 24.660793 | 98 | 0.505895 |
796eae20779e7ad17194178379647b3da5f91ab0 | 1,031 | py | Python | acumos_dcae_model_runner/__init__.py | acumos/python-dcae-model-runner | f9574de3a8ea3ec3e34c09a28e141f797eb59d6e | [
"Apache-2.0",
"CC-BY-4.0"
] | 16 | 2018-07-28T00:01:57.000Z | 2021-12-03T19:30:52.000Z | acumos_dcae_model_runner/__init__.py | acumos/python-dcae-model-runner | f9574de3a8ea3ec3e34c09a28e141f797eb59d6e | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | acumos_dcae_model_runner/__init__.py | acumos/python-dcae-model-runner | f9574de3a8ea3ec3e34c09a28e141f797eb59d6e | [
"Apache-2.0",
"CC-BY-4.0"
] | 7 | 2018-07-30T21:48:45.000Z | 2022-01-26T11:01:17.000Z | # -*- coding: utf-8 -*-
# ===============LICENSE_START=======================================================
# Acumos Apache-2.0
# ===================================================================================
# Copyright (C) 2017-2018 AT&T Intellectual Property & Tech Mahindra. All rights reserved.
# ===========... | 51.55 | 90 | 0.523763 |
796eafd67d4f5f8a723703e2fdbfc0a6bbfa24cc | 3,783 | py | Python | canary/tasks/taskflow/driver.py | rackerlabs/canary | 22ea0380d2c69ab587f21099320ae62fa3281349 | [
"Apache-2.0"
] | 5 | 2016-07-14T02:11:46.000Z | 2017-09-15T21:50:57.000Z | canary/tasks/taskflow/driver.py | rackerlabs/canary | 22ea0380d2c69ab587f21099320ae62fa3281349 | [
"Apache-2.0"
] | 5 | 2015-05-29T18:15:24.000Z | 2016-02-16T15:31:04.000Z | canary/tasks/taskflow/driver.py | rackerlabs/canary | 22ea0380d2c69ab587f21099320ae62fa3281349 | [
"Apache-2.0"
] | 10 | 2015-05-28T13:56:01.000Z | 2020-10-25T02:17:14.000Z | # Copyright (c) 2015 Rackspace, 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 wr... | 37.455446 | 80 | 0.68147 |
796eb05c8b7985c902945c542b69ad81de708b0c | 595 | py | Python | python/re/sub1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python/re/sub1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | python/re/sub1.py | jtraver/dev | c7cd2181594510a8fa27e7325566ed2d79371624 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import re
str1 = "An arbitrary string. Literal containing chars like: []{}!#$!@#!%ls813"
print " "
print str1
# taken from
# citrusleaf/monitoring-console/server/site-packages/pkg_resources.py
print " "
print "re.sub('[^A-Za-z0-9]+', '_', str1)"
print re.sub('[^A-Za-z0-9]+', '_', str1)
print " "
p... | 21.25 | 78 | 0.605042 |
796eb147d348ca33e1b6d801ecb366399923676d | 176 | py | Python | tests/urls.py | jannon/drf-any-permissions | 128d29f6e70148ee708724123301021bf8b5fd9a | [
"MIT"
] | null | null | null | tests/urls.py | jannon/drf-any-permissions | 128d29f6e70148ee708724123301021bf8b5fd9a | [
"MIT"
] | null | null | null | tests/urls.py | jannon/drf-any-permissions | 128d29f6e70148ee708724123301021bf8b5fd9a | [
"MIT"
] | null | null | null | try:
from django.conf.urls import include, patterns, url
except ImportError:
from django.conf.urls.defaults import include, patterns, url
urlpatterns = patterns('', )
| 25.142857 | 64 | 0.744318 |
796eb2f1ba3787d6cd103806a28c85e8a172e128 | 717 | py | Python | root_dir/social/consumer.py | Riade-bg/socialplus | 0b8036e3807d0e315adf5566a19ddf2b51892d12 | [
"MIT"
] | 1 | 2020-06-11T19:13:28.000Z | 2020-06-11T19:13:28.000Z | root_dir/social/consumer.py | Riade-bg/socialplus | 0b8036e3807d0e315adf5566a19ddf2b51892d12 | [
"MIT"
] | null | null | null | root_dir/social/consumer.py | Riade-bg/socialplus | 0b8036e3807d0e315adf5566a19ddf2b51892d12 | [
"MIT"
] | null | null | null | import json
import asyncio
from channels.generic.websocket import (AsyncJsonWebsocketConsumer,
WebsocketConsumer)
from .models import PostCreate
class NoseyConsumer(AsyncJsonWebsocketConsumer):
async def connect(self):
await self.accept()
self.user = self.sc... | 28.68 | 75 | 0.666667 |
796eb42c9463d7cbc216d12dadf6359e14df68b1 | 4,449 | py | Python | tests/custom_cluster/test_mt_dop.py | garyli1019/impala | ea0e1def6160d596082b01365fcbbb6e24afb21d | [
"Apache-2.0"
] | null | null | null | tests/custom_cluster/test_mt_dop.py | garyli1019/impala | ea0e1def6160d596082b01365fcbbb6e24afb21d | [
"Apache-2.0"
] | null | null | null | tests/custom_cluster/test_mt_dop.py | garyli1019/impala | ea0e1def6160d596082b01365fcbbb6e24afb21d | [
"Apache-2.0"
] | null | null | null | # 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... | 47.329787 | 91 | 0.767813 |
796eb4485b3d7944b312ce0b916a2f6239939715 | 579 | py | Python | Scripts/controller.py | mdarfay/Golden-Retrieval | e07a5d535bcd90d122e6c79fb06e23c75667e051 | [
"Apache-2.0"
] | 2 | 2019-11-19T21:31:12.000Z | 2019-11-20T14:59:24.000Z | Scripts/controller.py | mdarfay/Golden-Retrieval | e07a5d535bcd90d122e6c79fb06e23c75667e051 | [
"Apache-2.0"
] | null | null | null | Scripts/controller.py | mdarfay/Golden-Retrieval | e07a5d535bcd90d122e6c79fb06e23c75667e051 | [
"Apache-2.0"
] | null | null | null | import sys
import os
if( len(sys.argv) < 6):
print("Usage : python3 DogDogGo.py <seuil> <poidsTF> <poidsIDF> <freqInf> <freqSup> <poidsTitre>\n"+
"seuil = [0,1], poids = puissances, [1-5]")
sys.exit()
else:
seuil = sys.argv[1]
poidsTF = sys.argv[2]
poidsIDF = sys.argv[3]
freqInf = sys.argv[4]
freqSup = sys.arg... | 27.571429 | 101 | 0.678756 |
796eb4ac20d84fd854d5bb6415429427fcacd01e | 16,824 | py | Python | src/unity/python/turicreate/visualization/show.py | LeeCenY/turicreate | fb2f3bf313e831ceb42a2e10aacda6e472ea8d93 | [
"BSD-3-Clause"
] | null | null | null | src/unity/python/turicreate/visualization/show.py | LeeCenY/turicreate | fb2f3bf313e831ceb42a2e10aacda6e472ea8d93 | [
"BSD-3-Clause"
] | 2 | 2022-01-13T04:03:55.000Z | 2022-03-12T01:02:31.000Z | src/unity/python/turicreate/visualization/show.py | ZeroInfinite/turicreate | dd210c2563930881abd51fd69cb73007955b33fd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2017 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | 37.057269 | 127 | 0.637007 |
796eb6318706344740edcb5d54b95692296c2ede | 6,766 | py | Python | test/functional/txn_doublespend.py | GpunionProject/Gpuniontoken | 6288a3707a67d41f38b7d71941fee303f9ee1d2a | [
"MIT"
] | 2 | 2018-07-05T16:30:07.000Z | 2018-07-16T06:34:57.000Z | test/functional/txn_doublespend.py | GpunionProject/Gpuniontoken | 6288a3707a67d41f38b7d71941fee303f9ee1d2a | [
"MIT"
] | 1 | 2018-07-26T08:46:11.000Z | 2018-07-28T23:34:36.000Z | test/functional/txn_doublespend.py | GpunionProject/Gpuniontoken | 6288a3707a67d41f38b7d71941fee303f9ee1d2a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017 The Gpunion Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there is a doub... | 46.662069 | 112 | 0.610109 |
796eb8012f17938f8a3180b74d1fc1fc131dc92a | 786 | py | Python | Python/linkList.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 1,428 | 2018-10-03T15:15:17.000Z | 2019-03-31T18:38:36.000Z | Python/linkList.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 1,162 | 2018-10-03T15:05:49.000Z | 2018-10-18T14:17:52.000Z | Python/linkList.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 3,909 | 2018-10-03T15:07:19.000Z | 2019-03-31T18:39:08.000Z |
def find_primes_sieve(num):
# list of all numbers upto n
intList = [True for i in range(num+1)]
# first prime
p = 2
while p * p <= num:
# if intList[p] is True means its a prime number
if intList[p]:
for i in range(p**2, num+1, p):
intList[i] = False
... | 16.723404 | 56 | 0.492366 |
796eb802f8d9bc477d802bf54c56bda2492afa18 | 8,826 | py | Python | light.py | mhpetiwala/wiz_light | 460c4c519dd52bd4e358903eaaec4d8cac6b2ec0 | [
"MIT"
] | null | null | null | light.py | mhpetiwala/wiz_light | 460c4c519dd52bd4e358903eaaec4d8cac6b2ec0 | [
"MIT"
] | null | null | null | light.py | mhpetiwala/wiz_light | 460c4c519dd52bd4e358903eaaec4d8cac6b2ec0 | [
"MIT"
] | null | null | null | '''
ToDO:
- Change ATTR_BRIGHTNESS to ATTR_BRIGHTNESS_PCT ??
- ATTR_EFFECT_LIST - List of possible effects
'''
"""Platform for light integration."""
''' Stephan Traub @sbidy '''
import logging
import voluptuous as vol
try:
from .wizlight import wizlight, PilotBuilder, PilotParser
except Excep... | 28.10828 | 107 | 0.588035 |
796eb83ec25f33f42d194361c713e1505ab08a4f | 292 | py | Python | output/models/nist_data/atomic/positive_integer/schema_instance/nistschema_sv_iv_atomic_positive_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/positive_integer/schema_instance/nistschema_sv_iv_atomic_positive_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/positive_integer/schema_instance/nistschema_sv_iv_atomic_positive_integer_pattern_1_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.atomic.positive_integer.schema_instance.nistschema_sv_iv_atomic_positive_integer_pattern_1_xsd.nistschema_sv_iv_atomic_positive_integer_pattern_1 import NistschemaSvIvAtomicPositiveIntegerPattern1
__all__ = [
"NistschemaSvIvAtomicPositiveIntegerPattern1",
]
| 48.666667 | 225 | 0.907534 |
796eb8eb44ac917281ee8cd64cc89b5994996d2e | 33 | py | Python | mat.py | carloandaya/pandas-playground | 28819a05af5bfd26fd5873c368c772bf835a1a0c | [
"MIT"
] | null | null | null | mat.py | carloandaya/pandas-playground | 28819a05af5bfd26fd5873c368c772bf835a1a0c | [
"MIT"
] | null | null | null | mat.py | carloandaya/pandas-playground | 28819a05af5bfd26fd5873c368c772bf835a1a0c | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
| 16.5 | 32 | 0.818182 |
796eb9251c4403ea20ad297dab17afb6cf480da6 | 10,238 | py | Python | qiskit/aqua/components/uncertainty_problems/multivariate_problem.py | charmerDark/qiskit-aqua | c1564af8792c6664670807614a378147fd04d28f | [
"Apache-2.0"
] | 504 | 2018-12-15T16:34:03.000Z | 2022-03-26T11:24:53.000Z | qiskit/aqua/components/uncertainty_problems/multivariate_problem.py | charmerDark/qiskit-aqua | c1564af8792c6664670807614a378147fd04d28f | [
"Apache-2.0"
] | 746 | 2018-12-16T16:44:42.000Z | 2021-07-10T16:59:43.000Z | qiskit/aqua/components/uncertainty_problems/multivariate_problem.py | charmerDark/qiskit-aqua | c1564af8792c6664670807614a378147fd04d28f | [
"Apache-2.0"
] | 421 | 2018-12-22T14:49:00.000Z | 2022-03-04T09:47:07.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 40.788845 | 99 | 0.583024 |
796ebbc22c205ede21d6e392261f05ea2705b074 | 484 | py | Python | portfolio/accounts/models.py | Dafov/portfolio | fb3cb3721b944624c092d6046b0d9b005b7d9019 | [
"MIT"
] | null | null | null | portfolio/accounts/models.py | Dafov/portfolio | fb3cb3721b944624c092d6046b0d9b005b7d9019 | [
"MIT"
] | null | null | null | portfolio/accounts/models.py | Dafov/portfolio | fb3cb3721b944624c092d6046b0d9b005b7d9019 | [
"MIT"
] | null | null | null | from portfolio.accounts.manager import PortfolioUserManager
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.base_user import AbstractBaseUser
from django.db import models
class PortfolioUser(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(unique=True)
is_staff =... | 32.266667 | 59 | 0.805785 |
796ebbd9982580a73e02098675b2efe622139556 | 6,394 | py | Python | utils/green_invoice.py | Omeramsc/hakesh-trom | bede21b96ea807ed78d5169ac5b4a917c15ce286 | [
"MIT"
] | null | null | null | utils/green_invoice.py | Omeramsc/hakesh-trom | bede21b96ea807ed78d5169ac5b4a917c15ce286 | [
"MIT"
] | 4 | 2020-06-19T09:58:55.000Z | 2022-02-13T16:20:28.000Z | utils/green_invoice.py | Omeramsc/hakesh-trom | bede21b96ea807ed78d5169ac5b4a917c15ce286 | [
"MIT"
] | 1 | 2020-03-18T18:38:49.000Z | 2020-03-18T18:38:49.000Z | import http.client
from datetime import date
from utils.consts import ORGANIZATION_NAME, PAYMENT_TYPES
import os
import json
import logging
log = logging.getLogger(__name__)
def get_bearer_token():
"""
Creates the bearer key in order to perform requests from the Green Invoice API.
Since a ne... | 45.671429 | 121 | 0.640757 |
796ebbe37551f90ec12966078d70228bef802481 | 2,617 | py | Python | hBattle.py | byackley/dodec | e450405717d0911bdd201c167cdbb4b82ddad674 | [
"MIT"
] | null | null | null | hBattle.py | byackley/dodec | e450405717d0911bdd201c167cdbb4b82ddad674 | [
"MIT"
] | null | null | null | hBattle.py | byackley/dodec | e450405717d0911bdd201c167cdbb4b82ddad674 | [
"MIT"
] | 1 | 2017-12-16T23:38:16.000Z | 2017-12-16T23:38:16.000Z | import ceGame
import ceWindow
import ceSheet
import pygame
import ceColor
verbs = ['attack', 'magic', 'items', 'tact', 'act']
cursor = 0
cTimer = 0
def makeStatusString(bits):
return '`#b7' * 6
def battleWindow(pName, x):
return ceWindow.CEWindow(0, None,
'%6s\n%6s\n`i80%3d/\n %3d\n`i81%2d/%2d' % (... | 29.077778 | 107 | 0.582728 |
796ebbe9d78d52889ffe86136a359741a7f9f2dc | 3,496 | py | Python | certbot-compatibility-test/certbot_compatibility_test/validator.py | radek-sprta/certbot | a6772043d6631341b525c4d69b47d6ef2d8b5d02 | [
"Apache-2.0"
] | 1 | 2020-01-23T05:57:42.000Z | 2020-01-23T05:57:42.000Z | certbot-compatibility-test/certbot_compatibility_test/validator.py | radek-sprta/certbot | a6772043d6631341b525c4d69b47d6ef2d8b5d02 | [
"Apache-2.0"
] | null | null | null | certbot-compatibility-test/certbot_compatibility_test/validator.py | radek-sprta/certbot | a6772043d6631341b525c4d69b47d6ef2d8b5d02 | [
"Apache-2.0"
] | null | null | null | """Validators to determine the current webserver configuration"""
import logging
import socket
import requests
import six
from six.moves import xrange # pylint: disable=import-error, redefined-builtin
from acme import crypto_util
from acme import errors as acme_errors
logger = logging.getLogger(__name__)
class Va... | 34.96 | 80 | 0.630721 |
796ebd4549e9df171ab994d23391ad62fd645f93 | 93 | py | Python | setup.py | NotTsunami/libtorrent | eee8ea6ae2f25d62989560c00118477aaa537ee1 | [
"BSL-1.0",
"BSD-3-Clause"
] | 1 | 2021-09-03T13:48:52.000Z | 2021-09-03T13:48:52.000Z | setup.py | RahimBangla/libtorrent | 40a8e759b7a63e25a721f9a9e6779791c7e09e17 | [
"BSL-1.0",
"BSD-3-Clause"
] | 2 | 2020-11-10T09:10:32.000Z | 2020-11-10T09:10:33.000Z | setup.py | gvvynplaine/libtorrent | 397122a37f5f5fad44a1580486b3dc2fd88bca5b | [
"BSL-1.0",
"BSD-3-Clause"
] | 4 | 2020-11-12T14:05:57.000Z | 2021-07-02T06:01:42.000Z | #!/usr/bin/env python3
import os
os.chdir('bindings/python')
exec(open('setup.py').read())
| 13.285714 | 29 | 0.688172 |
796ebdf1c3f6eba5f9405b994db384f85b30e8aa | 8,516 | py | Python | pymodaq_plugins_amplitude/daq_viewer_plugins/plugins_0D/daq_0Dviewer_AmplitudeSystemsCRC16.py | CEMES-CNRS/pymodaq_plugins_amplitude | cb1f5ae451bd16ebd6b0ce60b15ed8a44a7a2e2c | [
"CECILL-B"
] | null | null | null | pymodaq_plugins_amplitude/daq_viewer_plugins/plugins_0D/daq_0Dviewer_AmplitudeSystemsCRC16.py | CEMES-CNRS/pymodaq_plugins_amplitude | cb1f5ae451bd16ebd6b0ce60b15ed8a44a7a2e2c | [
"CECILL-B"
] | null | null | null | pymodaq_plugins_amplitude/daq_viewer_plugins/plugins_0D/daq_0Dviewer_AmplitudeSystemsCRC16.py | CEMES-CNRS/pymodaq_plugins_amplitude | cb1f5ae451bd16ebd6b0ce60b15ed8a44a7a2e2c | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 14 15:14:54 2018
@author: Weber Sébastien
@email: seba.weber@gmail.com
"""
from PyQt5.QtCore import pyqtSignal, QTimer, QThread
from easydict import EasyDict as edict
from pymodaq.daq_utils.daq_utils import ThreadCommand, getLineInfo, DataFromPlugins, set_logger, get_modu... | 40.552381 | 118 | 0.550023 |
796ec012e37ef7e887f3ca103b7b2f6347476f7d | 555 | py | Python | life_scheduler/board/quest_source_manager.py | Larhard/Life-Scheduler | 5eb8f317b2cc55a819e6f0b38f3250189cf5d9c2 | [
"BSD-3-Clause"
] | 1 | 2020-10-24T21:03:56.000Z | 2020-10-24T21:03:56.000Z | life_scheduler/board/quest_source_manager.py | Larhard/Life-Scheduler | 5eb8f317b2cc55a819e6f0b38f3250189cf5d9c2 | [
"BSD-3-Clause"
] | null | null | null | life_scheduler/board/quest_source_manager.py | Larhard/Life-Scheduler | 5eb8f317b2cc55a819e6f0b38f3250189cf5d9c2 | [
"BSD-3-Clause"
] | 1 | 2020-10-24T21:04:06.000Z | 2020-10-24T21:04:06.000Z | from life_scheduler.board.models import QuestSource
class QuestSourceManager:
supports_scheduler = False
def __init__(self, source: QuestSource, **kwargs):
self.source = source
for key in kwargs:
setattr(self, key, kwargs[key])
def pull(self):
raise NotImplementedErr... | 23.125 | 54 | 0.673874 |
796ec08fa111ce1ea569d6a09de7e4a19da54136 | 4,243 | py | Python | isi_sdk_8_0_1/isi_sdk_8_0_1/models/certificate_server.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0_1/isi_sdk_8_0_1/models/certificate_server.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0_1/isi_sdk_8_0_1/models/certificate_server.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_0_1.models.certifi... | 29.671329 | 170 | 0.601226 |
796ec18fb4e3d9eb0b2eef0518aa038cc4a10a1b | 9,415 | py | Python | demo-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py | zouzhberk/ambaridemo | 90068c5ee7adf83ba9dde9a8ad8d396b2fbf87c8 | [
"Apache-2.0"
] | null | null | null | demo-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py | zouzhberk/ambaridemo | 90068c5ee7adf83ba9dde9a8ad8d396b2fbf87c8 | [
"Apache-2.0"
] | null | null | null | demo-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py | zouzhberk/ambaridemo | 90068c5ee7adf83ba9dde9a8ad8d396b2fbf87c8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
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");... | 42.795455 | 114 | 0.727775 |
796ec2157a2b2a0bb92d898ad6bca640522ef4ff | 608 | py | Python | easy/p283MoveZeroes.py | chaithrakc/leetcode-programs | 771daa3ef6795f31b24f8fcdd3c5d8fe5cc8c6e2 | [
"MIT"
] | null | null | null | easy/p283MoveZeroes.py | chaithrakc/leetcode-programs | 771daa3ef6795f31b24f8fcdd3c5d8fe5cc8c6e2 | [
"MIT"
] | null | null | null | easy/p283MoveZeroes.py | chaithrakc/leetcode-programs | 771daa3ef6795f31b24f8fcdd3c5d8fe5cc8c6e2 | [
"MIT"
] | null | null | null | from typing import List
class SolutionMoveZeroes:
def move_zeroes(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
# step 1: bring all the non-zero elements to beginning of the array
last_nonzero_found_at = 0
for index in... | 27.636364 | 75 | 0.590461 |
796ec3b23069965eaee208201bd2072fb19435d7 | 2,628 | py | Python | python/tkinter/python3/multiple_windows.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 23 | 2015-06-08T13:01:00.000Z | 2021-12-30T08:20:04.000Z | python/tkinter/python3/multiple_windows.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 1 | 2020-10-22T02:36:10.000Z | 2020-10-22T02:36:10.000Z | python/tkinter/python3/multiple_windows.py | jeremiedecock/snippets | 4bd4e7f459eee610d5cf19f845299ca942ff4b64 | [
"MIT"
] | 7 | 2017-10-31T09:48:14.000Z | 2022-01-04T15:59:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | 36 | 79 | 0.702816 |
796ec3c82b292e5a3242a77b08904c2c71db4643 | 2,938 | py | Python | application/csc648-03-fa21-team04/project/com/dao/MessageDAO.py | seelapant13/Gator-Learner | a10583daf91d76d1a6610418c0f70715b2a1c811 | [
"MIT"
] | null | null | null | application/csc648-03-fa21-team04/project/com/dao/MessageDAO.py | seelapant13/Gator-Learner | a10583daf91d76d1a6610418c0f70715b2a1c811 | [
"MIT"
] | null | null | null | application/csc648-03-fa21-team04/project/com/dao/MessageDAO.py | seelapant13/Gator-Learner | a10583daf91d76d1a6610418c0f70715b2a1c811 | [
"MIT"
] | null | null | null | # Class: CSC-648-848 Fall 2021
# Author: Manali Seth, Aarshil Patel
# Description: Contains queries to fetch message/tutor inbox related details from database
from project import flask_app
from flaskext.mysql import MySQL
mysql = MySQL()
mysql.init_app(flask_app)
class MessageDAO():
# Inserting message contents... | 34.162791 | 265 | 0.634105 |
796ec4a2a040d90e1e0f9e27b86a319f596a7aa0 | 3,056 | py | Python | bttr/model/pos_enc.py | kapitsa2811/BTTR | 72a175ca927d05c7aeeec41a22c95117a0edc358 | [
"MIT"
] | 1 | 2021-06-16T22:35:50.000Z | 2021-06-16T22:35:50.000Z | bttr/model/pos_enc.py | kapitsa2811/BTTR | 72a175ca927d05c7aeeec41a22c95117a0edc358 | [
"MIT"
] | null | null | null | bttr/model/pos_enc.py | kapitsa2811/BTTR | 72a175ca927d05c7aeeec41a22c95117a0edc358 | [
"MIT"
] | null | null | null | import math
import pytorch_lightning as pl
import torch
TEMPERATURE = 10000.0
class WordPosEnc(pl.LightningModule):
def __init__(self, d_model: int = 512, max_len=5000) -> None:
super().__init__()
self.d_model = d_model
pe = torch.zeros(max_len, d_model)
position = torch.arange(... | 29.960784 | 86 | 0.533377 |
796ec6c407688365f11ea06eedec1401a3f4dd21 | 19,990 | py | Python | sketchfab/ui_importer.py | xphillyx/c4d-plugin | db0fe1bccf7bac025dc4b043cbd56d9a0b0ed8ce | [
"Apache-2.0"
] | null | null | null | sketchfab/ui_importer.py | xphillyx/c4d-plugin | db0fe1bccf7bac025dc4b043cbd56d9a0b0ed8ce | [
"Apache-2.0"
] | null | null | null | sketchfab/ui_importer.py | xphillyx/c4d-plugin | db0fe1bccf7bac025dc4b043cbd56d9a0b0ed8ce | [
"Apache-2.0"
] | null | null | null | # Copyright(c) 2017-2019 Sketchfab 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 i... | 33.540268 | 193 | 0.758929 |
796ec7919711458b0275fc7efeaa94e47b424757 | 15,425 | py | Python | tests/test_migration_handler.py | Adrian-IM/connect-python-sdk-migration-framework-1 | c6e1028630f0caca4fccb26db229a193cf7a8e6b | [
"Apache-2.0"
] | null | null | null | tests/test_migration_handler.py | Adrian-IM/connect-python-sdk-migration-framework-1 | c6e1028630f0caca4fccb26db229a193cf7a8e6b | [
"Apache-2.0"
] | null | null | null | tests/test_migration_handler.py | Adrian-IM/connect-python-sdk-migration-framework-1 | c6e1028630f0caca4fccb26db229a193cf7a8e6b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of the Ingram Micro Cloud Blue Connect SDK.
# Copyright (c) 2019 Ingram Micro. All Rights Reserved.
import os
import six
import pytest
from mock import patch, Mock, call
from typing import Dict, Optional
import connect_migration
from connect_migration import MigrationAbort... | 40.169271 | 105 | 0.663857 |
796ec7ab8ee4bb0027c31678bb03922bee87fe98 | 12,599 | py | Python | tests/helper_functions.py | zhengjxu/mlflow | 004ef1f091881ac6379182055763a82607a4a669 | [
"Apache-2.0"
] | null | null | null | tests/helper_functions.py | zhengjxu/mlflow | 004ef1f091881ac6379182055763a82607a4a669 | [
"Apache-2.0"
] | null | null | null | tests/helper_functions.py | zhengjxu/mlflow | 004ef1f091881ac6379182055763a82607a4a669 | [
"Apache-2.0"
] | null | null | null | import os
import random
from unittest import mock
import requests
import string
import time
import signal
import socket
import subprocess
import uuid
import sys
import yaml
import pandas as pd
import pytest
import mlflow
import mlflow.pyfunc.scoring_server as pyfunc_scoring_server
import mlflow.pyfunc
from mlflow.tr... | 35.894587 | 149 | 0.659656 |
796ec7e835595dab76b184a14bab2204c0411e67 | 1,838 | py | Python | senlin/tests/middleware/test_ssl_middleware.py | tengqm/senlin | aa59c55c098abb13590bc4308c753338ce4a70f4 | [
"Apache-2.0"
] | 2 | 2015-02-11T23:02:13.000Z | 2021-03-26T06:39:58.000Z | senlin/tests/middleware/test_ssl_middleware.py | tengqm/senlin | aa59c55c098abb13590bc4308c753338ce4a70f4 | [
"Apache-2.0"
] | 2 | 2015-01-19T13:40:47.000Z | 2015-03-04T07:06:07.000Z | senlin/tests/middleware/test_ssl_middleware.py | tengqm/senlin | aa59c55c098abb13590bc4308c753338ce4a70f4 | [
"Apache-2.0"
] | 5 | 2015-01-13T14:53:04.000Z | 2015-03-13T02:54:06.000Z | # 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
# distributed under... | 41.772727 | 75 | 0.647987 |
796ec92cf6b706b6f762da8eb38c925ddddc2874 | 1,800 | py | Python | model/person.py | eozgit/companies-house-api | 7098b0b87c98069a98dd868fc3bd77dbda081f44 | [
"MIT"
] | null | null | null | model/person.py | eozgit/companies-house-api | 7098b0b87c98069a98dd868fc3bd77dbda081f44 | [
"MIT"
] | null | null | null | model/person.py | eozgit/companies-house-api | 7098b0b87c98069a98dd868fc3bd77dbda081f44 | [
"MIT"
] | null | null | null | from .orm import db
from .nature_of_control import NatureOfControl
class Person(db.Model):
id = db.Column(db.Integer, primary_key=True)
company_number = db.Column(db.String(8), db.ForeignKey(
'company.company_number'), nullable=False)
address_line_1 = db.Column(db.String(50))
address_line_2 ... | 31.578947 | 100 | 0.687778 |
796ec995a0136400f185d61bb330afe65d401892 | 1,075 | py | Python | crdc_api/setup_db.py | jeremyadavis/crdc-api | 0539d2ac8cd50d855928b5fc18cc57ecb020c65a | [
"MIT"
] | null | null | null | crdc_api/setup_db.py | jeremyadavis/crdc-api | 0539d2ac8cd50d855928b5fc18cc57ecb020c65a | [
"MIT"
] | null | null | null | crdc_api/setup_db.py | jeremyadavis/crdc-api | 0539d2ac8cd50d855928b5fc18cc57ecb020c65a | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine, text
from sqlalchemy.schema import CreateSchema, DropSchema
from sqlalchemy.sql import exists, select
from utils import pretty_print
def connect_to_db(url):
try:
engine = create_engine(url)
engine.connect()
pretty_print("Connected to DB", True)
... | 28.289474 | 100 | 0.67814 |
796eca82e3f584c7288e4a037ad30973b452dc02 | 47,314 | py | Python | distributed/tests/test_worker.py | drorspei/distributed | f16fb15e8a0c5d8e292bc516d535d0913d32e277 | [
"BSD-3-Clause"
] | 1 | 2020-12-07T14:35:09.000Z | 2020-12-07T14:35:09.000Z | distributed/tests/test_worker.py | cheunhong/distributed | 6b259c441121c1f86f1165252b5140218a408609 | [
"BSD-3-Clause"
] | null | null | null | distributed/tests/test_worker.py | cheunhong/distributed | 6b259c441121c1f86f1165252b5140218a408609 | [
"BSD-3-Clause"
] | null | null | null | from concurrent.futures import ThreadPoolExecutor
import importlib
import logging
from numbers import Number
from operator import add
import os
import psutil
import sys
from time import sleep
import traceback
import asyncio
import dask
from dask import delayed
from dask.utils import format_bytes
from dask.system impor... | 28.675152 | 88 | 0.62937 |
796ecbd01b023d325bcb9e1d072b1708190a81e6 | 2,184 | py | Python | python/ql/test/experimental/query-tests/Security/CWE-522/ldap3_private.py | madhurimamandal/codeql | 76bf8878da4d951ed98238b7239c199a3dfddf16 | [
"MIT"
] | 4,036 | 2020-04-29T00:09:57.000Z | 2022-03-31T14:16:38.000Z | python/ql/test/experimental/query-tests/Security/CWE-522/ldap3_private.py | madhurimamandal/codeql | 76bf8878da4d951ed98238b7239c199a3dfddf16 | [
"MIT"
] | 2,970 | 2020-04-28T17:24:18.000Z | 2022-03-31T22:40:46.000Z | python/ql/test/experimental/query-tests/Security/CWE-522/ldap3_private.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 794 | 2020-04-29T00:28:25.000Z | 2022-03-30T08:21:46.000Z | from ldap3 import Server, Connection, ALL
from flask import request, Flask
app = Flask(__name__)
schema = "ldap://"
partial_host = "127.0.0.1"
full_host = "ldap://127.0.0.1"
# hardcoded host
@app.route("/one")
def one():
srv = Server("ldap://127.0.0.1", port=1337)
conn = Connection(srv, "dn", "password")
... | 20.603774 | 47 | 0.633242 |
796ecbf73e528d327d1dc1fc6bc398be53c805d2 | 43,368 | py | Python | NIQ_uncompiled/source_code/niq_misc.py | wxhawkins/NestIQ | 3a004d330e2c68b0c7eb0b0676bc4d044e52cbe4 | [
"Apache-2.0"
] | null | null | null | NIQ_uncompiled/source_code/niq_misc.py | wxhawkins/NestIQ | 3a004d330e2c68b0c7eb0b0676bc4d044e52cbe4 | [
"Apache-2.0"
] | null | null | null | NIQ_uncompiled/source_code/niq_misc.py | wxhawkins/NestIQ | 3a004d330e2c68b0c7eb0b0676bc4d044e52cbe4 | [
"Apache-2.0"
] | null | null | null | import datetime
import json
import re
import time
from pathlib import Path
import numpy as np
import pandas as pd
from bokeh.io import reset_output
from bokeh.layouts import column, widgetbox
from bokeh.models import HoverTool, PointDrawTool, Span
from bokeh.models.widgets import DataTable, TableColumn
fro... | 37.066667 | 169 | 0.601365 |
796ecc4906ee03460217601ea82431220751559f | 7,077 | py | Python | crawler.py | ZijunH/Roche_Biochemical_Pathway_Generator | ce883c2377882c3a879d19fff3c32db29c76e9c9 | [
"MIT"
] | 7 | 2019-05-02T02:42:57.000Z | 2021-11-02T03:03:54.000Z | crawler.py | ZijunH/Roche_Biochemical_Pathway_generator | ce883c2377882c3a879d19fff3c32db29c76e9c9 | [
"MIT"
] | 5 | 2019-05-02T02:47:19.000Z | 2022-03-12T00:24:02.000Z | crawler.py | ZijunH/Roche_Biochemical_Pathway_generator | ce883c2377882c3a879d19fff3c32db29c76e9c9 | [
"MIT"
] | null | null | null | import os
import urllib.request
import shutil
import workerpool
from PIL import Image
url = "http://mapserver1.biochemical-pathways.com"
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0'}
maps = {"map1": (54, 38), "map2": (45, 38)}
features = ("grid", ... | 35.742424 | 112 | 0.547972 |
796ecd62a1bf32984f5296f51de5797f2e5829cc | 337 | py | Python | examples/computer_vision/mmdetection_pytorch/configs/grid_rcnn/grid_rcnn_x101_64x4d_fpn_gn-head_2x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | 1 | 2021-03-29T13:39:45.000Z | 2021-03-29T13:39:45.000Z | examples/computer_vision/mmdetection_pytorch/configs/grid_rcnn/grid_rcnn_x101_64x4d_fpn_gn-head_2x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | null | null | null | examples/computer_vision/mmdetection_pytorch/configs/grid_rcnn/grid_rcnn_x101_64x4d_fpn_gn-head_2x_coco.py | RAbraham/determined | 1161b667ed6d0242f70f9f15d58600f910c8d7f9 | [
"Apache-2.0"
] | null | null | null | _base_ = "./grid_rcnn_x101_32x4d_fpn_gn-head_2x_coco.py"
model = dict(
pretrained="open-mmlab://resnext101_64x4d",
backbone=dict(
type="ResNeXt",
depth=101,
groups=64,
base_width=4,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style="py... | 22.466667 | 56 | 0.5727 |
796ecd9b4716072a5a508c0f45f22f3f6c68012e | 1,158 | py | Python | examples/simulate_example.py | nlaanait/qcdenoise | 9317da9277cae2e16798f301a2f6ab6fdbd18f3f | [
"MIT"
] | null | null | null | examples/simulate_example.py | nlaanait/qcdenoise | 9317da9277cae2e16798f301a2f6ab6fdbd18f3f | [
"MIT"
] | 1 | 2021-08-23T20:48:19.000Z | 2021-08-23T20:48:19.000Z | examples/simulate_example.py | nlaanait/qcdenoise | 9317da9277cae2e16798f301a2f6ab6fdbd18f3f | [
"MIT"
] | null | null | null | import logging
import qcdenoise as qcd
from qiskit.test.mock import FakeMontreal
logging.getLogger("qcdenoise").setLevel("INFO")
# specify simulation inputs
graph_specs = qcd.GraphSpecs(max_num_edges=10)
circuit_specs = qcd.CircuitSpecs(builder=qcd.CXGateCircuit,
stochastic=True
... | 28.95 | 59 | 0.689983 |
796ece0c36fd0575fafb5dfff11ba3fc4cec4256 | 1,119 | py | Python | release-assistant/javcra/common/exc.py | openeuler-mirror/release-tools | 655d08d6555f9a9211f982da6470be6b17eeafae | [
"MulanPSL-1.0"
] | 1 | 2021-09-23T09:06:30.000Z | 2021-09-23T09:06:30.000Z | release-assistant/javcra/common/exc.py | openeuler-mirror/release-tools | 655d08d6555f9a9211f982da6470be6b17eeafae | [
"MulanPSL-1.0"
] | null | null | null | release-assistant/javcra/common/exc.py | openeuler-mirror/release-tools | 655d08d6555f9a9211f982da6470be6b17eeafae | [
"MulanPSL-1.0"
] | null | null | null | #!/usr/bin/python3
# ******************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
# licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a c... | 34.96875 | 98 | 0.607685 |
796ece67a0dc1fa087bf9c719fb15ff757a0a3fe | 4,040 | py | Python | src/python/aem2segy.py | Neil-Symington/AEM2SEG-Yy | 15f561361df12763bb7effce4ca063d89458f68f | [
"Apache-2.0"
] | null | null | null | src/python/aem2segy.py | Neil-Symington/AEM2SEG-Yy | 15f561361df12763bb7effce4ca063d89458f68f | [
"Apache-2.0"
] | null | null | null | src/python/aem2segy.py | Neil-Symington/AEM2SEG-Yy | 15f561361df12763bb7effce4ca063d89458f68f | [
"Apache-2.0"
] | null | null | null | import numpy as np
import segyio
import os
# choose the vertical resampling interval
yres = 4.0
max_depth = 400.
scaling = 0.001 # convert from mS/m to S/m
##
infile = r"C:\Users\u77932\Documents\GAB\data\AEM\2017_survey\lci\Injune_WB_MGA55.dat"
outdir = r"C:\Users\u77932\Documents\GAB\data\AEM\2017_survey\lci\segy"
... | 36.727273 | 108 | 0.685891 |
796ece7a52d2f145875291d10495415c7d0ad8e9 | 1,748 | py | Python | geotrek/signage/filters.py | mviadere-openig/Geotrek-admin | 7f2343db50e97bb407e66dc499ab3684e1629661 | [
"BSD-2-Clause"
] | null | null | null | geotrek/signage/filters.py | mviadere-openig/Geotrek-admin | 7f2343db50e97bb407e66dc499ab3684e1629661 | [
"BSD-2-Clause"
] | null | null | null | geotrek/signage/filters.py | mviadere-openig/Geotrek-admin | 7f2343db50e97bb407e66dc499ab3684e1629661 | [
"BSD-2-Clause"
] | null | null | null | from django_filters import CharFilter
from django.utils.translation import ugettext_lazy as _
from geotrek.common.filters import StructureRelatedFilterSet, YearFilter, ValueFilter
from geotrek.maintenance.filters import PolygonTopologyFilter
from geotrek.signage.models import Signage, Blade
from geotrek.signage.widget... | 47.243243 | 120 | 0.686499 |
796ecfa13af6c0a66dac84889fe2e3224a52f963 | 414 | py | Python | qa/pull-tester/tests_config.py | AeroCloud/MCTP | aea0be0431d3785ab858799aada8e12da574052f | [
"MIT"
] | null | null | null | qa/pull-tester/tests_config.py | AeroCloud/MCTP | aea0be0431d3785ab858799aada8e12da574052f | [
"MIT"
] | null | null | null | qa/pull-tester/tests_config.py | AeroCloud/MCTP | aea0be0431d3785ab858799aada8e12da574052f | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2013-2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
BUILDDIR="/home/andreas/_NEWCOINS/testmct/mct-coin"
EXEEXT=""
# These will turn into comments if they we... | 25.875 | 71 | 0.789855 |
796ed0ca56747021e81d47ca4a612a9378e23416 | 168 | py | Python | Some Small Opencv Projects/dummy.py | ajay-panchal-099/Project | 3064bb85cbaece47cc9aff24379ea8b04480663a | [
"MIT"
] | null | null | null | Some Small Opencv Projects/dummy.py | ajay-panchal-099/Project | 3064bb85cbaece47cc9aff24379ea8b04480663a | [
"MIT"
] | null | null | null | Some Small Opencv Projects/dummy.py | ajay-panchal-099/Project | 3064bb85cbaece47cc9aff24379ea8b04480663a | [
"MIT"
] | null | null | null | from datetime import datetime
import time
val1 = datetime.now()
time.sleep(1)
val2 = datetime.now()
difference = val2 - val1
print(difference.total_seconds()) | 18.666667 | 33 | 0.72619 |
796ed25afacce175b104b008799f33c2fb022ba6 | 24,012 | py | Python | python/ccxt/gatecoin.py | joh90/ccxt | 5a4708485bddc39f0107ba9869c7453c767840d7 | [
"MIT"
] | null | null | null | python/ccxt/gatecoin.py | joh90/ccxt | 5a4708485bddc39f0107ba9869c7453c767840d7 | [
"MIT"
] | null | null | null | python/ccxt/gatecoin.py | joh90/ccxt | 5a4708485bddc39f0107ba9869c7453c767840d7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ... | 51.089362 | 187 | 0.534649 |
796ed55f143a6e62d1407a9a54fe24ec42810ba3 | 279 | py | Python | tests/script_exe_test_big_argv/testme.py | usnistgov/CDE | 05137888a8ad67b0796814170ba61deef51bec03 | [
"BSD-3-Clause"
] | 4 | 2020-07-28T19:11:07.000Z | 2021-09-24T07:00:39.000Z | tests/script_exe_test_big_argv/testme.py | usnistgov/CDE | 05137888a8ad67b0796814170ba61deef51bec03 | [
"BSD-3-Clause"
] | null | null | null | tests/script_exe_test_big_argv/testme.py | usnistgov/CDE | 05137888a8ad67b0796814170ba61deef51bec03 | [
"BSD-3-Clause"
] | 2 | 2021-05-13T18:32:27.000Z | 2021-11-15T09:07:33.000Z | import sys
sys.path.insert(0, '..')
from cde_test_common import *
def checker_func():
assert os.path.isfile(CDE_ROOT_DIR + '/bin/sh')
generic_test_runner(["./script_exe_test_big_argv.sh", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"], checker_func)
| 31 | 140 | 0.684588 |
796ed6db8e46839f00fc2fdbf27aa9618b25eedb | 2,252 | py | Python | homework06/hackernews.py | kristinazagaynova/programming-kristinazagaynova | d154a27f927d6da0135bffbd75330d4da8039f98 | [
"Unlicense"
] | null | null | null | homework06/hackernews.py | kristinazagaynova/programming-kristinazagaynova | d154a27f927d6da0135bffbd75330d4da8039f98 | [
"Unlicense"
] | null | null | null | homework06/hackernews.py | kristinazagaynova/programming-kristinazagaynova | d154a27f927d6da0135bffbd75330d4da8039f98 | [
"Unlicense"
] | 1 | 2021-02-20T09:36:40.000Z | 2021-02-20T09:36:40.000Z | from bottle import (
route, run, template, request, redirect
)
from scrapper import get_news
from db import News, session
from bayes import NaiveBayesClassifier
@route("/news")
def news_list():
sess = session()
rows = sess.query(News).filter(News.label == None).all()
return template('news_template', ... | 30.026667 | 121 | 0.619893 |
796ed7d5156638d50deb99f11407be9f36870932 | 644 | py | Python | services/common.py | ferrouswheel/face-services | aee98448bfd4ba54c72540a8bd1b54b122af7de2 | [
"MIT"
] | 29 | 2018-04-25T06:11:04.000Z | 2022-02-03T06:26:18.000Z | services/common.py | ferrouswheel/face-services | aee98448bfd4ba54c72540a8bd1b54b122af7de2 | [
"MIT"
] | 12 | 2018-04-15T23:25:06.000Z | 2019-01-24T23:47:50.000Z | services/common.py | ferrouswheel/face-services | aee98448bfd4ba54c72540a8bd1b54b122af7de2 | [
"MIT"
] | 6 | 2018-05-07T11:51:26.000Z | 2019-12-20T17:36:10.000Z | import argparse
import os.path
from services import registry
import time
def common_parser(script_name):
parser = argparse.ArgumentParser(prog=script_name)
server_name = os.path.splitext(os.path.basename(script_name))[0]
parser.add_argument("--grpc-port", help="port to bind grpc service to", default=regi... | 25.76 | 140 | 0.715839 |
796ed7dee0117988cded868dbf4d80c389e33326 | 719 | py | Python | Dataset/Leetcode/test/5/473.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/5/473.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/test/5/473.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def isPalindrome(self,s:str):
i=0
while(i<len(s)/2):
if(s[i]==s[-1-i]):
i=i+1
else:
return False
return True
def XXX(self, s: str) -> str:
if(s==''):
return s
i=len(s);
result=s
... | 23.193548 | 43 | 0.354659 |
796ed852c77cb7f351698648ead635621d94132c | 11,876 | py | Python | tests/test_ext_math.py | hnakamur/sphinx-deb | 34e8fa6013e0567f12eabfd4f71e7a82ce63394e | [
"BSD-2-Clause"
] | null | null | null | tests/test_ext_math.py | hnakamur/sphinx-deb | 34e8fa6013e0567f12eabfd4f71e7a82ce63394e | [
"BSD-2-Clause"
] | null | null | null | tests/test_ext_math.py | hnakamur/sphinx-deb | 34e8fa6013e0567f12eabfd4f71e7a82ce63394e | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test_ext_math
~~~~~~~~~~~~~
Test math extensions.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import errno
import re
import subprocess
import warnings
import pytest
from docutils import nodes
from sphin... | 41.379791 | 93 | 0.570057 |
796ed89a9854deb1c20aa86a9f614481db446d31 | 112 | py | Python | mafirstapp/urls.py | iggyGCD/diplomacy2016 | e13004ae96fc9f44a248242cec96a6dd4f3e9189 | [
"MIT"
] | null | null | null | mafirstapp/urls.py | iggyGCD/diplomacy2016 | e13004ae96fc9f44a248242cec96a6dd4f3e9189 | [
"MIT"
] | null | null | null | mafirstapp/urls.py | iggyGCD/diplomacy2016 | e13004ae96fc9f44a248242cec96a6dd4f3e9189 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index')
]
| 14 | 38 | 0.678571 |
796ed8f861d8dc5227507502bbc0c81477f014f8 | 8,508 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations_async/_load_balancer_backend_address_pools_operations_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations_async/_load_balancer_backend_address_pools_operations_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations_async/_load_balancer_backend_address_pools_operations_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.896552 | 218 | 0.677833 |
796ed9660c66e6c57a44add1238d44a3448c9363 | 8,452 | py | Python | evaluate.py | yakushechkin/scitldr | c8090d0c8d62bafc878a0050dcfb7c33e3c54dc5 | [
"Apache-2.0"
] | 1 | 2020-12-08T07:03:04.000Z | 2020-12-08T07:03:04.000Z | evaluate.py | yakushechkin/scitldr | c8090d0c8d62bafc878a0050dcfb7c33e3c54dc5 | [
"Apache-2.0"
] | null | null | null | evaluate.py | yakushechkin/scitldr | c8090d0c8d62bafc878a0050dcfb7c33e3c54dc5 | [
"Apache-2.0"
] | 1 | 2020-12-09T01:39:54.000Z | 2020-12-09T01:39:54.000Z | import torch
from fairseq.models.bart import BARTModel
import argparse
from pprint import pprint
from tqdm import tqdm
import os
from os.path import join
import shutil
import logging
import numpy as np
import json
import random
import string
import files2rouge
import time
def test_rouge(cand, ref, outpath=None, tmp_d... | 37.23348 | 113 | 0.546616 |
796ed98571e04343d77c1a3b6dad15d5c5cb6663 | 2,879 | py | Python | discopy_data/nn/bert.py | rknaebel/discopy-data | f3713dbd770894ed9cb0889d2802f7d87c2c049c | [
"MIT"
] | null | null | null | discopy_data/nn/bert.py | rknaebel/discopy-data | f3713dbd770894ed9cb0889d2802f7d87c2c049c | [
"MIT"
] | null | null | null | discopy_data/nn/bert.py | rknaebel/discopy-data | f3713dbd770894ed9cb0889d2802f7d87c2c049c | [
"MIT"
] | null | null | null | from typing import List
import numpy as np
from discopy_data.data.sentence import Sentence
from discopy_data.data.token import Token
simple_map = {
"''": '"',
"``": '"',
"-LRB-": "(",
"-RRB-": ")",
"-LCB-": "{",
"-RCB-": "}",
"n't": "not"
}
def get_sentence_embedder(bert_model):
fro... | 37.38961 | 101 | 0.686349 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.