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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
de559d56c1aea07a36f788872142f525a5ccbf3b | 66,636 | py | Python | cw/sprite/message.py | ankkks/CardWirthPy-Lite | cfa9f4315b8adcf01a3ebb40237f2e8ee5f02f45 | [
"bzip2-1.0.6"
] | null | null | null | cw/sprite/message.py | ankkks/CardWirthPy-Lite | cfa9f4315b8adcf01a3ebb40237f2e8ee5f02f45 | [
"bzip2-1.0.6"
] | null | null | null | cw/sprite/message.py | ankkks/CardWirthPy-Lite | cfa9f4315b8adcf01a3ebb40237f2e8ee5f02f45 | [
"bzip2-1.0.6"
] | 1 | 2022-03-16T07:49:27.000Z | 2022-03-16T07:49:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
import os
import re
import itertools
import pygame
import pygame.locals
import cw
import base
# 表示後に空白時間を入れる文字
_WAIT_CHARS = u"、。,.?!。、!?"
# 直後に空白文字がある場合に限り表示後に空白時間を入れる文字
_WAIT_CHARS_BEFORE_SPACE = u"・´`:;ー―~…‥’”)〕]}〉》」』】>′″≫」・\"'),.:;>]`}"
... | 39.830245 | 149 | 0.541614 |
b3bf95fbb5814a07fdc04ab92eb92c29f291382b | 62 | py | Python | src/asd_asd/__init__.py | miguelarbesu/asd-asd | 3bfc517469075b7a81a4d715759cff2bbbf7ac67 | [
"MIT"
] | null | null | null | src/asd_asd/__init__.py | miguelarbesu/asd-asd | 3bfc517469075b7a81a4d715759cff2bbbf7ac67 | [
"MIT"
] | null | null | null | src/asd_asd/__init__.py | miguelarbesu/asd-asd | 3bfc517469075b7a81a4d715759cff2bbbf7ac67 | [
"MIT"
] | null | null | null | """asd asd
asd asd asd
"""
from ._version import __version__
| 10.333333 | 33 | 0.709677 |
6de3f5d478d2dabd8bff49cde432fcf229fe5498 | 250,973 | py | Python | custom_components/icloud3/device_tracker.py | DBa2016/icloud3 | 00258cda6a649e60c936b7cbb0f04e318574c6c3 | [
"MIT"
] | null | null | null | custom_components/icloud3/device_tracker.py | DBa2016/icloud3 | 00258cda6a649e60c936b7cbb0f04e318574c6c3 | [
"MIT"
] | null | null | null | custom_components/icloud3/device_tracker.py | DBa2016/icloud3 | 00258cda6a649e60c936b7cbb0f04e318574c6c3 | [
"MIT"
] | null | null | null | """
Platform that supports scanning iCloud.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.icloud/
Special Note: I want to thank Walt Howd, (iCloud2 fame) who inspired me to
tackle this project. I also want to give a shout out to Ková... | 43.496187 | 151 | 0.543752 |
4734b929d46e7d585ed6f4de559be4b3c306fc52 | 32,647 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_virtual_machine_run_commands_operations.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_virtual_machine_run_commands_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/aio/operations/_virtual_machine_run_commands_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 45.092541 | 281 | 0.660918 |
31fd4bc20352a3a9be245580890f354ffd1e67d1 | 848 | py | Python | pyphabricatordb/__init__.py | veblush/PyPhabricatorDb | 154efbe225d593e9f073d73fd428171f1dd0536b | [
"MIT"
] | null | null | null | pyphabricatordb/__init__.py | veblush/PyPhabricatorDb | 154efbe225d593e9f073d73fd428171f1dd0536b | [
"MIT"
] | null | null | null | pyphabricatordb/__init__.py | veblush/PyPhabricatorDb | 154efbe225d593e9f073d73fd428171f1dd0536b | [
"MIT"
] | null | null | null | import connector
import hash
import almanac
import audit
import auth
import cache
import calendar
import chatlog
import conduit
import config
import conpherence
import countdown
import daemon
import dashboard
import dbdatetime
import differential
import diviner
import doorkeeper
import draft
import drydock
import fact... | 14.62069 | 19 | 0.866745 |
d07e6d0f5670a91d5cb05d65f462972d0cbcc522 | 974 | py | Python | scoap3/modules/robotupload/tasks.py | Lilykos/scoap3-next | b779b8c32504e09b2c5330aa6a18e1e1c9affd33 | [
"CC-BY-4.0"
] | 1 | 2021-08-04T09:48:38.000Z | 2021-08-04T09:48:38.000Z | scoap3/modules/robotupload/tasks.py | Lilykos/scoap3-next | b779b8c32504e09b2c5330aa6a18e1e1c9affd33 | [
"CC-BY-4.0"
] | 158 | 2018-09-10T07:31:14.000Z | 2022-03-30T07:18:51.000Z | scoap3/modules/robotupload/tasks.py | Lilykos/scoap3-next | b779b8c32504e09b2c5330aa6a18e1e1c9affd33 | [
"CC-BY-4.0"
] | 9 | 2015-04-28T11:55:04.000Z | 2021-09-28T12:14:53.000Z | """Celery tasks for dealing with robotupload."""
from __future__ import absolute_import, print_function
from celery import shared_task
from flask import current_app
from invenio_db import db
from invenio_workflows.proxies import workflow_object_class
@shared_task(ignore_results=True)
def submit_results(results_d... | 31.419355 | 77 | 0.752567 |
1532cfa1cbbfdec12435304b8440aae202b096ef | 1,268 | py | Python | atx/cmds/screencap.py | jamjven/ATX | 09571aa2745fc9c3583b17c466869db5b86bf5f5 | [
"Apache-2.0"
] | 1,132 | 2017-07-21T05:08:56.000Z | 2022-03-23T01:29:00.000Z | atx/cmds/screencap.py | jamjven/ATX | 09571aa2745fc9c3583b17c466869db5b86bf5f5 | [
"Apache-2.0"
] | 74 | 2017-07-21T06:00:32.000Z | 2019-01-25T05:10:20.000Z | atx/cmds/screencap.py | jamjven/ATX | 09571aa2745fc9c3583b17c466869db5b86bf5f5 | [
"Apache-2.0"
] | 277 | 2017-07-28T07:23:54.000Z | 2022-03-22T08:39:08.000Z | #!/usr/bin/env python
# coding: utf-8
#
# Usage: python -matx screen [-s 0.8]
from __future__ import absolute_import
import time
from cStringIO import StringIO
from PIL import Image
from atx import adbkit
def main(host=None, port=None, serial=None, scale=1.0, out='screenshot.png', method='minicap'):
... | 25.36 | 96 | 0.624606 |
12741d438ce80243d7a2f6c4b2e7ca496659ee5f | 2,147 | py | Python | mindinsight/mindconverter/graph_based_converter/third_party_graph/pytorch_graph_parser.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | null | null | null | mindinsight/mindconverter/graph_based_converter/third_party_graph/pytorch_graph_parser.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | null | null | null | mindinsight/mindconverter/graph_based_converter/third_party_graph/pytorch_graph_parser.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd.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 ap... | 35.196721 | 98 | 0.62599 |
b4d55e820beb7a11a17b7a33edf2ff9a01d3afa8 | 2,321 | py | Python | docker/docker-monolith/infra/ansible/get_inventory.py | Otus-DevOps-2020-05/IsieIam_microservices | 19a2ad177418f42a51c665c19047c9534ba0b2a1 | [
"MIT"
] | null | null | null | docker/docker-monolith/infra/ansible/get_inventory.py | Otus-DevOps-2020-05/IsieIam_microservices | 19a2ad177418f42a51c665c19047c9534ba0b2a1 | [
"MIT"
] | 17 | 2020-08-09T17:06:50.000Z | 2022-03-31T01:45:44.000Z | docker/docker-monolith/infra/ansible/get_inventory.py | Otus-DevOps-2020-05/IsieIam_microservices | 19a2ad177418f42a51c665c19047c9534ba0b2a1 | [
"MIT"
] | 2 | 2020-10-11T19:09:17.000Z | 2020-11-04T05:29:11.000Z | #!/bin/python
import requests
import json
import subprocess
import sys
# env variable
env_template = "docker"
folder_template = "infra"
# Get token - yc iam create-token
p = subprocess.Popen('yc iam create-token', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
iam_token = str(p.stdout.readline().rstri... | 33.637681 | 137 | 0.699698 |
29d5af220c531e2c3ee86b2802d06cf80513ed79 | 1,369 | py | Python | juriscraper/OralArgumentSite.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | 228 | 2015-01-23T04:41:39.000Z | 2022-03-30T09:52:20.000Z | juriscraper/OralArgumentSite.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | 331 | 2015-01-05T18:53:40.000Z | 2022-03-29T23:43:30.000Z | juriscraper/OralArgumentSite.py | EvandoBlanco/juriscraper | 3d16af258620d4ba1b4827f66ef69e8a2c5a0484 | [
"BSD-2-Clause"
] | 84 | 2015-01-03T01:19:21.000Z | 2022-03-01T08:09:32.000Z | from juriscraper.AbstractSite import AbstractSite
class OralArgumentSite(AbstractSite):
"""Contains generic methods for scraping data. Should be extended by all
scrapers.
Should not contain lists that can't be sorted by the _date_sort function.
"""
def __init__(self, *args, **kwargs):
su... | 28.520833 | 84 | 0.626004 |
19308ac3b2e7a1687f5611c88c13daf807ce228a | 3,418 | py | Python | utils/evaluate.py | kkahloots/Generative-Adversarial-Networks-GANs- | 92cc32b554e5fc75636332cc365216fe20271d21 | [
"MIT"
] | null | null | null | utils/evaluate.py | kkahloots/Generative-Adversarial-Networks-GANs- | 92cc32b554e5fc75636332cc365216fe20271d21 | [
"MIT"
] | null | null | null | utils/evaluate.py | kkahloots/Generative-Adversarial-Networks-GANs- | 92cc32b554e5fc75636332cc365216fe20271d21 | [
"MIT"
] | null | null | null | import numpy as np
from sklearn.metrics.cluster import *
from sklearn.metrics import pairwise_distances
def evaluate_clustering(name, n_clusters, y, y_pred, time):
print('clustering by {} for n_clusters {}'.format(name, n_clusters))
print('n_clusters orignial {}'.format(len(np.unique(y))))
print('n_... | 42.725 | 124 | 0.654184 |
28f34c1fe39a7f80c72d3be6a3e618ec859660cb | 6,339 | py | Python | tests/test_flatten_ast.py | laowantong/paroxython | 4626798a60eeaa765dbfab9e63e04030c9fcb1d0 | [
"MIT"
] | 31 | 2020-05-02T13:34:26.000Z | 2021-06-06T17:25:52.000Z | tests/test_flatten_ast.py | laowantong/paroxython | 4626798a60eeaa765dbfab9e63e04030c9fcb1d0 | [
"MIT"
] | 108 | 2019-11-18T19:41:52.000Z | 2022-03-18T13:58:17.000Z | tests/test_flatten_ast.py | laowantong/paroxython | 4626798a60eeaa765dbfab9e63e04030c9fcb1d0 | [
"MIT"
] | 4 | 2020-05-19T08:57:44.000Z | 2020-09-21T08:53:46.000Z | import pytest
import regex
import context
from paroxython.flatten_ast import ast, flatten_ast, pseudo_hash
sources = r"""
<<< Examples of _type, _length, _pos and _hash (full output)
42
---
/_type=Module # Any node has a type, stored under _type
/body/_length=1 # Any sequence has a length, stored under _length
/body/... | 25.25498 | 92 | 0.7121 |
e13920e51da37c2e40cfb5607adaf52145688848 | 993 | py | Python | tests/roles/werewolf/tanner_test.py | TylerYep/wolfbot | 8d4786ce9542bab344b227e0571bb24bc354298d | [
"MIT"
] | 3 | 2018-06-16T00:03:30.000Z | 2021-12-26T20:48:45.000Z | tests/roles/werewolf/tanner_test.py | TylerYep/wolfbot | 8d4786ce9542bab344b227e0571bb24bc354298d | [
"MIT"
] | null | null | null | tests/roles/werewolf/tanner_test.py | TylerYep/wolfbot | 8d4786ce9542bab344b227e0571bb24bc354298d | [
"MIT"
] | 2 | 2021-03-03T09:31:35.000Z | 2021-03-03T10:02:55.000Z | from wolfbot.enums import Role
from wolfbot.roles import Tanner
from wolfbot.statements import KnowledgeBase
class TestTanner:
"""Tests for the Tanner player class."""
@staticmethod
def test_awake_init(large_game_roles: tuple[Role, ...]) -> None:
"""
Should initialize a Tanner. Note that ... | 30.090909 | 80 | 0.67573 |
831ba97c6f336eee1895a7cb601ab1c418e1fa88 | 12,052 | py | Python | climpred/checks.py | pangeo-data/climpred | 8df537f4a3740441dba55e018ce65e1b6d977162 | [
"MIT"
] | 104 | 2020-09-17T16:46:37.000Z | 2022-03-29T16:49:44.000Z | climpred/checks.py | pangeo-data/climpred | 8df537f4a3740441dba55e018ce65e1b6d977162 | [
"MIT"
] | 303 | 2020-09-17T16:05:24.000Z | 2022-03-28T19:59:31.000Z | climpred/checks.py | pangeo-data/climpred | 8df537f4a3740441dba55e018ce65e1b6d977162 | [
"MIT"
] | 18 | 2020-10-08T15:40:42.000Z | 2022-03-29T19:07:54.000Z | import warnings
from functools import wraps
import dask
import xarray as xr
from .constants import (
CF_LONG_NAMES,
CF_STANDARD_NAMES,
CLIMPRED_ENSEMBLE_DIMS,
VALID_ALIGNMENTS,
VALID_LEAD_UNITS,
VALID_REFERENCES,
)
from .exceptions import DatasetError, DimensionError, VariableError
from .optio... | 35.869048 | 181 | 0.61915 |
e5b3b9d0899561c887fa37b77d38d5e01682856c | 8,991 | py | Python | docker/s3tests/test_list_uploads.py | ssscottt/chubaofs | 60e55cfc6b7dcacd5e77b5f900f3fe97680688e8 | [
"Apache-2.0"
] | null | null | null | docker/s3tests/test_list_uploads.py | ssscottt/chubaofs | 60e55cfc6b7dcacd5e77b5f900f3fe97680688e8 | [
"Apache-2.0"
] | null | null | null | docker/s3tests/test_list_uploads.py | ssscottt/chubaofs | 60e55cfc6b7dcacd5e77b5f900f3fe97680688e8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The ChubaoFS Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 44.731343 | 109 | 0.577244 |
5be2932d7e840d23524ee9f8405ec9c57b488b21 | 453 | py | Python | ch7/change_ip.py | lpark6321/py-scraping-codetest | f53d33b63f74dcb29276400070346605685e17cb | [
"MIT"
] | 97 | 2018-09-26T02:49:08.000Z | 2022-03-27T11:03:48.000Z | ch7/change_ip.py | ssjatw/py-scraping-analysis-book | 66e77be7850e6060c833a183cf0184dd34659006 | [
"MIT"
] | 7 | 2018-11-09T15:22:08.000Z | 2021-01-13T14:44:17.000Z | ch7/change_ip.py | ssjatw/py-scraping-analysis-book | 66e77be7850e6060c833a183cf0184dd34659006 | [
"MIT"
] | 63 | 2018-10-25T06:41:00.000Z | 2022-01-23T23:22:46.000Z | from bs4 import BeautifulSoup
import requests
import random
if __name__ == '__main__':
# 代理伺服器查詢: http://cn-proxy.com/
proxy_ips = ['39.137.69.8:8080', '222.88.147.121:8060']
ip = random.choice(proxy_ips)
print('Use', ip)
resp = requests.get('http://ip.filefab.com/index.php',
... | 34.846154 | 59 | 0.613687 |
c2a7c957583123a731b6d56939b93e93edd805a8 | 8,155 | py | Python | gdsfactory/sweep/write_sweep.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 42 | 2020-05-25T09:33:45.000Z | 2022-03-29T03:41:19.000Z | gdsfactory/sweep/write_sweep.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 133 | 2020-05-28T18:29:04.000Z | 2022-03-31T22:21:42.000Z | gdsfactory/sweep/write_sweep.py | jorgepadilla19/gdsfactory | 68e1c18257a75d4418279851baea417c8899a165 | [
"MIT"
] | 17 | 2020-06-30T07:07:50.000Z | 2022-03-17T15:45:27.000Z | import json
from pathlib import Path
from typing import Callable, Dict, List, Optional, Union
from gdsfactory.component import Component
from gdsfactory.components import factory
from gdsfactory.config import CONFIG
from gdsfactory.name import get_component_name
from gdsfactory.sweep.read_sweep import get_settings_lis... | 30.429104 | 87 | 0.611036 |
30099f88f8b9039583dc0bbeaf956c10c4cb06db | 593 | py | Python | PortalMessaging/urls.py | elryndir/GuildPortal | d9604bdffdca93debcf5a4063b56e7f0efcc49fd | [
"MIT"
] | null | null | null | PortalMessaging/urls.py | elryndir/GuildPortal | d9604bdffdca93debcf5a4063b56e7f0efcc49fd | [
"MIT"
] | null | null | null | PortalMessaging/urls.py | elryndir/GuildPortal | d9604bdffdca93debcf5a4063b56e7f0efcc49fd | [
"MIT"
] | null | null | null | from PortalMessaging.forms import MessageForm
from PortalMessaging.views import IndexMessage, MessageDetails, MessageView, ReplyView
__author__ = 'cloquet'
from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', IndexMessage.as_view(), name='mes... | 39.533333 | 90 | 0.716695 |
4635b78acd6e455bcdf62e835a5ecffda3826b75 | 7,015 | py | Python | bottleneck/src/template/move/move_max.py | stroxler/bottleneck | 6e91bcb8a21170588ee9a3f2c425a4e307ae05de | [
"BSD-2-Clause"
] | 2 | 2015-05-26T09:06:32.000Z | 2015-05-26T09:06:46.000Z | bottleneck/src/template/move/move_max.py | stroxler/bottleneck | 6e91bcb8a21170588ee9a3f2c425a4e307ae05de | [
"BSD-2-Clause"
] | null | null | null | bottleneck/src/template/move/move_max.py | stroxler/bottleneck | 6e91bcb8a21170588ee9a3f2c425a4e307ae05de | [
"BSD-2-Clause"
] | null | null | null | "move_max template"
from copy import deepcopy
import bottleneck as bn
__all__ = ["move_max"]
FLOAT_DTYPES = [x for x in bn.dtypes if 'float' in x]
INT_DTYPES = [x for x in bn.dtypes if 'int' in x]
# Float dtypes (no axis=None) -----------------------------------------------
floats = {}
floats['dtypes'] = FLOAT_DTY... | 30.237069 | 79 | 0.55752 |
52b4151188a491d1e1d744df0d42857425bde1f0 | 451 | py | Python | openacademy/model/partner.py | AlvaroOdoo/openacademy-project | 10ef9a42a14987e2769be441aa78cc836da19f3e | [
"Apache-2.0"
] | null | null | null | openacademy/model/partner.py | AlvaroOdoo/openacademy-project | 10ef9a42a14987e2769be441aa78cc836da19f3e | [
"Apache-2.0"
] | null | null | null | openacademy/model/partner.py | AlvaroOdoo/openacademy-project | 10ef9a42a14987e2769be441aa78cc836da19f3e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from openerp import fields, models
class Partner(models.Model):
_inherit = 'res.partner'
# Add a new column to the res.partner model, by default partners are not
# instructors
instructor = fields.Boolean("Instructor", default=False)
session_ids = fields.Many2many('openacad... | 30.066667 | 76 | 0.59867 |
56b64dfe01465f705b1a3c0262b1030f8de9cb89 | 10,820 | py | Python | saleor/plugins/user_email/tests/conftest.py | Kibria7533/saleor | d72f5bff9afeab13d2e2e09c9a32a964bfd9476d | [
"CC-BY-4.0"
] | 2 | 2021-05-16T13:46:07.000Z | 2021-05-16T13:49:21.000Z | saleor/plugins/user_email/tests/conftest.py | kobbycyber/saleor | a7aa9e786d5c55243433800e414703fdcebbea23 | [
"CC-BY-4.0"
] | 1 | 2021-06-24T03:23:56.000Z | 2021-06-24T03:23:56.000Z | saleor/plugins/user_email/tests/conftest.py | kobbycyber/saleor | a7aa9e786d5c55243433800e414703fdcebbea23 | [
"CC-BY-4.0"
] | 1 | 2021-06-18T10:18:48.000Z | 2021-06-18T10:18:48.000Z | from unittest.mock import patch
import pytest
from ...email_common import DEFAULT_EMAIL_VALUE
from ...manager import get_plugins_manager
from ..constants import (
ACCOUNT_CHANGE_EMAIL_CONFIRM_DEFAULT_SUBJECT,
ACCOUNT_CHANGE_EMAIL_CONFIRM_SUBJECT_FIELD,
ACCOUNT_CHANGE_EMAIL_CONFIRM_TEMPLATE_FIELD,
ACCO... | 44.163265 | 88 | 0.554344 |
c624187c52371614c7da565eb1c4d9c277d12e44 | 573 | py | Python | t.py | kangkang59812/GraphCaption | 48ceb20707b84e16f80737362493759eeed7a487 | [
"MIT"
] | null | null | null | t.py | kangkang59812/GraphCaption | 48ceb20707b84e16f80737362493759eeed7a487 | [
"MIT"
] | null | null | null | t.py | kangkang59812/GraphCaption | 48ceb20707b84e16f80737362493759eeed7a487 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import misc.resnet
from misc.resnet_utils import myResnet
import json
import h5py
import os
import numpy as np
import random
import torch
import skimage
import skimage.io
import scipy.misc
from torchvision imp... | 21.222222 | 54 | 0.816754 |
745d45d3826dde02c1cbaa90fccf3f8c14dfd8dd | 52,467 | py | Python | framework/Samplers/Sampler.py | mattdon/raven | b5b4a9fc96cec37ca5fb3757c45653eec66522f1 | [
"Apache-2.0"
] | null | null | null | framework/Samplers/Sampler.py | mattdon/raven | b5b4a9fc96cec37ca5fb3757c45653eec66522f1 | [
"Apache-2.0"
] | null | null | null | framework/Samplers/Sampler.py | mattdon/raven | b5b4a9fc96cec37ca5fb3757c45653eec66522f1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 53.812308 | 373 | 0.677473 |
acf72f109621728a4e0a5c234f4c77643cdd101d | 2,062 | py | Python | Web/Page Scraper/page_scraper.py | fossabot/IdeaBag2-Solutions | 73b554d9796510fc86e5fc55016732aa866266c6 | [
"MIT"
] | 10 | 2018-07-06T22:05:45.000Z | 2021-05-22T11:29:04.000Z | Web/Page Scraper/page_scraper.py | jarik-marwede/IdeaBag2-Projects | c5fe9524ef03a6ebc098ab8aaee7448f5b877828 | [
"MIT"
] | 22 | 2018-07-13T17:16:43.000Z | 2022-01-11T11:16:08.000Z | Web/Page Scraper/page_scraper.py | jarik-marwede/IdeaBag2-Projects | c5fe9524ef03a6ebc098ab8aaee7448f5b877828 | [
"MIT"
] | 1 | 2020-06-13T18:53:51.000Z | 2020-06-13T18:53:51.000Z | #!/usr/bin/env python3
"""A web scraper that scrapes all images and links from a website.
Title:
Page Scraper
Description:
Create an application which connects to a site
and pulls out all links, or images,
and saves them to a list.
For added complexity,
organize the indexed content and don't allow duplicates.
Have it... | 27.864865 | 69 | 0.654219 |
542e56b696fe548eae9699b11ad2cb41b2f84528 | 267 | py | Python | pyxrd/generic/io/__init__.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 27 | 2018-06-15T15:28:18.000Z | 2022-03-10T12:23:50.000Z | pyxrd/generic/io/__init__.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 22 | 2018-06-14T08:29:16.000Z | 2021-07-05T13:33:44.000Z | pyxrd/generic/io/__init__.py | PyXRD/pyxrd | 26bacdf64f3153fa74b8caa62e219b76d91a55c1 | [
"BSD-2-Clause"
] | 8 | 2019-04-13T13:03:51.000Z | 2021-06-19T09:29:11.000Z | # coding=UTF-8
# ex:ts=4:sw=4:et=on
# Copyright (c) 2013, Mathijs Dumon
# All rights reserved.
# Complete license can be found in the LICENSE file.
from io import *
from .custom_io import *
from .utils import get_case_insensitive_glob, retrieve_lowercase_extension
| 24.272727 | 74 | 0.76779 |
c99cdf6f486fe3a82b80634fcd3810f72e00e625 | 5,452 | py | Python | scripts/api/common.py | quacksawbones/galaxy-1 | 65f7259b29d3886e526d9be670c60d9da9fbe038 | [
"CC-BY-3.0"
] | 1,085 | 2015-02-18T16:14:38.000Z | 2022-03-30T23:52:07.000Z | scripts/api/common.py | quacksawbones/galaxy-1 | 65f7259b29d3886e526d9be670c60d9da9fbe038 | [
"CC-BY-3.0"
] | 11,253 | 2015-02-18T17:47:32.000Z | 2022-03-31T21:47:03.000Z | scripts/api/common.py | quacksawbones/galaxy-1 | 65f7259b29d3886e526d9be670c60d9da9fbe038 | [
"CC-BY-3.0"
] | 1,000 | 2015-02-18T16:18:10.000Z | 2022-03-29T08:22:56.000Z | """
Common methods used by the API sample scripts.
"""
import json
import logging
import sys
from urllib.error import HTTPError
from urllib.request import (
Request,
urlopen,
)
log = logging.getLogger(__name__)
def make_url(api_key, url, args=None):
"""
Adds the API Key to the URL if it's not alread... | 27.958974 | 91 | 0.526779 |
71b62bd53467495954b77f6810618543670bbe2b | 10,556 | py | Python | utils/sls.py | Cray-HPE/casmnet-bican | 69c1e5a79f6e72e1ac71f2a8a754368700bb0bd5 | [
"MIT"
] | 1 | 2022-01-24T20:19:34.000Z | 2022-01-24T20:19:34.000Z | utils/sls.py | Cray-HPE/casmnet-bican | 69c1e5a79f6e72e1ac71f2a8a754368700bb0bd5 | [
"MIT"
] | 2 | 2022-01-24T20:17:08.000Z | 2022-02-17T21:53:02.000Z | utils/sls.py | Cray-HPE/casmnet-bican | 69c1e5a79f6e72e1ac71f2a8a754368700bb0bd5 | [
"MIT"
] | null | null | null | from collections import defaultdict
import requests
import urllib3
import sys
from kubernetes import client, config
import base64
import json
def pull_sls_networks():
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
debug = False
def on_debug(debug=False, message=None):
if debug... | 39.535581 | 107 | 0.537609 |
79583f344f0c1f642586c4a8ecc08f2aa4e24008 | 8,189 | py | Python | python/paddle/nn/__init__.py | Huangheyl/Paddle | a1b640bc66a5cc9583de503e7406aeba67565e8d | [
"Apache-2.0"
] | 8 | 2019-06-16T12:36:11.000Z | 2021-03-05T05:33:21.000Z | python/paddle/nn/__init__.py | Huangheyl/Paddle | a1b640bc66a5cc9583de503e7406aeba67565e8d | [
"Apache-2.0"
] | 1 | 2020-09-10T09:05:52.000Z | 2020-09-10T09:06:22.000Z | python/paddle/nn/__init__.py | Huangheyl/Paddle | a1b640bc66a5cc9583de503e7406aeba67565e8d | [
"Apache-2.0"
] | 25 | 2019-12-07T02:14:14.000Z | 2021-12-30T06:16:30.000Z | # Copyright (c) 2020 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 app... | 47.33526 | 89 | 0.805227 |
39ec37b74b6f8c01a518aa98b4356ca78e0cdbdc | 2,312 | py | Python | pancakeswap/pcsapi.py | linscomt/PancakeSwap-Monitor | d5de5d561929cefc47768ea3f5bdbae3a5ae485b | [
"Apache-2.0",
"MIT"
] | null | null | null | pancakeswap/pcsapi.py | linscomt/PancakeSwap-Monitor | d5de5d561929cefc47768ea3f5bdbae3a5ae485b | [
"Apache-2.0",
"MIT"
] | null | null | null | pancakeswap/pcsapi.py | linscomt/PancakeSwap-Monitor | d5de5d561929cefc47768ea3f5bdbae3a5ae485b | [
"Apache-2.0",
"MIT"
] | 2 | 2021-08-05T19:53:31.000Z | 2021-08-31T14:34:35.000Z | import json
import re
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
class PancakeSwapAPI:
__BASE_URL = "https://api.pancakeswap.info/api/v2/"
"""
Basic API request wrapper for PancakeSwap
Scott Burlovich (github.com/scottburlovich)
... | 32.56338 | 111 | 0.622837 |
6327000043dfb46b3cf11e2832acdf550e68180e | 7,536 | py | Python | transboost/utils/filters_generator.py | jsleb333/transboost | 998b1e3294ebfbc4aa060047fb00e42db9fc0f12 | [
"MIT"
] | null | null | null | transboost/utils/filters_generator.py | jsleb333/transboost | 998b1e3294ebfbc4aa060047fb00e42db9fc0f12 | [
"MIT"
] | null | null | null | transboost/utils/filters_generator.py | jsleb333/transboost | 998b1e3294ebfbc4aa060047fb00e42db9fc0f12 | [
"MIT"
] | null | null | null | from transboost.aggregation_mechanism.affine_transform import RandomAffineSampler, AffineTransform
import numpy as np
import torch
class Filters:
def __init__(self, weights, pos, affine_transforms=list()):
self.pos = pos
self.weights = weights
self.affine_transforms = affine_transforms
... | 40.735135 | 201 | 0.625929 |
240ea2f370cdbb7bf64e8650aee6ab23b2540e9c | 1,615 | py | Python | leapp/utils/actorapi.py | vinzenz/leapp-actors-stdlib | 2d39d52dc744007d8bd096800afb104f83b7f026 | [
"Apache-2.0"
] | 1 | 2018-02-21T10:20:55.000Z | 2018-02-21T10:20:55.000Z | leapp/utils/actorapi.py | vinzenz/leapp-actors-stdlib | 2d39d52dc744007d8bd096800afb104f83b7f026 | [
"Apache-2.0"
] | null | null | null | leapp/utils/actorapi.py | vinzenz/leapp-actors-stdlib | 2d39d52dc744007d8bd096800afb104f83b7f026 | [
"Apache-2.0"
] | null | null | null | import os
import socket
import requests
import requests.adapters
import requests.exceptions
try:
import requests.packages.urllib3 as urllib3
except ImportError:
import urllib3
RequestException = requests.exceptions.RequestException
_session = None
class LeappAPIConnection(urllib3.connection.HTTPConnection... | 26.47541 | 78 | 0.715789 |
a75b5b1b9555db9037310fcfb9f8d1bf0470667e | 20,292 | py | Python | fiper_2hit_parsimony.py | jfnavarro/proteomics | 55af142236a032659e573a32717065f67423aefc | [
"MIT"
] | 1 | 2021-07-17T22:10:00.000Z | 2021-07-17T22:10:00.000Z | fiper_2hit_parsimony.py | jfnavarro/proteomics | 55af142236a032659e573a32717065f67423aefc | [
"MIT"
] | null | null | null | fiper_2hit_parsimony.py | jfnavarro/proteomics | 55af142236a032659e573a32717065f67423aefc | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# @Created by Jose Fernandez
# dec 10th, 2011
import sys
import os
import getopt
import twohitProteinEstimator as twohit
import parsimonyProteinEstimator as parsimony
import percolatorUtils as per
import generalUtils as utils
from lxml import etree
from pylab import *
import shlex, subprocess
im... | 50.477612 | 197 | 0.595653 |
e5c749cbebd57ce6c9e8445a3cd040f828245ad0 | 23,129 | py | Python | google/ads/googleads/v7/services/services/customer_user_access_invitation_service/client.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | google/ads/googleads/v7/services/services/customer_user_access_invitation_service/client.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | google/ads/googleads/v7/services/services/customer_user_access_invitation_service/client.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 41.673874 | 112 | 0.641965 |
6b0f1fc1239e901bb9bc66fbb7dac39926542598 | 1,348 | py | Python | config/config.py | potterhsu/easy-fpn.pytorch | cac901f2570bd8dba7bb456128c7c7985c255ea4 | [
"MIT"
] | 97 | 2019-01-02T18:46:03.000Z | 2022-03-30T05:53:11.000Z | config/config.py | potterhsu/easy-fpn.pytorch | cac901f2570bd8dba7bb456128c7c7985c255ea4 | [
"MIT"
] | 5 | 2019-04-15T07:18:03.000Z | 2021-01-10T11:56:22.000Z | config/config.py | potterhsu/easy-fpn.pytorch | cac901f2570bd8dba7bb456128c7c7985c255ea4 | [
"MIT"
] | 20 | 2019-03-22T06:02:01.000Z | 2022-03-15T12:55:31.000Z | from typing import Tuple, List
import ast
from roi.wrapper import Wrapper as ROIWrapper
class Config(object):
IMAGE_MIN_SIDE: float = 800.0
IMAGE_MAX_SIDE: float = 1333.0
ANCHOR_RATIOS: List[Tuple[int, int]] = [(1, 2), (1, 1), (2, 1)]
ANCHOR_SCALES: List[int] = [1]
POOLING_MODE: ROIWrapper.Mod... | 34.564103 | 118 | 0.642433 |
eb0756fe1ea77d9c1fd94cd02815a93a834036fe | 8,368 | py | Python | rainy/experiment.py | kngwyu/Rainy | 535f8f49d9efe0324a8480d0165ab1b35d83dc19 | [
"Apache-2.0"
] | 37 | 2019-12-05T08:12:59.000Z | 2021-09-30T11:10:11.000Z | rainy/experiment.py | kngwyu/Rainy | 535f8f49d9efe0324a8480d0165ab1b35d83dc19 | [
"Apache-2.0"
] | 29 | 2019-02-27T03:45:14.000Z | 2020-07-26T11:51:42.000Z | rainy/experiment.py | kngwyu/Rainy | 535f8f49d9efe0324a8480d0165ab1b35d83dc19 | [
"Apache-2.0"
] | 4 | 2021-03-24T04:29:58.000Z | 2021-12-21T01:28:13.000Z | import warnings
from pathlib import Path
from typing import List, Optional
import click
from .agents import Agent, DQNLikeAgent, DQNLikeParallel, EpisodeResult
from .lib.mpi import IS_MPI_ROOT
from .prelude import DEFAULT_SAVEFILE_NAME
class Experiment:
def __init__(
self,
ag: Agent,
sav... | 33.878543 | 86 | 0.570029 |
be150c2f166eb50a7094ea6042581fa520b6f894 | 390 | py | Python | src/computing_intelligence/__init__.py | drunkwretch/Computing-Intelligence | 1ad2f44494e837a9f91ad1d4e40d8d75fe551ffd | [
"MIT"
] | null | null | null | src/computing_intelligence/__init__.py | drunkwretch/Computing-Intelligence | 1ad2f44494e837a9f91ad1d4e40d8d75fe551ffd | [
"MIT"
] | null | null | null | src/computing_intelligence/__init__.py | drunkwretch/Computing-Intelligence | 1ad2f44494e837a9f91ad1d4e40d8d75fe551ffd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pkg_resources import get_distribution, DistributionNotFound
try:
# Change here if project is renamed and does not equal the package name
dist_name = 'Computing-Intelligence'
__version__ = get_distribution(dist_name).version
except DistributionNotFound:
__version__ =... | 32.5 | 76 | 0.748718 |
f3387a427d9ee1b00013db65e935a1545403c09b | 413 | py | Python | ARC/arc001-arc050/arc047/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ARC/arc001-arc050/arc047/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ARC/arc001-arc050/arc047/a.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
n, l = list(map(int, input().split()))
s = input()
tab_count = 1
crash_count = 0
for si in s:
if si == '+':
tab_count += 1
else:
tab_count -= 1
if tab_count > l:
crash_count += 1
... | 16.52 | 43 | 0.423729 |
6bbc8a2bca872df5e7e32ce180133583635975bd | 8,775 | py | Python | metaspace/engine/sm/engine/annotation_lithops/load_ds.py | mrmattuschka/metaspace | 837df137f115296bc7b801555d4edc1bb4770ddc | [
"Apache-2.0"
] | 32 | 2018-08-13T15:49:42.000Z | 2022-01-17T18:32:19.000Z | metaspace/engine/sm/engine/annotation_lithops/load_ds.py | mrmattuschka/metaspace | 837df137f115296bc7b801555d4edc1bb4770ddc | [
"Apache-2.0"
] | 624 | 2018-07-02T15:18:22.000Z | 2022-03-30T08:10:35.000Z | metaspace/engine/sm/engine/annotation_lithops/load_ds.py | mrmattuschka/metaspace | 837df137f115296bc7b801555d4edc1bb4770ddc | [
"Apache-2.0"
] | 6 | 2021-01-10T22:24:30.000Z | 2022-03-16T19:14:37.000Z | from __future__ import annotations
import logging
from concurrent.futures import ThreadPoolExecutor
from typing import Tuple, List
import numpy as np
import pandas as pd
from lithops.storage import Storage
from lithops.storage.utils import CloudObject
from sm.engine.annotation.imzml_reader import LithopsImzMLReader
... | 40.625 | 98 | 0.687407 |
990b7a184542805d75d186219c3fce786e101126 | 7,083 | py | Python | DiNTS/utils.py | dongyang0122/research-contributions | eb99330fe2caf741c1619aa71e887721ada12536 | [
"Apache-2.0"
] | null | null | null | DiNTS/utils.py | dongyang0122/research-contributions | eb99330fe2caf741c1619aa71e887721ada12536 | [
"Apache-2.0"
] | null | null | null | DiNTS/utils.py | dongyang0122/research-contributions | eb99330fe2caf741c1619aa71e887721ada12536 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 31.905405 | 111 | 0.622053 |
764f54206e8e4716149d18f9ed3f44e927dbc216 | 401,315 | py | Python | bnz/local/bnz.py | shyamjangid07/Reverse-Engineering | 469efabcd6057f7895d8d891f1fabdf2ffe730b0 | [
"Apache-2.0"
] | 337 | 2020-08-15T12:22:14.000Z | 2022-03-29T06:05:15.000Z | bnz/local/bnz.py | Wh014M/Reverse-Engineering | f7aae2c43f7ea4a6730964d085c07814b6660a53 | [
"Apache-2.0"
] | 3 | 2020-11-12T14:30:48.000Z | 2021-05-18T16:56:22.000Z | bnz/local/bnz.py | Wh014M/Reverse-Engineering | f7aae2c43f7ea4a6730964d085c07814b6660a53 | [
"Apache-2.0"
] | 83 | 2020-08-15T00:22:58.000Z | 2022-03-31T08:40:23.000Z | # Auther : Binyamin
# GitHub : https://github.com/Binyamin-binni
# YouTube Channel : Trick Proof
import base64
exec(base64.b16decode('2320436F6D70696C6564204279203A2042696E79616D696E0A2320476974487562203A2068747470733A2F2F6769746875622E636F6D2F42696E79616D696E2D62696E6E690A2320596F7554756265204368616E6E656C203A20547269... | 80,263 | 401,204 | 0.999913 |
7f41cb45e376e2e75b67e16a0b7afadd3ff411aa | 1,449 | py | Python | packs/duo/actions/lib/actions.py | userlocalhost2000/st2contrib | 1a5f759e76401743ed9023d298a3d767e3885db1 | [
"Apache-2.0"
] | 164 | 2015-01-17T16:08:33.000Z | 2021-08-03T02:34:07.000Z | packs/duo/actions/lib/actions.py | userlocalhost2000/st2contrib | 1a5f759e76401743ed9023d298a3d767e3885db1 | [
"Apache-2.0"
] | 442 | 2015-01-01T11:19:01.000Z | 2017-09-06T23:26:17.000Z | packs/duo/actions/lib/actions.py | userlocalhost2000/st2contrib | 1a5f759e76401743ed9023d298a3d767e3885db1 | [
"Apache-2.0"
] | 202 | 2015-01-13T00:37:40.000Z | 2020-11-07T11:30:10.000Z | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 39.162162 | 74 | 0.68185 |
d2e3212f3b04ed49a92fcc841f4a6887ae3c3a65 | 4,110 | py | Python | src/kerod/layers/anchors.py | LSanselme/kerod | cb52775ed501cbe4bd5fc0f22ec0359ca1d5f902 | [
"MIT"
] | 35 | 2020-06-14T11:20:54.000Z | 2022-03-02T14:42:25.000Z | src/kerod/layers/anchors.py | LSanselme/kerod | cb52775ed501cbe4bd5fc0f22ec0359ca1d5f902 | [
"MIT"
] | 9 | 2021-02-03T15:01:39.000Z | 2022-03-16T01:46:38.000Z | src/kerod/layers/anchors.py | LSanselme/kerod | cb52775ed501cbe4bd5fc0f22ec0359ca1d5f902 | [
"MIT"
] | 11 | 2021-02-02T09:41:16.000Z | 2022-03-01T15:43:31.000Z | import tensorflow as tf
from kerod.core.constants import MAX_IMAGE_DIMENSION
from kerod.utils.documentation import remove_unwanted_doc
__pdoc__ = {}
def generate_anchors(stride: int, scales: tf.Tensor, ratios: tf.Tensor, max_size: int):
"""Will generate a determistic grid based on the input images dimension.
... | 40.294118 | 99 | 0.648175 |
010f986fb4e975a76bb158898f72d707100eaeb2 | 389 | py | Python | Shubham-Yadav/4.Docker/docker/docker/wsgi.py | srimanivinay97/DevOpsRoadmap2022 | 6422eaad8946c5380b3e328a9113944bfd04036a | [
"MIT"
] | 169 | 2022-01-04T06:46:48.000Z | 2022-03-31T07:17:59.000Z | Shubham-Yadav/4.Docker/docker/docker/wsgi.py | srimanivinay97/DevOpsRoadmap2022 | 6422eaad8946c5380b3e328a9113944bfd04036a | [
"MIT"
] | 212 | 2022-01-04T09:46:05.000Z | 2022-03-31T23:18:08.000Z | Shubham-Yadav/4.Docker/docker/docker/wsgi.py | srimanivinay97/DevOpsRoadmap2022 | 6422eaad8946c5380b3e328a9113944bfd04036a | [
"MIT"
] | 86 | 2022-01-04T06:32:30.000Z | 2022-03-30T13:05:51.000Z | """
WSGI config for docker project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTIN... | 22.882353 | 78 | 0.784062 |
272c9450506b066bb56e05d2bd17501075dd2e9a | 1,148 | py | Python | src/json_expand_o_matic/contractor.py | jcejohnson/JsonExpandOMatic | 4ca5b677feb7a17bc8909d37cd1282f9b636d7a1 | [
"MIT"
] | null | null | null | src/json_expand_o_matic/contractor.py | jcejohnson/JsonExpandOMatic | 4ca5b677feb7a17bc8909d37cd1282f9b636d7a1 | [
"MIT"
] | null | null | null | src/json_expand_o_matic/contractor.py | jcejohnson/JsonExpandOMatic | 4ca5b677feb7a17bc8909d37cd1282f9b636d7a1 | [
"MIT"
] | null | null | null | import json
import os
from urllib.parse import urlparse
class Contractor:
def __init__(self, *, logger, path, root_element):
self.logger = logger
self.path = path
self.root_element = root_element
def execute(self):
return self._contract(path=[self.path], data=self._slurp(self... | 27.333333 | 105 | 0.587979 |
01ab41bb4f05280d6b75765e14f91c17cee73dd4 | 566 | py | Python | python/crab/Moriond17/QCD_EMEnriched_170to300.py | EmyrClement/NTupleProduction | 4c1b67ac8826656e804912512f4c4dc6695c7674 | [
"Apache-2.0"
] | 1 | 2018-02-20T21:23:21.000Z | 2018-02-20T21:23:21.000Z | python/crab/Moriond17/QCD_EMEnriched_170to300.py | RickeyEstes/NTupleProduction | 1319183de0ce00749c8f5841fa925479b9024b48 | [
"Apache-2.0"
] | 116 | 2015-01-09T22:38:07.000Z | 2017-05-24T08:12:48.000Z | python/crab/Moriond17/QCD_EMEnriched_170to300.py | RickeyEstes/NTupleProduction | 1319183de0ce00749c8f5841fa925479b9024b48 | [
"Apache-2.0"
] | 1 | 2020-11-01T00:01:17.000Z | 2020-11-01T00:01:17.000Z | import crab.base
from copy import deepcopy
NAME = __file__.split('/')[-1].replace('.pyc', '')
NAME = NAME.split('/')[-1].replace('.py', '')
CAMPAIGN = __file__.split('/')[-2]
config = deepcopy(crab.base.config)
config.General.requestName = NAME
config.Data.outputDatasetTag = NAME
config.Data.outLFNDirBase += '/' + CAM... | 35.375 | 172 | 0.770318 |
23d15b3a36b1438a19471b10f6bd92ca87eb4d68 | 1,813 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/16_features/numtrees_30/rule_7.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/16_features/numtrees_30/rule_7.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/16_features/numtrees_30/rule_7.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Passanger, obj[1]: Weather, obj[2]: Time, obj[3]: Coupon, obj[4]: Coupon_validity, obj[5]: Gender, obj[6]: Age, obj[7]: Children, obj[8]: Education, obj[9]: Occupation, obj[10]: Income, obj[11]: Bar, obj[12]: Coffeehouse, obj[13]: Restaurant20to50, obj[14]: Direction_same, obj[15]: Dista... | 37.770833 | 323 | 0.57529 |
e48f79f9211c66d08418bccc35bbdfed16e0f7f1 | 7,878 | py | Python | cs224n/assignment2/q1_classifier.py | kabrapratik28/Stanford_courses | 9b02845ad15103d7e7f934319f43298f8cd8a364 | [
"Apache-2.0"
] | 1 | 2017-07-12T18:34:29.000Z | 2017-07-12T18:34:29.000Z | cs224n/assignment2/q1_classifier.py | kabrapratik28/Stanford_courses | 9b02845ad15103d7e7f934319f43298f8cd8a364 | [
"Apache-2.0"
] | null | null | null | cs224n/assignment2/q1_classifier.py | kabrapratik28/Stanford_courses | 9b02845ad15103d7e7f934319f43298f8cd8a364 | [
"Apache-2.0"
] | null | null | null | import time
import numpy as np
import tensorflow as tf
from q1_softmax import softmax
from q1_softmax import cross_entropy_loss
from model import Model
from utils.general_utils import get_minibatches
class Config(object):
"""Holds model hyperparams and data information.
The config class is used to store va... | 35.327354 | 121 | 0.627317 |
9dc495e96cac958a150e4206a26b50f364a30583 | 2,505 | py | Python | tests/dataframe/test_iterrows_itertuples_pytest.py | szabosteve/eland | 64daa07a65cd45f23dc32ea8ab67ea1f1cc98c1d | [
"Apache-2.0"
] | 335 | 2020-01-10T10:47:21.000Z | 2022-03-31T12:33:03.000Z | tests/dataframe/test_iterrows_itertuples_pytest.py | szabosteve/eland | 64daa07a65cd45f23dc32ea8ab67ea1f1cc98c1d | [
"Apache-2.0"
] | 255 | 2020-01-10T11:09:32.000Z | 2022-03-31T21:34:54.000Z | tests/dataframe/test_iterrows_itertuples_pytest.py | szabosteve/eland | 64daa07a65cd45f23dc32ea8ab67ea1f1cc98c1d | [
"Apache-2.0"
] | 51 | 2020-01-10T10:53:54.000Z | 2022-03-15T15:48:18.000Z | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 38.538462 | 88 | 0.690619 |
990ba4812799dd5fa49dfc2daa28c43d7d051764 | 160 | py | Python | eapp/__init__.py | blmeena1991/myapp | 28e91bf4278f1dc09197e8699efcbff916ffae05 | [
"Apache-1.1"
] | null | null | null | eapp/__init__.py | blmeena1991/myapp | 28e91bf4278f1dc09197e8699efcbff916ffae05 | [
"Apache-1.1"
] | null | null | null | eapp/__init__.py | blmeena1991/myapp | 28e91bf4278f1dc09197e8699efcbff916ffae05 | [
"Apache-1.1"
] | null | null | null | # -*- coding: utf-8 -*-
__version__ = '1'
__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])
| 40 | 117 | 0.625 |
f6773efddb3dcca754d229a50cd54142822adc02 | 4,862 | py | Python | server/app/models/checks.py | efg/GitHub-Plagiarism-Detector | 2b6d944bb7e0e14572b365624c57f75468d0679f | [
"MIT"
] | null | null | null | server/app/models/checks.py | efg/GitHub-Plagiarism-Detector | 2b6d944bb7e0e14572b365624c57f75468d0679f | [
"MIT"
] | null | null | null | server/app/models/checks.py | efg/GitHub-Plagiarism-Detector | 2b6d944bb7e0e14572b365624c57f75468d0679f | [
"MIT"
] | null | null | null | import logging
import os
import shutil
import git
import mosspy
from app import db
from app.utils.directories import extract_files_from_dir
from app.utils.languages import get_file_extensions
from dotenv import load_dotenv
from app.models.submissions import Submission
load_dotenv()
logger = logging.getLogger(__nam... | 36.556391 | 94 | 0.628137 |
7641d8062a2c3043d0ede92b51755b5ca529dd3c | 5,213 | py | Python | flowkit/_models/dimension.py | whitews/FlowK | d4e43a0488606ce5479b5110486dc3db128f6a87 | [
"BSD-3-Clause"
] | 73 | 2019-02-18T01:03:06.000Z | 2022-03-18T14:03:01.000Z | flowkit/_models/dimension.py | whitews/FlowK | d4e43a0488606ce5479b5110486dc3db128f6a87 | [
"BSD-3-Clause"
] | 90 | 2019-01-28T22:04:04.000Z | 2022-03-31T16:40:14.000Z | flowkit/_models/dimension.py | whitews/FlowK | d4e43a0488606ce5479b5110486dc3db128f6a87 | [
"BSD-3-Clause"
] | 8 | 2019-08-19T16:58:48.000Z | 2022-01-11T08:55:23.000Z | """
Module defining the Dimension, RatioDimension, and QuadrantDivider classes
"""
class Dimension(object):
"""
Represents a single dimension of an array of FCS data.
:param dimension_id: A string identifying the dimension, typically matching the PnN label of a channel in an
FCS sample
:param... | 38.902985 | 114 | 0.670056 |
03a0a110a15c3958de558adf2a351972fa2e6167 | 579 | py | Python | examples/records.py | KirovVerst/qgeneration | 67f2ad0fac21d9a810b11da1eb9300e0f06ccf74 | [
"MIT"
] | 1 | 2017-07-28T18:21:40.000Z | 2017-07-28T18:21:40.000Z | examples/records.py | KirovVerst/qgeneration | 67f2ad0fac21d9a810b11da1eb9300e0f06ccf74 | [
"MIT"
] | null | null | null | examples/records.py | KirovVerst/qgeneration | 67f2ad0fac21d9a810b11da1eb9300e0f06ccf74 | [
"MIT"
] | null | null | null | import datetime
from qgeneration.qfields import DateField, FirstNameQField
from qgeneration.qrecords import BaseRecord, PersonRecord
if __name__ == '__main__':
start = datetime.date(year=1900, month=1, day=1)
finish = datetime.date(year=2000, month=1, day=1)
date_field = DateField('date_field', start, fini... | 30.473684 | 78 | 0.721934 |
62fe5df465358a36050d05ff1920c805cfe098c9 | 21,354 | py | Python | HTC_lib/VASP/INCAR/Write_VASP_INCAR.py | bitsoal/VASP_HTC_framework | e947227f238fc3ff4d950c1e5fd0a4995b9bf3eb | [
"MIT"
] | 10 | 2018-03-06T01:27:53.000Z | 2021-12-03T07:27:33.000Z | HTC_lib/VASP/INCAR/Write_VASP_INCAR.py | bitsoal/VASP_HTC_framework | e947227f238fc3ff4d950c1e5fd0a4995b9bf3eb | [
"MIT"
] | null | null | null | HTC_lib/VASP/INCAR/Write_VASP_INCAR.py | bitsoal/VASP_HTC_framework | e947227f238fc3ff4d950c1e5fd0a4995b9bf3eb | [
"MIT"
] | 5 | 2018-03-06T02:08:58.000Z | 2021-08-18T02:12:40.000Z | #!/usr/bin/env python
# coding: utf-8
# In[3]:
import pprint,copy, json
import os, sys
HTC_package_path = "C:/Users/tyang/Documents/Jupyter_workspace/HTC/python_3"
if os.path.isdir(HTC_package_path) and HTC_package_path not in sys.path:
sys.path.append(HTC_package_path)
from pymatgen.io.vasp.sets import MPRel... | 53.385 | 238 | 0.644891 |
e94ff9bff7581b96ecafe818972a4f7e5838557f | 50 | py | Python | tabular/src/autogluon/tabular/task/tabular_prediction/__init__.py | adrienatallah/autogluon | 014faf7e98bd0e349d0900f713442536b0f69b1e | [
"Apache-2.0"
] | null | null | null | tabular/src/autogluon/tabular/task/tabular_prediction/__init__.py | adrienatallah/autogluon | 014faf7e98bd0e349d0900f713442536b0f69b1e | [
"Apache-2.0"
] | null | null | null | tabular/src/autogluon/tabular/task/tabular_prediction/__init__.py | adrienatallah/autogluon | 014faf7e98bd0e349d0900f713442536b0f69b1e | [
"Apache-2.0"
] | null | null | null | from .tabular_prediction import TabularPrediction
| 25 | 49 | 0.9 |
b207947643dfc4667e6b705fd4482f81cc1c7a0f | 1,232 | py | Python | minette/models/response.py | uezo/minette-python | dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f | [
"Apache-2.0"
] | 31 | 2017-12-18T15:35:42.000Z | 2021-12-16T07:27:33.000Z | minette/models/response.py | uezo/minette-python | dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f | [
"Apache-2.0"
] | 17 | 2017-07-13T22:25:08.000Z | 2020-11-02T14:19:32.000Z | minette/models/response.py | uezo/minette-python | dd8cd7d244b6e6e4133c8e73d637ded8a8c6846f | [
"Apache-2.0"
] | 2 | 2017-09-14T09:28:35.000Z | 2021-01-17T12:31:54.000Z | from ..serializer import Serializable
from .performance import PerformanceInfo
from .message import Message
class Response(Serializable):
"""
Response from chatbot
Attributes
----------
messages : list of minette.Message
Response messages
headers : dict
Response header
per... | 30.04878 | 70 | 0.614448 |
67fa44b3ff39f25da9ca52e188fab4a7e6b7c288 | 1,698 | py | Python | configy/testconfig.py | grigi/configy | 86f6bdd3164f39e83e82e3527f5863032c0ed1e7 | [
"MIT"
] | 3 | 2015-09-18T13:06:04.000Z | 2021-08-10T16:37:21.000Z | configy/testconfig.py | grigi/configy | 86f6bdd3164f39e83e82e3527f5863032c0ed1e7 | [
"MIT"
] | null | null | null | configy/testconfig.py | grigi/configy | 86f6bdd3164f39e83e82e3527f5863032c0ed1e7 | [
"MIT"
] | null | null | null | '''
Configy test helper functions
'''
# pylint: disable=W0212,W0142
from functools import wraps
from configy.config_container import config, build_config, extend_config
import json
def override_config(data):
'''
Overrides a partial configuration set for the test function/method
'''
def wrap(callback)... | 30.872727 | 72 | 0.596584 |
d6d69c046e400e800ad53840f8689d15365dd0f3 | 1,619 | bzl | Python | perl/deps.bzl | JimmyTheJudd/rules_perl | 9ce0a9a8ac74853ad5f009416d774b55aa642c08 | [
"Apache-2.0"
] | null | null | null | perl/deps.bzl | JimmyTheJudd/rules_perl | 9ce0a9a8ac74853ad5f009416d774b55aa642c08 | [
"Apache-2.0"
] | null | null | null | perl/deps.bzl | JimmyTheJudd/rules_perl | 9ce0a9a8ac74853ad5f009416d774b55aa642c08 | [
"Apache-2.0"
] | null | null | null | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//perl:repo.bzl", _perl_download = "perl_download")
perl_download = _perl_download
def perl_register_toolchains():
perl_download(
name = "perl_linux_amd64",
arch = "amd64",
os = "linux",
strip_prefix = "perl... | 36.795455 | 126 | 0.676343 |
ede4652d1e73207f63bb4f690ccc2ae9bcd8a750 | 126,814 | py | Python | mrcnn/model.py | HeritageGuard/Mask_RCNN | 0b2d5220221c9116ce7bcb4fbc1325c95de608ed | [
"MIT"
] | null | null | null | mrcnn/model.py | HeritageGuard/Mask_RCNN | 0b2d5220221c9116ce7bcb4fbc1325c95de608ed | [
"MIT"
] | null | null | null | mrcnn/model.py | HeritageGuard/Mask_RCNN | 0b2d5220221c9116ce7bcb4fbc1325c95de608ed | [
"MIT"
] | null | null | null | """
Mask R-CNN
The main Mask R-CNN model implementation.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import os
import datetime
import re
import math
from collections import OrderedDict
import multiprocessing
import numpy as np
import tenso... | 44.263176 | 115 | 0.613875 |
20323f0e1582a02a8bd9059976e69e0600158670 | 331 | py | Python | utils/misc.py | lupvasile/video-seg | d0b1f5ec75c49ee42ba08939451575580ce6f798 | [
"MIT"
] | null | null | null | utils/misc.py | lupvasile/video-seg | d0b1f5ec75c49ee42ba08939451575580ce6f798 | [
"MIT"
] | null | null | null | utils/misc.py | lupvasile/video-seg | d0b1f5ec75c49ee42ba08939451575580ce6f798 | [
"MIT"
] | null | null | null | import inspect
from os.path import basename
from shutil import copyfile
def copy_object_sourcefile(source_obj, dest_dir):
x = source_obj.__class__
while x != object.__class__ and 'torch' not in str(x):
path = inspect.getsourcefile(x)
copyfile(path, dest_dir + '/' + basename(path))
x = ... | 27.583333 | 58 | 0.691843 |
9c29fd91983b26f8c3e88f627174e2e6a2d70cf3 | 8,749 | py | Python | WedelNewsBot.py | Lumiukko/WedelNewsBot | b0682839bde1793657ac70307f9ccfcbb9ff8aea | [
"MIT"
] | 1 | 2018-03-25T14:00:36.000Z | 2018-03-25T14:00:36.000Z | WedelNewsBot.py | Lumiukko/WedelNewsBot | b0682839bde1793657ac70307f9ccfcbb9ff8aea | [
"MIT"
] | null | null | null | WedelNewsBot.py | Lumiukko/WedelNewsBot | b0682839bde1793657ac70307f9ccfcbb9ff8aea | [
"MIT"
] | null | null | null | """
WedelNewsBot
Fetches news from wedel.de and posts them to Twitter.
Currently running at: https://twitter.com/WedelNews
"""
import requests
from bs4 import BeautifulSoup
import json
from datetime import datetime
import twitter
from twitter.error import TwitterError
import os
import logging
from tweet_... | 33.015094 | 103 | 0.629901 |
124e0cfc6edf9badd63ff3cfc52e13c5b9911dae | 904 | py | Python | setup.py | auscompgeek/pyls-black | ebb9b9cdba0dc034de522af10df3706c6967486f | [
"MIT"
] | null | null | null | setup.py | auscompgeek/pyls-black | ebb9b9cdba0dc034de522af10df3706c6967486f | [
"MIT"
] | null | null | null | setup.py | auscompgeek/pyls-black | ebb9b9cdba0dc034de522af10df3706c6967486f | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
with open("README.md", "r") as f:
long_description = f.read()
setup(
name="pyls-black",
version="0.2.0",
description="Black plugin for the Python Language Server",
long_description=long_description,
long_description_content_type="text/markdown",
... | 34.769231 | 76 | 0.653761 |
52a7e9e4d7653433af475c1a9c4a645f472c46c5 | 10,520 | py | Python | bycycle/plts/burst.py | kguarian/bycycle | ab971d50eaa8842c6214c463350bfbf932cefa2e | [
"Apache-2.0"
] | null | null | null | bycycle/plts/burst.py | kguarian/bycycle | ab971d50eaa8842c6214c463350bfbf932cefa2e | [
"Apache-2.0"
] | null | null | null | bycycle/plts/burst.py | kguarian/bycycle | ab971d50eaa8842c6214c463350bfbf932cefa2e | [
"Apache-2.0"
] | 1 | 2022-02-21T15:54:38.000Z | 2022-02-21T15:54:38.000Z | """Plot burst detection parameters."""
from itertools import cycle
import numpy as np
from scipy.stats import zscore
import matplotlib.pyplot as plt
from neurodsp.plts import plot_time_series, plot_bursts
from neurodsp.plts.utils import savefig
from bycycle.plts.cyclepoints import plot_cyclepoints_df
from bycycle.u... | 39.107807 | 99 | 0.610456 |
ae66544a74b576c82ebc39a6730e37efb8722794 | 716 | py | Python | server/musicroom/api/setName.py | asrient/musicroom | 5b19e4a958fb856551f8be5616bc7b01e2f6dc07 | [
"BSD-3-Clause"
] | 1 | 2021-01-09T14:36:39.000Z | 2021-01-09T14:36:39.000Z | server/musicroom/api/setName.py | asrient/musicroom | 5b19e4a958fb856551f8be5616bc7b01e2f6dc07 | [
"BSD-3-Clause"
] | null | null | null | server/musicroom/api/setName.py | asrient/musicroom | 5b19e4a958fb856551f8be5616bc7b01e2f6dc07 | [
"BSD-3-Clause"
] | 2 | 2021-01-25T05:54:21.000Z | 2022-03-14T23:40:24.000Z | from django.http import HttpResponse
from django.shortcuts import render, redirect
from django.views.decorators.http import require_http_methods
from django.contrib.auth import authenticate, login
from musicroom.common import apiRespond
@require_http_methods(["POST"])
def main(request):
if request.user.is_authen... | 32.545455 | 61 | 0.680168 |
c5abd9fea4e6b7d4f51d34735bb8960ce23382f8 | 1,690 | py | Python | test/functional/feature_abortnode.py | asuka431/fujicoin-22.0 | 9e338be2116022f0d18df153298b8881e6145f04 | [
"MIT"
] | null | null | null | test/functional/feature_abortnode.py | asuka431/fujicoin-22.0 | 9e338be2116022f0d18df153298b8881e6145f04 | [
"MIT"
] | null | null | null | test/functional/feature_abortnode.py | asuka431/fujicoin-22.0 | 9e338be2116022f0d18df153298b8881e6145f04 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2019-2020 The Baricoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test baricoind aborts if can't disconnect a block.
- Start a single node and generate 3 blocks.
- Del... | 33.137255 | 78 | 0.686982 |
66184d4e182601275e09457650c9a3e4ae6a176d | 5,174 | py | Python | src/stac_fastapi/sqlalchemy/stac_fastapi/sqlalchemy/models/database.py | Dataforsyningen/skraafoto_stac_public | fa9cb7e3516cfacf730d24bb56ae50e2e0e5bae1 | [
"MIT"
] | null | null | null | src/stac_fastapi/sqlalchemy/stac_fastapi/sqlalchemy/models/database.py | Dataforsyningen/skraafoto_stac_public | fa9cb7e3516cfacf730d24bb56ae50e2e0e5bae1 | [
"MIT"
] | 15 | 2022-01-12T08:52:22.000Z | 2022-02-02T14:41:47.000Z | src/stac_fastapi/sqlalchemy/stac_fastapi/sqlalchemy/models/database.py | Dataforsyningen/skraafoto_stac_public | fa9cb7e3516cfacf730d24bb56ae50e2e0e5bae1 | [
"MIT"
] | null | null | null | """SQLAlchemy ORM models."""
from decimal import Decimal
import json
from typing import Optional
import geoalchemy2 as ga
from geoalchemy2 import Geometry
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.ext.hybrid import ... | 36.957143 | 84 | 0.691921 |
faf238c3ab2ed66ab6359c9b755958f2d27a5d89 | 4,592 | py | Python | news/views.py | ManishShah120/news-scrap | e928d030a8095095ca3cf394e2d570ffa573c629 | [
"MIT"
] | 2 | 2020-09-13T06:36:20.000Z | 2022-01-03T17:06:59.000Z | news/views.py | ManishShah120/news-scrap | e928d030a8095095ca3cf394e2d570ffa573c629 | [
"MIT"
] | 7 | 2020-09-12T20:22:18.000Z | 2022-03-12T00:47:26.000Z | news/views.py | ManishShah120/news-scrap | e928d030a8095095ca3cf394e2d570ffa573c629 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import News
from .models import PageView
from django.core.paginator import Paginator
from django.db.models import Q
# For scraping part
import requests
from bs4 import BeautifulSoup
from django.views.generic import CreateView, DetailView
def news_list(request, *args, ... | 40.280702 | 187 | 0.519164 |
4d5f4ad6b4aac5c2dd11fc75fb02f8d95dfed5bc | 3,972 | py | Python | cgetsecret.py | KevSmithCentrify/dmc-python | d84fa649a6d0873595af876ded528859157597ad | [
"Apache-2.0"
] | null | null | null | cgetsecret.py | KevSmithCentrify/dmc-python | d84fa649a6d0873595af876ded528859157597ad | [
"Apache-2.0"
] | null | null | null | cgetsecret.py | KevSmithCentrify/dmc-python | d84fa649a6d0873595af876ded528859157597ad | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
### vvvvvv USER SETTINGS vvvvvv
### these are mandatory
Tenant_Name = "aaa3441.my.centrify-kibble.net"
Scope_Name = "admin"
### you must provide either Folder_Name and Secret_Name, OR provide the Secret_ID
Folder_Name = "RedBank"
Secret_Name = "myAPI"
Secret_ID = ""
### ^^^^^^^ USER SETTIN... | 32.032258 | 97 | 0.652568 |
f75dd2052bace89b37fb4706c1aa66d042259e66 | 8,135 | py | Python | feedback-robot-learning/husky_stadium_discrete_states.py | junyaoshi/feedbcak-navigation | dc64d7422aa9590325013bdac61db8c58d343599 | [
"MIT"
] | 1 | 2020-07-28T15:49:53.000Z | 2020-07-28T15:49:53.000Z | feedback-robot-learning/husky_stadium_discrete_states.py | junyaoshi/feedback-navigation | dc64d7422aa9590325013bdac61db8c58d343599 | [
"MIT"
] | null | null | null | feedback-robot-learning/husky_stadium_discrete_states.py | junyaoshi/feedback-navigation | dc64d7422aa9590325013bdac61db8c58d343599 | [
"MIT"
] | null | null | null | # Import Libraries
from gibson.envs.husky_env import HuskyNavigateEnv
import inspect
from pprint import pprint
import pybullet as p
import os
import math
import random
from time import sleep
from math import pi
# from transforms3d.euler import quat2euler
# Parse config and object arguments
config_file = os.path.join(o... | 28.847518 | 138 | 0.627289 |
7a08945ae0ab07a2750a2b3a8eb3b79f37c2f3f2 | 187 | py | Python | src/trello/serializers/attachments_serializers.py | kshevchuk17/ManagerTask_Backend | f6b5a3964dc49b42571152382eb417bba1ad9708 | [
"Apache-2.0"
] | null | null | null | src/trello/serializers/attachments_serializers.py | kshevchuk17/ManagerTask_Backend | f6b5a3964dc49b42571152382eb417bba1ad9708 | [
"Apache-2.0"
] | 1 | 2021-05-23T13:02:30.000Z | 2021-05-23T13:02:30.000Z | src/trello/serializers/attachments_serializers.py | kshevchuk17/TestTaskForBotConversa | f6b5a3964dc49b42571152382eb417bba1ad9708 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from trello.models import *
class AttachmentDetailSerializer(serializers.ModelSerializer):
class Meta:
model = Attachment
fields = '__all__'
| 20.777778 | 62 | 0.807487 |
a8acd02eafebf42b6b953ceb17ec711cfd0ad56d | 922 | py | Python | LostEmpire/urls.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | LostEmpire/urls.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | LostEmpire/urls.py | LTSana/lost-empire | 495397345f1226b025434e37c5e1703273f475a8 | [
"CC0-1.0"
] | null | null | null | """LostEmpire URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 34.148148 | 77 | 0.713666 |
16715ef476eb9f17f351729bc0167786530aa3b1 | 5,530 | py | Python | examples/full-screen/simple-demos/vertical-align.py | timgates42/python-prompt-toolkit | c49f407ff14f0231ec2b2809e5a15fa91e2dbd96 | [
"BSD-3-Clause"
] | 2 | 2020-05-29T17:51:10.000Z | 2020-05-29T17:52:26.000Z | examples/full-screen/simple-demos/vertical-align.py | timgates42/python-prompt-toolkit | c49f407ff14f0231ec2b2809e5a15fa91e2dbd96 | [
"BSD-3-Clause"
] | 1 | 2020-08-11T19:53:13.000Z | 2020-08-11T19:53:13.000Z | examples/full-screen/simple-demos/vertical-align.py | timgates42/python-prompt-toolkit | c49f407ff14f0231ec2b2809e5a15fa91e2dbd96 | [
"BSD-3-Clause"
] | 1 | 2019-06-09T23:34:42.000Z | 2019-06-09T23:34:42.000Z | #!/usr/bin/env python
"""
Vertical align demo with VSplit.
"""
from prompt_toolkit.application import Application
from prompt_toolkit.formatted_text import HTML
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.layout.containers import (
HSplit,
VerticalAlign,
VSplit,
Window,
Wi... | 32.721893 | 86 | 0.450814 |
a2d4f37e962f544331d83d0bd89e9d33e7c8f0fb | 18,063 | py | Python | paddlers/models/ppdet/modeling/proposal_generator/target_layer.py | Xiaracto/PaddleRS | 6e9b99a79fe740775daff310bd1ca3e6fbc86f80 | [
"Apache-2.0"
] | 1 | 2022-03-30T10:59:58.000Z | 2022-03-30T10:59:58.000Z | paddlers/models/ppdet/modeling/proposal_generator/target_layer.py | wondering516/PaddleRS | b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f | [
"Apache-2.0"
] | null | null | null | paddlers/models/ppdet/modeling/proposal_generator/target_layer.py | wondering516/PaddleRS | b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 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... | 36.713415 | 117 | 0.613519 |
c0d29f21d2283244704bc3bc8a5dcdfc703f5229 | 4,103 | py | Python | src/gluonnlp/vocab/elmo.py | gigasquid/gluon-nlp | 58237c038cb1e80edd2dbd237cb7670ec98ee92b | [
"Apache-2.0"
] | 2 | 2019-10-18T05:57:39.000Z | 2019-11-27T08:47:16.000Z | src/gluonnlp/vocab/elmo.py | gigasquid/gluon-nlp | 58237c038cb1e80edd2dbd237cb7670ec98ee92b | [
"Apache-2.0"
] | 2 | 2019-02-13T09:10:26.000Z | 2019-02-20T02:59:43.000Z | src/gluonnlp/vocab/elmo.py | gigasquid/gluon-nlp | 58237c038cb1e80edd2dbd237cb7670ec98ee92b | [
"Apache-2.0"
] | 3 | 2021-07-20T07:40:15.000Z | 2021-08-03T08:39:17.000Z | # coding: utf-8
# 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... | 34.478992 | 97 | 0.661711 |
eaaa36a1c17ff10b7155ddca48f8a9a242228c7d | 438 | py | Python | .pythonrc.py | theskumar/dotfiles | 2bb017f58612685029e9e9da3d7e1c5593057840 | [
"BSD-2-Clause"
] | 20 | 2015-07-20T11:49:51.000Z | 2022-03-17T05:07:55.000Z | .pythonrc.py | theskumar/dotfiles | 2bb017f58612685029e9e9da3d7e1c5593057840 | [
"BSD-2-Clause"
] | 3 | 2015-06-23T14:00:09.000Z | 2017-05-10T12:13:31.000Z | .pythonrc.py | theskumar/dotfiles | 2bb017f58612685029e9e9da3d7e1c5593057840 | [
"BSD-2-Clause"
] | 8 | 2015-05-21T09:43:25.000Z | 2017-12-28T18:24:08.000Z | def print_sql(qs):
import sqlparse
try:
import pygments
from pygments.lexers import SqlLexer
from pygments.formatters import TerminalTrueColorFormatter
except ImportError:
pygments = None
sql = sqlparse.format(str(qs.query), reindent=True, keyword_case='upper')
if py... | 31.285714 | 94 | 0.691781 |
cce17971035c2ddfe2e3e4253af51fd6442cb02c | 16,968 | py | Python | hdbscan/robust_single_linkage_.py | zunderlab/hdbscan | 4ac4e18ec3a0f69fd215e182b73bb4b4837b17fa | [
"BSD-3-Clause"
] | null | null | null | hdbscan/robust_single_linkage_.py | zunderlab/hdbscan | 4ac4e18ec3a0f69fd215e182b73bb4b4837b17fa | [
"BSD-3-Clause"
] | null | null | null | hdbscan/robust_single_linkage_.py | zunderlab/hdbscan | 4ac4e18ec3a0f69fd215e182b73bb4b4837b17fa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Robust Single Linkage: Density based single linkage clustering.
"""
import numpy as np
from sklearn.base import BaseEstimator, ClusterMixin
from sklearn.metrics import pairwise_distances
from scipy.sparse import issparse
from joblib import Memory
import six
from sklearn.utils import check_... | 37.62306 | 88 | 0.622819 |
4d151abaaae7b4e886e1ed307711c21f14162114 | 5,574 | py | Python | HW5/Noh.py | krishnaw14/CFD-codes | beaeb75da0a98c2b89cef82b68a866955b9133f6 | [
"MIT"
] | 2 | 2020-02-27T08:25:36.000Z | 2021-09-29T17:41:30.000Z | HW5/Noh.py | krishnaw14/CFD-codes | beaeb75da0a98c2b89cef82b68a866955b9133f6 | [
"MIT"
] | null | null | null | HW5/Noh.py | krishnaw14/CFD-codes | beaeb75da0a98c2b89cef82b68a866955b9133f6 | [
"MIT"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
def initialize_grid(N, var, x_values):
grid_values = np.zeros((N+2, 1))
left_bc_values = {
"density": 1,
"velocity": 1,
"pressure": 1e-6
}
right_bc_values = {
"density": 1,
"velocity": -1,
"pressure": 1e-6
}
for i in range(1,N+1):
x = x_val... | 36.194805 | 148 | 0.731073 |
816103d9c17e7ad5934f8b21d7728c32afa022a2 | 303 | py | Python | guillotina/fields/__init__.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 173 | 2017-03-10T18:26:12.000Z | 2022-03-03T06:48:56.000Z | guillotina/fields/__init__.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 921 | 2017-03-08T14:04:43.000Z | 2022-03-30T10:28:56.000Z | guillotina/fields/__init__.py | rboixaderg/guillotina | fcae65c2185222272f3b8fee4bc2754e81e0e983 | [
"BSD-2-Clause"
] | 60 | 2017-03-16T19:59:44.000Z | 2022-03-03T06:48:59.000Z | from guillotina.fields.annotation import BucketDictField # noqa
from guillotina.fields.annotation import BucketListField # noqa
from guillotina.fields.dynamic import DynamicField # noqa
from guillotina.fields.files import CloudFileField # noqa
from guillotina.fields.patch import PatchField # noqa
| 50.5 | 64 | 0.834983 |
f80db87164f8973ae7a0de2f7091d5b7f62646f5 | 2,782 | py | Python | pingpong.py | rento-ghoul/pinpong | 039a7e0cf38166dad5f934c8459b4ea6b510c267 | [
"CC0-1.0"
] | null | null | null | pingpong.py | rento-ghoul/pinpong | 039a7e0cf38166dad5f934c8459b4ea6b510c267 | [
"CC0-1.0"
] | null | null | null | pingpong.py | rento-ghoul/pinpong | 039a7e0cf38166dad5f934c8459b4ea6b510c267 | [
"CC0-1.0"
] | null | null | null | from pygame import *
class GameSprite(sprite.Sprite):
#конструктор класса
def __init__(self, player_image, player_x, player_y, size_x, size_y, player_speed):
#вызываем конструктор класса (Sprite):
sprite.Sprite.__init__(self)
#каждый спрайт должен хранить свойство image - изображение... | 29.913978 | 95 | 0.610352 |
09b5abc4285320ca3db6ac384d7860a1d88f6dea | 46,297 | py | Python | sdk/python/pulumi_aws/dax/cluster.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/dax/cluster.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/dax/cluster.py | aamir-locus/pulumi-aws | 3e234b050129bde35d8e072a88bd608562f02142 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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... | 45.34476 | 157 | 0.653196 |
7ee3b3ad7f9e011fad0925e25f40547a5546cd9b | 778 | py | Python | apps/app-docs/manage.py | reyou/Ggg-Django- | 4cfea48fef28047984c22bdcf2c9a69eacd01a58 | [
"Apache-2.0"
] | null | null | null | apps/app-docs/manage.py | reyou/Ggg-Django- | 4cfea48fef28047984c22bdcf2c9a69eacd01a58 | [
"Apache-2.0"
] | null | null | null | apps/app-docs/manage.py | reyou/Ggg-Django- | 4cfea48fef28047984c22bdcf2c9a69eacd01a58 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
manage.py: A command-line utility that lets you interact with this Django project in
various ways. You can read all the details about manage.py in django-admin and manage.py.
https://docs.djangoproject.com/en/2.0/ref/django-admin/
"""
import os
import sys
if __name__ == "__main__":
os.en... | 37.047619 | 89 | 0.709512 |
95d19b7d1d23884f82fa5bf01cab5b2c5e11740d | 5,544 | py | Python | pytorch_toolkit/nncf/nncf/sparsity/base_algo.py | AnastasiaaSenina/openvino_training_extensions | 267425d64372dff5b9083dc0ca6abfc305a71449 | [
"Apache-2.0"
] | 1 | 2021-03-20T06:00:02.000Z | 2021-03-20T06:00:02.000Z | pytorch_toolkit/nncf/nncf/sparsity/base_algo.py | akshayjaryal603/openvino_training_extensions | 7d606a22143db0af97087709d63a2ec2aa02036c | [
"Apache-2.0"
] | 28 | 2020-09-25T22:40:36.000Z | 2022-03-12T00:37:36.000Z | pytorch_toolkit/nncf/nncf/sparsity/base_algo.py | akshayjaryal603/openvino_training_extensions | 7d606a22143db0af97087709d63a2ec2aa02036c | [
"Apache-2.0"
] | 1 | 2021-04-02T07:51:01.000Z | 2021-04-02T07:51:01.000Z | """
Copyright (c) 2019 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 in writin... | 41.066667 | 106 | 0.643939 |
4f45752a812300e55396f02560dbb2448b35a193 | 2,701 | py | Python | egs2/slue-voxceleb/asr1/local/f1_score.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 1 | 2022-03-25T14:41:05.000Z | 2022-03-25T14:41:05.000Z | egs2/slue-voxceleb/asr1/local/f1_score.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | 2 | 2019-04-23T04:43:33.000Z | 2019-05-13T13:06:52.000Z | egs2/slue-voxceleb/asr1/local/f1_score.py | texpomru13/espnet | 7ef005e832e2fb033f356c16f54e0f08762fb4b0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env bash
# Copyright 2021 Siddhant Arora
# 2021 Carnegie Mellon University
# Apache 2.0
import os
import re
import sys
import pandas as pd
import argparse
from sklearn.metrics import f1_score
from sklearn.metrics import classification_report
def get_classification_result(hyp_file, ref_file):... | 30.011111 | 86 | 0.749352 |
fab4309814c3a397d807bc44a2f96d6852e9318b | 22,777 | py | Python | pypolar/ellipsometry.py | gyger/pypolar | 2c212a4dbf0971003a2872db53d257a614f02ace | [
"MIT"
] | null | null | null | pypolar/ellipsometry.py | gyger/pypolar | 2c212a4dbf0971003a2872db53d257a614f02ace | [
"MIT"
] | null | null | null | pypolar/ellipsometry.py | gyger/pypolar | 2c212a4dbf0971003a2872db53d257a614f02ace | [
"MIT"
] | null | null | null | # pylint: disable=invalid-name
# pylint: disable=too-many-arguments
"""
Useful functions for ellipsometry.
Scott Prahl
Apr 2021
"""
import numpy as np
import pypolar.fresnel
__all__ = ('rho_from_m',
'rho_from_tanpsi_Delta',
'tanpsi_Delta_from_rho',
'm_from_rho',
'm_from_ta... | 33.251095 | 101 | 0.59402 |
a1f629f52c22f9df6c469121f282e055a302dffa | 3,759 | py | Python | src/gymkhana/schema.py | jahnavi1111/gymkhana_portal | 0ba38293a8a07b55a7a734003dcda706eb7515ec | [
"MIT"
] | null | null | null | src/gymkhana/schema.py | jahnavi1111/gymkhana_portal | 0ba38293a8a07b55a7a734003dcda706eb7515ec | [
"MIT"
] | null | null | null | src/gymkhana/schema.py | jahnavi1111/gymkhana_portal | 0ba38293a8a07b55a7a734003dcda706eb7515ec | [
"MIT"
] | null | null | null | import graphene
import graphql_jwt
from django.conf import settings
from graphene import relay, Connection
from graphene_django import DjangoConnectionField
from graphene_django.filter import DjangoFilterConnectionField
from graphene_django.views import GraphQLView
from graphql_social_auth import SocialAuthJWT
from pho... | 34.172727 | 110 | 0.759511 |
6889f7658176f517b357ab8025dfc441e4fce58d | 6,985 | py | Python | comments/models.py | HotStew/respa | 04f39efb15b4f4206a122e665f8377c7198e1f25 | [
"MIT"
] | 2 | 2019-05-06T09:29:51.000Z | 2019-05-06T09:30:37.000Z | comments/models.py | HotStew/respa | 04f39efb15b4f4206a122e665f8377c7198e1f25 | [
"MIT"
] | 33 | 2018-10-19T13:55:40.000Z | 2022-03-25T11:46:49.000Z | comments/models.py | HotStew/respa | 04f39efb15b4f4206a122e665f8377c7198e1f25 | [
"MIT"
] | 3 | 2019-06-03T10:52:48.000Z | 2022-02-28T08:09:49.000Z | import logging
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.contrib.gis.db import models
from django.contrib.gis.db.models import Q
from django.utils.translation import ugettext_lazy as _
from cat... | 40.143678 | 111 | 0.680458 |
5370427c049e24b0b1b0e0ce7bbf801bea316c29 | 16,603 | py | Python | python/__init__.py | adhintz/panda | e475f0053d45ce107259d1d0ef1ae98b562e7fdf | [
"MIT"
] | null | null | null | python/__init__.py | adhintz/panda | e475f0053d45ce107259d1d0ef1ae98b562e7fdf | [
"MIT"
] | null | null | null | python/__init__.py | adhintz/panda | e475f0053d45ce107259d1d0ef1ae98b562e7fdf | [
"MIT"
] | null | null | null | # python library to interface with panda
from __future__ import print_function
import binascii
import struct
import hashlib
import socket
import usb1
import os
import time
import traceback
import subprocess
from dfu import PandaDFU
from esptool import ESPROM, CesantaFlasher
from flash_release import flash_release
from ... | 29.861511 | 122 | 0.619406 |
133c37b0e498bb62b9f81de834d7ac7a09352504 | 72,428 | py | Python | Lib/test/test_exceptions.py | jeffwang0516/RustPython | 0040d4ef6d48ab5f18b689040b22e7783b1854ee | [
"CC-BY-4.0",
"MIT"
] | 2 | 2021-09-03T16:15:06.000Z | 2021-09-03T16:19:28.000Z | Lib/test/test_exceptions.py | jeffwang0516/RustPython | 0040d4ef6d48ab5f18b689040b22e7783b1854ee | [
"CC-BY-4.0",
"MIT"
] | 1 | 2021-12-19T19:41:36.000Z | 2021-12-19T19:41:36.000Z | Lib/test/test_exceptions.py | jeffwang0516/RustPython | 0040d4ef6d48ab5f18b689040b22e7783b1854ee | [
"CC-BY-4.0",
"MIT"
] | 1 | 2020-08-04T12:13:42.000Z | 2020-08-04T12:13:42.000Z | # Python test set -- part 5, built-in exceptions
import copy
import os
import sys
import unittest
import pickle
import weakref
import errno
from test.support import (captured_stderr, check_impl_detail,
cpython_only, gc_collect,
no_tracing, script_helper,
... | 37.161621 | 114 | 0.53442 |
1d6254270040361c6dac0050433e3725df6bb4e9 | 27,268 | py | Python | cogs/economy.py | terrysu64/dat-banana-bot | db616cde55a502009655998e3e7d04ad4e0bd249 | [
"MIT"
] | 65 | 2017-12-06T22:20:06.000Z | 2021-03-27T14:21:11.000Z | cogs/economy.py | terrysu64/dat-banana-bot | db616cde55a502009655998e3e7d04ad4e0bd249 | [
"MIT"
] | 39 | 2018-03-23T23:20:57.000Z | 2020-10-02T10:47:24.000Z | cogs/economy.py | terrysu64/dat-banana-bot | db616cde55a502009655998e3e7d04ad4e0bd249 | [
"MIT"
] | 41 | 2017-12-18T22:27:47.000Z | 2020-11-14T20:23:11.000Z | import discord
import sys
import os
import io
import json
import time
import ezjson
import random
import asyncio
from discord.ext import commands
from discord.ext.commands.cooldowns import BucketType
from .utils.utils import Utils
class Error(Exception):
pass
class Economy(commands.Cog):
def __init__(self, ... | 52.337812 | 231 | 0.572613 |
87ebc243977d0d413d149508b01aa9b210d17242 | 3,676 | py | Python | src/interface/screens/GUIGameOverScreen.py | NEKERAFA/Soul-Tower | d37c0bf6bcbf253ec5b2c41f802adeeca31fb384 | [
"MIT"
] | null | null | null | src/interface/screens/GUIGameOverScreen.py | NEKERAFA/Soul-Tower | d37c0bf6bcbf253ec5b2c41f802adeeca31fb384 | [
"MIT"
] | null | null | null | src/interface/screens/GUIGameOverScreen.py | NEKERAFA/Soul-Tower | d37c0bf6bcbf253ec5b2c41f802adeeca31fb384 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
from src.ResourceManager import *
from src.scenes.Stage import *
from src.interface.screens.GUIScreen import *
from src.interface.GUIImage import *
from src.interface.GUIButton import *
# -------------------------------------------------
# Clase GUIGa... | 44.289157 | 156 | 0.673014 |
98da4d29f627d9dc0839370a73807d0c9c78b20e | 21 | py | Python | src/test/resources/rocks/juergen/maven/jythonplugin/context.py | edelbluth/jython-maven-plugin | 2d6780343871e2f4da539366f42d0a86ebc8fc84 | [
"Apache-2.0"
] | 2 | 2020-03-26T17:12:54.000Z | 2021-03-17T14:15:59.000Z | src/test/resources/rocks/juergen/maven/jythonplugin/context.py | juergen-rocks/jython-maven-plugin | 2d6780343871e2f4da539366f42d0a86ebc8fc84 | [
"Apache-2.0"
] | 18 | 2016-10-09T18:12:36.000Z | 2020-03-26T17:19:46.000Z | src/test/resources/rocks/juergen/maven/jythonplugin/context.py | edelbluth/jython-maven-plugin | 2d6780343871e2f4da539366f42d0a86ebc8fc84 | [
"Apache-2.0"
] | 3 | 2016-10-09T10:23:52.000Z | 2018-11-08T09:05:57.000Z | print set_by_context
| 10.5 | 20 | 0.904762 |
caec2caf255768e23bad8f9f8474cb408cbb2967 | 59,676 | py | Python | python/ccxt/async_support/theocean.py | Bhanditz/ccxt | 5b38d79a315ca9ce70cc7c659033caa831c27fc6 | [
"MIT"
] | 1 | 2019-01-30T21:51:35.000Z | 2019-01-30T21:51:35.000Z | python/ccxt/async_support/theocean.py | Bhanditz/ccxt | 5b38d79a315ca9ce70cc7c659033caa831c27fc6 | [
"MIT"
] | null | null | null | python/ccxt/async_support/theocean.py | Bhanditz/ccxt | 5b38d79a315ca9ce70cc7c659033caa831c27fc6 | [
"MIT"
] | 2 | 2019-03-31T00:03:07.000Z | 2019-04-08T21:27:44.000Z | # -*- 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.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... | 49.813022 | 742 | 0.540653 |
9515e9e91762f8a5dd435b59d26646b220a26c1b | 2,380 | py | Python | migrations/tests/test_0018_remove_template_meeting_committee_relation.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | null | null | null | migrations/tests/test_0018_remove_template_meeting_committee_relation.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | null | null | null | migrations/tests/test_0018_remove_template_meeting_committee_relation.py | MJJojo97/openslides-backend | af0d1edb0070e352d46f285a1ba0bbe3702d49ae | [
"MIT"
] | null | null | null | def test_migration(write, finalize, assert_model):
write(
{
"type": "create",
"fqid": "meeting/1",
"fields": {"a": 1, "template_for_committee_id": 1},
}
)
write(
{
"type": "update",
"fqid": "meeting/1",
"fields":... | 25.869565 | 63 | 0.464706 |
e18ee922a142ba43bdeb39be07e7c4b4a51f7b97 | 635 | py | Python | scem/data_utils/log.py | noukoudashisoup/score-EM | c3e9d4eebf45273e55cdcdcdc6b58c558fff1b6f | [
"MIT"
] | 3 | 2021-12-01T17:11:16.000Z | 2022-02-02T21:44:02.000Z | scem/data_utils/log.py | noukoudashisoup/score-EM | c3e9d4eebf45273e55cdcdcdc6b58c558fff1b6f | [
"MIT"
] | null | null | null | scem/data_utils/log.py | noukoudashisoup/score-EM | c3e9d4eebf45273e55cdcdcdc6b58c558fff1b6f | [
"MIT"
] | null | null | null | import logging
class Log(object):
level_set = False
@staticmethod
def set_loglevel(loglevel):
Log.get_logger().setLevel(loglevel)
Log.get_logger().info("Set loglevel to %d" % loglevel)
@staticmethod
def get_logger():
return logging.getLogger("nystrom-kexpfam")
i... | 27.608696 | 100 | 0.640945 |
3afb443758f0401f2c9885aef6efe09c36a2270f | 2,527 | py | Python | ooobuild/dyn/chart/chart_axis_marks.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/chart/chart_axis_marks.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/chart/chart_axis_marks.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 37.716418 | 123 | 0.701622 |
cc2147bbecb015caa37510f2b5df13123e1e922d | 1,156 | py | Python | utils/get_logger.py | X-DDDDD/Competition_3v3snakes | 22b35f6e20b77e8710d8a8593a26fd48a940d7e6 | [
"MIT"
] | 38 | 2021-08-04T08:39:00.000Z | 2021-12-21T02:11:55.000Z | utils/get_logger.py | X-DDDDD/Competition_3v3snakes | 22b35f6e20b77e8710d8a8593a26fd48a940d7e6 | [
"MIT"
] | 3 | 2021-08-13T06:40:34.000Z | 2021-12-21T03:41:23.000Z | utils/get_logger.py | X-DDDDD/Competition_3v3snakes | 22b35f6e20b77e8710d8a8593a26fd48a940d7e6 | [
"MIT"
] | 28 | 2021-02-26T12:52:31.000Z | 2021-12-25T14:41:42.000Z | # -*- coding:utf-8 -*-
import logging
import time
import os
def get_logger(log_path, name, save_file=False, console_out=False, json_file=False):
if not os.path.exists(log_path):
os.mkdir(log_path)
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# 每分钟建一个文件
rq = time.strftime('%... | 30.421053 | 84 | 0.645329 |
4d28735efb92f72a99f050911b92321954f50d8f | 543 | py | Python | 7-python-mongodb/g03-pymongo-InsertDocument02.py | luis2ra/py3-00-w3schools | 6bb851837f8ef9520491d13fa2c909047c9b18cf | [
"MIT"
] | null | null | null | 7-python-mongodb/g03-pymongo-InsertDocument02.py | luis2ra/py3-00-w3schools | 6bb851837f8ef9520491d13fa2c909047c9b18cf | [
"MIT"
] | null | null | null | 7-python-mongodb/g03-pymongo-InsertDocument02.py | luis2ra/py3-00-w3schools | 6bb851837f8ef9520491d13fa2c909047c9b18cf | [
"MIT"
] | null | null | null | '''
Python MongoDB Insert Document
A document in MongoDB is the same as a record in SQL databases.
Return the _id Field
The insert_one() method returns a InsertOneResult object, which has a property, inserted_id, that holds the id of the inserted document.
'''
import pymongo
myclient = pymongo.MongoClient('mongod... | 21.72 | 136 | 0.74954 |
f693e87504aa74b384c49b3676b6ac25c92af811 | 2,165 | py | Python | leetcode/1026.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | leetcode/1026.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | leetcode/1026.py | GihwanKim/Baekjoon | 52eb2bf80bb1243697858445e5b5e2d50d78be4e | [
"MIT"
] | null | null | null | """
File: 1026.py
Title: Maximum Difference Between Node and Ancestor
Difficulty: Medium
URL: https://leetcode.com/problems/maximum-difference-between-node-and-ancestor/
"""
import unittest
class TreeNode:
def __init__(self,
val: int = 0,
left: "TreeNode" = None,... | 30.069444 | 84 | 0.466051 |
9ab9194f7830c8b7c3c61a1015a09f4c2e92a44f | 20,541 | py | Python | ironic/api/controllers/v1/port.py | ericxiett/ironic-customized | 3a2ad13969e1497889a0c3be80f9f5f671ff4d1b | [
"Apache-2.0"
] | null | null | null | ironic/api/controllers/v1/port.py | ericxiett/ironic-customized | 3a2ad13969e1497889a0c3be80f9f5f671ff4d1b | [
"Apache-2.0"
] | null | null | null | ironic/api/controllers/v1/port.py | ericxiett/ironic-customized | 3a2ad13969e1497889a0c3be80f9f5f671ff4d1b | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 UnitedStack 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... | 40.675248 | 79 | 0.602697 |
1ec73019829dddaad3fbef4cc511fb06bec98c23 | 13,430 | py | Python | spikemetrics/utils.py | jsiegle/spikemetrics | 03ebc908f19b99e35732e192e9a9be816ce71169 | [
"MIT"
] | null | null | null | spikemetrics/utils.py | jsiegle/spikemetrics | 03ebc908f19b99e35732e192e9a9be816ce71169 | [
"MIT"
] | null | null | null | spikemetrics/utils.py | jsiegle/spikemetrics | 03ebc908f19b99e35732e192e9a9be816ce71169 | [
"MIT"
] | null | null | null | # Copyright © 2019. Allen Institute. All rights reserved.
import pandas as pd
import os
import numpy as np
import json
import glob
import sys
import time
# Copyright © 2019. Allen Institute. All rights reserved.
# import h5py as h5
import numpy as np
class Epoch:
"""
Represents a data epoch with a start ... | 28.333333 | 161 | 0.631348 |
5926438c744be22fe53aeca576cf9dea279bc3f1 | 5,218 | py | Python | yatube/posts/tests/test_urls.py | lukart80/yatube | 24b9230c6da6b581ec4e01ff5db369db317abd4c | [
"MIT"
] | null | null | null | yatube/posts/tests/test_urls.py | lukart80/yatube | 24b9230c6da6b581ec4e01ff5db369db317abd4c | [
"MIT"
] | null | null | null | yatube/posts/tests/test_urls.py | lukart80/yatube | 24b9230c6da6b581ec4e01ff5db369db317abd4c | [
"MIT"
] | null | null | null | from http import HTTPStatus
from django.core.cache import cache
from django.test import Client, TestCase
from ..models import Group, Post, User
class PostUrlsTest(TestCase):
HOMEPAGE_URL = '/'
CREATE_POST_URL = '/new/'
CREATE_POST_REDIRECT_URL = '/auth/login/?next=/new/'
BAD_URL = '/afaf/afaf/afaf/... | 38.651852 | 77 | 0.632426 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.