repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
tempbottle/h-store
refs/heads/master
tools/traces/mysql-to-json.py
9
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import re import json import logging import getopt import string import time from pprint import pprint import MySQLdb from hstoretraces import * logging.basicConfig(level = logging.INFO, format="%(asctime)s [%(funcName)s:%(lineno)...
opencog/link-grammar
refs/heads/master
bindings/python-examples/example.py
3
#! /usr/bin/env python3 # -*- coding: utf8 -*- """Link Grammar example usage""" from linkgrammar import Sentence, ParseOptions, Dictionary, Clinkgrammar as clg print("Version:", clg.linkgrammar_get_version()) po = ParseOptions(verbosity=1) def desc(lkg): print(lkg.diagram()) print('Postscript:') print(lk...
l5h5t7/ZeroNet
refs/heads/master
plugins/disabled-Bootstrapper/Test/TestBootstrapper.py
3
import hashlib import os import pytest from Bootstrapper import BootstrapperPlugin from Bootstrapper.BootstrapperDb import BootstrapperDb from Peer import Peer from Crypt import CryptRsa from util import helper @pytest.fixture() def bootstrapper_db(request): BootstrapperPlugin.db.close() BootstrapperPlugin....
wfxiang08/django178
refs/heads/master
django/__init__.py
1
# -*- coding:utf-8 -*- VERSION = (1, 7, 8, 'final', 0) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) def setup(): """ ...
renegelinas/mi-instrument
refs/heads/master
mi/instrument/nobska/mavs4/playback/__init__.py
59
__author__ = 'petercable'
tsufiev/horizon
refs/heads/master
openstack_dashboard/dashboards/project/networks/workflows.py
5
# Copyright 2012 NEC 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 applicable law or ag...
fernandezcuesta/ansible
refs/heads/devel
lib/ansible/modules/cloud/centurylink/clc_server.py
8
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # 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.0', 'status': ['previe...
css-iter/cs-studio
refs/heads/master
build/org.csstudio.validation.scripts/check_dependencies.py
3
''' Created on Oct 3, 2014 The goal is to scan the features and plugins in the core and applications to ensure 1. plugins are not present in duplicate features @author: Kunal Shroff ''' import os.path import xml.etree.ElementTree as ET from xml.dom import minidom import sys from optparse import OptionParser '''since...
CalebM1987/serverAdminTools
refs/heads/master
serverAdminTools/restapi/requests/packages/urllib3/contrib/ntlmpool.py
514
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ from __future__ import absolute_import try: from http.client import HTTPSConnection except ImportError: from httplib import HTTPSConnection from logging import getLogger from nt...
tmpgit/intellij-community
refs/heads/master
python/testData/resolve/multiFile/nestedPackage/NestedPackage.py
83
import foo.bar # <ref>
CapOM/ChromiumGStreamerBackend
refs/heads/master
tools/telemetry/third_party/gsutilz/third_party/protorpc/protorpc/webapp/google_imports.py
21
"""Dynamically decide from where to import other SDK modules. All other protorpc.webapp code should import other SDK modules from this module. If necessary, add new imports here (in both places). """ __author__ = 'yey@google.com (Ye Yuan)' # pylint: disable=g-import-not-at-top # pylint: disable=unused-import import...
alajfit/ngbook_tests
refs/heads/master
node_modules/karma/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
1788
#!/usr/bin/env python import re import json # https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
waylan/django-spambayes
refs/heads/master
urls.py
2
""" Sample urls.py for the demo app. """ from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^sb_demo/', include('sb_demo.urls')), (r'^comments/', include('django.contrib.comments.urls')), )
kawamon/hue
refs/heads/master
desktop/core/ext-py/Django-1.11.29/tests/null_queries/tests.py
55
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from .models import Choice, Inner, OuterA, OuterB, Poll class NullQueriesTests(TestCase): def test_none_as_null(self): """ Regression test for the use of None as a query value....
dantebarba/docker-media-server
refs/heads/master
plex/Sub-Zero.bundle/Contents/Libraries/Shared/appdirs.py
335
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
antoan2/incubator-mxnet
refs/heads/master
example/bi-lstm-sort/gen_data.py
39
# 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...
suxinde2009/zulip
refs/heads/master
zerver/lib/socket.py
121
from __future__ import absolute_import from django.conf import settings from django.utils.importlib import import_module from django.utils import timezone from django.contrib.sessions.models import Session as djSession import sockjs.tornado import tornado.ioloop import ujson import logging import time from zerver.mo...
zisko/swift
refs/heads/master
utils/build_swift/tests/utils.py
2
# This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift.org/CONTRIBUTORS.txt for the list o...
python-visualization/folium
refs/heads/master
folium/plugins/__init__.py
2
# -*- coding: utf-8 -*- """ Folium plugins -------------- Wrap some of the most popular leaflet external plugins. """ from folium.plugins.antpath import AntPath from folium.plugins.polyline_offset import PolyLineOffset from folium.plugins.beautify_icon import BeautifyIcon from folium.plugins.boat_marker import Boat...
Deepak345/al-go-rithms
refs/heads/master
math/average_stream_numbers/Python/average_stream_numbers.py
3
def newAvg(prevAvg, newN, newX) : return ((prevAvg * (newN - 1) + newX) / newN) def main() : L = [1, 9, 20, 13, 45] avg = 0 for i in range(len(L)) : avg = newAvg(avg, (i + 1), L[i]) print(avg) main()
MalloyPower/parsing-python
refs/heads/master
front-end/testsuite-python-lib/Python-2.7.2/Lib/plat-mac/lib-scriptpackages/Finder/__init__.py
73
""" Package generated from /System/Library/CoreServices/Finder.app """ from warnings import warnpy3k warnpy3k("In 3.x, the Finder package is removed.", stacklevel=2) import aetools Error = aetools.Error import Standard_Suite import Legacy_suite import Containers_and_folders import Files import Finder_Basics import Fi...
laurentb/weboob
refs/heads/master
modules/mailinator/test.py
2
# -*- coding: utf-8 -*- # Copyright(C) 2013 Vincent A # # This file is part of a weboob module. # # This weboob module 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 Licen...
gkoelln/youtube-dl
refs/heads/master
youtube_dl/extractor/discoveryvr.py
59
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import parse_duration class DiscoveryVRIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?discoveryvr\.com/watch/(?P<id>[^/?#]+)' _TEST = { 'url': 'http://www.discoveryvr.com/watch/discovery-vr-an...
molly/twitterbot_framework
refs/heads/master
secrets.py
2
C_KEY = "" C_SECRET = "" A_TOKEN = "" A_TOKEN_SECRET = ""
dahlstrom-g/intellij-community
refs/heads/master
python/testData/formatter/multilineIfConditionKeywordAtStart_after.py
22
if foo is None \ and bar == 42: pass
MQQiang/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_exceptions.py
75
# Python test set -- part 5, built-in exceptions import os import sys import unittest import pickle import weakref import errno from test.support import (TESTFN, captured_output, check_impl_detail, check_warnings, cpython_only, gc_collect, run_unittest, no_tracing, ...
bayazee/Zereshk
refs/heads/master
zereshk/core/zclient.py
1
import zmq import sys port = 7766 context = zmq.Context() print "Connecting to server..." socket = context.socket(zmq.REQ) # socket.connect("tcp://192.168.1.12:%s" % port) socket.connect("tcp://localhost:%s" % port) if len(sys.argv) > 1: link = sys.argv[1] print "Sending link ", link, "..." socket.send_...
PriceChild/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_ironic_node.py
49
#!/usr/bin/python # coding: utf-8 -*- # (c) 2015, Hewlett-Packard Development Company, L.P. # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
lach76/scancode-toolkit
refs/heads/develop
tests/cluecode/data/ics/chromium-testing-gmock-test/gmock_test_utils.py
13
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # 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 following disclaimer. # * Redistributions ...
mjfarmer/scada_py
refs/heads/master
env/lib/python2.7/site-packages/zope/interface/tests/test_interfaces.py
27
import unittest class _ConformsToIObjectEvent(object): def _makeOne(self, target=None): if target is None: target = object() return self._getTargetClass()(target) def test_class_conforms_to_IObjectEvent(self): from zope.interface.interfaces import IObjectEvent fro...
MER-GROUP/intellij-community
refs/heads/master
python/testData/inspections/PyTupleAssignmentBalanceInspection/src/test.py
53
a, b, c = 1, 2, 3, 4 a, b, c = foo, bar a, b, c, d = 1, 2, 3, 4 a = 1, 2, 3, 4 a, b, c = 2
pombredanne/grr
refs/heads/master
executables/python_hacks/shutdown_host.py
16
#!/usr/bin/env python """Shut down windows hosts.""" import platform tested_versions = ['xp', 'vista', '2008', '2003'] cmd = 'cmd' args = ['/c', '%SystemRoot%\\System32\\shutdown.exe', '/s', '/f'] os_version = platform.platform().lower() # pylint: disable=undefined-variable if 'time_in_seconds' in py_args: args.ex...
ahuarte47/QGIS
refs/heads/master
tests/src/python/test_qgsreport.py
45
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsReport .. note:: 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. """ __author...
poljeff/odoo
refs/heads/8.0
addons/point_of_sale/controllers/__init__.py
382
import main # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
FCP-INDI/C-PAC
refs/heads/master
CPAC/utils/interfaces/__init__.py
1
from . import function from . import masktool from . import pc from . import brickstat from . import datasink __all__ = [ 'function', 'masktool', 'pc', 'brickstat', 'datasink', ]
philipn/django-south
refs/heads/localwiki_master
south/introspection_plugins/__init__.py
129
# This module contains built-in introspector plugins for various common # Django apps. # These imports trigger the lower-down files import south.introspection_plugins.geodjango import south.introspection_plugins.django_audit_log import south.introspection_plugins.django_tagging import south.introspection_plugins.djang...
wfxiang08/django178
refs/heads/master
tests/context_processors/tests.py
21
""" Tests for Django's bundled context processors. """ from django.test import TestCase class RequestContextProcessorTests(TestCase): """ Tests for the ``django.core.context_processors.request`` processor. """ urls = 'context_processors.urls' def test_request_attributes(self): """ ...
jriehl/numba
refs/heads/master
numba/tests/test_warnings.py
1
from __future__ import print_function import warnings import numpy as np import numba.unittest_support as unittest from numba import jit from numba.errors import NumbaWarning, deprecated, NumbaDeprecationWarning from numba import errors class TestBuiltins(unittest.TestCase): def check_objmode_deprecation_warnin...
nitin-cherian/LifeLongLearning
refs/heads/master
Web_Development_Python/RealPython/real-python-test/env/lib/python3.5/site-packages/pip/commands/hash.py
514
from __future__ import absolute_import import hashlib import logging import sys from pip.basecommand import Command from pip.status_codes import ERROR from pip.utils import read_chunks from pip.utils.hashes import FAVORITE_HASH, STRONG_HASHES logger = logging.getLogger(__name__) class HashCommand(Command): ""...
elventear/ansible
refs/heads/devel
contrib/inventory/fleet.py
56
#!/usr/bin/env python """ fleetctl base external inventory script. Automatically finds the IPs of the booted coreos instances and returns it under the host group 'coreos' """ # Copyright (C) 2014 Andrew Rothstein <andrew.rothstein at gmail.com> # # This program is free software: you can redistribute it and/or modify ...
gsathya/bridgedb
refs/heads/master
lib/bridgedb/__init__.py
6
# # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2007-2013, The Tor Project, Inc. # (c) 2007-2013, all entities within the AUTHORS file # :license: 3-clause BS...
ecosoft-odoo/odoo
refs/heads/8.0
addons/website_crm/__init__.py
1350
import controllers
dahlstrom-g/intellij-community
refs/heads/master
python/testData/codeInsight/mlcompletion/prev2calls/assignmentVisitorCheckAnotherPackage.py
10
import pandas as pd def foo: pass df = pd.read_csv(pd.compat.StringIO(fruit_price)) df['label'] = df.apply(foo, axis=1) <caret>
jawad6233/MT6795.kernel
refs/heads/master
alps/kernel-3.10/tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
yoer/hue
refs/heads/master
apps/oozie/src/oozie/migrations/0015_auto__add_field_dataset_advanced_start_instance__add_field_dataset_ins.py
39
# 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 field 'Dataset.advanced_start_instance' db.add_column('oozie_dataset', 'advanced_start_instance', self.gf...
jvdm/AutobahnPython
refs/heads/master
examples/twisted/websocket/echo_tls/client.py
11
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
doctorOb/thoughtsbydrob
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/filters/__init__.py
196
# -*- coding: utf-8 -*- """ pygments.filters ~~~~~~~~~~~~~~~~ Module containing filter lookup functions and default filters. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.token import String, Comment, Ke...
GitHublong/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/m2m_signals/tests.py
150
""" Testing signals emitted on changing m2m relations. """ from .models import Person from django.db import models from django.test import TestCase from .models import Part, Car, SportsCar, Person class ManyToManySignalsTest(TestCase): def m2m_changed_signal_receiver(self, signal, sender, **kwargs): me...
erkrishna9/odoo
refs/heads/master
addons/account/report/account_entries_report.py
16
# -*- 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...
resba/gnuradio
refs/heads/master
gr-noaa/apps/usrp_rx_hrpt_nogui.py
6
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: USRP HRPT Receiver # Generated: Thu Oct 27 13:49:01 2011 ################################################## from gnuradio import digital from gnuradio import eng_notation from gnuradio import gr from gnuradio...
OlafLee/theano_exercises
refs/heads/master
02_advanced/01_symbolic/02_traverse_soln.py
14
import numpy as np from theano.gof import Variable from theano import tensor as T def arg_to_softmax(prob): """ Oh no! Someone has passed you the probability output, "prob", of a softmax function, and you want the unnormalized log probability--the argument to the softmax. Verify that prob really i...
pydoit/doit
refs/heads/master
tests/test_action.py
2
import os import sys import tempfile import textwrap import locale locale # quiet pyflakes from pathlib import PurePath, Path from io import StringIO, BytesIO from threading import Thread import time from sys import executable from unittest.mock import Mock import pytest from doit import action from doit.task import ...
rimbalinux/LMD3
refs/heads/master
django/utils/daemonize.py
13
import os import sys if os.name == 'posix': def become_daemon(our_home_dir='.', out_log='/dev/null', err_log='/dev/null', umask=022): "Robustly turn into a UNIX daemon, running in our_home_dir." # First fork try: if os.fork() > 0: ...
Alwnikrotikz/pyglet
refs/heads/master
pyglet/libs/x11/xf86vmode.py
46
'''Wrapper for Xxf86vm Generated with: tools/genwrappers.py xf86vmode Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('Xxf86vm') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'):...
gfneto/bitcoin-abe
refs/heads/master
build/lib.linux-x86_64-2.7/Abe/DataStore.py
6
# Copyright(C) 2011,2012,2013,2014 by Abe developers. # DataStore.py: back end database access for Abe. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
asimshankar/tensorflow
refs/heads/master
tensorflow/tools/compatibility/reorders_v2.py
2
# Copyright 2018 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...
xuxiao19910803/edx
refs/heads/master
lms/djangoapps/courseware/tests/test_lti_integration.py
114
"""LTI integration tests""" from collections import OrderedDict import json import mock from nose.plugins.attrib import attr import oauthlib import urllib from django.conf import settings from django.core.urlresolvers import reverse from courseware.tests import BaseTestXmodule from courseware.views import get_course...
amferraz/download4chan
refs/heads/master
download4chan/download4chan/pipelines.py
1
# coding: utf-8 from scrapy.contrib.pipeline.images import ImagesPipeline class Image4ChanDownloadPipeline(ImagesPipeline): def image_key(self, url): image_guid = url.split('/')[-1] return 'full/%s.jpg' % (image_guid)
lahosken/pants
refs/heads/master
testprojects/tests/python/pants/timeout/test_exceeds_timeout.py
12
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import time def test_within_timeout(): time.sleep(0.1) def test_exceeds_timeout(): time.sleep(120)
patrickwestphal/owlapy
refs/heads/master
owlapy/model/owlontologyid.py
1
class OWLOntologyID(object): """TODO: implement""" def __init__(self, ontology_iri=None, version_iri=None): """ :param ontology_iri: an owlapy.model.IRI object :param version_iri: an owlapy.model.IRI object """ pass
little-dude/monolithe
refs/heads/master
monolithe/generators/sdkgenerator.py
2
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent 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 # no...
raptorz/userga
refs/heads/master
config.py
1
# -*- coding: utf-8 -*- """ default config file :copyright: 20160204 by raptor.zh@gmail.com. """ #from __future__ import unicode_literals import sys PY3=sys.version>"3" from os.path import dirname, abspath, expanduser, join as joinpath import json import logging logger = logging.getLogger(__name__) config...
maljac/odoomrp-wip
refs/heads/8.0
purchase_packaging_info/__init__.py
379
# -*- encoding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from . import models
vongochung/buiquocviet
refs/heads/master
django/forms/widgets.py
73
""" HTML Widget classes """ from __future__ import absolute_import import copy import datetime from itertools import chain from urlparse import urljoin from django.conf import settings from django.forms.util import flatatt, to_current_timezone from django.utils.datastructures import MultiValueDict, MergeDict from dj...
etherkit/OpenBeacon2
refs/heads/master
macos/venv/lib/python3.8/site-packages/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py
3
#----------------------------------------------------------------------------- # Copyright (c) 2014-2020, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
ArseniyK/Sunflower
refs/heads/master
application/main.py
2
import os import sys try: # try to import GTK import pygtk pygtk.require20() import gtk except: # print error and die print "Error starting Sunflower, missing GTK 2.0+" sys.exit(1) try: from setproctitle import setproctitle setproctitle('sunflower') except ImportError: pass # add search path application_p...
pquentin/django
refs/heads/stable/1.8.x
tests/auth_tests/test_forms.py
12
from __future__ import unicode_literals import re from django import forms from django.contrib.auth.forms import ( AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ) from django.contrib.auth...
KMK-ONLINE/ansible
refs/heads/devel
lib/ansible/galaxy/token.py
68
#!/usr/bin/env python ######################################################################## # # (C) 2015, Chris Houseknecht <chouse@ansible.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...
nhomar/odoo
refs/heads/8.0
openerp/osv/expression.py
42
# -*- 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...
sss/calibre-at-bzr
refs/heads/upstream/master
src/calibre/ebooks/metadata/haodoo.py
24
# -*- coding: utf-8 -*- ''' Read meta information from Haodoo.net pdb files. ''' __license__ = 'GPL v3' __copyright__ = '2012, Kan-Ru Chen <kanru@kanru.info>' __docformat__ = 'restructuredtext en' from calibre.ebooks.pdb.header import PdbHeaderReader from calibre.ebooks.pdb.haodoo.reader import Reader def get_met...
yaii/yai
refs/heads/alpha
share/symbols/i18n.py
4
#!/usr/bin/env python from xml.dom import minidom import sys sys.stdout.write("char * stringlst = [") for filename in sys.argv[1:]: doc = minidom.parse(filename) symbols = doc.getElementsByTagName('title') if symbols: for symbol in symbols: sys.stdout.write("\n/* Symbols: " + fil...
xaviercobain88/framework-python
refs/heads/master
build/lib.linux-i686-2.7/openerp/addons/base/ir/ir_attachment.py
12
# -*- 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...
pozetroninc/micropython
refs/heads/stable
tests/basics/with_return.py
82
class CtxMgr: def __init__(self, id): self.id = id def __enter__(self): print("__enter__", self.id) return self def __exit__(self, a, b, c): print("__exit__", self.id, repr(a), repr(b)) # simple case def foo(): with CtxMgr(1): return 4 print(foo()) # for loop ...
guessit-io/guessit
refs/heads/develop
guessit/test/test_main.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=no-self-use, pointless-statement, missing-docstring, invalid-name import json import os import sys import pytest from _pytest.capture import CaptureFixture from ..__main__ import main __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dir...
wjw12/emc
refs/heads/master
EMC.py
1
""" Inplementation of EMC algorithm for 2D image reconstruction using sparse data Reference: Hugh T. Philipp, Kartik Ayyer, Mark W. Tate, Veit Elser, and Sol M. Gruner, "Solving structure with sparse, randomly-oriented x-ray data", OPTICS EXPRESS, 2012 X-ray data can be downloaded from http://cxidb.org/id-...
archen/django
refs/heads/master
django/db/models/sql/compiler.py
6
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db.backends.utils import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import select_related_descend, QueryWrapper from django.db.models.sql.constants import (C...
0x7E/ubuntu-tweak
refs/heads/master
ubuntutweak/utils/parser.py
4
import os import json import urllib from ubuntutweak.common import consts class Parser(dict): def __init__(self, file, key): try: self.__data = json.loads(open(file).read()) self.init_items(key) except: self.is_available = False else: self.is...
vadimtk/chrome4sdp
refs/heads/master
tools/traceline/traceline/scripts/split.py
186
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Splits a single json file (read from stdin) into separate files of 40k records, named split.X. """ import sys def main(): f...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/network_interface_ip_configuration_py3.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 ...
BIT-SYS/gem5-spm-module
refs/heads/master
ext/ply/example/BASIC/basiclex.py
166
# An implementation of Dartmouth BASIC (1964) from ply import * keywords = ( 'LET','READ','DATA','PRINT','GOTO','IF','THEN','FOR','NEXT','TO','STEP', 'END','STOP','DEF','GOSUB','DIM','REM','RETURN','RUN','LIST','NEW', ) tokens = keywords + ( 'EQUALS','PLUS','MINUS','TIMES','DIVIDE','POWER', 'LPAREN...
AIML/scikit-learn
refs/heads/master
sklearn/utils/metaestimators.py
283
"""Utilities for meta-estimators""" # Author: Joel Nothman # Andreas Mueller # Licence: BSD from operator import attrgetter from functools import update_wrapper __all__ = ['if_delegate_has_method'] class _IffHasAttrDescriptor(object): """Implements a conditional property using the descriptor protocol. ...
OAButton/odb
refs/heads/master
portality/view/media.py
2
''' An auth-controlled access and retrieval mechanism for a media folder ''' import json, os from flask import Blueprint, request, url_for, flash, redirect, abort, make_response from flask import render_template from flask.ext.login import current_user import werkzeug from portality.core import app import portality...
evalsocket/tensorflow
refs/heads/master
object_detection/object_detection/builders/post_processing_builder_test.py
21
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mansonul/events
refs/heads/master
events/contrib/plugins/form_elements/fields/null_boolean/apps.py
1
__title__ = 'fobi.contrib.plugins.form_elements.fields.null_boolean.apps' __author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>' __copyright__ = '2014-2017 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('Config',) try: from django.apps import AppConfig class Config(AppConfig): """...
bneg/Empire
refs/heads/master
lib/modules/powershell/situational_awareness/network/powerview/get_group_member.py
3
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-DomainGroupMember', 'Author': ['@harmj0y'], 'Description': ('Returns the members of a given group, with the option to "Recurse" to find all effective grou...
Arcanemagus/SickRage
refs/heads/master
lib/pbr/hooks/commands.py
24
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # Unles...
tbinjiayou/Odoo
refs/heads/master
openerp/modules/migration.py
279
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
stefanklug/mapnik
refs/heads/master
scons/scons-local-2.3.6/SCons/Tool/sunlink.py
4
"""SCons.Tool.sunlink Tool-specific initialization for the Sun Solaris (Forte) linker. There 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 - 2015 The SCons Foundation # # Permission is here...
michaelhowden/eden
refs/heads/master
modules/tests/run_pdf_tests.py
19
#!/usr/bin/env python # -*- coding: utf-8 -*- # Needs to be run in the web2py environment # python web2py.py -S eden -M -R applications/clean/modules/tests/run_pdf_tests.py import os from gluon import * from gluon.storage import Storage from s3.s3rest import S3Request from gluon.contrib.pdfinvoice import PDF WRITE_P...
JanDintel/ansible
refs/heads/devel
test/units/plugins/vars/__init__.py
7690
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
pancentric/django-cms
refs/heads/develop
cms/plugins/file/migrations/0002_freeze.py
11
# -*- coding: utf-8 -*- from south.db import db from django.db import models from cms.plugins.file.models import * class Migration: def forwards(self, orm): "Write your forwards migration here" def backwards(self, orm): "Write your backwards migration here" models = { 'cms.cmsplu...
alistairlow/tensorflow
refs/heads/master
tensorflow/contrib/text/python/ops/skip_gram_ops.py
76
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
FHannes/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/dispatch.py
91
# dispatch.py - command dispatching for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ import os, sys, atexit, signal, pdb, socket, errno, shlex,...
cmspsgp31/anubis
refs/heads/master
anubis/app/apps.py
1
# Copyright (C) 2016, Ugo Pozo 2016, Câmara Municipal de São Paulo # apps.py - configurações do aplicativo Anubis. # Este arquivo é parte do software Anubis. # Anubis é um software livre: você pode redistribuí-lo e/ou # modificá-lo sob os termos da Licença Pública Geral GNU (GNU General Public # License), tal como é...
msebire/intellij-community
refs/heads/master
python/testData/psi/ExecPy3.py
105
def exec(): pass
talau/ns-3.18-wifi-queue-red
refs/heads/master
src/virtual-net-device/bindings/modulegen__gcc_LP64.py
24
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)) ...
kionz/librime
refs/heads/master
thirdparty/src/opencc/deps/gtest-1.7.0/test/gtest_list_tests_unittest.py
1898
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
qqzwc/XX-Net
refs/heads/master
code/default/python27/1.0/lib/hmac.py
70
"""HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. """ import warnings as _warnings from operator import _compare_digest as compare_digest trans_5C = "".join ([chr (x ^ 0x5C) for x in xrange(256)]) trans_36 = "".join ([chr (x ^ 0x36) for x in x...
cselis86/edx-platform
refs/heads/installer
common/lib/capa/capa/checker.py
123
#!/usr/bin/env python """ Commandline tool for doing operations on Problems """ from __future__ import unicode_literals import argparse import logging import sys from path import path from cStringIO import StringIO from calc import UndefinedVariable from capa.capa_problem import LoncapaProblem from mako.lookup impor...
skylander86/ycml
refs/heads/master
setup.py
1
import os from setuptools import setup, find_packages import sys if sys.version_info.major < 3: raise Exception('This is a Python 3 only package. Please upgrade.') #end if SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(SCRIPT_DIR, 'README.rst'), 'r') as readme_file: readme = ...