repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
171121130/SWI
refs/heads/master
venv/Lib/site-packages/xlrd/sheet.py
27
# -*- coding: cp1252 -*- ## # <p> Portions copyright © 2005-2013 Stephen John Machin, Lingfo Pty Ltd</p> # <p>This module is part of the xlrd package, which is released under a BSD-style licence.</p> ## # 2010-04-25 SJM fix zoom factors cooking logic # 2010-04-15 CW r4253 fix zoom factors cooking logic # 2010-04-09 ...
kingvuplus/nn-gui
refs/heads/master
lib/python/Components/ConditionalWidget.py
33
from GUIComponent import GUIComponent from enigma import eTimer class ConditionalWidget(GUIComponent): def __init__(self, withTimer = True): GUIComponent.__init__(self) self.setConnect(None) if (withTimer): self.conditionCheckTimer = eTimer() self.conditionCheckTimer.callback.append(self.update) ...
acetcom/cellwire
refs/heads/master
lib/pfcp/support/cache/tlv-msg-list.py
2
msg_list["PFCP Heartbeat Request"] = { "type" : "1" } msg_list["PFCP Heartbeat Response"] = { "type" : "2" } msg_list["PFCP PFD Management Request"] = { "type" : "3" } msg_list["PFCP PFD Management Response"] = { "type" : "4" } msg_list["PFCP Association Setup Request"] = { "type" : "5" } msg_list["PFCP Association Set...
MarcosCommunity/odoo
refs/heads/marcos-8.0
addons/warning/warning.py
243
# -*- 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...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/tangible/deed/event_perk/shared_technical_chest_deed.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/deed/event_perk/shared_technical_chest_deed.iff" result.attribute_t...
Masood-M/yalih
refs/heads/master
jsbeautifier/jsbeautifier/unpackers/myobfuscate.py
2
# # deobfuscator for scripts messed up with myobfuscate.com # by Einar Lielmanis <[email protected]> # # written by Stefano Sanfilippo <[email protected]> # # usage: # # if detect(some_string): # unpacked = unpack(some_string) # # CAVEAT by Einar Lielmanis # # You really don't want to obfuscate your ...
c0defreak/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/idlelib/configHelpSourceEdit.py
67
"Dialog to specify or edit the parameters for a user configured help source." import os import sys from tkinter import * import tkinter.messagebox as tkMessageBox import tkinter.filedialog as tkFileDialog class GetHelpSourceDialog(Toplevel): def __init__(self, parent, title, menuItem='', filePath=''): ""...
jiangzhuo/kbengine
refs/heads/master
kbe/src/lib/python/Doc/includes/setup.py
138
from distutils.core import setup, Extension setup(name="noddy", version="1.0", ext_modules=[ Extension("noddy", ["noddy.c"]), Extension("noddy2", ["noddy2.c"]), Extension("noddy3", ["noddy3.c"]), Extension("noddy4", ["noddy4.c"]), ])
openhealthcare/randomise.me
refs/heads/master
rm/trials/migrations/0040_auto__add_field_trial_reporting_date.py
1
# -*- 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 'Trial.reporting_date' db.add_column(u'trials_trial', 'reporting_date', ...
KlubJagiellonski/Politikon
refs/heads/master
bladepolska/redis_connection.py
4
from django.conf import settings from django.core import signals import redis from threading import local class _RedisConnection(object): def __init__(self, db=0): self.connection = local() self.db = getattr(settings, 'REDIS_DB', 0) def connect(self): if hasattr(settings, 'REDIS_BASE...
MostafaGazar/tensorflow
refs/heads/master
tensorflow/python/ops/rnn_cell.py
16
# 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...
cnanders/test-cxro-tickets
refs/heads/master
locations/views.py
1
from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from django.core.urlresolvers import reverse from django.views.decorators.http import require_POST from django.contrib.auth.decorators import login_required from locations.models import * from extra.shortcuts import auth...
WimpyAnalytics/django-markitup
refs/heads/master
tests/project/urls.py
1
from django.conf.urls import patterns, url, include from django.views.generic.base import TemplateView from .forms import DemoForm urlpatterns = patterns( '', url( r'^$', TemplateView.as_view(template_name='demo.html'), {'form': DemoForm()}, name='demo', ), url(r'^...
ucl-exoplanets/pylightcurve
refs/heads/master
pylightcurve/analysis/optimisation.py
1
__all__ = ['EmceeFitting', 'values_to_print'] import emcee import numpy as np import warnings from pylightcurve.errors import * from pylightcurve.processes.counter import Counter from pylightcurve.processes.files import save_dict from pylightcurve.plots.plots_fitting import plot_mcmc_corner, plot_mcmc_traces, plot_m...
orgito/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/redshift_subnet_group.py
12
#!/usr/bin/python # Copyright 2014 Jens Carl, Hothead Games Inc. # 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', 'stat...
malayaleecoder/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/html5lib/html5lib/treewalkers/_base.py
658
from __future__ import absolute_import, division, unicode_literals from six import text_type, string_types import gettext _ = gettext.gettext from xml.dom import Node DOCUMENT = Node.DOCUMENT_NODE DOCTYPE = Node.DOCUMENT_TYPE_NODE TEXT = Node.TEXT_NODE ELEMENT = Node.ELEMENT_NODE COMMENT = Node.COMMENT_NODE ENTITY =...
spitfire88/upm
refs/heads/master
examples/python/grovecircularled.py
7
#!/usr/bin/python # # Author: Jon Trulson <[email protected]> # Copyright (c) 2015 Intel Corporation. # # 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...
bkirui/odoo
refs/heads/8.0
addons/l10n_fr_rib/bank.py
335
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Numérigraphe SARL. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
theguardian/headphones
refs/heads/master
lib/mutagen/easymp4.py
28
# -*- coding: utf-8 -*- # Copyright (C) 2009 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. from mutagen import Metadata from mutagen._util import DictMixin, dic...
djkonro/client-python
refs/heads/master
kubernetes/test/test_v1beta1_cluster_role_binding.py
2
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
martonw/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py
628
# Copyright 2012, 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...
chundongwang/Guess2014
refs/heads/master
lib/werkzeug/contrib/lint.py
318
# -*- coding: utf-8 -*- """ werkzeug.contrib.lint ~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 0.5 This module provides a middleware that performs sanity checks of the WSGI application. It checks that :pep:`333` is properly implemented and warns on some common HTTP errors such as non-empty respons...
andyraib/data-storage
refs/heads/master
python_scripts/pandas_example.py
2
import pandas as pd df = pd.DataFrame({ 'A' : 1., 'B' : pd.Timestamp('20130102'), 'C' : pd.Series(1, index=list(range(4)), dtype='float32'), 'D' : pd.Series([1, 2, 1, 2], dtype='int32'), 'E' : pd.Categorical(["test", "train", "test", "trai...
Ziqi-Li/bknqgis
refs/heads/master
bokeh/bokeh/tests/test_model.py
8
import pytest from bokeh.core.properties import Int, String, Float, Instance, List, Any from bokeh.model import Model from bokeh.models.callbacks import CustomJS def test_Model_pretty(): class Foo1(Model): pass assert Foo1(id='1').pretty() == """\ bokeh.tests.test_model.Foo1( id='1', js_event_...
eickenberg/scikit-learn
refs/heads/master
sklearn/neighbors/graph.py
17
"""Nearest Neighbors graph functions""" # Author: Jake Vanderplas <[email protected]> # # License: BSD 3 clause (C) INRIA, University of Amsterdam from .base import KNeighborsMixin, RadiusNeighborsMixin from .unsupervised import NearestNeighbors def kneighbors_graph(X, n_neighbors, mode='connectivity'...
TathagataChakraborti/resource-conflicts
refs/heads/master
PLANROB-2015/py2.5/lib/python2.5/test/test_dis.py
19
from test.test_support import verify, verbose, TestFailed, run_unittest import sys import dis import StringIO # Minimal tests for dis module import unittest def _f(a): print a return 1 dis_f = """\ %-4d 0 LOAD_FAST 0 (a) 3 PRINT_ITEM 4 PRINT_NEWLINE %-4d...
hilaskis/UAV_MissionPlanner
refs/heads/master
Lib/encodings/iso8859_11.py
593
""" Python Character Mapping Codec iso8859_11 generated from 'MAPPINGS/ISO8859/8859-11.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
michaelgallacher/intellij-community
refs/heads/master
python/testData/resolve/FStringLocalVariable.py
34
def f(): foo = 42 f"{foo}" <ref>
ShashaQin/erpnext
refs/heads/develop
erpnext/patches/v6_6/remove_fiscal_year_from_leave_allocation.py
71
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doctype("Leave Allocation") if frappe.db.has_column("Leave Allocation", "fiscal_year"): for leave_allocation in frappe.db.sql("select name, fiscal_year from `tabLeave Allocation`", as_dict=True): dates = frappe.db.get_value("Fisc...
vheon/JediHTTP
refs/heads/master
jedihttp/settings.py
1
# Copyright 2017 Cedraro Andrea <[email protected]> # 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...
balloob/home-assistant
refs/heads/dev
homeassistant/components/wunderground/__init__.py
36
"""The wunderground component."""
omnirom/android_external_chromium-org
refs/heads/android-5.1
tools/json_schema_compiler/memoize.py
128
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. def memoize(fn): '''Decorates |fn| to memoize. ''' memory = {} def impl(*args, **optargs): full_args = args + tuple(optargs.iteritems()) if f...
devasia1000/mitmproxy
refs/heads/master
examples/stream.py
38
def responseheaders(context, flow): """ Enables streaming for all responses. """ flow.response.stream = True
awickert/GRASSplot
refs/heads/master
Basemap/grassplot.py
1
# Plotting interface to GRASS GIS, based on Basemap # Written by Andy Wickert, mostly April (probably) and May 2013 # Still very much a work in progress - ESPECIALLY GETTING VECTOR LINES TO WORK # WITHOUT SUDDENLY JUMPING TO A NON-SEQUENTIAL NODE! (help appreciated!) # (maybe an easier way via improved vector handling ...
MrLoick/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/distutils/tests/test_config.py
53
"""Tests for distutils.pypirc.pypirc.""" import sys import os import unittest import tempfile from distutils.core import PyPIRCCommand from distutils.core import Distribution from distutils.log import set_threshold from distutils.log import WARN from distutils.tests import support from test.support import run_unittes...
evandrix/zxing
refs/heads/master
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/rpcgen.py
34
"""SCons.Tool.rpcgen Tool-specific initialization for RPCGEN tools. Three normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Found...
justanr/flask-allows
refs/heads/master
test/test_views.py
1
import pytest from flask.views import MethodView, View from werkzeug.exceptions import Forbidden from flask_allows import Allows, requires def test_requires_allows(app, member, ismember): Allows(app=app, identity_loader=lambda: member) @requires(ismember) def stub(): return True with app.ap...
alu0100207385/dsi_3Django
refs/heads/master
django/contrib/gis/db/backends/postgis/creation.py
117
from django.conf import settings from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation from django.utils.functional import cached_property class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_ops = 'GIST_GEOMETRY_OPS' geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND...
UManPychron/pychron
refs/heads/develop
pychron/experiment/action_editor.py
2
# =============================================================================== # Copyright 2014 Jake Ross # # 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/licens...
chauhanhardik/populo
refs/heads/master
cms/djangoapps/xblock_config/models.py
172
""" Models used by Studio XBlock infrastructure. Includes: StudioConfig: A ConfigurationModel for managing Studio. """ from django.db.models import TextField from config_models.models import ConfigurationModel class StudioConfig(ConfigurationModel): """ Configuration for XBlockAsides. """ disab...
rrmartins/eventex
refs/heads/master
south/south/utils.py
32
""" Generally helpful utility functions. """ def _ask_for_it_by_name(name): "Returns an object referenced by absolute path." bits = name.split(".") ## what if there is no absolute reference? if len(bits)>1: modulename = ".".join(bits[:-1]) else: modulename=bits[0] mod...
bt3gl/The-Anti-Social-Network
refs/heads/master
app/auth/views.py
1
""" In the MVC paradigm, views define what is presented to the user. Here we define the blueprint routes and view functions. Templates should be stored inside auth folder (avoid name collision) """ from flask import render_template, redirect, request, url_for, flash from flask.ext.login import login_user,...
mnahm5/django-estore
refs/heads/master
Lib/site-packages/boto/fps/exception.py
239
from boto.exception import BotoServerError class ResponseErrorFactory(BotoServerError): def __new__(cls, *args, **kw): error = BotoServerError(*args, **kw) newclass = globals().get(error.error_code, ResponseError) obj = newclass.__new__(newclass, *args, **kw) obj.__dict__.update(e...
diagramsoftware/odoomrp-wip
refs/heads/8.0
mrp_bom_catch_product_code/__init__.py
129
# -*- encoding: 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...
rombie/contrail-controller
refs/heads/master
src/config/vnc_openstack/vnc_openstack/tests/test_strict_compliance.py
1
import sys import json import uuid import logging from testtools.matchers import Equals, Contains, Not from testtools import content, content_type, ExpectedException import webtest.app from vnc_api.vnc_api import * sys.path.append('../common/tests') from test_utils import * import test_common import test_case logg...
Domatix/stock-logistics-workflow
refs/heads/11.0
stock_batch_picking/models/stock_batch_picking.py
2
# Copyright 2012-2014 Alexandre Fayolle, Camptocamp SA # Copyright 2018 Tecnativa - Carlos Dauden # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models from odoo.exceptions import UserError class StockBatchPicking(models.Model): """ This object allow to manage m...
jonyroda97/redbot-amigosprovaveis
refs/heads/develop
lib/youtube_dl/extractor/xminus.py
87
# coding: utf-8 from __future__ import unicode_literals import re import time from .common import InfoExtractor from ..compat import ( compat_ord, ) from ..utils import ( int_or_none, parse_duration, ) class XMinusIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?x-minus\.org/track/(?P<id>[0-9]+)...
cnbeining/you-get
refs/heads/develop
src/you_get/extractors/soundcloud.py
7
#!/usr/bin/env python __all__ = ['soundcloud_download', 'soundcloud_download_by_id'] from ..common import * def soundcloud_download_by_id(id, title = None, output_dir = '.', merge = True, info_only = False): assert title #if info["downloadable"]: # url = 'https://api.soundcloud.com/tracks/' + id +...
lino-framework/welfare
refs/heads/master
lino_welfare/modlib/cbss/mixins.py
1
# -*- coding: UTF-8 -*- # Copyright 2011-2019 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """Model mixins for `lino_welfare.modlib.cbss`. """ from builtins import str import os import traceback import datetime import logging import six logger = logging.getLogger(__n...
gonboy/sl4a
refs/heads/master
python/gdata/src/gdata/photos/service.py
162
#!/usr/bin/env python # -*-*- encoding: utf-8 -*-*- # # This is the service file for the Google Photo python client. # It is used for higher level operations. # # $Id: service.py 144 2007-10-25 21:03:34Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # # Licensed under the Apache License, Version 2.0 (the "Licen...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.7.2/Lib/test/threaded_import_hangers.py
204
# This is a helper module for test_threaded_import. The test imports this # module, and this module tries to run various Python library functions in # their own thread, as a side effect of being imported. If the spawned # thread doesn't complete in TIMEOUT seconds, an "appeared to hang" message # is appended to the m...
sauloal/cnidaria
refs/heads/master
scripts/venv/lib/python2.7/site-packages/cogent/motif/util.py
1
#!/usr/bin/env python """Utility classes for general motif and module API.""" from __future__ import division from cogent.core.alignment import Alignment from cogent.core.location import Span __author__ = "Jeremy Widmann" __copyright__ = "Copyright 2007-2012, The Cogent Project" __credits__ = ["Jeremy Widmann", "Rob ...
CopeX/odoo
refs/heads/8.0
addons/base_setup/base_setup.py
382
# -*- 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...
lukemarsden/flocker
refs/heads/master
admin/packaging.py
2
# -*- test-case-name: admin.test.test_packaging -*- # Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Helper utilities for Flocker packaging. """ from functools import partial import platform import sys import os from subprocess import check_output, check_call, CalledProcessError, call from tempfile im...
HyperBaton/ansible
refs/heads/devel
test/lib/ansible_test/_data/pytest/plugins/ansible_pytest_collections.py
25
"""Enable unit testing of Ansible collections. PYTEST_DONT_REWRITE""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import sys # set by ansible-test to a single directory, rather than a list of directories as supported by Ansible itself ANSIBLE_COLLECTIONS_PATH = os...
tempbottle/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/calendar.py
828
"""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...
mm112287/2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/xml/dom/minicompat.py
781
"""Python version compatibility support for minidom.""" # This module should only be imported using "import *". # # The following names are defined: # # NodeList -- lightest possible NodeList implementation # # EmptyNodeList -- lightest possible NodeList that is guaranteed to # remain empty...
edespino/gpdb
refs/heads/master
src/test/tinc/tincrepo/resource_management/memory_accounting/scenario/__init__.py
12133432
robertmattmueller/sdac-compiler
refs/heads/master
sympy/integrals/benchmarks/__init__.py
12133432
rvs/gpdb
refs/heads/master
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/pg_twophase/commit_create_tests/post_sql/__init__.py
12133432
translate/pootle
refs/heads/master
tests/pootle_language/__init__.py
12133432
forzi/phantomjs_stradivari_fork
refs/heads/master
src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/__init__.py
12133432
slevenhagen/odoo-npg
refs/heads/8.0
addons/account_sequence/__init__.py
433
# -*- 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...
912/M-new
refs/heads/master
src/librehatti/prints/views.py
2
#from django.http import HttpResponse #from useraccounts.models import * #from helper import * from django import forms from django.shortcuts import * from librehatti.catalog.models import * from django.db.models import Sum def add_lab(request): """ It displays the form where the user selects the Lab. ...
andresriancho/boto
refs/heads/develop
boto/sdb/db/query.py
40
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # 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,...
iogf/candocabot
refs/heads/master
plugins/jumble/wordList.py
1
from contextlib import closing import shelve import re # Return an iterator over the words in the given character sequence. def fromString(string): return (m.group() for m in re.finditer(r'[a-zA-Z]+', string)) # Returns an iterator over the words in the given text file. def fromFile(fileName): with open(fileN...
CYBAI/servo
refs/heads/master
python/tidy/servo_tidy_tests/lints/proper_file.py
105
from servo_tidy.tidy import LintRunner class Lint(LintRunner): def run(self): for _ in [None]: yield ('path', 0, 'foobar')
zzzeek/sqlalchemy
refs/heads/master
test/ext/test_automap.py
2
import random import threading import time from sqlalchemy import create_engine from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import select from sqlalchemy import String from sqlalchemy import testing from sqlalchemy.ext.automap import automap_base fro...
alexchandel/political-compass
refs/heads/master
compass.py
1
#!/usr/bin/env python3 import urllib import urllib.request import lxml.html import matplotlib.pyplot as pyplot url = "http://www.politicalcompass.org/test" def_opts = {"pageno": 1, "carried_x": 0, "carried_y": 0, "submit": "Next Page"} def_answers = { 1: 3, 2: 0, 3: 3, 4: 0, 5: 0, 6: 0, 7: 0, 8: 2, 9: 2, 10: 3, 11...
Xilinx/PYNQ
refs/heads/master
pynq/lib/arduino/arduino_grove_dlight.py
4
# Copyright (c) 2016, NECST Laboratory, Politecnico di Milano # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright not...
350dotorg/Django
refs/heads/master
django/conf/locale/he/formats.py
81
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'j בF Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = 'j בF Y H:i:s' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT = 'j בF' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s' # FIRST_DAY_OF_WEEK = ...
samratashok87/Rammbock
refs/heads/master
utest/test_templates/__init__.py
6
from unittest import TestCase
shreyasp/erpnext
refs/heads/develop
erpnext/stock/doctype/landed_cost_item/landed_cost_item.py
121
# 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 from frappe.model.document import Document class LandedCostItem(Document): pass
JohnS-01/coala
refs/heads/master
coalib/collecting/Collectors.py
9
import functools import os import pkg_resources import itertools from pyprint.NullPrinter import NullPrinter from coalib.bears.BEAR_KIND import BEAR_KIND from coalib.collecting.Importers import iimport_objects from coala_utils.decorators import yield_once from coalib.output.printers.LOG_LEVEL import LOG_LEVEL from co...
wrouesnel/ansible
refs/heads/devel
lib/ansible/modules/network/netscaler/netscaler_cs_vserver.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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', ...
wpjesus/codematch
refs/heads/dev
ietf/ipr/sitemaps.py
2
# Copyright The IETF Trust 2007, All Rights Reserved # from django.contrib.sitemaps import GenericSitemap from ietf.ipr.models import IprDisclosureBase # changefreq is "never except when it gets updated or withdrawn" # so skip giving one queryset = IprDisclosureBase.objects.filter(state__in=('posted','removed')) arch...
KurtDeGreeff/infernal-twin
refs/heads/master
build/pip/build/lib.linux-i686-2.7/pip/_vendor/requests/packages/urllib3/util/response.py
928
def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ try: # Check via the official file-like-object way. return obj.closed except AttributeError: pass try: # Check if the object...
Alberto-Beralix/Beralix
refs/heads/master
i386-squashfs-root/usr/lib/python2.7/dist-packages/butterfly/capabilities.py
2
../../../../share/pyshared/butterfly/capabilities.py
chrisdearman/micropython
refs/heads/master
tests/basics/array_construct2.py
24
try: from array import array except ImportError: print("SKIP") raise SystemExit # construct from something with unknown length (requires generators) print(array('i', (i for i in range(10))))
40223131/W17test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_functools.py
727
def partial(func, *args, **keywords): def newfunc(*fargs, **fkeywords): newkeywords = keywords.copy() newkeywords.update(fkeywords) return func(*(args + fargs), **newkeywords) newfunc.func = func newfunc.args = args newfunc.keywords = keywords return newfunc def reduce(func,...
xfournet/intellij-community
refs/heads/master
python/testData/intentions/PyConvertToFStringIntentionTest/formatMethodIndexContainsQuoteOfMultilineHost_after.py
31
f'''{d["'"]}'''
maxive/erp
refs/heads/master
addons/website_mail/models/mail_message.py
17
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.osv import expression from odoo.tools import html2plaintext from odoo.exceptions import AccessError class MailMessage(models.Model): _inherit = 'mail.message' ...
frank-tancf/scikit-learn
refs/heads/master
examples/applications/wikipedia_principal_eigenvector.py
16
""" =============================== Wikipedia principal eigenvector =============================== A classical way to assert the relative importance of vertices in a graph is to compute the principal eigenvector of the adjacency matrix so as to assign to each vertex the values of the components of the first eigenvect...
sugarlabs/sugar-toolkit-gtk3
refs/heads/master
src/sugar3/speech.py
1
# Copyright (C) 2011 One Laptop Per Child # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distribu...
mstuttgart/qdarkgray-stylesheet
refs/heads/develop
example/ui/example_pyqt5_ui.py
5
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'example.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow....
tbinjiayou/Odoo
refs/heads/master
addons/mrp/__openerp__.py
52
# -*- 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...
tstirrat15/exercism-python-responses
refs/heads/master
meetup/meetup_test.py
2
from datetime import date import unittest from meetup import meetup_day class MeetupTest(unittest.TestCase): def test_monteenth_of_may_2013(self): self.assertEqual(date(2013, 5, 13), meetup_day(2013, 5, 'Monday', 'teenth')) def test_saturteenth_of_february_2013(self): ...
poiesisconsulting/openerp-restaurant
refs/heads/master
website_mail/__init__.py
1577
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
ezequielpereira/Time-Line
refs/heads/master
libs64/wx/tools/helpviewer.py
5
#---------------------------------------------------------------------- # Name: wx.tools.helpviewer # Purpose: HTML Help viewer # # Author: Robin Dunn # # Created: 11-Dec-2002 # RCS-ID: $Id: helpviewer.py 45966 2007-05-11 18:54:09Z RD $ # Copyright: (c) 2002 by Total Control Software # Licenc...
aayush2911/Fibonaccio
refs/heads/master
web2py/gluon/contrib/minify/jsmin.py
44
#!/usr/bin/env python # -*- coding: ascii -*- # # Copyright 2011 # Andr\xe9 Malo or his licensors, as applicable # # 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/...
polyfractal/elasticsearch
refs/heads/master
dev-tools/smoke_test_rc.py
2
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
r-owen/TUI
refs/heads/master
TUI/Inst/SPIcam/StatusConfigInputWdg.py
1
#!/usr/bin/env python """Configuration input panel for SPIcam. This is just a placeholder. History: 2007-05-22 ROwen First pass based on DIS; may be way off. 2007-05-24 ROwen Added corrections submitted by Craig Loomis. 2008-02-11 ROwen Modified to be compatible with the new TUI.Inst.StatusConfigWdg. 2008-04...
csliu/pinball
refs/heads/master
tests/pinball/workflow/worker_test.py
5
# Copyright 2015, Pinterest, 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 writ...
jettisonjoe/openhtf
refs/heads/master
openhtf/plugs/usb/adb_message.py
2
# 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 agre...
dex4er/django
refs/heads/1.6.x
django/core/management/commands/check.py
119
from __future__ import unicode_literals import warnings from django.core.checks.compatibility.base import check_compatibility from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = "Checks your configuration's compatibility with this version " + \ "of Django." ...
zhujzhuo/Sahara
refs/heads/master
sahara/tests/tempest/scenario/data_processing/client_tests/test_node_group_templates.py
9
# Copyright (c) 2014 Mirantis 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 ...
ZuoCaiSong/Python
refs/heads/master
exercise/2.py
1
#! usr/bin/env python # -*- coding:utf-8 -*- ''' 题目:企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元, 低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.5%;20万到40万之间时, 高于20万元的部分,可提成5%;40万到60万之间时高于40万元的部分,可提成3%;60万到100万之间时, 高于60万元的部分,可提成1.5%,高于100万元时,超过100万元的部分按1%提成,从键盘输入当月利润I, 求应发放奖金总数? 程序分析:请利用数轴来分界,定位。注意定义时需把奖金定义成长整型。 ''' #参考方法...
indictranstech/vestasi-erpnext
refs/heads/develop
erpnext/controllers/recurring_document.py
10
from __future__ import unicode_literals import frappe import frappe.utils import frappe.defaults from frappe.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \ get_first_day, get_last_day, comma_and from frappe.model.naming import make_autoname from frappe import _, msgprint, throw from erpnext.a...
FocusTheOne/Qomolangma
refs/heads/master
Qomolangma/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/win/gyptest-link-fixed-base.py
344
#!/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. """ Make sure fixed base setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGy...
edofic/ggrc-core
refs/heads/develop
src/ggrc_basic_permissions/migrations/versions/20131206002015_c460b4f8cc3_place_all_public_pro.py
6
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Place all public programs into their own context. Create Date: 2013-12-06 00:20:15.108809 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-nam...