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
indictranstech/phrerp
erpnext/accounts/doctype/sales_invoice/sales_invoice.py
12
22703
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.utils import cint, cstr, flt from frappe import _, msgprint, throw from erpnext.accounts.party impor...
agpl-3.0
darafferty/factor
factor/scripts/add_subtract_columns.py
3
5447
#! /usr/bin/env python """ Script to add or subtract two columns between one or two MS files """ import argparse from argparse import RawTextHelpFormatter import casacore.tables as pt import numpy as np import sys import os def main(ms1, ms2, column1, column2, column_out, op='add',in_memory=True, use_compression=...
gpl-2.0
umeku/PokemonGo-Map
pogom/pgoapi/auth.py
55
2131
""" pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> 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...
agpl-3.0
paukenba/youtube-dl
youtube_dl/extractor/hypem.py
128
2101
from __future__ import unicode_literals import json import time from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( ExtractorError, ) class HypemIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?hypem\.com/track/(?P<id>[^/]+)/...
unlicense
matburt/ansible
lib/ansible/playbook/taggable.py
37
3441
# (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
WoLpH/CouchPotatoServer
libs/tornado/platform/interface.py
387
2244
#!/usr/bin/env python # # Copyright 2011 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
gpl-3.0
appsembler/edx-platform
lms/djangoapps/email_marketing/tests/test_signals.py
9
33931
"""Tests of email marketing signal handlers.""" import datetime import logging import ddt from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.contrib.sites.models import Site from django.test import TestCase from django.test.client import RequestFactory from freezegun impo...
agpl-3.0
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/status/cmd/devicequery/type_Params.py
1
3783
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: type_Params.py from types import * import array PARAMS_DEVICE_TYPE_USER_SPECIFIC = 0 PARAMS_DEVICE_TYPE_U1394 = 1 PARAMS_DEVICE_TYPE_ADAPTER = 2 PARA...
unlicense
hwroitzsch/BikersLifeSaver
lib/python3.5/site-packages/requests/__init__.py
175
2007
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
mit
endolith/scikit-image
skimage/morphology/watershed.py
29
13277
"""watershed.py - watershed algorithm This module implements a watershed algorithm that apportions pixels into marked basins. The algorithm uses a priority queue to hold the pixels with the metric for the priority queue being pixel value, then the time of entry into the queue - this settles ties in favor of the closes...
bsd-3-clause
pcabido/socorro
socorro/external/postgresql/correlations.py
10
19317
# 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 logging from socorro.external.postgresql.base import PostgreSQLBase from socorro.lib import datetimeutil, extern...
mpl-2.0
darkryder/django
tests/foreign_object/models/article.py
51
3473
from django.db import models from django.db.models.fields.related import ForwardManyToOneDescriptor from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import get_language class ArticleTranslationDescriptor(ForwardManyToOneDescriptor): """ The set of articletranslation ...
bsd-3-clause
bestvibes/neo4j-social-network
env/lib/python2.7/site-packages/flask/wrappers.py
773
6709
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.exce...
mit
metacloud/python-glanceclient
glanceclient/v1/image_members.py
1
3610
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
SnappleCap/oh-mainline
mysite/scripts/vhost_effort.py
15
3514
#!../../bin/python # 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...
agpl-3.0
GraysonP/codecombat-1
scripts/analytics/mixpanelABGemPrompt.py
94
4838
# Calculate gem prompt A/B test results # TODO: Why is no-prompt group 50% larger? import sys from mixpanel import Mixpanel try: import json except ImportError: import simplejson as json # NOTE: mixpanel dates are by day and inclusive # E.g. '2014-12-08' is any date that day, up to 2014-12-09 12am if __nam...
mit
kalectro/pcl_groovy
doc/advanced/content/conf.py
65
4537
# All configuration values have a default; values that are commented out # serve to show the default. import sys, os # -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext...
bsd-3-clause
ghchinoy/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/sigmoid.py
35
1979
# Copyright 2017 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
robinson96/GRAPE
requests/requests/packages/charade/euckrprober.py
206
1717
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Rights Reserved. ...
bsd-3-clause
Juniper/ceilometer
ceilometer/compute/virt/vmware/vsphere_operations.py
1
10191
# Copyright (c) 2014 VMware, 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...
apache-2.0
Kaushikpatnaik/Active-Learning-and-Best-Response-Dynamics
experiments.py
1
8013
import sys from classrooms import * from learners import * from datasets import * from stat_trackers import * from svmutil import * import math #from memory_profiler import profile #from pympler import muppy #from pympler import asizeof #from pympler import summary #from pympler.classtracker import ClassTracker import...
mit
fenggangwu/libzbc
tools/lkvs/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-2-clause
Parbhat/cookiecutter-django-foundation
{{cookiecutter.project_slug}}/manage.py
4
1077
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure tha...
bsd-3-clause
haad/ansible
lib/ansible/utils/module_docs_fragments/azure_tags.py
138
1470
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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, eit...
gpl-3.0
YulongWu/my-utils
yidian/WYLDocFeatureDumpFetcher.py
1
6233
#coding: u8 import sys reload(sys) sys.setdefaultencoding('u8') import urllib import urllib2 import json import traceback import datetime import re # call format: class WYLDocFeatureDumpFetcher(object): serve_url = "http://10.111.0.54:8025/service/feature?docid={0}" #url for doc feature dump serve_url = "h...
mit
dplusic/daff
scripts/python23.py
1
1683
from __future__ import unicode_literals, print_function try: import builtins except: import __builtin__ builtins = __builtin__ import functools if hasattr(builtins,'unicode'): # python2 variant hxunicode = builtins.unicode hxunichr = builtins.unichr hxrange = xrange def hxnext(x): ...
mit
p4r4digm/todo-helper
src/todoLogging.py
1
1872
from src.todoMelvin import settings from datetime import datetime from subprocess import check_output logSender = None class WarningLevels: Debug = {'level' : 0, 'tag' : 'DEBUG'} Info = {'level' : 1, 'tag' : 'INFO'} Warn = {'level' : 2, 'tag' : 'WARNING'} Fatal = {'level' : 3, 'tag' : 'FAT...
mit
jiadaizhao/LeetCode
0001-0100/0005-Longest Palindromic Substring/0005-Longest Palindromic Substring.py
1
1407
class Solution: def longestPalindrome(self, s): """ :type s: str :rtype: str """ n = len(s) maxLen, maxStart = 0, 0 for i in range(n): l, left, right = 1, i - 1, i + 1 while left >= 0 and right < n and s[left] == s[right]: ...
mit
Distrotech/bzr
bzrlib/tests/blackbox/test_mv.py
2
20147
# Copyright (C) 2006-2012 Canonical Ltd # # 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. # # This program is distribute...
gpl-2.0
Peddle/hue
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/__init__.py
104
1992
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
apache-2.0
UniversalMasterEgg8679/ansible
lib/ansible/plugins/action/include_vars.py
31
10761
# (c) 2016, Allen Sanabria <asanabria@linuxdynasty.org> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any l...
gpl-3.0
aio-libs/aiohttp
aiohttp/web_server.py
1
2247
"""Low level HTTP server.""" import asyncio import warnings from typing import Any, Awaitable, Callable, Dict, List, Optional # noqa from .abc import AbstractStreamWriter from .http_parser import RawRequestMessage from .streams import StreamReader from .web_protocol import RequestHandler, _RequestFactory, _RequestHan...
apache-2.0
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/Django-1.6.10/django/views/generic/edit.py
106
8642
import warnings from django.forms import models as model_forms from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.utils.encoding import force_text from django.views.generic.base import TemplateResponseMixin, ContextMixin, View from django.views.generic.deta...
apache-2.0
cdrooom/odoo
addons/stock/tests/test_stock_flow.py
22
70363
# -*- coding: utf-8 -*- from openerp.addons.stock.tests.common import TestStockCommon from openerp.tools import mute_logger, float_round class TestStockFlow(TestStockCommon): @mute_logger('openerp.addons.base.ir.ir_model', 'openerp.models') def test_00_picking_create_and_transfer_quantity(self): """...
agpl-3.0
Alexascet/cmsplugin-filer-teaser
cmsplugin_filer_teaser/migrations/0002_add_teaser_style_choice.py
31
13766
from south.db import db from django.db import models from cmsplugin_filer_teaser.models import * class Migration: def forwards(self, orm): # Adding field 'FilerTeaser.style' db.add_column('cmsplugin_filerteaser', 'style', orm['cmsplugin_filer_teaser.filerteaser:style']) ...
bsd-3-clause
yufengg/tensorflow
tensorflow/contrib/layers/python/layers/utils.py
71
10875
# 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
sztena/DG08_android4.1
scripts/tracing/draw_functrace.py
14676
3560
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
gpl-2.0
aaijazi/vitess
py/vtproto/automation_pb2.py
4
23728
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: automation.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as...
bsd-3-clause
40023256/2015cdag1man
static/Brython3.1.3-20150514-095342/Lib/pprint.py
634
12757
# Author: Fred L. Drake, Jr. # fdrake@acm.org # # This is a simple little module I wrote to make life easier. I didn't # see anything quite like it in the library, though I may have overlooked # something. I wrote this when I was trying to read some heavily nested # tuples with fairly non-desc...
gpl-3.0
Lukas-Stuehrk/selenese
selenese/patterns.py
1
1351
import re from fnmatch import fnmatch class Pattern(object): def __init__(self, pattern_string): self.pattern_string = pattern_string class ExactPattern(Pattern): def compare(self, string): return self.pattern_string == string class RegexPattern(Pattern): def compare(self, string): ...
bsd-3-clause
columbia/qemu
scripts/tracetool/backend/simple.py
57
3099
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple built-in backend. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __em...
gpl-2.0
evangeline97/localwiki-backend-server
localwiki/page_scores/migrations/0003_auto__add_field_pagescore_page_content_length.py
3
4424
# -*- 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 'PageScore.page_content_length' db.add_column(u'page_scores_pagescore', 'page_content_length'...
gpl-2.0
Microvellum/Fluid-Designer
win64-vc/2.78/Python/lib/site-packages/pip/_vendor/progress/spinner.py
510
1314
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
gpl-3.0
aimas/TuniErp-8.0
addons/email_template/tests/test_ir_actions.py
382
2587
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
LIKAIMO/MissionPlanner
Lib/dumbdbm.py
63
9070
"""A dumb and slow but simple dbm clone. For database spam, spam.dir contains the index (a text file), spam.bak *may* contain a backup of the index (also a text file), while spam.dat contains the data (a binary file). XXX TO DO: - seems to contain a bug when updating... - reclaim free space (currently, sp...
gpl-3.0
kirbyherm/root-r-tools
cint/reflex/python/genreflex/genreflex-rootcint.py
8
4844
import sys, os, getopt, genreflex class genreflex_rootcint: def __init__(self): self.dict_filename = 'G__genreflex_rootcint.cxx' self.dict_header = 'G__genreflex_rootcint.h' self.header_files = [] self.pragmas = [] self.sel_classes = [] self.sel_classesT = [] self.gccxml_ppopts = [] ...
lgpl-2.1
ScreamingUdder/mantid
Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/IndirectCylinderAbsorptionTest.py
3
6228
from __future__ import (absolute_import, division, print_function) import unittest from mantid.simpleapi import LoadNexusProcessed, IndirectCylinderAbsorption from mantid.api import * class IndirectCylinderAbsorptionTest(unittest.TestCase): def setUp(self): """ Loads the reduced container and sam...
gpl-3.0
shear/rppy
test_ruger_hti.py
2
2682
# -*- coding: utf-8 -*- """ Created on Mon Aug 3 17:24:04 2015 @author: Sean """ import rppy import numpy as np import matplotlib.pyplot as plt p1 = 2000 vp1 = 3000 vs1 = 1500 e1 = 0.0 d1 = 0.0 y1 = 0.0 p2 = 2200 vp2 = 4000 vs2 = 2000 y2 = 0.1 d2 = 0.1 e2 = 0.1 theta = 30 phi = np.arange(0, 90, 1) phit = np.arra...
bsd-2-clause
clausqr/HTPC-Manager
libs/formencode/doctest_xml_compare.py
11
4073
try: import doctest doctest.OutputChecker except AttributeError: # Python < 2.4 import util.doctest24 as doctest try: import xml.etree.ElementTree as ET except ImportError: import elementtree.ElementTree as ET from xml.parsers.expat import ExpatError as XMLParseError RealOutputChecker = doctest.Out...
mit
labcodes/django
tests/urlpatterns_reverse/views.py
76
1536
from functools import partial, update_wrapper from django.contrib.auth.decorators import user_passes_test from django.http import HttpResponse from django.urls import reverse_lazy from django.views.generic import RedirectView def empty_view(request, *args, **kwargs): return HttpResponse('') def absolute_kwargs...
bsd-3-clause
leighpauls/k2cro4
third_party/python_26/Lib/encodings/utf_16_le.py
860
1037
""" Python 'utf-16-le' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs encode = codecs.utf_16_le_encode def decode(input, errors='strict'): return codecs.utf_16_le_decode(input, errors, True) class IncrementalEncod...
bsd-3-clause
lucacerone/nikola
nikola/plugins/compile/rest/slides.py
9
2466
# -*- coding: utf-8 -*- # Copyright © 2012-2015 Roberto Alsina and others. # 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 t...
mit
andykimpe/chromium-test-npapi
tools/perf/measurements/screenshot_unittest.py
8
1251
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import shutil import tempfile from measurements import screenshot from telemetry.page import page_measurement_unittest_base from telemetry.pa...
bsd-3-clause
kustodian/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
hdinsight/hue
desktop/core/ext-py/Django-1.6.10/tests/validation/models.py
56
4477
from __future__ import unicode_literals from datetime import datetime from django.core.exceptions import ValidationError from django.db import models from django.utils.encoding import python_2_unicode_compatible def validate_answer_to_universe(value): if value != 42: raise ValidationError('This is not t...
apache-2.0
kikkomep/pydoop
pydoop/utils/bridge/jpype_loader.py
3
1879
# BEGIN_COPYRIGHT # # Copyright 2009-2015 CRS4. # # 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
sunshineDrizzle/FreeROI
froi/interface/reg_interface.py
2
17729
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from nibabel.tmpdirs import InTemporaryDirectory from matlab import run_matlab, run_matlab_script import subprocess import os import re import sys import nibabel as nib import numpy as np class RegisterM...
bsd-3-clause
gshORTON/webm.libvpx
test/android/scrape_gtest_log.py
83
1563
# Copyright (c) 2014 The WebM project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project auth...
bsd-3-clause
denisenkom/django
django/contrib/admin/helpers.py
2
13672
from __future__ import unicode_literals from django import forms from django.contrib.admin.util import (flatten_fieldsets, lookup_field, display_for_field, label_for_field, help_text_for_field) from django.contrib.admin.templatetags.admin_static import static from django.contrib.contenttypes.models import ContentT...
bsd-3-clause
jmolloy/pedigree
images/install/disk-contents/libraries/python2.6/binhex.py
59
14828
"""Macintosh binhex compression/decompression. easy interface: binhex(inputfilename, outputfilename) hexbin(inputfilename, outputfilename) """ # # Jack Jansen, CWI, August 1995. # # The module is supposed to be as compatible as possible. Especially the # easy interface should work "as expected" on any platform. # XXX...
isc
muraliselva10/designate
designate/tests/test_api/test_v2/test_limits.py
5
2312
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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/lice...
apache-2.0
vjFaLk/frappe
frappe/core/doctype/communication/email.py
1
19348
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, absolute_import from six.moves import range from six import string_types import frappe import json from email.utils import formataddr from frappe.core.utils import get_parent_doc...
mit
andnovar/ggplot
ggplot/scales/scale_colour_gradient.py
12
2017
from __future__ import (absolute_import, division, print_function, unicode_literals) from .scale import scale from copy import deepcopy import matplotlib.pyplot as plt from matplotlib.colors import LinearSegmentedColormap, rgb2hex, ColorConverter def colors_at_breaks(cmap, breaks=[0, 0.25, 0.5...
bsd-2-clause
apanda/modeling
tests/num_dnode_test.py
1
1303
import z3 from z3 import is_true, is_false from examples import * import time import mcnet.components as components import random import sys """Check time as increase in nodes""" def ResetZ3 (): z3._main_ctx = None z3.main_ctx() z3.set_param('auto_config', False) z3.set_param('smt.mbqi', True) z3.se...
bsd-3-clause
h2oloopan/easymerge
EasyMerge/tests/reddit/scripts/migrate/backfill/subreddit_images.py
1
2325
# The contents of this file are subject to the Common Public Attribution # License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public # License Version 1.1,...
mit
CyberPoint/libpgm
build/lib.linux-x86_64-2.7/libpgm/sampleaggregator.py
4
4785
# Copyright (c) 2012, CyberPoint International, LLC # 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
alivecor/tensorflow
tensorflow/python/keras/preprocessing/__init__.py
38
1061
# 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
lizzha/azure-linux-extensions
RDMAUpdate/main/patch/centosPatching.py
5
2774
#!/usr/bin/python # # Copyright 2015 Microsoft Corporation # # 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 applicabl...
apache-2.0
quoclieu/codebrew17-starving
env/lib/python3.5/site-packages/pyasn1/compat/octets.py
20
1203
# # This file is part of pyasn1 software. # # Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com> # License: http://pyasn1.sf.net/license.html # from sys import version_info if version_info[0] <= 2: int2oct = chr # noinspection PyPep8 ints2octs = lambda s: ''.join([int2oct(x) for x in s]) null = ...
mit
wyoder/pubs
ui/fields.py
1
14935
''' Fields that are used in our UI #.. todo: Make a field specifically for lists ''' from pubs.ui import * import pubs.ui.models as models import pubs.pGraph as pGraph import pubs.pNode as pNode class BaseField(QtWidgets.QWidget): def __init__(self, label, value = None, description = str(), parent = None, attribu...
gpl-3.0
pliniopereira/ccd10
src/ui/projectSettingsWindow/widgetsSite.py
2
1707
from PyQt5 import QtCore from PyQt5 import QtWidgets from src.ui.commons.layout import set_hbox, set_lvbox class WidgetsSite(QtWidgets.QWidget): def __init__(self, parent=None): super(WidgetsSite, self).__init__(parent) # Creating Labels self.lPName = QtWidgets.QLabel("Project Name:", se...
gpl-3.0
tpsatish95/Python-Workshop
Python Environment Setup/Alternate/1. Python/1. Installer/Python-3.4.0(Linux)/Lib/tkinter/test/test_tkinter/test_text.py
12
1479
import unittest import tkinter from test.support import requires, run_unittest from tkinter.ttk import setup_master requires('gui') class TextTest(unittest.TestCase): def setUp(self): self.root = setup_master() self.text = tkinter.Text(self.root) def tearDown(self): self.text.destroy...
apache-2.0
cea-sec/miasm
test/test_all.py
2
37090
#! /usr/bin/env python2 from __future__ import print_function from builtins import map from builtins import range import argparse from distutils.spawn import find_executable import os import platform import time import tempfile import platform from utils.test import Test from utils.testset import TestSet from utils i...
gpl-2.0
ttsubo/ryu
ryu/app/simple_switch_13.py
21
4742
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
john-wang-metro/metro-openerp
multi_image/product.py
2
1417
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # Copyright (C) 2011-2013 Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>). # This program is fre...
agpl-3.0
MC911-MV-1s2016/lya-compiler-python
ply-3.8/test/yacc_badtok.py
174
1535
# ----------------------------------------------------------------------------- # yacc_badtok.py # # A grammar, but tokens is a bad datatype # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc tokens = "Hel...
bsd-3-clause
admcrae/tensorflow
tensorflow/contrib/keras/python/keras/applications/xception.py
31
12268
# 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
ferabra/edx-platform
common/lib/xmodule/xmodule/modulestore/tests/test_assetstore.py
91
34712
""" Tests for assetstore using any of the modulestores for metadata. May extend to testing the storage options too. """ from datetime import datetime, timedelta import ddt from nose.plugins.attrib import attr import pytz import unittest from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import Cou...
agpl-3.0
darionyaphet/spark
examples/src/main/python/mllib/isotonic_regression_example.py
28
2380
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
Eivindbergman/Skrapa
libs/pkg_resources/_vendor/packaging/_structures.py
1152
1416
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function class Infinity(object): def __repr__(self): return "Infinity...
gpl-3.0
cdek11/PLS
Code/PLS_Algorithm_Optimized.py
2
5817
# coding: utf-8 # In[2]: # Code to implement the optimized version of the PLS Algorithm import pandas as pd import numpy as np import numba from numba import jit @jit def mean_center_scale(dataframe): '''Scale dataframe by subtracting mean and dividing by standard deviation''' dataframe = dataframe - dataf...
mit
vipul-sharma20/oh-mainline
vendor/packages/Django/django/contrib/localflavor/mx/forms.py
103
8998
# -*- coding: utf-8 -*- """ Mexican-specific form helpers. """ from __future__ import unicode_literals import re from django.forms import ValidationError from django.forms.fields import Select, RegexField from django.utils import six from django.utils.translation import ugettext_lazy as _ from django.core.validators i...
agpl-3.0
hasteur/pywikibot_minimal
families/battlestarwiki_family.py
4
1813
# -*- coding: utf-8 -*- __version__ = '$Id: 229dfff10587bfed66fee6e6ebeb582f3286beb6 $' import family # The Battlestar Wiki family, a set of Battlestar wikis. # http://battlestarwiki.org/ class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'battlestarwiki' ...
gpl-3.0
pankajp/pyface
pyface/ui/qt4/tasks/editor_area_pane.py
2
8571
# Standard library imports. import sys # Enthought library imports. from pyface.tasks.i_editor_area_pane import IEditorAreaPane, \ MEditorAreaPane from traits.api import on_trait_change, provides # System library imports. from pyface.qt import QtCore, QtGui # Local imports. from task_pane import TaskPane from ut...
bsd-3-clause
migonzalvar/threaded-launcher
watchdog.py
1
1246
#!/bin/env python3.4 from threading import Thread import os import subprocess import time def watchdog(): """Launch all the scripts in a folder and wait until completion.""" scripts_processes = [] base_dir = os.path.join(os.path.dirname(__file__), 'modules') # Launch scripts for script in os.lis...
mit
joelddiaz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.4.40/roles/lib_openshift/library/oc_secret.py
12
57672
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
zhukaixy/kbengine
kbe/src/lib/python/Lib/site.py
61
21163
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** This will append site-specific paths to the module sear...
lgpl-3.0
d40223223/w16b_test
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/draw.py
603
6456
from javascript import console from browser import timer import math class Queue: def __init__(self): self._list=[] def empty(self): return len(self._list) == 0 def put(self, element): self._list.append(element) def get(self): if len(self._list) == 0: raise BaseError ...
gpl-3.0
richard-willowit/sale-workflow
sale_reason_to_export/models/sale_reason_to_export.py
34
1269
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2015 JPJ # ( http://www.savoirfairelinux.com). # # This program is free software: you can redistribute it and/or modify # it under...
agpl-3.0
tridge/MAVProxy
MAVProxy/modules/mavproxy_fieldcheck/__init__.py
5
17862
#!/usr/bin/env python ''' CMAC mission control Peter Barker based on CUAV mission control Andrew Tridgell TODO: - ensure parameters are correct - add check that battery is within tolerances (chemistry issues...) - autodetect numcells being incorrect ''' import math import os import time from MAVProxy.modules.li...
gpl-3.0
sorki/faf
src/pyfaf/bugtrackers/bugzilla.py
1
23495
# Copyright (C) 2013 ABRT Team # Copyright (C) 2013 Red Hat, Inc. # # This file is part of faf. # # faf 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
inn1983/xbmca10-empatzero
tools/EventClients/lib/python/xbmcclient.py
57
22933
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008-2009 Team XBMC http://www.xbmc.org # # 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 #...
gpl-2.0
ejeschke/ginga
ginga/opengl/Camera.py
3
11530
# # Camera.py -- Ginga 3D viewer OpenGL camera # # Credit: # Modified from code written by M. McGuffin # http://profs.etsmtl.ca/mmcguffin/code/python/example-3D_Python-Qt-OpenGL/ # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy as np from ...
bsd-3-clause
HyperBaton/ansible
lib/ansible/modules/network/onyx/onyx_ntp_servers_peers.py
9
11138
#!/usr/bin/python # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
gylian/headphones
lib/beets/plugins.py
7
11199
# This file is part of beets. # Copyright 2013, 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, ...
gpl-3.0
vathpela/linux-esrt
tools/perf/util/setup.py
989
1543
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
adeverteuil/backup
backup/config.py
1
9546
# Alexandre's backup script # Copyright © 2014 Alexandre A. de Verteuil # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
gpl-3.0
lkuza2/android_kernel_lge_geehrc
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
mfsteen/CIQTranslate-Kristian
openpyxl/comments/reader.py
1
1558
from __future__ import absolute_import # Copyright (c) 2010-2016 openpyxl import os.path from openpyxl.comments import Comment from openpyxl.xml.constants import ( PACKAGE_WORKSHEET_RELS, COMMENTS_NS, PACKAGE_XL, ) from openpyxl.xml.functions import fromstring from .properties import CommentSheet ...
gpl-3.0
quasiben/bokeh
bokeh/tests/test_document.py
3
32276
from __future__ import absolute_import, print_function import pytest import unittest from copy import copy import bokeh.document as document from bokeh.io import curdoc from bokeh.model import Model from bokeh.models import ColumnDataSource from bokeh.core.properties import Int, Instance, String, DistanceSpec class...
bsd-3-clause