hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08933c70b0a36c7d409eff14e7a6fbfb1238417a | 1,558 | py | Python | src/onevision/nn/loss/default_loss.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/nn/loss/default_loss.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/nn/loss/default_loss.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
from torch import nn
from onevision.factory import LOSSES
# MARK: - Register
LOSSES.register(name="bce_loss", module=nn.BCELoss)
LOSSES.register(name="bce_with_logits_loss", module=nn.BCEWithLogitsLoss)
LOSSES.regis... | 45.823529 | 98 | 0.757381 |
08938eaf6807ba9923d26872ac1bc7983fcdb903 | 2,021 | py | Python | graph/305_number_of_islands_ii.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | graph/305_number_of_islands_ii.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | null | null | null | graph/305_number_of_islands_ii.py | shawlu95/Algorithm-Toolbox | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | [
"MIT"
] | 2 | 2020-02-07T20:49:02.000Z | 2020-02-11T06:01:55.000Z | class DSU(object):
def __init__(self, nrows, ncols):
self.count = 0
self.par = [-1] * (nrows * ncols)
self.rnk = [0] * (nrows * ncols)
def isLand(self, idx):
return self.par[idx] != -1
def setLand(self, idx):
self.par[idx] = idx # initialize parent to itself
... | 28.464789 | 99 | 0.470559 |
08938fc5f51d911f3f216c24971c191a3a6a7eb8 | 193 | py | Python | terrascript/boundary/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/boundary/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/boundary/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/boundary/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
| 21.444444 | 79 | 0.766839 |
0893c368e36e0e62f9d6b904d738c8cc043db2b2 | 511 | py | Python | abc/abc246/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/abc246/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/abc246/c/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N, K, X = na()
A = na()
A.sort()
for i in range(N - 1, -1, -1):
... | 17.033333 | 53 | 0.553816 |
08941b81f82d93ef65e584c886efbd0d8f5db974 | 3,525 | py | Python | intersight/models/mo_base_mo_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/mo_base_mo_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/mo_base_mo_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class MoBaseMoRef(object):
"""
NOTE: This class is ... | 23.5 | 77 | 0.530496 |
08943dd7f00de3752e4462fb74402d90e817b8ff | 29,483 | py | Python | hw/ip/otbn/util/rig/model.py | CrevinnTeoranta/opentitan | 1e4989944a3d9657aca16a5a968dc2b7f32d0be4 | [
"Apache-2.0"
] | 1 | 2021-01-12T10:32:17.000Z | 2021-01-12T10:32:17.000Z | hw/ip/otbn/util/rig/model.py | LIKEJMJJ/opentitan | 201be0e0bda391cb0a92fbf62ecfbcf6706949db | [
"Apache-2.0"
] | null | null | null | hw/ip/otbn/util/rig/model.py | LIKEJMJJ/opentitan | 201be0e0bda391cb0a92fbf62ecfbcf6706949db | [
"Apache-2.0"
] | null | null | null | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import math
import random
from typing import Dict, List, Optional, Set, Tuple
from shared.insn_yaml import Insn
from shared.operand import (OperandType,
... | 39.102122 | 83 | 0.572567 |
089454583f182cb0366eb04803d6888c64ca74d0 | 35,356 | py | Python | sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/operations/_inbound_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/operations/_inbound_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/operations/_inbound_endpoints_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.75443 | 232 | 0.677367 |
089494b5f4450c526effe32d51181d06c37eb291 | 452 | py | Python | setup.py | shyams2/jax-fenics-adjoint | 7c0f1e9ea3b74966d44f38e29135fc2aa05ec6dd | [
"MIT"
] | 61 | 2020-03-03T22:01:29.000Z | 2022-03-31T19:32:14.000Z | setup.py | pmistani/jax-fenics-adjoint | 19e51719adc4a816192b3b0719e1c0208d4ff242 | [
"MIT"
] | 6 | 2020-03-04T15:42:45.000Z | 2021-12-25T23:04:14.000Z | setup.py | pmistani/jax-fenics-adjoint | 19e51719adc4a816192b3b0719e1c0208d4ff242 | [
"MIT"
] | 10 | 2020-03-04T15:14:57.000Z | 2022-01-19T03:29:50.000Z | from setuptools import setup
import sys
if sys.version_info < (3, 6):
print("Python 3.6 or higher required, please upgrade.")
sys.exit(1)
setup(
name="jaxfenics_adjoint",
version="1.0.0",
description="JAX-FEniCS interface using dolfin-adjoint",
url="https://github.com/IvanYashchuk/jax-fenics"... | 23.789474 | 60 | 0.670354 |
0894a70c63445ec9cae1d303987ace81379e3d36 | 260 | py | Python | 0x05-python-exceptions/100-safe_print_integer_err.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x05-python-exceptions/100-safe_print_integer_err.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x05-python-exceptions/100-safe_print_integer_err.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
import sys
def safe_print_integer_err(value):
try:
print("{:d}".format(value))
return True
except (ValueError, TypeError) as error:
print("Exception: {}".format(error), file=sys.stderr)
return False
| 21.666667 | 61 | 0.626923 |
0894af28216f7035c41233a5393c1611dd0d73a5 | 5,415 | py | Python | tracopt/ticket/deleter.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | tracopt/ticket/deleter.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | tracopt/ticket/deleter.py | mikiec84/trac | d51a7119b9fcb9061d7fe135c7d648fa671555dd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2010-2020 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://trac.edgewall.org/wiki/TracLicense.
#
# This software cons... | 40.714286 | 78 | 0.613112 |
0894c44066edb7d4e6129db6e516d311926c0d90 | 5,523 | py | Python | discord/internal/dispatcher.py | kekda-py/discord.io | c624f404220ac8da45a5f8f7b261c5b50b57d717 | [
"MIT"
] | null | null | null | discord/internal/dispatcher.py | kekda-py/discord.io | c624f404220ac8da45a5f8f7b261c5b50b57d717 | [
"MIT"
] | null | null | null | discord/internal/dispatcher.py | kekda-py/discord.io | c624f404220ac8da45a5f8f7b261c5b50b57d717 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# cython: language_level=3
# Copyright (c) 2021-present VincentRPS
# 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 t... | 32.680473 | 83 | 0.576679 |
0894dfa965ff713530dc94efdf764e25087ecbea | 848 | py | Python | nibble/__init__.py | gebn/nibble | e82a2c43509ed38f3d039040591cc630fa676cb0 | [
"MIT"
] | 1 | 2018-09-05T21:38:11.000Z | 2018-09-05T21:38:11.000Z | nibble/__init__.py | gebn/nibble | e82a2c43509ed38f3d039040591cc630fa676cb0 | [
"MIT"
] | 20 | 2017-05-28T12:53:44.000Z | 2022-02-18T18:03:17.000Z | nibble/__init__.py | gebn/nibble | e82a2c43509ed38f3d039040591cc630fa676cb0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pkg_resources import get_distribution, DistributionNotFound
import os
from nibble.information import Information
from nibble.duration import Duration
from nibble.speed import Speed
from nibble.expression.lexer import Lexer, LexingError
from nibble.e... | 28.266667 | 64 | 0.775943 |
0894e3e4986aa11cf74a23339f24329c67faa3be | 1,470 | py | Python | 01 Basics/002 - Basic types/002 -c- String Fomating - Metodo alternativo.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | 01 Basics/002 - Basic types/002 -c- String Fomating - Metodo alternativo.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | 01 Basics/002 - Basic types/002 -c- String Fomating - Metodo alternativo.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Mattia Benedetti
# All rights reserved.
#
# Author: Mattia Benedetti
"""
- String Formatting / rappresentation -
https://docs.python.org/2/library/string.html
strings Stringhe o liste di caratteri. In python non esiste il tipo di variabi... | 28.269231 | 107 | 0.65034 |
0895319654d656fae9da31588a56f5ab0343328f | 6,658 | py | Python | tests/forte/data/entry_data_structures_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | tests/forte/data/entry_data_structures_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | tests/forte/data/entry_data_structures_test.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | import unittest
from dataclasses import dataclass
from typing import Optional, List, Any, Iterator
from forte.data.data_pack import DataPack
from forte.data.multi_pack import MultiPack
from forte.data.ontology import Generics, MultiPackGeneric, Annotation
from forte.data.ontology.core import FList, FDict, MpPointer, P... | 30.967442 | 77 | 0.66912 |
089539622c111a5b4b69ef4f7bbce685df2acbde | 2,891 | py | Python | devices/common/jsonstorage.py | stko/Schnipsl | 824572c657e48f18950f584b9529661ff5bb8069 | [
"MIT"
] | null | null | null | devices/common/jsonstorage.py | stko/Schnipsl | 824572c657e48f18950f584b9529661ff5bb8069 | [
"MIT"
] | 29 | 2020-08-30T15:07:50.000Z | 2022-02-19T03:41:26.000Z | devices/common/jsonstorage.py | stko/Schnipsl | 824572c657e48f18950f584b9529661ff5bb8069 | [
"MIT"
] | 1 | 2020-12-28T05:46:17.000Z | 2020-12-28T05:46:17.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import json
import schnipsllogger
from directorymapper import DirectoryMapper
logger = schnipsllogger.getLogger(__name__)
class JsonStorage:
'''loads and saves persistent data as json to disk
'''
def __init__(self, module_name,storage_type,filename, defaul... | 29.20202 | 128 | 0.694569 |
08954394f77d18f01b9629196b7769091eccbb92 | 1,246 | py | Python | examples/tito/scripts/config_to_c_code.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | examples/tito/scripts/config_to_c_code.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | examples/tito/scripts/config_to_c_code.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import platform
if platform.system() == 'Windows':
MYPYTHON = 'python'
MYCODEROOT = 'c:/coderoot'
else:
MYPYTHON = 'python3'
MYCODEROOT = '/coderoot'
# Slave device hardware, like espcam, specifies from which HW subfolder signals are taken. Use '*' for same HW as in th... | 37.757576 | 130 | 0.70947 |
08956666fdc328eb123672bb90751bbfe280f3cb | 368 | py | Python | reveries/maya/arnold/__init__.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | reveries/maya/arnold/__init__.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | reveries/maya/arnold/__init__.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z | from maya import cmds
from .utils import (
get_arnold_aov_nodes,
get_arnold_aov_names,
get_all_light_groups,
create_standin,
create_volume,
)
# Requirement, obviously
cmds.loadPlugin('mtoa', quiet=True)
__all__ = (
"get_arnold_aov_nodes",
"get_arnold_aov_names",
"get_all_light_groups... | 16.727273 | 35 | 0.709239 |
08959bc8cbc067e584b7df22f61e3b9e17e37ee5 | 17,989 | py | Python | bufkit.py | rnleach/meteopy | 7d5c432ca311338a0795a980ca70c4c057159e2c | [
"MIT"
] | null | null | null | bufkit.py | rnleach/meteopy | 7d5c432ca311338a0795a980ca70c4c057159e2c | [
"MIT"
] | 2 | 2021-05-25T11:34:14.000Z | 2021-07-28T02:19:39.000Z | bufkit.py | rnleach/meteopy | 7d5c432ca311338a0795a980ca70c4c057159e2c | [
"MIT"
] | 1 | 2021-07-17T18:37:52.000Z | 2021-07-17T18:37:52.000Z | """Module for loading Bufkit files."""
from collections import namedtuple
from datetime import datetime as dt
from datetime import timezone as tz
from itertools import zip_longest
from os import listdir
import os.path as path
import re
from math import sin, cos, pi
import numpy as np
class Profile(
namedtuple(... | 34.862403 | 100 | 0.542443 |
0895dc0d3e5696049c50d6791d91b4f5b8c5e5db | 8,582 | py | Python | src/speech/model_joint.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 6 | 2020-08-03T03:13:25.000Z | 2022-02-11T08:32:10.000Z | src/speech/model_joint.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 1 | 2020-09-08T16:10:38.000Z | 2020-09-08T16:10:38.000Z | src/speech/model_joint.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 2 | 2020-08-03T21:37:21.000Z | 2021-03-26T02:19:17.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import pdb
import numpy as np
from torch.nn.utils.rnn import pad_packed_sequence, pad_sequence, pack_padded_sequence
output = []
class LSTM_Audio(nn.Module):
def __init__(self, hidden_dim, num_layers, device,dropout_rate=0 ,bidirectional=False):
... | 46.139785 | 183 | 0.651946 |
0895f233f1ef5a7384ab8ac1a9f2c6d0f39b4b96 | 76 | py | Python | src/SpiderPi/__init__.py | peteh/spiderpi | 19c4e254979a756acb641b67e944568c7c79520c | [
"MIT"
] | null | null | null | src/SpiderPi/__init__.py | peteh/spiderpi | 19c4e254979a756acb641b67e944568c7c79520c | [
"MIT"
] | 1 | 2019-09-20T12:48:52.000Z | 2019-09-20T17:55:39.000Z | src/__init__.py | RehiveTech/netconnect-backend | f3f690c776b5b9b9200dd40f06115fe00d5cd8a2 | [
"BSD-2-Clause"
] | null | null | null | import os, sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
| 25.333333 | 60 | 0.776316 |
089613bae5ed9f0e3cd2e7c3b414a9fa9897713b | 6,093 | py | Python | src/streamlink/plugins/dplay.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2019-11-25T01:37:21.000Z | 2019-11-25T01:37:21.000Z | src/streamlink/plugins/dplay.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/dplay.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | """Plugin for Dplay service."""
import re
import time
from streamlink.compat import quote
from streamlink.exceptions import PluginError, NoStreamsError
from streamlink.plugin import Plugin
from streamlink.plugin.api import StreamMapper, http, validate
from streamlink.stream import HLSStream, HDSStream
# Interface UR... | 37.611111 | 119 | 0.576399 |
08962022884c74f6a809a27d8eeee0136af8f543 | 312 | py | Python | dynamo_db_resource/conditions.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | dynamo_db_resource/conditions.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | dynamo_db_resource/conditions.py | janluak/dynamo_db_resource | f05403b61c71b1df8dcad65e099c648507f295e7 | [
"Apache-2.0"
] | null | null | null | from boto3.dynamodb.conditions import (
Equals,
NotEquals,
LessThanEquals,
LessThan,
GreaterThanEquals,
GreaterThan,
Between,
BeginsWith,
In,
Contains,
Size,
AttributeType,
AttributeExists,
AttributeNotExists,
Attr,
And,
Or,
Not,
Key
)
| 14.181818 | 39 | 0.608974 |
08963c6536b00d832ddc3dd8259e548045afec36 | 3,103 | py | Python | setup.py | joLahann/dapnn | 393ee55fe01c654de5fbc96589688ddc92e0dcda | [
"Apache-2.0"
] | 5 | 2022-03-26T12:19:43.000Z | 2022-03-28T07:01:41.000Z | setup.py | joLahann/dapnn | 393ee55fe01c654de5fbc96589688ddc92e0dcda | [
"Apache-2.0"
] | 3 | 2022-03-29T16:43:14.000Z | 2022-03-29T18:21:52.000Z | setup.py | jake-vikoren/ramprasad | a06cc548a275370ef59ddd629501e4af36c43717 | [
"Apache-2.0"
] | null | null | null | from pkg_resources import parse_version
from configparser import ConfigParser
import setuptools,re,sys
assert parse_version(setuptools.__version__)>=parse_version('36.2')
# note: all settings are in settings.ini; edit there, not here
config = ConfigParser(delimiters=['='])
config.read('settings.ini')
cfg = config['DEF... | 47.738462 | 193 | 0.653561 |
08965ea10fb3cbefad795693b01ec2bfbd7a46b4 | 1,181 | py | Python | pyvalidator/constraints/stdtype_validator.py | TangoMan75/pyvalidator | 277743353bc03b660c420228d355d59f10f944b6 | [
"MIT"
] | null | null | null | pyvalidator/constraints/stdtype_validator.py | TangoMan75/pyvalidator | 277743353bc03b660c420228d355d59f10f944b6 | [
"MIT"
] | null | null | null | pyvalidator/constraints/stdtype_validator.py | TangoMan75/pyvalidator | 277743353bc03b660c420228d355d59f10f944b6 | [
"MIT"
] | null | null | null | #!/bin/python3
# -*- coding: utf-8 -*-
"""
This file is part of the TangoMan PyValidator package.
(c) "Matthias Morin" <mat@tangoman.io>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
"""
from typing import Any
from pyvalidator.constraints.abstract_va... | 26.244444 | 116 | 0.669771 |
08967c9eb36e7b0d9105acf635a623413c397086 | 2,472 | py | Python | angrmanagement/data/jobs/cfg_generation.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/data/jobs/cfg_generation.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/data/jobs/cfg_generation.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null |
import time
import logging
from ...logic import GlobalInfo
from ...logic.threads import gui_thread_schedule_async
from .job import Job
_l = logging.getLogger(name=__name__)
class CFGGenerationJob(Job):
DEFAULT_CFG_ARGS = {
'normalize': True, # this is what people naturally expect
'resolve_ind... | 29.428571 | 115 | 0.587783 |
08968c253c71c064de9f2573d397896f01cb29dd | 334 | py | Python | SerialReader/db/Memory.py | 923132714/SerialReader | 1c687ff139f280edc25d676569797b36a5951cbd | [
"Apache-2.0"
] | 1 | 2019-01-30T09:51:32.000Z | 2019-01-30T09:51:32.000Z | SerialReader/db/Memory.py | 923132714/SerialReader | 1c687ff139f280edc25d676569797b36a5951cbd | [
"Apache-2.0"
] | null | null | null | SerialReader/db/Memory.py | 923132714/SerialReader | 1c687ff139f280edc25d676569797b36a5951cbd | [
"Apache-2.0"
] | null | null | null | """
@Time : 2019/2/19 18:57
@author Logic923
@Project : SerialReader
@FileName: Memory.py
@Software: PyCharm
"""
class Memory:
def __exit__(self, exc_type, exc_val, exc_tb):
pass
def __init__(self):
pass
def commit_air_quality_data(self):
pass
def select_air_quality_data(self):... | 18.555556 | 50 | 0.649701 |
08968cd086e23787e4649ccba3eb1b01d3c53604 | 2,188 | py | Python | tests/unit/test_keyconventions.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2020-12-04T17:59:19.000Z | 2020-12-04T17:59:19.000Z | tests/unit/test_keyconventions.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | null | null | null | tests/unit/test_keyconventions.py | microprediction/predictionserver | 817243a4c85aac63995ab3a18cfbdcb01bb07bd0 | [
"MIT"
] | 1 | 2021-03-05T05:03:36.000Z | 2021-03-05T05:03:36.000Z | from predictionserver.futureconventions.keyconventions import KeyConventions
from predictionserver.futureconventions.activityconventions import Activity
import pytest
from predictionserver.set_config import MICRO_TEST_CONFIG
BABLOH_CATTLE = MICRO_TEST_CONFIG['BABLOH_CATTLE']
def test_init():
kc = KeyConventions... | 30.816901 | 87 | 0.771481 |
0896a00f400830a8eb41593559f65d607a6a09c6 | 1,358 | py | Python | flappy-brird/utils/radio.py | victorathanasio/Personal-projects | 94c870179cec32aa733a612a6faeb047df16d977 | [
"MIT"
] | null | null | null | flappy-brird/utils/radio.py | victorathanasio/Personal-projects | 94c870179cec32aa733a612a6faeb047df16d977 | [
"MIT"
] | null | null | null | flappy-brird/utils/radio.py | victorathanasio/Personal-projects | 94c870179cec32aa733a612a6faeb047df16d977 | [
"MIT"
] | null | null | null | import pygame
import os
class Radio:
def __init__(self, settings):
"""
Method that initiates the object Radio for game sounds
Input = (Dict)
"""
pygame.mixer.init()
self.file_die_sound = pygame.mixer.Sound('Assets/Sounds/die.mp3')
self.file_hit_sound = ... | 25.148148 | 77 | 0.611193 |
0896b35713f0930adda31362e76745a69051655b | 2,987 | py | Python | bitly-url-shorterer.py | KirillYabl/bitly-url-shorterer | 6324d65e49680bec07de114096f4befbdbaf23c6 | [
"MIT"
] | null | null | null | bitly-url-shorterer.py | KirillYabl/bitly-url-shorterer | 6324d65e49680bec07de114096f4befbdbaf23c6 | [
"MIT"
] | null | null | null | bitly-url-shorterer.py | KirillYabl/bitly-url-shorterer | 6324d65e49680bec07de114096f4befbdbaf23c6 | [
"MIT"
] | null | null | null | import requests
import os
import argparse
import dotenv
dotenv.load_dotenv()
token = os.getenv('TOKEN')
def cut_link_for_api(link):
'''Cut (http:// or https://) + www. for transfer to bit.ly API.'''
if link.startswith('http://'):
link = link[len('http://'):]
if link.startswith('https://'):
link... | 27.154545 | 100 | 0.678273 |
0896b4956cf127c3165684b7c7b83165cfb6aa76 | 2,782 | py | Python | crowdastro/active_learning/test.py | chengsoonong/crowdastro | ce14432c36de0574b73d813304365b74446a61f8 | [
"MIT"
] | 13 | 2015-11-07T15:24:44.000Z | 2020-04-20T05:29:58.000Z | crowdastro/active_learning/test.py | chengsoonong/crowdastro | ce14432c36de0574b73d813304365b74446a61f8 | [
"MIT"
] | 234 | 2016-02-21T23:53:16.000Z | 2019-06-27T00:26:08.000Z | crowdastro/active_learning/test.py | chengsoonong/crowdastro | ce14432c36de0574b73d813304365b74446a61f8 | [
"MIT"
] | 3 | 2015-11-07T00:20:09.000Z | 2018-10-03T13:37:15.000Z | """Tests active learning agents with pool-based binary classification.
Matthew Alger
The Australian National University
2016
"""
import multiprocessing
import multiprocessing.pool
import matplotlib.pyplot as plt
import numpy
import sklearn.cross_validation
import sklearn.datasets
import sklearn.ensemble
import sklea... | 34.345679 | 76 | 0.689792 |
0896ce596bab6f12cb2a76e99bdba77201fc3ffa | 471 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/aw9523_set_all_outputs.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/aw9523_set_all_outputs.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/aw9523_set_all_outputs.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: Copyright (c) 2020 ladyada for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import busio
import board
import adafruit_aw9523
i2c = busio.I2C(board.SCL, board.SDA)
aw = adafruit_aw9523.AW9523(i2c)
print("Found AW9523")
# Set all pins to outputs
aw.directions = 0xFFFF
whi... | 20.478261 | 76 | 0.732484 |
0896d7027175d1cdccfab03ae4853c9777493db9 | 192 | py | Python | terrascript/freeipa/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/freeipa/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/freeipa/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/freeipa/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
| 21.333333 | 79 | 0.765625 |
0896f4a71de63f51f6582b7bfe2524745255041c | 1,363 | py | Python | Application Support/BBEdit/Packages/dLinter.bbpackage/Contents/Text Filters/Beautify/Tidy Markdown Reference Links.py | bhdicaire/bbeditSetup | 40ddb2e628e81d57e6e0c21fb983d37ee02f3f7e | [
"Unlicense"
] | null | null | null | Application Support/BBEdit/Packages/dLinter.bbpackage/Contents/Text Filters/Beautify/Tidy Markdown Reference Links.py | bhdicaire/bbeditSetup | 40ddb2e628e81d57e6e0c21fb983d37ee02f3f7e | [
"Unlicense"
] | null | null | null | Application Support/BBEdit/Packages/dLinter.bbpackage/Contents/Text Filters/Beautify/Tidy Markdown Reference Links.py | bhdicaire/bbeditSetup | 40ddb2e628e81d57e6e0c21fb983d37ee02f3f7e | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
import sys
import re
'''Read a Markdown file via standard input and tidy its
reference links. The reference links will be numbered in
the order they appear in the text and placed at the bottom
of the file.'''
# The regex for finding reference links in the text. Don't find
# footnotes by mistake.
li... | 30.288889 | 78 | 0.673514 |
0896f832ba0c314eed90a83a44e4964267e3ad4e | 1,084 | py | Python | index.py | edward0rtiz/clustering-demand-scm | 0e7dd436b66eba29eebe4f540e51c89d40d7d897 | [
"MIT"
] | null | null | null | index.py | edward0rtiz/clustering-demand-scm | 0e7dd436b66eba29eebe4f540e51c89d40d7d897 | [
"MIT"
] | null | null | null | index.py | edward0rtiz/clustering-demand-scm | 0e7dd436b66eba29eebe4f540e51c89d40d7d897 | [
"MIT"
] | null | null | null | import os
import pathlib
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import ClientsideFunction, Input, Output, State
from dash.exceptions import PreventUpdate
from app import app, server
from lib import na... | 28.526316 | 78 | 0.666974 |
0897031b0bc820d1b6cd30f156f7b4105f2b9179 | 14,726 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/11_tests_on_clr/train_russ_schedule.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/11_tests_on_clr/train_russ_schedule.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/GAPNet/11_tests_on_clr/train_russ_schedule.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 34.731132 | 123 | 0.665082 |
08970345f8004a1e17a98e8e2ba70c85a3c5cbbe | 1,837 | py | Python | backend/src/baserow/contrib/database/ws/rows/signals.py | ericderace/baserow | 7b35e81f75166d914d07ef4ad0c30c625b6bb396 | [
"MIT"
] | 1 | 2021-04-13T16:27:58.000Z | 2021-04-13T16:27:58.000Z | backend/src/baserow/contrib/database/ws/rows/signals.py | jacklicn/baserow | 978d9462ededbaa96674a6653028ba19876ea273 | [
"MIT"
] | 6 | 2021-04-08T22:03:06.000Z | 2022-01-13T03:38:17.000Z | backend/src/baserow/contrib/database/ws/rows/signals.py | jacklicn/baserow | 978d9462ededbaa96674a6653028ba19876ea273 | [
"MIT"
] | null | null | null | from django.dispatch import receiver
from django.db import transaction
from baserow.ws.registries import page_registry
from baserow.contrib.database.rows import signals as row_signals
from baserow.contrib.database.api.rows.serializers import (
get_row_serializer_class, RowSerializer
)
@receiver(row_signals.row_... | 30.114754 | 67 | 0.618944 |
089714e0e1d18efbbb68ff2ba35ee3c884b8d21b | 184 | py | Python | udemy/python-video-workbook/my_progress/028.py | djrgit/coursework | 2a91da9b76cb1acbd12f3d8049f15d2e71f475a1 | [
"MIT"
] | null | null | null | udemy/python-video-workbook/my_progress/028.py | djrgit/coursework | 2a91da9b76cb1acbd12f3d8049f15d2e71f475a1 | [
"MIT"
] | null | null | null | udemy/python-video-workbook/my_progress/028.py | djrgit/coursework | 2a91da9b76cb1acbd12f3d8049f15d2e71f475a1 | [
"MIT"
] | 3 | 2018-08-13T23:14:22.000Z | 2019-01-11T22:50:07.000Z | # Exercise 28 - TypeError
def foo(a, b):
# print(a + b) # Doesn't return anything from function, causing error when called
return (a + b) # Fixed
x = foo(2, 3) * 10
print(x) | 26.285714 | 82 | 0.625 |
08972b70ecfd293fd4d9bfeea6ae6e6c2b595df8 | 1,730 | py | Python | tools/create_config/create_config.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | tools/create_config/create_config.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | tools/create_config/create_config.py | ryoma-jp/AI_Dashboard | 840c6ea9ee1ec82e46c2d6470643031c79aaa1d4 | [
"MIT"
] | null | null | null | #! -*- coding: utf-8 -*-
#---------------------------------
# モジュールのインポート
#---------------------------------
import os
import argparse
import json
from ml_params import MlParams, MlParams_MNIST, MlParams_CIFAR10
#---------------------------------
# 定数定義
#---------------------------------
#---------------------------... | 26.212121 | 101 | 0.560116 |
089750ea3d32b22417c867e0e0926adc5858992f | 13,099 | py | Python | jygsaw/shape.py | talwai/jygsaw | 70847c797ff1fb3034bf9d6f95fa6dce1b9056f7 | [
"WTFPL"
] | 2 | 2017-11-21T03:04:47.000Z | 2020-03-10T11:05:15.000Z | jygsaw/shape.py | talwai/jygsaw | 70847c797ff1fb3034bf9d6f95fa6dce1b9056f7 | [
"WTFPL"
] | null | null | null | jygsaw/shape.py | talwai/jygsaw | 70847c797ff1fb3034bf9d6f95fa6dce1b9056f7 | [
"WTFPL"
] | null | null | null | from java.awt import BasicStroke
from java.awt import Color
from java.awt import Polygon as JavaPolygon
from java.awt.geom import Rectangle2D, Ellipse2D, Line2D, Arc2D
from java.lang.Math import PI, cos, sin
from warnings import warn
class Shape():
"""
Any shape that is drawn on the canvas inherits from Shap... | 33.078283 | 97 | 0.63982 |
08977485837726ae42310cc3e25e6f40cea2f505 | 15,760 | py | Python | mmf/utils/checkpoint.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | mmf/utils/checkpoint.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | mmf/utils/checkpoint.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import glob
import importlib
import os
import sys
import warnings
import torch
from omegaconf import OmegaConf
from mmf.common.registry import registry
from mmf.utils.configuration import get_mmf_env, load_yaml
from mmf.utils.distributed import is_master, synchroniz... | 37.884615 | 87 | 0.6125 |
08977c4c06c13a971e4e1a38ab025da24645ab17 | 1,041 | py | Python | alipay/aop/api/response/AlipaySocialAntcommonwealDonateConsumeSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipaySocialAntcommonwealDonateConsumeSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipaySocialAntcommonwealDonateConsumeSyncResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipaySocialAntcommonwealDonateConsumeSyncResponse(AlipayResponse):
def __init__(self):
super(AlipaySocialAntcommonwealDonateConsumeSyncResponse, self).__init__()
sel... | 28.916667 | 123 | 0.701249 |
089818641108d9be490e1282f5b0c6e8a9638f0e | 1,280 | py | Python | page_object_models/accounts_overview_page_model.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 4 | 2019-08-12T19:36:58.000Z | 2021-09-14T18:48:27.000Z | page_object_models/accounts_overview_page_model.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 1 | 2021-06-02T00:01:00.000Z | 2021-06-02T00:01:00.000Z | page_object_models/accounts_overview_page_model.py | ikostan/ParaBankSeleniumAutomation | e28a886adba89b82a60831ad96a3a8f00f863116 | [
"Unlicense"
] | 2 | 2019-08-12T10:06:00.000Z | 2020-12-25T05:52:40.000Z | # Created by Egor Kostan.
# GitHub: https://github.com/ikostan
# LinkedIn: https://www.linkedin.com/in/egor-kostan/
from tests.config import Config
from utils.driver import Driver
from element_object_models.element import Element
from page_object_models.base_page_model import BasePageModel
from expected_results.pa... | 32.820513 | 113 | 0.7875 |
089819f4c0a24430323b87875e8a11f6377bea0c | 180 | py | Python | guest-talks/20170213-optional-static-types/syntax.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | guest-talks/20170213-optional-static-types/syntax.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | guest-talks/20170213-optional-static-types/syntax.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | # Basic type checking: no types necessary
x = 3
x + 'a'
def return_type() -> float:
return 'a'
return_type(9)
def argument_type(x: float):
return
argument_type()
| 9 | 41 | 0.644444 |
08983337fccc138d40eb959cecc5bf9e47cf6cac | 12,705 | py | Python | tensorflow/contrib/session_bundle/exporter.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/session_bundle/exporter.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/session_bundle/exporter.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.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... | 38.153153 | 80 | 0.710901 |
089837e6e7d3b9dd9c2d601fc4872ea77279b004 | 2,307 | py | Python | all/presets/continuous_test.py | kcorder/autonomous-learning-library | 0266195fa47564e51a32087bc007bff6dda5e263 | [
"MIT"
] | 584 | 2019-07-10T20:21:55.000Z | 2022-03-30T22:47:57.000Z | all/presets/continuous_test.py | kcorder/autonomous-learning-library | 0266195fa47564e51a32087bc007bff6dda5e263 | [
"MIT"
] | 104 | 2019-03-27T14:08:22.000Z | 2022-01-06T18:16:23.000Z | all/presets/continuous_test.py | kcorder/autonomous-learning-library | 0266195fa47564e51a32087bc007bff6dda5e263 | [
"MIT"
] | 66 | 2019-07-11T00:59:06.000Z | 2022-03-15T05:22:57.000Z | import os
import unittest
import torch
from all.core import State
from all.environments import GymEnvironment, DuplicateEnvironment
from all.logging import DummyWriter
from all.presets import Preset, ParallelPreset
from all.presets.continuous import (
ddpg,
ppo,
sac,
)
class TestContinuousPresets(unittest... | 30.355263 | 70 | 0.659298 |
0898411ae9b3e92542157400fce46826b478fd76 | 3,105 | py | Python | src/matrix_semantic_map/schema_test_suite.py | HumanCellAtlas/expression_matrix_2_ontology | 74048e0d4cd74b7d77199d1520e02d6c886964d9 | [
"Apache-2.0"
] | 1 | 2020-06-23T21:23:00.000Z | 2020-06-23T21:23:00.000Z | src/matrix_semantic_map/schema_test_suite.py | HumanCellAtlas/expression_matrix_2_ontology | 74048e0d4cd74b7d77199d1520e02d6c886964d9 | [
"Apache-2.0"
] | 1 | 2019-11-28T16:26:46.000Z | 2019-11-28T16:26:46.000Z | src/matrix_semantic_map/schema_test_suite.py | HumanCellAtlas/expression_matrix_2_ontology | 74048e0d4cd74b7d77199d1520e02d6c886964d9 | [
"Apache-2.0"
] | 1 | 2019-11-29T09:25:02.000Z | 2019-11-29T09:25:02.000Z | import json
from jsonschema import Draft4Validator, RefResolver, SchemaError
import warnings
import subprocess
import os
import glob
def get_json_from_file(filename, warn = False):
"""Loads json from a file.
Optionally specify warn = True to warn, rather than
fail if file not found."""
f = open(filena... | 35.284091 | 82 | 0.653462 |
089855b323f7ee7df228a89245c0d71f168c08fe | 2,941 | py | Python | src/models/train_model.py | data-modeler/rnn-surv | 83efaa319db7feaa40655033cb9cd423698a716f | [
"MIT"
] | 7 | 2020-01-25T15:22:05.000Z | 2021-12-31T06:11:49.000Z | src/models/train_model.py | texchi2/rnn-surv | 132097bae8da677ffb532d0bfebad6fcb511d2cb | [
"MIT"
] | 6 | 2020-02-05T22:35:39.000Z | 2022-02-10T01:33:58.000Z | src/models/train_model.py | texchi2/rnn-surv | 132097bae8da677ffb532d0bfebad6fcb511d2cb | [
"MIT"
] | 4 | 2019-12-26T20:16:02.000Z | 2020-12-10T15:10:38.000Z | '''
Train Model
-----------
Creates and trains an RNN-SURV model based upon inputted data and hyperparameters.
'''
import os
import json
import numpy as np
import pandas as pd
from os.path import dirname as up
from src.models.rnnsurv import get_data, DataGenerator, create_model
def train_model(train_dat:... | 33.044944 | 86 | 0.654199 |
0898636d934fadaea100f9d5f182bd658f6b6c1b | 1,401 | py | Python | packages/galapagos/scripts/lib_runner.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | 2 | 2020-10-26T05:01:35.000Z | 2022-02-14T10:37:17.000Z | packages/galapagos/scripts/lib_runner.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | packages/galapagos/scripts/lib_runner.py | 100kimch/ros_galapagos | 8f92cb93246c263b61199aef113e43cefc5f3939 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from time import sleep
import rospy
from turtlebot import TURTLE
from std_msgs.msg import String
from constants import PATH_GALAPAGOS_STATE
# * Variables
NAME = 'lib_runner'
print("----- GALAPAGOS TURTLE -----")
# * Main Codes
if __name__ == '__main__':
try:
RUN_TYPE = '... | 27.470588 | 87 | 0.600999 |
089869d5887ea5541aacb483a0215131712b5975 | 3,223 | py | Python | moody/__init__.py | tokenchain/moodyeth | e5a40ffe411fc4dc767ba8a279c1fd7c002dc975 | [
"MIT"
] | null | null | null | moody/__init__.py | tokenchain/moodyeth | e5a40ffe411fc4dc767ba8a279c1fd7c002dc975 | [
"MIT"
] | null | null | null | moody/__init__.py | tokenchain/moodyeth | e5a40ffe411fc4dc767ba8a279c1fd7c002dc975 | [
"MIT"
] | null | null | null | # Token = namedtuple('Token', ['address', 'name', 'code_hash'], defaults=(None,) * 3)
import sys
from dataclasses import dataclass
if sys.version_info < (3, 5):
raise EnvironmentError("Python 3.5 or above is required")
# __version__ = pkg_resources.get_distribution("moodyeth").version
# __all__ = [
# '__vers... | 29.036036 | 210 | 0.667391 |
089876154a8827d8708ea66a1ffc06ca4bf118da | 7,198 | py | Python | data/level/level1058.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level1058.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level1058.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 1058,
'move_count': 26,
'board_info': {
(0, 3): {
'base': (1, 1),
'prev': (0, -1),
'next': (0, 1)
},
(0, 4): {
'base': (5, 1),
'prev': (0, -1),
'next': (0, 1)
},
(0, 5): {
... | 22.996805 | 34 | 0.197555 |
0898c6e5aad27ded104cb141e7e9b2eceefa3136 | 1,598 | py | Python | bflib/characters/races/dwarf.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/characters/races/dwarf.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/characters/races/dwarf.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from datetime import timedelta
import bflib.items.weapons.ranged.bows
from bflib import languages, restrictions, units
from bflib.characters import abilityscores, classes, specialabilities, \
savingthrows
from bflib.characters.races.base import Race
class Dwarf(Race):
name = "Dwarf"
average_height = unit... | 34 | 72 | 0.690864 |
0898d05122c88e4e0d3502e92d8bfba8decb2c32 | 4,063 | py | Python | tests/metrics/test_human_impact.py | natgeosociety/marapp-metrics | f3883452fbbe4101c7a6a6481316fe78246c8be2 | [
"Apache-2.0"
] | null | null | null | tests/metrics/test_human_impact.py | natgeosociety/marapp-metrics | f3883452fbbe4101c7a6a6481316fe78246c8be2 | [
"Apache-2.0"
] | 4 | 2020-11-25T12:03:26.000Z | 2022-01-22T13:58:02.000Z | tests/metrics/test_human_impact.py | natgeosociety/marapp-metrics | f3883452fbbe4101c7a6a6481316fe78246c8be2 | [
"Apache-2.0"
] | 1 | 2021-02-23T18:58:10.000Z | 2021-02-23T18:58:10.000Z | """
Copyright 2018-2020 National Geographic Society
Use of this software does not constitute endorsement by National Geographic
Society (NGS). The NGS name and NGS logo may not be used for any purpose without
written permission from NGS.
Licensed under the Apache License, Version 2.0 (the "License"); you ma... | 32.504 | 87 | 0.673886 |
0898d23876231489d0c014e318091f17369a9426 | 2,607 | py | Python | highscores/__init__.py | graatje/highscoresbot | 26207b8191ed6c9a3d7ecd49fea482e6d3603c36 | [
"MIT"
] | null | null | null | highscores/__init__.py | graatje/highscoresbot | 26207b8191ed6c9a3d7ecd49fea482e6d3603c36 | [
"MIT"
] | null | null | null | highscores/__init__.py | graatje/highscoresbot | 26207b8191ed6c9a3d7ecd49fea482e6d3603c36 | [
"MIT"
] | null | null | null | from typing import Union, List
from .achievements import Achievements
from .ancmapcontrol import AncMapcontrol
from .bestclans import BestClans
from .btwins import Btwins
from .btwinstreak import Btwinstreak
from .bzmapcontrol import BzMapcontrol
from .cwplayers import Cwplayers
from .cwwins import Cwwins
from .dex im... | 41.380952 | 122 | 0.724588 |
0898f8ed8643c5f308e5a96d419ed62fcb4575c8 | 1,175 | py | Python | day10.py | drewbrew/advent-of-code-2015 | 885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df | [
"Apache-2.0"
] | null | null | null | day10.py | drewbrew/advent-of-code-2015 | 885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df | [
"Apache-2.0"
] | null | null | null | day10.py | drewbrew/advent-of-code-2015 | 885ec0c2f25c4ec2425c3d05dd0c9ccc5b0890df | [
"Apache-2.0"
] | null | null | null | def look_and_say(word: str) -> str:
last_char = ""
last_char_count = 0
index = 0
output = ""
while index < len(word):
if not last_char:
last_char = word[index]
last_char_count = 1
elif last_char != word[index]:
output += f"{last_char_count}{last_ch... | 25.543478 | 83 | 0.571064 |
089910cd0fdaf661b414a5f3deef8a826a2c9eff | 10,396 | py | Python | conpaas-services/src/conpaas/services/xtreemfs/agent/role.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2015-09-20T18:20:01.000Z | 2015-09-20T18:20:01.000Z | conpaas-services/src/conpaas/services/xtreemfs/agent/role.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T11:56:18.000Z | 2020-07-27T11:56:18.000Z | conpaas-services/src/conpaas/services/xtreemfs/agent/role.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 3 | 2018-09-14T16:54:14.000Z | 2020-07-26T03:14:56.000Z | # -*- coding: utf-8 -*-
"""
:copyright: (C) 2010-2013 by Contrail Consortium.
"""
from os import chown
from pwd import getpwnam
from os.path import join, devnull, lexists
from subprocess import Popen, PIPE
from Cheetah.Template import Template
from conpaas.core.log import create_logger
from conpaas.core.misc impo... | 38.791045 | 136 | 0.574836 |
089934614ca5c02c5b6402aa067edeafc9323f9e | 3,349 | py | Python | bin/AoideKinTable.py | granttremblay/aoide | ea25bdf92013f7dc3b254e261039c43e697ee901 | [
"MIT"
] | 1 | 2018-06-26T12:28:39.000Z | 2018-06-26T12:28:39.000Z | bin/AoideKinTable.py | granttremblay/Aoide | ea25bdf92013f7dc3b254e261039c43e697ee901 | [
"MIT"
] | null | null | null | bin/AoideKinTable.py | granttremblay/Aoide | ea25bdf92013f7dc3b254e261039c43e697ee901 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import time
from astropy.io import fits
import numpy as np
import argparse
def main():
args = parse_args()
stellar_table = args.stellar_table
voronoi_pixtabl = args.voronoi_pixtab
prefix = stellar_table.split(".")[0]
hdu = fits.open(stellar_table)
tab = hdu... | 33.158416 | 144 | 0.682293 |
089936a71719e61254edcf1624311d3b7fd7d2a4 | 38 | py | Python | tests/__init__.py | msk-mind/graph-db | 4272057eb0d30d7c4b6b4429acd21ec90404ff6c | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | msk-mind/graph-db | 4272057eb0d30d7c4b6b4429acd21ec90404ff6c | [
"Apache-2.0"
] | null | null | null | tests/__init__.py | msk-mind/graph-db | 4272057eb0d30d7c4b6b4429acd21ec90404ff6c | [
"Apache-2.0"
] | null | null | null | """Unit test package for graph_db."""
| 19 | 37 | 0.684211 |
08993f4f4e824911fd94823bdb3a69a9b3a6ed50 | 1,983 | py | Python | geojsonlint/views.py | mds08011/geojsonlint.com | 40c28dcffb8317425dcd5baf893389baccd71742 | [
"BSD-2-Clause"
] | 66 | 2015-01-15T08:36:08.000Z | 2022-01-18T11:40:58.000Z | geojsonlint/views.py | mds08011/geojsonlint.com | 40c28dcffb8317425dcd5baf893389baccd71742 | [
"BSD-2-Clause"
] | 12 | 2016-05-23T09:40:03.000Z | 2021-02-25T16:12:27.000Z | geojsonlint/views.py | mds08011/geojsonlint.com | 40c28dcffb8317425dcd5baf893389baccd71742 | [
"BSD-2-Clause"
] | 29 | 2015-02-23T22:41:10.000Z | 2020-02-10T18:58:59.000Z | import json
from django.http import HttpResponse
from django.views.decorators.http import require_http_methods
from django.shortcuts import render_to_response
from utils import validate_geojson, get_remote_json
from exc import GeoJSONValidationException, NonFetchableURLException
def home(request):
"""
GET /... | 28.73913 | 108 | 0.674231 |
08994b7917b2baa45121da0f98cc829e61bf6112 | 2,735 | py | Python | nova/conf/spice.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/conf/spice.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/conf/spice.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | # needs:fix_opt_description
# needs:check_deprecation_status
# needs:check_opt_group_and_type
# needs:fix_opt_description_indentation
# needs:fix_opt_registration_consistency
# Copyright 2016 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# ... | 24.419643 | 78 | 0.693601 |
089951e5b88df8e8bc0cd7e226b4970aa7fe4d61 | 155,278 | py | Python | lib/installed_clients/SetAPIClient.py | Tianhao-Gu/kb_gtdbtk | 41ea2c98f2553e6ef795ea703ffa34b703058720 | [
"MIT"
] | 3 | 2020-03-27T09:55:53.000Z | 2021-12-08T07:44:57.000Z | lib/installed_clients/SetAPIClient.py | Tianhao-Gu/kb_gtdbtk | 41ea2c98f2553e6ef795ea703ffa34b703058720 | [
"MIT"
] | 32 | 2020-02-06T01:10:08.000Z | 2021-10-15T05:44:07.000Z | lib/installed_clients/SetAPIClient.py | Tianhao-Gu/kb_gtdbtk | 41ea2c98f2553e6ef795ea703ffa34b703058720 | [
"MIT"
] | 5 | 2020-02-04T22:22:35.000Z | 2020-10-30T19:07:54.000Z | # -*- coding: utf-8 -*-
############################################################
#
# Autogenerated by the KBase type compiler -
# any changes made here will be overwritten
#
############################################################
from __future__ import print_function
# the following is a hack to get the basec... | 71.097985 | 89 | 0.655991 |
0899b3771363552ac9f7e59d7c4ad5c3105a5299 | 3,628 | py | Python | families/track/hashblock_track/processor/config/track.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 5 | 2018-04-05T07:02:04.000Z | 2018-07-10T09:39:03.000Z | families/track/hashblock_track/processor/config/track.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 89 | 2018-03-11T14:46:07.000Z | 2018-09-07T14:50:42.000Z | families/track/hashblock_track/processor/config/track.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright 2018 Frank V. Castellucci and Arthur Greef
#
# 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
#
# ... | 28.124031 | 80 | 0.622657 |
0899c63f738e0aea5eac42a30cb6ed6018a7d322 | 2,659 | py | Python | pygame practice/justcode_scale.py | Nuaboc/simple_programs | 8175a31de342b5e385ca72f92b3a6abfde108124 | [
"MIT"
] | null | null | null | pygame practice/justcode_scale.py | Nuaboc/simple_programs | 8175a31de342b5e385ca72f92b3a6abfde108124 | [
"MIT"
] | null | null | null | pygame practice/justcode_scale.py | Nuaboc/simple_programs | 8175a31de342b5e385ca72f92b3a6abfde108124 | [
"MIT"
] | null | null | null | ''' This scripts loads an image and then scales it up and down '''
import sys
import random
import math
import pygame
import pygame.gfxdraw
from pygame.locals import *
pygame.init()
CLOCK = pygame.time.Clock() # *** NOT COVERED IN THE VIDEO ***
''' DISPLAY SETUP ----------------------------------------------------... | 39.102941 | 118 | 0.642723 |
0899da08eb0b96dbc54331ac561a9582af24d16d | 13,882 | py | Python | tns_bulk_report.py | wombaugh/AmpelSlackCosmology | af65a58d9d1d2555af9defca5d673212d2e74326 | [
"BSD-3-Clause"
] | null | null | null | tns_bulk_report.py | wombaugh/AmpelSlackCosmology | af65a58d9d1d2555af9defca5d673212d2e74326 | [
"BSD-3-Clause"
] | 3 | 2018-09-26T12:30:40.000Z | 2018-10-06T14:06:40.000Z | tns_bulk_report.py | wombaugh/AmpelSlackCosmology | af65a58d9d1d2555af9defca5d673212d2e74326 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# A python sample code for sending a bulk report to the TNS.
#
# Original sample code by Ken Smith (May 2016) modified by Jakob Nordin (Feb 2018)
# -----------------------------------------------------------------... | 35.055556 | 135 | 0.580032 |
0899f58bc3bd9f416d4a5bccdff52d4c404842d7 | 379 | py | Python | oscar_docdata/dashboard/forms.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 15 | 2017-04-25T10:31:27.000Z | 2022-03-01T10:58:10.000Z | oscar_docdata/dashboard/forms.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 45 | 2017-04-26T13:17:51.000Z | 2022-02-16T12:27:57.000Z | oscar_docdata/dashboard/forms.py | django-oscar/django-oscar-docdata | 8f95458d4dff7d27ec507bacfede0a19e1f0e6b2 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2017-07-18T03:43:53.000Z | 2020-07-10T16:29:30.000Z | from django import forms
from django.utils.translation import ugettext_lazy as _
from oscar_docdata.models import DocdataOrder
class DocdataOrderSearchForm(forms.Form):
order_number = forms.CharField(required=False, label=_("Order number"))
order_status = forms.ChoiceField(required=False, label=_("Status"), c... | 42.111111 | 131 | 0.759894 |
0899f5e1c97ec13b6a8b0e8eb91405e5e50fe61d | 3,131 | py | Python | demo/tracking/util.py | shachargluska/centerpose | 01c2c8bfa9d3ee91807f2ffdcc48728d104265bd | [
"MIT"
] | 245 | 2019-11-29T02:55:25.000Z | 2022-03-30T07:30:18.000Z | demo/tracking/util.py | shachargluska/centerpose | 01c2c8bfa9d3ee91807f2ffdcc48728d104265bd | [
"MIT"
] | 24 | 2019-11-29T10:05:00.000Z | 2022-03-30T07:16:06.000Z | demo/tracking/util.py | FishLiuabc/centerpose | 555d753cd82693476f91f78c53aa4147f5a83015 | [
"MIT"
] | 45 | 2019-11-29T05:12:02.000Z | 2022-03-21T02:20:36.000Z | import cv2
import numpy as np
COLORS_10 =[(144,238,144),(178, 34, 34),(221,160,221),( 0,255, 0),( 0,128, 0),(210,105, 30),(220, 20, 60),
(192,192,192),(255,228,196),( 50,205, 50),(139, 0,139),(100,149,237),(138, 43,226),(238,130,238),
(255, 0,255),( 0,100, 0),(127,255, 0),(255, 0... | 46.044118 | 111 | 0.55222 |
089a2167097f20e7ff53ec8596e0363d56613766 | 474 | py | Python | examples/pylab_examples/log_bar.py | yuvallanger/matplotlib | e0020d318a9a9685594c6bff4631f74599321459 | [
"MIT",
"BSD-3-Clause"
] | 8 | 2017-04-11T08:55:30.000Z | 2022-03-25T04:31:26.000Z | examples/pylab_examples/log_bar.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | examples/pylab_examples/log_bar.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-05T04:15:46.000Z | 2020-06-11T18:06:02.000Z | #!/usr/bin/env python
from matplotlib import pylab
data = ((3,1000), (10,3), (100,30), (500, 800), (50,1))
pylab.xlabel("FOO")
pylab.ylabel("FOO")
pylab.title("Testing")
pylab.gca().set_yscale('log')
dim = len(data[0])
w = 0.75
dimw = w / dim
x = pylab.arange(len(data))
for i in range(len(data[0])) :
y = [d[i]... | 19.75 | 55 | 0.611814 |
089a3b6b629b82308c8b5bf5e2ad237ef4eb4e6d | 1,868 | py | Python | azure-devops/azext_devops/vstsCompressed/wiki/v4_0/models/__init__.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | azure-devops/azext_devops/vstsCompressed/wiki/v4_0/models/__init__.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | 37 | 2020-04-27T07:45:19.000Z | 2021-04-05T07:27:15.000Z | azure-devops/azext_devops/vstsCompressed/wiki/v4_0/models/__init__.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"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.
# --------------------------------------------------------------------... | 31.133333 | 94 | 0.645075 |
089a59f374c1ed27783096c60ba0275797d6e226 | 7,095 | py | Python | Neural/train.py | INK-USC/shifted-label-distribution | 3cf2b7ced3b2e18234db405f6014f049c4830d71 | [
"Apache-2.0"
] | 37 | 2019-10-29T13:12:41.000Z | 2022-01-20T02:42:28.000Z | Neural/train.py | INK-USC/shifted-label-distribution | 3cf2b7ced3b2e18234db405f6014f049c4830d71 | [
"Apache-2.0"
] | 5 | 2020-07-23T10:32:59.000Z | 2021-09-01T11:37:15.000Z | Neural/train.py | INK-USC/shifted-label-distribution | 3cf2b7ced3b2e18234db405f6014f049c4830d71 | [
"Apache-2.0"
] | 2 | 2020-05-27T06:00:56.000Z | 2021-02-08T10:45:41.000Z | '''
Train Neural RE Model
'''
__author__ = 'Maosen'
import os
import random
import torch
import logging
import argparse
import pickle
import numpy as np
from tqdm import tqdm
import utils
from model import Model
from utils import Dataset
torch.backends.cudnn.deterministic = True
def train(args):
model = Model(args... | 40.084746 | 134 | 0.724313 |
089a79570a0d157564cfc740f98042d20bec8faa | 798 | py | Python | setup.py | msto/svplot | 2e16a7936328079d444bdd1edd8ab93fbbf49dde | [
"MIT"
] | null | null | null | setup.py | msto/svplot | 2e16a7936328079d444bdd1edd8ab93fbbf49dde | [
"MIT"
] | null | null | null | setup.py | msto/svplot | 2e16a7936328079d444bdd1edd8ab93fbbf49dde | [
"MIT"
] | null | null | null | """
Simple venn diagrams.
"""
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
setup(
name='svplot',
version='0.0.1',
description='Plotting helper functions',
long_description=readme,
author='Matthew Stone',
author_email='matthew(dot)stone12(at)g... | 26.6 | 59 | 0.640351 |
089a897f19c1bbcecc05ecbda378d0c330cf0fdd | 997 | py | Python | alipay/aop/api/domain/AlipayCommerceYuntaskRecruitenrolledinfoBatchqueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceYuntaskRecruitenrolledinfoBatchqueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceYuntaskRecruitenrolledinfoBatchqueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceYuntaskRecruitenrolledinfoBatchqueryModel(object):
def __init__(self):
self._merchant_pid = None
@property
def merchant_pid(self):
return self._merchant_pid... | 24.317073 | 75 | 0.636911 |
089ac1bb61f7f7a2d65036635f1de87cbf683a82 | 13,569 | py | Python | trdg/run.py | srividya-p/TextRecognitionDataGenerator | cfba3ef1b5204c5f45d347c1c3db09a77dd3cd01 | [
"MIT"
] | null | null | null | trdg/run.py | srividya-p/TextRecognitionDataGenerator | cfba3ef1b5204c5f45d347c1c3db09a77dd3cd01 | [
"MIT"
] | null | null | null | trdg/run.py | srividya-p/TextRecognitionDataGenerator | cfba3ef1b5204c5f45d347c1c3db09a77dd3cd01 | [
"MIT"
] | null | null | null | import argparse
import os, errno
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
import random as rnd
import string
import sys
from tqdm import tqdm
from trdg.string_generator import (
create_strings_from_dict,
create_strings_from_file,
create_strings_from_wikipedia,
create_... | 30.355705 | 176 | 0.557816 |
089aece3863b00cc53a567453ada0ffd4f5be97b | 6,333 | py | Python | FlaskWebAPI/app.py | ninadkan/SecureWebApp | a60ccda8339682ccc54ce97e5a431e4376c692be | [
"MIT"
] | 1 | 2019-04-23T18:24:55.000Z | 2019-04-23T18:24:55.000Z | FlaskWebAPI/app.py | ninadkan/SecureWebApp | a60ccda8339682ccc54ce97e5a431e4376c692be | [
"MIT"
] | null | null | null | FlaskWebAPI/app.py | ninadkan/SecureWebApp | a60ccda8339682ccc54ce97e5a431e4376c692be | [
"MIT"
] | null | null | null | """
This script runs the application using a development server.
It contains the definition of routes and views for the application.
"""
from flask import Flask, jsonify, abort, make_response
from flask import url_for
from flask import request, Response
from flask_cors import CORS
import json
import validateJWT
import ... | 33.331579 | 124 | 0.653245 |
089af638b5a587ac9e6c27fa3633d76527c75028 | 343 | py | Python | Image/OpenCV/test.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | Image/OpenCV/test.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | Image/OpenCV/test.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # 2018-9-14
import numpy as np
import matplotlib.pyplot as plt
import os
import cv2
# from skimage import transform
# import math
img = cv2.imread("C:\\Study\\ImageHandle\\fail_to_trans\\fail\\fm-9-7.4.png")
# img = cv2.imread("C:\\Study\\ImageHandle\\fail_to_trans\\black\\fm-1-0.81.png")
try:
print(xx)
except Excepti... | 26.384615 | 81 | 0.725948 |
089b23cc19f2610250b30eb6bf1f3cfe04c35cc7 | 2,788 | py | Python | leetcode_python/Tree/redundant-connection.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Tree/redundant-connection.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Tree/redundant-connection.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# V1
# https://blog.csdn.net/fuxuemingzhu/article/details/80487064
class Solution:
def findRedundantConnection(self, edges):
"""
:type edges: List[List[int]]
:rtype: List[int]
"""
tree = [-1] * (len(edges) + 1)
for edge in edges:
a = self.findRoot(e... | 28.44898 | 83 | 0.523314 |
089b4f70ac93a53f5cf43d20c1c31eb068b77309 | 15,440 | py | Python | tests/tuning/tune_with_akg.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/tuning/tune_with_akg.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/tuning/tune_with_akg.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | import os
import json
import argparse
import logging
import shutil
import glob
import akg
import auto_tune
from akg.utils.kernel_exec import ReturnType
from akg.composite.build_module import _update_attrs_gpu, _update_attrs_ascend
from akg.utils.op_test import random_data_to_disk
def set_environment(backend_str="", d... | 49.329073 | 162 | 0.583161 |
089b67e690fe90d43b4e44a67c44b2226ff0ed5e | 6,101 | py | Python | examples/jenkins/client/filesocket/filesocket.py | blogresponder/socks2file | 024d14fa7dc0cb2c6840bf4d50d6cbb6e7b85fba | [
"Apache-2.0"
] | 2 | 2019-11-07T10:38:35.000Z | 2019-11-07T12:13:37.000Z | examples/jenkins/client/filesocket/filesocket.py | blogresponder/socks2file | 024d14fa7dc0cb2c6840bf4d50d6cbb6e7b85fba | [
"Apache-2.0"
] | null | null | null | examples/jenkins/client/filesocket/filesocket.py | blogresponder/socks2file | 024d14fa7dc0cb2c6840bf4d50d6cbb6e7b85fba | [
"Apache-2.0"
] | null | null | null | import os
import time
import filesocket_receiver_helper as h
class filesocket(object):
def __init__(self,reverse=False,socket_dir = '/tmp/file2socks'):
self.SOCKET_DIR = socket_dir
self.DELIMITER = '_'
self.inputStreamFilename = None
self.outputStreamFilename = None
self... | 33.894444 | 137 | 0.616129 |
089b73fc01b2119228e0d4eb64ac68cdd66fd048 | 229 | py | Python | beir/retrieval/models/__init__.py | tstadel/beir | 3abb52f9465d91a92d61b35b95b371cfbcd3a248 | [
"Apache-2.0"
] | 24 | 2022-03-20T18:48:52.000Z | 2022-03-31T08:28:42.000Z | beir/retrieval/models/__init__.py | tstadel/beir | 3abb52f9465d91a92d61b35b95b371cfbcd3a248 | [
"Apache-2.0"
] | 9 | 2022-03-19T14:50:30.000Z | 2022-03-30T17:31:18.000Z | beir/retrieval/models/__init__.py | tstadel/beir | 3abb52f9465d91a92d61b35b95b371cfbcd3a248 | [
"Apache-2.0"
] | 3 | 2022-03-25T15:45:14.000Z | 2022-03-25T17:51:23.000Z | from .sentence_bert import SentenceBERT
from .use_qa import UseQA
from .sparta import SPARTA
from .dpr import DPR
from .bpr import BinarySentenceBERT
from .unicoil import UniCOIL
from .splade import SPLADE
from .tldr import TLDR
| 25.444444 | 39 | 0.825328 |
089b9528c94acdcdd31efa1ce01d06159cc1069e | 3,228 | py | Python | mps_database/runtime/device.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | mps_database/runtime/device.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | mps_database/runtime/device.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | from sqlalchemy import Column, Integer, String, ForeignKey
from sqlalchemy.orm import relationship, backref
from mps_database.runtime import RuntimeBase
class Device(RuntimeBase):
"""
Device class
Each instance contains the MPS database id and name of a device
(analog or digital), and a list of current analog... | 50.4375 | 73 | 0.777881 |
089bbbc7ecebe8901f2ce3831af5a2012282331b | 1,876 | py | Python | gen_tag_index.py | scivision/hugo-utils | cb5892c905b786ea83071b7d89a158e56a1fd9b2 | [
"MIT"
] | 1 | 2022-01-18T01:10:54.000Z | 2022-01-18T01:10:54.000Z | gen_tag_index.py | scivision/hugo-utils | cb5892c905b786ea83071b7d89a158e56a1fd9b2 | [
"MIT"
] | null | null | null | gen_tag_index.py | scivision/hugo-utils | cb5892c905b786ea83071b7d89a158e56a1fd9b2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
This generates _index.md for each Hugo tag.
If you haven't already, make a directory like content/tags
to hold the _index.md for each tag.
While it's better for SEO to write a paragraph or two for each tag,
if desired, you can fill with a "noindex" meta header tag with -noindex
and the appr... | 25.013333 | 93 | 0.638593 |
089bdf6247ebab072428439c69892d7911822dbc | 490 | py | Python | embiggen/embedders/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 2 | 2020-01-30T11:57:37.000Z | 2020-05-02T00:05:49.000Z | embiggen/embedders/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 93 | 2020-01-26T00:43:51.000Z | 2020-05-10T03:29:54.000Z | embiggen/embedders/__init__.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 5 | 2020-02-13T07:18:11.000Z | 2020-03-19T08:03:34.000Z | """Submodule providing TensorFlow and Ensmallen-based embedders."""
from embiggen.embedders.ensmallen_embedders import *
from embiggen.embedders.tensorflow_embedders import *
from embiggen.embedders.pykeen_embedders import *
from embiggen.embedders.karateclub_embedders import *
from embiggen.embedders.graph_embedding_p... | 35 | 67 | 0.810204 |
089bfa5149533ba7a6669803db2d7bf6ee51a4a2 | 1,038 | py | Python | studies/upgrade_nmo_sensitivity/data/make_database.py | icecube/graphnet | 5e03b567520e2ce46969a89907b0d3e79dae5a15 | [
"Apache-2.0"
] | 1 | 2022-03-24T15:39:24.000Z | 2022-03-24T15:39:24.000Z | studies/upgrade_nmo_sensitivity/data/make_database.py | icecube/graphnet | 5e03b567520e2ce46969a89907b0d3e79dae5a15 | [
"Apache-2.0"
] | 72 | 2021-12-07T13:19:16.000Z | 2022-03-31T13:16:58.000Z | studies/upgrade_nmo_sensitivity/data/make_database.py | icecube/graphnet | 5e03b567520e2ce46969a89907b0d3e79dae5a15 | [
"Apache-2.0"
] | 3 | 2022-01-17T13:59:05.000Z | 2022-03-19T14:58:22.000Z | """Making SQLite database for neutrino mass ordering studies for IceCube-Upgrade."""
import os
from graphnet.data.extractors import (
I3FeatureExtractorIceCubeUpgrade,
I3TruthExtractor,
)
from graphnet.data.sqlite_dataconverter import SQLiteDataConverter
def make_database():
"""Main script function."""
... | 24.139535 | 84 | 0.653179 |
089c14553ad139aebf2d949456002c408f67c7ba | 3,745 | py | Python | Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 32.565217 | 91 | 0.69506 |
089c20f746f1c6e6d5be0d73c753454a5ebbae26 | 2,421 | py | Python | userbot/plugins/jainder.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/jainder.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/jainder.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import random
from uniborg.util import lightning_cmd
@borg.on(lightning_cmd(pattern=r"jainder(.*)"))
async def _(event):
if event.fwd_from:
return
input_str = event.pattern_match.group(1)
if input_str in "ex":
emoticons = [
"u is... | 22.839623 | 47 | 0.268071 |
089c22ae9b3ea129b0846b13ad9d7390aca19034 | 1,031 | py | Python | python/0002/main.py | suaaa7/leetcode-repo | 2236f5dcfb1096c6fe6ddf23e392ad2c5c320893 | [
"Apache-2.0"
] | null | null | null | python/0002/main.py | suaaa7/leetcode-repo | 2236f5dcfb1096c6fe6ddf23e392ad2c5c320893 | [
"Apache-2.0"
] | 1 | 2020-12-26T14:43:13.000Z | 2020-12-26T14:43:13.000Z | python/0002/main.py | suaaa7/leetcode-repo | 2236f5dcfb1096c6fe6ddf23e392ad2c5c320893 | [
"Apache-2.0"
] | null | null | null | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
current_carry = 0
current = ListNode(0)
head = current
... | 27.131579 | 68 | 0.497575 |
089c26a328c0e4ec98e85708353c0f0546d5d282 | 32,968 | py | Python | unfurl/job.py | mehak151/unfurl | db4a0fd7163462156b5958103900942ae61c5d4c | [
"MIT"
] | null | null | null | unfurl/job.py | mehak151/unfurl | db4a0fd7163462156b5958103900942ae61c5d4c | [
"MIT"
] | null | null | null | unfurl/job.py | mehak151/unfurl | db4a0fd7163462156b5958103900942ae61c5d4c | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Adam Souzis
# SPDX-License-Identifier: MIT
"""
A Job is generated by comparing a list of specs with the last known state of the system.
Job runs tasks, each of which has a configuration spec that is executed on the running system
Each task tracks and records its modifications to the system's state
... | 37.463636 | 125 | 0.584324 |
089c2a062950ebc55f326b8771bd369bae976c46 | 2,168 | py | Python | django_messages/forms.py | michaelmior/django-messages | fd48dbfd203459b270007953e6e8f010f985abf1 | [
"BSD-3-Clause"
] | null | null | null | django_messages/forms.py | michaelmior/django-messages | fd48dbfd203459b270007953e6e8f010f985abf1 | [
"BSD-3-Clause"
] | null | null | null | django_messages/forms.py | michaelmior/django-messages | fd48dbfd203459b270007953e6e8f010f985abf1 | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django import forms
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
if "notification" in settings.INSTALLED_APPS:
from notification import models as notification
else:
notification = None
from django_messages.models import Message
from django_messa... | 37.37931 | 88 | 0.60286 |
089c2f5f51cc798d75327efd7f6b7390702d6cf1 | 339 | py | Python | union find.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | union find.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | union find.py | gdmanandamohon/leetcode | a691a4e37ee1fdad69c710e3710c5faf8b0a7d76 | [
"MIT"
] | null | null | null | '''
@author: l4zyc0d3r
People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt
'''
p = [i for i in range(n)]
def find(x):
if p[x] ==x: return x
p[x] = find(p[x])
return p[x]
i, edge=0,0
while i<len(E) and edge !=n-1:
u, v = E[i]
p_u = find(u)
p_v = find(v)
if p_u !=p_v... | 18.833333 | 86 | 0.572271 |
089c440eadb7d8365348e25c8d6f2859efd5f5e5 | 1,599 | py | Python | src/api/bkuser_core/common/fields.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/common/fields.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/common/fields.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 39.975 | 115 | 0.737336 |
089c7700debc43cc8636b4c679ceffced200a99f | 8,908 | py | Python | setup.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | setup.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | setup.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import sys, os
import shutil
from collections import defaultdict
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup_args = {}
install_requires = ['param>=1.8.0,<2.0', 'numpy>=1.0', 'pyviz_comms>=0.7.0']
extras_require = {}
# Notebook dependenci... | 38.562771 | 227 | 0.627077 |
089cadd633fe2549c7da204e3b805e2ca6917368 | 1,074 | py | Python | scripts/h5toms.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | scripts/h5toms.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | scripts/h5toms.py | kernsuite-debian/katdal | 62c5732f0bf1a2b6fa8d275e7405bcb1648534b0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
################################################################################
# Copyright (c) 2011-2019, National Research Foundation (Square Kilometre Array)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may... | 37.034483 | 80 | 0.639665 |
089cbcea6d36d8934efbbff2ad64fc18282da40d | 591 | py | Python | 226. Invert Binary Tree.py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | 4 | 2020-11-17T05:24:24.000Z | 2021-06-14T21:01:45.000Z | 226. Invert Binary Tree.py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | null | null | null | 226. Invert Binary Tree.py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | null | null | null | # Recursive ; 20 ms ; faster than 99.05 %
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def invertTree(self, root: TreeNode) -> TreeNode:
if root... | 31.105263 | 60 | 0.553299 |
089cccdd1d56faf6aaf88a8d74f9658e386cf8dd | 9,030 | py | Python | testing/migrations/0001_initial.py | Irshak10/FinalProject | dee85ee55cec0f9d75b22ae13b94aa4f8f591908 | [
"MIT"
] | null | null | null | testing/migrations/0001_initial.py | Irshak10/FinalProject | dee85ee55cec0f9d75b22ae13b94aa4f8f591908 | [
"MIT"
] | null | null | null | testing/migrations/0001_initial.py | Irshak10/FinalProject | dee85ee55cec0f9d75b22ae13b94aa4f8f591908 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-05-09 19:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 54.727273 | 206 | 0.590476 |
089cf4eb76271ec130f5e12b81076c03d97b5ef2 | 7,878 | py | Python | sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2021_09_01_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2021_09_01_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2021_09_01_preview/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 35.169643 | 94 | 0.795506 |
089cf61a9e2538862343b74c546669b0fc39caa7 | 1,963 | py | Python | src/rubrix/sdk/models/text_classification_search_aggregations_annotated_as.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/text_classification_search_aggregations_annotated_as.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/text_classification_search_aggregations_annotated_as.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 32.716667 | 86 | 0.712685 |
089d18012c2d34baf309461ec5d72c5a10552d09 | 1,181 | py | Python | imagestore/context_processors.py | nerdfiles/jahjah_works | 5d7f26dc8001b5dcb0c20b85e6ed247c4c7a00da | [
"WTFPL"
] | 1 | 2019-06-13T11:46:08.000Z | 2019-06-13T11:46:08.000Z | onegreek/imagestore/context_processors.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | null | null | null | onegreek/imagestore/context_processors.py | goldhand/onegreek | 1ad105f15608284a9e80802734f0c6222413a4a0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# vim:fileencoding=utf-8
from django.core.urlresolvers import reverse, NoReverseMatch
from django.conf import settings
from utils import get_model_string
from imagestore.models import image_applabel, image_classname
from imagestore.models import album_applabel, album_classname
def imagestore_proc... | 40.724138 | 92 | 0.718036 |
089d2501a6dcd40bdc31f0cb62994d0a7efeeb8e | 5,364 | py | Python | cadnano/views/outlinerview/cnoutlineritem.py | sherwoodyao/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 69 | 2015-01-13T02:54:40.000Z | 2022-03-27T14:25:51.000Z | cadnano/views/outlinerview/cnoutlineritem.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 127 | 2015-01-01T06:26:34.000Z | 2022-03-02T12:48:05.000Z | cadnano/views/outlinerview/cnoutlineritem.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 48 | 2015-01-22T19:57:49.000Z | 2022-03-27T14:27:53.000Z | # -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QTreeWidgetItem
from cadnano.gui.palette import getBrushObj
from . import outlinerstyles as styles
NAME_COL = 0
LOCKED_COL = 1
VISIBLE_COL = 2
COLOR_COL = 3
LEAF_FLAGS = (Qt.ItemIsSelectable | Qt.ItemIsEditable |
Qt.ItemIsD... | 34.384615 | 107 | 0.622856 |
089d6c467aebeb0a74a4ea548d172635566e67eb | 40 | py | Python | botx/testing/testing_client/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | botx/testing/testing_client/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | botx/testing/testing_client/__init__.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | """Definition of client for testing."""
| 20 | 39 | 0.7 |
089d7653a2df81483cd66037b0e082e8d6012063 | 9,056 | py | Python | data/level/level244.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level244.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level244.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 244,
'move_count': 25,
'board_info': {
(0, 2): {
'prev': (0, -1),
'next': (0, 1),
'cover': (65, 2)
},
(0, 3): {
'prev': (0, -1),
'next': (0, 1),
'cover': (65, 2)
},
(0, 4):... | 22.64 | 32 | 0.189708 |
089dd3bfe237a6afa87400fb0f9288f1c456a907 | 13,219 | py | Python | ESkafta-2015/Skafta-ArcticDEM-transecting.py | ehultee/VE-cauldrons | 52afe581c0ab32b93cee305e86e023c39e84ee69 | [
"MIT"
] | null | null | null | ESkafta-2015/Skafta-ArcticDEM-transecting.py | ehultee/VE-cauldrons | 52afe581c0ab32b93cee305e86e023c39e84ee69 | [
"MIT"
] | null | null | null | ESkafta-2015/Skafta-ArcticDEM-transecting.py | ehultee/VE-cauldrons | 52afe581c0ab32b93cee305e86e023c39e84ee69 | [
"MIT"
] | 1 | 2020-06-30T19:35:47.000Z | 2020-06-30T19:35:47.000Z | # Reading in ArcticDEM, sampling transect across Skafta Cauldron
# 4 Dec 2018 EHU
# Edit 21 Feb 2019 - plot analytical elastic/viscoelastic
# Edit 16 July - move functions to helper module
import numpy as np
import scipy.misc as scp
from scipy import interpolate
from scipy.ndimage import gaussian_filter
from osgeo imp... | 52.249012 | 192 | 0.705273 |
089de0b3c156696d94a4762ed073d1e3aa2f5fc4 | 46,672 | py | Python | azure/multiapi/storage/v2015_04_05/table/tableservice.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 3 | 2019-02-21T20:46:26.000Z | 2021-06-22T15:35:52.000Z | azure/multiapi/storage/v2015_04_05/table/tableservice.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 11 | 2017-10-05T18:20:40.000Z | 2020-10-10T09:20:19.000Z | azure/multiapi/storage/v2015_04_05/table/tableservice.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 15 | 2017-10-02T18:48:20.000Z | 2022-03-03T14:03:49.000Z | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | 46.393638 | 117 | 0.647326 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.