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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b11ef5c02b13123afd23074dcce1f68e408bfa87 | 544 | py | Python | Python Exercicios/Curso_Em_Video/Modulo 1/Aula 5 Manipulando Texto/Crie um programa que leia o nome completo de uma pessoa e mostre.py | TiagoSo/PYTHON | a36032786eb506d9c60853460e6d4b37373bafdb | [
"MIT"
] | 1 | 2021-12-23T00:41:22.000Z | 2021-12-23T00:41:22.000Z | Python Exercicios/Curso_Em_Video/Modulo 1/Aula 5 Manipulando Texto/Crie um programa que leia o nome completo de uma pessoa e mostre.py | TiagoSo/PYTHON | a36032786eb506d9c60853460e6d4b37373bafdb | [
"MIT"
] | null | null | null | Python Exercicios/Curso_Em_Video/Modulo 1/Aula 5 Manipulando Texto/Crie um programa que leia o nome completo de uma pessoa e mostre.py | TiagoSo/PYTHON | a36032786eb506d9c60853460e6d4b37373bafdb | [
"MIT"
] | null | null | null | #Crie um programa que leia o nome completo de uma pessoa e mostre:
#– O nome com todas as letras maiúsculas e minúsculas.
#– Quantas letras ao todo (sem considerar espaços).
#– Quantas letras tem o primeiro nome.
print("Digite o seu nome completo por favor")
nome= str(input()).strip()
print("Analisa... | 32 | 66 | 0.6875 |
c83fe29636947f4599a516ac7790b9ddf9f323ee | 7,083 | py | Python | src/aks-preview/azext_aks_preview/_params.py | mboersma/azure-cli-extensions | 9fde4011748f006ba2943e2e3ba69c16605e715f | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/_params.py | mboersma/azure-cli-extensions | 9fde4011748f006ba2943e2e3ba69c16605e715f | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/_params.py | mboersma/azure-cli-extensions | 9fde4011748f006ba2943e2e3ba69c16605e715f | [
"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.
# --------------------------------------------------------------------... | 59.521008 | 172 | 0.682056 |
f569cab933ae9dcf8225f11f518da1180582aca1 | 377 | py | Python | string_manipulation/count_vowels.py | magnusrodseth/data-structures-and-algorithms | 45dfdc0859683d5c76b82b87f415e2c0cdbc15e8 | [
"MIT"
] | null | null | null | string_manipulation/count_vowels.py | magnusrodseth/data-structures-and-algorithms | 45dfdc0859683d5c76b82b87f415e2c0cdbc15e8 | [
"MIT"
] | null | null | null | string_manipulation/count_vowels.py | magnusrodseth/data-structures-and-algorithms | 45dfdc0859683d5c76b82b87f415e2c0cdbc15e8 | [
"MIT"
] | null | null | null | def count_vowels(string: str) -> int:
"""
Find the number of vowels in a string. Vowels in English are A, E, I, O, U, Y
:param string:
:return:
"""
vowels = "aeiouy"
counter = 0
for letter in string.lower():
if letter in vowels:
counter += 1
return counter
if ... | 19.842105 | 81 | 0.575597 |
156302cefb6642ee02a21a38f75b3fc3d4bde9cf | 3,124 | py | Python | tests/test_completion/test_completion_show.py | gmelodie/typer | c4e3e460db89073a9b06c1ec90733ad732956e8e | [
"MIT"
] | 1 | 2020-12-01T07:02:53.000Z | 2020-12-01T07:02:53.000Z | tests/test_completion/test_completion_show.py | gmelodie/typer | c4e3e460db89073a9b06c1ec90733ad732956e8e | [
"MIT"
] | null | null | null | tests/test_completion/test_completion_show.py | gmelodie/typer | c4e3e460db89073a9b06c1ec90733ad732956e8e | [
"MIT"
] | null | null | null | import os
import subprocess
from docs_src.first_steps import tutorial001 as mod
def test_completion_show_no_shell():
result = subprocess.run(
["coverage", "run", mod.__file__, "--show-completion"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
encoding="utf-8",
env={
... | 30.038462 | 98 | 0.606594 |
38bef9b7cda25694d517146827d6d1c4b1035147 | 11,967 | py | Python | ubermagtable/util/util.py | ubermag/ubermagtable | a95ac9529f06e77ed88697c9ffb94b70a3f15c7b | [
"BSD-3-Clause"
] | 4 | 2019-10-21T01:12:37.000Z | 2021-05-27T05:01:07.000Z | ubermagtable/util/util.py | ubermag/ubermagtable | a95ac9529f06e77ed88697c9ffb94b70a3f15c7b | [
"BSD-3-Clause"
] | 8 | 2019-08-06T18:45:43.000Z | 2022-02-21T22:13:32.000Z | ubermagtable/util/util.py | ubermag/ubermagtable | a95ac9529f06e77ed88697c9ffb94b70a3f15c7b | [
"BSD-3-Clause"
] | 1 | 2021-07-04T14:32:38.000Z | 2021-07-04T14:32:38.000Z | import re
# The OOMMF columns are renamed according to this dictionary.
oommf_dict = {'RungeKuttaEvolve:evolver:Total energy': 'E',
'RungeKuttaEvolve:evolver:Energy calc count': 'E_calc_count',
'RungeKuttaEvolve:evolver:Max dm/dt': 'max_dm/dt',
'RungeKuttaEvolve:evolver:dE/dt'... | 37.990476 | 79 | 0.543495 |
93585223c0c20531f9c8f07a06241f37fde48754 | 10,877 | py | Python | assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/grpc/textinput.py | Fishezzz/Google-Pi | 6b26729e8be64d3c9545093e3a232c92b89282f8 | [
"MIT"
] | null | null | null | assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/grpc/textinput.py | Fishezzz/Google-Pi | 6b26729e8be64d3c9545093e3a232c92b89282f8 | [
"MIT"
] | null | null | null | assistant-sdk-python/google-assistant-sdk/googlesamples/assistant/grpc/textinput.py | Fishezzz/Google-Pi | 6b26729e8be64d3c9545093e3a232c92b89282f8 | [
"MIT"
] | null | null | null | # Copyright (C) 2017 Google 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 writi... | 37.636678 | 79 | 0.617174 |
48fe14c33e54dfb399a8d5177f747765f5983d90 | 602 | py | Python | rabbitgetapi/__init__.py | Sidon/get-rabbitmq-messages | 8feff8c9b9edee863d875966f5e5f3a5eb6ab06a | [
"MIT"
] | 11 | 2022-01-10T13:49:39.000Z | 2022-01-11T05:57:45.000Z | rabbitgetapi/__init__.py | Sidon/get-rabbitmq-messages | 8feff8c9b9edee863d875966f5e5f3a5eb6ab06a | [
"MIT"
] | null | null | null | rabbitgetapi/__init__.py | Sidon/get-rabbitmq-messages | 8feff8c9b9edee863d875966f5e5f3a5eb6ab06a | [
"MIT"
] | null | null | null | # Copyleft 2021 Sidon Duarte and contributors
__all__ = (
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
"__copyright__",
)
__copyright__ = "Copyright 2021 Sidon Duarte and individual contributors"
import importlib_metadata
metadata =... | 21.5 | 73 | 0.722591 |
7952766da6086698fbd6c44b7d836aab65ab99c2 | 1,767 | py | Python | Coloring/learning/ppo/utils/arguments.py | zarahz/MARL-and-Markets | 3591a160e098e7251b9e7c7b59c6d0ab08ba0779 | [
"MIT"
] | 1 | 2022-03-12T09:17:32.000Z | 2022-03-12T09:17:32.000Z | Coloring/learning/ppo/utils/arguments.py | zarahz/MARL-and-Markets | 3591a160e098e7251b9e7c7b59c6d0ab08ba0779 | [
"MIT"
] | null | null | null | Coloring/learning/ppo/utils/arguments.py | zarahz/MARL-and-Markets | 3591a160e098e7251b9e7c7b59c6d0ab08ba0779 | [
"MIT"
] | null | null | null | import argparse
def get_train_args(parser):
'''
Add PPO relevant training arguments to the parser.
'''
# epochs range(3,30), wie oft anhand der experience gelernt wird
parser.add_argument("--epochs", type=int, default=4,
help="[PPO] Number of epochs for PPO optimization. (... | 49.083333 | 150 | 0.625354 |
1b7d6afe3285f1d3ba712656dfea009cec12fdd5 | 20,105 | py | Python | Editor/EditorCode/UnitDialogs.py | Shahrose/lex-talionis | ef7e48124b36269f4212eb0e3a7747caf53bfadd | [
"MIT"
] | null | null | null | Editor/EditorCode/UnitDialogs.py | Shahrose/lex-talionis | ef7e48124b36269f4212eb0e3a7747caf53bfadd | [
"MIT"
] | null | null | null | Editor/EditorCode/UnitDialogs.py | Shahrose/lex-talionis | ef7e48124b36269f4212eb0e3a7747caf53bfadd | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import QGridLayout, QDialog, QFormLayout, QLabel, QComboBox, \
QCheckBox, QLineEdit, QDialogButtonBox, QSpinBox, QPushButton
from PyQt5.QtCore import Qt, QSize
sys.path.append('../')
import Code.configuration as cf
import Code.Engine as Engine
# So that the code basically ... | 40.780933 | 116 | 0.622134 |
98286ecf42abd11446bc5c8f1c94f7b049243681 | 3,012 | py | Python | generate_data.py | EliteAi-grad/SVM-SMO | 9974d4678e2db2c3b13c359e265fc61ed2c786d9 | [
"Apache-2.0"
] | null | null | null | generate_data.py | EliteAi-grad/SVM-SMO | 9974d4678e2db2c3b13c359e265fc61ed2c786d9 | [
"Apache-2.0"
] | null | null | null | generate_data.py | EliteAi-grad/SVM-SMO | 9974d4678e2db2c3b13c359e265fc61ed2c786d9 | [
"Apache-2.0"
] | null | null | null | import numpy as np
# Copyright 2021 Google Inc. All Rights Reserved.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#Unless required by applica... | 35.857143 | 79 | 0.608566 |
e2fdde71ebd00c8776525d585ae7adb57473fd1d | 1,334 | py | Python | Intermediate/regex.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2021-12-17T11:03:13.000Z | 2021-12-17T11:03:13.000Z | Intermediate/regex.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2020-02-05T00:14:43.000Z | 2020-02-06T09:22:49.000Z | Intermediate/regex.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
valid_countries = ["US", "IT", "FR"]
def extract_price(description, country):
if country not in valid_countries:
return
if country == "US":
pattern = re.compile(r'\$(\d+\.\d+)')
match = pattern.search(description)
if no... | 22.610169 | 61 | 0.51949 |
76f29ccb0ef9a81ea291d9a21fd9bca99f856caf | 28,306 | py | Python | exchangelib/autodiscover/discovery.py | RossK1/exchangelib | 5550c2fbcc064943e3b4e150f74a724e0bd0a9f3 | [
"BSD-2-Clause"
] | 1,006 | 2016-07-18T16:42:55.000Z | 2022-03-31T10:43:50.000Z | exchangelib/autodiscover/discovery.py | RossK1/exchangelib | 5550c2fbcc064943e3b4e150f74a724e0bd0a9f3 | [
"BSD-2-Clause"
] | 966 | 2016-05-13T18:55:43.000Z | 2022-03-31T15:24:56.000Z | exchangelib/autodiscover/discovery.py | RossK1/exchangelib | 5550c2fbcc064943e3b4e150f74a724e0bd0a9f3 | [
"BSD-2-Clause"
] | 272 | 2016-04-05T02:17:10.000Z | 2022-03-24T08:15:57.000Z | import logging
import time
from urllib.parse import urlparse
import dns.resolver
from cached_property import threaded_cached_property
from .cache import autodiscover_cache
from .properties import Autodiscover
from .protocol import AutodiscoverProtocol
from ..configuration import Configuration
from ..credentials impor... | 49.227826 | 141 | 0.645411 |
34fd42b2dfbb939e69a7dc10285ef585868c8ddf | 765 | py | Python | effective_python/one.py | aleeper/python_sandbox | 2c320e043735f99fac68308fe2692c819cf5a636 | [
"MIT"
] | null | null | null | effective_python/one.py | aleeper/python_sandbox | 2c320e043735f99fac68308fe2692c819cf5a636 | [
"MIT"
] | null | null | null | effective_python/one.py | aleeper/python_sandbox | 2c320e043735f99fac68308fe2692c819cf5a636 | [
"MIT"
] | null | null | null | key = 'my_var'
value = 0.234
formatted = f'{key!r:<10} = {value:+.2f}'
print(formatted)
item = ('Peanut butter', 'Jelly', 'Jam')
first, second, third = item
print(first, 'and', second)
print(*item)
snack_calories = {
'chips': 140,
'popcorn': 80,
'nuts': 190
}
for rank, (name, calories) in enumerate(snack_calories.... | 20.675676 | 71 | 0.662745 |
2a69bf5899f2e75077a94076c96a1bc614d17f17 | 5,041 | py | Python | tests/sentry/integrations/jira/test_configure.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | 1 | 2019-08-28T11:03:13.000Z | 2019-08-28T11:03:13.000Z | tests/sentry/integrations/jira/test_configure.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | 1 | 2019-03-13T06:05:24.000Z | 2019-03-13T06:05:24.000Z | tests/sentry/integrations/jira/test_configure.py | boblail/sentry | 71127331e58791d4651e480b65dd66f06cadc1c8 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from mock import patch
from jwt import ExpiredSignatureError
from django.core.urlresolvers import reverse
from sentry.integrations.atlassian_connect import AtlassianConnectValidationError
from sentry.models import Integration
from sentry.testutils import APITestCase
from sentry... | 43.08547 | 96 | 0.749454 |
90fba69cb8068a100ad60c7ec9c9a72989350ddb | 3,436 | py | Python | assets/migrations/0002_auto_20190713_1727.py | UlovHer/CMDB | 2288e71441ccddaeeeebf0f81cfeb3e321817738 | [
"MIT"
] | null | null | null | assets/migrations/0002_auto_20190713_1727.py | UlovHer/CMDB | 2288e71441ccddaeeeebf0f81cfeb3e321817738 | [
"MIT"
] | null | null | null | assets/migrations/0002_auto_20190713_1727.py | UlovHer/CMDB | 2288e71441ccddaeeeebf0f81cfeb3e321817738 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-07-13 17:27
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('assets', '0001_initial'),
migrations.swappable_dependency(setti... | 39.953488 | 182 | 0.610885 |
e9d4f2a6d268149f0f20265a98ad5982d7233c03 | 61,920 | py | Python | lib/rucio/tests/test_replica.py | davidpob99/rucio | 7c8f6ae1adfa0d41e533da572997bdfed6c555e1 | [
"Apache-2.0"
] | 1 | 2020-03-19T11:48:44.000Z | 2020-03-19T11:48:44.000Z | lib/rucio/tests/test_replica.py | davidpob99/rucio | 7c8f6ae1adfa0d41e533da572997bdfed6c555e1 | [
"Apache-2.0"
] | 3 | 2020-12-16T11:18:12.000Z | 2021-04-12T11:38:51.000Z | lib/rucio/tests/test_replica.py | davidpob99/rucio | 7c8f6ae1adfa0d41e533da572997bdfed6c555e1 | [
"Apache-2.0"
] | 1 | 2021-01-18T21:28:29.000Z | 2021-01-18T21:28:29.000Z | # -*- coding: utf-8 -*-
# Copyright 2013-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... | 50.629599 | 179 | 0.622771 |
ef53eb70c33118eca4d5e2773040fe8528edc2e9 | 6,913 | py | Python | python/afsk_basic.py | pavelfpl/gr-gsSDR | 141f5cd1f53b9691c7c7e084f32343bddc0d2d97 | [
"MIT"
] | 1 | 2021-06-16T14:35:29.000Z | 2021-06-16T14:35:29.000Z | python/afsk_basic.py | pavelfpl/gr-gsSDR | 141f5cd1f53b9691c7c7e084f32343bddc0d2d97 | [
"MIT"
] | null | null | null | python/afsk_basic.py | pavelfpl/gr-gsSDR | 141f5cd1f53b9691c7c7e084f32343bddc0d2d97 | [
"MIT"
] | 1 | 2021-03-03T14:51:02.000Z | 2021-03-03T14:51:02.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2021 Pavel Fiala
#
# 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 limita... | 37.775956 | 122 | 0.558513 |
12895bb4f0ca81fc9819d8b4969034f47711f172 | 94 | py | Python | joplin/pages/event_page/apps.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 15 | 2018-09-27T07:36:30.000Z | 2021-08-03T16:01:21.000Z | joplin/pages/event_page/apps.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 183 | 2017-11-16T23:30:47.000Z | 2020-12-18T21:43:36.000Z | joplin/pages/event_page/apps.py | cityofaustin/joplin | 01424e46993e9b1c8e57391d6b7d9448f31d596b | [
"MIT"
] | 12 | 2017-12-12T22:48:05.000Z | 2021-03-01T18:01:24.000Z | from django.apps import AppConfig
class EventPageConfig(AppConfig):
name = 'event_page'
| 15.666667 | 33 | 0.765957 |
8b55ea3aca6d5193dad5e6b2ccd8cfcc8a824b56 | 1,895 | py | Python | smc/examples/switch_interface.py | kobaan/fp-NGFW-SMC-python | 7be57bdde954e4115a887c0140054c87cc0b53a0 | [
"Apache-2.0"
] | 17 | 2019-11-19T07:25:09.000Z | 2022-02-16T16:43:51.000Z | smc/examples/switch_interface.py | kobaan/fp-NGFW-SMC-python | 7be57bdde954e4115a887c0140054c87cc0b53a0 | [
"Apache-2.0"
] | 25 | 2020-05-20T12:27:35.000Z | 2022-02-21T05:27:10.000Z | smc/examples/switch_interface.py | kobaan/fp-NGFW-SMC-python | 7be57bdde954e4115a887c0140054c87cc0b53a0 | [
"Apache-2.0"
] | 7 | 2020-02-04T12:16:50.000Z | 2022-02-18T14:01:04.000Z | """
Example script to show how to use Switch interfaces
-create switch interface/port group for an engine
-display switch interface
-delete switch interface
Needs Demo mode
"""
# Python Base Import
from smc import session
from smc.compat import is_api_version_less_than_or_equal
from smc.core.engines import Layer3Fire... | 35.754717 | 99 | 0.667018 |
5f9164c1cc7e9494a573895e93fd39680b8520f6 | 1,324 | py | Python | ymir/backend/src/ymir_app/app/models/iteration.py | Zhang-SJ930104/ymir | dd6481be6f229ade4cf8fba64ef44a15357430c4 | [
"Apache-2.0"
] | null | null | null | ymir/backend/src/ymir_app/app/models/iteration.py | Zhang-SJ930104/ymir | dd6481be6f229ade4cf8fba64ef44a15357430c4 | [
"Apache-2.0"
] | 1 | 2022-01-18T09:28:29.000Z | 2022-01-18T09:28:29.000Z | ymir/backend/src/ymir_app/app/models/iteration.py | Aryalfrat/ymir | d4617ed00ef67a77ab4e1944763f608bface4be6 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from sqlalchemy import Boolean, Column, DateTime, Integer, SmallInteger, String
from app.config import settings
from app.db.base_class import Base
from app.models.task import Task # noqa
class Iteration(Base):
__tablename__ = "iteration"
id = Column(Integer, primary_key=True, ... | 36.777778 | 79 | 0.749245 |
9c2bc8c5d959e04429538ef1d2dbb29ff5f8426c | 399 | py | Python | calipsoplus/wsgi.py | dsanchez-cells/calipsoplus-backend | 7eaa6904ec59d88052644b31041b92ee20e54354 | [
"MIT"
] | 4 | 2018-12-04T15:08:27.000Z | 2019-04-11T09:49:41.000Z | calipsoplus/wsgi.py | dsanchez-cells/calipsoplus-backend | 7eaa6904ec59d88052644b31041b92ee20e54354 | [
"MIT"
] | 63 | 2018-11-22T13:07:56.000Z | 2021-06-10T20:55:58.000Z | calipsoplus/wsgi.py | dsanchez-cells/calipsoplus-backend | 7eaa6904ec59d88052644b31041b92ee20e54354 | [
"MIT"
] | 10 | 2018-11-23T08:17:28.000Z | 2022-01-15T23:41:59.000Z | """
WSGI config for calipsoplus project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | 23.470588 | 78 | 0.789474 |
a0722888b4a9e16d2484eca76aa9a74456555147 | 5,715 | py | Python | tensorflow/python/kernel_tests/sparse_ops/sparse_reorder_op_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 190,993 | 2015-11-09T13:17:30.000Z | 2022-03-31T23:05:27.000Z | tensorflow/python/kernel_tests/sparse_ops/sparse_reorder_op_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 48,461 | 2015-11-09T14:21:11.000Z | 2022-03-31T23:17:33.000Z | tensorflow/python/kernel_tests/sparse_ops/sparse_reorder_op_test.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 104,981 | 2015-11-09T13:40:17.000Z | 2022-03-31T19:51:54.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.413043 | 80 | 0.695188 |
7024ac2376c8652f3b5d17d514c2b573ff16a7e0 | 113,866 | py | Python | numpy/core/fromnumeric.py | shoyer/numpy | 4ad33d21b1a30f931e23307e9f9355b70f633bed | [
"BSD-3-Clause"
] | 1 | 2020-12-22T17:44:13.000Z | 2020-12-22T17:44:13.000Z | numpy/core/fromnumeric.py | shoyer/numpy | 4ad33d21b1a30f931e23307e9f9355b70f633bed | [
"BSD-3-Clause"
] | null | null | null | numpy/core/fromnumeric.py | shoyer/numpy | 4ad33d21b1a30f931e23307e9f9355b70f633bed | [
"BSD-3-Clause"
] | 1 | 2019-06-11T20:34:19.000Z | 2019-06-11T20:34:19.000Z | """Module containing non-deprecated functions borrowed from Numeric.
"""
from __future__ import division, absolute_import, print_function
import functools
import types
import warnings
import numpy as np
from .. import VisibleDeprecationWarning
from . import multiarray as mu
from . import overrides
from . import umat... | 31.931015 | 103 | 0.608478 |
ef9c2235339e74c1dba98dd013fe3c9298cefcba | 7,548 | py | Python | bridgedata.py | drhoet/marantz-hue-adapter | 48dcdc8f00d671a6edbcc5e8c12b8a0604892b33 | [
"MIT"
] | null | null | null | bridgedata.py | drhoet/marantz-hue-adapter | 48dcdc8f00d671a6edbcc5e8c12b8a0604892b33 | [
"MIT"
] | null | null | null | bridgedata.py | drhoet/marantz-hue-adapter | 48dcdc8f00d671a6edbcc5e8c12b8a0604892b33 | [
"MIT"
] | null | null | null | import json
import logging
# Remark: this class is not thread-safe. It doesn't have to be, since everything is running on 1 thread: the server
# is an async server...
class BridgeData():
def __init__(self, config):
self.lights = {}
self.config = {
"name": config['HueBridg... | 34.309091 | 123 | 0.556041 |
6d12ed1793bd72b7187185c3b641c4dd3e5e0b48 | 357 | py | Python | _apicheck/apicheck/tools/manage/create_tool/cli.py | sundayayandele/apicheck | ab91f567d67547b92b8e94824a29dcd5993b769e | [
"Apache-2.0"
] | 2 | 2019-05-31T09:56:59.000Z | 2019-05-31T11:28:50.000Z | _apicheck/apicheck/tools/manage/create_tool/cli.py | sundayayandele/apicheck | ab91f567d67547b92b8e94824a29dcd5993b769e | [
"Apache-2.0"
] | 3 | 2022-02-07T03:37:37.000Z | 2022-03-02T03:38:13.000Z | _apicheck/apicheck/tools/manage/create_tool/cli.py | sundayayandele/apicheck | ab91f567d67547b92b8e94824a29dcd5993b769e | [
"Apache-2.0"
] | 1 | 2021-07-18T15:01:22.000Z | 2021-07-18T15:01:22.000Z |
def cli(subparser):
plugin_args = subparser.add_parser(
'create-tool',
help='Manage stored APIs')
plugin_args.add_argument('name',
help="plugin name")
plugin_args.add_argument('--dest', "-d",
required=True,
... | 25.5 | 59 | 0.504202 |
946e26ffb9449698bb234c074433ca0fe25165d1 | 3,301 | py | Python | pkimplode/__init__.py | implode-compression-impls/pkimplode.py | 938746f261279dbd5739ef52600474f2ff37f69e | [
"MIT"
] | null | null | null | pkimplode/__init__.py | implode-compression-impls/pkimplode.py | 938746f261279dbd5739ef52600474f2ff37f69e | [
"MIT"
] | null | null | null | pkimplode/__init__.py | implode-compression-impls/pkimplode.py | 938746f261279dbd5739ef52600474f2ff37f69e | [
"MIT"
] | null | null | null | import typing
from collections.abc import ByteString
from io import BytesIO, IOBase
from mmap import mmap
from warnings import warn
from zlib import crc32 as crc32_zlib
from pklib_base import PklibError
from pklib_base.enums import CompressionType
from .ctypes import _compressStream
__all__ = ("compressStreamToStre... | 43.434211 | 189 | 0.795517 |
ad4b9a76736c7ff153ead1e4c724f6a4902a8fe7 | 3,738 | py | Python | pandas_ta/overlap/supertrend.py | cloudlakecho/pandas-ta | f361621d614cd4ca67800c99be27cc908c0fce96 | [
"MIT"
] | null | null | null | pandas_ta/overlap/supertrend.py | cloudlakecho/pandas-ta | f361621d614cd4ca67800c99be27cc908c0fce96 | [
"MIT"
] | null | null | null | pandas_ta/overlap/supertrend.py | cloudlakecho/pandas-ta | f361621d614cd4ca67800c99be27cc908c0fce96 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import NaN as npNaN
from pandas import DataFrame
from pandas_ta.overlap import hl2
from pandas_ta.volatility import atr
from pandas_ta.utils import get_offset, verify_series
def supertrend(high, low, close, length=None, multiplier=None, offset=None, **kwargs):
"""Indicator: Supe... | 30.639344 | 95 | 0.629213 |
579c1a5044a4a2bc341a3def1eeb1d352209d927 | 4,356 | py | Python | squid_log_reader.py | recursethenreverse/numerouter | 463ca5e96fb8426c05566ceaff91ab80c0e18bf5 | [
"MIT"
] | null | null | null | squid_log_reader.py | recursethenreverse/numerouter | 463ca5e96fb8426c05566ceaff91ab80c0e18bf5 | [
"MIT"
] | null | null | null | squid_log_reader.py | recursethenreverse/numerouter | 463ca5e96fb8426c05566ceaff91ab80c0e18bf5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import time
import os
import sys
import getopt
import pika
import json
import signal
class squid_to_rmq_injector:
type_application = "application"
type_application_json = "application/json"
type_img = ["image/gif",
"image/png",
"image/jpeg",
... | 31.565217 | 92 | 0.59068 |
71e66dbf56b23e023d1785e8d8823c82fe2dc01e | 4,708 | py | Python | src/local/butler/package.py | nopsledder/clusterfuzz | 529963438d956e46ddddfb62debc6ed808be0083 | [
"Apache-2.0"
] | 1 | 2020-05-21T18:47:06.000Z | 2020-05-21T18:47:06.000Z | src/local/butler/package.py | nopsledder/clusterfuzz | 529963438d956e46ddddfb62debc6ed808be0083 | [
"Apache-2.0"
] | 20 | 2020-07-28T19:01:56.000Z | 2021-03-23T01:04:42.000Z | src/local/butler/package.py | nopsledder/clusterfuzz | 529963438d956e46ddddfb62debc6ed808be0083 | [
"Apache-2.0"
] | null | null | null | # 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.178808 | 80 | 0.724936 |
0770455229ba59a073ce8e93868e77e123c73c59 | 687 | py | Python | solutions/Deepest Leaves Sum/solution.py | nilax97/leetcode-solutions | d3c12f2b289662d199510e0431e177bbf3cda121 | [
"MIT"
] | 3 | 2021-06-06T22:03:15.000Z | 2021-06-08T08:49:04.000Z | solutions/Deepest Leaves Sum/solution.py | nilax97/leetcode-solutions | d3c12f2b289662d199510e0431e177bbf3cda121 | [
"MIT"
] | null | null | null | solutions/Deepest Leaves Sum/solution.py | nilax97/leetcode-solutions | d3c12f2b289662d199510e0431e177bbf3cda121 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def dfs(self, node, height):
if node == None:
return
if len(self.mat) < hei... | 26.423077 | 55 | 0.519651 |
e477a093cc6bd2b00e094676e4d623422285089a | 3,080 | py | Python | finsim-merch/merchant.py | sei-inam/finsim | 0839b3fc15600be59743b84fb4801e9175d54cb4 | [
"Unlicense",
"MIT"
] | 14 | 2019-08-01T12:00:00.000Z | 2021-06-27T06:07:03.000Z | finsim-merch/merchant.py | sei-inam/finsim | 0839b3fc15600be59743b84fb4801e9175d54cb4 | [
"Unlicense",
"MIT"
] | null | null | null | finsim-merch/merchant.py | sei-inam/finsim | 0839b3fc15600be59743b84fb4801e9175d54cb4 | [
"Unlicense",
"MIT"
] | 9 | 2019-06-18T13:17:21.000Z | 2022-02-02T20:08:11.000Z | #!/usr/bin/python3
# FinSim
# Copyright 2018 Carnegie Mellon University. All Rights Reserved.
# NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, AS TO AN... | 73.333333 | 514 | 0.701299 |
8a3c35005929542401c2c5abf6030dbb39f373cb | 10,558 | py | Python | saleor/webhook/payloads.py | angeles-ricardo-89/saleor | 5fab7a883d025bff83320fbdd557ed7afa2923a9 | [
"BSD-3-Clause"
] | null | null | null | saleor/webhook/payloads.py | angeles-ricardo-89/saleor | 5fab7a883d025bff83320fbdd557ed7afa2923a9 | [
"BSD-3-Clause"
] | null | null | null | saleor/webhook/payloads.py | angeles-ricardo-89/saleor | 5fab7a883d025bff83320fbdd557ed7afa2923a9 | [
"BSD-3-Clause"
] | null | null | null | import json
from typing import Optional
from django.db.models import QuerySet
from ..account.models import User
from ..checkout.models import Checkout
from ..core.utils.anonymization import (
anonymize_checkout,
anonymize_order,
generate_fake_user,
)
from ..invoice.models import Invoice
from ..order impor... | 31.422619 | 85 | 0.644156 |
9f1cb662ef1192033096fe9743ac1be2f40c6de5 | 27 | py | Python | arnold/crud/read/__init__.py | Clinical-Genomics/arnold | 8b0dfe5a97736b60ffc3498b4f54c91f31bfe410 | [
"MIT"
] | null | null | null | arnold/crud/read/__init__.py | Clinical-Genomics/arnold | 8b0dfe5a97736b60ffc3498b4f54c91f31bfe410 | [
"MIT"
] | 2 | 2022-03-23T09:57:42.000Z | 2022-03-28T08:28:46.000Z | arnold/crud/read/__init__.py | Clinical-Genomics/arnold | 8b0dfe5a97736b60ffc3498b4f54c91f31bfe410 | [
"MIT"
] | null | null | null | from . import sample, step
| 13.5 | 26 | 0.740741 |
0f0864a88667f9bede4ed2af736d04cea378e0fa | 19,869 | py | Python | my_job_v3.py | dkcamargox/my-job | c1e5caca99a5aa346a22228bd1538d8ca4feb485 | [
"MIT"
] | null | null | null | my_job_v3.py | dkcamargox/my-job | c1e5caca99a5aa346a22228bd1538d8ca4feb485 | [
"MIT"
] | null | null | null | my_job_v3.py | dkcamargox/my-job | c1e5caca99a5aa346a22228bd1538d8ca4feb485 | [
"MIT"
] | null | null | null | from http.server import SimpleHTTPRequestHandler
import openpyxl as xls
import pprint as pp
import datetime
import time
from dateutil import parser
import os
import win32com.client
from google_sheet_controller import SheetController
def main():
ARCHIVE_NAME = input('Insertá el nombre del archivo\t')
SKIP_FORM... | 33.848382 | 184 | 0.556948 |
3fadeb510209f0a0b4fc55bd8871d0d89ff25679 | 1,948 | py | Python | src/villages/models.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | null | null | null | src/villages/models.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | null | null | null | src/villages/models.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | null | null | null | from django.urls import reverse_lazy
from django.db import models
from django.utils.text import slugify
from utils.models import UUIDModel, CampRelatedModel
class Village(UUIDModel, CampRelatedModel):
class Meta:
ordering = ["name"]
unique_together = ("slug", "camp")
contact = models.ForeignK... | 32.466667 | 96 | 0.596509 |
647ba39e90ea3bd481c20540ca73b992efd09ea9 | 1,531 | py | Python | cpo/lib/fyre/utils/network.py | IBM/data-gate-cli | fc0cb1a560a0156c71eb63a550e198d0cd36e1df | [
"Apache-2.0"
] | 9 | 2020-08-21T08:46:34.000Z | 2021-09-02T15:47:41.000Z | cpo/lib/fyre/utils/network.py | IBM/data-gate-cli | fc0cb1a560a0156c71eb63a550e198d0cd36e1df | [
"Apache-2.0"
] | 10 | 2020-11-26T15:31:43.000Z | 2021-11-08T15:00:01.000Z | cpo/lib/fyre/utils/network.py | IBM/data-gate-cli | fc0cb1a560a0156c71eb63a550e198d0cd36e1df | [
"Apache-2.0"
] | 1 | 2022-03-10T07:14:49.000Z | 2022-03-10T07:14:49.000Z | # Copyright 2021 IBM Corporation
#
# 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 wri... | 29.442308 | 120 | 0.7113 |
998cede907e9f40aec064656702b21837618a8e8 | 288 | py | Python | dynamodbgeo/__init__.py | alpreu/dynamodb-geo.py | 1910368b020cddfe8275f94d7962cc48ca0ec9bd | [
"MIT"
] | 25 | 2020-04-13T20:04:19.000Z | 2022-03-18T12:34:06.000Z | dynamodbgeo/__init__.py | alpreu/dynamodb-geo.py | 1910368b020cddfe8275f94d7962cc48ca0ec9bd | [
"MIT"
] | 11 | 2020-04-18T10:45:39.000Z | 2021-09-09T10:06:14.000Z | dynamodbgeo/__init__.py | alpreu/dynamodb-geo.py | 1910368b020cddfe8275f94d7962cc48ca0ec9bd | [
"MIT"
] | 14 | 2020-05-25T21:04:48.000Z | 2021-11-08T17:37:42.000Z | import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
from s2 import *
from model import *
from util import *
from DynamoDBManager import DynamoDBManager
from GeoDataManager import GeoDataManager
from GeoDataManagerConfiguration import GeoDataManagerConfiguration
| 32 | 76 | 0.840278 |
ea8021f2bf7f77f358b999889897250824ec60b9 | 591 | py | Python | listings/admin.py | verumafalsum/btre_django | 882eaa1ca33a6a79bb1b1f5918b9d0fb0abfeded | [
"MIT"
] | null | null | null | listings/admin.py | verumafalsum/btre_django | 882eaa1ca33a6a79bb1b1f5918b9d0fb0abfeded | [
"MIT"
] | null | null | null | listings/admin.py | verumafalsum/btre_django | 882eaa1ca33a6a79bb1b1f5918b9d0fb0abfeded | [
"MIT"
] | null | null | null | from django.contrib import admin
from listings.models import Listing
class ListingAdmin(admin.ModelAdmin):
list_display = (
'id',
'title',
'price',
'list_date',
'realtor',
'is_published'
)
list_display_links = ('id', 'title')
list_filter = ('realtor... | 19.064516 | 42 | 0.539763 |
8fbefbb1ab0fab464afef209e0fe2189071da1de | 1,155 | py | Python | linPEAS/builder/src/yamlGlobals.py | sahil-rawat/privilege-escalation-awesome-scripts-suite | c2c7604f89e88ea46687f41f842cfa328dfc4750 | [
"MIT"
] | null | null | null | linPEAS/builder/src/yamlGlobals.py | sahil-rawat/privilege-escalation-awesome-scripts-suite | c2c7604f89e88ea46687f41f842cfa328dfc4750 | [
"MIT"
] | null | null | null | linPEAS/builder/src/yamlGlobals.py | sahil-rawat/privilege-escalation-awesome-scripts-suite | c2c7604f89e88ea46687f41f842cfa328dfc4750 | [
"MIT"
] | null | null | null | import os
import yaml
CURRENT_DIR = os.path.dirname(os.path.realpath(__file__))
LINPEAS_BASE_PATH = CURRENT_DIR + "/../linpeas_base.sh"
FINAL_LINPEAS_PATH = CURRENT_DIR + "/../../" + "linpeas.sh"
YAML_NAME = "sensitive_files.yaml"
FILES_YAML = CURRENT_DIR + "/../../../build_lists/" + YAML_NAME
with open(FILES_YAML, '... | 38.5 | 68 | 0.800866 |
be1f79c4aca70068a422c4ed01f7ddab7809c049 | 2,249 | py | Python | src/scing/push.py | hisplan/scing | c677235eba2ca371113b154301fb59916a3c481f | [
"MIT"
] | null | null | null | src/scing/push.py | hisplan/scing | c677235eba2ca371113b154301fb59916a3c481f | [
"MIT"
] | null | null | null | src/scing/push.py | hisplan/scing | c677235eba2ca371113b154301fb59916a3c481f | [
"MIT"
] | 1 | 2022-02-24T20:42:45.000Z | 2022-02-24T20:42:45.000Z | import os
from docker.helper import Docker
from docker.aws_ecr import AwsEcr
from docker.quay_io import QuayIO
from scing.error import raise_error
def handle_push(image: str):
registry, image_name, image_version = Docker.parse_name(image)
exit_code = Docker.tag(registry, image_name, image_version)
if ex... | 38.775862 | 93 | 0.643842 |
314320be3e28d58d1a53fbfabf4ddc3434c5b4b4 | 2,623 | py | Python | src/ms_graph_api.py | armanrahman22/teams-light | 834d72cc60511373059dfa16297ec94a62d1a848 | [
"MIT"
] | null | null | null | src/ms_graph_api.py | armanrahman22/teams-light | 834d72cc60511373059dfa16297ec94a62d1a848 | [
"MIT"
] | null | null | null | src/ms_graph_api.py | armanrahman22/teams-light | 834d72cc60511373059dfa16297ec94a62d1a848 | [
"MIT"
] | null | null | null | """
The configuration file would look like this (sans those // comments):
{
"authority": "https://login.microsoftonline.com/Enter_the_Tenant_Name_Here",
"client_id": "your_client_id",
"scope": ["https://graph.microsoft.com/.default"],
// For more information about scopes for an app, refer:
... | 36.430556 | 174 | 0.725124 |
bcd150a186fa0e7194bb9e3fb9f95731834ce6c9 | 728 | py | Python | django/bitcoin_monitor/middleware.py | chanhosuh/bitcoin-monitor | acecfcf020cf2debfdf3a2e8c446007d7412d8e1 | [
"MIT"
] | 1 | 2020-01-01T15:54:45.000Z | 2020-01-01T15:54:45.000Z | django/bitcoin_monitor/middleware.py | chanhosuh/bitcoin-monitor | acecfcf020cf2debfdf3a2e8c446007d7412d8e1 | [
"MIT"
] | 13 | 2019-02-28T03:24:54.000Z | 2021-09-22T17:50:00.000Z | django/bitcoin_monitor/middleware.py | chanhosuh/bitcoin-monitor | acecfcf020cf2debfdf3a2e8c446007d7412d8e1 | [
"MIT"
] | null | null | null | """ https://www.fusionbox.com/blog/detail/create-react-app-and-django/624/ """
def dev_cors_middleware(get_response):
"""
Adds CORS headers for local testing only to allow the frontend, which is served on
localhost:3000, to access the API, which is served on localhost:8000.
"""
def middleware(requ... | 38.315789 | 97 | 0.684066 |
332e161eef959186a60c270cf82bdddc8cea38bc | 98,053 | py | Python | test/unit/container/test_backend.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | test/unit/container/test_backend.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | test/unit/container/test_backend.py | thiagodasilva/swift | 0553d9333ed0045c4d209065b315533a33e5d7d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 agree... | 45.081839 | 79 | 0.565021 |
283f0601687abbce36dfd840691216f850c7c99e | 8,923 | py | Python | bcs-ui/backend/templatesets/var_mgmt/serializers.py | masanqi/bk-bcs | 70d97b674fbd5beacde21d6ca8be914d7eb56865 | [
"Apache-2.0"
] | 599 | 2019-06-25T03:20:46.000Z | 2022-03-31T12:14:33.000Z | bcs-ui/backend/templatesets/var_mgmt/serializers.py | masanqi/bk-bcs | 70d97b674fbd5beacde21d6ca8be914d7eb56865 | [
"Apache-2.0"
] | 537 | 2019-06-27T06:03:44.000Z | 2022-03-31T12:10:01.000Z | bcs-ui/backend/templatesets/var_mgmt/serializers.py | masanqi/bk-bcs | 70d97b674fbd5beacde21d6ca8be914d7eb56865 | [
"Apache-2.0"
] | 214 | 2019-06-25T03:26:05.000Z | 2022-03-31T07:52:03.000Z | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 35.835341 | 117 | 0.674549 |
c9e13f55e7aebb97f9dd5efbae37478aed79a8de | 1,466 | py | Python | client/py_client/modules/funds/models/get_content_list.py | thefstock/FirstockPy | 09b4dcf3470f83de991b43213958d2c6783f997b | [
"MIT"
] | 1 | 2022-03-29T06:56:06.000Z | 2022-03-29T06:56:06.000Z | client/py_client/modules/funds/models/get_content_list.py | thefstock/FirstockPy | 09b4dcf3470f83de991b43213958d2c6783f997b | [
"MIT"
] | 3 | 2022-01-17T09:31:21.000Z | 2022-03-11T12:12:08.000Z | client/py_client/modules/funds/models/get_content_list.py | thefstock/FirstockPy | 09b4dcf3470f83de991b43213958d2c6783f997b | [
"MIT"
] | null | null | null |
"""
Request and response models for get content list request
"""
from typing import Optional
from pydantic import BaseModel
from datetime import datetime
from ....common.enums import ResponseStatus
from ....utils.decoders import build_loader, datetime_decoder
__all__ = ['GetContentListRequestModel', 'GetContentListR... | 24.032787 | 71 | 0.689632 |
0fd7faf4acd714a0457a6d7eed52cf0da65a27ee | 7,092 | py | Python | designate_tempest_plugin/tests/api/v2/test_tld.py | mail2nsrajesh/designate-tempest-plugin | 0e09e0f2deb80f88bc7c929478aa7e1dd1b72296 | [
"Apache-2.0"
] | null | null | null | designate_tempest_plugin/tests/api/v2/test_tld.py | mail2nsrajesh/designate-tempest-plugin | 0e09e0f2deb80f88bc7c929478aa7e1dd1b72296 | [
"Apache-2.0"
] | null | null | null | designate_tempest_plugin/tests/api/v2/test_tld.py | mail2nsrajesh/designate-tempest-plugin | 0e09e0f2deb80f88bc7c929478aa7e1dd1b72296 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 NEC 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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 37.13089 | 78 | 0.635646 |
e61cd50038b7a2e0e8de6e219f203a5126911c70 | 5,492 | py | Python | bot/cogs/site.py | crazygmr101/bot | 93be87cea7cde7333042e2bb9529867723f567a7 | [
"MIT"
] | null | null | null | bot/cogs/site.py | crazygmr101/bot | 93be87cea7cde7333042e2bb9529867723f567a7 | [
"MIT"
] | null | null | null | bot/cogs/site.py | crazygmr101/bot | 93be87cea7cde7333042e2bb9529867723f567a7 | [
"MIT"
] | null | null | null | import logging
from discord import Colour, Embed
from discord.ext.commands import Cog, Context, group
from bot.bot import Bot
from bot.constants import URLs
from bot.pagination import LinePaginator
log = logging.getLogger(__name__)
PAGES_URL = f"{URLs.site_schema}{URLs.site}/pages"
class Site(Cog):
"""Command... | 37.360544 | 106 | 0.619993 |
2b3713cab68dd487a6763f2553e1565f6b8346ee | 14,862 | py | Python | tracmass_scripts/export_tracmass_to_nc.py | oj-tooth/lt_toolbox | e6521fc0c243d1ff84599c418ae43271c6bd746c | [
"MIT"
] | 5 | 2021-02-03T09:42:47.000Z | 2021-02-05T02:15:35.000Z | tracmass_scripts/export_tracmass_to_nc.py | oj-tooth/lt_toolbox | e6521fc0c243d1ff84599c418ae43271c6bd746c | [
"MIT"
] | 2 | 2020-12-15T12:20:30.000Z | 2020-12-22T14:14:32.000Z | tracmass_scripts/export_tracmass_to_nc.py | oj-tooth/lt_toolbox | e6521fc0c243d1ff84599c418ae43271c6bd746c | [
"MIT"
] | null | null | null | ################################################################
# export_tracmass_to_nc.py
# --------------------------------------------------------------
# Description: Script to transform TRACMASS model
# output to standard NCEI_NetCDF_Trajectory format.
#
# User Input: Locations where user modification is required... | 36.24878 | 140 | 0.594133 |
d73da28fdbcd57c0a5ea47224197acc719f21237 | 10,478 | py | Python | gym_pybullet_drones/envs/CtrlAviary.py | ziyangli/gym-pybullet-drones | 5593ec16a53c299f5300c62f6dff14b15247fcf5 | [
"MIT"
] | null | null | null | gym_pybullet_drones/envs/CtrlAviary.py | ziyangli/gym-pybullet-drones | 5593ec16a53c299f5300c62f6dff14b15247fcf5 | [
"MIT"
] | null | null | null | gym_pybullet_drones/envs/CtrlAviary.py | ziyangli/gym-pybullet-drones | 5593ec16a53c299f5300c62f6dff14b15247fcf5 | [
"MIT"
] | 1 | 2020-10-12T20:30:45.000Z | 2020-10-12T20:30:45.000Z | import numpy as np
from gym import error, spaces, utils
from gym_pybullet_drones.envs.BaseAviary import DroneModel, Physics, BaseAviary
######################################################################################################################################################
#### Multi-drone environment c... | 86.595041 | 216 | 0.307597 |
c407d974fb81cedb8837d3cf72f5d1be84b6cbc2 | 40,179 | py | Python | RegRCNN/models/mrcnn.py | HannahElisa/RegRCNN | 1aa69d00c61bd36685213248bb30d4ba30ac5a06 | [
"Apache-2.0"
] | null | null | null | RegRCNN/models/mrcnn.py | HannahElisa/RegRCNN | 1aa69d00c61bd36685213248bb30d4ba30ac5a06 | [
"Apache-2.0"
] | null | null | null | RegRCNN/models/mrcnn.py | HannahElisa/RegRCNN | 1aa69d00c61bd36685213248bb30d4ba30ac5a06 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2019 Division of Medical Image Computing, German Cancer Research Center (DKFZ).
#
# 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... | 53.429521 | 145 | 0.638866 |
fb4f174c8d0bef1c009855ee6036cae221270216 | 1,784 | py | Python | altimeter/aws/resource/ec2/transit_gateway_vpc_attachment.py | jparten/altimeter | 956cf7f7c2fe443751b8da393a764f8a7bb82348 | [
"MIT"
] | null | null | null | altimeter/aws/resource/ec2/transit_gateway_vpc_attachment.py | jparten/altimeter | 956cf7f7c2fe443751b8da393a764f8a7bb82348 | [
"MIT"
] | null | null | null | altimeter/aws/resource/ec2/transit_gateway_vpc_attachment.py | jparten/altimeter | 956cf7f7c2fe443751b8da393a764f8a7bb82348 | [
"MIT"
] | null | null | null | """Resource for Transit Gateway VPC Attachments"""
from typing import Type
from botocore.client import BaseClient
from altimeter.aws.resource.resource_spec import ListFromAWSResult
from altimeter.aws.resource.ec2 import EC2ResourceSpec
from altimeter.core.graph.schema import Schema
from altimeter.core.graph.field.dic... | 39.644444 | 93 | 0.714686 |
cf1bb838cc0c2c5bbcb60ff2203bb1623c7d0bcb | 34,334 | py | Python | pymatgen/command_line/critic2_caller.py | mt-huebsch/pymatgen | 92da4a6a3d7c7a2f4cfed19a49794d59f15b42e7 | [
"MIT"
] | null | null | null | pymatgen/command_line/critic2_caller.py | mt-huebsch/pymatgen | 92da4a6a3d7c7a2f4cfed19a49794d59f15b42e7 | [
"MIT"
] | null | null | null | pymatgen/command_line/critic2_caller.py | mt-huebsch/pymatgen | 92da4a6a3d7c7a2f4cfed19a49794d59f15b42e7 | [
"MIT"
] | null | null | null | """
This module implements an interface to the critic2 Bader analysis code.
For most Bader analysis purposes, users are referred to
pymatgen.command_line.bader_caller instead, this module is for advanced
usage requiring identification of critical points in the charge density.
This module depends on a compiled critic2... | 37.037756 | 107 | 0.56096 |
49191d6d875773ee488e9326de578065d9ba8c20 | 2,042 | py | Python | invocations/console.py | daobook/invocations | 9d64e17a7446713c045646ef28ef8562dd05aea1 | [
"BSD-2-Clause"
] | 114 | 2015-01-07T18:03:03.000Z | 2022-03-29T02:57:04.000Z | invocations/console.py | daobook/invocations | 9d64e17a7446713c045646ef28ef8562dd05aea1 | [
"BSD-2-Clause"
] | 20 | 2015-02-01T21:52:10.000Z | 2022-03-27T20:11:28.000Z | invocations/console.py | daobook/invocations | 9d64e17a7446713c045646ef28ef8562dd05aea1 | [
"BSD-2-Clause"
] | 23 | 2015-09-21T00:03:20.000Z | 2022-01-27T08:14:40.000Z | """
Text console UI helpers and patterns, e.g. 'Y/n' prompts and the like.
"""
from __future__ import unicode_literals, print_function
import sys
from invoke.vendor.six.moves import input
# NOTE: originally cribbed from fab 1's contrib.console.confirm
def confirm(question, assume_yes=True):
"""
Ask user a ... | 34.033333 | 79 | 0.632713 |
9d27ecb74e8fff731beb1499bdc401aec9b17030 | 4,471 | py | Python | server/image_browse_resource.py | HailLab/HistomicsTK | 83af8312851c2719fbf475635ad494ee5f885582 | [
"Apache-2.0"
] | null | null | null | server/image_browse_resource.py | HailLab/HistomicsTK | 83af8312851c2719fbf475635ad494ee5f885582 | [
"Apache-2.0"
] | null | null | null | server/image_browse_resource.py | HailLab/HistomicsTK | 83af8312851c2719fbf475635ad494ee5f885582 | [
"Apache-2.0"
] | null | null | null | from girder.api import access
from girder.api.v1.item import Item as ItemResource
from girder.api.describe import autoDescribeRoute, Description
from girder.constants import AccessType
from girder.exceptions import RestException
from girder.models.folder import Folder
import random
def _isLargeImageItem(item):
r... | 49.131868 | 373 | 0.648848 |
1b806a393b639ef1888583aaf3a7eb9e51071239 | 885 | py | Python | setup.py | roansong/osu-replay-parser | 70a206622b51bb8443d423f6da671bb005cb32f7 | [
"MIT"
] | 1 | 2019-12-08T07:22:56.000Z | 2019-12-08T07:22:56.000Z | setup.py | roansong/osu-replay-parser | 70a206622b51bb8443d423f6da671bb005cb32f7 | [
"MIT"
] | null | null | null | setup.py | roansong/osu-replay-parser | 70a206622b51bb8443d423f6da671bb005cb32f7 | [
"MIT"
] | null | null | null | from distutils.core import setup
from setuptools import find_packages
version = '3.0.0'
setup(
name = 'osrparse',
version = version,
description = "Python implementation of osu! rhythm game replay parser.",
classifiers = [
'Topic :: Games/Entertainment',
'Topic :: Software Development ... | 32.777778 | 84 | 0.639548 |
dcc7b4f726e1d0b585747e0aa2c9cd7d082bef4f | 2,603 | py | Python | Chapter07/code/csv_loader.py | bdonkey/Amazon-SageMaker-Best-Practices | 7d1afe63c03e73b00b9d332026b81a9cdd5075e6 | [
"MIT"
] | 11 | 2021-03-22T23:37:39.000Z | 2022-02-02T07:37:46.000Z | Chapter07/code/csv_loader.py | bdonkey/Amazon-SageMaker-Best-Practices | 7d1afe63c03e73b00b9d332026b81a9cdd5075e6 | [
"MIT"
] | null | null | null | Chapter07/code/csv_loader.py | bdonkey/Amazon-SageMaker-Best-Practices | 7d1afe63c03e73b00b9d332026b81a9cdd5075e6 | [
"MIT"
] | 6 | 2021-12-17T03:00:59.000Z | 2022-03-16T07:52:13.000Z | import os
from torch.utils.data import Dataset
import glob
import torch
import sys
import logging
import collections
import bisect
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler(sys.stdout))
class CsvDataset(Dataset):
def __init__(self, csv_path):
... | 30.623529 | 108 | 0.56627 |
756c73c66617bb16f49291d11916d3b63db280ec | 4,174 | py | Python | src/modules/minecraft/stats/bedwars_stats.py | teymour-aldridge/robo | e31fcf14120822ec5732c465f75728e1a02b79be | [
"MIT"
] | null | null | null | src/modules/minecraft/stats/bedwars_stats.py | teymour-aldridge/robo | e31fcf14120822ec5732c465f75728e1a02b79be | [
"MIT"
] | null | null | null | src/modules/minecraft/stats/bedwars_stats.py | teymour-aldridge/robo | e31fcf14120822ec5732c465f75728e1a02b79be | [
"MIT"
] | null | null | null | import discord
from exceptions import StatsNotFoundError
hypixel_logo_url = "https://pbs.twimg.com/profile_images/1346968969849171970/DdNypQdN_400x400.png"
corresponding_gamemodes_and_gamecodes = {
"eight_one": "Solo", "eight_two": "Doubles",
"four_three": "Threes", "four_four": "Fours"
}
def embed_bedwar... | 50.289157 | 225 | 0.69885 |
6a6a6f79d8067be0597c0dd0b317baa58e9ba76e | 3,167 | py | Python | prereise/gather/demanddata/eia/tests/test_map_ba.py | SEL-Columbia/PreREISE-building | 527cc02e6867a879c7e68e8e3fc5dc843de20580 | [
"MIT"
] | null | null | null | prereise/gather/demanddata/eia/tests/test_map_ba.py | SEL-Columbia/PreREISE-building | 527cc02e6867a879c7e68e8e3fc5dc843de20580 | [
"MIT"
] | null | null | null | prereise/gather/demanddata/eia/tests/test_map_ba.py | SEL-Columbia/PreREISE-building | 527cc02e6867a879c7e68e8e3fc5dc843de20580 | [
"MIT"
] | 1 | 2022-02-23T20:43:36.000Z | 2022-02-23T20:43:36.000Z | import pandas as pd
import pytest
from pandas.testing import assert_series_equal
from prereise.gather.demanddata.eia.map_ba import (
aggregate_ba_demand,
get_demand_in_loadzone,
map_buses_to_ba,
map_buses_to_county,
)
def test_get_demand_in_loadzone_case():
bus_map, agg_demand = create_loadzone_d... | 31.989899 | 84 | 0.627092 |
0eb01e3bc8e15aa217f2ca780460dac03226eb88 | 4,142 | py | Python | python3/koans/about_multiple_inheritance.py | bjmccotter7192/PythonKoan | 92759c90824583e7bdd3355c9b5615a67dd69abf | [
"MIT"
] | null | null | null | python3/koans/about_multiple_inheritance.py | bjmccotter7192/PythonKoan | 92759c90824583e7bdd3355c9b5615a67dd69abf | [
"MIT"
] | null | null | null | python3/koans/about_multiple_inheritance.py | bjmccotter7192/PythonKoan | 92759c90824583e7bdd3355c9b5615a67dd69abf | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Slightly based on AboutModules in the Ruby Koans
#
from runner.koan import *
class AboutMultipleInheritance(Koan):
class Nameable:
def __init__(self):
self._name = None
def set_name(self, new_name):
self._na... | 29.375887 | 85 | 0.556012 |
5ca3f3d1c504cbdd4cb67084b046d7fe3c625bac | 369 | py | Python | dongguan/dongguan/items.py | GongkunJiang/MySpider | 8c088f696679b13568843af521279f9f25f40314 | [
"MIT"
] | null | null | null | dongguan/dongguan/items.py | GongkunJiang/MySpider | 8c088f696679b13568843af521279f9f25f40314 | [
"MIT"
] | null | null | null | dongguan/dongguan/items.py | GongkunJiang/MySpider | 8c088f696679b13568843af521279f9f25f40314 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class DongguanItem(scrapy.Item):
# 每个帖子的标题
title = scrapy.Field()
# 每个帖子的编号
number = scrapy.Field()
# 每个帖子的文字内容
content = scrap... | 19.421053 | 52 | 0.653117 |
4c7076d82bed8f88ec8cb8464384343c63c64af4 | 5,336 | py | Python | train/custom_train_2.py | bjw806/Crypto-Deep-Learning-test1 | 9a3dcdaa0e106f1d1a0d8425e864b8bf0007811d | [
"Apache-2.0"
] | null | null | null | train/custom_train_2.py | bjw806/Crypto-Deep-Learning-test1 | 9a3dcdaa0e106f1d1a0d8425e864b8bf0007811d | [
"Apache-2.0"
] | null | null | null | train/custom_train_2.py | bjw806/Crypto-Deep-Learning-test1 | 9a3dcdaa0e106f1d1a0d8425e864b8bf0007811d | [
"Apache-2.0"
] | 1 | 2022-02-19T08:53:32.000Z | 2022-02-19T08:53:32.000Z | import os
import sys
import tensorflow as tf
from tensorflow.keras import datasets, layers, models
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from keras.models import load_model
#tf.debugging.set_log_device_placement(True)
epochs = 10
train_data_dir = './data/train/'
validation_dat... | 37.314685 | 148 | 0.642616 |
54b50e480d423146ddec16c94b62e022c71ffde6 | 13,271 | py | Python | pysumma/calibration/ostrich.py | synapticarbors/pysumma | 7480a12d40742d58629f2742ae7abc92131f831e | [
"BSD-3-Clause"
] | 9 | 2017-10-24T21:07:32.000Z | 2021-11-18T22:03:05.000Z | pysumma/calibration/ostrich.py | synapticarbors/pysumma | 7480a12d40742d58629f2742ae7abc92131f831e | [
"BSD-3-Clause"
] | 52 | 2018-02-03T20:15:11.000Z | 2021-11-11T12:38:30.000Z | pysumma/calibration/ostrich.py | synapticarbors/pysumma | 7480a12d40742d58629f2742ae7abc92131f831e | [
"BSD-3-Clause"
] | 19 | 2017-10-24T21:23:08.000Z | 2021-07-21T21:41:55.000Z | import os
import pandas as pd
import numpy as np
import shutil
import stat
import inspect
import subprocess
from functools import partial
from pathlib import Path
from pkg_resources import resource_filename as resource
from pysumma import Simulation
from string import Template
from typing import List, Dict
def read_te... | 39.497024 | 126 | 0.627684 |
5bccfe5fa63f38f157af4e077a3da1639a454ac9 | 246 | py | Python | Tests/image_tests/renderpasses/test_ForwardRendering.py | SvenHinze/SpatioTemporalReprojection | 3abc2964ef3adfeb10a64dfc6d06bc2ab87a5081 | [
"BSD-3-Clause"
] | 62 | 2022-02-04T10:34:29.000Z | 2022-03-31T19:41:20.000Z | Tests/image_tests/renderpasses/test_ForwardRendering.py | SvenHinze/SpatioTemporalReprojection | 3abc2964ef3adfeb10a64dfc6d06bc2ab87a5081 | [
"BSD-3-Clause"
] | 2 | 2021-03-02T10:16:06.000Z | 2021-08-13T10:10:21.000Z | Tests/image_tests/renderpasses/test_ForwardRendering.py | SvenHinze/SpatioTemporalReprojection | 3abc2964ef3adfeb10a64dfc6d06bc2ab87a5081 | [
"BSD-3-Clause"
] | 4 | 2022-02-04T16:08:30.000Z | 2022-03-09T09:39:41.000Z | from helpers import render_frames
from graphs.ForwardRendering import ForwardRendering as g
from falcor import *
m.addGraph(g)
m.loadScene('Arcade/Arcade.fscene')
ctx = locals()
# default
render_frames(ctx, 'default', frames=[1,16,64])
exit()
| 18.923077 | 57 | 0.768293 |
2fa8124bb856e7c64f7043bcbbb250f7adbf4581 | 2,417 | py | Python | code/07Rock_paper_scissors.py | JohnZhong2021/Python-practice-project | 0a39e3b32197a888814ff3ec9425acbd21f6fa5d | [
"MIT"
] | null | null | null | code/07Rock_paper_scissors.py | JohnZhong2021/Python-practice-project | 0a39e3b32197a888814ff3ec9425acbd21f6fa5d | [
"MIT"
] | null | null | null | code/07Rock_paper_scissors.py | JohnZhong2021/Python-practice-project | 0a39e3b32197a888814ff3ec9425acbd21f6fa5d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 15 19:40:19 2021
@author: JohnZhong
"""
from random import choice
def user_input():
user_input = input("Let's play rock paper and scissors with the computer!\
\nR for rock\nP for paper\nS for scissors\nYour decision:")
return user_input
def check_user_move(user_... | 30.987179 | 78 | 0.65453 |
078e3822459d5e5b80647ca85f3ab7f0eeefae77 | 2,808 | py | Python | dataloaders/datasets/combine_dbs.py | rucnyz/pytorch-deeplab | 684e770dc82406f9572b09b2cd60d8f7b597a702 | [
"MIT"
] | null | null | null | dataloaders/datasets/combine_dbs.py | rucnyz/pytorch-deeplab | 684e770dc82406f9572b09b2cd60d8f7b597a702 | [
"MIT"
] | null | null | null | dataloaders/datasets/combine_dbs.py | rucnyz/pytorch-deeplab | 684e770dc82406f9572b09b2cd60d8f7b597a702 | [
"MIT"
] | null | null | null | import torch.utils.data as data
class CombineDBs(data.Dataset):
NUM_CLASSES = 21
def __init__(self, dataloaders, excluded = None):
self.dataloaders = dataloaders
self.excluded = excluded
self.im_ids = []
# Combine object lists
for dl in dataloaders:
for elem in dl.im_ids:
if elem not in self.im_i... | 27.529412 | 99 | 0.688746 |
67b87efa1d6072fc78ccbaf4e2947e4f79ae9158 | 2,117 | py | Python | data_capture/admin.py | davezen1/calc | 410d114f01e84e9fc6363f58853a4d9451a00ef2 | [
"CC0-1.0"
] | null | null | null | data_capture/admin.py | davezen1/calc | 410d114f01e84e9fc6363f58853a4d9451a00ef2 | [
"CC0-1.0"
] | 3 | 2021-03-19T23:45:25.000Z | 2022-03-21T22:21:12.000Z | data_capture/admin.py | davezen1/calc | 410d114f01e84e9fc6363f58853a4d9451a00ef2 | [
"CC0-1.0"
] | null | null | null | from django.contrib import admin
from django.db import models
from django import forms
from django.utils.safestring import mark_safe
from .schedules import registry
from .models import SubmittedPriceList, SubmittedPriceListRow
class SubmittedPriceListRowInline(admin.TabularInline):
model = SubmittedPriceListRow
... | 29.402778 | 75 | 0.640057 |
b2bf3f4cbbdfdc8bd5492ec139e41b4827f4073b | 496 | py | Python | app/kobo/migrations/0014_auto_20180921_1443.py | dianedetoeuf/django_kobo | d437a289e1952bb55fb7004fddbff6b978aa15d6 | [
"MIT"
] | 1 | 2018-12-20T07:59:55.000Z | 2018-12-20T07:59:55.000Z | app/kobo/migrations/0014_auto_20180921_1443.py | dianedetoeuf/django_kobo | d437a289e1952bb55fb7004fddbff6b978aa15d6 | [
"MIT"
] | 9 | 2018-11-06T01:51:28.000Z | 2018-12-21T22:19:42.000Z | app/kobo/migrations/0014_auto_20180921_1443.py | dianedetoeuf/django_kobo | d437a289e1952bb55fb7004fddbff6b978aa15d6 | [
"MIT"
] | 2 | 2018-11-21T15:13:32.000Z | 2020-02-19T08:39:37.000Z | # Generated by Django 2.0.5 on 2018-09-21 14:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kobo', '0013_auto_20180921_1437'),
]
operations = [
migrations.RemoveField(
model_name='kobodata',
name='legacy',
... | 21.565217 | 52 | 0.574597 |
0f304a446eb457b19fa7e0a96e533920b868e1fa | 18,418 | py | Python | src/python/module/z5py/dataset.py | gdkrmr/z5 | 578bb64c4481191d6359b8ee3335ec8a166db4e0 | [
"MIT"
] | null | null | null | src/python/module/z5py/dataset.py | gdkrmr/z5 | 578bb64c4481191d6359b8ee3335ec8a166db4e0 | [
"MIT"
] | null | null | null | src/python/module/z5py/dataset.py | gdkrmr/z5 | 578bb64c4481191d6359b8ee3335ec8a166db4e0 | [
"MIT"
] | null | null | null | import numbers
import json
import numpy as np
from . import _z5py
from .attribute_manager import AttributeManager
from .shape_utils import normalize_slices, rectify_shape, get_default_chunks
AVAILABLE_COMPRESSORS = _z5py.get_available_codecs()
COMPRESSORS_ZARR = ('raw', 'blosc', 'zlib', 'bzip2', 'gzip')
COMPRESSORS_... | 38.774737 | 120 | 0.581822 |
b57a538092b047be02ac35963b89ddfd3e9de54d | 3,966 | py | Python | tests/unit_tests/repobee_plug/test_plug_config.py | DD2480-Group-18/repobee | 1dd79bb6ace3c00b920ef0b32664847cd5b12f84 | [
"MIT"
] | 39 | 2019-04-02T15:53:23.000Z | 2022-03-07T02:38:41.000Z | tests/unit_tests/repobee_plug/test_plug_config.py | DD2480-Group-18/repobee | 1dd79bb6ace3c00b920ef0b32664847cd5b12f84 | [
"MIT"
] | 788 | 2019-03-31T13:55:53.000Z | 2022-03-29T20:41:02.000Z | tests/unit_tests/repobee_plug/test_plug_config.py | slarse/repobee | 03fcf90dc0244e0274a890d2a897752889c70326 | [
"MIT"
] | 18 | 2020-06-15T11:49:50.000Z | 2022-03-06T19:05:53.000Z | import pytest
from repobee_plug import config
from repobee_plug import exceptions
class TestConfig:
"""Tests for the Config class."""
def test_detects_cyclic_inheritance(self, tmp_path):
# arrange
grandparent_path = tmp_path / "otherdir" / "grandparent.ini"
parent_path = tmp_path / "... | 30.507692 | 78 | 0.629349 |
83e837ae73c20f0c5f6dacaa5d3cb5c62d149b43 | 16,274 | py | Python | tests/conftest.py | Pacman1984/etna | 9b3ccb980e576d56858f14aca2e06ce2957b0fa9 | [
"Apache-2.0"
] | 96 | 2021-09-05T06:29:34.000Z | 2021-11-07T15:22:54.000Z | tests/conftest.py | Pacman1984/etna | 9b3ccb980e576d56858f14aca2e06ce2957b0fa9 | [
"Apache-2.0"
] | 188 | 2021-09-06T15:59:58.000Z | 2021-11-17T09:34:16.000Z | tests/conftest.py | Pacman1984/etna | 9b3ccb980e576d56858f14aca2e06ce2957b0fa9 | [
"Apache-2.0"
] | 8 | 2021-09-06T09:18:35.000Z | 2021-11-11T21:18:39.000Z | from copy import deepcopy
from typing import Tuple
import numpy as np
import pandas as pd
import pytest
from etna.datasets import generate_const_df
from etna.datasets.tsdataset import TSDataset
@pytest.fixture(autouse=True)
def random_seed():
"""Fixture to fix random state for every test case."""
import ran... | 34.40592 | 120 | 0.628303 |
3e8c69007245d593a2a7966160e5cd3d52fa86b2 | 13,233 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/metadata.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | 1 | 2021-06-06T23:49:17.000Z | 2021-06-06T23:49:17.000Z | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/metadata.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/metadata.py | ypisetsky/integrations-core | f7153d3f896827c3325c7f0ec088bc17d088a894 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import os
import re
from collections import defaultdict
import click
from ...testing import process_checks_option
from ...utils import complete_valid_checks, get_metadata_file, load_manifest, normalize_d... | 31.507143 | 200 | 0.6013 |
750cb4ab62fbae289b38cca2774cf1d454986bb8 | 17 | py | Python | mak/libs/ircc/ir_ast/ir_reference.py | motor-dev/Motor | 98cb099fe1c2d31e455ed868cc2a25eae51e79f0 | [
"BSD-3-Clause"
] | 4 | 2015-05-13T16:28:36.000Z | 2017-05-24T15:34:14.000Z | mak/libs/ircc/ir_ast/ir_reference.py | motor-dev/Motor | 98cb099fe1c2d31e455ed868cc2a25eae51e79f0 | [
"BSD-3-Clause"
] | null | null | null | mak/libs/ircc/ir_ast/ir_reference.py | motor-dev/Motor | 98cb099fe1c2d31e455ed868cc2a25eae51e79f0 | [
"BSD-3-Clause"
] | 1 | 2017-03-21T08:28:07.000Z | 2017-03-21T08:28:07.000Z | IrReference = str | 17 | 17 | 0.823529 |
3f4aa820f05b822fe2d62d7f332b36886deca11a | 448 | py | Python | core/migrations/0006_auto_20210406_0647.py | SejaMuchhal/PizzaStore | 268ee7df8040616fc8cd6f59a74440b8428db000 | [
"MIT"
] | 1 | 2021-04-06T17:01:52.000Z | 2021-04-06T17:01:52.000Z | core/migrations/0006_auto_20210406_0647.py | SejaMuchhal/PizzaStore | 268ee7df8040616fc8cd6f59a74440b8428db000 | [
"MIT"
] | null | null | null | core/migrations/0006_auto_20210406_0647.py | SejaMuchhal/PizzaStore | 268ee7df8040616fc8cd6f59a74440b8428db000 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-04-06 06:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20210406_0631'),
]
operations = [
migrations.AlterField(
model_name='pizza',
name='type',
... | 23.578947 | 118 | 0.598214 |
dea5d1cc17f9cc854bffa302f93b0e0dd79079db | 797 | py | Python | google/cloud/aiplatform_v1beta1/services/specialist_pool_service/__init__.py | dizcology/python-aiplatform | 1a135775966c8a2303ded529eba514dcf9db7205 | [
"Apache-2.0"
] | 180 | 2020-09-23T17:21:15.000Z | 2022-03-30T17:25:47.000Z | google/cloud/aiplatform_v1beta1/services/specialist_pool_service/__init__.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | 601 | 2020-09-23T16:23:44.000Z | 2022-03-31T19:08:23.000Z | google/cloud/aiplatform_v1beta1/services/specialist_pool_service/__init__.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | 109 | 2020-09-23T16:22:04.000Z | 2022-03-28T21:18:29.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 34.652174 | 74 | 0.766625 |
4820441f978ed43270848593b75a7e2c928def0c | 7,064 | py | Python | scenes/benchmark_dam.py | WenyinWei/fluimu | ea9c076719ce31b64125708c0e150e2ab6b9a8c5 | [
"Apache-2.0"
] | 95 | 2019-12-04T21:39:51.000Z | 2022-03-12T01:03:36.000Z | scenes/benchmark_dam.py | WenyinWei/fluimu | ea9c076719ce31b64125708c0e150e2ab6b9a8c5 | [
"Apache-2.0"
] | 4 | 2019-12-21T15:08:54.000Z | 2021-02-28T19:40:08.000Z | scenes/benchmark_dam.py | WenyinWei/fluimu | ea9c076719ce31b64125708c0e150e2ab6b9a8c5 | [
"Apache-2.0"
] | 26 | 2020-01-21T00:48:47.000Z | 2022-01-14T06:04:20.000Z | # ----------------------------------------------------------------------------
#
# MantaFlow fluid solver framework
# Copyright 2018 Kiwon Um, Nils Thuerey
#
# This program is free software, distributed under the terms of the
# Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Benchmark case... | 49.055556 | 234 | 0.640147 |
7be1c0a31de835a4ac6ea4af114b8227428bead5 | 272 | py | Python | webfront_service/api/exceptions.py | halo-framework/halo-webapp | 279db4726124662f601e20e55e2019cd2c0a3673 | [
"MIT"
] | null | null | null | webfront_service/api/exceptions.py | halo-framework/halo-webapp | 279db4726124662f601e20e55e2019cd2c0a3673 | [
"MIT"
] | null | null | null | webfront_service/api/exceptions.py | halo-framework/halo-webapp | 279db4726124662f601e20e55e2019cd2c0a3673 | [
"MIT"
] | null | null | null | from halo_app.exceptions import HaloException
class IllegalProviderException(HaloException):
pass
class IllegalRuntimeException(HaloException):
pass
class IllegalServiceDomainException(HaloException):
pass
class IllegalIdException(HaloException):
pass
| 19.428571 | 51 | 0.819853 |
e39d934815464869c8f90be92d4dcec38fb50ecb | 404 | py | Python | biokit/services/text/faidx.py | JLSteenwyk/BioKIT | 9ca31d8003dc845bf56b2c56c87820c0b05021c4 | [
"MIT"
] | 8 | 2021-10-03T21:08:33.000Z | 2021-12-02T17:15:32.000Z | biokit/services/text/faidx.py | JLSteenwyk/BioKIT | 9ca31d8003dc845bf56b2c56c87820c0b05021c4 | [
"MIT"
] | null | null | null | biokit/services/text/faidx.py | JLSteenwyk/BioKIT | 9ca31d8003dc845bf56b2c56c87820c0b05021c4 | [
"MIT"
] | 5 | 2021-10-05T06:25:03.000Z | 2022-01-04T11:01:09.000Z | from Bio import SeqIO
from .base import Text
class Faidx(Text):
def __init__(self, args) -> None:
super().__init__(**self.process_args(args))
def run(self):
record_dict = SeqIO.index(self.fasta, "fasta")
print(f">{record_dict[self.entry].name}\n{record_dict[self.entry].seq}")
de... | 25.25 | 80 | 0.658416 |
97b6d509d724101d39faa0c45104c76e471e8322 | 3,684 | py | Python | netroids/player_managers.py | FarmCodeGary/Netroids | a3370fb7cbfc01a05b57cbf6871a3c63827ad5ac | [
"MIT"
] | null | null | null | netroids/player_managers.py | FarmCodeGary/Netroids | a3370fb7cbfc01a05b57cbf6871a3c63827ad5ac | [
"MIT"
] | null | null | null | netroids/player_managers.py | FarmCodeGary/Netroids | a3370fb7cbfc01a05b57cbf6871a3c63827ad5ac | [
"MIT"
] | null | null | null | from interface import (
DOWN_PRESSED_EVENT, DOWN_RELEASED_EVENT, UP_PRESSED_EVENT,
UP_RELEASED_EVENT, LEFT_PRESSED_EVENT, LEFT_RELEASED_EVENT,
RIGHT_PRESSED_EVENT, RIGHT_RELEASED_EVENT, SPACE_PRESSED_EVENT,
SPACE_RELEASED_EVENT)
class LocalPlayerManager:
def __init__(self, gui):
s... | 32.315789 | 76 | 0.637079 |
60a0bd9165c960dcd89c5a3f08e9d6083d75f843 | 1,258 | py | Python | sqlalchemy_paginate/__init__.py | sungmin-park/sqlalchemy-paginate | a0512a1f277ebe25a38b874f0acb6714f2c36851 | [
"MIT"
] | 1 | 2016-07-06T09:53:51.000Z | 2016-07-06T09:53:51.000Z | sqlalchemy_paginate/__init__.py | sungmin-park/sqlalchemy-paginate | a0512a1f277ebe25a38b874f0acb6714f2c36851 | [
"MIT"
] | null | null | null | sqlalchemy_paginate/__init__.py | sungmin-park/sqlalchemy-paginate | a0512a1f277ebe25a38b874f0acb6714f2c36851 | [
"MIT"
] | null | null | null | def int_ceil(x, y):
"""
equivalent to math.ceil(x / y)
:param x:
:param y:
:return:
"""
q, r = divmod(x, y)
if r:
q += 1
return q
class Pagination(object):
def __init__(self, query, page=1, per_page=10, per_nav=10,
map_=lambda x: x):
self.first ... | 29.952381 | 72 | 0.562003 |
1d3ab77f6a8bb2479c14ba9b9de1e53bd5d91996 | 80,334 | py | Python | generated/nidigital/nidigital/unit_tests/_mock_helper.py | kurtp-ni/nimi-python | 4f0bccce67a69ca9f46a8ab9b07dc26ca0049729 | [
"MIT"
] | 88 | 2017-08-03T18:07:27.000Z | 2022-01-28T13:55:06.000Z | generated/nidigital/nidigital/unit_tests/_mock_helper.py | kurtp-ni/nimi-python | 4f0bccce67a69ca9f46a8ab9b07dc26ca0049729 | [
"MIT"
] | 1,310 | 2017-07-11T18:42:44.000Z | 2022-03-28T21:03:57.000Z | generated/nidigital/nidigital/unit_tests/_mock_helper.py | kurtp-ni/nimi-python | 4f0bccce67a69ca9f46a8ab9b07dc26ca0049729 | [
"MIT"
] | 70 | 2017-07-25T14:52:53.000Z | 2022-03-31T14:14:23.000Z | # -*- coding: utf-8 -*-
# This file was generated
import sys # noqa: F401 - Not all mock_helpers will need this
class MockFunctionCallError(Exception):
def __init__(self, function, param=None):
self.function = function
self.param = param
msg = "{0} called without setting side_effect".fo... | 64.2672 | 219 | 0.713708 |
cc86481f20c9b0db449dfbbb5699f3be5e4f934e | 10,776 | py | Python | io_mod.py | yufengliang/mbxaspy | d92a15c5b0feca11e9260bfdbc0ca7fb07d426ff | [
"Apache-2.0"
] | 5 | 2018-03-23T01:54:00.000Z | 2020-12-04T18:31:25.000Z | io_mod.py | yufengliang/mbxaspy | d92a15c5b0feca11e9260bfdbc0ca7fb07d426ff | [
"Apache-2.0"
] | null | null | null | io_mod.py | yufengliang/mbxaspy | d92a15c5b0feca11e9260bfdbc0ca7fb07d426ff | [
"Apache-2.0"
] | 3 | 2018-03-23T01:56:29.000Z | 2020-10-04T05:13:35.000Z | """ a module for input and output """
from __future__ import print_function
from struct import pack, unpack
import re
import sys
import inspect
import heapq
from constants import *
from utils import *
_quote = {'"', "'"}
_delimiter = {';', ',', ' ', '\t', '\n'}
def input_from_binary(fhandle, data_type, ndata, ... | 32.167164 | 117 | 0.542873 |
94178406ff4769fb635472ba9bb94977c793b152 | 1,357 | py | Python | make_gtrack.py | tharvesh/preprocess_script | a52d56442c4038a1af567c83773972f10078294e | [
"MIT"
] | null | null | null | make_gtrack.py | tharvesh/preprocess_script | a52d56442c4038a1af567c83773972f10078294e | [
"MIT"
] | null | null | null | make_gtrack.py | tharvesh/preprocess_script | a52d56442c4038a1af567c83773972f10078294e | [
"MIT"
] | null | null | null | import sys
import re
sig_fname=str(sys.argv[1])
domain_fname=str(sys.argv[2])
with open(sig_fname) as f:
sig_file=f.readlines()
with open(domain_fname) as dom:
domain_file=dom.readlines()
sig_file=[x.strip() for x in sig_file]
domain_file=[x.strip() for x in domain_file]
sig_list = []
sig_dict = {}
for line... | 24.672727 | 57 | 0.642594 |
80dbf143ca1084bed271e2928b5021da41be058e | 4,626 | py | Python | Allura/allura/tests/test_decorators.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 113 | 2015-03-25T10:33:37.000Z | 2022-02-16T20:55:06.000Z | Allura/allura/tests/test_decorators.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 4 | 2017-08-04T16:19:07.000Z | 2020-06-08T19:01:33.000Z | Allura/allura/tests/test_decorators.py | rohankumardubey/allura | 9c490a051ca912d28b81ce656441d6fed100cb24 | [
"Apache-2.0"
] | 36 | 2015-08-14T16:27:39.000Z | 2022-02-16T20:54:35.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 (t... | 32.125 | 137 | 0.602032 |
ee1b858d85530195070e55b7ce9cde14ee249ce8 | 11,592 | py | Python | cryspy/C_item_loop_classes/cl_2_section.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | cryspy/C_item_loop_classes/cl_2_section.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | cryspy/C_item_loop_classes/cl_2_section.py | ikibalin/rhochi | 1ca03f18dc72006322a101ed877cdbba33ed61e7 | [
"MIT"
] | null | null | null | """Description of classes Section, SectionL."""
from typing import NoReturn
import numpy
from cryspy.A_functions_base.function_2_crystallography_base import \
calc_atoms_in_unit_cell
from cryspy.A_functions_base.function_1_objects import \
form_items_by_dictionary
from cryspy.B_parent_classes.cl_1_item import... | 39.162162 | 82 | 0.63863 |
992733f8ad51ad2f636a0cab79e9db11252baf21 | 1,349 | py | Python | setup.py | khimsh/is_isbn | 7b657887d3634c29d03856f97c0f0aa4c20e8dce | [
"MIT"
] | 2 | 2021-07-06T01:08:14.000Z | 2021-07-06T01:08:16.000Z | setup.py | khimsh/is_isbn | 7b657887d3634c29d03856f97c0f0aa4c20e8dce | [
"MIT"
] | 8 | 2020-01-22T17:58:31.000Z | 2022-01-31T02:25:44.000Z | setup.py | khimsh/is_isbn | 7b657887d3634c29d03856f97c0f0aa4c20e8dce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""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 = [ ]
test_re... | 27.530612 | 63 | 0.644181 |
d65e9d5ae1c848921d0aec15727b0ac655dda249 | 552 | py | Python | fedot/core/composer/constraint.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 1 | 2021-11-09T10:24:38.000Z | 2021-11-09T10:24:38.000Z | fedot/core/composer/constraint.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | null | null | null | fedot/core/composer/constraint.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | null | null | null | from copy import deepcopy
from typing import Optional
from fedot.core.optimisers.graph import OptGraph
from fedot.core.pipelines.validation import validate
def constraint_function(graph: OptGraph,
params: Optional['GraphGenerationParams'] = None):
try:
rules = params.rules_for_con... | 32.470588 | 74 | 0.724638 |
f2b742f5082255a0f58057cfd7babad77e026d27 | 112 | py | Python | tests/inputs/if-branching/84-joining_two_lists_deleting_a_lot.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 4 | 2019-10-06T18:01:24.000Z | 2020-07-03T05:27:35.000Z | tests/inputs/if-branching/84-joining_two_lists_deleting_a_lot.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 5 | 2021-06-07T15:50:04.000Z | 2021-06-07T15:50:06.000Z | tests/inputs/if-branching/84-joining_two_lists_deleting_a_lot.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | null | null | null | if _:
a = [3.0, []]
a[1].append(a[0])
else:
a = [[]]
a.append(a[0])
a[1].append(a[1])
# show_store()
| 11.2 | 19 | 0.446429 |
1cf863b5b6bdc74a763967fdfaa763c6283a09f6 | 9,843 | py | Python | torba/torba/server/env.py | Nykseli/lbry-sdk | 07afc0aa0a1e6c0ef6aa284fb47513af940440c1 | [
"MIT"
] | null | null | null | torba/torba/server/env.py | Nykseli/lbry-sdk | 07afc0aa0a1e6c0ef6aa284fb47513af940440c1 | [
"MIT"
] | null | null | null | torba/torba/server/env.py | Nykseli/lbry-sdk | 07afc0aa0a1e6c0ef6aa284fb47513af940440c1 | [
"MIT"
] | null | null | null | # Copyright (c) 2016, Neil Booth
#
# All rights reserved.
#
# See the file "LICENCE" for information about the copyright
# and warranty status of this software.
import re
import resource
from os import environ
from collections import namedtuple
from ipaddress import ip_address
from torba.server.util import class_log... | 39.215139 | 97 | 0.601951 |
953b9c3b3d6e8f19fec391442c2a6d1f5b8b6d52 | 901 | bzl | Python | google/cloud/secretmanager/google_cloud_cpp_secretmanager_mocks.bzl | joezqren/google-cloud-cpp | 325d312b0a21569f3c57515aec7d91f3540d3b48 | [
"Apache-2.0"
] | 299 | 2019-01-31T12:17:56.000Z | 2022-03-30T15:46:15.000Z | google/cloud/secretmanager/google_cloud_cpp_secretmanager_mocks.bzl | joezqren/google-cloud-cpp | 325d312b0a21569f3c57515aec7d91f3540d3b48 | [
"Apache-2.0"
] | 6,560 | 2019-01-29T03:15:15.000Z | 2022-03-31T23:58:48.000Z | google/cloud/secretmanager/google_cloud_cpp_secretmanager_mocks.bzl | joezqren/google-cloud-cpp | 325d312b0a21569f3c57515aec7d91f3540d3b48 | [
"Apache-2.0"
] | 253 | 2019-02-07T01:18:13.000Z | 2022-03-30T17:21:10.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.04 | 98 | 0.773585 |
7860a19c40ae1247b273aec344c6810f65fa4c45 | 305,605 | py | Python | PW_from_gps_figures.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | 4 | 2019-09-09T19:47:49.000Z | 2021-12-29T18:12:26.000Z | PW_from_gps_figures.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | null | null | null | PW_from_gps_figures.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | 6 | 2019-12-06T02:27:05.000Z | 2021-12-27T16:32:54.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 3 17:28:04 2020
@author: shlomi
"""
from PW_paths import work_yuval
from matplotlib import rcParams
import seaborn as sns
from pathlib import Path
import matplotlib.pyplot as plt
from PW_paths import savefig_path
import matplotlib.ticker as ticker
... | 44.445172 | 257 | 0.579172 |
ed27b955d92808f1f201ff30a6bdfe99c48de31c | 3,890 | py | Python | build_netmap.py | majduk/net-surveror | 07c775e9804029ef70661168a046e10e35b75535 | [
"MIT"
] | 4 | 2020-04-21T12:55:37.000Z | 2021-06-08T03:24:08.000Z | build_netmap.py | majduk/net-surveror | 07c775e9804029ef70661168a046e10e35b75535 | [
"MIT"
] | 1 | 2020-06-17T20:06:44.000Z | 2020-06-18T07:23:30.000Z | build_netmap.py | majduk/net-surveror | 07c775e9804029ef70661168a046e10e35b75535 | [
"MIT"
] | 3 | 2020-04-21T18:21:31.000Z | 2021-06-08T03:24:11.000Z | #!/usr/bin/python3
import json
import os
from optparse import OptionParser
def init_netmap(netmap):
netmap['vlans'] = []
netmap['machines'] = {}
netmap['switches'] = {}
netmap['links'] = []
def add_vlan(netmap, vlan):
if vlan not in netmap['vlans']:
netmap['vlans'].append(vlan)
def add_s... | 38.137255 | 116 | 0.586375 |
dd9a4c1fb885cb400b7002b88eec12a1923d57b0 | 138 | py | Python | mainapp/admin.py | CheboiDerrick/hood-alert | 620db39eaffa6e3c914f44e05cb853e4de99220f | [
"MIT"
] | null | null | null | mainapp/admin.py | CheboiDerrick/hood-alert | 620db39eaffa6e3c914f44e05cb853e4de99220f | [
"MIT"
] | null | null | null | mainapp/admin.py | CheboiDerrick/hood-alert | 620db39eaffa6e3c914f44e05cb853e4de99220f | [
"MIT"
] | null | null | null | from django.contrib import admin
from mainapp.models import Neighborhood
# Register your models here.
admin.site.register(Neighborhood)
| 19.714286 | 39 | 0.826087 |
cc4641df55ff00e26bd94b3b076cba9d146aa02e | 1,813 | py | Python | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/chardet/enums.py | brianherrera/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/chardet/enums.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/chardet/enums.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | """
All of the Enums that are used throughout the chardet package.
:author: Dan Blanchard (dan.blanchard@gmail.com)
"""
class InputState(object):
"""
This enum represents the different states a universal detector can be in.
"""
PURE_ASCII = 0
ESC_ASCII = 1
HIGH_BYTE ... | 23.545455 | 84 | 0.600662 |
4654c7d13b785f3b0cff5fe97ea6764a5b61bace | 11,994 | py | Python | tracker.py | jokajak/infinity_tracker | 21f83925d9899dc25bc58b198426f329a549b0e0 | [
"Apache-2.0"
] | 1 | 2021-01-21T08:44:21.000Z | 2021-01-21T08:44:21.000Z | tracker.py | jokajak/infinity_tracker | 21f83925d9899dc25bc58b198426f329a549b0e0 | [
"Apache-2.0"
] | 126 | 2020-08-03T22:07:38.000Z | 2022-03-28T22:25:59.000Z | tracker.py | jokajak/infinity_tracker | 21f83925d9899dc25bc58b198426f329a549b0e0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This proxies connections for a Carrier Infinity system.
# It reads the data being transferred and logs it to an influxdb server
import argparse
import json
import logging
import re
import urllib2
import urlparse
import xml.etree.ElementTree as ET
import proxy
import requ... | 33.041322 | 87 | 0.597049 |
cb4ed701e33719db1f676a63e533054c52948626 | 1,215 | py | Python | test/test_cloud_pools.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | test/test_cloud_pools.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | test/test_cloud_pools.py | Atomicology/isilon_sdk_python | 91039da803ae37ed4abf8d2a3f59c333f3ef1866 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Copyright 2016 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 applicable l... | 24.795918 | 75 | 0.722634 |
f439f07790274ec2e9fbe869dc52bdc21c593a2b | 34,957 | py | Python | pandas/core/arrays/timedeltas.py | Veronur/pandas | 6258397047b9debc11bd77b3dd0cd60aa49762fd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2015-06-09T07:27:52.000Z | 2021-08-06T13:50:05.000Z | pandas/core/arrays/timedeltas.py | Veronur/pandas | 6258397047b9debc11bd77b3dd0cd60aa49762fd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 7 | 2015-08-30T23:51:00.000Z | 2018-12-29T19:52:35.000Z | pandas/core/arrays/timedeltas.py | Veronur/pandas | 6258397047b9debc11bd77b3dd0cd60aa49762fd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2017-10-04T22:24:49.000Z | 2021-08-06T13:50:13.000Z | from datetime import timedelta
from typing import List
import numpy as np
from pandas._libs import lib, tslibs
from pandas._libs.tslibs import NaT, Period, Timedelta, Timestamp, iNaT, to_offset
from pandas._libs.tslibs.conversion import precision_from_unit
from pandas._libs.tslibs.fields import get_timedelta_field
fr... | 33.166034 | 87 | 0.585605 |
5c66a0c3a2af22062989e68159d19b15242cd23c | 3,651 | py | Python | airflow/providers/amazon/aws/sensors/cloud_formation.py | tinyclues/incubator-airflow | 3caa539092d3a4196083d1db829fa1ed7d83fa95 | [
"Apache-2.0"
] | null | null | null | airflow/providers/amazon/aws/sensors/cloud_formation.py | tinyclues/incubator-airflow | 3caa539092d3a4196083d1db829fa1ed7d83fa95 | [
"Apache-2.0"
] | null | null | null | airflow/providers/amazon/aws/sensors/cloud_formation.py | tinyclues/incubator-airflow | 3caa539092d3a4196083d1db829fa1ed7d83fa95 | [
"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... | 39.684783 | 105 | 0.718707 |
9577644620319acdc2d25646033ea877f95daf52 | 64,200 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_network_interfaces_operations.py | praveenkuttappan/azure-sdk-for-python | 4b79413667b7539750a6c7dde15737013a3d4bd5 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_network_interfaces_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_network_interfaces_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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.622951 | 354 | 0.680374 |
24bd2daec439cf4b8498c7aa025922f280a9771a | 2,570 | py | Python | generate.py | elleryqueenhomels/fast_neural_style_transfer | b0a7668f091e248d3bee27b3d7f213794f82ec86 | [
"MIT"
] | 6 | 2017-12-07T06:31:35.000Z | 2018-11-22T23:51:34.000Z | generate.py | elleryqueenhomels/fast_neural_style_transfer | b0a7668f091e248d3bee27b3d7f213794f82ec86 | [
"MIT"
] | 1 | 2017-12-14T06:31:09.000Z | 2017-12-14T06:31:09.000Z | generate.py | elleryqueenhomels/fast_neural_style_transfer | b0a7668f091e248d3bee27b3d7f213794f82ec86 | [
"MIT"
] | 2 | 2018-01-15T23:05:53.000Z | 2022-03-01T21:07:56.000Z | # Use a trained Image Transform Net to generate
# a style transferred image with a specific style
import tensorflow as tf
import image_transform_net as itn
from utils import get_images, save_images
def generate(contents_path, model_path, is_same_size=False, resize_height=None, resize_width=None, save_path=None, pre... | 38.939394 | 161 | 0.717899 |
11e68501dbd93ebde8442d2db4dff612c0ee3497 | 819 | py | Python | botstory/integrations/mocktracker/tracker_test.py | botstory/bot-story | 9c5b2fc7f7a14dbd467d70f60d5ba855ef89dac3 | [
"MIT"
] | 5 | 2017-01-14T13:42:13.000Z | 2021-07-27T21:52:04.000Z | botstory/integrations/mocktracker/tracker_test.py | botstory/bot-story | 9c5b2fc7f7a14dbd467d70f60d5ba855ef89dac3 | [
"MIT"
] | 235 | 2016-11-07T23:33:28.000Z | 2018-03-13T11:27:33.000Z | botstory/integrations/mocktracker/tracker_test.py | hyzhak/bot-story | 9c5b2fc7f7a14dbd467d70f60d5ba855ef89dac3 | [
"MIT"
] | 5 | 2017-01-14T13:42:14.000Z | 2020-11-06T08:33:20.000Z | import pytest
from . import tracker
from .. import mocktracker
from ... import di, Story
story = None
def teardown_function(function):
story and story.clear()
def test_event():
t = tracker.MockTracker()
t.event()
def test_new_message():
t = tracker.MockTracker()
t.new_message()
def test_ne... | 17.425532 | 88 | 0.636142 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.