repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
areski/django
refs/heads/master
django/db/backends/postgresql_psycopg2/introspection.py
465
from ..postgresql.introspection import * # NOQA
aleisalem/Aion
refs/heads/master
data_generation/collection/playStoreCrawler.py
1
#!/usr/bin/python # Python modules import sys, os, shutil, glob, io # Aion modules from Aion.utils.graphics import * from Aion.utils.data import * from Aion.shared.App import App # Third-party modules from googleplay_api.googleplay import GooglePlayAPI class PlayStoreCrawler: def __init__(self): try: ...
wd5/jangr
refs/heads/master
allauth/facebook/migrations/0002_auto__add_facebookaccesstoken__add_unique_facebookaccesstoken_app_acco.py
7
# 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 'FacebookAccessToken' db.create_table('facebook_facebookaccesstoken', ( ('id', ...
loafbaker/django_ecommerce2
refs/heads/master
products/models.py
1
from __future__ import unicode_literals from django.db import models from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django.utils.text import slugify import uuid # Create your models here. class ProductQuerySet(models.query.QuerySet): def active(self): retu...
jensBrunel/TestRepo
refs/heads/master
gmock/gtest/test/gtest_help_test.py
2968
#!/usr/bin/env python # # Copyright 2009, 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...
max-arnold/uwsgi-backports
refs/heads/master
plugins/sqlite3/uwsgiplugin.py
13
NAME='sqlite3' CFLAGS = [] LDFLAGS = [] LIBS = ['-lsqlite3'] GCC_LIST = ['plugin']
jlspyaozhongkai/Uter
refs/heads/master
third_party_backup/Python-2.7.9/Lib/calendar.py
56
"""Calendar printing functions Note when comparing these calendars to the ones printed by cal(1): By default, these calendars have Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week (0=Monday, 6=Sunday).""" import sys import da...
vbalderdash/LMAsimulation
refs/heads/master
simulation_functions.py
1
###################################################### # Various functions for LMA simulations # # The black_box function is the main driver function # # Contact: # vanna.chmielewski@noaa.gov # # # This model and its results have been submitted to the Journal of Geophysical Research. # Please cite: # V. C. Chmielewski...
patmarion/libbot
refs/heads/master
bot2-procman/python/src/bot_procman/signal_slot.py
19
""" A signal/slot implementation File: signal.py Author: Thiago Marcos P. Santos Author: Christopher S. Case Author: David H. Bronke Created: August 28, 2008 Updated: December 12, 2011 License: MIT """ from __future__ import print_function import inspect from weakref import WeakSet, WeakKeyDictionary class Si...
mlperf/training_results_v0.7
refs/heads/master
Fujitsu/benchmarks/resnet/implementations/implementation_open/mlperf_implementations/symbols/resnet-v1b-normconv-fl.py
2
# 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 u...
jhona22baz/blog-flask
refs/heads/master
python2.7/lib/python2.7/site-packages/openid/oidutil.py
143
"""This module contains general utility code that is used throughout the library. For users of this library, the C{L{log}} function is probably the most interesting. """ __all__ = ['log', 'appendArgs', 'toBase64', 'fromBase64', 'autoSubmitHTML'] import binascii import sys import urlparse from urllib import urlencod...
gptech/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_vpc.py
49
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it an/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
kressi/erpnext
refs/heads/develop
erpnext/patches/v7_2/update_doctype_status.py
50
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): doctypes = ["Opportunity", "Quotation", "Sales Order", "Sales Invoice", "Purchase Invoice", "Purchase Order", "Delivery N...
Tehnix/slight
refs/heads/master
irc/ircbot.py
1
#!/usr/bin/env python """ A very simple IRC bot that will join the servers and channels specified, and then send out whatever is in the message queue, to the channels. It can also parse input received from the channels, and execute commands based on that. """ import socket import threading import Queue import ssl imp...
kkdg/python-jogging
refs/heads/master
02/0210/p.py
1
class Parent: def myMethod(self): print "Me parent" class Child(Parent): def myMethod(self): print "Me child" c = Child() c.myMethod()
sio2project/oioioi
refs/heads/master
oioioi/maintenancemode/middleware.py
1
import re from django.conf import settings from django.http import HttpResponseRedirect from oioioi.maintenancemode.models import is_maintenance_mode_enabled class MaintenanceModeMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): ...
daniellerch/mimic
refs/heads/master
language/es/greetings.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import language.es.pattern_utils as pattern_utils from random import randint from pattern.es import parsetree # {{{ process() def process(sentence): t = parsetree(sentence, lemmata=True) greeting=t.string.strip() greeting_list_q=["hola", "buenas"] greeting_l...
gregdek/ansible
refs/heads/devel
hacking/get_library.py
89
#!/usr/bin/env python # (c) 2014, Will Thames <will@thames.id.au> # # 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 op...
40223245/2015cdb_g6-team1
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/tarfile.py
728
#!/usr/bin/env python3 #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any pers...
jnatkins/incubator-spot
refs/heads/master
spot-oa/oa/components/data/__init__.py
165
# # 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...
pyxll/pyxll-examples
refs/heads/master
qtgraphics/optimize5.py
1
""" Optimisation example using scipy.optimize.minimize. Extended to query the user for input and output cells. This code accompanies the blog post https://www.pyxll.com/blog/extending-the-excel-user-interface/ """ import sys from functools import partial from pyxll import xl_app, xl_menu from win32com.client impor...
cubicova17/annet
refs/heads/master
venv/lib/python2.7/site-packages/django/utils/2to3_fixes/fix_unicode.py
349
"""Fixer for __unicode__ methods. Uses the django.utils.encoding.python_2_unicode_compatible decorator. """ from __future__ import unicode_literals from lib2to3 import fixer_base from lib2to3.fixer_util import find_indentation, Name, syms, touch_import from lib2to3.pgen2 import token from lib2to3.pytree import Leaf,...
juanyaw/python
refs/heads/develop
cpython/Lib/test/test_string.py
6
import unittest, string class ModuleTest(unittest.TestCase): def test_attrs(self): # While the exact order of the items in these attributes is not # technically part of the "language spec", in practice there is almost # certainly user code that depends on the order, so de-facto it *is* ...
qrkourier/ansible
refs/heads/devel
lib/ansible/module_utils/facts/ansible_collector.py
42
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
kalahbrown/HueBigSQL
refs/heads/master
apps/sqoop/src/sqoop/forms.py
1198
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
classam/threepanel
refs/heads/continuous
threepanel/dashboard/tasks.py
1
from __future__ import absolute_import from celery import shared_task @shared_task def heartbeat(): print("thumpa thumpa")
jesramirez/odoo
refs/heads/8.0
openerp/addons/base/ir/ir_rule.py
312
# -*- 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...
Plexxi/st2
refs/heads/master
st2common/tests/unit/test_dist_utils.py
3
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme 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 ...
ThiagoGarciaAlves/intellij-community
refs/heads/master
python/testData/highlighting/unicodeOrByte26future.py
83
from __future__ import unicode_literals z = ( <info descr="null">"simple"</info> <info descr="null">"escaped <info descr="null">\u1234</info> correct"</info> <info descr="null">"escaped <error descr="Invalid escape sequence">\u123z</error> incorrect"</info> <info descr="null">"escaped <info descr="null...
quasiben/bokeh
refs/heads/master
bokeh/charts/builders/step_builder.py
9
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the Step class which lets you build your Step charts just passing the arguments to the Chart class and calling the proper functions. """ # ----------------------------------------------------------------...
GiladE/birde
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/humanize/templatetags/humanize.py
78
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import re from datetime import date, datetime from decimal import Decimal from django import template from django.conf import settings from django.template import defaultfilters from django.utils.encoding import force_text from django.utils.formats imp...
Pexego/odoo
refs/heads/master
addons/pad_project/project_task.py
433
# -*- coding: utf-8 -*- from openerp.tools.translate import _ from openerp.osv import fields, osv class task(osv.osv): _name = "project.task" _inherit = ["project.task",'pad.common'] _columns = { 'description_pad': fields.char('Description PAD', pad_content_field='description') }
brittanystoroz/kitsune
refs/heads/master
kitsune/users/tests/__init__.py
5
from django.contrib.auth.models import User, Permission, Group from django.contrib.contenttypes.models import ContentType import factory from kitsune.sumo.tests import FuzzyUnicode, LocalizingClient, TestCase from kitsune.users.models import Profile, Setting class TestCaseBase(TestCase): """Base TestCase for th...
msebire/intellij-community
refs/heads/master
python/testData/refactoring/extractmethod/CommentIncluded.after.py
79
def baz(): tmp = "!" # try to extract this assignment, either with or without this comment baz() def bar(self): pass
cyril51/Sick-Beard
refs/heads/development
sickbeard/metadata/mediabrowser.py
44
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
telwertowski/Books-Mac-OS-X
refs/heads/master
Versions/Books_3.0b5/Library of Congress.plugin/Contents/Resources/script.py
8
#!/usr/bin/python from PyZ3950 import zoom from PyZ3950.zmarc import * from xml.dom.minidom import Document, parseString, parse import string import sys def getMarcValues (record, dataField, subField): values = [] m = MARC8_to_Unicode () try: for df in record.fields[dataField]: items = [] if (subFi...
40223121/w17
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/token.py
743
"""Token constants (from "token.h").""" __all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF'] # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # ./pyth...
alx-eu/django
refs/heads/stable/1.5.x
tests/modeltests/generic_relations/tests.py
53
from __future__ import absolute_import, unicode_literals from django import forms from django.contrib.contenttypes.generic import generic_inlineformset_factory from django.contrib.contenttypes.models import ContentType from django.test import TestCase from .models import (TaggedItem, ValuableTaggedItem, Comparison, A...
scrapinghub/keystone
refs/heads/master
keystone/tests/default_fixtures.py
10
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
robmagee/django-auditlog
refs/heads/master
src/auditlog/diff.py
2
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.db.models import Model, NOT_PROVIDED from django.utils.encoding import smart_text def track_field(field): """ Returns whether the given field should be tracked by Auditlog. Untracked fields are many...
freedesktop-unofficial-mirror/ModemManager__ModemManager
refs/heads/master
decode/defs.py
12
#!/usr/bin/python # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # 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 ...
orgkhnargh/AssignRandomAppearances
refs/heads/master
AssignRandomAppearances/AssignRandomAppearances.py
1
#Author-Dmytro Kyrychuk #Description-Assign random appearance to each body. # Copyright (C) 2015 Dmytro Kyrychuk # # This source file is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 2 # as published by the Free Software Foundation. # # This program...
q474818917/solr-5.2.0
refs/heads/master
dev-tools/scripts/addVersion.py
4
# 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 ...
hansomesong/TracesAnalyzer
refs/heads/master
20160218Tasks/inconsistence_counter_by_MR.py
1
# -*- coding: utf-8 -*- __author__ = 'yueli' from resolver_comparator import * import numpy as np if __name__ == "__main__": logging.basicConfig(filename=os.path.join(os.getcwd(), os.path.basename(__file__).split(".")[0]+'execution_log.txt'), level=logging.DEBUG, ...
tushar7795/MicroBlog
refs/heads/master
flask/lib/python2.7/site-packages/flask/testsuite/test_apps/main_app.py
614
import flask # Test Flask initialization with main module. app = flask.Flask('__main__')
ScreamingUdder/mantid
refs/heads/master
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSPatchSensitivity.py
3
# pylint: disable=no-init,invalid-name,bare-except from __future__ import (absolute_import, division, print_function) import mantid.simpleapi as api from mantid.api import * from mantid.kernel import * import numpy as np class SANSPatchSensitivity(PythonAlgorithm): """ Calculate the detector sensitivity an...
jhsenjaliya/incubator-airflow
refs/heads/master
tests/dags/test_mark_success.py
16
# -*- coding: utf-8 -*- # # 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 ...
ganeshkoilada/libforensics
refs/heads/master
code/lf/fs/ntfs/structs.py
13
# Copyright 2009 Michael Murr # # This file is part of LibForensics. # # LibForensics 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 ver...
was4444/chromium.src
refs/heads/nw15
tools/perf/benchmarks/tracing.py
5
# Copyright 2016 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 core import perf_benchmark from telemetry.web_perf import timeline_based_measurement import page_sets class TracingWithDebugOverhead(perf_benchmark....
philipn/sycamore
refs/heads/master
Sycamore/support/pytz/zoneinfo/America/Lima.py
9
'''tzinfo timezone information for America/Lima.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Lima(DstTzInfo): '''America/Lima timezone definition. See datetime.tzinfo for details''' zone = 'America/Lima' _utc_tra...
google-code-export/pyglet
refs/heads/master
tests/image/PIL_RGBA_LOAD.py
32
#!/usr/bin/env python '''Test RGBA load using PIL. You should see the rgba.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest import base_load from pyglet.image.codecs.pil import * class TEST_PIL_RGBA_LOAD(base_load.TestLoad): te...
Babo96/ptc-captcha-solver
refs/heads/master
pikapy/console.py
1
import argparse import sys import pikapy from pikapy.ptcexceptions import * from pgoapi import PGoApi from pgoapi.utilities import f2i from pgoapi import utilities as util from pgoapi.exceptions import AuthException, ServerSideRequestThrottlingException import pprint import time import threading import getopt import ...
teto/ns-3-dev-git
refs/heads/master
src/aodv/bindings/modulegen__gcc_ILP32.py
2
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
conan-io/conan
refs/heads/develop
conans/model/conanfile_interface.py
1
from conans.client.graph.graph import CONTEXT_BUILD class ConanFileInterface: """ this is just a protective wrapper to give consumers a limited view of conanfile dependencies, "read" only, and only to some attributes, not methods """ def __str__(self): return str(self._conanfile) def ...
richlewis42/scikit-chem
refs/heads/master
skchem/data/converters/physprop.py
1
#! /usr/bin/env python # # Copyright (C) 2016 Rich Lewis <rl403@cam.ac.uk> # License: 3-clause BSD import os import zipfile import logging LOGGER = logging.getLogger(__name__) import pandas as pd import numpy as np from ... import io from .base import Converter, contiguous_order from ...cross_validation import SimT...
burzillibus/RobHome
refs/heads/master
venv/lib/python2.7/site-packages/jinja2/_compat.py
214
# -*- coding: utf-8 -*- """ jinja2._compat ~~~~~~~~~~~~~~ Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. :copyright: Copyright 2013 by the Jinja team, see AUTHORS. :license: BSD, see LICENSE for details. ""...
elba7r/system
refs/heads/master
erpnext/patches/v7_0/remove_old_earning_deduction_doctypes.py
54
# 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 def execute(): if frappe.db.exists("DocType", "Salary Component"): for dt in ("Salary Structure Earning", "Salary Structure Deducti...
thomasrogers03/phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/test/home_dot_gyp/gyptest-home-includes-regyp.py
151
#!/usr/bin/env python # Copyright (c) 2009 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 inclusion of $HOME/.gyp/includes.gypi works properly with relocation and with regeneration. """ import os import TestGyp # Re...
shoelzer/buildbot
refs/heads/master
master/buildbot/reporters/stash.py
6
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
40123112/w17exam
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_markupbase.py
891
"""Shared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the html.parser module. It has no documented public API and should not be used directly. """ import re _declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match _declstringlit_match = re.com...
virneo/nupic
refs/heads/master
examples/network/temporal_anomaly_network_demo.py
31
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
BorisJeremic/Real-ESSI-Examples
refs/heads/master
analytic_solution/test_cases/27NodeBrick/cantilever_different_element_number/NumberOfElement6/compare_HDF5_Displacement_Output.py
402
#!/usr/bin/python import h5py import sys import numpy as np import os import re import random # find the path to my own python function: cur_dir=os.getcwd() sep='test_cases' test_DIR=cur_dir.split(sep,1)[0] scriptDIR=test_DIR+'compare_function' sys.path.append(scriptDIR) # import my own function for color and comparat...
CKehl/pylearn2
refs/heads/master
pylearn2/config/yaml_parse.py
37
"""Support code for YAML parsing of experiment descriptions.""" import yaml from pylearn2.utils import serial from pylearn2.utils.exc import reraise_as from pylearn2.utils.string_utils import preprocess from pylearn2.utils.call_check import checked_call from pylearn2.utils.string_utils import match from collections imp...
thecut/thecut-googleanalytics
refs/heads/master
thecut/googleanalytics/south_migrations/0007_rename_display_advertiser_support.py
1
# -*- 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): db.rename_column('googleanalytics_profile', 'display_adv...
grilo/ansible-1
refs/heads/devel
lib/ansible/modules/cloud/webfaction/webfaction_db.py
29
#!/usr/bin/python # # (c) Quentin Stafford-Fraser 2015, with contributions gratefully acknowledged from: # * Andy Baker # * Federico Tarantini # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # Create a webfaction database using Ansible and the Webfaction API fro...
openstack/vitrage
refs/heads/master
vitrage/tests/unit/datasources/zabbix/test_zabbix_configuration.py
1
# Copyright 2016 - Nokia # # 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, sof...
bmya/odoo-support
refs/heads/8.0
web_support_client_issue/__init__.py
2
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from . import models from . import wizard # vim:ex...
camilonos77/bootstrap-form-python-generator
refs/heads/master
enviroment/lib/python2.7/site-packages/setuptools/tests/test_dist_info.py
452
"""Test .dist-info style distributions. """ import os import shutil import tempfile import unittest import textwrap try: import ast except: pass import pkg_resources from setuptools.tests.py26compat import skipIf def DALS(s): "dedent and left-strip" return textwrap.dedent(s).lstrip() class TestDist...
jacksonwilliams/arsenalsuite
refs/heads/master
cpp/lib/PyQt4/examples/designer/plugins/widgets/highlightedtextedit.py
20
#!/usr/bin/env python """ highlightedtextedit.py A PyQt custom widget example for Qt Designer. Copyright (C) 2006 David Boddie <david@boddie.org.uk> Copyright (C) 2005-2006 Trolltech ASA. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General ...
apache/airflow
refs/heads/main
tests/core/test_config_templates.py
3
# 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 u...
APTrust/EarthDiver
refs/heads/master
dpnode/dpn/data/migrations/0005_remove_node_me.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('data', '0004_node_last_pull_date'), ] operations = [ migrations.RemoveField( model_name='node', name...
XXMrHyde/android_external_chromium_org
refs/heads/darkkat-4.4
tools/crx_id/__init__.py
141
# Copyright (c) 2011 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. '''Module crx_id ''' pass
Grumpy-Mike/Mikes-Pi-Bakery
refs/heads/master
Infinity_Mirror/mirror1.py
1
# Magic mirror display # By Mike Cook - January 2016 import time, os, random import wiringpi2 as io from neopixel import * random.seed() DATA_PIN = 18 # pin connected to the NeoPixels NUM_PIXELS = 16 # number of LEDs in the spiral try : io.wiringPiSetupGpio() except : print"start IDLE with 'gksudo idle' from ...
apporc/neutron
refs/heads/master
neutron/tests/unit/objects/qos/test_policy.py
2
# 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 # d...
mdanielwork/intellij-community
refs/heads/master
python/helpers/coveragepy/coverage/control.py
39
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Core control stuff for coverage.py.""" import atexit import inspect import os import platform import re import sys import traceback from coverage import env, f...
isabernardes/Heriga
refs/heads/master
Herigaenv/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_static.py
539
from django.apps import apps from django.template import Library register = Library() _static = None @register.simple_tag def static(path): global _static if _static is None: if apps.is_installed('django.contrib.staticfiles'): from django.contrib.staticfiles.templatetags.staticfiles impo...
llqgit/pi
refs/heads/master
python-server/motor.py
1
#!/usr/bin/env python # -*- coding:utf-8 -*- from RPi import GPIO from time import sleep import val s1 = 24 # up s2 = 23 # left GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(s1, GPIO.OUT) GPIO.setup(s2, GPIO.OUT) p1 = GPIO.PWM(s1, 50) # 50HZ p2 = GPIO.PWM(s2, 50) # 50HZ p1.start(0) p2.start(0) sleep...
xiongmaoshouzha/test
refs/heads/master
jeewx/src/main/webapp/plug-in/OpenLayers-2.11/tools/exampleparser.py
111
#!/usr/bin/env python import sys import os import re import urllib2 import time from xml.dom.minidom import Document try: import xml.etree.ElementTree as ElementTree except ImportError: try: import cElementTree as ElementTree except ImportError: try: import elementtree.Element...
ulif/pulp
refs/heads/master
bindings/test/unit/test_server.py
1
""" This module contains tests for the pulp.bindings.server module. """ import locale import logging import unittest from M2Crypto import m2, SSL import mock from pulp.bindings import exceptions, server from pulp.common.constants import DEFAULT_CA_PATH_LIST class TestHTTPSServerWrapper(unittest.TestCase): """ ...
ryanbagwell/django-cms-nivo-slider
refs/heads/master
nivoslider/models.py
1
from django.db import models from filer.fields.image import FilerImageField from filer.fields.file import FilerFileField from filer.fields.folder import FilerFolderField from cms.models.pluginmodel import CMSPlugin class Slider(models.Model): image = FilerImageField(null=True, blank=True) url = models.URLField...
hjoliver/cylc
refs/heads/master
cylc/flow/data_messages_pb2.py
1
# type: ignore # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: data_messages.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflectio...
seem-sky/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_tracemalloc.py
60
import contextlib import os import sys import tracemalloc import unittest from unittest.mock import patch from test.script_helper import assert_python_ok, assert_python_failure from test import support try: import threading except ImportError: threading = None EMPTY_STRING_SIZE = sys.getsizeof(b'') def get_fr...
pwendell/mesos
refs/heads/trunk
third_party/protobuf-2.3.0/python/google/protobuf/internal/containers.py
43
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
mgiraldo/nypl-warper
refs/heads/master
public/javascripts/openlayers/2.8/OpenLayers-2.8/tests/selenium/remotecontrol/selenium.py
254
""" Copyright 2006 ThoughtWorks, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
laslabs/odoo
refs/heads/9.0
addons/website_mass_mailing/controllers/__init__.py
4497
# -*- coding: utf-8 -*- import main
oktie/linkedct
refs/heads/master
ctdjango/chardet/langgreekmodel.py
235
######################## 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 Rights R...
junkoda/mockgallib
refs/heads/master
test/test_hod.py
1
import unittest import mockgallib as mock class TestGrowth(unittest.TestCase): def setUp(self): mock.set_loglevel(3) mock.cosmology_set(0.31) self.hod = mock.Hod() self.n = len(self.hod) self.c = [12.0, 0.5, 0.1, 0.05, 0.95, 0.12, 13.0, 1.0, 1.5, 0.15] for i,c in enu...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/test/test_eof.py
45
"""test script for a few new invalid token catches""" import unittest from test import test_support class EOFTestCase(unittest.TestCase): def test_EOFC(self): expect = "EOL while scanning string literal (<string>, line 1)" try: eval("""'this is a test\ """) except S...
yize/grunt-tps
refs/heads/master
tasks/lib/python/Lib/python2.7/test/test_whichdb.py
92
#! /usr/bin/env python """Test script for the whichdb module based on test_anydbm.py """ import os import test.test_support import unittest import whichdb import glob _fname = test.test_support.TESTFN # Silence Py3k warning anydbm = test.test_support.import_module('anydbm', deprecated=True) def _delete_files(): ...
Semi-global/edx-platform
refs/heads/master
lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py
120
"""Management command for re-submitting certificates with an error status. Certificates may have "error" status for a variety of reasons, but the most likely is that the course was misconfigured in the certificates worker. This management command identifies certificate tasks that have an error status and re-resubmits...
alex4108/scLikesDownloader
refs/heads/master
requests/packages/chardet/sbcharsetprober.py
2926
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
alxgu/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/ansible_tower/tower_send.py
17
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, John Westcott IV <john.westcott.iv@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': ...
openstates/billy
refs/heads/master
billy/web/api/tests/test_legislators.py
4
from .base import BaseTestCase class LegislatorsSearchTestCase(BaseTestCase): url_tmpl = '/api/v1/legislators/' data = dict(state='ex', active=True) def test_count(self): self.assertEquals( len(self.json), self.db.legislators.find(self.data).count()) def test_correct...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/nbformat/notebooknode.py
11
"""NotebookNode - adding attribute access to dicts""" from ipython_genutils.ipstruct import Struct class NotebookNode(Struct): """A dict-like node with attribute-access""" pass def from_dict(d): """Convert dict to dict-like NotebookNode Recursively converts any dict in the container to a Noteboo...
techtonik/warehouse
refs/heads/master
warehouse/migrations/versions/8f38eea7678_remove_the_download_statistics.py
1
# Copyright 2013 Donald Stufft # # 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...
mgriley/diva
refs/heads/master
examples/demo_server/demo_server.py
1
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import pandas as pd from datetime import datetime from diva import Diva, Dashboard, row_layout from diva.widgets import * from bokeh.plotting import figure from functools import singledispatch reporter = Diva() @singledispatch ...
jeremyh/eo-datasets
refs/heads/eodatasets3
eodatasets3/_version.py
2
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains th...
saurabh6790/omnitech-apps
refs/heads/master
patches/january_2013/update_fraction_for_usd.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt def execute(): import webnotes webnotes.conn.sql("""update `tabCurrency` set fraction = 'Cent' where fraction = 'Cent[D]'""")
odoo-arg/odoo_l10n_ar
refs/heads/master
l10n_ar_vat_diary/tests/test_invoice.py
1
# - coding: utf-8 -*- ############################################################################## # # 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 # ...
anti1869/sunhead
refs/heads/master
src/sunhead/events/types.py
1
""" Types to use in messaging stuff. """ from typing import TypeVar, Dict, List Transferrable = TypeVar("Transferrable", Dict, List, str) Serialized = TypeVar("Serialized", str, bytes)