hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62b6706f8430e5a1f0a819675fdef84a4a280c48 | 157,296 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/phonenumberutil.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/phonenumberutil.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/phonenumberutil.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Python phone number parsing and formatting library
If you use this library, and want to be notified about important changes,
please sign up to the libphonenumber mailing list at
https://groups.google.com/forum/#!aboutgroup/libphonenumber-discuss.
NOTE: A lot of methods in this module... | 49.278195 | 132 | 0.680882 |
62b6cb1dc362700b89a089be6a27fe914faad439 | 1,587 | py | Python | semesterpage/migrations/0024_course_uploads.py | JakobGM/WikiLinks | 5743b1d4c3fefa66fcaa4d283436d2a3f0490604 | [
"MIT"
] | 6 | 2017-08-12T09:55:06.000Z | 2019-09-03T08:05:21.000Z | semesterpage/migrations/0024_course_uploads.py | JakobGM/WikiLinks | 5743b1d4c3fefa66fcaa4d283436d2a3f0490604 | [
"MIT"
] | 57 | 2017-08-11T23:05:07.000Z | 2022-03-11T23:32:12.000Z | semesterpage/migrations/0024_course_uploads.py | JakobGM/WikiLinks | 5743b1d4c3fefa66fcaa4d283436d2a3f0490604 | [
"MIT"
] | 1 | 2017-09-27T15:31:15.000Z | 2017-09-27T15:31:15.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-08-15 13:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import semesterpage.models
class Migration(migrations.Migration):
dependencies = [
m... | 44.083333 | 182 | 0.651544 |
62b6e789374fcab6ddada3dac565fd017ba647d2 | 10,284 | py | Python | appengine/monorail/framework/ratelimiter.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/framework/ratelimiter.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/framework/ratelimiter.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Request rate limiting implementation.
This is intented to be used for automatic DDoS protec... | 35.219178 | 80 | 0.690782 |
62b6eff3c79c96a3e437f0284eb0708ee79e3565 | 394 | py | Python | pinax/apps/account/auth_backends.py | peiwei/pinax | 34f95b1df4318655fe9bd90dcda8fe824e0c4117 | [
"MIT"
] | 1 | 2019-02-12T04:45:09.000Z | 2019-02-12T04:45:09.000Z | pinax/apps/account/auth_backends.py | alex/pinax | 37e17ee2e2eb0e387d8809c12e55c20194a7118a | [
"MIT"
] | null | null | null | pinax/apps/account/auth_backends.py | alex/pinax | 37e17ee2e2eb0e387d8809c12e55c20194a7118a | [
"MIT"
] | 1 | 2019-02-12T04:45:40.000Z | 2019-02-12T04:45:40.000Z | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class EmailModelBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
user = User.objects.get(email=email)
if user.check_password(password):
... | 26.266667 | 54 | 0.65736 |
62b71723d20685289e7b770ab3a44f7fa2808514 | 5,199 | py | Python | reveries/common/path_resolver.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | reveries/common/path_resolver.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | reveries/common/path_resolver.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z | from avalon import io, api
import get_publish_files
class PathResolver(object):
def __init__(self, file_path=None):
self.is_publish = False
self.silo_name = ''
self.asset_name = ''
self.subset_name = ''
self.representation_name = ''
self.asset_id = ''
self... | 29.044693 | 72 | 0.593191 |
62b72d20ae4fe91bd9481a6a5360ab4b596ffb12 | 12,414 | py | Python | main/courses/exams/autograder.py | mahkhaled/class2go | b32cb441e8d96c257f70cb61274812ebeed2649d | [
"Apache-2.0"
] | null | null | null | main/courses/exams/autograder.py | mahkhaled/class2go | b32cb441e8d96c257f70cb61274812ebeed2649d | [
"Apache-2.0"
] | null | null | null | main/courses/exams/autograder.py | mahkhaled/class2go | b32cb441e8d96c257f70cb61274812ebeed2649d | [
"Apache-2.0"
] | null | null | null | import re, collections
from xml.dom.minidom import parseString
class AutoGrader():
"""
Autograder for an entire pset here.
Can be use to grade single problems, of course.
"""
__true_default = {'correct':True, 'score':0}
__false_default = {'correct':False, 'score':0}
def __unicode__(self):... | 45.977778 | 158 | 0.611004 |
62b7557010fca424494704cbd0d368f465f17a32 | 2,896 | py | Python | echobot.py | ThomasKlein18/telegram_chatbot | db25cf3bfd939731bea50cf425a42c197e17b8bd | [
"MIT"
] | null | null | null | echobot.py | ThomasKlein18/telegram_chatbot | db25cf3bfd939731bea50cf425a42c197e17b8bd | [
"MIT"
] | null | null | null | echobot.py | ThomasKlein18/telegram_chatbot | db25cf3bfd939731bea50cf425a42c197e17b8bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
adapted from https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/echobot.py
In order to make this work, you will need a Token for your bot which you need to insert in line 45, as well as
a file with the chat data you used to train the model... | 32.539326 | 122 | 0.678522 |
62b77b0193e6009ae928a2cfe33e49e4199f35e3 | 252 | py | Python | wagtailimportexport/apps.py | chosak/wagtail-import-export | 0cb75d70be9ac65f54e4abbb5e20133a61167b40 | [
"BSD-3-Clause"
] | 30 | 2018-05-14T14:39:23.000Z | 2022-03-23T08:10:16.000Z | wagtailimportexport/apps.py | chosak/wagtail-import-export | 0cb75d70be9ac65f54e4abbb5e20133a61167b40 | [
"BSD-3-Clause"
] | 8 | 2018-05-02T11:58:55.000Z | 2021-04-14T16:30:46.000Z | wagtailimportexport/apps.py | chosak/wagtail-import-export | 0cb75d70be9ac65f54e4abbb5e20133a61167b40 | [
"BSD-3-Clause"
] | 17 | 2018-05-02T11:08:15.000Z | 2020-01-30T10:20:11.000Z | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class WagtailImportExportAppConfig(AppConfig):
name = 'wagtailimportexport'
label = 'wagtailimportexport'
verbose_name = _("Wagtail import-export")
| 28 | 55 | 0.785714 |
62b7ac2d9948df2bfa5c88c2c75338569da6f790 | 38,352 | py | Python | cockroach/proto/errors_pb2.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | 1 | 2015-11-05T19:20:27.000Z | 2015-11-05T19:20:27.000Z | cockroach/proto/errors_pb2.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | null | null | null | cockroach/proto/errors_pb2.py | abhishekgahlot/cockroach-python | 72903f583da182530e208cf41644d74e1a7ef505 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: cockroach/proto/errors.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf impor... | 41.823337 | 3,726 | 0.771668 |
62b7c165d1b0ea3a6d7aa994ef07d24b52a9b8c3 | 2,024 | py | Python | KRR/histogram.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | KRR/histogram.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | KRR/histogram.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import pandas as pd
###LINEAR
##GP
list1=[]
#0.5313900008797612, 0.030448488891124725
#0.5345049234114398, 0.02979291446354182
list1.append(["m=10, dr=0.25, s=0.125",0.26922086704684534])
#0.4423911112589919, 56503.99730436048
#0.4... | 33.180328 | 79 | 0.735178 |
62b7e39ba7321b432fd6847d2cfb2aa8049a7c63 | 20,519 | py | Python | pandas_api/views.py | cfong32/lpp | 3f0244d7580b3f2c49f17c7a07a81915a4e9cdf2 | [
"Apache-2.0"
] | null | null | null | pandas_api/views.py | cfong32/lpp | 3f0244d7580b3f2c49f17c7a07a81915a4e9cdf2 | [
"Apache-2.0"
] | null | null | null | pandas_api/views.py | cfong32/lpp | 3f0244d7580b3f2c49f17c7a07a81915a4e9cdf2 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.http import JsonResponse
import numpy as np
import pandas as pd
from scipy import stats
import json, os, math, datetime
import copy
from pandas_api ... | 33.527778 | 372 | 0.592621 |
62b80149c9e4d32b11a4dd9b0fb3a92ad5eb803e | 485 | py | Python | setup.py | JamesRCr/Alethtils | f1f92fadf8900f0ee74f86c3fe3ac781c6a4e721 | [
"MIT"
] | null | null | null | setup.py | JamesRCr/Alethtils | f1f92fadf8900f0ee74f86c3fe3ac781c6a4e721 | [
"MIT"
] | null | null | null | setup.py | JamesRCr/Alethtils | f1f92fadf8900f0ee74f86c3fe3ac781c6a4e721 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='alethtils',
url='https://github.com/JamesRCr/Alethtils',
author='James Ronald Crowley',
email='j.crowely@mail.utoronto.ca',
packages=['alethtils'],
install_requirements=['logging',
'functools',
'timeit... | 28.529412 | 74 | 0.610309 |
62b810332fd13ebdbc416ab762bf4aea64909028 | 16,260 | py | Python | sdk/servicebus/azure-servicebus/samples/async_samples/sample_code_servicebus_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/servicebus/azure-servicebus/samples/async_samples/sample_code_servicebus_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/servicebus/azure-servicebus/samples/async_samples/sample_code_servicebus_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
Exampl... | 44.67033 | 144 | 0.753075 |
62b84748c23c1ed6d132ea615d2801c1ff747a2e | 5,602 | py | Python | modoboa/admin/postfix_maps.py | ongoof/modoboa2 | 587eb77476e23b2909760fe5af730ef13d999633 | [
"0BSD"
] | null | null | null | modoboa/admin/postfix_maps.py | ongoof/modoboa2 | 587eb77476e23b2909760fe5af730ef13d999633 | [
"0BSD"
] | null | null | null | modoboa/admin/postfix_maps.py | ongoof/modoboa2 | 587eb77476e23b2909760fe5af730ef13d999633 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""Map file definitions for postfix."""
from __future__ import unicode_literals
class DomainsMap(object):
"""Map to list all domains."""
filename = "sql-domains.cf"
mysql = (
"SELECT name FROM admin_domain "
"WHERE name='%s' AND type='domain' AND enabled=1"
... | 36.855263 | 79 | 0.626383 |
62b8536fd2519ee5a994602b6d0ecaae94dc925b | 41,317 | py | Python | cogs/Administration.py | jakebacker/Gompei-Bot | dba3b11874ca19c22f170b8a01928af2b3fb2bd8 | [
"MIT"
] | 9 | 2020-02-14T02:07:39.000Z | 2022-01-08T03:25:22.000Z | cogs/Administration.py | jakebacker/Gompei-Bot | dba3b11874ca19c22f170b8a01928af2b3fb2bd8 | [
"MIT"
] | 16 | 2020-02-14T02:10:29.000Z | 2022-02-04T14:50:58.000Z | cogs/Administration.py | jakebacker/Gompei-Bot | dba3b11874ca19c22f170b8a01928af2b3fb2bd8 | [
"MIT"
] | 8 | 2020-02-21T14:28:07.000Z | 2022-02-04T14:49:04.000Z | from GompeiFunctions import make_ordinal, time_delta_string, load_json, save_json, yes_no_helper
from cogs.Permissions import moderator_perms, administrator_perms
from discord.ext import commands
from datetime import timedelta
from datetime import datetime
from config import Config
import pytimeparse
import dateparser... | 39.5 | 123 | 0.584191 |
62b8691f9c135756c86c3975ad0fb508ab08de89 | 315 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_static.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_static.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_static.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.template import Library
from django.templatetags.static import static as _static
register = Library()
@register.simple_tag
def static(path):
# Backwards compatibility alias for django.templatetags.static.static().
# Deprecation should start in Django 2.0.
return _static(path)
| 26.25 | 77 | 0.746032 |
62b89bf2d63816f4da0bd843b62a41c6af6f7250 | 2,123 | py | Python | cloud/endagaweb/views/static.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | null | null | null | cloud/endagaweb/views/static.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | 3 | 2021-03-20T00:02:37.000Z | 2022-02-11T03:46:59.000Z | cloud/endagaweb/views/static.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | null | null | null | """Static views -- these are basically our landing pages.
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file... | 31.220588 | 85 | 0.688177 |
62b903bb687f8847d3ef3026a63524c47e4e6580 | 17,683 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_lsm9ds1.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_lsm9ds1.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_lsm9ds1.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`adafruit_lsm9ds1`
====================================================
CircuitPython module for the LSM9DS1 accelerometer, magnetometer, gyroscope.
Based on the driver from:
https://github.com/adafruit/Adafruit_LS... | 37.703625 | 93 | 0.673189 |
62b92bf24fa347016feef2dcb8e5974f8d116b21 | 756 | py | Python | game/Game_lib/game.py | 3CP-Studios/Space-Adventure | 82b829d3b382358bf8ce2581400da04b347729f4 | [
"MIT"
] | 3 | 2018-10-13T12:40:44.000Z | 2018-10-14T18:00:21.000Z | game/Game_lib/game.py | 3CP-Studios/Space-Adventure | 82b829d3b382358bf8ce2581400da04b347729f4 | [
"MIT"
] | 2 | 2018-10-13T20:01:24.000Z | 2018-10-14T11:16:23.000Z | game/Game_lib/game.py | 3CP-Studios/Space-Adventure | 82b829d3b382358bf8ce2581400da04b347729f4 | [
"MIT"
] | null | null | null | import pygame
UP=1
DOWN=2
LEFT=3
RIGHT=4
class Bullet(pygame.sprite.Sprite):
def __init__(self, x, y):
pygame.sprite.Sprite.__init__(self)
self.image = pygame.Surface((10, 20))
self.image.fill(YELLOW)
self.rect = self.image.get_rect()
self.rect.bottom = y
self.rect.centerx = x
self.speed... | 21.6 | 55 | 0.660053 |
62b97b9b62cdbf7fb2c4ecec07425885d240c10b | 12,792 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/source/capture.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/source/capture.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/source/capture.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2015 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 ag... | 38.185075 | 80 | 0.690822 |
62b9d1d73bef0495b34e74d6c8119ae7762cc49b | 14,873 | py | Python | salt/utils/templates.py | jhenry82/salt | 53fed2cc634121e0d5921f3fb2d716f10a3479c8 | [
"Apache-2.0"
] | null | null | null | salt/utils/templates.py | jhenry82/salt | 53fed2cc634121e0d5921f3fb2d716f10a3479c8 | [
"Apache-2.0"
] | null | null | null | salt/utils/templates.py | jhenry82/salt | 53fed2cc634121e0d5921f3fb2d716f10a3479c8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Template render systems
'''
from __future__ import absolute_import
# Import python libs
import codecs
import os
import imp
import logging
import tempfile
import traceback
import sys
# Import third party libs
import jinja2
import jinja2.ext
# Import salt libs
import salt.utils
from salt.e... | 32.40305 | 81 | 0.594164 |
62b9eeb840ed67a58ebd9f854492dfe5182ff40e | 1,224 | py | Python | bouncing_ball.py | xilix5688/StanCode | 12041459f04c0fe20917dcec3cfff4ed4ae682f3 | [
"MIT"
] | null | null | null | bouncing_ball.py | xilix5688/StanCode | 12041459f04c0fe20917dcec3cfff4ed4ae682f3 | [
"MIT"
] | null | null | null | bouncing_ball.py | xilix5688/StanCode | 12041459f04c0fe20917dcec3cfff4ed4ae682f3 | [
"MIT"
] | null | null | null | """
This program simulates a bouncing ball.
"""
from campy.graphics.gobjects import GOval
from campy.graphics.gwindow import GWindow
from campy.gui.events.timer import pause
from campy.gui.events.mouse import onmouseclicked
VX = 3
DELAY = 30
GRAVITY = 1
SIZE = 20
REDUCE = 0.9
START_X = 30
START_Y = 40
... | 19.741935 | 71 | 0.586601 |
62ba2bf8169200e3cf029b6597a662d6d13cfeff | 1,620 | py | Python | sharebears/album_item.py | mgp/sharebears | aabb2c568707cea1107498a05d7f56bd772ef4fb | [
"Apache-2.0"
] | 1 | 2015-01-17T20:02:14.000Z | 2015-01-17T20:02:14.000Z | sharebears/album_item.py | mgp/sharebears | aabb2c568707cea1107498a05d7f56bd772ef4fb | [
"Apache-2.0"
] | null | null | null | sharebears/album_item.py | mgp/sharebears | aabb2c568707cea1107498a05d7f56bd772ef4fb | [
"Apache-2.0"
] | null | null | null | from renderable_item import RenderableItem
from url_decoder_image import ImageUrlDecoder
_ALBUM_ITEM_TYPE = "album"
def insert_albums(renderable_items):
"""Returns a new list of renderable_items where contiguous ImageItem
instances are collapsed into an AlbumItem instance.
"""
if len(renderable_items) < 2:
... | 31.764706 | 73 | 0.750617 |
62ba3599b6a98927fa4e77aa8d545442966f8ec7 | 21,909 | py | Python | src/openapi_client/api/users_api.py | Nozbe/NTImporters | 12fa898efd41954b5c29bae383aba5ac56044e87 | [
"MIT"
] | 6 | 2022-01-03T07:07:18.000Z | 2022-03-21T08:13:49.000Z | src/openapi_client/api/users_api.py | Nozbe/NTImporters | 12fa898efd41954b5c29bae383aba5ac56044e87 | [
"MIT"
] | 1 | 2022-02-02T13:01:05.000Z | 2022-02-10T12:01:17.000Z | src/openapi_client/api/users_api.py | Nozbe/NTImporters | 12fa898efd41954b5c29bae383aba5ac56044e87 | [
"MIT"
] | 1 | 2022-02-10T11:53:55.000Z | 2022-02-10T11:53:55.000Z | """
Nozbe Teams API
Nozbe Teams API specification # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@nozbe.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from openapi_client.api_client import ApiClient, Endpoint as _E... | 35.110577 | 190 | 0.468848 |
62ba36c9e4d52c67768accc905aeac21fcd52daa | 3,365 | py | Python | exercises/01_calc/calc.py | angelptli/my_kivy_journey | 2718e3ef22f67a71e89cf297a34cb12825a2c3da | [
"MIT"
] | null | null | null | exercises/01_calc/calc.py | angelptli/my_kivy_journey | 2718e3ef22f67a71e89cf297a34cb12825a2c3da | [
"MIT"
] | null | null | null | exercises/01_calc/calc.py | angelptli/my_kivy_journey | 2718e3ef22f67a71e89cf297a34cb12825a2c3da | [
"MIT"
] | null | null | null | # File: calc.py
# Desc: Create functional calculator app.
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.core.window import Window
# Set the app size
Window.size = (500, 700)
# Designate our .kv design file
Builder.load_f... | 28.760684 | 78 | 0.578306 |
62ba4a6660e5a6b6d86734d7bf207d19ee632a54 | 2,654 | py | Python | refinery/bnpy/bnpy-dev/tests/data/TestMinibatchIterator.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 103 | 2015-01-13T00:48:14.000Z | 2021-11-08T10:53:22.000Z | refinery/bnpy/bnpy-dev/tests/data/TestMinibatchIterator.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 7 | 2015-02-21T04:03:40.000Z | 2021-08-23T20:24:54.000Z | refinery/bnpy/bnpy-dev/tests/data/TestMinibatchIterator.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 27 | 2015-01-23T00:54:31.000Z | 2020-12-30T14:30:50.000Z | '''
Unit tests for MinibatchIterator.py
'''
import numpy as np
import unittest
import copy
import bnpy.data.XData as XData
import bnpy.data.MinibatchIterator as MinibatchIterator
class TestMinibatchIterator(unittest.TestCase):
def shortDescription(self):
return None
def setUp(self):
X = np.random.rand... | 34.025641 | 79 | 0.702336 |
62baa63a164d93d589a4e3b19bf286550ea4167d | 8,513 | py | Python | flayer/db.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | flayer/db.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | flayer/db.py | techhat/grabbr | c188468168b35b8cd9cd0a42022fb603129faf9e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Database functions for Web Flayer
'''
# Python
import os
import time
import json
import urllib
import datetime
# 3rd party
import psycopg2
import psycopg2.extras
# Internal
import flayer.tools
def client(config):
'''
Return database client
'''
dbclient = psycopg2.connect(... | 27.729642 | 89 | 0.603195 |
62babc5b56bca0d0b02ca4bde86d069bbcd58b0d | 4,138 | py | Python | integrations/tensorflow/e2e/tensorlist_test.py | BernhardRiemann/iree | 471349762b316f7d6b83eb5f9089255d78052758 | [
"Apache-2.0"
] | 1 | 2021-03-15T13:53:30.000Z | 2021-03-15T13:53:30.000Z | integrations/tensorflow/e2e/tensorlist_test.py | BernhardRiemann/iree | 471349762b316f7d6b83eb5f9089255d78052758 | [
"Apache-2.0"
] | null | null | null | integrations/tensorflow/e2e/tensorlist_test.py | BernhardRiemann/iree | 471349762b316f7d6b83eb5f9089255d78052758 | [
"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,... | 32.582677 | 78 | 0.71653 |
62bac1df1bd0325e7ef816424727476c39737063 | 1,746 | py | Python | setup.py | InfuseAI/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 10 | 2021-09-13T23:14:22.000Z | 2022-02-06T06:07:40.000Z | setup.py | KellenJohn/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 4 | 2021-08-10T03:10:27.000Z | 2021-12-16T02:11:50.000Z | setup.py | KellenJohn/primehub-python-sdk | edbdbcb3e41f0c99e4542245de1345a64f509fb4 | [
"Apache-2.0"
] | 1 | 2021-12-21T11:59:51.000Z | 2021-12-21T11:59:51.000Z | #!/usr/bin/env python
import os
from distutils.core import setup
from setuptools import find_packages # type: ignore
def _get_version():
version_file = os.path.normpath(os.path.join(os.path.dirname(__file__), 'primehub', 'VERSION'))
with open(version_file) as fh:
version = fh.read().strip()
... | 32.943396 | 114 | 0.576174 |
62baf995f7d8ab4a68fc6e2a806e99de8b590ecd | 951 | py | Python | api/terminal/terminal/server/simple_server.py | WeBankPartners/wecube-plugins-terminal | 25e255e42f4bfe810085a94a81abb4a021aa3163 | [
"Apache-2.0"
] | 8 | 2021-05-08T02:00:28.000Z | 2021-09-10T10:46:02.000Z | api/terminal/terminal/server/simple_server.py | WeBankPartners/wecube-plugins-terminal | 25e255e42f4bfe810085a94a81abb4a021aa3163 | [
"Apache-2.0"
] | 6 | 2021-02-02T07:58:00.000Z | 2021-08-18T02:30:10.000Z | api/terminal/terminal/server/simple_server.py | WeBankPartners/wecube-plugins-terminal | 25e255e42f4bfe810085a94a81abb4a021aa3163 | [
"Apache-2.0"
] | 1 | 2022-02-11T13:55:29.000Z | 2022-02-11T13:55:29.000Z | # coding=utf-8
"""
terminal.server.simple_server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
本模块提供开发测试用的简单服务启动能力
"""
from wsgiref.simple_server import make_server
from talos.core import config
from terminal.server.wsgi_server import application
CONF = config.CONF
HAS_BOOSTER = False
try:
from gevent.pywsgi import WSGISe... | 21.133333 | 73 | 0.6551 |
62bb09f630213a545b952b3dc468bfaee00969a4 | 3,853 | py | Python | tests/col_generation/test_applybycols.py | DavidKatz-il/pdpipe | 5ddd066425d99886bfc51cf19ab78b2bf8c7791a | [
"MIT"
] | 269 | 2019-12-21T13:30:37.000Z | 2022-03-27T18:41:36.000Z | tests/col_generation/test_applybycols.py | DavidKatz-il/pdpipe | 5ddd066425d99886bfc51cf19ab78b2bf8c7791a | [
"MIT"
] | 68 | 2019-12-21T12:51:51.000Z | 2022-03-13T13:06:14.000Z | tests/col_generation/test_applybycols.py | DavidKatz-il/pdpipe | 5ddd066425d99886bfc51cf19ab78b2bf8c7791a | [
"MIT"
] | 30 | 2019-12-21T12:18:18.000Z | 2022-03-17T05:53:19.000Z | """Testing ApplyByCols pipeline stages."""
import math
import pytest
import pandas as pd
from pdpipe.col_generation import ApplyByCols
def ph_df():
return pd.DataFrame(
data=[[3.2, "acd"], [7.2, "alk"], [12.1, "alk"]],
index=[1, 2, 3],
columns=["ph", "lbl"]
)
def test_applybycols(... | 29.412214 | 72 | 0.608617 |
62bb27c6a2ef7920f370bba906b4776564f24fee | 643 | py | Python | pypipegraph/tests/test_interactive.py | bopopescu/pypipegraph-2 | 3a3f9ba565789d8d73c8cd503703a957de2be9d8 | [
"MIT"
] | 4 | 2017-05-24T16:57:42.000Z | 2017-09-21T19:55:27.000Z | pypipegraph/tests/test_interactive.py | bopopescu/pypipegraph-2 | 3a3f9ba565789d8d73c8cd503703a957de2be9d8 | [
"MIT"
] | 2 | 2019-11-22T15:33:47.000Z | 2020-07-27T11:59:44.000Z | pypipegraph/tests/test_interactive.py | bopopescu/pypipegraph-2 | 3a3f9ba565789d8d73c8cd503703a957de2be9d8 | [
"MIT"
] | 4 | 2015-08-26T15:43:00.000Z | 2020-07-20T03:36:40.000Z | if __name__ == "__main__":
import time
import os
import sys
sys.path.append("../../")
import pypipegraph as ppg
ppg.new_pipegraph()
def run_long():
time.sleep(20)
raise ValueError()
def run_short():
time.sleep(5)
with open("short.dat", "wb") as op:
... | 21.433333 | 56 | 0.584759 |
62bba5e34350a986d859ad807511485af9532a7f | 888 | py | Python | app/clean_text.py | Shamika14/Medium-Search-Engine | 60470acad09ed343f573b9ee968ef47e2e640e31 | [
"MIT"
] | null | null | null | app/clean_text.py | Shamika14/Medium-Search-Engine | 60470acad09ed343f573b9ee968ef47e2e640e31 | [
"MIT"
] | null | null | null | app/clean_text.py | Shamika14/Medium-Search-Engine | 60470acad09ed343f573b9ee968ef47e2e640e31 | [
"MIT"
] | null | null | null | import nltk
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from nltk.corpus import stopwords
from string import punctuation
words = set(nltk.corpus.words.words())
stuff_to_be_removed = list(stopwords.words("english"))+list(punctuation)
lemmatizer = WordNetLemmatizer()
de... | 26.909091 | 83 | 0.68018 |
62bbb065b8435e9de5e68cd9ddda0a937ef5501d | 2,150 | py | Python | GenerativeModels/utils/fid_scroe/fid_score.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | GenerativeModels/utils/fid_scroe/fid_score.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | GenerativeModels/utils/fid_scroe/fid_score.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import linalg
def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6):
"""Numpy implementation of the Frechet Distance.
The Frechet distance between two multivariate Gaussians X_1 ~ N(mu_1, C_1)
and X_2 ~ N(mu_2, C_2) is
d^2 = ||mu_1 - mu_2||^2 + Tr(C_1... | 36.440678 | 78 | 0.643721 |
62bbe50a706c2b2a667c5634914cd68a9ae8f146 | 521 | py | Python | {{cookiecutter.project_dirname}}/{{cookiecutter.project_slug}}/asgi.py | niccolomineo/django-continuous-delivery | 9853a274ad841b2809530e4e847d142ba12f74ef | [
"MIT"
] | null | null | null | {{cookiecutter.project_dirname}}/{{cookiecutter.project_slug}}/asgi.py | niccolomineo/django-continuous-delivery | 9853a274ad841b2809530e4e847d142ba12f74ef | [
"MIT"
] | null | null | null | {{cookiecutter.project_dirname}}/{{cookiecutter.project_slug}}/asgi.py | niccolomineo/django-continuous-delivery | 9853a274ad841b2809530e4e847d142ba12f74ef | [
"MIT"
] | null | null | null | """
ASGI config for {{cookiecutter.project_name}} 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/stable/howto/deployment/asgi/
"""
import os
os.environ.setdefault("DJANGO_CONFIGURATION", "Local")
os.env... | 26.05 | 78 | 0.779271 |
62bc030c22a90c4895f10788aad22d97b1141457 | 6,671 | py | Python | libcloudforensics/providers/gcp/internal/storagetransfer.py | zkck/cloud-forensics-utils | ac1cdf74b595cf57629c23a52e46da98283e552f | [
"Apache-2.0"
] | 241 | 2020-02-08T20:05:54.000Z | 2022-03-31T23:51:30.000Z | libcloudforensics/providers/gcp/internal/storagetransfer.py | Fryyyyy/cloud-forensics-utils | d7fb845bd7df1498d67230520e2c7169c9a929df | [
"Apache-2.0"
] | 376 | 2020-02-05T10:22:54.000Z | 2022-03-30T00:09:18.000Z | libcloudforensics/providers/gcp/internal/storagetransfer.py | Fryyyyy/cloud-forensics-utils | d7fb845bd7df1498d67230520e2c7169c9a929df | [
"Apache-2.0"
] | 72 | 2020-02-06T07:34:30.000Z | 2022-03-05T18:02:13.000Z | # -*- coding: utf-8 -*-
# Copyright 2021 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 38.33908 | 130 | 0.654774 |
62bc03dd32877aaa5daf10d843a94d3ea639ee2b | 25,128 | py | Python | Merge_mode.py | fuyu-sdu/3D-Multi-resolution-Deep-Learning-Model-for-Diagnosis-of-Multiple-Pathological-Types-on-Pulmonary-No | cc613925daacd191422bd80a6256649b296dfe46 | [
"MIT"
] | 1 | 2021-10-04T00:44:31.000Z | 2021-10-04T00:44:31.000Z | Merge_mode.py | fuyu-sdu/3D-Multi-resolution-Deep-Learning-Model-for-Diagnosis-of-Multiple-Pathological-Types-on-Pulmonary-No | cc613925daacd191422bd80a6256649b296dfe46 | [
"MIT"
] | null | null | null | Merge_mode.py | fuyu-sdu/3D-Multi-resolution-Deep-Learning-Model-for-Diagnosis-of-Multiple-Pathological-Types-on-Pulmonary-No | cc613925daacd191422bd80a6256649b296dfe46 | [
"MIT"
] | 1 | 2021-11-11T06:34:39.000Z | 2021-11-11T06:34:39.000Z | # coding=utf-8
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from keras.layers import Conv3D
from keras.layers import GlobalMaxPooling3D, Concatenate
from keras.layers import GlobalAveragePooling3D
from keras.layers import MaxPooling3D
from keras.... | 43.853403 | 176 | 0.600724 |
62bc0d8e2a9deb1a30f79ac1ddbc31d642ea01d3 | 23,590 | py | Python | spitz-python/libspitz/PerfModule.py | hpg-cepetro/pypits | a5c5f15ad27acb220e3832885c5148a63ef37365 | [
"MIT"
] | null | null | null | spitz-python/libspitz/PerfModule.py | hpg-cepetro/pypits | a5c5f15ad27acb220e3832885c5148a63ef37365 | [
"MIT"
] | null | null | null | spitz-python/libspitz/PerfModule.py | hpg-cepetro/pypits | a5c5f15ad27acb220e3832885c5148a63ef37365 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# The MIT License (MIT)
#
# Copyright (c) 2017 Caian Benedicto <caian@ggaunicamp.com>
#
# 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 w... | 30.478036 | 86 | 0.476855 |
62bc2247fb06ac13a7333ce9627397e5ef5dea61 | 4,339 | py | Python | projects/TridentNet/tridentnet/trident_rcnn.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | projects/TridentNet/tridentnet/trident_rcnn.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | projects/TridentNet/tridentnet/trident_rcnn.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
from detectron.layers import batched_nms
from detectron.modeling import ROI_HEADS_REGISTRY, StandardROIHeads
from detectron.modeling.roi_heads.roi_heads import Res5ROIHeads
from detectron.structures import Instances
def merge_branch_instances(instances, num_branch, n... | 37.08547 | 99 | 0.667435 |
62bc40ee79fd3c2b3aa6e1d2de98d4e38f9176ca | 1,005 | py | Python | userbot/plugins/assistant/bot_alive.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/assistant/bot_alive.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/assistant/bot_alive.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null |
import os
from telethon import events, Button, custom
from userbot.thunderconfig import Config
from userbot import ALIVE_NAME, bot
currentversion = "2.1"
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "RIDWAN SYAFEI"
ASSIS_PIC = os.environ.get("ASSIS_PIC", None)
if ASSIS_PIC is None:
PM_IMG = "https://tel... | 33.5 | 108 | 0.700498 |
62bc52ce2518bb8eae49ae82270a5e0b10a39204 | 7,077 | py | Python | msk_ensemble.py | mskcc/GDD-Phase2 | ffc45d7388851ba4e837a16e22578cef46f19ddf | [
"MIT"
] | null | null | null | msk_ensemble.py | mskcc/GDD-Phase2 | ffc45d7388851ba4e837a16e22578cef46f19ddf | [
"MIT"
] | 1 | 2021-06-30T21:57:53.000Z | 2021-06-30T21:57:53.000Z | msk_ensemble.py | mskcc/GDD-Phase2 | ffc45d7388851ba4e837a16e22578cef46f19ddf | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split
from sklearn.model_selection import StratifiedShuffleSplit
from imblearn.over_sampling import SMOTE
import torch
import torch.nn as nn
import ... | 33.225352 | 117 | 0.715981 |
62bc892ba707318d6c953a47d39889fee7174157 | 1,521 | py | Python | nk_ape/embedding.py | NewKnowledge/nk_ape | d740f890b05372fb910acdfbc6ec88bdd603d3af | [
"MIT"
] | null | null | null | nk_ape/embedding.py | NewKnowledge/nk_ape | d740f890b05372fb910acdfbc6ec88bdd603d3af | [
"MIT"
] | null | null | null | nk_ape/embedding.py | NewKnowledge/nk_ape | d740f890b05372fb910acdfbc6ec88bdd603d3af | [
"MIT"
] | null | null | null | from gensim.models import Word2Vec
from nk_ape.utils import mean_of_rows, no_op
import numpy as np
class Embedding:
''' Load a word2vec embedding from a file '''
def __init__(self,
embedding_path='embeddings/wiki2vec.model',
embed_agg_func=mean_of_rows,
verbo... | 35.372093 | 79 | 0.656147 |
62bc9dd2f51dfe13697c1ab08d498b000f9ff7b9 | 272 | py | Python | onefeed/config.py | dadaers/OneFeed | e16207418977078fee7cd7e9cf40519f7a9d462d | [
"Apache-2.0"
] | 2 | 2020-05-26T13:32:02.000Z | 2020-05-28T05:26:51.000Z | onefeed/config.py | dadaers/OneFeed | e16207418977078fee7cd7e9cf40519f7a9d462d | [
"Apache-2.0"
] | null | null | null | onefeed/config.py | dadaers/OneFeed | e16207418977078fee7cd7e9cf40519f7a9d462d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from pathlib import Path
ONEFEED_DATA_PATH = '{}/onefeed_data'.format(str(Path.home()))
CUSTOM_CONFIG_PATH = '{}/config'.format(ONEFEED_DATA_PATH)
DB = '{}/onefeed.db'.format(ONEFEED_DATA_PATH)
'''str: default store DB path'''
MAX_FEED_NUM = 50
| 24.727273 | 62 | 0.709559 |
62bca98fb290b87c9332c2e53efa95a169d27807 | 717 | py | Python | escape/escape/api/__init__.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2016-11-16T16:26:16.000Z | 2021-04-26T17:20:28.000Z | escape/escape/api/__init__.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 3 | 2017-04-20T11:29:17.000Z | 2017-11-06T17:12:12.000Z | escape/escape/api/__init__.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2017-03-27T13:58:52.000Z | 2020-06-24T22:42:51.000Z | # Copyright 2017 Janos Czentye
#
# 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, s... | 35.85 | 74 | 0.764296 |
62bcfe8b05405210a1829728e2a8ad7f4b8e847d | 10,690 | py | Python | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/rpc/python/ops/gen_rpc_op.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2019-06-27T12:09:44.000Z | 2019-06-27T12:09:44.000Z | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/rpc/python/ops/gen_rpc_op.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/rpc/python/ops/gen_rpc_op.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: gen_rpc_op_py.cc
"""
import collections as _collections
import six as _six
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
from tensorflow.python.eager import context as _context
fro... | 34.044586 | 686 | 0.685968 |
62bd088a47754114837207bac6ab23a1a1cf1736 | 21,013 | py | Python | commands/router_scrub.py | CloudCIX/rolly | 8fafd655cb82881ae2cf75a475904cddc39e2f9a | [
"Apache-2.0"
] | 6 | 2019-12-09T16:13:21.000Z | 2020-07-16T11:42:33.000Z | commands/router_scrub.py | CloudCIX/rolly | 8fafd655cb82881ae2cf75a475904cddc39e2f9a | [
"Apache-2.0"
] | null | null | null | commands/router_scrub.py | CloudCIX/rolly | 8fafd655cb82881ae2cf75a475904cddc39e2f9a | [
"Apache-2.0"
] | 1 | 2021-01-02T09:44:39.000Z | 2021-01-02T09:44:39.000Z | # stdlib
import json
import re
import traceback
from typing import Any, Dict, Optional
# libs
import netaddr
# local
from bin import RouterMixin, utils
import settings
ADDRESS_NAME_SUB_PATTERN = re.compile(r'[\.\/:]')
class RouterScrub(RouterMixin):
def run(self):
self.run_router()
def prompt(self)... | 44.331224 | 120 | 0.477942 |
62bd1a929b9c4b2b16d8d7418c990af344230b58 | 594 | py | Python | cloudmesh/power/cm_power.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | cloudmesh/power/cm_power.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | cloudmesh/power/cm_power.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | # see cm_temperature
class cm_power:
"""class to conveniently switch power on and of"""
"""the hostanme is the label of the host as defined in the inventory."""
def on(self, hostname):
"""switches the power on"""
def off(self, hostname):
"""switches power off"""
def status(sel... | 24.75 | 76 | 0.636364 |
62bd20036126b41040ca4329c7f13ea7671a8045 | 3,559 | py | Python | tensorflow/contrib/slim/python/slim/data/prefetch_queue.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/slim/python/slim/data/prefetch_queue.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/slim/python/slim/data/prefetch_queue.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 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... | 38.684783 | 80 | 0.702725 |
62bd2ce6b4461d52c70c02ff16101637b08d27c3 | 9,859 | py | Python | build/scripts/svn_version_gen.py | r1nadeg/04_catboost | 6755bbbd1496540b92ded57eea1974f64bef87c5 | [
"Apache-2.0"
] | 33 | 2016-12-15T21:47:13.000Z | 2020-10-27T23:53:59.000Z | build/scripts/svn_version_gen.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | null | null | null | build/scripts/svn_version_gen.py | dsferz/machinelearning_yandex | 8fde8314c5c70299ece8b8f00075ddfcd5e07ddf | [
"Apache-2.0"
] | 14 | 2016-12-28T17:00:33.000Z | 2022-01-16T20:15:27.000Z | #!/usr/bin/env python
import locale
import subprocess
import time
import os
import sys
import re
import socket
import json
indent = " "
def print_c_header(result):
print >>result, "#pragma once\n"
def print_c_footer(result):
pass
def print_java_header(result):
print >>result, "package ru.yandex.l... | 33.879725 | 127 | 0.616087 |
62bd5a4350993f02834b79eef6dba188168fd5d2 | 2,336 | py | Python | workon/templatetags/workon_thumbnail.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | null | null | null | workon/templatetags/workon_thumbnail.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | null | null | null | workon/templatetags/workon_thumbnail.py | devittek/django-workon | c39ddecac2649406a7a58922646478c5615d4cfd | [
"BSD-3-Clause"
] | null | null | null | import re
from django import template
from django.conf import settings
import workon
__all__ = ['lazy_register']
def lazy_register(register):
if "sorl.thumbnail" in settings.INSTALLED_APPS:
from sorl.thumbnail.templatetags.thumbnail import ThumbnailNode
from django.templatetags.static impor... | 34.865672 | 100 | 0.562928 |
62bd7f61e7fa81ec7c043b4f87ae786c7a75b5ec | 454 | py | Python | venv/Scripts/easy_install-script.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Scripts/easy_install-script.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Scripts/easy_install-script.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #!C:\Users\shehz\PycharmProjects\Assignment4\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw... | 34.923077 | 83 | 0.700441 |
62bda364235913a76ed1b826c95fb93433a663d3 | 3,501 | py | Python | sconscontrib/SCons/Tool/vala/vala.py | isabella232/scons-contrib | 25814a96f35fa2a7c60abd2d20e014f0490f7f51 | [
"MIT"
] | null | null | null | sconscontrib/SCons/Tool/vala/vala.py | isabella232/scons-contrib | 25814a96f35fa2a7c60abd2d20e014f0490f7f51 | [
"MIT"
] | 1 | 2022-03-23T19:36:56.000Z | 2022-03-23T19:36:56.000Z | sconscontrib/SCons/Tool/vala/vala.py | isabella232/scons-contrib | 25814a96f35fa2a7c60abd2d20e014f0490f7f51 | [
"MIT"
] | null | null | null | # -*- coding:utf-8; -*-
"""SCons.Tool.vala
Tool-specific initialization for Vala toolchain.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge... | 39.337079 | 121 | 0.694659 |
62bdbb44fc34451e205c51fd49138444b893a285 | 161 | py | Python | 0x04-python-more_data_structures/3-common_elements.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x04-python-more_data_structures/3-common_elements.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x04-python-more_data_structures/3-common_elements.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# 3-common_elements.py
def common_elements(set_1, set_2):
"""Return a set of common elements in two sets."""
return (set_1 & set_2)
| 20.125 | 54 | 0.68323 |
62bdc48257186dc1d1275d3b2baa7531f6817835 | 3,897 | py | Python | examples/diffusion/sinbc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 1 | 2021-05-15T16:28:45.000Z | 2021-05-15T16:28:45.000Z | examples/diffusion/sinbc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | examples/diffusion/sinbc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | r"""
Laplace equation with Dirichlet boundary conditions given by a sine function
and constants.
Find :math:`t` such that:
.. math::
\int_{\Omega} c \nabla s \cdot \nabla t
= 0
\;, \quad \forall s \;.
This example demonstrates how to use a hierarchical basis approximation - it
uses the fifth order Lobatt... | 28.035971 | 89 | 0.600975 |
62bdd8e8cad7f633eaa2f444ed169f1371a9a145 | 17,853 | py | Python | RELEASE_ScaleNet_minimal/train_batch_combine_RCNNOnly_v5_pose_multiCat.py | Jerrypiglet/scalenet | 6a5db480e650d10d1e575e93b6cee366d1912c8a | [
"Adobe-2006",
"Adobe-Glyph"
] | 33 | 2020-08-27T09:06:19.000Z | 2022-03-10T02:27:31.000Z | RELEASE_ScaleNet_minimal/train_batch_combine_RCNNOnly_v5_pose_multiCat.py | Jerrypiglet/scalenet | 6a5db480e650d10d1e575e93b6cee366d1912c8a | [
"Adobe-2006",
"Adobe-Glyph"
] | 2 | 2020-12-28T04:41:55.000Z | 2021-04-07T06:03:36.000Z | RELEASE_ScaleNet_minimal/train_batch_combine_RCNNOnly_v5_pose_multiCat.py | Jerrypiglet/scalenet | 6a5db480e650d10d1e575e93b6cee366d1912c8a | [
"Adobe-2006",
"Adobe-Glyph"
] | 5 | 2020-12-22T03:02:35.000Z | 2021-12-08T09:46:01.000Z | import torch
import torch.nn as nn
import numpy as np
from termcolor import colored
# from model_utils import bboxArray_to_bboxList, get_pitch_est_v0, get_pitch_est_v0_mid, accu_model, approx_model, human_prior
import utils.model_utils as model_utils
from utils.utils_misc import *
# from dataset_coco import bin2midpoi... | 62.642105 | 226 | 0.675685 |
62be4516ddb55b3d98c8d6d7661a9c0dd9b1352f | 1,560 | py | Python | pyromsobs/extraCoastMask.py | metno/pyromsobs | 8479a13908797a5e7370f272a3462b7c6d59e45e | [
"MIT"
] | null | null | null | pyromsobs/extraCoastMask.py | metno/pyromsobs | 8479a13908797a5e7370f272a3462b7c6d59e45e | [
"MIT"
] | null | null | null | pyromsobs/extraCoastMask.py | metno/pyromsobs | 8479a13908797a5e7370f272a3462b7c6d59e45e | [
"MIT"
] | 1 | 2019-05-24T08:53:28.000Z | 2019-05-24T08:53:28.000Z | from .OBSstruct import OBSstruct
from .utils import setDimensions
from netCDF4 import Dataset
import numpy as np
def inds(ps):
if (np.floor(ps) == np.ceil(ps)):
ind = [ps.astype(int)]
else:
ind = [np.floor(ps).astype(int), np.ceil(ps).astype(int)]
return ind
def masked(var):
if np.ma.i... | 28.363636 | 87 | 0.601923 |
62be602d0894d80ffeb1b2129bdee95ba2c499fc | 111 | py | Python | src/onevision/datasets/sid/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | 2 | 2022-03-28T09:46:38.000Z | 2022-03-28T14:12:32.000Z | src/onevision/datasets/sid/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | src/onevision/datasets/sid/__init__.py | phlong3105/onevision | 90552b64df7213e7fbe23c80ffd8a89583289433 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import annotations
from .sid import *
| 11.1 | 34 | 0.621622 |
62be6231a61942474ad7ec845c4e49eb8fcde4de | 1,412 | py | Python | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/testcases/disappearing_elements_test.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/testcases/disappearing_elements_test.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | 51 | 2021-04-08T11:39:59.000Z | 2021-05-07T12:01:27.000Z | attic/2019/contributions-2019/open/mudaliar-yptu/PWAF/testcases/disappearing_elements_test.py | Agriad/devops-course | 380aa43fa69efd71992933f013fb11a96ce16a74 | [
"MIT"
] | null | null | null | """
@author: Anuj Kumar
@email: cdac.anuj@gmail.com
@date: 17-May-18
"""
from pages.disappearing_elements_page import DisappearingElementsPage
from pages.welcome_page import WelcomePage
from utility.drivermanager import DriverManagerFirefox, DriverManagerChrome
from nose.plugins.attrib import attr
@attr(group=['kth']... | 41.529412 | 84 | 0.753541 |
62be858648ce66ec1e87db06fa483a72dfdea2b0 | 13,232 | py | Python | infinisdk/infinibox/cons_group.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/infinibox/cons_group.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/infinibox/cons_group.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | import gossip
import functools
import gadget
from collections import namedtuple
from ..core import Field, MillisecondsDatetimeType
from ..core.api.special_values import OMIT
from ..core.object_query import PolymorphicQuery
from ..core.bindings import RelatedObjectBinding
from ..core.api.special_values import Autogener... | 46.921986 | 120 | 0.645556 |
62beb34d02835a8c508cddc6fd040dafb04172c3 | 442 | py | Python | SlackEdit.py | stevenjob/lunchbot | 756a478cbc49028dda49ed4240f1f84ab8fd1faf | [
"BSD-3-Clause"
] | null | null | null | SlackEdit.py | stevenjob/lunchbot | 756a478cbc49028dda49ed4240f1f84ab8fd1faf | [
"BSD-3-Clause"
] | null | null | null | SlackEdit.py | stevenjob/lunchbot | 756a478cbc49028dda49ed4240f1f84ab8fd1faf | [
"BSD-3-Clause"
] | null | null | null | from SlackMessage import SlackMessage
class SlackEdit():
def __init__(self, user, channel, oldtext, newtext, when, thread_ts):
self.user = user
self.channel = channel
self.oldtext = oldtext
self.newtext = newtext
self.when = when
self.thread_ts = thread_ts
def t... | 31.571429 | 105 | 0.665158 |
62bee22416f786890628dc7c2d08152380ebeff7 | 123 | py | Python | pysal/model/spvcm/__init__.py | martinfleis/pysal | d2e0667d825d403efe7182ecda210dc152ec206d | [
"BSD-3-Clause"
] | 941 | 2015-01-12T22:25:55.000Z | 2022-03-27T15:41:29.000Z | pysal/model/spvcm/__init__.py | anekekarina99/pysal | bd8c954d34b4694416830a852e26fe40d64424f2 | [
"BSD-3-Clause"
] | 589 | 2015-01-09T03:58:03.000Z | 2022-02-26T02:17:15.000Z | pysal/model/spvcm/__init__.py | anekekarina99/pysal | bd8c954d34b4694416830a852e26fe40d64424f2 | [
"BSD-3-Clause"
] | 303 | 2015-01-10T02:59:04.000Z | 2022-03-05T04:21:55.000Z | from spvcm.both_levels import *
from spvcm.upper_level import *
from spvcm.lower_level import *
from spvcm import plotting
| 24.6 | 31 | 0.821138 |
62bf0449b6dac1511dcde121ef56f8fe01894ba2 | 71 | py | Python | large_app/python/user_module/models/marshmallow.py | sahilGupta89/large_flask_app | e1ab54431bb935c02186f586d9246b741d9f2d33 | [
"MIT"
] | null | null | null | large_app/python/user_module/models/marshmallow.py | sahilGupta89/large_flask_app | e1ab54431bb935c02186f586d9246b741d9f2d33 | [
"MIT"
] | 2 | 2018-06-08T21:30:08.000Z | 2018-07-02T17:19:10.000Z | large_app/python/user_module/models/marshmallow.py | sahilGupta89/large_flask_app | e1ab54431bb935c02186f586d9246b741d9f2d33 | [
"MIT"
] | 1 | 2020-07-29T03:36:42.000Z | 2020-07-29T03:36:42.000Z | from flask_marshmallow import Marshmallow
marshmallow = Marshmallow()
| 17.75 | 41 | 0.84507 |
62bf0ae4a9d427e269fa0d70c5b30b4d4da08c9a | 7,593 | py | Python | src/olympia/versions/views.py | hiikezoe/addons-server | 1574d92fae097796b40b54579e3c7eeb876d6e32 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/versions/views.py | hiikezoe/addons-server | 1574d92fae097796b40b54579e3c7eeb876d6e32 | [
"BSD-3-Clause"
] | null | null | null | src/olympia/versions/views.py | hiikezoe/addons-server | 1574d92fae097796b40b54579e3c7eeb876d6e32 | [
"BSD-3-Clause"
] | null | null | null | import os
import waffle
from django import http
from django.db.transaction import non_atomic_requests
from django.shortcuts import get_object_or_404, redirect
import caching.base as caching
import olympia.core.logger
from olympia import amo
from olympia.access import acl
from olympia.addons.decorators import (
... | 37.039024 | 78 | 0.667325 |
62bf474b8effd9d018d692089bc96ed1596ed4c1 | 916 | py | Python | marqeta/response_models/auto_reload_association.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/auto_reload_association.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/auto_reload_association.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models import datetime_object
import json
import re
class AutoReloadAssociation(object):
def __init__(self, json_response):
self.json_response = json_response
def __str__(self):
return json.dumps(self.json_response, default=self.json_s... | 25.444444 | 106 | 0.708515 |
62bf578d03b591af2495b85d440c814427628233 | 1,618 | py | Python | kif_letter/gender_detector/gender_detector/country.py | gS644/kif-letter | 18e57ecc8c8420e810c903b51f2c578abad0863f | [
"MIT"
] | 3 | 2018-11-14T18:36:50.000Z | 2021-04-08T14:55:33.000Z | kif_letter/gender_detector/gender_detector/country.py | gS644/kif-letter | 18e57ecc8c8420e810c903b51f2c578abad0863f | [
"MIT"
] | 1 | 2016-03-09T10:06:38.000Z | 2016-03-09T10:06:38.000Z | kif_letter/gender_detector/gender_detector/country.py | gS644/kif-letter | 18e57ecc8c8420e810c903b51f2c578abad0863f | [
"MIT"
] | 2 | 2016-03-07T16:23:29.000Z | 2016-05-15T16:45:47.000Z | import os
from .binomy import Binomy
class Country:
'''
Handles the data files per country
Arguments:
arg1 -- country code
'''
def __init__(self, country):
self.country = country
self._validate_country()
def guess(self, row):
name = row[0]
opt = {
... | 24.892308 | 79 | 0.551916 |
62bf5c397208f460f5d8f8d018db82a389d9b411 | 26,377 | py | Python | ml3d/tf/models/network_blocks.py | kylevedder/Open3D-ML | 87ec50ed81d531377b1bb27e5c16f964201eadb0 | [
"MIT"
] | 447 | 2020-10-14T23:16:41.000Z | 2021-07-27T06:57:45.000Z | ml3d/tf/models/network_blocks.py | kylevedder/Open3D-ML | 87ec50ed81d531377b1bb27e5c16f964201eadb0 | [
"MIT"
] | 118 | 2020-10-14T10:20:37.000Z | 2021-07-27T12:23:18.000Z | ml3d/tf/models/network_blocks.py | kylevedder/Open3D-ML | 87ec50ed81d531377b1bb27e5c16f964201eadb0 | [
"MIT"
] | 80 | 2020-10-14T17:35:48.000Z | 2021-07-23T08:48:17.000Z | import tensorflow as tf
import numpy as np
from os.path import exists, join, isfile, dirname, abspath, split
from pathlib import Path
from .utils.kernels.kernel_points import load_kernels as create_kernel_points
def radius_gaussian(sq_r, sig, eps=1e-9):
"""Compute a radius gaussian (gaussian of distance)
:p... | 37.789398 | 119 | 0.557683 |
62bf6a12d38822c57fbcf14f5382bb5a3f5a27f5 | 1,032 | py | Python | src/otp_agents/admin.py | django-otp/django-otp-agents | 927056f7e7a1d5eaec39ff6c11eaf029f7ee1ff8 | [
"BSD-2-Clause"
] | 5 | 2020-03-06T11:41:23.000Z | 2021-09-16T16:36:58.000Z | src/otp_agents/admin.py | django-otp/django-otp-agents | 927056f7e7a1d5eaec39ff6c11eaf029f7ee1ff8 | [
"BSD-2-Clause"
] | null | null | null | src/otp_agents/admin.py | django-otp/django-otp-agents | 927056f7e7a1d5eaec39ff6c11eaf029f7ee1ff8 | [
"BSD-2-Clause"
] | null | null | null | import django_otp.admin
class TrustedAgentAdminSite(django_otp.admin.OTPAdminSite):
"""
This is an :class:`~django_otp.admin.OTPAdminSite` subclass that is
satisfied by a trusted agent.
This is identical to ``django_otp.admin.OTPAdminSite`` except that it will
skip the login dialog if the user is... | 43 | 87 | 0.742248 |
62bfb0f43052a1d321756fd6f1984a65b75b0760 | 5,758 | py | Python | qlock/clock.py | perryrh0dan/qlock | ec168f6b5b8266d2f81fcd75112b3220178896bb | [
"MIT"
] | 6 | 2020-11-21T00:05:09.000Z | 2021-11-08T14:14:37.000Z | qlock/clock.py | perryrh0dan/qlock | ec168f6b5b8266d2f81fcd75112b3220178896bb | [
"MIT"
] | 1 | 2020-12-24T14:05:35.000Z | 2020-12-24T14:05:35.000Z | qlock/clock.py | perryrh0dan/qlock | ec168f6b5b8266d2f81fcd75112b3220178896bb | [
"MIT"
] | 1 | 2021-11-08T14:14:52.000Z | 2021-11-08T14:14:52.000Z | import datetime
import time
import os
import json
import threading
from config import getConfig, getWords
from transition import simple, matrix, fade, drop
import utils
from timing import timing
# Depending on the mode import controller
if getConfig()['environment'] == "dev":
from tests.controller import ws2801 a... | 28.934673 | 79 | 0.593609 |
62bfcd2e937fe15b50b0eb56771bb8c2b74c02bb | 3,589 | py | Python | train_utils.py | vejvarm/AIND-VUI-Capstone | 3c4436905ded7dd7d5e9fd987aba1c334932323c | [
"MIT"
] | null | null | null | train_utils.py | vejvarm/AIND-VUI-Capstone | 3c4436905ded7dd7d5e9fd987aba1c334932323c | [
"MIT"
] | null | null | null | train_utils.py | vejvarm/AIND-VUI-Capstone | 3c4436905ded7dd7d5e9fd987aba1c334932323c | [
"MIT"
] | null | null | null | """
Defines a functions for training a NN.
"""
from data_generator import AudioGenerator
import _pickle as pickle
from keras import backend as K
from keras.models import Model
from keras.layers import (Input, Lambda)
from keras.optimizers import SGD
from keras.callbacks import ModelCheckpoint, EarlyStopping
import os... | 40.784091 | 101 | 0.702981 |
62bfe7c5242cb90a747c9c7ac6b9d735ef7e4d09 | 4,083 | py | Python | tests/transformation_tests/functions_tests/pitchfunctions_tests/test_tonality_pitch_function.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | 1 | 2021-05-06T19:45:54.000Z | 2021-05-06T19:45:54.000Z | tests/transformation_tests/functions_tests/pitchfunctions_tests/test_tonality_pitch_function.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | tests/transformation_tests/functions_tests/pitchfunctions_tests/test_tonality_pitch_function.py | dpazel/music_rep | 2f9de9b98b13df98f1a0a2120b84714725ce527e | [
"MIT"
] | null | null | null | import logging
import sys
import unittest
from tonalmodel.diatonic_tone import DiatonicTone
from tonalmodel.modality import ModalityType
from tonalmodel.pitch_range import PitchRange
from tonalmodel.tonality import Tonality
from transformation.functions.pitchfunctions.tonality_pitch_function import TonalityPitchFuncti... | 36.783784 | 109 | 0.572373 |
62bfee579a31fefeb8e3d6e81165054cd4083377 | 751 | py | Python | 0x06-python-classes/103-magic_class.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x06-python-classes/103-magic_class.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x06-python-classes/103-magic_class.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Define a MagicClass matching exactly a bytecode provided by Holberton."""
import math
class MagicClass:
"""Represent a circle."""
def __init__(self, radius=0):
"""Initialize a MagicClass.
Arg:
radius (float or int): The radius of the new MagicClass.
... | 27.814815 | 76 | 0.60719 |
62c04fa6e53a19f9c664922aa13768f97b2d932e | 5,972 | py | Python | vyperlogix/pypi/packages.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/pypi/packages.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/pypi/packages.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | import os, sys
from vyperlogix import misc
from vyperlogix.lists.ListWrapper import ListWrapper
from vyperlogix.misc import _utils
from vyperlogix.hash import lists
__copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommon... | 34.72093 | 168 | 0.642498 |
62c0536d4fc6b5d97514c1b21dc115878d8b3a67 | 1,903 | py | Python | Prototype-Data/CustomerPattern.py | keenborder786/Deep-Ad-Recommendation-Sytem | 8e36be9343f96f8981203c7fc4afdd16ed8d7c1e | [
"MIT"
] | 1 | 2021-02-23T04:28:20.000Z | 2021-02-23T04:28:20.000Z | Prototype-Data/CustomerPattern.py | keenborder786/Deep-Ad-Recommendation-Sytem | 8e36be9343f96f8981203c7fc4afdd16ed8d7c1e | [
"MIT"
] | null | null | null | Prototype-Data/CustomerPattern.py | keenborder786/Deep-Ad-Recommendation-Sytem | 8e36be9343f96f8981203c7fc4afdd16ed8d7c1e | [
"MIT"
] | 1 | 2021-02-23T04:28:21.000Z | 2021-02-23T04:28:21.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 11 22:12:02 2019
@author: MMOHTASHIM
"""
from sklearn.cluster import MeanShift
from sklearn.decomposition import PCA
import pandas as pd
from sklearn.preprocessing import LabelEncoder
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import style
... | 26.430556 | 103 | 0.698371 |
62c056f9662c602ad1a2ed47fa5832938204ddad | 10,648 | py | Python | anthill/game/controller/model/master.py | anthill-platform/anthill-game-controller | 9c2fe2d4b4f8c95c6094f02d6d2cb22c8a686b13 | [
"MIT"
] | null | null | null | anthill/game/controller/model/master.py | anthill-platform/anthill-game-controller | 9c2fe2d4b4f8c95c6094f02d6d2cb22c8a686b13 | [
"MIT"
] | null | null | null | anthill/game/controller/model/master.py | anthill-platform/anthill-game-controller | 9c2fe2d4b4f8c95c6094f02d6d2cb22c8a686b13 | [
"MIT"
] | 1 | 2020-04-16T13:55:53.000Z | 2020-04-16T13:55:53.000Z |
import logging
from urllib import parse
import datetime
from anthill.common.model import Model
from anthill.common.access import AccessToken
from anthill.common import retry
from anthill.common import discover
from anthill.common.jsonrpc import JsonRPC, JsonRPCError, JSONRPC_TIMEOUT
from tornado.websocket import web... | 37.492958 | 109 | 0.639087 |
62c05999ff688106973204a65fd31c81919b697f | 313 | py | Python | app/models/rules.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | 2 | 2020-03-04T13:43:45.000Z | 2020-11-03T20:34:21.000Z | app/models/rules.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | 64 | 2019-07-19T19:19:50.000Z | 2022-03-03T21:19:28.000Z | app/models/rules.py | theLaborInVain/kdm-manager-api | fa8744c9b8a739262d1b94900648254cc69d16e1 | [
"MIT"
] | null | null | null | from app.assets import rules
from app import models
class Assets(models.AssetCollection):
def __init__(self, *args, **kwargs):
self.is_game_asset = False # we're hiding this from the indexer for now
self.root_module = rules
models.AssetCollection.__init__(self, *args, **kwargs)
| 26.083333 | 80 | 0.699681 |
62c05e4f989820202fdc2d0199a00a155ad3ac9c | 2,053 | py | Python | tests/test_cleanup.py | aptivate/cookiecutter | a68e7f8e0b1700f44d9cc4a16eedea761ffb9154 | [
"BSD-3-Clause"
] | 2 | 2015-10-04T03:20:02.000Z | 2015-11-08T13:07:57.000Z | tests/test_cleanup.py | aptivate/cookiecutter | a68e7f8e0b1700f44d9cc4a16eedea761ffb9154 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cleanup.py | aptivate/cookiecutter | a68e7f8e0b1700f44d9cc4a16eedea761ffb9154 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_cleanup
------------
Tests for `cookiecutter.cleanup` module.
"""
from __future__ import unicode_literals
import os
import shutil
import sys
if sys.version_info[:2] < (2, 7):
import unittest2 as unittest
else:
import unittest
from cookiecutter import c... | 28.513889 | 87 | 0.635168 |
62c07ee5ffb745bba1604d72458615bc7e0d9507 | 1,152 | py | Python | data/dataset_factory.py | cassiePython/RCNN | b28cb68d39ed28fc1ab9b817e8296f965b2a6a96 | [
"MIT"
] | 16 | 2019-08-06T03:19:58.000Z | 2022-01-24T12:31:44.000Z | data/dataset_factory.py | cassiePython/RCNN | b28cb68d39ed28fc1ab9b817e8296f965b2a6a96 | [
"MIT"
] | 2 | 2020-05-24T00:04:31.000Z | 2020-12-29T09:41:28.000Z | data/dataset_factory.py | cassiePython/RCNN | b28cb68d39ed28fc1ab9b817e8296f965b2a6a96 | [
"MIT"
] | 2 | 2019-09-16T07:21:44.000Z | 2020-09-10T07:56:24.000Z | import os
class DatasetFactory:
def __init__(self):
pass
@staticmethod
def get_by_name(dataset_name, opt):
if dataset_name == 'AlexnetDataset':
from data.datasets import AlexnetDataset
dataset = AlexnetDataset(opt)
elif dataset_name == 'FinetuneDa... | 28.8 | 76 | 0.591146 |
62c087bc311d3e07a2af23bec8aebd9d22207d5e | 32 | py | Python | datasets/torchvision_datasets/__init__.py | genggng/Meta-DETR | 45f9dcb4d3402b0e308e06537284fe2c8443b3f6 | [
"MIT"
] | 184 | 2021-03-23T03:19:48.000Z | 2022-03-31T07:42:03.000Z | datasets/torchvision_datasets/__init__.py | genggng/Meta-DETR | 45f9dcb4d3402b0e308e06537284fe2c8443b3f6 | [
"MIT"
] | 24 | 2021-03-31T19:12:27.000Z | 2022-03-20T06:04:22.000Z | datasets/torchvision_datasets/__init__.py | genggng/Meta-DETR | 45f9dcb4d3402b0e308e06537284fe2c8443b3f6 | [
"MIT"
] | 36 | 2021-03-26T15:51:06.000Z | 2022-03-31T02:15:23.000Z | from .coco import CocoDetection
| 16 | 31 | 0.84375 |
62c08c99d56ac6f74c28f5d6e0570ac56d136983 | 58,756 | py | Python | NavPython/IronPython/Lib/urllib.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 76 | 2015-12-20T16:56:37.000Z | 2021-12-13T09:40:48.000Z | NavPython/IronPython/Lib/urllib.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 20 | 2015-04-20T12:09:12.000Z | 2022-03-12T01:25:04.000Z | NavPython/IronPython/Lib/urllib.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 24 | 2015-07-22T08:08:54.000Z | 2021-12-28T06:56:09.000Z | """Open an arbitrary URL.
See the following document for more info on URLs:
"Names and Addresses, URIs, URLs, URNs, URCs", at
http://www.w3.org/pub/WWW/Addressing/Overview.html
See also the HTTP spec (from which the error codes are derived):
"HTTP - Hypertext Transfer Protocol", at
http://www.w3.org/pub/WWW/Protocols... | 35.67456 | 102 | 0.549306 |
62c0d3dd2c11ee9917c081e0fae53e4c272ffffe | 3,667 | py | Python | homeassistant/components/opentherm_gw/binary_sensor.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 7 | 2019-02-07T14:14:12.000Z | 2019-07-28T06:56:10.000Z | homeassistant/components/opentherm_gw/binary_sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:54:31.000Z | 2022-03-12T00:50:43.000Z | homeassistant/components/opentherm_gw/binary_sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for OpenTherm Gateway binary sensors."""
import logging
from homeassistant.components.binary_sensor import ENTITY_ID_FORMAT, BinarySensorDevice
from homeassistant.const import CONF_ID
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassis... | 31.886957 | 88 | 0.655031 |
62c10a363d5cc0bae088bfc27e05dc9a1ae188c9 | 3,676 | py | Python | getdatafromosm.py | leidix/images-to-osm | 5375d69c0f78aba9c153b0ada7ef7d6b8fb87b13 | [
"MIT"
] | 487 | 2017-12-21T09:23:42.000Z | 2022-03-27T09:10:12.000Z | getdatafromosm.py | leidix/images-to-osm | 5375d69c0f78aba9c153b0ada7ef7d6b8fb87b13 | [
"MIT"
] | 23 | 2018-01-02T17:07:17.000Z | 2022-03-11T23:19:28.000Z | getdatafromosm.py | leidix/images-to-osm | 5375d69c0f78aba9c153b0ada7ef7d6b8fb87b13 | [
"MIT"
] | 89 | 2018-01-02T17:59:56.000Z | 2021-12-10T09:00:50.000Z | import sys
import overpy
import imagestoosm.config as cfg
import os
import shapely.geometry
import shapely.wkt
import shapely.ops
import geojson
api = overpy.Overpass()
summary = {}
def saveOsmData(query) :
result = api.query(query)
for way in result.ways:
# "leisure=pitch,sport=" , don't use "-" ... | 31.965217 | 105 | 0.590316 |
62c121926a2f430a3cafdcdf8046762989215c01 | 18,158 | py | Python | alipay/aop/api/domain/AlipayCommerceOperationIsvOrderSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayCommerceOperationIsvOrderSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayCommerceOperationIsvOrderSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.CateringOrderInfo import CateringOrderInfo
from alipay.aop.api.domain.CateringDeliveryInfo import CateringDeliveryInfo
from alipay.aop.api.domain.CateringGoodsInfo import CateringGo... | 36.535211 | 89 | 0.625179 |
62c1319dbc821dbd0e1519e54e0cb0ba289d867b | 7,053 | py | Python | tests/test_data.py | Machearn/tensorbay-python-sdk | 0171385365f1d7317ac5c5dc11d6affccadddbee | [
"MIT"
] | null | null | null | tests/test_data.py | Machearn/tensorbay-python-sdk | 0171385365f1d7317ac5c5dc11d6affccadddbee | [
"MIT"
] | null | null | null | tests/test_data.py | Machearn/tensorbay-python-sdk | 0171385365f1d7317ac5c5dc11d6affccadddbee | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright 2021 Graviti. Licensed under MIT License.
#
import pytest
from tensorbay import GAS
from tensorbay.dataset import Data
from tensorbay.label import Catalog, Label
from .utility import get_dataset_name
CATALOG = {
"BOX2D": {
"categories": [
{"name": "01"},
... | 35.265 | 99 | 0.592514 |
62c15beef18c5e3582d66a0e2f3dcfa438399d63 | 2,346 | py | Python | bandwidth/voice/models/transcription_metadata.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 5 | 2020-11-04T14:29:37.000Z | 2022-02-23T20:33:07.000Z | bandwidth/voice/models/transcription_metadata.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 3 | 2021-07-23T18:48:48.000Z | 2022-03-15T14:59:07.000Z | bandwidth/voice/models/transcription_metadata.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 8 | 2020-04-14T09:22:53.000Z | 2022-03-11T10:46:06.000Z | # -*- coding: utf-8 -*-
"""
bandwidth
This file was automatically generated by APIMATIC v3.0 (
https://www.apimatic.io ).
"""
class TranscriptionMetadata(object):
"""Implementation of the 'TranscriptionMetadata' model.
TODO: type model description here.
Attributes:
id (strin... | 30.076923 | 79 | 0.565644 |
62c1ab38573d8cc192e6c1a8a41681dc9a6a1e81 | 3,000 | py | Python | cve-manager/cve_manager/handler/task_handler/callback/__init__.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | cve-manager/cve_manager/handler/task_handler/callback/__init__.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | cve-manager/cve_manager/handler/task_handler/callback/__init__.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | #!/usr/bin/python3
# ******************************************************************************
# Copyright (c) Huawei Technologies Co., Ltd. 2021-2022. All rights reserved.
# licensed under the Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a c... | 33.707865 | 98 | 0.586667 |
62c1bdc931871cccaa7674b22e55667aca56578c | 1,433 | py | Python | src/dataverk/views/base.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 3 | 2019-09-29T20:48:46.000Z | 2021-03-31T10:16:07.000Z | src/dataverk/views/base.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 148 | 2019-02-08T12:30:58.000Z | 2021-03-11T15:31:55.000Z | src/dataverk/views/base.py | navikt/dataverk | 7dd803236433048686dd7a58358bc1c09565b14b | [
"MIT"
] | 1 | 2020-11-18T14:10:05.000Z | 2020-11-18T14:10:05.000Z | from typing import Sequence
from dataverk.utils.file_functions import remove_special_characters
class BaseView:
def __init__(
self,
name: str,
resources: Sequence,
title: str = "",
description: str = "",
attribution: str = "",
spec_type: str = "simple",
... | 27.037736 | 79 | 0.547104 |
62c1c760fd7dbdb82f55773b1544193dd636bcd7 | 2,458 | py | Python | userbot/plugins/wttr.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/wttr.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | userbot/plugins/wttr.py | justteen/BUZZ-USERBOT | 55651cce150e1d04d2c61efb2565ef9f46b42933 | [
"BSL-1.0"
] | null | null | null | """Get weather data using OpenWeatherMap
Syntax: .weather <Location>
.wttr <location> """
import io
import time
import aiohttp
from userbot.utils import lightning_cmd
@borg.on(lightning_cmd(pattern="weather (.*)"))
async def _(event):
if event.fwd_from:
return
sample_url = (
"https://ap... | 24.336634 | 84 | 0.591131 |
62c1f865fb2b153e8266ba7577e182f2bff9cb90 | 2,568 | py | Python | src/12/launching_a_daemon_process_on_unix/daemon.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 14 | 2017-05-20T04:06:46.000Z | 2022-01-23T06:48:45.000Z | src/12/launching_a_daemon_process_on_unix/daemon.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 1 | 2021-06-10T20:17:55.000Z | 2021-06-10T20:17:55.000Z | src/12/launching_a_daemon_process_on_unix/daemon.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 15 | 2017-03-29T17:57:33.000Z | 2021-08-24T02:20:08.000Z | #!/usr/bin/env python3
# daemon.py
import os
import sys
import atexit
import signal
def daemonize(pidfile, *, stdin='/dev/null',
stdout='/dev/null',
stderr='/dev/null'):
if os.path.exists(pidfile):
raise RuntimeError('Already running')
# First fork... | 27.031579 | 76 | 0.567757 |
62c1f91374a635fbdf235b3e3910248623060ffc | 10,985 | py | Python | reader.py | tanayrastogi/MetaReader | b301302ec8b4cc0be425502801f174daf8fc16b5 | [
"MIT"
] | null | null | null | reader.py | tanayrastogi/MetaReader | b301302ec8b4cc0be425502801f174daf8fc16b5 | [
"MIT"
] | null | null | null | reader.py | tanayrastogi/MetaReader | b301302ec8b4cc0be425502801f174daf8fc16b5 | [
"MIT"
] | null | null | null | # Python libraries
import re
import os
import datetime
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
import csv
class ImageMeta:
@staticmethod
def __checkifileexist(filepath):
if os.path.isfile(filepath):
pass
else:
raise ValueError("No file found with pat... | 38.679577 | 129 | 0.524989 |
62c1fe41da74f4ed14eeede6a2a59dfaef61339a | 9,646 | py | Python | .venv/Lib/site-packages/httpcore/_sync/http_proxy.py | jefferdo/gpt-3-client | 7acbc5f518fe3fcb55d0bdcbf93fc87b103b1148 | [
"MIT"
] | 5 | 2021-03-25T12:09:07.000Z | 2021-06-07T06:33:43.000Z | env/Lib/site-packages/httpcore/_sync/http_proxy.py | Venko15/MLT | d4b876bd0a53e2078c45923076d9ab304703612d | [
"MIT"
] | null | null | null | env/Lib/site-packages/httpcore/_sync/http_proxy.py | Venko15/MLT | d4b876bd0a53e2078c45923076d9ab304703612d | [
"MIT"
] | null | null | null | from http import HTTPStatus
from ssl import SSLContext
from typing import Tuple, cast
from .._bytestreams import ByteStream
from .._exceptions import ProxyError
from .._types import URL, Headers, TimeoutDict
from .._utils import get_logger, url_to_origin
from .base import SyncByteStream
from .connection import SyncHTT... | 33.727273 | 87 | 0.57993 |
62c209f5a8155f52c34d083bf1a835e73379c4a8 | 399 | py | Python | foldit/raw/process_puzzle_meta_check.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | foldit/raw/process_puzzle_meta_check.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | foldit/raw/process_puzzle_meta_check.py | awb-carleton/pattern-analysis | 532066398f2d102031aaa86b9a7c739ee16ceb9c | [
"MIT"
] | null | null | null | from foldit.raw.process_puzzle_meta import process_puzzle_meta
from pattern_extraction import load_extend_data
import logging, sys
logging.getLogger().setLevel(logging.DEBUG)
sys.setrecursionlimit(10000)
process_puzzle_meta('2003287', True, 40)
soln_lookup = {}
parent_lookup = {}
child_lookup = {}
data, puz_metas = loa... | 36.272727 | 99 | 0.81203 |
62c240c756be9f9393143124a28d4ff45b559ebb | 595 | py | Python | krvjezivot/donations/urls.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | krvjezivot/donations/urls.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | krvjezivot/donations/urls.py | jkvakaric/krv-je-zivot | a875dcde468e1e5508713e592f974cb147223b52 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'donations'
urlpatterns = [
path(
'invite/list',
views.get_donation_invites_list,
name='donation_invites_list'),
path(
'invite/<int:invite_id>/confirm',
views.donation_invite_confirm,
name='donation_in... | 25.869565 | 73 | 0.660504 |
62c2451ae997199a274e0888044cfbf8d1b528d6 | 3,667 | py | Python | tests/secrets/test_runner.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | null | null | null | tests/secrets/test_runner.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | 3 | 2020-02-07T19:51:40.000Z | 2022-03-21T05:06:29.000Z | tests/secrets/test_runner.py | graybrandonpfg/checkov | 3081a8560f6369465314ee8f4ac8a8ec01649d68 | [
"Apache-2.0"
] | null | null | null | import unittest
import os
from pathlib import Path
from checkov.secrets.runner import Runner
from checkov.runner_filter import RunnerFilter
class TestRunnerValid(unittest.TestCase):
def test_runner_failing_check(self):
current_dir = os.path.dirname(os.path.realpath(__file__))
valid_dir_path = c... | 42.149425 | 106 | 0.675211 |
62c24e313419c5689d8e93bd25541711989b53d1 | 934 | py | Python | alipay/aop/api/domain/AlipayOpenMiniQrcodeUnbindModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayOpenMiniQrcodeUnbindModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayOpenMiniQrcodeUnbindModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayOpenMiniQrcodeUnbindModel(object):
def __init__(self):
self._route_group = None
@property
def route_group(self):
return self._route_group
@route_group.setter
... | 22.780488 | 73 | 0.61242 |
62c27cce410005382db90eff2fe1d4c5ef119dd5 | 1,737 | py | Python | src/kol/request/GenericRequest.py | thedufer/pykol | bad8ff4bf2f4bc6a7a5b6dbbd9333ef5aaf3432a | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:10:32.000Z | 2016-05-08T12:10:32.000Z | src/kol/request/GenericRequest.py | ZJ/pykol | c0523a4a4d09bcdf16f8c86c78da96914e961076 | [
"BSD-3-Clause"
] | null | null | null | src/kol/request/GenericRequest.py | ZJ/pykol | c0523a4a4d09bcdf16f8c86c78da96914e961076 | [
"BSD-3-Clause"
] | null | null | null | from kol.Error import NightlyMaintenanceError, NotLoggedInError
from kol.util import Report
import urllib
class GenericRequest(object):
"A generic request to a Kingdom of Loathing server."
def __init__(self, session):
self.session = session
self.requestData = {}
self.skipParseResponse = False
def doReques... | 36.1875 | 91 | 0.735751 |
62c28dcebf2bce840104283504e8ac616c0b02b8 | 2,571 | py | Python | tests/integration/offer/test_manager.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/offer/test_manager.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/offer/test_manager.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django.test import TestCase
from django.utils import timezone
from oscar.test import factories
from oscar.apps.offer import models
class TestActiveOfferManager(TestCase):
def test_includes_offers_in_date_range(self):
now = timezone.now()
start = now - datetime.... | 38.954545 | 67 | 0.68417 |
62c2c111ef1126d1681703ea5bdff46de1297ab0 | 1,594 | py | Python | alipay/aop/api/response/ZhimaCreditPeZmgoBizoptCloseResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/ZhimaCreditPeZmgoBizoptCloseResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/ZhimaCreditPeZmgoBizoptCloseResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class ZhimaCreditPeZmgoBizoptCloseResponse(AlipayResponse):
def __init__(self):
super(ZhimaCreditPeZmgoBizoptCloseResponse, self).__init__()
self._biz_opt_no = None
... | 28.464286 | 109 | 0.67064 |
62c2d85fe90ec21030168123ce2551392f79893c | 5,563 | py | Python | apysc/_display/line_dash_setting_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | apysc/_display/line_dash_setting_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | apysc/_display/line_dash_setting_interface.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | """Class implementation for line dash setting interface.
"""
from typing import Dict
from typing import Optional
from apysc._display.line_dash_setting import LineDashSetting
from apysc._type.revert_interface import RevertInterface
from apysc._type.variable_name_interface import VariableNameInterface
clas... | 35.208861 | 80 | 0.587812 |
62c2df6cd0e6dd8ef05d1c6bc779a97a43d5ba2a | 14,151 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_images_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 42.368263 | 221 | 0.675641 |
62c2fa5068ace8011af67efaabb56f93604bcfe1 | 2,605 | py | Python | lingcorpora/corpora/kal_corpus.py | OneAdder/lingcorpora.py | c481b4ae60c0d386544657749b3c7ab5570d32f8 | [
"MIT"
] | 3 | 2019-05-27T08:06:51.000Z | 2022-03-28T10:40:53.000Z | lingcorpora/corpora/kal_corpus.py | OneAdder/lingcorpora.py | c481b4ae60c0d386544657749b3c7ab5570d32f8 | [
"MIT"
] | 31 | 2018-02-13T09:23:56.000Z | 2022-02-16T05:50:49.000Z | lingcorpora/corpora/kal_corpus.py | OneAdder/lingcorpora.py | c481b4ae60c0d386544657749b3c7ab5570d32f8 | [
"MIT"
] | 6 | 2018-02-22T20:53:41.000Z | 2020-03-20T06:27:42.000Z | from .arkhangelskiy_corpora import PageParser
language = 'kalmyk'
results = 'http://web-corpora.net/KalmykCorpus/search/results.php'
TEST_DATA = {'test_single_query': {'query': 'мис'},
'test_multi_query': {'query': ['мис', 'бәәх']}
}
__author__ = 'ustya-k'
__doc__ = \
"""
Kalmyk Corpus
====... | 41.349206 | 205 | 0.720537 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.