repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
stack-of-tasks/rbdlpy
refs/heads/master
tutorial/lib/python2.7/site-packages/OpenGL/GL/NVX/gpu_memory_info.py
9
'''OpenGL extension NVX.gpu_memory_info This module customises the behaviour of the OpenGL.raw.GL.NVX.gpu_memory_info to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/NVX/gpu_memory_info.txt ''' from OpenGL import platform, const...
joopert/home-assistant
refs/heads/dev
tests/components/coinmarketcap/test_sensor.py
4
"""Tests for the CoinMarketCap sensor platform.""" import json import unittest from unittest.mock import patch import homeassistant.components.sensor as sensor from homeassistant.setup import setup_component from tests.common import get_test_home_assistant, load_fixture, assert_setup_component VALID_CONFIG = { "...
mahak/nova
refs/heads/master
nova/cmd/policy.py
2
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/aio/operations/_express_route_ports_locations_operations.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
vitan/hue
refs/heads/master
apps/rdbms/src/rdbms/models.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...
BeATz-UnKNoWN/python-for-android
refs/heads/master
python-modules/twisted/twisted/conch/unix.py
61
# Copyright (c) 2001-2007 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.cred import portal from twisted.python import components, log from twisted.internet.error import ProcessExitedAlready from zope import interface from ssh import session, forwarding, filetransfer from ssh.filetransfer import ...
peichman-umd/newspaper-batchload
refs/heads/develop
handler/ndnp.py
2
''' Classes for interpreting and loading metadata and files stored according to the NDNP specification. ''' import csv import logging import lxml.etree as ET import os import requests import sys import mimetypes from rdflib import Graph, Literal, Namespace, URIRef from classes import pcdm, ocr, oa from classes.exc...
vizydrop/vizydrop-python-sdk
refs/heads/master
examples/concurrent_external_api/source.py
1
import json from tornado.httpclient import AsyncHTTPClient, HTTPRequest from tornado import gen from vizydrop.sdk.source import DataSource from .filter import BlankFilter from .schema import ApiExampleSchema from toro import JoinableQueue, BoundedSemaphore # how many concurrent fetches can we do? FETCH_CONCURRENCY...
dgzurita/odoo
refs/heads/8.0
addons/portal_sale/__openerp__.py
380
# -*- 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...
dcos/dcos
refs/heads/master
packages/dcos-integration-test/extra/test_checks.py
1
import logging import random import uuid from dcos_test_utils.dcos_api import DcosApiSession __maintainer__ = 'branden' __contact__ = 'dcos-cluster-ops@mesosphere.io' def test_checks_cli(dcos_api_session: DcosApiSession) -> None: base_cmd = [ '/opt/mesosphere/bin/dcos-shell', 'dcos-check-runner'...
michigraber/scikit-learn
refs/heads/master
sklearn/datasets/tests/test_20news.py
280
"""Test the 20news downloader, if the data is available.""" import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import SkipTest from sklearn import datasets def test_20news(): try: data = dat...
OpenWinCon/OpenWinNet
refs/heads/master
web-gui/myvenv/lib/python3.4/site-packages/django/utils/dateparse.py
63
"""Functions to parse datetime objects.""" # We're using regular expressions rather than time.strptime because: # - They provide both validation and parsing. # - They're more flexible for datetimes. # - The date/datetime/time constructors produce friendlier error messages. import datetime import re from django.utils...
bistromath/openocd
refs/heads/master
tools/xsvf_tools/xsvfdump.py
101
#!/usr/bin/python3.0 # Copyright 2008, SoftPLC Corporation http://softplc.com # Dick Hollenbeck dick@softplc.com # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the Lice...
dendisuhubdy/tensorflow
refs/heads/master
tensorflow/contrib/specs/python/specs_test.py
18
# 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 applicable ...
felipe3dfx/weeable
refs/heads/master
user/apps.py
41
from django.apps import AppConfig class UserConfig(AppConfig): name = 'user'
Nitaco/ansible
refs/heads/devel
lib/ansible/plugins/netconf/sros.py
9
# # (c) 2018 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
2uller/LotF
refs/heads/master
App/Lib/ctypes/test/test_anon.py
12
import unittest from ctypes import * class AnonTest(unittest.TestCase): def test_anon(self): class ANON(Union): _fields_ = [("a", c_int), ("b", c_int)] class Y(Structure): _fields_ = [("x", c_int), ("_", ANON), ...
rphillips/bitbake
refs/heads/master
lib/bb/pysh/interp.py
3
# interp.py - shell interpreter for pysh. # # Copyright 2007 Patrick Mezard # # This software may be used and distributed according to the terms # of the GNU General Public License, incorporated herein by reference. """Implement the shell interpreter. Most references are made to "The Open Group Base Specifications Is...
KISSMonX/micropython
refs/heads/master
tests/basics/fun1.py
119
# calling a function def f(): print(1) f()
meskio/alot
refs/heads/master
alot/widgets/utils.py
8
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file """ Utility Widgets not specific to alot """ import urwid class AttrFlipWidget(urwid.AttrMap): """ An AttrMap that can remem...
googleapis/googleapis-gen
refs/heads/master
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/merchant_center_link_service/transports/base.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
paulsoh/moxie
refs/heads/master
moxie/social/tests/backends/test_arcgis.py
9
import json from social.tests.backends.oauth import OAuth2Test class ArcGISOAuth2Test(OAuth2Test): user_data_url = 'https://www.arcgis.com/sharing/rest/community/self' backend_path = 'social.backends.arcgis.ArcGISOAuth2' expected_username = 'gis@rocks.com' user_data_body = json.dumps({ 'first...
JanDintel/ansible
refs/heads/devel
contrib/inventory/jail.py
138
#!/usr/bin/env python # (c) 2013, Michael Scherer <misc@zarb.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 o...
Kamik423/uni_plan
refs/heads/master
plan/plan/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py
3126
######################## 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...
cchurch/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/execute_lambda.py
38
#!/usr/bin/python # 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...
attilammagyar/typesafety
refs/heads/master
typesafety/tests/mockmodule2.py
3
# # Copyright (c) 2013-2018 Balabit # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distrib...
teacoind/teacoin
refs/heads/master
contrib/seeds/makeseeds.py
3
#!/usr/bin/env python # # Generate pnSeed[] from Pieter's DNS seeder # NSEEDS=600 import re import sys from subprocess import check_output def main(): lines = sys.stdin.readlines() ips = [] pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):7921") for line in lines: m = patte...
aaronorosen/nox
refs/heads/destiny
src/nox/coreapps/pyrt/__init__.py
10
from nox.coreapps.pyrt.bootstrap import *
marty331/jakesclock
refs/heads/master
flask/lib/python2.7/site-packages/flask_admin/tests/test_tools.py
45
from nose.tools import eq_, ok_ from flask_admin import tools def test_encode_decode(): eq_(tools.iterdecode(tools.iterencode([1, 2, 3])), (u'1', u'2', u'3')) eq_(tools.iterdecode(tools.iterencode([',', ',', ','])), (u',', u',', u',')) eq_(tools.iterdecode(tools.iterencode(['.hello.,', ',', ','])), (u'...
blackye/luscan-devel
refs/heads/master
thirdparty_libs/django/views/static.py
101
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ from __future__ import unicode_literals import mimetypes import os import stat import posixpath import re try: from urllib.parse import unquote except ImportError: ...
edne/gletools
refs/heads/master
gletools/__init__.py
1
# -*- coding: utf-8 -*- """ :copyright: 2009 by Florian Boesch <pyalot@gmail.com>. :license: GNU AGPL v3 or later, see LICENSE for more details. """ from __future__ import absolute_import from . import framebuffer from . import texture from . import shader from . import util for module in [framebuffer, textu...
AOSPU/external_chromium_org
refs/heads/android-5.0/py3
build/android/gyp/generate_v14_compatible_resources.py
14
#!/usr/bin/env python # # 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. """Convert Android xml resources to API 14 compatible. There are two reasons that we cannot just use API 17 attributes, so we are ge...
open-synergy/stock-logistics-warehouse
refs/heads/8.0
stock_inventory_line_price/tests/test_stock_inventory_line_price.py
3
# -*- coding: utf-8 -*- # © 2016 Esther Martín - AvanzOSC # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import openerp.tests.common as common class TestStockInventoryLinePrice(common.TransactionCase): def setUp(self): super(TestStockInventoryLinePrice, self).setUp() self.produc...
QLGu/django-oscar
refs/heads/master
src/oscar/apps/catalogue/reviews/signals.py
72
import django.dispatch review_added = django.dispatch.Signal( providing_args=["review", "user", "request", "response"])
shedskin/shedskin
refs/heads/master
shedskin/lib/stat.py
6
# Copyright 2005-2011 Mark Dufour and contributors; License Expat (See LICENSE) # copied from pypy: # https://codespeak.net/viewvc/pypy/dist/lib-python/2.4.1/stat.py?revision=16842&view=markup """Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # XXX ...
pelletier/django-registration-81
refs/heads/master
registration/signals.py
176
from django.dispatch import Signal # A new user has registered. user_registered = Signal(providing_args=["user", "request"]) # A user has activated his or her account. user_activated = Signal(providing_args=["user", "request"])
fullfanta/mxnet
refs/heads/master
tools/caffe_converter/compare_layers.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 u...
narfman0/zappa-examples
refs/heads/master
{{cookiecutter.project_slug}}/django-cow/django_cow/urls.py
1
from django.conf.urls import include, url from django.contrib import admin from cow import urls as cow_urls urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^tinymce/', include('tinymce.urls')), url(r'^', include(cow_urls)), ]
thomasrogers03/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/watchlist/watchlist_mock.py
130
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
alexryndin/ambari
refs/heads/branch-adh-1.5
ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/hdfs_client.py
5
""" 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 this ...
dsp-jetpack/JetPack
refs/heads/master
src/pilot/job_helper.py
1
#!/usr/bin/python3 # Copyright (c) 2016-2021 Dell Inc. or its subsidiaries. # # 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...
konstruktoid/ansible-upstream
refs/heads/devel
lib/ansible/modules/network/meraki/meraki_admin.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { ...
gangadharkadam/v4_erp
refs/heads/develop
erpnext/setup/doctype/backup_manager/backup_manager.py
37
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class BackupManage...
iTyran/CocosBuilder
refs/heads/master
CocosBuilder/libs/nodejs/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py
92
# 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. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
drusk/ImplicitRayTracer
refs/heads/master
vendor/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...
algiopensource/server-tools
refs/heads/8.0
base_search_fuzzy/__init__.py
9
# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models
Nirlendu/Dummy-Search-Engine
refs/heads/master
tornado-3.2/build/lib.win32-2.7/tornado/platform/caresresolver.py
90
from __future__ import absolute_import, division, print_function, with_statement import pycares import socket from tornado import gen from tornado.ioloop import IOLoop from tornado.netutil import Resolver, is_valid_ip class CaresResolver(Resolver): """Name resolver based on the c-ares library. This is a non...
sillvan/laikaboss
refs/heads/master
cloudscan.py
6
#!/usr/bin/python # Copyright 2015 Lockheed Martin 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 app...
kittiu/odoo
refs/heads/8.0
addons/account_chart/__init__.py
526
# -*- 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...
adhoc-dev/odoo-nautical
refs/heads/8.0
nautical_reports/__openerp__.py
1
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
JJINDAHOUSE/deep-learning
refs/heads/master
transfer-learning/tensorflow_vgg/test_vgg19.py
152
import numpy as np import tensorflow as tf from tensoflow_vgg import vgg19 from tensoflow_vgg import utils img1 = utils.load_image("./test_data/tiger.jpeg") img2 = utils.load_image("./test_data/puzzle.jpeg") batch1 = img1.reshape((1, 224, 224, 3)) batch2 = img2.reshape((1, 224, 224, 3)) batch = np.concatenate((batc...
GistdaDev/geonode
refs/heads/master
geonode/middleware.py
30
from django.utils import simplejson as json from django.http import HttpResponse from geonode.geoserver.helpers import ogc_server_settings from geonode.security.views import _perms_info_json class PrintProxyMiddleware(object): def process_request(self, request): if request.method == 'POST': i...
rickmendes/ansible-modules-extras
refs/heads/devel
cloud/amazon/sqs_queue.py
30
#!/usr/bin/python # 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...
ghisvail/vispy
refs/heads/master
make/__init__.py
20
""" By putting make.py in a package, we can do "python make" instead of "python make.py". """ from __future__ import print_function, division from .make import Maker # noqa
userzimmermann/robotframework
refs/heads/python3
src/robot/running/__init__.py
14
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
googlefonts/fontbakery
refs/heads/main
Lib/fontbakery/profiles/stat.py
1
from fontbakery.callable import check from fontbakery.status import FAIL, PASS from fontbakery.message import Message # used to inform get_module_profile whether and how to create a profile from fontbakery.fonts_profile import profile_factory # NOQA pylint: disable=unused-import profile_imports = [ ('.shared_condi...
ff94315/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/idlelib/aboutDialog.py
46
"""About Dialog for IDLE """ from Tkinter import * import os from idlelib import textView from idlelib import idlever class AboutDialog(Toplevel): """Modal about dialog for idle """ def __init__(self,parent,title): Toplevel.__init__(self, parent) self.configure(borderwidth=5) se...
pypa/virtualenv
refs/heads/pre-commit-ci-update-config
src/virtualenv/create/via_global_ref/builtin/ref.py
4
""" Virtual environments in the traditional sense are built as reference to the host python. This file allows declarative references to elements on the file system, allowing our system to automatically detect what modes it can support given the constraints: e.g. can the file system symlink, can the files be read, execu...
DarthMaulware/EquationGroupLeaks
refs/heads/master
Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/install/cmd/dllload/tasking_dsz.py
1
# 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: tasking_dsz.py import mcl.framework import mcl.tasking class dsz: INTERFACE = 16842801 PFAM = 4195 PROVIDER_ANY = 4195 PROVIDER = 16...
gangadharkadam/smrtfrappe
refs/heads/develop
frappe/tests/test_email.py
31
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import os, sys import unittest, frappe from frappe.test_runner import make_test_records make_test_records("User") class TestEmail(unittest.TestCase): def setUp(self): fra...
brakhane/panda3d
refs/heads/master
direct/src/showbase/Pool.py
14
"""Undocumented Module""" __all__ = ['Pool'] """ Pool is a collection of python objects that you can checkin and checkout. This is useful for a cache of objects that are expensive to load and can be reused over and over, like splashes on cannonballs, or bulletholes on walls. The pool is unsorted. Items do not have t...
FFMG/myoddweb.piger
refs/heads/master
monitor/api/python/Python-3.7.2/Lib/stat.py
75
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
smrmkt/project_euler
refs/heads/master
problem_060.py
1
#!/usr/bin/env python #-*-coding:utf-8-*- ''' The primes 3, 7, 109, and 673, are quite remarkable. By taking any two primes and concatenating them in any order the result will always be prime. For example, taking 7 and 109, both 7109 and 1097 are prime. The sum of these four primes, 792, represents the lowest sum for ...
CydarLtd/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_ssl_certificate.py
30
#!/usr/bin/python # # (c) 2016, Kevin Coming (@waffie1) # # 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...
gibiansky/tensorflow
refs/heads/master
tensorflow/contrib/slim/python/slim/learning.py
2
# 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...
Justyer/LianjiaSpider
refs/heads/master
LjSpider/tools/db.py
1
#-*- encoding:utf-8 -*- import psycopg2 conn = psycopg2.connect(database='ptd', user='postgres', password='495495', host='127.0.0.1', port='5432') cur = conn.cursor() # cur.execute(''' # insert into lj_residence_backup_all(name,avg_price,avg_time,address,coordinate,build_time,property_price,property_comp...
lthurlow/Network-Grapher
refs/heads/master
proj/external/networkx-1.7/networkx/algorithms/isomorphism/matchhelpers.py
35
"""Functions which help end users define customize node_match and edge_match functions to use during isomorphism checks. """ from itertools import permutations import types import networkx as nx __all__ = ['categorical_node_match', 'categorical_edge_match', 'categorical_multiedge_match', ...
coolbombom/CouchPotatoServer
refs/heads/master
libs/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...
joaander/hoomd-blue
refs/heads/master
hoomd/filter/all_.py
1
"""Define the All filter.""" from hoomd.filter.filter_ import ParticleFilter from hoomd._hoomd import ParticleFilterAll class All(ParticleFilter, ParticleFilterAll): """Select all particles in the system. Base: `ParticleFilter` """ def __init__(self): ParticleFilter.__init__(self) P...
kklmn/xrt
refs/heads/master
examples/withRaycing/07_AnalyzerBent2D/__init__.py
1307
pass
mrquim/repository.mrquim
refs/heads/master
plugin.video.live.ike/pyaesnew/blockfeeder.py
59
# The MIT License (MIT) # # Copyright (c) 2014 Richard Moore # # 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, mod...
kiok46/kivy-designer
refs/heads/master
designer/components/run_contextual_view.py
4
import webbrowser from designer.uix.action_items import DesignerActionProfileCheck from kivy.app import App from kivy.modules import screen from kivy.properties import Clock, ObjectProperty, partial from kivy.uix.actionbar import ContextualActionView class ModulesContView(ContextualActionView): mod_screen = Obj...
awkspace/ansible
refs/heads/devel
lib/ansible/module_utils/network/ftd/common.py
22
# Copyright (c) 2018 Cisco and/or its affiliates. # # 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 v...
jeffninghan/tracker
refs/heads/master
pi/server.py
1
from flask import Flask import pygame app = Flask(__name__) song_filename = 'song.mp3' playing = False song_list = ['song.mp3', 'song2.mp3', 'song3.mp3'] @app.route('/play') def play(): global playing if not playing: pygame.mixer.music.play() playing = True else: pygame.mixer.mus...
Zhongqilong/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/audiotests.py
72
from test.support import findfile, TESTFN, unlink import unittest import array import io import pickle import sys class UnseekableIO(io.FileIO): def tell(self): raise io.UnsupportedOperation def seek(self, *args, **kwargs): raise io.UnsupportedOperation class AudioTests: close_fd = False...
direvus/ansible
refs/heads/devel
lib/ansible/modules/network/aos/_aos_blueprint_param.py
55
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.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 opt...
ESS-LLP/erpnext
refs/heads/develop
erpnext/patches/v5_0/party_model_patch_fix.py
115
from __future__ import unicode_literals import frappe def execute(): for company in frappe.get_all("Company", ["name", "default_receivable_account", "default_payable_account"]): if company.default_receivable_account: frappe.db.sql("""update `tabSales Invoice` invoice set `debit_to`=%(account)s where comp...
rvmoura96/projeto-almoxarifado
refs/heads/master
myvenv/Lib/site-packages/django/contrib/auth/migrations/0003_alter_user_email_max_length.py
586
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auth', '0002_alter_permission_name_max_length'), ] operations = [ migrations.AlterField( model_name='user', ...
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-3.1/Lib/test/test_subprocess.py
2
import unittest from test import support import subprocess import sys import signal import os import tempfile import time import re mswindows = (sys.platform == "win32") # # Depends on the following external programs: Python # if mswindows: SETBINARY = ('import msvcrt; msvcrt.setmode(sys.stdout.fileno(), ' ...
ignatz/gtest
refs/heads/master
test/gtest_catch_exceptions_test.py
403
#!/usr/bin/env python # # Copyright 2010 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
haad/ansible
refs/heads/devel
lib/ansible/plugins/action/dellos10_config.py
113
# # Copyright 2015 Peter Sprygada <psprygada@ansible.com> # # Copyright (c) 2017 Dell Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the L...
HydrelioxGitHub/home-assistant
refs/heads/dev
homeassistant/components/device_tracker/thomson.py
9
""" Support for THOMSON routers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.thomson/ """ import logging import re import telnetlib import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.compo...
erichegt/askbot-devel
refs/heads/master
askbot/conf/access_control.py
5
from askbot.conf.settings_wrapper import settings from askbot.conf.super_groups import LOGIN_USERS_COMMUNICATION from askbot.deps import livesettings from django.utils.translation import ugettext_lazy as _ ACCESS_CONTROL = livesettings.ConfigurationGroup( 'ACCESS_CONTROL', _('Ac...
realsaiko/odoo
refs/heads/8.0
addons/hw_escpos/escpos/constants.py
129
# -*- coding: utf-8 -*- """ ESC/POS Commands (Constants) """ # Feed control sequences CTL_LF = '\x0a' # Print and line feed CTL_FF = '\x0c' # Form feed CTL_CR = '\x0d' # Carriage return CTL_HT = '\x09' # Horizontal tab CTL_VT = '\x0b' # Vertic...
Jusedawg/SickRage
refs/heads/develop
lib/sqlalchemy/engine/base.py
75
# engine/base.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from __future__ import with_statement """Defines :class:`.Connection` and :class:`.Engi...
xzturn/tensorflow
refs/heads/master
tensorflow/python/ops/losses/losses_impl.py
7
# 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...
py-geek/City-Air
refs/heads/master
venv/lib/python2.7/site-packages/pymysql/constants/FIELD_TYPE.py
101
DECIMAL = 0 TINY = 1 SHORT = 2 LONG = 3 FLOAT = 4 DOUBLE = 5 NULL = 6 TIMESTAMP = 7 LONGLONG = 8 INT24 = 9 DATE = 10 TIME = 11 DATETIME = 12 YEAR = 13 NEWDATE = 14 VARCHAR = 15 BIT = 16 NEWDECIMAL = 246 ENUM = 247 SET = 248 TINY_BLOB = 249 MEDIUM_BLOB = 250 LONG_BLOB = 251 BLOB = 252 VAR_STRING = 253 STRING = 254 GEO...
zanderle/django
refs/heads/master
tests/conditional_processing/urls.py
360
from django.conf.urls import url from . import views urlpatterns = [ url('^condition/$', views.index), url('^condition/last_modified/$', views.last_modified_view1), url('^condition/last_modified2/$', views.last_modified_view2), url('^condition/etag/$', views.etag_view1), url('^condition/etag2/$', ...
shrimpboyho/git.js
refs/heads/master
emscript/emscripten/1.5.6/tools/autodediffer.py
15
''' A semi-smart diff for autodebugger logs. Run it with filenames of two autodebugger logs as parameters ''' import os, sys def process_line(line): #AD:2041,0.900000 if not line.startswith('AD:'): return line = line.split(':')[1] num, val = line.split(',') return [int(num), float(val)] a = open(sys.argv...
spring-week-topos/horizon-week
refs/heads/spring-week
horizon/test/urls.py
7
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
ahb0327/intellij-community
refs/heads/master
python/testData/resolve/pyToJava/JavaPackage.py
83
import ja<ref>va
vmax-feihu/hue
refs/heads/master
desktop/core/src/desktop/management/commands/test.py
20
#!/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...
e-koch/spectral-cube
refs/heads/master
spectral_cube/tests/test_spectral_axis.py
4
from __future__ import print_function, absolute_import, division from astropy import wcs from astropy.io import fits from astropy import units as u from astropy import constants from astropy.tests.helper import pytest, assert_quantity_allclose import numpy as np from .helpers import assert_allclose from . import path...
interlegis/sapl
refs/heads/3.1.x
sapl/parlamentares/migrations/0022_partido_observacao.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-04-06 13:00 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('parlamentares', '0021_clear_thumbnails_cache'), ] operations = [ migrations...
alexproca/askbot-devel
refs/heads/master
askbot/deps/livesettings/urls.py
10
try: from django.conf.urls import * except ImportError: from django.conf.urls.defaults import * urlpatterns = patterns('askbot.deps.livesettings.views', url(r'^$', 'site_settings', {}, name='site_settings'), url(r'^export/$', 'export_as_python', {}, name='settings_export'), url(r'^(?P<group>[^/]+)/...
ndchorley/scipy
refs/heads/master
scipy/weave/examples/dict_sort.py
100
# Borrowed from Alex Martelli's sort from Python cookbook using inlines # 2x over fastest Python version -- again, maybe not worth the effort... # Then again, 2x is 2x... # # C:\home\eric\wrk\scipy\weave\examples>python dict_sort.py # Dict sort of 1000 items for 300 iterations: # speed in python: 0.2509999275...
NewpTone/stacklab-nova
refs/heads/master
debian/tmp/usr/lib/python2.7/dist-packages/nova/tests/api/__init__.py
210
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/...
cherylyli/stress-aid
refs/heads/master
env/lib/python3.5/site-packages/pip/locations.py
340
"""Locations where we look for configs, install stuff, etc""" from __future__ import absolute_import import os import os.path import site import sys from distutils import sysconfig from distutils.command.install import install, SCHEME_KEYS # noqa from pip.compat import WINDOWS, expanduser from pip.utils import appd...
LLNL/spack
refs/heads/develop
var/spack/repos/builtin/packages/perl-test-requires/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlTestRequires(PerlPackage): """Checks to see if the module can be loaded.""" homep...
betoesquivel/fil2014
refs/heads/master
filenv/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_modify.py
106
from django import template register = template.Library() @register.inclusion_tag('admin/prepopulated_fields_js.html', takes_context=True) def prepopulated_fields_js(context): """ Creates a list of prepopulated_fields that should render Javascript for the prepopulated fields for both the admin form and in...