hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
be3e0b2695517b31ca2598fed745e3642b1f2235 | 61,935 | py | Python | addon_common/common/updater_core.py | adriflex/retopoflow | 100080cbc51e44067d44e7f715f97aa345eaace5 | [
"OML"
] | null | null | null | addon_common/common/updater_core.py | adriflex/retopoflow | 100080cbc51e44067d44e7f715f97aa345eaace5 | [
"OML"
] | null | null | null | addon_common/common/updater_core.py | adriflex/retopoflow | 100080cbc51e44067d44e7f715f97aa345eaace5 | [
"OML"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 37.131295 | 123 | 0.573747 |
98ef8c884b1da983621a1adb961ef8786943e4db | 744 | py | Python | oda_api/__init__.py | volodymyrss/ODA_API | 8d7ec5390fea076d40afffe45552da466c1b28ef | [
"MIT"
] | null | null | null | oda_api/__init__.py | volodymyrss/ODA_API | 8d7ec5390fea076d40afffe45552da466c1b28ef | [
"MIT"
] | null | null | null | oda_api/__init__.py | volodymyrss/ODA_API | 8d7ec5390fea076d40afffe45552da466c1b28ef | [
"MIT"
] | null | null | null |
from __future__ import absolute_import, division, print_function
import pkgutil
import os
__author__ = "Andrea Tramacere"
pkg_dir = os.path.abspath(os.path.dirname(__file__))
pkg_name = os.path.basename(pkg_dir)
__all__=[]
for importer, modname, ispkg in pkgutil.walk_packages(path=[pkg_dir],
... | 21.257143 | 78 | 0.634409 |
c90d19348bf94aca2fda17810462632743ccbd0d | 5,047 | py | Python | src/oidcservice/oauth2/provider_info_discovery.py | peppelinux/JWTConnect-Python-OidcService | af979f45666bc47b62c69ddcbb199a15c7b96597 | [
"Apache-2.0"
] | 1 | 2020-09-30T13:07:46.000Z | 2020-09-30T13:07:46.000Z | src/oidcservice/oauth2/provider_info_discovery.py | peppelinux/JWTConnect-Python-OidcService | af979f45666bc47b62c69ddcbb199a15c7b96597 | [
"Apache-2.0"
] | null | null | null | src/oidcservice/oauth2/provider_info_discovery.py | peppelinux/JWTConnect-Python-OidcService | af979f45666bc47b62c69ddcbb199a15c7b96597 | [
"Apache-2.0"
] | null | null | null | """The service that talks to the OAuth2 provider info discovery endpoint."""
import logging
from cryptojwt.key_jar import KeyJar
from oidcmsg import oauth2
from oidcmsg.oauth2 import ResponseMessage
from oidcservice import OIDCONF_PATTERN
from oidcservice.exception import OidcServiceError
from oidcservice.service im... | 34.568493 | 80 | 0.612047 |
40e326db862096281190cf158b1c1a232dde0eb3 | 1,076 | py | Python | sebex/popen.py | membraneframework/sebex | e24cb0319c55dabdbe7337f23e797f59f83b803e | [
"Apache-2.0"
] | 1 | 2021-08-29T00:33:40.000Z | 2021-08-29T00:33:40.000Z | sebex/popen.py | membraneframework/sebex | e24cb0319c55dabdbe7337f23e797f59f83b803e | [
"Apache-2.0"
] | 11 | 2020-06-05T14:47:39.000Z | 2021-11-24T15:53:46.000Z | sebex/popen.py | membraneframework/sebex | e24cb0319c55dabdbe7337f23e797f59f83b803e | [
"Apache-2.0"
] | null | null | null | import subprocess
from os import PathLike
from typing import List, Union
from sebex.log import logcontext, log, warn, error
def popen(args: Union[str, PathLike, List[str]], log_stdout: bool = False, check = True,
**kwargs) -> subprocess.CompletedProcess:
if isinstance(args, str):
lc = args
... | 29.081081 | 88 | 0.531599 |
218caf0961f8c4ad32ef8eeac9e1c4feca69c3cb | 767 | py | Python | tests/test_protonvpn_server_load.py | weiluntong/ProtonVPN-server-load | 1463b3697c0f67d6a297a35b7dbf54528b28575f | [
"MIT"
] | null | null | null | tests/test_protonvpn_server_load.py | weiluntong/ProtonVPN-server-load | 1463b3697c0f67d6a297a35b7dbf54528b28575f | [
"MIT"
] | 1 | 2021-07-25T22:15:30.000Z | 2021-07-25T22:15:30.000Z | tests/test_protonvpn_server_load.py | weiluntong/ProtonVPN-server-load | 1463b3697c0f67d6a297a35b7dbf54528b28575f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import protonvpn_server_load as vpn
def input(args):
parser = argparse.ArgumentParser()
parser.add_argument('-l', '--location', type=str, nargs='*', default=[], help='The Country Code of the VPN Location')
parser.add_argument('-t', '--tiers', type=int, nargs='*', default=[],... | 31.958333 | 118 | 0.685789 |
d2e766f2d2149c27f3568e4b7edba77b37c8b594 | 1,939 | py | Python | lino/modlib/users/utils.py | khchine5/lino | 64f7ca9c9b83459b5b9f26174e5e3c26a137459d | [
"BSD-2-Clause"
] | 1 | 2018-01-12T14:10:11.000Z | 2018-01-12T14:10:11.000Z | lino/modlib/users/utils.py | khchine5/lino | 64f7ca9c9b83459b5b9f26174e5e3c26a137459d | [
"BSD-2-Clause"
] | null | null | null | lino/modlib/users/utils.py | khchine5/lino | 64f7ca9c9b83459b5b9f26174e5e3c26a137459d | [
"BSD-2-Clause"
] | null | null | null | # Copyright 2011-2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""Utilities for managing the :ref:`current_user_type`.
"""
import threading
user_profile_rlock = threading.RLock()
_for_user_profile = None
def with_user_profile(profile, func, *args, **kwargs):
"""Run the given callable `func` w... | 26.202703 | 72 | 0.692625 |
ef8cc0d7108ff1085122cffa749a4fc957141cec | 2,027 | py | Python | DONOTUSE_main_train_your_own_and_add_to_existing_checkpoint.py | Philliec459/ThinSection-Semantic-Image-Segmentation-using-Keras | 90c31dbe07dcbc11708105bd6470dc5af9421965 | [
"MIT"
] | 2 | 2020-04-17T21:51:26.000Z | 2020-04-19T06:10:20.000Z | DONOTUSE_main_train_your_own_and_add_to_existing_checkpoint.py | Philliec459/ThinSection-Semantic-Image-Segmentation-using-Keras | 90c31dbe07dcbc11708105bd6470dc5af9421965 | [
"MIT"
] | null | null | null | DONOTUSE_main_train_your_own_and_add_to_existing_checkpoint.py | Philliec459/ThinSection-Semantic-Image-Segmentation-using-Keras | 90c31dbe07dcbc11708105bd6470dc5af9421965 | [
"MIT"
] | 1 | 2020-05-04T03:49:50.000Z | 2020-05-04T03:49:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 23 18:08:34 2020
@author: craig
"""
from keras_segmentation.models.unet import vgg_unet
from keras_segmentation.predict import model_from_checkpoint_path
from PIL import Image
#from keras.models import load_model
import matplotlib.pyplot as plt
... | 21.56383 | 142 | 0.738037 |
c47c422341c9a07134ac688bfe2bccb85707d551 | 267 | py | Python | gpalu/constants.py | Obito1903/gpa.lu | 45db1a53a0818b73485e6862e3ce18daefcc7f72 | [
"MIT"
] | null | null | null | gpalu/constants.py | Obito1903/gpa.lu | 45db1a53a0818b73485e6862e3ce18daefcc7f72 | [
"MIT"
] | null | null | null | gpalu/constants.py | Obito1903/gpa.lu | 45db1a53a0818b73485e6862e3ce18daefcc7f72 | [
"MIT"
] | null | null | null | import re
EMAILS_REGEX = re.compile(
'collapse-(\d{7}).*\n.*title="(.*)".*\n.*\n.*<([\.\-\w]+@[\-\w]+\.[\.\w\-]+)&'
)
GPALU_EMAIL_REGEX = re.compile('[a-zA-Z0-9\_\.\-]+@(les\.codes|gpa\.lu|yarien\.eu|saucent\.online)')
BASE_URL = 'https://gpa.lu/'
| 26.7 | 101 | 0.513109 |
5f277c7bd074f31dc7cedbf27d3755c9c1a06998 | 171 | py | Python | Python-Web-Basics-Softuni/petstagram/common/urls.py | borisboychev/SoftUni | 22062312f08e29a1d85377a6d41ef74966d37e99 | [
"MIT"
] | 1 | 2020-12-14T23:25:19.000Z | 2020-12-14T23:25:19.000Z | Python-Web-Basics-Softuni/petstagram/common/urls.py | borisboychev/SoftUni | 22062312f08e29a1d85377a6d41ef74966d37e99 | [
"MIT"
] | null | null | null | Python-Web-Basics-Softuni/petstagram/common/urls.py | borisboychev/SoftUni | 22062312f08e29a1d85377a6d41ef74966d37e99 | [
"MIT"
] | null | null | null | from django.urls import path
from common.views import landing_page, original
urlpatterns = [
path('', landing_page, name='index'),
path('original/', original),
] | 21.375 | 47 | 0.707602 |
7063cc466f4dfdaff539b368ae740d62a5a1fe6d | 3,211 | py | Python | src/salsa_falcon.py | jpegleg/salsa_falcon | a96b5201def6066c3916a4736366f3ffa77820a8 | [
"MIT"
] | 1 | 2021-10-10T23:00:01.000Z | 2021-10-10T23:00:01.000Z | src/salsa_falcon.py | jpegleg/salsa_falcon | a96b5201def6066c3916a4736366f3ffa77820a8 | [
"MIT"
] | null | null | null | src/salsa_falcon.py | jpegleg/salsa_falcon | a96b5201def6066c3916a4736366f3ffa77820a8 | [
"MIT"
] | null | null | null | import binascii
import falcon
import falcon.asgi
from Crypto.Cipher import Salsa20
# There is no message authenticity with this, just fast Salsa20.
# The symmetric key is hard coded in this template.
# If using in the real world, change the key and
# consider HMAC.
class SalsaHexEncryptResource:
""" Encrypt the P... | 38.22619 | 64 | 0.667393 |
173dae1d136978105d7162cb5987a6bc171b4855 | 706 | py | Python | leetcode.com/python/125_Valid_Palindrome.py | XSoyOscar/Algorithms | 6e1626d4b0f7804494f0a651698966ad6fd0fe18 | [
"MIT"
] | 713 | 2019-11-19T16:11:25.000Z | 2022-03-31T02:27:52.000Z | leetcode.com/python/125_Valid_Palindrome.py | arunsank/coding-interview-gym | 8131e3a82795707e144fe55d765b6c15bdb97306 | [
"MIT"
] | 7 | 2020-01-16T17:07:18.000Z | 2021-11-15T18:24:39.000Z | leetcode.com/python/125_Valid_Palindrome.py | arunsank/coding-interview-gym | 8131e3a82795707e144fe55d765b6c15bdb97306 | [
"MIT"
] | 393 | 2019-11-18T17:55:45.000Z | 2022-03-28T20:26:32.000Z |
class Solution(object):
def isPalindrome(self, s):
"""
:type s: str
:rtype: bool
"""
s = s.lower()
leftIndex = 0
rightIndex = len(s) - 1
while leftIndex < rightIndex:
if s[leftIndex].isalnum() is False:
leftIndex += 1
... | 23.533333 | 60 | 0.48017 |
584b6fd199f558770f62da143163f48830403a4e | 3,856 | py | Python | scripts/rosomaxa/extract.py | reinterpretcat/vrp-analysis | 1793e6c70c2f2d37ed72883e2991063a75729bdf | [
"Apache-2.0"
] | null | null | null | scripts/rosomaxa/extract.py | reinterpretcat/vrp-analysis | 1793e6c70c2f2d37ed72883e2991063a75729bdf | [
"Apache-2.0"
] | null | null | null | scripts/rosomaxa/extract.py | reinterpretcat/vrp-analysis | 1793e6c70c2f2d37ed72883e2991063a75729bdf | [
"Apache-2.0"
] | 3 | 2020-07-15T12:16:29.000Z | 2022-01-24T06:05:15.000Z | import numpy as np
import sys
def get_matrices(data, objectives, weights, rows_min=sys.maxsize, rows_max=-sys.maxsize, cols_min=sys.maxsize, cols_max=-sys.maxsize):
# network state date from logs or metrics
(data_rows_min, data_rows_max, data_cols_min,
data_cols_max, total_count, nodes) = data
rows_... | 38.178218 | 134 | 0.608662 |
44c1c2a3535c522edf1e9519a911adff77d93378 | 1,482 | py | Python | lektor_google_analytics.py | eigenric/lektor-google-analytics | 126e6949154df8ceff561b826f99d2af999227b4 | [
"BSD-3-Clause"
] | null | null | null | lektor_google_analytics.py | eigenric/lektor-google-analytics | 126e6949154df8ceff561b826f99d2af999227b4 | [
"BSD-3-Clause"
] | null | null | null | lektor_google_analytics.py | eigenric/lektor-google-analytics | 126e6949154df8ceff561b826f99d2af999227b4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from lektor.pluginsystem import Plugin
from markupsafe import Markup
SCRIPT = '''
<div id="ga-script"></div>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.... | 41.166667 | 87 | 0.632254 |
fb782b5417cd2390d6c275e371e10ce776c3c597 | 1,307 | py | Python | tests/src/Composite_report/download_schoolwise_csv.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | null | null | null | tests/src/Composite_report/download_schoolwise_csv.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | 2 | 2022-02-01T00:55:12.000Z | 2022-03-29T22:29:09.000Z | tests/src/Composite_report/download_schoolwise_csv.py | JalajaTR/cQube | 6bf58ab25f0c36709630987ab730bbd5d9192c03 | [
"MIT"
] | null | null | null | import os
import time
from selenium.webdriver.support.select import Select
from Data.parameters import Data
from filenames import file_extention
from get_dir import pwd
from reuse_func import GetData
class school_wise_download():
def __init__(self,driver):
self.driver = driver
def test_schoolwise(s... | 31.119048 | 87 | 0.6886 |
5cda4f7fb8acecde36892b51ef347531d0321c5b | 516 | py | Python | blog/migrations/0009_post_likes.py | yanfreitas/Django-blog-project | b67d343ee6861547239d478e962c238bfd7f61ef | [
"MIT"
] | null | null | null | blog/migrations/0009_post_likes.py | yanfreitas/Django-blog-project | b67d343ee6861547239d478e962c238bfd7f61ef | [
"MIT"
] | null | null | null | blog/migrations/0009_post_likes.py | yanfreitas/Django-blog-project | b67d343ee6861547239d478e962c238bfd7f61ef | [
"MIT"
] | 1 | 2020-08-28T14:04:30.000Z | 2020-08-28T14:04:30.000Z | # Generated by Django 3.1 on 2020-08-24 22:40
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('blog', '0008_delete_likes'),
]
operations = [
... | 24.571429 | 96 | 0.653101 |
1420cda685ecb6fcbf93f73b1ccef84138fcacfc | 1,614 | py | Python | src/Mosaic/Mosaic.py | MarcMDE/Mosaic | ecf7628f23dbc0af4ba774d04fbc321b92065af2 | [
"CC0-1.0"
] | null | null | null | src/Mosaic/Mosaic.py | MarcMDE/Mosaic | ecf7628f23dbc0af4ba774d04fbc321b92065af2 | [
"CC0-1.0"
] | null | null | null | src/Mosaic/Mosaic.py | MarcMDE/Mosaic | ecf7628f23dbc0af4ba774d04fbc321b92065af2 | [
"CC0-1.0"
] | null | null | null | import numpy as np
import cv2
from os import listdir
from os.path import isfile, join
from skimage.measure import structural_similarity as ssim
def calc_ssim(imgA, imgB):
#imgB_gray = cv2.cvtColor(imgB, cv2.COLOR_BGR2GRAY)
return ssim(imgA, imgB)
class Mosaic:
def __init__(self, img_path, imgs_dir, v... | 29.345455 | 83 | 0.591698 |
0faaabd134b7da13b14745c5465baca1a89032af | 757 | py | Python | Python/minimum-swaps-to-arrange-a-binary-grid.py | sm2774us/leetcode_interview_prep_2021 | 33b41bea66c266b733372d9a8b9d2965cd88bf8c | [
"Fair"
] | null | null | null | Python/minimum-swaps-to-arrange-a-binary-grid.py | sm2774us/leetcode_interview_prep_2021 | 33b41bea66c266b733372d9a8b9d2965cd88bf8c | [
"Fair"
] | null | null | null | Python/minimum-swaps-to-arrange-a-binary-grid.py | sm2774us/leetcode_interview_prep_2021 | 33b41bea66c266b733372d9a8b9d2965cd88bf8c | [
"Fair"
] | null | null | null | # Time: O(n^2)
# Space: O(1)
import itertools
class Solution(object):
def minSwaps(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
result = 0
for target in reversed(range(1, len(grid))):
row_idx = len(grid)-1-target
while row_i... | 27.035714 | 79 | 0.467635 |
21527eb3680b02ed248a63a47a36ef47446155c7 | 449 | py | Python | pinto/pinto/core/views/__init__.py | wwitzel3/pinto | 8114a733fb8ccaf9b030c64727f626c24ffe5788 | [
"MIT"
] | 3 | 2015-01-24T14:35:50.000Z | 2016-07-06T10:04:50.000Z | pinto/pinto/core/views/__init__.py | wwitzel3/pinto | 8114a733fb8ccaf9b030c64727f626c24ffe5788 | [
"MIT"
] | null | null | null | pinto/pinto/core/views/__init__.py | wwitzel3/pinto | 8114a733fb8ccaf9b030c64727f626c24ffe5788 | [
"MIT"
] | null | null | null | from pyramid.view import view_config
from pinto.post.model import (
get_recent_posts,
get_tags,
)
@view_config(route_name='index', renderer='pinto:core/templates/index.mako')
def index(request):
posts = get_recent_posts(request)
tags = get_tags(request)
return {
'posts':posts,
'ta... | 20.409091 | 76 | 0.688196 |
1165ffadb436084faa3e12cc565e651b973c41c7 | 954 | py | Python | utility/visualize_filter.py | kiseonjeong/neural-network-for-python | 902307699d59a0a38d45519a0bacd014ba705727 | [
"MIT"
] | 1 | 2020-07-08T15:47:00.000Z | 2020-07-08T15:47:00.000Z | utility/visualize_filter.py | kiseonjeong/neural-network-for-python | 902307699d59a0a38d45519a0bacd014ba705727 | [
"MIT"
] | null | null | null | utility/visualize_filter.py | kiseonjeong/neural-network-for-python | 902307699d59a0a38d45519a0bacd014ba705727 | [
"MIT"
] | null | null | null | import sys, os
sys.path.append(os.path.abspath('.'))
import numpy as np
import matplotlib.pyplot as plt
from network.simple_conv_net import SimpleConvNet
def filter_show(filters, nx=8):
"""
(function) filter_show
-----------------
- Show the input filters as the images
Parameter
---------
... | 24.461538 | 83 | 0.628931 |
a79e90c734a407dae79431fcec7bff05989ae1fb | 14,525 | py | Python | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/config/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/config/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/peer_groups/peer_group/use_multiple_paths/ibgp/config/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 38.941019 | 542 | 0.580241 |
08e928ebb7be131ad2020f3f8d1b3d658859d3bb | 622 | py | Python | tests/test_rebuild_vrts.py | jsta/rabpro | 44301c6a08c14654b27a3475b89898afca0af329 | [
"BSD-3-Clause"
] | 2 | 2021-12-17T21:23:21.000Z | 2021-12-19T06:12:28.000Z | tests/test_rebuild_vrts.py | jsta/rabpro | 44301c6a08c14654b27a3475b89898afca0af329 | [
"BSD-3-Clause"
] | 45 | 2021-08-09T17:00:59.000Z | 2022-01-07T18:42:41.000Z | tests/test_rebuild_vrts.py | jsta/rabpro | 44301c6a08c14654b27a3475b89898afca0af329 | [
"BSD-3-Clause"
] | 4 | 2021-08-09T19:28:53.000Z | 2021-12-17T21:21:51.000Z | import rabpro
import geopandas as gpd
import contextlib, io
def test_rebuild_vrts():
coords_file = gpd.read_file(r"tests/data/Big Blue River.geojson")
# Ensure profiler calls to get_datapaths prints rebuild_vrts progress
f = io.StringIO()
with contextlib.redirect_stdout(f):
rpo = rabpro.profi... | 28.272727 | 82 | 0.712219 |
201ad8227030503447094c55d75fa57f2661bfa2 | 23,578 | py | Python | powerdnsadmin/models/record.py | cyso/PowerDNS-Admin | 4e63f8380bd6daa3fe5a651ee6d600be64f6dfd8 | [
"MIT"
] | 1 | 2020-06-26T10:44:32.000Z | 2020-06-26T10:44:32.000Z | powerdnsadmin/models/record.py | cyso/PowerDNS-Admin | 4e63f8380bd6daa3fe5a651ee6d600be64f6dfd8 | [
"MIT"
] | null | null | null | powerdnsadmin/models/record.py | cyso/PowerDNS-Admin | 4e63f8380bd6daa3fe5a651ee6d600be64f6dfd8 | [
"MIT"
] | null | null | null | import re
import traceback
import dns.reversename
import dns.inet
import dns.name
from flask import current_app
from urllib.parse import urljoin
from distutils.util import strtobool
from itertools import groupby
from .. import utils
from .base import db
from .setting import Setting
from .domain import Domain
from .dom... | 39.693603 | 135 | 0.491645 |
9344ee526a18cd5847ebba2408b20f5cd76ec16c | 2,079 | py | Python | anaconda/6.00.1x.W2T4.ProblemSet2.P2.Minimum.Mountly.Amount.Paying.All.Debit.py | coshkun/6.00.1x-MITx-Course-Training-Lab-Notes | 63e755dc81fd50a7b1372074a4a73e50021a233b | [
"MIT"
] | null | null | null | anaconda/6.00.1x.W2T4.ProblemSet2.P2.Minimum.Mountly.Amount.Paying.All.Debit.py | coshkun/6.00.1x-MITx-Course-Training-Lab-Notes | 63e755dc81fd50a7b1372074a4a73e50021a233b | [
"MIT"
] | null | null | null | anaconda/6.00.1x.W2T4.ProblemSet2.P2.Minimum.Mountly.Amount.Paying.All.Debit.py | coshkun/6.00.1x-MITx-Course-Training-Lab-Notes | 63e755dc81fd50a7b1372074a4a73e50021a233b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 5 02:26:49 2017
@author: coskun
Problem 2
1/1 point (ungraded)
Now write a program that calculates the minimum fixed monthly payment
needed in order pay off a credit card balance within 12 months.
By a fixed monthly payment, we mean a single nu... | 31.984615 | 111 | 0.72583 |
e21987dc470b8f66ad623eba4cc5f690de432033 | 112 | py | Python | GodwillOnyewuchi/Phase 1/Python Basic 2/day 11 task/task 3.py | CodedLadiesInnovateTech/-python-challenge-solutions | 430cd3eb84a2905a286819eef384ee484d8eb9e7 | [
"MIT"
] | 6 | 2020-05-23T19:53:25.000Z | 2021-05-08T20:21:30.000Z | GodwillOnyewuchi/Phase 1/Python Basic 2/day 11 task/task 3.py | GREENFONTS/python-challenge-solutions | a9aad85a250892fe41961a7d5e77f67b8d14fc1b | [
"MIT"
] | 8 | 2020-05-14T18:53:12.000Z | 2020-07-03T00:06:20.000Z | GodwillOnyewuchi/Phase 1/Python Basic 2/day 11 task/task 3.py | GREENFONTS/python-challenge-solutions | a9aad85a250892fe41961a7d5e77f67b8d14fc1b | [
"MIT"
] | 39 | 2020-05-10T20:55:02.000Z | 2020-09-12T17:40:59.000Z | # Python program to get the identity of an object
obj1 = object()
obj1_address = id(obj1)
print(obj1_address)
| 16 | 49 | 0.75 |
2c8088ca9c87a343f0328b71fcb00744ff647bf0 | 186 | py | Python | Assets/StreamingAssets/PythonScripts/Exchange/testfile.py | TigrisCallidus/CQU | 87b0d545ed82d12e374e4384d5bd782d40e222e8 | [
"Apache-2.0"
] | 9 | 2020-12-08T18:09:50.000Z | 2022-01-02T17:12:06.000Z | Assets/StreamingAssets/PythonScripts/Exchange/testfile.py | TigrisCallidus/CQU | 87b0d545ed82d12e374e4384d5bd782d40e222e8 | [
"Apache-2.0"
] | null | null | null | Assets/StreamingAssets/PythonScripts/Exchange/testfile.py | TigrisCallidus/CQU | 87b0d545ed82d12e374e4384d5bd782d40e222e8 | [
"Apache-2.0"
] | 4 | 2020-12-14T19:31:09.000Z | 2021-08-06T07:30:41.000Z | print('python file works')
# Uncomment lines below to test if your qiskit installation is correct
#from qiskit import(
# QuantumCircuit,
# IBMQ)
#print(qiskit.__qiskit_version__) | 18.6 | 70 | 0.758065 |
eba34de42d76a4cb1c168f989a51e0ffea783060 | 6,471 | py | Python | main.py | kafkaofftheshore/ARGuitarLearner | 6e9ec1426ab5b3417347fdc97396baf26b70925f | [
"MIT",
"Unlicense"
] | 1 | 2021-08-29T06:52:06.000Z | 2021-08-29T06:52:06.000Z | main.py | kafkaofftheshore/ARGuitarLearner | 6e9ec1426ab5b3417347fdc97396baf26b70925f | [
"MIT",
"Unlicense"
] | null | null | null | main.py | kafkaofftheshore/ARGuitarLearner | 6e9ec1426ab5b3417347fdc97396baf26b70925f | [
"MIT",
"Unlicense"
] | null | null | null | import cv2
import time
import filters
import houghProcessing
import skinDetector
import guitar
import numpy as np
import winsound
from managers import WindowManager, CaptureManager
class ARGuitar(object):
def __init__(self):
self._windowManager = WindowManager('ARGuitar',
... | 44.020408 | 116 | 0.554165 |
a4cb858531896a00183b4bc27be7dd3b3f6ea254 | 3,249 | py | Python | bin/hana.py | codacy-badger/hanajima | fc39071453731b116d9d3801a880eaf5cfdea92f | [
"MIT"
] | null | null | null | bin/hana.py | codacy-badger/hanajima | fc39071453731b116d9d3801a880eaf5cfdea92f | [
"MIT"
] | null | null | null | bin/hana.py | codacy-badger/hanajima | fc39071453731b116d9d3801a880eaf5cfdea92f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import socket
import sys
from colorama import Fore, Style
from urllib.parse import urlparse
import urllib.request
import urllib.error
import urllib.parse
from urllib.request import Request, urlopen
from urllib.error import URLError
momok = urlopen
ngentod = urllib.request.urlopen
negative = '\033... | 29.008929 | 124 | 0.6008 |
39efcd008d80df620cea8abaa6b7329de3ab34ac | 4,627 | py | Python | gdelt_api.py | nikitcha/ceebios_poke_stream | 9f955ec99982281e7ca60fd12325804a1ab87bb4 | [
"MIT"
] | null | null | null | gdelt_api.py | nikitcha/ceebios_poke_stream | 9f955ec99982281e7ca60fd12325804a1ab87bb4 | [
"MIT"
] | null | null | null | gdelt_api.py | nikitcha/ceebios_poke_stream | 9f955ec99982281e7ca60fd12325804a1ab87bb4 | [
"MIT"
] | null | null | null | import collections.abc
config = {'query':
{
'keywords':{
'in':[],
'out':[],
'or':[]
},
'domain':{
'in':[],
'out':[]
},
'... | 39.887931 | 278 | 0.378215 |
0ff62a8b1374f6616c51acea76d80d5b94074841 | 773 | py | Python | scripts/kaldi_parser.py | dresen/praat | bb56291a64a54670066fb3b3faab0f0083a838f1 | [
"MIT"
] | null | null | null | scripts/kaldi_parser.py | dresen/praat | bb56291a64a54670066fb3b3faab0f0083a838f1 | [
"MIT"
] | null | null | null | scripts/kaldi_parser.py | dresen/praat | bb56291a64a54670066fb3b3faab0f0083a838f1 | [
"MIT"
] | null | null | null | import os
import sys
import codecs
import optparse
from Danpass import DanPASS
SCRIPT = '[danpass_parser.py]: '
parser = optparse.OptionParser()
parser.add_option('-o', '--output',
dest="fout",
default="danpass_out",
)
parser.add_option('-c', '--corpus',
... | 23.424242 | 62 | 0.619664 |
975c6ab19bd1994b30ef18a91fff38027ea86d8a | 1,044 | py | Python | polls/models.py | jshields/django-tutorial-polls-app | a36e4ebc47c085e4b6fdcf0d3e9b1a4e382dd992 | [
"BSD-3-Clause"
] | null | null | null | polls/models.py | jshields/django-tutorial-polls-app | a36e4ebc47c085e4b6fdcf0d3e9b1a4e382dd992 | [
"BSD-3-Clause"
] | 2 | 2020-06-05T19:40:53.000Z | 2021-06-10T21:06:33.000Z | polls/models.py | jshields/django-tutorial-polls-app | a36e4ebc47c085e4b6fdcf0d3e9b1a4e382dd992 | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django.db import models
from django.utils import timezone
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published') # verbose_name='date published'?
def __str__(self):
return self.question_text
def ... | 29.828571 | 87 | 0.704023 |
d168790de0f78c2e5df4518948ace8f0644d9223 | 1,218 | py | Python | Configuration/Generator/python/HerwigppUE_CUETHppS1_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/Generator/python/HerwigppUE_CUETHppS1_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/Generator/python/HerwigppUE_CUETHppS1_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
# Tune from CMS for the CTEQ6L1 PDF
# CUETHppS1
# Values provided by Paolo Gunnellini
herwigppUESettingsBlock = cms.PSet(
hwpp_ue_CUETHppS1EnergyExtrapol = cms.vstring(
'set /Herwig/UnderlyingEvent/MPIHandler:EnergyExtrapolation Power',
'set /Herwig/Unde... | 39.290323 | 84 | 0.70936 |
59d2ab660aa9e2cb006da9d1aa61876ac4d36e3a | 1,576 | py | Python | tests/fannkuch-redux.py | edmundmk/ylang | d8744052bb33fd98fc02bd0c6e9fb476e6cd259c | [
"MIT"
] | 1 | 2016-01-09T16:02:41.000Z | 2016-01-09T16:02:41.000Z | tests/fannkuch-redux.py | edmundmk/ylang | d8744052bb33fd98fc02bd0c6e9fb476e6cd259c | [
"MIT"
] | null | null | null | tests/fannkuch-redux.py | edmundmk/ylang | d8744052bb33fd98fc02bd0c6e9fb476e6cd259c | [
"MIT"
] | null | null | null | # The Computer Language Benchmarks Game
# http://benchmarksgame.alioth.debian.org/
# contributed by Isaac Gouy
# converted to Java by Oleg Mazurov
# converted to Python by Buck Golemon
# modified by Justin Peel
def fannkuch(n):
maxFlipsCount = 0
permSign = True
checksum = 0
perm1 = list(r... | 27.172414 | 64 | 0.474619 |
b2454cc95ad47acbf953e083b249296eaa896ddf | 41,137 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/azure/azcollection/plugins/modules/azure_rm_storageaccount.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/azure/azcollection/plugins/modules/azure_rm_storageaccount.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/azure/azcollection/plugins/modules/azure_rm_storageaccount.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOC... | 45.355017 | 156 | 0.574884 |
e2ed1d7cf2b87016d0bf62000b61eb1f66bf24f5 | 2,033 | py | Python | findballs.py | RocketRedNeck/BucketVision | 186cfa79b03853a40bf99cf8f2ef36b18a5b42cf | [
"MIT"
] | null | null | null | findballs.py | RocketRedNeck/BucketVision | 186cfa79b03853a40bf99cf8f2ef36b18a5b42cf | [
"MIT"
] | null | null | null | findballs.py | RocketRedNeck/BucketVision | 186cfa79b03853a40bf99cf8f2ef36b18a5b42cf | [
"MIT"
] | 1 | 2019-01-11T00:49:49.000Z | 2019-01-11T00:49:49.000Z | import cv2
import numpy as np
class FindBalls:
"""
An OpenCV pipeline generated by GRIP.
"""
def __init__(self):
"""initializes all values to presets or None if need to be set
"""
self.f = 0.5
self.hue = [0.0, 61.74061433447099]
self.sat = [73.3812949640287... | 34.457627 | 102 | 0.564683 |
750a43ca0c86706ef864e5ab7fe672fd95189a84 | 2,212 | py | Python | crosshair/libimpl/jsonlib.py | lmontand/CrossHair | ddcea5a19ea2ba48ac47fff4dcf1a1aa4479393c | [
"MIT"
] | null | null | null | crosshair/libimpl/jsonlib.py | lmontand/CrossHair | ddcea5a19ea2ba48ac47fff4dcf1a1aa4479393c | [
"MIT"
] | null | null | null | crosshair/libimpl/jsonlib.py | lmontand/CrossHair | ddcea5a19ea2ba48ac47fff4dcf1a1aa4479393c | [
"MIT"
] | null | null | null | import importlib
import re
import sys
from crosshair import register_patch, ResumedTracing, NoTracing
from crosshair.libimpl.builtinslib import CrossHairValue, SymbolicBool, SymbolicInt
from crosshair.tracers import ResumedTracing
def _jsonint(self):
with NoTracing():
if isinstance(self, CrossHairValue):... | 35.111111 | 88 | 0.683544 |
45948f35f9e3c074886a132d543cfdd515c38fe9 | 6,571 | py | Python | RunWorkFlow_CMS.py | erdc/cmtb | b5ad0fb7499f69739f775ff4d1a9cd380df7761a | [
"MIT"
] | 2 | 2018-07-13T19:05:50.000Z | 2019-06-14T13:08:42.000Z | RunWorkFlow_CMS.py | erdc/cmtb | b5ad0fb7499f69739f775ff4d1a9cd380df7761a | [
"MIT"
] | 1 | 2021-02-12T00:43:45.000Z | 2021-02-13T14:56:06.000Z | RunWorkFlow_CMS.py | erdc/cmtb | b5ad0fb7499f69739f775ff4d1a9cd380df7761a | [
"MIT"
] | 5 | 2018-07-03T12:46:34.000Z | 2020-08-17T12:38:32.000Z | # -*- coding: utf-8 -*-
#!/home/number/anaconda2/bin/python
import matplotlib
matplotlib.use('Agg')
import os, getopt, sys, shutil, glob, logging, yaml
import datetime as DT
from subprocess import check_output
import numpy as np
from frontback.frontBackCMS import CMSanalyze
from frontback.frontBackCMS import CMSsimSetu... | 45.006849 | 159 | 0.635063 |
a09d6d8e8005e4c6d455ed0299dab77730b4c778 | 4,239 | py | Python | src/_cffi_src/build_openssl.py | mattsb42-aws/cryptography | e687b8f7f40e30ef88e9de889c55cd7fdec99762 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2021-01-30T13:23:54.000Z | 2021-06-07T21:35:19.000Z | src/_cffi_src/build_openssl.py | mattsb42-aws/cryptography | e687b8f7f40e30ef88e9de889c55cd7fdec99762 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 7 | 2019-11-28T21:48:38.000Z | 2020-08-02T18:06:40.000Z | src/_cffi_src/build_openssl.py | mattsb42-aws/cryptography | e687b8f7f40e30ef88e9de889c55cd7fdec99762 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 6 | 2020-05-29T21:46:30.000Z | 2020-12-15T20:32:19.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import os
import sys
from distutils import dist
from distutils.ccompiler ... | 34.185484 | 79 | 0.631989 |
d1a183c77052d3d8a5fa3442a0c1120f0a872166 | 303 | py | Python | data/multilingual/Latn.KMB/Sans_12/pdf_to_json_test_Latn.KMB_Sans_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Latn.KMB/Sans_12/pdf_to_json_test_Latn.KMB_Sans_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Latn.KMB/Sans_12/pdf_to_json_test_Latn.KMB_Sans_12.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Latn.KMB/Sans_12/udhr_Latn.KMB_Sans_12.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 30.3 | 73 | 0.811881 |
61deeae977b5164c6db3c95baa368eaa69f18454 | 19,953 | py | Python | test/test_base.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 36 | 2016-06-06T03:57:19.000Z | 2022-03-01T05:11:26.000Z | test/test_base.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 9 | 2017-05-30T19:30:33.000Z | 2019-12-13T22:51:55.000Z | test/test_base.py | sebleier/colr | 72913aca7fcb19bf1a7f1c34dd820e40459143a4 | [
"MIT"
] | 7 | 2017-03-16T10:28:15.000Z | 2021-11-16T17:28:16.000Z | #!/usr/bin/env python3
""" test_base.py
Unit tests for colr/base.py
-Christopher Welborn 05-19-2019
"""
from colr.base import (
ChainedBase,
ChainedPart,
CodePart,
TextPart,
get_code_indices,
get_indices,
get_indices_list,
)
from .testing_tools import (
ColrTestCase,
TestFi... | 31.079439 | 80 | 0.455921 |
2b3c8cecae4444d808687a0c7f2030c9feb80337 | 9,900 | py | Python | graphtheory/structures/multigraphs.py | kgashok/graphs-dict | 0ff4ae303e8824e6bb8474d23b29a7b3e5ed8e60 | [
"BSD-3-Clause"
] | null | null | null | graphtheory/structures/multigraphs.py | kgashok/graphs-dict | 0ff4ae303e8824e6bb8474d23b29a7b3e5ed8e60 | [
"BSD-3-Clause"
] | 1 | 2020-02-11T13:54:53.000Z | 2020-02-11T17:08:49.000Z | graphtheory/structures/multigraphs.py | kgashok/graphs-dict | 0ff4ae303e8824e6bb8474d23b29a7b3e5ed8e60 | [
"BSD-3-Clause"
] | 1 | 2020-02-09T16:51:06.000Z | 2020-02-09T16:51:06.000Z | #!/usr/bin/python
from graphtheory.structures.edges import Edge
class MultiGraph(dict):
"""The class defining a weighted multigraph.
Nodes can be numbers, strings, or any hashable objects.
We would like to compare nodes.
Internal structure of an exemplary directed multigraph:
{"A": {"B":... | 35.483871 | 87 | 0.54404 |
3d17c05a200820bbc2caed9cc7b6d2ec2001c6a6 | 3,709 | py | Python | pilbox/errors.py | fdoumet/pilbox | 5b3c245f42e540253b19f74455d90179a79af8a6 | [
"Apache-2.0"
] | null | null | null | pilbox/errors.py | fdoumet/pilbox | 5b3c245f42e540253b19f74455d90179a79af8a6 | [
"Apache-2.0"
] | null | null | null | pilbox/errors.py | fdoumet/pilbox | 5b3c245f42e540253b19f74455d90179a79af8a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2013 Adam Gschwender
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 20.048649 | 75 | 0.688056 |
9273c9d03c4dbe90a628cb74ca7e7f9fe376689a | 2,825 | py | Python | privacy_extensions/priv_ex.py | SchnoppDog/how-to-eui64-and-privacy-extensions | dc437067757e69b3325ec3f49cfae4abbf4baf0c | [
"MIT"
] | null | null | null | privacy_extensions/priv_ex.py | SchnoppDog/how-to-eui64-and-privacy-extensions | dc437067757e69b3325ec3f49cfae4abbf4baf0c | [
"MIT"
] | null | null | null | privacy_extensions/priv_ex.py | SchnoppDog/how-to-eui64-and-privacy-extensions | dc437067757e69b3325ec3f49cfae4abbf4baf0c | [
"MIT"
] | null | null | null | import hashlib
import secrets
from datetime import datetime
from getmac import get_mac_address
def createSecret():
return secrets.token_hex()
def peMDFive():
# EUI-64 bases approach from ../eui64/eui64_shot_ver.py
macAddr = get_mac_address(interface="Ethernet")
macArray = macAddr.spl... | 34.036145 | 146 | 0.554336 |
7c75690cd2e41f1cebac5ea6b9d90ca025db629a | 606 | py | Python | communities/migrations/0004_auto_20170812_1950.py | isabernardes/Heriga | 03a9e690f587d6defe497346f85c181c8a707deb | [
"Unlicense"
] | 2 | 2016-02-17T19:32:47.000Z | 2016-02-28T14:24:27.000Z | communities/migrations/0004_auto_20170812_1950.py | isabernardes/Heriga | 03a9e690f587d6defe497346f85c181c8a707deb | [
"Unlicense"
] | 1 | 2017-04-15T15:44:43.000Z | 2017-04-15T15:44:43.000Z | communities/migrations/0004_auto_20170812_1950.py | isabernardes/Heriga | 03a9e690f587d6defe497346f85c181c8a707deb | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2017-08-12 17:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('communities', '0003_auto_20... | 26.347826 | 133 | 0.674917 |
706705ca7523ce5d36bf3185b00147590de11dde | 836 | py | Python | main/main/urls.py | dqdang/ward-hop | 941489273c14749658bdbd9d6b2b38c59b3333f6 | [
"Unlicense"
] | 1 | 2021-05-03T05:01:21.000Z | 2021-05-03T05:01:21.000Z | main/main/urls.py | dqdang/ward-hop | 941489273c14749658bdbd9d6b2b38c59b3333f6 | [
"Unlicense"
] | null | null | null | main/main/urls.py | dqdang/ward-hop | 941489273c14749658bdbd9d6b2b38c59b3333f6 | [
"Unlicense"
] | 1 | 2022-02-02T13:08:05.000Z | 2022-02-02T13:08:05.000Z | """main URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vi... | 34.833333 | 77 | 0.706938 |
c02847dc930e5783c0b59366c6c54d44e34638be | 881 | py | Python | easycls/helpers/configs.py | HearyShen/EasyClassification | 02ab7bfff508f8153a5c4d11c0d2419c69fb9bfb | [
"MIT"
] | 4 | 2020-03-03T04:07:42.000Z | 2020-03-03T04:19:20.000Z | easycls/helpers/configs.py | HearyShen/EasyClassification | 02ab7bfff508f8153a5c4d11c0d2419c69fb9bfb | [
"MIT"
] | null | null | null | easycls/helpers/configs.py | HearyShen/EasyClassification | 02ab7bfff508f8153a5c4d11c0d2419c69fb9bfb | [
"MIT"
] | 1 | 2021-01-16T02:27:09.000Z | 2021-01-16T02:27:09.000Z | import yaml
def parse_cfgs(path):
"""
Parse a configuration file
Usage:
```python
cfgs = parse_cfgs('config.yml')
task = cfgs["data"].get("task")
pretrain = cfgs["model"].get("pretrained", False)
num_classes = cfgs["model"].get("num_classes")
lr = cfgs["optimizer"].get("lr", 0.01... | 20.97619 | 83 | 0.586833 |
5bc20594b1736c9e2dffe657da3065b5259f3408 | 76 | py | Python | app/apps/health/tests/unittests/__init__.py | giordan83/dockdj | 8d57057b89cf2414e18e6cda733af944e32dbbe7 | [
"MIT"
] | 64 | 2015-10-04T02:54:06.000Z | 2021-03-30T04:02:47.000Z | app/apps/health/tests/unittests/__init__.py | kodani/elasticdock | a413be1075a0b3c5ac77bb2686b97ac39ef5cb1d | [
"MIT"
] | 7 | 2015-10-05T15:11:34.000Z | 2017-10-30T03:44:03.000Z | app/apps/health/tests/unittests/__init__.py | kodani/elasticdock | a413be1075a0b3c5ac77bb2686b97ac39ef5cb1d | [
"MIT"
] | 15 | 2015-11-13T21:02:48.000Z | 2019-10-01T08:06:01.000Z | # -*- coding: utf-8 -*-
"""The unittests package for the ``health`` app."""
| 25.333333 | 51 | 0.578947 |
fe60666df6a3b848589becd47d6491e0d26078cb | 8,013 | py | Python | blog/views.py | nixrajput/nixlab-blog-api-django | 9934ee9055e919f101fc53061aa7e297c812d80d | [
"BSD-3-Clause"
] | 1 | 2020-09-04T19:23:42.000Z | 2020-09-04T19:23:42.000Z | blog/views.py | nixrajput/nixlab-blog-api-django | 9934ee9055e919f101fc53061aa7e297c812d80d | [
"BSD-3-Clause"
] | null | null | null | blog/views.py | nixrajput/nixlab-blog-api-django | 9934ee9055e919f101fc53061aa7e297c812d80d | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import status
from rest_framework.authentication import TokenAuthentication
from rest_framework.decorators import api_view, permission_classes, authentication_classes
from rest_framework.filters import SearchFilter, OrderingFilter
from rest_framework.generics import ListAPIView
from rest_framework.p... | 33.95339 | 98 | 0.672782 |
40211463f37ebc719b348901ef691acdf325d4e0 | 2,574 | py | Python | aiohttp/web_server.py | shuckc/aiohttp | d7147ebfdbb77da015e41579e1028bbfca982516 | [
"Apache-2.0"
] | 2 | 2019-12-02T08:41:28.000Z | 2021-12-13T22:04:25.000Z | aiohttp/web_server.py | shuckc/aiohttp | d7147ebfdbb77da015e41579e1028bbfca982516 | [
"Apache-2.0"
] | 89 | 2021-01-16T13:09:58.000Z | 2021-10-12T07:06:48.000Z | aiohttp/web_server.py | shuckc/aiohttp | d7147ebfdbb77da015e41579e1028bbfca982516 | [
"Apache-2.0"
] | 1 | 2020-08-03T09:42:48.000Z | 2020-08-03T09:42:48.000Z | """Low level HTTP server."""
import asyncio
import warnings
from typing import Any, Awaitable, Callable, Dict, List, Optional # noqa
from .abc import AbstractStreamWriter
from .http_parser import RawRequestMessage
from .streams import StreamReader
from .web_protocol import RequestHandler, _RequestFactory, _RequestHan... | 33 | 88 | 0.631702 |
0b73502e829e91e7af261bb91ae1043e14c006ca | 1,557 | py | Python | selection.py | Exaltead/wallpaper-changer | 13a8983e43ae587dc47d65f918cf39907c8009a9 | [
"MIT"
] | null | null | null | selection.py | Exaltead/wallpaper-changer | 13a8983e43ae587dc47d65f918cf39907c8009a9 | [
"MIT"
] | null | null | null | selection.py | Exaltead/wallpaper-changer | 13a8983e43ae587dc47d65f918cf39907c8009a9 | [
"MIT"
] | null | null | null | import re
import datetime as dt
def select_submission(config, reddit):
resolution = config['resolution']
selected_submission = None
bests = []
for subreddit in config['subreddits']:
valid_submissions = _load_wallpaper_submissions(
reddit, subreddit, resolution)
if len(va... | 29.942308 | 129 | 0.649326 |
67623f3733a3500e1f7124b1688c3370a659cef4 | 28,974 | py | Python | src/the_tale/the_tale/blogs/tests/test_requests.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | 1 | 2020-04-02T11:51:20.000Z | 2020-04-02T11:51:20.000Z | src/the_tale/the_tale/blogs/tests/test_requests.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | null | null | null | src/the_tale/the_tale/blogs/tests/test_requests.py | devapromix/the-tale | 2a10efd3270734f8cf482b4cfbc5353ef8f0494c | [
"BSD-3-Clause"
] | null | null | null |
import smart_imports
smart_imports.all()
class BaseTestRequests(utils_testcase.TestCase):
def setUp(self):
super(BaseTestRequests, self).setUp()
self.place1, self.place2, self.place3 = game_logic.create_test_map()
self.account_1 = self.accounts_factory.create_account()
self.acco... | 48.29 | 178 | 0.654345 |
eafb855709dbd6aa562f3f9e955127713698fa39 | 283 | py | Python | tests/__init__.py | jmknoble/json-indent | fd1b81f257bc870f51fd6d540c4751c707198f88 | [
"MIT"
] | 1 | 2021-05-19T17:10:33.000Z | 2021-05-19T17:10:33.000Z | tests/__init__.py | jmknoble/json-indent | fd1b81f257bc870f51fd6d540c4751c707198f88 | [
"MIT"
] | 2 | 2021-06-04T15:16:13.000Z | 2021-06-04T15:18:58.000Z | tests/__init__.py | jmknoble/json-indent | fd1b81f257bc870f51fd6d540c4751c707198f88 | [
"MIT"
] | null | null | null | import logging
import sys
LOG_FORMAT = "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
LOG_LEVEL = logging.DEBUG
LOG_STREAM = sys.stdout
logging.basicConfig(format=LOG_FORMAT, level=LOG_LEVEL, stream=LOG_STREAM)
logger = logging.getLogger(__name__)
logger.setLevel(LOG_LEVEL)
| 23.583333 | 74 | 0.777385 |
b869a500d7f25b327568e3fa5e009905aa105b04 | 7,130 | py | Python | payload/arm/request.py | payload-code/payload-python | d7c07c679781021ff6e27c13feae22dec0f7c1bc | [
"MIT"
] | 5 | 2020-07-11T14:07:53.000Z | 2021-10-30T20:05:14.000Z | payload/arm/request.py | payload-code/payload-python | d7c07c679781021ff6e27c13feae22dec0f7c1bc | [
"MIT"
] | 5 | 2019-12-21T17:46:09.000Z | 2021-08-14T16:26:39.000Z | payload/arm/request.py | payload-code/payload-python | d7c07c679781021ff6e27c13feae22dec0f7c1bc | [
"MIT"
] | 2 | 2019-09-16T07:32:07.000Z | 2021-01-07T11:42:42.000Z | import os
import re
import sys
import payload
import requests
import copy
from ..utils import (convert_fieldmap, map_attrs, map_object,
nested_qstring_keys, object2data)
from .attr import Attr
from .object import ARMObject
if sys.version_info >= (3,0):
from urllib.parse import urljoin
else:
... | 38.128342 | 109 | 0.557363 |
1bc07218ca49066f112f4338892271c32a172e16 | 1,281 | py | Python | web-scrapping/tweets/scrap-twitter-reddit/scrap-praw.py | pradeep-charism/bigdata-analytics-ml | 7448cf61ba7b2c4be54f2d6b08f00b7641389633 | [
"MIT"
] | null | null | null | web-scrapping/tweets/scrap-twitter-reddit/scrap-praw.py | pradeep-charism/bigdata-analytics-ml | 7448cf61ba7b2c4be54f2d6b08f00b7641389633 | [
"MIT"
] | null | null | null | web-scrapping/tweets/scrap-twitter-reddit/scrap-praw.py | pradeep-charism/bigdata-analytics-ml | 7448cf61ba7b2c4be54f2d6b08f00b7641389633 | [
"MIT"
] | null | null | null | import pandas as pd
import praw
reddit_read_only = praw.Reddit(client_id="mUDx28SwnElkOkkZP_fMYA", # your client id
client_secret="vJ1g77oYII-EqJjuzAn7dz76DOzV8Q", # your client secret
user_agent="Scraper 1.0 by /u/mtech-proj")
subreddit = reddit_read_on... | 31.243902 | 100 | 0.651054 |
84dc2d8b2b601ceb448b96a12e0644d517d283d5 | 1,549 | py | Python | menu.py | Hec98/to-doListTinyDB | 254ab387963cfefdabe0d42257975874c99956ef | [
"MIT"
] | 1 | 2022-02-06T21:52:58.000Z | 2022-02-06T21:52:58.000Z | menu.py | Hec98/to-doList | 254ab387963cfefdabe0d42257975874c99956ef | [
"MIT"
] | null | null | null | menu.py | Hec98/to-doList | 254ab387963cfefdabe0d42257975874c99956ef | [
"MIT"
] | null | null | null | from simple_term_menu import TerminalMenu
from time import sleep
def pausa(t = 0.5): input('Press a key to continue') if(t == 0) else sleep(t)
def menu(title, items):
cursor = "❯ "
cursor_style = ("fg_cyan", "bold")
menu_style = ("fg_gray", "fg_cyan")
main_menu = TerminalMenu(
menu_entries = ... | 28.685185 | 77 | 0.598451 |
b16641a61b594fd56e94423b7c0964d87d156897 | 604 | py | Python | allalgorithms/math/prime_numbers.py | RQuispeC/allalgorithms-python | 6be290fc79e0e6a421b39f83ef9f908b6a424acb | [
"MIT"
] | null | null | null | allalgorithms/math/prime_numbers.py | RQuispeC/allalgorithms-python | 6be290fc79e0e6a421b39f83ef9f908b6a424acb | [
"MIT"
] | null | null | null | allalgorithms/math/prime_numbers.py | RQuispeC/allalgorithms-python | 6be290fc79e0e6a421b39f83ef9f908b6a424acb | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
#
# Numeric Algorithms
# The All ▲lgorithms library for python
#
# Contributed by: Rodolfo
# Github: @RQuispeC
#
import math
SIEVE_LIMIT = 1000000
def sieve(n):
prime = [True]*(n+1)
prime[0] = False
prime[1] = False
for i in range(2,int(math.sqrt(n)) + 1):
if prime[i]:
... | 18.875 | 44 | 0.539735 |
e70e881f0f1c78852d0558a597b253c4b1805d24 | 3,671 | py | Python | tools/sim/test/test_carla_integration.py | alexlin2/openpilot | 6e789fae7098eab20d4f60d88b88dec383d8765f | [
"MIT"
] | null | null | null | tools/sim/test/test_carla_integration.py | alexlin2/openpilot | 6e789fae7098eab20d4f60d88b88dec383d8765f | [
"MIT"
] | null | null | null | tools/sim/test/test_carla_integration.py | alexlin2/openpilot | 6e789fae7098eab20d4f60d88b88dec383d8765f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import time
import unittest
from multiprocessing import Queue
from cereal import messaging
from selfdrive.manager.helpers import unblock_stdout
from tools.sim import bridge
from tools.sim.bridge import CarlaBridge
class TestCarlaIntegration(unittest.TestCase):
"""
Tests n... | 33.990741 | 160 | 0.711795 |
7ea5fe4651cf0ebd97d731aa79b3ee6a24bfd434 | 208 | py | Python | problems/interviews/pipeline_processing/processor/printer.py | percebus/leetcode-excercises | 1d746e2255a3a5a652535ed1984a5aa45165e17e | [
"Unlicense"
] | null | null | null | problems/interviews/pipeline_processing/processor/printer.py | percebus/leetcode-excercises | 1d746e2255a3a5a652535ed1984a5aa45165e17e | [
"Unlicense"
] | null | null | null | problems/interviews/pipeline_processing/processor/printer.py | percebus/leetcode-excercises | 1d746e2255a3a5a652535ed1984a5aa45165e17e | [
"Unlicense"
] | null | null | null | from .processor import Processor
# pylint: disable=too-few-public-methods
class PrinterProcessor(Processor):
def process(self, data: float):
print(data)
# pylint: enable=too-few-public-methods
| 20.8 | 40 | 0.735577 |
26e598c551796707e90fbb7bf17bf33e9136dd22 | 2,569 | py | Python | docker-app/qfieldcloud/core/cron.py | stcz/qfieldcloud | b128f8689268d73de052e67e0c09c6c0d5abdc05 | [
"MIT"
] | null | null | null | docker-app/qfieldcloud/core/cron.py | stcz/qfieldcloud | b128f8689268d73de052e67e0c09c6c0d5abdc05 | [
"MIT"
] | null | null | null | docker-app/qfieldcloud/core/cron.py | stcz/qfieldcloud | b128f8689268d73de052e67e0c09c6c0d5abdc05 | [
"MIT"
] | null | null | null | import logging
import os
from datetime import timedelta
from django.conf import settings
from django.utils import timezone
from django_cron import CronJobBase, Schedule
from invitations.utils import get_invitation_model
from sentry_sdk import capture_message
from ..core.models import Job
from .invitations_utils impor... | 32.518987 | 133 | 0.670689 |
a616283d0c100c34e700df70e39719220715e276 | 3,881 | py | Python | nova/api/openstack/compute/plugins/v3/rescue.py | bopopescu/nova-40 | d8d5e4c4e30d0e605001ebab9f19005d2ea96f99 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/rescue.py | bopopescu/nova-40 | d8d5e4c4e30d0e605001ebab9f19005d2ea96f99 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/rescue.py | bopopescu/nova-40 | d8d5e4c4e30d0e605001ebab9f19005d2ea96f99 | [
"Apache-2.0"
] | 1 | 2020-07-24T09:44:17.000Z | 2020-07-24T09:44:17.000Z | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 34.963964 | 79 | 0.654728 |
2fb0754e2c2dfb9f4fa6a8c7acb17483d888abd0 | 1,317 | py | Python | examples/get_accurate_gains.py | mylkmoney/robin_stocks | 743e55f3b6dbdbef2992cbd4fae61db88c20ab61 | [
"MIT"
] | 2 | 2020-03-29T07:12:33.000Z | 2021-01-16T17:27:10.000Z | examples/get_accurate_gains.py | mylkmoney/robin_stocks | 743e55f3b6dbdbef2992cbd4fae61db88c20ab61 | [
"MIT"
] | null | null | null | examples/get_accurate_gains.py | mylkmoney/robin_stocks | 743e55f3b6dbdbef2992cbd4fae61db88c20ab61 | [
"MIT"
] | null | null | null | import robin_stocks as r
'''
Robinhood includes dividends as part of your net gain. This script removes
dividends from net gain to figure out how much your stocks/options have paid
off.
Note: load_portfolio_profile() contains some other useful breakdowns of equity.
Print profileData and see what other values you can ... | 35.594595 | 128 | 0.762339 |
65a4d659dfa4f8b3da1ae7286d35b9aa26e40e21 | 1,075 | py | Python | Python/Day 6/Day6pt2.py | Techn1cal1ty/2020-Advent-of-Code | 9ffd9b192e34aa793749a30097b6a2ad6bd8df81 | [
"MIT"
] | null | null | null | Python/Day 6/Day6pt2.py | Techn1cal1ty/2020-Advent-of-Code | 9ffd9b192e34aa793749a30097b6a2ad6bd8df81 | [
"MIT"
] | null | null | null | Python/Day 6/Day6pt2.py | Techn1cal1ty/2020-Advent-of-Code | 9ffd9b192e34aa793749a30097b6a2ad6bd8df81 | [
"MIT"
] | null | null | null | import sys
import re
def CreateRecord(inStr):
return inStr
def readFile(fileName):
records = []
with open(fileName) as file:
inStr = ""
for line in file:
line = line.strip()
if line == "":
records.append(CreateRecord(inStr.strip()))
... | 23.369565 | 60 | 0.449302 |
4aaefac3f597d65f0637cbb7e304a994d11ef50d | 3,108 | py | Python | promsnaps/config.py | ant31/prombench | 8f676e2654a7477e2bf0b39930fd599f75828612 | [
"Apache-2.0"
] | null | null | null | promsnaps/config.py | ant31/prombench | 8f676e2654a7477e2bf0b39930fd599f75828612 | [
"Apache-2.0"
] | null | null | null | promsnaps/config.py | ant31/prombench | 8f676e2654a7477e2bf0b39930fd599f75828612 | [
"Apache-2.0"
] | null | null | null | """
Acquire runtime configuration from environment variables (etc).
"""
import os
import yaml
def logfile_path(jsonfmt=False, debug=False):
"""
Returns the a logfileconf path following this rules:
- conf/logging_debug_json.conf # jsonfmt=true, debug=true
- conf/logging_json.conf # jsonfmt=... | 27.263158 | 87 | 0.638996 |
bcd59bff06f78c7c9f27433200fa6f9cc8868003 | 1,219 | py | Python | copydir/copydir/src/main/java/com/copydir/a.py | yangyaojia/Java-Learn | 19d725d3496a50176c6885ec738219dbc4d045a7 | [
"MIT"
] | null | null | null | copydir/copydir/src/main/java/com/copydir/a.py | yangyaojia/Java-Learn | 19d725d3496a50176c6885ec738219dbc4d045a7 | [
"MIT"
] | null | null | null | copydir/copydir/src/main/java/com/copydir/a.py | yangyaojia/Java-Learn | 19d725d3496a50176c6885ec738219dbc4d045a7 | [
"MIT"
] | null | null | null | import requests
import os
def URL( a ):
return "https://api.bilibili.com/x/relation/stat?vmid=" + a.__str__()
def URL2( a ):
return "https://api.bilibili.com/x/web-interface/card?mid=" + a.__str__()
headers = {
'Host': 'api.bilibili.com',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:... | 30.475 | 99 | 0.630025 |
9a9591e1da15403e77234c524199cc78fdfb4cfc | 21,973 | py | Python | env/lib/python3.6/site-packages/pylint/extensions/_check_docs_utils.py | RaphaelCavalcante/python-uart | 20d1f0051489fc01f80478e46bab2bab21ecae07 | [
"MIT"
] | null | null | null | env/lib/python3.6/site-packages/pylint/extensions/_check_docs_utils.py | RaphaelCavalcante/python-uart | 20d1f0051489fc01f80478e46bab2bab21ecae07 | [
"MIT"
] | 5 | 2021-02-08T20:23:23.000Z | 2022-01-13T00:49:40.000Z | env/lib/python3.6/site-packages/pylint/extensions/_check_docs_utils.py | RaphaelCavalcante/python-uart | 20d1f0051489fc01f80478e46bab2bab21ecae07 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2018 Ashley Whetter <ashley@awhetter.co.uk>
# Copyright (c) 2016-2017 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2016 Yuri Bochkarev <baltazar.bz@gmail.com>
# Copyright (c) 2016 Glenn Matthews <glenn@e-dad.net>
# Copyright (c) 2016 Moises Lopez <moylop260@vauxoo.co... | 30.349448 | 102 | 0.570018 |
93210aad14efa2d21dfadd545dc7fa7112587459 | 821 | py | Python | src/nia/mutations/mutation.py | salar-shdk/nia | bb0f1b941240b627291dd8212b8840cbe77b0398 | [
"MIT"
] | 8 | 2021-09-06T07:20:23.000Z | 2022-02-23T23:18:22.000Z | src/nia/mutations/mutation.py | salar-shdk/nia | bb0f1b941240b627291dd8212b8840cbe77b0398 | [
"MIT"
] | null | null | null | src/nia/mutations/mutation.py | salar-shdk/nia | bb0f1b941240b627291dd8212b8840cbe77b0398 | [
"MIT"
] | null | null | null | from functools import wraps
import inspect
class Mutation():
def __init__(self):
pass
def mutate(self, population, random_population):
pass
@classmethod
def initializer(self, func):
"""
Automatically assigns the parameters.
"""
names, varargs, keywords,... | 27.366667 | 78 | 0.559074 |
3f831f26c9b4d9dc2a9521f7f7297f6f454a86c1 | 3,340 | py | Python | src/scripts/parser_dot.py | nirmal-suthar/gcc_lite | 53b25acb8d4702a9f1b369c862e7e484be2385f9 | [
"MIT"
] | 2 | 2021-05-27T10:45:50.000Z | 2021-06-07T13:51:53.000Z | src/scripts/parser_dot.py | nirmal-suthar/gcc_lite | 53b25acb8d4702a9f1b369c862e7e484be2385f9 | [
"MIT"
] | null | null | null | src/scripts/parser_dot.py | nirmal-suthar/gcc_lite | 53b25acb8d4702a9f1b369c862e7e484be2385f9 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import sys, argparse, pydot
from argparse import ArgumentParser
FILTERED_LIST = [';','{','}']
def remove_redundancy(tree):
newList = tree[:1]
for child in tree[1:]:
if child in FILTERED_LIST:
continue
elif type(child) is list:
child = remove_re... | 27.603306 | 114 | 0.596407 |
519229bfa4ecfa83a7ecac65a3b46d71e3cda7a3 | 4,415 | py | Python | bark/runtime/scenario/scenario_generation/deterministic_drone_challenge.py | RdecKa/bark | 4aa4c901417e3a2c97050894ec61fcb57cc94e6e | [
"MIT"
] | null | null | null | bark/runtime/scenario/scenario_generation/deterministic_drone_challenge.py | RdecKa/bark | 4aa4c901417e3a2c97050894ec61fcb57cc94e6e | [
"MIT"
] | null | null | null | bark/runtime/scenario/scenario_generation/deterministic_drone_challenge.py | RdecKa/bark | 4aa4c901417e3a2c97050894ec61fcb57cc94e6e | [
"MIT"
] | null | null | null | # Copyright (c) 2020 fortiss GmbH
#
# Authors: Julian Bernhard, Klemens Esterle, Patrick Hart and
# Tobias Kessler
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
from bark.runtime.scenario import Scenario
from bark.runtime.scenario.scenario_genera... | 40.136364 | 107 | 0.662061 |
dd86c5d61f4a7487a56de0d0b9b590e6e0508b88 | 1,562 | py | Python | iepy/webui/corpus/fields.py | hanjx16/iepy_zh | 98c9acf76410a085c0a77dfbe8837daf81c27a48 | [
"BSD-3-Clause"
] | 1 | 2018-08-04T05:16:13.000Z | 2018-08-04T05:16:13.000Z | iepy/webui/corpus/fields.py | hanjx16/iepy_zh | 98c9acf76410a085c0a77dfbe8837daf81c27a48 | [
"BSD-3-Clause"
] | null | null | null | iepy/webui/corpus/fields.py | hanjx16/iepy_zh | 98c9acf76410a085c0a77dfbe8837daf81c27a48 | [
"BSD-3-Clause"
] | null | null | null | import ast
from nltk.tree import Tree
from django.db import models
class ListField(models.TextField, metaclass=models.SubfieldBase):
description = "Python list"
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def to_python(self, value):
if not value:
v... | 23.313433 | 78 | 0.59219 |
01e8975f85bfc50161a87070e5be24881415e585 | 2,239 | py | Python | src/data.py | solak647/seminar-chatbot | 01e45d34f74134e8be94094c0bc8e64d76965b5b | [
"MIT"
] | null | null | null | src/data.py | solak647/seminar-chatbot | 01e45d34f74134e8be94094c0bc8e64d76965b5b | [
"MIT"
] | null | null | null | src/data.py | solak647/seminar-chatbot | 01e45d34f74134e8be94094c0bc8e64d76965b5b | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
def get_data():
df = pd.read_csv('../data/myPersonality/mypersonality_final.csv', encoding='latin1')
print("The size of data is {0}".format(df.shape[0]))
labels = ['cEXT','cNEU','cAGR','cCON','cOPN']
for label i... | 46.645833 | 117 | 0.663689 |
a4f32e91148a8587c3c10710e312268eb1662b4b | 165 | py | Python | discum/utils/exceptions.py | teplinsky-maxim/Discord-S.C.U.M | bf0111020a3bd72fb071b6d09892d781c68b3792 | [
"MIT"
] | null | null | null | discum/utils/exceptions.py | teplinsky-maxim/Discord-S.C.U.M | bf0111020a3bd72fb071b6d09892d781c68b3792 | [
"MIT"
] | null | null | null | discum/utils/exceptions.py | teplinsky-maxim/Discord-S.C.U.M | bf0111020a3bd72fb071b6d09892d781c68b3792 | [
"MIT"
] | null | null | null | class CaptchaException(Exception):
pass
class InvalidGuildInviteException(Exception):
pass
class EmailVerificationRequiredException(Exception):
pass
| 15 | 52 | 0.793939 |
c34f3bd2d17aca32aeaf40da9ac88251af4a99fd | 1,445 | py | Python | python_code/main.py | zach-23/gcloud-vm-scheduler | b4701623f59acb5e14b250a5286c88745dfc94a2 | [
"Apache-2.0"
] | null | null | null | python_code/main.py | zach-23/gcloud-vm-scheduler | b4701623f59acb5e14b250a5286c88745dfc94a2 | [
"Apache-2.0"
] | null | null | null | python_code/main.py | zach-23/gcloud-vm-scheduler | b4701623f59acb5e14b250a5286c88745dfc94a2 | [
"Apache-2.0"
] | null | null | null | import os, base64, json
from googleapiclient import errors, discovery
from google.auth import compute_engine
project = os.environ['PROJECT_ID']
zone = os.environ['ZONE']
credentials = compute_engine.Credentials()
compute = discovery.build('compute', 'v1', credentials=credentials)
def get_instances(compute, zone, pro... | 30.744681 | 118 | 0.641522 |
d1f61e19b456c7f1edca4692079bb369ca501674 | 1,378 | py | Python | andes/utils/misc.py | mhdella/andes | 5b0d2e3e101a38fe0fd2d27343a0ce3f900be45e | [
"Apache-2.0"
] | 1 | 2019-12-24T12:57:05.000Z | 2019-12-24T12:57:05.000Z | andes/utils/misc.py | mhdella/andes | 5b0d2e3e101a38fe0fd2d27343a0ce3f900be45e | [
"Apache-2.0"
] | null | null | null | andes/utils/misc.py | mhdella/andes | 5b0d2e3e101a38fe0fd2d27343a0ce3f900be45e | [
"Apache-2.0"
] | null | null | null | import logging
import os
import platform
import tempfile
logger = logging.getLogger(__name__)
def get_config_load_path(conf_path=None):
"""
Return config file load path
Priority:
1. conf_path
2. current directory
3. home directory
Parameters
----------
conf_path
... | 21.2 | 74 | 0.585631 |
7186b87cc4d8353ff5b338cbb87c75f2efd6df23 | 33,528 | py | Python | ivadomed/scripts/automate_training.py | kanishk16/ivadomed | cc28e360ca2f09de51e2d4be165d8db20f9d79a2 | [
"MIT"
] | 87 | 2020-06-19T16:43:36.000Z | 2022-03-23T03:07:50.000Z | ivadomed/scripts/automate_training.py | kanishk16/ivadomed | cc28e360ca2f09de51e2d4be165d8db20f9d79a2 | [
"MIT"
] | 778 | 2020-06-21T22:42:55.000Z | 2022-03-31T19:03:54.000Z | ivadomed/scripts/automate_training.py | kanishk16/ivadomed | cc28e360ca2f09de51e2d4be165d8db20f9d79a2 | [
"MIT"
] | 282 | 2020-07-25T18:01:08.000Z | 2022-02-01T23:35:54.000Z | #!/usr/bin/env python
"""
This script enables training and comparison of models on multiple GPUs.
Usage:
```
python scripts/automate_training.py -c path/to/config.json -p path/to/config_hyper.json \
-n number_of_iterations --all-combin
```
"""
import argparse
import copy
import itertools
from functools import parti... | 41.037944 | 124 | 0.581633 |
82b29e0f9815fc9ee32f36058d8e24f8fc658519 | 2,808 | py | Python | host/pypwm_control/imu_stream.py | e-belski/rust-copter | 562703c30a16c8d2763ca0f3e3fbb7d8be7c6681 | [
"MIT"
] | 3 | 2020-02-14T23:06:34.000Z | 2021-05-17T13:49:30.000Z | host/pypwm_control/imu_stream.py | e-belski/rust-copter | 562703c30a16c8d2763ca0f3e3fbb7d8be7c6681 | [
"MIT"
] | 34 | 2020-03-18T01:22:34.000Z | 2021-09-23T18:59:49.000Z | host/pypwm_control/imu_stream.py | ebelski/rust-copter | 562703c30a16c8d2763ca0f3e3fbb7d8be7c6681 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""IMU data stream
The implementation uses the motion_sensor library to decode IMU readings.
"""
import motion_sensor
class ImuReading:
"""Valid IMU reading types"""
Acc = motion_sensor.Acc
Gyro = motion_sensor.Gyro
Mag = motion_sensor.Mag
class ImuStream:
"""An iterat... | 30.857143 | 88 | 0.637108 |
38fd8ca7ad9a48daa79595ef499d2f756478612e | 2,253 | py | Python | src/backend/emotion-server/maum/emotion/apps.py | ma-um/ma-um | b6f8452aa9916bd0ad10b2a37a8167ccdfc164a2 | [
"MIT"
] | null | null | null | src/backend/emotion-server/maum/emotion/apps.py | ma-um/ma-um | b6f8452aa9916bd0ad10b2a37a8167ccdfc164a2 | [
"MIT"
] | 13 | 2021-11-01T05:10:34.000Z | 2021-12-06T08:22:52.000Z | src/backend/emotion-server/maum/emotion/apps.py | ma-um/ma-um | b6f8452aa9916bd0ad10b2a37a8167ccdfc164a2 | [
"MIT"
] | 1 | 2021-10-20T08:07:22.000Z | 2021-10-20T08:07:22.000Z | from django.apps import AppConfig
from kobert.utils import get_tokenizer
from kobert.pytorch_kobert import get_pytorch_kobert_model
import torch
from torch import nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data import Dataset, DataLoader
import gluonnlp as nlp
import numpy as np
fr... | 35.203125 | 151 | 0.669774 |
223f8f4e32ad35f616d32e665f5cc299e67c1f13 | 535 | py | Python | server/settings/environments/production.py | efojs/censortracker_backend | 1654e86a5f9004c9ddd13886c4d1e0ce7276f1cd | [
"MIT"
] | 8 | 2020-08-17T09:12:21.000Z | 2022-03-05T09:25:29.000Z | server/settings/environments/production.py | efojs/censortracker_backend | 1654e86a5f9004c9ddd13886c4d1e0ce7276f1cd | [
"MIT"
] | 17 | 2020-06-30T08:55:00.000Z | 2021-12-12T01:25:56.000Z | server/settings/environments/production.py | efojs/censortracker_backend | 1654e86a5f9004c9ddd13886c4d1e0ce7276f1cd | [
"MIT"
] | 3 | 2020-07-29T04:51:31.000Z | 2021-08-01T12:37:32.000Z | # -*- coding: utf-8 -*-
"""
This file contains all the settings that defines the development server.
SECURITY WARNING: don't run with debug turned on in production!
"""
from server.settings.components.common import BASE_DIR
DEBUG = True
ALLOWED_HOSTS = ["*"]
# Static files:
# https://docs.djangoproject.com/en/1.11... | 25.47619 | 83 | 0.749533 |
ec35a38d4dd3896a5eca4bf5b37516aefdf7d798 | 1,501 | py | Python | graph_compression/compression_lib/compression_op_utils.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 7 | 2020-03-15T12:14:07.000Z | 2021-12-01T07:01:09.000Z | graph_compression/compression_lib/compression_op_utils.py | JustinDurham/google-research | 9049acf9246c1b75170f0c6757e62a8f619a9db6 | [
"Apache-2.0"
] | 25 | 2020-07-25T08:53:09.000Z | 2022-03-12T00:43:02.000Z | graph_compression/compression_lib/compression_op_utils.py | JustinDurham/google-research | 9049acf9246c1b75170f0c6757e62a8f619a9db6 | [
"Apache-2.0"
] | 4 | 2021-02-08T10:25:45.000Z | 2021-04-17T14:46:26.000Z | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | 35.738095 | 78 | 0.748834 |
625c85ba7799686d462497a417f71e90ffad4a38 | 2,513 | py | Python | internal/twirptest/source_relative/source_relative_pb2_twirp.py | rizalgowandy/twirp | 6d39013d250bb15fd7bd0d9e105340cb0ca1224a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | internal/twirptest/source_relative/source_relative_pb2_twirp.py | rizalgowandy/twirp | 6d39013d250bb15fd7bd0d9e105340cb0ca1224a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | internal/twirptest/source_relative/source_relative_pb2_twirp.py | rizalgowandy/twirp | 6d39013d250bb15fd7bd0d9e105340cb0ca1224a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Code generated by protoc-gen-twirp_python v7.1.1, DO NOT EDIT.
# source: source_relative.proto
try:
import httplib
from urllib2 import Request, HTTPError, urlopen
except ImportError:
import http.client as httplib
from urllib.request import Request, urlopen
from urllib.error import HTTPError
impor... | 32.636364 | 103 | 0.621568 |
ad5740c25a31b02dae6120d5dbc80fa8a98d779d | 260 | py | Python | demo/dsl/sfl/darcy/darcy_eqn.py | IgnitionProject/ignition | 0eeb3a7878d828bc3c06d2cb2dd781e17776a8a6 | [
"BSD-2-Clause-FreeBSD"
] | 7 | 2015-01-25T18:15:48.000Z | 2022-03-09T17:39:12.000Z | demo/dsl/sfl/darcy/darcy_eqn.py | IgnitionProject/ignition | 0eeb3a7878d828bc3c06d2cb2dd781e17776a8a6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | demo/dsl/sfl/darcy/darcy_eqn.py | IgnitionProject/ignition | 0eeb3a7878d828bc3c06d2cb2dd781e17776a8a6 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | from ignition.dsl.sfl.language import *
from sympy import latex
u = Variable('u')
f = Coefficient('f')
rho, mu, g = Constants('rho mu g')
k_i = RegionConstant('k_i')
a = (k_i * rho * g) / mu
eqn = strong_form(div(-a * grad(u)) - f)
print "eqn:", latex(eqn)
| 20 | 40 | 0.638462 |
785fb3dbbc119d657f601c2bb7e18541490e1a7d | 54 | py | Python | pysyncobj/revision.py | kaxap/PySyncObj | 88e8638b2695e9248733fd747fac718a4b42da65 | [
"MIT"
] | 1 | 2018-08-30T03:09:14.000Z | 2018-08-30T03:09:14.000Z | pysyncobj/revision.py | kaxap/PySyncObj | 88e8638b2695e9248733fd747fac718a4b42da65 | [
"MIT"
] | null | null | null | pysyncobj/revision.py | kaxap/PySyncObj | 88e8638b2695e9248733fd747fac718a4b42da65 | [
"MIT"
] | null | null | null | REVISION = '2c8a3263d0dbe3f8d7b8a03e93e86d385c1de558'
| 27 | 53 | 0.888889 |
4592124ee5ceccdebae6d1ea3a6047ab8482c4dc | 2,015 | py | Python | Packs/CommonScripts/Scripts/JSONFileToCSV/JSONFileToCSV_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/JSONFileToCSV/JSONFileToCSV_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/JSONFileToCSV/JSONFileToCSV_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import os
import demistomock as demisto
from CommonServerPython import entryTypes
TEST_DATA_DIR = 'test_data'
def getFilePath_mock(entry_id):
raise Exception('getFilePath_' + entry_id)
def test_json_to_csv():
from JSONFileToCSV import json_to_csv
data = [
{'a': 1, 'b': 2, 'c': 3},
{'a... | 34.152542 | 109 | 0.652605 |
3f2a33793028f0883ffe94dd8a32626ad5c0351c | 4,336 | py | Python | python/paddle/fluid/tests/unittests/test_add_position_encoding_op.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 3 | 2019-07-17T09:30:31.000Z | 2021-12-27T03:16:55.000Z | python/paddle/fluid/tests/unittests/test_add_position_encoding_op.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-07-30T05:22:32.000Z | 2019-07-30T05:22:32.000Z | python/paddle/fluid/tests/unittests/test_add_position_encoding_op.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 4 | 2019-09-30T02:15:34.000Z | 2019-09-30T02:41:30.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 32.118519 | 93 | 0.563192 |
51704cf410d1ad11e685f5f5352d0ae99de982fd | 18,274 | py | Python | tuf_vectors/metadata.py | advancedtelematic/tuf-test-vectors | aa45fb90df9d77a869bd94e3e27d1a5e96db0916 | [
"MIT"
] | 6 | 2018-06-14T06:47:42.000Z | 2022-03-11T13:57:48.000Z | tuf_vectors/metadata.py | advancedtelematic/tuf-test-vectors | aa45fb90df9d77a869bd94e3e27d1a5e96db0916 | [
"MIT"
] | 31 | 2017-05-18T09:50:25.000Z | 2021-11-01T08:39:34.000Z | tuf_vectors/metadata.py | advancedtelematic/tuf-test-vectors | aa45fb90df9d77a869bd94e3e27d1a5e96db0916 | [
"MIT"
] | 6 | 2017-05-17T16:26:36.000Z | 2020-10-02T13:24:25.000Z | # -*- coding: utf-8 -*-
import base64
import binascii
import ed25519
import json
import os
import types
from Crypto.Hash import SHA256, SHA512
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_PSS
from os import path
from securesystemslib.formats import encode_canonical as olpc_cjson
from tuf_vecto... | 34.029795 | 120 | 0.537923 |
56ba1e9b710d8da756380b76c009b2720ba36a39 | 2,969 | py | Python | Fig5c_Number_of_lipid_droplets.py | MortisHuang/VIFFI-image-analysis | ad144970e9cb53d61119dd96370157251c03cc07 | [
"MIT"
] | null | null | null | Fig5c_Number_of_lipid_droplets.py | MortisHuang/VIFFI-image-analysis | ad144970e9cb53d61119dd96370157251c03cc07 | [
"MIT"
] | null | null | null | Fig5c_Number_of_lipid_droplets.py | MortisHuang/VIFFI-image-analysis | ad144970e9cb53d61119dd96370157251c03cc07 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 14 18:19:41 2019
@author: Mortis
"""
import numpy as np
import scipy.ndimage as ndimage
import scipy.ndimage.filters as filters
import glob
import os
from PIL import Image
import pandas as pd
import datetime
#%% Set the output file location
run_data = dat... | 29.69 | 85 | 0.634557 |
37bf40bf560ec5822c6ec4bece286af927249efa | 29,324 | py | Python | eventdata/parameter_sources/elasticlogs_kibana_source.py | dliappis/rally-eventdata-track | c8b9c8b0de17e613d2b0db87ce0f2d0e13250a67 | [
"Apache-2.0"
] | 33 | 2017-02-22T17:59:46.000Z | 2021-11-02T07:07:40.000Z | eventdata/parameter_sources/elasticlogs_kibana_source.py | dliappis/rally-eventdata-track | c8b9c8b0de17e613d2b0db87ce0f2d0e13250a67 | [
"Apache-2.0"
] | 68 | 2017-03-10T12:57:36.000Z | 2021-07-14T14:26:03.000Z | eventdata/parameter_sources/elasticlogs_kibana_source.py | dliappis/rally-eventdata-track | c8b9c8b0de17e613d2b0db87ce0f2d0e13250a67 | [
"Apache-2.0"
] | 45 | 2017-02-22T18:03:58.000Z | 2022-01-01T02:18:41.000Z | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this f... | 70.15311 | 1,164 | 0.605068 |
5861ac4f1f213fec39512bee2f7cbe0abdf0bb55 | 5,774 | py | Python | 03_Linear_Regression/C0309_logistic_regression.py | zhuyuanxiang/tensorflow_cookbook | 57d7ee719385ddd249a67c3a85bd336e884a67e5 | [
"MIT"
] | 7 | 2019-11-30T05:42:47.000Z | 2021-10-09T03:02:19.000Z | 03_Linear_Regression/C0309_logistic_regression.py | zhuyuanxiang/tensorflow_cookbook | 57d7ee719385ddd249a67c3a85bd336e884a67e5 | [
"MIT"
] | null | null | null | 03_Linear_Regression/C0309_logistic_regression.py | zhuyuanxiang/tensorflow_cookbook | 57d7ee719385ddd249a67c3a85bd336e884a67e5 | [
"MIT"
] | 2 | 2019-12-05T06:44:48.000Z | 2021-10-09T03:02:20.000Z | # -*- encoding: utf-8 -*-
"""
@Author : zYx.Tom
@Contact : 526614962@qq.com
@site : https://github.com/zhuyuanxiang/tensorflow_cookbook
---------------------------
@Software : PyCharm
@Project : TensorFlow_Machine_Learning_Cookbook
@File : C0309_logistic_regression.py
@Version ... | 34.57485 | 115 | 0.706789 |
ba20e479c7a0e91a9f17f0168f2da031e386fa04 | 6,425 | py | Python | Buttons.py | BobMak/SpaceShooter | e31f240de27de291b543993c3bc7e50f350dfce6 | [
"MIT"
] | 1 | 2018-05-29T11:02:39.000Z | 2018-05-29T11:02:39.000Z | Buttons.py | BobMak/SpaceShooter | e31f240de27de291b543993c3bc7e50f350dfce6 | [
"MIT"
] | 10 | 2018-05-31T14:36:46.000Z | 2020-09-26T03:12:17.000Z | Buttons.py | BobMak/SpaceShooter | e31f240de27de291b543993c3bc7e50f350dfce6 | [
"MIT"
] | 3 | 2018-05-25T13:57:32.000Z | 2019-12-03T07:26:11.000Z | import pickle
import random
import pygame as pg
from Assets import *
import State
import Scripts
from Player import Player
from ShipGen import Generator
class Button(pygame.sprite.Sprite):
text = '---'
font = 0
def __init__(self, rect):
pygame.sprite.Sprite.__init__(self)
self.image = ... | 34.72973 | 122 | 0.564514 |
8387e4a5d05562163911630515ec9152543f90f9 | 3,922 | py | Python | airflow/providers/qubole/backport_provider_setup.py | aindrila2412/airflow | ded3dbbff0c8e4fabcee62a677394dec0db1aa45 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/providers/qubole/backport_provider_setup.py | aindrila2412/airflow | ded3dbbff0c8e4fabcee62a677394dec0db1aa45 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/providers/qubole/backport_provider_setup.py | aindrila2412/airflow | ded3dbbff0c8e4fabcee62a677394dec0db1aa45 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 37.352381 | 102 | 0.673381 |
926dadf00fe4c560f7f68b4e9a1e6b25c9352f0e | 1,765 | py | Python | hello/hello_imu.py | dkirkby/E4S | 497800a00047c048dcb1e8df51032d717c65ce41 | [
"BSD-2-Clause"
] | 5 | 2021-01-04T18:51:35.000Z | 2022-01-03T19:49:26.000Z | hello/hello_imu.py | dkirkby/E4S | 497800a00047c048dcb1e8df51032d717c65ce41 | [
"BSD-2-Clause"
] | null | null | null | hello/hello_imu.py | dkirkby/E4S | 497800a00047c048dcb1e8df51032d717c65ce41 | [
"BSD-2-Clause"
] | 2 | 2021-01-17T22:09:16.000Z | 2022-01-28T19:45:14.000Z | # UCI Electronics for Scientists
# https://github.com/dkirkby/E4S
#
# Read inertial motion parameters from the LSM6DS + LIS3MDL
# connected via the built-in I2C interface.
#
# The following files must be copied to your CIRCUITPY lib/ folder:
#
# adafruit_lis3mdl.mpy
# adafruit_lsm_6ds/*
# adafruit_register/*
#
# Con... | 32.685185 | 92 | 0.686119 |
237bb88bad7a44de879b1286eb507a6e8698b63e | 889 | py | Python | plgx-esp/tests/test_integration.py | dhoomakethu/plgx-esp | b466b52a5e16a0d12a61e505e48add83bee5bad4 | [
"MIT"
] | 20 | 2019-12-09T13:55:13.000Z | 2022-01-10T09:10:42.000Z | plgx-esp/tests/test_integration.py | dhoomakethu/plgx-esp | b466b52a5e16a0d12a61e505e48add83bee5bad4 | [
"MIT"
] | 13 | 2019-12-03T13:27:27.000Z | 2021-12-03T05:22:49.000Z | plgx-esp/tests/test_integration.py | dhoomakethu/plgx-esp | b466b52a5e16a0d12a61e505e48add83bee5bad4 | [
"MIT"
] | 16 | 2019-11-15T11:45:06.000Z | 2022-01-07T08:07:11.000Z | # -*- coding: utf-8 -*-
import pytest
from flask import url_for
from flask_login import current_user
from werkzeug.routing import BuildError
from polylogyx.users.mixins import NoAuthUserMixin
class TestStandaloneApi:
def test_no_manager(self, testapi):
with pytest.raises(BuildError):
url_fo... | 22.225 | 74 | 0.712036 |
37919962a65c7f6e8903a69d52ec011eaf5680b3 | 32,527 | py | Python | managed/devops/opscli/ybops/cloud/gcp/utils.py | waleedrehman31/yugabyte-db | d800d0fe4aca596e5ac33302b68ee909c1c44003 | [
"Apache-2.0",
"CC0-1.0"
] | 1 | 2021-06-11T10:23:00.000Z | 2021-06-11T10:23:00.000Z | managed/devops/opscli/ybops/cloud/gcp/utils.py | waleedrehman31/yugabyte-db | d800d0fe4aca596e5ac33302b68ee909c1c44003 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | managed/devops/opscli/ybops/cloud/gcp/utils.py | waleedrehman31/yugabyte-db | d800d0fe4aca596e5ac33302b68ee909c1c44003 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | # Copyright 2019 YugaByte, Inc. and Contributors
#
# Licensed under the Polyform Free Trial License 1.0.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://github.com/YugaByte/yugabyte-db/blob/master/licenses/POLYFORM-FREE-TRIAL-LIC... | 42.518954 | 100 | 0.597842 |
9f233a1148492c25e16ea85c9d80cf08c5b7cdea | 2,214 | py | Python | src/main/resources/servicenow/PollingCheckStatus.py | vkvasu25/servicenow_master | 2ec6f6b8a3c99a24ee690ca9ef51b9409a54ba96 | [
"MIT"
] | null | null | null | src/main/resources/servicenow/PollingCheckStatus.py | vkvasu25/servicenow_master | 2ec6f6b8a3c99a24ee690ca9ef51b9409a54ba96 | [
"MIT"
] | null | null | null | src/main/resources/servicenow/PollingCheckStatus.py | vkvasu25/servicenow_master | 2ec6f6b8a3c99a24ee690ca9ef51b9409a54ba96 | [
"MIT"
] | null | null | null | #
# Copyright 2017 XEBIALABS
#
# 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, distribute, subli... | 41 | 462 | 0.730804 |
5d67941fafd0843348088a98f6f7e03ecbb7055f | 1,888 | py | Python | Tools/LyTestTools/ly_test_tools/environment/waiter.py | cypherdotXd/o3de | bb90c4ddfe2d495e9c00ebf1e2650c6d603a5676 | [
"Apache-2.0",
"MIT"
] | 11 | 2021-07-08T09:58:26.000Z | 2022-03-17T17:59:26.000Z | Tools/LyTestTools/ly_test_tools/environment/waiter.py | RoddieKieley/o3de | e804fd2a4241b039a42d9fa54eaae17dc94a7a92 | [
"Apache-2.0",
"MIT"
] | 29 | 2021-07-06T19:33:52.000Z | 2022-03-22T10:27:49.000Z | Tools/LyTestTools/ly_test_tools/environment/waiter.py | RoddieKieley/o3de | e804fd2a4241b039a42d9fa54eaae17dc94a7a92 | [
"Apache-2.0",
"MIT"
] | 4 | 2021-07-06T19:24:43.000Z | 2022-03-31T12:42:27.000Z | """
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
Functions that repeatedly run until a condition is met
"""
import time
def wait_for(fn_act, timeout=30, exc=None,... | 37.76 | 115 | 0.677436 |
6f11ee0955006ed2fa3ff96e0ee719aec5f406fc | 1,379 | py | Python | ooobuild/lo/sheet/consolidation_descriptor.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/sheet/consolidation_descriptor.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/sheet/consolidation_descriptor.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 34.475 | 148 | 0.766497 |
d77e411bd755cadd68d0bd176b9fb2bdc9d49887 | 9,218 | py | Python | test/functional/example_test.py | AgenorCore/Agenor | c022ba2f2d29cea98a6966205f881389707b558b | [
"MIT"
] | 46 | 2021-04-11T20:15:51.000Z | 2021-06-02T16:13:11.000Z | test/functional/example_test.py | criptorob/Agenor | 38aa56e3b1cb75911bbb3fe63f4dab8fd243a85a | [
"MIT"
] | 5 | 2021-04-24T13:08:45.000Z | 2021-11-24T14:28:55.000Z | test/functional/example_test.py | criptorob/Agenor | 38aa56e3b1cb75911bbb3fe63f4dab8fd243a85a | [
"MIT"
] | 9 | 2021-04-12T12:28:34.000Z | 2021-05-14T14:45:19.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""An example functional test
The module-level docstring should include a high-level description of
what the t... | 41.336323 | 133 | 0.682578 |
5d2b86d1a6d5f8b7ed367d9ca62a727166a0e1a4 | 8,410 | py | Python | plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/_impl.py | pereman2/hydra | 6acb998a83b7e0a72d01297d2b2abcd131f28063 | [
"MIT"
] | null | null | null | plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/_impl.py | pereman2/hydra | 6acb998a83b7e0a72d01297d2b2abcd131f28063 | [
"MIT"
] | null | null | null | plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/_impl.py | pereman2/hydra | 6acb998a83b7e0a72d01297d2b2abcd131f28063 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import logging
from typing import Any, List, MutableMapping, Optional
import optuna
from hydra.core.config_loader import ConfigLoader
from hydra.core.override_parser.overrides_parser import OverridesParser
from hydra.core.override_parser.types impo... | 38.577982 | 90 | 0.651486 |
70fa01898ccc8a961a68f25980a71e13ec2b811c | 3,054 | py | Python | test/emr/test_emr_check_state.py | skimhub/aws-utils | 5496a7594ab90b1e658e8f9f8137e8943a39be1e | [
"Apache-2.0"
] | null | null | null | test/emr/test_emr_check_state.py | skimhub/aws-utils | 5496a7594ab90b1e658e8f9f8137e8943a39be1e | [
"Apache-2.0"
] | 13 | 2016-01-05T14:48:38.000Z | 2017-08-14T10:17:41.000Z | test/emr/test_emr_check_state.py | skimhub/aws-utils | 5496a7594ab90b1e658e8f9f8137e8943a39be1e | [
"Apache-2.0"
] | null | null | null | from random import sample
from aws_utils import NoSuchActivityError
from aws_utils.emr import check_state
from mock import patch
import pytest
RANDOM_STATUS = current_status_sample_emr = sample(set([1, 2, 3, 4, 5]), 1)[0]
MATCH_STATE = 'MATCH'
NOMATCH_STATE = 'NOMATCH'
REGION = 'us-reg'
mocked_response = {
'Clu... | 31.163265 | 104 | 0.604781 |
c0fda821c32bb54b0380f422f921e4cb7a32a827 | 24,038 | py | Python | BB/mods.py | poco0317/BarinadeBot-Rewrite | 4f34246178ab2ee0fd4c0a79fff5a43adbed134c | [
"MIT"
] | 2 | 2021-05-06T09:07:44.000Z | 2021-05-11T23:45:38.000Z | BB/mods.py | poco0317/BarinadeBot-Rewrite | 4f34246178ab2ee0fd4c0a79fff5a43adbed134c | [
"MIT"
] | null | null | null | BB/mods.py | poco0317/BarinadeBot-Rewrite | 4f34246178ab2ee0fd4c0a79fff5a43adbed134c | [
"MIT"
] | null | null | null | import os
import re
import discord
import asyncio
import traceback
import random
from discord.ext import commands
from BB.permissions import *
from BB.misc import EmbedFooter, GenericPaginator
class Moderation(commands.Cog):
#for things like linkblock or whatever
#or maybe role specific muting
de... | 62.598958 | 995 | 0.596306 |
cadb706270bc23aa21e998f58fc7138b85c912de | 5,488 | py | Python | django_blog/django_blog/settings.py | ZhuguanZhen/blog | a8e20b822b82b978b83709da8298ff8932a85449 | [
"MIT"
] | null | null | null | django_blog/django_blog/settings.py | ZhuguanZhen/blog | a8e20b822b82b978b83709da8298ff8932a85449 | [
"MIT"
] | null | null | null | django_blog/django_blog/settings.py | ZhuguanZhen/blog | a8e20b822b82b978b83709da8298ff8932a85449 | [
"MIT"
] | null | null | null | """
Django settings for django_blog project.
Generated by 'django-admin startproject' using Django 3.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import os... | 26.384615 | 91 | 0.624271 |
250a5d30306c45025ff99a614260934c1092fee1 | 4,304 | py | Python | gdsfactory/components/spiral_external_io.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | gdsfactory/components/spiral_external_io.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | gdsfactory/components/spiral_external_io.py | simbilod/gdsfactory | 4d76db32674c3edb4d16260e3177ee29ef9ce11d | [
"MIT"
] | null | null | null | """ bends with grating couplers inside the spiral
maybe: need to add grating coupler loopback as well
"""
from typing import Optional, Tuple
import numpy as np
from numpy import float64
from gdsfactory.cell import cell
from gdsfactory.component import Component
from gdsfactory.components.bend_euler import bend_euler
... | 30.964029 | 85 | 0.631506 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.