hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74eb68637a5b38c8fbe62e1e9ca43b3cb96a9d13 | 6,030 | py | Python | bluesky_widgets/headless/figures.py | jklynch/bluesky-widgets | 238a77bb7c3a2bcebb890a892780021790c031f5 | [
"BSD-3-Clause"
] | null | null | null | bluesky_widgets/headless/figures.py | jklynch/bluesky-widgets | 238a77bb7c3a2bcebb890a892780021790c031f5 | [
"BSD-3-Clause"
] | null | null | null | bluesky_widgets/headless/figures.py | jklynch/bluesky-widgets | 238a77bb7c3a2bcebb890a892780021790c031f5 | [
"BSD-3-Clause"
] | null | null | null | import collections.abc
from pathlib import Path
import matplotlib
from ..models.plot_specs import Figure, FigureList
from .._matplotlib_axes import MatplotlibAxes
from ..utils.dict_view import DictView
class HeadlessFigures:
"""
A headless "view" for a FigureList model.
It does not produce a graphical u... | 30.301508 | 83 | 0.625705 |
6b8b377e0ed2432b31bf8bb192f165325548dbfa | 1,014 | py | Python | test/test_v1_network_find_request.py | metal-stack/metal-python | cdf40fa86d2b2944f9818cef1c6723b1eecc506e | [
"MIT"
] | 7 | 2020-12-21T05:24:24.000Z | 2022-02-12T20:55:32.000Z | test/test_v1_network_find_request.py | metal-stack/metal-python | cdf40fa86d2b2944f9818cef1c6723b1eecc506e | [
"MIT"
] | 6 | 2020-09-16T07:23:34.000Z | 2022-01-18T12:05:30.000Z | test/test_v1_network_find_request.py | metal-stack/metal-python | cdf40fa86d2b2944f9818cef1c6723b1eecc506e | [
"MIT"
] | null | null | null | # coding: utf-8
"""
metal-api
API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501
OpenAPI spec version: v0.15.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __futur... | 24.731707 | 156 | 0.724852 |
376ae3c761fc2f69d37ea387853db5f275742ac3 | 10,879 | py | Python | pptx/oxml/__init__.py | jwoglom/python-pptx | ed748b0def32deba08bdc3d549092a26b764c28c | [
"MIT"
] | 1 | 2017-08-07T14:52:02.000Z | 2017-08-07T14:52:02.000Z | pptx/oxml/__init__.py | jwoglom/python-pptx | ed748b0def32deba08bdc3d549092a26b764c28c | [
"MIT"
] | 4 | 2021-03-18T20:28:17.000Z | 2022-03-11T23:18:51.000Z | pptx/oxml/__init__.py | jwoglom/python-pptx | ed748b0def32deba08bdc3d549092a26b764c28c | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
Initializes lxml parser and makes available a handful of functions that wrap
its typical uses.
"""
from __future__ import absolute_import
from lxml import etree
from .ns import NamespacePrefixedTag
# configure etree XML parser -------------------------------
element_class_lookup = etree.Elem... | 38.992832 | 76 | 0.781598 |
5e76f31e24c073af0a8a1852ba8c20da76966644 | 1,243 | py | Python | 高频120Leetcode/67. Add Binary.py | lixiaoruiusa/Rui7272 | fbdb87104353138d3af7f3fe2cb3c0f00ff9e449 | [
"MIT"
] | null | null | null | 高频120Leetcode/67. Add Binary.py | lixiaoruiusa/Rui7272 | fbdb87104353138d3af7f3fe2cb3c0f00ff9e449 | [
"MIT"
] | null | null | null | 高频120Leetcode/67. Add Binary.py | lixiaoruiusa/Rui7272 | fbdb87104353138d3af7f3fe2cb3c0f00ff9e449 | [
"MIT"
] | null | null | null | class Solution:
def addBinary(self, a: str, b: str) -> str:
indexa = len(a) - 1
indexb = len(b) - 1
carry = 0
res = ""
while indexa >= 0 or indexb >= 0 or carry:
x = int(a[indexa]) if indexa >= 0 else 0
y = int(b[indexb]) if indexb >= 0 else 0
... | 21.431034 | 52 | 0.367659 |
45b95dec1d9caacca53f9f1ec25bc3a99c877f21 | 1,709 | py | Python | scripts/fuzzing/lib/dictionary.py | EnderNightLord-ChromeBook/zircon-rpi | b09b1eb3aa7a127c65568229fe10edd251869283 | [
"BSD-2-Clause"
] | 14 | 2020-10-25T05:48:36.000Z | 2021-09-20T02:46:20.000Z | scripts/fuzzing/lib/dictionary.py | DamieFC/fuchsia | f78a4a1326f4a4bb5834500918756173c01bab4f | [
"BSD-2-Clause"
] | null | null | null | scripts/fuzzing/lib/dictionary.py | DamieFC/fuchsia | f78a4a1326f4a4bb5834500918756173c01bab4f | [
"BSD-2-Clause"
] | 2 | 2020-10-25T01:13:49.000Z | 2020-10-26T02:32:13.000Z | #!/usr/bin/env python
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
class Dictionary(object):
"""Represents the dictionary of keywords for a fuzzer.
See https://llvm.org/docs/LibFu... | 28.966102 | 80 | 0.624342 |
6594c29981b62ec3607669d04f2ac58702caafab | 264,686 | py | Python | nova/compute/api.py | karimull/nova | 9dcff4d4ed3e5ed5c0f58638c863562f4761495c | [
"Apache-2.0"
] | null | null | null | nova/compute/api.py | karimull/nova | 9dcff4d4ed3e5ed5c0f58638c863562f4761495c | [
"Apache-2.0"
] | null | null | null | nova/compute/api.py | karimull/nova | 9dcff4d4ed3e5ed5c0f58638c863562f4761495c | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012-2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# ... | 46.289962 | 79 | 0.601188 |
02c6bb6b11ddd767194ce8051729f7c09c0d65d8 | 3,922 | py | Python | registryparse.py | mike-bailey/registry-csvdump | abab0572986cb0c074a21c56e7905b281522dd5e | [
"MIT"
] | null | null | null | registryparse.py | mike-bailey/registry-csvdump | abab0572986cb0c074a21c56e7905b281522dd5e | [
"MIT"
] | null | null | null | registryparse.py | mike-bailey/registry-csvdump | abab0572986cb0c074a21c56e7905b281522dd5e | [
"MIT"
] | null | null | null | import sys
import os
import base64
from Registry import Registry
import argparse
import calendar
import time
import binascii
reload(sys)
# Sets encoding
sys.setdefaultencoding('utf-8')
parser = argparse.ArgumentParser(description='Processes Registry Hives into relatively somewhat ok CSVs.')
parser.add_argument('-f','... | 38.45098 | 190 | 0.717746 |
2636f847a25892fd83f3e055e7ae55ae507d5099 | 4,192 | py | Python | lib/uart/tb/test_uart_rx.py | bmindur/xfcp | dd2eef2cb23a17209180b278b1e2640fd09fda28 | [
"MIT"
] | 234 | 2015-05-12T11:40:21.000Z | 2022-03-29T12:27:40.000Z | lib/uart/tb/test_uart_rx.py | bmindur/xfcp | dd2eef2cb23a17209180b278b1e2640fd09fda28 | [
"MIT"
] | 7 | 2017-03-25T15:31:43.000Z | 2022-01-06T19:33:51.000Z | lib/uart/tb/test_uart_rx.py | bmindur/xfcp | dd2eef2cb23a17209180b278b1e2640fd09fda28 | [
"MIT"
] | 89 | 2015-11-06T02:04:13.000Z | 2022-03-22T14:50:39.000Z | #!/usr/bin/env python
"""
Copyright (c) 2014-2017 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify,... | 22.907104 | 77 | 0.635258 |
48ed515b7ba36228eec595c8e919946d3371e1bd | 8,005 | py | Python | auto_ge.py | AIESECMX/AUTO_GT | ab6b64d1d65cd161142f1967a3c718243944874c | [
"MIT"
] | null | null | null | auto_ge.py | AIESECMX/AUTO_GT | ab6b64d1d65cd161142f1967a3c718243944874c | [
"MIT"
] | null | null | null | auto_ge.py | AIESECMX/AUTO_GT | ab6b64d1d65cd161142f1967a3c718243944874c | [
"MIT"
] | null | null | null | #this mprogram is an miplementation that will look in the opportunitities for GT that were
#open in the last week and will consult the list of active gt eps in GetRepose for GT
import requests
import config
import json
import datetime
import urllib
import urllib2
import cookielib
import logging
from ep import EP
from ... | 34.65368 | 122 | 0.686446 |
802fb945c0f8f4ed4235b1861da22a7843274442 | 10,814 | py | Python | src/oci/apm_synthetics/models/update_script_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/apm_synthetics/models/update_script_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/apm_synthetics/models/update_script_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 37.161512 | 245 | 0.65369 |
2105000ebfc6d58fbb1923328dcb9f3d31663341 | 1,082 | py | Python | src/models/model_exploration.py | Quentindcf-grindstone/member_value_estimator | 0b32087d50723173d7d52956c8e4b05bcbe21f64 | [
"MIT"
] | null | null | null | src/models/model_exploration.py | Quentindcf-grindstone/member_value_estimator | 0b32087d50723173d7d52956c8e4b05bcbe21f64 | [
"MIT"
] | null | null | null | src/models/model_exploration.py | Quentindcf-grindstone/member_value_estimator | 0b32087d50723173d7d52956c8e4b05bcbe21f64 | [
"MIT"
] | null | null | null | import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import SGDRegressor
from sklearn.metrics import r2_score
from datetime import datetime
from sklearn.svm import SVR
def print_now():
now = datetime.now()
current_time = now.strftime("%H:%M:%S")
print("Current Tim... | 25.761905 | 82 | 0.719963 |
1506cd2434be659858cf6c0c6c0195866070a951 | 761 | py | Python | client.py | MustafaTheCoder/chat-app | ef6c9bce32ff46d4cdf8866dc0314e9d5207bd2f | [
"MIT"
] | null | null | null | client.py | MustafaTheCoder/chat-app | ef6c9bce32ff46d4cdf8866dc0314e9d5207bd2f | [
"MIT"
] | null | null | null | client.py | MustafaTheCoder/chat-app | ef6c9bce32ff46d4cdf8866dc0314e9d5207bd2f | [
"MIT"
] | null | null | null | import socket
import time
PORT = 5050
SERVER = "localhost"
ADDR = (SERVER, PORT)
FORMAT = "utf-8"
DISCONNECT_MESSAGE = "!DISCONNECT"
def connect():
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(ADDR)
return client
def send(client, msg):
message = msg.enc... | 18.119048 | 63 | 0.587385 |
5f6092276c766eac45ee7cc94ce826f79bfb29ae | 10,527 | py | Python | aiogram/bot/api.py | altvod/aiogram | bb1c774bccd084248bf47338255d1d375949e40b | [
"MIT"
] | null | null | null | aiogram/bot/api.py | altvod/aiogram | bb1c774bccd084248bf47338255d1d375949e40b | [
"MIT"
] | 1 | 2022-02-28T13:11:36.000Z | 2022-02-28T13:11:48.000Z | aiogram/bot/api.py | altvod/aiogram | bb1c774bccd084248bf47338255d1d375949e40b | [
"MIT"
] | null | null | null | import logging
import os
from dataclasses import dataclass
from http import HTTPStatus
import aiohttp
from .. import types
from ..utils import exceptions, json
from ..utils.helper import Helper, HelperMode, Item
# Main aiogram logger
log = logging.getLogger('aiogram')
@dataclass(frozen=True)
class TelegramAPIServe... | 35.928328 | 114 | 0.675501 |
196f5c48f49be6e2504dda4d7f64a70204e60623 | 246 | py | Python | portfolio/apps.py | rkisdp/rkisdp.django.backend | 771481cdeea6a101305c4819b06b839266ce6921 | [
"MIT"
] | null | null | null | portfolio/apps.py | rkisdp/rkisdp.django.backend | 771481cdeea6a101305c4819b06b839266ce6921 | [
"MIT"
] | null | null | null | portfolio/apps.py | rkisdp/rkisdp.django.backend | 771481cdeea6a101305c4819b06b839266ce6921 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# python imports
from __future__ import unicode_literals
# lib imports
from django.apps import AppConfig
class PortfolioConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'portfolio'
| 20.5 | 56 | 0.747967 |
da3620971b796a1a88b26608482dcd657362ff66 | 4,084 | py | Python | tests/integration/services/ticketing/test_user_check_in.py | byceps/byceps | ca9874f9b4f2a76daacb37c4135bbfb97e468040 | [
"BSD-3-Clause"
] | 33 | 2018-01-16T02:04:51.000Z | 2022-03-22T22:57:29.000Z | tests/integration/services/ticketing/test_user_check_in.py | byceps/byceps | ca9874f9b4f2a76daacb37c4135bbfb97e468040 | [
"BSD-3-Clause"
] | 7 | 2019-06-16T22:02:03.000Z | 2021-10-02T13:45:31.000Z | tests/integration/services/ticketing/test_user_check_in.py | byceps/byceps | ca9874f9b4f2a76daacb37c4135bbfb97e468040 | [
"BSD-3-Clause"
] | 14 | 2019-06-01T21:39:24.000Z | 2022-03-14T17:56:43.000Z | """
:Copyright: 2006-2021 Jochen Kupperschmidt
:License: Revised BSD (see `LICENSE` file for details)
"""
import pytest
from pytest import raises
from byceps.database import db
from byceps.services.party import service as party_service
from byceps.events.ticketing import TicketCheckedIn
from byceps.services.ticketing... | 27.782313 | 78 | 0.742899 |
1dca548c39324b805aa31cf858970ffda01e49f0 | 1,162 | py | Python | setup.py | startupcodebr/django-datatables-pagination | 4193ee920287e2a13dfd811013189a44752fbffd | [
"MIT"
] | 2 | 2020-08-17T13:37:40.000Z | 2021-08-12T22:43:26.000Z | setup.py | startupcodebr/django-datatables-pagination | 4193ee920287e2a13dfd811013189a44752fbffd | [
"MIT"
] | null | null | null | setup.py | startupcodebr/django-datatables-pagination | 4193ee920287e2a13dfd811013189a44752fbffd | [
"MIT"
] | 1 | 2021-03-08T15:22:20.000Z | 2021-03-08T15:22:20.000Z | from distutils.core import setup
from setuptools import find_packages
setup(
packages=find_packages(),
include_package_data=True,
name='django-datatables-pagination',
version='0.1.5',
license='MIT',
description='A Django ListView integration with datatables library.',
author='Matheus Zicku... | 35.212121 | 73 | 0.634251 |
63326a11c47339b10fe5f5d9de8bd11ec19661c9 | 1,759 | py | Python | src/kedro_tutorial/__main__.py | DavidMG01/KedroSpaceflightsTutorial | ce610e2dded722b65ffb35eb85f21db119b51b2e | [
"MIT"
] | null | null | null | src/kedro_tutorial/__main__.py | DavidMG01/KedroSpaceflightsTutorial | ce610e2dded722b65ffb35eb85f21db119b51b2e | [
"MIT"
] | null | null | null | src/kedro_tutorial/__main__.py | DavidMG01/KedroSpaceflightsTutorial | ce610e2dded722b65ffb35eb85f21db119b51b2e | [
"MIT"
] | null | null | null | # Copyright 2021 QuantumBlack Visual Analytics Limited
#
# 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
#
# THE SOFTWARE IS PROVIDED "AS IS",... | 39.088889 | 77 | 0.770893 |
aa62a5d6d6f4bf9b24708a8aac94813421a5d7ce | 480 | py | Python | ports/stm32/boards/manifest.py | psnergy/micropython | f57c526115a4b16fdda436065e0dfda7f2916fd5 | [
"MIT"
] | null | null | null | ports/stm32/boards/manifest.py | psnergy/micropython | f57c526115a4b16fdda436065e0dfda7f2916fd5 | [
"MIT"
] | null | null | null | ports/stm32/boards/manifest.py | psnergy/micropython | f57c526115a4b16fdda436065e0dfda7f2916fd5 | [
"MIT"
] | null | null | null | include("$(MPY_DIR)/extmod/uasyncio/manifest.py")
freeze("$(MPY_DIR)/drivers/dht", "dht.py")
freeze("$(MPY_DIR)/drivers/display", ("lcd160cr.py", "lcd160cr_test.py"))
freeze("$(MPY_DIR)/drivers/onewire", "onewire.py")
freeze("../../../frozen", "main.py")
freeze("../../../frozen", "config.py")
freeze("../../../frozen", ... | 40 | 73 | 0.589583 |
8fff6ba4d8bd2b5a48ddc7693baf4c341c575436 | 179 | py | Python | museum_management/gadget/doctype/gadget_product_revision/test_gadget_product_revision.py | neung2542/museum_management1 | 0cd31f28d390cca758bf2e77b59a584828d24507 | [
"MIT"
] | null | null | null | museum_management/gadget/doctype/gadget_product_revision/test_gadget_product_revision.py | neung2542/museum_management1 | 0cd31f28d390cca758bf2e77b59a584828d24507 | [
"MIT"
] | null | null | null | museum_management/gadget/doctype/gadget_product_revision/test_gadget_product_revision.py | neung2542/museum_management1 | 0cd31f28d390cca758bf2e77b59a584828d24507 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
import unittest
class TestGadgetProductRevision(unittest.TestCase):
pass
| 19.888889 | 68 | 0.793296 |
c32b5bbd07f079a18c8ecb48a012b70a0953a62e | 6,652 | py | Python | kw_tests/test_data_storage.py | alex-kalanis/upload-per-partes | 639df2df326c9b8231acef4cd5fc001d6395b71b | [
"BSD-3-Clause"
] | null | null | null | kw_tests/test_data_storage.py | alex-kalanis/upload-per-partes | 639df2df326c9b8231acef4cd5fc001d6395b71b | [
"BSD-3-Clause"
] | null | null | null | kw_tests/test_data_storage.py | alex-kalanis/upload-per-partes | 639df2df326c9b8231acef4cd5fc001d6395b71b | [
"BSD-3-Clause"
] | null | null | null | from kw_tests.common_class import CommonTestClass
from kw_tests.support import Files, Dirs, DataRam, InfoRam
from kw_upload.data_storage import VolumeBasic
from kw_upload.data_storage import AStorage as DataStorage
from kw_upload.uploader.essentials import Calculates, Hashed, TargetSearch
from kw_upload.exceptions impo... | 42.369427 | 133 | 0.661455 |
135bcea46e0d8b121d087066a3791d4635555127 | 206 | py | Python | redock/__init__.py | xolox/python-redock | 12f8282d7e6199468992c5ee558513cc2a5cc536 | [
"MIT"
] | 8 | 2015-05-20T23:06:54.000Z | 2020-12-03T03:45:23.000Z | redock/__init__.py | xolox/python-redock | 12f8282d7e6199468992c5ee558513cc2a5cc536 | [
"MIT"
] | null | null | null | redock/__init__.py | xolox/python-redock | 12f8282d7e6199468992c5ee558513cc2a5cc536 | [
"MIT"
] | 2 | 2016-06-21T20:44:09.000Z | 2017-08-29T21:11:49.000Z | # Semi-standard module versioning.
__version__ = '0.5.8'
# Silence the logger of an external dependency.
import logging
logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(logging.WARN)
| 29.428571 | 84 | 0.800971 |
be621af6798871247d9e874fa0afe1f7a2b335bd | 81,166 | py | Python | code/tmp_rtrip/test/test_pathlib.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | 24 | 2018-01-23T05:28:40.000Z | 2021-04-13T20:52:59.000Z | code/tmp_rtrip/test/test_pathlib.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | 17 | 2017-12-21T18:32:31.000Z | 2018-12-18T17:09:50.000Z | code/tmp_rtrip/test/test_pathlib.py | emilyemorehouse/ast-and-me | 3f58117512e125e1ecbe3c72f2f0d26adb80b7b3 | [
"MIT"
] | null | null | null | import collections
import io
import os
import errno
import pathlib
import pickle
import socket
import stat
import tempfile
import unittest
from unittest import mock
from test import support
android_not_root = support.android_not_root
TESTFN = support.TESTFN
try:
import grp, pwd
except ImportError:
grp = pwd = N... | 39.689976 | 79 | 0.536493 |
d069283fdd4b29874e858a93a0d513b85350e070 | 246 | py | Python | .history/50.pow-x-n_20211120025949.py | chenhuiyu/LeetCode-python | 2ceb4af821a9b7344c00549abbfdd5f72a5d595b | [
"Apache-2.0"
] | null | null | null | .history/50.pow-x-n_20211120025949.py | chenhuiyu/LeetCode-python | 2ceb4af821a9b7344c00549abbfdd5f72a5d595b | [
"Apache-2.0"
] | null | null | null | .history/50.pow-x-n_20211120025949.py | chenhuiyu/LeetCode-python | 2ceb4af821a9b7344c00549abbfdd5f72a5d595b | [
"Apache-2.0"
] | null | null | null | #
# @lc app=leetcode.cn id=50 lang=python3
#
# [50] Pow(x, n)
#
n = 5
x = 2
# @lc code=start
class Solution:
def myPow(self, x: float, n: int) -> float:
if n > 0:
while x > 0:
x = x >> 1
# @lc code=end
| 12.947368 | 47 | 0.46748 |
a5496de9ab2da96e3779ff635a4240c80b164095 | 613 | py | Python | hanbai/hanbai/migrations/0002_auto_20210211_1451.py | Checkroth/kurumahanbai | d7ab0a59161e104cc4701cb6ed3138f394999b9f | [
"MIT"
] | null | null | null | hanbai/hanbai/migrations/0002_auto_20210211_1451.py | Checkroth/kurumahanbai | d7ab0a59161e104cc4701cb6ed3138f394999b9f | [
"MIT"
] | null | null | null | hanbai/hanbai/migrations/0002_auto_20210211_1451.py | Checkroth/kurumahanbai | d7ab0a59161e104cc4701cb6ed3138f394999b9f | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-02-11 05:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hanbai', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='extrafield',
name='field_name',
... | 25.541667 | 96 | 0.574225 |
05ea501a54669c175ece48b8ae02e52889534617 | 778 | py | Python | fytnet/migrations/0016_auto_20210327_1025.py | Code-Institute-Submissions/danielboots-fytletic | 67c3000a4b681d7f76255ab11db841a7f2ba613e | [
"OLDAP-2.3"
] | 1 | 2021-03-31T18:54:25.000Z | 2021-03-31T18:54:25.000Z | fytnet/migrations/0016_auto_20210327_1025.py | Code-Institute-Submissions/danielboots-fytletic | 67c3000a4b681d7f76255ab11db841a7f2ba613e | [
"OLDAP-2.3"
] | null | null | null | fytnet/migrations/0016_auto_20210327_1025.py | Code-Institute-Submissions/danielboots-fytletic | 67c3000a4b681d7f76255ab11db841a7f2ba613e | [
"OLDAP-2.3"
] | 1 | 2021-03-31T11:00:11.000Z | 2021-03-31T11:00:11.000Z | # Generated by Django 3.1.6 on 2021-03-27 10:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('fytnet', '0015_auto_20210326_2053'),
]
operations = [
migrations.AlterField(
model_name='fighter',
name='email',
... | 26.827586 | 79 | 0.584833 |
1e440cf9e066f721f10fd116471d0263e011a84c | 18,758 | py | Python | guillotina/tests/fixtures.py | psanlorenzo/guillotina | 0840cf39914d23a9e26e35bd40939511d3ca78d7 | [
"BSD-2-Clause"
] | null | null | null | guillotina/tests/fixtures.py | psanlorenzo/guillotina | 0840cf39914d23a9e26e35bd40939511d3ca78d7 | [
"BSD-2-Clause"
] | null | null | null | guillotina/tests/fixtures.py | psanlorenzo/guillotina | 0840cf39914d23a9e26e35bd40939511d3ca78d7 | [
"BSD-2-Clause"
] | null | null | null | from async_asgi_testclient import TestClient
from guillotina import task_vars
from guillotina import testing
from guillotina.component import get_utility
from guillotina.component import globalregistry
from guillotina.const import ROOT_ID
from guillotina.const import TRASHED_ID
from guillotina.db.interfaces import ICoc... | 29.633491 | 104 | 0.64074 |
c675315aa37b152257cc3d84b886bb13a6e1bd34 | 7,065 | py | Python | official/projects/volumetric_models/modeling/backbones/unet_3d.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | 1 | 2020-05-20T11:40:56.000Z | 2020-05-20T11:40:56.000Z | official/projects/volumetric_models/modeling/backbones/unet_3d.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | null | null | null | official/projects/volumetric_models/modeling/backbones/unet_3d.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | 1 | 2022-03-21T13:47:02.000Z | 2022-03-21T13:47:02.000Z | # Copyright 2022 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... | 39.915254 | 139 | 0.707006 |
fa642eba3709c73226bda3d5e0a59bb42853e958 | 129 | py | Python | IMC-GAE_one_sample/graph.py | WesleyClode/MBIMC-GAE | fd4d6df3467b57c0fa4d5e6e11f79085be32ed51 | [
"Apache-2.0"
] | null | null | null | IMC-GAE_one_sample/graph.py | WesleyClode/MBIMC-GAE | fd4d6df3467b57c0fa4d5e6e11f79085be32ed51 | [
"Apache-2.0"
] | null | null | null | IMC-GAE_one_sample/graph.py | WesleyClode/MBIMC-GAE | fd4d6df3467b57c0fa4d5e6e11f79085be32ed51 | [
"Apache-2.0"
] | null | null | null | import dgl
g = dgl.graph(([0, 1, 2], [1, 2, 3]))
neg_sampler = dgl.dataloading.negative_sampler.Uniform(2)
neg_sampler(g, [0, 1]) | 32.25 | 57 | 0.674419 |
8acc882bf921f8fb343055797c46c5d540921fde | 729 | py | Python | elemental/model/defaults.py | angstwad/elemental | 26827572a64fbcb02654642ef247669e2188bc10 | [
"Apache-2.0"
] | 15 | 2015-11-07T03:05:03.000Z | 2021-04-28T22:32:18.000Z | elemental/model/defaults.py | ktosiu/elemental | 26827572a64fbcb02654642ef247669e2188bc10 | [
"Apache-2.0"
] | null | null | null | elemental/model/defaults.py | ktosiu/elemental | 26827572a64fbcb02654642ef247669e2188bc10 | [
"Apache-2.0"
] | 7 | 2016-01-08T03:15:28.000Z | 2018-07-29T04:37:34.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of Elemental.
#
# Copyright 2014 Paul Durivage <pauldurivage+git@gmail.com>
#
# 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
... | 34.714286 | 74 | 0.742112 |
5bfbded5e1a29e5103e31afc12fcb80efab25018 | 32,364 | py | Python | tests/test_server.py | isaac-philip/rasa | 923db75e03921921a6f1f3489a2c5574138ee685 | [
"Apache-2.0"
] | 5 | 2020-08-28T06:44:31.000Z | 2021-03-14T18:46:01.000Z | tests/test_server.py | isaac-philip/rasa | 923db75e03921921a6f1f3489a2c5574138ee685 | [
"Apache-2.0"
] | 71 | 2020-08-25T02:46:08.000Z | 2022-03-01T13:23:38.000Z | tests/test_server.py | isaac-philip/rasa | 923db75e03921921a6f1f3489a2c5574138ee685 | [
"Apache-2.0"
] | 1 | 2020-07-01T12:07:55.000Z | 2020-07-01T12:07:55.000Z | import os
from multiprocessing.managers import DictProxy
import requests
import time
import tempfile
import uuid
from typing import List, Text, Type, Generator, NoReturn
from contextlib import ExitStack
from _pytest import pathlib
from aioresponses import aioresponses
import pytest
from freezegun import freeze_time... | 30.764259 | 88 | 0.66095 |
919663882be8fb99d61d9c8370e48e948cccaaf5 | 1,574 | py | Python | prepare_input.py | Dani-97/tbcnn | 1e19e20099188dea42c97f09de39a0fadbcba92f | [
"MIT"
] | 30 | 2019-01-26T09:19:17.000Z | 2022-01-27T06:52:56.000Z | prepare_input.py | Dani-97/tbcnn | 1e19e20099188dea42c97f09de39a0fadbcba92f | [
"MIT"
] | 9 | 2019-07-26T07:00:57.000Z | 2021-05-11T10:08:40.000Z | prepare_input.py | Dani-97/tbcnn | 1e19e20099188dea42c97f09de39a0fadbcba92f | [
"MIT"
] | 17 | 2019-08-20T09:46:00.000Z | 2022-02-16T19:44:26.000Z | import os
import numpy as np
import imageio
def prepare(inDir, outFile):
"""Prepare input: convert to float with unit variance and zero mean,
extract labels and pack everything into a big numpy array to be used for training
outFile => path without extension (more than one file will be created)
"""
... | 28.107143 | 85 | 0.6277 |
8475877f9b90584b9383a9666d48bff7e0425e88 | 24,079 | py | Python | pandas/core/reshape/concat.py | RakhithJK/pandas | 0eeda645212c240d6cbdef8e3ba4834c3763553b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 28,899 | 2016-10-13T03:32:12.000Z | 2022-03-31T21:39:05.000Z | pandas/core/reshape/concat.py | RakhithJK/pandas | 0eeda645212c240d6cbdef8e3ba4834c3763553b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 31,004 | 2016-10-12T23:22:27.000Z | 2022-03-31T23:17:38.000Z | pandas/core/reshape/concat.py | RakhithJK/pandas | 0eeda645212c240d6cbdef8e3ba4834c3763553b | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 15,149 | 2016-10-13T03:21:31.000Z | 2022-03-31T18:46:47.000Z | """
Concat routines.
"""
from __future__ import annotations
from collections import abc
from typing import (
TYPE_CHECKING,
Hashable,
Iterable,
Literal,
Mapping,
cast,
overload,
)
import numpy as np
from pandas._typing import Axis
from pandas.util._decorators import (
cache_readonly,
... | 30.870513 | 88 | 0.551061 |
c30a10b7d74670d8f6b406b6a60afc1a6a993d5e | 3,088 | py | Python | metric/c_f1.py | lizhaoliu-Lec/Revisiting_Deep_Metric_Learning_PyTorch | 27f2a914d818fef56f33767e5287a3dc3f2091a4 | [
"MIT"
] | null | null | null | metric/c_f1.py | lizhaoliu-Lec/Revisiting_Deep_Metric_Learning_PyTorch | 27f2a914d818fef56f33767e5287a3dc3f2091a4 | [
"MIT"
] | null | null | null | metric/c_f1.py | lizhaoliu-Lec/Revisiting_Deep_Metric_Learning_PyTorch | 27f2a914d818fef56f33767e5287a3dc3f2091a4 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from scipy.special import comb
class Metric:
def __init__(self, **kwargs):
self.requires = ['kmeans_cosine', 'kmeans_nearest_cosine', 'features_cosine', 'target_labels']
self.name = 'c_f1'
def __call__(self, target_labels, computed_cluster_labels_cosine, featur... | 35.494253 | 113 | 0.562176 |
a3c3cff744ab2c0dfc676a6454ce7229b3cd0187 | 6,072 | py | Python | vispy/color/color_space.py | izaid/vispy | 402cf95bfef88d70c9c45bb27c532ed72944e14a | [
"BSD-3-Clause"
] | null | null | null | vispy/color/color_space.py | izaid/vispy | 402cf95bfef88d70c9c45bb27c532ed72944e14a | [
"BSD-3-Clause"
] | null | null | null | vispy/color/color_space.py | izaid/vispy | 402cf95bfef88d70c9c45bb27c532ed72944e14a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2014, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from __future__ import division # just to be safe...
import numpy as np
from ..ext.six import string_types
###############################################################... | 33 | 79 | 0.501318 |
6e8b7cb2a73fe3a0cb897e9b993057bfad15c3d0 | 6,251 | py | Python | diskimage_builder/graph/digraph.py | stackhpc/diskimage-builder | 196b44f38a0188b47ee1846f8f009cc41d68ec6e | [
"Apache-2.0"
] | null | null | null | diskimage_builder/graph/digraph.py | stackhpc/diskimage-builder | 196b44f38a0188b47ee1846f8f009cc41d68ec6e | [
"Apache-2.0"
] | null | null | null | diskimage_builder/graph/digraph.py | stackhpc/diskimage-builder | 196b44f38a0188b47ee1846f8f009cc41d68ec6e | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Andreas Florath (andreas@florath.net)
#
# 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... | 32.05641 | 75 | 0.610142 |
0f5b4cb689a13d6cc12426ab64bc576cfd9716a2 | 70,498 | py | Python | testing/test_terminal.py | DahlitzFlorian/pytest | 4a1557fa0e04132eb847d4a5d01c77f0ab777c5a | [
"MIT"
] | 1 | 2020-10-03T21:28:12.000Z | 2020-10-03T21:28:12.000Z | testing/test_terminal.py | DahlitzFlorian/pytest | 4a1557fa0e04132eb847d4a5d01c77f0ab777c5a | [
"MIT"
] | null | null | null | testing/test_terminal.py | DahlitzFlorian/pytest | 4a1557fa0e04132eb847d4a5d01c77f0ab777c5a | [
"MIT"
] | 1 | 2020-06-24T12:44:33.000Z | 2020-06-24T12:44:33.000Z | """
terminal reporting of the full testing process.
"""
import collections
import os
import sys
import textwrap
from io import StringIO
from typing import Dict
from typing import List
from typing import Tuple
import pluggy
import py
import _pytest.config
import pytest
from _pytest.config import ExitCode
from _pytest.... | 32.338532 | 107 | 0.518015 |
a30f36a4a7b7b2d48a7159ce11f3977b8920d7c9 | 6,864 | py | Python | nlpaug/augmenter/word/reserved.py | lucidworks/nlpaug | 8e47fa39200db17f4dc1d61567af1419bc389071 | [
"MIT"
] | 1 | 2021-06-09T20:07:30.000Z | 2021-06-09T20:07:30.000Z | nlpaug/augmenter/word/reserved.py | lucidworks/nlpaug | 8e47fa39200db17f4dc1d61567af1419bc389071 | [
"MIT"
] | null | null | null | nlpaug/augmenter/word/reserved.py | lucidworks/nlpaug | 8e47fa39200db17f4dc1d61567af1419bc389071 | [
"MIT"
] | null | null | null | """
Augmenter that apply target word replacement operation to textual input.
"""
import re
from collections import defaultdict
from nlpaug.augmenter.word import WordAugmenter
from nlpaug.util import Action, Doc
class ReservedAug(WordAugmenter):
CONNECT_TOKEN = "nnnnn"
"""
Augmenter that apply target ... | 37.102703 | 119 | 0.589015 |
9798aa3d1eb6d35600828e0328e9cb80868ccd65 | 77,171 | bzl | Python | repos.bzl | windayski/release | 83a4dbf666313562a891d31bda68c91980581c7c | [
"Apache-2.0"
] | null | null | null | repos.bzl | windayski/release | 83a4dbf666313562a891d31bda68c91980581c7c | [
"Apache-2.0"
] | null | null | null | repos.bzl | windayski/release | 83a4dbf666313562a891d31bda68c91980581c7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Kubernetes 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 ... | 37.298695 | 74 | 0.636781 |
ccdd867078ff0e43f0dfc8006adbb1872e698e22 | 4,144 | py | Python | build/x86/python/m5/internal/param_Switch.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | build/x86/python/m5/internal/param_Switch.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | build/x86/python/m5/internal/param_Switch.py | billionshang/gem5 | 18cc4294f32315595f865d07d1f33434e92b06b2 | [
"BSD-3-Clause"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path imp... | 30.028986 | 114 | 0.676641 |
f3524d7786f294f680962dddd5beb46c86fd8c5e | 15,143 | py | Python | experiments.py | joshsanz/learned_uncertainty | 2103126105dbe44cfe75fc22291ba669c1a162f3 | [
"MIT"
] | null | null | null | experiments.py | joshsanz/learned_uncertainty | 2103126105dbe44cfe75fc22291ba669c1a162f3 | [
"MIT"
] | null | null | null | experiments.py | joshsanz/learned_uncertainty | 2103126105dbe44cfe75fc22291ba669c1a162f3 | [
"MIT"
] | null | null | null | import matplotlib
matplotlib.use('tkagg')
from matplotlib import pyplot as plt
plt.rc('figure', figsize=[10, 6])
import time
from data_models import *
from prediction_models import *
from control_models import *
def error(predicted_return, true_return):
return (predicted_return - true_return)
def get_gaussian... | 44.801775 | 111 | 0.606947 |
253733e240cb538f9540b0c99590e485d399f71e | 3,902 | py | Python | voter_validation/search.py | lakshbhasin/VoterValidation | 2249f387046b5039b650e3b5c63b9d3d3b7aea8f | [
"Apache-2.0"
] | 6 | 2018-11-02T14:10:54.000Z | 2020-07-14T02:38:03.000Z | voter_validation/search.py | lakshbhasin/VoterValidation | 2249f387046b5039b650e3b5c63b9d3d3b7aea8f | [
"Apache-2.0"
] | 2 | 2021-06-10T20:56:46.000Z | 2021-06-10T20:58:54.000Z | voter_validation/search.py | lakshbhasin/VoterValidation | 2249f387046b5039b650e3b5c63b9d3d3b7aea8f | [
"Apache-2.0"
] | null | null | null | """
Search-related functions and variables
"""
import re
from django.contrib.postgres.search import TrigramSimilarity
from django.db.models import F, Case, When, FloatField
from .models import Voter, RegStatus
from .serializers import VoterSerializer
ALPHANUMERIC_REGEX = re.compile(r'\W+', re.UNICODE)
# Fields used... | 34.839286 | 80 | 0.696053 |
093c5efebad0895cdd14a30096469ec2c390df82 | 22,063 | py | Python | nmt/model.py | deepmipt/nmt-chit-chat | 397c6c91747fc9a2c404a4852bb7e289ec4de542 | [
"Apache-2.0"
] | null | null | null | nmt/model.py | deepmipt/nmt-chit-chat | 397c6c91747fc9a2c404a4852bb7e289ec4de542 | [
"Apache-2.0"
] | null | null | null | nmt/model.py | deepmipt/nmt-chit-chat | 397c6c91747fc9a2c404a4852bb7e289ec4de542 | [
"Apache-2.0"
] | 5 | 2017-12-29T21:38:53.000Z | 2021-03-10T06:31:29.000Z | # Copyright 2017 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 applicable law or a... | 36.833055 | 81 | 0.660472 |
b82fef787478f897970bc3aac73fd67cfc2c18f3 | 2,859 | py | Python | suorganizer/suorganizer/settings/dev.py | mohammadasim/suorganiser | 26f11c944c34cd11b5961ec1b5eeb5cb3a7acdf8 | [
"Apache-2.0"
] | null | null | null | suorganizer/suorganizer/settings/dev.py | mohammadasim/suorganiser | 26f11c944c34cd11b5961ec1b5eeb5cb3a7acdf8 | [
"Apache-2.0"
] | 3 | 2021-06-04T22:51:25.000Z | 2021-09-22T18:51:53.000Z | suorganizer/suorganizer/settings/dev.py | mohammadasim/suorganiser | 26f11c944c34cd11b5961ec1b5eeb5cb3a7acdf8 | [
"Apache-2.0"
] | null | null | null | from .base import *
from ..log_filters import ManagementFilter
import socket
DEBUG = True
ALLOWED_HOSTS = ['app', '127.0.0.1']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': get_env_variable('PGSQL_DB_NAME'),
'USER': get_env_variable('PGSQL_DB_USER'... | 26.472222 | 65 | 0.651626 |
1dba67ea9ea31b98a41e31e11d19b057efbc8007 | 3,614 | py | Python | python/dset/hpatches_dataset.py | albutko/vlb | 437245c0991948eeb36a277937a7e67d389041e4 | [
"BSD-2-Clause"
] | 1 | 2019-12-13T18:08:50.000Z | 2019-12-13T18:08:50.000Z | python/dset/hpatches_dataset.py | albutko/vlb | 437245c0991948eeb36a277937a7e67d389041e4 | [
"BSD-2-Clause"
] | null | null | null | python/dset/hpatches_dataset.py | albutko/vlb | 437245c0991948eeb36a277937a7e67d389041e4 | [
"BSD-2-Clause"
] | null | null | null | from dset.dataset import SequenceDataset
import urllib
import tarfile
import os
import sys
import scipy
if sys.version_info[0] >= 3:
from urllib.request import urlretrieve
else:
from urllib import urlretrieve
class HPatches_Dataset(SequenceDataset):
def __init__(self,root_dir = './datasets/', download_f... | 38.446809 | 141 | 0.581074 |
82fb6f6138c723772395683a20e8a4de2411004f | 1,844 | py | Python | pettingzoo/butterfly/pistonball/manual_control.py | rodrigodelazcano/PettingZoo | 41fe43c7da2fd92fa8c6aa5a5a28083664092aa5 | [
"Apache-2.0"
] | null | null | null | pettingzoo/butterfly/pistonball/manual_control.py | rodrigodelazcano/PettingZoo | 41fe43c7da2fd92fa8c6aa5a5a28083664092aa5 | [
"Apache-2.0"
] | null | null | null | pettingzoo/butterfly/pistonball/manual_control.py | rodrigodelazcano/PettingZoo | 41fe43c7da2fd92fa8c6aa5a5a28083664092aa5 | [
"Apache-2.0"
] | null | null | null | import os
os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "hide"
import time
import numpy as np
import pygame
def manual_control(**kwargs):
from .pistonball import env as _env
# flatten_obs is True by default
env = _env(**kwargs)
env.reset()
# Use save_observation to save a dictionary of observation... | 30.229508 | 73 | 0.517896 |
2e2ec89ae4c3956278c89d02c8add83a65f79484 | 2,762 | py | Python | discord.py | christopher-roelofs/GameEventHub | 4ed43f27b5e0593e511613906ec2d9369483fae0 | [
"MIT"
] | null | null | null | discord.py | christopher-roelofs/GameEventHub | 4ed43f27b5e0593e511613906ec2d9369483fae0 | [
"MIT"
] | null | null | null | discord.py | christopher-roelofs/GameEventHub | 4ed43f27b5e0593e511613906ec2d9369483fae0 | [
"MIT"
] | null | null | null |
from pypresence import Presence
import time
import config
import event_manager
import logger
from string_util import replace_text
from time import sleep
SETTINGS = config.get_config()
client_id = SETTINGS["discord"]['application_id']
connected = False
retries = 0
max_retries = 3
RPC = None
def initialize():
glo... | 35.410256 | 182 | 0.636857 |
639b568b78a2938ecdb6a1772237a69eecdfc52c | 5,678 | py | Python | Controller.py | atelieryou/robot_car | 05d1f10dbcc0199794372f26b239c17d69716429 | [
"MIT"
] | null | null | null | Controller.py | atelieryou/robot_car | 05d1f10dbcc0199794372f26b239c17d69716429 | [
"MIT"
] | null | null | null | Controller.py | atelieryou/robot_car | 05d1f10dbcc0199794372f26b239c17d69716429 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pygame
import bleak
import asyncio
import queue
import threading
import pygame.locals as pl
import struct
import sys
# ble_simple_peripheral.pyにあるものと一致するようにする
UUID = "6e400002-b5a3-f393-e0a9-e50e24dcca9e"
# スレッド間で共有するためのグローバル変数
power = queue.Queue()
# 通信のための関数
async ... | 31.898876 | 95 | 0.482388 |
5ec8e9e2d4644020b7358b62d7d069d152172a24 | 4,711 | py | Python | config.py | CSHF-yhhhh/A-Simple-Packet-Filtering-Firewall-in-Linux | febff6825fb12e5220289b1a666b6a8d0eccf94f | [
"MIT"
] | null | null | null | config.py | CSHF-yhhhh/A-Simple-Packet-Filtering-Firewall-in-Linux | febff6825fb12e5220289b1a666b6a8d0eccf94f | [
"MIT"
] | null | null | null | config.py | CSHF-yhhhh/A-Simple-Packet-Filtering-Firewall-in-Linux | febff6825fb12e5220289b1a666b6a8d0eccf94f | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
@文件:config.py
@作者: CSHF[https://github.com/CSHF-yhhhh]
@说明: 防火墙的配置文件
在运行之前,先将通目录下的 write.c 编译成write.so, 命令为 gcc write.c -shared -o write.so
"""
import ctypes
import subprocess
import threading
# 加载C模块
C_WRITE = ctypes.cdll.LoadLibrary("./write.so")
def __OpenDev(path="/dev/cshfFirewall... | 22.649038 | 82 | 0.56782 |
71bad1f9f4dbf3b0e98353c19760f8ac2f092861 | 169 | py | Python | working-library/background/AvatarAPI/urls.py | FredCof/Fresh-supermarket-Online | 25c1cb28f5b5dc1f85e53ee7de5b055de438c491 | [
"Apache-2.0"
] | 2 | 2021-03-12T16:35:27.000Z | 2021-03-12T16:35:34.000Z | working-library/background/AvatarAPI/urls.py | FredCof/Fresh-supermarket-Online | 25c1cb28f5b5dc1f85e53ee7de5b055de438c491 | [
"Apache-2.0"
] | 4 | 2021-03-19T13:16:08.000Z | 2021-06-09T19:26:37.000Z | working-library/background/AvatarAPI/urls.py | FredCof/Fresh-supermarket-Online | 25c1cb28f5b5dc1f85e53ee7de5b055de438c491 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url('api/avatar/upload', views.AvatarUpload),
url('api/avatar/load', views.AvatarLoad),
]
| 18.777778 | 49 | 0.704142 |
b37355a205f508d228a55738171e4e11b43b3bff | 2,039 | py | Python | sdk/python/pulumi_azure_native/blockchain/list_location_consortiums.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/blockchain/list_location_consortiums.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/blockchain/list_location_consortiums.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 31.369231 | 148 | 0.693968 |
2d9238871635bd063d8508c6659280a426ba4e08 | 2,124 | py | Python | zerver/webhooks/appveyor/tests.py | acguglielmo/zulip | 97ed71ca699c3abd1c2584cc3c6a8370430ae2f6 | [
"Apache-2.0"
] | 1 | 2019-04-14T20:31:55.000Z | 2019-04-14T20:31:55.000Z | zerver/webhooks/appveyor/tests.py | hcxiong/zulip | bf22eefedebd50b25f32b22988217c13a89b65d1 | [
"Apache-2.0"
] | 4 | 2021-11-15T17:52:28.000Z | 2022-02-27T10:43:15.000Z | zerver/webhooks/appveyor/tests.py | hcxiong/zulip | bf22eefedebd50b25f32b22988217c13a89b65d1 | [
"Apache-2.0"
] | 9 | 2019-11-04T18:59:29.000Z | 2022-03-22T17:46:37.000Z | # -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase
class AppveyorHookTests(WebhookTestCase):
STREAM_NAME = 'appveyor'
URL_TEMPLATE = "/api/v1/external/appveyor?api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = 'appveyor'
def test_appveyor_build_success_message(self) -> Non... | 51.804878 | 105 | 0.60452 |
75622bcf396409de2b81fd6c1cb0ad6922ccd962 | 1,146 | py | Python | backend/src/accounts/migrations/0001_initial.py | BenK93/GeThaText | c74aacf9d58734670588f0ee2965b2471022edd5 | [
"MIT"
] | null | null | null | backend/src/accounts/migrations/0001_initial.py | BenK93/GeThaText | c74aacf9d58734670588f0ee2965b2471022edd5 | [
"MIT"
] | null | null | null | backend/src/accounts/migrations/0001_initial.py | BenK93/GeThaText | c74aacf9d58734670588f0ee2965b2471022edd5 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-09-26 14:05
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Account',
fields=[
('password', models.Char... | 35.8125 | 110 | 0.582897 |
5c3dea1c70042ca97ceaf89763bf23452179f7a7 | 240 | py | Python | scrapli_paramiko/transport/__init__.py | scrapli/scrapli_paramiko | b21b9f7aa00c8cdd9a882fc9b77765e936ccb22d | [
"MIT"
] | null | null | null | scrapli_paramiko/transport/__init__.py | scrapli/scrapli_paramiko | b21b9f7aa00c8cdd9a882fc9b77765e936ccb22d | [
"MIT"
] | 11 | 2020-07-12T15:50:45.000Z | 2021-01-24T15:48:44.000Z | scrapli_paramiko/transport/__init__.py | scrapli/scrapli_paramiko | b21b9f7aa00c8cdd9a882fc9b77765e936ccb22d | [
"MIT"
] | null | null | null | """scrapli_paramiko.transport"""
from scrapli_paramiko.transport.miko import MIKO_TRANSPORT_ARGS as TRANSPORT_ARGS
from scrapli_paramiko.transport.miko import MikoTransport as Transport
__all__ = (
"Transport",
"TRANSPORT_ARGS",
)
| 26.666667 | 81 | 0.8 |
f61c046f82f85ff8f3df0821181d95345b4adb2a | 1,914 | py | Python | utils/unicode_csv.py | spudmind/spud | 86e44bca4efd3cd6358467e1511048698a45edbc | [
"MIT"
] | 2 | 2015-04-11T12:22:41.000Z | 2016-08-18T11:12:06.000Z | utils/unicode_csv.py | spudmind/spud | 86e44bca4efd3cd6358467e1511048698a45edbc | [
"MIT"
] | 84 | 2015-01-22T14:33:49.000Z | 2015-04-01T23:15:29.000Z | utils/unicode_csv.py | spudmind/spud | 86e44bca4efd3cd6358467e1511048698a45edbc | [
"MIT"
] | 1 | 2015-04-16T03:10:39.000Z | 2015-04-16T03:10:39.000Z | # -*- coding: utf-8 -*-
import csv, codecs, cStringIO
'''
UTF-8 CSV - Straight from the python 2 docs:
https://docs.python.org/2/library/csv.html#examples
'''
class UTF8Recoder:
"""
Iterator that reads an encoded stream and reencodes the input to UTF-8
"""
def __init__(self, f, encoding):
self... | 28.567164 | 74 | 0.612853 |
dac068b221c7d04db08068dfb4d691026518870b | 6,717 | py | Python | colour/colorimetry/tests/test_generation.py | tjdcs/colour | 09413da71b5da57408eb812797c5db1300d4791a | [
"BSD-3-Clause"
] | null | null | null | colour/colorimetry/tests/test_generation.py | tjdcs/colour | 09413da71b5da57408eb812797c5db1300d4791a | [
"BSD-3-Clause"
] | null | null | null | colour/colorimetry/tests/test_generation.py | tjdcs/colour | 09413da71b5da57408eb812797c5db1300d4791a | [
"BSD-3-Clause"
] | null | null | null | # !/usr/bin/env python
"""Define the unit tests for the :mod:`colour.colorimetry.generation` module."""
import numpy as np
import unittest
from colour.colorimetry.generation import (
sd_constant,
sd_zeros,
sd_ones,
msds_constant,
msds_zeros,
msds_ones,
sd_gaussian_normal,
sd_gaussian_f... | 25.637405 | 82 | 0.643889 |
cb073b903b25d6164f6cd02abd2a1732b2eb5130 | 443 | py | Python | test.py | Neutrinos00/RawImagesSorter | e91b62f56a272f483fe8b571cddec5058bad544a | [
"MIT"
] | null | null | null | test.py | Neutrinos00/RawImagesSorter | e91b62f56a272f483fe8b571cddec5058bad544a | [
"MIT"
] | null | null | null | test.py | Neutrinos00/RawImagesSorter | e91b62f56a272f483fe8b571cddec5058bad544a | [
"MIT"
] | null | null | null | import exifread
import pyperclip
def main():
path_name='./Photos/DSC01311.ARW'
pyperclip.copy(path_name)
with open(path_name, 'rb') as f:
tags = exifread.process_file(f)
for key, val in tags.items():
if 'Image Orientation' in key:
if 'Rotated 90 CCW' in str(val... | 21.095238 | 48 | 0.528217 |
a87466ce290681e4f133c34cf983315d4bbb9d40 | 724 | py | Python | models/mnist/__init__.py | Frankzd/distiller | 931138e2d23989ef9305712e5aa147ae3dff53de | [
"Apache-2.0"
] | null | null | null | models/mnist/__init__.py | Frankzd/distiller | 931138e2d23989ef9305712e5aa147ae3dff53de | [
"Apache-2.0"
] | null | null | null | models/mnist/__init__.py | Frankzd/distiller | 931138e2d23989ef9305712e5aa147ae3dff53de | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018 Intel Corporation
#
# 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... | 34.47619 | 74 | 0.76105 |
dfc4b4ce7bdabf82853d46ce05901f7cf9eb2655 | 45 | py | Python | tarkov/globals_/__init__.py | JustEmuTarkov/jet_py | 2f352b5e6f5d88594d08afc46e9458e919271788 | [
"MIT"
] | 14 | 2021-02-24T02:32:48.000Z | 2022-01-03T05:51:45.000Z | tarkov/globals_/__init__.py | JustEmuTarkov/jet_py | 2f352b5e6f5d88594d08afc46e9458e919271788 | [
"MIT"
] | 1 | 2021-03-08T09:02:29.000Z | 2021-03-08T09:02:29.000Z | tarkov/globals_/__init__.py | JustEmuTarkov/jet_py | 2f352b5e6f5d88594d08afc46e9458e919271788 | [
"MIT"
] | 4 | 2021-04-14T01:47:01.000Z | 2021-11-29T02:18:32.000Z | from .models import GlobalsModel, ItemPreset
| 22.5 | 44 | 0.844444 |
94d64eed9c6fa75a1847356be5a48cbd90b125d1 | 698 | py | Python | cleaning_utils/human_number.py | rezashabrang/cleaner-utils | d0181ee1a131e877e66d943323018617aa488433 | [
"MIT"
] | 4 | 2021-12-28T16:37:00.000Z | 2022-02-17T12:02:02.000Z | cleaning_utils/human_number.py | rezashabrang/cleaner-utils | d0181ee1a131e877e66d943323018617aa488433 | [
"MIT"
] | null | null | null | cleaning_utils/human_number.py | rezashabrang/cleaner-utils | d0181ee1a131e877e66d943323018617aa488433 | [
"MIT"
] | 1 | 2021-09-20T12:32:30.000Z | 2021-09-20T12:32:30.000Z | """Human-Readable Numbers Format."""
# ------------------------ Import libraries and functions ---------------------
from typing import Union
# ---------------------------- function definition ----------------------------
def human_number(number: Union[int, float]) -> str:
"""human-readable number format.
I... | 26.846154 | 79 | 0.560172 |
22945b4e10a697d586b97dd163856d9a7b25437f | 586 | py | Python | final_design/tests/Flashlight/flash.py | DFEC-R2D2/r2d2 | 9b64233865ebfe9f0ca3f1b400b55cc8d6494adf | [
"MIT"
] | 3 | 2017-08-02T04:46:17.000Z | 2020-03-30T12:11:13.000Z | final_design/tests/Flashlight/flash.py | DFEC-R2D2/r2d2 | 9b64233865ebfe9f0ca3f1b400b55cc8d6494adf | [
"MIT"
] | null | null | null | final_design/tests/Flashlight/flash.py | DFEC-R2D2/r2d2 | 9b64233865ebfe9f0ca3f1b400b55cc8d6494adf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
##############################################
# The MIT License (MIT)
# Copyright (c) 2016 Kevin Walchko
# see LICENSE for full details
##############################################
from __future__ import print_function
import time
import sys
sys.path.append('../../python')
from library import... | 20.928571 | 60 | 0.564846 |
f6bb917f09c0bd18503f4886b5ef4248243ae115 | 1,577 | py | Python | script.py | elnuraliyev111/hashmap_vs_linkedlist | d536da0fb26199b7e70bb8a78f4b078789200801 | [
"MIT"
] | null | null | null | script.py | elnuraliyev111/hashmap_vs_linkedlist | d536da0fb26199b7e70bb8a78f4b078789200801 | [
"MIT"
] | null | null | null | script.py | elnuraliyev111/hashmap_vs_linkedlist | d536da0fb26199b7e70bb8a78f4b078789200801 | [
"MIT"
] | null | null | null | from hashmap import HashMap
from linkedlist import LinkedList
N = 6
#Insert Data Into HashMap
my_hashmap = HashMap(N)
my_hashmap.assign("Zachary", "Sunburn Sickness")
my_hashmap.assign("Elise", "Severe Nausea")
my_hashmap.assign("Mimi", "Stomach Flu")
my_hashmap.assign("Devan", "Malaria")
my_hashmap.assign("Gary", "B... | 38.463415 | 115 | 0.773621 |
9ef0a289a77e581047769762c3ec569d6a305593 | 15,490 | py | Python | plugins/modules/oci_os_management_managed_instance_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_os_management_managed_instance_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_os_management_managed_instance_facts.py | LaudateCorpus1/oci-ansible-collection | 2b1cd87b4d652a97c1ca752cfc4fdc4bdb37a7e7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 33.894967 | 150 | 0.579277 |
af2dea943f461aa705963837be699637489ef8e6 | 447 | py | Python | samcli/commands/build/exceptions.py | torresxb1/aws-sam-cli | d307f2eb6e1a91a476a5e2ca6070f974b0c913f1 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2021-07-10T14:19:00.000Z | 2021-07-10T14:19:00.000Z | samcli/commands/build/exceptions.py | torresxb1/aws-sam-cli | d307f2eb6e1a91a476a5e2ca6070f974b0c913f1 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2021-07-29T20:56:48.000Z | 2021-07-29T20:56:48.000Z | samcli/commands/build/exceptions.py | torresxb1/aws-sam-cli | d307f2eb6e1a91a476a5e2ca6070f974b0c913f1 | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-03-18T18:16:23.000Z | 2020-03-18T18:16:23.000Z | """Build exceptions"""
from samcli.commands.exceptions import UserException
class InvalidBuildDirException(UserException):
"""
Value provided to --build-dir is invalid
"""
class MissingBuildMethodException(UserException):
"""
Exception to be thrown when a layer is tried to build without BuildMe... | 20.318182 | 77 | 0.715884 |
f6ecd09f2ee84178c834d5a8146cdba3be412eb9 | 1,546 | py | Python | nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | null | null | null | nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py | demianw/nipype | 52d64c30d96ecd94f1833156e28dce32c4f05ebe | [
"BSD-3-Clause"
] | 2 | 2017-10-05T21:08:38.000Z | 2018-10-09T23:01:23.000Z | nipype/interfaces/fsl/tests/test_auto_WarpPointsToStd.py | effigies/nipype | 18fe222557cf3b9627e06b2a66fba589feaca581 | [
"Apache-2.0"
] | 1 | 2016-10-11T19:18:53.000Z | 2016-10-11T19:18:53.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ....testing import assert_equal
from ..utils import WarpPointsToStd
def test_WarpPointsToStd_inputs():
input_map = dict(args=dict(argstr='%s',
),
coord_mm=dict(argstr='-mm',
xor=['coord_vox'],
),
coord_vox=dict(argstr='-vox',
xor=[... | 25.344262 | 78 | 0.629366 |
cfe6b4ede30ac50ec010b866070cfcea8bc81f63 | 1,119 | py | Python | apps/users/schema.py | kamranhossain/modern-django-setup-v2 | 2f3900c2e32d9fba034e453acaef91cd6c0ee2b2 | [
"MIT"
] | 1 | 2020-07-02T00:25:04.000Z | 2020-07-02T00:25:04.000Z | apps/users/schema.py | kamranhossain/modern-django-setup-v2 | 2f3900c2e32d9fba034e453acaef91cd6c0ee2b2 | [
"MIT"
] | 5 | 2021-03-19T02:24:47.000Z | 2021-06-10T19:02:53.000Z | apps/users/schema.py | kamranhossain/modern-django-setup-v2 | 2f3900c2e32d9fba034e453acaef91cd6c0ee2b2 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
import graphene
from graphene_django import DjangoObjectType
class UserType(DjangoObjectType):
class Meta:
model = get_user_model()
class Query(graphene.ObjectType):
user = graphene.Field(UserType, id=graphene.Int(required=True))
me = graphene.Fiel... | 24.866667 | 67 | 0.688114 |
75509282beddfe3bd4a075ecd0da770467f9c3c1 | 7,248 | py | Python | tests/references/test_utils.py | ColeVoelpel/virtool | 859c8d2516f07343bde47f3bae0247dedd76e6c4 | [
"MIT"
] | 1 | 2019-08-23T00:19:00.000Z | 2019-08-23T00:19:00.000Z | tests/references/test_utils.py | ColeVoelpel/virtool | 859c8d2516f07343bde47f3bae0247dedd76e6c4 | [
"MIT"
] | null | null | null | tests/references/test_utils.py | ColeVoelpel/virtool | 859c8d2516f07343bde47f3bae0247dedd76e6c4 | [
"MIT"
] | null | null | null | import pytest
import virtool.references.utils
@pytest.mark.parametrize("empty", [True, False])
@pytest.mark.parametrize("in_seen", [True, False])
def test_detect_duplicate_abbreviation(in_seen, empty, test_otu):
seen = set()
duplicates = set()
if in_seen:
seen.add("PVF")
if empty:
t... | 26.549451 | 90 | 0.543184 |
74bf1a0bb2d8bd7a1491b274231081a8be8ab8c0 | 14,632 | py | Python | client/python/modeldb/basic/ModelDbSyncerBase.py | MeRajat/modeldb | 3cf07d8292ab73016e72ac8e24d4b69938407c18 | [
"MIT"
] | null | null | null | client/python/modeldb/basic/ModelDbSyncerBase.py | MeRajat/modeldb | 3cf07d8292ab73016e72ac8e24d4b69938407c18 | [
"MIT"
] | null | null | null | client/python/modeldb/basic/ModelDbSyncerBase.py | MeRajat/modeldb | 3cf07d8292ab73016e72ac8e24d4b69938407c18 | [
"MIT"
] | null | null | null | import sys
import yaml
from thrift import Thrift
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol
from ..events import *
from ..thrift.modeldb import ModelDBService
from ..thrift.modeldb import ttypes as modeldb_types
from ..utils.ConfigUtils imp... | 35.257831 | 110 | 0.649399 |
47e2bfbb012a1f89fee0c7cda30aff8d939e3a79 | 189 | py | Python | main/apps.py | Godspower-Eze/savebetter | 3b9dc17d9b6395caaeed91fa79976e9c0061f260 | [
"MIT"
] | null | null | null | main/apps.py | Godspower-Eze/savebetter | 3b9dc17d9b6395caaeed91fa79976e9c0061f260 | [
"MIT"
] | null | null | null | main/apps.py | Godspower-Eze/savebetter | 3b9dc17d9b6395caaeed91fa79976e9c0061f260 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MainConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'main'
def ready(self):
import main.signals | 21 | 56 | 0.708995 |
eab373d81439ee55c077ba094f832753cedbfa66 | 9,099 | py | Python | applications/neural_search/ranking/ernie_matching/deploy/python/predict.py | tanhanzhuo/PaddleNLP | d0d20678f2bec820570b4f09ca49cd402d20c3b6 | [
"Apache-2.0"
] | 7,091 | 2021-02-05T13:56:25.000Z | 2022-03-31T11:42:50.000Z | applications/neural_search/ranking/ernie_matching/deploy/python/predict.py | tanhanzhuo/PaddleNLP | d0d20678f2bec820570b4f09ca49cd402d20c3b6 | [
"Apache-2.0"
] | 844 | 2021-02-10T01:09:29.000Z | 2022-03-31T12:12:58.000Z | applications/neural_search/ranking/ernie_matching/deploy/python/predict.py | tanhanzhuo/PaddleNLP | d0d20678f2bec820570b4f09ca49cd402d20c3b6 | [
"Apache-2.0"
] | 1,035 | 2021-02-05T14:26:48.000Z | 2022-03-31T11:42:57.000Z | # Copyright (c) 2021 PaddlePaddle 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 appli... | 37.138776 | 132 | 0.634465 |
3bf4afe6b341d2dbf4d1b4ed9784fa825863a885 | 8,312 | py | Python | plaso/lib/binary.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 2 | 2016-02-18T12:46:29.000Z | 2022-03-13T03:04:59.000Z | plaso/lib/binary.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | null | null | null | plaso/lib/binary.py | Defense-Cyber-Crime-Center/plaso | 4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47 | [
"Apache-2.0"
] | 6 | 2016-12-18T08:05:36.000Z | 2021-04-06T14:19:11.000Z | # -*- coding: utf-8 -*-
"""This file contains a helper library to read binary files."""
import binascii
import logging
import os
def ByteArrayCopyToString(byte_array, codepage=u'utf-8'):
"""Copies a UTF-8 encoded byte array into a Unicode string.
Args:
byte_array: A byte array containing an UTF-8 encoded st... | 31.366038 | 80 | 0.691651 |
c7fdc79569bb7acb6abc56e956d4e7cfa30e9afc | 1,052 | py | Python | pyfacebook/models/__init__.py | renan-prometheus-arch/python-facebook | 2885a6ef9199aea534ca567c1442b876d64d899e | [
"Apache-2.0"
] | null | null | null | pyfacebook/models/__init__.py | renan-prometheus-arch/python-facebook | 2885a6ef9199aea534ca567c1442b876d64d899e | [
"Apache-2.0"
] | null | null | null | pyfacebook/models/__init__.py | renan-prometheus-arch/python-facebook | 2885a6ef9199aea534ca567c1442b876d64d899e | [
"Apache-2.0"
] | 1 | 2021-06-02T07:15:35.000Z | 2021-06-02T07:15:35.000Z | from .access_token import AccessToken, AuthAccessToken
from .base import BaseModel
from .comment import Comment, CommentSummary
from .page import Page, PageCategory
from .picture import ProfilePictureSource, CoverPhoto
from .post import Post
from .video import Video, VideoCaption
from .photo import Photo
from .album im... | 23.909091 | 76 | 0.705323 |
66bf66eaaa9fd8cfc76861eca46ae14149157c31 | 8,558 | py | Python | onadata/apps/logger/south_migrations/0024_auto__chg_field_attachment_mimetype.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 38 | 2017-02-28T05:39:40.000Z | 2019-01-16T04:39:04.000Z | onadata/apps/logger/south_migrations/0024_auto__chg_field_attachment_mimetype.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 48 | 2019-03-18T09:26:31.000Z | 2019-05-27T08:12:03.000Z | onadata/apps/logger/south_migrations/0024_auto__chg_field_attachment_mimetype.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 5 | 2017-02-22T12:25:19.000Z | 2019-01-15T11:16:40.000Z | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Attachment.mimetype'
db.alter_column('odk_logger_attachment', 'mimetype', self.gf('django... | 73.775862 | 182 | 0.565085 |
bf67ca23e119883f962890d75ddbfd42a8d9787d | 4,367 | py | Python | tests/components/panel_custom/test_init.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/panel_custom/test_init.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/panel_custom/test_init.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """The tests for the panel_custom component."""
from unittest.mock import Mock, patch
from homeassistant import setup
from homeassistant.components import frontend
async def test_webcomponent_custom_path_not_found(hass):
"""Test if a web component is found in config panels dir."""
filename = "mock.file"
... | 27.815287 | 80 | 0.564003 |
00f0186353b156fc0d2a04d30a0adfff96adea16 | 1,073 | py | Python | grabcut1.py | qwerlarlgus/YOLO_Project1 | 27e7b325439e59c8cf0ee9d6cdfd802a4de6c7d4 | [
"MIT"
] | null | null | null | grabcut1.py | qwerlarlgus/YOLO_Project1 | 27e7b325439e59c8cf0ee9d6cdfd802a4de6c7d4 | [
"MIT"
] | null | null | null | grabcut1.py | qwerlarlgus/YOLO_Project1 | 27e7b325439e59c8cf0ee9d6cdfd802a4de6c7d4 | [
"MIT"
] | 1 | 2021-02-02T07:34:20.000Z | 2021-02-02T07:34:20.000Z | import cv2
cv2.__version__ # 4.1.2
import cv2
import numpy as np
import matplotlib.pyplot as plt
image = cv2.imread('vlcsnap-2021-02-04-10h05m23s567.png', cv2.IMREAD_GRAYSCALE)
#이미지 로드 후 RGB로 변환
image_bgr = cv2.imread('vlcsnap-2021-02-04-10h05m23s567.png')
image_rgb = cv2.cvtColor(image_bgr, cv2.COLOR_BGR2RGB)
#... | 23.844444 | 79 | 0.643057 |
69599d3a220a4980dbdb4e5ecf306c89f58aad44 | 6,608 | py | Python | staidelta/daemon/client.py | WarutaShinken/staidelta-blockchain | ab6fd7d0ea93ac8b1b293240aab18db8db34718d | [
"Apache-2.0"
] | 1 | 2022-03-02T12:36:42.000Z | 2022-03-02T12:36:42.000Z | staidelta/daemon/client.py | WarutaShinken/staidelta-blockchain | ab6fd7d0ea93ac8b1b293240aab18db8db34718d | [
"Apache-2.0"
] | null | null | null | staidelta/daemon/client.py | WarutaShinken/staidelta-blockchain | ab6fd7d0ea93ac8b1b293240aab18db8db34718d | [
"Apache-2.0"
] | null | null | null | import asyncio
import json
import ssl
from contextlib import asynccontextmanager
from pathlib import Path
from typing import Any, Dict, Optional
import websockets
from staidelta.types.blockchain_format.sized_bytes import bytes32
from staidelta.util.config import load_config
from staidelta.util.json_util import dict_t... | 37.333333 | 120 | 0.662379 |
b79e992e8b1a83f3e42a2df632d229c17d270258 | 1,683 | py | Python | package/spack-py-pyscaf/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-py-pyscaf/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-py-pyscaf/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 43.153846 | 78 | 0.677362 |
b2d878043756e8b9b759b3800e05aebd2e048928 | 52,327 | py | Python | sympy/simplify/tests/test_simplify.py | srjoglekar246/sympy | 21910e9b6e590a40492de4e129e40cbe3b7ecba0 | [
"BSD-3-Clause"
] | null | null | null | sympy/simplify/tests/test_simplify.py | srjoglekar246/sympy | 21910e9b6e590a40492de4e129e40cbe3b7ecba0 | [
"BSD-3-Clause"
] | null | null | null | sympy/simplify/tests/test_simplify.py | srjoglekar246/sympy | 21910e9b6e590a40492de4e129e40cbe3b7ecba0 | [
"BSD-3-Clause"
] | null | null | null | from sympy import (
acos, Add, atan, besselsimp, binomial, collect, collect_const, combsimp,
cos, cosh, cot, coth, count_ops, Derivative, diff, Dummy, E, Eq, erf, exp,
exp_polar, expand, factor, factorial, FallingFactorial, Float, fraction,
Function, gamma, GoldenRatio, hyper, hyper, hypersimp, I, Integ... | 41.430721 | 121 | 0.522254 |
2a2c29a44e251792ab0a4397e9bbbabd460b52e9 | 2,744 | py | Python | python/taichi/lang/expr.py | lin-hitonami/taichi | da2fa48f4ff8e9ead8ef7246a506bff597fe3a36 | [
"MIT"
] | null | null | null | python/taichi/lang/expr.py | lin-hitonami/taichi | da2fa48f4ff8e9ead8ef7246a506bff597fe3a36 | [
"MIT"
] | null | null | null | python/taichi/lang/expr.py | lin-hitonami/taichi | da2fa48f4ff8e9ead8ef7246a506bff597fe3a36 | [
"MIT"
] | null | null | null | import sys
import traceback
import numpy as np
from taichi.core.util import ti_core as _ti_core
from taichi.lang import impl
from taichi.lang.common_ops import TaichiOperations
from taichi.lang.util import is_taichi_class, python_scope
import taichi as ti
# Scalar, basic data type
class Expr(TaichiOperations):
... | 32.282353 | 198 | 0.543003 |
e059b06db97555065f04a240bca55dba85d56738 | 5,441 | py | Python | openml/_api_calls.py | MichaelMMeskhi/openml-python | 6792015e03f3e31130c4cd00035a2f8f69384d59 | [
"BSD-3-Clause"
] | 1 | 2019-05-07T21:57:08.000Z | 2019-05-07T21:57:08.000Z | openml/_api_calls.py | MichaelMMeskhi/openml-python | 6792015e03f3e31130c4cd00035a2f8f69384d59 | [
"BSD-3-Clause"
] | null | null | null | openml/_api_calls.py | MichaelMMeskhi/openml-python | 6792015e03f3e31130c4cd00035a2f8f69384d59 | [
"BSD-3-Clause"
] | null | null | null | import time
import requests
import warnings
import xmltodict
from . import config
from .exceptions import (OpenMLServerError, OpenMLServerException,
OpenMLServerNoResult)
def _perform_api_call(call, request_method, data=None, file_elements=None):
"""
Perform an API call at the OpenM... | 33.176829 | 78 | 0.619923 |
ab8c9a9a876b8e8143826b4d99df70a690cd81dd | 6,534 | py | Python | tests/components/shelly/test_cover.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/shelly/test_cover.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | tests/components/shelly/test_cover.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """The scene tests for the myq platform."""
from homeassistant.components.cover import (
ATTR_CURRENT_POSITION,
ATTR_POSITION,
DOMAIN as COVER_DOMAIN,
SERVICE_CLOSE_COVER,
SERVICE_OPEN_COVER,
SERVICE_SET_COVER_POSITION,
SERVICE_STOP_COVER,
STATE_CLOSED,
STATE_CLOSING,
STATE_OPEN,... | 33.854922 | 87 | 0.725436 |
be1a3eb93e63eb416be28076522073d0e95cb71b | 35,605 | py | Python | classifier_utils.py | ycechungAI/ALBERT | 9196d09715b96e8f27a4f1ba2b0d42f3a514e945 | [
"Apache-2.0"
] | 1 | 2020-12-06T08:47:10.000Z | 2020-12-06T08:47:10.000Z | classifier_utils.py | ycechungAI/ALBERT | 9196d09715b96e8f27a4f1ba2b0d42f3a514e945 | [
"Apache-2.0"
] | null | null | null | classifier_utils.py | ycechungAI/ALBERT | 9196d09715b96e8f27a4f1ba2b0d42f3a514e945 | [
"Apache-2.0"
] | 1 | 2021-03-31T06:12:39.000Z | 2021-03-31T06:12:39.000Z | # coding=utf-8
# Copyright 2018 The Google AI Team 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 applicabl... | 34.169866 | 82 | 0.65047 |
adbc88fd0492c65730bd1296847d0f4dbbeafc52 | 7,162 | py | Python | src/data/run_on_files.py | ChesterHuynh/Wavenet-CPC-Music-Translation | 60632b0330a61a10bac1a129826c55372f685427 | [
"MIT"
] | null | null | null | src/data/run_on_files.py | ChesterHuynh/Wavenet-CPC-Music-Translation | 60632b0330a61a10bac1a129826c55372f685427 | [
"MIT"
] | null | null | null | src/data/run_on_files.py | ChesterHuynh/Wavenet-CPC-Music-Translation | 60632b0330a61a10bac1a129826c55372f685427 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
# Reference: https://raw.githubusercontent.com/facebookresearch/music-translation/master/src/run_on_files.py
from pathlib... | 38.505376 | 131 | 0.611421 |
4a2c57c8150758f722dba2670994b860aec098c9 | 3,489 | py | Python | src/castile/transformer.py | catseye/Castile | 9a6bd7c604aeb9b91311fabcccf9da257df5c511 | [
"BSD-3-Clause"
] | 1 | 2021-02-05T17:00:03.000Z | 2021-02-05T17:00:03.000Z | src/castile/transformer.py | catseye/Castile | 9a6bd7c604aeb9b91311fabcccf9da257df5c511 | [
"BSD-3-Clause"
] | null | null | null | src/castile/transformer.py | catseye/Castile | 9a6bd7c604aeb9b91311fabcccf9da257df5c511 | [
"BSD-3-Clause"
] | null | null | null | """General AST manipulations.
"""
from castile.ast import AST
class FunctionLifter(object):
"""Bring all function definitions up to the toplevel (for target
languages like C).
"""
def __init__(self):
self.lifted_functions = []
self.count = 0
def make_name(self):
self.co... | 35.602041 | 77 | 0.547721 |
66cd71e5c2fc6c5194a51333f0ab8e63ed7a5a98 | 2,109 | py | Python | scripts/get_shodan_banners.py | d066y/detectem | 648ddff159e17777e41b1dd266a759e9f0774ea8 | [
"MIT"
] | null | null | null | scripts/get_shodan_banners.py | d066y/detectem | 648ddff159e17777e41b1dd266a759e9f0774ea8 | [
"MIT"
] | 1 | 2021-03-26T00:23:57.000Z | 2021-03-26T00:23:57.000Z | scripts/get_shodan_banners.py | magnusmel/detectem | c40e39ac684f6838373b7108eaf50da61e354acf | [
"MIT"
] | 1 | 2019-07-28T10:11:01.000Z | 2019-07-28T10:11:01.000Z | import re
import sys
import os
import pprint
import click
try:
import shodan
except ImportError:
print('Install shodan: pip install shodan')
sys.exit(0)
try:
SHODAN_API_KEY = os.environ['SHODAN_API_KEY']
except KeyError:
print('Set SHODAN_API_KEY environment variable with your key')
sys.exit(... | 21.742268 | 74 | 0.577525 |
c53aa2e755e9862fd6cfd36de24e6c8432755e8a | 10,021 | py | Python | scorelib/score.py | CorticoAI/dscore | 003bf2ca2a055ca1493a4149b5513446cf98ea2f | [
"BSD-2-Clause"
] | null | null | null | scorelib/score.py | CorticoAI/dscore | 003bf2ca2a055ca1493a4149b5513446cf98ea2f | [
"BSD-2-Clause"
] | null | null | null | scorelib/score.py | CorticoAI/dscore | 003bf2ca2a055ca1493a4149b5513446cf98ea2f | [
"BSD-2-Clause"
] | null | null | null | """Functions for scoring paired system/reference RTTM files."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from collections import defaultdict, namedtuple
import numpy as np
from scipy.linalg import block_diag
fr... | 34.555172 | 84 | 0.662409 |
840f8d1c4835fd66298ffb970ee3062e73eaa244 | 2,402 | py | Python | venv/Lib/site-packages/_TFL/ui_display.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 6 | 2016-12-10T17:51:10.000Z | 2021-10-11T07:51:48.000Z | venv/Lib/site-packages/_TFL/ui_display.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/_TFL/ui_display.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 3 | 2020-03-29T07:37:03.000Z | 2021-01-21T16:08:40.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2015 Mag. Christian Tanzer All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# #*** <License> ************************************************************#
# This module is part of the package TFL.
#
# This module is licensed under the terms of the... | 22.448598 | 78 | 0.605745 |
bb1d7673a14e3d4af50fda2113a108c57677fb99 | 4,406 | py | Python | src/game/gl_map.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | 1 | 2017-06-30T00:35:05.000Z | 2017-06-30T00:35:05.000Z | src/game/gl_map.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | src/game/gl_map.py | btdevel/bt | 23abdf0860484a4adcfbe2bcbe94eebca7f820fd | [
"MIT"
] | null | null | null | level = __import__("level00")
print level.dungeon_name
print level.map
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
import sys
# Some api in the chain is translating the keystrokes to this octal string
# so instead of saying: ESCAPE = 27, we use the following.
ESCAPE = '\033'
# Num... | 25.034091 | 77 | 0.573082 |
1b97be99bc37670c4ab14d887218ab0f813a37f9 | 29,452 | py | Python | vnpy/appDesktop/widget/ctaStrategy/tools/ctaLineBar.py | chenzj810/vnpy-stock | ca30eb309e38f9f916e9877538b98096303e0b60 | [
"MIT"
] | 2 | 2021-01-03T05:28:14.000Z | 2021-01-03T05:28:19.000Z | vnpy/appDesktop/widget/ctaStrategy/tools/ctaLineBar.py | chenzj810/vnpy | ca30eb309e38f9f916e9877538b98096303e0b60 | [
"MIT"
] | null | null | null | vnpy/appDesktop/widget/ctaStrategy/tools/ctaLineBar.py | chenzj810/vnpy | ca30eb309e38f9f916e9877538b98096303e0b60 | [
"MIT"
] | 1 | 2021-04-26T14:08:23.000Z | 2021-04-26T14:08:23.000Z | # encoding: UTF-8
# AUTHOR:李来佳
# WeChat/QQ: 28888502
from vtConstant import *
from vnpy.trader.main.vtObject import VtBarData
from datetime import datetime
import talib as ta
import numpy
import copy,csv
DEBUGCTALOG = True
class CtaLineBar(object):
"""CTA K线"""
""" 使用方法:
1、在策略构造函数... | 34.978622 | 127 | 0.529811 |
b6dbbd58a4452f8b70067a0c9361e81b2397849b | 3,255 | py | Python | napari/_vispy/visuals/filters/material.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | null | null | null | napari/_vispy/visuals/filters/material.py | donovanr/napari | 580b5eab8cc40af53aef780a65adb9216d968a32 | [
"BSD-3-Clause"
] | 1 | 2019-05-24T17:01:51.000Z | 2019-05-24T18:06:22.000Z | napari/_vispy/visuals/filters/material.py | AllenCellModeling/napari | 3566383e6310d02e8673b564b6f63411fa176708 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
Material components are modular shader components used for modifying fragment
colors to change the visual's appearance.
These generally create a function i... | 31.298077 | 77 | 0.55023 |
1a66cad367a6a3d705ae58dab4ac824fca586dad | 176 | py | Python | docs/conf.py | federicober/funk-lines | 04f31b78379c57bcf4e38485a6b2e15bd2b85b07 | [
"MIT"
] | 1 | 2021-03-14T17:57:42.000Z | 2021-03-14T17:57:42.000Z | docs/conf.py | federicober/funk-lines | 04f31b78379c57bcf4e38485a6b2e15bd2b85b07 | [
"MIT"
] | 138 | 2020-09-28T06:55:14.000Z | 2022-02-06T17:47:00.000Z | docs/conf.py | federicober/funk-lines | 04f31b78379c57bcf4e38485a6b2e15bd2b85b07 | [
"MIT"
] | null | null | null | """Sphinx configuration."""
project = "Funk Lines"
author = "Federico Oberndorfer"
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
autodoc_typehints = "description"
| 29.333333 | 58 | 0.744318 |
d44ec814e03494ab006ee564b9c9b47b08ffcedd | 10,403 | py | Python | tests/test_templating.py | jetbrains-infra/k8s-handle | 5b4a30a719a439dd39ba8cecfd87df6d59e1531a | [
"Apache-2.0"
] | 152 | 2018-08-23T12:41:16.000Z | 2022-02-02T15:16:15.000Z | tests/test_templating.py | jetbrains-infra/k8s-handle | 5b4a30a719a439dd39ba8cecfd87df6d59e1531a | [
"Apache-2.0"
] | 124 | 2018-08-20T03:55:18.000Z | 2021-09-28T09:01:15.000Z | tests/test_templating.py | jetbrains-infra/k8s-handle | 5b4a30a719a439dd39ba8cecfd87df6d59e1531a | [
"Apache-2.0"
] | 32 | 2018-10-06T00:48:26.000Z | 2022-03-24T14:39:44.000Z | import os
import yaml
import shutil
import unittest
from k8s_handle import settings
from k8s_handle import config
from k8s_handle import templating
from k8s_handle.templating import TemplateRenderingError
class TestTemplating(unittest.TestCase):
def setUp(self):
settings.CONFIG_FILE = 'tests/fixtures/conf... | 52.276382 | 120 | 0.669326 |
3ec21abf0bbdd1b7d5ebdeb472a1d5de6552e289 | 1,923 | py | Python | userbot/modules/nhentai.py | ratumelda/ratumelda | 73cc41062ccd10cdae3b964eaa41ff3068fcb4c3 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 28 | 2020-09-03T08:53:36.000Z | 2022-03-31T02:51:05.000Z | userbot/modules/nhentai.py | PerU-MoNsteR/ProjectAlf | c846dfddcb0d4266badd2b0ccfff398fceb121e9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 13 | 2020-08-27T07:46:08.000Z | 2021-12-19T22:48:56.000Z | userbot/modules/nhentai.py | PerU-MoNsteR/ProjectAlf | c846dfddcb0d4266badd2b0ccfff398fceb121e9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 259 | 2020-08-06T13:59:30.000Z | 2022-01-02T06:16:30.000Z | # Copyright (C) 2020 KeselekPermen69
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
from asyncio.exceptions import TimeoutError
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserErro... | 36.980769 | 88 | 0.633385 |
58a875d422e7b0c1812ac5d1756d7ee200f79a3d | 986 | py | Python | nesc/whip6/platforms/tools/debugger/ti-checkjtag/checkjtag.py | wojtex/whip6-pub | 7aca863e45199f4f1354f24b1c88afd8cb34c2ba | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"Intel",
"BSD-3-Clause"
] | 1 | 2017-02-21T16:44:56.000Z | 2017-02-21T16:44:56.000Z | nesc/whip6/platforms/tools/debugger/ti-checkjtag/checkjtag.py | wojtex/whip6-pub | 7aca863e45199f4f1354f24b1c88afd8cb34c2ba | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"Intel",
"BSD-3-Clause"
] | 9 | 2017-02-21T16:43:31.000Z | 2021-06-10T19:28:41.000Z | nesc/whip6/platforms/tools/debugger/ti-checkjtag/checkjtag.py | wojtex/whip6-pub | 7aca863e45199f4f1354f24b1c88afd8cb34c2ba | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause-Clear",
"Intel",
"BSD-3-Clause"
] | 12 | 2016-12-19T12:04:17.000Z | 2020-09-17T14:44:39.000Z | #
# whip6: Warsaw High-performance IPv6.
#
# Copyright (c) 2012-2017 Szymon Acedanski
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE
# files.
#
import os
import os.path
import sys
from build_step import BuildStep
CONFIG = 'ti jtag config file'
class CheckJTAG(BuildSt... | 29 | 78 | 0.693712 |
f0e86a719ff3e7c6dfa0365f2b9f1eea16c698b3 | 12,918 | py | Python | src/m1r_accumulator_examples.py | meisnehb/04-TheAccumulatorPattern | fa6c4f69ee11a6c49fc72a4c3597a6b16d847ac7 | [
"MIT"
] | null | null | null | src/m1r_accumulator_examples.py | meisnehb/04-TheAccumulatorPattern | fa6c4f69ee11a6c49fc72a4c3597a6b16d847ac7 | [
"MIT"
] | null | null | null | src/m1r_accumulator_examples.py | meisnehb/04-TheAccumulatorPattern | fa6c4f69ee11a6c49fc72a4c3597a6b16d847ac7 | [
"MIT"
] | null | null | null | """
This module demonstrates the ACCUMULATOR pattern in three classic forms:
SUMMING: total = total + number
COUNTING: count = count + 1
IN GRAPHICS: x = x + pixels
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays,
Aaron Wilkin, their colleagues, and Hannah Me... | 38.332344 | 80 | 0.515482 |
cad86a7243e528c06f55303f3ff41fefe2d757f3 | 4,241 | py | Python | devito/passes/clusters/cse.py | dabiged/devito | 3cea137538b641bb1788fde65176ffcf82ab0990 | [
"MIT"
] | null | null | null | devito/passes/clusters/cse.py | dabiged/devito | 3cea137538b641bb1788fde65176ffcf82ab0990 | [
"MIT"
] | 3 | 2020-11-30T05:38:22.000Z | 2022-03-07T14:02:05.000Z | devito/passes/clusters/cse.py | maelso/devito | d45932b08733ea7437e6a83fff816ee20d3fbada | [
"MIT"
] | null | null | null | from collections import OrderedDict
from devito.ir import DummyEq, Cluster, Scope
from devito.passes.clusters.utils import cluster_pass, makeit_ssa
from devito.symbolics import count, estimate_cost, q_xop, q_leaf, uxreplace
from devito.types import Scalar
__all__ = ['cse']
@cluster_pass
def cse(cluster, template, *... | 32.875969 | 89 | 0.621552 |
cdfe2fe56719800b955b1069a20dbd45eb6587ae | 2,690 | py | Python | homeassistant/components/light/rfxtrx.py | don66/home-assistant | a277470363c0758bb305410aad49c257ff8bac40 | [
"Apache-2.0"
] | 37 | 2018-05-22T07:17:26.000Z | 2022-03-03T13:14:46.000Z | homeassistant/components/light/rfxtrx.py | don66/home-assistant | a277470363c0758bb305410aad49c257ff8bac40 | [
"Apache-2.0"
] | 125 | 2018-12-11T07:31:20.000Z | 2021-07-27T08:20:03.000Z | homeassistant/components/light/rfxtrx.py | don66/home-assistant | a277470363c0758bb305410aad49c257ff8bac40 | [
"Apache-2.0"
] | 8 | 2018-05-30T20:05:26.000Z | 2021-02-19T14:17:05.000Z | """
Support for RFXtrx lights.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.rfxtrx/
"""
import logging
import voluptuous as vol
import homeassistant.components.rfxtrx as rfxtrx
from homeassistant.components.light import (
ATTR_BRIGHTNESS, S... | 31.27907 | 78 | 0.701115 |
7887e7c1e0e4d8d0fcd7c025d784eceb8b34bddd | 358 | py | Python | Algorithms/Solve Me First.py | lin826/Hackerrank-Codes | 6b2b83dd1f6a7b92b575d8f8d4d1dbe4cb845403 | [
"MIT"
] | 70 | 2020-10-04T09:23:15.000Z | 2022-02-01T09:44:39.000Z | Algorithms/Solve Me First.py | lin826/Hackerrank-Codes | 6b2b83dd1f6a7b92b575d8f8d4d1dbe4cb845403 | [
"MIT"
] | 148 | 2020-06-05T15:32:12.000Z | 2020-11-01T08:29:01.000Z | Algorithms/Solve Me First.py | lin826/Hackerrank-Codes | 6b2b83dd1f6a7b92b575d8f8d4d1dbe4cb845403 | [
"MIT"
] | 298 | 2020-10-04T04:27:01.000Z | 2022-03-07T04:02:59.000Z | '''
Complete the function solveMeFirst to compute the sum of two integers.
Function prototype:
int solveMeFirst(int a, int b);
where,
a is the first integer input.
b is the second integer input
Return values
sum of the above two integers
Sample Input
a = 2
b = 3
Sample Output
5
'''
num1 = int(input())
num2 =... | 11.933333 | 70 | 0.709497 |
09fd45bcd48e64b00bc7a749222280ea5e9052bb | 1,682 | py | Python | setup.py | flowersteam/TeachMyAgent | a8f71cbfce4cb8ca6da24d00ea690495e3afbd2e | [
"MIT"
] | 45 | 2021-03-19T00:16:57.000Z | 2022-03-20T14:02:18.000Z | setup.py | flowersteam/TeachMyAgent | a8f71cbfce4cb8ca6da24d00ea690495e3afbd2e | [
"MIT"
] | 5 | 2021-04-26T06:21:10.000Z | 2021-12-24T02:57:02.000Z | setup.py | flowersteam/TeachMyAgent | a8f71cbfce4cb8ca6da24d00ea690495e3afbd2e | [
"MIT"
] | 5 | 2021-03-23T20:21:14.000Z | 2022-03-22T14:55:11.000Z | from setuptools import setup
import sys
assert sys.version_info.major == 3 and sys.version_info.minor in [6, 7] , \
"This repo is designed to work with Python 3.6 or 3.7." \
+ "Please install it before proceeding."
setup(
name='TeachMyAgent',
py_modules=['TeachMyAgent'],
version="1.0",
install... | 30.035714 | 130 | 0.622473 |
71b28dc2464d25510a6231d91649162bf32c9cbd | 1,430 | py | Python | pointcnn_cls/jbb_b128_s0512_e0512_v500.py | hft-ba/PointCNN | d99086ba4eac2357c6330d23891a4a81f1b4162f | [
"MIT"
] | null | null | null | pointcnn_cls/jbb_b128_s0512_e0512_v500.py | hft-ba/PointCNN | d99086ba4eac2357c6330d23891a4a81f1b4162f | [
"MIT"
] | null | null | null | pointcnn_cls/jbb_b128_s0512_e0512_v500.py | hft-ba/PointCNN | d99086ba4eac2357c6330d23891a4a81f1b4162f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import os
import sys
import math
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import data_utils
load_fn = data_utils.load_cls_train_val
balance_fn = None
map_fn = None
keep_remainder = True
save_ply_fn = None
num_class = 40
batch_size = 128
sample_num = 512
num_e... | 19.589041 | 76 | 0.63007 |
513e1a2cb3bb576c8a46555559c480487a598679 | 2,898 | py | Python | prepare/gamma_decode_gen_py.py | nick-lifx/hsbk_rgb | d48d4b18c9725c7654b032234523a6b87f6f0e9b | [
"MIT"
] | 2 | 2020-07-25T07:16:02.000Z | 2021-01-12T11:38:25.000Z | prepare/gamma_decode_gen_py.py | nick-lifx/hsbk_rgb | d48d4b18c9725c7654b032234523a6b87f6f0e9b | [
"MIT"
] | null | null | null | prepare/gamma_decode_gen_py.py | nick-lifx/hsbk_rgb | d48d4b18c9725c7654b032234523a6b87f6f0e9b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020 Nick Downing
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify... | 30.1875 | 79 | 0.697378 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.