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
wolut/codecombat
scripts/analytics/parseStripePayments.py
97
10435
# Parse Stripe payment info via exported payments.csv files import sys from datetime import tzinfo, timedelta, datetime # TODO: use stripe_customers.csv to match payments to our db data # Stripe file format # id,Description,Created (UTC),Amount,Amount Refunded,Currency,Converted Amount,Converted Amount Refunded,Fee,...
mit
gandelman-a/neutron-lbaas
neutron_lbaas/tests/unit/db/loadbalancer/test_db_loadbalancer.py
1
74598
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
bala4901/odoo
addons/account/wizard/account_report_general_journal.py
378
1697
# -*- 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
Venturi/oldcms
env/lib/python2.7/site-packages/django/contrib/gis/geos/linestring.py
83
5772
from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.base import numpy from django.contrib.gis.geos.coordseq import GEOSCoordSeq from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.point import Poin...
apache-2.0
eRestin/MezzGIS
mezzanine/generic/templatetags/keyword_tags.py
11
2159
from __future__ import unicode_literals from future.builtins import int, round from django.contrib.contenttypes.models import ContentType from django.db.models import Model, Count from mezzanine import template from mezzanine.conf import settings from mezzanine.generic.models import AssignedKeyword, Keyword registe...
bsd-2-clause
1000goalsoffice/support-tools
wiki_to_md/impl/converter.py
34
42218
# 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 a...
apache-2.0
klickagent/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_mock.py
126
3744
# Copyright (C) 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 of conditions and the f...
bsd-3-clause
Andrey-Tkachev/Creto
node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
1788
1435
#!/usr/bin/env python import re import json # https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
mit
thispc/download-manager
module/lib/jinja2/lexer.py
178
26111
# -*- coding: utf-8 -*- """ jinja2.lexer ~~~~~~~~~~~~ This module implements a Jinja / Python combination lexer. The `Lexer` class provided by this module is used to do some preprocessing for Jinja. On the one hand it filters out invalid operators like the bitshift operators we don't allow...
gpl-3.0
bregman-arie/ansible
lib/ansible/modules/cloud/cloudstack/cs_template.py
48
20091
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
Forage/Gramps
gramps/gui/editors/displaytabs/eventembedlist.py
1
15164
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2009 B. Malengier # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; eithe...
gpl-2.0
pozdnyakov/chromium-crosswalk
build/android/pylib/instrumentation/test_result.py
110
1183
# 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. from pylib.base import base_test_result class InstrumentationTestResult(base_test_result.BaseTestResult): """Result information for a single instrume...
bsd-3-clause
meisterkleister/erpnext
erpnext/manufacturing/doctype/bom/test_bom.py
62
2088
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import cstr test_records = frappe.get_test_records('BOM') class TestBOM(unittest.TestCase): def test...
agpl-3.0
mozilla/firefox-flicks
vendor-local/lib/python/requests/packages/charade/langgreekmodel.py
22
12880
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Ri...
bsd-3-clause
eneldoserrata/marcos_openerp
addons/hr_timesheet/report/users_timesheet.py
36
5128
# -*- 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
jhrozek/samba-ldb-mdb
python/samba/getopt.py
22
11208
# Samba-specific bits for optparse # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 # # 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...
gpl-3.0
yiakwy/numpy
numpy/lib/tests/test_utils.py
149
1466
from __future__ import division, absolute_import, print_function import sys from numpy.core import arange from numpy.testing import ( run_module_suite, assert_, assert_equal, dec ) from numpy.lib import deprecate import numpy.lib.utils as utils if sys.version_info[0] >= 3: from io import StringIO else: ...
bsd-3-clause
eBayClassifiedsGroup/orlo
orlo/migrations/e60a77e44da8_initial_db_revision.py
4
4927
"""Initial DB revision Revision ID: e60a77e44da8 Revises: Create Date: 2016-11-24 17:03:25.249133 """ from alembic import op import sqlalchemy as sa from sqlalchemy_utils.types.uuid import UUIDType from sqlalchemy_utils.types.arrow import ArrowType from orlo.config import config # revision identifiers, used by Ale...
mit
kyl191/ansible
lib/ansible/plugins/lookup/nested.py
157
2100
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
nikkisquared/servo
tests/wpt/css-tests/tools/wptserve/wptserve/constants.py
326
4616
import utils content_types = utils.invert_dict({"text/html": ["htm", "html"], "application/json": ["json"], "application/xhtml+xml": ["xht", "xhtm", "xhtml"], "application/xml": ["xml"], ...
mpl-2.0
gopal1cloud/neutron
neutron/plugins/vmware/vshield/vcns.py
8
11183
# Copyright 2013 VMware, 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...
apache-2.0
bonitadecker77/python-for-android
python3-alpha/python3-src/Mac/Tools/fixapplepython23.py
47
4589
#!/usr/bin/python """fixapplepython23 - Fix Apple-installed Python 2.3 (on Mac OS X 10.3) Python 2.3 (and 2.3.X for X<5) have the problem that building an extension for a framework installation may accidentally pick up the framework of a newer Python, in stead of the one that was used to build the extension. This scr...
apache-2.0
daenamkim/ansible
lib/ansible/modules/network/cnos/cnos_factory.py
35
5267
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # 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 Licens...
gpl-3.0
davidzheng/chippy
chippy/display.py
1
2002
import sys import pygame class Display(): """ Emulates the display of a Chip-8 system. The orignal implementation is a monochrome display and has a width of 64 pixels and a height of 32 pixels. The upper left corner is considered the (0,0) coordinate and the bottom left is considered the (63, 31) coor...
gpl-3.0
PatrickChrist/scikit-learn
sklearn/manifold/t_sne.py
48
20644
# Author: Alexander Fabisch -- <afabisch@informatik.uni-bremen.de> # License: BSD 3 clause (C) 2014 # This is the standard t-SNE implementation. There are faster modifications of # the algorithm: # * Barnes-Hut-SNE: reduces the complexity of the gradient computation from # N^2 to N log N (http://arxiv.org/abs/1301....
bsd-3-clause
koparasy/faultinjection-gem5
src/mem/ruby/profiler/Profiler.py
2
1854
# Copyright (c) 2009 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
mrshelly/openerp71313
openerp/addons/base/ir/workflow/print_instance.py
27
8703
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
arulalant/CMIPs-Handler
scripts/mv/rename_data.py
1
1595
""" In the CMIPs dataset for few frequencies data filename doesnot contains the realm information. for eg : snc_day_MPI-ESM-LR_historical_r1i1p1_19500101-19591231.nc So in this second information day doesnt contain the corresponding realm type. This script will rename those kind of nc filename into correct realm an...
gpl-3.0
chauhanmohit/phantomjs
src/qt/qtwebkit/Tools/TestResultServer/model/testfile.py
129
3795
# 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
SteveXiSong/UW-Madison-ECE757-S15-MulticastSnooping
src/arch/x86/isa/insts/general_purpose/data_conversion/sign_extension.py
91
2443
# Copyright (c) 2007 The Hewlett-Packard Development Company # 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 implemen...
bsd-3-clause
hortinstein/ghost_hortinstein.github.io
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/jvm.py
193
48876
# -*- coding: utf-8 -*- """ pygments.lexers.jvm ~~~~~~~~~~~~~~~~~~~ Pygments lexers for JVM languages. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ...
mit
bufferapp/buffer-django-nonrel
django/core/management/commands/loaddata.py
250
11042
import sys import os import gzip import zipfile from optparse import make_option from django.conf import settings from django.core import serializers from django.core.management.base import BaseCommand from django.core.management.color import no_style from django.db import connections, router, transaction, DEFAULT_DB_...
bsd-3-clause
simonpcook/mframetest
printers/libnotify.py
1
2988
###### libnotify.py - Prints results via libnotify ############################ ## ## MFrameTest ## ## Copyright (C) 2012-2013 Embecosm Limited ## ## This file is part of MFrameTest. ## ## MFrameTest is free software: you can redistribute it and/or modify ## it under the terms of th...
gpl-3.0
houzhenggang/hiwifi-openwrt-HC5661-HC5761
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/encodings/ptcp154.py
647
8950
""" Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,err...
gpl-2.0
erichegt/askbot-devel
askbot/migrations/0146_auto__add_field_threadtogroup_visibility.py
15
33877
# -*- coding: 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 field 'ThreadToGroup.visibility' db.add_column('askbot_thread_groups', 'visibility', ...
gpl-3.0
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/registry/browser/tests/test_distributionsourcepackage.py
1
8893
# Copyright 2010-2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Test distributionsourcepackage views.""" __metaclass__ = type import re import soupmatchers from zope.component import getUtility from lp.app.enums import ServiceUsage ...
agpl-3.0
xaviercobain88/framework-python
openerp/addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
89
11250
########################################################################## # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gener...
agpl-3.0
kivy/python-for-android
pythonforandroid/recipes/pygame/__init__.py
1
2586
from os.path import join from pythonforandroid.recipe import CompiledComponentsPythonRecipe from pythonforandroid.toolchain import current_directory class Pygame2Recipe(CompiledComponentsPythonRecipe): """ Recipe to build apps based on SDL2-based pygame. .. warning:: Some pygame functionality is still u...
mit
thomasrstorey/Inter-pre-in-vention
backend/node_modules/fast-levenshtein/node_modules/grunt-npm-install/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
778
65880
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the MSVSSettings.py file.""" import StringIO import unittest import gyp.MSVSSettings as MSVSSettings class TestSequence...
mit
petecummings/django-cms
cms/admin/dialog/views.py
16
1079
# -*- coding: utf-8 -*- from django.contrib.admin.views.decorators import staff_member_required from django.http import Http404, HttpResponse from django.shortcuts import get_object_or_404, render from cms.models import Page from cms.utils import get_cms_setting from cms.admin.dialog.forms import PermissionForm @st...
bsd-3-clause
spvkgn/youtube-dl
youtube_dl/extractor/buzzfeed.py
47
3655
# coding: utf-8 from __future__ import unicode_literals import json import re from .common import InfoExtractor from .facebook import FacebookIE class BuzzFeedIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?buzzfeed\.com/[^?#]*?/(?P<id>[^?#]+)' _TESTS = [{ 'url': 'http://www.buzzfeed.com/abagg/...
unlicense
ssdi-drive/nuxeo-drive
nuxeo-drive-client/nxdrive/client/remote_document_client.py
1
19921
# coding: utf-8 """ API to access remote Nuxeo documents for synchronization. """ import os import unicodedata import urllib2 from collections import namedtuple from datetime import datetime from dateutil import parser from nxdrive.client.base_automation_client import BaseAutomationClient from nxdrive.client.common ...
lgpl-2.1
FarnazH/horton
horton/part/test/test_base.py
4
2572
#!/usr/bin/env python # -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licens...
gpl-3.0
x303597316/hue
apps/useradmin/src/useradmin/migrations/0004_add_field_UserProfile_first_login.py
29
5839
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserProfile.first_login' db.add_column(u'useradmin_userpr...
apache-2.0
Bysmyyr/chromium-crosswalk
tools/telemetry/third_party/gsutilz/third_party/rsa/rsa/_version200.py
177
15007
"""RSA module Module for calculating large primes, and RSA encryption, decryption, signing and verification. Includes generating public and private keys. WARNING: this implementation does not use random padding, compression of the cleartext input to prevent repetitions, or other common security improvements. Use with...
bsd-3-clause
klothius/htc_magic_kernel_2635
tools/perf/scripts/python/sctop.py
895
1936
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
DavideCanton/Python3
cazzate/quickselect.py
1
1257
import random __author__ = 'Davide' def partition(list_, left, right, pivot_pos): pivot = list_[pivot_pos] list_[left], list_[pivot_pos] = list_[pivot_pos], list_[left] l, r = left + 1, right - 1 while l < r: while l < right and list_[l] <= pivot: l += 1 while r > left an...
gpl-3.0
JeyZeta/Dangerous
Dangerous/Golismero/thirdparty_libs/nltk/app/wordnet_app.py
12
36676
# Natural Language Toolkit: WordNet Browser Application # # Copyright (C) 2001-2012 NLTK Project # Author: Jussi Salmela <jtsalmela@users.sourceforge.net> # Paul Bone <pbone@students.csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ A WordNet Browser application ...
mit
saucelabs/Diamond
src/collectors/memcached/test/testmemcached.py
32
3596
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from memcached impor...
mit
googleads/google-ads-python
google/ads/googleads/v8/enums/types/distance_bucket.py
1
1895
# -*- coding: utf-8 -*- # 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...
apache-2.0
vartagg/urlblocks
urlblocks/netloc.py
1
4629
from .compat import urlparse from .six import text_type, u from .domain_levels import DOMAIN_LEVEL_SECOND, DOMAIN_LEVEL_LOWER class Netloc(text_type): """ A netloc string (``username:password@hostname:port``). Contains methods for accessing and (non-destructively) modifying those four components of ...
unlicense
bgxavier/neutron
neutron/tests/functional/agent/test_l3_agent.py
4
56960
# Copyright (c) 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
Agent007/deepchem
deepchem/feat/adjacency_fingerprints.py
1
4624
from collections import deque from rdkit import Chem import sys import tensorflow as tf import pickle import os import fnmatch import numpy as np from scipy.spatial.distance import pdist, squareform import pandas as pd from deepchem.feat.base_classes import Featurizer from deepchem.feat.graph_features import atom_f...
mit
kaihuang201/opinion
appopinion/ajax.py
1
1248
import json from dajaxice.decorators import dajaxice_register from appopinion.models import * """ handles ajax request like""" @dajaxice_register def like(request, topicid): msg = str(topicid) return json.dumps({'likecount':likecount}) """ handle ajax for vote """ @dajaxice_register def vote(request, comment...
gpl-2.0
rsjohnco/rez
src/rez/tests/test_formatter.py
3
12451
""" test rex string formatting """ import rez.vendor.unittest2 as unittest from rez.tests.util import TestBase from rez.rex import NamespaceFormatter import sys class TestFormatter(TestBase): def setUp(self): TestBase.setUp(self) self.formatter = NamespaceFormatter({}) def assert_formatter_eq...
gpl-3.0
asherkhb/coge
bin/quota-alignment/scripts/gff_to_bed.py
2
1360
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ %prog gff_file convert the gff format into the bed format """ import os.path as op import sys try: from BCBio.GFF import GFFParser except: print >>sys.stderr, "BCBio.GFF module not found, try download and install from`" \ "<http://github.com/ch...
bsd-2-clause
NSLS-II-XPD/ipython_ophyd
archived/profile_collection-dan/startup/99-subtracted-tiff-exporter.py
2
1827
from time import sleep from bluesky.callbacks.broker import LiveTiffExporter from databroker import process from bluesky import Msg from bluesky.plans import DeltaScanPlan, DeltaListScanPlan RE = gs.RE # an alias def take_dark(): print('closing shutter...') shctl1.put(0) # close shutter sleep(2) pr...
bsd-2-clause
willingc/oh-mainline
mysite/search/migrations/0028_change_name_of_python_the_project_back.py
17
4545
# This file is part of OpenHatch. # Copyright (C) 2010 OpenHatch, Inc. # # 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 v...
agpl-3.0
dsanders11/mezzanine
mezzanine/accounts/templatetags/accounts_tags.py
14
2316
from __future__ import unicode_literals from collections import OrderedDict from django.contrib.auth import get_user_model from mezzanine import template from mezzanine.conf import settings from mezzanine.accounts import (get_profile_form, get_profile_user_fieldname, get_profile_for_u...
bsd-2-clause
huahbo/pyamg
pyamg/krylov/tests/test_krylov.py
2
10226
from pyamg.krylov import bicgstab, cg, cgne, cgnr, cr, fgmres, gmres from pyamg.krylov._gmres_householder import gmres_householder from pyamg.krylov._gmres_mgs import gmres_mgs from numpy import array, zeros, ones from scipy import mat, random from scipy.linalg import solve from pyamg.util.linalg import norm import pya...
mit
vitmod/enigma2
lib/python/Screens/HarddiskSetup.py
32
4640
from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.Harddisk import harddiskmanager from Components.MenuList import MenuList from Components.Label import Label from Components.Pixmap import Pixmap from Components.Task import job_manager from Screens.MessageBox import MessageBox ...
gpl-2.0
varunagrawal/azure-services
varunagrawal/VarunWeb/env/Lib/site-packages/django/contrib/messages/tests/urls.py
119
2470
from django.conf.urls import patterns, url from django.contrib import messages from django.core.urlresolvers import reverse from django import forms from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext, Template from django.template.response import TemplateResponse from ...
gpl-2.0
Blizzard/heroprotocol
heroprotocol/versions/protocol77205.py
72
26825
#!/usr/bin/env python # # Copyright 2015-2021 Blizzard Entertainment. Subject to the MIT license. # See the included LICENSE file for more information. # import six from heroprotocol.decoders import CorruptedError, BitPackedBuffer, BitPackedDecoder, VersionedDecoder # Decoding instructions for each protocol type. t...
mit
aurelieladier/openturns
python/test/t_KissFFT_std.py
2
2094
#! /usr/bin/env python from __future__ import print_function from openturns import * import math TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # for fft, the best implementation is given for N = 2^p size = 16 # collection for test collection = NumericalComplexCollection(size) # Fill the data ...
lgpl-3.0
shakamunyi/neutron-vrrp
neutron/tests/unit/cisco/cfg_agent/test_device_status.py
5
8146
# Copyright 2014 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
crlang/sublime-text---front-end-config
Data/Packages/wakatime/packages/wakatime/packages/ntlm_auth/messages.py
7
19098
# This library 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. # This library is distributed in the hope that it will be useful...
mit
mapennell/ansible
v1/ansible/runner/return_data.py
133
2102
# (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
skhal/gmock
gtest/test/gtest_break_on_failure_unittest.py
2140
7339
#!/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...
bsd-3-clause
AvyanConsultingCorp/azure-quickstart-templates
cloudera-director-on-centos/scripts/director_user_passwd.py
100
2905
#! /usr/bin/env python # Copyright (c) 2016 Cloudera, 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 la...
mit
anish/phatch
phatch/app.py
1
7398
# -*- coding: UTF-8 -*- # Phatch - Photo Batch Processor # Copyright (C) 2007-2008 www.stani.be # # 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
KaranToor/MA450
google-cloud-sdk/lib/third_party/pyu2f/hardware.py
6
5624
# 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 ag...
apache-2.0
sandvine/horizon
openstack_dashboard/dashboards/project/firewalls/tabs.py
16
4346
# Copyright 2013, Big Switch Networks, 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 applic...
apache-2.0
hammerhorn/hammerhorn-jive
igo/cjh/music.py
1
12843
#!/usr/bin/env python #coding=UTF-8 """ Classes relating to music. """ import decimal import math import os from decimal import Decimal from cjh.angles import Angle from cjh.cli import Cli from cjh.kinematics import Disp, Velocity from cjh.scalars import Scalar, Unit from cjh.things import Thing from cjh.waves import...
gpl-2.0
oliciv/youtube-dl
youtube_dl/extractor/bambuser.py
98
4856
from __future__ import unicode_literals import re import itertools from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, compat_str, ) from ..utils import ( ExtractorError, int_or_none, float_or_none, ) class BambuserIE(InfoExtractor): IE_NA...
unlicense
TejasM/Personal
tejas/users/admin.py
183
1048
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as AuthUserAdmin from django.contrib.auth.forms import UserChangeForm, UserCreationForm from .models import User class MyUserChan...
bsd-3-clause
m-urban/beets
beetsplug/bpd/__init__.py
23
40332
# This file is part of beets. # Copyright 2015, Adrian Sampson. # # 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, ...
mit
fortes/mashpress
lib/pygments/formatters/terminal256.py
5
7604
# -*- coding: utf-8 -*- """ pygments.formatters.terminal256 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for 256-color terminal output with ANSI sequences. RGB-to-XTERM color conversion routines adapted from xterm256-conv tool (http://frexx.de/xterm-256-notes/data/xterm256-conv2.tar.bz2) by Wolfg...
mit
unkaveh/cdc-frontend
node_modules/node-gyp/gyp/pylib/gyp/win_tool.py
1417
12751
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions for Windows builds. These functions are executed via gyp-win-tool when using the ninja generator. """ import os impor...
apache-2.0
sparkprime/helm
cmd/expandybird/test/templates/python_schema.py
8
1795
#% description: Creates a VM running a Salt master daemon in a Docker container. #% parameters: #% - name: masterAddress #% type: string #% description: Name of the Salt master VM. #% required: true #% - name: project #% type: string #% description: Name of the Cloud project. #% required: true #% - name: zo...
apache-2.0
ProfessionalIT/professionalit-webiste
sdk/google_appengine/lib/django-1.3/django/forms/models.py
152
42947
""" Helper functions for creating Form classes from Django models and database field objects. """ from django.utils.encoding import smart_unicode, force_unicode from django.utils.datastructures import SortedDict from django.utils.text import get_text_list, capfirst from django.utils.translation import ugettext_lazy as...
lgpl-3.0
balihoo-gens/blambda
blambda/who_needs_update.py
1
1418
import argparse import os from .utils.diffs import who_needs_update def main(args=None): parser = argparse.ArgumentParser("list functions that need updating") parser.add_argument('--file', type=str, help='filename to write output to') parser.add_argument('--env', type=str, help='dev or stage or something',...
mit
Yellowen/Owrang
accounts/report/bank_clearance_summary/bank_clearance_summary.py
2
1368
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes import _, msgprint def execute(filters=None): if not filters: filters = {} columns = get_columns() data = get_entries(filters) ...
agpl-3.0
fuchsia-mirror/third_party-grpc
src/python/grpcio/grpc/beta/utilities.py
20
4912
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
zhouzhenghui/python-for-android
python-modules/zope/zope/interface/_flatten.py
50
1112
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
apache-2.0
frouty/odoogoeen
addons/sale_analytic_plans/sale_analytic_plans.py
51
2231
# -*- 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
AnasGhrab/scikit-learn
sklearn/decomposition/online_lda.py
62
25339
""" ============================================================= Online Latent Dirichlet Allocation with variational inference ============================================================= This implementation is modified from Matthew D. Hoffman's onlineldavb code Link: http://www.cs.princeton.edu/~mdhoffma/code/onli...
bsd-3-clause
blacklin/kbengine
kbe/res/scripts/common/Lib/concurrent/futures/thread.py
93
4548
# Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Implements ThreadPoolExecutor.""" __author__ = 'Brian Quinlan (brian@sweetapp.com)' import atexit from concurrent.futures import _base import queue import threading import weakref # Workers are created as daemon...
lgpl-3.0
4shadoww/hakkuframework
core/lib/scapy/plist.py
7
20977
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ PacketList: holds several packets and allows to do operations on them. """ import os,subprocess from .config import...
mit
vpetersson/ansible-modules-core
cloud/docker/docker_image.py
35
7522
#!/usr/bin/python # # (c) 2014, Pavel Antonov <antonov@adwz.ru> # # This file is part of Ansible # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
gpl-3.0
jayBana/InventoryMan
scripts/02-web_collect/03_htmlparser_uktdb.py
1
3683
#!/usr/bin/python3 ''' script that scrapes event date for Capital FM Arena, National Ice Centre, Playhouse and Royal Concert Hall in Nottingham from UKTDB's website ''' import os.path import requests from openpyxl import Workbook from time import strptime, strftime, mktime from datetime import timedelta, datetime fro...
apache-2.0
faun/django_test
tests/regressiontests/delete_regress/tests.py
3
4821
import datetime from django.conf import settings from django.db import backend, connection, transaction, DEFAULT_DB_ALIAS from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from models import Book, Award, AwardNote, Person, Child, Toy, PlayedWith, PlayedWithNote # Can't run this test under S...
bsd-3-clause
sachinpro/sachinpro.github.io
tensorflow/python/ops/control_flow_grad.py
9
7761
# 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
deepakrana47/DT-RAE
text_process1.py
1
12553
# Contraction replacement # For example, "wouldn't" is replaced with "would not" # URLs, email addresses, parenthetical expressions removal # All the URLs, email addresses, and parenthetical expressions (in the cases for abbreviation definition) are removed # Abbreviation normalization # WordNet 2 , (for example,...
apache-2.0
feliperfranca/FelipeRFranca_site
djangoappengine/db/expressions.py
62
1310
from django.db.models.sql.expressions import SQLEvaluator from django.db.models.expressions import ExpressionNode OPERATION_MAP = { ExpressionNode.ADD: lambda x, y: x+y, ExpressionNode.SUB: lambda x, y: x-y, ExpressionNode.MUL: lambda x, y: x*y, ExpressionNode.DIV: lambda x, y: x/y, ExpressionNode...
bsd-3-clause
zoobab/gyp
pylib/gyp/generator/ninja.py
2
88366
# 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. import copy import hashlib import multiprocessing import os.path import re import signal import subprocess import sys import gyp import gyp.common import gyp.msvs_...
bsd-3-clause
stormi/tsunami
src/primaires/combat/combat.py
1
9777
# -*-coding:Utf-8 -* # Copyright (c) 2011 LE GOFF Vincent # 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 # lis...
bsd-3-clause
pabloborrego93/edx-platform
pavelib/i18n.py
16
7625
""" Internationalization tasks """ import re import sys import subprocess from path import Path as path from paver.easy import task, cmdopts, needs, sh from .utils.cmd import django_cmd from .utils.timer import timed try: from pygments.console import colorize except ImportError: colorize = lambda color, tex...
agpl-3.0
diofant/diofant
diofant/core/compatibility.py
1
4608
""" Reimplementations of constructs introduced in later versions of Python than we support. Also some functions that are needed Diofant-wide and are located here for easy import. """ import os import typing from ..external import import_module # These are in here because telling if something is an iterable just by ...
bsd-3-clause
ronfe/shadowsocks
shadowsocks/crypto/table.py
1044
8108
# !/usr/bin/env python # # Copyright 2015 clowwindy # # 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
cuongthai/cuongthai-s-blog
docutils/parsers/rst/languages/cs.py
2
4873
# $Id: cs.py 6460 2010-10-29 22:18:44Z milde $ # Author: Marek Blaha <mb@dat.cz> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for ea...
bsd-3-clause