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
d40223223/2015cdbg6-40223223
static/Brython3.1.1-20150328-091302/Lib/binascii.py
620
24585
"""A pure Python implementation of binascii. Rather slow and buggy in corner cases. PyPy provides an RPython version too. """ # borrowed from https://bitbucket.org/pypy/pypy/src/f2bf94943a41/lib_pypy/binascii.py class Error(Exception): pass class Done(Exception): pass class Incomplete(Exception): pass ...
gpl-3.0
gentledevil/ansible
contrib/inventory/softlayer.py
150
6108
#!/usr/bin/env python """ SoftLayer external inventory script. The SoftLayer Python API client is required. Use `pip install softlayer` to install it. You have a few different options for configuring your username and api_key. You can pass environment variables (SL_USERNAME and SL_API_KEY). You can also write INI fil...
gpl-3.0
Phrozyn/MozDef
alerts/actions/pagerDutyTriggerEvent.py
2
3067
# 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/. # Copyright (c) 2014 Mozilla Corporation import requests import json import os from configlib import getConfig, OptionPa...
mpl-2.0
koobonil/Boss2D
Boss2D/addon/webrtc-jumpingyang001_for_boss/sdk/android/PRESUBMIT.py
11
1285
# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
mit
asgard-lab/neutron
neutron/agent/l3/keepalived_state_change.py
46
5533
# Copyright (c) 2015 Red Hat 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 a...
apache-2.0
arpho/mmasgis5
mmasgis/pvListQueryBuilderBase.py
1
2003
from constants import * class PvListQueryBuilderBase: """ @param utbs:[Utb] """ def __init__(self,utbs): self.utbs=utbs self.cons=cons def usesIstat(self): b=False for u in self.utbs: b=b or u.usesIstat() return b def usesCap(self): b=False for u in self.utbs: b=b or u.usesCap() return...
mit
tomas-forsman/izpack
izpack-wrapper/src/main/resources/utils/wrappers/izpack2jnlp/setup.py
26
1070
#!/usr/bin/env python # ........................................................................... # # # IzPack - Copyright 2008 Julien Ponge, All Rights Reserved. # # http://izpack.org/ # http://izpack.codehaus.org/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
apache-2.0
zaffra/Donate
django/views/generic/list_detail.py
16
5577
from django.template import loader, RequestContext from django.http import Http404, HttpResponse from django.core.xheaders import populate_xheaders from django.core.paginator import Paginator, InvalidPage from django.core.exceptions import ObjectDoesNotExist import warnings warnings.warn( 'Function-based generic v...
bsd-3-clause
rdipietro/tensorflow
tensorflow/contrib/framework/python/ops/variables.py
3
23042
# 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
kkouer/PcGcs
Lib/site-packages/numpy/core/code_generators/numpy_api.py
54
13599
"""Here we define the exported functions, types, etc... which need to be exported through a global C pointer. Each dictionary contains name -> index pair. Whenever you change one index, you break the ABI (and the ABI version number should be incremented). Whenever you add an item to one of the dict, the API needs to ...
gpl-3.0
lyceel/engine
build/gyp_chromium_test.py
40
2130
#!/usr/bin/env python # Copyright 2015 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 os import sys import unittest SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) SRC_DIR = os.path.dirname(SCRIPT_DIR) sy...
bsd-3-clause
section-io/graphite-web
webapp/graphite/app_settings.py
30
2240
"""Copyright 2008 Orbitz WorldWide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
apache-2.0
RayRuizhiLiao/ITK_4D
Wrapping/Generators/Python/Tests/GeodesicActiveContourImageFilter.py
1
6544
#========================================================================== # # Copyright Insight Software Consortium # # 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 # # ...
apache-2.0
matiasb/django
tests/check_framework/tests.py
116
11149
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.apps import apps from django.core import checks from django.core.checks import Error, Warning from django.core.checks.registry import CheckRegistry from django.core.management import call_command from django.core.management.base im...
bsd-3-clause
jampp/tornado
demos/appengine/blog.py
114
5385
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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
mayblue9/scikit-learn
examples/ensemble/plot_forest_importances_faces.py
403
1519
""" ================================================= Pixel importances with a parallel forest of trees ================================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more impor...
bsd-3-clause
amyxchen/openhtf
examples/example_plug.py
1
3172
# 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 agre...
apache-2.0
csarn/qthexedit
docks/struct_explorer.py
1
8347
from PySide.QtCore import * from PySide.QtGui import * from construct import * from construct.adapters import * from math import * from binascii import * #from ..mmapslice import * def red(cons): cons.color = Qt.red return cons class TreeNode(object): def __init__(self, value, row, parent, cons, name=""...
gpl-2.0
arnomoonens/DeepRL
yarll/agents/actorcritic/a3c.py
1
4785
# -*- coding: utf8 -*- """ Asynchronous Advantage Actor Critic (A3C) Most of the work is done in `a3c_worker.py`. Based on: - Pseudo code from Asynchronous Methods for Deep Reinforcement Learning - Tensorflow code from https://github.com/yao62995/A3C/blob/master/A3C_atari.py and https://github.com/openai/universe-st...
mit
synth3tk/the-blue-alliance
controllers/main_controller.py
1
14227
import os import logging import datetime import webapp2 from google.appengine.api import memcache from google.appengine.ext import ndb from google.appengine.ext.webapp import template import tba_config from base_controller import CacheableHandler from consts.event_type import EventType from consts.notification_type ...
mit
sysalexis/kbengine
kbe/src/lib/python/Lib/distutils/tests/test_build_py.py
81
6284
"""Tests for distutils.command.build_py.""" import os import sys import unittest from distutils.command.build_py import build_py from distutils.core import Distribution from distutils.errors import DistutilsFileError from distutils.tests import support from test.support import run_unittest class BuildPyTestCase(su...
lgpl-3.0
davehunt/kuma
kuma/wiki/tests/test_views.py
2
166620
# -*- coding: utf-8 -*- import base64 import datetime import json import time import mock from nose.tools import eq_, ok_ from nose.plugins.attrib import attr from pyquery import PyQuery as pq from urlparse import urlparse from django.conf import settings from django.contrib.sites.models import Site from django.core...
mpl-2.0
brvnl/master
parser/ArticleOrganizer.py
1
6740
# encoding=utf8 from parser.Calendar import Calendar from parser.Definitions import Definitions import logging import datetime import csv import sys #====================================================================================== # This file contains classes to help on the organization of the files. The basic ...
gpl-3.0
mdrasmus/spimap
test/scripts/old/test_hky.py
1
1196
import scipy from scipy.linalg import expm, logm, eig from scipy import dot def makeQ(bgfreq, tsvratio): a, c, g, t = bgfreq y = c + t r = a + g p = r / y b = 1. / (2*r*y * (1 + tsvratio)) ay = (r*y*tsvratio - a*g - c*t) / \ (2*(1.+tsvratio)*(y*a*g*p + r*c*t)) ar = p * ay ...
gpl-2.0
tommo/gii
support/waf/waflib/Tools/python.py
1
17525
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2007-2010 (ita) # Gustavo Carneiro (gjc), 2007 """ Support for Python, detect the headers and libraries and provide *use* variables to link C/C++ programs against them:: def options(opt): opt.load('compiler_c python') def configure(conf): conf.load('compile...
mit
linsalrob/bioinformatics
bin/translate_longest_orf.py
1
1066
""" Translate a sequence (eg. a metagenome) and print the longest ORF """ import sys import os from robseq import translate from rob import read_fasta from rob import rc try: faf = sys.argv[1] size = int(sys.argv[2]) except: sys.exit(sys.argv[0] + " <fasta file> <min orf size in amino acids>") fa = r...
mit
Chilledheart/chromium
media/tools/constrained_network_server/traffic_control.py
186
12569
# 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. """Traffic control library for constraining the network configuration on a port. The traffic controller sets up a constrained network configuration on a...
bsd-3-clause
pinney/source
tools/b43-tools/files/b43-fwsquash.py
494
4767
#!/usr/bin/env python # # b43 firmware file squasher # Removes unnecessary firmware files # # Copyright (c) 2009 Michael Buesch <mb@bu3sch.de> # # Licensed under the GNU/GPL version 2 or (at your option) any later version. # import sys import os def usage(): print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm...
gpl-2.0
rosmo/ansible
lib/ansible/modules/network/checkpoint/checkpoint_run_script.py
30
3057
#!/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
oneklc/dimod
dimod/reference/composites/higherordercomposites.py
1
14849
# Copyright 2018 D-Wave Systems 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
wy182000/gyp
test/generator-output/gyptest-copies.py
30
1830
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies file copies with --generator-output using an explicit build target of 'all'. """ import TestGyp # Android doesn't support --g...
bsd-3-clause
seibert-media/Highton
highton/models/comment.py
1
1176
from highton.models import HightonModel from highton.highton_constants import HightonConstants from highton import fields from highton import call_mixins class Comment( HightonModel, call_mixins.DetailCallMixin, call_mixins.CreateCallMixin, call_mixins.UpdateCallMixin, call_mixins.DeleteCallMixin,...
apache-2.0
solashirai/edx-platform
common/djangoapps/terrain/setup_prereqs.py
56
5001
""" Set up the prequisites for acceptance tests. This includes initialization and teardown for stub and video HTTP services and checking for external URLs that need to be accessible and responding. """ from lettuce import before, after, world from django.conf import settings from terrain.stubs.youtube import StubYouT...
agpl-3.0
romankagan/DDBWorkbench
plugins/hg4idea/testData/bin/hgext/convert/cvs.py
94
10274
# cvs.py: CVS conversion code inspired by hg-cvs-import and git-cvsimport # # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import os, re, socket, errno from cString...
apache-2.0
kaosbeat/monaxo
midi.py
1
1847
#! /usr/bin/env python import time, random, threading, monome, sched import rtmidi import loop16 from seq16 import Seq16 from monome import Monome from midiout import * # try to find a monome (you can skip this if you already know the host/port) print "looking for a monome..." host, port = monome.find_any_monome() pr...
mit
christchron/or-tools
data/rogo/rogo_20110107.py
76
1034
# # The Rogo problem from 2011-01-07 # best: 36 # rows = 12 cols = 7 max_steps = 16 W = 0 B = -1 problem = [ # 1 2 3 4 5 6 7 [4,7,W,W,W,W,3], # 1 [W,W,W,W,3,W,4], # 2 [W,W,4,W,7,W,W], # 3 [7,W,3,W,W,W,W], # 4 [B,B,B,W,3,W,W], # 5 [B,B,W,7,W,W,7], # 6 [B,B,W,W,W,4,B], # 7 [B,4,4,W,W,W,B], # ...
apache-2.0
frumiousbandersnatch/supybot-code
test/test_plugin.py
13
2083
### # Copyright (c) 2005, Jeremiah Fincher # 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 conditi...
bsd-3-clause
butterhirsch/cutplace2
cutplace/errors.py
2
13797
""" Errors that can be raised by cutplace. """ # Copyright (C) 2009-2015 Thomas Aglassinger # # This program 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 ...
lgpl-3.0
daineseh/kodi-plugin.video.ted-talks-chinese
youtube_dl/extractor/nuevo.py
22
1170
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( float_or_none, xpath_text ) class NuevoBaseIE(InfoExtractor): def _extract_nuevo(self, config_url, video_id): config = self._download_xml( config_url, video_id, transform...
gpl-2.0
decvalts/iris
lib/iris/tests/unit/fileformats/grib/test_as_pairs.py
5
1795
# (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
gpl-3.0
eltondias/SistemaCobrancaBG
vendor/doctrine/orm/docs/en/conf.py
10
6698
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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 # autogenerate...
bsd-3-clause
ksrajkumar/openerp-6.1
openerp/addons/document_ftp/__openerp__.py
9
2143
# -*- 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
Lh4cKg/python3-in-one-pic
src/nativeDatatypes.py
19
2928
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Number ## integer a = 1 b = 0x10 # 16 c = 0o10 # 8 d = 0b10 # 2 print(type(a)) # <class 'int'> ## float c = 1.2 d = .5 # 0.5 g = .314e1 # 3.14 print(type(g)) # <class 'float'> ## complex e = 1+2j f = comp...
mit
Endika/connector-interfaces
base_import_async/__init__.py
5
1137
# -*- coding: utf-8 -*- ############################################################################### # # Module for Odoo # Copyright (C) 2014 ACSONE SA/NV (http://acsone.eu). # Copyright (C) 2013 Akretion (http://www.akretion.com). # @author Stéphane Bidoul <stephane.bidoul@acsone.eu> # @author Sébastien B...
agpl-3.0
CtrlC-Root/cse3341
Core/cse3341/pt/write_statement.py
1
1161
from ..token import Token from .node import Node from .identifier_list import IdentifierList class WriteStatement(Node): """ A write statement. """ def __init__(self): """ Create the write statement. """ self.identifiers = IdentifierList() @classmethod def pa...
mit
mmottahedi/nilmtk
nilmtk/metergroup.py
4
70748
from __future__ import print_function, division import networkx as nx import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter from datetime import timedelta from warnings import warn from sys import stdout from collections import Counter from copy import copy, ...
apache-2.0
azatoth/scons
test/Scanner/generated.py
4
12998
#!/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
kmee/werkzeug
examples/cupoftee/pages.py
30
2415
# -*- coding: utf-8 -*- """ cupoftee.pages ~~~~~~~~~~~~~~ The pages. :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from werkzeug.utils import redirect from werkzeug.exceptions import NotFound from cupoftee.application imp...
bsd-3-clause
MichaelDoyle/Diamond
src/collectors/zookeeper/zookeeper.py
31
4574
# coding=utf-8 """ Collect zookeeper stats. ( Modified from memcached collector ) #### Dependencies * subprocess * Zookeeper 'mntr' command (zookeeper version => 3.4.0) #### Example Configuration ZookeeperCollector.conf ``` enabled = True hosts = localhost:2181, app-1@localhost:2181, app-2@localhost:218...
mit
GNOME/conduit
test/python-tests/TestCoreConflict.py
2
1193
#common sets up the conduit environment from common import * import conduit.Conflict as Conflict test = SimpleSyncTest() test.prepare( test.get_dataprovider("TestSource"), test.get_dataprovider("TestConflict") ) test.set_two_way_policy({"conflict":"ask","deleted":"skip"}) config = {} config["...
gpl-2.0
TangHao1987/intellij-community
python/helpers/pycharm/attestrunner.py
85
8269
import sys, os import imp helpers_dir = os.getenv("PYCHARM_HELPERS_DIR", sys.path[0]) if sys.path[0] != helpers_dir: sys.path.insert(0, helpers_dir) from tcunittest import TeamcityTestResult from pycharm_run_utils import import_system_module from pycharm_run_utils import adjust_sys_path from pycharm_run_utils im...
apache-2.0
makefu/repo-sync
reposync/cli.py
1
4555
#! /usr/bin/env python3 """ usage: repo-sync CONFIG Creates a sync repo in PWD. Environment: REPONAME name of the sync repo in workdir (Default: repo-sync.git) Configuration: Sync configuration in json format,defines which branch of "origin.url" will be mirrored to "mirror.url" $name.origin.ref d...
mit
dkm/RIOT
tests/gnrc_sixlowpan/tests/01-run.py
18
3960
#!/usr/bin/env python3 # Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de> # Copyright (C) 2016 Takuo Yonezawa <Yonezawa-T2@mail.dnp.co.jp> # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. ...
lgpl-2.1
dreispt/project
project_issue_reassign/wizard/project_issue_reassign.py
7
1565
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Daniel Reis # # 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...
agpl-3.0
ArneBab/pypyjs
website/demo/home/rfk/repos/pypy/lib_pypy/cffi/_pycparser/c_ast.py
23
20650
#----------------------------------------------------------------- # ** ATTENTION ** # This code was automatically generated from the file: # _c_ast.cfg # # Do not modify it directly. Modify the configuration file and # run the generator again. # ** ** *** ** ** # # pycparser: c_ast.py # # AST Node classes. # # Copyri...
mit
marcsans/cnn-physics-perception
phy/lib/python2.7/site-packages/sklearn/datasets/covtype.py
46
3508
"""Forest covertype dataset. A classic dataset for classification benchmarks, featuring categorical and real-valued features. The dataset page is available from UCI Machine Learning Repository http://archive.ics.uci.edu/ml/datasets/Covertype Courtesy of Jock A. Blackard and Colorado State University. """ # Aut...
mit
GheRivero/ansible
lib/ansible/modules/network/avi/avi_vsdatascriptset.py
41
4759
#!/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
keerts/home-assistant
homeassistant/components/http/__init__.py
5
16240
""" This module provides WSGI application to serve the Home Assistant API. For more details about this component, please refer to the documentation at https://home-assistant.io/components/http/ """ import asyncio import json import logging import ssl from ipaddress import ip_network from pathlib import Path import os...
apache-2.0
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/pip/commands/completion.py
435
1991
from __future__ import absolute_import import sys from pip.basecommand import Command BASE_COMPLETION = """ # pip %(shell)s completion start%(script)s# pip %(shell)s completion end """ COMPLETION_SCRIPTS = { 'bash': """ _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\ CO...
mit
mikelj/h-store
third_party/python/boto/sdb/db/model.py
9
8426
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # 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,...
gpl-3.0
cgstudiomap/cgstudiomap
main/eggs/Babel-2.1.1-py2.7.egg/babel/messages/mofile.py
64
6953
# -*- coding: utf-8 -*- """ babel.messages.mofile ~~~~~~~~~~~~~~~~~~~~~ Writing of files in the ``gettext`` MO (machine object) format. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import array import struct from babel.messages.catalog import Catalog, ...
agpl-3.0
rrooij/youtube-dl
youtube_dl/extractor/pearvideo.py
39
2103
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( qualities, unified_timestamp, ) class PearVideoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?pearvideo\.com/video_(?P<id>\d+)' _TEST = { 'url': 'http://www.pearvid...
unlicense
fangxingli/hue
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/writer/worksheet.py
13
8675
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl """Write worksheets to xml representations.""" # Python stdlib imports from io import BytesIO from openpyxl.compat import safe_string, itervalues, iteritems from openpyxl import LXML # package imports from openpyxl.utils import ( coordina...
apache-2.0
switchkiller/ProjDjanko
lib/python2.7/site-packages/django/contrib/gis/gdal/prototypes/ds.py
122
4254
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_long, c_void_p from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
gpl-2.0
frmdstryr/enaml-kivy
enamlkv/kv/api.py
1
8801
#------------------------------------------------------------------------------ # Copyright (c) 2016, frmdstryr. # # Distributed under the terms of the MIT License. # # The full license is in the file LICENSE, distributed with this software. #-----------------------------------------------------------------------------...
mit
kenshay/ImageScripter
Script_Runner/PYTHON/Tools/scripts/byteyears.py
67
1650
#! /usr/bin/env python3 # Print the product of age and size of each file, in suitable units. # # Usage: byteyears [ -a | -m | -c ] file ... # # Options -[amc] select atime, mtime (default) or ctime as age. import sys, os, time from stat import * def main(): # Use lstat() to stat files if it exists, else stat() ...
gpl-3.0
debugger06/MiroX
tv/lib/frontends/shell/__init__.py
33
1444
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
gpl-2.0
supersven/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/gdal/prototypes/errcheck.py
404
4207
""" This module houses the error-checking routines used by the GDAL ctypes prototypes. """ from ctypes import c_void_p, string_at from django.contrib.gis.gdal.error import check_err, OGRException, SRSException from django.contrib.gis.gdal.libgdal import lgdal # Helper routines for retrieving pointers and/or values f...
apache-2.0
joone/chromium-crosswalk
build/symlink.py
19
1183
#!/usr/bin/env python # Copyright (c) 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. """Make a symlink and optionally touch a file (to handle dependencies).""" import errno import optparse import os.path import shu...
bsd-3-clause
gusai-francelabs/datafari
windows/python/Lib/site-packages/setuptools/command/install.py
496
4685
from distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for # now. See https://bitbucket.org/pypa/setuptools/issue/199/ _install = orig....
apache-2.0
quietcoolwu/python-playground
pipeg/mediator2d.py
4
3414
#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or 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 ...
mit
basepi/hubble
hubblestack/files/hubblestack_nova/mount.py
2
8725
# -*- encoding: utf-8 -*- ''' HubbleStack Nova plugin for verifying attributes associated with a mounted partition. Supports both blacklisting and whitelisting patterns. Blacklisted patterns must not be found in the specified file. Whitelisted patterns must be found in the specified file. This audit module requires y...
apache-2.0
cchurch/ansible
lib/ansible/modules/network/fortios/fortios_firewall_vipgrp64.py
24
8685
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, 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 Lic...
gpl-3.0
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/cmd/baremetal_deploy_helper.py
6
12674
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
gpl-2.0
gameduell/duell
bin/win/python2.7.9/Lib/lib2to3/pygram.py
320
1118
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Export the Python grammar and symbols.""" # Python imports import os # Local imports from .pgen2 import token from .pgen2 import driver from . import pytree # The grammar file _GRAMMAR_FILE = os.path.join(os.path....
bsd-2-clause
crossbario/autobahn-testsuite
autobahntestsuite/autobahntestsuite/case/case9_3_2.py
2
1262
############################################################################### ## ## Copyright (c) Crossbar.io Technologies GmbH ## ## 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...
apache-2.0
Nefry/taurus
bzt/modules/aggregator.py
1
20567
""" Aggregating results into DataPoints Copyright 2015 BlazeMeter Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable ...
apache-2.0
ravibhure/ansible
lib/ansible/modules/network/aos/aos_login.py
17
3938
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.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 opt...
gpl-3.0
dimara/ganeti
lib/qlang.py
6
10378
# # # Copyright (C) 2010, 2011, 2012 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
bsd-2-clause
pong3489/TEST_Mission
Lib/site-packages/scipy/lib/blas/tests/test_blas.py
51
7637
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" # # Created by: Pearu Peterson, April 2002 # __usage__ = """ Build linalg: python setup.py build Run tests if scipy is installed: python -c 'import scipy;scipy.lib.blas.test()' """ import math from numpy import a...
gpl-3.0
gramps-project/gramps
gramps/gen/lib/placetype.py
10
2645
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # # 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 you...
gpl-2.0
armenzg/firefox-ui-tests
firefox_puppeteer/tests/test_update_wizard.py
4
3023
# 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/. from firefox_puppeteer.ui.update_wizard import UpdateWizardDialog from firefox_ui_harness import FirefoxTestCase clas...
mpl-2.0
huguesv/azure-sdk-for-python
azure-mgmt-storage/setup.py
1
2220
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft. 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...
apache-2.0
CatoTH/OpenSlides
server/openslides/utils/main.py
7
11912
import argparse import ctypes import os import sys import tempfile import threading import time import webbrowser from typing import Dict, Optional from django.conf import ENVIRONMENT_VARIABLE from django.core.exceptions import ImproperlyConfigured from django.utils.crypto import get_random_string from mypy_extensions...
mit
USGSDenverPychron/pychron
pychron/experiment/tasks/experiment_panes.py
1
26112
# =============================================================================== # Copyright 2013 Jake Ross # # 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...
apache-2.0
beeftornado/sentry
tests/sentry/integrations/bitbucket/test_search.py
3
2866
from __future__ import absolute_import import responses from django.core.urlresolvers import reverse from sentry.models import Integration from sentry.testutils import APITestCase class BitbucketSearchEndpointTest(APITestCase): def setUp(self): self.base_url = "https://api.bitbucket.org" self.s...
bsd-3-clause
qed-/Aeron
aeron-common/src/main/cpp/3rdparty/gmock-1.7.0/scripts/generator/gmock_gen.py
1159
1091
#!/usr/bin/env python # # Copyright 2008 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 requir...
apache-2.0
ghedsouza/django
django/contrib/postgres/aggregates/statistics.py
17
1708
from django.db.models import FloatField, IntegerField from django.db.models.aggregates import Aggregate __all__ = [ 'CovarPop', 'Corr', 'RegrAvgX', 'RegrAvgY', 'RegrCount', 'RegrIntercept', 'RegrR2', 'RegrSlope', 'RegrSXX', 'RegrSXY', 'RegrSYY', 'StatAggregate', ] class StatAggregate(Aggregate): def __in...
bsd-3-clause
Som-Energia/invoice-janitor
CUPS/sips_comparator.py
1
3601
#!/usr/bin/env python # -*- coding: utf-8 -*- import csv import tqdm import click from erppeek import Client from datetime import datetime, date import configdb ATR_CASES = ['C2'] ATR_STEPS = ['01'] def create_file(c, from_date, file_output): atr_ids = c.GiscedataSwitching.search([('create_date','>=', from_dat...
agpl-3.0
akrherz/iem
htdocs/plotting/auto/scripts100/p120.py
1
5184
"""last spring temp""" import datetime from pandas.io.sql import read_sql import pandas as pd import matplotlib.dates as mdates from pyiem.plot import figure_axes from pyiem.util import get_autoplot_context, get_dbconn from pyiem.exceptions import NoDataFound def get_description(): """ Return a dict describing h...
mit
ArianeFire/HaniCam
Hanicam/OpenCV/opencv-3.1.0/modules/python/src2/gen2.py
4
35782
#!/usr/bin/env python from __future__ import print_function import hdr_parser, sys, re, os from string import Template if sys.version_info[0] >= 3: from io import StringIO else: from cStringIO import StringIO ignored_arg_types = ["RNG*"] gen_template_check_self = Template(""" if(!PyObject_TypeCheck(self,...
mit
gmarke/erpnext
erpnext/controllers/item_variant.py
10
6060
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr, flt import json class ItemVariantExistsError(frappe.ValidationError): pass class Inva...
agpl-3.0
ewdurbin/sentry
src/sentry/migrations/0183_auto__del_index_grouphash_hash.py
25
37360
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing index on 'GroupHash', fields ['hash'] try: db.dele...
bsd-3-clause
devgi/bpf
src/bpf/validate.py
1
5558
import struct from bpf.opcodes import (BPF_CLASS, BPF_LD, BPF_LDX, BPF_MODE, BPF_MEMWORDS, BPF_IMM, BPF_IND, BPF_MSH, BPF_ABS, BPF_LEN, BPF_MEM, BPF_ST, BPF_STX, BPF_ALU, BPF_OP, BPF_ADD, BPF_SUB, BPF_MUL, BPF_OR, BPF_AND, BPF_RSH, BPF_LSH, BPF...
mit
ParkJinSang/Logle
learning/svm/libsvm/svm.py
1
9604
#!/usr/bin/env python from ctypes import * from ctypes.util import find_library from os import path import sys __all__ = ['libsvm', 'svm_problem', 'svm_parameter', 'toPyModel', 'gen_svm_nodearray', 'print_null', 'svm_node', 'C_SVC', 'EPSILON_SVR', 'LINEAR', 'NU_SVC', 'NU_SVR', 'ONE_CLASS', ...
mit
odarbelaeze/lsa-program
condor/scripts/cli.py
2
1083
import click import sys class CondorCommand(click.MultiCommand): @property def commands(self): from condor.scripts.bibliography import bibliography from condor.scripts.model import model from condor.scripts.query import query from condor.scripts.matrix import matrix fr...
mit
wldcordeiro/servo
tests/wpt/web-platform-tests/webdriver/navigation.py
16
3726
import contextlib import httplib import json import pytest import types import urllib import webdriver def inline(doc): return "data:text/html;charset=utf-8,%s" % urllib.quote(doc) alert_doc = inline("<script>window.alert()</script>") frame_doc = inline("<p>frame") one_frame_doc = inline("<iframe src='%s'></if...
mpl-2.0
tejasnikumbh/ThesisCode
parallel/stage3/parallel_stage_3_greedy.py
4
7927
# For parallelization import math import sys import pp # For generation from random import randrange def has_essential(row): if(sum(row) == 1): return True else: return False def get_essentials(mat): essential_I = set([]) for row in mat: if(has_essential(row)): e...
mit
open-synergy/account-financial-reporting
account_financial_report_webkit_xls/report/open_invoices_xls.py
3
38358
# -*- coding: utf-8 -*- # Copyright 2009-2016 Noviat # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import xlwt from datetime import datetime from openerp.addons.report_xls.report_xls import report_xls from openerp.addons.report_xls.utils import rowcol_to_cell from openerp.addons.account_financial_repo...
agpl-3.0
bright-sparks/chromium-spacewalk
tools/android/mempressure.py
42
3734
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import logging import optparse import os import sys BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), ...
bsd-3-clause