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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
214552439b514bcb059191ae502d74aea204a219 | 3,573 | py | Python | rackattack/physical/tests/test_dynamic_config.py | shlomimatichin/rackattack-physical | 2f49aff76bad3a8887bc18b81f6bc6e436569809 | [
"Apache-2.0"
] | null | null | null | rackattack/physical/tests/test_dynamic_config.py | shlomimatichin/rackattack-physical | 2f49aff76bad3a8887bc18b81f6bc6e436569809 | [
"Apache-2.0"
] | null | null | null | rackattack/physical/tests/test_dynamic_config.py | shlomimatichin/rackattack-physical | 2f49aff76bad3a8887bc18b81f6bc6e436569809 | [
"Apache-2.0"
] | null | null | null | import unittest
import mock
from mock import patch
from rackattack.physical import ipmi
import subprocess
from rackattack.physical import dynamicconfig
from rackattack.common import hosts
from rackattack.common import dnsmasq
from rackattack.common import globallock
from rackattack.common import tftpboot
from rackattac... | 45.227848 | 107 | 0.662748 |
5c1e1ce24e5625a87348cfae065b4d2123eee4c5 | 15,427 | py | Python | packnet_sfm/datasets/augmentations.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | 1 | 2022-02-22T06:19:02.000Z | 2022-02-22T06:19:02.000Z | packnet_sfm/datasets/augmentations.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | null | null | null | packnet_sfm/datasets/augmentations.py | pection/packnet-sfm | d5673567b649e6bfda292c894cacdeb06aa80913 | [
"MIT"
] | null | null | null | # Copyright 2020 Toyota Research Institute. All rights reserved.
import cv2
import numpy as np
import random
import torchvision.transforms as transforms
from PIL import Image
from packnet_sfm.utils.misc import filter_dict
from packnet_sfm.utils.types import is_seq
###################################################... | 26.782986 | 120 | 0.572503 |
a3e84941881bb2c529dbdcfd411428b587fe2650 | 6,537 | py | Python | sdk/python/pulumi_azure_native/eventhub/v20140901/get_event_hub.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/eventhub/v20140901/get_event_hub.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/eventhub/v20140901/get_event_hub.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"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
from ... import _utilities, _tables
__a... | 35.145161 | 194 | 0.645097 |
fab8a624e65d48683de4134bd10746affb3444fa | 934 | py | Python | kubernetes_asyncio/test/test_v1_lifecycle.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_v1_lifecycle.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_v1_lifecycle.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import kube... | 23.35 | 124 | 0.716274 |
9dcd13ff2f936a2ddb36e70dcae5607e67b0e356 | 10,250 | py | Python | tests/gateway_tests.py | django-oscar/django-oscar-datacash | 0e153b45db0f7e40d9f84dc12c40d526ab3e47f1 | [
"BSD-3-Clause"
] | 12 | 2015-03-18T15:51:04.000Z | 2021-01-06T14:03:51.000Z | tests/gateway_tests.py | django-oscar/django-oscar-datacash | 0e153b45db0f7e40d9f84dc12c40d526ab3e47f1 | [
"BSD-3-Clause"
] | 1 | 2018-05-29T20:00:38.000Z | 2018-05-30T02:44:49.000Z | tests/gateway_tests.py | django-oscar/django-oscar-datacash | 0e153b45db0f7e40d9f84dc12c40d526ab3e47f1 | [
"BSD-3-Clause"
] | 13 | 2015-08-12T20:11:40.000Z | 2021-09-25T19:53:59.000Z | from decimal import Decimal as D
from mock import Mock
from django.test import TestCase
from datacash.gateway import Gateway, Response
from . import XmlTestingMixin, fixtures
class TestGatewayWithCV2AVSMock(TestCase, XmlTestingMixin):
"""
Gateway using CV2AVS
"""
def setUp(self):
self.gate... | 40.196078 | 122 | 0.673366 |
490efcd192ab7485de2c431fa90f1ac6b591c439 | 8,769 | py | Python | VirtualGym_WebProject/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/clients/mobile_application.py | LuBrian/VirtualGym | 9fe184214be4c23ed5842298e3c400fbe8de9f6d | [
"MIT"
] | 5 | 2017-09-25T15:01:18.000Z | 2022-01-17T10:15:21.000Z | oauthlib/oauth2/rfc6749/clients/mobile_application.py | dmytton/oauthlib | 36adf29586b16236a29c32b56a98f59da7cab7e6 | [
"BSD-3-Clause"
] | 10 | 2020-01-28T22:12:06.000Z | 2022-03-11T23:16:53.000Z | oauthlib/oauth2/rfc6749/clients/mobile_application.py | dmytton/oauthlib | 36adf29586b16236a29c32b56a98f59da7cab7e6 | [
"BSD-3-Clause"
] | 5 | 2017-11-09T22:13:04.000Z | 2017-12-04T23:06:17.000Z | # -*- coding: utf-8 -*-
"""
oauthlib.oauth2.rfc6749
~~~~~~~~~~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for consuming and providing OAuth 2.0 RFC6749.
"""
from __future__ import absolute_import, unicode_literals
from ..parameters import parse_implicit_response, prepare_grant_uri
from .bas... | 50.687861 | 137 | 0.659368 |
bea208c5f9ce580a1660d806818c16ae63134cae | 460 | py | Python | ABC_C/ABC183_C.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_C/ABC183_C.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_C/ABC183_C.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | import itertools
N, K = map(int, input().split())
routes = [i for i in range(1, N)]
T = []
for i in range(N):
t = list(map(int, input().split()))
T.append(t)
# 1都市目~1都市目までの間の全てのルートの組み合わせを作る
all_route = list(itertools.permutations(routes))
# 全ルートを試す
ans = 0
for rotes in all_route:
time = 0
s = 0
... | 17.037037 | 48 | 0.56087 |
e453a49d972ffd39f8951057041c411d501b6af3 | 502 | py | Python | scratch/old/vis_server_gevent_deprecated/sse.py | mcx/ml_logger | 697b376d176b3b5e84272a4173e0f3b84fffbfa0 | [
"BSD-3-Clause"
] | 107 | 2018-05-26T22:51:48.000Z | 2020-04-27T09:46:36.000Z | scratch/old/vis_server_gevent_deprecated/sse.py | mcx/ml_logger | 697b376d176b3b5e84272a4173e0f3b84fffbfa0 | [
"BSD-3-Clause"
] | 29 | 2020-09-04T16:08:04.000Z | 2022-01-25T20:21:13.000Z | scratch/old/vis_server_gevent_deprecated/sse.py | mcx/ml_logger | 697b376d176b3b5e84272a4173e0f3b84fffbfa0 | [
"BSD-3-Clause"
] | 14 | 2018-06-30T18:50:48.000Z | 2019-12-10T01:08:44.000Z | # SSE "protocol" is described here: http://mzl.la/UPFyxY
class ServerSentEvent(object):
def __init__(self, data):
self.data = data
self.event = None
self.id = None
self.desc_map = {
self.data: "data",
self.event: "event",
self.id: "id"
}
... | 26.421053 | 68 | 0.503984 |
bea8ce0cccef7d7dd9fa3e32c139009ee2ac7c3f | 3,141 | py | Python | openfl-workspace/fe_torch_adversarial_cifar/src/fecifar_inmemory.py | brandon-edwards/openfl | 9e0521252253eab09571dc2be40f46bfeaf9746a | [
"Apache-2.0"
] | 297 | 2021-01-13T08:49:35.000Z | 2022-03-31T15:06:43.000Z | openfl-workspace/fe_torch_adversarial_cifar/src/fecifar_inmemory.py | brandon-edwards/openfl | 9e0521252253eab09571dc2be40f46bfeaf9746a | [
"Apache-2.0"
] | 265 | 2021-02-02T09:57:33.000Z | 2022-03-30T22:51:55.000Z | openfl-workspace/fe_torch_adversarial_cifar/src/fecifar_inmemory.py | brandon-edwards/openfl | 9e0521252253eab09571dc2be40f46bfeaf9746a | [
"Apache-2.0"
] | 81 | 2021-01-18T07:52:36.000Z | 2022-03-26T18:55:54.000Z | # Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""You may copy this file as the starting point of your own model."""
import fastestimator as fe
from fastestimator.dataset.data import cifar10
from fastestimator.op.numpyop.univariate import ChannelTranspose
from fastestimator.op.numpy... | 33.774194 | 85 | 0.603311 |
6cc0533c2632698f8ac6660e8c784560756a4770 | 1,042 | py | Python | using-python-to-access-web-data/Week4-Assignment12-2.py | MauMendes/python-for-everybody | 5dad649bec88c09c087f13fa3f4da8026bb8ab8d | [
"MIT"
] | null | null | null | using-python-to-access-web-data/Week4-Assignment12-2.py | MauMendes/python-for-everybody | 5dad649bec88c09c087f13fa3f4da8026bb8ab8d | [
"MIT"
] | null | null | null | using-python-to-access-web-data/Week4-Assignment12-2.py | MauMendes/python-for-everybody | 5dad649bec88c09c087f13fa3f4da8026bb8ab8d | [
"MIT"
] | null | null | null | # To run this, download the BeautifulSoup zip file
# http://www.py4e.com/code3/bs4.zip
# and unzip it in the same directory as this file
import urllib.request, urllib.parse, urllib.error
from bs4 import BeautifulSoup
import ssl
def GetNextUrl( url, pos):
if pos<1:
return ""
html = urllib.request.urlo... | 24.809524 | 65 | 0.669866 |
1b2252da3d07ec3fb2d16db00313a37e3b45f1be | 75 | py | Python | plugins/audioengine/alsa-ae/__init__.py | narfman0/jeeves | a88035846d6ec95c9ff8559d12b3b5ef4bb1c2d6 | [
"MIT"
] | 194 | 2018-07-28T14:54:35.000Z | 2022-03-18T12:40:10.000Z | plugins/audioengine/alsa-ae/__init__.py | narfman0/jeeves | a88035846d6ec95c9ff8559d12b3b5ef4bb1c2d6 | [
"MIT"
] | 239 | 2018-07-13T16:15:25.000Z | 2022-03-31T17:55:01.000Z | plugins/audioengine/alsa-ae/__init__.py | narfman0/jeeves | a88035846d6ec95c9ff8559d12b3b5ef4bb1c2d6 | [
"MIT"
] | 64 | 2018-07-26T02:18:33.000Z | 2022-01-07T06:53:01.000Z | # -*- coding: utf-8 -*-
from .alsaaudioengine import AlsaAudioEnginePlugin
| 25 | 50 | 0.746667 |
b18b9dfebd9160804d6c21c841e8211e9b918bd8 | 12,404 | py | Python | docs/conf.py | LaudateCorpus1/python-functions | e62d1c84db5c001843aa8396ee8bfd3e262dca5f | [
"Apache-2.0"
] | 25 | 2020-07-21T12:02:21.000Z | 2022-03-30T02:36:13.000Z | docs/conf.py | LaudateCorpus1/python-functions | e62d1c84db5c001843aa8396ee8bfd3e262dca5f | [
"Apache-2.0"
] | 50 | 2020-07-21T02:42:04.000Z | 2022-03-17T18:33:53.000Z | docs/conf.py | LaudateCorpus1/python-functions | e62d1c84db5c001843aa8396ee8bfd3e262dca5f | [
"Apache-2.0"
] | 8 | 2020-07-20T18:10:13.000Z | 2022-01-29T08:11:06.000Z | # -*- coding: utf-8 -*-
# Copyright 2021 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 agr... | 32.471204 | 88 | 0.705095 |
3cc89163876519b49218d84161f6ec09fad5599e | 631 | py | Python | App/users/models/profiles.py | fmgar/BlackMarker-API | a185d61d518ad505d2fd8882f0e8cd15474786cb | [
"MIT"
] | null | null | null | App/users/models/profiles.py | fmgar/BlackMarker-API | a185d61d518ad505d2fd8882f0e8cd15474786cb | [
"MIT"
] | null | null | null | App/users/models/profiles.py | fmgar/BlackMarker-API | a185d61d518ad505d2fd8882f0e8cd15474786cb | [
"MIT"
] | null | null | null | """Profile model. """
# Django
from django.db import models
# Utilities
from App.utils.models import BlackMarketModel
class Profile(BlackMarketModel):
"""A profile holds a user's public like biography, picture,
and statistics. """
user = models.OneToOneField('users.User', on_delete=models.CASCADE)
... | 22.535714 | 71 | 0.657686 |
eac8c3998a91f9b5c701f7b3964598df6944ffc7 | 16,279 | py | Python | test_natsort/test_natsort.py | agustinhenze/natsort.debian | 1635506f1468a64a369ab76760fed7a11a304120 | [
"MIT"
] | null | null | null | test_natsort/test_natsort.py | agustinhenze/natsort.debian | 1635506f1468a64a369ab76760fed7a11a304120 | [
"MIT"
] | null | null | null | test_natsort/test_natsort.py | agustinhenze/natsort.debian | 1635506f1468a64a369ab76760fed7a11a304120 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""\
Here are a collection of examples of how this module can be used.
See the README or the natsort homepage for more details.
"""
from __future__ import unicode_literals, print_function
import pytest
import sys
import warnings
import locale
from operator import itemgetter
from pytest import ra... | 40.6975 | 134 | 0.65219 |
b9a05180122b3b4cd87cbae4d52142dbde073bfa | 4,559 | py | Python | OVR_Metrics_Plot.py | colinhallett/OVR_Metrics_Plot | d30ed2f9870431b6308351a9a3d3200b8f6e86cf | [
"MIT"
] | null | null | null | OVR_Metrics_Plot.py | colinhallett/OVR_Metrics_Plot | d30ed2f9870431b6308351a9a3d3200b8f6e86cf | [
"MIT"
] | null | null | null | OVR_Metrics_Plot.py | colinhallett/OVR_Metrics_Plot | d30ed2f9870431b6308351a9a3d3200b8f6e86cf | [
"MIT"
] | null | null | null | import PySimpleGUI as sg
import matplotlib.pyplot as plt
import analyser as ana
import colors
from analyser import MetricData
metrics: list[MetricData] = []
selected_metrics_y: list[str] = []
selected_metrics_x: list[str] = []
interpolation_amount: int = -1
def import_csvs(csvs: str):
if csvs is None or len(csvs... | 41.825688 | 171 | 0.678438 |
e211fbb0ce041c6a230d394638af2f6e3bb7de35 | 1,625 | py | Python | python/Guess_Game.py | ranodeepbanerjee/HacktoberFest2020-1 | cb1552de4e7a4d2687bfb331490134dfbb759ee1 | [
"MIT"
] | 51 | 2020-09-27T15:28:05.000Z | 2021-09-29T02:07:25.000Z | python/Guess_Game.py | ranodeepbanerjee/HacktoberFest2020-1 | cb1552de4e7a4d2687bfb331490134dfbb759ee1 | [
"MIT"
] | 152 | 2020-09-27T12:12:12.000Z | 2021-10-03T18:22:15.000Z | python/Guess_Game.py | ranodeepbanerjee/HacktoberFest2020-1 | cb1552de4e7a4d2687bfb331490134dfbb759ee1 | [
"MIT"
] | 453 | 2020-09-27T12:34:35.000Z | 2021-10-16T08:33:33.000Z | # Imports.
import random
# Welcome message.
print("Welcome to the guessing game!")
# Get player's name.
name = input("What is your name?: ")
# Set minimum and maximum to None to allow us to perform a for loop.
minimum = None
maximum = None
# Ask the user to enter a minimum and a maximum number.
## One would think t... | 33.163265 | 111 | 0.680615 |
74174f1a50ec2ee77b5a6e5324176a4dd186b354 | 541 | py | Python | day_23/player.py | MatheusNascimentoS/100_days_of_code_python | 5e5fe6b010fb09ac61b6bbc6634c2c0662d2560b | [
"MIT"
] | null | null | null | day_23/player.py | MatheusNascimentoS/100_days_of_code_python | 5e5fe6b010fb09ac61b6bbc6634c2c0662d2560b | [
"MIT"
] | null | null | null | day_23/player.py | MatheusNascimentoS/100_days_of_code_python | 5e5fe6b010fb09ac61b6bbc6634c2c0662d2560b | [
"MIT"
] | null | null | null | from turtle import Turtle, goto
STARTING_POSITION = (0, -280)
MOVE_DISTANCE = 10
FINISH_LINE_Y = 280
class Player(Turtle):
def __init__(self):
super().__init__()
self.shape("turtle")
self.penup()
self.go_to_start()
self.setheading(90)
def go_up(self):
self.for... | 20.807692 | 39 | 0.608133 |
12794efb2da9058cd7bdfbd12ce6617453d9afa5 | 2,608 | py | Python | configs/litehrnet/ocr_litehr18_512x512_40k_kvasir-seg_amsoftmax.py | openvinotoolkit/mmsegmentation | 9f50fc158be50594ea4aecf0a07ea652c91ec846 | [
"Apache-2.0"
] | 3 | 2021-12-21T07:25:13.000Z | 2022-02-07T01:59:19.000Z | configs/litehrnet/ocr_litehr18_512x512_40k_kvasir-seg_amsoftmax.py | openvinotoolkit/mmsegmentation | 9f50fc158be50594ea4aecf0a07ea652c91ec846 | [
"Apache-2.0"
] | 13 | 2021-12-10T15:08:56.000Z | 2022-03-23T08:58:03.000Z | configs/litehrnet/ocr_litehr18_512x512_40k_kvasir-seg_amsoftmax.py | evgeny-izutov/mmsegmentation | 9f50fc158be50594ea4aecf0a07ea652c91ec846 | [
"Apache-2.0"
] | 3 | 2021-11-11T23:16:51.000Z | 2021-12-08T23:49:29.000Z | _base_ = [
'../_base_/models/fcn_litehr18.py', '../_base_/datasets/kvasir.py',
'../_base_/default_runtime.py', '../_base_/schedules/schedule_step_40k_ml.py'
]
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='CascadeEncoderDecoder',
num_stages=2,
decode_head=[
dict(type... | 32.6 | 85 | 0.444018 |
3ea2d6b888bae04b3c22b5cbf85bfa500ea41fa0 | 270 | py | Python | tests/artificial/transf_Anscombe/trend_Lag1Trend/cycle_12/ar_/test_artificial_1024_Anscombe_Lag1Trend_12__20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_Anscombe/trend_Lag1Trend/cycle_12/ar_/test_artificial_1024_Anscombe_Lag1Trend_12__20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_Anscombe/trend_Lag1Trend/cycle_12/ar_/test_artificial_1024_Anscombe_Lag1Trend_12__20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 12, transform = "Anscombe", sigma = 0.0, exog_count = 20, ar_order = 0); | 38.571429 | 165 | 0.733333 |
b71354adf3af53585113b3d613ecc2344ce135ab | 1,933 | py | Python | fansnime_backend/urls.py | nathanramli/film-backend | 5ae2f3c90cda94e71ed147d8ef1624ac9997f82d | [
"MIT"
] | null | null | null | fansnime_backend/urls.py | nathanramli/film-backend | 5ae2f3c90cda94e71ed147d8ef1624ac9997f82d | [
"MIT"
] | 7 | 2021-03-30T13:54:03.000Z | 2022-03-12T00:36:06.000Z | fansnime_backend/urls.py | nathanramli/film-backend | 5ae2f3c90cda94e71ed147d8ef1624ac9997f82d | [
"MIT"
] | null | null | null | """fansnime_backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Cl... | 35.796296 | 77 | 0.687532 |
a07fee294cc546773a611f5385ab455211ab674a | 1,556 | py | Python | transcribe/scribe_modules/nvidia_smi.py | keshavm02/scribe | 0e3790250c7d7c8f2b999bcbfa1fc39d2f32fd87 | [
"Apache-2.0"
] | null | null | null | transcribe/scribe_modules/nvidia_smi.py | keshavm02/scribe | 0e3790250c7d7c8f2b999bcbfa1fc39d2f32fd87 | [
"Apache-2.0"
] | null | null | null | transcribe/scribe_modules/nvidia_smi.py | keshavm02/scribe | 0e3790250c7d7c8f2b999bcbfa1fc39d2f32fd87 | [
"Apache-2.0"
] | null | null | null | from . import ScribeModuleBaseClass
import sys
#from .lib.util import json
from . lib.util import validate_length
import json
import xmltodict
import re
class Nvidia_smi(ScribeModuleBaseClass):
def __init__(self, input_dict=None, module_name=None, host_name=None,
input_type=None, scribe_uuid=... | 33.106383 | 106 | 0.549486 |
f0ebf51a1bf9b5ed1b193acf600fa13c6de3dbad | 8,574 | py | Python | yolo.py | supersoaker/keras-yolo3 | 0d5e15a276221afe05143183baa4ca90d43b2972 | [
"MIT"
] | null | null | null | yolo.py | supersoaker/keras-yolo3 | 0d5e15a276221afe05143183baa4ca90d43b2972 | [
"MIT"
] | null | null | null | yolo.py | supersoaker/keras-yolo3 | 0d5e15a276221afe05143183baa4ca90d43b2972 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Class definition of YOLO_v3 style detection model on image and video
"""
import colorsys
import os
from timeit import default_timer as timer
import numpy as np
from keras import backend as K
from keras.models import load_model
from keras.layers import Input
from PIL import Image, ImageFont... | 40.253521 | 136 | 0.601703 |
9edf0456bfba322c0efff4c425b4c6813e24ef7f | 1,477 | py | Python | solutions/problem_011.py | ksvr444/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 1,921 | 2018-11-13T18:19:56.000Z | 2021-11-15T14:25:41.000Z | solutions/problem_011.py | MohitIndian/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 2 | 2019-07-19T01:06:16.000Z | 2019-08-01T22:21:36.000Z | solutions/problem_011.py | MohitIndian/daily-coding-problem | 5d9f488f81c616847ee4e9e48974523ec2d598d7 | [
"MIT"
] | 1,066 | 2018-11-19T19:06:55.000Z | 2021-11-13T12:33:56.000Z | def add_to_trie(s, trie):
if not s:
return trie
character = s[0]
if character not in trie:
trie[character] = dict()
trie[character] = add_to_trie(s[1:], trie[character])
return trie
def get_dictionary_trie(dictionary):
trie = dict()
for word in dictionary:
tri... | 29.54 | 86 | 0.659445 |
8137e516d305de4ff5fd40321e981acef18d9ddc | 16,649 | py | Python | stacd.py | glimchb/nvme-stas | 6f0345aa15ee35ebc8c510c1a1f81272fa6ced5b | [
"Apache-2.0"
] | null | null | null | stacd.py | glimchb/nvme-stas | 6f0345aa15ee35ebc8c510c1a1f81272fa6ced5b | [
"Apache-2.0"
] | null | null | null | stacd.py | glimchb/nvme-stas | 6f0345aa15ee35ebc8c510c1a1f81272fa6ced5b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# Copyright (c) 2021, Dell Inc. or its subsidiaries. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See the LICENSE file for details.
#
# This file is part of NVMe STorage Appliance Services (nvme-stas).
#
# Authors: Martin Belanger <Martin.Belanger@dell.com>
#
''' STorage Appliance Co... | 39.640476 | 143 | 0.640219 |
2f0695625925f109f8aa0c4e9eccb03eb6d97823 | 1,043 | py | Python | src/master/blueprints/errors.py | mehsoy/jaws | b79723c1fc549741494ebf5d948e94a44e971f2a | [
"MIT"
] | 1 | 2019-06-17T17:01:17.000Z | 2019-06-17T17:01:17.000Z | src/master/blueprints/errors.py | mehsoy/jaws | b79723c1fc549741494ebf5d948e94a44e971f2a | [
"MIT"
] | 7 | 2021-02-08T20:46:15.000Z | 2021-09-08T02:12:59.000Z | src/master/blueprints/errors.py | mehsoy/jaws | b79723c1fc549741494ebf5d948e94a44e971f2a | [
"MIT"
] | null | null | null | from flask import Blueprint, jsonify, make_response
from voluptuous import Invalid
from exceptions.permission_exception import PermissionException
from exceptions.no_response_from_worker_exception import NoResponseFromWorkerException
#from exceptions.worker_busy_exception import WorkerBusyException
#from exceptions.w... | 29.8 | 87 | 0.798658 |
c99924174dd6bf900e66faa7121f4759dd677195 | 1,434 | py | Python | qualle/quality_estimation.py | annakasprzik/qualle | 871f7fbce3d6d3da07fe7197cf21a5a68720645d | [
"Apache-2.0"
] | null | null | null | qualle/quality_estimation.py | annakasprzik/qualle | 871f7fbce3d6d3da07fe7197cf21a5a68720645d | [
"Apache-2.0"
] | null | null | null | qualle/quality_estimation.py | annakasprzik/qualle | 871f7fbce3d6d3da07fe7197cf21a5a68720645d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 ZBW – Leibniz Information Centre for Economics
#
# 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 b... | 32.590909 | 76 | 0.694561 |
88c9ece7e1b9a243566a95837da7cc29af5291b8 | 660 | py | Python | homepage/portfolio/migrations/0053_auto_20200706_1310.py | FabianVolkers/portfolio | b5008818b6ca7b2b10c587e2beab4265157bc694 | [
"MIT"
] | null | null | null | homepage/portfolio/migrations/0053_auto_20200706_1310.py | FabianVolkers/portfolio | b5008818b6ca7b2b10c587e2beab4265157bc694 | [
"MIT"
] | 7 | 2021-03-30T13:55:39.000Z | 2022-01-13T03:01:58.000Z | homepage/portfolio/migrations/0053_auto_20200706_1310.py | FabianVolkers/homepage | b5008818b6ca7b2b10c587e2beab4265157bc694 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-07-06 13:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0052_auto_20200706_1235'),
]
operations = [
migrations.AlterUniqueTogether(
name='baseentry',
unique_together={... | 25.384615 | 61 | 0.590909 |
43de7fccebc2653d84098ac646533694c830af39 | 3,209 | py | Python | tutorials/simple_data_mining/kmeans.py | tilde-lab/tilde | a959526885e827115e4000f1b9789869cf51cb19 | [
"MIT"
] | 22 | 2015-07-15T09:55:11.000Z | 2021-06-13T14:48:41.000Z | tutorials/simple_data_mining/kmeans.py | blokhin/tilde | a959526885e827115e4000f1b9789869cf51cb19 | [
"MIT"
] | 87 | 2015-11-01T20:51:26.000Z | 2022-01-02T18:54:18.000Z | tutorials/simple_data_mining/kmeans.py | tilde-lab/tilde | a959526885e827115e4000f1b9789869cf51cb19 | [
"MIT"
] | 4 | 2015-09-13T16:30:18.000Z | 2020-07-17T15:55:53.000Z | # Pure-Python multidimensional k-means
# results similar to sklearn.cluster
import math
import random
class Point(object):
def __init__(self, coords, reference=None):
self.coords = coords
self.n = len(coords)
self.reference = reference
def __repr__(self):
return ", ".join(map... | 33.778947 | 103 | 0.612964 |
f69ea7e5b17c683d2dd91f0d35d986377484644a | 456 | py | Python | apps/logics/title.py | leigeng2014/sango2 | aa0a3ed1a316d8afc9482f072f2aa57cffe9a10f | [
"Apache-2.0"
] | null | null | null | apps/logics/title.py | leigeng2014/sango2 | aa0a3ed1a316d8afc9482f072f2aa57cffe9a10f | [
"Apache-2.0"
] | null | null | null | apps/logics/title.py | leigeng2014/sango2 | aa0a3ed1a316d8afc9482f072f2aa57cffe9a10f | [
"Apache-2.0"
] | null | null | null | #-*- coding: utf-8 -*-
from apps.models.user_title import UserTitle
def use_title(oc_user,params):
"""设置称号
"""
tid = params["tid"]
user_title_obj = UserTitle.get_instance(oc_user.uid)
if tid == '':
user_title_obj.title_info['is_used'] = ''
user_title_obj.put()
ret... | 24 | 57 | 0.557018 |
cb71376c450f6da68d5a0e4681fe446a334904f3 | 2,553 | py | Python | setup.py | dataflake/dataflake.ldapconnection | eae4a1cf2373813bf9d9948e26a91cc32e11dedd | [
"ZPL-2.1"
] | null | null | null | setup.py | dataflake/dataflake.ldapconnection | eae4a1cf2373813bf9d9948e26a91cc32e11dedd | [
"ZPL-2.1"
] | null | null | null | setup.py | dataflake/dataflake.ldapconnection | eae4a1cf2373813bf9d9948e26a91cc32e11dedd | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2008-2012 Jens Vagelpohl and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS S... | 33.592105 | 79 | 0.583235 |
74fb0ded52deaee83ecf9db5570afe0c91f38f37 | 567 | py | Python | Python/manhattan.py | MjCode01/DS-Algo-Point | 79d826fa63090014dfaab281e5170c25b86c6bbf | [
"MIT"
] | 1,148 | 2020-09-28T15:06:16.000Z | 2022-03-17T16:30:08.000Z | Python/manhattan.py | MjCode01/DS-Algo-Point | 79d826fa63090014dfaab281e5170c25b86c6bbf | [
"MIT"
] | 520 | 2020-09-28T18:34:26.000Z | 2021-10-30T17:06:43.000Z | Python/manhattan.py | MjCode01/DS-Algo-Point | 79d826fa63090014dfaab281e5170c25b86c6bbf | [
"MIT"
] | 491 | 2020-09-28T18:40:14.000Z | 2022-03-20T13:41:44.000Z | '''
Input and output format:
>>Enter the coordinates of the first point:
10 20
>>Enter the coordinates of the second point:
20 30
>>Manhattan Distance between the two points is : 20
Time complexity: O(1)
Space complexity: O(1)
'''
x1 , x2 = list(map(int,input("Enter the coordinates of the first point:")... | 33.352941 | 93 | 0.687831 |
8d0092e739d63689466906fd06814e68616bd172 | 461 | py | Python | dmarc_metrics_exporter/model/__init__.py | Tristan971/dmarc-metrics-exporter | d666693786fdd75b95cf8f13738bf177e70d741b | [
"MIT"
] | 6 | 2021-09-17T20:15:30.000Z | 2022-02-26T18:14:17.000Z | dmarc_metrics_exporter/model/__init__.py | Tristan971/dmarc-metrics-exporter | d666693786fdd75b95cf8f13738bf177e70d741b | [
"MIT"
] | 14 | 2021-01-11T13:24:18.000Z | 2022-02-09T20:43:51.000Z | dmarc_metrics_exporter/model/__init__.py | fl42/dmarc-metrics-exporter | 59a5825016e0bdfeeefcb25d39c4a01218daf9d4 | [
"MIT"
] | 4 | 2021-09-20T14:53:49.000Z | 2021-12-17T18:49:45.000Z | from dmarc_metrics_exporter.model.dmarc_aggregate_report import (
AlignmentType,
AuthResultType,
DkimauthResultType,
DkimresultType,
DmarcresultType,
DateRangeType,
DispositionType,
IdentifierType,
PolicyEvaluatedType,
PolicyOverrideReason,
PolicyOverrideType,
PolicyPubli... | 20.954545 | 65 | 0.733189 |
aad877b73870cc60f71938a19179ad7240dd56dc | 2,164 | py | Python | earlgrey/patterns/worker/client_sync.py | icon-project/earlgrey | 87019be07954024fd1ba5b07546f838534c47e01 | [
"Apache-2.0"
] | 21 | 2018-08-17T09:46:14.000Z | 2021-05-27T10:06:13.000Z | earlgrey/patterns/worker/client_sync.py | icon-project/earlgrey | 87019be07954024fd1ba5b07546f838534c47e01 | [
"Apache-2.0"
] | null | null | null | earlgrey/patterns/worker/client_sync.py | icon-project/earlgrey | 87019be07954024fd1ba5b07546f838534c47e01 | [
"Apache-2.0"
] | 6 | 2019-03-06T00:46:54.000Z | 2021-12-01T23:34:54.000Z | # Copyright 2017 theloop Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 32.298507 | 74 | 0.65342 |
f6518a3221d3dbbcfddeb84ff7736fe62d406079 | 13,187 | py | Python | nightshift_client.py | seangfrank0474/nightshift | a72cb14aae5da9e6d00233067efe69fd9b610bf3 | [
"Unlicense"
] | null | null | null | nightshift_client.py | seangfrank0474/nightshift | a72cb14aae5da9e6d00233067efe69fd9b610bf3 | [
"Unlicense"
] | null | null | null | nightshift_client.py | seangfrank0474/nightshift | a72cb14aae5da9e6d00233067efe69fd9b610bf3 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Night Shift Client
import aiohttp
import asyncio
import base64
import json
import os
import re
import socket
import string
import subprocess
import sys
import time
from colorama import Fore, Back, Style
from datetime import datetime
from random import randrange
from sub... | 51.713725 | 196 | 0.587548 |
8485206e06dfda0ec893b3d2e57b4e4b7272f955 | 1,887 | py | Python | ummeli/opportunities/tomtom/forms.py | praekelt/ummeli | c09731ed9a3a40359e81dcf6ed365797606ae9e2 | [
"BSD-3-Clause"
] | null | null | null | ummeli/opportunities/tomtom/forms.py | praekelt/ummeli | c09731ed9a3a40359e81dcf6ed365797606ae9e2 | [
"BSD-3-Clause"
] | null | null | null | ummeli/opportunities/tomtom/forms.py | praekelt/ummeli | c09731ed9a3a40359e81dcf6ed365797606ae9e2 | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from ummeli.opportunities.models import TomTomMicroTaskResponse
from ummeli.vlive.utils import get_lat_lon
class MicroTaskResponseForm(forms.ModelForm):
tel_1 = forms.RegexField('[0-9+]', required=False,
error_message='Please enter a valid telephone number.')
tel_2 = f... | 39.3125 | 71 | 0.654478 |
9a814cb679b281f68f92cad272753c51837941b1 | 20,428 | py | Python | spyder/api/widgets/mixins.py | Ronaldyuen/spyder | 53130bb39ede96bdc2cebbf21caa9a7f97ccdc0c | [
"MIT"
] | 1 | 2021-03-13T04:36:43.000Z | 2021-03-13T04:36:43.000Z | spyder/api/widgets/mixins.py | Ronaldyuen/spyder | 53130bb39ede96bdc2cebbf21caa9a7f97ccdc0c | [
"MIT"
] | null | null | null | spyder/api/widgets/mixins.py | Ronaldyuen/spyder | 53130bb39ede96bdc2cebbf21caa9a7f97ccdc0c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2013-2016 Colin Duquesnoy and others (see pyqode/AUTHORS.rst)
# Copyright (c) 2016- Spyder Project Contributors (see AUTHORS.txt)
#
# Distributed under the terms of the MIT License
# (see NOTICE.txt i... | 32.6848 | 79 | 0.597073 |
83c388fad4749eaf6fdbf12f0ca641a1e309abfe | 11,075 | py | Python | benchmarking/benchmarks/benchmarks.py | virtan/FAI-PEP | 8641a54b2328c343ab0470f195a42da1021d1392 | [
"Apache-2.0"
] | 1 | 2019-08-09T07:50:21.000Z | 2019-08-09T07:50:21.000Z | benchmarking/benchmarks/benchmarks.py | virtan/FAI-PEP | 8641a54b2328c343ab0470f195a42da1021d1392 | [
"Apache-2.0"
] | null | null | null | benchmarking/benchmarks/benchmarks.py | virtan/FAI-PEP | 8641a54b2328c343ab0470f195a42da1021d1392 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
################################... | 39.412811 | 90 | 0.583747 |
bce9eb3996618d78861e156a0ce2aa6c685c0b62 | 921 | py | Python | packages/postgres-database/src/simcore_postgres_database/models/tags.py | colinRawlings/osparc-simcore | bf2f18d5bc1e574d5f4c238d08ad15156184c310 | [
"MIT"
] | 25 | 2018-04-13T12:44:12.000Z | 2022-03-12T15:01:17.000Z | packages/postgres-database/src/simcore_postgres_database/models/tags.py | colinRawlings/osparc-simcore | bf2f18d5bc1e574d5f4c238d08ad15156184c310 | [
"MIT"
] | 2,553 | 2018-01-18T17:11:55.000Z | 2022-03-31T16:26:40.000Z | packages/postgres-database/src/simcore_postgres_database/models/tags.py | mrnicegyu11/osparc-simcore | b6fa6c245dbfbc18cc74a387111a52de9b05d1f4 | [
"MIT"
] | 20 | 2018-01-18T19:45:33.000Z | 2022-03-29T07:08:47.000Z | import sqlalchemy as sa
from .base import metadata
study_tags = sa.Table(
"study_tags",
metadata,
sa.Column(
"study_id",
sa.BigInteger,
sa.ForeignKey("projects.id", onupdate="CASCADE", ondelete="CASCADE"),
nullable=False,
),
sa.Column(
"tag_id",
sa.B... | 24.891892 | 77 | 0.604777 |
b17fd884a470e7e3747bde76596ae759ea51ef77 | 1,098 | py | Python | dataloader.py | asprasan/unified_framework | 45f9c20e4c66b0f0b9199c4a0bdaf8ecd1e82ad8 | [
"Apache-2.0"
] | 4 | 2021-01-09T08:05:50.000Z | 2022-02-20T14:47:58.000Z | dataloader.py | asprasan/unified_framework | 45f9c20e4c66b0f0b9199c4a0bdaf8ecd1e82ad8 | [
"Apache-2.0"
] | null | null | null | dataloader.py | asprasan/unified_framework | 45f9c20e4c66b0f0b9199c4a0bdaf8ecd1e82ad8 | [
"Apache-2.0"
] | 1 | 2021-01-26T09:37:46.000Z | 2021-01-26T09:37:46.000Z | '''
------------------------------------------
DEFINE DATALOADER TO FETCH VIDEO SEQUENCES
------------------------------------------
removed recurrence in train data
added return of patches
added hdf5 file access
'''
import torch
from torch.utils import data
import glob
import os
import numpy as np
impor... | 23.869565 | 67 | 0.559199 |
21e2cac1c7b3bd4fe24a25257a07542016ad211a | 2,197 | py | Python | example.py | HenryLiangzy/COMP9417_Project | d96fcfdcceaeebccd91f02b275a205d264b26966 | [
"Apache-2.0"
] | 1 | 2020-07-12T11:24:02.000Z | 2020-07-12T11:24:02.000Z | example.py | HenryLiangzy/COMP9417_Project | d96fcfdcceaeebccd91f02b275a205d264b26966 | [
"Apache-2.0"
] | null | null | null | example.py | HenryLiangzy/COMP9417_Project | d96fcfdcceaeebccd91f02b275a205d264b26966 | [
"Apache-2.0"
] | 1 | 2021-02-08T23:38:02.000Z | 2021-02-08T23:38:02.000Z | # from https://chrisalbon.com/machine_learning/naive_bayes/multinomial_naive_bayes_classifier/
# Load libraries
import numpy as np
from sklearn.naive_bayes import MultinomialNB, BernoulliNB
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics import accuracy_score, precision_score, reca... | 32.308824 | 107 | 0.722804 |
f310321534c162ab59f3c8d8270df1a7c13d6049 | 2,512 | py | Python | python/seldon_deploy_sdk/models/persistent_volume_mode.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 6 | 2021-02-18T14:37:54.000Z | 2022-01-13T13:27:43.000Z | python/seldon_deploy_sdk/models/persistent_volume_mode.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 14 | 2021-01-04T16:32:03.000Z | 2021-12-13T17:53:59.000Z | python/seldon_deploy_sdk/models/persistent_volume_mode.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 7 | 2021-03-17T09:05:55.000Z | 2022-01-05T10:39:56.000Z | # coding: utf-8
"""
Seldon Deploy API
API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501
OpenAPI spec version: v1alpha1
Contact: hello@seldon.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint... | 28.545455 | 122 | 0.563296 |
281622cd73d32913d0050e93d5bb06587f16450b | 2,657 | py | Python | information111/info/__init__.py | SNxiaobei/text | 637018ff89d992c2ed23f5c90fa2010023bc2ff3 | [
"MIT"
] | null | null | null | information111/info/__init__.py | SNxiaobei/text | 637018ff89d992c2ed23f5c90fa2010023bc2ff3 | [
"MIT"
] | null | null | null | information111/info/__init__.py | SNxiaobei/text | 637018ff89d992c2ed23f5c90fa2010023bc2ff3 | [
"MIT"
] | null | null | null | import logging
from logging.handlers import RotatingFileHandler
from flask import g
from flask import render_template
from flask import Flask
from config import Config, DevelopmentConfig,ProductionConfig,config_map
from flask_sqlalchemy import SQLAlchemy
import redis
from flask_session import Session
from flask_wtf.c... | 26.306931 | 112 | 0.749341 |
c8a88396fb4fd93d27819ed29a25b5db11899ef6 | 28,159 | py | Python | scipy/integrate/_ivp/ivp.py | derbuihan/scipy | bad9bdabc9ffa8724d891b027783412ec00a717a | [
"BSD-3-Clause"
] | null | null | null | scipy/integrate/_ivp/ivp.py | derbuihan/scipy | bad9bdabc9ffa8724d891b027783412ec00a717a | [
"BSD-3-Clause"
] | null | null | null | scipy/integrate/_ivp/ivp.py | derbuihan/scipy | bad9bdabc9ffa8724d891b027783412ec00a717a | [
"BSD-3-Clause"
] | null | null | null | import inspect
import numpy as np
from .bdf import BDF
from .radau import Radau
from .rk import RK23, RK45, DOP853
from .lsoda import LSODA
from scipy.optimize import OptimizeResult
from .common import EPS, OdeSolution
from .base import OdeSolver
METHODS = {'RK23': RK23,
'RK45': RK45,
'DOP853': ... | 41.593796 | 92 | 0.612593 |
69f3d0e564cf7daca1e9d62dd19f582a527336f9 | 3,467 | py | Python | pgoapi/protos/pogoprotos/map/weather/weather_alert_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 2 | 2018-02-09T07:35:25.000Z | 2019-05-22T17:51:07.000Z | pgoapi/protos/pogoprotos/map/weather/weather_alert_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | null | null | null | pgoapi/protos/pogoprotos/map/weather/weather_alert_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 15 | 2017-02-24T01:30:23.000Z | 2021-06-27T08:46:43.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/map/weather/weather_alert.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobu... | 32.707547 | 375 | 0.759446 |
69af532eee3318ab4a88fc7ce0ab265b5fecc8e9 | 2,176 | py | Python | busy_light/config_flow.py | njhowell/homeassistant_busylight | c7730b894af6c55c8edaf4994132abcfcca52954 | [
"MIT"
] | null | null | null | busy_light/config_flow.py | njhowell/homeassistant_busylight | c7730b894af6c55c8edaf4994132abcfcca52954 | [
"MIT"
] | null | null | null | busy_light/config_flow.py | njhowell/homeassistant_busylight | c7730b894af6c55c8edaf4994132abcfcca52954 | [
"MIT"
] | null | null | null | """Config flow for BusyLight integration."""
from __future__ import annotations
import logging
from typing import Any
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions impor... | 27.897436 | 86 | 0.668199 |
ea735cd2dc61e87450085cb07ea64819b041f7f4 | 305 | py | Python | if-stop.py | mark-ulrich/iface | dee69cf7d4bd263ce8dae0ae959e13621b1834e8 | [
"MIT"
] | 55 | 2015-04-11T12:44:39.000Z | 2020-11-19T06:32:16.000Z | if-stop.py | mark-ulrich/iface | dee69cf7d4bd263ce8dae0ae959e13621b1834e8 | [
"MIT"
] | 4 | 2016-04-10T19:28:24.000Z | 2018-08-03T16:58:05.000Z | if-stop.py | mark-ulrich/iface | dee69cf7d4bd263ce8dae0ae959e13621b1834e8 | [
"MIT"
] | 14 | 2016-05-08T00:31:43.000Z | 2021-04-10T22:24:38.000Z | #!/usr/bin/python
#
# LICENSE: See LICENSE file.
#
# WARNING: The Windows/Linux iface by is EXPERIMENTAL and has nothing to do
# with good coding, security, etc. USE AT YOUR OWN RISK.
#
import ifaceclientlib
print "Stopping WinLin iface: %s" % (
str(ifaceclientlib.Invoke("__shutdown"))
)
| 23.461538 | 75 | 0.695082 |
4fd2d5ce010905234cf525739f67b7260c78642e | 3,789 | py | Python | connections/AlphaEncryptionConnection.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 2 | 2020-04-15T11:20:59.000Z | 2021-05-12T13:01:36.000Z | connections/AlphaEncryptionConnection.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-06-05T04:48:56.000Z | 2018-06-05T04:48:56.000Z | connections/AlphaEncryptionConnection.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-08-15T06:45:46.000Z | 2018-08-15T06:45:46.000Z | from nacl.encoding import HexEncoder
from common_util import get_mylog
from connections.AbstractConnection import AbstractConnection
from messages.util import get_msg_size, decode_msg_size
from messages.MessageDeserializer import MessageDeserializer
from messages.EnableAlphaEncryptionResponseMessage import EnableAlpha... | 42.1 | 94 | 0.686725 |
722d38d421ff49d3a05563342bc635271726e4f5 | 1,756 | py | Python | core/migrations/0017_add_pattern_match_to_license.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | core/migrations/0017_add_pattern_match_to_license.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | core/migrations/0017_add_pattern_match_to_license.py | profesormig/quimica3a | a453f0d7485ebc4b2d7b06a72b44c6c179a3bbd4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import core.models.status_type
def go_back(apps, schema_editor):
pass
def apply_data_migration(apps, schema_editor):
MatchType = apps.get_model("core", "MatchType")
... | 32.518519 | 134 | 0.640091 |
010c4232765a81afa2d89475da36f6a0b0c65473 | 505 | py | Python | test/indictor_test.py | cxl086/tushare | d89722198033665d393c3f27e4c00aadc22808d1 | [
"BSD-3-Clause"
] | 12,490 | 2015-01-11T09:49:07.000Z | 2022-03-31T15:03:16.000Z | test/indictor_test.py | cxl086/tushare | d89722198033665d393c3f27e4c00aadc22808d1 | [
"BSD-3-Clause"
] | 1,532 | 2015-02-05T11:20:59.000Z | 2022-03-29T13:30:26.000Z | test/indictor_test.py | cxl086/tushare | d89722198033665d393c3f27e4c00aadc22808d1 | [
"BSD-3-Clause"
] | 4,867 | 2015-01-07T08:18:09.000Z | 2022-03-31T07:03:53.000Z | # -*- coding:utf-8 -*-
'''
Created on 2018/05/26
@author: Jackie Liao
'''
import unittest
import tushare.stock.indictor as idx
import tushare as ts
class Test(unittest.TestCase):
def test_plot_all(self):
data = ts.get_k_data("601398", start="2018-01-01", end="2018-05-27")
data = data.sort_value... | 21.041667 | 76 | 0.649505 |
e02a92b8d32d5663bf6c5f8320a7bfbe5e20af11 | 2,918 | py | Python | tests/build/scipy/scipy/stats/tests/test_fit.py | crougeux/-a-i_v1.6.3_modif | b499a812e79f335d082d3f9b1070e0465ad67bab | [
"BSD-3-Clause"
] | 26 | 2018-02-14T23:52:58.000Z | 2021-08-16T13:50:03.000Z | tests/build/scipy/scipy/stats/tests/test_fit.py | crougeux/-a-i_v1.6.3_modif | b499a812e79f335d082d3f9b1070e0465ad67bab | [
"BSD-3-Clause"
] | null | null | null | tests/build/scipy/scipy/stats/tests/test_fit.py | crougeux/-a-i_v1.6.3_modif | b499a812e79f335d082d3f9b1070e0465ad67bab | [
"BSD-3-Clause"
] | 10 | 2018-08-13T19:38:39.000Z | 2020-04-19T03:02:00.000Z | from __future__ import division, print_function, absolute_import
import os
import numpy as np
from numpy.testing import dec
from scipy import stats
from test_continuous_basic import distcont
# this is not a proper statistical test for convergence, but only
# verifies that the estimate and true values don't differ ... | 28.891089 | 93 | 0.610007 |
918c9c36209a4f67101960cd98c51b9ad6210a72 | 73,797 | py | Python | tests/providers/test_address.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | null | null | null | tests/providers/test_address.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | null | null | null | tests/providers/test_address.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | null | null | null | import re
from typing import Pattern
from unittest import mock
import pytest
from faker import Faker, providers
from faker.providers.address.az_AZ import Provider as AzAzAddressProvider
from faker.providers.address.cs_CZ import Provider as CsCzAddressProvider
from faker.providers.address.da_DK import Provider as DaD... | 39.590665 | 116 | 0.650731 |
e83a649822bf6333e613e2c67093faf12c39d952 | 5,785 | py | Python | tests/hooks/test_docker_hook.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 1 | 2019-10-02T13:33:48.000Z | 2019-10-02T13:33:48.000Z | tests/hooks/test_docker_hook.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 20 | 2017-04-18T19:47:46.000Z | 2020-01-13T04:19:24.000Z | tests/hooks/test_docker_hook.py | suensummit/airflow | 37a342d0e96a91ce2d34085e225a4e86f54c4e21 | [
"Apache-2.0"
] | 2 | 2018-09-15T07:13:01.000Z | 2021-03-26T07:27:38.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 33.439306 | 69 | 0.579084 |
35b7e102d82ede77e52d9eb4f187662e003d813a | 4,000 | py | Python | pynames/tests/test_from_list_generator.py | imposeren/pynames | 6928af52d77ed51b57386fea2a6f9ec3e1a3ce80 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pynames/tests/test_from_list_generator.py | imposeren/pynames | 6928af52d77ed51b57386fea2a6f9ec3e1a3ce80 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pynames/tests/test_from_list_generator.py | imposeren/pynames | 6928af52d77ed51b57386fea2a6f9ec3e1a3ce80 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # coding: utf-8
import os
import unittest
from pynames.relations import GENDER, LANGUAGE
from pynames.from_list_generator import FromListGenerator
FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixtures')
class TestFromListGenerator(unittest.TestCase):
class TestGenerator(FromListGenerator):
... | 44.444444 | 133 | 0.7045 |
6c03dcf3e880f714d6f84be1489229b48601fc45 | 1,547 | py | Python | nn_recipe/NN/ActivationFunctions/hardTanh.py | mgtm98/NNRecipe | 33e369867ce3b557bc4374b14d2f6f727d78f91c | [
"MIT"
] | 1 | 2021-02-04T13:20:17.000Z | 2021-02-04T13:20:17.000Z | nn_recipe/NN/ActivationFunctions/hardTanh.py | alien19/NNRecipe | 33e369867ce3b557bc4374b14d2f6f727d78f91c | [
"MIT"
] | null | null | null | nn_recipe/NN/ActivationFunctions/hardTanh.py | alien19/NNRecipe | 33e369867ce3b557bc4374b14d2f6f727d78f91c | [
"MIT"
] | 2 | 2021-02-04T04:19:31.000Z | 2021-02-04T13:20:03.000Z | from .__activation import ActivationFunction
import numpy as np
class HardTanh(ActivationFunction):
"""
Class represents the hardtanh activation function
Examples:
---------
>>> x = np.array([1, 2, 3]) # input vector
>>> f = HardTanh() # creating HardTanh object
... | 26.220339 | 87 | 0.471881 |
8bbd82ac18c907f858137ef5d87c8d6af5225a96 | 947 | py | Python | scraper/storage_spiders/didongmangocom.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | null | null | null | scraper/storage_spiders/didongmangocom.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 10 | 2020-02-11T23:34:28.000Z | 2022-03-11T23:16:12.000Z | scraper/storage_spiders/didongmangocom.py | chongiadung/choinho | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | [
"MIT"
] | 3 | 2018-08-05T14:54:25.000Z | 2021-06-07T01:49:59.000Z | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@class='detail-pro-1 detail-pro-item']/h1[@class='ten-chitiet']",
'price' : "//div[@class='gia-chitiet']",
'category' : "//d... | 35.074074 | 85 | 0.63358 |
f33d1eb5507806c03d6b57d83716232fe000eab8 | 3,031 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/15_features/numtrees_20/rule_19.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/15_features/numtrees_20/rule_19.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/15_features/numtrees_20/rule_19.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Coupon_validity, obj[4]: Gender, obj[5]: Age, obj[6]: Children, obj[7]: Education, obj[8]: Occupation, obj[9]: Income, obj[10]: Bar, obj[11]: Coffeehouse, obj[12]: Restaurant20to50, obj[13]: Direction_same, obj[14]: Distance
# {"feature":... | 36.518072 | 305 | 0.546024 |
4275f0bfd196126a3e2e39cbaca02a0889dfaa9c | 798 | py | Python | aqhj_sites/migrations/0002_auto_20160603_0122.py | Gsiete/aqhj | 6c4d52eeff3d759c600d07772b4d7e1b5d922f91 | [
"BSD-2-Clause"
] | null | null | null | aqhj_sites/migrations/0002_auto_20160603_0122.py | Gsiete/aqhj | 6c4d52eeff3d759c600d07772b4d7e1b5d922f91 | [
"BSD-2-Clause"
] | null | null | null | aqhj_sites/migrations/0002_auto_20160603_0122.py | Gsiete/aqhj | 6c4d52eeff3d759c600d07772b4d7e1b5d922f91 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-06-03 01:22
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('sites', '0002_alter_domain_unique'),
('aqhj_sites', ... | 28.5 | 110 | 0.62782 |
48ae6068c011833779c9622bec376dd371d4868b | 9,950 | py | Python | project/scripts/PPXtractor_ph3.py | weipuz/ftps-hw2 | 352c682913a9bc98e79ab597890b826e843fd88a | [
"MIT"
] | null | null | null | project/scripts/PPXtractor_ph3.py | weipuz/ftps-hw2 | 352c682913a9bc98e79ab597890b826e843fd88a | [
"MIT"
] | 1 | 2020-09-26T13:36:52.000Z | 2020-09-26T13:36:52.000Z | project/scripts/PPXtractor_ph3.py | weipuz/ftps-hw2 | 352c682913a9bc98e79ab597890b826e843fd88a | [
"MIT"
] | null | null | null | ## It estimates the forward (P(s|t)) and reverse (P(t|s)) probabilities using relative frequency estimation ##
import os
import sys
import heapq
import math
import time
from datetime import timedelta
#min_lprob = -6.0 # for log10
#max_lprob = -0.000434
min_lprob = -13.8155 # for log (natural)
max_lpr... | 33.277592 | 126 | 0.581005 |
7c2e7672bff2d8fc286c67b03c26b87802a0f75b | 6,618 | py | Python | models/glc/cism/glimmer-cism/PyGC/PyGC/IO/GC_netcdf.py | fmyuan/clm-microbe | 9faee9ed7d6c092c4a9e4a207f32cbffab78b85c | [
"MIT"
] | 5 | 2019-03-12T01:58:26.000Z | 2020-12-16T03:08:25.000Z | models/glc/cism/glimmer-cism/PyGC/PyGC/IO/GC_netcdf.py | fmyuan/clm-microbe | 9faee9ed7d6c092c4a9e4a207f32cbffab78b85c | [
"MIT"
] | 1 | 2022-01-21T01:51:13.000Z | 2022-01-21T01:51:13.000Z | models/glc/cism/glimmer-cism/PyGC/PyGC/IO/GC_netcdf.py | email-clm/CLM-Microbe | 711c87faec2c1bfe2cea1a7ebd07e4373e82a184 | [
"MIT"
] | 13 | 2016-03-08T21:04:52.000Z | 2021-05-16T03:29:35.000Z | # Copyright (C) 2010
# Glimmer-CISM contributors - see AUTHORS file for list of contributors
#
# This file is part of Glimmer-CISM.
#
# Glimmer-CISM is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either versi... | 31.665072 | 96 | 0.575098 |
eab072d8f381b7d47545943e937f89130186b904 | 383 | py | Python | bin/edit_helpers.py | chriswatrous/scripts | 2f0b27d9a5852dbb41973d494a58df41fd9b1731 | [
"MIT"
] | 2 | 2015-12-17T03:42:24.000Z | 2019-04-08T01:35:56.000Z | bin/edit_helpers.py | chriswatrous/scripts | 2f0b27d9a5852dbb41973d494a58df41fd9b1731 | [
"MIT"
] | null | null | null | bin/edit_helpers.py | chriswatrous/scripts | 2f0b27d9a5852dbb41973d494a58df41fd9b1731 | [
"MIT"
] | null | null | null | from subprocess import call, DEVNULL
def run_editor(cmds):
for cmd in cmds:
if program_exists(cmd[0]):
call(cmd)
break
else:
print('No editors found (tried {})'
.format(', '.join(x[0] for x in cmds)))
sys.exit(1)
def program_exists(name):
ret... | 22.529412 | 69 | 0.56658 |
3a0c49a67788938edef4b31b7827c2e4f939fb1e | 5,083 | py | Python | mmdet/core/bbox/geometry.py | IPIU-detection/SEANet | 1a04758944945654ebe957d6ecdc72d25f638fa2 | [
"Apache-2.0"
] | 33 | 2020-08-29T18:20:25.000Z | 2022-02-16T07:58:53.000Z | mmdet/core/bbox/geometry.py | IPIU-detection/SEA | 1a04758944945654ebe957d6ecdc72d25f638fa2 | [
"Apache-2.0"
] | 3 | 2020-08-30T02:59:51.000Z | 2022-01-14T16:28:47.000Z | mmdet/core/bbox/geometry.py | IPIU-detection/SEA | 1a04758944945654ebe957d6ecdc72d25f638fa2 | [
"Apache-2.0"
] | 3 | 2020-09-28T01:11:07.000Z | 2020-10-12T10:55:58.000Z | import torch
def bbox_overlaps(bboxes1, bboxes2, mode='iou', is_aligned=False):
"""Calculate overlap between two set of bboxes.
If ``is_aligned`` is ``False``, then calculate the ious between each bbox
of bboxes1 and bboxes2, otherwise the ious between each aligned pair of
bboxes1 and bboxes2.
A... | 35.545455 | 83 | 0.494 |
4ea1d4df4f9b7d08ecebb7cc5aeade02dd466439 | 6,066 | py | Python | windwos.py | Mask0913/Diffie-Hellman-crypto | 73924cace7ed31ccc839b4122a3e3f3bc97127ee | [
"MIT"
] | null | null | null | windwos.py | Mask0913/Diffie-Hellman-crypto | 73924cace7ed31ccc839b4122a3e3f3bc97127ee | [
"MIT"
] | null | null | null | windwos.py | Mask0913/Diffie-Hellman-crypto | 73924cace7ed31ccc839b4122a3e3f3bc97127ee | [
"MIT"
] | null | null | null | #coding=utf-8
import base64
import sys
import datetime
from PyQt5.QtGui import QTextCursor
from PyQt5.QtWidgets import QMainWindow, QApplication, QMessageBox
from untitled import Ui_MainWindow
import random
class admin_grasping(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.UI... | 31.268041 | 98 | 0.508572 |
b4128433b5ebeb22f6d17ed37dfb616bc69a215b | 36,575 | py | Python | python/ccxt/async_support/coss.py | pkaske/ccxt | 19821cfe0b6899d42b714757137dce9f00c406a0 | [
"MIT"
] | 1 | 2021-02-05T20:44:38.000Z | 2021-02-05T20:44:38.000Z | python/ccxt/async_support/coss.py | pkaske/ccxt | 19821cfe0b6899d42b714757137dce9f00c406a0 | [
"MIT"
] | null | null | null | python/ccxt/async_support/coss.py | pkaske/ccxt | 19821cfe0b6899d42b714757137dce9f00c406a0 | [
"MIT"
] | 1 | 2019-11-27T06:36:26.000Z | 2019-11-27T06:36:26.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ArgumentsRequired
class coss(Exchange):
... | 41.5625 | 126 | 0.428079 |
f7a9e3438327b4db58f37b6f5f47117c0270dffc | 4,987 | py | Python | qa/rpc-tests/test_framework/netutil.py | deuscoin-org/deuscoin-core | 907e444d2b3bb5424665efabd692f02c4bccd8de | [
"MIT"
] | 1 | 2018-02-08T09:41:12.000Z | 2018-02-08T09:41:12.000Z | qa/rpc-tests/test_framework/netutil.py | deuscoin-org/deuscoin-core | 907e444d2b3bb5424665efabd692f02c4bccd8de | [
"MIT"
] | 1 | 2020-08-11T03:18:18.000Z | 2020-08-11T03:23:30.000Z | qa/rpc-tests/test_framework/netutil.py | deuscoin-org/deuscoin-core | 907e444d2b3bb5424665efabd692f02c4bccd8de | [
"MIT"
] | 4 | 2017-10-27T13:03:59.000Z | 2018-03-08T03:06:37.000Z | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Deuscoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Linux network utilities
import sys
import socket
import fcntl
import struct
import array
import os
imp... | 32.174194 | 113 | 0.602567 |
391a2441b3d1ffc20bd398416334fda7f8e889cd | 1,418 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/trigger_runs_query_response_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 35.45 | 81 | 0.619887 |
2a400e3e78b944b89d15ae1d54971ddae62bd6f6 | 363 | py | Python | bookingapp/migrations/0003_auto_20181205_0826.py | vetsinen/etalki | 1071c5db90bd4d70aecdd08b36749995be34d79d | [
"MIT"
] | null | null | null | bookingapp/migrations/0003_auto_20181205_0826.py | vetsinen/etalki | 1071c5db90bd4d70aecdd08b36749995be34d79d | [
"MIT"
] | null | null | null | bookingapp/migrations/0003_auto_20181205_0826.py | vetsinen/etalki | 1071c5db90bd4d70aecdd08b36749995be34d79d | [
"MIT"
] | null | null | null | # Generated by Django 2.1.4 on 2018-12-05 08:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bookingapp', '0002_slots'),
]
operations = [
migrations.AlterField(
model_name='slots',
name='periods',
... | 19.105263 | 47 | 0.575758 |
6f4aa8e64584b9fdee5b36b788d8979ec2fd70ee | 271 | py | Python | Exercicios20/ex107/source.py | luisgnc/Python-Exercises | 94979abb3ca1515145bde54ecd2f784e5d903219 | [
"MIT"
] | null | null | null | Exercicios20/ex107/source.py | luisgnc/Python-Exercises | 94979abb3ca1515145bde54ecd2f784e5d903219 | [
"MIT"
] | null | null | null | Exercicios20/ex107/source.py | luisgnc/Python-Exercises | 94979abb3ca1515145bde54ecd2f784e5d903219 | [
"MIT"
] | null | null | null | import moeda_func
preco = float(input('Digite o preço: R$ '))
print(f'A metade de R${preco:.2f} é R${moeda_func.metade(preco):.2f}')
print(f'O dobro de R${preco:.2f} é R${moeda_func.dobro(preco):.2f}')
print(f'Aumentando 10%, temos R${moeda_func.aumentar(preco, 10)}')
| 33.875 | 70 | 0.690037 |
c9b89cd9673e23d0fb42e52cc7ab995710f6db4e | 3,618 | py | Python | redis/redis-pipe-image/utils.py | a1309820/TwitterIngestion | fe4f89f3ac775b2594ef3e40e2496ef0f8c687d9 | [
"Apache-2.0"
] | null | null | null | redis/redis-pipe-image/utils.py | a1309820/TwitterIngestion | fe4f89f3ac775b2594ef3e40e2496ef0f8c687d9 | [
"Apache-2.0"
] | null | null | null | redis/redis-pipe-image/utils.py | a1309820/TwitterIngestion | fe4f89f3ac775b2594ef3e40e2496ef0f8c687d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 34.132075 | 97 | 0.621614 |
0da3cc4dd5236e45c1049e249716d8a0328d8f6e | 4,041 | py | Python | ironic/drivers/modules/ansible/playbooks/library/stream_url.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | 350 | 2015-01-02T09:35:49.000Z | 2022-03-28T09:25:59.000Z | ironic/drivers/modules/ansible/playbooks/library/stream_url.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | 13 | 2019-04-12T21:55:36.000Z | 2020-05-26T14:07:13.000Z | ironic/drivers/modules/ansible/playbooks/library/stream_url.py | yanndegat/ironic | 8857ec76443dea7778bb9c0d66568304e52495e5 | [
"Apache-2.0"
] | 333 | 2015-01-06T09:09:22.000Z | 2022-02-20T08:11:40.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 33.957983 | 78 | 0.635734 |
f6a192b6421e88f571e08d793d1a7cafe3fa0efb | 13,905 | py | Python | python/pyspark/tests/test_context.py | akhalymon-cv/spark | 76191b9151b6a7804f8894e53eef74106f98b787 | [
"Apache-2.0"
] | 9 | 2019-11-20T09:44:22.000Z | 2021-04-27T09:45:59.000Z | python/pyspark/tests/test_context.py | akhalymon-cv/spark | 76191b9151b6a7804f8894e53eef74106f98b787 | [
"Apache-2.0"
] | 39 | 2018-09-25T21:57:04.000Z | 2022-03-27T17:34:43.000Z | python/pyspark/tests/test_context.py | akhalymon-cv/spark | 76191b9151b6a7804f8894e53eef74106f98b787 | [
"Apache-2.0"
] | 10 | 2016-10-12T09:04:47.000Z | 2021-04-29T19:07:20.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 us... | 40.072046 | 95 | 0.660338 |
3a0c980ebd684db81b2720041fb2e879b5d264d2 | 1,640 | py | Python | ch04/train_neuralnet.py | showa-yojyo/deep-learning-from-scratch | 9dd8e0f2cbfc4888f7546b424dcb18e3f479c5c7 | [
"MIT"
] | null | null | null | ch04/train_neuralnet.py | showa-yojyo/deep-learning-from-scratch | 9dd8e0f2cbfc4888f7546b424dcb18e3f479c5c7 | [
"MIT"
] | null | null | null | ch04/train_neuralnet.py | showa-yojyo/deep-learning-from-scratch | 9dd8e0f2cbfc4888f7546b424dcb18e3f479c5c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, os
sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定
import numpy as np
import matplotlib.pyplot as plt
from dataset.mnist import load_mnist
from two_layer_net import TwoLayerNet
# データの読み込み
(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True, one_hot_label=True)
ne... | 28.275862 | 85 | 0.707317 |
973272526e87802a8a718c62cf627918c59e5777 | 910 | py | Python | setup.py | rhong3/Panoptes | 831fe9d1b93d278c3130846451e1579e8a53ed7c | [
"MIT"
] | null | null | null | setup.py | rhong3/Panoptes | 831fe9d1b93d278c3130846451e1579e8a53ed7c | [
"MIT"
] | null | null | null | setup.py | rhong3/Panoptes | 831fe9d1b93d278c3130846451e1579e8a53ed7c | [
"MIT"
] | 1 | 2020-09-22T22:04:40.000Z | 2020-09-22T22:04:40.000Z | from setuptools import setup, find_packages
with open("README.md", "r") as readme_file:
readme = readme_file.read()
requirements = ["easygui>=0.98", "Keras>=2.3", "numpy>=1.17.5", "opencv-python>=4.1.2",
"openslide-python>=1.1.1", "pandas>=0.25", "Pillow>=7", "scikit-learn>=0.22", "scipy>=1.3",
... | 35 | 107 | 0.636264 |
ae7730828cf4af8a00767806cedd793f79e56b07 | 1,545 | py | Python | 2020-05-month-long-challenge/day18.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | 2020-05-month-long-challenge/day18.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | 2020-05-month-long-challenge/day18.py | jkbockstael/leetcode | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# Day 18: Permutation in String
#
# Given two strings s1 and s2, write a function to return true if s2 contains
# the permutation of s1. In other words, one of the first string's permutations
# is the substring of the second string.
#
# Notes:
# - The input strings only contain lower case letter... | 35.113636 | 79 | 0.598058 |
8e086ff88fbb7faf2fe8ff0cf8d41cef366e877e | 40,212 | py | Python | test/orm/test_cycles.py | Thhhza/sqlalchemy | f2b267043e17b2b769dc2a5b8139f6be2a3d4e84 | [
"MIT"
] | 1 | 2019-06-22T08:17:03.000Z | 2019-06-22T08:17:03.000Z | test/orm/test_cycles.py | Thhhza/sqlalchemy | f2b267043e17b2b769dc2a5b8139f6be2a3d4e84 | [
"MIT"
] | 1 | 2021-08-07T12:14:52.000Z | 2021-08-07T12:14:52.000Z | test/orm/test_cycles.py | Thhhza/sqlalchemy | f2b267043e17b2b769dc2a5b8139f6be2a3d4e84 | [
"MIT"
] | null | null | null | """Tests cyclical mapper relationships.
We might want to try an automated generate of much of this, all combos of
T1<->T2, with o2m or m2o between them, and a third T3 with o2m/m2o to one/both
T1/T2.
"""
from sqlalchemy import testing
from sqlalchemy import Integer, String, ForeignKey
from sqlalchemy.testing.schema i... | 33.482098 | 130 | 0.522083 |
dd741a6c57676200f6373072d936fc4175f0b5b7 | 111 | py | Python | cs133-python/notes/ch2.py | clmay/school | a4780ca6f517614ab5a5d9a44d0c6d8bc00783b6 | [
"MIT"
] | null | null | null | cs133-python/notes/ch2.py | clmay/school | a4780ca6f517614ab5a5d9a44d0c6d8bc00783b6 | [
"MIT"
] | null | null | null | cs133-python/notes/ch2.py | clmay/school | a4780ca6f517614ab5a5d9a44d0c6d8bc00783b6 | [
"MIT"
] | 1 | 2019-12-26T20:32:31.000Z | 2019-12-26T20:32:31.000Z | width = float(input("Width: "))
height = float(input("Height: "))
area = width * height
print("Area: ",area)
| 15.857143 | 33 | 0.630631 |
dd464dbd1c24aa17d8d0f70af8144acadbb75737 | 1,921 | py | Python | TFTP/Get_Banners.py | OblackatO/OffensiveSecurity | 4b2c5f981cf41cc463791f279c3ad0115c28d738 | [
"MIT"
] | 1 | 2018-05-09T05:51:35.000Z | 2018-05-09T05:51:35.000Z | TFTP/Get_Banners.py | pegom96/OffensiveSecurity | 4b2c5f981cf41cc463791f279c3ad0115c28d738 | [
"MIT"
] | null | null | null | TFTP/Get_Banners.py | pegom96/OffensiveSecurity | 4b2c5f981cf41cc463791f279c3ad0115c28d738 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys,socket,argparse
def check_banners(host):
ports = [21,22,23]
file1 = open('Banners_Info.txt','w')
for port in ports:
try:
socket.setdefaulttimeout(1)
if '.' in host :
print '[>]IPv4 detected.'
s1 = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
if ':' in host : ... | 38.42 | 143 | 0.709526 |
0b927e042b78cf9706ec2762eeec1403b03fd12f | 8,659 | py | Python | qiime2/sdk/tests/test_pipeline.py | emollier/qiime2 | bc9167d844fb4b42eccba8d30ace1eb10ab093c3 | [
"BSD-3-Clause"
] | 1 | 2020-11-23T02:24:42.000Z | 2020-11-23T02:24:42.000Z | qiime2/sdk/tests/test_pipeline.py | emollier/qiime2 | bc9167d844fb4b42eccba8d30ace1eb10ab093c3 | [
"BSD-3-Clause"
] | null | null | null | qiime2/sdk/tests/test_pipeline.py | emollier/qiime2 | bc9167d844fb4b42eccba8d30ace1eb10ab093c3 | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 42.239024 | 79 | 0.630904 |
b7fe4e1b7df4100835744a17913e88b273f9fcc2 | 611 | py | Python | unit_tests/__init__.py | ChrisMacNaughton/juju-layer-ceph-mon | f0ea14d0acdc6d01002e760018891995f1fac71f | [
"ECL-2.0",
"Apache-2.0"
] | 17 | 2016-04-17T04:00:38.000Z | 2021-01-18T16:09:54.000Z | unit_tests/__init__.py | ChrisMacNaughton/juju-layer-ceph-mon | f0ea14d0acdc6d01002e760018891995f1fac71f | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2016-07-01T14:08:13.000Z | 2021-08-20T06:22:20.000Z | unit_tests/__init__.py | ChrisMacNaughton/juju-layer-ceph-mon | f0ea14d0acdc6d01002e760018891995f1fac71f | [
"ECL-2.0",
"Apache-2.0"
] | 19 | 2016-03-07T09:07:39.000Z | 2021-10-29T18:03:24.000Z | # Copyright 2016 Canonical 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 in writing, s... | 35.941176 | 74 | 0.765957 |
e5cf1970548c21adc6cc14c414f0355e2ff669d6 | 1,371 | py | Python | students/K33402/Ivanova_Inessa/simple_django_web_project/project_first_app/views.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33402/Ivanova_Inessa/simple_django_web_project/project_first_app/views.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33402/Ivanova_Inessa/simple_django_web_project/project_first_app/views.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | from django.shortcuts import render
from .models import Person, Car, DriverLicence, Ownership
from django.views.generic import ListView, DetailView, UpdateView, CreateView, DeleteView
from .forms import AddPerson
def owner(request, number):
owner = Person.objects.all()[number - 1]
return render(request, 'owner... | 29.170213 | 118 | 0.658643 |
3975b71858bd3105b5ff4313f275e49e71eec417 | 2,348 | py | Python | rllab-taewoo/examples/mamltrpo_unity_win.py | kyuhoJeong11/GrewRL | a514698df8d38df34de0bd1667d99927f0aa3885 | [
"MIT"
] | null | null | null | rllab-taewoo/examples/mamltrpo_unity_win.py | kyuhoJeong11/GrewRL | a514698df8d38df34de0bd1667d99927f0aa3885 | [
"MIT"
] | null | null | null | rllab-taewoo/examples/mamltrpo_unity_win.py | kyuhoJeong11/GrewRL | a514698df8d38df34de0bd1667d99927f0aa3885 | [
"MIT"
] | null | null | null | use_tf = True
from sandbox.rocky.tf.algos.maml_trpo import MAMLTRPO
from sandbox.rocky.tf.policies.maml_minimal_gauss_mlp_policy import MAMLGaussianMLPPolicy
from sandbox.rocky.tf.envs.base import TfEnv
from rllab.baselines.linear_feature_baseline import LinearFeatureBaseline
from rllab.envs.unity_env import Uni... | 26.382022 | 115 | 0.698041 |
0c3e6a5dc8df84336cd1c5721f73767ed7f84506 | 279 | py | Python | src/python/rmgame/utils.py | adrianogil/rmgame | 30ce5bef511177ecd742177b852b6dd07b6ab2e2 | [
"MIT"
] | null | null | null | src/python/rmgame/utils.py | adrianogil/rmgame | 30ce5bef511177ecd742177b852b6dd07b6ab2e2 | [
"MIT"
] | null | null | null | src/python/rmgame/utils.py | adrianogil/rmgame | 30ce5bef511177ecd742177b852b6dd07b6ab2e2 | [
"MIT"
] | null | null | null | from random import randint
def capitalize(s):
return s[0].upper() + s[1:]
def is_int(s):
try:
int(s)
return True
except ValueError:
pass
return False
def get_random(l):
'''
list l
'''
return l[randint(0, len(l)-1)] | 14.684211 | 34 | 0.53405 |
b0d8c5f1d33a177c0fe8276c581ca7e78b21897b | 2,312 | py | Python | tests/test_zip.py | wq/itertable | 556ade59495946d659468213fa7ff36cf155409e | [
"MIT"
] | 16 | 2019-11-11T12:50:32.000Z | 2022-03-25T08:52:07.000Z | tests/test_zip.py | wq/itertable | 556ade59495946d659468213fa7ff36cf155409e | [
"MIT"
] | 3 | 2019-09-24T14:14:04.000Z | 2021-11-22T02:17:54.000Z | tests/test_zip.py | wq/itertable | 556ade59495946d659468213fa7ff36cf155409e | [
"MIT"
] | 2 | 2021-11-08T07:38:31.000Z | 2021-12-01T00:01:41.000Z | from itertable import (
ZipFileLoader, ZipNetLoader,
CsvParser, ExcelParser, TupleMapper, BaseIter
)
from .base import IoTestCase
from itertable.exceptions import LoadFailed
import httpretty
class CsvZipFileIter(ZipFileLoader, CsvParser, TupleMapper, BaseIter):
inner_binary = CsvParser.binary
class Exce... | 29.641026 | 79 | 0.682093 |
34a747f93e4e36c6652eeec305c2a5341587dc71 | 2,811 | py | Python | tests/env/packages/env_test_attrs.py | patkan/foxbms-2 | 329216a5b0739362512b4c744975a136f674f60c | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 47 | 2021-04-01T21:14:55.000Z | 2022-03-30T12:19:18.000Z | tests/env/packages/env_test_attrs.py | patkan/foxbms-2 | 329216a5b0739362512b4c744975a136f674f60c | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 6 | 2021-06-01T08:25:54.000Z | 2021-11-17T07:55:05.000Z | tests/env/packages/env_test_attrs.py | patkan/foxbms-2 | 329216a5b0739362512b4c744975a136f674f60c | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 24 | 2021-04-01T21:15:04.000Z | 2022-03-29T06:18:10.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010 - 2021, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | 34.703704 | 98 | 0.726432 |
23b85ebbfa48ac72c0db77d6448a1adcabd1bc8f | 3,106 | py | Python | models/db.py | noraj/Kvasir | a5b3775184a8343240e1154a1f762f75df04dc0a | [
"BSD-3-Clause"
] | 194 | 2015-01-04T23:06:42.000Z | 2022-02-11T17:39:28.000Z | models/db.py | noraj/Kvasir | a5b3775184a8343240e1154a1f762f75df04dc0a | [
"BSD-3-Clause"
] | 26 | 2015-01-02T19:15:39.000Z | 2020-11-11T17:58:34.000Z | models/db.py | noraj/Kvasir | a5b3775184a8343240e1154a1f762f75df04dc0a | [
"BSD-3-Clause"
] | 65 | 2015-01-19T08:30:51.000Z | 2020-12-28T23:53:31.000Z | # -*- coding: utf-8 -*-
##--------------------------------------#
## Kvasir
##
## (c) 2010-2014 Cisco Systems, Inc.
## (c) 2015 Kurt Grutzmacher
##
## Database configuration
##
## Author: Kurt Grutzmacher <grutz@jingojango.net>
##--------------------------------------#
from gluon.tools import Mail, Auth, Crud, Servic... | 41.413333 | 106 | 0.652286 |
d3353230eb8b594477ca56924b23f0998b323066 | 4,673 | py | Python | app/migrations/0001_initial.py | kennedybabu/peer-to-peer | ffa7f7a9654237fc6b90befdd4cc81228af4c700 | [
"Unlicense"
] | null | null | null | app/migrations/0001_initial.py | kennedybabu/peer-to-peer | ffa7f7a9654237fc6b90befdd4cc81228af4c700 | [
"Unlicense"
] | null | null | null | app/migrations/0001_initial.py | kennedybabu/peer-to-peer | ffa7f7a9654237fc6b90befdd4cc81228af4c700 | [
"Unlicense"
] | null | null | null | # Generated by Django 4.0 on 2022-01-07 07:22
import django.contrib.auth.models
import django.contrib.auth.validators
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
de... | 64.902778 | 329 | 0.64862 |
20da4f4bf869a7b6b0fb2091f3f46028cf9a8923 | 450 | py | Python | venv/Scripts/pip3.8-script.py | Ammar-Raneez/Craigslist_Scraper | 4d8ef7d65f6cb4bbc7a461828ab02ec9e3006f71 | [
"MIT"
] | null | null | null | venv/Scripts/pip3.8-script.py | Ammar-Raneez/Craigslist_Scraper | 4d8ef7d65f6cb4bbc7a461828ab02ec9e3006f71 | [
"MIT"
] | 5 | 2021-03-30T14:07:38.000Z | 2021-09-22T19:31:48.000Z | venv/Scripts/pip3.8-script.py | Ammar-Raneez/Craigslist_Scraper | 4d8ef7d65f6cb4bbc7a461828ab02ec9e3006f71 | [
"MIT"
] | null | null | null | #!"C:\Users\Ammuuu\Downloads\learning\Main\Main Projects\craigslistClone\venv\Scripts\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3.8'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-sc... | 34.615385 | 97 | 0.68 |
eb947ab6d4bd7505da398903a0914eb65957b441 | 1,485 | py | Python | setup.py | motconmeobuon/retinanet-examples | d83274e57d7f271b395b080765e540dc45f6c59f | [
"BSD-3-Clause"
] | null | null | null | setup.py | motconmeobuon/retinanet-examples | d83274e57d7f271b395b080765e540dc45f6c59f | [
"BSD-3-Clause"
] | null | null | null | setup.py | motconmeobuon/retinanet-examples | d83274e57d7f271b395b080765e540dc45f6c59f | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
setup(
name='odtk',
version='0.2.6',
description='Fast and accurate single shot object detector',
author = 'NVIDIA Corporation',
packages=['odtk', 'odtk.backbones'],
ext_modules=[CUDAExtension('odtk... | 43.676471 | 148 | 0.618182 |
fbf9e8ca7b1a67f358fb57ea5a4a225924174d8c | 2,871 | py | Python | orchestrator/api/api_v1/api.py | Georgi2704/orchestrator-core | bf072caf6b83ac8401426879df41e967f33f9f85 | [
"Apache-2.0"
] | 15 | 2021-02-18T15:30:25.000Z | 2022-02-19T18:57:51.000Z | orchestrator/api/api_v1/api.py | Georgi2704/orchestrator-core | bf072caf6b83ac8401426879df41e967f33f9f85 | [
"Apache-2.0"
] | 70 | 2021-02-24T17:59:23.000Z | 2022-03-31T08:24:56.000Z | orchestrator/api/api_v1/api.py | Georgi2704/orchestrator-core | bf072caf6b83ac8401426879df41e967f33f9f85 | [
"Apache-2.0"
] | 6 | 2021-02-23T18:10:15.000Z | 2022-02-15T16:07:38.000Z | # Copyright 2019-2020 SURF.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | 32.625 | 115 | 0.745385 |
5a02343253cd757f2f318a36bdc3c826e7b341ad | 737 | py | Python | examples/asset_accept_example.py | Fkazi14/algorand-sdk | 24956706a7d3821abc85f5ddbde024d46d4e3f16 | [
"MIT"
] | null | null | null | examples/asset_accept_example.py | Fkazi14/algorand-sdk | 24956706a7d3821abc85f5ddbde024d46d4e3f16 | [
"MIT"
] | null | null | null | examples/asset_accept_example.py | Fkazi14/algorand-sdk | 24956706a7d3821abc85f5ddbde024d46d4e3f16 | [
"MIT"
] | null | null | null |
# Example: accepting assets
from algosdk import account
from algosdk.future import transaction
private_key, address = account.generate_account()
fee_per_byte = 10
first_valid_round = 1000
last_valid_round = 2000
genesis_hash = "SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI="
receiver = address # to start accepting as... | 29.48 | 97 | 0.789688 |
f1d5c7ed4aba8349aa101e7f4e98c864f617e963 | 521 | py | Python | esphome/components/daikin/climate.py | huhuhugo1/esphome | eb895d2095861a4d51f1a5fcd582a97389c27b4f | [
"MIT"
] | null | null | null | esphome/components/daikin/climate.py | huhuhugo1/esphome | eb895d2095861a4d51f1a5fcd582a97389c27b4f | [
"MIT"
] | null | null | null | esphome/components/daikin/climate.py | huhuhugo1/esphome | eb895d2095861a4d51f1a5fcd582a97389c27b4f | [
"MIT"
] | null | null | null | import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import climate_ir
from esphome.const import CONF_ID
AUTO_LOAD = ['climate_ir']
daikin_ns = cg.esphome_ns.namespace('daikin')
DaikinClimate = daikin_ns.class_('DaikinClimate', climate_ir.ClimateIR)
CONFIG_SCHEMA = climate_ir.C... | 27.421053 | 71 | 0.790787 |
221f25eca5b0cc68e715d4fcf6e4b675a1160561 | 758 | py | Python | buzzbrewclub/notifications/views.py | tim-schilling/buzzbrewclub | 4851975e880875d686ff4645817a42a4fdef240e | [
"MIT"
] | null | null | null | buzzbrewclub/notifications/views.py | tim-schilling/buzzbrewclub | 4851975e880875d686ff4645817a42a4fdef240e | [
"MIT"
] | 5 | 2020-06-06T01:02:29.000Z | 2021-06-10T19:32:37.000Z | buzzbrewclub/notifications/views.py | tim-schilling/buzzbrewclub | 4851975e880875d686ff4645817a42a4fdef240e | [
"MIT"
] | null | null | null | from django.contrib.auth.mixins import LoginRequiredMixin
from django.urls import reverse
from django.views.generic import UpdateView
from .models import (
NotificationSettings,
)
class NotificationSettingsUpdateView(LoginRequiredMixin, UpdateView):
model = NotificationSettings
fields = ['auto_subscribe... | 27.071429 | 76 | 0.717678 |
150c001a83f60e5835d4e12048d3a75554a100f3 | 3,762 | py | Python | unicorn/core.py | ddorn/unicorn-colors | d4140c7007c2a57c03179784f26501fec720e2d9 | [
"MIT"
] | null | null | null | unicorn/core.py | ddorn/unicorn-colors | d4140c7007c2a57c03179784f26501fec720e2d9 | [
"MIT"
] | null | null | null | unicorn/core.py | ddorn/unicorn-colors | d4140c7007c2a57c03179784f26501fec720e2d9 | [
"MIT"
] | null | null | null | import contextlib
from typing import Tuple, Optional
import colour
try:
from .terminalsize import get_terminal_size
except (ModuleNotFoundError, ImportError):
from terminalsize import get_terminal_size
import colorama
colorama.init()
ESC = '\033'
CLEARFORE = ESC + '[39m'
CLEARBACK = ESC + '[49m'
def color... | 24.913907 | 115 | 0.556885 |
e246aa9a61d196bbaa8ee9acfbc7336332fdc5c9 | 5,628 | py | Python | qiskit/transpiler/passes/scheduling/alap.py | TheGupta2012/qiskit-terra | 5ea6e9557655b144228c29d7099375f5d2c91120 | [
"Apache-2.0"
] | 1,599 | 2018-07-10T10:59:12.000Z | 2022-03-31T23:56:25.000Z | qiskit/transpiler/passes/scheduling/alap.py | TheGupta2012/qiskit-terra | 5ea6e9557655b144228c29d7099375f5d2c91120 | [
"Apache-2.0"
] | 5,244 | 2018-07-10T06:20:13.000Z | 2022-03-31T22:18:48.000Z | qiskit/transpiler/passes/scheduling/alap.py | TheGupta2012/qiskit-terra | 5ea6e9557655b144228c29d7099375f5d2c91120 | [
"Apache-2.0"
] | 1,409 | 2018-07-10T02:16:12.000Z | 2022-03-31T09:01:32.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 42.315789 | 100 | 0.647122 |
33515bca3183bcf216af617c12bbd8b06e097643 | 10,554 | py | Python | configs/common/FileSystemConfig.py | ronaldof1s1/gem5 | 418ac1d9ab21049f6d21476bc66f08467c29a9e3 | [
"BSD-3-Clause"
] | 9 | 2015-12-10T12:49:27.000Z | 2020-03-27T18:44:35.000Z | configs/common/FileSystemConfig.py | ronaldof1s1/gem5 | 418ac1d9ab21049f6d21476bc66f08467c29a9e3 | [
"BSD-3-Clause"
] | 7 | 2020-05-24T17:33:47.000Z | 2020-06-25T03:21:50.000Z | configs/common/FileSystemConfig.py | ronaldof1s1/gem5 | 418ac1d9ab21049f6d21476bc66f08467c29a9e3 | [
"BSD-3-Clause"
] | 14 | 2015-04-26T10:09:01.000Z | 2020-11-23T08:53:18.000Z | # Copyright (c) 2019 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | 42.385542 | 79 | 0.603184 |
97ca794cdf9af5a3cb400f845479575013f13d61 | 371 | py | Python | simplemooc/courses/urls.py | HelioSaraiva/ComnunityMooc_Django1.10 | 89af4232ea4ab92a8150799eae24f1d0ad514e6f | [
"BSD-3-Clause"
] | null | null | null | simplemooc/courses/urls.py | HelioSaraiva/ComnunityMooc_Django1.10 | 89af4232ea4ab92a8150799eae24f1d0ad514e6f | [
"BSD-3-Clause"
] | null | null | null | simplemooc/courses/urls.py | HelioSaraiva/ComnunityMooc_Django1.10 | 89af4232ea4ab92a8150799eae24f1d0ad514e6f | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url, include
from simplemooc.courses.views import index, details, enrollment
urlpatterns = [
url(r'^$', index, name = 'index'),
#url(r'^(?P<pk>\d+)/$', details, name = 'details'),
url(r'^(?P<slug>[\w_-]+)/$', details, name = 'details'),
url(r'^(?P<slug>[\w_-]+)/inscri... | 24.733333 | 76 | 0.58221 |
7b443c8f7fa19307b9a833a456473a9a811c2e29 | 190 | py | Python | back-end/erasmail/emails/admin.py | SamirM-BE/ErasMail | 88602a039ae731ca8566c96c7c4d2635f82a07a5 | [
"Apache-2.0"
] | 7 | 2021-02-06T21:06:23.000Z | 2022-01-31T09:33:26.000Z | back-end/erasmail/emails/admin.py | SamirM-BE/ErasMail | 88602a039ae731ca8566c96c7c4d2635f82a07a5 | [
"Apache-2.0"
] | null | null | null | back-end/erasmail/emails/admin.py | SamirM-BE/ErasMail | 88602a039ae731ca8566c96c7c4d2635f82a07a5 | [
"Apache-2.0"
] | 5 | 2021-05-07T15:35:25.000Z | 2022-03-21T09:11:24.000Z | from django.contrib import admin
from .models import Attachment, EmailHeaders, Newsletter
admin.site.register(EmailHeaders)
admin.site.register(Attachment)
admin.site.register(Newsletter)
| 23.75 | 56 | 0.836842 |
7ef7b16c9efe24b01b1d5ab3747ef84fc0757b78 | 2,527 | py | Python | test/tweet_collector_test.py | zaman-lab/tweet-collection-py | 9d18b352251c7f6c47685077e606c762a6e039ea | [
"MIT"
] | 1 | 2019-12-04T04:01:26.000Z | 2019-12-04T04:01:26.000Z | test/tweet_collector_test.py | zaman-lab/tweet-collection-py | 9d18b352251c7f6c47685077e606c762a6e039ea | [
"MIT"
] | null | null | null | test/tweet_collector_test.py | zaman-lab/tweet-collection-py | 9d18b352251c7f6c47685077e606c762a6e039ea | [
"MIT"
] | null | null | null | from pprint import pprint
from tweepy import Stream
from app.tweet_collector import TweetCollector
from conftest import MOCK_TOPICS_CSV_FILEPATH
def test_tweet_collector(listener, handleless_listener):
assert "on_status" in dir(listener)
assert "collect_in_batches" in dir(listener)
assert listener.dev_ha... | 50.54 | 172 | 0.779976 |
6bcb4e286e5f770f927445c27120b18dcef47969 | 409 | py | Python | Lib/site-packages/readchar/readchar_linux.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 102 | 2015-01-10T23:37:21.000Z | 2022-02-28T03:47:00.000Z | readchar/readchar_linux.py | kleinjakob/python-readchar | 549c17ac9fd93ec3ac0b3d75168066b46560aadf | [
"MIT"
] | 64 | 2015-01-07T01:15:29.000Z | 2022-03-23T13:10:50.000Z | Lib/site-packages/readchar/readchar_linux.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 48 | 2015-01-12T07:27:35.000Z | 2022-01-21T00:04:13.000Z | # -*- coding: utf-8 -*-
# Initially taken from:
# http://code.activestate.com/recipes/134892/
# Thanks to Danny Yoo
import sys
import termios
import tty
def readchar():
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(sys.stdin.fileno())
ch = sys.stdin.read(1)
... | 21.526316 | 62 | 0.657702 |
163dd9bb14938cea14dd54870ac832b48cb69ee3 | 1,414 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/search.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/search.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/search.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
print([1, 2, 3, 2].index(2)) # => 1
print([i for i, value in enumerate([1, 2, 3, 2, 4, 2]) if value == 2]) # => [1, 3, 5]
print([1, 2, 3, 2, 4, 2].count(2)) # => 3
programmers = {"Michael": "Python",
"Tim": "C+... | 23.966102 | 86 | 0.570721 |
c99d85707040e852b924f3b50695e6208ad82ddf | 3,483 | py | Python | venv/Lib/site-packages/pandas/tests/series/methods/test_clip.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/series/methods/test_clip.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pandas/tests/series/methods/test_clip.py | OliviaNabbosa89/Disaster_Responses | 1e66d77c303cec685dfc2ca94f4fca4cc9400570 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
import pandas as pd
from pandas import Series, Timestamp, isna, notna
import pandas._testing as tm
class TestSeriesClip:
def test_clip(self, datetime_series):
val = datetime_series.median()
assert datetime_series.clip(lower=val).min() == val
... | 34.83 | 89 | 0.544933 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.