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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49b6084783e543ccee0a668b59af47189b4cf26f | 802 | py | Python | oauth_provider/managers.py | articheck/django-oauth-plus | ed4201a87ec07fc5bbe52d618a62d6c311e810e4 | [
"BSD-3-Clause"
] | null | null | null | oauth_provider/managers.py | articheck/django-oauth-plus | ed4201a87ec07fc5bbe52d618a62d6c311e810e4 | [
"BSD-3-Clause"
] | 1 | 2019-06-21T07:42:46.000Z | 2019-06-21T17:49:00.000Z | oauth_provider/managers.py | articheck/django-oauth-plus | ed4201a87ec07fc5bbe52d618a62d6c311e810e4 | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
class TokenManager(models.Manager):
def create_token(self, consumer, token_type, timestamp, scope,
user=None, callback=None, callback_confirmed=False):
"""Shortcut to create a token with random key/secret."""
token, created = self.get_or_create(consumer=con... | 44.555556 | 82 | 0.483791 |
ee0273207a272d23f8177822b231a3aede7b7ea7 | 7,187 | py | Python | mercury/system/pubsub.py | Accenture/mercury-python | 1119916b1046c519d1588a7fe6bf924722ca0e0a | [
"Apache-2.0"
] | 6 | 2019-04-30T17:32:39.000Z | 2021-08-21T10:56:53.000Z | mercury/system/pubsub.py | Accenture/mercury-python | 1119916b1046c519d1588a7fe6bf924722ca0e0a | [
"Apache-2.0"
] | 2 | 2019-09-23T04:09:51.000Z | 2020-03-25T14:58:56.000Z | mercury/system/pubsub.py | Accenture/mercury-python | 1119916b1046c519d1588a7fe6bf924722ca0e0a | [
"Apache-2.0"
] | 7 | 2019-05-10T00:35:17.000Z | 2020-11-22T11:16:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018-2021 Accenture Technology
#
# 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
#... | 43.295181 | 120 | 0.57284 |
91e75e80a0a7e77bc0205ef7f4f153c2f4ddaa8b | 609 | py | Python | libs/mpl/preprocessed/preprocess_vector.py | jmuskaan72/Boost | 047e36c01841a8cd6a5c74d4e3034da46e327bc1 | [
"BSL-1.0"
] | 198 | 2015-01-13T05:47:18.000Z | 2022-03-09T04:46:46.000Z | libs/mpl/preprocessed/preprocess_vector.py | xiaoliang2121/Boost | fc90c3fde129c62565c023f091eddc4a7ed9902b | [
"BSL-1.0"
] | 4 | 2015-03-19T08:23:23.000Z | 2019-06-24T07:48:47.000Z | libs/mpl/preprocessed/preprocess_vector.py | xiaoliang2121/Boost | fc90c3fde129c62565c023f091eddc4a7ed9902b | [
"BSL-1.0"
] | 139 | 2015-01-15T20:09:31.000Z | 2022-01-31T15:21:16.000Z |
# Copyright Aleksey Gurtovoy 2001-2006
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# See http://www.boost.org/libs/mpl for documentation.
# $Id: preprocess_vector.py 49269 2008-10-11 06:30:50Z a... | 27.681818 | 71 | 0.656814 |
c2f7264a7d7760e990c773dda04f1fad709004d3 | 268 | py | Python | python/testData/inspections/PyDunderSlotsInspection/inheritedClassAttrAssignmentAndOwnWithDictAndInheritedWithAttrSlotsPy3.py | Tasemo/intellij-community | 50aeaf729b7073e91c7c77487a1f155e0dfe3fcd | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/inspections/PyDunderSlotsInspection/inheritedClassAttrAssignmentAndOwnWithDictAndInheritedWithAttrSlotsPy3.py | Tasemo/intellij-community | 50aeaf729b7073e91c7c77487a1f155e0dfe3fcd | [
"Apache-2.0"
] | null | null | null | python/testData/inspections/PyDunderSlotsInspection/inheritedClassAttrAssignmentAndOwnWithDictAndInheritedWithAttrSlotsPy3.py | Tasemo/intellij-community | 50aeaf729b7073e91c7c77487a1f155e0dfe3fcd | [
"Apache-2.0"
] | null | null | null | class B(object):
attr = 'baz'
__slots__ = ['f', <warning descr="'attr' in __slots__ conflicts with a class variable">'attr'</warning>]
class C(B):
__slots__ = ['foo', 'bar', '__dict__']
C.attr = 'spam'
print(C.attr)
c = C()
c.attr = 'spam'
print(c.attr) | 20.615385 | 108 | 0.61194 |
f8b8ee9a038bd9d51b10fd9715e46ee72605e272 | 17,368 | py | Python | opacus/optimizers/optimizer.py | RQuispeC/opacus | 5c83d59fc169e93667946204f7a6859827a38ace | [
"Apache-2.0"
] | null | null | null | opacus/optimizers/optimizer.py | RQuispeC/opacus | 5c83d59fc169e93667946204f7a6859827a38ace | [
"Apache-2.0"
] | null | null | null | opacus/optimizers/optimizer.py | RQuispeC/opacus | 5c83d59fc169e93667946204f7a6859827a38ace | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
import logging
from typing import Callable, List, Optional, Union
import torch
from opacus.optimizers.utils import params
from torch import nn
from torch.optim import Optimizer
logger = logging.getLogger(__name__)
def _mark_as_processed(obj: Union[torch.Tensor, List[torch.Tensor... | 35.229209 | 93 | 0.624885 |
287c160f911634b187576b11fa7b962506b0c201 | 2,027 | py | Python | server/app/views/__init__.py | return-capsule/backend | e899b30b93a4bbcf54c1688db0fcabbcb55fe668 | [
"Apache-2.0"
] | null | null | null | server/app/views/__init__.py | return-capsule/backend | e899b30b93a4bbcf54c1688db0fcabbcb55fe668 | [
"Apache-2.0"
] | null | null | null | server/app/views/__init__.py | return-capsule/backend | e899b30b93a4bbcf54c1688db0fcabbcb55fe668 | [
"Apache-2.0"
] | null | null | null | import boto3, botocore
from functools import wraps
from flask import current_app, abort, request
from flask_restful import Resource
from app.config import Config
def upload_file_to_s3(file, bucket_name, acl="public-read", access_key_id=Config.S3_KEY,
secret_access_key=Config.S3_SECRET):
#... | 25.024691 | 88 | 0.573754 |
2ee39c9b17651f85fa2dc6c3ddf48d46c62e721d | 10,636 | py | Python | google/ads/google_ads/v5/services/hotel_performance_view_service_client.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | 1 | 2021-04-09T04:28:47.000Z | 2021-04-09T04:28:47.000Z | google/ads/google_ads/v5/services/hotel_performance_view_service_client.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v5/services/hotel_performance_view_service_client.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 44.689076 | 124 | 0.660963 |
2804dde5b1df341b802efdd02343bdb9cbbecded | 1,773 | py | Python | int/acapy-backchannel/acapy_backchannel/models/query_result.py | sicpa-dlab/aries-acapy-plugin-didcomm-uniresolver | 93760877422c8021385170cb9747caadeb47e149 | [
"Apache-2.0"
] | null | null | null | int/acapy-backchannel/acapy_backchannel/models/query_result.py | sicpa-dlab/aries-acapy-plugin-didcomm-uniresolver | 93760877422c8021385170cb9747caadeb47e149 | [
"Apache-2.0"
] | 10 | 2021-04-05T11:33:30.000Z | 2021-05-12T08:40:47.000Z | int/acapy-backchannel/acapy_backchannel/models/query_result.py | sicpa-dlab/aries-acapy-plugin-didcomm-uniresolver | 93760877422c8021385170cb9747caadeb47e149 | [
"Apache-2.0"
] | 1 | 2021-03-01T18:03:32.000Z | 2021-03-01T18:03:32.000Z | from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.query_result_results import QueryResultResults
from ..types import UNSET, Unset
T = TypeVar("T", bound="QueryResult")
@attr.s(auto_attribs=True)
class QueryResult:
""" """
results: Union[Unset, QueryResultResults] = UNSET
... | 29.065574 | 77 | 0.646926 |
a757c33e20641328d39a4074d35ffbf0fd109fb2 | 2,740 | py | Python | vanity.py | N3TC4T/xrp-vanity-generator | 0799545172f3aeef8ed978270a945a3052e01927 | [
"Apache-2.0"
] | null | null | null | vanity.py | N3TC4T/xrp-vanity-generator | 0799545172f3aeef8ed978270a945a3052e01927 | [
"Apache-2.0"
] | null | null | null | vanity.py | N3TC4T/xrp-vanity-generator | 0799545172f3aeef8ed978270a945a3052e01927 | [
"Apache-2.0"
] | 4 | 2019-01-05T17:49:59.000Z | 2019-12-05T07:36:42.000Z | # coding=utf-8
###############################################################################
# Ripple Vanity Address Generator
# !/usr/bin/python
###############################################################################
from __future__ import print_function
import argparse
import multiprocessing
import re
impo... | 27.676768 | 107 | 0.510584 |
001f30a1631a20319d09c9c0237e61299c205ea3 | 12,583 | py | Python | plugins/modules/oci_waas_custom_protection_rule_actions.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_waas_custom_protection_rule_actions.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_waas_custom_protection_rule_actions.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 43.24055 | 160 | 0.625685 |
48bbbb3d4d29cfd38d74953f523d29be12c45a8e | 501 | py | Python | client/verta/verta/_swagger/_public/uac/model/UacDeleteRoleBinding.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/uac/model/UacDeleteRoleBinding.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/uac/model/UacDeleteRoleBinding.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class UacDeleteRoleBinding(BaseType):
def __init__(self, id=None):
required = {
"id": False,
}
self.id = id
for k, v in required.items():
if self[k] is None and v:
raise ValueError('attribute... | 20.875 | 62 | 0.622754 |
6d7ebe9dcabaae6d88b297a474270baf84c3096e | 2,162 | py | Python | part5/test_calc5.py | aniruddha2000/fusion | a6788935f10bb2d88c30e9106ff07202569d77db | [
"Apache-2.0"
] | null | null | null | part5/test_calc5.py | aniruddha2000/fusion | a6788935f10bb2d88c30e9106ff07202569d77db | [
"Apache-2.0"
] | null | null | null | part5/test_calc5.py | aniruddha2000/fusion | a6788935f10bb2d88c30e9106ff07202569d77db | [
"Apache-2.0"
] | 1 | 2021-02-27T13:11:50.000Z | 2021-02-27T13:11:50.000Z | import unittest
from calc5 import *
class LexerTestCase(unittest.TestCase):
def makeLexer(self, text):
lexer = Lexer(text)
return lexer
def test_lexer_integer(self):
lexer = self.makeLexer('10')
token = lexer.get_next_token()
self.assertEqual(token.type, INTEGER)
... | 28.447368 | 67 | 0.623959 |
4d4d5dad105a3ea6c75b0bc44cffac8f198e3acd | 16,768 | py | Python | electrumsv/devices/keepkey/keepkey.py | CherryDT/electrumsv | 6b778b1c363e22286c3e3ef1bc5a2fa56955ac48 | [
"MIT"
] | 1 | 2021-12-28T10:52:11.000Z | 2021-12-28T10:52:11.000Z | electrumsv/devices/keepkey/keepkey.py | SomberNight/electrumsv | 28262e3cab7b73e4960466f8aee252975953acf8 | [
"MIT"
] | null | null | null | electrumsv/devices/keepkey/keepkey.py | SomberNight/electrumsv | 28262e3cab7b73e4960466f8aee252975953acf8 | [
"MIT"
] | null | null | null | # ElectrumSV - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
# Copyright (C) 2019 ElectrumSV developers
#
# 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... | 41.60794 | 98 | 0.610508 |
bb93c13b08e59983b9818d21e309fde3aa69fe34 | 1,740 | py | Python | pyprobml-master/figgen/daft/deepKF.py | storopoli/Machine-Learning-Probalistic | f8617e7b81f4d6c71e72edc40ba11ac746794a95 | [
"MIT"
] | 1 | 2019-03-04T05:43:10.000Z | 2019-03-04T05:43:10.000Z | figgen/daft/deepKF.py | tungk/pyprobml | fb939b92a61f7d3a7e6c28d0b14f58d99a0b07f1 | [
"MIT"
] | null | null | null | figgen/daft/deepKF.py | tungk/pyprobml | fb939b92a61f7d3a7e6c28d0b14f58d99a0b07f1 | [
"MIT"
] | null | null | null | from matplotlib import rc
import matplotlib.pyplot as plt
rc("font", family="serif", size=12)
rc("text", usetex=True)
#rc("text.latex", preamble=open("macros.tex").read())
#rc('text.latex', preamble="\usepackage{amssymb}\usepackage{amsmath}\usepackage{mathrsfs}")
import os
import imp
daft = imp.load_source('daft... | 31.636364 | 93 | 0.627011 |
31027c39f25d2183deb23c3e8d0e7df3068426f0 | 15,950 | py | Python | service/http/tests/test_cli.py | krishsethi19/dffml | 2dd0a9c4a125a9739d27228128bbd381a8e0fef4 | [
"MIT"
] | null | null | null | service/http/tests/test_cli.py | krishsethi19/dffml | 2dd0a9c4a125a9739d27228128bbd381a8e0fef4 | [
"MIT"
] | null | null | null | service/http/tests/test_cli.py | krishsethi19/dffml | 2dd0a9c4a125a9739d27228128bbd381a8e0fef4 | [
"MIT"
] | null | null | null | import os
import json
import pathlib
import tempfile
import contextlib
from http import HTTPStatus
import aiohttp
from dffml.model.slr import SLRModel
from dffml.source.json import JSONSource
from dffml.accuracy import MeanSquaredErrorAccuracy
from dffml import Record, Features, Feature, save, train, accuracy
from df... | 38.2494 | 80 | 0.428966 |
82ee52edc451f5c26c7b801c93b24978589df877 | 3,189 | py | Python | automix/rules/veireTransitionsRule.py | MZehren/Automix | dfaa00a9e7c5c0938c0a9d275c07f3a3e5f87e43 | [
"MIT"
] | 18 | 2020-07-20T01:51:40.000Z | 2022-02-25T07:32:11.000Z | automix/rules/veireTransitionsRule.py | MZehren/Automix | dfaa00a9e7c5c0938c0a9d275c07f3a3e5f87e43 | [
"MIT"
] | 2 | 2021-03-23T03:26:02.000Z | 2021-07-19T12:51:25.000Z | automix/rules/veireTransitionsRule.py | MZehren/Automix | dfaa00a9e7c5c0938c0a9d275c07f3a3e5f87e43 | [
"MIT"
] | 5 | 2021-01-03T15:34:28.000Z | 2022-02-22T06:07:06.000Z | import numpy as np
from automix.rules.rule import Rule
from automix.featureExtraction.lowLevel import CoreFinder
from automix.model.classes.signal import Signal
class VeireTransitionRule(Rule):
"""
The transition occurs on specific locations in the mix:
double drop: on each track the transition is on a d... | 43.094595 | 145 | 0.580433 |
cea2d137622b00efce97da1d3f1288cfcb473820 | 972 | py | Python | mostPopularMovie.py | kratikaswami/Spark-Projects | b1e2ecc561b69aee76ad42fdbb01d89ff582a9de | [
"Apache-2.0"
] | null | null | null | mostPopularMovie.py | kratikaswami/Spark-Projects | b1e2ecc561b69aee76ad42fdbb01d89ff582a9de | [
"Apache-2.0"
] | null | null | null | mostPopularMovie.py | kratikaswami/Spark-Projects | b1e2ecc561b69aee76ad42fdbb01d89ff582a9de | [
"Apache-2.0"
] | null | null | null | from pyspark import SparkConf, SparkContext
def loadMovieNames():
movieNames = {}
with open("path/u.item", encoding = "ISO-8859-1") as f:
for line in f:
fields = line.split('|')
movieNames[int(fields[0])] = fields[1]
return movieNames
def parsedLines(lines):
movieId = l... | 27 | 107 | 0.682099 |
8f640e9791895eded84e04d93f00fd45920e8177 | 9,446 | py | Python | demos/s3/s3server.py | mstojcevich/cyclone | fefdc51dbf25b7470467fc8db6cf96d08191cf28 | [
"Apache-2.0"
] | 254 | 2015-01-01T18:48:46.000Z | 2022-02-24T07:01:15.000Z | demos/s3/s3server.py | mstojcevich/cyclone | fefdc51dbf25b7470467fc8db6cf96d08191cf28 | [
"Apache-2.0"
] | 37 | 2015-01-02T10:57:40.000Z | 2020-12-17T21:55:56.000Z | demos/s3/s3server.py | mstojcevich/cyclone | fefdc51dbf25b7470467fc8db6cf96d08191cf28 | [
"Apache-2.0"
] | 64 | 2015-01-01T18:52:47.000Z | 2022-03-19T21:29:48.000Z | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 a... | 37.484127 | 76 | 0.602583 |
6bcf6b0ed097fdea2e98edc3650b36f355235eb8 | 2,704 | py | Python | weixin/weixin.py | YifeiYang210/crawler_html2pdf | acbf8abee631606fe931d8188a4bd2f4dd6f0b47 | [
"Apache-2.0"
] | 710 | 2017-02-09T10:05:56.000Z | 2019-12-06T08:12:29.000Z | weixin/weixin.py | zhuxuda/python_scripts | e442c25494489a9d75190e985426827f1c18e9bc | [
"Apache-2.0"
] | 33 | 2017-02-10T10:03:33.000Z | 2019-07-18T13:45:19.000Z | weixin/weixin.py | zhuxuda/python_scripts | e442c25494489a9d75190e985426827f1c18e9bc | [
"Apache-2.0"
] | 627 | 2017-02-10T05:04:56.000Z | 2019-12-12T07:53:14.000Z | # encoding: utf-8
import json
import re
import time
from http.cookies import SimpleCookie
import jieba.analyse
import matplotlib.pyplot as plt
import requests
from scipy.misc import imread
from wordcloud import WordCloud
from pymongo import MongoClient
class Conn(object):
client = MongoClient('localhost', 2701... | 24.581818 | 107 | 0.614645 |
8c09ad963573e7c4a489f75a190ba36193247d1f | 1,911 | py | Python | QLabel/demo01.py | Wananbrstl/my_pyqt5_test | 68f5ccf09fd5e96a3e1cb4118b49bc53f6a75822 | [
"MIT"
] | 1 | 2021-07-27T14:13:43.000Z | 2021-07-27T14:13:43.000Z | QLabel/demo01.py | Wananbrstl/my_pyqt5_test | 68f5ccf09fd5e96a3e1cb4118b49bc53f6a75822 | [
"MIT"
] | null | null | null | QLabel/demo01.py | Wananbrstl/my_pyqt5_test | 68f5ccf09fd5e96a3e1cb4118b49bc53f6a75822 | [
"MIT"
] | null | null | null | #! /home/lbn/miniconda3/envs/pyqt/bin/python
# encoding : utf-8
import sys
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
class my_label(QLabel):
def __init__(self, *args, antiliasing=True, **kwargs):
super(my_label, self).__init__(*args, **kwargs)
self.Antiali... | 34.745455 | 116 | 0.658817 |
77fb2e701987e765b89e98f4f241c9281bf5381d | 4,192 | py | Python | airflow/providers/datadog/sensors/datadog.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 15,947 | 2019-01-05T13:51:02.000Z | 2022-03-31T23:33:16.000Z | airflow/providers/datadog/sensors/datadog.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 14,603 | 2019-01-05T09:43:19.000Z | 2022-03-31T23:11:59.000Z | airflow/providers/datadog/sensors/datadog.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 8,429 | 2019-01-05T19:45:47.000Z | 2022-03-31T22:13:01.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... | 40.699029 | 93 | 0.696803 |
0d087eb1d91bb00190c6a3b8381d7e082d80c292 | 2,720 | py | Python | meetings_management/migrations/0003_auto_20170505_2142.py | lfbos/meeting_room_management | 5fe0282925ec9b69806e6a351bcc4c6904a00bed | [
"MIT"
] | 1 | 2017-05-22T23:02:54.000Z | 2017-05-22T23:02:54.000Z | meetings_management/migrations/0003_auto_20170505_2142.py | lfbos/meeting_room_management | 5fe0282925ec9b69806e6a351bcc4c6904a00bed | [
"MIT"
] | null | null | null | meetings_management/migrations/0003_auto_20170505_2142.py | lfbos/meeting_room_management | 5fe0282925ec9b69806e6a351bcc4c6904a00bed | [
"MIT"
] | 3 | 2017-06-12T03:15:40.000Z | 2019-11-22T18:44:49.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-05 21:42
from __future__ import unicode_literals
import datetime
import django.contrib.postgres.fields
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import ... | 46.101695 | 171 | 0.650735 |
b03eef1f11a7238bc5c1f9604307dddd8d8191fc | 9,201 | py | Python | tests/test_wificontrol.py | TopperBG/pywificontrol | b4e4e6b99b75878a3b8b09b346e5270a866ccf51 | [
"BSD-3-Clause"
] | 115 | 2017-10-19T17:23:13.000Z | 2022-02-01T21:54:45.000Z | tests/test_wificontrol.py | TopperBG/pywificontrol | b4e4e6b99b75878a3b8b09b346e5270a866ccf51 | [
"BSD-3-Clause"
] | 8 | 2017-10-21T03:56:33.000Z | 2022-01-04T12:18:13.000Z | tests/test_wificontrol.py | TopperBG/pywificontrol | b4e4e6b99b75878a3b8b09b346e5270a866ccf51 | [
"BSD-3-Clause"
] | 46 | 2017-10-21T02:17:33.000Z | 2022-01-15T20:53:18.000Z | # Written by Ivan Sapozhkov and Denis Chagin <denis.chagin@emlid.com>
#
# Copyright (c) 2016, Emlid Limited
# All rights reserved.
#
# Redistribution and use in source and binary forms,
# with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code ... | 38.3375 | 94 | 0.716335 |
935e9eb3da134ef7a884eb05d96c06c9b29f9ac1 | 509 | py | Python | video/migrations/0007_auto_20190614_0943.py | scintiller/OnlineJudge | 4e66da0e366c8b950a1ccae2b435b81d9fe07e6c | [
"MIT"
] | null | null | null | video/migrations/0007_auto_20190614_0943.py | scintiller/OnlineJudge | 4e66da0e366c8b950a1ccae2b435b81d9fe07e6c | [
"MIT"
] | 6 | 2020-06-05T21:37:42.000Z | 2022-01-13T01:19:55.000Z | video/migrations/0007_auto_20190614_0943.py | scintiller/OnlineJudge | 4e66da0e366c8b950a1ccae2b435b81d9fe07e6c | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-06-14 09:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('video', '0006_auto_20190614_0923'),
]
operations = [
migrations.AlterField(
model_name='solutio... | 25.45 | 134 | 0.656189 |
ffa88825b8361686f9532a474d3d9fd82e993b1d | 593 | py | Python | commerce/migrations/0043_auto_20201130_2238.py | PragmaticMates/django-commerce | b992bf4c81ca6dfaad9ccd423d25fba9d255f159 | [
"Apache-2.0"
] | 4 | 2017-09-08T19:22:19.000Z | 2021-12-21T17:55:29.000Z | commerce/migrations/0043_auto_20201130_2238.py | PragmaticMates/django-commerce | b992bf4c81ca6dfaad9ccd423d25fba9d255f159 | [
"Apache-2.0"
] | null | null | null | commerce/migrations/0043_auto_20201130_2238.py | PragmaticMates/django-commerce | b992bf4c81ca6dfaad9ccd423d25fba9d255f159 | [
"Apache-2.0"
] | 1 | 2021-10-31T06:31:18.000Z | 2021-10-31T06:31:18.000Z | # Generated by Django 2.2.4 on 2020-11-30 21:38
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('commerce', '0042_auto_20... | 26.954545 | 114 | 0.677909 |
aa35e6db53aa9cf1319a4265030f9a108cf28015 | 23,165 | py | Python | samples/client/petstore/python/swagger_client/apis/user_api.py | s4id/swagger-codegen | 084e7f7199543a1349e96f49cb54d808051d78aa | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/python/swagger_client/apis/user_api.py | s4id/swagger-codegen | 084e7f7199543a1349e96f49cb54d808051d78aa | [
"Apache-2.0"
] | 5 | 2015-10-22T19:18:35.000Z | 2016-03-10T16:52:14.000Z | samples/client/petstore/python/swagger_client/apis/user_api.py | s4id/swagger-codegen | 084e7f7199543a1349e96f49cb54d808051d78aa | [
"Apache-2.0"
] | 1 | 2021-11-08T19:37:36.000Z | 2021-11-08T19:37:36.000Z | # coding: utf-8
"""
UserApi.py
Copyright 2015 SmartBear Software
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 a... | 35.151745 | 105 | 0.518757 |
b8457125704cbf98a6c86aecad844188b710377b | 5,688 | py | Python | InnerEye/ML/Histopathology/datasets/panda_dataset.py | faz1993/InnerEye-DeepLearning | fb258d5c9a3ba18565b5a67e7ac1f00127d9ecb9 | [
"MIT"
] | 402 | 2020-09-22T16:38:16.000Z | 2022-03-30T09:56:03.000Z | InnerEye/ML/Histopathology/datasets/panda_dataset.py | wensincai/InnerEye-DeepLearning | ccb53d01ad0f1c20336588c0066059b8de5266fd | [
"MIT"
] | 259 | 2020-09-23T09:32:33.000Z | 2022-03-30T18:15:01.000Z | InnerEye/ML/Histopathology/datasets/panda_dataset.py | wensincai/InnerEye-DeepLearning | ccb53d01ad0f1c20336588c0066059b8de5266fd | [
"MIT"
] | 112 | 2020-09-23T00:12:58.000Z | 2022-03-31T07:39:55.000Z | # ------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -------------------------------------------------------------------... | 46.243902 | 100 | 0.654184 |
1ff341ca47a82fdd43bc248c14e3960133a00392 | 13,695 | py | Python | mdMakelocal.py | ludos1978/Markdown_MakeLocal | 473248e584d08c2404e7ea5bcf4baa1c8f4526aa | [
"MIT"
] | 1 | 2021-12-07T19:56:48.000Z | 2021-12-07T19:56:48.000Z | mdMakelocal.py | ludos1978/Markdown_MakeLocal | 473248e584d08c2404e7ea5bcf4baa1c8f4526aa | [
"MIT"
] | null | null | null | mdMakelocal.py | ludos1978/Markdown_MakeLocal | 473248e584d08c2404e7ea5bcf4baa1c8f4526aa | [
"MIT"
] | null | null | null | import os, sys, re
import requests
import glob
import argparse
import uuid
import hashlib
import markdown
import mimetypes
import threading
import lxml.etree
import urllib.parse
import time
class _Getch:
"""Gets a single character from standard input. Does not echo to the
screen."""
def __init__(self):
... | 43.066038 | 198 | 0.601022 |
14b77b1df6d3015b8155039d6af48da5a868b289 | 1,242 | py | Python | DeleteBrowserHistory/runner.py | sabyasachisome/Delete-Browser-Hist | 6cb647e2609ecd6236b3d5fb2789086c3837c6ee | [
"MIT"
] | null | null | null | DeleteBrowserHistory/runner.py | sabyasachisome/Delete-Browser-Hist | 6cb647e2609ecd6236b3d5fb2789086c3837c6ee | [
"MIT"
] | null | null | null | DeleteBrowserHistory/runner.py | sabyasachisome/Delete-Browser-Hist | 6cb647e2609ecd6236b3d5fb2789086c3837c6ee | [
"MIT"
] | null | null | null | from FetchData import fetchData as fetch
from TransactData import transactions as transact
from sys import exit
if __name__=="__main__":
try:
# get connection object
configObj=fetch.getConfig()
con,cur=fetch.getConnection(configObj)
# get table and where condition... | 34.5 | 92 | 0.588567 |
82edeefed475816cffb1ae1d250af3a218ccb8a6 | 3,109 | py | Python | common/rl/envs/taxi.py | rotem94/MCTS-T- | b15a1e3ac4210fa74d3c3d1f8f31a03b02b6eb91 | [
"MIT"
] | 8 | 2018-07-18T05:43:18.000Z | 2022-02-08T16:12:17.000Z | common/rl/envs/taxi.py | rotem94/MCTS-T- | b15a1e3ac4210fa74d3c3d1f8f31a03b02b6eb91 | [
"MIT"
] | 1 | 2022-02-06T12:16:09.000Z | 2022-02-07T09:41:19.000Z | src/rl/envs/taxi.py | tmoer/cursus | 62c4aa793205294d5b3a99d192e9b6311f4d34a6 | [
"MIT"
] | 4 | 2018-05-29T23:32:40.000Z | 2021-05-22T13:40:55.000Z | # -*- coding: utf-8 -*-
"""
Taxi Env
@author: thomas
"""
import numpy
import random
import gym
class Taxi():
''' '''
def __init__(self):
self.size = numpy.array([4,4])
self.landmarks = numpy.array([[0.0, 0.0], [0.0, 4.0], [3.0, 0.0], [4.0, 4.0]])
self.walls = numpy.array([[1.0, 2.... | 33.793478 | 104 | 0.543905 |
a2573ed1055137ade45e2117fbff8e8296fe7314 | 127 | py | Python | weatherapp/admin.py | Ashira66/OWM_weatherapp | d8f50d8e97f255dd563182153206e29f8c15c2ed | [
"MIT"
] | null | null | null | weatherapp/admin.py | Ashira66/OWM_weatherapp | d8f50d8e97f255dd563182153206e29f8c15c2ed | [
"MIT"
] | null | null | null | weatherapp/admin.py | Ashira66/OWM_weatherapp | d8f50d8e97f255dd563182153206e29f8c15c2ed | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import weatherdata
admin.site.register(weatherdata)
# Register your models here.
| 25.4 | 32 | 0.826772 |
27f66b3652c73df35642512455591c7046793b31 | 8,434 | py | Python | libs/utils/augmentation.py | NinV/facial-landmark-detection | 45fc33ed83e3fd8793cf3a87b796940f9b6522aa | [
"MIT"
] | 1 | 2021-12-18T14:46:41.000Z | 2021-12-18T14:46:41.000Z | libs/utils/augmentation.py | NinV/facial-landmark-detection | 45fc33ed83e3fd8793cf3a87b796940f9b6522aa | [
"MIT"
] | null | null | null | libs/utils/augmentation.py | NinV/facial-landmark-detection | 45fc33ed83e3fd8793cf3a87b796940f9b6522aa | [
"MIT"
] | null | null | null | import random
import numpy as np
import cv2
MATCHED_PARTS = {
"300W": ([1, 17], [2, 16], [3, 15], [4, 14], [5, 13], [6, 12], [7, 11], [8, 10],
[18, 27], [19, 26], [20, 25], [21, 24], [22, 23],
[32, 36], [33, 35],
[37, 46], [38, 45], [39, 44], [40, 43], [41, 48], [42, 47],
... | 37.484444 | 114 | 0.54968 |
3092a7b20c06aa13ee0a1429480175ac5d032095 | 1,708 | py | Python | tests/unit/test_models/test_full_battery_models/test_lithium_ion/base_lithium_ion_half_cell_tests.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | 1 | 2021-11-10T14:37:30.000Z | 2021-11-10T14:37:30.000Z | tests/unit/test_models/test_full_battery_models/test_lithium_ion/base_lithium_ion_half_cell_tests.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_models/test_full_battery_models/test_lithium_ion/base_lithium_ion_half_cell_tests.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | 1 | 2020-11-04T12:32:52.000Z | 2020-11-04T12:32:52.000Z | #
# Base unit tests for lithium-ion half-cell models
# This is achieved by using the {"working electrdode": "positive"} option
#
class BaseUnitTestLithiumIonHalfCell:
def check_well_posedness(self, options):
if self.model is not None:
options["working electrode"] = "positive"
model... | 34.857143 | 73 | 0.703162 |
55556b42557864019fdefdf7bde8084f099a321c | 2,021 | py | Python | openstack/network/v2/vpn_service.py | teresa-ho/stx-openstacksdk | 7d723da3ffe9861e6e9abcaeadc1991689f782c5 | [
"Apache-2.0"
] | null | null | null | openstack/network/v2/vpn_service.py | teresa-ho/stx-openstacksdk | 7d723da3ffe9861e6e9abcaeadc1991689f782c5 | [
"Apache-2.0"
] | null | null | null | openstack/network/v2/vpn_service.py | teresa-ho/stx-openstacksdk | 7d723da3ffe9861e6e9abcaeadc1991689f782c5 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 38.865385 | 75 | 0.724394 |
c8f5a380fb962e4d3a36ddca554eb3e24c5c85d2 | 494 | py | Python | code/1641.Count-Sorted-Vowel-Strings.py | Aden-Q/leetcode | ebd4804edd4f172b9981b22c18d9ff654cf20762 | [
"Apache-2.0"
] | 1 | 2019-09-22T03:08:14.000Z | 2019-09-22T03:08:14.000Z | code/1641.Count-Sorted-Vowel-Strings.py | Aden-Q/leetcode | ebd4804edd4f172b9981b22c18d9ff654cf20762 | [
"Apache-2.0"
] | null | null | null | code/1641.Count-Sorted-Vowel-Strings.py | Aden-Q/leetcode | ebd4804edd4f172b9981b22c18d9ff654cf20762 | [
"Apache-2.0"
] | null | null | null | class Solution:
def countVowelStrings(self, n: int) -> int:
d = ['a', 'e', 'i', 'o', 'u']
path = []
count = 0
def backtracking(n, start):
nonlocal count
if n == 0:
count += 1
return
for i in range(start, 5):... | 26 | 47 | 0.388664 |
7620946ff1f06bc90028397e494e33e11ebe790e | 65 | py | Python | workflows/Demo_DtoxS/widgets/Demo_DtoxS/__init__.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | workflows/Demo_DtoxS/widgets/Demo_DtoxS/__init__.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | workflows/Demo_DtoxS/widgets/Demo_DtoxS/__init__.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | import sysconfig
ICON = "icon/DToxS.png"
BACKGROUND = "#9dffcb"
| 13 | 23 | 0.723077 |
fd625dc366f2d0648269163c6e120944258050f2 | 14,075 | py | Python | pyleecan/GUI/Dxf/Ui_DXF_Slot.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | 1 | 2021-07-08T01:27:24.000Z | 2021-07-08T01:27:24.000Z | pyleecan/GUI/Dxf/Ui_DXF_Slot.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dxf/Ui_DXF_Slot.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# File generated according to DXF_Slot.ui
# WARNING! All changes made in this file will be lost!
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide2.QtCore import *
from P... | 45.257235 | 288 | 0.676661 |
1c10f930406d0d842bde7039b462cbd6bd42d3c5 | 1,509 | py | Python | sympy/polys/benchmarks/bench_galoispolys.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/benchmarks/bench_galoispolys.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/benchmarks/bench_galoispolys.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | """Benchmarks for polynomials over Galois fields. """
from __future__ import print_function, division
from sympy.polys.galoistools import gf_from_dict, gf_factor_sqf
from sympy.polys.domains import ZZ
from sympy import pi, nextprime
def gathen_poly(n, p, K):
return gf_from_dict({n: K.one, 1: K.one, 0: K.one}, p... | 21.869565 | 63 | 0.695825 |
20f87c210ddb83e4efc2198967f977655fc0fadf | 693 | py | Python | tests/test_sampler.py | sonesuke/my-portfolio | 4fd19fdee8a0aa13194cab0df53c83218c5664e3 | [
"MIT"
] | 2 | 2021-03-14T00:14:25.000Z | 2021-09-04T16:26:02.000Z | tests/test_sampler.py | sonesuke/my-portfolio | 4fd19fdee8a0aa13194cab0df53c83218c5664e3 | [
"MIT"
] | 104 | 2021-02-21T08:11:11.000Z | 2021-09-26T03:02:27.000Z | tests/test_sampler.py | sonesuke/mypo | 4fd19fdee8a0aa13194cab0df53c83218c5664e3 | [
"MIT"
] | null | null | null | import os
import numpy.testing as npt
import pytest
from mypo import Market
from mypo.sampler import Sampler
skip_long_tests = pytest.mark.skipif(True, reason="This test takes long time.")
TEST_DATA = os.path.join(os.path.dirname(__file__), "data", "test.bin")
MODEL_DATA = os.path.join(os.path.dirname(__file__), "d... | 25.666667 | 79 | 0.72583 |
66ecbae1521b89210e27ef63969a684f4409e34a | 351 | py | Python | test/espnet2/utils/test_model_summary.py | wrist/espnet | 7e6be051bd575bd82310d7d460ab68b7394c7926 | [
"Apache-2.0"
] | null | null | null | test/espnet2/utils/test_model_summary.py | wrist/espnet | 7e6be051bd575bd82310d7d460ab68b7394c7926 | [
"Apache-2.0"
] | null | null | null | test/espnet2/utils/test_model_summary.py | wrist/espnet | 7e6be051bd575bd82310d7d460ab68b7394c7926 | [
"Apache-2.0"
] | 1 | 2021-03-10T19:25:48.000Z | 2021-03-10T19:25:48.000Z | import torch
from espnet2.utils.model_summary import model_summary
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.l1 = torch.nn.Linear(1000, 1000)
self.l2 = torch.nn.Linear(1000, 1000)
self.l3 = torch.nn.Linear(1000, 1000)
def test_model_summary():
... | 21.9375 | 53 | 0.669516 |
6bbabb80e32937f2c33da9700a9205b1209aae77 | 2,394 | py | Python | src/visitpy/visit_flow/visit_flow_vpe/tests/test_flow_vpe.py | brugger1/visit | ed867b92bc54ed01d3c66ed354b231e30f0b3d0e | [
"BSD-3-Clause"
] | null | null | null | src/visitpy/visit_flow/visit_flow_vpe/tests/test_flow_vpe.py | brugger1/visit | ed867b92bc54ed01d3c66ed354b231e30f0b3d0e | [
"BSD-3-Clause"
] | null | null | null | src/visitpy/visit_flow/visit_flow_vpe/tests/test_flow_vpe.py | brugger1/visit | ed867b92bc54ed01d3c66ed354b231e30f0b3d0e | [
"BSD-3-Clause"
] | 1 | 2020-03-18T23:17:43.000Z | 2020-03-18T23:17:43.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: test_flow_vpe_npy_ops.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 3/28/2012
... | 31.5 | 80 | 0.672515 |
711b50b8d17a3eb7bd4927df5b757d8a694c2df7 | 914 | py | Python | migrations/versions/3f9f0d212519_.py | MB2407/Book-Recommendation-Analysis | 791d487835653aeee877fff1337f0438f0a2ec4c | [
"MIT"
] | 1 | 2021-10-30T17:01:10.000Z | 2021-10-30T17:01:10.000Z | migrations/versions/3f9f0d212519_.py | MB2407/Book-Recommendation-Analysis | 791d487835653aeee877fff1337f0438f0a2ec4c | [
"MIT"
] | null | null | null | migrations/versions/3f9f0d212519_.py | MB2407/Book-Recommendation-Analysis | 791d487835653aeee877fff1337f0438f0a2ec4c | [
"MIT"
] | null | null | null | """empty message
Revision ID: 3f9f0d212519
Revises: 331300dc0a2e
Create Date: 2021-01-20 09:44:43.873635
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3f9f0d212519'
down_revision = '331300dc0a2e'
branch_labels = None
depends_on = None
def upgrade():
# ... | 25.388889 | 65 | 0.671772 |
48027bd17542f4a0da26b85aaf99dc9305cb053c | 1,257 | py | Python | sc2maptool/index.py | mikemhenry/sc2gameMapRepo | e73eda242dde483e8abf0acb5050720730543e0d | [
"Apache-2.0"
] | 1 | 2018-06-16T00:48:44.000Z | 2018-06-16T00:48:44.000Z | sc2maptool/index.py | mikemhenry/sc2gameMapRepo | e73eda242dde483e8abf0acb5050720730543e0d | [
"Apache-2.0"
] | 4 | 2018-06-14T03:16:52.000Z | 2018-06-15T23:50:02.000Z | sc2maptool/index.py | mikemhenry/sc2gameMapRepo | e73eda242dde483e8abf0acb5050720730543e0d | [
"Apache-2.0"
] | null | null | null |
from glob import glob
import os
from sc2maptool.mapRecord import MapRecord
from sc2maptool import constants as c
################################################################################
class IndexCache(object):
def __init__(self): pass
cache = IndexCache()
#############################################... | 39.28125 | 101 | 0.495625 |
c886b4aebdb2989515bfb4a464a7abceca4c2afc | 2,205 | py | Python | dashboard/views.py | sayyss/doraemon-dashboard | 8ed68828e294e145be2a0044d3c2b55470d70ec5 | [
"MIT"
] | null | null | null | dashboard/views.py | sayyss/doraemon-dashboard | 8ed68828e294e145be2a0044d3c2b55470d70ec5 | [
"MIT"
] | null | null | null | dashboard/views.py | sayyss/doraemon-dashboard | 8ed68828e294e145be2a0044d3c2b55470d70ec5 | [
"MIT"
] | null | null | null | import requests
from django.http import JsonResponse
from django.shortcuts import render, redirect
auth_url = "https://discord.com/api/oauth2/authorize?client_id=709321027775365150&redirect_uri=http%3A%2F%2F127.0.0.1%3A8000%2Fuser&response_type=code&scope=identify%20email%20guilds"
def index(request):
token = re... | 31.056338 | 183 | 0.671655 |
66e732a42791200c73d7c2b50e6156e441eef7c2 | 2,053 | py | Python | mopidy/internal/xdg.py | grdorin/mopidy | 76db44088c102d7ad92a3fc6a15a938e66b99b0d | [
"Apache-2.0"
] | 6,700 | 2015-01-01T03:57:59.000Z | 2022-03-30T09:31:31.000Z | mopidy/internal/xdg.py | pnijhara/mopidy | 7168787ea6c82b66e138fc2b388d78fa1c7661ba | [
"Apache-2.0"
] | 1,141 | 2015-01-02T09:48:59.000Z | 2022-03-28T22:25:30.000Z | mopidy/internal/xdg.py | pnijhara/mopidy | 7168787ea6c82b66e138fc2b388d78fa1c7661ba | [
"Apache-2.0"
] | 735 | 2015-01-01T21:15:50.000Z | 2022-03-20T16:13:44.000Z | import configparser
import os
import pathlib
def get_dirs():
"""Returns a dict of all the known XDG Base Directories for the current user.
The keys ``XDG_CACHE_DIR``, ``XDG_CONFIG_DIR``, and ``XDG_DATA_DIR`` is
always available.
Additional keys, like ``XDG_MUSIC_DIR``, may be available if the
``... | 29.753623 | 81 | 0.643936 |
0aa069e23f30e3500fe0391ba29c2ad1c19719cc | 3,392 | py | Python | models/all_models.py | rohandeshmukh91/NLP | e05e9bf989a91e451d9bbfbd0c7a34dfe152d007 | [
"MIT"
] | null | null | null | models/all_models.py | rohandeshmukh91/NLP | e05e9bf989a91e451d9bbfbd0c7a34dfe152d007 | [
"MIT"
] | 1 | 2021-06-02T00:49:53.000Z | 2021-06-02T00:49:53.000Z | models/all_models.py | rohandeshmukh91/NLP | e05e9bf989a91e451d9bbfbd0c7a34dfe152d007 | [
"MIT"
] | null | null | null |
# @TODO: Need to fix this - universal model pooling module
import gensim
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
from nltk.tokenize import ToktokTokenizer
from nltk.tokenize import word_tokenize
from gensim.similarities import Similarity
from gensim.models import TfidfModel
from nltk.corpus import s... | 36.473118 | 138 | 0.681014 |
d1dec3b20d0e20f56442d8be927b0f6d14cb754f | 1,092 | py | Python | alipay/aop/api/response/AlipayOpenBpaasServiceQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOpenBpaasServiceQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOpenBpaasServiceQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.BPaaSServiceInfo import BPaaSServiceInfo
class AlipayOpenBpaasServiceQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenBpaasServiceQuery... | 33.090909 | 108 | 0.684982 |
28e22ce492e14eb8b01cf5a0c457e9860a0cca75 | 16,402 | py | Python | helpers/event_insights_helper.py | dc74089/the-blue-alliance | 2c47b6e8b61819eda4dcda5e0011cb2d5c7d3785 | [
"MIT"
] | null | null | null | helpers/event_insights_helper.py | dc74089/the-blue-alliance | 2c47b6e8b61819eda4dcda5e0011cb2d5c7d3785 | [
"MIT"
] | null | null | null | helpers/event_insights_helper.py | dc74089/the-blue-alliance | 2c47b6e8b61819eda4dcda5e0011cb2d5c7d3785 | [
"MIT"
] | null | null | null | import logging
import traceback
from collections import defaultdict
from consts.event_type import EventType
class EventInsightsHelper(object):
@classmethod
def calculate_event_insights(cls, matches, year):
INSIGHTS_MAP = {
2016: cls.calculate_event_insights_2016,
2017: cls.cal... | 47.404624 | 171 | 0.600597 |
3f7fe6e20f1fe00fade9aeb0b2f86742ff0a94cc | 3,853 | py | Python | modules/flying_square.py | StephD/CJ8-blessed-badgers | 0e0f340efd6e45baf04bd4c25ce5c569fcfe344e | [
"MIT"
] | 2 | 2021-07-17T16:49:25.000Z | 2021-11-16T11:40:47.000Z | modules/flying_square.py | StephD/CJ8-blessed-badgers | 0e0f340efd6e45baf04bd4c25ce5c569fcfe344e | [
"MIT"
] | null | null | null | modules/flying_square.py | StephD/CJ8-blessed-badgers | 0e0f340efd6e45baf04bd4c25ce5c569fcfe344e | [
"MIT"
] | 1 | 2022-01-05T20:49:09.000Z | 2022-01-05T20:49:09.000Z | import numpy as np
from numpy import cos, pi, sin
class Square:
"""Square class will display a rotating square for the start menu"""
vertices: np.array
center: np.array
rotation: float
velocity: np.array
angular_velocity: float
def __init__(self, vertices: np.array = None, velocity: np.a... | 37.407767 | 109 | 0.545549 |
e35b343988f13e9ce1b56a9972c0c670cb53cc81 | 4,936 | py | Python | shuffle-employees.py | Carsmaniac/erisly-tower-shuffler | 35a593239d4ce2295f9e1266824a378b7aabeed8 | [
"MIT"
] | null | null | null | shuffle-employees.py | Carsmaniac/erisly-tower-shuffler | 35a593239d4ce2295f9e1266824a378b7aabeed8 | [
"MIT"
] | null | null | null | shuffle-employees.py | Carsmaniac/erisly-tower-shuffler | 35a593239d4ce2295f9e1266824a378b7aabeed8 | [
"MIT"
] | null | null | null | from sys import exit
from time import sleep
try:
import keyboard
except ModuleNotFoundError:
print("Could not import \"keyboard\" library (pip install keyboard)")
exit()
start_hotkey = "F7"
message_send_delay = 2
key_press_delay = 0.02
def send_message(string):
# It's not about money, it's about send... | 36.835821 | 170 | 0.649109 |
1eb4ae0ae33ac7d362568a64e80f85256e178f7f | 3,097 | py | Python | lib/rucio/tests/test_daemons.py | justincc/rucio | 95d81403c835d9f43fc30d328a8e2e388617a369 | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_daemons.py | justincc/rucio | 95d81403c835d9f43fc30d328a8e2e388617a369 | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_daemons.py | justincc/rucio | 95d81403c835d9f43fc30d328a8e2e388617a369 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020-2021 CERN
#
# 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 a... | 30.067961 | 131 | 0.757184 |
dd134d13d1980103ed5867071666395830df2038 | 59,656 | py | Python | glance/tests/functional/v1/test_api.py | dreamhost/glance | 1d91a4dc2b74d224ea12947d672aa66a576d9d9a | [
"Apache-2.0"
] | null | null | null | glance/tests/functional/v1/test_api.py | dreamhost/glance | 1d91a4dc2b74d224ea12947d672aa66a576d9d9a | [
"Apache-2.0"
] | null | null | null | glance/tests/functional/v1/test_api.py | dreamhost/glance | 1d91a4dc2b74d224ea12947d672aa66a576d9d9a | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack, LLC
# 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/... | 42.279235 | 79 | 0.570286 |
157dc1ea46db2872b614448fa3db0f741101e40c | 21,924 | py | Python | cinder/opts.py | cloudification-io/cinder | 23d76e01f2b4f3771b57fb287084a4884238b827 | [
"Apache-2.0"
] | null | null | null | cinder/opts.py | cloudification-io/cinder | 23d76e01f2b4f3771b57fb287084a4884238b827 | [
"Apache-2.0"
] | null | null | null | cinder/opts.py | cloudification-io/cinder | 23d76e01f2b4f3771b57fb287084a4884238b827 | [
"Apache-2.0"
] | null | null | null |
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 53.473171 | 78 | 0.751368 |
0a88c7c716816d4c2be37cf6fdc2770e478a9e5c | 1,907 | py | Python | pyhdtoolkit/optics/ripken.py | fsoubelet/PyhDToolk | aef9d5f1fac2d4c4307d50ba5c53f6a5eb635a66 | [
"MIT"
] | 5 | 2020-05-28T09:16:01.000Z | 2021-12-27T18:59:15.000Z | pyhdtoolkit/optics/ripken.py | fsoubelet/PyhDToolk | aef9d5f1fac2d4c4307d50ba5c53f6a5eb635a66 | [
"MIT"
] | 71 | 2020-02-20T20:32:43.000Z | 2022-03-24T17:04:28.000Z | pyhdtoolkit/optics/ripken.py | fsoubelet/PyhDToolk | aef9d5f1fac2d4c4307d50ba5c53f6a5eb635a66 | [
"MIT"
] | 2 | 2021-09-28T16:01:06.000Z | 2022-03-16T19:04:23.000Z | from typing import Union
import numpy as np
from loguru import logger
# ----- Setup Utilites ----- #
def lebedev_beam_size(
beta1_: Union[float, np.ndarray], beta2_: Union[float, np.ndarray], geom_emit_x: float, geom_emit_y: float
) -> Union[float, np.ndarray]:
"""
Calculate beam size according to the ... | 38.918367 | 110 | 0.687992 |
f6de2dc89f109e2092b22980ff4d67063804c0df | 385 | py | Python | backend/api/views.py | fernand0aguilar/redesigned-invention | 89219f5fc14194ff0891fc52ded0908010b585c5 | [
"MIT"
] | null | null | null | backend/api/views.py | fernand0aguilar/redesigned-invention | 89219f5fc14194ff0891fc52ded0908010b585c5 | [
"MIT"
] | 9 | 2021-03-09T21:20:34.000Z | 2021-10-06T06:24:00.000Z | backend/api/views.py | fernand0aguilar/redesigned-invention | 89219f5fc14194ff0891fc52ded0908010b585c5 | [
"MIT"
] | null | null | null | from rest_framework import generics
from .models import Votacao
from .serializers import VotacaoSerializer
# Create your views here.
class ListVotacao(generics.ListCreateAPIView):
queryset = Votacao.objects.all()
serializer_class = VotacaoSerializer
class DetailVote(generics.ListCreateAPIView):
queryset ... | 27.5 | 46 | 0.802597 |
f4a1b3e010f0a44283f49e5930d0fb6972275941 | 7,839 | py | Python | examples/twisted/wamp/work/newapi/test_newapi11.py | admcnally/python | 7880cfc15821c1e942c54862b7fe470e7446c27e | [
"MIT"
] | 11 | 2016-09-14T21:58:37.000Z | 2019-01-28T21:56:14.000Z | examples/twisted/wamp/work/newapi/test_newapi11.py | admcnally/python | 7880cfc15821c1e942c54862b7fe470e7446c27e | [
"MIT"
] | 1 | 2018-10-19T09:21:26.000Z | 2018-10-19T09:21:26.000Z | examples/twisted/wamp/work/newapi/test_newapi11.py | admcnally/python | 7880cfc15821c1e942c54862b7fe470e7446c27e | [
"MIT"
] | 1 | 2019-12-26T21:33:12.000Z | 2019-12-26T21:33:12.000Z | @coroutine
def main(reactor, session):
# the session is joined and ready
result = yield session.call(u'com.example.add2', 2, 3)
print('result={}'.format(result))
# as we exit, this signals we are done with the session! the session
# can be recycled
if __name__ == '__main__':
client = Client(mai... | 29.806084 | 85 | 0.668708 |
218e824ed0638c8c890d7adf3d9c7ed743aa95cf | 769 | py | Python | src/config/dbInit.py | rafaellevissa/codeshow | 4dfe67aea7de9a0d49f69fc60e02b1017e6a43c4 | [
"Beerware"
] | 1 | 2020-08-07T18:17:44.000Z | 2020-08-07T18:17:44.000Z | src/config/dbInit.py | rafaellevissa/codeshow | 4dfe67aea7de9a0d49f69fc60e02b1017e6a43c4 | [
"Beerware"
] | null | null | null | src/config/dbInit.py | rafaellevissa/codeshow | 4dfe67aea7de9a0d49f69fc60e02b1017e6a43c4 | [
"Beerware"
] | null | null | null | from config.db import Db
class DbInit(object):
database = Db()
def iniciar(self):
db = self.database.getDb()
print(db)
MAIN_DB = db.cursor()
try:
MAIN_DB.execute("drop database if exists account")
MAIN_DB.execute("cre... | 38.45 | 181 | 0.53316 |
5f06cb6cc24ac0a6008d5ca54686d5918747e577 | 1,245 | py | Python | tests/unit/collectible_test.py | JosephAkim/PetNFT | b2d16d6eda8482aae43e52f752de2fa7af1ed75b | [
"MIT"
] | null | null | null | tests/unit/collectible_test.py | JosephAkim/PetNFT | b2d16d6eda8482aae43e52f752de2fa7af1ed75b | [
"MIT"
] | null | null | null | tests/unit/collectible_test.py | JosephAkim/PetNFT | b2d16d6eda8482aae43e52f752de2fa7af1ed75b | [
"MIT"
] | null | null | null | import pytest
from brownie import network, AdvancedCollectible
from scripts.Useful_scripts import (
get_account,
get_contract,
LOCAL_BLOCKCHAIN_ENVIRONMENTS,
)
def test_can_create_advanced_collectible(
get_keyhash,
chainlink_fee,
):
# Arrange
if network.show_active() not in LOCAL_BLOCKCHAI... | 32.763158 | 80 | 0.717269 |
f077e907c7235e5708afd9c4b1bdaa1c4bb3952f | 5,085 | py | Python | mouse_tracking/python_code/Batch_OFT.py | li-shen-amy/lick_detect | 7e82025aff0691c7f36bbea38a97349468bc3c4e | [
"MIT"
] | 1 | 2021-02-26T00:02:24.000Z | 2021-02-26T00:02:24.000Z | mouse_tracking/python_code/Batch_OFT.py | li-shen-amy/lick_detect | 7e82025aff0691c7f36bbea38a97349468bc3c4e | [
"MIT"
] | 1 | 2022-03-31T08:11:19.000Z | 2022-03-31T08:11:19.000Z | mouse_tracking/python_code/Batch_OFT.py | li-shen-amy/behavior | 7e82025aff0691c7f36bbea38a97349468bc3c4e | [
"MIT"
] | null | null | null | '''
# Requiment: Python 3, opencv-python, tkinter
# Usage instruction:
Select downsampled video file (recommend 480p x 480p for faster speed)
Once finished, video with tracking trace and excel sheet appear in source folder for video
For excel file: three columns, first is x, second is y coord, third is pixel distance ... | 38.522727 | 215 | 0.629105 |
f85e15178a415d6d3645b8eafd13c1acb8fba609 | 61,376 | py | Python | riboSeed/riboSpec.py | nickp60/riboSeed | 636eaf78a1bbe4517c43ddb120e5ca5bb2b97212 | [
"MIT"
] | 7 | 2017-02-04T14:33:36.000Z | 2021-02-14T21:03:33.000Z | riboSeed/riboSpec.py | nickp60/riboSeed | 636eaf78a1bbe4517c43ddb120e5ca5bb2b97212 | [
"MIT"
] | 11 | 2017-03-13T15:23:20.000Z | 2020-06-30T17:34:56.000Z | riboSeed/riboSpec.py | nickp60/riboSeed | 636eaf78a1bbe4517c43ddb120e5ca5bb2b97212 | [
"MIT"
] | 3 | 2017-08-10T12:14:22.000Z | 2022-03-27T14:35:12.000Z | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
# Copyright 2017, National University of Ireland and The James Hutton Insitute
# Author: Nicholas Waters
#
# This code is part of the riboSeed package, and is governed by its licence.
# Please see the LICENSE file that should have been included as part of
# this package.
"... | 42.153846 | 517 | 0.573156 |
44c7ff483df3bb819d0dbb07c2033ece4962e6ba | 1,094 | py | Python | fuel_agent/fuel_agent/utils/fs_utils.py | Axam/nsx-web | 4f60d71c05e08740cbdf19b6c9bb0c4cb1e29ad5 | [
"Apache-2.0"
] | 1 | 2021-04-06T16:13:35.000Z | 2021-04-06T16:13:35.000Z | fuel_agent/fuel_agent/utils/fs_utils.py | Axam/nsx-web | 4f60d71c05e08740cbdf19b6c9bb0c4cb1e29ad5 | [
"Apache-2.0"
] | null | null | null | fuel_agent/fuel_agent/utils/fs_utils.py | Axam/nsx-web | 4f60d71c05e08740cbdf19b6c9bb0c4cb1e29ad5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Mirantis, 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... | 36.466667 | 74 | 0.702925 |
a6be99653be7115d869ba8eb4b4e73e90195195d | 233 | py | Python | sphinx_graphiql/__init__.py | dbuksha-wis/sphinx-graphiql | 842f9c478836aaed25ac59e91dda1c1fcbec5747 | [
"MIT"
] | null | null | null | sphinx_graphiql/__init__.py | dbuksha-wis/sphinx-graphiql | 842f9c478836aaed25ac59e91dda1c1fcbec5747 | [
"MIT"
] | null | null | null | sphinx_graphiql/__init__.py | dbuksha-wis/sphinx-graphiql | 842f9c478836aaed25ac59e91dda1c1fcbec5747 | [
"MIT"
] | 1 | 2020-01-23T08:57:12.000Z | 2020-01-23T08:57:12.000Z | from __future__ import absolute_import
from .sphinx_graphiql import SphinxGraphiQL
def setup(app):
app.add_directive('graphiql', SphinxGraphiQL)
return {'parallel_read_safe': True,
'parallel_write_safe': True}
| 23.3 | 49 | 0.746781 |
0034d74c08b2f7f6d81f5c503c75e4b810173ddc | 202 | py | Python | cadnano/views/gridview/tools/__init__.py | sherwoodyao/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 69 | 2015-01-13T02:54:40.000Z | 2022-03-27T14:25:51.000Z | cadnano/views/gridview/tools/__init__.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 127 | 2015-01-01T06:26:34.000Z | 2022-03-02T12:48:05.000Z | cadnano/views/gridview/tools/__init__.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 48 | 2015-01-22T19:57:49.000Z | 2022-03-27T14:27:53.000Z | # -*- coding: utf-8 -*-
from cadnano.util import to_dot_path
gtp = to_dot_path(__file__)
CreateGridToolT = gtp + '.creategridtool.CreateGridTool'
SelectGridToolT = gtp + '.selectgridtool.SelectGridTool' | 40.4 | 56 | 0.772277 |
34c2918fe663823e8e4c891d3998298fbdec385b | 1,534 | py | Python | tasks.py | agateriver/django-make-app | 1c390b78284ee727c645e560c323b53f05629fd4 | [
"MIT"
] | null | null | null | tasks.py | agateriver/django-make-app | 1c390b78284ee727c645e560c323b53f05629fd4 | [
"MIT"
] | null | null | null | tasks.py | agateriver/django-make-app | 1c390b78284ee727c645e560c323b53f05629fd4 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
# ! python3
import shutil
from invoke import run, task
@task
def clean_build():
shutil.rmtree('x_django_app_maker.egg-info', ignore_errors=True)
shutil.rmtree('build', ignore_errors=True)
shutil.rmtree('dist', ignore_errors=True)
shutil.rmtree('__pycache__', ignore_errors=T... | 19.175 | 82 | 0.682529 |
5ecb897df22febdead29d25f7818602c4b97f971 | 2,893 | py | Python | tb_rest_client/models/models_ce/mqtt_device_transport_configuration.py | fargiolas/thingsboard-python-rest-client | 8c439e27218226b356e8203c2a7f1239278669c0 | [
"Apache-2.0"
] | null | null | null | tb_rest_client/models/models_ce/mqtt_device_transport_configuration.py | fargiolas/thingsboard-python-rest-client | 8c439e27218226b356e8203c2a7f1239278669c0 | [
"Apache-2.0"
] | null | null | null | tb_rest_client/models/models_ce/mqtt_device_transport_configuration.py | fargiolas/thingsboard-python-rest-client | 8c439e27218226b356e8203c2a7f1239278669c0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
ThingsBoard REST API
ThingsBoard open-source IoT platform REST API documentation. # noqa: E501
OpenAPI spec version: 3.3.3-SNAPSHOT
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
impor... | 31.791209 | 89 | 0.603871 |
a7a85b22cc203e3e34de723fb34a9d046bf538f6 | 1,698 | py | Python | mail_flask.py | aadottori/mail_flask | 28e2427a768d6c33d831beafdd71f5ab62043f29 | [
"MIT"
] | 1 | 2020-01-17T02:43:05.000Z | 2020-01-17T02:43:05.000Z | mail_flask.py | aadottori/mail_flask | 28e2427a768d6c33d831beafdd71f5ab62043f29 | [
"MIT"
] | null | null | null | mail_flask.py | aadottori/mail_flask | 28e2427a768d6c33d831beafdd71f5ab62043f29 | [
"MIT"
] | 1 | 2020-07-18T16:37:02.000Z | 2020-07-18T16:37:02.000Z | from flask import Flask
from flask_mail import Mail, Message
app = Flask(__name__)
# Mail configuration
app.config['DEBUG'] = True
app.config['TESTING'] = False
app.config['MAIL_SERVER'] = 'smtp.gmail.com' # Here, we use Gmail, but you can use any other.
app.config['MAIL_PORT'] = 587
app.config['MAIL_USE_TLS'] = True... | 47.166667 | 120 | 0.710247 |
10ab74ad6028df5b59e27ebde00224e8f2f37d03 | 31,510 | py | Python | src/opserver/uveserver.py | biswajit-mandal/contrail-controller | 80c4a7e8515f7296b18ba4c21a439bd3daefcc4a | [
"Apache-2.0"
] | null | null | null | src/opserver/uveserver.py | biswajit-mandal/contrail-controller | 80c4a7e8515f7296b18ba4c21a439bd3daefcc4a | [
"Apache-2.0"
] | null | null | null | src/opserver/uveserver.py | biswajit-mandal/contrail-controller | 80c4a7e8515f7296b18ba4c21a439bd3daefcc4a | [
"Apache-2.0"
] | 1 | 2021-03-09T10:44:33.000Z | 2021-03-09T10:44:33.000Z | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# UVEServer
#
# Operational State Server for UVEs
#
import gevent
import json
import copy
import xmltodict
import redis
import datetime
import sys
from opserver_util import OpServerUtils
import re
from gevent.coros import BoundedSemaphore
from pys... | 39.142857 | 95 | 0.469153 |
40c68dfdc4119efe58075bfdf7dca2a2dae10bc1 | 11,093 | py | Python | nova/network/quantum/client.py | armaan/nova | 22859fccb95502efcb73ecf2bd827c45c0886bd3 | [
"Apache-2.0"
] | 1 | 2021-11-08T10:11:44.000Z | 2021-11-08T10:11:44.000Z | nova/network/quantum/client.py | armaan/nova | 22859fccb95502efcb73ecf2bd827c45c0886bd3 | [
"Apache-2.0"
] | null | null | null | nova/network/quantum/client.py | armaan/nova | 22859fccb95502efcb73ecf2bd827c45c0886bd3 | [
"Apache-2.0"
] | 1 | 2020-05-10T16:36:03.000Z | 2020-05-10T16:36:03.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Citrix Systems
# 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/... | 36.016234 | 79 | 0.605247 |
60aa400a10f91062a6733f9cc25c5e85b53d57d6 | 562 | py | Python | scripts/remove_pytorch_module.py | HuaizhengZhang/scene-recognition-pytorch1.x-tf2.x | 9fd7f664beb98802a9da67e633684d4cc8a67383 | [
"MIT"
] | 14 | 2020-05-09T09:21:23.000Z | 2021-06-27T07:06:21.000Z | scripts/remove_pytorch_module.py | HuaizhengZhang/scene-recognition-pytorch1.x-tf2.x | 9fd7f664beb98802a9da67e633684d4cc8a67383 | [
"MIT"
] | 1 | 2020-05-27T01:52:25.000Z | 2020-05-27T03:52:13.000Z | scripts/remove_pytorch_module.py | HuaizhengZhang/scene-recognition-pytorch1.x | 9fd7f664beb98802a9da67e633684d4cc8a67383 | [
"MIT"
] | 1 | 2021-08-20T12:51:40.000Z | 2021-08-20T12:51:40.000Z | import torch
import torch.nn as nn
import torchvision.models as models
arch = 'squeezenet1_0'
model_file = 'checkpoints/%s_best.pth.tar' % arch
save_pt_path = 'weights/%s_places365.pt' % arch
# https://discuss.pytorch.org/t/missing-keys-unexpected-keys-in-state-dict-when-loading-self-trained-model/22379/8
model = mod... | 31.222222 | 114 | 0.786477 |
b38e06e951d26fe715afe579b6b4e00fb0fe0ffe | 5,078 | py | Python | logo/tleePicEditor.py | GaTech-IEEE-Hardware/administrative | bb0684b33996834c2a8d0e47306b05a7cfd7fab3 | [
"MIT"
] | null | null | null | logo/tleePicEditor.py | GaTech-IEEE-Hardware/administrative | bb0684b33996834c2a8d0e47306b05a7cfd7fab3 | [
"MIT"
] | null | null | null | logo/tleePicEditor.py | GaTech-IEEE-Hardware/administrative | bb0684b33996834c2a8d0e47306b05a7cfd7fab3 | [
"MIT"
] | null | null | null | """
Background Remover
==================
Function to remove backgrounds which fit user input criteria from pictures
- Saves files as .png for transparency
- Can be modified to remove black or white backgrounds
- Can also be modified to remove picture and leave white background
- Created by tlee753
- Last Modified 6/2... | 39.364341 | 156 | 0.662662 |
1fa1b263c34d27f285c1e6c5a227ad9662ef6198 | 1,394 | py | Python | operationPackage/cannyDialog.py | nicocccccchou/graduate-pyqt | 4624bdfbbaa33aa979c66e9bd9fa77904cde948b | [
"MIT"
] | null | null | null | operationPackage/cannyDialog.py | nicocccccchou/graduate-pyqt | 4624bdfbbaa33aa979c66e9bd9fa77904cde948b | [
"MIT"
] | null | null | null | operationPackage/cannyDialog.py | nicocccccchou/graduate-pyqt | 4624bdfbbaa33aa979c66e9bd9fa77904cde948b | [
"MIT"
] | null | null | null | from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class CannyDialog(QDialog):
def __init__(self, parent=None):
super(CannyDialog, self).__init__(parent)
self.setWindowTitle('CannyDialog')
# 在布局中添加控件
layout = QVBoxLayout(self)
self.form = Q... | 31.681818 | 102 | 0.702296 |
e624ff33794cb84b6c4ca809d58c41e6120bfa33 | 530 | py | Python | qiling/examples/hello_x8664_linux_customapi.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | 2 | 2021-05-05T12:03:01.000Z | 2021-06-04T14:27:15.000Z | qiling/examples/hello_x8664_linux_customapi.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | null | null | null | qiling/examples/hello_x8664_linux_customapi.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | 2 | 2021-05-05T12:03:09.000Z | 2021-06-04T14:27:21.000Z | #!/usr/bin/env python3
#
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
#
import sys
sys.path.append("..")
from qiling import Qiling
from qiling.os.const import STRING
from qiling.const import QL_VERBOSE
def my_puts(ql: Qiling):
params = ql.os.resolve_fcall_params({'s': STRING})
... | 25.238095 | 103 | 0.713208 |
7db27d1e8ca734df2855456c23b4391fe6838a27 | 5,677 | py | Python | graphic_composition_001.py | ayk-caglayan/graphic_composition_tool | 55d773b8299e808ddc8a3a0edffb81d8aafc49ff | [
"MIT"
] | null | null | null | graphic_composition_001.py | ayk-caglayan/graphic_composition_tool | 55d773b8299e808ddc8a3a0edffb81d8aafc49ff | [
"MIT"
] | null | null | null | graphic_composition_001.py | ayk-caglayan/graphic_composition_tool | 55d773b8299e808ddc8a3a0edffb81d8aafc49ff | [
"MIT"
] | null | null | null | #%matplotlib
import matplotlib.pyplot as plt
from matplotlib.backend_bases import MouseButton, KeyEvent
import pyperclip, pickle, sys, time
#plt.ion() #matplotlib interaction on
global activated_plot_nr
activated_plot_nr=0 #this functions as a flag for activated plot to insert and export the data
fig, ax = plt.subplot... | 38.619048 | 182 | 0.683636 |
2cda9ae6b5b814a7f907b2a63311676f05af27cd | 261 | py | Python | day1/py_func/test_funcs.py | rhuey-eqix/pynet-ons | 7c7ce2d1aa263afa7701b2495b0e237110775a1d | [
"Apache-2.0"
] | 1 | 2021-01-11T23:17:26.000Z | 2021-01-11T23:17:26.000Z | day1/py_func/test_funcs.py | rhuey-eqix/pynet-ons | 7c7ce2d1aa263afa7701b2495b0e237110775a1d | [
"Apache-2.0"
] | null | null | null | day1/py_func/test_funcs.py | rhuey-eqix/pynet-ons | 7c7ce2d1aa263afa7701b2495b0e237110775a1d | [
"Apache-2.0"
] | 11 | 2021-12-07T16:04:22.000Z | 2022-02-09T12:20:05.000Z | def my_func(x, y, z=100):
print(f"x is {x}")
print(f"y is {y}")
print(f"z is {z}")
return x + y + z
if __name__ == "__main__":
my_list = [22, 7, 18]
my_dict = {"x": 7, "y": 0, "z": 22}
result = my_func(**my_dict)
print(result)
| 20.076923 | 39 | 0.498084 |
66c3b58c75ed9af51344e49a879c506bc8dd00c2 | 26,564 | py | Python | aws-frauddetector-detector/src/aws_frauddetector_detector/helpers/model_helpers.py | aws-cloudformation/aws-cloudformation-resource-providers-frauddetector | 22b753423496c79c4e327db6e3ff9aff662182ec | [
"Apache-2.0"
] | 4 | 2021-05-24T05:35:05.000Z | 2021-11-08T09:43:48.000Z | aws-frauddetector-detector/src/aws_frauddetector_detector/helpers/model_helpers.py | aws-cloudformation/aws-cloudformation-resource-providers-frauddetector | 22b753423496c79c4e327db6e3ff9aff662182ec | [
"Apache-2.0"
] | 3 | 2021-04-29T20:30:17.000Z | 2021-05-14T16:28:19.000Z | aws-frauddetector-detector/src/aws_frauddetector_detector/helpers/model_helpers.py | aws-cloudformation/aws-cloudformation-resource-providers-frauddetector | 22b753423496c79c4e327db6e3ff9aff662182ec | [
"Apache-2.0"
] | 3 | 2021-04-07T16:03:03.000Z | 2021-10-30T03:25:33.000Z | from typing import List, Optional, Set
from cloudformation_cli_python_lib import (
exceptions,
)
from .. import models
from . import api_helpers, validation_helpers, util
import logging
# Use this logger to forward log messages to CloudWatch Logs.
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.DEBUG)
#... | 41.057187 | 118 | 0.683481 |
8d22e1234b6f3b82fea53cacd953c5a4f8b1b84f | 934 | py | Python | setup.py | issackelly/biblion | 9d72ed037bd59597e1f02a75778a08f3de72da75 | [
"BSD-3-Clause"
] | null | null | null | setup.py | issackelly/biblion | 9d72ed037bd59597e1f02a75778a08f3de72da75 | [
"BSD-3-Clause"
] | null | null | null | setup.py | issackelly/biblion | 9d72ed037bd59597e1f02a75778a08f3de72da75 | [
"BSD-3-Clause"
] | null | null | null | from distutils.core import setup
# see requirements.txt for dependencies
setup(
name = "biblion",
version = "0.1.dev10",
author = "Eldarion",
author_email = "development@eldarion.com",
description = "the eldarion.com blog app intended to be suitable for site-level company and project blogs",
... | 26.685714 | 111 | 0.591006 |
35711855b080416543af737283e184190a0a82fa | 27,677 | py | Python | pnc_cli/swagger_client/apis/productversions_api.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 2 | 2016-05-18T15:01:34.000Z | 2016-08-11T14:04:17.000Z | pnc_cli/swagger_client/apis/productversions_api.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 47 | 2016-06-23T19:58:40.000Z | 2020-03-10T17:58:11.000Z | pnc_cli/swagger_client/apis/productversions_api.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 21 | 2016-05-30T20:34:17.000Z | 2021-09-07T13:22:20.000Z | # coding: utf-8
"""
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# pytho... | 39.369844 | 114 | 0.557214 |
814507ee9751e728c073948f93edf7cc0c409b01 | 568 | py | Python | tests/root_chain/contracts/data_structures/test_priority_queue.py | josojo/plasma-mvp | 2c1d6d324ea164b2081c628170da4bae59c9018e | [
"Apache-2.0"
] | null | null | null | tests/root_chain/contracts/data_structures/test_priority_queue.py | josojo/plasma-mvp | 2c1d6d324ea164b2081c628170da4bae59c9018e | [
"Apache-2.0"
] | null | null | null | tests/root_chain/contracts/data_structures/test_priority_queue.py | josojo/plasma-mvp | 2c1d6d324ea164b2081c628170da4bae59c9018e | [
"Apache-2.0"
] | null | null | null | import pytest
@pytest.fixture
def priority_queue(get_contract):
return get_contract('DataStructures/PriorityQueue.sol')
def test_priority_queue(t, priority_queue):
priority_queue.insert(2)
priority_queue.insert(5)
priority_queue.insert(3)
assert priority_queue.getMin() == 2
priority_queue.in... | 27.047619 | 59 | 0.725352 |
2e2d6140d6dede0d15f76ba78ec33dfb374a97a5 | 410 | py | Python | funing.py | larryw3i/Funing | 8ef88af8766f0246614517fa00f3b322ba722d6b | [
"MIT"
] | 1 | 2021-08-22T05:56:09.000Z | 2021-08-22T05:56:09.000Z | funing.py | larryw3i/Funing | 8ef88af8766f0246614517fa00f3b322ba722d6b | [
"MIT"
] | null | null | null | funing.py | larryw3i/Funing | 8ef88af8766f0246614517fa00f3b322ba722d6b | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import getopt
import os
import sys
from funing import *
from funing.settings import *
if __name__ == '__main__':
sys_argv = sys.argv[1:]
_, args = getopt.getopt(sys_argv, '')
for a in args:
if a in test_args:
os.environ['FUNING_TEST'] = '1'
... | 20.5 | 72 | 0.57561 |
89fca8f480bb4d0ebc54305a50cf5ffec00878be | 2,616 | py | Python | main/Main.py | cyzLoveDream/text_dnn_classifier | 9986dd8ac66b2ac4731e28209eba524be1283d47 | [
"Apache-2.0"
] | 17 | 2017-12-14T07:34:59.000Z | 2021-03-23T12:29:40.000Z | main/Main.py | cyzLoveDream/text_dnn_classifier | 9986dd8ac66b2ac4731e28209eba524be1283d47 | [
"Apache-2.0"
] | null | null | null | main/Main.py | cyzLoveDream/text_dnn_classifier | 9986dd8ac66b2ac4731e28209eba524be1283d47 | [
"Apache-2.0"
] | 2 | 2017-12-14T07:57:56.000Z | 2018-06-08T09:42:01.000Z | import time
from untils import tools
from untils import Word2Vec
import os
import warnings
import pandas as pd
warnings.filterwarnings("ignore")
def main():
train_path,test_path,user_dict,w2v_path,\
sub_path,train_number,test_number,max_len,\
batch_size,epoch,ckpt,model_file,embedding_size,eval_test = tools.tools(... | 46.714286 | 96 | 0.622324 |
8c59f9660220f2bb6a534c61d9f5a1bce7343205 | 3,529 | py | Python | bindings/python/ensmallen/datasets/string/vibrionavarrensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/vibrionavarrensis.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/vibrionavarrensis.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Vibrio navarrensis.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein ass... | 32.675926 | 223 | 0.675829 |
2144bf3f7008d65c2786e65205cec249d3d8ce99 | 1,250 | py | Python | train_simple_conv_net.py | kiseonjeong/neural-network-for-python | 902307699d59a0a38d45519a0bacd014ba705727 | [
"MIT"
] | 1 | 2020-07-08T15:47:00.000Z | 2020-07-08T15:47:00.000Z | train_simple_conv_net.py | kiseonjeong/neural-network-for-python | 902307699d59a0a38d45519a0bacd014ba705727 | [
"MIT"
] | null | null | null | train_simple_conv_net.py | kiseonjeong/neural-network-for-python | 902307699d59a0a38d45519a0bacd014ba705727 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pylab as plt
from dataset.mnist import *
from network.optimizer import *
from network.simple_conv_net import SimpleConvNet
from network.trainer import *
# Load the MNIST dataset
(x_train, t_train), (x_test, t_test) = load_mnist(flatten=False)
# Do test for overfit
x_train = x_trai... | 31.25 | 172 | 0.7544 |
85549cc8ba910d6ee92554dc173197768761eb31 | 530 | py | Python | monitoring/mock_ridsp/__init__.py | Orbitalize/InterUSS-Platform | a1d60ec928dc5c63f9dcddd195bfeda7c4c1c84b | [
"Apache-2.0"
] | 58 | 2019-10-03T19:15:47.000Z | 2022-03-09T16:50:47.000Z | monitoring/mock_ridsp/__init__.py | Orbitalize/InterUSS-Platform | a1d60ec928dc5c63f9dcddd195bfeda7c4c1c84b | [
"Apache-2.0"
] | 283 | 2019-09-30T18:35:02.000Z | 2022-03-29T13:36:53.000Z | monitoring/mock_ridsp/__init__.py | Orbitalize/InterUSS-Platform | a1d60ec928dc5c63f9dcddd195bfeda7c4c1c84b | [
"Apache-2.0"
] | 51 | 2019-10-08T18:47:36.000Z | 2022-03-23T08:44:06.000Z | import flask
from .config import Config
webapp = flask.Flask(__name__)
webapp.config.from_object(Config)
print(
'################################################################################\n' + \
'################################ Configuration ################################\n' + \
'\n'.join('## {}: {}'... | 35.333333 | 97 | 0.379245 |
44db78e98e2cef7efabc5042e3519eff80c8d626 | 504 | py | Python | env/lib/python3.8/site-packages/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="familysrc",
parent_name="densitymapbox.hoverlabel.font",
**kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_na... | 28 | 68 | 0.617063 |
d9b1e1db0daff6394f6c076784af99eba4eb0dee | 2,696 | py | Python | tests/operators/vector/test_squeeze_ad_001.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | tests/operators/vector/test_squeeze_ad_001.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | tests/operators/vector/test_squeeze_ad_001.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 a... | 30.988506 | 124 | 0.581231 |
978e9656fd6810dcd9abf0f1b6df216d6b1e8d0b | 3,440 | py | Python | code/translator/hot/tosca/tests/test_tosca_autoscaling.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/translator/hot/tosca/tests/test_tosca_autoscaling.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/translator/hot/tosca/tests/test_tosca_autoscaling.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 37.391304 | 78 | 0.57907 |
4cd053fc1d770fe259998bc493b15c95199a4c8a | 194 | py | Python | setup.py | EthanTGo/ethango-numbergame | f528343287b4de45873425f02d91b971dda62a6e | [
"MIT"
] | null | null | null | setup.py | EthanTGo/ethango-numbergame | f528343287b4de45873425f02d91b971dda62a6e | [
"MIT"
] | null | null | null | setup.py | EthanTGo/ethango-numbergame | f528343287b4de45873425f02d91b971dda62a6e | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name = "ethango_numbergame",
version = 0.1,
description = "Number guessing game",
packages = ["ethango_numbergame"],
zip_safe = False
)
| 17.636364 | 41 | 0.664948 |
2d25685d8f6d0bd7a9bcfd4524bad1a9925d6720 | 1,081 | py | Python | Python/find-palindrome-with-fixed-length.py | Priyansh2/LeetCode-Solutions | d613da1881ec2416ccbe15f20b8000e36ddf1291 | [
"MIT"
] | 4 | 2018-10-11T17:50:56.000Z | 2018-10-11T21:16:44.000Z | Python/find-palindrome-with-fixed-length.py | Priyansh2/LeetCode-Solutions | d613da1881ec2416ccbe15f20b8000e36ddf1291 | [
"MIT"
] | null | null | null | Python/find-palindrome-with-fixed-length.py | Priyansh2/LeetCode-Solutions | d613da1881ec2416ccbe15f20b8000e36ddf1291 | [
"MIT"
] | 4 | 2018-10-11T18:50:32.000Z | 2018-10-12T00:04:09.000Z | # Time: O(n * l)
# Space: O(1)
# math
class Solution(object):
def kthPalindrome(self, queries, intLength):
"""
:type queries: List[int]
:type intLength: int
:rtype: List[int]
"""
def reverse(x):
result = 0
while x:
result = re... | 24.022222 | 60 | 0.432932 |
8af1d47e834c5f128ae9407d68011e8195747e29 | 5,480 | py | Python | src/lib/mine/utility/filesystem.py | rdw20170120/workstation | ed19aa930a83885c2a8cb58eb0bb5afe58f95df3 | [
"MIT"
] | null | null | null | src/lib/mine/utility/filesystem.py | rdw20170120/workstation | ed19aa930a83885c2a8cb58eb0bb5afe58f95df3 | [
"MIT"
] | 2 | 2021-04-06T18:07:32.000Z | 2021-06-02T01:50:40.000Z | src/lib/mine/utility/filesystem.py | rdw20170120/workstation | ed19aa930a83885c2a8cb58eb0bb5afe58f95df3 | [
"MIT"
] | null | null | null | #!/usr/bin/env false
"""TODO: Write
TODO: REVIEW: this module against its siblings.
"""
# Internal packages (absolute references, distributed with Python)
from logging import getLogger
from os import link
from os import makedirs
from os import remove
from os.path import getsize
from os.path import isdir
from os.path i... | 25.37037 | 78 | 0.67719 |
074c55862deafdb5f8060adffb2d4fdde8f10c3a | 1,298 | py | Python | Pytorch/utils.py | JasperMorrison/PytorchToCaffe | 04f0066cdc8a9da92591d7361907c3ea53271707 | [
"MIT"
] | 794 | 2018-09-06T07:38:41.000Z | 2022-03-16T06:30:37.000Z | Pytorch/utils.py | JasperMorrison/PytorchToCaffe | 04f0066cdc8a9da92591d7361907c3ea53271707 | [
"MIT"
] | 111 | 2018-12-04T11:18:27.000Z | 2022-03-31T07:39:11.000Z | Pytorch/utils.py | JasperMorrison/PytorchToCaffe | 04f0066cdc8a9da92591d7361907c3ea53271707 | [
"MIT"
] | 221 | 2018-11-22T08:11:03.000Z | 2022-03-16T07:11:43.000Z | import torch
import numpy as np
class Resize_preprocess(object):
"""Rescales the input PIL.Image to the given 'size_w,size_h'.
"""
def __init__(self, size_w,size_h):
self.size = (size_w,size_h)
def __call__(self, img):
return img.resize(self.size)
class AverageMeter(object):
"""C... | 26.489796 | 94 | 0.581664 |
958ec7606473ad338af996909d0e207a3a32195b | 1,444 | py | Python | test/bugfixes_test.py | sbharadwajj/backpack | 5d484195735e29b1c08848906618f8ba2f339bec | [
"MIT"
] | null | null | null | test/bugfixes_test.py | sbharadwajj/backpack | 5d484195735e29b1c08848906618f8ba2f339bec | [
"MIT"
] | null | null | null | test/bugfixes_test.py | sbharadwajj/backpack | 5d484195735e29b1c08848906618f8ba2f339bec | [
"MIT"
] | null | null | null | import itertools
import pytest
import torch
import backpack
def parameters_issue_30():
possible_values = {
"N": [4],
"C_in": [4],
"C_out": [6],
"H": [6],
"W": [6],
"K": [3],
"S": [1, 3],
"pad": [0, 2],
"dil": [1, 2],
}
configs = [
... | 24.066667 | 81 | 0.567867 |
582872021cd7bd0770197e014695841fc83577e2 | 10,819 | py | Python | tests/manage/z_cluster/nodes/test_disk_failures.py | anubhav-here/ocs-ci | cf922411c721922f58d852167ff9ab8a8a6e15a6 | [
"MIT"
] | null | null | null | tests/manage/z_cluster/nodes/test_disk_failures.py | anubhav-here/ocs-ci | cf922411c721922f58d852167ff9ab8a8a6e15a6 | [
"MIT"
] | null | null | null | tests/manage/z_cluster/nodes/test_disk_failures.py | anubhav-here/ocs-ci | cf922411c721922f58d852167ff9ab8a8a6e15a6 | [
"MIT"
] | null | null | null | import logging
import pytest
import random
from ocs_ci.ocs import node, constants
from ocs_ci.framework.testlib import (
tier4, tier4b, ignore_leftovers, ManageTest, aws_platform_required,
vsphere_platform_required, bugzilla
)
from tests.sanity_helpers import Sanity
from tests.helpers import wait_for_ct_pod_re... | 42.427451 | 120 | 0.669933 |
a24d6b1c501f8ce3270657abedb92168865d7e8d | 9,350 | py | Python | Lib/site-packages/mysql/connector/fabric/caching.py | jmsnur/mytaxi-test | eb7f70d0ac1c4df32aaebaab118a25c83683ce13 | [
"bzip2-1.0.6"
] | 110 | 2020-04-01T02:27:38.000Z | 2022-03-01T16:17:48.000Z | Lib/site-packages/mysql/connector/fabric/caching.py | jmsnur/mytaxi-test | eb7f70d0ac1c4df32aaebaab118a25c83683ce13 | [
"bzip2-1.0.6"
] | 40 | 2020-03-31T23:30:47.000Z | 2022-03-12T00:20:57.000Z | Lib/site-packages/mysql/connector/fabric/caching.py | jmsnur/mytaxi-test | eb7f70d0ac1c4df32aaebaab118a25c83683ce13 | [
"bzip2-1.0.6"
] | 19 | 2020-04-12T19:17:22.000Z | 2022-03-07T17:03:25.000Z | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... | 33.156028 | 78 | 0.598075 |
3085c6509a32bf174b9be0c2be73b315860296ac | 2,357 | py | Python | ooobuild/lo/chart/x_complex_description_access.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/chart/x_complex_description_access.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/chart/x_complex_description_access.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 35.712121 | 154 | 0.703012 |
614cd99aacfc1fa1e332b985f56a69332f97cfa4 | 60,544 | py | Python | webresume/frontend/views.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-ybekele | 276c278612e16b05ea607cfd236d273b77341fe3 | [
"MIT"
] | null | null | null | webresume/frontend/views.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-ybekele | 276c278612e16b05ea607cfd236d273b77341fe3 | [
"MIT"
] | 6 | 2018-12-07T20:46:29.000Z | 2021-06-10T20:54:51.000Z | webresume/frontend/views.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-ybekele | 276c278612e16b05ea607cfd236d273b77341fe3 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
import base64
def index(request):
return render(request, 'index.html', {})
# Example for returning a file from an endpoint
def text_file(request):
return HttpResponse("Hello World", content_type="text/plain")
# FIX THIS to return the conte... | 3,186.526316 | 59,988 | 0.969724 |
b3ed55ba5734f4f22ed1b6a1e701fcec0aedee2c | 4,374 | py | Python | docusign_esign/models/app_store_receipt.py | dennisdejong1995/docusign-esign-python-client | 4255e9b9e8f89f5c89671a7feee4f86d32317abb | [
"MIT"
] | null | null | null | docusign_esign/models/app_store_receipt.py | dennisdejong1995/docusign-esign-python-client | 4255e9b9e8f89f5c89671a7feee4f86d32317abb | [
"MIT"
] | null | null | null | docusign_esign/models/app_store_receipt.py | dennisdejong1995/docusign-esign-python-client | 4255e9b9e8f89f5c89671a7feee4f86d32317abb | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | 28.776316 | 140 | 0.584134 |
b36cb8522d81bb7a5c37e97fa9f75621b4769f47 | 1,286 | py | Python | tensorflow_datasets/image_classification/rock_paper_scissors_test.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | 7 | 2020-04-21T01:28:30.000Z | 2021-06-13T07:23:33.000Z | tensorflow_datasets/image_classification/rock_paper_scissors_test.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/image_classification/rock_paper_scissors_test.py | shikhar2707/datasets | c034a193967d6d72152196708a5638e546e320f4 | [
"Apache-2.0"
] | 4 | 2020-04-25T15:48:46.000Z | 2020-11-22T20:35:01.000Z | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets 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 appl... | 30.619048 | 86 | 0.769829 |
464568ec3b957e961b32777549a6b15af86b8ae8 | 4,927 | py | Python | tests/m2m_recursive/tests.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 5 | 2019-02-15T16:47:50.000Z | 2021-12-26T18:52:23.000Z | tests/m2m_recursive/tests.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | null | null | null | tests/m2m_recursive/tests.py | iMerica/dj-models | fbe4a55ac362f9355a2298f58aa0deb0b6082e19 | [
"BSD-3-Clause"
] | 2 | 2021-08-09T02:29:09.000Z | 2021-08-20T03:30:11.000Z | from operator import attrgetter
from djmodels.test import TestCase
from .models import Person
class RecursiveM2MTests(TestCase):
def setUp(self):
self.a, self.b, self.c, self.d = [
Person.objects.create(name=name)
for name in ["Anne", "Bill", "Chuck", "David"]
]
... | 27.071429 | 74 | 0.494621 |
3adb1c39c30837e2516fb2b85d701821a996f29c | 2,060 | py | Python | bioblend/galaxy/config/__init__.py | kxk302/bioblend | a0af6725228c1c6bce6bda2994cd5ec3199d12eb | [
"MIT"
] | null | null | null | bioblend/galaxy/config/__init__.py | kxk302/bioblend | a0af6725228c1c6bce6bda2994cd5ec3199d12eb | [
"MIT"
] | null | null | null | bioblend/galaxy/config/__init__.py | kxk302/bioblend | a0af6725228c1c6bce6bda2994cd5ec3199d12eb | [
"MIT"
] | null | null | null | """
Contains possible interaction dealing with Galaxy configuration.
"""
from bioblend.galaxy.client import Client
class ConfigClient(Client):
module = "configuration"
def __init__(self, galaxy_instance):
super().__init__(galaxy_instance)
def get_config(self):
"""
Get a list of ... | 29.428571 | 80 | 0.56165 |
31a8b8a1531ff29b6ff6bbcfc1f7c5b17cfb7400 | 501 | py | Python | tests/test_named_values.py | KolesnichenkoDS/PhysPy | 09452288a660a0c18fe0fef52b8e8f0d4d23ed8c | [
"MIT"
] | null | null | null | tests/test_named_values.py | KolesnichenkoDS/PhysPy | 09452288a660a0c18fe0fef52b8e8f0d4d23ed8c | [
"MIT"
] | null | null | null | tests/test_named_values.py | KolesnichenkoDS/PhysPy | 09452288a660a0c18fe0fef52b8e8f0d4d23ed8c | [
"MIT"
] | null | null | null | from unittest import TestCase
import physpy
class TestNamedValue(TestCase):
def test_one_value_approx(self):
'''calculate an approximate value for one measurement'''
x = physpy.value('x', [42], 0)
self.assertEqual(x.approx(), 42)
def test_ten_values_approx(self):
'''ca... | 31.3125 | 65 | 0.596806 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.