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
roselleebarle04/django
django/utils/formats.py
291
8379
import datetime import decimal import unicodedata from importlib import import_module from django.conf import settings from django.utils import dateformat, datetime_safe, numberformat, six from django.utils.encoding import force_str from django.utils.functional import lazy from django.utils.safestring import mark_safe...
bsd-3-clause
AhmedHani/Neural-Networks-for-ML
Implementations/simple_word2vec/cbow.py
1
2983
import tensorflow as tf class CBOW(object): def __init__(self, args): self.__args = args self.__ngram_size = args.ngram_size self.__input_size = self.__ngram_size - 1 self.__vocab_size = args.vocab_size + 1 self.__embedding_dim = args.embedding_dim self.__learning_r...
gpl-3.0
OpenUpgrade/OpenUpgrade
addons/l10n_in_hr_payroll/report/payment_advice_report.py
340
3967
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
Nicop06/ansible
test/units/module_utils/basic/test_safe_eval.py
63
3191
# -*- coding: utf-8 -*- # (c) 2015-2016, Toshio Kuratomi <tkuratomi@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...
gpl-3.0
robovm/robovm-studio
python/helpers/pydev/stubs/_get_tips.py
88
8230
import os.path import inspect import sys # completion types. TYPE_IMPORT = '0' TYPE_CLASS = '1' TYPE_FUNCTION = '2' TYPE_ATTR = '3' TYPE_BUILTIN = '4' TYPE_PARAM = '5' def _imp(name, log=None): try: return __import__(name) except: if '.' in name: sub = name[0:name.rfind('.')] ...
apache-2.0
alexsiri7/RoboScrum
stories/views.py
1
2140
from django.shortcuts import render_to_response, get_object_or_404 from django.template import Context, loader from stories.models import Story, Sprint from django.http import HttpResponse from django.views.generic import DetailView, ListView class SprintView(DetailView): days = ["", "","Mon", "", "", "", "Tue", "...
gpl-3.0
gchp/django
django/contrib/gis/measure.py
344
12272
# Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz> # 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, #...
bsd-3-clause
rubencabrera/odoo
addons/mail/tests/test_mail_group.py
56
6517
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
sauliusl/seaborn
seaborn/tests/test_palettes.py
3
11509
import colorsys import numpy as np import matplotlib as mpl import pytest import nose.tools as nt import numpy.testing as npt import matplotlib.pyplot as plt from .. import palettes, utils, rcmod from ..external import husl from ..colors import xkcd_rgb, crayons from distutils.version import LooseVersion mpl_ge_150 ...
bsd-3-clause
Knio/dominate
dominate/dom_tag.py
1
12996
__license__ = ''' This file is part of Dominate. Dominate is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Dominate is distributed in...
lgpl-3.0
TuSimple/simpledet
config/RepPoints/reppoints_moment_r50v1_fpn_1x.py
1
6559
from models.RepPoints.builder import RepPoints as Detector from models.retinanet.builder import MSRAResNet50V1FPN as Backbone from models.RepPoints.builder import RepPointsNeck as Neck from models.RepPoints.builder import RepPointsHead as Head from mxnext.complicate import normalizer_factory def get_config(is_train):...
apache-2.0
openmicroscopy/omero-marshal
omero_marshal/encode/encoders/mask.py
1
1127
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2015 Glencoe Software, Inc. All rights reserved. # # This software is distributed under the terms described by the LICENCE file # you can find at the root of the distribution bundle. # If the file is missing please request a copy by contacting # jason@glen...
gpl-2.0
marqueedev/django
django/db/models/deletion.py
12
14028
from collections import OrderedDict from itertools import chain from operator import attrgetter from django.db import IntegrityError, connections, transaction from django.db.models import signals, sql from django.utils import six class ProtectedError(IntegrityError): def __init__(self, msg, protected_objects): ...
bsd-3-clause
klickagent/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
124
3663
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
bsd-3-clause
tchx84/social-sugar
src/jarabe/util/normalize.py
4
1100
# -*- coding: utf-8 -*- # Copyright (C) 2012 One Laptop Per Child # # 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
edisonlz/fruit
web_project/base/site-packages/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
deandunbar/bitwave
hackathon_version/venv/lib/python2.7/site-packages/django/conf/locale/sr/formats.py
394
2011
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y.' TIME_FORMAT = 'H:i' DATE...
mit
Karel-van-de-Plassche/bokeh
bokeh/util/sampledata.py
2
6899
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
bsd-3-clause
jseabold/statsmodels
statsmodels/tsa/vector_ar/output.py
5
6945
from statsmodels.compat.python import lzip from io import StringIO import numpy as np from statsmodels.iolib import SimpleTable mat = np.array _default_table_fmt = dict( empty_cell = '', colsep=' ', row_pre = '', row_post = '', table_dec_above='=', table_dec_below='=', header_dec_below...
bsd-3-clause
stefanklug/django-lazysignup
lazysignup/migrations/0001_initial.py
1
4128
# flake8: noqa # encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'LazyUser' db.create_table('lazysignup_lazyuser', ( ('id', self....
bsd-3-clause
dmccloskey/ddt_python
ddt_python/ddt_container_biPlotAndValidation.py
1
20231
from .ddt_container import ddt_container from .ddt_tile import ddt_tile from .ddt_tile_html import ddt_tile_html class ddt_container_biPlotAndValidation(ddt_container): def make_biPlotAndValidation(self, data1,data2, data1_keys,data1_nestkeys,data1_keymap, data2_keys,data2_nestkeys,data2_ke...
mit
TeamSWAP/swap
src/raid_server.py
1
5127
# # Copyright 2013 TeamSWAP # # 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, so...
apache-2.0
googleapis/google-cloud-php-retail
synth.py
2
3303
# Copyright 2021 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
GauriGNaik/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/treewalkers/pulldom.py
1729
2302
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
mpl-2.0
justathoughtor2/atomicApe
cygwin/lib/python2.7/site-packages/unidecode/x056.py
252
4615
data = ( 'Di ', # 0x00 'Qi ', # 0x01 'Jiao ', # 0x02 'Chong ', # 0x03 'Jiao ', # 0x04 'Kai ', # 0x05 'Tan ', # 0x06 'San ', # 0x07 'Cao ', # 0x08 'Jia ', # 0x09 'Ai ', # 0x0a 'Xiao ', # 0x0b 'Piao ', # 0x0c 'Lou ', # 0x0d 'Ga ', # 0x0e 'Gu ', # 0x0f 'Xiao ', # 0x10 'Hu...
gpl-3.0
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/reportlab-3.2.0/src/reportlab/graphics/samples/clustered_bar.py
42
4249
#Autogenerated by ReportLab guiedit do not edit from reportlab.graphics.charts.legends import Legend from reportlab.graphics.samples.excelcolors import * from reportlab.graphics.charts.barcharts import HorizontalBarChart from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String from reportlab.graphics....
mit
pombredanne/pants
tests/python/pants_test/backend/jvm/tasks/test_scala_repl_integration.py
5
2103
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from textwrap import...
apache-2.0
olympian94/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/node_metadata_details.py
11
5332
""" The Properties of schema.org Chosen Datatypes """ schema_dict={ "Page":{ "type":"http://schema.org/Article", "name":"name", "tags":"keywords", "DM":"dateModified", "editor":"editor", # An embedded object "contributor":"contributor", ...
agpl-3.0
lexi6725/u-boot-2015-04
tools/buildman/cmdline.py
3
5133
# # Copyright (c) 2014 Google, Inc # # SPDX-License-Identifier: GPL-2.0+ # from optparse import OptionParser def ParseArgs(): """Parse command line arguments from sys.argv[] Returns: tuple containing: options: command line options args: command lin arguments """ p...
gpl-3.0
quattor/aquilon
tests/broker/test_del_esx_cluster.py
2
3778
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013,2014,2015,2016 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
apache-2.0
nhomar/odoo-mirror
addons/l10n_fr/wizard/__init__.py
424
1462
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
agpl-3.0
mKeRix/home-assistant
homeassistant/components/cloud/prefs.py
9
10651
"""Preference management for cloud.""" from ipaddress import ip_address from typing import Optional from homeassistant.auth.const import GROUP_ID_ADMIN from homeassistant.auth.models import User from homeassistant.core import callback from homeassistant.util.logging import async_create_catching_coro from .const impor...
mit
jonyroda97/redbot-amigosprovaveis
lib/youtube_dl/extractor/vessel.py
12
5657
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import ( ExtractorError, parse_iso8601, sanitized_Request, ) class VesselIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?vessel\.com/(?:videos|embed)/(?P<id>[0-9a-zA-Z-_]...
gpl-3.0
nuncjo/Delver
examples.py
1
6037
# -*- coding:utf-8 -*- import os import psycopg2 from pprint import pprint from delver import Crawler def scraping_movies_table(): c = Crawler() c.logging = True c.useragent = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" c.open("http://www.boxofficemojo.com/daily/") ...
mit
beeftornado/sentry
src/sentry/stacktraces/processing.py
1
20204
from __future__ import absolute_import import six import logging from datetime import datetime from django.utils import timezone from collections import namedtuple, OrderedDict import sentry_sdk from sentry.models import Project, Release from sentry.utils.cache import cache from sentry.utils.hashlib import hash_val...
bsd-3-clause
thandang/TComponent
TComponents/cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/zip.py
34
3315
"""SCons.Tool.zip Tool-specific initialization for zip. 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 The SCons Foundation # # P...
apache-2.0
schristakidis/p2ner
p2ner/components/scheduler/pullclient/pullclient/messages/retransmitmessage.py
2
1452
# -*- coding: utf-8 -*- # Copyright 2012 Loris Corazza, Sakis Christakidis # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
apache-2.0
matthiaskrgr/cppcheck
tools/extracttests.py
1
10280
#!/usr/bin/env python # # Cppcheck - A tool for static C/C++ code analysis # Copyright (C) 2007-2017 Cppcheck team. # # 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 Lice...
gpl-3.0
shelsonjava/TeaJS
deps/v8/build/gyp/test/linux/gyptest-implicit-rpath.py
252
1172
#!/usr/bin/env python # Copyright (c) 2013 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 that the implicit rpath is added only when needed. """ import TestGyp import re import subprocess import sys if sys.platform...
bsd-3-clause
porduna/weblabdeusto
server/launch/sample_balanced2_concurrent_experiments/main_machine/lab_and_experiment/experiment43/server_config.py
968
1526
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- weblab_xilinx_experiment_xilinx_device = 'FPGA' weblab_xilinx_experiment_port_number = 1 # This should be something like this: # import os as _os # xilinx_home = _os.getenv('XILINX_HOME') # if xilinx_home == None: # if _os.name == 'nt': # xilinx_home = r'C:...
bsd-2-clause
nailtaras/nailcoin
qa/rpc-tests/reindex.py
144
1063
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test -reindex with CheckBlockIndex # from test_framework.test_framework import BitcoinTestFramework from t...
mit
MTLeeLab/RESA
resa_util.py
1
10051
### # Copyright 2016 Miler T. Lee, University of Pittburgh # This file is part of the RESA Suite # # RESA Suite 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 op...
gpl-3.0
openstack/sahara-dashboard
sahara_dashboard/content/data_processing/clusters/cluster_templates/views.py
1
7433
# 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 # distributed under the...
apache-2.0
ff94315/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/cgi.py
35
34505
#! /usr/local/bin/python # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin/env w...
gpl-2.0
caterinaurban/Lyra
src/lyra/tests/code_jam/pancake_flipper/pancakes_fyodr.py
1
1842
def pow(a: int, b: int) -> int: power: int = 1 for i in range(b): power = power * a return power def check(memos: Dict[(Tuple[(int, int, int, int)], int)], i: int, s: int, c: int, k: int) -> int: if (s == 0): return 0 elif ((i, s, c, k) not in memos): memos[(i, s, c, k)]: in...
mpl-2.0
RedHatInsights/insights-core
insights/parsers/corosync_cmapctl.py
1
2063
""" CorosyncCmapctl - Command ``corosync-cmapctl [params]`` ======================================================= This module parses the output of the ``corosync-cmapctl [params]`` command. """ from insights import parser, CommandParser from insights.parsers import SkipException, ParseException from insights.specs ...
apache-2.0
kurtdawg24/robotframework
setup.py
16
3334
#!/usr/bin/env python import sys import os from os.path import abspath, join, dirname from distutils.core import setup try: import setuptools # use setuptools when available except ImportError: pass CURDIR = dirname(abspath(__file__)) execfile(join(CURDIR, 'src', 'robot', 'version.py')) VERSION = get_ver...
apache-2.0
ksteinfe/decodes
src/decodes/core/dc_interval.py
1
10356
from decodes.core import * import math, random class Interval(object): """ an interval class """ def __init__(self, a=0,b=1): """ Interval Constructor. :param a: First number of the interval. :type a: float :param b: Second number of the interval. ...
gpl-3.0
jn0/fb2utils
unidecode/x81.py
252
4673
data = ( 'Cheng ', # 0x00 'Tiao ', # 0x01 'Zhi ', # 0x02 'Cui ', # 0x03 'Mei ', # 0x04 'Xie ', # 0x05 'Cui ', # 0x06 'Xie ', # 0x07 'Mo ', # 0x08 'Mai ', # 0x09 'Ji ', # 0x0a 'Obiyaakasu ', # 0x0b '[?] ', # 0x0c 'Kuai ', # 0x0d 'Sa ', # 0x0e 'Zang ', # 0x0f 'Qi ', # 0x...
gpl-3.0
pombreda/staticdhcpd
libpydhcpserver/libpydhcpserver/dhcp_network.py
6
11034
# -*- encoding: utf-8 -*- """ pydhcplib module: dhcp_network Purpose ======= Processes DHCP packets. Legal ===== This file is part of libpydhcpserver. libpydhcpserver 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 Fo...
gpl-3.0
bnbowman/BifoAlgo
src/Chapter2/Sec24_LeaderCycleSeq.py
1
3081
#! /usr/bin/env python3 from collections import Counter from operator import itemgetter def cyclo_seq( spectrum_file, spectrum_table_file ): N, spectrum = parse_spectrum_file( spectrum_file ) spectrum_table = parse_spectrum_table( spectrum_table_file ) aa_weights = set(spectrum_table.values()) peptides = list(fin...
gpl-2.0
taigaio/taiga-back
taiga/projects/attachments/permissions.py
1
5169
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later ver...
agpl-3.0
cysuncn/python
spark/crm/PROC_O_LNA_XDXT_CUSTOMER_RELATIVE.py
1
5008
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_O_LNA_XDXT_CUSTOMER_RELATIVE').setMaster(sys.argv[2]) sc = SparkContext(conf ...
gpl-3.0
yvaucher/e-commerce
__unported__/product_links_sync/__init__.py
3
1615
# -*- encoding: utf-8 -*- ################################################################################# # # # product_links_sync for OpenERP # # Copyright (C) 2012 Akretion Sébastien BEAU <se...
agpl-3.0
agileblaze/OpenStackTwoFactorAuthentication
openstack_dashboard/dashboards/admin/hypervisors/compute/urls.py
57
1168
# 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 # distributed under th...
apache-2.0
x303597316/hue
desktop/core/ext-py/Django-1.6.10/django/db/backends/postgresql_psycopg2/operations.py
106
9494
from __future__ import unicode_literals from django.conf import settings from django.db.backends import BaseDatabaseOperations class DatabaseOperations(BaseDatabaseOperations): def __init__(self, connection): super(DatabaseOperations, self).__init__(connection) def date_extract_sql(self, lookup_type...
apache-2.0
tethysplatform/tethys
tethys_cli/__init__.py
2
2369
""" ******************************************************************************** * Name: cli/__init__.py * Author: Nathan Swain * Created On: 2014 * Copyright: (c) Brigham Young University 2014 * License: BSD 2-Clause ******************************************************************************** """ # Commandline...
bsd-2-clause
netsec-ethz/scion
acceptance/trc_update_acceptance/test.py
2
4904
#!/usr/bin/env python3 # Copyright 2020 Anapaya Systems # # 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
pscottdevos/pyfilesystem
fs/expose/dokan/__init__.py
13
37971
""" fs.expose.dokan =============== Expose an FS object to the native filesystem via Dokan. This module provides the necessary interfaces to mount an FS object into the local filesystem using Dokan on win32:: http://dokan-dev.net/en/ For simple usage, the function 'mount' takes an FS object and a drive letter, ...
bsd-3-clause
piffey/ansible
lib/ansible/modules/web_infrastructure/letsencrypt.py
10
56029
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016 Michael Gruener <michael.gruener@chaosmoon.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_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_versio...
gpl-3.0
yawnosnorous/python-for-android
python-build/python-libs/gdata/tests/atom_tests/data_test.py
87
37163
#!/usr/bin/python # -*-*- encoding: utf-8 -*-*- # # Copyright (C) 2006 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 # # Unle...
apache-2.0
ChrisChinchilla/compose
compose/config/types.py
6
3686
""" Types for objects parsed from the configuration. """ from __future__ import absolute_import from __future__ import unicode_literals import os from collections import namedtuple from compose.config.errors import ConfigurationError from compose.const import IS_WINDOWS_PLATFORM class VolumeFromSpec(namedtuple('_Vo...
apache-2.0
saffsd/updatedir
src/updatedir/__init__.py
1
4396
import logging import os import urlparse logger = logging.getLogger(__name__) def updatetree(source, dest, overwrite=False): parsed_url = urlparse.urlparse(dest) logger.debug(parsed_url) if parsed_url.scheme == '': import shutil if overwrite and os.path.exists(parsed_url.path): logger.debug("Delet...
gpl-3.0
soundcloud/essentia
test/src/unittest/spectral/test_energybandratio.py
10
1968
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), e...
agpl-3.0
ToonTownInfiniteRepo/ToontownInfinite
toontown/estate/DistributedChangingStatuary.py
6
2466
from pandac.PandaModules import NodePath from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from toontown.estate import DistributedStatuary from toontown.estate import GardenGlobals class DistributedChangingStatuary(DistributedStatuary.DistributedStatuary): notify = Di...
mit
supersven/intellij-community
python/testData/MockSdk3.2/Lib/_abcoll.py
112
15499
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for collections, according to PEP 3119. DON'T USE THIS MODULE DIRECTLY! The classes here should be imported via collections; they are defined here only to alleviate certain bootstrappin...
apache-2.0
google/resultstoreui
resultstoreui/resultstoreapi/cloud/devtools/resultstore_v2/proto/file_processing_error_pb2.py
2
8039
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/devtools/resultstore_v2/proto/file_processing_error.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _messag...
apache-2.0
openstack/cinder
cinder/volume/drivers/netapp/dataontap/client/api.py
2
23363
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Glenn Gobeli. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2015 Alex Meade. All rights reserved. # # Licensed under the Apache Li...
apache-2.0
jjs0sbw/CSPLN
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/gluon/contrib/pymysql/tests/test_basic.py
45
9146
from pymysql.tests import base from pymysql import util import time import datetime class TestConversion(base.PyMySQLTestCase): def test_datatypes(self): """ test every data type """ conn = self.connections[0] c = conn.cursor() c.execute("create table test_datatypes (b bit, i int, ...
gpl-3.0
wathen/PhD
MHD/FEniCS/MHD/Stabilised/SaddlePointForm/Test/GeneralisedEigen/NoBC/3d/MHDmatrixPrecondSetup.py
4
7216
from dolfin import * import petsc4py import sys petsc4py.init(sys.argv) from petsc4py import PETSc import HiptmairSetup import time import MatrixOperations as MO import NSprecondSetup import CheckPetsc4py as CP def FluidLinearSetup(Pressure,mu): MO.PrintStr("Preconditioning Fluid linear setup",3,"=","\n\n") pa...
mit
prziborowski/pyvmomi-community-samples
samples/get_vm_names.py
4
2403
#!/usr/bin/env python """ Python program for flat text listing the VMs on an ESX / vCenter, host one per line. 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/LIC...
apache-2.0
ismail-s/warehouse
warehouse/redirects.py
3
1120
# 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 # distributed under the Li...
apache-2.0
dancingdan/tensorflow
tensorflow/contrib/seq2seq/python/kernel_tests/decoder_test.py
19
7190
# 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
alexallah/django
tests/template_tests/syntax_tests/test_numpy.py
83
1653
import warnings from unittest import skipIf from django.test import SimpleTestCase from ..utils import setup try: import numpy VisibleDeprecationWarning = numpy.VisibleDeprecationWarning except ImportError: numpy = False except AttributeError: # numpy < 1.9.0, e.g. 1.8.2 in Debian 8 VisibleDeprecati...
bsd-3-clause
jordanemedlock/psychtruths
temboo/Library/Amazon/IAM/CreateGroup.py
5
4023
# -*- coding: utf-8 -*- ############################################################################### # # CreateGroup # Creates a new group in your AWS account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this...
apache-2.0
mitsuhiko/flask
src/flask/wrappers.py
2
5604
import typing as t from werkzeug.exceptions import BadRequest from werkzeug.wrappers import Request as RequestBase from werkzeug.wrappers import Response as ResponseBase from . import json from .globals import current_app from .helpers import _split_blueprint_path if t.TYPE_CHECKING: import typing_extensions as ...
bsd-3-clause
jelly/calibre
src/calibre/gui2/actions/show_quickview.py
2
7899
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from PyQt5.Qt import QAction from calibre.gui2.actions import InterfaceAction from calibre.gui2.dialogs.quickview import...
gpl-3.0
Pal3love/otRebuilder
Package/otRebuilder/Dep/ufoLib/test/test_filenames.py
1
3845
from __future__ import unicode_literals import unittest from ufoLib.filenames import userNameToFileName, handleClash1, handleClash2 class TestFilenames(unittest.TestCase): def test_userNameToFileName(self): self.assertEqual(userNameToFileName("a"), "a") self.assertEqual(userNameToFileName("A"), "...
mit
basilrormose/ud032
Lesson_5_Problem_Set/02-Region_Cities/region.py
9
1642
#!/usr/bin/env python """ Use an aggregation query to answer the following question. Which Region in India has the largest number of cities with longitude between 75 and 80? Please modify only the 'make_pipeline' function so that it creates and returns an aggregation pipeline that can be passed to the MongoDB aggre...
agpl-3.0
googleapis/api-client-staging
generated/python/gapic-google-cloud-logging-v2-docs/google/cloud/gapic/logging/v2/config_service_v2_client.py
7
16376
# Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
bsd-3-clause
kantai/passe-framework-prototype
django/http/__init__.py
1
31597
import datetime import os import re import time from pprint import pformat from urllib import urlencode, quote from urlparse import urljoin #try: # from StringIO import StringIO #except ImportError: from StringIO import StringIO from copy import deepcopy try: # The mod_python version is more efficient, so try i...
bsd-3-clause
iVCE/RDFS
src/contrib/hod/testing/testHadoop.py
182
4674
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
apache-2.0
roadmapper/ansible
lib/ansible/modules/system/ufw.py
28
22566
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Ahti Kitsik <ak@ahtik.com> # Copyright: (c) 2014, Jarno Keskikangas <jarno.keskikangas@gmail.com> # Copyright: (c) 2013, Aleksey Ovcharenko <aleksey.ovcharenko@gmail.com> # Copyright: (c) 2013, James Martin <jmartin@basho.com> # GNU General Public Licens...
gpl-3.0
Akasurde/virt-manager
virtinst/deviceaudio.py
3
1231
# # Copyright 2008-2009, 2013-2014 Red Hat, Inc. # Cole Robinson <crobinso@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) an...
gpl-2.0
Mixser/django
django/contrib/sessions/middleware.py
256
2658
import time from importlib import import_module from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date class SessionMiddleware(object): def __init__(self): engine = import_module(settings.SESSION_ENGINE) self.SessionStore = eng...
bsd-3-clause
sandeepdsouza93/TensorFlow-15712
tensorflow/python/ops/control_flow_ops_test.py
10
10031
# 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
azampagl/ai-ml-improved-bridgecut
lbc/src/bridgecut/lib/util.py
2
1061
""" Utility functions. @package bridgecut @author Aaron Zampaglione <azampagl@my.fit.edu> @copyright 2011 Aaron Zampaglione @license MIT """ def combinations(iterable, r): # combinations('ABCD', 2) --> AB AC AD BC BD CD # combinations(range(4), 3) --> 012 013 023 123 pool = tuple(iterable) n = len(pool...
mit
groschovskiy/lerigos_music
Server/API/lib/gcloud/bigtable/test_row.py
1
63227
# 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 by applicable law or a...
apache-2.0
huiren/ece511
util/minorview/model.py
55
39193
# Copyright (c) 2013 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality o...
bsd-3-clause
Drooids/odoo
addons/account_bank_statement_extensions/report/bank_statement_balance_report.py
378
2723
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
shiora/The-Perfect-Pokemon-Team-Balancer
libs/env/Lib/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
216
13871
'''SSL with SNI_-support for Python 2. This needs the following packages installed: * pyOpenSSL (tested with 0.13) * ndg-httpsclient (tested with 0.3.2) * pyasn1 (tested with 0.1.6) To activate it call :func:`~urllib3.contrib.pyopenssl.inject_into_urllib3`. This can be done in a ``sitecustomize`` module, or at any o...
gpl-2.0
diplomacy/research
diplomacy_research/proto/diplomacy_tensorflow/contrib/boosted_trees/proto/split_info_pb2.py
1
6904
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: diplomacy_tensorflow/contrib/boosted_trees/proto/split_info.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _mess...
mit
powlo/script.module.pydevd
lib/_pydev_imps/_pydev_pluginbase.py
52
13955
# -*- coding: utf-8 -*- """ pluginbase ~~~~~~~~~~ Pluginbase is a module for Python that provides a system for building plugin based applications. :copyright: (c) Copyright 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys from pydevd_constants impo...
epl-1.0
subfusc/anki
anki/stats.py
19
32591
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <anki@ichi2.net> # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html from __future__ import division import time import datetime import json import anki.js from anki.utils import fmtTimeSpan, ids2str from anki.lang import _, ngettext # Car...
agpl-3.0
rchav/vinerack
saleor/userprofile/models.py
2
5462
from __future__ import unicode_literals from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin) from django.db import models from django.forms.models import model_to_dict from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from djang...
bsd-3-clause
fayf/pyload
module/plugins/accounts/FourSharedCom.py
5
1169
# -*- coding: utf-8 -*- from module.plugins.internal.Account import Account from module.plugins.internal.Plugin import set_cookie class FourSharedCom(Account): __name__ = "FourSharedCom" __type__ = "account" __version__ = "0.07" __status__ = "testing" __description__ = """FourShared.com a...
gpl-3.0
SimonSapin/servo
tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/user_prompts.py
42
4056
# META: timeout=long import pytest from tests.support.asserts import assert_dialog_handled, assert_error, assert_success def execute_async_script(session, script, args=None): if args is None: args = [] body = {"script": script, "args": args} return session.transport.send( "POST", "/sess...
mpl-2.0
lmazuel/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/file_info.py
1
1684
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
willingc/oh-mainline
vendor/packages/twisted/twisted/conch/test/test_helper.py
17
18248
# -*- test-case-name: twisted.conch.test.test_helper -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.conch.insults import helper from twisted.conch.insults.insults import G0, G1, G2, G3 from twisted.conch.insults.insults import modes, privateModes from twisted.conch.insults.ins...
agpl-3.0
yongjingzheng/containerops
pilotage/examples/python/util/pd/component_util.py
18
4964
#encoding=utf-8 import logging, logging.handlers, json, urllib2, urllib, os, io, commands, shutil, time from BaseHTTPServer import BaseHTTPRequestHandler # define const LOG_FILE = 'tst.log' CO_POD_NAME = "CO_POD_NAME" CO_RUN_ID = "CO_RUN_ID" CO_EVENT_LIST = "CO_EVENT_LIST" CO_SERVICE_ADDR = "CO_SERVICE_A...
apache-2.0