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
devonryder/dotfiles
polybar/spotify_status.py
2
2152
#!/bin/python import sys import dbus import argparse parser = argparse.ArgumentParser() parser.add_argument( '-t', '--trunclen', type=int, metavar='trunclen' ) parser.add_argument( '-f', '--format', type=str, metavar='custom format', dest='custom_format' ) parser.add_argument( ...
unlicense
EnceladOnline/interfaX
icon.py
1
1967
from tkinter import * from tkinter import ttk import func class Icon: def __init__(self, main, icon): # Affiche les icon sur le tab self.main = main self.master = self.main.cache["CurrentTabID"] self.icon = icon if self.icon[1][1] == None: self.icon_label() else: self.icon_image() ...
gpl-2.0
xiangel/hue
desktop/core/ext-py/Pygments-1.3.1/pygments/lexers/text.py
56
57922
# -*- coding: utf-8 -*- """ pygments.lexers.text ~~~~~~~~~~~~~~~~~~~~ Lexers for non-source code file types. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from bisect import bisect from pygments.lexer import Lexer, LexerC...
apache-2.0
wilkinsg/piweb
watched.py
1
2615
#!/usr/bin/python import hash import os import config import video_info watched_cache = {} def prepwatched( conn ): global watched_cache result = conn.execute( "SELECT * FROM history" ) queueitem = result.fetchone() while( queueitem ): watched_cache[ queueitem[ 0 ] ] = True queueitem ...
mit
yangl1996/libpagure
tests/test_api.py
1
12568
import pytest from libpagure import Pagure @pytest.fixture(scope='module') def simple_pg(): """ Create a simple Pagure object to be used in test """ pg = Pagure(pagure_repository="testrepo") return pg def test_pagure_object(): """ Test the pagure object creation """ pg = Pagure(pagure_...
gpl-2.0
mikehowson/foursquared.eclair
util/common.py
262
2820
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
apache-2.0
Hazelsuko07/17WarmingUp
py3.6/lib/python3.6/site-packages/dominate/util.py
25
3902
''' Utility classes for creating dynamic html documents ''' __license__ = ''' This file is part of Dominate. Dominate 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 (a...
mit
leedm777/ansible-modules-core
cloud/openstack/os_object.py
130
4074
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013, Benno Joy <benno@ansible.com> # # 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 vers...
gpl-3.0
hagifoo/gae-pomodoro
app/lib/oauth2client/contrib/gce.py
39
5431
# Copyright 2014 Google 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 applicable law or ...
mit
annttu/sikteeri
membership/templatetags/sorturl.py
2
3619
from django import template from django.http import QueryDict register = template.Library() sort_cycles = { 'id': ['id', '-id'], 'status': ['status', '-status'], 'bill_name': ['membership__person__first_name', 'membership__person__last_name', '-membership__person__fir...
mit
cityofsomerville/cornerwise
server/shared/migrations/0002_staffnotification.py
3
1092
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('shared', '0001_initial'), ] operations = [ migrations.Cr...
mit
KunihikoKido/aws-lambda-es-dumpdata
fabfile.py
3
1719
# -*- coding: utf-8 -*- import os from fabric.api import local from fabric.api import task from fabric_aws_lambda import SetupTask from fabric_aws_lambda import InvokeTask from fabric_aws_lambda import MakeZipTask from fabric_aws_lambda import AWSLambdaInvokeTask from fabric_aws_lambda import AWSLambdaGetConfigTask fr...
mit
cindym/hamster-applet
src/hamster/lib/i18n.py
4
1244
# - coding: utf-8 - import os import locale, gettext def setup_i18n(): #determine location of po files try: from .. import defs except: defs = None # to avoid confusion, we won't translate unless running installed # reason for that is that bindtextdomain is expecting # locale...
gpl-3.0
nixingyang/Kaggle-Competitions
TalkingData AdTracking Fraud Detection/perform_ensembling.py
1
2489
import os import glob import shutil import datetime import numpy as np import pandas as pd # Dataset PROJECT_NAME = "TalkingData AdTracking Fraud Detection" PROJECT_FOLDER_PATH = os.path.join(os.path.expanduser("~"), "Documents/Dataset", PROJECT_NAME) # Submission TEAM_NAME = "Auror...
mit
leilihh/nova
nova/virt/baremetal/db/sqlalchemy/session.py
17
2071
# Copyright (c) 2012 NTT DOCOMO, INC. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
SimtterCom/gyp
test/configurations/inheritance/gyptest-inheritance.py
72
1338
#!/usr/bin/env python # Copyright (c) 2009 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 build of an executable in three different configurations. """ import TestGyp test = TestGyp.TestGyp() if test.format == 'and...
bsd-3-clause
flennerhag/mlens
mlens/externals/sklearn/validation.py
1
27114
""" Scikit-learn utilities for input validation. """ # Authors: Olivier Grisel # Gael Varoquaux # Andreas Mueller # Lars Buitinck # Alexandre Gramfort # Nicolas Tresegnie # License: BSD 3 clause import warnings import numbers import numpy as np import scipy.sparse as sp...
mit
gregelin/python-ideascaleapi
setup.py
1
1086
from distutils.core import setup from ideascaleapi import __version__,__license__,__doc__ license_text = open('LICENSE').read() long_description = open('README.rst').read() setup(name="python-ideascaleapi", version=__version__, py_modules=["ideascaleapi"], description="Libraries for interacting with...
bsd-3-clause
frerepoulet/ZeroNet
src/lib/pyasn1/type/namedtype.py
4
14243
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # import sys from pyasn1.type import tagmap from pyasn1 import error __all__ = ['NamedType', 'OptionalNamedType', 'DefaultedNamedType', 'NamedTypes'] class NamedType(ob...
gpl-2.0
anisyonk/pilot
DBReleaseHandler.py
4
12301
import os from PilotErrors import PilotErrors from pUtil import tolog, readpar class DBReleaseHandler: """ Methods for handling the DBRelease file and possibly skip it in the input file list In the presence of $[VO_ATLAS_SW_DIR|OSG_APP]/database, the pilot will use these methods to: 1. Extract the req...
apache-2.0
woooooojoo/flask001
lib/flask/signals.py
783
2140
# -*- coding: utf-8 -*- """ flask.signals ~~~~~~~~~~~~~ Implements signals based on blinker if available, otherwise falls silently back to a noop :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ signals_available = False try: from blinker import Name...
apache-2.0
uwosh/COBAInternship
config.py
1
1615
# -*- coding: utf-8 -*- # # File: COBAInternship.py # # Copyright (c) 2008 by [] # Generator: ArchGenXML Version 2.1 # http://plone.org/products/archgenxml # # GNU General Public License (GPL) # __author__ = """Andrew Schultz and Josh Klotz""" __docformat__ = 'plaintext' # Product configuration. # # The c...
gpl-2.0
marekjm/diaspy
diaspy/models.py
1
23071
#!/usr/bin/env python3 """This module is only imported in other diaspy modules and MUST NOT import anything. """ import json import copy import re BS4_SUPPORT=False try: from bs4 import BeautifulSoup except ImportError: print("[diaspy] BeautifulSoup not found, falling back on regex.") else: BS4_SUPPORT=True fro...
mit
monouno/site
judge/migrations/0001_initial.py
3
49547
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.core.validators import django.db.models.deletion import django.utils.timezone import mptt.fields from django.conf import settings from django.db import models, migrations import judge.models class Migration(migrations.Migration): dep...
agpl-3.0
agentxan/nzbToMedia
libs/unidecode/x0ad.py
253
4766
data = ( 'gwan', # 0x00 'gwanj', # 0x01 'gwanh', # 0x02 'gwad', # 0x03 'gwal', # 0x04 'gwalg', # 0x05 'gwalm', # 0x06 'gwalb', # 0x07 'gwals', # 0x08 'gwalt', # 0x09 'gwalp', # 0x0a 'gwalh', # 0x0b 'gwam', # 0x0c 'gwab', # 0x0d 'gwabs', # 0x0e 'gwas', # 0x0f 'gwass', #...
gpl-3.0
bratsche/Neutron-Drive
google_appengine/lib/django_1_3/django/contrib/comments/models.py
313
7636
import datetime from django.contrib.auth.models import User from django.contrib.comments.managers import CommentManager from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.db import models from django.core im...
bsd-3-clause
NaN-git/bicreditsnew
qa/rpc-tests/listtransactions.py
4
4726
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcredit Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework import BitcreditTestFramework from bitcreditrpc.aut...
mit
crosswalk-project/chromium-crosswalk-efl
tools/perf/page_sets/presubmit_unittest.py
43
5409
# 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 collections import os import sys import unittest PERF_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.j...
bsd-3-clause
ict-felix/stack
expedient/src/python/expedient/common/federation/geni/util/cert_util.py
2
2940
#---------------------------------------------------------------------- # Copyright (c) 2010 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
apache-2.0
matousc89/padasip
padasip/filters/nlmf.py
1
5444
""" .. versionadded:: 1.1.0 The least-mean-fourth (LMF) adaptive filter implemented according to the paper :cite:`zerguine2000convergence`. The NLMF is an extension of the LMF adaptive filter (:ref:`filter-lmf`). The NLMF filter can be created as follows >>> import padasip as pa >>> pa.filters.FilterNLMF(n) ...
mit
Bysmyyr/blink-crosswalk
Tools/Scripts/webkitpy/tool/main.py
44
3144
# Copyright (c) 2010 Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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...
bsd-3-clause
trondhindenes/ansible
lib/ansible/executor/task_queue_manager.py
20
15648
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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 option) an...
gpl-3.0
tachijuan/python
myscripts/imap.py
1
1470
import os, sys, imaplib, rfc822, re, StringIO import RPi.GPIO as GPIO import time server ='mail.xxx.us' username='juan@xxx.us' password='xxx' GPIO.setmode(GPIO.BOARD) GREEN_LED = 22 RED_LED = 7 GPIO.setup(GREEN_LED, GPIO.OUT) GPIO.setup(RED_LED, GPIO.OUT) M = imaplib.IMAP4_SSL(server) M.login(username, password)...
mit
codepython/CollectorCity-Market-Place
stores/apps/blog_pages/tests.py
2
8560
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ import datetime import logging import time from django.test import TestCase from django.core.urlresolvers imp...
apache-2.0
JeremyRand/namecore
contrib/spendfrom/spendfrom.py
680
10053
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Bit...
mit
LevinJ/Supply-demand-forecasting
implement/xgboostmodel.py
1
4070
import sys import os sys.path.insert(0, os.path.abspath('..')) from preprocess.preparedata import PrepareData import numpy as np from utility.runtype import RunType from utility.datafilepath import g_singletonDataFilePath from preprocess.splittrainvalidation import HoldoutSplitMethod import xgboost as xgb from evaluat...
mit
MarkWh1te/xueqiu_predict
python3_env/lib/python3.4/site-packages/pygments/token.py
19
6067
# -*- coding: utf-8 -*- """ pygments.token ~~~~~~~~~~~~~~ Basic token types and the standard tokens. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ class _TokenType(tuple): parent = None def split(self): buf = [] ...
mit
benoitsteiner/tensorflow-opencl
tensorflow/python/kernel_tests/logging_ops_test.py
30
2954
# 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
zachjanicki/osf.io
website/notifications/events/utils.py
66
5782
from itertools import product from website.notifications.emails import compile_subscriptions from website.notifications import utils, constants def get_file_subs_from_folder(addon, user, kind, path, name): """Find the file tree under a specified folder.""" folder = dict(kind=kind, path=path, name=name) f...
apache-2.0
srjoglekar246/sympy
sympy/mpmath/identification.py
12
28929
""" Implements the PSLQ algorithm for integer relation detection, and derivative algorithms for constant recognition. """ from .libmp.backend import xrange from .libmp import int_types, sqrt_fixed # round to nearest integer (can be done more elegantly...) def round_fixed(x, prec): return ((x + (1<<(prec-1))) >> p...
bsd-3-clause
lgscofield/odoo
addons/account_analytic_plans/wizard/__init__.py
445
1117
# -*- 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
jcoady9/python-for-android
python3-alpha/python3-src/Lib/encodings/cp737.py
272
34681
""" Python Character Mapping Codec cp737 generated from 'VENDORS/MICSFT/PC/CP737.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='strict...
apache-2.0
aeliot/openthread
tests/scripts/thread-cert/network_layer.py
10
8233
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 # ...
bsd-3-clause
Censio/filterpy
filterpy/common/tests/test_discretization.py
1
2566
# -*- coding: utf-8 -*- """Copyright 2015 Roger R Labbe Jr. FilterPy library. http://github.com/rlabbe/filterpy Documentation at: https://filterpy.readthedocs.org Supporting book at: https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python This is licensed under an MIT license. See the readme.MD file for mor...
mit
boada/planckClusters
MOSAICpipe/bpz-1.99.3/prior_full.py
1
3446
from __future__ import print_function from __future__ import division from past.utils import old_div from useful import match_resol import numpy import sys # Hacked to use numpy and avoid import * commands # FM Float = numpy.float less = numpy.less def function(z, m, nt): """HDFN prior for the main six types of ...
mit
Lucifer-Kim/scrapy
extras/qps-bench-server.py
178
1640
#!/usr/bin/env python from __future__ import print_function from time import time from collections import deque from twisted.web.server import Site, NOT_DONE_YET from twisted.web.resource import Resource from twisted.internet import reactor class Root(Resource): def __init__(self): Resource.__init__(self...
bsd-3-clause
yajiedesign/p2pool
p2pool/bitcoin/data.py
185
10220
from __future__ import division import hashlib import random import warnings import p2pool from p2pool.util import math, pack def hash256(data): return pack.IntType(256).unpack(hashlib.sha256(hashlib.sha256(data).digest()).digest()) def hash160(data): if data == '04ffd03de44a6e11b9917f3a29f9443283d9871c9d74...
gpl-3.0
miipl-naveen/optibizz
addons/warning/warning.py
243
11529
# -*- 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
brandond/ansible
lib/ansible/modules/network/avi/avi_analyticsprofile.py
29
29145
#!/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
msiedlarek/qtwebkit
Tools/Scripts/webkitpy/tool/commands/bugsearch.py
124
2323
# Copyright (c) 2010 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 conditions and the ...
lgpl-3.0
kutenai/django
tests/model_regress/tests.py
35
8981
from __future__ import unicode_literals import datetime from operator import attrgetter from django.core.exceptions import ValidationError from django.db import router from django.db.models.sql import InsertQuery from django.test import TestCase, skipUnlessDBFeature from django.utils import six from django.utils.time...
bsd-3-clause
ASCrookes/django
django/contrib/auth/tokens.py
433
2803
from datetime import date from django.conf import settings from django.utils import six from django.utils.crypto import constant_time_compare, salted_hmac from django.utils.http import base36_to_int, int_to_base36 class PasswordResetTokenGenerator(object): """ Strategy object used to generate and check token...
bsd-3-clause
vipulroxx/sympy
sympy/galgebra/tests/test_ga.py
7
24774
# sympy/galgebra/tests/test_ga.py """ The reference D&L is "Geometric Algebra for Physicists" by Doran and Lasenby """ from sympy.core import expand, Rational, S, Symbol, symbols from sympy.core.compatibility import range from sympy.functions import sin, cos from sympy.galgebra.ga import MV, Nga, Com from sympy.galge...
bsd-3-clause
luzheqi1987/nova-annotation
nova/tests/unit/integrated/v3/test_remote_consoles.py
1
3052
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
apache-2.0
nightlydash/darkcoin
contrib/testgen/base58.py
2139
2818
''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): return c def chr(n): return byte...
mit
AlexandraMercier/StrategyIA
ai/Algorithm/PathfinderRRT.py
3
13347
# Under MIT License, see LICENSE.txt """ Module intelligent contenant l'implementation d'un Rapidly exploring Random Tree. Le module contient une classe qui peut être instanciée et qui calcule les trajectoires des robots de l'équipe. Les détails de l'algorithme sont disponibles sur la page wikipedia. Co...
mit
myriadcoin/myriadcoin
test/functional/mining_getblocktemplate_longpoll.py
9
3316
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test longpolling with getblocktemplate.""" from decimal import Decimal from test_framework.test_frame...
mit
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/numpy/testing/tests/test_doctesting.py
224
1322
""" Doctests for NumPy-specific nose/doctest modifications """ from __future__ import division, absolute_import, print_function # try the #random directive on the output line def check_random_directive(): ''' >>> 2+2 <BadExample object at 0x084D05AC> #random: may vary on your system ''' # check the ...
mit
liuziyan/cf-php-build-pack
lib/build_pack_utils/detecter.py
49
2523
import os import re import logging from itertools import chain class BaseFileSearch(object): def __init__(self): self._log = logging.getLogger('detecter') self.recursive = False self.fullPath = False def _match(self, term): return True def search(self, root): if s...
apache-2.0
Ms2ger/presto-testo
wpt/websockets/mod_pywebsocket/memorizingfile.py
7
3111
#!/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...
bsd-3-clause
kasioumis/invenio
invenio/modules/formatter/format_elements/bfe_plots.py
13
3661
# -*- coding: utf-8 -*- # # $Id: bfe_CERN_plots.py,v 1.3 2009/03/17 10:55:15 jerome Exp $ # # This file is part of Invenio. # Copyright (C) 2010, 2011, 2013, 2014 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free S...
gpl-2.0
hashems/Mobile-Cloud-Development-Projects
appengine/standard/xmpp/xmpp_test.py
9
1598
# Copyright 2016 Google 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 applicable law or a...
apache-2.0
michalliu/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python2.7/distutils/bcppcompiler.py
250
14941
"""distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. """ # This implementation by Lyle Johnson, based on the original msvccompiler.py # module and using the directions originally published by Gordon Williams. # XXX looks like there's a L...
gpl-2.0
chromium/chromium
third_party/blink/web_tests/external/wpt/webdriver/tests/refresh/user_prompts.py
16
4115
# META: timeout=long import pytest from webdriver.error import StaleElementReferenceException from tests.support.asserts import assert_dialog_handled, assert_error, assert_success def refresh(session): return session.transport.send( "POST", "session/{session_id}/refresh".format(**vars(session))) @pyt...
bsd-3-clause
mhugo/QGIS
python/plugins/processing/algs/grass7/ext/v_net_bridge.py
45
1665
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_bridge.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr **********************...
gpl-2.0
rdeheele/odoo
addons/l10n_fr/wizard/__init__.py
424
1462
# -*- 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
consulo/consulo-python
plugin/src/main/dist/helpers/pydev/_pydev_bundle/_pydev_calltip_util.py
33
4916
''' License: Apache 2.0 Author: Yuli Fitterman ''' # noinspection PyBroadException import types from _pydevd_bundle.pydevd_constants import IS_JYTHON, IS_PY3K try: import inspect except: try: from _pydev_imps import _pydev_inspect as inspect except: import traceback; traceback.pri...
apache-2.0
selboo/starl-mangle
webvirtmgr/dashboard/views.py
1
5187
from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.template import RequestContext from django.utils.datastructures import SortedDict from instance.models import Host from webvirtmgr.server import ConnServer from dashboard.forms import HostAddTcpForm, HostAddSshForm ...
apache-2.0
andreparrish/python-for-android
python-modules/twisted/twisted/test/test_text.py
49
5450
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.trial import unittest from twisted.python import text import string from cStringIO import StringIO sampleText = \ """Every attempt to employ mathematical methods in the study of chemical questions must be considered prof...
apache-2.0
javiplx/debian-devel
cobbler/action_replicate.py
4
8848
""" Replicate from a cobbler master. Copyright 2007-2008, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> Scott Henson <shenson@redhat.com> 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 ve...
gpl-2.0
ychen820/microblog
flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py
2763
11318
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Simon Montagu # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved...
bsd-3-clause
edx/edx-platform
common/lib/xmodule/xmodule/tests/test_conditional.py
3
19144
# lint-amnesty, pylint: disable=missing-module-docstring import json import unittest from unittest.mock import Mock, patch from fs.memoryfs import MemoryFS from lxml import etree from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator from web_fragments.fragment...
agpl-3.0
helldorado/ansible
lib/ansible/modules/storage/zfs/zfs.py
33
7963
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Johan Wiren <johan.wiren.se@gmail.com> # Copyright: (c) 2017, Ansible Project # 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__ = t...
gpl-3.0
dgladkov/django
tests/null_fk_ordering/tests.py
381
2012
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Author, Comment, Forum, Post, SystemInfo class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Key...
bsd-3-clause
dfang/odoo
addons/account_asset/wizard/asset_modify.py
25
4088
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import etree from odoo import api, fields, models, _ from odoo.osv.orm import setup_modifiers class AssetModify(models.TransientModel): _name = 'asset.modify' _description = 'Modify Asset' name ...
agpl-3.0
rec/DMXIS
Macros/Python/telnetlib.py
8
22465
r"""TELNET client class. Based on RFC 854: TELNET Protocol Specification, by J. Postel and J. Reynolds Example: >>> from telnetlib import Telnet >>> tn = Telnet('www.python.org', 79) # connect to finger port >>> tn.write('guido\r\n') >>> print tn.read_all() Login Name TTY Idl...
artistic-2.0
muminoff/tarjimonlar-analytics
fabfile.py
13
1088
#!/usr/bin/env python """Fabfile using only commands from buedafab (https://github.com/bueda/ops) to deploy this app to remote servers. """ import os from fabric.api import * from buedafab.test import (test, tornado_test_runner as _tornado_test_runner, lint) from buedafab.deploy.types import tornado_deploy as...
bsd-2-clause
subutai/nupic
examples/sp/hello_sp.py
25
5011
# ---------------------------------------------------------------------- # 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...
agpl-3.0
chuan9/chromium-crosswalk
tools/deep_memory_profiler/accumulate.py
100
9536
#!/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. # A script to accumulate values from the 'dmprof cat' command into CSV or else. # # Usage: # ./accumulate.py -f <format> -t <template...
bsd-3-clause
hassoon3/odoo
addons/portal/mail_mail.py
320
2625
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
Emilgardis/falloutsnip
Vendor/IronPython/Lib/rexec.py
228
20148
"""Restricted execution facilities. The class RExec exports methods r_exec(), r_eval(), r_execfile(), and r_import(), which correspond roughly to the built-in operations exec, eval(), execfile() and import, but executing the code in an environment that only exposes those built-in operations that are deemed safe. To t...
gpl-3.0
geodashio/geodash-framework-django
geodash/static/geodash/lib/bootstrap/3.3.5/test-infra/s3_cache.py
2166
5734
#!/usr/bin/env python2.7 # pylint: disable=C0301 from __future__ import absolute_import, unicode_literals, print_function, division from sys import argv from os import environ, stat, chdir, remove as _delete_file from os.path import dirname, basename, abspath, realpath, expandvars from hashlib import sha256 from subpr...
bsd-3-clause
kingoflolz/hearthbreaker
hearthbreaker/serialization/move.py
8
6665
import hearthbreaker.game_objects __author__ = 'dyule' class Move: def __init__(self): super().__init__() self.random_numbers = [] def play(self, game): pass @staticmethod def from_json(name, random=[], **json): cls = None if name == 'play': cls =...
mit
Resellers/bootstrap
test-infra/s3_cache.py
2166
5734
#!/usr/bin/env python2.7 # pylint: disable=C0301 from __future__ import absolute_import, unicode_literals, print_function, division from sys import argv from os import environ, stat, chdir, remove as _delete_file from os.path import dirname, basename, abspath, realpath, expandvars from hashlib import sha256 from subpr...
mit
zhoulingjun/django
tests/migrations/test_commands.py
38
49416
# -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs import importlib import os from django.apps import apps from django.core.management import CommandError, call_command from django.db import DatabaseError, connection, models from django.db.migrations.recorder import MigrationRecorder from d...
bsd-3-clause
patrickod/stem
test/unit/descriptor/extrainfo_descriptor.py
2
29131
""" Unit tests for stem.descriptor.extrainfo_descriptor. """ import datetime import functools import re import unittest import stem.descriptor import test.require from stem.descriptor.extrainfo_descriptor import ( RelayExtraInfoDescriptor, BridgeExtraInfoDescriptor, DirResponse, DirStat, ) from test.unit.de...
lgpl-3.0
ossdemura/django-miniblog
src/Lib/site-packages/pip/commands/wheel.py
341
7729
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import warnings from pip.basecommand import RequirementCommand from pip.exceptions import CommandError, PreviousBuildDirError from pip.req import RequirementSet from pip.utils import import_or_raise from pip.utils.build import Bui...
mit
Teamxrtc/webrtc-streaming-node
third_party/webrtc/src/chromium/src/tools/json_schema_compiler/util_cc_helper.py
31
1498
# 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. _API_UTIL_NAMESPACE = 'json_schema_compiler::util' class UtilCCHelper(object): """A util class that generates code that uses tools/json_schema_comp...
mit
anntzer/scikit-learn
sklearn/linear_model/_passive_aggressive.py
2
17363
# Authors: Rob Zinkov, Mathieu Blondel # License: BSD 3 clause from ..utils.validation import _deprecate_positional_args from ._stochastic_gradient import BaseSGDClassifier from ._stochastic_gradient import BaseSGDRegressor from ._stochastic_gradient import DEFAULT_EPSILON class PassiveAggressiveClassifier(BaseSGDCl...
bsd-3-clause
wnt-zhp/hufce
django/contrib/formtools/tests/__init__.py
78
16958
import os import re import warnings from django import http from django.conf import settings from django.contrib.formtools import preview, utils from django.contrib.formtools.wizard import FormWizard from django.test import TestCase from django.test.utils import get_warnings_state, restore_warnings_state from django.u...
gpl-3.0
akarol/cfme_tests
cfme/cloud/provider/azure.py
2
2877
from wrapanapi.msazure import AzureSystem from cfme.common.provider import DefaultEndpoint, DefaultEndpointForm from cfme.utils.version import pick from . import CloudProvider class AzureEndpoint(DefaultEndpoint): """ represents default Azure endpoint (Add/Edit dialogs) """ @property def view_va...
gpl-2.0
vit-/telegram-uz-bot
uz/tests/interface/telegram/test_bot.py
1
5489
import time from datetime import datetime import mock import pytest from uz.tests import Awaitable from uz.interface.telegram import bot from uz.scanner import UknkownScanID CHAT_ID = 'chat_id' def tg_message(text): return { 'chat': { 'id': CHAT_ID, 'type': 'private', ...
mit
EmmanuelJohnson/ssquiz
flask/lib/python2.7/site-packages/babel/messages/pofile.py
136
16320
# -*- coding: utf-8 -*- """ babel.messages.pofile ~~~~~~~~~~~~~~~~~~~~~ Reading and writing of files in the ``gettext`` PO (portable object) format. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import os import re from babel.messages.catalog import...
bsd-3-clause
kazukisona/ThinkStats2
code/relay_soln.py
70
1675
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import thinkstats2 import thinkplot import relay def ObservedPmf(pmf, speed, label=None): """Returns a new Pmf repres...
gpl-3.0
pselle/calibre
src/calibre/gui2/auto_add.py
10
9782
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os, te...
gpl-3.0
chrxr/wagtail
wagtail/wagtailadmin/views/account.py
3
5345
from __future__ import absolute_import, unicode_literals from functools import wraps from django.conf import settings from django.contrib import messages from django.contrib.auth import views as auth_views from django.contrib.auth import update_session_auth_hash from django.contrib.auth.forms import PasswordChangeFor...
bsd-3-clause
CityofPittsburgh/pittsburgh-purchasing-suite
migrations/versions/31d29fbffe44_add_passwords_for_users.py
1
1988
"""add passwords for users Revision ID: 31d29fbffe44 Revises: 48c578b852fa Create Date: 2016-01-20 23:33:36.893832 """ # revision identifiers, used by Alembic. revision = '31d29fbffe44' down_revision = '48c578b852fa' import random from flask_security.utils import encrypt_password from alembic import op import sqla...
bsd-3-clause
mbalasso/mynumpy
doc/sphinxext/compiler_unparse.py
71
24704
""" Turn compiler.ast structures back into executable python code. The unparse method takes a compiler.ast tree and transforms it back into valid python code. It is incomplete and currently only works for import statements, function calls, function definitions, assignments, and basic expressions. ...
bsd-3-clause
zarboz/nvidia_shield
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
prasanna08/oppia
core/domain/improvements_domain.py
4
7872
# coding: utf-8 # # Copyright 2020 The Oppia 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 requi...
apache-2.0