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
adw0rd/lettuce
tests/integration/lib/Django-1.3/tests/modeltests/model_inheritance/tests.py
51
10540
from operator import attrgetter from django.core.exceptions import FieldError from django.test import TestCase from models import (Chef, CommonInfo, ItalianRestaurant, ParkingLot, Place, Post, Restaurant, Student, StudentWorker, Supplier, Worker, MixinModel) class ModelInheritanceTests(TestCase): def test_a...
gpl-3.0
piotr-dobrogost/sqlalchemy-continuum
sqlalchemy_continuum/transaction.py
2
5452
from datetime import datetime try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict import six import sqlalchemy as sa from sqlalchemy.ext.compiler import compiles from .dialects.postgresql import ( CreateTemporaryTransactionTableSQL, InsertTemporaryTransacti...
bsd-3-clause
samuelmaudo/yepes
yepes/utils/unidecode/x0d7.py
252
4559
data = ( 'hwen', # 0x00 'hwenj', # 0x01 'hwenh', # 0x02 'hwed', # 0x03 'hwel', # 0x04 'hwelg', # 0x05 'hwelm', # 0x06 'hwelb', # 0x07 'hwels', # 0x08 'hwelt', # 0x09 'hwelp', # 0x0a 'hwelh', # 0x0b 'hwem', # 0x0c 'hweb', # 0x0d 'hwebs', # 0x0e 'hwes', # 0x0f 'hwess', #...
bsd-3-clause
JCA-Developpement/Odoo
addons/l10n_fr/report/base_report.py
154
5632
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
agpl-3.0
YogeshNain/linux
scripts/gdb/linux/utils.py
630
4267
# # gdb helper commands and functions for Linux kernel debugging # # common utilities # # 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 class CachedType: def __init__(self, name): s...
gpl-2.0
shincling/MemNN_and_Varieties
DataCoupus/list_document/timelist_answer.py
1
1930
# -*- coding: utf8 -*- __author__ = 'shin' import jieba timelist_answer=[] timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天') timelist_answer.append('明天。') timelist_answer.append('明天。') timelist...
bsd-3-clause
mattclay/ansible-modules-core
cloud/openstack/os_subnets_facts.py
29
4933
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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
nickmarton/Vivid
vivid/classes/test_classes/test_AttributeInterpretation.py
1
17074
"""Attribute Interpretation unit tests.""" import pytest from vivid.classes.attribute import Attribute from vivid.classes.relation import Relation from vivid.classes.attribute_structure import AttributeStructure from vivid.classes.attribute_system import AttributeSystem from vivid.classes.relation_symbol import Relati...
mit
endlessm/chromium-browser
third_party/angle/scripts/generate_stats.py
4
33713
#!/usr/bin/env vpython # # [VPYTHON:BEGIN] # wheel: < # name: "infra/python/wheels/google-auth-py2_py3" # version: "version:1.2.1" # > # # wheel: < # name: "infra/python/wheels/pyasn1-py2_py3" # version: "version:0.4.5" # > # # wheel: < # name: "infra/python/wheels/pyasn1_modules-py2_py3" # version: "versio...
bsd-3-clause
vermouthmjl/scikit-learn
sklearn/externals/joblib/pool.py
23
23535
"""Custom implementation of multiprocessing.Pool with custom pickler This module provides efficient ways of working with data stored in shared memory with numpy.memmap arrays without inducing any memory copy between the parent and child processes. This module should not be imported if multiprocessing is not available...
bsd-3-clause
datalyze-solutions/pandas-qt
pandasqt/views/CSVDialogs.py
1
23796
# -*- coding: utf-8 -*- import os from encodings.aliases import aliases as _encodings import pandas from pandasqt.compat import Qt, QtCore, QtGui, Slot, Signal from pandasqt.encoding import Detector from pandasqt.models.DataFrameModel import DataFrameModel from pandasqt.views.CustomDelegates import DtypeComboDelegat...
mit
jkstrick/samba
buildtools/wafsamba/samba_pidl.py
12
5491
# waf build tool for building IDL files with pidl from TaskGen import before import Build, os, sys, Logs from samba_utils import * def SAMBA_PIDL(bld, pname, source, options='', output_dir='.', generate_tables=True): '''Build a IDL file using pidl. This will pro...
gpl-3.0
tylertebbs20/Practice-httpie
httpie/plugins/builtin.py
9
1168
from base64 import b64encode import requests.auth from httpie.plugins.base import AuthPlugin class BuiltinAuthPlugin(AuthPlugin): package_name = '(builtin)' class HTTPBasicAuth(requests.auth.HTTPBasicAuth): def __call__(self, r): """ Override username/password serialization to allow unic...
bsd-3-clause
Diviyan-Kalainathan/causal-humans
Clustering/performance_evaluation.py
1
3279
''' Computing the misclassification error distance between to 2 k-means clustering according to Marina Meila, "The Uniqueness of a Good Optimum for K-Means", ICML 2006 Author : Diviyan Kalainathan Date : 20/06/2016 ''' import csv,numpy,itertools from sklearn import metrics def Clustering_performance_evaluation(mode,...
mit
2014cdbg3/2015cdbg9
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/SDL.py
603
1813
from browser import document SDL_INIT_VIDEO=0 SDL_GL_DOUBLEBUFFER=1 SDL_GL_DEPTH_SIZE=2 SDL_DOUBLEBUF=3 SDL_ANYFORMAT=4 SDL_ACTIVEEVENT=5 SDL_ALLEVENTS=5 SDL_KEYDOWN=6 SDL_KEYUP=7 SDL_MOUSEMOTION=8 SDL_MOUSEBUTTONDOWN=9 SDL_MOUSEBUTTONUP=10 SDL_JOYAXISMOTION=11 SDL_JOYBALLMOTION=12 SDL_JOYHATMOTION=13 SDL_JOYBUTTON...
gpl-3.0
lucasmoura/personfinder
tests/test_api.py
15
1990
#!/usr/bin/python2.7 # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
trabacus-softapps/openerp-8.0-cc
openerp/addons/account_budget/wizard/account_budget_report.py
4
2048
# -*- 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
Microsoft/vsminecraft
dependencies/protobuf-2.6.1/python/mox.py
603
38237
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
willkg/pyrax-cmd
setup.py
1
1027
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') setup( name='pyrax-c...
bsd-3-clause
alexandrucoman/vbox-neutron-agent
neutron/tests/functional/db/test_models.py
37
1364
# Copyright (c) 2014 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...
apache-2.0
nickster5001/ctracker
flask/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
304
15086
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
mit
qiqjiao/study
jsoncpp/tags/0.7.0/doxybuild.py
136
6798
"""Script to generate doxygen documentation. """ import re import os import os.path import sys import shutil from devtools import tarball def find_program(*filenames): """find a program in folders path_lst, and sets env[var] @param filenames: a list of possible names of the program to search for @return: ...
lgpl-3.0
honghaoz/UW-Info-Session
UW-Info-Session-1.0/GAE Support/uw-info2/libs/requests/packages/urllib3/poolmanager.py
550
8977
# urllib3/poolmanager.py # Copyright 2008-2014 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import logging try: # Python 3 from urllib.parse import urljoin except ImportError: ...
mit
xaviercobain88/framework-python
build/lib.linux-i686-2.7/openerp/addons/base/res/res_currency.py
8
12118
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
JTarball/generator-dockerized-django-polymer
app/templates/docker/app/app/backend/apps/_archive/content_2/admin.py
8
2614
from django.contrib import admin from content.models import Post, Language, Category, SubCategory, PostNode, PostCard, Update, Comment, CommentCard, Dependency, Troubleshooting, Issue class PostAdmin(admin.ModelAdmin): #date_hierarchy = "created_at" #field = ("published", "title", "slug", "updated_at", "auth...
gpl-2.0
petrus-v/odoo
addons/account_budget/report/__init__.py
444
1139
# -*- 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
GheRivero/ansible
test/units/modules/network/netact/test_netact_cm_command.py
30
6387
""" netact_cm_command unit tests """ # -*- coding: utf-8 -*- # (c) 2017, Nokia # 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 ...
gpl-3.0
kamalx/edx-platform
common/lib/xmodule/xmodule/modulestore/edit_info.py
201
2843
""" Access methods to get EditInfo for xblocks """ from xblock.fields import XBlockMixin from abc import ABCMeta, abstractmethod class EditInfoMixin(XBlockMixin): """ Provides the interfaces for getting the edit info from XBlocks """ @property def edited_by(self): """ The user id o...
agpl-3.0
xujianhai/flask
tests/test_testing.py
143
6479
# -*- coding: utf-8 -*- """ tests.testing ~~~~~~~~~~~~~ Test client and more. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask from flask._compat import text_type def test_environ_defaults_from_config(): app = flask.Flask(_...
bsd-3-clause
genialis/resolwe
resolwe/flow/executors/docker/run.py
1
19322
""".. Ignore pydocstyle D400. .. autoclass:: resolwe.flow.executors.docker.run.FlowExecutor :members: """ # pylint: disable=logging-format-interpolation import asyncio import copy import functools import json import logging import os import random import string import tempfile import time from contextlib import s...
apache-2.0
sudheerchintala/LearnEraPlatForm
common/lib/xmodule/xmodule/tests/test_conditional.py
37
12428
import json import unittest from fs.memoryfs import MemoryFS from mock import Mock, patch from xblock.field_data import DictFieldData from xblock.fields import ScopeIds from xmodule.error_module import NonStaffErrorDescriptor from opaque_keys.edx.locations import SlashSeparatedCourseKey, Location from xmodule.modules...
agpl-3.0
TalShafir/ansible
test/runner/lib/test.py
70
11083
"""Classes for storing and processing test results.""" from __future__ import absolute_import, print_function import datetime import json import os from lib.util import ( display, ) from lib.config import ( TestConfig, ) def calculate_best_confidence(choices, metadata): """ :type choices: tuple[tu...
gpl-3.0
geladon/ziwuquan
crawler/ziwu/spiders/csdn_spider.py
3
2513
#!/usr/bin/env python # -*- coding: utf-8 -*- from ziwu.components.redis.spiders import RedisMixin from scrapy.selector import Selector from scrapy.http import Request from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from scrapy.contrib.spiders import CrawlSpider, Rule from sc...
bsd-2-clause
decimalbell/redbase
third_party/src/gtest-1.7.0/test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 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 of...
mit
Digital-Preservation-Finland/dpres-ipt
ipt/scripts/check_xml_schematron_features.py
1
1714
#!/usr/bin/python # -*- encoding:utf-8 -*- # vim:ft=python """Validate XML file using Schematron.""" from __future__ import print_function, unicode_literals import os import sys import optparse from file_scraper.schematron.schematron_scraper import SchematronScraper from ipt.utils import concat from ipt.six_utils i...
lgpl-3.0
glneo/gnuradio
gr-digital/python/digital/qa_correlate_access_code.py
37
3173
#!/usr/bin/env python # # Copyright 2006,2007,2010,2011,2013 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...
gpl-3.0
makemob/UkiModbusManager
UkiArticulation.py
1
18114
#!/usr/bin/env python # -*- coding: utf_8 -*- """ Uki Articulation Chris Mock, 2017 Uki Articulation UI - Controls UkiModbusManager - Plays CSV scripts/sequences to control speed/accel Licensed under GNU General Public License v3.0, https://www.gnu.org/licenses/gpl-3.0.txt """ import threading import time ...
gpl-3.0
mj10777/QGIS
python/plugins/processing/algs/grass7/ext/i.py
15
8317
# -*- coding: utf-8 -*- """ *************************************************************************** i.py ---- Date : April 2016 Copyright : (C) 2016 by Médéric Ribreux Email : mederic dot ribreux at medspx dot fr ****************************************...
gpl-2.0
rudhir-upretee/SUMO_Src
tools/traci/edge.py
2
8761
# -*- coding: utf-8 -*- """ @file edge.py @author Michael Behrisch @date 2011-03-17 @version $Id: edge.py 12906 2012-10-30 11:02:27Z behrisch $ Python implementation of the TraCI interface. SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ Copyright (C) 2011 DLR (http://www.dlr.de/) and cont...
gpl-3.0
mdrumond/tensorflow
tensorflow/python/grappler/tf_optimizer.py
63
1549
# Copyright 2017 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
brian-yang/mozillians
mozillians/groups/tests/test_api_v1.py
8
2720
import json from django.core.urlresolvers import reverse from django.test.client import Client from funfactory.helpers import urlparams from funfactory.utils import absolutify from nose.tools import eq_ from mozillians.api.tests import APIAppFactory from mozillians.common.tests import TestCase from mozillians.groups...
bsd-3-clause
schlueter/ansible
lib/ansible/modules/network/avi/avi_healthmonitor.py
15
7346
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
basicthinker/ThyNVM
src/arch/x86/isa/insts/general_purpose/data_transfer/__init__.py
91
2348
# Copyright (c) 2007 The Hewlett-Packard Development Company # 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 implemen...
bsd-3-clause
steelcowboy/pyCourseManager
friday.py
1
3765
from datetime import datetime, timedelta import course_manager # from login_manager import LoginManager, login_manager, db import coursedb_manager from usage_resource import UsageResource from secret import sqlalchemy_url from login import ( PinResource, SignUpResource, AuthorizeResource, LogoutReso...
apache-2.0
sdcooke/django
django/forms/widgets.py
184
37166
""" HTML Widget classes """ from __future__ import unicode_literals import copy import datetime import re from itertools import chain from django.conf import settings from django.forms.utils import flatatt, to_current_timezone from django.utils import datetime_safe, formats, six from django.utils.datastructures impo...
bsd-3-clause
bstroebl/QGIS
python/plugins/GdalTools/GdalTools.py
3
18479
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : GdalTools Description : Integrate gdal tools into qgis Date : 17/Sep/09 copyright : (C) 2009 by Lorenzo Masini (Faunalia) email : lorenxo86@...
gpl-2.0
tago-io/tago-python
tago/account/notifications.py
1
2226
import requests # Used to make HTTP requests import json # Used to parse JSON import os # Used to infer environment variables API_TAGO = os.environ.get('TAGO_API') or 'https://api.tago.io' REALTIME = os.environ.get('TAGO_REALTIME') or 'https://realtime.tago.io' class Notifications: def __init__(self, acc_token)...
mit
telelaci/distcc
include_server/include_analyzer.py
21
17060
#! /usr/bin/python2.4 # Copyright 2007 Google Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program i...
gpl-2.0
DanaOshri/Open-Knesset
accounts/migrations/0004_add_add_topic_permission.py
14
4681
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from django.contrib.auth.models import User,Group,Permission from django.contrib.contenttypes.models import ContentType from committees.models import Topic class Migration(DataMigration): depe...
bsd-3-clause
mtnsat/ics-release-dids
porta/account/account.py
1
1435
from ..with_request import WithRequest class Account(WithRequest): def __init__(self, url, session_id): self.base_url = url self.session_id=session_id def account_get_by_id(self, i_account): """Get account by id""" endpoint = "{0}".format('/rest/Account/get_account_info') ...
mit
xiangel/hue
desktop/core/ext-py/Django-1.6.10/tests/null_fk_ordering/tests.py
150
2069
from __future__ import absolute_import from django.test import TestCase from .models import Author, Article, SystemInfo, Forum, Post, Comment class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Keys...
apache-2.0
moyaproject/moya
moya/db.py
1
10394
from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from sqlalchemy import create_engine, MetaData from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import scoped_session from sqlalchemy.exc import ( DatabaseError, IntegrityError, O...
mit
langurmonkey/gaiasky
assets/scripts/showcases/camera-constant-turn.py
1
2066
# This Gaia Sky script showcases a constant camera turn # Created by Toni Sagrista from py4j.clientserver import ClientServer, JavaParameters, PythonParameters import time class CameraUpdateRunnable(object): def __init__(self, gs, rotation_rate): self.gs = gs self.rotation_rate = rotation_rate ...
mpl-2.0
nyasara/azuremono-docker
IronPython-2.7.4/Lib/encodings/cp857.py
93
34858
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP857.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors=...
mit
beluganos/beluganos
src/fabricflow/fibc/ofc/ofdpa2.py
1
3614
# -*- coding: utf-8 -*- # Copyright (C) 2017 Nippon Telegraph and Telephone Corporation. # # 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 # #...
apache-2.0
pappasam/latexbuild
tests/test_utils.py
1
4066
import unittest import os from latexbuild.utils import ( random_str_uuid, random_name_filepath, list_filepathes_with_predicate, read_file, recursive_apply, ) PATH_FILE = os.path.abspath(__file__) PATH_TEST = os.path.dirname(PATH_FILE) class TestRandomStrUuid(unittest.Te...
mit
tjsavage/djangononrel-starter
django/contrib/gis/gdal/tests/test_envelope.py
332
3742
from django.contrib.gis.gdal import Envelope, OGRException from django.utils import unittest class TestPoint(object): def __init__(self, x, y): self.x = x self.y = y class EnvelopeTest(unittest.TestCase): def setUp(self): self.e = Envelope(0, 0, 5, 5) def test01_init(self): ...
bsd-3-clause
algoStruct/flask
scripts/make-release.py
145
4037
#!/usr/bin/env python # -*- coding: utf-8 -*- """ make-release ~~~~~~~~~~~~ Helper script that performs a release. Does pretty much everything automatically for us. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import os import re from dat...
bsd-3-clause
sibis-platform/ncanda-datacore
scripts/reporting/xnat_scans_filter.py
4
5552
#!/usr/bin/env python ## ## See COPYING file distributed along with the ncanda-data-integration package ## for the copyright and license terms ## """ xnat_scans_filter.py ====================== This script filters the csv file generated using xnat_extractor.py. This filters is based on records from XNAT where there i...
bsd-3-clause
dpetzold/django
tests/extra_regress/models.py
281
1401
from __future__ import unicode_literals import copy import datetime from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class RevisionableModel(models.Model): base = models.ForeignKey('self', models.S...
bsd-3-clause
hsuchie4/TACTIC
src/tactic/command/scheduler.py
5
7438
############################################################ # # Copyright (c) 2010, 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 witho...
epl-1.0
JMLoureiro77/esp8266-Arduino
esp8266com/esp8266/tools/macosx/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/lib/libstdc++.a-gdb.py
6
2433
# -*- python -*- # Copyright (C) 2009-2013 Free Software Foundation, Inc. # 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 versio...
lgpl-2.1
spoqa/dodotable
dodotable/schema.py
1
12038
# -*- coding: utf-8 -*- """:mod:`dodotable.schema` --- table schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import absolute_import import collections try: from collections.abc import MutableSequence except ImportError: from collections import MutableSequence import math from sqlalchem...
mit
Juniper/nova
nova/api/openstack/compute/admin_actions.py
3
3502
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
ccxt/ccxt
examples/py/bypass-cloudflare.py
1
1389
# -*- coding: utf-8 -*- import cfscrape import os import sys root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt # noqa: E402 def print_supported_exchanges(): print('Supported exchanges:') print(', '.join(ccxt.exchanges)) try:...
mit
yewang15215/django
django/urls/base.py
51
5669
from __future__ import unicode_literals from threading import local from django.utils import six from django.utils.encoding import force_text, iri_to_uri from django.utils.functional import lazy from django.utils.six.moves.urllib.parse import urlsplit, urlunsplit from django.utils.translation import override from .e...
bsd-3-clause
LinusU/StarCluster
starcluster/plugins/users.py
16
7325
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 ...
gpl-3.0
nilsonmorales/Puppyes-nightrc
usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/ro220.py
5
1382
import re from .common import InfoExtractor from ..utils import ( clean_html, compat_parse_qs, ) class Ro220IE(InfoExtractor): IE_NAME = '220.ro' _VALID_URL = r'(?x)(?:https?://)?(?:www\.)?220\.ro/(?P<category>[^/]+)/(?P<shorttitle>[^/]+)/(?P<video_id>[^/]+)' _TEST = { u"url": u"http://ww...
gpl-3.0
Zulfikarlatief/tealinux-software-center
src/progressbar.py
2
5271
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Deepin, Inc. # 2011 Wang Yong # 2012 Reza Faiz A # # Author: Wang Yong <lazycat.manatee@gmail.com> # Maintainer: Wang Yong <lazycat.manatee@gmail.com> # Reza Faiz A <ylpmiskrad@gmail.com> # Remixed : Reza Faiz A <ylpmi...
gpl-3.0
ojengwa/django-multitenants
tenant_schemas/utils.py
1
2758
from contextlib import contextmanager from django.conf import settings from django.db import connection try: from django.apps import apps get_model = apps.get_model except ImportError: from django.db.models.loading import get_model from django.core import mail @contextmanager def schema_context(schema_nam...
mit
jamesblunt/psutil
test/_windows.py
4
18571
#!/usr/bin/env python # -*- coding: UTF-8 -* # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Windows specific tests. These are implicitly run by test_psutil.py.""" import errno import os import pla...
bsd-3-clause
cshallue/models
research/deeplab/common_test.py
6
1872
# 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 applicab...
apache-2.0
openstack/cinder
cinder/image/glance.py
2
26507
# Copyright 2010 OpenStack Foundation # Copyright 2013 NTT corp. # 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/LIC...
apache-2.0
aps-sids/zulip
zerver/management/commands/remove_users_from_stream.py
113
2206
from __future__ import absolute_import from optparse import make_option from django.core.management.base import BaseCommand from zerver.lib.actions import do_remove_subscription from zerver.models import Realm, UserProfile, get_stream, \ get_user_profile_by_email class Command(BaseCommand): help = """Remove...
apache-2.0
nvoron23/socialite
jython/Lib/imaplib.py
87
46573
"""IMAP4 client. Based on RFC 2060. Public class: IMAP4 Public variable: Debug Public functions: Internaldate2tuple Int2AP ParseFlags Time2Internaldate """ # Author: Piers Lauder <piers@cs.su.oz.au> December 1997. # # Auth...
apache-2.0
dmarteau/QGIS
tests/src/python/test_qgsmaplayeraction.py
45
4904
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsMapLayerAction. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """...
gpl-2.0
absalan/Test
vendor/psy/psysh/test/tools/gen_unvis_fixtures.py
536
3120
#! /usr/bin/env python3 import sys from os.path import abspath, expanduser, dirname, join from itertools import chain import json import argparse from vis import vis, unvis, VIS_WHITE __dir__ = dirname(abspath(__file__)) OUTPUT_FILE = join(__dir__, '..', 'fixtures', 'unvis_fixtures.json') # Add custom fixtures her...
mit
michelts/lettuce
tests/functional/output_features/success_table/success_table_steps.py
19
1622
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
gpl-3.0
tanglei528/nova
nova/virt/hyperv/livemigrationutils.py
16
11392
# Copyright 2013 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
aam-at/tensorflow
tensorflow/python/keras/optimizer_v2/legacy_learning_rate_decay.py
8
29815
# 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
mcltn/ansible-modules-extras
cloud/vmware/vmware_dvswitch.py
72
7224
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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 Li...
gpl-3.0
chukysoria/pyspotify-connect
tests/test_error.py
1
4528
from __future__ import unicode_literals import unittest import spotifyconnect from spotifyconnect import utils class ErrorTest(unittest.TestCase): def test_error_is_an_exception(self): error = spotifyconnect.Error(0) self.assertIsInstance(error, Exception) def test_maybe_raise(self): ...
apache-2.0
marcin1j/griffith
lib/plugins/imp/FoxMovieManager.py
4
7070
# -*- coding: utf-8 -*- __revision__ = '$Id$' # Copyright (c) 2009 # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # ...
gpl-2.0
kirberich/qicrawler
quotes_page/bs4/dammit.py
32
29152
# -*- coding: utf-8 -*- """Beautiful Soup bonus library: Unicode, Dammit This class forces XML data into a standard format (usually to UTF-8 or Unicode). It is heavily based on code from Mark Pilgrim's Universal Feed Parser. It does not rewrite the XML or HTML to reflect a new encoding; that's the tree builder's job....
mit
nielsvanoch/django
django/core/management/commands/startapp.py
513
1040
from importlib import import_module from django.core.management.base import CommandError from django.core.management.templates import TemplateCommand class Command(TemplateCommand): help = ("Creates a Django app directory structure for the given app " "name in the current directory or optionally in t...
bsd-3-clause
vfuse/nixstatsagent
nixstatsagent/nixstatsagent.py
2
24810
#!/usr/bin/env python # -*- coding: utf-8; tab-width: 4; indent-tabs: nil; -*- # by Al Nikolov <root@toor.fi.eu.org> from __future__ import print_function import bz2 import sys if sys.version_info >= (3,): try: from past.builtins import basestring except ImportError: basestring = str import ...
bsd-3-clause
jazkarta/edx-platform-for-isc
common/djangoapps/terrain/stubs/comments.py
23
4932
""" Stub implementation of cs_comments_service for acceptance tests """ import re import urlparse from .http import StubHttpRequestHandler, StubHttpService class StubCommentsServiceHandler(StubHttpRequestHandler): @property def _params(self): return urlparse.parse_qs(urlparse.urlparse(self.path).que...
agpl-3.0
Rctue/nao-lib
gestures/HappyGesture_3.py
4
2776
# Choregraphe bezier export in Python. from naoqi import ALProxy names = list() times = list() keys = list() names.append("LShoulderPitch") times.append([ 1.53846, 3.07692]) keys.append([ [ 1.39626, [ 3, -0.51282, 0.00000], [ 3, 0.51282, 0.00000]], [ 1.39626, [ 3, -0.51282, 0.00000], [ 3, 0.00000, 0.00000]]]) names....
gpl-2.0
chirilo/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/optparser_unittest.py
124
11040
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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...
bsd-3-clause
ccellis/WHACK2016
flask/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py
220
19430
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os from collections import Mapping from datetime import datetime from .compat import cookielib, OrderedDict, urljoin, urlparse, buil...
bsd-3-clause
mmcdermo/helpinghand
server/dictionary.py
1
4171
class R_Expr: def __init__(self,r_type,r_restrictions,r_set): self.expression_type = r_type self.restrictions = r_restrictions self.target_set = r_set def show(self,key,title,desc): #always need this just to be able to retrieve things from database result = self.expressio...
mit
rohit21122012/DCASE2013
runs/2016/baseline128/src/evaluation.py
38
42838
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import numpy import math from sklearn import metrics class DCASE2016_SceneClassification_Metrics(): """DCASE 2016 scene classification metrics Examples -------- >>> dcase2016_scene_metric = DCASE2016_SceneClassification_Metrics(class_list=...
mit
markYoungH/chromium.src
native_client_sdk/src/build_tools/tests/parse_dsc_test.py
109
2483
#!/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. import copy import datetime import os import posixpath import subprocess import sys import unittest SCRIPT_DIR = os.path.dirname(o...
bsd-3-clause
popgengui/negui
agestrucne/pgvalidationdefs.py
1
5774
''' Description ''' from __future__ import print_function __filename__ = "pgvalidationdefs.py" __date__ = "20170326" __author__ = "Ted Cosart<ted.cosart@umontana.edu>" VERBOSE=False VERY_VERBOSE=False def validateNbAdjustment( s_adjustment, i_highest_cycle_number=1e20 ): ''' 2017_03_08. This def is created to handl...
agpl-3.0
mpaf/pywinauto-64bit
pywinauto/handleprops.py
1
12146
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # 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 Foundation; either version 2.1 # of the License, or (at your opti...
lgpl-2.1
Epirex/android_external_chromium_org
third_party/pexpect/pexpect.py
173
77354
"""Pexpect is a Python module for spawning child applications and controlling them automatically. Pexpect can be used for automating interactive applications such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup scripts for duplicating software package installations on different servers. It can be u...
bsd-3-clause
RaRe-Technologies/gensim
gensim/corpora/sharded_corpus.py
3
33089
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Original author: Jan Hajic jr. # Copyright (C) 2015 Radim Rehurek and gensim team. # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ This module implements a corpus class that stores its data in separate files called "shards". This is a com...
lgpl-2.1
ZJvandeWeg/bugfree-batman
tools/ants.py
3
72214
#!/usr/bin/env python from random import randrange, choice, shuffle, randint, seed, random from math import sqrt from collections import deque, defaultdict from fractions import Fraction import operator from game import Game from copy import deepcopy try: from sys import maxint except ImportError: from sys im...
gpl-2.0
mattias-lundell/pytest-xdist
xdist/slavemanage.py
2
11690
import fnmatch import os import py import pytest import execnet import xdist.remote from _pytest import runner # XXX load dynamically class NodeManager(object): EXIT_TIMEOUT = 10 DEFAULT_IGNORES = ['.*', '*.pyc', '*.pyo', '*~'] def __init__(self, config, specs=None, defaultchdir="pyexecnetcache"): ...
mit
molotof/infernal-twin
build/pillow/build/lib.linux-i686-2.7/PIL/ExifTags.py
71
5092
# # The Python Imaging Library. # $Id$ # # EXIF tags # # Copyright (c) 2003 by Secret Labs AB # # See the README file for information on usage and redistribution. # ## # This module provides constants and clear-text names for various # well-known EXIF tags. ## ## # Maps EXIF tags to tag names. TAGS = { # possib...
gpl-3.0