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 |
|---|---|---|---|---|---|---|---|---|---|---|
poornimakshirsagar/sos | sos/plugins/openstack_horizon.py | 2 | 2876 | # Copyright (C) 2009 Red Hat, Inc., Joey Boggs <jboggs@redhat.com>
# Copyright (C) 2012 Rackspace US, Inc.,
# Justin Shepherd <jshepher@rackspace.com>
# Copyright (C) 2013 Red Hat, Inc., Jeremy Agee <jagee@redhat.com>
# This program is free software; you can redistribute it and/or modify
# it under ... | gpl-2.0 | 2,258,034,473,471,272,200 | 32.057471 | 75 | 0.643255 | false |
duramato/SickRage | lib/hachoir_parser/archive/lzx.py | 74 | 13204 | """LZX data stream parser.
Also includes a decompression function (slow!!) which can decompress
LZX data stored in a Hachoir stream.
Author: Robert Xiao
Creation date: July 18, 2007
"""
from hachoir_parser import Parser
from hachoir_core.field import (FieldSet,
UInt32, Bit, Bits, PaddingBits,
RawBytes, Parser... | gpl-3.0 | -6,549,324,499,481,335,000 | 48.453184 | 141 | 0.49023 | false |
j4/horizon | openstack_dashboard/dashboards/project/volumes/backups/forms.py | 57 | 4363 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | apache-2.0 | -758,455,825,758,442,100 | 39.027523 | 76 | 0.586981 | false |
WilliamYi96/Machine-Learning | Deep-Learning-Specialization/Convolutional-Neural-Networks/CNN-Applications.py | 1 | 1996 | import math
import numpy as np
import h5py
import matplotlib.pyplot as plt
from PIL import Image
from scipy import ndimage
import tensorflow as tf
from tensorflow.python.framework import ops
from cnn_utils import *
np.random.seed(1)
# Loading the data (signs)
X_train_orig, Y_train_orig, X_test_orig, Y_test_orig, c... | apache-2.0 | -5,406,492,341,671,438,000 | 31.737705 | 134 | 0.677355 | false |
ttm/indicadores-participativos | puxaTweetsAA.py | 1 | 5595 | #-*- coding: utf8 -*-
import pymongo, time as T, sys
from twython import TwythonStreamer
from twython import Twython
#HTAG="#arenaNETmundial"
HTAG="#aao0"
HTAG_=HTAG.replace("#","H")
#client=pymongo.MongoClient()
#db = client['mytest']
#C = db['twitter'] #collection
#foo=C.find()
#tweets=[ff for ff in foo if "arenaNETm... | lgpl-3.0 | 724,449,844,173,931,100 | 33.103659 | 130 | 0.644913 | false |
EduPepperPDTesting/pepper2013-testing | lms/envs/devgroups/courses.py | 68 | 1305 |
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from ..dev import *
CLASSES_TO_DBS = {
'BerkeleyX/CS169.1x/2012_Fall': "cs169.db",
'BerkeleyX/CS188.1x/2012_Fall': "cs188_1.db",
'HarvardX/CS50x/2012': ... | agpl-3.0 | -7,892,315,284,913,421,000 | 26.1875 | 72 | 0.590038 | false |
sanger-pathogens/ariba | ariba/tasks/micplot.py | 2 | 1239 | import argparse
import ariba
def run(options):
plotter = ariba.mic_plotter.MicPlotter(
options.prepareref_dir,
options.antibiotic,
options.mic_file,
options.summary_file,
options.outprefix,
use_hets=options.use_hets,
main_title=options.main_title,
plot_height=options... | gpl-3.0 | -698,712,415,430,439,600 | 30.769231 | 50 | 0.680387 | false |
WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/IPython/lib/tests/test_display.py | 8 | 5762 | """Tests for IPython.lib.display.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-------... | bsd-3-clause | 1,708,529,778,907,052,000 | 34.574074 | 84 | 0.597709 | false |
zhujiangang/shadowsocks | shadowsocks/crypto/sodium.py | 1032 | 3778 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 | -6,619,644,226,740,059,000 | 30.483333 | 78 | 0.573055 | false |
harshilasu/LinkurApp | y/google-cloud-sdk/platform/gcutil/lib/google_api_python_client/apiclient/mimeparse.py | 5 | 6459 | # Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | gpl-3.0 | 1,261,161,685,726,119,700 | 36.552326 | 79 | 0.616659 | false |
tedder/ansible | lib/ansible/modules/network/f5/bigip_log_destination.py | 14 | 58575 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 3,199,327,812,281,960,400 | 32.452313 | 110 | 0.591908 | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.4.3/Lib/test/test_weakref.py | 7 | 37110 | import gc
import sys
import unittest
import UserList
import weakref
from test import test_support
class C:
def method(self):
pass
class Callable:
bar = None
def __call__(self, x):
self.bar = x
def create_function():
def f(): pass
return f
def create_bound_method():
retur... | mit | 5,230,897,737,200,454,000 | 32.736364 | 78 | 0.561008 | false |
camillemonchicourt/Geotrek-rando | rando/wsgi.py | 1 | 1137 | """
WSGI config for rando project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` se... | bsd-2-clause | -2,706,182,288,527,640,600 | 39.607143 | 79 | 0.799472 | false |
Petr-Kovalev/nupic-win32 | py/regions/ImageSensorFilters/CenteredMultipleScales.py | 2 | 2997 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... | gpl-3.0 | -8,537,754,154,296,332,000 | 30.229167 | 79 | 0.654988 | false |
indictranstech/frappe-digitales | frappe/utils/email_lib/receive.py | 35 | 7591 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import time
import poplib
import frappe
from frappe.utils import extract_email_id, convert_utc_to_user_timezone, now, cint
from frappe.utils.scheduler import log
class EmailS... | mit | -5,623,001,441,267,362,000 | 27.01107 | 96 | 0.684231 | false |
Keisuke69/libcloud | libcloud/dns/drivers/zerigo.py | 1 | 17542 | # 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 use ... | apache-2.0 | -1,108,397,356,646,669,000 | 37.895787 | 79 | 0.548455 | false |
jakeva/bitcoin-pwcheck | qa/rpc-tests/mempool_resurrect_test.py | 150 | 3478 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test resurrection of mined transactions when
# the blockchain is re-organized.
#
from test_framework impo... | mit | -2,596,385,316,169,981 | 38.522727 | 92 | 0.646348 | false |
SiriusParadox/sys_scripts | sys_cache_ratio.py | 1 | 1894 | #!/usr/bin/env python
from __future__ import print_function
import os
import re
import sys
import six
import threading
__author__ = 'Maurice Green'
__purpose__ = 'System Cahce Hit Ratio'
class Proc(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
uname = os.uname()
... | gpl-3.0 | -1,072,849,730,995,827,800 | 25.676056 | 77 | 0.554382 | false |
leansoft/edx-platform | common/test/acceptance/pages/lms/dashboard.py | 41 | 6349 | # -*- coding: utf-8 -*-
"""
Student dashboard page.
"""
from bok_choy.page_object import PageObject
from . import BASE_URL
class DashboardPage(PageObject):
"""
Student dashboard, where the student can view
courses she/he has registered for.
"""
def __init__(self, browser):
"""Initialize t... | agpl-3.0 | -8,409,906,127,143,959,000 | 33.693989 | 103 | 0.603402 | false |
sudhof/politeness | features/vectorizer.py | 3 | 4790 |
import os
import cPickle
import string
import nltk
from itertools import chain
from collections import defaultdict
# local import
from politeness_strategies import get_politeness_strategy_features
# Will need access to local dir
# for support files
LOCAL_DIR = os.path.split(__file__)[0]
def get_unigrams_and_bigram... | apache-2.0 | 5,292,998,200,385,094,000 | 33.460432 | 138 | 0.621712 | false |
gmr/tredis | tests/sortedsets_tests.py | 1 | 6583 | import mock
from tornado import testing
from tredis import exceptions
from . import base
class SortedSetTests(base.AsyncTestCase):
@testing.gen_test
def test_zadd_single(self):
key, value = self.uuid4(2)
result = yield self.client.zadd(key, '1', value)
self.assertEqual(result, 1)
... | bsd-3-clause | 5,690,239,044,128,135,000 | 38.656627 | 71 | 0.552787 | false |
leiferikb/bitpop | src/tools/grit/grit/format/policy_templates/writers/xml_writer_base_unittest.py | 37 | 1373 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Unittests for grit.format.policy_templates.writers.admx_writer."""
import re
import unittest
class XmlWriterBaseTest(unitte... | gpl-3.0 | -8,046,625,345,905,233,000 | 33.325 | 79 | 0.683176 | false |
davidjb/sqlalchemy | test/orm/test_unitofwork.py | 21 | 84951 | # coding: utf-8
"""Tests unitofwork operations."""
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message
import datetime
from sqlalchemy.orm import mapper as orm_mapper
import sqlalchemy as sa
from sqlalchemy.util import u, ue, b
from sqlalchemy import Integer, String, ForeignKey, \
literal_col... | mit | -7,146,150,047,059,428,000 | 32.041229 | 141 | 0.529983 | false |
Asus-T100/kernel | scripts/gdb/linux/symbols.py | 467 | 6343 | #
# gdb helper commands and functions for Linux kernel debugging
#
# load kernel and module symbols
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
import os
import re
from linux import module... | gpl-2.0 | -3,285,455,342,896,232,400 | 35.039773 | 79 | 0.582847 | false |
vrv/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/bijectors/chain_test.py | 6 | 3498 | # 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 | -2,456,745,985,055,343,000 | 39.206897 | 109 | 0.661521 | false |
alexrudy/Cauldron | Cauldron/local/dispatcher.py | 1 | 3542 | # -*- coding: utf-8 -*-
"""
Local dispatcher.
The local interface is process-local. It is lightweight, and good for testing environments, but doesn't handle anything that wouldn't normally be process local.
"""
from ..base import DispatcherService, DispatcherKeyword
from ..scheduler import Scheduler
from ..utils.cal... | bsd-3-clause | 8,066,376,958,242,668,000 | 30.070175 | 160 | 0.611237 | false |
chand3040/sree_odoo | openerp/addons/web/tests/test_menu.py | 303 | 1628 | # -*- coding: utf-8 -*-
import unittest2
from ..controllers import main
class ActionMungerTest(unittest2.TestCase):
def test_actual_treeview(self):
action = {
"views": [[False, "tree"], [False, "form"],
[False, "calendar"]],
"view_type": "tree",
"... | agpl-3.0 | -195,935,486,843,477,980 | 28.6 | 57 | 0.460074 | false |
EtiennePerot/tunnels | src/tunnels/proxy.py | 1 | 7022 | import asyncore as _asyncore
import random as _random
import threading as _threading
import time as _time
from .confsys import Configurable as _Configurable
from .logger import mkInfoFunction as _mkInfoFunction
from .logger import mkWarnFunction as _mkWarnFunction
_proxyInfo = _mkInfoFunction('Proxy')
_proxyWarn = _m... | lgpl-3.0 | -4,594,379,967,054,662,000 | 33.253659 | 157 | 0.72401 | false |
anonymous10101/collusion_resist_codes | programs/gs_con.py | 1 | 6144 | # This program verifies the continuous crowdsensing game model is group strategyproofed.
import random
import math
from copy import deepcopy
# Let there be 100 users.
n = 100
# Let the upper bound of the users' unit costs be 10.
k_max = 10.0
# Let the upper bound of the revenue coefficients be 20.
lambda_max = 20.0
# ... | gpl-2.0 | -417,618,059,526,557,500 | 30.352041 | 159 | 0.638346 | false |
Cal-CS-61A-Staff/ok-client | release.py | 1 | 6652 | #!/usr/bin/env python3
from distutils.version import StrictVersion
import os
import re
import requests
import subprocess
import sys
import tempfile
from client.api import assignment
from client.utils import auth
GITHUB_TOKEN_FILE = '.github-token'
GITHUB_REPO = 'okpy/ok-client'
OK_SERVER_URL = 'okpy.org'
def abort(m... | apache-2.0 | 2,041,021,856,581,070,300 | 32.766497 | 113 | 0.589898 | false |
ryanofsky/bitcoin | test/functional/wallet_address_types.py | 8 | 14298 | #!/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.
"""Test that the wallet can send and receive using all combinations of address types.
There are 5 nodes-under-... | mit | -53,362,985,165,893,890 | 47.632653 | 205 | 0.630158 | false |
icambridge/hockeystats | hr_coach_crawler.py | 1 | 4898 | #!/usr/bin/env python
# Copyright 2017-present Iain Cambridge.
#
# Licensed under the MIT License(the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# https://opensource.org/licenses/MIT
#
# Unless required by applicable law or agreed to in... | mit | 7,107,434,153,898,704,000 | 34.23741 | 78 | 0.626378 | false |
sw-irou/flasktest | lib/mongoengine/base/fields.py | 3 | 19569 | import operator
import warnings
import weakref
from bson import DBRef, ObjectId, SON
import pymongo
from mongoengine.common import _import_class
from mongoengine.errors import ValidationError
from mongoengine.base.common import ALLOW_INHERITANCE
from mongoengine.base.datastructures import BaseDict, BaseList
__all__... | bsd-3-clause | -3,163,268,053,127,089,700 | 37.445972 | 82 | 0.560478 | false |
ymollard/apex_playground | ros/apex_playground/src/hardware_controllers/sound.py | 2 | 1760 | #!/usr/bin/env python
import rospy
import pyaudio
import numpy as np
import json
from rospkg import RosPack
from std_msgs.msg import Float32
from os.path import join
class SoundController(object):
def __init__(self):
self.rospack = RosPack()
with open(join(self.rospack.get_path('apex_playground'),... | gpl-3.0 | 3,283,803,344,101,186,600 | 32.846154 | 101 | 0.567045 | false |
UFAL-DSG/pjsip | tests/pjsua/scripts-recvfrom/231_reg_bad_fail_stale_false_nonce_changed.py | 59 | 1644 | # $Id: 231_reg_bad_fail_stale_false_nonce_changed.py 2392 2008-12-22 18:54:58Z bennylp $
import inc_sip as sip
import inc_sdp as sdp
# In this test we simulate broken server, where:
# - it wants to signal that NONCE has change
# - but it sets stale=false
# For this case pjsip will retry authentication until
# PJSIP_MA... | gpl-2.0 | 4,860,517,984,976,089,000 | 39.097561 | 93 | 0.66545 | false |
atugushev/django-password-session | setup.py | 2 | 1482 | import os
import re
from setuptools import setup
VERSION = re.search(
r"VERSION\s*=\s*['\"](.*)['\"]",
open(os.path.join(os.path.dirname(__file__), 'password_session', '__init__.py')).read()
).group(1)
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
# allow setup.py to be run from... | mit | -6,597,600,457,447,875,000 | 34.285714 | 104 | 0.624831 | false |
MobinRanjbar/hue | apps/sqoop/src/sqoop/test_client.py | 28 | 3467 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | -3,920,304,936,208,909,000 | 37.955056 | 104 | 0.778771 | false |
xyzz/vcmi-build | project/jni/python/src/Lib/distutils/versionpredicate.py | 397 | 5095 | """Module for parsing and testing package version predicate strings.
"""
import re
import distutils.version
import operator
re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)")
# (package) (rest)
re_paren = re.compile(r"^\s*\((.*)\)\s*$") # (list) inside of parentheses
re_splitComparison = re.com... | lgpl-2.1 | 7,443,850,804,900,041,000 | 30.067073 | 76 | 0.588027 | false |
AndroidOpenDevelopment/android_external_chromium_org | chrome/common/extensions/docs/server2/permissions_data_source_test.py | 10 | 4881 | #!/usr/bin/env python
# Copyright 2013 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 json
from operator import itemgetter
import unittest
from extensions_paths import CHROME_EXTENSIONS
from permissions_data_sourc... | bsd-3-clause | -8,737,450,665,776,605,000 | 28.053571 | 79 | 0.617292 | false |
AICP/external_chromium_org | tools/telemetry/telemetry/page/record_wpr_unittest.py | 11 | 1462 | # 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 unittest
from telemetry.page import page as page_module
from telemetry.page import record_wpr
class TestPage(page_module.Page):
def __init__(self... | bsd-3-clause | 3,348,501,637,458,201,000 | 24.649123 | 72 | 0.650479 | false |
jasonamyers/gabbi | docs/source/conf.py | 2 | 8150 | # -*- coding: utf-8 -*-
#
# Gabbi documentation build configuration file, created by
# sphinx-quickstart on Wed Dec 31 17:07:32 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | apache-2.0 | 6,123,703,570,277,710,000 | 30.226054 | 79 | 0.70589 | false |
kcarscad/multi-game-pygame | Sudoku/Sudoku.py | 1 | 7844 | # filename: 'Sudoku.py'
# author: Keith Carscadden
# date: 6/1/14
# purpose: Sudoku game, uses 3rd party file 'generator.py'
import math,sys,os,time,pygame as pg
from pygame.locals import *
from random import randint
from ScoreScreen import ScoreScreen
import Fade
from os import environ
environ['SDL_VIDEO... | mit | -7,989,407,697,461,423,000 | 27.268657 | 123 | 0.481387 | false |
foodszhang/kbengine | kbe/res/scripts/common/Lib/test/test_float.py | 80 | 58909 |
import unittest, struct
import os
import sys
from test import support
import math
from math import isinf, isnan, copysign, ldexp
import operator
import random, fractions
INF = float("inf")
NAN = float("nan")
have_getformat = hasattr(float, "__getformat__")
requires_getformat = unittest.skipUnless(have_getformat,
... | lgpl-3.0 | 3,691,571,364,076,469,000 | 43.900152 | 84 | 0.573138 | false |
dana-i2cat/felix | modules/resource/manager/stitching-entity/src/server/flask/flaskserver.py | 2 | 8204 | from flask import Flask, g, request, request_started, request_finished
from flask.ext.pymongo import PyMongo
from core.config import ConfParser
from core import log
logger=log.getLogger("flaskserver")
from server.flask.views import ro_flask_views
from werkzeug import serving
from OpenSSL import SSL, crypto
import as... | apache-2.0 | 1,245,117,649,358,604,000 | 50.597484 | 163 | 0.610556 | false |
ahmed-mahran/hue | desktop/core/ext-py/boto-2.38.0/boto/route53/domains/layer1.py | 151 | 32418 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | apache-2.0 | -457,981,914,842,990,850 | 36.347926 | 90 | 0.624776 | false |
joaoandrepsilva/dota2py | dota2py/api.py | 2 | 6146 | """
Tools for accessing the Dota 2 match history web API
"""
try:
from urllib import quote_plus
except ImportError:
from urllib.parse import quote_plus
import logging
import json
from functools import wraps
import os
API_KEY = os.environ.get("DOTA2_API_KEY")
BASE_URL = "http://api.steampowered.com/IDOTA2Matc... | mit | -2,262,747,325,745,818,000 | 25.606061 | 85 | 0.616661 | false |
kod3r/shinysdr | shinysdr/plugins/hamlib/__init__.py | 4 | 23076 | # Copyright 2014 Kevin Reid <kpreid@switchb.org>
#
# This file is part of ShinySDR.
#
# ShinySDR 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 late... | gpl-3.0 | 1,573,133,183,813,037,300 | 32.107604 | 187 | 0.57107 | false |
nicholasamorim/fleepy | fleepy/_conversation.py | 1 | 15759 | # -*- coding: utf-8 -*-
class Conversation(object):
"""Conversation management.
https://fleep.io/fleepapi/ref-conversation.html
"""
def __init__(self, server, handler='conversation'):
self._server = server
self._handler = handler
def call(self, *args, **kwargs):
"""
... | gpl-3.0 | 497,927,668,394,826,400 | 42.648199 | 81 | 0.59472 | false |
jjhelmus/scipy | setup.py | 5 | 15012 | #!/usr/bin/env python
"""SciPy: Scientific Library for Python
SciPy (pronounced "Sigh Pie") is open-source software for mathematics,
science, and engineering. The SciPy library
depends on NumPy, which provides convenient and fast N-dimensional
array manipulation. The SciPy library is built to work with NumPy
arrays, a... | bsd-3-clause | 5,647,105,627,954,010,000 | 35 | 85 | 0.607647 | false |
jhawkesworth/ansible | lib/ansible/modules/network/nxos/nxos_vpc_interface.py | 39 | 10376 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... | gpl-3.0 | -8,475,895,479,717,674,000 | 30.442424 | 93 | 0.608905 | false |
yanirs/servo | tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py | 114 | 14756 | from collections import OrderedDict
from datetime import datetime, timedelta
import Cookie
import json
import types
import uuid
import socket
from constants import response_codes
from logger import get_logger
missing = object()
class Response(object):
"""Object representing the response to a HTTP request
:p... | mpl-2.0 | 7,835,513,906,914,463,000 | 32.309255 | 90 | 0.578205 | false |
takeshineshiro/neutron | neutron/tests/api/test_floating_ips.py | 47 | 10395 | # Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | 2,844,726,720,491,642,000 | 46.465753 | 79 | 0.62405 | false |
fldc/CouchPotatoServer | couchpotato/core/media/movie/providers/automation/moviemeter.py | 38 | 1179 | from couchpotato.core.helpers.rss import RSS
from couchpotato.core.logger import CPLog
from couchpotato.core.media.movie.providers.automation.base import Automation
log = CPLog(__name__)
autoload = 'Moviemeter'
class Moviemeter(Automation, RSS):
interval = 1800
rss_url = 'http://www.moviemeter.nl/rss/cinem... | gpl-3.0 | 2,714,461,765,859,436,500 | 23.5625 | 86 | 0.538592 | false |
mknx/smarthome | tools/owsensors2items.py | 14 | 2913 | #!/usr/bin/env python
# vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab
#########################################################################
# Copyright 2012-2013 KNX-User-Forum e.V. http://knx-user-forum.de/
#########################################################################
# ... | gpl-3.0 | 6,004,735,601,627,172,000 | 34.962963 | 74 | 0.51047 | false |
Voluntarynet/BitmessageKit | BitmessageKit/Vendor/static-python/Lib/ctypes/test/test_unicode.py | 81 | 5101 | # coding: latin-1
import unittest
import ctypes
try:
ctypes.c_wchar
except AttributeError:
pass
else:
import _ctypes_test
dll = ctypes.CDLL(_ctypes_test.__file__)
wcslen = dll.my_wcslen
wcslen.argtypes = [ctypes.c_wchar_p]
class UnicodeTestCase(unittest.TestCase):
def setUp(self):... | mit | 722,358,224,095,177,600 | 38.542636 | 87 | 0.562635 | false |
LarsFronius/ansible | lib/ansible/modules/network/cumulus/_cl_img_install.py | 60 | 10997 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Cumulus Networks <ce-ceng@cumulusnetworks.com>
#
# This file is part of Ansible
# Ansible 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... | gpl-3.0 | -5,791,630,747,559,551,000 | 32.733129 | 100 | 0.587979 | false |
Endika/addons-yelizariev | access_custom/__openerp__.py | 7 | 1053 | {
'name' : 'Custom security stuff',
'version' : '1.0.0',
'author' : 'Ivan Yelizariev',
'category' : 'Tools',
'website' : 'https://yelizariev.github.io',
'description': """
Tested on 8.0 ab7b5d7732a7c222a0aea45bd173742acd47242d.
""",
'depends' : ['access_base',
'res_user... | lgpl-3.0 | -4,975,834,925,120,061,000 | 25.325 | 55 | 0.402659 | false |
simbs/edx-platform | common/test/acceptance/pages/studio/import_export.py | 61 | 8923 | """
Import/Export pages.
"""
import time
from datetime import datetime
from bok_choy.promise import EmptyPromise
import os
import re
import requests
from ..common.utils import click_css
from .library import LibraryPage
from .course_page import CoursePage
from . import BASE_URL
class TemplateCheckMixin(object):
... | agpl-3.0 | 2,723,412,222,697,447,400 | 29.982639 | 111 | 0.594867 | false |
hexcap/dpkt | dpkt/ip6.py | 6 | 13386 | # $Id: ip6.py 87 2013-03-05 19:41:04Z andrewflnr@gmail.com $
# -*- coding: utf-8 -*-
"""Internet Protocol, version 6."""
import dpkt
from decorators import deprecated
class IP6(dpkt.Packet):
__hdr__ = (
('_v_fc_flow', 'I', 0x60000000L),
('plen', 'H', 0), # payload length (not including header)
... | bsd-3-clause | 8,818,897,807,239,755,000 | 31.728606 | 368 | 0.572165 | false |
aurelieladier/openturns | python/test/t_GumbelCopula_std.py | 1 | 4030 | #! /usr/bin/env python
from __future__ import print_function
from openturns import *
from math import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
# Instanciate one distribution object
dim = 2
copula = GumbelCopula(2.5)
print("Copula ", repr(copula))
print("Copula ", copula)
print("Mean "... | lgpl-3.0 | -5,289,202,755,461,756,000 | 38.126214 | 99 | 0.697519 | false |
weso/CWR-DataApi | tests/parser/dictionary/encoder/record/test_acknowledgement.py | 1 | 2439 | # -*- coding: utf-8 -*-
import unittest
import datetime
from cwr.parser.encoder.dictionary import AcknowledgementDictionaryEncoder
from cwr.acknowledgement import AcknowledgementRecord
"""
Acknowledgement to dictionary encoding tests.
The following cases are tested:
"""
__author__ = 'Bernardo Martínez Garrido'
__l... | mit | -1,328,409,152,853,045,800 | 41.77193 | 83 | 0.554963 | false |
onceuponatimeforever/oh-mainline | vendor/packages/bleach/bleach/tests/test_unicode.py | 35 | 1909 | # -*- coding: utf-8 -*-
from nose.tools import eq_
from bleach import clean, linkify
def test_japanese_safe_simple():
eq_(u'ヘルプとチュートリアル', clean(u'ヘルプとチュートリアル'))
eq_(u'ヘルプとチュートリアル', linkify(u'ヘルプとチュートリアル'))
def test_japanese_strip():
eq_(u'<em>ヘルプとチュートリアル</em>',
clean(u'<em>ヘルプとチュートリアル</em>'))
... | agpl-3.0 | 24,093,903,606,029,070 | 27.314815 | 71 | 0.589274 | false |
AlanZatarain/sqlalchemy-migrate | migrate/versioning/script/sql.py | 73 | 1688 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import shutil
from migrate.versioning.script import base
from migrate.versioning.template import Template
log = logging.getLogger(__name__)
class SqlScript(base.BaseScript):
"""A file containing plain SQL statements."""
@classmethod
def creat... | mit | -9,036,162,040,352,242,000 | 33.44898 | 112 | 0.59064 | false |
monouno/site | judge/utils/file_cache.py | 3 | 1250 | import errno
import os
from gzip import open as gzip_open
from urlparse import urljoin
class HashFileCache(object):
def __init__(self, root, url, gzip=False):
self.root = root
self.url = url
self.gzip = gzip
def create(self, hash):
try:
os.makedirs(os.path.join(sel... | agpl-3.0 | -6,347,042,537,713,121,000 | 26.777778 | 73 | 0.5656 | false |
Abi1ity/uniclust2.0 | flask/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/tests/server.py | 62 | 1503 | """Basic http server for tests to simulate PyPI or custom indexes
"""
import urllib2
import sys
from threading import Thread
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
class IndexServer(HTTPServer):
"""Basic single-threaded http server simulating a package index
... | bsd-3-clause | 5,351,493,486,496,412,000 | 30.3125 | 74 | 0.587492 | false |
RoboErik/RUBIK | Rubik/RubikSolver/rpi_ws281x/version.py | 10 | 2918 | #
# SConstruct
#
# Copyright (c) 2016 Jeremy Garff <jer @ jers.net>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright not... | apache-2.0 | 7,451,555,109,969,574,000 | 40.098592 | 99 | 0.659698 | false |
yencarnacion/jaikuengine | .google_appengine/lib/django-1.5/django/core/management/commands/startproject.py | 201 | 1323 | from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
from django.utils.crypto import get_random_string
from django.utils.importlib import import_module
class Command(TemplateCommand):
help = ("Creates a Django project directory structure for the given "... | apache-2.0 | -8,703,299,063,300,617,000 | 41.677419 | 79 | 0.62963 | false |
Wilbeibi/rethinkdb | external/v8_3.30.33.16/testing/gmock/scripts/fuse_gmock_files.py | 729 | 8606 | #!/usr/bin/env python
#
# Copyright 2009, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... | agpl-3.0 | -7,984,636,614,203,158,000 | 34.858333 | 79 | 0.695561 | false |
zcbenz/cefode-chromium | testing/test_env.py | 19 | 2934 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Sets environment variables needed to run a chromium unit test."""
import os
import stat
import subprocess
import sys
# This is... | bsd-3-clause | -6,459,524,115,890,021,000 | 31.6 | 79 | 0.692229 | false |
PNProductions/py-seam-merging | examples/image_example.py | 1 | 1677 | from image_helper import image_open, local_path
from seammerging import seam_merging
from utils.tvd import TotalVariationDenoising
from utils.seams import print_seams
import cv2
from numpy import size, float64, array, abs
import time
import os
alpha = 0.5
betaEn = 0.5
iterTV = 80
makeNewDecData = False
debug = False... | mit | 6,271,465,564,153,683,000 | 31.25 | 166 | 0.657722 | false |
sanjuro/RCJK | vendor/django/contrib/localflavor/de/forms.py | 35 | 3129 | """
DE-specific Form helpers
"""
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select, EMPTY_VALUES
from django.utils.translation import ugettext_lazy as _
import re
id_re = re.compile(r"^(?P<residence>\d{10})(?P<origin>\w{1,3})[-\ ]?(?P<birthday>\d{7})[-\ ]?(?P<validity>... | apache-2.0 | 986,558,042,899,197,400 | 36.698795 | 140 | 0.619367 | false |
xHeliotrope/injustice_dropper | env/lib/python3.4/site-packages/django/templatetags/tz.py | 251 | 5574 | from datetime import datetime, tzinfo
from django.template import Library, Node, TemplateSyntaxError
from django.utils import six, timezone
try:
import pytz
except ImportError:
pytz = None
register = Library()
# HACK: datetime is an old-style class, create a new-style equivalent
# so we can define additio... | mit | -2,625,648,709,518,907,400 | 27.294416 | 100 | 0.627198 | false |
yashodhank/frappe | frappe/desk/doctype/todo/todo.py | 10 | 3035 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import json
from frappe.model.document import Document
from frappe.utils import get_fullname
subject_field = "description"
sender_field = "sender"
exclude_from_lin... | mit | -1,031,173,157,494,343,000 | 27.641509 | 106 | 0.693904 | false |
jarun/Buku | bukuserver/filters.py | 1 | 7778 | from enum import Enum
from flask_admin.model import filters
class BookmarkField(Enum):
ID = 0
URL = 1
TITLE = 2
TAGS = 3
DESCRIPTION = 4
def equal_func(query, value, index):
return filter(lambda x: x[index] == value, query)
def not_equal_func(query, value, index):
return filter(lambda... | gpl-3.0 | 1,999,745,822,596,605,000 | 29.743083 | 89 | 0.554127 | false |
ilovecv/NAMAS | dataset/make_dict.py | 9 | 1384 | #
# Copyright (c) 2015, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
# Author: Alexander M R... | bsd-3-clause | 5,833,137,522,062,638,000 | 29.755556 | 78 | 0.616329 | false |
aspc/mainsite | aspc/housing/urls.py | 1 | 1067 | from django.conf.urls import patterns, include, url
from aspc.housing.views import home, RoomDetail, \
BrowseBuildings, BrowseBuildingFloor, ReviewRoom, ReviewRoomWithChoice, \
search
from django.contrib.auth.decorators import login_required
urlpatterns = [
url(r'^$', home, name="housing_home"),
url(r'... | mit | -4,273,118,190,636,075,000 | 65.75 | 154 | 0.669166 | false |
czchen/debian-lxc | src/python-lxc/setup.py | 4 | 1144 | #!/usr/bin/python3
#
# python-lxc: Python bindings for LXC
#
# (C) Copyright Canonical Ltd. 2012
#
# Authors:
# Stéphane Graber <stgraber@ubuntu.com>
#
# This library 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... | lgpl-2.1 | 5,644,199,943,259,671,000 | 33.636364 | 80 | 0.72091 | false |
mapr/sahara | sahara/service/networks.py | 5 | 3621 | # Copyright (c) 2013 Mirantis 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 in writ... | apache-2.0 | -6,760,538,711,448,157,000 | 37.115789 | 79 | 0.619718 | false |
iwpiv/autokey | src/test/configurationmanagertest.py | 53 | 1681 | import unittest
import lib.configurationmanager as conf
from lib.phrase import *
CONFIG_FILE = "../../config/abbr.ini"
class LegacyImporterTest(unittest.TestCase):
def setUp(self):
self.importer = conf.LegacyImporter()
self.importer.load_config(CONFIG_FILE)
def testGlobalSetting... | gpl-3.0 | -3,900,270,902,850,151,400 | 32.64 | 84 | 0.622249 | false |
eayunstack/rally | rally/common/objects/verification.py | 5 | 3756 | # Copyright 2014: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -4,218,143,041,572,449,300 | 34.433962 | 79 | 0.603301 | false |
swartn/sam-vs-jet-paper | data_retrieval/get_ccmp_data.py | 1 | 1089 | import urllib
import os
def get_ccmp_data(destination='./'):
base_url = 'ftp://podaac-ftp.jpl.nasa.gov/allData/ccmp/L3.5a/monthly/flk/'
for year in range(1987, 2011):
url = base_url + str( year ) + '/'
#print url
for month in range(1,13):
mnth = str( month ) if month >... | gpl-2.0 | 1,170,136,280,371,737,600 | 27.657895 | 79 | 0.507805 | false |
gsehub/edx-platform | lms/djangoapps/instructor/views/coupons.py | 17 | 6549 | """
E-commerce Tab Instructor Dashboard Coupons Operations views
"""
import datetime
import logging
import pytz
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from django.views.decorators.http import req... | agpl-3.0 | -1,583,033,843,344,982,300 | 37.751479 | 143 | 0.641014 | false |
rainest/dance-partner-matching | networkx/linalg/tests/test_spectrum.py | 2 | 2673 | from nose import SkipTest
import networkx as nx
from networkx.generators.degree_seq import havel_hakimi_graph
class TestSpectrum(object):
@classmethod
def setupClass(cls):
global numpy
global assert_equal
global assert_almost_equal
try:
import numpy
from... | bsd-2-clause | -1,238,875,058,411,138,300 | 36.125 | 74 | 0.46951 | false |
yitian134/chromium | tools/sync-webkit-git.py | 94 | 7648 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Update third_party/WebKit using git.
Under the assumption third_party/WebKit is a clone of git.webkit.org,
we can use git comma... | bsd-3-clause | 4,075,533,782,376,152,600 | 33.606335 | 80 | 0.663441 | false |
jairot/meliscore | meliscore/front/dataset.py | 1 | 4373 | import pandas as pd
import requests
import json
import collections
from datetime import datetime
from queries import *
import numpy as np
from pandas import DataFrame
import os
URL_BASE = "https://api.mercadolibre.com/"
def get_selling_speeds(itemids):
"""
Given a list of itemids it calculates
the... | bsd-3-clause | -4,354,187,366,601,861,000 | 29.58042 | 118 | 0.587469 | false |
sameetb-cuelogic/edx-platform-test | common/djangoapps/student/migrations/0017_rename_date_to_created.py | 188 | 10469 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Rename 'date' field to 'created'
db.rename_column('student_courseenrollment', 'date', 'created')
def ... | agpl-3.0 | 5,327,405,574,059,141,000 | 78.310606 | 182 | 0.551247 | false |
ntddk/pemu | scripts/qapi-commands.py | 73 | 12372 | #
# QAPI command marshaller generator
#
# Copyright IBM, Corp. 2011
# Copyright (C) 2014 Red Hat, Inc.
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
# Michael Roth <mdroth@linux.vnet.ibm.com>
# Markus Armbruster <armbru@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2.
# See ... | gpl-2.0 | -8,125,582,269,665,564,000 | 24.509278 | 108 | 0.562803 | false |
MakersLab/Farm-server | server/lib/utils.py | 1 | 1752 | import yaml
import json
import os
def loadFromFile(file_name):
fileContents = ''
path = '/'.join(os.path.dirname(__file__).split('/')[0:-1])
with open((os.path.join(path,file_name)), 'r') as file:
fileContents = file.read()
file.close()
return fileContents
def loadConfig(file_name):
... | gpl-3.0 | 882,603,436,007,408,300 | 27.737705 | 72 | 0.613014 | false |
evernote/evernote-sdk-python3 | lib/thrift/TSerialization.py | 111 | 1389 | #
# 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... | bsd-2-clause | 8,532,209,501,508,847,000 | 35.552632 | 75 | 0.75234 | false |
itsvetkov/pyqtgraph | pyqtgraph/dockarea/Container.py | 2 | 8553 | # -*- coding: utf-8 -*-
from ..Qt import QtCore, QtGui
import weakref
class Container(object):
#sigStretchChanged = QtCore.Signal() ## can't do this here; not a QObject.
def __init__(self, area):
object.__init__(self)
self.area = area
self._container = None
self._stretch =... | mit | -8,851,357,603,666,137,000 | 30.215328 | 112 | 0.54741 | false |
mtorluemke/traffic_control | misc/kickstart_create_network_line.py | 13 | 11116 | #!/usr/bin/python
# Copyright 2015 Comcast Cable Communications Management, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | apache-2.0 | -2,135,779,624,964,431,400 | 39.129964 | 156 | 0.607503 | false |
InstitutoDOr/BROCCOLI | code/Python_Wrapper/broccoli/broccoli_common.py | 2 | 7605 | from broccoli_base import *
import numpy
from nibabel import nifti1
import os
import site
import shutil
BROCCOLI_LIB_BASE = BROCCOLI_LIB
# DONE: Check that passing arrays to C method as 1D packed arrays is the same as passing arays using the 3D array wrappers
# DONE: Check that packing (packVolume) and unpacking (u... | gpl-3.0 | -3,938,566,190,417,267,700 | 33.726027 | 122 | 0.690072 | false |
JianfengYao/pyvim | pyvim/commands/commands.py | 1 | 10546 | from __future__ import unicode_literals, print_function
import six
import os
__all__ = (
'has_command_handler',
'call_command_handler',
)
COMMANDS_TO_HANDLERS = {} # Global mapping Vi commands to their handler.
COMMANDS_TAKING_FILENAMES = set() # Name of commands that accept files.
SET_COMMANDS = {} # Map... | bsd-3-clause | 8,276,834,403,915,139,000 | 19.011385 | 95 | 0.60184 | false |
cfei18/incubator-airflow | airflow/utils/__init__.py | 9 | 1382 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | -2,733,381,078,968,885,000 | 33.55 | 65 | 0.719247 | false |
faun/django_test | django/contrib/auth/tests/tokens.py | 18 | 2936 | from datetime import date, timedelta
from django.conf import settings
from django.contrib.auth.models import User, AnonymousUser
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.test import TestCase
class TokenGeneratorTest(TestCase):
def test_make_token(self):
"""
... | bsd-3-clause | 961,986,213,437,401,700 | 38.675676 | 98 | 0.610354 | false |
meabsence/python-for-android | python-build/python-libs/gdata/build/lib/gdata/test_config_template.py | 133 | 2550 | #!/usr/bin/env python
# Copyright (C) 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | 7,145,663,993,286,869,000 | 27.021978 | 77 | 0.730196 | false |
gbaty/pyside2 | tests/QtXml/qxmlsimplereader_test.py | 3 | 1331 | #!/usr/bin/python
import unittest
from PySide2.QtXml import QXmlSimpleReader
class QXmlSimpleReaderTest(unittest.TestCase):
def testQXmlSimpleReaderInstatiation(self):
'''QXmlSimpleReader must be a concrete class not an abstract one.'''
reader = QXmlSimpleReader()
def testQXmlSimpleReaderFeat... | lgpl-2.1 | 4,012,024,886,559,866,000 | 37.028571 | 89 | 0.669421 | false |
code-for-india/sahana_shelter_worldbank | private/templates/uvg/menus.py | 2 | 4029 | # -*- coding: utf-8 -*-
from gluon import *
from s3 import *
from s3layouts import *
try:
from .layouts import *
except ImportError:
pass
import s3menus as default
# Below is an example which you can base your own template's menus.py on
# - there are also other examples in the other templates folders
# =====... | mit | -7,711,661,540,354,139,000 | 34.654867 | 79 | 0.515513 | false |
mikewiebe-ansible/ansible | lib/ansible/modules/cloud/univention/udm_user.py | 37 | 18102 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# Copyright: (c) 2016, Adfinis SyGroup AG
# Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch>
# 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... | gpl-3.0 | 209,912,996,994,012,860 | 33.347249 | 92 | 0.481465 | false |
PKRoma/python-for-android | testapps/on_device_unit_tests/test_app/app_flask.py | 4 | 3672 | print('main.py was successfully called')
print('this is the new main.py')
import sys
print('python version is: ' + sys.version)
print('python path is', sys.path)
import os
print('imported os')
print('contents of this dir', os.listdir('./'))
from flask import (
Flask,
render_template,
request,
Markup
... | mit | 3,912,072,112,447,778,000 | 25.608696 | 69 | 0.645697 | 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.