hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797295ef7e4abffcf08678dd25a3bcd7254b326e | 3,486 | py | Python | bindings/python/ensmallen/datasets/string/paenibacillusswuensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/paenibacillusswuensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/paenibacillusswuensis.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Paenibacillus swuensis.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein... | 33.2 | 223 | 0.679002 |
7972961cc099c5d3d52b2adba74a8d004e3ecdef | 136 | py | Python | ui-testing/licenses/wordcount2.py | sara-nl/data-exchange | 52b9c2554a52b56686f3a06f583a7a6454bf6df6 | [
"Apache-2.0"
] | 4 | 2020-12-03T14:13:29.000Z | 2021-04-19T03:03:19.000Z | ui-testing/licenses/wordcount2.py | sara-nl/data-exchange | 52b9c2554a52b56686f3a06f583a7a6454bf6df6 | [
"Apache-2.0"
] | null | null | null | ui-testing/licenses/wordcount2.py | sara-nl/data-exchange | 52b9c2554a52b56686f3a06f583a7a6454bf6df6 | [
"Apache-2.0"
] | null | null | null | import sys
file = open(sys.argv[1], "rt")
data = file.read()
words = data.split()
print('Number of words in text file :', len(words))
| 17 | 51 | 0.654412 |
797297ba93ce364b83014df79004a192f1bb775d | 10,834 | py | Python | jasmin/vendor/smpp/pdu/operations.py | pyghassen/jasmin | d6bf0b40bb72e406bcb0dd3a56064a28efd7c6b3 | [
"Apache-2.0"
] | null | null | null | jasmin/vendor/smpp/pdu/operations.py | pyghassen/jasmin | d6bf0b40bb72e406bcb0dd3a56064a28efd7c6b3 | [
"Apache-2.0"
] | null | null | null | jasmin/vendor/smpp/pdu/operations.py | pyghassen/jasmin | d6bf0b40bb72e406bcb0dd3a56064a28efd7c6b3 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2009-2010 Mozes, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 26.360097 | 100 | 0.624146 |
7972992cb2c46defb5857a3a3cc90f27a6684b3e | 1,923 | py | Python | orator/commands/seeds/seed_command.py | vimox-shah/orator-repo-0.9v | 002d7a0d9bcce17e5da39c3f4675d0a1a8286280 | [
"MIT"
] | null | null | null | orator/commands/seeds/seed_command.py | vimox-shah/orator-repo-0.9v | 002d7a0d9bcce17e5da39c3f4675d0a1a8286280 | [
"MIT"
] | null | null | null | orator/commands/seeds/seed_command.py | vimox-shah/orator-repo-0.9v | 002d7a0d9bcce17e5da39c3f4675d0a1a8286280 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import importlib
import inflection
import os
from cleo import InputOption
from orator import DatabaseManager
from .base_command import BaseCommand
from ...utils import load_module
class SeedCommand(BaseCommand):
"""
Seed the database with records.
db:seed
{--d|database= :... | 24.974026 | 80 | 0.589704 |
7972993feb52c2e6175cb3bdb91762dc19877655 | 9,956 | py | Python | model_zoo/official/cv/resnext50/eval.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | model_zoo/official/cv/resnext50/eval.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | null | null | null | model_zoo/official/cv/resnext50/eval.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 39.507937 | 117 | 0.629369 |
79729a2cb4fa04d0d312b0250103cbf8205a5287 | 794 | py | Python | example/gharchive/crawler.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 13 | 2020-01-04T07:37:38.000Z | 2021-08-31T05:19:58.000Z | example/gharchive/crawler.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 3 | 2020-06-05T22:42:53.000Z | 2020-08-24T07:18:54.000Z | example/gharchive/crawler.py | gottaegbert/penter | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | [
"MIT"
] | 9 | 2020-10-19T04:53:06.000Z | 2021-08-31T05:20:01.000Z | from github_manager import GithubManager
from repo_query_params import RepoQueryParams, RepoQueryParamsEnum, RepoSortParamsEnum, RepoQueryParamsOperator
class Crawler:
def __init__(self):
self._github_mgr = GithubManager()
def get_rate_limit(self):
rate_limit = self._github_mgr.get_rate_limit(... | 39.7 | 111 | 0.75063 |
79729be0ac08a11e1b7a8d43fd9d4490aeeb7fc5 | 52,928 | py | Python | test/ee2_SDKMethodRunner_test.py | scanon/execution_engine2 | ce98b69f44fbd5353cf92cdc413080c8262a188e | [
"MIT"
] | null | null | null | test/ee2_SDKMethodRunner_test.py | scanon/execution_engine2 | ce98b69f44fbd5353cf92cdc413080c8262a188e | [
"MIT"
] | null | null | null | test/ee2_SDKMethodRunner_test.py | scanon/execution_engine2 | ce98b69f44fbd5353cf92cdc413080c8262a188e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import copy
import json
import logging
import os
import time
import unittest
import dateutil
import requests
import requests_mock
from bson import ObjectId
from configparser import ConfigParser
from datetime import datetime, timedelta
from mock import MagicMock
from mongoengine import Validatio... | 39.061255 | 129 | 0.584983 |
79729c371574b75a6826b700694b7c0add90ce03 | 452 | py | Python | constants.py | AnnaSizykh/2021-2-level-ctlr | fc3eb4f4033c73e4670ce8bb901cb71a7eccb90a | [
"MIT"
] | null | null | null | constants.py | AnnaSizykh/2021-2-level-ctlr | fc3eb4f4033c73e4670ce8bb901cb71a7eccb90a | [
"MIT"
] | null | null | null | constants.py | AnnaSizykh/2021-2-level-ctlr | fc3eb4f4033c73e4670ce8bb901cb71a7eccb90a | [
"MIT"
] | null | null | null | """
Useful constant variables
"""
from pathlib import Path
PROJECT_ROOT = Path(__file__).parent
ASSETS_PATH = PROJECT_ROOT / 'tmp' / 'articles'
CRAWLER_CONFIG_PATH = PROJECT_ROOT / 'scrapper_config.json'
ROOT_URL = 'https://periodical.pstgu.ru'
HEADERS = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Apple... | 34.769231 | 107 | 0.696903 |
79729cce1455b491f2279d944ee423c3158204fb | 216 | py | Python | murder-server/python-server/murder_exception.py | Half-Shot/murder | 4d1c0e174b48847015981b2c0ac1f1b7f9dd3677 | [
"MIT"
] | 2 | 2017-01-08T17:08:24.000Z | 2021-07-17T20:45:27.000Z | murder-server/python-server/murder_exception.py | Half-Shot/murder | 4d1c0e174b48847015981b2c0ac1f1b7f9dd3677 | [
"MIT"
] | null | null | null | murder-server/python-server/murder_exception.py | Half-Shot/murder | 4d1c0e174b48847015981b2c0ac1f1b7f9dd3677 | [
"MIT"
] | null | null | null | class MurderError(Exception):
def __init__(self, error):
super(MurderError, self).__init__(
"{}: {}".format(
error.error,
error.details
)
)
| 24 | 42 | 0.467593 |
79729d0edc3f7d80ee0114e20decbac84f4f0923 | 4,544 | py | Python | sphinx/__init__.py | proatria/sftpplus-docs | 6676e79a10cb1016faa2f823d6179d58b2b8b179 | [
"Apache-2.0"
] | null | null | null | sphinx/__init__.py | proatria/sftpplus-docs | 6676e79a10cb1016faa2f823d6179d58b2b8b179 | [
"Apache-2.0"
] | 2 | 2021-11-15T20:01:20.000Z | 2021-11-18T10:28:00.000Z | sphinx/__init__.py | proatria/sftpplus-docs | 6676e79a10cb1016faa2f823d6179d58b2b8b179 | [
"Apache-2.0"
] | 1 | 2019-10-29T18:44:06.000Z | 2019-10-29T18:44:06.000Z | # Copyright (c) 2021 Adi Roiban.
# See LICENSE for details.
"""
Helpers to create the documentation pages.
"""
from sftpplus_website import MODULE_PATH
from brink.pavement_commons import pave
def _create_html(arguments=None, source=None, target=None):
"""
Execute the command for building the documentation in ... | 27.539394 | 81 | 0.644586 |
79729d1b99d9414b77e623a49007676cfc8632f8 | 9,264 | py | Python | clamav.py | NavigatingCancer/bucket-antivirus-function | 9a1d023b45dc1a365d3243ed86ddff86df02d3af | [
"Apache-2.0"
] | null | null | null | clamav.py | NavigatingCancer/bucket-antivirus-function | 9a1d023b45dc1a365d3243ed86ddff86df02d3af | [
"Apache-2.0"
] | 1 | 2022-03-02T21:20:10.000Z | 2022-03-15T15:57:02.000Z | clamav.py | NavigatingCancer/bucket-antivirus-function | 9a1d023b45dc1a365d3243ed86ddff86df02d3af | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Upside Travel, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 37.204819 | 165 | 0.602224 |
79729efa2da316a6827abdfeeebb805a9c1e7d38 | 2,922 | py | Python | ghgi/trigram.py | ghgindex/gh | f47bfbc4f2b0b2ecceff946caa37b370cf526cf6 | [
"CC0-1.0"
] | null | null | null | ghgi/trigram.py | ghgindex/gh | f47bfbc4f2b0b2ecceff946caa37b370cf526cf6 | [
"CC0-1.0"
] | 4 | 2021-09-26T18:59:35.000Z | 2021-10-01T21:35:18.000Z | ghgi/trigram.py | ghgindex/ghgi | f47bfbc4f2b0b2ecceff946caa37b370cf526cf6 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
import json
import collections
from .datasets import MASTER_TRIGRAM_INDEX, MASTER_AKA_INDEX
class Trigram:
# TODO: make these dicts of lazily loaded sub-indexes keyed by locales
_product_index = {}
_aka_index = {}
@classmethod
def drop_indexes(cls):
cls._product_index... | 34.376471 | 74 | 0.614305 |
79729f2e01e06865e32ee909a474e79b77612570 | 603 | py | Python | daskfunk/utils.py | Savvysherpa/dask-funk | 1dec6f6c2d173e19c13ae6c36ca1ff8b31b9b616 | [
"MIT"
] | 9 | 2017-03-04T22:34:27.000Z | 2019-12-23T18:34:35.000Z | daskfunk/utils.py | Savvysherpa/dask-funk | 1dec6f6c2d173e19c13ae6c36ca1ff8b31b9b616 | [
"MIT"
] | null | null | null | daskfunk/utils.py | Savvysherpa/dask-funk | 1dec6f6c2d173e19c13ae6c36ca1ff8b31b9b616 | [
"MIT"
] | null | null | null | from toolz import curry, identity
# TODO: look into why pytest is not running this docstring after decoration (__doc__ is present!)
@curry
def select_keys(d, keys):
"""
>>> d = {'foo': 52, 'bar': 12, 'baz': 98}
>>> select_keys(d, ['foo'])
{'foo': 52}
"""
return {k:d[k] for k in keys}
@curry
... | 20.793103 | 97 | 0.560531 |
7972a03cfc8b69fd219fe82e1603338eb551606e | 1,958 | py | Python | Flask-Base Backend Server/methods/board.py | BranKein/AIFB_GIST_WING_2020 | ea71eb58c3dd65f9ec89f8a5140c2c20af6aeadb | [
"MIT"
] | null | null | null | Flask-Base Backend Server/methods/board.py | BranKein/AIFB_GIST_WING_2020 | ea71eb58c3dd65f9ec89f8a5140c2c20af6aeadb | [
"MIT"
] | null | null | null | Flask-Base Backend Server/methods/board.py | BranKein/AIFB_GIST_WING_2020 | ea71eb58c3dd65f9ec89f8a5140c2c20af6aeadb | [
"MIT"
] | null | null | null | from connector import MySQL
from constants import messages
def if_board_exist(board_string: str):
sql = MySQL()
result = sql.query('SELECT COUNT(*) FROM board WHERE description=%s', (board_string,))
if result[0][0] == 0:
return False
return True
def add_board(board_string: str):
sql =... | 27.577465 | 108 | 0.665475 |
7972a06a5814463d15f6637ef1964c2ff39891b6 | 7,978 | py | Python | mmcv/runner/epoch_based_runner.py | xiangruhuang/mmcv | 30aa22c6dd9d53822c5a72231021f33b1ab4b633 | [
"Apache-2.0"
] | null | null | null | mmcv/runner/epoch_based_runner.py | xiangruhuang/mmcv | 30aa22c6dd9d53822c5a72231021f33b1ab4b633 | [
"Apache-2.0"
] | null | null | null | mmcv/runner/epoch_based_runner.py | xiangruhuang/mmcv | 30aa22c6dd9d53822c5a72231021f33b1ab4b633 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Open-MMLab. All rights reserved.
import os.path as osp
import platform
import shutil
import time
import warnings
import torch
import mmcv
from .base_runner import BaseRunner
from .builder import RUNNERS
from .checkpoint import save_checkpoint
from .utils import get_host_info
@RUNNERS.register_module(... | 40.090452 | 83 | 0.576962 |
7972a0a439cb2e0b09c3c9e3489021dc8bf51a39 | 9,331 | py | Python | MLGame/mlgame/communication.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | MLGame/mlgame/communication.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | MLGame/mlgame/communication.py | Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING | f4a58d0d9f5832a77a4a86352e084065dc7bae50 | [
"MIT"
] | null | null | null | from threading import Thread
from queue import Queue
from .exceptions import MLProcessError
class CommunicationSet:
"""
A data class for storing a set of communication objects and
providing an interface for accessing these objects
Communication objects used for receiving objects must provide `recv()`... | 32.625874 | 90 | 0.6278 |
7972a1f49a93648090c51e1a0abcf7a069ab7884 | 837 | py | Python | scanner/analyze.py | kotnik/scanner | a4c0f7e15a48291df89b1a409ba20ec032c8e9ed | [
"MIT"
] | 1 | 2017-09-27T09:02:58.000Z | 2017-09-27T09:02:58.000Z | scanner/analyze.py | kotnik/scanner | a4c0f7e15a48291df89b1a409ba20ec032c8e9ed | [
"MIT"
] | null | null | null | scanner/analyze.py | kotnik/scanner | a4c0f7e15a48291df89b1a409ba20ec032c8e9ed | [
"MIT"
] | null | null | null |
def do_analyze(hosts, host_info):
failures = {}
for host, data in host_info.iteritems():
for vuln, result in data.iteritems():
if vuln == "ssl checked":
continue
if not result:
continue
if vuln == "POODLE":
if data.get... | 33.48 | 90 | 0.517324 |
7972a39717fd802dc83f8e0f99c13b488643746f | 9,204 | py | Python | tests/unit/services/image/test_glance_v2.py | RSE-Cambridge/rally-openstack | 32bbc091bbce1db625a2fc22da28b32718befa13 | [
"Apache-2.0"
] | null | null | null | tests/unit/services/image/test_glance_v2.py | RSE-Cambridge/rally-openstack | 32bbc091bbce1db625a2fc22da28b32718befa13 | [
"Apache-2.0"
] | null | null | null | tests/unit/services/image/test_glance_v2.py | RSE-Cambridge/rally-openstack | 32bbc091bbce1db625a2fc22da28b32718befa13 | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in... | 40.19214 | 78 | 0.602347 |
7972a4000567b86a29e183dd200af8f71a29d9d3 | 2,577 | py | Python | tools/external_converter_v2/parser/graph.py | wgy0804/Anakin | b5035857e94c180c171fc0ad7bd0fc5b4e8b6c36 | [
"Apache-2.0"
] | 2 | 2019-12-27T01:16:00.000Z | 2021-05-14T08:12:14.000Z | tools/external_converter_v2/parser/graph.py | wgy0804/Anakin | b5035857e94c180c171fc0ad7bd0fc5b4e8b6c36 | [
"Apache-2.0"
] | null | null | null | tools/external_converter_v2/parser/graph.py | wgy0804/Anakin | b5035857e94c180c171fc0ad7bd0fc5b4e8b6c36 | [
"Apache-2.0"
] | 1 | 2021-02-13T07:51:41.000Z | 2021-02-13T07:51:41.000Z | #! /usr/bin/env python
# Copyright (c) 2017, Cuichaowen. All rights reserved.
# -*- coding: utf-8 -*-
from utils import *
from proto import *
from kill_caffe import *
from logger import *
from frontend import RunServerOnGraph
class Graph(object):
"""
Local abstract Graph architecture, it holds the real class... | 25.514851 | 94 | 0.563058 |
7972a5377d40edd9f65a9511a687fc855bdf1e12 | 984 | py | Python | test/test_add_contact.py | ak32pvi/python_training | c4e0a1b8810b1d3f59364ff87b511418c6b7342c | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | ak32pvi/python_training | c4e0a1b8810b1d3f59364ff87b511418c6b7342c | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | ak32pvi/python_training | c4e0a1b8810b1d3f59364ff87b511418c6b7342c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.contact import Contact
def test_add_contact(app, db, check_ui, json_contacts):
contact = json_contacts
old_contacts = db.get_contact_list()
app.contact.create(contact)
new_contacts = db.get_contact_list()
old_contacts.append(contact)
assert sorted(old_contact... | 37.846154 | 123 | 0.732724 |
7972a548e171cb9e546bab8f6b128bccb0d0bdf3 | 18,170 | py | Python | submission/generate_results.py | realdealneil/realdealrobotics_vision | e4ef37452ac377c2d56366bf2525ee8549399108 | [
"BSD-3-Clause"
] | null | null | null | submission/generate_results.py | realdealneil/realdealrobotics_vision | e4ef37452ac377c2d56366bf2525ee8549399108 | [
"BSD-3-Clause"
] | null | null | null | submission/generate_results.py | realdealneil/realdealrobotics_vision | e4ef37452ac377c2d56366bf2525ee8549399108 | [
"BSD-3-Clause"
] | null | null | null | # This script is to be filled by the team members.
# Import necessary libraries
# Load libraries
import json
import cv2
import numpy as np
# Implement a function that takes an image as an input, performs any
# preprocessing steps and outputs a list of bounding box detections and
# associated confidence score.
cl... | 42.552693 | 148 | 0.446395 |
7972a626931ab1a5b55a314842c56fa7dcbca35e | 2,380 | py | Python | shared/management/commands/import_indiv.py | noahbkim/finances | 98e2d0cf1bcabcc9785177d36c581e6d3f7caba7 | [
"BSD-3-Clause"
] | null | null | null | shared/management/commands/import_indiv.py | noahbkim/finances | 98e2d0cf1bcabcc9785177d36c581e6d3f7caba7 | [
"BSD-3-Clause"
] | null | null | null | shared/management/commands/import_indiv.py | noahbkim/finances | 98e2d0cf1bcabcc9785177d36c581e6d3f7caba7 | [
"BSD-3-Clause"
] | 1 | 2019-02-14T08:09:46.000Z | 2019-02-14T08:09:46.000Z | import csv
import zipfile
import os
from re import fullmatch
import codecs
from shared.models import IndivCandDonation, Candidate
from django.core.management.base import BaseCommand, CommandError
names = "committee_id, amendment_ind, report_type, transaction_pgi, image_num, transaction_type, entity_type, name, city, s... | 46.666667 | 264 | 0.518067 |
7972a650cdb52479742ba4f74fa229b2f90ecde3 | 702 | py | Python | afs2datasource/__init__.py | stacy0416/afs2-datasource | 25d498fc56eb142f2e97ea2d274d534245a4c301 | [
"Apache-2.0"
] | 4 | 2019-07-19T05:40:37.000Z | 2021-03-31T05:49:30.000Z | afs2datasource/__init__.py | stacy0416/afs2-datasource | 25d498fc56eb142f2e97ea2d274d534245a4c301 | [
"Apache-2.0"
] | 1 | 2019-08-13T18:27:40.000Z | 2019-08-13T18:27:40.000Z | afs2datasource/__init__.py | stacy0416/afs2-datasource | 25d498fc56eb142f2e97ea2d274d534245a4c301 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 WISE-PaaS/AFS
# 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 re... | 41.294118 | 79 | 0.716524 |
7972a6d6eb8042717b9e614aa608437617e09416 | 775 | py | Python | app/core/admin.py | AradhyaGupta/recepie-app-api | 439431fe1180c16c084bbf81bfe27d4eeb7fe800 | [
"MIT"
] | null | null | null | app/core/admin.py | AradhyaGupta/recepie-app-api | 439431fe1180c16c084bbf81bfe27d4eeb7fe800 | [
"MIT"
] | null | null | null | app/core/admin.py | AradhyaGupta/recepie-app-api | 439431fe1180c16c084bbf81bfe27d4eeb7fe800 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from core import models
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(None, {'fields': ('email', '... | 25.833333 | 65 | 0.554839 |
7972a8305a6bce7441cd7834ca7a5825e209d7e9 | 669 | py | Python | src/migrations/0008_auto_20210720_1050.py | AgnosticMe/swiftly | 1fc5fed6e90b8cbdcb6038303537aa0f82ae70d7 | [
"MIT"
] | null | null | null | src/migrations/0008_auto_20210720_1050.py | AgnosticMe/swiftly | 1fc5fed6e90b8cbdcb6038303537aa0f82ae70d7 | [
"MIT"
] | null | null | null | src/migrations/0008_auto_20210720_1050.py | AgnosticMe/swiftly | 1fc5fed6e90b8cbdcb6038303537aa0f82ae70d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-20 05:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('src', '0007_auto_20210718_1819'),
]
operations = [
migrations.AddField(
model_name='job',
name='distance',
... | 23.068966 | 49 | 0.544096 |
7972a842415a098864571a18ec69a2827a473422 | 1,606 | py | Python | ml/repository/__init__.py | HazardDede/machine-learning | e0044bf381b90c313cc58b05990439b473acf16a | [
"MIT"
] | null | null | null | ml/repository/__init__.py | HazardDede/machine-learning | e0044bf381b90c313cc58b05990439b473acf16a | [
"MIT"
] | null | null | null | ml/repository/__init__.py | HazardDede/machine-learning | e0044bf381b90c313cc58b05990439b473acf16a | [
"MIT"
] | null | null | null | """Provides repositories for various tasks such a retrieving and storing datasets."""
from typing import Any
import attr
import pandas as pd
@attr.s
class Sets:
# Dataset constants
BBC_NEWS = 'text/bbc-news'
IRIS = 'iris'
CATS_VS_DOGS = 'catsvsdogs'
@attr.s
class Dataset:
data = attr.ib(type=pd... | 26.766667 | 85 | 0.679328 |
7972a85ee572c37373f63b887f25b10ea1afd7dd | 796 | py | Python | sacrerouge/tests/datasets/multiling/multiling2013/sds_test.py | danieldeutsch/decomposed-rouge | 0d723be8e3359f0bdcc9c7940336800895e46dbb | [
"Apache-2.0"
] | 81 | 2020-07-10T15:45:08.000Z | 2022-03-30T12:19:11.000Z | sacrerouge/tests/datasets/multiling/multiling2013/sds_test.py | danieldeutsch/decomposed-rouge | 0d723be8e3359f0bdcc9c7940336800895e46dbb | [
"Apache-2.0"
] | 29 | 2020-08-03T21:50:45.000Z | 2022-02-23T14:34:16.000Z | sacrerouge/tests/datasets/multiling/multiling2013/sds_test.py | danieldeutsch/decomposed-rouge | 0d723be8e3359f0bdcc9c7940336800895e46dbb | [
"Apache-2.0"
] | 7 | 2020-08-14T09:54:08.000Z | 2022-03-30T12:19:25.000Z | import os
import pytest
import unittest
from glob import glob
from sacrerouge.io import JsonlReader
_sds_dir = 'datasets/multiling/multiling2013/sds'
@pytest.mark.skipif(not os.path.exists(_sds_dir), reason='MultiLing 2013 SDS data does not exist')
class TestMultiLing2013SDS(unittest.TestCase):
def test_sanity_... | 34.608696 | 98 | 0.679648 |
7972a86ff43d6b4a42f58c63b0eee3ab07e3f612 | 13,144 | py | Python | swagger_client/rest.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | swagger_client/rest.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | swagger_client/rest.py | ike709/tgs4-api-pyclient | 97918cfe614cc4ef06ef2485efff163417a8cd44 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
TGS API
A production scale tool for BYOND server management # noqa: E501
OpenAPI spec version: 9.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
import json
import logging
import re
import ssl
impor... | 40.693498 | 134 | 0.540399 |
7972a9ecda08ce838f6938ae6243b43a7824dcaf | 180 | py | Python | colin-api/colin_api/models/__init__.py | bcgov/FWBEN | d155b11b16b9f3d454d5887cddf13d276d8aebdd | [
"Apache-2.0"
] | 1 | 2019-08-17T03:11:12.000Z | 2019-08-17T03:11:12.000Z | colin-api/colin_api/models/__init__.py | bcgov/FWBEN | d155b11b16b9f3d454d5887cddf13d276d8aebdd | [
"Apache-2.0"
] | 206 | 2019-08-09T18:30:53.000Z | 2022-02-27T21:28:50.000Z | colin-api/colin_api/models/__init__.py | bcgov/FWBEN | d155b11b16b9f3d454d5887cddf13d276d8aebdd | [
"Apache-2.0"
] | null | null | null | """Model imports."""
from .address import Address
from .business import Business
from .director import Director
from .office import Office
from .filing import Filing # noqa: I001
| 25.714286 | 40 | 0.777778 |
7972aa61547b453e37096a88b2584500001ccbad | 66 | py | Python | Course/Data structures and algorithms/2.Data structures/2.2.Stacks and Queues/1.Stacks.py | IulianOctavianPreda/Udacity | 4349f4c12c838bcf3e53409f943ca8aacd58c94b | [
"MIT"
] | null | null | null | Course/Data structures and algorithms/2.Data structures/2.2.Stacks and Queues/1.Stacks.py | IulianOctavianPreda/Udacity | 4349f4c12c838bcf3e53409f943ca8aacd58c94b | [
"MIT"
] | null | null | null | Course/Data structures and algorithms/2.Data structures/2.2.Stacks and Queues/1.Stacks.py | IulianOctavianPreda/Udacity | 4349f4c12c838bcf3e53409f943ca8aacd58c94b | [
"MIT"
] | null | null | null | '''
https://youtu.be/DQoCO8aGcNc
https://youtu.be/HpaVHzDeZC4
'''
| 13.2 | 28 | 0.69697 |
7972aab10feba30f35f769b98f137f2b9a50ab07 | 63,238 | py | Python | src/genie/libs/parser/iosxe/tests/ShowSdwanAppRouteStatistics/cli/equal/app_route_lc_stats_golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowSdwanAppRouteStatistics/cli/equal/app_route_lc_stats_golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowSdwanAppRouteStatistics/cli/equal/app_route_lc_stats_golden_output_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | null | null | null | expected_output = {
"approute":{
"151.0.5.1":{
"150.0.0.1":{
"protocol":"ipsec",
"src_port":12346,
"dst_port":12346,
"remote_system_ip":"20.0.0.20",
"local_color":"silver",
"remote_color":"bronze",
... | 44.253324 | 54 | 0.259164 |
7972aab44c9840a288ff9de733df72b522c91986 | 165 | py | Python | tonyawong/about/models.py | a-tsen/hpq-django-project | 6e05721bdba90eb7729c315d7ea68bb86731c3b9 | [
"Unlicense"
] | null | null | null | tonyawong/about/models.py | a-tsen/hpq-django-project | 6e05721bdba90eb7729c315d7ea68bb86731c3b9 | [
"Unlicense"
] | null | null | null | tonyawong/about/models.py | a-tsen/hpq-django-project | 6e05721bdba90eb7729c315d7ea68bb86731c3b9 | [
"Unlicense"
] | null | null | null | from django.db import models
class About(models.Model):
paragraph = models.TextField(max_length=1500)
def __str__(self):
return "About paragraph"
| 18.333333 | 49 | 0.709091 |
7972ac07af1621046bd846de8a799aa492ae9d44 | 5,580 | py | Python | doc/conf.py | glotzerlab/rowan | c17147859432d3dc2b023e086632afa8f447f190 | [
"BSD-3-Clause"
] | 11 | 2019-02-09T14:49:56.000Z | 2020-11-29T04:57:57.000Z | doc/conf.py | glotzerlab/rowan | c17147859432d3dc2b023e086632afa8f447f190 | [
"BSD-3-Clause"
] | 11 | 2019-03-05T15:39:36.000Z | 2020-06-25T11:32:56.000Z | doc/conf.py | glotzerlab/rowan | c17147859432d3dc2b023e086632afa8f447f190 | [
"BSD-3-Clause"
] | 6 | 2019-02-12T21:35:06.000Z | 2021-11-10T15:51:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# rowan documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 26 21:45:57 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# auto... | 29.52381 | 79 | 0.679032 |
7972ae4885b29f51bd5f13acdb210ce2d004c6e3 | 403 | py | Python | drawline/drawling1.py | MisterZhouZhou/python3demo | da0b6771cc12e8e1066a115c3f72a90c100108ac | [
"Apache-2.0"
] | 3 | 2019-03-04T08:39:57.000Z | 2019-12-06T08:29:47.000Z | drawline/drawling1.py | MisterZhouZhou/python3demo | da0b6771cc12e8e1066a115c3f72a90c100108ac | [
"Apache-2.0"
] | null | null | null | drawline/drawling1.py | MisterZhouZhou/python3demo | da0b6771cc12e8e1066a115c3f72a90c100108ac | [
"Apache-2.0"
] | null | null | null | '''
利用matplotlib绘制简单的坐标图
'''
import matplotlib.pyplot as plt
# 绘制折线图
input_values = [1,2,3,4,5]
squares = [1,4,9,16,25]
# 给plot同时提供输入值和输出值
plt.plot(input_values, squares, linewidth=5)
# 设置图标标题,并给坐标轴加上标签
plt.title("Square Numbers",fontsize=24)
plt.xlabel("Value", fontsize=14)
plt.ylabel("Square of Value",fontsize=14... | 20.15 | 44 | 0.741935 |
7972af7461409ab35a0431cf413ca9196422c458 | 685 | py | Python | t1nkuy/apps/user_operation/signals.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | t1nkuy/apps/user_operation/signals.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | t1nkuy/apps/user_operation/signals.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'bobby'
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from rest_framework.authtoken.models import Token
from django.contrib.auth import get_user_model
from user_operation.models import UserFav
@receiver(post_save, sen... | 27.4 | 68 | 0.710949 |
7972b15060739404dae4cd3dab411b24c2b191ac | 22,470 | py | Python | statistics.py | BenoitCorsini/music-patterns | 372b8ddf53f8e0100e79e1dcb6f8f6d783c424cb | [
"MIT"
] | 1 | 2021-05-01T13:33:02.000Z | 2021-05-01T13:33:02.000Z | statistics.py | BenoitCorsini/music-patterns | 372b8ddf53f8e0100e79e1dcb6f8f6d783c424cb | [
"MIT"
] | null | null | null | statistics.py | BenoitCorsini/music-patterns | 372b8ddf53f8e0100e79e1dcb6f8f6d783c424cb | [
"MIT"
] | null | null | null | import argparse
import os
import os.path as osp
import json
import sys
import random
from time import time
import numpy as np
import matplotlib.pyplot as plt
from collections import Counter
from utils import time_to_string, basic_stats
MEAN_COLOUR = 'navy'
STD_COLOUR = 'royalblue'
CENTER_COLOUR = 'gold'
LABEL_LIMIT... | 41.534196 | 134 | 0.54486 |
7972b1a7f29ec0eed65220a90dd0570ecd811f09 | 208 | py | Python | pdfGen.py | Chiranth7954/law__--less | 01834bc327b2a7d0fdcd9fac9887375f64b9693e | [
"RSA-MD"
] | 4 | 2017-03-11T04:12:25.000Z | 2019-06-17T05:21:52.000Z | pdfGen.py | Chiranth7954/law__--less | 01834bc327b2a7d0fdcd9fac9887375f64b9693e | [
"RSA-MD"
] | 8 | 2017-02-26T19:16:39.000Z | 2017-04-07T03:09:03.000Z | pdfGen.py | Chiranth7954/law__--less | 01834bc327b2a7d0fdcd9fac9887375f64b9693e | [
"RSA-MD"
] | 7 | 2017-03-25T17:01:47.000Z | 2020-01-24T19:47:01.000Z | def makePDF(stringList):
pdf = FPDF()
pdf.add_page()
pdf.set_font('Arial', '', 11)
for string in stringList:
pdf.cell(40, 10, string + '.')
pdf.output('law--less.pdf', 'F')
| 26 | 39 | 0.548077 |
7972b29620a4a75056eb860eb01990f6316365cd | 1,365 | py | Python | eth/vm/forks/daejun/validation.py | ggs134/py-evm | 5ad87356181b03c14a2452131f50fe8762127c84 | [
"MIT"
] | null | null | null | eth/vm/forks/daejun/validation.py | ggs134/py-evm | 5ad87356181b03c14a2452131f50fe8762127c84 | [
"MIT"
] | null | null | null | eth/vm/forks/daejun/validation.py | ggs134/py-evm | 5ad87356181b03c14a2452131f50fe8762127c84 | [
"MIT"
] | null | null | null | # validation구현해야됨
# frontier -> homestead
# frontier validation주요 로직
# 1) (수수료 + 전송금액)과 잔액 비교
# 2) 논스 확인
# homestead에 포함된 내용
# 3) 서명값 s확인
from eth_utils import (
ValidationError,
)
from eth.constants import (
SECPK1_N,
)
from eth.abc import (
SignedTransactionAPI,
StateAPI
)
def validate_daejun_t... | 25.277778 | 94 | 0.662271 |
7972b36f8e5d0e9547ce463004ce64dfec973c0b | 155 | py | Python | aiocloudflare/api/user/subscriptions/subscriptions.py | Stewart86/aioCloudflare | 341c0941f8f888a8b7e696e64550bce5da4949e6 | [
"MIT"
] | 2 | 2021-09-14T13:20:55.000Z | 2022-02-24T14:18:24.000Z | aiocloudflare/api/user/subscriptions/subscriptions.py | Stewart86/aioCloudflare | 341c0941f8f888a8b7e696e64550bce5da4949e6 | [
"MIT"
] | 46 | 2021-09-08T08:39:45.000Z | 2022-03-29T12:31:05.000Z | aiocloudflare/api/user/subscriptions/subscriptions.py | Stewart86/aioCloudflare | 341c0941f8f888a8b7e696e64550bce5da4949e6 | [
"MIT"
] | 1 | 2021-12-30T23:02:23.000Z | 2021-12-30T23:02:23.000Z | from aiocloudflare.commons.auth import Auth
class Subscriptions(Auth):
_endpoint1 = "user/subscriptions"
_endpoint2 = None
_endpoint3 = None
| 19.375 | 43 | 0.741935 |
7972b531ea3d7be385f962ba10d0853f8262f6b2 | 6,942 | py | Python | panel/pane/vtk/synchronizable_deserializer.py | apatlpo/panel | 560545f5f8e62ce82b24e7aa39a8f09101c9a65f | [
"BSD-3-Clause"
] | 1 | 2020-10-17T17:00:14.000Z | 2020-10-17T17:00:14.000Z | panel/pane/vtk/synchronizable_deserializer.py | apatlpo/panel | 560545f5f8e62ce82b24e7aa39a8f09101c9a65f | [
"BSD-3-Clause"
] | null | null | null | panel/pane/vtk/synchronizable_deserializer.py | apatlpo/panel | 560545f5f8e62ce82b24e7aa39a8f09101c9a65f | [
"BSD-3-Clause"
] | null | null | null | import json
import zipfile
import vtk
import re
import struct
from .synchronizable_serializer import arrayTypesMapping
METHODS_RENAME = {
"AddTexture": "SetTexture",
"SetUseGradientOpacity": None,
"SetRGBTransferFunction": "SetColor",
}
WRAP_ID_RE = re.compile(r"instance:\${([^}]+)}")
ARRAY_TYPES = {
... | 36.34555 | 100 | 0.635552 |
7972b58b148cfc69c9ea2c9b0173ec9a9b652a31 | 14,456 | py | Python | scrapy/extensions/httpcache.py | grammy-jiang/scrapy | 519f752d6dcd3065e81e9387062003a39f3f0b81 | [
"BSD-3-Clause"
] | null | null | null | scrapy/extensions/httpcache.py | grammy-jiang/scrapy | 519f752d6dcd3065e81e9387062003a39f3f0b81 | [
"BSD-3-Clause"
] | 1 | 2020-04-03T11:16:19.000Z | 2020-04-03T11:16:19.000Z | scrapy/extensions/httpcache.py | grammy-jiang/scrapy | 519f752d6dcd3065e81e9387062003a39f3f0b81 | [
"BSD-3-Clause"
] | null | null | null | import gzip
import logging
import os
import pickle
from email.utils import mktime_tz, parsedate_tz
from importlib import import_module
from time import time
from weakref import WeakKeyDictionary
from w3lib.http import headers_raw_to_dict, headers_dict_to_raw
from scrapy.http import Headers, Response
from scrapy.respo... | 38.860215 | 114 | 0.639388 |
7972b61751cc497f9e8b2505ee8889a1e0b18d6c | 817 | py | Python | hackathon/column0/test_9_1.py | abdurahmanadilovic/elements-of-programming-interviews | 14d05935aa901f453ea2086e449b670e993a4c83 | [
"MIT"
] | null | null | null | hackathon/column0/test_9_1.py | abdurahmanadilovic/elements-of-programming-interviews | 14d05935aa901f453ea2086e449b670e993a4c83 | [
"MIT"
] | null | null | null | hackathon/column0/test_9_1.py | abdurahmanadilovic/elements-of-programming-interviews | 14d05935aa901f453ea2086e449b670e993a4c83 | [
"MIT"
] | null | null | null | from unittest import TestCase
from .problem_9_1_stack_max_api import Stack
class TestStack(TestCase):
def test_single_push(self):
stack = Stack()
stack.push(1)
self.assertEqual(1, stack.pop())
def test_multiple_push(self):
stack = Stack()
stack.push(1)
stack.pu... | 25.53125 | 44 | 0.580171 |
7972b626eafc70bc1c99fead20b6d30bf50f8980 | 12,812 | py | Python | fastnerf/datasets/llff.py | ashawkey/NotVeryFastNeRF | 65129c225d1d26b21843eb3d05d7b0f56c6e221b | [
"MIT"
] | 6 | 2021-06-23T03:50:20.000Z | 2022-03-14T15:15:52.000Z | fastnerf/datasets/llff.py | ashawkey/NotVeryFastNeRF | 65129c225d1d26b21843eb3d05d7b0f56c6e221b | [
"MIT"
] | null | null | null | fastnerf/datasets/llff.py | ashawkey/NotVeryFastNeRF | 65129c225d1d26b21843eb3d05d7b0f56c6e221b | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset
import glob
import numpy as np
import os
from PIL import Image
from torchvision import transforms as T
from .ray_utils import *
def normalize(v):
"""Normalize a vector."""
return v/np.linalg.norm(v)
def average_poses(poses):
"""
Calculate the averag... | 39.421538 | 137 | 0.539494 |
7972b6f3a237a6906ee21d1de9b5e1af288ac325 | 1,066 | bzl | Python | az/toolchain/versions.bzl | jullianoacqio/rules_microsoft_azure | 85f8d633db46c7c6aefd5c9c1856aa57473d10fb | [
"Apache-2.0"
] | 4 | 2020-08-05T18:21:43.000Z | 2020-11-10T19:42:48.000Z | az/toolchain/versions.bzl | jullianoacqio/rules_microsoft_azure | 85f8d633db46c7c6aefd5c9c1856aa57473d10fb | [
"Apache-2.0"
] | 3 | 2020-09-01T14:35:18.000Z | 2021-03-29T17:27:12.000Z | az/toolchain/versions.bzl | acqio/rules_microsoft_azure | 85f8d633db46c7c6aefd5c9c1856aa57473d10fb | [
"Apache-2.0"
] | 7 | 2020-08-04T20:14:10.000Z | 2021-02-18T17:10:55.000Z | def _get_az_cli_version(repository_ctx, az):
result = repository_ctx.execute([az, "version", "-o", "tsv", "--query", "\"azure-cli\""])
if result.return_code:
fail("\nAzure CLI failed: (stdout: %s, stderr: %s)" % (result.stdout, result.stderr))
return str(result.stdout).replace("\n", "")
def _extr... | 34.387097 | 93 | 0.665103 |
7972b7525768c791802070f8eed4c9cd7001dc1f | 2,535 | py | Python | sdk/cosmos/azure-cosmos/setup.py | GabrielHobold/azure-sdk-for-python | 7248645bcb0d590eafdae6ffc9d25ec688a0ff68 | [
"MIT"
] | null | null | null | sdk/cosmos/azure-cosmos/setup.py | GabrielHobold/azure-sdk-for-python | 7248645bcb0d590eafdae6ffc9d25ec688a0ff68 | [
"MIT"
] | null | null | null | sdk/cosmos/azure-cosmos/setup.py | GabrielHobold/azure-sdk-for-python | 7248645bcb0d590eafdae6ffc9d25ec688a0ff68 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
# pylint:disable=missing-docstring
import re
import os
from io import open
from setuptools import find_packages, setup
# Change the PACKAGE_NAME... | 32.088608 | 91 | 0.595266 |
7972b872770923c906d0fb083ae88fb9aa6ea79b | 5,397 | py | Python | doc/ext/versioned_notifications.py | lixiaoy1/nova | 357b8b38e88300948bb2e07d1bbaabd1e9d7b60e | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | doc/ext/versioned_notifications.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | doc/ext/versioned_notifications.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | 33.314815 | 78 | 0.58866 |
7972b95f608d8fd25856314447e5e4c06f34fdc0 | 44,314 | py | Python | tests/hikari/impl/test_shard.py | Reliku/hikari | c6e62b750ce35885a5e4124ffe8df6445ab34acd | [
"MIT"
] | 3 | 2021-08-28T17:48:52.000Z | 2021-08-29T06:56:12.000Z | tests/hikari/impl/test_shard.py | Nephael/hikari | 549dd12f4abbc5c42c32680927cdd14049ab3597 | [
"MIT"
] | null | null | null | tests/hikari/impl/test_shard.py | Nephael/hikari | 549dd12f4abbc5c42c32680927cdd14049ab3597 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020 Nekokatt
#
# 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, me... | 40.804788 | 120 | 0.664057 |
7972b9ecae9e5130ee7f55d591a740a49ccb5dd7 | 3,100 | py | Python | gmail.py | NearHuscarl/polybar-gmail-module | 6cc0c7984293bdce831b70e175b303ff236ce88f | [
"BSD-3-Clause"
] | 3 | 2017-11-12T06:20:34.000Z | 2019-08-08T20:49:23.000Z | gmail.py | NearHuscarl/polybar-gmail-module | 6cc0c7984293bdce831b70e175b303ff236ce88f | [
"BSD-3-Clause"
] | null | null | null | gmail.py | NearHuscarl/polybar-gmail-module | 6cc0c7984293bdce831b70e175b303ff236ce88f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
follow the instruction here: https://developers.google.com/gmail/api/quickstart/python
to generate client_secret.json and put it in $(pwd)/gmail/
Dependencies: google-api-python-client
"""
import argparse
import os
import httplib2
from apiclient import discovery, errors
from oauth2client.fi... | 31.632653 | 87 | 0.741613 |
7972bab6f212628cfef0156b3d535872a85adb2c | 805 | py | Python | PythonVirtEnv/Lib/site-packages/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py | zuhorski/EPL_Project | 2d2417652879cfbe33c44c003ad77b7222590849 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="ticklabelposition",
parent_name="choroplethmapbox.colorbar",
**kwargs
):
super(TicklabelpositionValidator, self).__in... | 28.75 | 83 | 0.498137 |
7972bac979368d229b916dd4b72718921f0ad5b7 | 4,380 | py | Python | 2020/day14.py | a74nh/adventofcode | 2532331519924860931ec8e37809794d769d798f | [
"MIT"
] | null | null | null | 2020/day14.py | a74nh/adventofcode | 2532331519924860931ec8e37809794d769d798f | [
"MIT"
] | null | null | null | 2020/day14.py | a74nh/adventofcode | 2532331519924860931ec8e37809794d769d798f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
fname="day14.input"
from dataclasses import dataclass, field
from typing import List
from typing import Dict
import copy
@dataclass
class Instr:
def foo():
pass
@dataclass
class Mem_Instr(Instr):
loc: int
val: int
@dataclass
class Mask_Instr(Instr):
mask: str... | 24.745763 | 67 | 0.546119 |
7972bafabc0b4eb401616880ef4855122016b1f2 | 9,027 | py | Python | musicbot/modules/default/botmanipulate.py | oKidd/PrendeMusic | b66d54d93ed36587193c20b71201c4447d80ad85 | [
"MIT"
] | 5 | 2018-09-07T12:17:27.000Z | 2019-12-06T02:35:26.000Z | musicbot/modules/default/botmanipulate.py | oKidd/PrendeMusic | b66d54d93ed36587193c20b71201c4447d80ad85 | [
"MIT"
] | null | null | null | musicbot/modules/default/botmanipulate.py | oKidd/PrendeMusic | b66d54d93ed36587193c20b71201c4447d80ad85 | [
"MIT"
] | 2 | 2020-04-25T00:35:17.000Z | 2021-05-13T22:20:19.000Z | import logging
import discord
import aiohttp
import queue
import asyncio
from threading import Thread, Lock
from functools import partial
from discord.ext.commands import Cog, command
from typing import Optional
from ...utils import _get_variable
from ...command_injector import InjectableMixin, inject_as_subcommand, i... | 35.124514 | 152 | 0.617592 |
7972bb46cbe2e7bd995e1ed90480ce34bfd68482 | 2,427 | py | Python | src/Dechiffrement_AES.py | NorianGuernine/AES-python | 0dd2327289cab0487f8bdb459b61f173b8164c67 | [
"MIT"
] | null | null | null | src/Dechiffrement_AES.py | NorianGuernine/AES-python | 0dd2327289cab0487f8bdb459b61f173b8164c67 | [
"MIT"
] | null | null | null | src/Dechiffrement_AES.py | NorianGuernine/AES-python | 0dd2327289cab0487f8bdb459b61f173b8164c67 | [
"MIT"
] | null | null | null | import numpy as np
from CF_Multi import CF_Mult9, CF_Mult11, CF_Mult13, CF_Mult14
from Operation_cle import AddRoundKey, KeyExpansion
from MiseEnForme import *
from Matrices import InvSbox, Sbox, Rcon
def InvSubBytes(state,InvSbox): #Inversion du Subbytes pour déchiffrement AES
for i in range(0,state.shape[0]):
... | 36.772727 | 89 | 0.658838 |
7972bd2163cbec5763b7c7c0c68ee59efd96be68 | 5,864 | py | Python | walter/katana/WalterIn/walterVariantsMenu.py | all-in-one-of/OpenWalter | c2034f7fac20b36ffe3e500c01d40b87e84e2b97 | [
"libtiff"
] | 187 | 2018-08-14T19:06:20.000Z | 2022-03-04T06:03:25.000Z | walter/katana/WalterIn/walterVariantsMenu.py | all-in-one-of/OpenWalter | c2034f7fac20b36ffe3e500c01d40b87e84e2b97 | [
"libtiff"
] | 9 | 2018-08-22T15:34:48.000Z | 2019-11-27T13:45:21.000Z | walter/katana/WalterIn/walterVariantsMenu.py | all-in-one-of/OpenWalter | c2034f7fac20b36ffe3e500c01d40b87e84e2b97 | [
"libtiff"
] | 41 | 2018-08-14T19:06:09.000Z | 2021-09-04T20:01:10.000Z | """
Specialization of USD variants classes in Katana.
It's written on Python to be able to use complex UI and PySide.
"""
# Copyright 2017 Rodeo FX. All rights reserved.
import walterWidgets
from UI4.FormMaster import KatanaFactory
from UI4.Manifest import QT4FormWidgets
from UI4.Widgets import ToolbarButton
from UI4... | 36.65 | 75 | 0.688438 |
7972bd9b9301414a002f0be267d936abcf9da78d | 7,216 | py | Python | ChatBot.py | dezan123/anondezann | ea34a3fe350f07ff609c351528a5902d9cfdbff6 | [
"Unlicense"
] | 1 | 2021-11-26T05:03:15.000Z | 2021-11-26T05:03:15.000Z | ChatBot.py | INDOHACKER-XODE/TelegramChat | b0fdcfbeedfd1957e89feb0f034f24dc2d364332 | [
"MIT"
] | null | null | null | ChatBot.py | INDOHACKER-XODE/TelegramChat | b0fdcfbeedfd1957e89feb0f034f24dc2d364332 | [
"MIT"
] | null | null | null | import telebot
from telebot import types
from config import CHANNEL, GROUP, OWNER, TOKEN
from dataEgine import *
from Messages import *
access_token = TOKEN
bot = telebot.TeleBot(access_token)
def inline_menu():
"""
Create inline menu for new chat
:return: InlineKeyboardMarkup
"""
callback = typ... | 27.541985 | 86 | 0.625 |
7972beafd01fcebf71e14fbbeabd113ab1cf71e0 | 6,950 | py | Python | tests/unit/test_tasks.py | smlindauer/python-sasctl | b2b1c0712ab96b90b0ef53f4a7a57e922c2b9e6d | [
"Apache-2.0"
] | 1 | 2021-06-15T08:22:18.000Z | 2021-06-15T08:22:18.000Z | tests/unit/test_tasks.py | SophiaRowland/python-sasctl | fa2aa24f96c1b25f5af34ba418f131a377251af5 | [
"Apache-2.0"
] | 3 | 2019-07-12T02:09:15.000Z | 2019-07-13T14:48:04.000Z | tests/unit/test_tasks.py | jlwalke2/python-sasctl | e059647e1e35684591505be3838e8dbcfcc06ca9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import pytest
from six.moves import mock
from sasctl.core import RestObj
from sasctl._services.model_repository import ModelRepository
def test_sklearn_metadata... | 50 | 1,594 | 0.683741 |
7972bee28d16818ed55edf3cbe5582c2e57aab22 | 3,555 | py | Python | venv/lib/python3.5/site-packages/ebcli/lib/iam.py | meetynasu/server | e78e175d15cf684cb8b85fbb226ea2bc464c58ed | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/ebcli/lib/iam.py | meetynasu/server | e78e175d15cf684cb8b85fbb226ea2bc464c58ed | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/ebcli/lib/iam.py | meetynasu/server | e78e175d15cf684cb8b85fbb226ea2bc464c58ed | [
"MIT"
] | 1 | 2019-11-27T22:10:49.000Z | 2019-11-27T22:10:49.000Z | # Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 30.127119 | 79 | 0.681857 |
7972bf14be6b384b4b2d18aa679f9ff3259096c1 | 1,596 | py | Python | utils/verify.py | robinagist/manic | b1bdefbb11c7489164a0c08bb092ffecb5900261 | [
"MIT"
] | 2 | 2018-09-06T05:39:11.000Z | 2020-10-13T21:40:06.000Z | utils/verify.py | robinagist/manic | b1bdefbb11c7489164a0c08bb092ffecb5900261 | [
"MIT"
] | 20 | 2018-01-20T05:00:23.000Z | 2018-01-25T17:55:00.000Z | utils/verify.py | robinagist/Manic-Mapped-Memory-Server | b1bdefbb11c7489164a0c08bb092ffecb5900261 | [
"MIT"
] | null | null | null | from utils import crypto
from manic import exceptions
def verify_file(mapped_file, verifyfile):
'''
uses the generated hashes to verify that the file is authentic and has not been tampered with
:param scorefile: full path to the mappedfile
:param verifyfile: full path to the verifyfile
:param bypas... | 30.113208 | 97 | 0.692356 |
7972bf79c8b3edb294400b2758a63a092eaa7422 | 1,890 | py | Python | api/tests/opentrons/integration/test_server.py | ethguo/opentrons | 1965ef499b89e3dc882ccb0d6a95ba998fcab13a | [
"Apache-2.0"
] | null | null | null | api/tests/opentrons/integration/test_server.py | ethguo/opentrons | 1965ef499b89e3dc882ccb0d6a95ba998fcab13a | [
"Apache-2.0"
] | null | null | null | api/tests/opentrons/integration/test_server.py | ethguo/opentrons | 1965ef499b89e3dc882ccb0d6a95ba998fcab13a | [
"Apache-2.0"
] | null | null | null | import pytest
from opentrons.server import rpc
# Setting root to None tells session to use session_manager as root
@pytest.mark.parametrize('root', [None])
async def test_notifications(session, session_manager, protocol, root, connect): # noqa
root = session_manager
await session.socket.receive_json() # Sk... | 28.208955 | 88 | 0.61164 |
7972bfa98f9993088b629901a1d9792cbe7abd8f | 948 | py | Python | Ricardo_OS/Python_backend/profiler/display_binary.py | icl-rocketry/Avionics | 4fadbccb1cafe4be80c76e15a2546bbb8414398b | [
"MIT"
] | 8 | 2020-01-28T18:35:21.000Z | 2021-11-20T13:34:25.000Z | Ricardo_OS/Python_backend/profiler/display_binary.py | icl-rocketry/Avionics | 4fadbccb1cafe4be80c76e15a2546bbb8414398b | [
"MIT"
] | 2 | 2022-02-15T08:29:49.000Z | 2022-02-28T02:13:06.000Z | Ricardo_OS/Python_backend/profiler/display_binary.py | icl-rocketry/Avionics | 4fadbccb1cafe4be80c76e15a2546bbb8414398b | [
"MIT"
] | 1 | 2020-12-06T05:20:51.000Z | 2020-12-06T05:20:51.000Z |
import serial
import argparse
import time
import signal
import sys
ap = argparse.ArgumentParser()
ap.add_argument("-p", "--port", required=True, help="Port hosting ricardo", type=str)
ap.add_argument("-f", "--filename", required=True, help="filename", type=str)
args = vars(ap.parse_args())
ser = serial.Serial(port =... | 20.608696 | 85 | 0.68038 |
7972c07ffc35f9da64b987436242b4cfc677daf4 | 1,508 | py | Python | data_wrangling_pandas/code.py | aarpit1010/greyatom-python-for-data-science | e5d5a087f4237c5d234db849ada672f2d71d8425 | [
"MIT"
] | null | null | null | data_wrangling_pandas/code.py | aarpit1010/greyatom-python-for-data-science | e5d5a087f4237c5d234db849ada672f2d71d8425 | [
"MIT"
] | null | null | null | data_wrangling_pandas/code.py | aarpit1010/greyatom-python-for-data-science | e5d5a087f4237c5d234db849ada672f2d71d8425 | [
"MIT"
] | null | null | null | # --------------
import numpy as np
import pandas as pd
from scipy.stats import mode
bank = pd.read_csv(path)
categorical_var=bank.select_dtypes(include='object')
print("Categorical variables : ",categorical_var)
numerical_var=bank.select_dtypes(include='number')
print("Numerical Variables : ",numeric... | 29 | 120 | 0.72878 |
7972c09f26c9c82be36b9ada56dc7e8c517944ae | 5,757 | py | Python | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_21/exp4_old_vs_new_vae_architecture_train_longer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_21/exp4_old_vs_new_vae_architecture_train_longer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/goal_distribution/representation_learning/exps_20_07_21/exp4_old_vs_new_vae_architecture_train_longer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.pygame import PickAndPlaceEnv
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.sets.rl_launcher import disco_experiment
if __name__ == "__main__":
variant = dict(
env_class=PickAndPlaceEnv,
env_kwargs=dict(
... | 31.288043 | 75 | 0.532222 |
7972c1cf968b743d75370cfbf4a71153f27a560d | 9,708 | py | Python | src/redisenterprise/azext_redisenterprise/generated/_help.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/redisenterprise/azext_redisenterprise/generated/_help.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/redisenterprise/azext_redisenterprise/generated/_help.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incor... | 40.962025 | 120 | 0.665122 |
7972c23c0e741e96a326d95ed067d82680d531e4 | 3,611 | py | Python | Model Perfomance Comparasion.py | JoeTao-097/Multi-REZ-Evalution-for-Breast-Ultrasound-Images | 344d64ad2fe9d790c49e8005b3abee219d362278 | [
"Apache-2.0"
] | null | null | null | Model Perfomance Comparasion.py | JoeTao-097/Multi-REZ-Evalution-for-Breast-Ultrasound-Images | 344d64ad2fe9d790c49e8005b3abee219d362278 | [
"Apache-2.0"
] | null | null | null | Model Perfomance Comparasion.py | JoeTao-097/Multi-REZ-Evalution-for-Breast-Ultrasound-Images | 344d64ad2fe9d790c49e8005b3abee219d362278 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 16 10:55:17 2021
@author: joe
"""
import numpy as np
from matplotlib import pyplot as plt
import scipy.stats as st
from sklearn import metrics
class DelongTest():
def __init__(self,preds1,preds2,label,threshold=0.05):
'''
preds... | 31.12931 | 143 | 0.620604 |
7972c476d1185d557462503f88e6c532436d1bd5 | 404 | py | Python | api/logs/urls.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | api/logs/urls.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | api/logs/urls.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from api.logs import views
urlpatterns = [
url(r'^(?P<log_id>\w+)/$', views.NodeLogDetail.as_view(), name=views.NodeLogDetail.view_name),
url(r'^(?P<log_id>\w+)/nodes/$', views.LogNodeList.as_view(), name=views.LogNodeList.view_name),
url(r'^(?P<log_id>\w+)/contributors/$'... | 40.4 | 123 | 0.715347 |
7972c49aa41fdd094e3befc309eb762c7e0b2343 | 792 | py | Python | pyabsa/core/apc/classic/__bert__/models/__init__.py | froth-synthesio/PyABSA | 61406e7a49f93f6c986dfd7e583d730b69c2861c | [
"MIT"
] | 199 | 2021-06-07T15:07:28.000Z | 2022-03-31T11:53:28.000Z | pyabsa/core/apc/classic/__bert__/models/__init__.py | froth-synthesio/PyABSA | 61406e7a49f93f6c986dfd7e583d730b69c2861c | [
"MIT"
] | 98 | 2021-06-06T06:01:02.000Z | 2022-03-31T15:48:28.000Z | pyabsa/core/apc/classic/__bert__/models/__init__.py | froth-synthesio/PyABSA | 61406e7a49f93f6c986dfd7e583d730b69c2861c | [
"MIT"
] | 55 | 2021-06-10T08:52:17.000Z | 2022-03-31T11:08:58.000Z | # -*- coding: utf-8 -*-
# project: PyABSA
# file: __init__.py
# time: 2021/7/17
# author: yangheng <yangheng@m.scnu.edu.cn>
# github: https://github.com/yangheng95
# Copyright (C) 2021. All Rights Reserved.
from .aoa_bert import AOA_BERT
from .asgcn_bert import ASGCN_BERT
from .atae_lstm_bert import ATAE_LSTM_BERT
fro... | 33 | 96 | 0.786616 |
7972c620e0513b6fe6ddac23fe19654f3f3c0d36 | 587 | py | Python | Old_Attempts/Import_data.py | ConorHogan/Programming_Scripting_Projects | fd45c7920c74b93b10615ae70f2e9e4ddbee0af5 | [
"Apache-2.0"
] | null | null | null | Old_Attempts/Import_data.py | ConorHogan/Programming_Scripting_Projects | fd45c7920c74b93b10615ae70f2e9e4ddbee0af5 | [
"Apache-2.0"
] | 6 | 2018-04-09T21:02:29.000Z | 2018-04-29T20:27:19.000Z | Old_Attempts/Import_data.py | ConorHogan/Programming_Scripting_Projects | fd45c7920c74b93b10615ae70f2e9e4ddbee0af5 | [
"Apache-2.0"
] | null | null | null | #import dataset from git file using pandas
#reference: https://stackoverflow.com/questions/23464138/downloading-and-accessing-data-from-github-python
import pandas as pd
import numpy as np
url = 'https://raw.githubusercontent.com/ConorHogan/Programming_Scripting_Projects/master/Iris_Data.csv'
df = pd.read_csv(url) # a... | 36.6875 | 106 | 0.747871 |
7972c62254c690a3480db9c8534d7f375d50f399 | 580 | py | Python | imperative/python/megengine/quantization/internal_fake_quant.py | chenls/MegEngine | 3f783aba4b81ab628ad911d0c66a49d163a8aaf6 | [
"Apache-2.0"
] | 3 | 2021-08-08T12:55:53.000Z | 2021-12-10T06:01:04.000Z | imperative/python/megengine/quantization/internal_fake_quant.py | MediosZ/MegEngine | 5c775d02dd0b8f20b5acc6b400cf722e92f2e86b | [
"Apache-2.0"
] | null | null | null | imperative/python/megengine/quantization/internal_fake_quant.py | MediosZ/MegEngine | 5c775d02dd0b8f20b5acc6b400cf722e92f2e86b | [
"Apache-2.0"
] | null | null | null | # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ... | 32.222222 | 88 | 0.786207 |
7972c7330d63254d2b885e3ecf860a12abae10cd | 1,424 | py | Python | datalabeling/create_annotation_spec_set_test.py | apecr/python-docs-samples | 26b581bb6ce148e13a9c7f2cd801f138b8aa8412 | [
"Apache-2.0"
] | 1 | 2020-06-04T16:50:49.000Z | 2020-06-04T16:50:49.000Z | datalabeling/create_annotation_spec_set_test.py | apecr/python-docs-samples | 26b581bb6ce148e13a9c7f2cd801f138b8aa8412 | [
"Apache-2.0"
] | null | null | null | datalabeling/create_annotation_spec_set_test.py | apecr/python-docs-samples | 26b581bb6ce148e13a9c7f2cd801f138b8aa8412 | [
"Apache-2.0"
] | 1 | 2020-05-29T20:33:18.000Z | 2020-05-29T20:33:18.000Z | #!/usr/bin/env python
# Copyright 2019 Google, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 26.37037 | 80 | 0.759129 |
7972c75ceff97fc10b8bcbc3f1c4e93a67642ed8 | 33,586 | py | Python | imagenet_classes.py | adrianstaniec/one-pixel-attack | efe938c5d3836539109cfdd7f384fd1e062a439a | [
"Unlicense"
] | null | null | null | imagenet_classes.py | adrianstaniec/one-pixel-attack | efe938c5d3836539109cfdd7f384fd1e062a439a | [
"Unlicense"
] | null | null | null | imagenet_classes.py | adrianstaniec/one-pixel-attack | efe938c5d3836539109cfdd7f384fd1e062a439a | [
"Unlicense"
] | null | null | null | IMAGENET_INDEX = {
0: "tench, Tinca tinca",
1: "goldfish, Carassius auratus",
2: "great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias",
3: "tiger shark, Galeocerdo cuvieri",
4: "hammerhead, hammerhead shark",
5: "electric ray, crampfish, numbfish, torpedo",
6:... | 33.485543 | 133 | 0.619693 |
7972c7c6445d46d0797e8b5fc39ae44da1a674ad | 1,598 | py | Python | game/entity.py | KhaoTom/a-good-burger | 5c76424263e7e5ecc8df003e127b01c8ac47d2b3 | [
"MIT"
] | null | null | null | game/entity.py | KhaoTom/a-good-burger | 5c76424263e7e5ecc8df003e127b01c8ac47d2b3 | [
"MIT"
] | null | null | null | game/entity.py | KhaoTom/a-good-burger | 5c76424263e7e5ecc8df003e127b01c8ac47d2b3 | [
"MIT"
] | null | null | null | import copy
from game.datatypes import Entity
Z_PLAYER = 100
Z_NPC = 50
Z_ITEM = 10
Z_CORPSE = 1
entity_templates = {
"player": Entity(0, 0, Z_PLAYER, "@", (255, 255, 255), "Player", True, 30, 5, 2, False, None),
# monsters
"orc": Entity(0, 0, Z_NPC, "o", (63, 127, 63), "Orc", True, 10, 3, 0, True, Non... | 23.15942 | 100 | 0.600125 |
7972c7c6fce4be849b8d3196c1ef2b6cdbce54ab | 3,814 | py | Python | refer360annotation/catalog/migrations/SAVED/0001_initial.py | volkancirik/refer360_backend | b915cb6c375dd3b408249775e5890c883c92d43c | [
"MIT"
] | null | null | null | refer360annotation/catalog/migrations/SAVED/0001_initial.py | volkancirik/refer360_backend | b915cb6c375dd3b408249775e5890c883c92d43c | [
"MIT"
] | 2 | 2021-03-19T23:39:05.000Z | 2021-06-10T23:05:25.000Z | refer360annotation/catalog/migrations/SAVED/0001_initial.py | volkancirik/refer360_backend | b915cb6c375dd3b408249775e5890c883c92d43c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-22 14:49
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = ... | 43.340909 | 97 | 0.535396 |
7972c7f52acf6ab1a6506cf99519c68ecb9a02a1 | 2,438 | py | Python | tests/test_unescape.py | foliant-docs/foliant | da01c8ca07e092b9d8a448698eaf47a416b8b687 | [
"MIT"
] | 105 | 2016-04-12T13:24:23.000Z | 2022-03-27T20:43:57.000Z | tests/test_unescape.py | foliant-docs/foliant | da01c8ca07e092b9d8a448698eaf47a416b8b687 | [
"MIT"
] | 53 | 2016-09-27T15:54:38.000Z | 2022-03-06T17:14:30.000Z | tests/test_unescape.py | foliant-docs/foliant | da01c8ca07e092b9d8a448698eaf47a416b8b687 | [
"MIT"
] | 8 | 2018-02-20T16:53:55.000Z | 2021-08-15T14:09:59.000Z | '''Test the builtin ``_unescape`` preprocessor that turns escaped tags
(``<<tag></tag>``) into unescaped ones (``<tag></tag>``) in output without
processing them.
'''
from logging import Logger
from pathlib import Path
from foliant.preprocessors import _unescape
class TestUnescape(object):
preprocessor = _unesc... | 33.39726 | 87 | 0.660788 |
7972c800fa54b21810981f9a79f15664705eb049 | 1,396 | py | Python | SI/2021-1/IA/TP1/src/09.py | luksamuk/study | 7a4062cb894be52d786852b4729ac6a4e784b5a3 | [
"MIT"
] | 3 | 2019-03-13T02:16:44.000Z | 2020-03-05T21:14:18.000Z | SI/2021-1/IA/TP1/src/09.py | luksamuk/study | 7a4062cb894be52d786852b4729ac6a4e784b5a3 | [
"MIT"
] | 1 | 2019-03-15T00:52:59.000Z | 2019-03-15T00:53:54.000Z | SI/2021-1/IA/TP1/src/09.py | luksamuk/study | 7a4062cb894be52d786852b4729ac6a4e784b5a3 | [
"MIT"
] | 1 | 2020-03-05T21:14:29.000Z | 2020-03-05T21:14:29.000Z | #!/usr/bin/python
import sys
def slurp(filename):
slurped_file = []
try:
with open(filename, "r") as the_file:
slurped_file = [line.rstrip('\n') for line in the_file]
except IsADirectoryError:
print("Erro ao abrir \"{}\": é um diretório".format(filename))
except FileNotFound... | 34.04878 | 70 | 0.608883 |
7972c856158119250724949194bf787d80d26bf3 | 807 | py | Python | project/notes/urls.py | J0hnGann0n/modern-django | a8f51806b3f6903847a20b7241044d3a88f4a775 | [
"MIT"
] | 1 | 2017-06-22T22:35:07.000Z | 2017-06-22T22:35:07.000Z | project/notes/urls.py | J0hnGann0n/modern-django | a8f51806b3f6903847a20b7241044d3a88f4a775 | [
"MIT"
] | null | null | null | project/notes/urls.py | J0hnGann0n/modern-django | a8f51806b3f6903847a20b7241044d3a88f4a775 | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from rest_framework import routers
from project.notes import views
from django.contrib import admin
from django.contrib.auth import views as auth_views
from rest_framework.urlpatterns import format_suffix_patterns
# API Endpoints
router = routers.DefaultRouter()
router.registe... | 31.038462 | 99 | 0.729864 |
7972c860ecc69da9e7305d5956ea9a60d72723cd | 1,734 | py | Python | wzrd/wzrd/users/redis.py | umarochki/dwellers-and-donkeys | 0777b040754412402c0fd96048263087eff13b14 | [
"MIT"
] | null | null | null | wzrd/wzrd/users/redis.py | umarochki/dwellers-and-donkeys | 0777b040754412402c0fd96048263087eff13b14 | [
"MIT"
] | null | null | null | wzrd/wzrd/users/redis.py | umarochki/dwellers-and-donkeys | 0777b040754412402c0fd96048263087eff13b14 | [
"MIT"
] | null | null | null | import json
from redis import Redis
from wzrd.utils import generate_key
from .models import User
class AuthRedisManager:
def __init__(self):
self._redis = Redis(host='redis', port=6379)
def add_token(self, user):
fields = {
field: getattr(user, field)
for field in ("i... | 27.967742 | 73 | 0.629758 |
7972caf4aa8bd5ba2a91f068f040fb461ff0caa8 | 93,778 | py | Python | Alfred/Alfred.alfredpreferences/workflows/user.workflow.A6D337DC-1C21-45A3-8989-3B87778485B9/workflow/workflow.py | LumpyChen/mac-conf | 8e2bf665bed74736ccf3f63087eaa05f661827a4 | [
"MIT"
] | 2,177 | 2015-01-02T09:56:51.000Z | 2022-03-27T01:48:37.000Z | Alfred/Alfred.alfredpreferences/workflows/user.workflow.A6D337DC-1C21-45A3-8989-3B87778485B9/workflow/workflow.py | LumpyChen/mac-conf | 8e2bf665bed74736ccf3f63087eaa05f661827a4 | [
"MIT"
] | 24 | 2015-01-02T19:11:51.000Z | 2021-01-27T07:20:33.000Z | Alfred/Alfred.alfredpreferences/workflows/user.workflow.A6D337DC-1C21-45A3-8989-3B87778485B9/workflow/workflow.py | LumpyChen/mac-conf | 8e2bf665bed74736ccf3f63087eaa05f661827a4 | [
"MIT"
] | 516 | 2015-01-02T18:48:29.000Z | 2022-01-26T07:12:35.000Z | # encoding: utf-8
#
# Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2014-02-15
#
"""
The :class:`Workflow` object is the main interface to this library.
See :ref:`setup` in the :ref:`user-manual` for an example of how to set
up your Pyth... | 31.951618 | 94 | 0.556698 |
7972cb562db52b381767d455a5634f41b5422341 | 18,351 | py | Python | maistra/vendor/com_googlesource_chromium_v8/wee8/build/android/pylib/local/emulator/avd.py | maistra-bot/proxy | 05a551df62d90e96c24afc649f2755983d020b5b | [
"Apache-2.0"
] | null | null | null | maistra/vendor/com_googlesource_chromium_v8/wee8/build/android/pylib/local/emulator/avd.py | maistra-bot/proxy | 05a551df62d90e96c24afc649f2755983d020b5b | [
"Apache-2.0"
] | null | null | null | maistra/vendor/com_googlesource_chromium_v8/wee8/build/android/pylib/local/emulator/avd.py | maistra-bot/proxy | 05a551df62d90e96c24afc649f2755983d020b5b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Chromium 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 contextlib
import json
import logging
import os
import socket
import stat
import subprocess
import threading
from google.protobuf import text_format ... | 33.064865 | 80 | 0.641981 |
7972cbb1fac9cd18bf7e8b30333764daaf76f10d | 269 | py | Python | mundo 3/aula 18/exer86.py | jonatan098/cursopython | 6e4cbaef6229e230fdbc66d80ec1b5a089887b0d | [
"MIT"
] | null | null | null | mundo 3/aula 18/exer86.py | jonatan098/cursopython | 6e4cbaef6229e230fdbc66d80ec1b5a089887b0d | [
"MIT"
] | null | null | null | mundo 3/aula 18/exer86.py | jonatan098/cursopython | 6e4cbaef6229e230fdbc66d80ec1b5a089887b0d | [
"MIT"
] | 1 | 2020-02-22T17:21:05.000Z | 2020-02-22T17:21:05.000Z | matrix = [[0,0,0], [0,0,0], [0,0,0]]
for l in range(0,3):
for c in range(0,3):
matrix[l][c] = int(input(f'digite um numero [{l}][{c}]: '))
print('-='*30)
for l in range(0,3):
for c in range(0,3):
print(f'[{matrix[l][c]:^5}]', end='')
print() | 29.888889 | 67 | 0.483271 |
7972cbcff41a8c5c3b8c5b34e54078c6e3cd7923 | 5,070 | py | Python | blurt_py_80211/audioLoopback.py | saydulk/blurt | 0ce647c8260fac55ddafd994fdef1bfed05553fa | [
"MIT"
] | 5 | 2015-02-20T14:18:28.000Z | 2022-03-18T13:35:20.000Z | blurt_py_80211/audioLoopback.py | saydulk/blurt | 0ce647c8260fac55ddafd994fdef1bfed05553fa | [
"MIT"
] | null | null | null | blurt_py_80211/audioLoopback.py | saydulk/blurt | 0ce647c8260fac55ddafd994fdef1bfed05553fa | [
"MIT"
] | 9 | 2017-04-27T07:55:11.000Z | 2019-04-19T10:16:03.000Z | #!/usr/bin/env python
import numpy as np
import audio
import util, iir
delay = .005
def processOutput(output, loopback_Fs, loopback_Fc, upsample_factor, mask_noise):
output = util.upsample(output, upsample_factor)
output = (output * np.exp(1j * 2 * np.pi * np.arange(output.size) * loopback_Fc / loopback_Fs)).... | 42.605042 | 104 | 0.631953 |
7972cc295270d270ad5f81d04bd2b8d6fe46dede | 20,574 | py | Python | etl/parsers/etw/Microsoft_Windows_XAML_Diagnostics.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 104 | 2020-03-04T14:31:31.000Z | 2022-03-28T02:59:36.000Z | etl/parsers/etw/Microsoft_Windows_XAML_Diagnostics.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 7 | 2020-04-20T09:18:39.000Z | 2022-03-19T17:06:19.000Z | etl/parsers/etw/Microsoft_Windows_XAML_Diagnostics.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 16 | 2020-03-05T18:55:59.000Z | 2022-03-01T10:19:28.000Z | # -*- coding: utf-8 -*-
"""
Microsoft-Windows-XAML-Diagnostics
GUID : 59e7a714-73a4-4147-b47e-0957048c75c4
"""
from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct
from etl.utils import WString, CString, SystemTime, Guid
from etl.dtyp import Sid
fro... | 28.896067 | 123 | 0.686352 |
7972ceceff757d7d385738bc13268226530be4e8 | 153 | py | Python | src/constants/keywords.py | Semvrij/KaasScript | c702defe533cfd7554714676fea0ef0eef05e403 | [
"MIT"
] | null | null | null | src/constants/keywords.py | Semvrij/KaasScript | c702defe533cfd7554714676fea0ef0eef05e403 | [
"MIT"
] | null | null | null | src/constants/keywords.py | Semvrij/KaasScript | c702defe533cfd7554714676fea0ef0eef05e403 | [
"MIT"
] | null | null | null | KEYWORDS = [
'var',
'const',
'if',
'else',
'elif',
'for',
'to',
'step',
'while',
'function',
'return',
'continue',
'break'
]
| 9.5625 | 13 | 0.437908 |
7972cee9c6654ae74bf504d25f33d019e26ab3e0 | 809 | py | Python | src/anaplan_api/AnaplanRequest.py | jeswils-ap/anaplan_transactional_api | 54ef377df8f885906c911b302d21b8927602cc6c | [
"BSD-2-Clause"
] | null | null | null | src/anaplan_api/AnaplanRequest.py | jeswils-ap/anaplan_transactional_api | 54ef377df8f885906c911b302d21b8927602cc6c | [
"BSD-2-Clause"
] | null | null | null | src/anaplan_api/AnaplanRequest.py | jeswils-ap/anaplan_transactional_api | 54ef377df8f885906c911b302d21b8927602cc6c | [
"BSD-2-Clause"
] | null | null | null | import json
from dataclasses import dataclass
from typing import Union
@dataclass()
class AnaplanRequest:
_url: str
_header: dict
_body: dict = None
def __init__(self, url: str, header: dict, body: Union[dict, str] = None):
"""
:param url: URL for API request
:type url: str
:param header: JSON header for... | 19.731707 | 75 | 0.678616 |
7972d02927c62c1a8571ae2bdc47f6c1a8a5fa93 | 8,815 | py | Python | examples/NeurIPS2018-AI-for-Prosthetics-Challenge/opensim_agent.py | TomorrowIsAnOtherDay/PARL | 0fc314630664a3205873a325d8c3105ec4c2500f | [
"Apache-2.0"
] | 1 | 2019-08-01T08:34:40.000Z | 2019-08-01T08:34:40.000Z | examples/NeurIPS2018-AI-for-Prosthetics-Challenge/opensim_agent.py | GOnion/PARL | b29c45a6d2a187d1cfa8b5fe38e9c81b99ef37f2 | [
"Apache-2.0"
] | null | null | null | examples/NeurIPS2018-AI-for-Prosthetics-Challenge/opensim_agent.py | GOnion/PARL | b29c45a6d2a187d1cfa8b5fe38e9c81b99ef37f2 | [
"Apache-2.0"
] | 1 | 2022-02-08T01:02:32.000Z | 2022-02-08T01:02:32.000Z | # Copyright (c) 2018 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... | 41 | 107 | 0.567555 |
7972d098a116e305b44a3dbe0d65db7652d94f56 | 2,101 | py | Python | src/eisoil/core/log.py | radomirklacza/C-BAS | 5005cf43f57302dc0f58b9d1b9cf7e4e3ab70e32 | [
"BSD-3-Clause"
] | null | null | null | src/eisoil/core/log.py | radomirklacza/C-BAS | 5005cf43f57302dc0f58b9d1b9cf7e4e3ab70e32 | [
"BSD-3-Clause"
] | null | null | null | src/eisoil/core/log.py | radomirklacza/C-BAS | 5005cf43f57302dc0f58b9d1b9cf7e4e3ab70e32 | [
"BSD-3-Clause"
] | 2 | 2017-08-07T15:24:05.000Z | 2018-10-11T10:53:23.000Z | """
This module provides logging facilities. More specifically, it provides a way to get to a (configured) python logger.
Hence the interface of this logger is the same as the python one (so please direct all complaints regarding this to the python people).
In order to get such a logger instance, you could insert this... | 41.196078 | 141 | 0.752975 |
7972d1537f34b567cbfd85fc5160f37b59a76fbc | 14,174 | py | Python | monai/networks/nets/segresnet.py | JoHof/MONAI | 70483b648fba92f0a8346e53dc14d686e56120a3 | [
"Apache-2.0"
] | null | null | null | monai/networks/nets/segresnet.py | JoHof/MONAI | 70483b648fba92f0a8346e53dc14d686e56120a3 | [
"Apache-2.0"
] | null | null | null | monai/networks/nets/segresnet.py | JoHof/MONAI | 70483b648fba92f0a8346e53dc14d686e56120a3 | [
"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... | 40.847262 | 119 | 0.62537 |
7972d1ffb77f2c3e042ee2268dd8d3cf063bacfb | 436 | py | Python | management/admin.py | itech-indrustries/schoolmanagement | 45f27c567d62a8c255fdc6629e65246957ee2a6d | [
"MIT"
] | 2 | 2020-03-21T18:39:24.000Z | 2020-03-21T18:40:14.000Z | management/admin.py | itech-indrustries/schoolmanagement | 45f27c567d62a8c255fdc6629e65246957ee2a6d | [
"MIT"
] | 5 | 2021-06-04T22:42:03.000Z | 2022-03-12T00:19:43.000Z | management/admin.py | itechindrustries/schoolmanagement | 45f27c567d62a8c255fdc6629e65246957ee2a6d | [
"MIT"
] | 3 | 2020-03-21T12:41:04.000Z | 2020-03-22T21:12:00.000Z | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Profile)
admin.site.register(Dormitories)
admin.site.register(Class)
admin.site.register(Subject)
admin.site.register(Class_schedule)#this
admin.site.register(Exam_list)
admin.site.register(Student)
#admin.site.regi... | 27.25 | 40 | 0.818807 |
7972d358a59944d6949894e15572728ccbb8c5b1 | 3,425 | py | Python | home_application/util.py | GFH24/demo | f2c2cd53d20ff1c9276d1ed9730ab0c7d0bf546f | [
"Apache-2.0"
] | null | null | null | home_application/util.py | GFH24/demo | f2c2cd53d20ff1c9276d1ed9730ab0c7d0bf546f | [
"Apache-2.0"
] | null | null | null | home_application/util.py | GFH24/demo | f2c2cd53d20ff1c9276d1ed9730ab0c7d0bf546f | [
"Apache-2.0"
] | null | null | null | from common.log import logger
from blueking.component.shortcuts import get_client_by_user
from home_application.models import Logs
import time
import base64
import pdb
def get_job_instance_id(client, biz_id, ip, command):
"""
创建快速执行脚本作业
"""
script_content = base64.b64encode(command)
kwargs = {
... | 27.620968 | 86 | 0.471533 |
7972d61411229b8967d5f2f7fc164f4f7ea6c0d0 | 1,497 | py | Python | Cancel.py | kingazazel/Bot-cancel | 6ad55be687f4056bbb221c8dc1e8f3153a009ea5 | [
"Apache-2.0"
] | null | null | null | Cancel.py | kingazazel/Bot-cancel | 6ad55be687f4056bbb221c8dc1e8f3153a009ea5 | [
"Apache-2.0"
] | null | null | null | Cancel.py | kingazazel/Bot-cancel | 6ad55be687f4056bbb221c8dc1e8f3153a009ea5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import LINETHB
from LINETHB.lib.curve.ttypes import *
from datetime import datetime
import time,random,sys,json,codecs,threading,glob,os,subprocess,multiprocessing
cl = LINETHB.LINE()
try:
cl.login(qr=True)
print u"login success"
except:
pass
reload(sys)
sys.setdefaultencoding('utf... | 26.263158 | 89 | 0.531062 |
7972d64998e0a8262e0ab359760097ae1cb50432 | 3,853 | py | Python | libs/external_libs/docutils-0.4/docutils/parsers/rst/languages/sk.py | google-code-export/django-hotclub | d783a5bbcc06816289565f3eae6d99461188ca4a | [
"MIT"
] | 3 | 2015-12-25T14:45:36.000Z | 2016-11-28T09:58:03.000Z | libs/external_libs/docutils-0.4/docutils/parsers/rst/languages/sk.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | libs/external_libs/docutils-0.4/docutils/parsers/rst/languages/sk.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | # Author: Miroslav Vasko
# Contact: zemiak@zoznam.sk
# Revision: $Revision: 4229 $
# Date: $Date: 2005-12-23 00:46:16 +0100 (Fri, 23 Dec 2005) $
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/doc... | 40.989362 | 81 | 0.651181 |
7972d673bb1c0d2e04f100d0d3d2ddebcdeded12 | 9,083 | py | Python | networkx/drawing/tests/test_agraph.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | networkx/drawing/tests/test_agraph.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 25 | 2020-11-16T15:36:41.000Z | 2021-06-01T05:15:31.000Z | networkx/drawing/tests/test_agraph.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | """Unit tests for PyGraphviz interface."""
import os
import tempfile
import pytest
pygraphviz = pytest.importorskip("pygraphviz")
from networkx.testing import assert_edges_equal, assert_nodes_equal, assert_graphs_equal
import networkx as nx
class TestAGraph:
def build_graph(self, G):
edges = [("A", "B... | 36.332 | 88 | 0.608169 |
7972d6979fa269883ca825ea556853c06ff52718 | 3,089 | py | Python | inquirer/render/console/_list.py | StevenWoodsCtx/python-inquirer | 6f1298f3fe7bcea1c7ecaec13ce82a5e486a7661 | [
"MIT"
] | 1 | 2019-12-15T09:30:01.000Z | 2019-12-15T09:30:01.000Z | inquirer/render/console/_list.py | worldofpeace/python-inquirer | c1b3bc776cec72b5039068ecbac509ce90d2e123 | [
"MIT"
] | null | null | null | inquirer/render/console/_list.py | worldofpeace/python-inquirer | c1b3bc776cec72b5039068ecbac509ce90d2e123 | [
"MIT"
] | 1 | 2019-12-15T10:12:48.000Z | 2019-12-15T10:12:48.000Z | # -*- coding: utf-8 -*-
from readchar import key
from .base import BaseConsoleRender, MAX_OPTIONS_DISPLAYED_AT_ONCE, \
half_options
from inquirer import errors
class List(BaseConsoleRender):
def __init__(self, *args, **kwargs):
super(List, self).__init__(*args, **kwargs)
self.current = self._... | 34.707865 | 79 | 0.57462 |
7972d69a5b44e04573709c21dbce1a5035708132 | 14,378 | py | Python | ibis/backends/impala/tests/test_sql.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-08-19T03:36:26.000Z | 2020-08-19T03:36:26.000Z | ibis/backends/impala/tests/test_sql.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | null | null | null | ibis/backends/impala/tests/test_sql.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2 | 2020-11-27T22:21:50.000Z | 2021-04-03T09:36:25.000Z | import operator
import unittest
import pytest
import ibis
from ibis.backends.impala.compiler import to_sql # noqa: E402
from ibis.backends.impala.tests.mocks import MockImpalaConnection
from ibis.tests.sql.test_compiler import ExprTestCases
pytest.importorskip('sqlalchemy')
pytest.importorskip('impala.dbapi')
pyt... | 25.72093 | 120 | 0.575254 |
7972d6ada59d13a4a476997b92aa0bdf3f78f33f | 4,832 | py | Python | eval.py | wooks527/mobilenetv2-pytorch | c6505b01a0374cf77504fee4ac34a71a5f8c13e0 | [
"MIT"
] | 2 | 2021-03-26T03:30:50.000Z | 2021-03-26T03:32:13.000Z | eval.py | wooks527/mobilenetv2-pytorch | c6505b01a0374cf77504fee4ac34a71a5f8c13e0 | [
"MIT"
] | null | null | null | eval.py | wooks527/mobilenetv2-pytorch | c6505b01a0374cf77504fee4ac34a71a5f8c13e0 | [
"MIT"
] | null | null | null | import argparse
import time
import torch
import torch.nn as nn
import torch.optim as optim
from torchvision import datasets, transforms
from models.mobilenetv2 import MobileNetV2
def load_data(data_dir):
'''Load dataset.
Args:
data_dir (str): dataset path to load dataset
Returns:
dat... | 35.792593 | 129 | 0.638659 |
7972d6bc421f34053a12132579126225a7195460 | 515 | py | Python | 2021/Round1A/PrimeTime/sol07.py | fujihiraryo/google-code-jam | 235b608ba90a252cbc4a062ce5c7b7a33956fc61 | [
"CC0-1.0"
] | null | null | null | 2021/Round1A/PrimeTime/sol07.py | fujihiraryo/google-code-jam | 235b608ba90a252cbc4a062ce5c7b7a33956fc61 | [
"CC0-1.0"
] | null | null | null | 2021/Round1A/PrimeTime/sol07.py | fujihiraryo/google-code-jam | 235b608ba90a252cbc4a062ce5c7b7a33956fc61 | [
"CC0-1.0"
] | null | null | null | from itertools import product
t = int(input())
for case in range(t):
m = int(input())
ps, ns = [], []
for _ in range(m):
p, n = map(int, input().split())
ps.append(p)
ns.append(n)
ans = 0
for xs in product(*[range(n + 1) for n in ns]):
sums = 0
pros = 1
... | 24.52381 | 51 | 0.446602 |
7972d7aceb74fe7e942da28c194f5d296870bc83 | 544 | py | Python | test/xmltest.py | dreammis/wechat_dinner | 049a24ec3e6cc8c69b4f89540984c32d79823f75 | [
"MIT"
] | null | null | null | test/xmltest.py | dreammis/wechat_dinner | 049a24ec3e6cc8c69b4f89540984c32d79823f75 | [
"MIT"
] | null | null | null | test/xmltest.py | dreammis/wechat_dinner | 049a24ec3e6cc8c69b4f89540984c32d79823f75 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import codecs
from lxml import etree
f = codecs.open(u'post.xml', u'r', u'utf-8')
content = u''.join(f.readlines())
f.close()
xmlstr = etree.fromstring(content.decode(u'UTF-8'))
dict_xml = {}
for child in xmlstr:
#print child.tag, ':', child.text
dict_tmp = {}
for node in child.getc... | 23.652174 | 51 | 0.617647 |
7972d851481024b90032be223d0d6f1298ba0cdc | 289 | py | Python | app/modules/blog_posts/migrations/0015_merge_20200409_1317.py | nickmoreton/nhsx-website | 2397d1308376c02b75323d30e6bc916af0daac9d | [
"MIT"
] | 50 | 2019-04-04T17:50:00.000Z | 2021-08-05T15:08:37.000Z | app/modules/blog_posts/migrations/0015_merge_20200409_1317.py | nickmoreton/nhsx-website | 2397d1308376c02b75323d30e6bc916af0daac9d | [
"MIT"
] | 434 | 2019-04-04T18:25:32.000Z | 2022-03-31T18:23:37.000Z | app/modules/blog_posts/migrations/0015_merge_20200409_1317.py | nhsx-mirror/nhsx-website | 2133b4e275ca35ff77f7d6874e809f139ec4bf86 | [
"MIT"
] | 23 | 2019-04-04T09:52:07.000Z | 2021-04-11T07:41:47.000Z | # Generated by Django 3.0.4 on 2020-04-09 13:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("blog_posts", "0014_auto_20200409_1210"),
("blog_posts", "0014_remove_blogpostindexpage_headline"),
]
operations = []
| 20.642857 | 65 | 0.685121 |
7972db5ecfc8fd9ca0eee0de494d68ab5328947e | 1,498 | py | Python | greenbyteapi/models/site.py | charlie9578/greenbyte-api-sdk | 6835ee1f6a667b5c7827c5248391081f06b75513 | [
"MIT"
] | null | null | null | greenbyteapi/models/site.py | charlie9578/greenbyte-api-sdk | 6835ee1f6a667b5c7827c5248391081f06b75513 | [
"MIT"
] | null | null | null | greenbyteapi/models/site.py | charlie9578/greenbyte-api-sdk | 6835ee1f6a667b5c7827c5248391081f06b75513 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
greenbyteapi
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""
class Site(object):
"""Implementation of the 'Site' model.
TODO: type model description here.
Attributes:
site_id (int): The id of a site.
title (string... | 23.40625 | 83 | 0.578772 |
7972dbb3a2a1b9ce46aca4193f409bdd22441d81 | 3,978 | py | Python | tempest/api/identity/admin/v3/test_endpoints_negative.py | anshprat/tempest | 890bf4f03cd8ae4af90fd3c3cd922f76fbbc699f | [
"Apache-2.0"
] | null | null | null | tempest/api/identity/admin/v3/test_endpoints_negative.py | anshprat/tempest | 890bf4f03cd8ae4af90fd3c3cd922f76fbbc699f | [
"Apache-2.0"
] | null | null | null | tempest/api/identity/admin/v3/test_endpoints_negative.py | anshprat/tempest | 890bf4f03cd8ae4af90fd3c3cd922f76fbbc699f | [
"Apache-2.0"
] | null | null | null |
# Copyright 2013 IBM Corp.
# 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... | 40.591837 | 79 | 0.672448 |
7972dc2ef5dd8aec20132db2d1ffb6c851853dd5 | 5,119 | py | Python | scripts/analyse_list_of_samples.py | jmche/DNAscan | 3702a4a9fce12f34f6cf34d65b3b6fde7dbfa9dd | [
"MIT"
] | null | null | null | scripts/analyse_list_of_samples.py | jmche/DNAscan | 3702a4a9fce12f34f6cf34d65b3b6fde7dbfa9dd | [
"MIT"
] | null | null | null | scripts/analyse_list_of_samples.py | jmche/DNAscan | 3702a4a9fce12f34f6cf34d65b3b6fde7dbfa9dd | [
"MIT"
] | null | null | null | ################################################################
# Program: DNAscan - script to run DNAscan on a list of samples
# Version 1.0
# Author: Alfredo Iacoangeli (alfredo.iacoangeli@kcl.ac.uk)
#################################################################
##################################################... | 48.752381 | 1,041 | 0.619652 |
7972dc6946246ec7f635ba628534aecd58bfdcbd | 163 | py | Python | src/classes/structures/Indice.py | ogoes/compiler-improvement | dbed16b88ed43630480daf6fffda69805d9cb807 | [
"MIT"
] | null | null | null | src/classes/structures/Indice.py | ogoes/compiler-improvement | dbed16b88ed43630480daf6fffda69805d9cb807 | [
"MIT"
] | null | null | null | src/classes/structures/Indice.py | ogoes/compiler-improvement | dbed16b88ed43630480daf6fffda69805d9cb807 | [
"MIT"
] | null | null | null | from classes.Base import Base
class Indice(Base):
def __init__(self, **data):
data['identifier'] = 'INDICE'
super().__init__(data)
| 16.3 | 37 | 0.588957 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.