hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d864fea283fa92b4bd5e1f594830ca0f18e88c7d | 2,224 | py | Python | upstream/npc/hubconf.py | amberww/s3prl | d74784f80da2b5a84e64ff445e583163d215a3f9 | [
"MIT"
] | 3 | 2021-04-25T01:50:01.000Z | 2021-06-02T16:43:44.000Z | upstream/npc/hubconf.py | amberww/s3prl | d74784f80da2b5a84e64ff445e583163d215a3f9 | [
"MIT"
] | null | null | null | upstream/npc/hubconf.py | amberww/s3prl | d74784f80da2b5a84e64ff445e583163d215a3f9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*- #
"""*********************************************************************************************"""
# FileName [ upstream/npc/hubconf.py ]
# Synopsis [ the npc torch hubconf ]
# Author [ S3PRL ]
# Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ]
"""******************... | 32.231884 | 99 | 0.571942 |
f5f41957c7a2b1e32a19f3a825d607fcf690fb8c | 3,892 | py | Python | sdk/python/pulumi_azure_nextgen/datafactory/v20180601/get_integration_runtime.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/datafactory/v20180601/get_integration_runtime.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/datafactory/v20180601/get_integration_runtime.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # 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
from... | 31.901639 | 156 | 0.634892 |
737de2eaa1d23ec2464b39dcd3edcc32f3444509 | 387 | py | Python | #9 Palindrome Number.py | medisean/leetcode | f218fb738fb2b57f5eea3795a0a02cf495561465 | [
"MIT"
] | null | null | null | #9 Palindrome Number.py | medisean/leetcode | f218fb738fb2b57f5eea3795a0a02cf495561465 | [
"MIT"
] | null | null | null | #9 Palindrome Number.py | medisean/leetcode | f218fb738fb2b57f5eea3795a0a02cf495561465 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
class Solution:
def isPalindrome(self, x: int) -> bool:
if x < 0:
return False
s = str(x)
for i in range(int(len(s)/2)):
last = len(s) - i - 1
if s[i] != s[last]:
return False
return True
if __name__ == "__main_... | 24.1875 | 43 | 0.501292 |
b7cb87df69f374b5047e28a5d75f69c29597a51f | 5,151 | py | Python | x2paddle/core/fluid_code.py | aiyasin/X2Paddle | b37959f2ecdc09fdec7a38c01272126a7f3800e4 | [
"Apache-2.0"
] | null | null | null | x2paddle/core/fluid_code.py | aiyasin/X2Paddle | b37959f2ecdc09fdec7a38c01272126a7f3800e4 | [
"Apache-2.0"
] | null | null | null | x2paddle/core/fluid_code.py | aiyasin/X2Paddle | b37959f2ecdc09fdec7a38c01272126a7f3800e4 | [
"Apache-2.0"
] | 1 | 2021-02-22T09:05:44.000Z | 2021-02-22T09:05:44.000Z | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 35.770833 | 80 | 0.522229 |
7c5d639b74b7f3c7dd8027a81da32eb5745667ef | 5,219 | py | Python | visual_search/server/server.py | tuan3w/visual_search | 62665d4ac58669bad8e7f5ffed18d2914ffa8b01 | [
"MIT"
] | 464 | 2017-03-10T18:29:56.000Z | 2022-03-26T08:52:38.000Z | visual_search/server/server.py | slothkong/visual_search | 4eb9eae6360eafde1b9249721dccd333057efdfe | [
"MIT"
] | 21 | 2017-03-14T02:43:32.000Z | 2020-06-11T14:49:11.000Z | visual_search/server/server.py | pranavramesh123/visual_search | d317dbfd309b26d1a50f24824ca93e405b36486f | [
"MIT"
] | 132 | 2017-03-10T19:24:26.000Z | 2022-02-04T12:35:49.000Z | #!/usr/bin/env python
from flask import Flask
from flask import request, jsonify, \
send_from_directory
import base64
import tensorflow as tf
from elasticsearch import Elasticsearch
from extractor import Extractor
from utils.im_util import read_img_blob
from es.ImFea_pb2 import ImFea, ImFeaArr,\
ImFeaBin... | 26.095 | 74 | 0.587277 |
42ad869ec47f2d46073488aabc5de9df69df7c18 | 4,137 | py | Python | sekizai/templatetags/sekizai_tags.py | yakky/django-sekizai | 4869653f24e39070456c572624e5262824814d3b | [
"BSD-3-Clause"
] | 1 | 2016-02-13T01:00:30.000Z | 2016-02-13T01:00:30.000Z | sekizai/templatetags/sekizai_tags.py | sitkatech/django-sekizai | dab92a6bcaf6a0c1bc6ea43b3f685008ac5b51e1 | [
"BSD-3-Clause"
] | null | null | null | sekizai/templatetags/sekizai_tags.py | sitkatech/django-sekizai | dab92a6bcaf6a0c1bc6ea43b3f685008ac5b51e1 | [
"BSD-3-Clause"
] | null | null | null | from classytags.arguments import Argument, Flag
from classytags.core import Tag, Options
from classytags.parser import Parser
from django import template
from django.conf import settings
from django.utils.importlib import import_module
from sekizai.helpers import get_varname
register = template.Library()
def validate... | 28.93007 | 79 | 0.648054 |
f0fa88f033b5ffc17d1d45e9c4725fb291e13a37 | 4,518 | py | Python | azure-iot-hub/azure/iot/hub/iothub_http_runtime_manager.py | anthonyvercolano/azure-iot-sdk-python | f54a3712c288406b0dfcaa2ffa02a13b1c9b6f32 | [
"MIT"
] | null | null | null | azure-iot-hub/azure/iot/hub/iothub_http_runtime_manager.py | anthonyvercolano/azure-iot-sdk-python | f54a3712c288406b0dfcaa2ffa02a13b1c9b6f32 | [
"MIT"
] | null | null | null | azure-iot-hub/azure/iot/hub/iothub_http_runtime_manager.py | anthonyvercolano/azure-iot-sdk-python | f54a3712c288406b0dfcaa2ffa02a13b1c9b6f32 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .aut... | 43.442308 | 105 | 0.687915 |
4e2fa657911e473e07f790232f59f9ec14665422 | 5,062 | py | Python | pyradar/Chapter08/pulse_train_ambiguity_example.py | mberkanbicer/software | 89f8004f567129216b92c156bbed658a9c03745a | [
"Apache-2.0"
] | 1 | 2020-12-18T04:07:54.000Z | 2020-12-18T04:07:54.000Z | pyradar/Chapter08/pulse_train_ambiguity_example.py | miltondsantos/software | d27375257b0260cad901837612fbca0174134229 | [
"Apache-2.0"
] | null | null | null | pyradar/Chapter08/pulse_train_ambiguity_example.py | miltondsantos/software | d27375257b0260cad901837612fbca0174134229 | [
"Apache-2.0"
] | null | null | null | """
Project: RadarBook
File: pulse_train_ambiguity_example.py
Created by: Lee A. Harrison
On: 1/24/2019
Created with: PyCharm
Copyright (C) 2019 Artech House (artech@artechhouse.com)
This file is part of Introduction to Radar Using Python and MATLAB
and can not be copied and/or distributed without the express permissi... | 34.435374 | 107 | 0.642434 |
5724d8054b841fb1b79f098836e49676214a849f | 5,484 | py | Python | retdec/resource.py | s3rvac/retdec-python | 6360ecba75fae5420de2bf2ba63cf8a8c0e0c7cc | [
"MIT"
] | 102 | 2015-02-08T20:00:43.000Z | 2022-02-06T20:34:24.000Z | retdec/resource.py | s3rvac/retdec-python | 6360ecba75fae5420de2bf2ba63cf8a8c0e0c7cc | [
"MIT"
] | 5 | 2016-08-02T04:46:29.000Z | 2018-10-11T06:08:32.000Z | retdec/resource.py | s3rvac/retdec-python | 6360ecba75fae5420de2bf2ba63cf8a8c0e0c7cc | [
"MIT"
] | 24 | 2015-04-08T13:27:54.000Z | 2020-12-07T21:22:23.000Z | #
# Project: retdec-python
# Copyright: (c) 2015 by Petr Zemek <s3rvac@gmail.com> and contributors
# License: MIT, see the LICENSE file for more details
#
"""Base class of all resources."""
import contextlib
import datetime
import os
import shutil
import time
class Resource:
"""Base class of all resources.
... | 34.062112 | 79 | 0.636214 |
5667327f44fd579d3b695d4e108a6127ad7f3326 | 3,141 | py | Python | openstack_dashboard/dashboards/admin/volumes/views.py | shhui/horizon | fd8cf6e31c07b147289bfb86c90133599eb2906e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/volumes/views.py | shhui/horizon | fd8cf6e31c07b147289bfb86c90133599eb2906e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/volumes/views.py | shhui/horizon | fd8cf6e31c07b147289bfb86c90133599eb2906e | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | 34.9 | 78 | 0.713785 |
84608b947c43b89677a4b62c07b0ce79a5cc0cf7 | 13,697 | py | Python | multivitamin/data/response/response.py | gumgum/multivitamin | 11e2b8944fbe24d5f6f34d375d2cefa6be560be5 | [
"Apache-2.0"
] | 8 | 2019-05-08T20:27:41.000Z | 2021-04-19T15:17:22.000Z | multivitamin/data/response/response.py | gumgum/multivitamin | 11e2b8944fbe24d5f6f34d375d2cefa6be560be5 | [
"Apache-2.0"
] | 9 | 2019-05-17T19:16:50.000Z | 2022-03-11T23:46:55.000Z | multivitamin/data/response/response.py | gumgum/multivitamin | 11e2b8944fbe24d5f6f34d375d2cefa6be560be5 | [
"Apache-2.0"
] | 4 | 2019-05-07T18:00:51.000Z | 2019-06-22T02:35:51.000Z | import json
import traceback
import glog as log
from dataclasses import asdict
from multivitamin.data import Request
from multivitamin.data.response.io import AvroIO
from multivitamin.data.response.dtypes import (
ResponseInternal,
Region,
VideoAnn,
ImageAnn,
Footprint,
)
from multivitamin.data.re... | 35.392765 | 119 | 0.618895 |
33f6597017873e1747160dd2335c33ecd6b361e7 | 627 | py | Python | Python_Ex_vazio/ex077.py | matheusmiguelsa/Exerc-cios-de-Python | 53387266b747f79e67964356993b38c2267ac04a | [
"MIT"
] | null | null | null | Python_Ex_vazio/ex077.py | matheusmiguelsa/Exerc-cios-de-Python | 53387266b747f79e67964356993b38c2267ac04a | [
"MIT"
] | null | null | null | Python_Ex_vazio/ex077.py | matheusmiguelsa/Exerc-cios-de-Python | 53387266b747f79e67964356993b38c2267ac04a | [
"MIT"
] | null | null | null | tupla = (
'casa', 'quarto', 'apartamento', 'pescar', 'gosto', 'lol', 'corki',
'python', 'biologia', 'programacao',
'linux', 'casamento', 'noivado'
)
for tuplinhas in tupla:
print(f'\nNa palavra {tuplinhas} temos:', end=' ')
for letras in tuplinhas:
if letras.lower() in 'aeiou':
p... | 29.857143 | 71 | 0.511962 |
b8c245198b326f17ac8aa053d68d36b660f36673 | 4,291 | py | Python | ddtrace/contrib/celery/utils.py | p7g/dd-trace-py | 141ac0ab6e9962e3b3bafc9de172076075289a19 | [
"Apache-2.0",
"BSD-3-Clause"
] | 308 | 2016-12-07T16:49:27.000Z | 2022-03-15T10:06:45.000Z | ddtrace/contrib/celery/utils.py | p7g/dd-trace-py | 141ac0ab6e9962e3b3bafc9de172076075289a19 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1,928 | 2016-11-28T17:13:18.000Z | 2022-03-31T21:43:19.000Z | ddtrace/contrib/celery/utils.py | p7g/dd-trace-py | 141ac0ab6e9962e3b3bafc9de172076075289a19 | [
"Apache-2.0",
"BSD-3-Clause"
] | 311 | 2016-11-27T03:01:49.000Z | 2022-03-18T21:34:03.000Z | from typing import Any
from typing import Dict
from weakref import WeakValueDictionary
from ddtrace.span import Span
from .constants import CTX_KEY
TAG_KEYS = frozenset(
[
("compression", "celery.compression"),
("correlation_id", "celery.correlation_id"),
("countdown", "celery.countdown"... | 33.787402 | 90 | 0.638313 |
c3becdd11b9a8e8e8d317e6c0003a5f60f438bb9 | 2,470 | py | Python | discord/object.py | MinerChAI/discord.py | eeabb8ebb6eb5b6af2dea02c8d66c19c0e0e5dff | [
"MIT"
] | null | null | null | discord/object.py | MinerChAI/discord.py | eeabb8ebb6eb5b6af2dea02c8d66c19c0e0e5dff | [
"MIT"
] | null | null | null | discord/object.py | MinerChAI/discord.py | eeabb8ebb6eb5b6af2dea02c8d66c19c0e0e5dff | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to u... | 32.933333 | 87 | 0.707692 |
ee143aefcbb6881123b8b113b62c44f377862faa | 1,391 | py | Python | setup.py | laundmo/multiton | 3609d1b6016ebb1845c5c5e4c3387ccb780b7176 | [
"MIT"
] | 1 | 2020-08-13T23:58:36.000Z | 2020-08-13T23:58:36.000Z | setup.py | laundmo/multiton | 3609d1b6016ebb1845c5c5e4c3387ccb780b7176 | [
"MIT"
] | null | null | null | setup.py | laundmo/multiton | 3609d1b6016ebb1845c5c5e4c3387ccb780b7176 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [ ]
setup_requirements = ['pytest-runner', ]
test_requiremen... | 28.979167 | 96 | 0.659957 |
4242fc8b8dc204332de4d2b727fbdaac7ab16aba | 2,664 | py | Python | webscrapbook/themes/default/locales/zh/messages.py | clach04/PyWebScrapBook | 310e8f20cc5337336875679246b9269265b4476a | [
"MIT"
] | 39 | 2019-04-10T18:07:40.000Z | 2022-02-07T07:11:30.000Z | webscrapbook/themes/default/locales/zh/messages.py | clach04/PyWebScrapBook | 310e8f20cc5337336875679246b9269265b4476a | [
"MIT"
] | 56 | 2019-05-07T23:29:14.000Z | 2022-02-24T10:33:43.000Z | webscrapbook/themes/default/locales/zh/messages.py | clach04/PyWebScrapBook | 310e8f20cc5337336875679246b9269265b4476a | [
"MIT"
] | 15 | 2019-06-12T05:16:43.000Z | 2022-01-16T13:24:11.000Z | bidi_dir = 'ltr'
#########################################################################
# scrapbook.cache
#########################################################################
# map.html
cache_index_toggle_all = '全部展開或收合'
cache_index_search_link_title = '搜尋'
cache_index_source_link_title = '來源連結'
# search.ht... | 44.4 | 290 | 0.661036 |
ba4207c06651f39cfdf21e70e8433cecac0b20f9 | 10,225 | py | Python | tests/test_dotfinder_chunking.py | kipolovnikov/cooltools | 986fe95f96978f669204226d99e3c0a6fd5be208 | [
"MIT"
] | 4 | 2018-12-24T10:37:25.000Z | 2021-12-16T08:02:22.000Z | tests/test_dotfinder_chunking.py | kipolovnikov/cooltools | 986fe95f96978f669204226d99e3c0a6fd5be208 | [
"MIT"
] | 1 | 2018-05-03T15:17:24.000Z | 2018-05-03T15:17:24.000Z | tests/test_dotfinder_chunking.py | kipolovnikov/cooltools | 986fe95f96978f669204226d99e3c0a6fd5be208 | [
"MIT"
] | 3 | 2018-12-12T04:53:05.000Z | 2020-05-15T10:13:50.000Z | # create a test for the chunking versions of 'get_adjusted_expected_tile_some_nans':
import numpy as np
import pandas as pd
import os.path as op
from cooltools import dotfinder
from cooltools.lib.numutils import LazyToeplitz
# adjust the path for data:
testdir = op.realpath(op.dirname(__file__))
# mock input data... | 35.380623 | 85 | 0.609095 |
0df406444db76855a9e03dbfe44dcc70c57cc35e | 2,906 | py | Python | h2o-hadoop-common/tests_fault_tolerance/python/test_grid_reload.py | sergeiten/h2o-3 | 6ba1bb793dc702dbad7638f0864b85757a2ffd19 | [
"Apache-2.0"
] | 1 | 2021-01-30T22:19:48.000Z | 2021-01-30T22:19:48.000Z | h2o-hadoop-common/tests_fault_tolerance/python/test_grid_reload.py | sergeiten/h2o-3 | 6ba1bb793dc702dbad7638f0864b85757a2ffd19 | [
"Apache-2.0"
] | null | null | null | h2o-hadoop-common/tests_fault_tolerance/python/test_grid_reload.py | sergeiten/h2o-3 | 6ba1bb793dc702dbad7638f0864b85757a2ffd19 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys
import os
import time
sys.path.insert(1, os.path.join("..", "..", "..", "h2o-py"))
from tests import pyunit_utils
import fault_tolerance_utils as utils
import h2o
from h2o.grid.grid_search import H2OGridSearch
from h2o.estimators.gbm import H2OGradientBoostingEstimator
i... | 36.78481 | 109 | 0.593599 |
7d2524e97e053fccb343b2bd2de3b71613be093f | 15,357 | py | Python | src/menubar.py | Mirko-r/Notepy | d6de39145b6597d1cae32df0fea1a2fbd92a7457 | [
"MIT"
] | 12 | 2021-06-20T14:51:44.000Z | 2021-11-15T09:51:48.000Z | src/menubar.py | Mirko-r/Notepy | d6de39145b6597d1cae32df0fea1a2fbd92a7457 | [
"MIT"
] | 2 | 2021-09-23T14:07:36.000Z | 2021-09-24T14:58:41.000Z | src/menubar.py | Mirko-r/Notepy | d6de39145b6597d1cae32df0fea1a2fbd92a7457 | [
"MIT"
] | 2 | 2021-07-17T07:00:41.000Z | 2021-07-17T11:17:30.000Z | import tkinter as tk
import os
import re
from tkinter.colorchooser import askcolor
from src.syntax_highlighting import SyntaxHighlighting
from time import sleep
class Menubar():
# initialising the menu bar of editor
def __init__(self, parent):
self._parent = parent
self.syntax = parent.syntax_... | 39.276215 | 74 | 0.620824 |
b036f78879dfbc60611c67248d3a0709dbdc0795 | 1,452 | py | Python | examples/benchmark.py | alvistack/ionrock-cachecontrol | 09992a140edca2602cf8230370fc8b28566a069b | [
"Apache-2.0"
] | 353 | 2015-01-03T11:07:43.000Z | 2022-03-01T10:24:29.000Z | examples/benchmark.py | alvistack/ionrock-cachecontrol | 09992a140edca2602cf8230370fc8b28566a069b | [
"Apache-2.0"
] | 190 | 2015-01-07T10:00:49.000Z | 2022-02-23T19:04:03.000Z | examples/benchmark.py | alvistack/ionrock-cachecontrol | 09992a140edca2602cf8230370fc8b28566a069b | [
"Apache-2.0"
] | 108 | 2015-01-05T19:17:33.000Z | 2022-02-27T20:02:18.000Z | # SPDX-FileCopyrightText: 2015 Eric Larson
#
# SPDX-License-Identifier: Apache-2.0
import sys
import requests
import argparse
from multiprocessing import Process
from datetime import datetime
from wsgiref.simple_server import make_server
from cachecontrol import CacheControl
HOST = "localhost"
PORT = 8050
URL = "htt... | 20.166667 | 87 | 0.61708 |
1e69774c5e20b7a3fad394cdad7a38bc5651cef5 | 1,877 | py | Python | lib/compress/plot_delta_freq.py | phil-mansfield/guppy | 5394d20b83912cd072a358c38bae18a06853f419 | [
"MIT"
] | 1 | 2021-03-11T01:44:22.000Z | 2021-03-11T01:44:22.000Z | lib/compress/plot_delta_freq.py | phil-mansfield/guppy | 5394d20b83912cd072a358c38bae18a06853f419 | [
"MIT"
] | null | null | null | lib/compress/plot_delta_freq.py | phil-mansfield/guppy | 5394d20b83912cd072a358c38bae18a06853f419 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import palette
from palette import pc
def main():
palette.configure(False)
d_indiv, n_indiv = np.loadtxt("indiv_dx_min.txt").T
d_global, n_global = np.loadtxt("global_dx_min.txt").T
d_rot_global, n_rot_global = np.loadtxt("global_rotation.txt").T
... | 36.096154 | 76 | 0.613745 |
145282a06d92ee20032cabe041fa6a833f9a75a9 | 3,426 | py | Python | saas/migrations/0006_0_3_0.py | gikoluo/djaodjin-saas | badd7894ac327191008a1b3a0ebd0d07b55908c3 | [
"BSD-2-Clause"
] | null | null | null | saas/migrations/0006_0_3_0.py | gikoluo/djaodjin-saas | badd7894ac327191008a1b3a0ebd0d07b55908c3 | [
"BSD-2-Clause"
] | null | null | null | saas/migrations/0006_0_3_0.py | gikoluo/djaodjin-saas | badd7894ac327191008a1b3a0ebd0d07b55908c3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2017-12-13 19:08
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import saas.utils
class Migration(migrations.Migration):
dependencies = [
('saas', '0005_role_extra'),
]
oper... | 36.446809 | 166 | 0.568009 |
c65642780a4c316144612e6cff0977f31408d32f | 10,018 | py | Python | ParaMol/Utils/interface.py | mnagaku/ParaMol | 13529f584e2d50076e038388ecbdd57af23c73b9 | [
"MIT"
] | 15 | 2021-03-08T17:56:36.000Z | 2022-03-30T01:46:29.000Z | ParaMol/Utils/interface.py | mnagaku/ParaMol | 13529f584e2d50076e038388ecbdd57af23c73b9 | [
"MIT"
] | 7 | 2021-03-28T05:53:59.000Z | 2021-10-15T15:37:56.000Z | ParaMol/Utils/interface.py | mnagaku/ParaMol | 13529f584e2d50076e038388ecbdd57af23c73b9 | [
"MIT"
] | 2 | 2021-04-30T06:42:09.000Z | 2021-06-21T05:49:29.000Z | # -*- coding: utf-8 -*-
"""
Description
-----------
This module defines the :obj:`ParaMol.Utils.interface.ParaMolInterface` used for ParaMol to interact with system.
"""
import logging
import subprocess
import os
import shutil
class ParaMolInterface:
"""
This class defines method that has, for example, movin... | 35.027972 | 154 | 0.576662 |
ecbcfcc0ab3ecbf577f2f7730a342d2779198923 | 136 | py | Python | desafio-003/somando-dois-numeros-printados.py | roberto-cardoso/desafios-python | 524a5c723c3a85a441cd6bc226dff6009731d3f6 | [
"MIT"
] | null | null | null | desafio-003/somando-dois-numeros-printados.py | roberto-cardoso/desafios-python | 524a5c723c3a85a441cd6bc226dff6009731d3f6 | [
"MIT"
] | null | null | null | desafio-003/somando-dois-numeros-printados.py | roberto-cardoso/desafios-python | 524a5c723c3a85a441cd6bc226dff6009731d3f6 | [
"MIT"
] | null | null | null | n1 = int(input('Primero número:'))
n2 = int(input('Segundo número:'))
n3 = n1 + n2
print('A soma entre {} e {} é {}.'.format(n1,n2,n3))
| 27.2 | 52 | 0.595588 |
467cac3e1cac631ec139f8527d106e3825fef8a0 | 3,476 | py | Python | app.py | Rogergonzalez21/telegram_tts_bot | 51ceb66bdb2febfa09253e4aac531dcfac7dba12 | [
"MIT"
] | 3 | 2016-05-09T23:55:19.000Z | 2016-08-24T22:30:02.000Z | app.py | Rogergonzalez21/telegram_tts_bot | 51ceb66bdb2febfa09253e4aac531dcfac7dba12 | [
"MIT"
] | 1 | 2018-02-13T14:05:58.000Z | 2018-02-13T14:05:58.000Z | app.py | Rogergonzalez21/telegram_tts_bot | 51ceb66bdb2febfa09253e4aac531dcfac7dba12 | [
"MIT"
] | 3 | 2016-06-03T19:52:08.000Z | 2021-06-10T14:58:07.000Z | from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
import telegram
import logging
import secrets
import os
from gtts import gTTS
from datetime import datetime
bot = telegram.Bot(token=secrets.bot_token)
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
... | 33.104762 | 175 | 0.682969 |
03f38a4eccb6410e0dbdb3584c7bd8afc2292e6a | 617 | py | Python | potd_ii/picture_of_the_day/migrations/0004_potd_image_thumbnail_url.py | qubitstream/picture_of_the_day_aggregation_site_2 | 675a354a84b8f3184cfa2c7568637be886939704 | [
"CNRI-Python"
] | null | null | null | potd_ii/picture_of_the_day/migrations/0004_potd_image_thumbnail_url.py | qubitstream/picture_of_the_day_aggregation_site_2 | 675a354a84b8f3184cfa2c7568637be886939704 | [
"CNRI-Python"
] | null | null | null | potd_ii/picture_of_the_day/migrations/0004_potd_image_thumbnail_url.py | qubitstream/picture_of_the_day_aggregation_site_2 | 675a354a84b8f3184cfa2c7568637be886939704 | [
"CNRI-Python"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11rc1 on 2017-03-25 18:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('picture_of_the_day', '0003_auto_20170325_1653'),
]
operations = [
migratio... | 29.380952 | 195 | 0.67423 |
b1f3dc88d7f1d49a972be8b07a26264c6f28c120 | 2,411 | py | Python | scripts/github_db_functions.py | navierula/DivHacks2017 | 2b272bb08f499de4309c961156a6f6a93124ec2f | [
"MIT"
] | null | null | null | scripts/github_db_functions.py | navierula/DivHacks2017 | 2b272bb08f499de4309c961156a6f6a93124ec2f | [
"MIT"
] | null | null | null | scripts/github_db_functions.py | navierula/DivHacks2017 | 2b272bb08f499de4309c961156a6f6a93124ec2f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 15 18:13:31 2017
@author: navrajnarula
"""
import pandas as pd
import matplotlib.pyplot as plt
import itertools
import numpy as np
from collections import Counter
# read in dataset
df = pd.read_csv("data_sources/GitHub_Terms_Data.csv", sep=';', e... | 25.378947 | 92 | 0.645375 |
ef8f447a21ed4a59444433e999615b0e69317218 | 4,973 | py | Python | src/optim/ae_trainer.py | wenyushi451/Deep-SAD-PyTorch | 168d31f538a50fb029739206994ea5517d907853 | [
"MIT"
] | null | null | null | src/optim/ae_trainer.py | wenyushi451/Deep-SAD-PyTorch | 168d31f538a50fb029739206994ea5517d907853 | [
"MIT"
] | null | null | null | src/optim/ae_trainer.py | wenyushi451/Deep-SAD-PyTorch | 168d31f538a50fb029739206994ea5517d907853 | [
"MIT"
] | null | null | null | from base.base_trainer import BaseTrainer
from base.base_dataset import BaseADDataset
from base.base_net import BaseNet
from sklearn.metrics import roc_auc_score
import logging
import time
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
class AETrainer(BaseTrainer):
def __init_... | 36.036232 | 119 | 0.584154 |
612a74fa44487e3939237a2df38aac214b52a653 | 14,408 | py | Python | pysnmp-with-texts/CISCO-TPC-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/CISCO-TPC-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/CISCO-TPC-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module CISCO-TPC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-TPC-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:14:25 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | 148.536082 | 1,427 | 0.77686 |
534660aad9f0a30841842b688232ba0388a38bba | 36,911 | py | Python | test/test_manager.py | kapilpokhrel/qtile | c9eac5aed41c22d87e22e7bc4b7b7fb64e863c47 | [
"MIT"
] | null | null | null | test/test_manager.py | kapilpokhrel/qtile | c9eac5aed41c22d87e22e7bc4b7b7fb64e863c47 | [
"MIT"
] | null | null | null | test/test_manager.py | kapilpokhrel/qtile | c9eac5aed41c22d87e22e7bc4b7b7fb64e863c47 | [
"MIT"
] | 1 | 2020-04-27T22:20:11.000Z | 2020-04-27T22:20:11.000Z | # Copyright (c) 2011 Florian Mounier
# Copyright (c) 2011 Anshuman Bhaduri
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2013 xarvh
# Copyright (c) 2013 Craig Barnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 Adi Sieker
# Copyright (c) 2014 Sebastien Blot
# Copyright (c) 2020 Mikel Ward
#
# Permissio... | 34.145236 | 93 | 0.643846 |
223d74ee2fd6eb1ccb704ce63361401949f27ec4 | 6,351 | py | Python | f5/bigip/tm/gtm/test/functional/test_datacenter.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 272 | 2016-02-23T06:05:44.000Z | 2022-02-20T02:09:32.000Z | f5/bigip/tm/gtm/test/functional/test_datacenter.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 1,103 | 2016-02-11T17:48:03.000Z | 2022-02-15T17:13:37.000Z | f5/bigip/tm/gtm/test/functional/test_datacenter.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 167 | 2016-02-11T17:48:21.000Z | 2022-01-17T20:13:05.000Z | # Copyright 2014-2017 F5 Networks 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 ... | 36.291429 | 74 | 0.667769 |
2717ea40a531eec3c4bbb30063e5145cbdaf304b | 2,926 | py | Python | spotdl/providers/audio/youtube.py | phcreery/spotdl-v4 | 3bd3768de10ae80b5e1ba3bbe6b792f7fc9f8dfc | [
"MIT"
] | null | null | null | spotdl/providers/audio/youtube.py | phcreery/spotdl-v4 | 3bd3768de10ae80b5e1ba3bbe6b792f7fc9f8dfc | [
"MIT"
] | null | null | null | spotdl/providers/audio/youtube.py | phcreery/spotdl-v4 | 3bd3768de10ae80b5e1ba3bbe6b792f7fc9f8dfc | [
"MIT"
] | null | null | null | """
Youtube module for downloading and searching songs.
"""
from typing import List, Optional
from pytube import Search
from spotdl.utils.formatter import create_song_title, create_search_query
from spotdl.providers.audio.base import AudioProvider
from spotdl.types import Song
from spotdl.types.search_result import ... | 28.686275 | 91 | 0.58339 |
9f102748d8a22153c3e22ccce9480925c8b24684 | 3,718 | py | Python | polls/forms.py | arch1tect1/MSForHR | 8bab6329cc56a2b509d472b42f91ddd1aa3ac28b | [
"Apache-2.0"
] | null | null | null | polls/forms.py | arch1tect1/MSForHR | 8bab6329cc56a2b509d472b42f91ddd1aa3ac28b | [
"Apache-2.0"
] | null | null | null | polls/forms.py | arch1tect1/MSForHR | 8bab6329cc56a2b509d472b42f91ddd1aa3ac28b | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django.contrib.auth.models import User
from django import forms
from .models import File
class FileAddForm(forms.ModelForm):
name = forms.CharField(label="", widget=forms.TextInput(attrs={'class':'form-control', 'placeholder':'Name'}), )
da... | 51.638889 | 334 | 0.68908 |
cd719f6ae4bfbeec1a74dbe07273ae538d85feb4 | 18,226 | py | Python | automol/vmat.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/vmat.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/vmat.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | """ V-Matrix: Variable V-Matrix (V-Matrix without coordinate values)
"""
import itertools
import more_itertools
import numpy
import autoread as ar
import autowrite as aw
from phydat import ptab
# # constructors
def from_data(symbs, key_mat, name_mat=None, one_indexed=False):
""" V-Matrix constructor (V-Matrix wi... | 29.302251 | 79 | 0.626029 |
32a7740e83e40107c5183a4c5032016cf108b47d | 2,310 | py | Python | code/ch_02_foundations/_03_multipe_compares.py | TimothyHelton/write-pythonic-code-demos | 5d8aff7ee261f6b2ea0085d9a428d34b1bb875d0 | [
"MIT"
] | null | null | null | code/ch_02_foundations/_03_multipe_compares.py | TimothyHelton/write-pythonic-code-demos | 5d8aff7ee261f6b2ea0085d9a428d34b1bb875d0 | [
"MIT"
] | null | null | null | code/ch_02_foundations/_03_multipe_compares.py | TimothyHelton/write-pythonic-code-demos | 5d8aff7ee261f6b2ea0085d9a428d34b1bb875d0 | [
"MIT"
] | null | null | null | from enum import Enum
from timeit import repeat
def main():
d_text = input("Which direction [n,s,w,e,nw,ne,sw,se]? ")
m = Moves.parse(d_text)
if m is None:
print("That's not a move!")
return
print(m)
# ******** less pythonic ********
if m == Moves.North or m == Moves.South o... | 24.574468 | 72 | 0.517749 |
0dbccd2eeeae1b022adef06c9a5c7fcb7dada719 | 790 | py | Python | XML/ex3_xmltodict_single.py | ramyacr97/RamyaPython | 27ae8c88ec1459372d422fa5f97baa415898f875 | [
"Apache-2.0"
] | null | null | null | XML/ex3_xmltodict_single.py | ramyacr97/RamyaPython | 27ae8c88ec1459372d422fa5f97baa415898f875 | [
"Apache-2.0"
] | 4 | 2021-03-31T19:20:41.000Z | 2021-12-13T20:25:28.000Z | XML/ex3_xmltodict_single.py | ramyacr97/RamyaPython | 27ae8c88ec1459372d422fa5f97baa415898f875 | [
"Apache-2.0"
] | null | null | null | #!usr/bin/env python
import xmltodict
def fileopenread(filename):
f = open(filename)
xmldata = f.read().strip()
my_xml = xmltodict.parse(xmldata)
return my_xml
file1 = fileopenread("show_security_zones.xml")
file2 = fileopenread("show_security_zones_single_trust.xml")
#####Question 3B ####
print(type... | 29.259259 | 79 | 0.729114 |
4bae7ab2047a69911a92b0f68c9f0b4d1d6ace11 | 848 | py | Python | test/test_control_flow.py | vlasenkov/matchbox | e29f8ae177218cf03b0b613a7c20fff7ca1919cf | [
"Apache-2.0",
"BSD-3-Clause"
] | 499 | 2018-03-28T21:01:10.000Z | 2022-02-17T06:27:51.000Z | test/test_control_flow.py | vlasenkov/matchbox | e29f8ae177218cf03b0b613a7c20fff7ca1919cf | [
"Apache-2.0",
"BSD-3-Clause"
] | 14 | 2018-03-29T13:20:26.000Z | 2019-03-14T01:15:33.000Z | test/test_control_flow.py | vlasenkov/matchbox | e29f8ae177218cf03b0b613a7c20fff7ca1919cf | [
"Apache-2.0",
"BSD-3-Clause"
] | 26 | 2018-03-28T21:11:09.000Z | 2021-10-19T19:38:14.000Z | # Copyright (c) 2018, salesforce.com, inc.
# All rights reserved.
# Licensed under the BSD 3-Clause license.
# For full license text, see the LICENSE file in the repo root
# or https://opensource.org/licenses/BSD-3-Clause
import torch
from torch.autograd import Variable
from torch import nn
import matchbox
from matchb... | 18.844444 | 62 | 0.661557 |
4713d89d578166f230969f0e1afe20509566ac03 | 12,806 | py | Python | pyinfra/api/state.py | ryan109/pyinfra | 6814920c634a2a047299875077633f72ecc46fce | [
"MIT"
] | 1 | 2020-04-12T16:15:15.000Z | 2020-04-12T16:15:15.000Z | pyinfra/api/state.py | gchazot/pyinfra | 40dd01f11086dba2be20fa2f509556abb40d84f8 | [
"MIT"
] | null | null | null | pyinfra/api/state.py | gchazot/pyinfra | 40dd01f11086dba2be20fa2f509556abb40d84f8 | [
"MIT"
] | null | null | null | # pyinfra
# File: pyinfra/api/state.py
# Desc: class that represents the current pyinfra.state
from __future__ import division, unicode_literals
from contextlib import contextmanager
from multiprocessing import cpu_count
from uuid import uuid4
import six
from gevent.pool import Pool
from pkg_resources import parse_... | 30.20283 | 89 | 0.594643 |
77c57052abd41c1bb9190a1d3ce603cd4008e431 | 6,194 | py | Python | codebase/database.py | JamesWRC/Cloudflare_DDNS | 283422628f66b305c7d230e35adb5a3a6a5963f3 | [
"MIT"
] | 1 | 2020-09-10T12:18:41.000Z | 2020-09-10T12:18:41.000Z | codebase/database.py | JamesWRC/Cloudflare_DDNS | 283422628f66b305c7d230e35adb5a3a6a5963f3 | [
"MIT"
] | null | null | null | codebase/database.py | JamesWRC/Cloudflare_DDNS | 283422628f66b305c7d230e35adb5a3a6a5963f3 | [
"MIT"
] | 1 | 2021-11-29T16:26:13.000Z | 2021-11-29T16:26:13.000Z | from sqlalchemy import Table, Column, Integer, String, MetaData, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from util import Util
import os
from undoAction import UndoAction
import time
# Define the util object
util = Util()
Base = declarative_base()
d... | 35.193182 | 208 | 0.611882 |
479eb08a8fac2788d9b6ca9c50e073bb52cc22fc | 1,568 | py | Python | Python/accountant/Amount.py | Fornost461/drafts | 39f56fb16ebf206077e5f8617741aa93623195af | [
"CC0-1.0"
] | null | null | null | Python/accountant/Amount.py | Fornost461/drafts | 39f56fb16ebf206077e5f8617741aa93623195af | [
"CC0-1.0"
] | null | null | null | Python/accountant/Amount.py | Fornost461/drafts | 39f56fb16ebf206077e5f8617741aa93623195af | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# symbol
# precision
# number of digits after period
# int >= 0 or 'unlimited'
# todo
# decimal separator
# generalize auto_attributes to use it with the other modules
# mix-in? class decorator?
class Amount:
constant_defaults = dict(symbol = '€', precision = 2... | 29.584906 | 98 | 0.609694 |
ff0fa95c46992c38d17df95ecb2405b099f54fc8 | 6,974 | py | Python | dasha/web/templates/pager.py | toltec-astro/dasha | d6e7a8489d6c58c77858df18d4798e10196bb3eb | [
"BSD-3-Clause"
] | null | null | null | dasha/web/templates/pager.py | toltec-astro/dasha | d6e7a8489d6c58c77858df18d4798e10196bb3eb | [
"BSD-3-Clause"
] | null | null | null | dasha/web/templates/pager.py | toltec-astro/dasha | d6e7a8489d6c58c77858df18d4798e10196bb3eb | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
import dash
from dash import html, dcc, Output, Input, State, ALL
import dash_bootstrap_components as dbc
from dash_component_template import ComponentTemplate
from .utils import parse_triggered_prop_ids
from .collapsecontent import CollapseContent
from .shareddatastore import SharedDataStore
... | 34.35468 | 78 | 0.539576 |
4e3ee5226a352745afd75a2808d1f691fc9cc9b1 | 2,512 | py | Python | MoleculeMOTScripts/optimas/motmaster_wrapper.py | ColdMatter/EDMSuite | 80a8bc0f3fd9d33a081f606707140de51512b28a | [
"MIT"
] | 6 | 2017-02-02T17:54:23.000Z | 2021-07-03T12:41:36.000Z | MoleculeMOTScripts/optimas/motmaster_wrapper.py | ColdMatter/EDMSuite | 80a8bc0f3fd9d33a081f606707140de51512b28a | [
"MIT"
] | null | null | null | MoleculeMOTScripts/optimas/motmaster_wrapper.py | ColdMatter/EDMSuite | 80a8bc0f3fd9d33a081f606707140de51512b28a | [
"MIT"
] | 11 | 2015-03-19T18:23:38.000Z | 2021-02-18T11:05:51.000Z | from __future__ import print_function
import clr
import sys
from System.IO import Path
import time
sys.path.append(Path.GetFullPath("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\"))
clr.AddReference("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\MOTMaster.exe")
sys.path.append(Path.GetFullPath("C:\\Cont... | 36.941176 | 130 | 0.789013 |
99386fe907ff2646189ebaffdc767beb3ce4f8f7 | 8,218 | py | Python | sdk/python/pulumi_azure_native/servicebus/v20180101preview/get_namespace.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/servicebus/v20180101preview/get_namespace.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/servicebus/v20180101preview/get_namespace.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 34.822034 | 249 | 0.638355 |
52eb9eaec7302f1d0e0799ed749d630bdd78859d | 869 | py | Python | DataStructures/Queue/implementation.py | samiunblack/algorithm-study | f003d5eaa5b38b69ffd7ea889d69b3580abd2d0d | [
"MIT"
] | null | null | null | DataStructures/Queue/implementation.py | samiunblack/algorithm-study | f003d5eaa5b38b69ffd7ea889d69b3580abd2d0d | [
"MIT"
] | null | null | null | DataStructures/Queue/implementation.py | samiunblack/algorithm-study | f003d5eaa5b38b69ffd7ea889d69b3580abd2d0d | [
"MIT"
] | null | null | null | class Node:
def __init__(self, value, next=None):
self.value = value
self.next = next
class Queue:
def __init__(self):
self.first = None
self.last = None
self.length = 0
def peek(self):
return self.first.value
def enqueue(... | 19.311111 | 41 | 0.501726 |
a9b41edb91279a2052faac04e4d4a3972809e838 | 20 | py | Python | static/__init__.py | ShaiEdy/anyway | ea669ad089d37fe0933a4596397bcb2d0b4f5de9 | [
"BSD-3-Clause"
] | 8 | 2016-09-14T11:31:04.000Z | 2021-02-23T22:29:55.000Z | static/__init__.py | ShaiEdy/anyway | ea669ad089d37fe0933a4596397bcb2d0b4f5de9 | [
"BSD-3-Clause"
] | 5 | 2020-07-30T08:30:04.000Z | 2021-06-25T15:39:48.000Z | static/__init__.py | ShaiEdy/anyway | ea669ad089d37fe0933a4596397bcb2d0b4f5de9 | [
"BSD-3-Clause"
] | 4 | 2015-03-01T09:50:57.000Z | 2020-08-28T12:03:37.000Z | __author__ = 'omri'
| 10 | 19 | 0.7 |
40d708a1cbf8875bdd109e6e04da7057c7e2f9fe | 4,645 | py | Python | test/test.py | abdcelik/Book-Store | f7a8c6227cae47f0f7b7205a36d4658617c1b5ad | [
"MIT"
] | null | null | null | test/test.py | abdcelik/Book-Store | f7a8c6227cae47f0f7b7205a36d4658617c1b5ad | [
"MIT"
] | null | null | null | test/test.py | abdcelik/Book-Store | f7a8c6227cae47f0f7b7205a36d4658617c1b5ad | [
"MIT"
] | 2 | 2020-10-27T11:10:28.000Z | 2021-03-11T12:24:02.000Z | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import unittest
import time
PATH = "C:\Program Files (x86)\chromedr... | 27.981928 | 76 | 0.657051 |
626e321a1406e28e03a1c42ad4b76813c1cce6fb | 239 | py | Python | FirstStepsInPython/Fundamentals/Exercice/Functions/More Exercises/04. Tribonacci Sequence.py | Pittor052/SoftUni-Studies | 1ee6341082f6ccfa45b3e82824c37722bcf2fb31 | [
"MIT"
] | null | null | null | FirstStepsInPython/Fundamentals/Exercice/Functions/More Exercises/04. Tribonacci Sequence.py | Pittor052/SoftUni-Studies | 1ee6341082f6ccfa45b3e82824c37722bcf2fb31 | [
"MIT"
] | null | null | null | FirstStepsInPython/Fundamentals/Exercice/Functions/More Exercises/04. Tribonacci Sequence.py | Pittor052/SoftUni-Studies | 1ee6341082f6ccfa45b3e82824c37722bcf2fb31 | [
"MIT"
] | 1 | 2021-10-07T18:30:42.000Z | 2021-10-07T18:30:42.000Z | numbers = int(input())
number_list = [1]
for i in range(numbers - 1):
sum_of_number_list = sum(number_list[-3:])
number_list.append(sum_of_number_list)
nums_to_str = [str(num) for num in number_list]
print(" ".join(nums_to_str))
| 23.9 | 47 | 0.711297 |
3482ed9f7d533ec5e99c7c8efe5b1438e534bdd9 | 458 | py | Python | previewers/event/EventWaiter.py | C3RV1/LaytonEditor | 51e1a9a372a8acdaa4183ae008235a721dc56cdc | [
"Unlicense"
] | 6 | 2019-12-24T00:18:54.000Z | 2022-02-28T17:09:22.000Z | previewers/event/EventWaiter.py | C3RV1/LaytonEditor | 51e1a9a372a8acdaa4183ae008235a721dc56cdc | [
"Unlicense"
] | 1 | 2021-08-18T11:10:35.000Z | 2021-08-18T17:32:21.000Z | previewers/event/EventWaiter.py | C3RV1/LaytonEditor | 51e1a9a372a8acdaa4183ae008235a721dc56cdc | [
"Unlicense"
] | 2 | 2021-01-17T10:42:48.000Z | 2021-08-18T11:10:54.000Z | from pg_utils.rom.rom_extract import ORIGINAL_FPS
class EventWaiter:
def __init__(self):
self.current_wait_time = 0
def wait(self, wait_frames):
self.current_wait_time = wait_frames / ORIGINAL_FPS
def busy(self):
return self.current_wait_time > 0
def stop(self):
self... | 22.9 | 59 | 0.661572 |
987337214b256ee594bcb571070afad8098cebcf | 2,145 | py | Python | api/recommender/satisfaction_calculator.py | sorinburghiu2323/Supervisio | df0b682d031914904547efafb3ec4d060bf96526 | [
"MIT"
] | null | null | null | api/recommender/satisfaction_calculator.py | sorinburghiu2323/Supervisio | df0b682d031914904547efafb3ec4d060bf96526 | [
"MIT"
] | null | null | null | api/recommender/satisfaction_calculator.py | sorinburghiu2323/Supervisio | df0b682d031914904547efafb3ec4d060bf96526 | [
"MIT"
] | null | null | null | from typing import List
from api.grades.models import Grade
from api.projects.models import Project
from api.recommender.utils import (
calculate_grade_relevance,
calculate_interest_match_factor,
)
from api.users.models import User
RECOMMENDED_BEFORE_BIAS = 4
def calculate_recommendation_satisfaction(
us... | 30.211268 | 82 | 0.663403 |
09fcd1de5fdce2eca2b652fa9cb00e2217ca6628 | 297 | py | Python | oscar/lib/python2.7/site-packages/IPython/core/tests/daft_extension/daft_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/daft_extension/daft_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/daft_extension/daft_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Useless IPython extension to test installing and loading extensions.
"""
some_vars = {'arq': 185}
def load_ipython_extension(ip):
# set up simplified quantity input
ip.push(some_vars)
def unload_ipython_extension(ip):
ip.drop_by_id(some_vars)
| 22.846154 | 69 | 0.686869 |
ebe0b2a16ca0b708c098610bc7b619ac37f411b2 | 4,569 | py | Python | src/models/train/model_main.py | duynhat-nguyen/detect-classify-trafficlights | bb986fc255237a6b25e52fdcb5fff28d35139dd2 | [
"Apache-2.0"
] | null | null | null | src/models/train/model_main.py | duynhat-nguyen/detect-classify-trafficlights | bb986fc255237a6b25e52fdcb5fff28d35139dd2 | [
"Apache-2.0"
] | null | null | null | src/models/train/model_main.py | duynhat-nguyen/detect-classify-trafficlights | bb986fc255237a6b25e52fdcb5fff28d35139dd2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.917431 | 115 | 0.703874 |
2b8e891f0eb42de14a4844bf88c0e8ed2aeab933 | 909 | py | Python | read_statistics/migrations/0002_readdetail.py | knightwk/mysite | 9935b05e97fd5fb0cd57a0e97b8241ee4a8a67a5 | [
"Apache-2.0"
] | 1 | 2019-02-20T02:33:25.000Z | 2019-02-20T02:33:25.000Z | 20.Servers/read_statistics/migrations/0002_readdetail.py | ReverseScale/DjangoProject | b82fffdef5084f616f9de86516254d6398ba08e8 | [
"MIT"
] | 14 | 2020-06-05T07:13:18.000Z | 2022-03-11T23:45:57.000Z | 20.Servers/read_statistics/migrations/0002_readdetail.py | ReverseScale/DjangoProject | b82fffdef5084f616f9de86516254d6398ba08e8 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2018-02-28 16:47
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('read_statistics', '0001_initial'),
... | 33.666667 | 131 | 0.628163 |
ae277b1e44064a7c1bdf70f09887428fb50f1ecf | 439 | py | Python | hospital/migrations/0010_auto_20200523_1122.py | favourch/hospitalmanagement | 7dcf4d9f548b7808d54b758a1769a3de07280227 | [
"MIT"
] | 3 | 2021-03-08T17:41:12.000Z | 2022-01-10T13:01:20.000Z | hospital/migrations/0010_auto_20200523_1122.py | sharon-06/hospitalmanagement | 853135de381be15797a219b33b7d383ae2a5c62b | [
"MIT"
] | null | null | null | hospital/migrations/0010_auto_20200523_1122.py | sharon-06/hospitalmanagement | 853135de381be15797a219b33b7d383ae2a5c62b | [
"MIT"
] | 2 | 2021-12-25T20:01:05.000Z | 2022-01-09T14:12:20.000Z | # Generated by Django 3.0.5 on 2020-05-23 05:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hospital', '0009_auto_20200523_1118'),
]
operations = [
migrations.AlterField(
model_name='doctor',
name='profile_pi... | 23.105263 | 97 | 0.624146 |
59124771232afcb620667fd64b446c71ec18d83d | 11,229 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/models/job_job_summary_summary.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/job_job_summary_summary.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/job_job_summary_summary.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class JobJobSummarySummary(objec... | 35.311321 | 204 | 0.644047 |
3b17a9870da1026f84cce525976960e6083656cc | 4,138 | py | Python | domainics/domobj/dattr.py | lcgong/dpillars | e138b8b52383191e8ea758ef3319e79da8a32dcb | [
"Apache-2.0"
] | 3 | 2015-09-20T23:43:13.000Z | 2017-11-07T15:00:36.000Z | domainics/domobj/dattr.py | lcgong/dpillars | e138b8b52383191e8ea758ef3319e79da8a32dcb | [
"Apache-2.0"
] | null | null | null | domainics/domobj/dattr.py | lcgong/dpillars | e138b8b52383191e8ea758ef3319e79da8a32dcb | [
"Apache-2.0"
] | 4 | 2015-07-12T08:40:33.000Z | 2016-04-11T08:01:51.000Z | # -*- coding: utf-8 -*-
from collections import OrderedDict
from collections import namedtuple
from collections.abc import Iterable
from typing import Mapping, Generic
from datetime import datetime, date, timedelta, time
from decimal import Decimal
# from dateutil.parser import parse as datetime_parse
from .typing ... | 31.587786 | 80 | 0.59449 |
fea29f241f90f0a08b02b93fec66a98567192d7c | 699 | py | Python | date.py | Zeebra38/bot_tlgr_shedule | 54566efc0583743e21256304dc4320f5ea1e3255 | [
"MIT"
] | null | null | null | date.py | Zeebra38/bot_tlgr_shedule | 54566efc0583743e21256304dc4320f5ea1e3255 | [
"MIT"
] | null | null | null | date.py | Zeebra38/bot_tlgr_shedule | 54566efc0583743e21256304dc4320f5ea1e3255 | [
"MIT"
] | null | null | null | from datetime import date, timedelta, datetime
def weeknum():
zero = datetime(2021, 2, 8)
now = datetime.today()
#now = datetime(2020, 9, 22)
delta = now - zero
deltaweeks = 1
#print(delta.days)
if delta.days >= 7:
buf = delta.days
while buf >= 7:
deltaweeks += 1... | 22.548387 | 51 | 0.545064 |
9a6e7a95b1d92d81d0bfa6f5a8470a74156038f5 | 1,131 | py | Python | 092_reverse_linked_list_II.py | Sanster/LeetCode | 5a0c448928b216b49c127c4542ae3cd74c797782 | [
"MIT"
] | 2 | 2018-10-13T15:12:55.000Z | 2020-06-07T09:35:40.000Z | 092_reverse_linked_list_II.py | Sanster/PyLeeCode | 5a0c448928b216b49c127c4542ae3cd74c797782 | [
"MIT"
] | null | null | null | 092_reverse_linked_list_II.py | Sanster/PyLeeCode | 5a0c448928b216b49c127c4542ae3cd74c797782 | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/reverse-linked-list-ii/
from typing import Optional
from utils import ListNode, createList, compareList
class Solution:
successor = None
def reverseN(self, head: ListNode, n) -> ListNode:
if n == 1:
self.successor = head.next
return head
... | 26.928571 | 82 | 0.57206 |
431ee027270d670086251d6acaba42fc304b0fa4 | 243,031 | py | Python | src/black/__init__.py | dpalmasan/black | 9cbf1f162261b64ebb150639b608be0c38f23e2b | [
"MIT"
] | null | null | null | src/black/__init__.py | dpalmasan/black | 9cbf1f162261b64ebb150639b608be0c38f23e2b | [
"MIT"
] | null | null | null | src/black/__init__.py | dpalmasan/black | 9cbf1f162261b64ebb150639b608be0c38f23e2b | [
"MIT"
] | null | null | null | import ast
import asyncio
from abc import ABC, abstractmethod
from collections import defaultdict
from concurrent.futures import Executor, ThreadPoolExecutor, ProcessPoolExecutor
from contextlib import contextmanager
from datetime import datetime
from enum import Enum
from functools import lru_cache, partial, wraps
imp... | 34.639538 | 131 | 0.602351 |
32c31dc2009b17fd79954bc641530645e4255416 | 55,857 | py | Python | scripts/labtainer-instructor/assess_bin/ResultParser.py | sliao101/Labtainers | 73c56fa9db675f5dbd114dcd83369aa7752c0cca | [
"Apache-2.0"
] | null | null | null | scripts/labtainer-instructor/assess_bin/ResultParser.py | sliao101/Labtainers | 73c56fa9db675f5dbd114dcd83369aa7752c0cca | [
"Apache-2.0"
] | null | null | null | scripts/labtainer-instructor/assess_bin/ResultParser.py | sliao101/Labtainers | 73c56fa9db675f5dbd114dcd83369aa7752c0cca | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
'''
This software was created by United States Government employees at
The Center for Cybersecurity and Cyber Operations (C3O)
at the Naval Postgraduate School NPS. Please note that within the
United States, copyright protection is not available for any works
created by United States Govern... | 45.821985 | 201 | 0.572569 |
2fd469a4c2a1dd3a7d155359041c219530a2720f | 1,481 | py | Python | notifications-example/example.py | johnman/openfin-python-adapter | f1e24b870cd80f28079bb92df8bcb7918c81e47c | [
"Apache-2.0"
] | null | null | null | notifications-example/example.py | johnman/openfin-python-adapter | f1e24b870cd80f28079bb92df8bcb7918c81e47c | [
"Apache-2.0"
] | null | null | null | notifications-example/example.py | johnman/openfin-python-adapter | f1e24b870cd80f28079bb92df8bcb7918c81e47c | [
"Apache-2.0"
] | null | null | null | import openfin
client = openfin.OpenFinClient()
def log_message(*args, **kwargs):
print(args, kwargs)
def on_register(val):
print("Registered")
client.subscribe(openfin.SubKey.from_string("notification-relay/outbox"), log_message, on_register)
payload = {
"title": "Important Notification",
"body... | 24.278689 | 99 | 0.485483 |
90cd63dd227d65462cfbea53ebe9d91dfe50732d | 15,166 | py | Python | utilities/metadata_parser.py | dhmit/computation_hist | 73265df00d1ba7952942be16f7b84e2a6692b359 | [
"BSD-3-Clause"
] | 5 | 2018-11-16T20:23:19.000Z | 2020-10-02T21:54:03.000Z | utilities/metadata_parser.py | dhmit/computation_hist | 73265df00d1ba7952942be16f7b84e2a6692b359 | [
"BSD-3-Clause"
] | 236 | 2018-11-17T01:56:47.000Z | 2019-12-05T01:57:03.000Z | utilities/metadata_parser.py | dhmit/computation_hist | 73265df00d1ba7952942be16f7b84e2a6692b359 | [
"BSD-3-Clause"
] | 26 | 2018-11-09T21:16:25.000Z | 2019-06-11T04:38:12.000Z | # python
import csv
# django
from django.contrib.postgres.search import SearchVector
from django.core.exceptions import ValidationError
from django.db import IntegrityError
from django.db.models import Count, Prefetch
from django.utils.text import slugify
# project
from config.settings import METADATA_CSV, DATABASES,... | 37.820449 | 121 | 0.563695 |
100be64037649a65bb6c9eb4b03ea416f17ee7a1 | 5,665 | py | Python | ssd1306.py | Fliens/Mini-Gas-Pump | 50b28f888d00a978c9d12082d44c7b7e7ce561c7 | [
"CC0-1.0"
] | null | null | null | ssd1306.py | Fliens/Mini-Gas-Pump | 50b28f888d00a978c9d12082d44c7b7e7ce561c7 | [
"CC0-1.0"
] | null | null | null | ssd1306.py | Fliens/Mini-Gas-Pump | 50b28f888d00a978c9d12082d44c7b7e7ce561c7 | [
"CC0-1.0"
] | null | null | null | #MicroPython SSD1306 OLED driver, I2C and SPI interfaces created by Adafruit
import time
import framebuf
# register definitions
SET_CONTRAST = const(0x81)
SET_ENTIRE_ON = const(0xa4)
SET_NORM_INV = const(0xa6)
SET_DISP = const(0xae)
SET_MEM_ADDR = const(0x20)
SET_COL_A... | 33.922156 | 90 | 0.584996 |
17de562a4ff8394ed60027932c1112e493b1b49e | 24,112 | py | Python | keystone/federation/idp.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | keystone/federation/idp.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"Apache-2.0"
] | null | null | null | keystone/federation/idp.py | ISCAS-VDI/keystone | 11af181c06d78026c89a873f62931558e80f3192 | [
"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... | 39.206504 | 79 | 0.626535 |
0c94a9335846c609e72b2cda62723576c7b102b2 | 2,357 | py | Python | Phrasers/macphraser.py | kyan001/UserDefinedPhraser | b2148101f48da805e459d7780c74c370184fda42 | [
"MIT"
] | 4 | 2020-10-22T00:25:08.000Z | 2021-12-16T08:55:38.000Z | Phrasers/macphraser.py | kyan001/UserDefinedPhraser | b2148101f48da805e459d7780c74c370184fda42 | [
"MIT"
] | null | null | null | Phrasers/macphraser.py | kyan001/UserDefinedPhraser | b2148101f48da805e459d7780c74c370184fda42 | [
"MIT"
] | 2 | 2021-05-17T13:24:09.000Z | 2021-06-26T04:10:56.000Z | import os
from bs4 import BeautifulSoup
from bs4 import Doctype
from .phraser import Phraser
class MacPhraser(Phraser):
def from_file(self, filepath: str):
""" Read file into objects."""
if not filepath:
raise Exception("No filepath provided")
with open(filepath, encoding='ut... | 41.350877 | 300 | 0.576156 |
858cf3b9f92aa1c289a7b1cfe48ead01be7a558f | 879 | py | Python | ListShuffler.py | Sonophoto/PythonNotes | a6f04ce9967dfb508953e270f1241424aebacc43 | [
"BSD-2-Clause"
] | null | null | null | ListShuffler.py | Sonophoto/PythonNotes | a6f04ce9967dfb508953e270f1241424aebacc43 | [
"BSD-2-Clause"
] | null | null | null | ListShuffler.py | Sonophoto/PythonNotes | a6f04ce9967dfb508953e270f1241424aebacc43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
Create a random distribution of nibbles with exactly
4 of each of the 16 possible values and output as a
comma delimited string
Implementation (c) 2017 Brig Young (github.com/Sonophoto)
License: BSD-2c, i.e. Cite.
"""
import random as shuffler
shufflee = [
0x00, 0x01, 0x02, 0x0... | 32.555556 | 59 | 0.624573 |
c0c9d643c06980758fde7ddb898013fdf8da4543 | 2,056 | py | Python | tests/conftest.py | obestwalter/loslassa | 2127479cb8075a01fd12fe8b8a3f7820e14758d3 | [
"BSD-3-Clause"
] | null | null | null | tests/conftest.py | obestwalter/loslassa | 2127479cb8075a01fd12fe8b8a3f7820e14758d3 | [
"BSD-3-Clause"
] | 5 | 2016-04-26T16:29:20.000Z | 2016-04-26T16:29:59.000Z | tests/conftest.py | obestwalter/loslassa | 2127479cb8075a01fd12fe8b8a3f7820e14758d3 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from contextlib import contextmanager
from plumbum.machines.local import local
import pytest
from loslassa._loslassa import LoslassaProject
@pytest.fixture
def work_in_example_project(request):
"""Change into example project and back on exit"""
return chdir_in_and_out(r... | 28.164384 | 72 | 0.699903 |
cf02e979b442072556db2ae99d019a0be8445020 | 1,712 | py | Python | contrib/rtl_433_mqtt/mqtt.py | pferreir/clima-sensors | d4e7b158d2c5f7ef2ceb2742181a1a5b22aacd34 | [
"MIT"
] | 1 | 2021-11-15T15:02:31.000Z | 2021-11-15T15:02:31.000Z | contrib/rtl_433_mqtt/mqtt.py | pferreir/clima-sensors | d4e7b158d2c5f7ef2ceb2742181a1a5b22aacd34 | [
"MIT"
] | null | null | null | contrib/rtl_433_mqtt/mqtt.py | pferreir/clima-sensors | d4e7b158d2c5f7ef2ceb2742181a1a5b22aacd34 | [
"MIT"
] | null | null | null | import re
import sys
import json
import click
from paho.mqtt import client as mqtt
KLIMALOGG_MAP = {
30180: 'office',
31223: 'bedroom',
31850: 'andres-room'
}
RADIOHEAD_MAP = {
237: ('living-room', 'temperature'),
238: ('living-room', 'humidity'),
239: ('living-room', 'co2')
}
def handle_... | 21.948718 | 82 | 0.60514 |
8717fa5367459c0639332f395daf0b309a6c827f | 52,474 | py | Python | sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/operations/_capacities_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2019-08-23T21:14:00.000Z | 2021-09-07T18:32:34.000Z | sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/operations/_capacities_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2021-11-03T06:10:36.000Z | 2021-12-01T06:29:39.000Z | sdk/powerbidedicated/azure-mgmt-powerbidedicated/azure/mgmt/powerbidedicated/aio/operations/_capacities_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 1 | 2021-05-19T02:55:10.000Z | 2021-05-19T02:55:10.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 52.05754 | 208 | 0.675839 |
48cc962cb4654c33f87a87ade5d5a2fa1020d16e | 313 | py | Python | src/preparation/__init__.py | JustinRuan/Pathological-images | 478f0b568068e591e282e9566786e683ec39a108 | [
"MIT"
] | 2 | 2022-01-17T12:04:02.000Z | 2022-03-08T21:59:39.000Z | src/preparation/__init__.py | JustinRuan/Pathological-images | 478f0b568068e591e282e9566786e683ec39a108 | [
"MIT"
] | null | null | null | src/preparation/__init__.py | JustinRuan/Pathological-images | 478f0b568068e591e282e9566786e683ec39a108 | [
"MIT"
] | 1 | 2020-03-08T09:00:43.000Z | 2020-03-08T09:00:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__author__ = 'Justin'
__mtime__ = '2018-05-23'
"""
from preparation.PatchSampler import PatchSampler
from preparation.PatchPack import PatchPack
from preparation.normalization import HistNormalization
__all__ = ["PatchSampler", "PatchPack", "HistNormalization"] | 26.083333 | 60 | 0.760383 |
6e476e5cef8f96a424649e5cd2e21eb5d92f1949 | 1,602 | py | Python | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/DescribeTopDomainsByFlowRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/DescribeTopDomainsByFlowRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/DescribeTopDomainsByFlowRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.375 | 77 | 0.757179 |
88ae58caf14a01f55fc1e0d0c25e4533283a0212 | 11,438 | py | Python | lib/streamlit/elements/altair.py | kamito/streamlit | af68a915b3a1f37ddd411d081e430dad70869c45 | [
"Apache-2.0"
] | 5 | 2020-01-22T01:06:39.000Z | 2021-06-11T19:26:16.000Z | lib/streamlit/elements/altair.py | kamito/streamlit | af68a915b3a1f37ddd411d081e430dad70869c45 | [
"Apache-2.0"
] | 221 | 2020-10-16T08:15:02.000Z | 2022-03-29T10:25:00.000Z | lib/streamlit/elements/altair.py | kamito/streamlit | af68a915b3a1f37ddd411d081e430dad70869c45 | [
"Apache-2.0"
] | 1 | 2020-08-27T21:54:18.000Z | 2020-08-27T21:54:18.000Z | # Copyright 2018-2021 Streamlit 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 wr... | 34.041667 | 88 | 0.63359 |
3daaff319f52d86bb1baa771c6eb96fb5f1d7a97 | 1,010 | py | Python | docs/conf.py | dlaidig/vqf | 694eeb55031382d396f14a6c977c4ad2d940bf66 | [
"MIT"
] | 1 | 2021-11-13T17:33:55.000Z | 2021-11-13T17:33:55.000Z | docs/conf.py | dlaidig/vqf | 694eeb55031382d396f14a6c977c4ad2d940bf66 | [
"MIT"
] | null | null | null | docs/conf.py | dlaidig/vqf | 694eeb55031382d396f14a6c977c4ad2d940bf66 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Daniel Laidig <laidig@control.tu-berlin.de>
#
# SPDX-License-Identifier: MIT
# cf. https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import subprocess
# always run doxygen automatically and abort if there is an error
subprocess.check_call('cd .. && mkdir -p build/... | 26.578947 | 79 | 0.718812 |
ad12b91d1817891987d28479ae8576df5de61701 | 57,110 | py | Python | src/transformers/models/gpt2/modeling_gpt2.py | arunraja-hub/transformers | eb2e006b35938e7b6476d3bfc55343ebfe5ec501 | [
"Apache-2.0"
] | 17 | 2020-10-13T06:53:25.000Z | 2022-02-22T06:12:17.000Z | src/transformers/models/gpt2/modeling_gpt2.py | 4nalog/transformers | 76cadb7943c8492ec481f4f3925e9e8793a32c9d | [
"Apache-2.0"
] | 13 | 2020-10-13T11:41:11.000Z | 2022-02-16T14:13:31.000Z | src/transformers/models/gpt2/modeling_gpt2.py | 4nalog/transformers | 76cadb7943c8492ec481f4f3925e9e8793a32c9d | [
"Apache-2.0"
] | 13 | 2020-10-04T05:06:00.000Z | 2022-02-09T01:14:59.000Z | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 42.97216 | 168 | 0.644038 |
6b2a28e6352ebaca8d5396f928705e6af0085937 | 460 | py | Python | tests/legacy_pytests/getcwd_exec_test/testme.py | depaul-dice/provenance-to-use | e16e2824fbbe0b4e09cc50f0d2bcec3400bf4b87 | [
"BSD-3-Clause"
] | null | null | null | tests/legacy_pytests/getcwd_exec_test/testme.py | depaul-dice/provenance-to-use | e16e2824fbbe0b4e09cc50f0d2bcec3400bf4b87 | [
"BSD-3-Clause"
] | null | null | null | tests/legacy_pytests/getcwd_exec_test/testme.py | depaul-dice/provenance-to-use | e16e2824fbbe0b4e09cc50f0d2bcec3400bf4b87 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
import sys
sys.path.insert(0, '..')
from cde_test_common import *
def checker_func():
assert os.path.isfile(CDE_ROOT_DIR + '/home/pgbovine/CDE/tests/test_file.txt')
assert os.path.isfile(CDE_ROOT_DIR + '/home/pgbovine/CDE/tests/getcwd_exec_test/getcwd_exec_test.py')
assert os.path.isfile(... | 35.384615 | 103 | 0.769565 |
ba57afe072fec1e9c7c5146797a16d456a880b56 | 514 | py | Python | website/oauth/utils.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | website/oauth/utils.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 20 | 2020-03-24T16:48:03.000Z | 2022-03-08T22:38:38.000Z | website/oauth/utils.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2021-10-04T21:16:56.000Z | 2021-10-04T21:16:56.000Z | from framework.auth.oauth_scopes import public_scopes
# This dict is built through the metaclass applied to ExternalProvider.
# It is intentionally empty here, and should remain empty.
PROVIDER_LOOKUP = dict()
def get_service(name):
"""Given a service name, return the provider class"""
return PROVIDER_LOOK... | 32.125 | 71 | 0.708171 |
220fc415e9791449c49a9d41ee1a99e54d1a2f89 | 1,030 | py | Python | texttospeech/google/cloud/texttospeech_v1beta1/__init__.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | 1 | 2019-01-23T21:54:51.000Z | 2019-01-23T21:54:51.000Z | texttospeech/google/cloud/texttospeech_v1beta1/__init__.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | 1 | 2018-04-06T19:51:23.000Z | 2018-04-06T19:51:23.000Z | texttospeech/google/cloud/texttospeech_v1beta1/__init__.py | nielm/google-cloud-python | fd126fdea34206109eb00d675374ff7dc4dcc5ef | [
"Apache-2.0"
] | 1 | 2020-04-14T10:47:41.000Z | 2020-04-14T10:47:41.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 34.333333 | 74 | 0.784466 |
09cdc5951a74a3663bdd994992c7edc8757f1f4d | 5,320 | py | Python | drift_dac/prior_shift.py | dataiku-research/performance_prediction_under_shift | 6ca75afc5d0925a7c463370c5603a0b85fa5d0fc | [
"Apache-2.0"
] | null | null | null | drift_dac/prior_shift.py | dataiku-research/performance_prediction_under_shift | 6ca75afc5d0925a7c463370c5603a0b85fa5d0fc | [
"Apache-2.0"
] | null | null | null | drift_dac/prior_shift.py | dataiku-research/performance_prediction_under_shift | 6ca75afc5d0925a7c463370c5603a0b85fa5d0fc | [
"Apache-2.0"
] | null | null | null | import numpy as np
from math import ceil
import copy
from drift_dac.perturbation_shared_utils import Shift, PerturbationConstants
__all__ = ['OnlyOne', 'KnockOut', 'Rebalance']
class OnlyOne(Shift):
""" Sample data to keep only one class.
Args:
keep_cl (int or str): class to keep
Attributes:
... | 32.839506 | 98 | 0.626692 |
10a540a8e269a3f80bef8f24eca11e9cb1aa6974 | 5,577 | py | Python | attic/PhotoADaySheep.py | charlesreid1/tripos-bot | d9b7dae25ab697606010b21211039766f7e6025d | [
"MIT"
] | null | null | null | attic/PhotoADaySheep.py | charlesreid1/tripos-bot | d9b7dae25ab697606010b21211039766f7e6025d | [
"MIT"
] | null | null | null | attic/PhotoADaySheep.py | charlesreid1/tripos-bot | d9b7dae25ab697606010b21211039766f7e6025d | [
"MIT"
] | null | null | null | import rainbowmindmachine as rmm
import twitter
import logging
import glob
import time
from datetime import datetime
class PhotoADaySheep(rmm.MediaSheep):
"""
This sheep will tweet a photo a day.
This overrides Sheep's default
inner/outer timing loop and tweet behavior,
but re-uses a lot of other ... | 28.6 | 111 | 0.506903 |
59508d15156fb309a940f63332f480310a6fd65d | 9,713 | py | Python | reports/configs/only_logd_dgin6_2/other_config.py | hengwei-chan/graph_network_demo | 542f2a59b1b9708abdc718d77db7111f3ba2df96 | [
"MIT"
] | 1 | 2021-10-18T03:44:53.000Z | 2021-10-18T03:44:53.000Z | reports/configs/only_logd_dgin6_2/other_config.py | hengwei-chan/graph_network_demo | 542f2a59b1b9708abdc718d77db7111f3ba2df96 | [
"MIT"
] | null | null | null | reports/configs/only_logd_dgin6_2/other_config.py | hengwei-chan/graph_network_demo | 542f2a59b1b9708abdc718d77db7111f3ba2df96 | [
"MIT"
] | 1 | 2022-02-22T08:32:01.000Z | 2022-02-22T08:32:01.000Z | from dataclasses import dataclass, field
from typing import List
import tensorflow as tf
from graph_networks.utilities import *
import logging
import os
ATOM_FEATURE_DIM = DGIN6_ATOM_FEATURE_DIM
EDGE_FEATURE_DIM = DGIN6_EDGE_FEATURE_DIM
@dataclass
class BasicModelConfig:
"""
Config for model1/2/3 run file.
... | 43.950226 | 169 | 0.670442 |
7db39e9dfef43ac083c02c0c9b4cf2a21addbe82 | 551 | py | Python | product_details/version_compare/decorators.py | pmclanahan/django-mozilla-product-details | 36ef06539d6b34c4f345fd0d3e16937d0db9a752 | [
"BSD-3-Clause"
] | null | null | null | product_details/version_compare/decorators.py | pmclanahan/django-mozilla-product-details | 36ef06539d6b34c4f345fd0d3e16937d0db9a752 | [
"BSD-3-Clause"
] | null | null | null | product_details/version_compare/decorators.py | pmclanahan/django-mozilla-product-details | 36ef06539d6b34c4f345fd0d3e16937d0db9a752 | [
"BSD-3-Clause"
] | null | null | null | import cPickle
import functools
def memoize(fctn):
"""
Memoizing decorator, courtesy of:
http://pko.ch/2008/08/22/memoization-in-python-easier-than-what-it-should-be/
"""
memory = {}
@functools.wraps(fctn)
def memo(*args,**kwargs):
haxh = cPickle.dumps((args, sorted(kwargs.iterite... | 25.045455 | 81 | 0.618875 |
14af8a650faca41e55b9c3d3f3e9169a0892745d | 1,017 | py | Python | lib/text.py | matthelliwell2/grammer | 19b5c87fc0a887e269082ebcc67d008f6f4adee6 | [
"MIT"
] | null | null | null | lib/text.py | matthelliwell2/grammer | 19b5c87fc0a887e269082ebcc67d008f6f4adee6 | [
"MIT"
] | null | null | null | lib/text.py | matthelliwell2/grammer | 19b5c87fc0a887e269082ebcc67d008f6f4adee6 | [
"MIT"
] | null | null | null | import re
specialCharacterTranslations = {
"?\\question-mark": "?",
":\\colon": ":",
";\\semicolon": ";",
"*\\asterisk": "*",
"~\\tilde": "~",
",\\comma": ",",
".\\period": ".",
".\\dot": ".",
"/\\slash": "/",
"_\\underscore": "_",
"!\\exclamation-mark": "!",
"@\\at-sign... | 26.763158 | 116 | 0.450344 |
48661aa714ee07b7aa8989adfebee64b5c57efb9 | 7,481 | py | Python | tensorflow/python/keras/distribute/dataset_creator_model_fit_test_base.py | bhanuprakashbv/tensorflow | d2e62d5da7bf210f9adfd60054f23ece97329aef | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/distribute/dataset_creator_model_fit_test_base.py | bhanuprakashbv/tensorflow | d2e62d5da7bf210f9adfd60054f23ece97329aef | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/distribute/dataset_creator_model_fit_test_base.py | bhanuprakashbv/tensorflow | d2e62d5da7bf210f9adfd60054f23ece97329aef | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 39.167539 | 80 | 0.634541 |
21e9be6b0f31ec3031499909869ce44dbfaeaeb9 | 324 | py | Python | communities/admin.py | askmeaboutlo0m/website | 3df97d061a425e7fbb3f173c78ff01d831575aa0 | [
"MIT"
] | 9 | 2017-06-04T15:46:05.000Z | 2021-09-04T23:28:03.000Z | communities/admin.py | askmeaboutlo0m/website | 3df97d061a425e7fbb3f173c78ff01d831575aa0 | [
"MIT"
] | 24 | 2018-02-10T04:29:00.000Z | 2021-10-01T16:01:04.000Z | communities/admin.py | askmeaboutlo0m/website | 3df97d061a425e7fbb3f173c78ff01d831575aa0 | [
"MIT"
] | 4 | 2020-03-23T03:42:32.000Z | 2022-03-16T17:01:09.000Z | from django.contrib import admin
from . import models
class MembershipAdmin(admin.TabularInline):
model = models.Membership
raw_id_fields = ('user',)
extra = 0
@admin.register(models.Community)
class CommunityAdmin(admin.ModelAdmin):
list_display = ('title', 'status',)
inlines = (MembershipAdmi... | 20.25 | 43 | 0.719136 |
ef9bd0ac42cbb4915cc5070be8de863f8f0ee101 | 1,333 | py | Python | examples/plotting/file/hover.py | gitter-badger/bokeh | 5481346de1642a4e6710d32b70262fd6c2674360 | [
"BSD-3-Clause"
] | 2 | 2015-07-23T21:19:52.000Z | 2016-01-25T17:00:15.000Z | examples/plotting/file/hover.py | gitter-badger/bokeh | 5481346de1642a4e6710d32b70262fd6c2674360 | [
"BSD-3-Clause"
] | null | null | null | examples/plotting/file/hover.py | gitter-badger/bokeh | 5481346de1642a4e6710d32b70262fd6c2674360 | [
"BSD-3-Clause"
] | 2 | 2015-12-22T04:13:10.000Z | 2021-07-06T21:18:04.000Z | from __future__ import division
import numpy as np
from six.moves import zip
from collections import OrderedDict
from bokeh.plotting import *
from bokeh.objects import HoverTool
TOOLS="pan,wheel_zoom,box_zoom,reset,hover,previewsave"
xx, yy = np.meshgrid(range(0,101,4), range(0,101,4))
x = xx.flatten()
y = yy.flatte... | 23.385965 | 85 | 0.627907 |
f09ac49dca2374c85978859ef77b1a7d54b75803 | 6,514 | py | Python | fidimag/atomistic/atomistic_driver.py | computationalmodelling/fidimag | 07a275c897a44ad1e0d7e8ef563f10345fdc2a6e | [
"BSD-2-Clause"
] | 53 | 2016-02-27T09:40:21.000Z | 2022-01-19T21:37:44.000Z | fidimag/atomistic/atomistic_driver.py | computationalmodelling/fidimag | 07a275c897a44ad1e0d7e8ef563f10345fdc2a6e | [
"BSD-2-Clause"
] | 132 | 2016-02-26T13:18:58.000Z | 2021-12-01T21:52:42.000Z | fidimag/atomistic/atomistic_driver.py | computationalmodelling/fidimag | 07a275c897a44ad1e0d7e8ef563f10345fdc2a6e | [
"BSD-2-Clause"
] | 32 | 2016-02-26T13:21:40.000Z | 2022-03-08T08:54:51.000Z | from __future__ import division
from __future__ import print_function
from fidimag.common.driver_base import DriverBase
import fidimag.extensions.clib as clib
import fidimag.extensions.cvode as cvode
from fidimag.common.vtk import VTK
import fidimag.common.constant as const
import numpy as np
class AtomisticDriver... | 33.927083 | 79 | 0.547436 |
a279d14d3d013ced9b2d67ef8df1ab479fb216e3 | 7,964 | py | Python | ezodf2/meta.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | 4 | 2015-03-15T22:32:35.000Z | 2019-12-23T12:13:13.000Z | ezodf2/meta.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | 3 | 2017-08-17T09:36:42.000Z | 2021-12-13T19:43:28.000Z | ezodf2/meta.py | iwschris/ezodf2 | 061c4aa3f26e9157ad46155d8ce92db7187b0574 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding:utf-8
# Purpose: ODF meta.xml document management
# Created: 28.12.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT
from __future__ import unicode_literals, print_function, division
__author__ = "mozman <mozman@gmx.at>"
from datetime import datetime
from .compatibility... | 31.983936 | 115 | 0.550226 |
10e71055c4a91ed3cf0cd6a87e0788f71c7003c3 | 1,577 | py | Python | code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/cancel_downtimes_by_scope_request.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/cancel_downtimes_by_scope_request.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | code/venv/lib/python3.8/site-packages/datadog_api_client/v1/model/cancel_downtimes_by_scope_request.py | Valisback/hiring-engineers | 7196915dd5a429ae27c21fa43d527f0332e662ed | [
"Apache-2.0"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from datadog_api_client.v1.model_utils import (
ModelNormal,
cached_property,
... | 27.666667 | 276 | 0.65948 |
539117f1816050210fe78304e8265cc4f0a1dd3f | 851 | py | Python | LeetCodeSolutions/LeetCode_1373.py | lih627/python-algorithm-templates | a61fd583e33a769b44ab758990625d3381793768 | [
"MIT"
] | 24 | 2020-03-28T06:10:25.000Z | 2021-11-23T05:01:29.000Z | LeetCodeSolutions/LeetCode_1373.py | lih627/python-algorithm-templates | a61fd583e33a769b44ab758990625d3381793768 | [
"MIT"
] | null | null | null | LeetCodeSolutions/LeetCode_1373.py | lih627/python-algorithm-templates | a61fd583e33a769b44ab758990625d3381793768 | [
"MIT"
] | 8 | 2020-05-18T02:43:16.000Z | 2021-05-24T18:11:38.000Z | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def maxSumBST(self, root: TreeNode) -> int:
inf = 10 ** 9
res = 0
def helper(node):
nonlocal res
... | 28.366667 | 58 | 0.508813 |
1758e7ab35e6a891224943172b2c6523f5a104f0 | 1,657 | py | Python | presidio-analyzer/setup.py | rakan41/presidio | 67cb019ff059ed772a8aacbf2f0f334390dca6ce | [
"MIT"
] | 1 | 2021-09-23T06:54:31.000Z | 2021-09-23T06:54:31.000Z | presidio-analyzer/setup.py | rakan41/presidio | 67cb019ff059ed772a8aacbf2f0f334390dca6ce | [
"MIT"
] | 1 | 2022-01-27T20:34:16.000Z | 2022-01-27T20:34:16.000Z | presidio-analyzer/setup.py | rakan41/presidio | 67cb019ff059ed772a8aacbf2f0f334390dca6ce | [
"MIT"
] | null | null | null | """Setup.py for Presidio Analyzer."""
import os.path
from os import path
import setuptools
__version__ = ""
this_directory = path.abspath(path.dirname(__file__))
parent_directory = os.path.abspath(os.path.join(this_directory, os.pardir))
with open(path.join(this_directory, "README.MD"), encoding="utf-8") as f:
l... | 30.685185 | 75 | 0.64997 |
dfcceb82a2f4b31cd6d464b698216db5ffceb315 | 554 | py | Python | kansha/models.py | AnomalistDesignLLC/kansha | 85b5816da126b1c7098707c98f217d8b2e524ff2 | [
"BSD-3-Clause"
] | 161 | 2015-04-27T17:07:40.000Z | 2021-10-14T23:14:56.000Z | kansha/models.py | AnomalistDesignLLC/kansha | 85b5816da126b1c7098707c98f217d8b2e524ff2 | [
"BSD-3-Clause"
] | 228 | 2015-05-27T15:47:31.000Z | 2018-11-24T04:05:11.000Z | kansha/models.py | AnomalistDesignLLC/kansha | 85b5816da126b1c7098707c98f217d8b2e524ff2 | [
"BSD-3-Clause"
] | 38 | 2015-05-27T15:16:15.000Z | 2021-03-24T05:34:08.000Z | # -*- coding:utf-8 -*-
#--
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
#--
from __future__ import absolute_import
from elixir import EntityBase
from ... | 22.16 | 66 | 0.723827 |
a57652cf4f487c2ed29e8fcd3bfc01a5e4ddc9df | 1,968 | py | Python | Day01-15/code/Day11/json1.py | bdfd/Python_Zero2Hero_DS | 9dafe90b8112fdc3d07e1aa02e41ed3f019f733c | [
"MIT"
] | 3 | 2022-01-15T19:06:19.000Z | 2022-01-18T16:47:27.000Z | Day01-15/code/Day11/json1.py | bdfd/4.5_Data-Science-Python-Zero2Hero- | 9dafe90b8112fdc3d07e1aa02e41ed3f019f733c | [
"MIT"
] | null | null | null | Day01-15/code/Day11/json1.py | bdfd/4.5_Data-Science-Python-Zero2Hero- | 9dafe90b8112fdc3d07e1aa02e41ed3f019f733c | [
"MIT"
] | 1 | 2022-01-09T00:18:49.000Z | 2022-01-09T00:18:49.000Z | """
读取JSON数据
Version: 0.1
Author: BDFD
Date: 2018-03-13
"""
import json
import csv2
json_str = '{"name": "BDFD", "age": 38, "title": "叫兽"}'
result = json.loads(json_str)
print(result)
print(type(result))
print(result['name'])
print(result['age'])
# 把转换得到的字典作为关键字参数传入Teacher的构造器
teacher = csv2.Teacher(**result)
print... | 22.883721 | 58 | 0.359248 |
61741ee83cfdf93fcde6ffae5f2176e1ab367806 | 616 | py | Python | thingsboard_gateway/extensions/odbc/__init__.py | ferguscan/thingsboard-gateway | bc20fdb8e46f840b8538a010db2714ec6071fa5b | [
"Apache-2.0"
] | 1,123 | 2017-02-07T13:09:40.000Z | 2022-03-30T10:40:48.000Z | thingsboard_gateway/extensions/odbc/__init__.py | ferguscan/thingsboard-gateway | bc20fdb8e46f840b8538a010db2714ec6071fa5b | [
"Apache-2.0"
] | 655 | 2017-03-07T17:25:55.000Z | 2022-03-31T07:59:53.000Z | thingsboard_gateway/extensions/odbc/__init__.py | ferguscan/thingsboard-gateway | bc20fdb8e46f840b8538a010db2714ec6071fa5b | [
"Apache-2.0"
] | 648 | 2017-02-07T13:32:30.000Z | 2022-03-31T05:17:55.000Z | # Copyright 2020. ThingsBoard
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 44 | 78 | 0.714286 |
685465e4f30cf099363f182b3671a86061b8c2eb | 2,007 | py | Python | RPi_Weather.py | JasonKarle/rpi_weather | a05edfa69358c1f867b0de62b6af114036b3a30a | [
"MIT"
] | null | null | null | RPi_Weather.py | JasonKarle/rpi_weather | a05edfa69358c1f867b0de62b6af114036b3a30a | [
"MIT"
] | null | null | null | RPi_Weather.py | JasonKarle/rpi_weather | a05edfa69358c1f867b0de62b6af114036b3a30a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
This is the core program enabling the local weather and date and time
to be read for a location and parsed. This is intended to provide
the base data to then be graphically displayed on a RPi 3" LCD screen,
which will (may) be executed in a separate module
"""
__author__ = "Jason Karle"
__cop... | 35.210526 | 118 | 0.722471 |
a24600376cb73e663d43dd40bc8d44f9daf6cf45 | 11,513 | py | Python | u-boot-2019.01+gitAUTOINC+333c3e72d3-g333c3e72d3/test/py/tests/test_dfu.py | rlourette/TI_SDK_u-boot-2019.01 | 3000a07c021e84d717e6792a74efcf895a7d7188 | [
"MIT"
] | 1,144 | 2018-12-18T09:46:47.000Z | 2022-03-07T14:51:46.000Z | u-boot-2019.01+gitAUTOINC+333c3e72d3-g333c3e72d3/test/py/tests/test_dfu.py | rlourette/TI_SDK_u-boot-2019.01 | 3000a07c021e84d717e6792a74efcf895a7d7188 | [
"MIT"
] | 16 | 2019-01-28T06:08:40.000Z | 2019-12-04T10:26:41.000Z | u-boot-2019.01+gitAUTOINC+333c3e72d3-g333c3e72d3/test/py/tests/test_dfu.py | rlourette/TI_SDK_u-boot-2019.01 | 3000a07c021e84d717e6792a74efcf895a7d7188 | [
"MIT"
] | 129 | 2018-12-18T09:46:50.000Z | 2022-03-30T07:30:13.000Z | # SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
# Test U-Boot's "dfu" command. The test starts DFU in U-Boot, waits for USB
# device enumeration on the host, executes dfu-util multiple times to test
# various transfer sizes, many of which trigger USB driver edge cases,... | 35.866044 | 100 | 0.641362 |
a9cd539ad56b5563776a2e45ec35c7e1711d8dfe | 1,483 | py | Python | pandas_ta/momentum/mom.py | bartua/pandas-ta | 3bbd5bef4a906f8e810cd557cf20bf92870851c0 | [
"MIT"
] | null | null | null | pandas_ta/momentum/mom.py | bartua/pandas-ta | 3bbd5bef4a906f8e810cd557cf20bf92870851c0 | [
"MIT"
] | null | null | null | pandas_ta/momentum/mom.py | bartua/pandas-ta | 3bbd5bef4a906f8e810cd557cf20bf92870851c0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pandas_ta.utils import get_offset, verify_series
def mom(close, length=None, offset=None, **kwargs):
"""Indicator: Momentum (MOM)"""
# Validate Arguments
length = int(length) if length and length > 0 else 10
close = verify_series(close, length)
offset = get_of... | 24.716667 | 77 | 0.639919 |
9a4df1c375bdbb2d3b00d72c146947453a1a1941 | 15,835 | py | Python | mlflow/projects/__init__.py | vinijaiswal/mlflow | 4daf07ae5a6cad1d280fe75d1a4279639c65dae8 | [
"Apache-2.0"
] | null | null | null | mlflow/projects/__init__.py | vinijaiswal/mlflow | 4daf07ae5a6cad1d280fe75d1a4279639c65dae8 | [
"Apache-2.0"
] | null | null | null | mlflow/projects/__init__.py | vinijaiswal/mlflow | 4daf07ae5a6cad1d280fe75d1a4279639c65dae8 | [
"Apache-2.0"
] | null | null | null | """
The ``mlflow.projects`` module provides an API for running MLflow projects locally or remotely.
"""
import json
import yaml
import os
import logging
import mlflow.projects.databricks
import mlflow.tracking as tracking
from mlflow.entities import RunStatus
from mlflow.exceptions import ExecutionException, MlflowExc... | 40.088608 | 100 | 0.664035 |
a63cc518f595e3deb0baef0e19022d88312aac58 | 1,049 | py | Python | models/feature_extractors.py | Bhaskers-Blu-Org2/Distilled-Sentence-Embedding | 092b70830564c65a2efe8cadecd5da2d5dfdfba9 | [
"MIT"
] | 23 | 2019-12-11T14:52:54.000Z | 2021-09-23T16:03:14.000Z | models/feature_extractors.py | Bhaskers-Blu-Org2/Distilled-Sentence-Embedding | 092b70830564c65a2efe8cadecd5da2d5dfdfba9 | [
"MIT"
] | 7 | 2020-07-17T11:18:48.000Z | 2022-03-12T00:05:57.000Z | models/feature_extractors.py | microsoft/Distilled-Sentence-Embedding | 7e3e87bf6d854c45fb9e5fde6695aa9524325ae7 | [
"MIT"
] | 9 | 2020-01-03T13:26:39.000Z | 2021-09-13T12:31:35.000Z | from abc import ABCMeta, abstractmethod
import torch
class CombinedFeaturesExtractor(metaclass=ABCMeta):
@abstractmethod
def extract_combined_features(self, first_input, second_input):
raise NotImplementedError
@abstractmethod
def get_combined_features_size(self, first_input_size):
... | 29.971429 | 81 | 0.768351 |
73b3d68c72a8a82fbf3e56b837f547fd61c8b0ab | 3,558 | py | Python | chmap/data/corrections/iit/IIT_pipeline_example.py | predsci/CHD | 35f29d1b62861f4ffed57b38d18689b282664bcf | [
"Apache-2.0"
] | 3 | 2021-06-29T00:23:47.000Z | 2021-09-17T18:29:05.000Z | chmap/data/corrections/iit/IIT_pipeline_example.py | predsci/CHD | 35f29d1b62861f4ffed57b38d18689b282664bcf | [
"Apache-2.0"
] | null | null | null | chmap/data/corrections/iit/IIT_pipeline_example.py | predsci/CHD | 35f29d1b62861f4ffed57b38d18689b282664bcf | [
"Apache-2.0"
] | 1 | 2021-12-08T06:26:18.000Z | 2021-12-08T06:26:18.000Z | """
Use the IIT pipeline functions to calculate the correction
"""
import os
import datetime
import numpy as np
from chmap.settings.app import App
from chmap.database.db_funs import init_db_conn_old
import chmap.database.db_classes as db_class
import chmap.data.corrections.iit.IIT_pipeline_funcs as iit_funcs
####### ... | 43.925926 | 118 | 0.725126 |
8e192f6ba10d6ecaa9f26a6ba77fa8363d5acdb6 | 4,394 | py | Python | datasets/fake_news_english/fake_news_english.py | dkajtoch/datasets | 12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9 | [
"Apache-2.0"
] | 9 | 2021-04-26T14:43:52.000Z | 2021-11-08T09:47:24.000Z | datasets/fake_news_english/fake_news_english.py | dkajtoch/datasets | 12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9 | [
"Apache-2.0"
] | null | null | null | datasets/fake_news_english/fake_news_english.py | dkajtoch/datasets | 12ef7f0d541a5aca5b29ebc2dddf5e1214f0e3e9 | [
"Apache-2.0"
] | 1 | 2022-02-23T19:09:42.000Z | 2022-02-23T19:09:42.000Z | # coding=utf-8
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | 47.247312 | 1,028 | 0.690942 |
1e0f358ccc6e08baaa9cb6eac6f313f48132fea8 | 3,059 | py | Python | alipay/aop/api/domain/AlipayBossFncGfsettleprodInvoiceCancelModel.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/domain/AlipayBossFncGfsettleprodInvoiceCancelModel.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/domain/AlipayBossFncGfsettleprodInvoiceCancelModel.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.constant.ParamConstants import *
class AlipayBossFncGfsettleprodInvoiceCancelModel(object):
def __init__(self):
self._invoice_id = None
self._invoice_no = None
self._operator = None
self._operator_type ... | 30.287129 | 85 | 0.609676 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.