repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
glwu/python-for-android
python3-alpha/python3-src/Tools/scripts/untabify.py
49
1298
#! /usr/bin/env python3 "Replace tabs with spaces in argument files. Print names of changed files." import os import sys import getopt import tokenize def main(): tabsize = 8 try: opts, args = getopt.getopt(sys.argv[1:], "t:") if not args: raise getopt.error("At least one file ar...
apache-2.0
paweljasinski/ironpython3
Src/StdLib/Lib/test/test_threading.py
72
36686
""" Tests for the threading module. """ import test.support from test.support import verbose, strip_python_stderr, import_module, cpython_only from test.script_helper import assert_python_ok import random import re import sys _thread = import_module('_thread') threading = import_module('threading') import time import...
apache-2.0
watonyweng/nova
nova/virt/libvirt/storage/rbd_utils.py
6
11793
# Copyright 2012 Grid Dynamics # Copyright 2013 Inktank Storage, Inc. # Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.or...
apache-2.0
Johnetordoff/osf.io
api_tests/draft_registrations/views/test_draft_registration_institutions_list.py
6
2214
import pytest from api.base.settings.defaults import API_BASE from api_tests.nodes.views.test_node_institutions_list import TestNodeInstitutionList from osf_tests.factories import DraftRegistrationFactory, AuthUserFactory @pytest.fixture() def user(): return AuthUserFactory() @pytest.fixture() def user_two(): ...
apache-2.0
tersmitten/ansible
lib/ansible/modules/network/nos/nos_command.py
73
7281
#!/usr/bin/python # Copyright: (c) 2018, Extreme 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) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
madhurrajn/samashthi
lib/django/core/management/commands/compilemessages.py
315
5174
from __future__ import unicode_literals import codecs import glob import os from django.core.management.base import BaseCommand, CommandError from django.core.management.utils import find_command, popen_wrapper from django.utils._os import npath, upath def has_bom(fn): with open(fn, 'rb') as f: sample =...
bsd-3-clause
testmana2/test
QScintilla/Lexers/LexerTCL.py
2
2267
# -*- coding: utf-8 -*- # Copyright (c) 2008 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a TCL/Tk lexer with some additional methods. """ from __future__ import unicode_literals from PyQt5.Qsci import QsciLexerTCL from .Lexer import Lexer import Preferences class LexerTCL(Lexer,...
gpl-3.0
Kast0rTr0y/ansible
lib/ansible/cli/pull.py
49
11656
# (c) 2012, 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) any lat...
gpl-3.0
xq262144/hue
desktop/core/ext-py/cx_Oracle-5.2.1/test/Cursor.py
3
11191
"""Module for testing cursor objects.""" import cx_Oracle import sys class TestCursor(BaseTestCase): def testExecuteNoArgs(self): """test executing a statement without any arguments""" result = self.cursor.execute("begin null; end;") self.failUnlessEqual(result, None) def testExecute...
apache-2.0
kennedyshead/home-assistant
homeassistant/components/aurora/config_flow.py
2
3659
"""Config flow for SpaceX Launches and Starman.""" import logging from aiohttp import ClientError from auroranoaa import AuroraForecast import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME from homeassistant.core import callback fro...
apache-2.0
h3biomed/ansible
lib/ansible/modules/network/bigswitch/bcf_switch.py
44
5102
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ted Elhourani <ted@bigswitch.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':...
gpl-3.0
kromain/chromium-tools
third_party/gsutil/gslib/commands/getcors.py
51
4357
# Copyright 2012 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...
bsd-3-clause
tensorflow/tensorflow
tensorflow/python/keras/tests/model_subclassing_test_util.py
6
5439
# 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
pilou-/ansible
lib/ansible/modules/network/aci/mso_schema_template_externalepg.py
21
6089
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.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_ve...
gpl-3.0
randynobx/ansible
lib/ansible/modules/network/nxos/nxos_acl_interface.py
32
8173
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
f0rki/cb-multios
original-challenges/NarfRPN/poller/for-release/machine.py
1
4948
#!/usr/bin/env python # # Copyright (C) 2014 Narf Industries <info@narfindustries.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # th...
mit
qsnake/gpaw
gpaw/pes/ds_beta.py
3
7095
from math import exp, sin, cos, pi, sqrt, acos, asin import numpy as np from ase.units import Bohr, Hartree, alpha import _gpaw from gpaw.fd_operators import Gradient from gpaw.utilities.gl_quadrature import GaussLegendre from gpaw.pes import ds_prefactor from gpaw.pes.state import State, H1s from gpaw.pes.continuum ...
gpl-3.0
ocefpaf/pyproj
pyproj/geod.py
1
25100
""" The Geod class can perform forward and inverse geodetic, or Great Circle, computations. The forward computation involves determining latitude, longitude and back azimuth of a terminus point given the latitude and longitude of an initial point, plus azimuth and distance. The inverse computation involves determining...
isc
kistef/Wappalyzer
src/drivers/python/wappalyzer.py
27
1470
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import PyV8 import requests from urlparse import urlparse try: import json except ImportError: import simplejson as json class Wappalyzer(object): def __init__(self, url): self.file_dir = os.path.dirname(__file__) f = o...
gpl-3.0
brokenjacobs/ansible
lib/ansible/modules/cloud/amazon/s3_logging.py
77
5864
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
gpl-3.0
wlamond/scikit-learn
sklearn/tests/test_random_projection.py
141
14040
from __future__ import division import numpy as np import scipy.sparse as sp from sklearn.metrics import euclidean_distances from sklearn.random_projection import johnson_lindenstrauss_min_dim from sklearn.random_projection import gaussian_random_matrix from sklearn.random_projection import sparse_random_matrix from...
bsd-3-clause
apark263/tensorflow
tensorflow/tools/docs/generate_lib.py
18
23300
# 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
devintjones/pyodbc
tests3/pgtests.py
3
15439
#!/usr/bin/python # Unit tests for PostgreSQL on Linux (Fedora) # This is a stripped down copy of the SQL Server tests. from __future__ import print_function import sys, os, re import unittest from decimal import Decimal from testutils import * _TESTSTR = '0123456789-abcdefghijklmnopqrstuvwxyz-' def _generate_test...
mit
demon-ru/iml-crm
addons/hr_timesheet_sheet/__init__.py
434
1127
# -*- 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...
agpl-3.0
llaera/namebench
nb_third_party/dns/node.py
215
5914
# Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
szibis/ansible-modules-core
database/postgresql/postgresql_user.py
23
25160
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
gpl-3.0
guardicore/monkey
monkey/monkey_island/cc/services/bootloader.py
1
3054
from typing import Dict, List from bson import ObjectId from monkey_island.cc.database import mongo from monkey_island.cc.services.node import NodeCreationException, NodeService from monkey_island.cc.services.utils.bootloader_config import ( MIN_GLIBC_VERSION, SUPPORTED_WINDOWS_VERSIONS, ) from monkey_island....
gpl-3.0
MrTheodor/espressopp
src/interaction/DihedralHarmonicCos.py
7
3547
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
gpl-3.0
topicusonderwijs/zxing-ios
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/wix.py
34
3561
"""SCons.Tool.wix Tool-specific initialization for wix, the Windows Installer XML Tool. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, ...
apache-2.0
atlarge-research/opendc-web-server
opendc/api/v1/experiments/experimentId/rack-states/endpoint.py
1
1515
from opendc.models.experiment import Experiment from opendc.models.rack_state import RackState from opendc.util import exceptions from opendc.util.rest import Response def GET(request): """Get this Experiment's Tack States.""" # Make sure required parameters are there try: request.check_required...
mit
vganapath/rally
rally/plugins/common/runners/serial.py
5
3029
# Copyright (C) 2014 Yahoo! Inc. All Rights Reserved. # 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 # ...
apache-2.0
argriffing/cvxpy
cvxpy/atoms/affine/sum_entries.py
7
1828
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
deisi/home-assistant
tests/components/device_tracker/test_unifi.py
4
5171
"""The tests for the Unifi WAP device tracker platform.""" import unittest from unittest import mock import urllib from homeassistant.components.device_tracker import unifi as unifi from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD from unifi import controller class TestUnifiScanner(unittest.Te...
mit
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Amazon/EC2/DeregisterImage.py
5
4153
# -*- coding: utf-8 -*- ############################################################################### # # DeregisterImage # Deregisters the specified AMI. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file ...
gpl-2.0
NinoFabio/Plugin.Video.Fabio
servers/powvideo.py
51
5034
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para powvideo # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impo...
gpl-2.0
TheTypoMaster/chromium-crosswalk
chrome/common/extensions/docs/server2/features_bundle.py
78
14840
# 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. from copy import copy from branch_utility import BranchUtility from compiled_file_system import SingleFile, Unicode from docs_server_utils import StringIden...
bsd-3-clause
amyvmiwei/chromium
third_party/tlslite/tlslite/integration/AsyncStateMachine.py
121
6963
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readable or write...
bsd-3-clause
U2Ft/library
library/library.py
1
4240
#!/usr/bin/env python """ Library Manage a list of media items in a collection, and maintain a list of items to add to the collection. Supports movies, TV shows, music artists, books, and games. Usage: library [-i] [-y] (have|want) (book|tv|movie|artist|game) <name> library list (book|tv|movie|artist|game) [have...
mit
Bismarrck/tensorflow
tensorflow/tools/docs/parser_test.py
22
25251
# 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
thedep2/CouchPotatoServer
libs/tornado/util.py
102
12256
"""Miscellaneous utility functions and classes. This module is used internally by Tornado. It is not necessarily expected that the functions and classes defined here will be useful to other applications, but they are documented here in case they are. The one public-facing part of this module is the `Configurable` cl...
gpl-3.0
nrwahl2/ansible
lib/ansible/modules/cloud/digital_ocean/digital_ocean_sshkey.py
10
8100
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: 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__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
ravippandey/xen-api
scripts/link-vms-by-sr.py
10
2795
#!/usr/bin/python # Populate a directory of symlinks partitioning VMs by SR # (c) Anil Madhavapeddy, Citrix Systems Inc, 2008 import atexit import XenAPI import os, sys import getopt def logout(): try: session.xenapi.session.logout() except: pass atexit.register(logout) def usage(): print...
lgpl-2.1
apdjustino/DRCOG_Urbansim
src/drcog/models/census_hedonic.py
1
9924
import numpy as np, pandas as pd, os from synthicity.utils import misc from drcog.models import dataset np.random.seed(1) import statsmodels.api as sm import pysal import matplotlib.pyplot as plt import statsmodels ## This code estimate a hedonic model for residential units. It is using data from the census for house...
agpl-3.0
sidartaoliveira/ansible
lib/ansible/modules/cloud/univention/udm_group.py
69
5397
#!/usr/bin/python # -*- coding: UTF-8 -*- # Copyright (c) 2016, Adfinis SyGroup AG # Tobias Rueetschi <tobias.ruetschi@adfinis-sygroup.ch> # # 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 Fr...
gpl-3.0
AlexHAHA/ardupilot
Tools/autotest/pysim/fg_display.py
229
1919
#!/usr/bin/env python import socket, struct, time, math, errno from pymavlink import fgFDM class udp_socket(object): '''a UDP socket''' def __init__(self, device, blocking=True, input=True): a = device.split(':') if len(a) != 2: print("UDP ports must be specified as host:port") ...
gpl-3.0
valkjsaaa/sl4a
python/src/Demo/tkinter/guido/dialog.py
47
3202
#! /usr/bin/env python # A Python function that generates dialog boxes with a text message, # optional bitmap, and any number of buttons. # Cf. Ousterhout, Tcl and the Tk Toolkit, Figs. 27.2-3, pp. 269-270. from Tkinter import * import sys def dialog(master, title, text, bitmap, default, *args): # 1. Create th...
apache-2.0
wfxiang08/django185
django/contrib/gis/geos/prototypes/geom.py
103
4450
from ctypes import POINTER, c_char_p, c_int, c_size_t, c_ubyte from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import ( check_geom, check_minus_one, check_sized_string, check_string, check_zero, ) from django.contrib.gis.geos.prototypes.threadsafe impor...
bsd-3-clause
mlperf/training_results_v0.5
v0.5.0/google/cloud_v2.8/gnmt-tpuv2-8/code/gnmt/model/t2t/tensor2tensor/data_generators/vqa_utils.py
3
8144
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
seancug/python-example
fatiando-0.2/cookbook/seismic_srtomo_smooth.py
1
2303
""" Seismic: 2D straight-ray tomography using smoothness regularization Uses synthetic data and a model generated from an image file. """ import urllib from os import path import numpy from fatiando.mesher import SquareMesh from fatiando.seismic import ttime2d, srtomo from fatiando.inversion.regularization import Smoo...
gpl-2.0
alander/StarCluster
starcluster/cli.py
16
13164
# 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
0x7F800000/gcc
gcc/ada/doc/share/conf.py
69
3588
# -*- coding: utf-8 -*- # # GNAT build configuration file import sys import os import time import re sys.path.append('.') import ada_pygments import latex_elements # Some configuration values for the various documentation handled by # this conf.py DOCS = { 'gnat_rm': { 'title': u'GNAT Reference Manual'...
gpl-2.0
jalavik/invenio
invenio/modules/search/receivers.py
16
3296
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014, 2015 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 Software Foundation; either version 2 of the # License, or (at your optio...
gpl-2.0
thnee/ansible
lib/ansible/modules/network/aci/aci_interface_selector_to_switch_policy_leaf_profile.py
13
7713
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.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_...
gpl-3.0
zincumyx/Mammoth
mammoth-src/build/contrib/hod/hodlib/Common/types.py
182
43056
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
apache-2.0
xiejianying/pjsip
pjsip-apps/src/pygui/call.py
26
3368
# $Id$ # # pjsua Python GUI Demo # # Copyright (C)2013 Teluu Inc. (http://www.teluu.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 version 2 of the License, or # (at your option) ...
gpl-2.0
ygol/odoo
addons/stock/tests/test_stock_flow.py
23
87441
# -*- coding: utf-8 -*- from openerp.addons.stock.tests.common import TestStockCommon from openerp.tools import mute_logger, float_round class TestStockFlow(TestStockCommon): @mute_logger('openerp.addons.base.ir.ir_model', 'openerp.models') def test_00_picking_create_and_transfer_quantity(self): """...
agpl-3.0
mobo95/pyload
module/web/filters.py
35
1482
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from os.path import abspath, commonprefix, join quotechar = "::/" try: from os.path import relpath except: from posixpath import curdir, sep, pardir def relpath(path, start=curdir): """Return a relative version of a path""" if not pat...
gpl-3.0
amwelch/a10sdk-python
a10sdk/core/cgnv6/cgnv6_lsn_alg_pptp.py
2
4919
from a10sdk.common.A10BaseClass import A10BaseClass class SamplingEnable(A10BaseClass): """This class does not support CRUD Operations please use parent. :param counters1: {"enum": ["all", "calls-established", "mismatched-pns-call-id", "gre-sessions-created", "gre-sessions-freed", "no-gre-session-match"...
apache-2.0
Dunkas12/BeepBoopBot
lib/youtube_dl/extractor/telegraaf.py
52
2785
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( determine_ext, remove_end, ) class TelegraafIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?telegraaf\.nl/tv/(?:[^/]+/)+(?P<id>\d+)/[^/]+\.html' _TEST = { 'url': 'http://www.te...
gpl-3.0
Mazecreator/tensorflow
tensorflow/python/training/basic_session_run_hooks_test.py
1
43043
# pylint: disable=g-bad-file-header # 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/LICENS...
apache-2.0
Vaidyanath/tempest
tempest/services/messaging/json/messaging_client.py
7
6520
# Copyright (c) 2014 Rackspace, 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
googleads/googleads-adxseller-examples
python/v1.1/get_all_ad_units_for_custom_channel.py
2
2448
#!/usr/bin/python # coding: utf-8 # # Copyright 2013 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 # # U...
apache-2.0
nosedjango/nosedjango
nosedjangotests/polls/migrations/0001_initial.py
1
1274
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models try: from django.db import migrations except ImportError: pass else: class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ] ...
lgpl-3.0
azatoth/scons
test/Java/JAVABOOTCLASSPATH.py
5
2718
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
quantifiedcode-bot/checkmate
checkmate/contrib/plugins/git/commands/diff.py
4
2418
# -*- coding: utf-8 -*- """ This file is part of checkmate, a meta code checker written in Python. Copyright (C) 2015 Andreas Dewes, QuantifiedCode UG This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Fou...
agpl-3.0
daradurvs/ignite
modules/platforms/python/examples/type_hints.py
11
1618
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
caosmo/pip
tests/data/src/sample/setup.py
51
3713
from setuptools import setup, find_packages import codecs import os import re here = os.path.abspath(os.path.dirname(__file__)) # Read the version number from a source file. # Why read it, and not import? # see https://groups.google.com/d/topic/pypa-dev/0PkjVpcxTzQ/discussion def find_version(*file_paths): # Open...
mit
2014c2g14/c2g14
exts/w2/static/Brython2.0.0-20140209-164925/Lib/unittest/test/test_discovery.py
785
13838
import os import re import sys import unittest class TestableTestProgram(unittest.TestProgram): module = '__main__' exit = True defaultTest = failfast = catchbreak = buffer = None verbosity = 1 progName = '' testRunner = testLoader = None def __init__(self): pass class TestDisc...
gpl-2.0
adhoc-dev/sale-workflow
sale_quotation_sourcing/model/procurement.py
34
1936
# -*- coding: utf-8 -*- # # Author: Alexandre Fayolle, Leonardo Pistone # Copyright 2014-2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version...
agpl-3.0
frouty/odoogoeen
addons/event/report/__init__.py
435
1079
# -*- 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
faizan-barmawer/openstack_ironic
ironic/drivers/modules/iboot.py
5
7453
# -*- coding: utf-8 -*- # # Copyright 2014 Red Hat, 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...
apache-2.0
katrid/django
django/core/management/commands/startproject.py
503
1359
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
ArielSaldana/sunset
yaml/test/gtest-1.8.0/googletest/scripts/common.py
1180
2919
# Copyright 2013 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 foll...
mit
nmiculinic/psiml2017-facs
landmarks_from_camera.py
1
1865
import argparse import numpy as np import cv2 import time import dataset from PIL import Image, ImageDraw from keras.models import load_model args = argparse.ArgumentParser() args.add_argument("model_path") args = args.parse_args() model = load_model(args.model_path) print(model.inputs) dim = int(model.input.shape[1]...
mit
jayceyxc/hue
desktop/core/ext-py/Django-1.6.10/tests/empty/tests.py
58
1221
from __future__ import absolute_import from django.core.exceptions import ImproperlyConfigured from django.db.models.loading import get_app from django.test import TestCase from django.test.utils import override_settings from django.utils import six from .models import Empty class EmptyModelTests(TestCase): def...
apache-2.0
lepricon49/headphones
lib/yaml/representer.py
359
17642
__all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer', 'RepresenterError'] from error import * from nodes import * import datetime import sys, copy_reg, types class RepresenterError(YAMLError): pass class BaseRepresenter(object): yaml_representers = {} yaml_multi_representers = {} d...
gpl-3.0
alphaKAI/mal
python/step8_macros.py
42
4847
import sys, traceback import mal_readline import mal_types as types import reader, printer from env import Env import core # read def READ(str): return reader.read_str(str) # eval def is_pair(x): return types._sequential_Q(x) and len(x) > 0 def quasiquote(ast): if not is_pair(ast): return types._...
mpl-2.0
akhmadMizkat/odoo
openerp/addons/base/tests/test_ir_filters.py
36
12520
# -*- coding: utf-8 -*- import functools from openerp import exceptions from openerp.tests import common def noid(d): """ Removes values that are not relevant for the test comparisons """ d.pop('id', None) d.pop('action_id', None) return d class FiltersCase(common.TransactionCase): def build(self...
gpl-3.0
LyonsLab/coge
bin/last_wrapper/Bio/Motif/Parsers/MEME.py
3
12014
# Copyright 2008 by Bartek Wilczynski # Adapted from Bio.MEME.Parser by Jason A. Hackney. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from Bio.Alphabet import IUPAC from Bi...
bsd-2-clause
bauman/laikaboss
laikaboss/modules/explode_upx.py
20
3720
# Copyright 2015 Lockheed Martin 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 # # Unless required by applicable law or agr...
apache-2.0
WoLpH/CouchPotatoServer
libs/tmdb3/tmdb_auth.py
10
4257
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------- # Name: tmdb_auth.py # Python Library # Author: Raymond Wagner # Purpose: Provide authentication and session services for # calls against the TMDB v3 API #----------------------- from datetime import datetime as _pydatetime, \ ...
gpl-3.0
JakeLowey/HackRPI2
django/conf/locale/pt_BR/formats.py
86
1536
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \d\e F \d\e Y...
mit
kbrebanov/ansible-modules-extras
system/lvol.py
2
16881
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@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 So...
gpl-3.0
pshriwise/dag_slicer
dagmc_slicer/dagmc_slice_tool.py
1
6991
import numpy as np from matplotlib.path import Path from matplotlib.patches import PathPatch import matplotlib.pyplot as plt import numpy as np from dagmc_slicer.Dag_Slicer import Dag_Slicer from matplotlib.widgets import CheckButtons, RadioButtons from matplotlib.colors import rgb2hex class dagmc_slicer(Dag_Slicer)...
bsd-2-clause
shakamunyi/neutron-dvr
neutron/tests/unit/openvswitch/test_ovs_defaults.py
16
1470
# Copyright (c) 2012 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 agreed to...
apache-2.0
CapOM/ChromiumGStreamerBackend
third_party/google_input_tools/third_party/closure_library/closure/bin/scopify.py
329
6785
#!/usr/bin/python # # Copyright 2010 The Closure Library 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 # # ...
bsd-3-clause
t3wz/mtasa-blue
vendor/google-breakpad/src/tools/gyp/pylib/gyp/__init__.py
574
21473
#!/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. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
gpl-3.0
mpkato/openliveq
openliveq/clickthrough.py
1
1360
from sqlalchemy import Column, Integer, String, Float, Index from .db import Base class Clickthrough(Base): __tablename__ = 'clickthroughs' __table_args__ = ( Index('clickthroughs_query_id_index', "query_id"), Index('clickthroughs_question_id_index', "question_id"), ) ORDERED_ATTRS...
mit
fkfk/linux_gt-i9000-gb
tools/perf/scripts/python/failed-syscalls-by-pid.py
944
1869
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
studybuffalo/rdrhc_calendar
run.py
1
1459
"""Downloads, extracts, and uploads schedules for AHS CZ pharmacists. Last Update: 2021-May-01 Copyright (c) Notices 2021 Joshua R. Torrance <studybuffalo@studybuffalo.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
gpl-3.0
Jgarcia-IAS/SAT
openerp/addons/stock_account/stock.py
21
14048
# -*- 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
luogangyi/bcec-nova
nova/virt/xenapi/image/utils.py
16
3394
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
xfumihiro/powerline
powerline/lint/__init__.py
14
20654
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os import logging from collections import defaultdict from itertools import chain from functools import partial from powerline import generate_config_finder, get_config_paths, load_config from po...
mit
urbaniak/gunicorn
examples/websocket/gevent_websocket.py
29
15600
import collections import errno import re from hashlib import md5, sha1 import base64 from base64 import b64encode, b64decode import socket import struct import logging from socket import error as SocketError import gevent from gunicorn.workers.async import ALREADY_HANDLED logger = logging.getLogger(__name__) WS_KE...
mit
stevecassidy/annotationrdf
docs/conf.py
1
8481
#!/usr/bin/env python # -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # ...
bsd-3-clause
mgedmin/ansible-modules-core
cloud/amazon/ec2_eip.py
16
9966
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
TheoChevalier/bedrock
bedrock/press/tests.py
10
12312
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime from django.core import mail from django.test.client import RequestFactory fro...
mpl-2.0
hoosteeno/kuma
vendor/packages/translate/convert/test_po2txt.py
26
2729
#!/usr/bin/env python # -*- coding: utf-8 -*- from translate.convert import po2txt, test_convert from translate.misc import wStringIO class TestPO2Txt: def po2txt(self, posource, txttemplate=None): """helper that converts po source to txt source without requiring files""" inputfile = wStringIO.S...
mpl-2.0
dgarros/ansible
lib/ansible/modules/network/cloudengine/ce_info_center_debug.py
39
21824
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
vitmod/enigma2
lib/python/Components/ServiceScan.py
6
7598
from enigma import eComponentScan, iDVBFrontend from Components.NimManager import nimmanager as nimmgr from Components.Converter.ChannelNumbers import channelnumbers class ServiceScan: Idle = 1 Running = 2 Done = 3 Error = 4 Errors = { 0: _("error starting scanning"), 1: _("error while scanning"), 2: _("n...
gpl-2.0