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 |
|---|---|---|---|---|---|
salaria/odoo | addons/calendar/calendar.py | 81 | 86439 | # -*- coding: utf-8 -*-
import pytz
import re
import time
import openerp
import openerp.service.report
import uuid
import collections
import babel.dates
from werkzeug.exceptions import BadRequest
from datetime import datetime, timedelta
from dateutil import parser
from dateutil import rrule
from dateutil.relativedelta... | agpl-3.0 |
mancoast/CPythonPyc_test | fail/320_test_profile.py | 91 | 7006 | """Test suite for the profile module."""
import sys
import pstats
import unittest
from difflib import unified_diff
from io import StringIO
from test.support import run_unittest
import profile
from test.profilee import testfunc, timer
class ProfileTest(unittest.TestCase):
profilerclass = profile.Profile
met... | gpl-3.0 |
tosolveit/scikit-learn | sklearn/ensemble/tests/test_partial_dependence.py | 365 | 6996 | """
Testing for the partial dependence module.
"""
import numpy as np
from numpy.testing import assert_array_equal
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import if_matplotlib
from sklearn.ensemble.partial_dependence import partial_dependence
from sklearn.ensemble.partial_dependence... | bsd-3-clause |
felixma/nova | nova/tests/functional/api_sample_tests/test_security_group_default_rules.py | 26 | 2374 | # Copyright 2014 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 by applicable law or agreed t... | apache-2.0 |
caseyclements/bokeh | bokeh/compat/mplexporter/exporter.py | 32 | 12403 | """
Matplotlib Exporter
===================
This submodule contains tools for crawling a matplotlib figure and exporting
relevant pieces to a renderer.
"""
import warnings
import io
from . import utils
import matplotlib
from matplotlib import transforms
from matplotlib.backends.backend_agg import FigureCanvasAgg
clas... | bsd-3-clause |
nmercier/linux-cross-gcc | win32/bin/Lib/robotparser.py | 2 | 7821 | """ robotparser.py
Copyright (C) 2000 Bastian Kleineidam
You can choose between two licenses when using this package:
1) GNU GPLv2
2) PSF license for Python 2.2
The robots.txt Exclusion Protocol is implemented as specified in
http://www.robotstxt.org/norobots-rfc.txt
"""
import ... | bsd-3-clause |
zaheerm/gst-python | testsuite/common.py | 1 | 5702 | # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# gst-python - Python bindings for GStreamer
# Copyright (C) 2002 David I. Lehn
# Copyright (C) 2004 Johan Dahlin
# Copyright (C) 2005 Edward Hervey
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General... | lgpl-2.1 |
tvald/Jink | python/jink/extension.py | 1 | 1038 | import types
class LazyFactory(object):
def __init__(self, module_str, callable_str):
self.module_str = module_str
self.callable_str = callable_str
self.factory = None
def resolve(self):
if self.factory == None:
self.factory = reduce(lambda x, y: getattr(x, y),
... | mit |
ARMmbed/yotta_osx_installer | workspace/lib/python2.7/site-packages/pip/_vendor/ipaddress.py | 198 | 79659 | # Copyright 2007 Google Inc.
# Licensed to PSF under a Contributor Agreement.
"""A fast, lightweight IPv4/IPv6 manipulation library in Python.
This library is used to create/poke/manipulate IPv4 and IPv6 addresses
and networks.
"""
from __future__ import unicode_literals
import itertools
import struct
__version... | apache-2.0 |
jancsarc/KIM-Online | src/accounts/views.py | 1 | 2138 | from __future__ import unicode_literals
from django.core.urlresolvers import reverse_lazy
from django.views import generic
from django.shortcuts import redirect
from django.contrib.auth import get_user_model
from django.contrib import auth
from django.contrib import messages
from authtools import views as authviews
fro... | mit |
ibinti/intellij-community | python/lib/Lib/site-packages/django/utils/itercompat.py | 294 | 1169 | """
Providing iterator functions that are not in all version of Python we support.
Where possible, we try to use the system-native version and only fall back to
these implementations if necessary.
"""
import itertools
# Fallback for Python 2.4, Python 2.5
def product(*args, **kwds):
"""
Taken from http://docs... | apache-2.0 |
fritsvanveen/QGIS | python/ext-libs/pygments/formatters/html.py | 21 | 31759 | # -*- coding: utf-8 -*-
"""
pygments.formatters.html
~~~~~~~~~~~~~~~~~~~~~~~~
Formatter for HTML output.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import print_function
import os
import sys
import os.path
from ... | gpl-2.0 |
sohail-aspose/Aspose_Slides_Cloud | SDKs/Aspose.Slides_Cloud_SDK_for_Python/asposeslidescloud/models/Image.py | 4 | 1028 | #!/usr/bin/env python
class Image(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually."""
def __init__(self):
"""
Attributes:
swaggerTypes (dict): The key is attribute name and the value is attribute type.
... | mit |
seanwisdom/program-with-objects_2 | new_section_python_code.py | 4 | 1119 |
def new_section(concept_title, concept_description):
html_a = '''
<div class="concept">
<div class="concept-title">
<h3>''' + concept_title + '</h3>'
html_b= '''
</div>
<div class="concept-description">
<p>
'''... | mit |
mluo613/osf.io | scripts/prereg/approve_draft_registrations.py | 28 | 1260 | """ A script for testing DraftRegistrationApprovals. Automatically approves all pending
DraftRegistrationApprovals.
"""
import sys
import logging
from framework.celery_tasks.handlers import celery_teardown_request
from website.app import init_app
from website.project.model import DraftRegistration, Sanction
logger =... | apache-2.0 |
RussellRiesJr/CoupleComeStatWithMe | ccswm/settings.py | 1 | 3350 | """
Django settings for ccswm project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
# ... | mit |
tillrohrmann/flink | flink-python/pyflink/ml/api/ml_environment.py | 9 | 3953 | ################################################################################
# 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... | apache-2.0 |
JCROM-Android/jcrom_external_chromium_org | chrome/test/functional/ispy/ispy_core/tests/rendering_test_manager/mock_cloud_bucket.py | 23 | 1390 | # 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.
"""Subclass of CloudBucket used for testing."""
from tests.rendering_test_manager import cloud_bucket
class MockCloudBucket(cloud_bucket.CloudBucket):
"... | bsd-3-clause |
prismskylabs/pycounters | src/pycounters/__init__.py | 1 | 3969 | """
PyCounters is a light weight library to monitor performance in production system.
It is meant to be used in scenarios where using a profile is unrealistic due to the overhead it requires.
Use PyCounters to get high level and concise overview of what's going on in your production code.
See #### (read the docs) for... | apache-2.0 |
bitifirefly/edx-platform | common/djangoapps/microsite_configuration/templatetags/microsite.py | 107 | 2058 | """
Template tags and helper functions for displaying breadcrumbs in page titles
based on the current micro site.
"""
from django import template
from django.conf import settings
from microsite_configuration import microsite
from django.templatetags.static import static
register = template.Library()
def page_title_b... | agpl-3.0 |
moxon6/chemlab | tests/test_core.py | 4 | 12153 | """Test core types like Molecule and Atom."""
from chemlab.core import Molecule, Atom
from chemlab.core import System, subsystem_from_molecules, subsystem_from_atoms
from chemlab.core import merge_systems
from chemlab.core import crystal, random_lattice_box
import numpy as np
from nose.tools import eq_, assert_equals
f... | gpl-3.0 |
shtouff/django | django/db/utils.py | 12 | 10612 | import inspect
import os
import pkgutil
import warnings
from importlib import import_module
from threading import local
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from django.utils._os import upath
from django.utils.deprecation import RemovedIn... | bsd-3-clause |
Vixionar/django | tests/gis_tests/test_spatialrefsys.py | 319 | 4891 | import unittest
from django.contrib.gis.gdal import HAS_GDAL
from django.db import connection
from django.test import skipUnlessDBFeature
from django.utils import six
from .utils import SpatialRefSys, oracle, postgis, spatialite
test_srs = ({
'srid': 4326,
'auth_name': ('EPSG', True),
'auth_srid': 4326,
... | bsd-3-clause |
selahssea/ggrc-core | src/ggrc_basic_permissions/migrations/versions/20130627032526_3bf5430a8c6f_add_roles_and_permis.py | 7 | 1751 | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Add roles and permissions tables
Revision ID: 3bf5430a8c6f
Revises: None
Create Date: 2013-06-27 03:25:26.571232
"""
# revision identifiers, used by Alembic.
revision = '3bf5430a8c6f'
down_revision = N... | apache-2.0 |
shubhdev/edxOnBaadal | lms/djangoapps/commerce/tests/__init__.py | 55 | 3551 | # -*- coding: utf-8 -*-
""" Commerce app tests package. """
import datetime
import json
from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings
from freezegun import freeze_time
import httpretty
import jwt
import mock
from ecommerce_api_client import auth
from... | agpl-3.0 |
delinhabit/django | tests/template_tests/filter_tests/test_urlizetrunc.py | 201 | 3348 | from django.template.defaultfilters import urlizetrunc
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class UrlizetruncTests(SimpleTestCase):
@setup({'urlizetrunc01':
'{% autoescape off %}{{ a|urlizetrunc:"8" }} {{ b|urlizetrunc:"8" }}{% en... | bsd-3-clause |
saeedghsh/SSRR13 | Andreas/slam6d/3rdparty/lastools/ArcGIS_toolbox/scripts/lasheight_classify.py | 2 | 7125 | #
# lasheight_classify.py
#
# (c) 2012, Martin Isenburg
# LASSO - rapid tools to catch reality
#
# uses lasheight to compute the height of LiDAR points above the ground
# and uses the height information to classify the points.
#
# The LiDAR input can be in LAS/LAZ/BIN/TXT/SHP/... format.
# The LiDAR output ca... | bsd-3-clause |
pinireznik/antitude | agents/skynet/scripts/restart-proc.py | 5 | 1943 | #!/usr/bin/python -u
import socket
import time
import os
import sys
from subprocess import call
import random
FILENAME_BREAK = "/tmp/break.tmp"
FILENAME_OVERLOAD = "/tmp/load.tmp"
IP_ADDRESS = socket.gethostbyname(socket.gethostname())
MEMORY_LIMIT = "50"
FIXED_STRING = "event FIXED " +... | apache-2.0 |
mesonbuild/meson | mesonbuild/ast/visitor.py | 2 | 4785 | # Copyright 2019 The Meson development team
# 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 |
robwarm/gpaw-symm | gpaw/analyse/multipole.py | 1 | 2669 | import numpy as np
from ase.units import Bohr
from ase.parallel import paropen
from ase.utils import prnt
from gpaw.spherical_harmonics import Y
from gpaw.utilities.tools import coordinates
class Multipole:
"""Expand a function on the grid in multipole moments
relative to a given center.
center: Vector... | gpl-3.0 |
coxmediagroup/googleads-python-lib | examples/dfp/v201408/report_service/run_inventory_report.py | 4 | 2915 | #!/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 |
guard163/xen-api | ocaml/idl/binding_sanity_checks/graphxapi.py | 34 | 6851 | #!/usr/bin/env python
# NOT FINISHED (Needs tidying, can only follow OpaqueRefs, whereas some references are by uuid)
# This is supposed to be a general xapi database graphing tool.
# I've got a bit distracted, so I'm checking it in so it doesn't get lost.
# sample command line
# ./graphxapi.py | dot -Tpng >doom.png ;... | lgpl-2.1 |
Multimac/ansible-modules-extras | notification/jabber.py | 60 | 4555 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Brian Coca <bcoca@ansible.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 Licen... | gpl-3.0 |
harlowja/networkx | examples/drawing/knuth_miles.py | 50 | 2994 | #!/usr/bin/env python
"""
An example using networkx.Graph().
miles_graph() returns an undirected graph over the 128 US cities from
the datafile miles_dat.txt. The cities each have location and population
data. The edges are labeled with the distance betwen the two cities.
This example is described in Section 1.1 in ... | bsd-3-clause |
MacCearain/HomeDetect | radio.py | 1 | 18735 | '''
radio module
'''
# pylint: disable=line-too-long
# pylint: disable=too-many-instance-attributes
# pylint: disable=too-many-arguments
# pylint: disable=trailing-whitespace
import time
import serial
import sensor
ONEBIT = 0b1
#-------------------------------------------------------------------
# Let's Setup ... | mit |
ppiotr/Invenio | modules/bibformat/lib/elements/bfe_reprints.py | 39 | 1199 | ## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 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 option... | gpl-2.0 |
Johnzero/OE7 | openerp/addons-fg/openerp-magento-master/magento_connect/__init__.py | 1 | 1237 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Raimon Esteve <resteve@zikzakmedia.com>
# $Id$
#
# ... | agpl-3.0 |
jmighion/ansible | lib/ansible/modules/network/eos/eos_system.py | 22 | 11371 | #!/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 |
holmes/intellij-community | python/lib/Lib/os.py | 74 | 24851 | r"""OS routines for Mac, NT, or Posix depending on what system we're on.
This exports:
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
- os.path is one of the modules posixpath, or ntpath
- os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos'
- os.curdir is a string representing the current di... | apache-2.0 |
salamer/django | tests/forms_tests/tests/test_widgets.py | 115 | 105521 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import copy
import datetime
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.urlresolvers import reverse
from django.forms import (
BooleanField, Char... | bsd-3-clause |
awkspace/ansible | test/units/executor/test_play_iterator.py | 45 | 18430 | # (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 |
ioangogo/Suntimes | suntimes.py | 1 | 1345 | #! /bin/python
# -*- coding: UTF-8 -*-
import urllib2, json, datetime, time
import dateutil.parser
global latitude
global longitude
api=json.loads(urllib2.urlopen("http://freegeoip.net/json/").read().decode("UTF-8"))
latitude=str(api['latitude'])
longitude=str(api["longitude"])
def getsunrise(lat="", lng="", formatt... | bsd-3-clause |
feibaliang/blog | node_modules/pygmentize-bundled/vendor/pygments/ez_setup.py | 181 | 9709 | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | mit |
GustavoHennig/ansible | lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py | 21 | 15423 | #!/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 |
veger/ansible | lib/ansible/parsing/quoting.py | 241 | 1141 | # (c) 2014 James Cammarata, <jcammarata@ansible.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 late... | gpl-3.0 |
CMPUT410W15T02/CMPUT410W15-project | testenv/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/site.py | 108 | 2362 | def __boot():
import sys, imp, os, os.path
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
pic = getattr(sys,'path_importer_cache',{})
stdpath = sys.... | gpl-2.0 |
rishig/zulip | zerver/management/commands/generate_realm_creation_link.py | 1 | 1423 |
from typing import Any
from django.db import ProgrammingError
from confirmation.models import generate_realm_creation_url
from zerver.lib.management import ZulipBaseCommand, CommandError
from zerver.models import Realm
class Command(ZulipBaseCommand):
help = """
Outputs a randomly generated, 1-time-use link... | apache-2.0 |
mammadori/asteroids | game/physicalobject.py | 2 | 4916 | # -*- coding: utf-8 *-*
import pyglet
from . import util, resources
# update and collision helper functions
def process_sprite_group(group, dt):
"""
calls update for the whole group and removes after who returns True
"""
for item in set(group):
try:
if item.update(dt):
... | bsd-3-clause |
andreaso/ansible | lib/ansible/modules/cloud/amazon/ec2_ami.py | 51 | 21956 | #!/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 |
albertz/music-player | mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsuserdefaults.py | 3 | 2840 | from Foundation import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
class PythonListAsValue (TestCase):
def testSettingPythonList(self):
defaults = NSUserDefaults.standardUserDefaults()
defaults.setObject_forKey_([b'a'.decode('ascii'), b'b'.decode('... | bsd-2-clause |
kelseyoo14/Wander | venv_2_7/lib/python2.7/site-packages/numpy/fft/info.py | 34 | 7236 | """
Discrete Fourier Transform (:mod:`numpy.fft`)
=============================================
.. currentmodule:: numpy.fft
Standard FFTs
-------------
.. autosummary::
:toctree: generated/
fft Discrete Fourier transform.
ifft Inverse discrete Fourier transform.
fft2 Discrete Fourier tr... | artistic-2.0 |
unix-beard/gloria | service/decorator.py | 1 | 3222 | import inspect
import logging
from gloria.service.runnable import Task, Service
on_task_wrapped = None
on_service_wrapped = None
class _WrapperHelper(object):
def __call__(self, klass, base, _enabled, _autostart, _respawn):
return type(klass.__name__, (base,), dict(klass.__dict__, enabled=_enabled, autos... | mit |
jmanday/Master | TFM/library/boost_1_63_0/libs/geometry/doc/make_qbk.py | 4 | 6751 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# ===========================================================================
# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
# Copyright (c) 2009-2012 Mateusz Loskot (mateusz@loskot.net), Lon... | apache-2.0 |
npiganeau/odoo | addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report.py | 23 | 9496 | # -*- 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 |
tzewangdorje/SIPserv | Twisted-13.1.0/twisted/mail/scripts/mailmail.py | 40 | 9934 | # -*- test-case-name: twisted.mail.test.test_mailmail -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implementation module for the I{mailmail} command.
"""
import os
import sys
import rfc822
import getpass
from ConfigParser import ConfigParser
try:
import cStringIO as StringIO
ex... | gpl-3.0 |
jblackburne/scikit-learn | sklearn/neural_network/rbm.py | 46 | 12291 | """Restricted Boltzmann Machine
"""
# Authors: Yann N. Dauphin <dauphiya@iro.umontreal.ca>
# Vlad Niculae
# Gabriel Synnaeve
# Lars Buitinck
# License: BSD 3 clause
import time
import numpy as np
import scipy.sparse as sp
from ..base import BaseEstimator
from ..base import TransformerMixi... | bsd-3-clause |
tschmorleiz/amcat | api/rest/viewsets/task.py | 2 | 5446 | ###########################################################################
# (C) Vrije Universiteit, Amsterdam (the Netherlands) #
# #
# This file is part of AmCAT - The Amsterdam Content Analysis Toolkit #
# ... | agpl-3.0 |
dentaku65/plugin.video.sod | channels/piratestreaming.py | 1 | 15107 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# streamondemand.- XBMC Plugin
# Canal para piratestreaming
# http://blog.tvalacarta.info/plugin-xbmc/streamondemand.
# ------------------------------------------------------------
import re
import urlparse
from core import config
f... | gpl-3.0 |
LREN-CHUV/data-factory-airflow-dags | reorganisation_steps/cleanup_all_local.py | 2 | 1473 | """
Reorganisation step: cleanup all local data.
Cleanup the local data (for the whole data-set) created during copy_to_local step.
Configuration variables used:
* :reorganisation:copy_to_local section
* OUTPUT_FOLDER: destination folder for the local copy
"""
from datetime import timedelta
from textwrap imp... | apache-2.0 |
danielvdao/facebookMacBot | venv/lib/python2.7/site-packages/setuptools/tests/test_find_packages.py | 109 | 5619 | """Tests for setuptools.find_packages()."""
import os
import sys
import shutil
import tempfile
import unittest
import platform
import setuptools
from setuptools import find_packages
from setuptools.tests.py26compat import skipIf
find_420_packages = setuptools.PEP420PackageFinder.find
def has_symlink():
bad_symli... | mit |
ozturkemre/programming-challanges | 02-temperature_converter/temperature_converter.py | 1 | 1147 | print("""Enter 'C' or 'c' for Celsius,
'K' or 'k' for Kelvin,
'F' or 'f' for Fahrenheit\n\n""")
converted=0
fr=input("I want converter from: \n")
value1=input("Enter value: \n")
to=input("to: \n")
try:
value1=float(value1)
if(fr=='C' or fr=='c'):
if(to=='F' or to=='f'):
... | mit |
Empeeric/dirometer | django/views/generic/edit.py | 159 | 7457 | from django.forms import models as model_forms
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpResponseRedirect
from django.views.generic.base import TemplateResponseMixin, View
from django.views.generic.detail import (SingleObjectMixin,
SingleObjectTemplateRe... | mit |
ipylypiv/grpc | src/python/grpcio/grpc/_plugin_wrapping.py | 19 | 4602 | # Copyright 2015, 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... | bsd-3-clause |
bobcyw/django | django/core/management/commands/check.py | 316 | 1892 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import apps
from django.core import checks
from django.core.checks.registry import registry
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = "Checks the entire Django project for p... | bsd-3-clause |
ldbc/ldbc_snb_datagen | tools/get-sizes.py | 1 | 1059 | #!/usr/bin/env python3
import argparse
import os
import sys
import boto3
import json
def get_entity_sizes(bucket, prefix):
s3 = boto3.client("s3")
prefix = f"{prefix}social_network/csv/raw/composite-merged-fk/dynamic/"
more = True
token = None
sizes = {}
while more:
resp = s3.list_obj... | gpl-3.0 |
energicryptocurrency/energi | qa/rpc-tests/bipdersig-p2p.py | 1 | 7055 | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Energi Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the... | mit |
fidomason/kbengine | kbe/src/lib/python/Lib/test/test_cmd_line.py | 72 | 19246 | # Tests invocation of the interpreter with various command line arguments
# Most tests are executed with environment variables ignored
# See test_cmd_line_script.py for testing of script execution
import test.support, unittest
import os
import shutil
import sys
import subprocess
import tempfile
from test.script_helper... | lgpl-3.0 |
CalvinHsu1223/LinuxCNC-HAL-EtherCAT-Driver-with-ILC | configs/gladevcp/probe/probe.py | 10 | 7401 | #!/usr/bin/env python
# vim: sts=4 sw=4 et
# This is a component of EMC
# probe.py Copyright 2010 Michael Haberler
#
#
# 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 versi... | gpl-2.0 |
brianlsharp/MissionPlanner | Lib/site-packages/numpy/lib/type_check.py | 53 | 17548 | ## Automatically adapted for numpy Sep 19, 2005 by convertcode.py
__all__ = ['iscomplexobj','isrealobj','imag','iscomplex',
'isreal','nan_to_num','real','real_if_close',
'typename','asfarray','mintypecode','asscalar',
'common_type', 'datetime_data']
import numpy.core.numeric as _nx
fr... | gpl-3.0 |
trolldbois/python-haystack | test/haystack/mappings/test_base.py | 1 | 13863 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests haystack.utils ."""
from __future__ import print_function
import logging
import mmap
import os
import struct
import unittest
from haystack import listmodel
from haystack import target
from haystack.mappings.base import AMemoryMapping
from haystack.mappings.proc... | gpl-3.0 |
coecms/ARCCSSive | tests/CMIP5/db_fixture.py | 1 | 7548 | #!/usr/bin/env python
"""
file: tests/CMIP5/db_fixture.py
author: Scott Wales <scott.wales@unimelb.edu.au>
Copyright 2015 ARC Centre of Excellence for Climate Systems Science
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obta... | apache-2.0 |
jusdng/odoo | openerp/addons/base/module/wizard/base_import_language.py | 337 | 2644 | # -*- 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 |
EnviroCentre/jython-upgrade | jython/lib/site-packages/pip/commands/uninstall.py | 3 | 2289 | from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.basecommand import Command
from pip.exceptions import InstallationError
class UninstallCommand(Command):
"""
Uninstall packages.
pip is able to uninstall most installed packages. Known exceptions are:
- Pure distutil... | mit |
scality/cinder | cinder/tests/unit/api/contrib/test_volume_replication.py | 5 | 11660 | # Copyright 2014 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 by applicable law or agreed t... | apache-2.0 |
emonty/ansible | lib/ansible/modules/system/iptables.py | 20 | 28339 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Linus Unnebäck <linus@folkdatorn.se>
# Copyright: (c) 2017, Sébastien DA ROCHA <sebastien@da-rocha.net>
# 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_... | gpl-3.0 |
bratatidas9/Impala-1 | tests/unittests/test_file_parser.py | 16 | 2882 | # Copyright (c) 2012 Cloudera, Inc. All rights reserved.
# Unit tests for the test file parser
#
import logging
import pytest
from tests.util.test_file_parser import *
from tests.common.base_test_suite import BaseTestSuite
test_text = """
# Text before in the header (before the first ====) should be ignored
# so put t... | apache-2.0 |
TheoChevalier/bedrock | bedrock/mozorg/middleware.py | 11 | 2753 | # 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 email.utils import formatdate
import time
from django.conf import settings
from django.core.except... | mpl-2.0 |
wcmckee/moejobs-site | cache/.mako.tmp/comments_helper_googleplus.tmpl.py | 1 | 2430 | # -*- coding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
STOP_RENDERING = runtime.STOP_RENDERING
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1443802885.4031692
_enable_loop = True
_template_filename = '/usr/local/lib/python3.4/dist-package... | mit |
sesamesushi/desatisrevu | modules/oeditor/oeditor.py | 9 | 10589 | # 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 ... | apache-2.0 |
muffinresearch/olympia | conftest.py | 6 | 4031 | from django import http, test
from django.conf import settings
from django.core.cache import cache
from django.utils import translation
import caching
import pytest
import amo
from access.models import Group, GroupUser
from translations.hold import clean_translations
from users.models import UserProfile
@pytest.fix... | bsd-3-clause |
m039/Void | third-party/void-boost/tools/build/src/build/scanner.py | 8 | 6258 | # Status: ported.
# Base revision: 45462
#
# Copyright 2003 Dave Abrahams
# Copyright 2002, 2003, 2004, 2005 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Implements scanners: objects that compute implicit... | mit |
tellesnobrega/horizon | openstack_dashboard/dashboards/project/access_and_security/security_groups/tests.py | 23 | 34856 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
dieterich-lab/DCC | DCC/circFilter.py | 1 | 5910 | import numpy as np
import os
import sys
import HTSeq
from IntervalTree import IntervalTree
##########################
# Input of this script #
##########################
# This script input a count table:
# chr start end junctiontype count1 count2 ... countn
# and a repeatitive region file in gtf format
# specify... | gpl-3.0 |
gx1997/chrome-loongson | net/tools/testserver/chromiumsync.py | 9 | 50327 | # 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.
"""An implementation of the server side of the Chromium sync protocol.
The details of the protocol are described mostly by comments in the protocol
buff... | bsd-3-clause |
ncf-ds/chloroform | samples/build_fixtures.py | 1 | 6130 | import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from chloroform import db
from chloroform.models import *
#Things this has:
#Same client different retail chains
#Same retail chain different clients
#question_groups containing a question_group
#same qquestion_groups across forms
#Que... | agpl-3.0 |
JFriel/honours_project | venv/lib/python2.7/site-packages/numpy/f2py/f2py2e.py | 174 | 22908 | #!/usr/bin/env python
"""
f2py2e - Fortran to Python C/API generator. 2nd Edition.
See __usage__ below.
Copyright 1999--2011 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRAN... | gpl-3.0 |
hackerbot/DjangoDev | tests/template_tests/filter_tests/test_lower.py | 388 | 1155 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.template.defaultfilters import lower
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class LowerTests(SimpleTestCase):
@setup({'lower01': '{% autoescape off %}{{ a|lower }}... | bsd-3-clause |
prasen-ftech/pywinauto | doc_src/build_autodoc_files.py | 16 | 2513 | "Build up the sphinx autodoc file for the python code"
import os
import sys
docs_folder = os.path.dirname(__file__)
pywin_folder = os.path.dirname(docs_folder)
sys.path.append(pywin_folder)
pywin_folder = os.path.join(pywin_folder, "pywinauto")
excluded_dirs = ["unittests"]
excluded_files = [
"_men... | lgpl-2.1 |
yukoba/sympy | sympy/polys/rootisolation.py | 78 | 55536 | """Real and complex root isolation and refinement algorithms. """
from __future__ import print_function, division
from sympy.polys.densebasic import (
dup_LC, dup_TC, dup_degree,
dup_strip, dup_reverse,
dup_convert,
dup_terms_gcd)
from sympy.polys.densearith import (
dup_neg, dup_rshift, dup_rem)... | bsd-3-clause |
nest/nest-simulator | examples/NESTServerClient/NESTServerClient.py | 17 | 2145 | # -*- coding: utf-8 -*-
#
# NESTServerClient.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 Licens... | gpl-2.0 |
lungetech/luigi | test/scheduler_visualisation_test.py | 5 | 19278 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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 |
swampbotics/new.swampbotics.org | node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py | 2710 | 5094 | # 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.
"""Visual Studio user preferences file writer."""
import os
import re
import socket # for gethostname
import gyp.common
import gyp.easy_xml as easy_xml
#------... | mit |
peer-node/flex | test/lib/googletest/scripts/gen_gtest_pred_impl.py | 2538 | 21986 | #!/usr/bin/env python
#
# Copyright 2006, 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... | agpl-3.0 |
zsjohny/jumpserver | apps/perms/urls/views_urls.py | 1 | 2684 | # coding:utf-8
from django.conf.urls import url
from django.urls import path
from .. import views
app_name = 'perms'
urlpatterns = [
# asset-permission
path('asset-permission/', views.AssetPermissionListView.as_view(), name='asset-permission-list'),
path('asset-permission/create/', views.AssetPermissionC... | gpl-2.0 |
cctaylor/googleads-python-lib | examples/dfp/v201505/proposal_service/submit_proposals_for_approval.py | 3 | 2395 | #!/usr/bin/python
#
# Copyright 2015 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 |
wtanaka/google-app-engine-django-openid | src/openid/consumer/html_parse.py | 167 | 7161 | """
This module implements a VERY limited parser that finds <link> tags in
the head of HTML or XHTML documents and parses out their attributes
according to the OpenID spec. It is a liberal parser, but it requires
these things from the data in order to work:
- There must be an open <html> tag
- There must be an open... | gpl-3.0 |
davidharvey1986/pyRRG | unittests/bugFixPyRRG/lib/python3.7/site-packages/pip/_vendor/distlib/scripts.py | 7 | 16998 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2015 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from io import BytesIO
import logging
import os
import re
import struct
import sys
from .compat import sysconfig, detect_encoding, ZipFi... | mit |
chengdezhi/language_model_for_typing | lm_prediction.py | 1 | 6516 | import datrie
from data_utils import Vocabulary, Dataset
import string
import re
from flask import Flask
from flask_restful import Resource, Api
import traceback
import time
import sys
#import thriftpy
import os
from flask import Flask, request, redirect, url_for
from werkzeug.utils import secure_filename
from newPyC... | mit |
alsrgv/tensorflow | tensorflow/contrib/distributions/python/ops/bijectors/softplus.py | 35 | 5563 | # 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 |
adybbroe/mesan_compositer | mesan_compositer/ctth_quicklooks.py | 1 | 4733 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014, 2015, 2019 Adam.Dybbroe
# Author(s):
# Adam.Dybbroe <a000680@c14526.ad.smhi.se>
# 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 Foun... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.