hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3c21f53d13555d6bd3885638304b9c9bab06c94e | 1,515 | py | Python | tests/unit/bundlers/test_base.py | jochenvdv/snakepack | f27c5953c5f058a82b8cce55b23cdf32cc1f6602 | [
"MIT"
] | 1 | 2022-01-27T07:15:27.000Z | 2022-01-27T07:15:27.000Z | tests/unit/bundlers/test_base.py | jochenvdv/snakepack | f27c5953c5f058a82b8cce55b23cdf32cc1f6602 | [
"MIT"
] | null | null | null | tests/unit/bundlers/test_base.py | jochenvdv/snakepack | f27c5953c5f058a82b8cce55b23cdf32cc1f6602 | [
"MIT"
] | null | null | null | from snakepack.assets import Asset
from snakepack.bundlers import Bundle
from snakepack.bundlers._base import Bundler
from snakepack.config.model import GlobalOptions
from snakepack.loaders import Loader
from snakepack.transformers import Transformer
class BundleTest:
def test_init(self, mocker):
bundler ... | 30.918367 | 98 | 0.690429 |
98f8964247ecababc9d429abd987800c830015b0 | 1,377 | py | Python | quietpaper/display.py | benjaminsoellner/quietpaper | f4a69521deb5ad38907279964146b9dd7a17ba70 | [
"MIT"
] | 16 | 2019-12-04T07:46:58.000Z | 2021-11-24T14:59:55.000Z | quietpaper/display.py | benjaminsoellner/quietpaper | f4a69521deb5ad38907279964146b9dd7a17ba70 | [
"MIT"
] | 1 | 2020-01-18T09:18:49.000Z | 2020-01-18T10:42:56.000Z | quietpaper/display.py | benjaminsoellner/quietpaper | f4a69521deb5ad38907279964146b9dd7a17ba70 | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw, ImageFont
class Display:
def __init__(self, width, height):
self.width = width
self.height = height
self.black_image = Image.new('1', (self.width, self.height), 255)
self.red_image = Image.new('1', (self.width, self.height), 255)
self.bmp_c... | 40.5 | 92 | 0.633987 |
8301ffdf25c318f098430bca94a8aef5dd8b2018 | 1,195 | py | Python | inspection_sdk/client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | inspection_sdk/client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | inspection_sdk/client.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import inspection_sdk.api.collector.collector_client
import inspection_sdk.api.history.history_client
import inspection_sdk.api.info.info_client
import inspection_sdk.api.metric_group.metric_group_client
import inspection_sdk.api.task.task_client
import inspection_sdk.api.template.template... | 37.34375 | 135 | 0.764854 |
53359d1dd6c59afde2605cd95d34ed04672aa2fb | 1,740 | py | Python | localstack/services/kinesis/kinesis_starter.py | cknave/localstack | 67941331c74dded97284698aba64984ab69cdf43 | [
"Apache-2.0"
] | 1 | 2021-02-19T19:28:30.000Z | 2021-02-19T19:28:30.000Z | localstack/services/kinesis/kinesis_starter.py | cknave/localstack | 67941331c74dded97284698aba64984ab69cdf43 | [
"Apache-2.0"
] | null | null | null | localstack/services/kinesis/kinesis_starter.py | cknave/localstack | 67941331c74dded97284698aba64984ab69cdf43 | [
"Apache-2.0"
] | 1 | 2021-01-10T03:21:47.000Z | 2021-01-10T03:21:47.000Z | import logging
import traceback
from localstack import config
from localstack.utils.aws import aws_stack
from localstack.utils.common import mkdir, get_free_tcp_port, edge_ports_info
from localstack.services import install
from localstack.services.infra import start_proxy_for_service, do_run
from localstack.services.in... | 37.021277 | 92 | 0.71954 |
ad9f2cbdc47a72b4a168aa32d56170d5232752ec | 3,016 | py | Python | venv/Lib/site-packages/pandas/tests/indexing/test_check_indexer.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | 1 | 2021-02-06T21:00:00.000Z | 2021-02-06T21:00:00.000Z | venv/Lib/site-packages/pandas/tests/indexing/test_check_indexer.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/indexing/test_check_indexer.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.api.indexers import check_array_indexer
@pytest.mark.parametrize(
"indexer, expected",
[
# integer
([1, 2], np.array([1, 2], dtype=np.intp)),
(np.array([1, 2], dtype="int64"), np... | 30.16 | 88 | 0.599801 |
27770962c8a4a0cfe47057fd651e0a922e64b16c | 9,737 | py | Python | rllib/utils/framework.py | aniryou/ray | c1a97c8c0420dc9b77fda536120741f39d2a8fd1 | [
"Apache-2.0"
] | null | null | null | rllib/utils/framework.py | aniryou/ray | c1a97c8c0420dc9b77fda536120741f39d2a8fd1 | [
"Apache-2.0"
] | null | null | null | rllib/utils/framework.py | aniryou/ray | c1a97c8c0420dc9b77fda536120741f39d2a8fd1 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import sys
from typing import Any, Union
from ray.util import log_once
logger = logging.getLogger(__name__)
# Represents a generic tensor type.
TensorType = Any
# Either a plain tensor, or a dict or tuple of tensors (or StructTensors).
TensorStructType = Union[TensorType, dict, tuple]
def... | 31.308682 | 79 | 0.615487 |
1392eac286e5a86ea38c0af0347ceb23609c7964 | 195 | py | Python | PyOpdb/NCBI_API/__init__.py | GodInLove/OPDB | d5d9c9ce5239037dcc57abba6377abbfccec32d1 | [
"Apache-2.0"
] | 1 | 2017-09-24T15:59:31.000Z | 2017-09-24T15:59:31.000Z | PyOpdb/NCBI_API/__init__.py | GodInLove/OPDB | d5d9c9ce5239037dcc57abba6377abbfccec32d1 | [
"Apache-2.0"
] | null | null | null | PyOpdb/NCBI_API/__init__.py | GodInLove/OPDB | d5d9c9ce5239037dcc57abba6377abbfccec32d1 | [
"Apache-2.0"
] | null | null | null | __author__ = "yd.liu"
from . import SRA_API
from . import Genome_API
from .url import connect_url
from .string import findall_pat
from .url import callback
from .string import paired_or_single
| 19.5 | 36 | 0.8 |
251deb18a5afe41f41941ba9fb991f2b16900006 | 1,343 | py | Python | main.py | marjamis/GameOff-2021-Bug | c9b583ef15a31c566fd129cb551cca3852dc6545 | [
"MIT"
] | null | null | null | main.py | marjamis/GameOff-2021-Bug | c9b583ef15a31c566fd129cb551cca3852dc6545 | [
"MIT"
] | 1 | 2022-02-14T06:57:36.000Z | 2022-02-14T06:57:36.000Z | main.py | marjamis/GameOff-2021-Bug | c9b583ef15a31c566fd129cb551cca3852dc6545 | [
"MIT"
] | null | null | null | import pygame
# Internal dependencies
from engine.screen import Screen
from engine.events import Events
class Game:
def __init__(self):
pygame.init()
pygame.display.set_caption("Project Plant")
pygame.display.set_icon(pygame.image.load("./media/images/active/plant.png"))
# pygame.m... | 27.979167 | 102 | 0.622487 |
307d4f6945eb3805d2ac7783210c3d3b21a1a634 | 10,408 | py | Python | AOTemporalAnalysis/Dynamic_Densitometry/Dynamic_Densitometry_Processing_Pipeline/Temporal_Dataset_Preprocessing_Pipeline.py | DavidBrainard/AdaptiveOpticsSoftware | 0779ea5d06991c0c52f450034f4c7914e43257ff | [
"MIT"
] | 2 | 2016-10-10T16:55:39.000Z | 2017-07-31T12:30:11.000Z | AOTemporalAnalysis/Dynamic_Densitometry/Dynamic_Densitometry_Processing_Pipeline/Temporal_Dataset_Preprocessing_Pipeline.py | DavidBrainard/AdaptiveOpticsSoftware | 0779ea5d06991c0c52f450034f4c7914e43257ff | [
"MIT"
] | null | null | null | AOTemporalAnalysis/Dynamic_Densitometry/Dynamic_Densitometry_Processing_Pipeline/Temporal_Dataset_Preprocessing_Pipeline.py | DavidBrainard/AdaptiveOpticsSoftware | 0779ea5d06991c0c52f450034f4c7914e43257ff | [
"MIT"
] | 2 | 2015-12-16T06:39:50.000Z | 2019-05-20T16:09:43.000Z | # Robert Cooper
# 9-15-2017
# This script removes residual distortion from a strip-registered dataset.
# It requires:
# * A *functioning* MATLAB runtime, that has been set up to link to Python (optional).
# * The .dmp file output from Alfredo Dubra's Demotion software suite. **I realize this makes it VERY specifi... | 44.101695 | 166 | 0.57254 |
c84c24df12bf39cb6c481316b8cb1849df74cbce | 1,891 | py | Python | fixture/application.py | KarpikovaSV/python_training | 7dac017d3120d7a5b832fad64858ae1a2d7bf355 | [
"Apache-2.0"
] | null | null | null | fixture/application.py | KarpikovaSV/python_training | 7dac017d3120d7a5b832fad64858ae1a2d7bf355 | [
"Apache-2.0"
] | null | null | null | fixture/application.py | KarpikovaSV/python_training | 7dac017d3120d7a5b832fad64858ae1a2d7bf355 | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(sel... | 30.5 | 101 | 0.613961 |
1243a357568e1d11635346dd1d1d53b40334e2c8 | 178,848 | py | Python | jax/lax/lax.py | cclauss/jax | f17f2b976f05f218776fdb881797f3012a85c539 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/lax/lax.py | cclauss/jax | f17f2b976f05f218776fdb881797f3012a85c539 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/lax/lax.py | cclauss/jax | f17f2b976f05f218776fdb881797f3012a85c539 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 40.832877 | 107 | 0.714406 |
f9fe14a12dced97e71f75046848803b2d80cb2cb | 1,616 | py | Python | cipher/caesar.py | oliverchen415/cli_python | 62cf7edc03c0f36a5544e6f5bf4127868c980dc0 | [
"MIT"
] | null | null | null | cipher/caesar.py | oliverchen415/cli_python | 62cf7edc03c0f36a5544e6f5bf4127868c980dc0 | [
"MIT"
] | null | null | null | cipher/caesar.py | oliverchen415/cli_python | 62cf7edc03c0f36a5544e6f5bf4127868c980dc0 | [
"MIT"
] | null | null | null | import click
import string
alpha_list = string.ascii_letters
# Numbers corresponding to the ASCII letters
upper_list = [number for number in range(65,91)]
lower_list = [number for number in range(97,123)]
def letter_shift(letter, shift):
"""Shifts a letter by a given number
Args:
letter (String): Le... | 32.32 | 134 | 0.685644 |
a04654675bd87cc9e171fc0dc24641841deb6b8a | 1,449 | py | Python | crawler/worker.py | mmendez3800/web-crawler-scraper | ee74d631b3bf707024f798369cfbabdfbc0f89dd | [
"MIT"
] | null | null | null | crawler/worker.py | mmendez3800/web-crawler-scraper | ee74d631b3bf707024f798369cfbabdfbc0f89dd | [
"MIT"
] | null | null | null | crawler/worker.py | mmendez3800/web-crawler-scraper | ee74d631b3bf707024f798369cfbabdfbc0f89dd | [
"MIT"
] | null | null | null | from threading import Thread
from inspect import getsource
from utils.download import download
from utils import get_logger
import scraper
import time
class Worker(Thread):
def __init__(self, worker_id, config, frontier):
self.logger = get_logger(f"Worker-{worker_id}", "WORKER")
self.config = con... | 36.225 | 147 | 0.620428 |
d8a7057b49f456b4dd7a76e68ff9dec92812d2c8 | 536 | py | Python | dataset/Scripts/downimg.py | YASH-DIXIT-24/e-marketplace | 4edc5d90153d573601af57c8e596828157115e87 | [
"Apache-2.0"
] | null | null | null | dataset/Scripts/downimg.py | YASH-DIXIT-24/e-marketplace | 4edc5d90153d573601af57c8e596828157115e87 | [
"Apache-2.0"
] | null | null | null | dataset/Scripts/downimg.py | YASH-DIXIT-24/e-marketplace | 4edc5d90153d573601af57c8e596828157115e87 | [
"Apache-2.0"
] | 4 | 2021-09-20T17:21:26.000Z | 2021-11-26T16:11:16.000Z | import os
import pandas as pd
files = os.listdir('./')
try:
os.mkdir('images')
except:
pass
for f in files:
if f.endswith('.csv'):
df = pd.read_csv(f)
df['path'] = pd.NA
cnt = 0
for ind, row in df.iterrows():
if cnt%10:
print(f'Done objects {cn... | 20.615385 | 63 | 0.460821 |
ded4b857841a55349839e1a9fdf7e09b204e3861 | 3,718 | py | Python | src/fuzzingtool/decorators/plugin_meta.py | retr0-13/FuzzingTool | 2fe34911abd583838b7859f83201cd474a2beefc | [
"MIT"
] | null | null | null | src/fuzzingtool/decorators/plugin_meta.py | retr0-13/FuzzingTool | 2fe34911abd583838b7859f83201cd474a2beefc | [
"MIT"
] | null | null | null | src/fuzzingtool/decorators/plugin_meta.py | retr0-13/FuzzingTool | 2fe34911abd583838b7859f83201cd474a2beefc | [
"MIT"
] | null | null | null | # Copyright (c) 2020 - present Vitor Oriel <https://github.com/VitorOriel>
#
# 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 ... | 43.232558 | 84 | 0.665949 |
47b6d133a1e895c9a353b21ed5a1a9dd45bf49f5 | 30,887 | py | Python | demo/migrations/0003_auto__del_field_standardpage_postcode.py | marceloboth/wagtail-cms | 610d74f18782fa05983952051c795c643db54cf9 | [
"BSD-3-Clause"
] | 1 | 2015-08-06T15:00:59.000Z | 2015-08-06T15:00:59.000Z | demo/migrations/0003_auto__del_field_standardpage_postcode.py | marceloboth/wagtail-cms | 610d74f18782fa05983952051c795c643db54cf9 | [
"BSD-3-Clause"
] | null | null | null | demo/migrations/0003_auto__del_field_standardpage_postcode.py | marceloboth/wagtail-cms | 610d74f18782fa05983952051c795c643db54cf9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'StandardPage.postcode'
db.delete_column(u'demo_standard... | 90.844118 | 204 | 0.566258 |
0b7b8b4a254da93b49ee7a615d30567522d1749f | 3,725 | py | Python | vqa_experiments/clevr/preprocess_clevr.py | Bidur-Khanal/REMIND | 4eeb6bce7a27d814c94948e2790efedacd014af1 | [
"MIT"
] | 67 | 2020-06-29T14:30:40.000Z | 2022-02-24T06:14:50.000Z | vqa_experiments/clevr/preprocess_clevr.py | msrocean/REMIND | 2e82ca75a3e4d4ccba00c5a763097cc0f650a0a4 | [
"MIT"
] | 5 | 2020-08-14T17:01:39.000Z | 2021-09-12T10:41:25.000Z | vqa_experiments/clevr/preprocess_clevr.py | msrocean/REMIND | 2e82ca75a3e4d4ccba00c5a763097cc0f650a0a4 | [
"MIT"
] | 19 | 2020-07-04T14:59:26.000Z | 2022-02-15T11:24:52.000Z | """
Written by Kushal, modified by Robik
"""
import json
import h5py
import numpy as np
from collections import Counter, defaultdict
from tqdm import tqdm
PATH = '/hdd/robik/CLEVR'
CATEGORIES = {'count': ['count'],
'compare_attribute':
['equal_color',
'equal_material... | 33.863636 | 76 | 0.584161 |
e7106d1333953c06c32c23934144508cf5e74794 | 470 | py | Python | torch_glow/tests/nodes/contiguous_test.py | 842974287/glow | 7d77eb9a1c00dbba77321f62ad9c9078beb2b725 | [
"Apache-2.0"
] | null | null | null | torch_glow/tests/nodes/contiguous_test.py | 842974287/glow | 7d77eb9a1c00dbba77321f62ad9c9078beb2b725 | [
"Apache-2.0"
] | null | null | null | torch_glow/tests/nodes/contiguous_test.py | 842974287/glow | 7d77eb9a1c00dbba77321f62ad9c9078beb2b725 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
import torch
from tests.utils import jitVsGlow
class TestContiguous(unittest.TestCase):
def test_contiguous_basic(self):
"""Test of the PyTorch contiguous Node on Glow."""
def contiguous_basic(a):... | 24.736842 | 82 | 0.712766 |
3e4833d0bc3b22b9e6037f0057c7d8cecde831a7 | 8,862 | py | Python | test/functional/wallet_abandonconflict.py | VaderCoinProject/vadercoin | b513c794b014d40e5aad281dd1f54845c46d216c | [
"MIT"
] | null | null | null | test/functional/wallet_abandonconflict.py | VaderCoinProject/vadercoin | b513c794b014d40e5aad281dd1f54845c46d216c | [
"MIT"
] | null | null | null | test/functional/wallet_abandonconflict.py | VaderCoinProject/vadercoin | b513c794b014d40e5aad281dd1f54845c46d216c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2020 The Vadercoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the abandontransaction RPC.
The abandontransaction RPC marks a transaction and all its in-wall... | 48.163043 | 138 | 0.669375 |
9119102659446cbbdfcad1e01f295e4880b5cc44 | 3,565 | py | Python | piltdown/literals.py | EvansWinner/piltdown | 94492784ecd7bb7a18f6f171a013bc8701603e8b | [
"BSD-2-Clause"
] | null | null | null | piltdown/literals.py | EvansWinner/piltdown | 94492784ecd7bb7a18f6f171a013bc8701603e8b | [
"BSD-2-Clause"
] | null | null | null | piltdown/literals.py | EvansWinner/piltdown | 94492784ecd7bb7a18f6f171a013bc8701603e8b | [
"BSD-2-Clause"
] | null | null | null | """Global and shared variables for or potentially for any chart type."""
from typing import Dict, List
EMPTY_BLOCK: str = " "
LATIN_CHARS: str = "abcdefghijklmnopqrstuvwxyz"
GREEK_CHARS: str = "αβγδεζηθικλμνξοπρστυφχψω"
DIGITS = "0123456789"
# When not supplied with a list of labels, we use these
DEFAULT_CHARS: str ... | 16.353211 | 95 | 0.396073 |
712115337a25aaa510429fb1538a6531ae843623 | 1,564 | py | Python | binance/api/model.py | cottonmalone/binance-dex | 2b33e5d0dd0e24e78eea58e857d9872e5adc8c5f | [
"MIT"
] | null | null | null | binance/api/model.py | cottonmalone/binance-dex | 2b33e5d0dd0e24e78eea58e857d9872e5adc8c5f | [
"MIT"
] | null | null | null | binance/api/model.py | cottonmalone/binance-dex | 2b33e5d0dd0e24e78eea58e857d9872e5adc8c5f | [
"MIT"
] | null | null | null | from collections import namedtuple
from kim import Mapper, field
class BaseModel(object):
"""
Base model class for mapped classes.
Provides programmatic constructor and convenience methods for equivalence
and printing.
"""
def __init__(self, **kwargs):
for key, value in kwargs.items(... | 22.028169 | 77 | 0.623402 |
c88c343ad4b8a5a5393c68318e6aee2d7a8932d9 | 987 | py | Python | problems/131.Palindrome_Partitioning/AC_dp_nm.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/131.Palindrome_Partitioning/AC_dp_nm.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | problems/131.Palindrome_Partitioning/AC_dp_nm.py | subramp-prep/leetcode | d125201d9021ab9b1eea5e5393c2db4edd84e740 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: illuz <iilluzen[at]gmail.com>
# File: AC_dp_nm.py
# Create Date: 2015-03-19 09:45:12
# Usage: AC_dp_nm.py
# Descripton:
class Solution:
# @param s, a string
# @return a list of lists of string
def partition(self, s):
slen = l... | 23.5 | 54 | 0.47619 |
973e6c1643d8ab4155e0f66050a5582c56cdc7ac | 1,500 | py | Python | samples/generated_samples/cloudoptimization_v1_generated_fleet_routing_optimize_tours_async.py | changsongd/python-optimization | 9f574507010ef637e5a6912a1cb725b782c03cf4 | [
"Apache-2.0"
] | null | null | null | samples/generated_samples/cloudoptimization_v1_generated_fleet_routing_optimize_tours_async.py | changsongd/python-optimization | 9f574507010ef637e5a6912a1cb725b782c03cf4 | [
"Apache-2.0"
] | 4 | 2022-03-24T18:26:49.000Z | 2022-03-31T19:18:00.000Z | samples/generated_samples/cloudoptimization_v1_generated_fleet_routing_optimize_tours_async.py | changsongd/python-optimization | 9f574507010ef637e5a6912a1cb725b782c03cf4 | [
"Apache-2.0"
] | 2 | 2022-03-24T19:22:44.000Z | 2022-03-28T21:19:59.000Z | # -*- coding: utf-8 -*-
# Copyright 2022 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... | 32.608696 | 85 | 0.766 |
6fe32008ab356ed0f073decf326fb4776e367afa | 5,878 | py | Python | uniq_rse_analysis.py | etri-city-traffic-brain/traffic_demand_tools | 1ac4a691948c8ea073f8145d0472898fc0c4bfaa | [
"Apache-2.0"
] | 6 | 2020-11-23T05:07:51.000Z | 2021-12-27T05:10:16.000Z | uniq_rse_analysis.py | etri-city-traffic-brain/traffic_demand_tools | 1ac4a691948c8ea073f8145d0472898fc0c4bfaa | [
"Apache-2.0"
] | null | null | null | uniq_rse_analysis.py | etri-city-traffic-brain/traffic_demand_tools | 1ac4a691948c8ea073f8145d0472898fc0c4bfaa | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import sys
import os
import openpyxl
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.patheffects as path_effects
# Filtering according to target date and target time
# Cureent Target Time: 09:30 to 10:30 (1hour)
# If you need to change the time, you can modify following fu... | 39.449664 | 170 | 0.579619 |
61c26b3fa36ad844f211136b9357a96947412248 | 22,413 | py | Python | tests/python/unittest/test_io.py | ZiyueHuang/incubator-mxnet-1 | 566bbf74c9259d92a2321ccabb68ead048c75372 | [
"Apache-2.0"
] | 13 | 2017-08-11T05:19:48.000Z | 2020-05-12T02:09:27.000Z | tests/python/unittest/test_io.py | ZiyueHuang/incubator-mxnet-1 | 566bbf74c9259d92a2321ccabb68ead048c75372 | [
"Apache-2.0"
] | 4 | 2021-03-30T11:59:59.000Z | 2022-03-12T00:40:23.000Z | tests/python/unittest/test_io.py | ZiyueHuang/incubator-mxnet-1 | 566bbf74c9259d92a2321ccabb68ead048c75372 | [
"Apache-2.0"
] | 13 | 2016-11-10T06:38:46.000Z | 2021-03-18T21:26:11.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 38.844021 | 120 | 0.611386 |
d8513c1a383bc19a466c2173693322c29c14d5a0 | 1,536 | py | Python | ietf/utils/migrations/0001_initial.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | ietf/utils/migrations/0001_initial.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | ietf/utils/migrations/0001_initial.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | # Copyright The IETF Trust 2018-2019, All Rights Reserved
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-20 10:52
from __future__ import absolute_import, print_function, unicode_literals
import six
if six.PY3:
from typing import List, Tuple # pyflakes:ignore
from django.db import migratio... | 32.680851 | 114 | 0.561198 |
605e1cb8b35de157934f7e20498fad4884e66c29 | 1,098 | py | Python | hpat/__init__.py | AlexanderKalistratov/hpat | be1c9cdbd26c55162bad4bb6dfe77af176584d40 | [
"BSD-2-Clause"
] | 1 | 2022-02-21T06:49:03.000Z | 2022-02-21T06:49:03.000Z | hpat/__init__.py | kozlov-alexey/sdc | f1a48b3388713da2f96719d7003e7a400953f21e | [
"BSD-2-Clause"
] | 2 | 2019-10-11T16:49:03.000Z | 2019-10-14T22:05:50.000Z | hpat/__init__.py | kozlov-alexey/sdc | f1a48b3388713da2f96719d7003e7a400953f21e | [
"BSD-2-Clause"
] | null | null | null | from ._version import get_versions
import numba
# re-export from Numba
from numba import (typeof, prange, pndindex, gdb, gdb_breakpoint, gdb_init,
stencil, threading_layer, jitclass, objmode)
from numba.types import *
import hpat.dict_ext
import hpat.set_ext
from hpat.set_ext import init_set_string... | 28.894737 | 75 | 0.795082 |
127a9f6d62eac1129f3ad06c7238e8a29b8b8aef | 2,214 | py | Python | Tool_FoodChooser/fc1.0.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 14 | 2018-05-21T05:12:25.000Z | 2021-11-28T14:49:55.000Z | Tool_FoodChooser/fc1.0.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 2 | 2018-11-28T20:59:37.000Z | 2021-07-27T22:39:33.000Z | Tool_FoodChooser/fc1.0.py | yo1995/Daily_Python_Tasks | 211255deead5023cdcea1db4f49a53eedfe762b6 | [
"MIT"
] | 6 | 2019-03-21T01:07:57.000Z | 2021-03-29T03:24:33.000Z | # -*- coding: utf-8 -*-
import time
import random
def read_food_list():
with open('list.txt', 'r', encoding='UTF-8') as f:
lines = f.readlines()
meal_list = []
for line in lines:
if '!' in line:
[meal_name, meal_items] = line.split('!')
item_list... | 30.328767 | 89 | 0.563686 |
551cd98945d3dcc74daa7fc488a3ed4011c36a6d | 1,456 | py | Python | pycontrolsystem/Client/DataLogger.py | DanielWinklehner/pycontrolsystem | b34ee9f463bf1d37e3892a00d313efe0708cc4c7 | [
"MIT"
] | 1 | 2019-05-19T23:50:36.000Z | 2019-05-19T23:50:36.000Z | pycontrolsystem/Client/DataLogger.py | DanielWinklehner/pycontrolsystem | b34ee9f463bf1d37e3892a00d313efe0708cc4c7 | [
"MIT"
] | null | null | null | pycontrolsystem/Client/DataLogger.py | DanielWinklehner/pycontrolsystem | b34ee9f463bf1d37e3892a00d313efe0708cc4c7 | [
"MIT"
] | null | null | null | import h5py
import numpy as np
import time
import os
class DataLogger(object):
def __init__(self, filename):
self._h5fn = filename
self._h5file = None
self._data_set = {}
self._main_group = None
def initialize(self):
if not os.path.exists(os.path.dirname(self._h5fn)):
... | 30.978723 | 97 | 0.599588 |
84b72344b6a97213a074567d021c12d87547736a | 1,067 | py | Python | mindarmour/reliability/__init__.py | hboshnak/mindarmour | 0609a4eaea875a84667bed279add9305752880cc | [
"Apache-2.0"
] | null | null | null | mindarmour/reliability/__init__.py | hboshnak/mindarmour | 0609a4eaea875a84667bed279add9305752880cc | [
"Apache-2.0"
] | null | null | null | mindarmour/reliability/__init__.py | hboshnak/mindarmour | 0609a4eaea875a84667bed279add9305752880cc | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.518519 | 86 | 0.786317 |
fd0795df512b05f96e059d9b8c325fd2d8fd104b | 16,443 | py | Python | Lib/gftools/utils.py | moontypespace/gftools | 9ff6932eb887e4c1e05dd94107aa0c3438ae26a9 | [
"Apache-2.0"
] | 24 | 2017-10-11T09:08:16.000Z | 2018-06-09T14:38:03.000Z | Lib/gftools/utils.py | moontypespace/gftools | 9ff6932eb887e4c1e05dd94107aa0c3438ae26a9 | [
"Apache-2.0"
] | 54 | 2017-10-11T10:09:46.000Z | 2018-06-08T09:54:55.000Z | Lib/gftools/utils.py | moontypespace/gftools | 9ff6932eb887e4c1e05dd94107aa0c3438ae26a9 | [
"Apache-2.0"
] | 10 | 2017-10-11T09:16:00.000Z | 2018-05-23T19:46:07.000Z | #!/usr/bin/env python3
# Copyright 2016 The Fontbakery Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 31.866279 | 83 | 0.639239 |
36e7700f6876df171ca06124a37eab3a4874c3f2 | 21,247 | py | Python | wagtail/wagtailimages/models.py | chrxr/wagtail | 9038da9fcd69f0b39121cc54a72f4a6ae6beb06a | [
"BSD-3-Clause"
] | 1 | 2016-12-28T11:51:15.000Z | 2016-12-28T11:51:15.000Z | wagtail/wagtailimages/models.py | chrxr/wagtail | 9038da9fcd69f0b39121cc54a72f4a6ae6beb06a | [
"BSD-3-Clause"
] | null | null | null | wagtail/wagtailimages/models.py | chrxr/wagtail | 9038da9fcd69f0b39121cc54a72f4a6ae6beb06a | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import hashlib
import inspect
import os.path
import warnings
from collections import OrderedDict
from contextlib import contextmanager
import django
from django.conf import settings
from django.core import checks
from django.core.files import File
from django.c... | 36.011864 | 116 | 0.63223 |
79db99c54da5ae77ceb2652f3e288ea210df8d70 | 46,335 | py | Python | ocs_ci/ocs/node.py | kesavanvt/ocs-ci | f120044486631f49133c9f3a137842673d765a1c | [
"MIT"
] | null | null | null | ocs_ci/ocs/node.py | kesavanvt/ocs-ci | f120044486631f49133c9f3a137842673d765a1c | [
"MIT"
] | null | null | null | ocs_ci/ocs/node.py | kesavanvt/ocs-ci | f120044486631f49133c9f3a137842673d765a1c | [
"MIT"
] | null | null | null | import copy
import logging
import re
from prettytable import PrettyTable
from collections import defaultdict
from subprocess import TimeoutExpired
from ocs_ci.ocs.machine import get_machine_objs
from ocs_ci.framework import config
from ocs_ci.ocs.exceptions import TimeoutExpiredError
from ocs_ci.ocs.ocp import OCP
f... | 31.584867 | 107 | 0.659933 |
35b77b874a9b3869cd680ad8843b32e1cda90085 | 2,248 | py | Python | basis_modules/modules/alphavantage/importers/base.py | kvh/snapflow-modules | 6123597f4b71a8e890b8ba7df471c7efbd59d6a4 | [
"BSD-3-Clause"
] | null | null | null | basis_modules/modules/alphavantage/importers/base.py | kvh/snapflow-modules | 6123597f4b71a8e890b8ba7df471c7efbd59d6a4 | [
"BSD-3-Clause"
] | 2 | 2021-07-26T17:46:22.000Z | 2021-08-02T19:40:02.000Z | basis_modules/modules/alphavantage/importers/base.py | kvh/snapflow-modules | 6123597f4b71a8e890b8ba7df471c7efbd59d6a4 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
import json
import time
from dataclasses import dataclass, field
from datetime import date, datetime, timedelta
from typing import TYPE_CHECKING, Dict, Iterator, List, Optional
from basis import Context, DataBlock, Reference, datafunction
from basis.core.extraction.connection import... | 28.1 | 76 | 0.69395 |
36eac3c013d53ac88e94ed0664690054cb94fd2d | 11,867 | py | Python | scripts/themecreator/tools.py | AgnirudraSil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | 3 | 2022-01-11T06:11:08.000Z | 2022-03-10T09:34:42.000Z | scripts/themecreator/tools.py | agnirudrasil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | null | null | null | scripts/themecreator/tools.py | agnirudrasil/tetris | 2a4f4c26190fc8b669f98c116af343f7f1ac51bf | [
"MIT"
] | null | null | null | import numpy
import pygame
import pyautogui
from random import randint as rint
from scripts import openfile
from PIL import Image
from PIL import ImageDraw
class Reset:
def __init__(self):
self.surf = pygame.image.load(openfile("assets/icons/reset.png")).convert_alpha()
self.rect = self.surf.get_r... | 38.404531 | 109 | 0.573523 |
fde0271b4311da27a55a8e82046e84762d3be116 | 567 | py | Python | ML/Practice/Regression.py | jsinghvi/Weekend_Projects | 680835e6f8afdbf797e303b19597ed06ecc3c43e | [
"MIT"
] | null | null | null | ML/Practice/Regression.py | jsinghvi/Weekend_Projects | 680835e6f8afdbf797e303b19597ed06ecc3c43e | [
"MIT"
] | null | null | null | ML/Practice/Regression.py | jsinghvi/Weekend_Projects | 680835e6f8afdbf797e303b19597ed06ecc3c43e | [
"MIT"
] | null | null | null | import quandl
import pandas as pd
import math
df = quandl.get('WIKI/GOOGL')
df = df[['Adj. Open','Adj. High','Adj. Low','Adj. Close','Adj. Volume']]
df['HL_PCT'] = (df['Adj. High'] - df['Adj. Close']) / df['Adj. Close'] * 100.0
df['PCT_change'] = (df['Adj. Close'] - df['Adj. Open']) / df['Adj. Open'] * 100.0
df = df[... | 33.352941 | 81 | 0.641975 |
4844e592675e1dcebced1456643635ebd52395ee | 568 | py | Python | server/djangoapp/admin.py | Ryllz/agfzb-CloudAppDevelopment_Capstone | a19c7c110aab16de0f73f3c309a1a0568e8ed967 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | Ryllz/agfzb-CloudAppDevelopment_Capstone | a19c7c110aab16de0f73f3c309a1a0568e8ed967 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/admin.py | Ryllz/agfzb-CloudAppDevelopment_Capstone | a19c7c110aab16de0f73f3c309a1a0568e8ed967 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import CarModel, CarMake
# CarModelInline class
class CarModelInline(admin.StackedInline):
model = CarModel
extra = 5
# CarModelAdmin class
class CarModelAdmin(admin.ModelAdmin):
fields = ['manufacturer', 'name', 'dealer_id','car_type','year']
# CarMakeAd... | 28.4 | 72 | 0.742958 |
b3369987527db2f93c22c27fef14fd92fe40ee1b | 21,445 | py | Python | integration-tests/bot/chainbot.py | crypto-raymond/chain-1 | f0b612fc5cadf42308d3377f364f5751cca893a6 | [
"Apache-2.0"
] | null | null | null | integration-tests/bot/chainbot.py | crypto-raymond/chain-1 | f0b612fc5cadf42308d3377f364f5751cca893a6 | [
"Apache-2.0"
] | null | null | null | integration-tests/bot/chainbot.py | crypto-raymond/chain-1 | f0b612fc5cadf42308d3377f364f5751cca893a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
import base64
import hashlib
import json
import asyncio
import tempfile
from pathlib import Path
import re
import os
import configparser
import binascii
# import time
import shutil
import jsonpatch
import fire
import toml
import nacl.signing
from nacl.encoding import HexEncoder
PASSP... | 33.351477 | 229 | 0.545069 |
879b5b6a238b3dbef41ac364fbb86a957f943836 | 7,103 | py | Python | rockyroad/driver.py | kevbradwick/rockyroad | d0b9da7273b028d5435a68b0e4c409aa882f49a2 | [
"BSD-3-Clause"
] | null | null | null | rockyroad/driver.py | kevbradwick/rockyroad | d0b9da7273b028d5435a68b0e4c409aa882f49a2 | [
"BSD-3-Clause"
] | null | null | null | rockyroad/driver.py | kevbradwick/rockyroad | d0b9da7273b028d5435a68b0e4c409aa882f49a2 | [
"BSD-3-Clause"
] | null | null | null | import errno
import glob
import platform
import re
import sys
import tempfile
import zipfile
from contextlib import contextmanager
from distutils.version import StrictVersion
import os
import requests
from xml.etree import ElementTree
IS_64_BIT = sys.maxsize > 2**32
IS_LINUX = platform.system().lower() == 'linux'
I... | 27.964567 | 84 | 0.579051 |
80df37b53bbc27178cffa48ac6b0ca5dba92823b | 22,587 | py | Python | contrib/devtools/copyright_header.py | wolfoxonly/fpc | bf372369fbbc271330527b5fb83d6285a865332c | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | wolfoxonly/fpc | bf372369fbbc271330527b5fb83d6285a865332c | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | wolfoxonly/fpc | bf372369fbbc271330527b5fb83d6285a865332c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2017 The Flashpaychain Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
import datetime
import os
##################... | 36.846656 | 92 | 0.603312 |
d39b8018ae61f46c53654c0ead6845b4bdc12b93 | 2,503 | py | Python | tools/generate-devstack-plugins-list.py | adduarte/devstack | ae7e10f5ee967efc7011e1c3f30dc96c53081580 | [
"Apache-2.0"
] | 1 | 2019-11-28T00:10:55.000Z | 2019-11-28T00:10:55.000Z | tools/generate-devstack-plugins-list.py | mykiep/devstack | 595759c764eebbaffeb120f178dcd9069fbba070 | [
"Apache-2.0"
] | null | null | null | tools/generate-devstack-plugins-list.py | mykiep/devstack | 595759c764eebbaffeb120f178dcd9069fbba070 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P.
#
# 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... | 31.683544 | 89 | 0.728726 |
0528d89518a9bb1116801e4620cbae112362746b | 467 | py | Python | pubtrack/wsgi.py | the16thpythonist/pubtrack | 5d44914ed6aafe01dc7b234e9f4e8d12e45dfb50 | [
"MIT"
] | null | null | null | pubtrack/wsgi.py | the16thpythonist/pubtrack | 5d44914ed6aafe01dc7b234e9f4e8d12e45dfb50 | [
"MIT"
] | 4 | 2020-07-28T10:04:57.000Z | 2021-09-22T19:03:17.000Z | pubtrack/wsgi.py | the16thpythonist/pubtrack | 5d44914ed6aafe01dc7b234e9f4e8d12e45dfb50 | [
"MIT"
] | null | null | null | """
WSGI config for pubtrack 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/2.0/howto/deployment/wsgi/gunicorn/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pubtrack.config")
os.environ.s... | 33.357143 | 78 | 0.796574 |
46a74f3b9526f3910c3a8e83f21570b4a6798352 | 239 | py | Python | data_science_toolbox/gists/profile_data.py | safurrier/data_science_utils | 842b025ea3197e8a9946401257b2fa22ef1bf82d | [
"MIT"
] | 3 | 2019-02-14T21:16:15.000Z | 2020-05-05T20:20:42.000Z | data_science_toolbox/gists/profile_data.py | safurrier/data_science_utils | 842b025ea3197e8a9946401257b2fa22ef1bf82d | [
"MIT"
] | null | null | null | data_science_toolbox/gists/profile_data.py | safurrier/data_science_utils | 842b025ea3197e8a9946401257b2fa22ef1bf82d | [
"MIT"
] | 1 | 2019-07-11T02:06:49.000Z | 2019-07-11T02:06:49.000Z | import pathlib
import pandas_profiling
output_profile_path = pathlib.Path("reports/data-profiling/01-01-initial_data_profiling.html")
profile = pandas_profiling.ProfileReport(data)
profile.to_file(outputfile=output_profile_path.as_posix()) | 47.8 | 94 | 0.861925 |
c71a163fb25ad1a3b45cde8aabeace218d509426 | 347 | py | Python | Python/Unsorted/122a.py | LittleEndu/Codeforces | 82c49b10702c58bc5ce062801d740a2f5f600062 | [
"MIT"
] | null | null | null | Python/Unsorted/122a.py | LittleEndu/Codeforces | 82c49b10702c58bc5ce062801d740a2f5f600062 | [
"MIT"
] | null | null | null | Python/Unsorted/122a.py | LittleEndu/Codeforces | 82c49b10702c58bc5ce062801d740a2f5f600062 | [
"MIT"
] | null | null | null | # Smallest:
# n=int(input());print('YNEOS'[all(set(str(i))-set('47')or n%i for i in range(n+1))::2])
# No idea...
# Also not going to brute force it against test cases like others seemed to have. My solution would work for any number
d=[4,7,44,47,74,77,444,447,474,477,744,747,774,777]
a=int(input())
print(['NO','YES']... | 43.375 | 119 | 0.657061 |
3309f4e6f75e02a6095d2576239860c9e4523a5b | 300 | py | Python | 400-499/414.py | linyk9/leetcode | eaaadead32cc9d3884543f4ed832bb3cb5aa68e6 | [
"MIT"
] | null | null | null | 400-499/414.py | linyk9/leetcode | eaaadead32cc9d3884543f4ed832bb3cb5aa68e6 | [
"MIT"
] | null | null | null | 400-499/414.py | linyk9/leetcode | eaaadead32cc9d3884543f4ed832bb3cb5aa68e6 | [
"MIT"
] | null | null | null | class Solution:
def thirdMax(self, nums: List[int]) -> int:
nums = list(set([-x for x in nums]))
if len(nums) < 3:
return -min(nums)
heapq.heapify(nums)
# print(nums)
for _ in range(3):
ans = -heapq.heappop(nums)
return ans
| 27.272727 | 47 | 0.506667 |
0842a59885e80171480b3f16ba9da0e5af6cf39e | 3,327 | py | Python | benchmark/startCirq873.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq873.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startCirq873.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=5
# total number=38
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 36.163043 | 77 | 0.655546 |
6b73e99235cd9915ea7dfcd0aaa870e458a304a7 | 34,139 | py | Python | venv/lib/python3.7/site-packages/mysqlx/protocol.py | sa77irak/flask_tuto_hf | 4994e6053e9784702c4c70cf60b376750ec91ae9 | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/mysqlx/protocol.py | sa77irak/flask_tuto_hf | 4994e6053e9784702c4c70cf60b376750ec91ae9 | [
"MIT"
] | 10 | 2020-02-12T01:16:17.000Z | 2022-03-12T00:51:05.000Z | backend/Lib/site-packages/mysqlx/protocol.py | koyota79/weekly-report | a9f518965d9f51e81c13711a8b0bfda336eae2a0 | [
"bzip2-1.0.6"
] | 1 | 2020-07-20T17:25:48.000Z | 2020-07-20T17:25:48.000Z | # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0, as
# published by the Free Software Foundation.
#
# This program is also distributed with certain s... | 38.488162 | 80 | 0.564486 |
e5022b5020c48f943d3e6a85dc7a28b58a4fcd96 | 784 | py | Python | docker_engine/komand_docker_engine/actions/container_logs/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2020-03-18T09:14:55.000Z | 2020-03-18T09:14:55.000Z | docker_engine/komand_docker_engine/actions/container_logs/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | 1 | 2021-02-23T23:57:37.000Z | 2021-02-23T23:57:37.000Z | docker_engine/komand_docker_engine/actions/container_logs/action.py | killstrelok/insightconnect-plugins | 911358925f4233ab273dbd8172e8b7b9188ebc01 | [
"MIT"
] | null | null | null | import komand
from .schema import ContainerLogsInput, ContainerLogsOutput
# Custom imports below
import docker
class ContainerLogs(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='container_logs',
description='Retrieve container logs',
... | 29.037037 | 86 | 0.604592 |
07205651b071eb6a9819ed201ff07b3ab6dca584 | 435 | py | Python | TAKfreeServer/runModelTest.py | benking84/FreeTakServer | d8f3c89e1b41d6f0ca61c0a08768d97d3e4a3f42 | [
"MIT"
] | null | null | null | TAKfreeServer/runModelTest.py | benking84/FreeTakServer | d8f3c89e1b41d6f0ca61c0a08768d97d3e4a3f42 | [
"MIT"
] | null | null | null | TAKfreeServer/runModelTest.py | benking84/FreeTakServer | d8f3c89e1b41d6f0ca61c0a08768d97d3e4a3f42 | [
"MIT"
] | null | null | null | from Controllers.RequestCOTController import RequestCOTController
import xml.etree.ElementTree as et
#below enter the comm type and necesary parameters in arguments
#aEvent = RequestCOTController().chat(chatType = 'chatToAll', senderCallsign = 'a', chatroom = 'b', groupOwner = 'c', id = 'd', parent = 'e', uid0 = 'f', ... | 48.333333 | 182 | 0.717241 |
018ecc35ceb3840999b3bd671d865fc89a2158b4 | 7,435 | py | Python | lib/rucio/tests/test_rse_lfn2path.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_rse_lfn2path.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_rse_lfn2path.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright CERN since 2018
#
# 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 ... | 42.976879 | 110 | 0.663753 |
ef42f35007d3b37b716ca625ada1ca98e52afd44 | 5,802 | py | Python | scripts/scrape_jobs_data.py | covega/enviro_papers | 97d8898372c711918df411fe0f76b0be3552654c | [
"MIT"
] | null | null | null | scripts/scrape_jobs_data.py | covega/enviro_papers | 97d8898372c711918df411fe0f76b0be3552654c | [
"MIT"
] | 17 | 2019-08-21T02:09:59.000Z | 2021-08-23T20:14:46.000Z | scripts/scrape_jobs_data.py | covega/enviro_papers | 97d8898372c711918df411fe0f76b0be3552654c | [
"MIT"
] | 1 | 2019-11-19T22:25:32.000Z | 2019-11-19T22:25:32.000Z | #!/usr/bin/env python
# coding: utf-8
import sys
import os, os.path
import requests
import time
import pandas as pd
import asyncio
from aiohttp import ClientSession
from bs4 import BeautifulSoup
from multiprocessing.pool import ThreadPool
METADATA_CSV = os.path.join(os.getcwd(), 'data/raw/jobs/jobs_metadata.csv')
OUT... | 33.344828 | 173 | 0.607377 |
776ad4202b1a8baa32c5a633837b06810175d85e | 3,030 | py | Python | venv/Lib/site-packages/sqlalchemy/inspection.py | YunJaePark3908/BaseAPIServer | 17ab922917541406a3c2d75b428614ce97152a16 | [
"Apache-2.0"
] | 2 | 2021-02-20T22:43:47.000Z | 2021-05-06T03:43:20.000Z | venv/Lib/site-packages/sqlalchemy/inspection.py | YunJaePark3908/BaseAPIServer | 17ab922917541406a3c2d75b428614ce97152a16 | [
"Apache-2.0"
] | 8 | 2021-03-26T19:13:07.000Z | 2021-04-19T18:34:33.000Z | venv/Lib/site-packages/sqlalchemy/inspection.py | YunJaePark3908/BaseAPIServer | 17ab922917541406a3c2d75b428614ce97152a16 | [
"Apache-2.0"
] | 3 | 2021-11-30T11:10:26.000Z | 2021-12-08T05:59:31.000Z | # sqlalchemy/inspect.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""The inspection module provides the :func:`_sa.inspect` function,
which deli... | 32.234043 | 72 | 0.684488 |
01a165d3a81f6c65f2375ff208ce3657c9a28f7b | 636 | py | Python | Day32/ex2.py | SSRout/100-days-of-code | 7aafa7789a57bf701b60043fa2bf8fb61b64bfb5 | [
"MIT"
] | null | null | null | Day32/ex2.py | SSRout/100-days-of-code | 7aafa7789a57bf701b60043fa2bf8fb61b64bfb5 | [
"MIT"
] | null | null | null | Day32/ex2.py | SSRout/100-days-of-code | 7aafa7789a57bf701b60043fa2bf8fb61b64bfb5 | [
"MIT"
] | null | null | null | #Monday Motivation Project
import smtplib
import datetime as dt
import random
MY_EMAIL = "test mail"
MY_PASSWORD = "testkey"
now = dt.datetime.now()
weekday = now.weekday()
if weekday == 0:
with open("Day32/quotes.txt") as quote_file:
all_quotes = quote_file.readlines()
quote = random.choice(all_q... | 25.44 | 55 | 0.658805 |
45b6ebf3e23f1bd09c9451ce002c60c80d93154a | 4,566 | py | Python | memsource_cli/models/quality_assurance_response_dto.py | unofficial-memsource/memsource-cli-client | a6639506b74e95476da87f4375953448b76ea90c | [
"Apache-2.0"
] | 16 | 2019-09-25T00:20:38.000Z | 2021-05-04T05:56:10.000Z | memsource_cli/models/quality_assurance_response_dto.py | zerodayz/memsource-cli-client | c2574f1467539a49e6637c874e88d75c7ef789b3 | [
"Apache-2.0"
] | 26 | 2019-09-30T14:00:03.000Z | 2021-05-12T11:15:18.000Z | memsource_cli/models/quality_assurance_response_dto.py | zerodayz/memsource-cli-client | c2574f1467539a49e6637c874e88d75c7ef789b3 | [
"Apache-2.0"
] | 1 | 2021-05-24T16:19:14.000Z | 2021-05-24T16:19:14.000Z | # coding: utf-8
"""
Memsource REST API
Welcome to Memsource's API documentation. To view our legacy APIs please [visit our documentation](https://wiki.memsource.com/wiki/Memsource_API) and for more information about our new APIs, [visit our blog](https://www.memsource.com/blog/2017/10/24/introducing-rest-apis... | 31.708333 | 421 | 0.618484 |
335c9b7b72bc5d95d0af505d11f3a4b9b1e2e7c1 | 6,005 | py | Python | test/neo4j_graphdatabaseservice_match.py | fabsx00/py2neo | 80f6605499ee4cec4b338f15453e8f509a09468a | [
"Apache-2.0"
] | null | null | null | test/neo4j_graphdatabaseservice_match.py | fabsx00/py2neo | 80f6605499ee4cec4b338f15453e8f509a09468a | [
"Apache-2.0"
] | null | null | null | test/neo4j_graphdatabaseservice_match.py | fabsx00/py2neo | 80f6605499ee4cec4b338f15453e8f509a09468a | [
"Apache-2.0"
] | 1 | 2021-10-08T03:41:54.000Z | 2021-10-08T03:41:54.000Z | #/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2011-2014, Nigel Small
#
# 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 ... | 40.033333 | 96 | 0.64746 |
fa6d34758fbe55bf7d789ef7cff1409700b82689 | 14,048 | py | Python | reports/heliosV2/python/heliosFailureReport/heliosFailureReport.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | reports/heliosV2/python/heliosFailureReport/heliosFailureReport.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | reports/heliosV2/python/heliosFailureReport/heliosFailureReport.py | ped998/scripts | 0dcaaf47f9676210e1c972a5d59d8d0de82a1d93 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Helios v2 Failure Report"""
# import pyhesity wrapper module
from pyhesity import *
from datetime import datetime, timedelta
import codecs
# command line arguments
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--vip', type=str, default='helios.cohesity.com')
pa... | 40.601156 | 186 | 0.681592 |
d5ed6760af723e49461b31cc89ec86dd56c7c723 | 2,195 | py | Python | misc/sampleapp-android-tests/sampleapp/webrtc_pack.py | jiajiax/crosswalk-test-suite | 7606ec383f9c240248cbea071b642691fbffb32f | [
"BSD-3-Clause"
] | null | null | null | misc/sampleapp-android-tests/sampleapp/webrtc_pack.py | jiajiax/crosswalk-test-suite | 7606ec383f9c240248cbea071b642691fbffb32f | [
"BSD-3-Clause"
] | null | null | null | misc/sampleapp-android-tests/sampleapp/webrtc_pack.py | jiajiax/crosswalk-test-suite | 7606ec383f9c240248cbea071b642691fbffb32f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | 39.909091 | 123 | 0.72574 |
1e27b26bb271b77d46eed0aeeff9b7db7a5746ed | 244 | py | Python | hbase_util_test.py | wangzishuo111/bk_zhangdan | 30be7d92c53de4f18d90c00aba1ee73073f47029 | [
"MIT"
] | null | null | null | hbase_util_test.py | wangzishuo111/bk_zhangdan | 30be7d92c53de4f18d90c00aba1ee73073f47029 | [
"MIT"
] | null | null | null | hbase_util_test.py | wangzishuo111/bk_zhangdan | 30be7d92c53de4f18d90c00aba1ee73073f47029 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import hbase_util
from nose.tools import nottest,istest
from nose.tools import assert_equal, assert_true, assert_false
def setUp():
pass
# hbase_util.switch2local()
def test1():
pass
| 13.555556 | 62 | 0.696721 |
ab06a3a40826e7d41c040066fd41c56c1ed84ad2 | 26,666 | py | Python | tensorflow/python/layers/pooling.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 24 | 2018-02-01T15:49:22.000Z | 2021-01-11T16:31:18.000Z | tensorflow/python/layers/pooling.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 2 | 2017-08-01T21:11:06.000Z | 2017-08-01T23:07:02.000Z | tensorflow/python/layers/pooling.py | qinchangping/tensorflow | f7f7036d1cdc5716aff976fae0ea4d1b9a931b56 | [
"Apache-2.0"
] | 4 | 2018-10-29T18:43:22.000Z | 2020-09-28T07:19:52.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.97901 | 80 | 0.671679 |
7b6c43f844d78a853b052957e1661e7928a642eb | 7,436 | py | Python | mamba/core/rmap_utils/rmap_common.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | mamba/core/rmap_utils/rmap_common.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | mamba/core/rmap_utils/rmap_common.py | ismaelJimenez/mamba_server | e6e2343291a0df24f226bde0d13e5bfa74cc3650 | [
"MIT"
] | null | null | null | ############################################################################
#
# Copyright (c) Mamba Developers. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
############################################################################
import st... | 35.578947 | 79 | 0.500134 |
08f21bf72d0723b8c7469e1ab477aeb0ab3c4664 | 255 | py | Python | bot_save_last_price_zaif.py | ysawa/zaif-trade-bot | 4e5e62d2d03fff773b018ff960e2d9a0587c9a6e | [
"MIT"
] | 1 | 2018-02-01T06:24:49.000Z | 2018-02-01T06:24:49.000Z | bot_save_last_price_zaif.py | ysawa/zaif-trade-bot | 4e5e62d2d03fff773b018ff960e2d9a0587c9a6e | [
"MIT"
] | 5 | 2020-03-24T15:26:43.000Z | 2021-04-30T20:34:03.000Z | bot_save_last_price_zaif.py | ysawa/coin-trader | 4e5e62d2d03fff773b018ff960e2d9a0587c9a6e | [
"MIT"
] | null | null | null | import os
from base.save_last_price import save_last_price
from zaif.api import ZaifApi
DIRECTORY = os.path.join("data", "last_price", "zaif")
def main():
api = ZaifApi()
save_last_price(api, DIRECTORY)
if __name__ == '__main__':
main()
| 15.9375 | 54 | 0.701961 |
0b294c419235db7de95f4cafeb3256dfee520ef4 | 174 | py | Python | app/__init__.py | devdazed/django-docker-template | 520968ac5cd54070885de41f0e725c310f1cf380 | [
"MIT"
] | null | null | null | app/__init__.py | devdazed/django-docker-template | 520968ac5cd54070885de41f0e725c310f1cf380 | [
"MIT"
] | null | null | null | app/__init__.py | devdazed/django-docker-template | 520968ac5cd54070885de41f0e725c310f1cf380 | [
"MIT"
] | null | null | null |
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
__all__ = ('celery_app',) | 29 | 54 | 0.764368 |
e388e1b9dbaacf498d8f1bbc86df30b03258f3e7 | 8,312 | py | Python | src/nautilus_scripts/src/subway_car/subway_car.py | ungjus/nautilus_surface | 5dbce89f3f7ad4b614e7c3aa7d57394d301adeac | [
"MIT"
] | 4 | 2020-11-29T02:23:13.000Z | 2021-02-24T20:44:38.000Z | src/nautilus_scripts/src/subway_car/subway_car.py | ungjus/nautilus_surface | 5dbce89f3f7ad4b614e7c3aa7d57394d301adeac | [
"MIT"
] | 3 | 2020-10-22T02:10:04.000Z | 2021-02-14T02:46:21.000Z | src/nautilus_scripts/src/subway_car/subway_car.py | laurenk104/in_house_team_uw | 59cb385688a713b0b49c069f2ba81351b4cfaf42 | [
"MIT"
] | 4 | 2021-11-06T21:28:26.000Z | 2021-12-28T03:06:40.000Z | #!/usr/bin/env python3
import cv2
import numpy as np
import imutils
RECTANGLE_THRESHOLD = 150
CENTER_THRESHOLD_VARIANCE = 20
PIXELS_PER_CM = 1
LENGTH = 110
HEIGHT = 50
WIDTH = 50
DISPLAY_IMAGE_SCALE = 1
IMAGE_CORNER = (60, 60)
captureButtonLastState = False
captureButtonCurrentState = False
captureButtonDeleteState =... | 36.296943 | 178 | 0.591795 |
74dcbd671d38f94e9eeedb8f811df847523d0a49 | 793 | py | Python | gencove/command/basespace/autoimports/autoimport_list/cli.py | gncv/gencove-cli | b4bcbe5b6a1506544472542af8b2384d21c7cbe4 | [
"Apache-2.0"
] | 1 | 2020-04-28T06:31:53.000Z | 2020-04-28T06:31:53.000Z | gencove/command/basespace/autoimports/autoimport_list/cli.py | gncv/gencove-cli | b4bcbe5b6a1506544472542af8b2384d21c7cbe4 | [
"Apache-2.0"
] | null | null | null | gencove/command/basespace/autoimports/autoimport_list/cli.py | gncv/gencove-cli | b4bcbe5b6a1506544472542af8b2384d21c7cbe4 | [
"Apache-2.0"
] | 1 | 2021-07-29T08:24:51.000Z | 2021-07-29T08:24:51.000Z | """Project autoimport Biosamples from BaseSpace projects shell command
definition.
"""
import click
from gencove.command.common_cli_options import add_options, common_options
from gencove.constants import Credentials, Optionals
from .main import BaseSpaceAutoImportList
@click.command("list")
@add_options(common_opt... | 24.030303 | 75 | 0.728878 |
08f33346f014e3326af6bb0d6b438bca8b50f0ec | 1,313 | py | Python | frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py | ektai/erp2Dodock | 5ad64b01cba9b07437f9a27751101258679379e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils import get_url_to_form
from frappe import _
import requests
import json... | 25.745098 | 81 | 0.711348 |
ca7b5d3d9ebbd98013ee22a0c3245521c2600644 | 96 | py | Python | mamba/_version.py | dmaljovec/mamba | 599c2820086b5d69df8c73a98b2a4acf5dffe0df | [
"BSD-3-Clause"
] | null | null | null | mamba/_version.py | dmaljovec/mamba | 599c2820086b5d69df8c73a98b2a4acf5dffe0df | [
"BSD-3-Clause"
] | null | null | null | mamba/_version.py | dmaljovec/mamba | 599c2820086b5d69df8c73a98b2a4acf5dffe0df | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
version_info = (0, 1, 1)
__version__ = '.'.join(map(str, version_info))
| 24 | 46 | 0.604167 |
bf45d6597a1778083f07488e9155ad0de5bfc396 | 2,982 | py | Python | setup.py | wzhaojin/thingsboard-gateway | 9f0253b66b135a9080de1c14e029024c4d010234 | [
"Apache-2.0"
] | null | null | null | setup.py | wzhaojin/thingsboard-gateway | 9f0253b66b135a9080de1c14e029024c4d010234 | [
"Apache-2.0"
] | null | null | null | setup.py | wzhaojin/thingsboard-gateway | 9f0253b66b135a9080de1c14e029024c4d010234 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019. ThingsBoard
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 40.849315 | 134 | 0.687793 |
b945143cc11070a2f151b1b14edfe12809d052cf | 9,759 | py | Python | Tools/ss14_ru/keyfinder.py | Runker1/space-station-14 | b4b6929249c0ec5c6593899fbc85557fb20bbc19 | [
"MIT"
] | null | null | null | Tools/ss14_ru/keyfinder.py | Runker1/space-station-14 | b4b6929249c0ec5c6593899fbc85557fb20bbc19 | [
"MIT"
] | 2 | 2022-01-05T04:21:16.000Z | 2022-01-06T04:51:47.000Z | Tools/ss14_ru/keyfinder.py | Runker1/space-station-14 | b4b6929249c0ec5c6593899fbc85557fb20bbc19 | [
"MIT"
] | null | null | null | import typing
import logging
from pydash import py_
from file import FluentFile
from fluentast import FluentAstAbstract
from fluentformatter import FluentFormatter
from project import Project
from fluent.syntax import ast, FluentParser, FluentSerializer
# Осуществляет актуализацию ключей. Находит файлы английского ... | 44.766055 | 156 | 0.672507 |
f9f997e70b71e6452c028138eaec0ae79ac54387 | 1,015 | py | Python | tools/SDKTool/src/context/app_context.py | Passer-D/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 1,210 | 2020-08-18T07:57:36.000Z | 2022-03-31T15:06:05.000Z | tools/SDKTool/src/context/app_context.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 37 | 2020-08-24T02:48:38.000Z | 2022-01-30T06:41:52.000Z | tools/SDKTool/src/context/app_context.py | guokaiSama/GameAISDK | a089330a30b7bfe1f6442258a12d8c0086240606 | [
"Apache-2.0"
] | 275 | 2020-08-18T08:35:16.000Z | 2022-03-31T15:06:07.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making GameAISDK available.
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright... | 29.852941 | 111 | 0.694581 |
938122ef69dd225599f46b63ed42e7fc0ca6d1b8 | 47,924 | py | Python | aiocoap/protocol.py | HRogge/aiocoap | 9b249a22cb3b7316dfa7ebb32bafd2dc873df61a | [
"MIT"
] | null | null | null | aiocoap/protocol.py | HRogge/aiocoap | 9b249a22cb3b7316dfa7ebb32bafd2dc873df61a | [
"MIT"
] | null | null | null | aiocoap/protocol.py | HRogge/aiocoap | 9b249a22cb3b7316dfa7ebb32bafd2dc873df61a | [
"MIT"
] | null | null | null | # This file is part of the Python aiocoap library project.
#
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
# 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at>
#
# aiocoap is free software, this file is published under the MIT license as
# described in the accompany... | 43.135914 | 171 | 0.635485 |
e519940bd490d6a53ebf258268d117c91bb85f41 | 1,984 | py | Python | python/chapter-5/hello_world_mirrored_queue_consumer_selective_nodes.py | Vekaco/rabbitmq-in-action | 1a4afd73d4ec466b942192a2b289adf871b91600 | [
"BSD-2-Clause"
] | 270 | 2015-01-03T04:22:25.000Z | 2021-12-28T03:08:02.000Z | python/chapter-5/hello_world_mirrored_queue_consumer_selective_nodes.py | Vekaco/rabbitmq-in-action | 1a4afd73d4ec466b942192a2b289adf871b91600 | [
"BSD-2-Clause"
] | 23 | 2020-02-12T02:35:49.000Z | 2022-02-11T03:45:40.000Z | python/chapter-5/hello_world_mirrored_queue_consumer_selective_nodes.py | Vekaco/rabbitmq-in-action | 1a4afd73d4ec466b942192a2b289adf871b91600 | [
"BSD-2-Clause"
] | 174 | 2015-01-22T23:48:15.000Z | 2022-03-06T12:38:52.000Z | ###############################################
# RabbitMQ in Action
# Chapter 5 - Hello World Consumer
# (Mirrored Queues)
#
# Requires: pika >= 0.9.5
#
# Author: Jason J. W. Williams
# (C)2011
###############################################
import pika
credentials = pika.PlainCredentials("guest", "gue... | 34.807018 | 110 | 0.587198 |
7d3e5d7b03494f7fe0297d1036c81a16d8d97c3f | 31 | py | Python | market_characterization/tests.py | DavimenUC3M/IronIA-RoboAdvisor | 06d37889d5cb9c40139ceb6a41c959b92fff3291 | [
"MIT"
] | null | null | null | market_characterization/tests.py | DavimenUC3M/IronIA-RoboAdvisor | 06d37889d5cb9c40139ceb6a41c959b92fff3291 | [
"MIT"
] | null | null | null | market_characterization/tests.py | DavimenUC3M/IronIA-RoboAdvisor | 06d37889d5cb9c40139ceb6a41c959b92fff3291 | [
"MIT"
] | 2 | 2022-01-31T21:56:44.000Z | 2022-02-02T10:28:00.000Z | import investpy
import pandas
| 7.75 | 15 | 0.83871 |
dd9c23efb16af95d91acca83db5eb4d3ff9a9426 | 154 | py | Python | hobby/route.py | maoxuelin083/restful-Blog | 29a08613d71ee6c369dcec9ffb09a2a2ed837431 | [
"Apache-2.0"
] | null | null | null | hobby/route.py | maoxuelin083/restful-Blog | 29a08613d71ee6c369dcec9ffb09a2a2ed837431 | [
"Apache-2.0"
] | null | null | null | hobby/route.py | maoxuelin083/restful-Blog | 29a08613d71ee6c369dcec9ffb09a2a2ed837431 | [
"Apache-2.0"
] | null | null | null | from flask_restful import Api
from hobby.views import HobbyResource
hobby_api = Api(prefix='/hobby')
hobby_api.add_resource(HobbyResource, '/')
| 19.25 | 43 | 0.753247 |
13c191328b2b919de7bba25ffb2e0d5d6fee3549 | 7,195 | py | Python | kolibri/plugins/coach/test/test_coach_api.py | prathamopenschool1/kolibri | 395928c206c4c750de9fddcacdd8ca040c3014ff | [
"MIT"
] | null | null | null | kolibri/plugins/coach/test/test_coach_api.py | prathamopenschool1/kolibri | 395928c206c4c750de9fddcacdd8ca040c3014ff | [
"MIT"
] | null | null | null | kolibri/plugins/coach/test/test_coach_api.py | prathamopenschool1/kolibri | 395928c206c4c750de9fddcacdd8ca040c3014ff | [
"MIT"
] | 1 | 2019-11-12T14:00:30.000Z | 2019-11-12T14:00:30.000Z | """
To run this test, type this in command line <kolibri manage test -- kolibri.content>
"""
import datetime
from django.core.urlresolvers import reverse
from django.utils import timezone
from rest_framework.test import APITestCase
from kolibri.auth.constants import collection_kinds
from kolibri.auth.constants import... | 39.532967 | 102 | 0.634329 |
6a7f14110a6181e39425197cf81cfb1b578d7821 | 2,815 | py | Python | src/bitcaster/dispatchers/handlers/zulip.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 4 | 2018-03-01T10:22:30.000Z | 2020-04-04T16:31:11.000Z | src/bitcaster/dispatchers/handlers/zulip.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 60 | 2018-05-20T04:42:32.000Z | 2022-02-10T17:03:37.000Z | src/bitcaster/dispatchers/handlers/zulip.py | bitcaster-io/bitcaster | 9f1bad96e00e3bc78a22451731e231d30662b166 | [
"BSD-3-Clause"
] | 1 | 2018-08-04T05:06:45.000Z | 2018-08-04T05:06:45.000Z | from logging import getLogger
from django.utils.translation import gettext_lazy as _
from rest_framework import serializers
from zulip import Client as ZulipClient
from bitcaster.exceptions import PluginSendError
from bitcaster.utils.reflect import fqn
from ..base import (CoreDispatcher, DispatcherOptions,
... | 33.511905 | 118 | 0.645471 |
c44e3771e8acdbf22be337978a9aca7694b49d0f | 2,094 | py | Python | Pytorch_1/dice_loss.py | sunshower76/Polyp-Segmentation | 764a62dd8de134e462939aafb0c1c24d67dfb564 | [
"MIT"
] | 2 | 2020-02-13T08:09:14.000Z | 2020-09-04T01:52:06.000Z | Pytorch_1/dice_loss.py | sunshower76/Polyp-Segmentation | 764a62dd8de134e462939aafb0c1c24d67dfb564 | [
"MIT"
] | null | null | null | Pytorch_1/dice_loss.py | sunshower76/Polyp-Segmentation | 764a62dd8de134e462939aafb0c1c24d67dfb564 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.autograd import Function
def binaryDiceLoss(pred, target, eps=1e-5):
if torch.max(pred) > 1:
pred = pred.contiguous() / 255
else:
pred = pred.contiguous()
if torch.max(target) > 1:
target = target.contiguous() / 255
else:
t... | 40.269231 | 116 | 0.56829 |
94c7aded3b5e5ac4d68a5c3bef02b9516a8ab8f0 | 989 | py | Python | tasks/kernels/container.py | faasm/experiment-lammps | 48c8802b1673b3cfc83d875e93660ef3fdd796a3 | [
"Apache-2.0"
] | null | null | null | tasks/kernels/container.py | faasm/experiment-lammps | 48c8802b1673b3cfc83d875e93660ef3fdd796a3 | [
"Apache-2.0"
] | 4 | 2020-12-07T08:06:40.000Z | 2021-04-05T08:12:10.000Z | tasks/kernels/container.py | faasm/experiment-lammps | 48c8802b1673b3cfc83d875e93660ef3fdd796a3 | [
"Apache-2.0"
] | null | null | null | from invoke import task
from os import environ
from copy import copy
from subprocess import run
from tasks.util.env import get_docker_tag, push_docker_image, PROJ_ROOT
from tasks.kernels.env import KERNELS_IMAGE_NAME, KERNELS_DOCKERFILE
@task(default=True)
def build(ctx, nocache=False, push=False):
"""
Build... | 23 | 71 | 0.661274 |
bac432f156151e86911d79959b8be5c503cb98cf | 11,748 | py | Python | test/python/topology/test1.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | null | null | null | test/python/topology/test1.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | null | null | null | test/python/topology/test1.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | null | null | null | # Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
import unittest
import sys
import test_functions
from test_utilities import standalone
from streamsx.topology.topology import *
from streamsx.topology import schema
import streamsx.topology.context
class TestTopologyMethods(unittest.TestCase):
def... | 40.095563 | 102 | 0.714164 |
288fb21245d18286e29133df0c13cc2a2ab48799 | 195 | py | Python | manage.py | silv3rmat/django-teryt-tree | 1dafe82f308dfef375f92d2156c5ebc5b5216c5f | [
"BSD-3-Clause"
] | 31 | 2016-06-01T17:42:18.000Z | 2022-02-09T20:58:01.000Z | manage.py | silv3rmat/django-teryt-tree | 1dafe82f308dfef375f92d2156c5ebc5b5216c5f | [
"BSD-3-Clause"
] | 15 | 2016-06-01T21:19:12.000Z | 2021-12-15T13:48:33.000Z | manage.py | silv3rmat/django-teryt-tree | 1dafe82f308dfef375f92d2156c5ebc5b5216c5f | [
"BSD-3-Clause"
] | 13 | 2016-08-31T08:00:33.000Z | 2021-12-15T12:08:08.000Z | #!/usr/bin/env python
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 21.666667 | 55 | 0.769231 |
8a0766721f07ddce0986a17470bce9a685b5b1c5 | 2,491 | py | Python | recipes/Python/286204_Case_Insensitive_Sort/recipe-286204.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/286204_Case_Insensitive_Sort/recipe-286204.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/286204_Case_Insensitive_Sort/recipe-286204.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | # 06-07-04
#v1.0.0
# caselesssort.py
# A sort function for lists of strings that is case insensitive.
# Copyright Michael Foord
# You are free to modify, use and relicense this code.
# No warranty express or implied for the accuracy, fitness to purpose or otherwise for this code....
# Use at your own risk !!!
# E-... | 29.305882 | 100 | 0.643517 |
12aa0f223efb47e74ece384b5d7a7dc71fe5713e | 11,812 | py | Python | tests/fpga/memory_buffering_test.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T13:36:34.000Z | 2022-03-11T13:36:34.000Z | tests/fpga/memory_buffering_test.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | null | null | null | tests/fpga/memory_buffering_test.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
"""
Tests memory buffering in an FPGA SDFG, where memory is read and written using
512-bit wide accesses, and converted (using a "gearbox") to/from the vector
width used by the computational kernel.
Unfortunately this doesn't currently work fo... | 45.961089 | 120 | 0.612936 |
361438d26816c5c48486fb57e5cc7627ef531a3a | 8,592 | py | Python | pypybox2d/joints/friction.py | the-mba/Progra-Super-Mario | 90dc2a4ba815732b6e92652c7f8bb4a345d25e91 | [
"MIT"
] | null | null | null | pypybox2d/joints/friction.py | the-mba/Progra-Super-Mario | 90dc2a4ba815732b6e92652c7f8bb4a345d25e91 | [
"MIT"
] | null | null | null | pypybox2d/joints/friction.py | the-mba/Progra-Super-Mario | 90dc2a4ba815732b6e92652c7f8bb4a345d25e91 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# C++ version Copyright (c) 2006-2011 Erin Catto http://www.box2d.org
# Python port by Ken Lauer / http://pybox2d.googlecode.com
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any ... | 36.717949 | 98 | 0.606378 |
ef0fd4c0e8de32df428c1523af251be68bdad019 | 1,280 | py | Python | acertmgr/authority/__init__.py | davidklaftenegger/acertmgr | 93e28437ffe8ccc8f96335436ca814fed3cff8de | [
"0BSD"
] | 21 | 2016-04-03T13:26:14.000Z | 2021-09-23T16:41:22.000Z | acertmgr/authority/__init__.py | davidklaftenegger/acertmgr | 93e28437ffe8ccc8f96335436ca814fed3cff8de | [
"0BSD"
] | 24 | 2016-04-10T09:37:48.000Z | 2021-11-23T19:10:49.000Z | acertmgr/authority/__init__.py | davidklaftenegger/acertmgr | 93e28437ffe8ccc8f96335436ca814fed3cff8de | [
"0BSD"
] | 12 | 2016-01-10T14:27:19.000Z | 2022-01-02T16:20:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# authority - authority api package
# Copyright (c) Rudolf Mayerhofer, 2019.
# available under the ISC license, see LICENSE
import importlib
import json
import os
from acertmgr import tools
from acertmgr.tools import log
authorities = dict()
# @brief find or create a ... | 33.684211 | 120 | 0.698438 |
5fafc838a3c49dddd42c49207637d42ef431fdb1 | 2,841 | py | Python | ml/dish_detector/video_demo.py | jphacks/TK_1810 | 0c47c2a0eaeea47067e066a43def7ed079f77d2c | [
"MIT"
] | 6 | 2018-11-05T15:30:37.000Z | 2020-10-27T09:16:03.000Z | ml/dish_detector/video_demo.py | jphacks/TK_1810 | 0c47c2a0eaeea47067e066a43def7ed079f77d2c | [
"MIT"
] | 1 | 2018-10-28T02:02:25.000Z | 2018-10-28T02:02:25.000Z | ml/dish_detector/video_demo.py | jphacks/TK_1810 | 0c47c2a0eaeea47067e066a43def7ed079f77d2c | [
"MIT"
] | 3 | 2019-10-18T10:21:54.000Z | 2021-10-30T00:54:39.000Z | import argparse
import uuid
import shutil
from pathlib import Path
import subprocess as sp
from tqdm import tqdm
import torch
import cv2
import numpy as np
from moviepy.editor import VideoFileClip
from models import Darknet
parser = argparse.ArgumentParser()
parser.add_argument("input", type=Path)
parser.add_argumen... | 27.582524 | 107 | 0.596621 |
f805ec8ba1a3c1156033b691864d1a31bc60000b | 47,245 | py | Python | venv/Lib/site-packages/pandas/io/excel/_base.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/io/excel/_base.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/io/excel/_base.py | arnoyu-hub/COMP0016miemie | 59af664dcf190eab4f93cefb8471908717415fea | [
"MIT"
] | null | null | null | from __future__ import annotations
import abc
import datetime
from io import BytesIO
import os
from textwrap import fill
from typing import (
Any,
Mapping,
cast,
)
import warnings
import zipfile
from pandas._config import config
from pandas._libs.parsers import STR_NA_VALUES
from pandas... | 35.791667 | 89 | 0.582728 |
84dd85bed8c602d640e1489ae4faffa5ae5fad3c | 5,456 | py | Python | sdk/python/pulumi_azure_native/authorization/get_role_management_policy_assignment.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/authorization/get_role_management_policy_assignment.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/authorization/get_role_management_policy_assignment.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 37.369863 | 171 | 0.671188 |
3de13e359a486c71d3ae18dcb499e4667b6831e3 | 854 | py | Python | niapy/tests/test_gsa.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | niapy/tests/test_gsa.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 1 | 2021-08-13T07:52:40.000Z | 2021-08-16T08:52:20.000Z | niapy/tests/test_gsa.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | 2 | 2021-08-08T08:29:53.000Z | 2021-08-12T15:31:55.000Z | # encoding=utf8
from niapy.algorithms.basic import GravitationalSearchAlgorithm
from niapy.tests.test_algorithm import AlgorithmTestCase, MyProblem
class GSATestCase(AlgorithmTestCase):
def setUp(self):
AlgorithmTestCase.setUp(self)
self.algo = GravitationalSearchAlgorithm
def test_Custom(sel... | 38.818182 | 88 | 0.757611 |
cb24d43183465c85f011879c4f9d0ef235091087 | 10,784 | py | Python | Project/view/app.py | Bogo56/AdCapture_bot | 7e452561cf564bd702f5fb7ee034a4eea05b0075 | [
"RSA-MD"
] | null | null | null | Project/view/app.py | Bogo56/AdCapture_bot | 7e452561cf564bd702f5fb7ee034a4eea05b0075 | [
"RSA-MD"
] | null | null | null | Project/view/app.py | Bogo56/AdCapture_bot | 7e452561cf564bd702f5fb7ee034a4eea05b0075 | [
"RSA-MD"
] | null | null | null | import time
import os, sys
from kivy.resources import resource_add_path, resource_find
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.screenmanager import ScreenManager,Screen
from kivy.lang import Builder
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from Proje... | 32.481928 | 106 | 0.563891 |
6a15b62f0d863535d6708b167aa04b047a174da5 | 229 | py | Python | xylophone/pgw/ConfigurationService.py | Turysaz/pyframework | da44b8127aa6b89d6cdb3bdb564c386520b37e22 | [
"MIT"
] | null | null | null | xylophone/pgw/ConfigurationService.py | Turysaz/pyframework | da44b8127aa6b89d6cdb3bdb564c386520b37e22 | [
"MIT"
] | 6 | 2018-04-09T20:57:14.000Z | 2018-04-09T21:18:12.000Z | xylophone/pgw/ConfigurationService.py | Turysaz/xylophone | da44b8127aa6b89d6cdb3bdb564c386520b37e22 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 Turysaz <turysaz@posteo.org>
from configparser import ConfigParser
def create_configuration_parser():
configuration = ConfigParser()
configuration.read("configuration.txt")
return configuration
| 25.444444 | 49 | 0.777293 |
3c69a3d679dabcf31e945181e234ac233d30f225 | 18,197 | py | Python | saleor/order/models.py | TheSwordBreaker/saleor | 9805909f9fcbda8be99d7836ef87262a07357501 | [
"CC-BY-4.0"
] | null | null | null | saleor/order/models.py | TheSwordBreaker/saleor | 9805909f9fcbda8be99d7836ef87262a07357501 | [
"CC-BY-4.0"
] | null | null | null | saleor/order/models.py | TheSwordBreaker/saleor | 9805909f9fcbda8be99d7836ef87262a07357501 | [
"CC-BY-4.0"
] | null | null | null | from decimal import Decimal
from operator import attrgetter
from re import match
from typing import Optional
from uuid import uuid4
from django.conf import settings
from django.core.validators import MinValueValidator
from django.db import models
from django.db.models import JSONField # type: ignore
from django.db.mo... | 33.82342 | 88 | 0.678903 |
e5c669c7e56dd7feb04561c5ab7bb8dd365e40e0 | 2,287 | py | Python | node/test_mc.py | mediachainlabs/cccoin | 95a7817e02011344508ce0af6d291dff788d23b1 | [
"MIT"
] | 37 | 2017-03-09T19:29:57.000Z | 2021-05-07T12:41:56.000Z | node/test_mc.py | mediachainlabs/cccoin | 95a7817e02011344508ce0af6d291dff788d23b1 | [
"MIT"
] | 8 | 2017-03-08T21:24:07.000Z | 2017-03-09T21:03:04.000Z | node/test_mc.py | mediachainlabs/cccoin | 95a7817e02011344508ce0af6d291dff788d23b1 | [
"MIT"
] | 16 | 2017-03-09T19:44:35.000Z | 2022-01-23T09:09:20.000Z | import pytest
from subprocess import Popen
from signal import SIGTERM
from node_mc import MediachainQueue, MediachainClient
from node_core import client_post
import bitcoin as btc
from time import sleep
import shutil
from utils import find_open_port
from tornado.ioloop import IOLoop
# test that CCCoinCore writes to me... | 34.651515 | 120 | 0.686926 |
b3320b81a0876a033cd7c9cc733e7e44eb1b04ef | 6,925 | py | Python | packages/augur-core/tests/mock_templates/__init__.py | jalextowle/augur | 821653823438fd9d20eced2221c8f99f21606a02 | [
"MIT"
] | 885 | 2015-01-11T20:51:30.000Z | 2022-03-25T00:29:59.000Z | packages/augur-core/tests/mock_templates/__init__.py | jalextowle/augur | 821653823438fd9d20eced2221c8f99f21606a02 | [
"MIT"
] | 7,347 | 2015-01-17T01:05:24.000Z | 2021-11-02T17:28:19.000Z | packages/augur-core/tests/mock_templates/__init__.py | jalextowle/augur | 821653823438fd9d20eced2221c8f99f21606a02 | [
"MIT"
] | 283 | 2015-01-30T02:16:53.000Z | 2022-03-24T19:23:08.000Z | from os import path
from textwrap import dedent
from solc import compile_standard
from specifics import add_all
# TODO resolve relative source paths from the sources directory, not this directory
# used to resolve relative paths
BASE_PATH = path.dirname(path.abspath(__file__))
def resolve_relative_path(relativeFile... | 36.835106 | 132 | 0.560144 |
6a14b0cf7ac498415af478a3d63bf7ce60033078 | 633 | py | Python | sector/migrations/0002_industrieslandingpage_hero_image.py | uktrade/invest | 15b84c511839b46e81608fca9762d2df3f6df16c | [
"MIT"
] | 1 | 2019-01-18T03:50:46.000Z | 2019-01-18T03:50:46.000Z | sector/migrations/0002_industrieslandingpage_hero_image.py | uktrade/invest | 15b84c511839b46e81608fca9762d2df3f6df16c | [
"MIT"
] | 50 | 2018-01-24T18:04:08.000Z | 2019-01-03T03:30:30.000Z | sector/migrations/0002_industrieslandingpage_hero_image.py | uktrade/invest | 15b84c511839b46e81608fca9762d2df3f6df16c | [
"MIT"
] | 2 | 2018-02-12T15:20:52.000Z | 2019-01-18T03:51:52.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-02-05 20:00
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wagtailimages', '0019_delete_filter'),
('sector', '... | 27.521739 | 149 | 0.655608 |
f1fc7ef0a67564fd7cea2708c801c2eec0309cea | 7,479 | py | Python | official/projects/volumetric_models/modeling/heads/segmentation_heads_3d.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | 1 | 2020-09-14T10:46:07.000Z | 2020-09-14T10:46:07.000Z | official/projects/volumetric_models/modeling/heads/segmentation_heads_3d.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 8 | 2020-05-19T00:52:30.000Z | 2020-06-04T23:57:20.000Z | official/projects/volumetric_models/modeling/heads/segmentation_heads_3d.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 2 | 2021-10-07T04:47:04.000Z | 2021-12-18T04:18:19.000Z | # Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.209677 | 101 | 0.667068 |
71f89c57b26393cedeca4f1fedab499a328747ac | 2,998 | py | Python | openGaussBase/testcase/GUC/FILELOCATION/Opengauss_Function_Guc_FileLocation_Case0062.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/GUC/FILELOCATION/Opengauss_Function_Guc_FileLocation_Case0062.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/GUC/FILELOCATION/Opengauss_Function_Guc_FileLocation_Case0062.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 35.690476 | 84 | 0.640093 |
6beee3608fcab1b76b6d81312daba15bf32dac19 | 1,310 | py | Python | naiveBayes.py | sayannath/Naive-Bayes-Theorem | e0bde1237ff7c3fb65ba15d7aa357493757f520b | [
"Apache-2.0"
] | 2 | 2019-07-20T20:02:25.000Z | 2021-03-24T15:46:36.000Z | naiveBayes.py | sayannath/Naive-Bayes-Theorem | e0bde1237ff7c3fb65ba15d7aa357493757f520b | [
"Apache-2.0"
] | null | null | null | naiveBayes.py | sayannath/Naive-Bayes-Theorem | e0bde1237ff7c3fb65ba15d7aa357493757f520b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os
# In[2]:
print(os.listdir())
# In[3]:
# importing the libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#to get graphs inline
get_ipython().run_line_magic('matplotlib', 'inline')
# In[4]:
dataSet = pd.read_csv('Socia... | 9.160839 | 74 | 0.679389 |
ad34a4a5cb58171446c5e3efd06c8ded67db6c33 | 467 | py | Python | .base_lessons/File input output/Read file/read_file.py | dannymeijer/level-up-with-python | 1bd1169aafd0fdc124984c30edc7f0153626cf06 | [
"MIT"
] | null | null | null | .base_lessons/File input output/Read file/read_file.py | dannymeijer/level-up-with-python | 1bd1169aafd0fdc124984c30edc7f0153626cf06 | [
"MIT"
] | null | null | null | .base_lessons/File input output/Read file/read_file.py | dannymeijer/level-up-with-python | 1bd1169aafd0fdc124984c30edc7f0153626cf06 | [
"MIT"
] | null | null | null |
f = open("input.txt", "r") # here we open file "input.txt". Second argument used to identify that we want to read file
# Note: if you want to write to the file use "w" as second argument
for line in f.readlines(): # read lines
print each line
f.close() # It's im... | 31.133333 | 120 | 0.625268 |
79afdf09d0219e44d4b64bf794b7f9ab5c9424d0 | 14,366 | py | Python | _unittests/ut_mlmodel/test_extended_features.py | sdpython/mlinsights | bae59cda775a69bcce83b16b88df2f34a092cb60 | [
"MIT"
] | 48 | 2017-11-19T14:59:41.000Z | 2022-03-03T15:50:24.000Z | _unittests/ut_mlmodel/test_extended_features.py | sdpython/mlinsights | bae59cda775a69bcce83b16b88df2f34a092cb60 | [
"MIT"
] | 87 | 2017-11-20T00:10:32.000Z | 2021-11-20T01:48:09.000Z | _unittests/ut_mlmodel/test_extended_features.py | sdpython/mlinsights | bae59cda775a69bcce83b16b88df2f34a092cb60 | [
"MIT"
] | 12 | 2019-05-09T07:45:52.000Z | 2021-06-28T06:55:53.000Z | # -*- coding: utf-8 -*-
"""
@brief test log(time=2s)
"""
import unittest
import numpy
from scipy import sparse
from scipy.sparse import random as sparse_random
from sklearn.preprocessing import PolynomialFeatures
from pyquickhelper.pycode import ExtTestCase
from mlinsights.mlmodel import ExtendedFeatures
class T... | 38.309333 | 88 | 0.501601 |
800d469deab6be0fb7c1a642d52f9a8f39dc9753 | 11,629 | py | Python | google/cloud/sql/v1/sql-v1-py/google/cloud/sql_v1/services/sql_tiers_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/sql/v1/sql-v1-py/google/cloud/sql_v1/services/sql_tiers_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/sql/v1/sql-v1-py/google/cloud/sql_v1/services/sql_tiers_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 45.073643 | 87 | 0.625247 |
b63231845bbd8971cac19663d6a67a48b82f4060 | 1,512 | py | Python | scripts/tests/test_migrate_dates.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | null | null | null | scripts/tests/test_migrate_dates.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | scripts/tests/test_migrate_dates.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from nose.tools import * # noqa
from scripts.osfstorage.utils import ensure_osf_files
from website import settings
ensure_osf_files(settings)
# Hack: Must configure add-ons before importing `OsfTestCase`
from website.addons.osfstorage.tests.factories import FileVersionFactory
... | 36.878049 | 100 | 0.738095 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.