repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
panmingzhi815/git | refs/heads/master | git-p4.py | 124 | #!/usr/bin/env python
#
# git-p4.py -- A tool for bidirectional operation between a Perforce depot and git.
#
# Author: Simon Hausmann <simon@lst.de>
# Copyright: 2007 Simon Hausmann <simon@lst.de>
# 2007 Trolltech ASA
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
#
import sys
if sys.he... |
proxysh/Safejumper-for-Mac | refs/heads/master | buildlinux/env64/lib/python2.7/site-packages/twisted/test/test_sslverify.py | 11 | # Copyright 2005 Divmod, Inc. See LICENSE file for details
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.internet._sslverify}.
"""
from __future__ import division, absolute_import
import sys
import itertools
import datetime
from zope.interface import implementer
fr... |
orgito/ansible | refs/heads/devel | lib/ansible/modules/cloud/memset/memset_zone.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018, Simon Weald <ansible@simonweald.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata... |
barakh/RushHour | refs/heads/master | detection/gen_stamp.py | 1 | <<<<<<< HEAD
import pygame
from detection import HUE_MAX, DIFFERENT_COLORS
import colorsys
BLACK = ( 0, 0, 0)
WHITE = (255, 255, 255)
BLUE = ( 0, 0, 255)
GREEN = ( 0, 255, 0)
RED = (255, 0, 0)
WIDTH = 330
LENGTH = 770
COLORS = [int(HUE_MAX * (float(i)+0.5)/DIFFERENT_COLORS)
... |
crash-g/BoardGameBot | refs/heads/github | boardgamebot/objects/background_task.py | 1 | """This module contains threads that run in background.
"""
import threading
import logging
import constants
from tools import persistence_unit
logger = logging.getLogger("background_task")
class Historian(threading.Thread):
"""This thread regularly saves the history on file.
"""
def __init__(self, event... |
adrian-ionescu/apache-spark | refs/heads/master | python/pyspark/daemon.py | 79 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
zhenglaizhang/python | refs/heads/master | defshine/0024/awesome-flask-todo/config.py | 40 | SECRET_KEY = "never tell you"
MONGODB_SETTINGS = {'DB': 'todo_db'} |
holzman/meliae | refs/heads/master | track_memory.py | 3 | # Copyright (C) 2009, 2010 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRA... |
ekosareva/networking-vsphere | refs/heads/master | networking_vsphere/drivers/vc_driver.py | 2 | # Copyright (c) 2015 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/LICEN... |
willprice/arduino-sphere-project | refs/heads/master | scripts/example_direction_finder/temboo/Library/Stripe/InvoiceItems/CreateInvoiceItem.py | 5 | # -*- coding: utf-8 -*-
###############################################################################
#
# CreateInvoiceItem
# Adds a charge or credit to the customer's next invoice.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
#... |
enricopal/STEM | refs/heads/master | src/ml/stacking_create_training_set_duke.py | 3 | import optparse
from collections import defaultdict
import numpy as np
#we need to parse the ensemble duke output raw file, which contains the outputs of N different configurations of duke
#in the file, the output of each configuration is separated by "End of run"
#we need to create a Nx20 matrix, in which the rows ar... |
Maccimo/intellij-community | refs/heads/master | python/testData/intentions/PyInvertIfConditionIntentionTest/commentsMultilineNoElseReturnIfNoFollowup_after.py | 10 | def func():
value = "not-none"
if value is not None:
return
# Is none
# If it's none
print("None") |
CumulusNetworks/ifupdown2 | refs/heads/master | ifupdown2/lib/base_objects.py | 1 | # Copyright (C) 2017, 2018 Cumulus Networks, Inc. all rights reserved
#
# 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; version 2.
#
# This program is distributed in the hope that it will be use... |
rohanpm/qingfanyi | refs/heads/master | tests/test_dict.py | 1 | # coding=utf-8
# qingfanyi - Chinese to English translation tool
# Copyright (C) 2016 Rohan McGovern <rohan@mcgovern.id.au>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of ... |
asedunov/intellij-community | refs/heads/master | python/testData/MockSdk3.2/Lib/abc.py | 105 | # Stubs
class object:
pass
class ABCMeta:
pass
def abstractmethod(foo):
pass |
RenaudParis/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/wptserve/setup.py | 193 | from setuptools import setup
PACKAGE_VERSION = '1.3.0'
deps = []
setup(name='wptserve',
version=PACKAGE_VERSION,
description="Python webserver intended for in web browser testing",
long_description=open("README.md").read(),
# Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifi... |
roatienza/dl-keras | refs/heads/master | chapter3-deep-networks/cifar10-sampler-3.1.0.py | 1 | '''
Demonstrates how to sample and plot CIFAR10 images
using Keras API
Project: https://github.com/roatienza/dl-keras
Usage: python3 <this file>
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# numpy package
import numpy as np
import math
# keras mni... |
zero-rp/miniblink49 | refs/heads/master | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_win.py | 50 | # Copyright (C) 2013 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 ... |
cgar/servo | refs/heads/master | tests/wpt/css-tests/css-text-3_dev/html/reference/support/generate-segment-break-transformation-rules-tests.py | 324 | #!/usr/bin/env python
# - * - coding: UTF-8 - * -
"""
This script generates tests segment-break-transformation-rules-001 ~ 049 which
cover all possible combinations of characters at two sides of segment breaks.
More specifically, there are seven types of characters involve in these rules:
1. East Asian Full-width (F)... |
d3trax/asuswrt-merlin | refs/heads/master | release/src/router/libxml2/python/tests/reader7.py | 87 | #!/usr/bin/python -u
#
# this tests the entities substitutions with the XmlTextReader interface
#
import sys
import StringIO
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
result = ""
def processNode(reader):
global result
result = result + "%d %d %s %d\n" % (reader.Depth(), reader.NodeType(),... |
ValyrianTech/BitcoinSpellbook-v0.3 | refs/heads/master | uptime_check.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import argparse
import requests
import platform
from helpers.configurationhelpers import get_host, get_port
from helpers.loghelpers import LOG, logs_dir
from helpers.mailhelpers import sendmail
from helpers.runcommandprocess import RunCommandProcess
from helper... |
earshel/PokeyPySnipe | refs/heads/master | POGOProtos/Data/Logs/FortSearchLogEntry_pb2.py | 15 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Data/Logs/FortSearchLogEntry.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.prot... |
okajun35/python_for_android_doc_ja | refs/heads/master | pythonforandroid/recipes/png/__init__.py | 7 | from pythonforandroid.recipe import NDKRecipe
class PngRecipe(NDKRecipe):
name = 'png'
version = '1.6.15'
url = 'https://github.com/julienr/libpng-android/archive/{version}.zip'
generated_libraries = ['libpng.a']
recipe = PngRecipe()
|
nicko96/Chrome-Infra | refs/heads/master | infra/services/gnumbd/__init__.py | 12133432 | |
bitcity/django | refs/heads/master | tests/admin_scripts/simple_app/__init__.py | 12133432 | |
saurabh6790/medapp | refs/heads/master | setup/report/item_wise_price_list_rate/__init__.py | 12133432 | |
onitake/ansible | refs/heads/devel | lib/ansible/modules/cloud/vmware/vmware_host_powerstate.py | 56 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ =... |
google-code-export/oppia | refs/heads/master | core/controllers/home.py | 6 | # Copyright 2014 The Oppia 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 ... |
thomasxu1991/three.js | refs/heads/master | utils/build/build.py | 144 | #!/usr/bin/env python
import sys
if sys.version_info < (2, 7):
print("This script requires at least Python 2.7.")
print("Please, update to a newer version: http://www.python.org/download/releases/")
# exit()
import argparse
import json
import os
import shutil
import tempfile
from io import open
def main(argv=Non... |
jkbjh/pyrsistent | refs/heads/master | tests/memory_profiling.py | 3 | """
Script to try do detect any memory leaks that may be lurking in the C implementation of the PVector.
"""
import inspect
import sys
import time
import memory_profiler
import vector_test
from pyrsistent import pvector
try:
import pvectorc
except ImportError:
print("No C implementation of PVector available, t... |
jmjordan/python-plexapi | refs/heads/master | examples/__init__.py | 12133432 | |
chazy/reviewboard | refs/heads/gradeboard | reviewboard/admin/__init__.py | 12133432 | |
Tejal011089/med2-app | refs/heads/master | portal/__init__.py | 12133432 | |
danmergens/mi-instrument | refs/heads/master | mi/dataset/driver/ctdmo_ghqr/sio/__init__.py | 12133432 | |
ytjiang/django | refs/heads/master | tests/migrations/faulty_migrations/__init__.py | 12133432 | |
Architektor/PySnip | refs/heads/master | venv/lib/python2.7/site-packages/pyasn1/type/tagmap.py | 172 | from pyasn1 import error
class TagMap:
def __init__(self, posMap={}, negMap={}, defType=None):
self.__posMap = posMap.copy()
self.__negMap = negMap.copy()
self.__defType = defType
def __contains__(self, tagSet):
return tagSet in self.__posMap or \
self.__... |
samthor/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/gis/management/commands/ogrinspect.py | 324 | import os, sys
from optparse import make_option
from django.contrib.gis import gdal
from django.contrib.gis.management.base import ArgsCommand, CommandError
def layer_option(option, opt, value, parser):
"""
Callback for `make_option` for the `ogrinspect` `layer_key`
keyword option which may be an integer o... |
steven-cutting/icsisumm | refs/heads/master | icsisumm-primary-sys34_v1/nltk/nltk-0.9.2/nltk/corpus/reader/chunked.py | 9 | # Natural Language Toolkit: Chunked Corpus Reader
#
# Copyright (C) 2001-2008 University of Pennsylvania
# Author: Steven Bird <sb@ldc.upenn.edu>
# Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
"""
A reader for corpora that contain chunked ... |
RedHatInsights/insights-core | refs/heads/master | insights/parsers/ntp_sources.py | 1 | """
NTP sources - remote clock info from ``ntpq`` and ``chronyc``
=============================================================
The parsers here provide information about the time sources used by
``ntpd`` and ``chronyd``. These are gathered from the output of the
``ntpq -pn`` and ``chronyc sources`` commands respecti... |
NunoEdgarGub1/scikit-learn | refs/heads/master | sklearn/decomposition/tests/test_factor_analysis.py | 222 | # Author: Christian Osendorfer <osendorf@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Licence: BSD3
import numpy as np
from sklearn.utils.testing import assert_warns
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_greater
from sklearn.utils.testing im... |
perrygeo/simanneal | refs/heads/master | examples/watershed/watershed_condition.py | 1 | import math
import sys
import os
sys.path.append(os.path.abspath('../'))
from anneal import Annealer
import shapefile
import random
#-----------------------------------------------#
#-------------- Configuration ------------------#
#-----------------------------------------------#
shp = './data/huc6_4326.shp'
specie... |
tkaitchuck/nupic | refs/heads/master | external/common/lib/python2.6/site-packages/unittest2/signals.py | 155 | import signal
import weakref
from unittest2.compatibility import wraps
__unittest = True
class _InterruptHandler(object):
def __init__(self, default_handler):
self.called = False
self.default_handler = default_handler
def __call__(self, signum, frame):
installed_handler = signal.get... |
JohnUrban/poreminion | refs/heads/master | poreminion/events_tools_pm.py | 1 | import sys
import h5py
import numpy as np
from info import *
# raw files: start, length, mean, var
# base called files: mean, stddev, start, length
# order of parameters differs in raw vs. basecalled files
# also, std dev used in 1, and variance used in other
# need to interpret which filetype reading an... |
chenjun0210/tensorflow | refs/heads/master | tensorflow/contrib/layers/python/layers/regularizers_test.py | 38 | # 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... |
magland/mountainsort | refs/heads/master | packages/pyms/synthesis/p_synthesize_drifting_timeseries.py | 1 | import numpy as np
import scipy.interpolate as spi
import sys,os
parent_path=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(parent_path)
from p_synthesize_timeseries import synthesize_timeseries
from mlpy import readmda,writemda32,writemda64
processor_name='pyms.synthesize_drifting_time... |
hynnet/hiwifi-openwrt-HC5661-HC5761 | refs/heads/master | staging_dir/host/lib/python2.7/test/test_longexp.py | 212 | import unittest
from test import test_support
class LongExpText(unittest.TestCase):
def test_longexp(self):
REPS = 65580
l = eval("[" + "2," * REPS + "]")
self.assertEqual(len(l), REPS)
def test_main():
test_support.run_unittest(LongExpText)
if __name__=="__main__":
test_main()
|
marc-sensenich/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/cloudformation.py | 7 | #!/usr/bin/python
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['st... |
ncdesouza/bookworm | refs/heads/master | env/lib/python2.7/site-packages/pip/_vendor/requests/exceptions.py | 341 | # -*- coding: utf-8 -*-
"""
requests.exceptions
~~~~~~~~~~~~~~~~~~~
This module contains the set of Requests' exceptions.
"""
from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
class RequestException(IOError):
"""There was an ambiguous exception that occurred while handling your
request.""... |
bdh1011/wau | refs/heads/master | venv/lib/python2.7/site-packages/IPython/sphinxext/custom_doctests.py | 37 | """
Handlers for IPythonDirective's @doctest pseudo-decorator.
The Sphinx extension that provides support for embedded IPython code provides
a pseudo-decorator @doctest, which treats the input/output block as a
doctest, raising a RuntimeError during doc generation if the actual output
(after running the input) does no... |
DasIch/django | refs/heads/master | tests/migrations/test_migrations_squashed/0002_second.py | 564 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("migrations", "0001_initial")]
operations = [
migrations.DeleteModel("Tribble"),
migrations.RemoveField("Author", "silly_field")... |
nikolas/edx-platform | refs/heads/master | common/test/acceptance/fixtures/course.py | 63 | """
Fixture to create a course and course components (XBlocks).
"""
import mimetypes
import json
import datetime
from textwrap import dedent
from collections import namedtuple
from path import path
from opaque_keys.edx.keys import CourseKey
from . import STUDIO_BASE_URL
from .base import XBlockContainerFixture, Fi... |
VandroiyLabs/FaroresWind | refs/heads/master | faroreswind/collector/ElectronicNose.py | 1 | import serial
import numpy as np
import json
from datetime import datetime
class ElectronicNose:
def __init__(self, devAdd='/dev/ttyUSB0', baudrate=115200/3, \
tmax = 1000, outputFile = '', numSensors = 8):
## Creating the serial object
self.Sensor = serial.Serial(devAdd, baud... |
coursemdetw/2015cd_midterm | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/string.py | 734 | """A collection of string constants.
Public module variables:
whitespace -- a string containing all ASCII whitespace
ascii_lowercase -- a string containing all ASCII lowercase letters
ascii_uppercase -- a string containing all ASCII uppercase letters
ascii_letters -- a string containing all ASCII letters
digits -- a ... |
loco-odoo/localizacion_co | refs/heads/master | openerp/addons-extra/odoo-pruebas/odoo-server/addons/l10n_fr_hr_payroll/__openerp__.py | 374 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.2/tests/regressiontests/serializers_regress/models.py | 54 | """
A test spanning all the capabilities of all the serializers.
This class sets up a model for each model field type
(except for image types, because of the PIL dependency).
"""
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
fro... |
aplanas/rally | refs/heads/master | tests/functional/test_task_samples.py | 2 | # Copyright 2014: Mirantis Inc.
# Copyright 2014: Catalyst IT Ltd.
# 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/L... |
xfournet/intellij-community | refs/heads/master | python/testData/inspections/PyPackageRequirementsInspection/ImportsNotInRequirementsTxt/test2.py | 12133432 | |
ahamilton55/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/__init__.py | 12133432 | |
DNFcode/edx-platform | refs/heads/master | lms/djangoapps/shoppingcart/processors/tests/__init__.py | 12133432 | |
xuxiao19910803/edx | refs/heads/master | common/djangoapps/xblock_django/__init__.py | 12133432 | |
avistous/QSTK | refs/heads/master | __init__.py | 12133432 | |
hectord/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/tests/regressiontests/test_runner/__init__.py | 12133432 | |
sayanriju/marchfluxmenu | refs/heads/master | mfm_generate.py | 1 | # /usr/bin/env python
## Filename: mfm_generate.py
import os, fnmatch
import cPickle as pickle
from main import *
''' Generates the Fluxbox Menu '''
for file in os.listdir('/usr/share/applications/'):
if fnmatch.fnmatch(file,'*.desktop'):
try:
item = ParseDesktopFile('/usr/share/applications/'+file)
submenu... |
theanti9/FastGeo | refs/heads/master | tests/time_test.py | 1 | from FastGeo import GeoDB
import sys, random
from datetime import datetime
if __name__ == '__main__':
t = GeoDB()
print "Running 50000 random lookups..."
milli_diff = lambda a: ((a.days*24*60*60 + a.seconds) * 1000 + a.microseconds/1000.0)
total = 0.0
for _ in xrange(50000):
milli_diff
ip = random.ran... |
porduna/weblabdeusto | refs/heads/master | server/src/weblab/core/static/jQuery-File-Upload-9.8.0/server/gae-python/main.py | 3 | # -*- coding: utf-8 -*-
#
# jQuery File Upload Plugin GAE Python Example 2.2.0
# https://github.com/blueimp/jQuery-File-Upload
#
# Copyright 2011, Sebastian Tschan
# https://blueimp.net
#
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT
#
from __future__ import print_function, unicode_literals... |
it-projects-llc/pos-addons | refs/heads/13.0 | pos_debt_notebook_sync/controllers/pos_debt_sync_controller.py | 1 | # Copyright 2017 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT).
import odoo
from odoo.http import request
try:
from odoo.addons.bus.controllers.main import BusContro... |
dheerajjamwal/Backport_ltsi_3.14.22 | refs/heads/3.14.22-ltsi | scripts/rt-tester/rt-tester.py | 11005 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... |
proxysh/Safejumper-for-Mac | refs/heads/master | buildlinux/env64/lib/python2.7/site-packages/twisted/conch/test/test_insults.py | 13 | # -*- test-case-name: twisted.conch.test.test_insults -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.python.reflect import namedAny
from twisted.trial import unittest
from twisted.test.proto_helpers import StringTransport
from twisted.conch.insults.insults import ServerProtoc... |
glwu/python-for-android | refs/heads/master | python-modules/twisted/twisted/web/test/test_distrib.py | 52 | # Copyright (c) 2008-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.web.distrib}.
"""
from os.path import abspath
from xml.dom.minidom import parseString
try:
import pwd
except ImportError:
pwd = None
from zope.interface.verify import verifyObject
from twisted.python im... |
andrew-murray/google-python-class | refs/heads/master | logpuzzle/logpuzzle.py | 147 | #!/usr/bin/python
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
import os
import re
import sys
import urllib
"""Logpuzzle exercise
Given an apache logfile, ... |
retomerz/intellij-community | refs/heads/master | python/testData/copyPaste/singleLine/Indent11.after.py | 83 | class C:
def foo(self):
x = 1y = 2
|
lixiguangzhou/OMOOC2py | refs/heads/master | _src/om2py2w/2wex1/main.py | 12133432 | |
yamaguchiyuto/omniprop | refs/heads/master | lib/__init__.py | 12133432 | |
lagopus/ryu-lagopus-ext | refs/heads/master | ryu/services/protocols/bgp/info_base/vrf4.py | 52 | # Copyright (C) 2014 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
pizzathief/scipy | refs/heads/master | scipy/sparse/csgraph/_validation.py | 21 | import numpy as np
from scipy.sparse import csr_matrix, isspmatrix, isspmatrix_csc
from ._tools import csgraph_to_dense, csgraph_from_dense,\
csgraph_masked_from_dense, csgraph_from_masked
DTYPE = np.float64
def validate_graph(csgraph, directed, dtype=DTYPE,
csr_output=True, dense_output=True,... |
rca/issuebranch | refs/heads/master | src/webapp/webapp/settings.py | 1 | """
Django settings for webapp project.
Generated by 'django-admin startproject' using Django 1.11.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
... |
amacd31/hydromet-toolkit | refs/heads/master | load_aao.py | 1 | import argparse
import calendar
import copy
import glob
import shutil
import subprocess
import numpy as np
import pandas as pd
from sqlalchemy.exc import IntegrityError
from datetime import datetime
from urllib2 import urlopen
from phildb.database import PhilDB
from phildb.exceptions import DuplicateError
def main... |
n0trax/ansible | refs/heads/devel | lib/ansible/modules/system/openwrt_init.py | 26 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Andrew Gaffney <andrew@agaffney.org>
# 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',
... |
ingokegel/intellij-community | refs/heads/master | python/testData/completion/relativeFromImportInNamespacePackage/nspkg1/nspkg2/foo.py | 12133432 | |
tbeadle/django | refs/heads/master | tests/handlers/tests.py | 15 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
from django.core.exceptions import ImproperlyConfigured
from django.core.handlers.wsgi import WSGIHandler, WSGIRequest, get_script_name
from django.core.signals import request_finished, request_started
from django.db import close_old_con... |
yeleman/snisi | refs/heads/master | snisi_cataract/expected.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
from __future__ import (unicode_literals, absolute_import,
division, print_function)
import logging
import copy
from snisi_core.models.Periods import MonthPeriod
from snisi_core.models.Projects import Cluster
from sn... |
misisnik/ExternalInterface | refs/heads/master | ENV/Lib/site-packages/pip/_vendor/progress/helpers.py | 521 | # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE A... |
openstack/horizon | refs/heads/master | openstack_dashboard/test/test_data/nova_data.py | 1 | # Copyright 2012 Nebula, 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 agree... |
dezynetechnologies/odoo | refs/heads/8.0 | openerp/report/custom.py | 338 | # -*- 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... |
laperry1/android_external_chromium_org | refs/heads/cm-12.1 | tools/telemetry/telemetry/core/browser_finder.py | 29 | # Copyright 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.
"""Finds browsers that can be controlled by telemetry."""
import logging
import operator
from telemetry import decorators
from telemetry.core.backends.chro... |
adsznzhang/learntosolveit | refs/heads/version1 | languages/python/design_func_args.py | 7 | def fun1(arg):
print arg
def fun2(arg,arg2):
print arg, arg2
def fun3(arg, *arg2):
print arg, arg2
def fun4(*arg):
print arg
def fun5(**kw):
print kw
def fun6(*arg, **kw):
print arg
fun1(10)
fun2(10,20)
fun3(10,20,30)
fun4(10,20,30,40)
fun5(a=10,b=20)
fun6(10,20,40)
|
ekalosak/boto | refs/heads/develop | tests/integration/directconnect/__init__.py | 12133432 | |
sjlehtin/django | refs/heads/master | tests/custom_managers/__init__.py | 12133432 | |
suyashphadtare/gd-erp | refs/heads/develop | erpnext/selling/page/sales_funnel/__init__.py | 12133432 | |
tomerun/atcoder_statistics | refs/heads/master | src/app/app.py | 1 | from flask import Flask, render_template
from model import Session, Contest, Result, Task
app = Flask(__name__)
@app.route('/')
def index():
session = Session()
contests = sorted(session.query(Contest), key=lambda x: x.date, reverse=True)
return render_template('index.jinja2', contests=contests)
@app.r... |
NCI-Cloud/horizon | refs/heads/nci/kilo | openstack_dashboard/dashboards/project/routers/ports/forms.py | 32 | # Copyright 2012, Nachi Ueno, NTT MCL, 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 applic... |
eevee/floof | refs/heads/master | floof/tests/unit/model/filestore/test_local.py | 1 | import os
import shutil
import tempfile
import urllib2
import pytest
import transaction
from floof.model.filestore import get_storage_factory
from floof.tests import UnitTests
from floof.tests.unit.model.filestore import AlwaysFailDataManager
from floof.tests.unit.model.filestore import IntentionalError
from floof.te... |
Heart2009/buck | refs/heads/master | third-party/py/unittest2/unittest2/test/test_suite.py | 111 | from unittest2.test.support import EqualityMixin, LoggingResult
import sys
import unittest2
class Test(object):
class Foo(unittest2.TestCase):
def test_1(self): pass
def test_2(self): pass
def test_3(self): pass
def runTest(self): pass
def _mk_TestSuite(*names):
return unittes... |
abo-abo/edx-platform | refs/heads/master | lms/djangoapps/foldit/models.py | 65 | import logging
from django.contrib.auth.models import User
from django.db import models
log = logging.getLogger(__name__)
class Score(models.Model):
"""
This model stores the scores of different users on FoldIt problems.
"""
user = models.ForeignKey(User, db_index=True,
... |
linkedin/indextank-service | refs/heads/master | api/boto/sdb/__init__.py | 2 | # Copyright (c) 2006-2009 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, modi... |
hasanferit/trumpcrawler | refs/heads/master | crawlenv/lib/python3.5/site-packages/pip/cmdoptions.py | 327 | """
shared options and groups
The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this de... |
fpopic/bioinf | refs/heads/master | bioinf/test/lib/gtest-1.8.0/scripts/__init__.py | 12133432 | |
Instagram/django | refs/heads/master | tests/regressiontests/admin_scripts/complex_app/__init__.py | 12133432 | |
sssunsha/jira-man | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py | 12133432 | |
bixbydev/Bixby | refs/heads/master | google/gdata-2.0.18/build/lib.linux-x86_64-2.7/gdata/service.py | 78 | #!/usr/bin/python
#
# Copyright (C) 2006,2008 Google 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.