repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
benoitsteiner/tensorflow | tensorflow/tensorboard/backend/process_graph.py | 15 | 2780 | # 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 |
philipn/sycamore | Sycamore/support/pytz/zoneinfo/Australia/Victoria.py | 9 | 6228 | '''tzinfo timezone information for Australia/Victoria.'''
from pytz.tzinfo import DstTzInfo
from pytz.tzinfo import memorized_datetime as d
from pytz.tzinfo import memorized_ttinfo as i
class Victoria(DstTzInfo):
'''Australia/Victoria timezone definition. See datetime.tzinfo for details'''
zone = 'Australia/V... | gpl-2.0 |
jared0x90/ArenaGame | parse-cards.py | 1 | 1309 | #!/usr/bin/env python
# Use the built in json and sqlite library
import json
import sqlite3
def main():
# Running card counter
card_count = 0
# Load all json data into a collection
card_data = json.load(open('cards.collectible.json'))
# Connect to our database and creat table if it doesn't e... | mit |
kinooo/Sick-Beard | sickbeard/clients/requests/packages/charade/sbcsgroupprober.py | 206 | 3360 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer.... | gpl-3.0 |
apporc/cinder | cinder/tests/unit/test_v7000_fcp.py | 4 | 20807 | # Copyright 2015 Violin Memory, 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 requi... | apache-2.0 |
chriskmanx/qmole | QMOLEDEV/pygobject-2.16.1/codegen/override.py | 16 | 9508 | # -*- Mode: Python; py-indent-offset: 4 -*-
# this file contains code for loading up an override file. The override file
# provides implementations of functions where the code generator could not
# do its job correctly.
import fnmatch
import os
import re
import string
import sys
def class2cname(klass, method):
... | gpl-3.0 |
Arn-O/kadenze-deep-creative-apps | session-5/libs/inception.py | 13 | 4890 | """
Creative Applications of Deep Learning w/ Tensorflow.
Kadenze, Inc.
Copyright Parag K. Mital, June 2016.
"""
import os
import numpy as np
from tensorflow.python.platform import gfile
import tensorflow as tf
import matplotlib.pyplot as plt
from skimage.transform import resize as imresize
from .utils import download_... | apache-2.0 |
dcifuen/cloudbday | src/lib/dateutil/rrule.py | 254 | 40402 | """
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard python 2.3+
datetime module.
"""
__author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "PSF License"
import itertools
import datetime
import calendar
import thread
import sys
__all__ = ["... | mit |
jhona22baz/blog-flask | python2.7/lib/python2.7/site-packages/whoosh/analysis/morph.py | 93 | 10125 | # Copyright 2007 Matt Chaput. 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 notice,
# this list of conditions and the... | mit |
rhndg/openedx | lms/lib/comment_client/comment.py | 45 | 3390 | from .utils import CommentClientRequestError, perform_request
from .thread import Thread, _url_for_flag_abuse_thread, _url_for_unflag_abuse_thread
from lms.lib.comment_client import models
from lms.lib.comment_client import settings
class Comment(models.Model):
accessible_fields = [
'id', 'body', 'anony... | agpl-3.0 |
michalkurka/h2o-3 | h2o-bindings/bin/custom/python/gen_psvm.py | 2 | 7069 | examples = dict(
disable_training_metrics="""
>>> from h2o.estimators import H2OSupportVectorMachineEstimator
>>> splice = h2o.import_file("http://h2o-public-test-data.s3.amazonaws.com/smalldata/splice/splice.svm")
>>> svm = H2OSupportVectorMachineEstimator(gamma=0.01,
... ran... | apache-2.0 |
jpludens/quartrmastr | db/tables/equip_traits.py | 1 | 5244 | import sqlite3
from db import get_connection, get_from_datamaster, get_equip_keys
from db.tables import equips, traits
requirements = [equips, traits]
def build():
with get_connection() as con:
con.row_factory = sqlite3.Row
cur = con.cursor()
equip_ids_by_name = get_equip_keys(cur)
... | mit |
OTWillems/GEO1005 | SpatialDecision/external/networkx/algorithms/assortativity/tests/test_connectivity.py | 75 | 4307 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
class TestNeighborConnectivity(object):
def test_degree_p4(self):
G=nx.path_graph(4)
answer={1:2.0,2:1.5}
nd = nx.average_degree_connectivity(G)
assert_equal(nd,answer)
D=G.to_directed()
a... | gpl-2.0 |
Ayub-Khan/edx-platform | cms/djangoapps/contentstore/features/common.py | 60 | 12732 | # pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
import os
from lettuce import world, step
from nose.tools import assert_true, assert_in
from django.conf import settings
from student.roles import CourseStaffRole, CourseInstructorRole, GlobalStaff
from student.models import get_user
from sel... | agpl-3.0 |
4shadoww/usploit | core/lib/future/backports/urllib/parse.py | 69 | 35794 | """
Ported using Python-Future from the Python 3.3 standard library.
Parse (absolute and relative) URLs.
urlparse module is based upon the following RFC specifications.
RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding
and L. Masinter, January 2005.
RFC 2732 : "Format for Literal IPv6... | mit |
nitzmahone/ansible | lib/ansible/modules/web_infrastructure/jira.py | 3 | 11758 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Steve Smith <ssmith@atlassian.com>
# Atlassian open-source approval reference OSR-76.
#
# 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__ = ty... | gpl-3.0 |
marqh/iris | lib/iris/tests/unit/fileformats/pyke_rules/compiled_krb/fc_rules_cf_fc/test_has_supported_mercator_parameters.py | 5 | 5358 | # (C) British Crown Copyright 2016 - 2017, Met Office
#
# This file is part of Iris.
#
# Iris 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 l... | lgpl-3.0 |
ualikhansars/Gwent | lib/python2.7/site-packages/django/conf/locale/zh_Hans/formats.py | 1008 | 1810 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'Y年n月j日' # 2016年9月5... | mit |
sander76/home-assistant | tests/components/google_pubsub/test_init.py | 5 | 8617 | """The tests for the Google Pub/Sub component."""
from dataclasses import dataclass
from datetime import datetime
import unittest.mock as mock
import pytest
import homeassistant.components.google_pubsub as google_pubsub
from homeassistant.components.google_pubsub import DateTimeJSONEncoder as victim
from homeassistan... | apache-2.0 |
ikaee/bfr-attendant | facerecognitionlibrary/jni-build/jni/include/tensorflow/python/kernel_tests/listdiff_op_test.py | 93 | 3936 | # 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 |
hynnet/hiwifi-openwrt-HC5661-HC5761 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/urllib.py | 29 | 57695 | """Open an arbitrary URL.
See the following document for more info on URLs:
"Names and Addresses, URIs, URLs, URNs, URCs", at
http://www.w3.org/pub/WWW/Addressing/Overview.html
See also the HTTP spec (from which the error codes are derived):
"HTTP - Hypertext Transfer Protocol", at
http://www.w3.org/pub/WWW/Protocols... | gpl-2.0 |
aarontuor/antk | antk/scripts/dssmgrid.py | 1 | 2443 | from __future__ import print_function
import argparse
from antk.core import loader
import numpy
def return_parser():
parser = argparse.ArgumentParser(description="Command line utility for performing grid search on a matrix factorization model.")
parser.add_argument("datadir", type=str,
... | mit |
Jgarcia-IAS/localizacion | openerp/addons-extra/odoo-pruebas/odoo-server/addons-extra/l10n_pe_ple03/sunat_3_11.py | 4 | 11396 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 NUMA Extreme Systems (www.numaes.com) for Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be use... | agpl-3.0 |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/lib/django-1.5/django/contrib/gis/gdal/tests/test_driver.py | 199 | 1194 | import unittest
from django.contrib.gis.gdal import Driver, OGRException
valid_drivers = ('ESRI Shapefile', 'MapInfo File', 'TIGER', 'S57', 'DGN',
'Memory', 'CSV', 'GML', 'KML')
invalid_drivers = ('Foo baz', 'clucka', 'ESRI Shp')
aliases = {'eSrI' : 'ESRI Shapefile',
'TigER/linE' : 'TIGER... | lgpl-3.0 |
python-visualization/folium | folium/plugins/fullscreen.py | 2 | 1896 | # -*- coding: utf-8 -*-
from branca.element import MacroElement
from folium.elements import JSCSSMixin
from folium.utilities import parse_options
from jinja2 import Template
class Fullscreen(JSCSSMixin, MacroElement):
"""
Adds a fullscreen button to your map.
Parameters
----------
position : s... | mit |
yoer/hue | desktop/core/src/desktop/metrics.py | 12 | 4732 | # 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 may not use this file ex... | apache-2.0 |
seem-sky/kbengine | kbe/src/lib/python/Lib/test/test_uu.py | 107 | 6872 | """
Tests for uu module.
Nick Mathewson
"""
import unittest
from test import support
import sys, os
import uu
from io import BytesIO
import io
plaintext = b"The smooth-scaled python crept over the sleeping dog\n"
encodedtext = b"""\
M5&AE('-M;V]T:\"US8V%L960@<'ET:&]N(&-R97!T(&]V97(@=&AE('-L965P
(:6YG(&1O9PH """
# ... | lgpl-3.0 |
aboutsajjad/Bridge | app_packages/click/parser.py | 199 | 15510 | # -*- coding: utf-8 -*-
"""
click.parser
~~~~~~~~~~~~
This module started out as largely a copy paste from the stdlib's
optparse module with the features removed that we do not need from
optparse because we implement them in Click on a higher level (for
instance type handling, help formatting a... | mit |
Giftingnation/GN-Oscar-Custom | tests/functional/catalogue/catalogue_tests.py | 6 | 3108 | import httplib
from django.core.urlresolvers import reverse
from oscar.apps.catalogue.models import Category
from oscar.test.testcases import WebTestCase
from oscar.test.factories import create_product
from oscar.apps.catalogue.views import ProductListView
class TestProductDetailView(WebTestCase):
def test_enf... | bsd-3-clause |
bjarnoldus/django-roa | examples/django_rest_framework/frontend/frontend/settings.py | 3 | 2208 | """
Django settings for frontend project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | bsd-3-clause |
zhoulingjun/zipline | tests/test_cli.py | 30 | 2220 | #
# Copyright 2014 Quantopian, 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 wr... | apache-2.0 |
rahuldhote/odoo | addons/payment_transfer/models/payment_acquirer.py | 203 | 3767 | # -*- coding: utf-'8' "-*-"
from openerp.addons.payment.models.payment_acquirer import ValidationError
from openerp.osv import osv
from openerp.tools.float_utils import float_compare
from openerp.tools.translate import _
import logging
import pprint
_logger = logging.getLogger(__name__)
class TransferPaymentAcquir... | agpl-3.0 |
sharad/calibre | src/calibre/library/move.py | 5 | 1806 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import time, os
from threading import Thread
from Queue import Empty
from calibre.ut... | gpl-3.0 |
motion2015/edx-platform | cms/djangoapps/xblock_config/migrations/0001_initial.py | 110 | 4856 | # -*- 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):
# Adding model 'StudioConfig'
db.create_table('xblock_config_studioconfig', (
('id', self.gf('dj... | agpl-3.0 |
nbeaver/numpy | numpy/core/tests/test_umath_complex.py | 145 | 19800 | from __future__ import division, absolute_import, print_function
import sys
import platform
import numpy as np
import numpy.core.umath as ncu
from numpy.testing import (
TestCase, run_module_suite, assert_equal, assert_array_equal,
assert_almost_equal, dec
)
# TODO: branch cuts (use Pauli code)
# TODO: conj ... | bsd-3-clause |
cchurch/ansible | test/units/modules/files/test_copy.py | 94 | 7698 | # -*- coding: utf-8 -*-
# Copyright:
# (c) 2018 Ansible Project
# License: GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division)
__metaclass__ = type
import pytest
from ansible.modules.files.copy ... | gpl-3.0 |
benoitsteiner/tensorflow-xsmm | tensorflow/contrib/data/python/ops/writers.py | 12 | 2465 | # Copyright 2018 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 |
j0nathan33/CouchPotatoServer | couchpotato/core/media/_base/providers/torrent/cpasbien.py | 5 | 10377 | from bs4 import BeautifulSoup
from couchpotato.core.helpers.variable import getTitle, tryInt
from couchpotato.core.logger import CPLog
from couchpotato.core.helpers.encoding import simplifyString, tryUrlencode
from couchpotato.core.media._base.providers.torrent.base import TorrentProvider
import cookielib
import re
imp... | gpl-3.0 |
2014c2g9/c2g9 | exts/w2/static/Brython2.0.0-20140209-164925/Lib/unittest/test/test_setups.py | 791 | 16440 | import io
import sys
import unittest
def resultFactory(*_):
return unittest.TestResult()
class TestSetups(unittest.TestCase):
def getRunner(self):
return unittest.TextTestRunner(resultclass=resultFactory,
stream=io.StringIO())
def runTests(self, *cases... | gpl-2.0 |
nubark/odoo | addons/l10n_hr/__openerp__.py | 18 | 1702 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Author: Goran Kliska
# mail: goran.kliska(AT)slobodni-programi.hr
# Copyright (C) 2011- Slobodni programi d.o.o., Zagreb
# Contributions:
# Tomislav Bošnjaković, Storm Computers d.o.o. :
# - ac... | gpl-3.0 |
kidscancode/gamedev | tutorials/examples/pathfinding/part2_test.py | 1 | 4760 | import pygame as pg
from collections import deque
from os import path
vec = pg.math.Vector2
TILESIZE = 48
GRIDWIDTH = 28
GRIDHEIGHT = 15
WIDTH = TILESIZE * GRIDWIDTH
HEIGHT = TILESIZE * GRIDHEIGHT
FPS = 30
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
MAGENTA = (2... | mit |
Net-ng/kansha | tests/test_validators.py | 4 | 1072 | # -*- coding:utf-8 -*-
#--
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
#--
import unittest
from kansha import validator
class ValidatorTest(unittes... | bsd-3-clause |
kevinmel2000/sl4a | python/src/Demo/tkinter/matt/menu-simple.py | 35 | 3251 | from Tkinter import *
# some vocabulary to keep from getting confused. This terminology
# is something I cooked up for this file, but follows the man pages
# pretty closely
#
#
#
# This is a MENUBUTTON
# V
# +-------------+
# | |
#
# +------------++------------++------------+
# | || ... | apache-2.0 |
django-oscar/django-oscar-adyen | tests/test_config.py | 2 | 4828 | import unittest
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils import override_settings
# We use get_config() instead of adyen_config because throughout
# the tests, we repea... | bsd-3-clause |
nimbis/django-guardian | guardian/view_mixins.py | 1 | 5462 | from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib.auth.decorators import REDIRECT_FIELD_NAME
from django.http import HttpResponseForbidden
from django.http import HttpResponseRedirect
from django.utils.http import urlquote
from django.utils.decorators i... | bsd-2-clause |
raildo/python-keystoneclient | keystoneclient/v2_0/client.py | 3 | 9112 | # Copyright 2011 Nebula, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 |
martinogden/django-banner-rotator | banner_rotator/admin.py | 1 | 3825 | #-*- coding:utf-8 -*-
from __future__ import unicode_literals
import logging
from functools import update_wrapper
from django import forms, template
from django.contrib import admin
from django.contrib.admin.util import unquote
from django.db import models
from django.shortcuts import get_object_or_404, render_to_resp... | mit |
michitomo/ansible-modules-core | system/seboolean.py | 152 | 6649 | #!/usr/bin/python
# (c) 2012, Stephen Fromm <sfromm@gmail.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 of the License, or
# (at your optio... | gpl-3.0 |
tectronics/numexpr | numexpr/cpuinfo.py | 4 | 22995 | #!/usr/bin/env python
###################################################################
# cpuinfo - Get information about CPU
#
# License: BSD
# Author: Pearu Peterson <pearu@cens.ioc.ee>
#
# See LICENSES/cpuinfo.txt for details about copyright and
# rights to use.
#####################################... | mit |
souzabrizolara/py-home-shell | src/dao/extradao.py | 3 | 1297 | __author__ = 'alisonbento'
import basedao
from src.entities.hsextra import HomeShellExtra
class ExtraDAO(basedao.BaseDAO):
def __init__(self, connection):
basedao.BaseDAO.__init__(self, connection, 'hs_appliance_extras', 'extra_id')
def convert_row_to_object(self, entity_row):
extra = HomeS... | apache-2.0 |
DailyActie/Surrogate-Model | 01-codes/deap-master/examples/coev/coop_evol.py | 1 | 6195 | # This file is part of DEAP.
#
# DEAP 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 later version.
#
# DEAP is distributed ... | mit |
nikolas/readthedocs.org | readthedocs/projects/migrations/0022_add_project_users.py | 5 | 10551 | # -*- 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):
db.alter_column('projects_project', 'user_id', models.ForeignKey(orm['auth.User'], null=True, blank=True))
... | mit |
lanen/youtube-dl | youtube_dl/update.py | 93 | 7467 | from __future__ import unicode_literals
import io
import json
import traceback
import hashlib
import os
import subprocess
import sys
from zipimport import zipimporter
from .compat import (
compat_str,
compat_urllib_request,
)
from .utils import make_HTTPS_handler
from .version import __version__
def rsa_ver... | unlicense |
mendrew/questroom-lecture | Task.py | 2 | 1560 | class Task:
def __init__(self):
self.success_requirements = []
self.failure_requirements = []
self.success_actions = []
self.failure_actions = []
self.showOnMonitor = False
self.state = 0
self.type = None
self.stack = [];
def success_requirement... | gpl-2.0 |
MattsFleaMarket/python-for-android | python-modules/twisted/twisted/internet/selectreactor.py | 69 | 6621 | # -*- test-case-name: twisted.test.test_internet -*-
# Copyright (c) 2001-2007 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Select reactor
Maintainer: Itamar Shtull-Trauring
"""
from time import sleep
import sys
import select
from errno import EINTR, EBADF
from zope.interface import implements
from... | apache-2.0 |
davidzchen/tensorflow | tensorflow/lite/testing/op_tests/cos.py | 17 | 2012 | # Copyright 2019 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 |
TRox1972/youtube-dl | setup.py | 8 | 4022 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import os.path
import warnings
import sys
try:
from setuptools import setup, Command
setuptools_available = True
except ImportError:
from distutils.core import setup, Command
setuptools_available = False
from distutils.spawn ... | unlicense |
orion1024/Sick-Beard | sickbeard/searchBacklog.py | 47 | 7629 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... | gpl-3.0 |
Microsoft/WinObjC | deps/scripts/createlibs.py | 8 | 3857 | import subprocess, sys
BUILD_MSBUILD_LIBS = False
VCVARSALL_PATH = '"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"'
MSBUILD_PATH = '"C:\\program files (x86)\\msbuild\\14.0\\bin\\msbuild.exe"'
THIRDPARTY_PATH = '..\\3rdparty\\'
LIBJPEG_PROJ = '..\\3rdparty\\libjpeg\\build\\libjpegWin10\\lib... | mit |
perezg/infoxchange | BASE/lib/python2.7/site-packages/django/core/serializers/__init__.py | 113 | 4000 | """
Interfaces for serializing Django objects.
Usage::
from django.core import serializers
json = serializers.serialize("json", some_query_set)
objects = list(serializers.deserialize("json", json))
To add your own serializers, use the SERIALIZATION_MODULES setting::
SERIALIZATION_MODULES = {
... | apache-2.0 |
amir-qayyum-khan/edx-platform | lms/djangoapps/certificates/views/xqueue.py | 27 | 9751 | """
Views used by XQueue certificate generation.
"""
import json
import logging
from django.contrib.auth.models import User
from django.db import transaction
from django.http import HttpResponse, Http404, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http impor... | agpl-3.0 |
jorsea/odoo-addons | stock_warehouse_edit/__openerp__.py | 3 | 1667 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | agpl-3.0 |
xNovax/SickRage | lib/requests/packages/chardet/euckrfreq.py | 3121 | 45978 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | gpl-3.0 |
dengxiangyu768/dengxytools | ops/aliyun_stack.py | 1 | 6153 | #coding:utf8
import sys
import traceback
import os
from aliyunsdkcore.client import AcsClient
from aliyunsdkros.request.v20150901 import DescribeRegionsRequest, CreateStacksRequest
from aliyunsdkros.request.v20150901 import DescribeResourcesRequest
from aliyunsdkros.request.v20150901 import DeleteStackRequest
from aliy... | apache-2.0 |
daivietpda/sense-l | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
gpillusion/SM-G710K_Illusion_kernel | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
pandeyop/tempest | tempest/api/baremetal/admin/base.py | 11 | 6912 | # 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
# d... | apache-2.0 |
grigorisg9gr/menpo-notebooks | run_all.py | 3 | 1775 | """Run all the notebooks
Provide the path to a subfolders/project or by default all be run.
Usage:
run_all [<project>...] [--timeout=<seconds>]
run_all (-h | --help)
run_all --version
Options:
<project> The name(s) of the project subfolder(s)
--timeout=<seconds> Timeout before execution is inte... | bsd-3-clause |
nilnvoid/wagtail | wagtail/wagtailimages/views/chooser.py | 3 | 6793 | from __future__ import absolute_import, unicode_literals
import json
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, render
from wagtail.utils.pagination import paginate
from wagtail.wagtailadmin.forms import SearchForm
from wagtail.wagtailadmin.modal_workflow import rend... | bsd-3-clause |
cs-shadow/phabricator-tools | py/ate/atet_sharedrepo.py | 4 | 4551 | """Simulates a central repository where multiple workers can collaborate."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# atet_sharedrepo
#
# Public Classes:
# SharedRepo
# .hold_dev_arcy... | apache-2.0 |
okumura/gyp | test/generator-output/gyptest-top-all.py | 216 | 1437 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies building a project hierarchy created when the --generator-output=
option is used to put the build configuration files in a sepa... | bsd-3-clause |
popazerty/SDG-gui | lib/python/Plugins/Extensions/MediaScanner/plugin.py | 45 | 3146 | from Plugins.Plugin import PluginDescriptor
from Components.Scanner import scanDevice
from Screens.InfoBar import InfoBar
import os
def execute(option):
print "execute", option
if option is None:
return
(_, scanner, files, session) = option
scanner.open(files, session)
def mountpoint_choosen(option):
if optio... | gpl-2.0 |
omasanori/gyp | test/mac/gyptest-sourceless-module.py | 200 | 2485 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that bundles that have no 'sources' (pure resource containers) work.
"""
import TestGyp
import sys
if sys.platform == 'darwi... | bsd-3-clause |
phac-nml/bioconda-recipes | recipes/peptide-shaker/1.16.4/peptide-shaker.py | 63 | 3271 | #!/usr/bin/env python
#
# Wrapper script for Java Conda packages that ensures that the java runtime
# is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128).
#
# Program Parameters
#
import os
import s... | mit |
kirti3192/spoken-website | cron/spoken_search/MySQLdb/MySQLdb/cursors.py | 8 | 17291 | """MySQLdb Cursors
This module implements Cursors of various types for MySQLdb. By
default, MySQLdb uses the Cursor class.
"""
import re
import sys
try:
from types import ListType, TupleType, UnicodeType
except ImportError:
# Python 3
ListType = list
TupleType = tuple
UnicodeType = str
restr = r... | gpl-3.0 |
xodus7/tensorflow | tensorflow/python/kernel_tests/argmax_op_test.py | 5 | 4381 | # 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 |
le9i0nx/ansible | test/units/modules/network/f5/test_bigip_asm_policy.py | 7 | 21652 | # -*- 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
import os
import json
import pytest
import sys
from nose.plugins.skip imp... | gpl-3.0 |
ragupta-git/ImcSdk | imcsdk/mometa/bios/BiosVfLegacyUSBSupport.py | 1 | 3878 | """This module contains the general information for BiosVfLegacyUSBSupport ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class BiosVfLegacyUSBSupportConsts:
VP_LEGACY_USBSUPPORT_AUTO = "Auto"
VP_LEGACY_USBSUPPORT_DISA... | apache-2.0 |
wummel/patool | tests/archives/test_pybz2.py | 1 | 1203 | # -*- coding: utf-8 -*-
# Copyright (C) 2010-2015 Bastian Kleineidam
#
# 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.
#... | gpl-3.0 |
bzennn/blog_flask | python/lib/python3.5/site-packages/sqlalchemy/dialects/mysql/pymysql.py | 33 | 1989 | # mysql/pymysql.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mysql+pymysql
:name: PyMySQL
:dbapi: pymysql
:connect... | gpl-3.0 |
thenetcircle/dino | test/utils/test_utils.py | 1 | 15563 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 |
shankisg/wye | wye/workshops/templatetags/workshop_action_button.py | 3 | 1807 | from datetime import datetime
from django import template
from wye.base.constants import WorkshopStatus
register = template.Library()
def show_draft_button(workshop, user):
if (workshop.status in [WorkshopStatus.REQUESTED,
WorkshopStatus.ACCEPTED,
Workshop... | mit |
ehsangolshani/crazy-hamster | .venv/lib/python3.5/site-packages/pip-9.0.1-py3.5.egg/pip/_vendor/packaging/requirements.py | 448 | 4327 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import string
import re
from pip._vendor.pyparsing import (
stringSta... | gpl-3.0 |
danieljaouen/ansible | lib/ansible/modules/network/illumos/dladm_iptun.py | 61 | 7764 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Adam Števko <adam.stevko@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
Bismarrck/tensorflow | tensorflow/python/kernel_tests/sparse_cross_op_test.py | 19 | 17325 | # 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 |
MeerkatLabs/sleekpromises | test/promises/test_2_2_2.py | 1 | 9100 | """
2.2.2: If `onFulfilled` is a function
https://github.com/promises-aplus/promises-tests/blob/2.1.1/lib/tests/2.2.2.js
"""
import threading
from sleekxmpp.test import SleekTest
class Promise_2_2_2_1_TestCase(SleekTest):
"""
2.2.2.1: it must be called after `promise` is fulfilled, with `promise`'s fulfillme... | bsd-3-clause |
malept/youtube-dl | youtube_dl/extractor/nuvid.py | 87 | 2587 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
)
class NuvidIE(InfoExtractor):
_VALID_URL = r'https?://(?:www|m)\.nuvid\.com/video/(?P<id>[0-9]+)'
_TEST = {
'url': 'http://m.nuvid.com/video/1310741/',
'md5': 'eab2... | unlicense |
65apps/omim | 3party/protobuf/examples/add_person.py | 432 | 1656 | #! /usr/bin/python
# See README.txt for information and build instructions.
import addressbook_pb2
import sys
# This function fills in a Person message based on user input.
def PromptForAddress(person):
person.id = int(raw_input("Enter person ID number: "))
person.name = raw_input("Enter name: ")
email = raw_... | apache-2.0 |
vladmm/intellij-community | python/helpers/docutils/parsers/rst/directives/parts.py | 41 | 4241 | # $Id: parts.py 6385 2010-08-13 12:17:01Z milde $
# Authors: David Goodger <goodger@python.org>; Dmitry Jemerov
# Copyright: This module has been placed in the public domain.
"""
Directives for document parts.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, languages
from docutils.transforms impor... | apache-2.0 |
richardotis/scipy | scipy/signal/_peak_finding.py | 28 | 17618 | """
Functions for identifying peaks in signals.
"""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy._lib.six import xrange
from scipy.signal.wavelets import cwt, ricker
from scipy.stats import scoreatpercentile
__all__ = ['argrelmin', 'argrelmax', 'argrelextrema', 'fin... | bsd-3-clause |
wfxiang08/django178 | django/core/management/commands/startproject.py | 78 | 1264 | from importlib import import_module
from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
from django.utils.crypto import get_random_string
class Command(TemplateCommand):
help = ("Creates a Django project directory structure for the given "
... | bsd-3-clause |
amarzavery/AutoRest | Samples/test/stream-with-content-type/ClientPython/cowbell_moderator/cowbell_moderator.py | 2 | 1822 | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------... | mit |
dwhswenson/openpathsampling | openpathsampling/beta/hooks.py | 2 | 16334 | """
Hooks to change class:`.PathSimulator` behavior.
These hooks group several methods together for use as part of a
:class:`.PathSimulator` ``run`` method. They allow for additional
calculations or output at several points in the simulation.
"""
import re
import time
import logging
import openpathsampling as paths
fr... | mit |
dgsantana/arsenalsuite | cpp/lib/PyQt4/examples/graphicsview/dragdroprobot/dragdroprobot.py | 15 | 10757 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2010 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... | gpl-2.0 |
petemounce/ansible | lib/ansible/plugins/connection/lxc.py | 89 | 7955 | # (c) 2015, Joerg Thalheim <joerg@higgsboson.tk>
#
# 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 ve... | gpl-3.0 |
splav/servo | etc/run_in_headless_android_emulator.py | 22 | 7571 | #!/usr/bin/env python
# Copyright 2018 The Servo Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/l... | mpl-2.0 |
efortuna/AndroidSDKClone | ndk/prebuilt/linux-x86_64/lib/python2.7/distutils/command/bdist_dumb.py | 151 | 5195 | """distutils.command.bdist_dumb
Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix)."""
__revision__ = "$Id$"
import os
from sysconfig import get_python_version
from distutils.util import get_platform
from distutil... | apache-2.0 |
Djabbz/wakatime | wakatime/packages/pygments_py3/pygments/lexers/_openedge_builtins.py | 72 | 48362 | # -*- coding: utf-8 -*-
"""
pygments.lexers._openedge_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the OpenEdgeLexer.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
OPENEDGEKEYWORDS = (
'ABSOLUTE',
'ABS',
... | bsd-3-clause |
rjsproxy/wagtail | wagtail/tests/testapp/migrations/0002_add_verbose_names.py | 26 | 4398 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('tests', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='cu... | bsd-3-clause |
renxinhe/TestFlaskWebsite | lib/flask/templating.py | 783 | 4707 | # -*- coding: utf-8 -*-
"""
flask.templating
~~~~~~~~~~~~~~~~
Implements the bridge to Jinja2.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import posixpath
from jinja2 import BaseLoader, Environment as BaseEnvironment, \
TemplateNotFound
from .glo... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.