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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1746c7e6fc020333e5401ccb9e02b20ad402ff65 | 7,313 | py | Python | tests/helpers/test_sun.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 3 | 2020-05-18T10:18:16.000Z | 2020-12-08T11:27:55.000Z | tests/helpers/test_sun.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | tests/helpers/test_sun.py | petewill/home-assistant | 5859dba4344f05fb8774aa1207e47ac28f627a67 | [
"Apache-2.0"
] | 6 | 2020-04-10T06:21:11.000Z | 2021-07-01T08:53:38.000Z | """The tests for the Sun helpers."""
# pylint: disable=protected-access
from unittest.mock import patch
from datetime import timedelta, datetime
from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET
import homeassistant.util.dt as dt_util
import homeassistant.helpers.sun as sun
def test_next_events(has... | 37.695876 | 87 | 0.695064 |
b8ba04efa5fe331b32b0cf1d3ce220c04594f5e7 | 969 | py | Python | court_scraper/platforms/oscn/runner.py | gitter-badger/court-scraper | f89b86d07d39d99c8c123717227fbc773d4933c3 | [
"0BSD"
] | null | null | null | court_scraper/platforms/oscn/runner.py | gitter-badger/court-scraper | f89b86d07d39d99c8c123717227fbc773d4933c3 | [
"0BSD"
] | null | null | null | court_scraper/platforms/oscn/runner.py | gitter-badger/court-scraper | f89b86d07d39d99c8c123717227fbc773d4933c3 | [
"0BSD"
] | null | null | null | import logging
from court_scraper.base.runner import BaseRunner
from .site import Site
logger = logging.getLogger(__name__)
class Runner(BaseRunner):
"""
Facade class to simplify invocation and usage of scrapers.
Arguments:
- cache_dir -- Path to cache directory for scraped file artifacts (defaul... | 24.846154 | 83 | 0.646027 |
0d69c1381744f6485dfdefdd8339729af7f8e2ff | 272 | py | Python | setup.py | stevec7/gpfs | 9d92f2a77bc1df2d4340db607596f0b057d6203e | [
"MIT"
] | 2 | 2016-05-27T18:53:14.000Z | 2020-07-18T16:49:45.000Z | setup.py | stevec7/gpfs | 9d92f2a77bc1df2d4340db607596f0b057d6203e | [
"MIT"
] | null | null | null | setup.py | stevec7/gpfs | 9d92f2a77bc1df2d4340db607596f0b057d6203e | [
"MIT"
] | 1 | 2020-07-18T16:49:49.000Z | 2020-07-18T16:49:49.000Z | try:
from setuputils import setup
except:
from distutils.core import setup
setup(
name = 'gpfs',
version = '0.0.1',
description = 'libraries and tools for GPFS',
author = 'stevec7',
author_email = 'none',
packages = ['gpfs']
)
| 12.363636 | 49 | 0.591912 |
b7b0421ddcfce8c15e92e9a9a8297236c6eb74a9 | 1,984 | py | Python | tests/tests/correctness/EPLAnalytics/Detectors/Corridor/Corridor_cor_006/run.py | rpeach-sag/apama-industry-analytics-kit | a3f6039915501d41251b6f7ec41b0cb8111baf7b | [
"Apache-2.0"
] | 3 | 2019-09-02T18:21:22.000Z | 2020-04-17T16:34:57.000Z | tests/tests/correctness/EPLAnalytics/Detectors/Corridor/Corridor_cor_006/run.py | rpeach-sag/apama-industry-analytics-kit | a3f6039915501d41251b6f7ec41b0cb8111baf7b | [
"Apache-2.0"
] | null | null | null | tests/tests/correctness/EPLAnalytics/Detectors/Corridor/Corridor_cor_006/run.py | rpeach-sag/apama-industry-analytics-kit | a3f6039915501d41251b6f7ec41b0cb8111baf7b | [
"Apache-2.0"
] | null | null | null | # $Copyright (c) 2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel an... | 64 | 343 | 0.71119 |
03a2c2a4393cbe57da16597de84cee5a7d80b9c8 | 1,869 | py | Python | ooobuild/lo/document/x_document_event_listener.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/document/x_document_event_listener.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/document/x_document_event_listener.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 35.264151 | 151 | 0.747994 |
0e045fb594eb16496d76adfb20ac5d3444194e4b | 288 | py | Python | Dataset/Leetcode/train/12/583.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/12/583.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/12/583.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, num: int) -> str:
d={1000:'M',900:'CM',500:'D',400:'CD',100:'C',90:'XC',50:'L',40:'XL',10:'X',9:'IX',5:'V',4:'IV',1:'I'}
a=''
for i in d:
while num>=i:
a+=d[i]
num-=i
return a
| 26.181818 | 110 | 0.385417 |
39106f87bd27a11f4517bd828e5bc27a2b18fea9 | 4,670 | py | Python | qiskit_nature/transformers/second_quantization/freeze_core_transformer.py | Durd3nT/qiskit-nature | 83d9d7caf409f5519276413f754b5c8fc901d3c0 | [
"Apache-2.0"
] | null | null | null | qiskit_nature/transformers/second_quantization/freeze_core_transformer.py | Durd3nT/qiskit-nature | 83d9d7caf409f5519276413f754b5c8fc901d3c0 | [
"Apache-2.0"
] | 1 | 2021-11-11T06:33:41.000Z | 2021-11-11T06:33:41.000Z | qiskit_nature/transformers/second_quantization/freeze_core_transformer.py | Durd3nT/qiskit-nature | 83d9d7caf409f5519276413f754b5c8fc901d3c0 | [
"Apache-2.0"
] | 1 | 2021-10-05T20:58:04.000Z | 2021-10-05T20:58:04.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 40.608696 | 100 | 0.668951 |
42dfb17b4a8aed3451befa8061e3090662b1ff4f | 4,122 | py | Python | backend/src/features/authentication/services.py | ihsaro/socioworld | d8054afe152bd841eb58d6870e781917a0f6a511 | [
"Apache-2.0"
] | null | null | null | backend/src/features/authentication/services.py | ihsaro/socioworld | d8054afe152bd841eb58d6870e781917a0f6a511 | [
"Apache-2.0"
] | null | null | null | backend/src/features/authentication/services.py | ihsaro/socioworld | d8054afe152bd841eb58d6870e781917a0f6a511 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
from typing import Union
from jose import jwt
from passlib.context import CryptContext
from sqlalchemy.orm.session import Session
from configurations.constants.security import (
ACCESS_TOKEN_EXPIRE_MINUTES,
ALGORITHM,
SECRET_KEY
)
from configurations.messages.err... | 35.230769 | 119 | 0.767831 |
e12bab2e490732f0cde9c2ad10abf7b32f5d5a58 | 9,257 | py | Python | src/pandas_profiling/model/alerts.py | Anselmoo/pandas-profiling | 41ee043175eaa1c5b21fcba178110331adcad713 | [
"MIT"
] | 736 | 2016-01-14T03:36:03.000Z | 2018-01-06T00:56:33.000Z | src/pandas_profiling/model/alerts.py | Anselmoo/pandas-profiling | 41ee043175eaa1c5b21fcba178110331adcad713 | [
"MIT"
] | 72 | 2016-01-29T12:08:04.000Z | 2018-01-06T11:18:44.000Z | src/pandas_profiling/model/alerts.py | sthagen/pandas-profiling-pandas-profiling | 6fd50055126ebebf74c92c6f908f54fa7cd9c816 | [
"MIT"
] | 108 | 2016-01-14T11:48:18.000Z | 2018-01-02T13:35:10.000Z | """Logic for alerting the user on possibly problematic patterns in the data (e.g. high number of zeros , constant
values, high correlations)."""
from enum import Enum, auto, unique
from typing import Any, Dict, List, Optional, Set
import numpy as np
import pandas as pd
from pandas_profiling.config import Settings
fro... | 27.226471 | 123 | 0.583558 |
b8213bca651264e962313f5bfff353d674b722e4 | 346 | py | Python | ex017.py | felipenunes07/Python-Exercicios--Curso-em-video | 97087c2fcd6dda48894954623b8b83100af3f47f | [
"MIT"
] | null | null | null | ex017.py | felipenunes07/Python-Exercicios--Curso-em-video | 97087c2fcd6dda48894954623b8b83100af3f47f | [
"MIT"
] | null | null | null | ex017.py | felipenunes07/Python-Exercicios--Curso-em-video | 97087c2fcd6dda48894954623b8b83100af3f47f | [
"MIT"
] | null | null | null | ## Faça um programa que leia o comprimento do cateto oposto e do cateto adjacente de um triângulo retângulo. Calcule e mostre o comprimento da hipotenusa. ##
import math
a = float(input('Comprimento do cateto oposto: '))
b = float(input('Comprimento do cateto adjacente: '))
print('A hipotenusa vai medir {}.'.format(m... | 43.25 | 157 | 0.728324 |
3ae12cebe3cf2b6d5b1e436637b73fb2fb8abe7a | 1,495 | py | Python | laia/utils/convert_old_model_checkpoint.py | basbeu/PyLaia | d14458484b56622204b1730a7d53220c5d0f1bc1 | [
"MIT"
] | 2 | 2020-09-10T13:31:17.000Z | 2021-07-31T09:44:17.000Z | laia/utils/convert_old_model_checkpoint.py | basbeu/PyLaia | d14458484b56622204b1730a7d53220c5d0f1bc1 | [
"MIT"
] | 1 | 2020-12-06T18:11:52.000Z | 2020-12-06T18:19:38.000Z | laia/utils/convert_old_model_checkpoint.py | basbeu/PyLaia | d14458484b56622204b1730a7d53220c5d0f1bc1 | [
"MIT"
] | 2 | 2020-04-20T13:40:56.000Z | 2020-10-17T11:59:55.000Z | from __future__ import absolute_import
import argparse
import os
import re
from collections import OrderedDict
import torch
def convert_old_parameters(params):
"""Convert parameters from the old model to the new one."""
# type: OrderedDict -> OrderedDict
new_params = []
for k, v in params.items():
... | 31.145833 | 87 | 0.641472 |
90522cd8ef6460753ff4e627ee208d071fdcb1ec | 432 | py | Python | aula3/teste2aula3.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | aula3/teste2aula3.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | aula3/teste2aula3.py | otaviobizulli/python-exercices | 2c61f014bf481fa463721b174ddd4238bf8d0cb3 | [
"MIT"
] | null | null | null | placa = int(input('Insira apenas a parte numerica da placa: '))
if placa > 9999 or placa < 1000:
print('Placa Inválida.')
else:
pn = placa % 10
if pn == 1 or pn == 2:
print('Segunda-feira')
elif pn == 3 or pn == 4:
print ('Terça-feira.')
elif pn == 5 or pn == 6:
print ('Quart... | 25.411765 | 63 | 0.527778 |
50988929c3b393861ab787ab42893eb7720d3d9c | 356 | py | Python | app/actions/server.py | Zhinon/fuego-de-quasar | ccb007f17215a37d34a935d7a06d49f13aed25da | [
"MIT"
] | null | null | null | app/actions/server.py | Zhinon/fuego-de-quasar | ccb007f17215a37d34a935d7a06d49f13aed25da | [
"MIT"
] | null | null | null | app/actions/server.py | Zhinon/fuego-de-quasar | ccb007f17215a37d34a935d7a06d49f13aed25da | [
"MIT"
] | null | null | null | from app.actions import (
topsecret,
topsecret_split,
)
ACTIONS_MAP = {
# Topsecret
'post_get_coords_and_message': topsecret.GetCoordsAndMessageAction,
# Topsecret_split
'get_coords_and_message_split': topsecret_split.GetCoordsAndMessageSplit,
'post_message_and_distance_split': topsecret_s... | 25.428571 | 83 | 0.786517 |
097ac0da6408df0e8d1779126307635d40be9b8f | 2,697 | py | Python | smd/gametest/pruning.py | SMltd/SMCrypto | d07723a2ee6183577bb8449eaa4b2110ac653c3f | [
"MIT"
] | null | null | null | smd/gametest/pruning.py | SMltd/SMCrypto | d07723a2ee6183577bb8449eaa4b2110ac653c3f | [
"MIT"
] | null | null | null | smd/gametest/pruning.py | SMltd/SMCrypto | d07723a2ee6183577bb8449eaa4b2110ac653c3f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2018 The Xaya developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from mover import MoverTest
"""
Tests basic operation with pruning enabled.
"""
# Regexp for the log that is printed ... | 28.389474 | 80 | 0.607712 |
42d276620531a23ab882c3016800fe5e26713419 | 151 | py | Python | vien_nchl/web/apps.py | thapgan/igh | 0c0e69f7925e31812fec2c4616d8304a27abb518 | [
"MIT"
] | null | null | null | vien_nchl/web/apps.py | thapgan/igh | 0c0e69f7925e31812fec2c4616d8304a27abb518 | [
"MIT"
] | null | null | null | vien_nchl/web/apps.py | thapgan/igh | 0c0e69f7925e31812fec2c4616d8304a27abb518 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class WebConfig(AppConfig):
name = 'vien_nchl.web'
verbose_name = "Web"
def ready(self):
pass
| 15.1 | 33 | 0.655629 |
12876ce3ae75aec449eb82ed67a8b9e7dc4aaa8f | 16,142 | py | Python | docs/tests.py | harunpehlivan/djangoproject.com | a74c2062316c9c571d8e8f978b21b0748a908496 | [
"BSD-3-Clause"
] | null | null | null | docs/tests.py | harunpehlivan/djangoproject.com | a74c2062316c9c571d8e8f978b21b0748a908496 | [
"BSD-3-Clause"
] | null | null | null | docs/tests.py | harunpehlivan/djangoproject.com | a74c2062316c9c571d8e8f978b21b0748a908496 | [
"BSD-3-Clause"
] | 1 | 2020-07-03T12:43:30.000Z | 2020-07-03T12:43:30.000Z | import datetime
import os
from http import HTTPStatus
from operator import attrgetter
from pathlib import Path
from django.conf import settings
from django.contrib.sites.models import Site
from django.template import Context, Template
from django.test import TestCase
from django.urls import reverse, set_urlconf
from ... | 40.154229 | 160 | 0.566411 |
3b02762f52803cee0cc5739197e72e8f7a8c1b16 | 5,891 | py | Python | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/part_attendee.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/part_attendee.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/part_attendee.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class PartAttendee:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is at... | 26.41704 | 165 | 0.556442 |
2dfa62a07afa7882df838ce65ca1ba9d85be1b93 | 2,274 | py | Python | pfcon/mount_dir.py | jbernal0019/pfcon | 752e3871b2e1bc3ed5227fad588e8371abc17c51 | [
"MIT"
] | 7 | 2017-10-15T23:18:34.000Z | 2020-10-25T07:20:47.000Z | pfcon/mount_dir.py | jbernal0019/pfcon | 752e3871b2e1bc3ed5227fad588e8371abc17c51 | [
"MIT"
] | 47 | 2017-12-06T19:07:50.000Z | 2022-03-11T03:31:49.000Z | pfcon/mount_dir.py | jbernal0019/pfcon | 752e3871b2e1bc3ed5227fad588e8371abc17c51 | [
"MIT"
] | 18 | 2017-11-17T17:48:29.000Z | 2021-04-23T01:52:48.000Z | """
Handle MountDir file storage.
"""
import logging
import datetime
import zipfile
import os
import io
import shutil
logger = logging.getLogger(__name__)
class MountDir:
def __init__(self, config=None):
self.config = config
def store_data(self, job_id, job_incoming_dir, input_stream):
"... | 32.956522 | 90 | 0.559807 |
c861d25afd13ffb77f601902e2328eaaaad939d5 | 44,142 | py | Python | .venv/lib/python3.8/site-packages/pandas/core/arrays/interval.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 115 | 2020-06-18T15:00:58.000Z | 2022-03-02T10:13:19.000Z | .venv/lib/python3.8/site-packages/pandas/core/arrays/interval.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 21 | 2021-04-13T01:17:40.000Z | 2022-03-11T16:06:50.000Z | .venv/lib/python3.8/site-packages/pandas/core/arrays/interval.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 60 | 2020-07-22T14:53:10.000Z | 2022-03-23T10:17:59.000Z | from operator import le, lt
import textwrap
import numpy as np
from pandas._config import get_option
from pandas._libs.interval import Interval, IntervalMixin, intervals_to_interval_bounds
from pandas.compat.numpy import function as nv
from pandas.util._decorators import Appender
from pandas.core.dtypes.cast import... | 32.819331 | 88 | 0.576141 |
d19fda0dcdc3984b3a9d81166bf1bd436efa6890 | 3,900 | py | Python | fold.py | gmayday1997/pytorch_CAM | c51a0c7f7701005b8f031ed9a0f9b3b9680cf560 | [
"MIT"
] | 23 | 2018-02-13T00:50:11.000Z | 2021-02-04T01:49:34.000Z | fold.py | gmayday1997/pytorch-CAM | c51a0c7f7701005b8f031ed9a0f9b3b9680cf560 | [
"MIT"
] | null | null | null | fold.py | gmayday1997/pytorch-CAM | c51a0c7f7701005b8f031ed9a0f9b3b9680cf560 | [
"MIT"
] | 5 | 2017-12-19T10:48:22.000Z | 2021-02-04T01:49:35.000Z | import torch.utils.data as data
from PIL import Image
import os
import os.path
import numpy as np
IMG_EXTENSIONS = [
'.jpg', '.JPG', '.jpeg', '.JPEG',
'.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP',
]
def is_image_file(filename):
return any(filename.endswith(extension) for extension in IMG_EXTENSIONS)
... | 30 | 101 | 0.614615 |
bd2274350c0289c2a1f28ce9b475e28ba9958ccc | 2,085 | py | Python | src/candy/log.py | mongmong/python-candy | ead8b02cd8cf82314fec0c40aff7c8d32cf7c855 | [
"BSD-2-Clause"
] | null | null | null | src/candy/log.py | mongmong/python-candy | ead8b02cd8cf82314fec0c40aff7c8d32cf7c855 | [
"BSD-2-Clause"
] | null | null | null | src/candy/log.py | mongmong/python-candy | ead8b02cd8cf82314fec0c40aff7c8d32cf7c855 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
'''
sweety.log
@author: Chris Chou <m2chrischou AT gmail.com>
@description:
Environment variables:
SWEETY_VERBOSE - turn on verbose mode.
SWEETY_LOG_FILENAME - specify the log file.
'''
from datetime import datetime
import logging
import os
import sys
from sweety import logstatus, util
_star... | 24.529412 | 90 | 0.701199 |
e1743454756530eac768df6ada9f5c6534f8269a | 1,023 | py | Python | scripts/openstack/manifest-tests/server-groups/test_machinesets.py | saqibali-2k/installer | 170a59be823af62f760632b2611538b9022ec174 | [
"Apache-2.0"
] | 1,369 | 2018-06-08T15:15:34.000Z | 2022-03-31T11:58:28.000Z | scripts/openstack/manifest-tests/server-groups/test_machinesets.py | Montana/installer | 9eade28a9ce4862a6ef092bc5f5fcfb499342d4d | [
"Apache-2.0"
] | 5,738 | 2018-06-08T19:17:30.000Z | 2022-03-31T23:54:17.000Z | scripts/openstack/manifest-tests/server-groups/test_machinesets.py | Montana/installer | 9eade28a9ce4862a6ef092bc5f5fcfb499342d4d | [
"Apache-2.0"
] | 1,247 | 2018-06-08T17:05:33.000Z | 2022-03-31T19:34:43.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import sys
import glob
import yaml
ASSETS_DIR = ""
class TestMachinesetsServerGroup(unittest.TestCase):
def setUp(self):
"""Parse the MachineSets into a Python data structure."""
self.machinesets = []
for machineset_path in g... | 28.416667 | 91 | 0.629521 |
8898292bd0c294a80cf64a46eabab27defc980b4 | 180 | py | Python | bin/multiline.py | calcu16/canary | e2bb4444b07226ad3b092f87c73a037921b220d6 | [
"BSD-2-Clause"
] | 1 | 2018-11-11T00:48:17.000Z | 2018-11-11T00:48:17.000Z | bin/multiline.py | calcu16/canary | e2bb4444b07226ad3b092f87c73a037921b220d6 | [
"BSD-2-Clause"
] | null | null | null | bin/multiline.py | calcu16/canary | e2bb4444b07226ad3b092f87c73a037921b220d6 | [
"BSD-2-Clause"
] | 1 | 2018-11-11T00:48:22.000Z | 2018-11-11T00:48:22.000Z | #/bin/env python3
from __future__ import print_function
from sys import stdin
for line in stdin:
if line[-2] == '\\':
print(line[:-2], end='')
else:
print(line, end='')
| 20 | 37 | 0.638889 |
0dca5fb9efb314d3ddec07eacb25bd1f506a1ebc | 11,378 | py | Python | files/myModellib.py | JessevanKempen/nutils | a10ae3ca9f71b81ac5d64179555ef2cddf6658da | [
"MIT"
] | null | null | null | files/myModellib.py | JessevanKempen/nutils | a10ae3ca9f71b81ac5d64179555ef2cddf6658da | [
"MIT"
] | null | null | null | files/myModellib.py | JessevanKempen/nutils | a10ae3ca9f71b81ac5d64179555ef2cddf6658da | [
"MIT"
] | null | null | null | from nutils import mesh, function, solver, util, export, cli, testing
import numpy as np, treelog
from CoolProp.CoolProp import PropsSI
import scipy.special as sc
from matplotlib import pyplot as plt
from scipy.stats import norm
from matplotlib import collections, colors
import pandas as pd
# import seaborn as sns
impo... | 34.795107 | 144 | 0.569081 |
fe7104aacf148d6e6612a3a11368f393e31c636f | 1,216 | py | Python | examples/notes_server.py | MatthewScholefield/flask-resto | 19630accb55919817712e08536caaa93a3a85a7d | [
"MIT"
] | 2 | 2020-04-23T08:06:51.000Z | 2020-04-23T10:14:13.000Z | examples/notes_server.py | MatthewScholefield/flask-resto | 19630accb55919817712e08536caaa93a3a85a7d | [
"MIT"
] | null | null | null | examples/notes_server.py | MatthewScholefield/flask-resto | 19630accb55919817712e08536caaa93a3a85a7d | [
"MIT"
] | null | null | null | from flask import Flask
from uuid import uuid4
from werkzeug.exceptions import NotFound
from flask_resto import Api
app = Flask(__name__)
api = Api(app)
notes = {} # In practice, use a database
class Note:
def create(self):
note = {
'title': api.json['title'],
'description': ap... | 19.612903 | 51 | 0.514803 |
ef61f63ddcd4a8e05b444ad7ff624e59849414ec | 10,130 | py | Python | qa/rpc-tests/listtransactions.py | uniocoin/unionew | 91951af8a98fb85eefa556d52cff5c1bd52a2e33 | [
"MIT"
] | null | null | null | qa/rpc-tests/listtransactions.py | uniocoin/unionew | 91951af8a98fb85eefa556d52cff5c1bd52a2e33 | [
"MIT"
] | null | null | null | qa/rpc-tests/listtransactions.py | uniocoin/unionew | 91951af8a98fb85eefa556d52cff5c1bd52a2e33 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
from test_framework.test_framework import BitcoinTestFramework
from ... | 50.148515 | 113 | 0.598421 |
d858a84b22a29607044f0ec49d321ea28353b2e5 | 1,028 | py | Python | kubernetes/test/test_v1_controller_revision_list.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | 1 | 2019-02-17T15:28:39.000Z | 2019-02-17T15:28:39.000Z | kubernetes/test/test_v1_controller_revision_list.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_controller_revision_list.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 22.844444 | 105 | 0.727626 |
6b4920efe2917bcdc6238a1210371fcfe6fc91c5 | 34,850 | py | Python | neural_tangents/tests/predict_test.py | kayhan-batmanghelich/neural-tangents | 432ed919fca4a6f2c22071399b79bff9b38880c2 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | neural_tangents/tests/predict_test.py | kayhan-batmanghelich/neural-tangents | 432ed919fca4a6f2c22071399b79bff9b38880c2 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | neural_tangents/tests/predict_test.py | kayhan-batmanghelich/neural-tangents | 432ed919fca4a6f2c22071399b79bff9b38880c2 | [
"ECL-2.0",
"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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.253817 | 80 | 0.609527 |
871e7ccd4f9e76ec93577b82ae01f51ed8069921 | 5,411 | py | Python | crawler/post_process_jsonv2.py | saurabhvyas/dataset_creator | 770477aca0611f6e1776ff6059c454d34693e18d | [
"MIT"
] | 1 | 2019-07-01T15:26:57.000Z | 2019-07-01T15:26:57.000Z | crawler/post_process_jsonv2.py | saurabhvyas/dataset_creator | 770477aca0611f6e1776ff6059c454d34693e18d | [
"MIT"
] | 1 | 2020-01-11T19:24:43.000Z | 2020-01-11T19:24:43.000Z | crawler/post_process_jsonv2.py | saurabhvyas/dataset_creator | 770477aca0611f6e1776ff6059c454d34693e18d | [
"MIT"
] | null | null | null |
import json
'''import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-wav_file")
parser.add_argument("-txt_file")
args = parser.parse_args()
# this code section simply takes wave file ( ) and txt file (txt_file) and gentle json(json_file)
and returns starting and ending times
'''
def filter_jso... | 29.091398 | 123 | 0.595823 |
73113539329c5493141db243b85254062f7b8f88 | 2,075 | py | Python | tensorflow/python/keras/_impl/keras/__init__.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 24 | 2018-02-01T15:49:22.000Z | 2021-01-11T16:31:18.000Z | tensorflow/python/keras/_impl/keras/__init__.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 2 | 2018-09-09T07:29:07.000Z | 2019-03-11T07:14:45.000Z | tensorflow/python/keras/_impl/keras/__init__.py | M155K4R4/Tensorflow | e5e03ef3148303b3dfed89a1492dedf92b45be25 | [
"Apache-2.0"
] | 4 | 2018-10-29T18:43:22.000Z | 2020-09-28T07:19:52.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 47.159091 | 80 | 0.793735 |
d58a0fcc0ed66874ac9c2a2b63d2af320ee9ec40 | 5,942 | py | Python | Speedo/plugins/yt.py | Hobby-Dev-0/Speedo | bf0c935aa63e782835e15ba2ffab8bbe52771201 | [
"BSD-3-Clause"
] | null | null | null | Speedo/plugins/yt.py | Hobby-Dev-0/Speedo | bf0c935aa63e782835e15ba2ffab8bbe52771201 | [
"BSD-3-Clause"
] | null | null | null | Speedo/plugins/yt.py | Hobby-Dev-0/Speedo | bf0c935aa63e782835e15ba2ffab8bbe52771201 | [
"BSD-3-Clause"
] | 3 | 2021-10-12T08:17:01.000Z | 2021-12-21T01:17:54.000Z | import re
import random
import json
from pathlib import Path
import asyncio
import math
import os
import time
from telethon.tl.types import DocumentAttributeAudio
from youtube_search import YoutubeSearch
from youtube_dl import YoutubeDL
from youtube_dl.utils import (
ContentTooShortError,
DownloadError,
E... | 31.775401 | 121 | 0.561427 |
f719fd37c128d9a9db10d9a47902af2a5eb5d61e | 3,283 | py | Python | lektor/markdown/__init__.py | uk0/lektor | 21bdf99aa1183b4398043f87ba8ed137fad529ce | [
"BSD-3-Clause"
] | null | null | null | lektor/markdown/__init__.py | uk0/lektor | 21bdf99aa1183b4398043f87ba8ed137fad529ce | [
"BSD-3-Clause"
] | null | null | null | lektor/markdown/__init__.py | uk0/lektor | 21bdf99aa1183b4398043f87ba8ed137fad529ce | [
"BSD-3-Clause"
] | null | null | null | import sys
from typing import Any
from typing import Dict
from typing import Hashable
from typing import Type
from typing import TYPE_CHECKING
from weakref import ref as weakref
from deprecated import deprecated
from markupsafe import Markup
from lektor.markdown.controller import ControllerCache
from lektor.markdown.... | 30.682243 | 86 | 0.709108 |
478516ee1b7cfb538366afadda705d9f9f06b79a | 214 | py | Python | freight_forwarder/commercial_invoice/__init__.py | TUNE-Archive/freight_forwarder | 6ea4a49f474ec04abb8bb81b175c774a16b5312f | [
"MIT"
] | null | null | null | freight_forwarder/commercial_invoice/__init__.py | TUNE-Archive/freight_forwarder | 6ea4a49f474ec04abb8bb81b175c774a16b5312f | [
"MIT"
] | null | null | null | freight_forwarder/commercial_invoice/__init__.py | TUNE-Archive/freight_forwarder | 6ea4a49f474ec04abb8bb81b175c774a16b5312f | [
"MIT"
] | null | null | null | # -*- coding: utf-8; -*-
# flake8: noqa
from __future__ import unicode_literals, absolute_import
from .commercial_invoice import CommercialInvoice
from .service import Service
__author__ = 'alexb'
| 23.777778 | 56 | 0.724299 |
b63fdcbdcdeccf24d586e3ee71e004cf431f726e | 53,839 | py | Python | tests/test_edgeql_volatility.py | sobolevn/edgedb | b346b6496a203d8313d4c9adf68b0478f85122ed | [
"Apache-2.0"
] | null | null | null | tests/test_edgeql_volatility.py | sobolevn/edgedb | b346b6496a203d8313d4c9adf68b0478f85122ed | [
"Apache-2.0"
] | null | null | null | tests/test_edgeql_volatility.py | sobolevn/edgedb | b346b6496a203d8313d4c9adf68b0478f85122ed | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2019-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 34.512179 | 79 | 0.435632 |
6dfaba6bfb090f2c7902a1f4aa892617d5a3b4a4 | 876 | py | Python | src/main.py | kschwarz1116/Python-Cohort-Analysis | bbcfbfa18b179c0d7edfcc7bc052d628396122c0 | [
"MIT"
] | null | null | null | src/main.py | kschwarz1116/Python-Cohort-Analysis | bbcfbfa18b179c0d7edfcc7bc052d628396122c0 | [
"MIT"
] | null | null | null | src/main.py | kschwarz1116/Python-Cohort-Analysis | bbcfbfa18b179c0d7edfcc7bc052d628396122c0 | [
"MIT"
] | null | null | null | """
This script holds the main functionality for the Cohort Analysis programming challenge.
"""
import sys
from customer import CUSTOMERS
import read_customer
import read_orders
import write_analysis as write
def main() -> None:
"""This function accepts command line arguments and parses them into a table"""
... | 25.764706 | 98 | 0.705479 |
5722844dd37b6e1ca4bbf2030b58e1bf36e79a8e | 2,329 | py | Python | docassemble_demo/setup.py | abramsmatthew/adpllc-test | b6ae9d07ed3e98dd9f1fae5f4af8dc5b104ca8e6 | [
"MIT"
] | null | null | null | docassemble_demo/setup.py | abramsmatthew/adpllc-test | b6ae9d07ed3e98dd9f1fae5f4af8dc5b104ca8e6 | [
"MIT"
] | null | null | null | docassemble_demo/setup.py | abramsmatthew/adpllc-test | b6ae9d07ed3e98dd9f1fae5f4af8dc5b104ca8e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from fnmatch import fnmatchcase
from distutils.util import convert_path
standard_exclude = ('*.py', '*.pyc', '*~', '.*', '*.bak', '*.swp*')
standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', './dist', 'EGG-INFO', '*.... | 38.816667 | 121 | 0.526406 |
34ba21b1c5319ccadf544cc6fab9d2408379a3d7 | 2,495 | py | Python | memcache_status/templatetags/memcache_status_tags.py | davidsomnus/django-memcache-status | cca021828578c10421ccfe60c4d3ae9eba7a55cc | [
"MIT"
] | 55 | 2015-02-04T16:24:42.000Z | 2022-01-11T07:03:55.000Z | memcache_status/templatetags/memcache_status_tags.py | KonstantinKlepikov/django-memcache-status | 3c6e59871a03d3c79f91a6f006c2dde367a060cc | [
"MIT"
] | 14 | 2015-01-02T23:37:43.000Z | 2021-07-19T17:47:26.000Z | memcache_status/templatetags/memcache_status_tags.py | KonstantinKlepikov/django-memcache-status | 3c6e59871a03d3c79f91a6f006c2dde367a060cc | [
"MIT"
] | 14 | 2015-03-19T13:40:01.000Z | 2020-08-26T13:13:49.000Z | from __future__ import unicode_literals
import logging
from datetime import datetime
from django import template
from django.apps import apps
from memcache_status.utils import get_cache_stats
logger = logging.getLogger(__name__)
register = template.Library()
@register.simple_tag(takes_context=True)
def memcache_s... | 28.678161 | 77 | 0.638477 |
820898cc0db181c1abf7263440ca33731fd7881d | 14,361 | py | Python | fairscale/nn/model_parallel/layers.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1,662 | 2020-07-15T21:40:19.000Z | 2022-03-31T10:45:12.000Z | fairscale/nn/model_parallel/layers.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 648 | 2020-07-21T19:00:32.000Z | 2022-03-30T23:11:41.000Z | fairscale/nn/model_parallel/layers.py | aurickq/fairscale | 909c84462c6c53abcc4c2841d14a9496e6a3e033 | [
"Apache-2.0",
"BSD-3-Clause"
] | 170 | 2020-07-16T00:28:01.000Z | 2022-03-15T19:39:21.000Z | # coding=utf-8
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Ve... | 37.012887 | 115 | 0.64898 |
65da5e742665a6ded0a0d8de4795566fbc14749b | 693 | py | Python | backend/aporte/migrations/0012_auto_20200430_0427.py | felipemaion/financial-management-gate-django | 5f93a7d28a55852fed0a16d1830f92b0ee065948 | [
"MIT"
] | 2 | 2019-04-15T20:36:48.000Z | 2020-02-09T23:20:27.000Z | backend/aporte/migrations/0012_auto_20200430_0427.py | felipemaion/financial-management-gate-django | 5f93a7d28a55852fed0a16d1830f92b0ee065948 | [
"MIT"
] | 5 | 2020-02-12T00:06:06.000Z | 2020-06-05T05:09:45.000Z | backend/aporte/migrations/0012_auto_20200430_0427.py | felipemaion/financial-management-gate-django | 5f93a7d28a55852fed0a16d1830f92b0ee065948 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-04-30 04:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('aporte', '0011_auto_20200429_2118'),
]
operations = [
migrations.RenameField(
model_name='instrument',
old_name='crp... | 24.75 | 100 | 0.574315 |
bbebf4b639ff48563708a358a378006c6dfdd4d2 | 964 | py | Python | pup/sort.py | duckinator/pup-tools | 6f2064450bf27fc5bfbb09aeb01cf66ba4474060 | [
"MIT"
] | null | null | null | pup/sort.py | duckinator/pup-tools | 6f2064450bf27fc5bfbb09aeb01cf66ba4474060 | [
"MIT"
] | null | null | null | pup/sort.py | duckinator/pup-tools | 6f2064450bf27fc5bfbb09aeb01cf66ba4474060 | [
"MIT"
] | null | null | null | import argparse
import sys
def parseargs(args=None):
parser = argparse.ArgumentParser(description='Sort lines fed via stdin.')
parser.add_argument('--key',
help='Function to use for key sorting.')
parser.add_argument('--reverse', '-r', action='store_true',
he... | 25.368421 | 77 | 0.589212 |
56158bcce71a8c24f1a042f5b700b65a77c621ab | 21,087 | py | Python | scripts/bin/base_ip.py | open-switch/opx-nas-linux | 073b287c7c998b0dc16bc732fa37bbdddfd69d66 | [
"CC-BY-4.0"
] | 1 | 2017-12-28T16:57:02.000Z | 2017-12-28T16:57:02.000Z | scripts/bin/base_ip.py | open-switch/opx-nas-linux | 073b287c7c998b0dc16bc732fa37bbdddfd69d66 | [
"CC-BY-4.0"
] | 10 | 2017-08-07T22:43:34.000Z | 2021-06-09T13:34:01.000Z | scripts/bin/base_ip.py | open-switch/opx-nas-linux | 073b287c7c998b0dc16bc732fa37bbdddfd69d66 | [
"CC-BY-4.0"
] | 14 | 2017-01-05T19:18:42.000Z | 2020-03-06T10:01:04.000Z | #!/usr/bin/python
# Copyright (c) 2019 Dell 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
#
# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITH... | 32.243119 | 111 | 0.570257 |
819a4783fe0ab411739cdc8339aff340c97c9631 | 6,566 | py | Python | third_party/WebKit/Tools/Scripts/webkitpy/common/system/user_unittest.py | xzhan96/chromium.src | 1bd0cf3997f947746c0fc5406a2466e7b5f6159e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | third_party/WebKit/Tools/Scripts/webkitpy/common/system/user_unittest.py | emilio/chromium.src | 1bd0cf3997f947746c0fc5406a2466e7b5f6159e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | third_party/WebKit/Tools/Scripts/webkitpy/common/system/user_unittest.py | emilio/chromium.src | 1bd0cf3997f947746c0fc5406a2466e7b5f6159e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (C) 2010 Research in Motion Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditio... | 49.368421 | 122 | 0.636917 |
f122587ac48e43ff7b7ad178cbcb2de1da883deb | 3,571 | py | Python | saleor/graphql/plugins/resolvers.py | csmatar/saleor | 125c90cc185731b49733178e02c0b43bf5939013 | [
"CC-BY-4.0"
] | 1 | 2022-02-21T07:17:08.000Z | 2022-02-21T07:17:08.000Z | saleor/graphql/plugins/resolvers.py | csmatar/saleor | 125c90cc185731b49733178e02c0b43bf5939013 | [
"CC-BY-4.0"
] | 81 | 2021-10-11T04:26:07.000Z | 2022-03-28T04:46:43.000Z | saleor/graphql/plugins/resolvers.py | csmatar/saleor | 125c90cc185731b49733178e02c0b43bf5939013 | [
"CC-BY-4.0"
] | 1 | 2022-02-16T22:00:59.000Z | 2022-02-16T22:00:59.000Z | from collections import defaultdict
from typing import Dict, List, Tuple
from ...plugins.base_plugin import BasePlugin, ConfigurationTypeField
from .filters import (
filter_plugin_by_type,
filter_plugin_search,
filter_plugin_status_in_channels,
)
from .sorters import sort_plugins
from .types import Plugin
... | 33.064815 | 88 | 0.66816 |
17e87b19675035acb7788a57875791fc239f91e9 | 4,335 | py | Python | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/contracts/testing/test_docstring_parsing.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | 13 | 2018-03-28T23:07:01.000Z | 2022-03-12T06:01:21.000Z | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/contracts/testing/test_docstring_parsing.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | 11 | 2018-06-18T15:49:07.000Z | 2021-11-25T01:45:33.000Z | catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/contracts/testing/test_docstring_parsing.py | johnson880319/Software | 045894227f359e0a3a3ec5b7a53f8d1ebc06acdd | [
"CC-BY-2.0"
] | 5 | 2018-03-28T23:07:05.000Z | 2021-12-09T19:02:00.000Z | import unittest
from ..docstring_parsing import DocStringInfo, Arg, number_of_spaces
from contracts.interface import add_prefix
examples = {"""
Provides a RGB representation of the values by interpolating the range
[min(value),max(value)] into the colorspace [min_color, max_color].
:param va... | 39.770642 | 117 | 0.610611 |
dc9d593d4487ed0db1bf1e904519fad7cbe322aa | 16,073 | py | Python | widgets/editor_widgets.py | cristian64/mkdd-track-editor | e8e735033ca11127e6686d81e7377110ad628915 | [
"MIT"
] | null | null | null | widgets/editor_widgets.py | cristian64/mkdd-track-editor | e8e735033ca11127e6686d81e7377110ad628915 | [
"MIT"
] | null | null | null | widgets/editor_widgets.py | cristian64/mkdd-track-editor | e8e735033ca11127e6686d81e7377110ad628915 | [
"MIT"
] | 2 | 2022-03-30T13:01:26.000Z | 2022-03-31T06:25:37.000Z | import traceback
from io import StringIO
from itertools import chain
from math import acos, pi
import os
import sys
from PyQt5.QtGui import QMouseEvent, QWheelEvent, QPainter, QColor, QFont, QFontMetrics, QPolygon, QImage, QPixmap, QKeySequence
from PyQt5.QtWidgets import (QWidget, QListWidget, QListWidgetItem, QDialo... | 36.696347 | 129 | 0.590618 |
12bbcee588e9835228ea369f91c9ba092a06efb0 | 5,190 | py | Python | lib/spack/spack/parse.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | lib/spack/spack/parse.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | lib/spack/spack/parse.py | xiki-tempula/spack | 9d66c05e93ab8a933fc59915040c0e0c86a4aac4 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
import shlex
import sys
import itertools
from six import string_types
import spack.error
class Token(object):... | 30.710059 | 79 | 0.587476 |
14788ea83accb89ed904d08bb3dc3fff212b6b7e | 68 | py | Python | demo/demo_app/settings/production_debug.py | Nekmo/djangocms-bs3-theme | 1155588414164d6e5d027131e9181856f8a80d5d | [
"MIT"
] | null | null | null | demo/demo_app/settings/production_debug.py | Nekmo/djangocms-bs3-theme | 1155588414164d6e5d027131e9181856f8a80d5d | [
"MIT"
] | 10 | 2018-07-30T15:09:57.000Z | 2022-03-29T21:54:12.000Z | demo/demo_app/settings/production_debug.py | Nekmo/djangocms-bs3-theme | 1155588414164d6e5d027131e9181856f8a80d5d | [
"MIT"
] | null | null | null | from .production import *
DEBUG = True
BOOTSTRAP3_FORCE_SRC = True
| 13.6 | 27 | 0.779412 |
5e62f5982af991c7a8f2f59da86f92fa09375a81 | 215 | py | Python | yeast/core/media/sc/sc_no_ino.py | irahorecka/sga-fba | fc7e923da8e79555780359f018c85b5e5339d8d0 | [
"MIT"
] | null | null | null | yeast/core/media/sc/sc_no_ino.py | irahorecka/sga-fba | fc7e923da8e79555780359f018c85b5e5339d8d0 | [
"MIT"
] | null | null | null | yeast/core/media/sc/sc_no_ino.py | irahorecka/sga-fba | fc7e923da8e79555780359f018c85b5e5339d8d0 | [
"MIT"
] | null | null | null | """
Defines upper bounds of SC-Ino media for FBA
"""
from yeast.core.media.constants import reagents
from yeast.core.media.sc.base import sc
ino = {
reagents["myo-inositol"]: 0.0,
}
sc_no_ino = {**sc, **ino}
| 16.538462 | 47 | 0.683721 |
1aae5f06ddd45b14327ba65dfe9f9395c72a46b5 | 7,945 | py | Python | docs/conf.py | kforti/variant_calling | 5b6899115b1c5b1f958d8d8f33b484ccd0a8a787 | [
"MIT"
] | null | null | null | docs/conf.py | kforti/variant_calling | 5b6899115b1c5b1f958d8d8f33b484ccd0a8a787 | [
"MIT"
] | null | null | null | docs/conf.py | kforti/variant_calling | 5b6899115b1c5b1f958d8d8f33b484ccd0a8a787 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# tokyo_variant_calling documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration... | 32.428571 | 80 | 0.711517 |
3bc5db5029e791619f4fdd2de2bffba75d058601 | 1,933 | py | Python | OpenCv Document Scanner/scan.py | PatrickPrakash/OpenCvProjects | c29d024a86ea8b2fc5a5aad8b8eb1f128e68b931 | [
"MIT"
] | null | null | null | OpenCv Document Scanner/scan.py | PatrickPrakash/OpenCvProjects | c29d024a86ea8b2fc5a5aad8b8eb1f128e68b931 | [
"MIT"
] | null | null | null | OpenCv Document Scanner/scan.py | PatrickPrakash/OpenCvProjects | c29d024a86ea8b2fc5a5aad8b8eb1f128e68b931 | [
"MIT"
] | null | null | null | from pyimagesearch.transform import four_point_transform
from skimage.filters import threshold_local
import numpy as np
import argparse
import cv2
import imutils
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required = True,
help = "Path to the image to be scanned")
args = vars(ap.parse_args())
ima... | 33.327586 | 78 | 0.727367 |
8a6ad7eca5917d66fc8e3593df4811aa3731e665 | 15,400 | py | Python | backend/src/baserow/api/groups/invitations/views.py | cjh0613/baserow | 62871f5bf53c9d25446976031aacb706c0abe584 | [
"MIT"
] | 839 | 2020-07-20T13:29:34.000Z | 2022-03-31T21:09:16.000Z | backend/src/baserow/api/groups/invitations/views.py | cjh0613/baserow | 62871f5bf53c9d25446976031aacb706c0abe584 | [
"MIT"
] | 28 | 2020-08-07T09:23:58.000Z | 2022-03-01T22:32:40.000Z | backend/src/baserow/api/groups/invitations/views.py | cjh0613/baserow | 62871f5bf53c9d25446976031aacb706c0abe584 | [
"MIT"
] | 79 | 2020-08-04T01:48:01.000Z | 2022-03-27T13:30:54.000Z | from django.db import transaction
from django.db.models import Exists, OuterRef
from django.contrib.auth import get_user_model
from itsdangerous.exc import BadSignature
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated, AllowAn... | 36.065574 | 87 | 0.637792 |
07b92d615923dd63cf15c6084f546c4601927de3 | 17,896 | py | Python | data/dql/script47/20210129-091207/script47.py | lbaiao/sys-simulator-2 | 94f00d43309fe7b56dac5099bd4024695ba317b6 | [
"MIT"
] | 1 | 2020-06-14T13:50:28.000Z | 2020-06-14T13:50:28.000Z | data/dql/script47/20210129-091207/script47.py | lbaiao/sys-simulator-2 | 94f00d43309fe7b56dac5099bd4024695ba317b6 | [
"MIT"
] | null | null | null | data/dql/script47/20210129-091207/script47.py | lbaiao/sys-simulator-2 | 94f00d43309fe7b56dac5099bd4024695ba317b6 | [
"MIT"
] | null | null | null | # Similar to script .
# Uses CompleteEnvironment10dB
# Centralized Learning-Distributed Execution
# Simulates many times, for different number of agents, and take the averages.
# There are different channels to the BS and to the devices.
# Multiple episodes convergence. Everything is in dB.
# One NN is trained and copi... | 36.153535 | 94 | 0.643328 |
3a7b95d9a7da73e127da386180e8ef34b9968632 | 22 | py | Python | btd6_memory_info/generated/Assets/Scripts/Data/Cosmetics/BloonDecals/BloonDecal/bloon_decal.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Data/Cosmetics/BloonDecals/BloonDecal/bloon_decal.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Data/Cosmetics/BloonDecals/BloonDecal/bloon_decal.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class BloonDecal: pass | 22 | 22 | 0.863636 |
e0829149dfa200e179b7ece34dc3be81e70d02fe | 4,300 | py | Python | cooking_assistant/settings.py | rclsilver/cooking-assistant | 440f762977d5517f152b8d4b520c590e2cf0eca6 | [
"Apache-2.0"
] | 1 | 2020-12-01T16:12:28.000Z | 2020-12-01T16:12:28.000Z | cooking_assistant/settings.py | rclsilver/cooking-assistant | 440f762977d5517f152b8d4b520c590e2cf0eca6 | [
"Apache-2.0"
] | null | null | null | cooking_assistant/settings.py | rclsilver/cooking-assistant | 440f762977d5517f152b8d4b520c590e2cf0eca6 | [
"Apache-2.0"
] | null | null | null | """
Django settings for cooking_assistant project.
Generated by 'django-admin startproject' using Django 2.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
im... | 29.054054 | 97 | 0.701163 |
8fef4b49ce6533109de100a0f55eeeb54e6c5885 | 3,822 | py | Python | dicoms/forms.py | DCAN-Labs/bids-tryworks | aa52ec3d7e9a95d07fcf559ef98351529ae972c6 | [
"BSD-3-Clause"
] | null | null | null | dicoms/forms.py | DCAN-Labs/bids-tryworks | aa52ec3d7e9a95d07fcf559ef98351529ae972c6 | [
"BSD-3-Clause"
] | 27 | 2020-06-26T23:04:08.000Z | 2022-02-10T10:46:55.000Z | dicoms/forms.py | DCAN-Labs/bids-tryworks | aa52ec3d7e9a95d07fcf559ef98351529ae972c6 | [
"BSD-3-Clause"
] | null | null | null | import json
from os.path import basename, normpath
from bootstrap_datepicker_plus import DatePickerInput
from django import forms
from django.utils.translation import ugettext_lazy as _
from drf_braces.serializers.form_serializer import FormSerializer
from dicoms.models import Search, Series
class SearchForm(forms.... | 35.06422 | 115 | 0.658817 |
15ecc5c5b6e198f05b8d3db2b443339913a9950e | 1,048 | py | Python | actions.py | piniaplai/weather-bot | fac4b658e306973a7e6e5e9a6eeddab885bbd9e2 | [
"MIT"
] | null | null | null | actions.py | piniaplai/weather-bot | fac4b658e306973a7e6e5e9a6eeddab885bbd9e2 | [
"MIT"
] | null | null | null | actions.py | piniaplai/weather-bot | fac4b658e306973a7e6e5e9a6eeddab885bbd9e2 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from rasa_core.actions.action import Action
# https://pypi.org/project/weather-api/
from weather import Weather, Unit
class ActionGetWeather(Action):
def name(self... | 36.137931 | 119 | 0.645992 |
32c1647359d63a2c5aeed8f45a60906d4713ee17 | 997 | py | Python | src/metropolisnonlin.py | zhang-changwei/Phase-Transition-Through-Quenching | ff47d3a0209c6121eb570b74003934358bc17482 | [
"MIT"
] | null | null | null | src/metropolisnonlin.py | zhang-changwei/Phase-Transition-Through-Quenching | ff47d3a0209c6121eb570b74003934358bc17482 | [
"MIT"
] | null | null | null | src/metropolisnonlin.py | zhang-changwei/Phase-Transition-Through-Quenching | ff47d3a0209c6121eb570b74003934358bc17482 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
import MC
rng = np.random.default_rng()
L = 12
TC, BETA, NU = 2/(np.log(1+np.sqrt(2))), 1/8, 1
TI = 1.5*TC
R = 2
MCBIN = L**2
REPEAT = 100
# tauq = np.logspace(0, 4, num=41, base=10, endpoint=True)
tauq = np.logspace(0, 3, num=31, base=10, endpoint=True)
v = 0.5... | 25.564103 | 60 | 0.643932 |
e34895e80d1cc83bfd1244e8e8571cd8adb61f10 | 1,012 | py | Python | src/Visualization/Genre_Accuracy.py | Sunhick/music-cognita | e90d9ed8122f39bce3e239518df696b35cd6fda8 | [
"MIT"
] | 2 | 2017-10-05T15:45:23.000Z | 2021-02-18T13:45:27.000Z | src/Visualization/Genre_Accuracy.py | Sunhick/music-cognita | e90d9ed8122f39bce3e239518df696b35cd6fda8 | [
"MIT"
] | null | null | null | src/Visualization/Genre_Accuracy.py | Sunhick/music-cognita | e90d9ed8122f39bce3e239518df696b35cd6fda8 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
N = 6
Accuracy = (53.76,47.58,24.52,58.37,41.73,49.64)
Error = (100 - 53.76,100 - 47.58,100 - 24.52,100 - 58.37,100 - 41.73,100 - 49.64)
ind = np.arange(N) # the x locations for the groups
width = 0.35 # the width of the bars
fig, ax = plt.subplots()
rects1 = ... | 30.666667 | 97 | 0.645257 |
2071fb20deb90c86df61a70d3128b08748cdb74a | 5,070 | py | Python | tests/test_apk_patch_size_estimator.py | isabella232/apk-patch-size-estimator | 5d923c259b2fd6023cd5d2a88be4bc25fa23cdb5 | [
"Apache-2.0"
] | 346 | 2016-04-30T21:26:28.000Z | 2022-03-30T21:31:59.000Z | tests/test_apk_patch_size_estimator.py | googlesamples/apk-patch-size-estimator | 5d923c259b2fd6023cd5d2a88be4bc25fa23cdb5 | [
"Apache-2.0"
] | 4 | 2017-01-20T14:04:24.000Z | 2020-05-21T19:56:13.000Z | tests/test_apk_patch_size_estimator.py | isabella232/apk-patch-size-estimator | 5d923c259b2fd6023cd5d2a88be4bc25fa23cdb5 | [
"Apache-2.0"
] | 48 | 2016-05-01T15:08:55.000Z | 2020-11-14T20:39:06.000Z | #!/usr/bin/python
#
# Copyright 2016 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 b... | 33.8 | 76 | 0.739448 |
fcd53feedbc3d78885b6513029eb0fcb0448a850 | 10,241 | py | Python | venv/Lib/site-packages/um/visuals/color.py | DarkEyeBr/Python | f45239551d19f49eac35185e4f72b067d5820f3a | [
"MIT"
] | null | null | null | venv/Lib/site-packages/um/visuals/color.py | DarkEyeBr/Python | f45239551d19f49eac35185e4f72b067d5820f3a | [
"MIT"
] | 1 | 2019-04-12T18:55:02.000Z | 2019-04-12T18:55:02.000Z | venv/Lib/site-packages/um/visuals/color.py | DarkEyeBr/Python | f45239551d19f49eac35185e4f72b067d5820f3a | [
"MIT"
] | null | null | null | """
Module containing color utilities and color constants.
Source of colors - Google Material Design
https://material.io/guidelines/style/color.html#color-color-palette
"""
import re
class Color:
def __init__(self, r: int =0x0, g: int=0x0, b: int =0x0):
if any(value < 0 or value > 255 for value in (r, g,... | 28.134615 | 94 | 0.693389 |
2a078aa1ae6053ec9d817e16c4499d3f94caf80a | 13,565 | py | Python | backend/uclapi/workspaces/views.py | nayanadasgupta/uclapi | 54fbdf4232fe3b309332291c29233dcb6e21b2c9 | [
"MIT"
] | null | null | null | backend/uclapi/workspaces/views.py | nayanadasgupta/uclapi | 54fbdf4232fe3b309332291c29233dcb6e21b2c9 | [
"MIT"
] | null | null | null | backend/uclapi/workspaces/views.py | nayanadasgupta/uclapi | 54fbdf4232fe3b309332291c29233dcb6e21b2c9 | [
"MIT"
] | null | null | null | import re
from base64 import b64decode
from django.utils.decorators import method_decorator
from rest_framework import generics
from rest_framework.decorators import api_view
from rest_framework.exceptions import ParseError
from common.decorators import uclapi_protected_endpoint
from common.helpers import PrettyJsonR... | 34.516539 | 118 | 0.624991 |
6299ac230db4edb3ffd5120db31eb6d17117e1b4 | 1,557 | py | Python | alpaca/dataloader/red_wine.py | mtereshkin/alpaca | 1fe46f802dd02a90792d65a03e3e7066fa9adfcf | [
"Apache-2.0"
] | null | null | null | alpaca/dataloader/red_wine.py | mtereshkin/alpaca | 1fe46f802dd02a90792d65a03e3e7066fa9adfcf | [
"Apache-2.0"
] | null | null | null | alpaca/dataloader/red_wine.py | mtereshkin/alpaca | 1fe46f802dd02a90792d65a03e3e7066fa9adfcf | [
"Apache-2.0"
] | null | null | null | from os import path
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from .config import DATA_DIR
from .saver import DataSaver
from .downloader import download
URL = 'https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv'
class RedWin... | 30.529412 | 98 | 0.648041 |
97b20117b1a92e3efdbf7d3edf603952ff864495 | 1,018 | py | Python | rhythms.py | gexahedron/sc3_microtonal | 94c3091705d1e194dab0ec600b35c968ceb79c95 | [
"MIT"
] | null | null | null | rhythms.py | gexahedron/sc3_microtonal | 94c3091705d1e194dab0ec600b35c968ceb79c95 | [
"MIT"
] | null | null | null | rhythms.py | gexahedron/sc3_microtonal | 94c3091705d1e194dab0ec600b35c968ceb79c95 | [
"MIT"
] | null | null | null | # code from https://github.com/brianhouse/bjorklund/blob/master/__init__.py
def euclidean(steps, pulses):
steps = int(steps)
pulses = int(pulses)
if pulses > steps:
raise ValueError
pattern = []
counts = []
remainders = []
divisor = steps - pulses
remainders.append(pulses... | 28.277778 | 75 | 0.54224 |
2bf0d75bfe08b6d59f2fcc7f1386f0d5c2b338cc | 17,552 | py | Python | skdaccess/utilities/ode_util.py | samiriff/scikit-dataaccess-ode | dc08fd67c772d3cd83d0d34183196661b6b53778 | [
"MIT"
] | null | null | null | skdaccess/utilities/ode_util.py | samiriff/scikit-dataaccess-ode | dc08fd67c772d3cd83d0d34183196661b6b53778 | [
"MIT"
] | null | null | null | skdaccess/utilities/ode_util.py | samiriff/scikit-dataaccess-ode | dc08fd67c772d3cd83d0d34183196661b6b53778 | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2018 Massachusetts Institute of Technology
#
# Author: Guillaume Rongier
# This software has been created in projects supported by the US National
# Science Foundation and NASA (PI: Pankratius)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of ... | 44.100503 | 108 | 0.644599 |
09b498b5000bf12d1e8ee13d3533595dcc25b1b1 | 87,675 | py | Python | sympy/utilities/runtests.py | Corwinpro/sympy | a2efa19333fa0b3b18db872efabbb46248cde63b | [
"BSD-3-Clause"
] | 2 | 2019-10-18T12:45:34.000Z | 2020-08-10T08:27:59.000Z | sympy/utilities/runtests.py | Corwinpro/sympy | a2efa19333fa0b3b18db872efabbb46248cde63b | [
"BSD-3-Clause"
] | 7 | 2015-03-23T23:33:02.000Z | 2019-02-09T00:19:41.000Z | sympy/utilities/runtests.py | Corwinpro/sympy | a2efa19333fa0b3b18db872efabbb46248cde63b | [
"BSD-3-Clause"
] | 1 | 2019-10-18T12:39:41.000Z | 2019-10-18T12:39:41.000Z | """
This is our testing framework.
Goals:
* it should be compatible with py.test and operate very similarly
(or identically)
* doesn't require any external dependencies
* preferably all the functionality should be in this file only
* no magic, just import the test file and execute the test functions, that's it
* po... | 37.308511 | 261 | 0.579093 |
ff498abac2208a612be5549f3d8883b9d48d6f03 | 1,075 | py | Python | src/activities_score/migrations/0004_auto_20201223_2212.py | andhrelja/timetabled | 3d2d5ca91abc0b4cace4176d3b6849969f7211b5 | [
"PostgreSQL"
] | 1 | 2021-05-07T00:20:42.000Z | 2021-05-07T00:20:42.000Z | src/activities_score/migrations/0004_auto_20201223_2212.py | andhrelja/timetabled | 3d2d5ca91abc0b4cace4176d3b6849969f7211b5 | [
"PostgreSQL"
] | null | null | null | src/activities_score/migrations/0004_auto_20201223_2212.py | andhrelja/timetabled | 3d2d5ca91abc0b4cace4176d3b6849969f7211b5 | [
"PostgreSQL"
] | null | null | null | # Generated by Django 3.1.3 on 2020-12-23 21:12
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('activities_score', '0003_auto_20201217_1831'),
]
operations = [
migrations.AlterField(
model_name='globalscoreactivity',
... | 44.791667 | 302 | 0.588837 |
231ee94449938de07724a35653ac4f9f5cbf2d3a | 4,569 | py | Python | api.py | stemid/passwordfrank | cf0b16fd00ae850d93b513c4c2e3d45d5d324cec | [
"CC0-1.0"
] | null | null | null | api.py | stemid/passwordfrank | cf0b16fd00ae850d93b513c4c2e3d45d5d324cec | [
"CC0-1.0"
] | null | null | null | api.py | stemid/passwordfrank | cf0b16fd00ae850d93b513c4c2e3d45d5d324cec | [
"CC0-1.0"
] | null | null | null | from datetime import datetime, timedelta
from uuid import uuid4
import json
import web
import settings, model
from settings import generate_password, base36encode, base36decode
# Helper function for formatting datetime objects to json
def dateHandler(obj):
if isinstance(obj, datetime):
return obj.strftime... | 29.668831 | 74 | 0.531188 |
5ce083583c2bd7a235adb862be086f7241de28f6 | 33,270 | py | Python | pytext/config/config_adapter.py | yinghai/pytext | 5457c157d7a5f39bb96e2f207560cc52d9b98c83 | [
"BSD-3-Clause"
] | null | null | null | pytext/config/config_adapter.py | yinghai/pytext | 5457c157d7a5f39bb96e2f207560cc52d9b98c83 | [
"BSD-3-Clause"
] | null | null | null | pytext/config/config_adapter.py | yinghai/pytext | 5457c157d7a5f39bb96e2f207560cc52d9b98c83 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from pytext.common.utils import eprint
from .pytext_config import LATEST_VERSION, PyTextConfig
ADAPTERS = {}
DOWNGRADE_ADAPTERS = {}
NOT_THERE = (None, None, None)
def register_adapter(from_version):
def decorator(fn):... | 34.440994 | 96 | 0.666607 |
848debb5e53b87ef7c4b4628545b4f4c48f5c57a | 26,980 | py | Python | cinder/service.py | helenwalsh/cinder | 307fccea4cc9c6496334b0fe137206cb48499bd5 | [
"Apache-2.0"
] | 571 | 2015-01-01T17:47:26.000Z | 2022-03-23T07:46:36.000Z | cinder/service.py | BelieveInFuture/cinder | fff95fa6a68a054488ee087b6e31f4f5e28209dc | [
"Apache-2.0"
] | 37 | 2015-01-22T23:27:04.000Z | 2021-02-05T16:38:48.000Z | cinder/service.py | BelieveInFuture/cinder | fff95fa6a68a054488ee087b6e31f4f5e28209dc | [
"Apache-2.0"
] | 841 | 2015-01-04T17:17:11.000Z | 2022-03-31T12:06:51.000Z | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | 39.734904 | 79 | 0.606746 |
8ccf59ddfaba7a7b5e8f295d4b8245a153b57f88 | 790 | py | Python | home/kwatters/harry/gestures/armsUp.py | rv8flyboy/pyrobotlab | 4e04fb751614a5cb6044ea15dcfcf885db8be65a | [
"Apache-2.0"
] | 63 | 2015-02-03T18:49:43.000Z | 2022-03-29T03:52:24.000Z | home/kwatters/harry/gestures/armsUp.py | hirwaHenryChristian/pyrobotlab | 2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9 | [
"Apache-2.0"
] | 16 | 2016-01-26T19:13:29.000Z | 2018-11-25T21:20:51.000Z | home/kwatters/harry/gestures/armsUp.py | hirwaHenryChristian/pyrobotlab | 2debb381fc2db4be1e7ea6e5252a50ae0de6f4a9 | [
"Apache-2.0"
] | 151 | 2015-01-03T18:55:54.000Z | 2022-03-04T07:04:23.000Z | def armsUp():
i01.setHeadSpeed(1.0,1.0)
i01.moveHead(180,86)
sleep(1)
i01.setHandSpeed("left",0.90,0.90,0.90,0.90,0.90,1.0)
i01.setHandSpeed("right",0.90,0.90,0.90,0.90,0.90,1.0)
i01.moveHand("left",170,170,170,170,170,33)
i01.moveHand("right",170,170,170,170,170,180)
sleep(3)
i01.setArmSpeed("left",1... | 31.6 | 56 | 0.646835 |
dcfb8dc8a64b1963e31eed9f15f47be0eff93bd1 | 418 | py | Python | server/main/services/user_service.py | wiggitamoo/Angular-Flask-Docker-Skeleton | 474727334d6c3618e1141b349b2dbe90828b9022 | [
"MIT"
] | 65 | 2017-12-09T17:58:14.000Z | 2022-03-28T00:11:09.000Z | server/main/services/user_service.py | wiggitamoo/Angular-Flask-Docker-Skeleton | 474727334d6c3618e1141b349b2dbe90828b9022 | [
"MIT"
] | 14 | 2018-02-10T11:42:59.000Z | 2022-03-02T02:40:31.000Z | server/main/services/user_service.py | wiggitamoo/Angular-Flask-Docker-Skeleton | 474727334d6c3618e1141b349b2dbe90828b9022 | [
"MIT"
] | 40 | 2018-04-22T20:36:50.000Z | 2021-12-14T05:17:48.000Z | # -*- coding: utf-8 -*-
"""
UserService class - This class holds the method related to User manipulations.
"""
from server.main.models.user import User
from server.main.services import SQLAlchemyService
class UserService(SQLAlchemyService):
__model__ = User
def __init__(self):
# Creating a parent ... | 22 | 78 | 0.722488 |
29294e09f27bd34a3b995409999d0fd79abf108c | 318 | py | Python | src/adverts/tasks.py | alekseyr/pyjobs | 9ef6dd8edaba7eb568fcc7d7ee6723ac9c5eb0ff | [
"MIT"
] | 1 | 2015-11-21T19:21:23.000Z | 2015-11-21T19:21:23.000Z | src/adverts/tasks.py | alekseyr/pyjobs | 9ef6dd8edaba7eb568fcc7d7ee6723ac9c5eb0ff | [
"MIT"
] | 4 | 2015-07-27T08:30:26.000Z | 2015-07-30T07:58:39.000Z | src/adverts/tasks.py | pyshop/pyjobs | 9ef6dd8edaba7eb568fcc7d7ee6723ac9c5eb0ff | [
"MIT"
] | null | null | null | from celery.task import periodic_task # декораторы теперь следует импортировать из celery.task
from mailer.engine import send_all
from datetime import timedelta
# this will run every 60 seconds
# send all emails in the mailer queue
@periodic_task(run_every=timedelta(seconds=60))
def email_tasks():
send_all()
| 26.5 | 95 | 0.798742 |
b0a8ab799651fa97f02d471cdd31af72160c7cf1 | 1,716 | py | Python | filaments/registry_persistence_detection.py | sbilly/fibratus | 3d6c885a997ef98a244eddd0740b6a88297d1974 | [
"Apache-2.0"
] | 1 | 2021-04-30T05:10:13.000Z | 2021-04-30T05:10:13.000Z | filaments/registry_persistence_detection.py | sbilly/fibratus | 3d6c885a997ef98a244eddd0740b6a88297d1974 | [
"Apache-2.0"
] | null | null | null | filaments/registry_persistence_detection.py | sbilly/fibratus | 3d6c885a997ef98a244eddd0740b6a88297d1974 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015/2016 by Nedim Sabic (RabbitStack)
# All Rights Reserved.
# http://rabbitstack.github.io
# 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/LICE... | 35.020408 | 76 | 0.652098 |
75b1b4a5f66f7b60520b1ee180a9c7747278d80a | 380 | py | Python | sso/middleware/permission_denied.py | uktrade/export-wins-data | 46caa444812e89abe504bec8c15aa7f7ba1a247e | [
"MIT"
] | 5 | 2016-09-12T12:52:45.000Z | 2020-03-24T14:43:13.000Z | sso/middleware/permission_denied.py | uktrade/export-wins-data | 46caa444812e89abe504bec8c15aa7f7ba1a247e | [
"MIT"
] | 435 | 2016-10-18T12:51:39.000Z | 2021-06-09T17:22:08.000Z | sso/middleware/permission_denied.py | uktrade/export-wins-data | 46caa444812e89abe504bec8c15aa7f7ba1a247e | [
"MIT"
] | 2 | 2016-12-06T10:37:21.000Z | 2017-02-22T17:27:43.000Z | from django.utils.deprecation import MiddlewareMixin
from rest_framework import status
from django.conf import settings
class Metadata403(MiddlewareMixin):
def process_response(self, request, response):
if getattr(response, 'status_code', None) == status.HTTP_403_FORBIDDEN:
response['PreferAu... | 31.666667 | 79 | 0.760526 |
ead8825c7772e8fc261d2f1de80ea3eefc760d6d | 759 | py | Python | application/configs.py | Jasbeauty/mine_blog | 22899be4db20a92ad40cf35f84a3123dd0ebeee6 | [
"Apache-2.0"
] | null | null | null | application/configs.py | Jasbeauty/mine_blog | 22899be4db20a92ad40cf35f84a3123dd0ebeee6 | [
"Apache-2.0"
] | null | null | null | application/configs.py | Jasbeauty/mine_blog | 22899be4db20a92ad40cf35f84a3123dd0ebeee6 | [
"Apache-2.0"
] | null | null | null | from datetime import timedelta
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:root@127.0.0.1:3306/mine_blog"
SQLALCHEMY_TRACK_MODIFICATIONS = True
JWT_SECRET_KEY = 'jwt_secret'
JWT_AUTH_URL_RULE = '/api/v1/auth'
JWT_EXPIRATION_DELTA = timedelta(seconds=12000)
SYS_UPLOAD_PATH = '/home/laowang/gitwarehouse/mine_blog/ap... | 36.142857 | 80 | 0.73386 |
29116728e827a0e3ddc01db54352fb9c9ec71999 | 343 | py | Python | site/thicc/apps/social_auth_filter/templatetags/social_auth_filter.py | aldenjenkins/ThiccGaming | 4790d2568b019438d1569d0fe4e9f9aba008b737 | [
"BSD-3-Clause"
] | 1 | 2016-03-11T18:48:36.000Z | 2016-03-11T18:48:36.000Z | social_auth_filter/templatetags/social_auth_filter.py | Azelphur-Servers/game.azelphur.com | d2410cb7b044c980d56151b9ce19442433fd8ac8 | [
"BSD-3-Clause"
] | 21 | 2016-01-25T22:35:28.000Z | 2022-03-11T23:14:32.000Z | site/thicc/apps/social_auth_filter/templatetags/social_auth_filter.py | aldenjenkins/ThiccGaming | 4790d2568b019438d1569d0fe4e9f9aba008b737 | [
"BSD-3-Clause"
] | 5 | 2016-02-12T20:13:14.000Z | 2018-01-31T08:26:16.000Z | from django import template
register = template.Library()
DISPLAY_NAMES = {
'reddit': 'Reddit',
'github': 'Github',
'google-oauth2': 'Google',
'facebook': 'Facebook',
'twitter': 'Twitter',
}
@register.filter(name='social_display_name')
def social_display_name(value):
return DISPLAY_NAMES.get... | 21.4375 | 50 | 0.6793 |
b26c57a7f70feab418696dcbae7d040a4b15128f | 82,058 | py | Python | sympy/integrals/rubi/tests/test_utility_function.py | gum3ng/sympy | e9414fafa976b26aa0b701a0217ab0f3b561989f | [
"BSD-3-Clause"
] | 1 | 2018-11-20T11:40:30.000Z | 2018-11-20T11:40:30.000Z | sympy/integrals/rubi/tests/test_utility_function.py | gum3ng/sympy | e9414fafa976b26aa0b701a0217ab0f3b561989f | [
"BSD-3-Clause"
] | 14 | 2018-02-08T10:11:03.000Z | 2019-04-16T10:32:46.000Z | sympy/integrals/rubi/tests/test_utility_function.py | gum3ng/sympy | e9414fafa976b26aa0b701a0217ab0f3b561989f | [
"BSD-3-Clause"
] | 1 | 2020-09-09T20:41:34.000Z | 2020-09-09T20:41:34.000Z | import sys
from sympy.external import import_module
matchpy = import_module("matchpy")
if not matchpy:
#bin/test will not execute any tests now
disabled = True
if sys.version_info[:2] < (3, 6):
disabled = True
from sympy.integrals.rubi.utility_function import (Set, With, Module,
Scan, MapAnd, FalseQ,... | 38.963913 | 279 | 0.60818 |
c8030fee76d6cbc801d010ff26f7e74778bcc02b | 3,516 | py | Python | test/GeneSet_Enrichment_server_test.py | kbasecollaborations/GeneSet_Enrichment | 14a5e409019457bfbe985236ff103edb2e8896c7 | [
"MIT"
] | null | null | null | test/GeneSet_Enrichment_server_test.py | kbasecollaborations/GeneSet_Enrichment | 14a5e409019457bfbe985236ff103edb2e8896c7 | [
"MIT"
] | null | null | null | test/GeneSet_Enrichment_server_test.py | kbasecollaborations/GeneSet_Enrichment | 14a5e409019457bfbe985236ff103edb2e8896c7 | [
"MIT"
] | 1 | 2020-01-17T20:26:32.000Z | 2020-01-17T20:26:32.000Z | # -*- coding: utf-8 -*-
import os
import time
import re
import unittest
from configparser import ConfigParser
from GeneSet_Enrichment.GeneSet_EnrichmentImpl import GeneSet_Enrichment
from GeneSet_Enrichment.GeneSet_EnrichmentServer import MethodContext
from GeneSet_Enrichment.authclient import KBaseAuth as _KBaseAuth
... | 38.637363 | 165 | 0.617747 |
f6aa035a571f20263466b83366e6ff7a2706d8d4 | 2,175 | py | Python | msbd/preprocessamento/riempire_na.py | mnslarcher/metodi-statistici-big-data | 4587b4e4104557e50d09d028259d6c42c44d2814 | [
"MIT"
] | 1 | 2019-02-17T09:28:04.000Z | 2019-02-17T09:28:04.000Z | msbd/preprocessamento/riempire_na.py | mnslarcher/metodi-statistici-big-data | 4587b4e4104557e50d09d028259d6c42c44d2814 | [
"MIT"
] | null | null | null | msbd/preprocessamento/riempire_na.py | mnslarcher/metodi-statistici-big-data | 4587b4e4104557e50d09d028259d6c42c44d2814 | [
"MIT"
] | null | null | null | from sklearn.base import TransformerMixin
from sklearn.utils.validation import check_is_fitted
class RiempireNAMedia(TransformerMixin):
"""Riempie i valori mancanti utilizzando la media
Attributes
----------
media_dict_ : dict
Dizionario che associa ad ogni colonna il suo valore medio.
"... | 27.1875 | 79 | 0.625287 |
b5164dab19000bfe4c7cde9a7bceba449ed1bdc7 | 9,222 | py | Python | pytorch3d/renderer/implicit/raymarching.py | shubham-goel/pytorch3d | e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21 | [
"BSD-3-Clause"
] | 5 | 2021-01-26T11:57:26.000Z | 2021-06-24T14:56:07.000Z | pytorch3d/renderer/implicit/raymarching.py | shubham-goel/pytorch3d | e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/renderer/implicit/raymarching.py | shubham-goel/pytorch3d | e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21 | [
"BSD-3-Clause"
] | 1 | 2020-04-14T18:22:32.000Z | 2020-04-14T18:22:32.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import warnings
from typing import Optional, Tuple, Union
import torch
class EmissionAbsorptionRaymarcher(torch.nn.Module):
"""
Raymarch using the Emission-Absorption (EA) algorithm.
The algorithm independently renders each ray by a... | 40.625551 | 84 | 0.642919 |
9d522d3826952dfaa454c0e8e187eb6a57c0be2e | 3,562 | py | Python | weasyprint/tests/test_tools.py | szmenpro/WeasyPrint | 80c5a8287133259f5deff4442adf8dc64dd4f65c | [
"BSD-3-Clause"
] | 2 | 2019-12-06T15:40:14.000Z | 2020-07-29T21:30:35.000Z | weasyprint/tests/test_tools.py | szmenpro/WeasyPrint | 80c5a8287133259f5deff4442adf8dc64dd4f65c | [
"BSD-3-Clause"
] | 13 | 2020-03-24T17:53:51.000Z | 2022-02-10T20:01:14.000Z | weasyprint/tests/test_tools.py | szmenpro/WeasyPrint | 80c5a8287133259f5deff4442adf8dc64dd4f65c | [
"BSD-3-Clause"
] | null | null | null | """
weasyprint.tests.test_tools
---------------------------
Test WeasyPrint Web tools.
:copyright: Copyright 2011-2019 Simon Sapin and contributors, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import io
from urllib.parse import urlencode
import cairocffi as cairo
from ..tools impo... | 32.981481 | 78 | 0.639528 |
a41f91146ed0db1ea94e74c388f087b5fc3940f9 | 3,870 | py | Python | pGUID_InvCodeMatchingMulti.py | kleblanc5909/FuzzyMatchIDs | d1c5ef37ea19f08cc30193285c9d98de0ae3d5c4 | [
"MIT"
] | null | null | null | pGUID_InvCodeMatchingMulti.py | kleblanc5909/FuzzyMatchIDs | d1c5ef37ea19f08cc30193285c9d98de0ae3d5c4 | [
"MIT"
] | 1 | 2019-03-28T18:14:31.000Z | 2019-08-09T14:28:28.000Z | pGUID_InvCodeMatchingMulti.py | kleblanc5909/FuzzyMatchIDs | d1c5ef37ea19f08cc30193285c9d98de0ae3d5c4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 26 14:02:03 2019
@author: Kim LeBlanc
"""
import pandas as pd
from pandas import ExcelWriter
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
def match2Lists(list1,list2):
"""
Loops over a list and returns fuzzy matches found in a second ... | 37.572816 | 98 | 0.734625 |
fbb301af2890d1f10a3ef942308bc2178974740f | 294 | py | Python | maths/first_digit_by_str.py | examplehub/Python | cd9dd9feb6dd65c2e0d545b5154a0f684e5c1e17 | [
"Apache-2.0"
] | 9 | 2020-10-03T06:52:35.000Z | 2021-09-08T03:22:59.000Z | maths/first_digit_by_str.py | Shubhanshu156/Python-1 | 3bd617843dfae1e9f4855a68a0f9663ea9180da5 | [
"Apache-2.0"
] | 8 | 2020-10-03T06:52:37.000Z | 2021-09-25T08:11:53.000Z | maths/first_digit_by_str.py | Shubhanshu156/Python-1 | 3bd617843dfae1e9f4855a68a0f9663ea9180da5 | [
"Apache-2.0"
] | 3 | 2020-10-25T08:25:50.000Z | 2021-09-05T11:16:17.000Z | def first_digit(number: int) -> int:
"""
>>> first_digit(-123)
1
>>> first_digit(0)
0
>>> first_digit(123)
1
>>> first_digit(123456789)
1
"""
return int(str(abs(number))[0])
if __name__ == "__main__":
from doctest import testmod
testmod()
| 15.473684 | 36 | 0.547619 |
0162bf31fef1dbf742ce8746a194ca388b9cc3d3 | 1,746 | py | Python | models/contact.py | ksemish/KseniyaRepository | 80f476c12c5d5412eed31f243fe4de84982eee46 | [
"Apache-2.0"
] | null | null | null | models/contact.py | ksemish/KseniyaRepository | 80f476c12c5d5412eed31f243fe4de84982eee46 | [
"Apache-2.0"
] | null | null | null | models/contact.py | ksemish/KseniyaRepository | 80f476c12c5d5412eed31f243fe4de84982eee46 | [
"Apache-2.0"
] | null | null | null | from sys import maxsize
class Contacts:
def __init__(self, firstname=None, middlename=None, lastname=None, nickname=None, company=None,
address=None, home=None, mobile=None, work=None, fax=None, email=None,
email2=None, email3=None, homeaddress=None, homephone=None, notes=None, id ... | 41.571429 | 147 | 0.639175 |
be976da1fb29514b2f5822ca5f41cbfc4eb2d2e3 | 125 | py | Python | setup.py | bgyori/conso | fe612ada83c0f43c56b734faa17781baed7387a6 | [
"CC-BY-4.0"
] | 5 | 2019-08-30T10:54:08.000Z | 2021-09-20T17:16:12.000Z | setup.py | bgyori/conso | fe612ada83c0f43c56b734faa17781baed7387a6 | [
"CC-BY-4.0"
] | 26 | 2018-09-21T13:19:25.000Z | 2019-07-31T09:30:08.000Z | setup.py | bgyori/conso | fe612ada83c0f43c56b734faa17781baed7387a6 | [
"CC-BY-4.0"
] | 3 | 2020-07-29T02:33:34.000Z | 2021-03-10T20:49:56.000Z | # -*- coding: utf-8 -*-
"""Setup module for CONSO."""
import setuptools
if __name__ == '__main__':
setuptools.setup()
| 13.888889 | 29 | 0.624 |
3aba633a159adc000460c9050a4c25ae58c22dfb | 345 | py | Python | rspec/spec_commands/bundle.py | cwilbur/TestRSpec | e69209d5891667f90003b32c2190bda41b309663 | [
"MIT"
] | null | null | null | rspec/spec_commands/bundle.py | cwilbur/TestRSpec | e69209d5891667f90003b32c2190bda41b309663 | [
"MIT"
] | null | null | null | rspec/spec_commands/bundle.py | cwilbur/TestRSpec | e69209d5891667f90003b32c2190bda41b309663 | [
"MIT"
] | null | null | null | import os
class Bundle(object):
def __init__(self, context):
self.context = context
def result(self):
if not self.context.from_settings("check_for_bundler"):
return
if self.gemfile_exists():
return "bundle exec"
def gemfile_exists(self):
return sel... | 21.5625 | 63 | 0.626087 |
a9727fffa20461af18c70f2a109098456ddc70d6 | 6,180 | py | Python | tests/unit/testplan/test_plan_base.py | dobragab/testplan | 407ac1dfd33d19753e41235a1f576aeb06118840 | [
"Apache-2.0"
] | null | null | null | tests/unit/testplan/test_plan_base.py | dobragab/testplan | 407ac1dfd33d19753e41235a1f576aeb06118840 | [
"Apache-2.0"
] | 64 | 2019-04-15T20:56:40.000Z | 2021-03-23T01:00:30.000Z | tests/unit/testplan/test_plan_base.py | dobragab/testplan | 407ac1dfd33d19753e41235a1f576aeb06118840 | [
"Apache-2.0"
] | null | null | null | """TODO."""
import os
import uuid
from testplan import Testplan, TestplanResult
from testplan.common.entity import (Resource, ResourceStatus,
Runnable, RunnableResult)
from testplan.common.utils.exceptions import should_raise
from testplan.common.utils.path import default_runpath
f... | 31.85567 | 92 | 0.648867 |
e7f758ff579884a8d5d164e6ac0b7aa121c6f5ec | 7,487 | py | Python | kentaroy47/predict.py | jamiejamiebobamie/Faster_R-CNN | 9321feae5ee2a40e579784ce23381494afdf1d61 | [
"MIT"
] | null | null | null | kentaroy47/predict.py | jamiejamiebobamie/Faster_R-CNN | 9321feae5ee2a40e579784ce23381494afdf1d61 | [
"MIT"
] | 20 | 2020-03-09T20:31:06.000Z | 2022-02-10T01:18:12.000Z | kentaroy47/predict.py | jamiejamiebobamie/Faster_R-CNN | 9321feae5ee2a40e579784ce23381494afdf1d61 | [
"MIT"
] | null | null | null | from __future__ import division
import os
import cv2
import numpy as np
import pickle
import time
from kentaroy47.config import Config as config
from keras import backend as K
from keras.layers import Input
from keras.models import Model
import kentaroy47.roi_helpers as roi_helpers
import argparse
import os
import kent... | 37.064356 | 110 | 0.626419 |
1b51d422ea4c21832927f3baab2ce41a31ba79da | 1,491 | py | Python | azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-07-23T08:59:24.000Z | 2018-07-23T08:59:24.000Z | azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-mgmt-servicebus/azure/mgmt/servicebus/models/regenerate_access_key_parameters_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.5 | 76 | 0.618377 |
5eddcc152a5eb9123d57f37141a65193ce0d24a3 | 2,284 | py | Python | P3-Logs-Analysis/newsreport.py | nehal96/full-stack-nd | a0721513538fbd7960e5a6408b8609816f81fc9e | [
"MIT"
] | null | null | null | P3-Logs-Analysis/newsreport.py | nehal96/full-stack-nd | a0721513538fbd7960e5a6408b8609816f81fc9e | [
"MIT"
] | null | null | null | P3-Logs-Analysis/newsreport.py | nehal96/full-stack-nd | a0721513538fbd7960e5a6408b8609816f81fc9e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import psycopg2
print("NEWS REPORT \n\n")
DBNAME = "news"
conn = psycopg2.connect(dbname=DBNAME) # Connect to database
cur = conn.cursor() # Create cursor object
# SQL statement for Question 1
cur.execute("""SELECT articles.title as "Name of article", viewcount.views as
... | 31.722222 | 77 | 0.594133 |
c0458bc6001df3132c272d0c00791ee55fcdf150 | 18,151 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/_express_route_circuit_connections_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/_express_route_circuit_connections_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/operations/_express_route_circuit_connections_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.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 ... | 49.865385 | 249 | 0.677043 |
7e6b155d0c6aa7629b9bc6dd68a094ffd647e56d | 5,187 | py | Python | tools_webrtc/autoroller/unittests/checkin_chromium_dep_test.py | lianhuaren/webrtc | 096f18c11d8acb0d92820f75fdf934607f424cfc | [
"DOC",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools_webrtc/autoroller/unittests/checkin_chromium_dep_test.py | lianhuaren/webrtc | 096f18c11d8acb0d92820f75fdf934607f424cfc | [
"DOC",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools_webrtc/autoroller/unittests/checkin_chromium_dep_test.py | lianhuaren/webrtc | 096f18c11d8acb0d92820f75fdf934607f424cfc | [
"DOC",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All c... | 39.59542 | 80 | 0.665124 |
00fb75b7ee7776682f862894361e731926a847bc | 3,733 | py | Python | env/lib/python3.7/site-packages/docusign_rooms/models/api_error.py | davidgacc/docusign | e63167101656d0066d481844576ce687ea80eb91 | [
"MIT"
] | null | null | null | env/lib/python3.7/site-packages/docusign_rooms/models/api_error.py | davidgacc/docusign | e63167101656d0066d481844576ce687ea80eb91 | [
"MIT"
] | null | null | null | env/lib/python3.7/site-packages/docusign_rooms/models/api_error.py | davidgacc/docusign | e63167101656d0066d481844576ce687ea80eb91 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign Rooms API - v2
An API for an integrator to access the features of DocuSign Rooms # noqa: E501
OpenAPI spec version: v2
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import... | 26.288732 | 83 | 0.556657 |
9bd9e8a19e3a00b266f3826dae2bb0e8d0ff58ad | 9,629 | py | Python | mmaction/models/recognizers/base.py | Cogito2012/DEAR | 97d0e8f191da0f20dcc9721280af48171dabef5e | [
"Apache-2.0"
] | 47 | 2021-09-02T10:42:29.000Z | 2022-03-31T01:37:49.000Z | mmaction/models/recognizers/base.py | Cogito2012/DEAR | 97d0e8f191da0f20dcc9721280af48171dabef5e | [
"Apache-2.0"
] | 2 | 2021-12-05T02:28:42.000Z | 2022-01-05T06:46:10.000Z | mmaction/models/recognizers/base.py | Cogito2012/DEAR | 97d0e8f191da0f20dcc9721280af48171dabef5e | [
"Apache-2.0"
] | 6 | 2021-09-19T16:31:32.000Z | 2022-03-03T06:57:34.000Z | from abc import ABCMeta, abstractmethod
from collections import OrderedDict
import torch
import torch.distributed as dist
import torch.nn as nn
import torch.nn.functional as F
from mmcv.runner import auto_fp16
from .. import builder
class BaseRecognizer(nn.Module, metaclass=ABCMeta):
"""Base class for recognize... | 35.929104 | 88 | 0.606293 |
980437f7fe2dbc92b23ca890da032738e632a5da | 724 | py | Python | pyglet-hg/tools/inspect_font.py | sangh/LaserShow | abc95e465e3455dc220cc602dd58358c84666f29 | [
"BSD-3-Clause"
] | 21 | 2015-11-03T03:15:36.000Z | 2021-03-15T22:00:47.000Z | tools/inspect_font.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | 3 | 2017-09-14T14:08:28.000Z | 2019-05-20T04:38:15.000Z | tools/inspect_font.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | 23 | 2017-04-15T19:23:08.000Z | 2020-09-08T11:55:29.000Z | #!/usr/bin/python
# $Id:$
'''Display font information.
Usage::
inspect_font.py <filename> [<filename> ...]
'''
import sys
from pyglet.font import ttf
def inspect_font(filename):
try:
info = ttf.TruetypeInfo(filename)
print '%s:' % filename,
print info.get_name('family'),
pr... | 23.354839 | 78 | 0.622928 |
95e363e3a8301896ae4bf8548a3537243903d18e | 684 | py | Python | biokinepy/vel_acc.py | klevis-a/biokinepy | 33b3aba0a5281e323fc6e5f743c124ba4d22f96c | [
"MIT"
] | 1 | 2021-08-18T21:41:38.000Z | 2021-08-18T21:41:38.000Z | biokinepy/vel_acc.py | klevis-a/biokinepy | 33b3aba0a5281e323fc6e5f743c124ba4d22f96c | [
"MIT"
] | null | null | null | biokinepy/vel_acc.py | klevis-a/biokinepy | 33b3aba0a5281e323fc6e5f743c124ba4d22f96c | [
"MIT"
] | null | null | null | import numpy as np
import quaternion
def ang_vel(mat_traj: np.ndarray, dt) -> np.ndarray:
"""Return the angular velocity of the rotation matrix trajectory (N, 3, 3)."""
mats_vel = np.gradient(mat_traj, dt, axis=0)
mats_t = np.swapaxes(mat_traj, -2, -1)
ang_vel_tensor = mats_vel @ mats_t
ang_vel_ve... | 38 | 110 | 0.69883 |
e6340fc6efff3090dcbdf451c98f3e2580a8eb68 | 2,144 | py | Python | viz_graph.py | ankurankan/graph_viz | ecf1237e9ae739bc06a8fafe8830d4ad21ab88a5 | [
"MIT"
] | 1 | 2017-04-10T08:08:03.000Z | 2017-04-10T08:08:03.000Z | viz_graph.py | ankurankan/graph_viz | ecf1237e9ae739bc06a8fafe8830d4ad21ab88a5 | [
"MIT"
] | null | null | null | viz_graph.py | ankurankan/graph_viz | ecf1237e9ae739bc06a8fafe8830d4ad21ab88a5 | [
"MIT"
] | null | null | null | import networkx as nx
import matplotlib.pyplot as plt
import matplotlib.animation as animation
class viz_graph(nx.Graph):
def viz_neighbors(self, node, color='b'):
"""
Draw the graph using matplotlib with highlighted neighbors.
Parameters
----------
node: Networkx node
Th... | 31.072464 | 83 | 0.542444 |
6283fc8059609d25d9b9c3bde54e11001c3a9f39 | 3,064 | py | Python | conf_testing/rules/habapp/test_habapp.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 44 | 2018-12-13T08:46:44.000Z | 2022-03-07T03:23:21.000Z | conf_testing/rules/habapp/test_habapp.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 156 | 2019-03-02T20:53:31.000Z | 2022-03-23T13:13:58.000Z | conf_testing/rules/habapp/test_habapp.py | DerOetzi/HABApp | a123fbfa9928ebb3cda9a84f6984dcba593c8236 | [
"Apache-2.0"
] | 18 | 2019-03-08T07:13:21.000Z | 2022-03-22T19:52:31.000Z | import time
import HABApp
from HABApp.core.events import ItemNoUpdateEvent, ItemNoChangeEvent, ValueUpdateEvent
from HABApp.core.items import Item
from HABAppTests import TestBaseRule, EventWaiter, get_random_name
class TestItemEvents(TestBaseRule):
def __init__(self):
super().__init__()
self.ad... | 35.218391 | 115 | 0.655026 |
f822349f2f76c1a6990fb847019b3cbe07d92c86 | 728 | py | Python | examples/pyfacebook_sample/urls.py | pose/pyfacebook-batch | 387a1ea12e1b495a8f6c5ddaf01835d0add6c21f | [
"FSFAP"
] | 2 | 2016-05-09T14:18:53.000Z | 2019-01-20T15:50:57.000Z | examples/pyfacebook_sample/urls.py | igorgue/pyfacebook | d06978fa930bcea33262c82f6a993bbb882fab12 | [
"FSFAP"
] | null | null | null | examples/pyfacebook_sample/urls.py | igorgue/pyfacebook | d06978fa930bcea33262c82f6a993bbb882fab12 | [
"FSFAP"
] | null | null | null | from django.conf.urls.defaults import *
# Hack to get the project name
project = __name__.split('.')[0]
# You'd want to change this to wherever your app lives
urlpatterns = patterns(project + '.pyfacebook_sample.views',
# Some functionality - users can post text to their homepage
(r'^canvas/post/', 'post'),
... | 30.333333 | 64 | 0.671703 |
d3d2a083a33e33a43ee5f6cc9265a1de2a413585 | 1,364 | py | Python | team13/svg thing/boundary.py | PyconUK/dojo18 | c737f2d1028347dfaf60d0f1da4764c5582ced91 | [
"MIT"
] | 3 | 2018-09-18T11:17:51.000Z | 2018-09-21T19:31:04.000Z | team13/svg thing/boundary.py | PyconUK/dojo18 | c737f2d1028347dfaf60d0f1da4764c5582ced91 | [
"MIT"
] | 1 | 2018-09-17T20:10:43.000Z | 2018-09-17T20:10:43.000Z | team13/svg thing/boundary.py | PyconUK/dojo18 | c737f2d1028347dfaf60d0f1da4764c5582ced91 | [
"MIT"
] | 13 | 2018-09-17T18:43:10.000Z | 2018-09-17T20:21:01.000Z | points = [(568.2,200.2),
(560.7,187.2),
(392.3,271.1),
(348.8,195.8),
(348.8,195.8),
(345.9,190.8),
(303.3,117.1),
(284.1,128.2),
(312.9,184.8),
(232.1,242.5),
(241.1,258.1),
(325.4,209.3),
(367.8,292.4),
(360.2,483.2),
(429.8,483.2),
(415.3,301.1)... | 17.947368 | 55 | 0.538123 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.