repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
Razi91/BiblioTeKa | user/migrations/0001_initial.py | 1 | 3850 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('books', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | gpl-2.0 | -7,719,696,728,595,929,000 | 41.777778 | 114 | 0.554286 | false |
pshchelo/heat | heat/engine/resources/aws/autoscaling/scaling_policy.py | 1 | 3521 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | 1,899,387,159,158,926,800 | 31.601852 | 78 | 0.599546 | false |
barct/odoo-coop | electric_utility/models/services.py | 1 | 1284 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, fields, api
class Se... | gpl-3.0 | 2,807,370,585,143,536,600 | 31.923077 | 78 | 0.522586 | false |
daineseh/kodi-plugin.video.ted-talks-chinese | youtube_dl/extractor/vevo.py | 14 | 17113 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_etree_fromstring,
compat_str,
compat_urlparse,
)
from ..utils import (
ExtractorError,
int_or_none,
sanitized_Request,
parse_iso8601,
)
class VevoBaseIE(InfoExtractor):
d... | gpl-2.0 | 1,389,593,283,926,902,800 | 37.804989 | 118 | 0.476772 | false |
MaximNevrov/neutron | neutron/extensions/l3_ext_ha_mode.py | 4 | 4105 | # Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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 applicabl... | apache-2.0 | 1,659,035,712,149,861,000 | 33.788136 | 79 | 0.68039 | false |
pkill-nine/qutebrowser | qutebrowser/keyinput/modeparsers.py | 2 | 11880 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | -2,268,448,873,351,734,500 | 35.109422 | 79 | 0.589731 | false |
botswana-harvard/bcpp-subject | bcpp_subject/admin/uncircumcised_admin.py | 1 | 1451 | from django.contrib import admin
from edc_base.modeladmin_mixins import audit_fieldset_tuple
from edc_base.fieldsets import Remove
from bcpp_visit_schedule.constants import T1, T2, T3
from ..admin_site import bcpp_subject_admin
from ..forms import UncircumcisedForm
from ..models import Uncircumcised
from .modeladmin_... | gpl-3.0 | 4,346,488,993,507,111,400 | 29.229167 | 63 | 0.611992 | false |
postlund/home-assistant | homeassistant/components/fitbit/sensor.py | 3 | 19391 | """Support for the Fitbit API."""
import datetime
import logging
import os
import time
from fitbit import Fitbit
from fitbit.api import FitbitOauth2Client
from oauthlib.oauth2.rfc6749.errors import MismatchingStateError, MissingTokenError
import voluptuous as vol
from homeassistant.components.http import HomeAssistan... | apache-2.0 | -3,180,641,553,304,962,000 | 36.290385 | 88 | 0.569646 | false |
bigfatnoob/DISCAW | Models/usp05.py | 1 | 7537 | """
# The USP05 Data Set
Standard header:
"""
from __future__ import division,print_function
import sys
sys.dont_write_bytecode = True
from lib import *
"""
@attribute ObjType {FT,PJ,RQ}
@attribute IntComplx {5.0,2.0,1.0,4.0,3.0,3.5,2.5,4.5,NULL}
@attribute DataFile {18.0,9.0,7.0,12.0,2.0,5.0,4.0,3.0,1.0,11.0,0.0,75... | mit | -4,062,622,610,972,723,700 | 28.794466 | 366 | 0.431737 | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.1/Lib/plat-unixware7/FCNTL.py | 1 | 1277 | # Generated by h2py from /usr/include/sys/fcntl.h
# Included from sys/types.h
def quad_low(x): return x.val[0]
ADT_EMASKSIZE = 8
SHRT_MIN = -32768
SHRT_MAX = 32767
INT_MIN = (-2147483647-1)
INT_MAX = 2147483647
LONG_MIN = (-2147483647-1)
LONG_MAX = 2147483647
OFF32_MAX = LONG_MAX
ISTAT_ASSERTED = 0
ISTAT_ASSUMED = 1
... | mit | 7,352,615,238,216,990,000 | 15.584416 | 49 | 0.675803 | false |
catapult-project/catapult-csm | telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr6/module.py | 23 | 18075 |
ds = {
'name': [
list(1)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ list(2)
+ li... | bsd-3-clause | 3,110,521,482,160,537,600 | 16.913776 | 17 | 0.277953 | false |
alvin319/CarnotKE | jyhton/lib-python/2.7/test/string_tests.py | 7 | 63425 | """
Common tests shared by test_str, test_unicode, test_userstring and test_string.
"""
import unittest, string, sys, struct
from test import test_support
from UserList import UserList
import _testcapi
class Sequence:
def __init__(self, seq='wxyz'): self.seq = seq
def __len__(self): return len(self.seq)
d... | apache-2.0 | -1,142,582,501,104,987,000 | 45.946706 | 108 | 0.516106 | false |
sialm/par_king | client/ParKingClient.py | 1 | 11117 | # from i2clibraries import i2c_hmc58831
from socket import socket
from socket import AF_INET
from socket import SOCK_STREAM
from socket import error as socket_error
from time import sleep
from time import time
from struct import pack
from datetime import datetime
from threading import Thread
import config
import ParKin... | mit | -7,633,728,508,509,363,000 | 34.749196 | 119 | 0.497976 | false |
rbaghdadi/ISIR | utils/speedup_model/src/old/fai_train.py | 1 | 2143 | from data_loader import *
from model import *
from model_bn import *
from torch.utils.data.sampler import SubsetRandomSampler
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
import numpy as np
import fastai as fai
from fastai.basic_data import DataLoader
from fire import Fir... | mit | -8,885,027,698,291,832,000 | 28.369863 | 97 | 0.640224 | false |
MontrealCorpusTools/PolyglotDB | tests/test_io_buckeye.py | 3 | 4891 | import pytest
import os
from polyglotdb.io import inspect_buckeye
from polyglotdb.io.parsers.buckeye import read_phones, read_words
from polyglotdb import CorpusContext
def test_load_phones(buckeye_test_dir):
expected_phones = [('{B_TRANS}', 0.0, 2.609000),
('IVER', 2.609000, 2.714347),
... | mit | 3,813,449,094,294,677,000 | 44.71028 | 120 | 0.521366 | false |
patacrep/patacrep | patacrep/songs/syntax.py | 1 | 1731 | """Generic parsing classes and methods"""
import functools
import logging
from patacrep.songs import errors
LOGGER = logging.getLogger()
class Parser:
"""Parser class"""
# pylint: disable=too-few-public-methods
def __init__(self):
self.filename = "" # Will be overloaded
self._errors = [... | gpl-2.0 | 4,681,234,503,793,055,000 | 27.377049 | 69 | 0.532062 | false |
shravan-shandilya/sendin.co.in | backend/bitcoin_server.py | 1 | 2950 | #!/usr/bin/python
from flask import Flask, url_for
from bitcoinlib.wallets import HDWallet
import time,random,string,requests,json,threading,icici
app = Flask(__name__)
watch_list = {}
completed_list = []
watch_daemon = None
wallet = HDWallet.create(name=time.ctime(),network='testnet')
json_data=open("credentials.json... | gpl-3.0 | -5,382,036,952,665,057,000 | 34.119048 | 118 | 0.606441 | false |
rossburton/yocto-autobuilder | lib/python2.7/site-packages/SQLAlchemy-0.8.0b2-py2.7-linux-x86_64.egg/sqlalchemy/testing/profiling.py | 6 | 9771 | """Profiling support for unit and performance tests.
These are special purpose profiling methods which operate
in a more fine-grained way than nose's profiling plugin.
"""
import os
import sys
from .util import gc_collect, decorator
from . import config
from nose import SkipTest
import pstats
import time
import coll... | gpl-2.0 | -1,129,422,760,990,505,600 | 32.234694 | 78 | 0.540886 | false |
idjaw/netman | tests/core/session_storage_test.py | 4 | 2237 | # Copyright 2015 Internap.
#
# 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, so... | apache-2.0 | -4,559,705,732,787,534,000 | 42.019231 | 89 | 0.721055 | false |
dotbot-io/webapp | config.py | 1 | 1227 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
BOOTSTRAP_SERVE_LOCAL = True
CATKIN_FOLDER = os.environ.get('CATKIN_FOLDER') or '/Users/ludus/develop/dotbot_ws/ros/'
... | gpl-2.0 | 1,334,177,387,230,055,400 | 34.057143 | 94 | 0.677262 | false |
azureplus/hue | desktop/core/ext-py/Django-1.6.10/tests/fixtures/models.py | 63 | 3312 | """
37. Fixtures.
Fixtures are a way of loading data into the database in bulk. Fixure data
can be stored in any serializable format (including JSON and XML). Fixtures
are identified by name, and are stored in either a directory named 'fixtures'
in the application directory, or in one of the directories named in the
`... | apache-2.0 | 4,860,130,536,462,389,000 | 29.953271 | 81 | 0.664251 | false |
CalebSLane/openelisglobal-core | liquibase/OE5.1/testCatalogKenya/Scripts/dictionary.py | 9 | 1356 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def get_comma_split_names( name ):
split_name_list = [name]
if ',' in name:
split_name_list = name.split(",")
elif ';' in name:
split_name_list = name.split(";")
for i in range(0, len(split_name_list)):
split_name_lis... | mpl-2.0 | -9,184,392,477,490,277,000 | 26.25 | 193 | 0.570059 | false |
getlinky/linky | backend/fetcher/tests.py | 2 | 1838 | import unittest
import responses
try:
# 1. Required when running via manage.py
from fetcher.fetcher import fetch, HTTPError
except ImportError:
# 2. Required when running via python fetcher/tests.py
from fetcher import fetch, HTTPError
class TestFetcher(unittest.TestCase):
@responses.activate
... | bsd-2-clause | 8,535,452,428,260,397,000 | 28.645161 | 68 | 0.54407 | false |
josenavas/QiiTa | qiita_pet/handlers/stats.py | 1 | 2654 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | 7,000,540,263,346,745,000 | 35.861111 | 79 | 0.541447 | false |
MartinHjelmare/home-assistant | homeassistant/components/amcrest/switch.py | 4 | 2486 | """Support for toggling Amcrest IP camera settings."""
import logging
from homeassistant.const import CONF_NAME, CONF_SWITCHES
from homeassistant.helpers.entity import ToggleEntity
from .const import DATA_AMCREST
_LOGGER = logging.getLogger(__name__)
# Switch types are defined like: Name, icon
SWITCHES = {
'mot... | apache-2.0 | -4,344,516,609,477,531,600 | 29.691358 | 67 | 0.612631 | false |
jjdmol/LOFAR | CEP/Calibration/BBSControl/scripts/solverexport.py | 1 | 2573 | #!/usr/bin/env python
#
# Script that generates ASCII output from solver statistics table
#
#
import sys
import pyrap.tables as pt
import lofar.bbs.solverquery as sq
# Variables
MSfilename=""
filename="solverstat.txt"
# TODO
# parse command arguments
if len(sys.argv)==1:
print "No MS filename given"
sys.exit(... | gpl-3.0 | 7,031,979,709,839,667,000 | 27.910112 | 139 | 0.67159 | false |
Mad-ness/cobbler-extensions | systems/way2/genprofiles.py | 1 | 3211 | #!/usr/bin/env
#
# -****-
#codingUTF-8 -*-
#
import os
import json
import yaml
import time
import uuid
import jinja2
import argparse
template_file = "template.yaml"
systems_file = "systems.yaml"
def loadyaml2dict(filename): return yaml.load(open(filename, 'r'))
def loadfile2plain(filename): return open(filename, ... | gpl-3.0 | -4,083,872,477,220,621,000 | 34.285714 | 224 | 0.639676 | false |
sadanandb/pmt | src/pyasm/web/html_wdg_test.py | 6 | 1705 | #!/usr/bin/python
###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way wit... | epl-1.0 | 4,263,023,429,376,281,000 | 22.680556 | 92 | 0.547214 | false |
lbouma/Cyclopath | pyserver/gwis/command_/user_unsubscribe.py | 1 | 4635 | # Copyright (c) 2006-2013 Regents of the University of Minnesota.
# For licensing terms, see the file LICENSE.
# For use with the spam.py script, uses a UUID to unsubscribe users from mails.
import os
import sys
import uuid
import conf
import g
from gwis import command
from gwis.exception.gwis_error import GWIS_Err... | apache-2.0 | -5,695,904,645,830,247,000 | 27.78882 | 79 | 0.59849 | false |
RapidApplicationDevelopment/tensorflow | tensorflow/contrib/solvers/python/ops/lanczos.py | 8 | 9246 | # 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... | apache-2.0 | 4,289,418,034,032,950,300 | 39.025974 | 80 | 0.632814 | false |
Metaswitch/calico-nova | nova/virt/hyperv/livemigrationops.py | 4 | 5120 | # Copyright 2012 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | -7,912,392,623,331,707,000 | 40.290323 | 78 | 0.62207 | false |
DikkeNeef/humtools | autoit/process.py | 2 | 4827 | # -*- coding: utf-8 -*-
__author__ = 'Jace Xu'
from .autoit import AUTO_IT
from .autoit import api, error
from .autoit import Properties
from .autoit import AutoItError
from ctypes.wintypes import *
@api.check(1, "run program failed")
def run(filename, work_dir="", show_flag=Properties.SW_SHOWNORMAL):
"""
... | apache-2.0 | -5,177,541,453,538,643,000 | 27.91018 | 79 | 0.630205 | false |
luckydonald/django-tarview | tarview/tests/test_views.py | 1 | 2492 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import platform
import os
import tarfile
from django.test import TestCase
from django.core.files import File
from django.http import HttpResponse
from django.test.client import RequestFactory
from django.core.files.base import ContentFile
from django im... | mit | 6,585,196,574,338,521,000 | 34.6 | 105 | 0.655297 | false |
scarface-4711/denonavr | denonavr/decorators.py | 1 | 5138 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This module implements the REST API to Denon AVR receivers.
:copyright: (c) 2021 by Oliver Goetz.
:license: MIT, see LICENSE for more details.
"""
import asyncio
import inspect
import logging
import time
import xml.etree.ElementTree as ET
from functools import wraps... | mit | 766,311,828,356,369,300 | 32.802632 | 79 | 0.626314 | false |
CasualBeer/Legofy | legofy/__init__.py | 1 | 9064 | from __future__ import unicode_literals
from PIL import Image, ImageSequence
import sys
import os
# Python 2 and 3 support
# TODO: Proper images2gif version that supports both Py 2 and Py 3 (mostly handling binary data)
if sys.version_info < (3,):
import legofy.images2gif_py2 as images2gif
else:
import legofy... | mit | -173,823,470,050,331,070 | 32.947566 | 120 | 0.615402 | false |
jesopo/bitbot | src/core_modules/channel_access.py | 1 | 3911 | #--depends-on check_mode
#--depends-on commands
#--depends-on permissions
from src import ModuleManager, utils
SPECIAL = ["low", "high", "admin"]
class Module(ModuleManager.BaseModule):
_name = "ChanAccess"
def _has_channel_access(self, target, user, names):
required_access = []
for name in ... | gpl-2.0 | -4,273,408,982,313,953,000 | 38.908163 | 79 | 0.551777 | false |
naterh/cloud-init-rax-pkg | cloudinit/config/cc_resolv_conf.py | 9 | 3866 | # vi: ts=4 expandtab
#
# Copyright (C) 2013 Craig Tracey
# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
#
# Author: Craig Tracey <craigtracey@gmail.com>
# Author: Juerg Haefliger <juerg.haefliger@hp.com>
#
# This program is free software: you can redistribute it and/or modify
# it unde... | gpl-3.0 | -3,221,011,069,594,861,600 | 32.327586 | 79 | 0.661924 | false |
owlabs/incubator-airflow | tests/test_utils/mock_operators.py | 1 | 1365 | # 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 u... | apache-2.0 | -3,687,914,404,034,162,000 | 34 | 63 | 0.731868 | false |
heri/openaccess | browser-ext/login/test/make_lastpass_csv.py | 26 | 1667 | #!/usr/bin/python
# *****************************************************************************
# Copyright (c) 2012, 2013, 2014 Lectorius, Inc.
# Authors:
# Vijay Pandurangan (vijayp@mitro.co)
# Evan Jones (ej@mitro.co)
# Adam Hilss (ahilss@mitro.co)
#
#
# This program is free software: you can redistribute it ... | gpl-3.0 | 8,697,218,888,819,779 | 30.471698 | 79 | 0.610078 | false |
gizmoguy/faucet | faucet/gauge_pollers.py | 7 | 9928 | """Library for polling dataplanes for statistics."""
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | apache-2.0 | 8,339,926,034,943,005,000 | 33.592334 | 110 | 0.605359 | false |
CopyChat/Plotting | Downscaling/climatechange.clt2.py | 1 | 24117 | #!/usr/bin/env python
########################################
#Globale Karte fuer tests
# from Rabea Amther
########################################
# http://gfesuite.noaa.gov/developer/netCDFPythonInterface.html
import math
import numpy as np
import pylab as pl
import Scientific.IO.NetCDF as IO
import matplotlib as... | gpl-3.0 | 1,598,114,237,466,660,400 | 29.800766 | 114 | 0.550649 | false |
behzadnouri/numpy | numpy/ma/extras.py | 2 | 56816 | """
Masked arrays add-ons.
A collection of utilities for `numpy.ma`.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
from __future__ import division, absolute_import, print_function
__all__ = [
'apply_along_axis', 'apply_o... | bsd-3-clause | -3,088,952,023,299,618,000 | 28.966245 | 83 | 0.554949 | false |
slank/ansible | hacking/dump_playbook_attributes.py | 14 | 1675 | #!/usr/bin/env python
import optparse
from jinja2 import Environment, FileSystemLoader
from ansible.playbook import Play
from ansible.playbook.block import Block
from ansible.playbook.role import Role
from ansible.playbook.task import Task
template_file = 'playbooks_directives.rst.j2'
oblist = {}
clist = []
clas... | gpl-3.0 | 5,719,085,790,880,470,000 | 33.895833 | 148 | 0.690746 | false |
vdenPython/python_training | fixture/contact.py | 1 | 6515 | # -*- coding: utf-8 -*-
__author__ = 'vden'
from model.contact import Contact
from model.group import Group
import re
class ContactHelper:
def __init__(self, app):
self.app = app
def create(self, contact):
wd = self.app.wd
self.app.navigation.open_add_new_page()
self.fill_con... | apache-2.0 | 7,957,171,386,964,191,000 | 45.870504 | 96 | 0.624405 | false |
rendermotion/RMPY | rig/biped/rig_parts/hand.py | 1 | 1972 | from RMPY.rig import rigBase
from RMPY.rig.biped.rig_parts import finger
from RMPY.rig import rigSingleJoint
import pymel.core as pm
class HandModel(rigBase.BaseModel):
def __init__(self):
super(HandModel, self).__init__()
self.fingers = []
self.palm = rigSingleJoint.RigSingleJoint()
cla... | lgpl-3.0 | -8,619,685,792,531,022,000 | 30.822581 | 105 | 0.622718 | false |
scottmcmaster/catapult | tracing/third_party/tvcm/third_party/rcssmin/_setup/py2/ext.py | 43 | 7489 | # -*- coding: ascii -*-
#
# Copyright 2007, 2008, 2009, 2010, 2011
# Andr\xe9 Malo or his licensors, as applicable
#
# 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.or... | bsd-3-clause | -4,656,518,016,770,663,000 | 28.484252 | 78 | 0.594605 | false |
escamilla/MultipartPostHandler | MultipartPostHandler.py | 1 | 3692 | #!/usr/bin/python
# Copyright 2013 Joshua Escamilla <jescamilla@hushmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any... | lgpl-3.0 | 2,126,666,777,738,652,000 | 30.555556 | 77 | 0.606176 | false |
frc1418/2015-vision | scratchpad/rio-mjpg/client.py | 2 | 3772 | #!/usr/bin/env python3
import cv2
import numpy as np
from optparse import OptionParser
import socket
import struct
import threading
import time
import logging
logger = logging.getLogger('cvclient')
class CaptureClient:
'''
This probably isn't terribly efficient..
'''
kPort = 1180
kMagicNum... | apache-2.0 | -1,006,342,026,339,089,400 | 22.72327 | 72 | 0.482503 | false |
mseaborn/switch | switch_mod/project/no_commit.py | 2 | 3824 | # Copyright 2015 The Switch Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
"""
Defines simple limitations on project dispatch without considering unit
commitment. This module is mutually exclusive with the project.commit
module which constrains dispatch to ... | apache-2.0 | 6,036,229,683,619,147,000 | 39.680851 | 77 | 0.705282 | false |
tjanez/obnam | obnamlib/sizeparse_tests.py | 4 | 3415 | # Copyright 2010-2014 Lars Wirzenius
#
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | gpl-3.0 | -1,943,482,080,466,903,600 | 34.947368 | 73 | 0.674963 | false |
EricMuller/mywebmarks-backend | requirements/twisted/Twisted-17.1.0/build/lib.linux-x86_64-3.5/twisted/web/test/test_wsgi.py | 13 | 74813 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.web.wsgi}.
"""
__metaclass__ = type
from sys import exc_info
import tempfile
import traceback
import warnings
from zope.interface.verify import verifyObject
from twisted.python.compat import intToBytes, urlquote, _PY3
f... | mit | 8,876,126,830,731,377,000 | 34.693225 | 87 | 0.594322 | false |
lupyuen/RaspberryPiImage | home/pi/GrovePi/Software/Python/others/temboo/Library/Foursquare/Users/PendingFriendRequests.py | 5 | 3448 | # -*- coding: utf-8 -*-
###############################################################################
#
# PendingFriendRequests
# Retrieves a list of pending friend requests for the authenticated user.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.... | apache-2.0 | -8,875,550,126,312,098,000 | 38.632184 | 171 | 0.695186 | false |
MISP/MISP | app/files/scripts/stix2/misp2stix2.py | 1 | 89636 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2017-2018 CIRCL Computer Incident Response Center Luxembourg (smile gie)
# Copyright (C) 2017-2018 Christian Studer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Li... | agpl-3.0 | 985,739,337,408,242,000 | 47.269251 | 191 | 0.583906 | false |
matthijsvk/multimodalSR | code/Experiments/neon-master/examples/faster-rcnn/tests/test_anchor_target_layer.py | 1 | 3984 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2016 Nervana Systems 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
#
# ... | mit | 66,151,425,816,529,656 | 35.888889 | 92 | 0.61496 | false |
numerodix/spiderfetch | spiderfetch/spiderfetch.py | 1 | 10626 | #!/usr/bin/env python
#
# <desc> Web spider and fetcher </desc>
from __future__ import absolute_import
import os
import shutil
import sys
import traceback
import time
import ansicolor
from spiderfetch import fetch
from spiderfetch import ioutils
from spiderfetch import recipe
from spiderfetch import spider
from spi... | gpl-2.0 | 3,621,005,735,312,478,000 | 36.814947 | 106 | 0.547619 | false |
BrainTech/openbci | obci/logic/configs/config_robot_3_dron.py | 1 | 1172 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class Config(object):
def __init__(self):
self.number_of_decisions = 8
self.number_of_states = 1
self.states_configs = ['state', 'letters', 'actions',
'letters_solver', 'actions_solver']
self.other_configs ... | gpl-3.0 | 9,074,573,015,595,318,000 | 49.956522 | 80 | 0.482082 | false |
IECS/MansOS | tools/IDE/src/newMote.py | 1 | 3693 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2008-2012 the MansOS team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice,
# ... | mit | 4,573,243,836,435,364,000 | 40.494382 | 103 | 0.661251 | false |
Thor77/TeamspeakStats | tsstats/client.py | 1 | 4656 | # -*- coding: utf-8 -*-
import datetime
import logging
from collections import MutableMapping
logger = logging.getLogger('tsstats')
class Clients(MutableMapping):
'''
A high-level-interface to multiple Client-objects
'''
def __init__(self, ident_map=None, *args, **kwargs):
'''
Initial... | mit | -7,876,739,570,331,043,000 | 25.913295 | 78 | 0.545318 | false |
angelverde/evadoc | models/menu.py | 2 | 1321 | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
response.KEY = KEY = 'youshallnotpass'
#########################################################################
## this is the main application menu add/remove items as required
#####################################... | gpl-3.0 | 6,759,180,747,864,015,000 | 38.969697 | 79 | 0.571645 | false |
safwanrahman/kitsune | kitsune/kbforums/forms.py | 5 | 3535 | from django import forms
from django.utils.translation import ugettext_lazy as _lazy
from kitsune.kbforums.models import Thread, Post
from kitsune.sumo.form_fields import StrippedCharField
MSG_TITLE_REQUIRED = _lazy(u'Please provide a title.')
MSG_TITLE_SHORT = _lazy(u'Your title is too short (%(show_value)s '
... | bsd-3-clause | 3,205,294,624,544,372,000 | 40.588235 | 78 | 0.534936 | false |
tomjelinek/pcs | pcs_test/tier0/lib/cib/test_resource_operations.py | 3 | 17581 | from functools import partial
from unittest import mock, TestCase
from lxml import etree
from pcs_test.tools import fixture
from pcs_test.tools.assertions import assert_report_item_list_equal
from pcs_test.tools.custom_mock import MockLibraryReportProcessor
from pcs_test.tools.misc import create_patcher
from pcs.comm... | gpl-2.0 | -154,898,943,181,782,850 | 33.005803 | 80 | 0.451567 | false |
jostep/tensorflow | tensorflow/python/framework/tensor_util_test.py | 7 | 32860 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,769,789,769,079,617,000 | 34.67861 | 123 | 0.601795 | false |
dklyle/trove-dashboard | trove_dashboard/content/database_backups/views.py | 2 | 4329 | # Copyright 2013 Rackspace Hosting
#
# 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 ... | apache-2.0 | -4,265,234,797,580,215,300 | 38.354545 | 79 | 0.657889 | false |
showerst/openstates | openstates/or/legislators.py | 1 | 4537 | from billy.scrape.legislators import LegislatorScraper, Legislator
from openstates.utils import LXMLMixin
import re
def itergraphs(elements, break_):
buf = []
for element in elements:
if element.tag == break_:
yield buf
buf = []
continue
buf.append(element)
... | gpl-3.0 | 4,962,277,494,263,386,000 | 37.12605 | 88 | 0.438836 | false |
schreiberx/sweet | tests/50_test_sphere_sph_solver_real_and_complex/test.py | 1 | 1312 | #! /usr/bin/env python3
import sys
import os
os.chdir(os.path.dirname(sys.argv[0]))
from mule_local.JobMule import *
from itertools import product
from mule.exec_program import *
exec_program('mule.benchmark.cleanup_all', catch_output=False)
jg = JobGeneration()
jg.compile.unit_test="test_sphere_sph_solver_real_and... | mit | 4,791,248,669,977,047,000 | 22.428571 | 79 | 0.720274 | false |
caelan/pyplanners | retired/planners/connectivity_graph/relaxed_connectivity_graph.py | 1 | 12764 | from .connectivity_graph import *
from misc.utils import *
from .utils import PRUNE_INACTIVE, CYCLE_INACTIVE, UPDATE_INACTIVE
# TODO
# - make the levels based on subproblem switches (use problem_reachable_sources). Don't count things moved by the same controller
# - flag to terminate costs/levels when the goals are re... | mit | -6,384,865,114,852,407,000 | 48.092308 | 178 | 0.655672 | false |
kxliugang/edx-platform | lms/djangoapps/teams/views.py | 8 | 49796 | """HTTP endpoints for the Teams API."""
import logging
from django.shortcuts import get_object_or_404, render_to_response
from django.http import Http404
from django.conf import settings
from django.core.paginator import Paginator
from django.views.generic.base import View
from rest_framework.generics import GenericA... | agpl-3.0 | 2,759,747,251,989,360,600 | 39.950658 | 129 | 0.619267 | false |
jacksonwilliams/arsenalsuite | cpp/lib/PyQt4/pyuic/uic/port_v3/invoke.py | 7 | 1837 | #############################################################################
##
## Copyright (c) 2011 Riverbank Computing Limited <info@riverbankcomputing.com>
##
## This file is part of PyQt.
##
## This file may be used under the terms of the GNU General Public
## License versions 2.0 or 3.0 as published by the Fre... | gpl-2.0 | 601,557,978,863,623,200 | 33.660377 | 79 | 0.663038 | false |
thejordan95/Groovebot2 | plugins/admin.py | 1 | 7255 | from util import hook
import os, sys
import re
import json
import time
import subprocess
@hook.command(autohelp=False, permissions=["permissions_users"])
def permissions(inp, bot=None, notice=None):
"""permissions [group] -- lists the users and their permission level who have permissions."""
permissions = bot... | gpl-3.0 | 6,485,051,281,526,788,000 | 31.828054 | 97 | 0.587043 | false |
RedhawkSDR/integration-gnuhawk | gnuradio/gr-digital/examples/ofdm/benchmark_tx.py | 15 | 4302 | #!/usr/bin/env python
#
# Copyright 2005,2006,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 3, or (at you... | gpl-3.0 | -3,181,240,704,205,923,300 | 34.262295 | 79 | 0.579265 | false |
andrewyoung1991/abjad | abjad/tools/rhythmmakertools/AccelerandoRhythmMaker.py | 1 | 169281 | # -*- encoding: utf-8 -*-
import math
from abjad.tools import datastructuretools
from abjad.tools import durationtools
from abjad.tools import scoretools
from abjad.tools import selectiontools
from abjad.tools.rhythmmakertools.RhythmMaker import RhythmMaker
from abjad.tools.topleveltools import attach
from abjad.tools.... | gpl-3.0 | 3,388,766,652,809,431,600 | 48.744931 | 114 | 0.290482 | false |
momikey/pyrge | music.py | 1 | 5751 | import pygame
__doc__ = """Module for streamed sound or music.
The L{Music} class can be used to play any sound, but it is particularly
useful for the playback of large music files, since it is optimized for
low memory usage. This object builds on the functionality provided by Pygame,
mainly by supporting more than a... | lgpl-2.1 | -4,195,474,969,560,348,700 | 36.344156 | 90 | 0.62563 | false |
Maccimo/intellij-community | python/helpers/pydev/pydev_tests_python/test_bytecode_utils.py | 10 | 1254 | from __future__ import print_function
import pytest
from _pydevd_bundle import pydevd_bytecode_utils
@pytest.fixture
def inner_decorator_code():
def power(exponent):
def outer(f):
def inner(*args):
result = f(*args)
return exponent ** result
return i... | apache-2.0 | -3,164,033,886,191,206,400 | 28.162791 | 98 | 0.633174 | false |
savoirfairelinux/django | django/contrib/gis/utils/ogrinspect.py | 36 | 8918 | """
This module is for inspecting OGR data sources and generating either
models for GeoDjango and/or mapping dictionaries for use with the
`LayerMapping` utility.
"""
from django.contrib.gis.gdal import DataSource
from django.contrib.gis.gdal.field import (
OFTDate, OFTDateTime, OFTInteger, OFTInteger64, OFTReal, O... | bsd-3-clause | -7,136,833,307,658,238,000 | 36.788136 | 92 | 0.623122 | false |
pieleric/odemis | src/odemis/acq/stitching/_simple.py | 2 | 3937 | # -*- coding: utf-8 -*-
'''
Created on 19 Jul 2017
@author: Éric Piel, Philip Winkler
Copyright © 2017 Éric Piel, Philip Winkler, Delmic
This file is part of Odemis.
Odemis is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free... | gpl-2.0 | -4,060,947,858,652,214,300 | 34.017857 | 226 | 0.657828 | false |
UTSA-ICS/python-openstackclient-SID | openstackclient/object/v1/object.py | 3 | 4440 | # Copyright 2013 Nebula Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | -3,496,593,673,283,125,000 | 28.210526 | 77 | 0.545495 | false |
JackNokia/robotframework | src/robot/result/keywordremover.py | 22 | 5204 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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... | apache-2.0 | -224,594,458,913,545,280 | 30.92638 | 78 | 0.640277 | false |
mikedh/trimesh | tests/test_ray.py | 1 | 9508 | try:
from . import generic as g
except BaseException:
import generic as g
class RayTests(g.unittest.TestCase):
def test_rays(self):
meshes = [g.get_mesh(**k)
for k in g.data['ray_data']['load_kwargs']]
rays = g.data['ray_data']['rays']
names = [m.metadata['file_n... | mit | -286,884,637,848,557,950 | 37.184739 | 79 | 0.505154 | false |
loli/sklearn-ensembletrees | benchmarks/bench_plot_omp_lars.py | 31 | 4457 | """Benchmarks of orthogonal matching pursuit (:ref:`OMP`) versus least angle
regression (:ref:`least_angle_regression`)
The input data is mostly low rank but is a fat infinite tail.
"""
from __future__ import print_function
import gc
import sys
from time import time
import numpy as np
from sklearn.linear_model impo... | bsd-3-clause | 3,028,455,366,158,458,400 | 35.235772 | 76 | 0.528158 | false |
mmcdermo/helpinghand | server/venv/lib/python2.7/site-packages/django/contrib/admin/util.py | 7 | 15672 | from __future__ import unicode_literals
import datetime
import decimal
from django.contrib.auth import get_permission_codename
from django.db import models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.deletion import Collector
from django.db.models.related import RelatedObject
from django.f... | mit | -2,093,303,613,755,990,800 | 32.630901 | 94 | 0.597882 | false |
js0701/chromium-crosswalk | tools/telemetry/telemetry/internal/backends/chrome_inspector/inspector_websocket.py | 10 | 5732 | # Copyright 2014 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.
import errno
import json
import logging
import socket
import time
from telemetry.core import exceptions
from telemetry.internal.backends.chrome_inspector im... | bsd-3-clause | -6,294,678,083,037,360,000 | 30.152174 | 79 | 0.679693 | false |
eklitzke/envoy | tools/envoy_collect/envoy_collect.py | 6 | 9564 | #!/usr/bin/env python
"""Wrapper for Envoy command-line that collects stats/log/profile.
Example use:
./tools/envoy_collect.py --output-path=./envoy.tar -c
./configs/google_com_proxy.v2.yaml --service-node foo
<Ctrl-C>
tar -tvf ./envoy.tar
-rw------- htuch/eng 0 2017-08-13 21:13 access_0.log
-rw--... | apache-2.0 | 398,129,151,264,080,500 | 37.720648 | 97 | 0.658616 | false |
Dourv/tornado-mongo | src/forms/permissions.py | 1 | 4485 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from bson.objectid import ObjectId
from pymongo import MongoClient
from validate_email import validate_email
from views.base import base
import config
import hashlib
class permissions():
@property
def db(self):
if config.debug == True:
client = MongoClient('localho... | mit | -2,924,168,554,575,277,600 | 23.648352 | 102 | 0.585507 | false |
analyseuc3m/ANALYSE-v1 | common/djangoapps/external_auth/tests/test_shib.py | 35 | 30342 | # -*- coding: utf-8 -*-
"""
Tests for Shibboleth Authentication
@jbau
"""
import unittest
from ddt import ddt, data
from django.conf import settings
from django.http import HttpResponseRedirect
from django.test import TestCase
from django.test.client import RequestFactory, Client as DjangoTestClient
from django.test.u... | agpl-3.0 | -8,130,467,474,458,833,000 | 50.227119 | 118 | 0.608291 | false |
kanagasabapathi/python-for-android | python-modules/twisted/twisted/trial/test/test_runner.py | 49 | 29815 | # Copyright (c) 2005-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
#
# Maintainer: Jonathan Lange
# Author: Robert Collins
import StringIO, os, sys
from zope.interface import implements
from zope.interface.verify import verifyObject
from twisted.trial.itrial import IReporter, ITestCase
from twisted.tr... | apache-2.0 | 5,046,429,572,721,015,000 | 30.550265 | 80 | 0.603622 | false |
Kobzol/debug-visualizer | debugger/mi/mi_debugger.py | 1 | 6700 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Jakub Beranek
#
# This file is part of Devi.
#
# Devi 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, version 3 of the License, or
# (at yo... | gpl-3.0 | 1,696,932,445,310,678,000 | 31.682927 | 78 | 0.641791 | false |
alexmogavero/home-assistant | homeassistant/components/media_player/nadtcp.py | 4 | 5642 | """
Support for NAD digital amplifiers which can be remote controlled via tcp/ip.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.nadtcp/
"""
import logging
import voluptuous as vol
from homeassistant.components.media_player import (
SUPP... | apache-2.0 | -601,563,004,172,533,100 | 30.171271 | 78 | 0.61184 | false |
Vrekrer/magdynlab | utils/VNA_FMR_A.py | 1 | 7347 | # coding=utf-8
# Author: Diego Gonzalez Chavez
# email : diegogch@cbpf.br / diego.gonzalez.chavez@gmail.com
#
# magdynlab
# Rutinas de analisis para los datos medidos con:
# experiments/VNA_FMR_1P
# experiments/VNA_FMR_2P
#
# TODO:
# Make documentation
import numpy
import matplotlib
import matplotlib.pyplot as pl... | mit | 1,611,695,563,202,316,500 | 30.080508 | 109 | 0.485617 | false |
nre/Doxhooks | setup.py | 1 | 1498 | #!/usr/bin/env python3
from setuptools import setup
from doxhooks import __version__
with open("README.rst") as readme:
lines = list(readme)
for line_no, line in enumerate(lines):
if line.startswith("Doxhooks helps you"):
long_description = "".join(lines[line_no:])
break
else:
raise Runt... | mit | 1,392,875,262,442,896,000 | 25.75 | 77 | 0.616155 | false |
npiganeau/odoo | addons/account/account_invoice.py | 12 | 78556 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -8,695,336,161,790,248,000 | 46.929225 | 303 | 0.570497 | false |
bitcoinknots/bitcoin | test/functional/feature_help.py | 28 | 2499 | #!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Verify that starting bitcoin with -h works as expected."""
from test_framework.test_framework import Bitcoi... | mit | -5,410,731,314,816,989,000 | 39.306452 | 84 | 0.643858 | false |
haikuginger/urllib3 | test/with_dummyserver/test_https.py | 2 | 21320 | import datetime
import logging
import ssl
import sys
import unittest
import warnings
import mock
from nose.plugins.skip import SkipTest
from dummyserver.testcase import (
HTTPSDummyServerTestCase, IPV6HTTPSDummyServerTestCase
)
from dummyserver.server import (DEFAULT_CA, DEFAULT_CA_BAD, DEFAULT_CERTS,
... | mit | 1,013,436,522,286,272,900 | 39.455408 | 83 | 0.548921 | false |
jtyuan/racetrack | configs/My/se.py | 1 | 8964 | # Copyright (c) 2012-2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | bsd-3-clause | 2,185,763,618,451,419,400 | 33.610039 | 79 | 0.680054 | false |
bpsinc-native/src_third_party_chromite | scripts/cros_list_modified_packages.py | 2 | 8815 | # Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Calculate what workon packages have changed since the last build.
A workon package is treated as changed if any of the below are true:
1) The pa... | bsd-3-clause | -8,551,598,722,907,524,000 | 35.882845 | 80 | 0.693364 | false |
Jumpscale/web | pythonlib/eve/tests/utils.py | 1 | 11277 | # -*- coding: utf-8 -*-
import copy
import hashlib
from bson.json_util import dumps
from datetime import datetime, timedelta
from eve.tests import TestBase
from eve.utils import parse_request, str_to_date, config, weak_date, \
date_to_str, querydef, document_etag, extract_key_values, \
debug_error_message, res... | apache-2.0 | 8,861,762,488,242,893,000 | 44.289157 | 79 | 0.601224 | false |
nistormihai/superdesk-core | superdesk/io/feeding_services/email.py | 3 | 3126 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import socke... | agpl-3.0 | -4,501,573,990,264,255,500 | 36.214286 | 101 | 0.578375 | false |
chassing/pytest-asyncio | setup.py | 2 | 1457 | import codecs
import os
import re
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
return codecs.open(os.path.join(here, *parts), 'r').read()
def find_version(*file_paths):
version_file = ... | apache-2.0 | 8,396,818,782,576,419,000 | 27.568627 | 68 | 0.597117 | false |
onkelpit/i3pystatus | i3pystatus/pomodoro.py | 6 | 3405 | import os
import subprocess
import locale
from datetime import datetime, timedelta
from i3pystatus import IntervalModule
class Pomodoro(IntervalModule):
"""
This plugin shows Pomodoro timer.
Left click starts/restarts timer.
Right click stops it.
"""
settings = (
('sound',
... | mit | 238,373,914,549,527,940 | 30.220183 | 87 | 0.523656 | false |
petroswork/pydantic | pydantic/utils.py | 1 | 3273 | import re
import email_validator
from importlib import import_module
from typing import Tuple
PRETTY_REGEX = re.compile(r'([\w ]*?) *<(.*)> *')
def validate_email(value) -> Tuple[str, str]:
"""
Brutally simple email address validation. Note unlike most email address validation
* raw ip address (literal) ... | mit | 2,759,232,664,444,075,500 | 31.346535 | 118 | 0.595654 | false |
defaultnamehere/grr | lib/flows/cron/filestore_stats_test.py | 3 | 3088 | #!/usr/bin/env python
"""Tests for grr.lib.flows.cron.filestore_stats."""
# pylint: disable=unused-import, g-bad-import-order
from grr.lib import server_plugins
# pylint: enable=unused-import, g-bad-import-order
from grr.lib import aff4
from grr.lib import flags
from grr.lib import test_lib
from grr.lib.flows.cron im... | apache-2.0 | 672,511,809,003,904,600 | 36.204819 | 78 | 0.680376 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.