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
rocopartners/django-oscar
src/oscar/__init__.py
32
2952
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 2, 0, 'dev') def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) # Append 3rd digit if > 0 if VERSION[2]: versi...
bsd-3-clause
noroutine/ansible
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_list.py
34
4003
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1...
gpl-3.0
nathanbjenx/cairis
cairis/gui/TemplateRequirementPanel.py
1
2080
# 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...
apache-2.0
emonty/deb-vhd-util
tools/xm-test/lib/XmTestLib/XenDomain.py
21
11296
#!/usr/bin/python """ Copyright (C) International Business Machines Corp., 2005 Author: Dan Smith <danms@us.ibm.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; under version 2 of the Licens...
gpl-2.0
burgerdev/volumina
volumina/skeletons/skeletonNode.py
3
3152
############################################################################### # volumina: volume slicing and editing library # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # modify it und...
lgpl-3.0
AndrewSmart/audacity
lib-src/lv2/lv2/plugins/eg01-amp.lv2/waflib/Tools/ccroot.py
70
12917
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re from waflib import Task,Utils,Node,Errors from waflib.TaskGen import after_method,before_method,feature,taskgen_method,extension from waflib.Tools import c_aliase...
gpl-2.0
SMALLplayer/smallplayer-image-creator
storage/.xbmc/addons/script.module.urlresolver/lib/urlresolver/plugins/zalaa.py
2
3651
""" urlresolver XBMC Addon Copyright (C) 2012 Bstrdsmkr This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version....
gpl-2.0
rwakulszowa/servo
tests/wpt/css-tests/tools/html5lib/html5lib/serializer/htmlserializer.py
423
12897
from __future__ import absolute_import, division, unicode_literals from six import text_type import gettext _ = gettext.gettext try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import rcdataElements, entities,...
mpl-2.0
vzantedeschi/L3SVMs
validation.py
1
1853
import time import statistics from src.l3svms import * from src.utils import * args = get_args(__file__) TRAIN = args.train_file TEST = args.test_file LAND = args.nb_landmarks # default 10 CLUS = args.nb_clusters # default 1 NORM = args.norm # default False LIN = args.linear # default True PCA_BOOL = args.pca # defa...
mit
googleapis/python-kms
samples/snippets/create_key_ring.py
1
1511
# Copyright 2020 Google LLC # # 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, s...
apache-2.0
rwl/PyCIM
CIM14/ENTSOE/Dynamics/IEC61970/Dynamics/DynamicsMetaBlockParameter.py
1
3262
# Copyright (C) 2010-2011 Richard Lincoln # # 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
JakeBrand/CMPUT410-E6
v1/lib/python2.7/site-packages/django/utils/tzinfo.py
97
3923
"Implementation of tzinfo classes for use with datetime.datetime." from __future__ import unicode_literals from datetime import timedelta, tzinfo import time import warnings from django.utils.deprecation import RemovedInDjango19Warning from django.utils.encoding import force_str, force_text, DEFAULT_LOCALE_ENCODING ...
apache-2.0
pratikgujjar/DeepIntent
code/autoencoder_model/scripts/attention_autoencoder.py
1
20029
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hickle as hkl import numpy as np np.random.seed(2 ** 10) from keras import backend as K K.set_image_dim_ordering('tf') from keras.layers import Dropout from keras.models import Sequential from keras.lay...
mit
edunham/servo
tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/mux.py
636
71218
# Copyright 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mpl-2.0
rosudrag/eve-wspace
evewspace/core/views.py
15
1502
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
gpl-3.0
shakamunyi/nova
nova/api/openstack/compute/plugins/v3/extended_server_attributes.py
23
2652
# Copyright 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 a...
apache-2.0
digitalmacgyver/vedit
vedit/__init__.py
1
1074
__all__ = [ # Paths to binaries we depend on. 'FFMPEG', 'FFPROBE', # Various "constants" used in configuration. 'OVERLAY', 'CROP', 'PAD', 'PAN', 'DISPLAY_STYLES,' 'DOWN', 'LEFT', 'RIGHT', 'UP', 'OVERLAY_DIRECTIONS', 'ALTERNATE', 'PAN_DIRECTIONS', ...
mit
gVallverdu/myScripts
CRYSTAL/crystalio.py
1
14817
#!/usr/bin/env python3 # -*- coding=utf-8 -*- """ crystailio ---------- Read a CRYSTAL output file and export all structures, SCF energies and convergence data. """ __author__ = "Germain Vallverdu" __email__ = "germain.vallverdu@univ-pau.fr" __licence__ = "GPL" import re import numpy as np from pymatgen import Stru...
gpl-2.0
homme/ansible
lib/ansible/cli/__init__.py
10
22872
# (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
ogenstad/ansible
lib/ansible/plugins/action/ironware_config.py
29
4215
# # (c) 2017, Red Hat, Inc. # # 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...
gpl-3.0
SerenityS/Solid_Kernel-Stock-KK
tools/perf/scripts/python/netdev-times.py
11271
15048
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
gibiansky/tensorflow
tensorflow/contrib/training/python/training/sampling_ops_test.py
6
14802
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
nichit93/Implementation-of-TRED-in-ns-3
examples/tutorial/first.py
102
2128
# /* # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the ...
gpl-2.0
CloudServer/nova
nova/tests/functional/v3/test_instance_usage_audit_log.py
33
2244
# 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
hmen89/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
3manuek/deeppy
deeppy/dataset/dataset.py
17
2241
import os import shutil import logging from .util import checksum, download, archive_extract, is_archive, touch log = logging.getLogger(__name__) class Dataset(object): name = None data_dir = None _download_checkpoint = '__download_complete' _unpack_checkpoint = '__unpack_complete' _install_che...
mit
fredturnerr/SereteliNew
node_modules/grunt-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/generator/eclipse.py
437
11894
# 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. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML files that can be importe...
mit
golumn/xhtml2pdf
xhtml2pdf/tags.py
10
20069
# -*- coding: utf-8 -*- from reportlab.graphics.barcode import createBarcodeDrawing from reportlab.lib.pagesizes import A4 from reportlab.lib.units import inch, mm from reportlab.platypus.doctemplate import NextPageTemplate, FrameBreak from reportlab.platypus.flowables import Spacer, HRFlowable, PageBreak, Flowable fro...
apache-2.0
Grirrane/odoo
addons/stock/wizard/orderpoint_procurement.py
8
2776
# -*- 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
hanicker/odoo
addons/hr_expense/report/__init__.py
380
1071
# -*- 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
ivanlmj/Android-DNSSL
Flask/lib/python2.7/site-packages/pip/vcs/git.py
473
7898
import tempfile import re import os.path from pip.util import call_subprocess from pip.util import display_path, rmtree from pip.vcs import vcs, VersionControl from pip.log import logger from pip.backwardcompat import url2pathname, urlparse urlsplit = urlparse.urlsplit urlunsplit = urlparse.urlunsplit class Git(Versi...
gpl-2.0
emacsway/django-oembed
oembed/models.py
1
1251
import datetime from django.db import models from django.utils import simplejson from django.utils.translation import ugettext_lazy as _ JSON = 1 XML = 2 FORMAT_CHOICES = ( (JSON, "JSON"), (XML, "XML"), ) class ProviderRule(models.Model): name = models.CharField(_("name"), max_length=128, null=True, blank...
bsd-3-clause
lupien/pyHegel
pyHegel/instruments/agilent_smu.py
1
68624
# -*- coding: utf-8 -*- ########################## Copyrights and license ############################ # # # Copyright 2019-2019 Christian Lupien <christian.lupien@usherbrooke.ca> # # ...
lgpl-3.0
brion/cerbero
cerbero/tools/osxuniversalgenerator.py
16
9325
#!/usr/bin/env python # cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Thiago Santos <thiago.sousa.santos@collabora.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Fr...
lgpl-2.1
rmhyman/DataScience
Lesson3/exploratory_data_analysis_subway_data.py
1
1558
import numpy as np import pandas import matplotlib.pyplot as plt def entries_histogram(turnstile_weather): ''' Before we perform any analysis, it might be useful to take a look at the data we're hoping to analyze. More specifically, let's examine the hourly entries in our NYC subway data and d...
mit
wglass/zoonado
examples/locking.py
1
1246
import logging import random from tornado import gen log = logging.getLogger() def arguments(parser): parser.add_argument( "--workers", "-w", type=int, default=3, help="Number of workers to launch." ) parser.add_argument( "--lock-path", "-p", type=str, default="examplelock", ...
apache-2.0
wxdublin/CuckooSploit
modules/reporting/mmdef.py
6
12571
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file "docs/LICENSE" for copying permission. import os import hashlib import lib.maec.maec11 as maec from lib.cuckoo.common.abstracts import Report from lib.cuckoo.common.exceptions import Cuckoo...
gpl-3.0
TribeMedia/synapse
tests/util/test_lrucache.py
2
7584
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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
jcoady9/python-for-android
python3-alpha/extra_modules/gdata/youtube/__init__.py
297
25623
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
varunarya10/boto
boto/opsworks/exceptions.py
185
1288
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
AndyLavr/Aspire-SW5-012_Kernel_4.8
tools/perf/scripts/python/netdev-times.py
268
15299
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
nazo/ansible
lib/ansible/modules/network/lenovo/cnos_showrun.py
19
4981
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
gpl-3.0
josiahseaman/DNAResearch
Repeat_Graph.py
1
8201
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> %matplotlib inline from pylab import * import matplotlib.pyplot as plt from IPython.core.display import Image # <codecell> data = [] for y in range(10): data.append([y+x for x in range(10)]) # print(data) Image(data=data) # <headingcell level=1> ...
apache-2.0
jakubbrindza/gtg
GTG/plugins/export/templates.py
1
6180
# -*- coding: utf-8 -*- # Copyright (c) 2010 - Luca Invernizzi <invernizzi.l@gmail.com> # 2012 - Izidor Matušov <izidor.matusov@gmail.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 # Fou...
gpl-3.0
hrashk/sympy
release/fabfile.py
1
29364
# -*- coding: utf-8 -*- """ Fab file for releasing Please read the README in this directory. Guide for this file =================== Vagrant is a tool that gives us a reproducible VM, and fabric is a tool that we use to run commands on that VM. Each function in this file should be run as fab vagrant func Even tho...
bsd-3-clause
CharlesGulian/Deconv
fits_tools_tesla.py
1
5575
# -*- coding: utf-8 -*- """ Created on Thu Jul 14 21:18:54 2016 @author: charlesgulian """ import os #os.chdir('/Users/annepstein/Work/Deconv') curr_dir = os.getcwd() import numpy as np from astropy.io import fits import matplotlib.pyplot as plt import matplotlib #from photutils import aperture_photometry #from phot...
gpl-3.0
r39132/airflow
airflow/contrib/operators/mlengine_operator.py
1
23245
# # 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 us...
apache-2.0
PanDAWMS/autopyfactory
autopyfactory/plugins/queue/sched/StatusTest.py
1
1879
#! /usr/bin/env python # from autopyfactory.interfaces import SchedInterface import logging class StatusTest(SchedInterface): id = 'statustest' def __init__(self, apfqueue, config, section): try: self.apfqueue = apfqueue self.log = logging.getLogger('auto...
apache-2.0
thresholdsoftware/asylum-v2.0
openerp/addons/hr_attendance/report/__init__.py
68
1115
# -*- 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
BD823/pcover
project_version1/booklist.py
1
3959
# -*- coding: ms949 -*- import re import json #text file read with open('GutindexAll.txt','r') as gutinfile: data=gutinfile.read() data=unicode(data, errors='replace') result = [] isStart = False for line in data.splitlines(): #if 'by': #line¿¡ ÀúÀÚ°¡ ÀÖ´Â °æ¿ì¿Í ŸÀÌÆ²¸¸ Àִ°æ¿ì¸¦ ±¸ºÐÇØ¾ßÇÒµí if i...
mit
catapult-project/catapult
third_party/google-auth/google/auth/transport/_http_client.py
12
3750
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
bsd-3-clause
RockySteveJobs/python-for-android
python3-alpha/extra_modules/gdata/alt/app_engine.py
127
3376
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
ujjvala-addsol/addsol_hr
openerp/addons/account/wizard/account_statement_from_invoice.py
106
3626
# -*- 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
lbartoletti/QGIS
tests/src/python/test_qgscoordinateformatter.py
36
32619
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsCoordinateFormatter. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version...
gpl-2.0
vrv/tensorflow
tensorflow/python/training/adam_test.py
51
12346
# 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
cherba/apitools
apitools/base/py/transfer.py
3
41282
#!/usr/bin/env python # # Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
riteshshrv/django
django/core/exceptions.py
486
5276
""" Global Django exception and warning classes. """ from django.utils import six from django.utils.encoding import force_text class FieldDoesNotExist(Exception): """The requested model field does not exist""" pass class DjangoRuntimeWarning(RuntimeWarning): pass class AppRegistryNotReady(Exception): ...
bsd-3-clause
TheTypoMaster/chromium-crosswalk
tools/perf/metrics/network.py
20
2307
# 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. from telemetry.value import scalar from metrics import Metric NETWORK_DATA_NOT_FOUND = 'Network data could not be found.' # This is experimental. crbug....
bsd-3-clause
zycdragonball/tensorflow
tensorflow/python/util/all_util.py
128
4709
# 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
gdl-civestav-localization/cinvestav_location_fingerprinting
experimentation/__init__.py
1
1691
import os import cPickle import matplotlib.pyplot as plt from datasets import DatasetManager def plot_cost(results, data_name, plot_label): plt.figure(plot_label) plt.ylabel('Accuracy (m)', fontsize=30) plt.xlabel('Epoch', fontsize=30) plt.yscale('symlog') plt.tick_params(axis='both', which='major...
gpl-3.0
danielmartin/swift
utils/protocol_graph.py
48
6786
# ===--- protocol_graph.py ---------------------------*- coding: utf-8 -*-===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.t...
apache-2.0
fduraffourg/servo
tests/wpt/css-tests/tools/pywebsocket/src/test/test_util.py
449
7538
#!/usr/bin/env python # # Copyright 2011, 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...
mpl-2.0
danxhuber/isoclassify
setup.py
1
1463
import os from setuptools import setup # Load version __version__ = None # exec(open('isoclassify/version.py').read()) # Load requirements requirements = None with open('requirements.txt') as file: requirements = file.read().splitlines() # mwdust requires manual install to download maps # TODO: add warning if `m...
mit
lebauce/artub
sysfont.py
1
10522
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
gpl-2.0
asquared/openreplay
console/openreplay_console.py
1
18254
import wx import os, sys import signal import traceback all_processes = { } MAX_CAPTURES = 8 def sigchld_handler(signum, frame): (pid, status) = os.wait( ) if all_processes.has_key(pid): all_processes[pid].on_dead(status) else: print "unknown child died?" def sigint_handler(signum, frame...
gpl-3.0
Bashar/django
django/db/models/__init__.py
82
2439
from functools import wraps import sys import warnings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured # NOQA from django.db.models.query import Q, QuerySet, Prefetch # NOQA from django.db.models.expressions import F # NOQA from django.db.models.manager import Manager # NOQA from django...
bsd-3-clause
stephenmcd/ratemyflight
ratemyflight/scripts/create_project.py
1
1581
#!/usr/bin/env python import os import shutil import sys import ratemyflight class ProjectException(Exception): pass def create_project(): """ Copies the contents of the project_template directory to a new directory specified as an argument to the command line. """ # Ensure a directory na...
bsd-2-clause
telwertowski/Books-Mac-OS-X
Versions/Books_3.0b5/BibTeX Importer.app/Contents/Resources/bibtex2xml.py
6
18190
#!/usr/bin/python # Time-stamp: "2006-01-06 12:37:03 vidar" """ Decoder for bibliographic data, BibTeX Usage: python bibtex2xml.py bibfile.bib > bibfile.xml (c) Vidar Bronken Gundersen, Sara Sprenkle http://bibtexml.sourceforge.net/ Reuse approved as long as this notification is kept. License: http://creat...
mit
jdinuncio/ansible-modules-extras
system/firewalld.py
23
37432
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Adam Miller (maxamillion@fedoraproject.org) # # 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 ...
gpl-3.0
pczerkas/tempest
tempest/api/identity/admin/v3/test_regions.py
8
4188
# Copyright 2014 Hewlett-Packard Development Company, L.P # 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....
apache-2.0
sftd/scons
scons-local/SCons/Tool/msvc.py
8
11451
"""engine.SCons.Tool.msvc Tool-specific initialization for Microsoft Visual C/C++. 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, 2010...
mit
jdgwartney/meter-plugin-sdk-python
setup.py
1
1283
# # Copyright 2016 BMC Software, 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 w...
apache-2.0
Juniper/tempest
tempest/cmd/workspace.py
2
8568
# Copyright 2016 Rackspace # # 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, s...
apache-2.0
OpenCobolIDE/OpenCobolIDE
open_cobol_ide/extlibs/future/standard_library/__init__.py
34
27587
""" Python 3 reorganized the standard library (PEP 3108). This module exposes several standard library modules to Python 2 under their new Python 3 names. It is designed to be used as follows:: from future import standard_library standard_library.install_aliases() And then these normal Py3 imports work on bo...
gpl-3.0
pizzathief/numpy
numpy/lib/type_check.py
3
19811
"""Automatically adapted for numpy Sep 19, 2005 by convertcode.py """ from __future__ import division, absolute_import, print_function import functools import warnings __all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex', 'isreal', 'nan_to_num', 'real', 'real_if_close', 'typename', 'asfar...
bsd-3-clause
tquilian/exelearningTest
exe/engine/verdaderofalsofpdidevice.py
11
18058
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
Odingod/mne-python
mne/time_frequency/tests/test_tfr.py
5
8846
import numpy as np import os.path as op from numpy.testing import assert_array_almost_equal, assert_array_equal from nose.tools import assert_true, assert_false, assert_equal, assert_raises import mne from mne import io, Epochs, read_events, pick_types, create_info, EpochsArray from mne.utils import _TempDir, run_test...
bsd-3-clause
Perferom/android_external_chromium_org
third_party/protobuf/python/google/protobuf/text_format.py
162
22004
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
hasadna/open-shot
qa/tasks.py
1
3325
import httplib from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.mail import EmailMultiAlternatives from django.contrib.sites.models import Site from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.templ...
bsd-3-clause
qwcode/pip
pip/_vendor/distlib/resources.py
5
10337
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import bisect import io import logging import os import pkgutil import shutil import sys import types...
mit
ovnicraft/odoo
addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
337
3434
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
inuitwallet/plunge_android
client/jsonrpc/serviceHandler.py
61
3239
""" Copyright (c) 2007 Jan-Klaas Kollhof This file is part of jsonrpc. jsonrpc is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later...
mit
Newsrecommender/newsrecommender
ArticleRecommendationProject/Recommendation/Collab_Content_Based.py
1
5856
import yaml import pandas as pd import numpy as np import sys import os from math import sqrt import matplotlib import matplotlib.pyplot as plot import networkx as nx def get_script_directory(): """ This function returns the directory of the script in scrip mode In interactive mode returns interpreter name...
mit
frederick-masterton/django
django/core/management/commands/testserver.py
17
2017
from django.core.management.base import BaseCommand from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noinput', action='store_false', dest='interactive', default=True, help='Tells Django to NOT prompt the user for input of an...
bsd-3-clause
phammin1/QaManagement
QaManagement/env/Lib/site-packages/django/shortcuts.py
135
7957
""" This module collects helper functions and classes that "span" multiple levels of MVC. In other words, these functions/classes introduce controlled coupling for convenience's sake. """ import warnings from django.core import urlresolvers from django.db.models.base import ModelBase from django.db.models.manager imp...
mit
camptocamp/odoo
addons/l10n_bo/__init__.py
2120
1456
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
agpl-3.0
MER-GROUP/intellij-community
python/lib/Lib/site-packages/django/contrib/sessions/middleware.py
323
1888
import time from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date from django.utils.importlib import import_module class SessionMiddleware(object): def process_request(self, request): engine = import_module(settings.SESSION_ENGINE) ...
apache-2.0
akretion/connector
connector/queue/model.py
1
16341
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 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 # pu...
agpl-3.0
huangkuan/hack
lib/oauth2client/contrib/gce.py
25
7200
# 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 ...
apache-2.0
cl0ne/vital-records-registry
registry/registry/settings.py
1
3274
""" Django settings for registry project. Generated by 'django-admin startproject' using Django 1.9.4. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
gpl-3.0
pratikmallya/hue
desktop/core/ext-py/boto-2.38.0/boto/glacier/writer.py
153
9668
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # Copyright (c) 2012 Robie Basak <robie@justgohome.co.uk> # Tree hash implementation from Aaron Brady bradya@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated...
apache-2.0
nvoron23/socialite
jython/Lib/ConfigParser.py
105
23116
"""Configuration file parser. A setup file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. The option values can contain format strings which refer to other values in the same section, or values in a special [DEFAULT] sect...
apache-2.0
coxmediagroup/googleads-python-lib
examples/dfp/v201411/proposal_line_item_service/update_proposal_line_items.py
4
2576
#!/usr/bin/python # # 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 b...
apache-2.0
SteveXiSong/UW-Madison-ECE757-S15-MulticastSnooping
src/mem/slicc/ast/TypeFieldStateAST.py
48
2745
# Copyright (c) 2011 Advanced Micro Devices, 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...
bsd-3-clause
ArcherCraftStore/ArcherVMPeridot
Python/Lib/distutils/tests/test_dir_util.py
16
4273
"""Tests for distutils.dir_util.""" import unittest import os import stat import shutil import sys from distutils.dir_util import (mkpath, remove_tree, create_tree, copy_tree, ensure_relative) from distutils import log from distutils.tests import support from test.support import run_un...
apache-2.0
tqtran7/horizon
openstack_dashboard/dashboards/identity/groups/forms.py
62
2820
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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
yuecong/dd-agent
checks.d/lighttpd.py
35
6352
# stdlib import re import urlparse # 3rd party import requests # project from checks import AgentCheck from util import headers VERSION_REGEX = re.compile(r".*/(\d)") class Lighttpd(AgentCheck): """Tracks basic connection/requests/workers metrics See http://redmine.lighttpd.net/projects/1/wiki/Docs_ModSta...
bsd-3-clause
aferr/TemporalPartitioningMemCtl
src/python/m5/main.py
16
12839
# Copyright (c) 2005 The Regents of The University of Michigan # 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
WriterOfAlicrow/servo
tests/wpt/web-platform-tests/tools/webdriver/webdriver/searchcontext.py
251
2153
"""WebDriver element location functionality.""" class SearchContext(object): """Abstract class that provides the core element location functionality.""" def find_element_by_css(self, selector): """Find the first element matching a css selector.""" return self._find_element('css selector', sele...
mpl-2.0
cuongnv23/ansible
lib/ansible/modules/network/cloudengine/ce_vxlan_global.py
27
19113
#!/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