hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ce968e2059002cf3e3be84eff2c67f45da775689 | 4,590 | py | Python | neuro_evolutional_net/main.py | DominikSpiljak/Fuzzy-Evolutionary-and-Neuro-computing | fb0d54c35966ed0516c15519a6abcbffeb170f9b | [
"Apache-2.0"
] | null | null | null | neuro_evolutional_net/main.py | DominikSpiljak/Fuzzy-Evolutionary-and-Neuro-computing | fb0d54c35966ed0516c15519a6abcbffeb170f9b | [
"Apache-2.0"
] | null | null | null | neuro_evolutional_net/main.py | DominikSpiljak/Fuzzy-Evolutionary-and-Neuro-computing | fb0d54c35966ed0516c15519a6abcbffeb170f9b | [
"Apache-2.0"
] | 1 | 2022-03-02T03:23:34.000Z | 2022-03-02T03:23:34.000Z | from neural_net import NeuralNet
from dataset import Dataset
import numpy as np
import matplotlib.pyplot as plt
import genetics
from genetic_algorithm import GeneticAlgorithm
import time
def plot_data(dataset, save_file=None, neural_net=None, params=None, model_specs=None):
fig, axes = plt.subplots(1)
fig.set... | 35.859375 | 150 | 0.613508 |
dfe6d2f8f4edefcaf63e0ccf3067f482a126f067 | 4,295 | py | Python | webapi_active_query_builder/models/query_column.py | ActiveDbSoft/webapi-active-query-builder-python | 81d65f454617d913d8d3b707283a42830c08192d | [
"Apache-2.0"
] | 2 | 2018-11-01T18:03:04.000Z | 2020-03-21T17:34:51.000Z | webapi_active_query_builder/models/query_column.py | ActiveDbSoft/webapi-active-query-builder-python | 81d65f454617d913d8d3b707283a42830c08192d | [
"Apache-2.0"
] | null | null | null | webapi_active_query_builder/models/query_column.py | ActiveDbSoft/webapi-active-query-builder-python | 81d65f454617d913d8d3b707283a42830c08192d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
QueryBuilderApi
Active Query Builder Web API lets create, analyze and modify SQL queries for different database servers using RESTful HTTP requests to a cloud-based service. It requires SQL execution context (information about database schema and used database server) to be stored under th... | 28.256579 | 341 | 0.573458 |
a0c24de2e3d0ebad15e015cd26ff42271cd50b89 | 4,125 | py | Python | python-interface/test/vector/test_vector_slp_consecutive.py | lukasmweber/spn-compiler | acab827e8b8df69d1a4e83a209e14f62bd8d967e | [
"Apache-2.0"
] | 8 | 2021-07-07T17:19:16.000Z | 2022-03-30T06:08:44.000Z | python-interface/test/vector/test_vector_slp_consecutive.py | lukasmweber/spn-compiler | acab827e8b8df69d1a4e83a209e14f62bd8d967e | [
"Apache-2.0"
] | 9 | 2021-06-01T15:03:19.000Z | 2021-11-19T02:48:35.000Z | python-interface/test/vector/test_vector_slp_consecutive.py | lukasmweber/spn-compiler | acab827e8b8df69d1a4e83a209e14f62bd8d967e | [
"Apache-2.0"
] | 2 | 2021-07-07T17:19:36.000Z | 2022-02-28T15:08:36.000Z | import numpy as np
import pytest
import time
from spn.algorithms.Inference import log_likelihood
from spn.structure.Base import Product, Sum
from spn.structure.leaves.parametric.Parametric import Gaussian
from spnc.cpu import CPUCompiler
@pytest.mark.skipif(not CPUCompiler.isVectorizationSupported(), reason="CPU vect... | 50.304878 | 106 | 0.616 |
97574810905ea0c61eee2a539b4801b4a97a5b9b | 613 | py | Python | revgraph/core/functions/operations/math/add.py | shhoalex/revgraph | 7060945aa46fbd9584861715f15b6fc8037ba53f | [
"MIT"
] | 9 | 2020-06-27T07:01:00.000Z | 2020-10-23T13:50:04.000Z | revgraph/core/functions/operations/math/add.py | shinghinho/revgraph | 7060945aa46fbd9584861715f15b6fc8037ba53f | [
"MIT"
] | null | null | null | revgraph/core/functions/operations/math/add.py | shinghinho/revgraph | 7060945aa46fbd9584861715f15b6fc8037ba53f | [
"MIT"
] | null | null | null | import numpy as np
from revgraph.core.functions.base.binary_function import BinaryFunction
class Add(BinaryFunction):
def apply(self,
a: np.ndarray,
b: np.ndarray) -> np.ndarray:
return a+b
def gradient_wrt_a(self,
gradient: np.ndarray,
... | 26.652174 | 71 | 0.508972 |
367ea52b3a2bcd919d35ce3230b07faf6507b5e9 | 39,878 | py | Python | tests/components/generic_thermostat/test_climate.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 3 | 2020-01-21T18:09:09.000Z | 2022-01-17T08:06:03.000Z | tests/components/generic_thermostat/test_climate.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | tests/components/generic_thermostat/test_climate.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 3 | 2020-01-11T15:44:13.000Z | 2022-01-17T08:06:09.000Z | """The tests for the generic_thermostat."""
import datetime
from asynctest import mock
import pytest
import pytz
import voluptuous as vol
from homeassistant.components import input_boolean, switch
from homeassistant.components.climate.const import (
ATTR_PRESET_MODE,
DOMAIN,
HVAC_MODE_COOL,
HVAC_MODE_... | 32.90264 | 84 | 0.655274 |
2f66327295bb144eb1167b64225a2c5331daaf87 | 4,348 | py | Python | rest_framework_simplejwt/authentication.py | atomjuice/django-rest-framework-simplejwt | 0fd42091ecaf7033f66fd8a9c59951da887051c2 | [
"MIT"
] | null | null | null | rest_framework_simplejwt/authentication.py | atomjuice/django-rest-framework-simplejwt | 0fd42091ecaf7033f66fd8a9c59951da887051c2 | [
"MIT"
] | null | null | null | rest_framework_simplejwt/authentication.py | atomjuice/django-rest-framework-simplejwt | 0fd42091ecaf7033f66fd8a9c59951da887051c2 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.utils.translation import gettext_lazy as _
from rest_framework import HTTP_HEADER_ENCODING, authentication
from .exceptions import AuthenticationFailed, InvalidToken, TokenError
from .models import TokenUser
from .settings import api_settings
AUTH_HEADER_TYPE... | 31.970588 | 88 | 0.638224 |
f1bc14a2e9998dc3fcabd2b96f78b07b4fb02dd2 | 25,152 | py | Python | tensorflow_probability/python/distributions/power_spherical_test.py | mayou36/probability | f185c852146894af6dc02223020413bf26ecdd5c | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/power_spherical_test.py | mayou36/probability | f185c852146894af6dc02223020413bf26ecdd5c | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/power_spherical_test.py | mayou36/probability | f185c852146894af6dc02223020413bf26ecdd5c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 39.797468 | 80 | 0.684121 |
f86dd4e3989feb3eeaf3475aef1a03d7881ad83d | 1,421 | py | Python | src/interview-cake/product-of-every-integer-but/test_product_of_every_integer_but.py | nwthomas/code-challenges | 49c2532ff597495474e67b13f2ed9b9ad93d40b5 | [
"MIT"
] | 1 | 2020-12-11T05:54:59.000Z | 2020-12-11T05:54:59.000Z | src/interview-cake/product-of-every-integer-but/test_product_of_every_integer_but.py | nwthomas/code-challenges | 49c2532ff597495474e67b13f2ed9b9ad93d40b5 | [
"MIT"
] | 1 | 2021-04-10T06:53:30.000Z | 2021-04-10T06:53:30.000Z | src/interview-cake/product-of-every-integer-but/test_product_of_every_integer_but.py | nwthomas/code-challenges | 49c2532ff597495474e67b13f2ed9b9ad93d40b5 | [
"MIT"
] | 7 | 2019-11-24T12:10:35.000Z | 2020-12-14T22:36:31.000Z | from product_of_every_integer_but import get_products_of_all_ints_except_at_index
import unittest
class TestGetProductsOfAllIntsExceptAtIndex(unittest.TestCase):
def test_raises_typeerror_if_argument_is_not_list(self):
"""Raises a new TypeError if the argument is not of type list"""
def result(): ... | 40.6 | 81 | 0.719212 |
2ccef0dee4a40eca57a88b632de01c7a973b5a6d | 145 | py | Python | appengine_config.py | gtlambert/potato | 9d0a144ddfaacf8543d98357af9aa052f1433345 | [
"Apache-2.0"
] | null | null | null | appengine_config.py | gtlambert/potato | 9d0a144ddfaacf8543d98357af9aa052f1433345 | [
"Apache-2.0"
] | null | null | null | appengine_config.py | gtlambert/potato | 9d0a144ddfaacf8543d98357af9aa052f1433345 | [
"Apache-2.0"
] | null | null | null | import os
on_appengine = os.environ.get('SERVER_SOFTWARE','').startswith('Development')
if on_appengine and os.name == 'nt':
os.name = None
| 24.166667 | 77 | 0.710345 |
6329da74d147b5daecea61d567f569ea9820abf0 | 848 | py | Python | tests/musicstream/test_two_voices.py | alexgorji/music_score | b4176da52295361f3436826903485c5cb8054c5e | [
"MIT"
] | 2 | 2020-06-22T13:33:28.000Z | 2020-12-30T15:09:00.000Z | tests/musicstream/test_two_voices.py | alexgorji/music_score | b4176da52295361f3436826903485c5cb8054c5e | [
"MIT"
] | 37 | 2020-02-18T12:15:00.000Z | 2021-12-13T20:01:14.000Z | tests/musicstream/test_two_voices.py | alexgorji/music_score | b4176da52295361f3436826903485c5cb8054c5e | [
"MIT"
] | null | null | null | from unittest import TestCase
import os
from musicscore.musicstream.streamvoice import SimpleFormat
from musicscore.musictree.treescoretimewise import TreeScoreTimewise
from tests.score_templates.xml_test_score import TestScore
path = os.path.abspath(__file__).split('.')[0]
class Test(TestCase):
def setUp(self)... | 31.407407 | 78 | 0.701651 |
e4ac63aa536780b3b917cee2b2737def6330bdb1 | 25,994 | py | Python | donkeycar/templates/complete.py | wallarug/donkeycar | 93023641f7877520dbd1a59f525fc22b9f2182c5 | [
"MIT"
] | null | null | null | donkeycar/templates/complete.py | wallarug/donkeycar | 93023641f7877520dbd1a59f525fc22b9f2182c5 | [
"MIT"
] | null | null | null | donkeycar/templates/complete.py | wallarug/donkeycar | 93023641f7877520dbd1a59f525fc22b9f2182c5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Scripts to drive a donkey 2 car
Usage:
manage.py (drive) [--model=<model>] [--js] [--type=(linear|categorical)] [--camera=(single|stereo)] [--meta=<key:value> ...] [--myconfig=<filename>]
manage.py (train) [--tubs=tubs] (--model=<model>) [--type=(linear|inferred|tensorrt_linear|tflit... | 41.790997 | 182 | 0.632107 |
7fc169d36a47a2dd552c70de9f185cf3d82e6d87 | 3,646 | py | Python | opentracing_instrumentation/client_hooks/celery.py | wyattanderson/opentracing-python-instrumentation | 5ac66b5c9537b16b422d7504871ebd2f76e46fbb | [
"MIT"
] | 176 | 2016-03-18T00:47:07.000Z | 2022-03-03T09:16:04.000Z | opentracing_instrumentation/client_hooks/celery.py | wyattanderson/opentracing-python-instrumentation | 5ac66b5c9537b16b422d7504871ebd2f76e46fbb | [
"MIT"
] | 108 | 2016-02-04T15:37:24.000Z | 2022-02-07T17:42:49.000Z | opentracing_instrumentation/client_hooks/celery.py | wyattanderson/opentracing-python-instrumentation | 5ac66b5c9537b16b422d7504871ebd2f76e46fbb | [
"MIT"
] | 63 | 2016-01-20T20:17:31.000Z | 2022-02-23T06:43:00.000Z | from __future__ import absolute_import
import opentracing
from opentracing.ext import tags
from ..request_context import get_current_span, span_in_context
from ._patcher import Patcher
try:
from celery.app.task import Task
from celery.signals import (
before_task_publish, task_prerun, task_success, ... | 31.982456 | 79 | 0.706528 |
903404144f72889c83f6b4089e79b01c222461c8 | 833 | py | Python | linkysets/common/mixins.py | hqrrylyu/linkysets | 1b8c319820bdf116a5cad7efff69178e739cf26b | [
"MIT"
] | null | null | null | linkysets/common/mixins.py | hqrrylyu/linkysets | 1b8c319820bdf116a5cad7efff69178e739cf26b | [
"MIT"
] | 5 | 2021-04-08T19:20:07.000Z | 2021-09-22T19:03:30.000Z | linkysets/common/mixins.py | hqrrylyu/polemicflow | 1b8c319820bdf116a5cad7efff69178e739cf26b | [
"MIT"
] | null | null | null | from typing import Any, ClassVar, Dict, Sequence
from django.db.models import Model
from django.http import HttpRequest
class ObjectPermissionMixin:
request: HttpRequest
object: Model
perms: ClassVar[Sequence[str]] = ["view", "add", "change", "delete"]
def get_context_data(self, **kwargs) -> Dict[s... | 32.038462 | 88 | 0.659064 |
4fe473ecf2be612d95f7d7cf79b40aba5691388c | 2,433 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_scheduled_messages.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_scheduled_messages.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/messages/get_scheduled_messages.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.192308 | 103 | 0.614468 |
e0ca31e4a045d542f5b977549fbd03429dc1ba32 | 1,082 | py | Python | error_correction/log.py | BoiseState/NAM | ba47a02487555ee2d6340900b9b4a1dbe14d88fd | [
"MIT"
] | 1 | 2021-04-08T14:41:51.000Z | 2021-04-08T14:41:51.000Z | error_correction/log.py | gmortuza/dnam | 816b5d7e4d1adfd95a56f6494a12856f08a38bee | [
"MIT"
] | null | null | null | error_correction/log.py | gmortuza/dnam | 816b5d7e4d1adfd95a56f6494a12856f08a38bee | [
"MIT"
] | 1 | 2022-02-06T22:32:48.000Z | 2022-02-06T22:32:48.000Z | import logging
import sys
def get_logger(verbose=0, logger_name=__name__):
"""
Format the logger to show the debug information
:param: verbose: 0 -> Print only error. This is the default.
1 -> Print debug, information, warning and error
2 -> Print information, war... | 32.787879 | 88 | 0.656192 |
9197e7ff8bf5eaa7d0276f80f2bf77fad7ada844 | 6,136 | py | Python | motion_compensation_loss_func/compensation_loss.py | Hazeliii/E-GMA-master | 8ed41079bfaf2834a0df991739699ec80704f1b6 | [
"MIT"
] | null | null | null | motion_compensation_loss_func/compensation_loss.py | Hazeliii/E-GMA-master | 8ed41079bfaf2834a0df991739699ec80704f1b6 | [
"MIT"
] | null | null | null | motion_compensation_loss_func/compensation_loss.py | Hazeliii/E-GMA-master | 8ed41079bfaf2834a0df991739699ec80704f1b6 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from motion_compensation_loss_func.warp_and_gen_IWE import *
import numpy as np
'''
基于运动补偿的损失函数,包括
1.Squared average timestamp images objective (Zhu et al, Unsupervised Event-based
Learning of Optical Flow, Depth, and Egomotion, CVPR19)
2.sobel_based_loss
3.Stoffreg... | 39.333333 | 120 | 0.621252 |
706f7f11dc754ed9c368c81c899f0fab4314fdc9 | 395 | py | Python | traveling/asgi.py | julesc00/travel-agency | 61c92087bc50ef4dbdb5e46636b2802e3a94bc0c | [
"MIT"
] | null | null | null | traveling/asgi.py | julesc00/travel-agency | 61c92087bc50ef4dbdb5e46636b2802e3a94bc0c | [
"MIT"
] | null | null | null | traveling/asgi.py | julesc00/travel-agency | 61c92087bc50ef4dbdb5e46636b2802e3a94bc0c | [
"MIT"
] | null | null | null | """
ASGI config for traveling project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SET... | 23.235294 | 78 | 0.787342 |
1b69c96011689c37b4f5199f9ceaaf6bc8c0fec8 | 890 | py | Python | scripts/check_python.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | 1 | 2021-02-28T18:59:16.000Z | 2021-02-28T18:59:16.000Z | scripts/check_python.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | 12 | 2020-07-24T23:55:19.000Z | 2021-12-19T11:40:06.000Z | scripts/check_python.py | lesperry/Metagenomics | a1d8b7d96b32ab83cebe513e889b6ef82f7c1dd6 | [
"CC-BY-3.0"
] | null | null | null | """
If the current installed Python version is not supported, prints an error
message to stderr and returns 1
"""
from __future__ import print_function
import sys
def check_python():
if sys.version_info[:2] >= (3, 5):
# supported
return
else:
version_string = '.'.join(str(_) for _ in ... | 27.8125 | 80 | 0.686517 |
671aafc37e8dbdcc1b0158417ec6c2c264118234 | 797 | py | Python | pages/remotepython.py | przor3n/selenium_automation | 88b43ea40936cf4eee8370e53dae8bfec9a8b19e | [
"MIT"
] | null | null | null | pages/remotepython.py | przor3n/selenium_automation | 88b43ea40936cf4eee8370e53dae8bfec9a8b19e | [
"MIT"
] | null | null | null | pages/remotepython.py | przor3n/selenium_automation | 88b43ea40936cf4eee8370e53dae8bfec9a8b19e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from selenium.webdriver.common.by import By
from codelib.automation_testing.selenium_automation.selenium_automation.pages.base import \
BasePage
from codelib.automation_testing.selenium_automation.selenium_automation.timeunits import \
five
__all__ = []
url = "ht... | 24.151515 | 91 | 0.673777 |
cdc5278eee43070bc3afaebe52c0e0c5f8c91509 | 8,512 | py | Python | batteries/Li2o2_Data_Processing.py | coresresearch/data-analysis | d13c677fcda5950c4939c11dbef335591243b94a | [
"BSD-3-Clause"
] | null | null | null | batteries/Li2o2_Data_Processing.py | coresresearch/data-analysis | d13c677fcda5950c4939c11dbef335591243b94a | [
"BSD-3-Clause"
] | null | null | null | batteries/Li2o2_Data_Processing.py | coresresearch/data-analysis | d13c677fcda5950c4939c11dbef335591243b94a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T14:16:10.000Z | 2020-08-04T14:16:10.000Z | import pandas as pd
import numpy as np
import io
import matplotlib.pyplot as plt
import os
"===================== USER INPUTS ============================="
#Reference https://www.fuelcellstore.com/avcarb-mgl190
carb_area=(9**2)*np.pi #in mm^2
carb_v = carb_area*0.19 #in mm^3
carb_den = 0.44*.001 #in g/mm^3
porosi... | 31.065693 | 184 | 0.636043 |
ca7992412472181799f3ebfca2ebb37517eaf42f | 30,985 | py | Python | charmhelpers/contrib/database/mysql.py | AurelienLourot/charm-helpers | b5725ac546372e7d4004d15095f79cdd5e7da687 | [
"Apache-2.0"
] | 15 | 2017-09-20T13:37:10.000Z | 2021-11-03T13:31:15.000Z | charmhelpers/contrib/database/mysql.py | AurelienLourot/charm-helpers | b5725ac546372e7d4004d15095f79cdd5e7da687 | [
"Apache-2.0"
] | 313 | 2017-09-15T13:22:58.000Z | 2022-02-25T17:55:01.000Z | charmhelpers/contrib/database/mysql.py | AurelienLourot/charm-helpers | b5725ac546372e7d4004d15095f79cdd5e7da687 | [
"Apache-2.0"
] | 136 | 2017-09-19T13:37:33.000Z | 2022-03-29T11:08:00.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the L... | 36.843044 | 96 | 0.588543 |
7e8b0020aece55ef3a75795fd7da8b4ee6c32f4d | 8,274 | py | Python | ggshield/scan/scannable.py | boblefrag/gg-shield | 8eef8e02596ca05b9250482d9ea5cafd4435cfa0 | [
"MIT"
] | null | null | null | ggshield/scan/scannable.py | boblefrag/gg-shield | 8eef8e02596ca05b9250482d9ea5cafd4435cfa0 | [
"MIT"
] | null | null | null | ggshield/scan/scannable.py | boblefrag/gg-shield | 8eef8e02596ca05b9250482d9ea5cafd4435cfa0 | [
"MIT"
] | null | null | null | import concurrent.futures
import os
import re
from typing import Any, Dict, Iterable, List, NamedTuple, Optional, Set
import click
from pygitguardian import GGClient
from pygitguardian.config import MULTI_DOCUMENT_LIMIT
from pygitguardian.models import ScanResult
from ggshield.config import CPU_COUNT, MAX_FILE_SIZE, ... | 31.460076 | 85 | 0.58424 |
701d963d5d5416e4c65f89bf3515e3da33834a6c | 130 | py | Python | people/urls.py | brapastor/pygeographic | 3b1522b62bf06430dca007d64a5b71243fdb71f0 | [
"MIT"
] | null | null | null | people/urls.py | brapastor/pygeographic | 3b1522b62bf06430dca007d64a5b71243fdb71f0 | [
"MIT"
] | null | null | null | people/urls.py | brapastor/pygeographic | 3b1522b62bf06430dca007d64a5b71243fdb71f0 | [
"MIT"
] | null | null | null | from django.urls import path, include
from .views import register
urlpatterns = [
path("register/", register, name="tags"),
]
| 21.666667 | 45 | 0.715385 |
47e5def130cd5177d50c437f1e4bb0b62f7382f6 | 8,628 | py | Python | bin/performance_lineage_excel.py | fanninpm/mad_river_wf | 1f796aa98005f9b5607aa746f445fcef51eb85e5 | [
"Apache-2.0"
] | null | null | null | bin/performance_lineage_excel.py | fanninpm/mad_river_wf | 1f796aa98005f9b5607aa746f445fcef51eb85e5 | [
"Apache-2.0"
] | null | null | null | bin/performance_lineage_excel.py | fanninpm/mad_river_wf | 1f796aa98005f9b5607aa746f445fcef51eb85e5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import csv
import json
import sys
import xml.etree.ElementTree as ET
from dataclasses import dataclass
from datetime import datetime
from statistics import mean
from openpyxl import Workbook
if sys.version_info.major < 3 or (sys.version_info.major == 3 and sys.version_info.minor < 8):
pri... | 47.406593 | 227 | 0.683936 |
5ac187244340cb421f67cf137ffd340317812aba | 8,012 | py | Python | tests/test_miner.py | Andolab/miNER | 4871fce8907a554734e0e70aea33e2adf03c0ce1 | [
"MIT"
] | 3 | 2019-04-06T03:14:01.000Z | 2020-12-14T09:29:58.000Z | tests/test_miner.py | Andolab/miNER | 4871fce8907a554734e0e70aea33e2adf03c0ce1 | [
"MIT"
] | 1 | 2019-01-25T07:52:22.000Z | 2019-03-29T14:38:06.000Z | tests/test_miner.py | Andolab/miNER | 4871fce8907a554734e0e70aea33e2adf03c0ce1 | [
"MIT"
] | 1 | 2019-01-25T08:07:35.000Z | 2019-01-25T08:07:35.000Z | import unittest
from miner import Miner
class TestMiner(unittest.TestCase):
def setUp(self):
# 花子さんは東京に行きました(IOB2)
# 山田太郎くんは東京駅に向かいました(IOB2)
# 花子さんとボブくんは東京スカイツリーに行きました(BIOES)
self.answers = [
"B-PSN O O B-LOC O O O O".split(" "),
"B-PSN I-PSN O O B-LOC I-LO... | 35.767857 | 88 | 0.49688 |
b91c2d7b1be5be20b1f6b186c06230c0b548aab1 | 3,526 | py | Python | main.py | HoangTuan110/Juliet | 153555e97c515318b4ce5a291ec3c7a5d2562bd4 | [
"MIT"
] | 2 | 2021-04-11T01:19:02.000Z | 2021-05-15T19:40:56.000Z | main.py | HoangTuan110/Juliet | 153555e97c515318b4ce5a291ec3c7a5d2562bd4 | [
"MIT"
] | null | null | null | main.py | HoangTuan110/Juliet | 153555e97c515318b4ce5a291ec3c7a5d2562bd4 | [
"MIT"
] | null | null | null | # Import re for Regex support
import re
# List of operators
operator_list = ["+", "-", "*", "/", "^"]
# Operators for integer
class IntOperator:
def Plus(first, second):
print(int(first) + int(second))
def Minus(first, second):
print(int(first) - int(second))
def Multiply(first, second):... | 33.580952 | 64 | 0.50709 |
52ceb5b4551b0321c513bb56fe0dd2efe127860e | 4,962 | py | Python | cds_ils/importer/api.py | Pineirin/cds-ils | a31911584e908a22990e7b60caa54c2b64578a7b | [
"MIT"
] | null | null | null | cds_ils/importer/api.py | Pineirin/cds-ils | a31911584e908a22990e7b60caa54c2b64578a7b | [
"MIT"
] | null | null | null | cds_ils/importer/api.py | Pineirin/cds-ils | a31911584e908a22990e7b60caa54c2b64578a7b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# CDS-ILS is free software; you can redistribute it and/or modify it under
# the terms of the MIT License; see LICENSE file for more details.
"""CDS-ILS Importer API module."""
import uuid
from flask import current_app
from invenio_app_ils.errors import IlsValid... | 37.308271 | 78 | 0.61185 |
f7faee6cb336c35495e1fcc4fe3a7778899c6353 | 1,090 | py | Python | run.py | Licht-T/Ant-Cuda | 048d99bce4e018cabe2e51853e5fc22dfa476235 | [
"MIT"
] | null | null | null | run.py | Licht-T/Ant-Cuda | 048d99bce4e018cabe2e51853e5fc22dfa476235 | [
"MIT"
] | null | null | null | run.py | Licht-T/Ant-Cuda | 048d99bce4e018cabe2e51853e5fc22dfa476235 | [
"MIT"
] | 2 | 2020-07-24T14:05:49.000Z | 2021-02-03T08:11:31.000Z | import os
import subprocess
import argparse
MAKE_CMD = 'make'
FLAG_WIN = False
ARG_PARSER = argparse.ArgumentParser(
description=(
'A foraging ants multi-agent simulation software.\n'
'The result is output into subdirectories.'
)
)
ARG_PARSER.add_argument(
'--angle', type=int, required=Tr... | 24.222222 | 66 | 0.670642 |
453bdca8067b28fbe6efea04603c1e697d0188ea | 970 | py | Python | gitman/models/group.py | sergey-shuyskiy/gitman | 97fe08f7c1e4637524cedd29ae62903a442e2094 | [
"MIT"
] | null | null | null | gitman/models/group.py | sergey-shuyskiy/gitman | 97fe08f7c1e4637524cedd29ae62903a442e2094 | [
"MIT"
] | null | null | null | gitman/models/group.py | sergey-shuyskiy/gitman | 97fe08f7c1e4637524cedd29ae62903a442e2094 | [
"MIT"
] | null | null | null | import logging
import yorm
from yorm.types import AttributeDictionary, List, String
from .. import exceptions
log = logging.getLogger(__name__)
@yorm.attr(name=String)
@yorm.attr(members=List.of_type(String))
class Group(AttributeDictionary):
"""A group with sources."""
def __init__(self, name, members):... | 22.55814 | 68 | 0.605155 |
ef20ae3bd224fb99f21ad1c9240d1f4a4cc1177a | 1,878 | py | Python | optuna/integration/pytorch_lightning.py | jeffzi/optuna | 133e9d678723ad9e5183789f9271b7f96db32322 | [
"MIT"
] | 1 | 2020-12-29T07:38:45.000Z | 2020-12-29T07:38:45.000Z | optuna/integration/pytorch_lightning.py | jeffzi/optuna | 133e9d678723ad9e5183789f9271b7f96db32322 | [
"MIT"
] | 1 | 2021-06-25T15:45:42.000Z | 2021-06-25T15:45:42.000Z | optuna/integration/pytorch_lightning.py | jeffzi/optuna | 133e9d678723ad9e5183789f9271b7f96db32322 | [
"MIT"
] | 1 | 2020-12-25T03:27:09.000Z | 2020-12-25T03:27:09.000Z | import optuna
with optuna._imports.try_import() as _imports:
from pytorch_lightning import LightningModule
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import EarlyStopping
if not _imports.is_successful():
EarlyStopping = object # NOQA
LightningModule = object # NOQA
... | 35.433962 | 99 | 0.688498 |
9d7806b9cf15429573f61700872dd98738c319bd | 24,829 | py | Python | test/KBaseReport_server_test.py | msneddon/KBaseReport | b8bb470a4c88d65230e525db48d6a3730069185d | [
"MIT"
] | null | null | null | test/KBaseReport_server_test.py | msneddon/KBaseReport | b8bb470a4c88d65230e525db48d6a3730069185d | [
"MIT"
] | 15 | 2017-03-10T21:15:44.000Z | 2021-07-08T21:43:56.000Z | test/KBaseReport_server_test.py | msneddon/KBaseReport | b8bb470a4c88d65230e525db48d6a3730069185d | [
"MIT"
] | 9 | 2017-01-20T18:27:06.000Z | 2021-01-05T17:52:38.000Z | # -*- coding: utf-8 -*-
import os
import shutil
import time
import unittest
from configparser import ConfigParser # py3
from uuid import uuid4
from template.util import TemplateException
from KBaseReport.KBaseReportImpl import KBaseReport
from KBaseReport.KBaseReportServer import MethodContext
from KBaseReport.authcl... | 38.434985 | 99 | 0.535865 |
53934589cf06e182febe49d6229252055682c620 | 8,060 | py | Python | translations/management/commands/synctranslations.py | urm8/django-translations | e8f66710af9433044937b75c061e1988add398a5 | [
"BSD-3-Clause"
] | 100 | 2018-11-20T19:30:49.000Z | 2022-03-10T07:46:27.000Z | translations/management/commands/synctranslations.py | urm8/django-translations | e8f66710af9433044937b75c061e1988add398a5 | [
"BSD-3-Clause"
] | 30 | 2018-11-27T19:53:53.000Z | 2022-02-04T14:56:52.000Z | translations/management/commands/synctranslations.py | urm8/django-translations | e8f66710af9433044937b75c061e1988add398a5 | [
"BSD-3-Clause"
] | 25 | 2019-05-30T13:41:47.000Z | 2022-03-25T04:28:17.000Z | """
This module contains the synctranslations command for the Translations app.
"""
import sys
from django.core.management.base import (
BaseCommand, CommandError,
)
from django.apps import apps
from django.db.models import Q
from django.contrib.contenttypes.models import ContentType
from translations.models imp... | 35.982143 | 79 | 0.522457 |
5bbbf43ccb757346cbf3f33989cd35c237861c2e | 1,585 | py | Python | elevator.py | coodoing/gistsnippets | 346dbd9d14a81e56b21a2a98531520a3c777ed49 | [
"Apache-2.0"
] | 1 | 2019-07-31T05:20:37.000Z | 2019-07-31T05:20:37.000Z | elevator.py | coodoing/gistsnippets | 346dbd9d14a81e56b21a2a98531520a3c777ed49 | [
"Apache-2.0"
] | null | null | null | elevator.py | coodoing/gistsnippets | 346dbd9d14a81e56b21a2a98531520a3c777ed49 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
import sys
# pep8 & google python style
class Node(object):
def __init__(self, idx, value):
self.left = None
self.right = None
self.parent = None
self.idx = idx
self.value = value
self.path = [self.idx] # [].append(self.idx)
pass
... | 26.864407 | 60 | 0.564669 |
7fa6ef7f6831ca26445c1997031d369823855e31 | 3,282 | py | Python | configs/build.py | marsggbo/CovidNet3D | 0aeca91a775f938a0e568dd88d8162473dacf3ce | [
"MIT"
] | 5 | 2021-02-23T06:43:31.000Z | 2021-07-05T15:24:05.000Z | configs/build.py | etherx-dev/CovidNet3D | b107d7d965cad07f1890ee492857273f3468cc01 | [
"MIT"
] | 1 | 2021-06-08T21:06:10.000Z | 2021-06-08T21:06:10.000Z | configs/build.py | etherx-dev/CovidNet3D | b107d7d965cad07f1890ee492857273f3468cc01 | [
"MIT"
] | 4 | 2021-02-01T03:29:16.000Z | 2021-08-05T09:13:37.000Z | from configs import CN
__all__ = [
'build_config',
'CTConfig',
]
def build_config(cfg, name):
"""
Built the config, defined by `cfg.config.name`.
"""
cfg_dict = {
'ctconfig': CTConfig,
}
if name == '':
return cfg
else:
assert name.lower() in cfg_dict, f"{na... | 33.835052 | 81 | 0.627971 |
74d23d404a6a4636f525a13dfb0c67aa315c2281 | 1,356 | py | Python | civictechprojects/migrations/0012_auto_20180626_1535.py | bhavanapamulaparthi/CivicTechExchange | c01b8ffccea19beda6e59290139d09f477ddad95 | [
"MIT"
] | null | null | null | civictechprojects/migrations/0012_auto_20180626_1535.py | bhavanapamulaparthi/CivicTechExchange | c01b8ffccea19beda6e59290139d09f477ddad95 | [
"MIT"
] | null | null | null | civictechprojects/migrations/0012_auto_20180626_1535.py | bhavanapamulaparthi/CivicTechExchange | c01b8ffccea19beda6e59290139d09f477ddad95 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2018-06-26 15:35
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import taggit.managers
class Migration(migrations.Migration):
dependencies = [
('taggit', '0002_auto_2015... | 38.742857 | 194 | 0.629056 |
b6e3f178d503ff887012acfd252550bd6fb151cf | 19,455 | py | Python | projects/01_fyyur/worked_code/app.py | andreqts/UDACITY-Full-Stack-exercises | 3504f76479de8da999ff3e8b3f02cd3a3689c360 | [
"MIT"
] | null | null | null | projects/01_fyyur/worked_code/app.py | andreqts/UDACITY-Full-Stack-exercises | 3504f76479de8da999ff3e8b3f02cd3a3689c360 | [
"MIT"
] | 34 | 2021-08-19T15:48:26.000Z | 2022-02-24T00:30:19.000Z | projects/01_fyyur/worked_code/app.py | andreqts/UDACITY-Full-Stack-exercises | 3504f76479de8da999ff3e8b3f02cd3a3689c360 | [
"MIT"
] | null | null | null | #----------------------------------------------------------------------------#
# Imports
#----------------------------------------------------------------------------#
import json
import dateutil.parser
import babel
from flask import Flask, render_template, request, Response, flash, redirect, url_for, jsonify, make_re... | 33.313356 | 241 | 0.662092 |
6a0551df63c7a299a491f629520ac1194d4821c3 | 923 | py | Python | invmonInfra/base/parserBase.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | 1 | 2021-09-23T16:19:46.000Z | 2021-09-23T16:19:46.000Z | invmonInfra/base/parserBase.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | 16 | 2021-12-09T06:22:29.000Z | 2022-03-25T06:26:01.000Z | workerInfra/base/parserBase.py | jtom38/newsbot.worker | 6f5d93c474d21542f1af20e3b2537f26e2bcbbc3 | [
"MIT"
] | null | null | null |
from requests import Response, get
from bs4 import BeautifulSoup
class ParserBase():
def getContent(self, uri: str = '') -> Response:
try:
headers = self.getHeaders()
if uri == "":
return get(self.uri, headers=headers)
else:
return get(u... | 34.185185 | 85 | 0.586132 |
433747d35346acf654d7ca9a2f2d362e6a3a0775 | 2,475 | py | Python | pysnmp/Dell-CDB-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/Dell-CDB-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/Dell-CDB-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Dell-CDB-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Dell-CDB-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:40:41 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019,... | 95.192308 | 477 | 0.77899 |
b5006ac73a65a2c6f17d3747b528de5700cc7a3a | 5,895 | py | Python | src/dataflow/core/program_utils.py | luweishuang/task_oriented_dialogue_as_dataflow_synthesis | 5638adfb2274d76ca1c430e6b727cca41f43c195 | [
"MIT"
] | null | null | null | src/dataflow/core/program_utils.py | luweishuang/task_oriented_dialogue_as_dataflow_synthesis | 5638adfb2274d76ca1c430e6b727cca41f43c195 | [
"MIT"
] | null | null | null | src/dataflow/core/program_utils.py | luweishuang/task_oriented_dialogue_as_dataflow_synthesis | 5638adfb2274d76ca1c430e6b727cca41f43c195 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import re
from enum import Enum
from json import dumps
from typing import Any, Dict, Iterable, List, Tuple
from dataflow.core.program import BuildStructOp, CallLikeOp, Expression, ValueOp
# revise args
ROOT_LOCATION = "rootLocation"
OLD_LOCATI... | 29.183168 | 92 | 0.65106 |
2e78bf965a2d0ca7852990907cf9f5fd6781560b | 55 | py | Python | tests/__init__.py | jfsolarte/python_clean_architecture | 56b0c0eff50bc98774a0caee12e3030789476687 | [
"MIT"
] | null | null | null | tests/__init__.py | jfsolarte/python_clean_architecture | 56b0c0eff50bc98774a0caee12e3030789476687 | [
"MIT"
] | null | null | null | tests/__init__.py | jfsolarte/python_clean_architecture | 56b0c0eff50bc98774a0caee12e3030789476687 | [
"MIT"
] | null | null | null | """Unit test package for python_clean_architecture."""
| 27.5 | 54 | 0.781818 |
79c8d3ab4db0e0065016feb12a1b2159f8b66baf | 5,427 | py | Python | colcon_coveragepy_result/task/coveragepy.py | christophebedard/colcon-coveragepy-result | d923559749655d8f6b7ae6feae5808475438aaae | [
"Apache-2.0"
] | 1 | 2020-05-21T22:21:08.000Z | 2020-05-21T22:21:08.000Z | colcon_coveragepy_result/task/coveragepy.py | colcon/colcon-coveragepy-result | d923559749655d8f6b7ae6feae5808475438aaae | [
"Apache-2.0"
] | 9 | 2020-05-11T20:15:53.000Z | 2020-12-19T17:27:40.000Z | colcon_coveragepy_result/task/coveragepy.py | colcon/colcon-coveragepy-result | d923559749655d8f6b7ae6feae5808475438aaae | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Christophe Bedard
# Licensed under the Apache License, Version 2.0
from glob import glob
import os
from pathlib import Path
from shutil import copy2
import subprocess
from colcon_core.logging import colcon_logger
from colcon_core.plugin_system import satisfies_version
from colcon_core.task import Tas... | 36.422819 | 96 | 0.646582 |
7f076e7fc075fb7706e179b43708a7abf7379710 | 22,910 | py | Python | custom_components/awox/awoxmeshlight/__init__.py | fsaris/home-assistant-awox | 51256aca1067b4f89d0e7e779fe92c032d631c02 | [
"MIT"
] | 31 | 2020-12-23T14:47:52.000Z | 2022-01-28T20:40:21.000Z | custom_components/awox/awoxmeshlight/__init__.py | fsaris/home-assistant-awox | 51256aca1067b4f89d0e7e779fe92c032d631c02 | [
"MIT"
] | 39 | 2020-12-29T15:50:05.000Z | 2022-03-14T22:20:23.000Z | custom_components/awox/awoxmeshlight/__init__.py | fsaris/home-assistant-awox | 51256aca1067b4f89d0e7e779fe92c032d631c02 | [
"MIT"
] | 9 | 2021-01-09T16:23:41.000Z | 2021-08-19T19:58:42.000Z | from __future__ import unicode_literals
from . import packetutils as pckt
from os import urandom
from bluepy import btle
import logging
import struct
import time
# Commands :
#: Set mesh groups.
#: Data : 3 bytes
C_MESH_GROUP = 0xd7
#: Set the mesh id. The light will still answer to the 0 mesh id. Calling the
#: c... | 36.022013 | 129 | 0.590048 |
48f76556cc035f694352abc7a2b1bdf11ef14d18 | 766 | py | Python | scte/Scte35/DTMFDescriptor.py | jamesfining/scte | ad0eba0d9354bcc9f9d4858ef5fb385fc01c35c4 | [
"Apache-2.0"
] | 9 | 2019-05-04T02:03:18.000Z | 2021-02-25T01:30:12.000Z | scte/Scte35/DTMFDescriptor.py | jamesfining/scte | ad0eba0d9354bcc9f9d4858ef5fb385fc01c35c4 | [
"Apache-2.0"
] | 3 | 2019-05-14T17:23:05.000Z | 2020-10-12T15:42:36.000Z | scte/Scte35/DTMFDescriptor.py | jamesfining/scte | ad0eba0d9354bcc9f9d4858ef5fb385fc01c35c4 | [
"Apache-2.0"
] | 7 | 2018-11-05T19:46:43.000Z | 2020-07-26T01:38:59.000Z | from scte.Scte35 import scte35_enums
import logging
class DTMFDescriptor:
def __init__(self, bitarray_data, logger=None):
if logger is not None:
self._log = logger
else:
self._log = logging.getLogger()
new_descriptor = {}
new_descriptor["preroll"] = bitarray... | 33.304348 | 81 | 0.626632 |
f95a163a8785ee9fbdcd8e2ccff346567b7c3d86 | 1,506 | py | Python | src/nitpick/style/fetchers/http.py | mjpieters/nitpick | 610a884a36e45fc67df5b3c87a8569c3c2f7fd38 | [
"MIT"
] | null | null | null | src/nitpick/style/fetchers/http.py | mjpieters/nitpick | 610a884a36e45fc67df5b3c87a8569c3c2f7fd38 | [
"MIT"
] | null | null | null | src/nitpick/style/fetchers/http.py | mjpieters/nitpick | 610a884a36e45fc67df5b3c87a8569c3c2f7fd38 | [
"MIT"
] | null | null | null | """Base HTTP fetcher, other fetchers can inherit from this to wrap http errors."""
from __future__ import annotations
from dataclasses import dataclass
import click
import requests
from loguru import logger
from nitpick.enums import OptionEnum
from nitpick.style.fetchers import Scheme
from nitpick.style.fetchers.bas... | 33.466667 | 114 | 0.646746 |
2c6e98bf9669d716e23a61416a4165cb16f3a7be | 3,852 | py | Python | src/bloombox/schema/products/Flower_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 4 | 2018-01-23T20:13:11.000Z | 2018-07-28T22:36:09.000Z | src/bloombox/schema/products/Flower_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 159 | 2018-02-02T09:55:52.000Z | 2021-07-21T23:41:59.000Z | src/bloombox/schema/products/Flower_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:13:15.000Z | 2020-01-17T01:07:53.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: products/Flower.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection a... | 41.419355 | 534 | 0.786085 |
5c6b5f4af71c3246580e1fa7c203d200d3b0e517 | 20,670 | py | Python | graalpython/lib-python/3/distutils/sysconfig.py | transposit/graalpython | adadf5f211cc67a14bb3aca7c61219513d036b13 | [
"UPL-1.0",
"Apache-2.0",
"OpenSSL"
] | 1 | 2019-05-28T13:04:32.000Z | 2019-05-28T13:04:32.000Z | graalpython/lib-python/3/distutils/sysconfig.py | transposit/graalpython | adadf5f211cc67a14bb3aca7c61219513d036b13 | [
"UPL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | graalpython/lib-python/3/distutils/sysconfig.py | transposit/graalpython | adadf5f211cc67a14bb3aca7c61219513d036b13 | [
"UPL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | """Provide access to Python's configuration information. The specific
configuration variables available depend heavily on the platform and
configuration. The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys(). Additional convenience functions are a... | 37.109515 | 94 | 0.599952 |
c3c8cc78d84d0bd7e48bd08341cd0e21f60bf958 | 468 | py | Python | website/migrations/0030_pocket_created.py | CrowdcoinSA/crowdcoin-platform | 72d48d4a7ac4abe7d02e3f369ca62a29c402c9d9 | [
"MIT"
] | null | null | null | website/migrations/0030_pocket_created.py | CrowdcoinSA/crowdcoin-platform | 72d48d4a7ac4abe7d02e3f369ca62a29c402c9d9 | [
"MIT"
] | 7 | 2020-02-12T00:10:22.000Z | 2022-01-13T00:43:13.000Z | website/migrations/0030_pocket_created.py | CrowdcoinSA/crowdcoin-platform | 72d48d4a7ac4abe7d02e3f369ca62a29c402c9d9 | [
"MIT"
] | 1 | 2020-10-05T12:20:19.000Z | 2020-10-05T12:20:19.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-01-17 15:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('website', '0029_auto_20170117_1627'),
]
operations = [
migrations.AddField(
... | 22.285714 | 69 | 0.623932 |
ca8eb04a26164a4f2f6cba2676a10f2468f7cedc | 3,022 | py | Python | utils.py | pedbrgs/Tuning-Darknet | 8be14cc2ae2e8a5ec8a3cf97bd53f186d56acfd9 | [
"MIT"
] | 1 | 2021-11-01T02:37:22.000Z | 2021-11-01T02:37:22.000Z | utils.py | pedbrgs/Tuning-Darknet | 8be14cc2ae2e8a5ec8a3cf97bd53f186d56acfd9 | [
"MIT"
] | null | null | null | utils.py | pedbrgs/Tuning-Darknet | 8be14cc2ae2e8a5ec8a3cf97bd53f186d56acfd9 | [
"MIT"
] | null | null | null | import subprocess
def evaluate(cfg, data):
# Running evaluation algorithm and saving to temporary file
f = open('temp.txt', mode = 'w+')
filename = cfg.split('.')[0]
# Performing the evaluation
command = './darknet detector map ' + data + ' ' + cfg + ' weights/' + filename + '_best.weights'
s... | 33.955056 | 101 | 0.585705 |
30bf99a9432bfe8414c21ac42efe58c5f807b4f4 | 2,832 | py | Python | donkeycar/tests/test_util_data.py | bauchter-work/donkeycar | 5b7c303e964e930fb02110c391f8ddba23002263 | [
"MIT"
] | null | null | null | donkeycar/tests/test_util_data.py | bauchter-work/donkeycar | 5b7c303e964e930fb02110c391f8ddba23002263 | [
"MIT"
] | null | null | null | donkeycar/tests/test_util_data.py | bauchter-work/donkeycar | 5b7c303e964e930fb02110c391f8ddba23002263 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 25 14:17:59 2017
@author: wroscoe
"""
import unittest
import pytest
from donkeycar.utils import *
def create_lbin(marker_index):
""" Create a linear binary array with value set """
l = [0] * 15
l[marker_index] = 1
return l
clas... | 24.413793 | 77 | 0.520127 |
8ebd7175dcee50bb550295605b5a216a9136fb79 | 3,172 | py | Python | ermaket/utils/xml/xmltuple.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | ermaket/utils/xml/xmltuple.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | ermaket/utils/xml/xmltuple.py | SqrtMinusOne/ERMaket_Experiment | c4a7b61651edd15a619d9b690e2aaeaab4de282d | [
"Apache-2.0"
] | null | null | null | from magic_repr import make_repr
from .xml_object import XMLObject, ConvertableXML
__all__ = ['xmltuple', 'make_to_xml']
class TextTag:
@classmethod
def from_xml(cls, tag):
return tag.text
def make_to_xml(tag_name, attributes, kws=None):
if kws is None:
kws = []
def to_xml(self):
... | 27.344828 | 76 | 0.586381 |
8b4858c7399ebf0ed7b81d5e750033bef016ba97 | 1,285 | py | Python | scyllaso/bin/make_cpu_config.py | xemul/scylla-stress-orchestrator | f0f142d93966db9ef6fde38992dd93c5a6b32e31 | [
"Apache-2.0"
] | 3 | 2021-04-06T16:06:41.000Z | 2021-10-05T09:53:11.000Z | scyllaso/bin/make_cpu_config.py | xemul/scylla-stress-orchestrator | f0f142d93966db9ef6fde38992dd93c5a6b32e31 | [
"Apache-2.0"
] | 32 | 2021-04-19T08:01:27.000Z | 2021-12-08T12:38:44.000Z | scyllaso/bin/make_cpu_config.py | xemul/scylla-stress-orchestrator | f0f142d93966db9ef6fde38992dd93c5a6b32e31 | [
"Apache-2.0"
] | 5 | 2021-05-18T18:12:38.000Z | 2021-12-29T08:36:43.000Z | import argparse
def cli():
parser = argparse.ArgumentParser()
parser.add_argument("nr_cpus", help="Number of cpus", nargs=1)
parser.add_argument("cpus", help="The cpus", nargs='*')
args = parser.parse_args()
nr_cpus = int(args.nr_cpus[0])
cpu_bit_list = []
for i in range(0, nr_cpus):
... | 21.416667 | 66 | 0.540856 |
3a4bd69cae63ea842a8360576bce5d43860e1990 | 18,275 | py | Python | VirtualBox-5.0.0/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py | egraba/vbox_openbsd | 6cb82f2eed1fa697d088cecc91722b55b19713c2 | [
"MIT"
] | 1 | 2015-04-30T14:18:45.000Z | 2015-04-30T14:18:45.000Z | VirtualBox-5.0.0/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py | egraba/vbox_openbsd | 6cb82f2eed1fa697d088cecc91722b55b19713c2 | [
"MIT"
] | null | null | null | VirtualBox-5.0.0/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py | egraba/vbox_openbsd | 6cb82f2eed1fa697d088cecc91722b55b19713c2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# $Id: wuiadmintestbox.py $
"""
Test Manager WUI - TestBox.
"""
__copyright__ = \
"""
Copyright (C) 2012-2015 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and/or m... | 54.87988 | 123 | 0.584186 |
3f75095e43dc49731f2b84482664b37ebd877fe8 | 1,318 | py | Python | pyspider/libs/dataurl.py | zgwcome/pyspider | 1e6375850538d8e04793f5e26b6d92adf8db6a9e | [
"Apache-2.0"
] | 13,935 | 2015-01-01T04:48:55.000Z | 2022-03-30T02:02:42.000Z | pyspider/libs/dataurl.py | zgwcome/pyspider | 1e6375850538d8e04793f5e26b6d92adf8db6a9e | [
"Apache-2.0"
] | 848 | 2015-01-04T14:13:40.000Z | 2022-03-04T02:29:44.000Z | pyspider/libs/dataurl.py | zgwcome/pyspider | 1e6375850538d8e04793f5e26b6d92adf8db6a9e | [
"Apache-2.0"
] | 4,077 | 2015-01-02T03:01:27.000Z | 2022-03-27T12:06:40.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2012-11-16 10:33:20
import six
from base64 import b64encode, b64decode
from . import utils
from six.moves.urllib.parse import quote, unquote
def encode(d... | 23.122807 | 61 | 0.590288 |
850ec44ca6222c34584b9e82485724cd041ac1f0 | 981 | py | Python | PyLCONF/lconf_schema.py | LCONF-Data-Serialization-Format/PyLCONF | 63b7df0092dcf3700604dfe8d5ef3775582891eb | [
"BSD-3-Clause"
] | null | null | null | PyLCONF/lconf_schema.py | LCONF-Data-Serialization-Format/PyLCONF | 63b7df0092dcf3700604dfe8d5ef3775582891eb | [
"BSD-3-Clause"
] | null | null | null | PyLCONF/lconf_schema.py | LCONF-Data-Serialization-Format/PyLCONF | 63b7df0092dcf3700604dfe8d5ef3775582891eb | [
"BSD-3-Clause"
] | null | null | null | """
### PyLCONF.lconf_schema
#### Overview
`validate_one_section_schema`: Validate one LCONF-Schema-Section raw string.
`validate_schemas_from_file`: Validates a LCONF-Schema-File containing one or more LCONF-Schema-Sections.
"""
# ================================================================================... | 27.25 | 119 | 0.633028 |
395d5b48e9a7c27e9a76ca4ebe161f7d8ba4413d | 2,557 | py | Python | tests/enerpiweb/test_remote_download.py | azogue/enerpi | 155374f6c86248a63b141fc5a78d38cbc4b0ca45 | [
"MIT"
] | 5 | 2018-01-27T17:08:36.000Z | 2020-05-24T04:08:39.000Z | tests/enerpiweb/test_remote_download.py | azogue/enerpi | 155374f6c86248a63b141fc5a78d38cbc4b0ca45 | [
"MIT"
] | null | null | null | tests/enerpiweb/test_remote_download.py | azogue/enerpi | 155374f6c86248a63b141fc5a78d38cbc4b0ca45 | [
"MIT"
] | 4 | 2017-12-25T09:47:27.000Z | 2021-06-17T18:14:30.000Z | # -*- coding: utf-8 -*-
"""
Test data downloading from remote running ENERPIWEB
This test needs a proper ENERPI running in another machine in the same network
"""
from tests.conftest import TestCaseEnerpi
TS_GET_START = '2016-11-28'
TS_GET_END = '2016-11-29'
BAD_IP_WITH_NO_ENERPI = '192.168.1.99'
IP_RUNNING_ENERPI... | 39.953125 | 108 | 0.63551 |
1084a6d16dc62955a328351f156411a3408b65c1 | 1,424 | py | Python | backend/trending.py | archanl/thetweetrises | b9ac7b9e9df9c4c36da0812a893b1b793f08c48c | [
"MIT"
] | 1 | 2019-03-02T20:14:07.000Z | 2019-03-02T20:14:07.000Z | backend/trending.py | archanl/thetweetrises | b9ac7b9e9df9c4c36da0812a893b1b793f08c48c | [
"MIT"
] | null | null | null | backend/trending.py | archanl/thetweetrises | b9ac7b9e9df9c4c36da0812a893b1b793f08c48c | [
"MIT"
] | null | null | null | import sys
import redis
import requests
from requests_oauthlib import OAuth1
import json
import dateutil.parser as dp
USA_WOEID = '23424977'
TRENDING_KEY = 'trending_keys'
MAX_TRENDING = 10
def main():
r = redis.Redis('localhost')
oauth = OAuth1('ZZQMKjtL8kewgk4001jF8krqx', # API ... | 28.48 | 97 | 0.620787 |
53c1c4648e475a96e29acf1660277e6c777f5a29 | 187 | py | Python | CHAPTER-1/Python overview - pg 14/1.py | teamzz111/Python-Solutionary | 8b756d088ef1268a94c0e46aa206c52913c96a3b | [
"Unlicense"
] | 1 | 2018-11-03T21:13:20.000Z | 2018-11-03T21:13:20.000Z | CHAPTER-1/Python overview - pg 14/1.py | teamzz111/Python-Solutionary | 8b756d088ef1268a94c0e46aa206c52913c96a3b | [
"Unlicense"
] | null | null | null | CHAPTER-1/Python overview - pg 14/1.py | teamzz111/Python-Solutionary | 8b756d088ef1268a94c0e46aa206c52913c96a3b | [
"Unlicense"
] | null | null | null | # Age avergage with floating points
# Var declarations
# Code
age1 = 10.0
age2 = 11.0
age3 = 13.0
age4 = 9.0
age5 = 12.0
result = (age1+age2+age3+age4+age5)/5.0
# Result
print(result)
| 12.466667 | 39 | 0.679144 |
57767d489e248e353f224ecc76c8f865397910bf | 17,337 | py | Python | intersight/model/niatelemetry_apic_psu_details.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/niatelemetry_apic_psu_details.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/niatelemetry_apic_psu_details.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 53.841615 | 1,678 | 0.634712 |
3bbc4b872843dd4e1e7eeab9e38fd9b656683872 | 1,572 | py | Python | test/test_npu/test_network_ops/test_cudnn_is_acceptable.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_cudnn_is_acceptable.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_cudnn_is_acceptable.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 41.368421 | 92 | 0.707379 |
d967434e5b852e995fa7da7b6a0b38dd6b82245a | 1,491 | py | Python | dist-packages/samba/tdb_util.py | Jianwei-Wang/python2.7_lib | 911b8e81512e5ac5f13e669ab46f7693ed897378 | [
"PSF-2.0"
] | 3 | 2015-10-31T10:39:25.000Z | 2019-04-27T20:19:33.000Z | dist-packages/samba/tdb_util.py | Jianwei-Wang/python2.7_lib | 911b8e81512e5ac5f13e669ab46f7693ed897378 | [
"PSF-2.0"
] | null | null | null | dist-packages/samba/tdb_util.py | Jianwei-Wang/python2.7_lib | 911b8e81512e5ac5f13e669ab46f7693ed897378 | [
"PSF-2.0"
] | null | null | null | # Unix SMB/CIFS implementation.
# tdb util helpers
#
# Copyright (C) Kai Blin <kai@samba.org> 2011
# Copyright (C) Amitay Isaacs <amitay@gmail.com> 2011
# Copyright (C) Andrew Bartlett <abartlet@samba.org> 2013
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Gene... | 35.5 | 79 | 0.701543 |
c8e594a2ef0f78228b6f66906ed176ec66f8d8f0 | 6,913 | py | Python | setup.py | actively-ai/fastcluster | 569c3e38e749ba2f3c3a665a04f5f8e0a71d6d37 | [
"BSD-2-Clause"
] | null | null | null | setup.py | actively-ai/fastcluster | 569c3e38e749ba2f3c3a665a04f5f8e0a71d6d37 | [
"BSD-2-Clause"
] | null | null | null | setup.py | actively-ai/fastcluster | 569c3e38e749ba2f3c3a665a04f5f8e0a71d6d37 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
u'''
fastcluster: Fast hierarchical clustering routines for R and Python
Copyright:
* Until package version 1.1.23: © 2011 Daniel Müllner <http://danifold.net>
* All changes from version 1.1.24 on: © Google Inc. <http://google.com>
'''
import os
import sys
impo... | 51.977444 | 1,143 | 0.70447 |
2f593d3871d62302a8b5515eb2e2c7cb2351bd5b | 708 | py | Python | 00_Original/23_Iteratoren/iteratoren_fibonacci_mehrfach.py | felixdittrich92/Python3_book | cd0e2b55aa72c51927d347b70199fb9ed928e06f | [
"MIT"
] | null | null | null | 00_Original/23_Iteratoren/iteratoren_fibonacci_mehrfach.py | felixdittrich92/Python3_book | cd0e2b55aa72c51927d347b70199fb9ed928e06f | [
"MIT"
] | null | null | null | 00_Original/23_Iteratoren/iteratoren_fibonacci_mehrfach.py | felixdittrich92/Python3_book | cd0e2b55aa72c51927d347b70199fb9ed928e06f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class Fibonacci3:
class FibonacciIterator:
def __init__(self, max_n):
self.MaxN = max_n
self.N, self.A, self.B = 0, 0, 1
def __iter__(self):
return self
def __next__(self):
if self.N < self.MaxN:
... | 23.6 | 56 | 0.502825 |
8694e854e9d18f061aa8893ffbb3ee7e6d966e58 | 104,156 | py | Python | main.py | Psy-Fer/interARTIC | d8e6ef6fa536dd11bfd80230149ad5ac55fe63ce | [
"MIT"
] | 20 | 2021-04-23T13:28:20.000Z | 2022-02-04T08:14:22.000Z | main.py | Psy-Fer/interARTIC | d8e6ef6fa536dd11bfd80230149ad5ac55fe63ce | [
"MIT"
] | 41 | 2021-04-26T05:22:54.000Z | 2022-03-29T05:12:14.000Z | main.py | Psy-Fer/interARTIC | d8e6ef6fa536dd11bfd80230149ad5ac55fe63ce | [
"MIT"
] | 2 | 2021-05-24T10:45:47.000Z | 2021-08-04T13:16:34.000Z | # -*- coding: utf-8 -*-
from flask import Flask, render_template, request, redirect, url_for, json, jsonify, flash
#from src.job import Job
import src.queue as q
import os
import signal
import base64
from celery import Celery
import subprocess
from src.system import System
from celery.utils.log import get_task_logger
i... | 50.487639 | 363 | 0.557155 |
a4f9985ec0212a3727ec3ad8ab5e18e67af8ead2 | 5,216 | py | Python | ros/src/twist_controller/dbw_node.py | stevemg9/CarND-Capstone | 019dd26e480295bfb17aae18339241cfbb7791ea | [
"MIT"
] | null | null | null | ros/src/twist_controller/dbw_node.py | stevemg9/CarND-Capstone | 019dd26e480295bfb17aae18339241cfbb7791ea | [
"MIT"
] | null | null | null | ros/src/twist_controller/dbw_node.py | stevemg9/CarND-Capstone | 019dd26e480295bfb17aae18339241cfbb7791ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import Bool
from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport
from geometry_msgs.msg import TwistStamped
import math
from twist_controller import Controller
'''
You can build this node only after you have built (or partially built) th... | 38.925373 | 101 | 0.655483 |
9e482479728e438d3e544a12a46a14291aafdcce | 13,093 | py | Python | manager/master/eventHandlers.py | Tootooroo/VerManager | 65a37ed4f864c8d6adeade52582315aeff901fbe | [
"MIT"
] | 2 | 2020-03-20T20:04:54.000Z | 2021-03-18T12:03:54.000Z | manager/master/eventHandlers.py | Tootooroo/VerManager | 65a37ed4f864c8d6adeade52582315aeff901fbe | [
"MIT"
] | null | null | null | manager/master/eventHandlers.py | Tootooroo/VerManager | 65a37ed4f864c8d6adeade52582315aeff901fbe | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 Gcom
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish... | 30.952719 | 79 | 0.654014 |
b67a544f4e782b04aa42c28a3cfaf2ac72cf53bf | 3,681 | py | Python | bookmarks/models.py | gradel/django-generic-bookmarks | 98d4c2099c019a6767fccebd96ec726f35fd1414 | [
"MIT"
] | null | null | null | bookmarks/models.py | gradel/django-generic-bookmarks | 98d4c2099c019a6767fccebd96ec726f35fd1414 | [
"MIT"
] | null | null | null | bookmarks/models.py | gradel/django-generic-bookmarks | 98d4c2099c019a6767fccebd96ec726f35fd1414 | [
"MIT"
] | null | null | null | import string
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import fields
from django.contrib.auth.models import User
from bookmarks import managers
class Bookmark(models.Model):
"""
A user's bookmark for a content object.
This ... | 28.984252 | 77 | 0.690845 |
853ec73a724ac39a307be28b80219f46df66b01a | 6,526 | py | Python | src/utils/net.py | rostob/Limnoria | 068488c546612ee0198cecf1a4a46e2667551bcf | [
"BSD-3-Clause"
] | 22 | 2021-09-01T20:51:10.000Z | 2022-03-23T05:51:58.000Z | src/utils/net.py | rostob/Limnoria | 068488c546612ee0198cecf1a4a46e2667551bcf | [
"BSD-3-Clause"
] | 16 | 2021-09-02T08:33:29.000Z | 2022-03-28T18:21:09.000Z | src/utils/net.py | rostob/Limnoria | 068488c546612ee0198cecf1a4a46e2667551bcf | [
"BSD-3-Clause"
] | 9 | 2021-09-02T09:07:53.000Z | 2022-03-28T17:34:59.000Z | ###
# Copyright (c) 2002-2005, Jeremiah Fincher
# Copyright (c) 2011, 2013, James McCoy
# Copyright (c) 2010-2021, Valentin Lorentz
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistri... | 32.63 | 79 | 0.650781 |
3bb68bf441b3d6cc4058c22909eefa48b3900f37 | 5,686 | py | Python | third_party/google-endpoints/google/api/gen/servicecontrol_v1_client.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | third_party/google-endpoints/google/api/gen/servicecontrol_v1_client.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | third_party/google-endpoints/google/api/gen/servicecontrol_v1_client.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 698 | 2015-06-02T19:18:35.000Z | 2022-03-29T16:57:15.000Z | # 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 by applicable law or agree... | 44.421875 | 78 | 0.634013 |
bd332ccb8861638331592776a1f9ee7cdbdf2c1a | 1,710 | py | Python | frappe_notification/handlers/fcm.py | leam-tech/frappe_notification | 79e40f2c541d86d714a0b8d48b87f32b2f85076a | [
"MIT"
] | null | null | null | frappe_notification/handlers/fcm.py | leam-tech/frappe_notification | 79e40f2c541d86d714a0b8d48b87f32b2f85076a | [
"MIT"
] | null | null | null | frappe_notification/handlers/fcm.py | leam-tech/frappe_notification | 79e40f2c541d86d714a0b8d48b87f32b2f85076a | [
"MIT"
] | null | null | null | import frappe
from renovation_core.utils.fcm import _notify_via_fcm
from frappe_notification import NotificationOutbox, NotificationOutboxStatus
def fcm_handler(
*,
# The channel selected, ie Telegram
channel: str,
# The Sender Type, for eg. TelegramBot
sender_type: str,
# The Sender, Telegra... | 30 | 86 | 0.650877 |
ed335b37686e71ab33c8806c933cc9c626764e27 | 1,662 | py | Python | test/test_send_test_email.py | Danilka/APIv3-python-library | c96472f47d652d2e09e8b4a48a80e33fde06e7f1 | [
"MIT"
] | null | null | null | test/test_send_test_email.py | Danilka/APIv3-python-library | c96472f47d652d2e09e8b4a48a80e33fde06e7f1 | [
"MIT"
] | null | null | null | test/test_send_test_email.py | Danilka/APIv3-python-library | c96472f47d652d2e09e8b4a48a80e33fde06e7f1 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SendinBlue API
SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h... | 40.536585 | 820 | 0.672082 |
222bc40f18991f06f0ba69774807bc17db1e0d63 | 148 | py | Python | src/hurnado/app/handler/resource.py | guyuecanhui/hurnado | fc54eed8ebd70768ce6e1f1073e506d365bb5b8d | [
"Apache-2.0"
] | null | null | null | src/hurnado/app/handler/resource.py | guyuecanhui/hurnado | fc54eed8ebd70768ce6e1f1073e506d365bb5b8d | [
"Apache-2.0"
] | null | null | null | src/hurnado/app/handler/resource.py | guyuecanhui/hurnado | fc54eed8ebd70768ce6e1f1073e506d365bb5b8d | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
__author__ = 'cheng.hu'
from base import BaseHandler
class QueryUserHandler(BaseHandler):
def get(self):
print "list"
| 14.8 | 36 | 0.695946 |
3a53b28cf5da8f667494c0ad05501f606779f7b3 | 294 | py | Python | configs/memdpc/r3d_18_kinetics/finetune_ucf101.py | bpiyush/CtP-ssl | 33f325f4f824508ea6391cfbb52d3e17623b7e8f | [
"MIT"
] | 37 | 2021-05-07T05:50:11.000Z | 2022-03-30T03:38:48.000Z | configs/memdpc/r3d_18_kinetics/finetune_ucf101.py | bpiyush/CtP-ssl | 33f325f4f824508ea6391cfbb52d3e17623b7e8f | [
"MIT"
] | 2 | 2021-06-03T10:25:30.000Z | 2021-08-18T09:36:48.000Z | configs/memdpc/r3d_18_kinetics/finetune_ucf101.py | bpiyush/CtP-ssl | 33f325f4f824508ea6391cfbb52d3e17623b7e8f | [
"MIT"
] | 5 | 2021-05-18T02:21:33.000Z | 2022-02-08T06:49:22.000Z | _base_ = ['../../recognizers/_base_/model_r3d18.py',
'../../recognizers/_base_/runtime_ucf101.py']
work_dir = './output/memdpc/r3d_18_kinetics/finetune_ucf101/'
model = dict(
backbone=dict(
pretrained='./output/memdpc/r3d_18_kinetics/pretraining/epoch_90.pth',
),
)
| 26.727273 | 78 | 0.676871 |
97795f8e82c2b2b435c24403e7fd45aff83cc6ab | 576 | py | Python | src/django-nonrel/django/contrib/localflavor/uy/uy_departaments.py | adamjmcgrath/glancydesign | 826ede7c639879d5b79ee730eb5e91422768cb02 | [
"BSD-3-Clause"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | django/contrib/localflavor/uy/uy_departaments.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | django/contrib/localflavor/uy/uy_departaments.py | mradziej/django | 5d38965743a369981c9a738a298f467f854a2919 | [
"BSD-3-Clause"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | # -*- coding: utf-8 -*-
"""A list of Urguayan departaments as `choices` in a formfield."""
DEPARTAMENT_CHOICES = (
('G', u'Artigas'),
('A', u'Canelones'),
('E', u'Cerro Largo'),
('L', u'Colonia'),
('Q', u'Durazno'),
('N', u'Flores'),
('O', u'Florida'),
('P', u'Lavalleja'),
('B', u'M... | 23.04 | 66 | 0.458333 |
b323fd82fc0a9d1ba95a7e04b173594da1a282b0 | 3,119 | py | Python | tests/test_api.py | hyperplan-io/cli | dc7d407701fd78d9065d60c35b0f2674b28c86bb | [
"MIT"
] | 1 | 2019-09-04T02:33:34.000Z | 2019-09-04T02:33:34.000Z | tests/test_api.py | hyperplan-io/cli | dc7d407701fd78d9065d60c35b0f2674b28c86bb | [
"MIT"
] | 1 | 2019-09-16T06:09:42.000Z | 2019-09-16T06:09:42.000Z | tests/test_api.py | hyperplan-io/cli | dc7d407701fd78d9065d60c35b0f2674b28c86bb | [
"MIT"
] | null | null | null | from hyperplan.api import Api
from hyperplan.features_descriptors import *
from hyperplan.labels_descriptors import *
from hyperplan.project import *
from hyperplan.predict import *
class TestWorkingApi:
def setUp(self):
self.api = Api("test_service", "http://localhost:8080", "admin", "admin")
sel... | 58.849057 | 698 | 0.659186 |
5c3000aea61dc4c83fd640f261b96aa861c86c57 | 1,561 | py | Python | Orbit Fitting/fit.py | vighnesh-nagpal/HD_104304 | d89585b341db666e33b2ea505da6dd6f9d68282d | [
"MIT"
] | null | null | null | Orbit Fitting/fit.py | vighnesh-nagpal/HD_104304 | d89585b341db666e33b2ea505da6dd6f9d68282d | [
"MIT"
] | null | null | null | Orbit Fitting/fit.py | vighnesh-nagpal/HD_104304 | d89585b341db666e33b2ea505da6dd6f9d68282d | [
"MIT"
] | null | null | null | import orbitize
from orbitize import read_input, system, priors, sampler,results
import h5py
import os
def main():
#parameters for the system
num_planets=1
data_table = read_input.read_file('../Data/data.csv')
m0 = 1.01
mass_err = 0.05
plx=78.33591471044681
plx_err=0.1
#initialise a system ob... | 26.016667 | 84 | 0.732864 |
fa65121e3ad95c881c3be94f230c274a13970205 | 17,870 | py | Python | astrobot/cogs/moderation.py | astro-devel/astrobot | d0a957731cabed23a7442c8ad4672e7331946e26 | [
"MIT"
] | null | null | null | astrobot/cogs/moderation.py | astro-devel/astrobot | d0a957731cabed23a7442c8ad4672e7331946e26 | [
"MIT"
] | 8 | 2022-01-24T00:14:54.000Z | 2022-03-25T18:19:20.000Z | astrobot/cogs/moderation.py | astro-devel/astrobot | d0a957731cabed23a7442c8ad4672e7331946e26 | [
"MIT"
] | 1 | 2022-01-24T22:37:47.000Z | 2022-01-24T22:37:47.000Z | import re
import time
import datetime
import string
from typing import List, Optional
import discord
import sqlalchemy as sql
from discord.ext import commands
from astrobot import util
from astrobot.checks import invoker_is_lower_rank
from astrobot.user_sys import database as db
class Moderation(commands.Cog):
de... | 38.183761 | 160 | 0.570845 |
0255789e54991da37b083604d997cec027dce107 | 13,032 | py | Python | src/uvm/base/uvm_event.py | rodrigomelo9/uvm-python | e3127eba2cc1519a61dc6f736d862a8dcd6fce20 | [
"Apache-2.0"
] | 140 | 2020-01-18T00:14:17.000Z | 2022-03-29T10:57:24.000Z | src/uvm/base/uvm_event.py | Mohsannaeem/uvm-python | 1b8768a1358d133465ede9cadddae651664b1d53 | [
"Apache-2.0"
] | 24 | 2020-01-18T18:40:58.000Z | 2021-03-25T17:39:07.000Z | src/uvm/base/uvm_event.py | Mohsannaeem/uvm-python | 1b8768a1358d133465ede9cadddae651664b1d53 | [
"Apache-2.0"
] | 34 | 2020-01-18T12:22:59.000Z | 2022-02-11T07:03:11.000Z | #//
#//------------------------------------------------------------------------------
#// Copyright 2007-2010 Mentor Graphics Corporation
#// Copyright 2007-2011 Cadence Design Systems, Inc.
#// Copyright 2010 Synopsys, Inc.
#// Copyright 2014 NVIDIA Corportation
#// Copyright 2019 Tuomas Poikela (tpoikela)
#... | 31.631068 | 94 | 0.589088 |
2e731c3cca38c13756d745fb7d2692ea2b059061 | 2,738 | py | Python | day_16/solution.py | jamsidedown/adventofcode2020 | 2ff6ab6fd10470523e869fe6346cdfebc291d5a4 | [
"MIT"
] | null | null | null | day_16/solution.py | jamsidedown/adventofcode2020 | 2ff6ab6fd10470523e869fe6346cdfebc291d5a4 | [
"MIT"
] | null | null | null | day_16/solution.py | jamsidedown/adventofcode2020 | 2ff6ab6fd10470523e869fe6346cdfebc291d5a4 | [
"MIT"
] | null | null | null | import re
from typing import Dict, List, Tuple
range_pattern = re.compile(r'^([\w\s]+): (\d+)-(\d+) or (\d+)-(\d+)$')
class Range:
def __init__(self, low: int, high: int):
self.low = low
self.high = high
def valid(self, input: int) -> bool:
return self.low <= input <= self.high
cl... | 31.113636 | 101 | 0.577794 |
d862f7c3fa19360c1ad5b4e7abd11181d28cd716 | 4,993 | py | Python | cvpods/solver/optimizer_builder.py | phalanx-hk/cvpods | bd4e5cf944e5514af1716a92f54509d9e359208f | [
"Apache-2.0"
] | 1 | 2020-12-03T15:19:01.000Z | 2020-12-03T15:19:01.000Z | cvpods/solver/optimizer_builder.py | phalanx-hk/cvpods | bd4e5cf944e5514af1716a92f54509d9e359208f | [
"Apache-2.0"
] | null | null | null | cvpods/solver/optimizer_builder.py | phalanx-hk/cvpods | bd4e5cf944e5514af1716a92f54509d9e359208f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) BaseDetection, Inc. and its affiliates. All Rights Reserved
from typing import Any, Dict, List, Set
import torch
from torch import optim
from cvpods.utils.registry import Registry
OPTIMIZER_BUILDER = Registry("Optimizer builder")
NORM_MODULE_TYPES = (
... | 34.434483 | 91 | 0.606249 |
e7ac57f5e122d40d5c3025526eaf5a8b988b71e6 | 163 | py | Python | modules/user.py | SilentFan/EvenThing | b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876 | [
"MIT"
] | null | null | null | modules/user.py | SilentFan/EvenThing | b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876 | [
"MIT"
] | 1 | 2015-10-23T14:43:09.000Z | 2015-10-23T14:43:09.000Z | modules/user.py | SilentFan/EvenThing | b32054a3c9b53d8dfbdc6a808ff9d00d88d1c876 | [
"MIT"
] | null | null | null | __author__ = 'meli'
class User:
name = None
surname = None
def __init__(self, name, surname):
self.name = name
self.surname = surname
| 18.111111 | 38 | 0.601227 |
09883cdf506e5c1e61bc457b808e5b8418a3b13b | 7,514 | py | Python | python/eggroll/core/pair_store/format.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | 1 | 2020-10-23T03:18:54.000Z | 2020-10-23T03:18:54.000Z | python/eggroll/core/pair_store/format.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | python/eggroll/core/pair_store/format.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019 - now, Eggroll 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... | 31.974468 | 101 | 0.633883 |
484bc1d1f0a38b593f7343ab9dd08a656fcd50a9 | 11,932 | py | Python | coinbase/mock.py | EU-institution/coinbase_python | 1e0d5d162cb40c1094775ceb5c267a5bdedf0949 | [
"Unlicense",
"MIT"
] | 53 | 2015-01-05T08:42:17.000Z | 2022-03-01T20:52:41.000Z | coinbase/mock.py | EU-institution/coinbase_python | 1e0d5d162cb40c1094775ceb5c267a5bdedf0949 | [
"Unlicense",
"MIT"
] | 10 | 2015-01-08T04:09:25.000Z | 2021-10-08T21:43:17.000Z | coinbase/mock.py | mhluongo/coinbase_python | 2e29d4fa1c501495b41005bbcc770cb29fba6ad1 | [
"MIT",
"Unlicense"
] | 34 | 2016-09-18T23:18:44.000Z | 2022-02-19T17:31:05.000Z | from collections import namedtuple
import datetime
from decimal import Decimal
import random
import string
from coinbase.models import *
class CoinbaseAccountMock(object):
"""
This class has the same attributes as CoinbaseAccount and mimics its
behavior of Coinbase without actually using Coinbase. Use it... | 34.287356 | 79 | 0.633423 |
6e0562c5f127232d21df9ddaf9d1576d800fc155 | 7,643 | py | Python | Tests/test_Affy.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 3 | 2021-08-17T15:28:41.000Z | 2022-02-12T06:43:22.000Z | Tests/test_Affy.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 32 | 2016-11-21T07:38:21.000Z | 2017-08-16T13:00:03.000Z | Tests/test_Affy.py | rht/biopython | 3a44496d7bd79446266a4951b7d1f64569e4a96d | [
"BSD-3-Clause"
] | 8 | 2016-11-24T18:57:35.000Z | 2022-01-16T08:15:25.000Z | import unittest
import struct
import os
import sys
try:
from numpy import array
import numpy.testing
except ImportError:
from Bio import MissingPythonDependencyError
raise MissingPythonDependencyError(
"Install NumPy if you want to use Bio.Affy.CelFile")
from Bio.Affy import CelFile
def tes... | 39.601036 | 79 | 0.487767 |
63f15fa451a81d06bba004bbd7dd69a88177fa5d | 17,357 | py | Python | wikia/wikia.py | spbonez/DLD-Bot | ed7b9f4f290e741e9080e5bd900d195f20e7b414 | [
"MIT"
] | 1 | 2019-09-01T13:53:20.000Z | 2019-09-01T13:53:20.000Z | wikia/wikia.py | spbonez/DLD-Bot | ed7b9f4f290e741e9080e5bd900d195f20e7b414 | [
"MIT"
] | null | null | null | wikia/wikia.py | spbonez/DLD-Bot | ed7b9f4f290e741e9080e5bd900d195f20e7b414 | [
"MIT"
] | 1 | 2019-01-16T07:08:59.000Z | 2019-01-16T07:08:59.000Z | import requests
import time
import mimetypes
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
from decimal import Decimal
from .exceptions import (
PageError, DisambiguationError, RedirectError, HTTPTimeoutError,
WikiaException, ODD_ERROR_MESSAGE)
from .util import cache, stdout_encode, debug... | 32.142593 | 122 | 0.646195 |
e0348de1fcc9667d1d4d34d19caa4f118b56cd70 | 5,880 | py | Python | sandbox/lib/jumpscale/JumpScale9Lib/clients/gitea/GiteaRepo.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | null | null | null | sandbox/lib/jumpscale/JumpScale9Lib/clients/gitea/GiteaRepo.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 1 | 2018-04-04T12:13:40.000Z | 2018-05-03T07:57:52.000Z | sandbox/lib/jumpscale/JumpScale9Lib/clients/gitea/GiteaRepo.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | null | null | null | from js9 import j
from datetime import datetime
import calendar
JSBASE = j.application.jsbase_get_class()
class GiteaRepo(JSBASE):
def __init__(self, org, name, data):
JSBASE.__init__(self)
self.name = data.name
self.owner = data.owner.login
self.data = data
self.org = or... | 37.21519 | 126 | 0.569048 |
474f0fee9b3b851d35e7fc0d4fbf02b9626dec5c | 45,703 | py | Python | swagger_to/go_server.py | abingham/swagger-to | a1ef9f46561d39809da0e6ab356427a247815d92 | [
"MIT"
] | 38 | 2018-08-06T15:11:10.000Z | 2022-02-13T22:43:00.000Z | swagger_to/go_server.py | abingham/swagger-to | a1ef9f46561d39809da0e6ab356427a247815d92 | [
"MIT"
] | 42 | 2018-08-07T08:25:07.000Z | 2021-11-28T19:32:48.000Z | swagger_to/go_server.py | abingham/swagger-to | a1ef9f46561d39809da0e6ab356427a247815d92 | [
"MIT"
] | 16 | 2019-02-26T12:39:43.000Z | 2022-01-29T06:38:41.000Z | #!/usr/bin/env python3
"""Generate server stubs from Swagger specification in Go."""
# pylint: disable=missing-docstring,too-many-instance-attributes,too-many-locals,too-many-ancestors,too-many-branches
# pylint: disable=too-many-statements, too-many-lines
from typing import MutableMapping, Union, Set, List, Optional... | 35.26466 | 133 | 0.657812 |
26e28d228495c14a07ad5e621cc4dd3c6edecde9 | 3,427 | py | Python | cf/test/test_Maths.py | sadielbartholomew/cf-python | 98541d8e55c703eca9bfba4168fb3d42755267da | [
"MIT"
] | null | null | null | cf/test/test_Maths.py | sadielbartholomew/cf-python | 98541d8e55c703eca9bfba4168fb3d42755267da | [
"MIT"
] | null | null | null | cf/test/test_Maths.py | sadielbartholomew/cf-python | 98541d8e55c703eca9bfba4168fb3d42755267da | [
"MIT"
] | null | null | null | import datetime
import faulthandler
import os
import unittest
import numpy
faulthandler.enable() # to debug seg faults and timeouts
import cf
class MathTest(unittest.TestCase):
filename1 = os.path.join(
os.path.dirname(os.path.abspath(__file__)), "regrid_file1.nc"
)
def test_relative_vorticit... | 30.327434 | 79 | 0.583309 |
d93ecccc7185994bdc387b95945945d1fc70e5a3 | 107 | py | Python | sabrina_test/visualization/visualize.py | charlos1204/sabrina_test | b3d840b9fd2d42c4bd9c0eae4a1c294555171e3a | [
"RSA-MD"
] | null | null | null | sabrina_test/visualization/visualize.py | charlos1204/sabrina_test | b3d840b9fd2d42c4bd9c0eae4a1c294555171e3a | [
"RSA-MD"
] | null | null | null | sabrina_test/visualization/visualize.py | charlos1204/sabrina_test | b3d840b9fd2d42c4bd9c0eae4a1c294555171e3a | [
"RSA-MD"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Visualization
"""
# import project config.py
import sabrina_test.config as cfg
| 15.285714 | 33 | 0.682243 |
8cd4742e183f5d859930112322fee1ecf0fde201 | 1,299 | py | Python | Research/Code-Snippets/LoginUsingFace.py | AuroraStarChain/facial-recognition-temperature | 5250dac393c8c791c24989b5ff745bc9e7580811 | [
"MIT"
] | 34 | 2020-01-27T15:07:25.000Z | 2021-09-25T17:07:37.000Z | doc's/Code-Snippets/LoginUsingFace.py | Moran98/facial-recognition | da4711c5d0fb77d77a5dffb20d85bfa9072f7933 | [
"MIT"
] | 26 | 2020-01-29T12:24:42.000Z | 2022-03-12T00:16:44.000Z | Research/Code-Snippets/LoginUsingFace.py | AuroraStarChain/facial-recognition-temperature | 5250dac393c8c791c24989b5ff745bc9e7580811 | [
"MIT"
] | 7 | 2020-01-27T11:42:11.000Z | 2021-04-05T04:42:22.000Z | import face_recognition
from PIL import Image as img , ImageDraw
image_of_Obama = face_recognition.load_image_file('RegisterPhoto.jpg')
Obama_face_encoding = face_recognition.face_encodings(image_of_Obama)[0]
Known_face_encoding = [
Obama_face_encoding
]
known_face_names = [
"Name of user"
]
Test_image = face... | 28.23913 | 100 | 0.750577 |
f28dac142c7ade5b076585268ef79e6026102ca4 | 2,443 | py | Python | app/core/tests/test_models.py | crocodundee/poll-api-app | dceaddeb4fe579024211ce3ba25ca7ffd6c5226f | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | crocodundee/poll-api-app | dceaddeb4fe579024211ce3ba25ca7ffd6c5226f | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | crocodundee/poll-api-app | dceaddeb4fe579024211ce3ba25ca7ffd6c5226f | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from core.models import Question, Answer, Poll
def sample_user(username='username', password='password'):
"""Create sample user"""
return get_user_model().objects.create_user(
username=username, password=password
)
... | 30.924051 | 69 | 0.621777 |
ef630020da2b1a69b857e6213862ac955421138e | 26,619 | py | Python | radiantkit/plot.py | ggirelli/radiantkit | df3e57dbcda902f4f7b3796e6b8dbbf623ee36b8 | [
"MIT"
] | 2 | 2021-03-03T09:19:25.000Z | 2022-03-23T10:24:47.000Z | radiantkit/plot.py | ggirelli/radiantkit | df3e57dbcda902f4f7b3796e6b8dbbf623ee36b8 | [
"MIT"
] | 122 | 2020-10-05T06:19:09.000Z | 2022-02-04T18:26:20.000Z | radiantkit/plot.py | ggirelli/radiantkit | df3e57dbcda902f4f7b3796e6b8dbbf623ee36b8 | [
"MIT"
] | null | null | null | """
@author: Gabriele Girelli
@contact: gigi.ga90@gmail.com
"""
from collections import defaultdict
import numpy as np # type: ignore
import os
import pandas as pd # type: ignore
import plotly.graph_objects as go # type: ignore
import plotly.express as px # type: ignore
from plotly.subplots import make_subplots #... | 35.730201 | 87 | 0.468838 |
bb5a0bbced63a88b309119f077998e433b5ee44a | 74 | py | Python | plugins/google_cloud_compute/komand_google_cloud_compute/actions/start_instance/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/google_cloud_compute/komand_google_cloud_compute/actions/start_instance/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/google_cloud_compute/komand_google_cloud_compute/actions/start_instance/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
from .action import StartInstance
| 24.666667 | 39 | 0.783784 |
da8c885256571db706a0f035eeeee113e469326b | 1,702 | py | Python | tests/test_completor.py | tokorom/completor.vim | f4994feb7dc0cbb7988fb256a3974f3043ebdbab | [
"MIT"
] | null | null | null | tests/test_completor.py | tokorom/completor.vim | f4994feb7dc0cbb7988fb256a3974f3043ebdbab | [
"MIT"
] | null | null | null | tests/test_completor.py | tokorom/completor.vim | f4994feb7dc0cbb7988fb256a3974f3043ebdbab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import mock
from completor import Completor, load_completer, get
class HelloCompleter(Completor):
filetype = 'hello'
def test_disabled(vim_mod):
com = HelloCompleter()
vim_mod.vars = {'completor_disable_hello': 1}
assert com.disabled
vim_mod.vars = {'completor_disable_he... | 29.859649 | 79 | 0.577556 |
2096307ffa05d31d2fce8c9cf95b33cf029bf541 | 831 | py | Python | downloader/upl.py | andre487/downloader487 | 687c0177019d27990b7b29a2b98af360558e8ca4 | [
"MIT"
] | null | null | null | downloader/upl.py | andre487/downloader487 | 687c0177019d27990b7b29a2b98af360558e8ca4 | [
"MIT"
] | null | null | null | downloader/upl.py | andre487/downloader487 | 687c0177019d27990b7b29a2b98af360558e8ca4 | [
"MIT"
] | null | null | null | import logging
import os
from typing import Optional
import boto3
class Uploader:
def __init__(
self, s3_endpoint: str, s3_region: str, s3_bucket: str,
s3_access: Optional[str], s3_secret: Optional[str],
) -> None:
self._s3_bucket = s3_bucket
self._client = boto3.clie... | 26.806452 | 68 | 0.618532 |
4ac52034aed42750c47693b1690101494efd1c5b | 1,663 | py | Python | examples/example_telegram_monitor.py | cyberjunky/xknx | c708ed6a2ca6449b74c6cea197d658e3399b99d1 | [
"MIT"
] | 1 | 2020-12-09T16:17:49.000Z | 2020-12-09T16:17:49.000Z | examples/example_telegram_monitor.py | cyberjunky/xknx | c708ed6a2ca6449b74c6cea197d658e3399b99d1 | [
"MIT"
] | null | null | null | examples/example_telegram_monitor.py | cyberjunky/xknx | c708ed6a2ca6449b74c6cea197d658e3399b99d1 | [
"MIT"
] | null | null | null | """Example for the telegram monitor callback."""
import asyncio
import getopt
import sys
from xknx import XKNX
from xknx.telegram import AddressFilter
async def telegram_received_cb(telegram):
"""Do something with the received telegram."""
print("Telegram received: {0}".format(telegram))
return True
de... | 28.186441 | 91 | 0.624775 |
a5e7caecdb32bc8cfe2c5a573bea031d16477071 | 52,509 | py | Python | nova/tests/unit/api/openstack/compute/test_server_actions.py | bbc/nova | 655cd30c9fd1753323f725f45581a56f1d17c075 | [
"Apache-2.0"
] | 1 | 2021-06-10T17:08:15.000Z | 2021-06-10T17:08:15.000Z | nova/tests/unit/api/openstack/compute/test_server_actions.py | bbc/nova | 655cd30c9fd1753323f725f45581a56f1d17c075 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/api/openstack/compute/test_server_actions.py | bbc/nova | 655cd30c9fd1753323f725f45581a56f1d17c075 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 40.54749 | 79 | 0.575654 |
531404e79bdbf1f2d5bae127319d47725dea4ed3 | 7,800 | py | Python | docker-gen.py | ZHAJOR/docker-compose-generator | 11dc2f68e8e10f60e82cd0b030025f0db4dd1550 | [
"MIT"
] | 4 | 2017-11-10T09:51:55.000Z | 2021-06-18T15:22:02.000Z | docker-gen.py | ZHAJOR/docker-compose-generator | 11dc2f68e8e10f60e82cd0b030025f0db4dd1550 | [
"MIT"
] | null | null | null | docker-gen.py | ZHAJOR/docker-compose-generator | 11dc2f68e8e10f60e82cd0b030025f0db4dd1550 | [
"MIT"
] | 4 | 2017-11-17T19:45:55.000Z | 2020-03-11T05:52:00.000Z | #!/usr/bin/env python3
# MAINTAINER Pierre-Antoine 'ZHAJOR' Tible <antoinetible@gmail.com>
import argparse
import os.path
"""The list of available images"""
images_available = {'api':
{'laravel': 'zhajor/docker-apache-2.4-php5.6-for-laravel',
'phalcon': 'zhajor/docker... | 35.779817 | 137 | 0.602821 |
226b796ab4a3f08439c4f8efc4e6c951c22c3fbc | 1,711 | py | Python | app/routes.py | thewordisbird/flask-cloud-run | 4cdf00d875cdbcba89872c7c95db1c6840a919eb | [
"MIT"
] | null | null | null | app/routes.py | thewordisbird/flask-cloud-run | 4cdf00d875cdbcba89872c7c95db1c6840a919eb | [
"MIT"
] | 4 | 2020-10-21T19:53:06.000Z | 2021-09-02T13:39:02.000Z | app/routes.py | thewordisbird/flask-cloud-run | 4cdf00d875cdbcba89872c7c95db1c6840a919eb | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template, request, redirect, url_for, \
jsonify
from .forms import SearchForm, ContactInfoForm
from app import firebase
firestore = firebase.firestore()
bp = Blueprint('main', __name__)
@bp.route('/')
@bp.route('/index')
def index():
results = firestore.get_collection("c... | 27.596774 | 75 | 0.639977 |
e01e8e75246e69a98507b26b897eb273799ba81a | 2,152 | py | Python | tests/unit/test_reframed_helpers.py | DD-DeCaF/simulations | dab77166f301c0a12e6fed973147fb4add8a62c4 | [
"Apache-2.0"
] | 1 | 2018-04-30T23:46:34.000Z | 2018-04-30T23:46:34.000Z | tests/unit/test_reframed_helpers.py | DD-DeCaF/model | dab77166f301c0a12e6fed973147fb4add8a62c4 | [
"Apache-2.0"
] | 65 | 2016-12-21T14:05:27.000Z | 2019-07-15T06:50:54.000Z | tests/unit/test_reframed_helpers.py | DD-DeCaF/model | dab77166f301c0a12e6fed973147fb4add8a62c4 | [
"Apache-2.0"
] | 2 | 2019-10-10T14:04:31.000Z | 2019-11-21T09:47:49.000Z | # Copyright 2018 Novo Nordisk Foundation Center for Biosustainability, DTU.
#
# 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 requir... | 37.103448 | 87 | 0.634294 |
196fe5659936586cac6c1379d7f238d21d84340b | 4,240 | py | Python | pybamm/models/submodels/oxygen_diffusion/full_oxygen_diffusion.py | gyouhoc/PyBaMM | 6852e0e518157e6802ce83a2549562e7d0ed4b9f | [
"BSD-3-Clause"
] | null | null | null | pybamm/models/submodels/oxygen_diffusion/full_oxygen_diffusion.py | gyouhoc/PyBaMM | 6852e0e518157e6802ce83a2549562e7d0ed4b9f | [
"BSD-3-Clause"
] | null | null | null | pybamm/models/submodels/oxygen_diffusion/full_oxygen_diffusion.py | gyouhoc/PyBaMM | 6852e0e518157e6802ce83a2549562e7d0ed4b9f | [
"BSD-3-Clause"
] | null | null | null | #
# Class for oxygen diffusion
#
import pybamm
from .base_oxygen_diffusion import BaseModel
def separator_and_positive_only(variable):
"""Return only the separator and positive electrode children
Parameters
----------
variable : :class:`pybamm.Concatenation`
Concatenation of variables in neg... | 33.385827 | 87 | 0.653774 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.