repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
johan--/Quiz-Program | refs/heads/master | vendor/bundle/ruby/2.2.0/gems/libv8-3.16.14.7/vendor/gyp/test/build-option/gyptest-build.py | 196 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies simplest-possible build of a "Hello, world!" program
using the default build target.
"""
import TestGyp
test = TestGyp.TestGy... |
cesc-park/CRCN | refs/heads/master | keras/keras/datasets/reuters.py | 10 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from .data_utils import get_file
import string
import random
import os
import six.moves.cPickle
from six.moves import zip
def make_reuters_dataset(path=os.path.join('datasets', 'temp', 'reuters21578'), min_samples_per_... |
dgzurita/odoo | refs/heads/8.0 | addons/account_check_writing/account.py | 379 | # -*- 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... |
axinging/sky_engine | refs/heads/master | sky/engine/build/gn_list_to_space_separated_string.py | 77 | # Copyright 2014 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.
import sys
# Converts its arguments to a single GN-style string, with each element
# quoted and separated by a space.
result = ""
for i in sys.argv[1:]:
... |
mikemoraned/geowhatsit-server | refs/heads/master | node_modules/heroku-redis-client/node_modules/publish/node_modules/npm/node_modules/node-gyp/gyp/test/same-target-name/gyptest-same-target-name.py | 363 | #!/usr/bin/env python
# Copyright (c) 2010 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.
"""
Check that duplicate targets in a directory gives an error.
"""
import TestGyp
test = TestGyp.TestGyp()
# Require that gyp files with... |
rmcdermo/macfp-db | refs/heads/master | Liquid_Pool_Fires/Waterloo_Methanol/Computational_Results/2021/EDFAMU/EDFAMU_Waterloo_Methanol_plot_results.py | 3 | #!/usr/bin/env python3
# McDermott
# Feb 2021
# first, make sure the macfp module directory is in your path
# if not, uncomment the lines below and replace <path to macfp-db>
# with the path (absolute or relative) to your macfp-db repository
import sys
# sys.path.append('<path to macfp-db>/macfp-db/Utilities/')
sys.p... |
rootfs/Rusthon | refs/heads/master | regtests/test-c++.py | 3 | import os, sys, subprocess
passed = {}
ignore = ()
TODO_FIX = (
'chain.py',
'generics_subclasses.py',
)
files = os.listdir('./c++')
files.reverse()
for md in files:
if md in TODO_FIX:
print 'skip test: %s (TODO fix later)' %md
continue
elif not md.endswith('.py'):
continue
print md
if md.startswith( ign... |
boblefrag/lolyx | refs/heads/master | lolyx/resume/tests/urls.py | 1 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Rodolphe Quiédeville <rodolphe@quiedeville.org>
#
# 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 the License, or
#... |
vipulkanade/EventbriteDjango | refs/heads/master | lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py | 224 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2014 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import logging
__version__ = '0.2.1'
class DistlibException(Exception):
pass
try:
from logging import NullHandler
except Impor... |
naousse/odoo | refs/heads/8.0 | addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py | 337 | # -*- 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... |
ksophocleous/grpc | refs/heads/master | src/python/grpcio_test/grpc_test/framework/face/__init__.py | 1496 | # Copyright 2015, 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... |
wandss/ExportingTool | refs/heads/master | fnetET/extractiontool/migrations/0002_cmisserver_date_creation.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('extractiontool', '0001_initial'),
]
operations = [
migrations.AddField(
... |
MontpellierRessourcesImagerie/openmicroscopy | refs/heads/develop | components/tools/OmeroPy/test/integration/clitest/test_user.py | 3 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2014 University of Dundee & Open Microscopy Environment.
# 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 Founda... |
quietcoolwu/leetcode-python | refs/heads/master | letter_combinations_of_a_phone_number/solution.py | 7 | class Solution:
# @return a list of strings, [s1, s2]
def letterCombinations(self, digits):
d = {
'2': 'abc',
'3': 'def',
'4': 'ghi',
'5': 'jkl',
'6': 'mno',
'7': 'pqrs',
'8': 'tuv',
'9': 'wxyz',
}
... |
zaycev/pcfg_parser | refs/heads/master | unknown.py | 1 | #!/usr/bin/env python
import sys, fileinput
import collections
import tree
count = collections.defaultdict(int)
trees = []
for line in fileinput.input():
t = tree.Tree.from_str(line)
for leaf in t.leaves():
count[leaf.label] += 1
trees.append(t)
for t in trees:
for leaf in t.leaves():
... |
igemsoftware/SYSU-Software2013 | refs/heads/master | project/Python27/Tools/scripts/hotshotmain.py | 100 | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
"""
Run a Python script under hotshot's control.
Adapted from a posting on python-dev by Walter Dörwald
usage %prog [ %prog args ] filename [ filename args ]
Any arguments after the filename are used as sys.argv for the filename.
"""
import sys
import optparse
imp... |
akshatharaj/django | refs/heads/master | tests/model_formsets_regress/models.py | 281 | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class User(models.Model):
username = models.CharField(max_length=12, unique=True)
serial = models.IntegerField()
class UserSite(models.Model):
user = models.ForeignKey(User, models.CASCADE, to_field="username")
... |
jvanbrug/alanaldavista | refs/heads/master | boto/sdb/connection.py | 3 | # Copyright (c) 2006,2007 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... |
jan-rybizki/Chempy | refs/heads/master | Chempy/input/yields/West17/time2human.py | 1 | #! /bin/env python3
# TODO - check consistent use of digits for div_lim
# TODO - check use of div_lim for rounding
# TODO - check use of div_lim, dec_lim, rounding for unit_upgrade
import datetime, sys, math
try:
import physconst
except ImportError:
SEC = 31556926
else:
SEC = physconst.SEC
_Units = (''... |
dfranco/shinken | refs/heads/master | test/test_initial_state.py | 10 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken 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 F... |
matthewlent/ng-boilerplate-flask | refs/heads/master | venv/lib/python2.7/site-packages/werkzeug/_internal.py | 146 | # -*- coding: utf-8 -*-
"""
werkzeug._internal
~~~~~~~~~~~~~~~~~~
This module provides internally used helpers and constants.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import re
import string
import inspect
from weakre... |
BeyondTheClouds/nova | refs/heads/disco/mitaka | nova/tests/unit/objects/test_service.py | 5 | # Copyright 2013 IBM Corp.
#
# 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... |
abhinavp13/IITBX-edx-platform-dev | refs/heads/master | common/djangoapps/student/management/commands/emaillist.py | 5 | from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
import mitxmako.middleware as middleware
middleware.MakoMiddleware()
class Command(BaseCommand):
help = \
''' Extract an e-mail list of all active students. '''
def handle(self, *args, **options):
#text ... |
otherness-space/myProject003 | refs/heads/master | my_project_003/lib/python2.7/site-packages/pymongo/collection.py | 3 | # Copyright 2009-2014 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... |
mitodl/open-discussions | refs/heads/master | widgets/serializers/url.py | 1 | """URL widget"""
from widgets.serializers.widget_instance import (
WidgetConfigSerializer,
WidgetInstanceSerializer,
)
from widgets.serializers.react_fields import ReactURLField, ReactCharField
class URLWidgetConfigSerializer(WidgetConfigSerializer):
"""Serializer for URLWidget config"""
url = ReactU... |
frituurpan/Solar-Turbulence | refs/heads/master | swost/transmissionmodel.py | 1 | import copy
__author__ = 'Administrator'
class TransmissionModel:
raw_data = ''
timestamp = ''
def __init__(self, data):
self.raw_data = data
def get_total_kwh(self):
return self.get_day_kwh() + self.get_night_kwh()
def get_day_kwh(self):
key = '1-0:1.8.1'
val =... |
zahanm/foodpedia | refs/heads/master | django/core/handlers/modpython.py | 189 | import os
from pprint import pformat
import sys
from warnings import warn
from django import http
from django.core import signals
from django.core.handlers.base import BaseHandler
from django.core.urlresolvers import set_script_prefix
from django.utils import datastructures
from django.utils.encoding import force_unic... |
1st/django | refs/heads/master | tests/template_tests/filter_tests/test_timeuntil.py | 207 | from __future__ import unicode_literals
from datetime import datetime, timedelta
from django.template.defaultfilters import timeuntil_filter
from django.test import SimpleTestCase
from django.test.utils import requires_tz_support
from ..utils import setup
from .timezone_utils import TimezoneTestCase
class Timeunti... |
mrumsky/congress-legislators | refs/heads/master | scripts/bioguide.py | 10 | #!/usr/bin/env python
# gets fundamental information for every member with a bioguide ID:
# first name, nickname, middle name, last name, name suffix
# birthday
# options:
# --cache: load from cache if present on disk (default: true)
# --current: do *only* current legislators (default: true)
# --historical: do *on... |
clovett/MissionPlanner | refs/heads/master | Lib/audiodev.py | 61 | """Classes for manipulating audio devices (currently only for Sun and SGI)"""
from warnings import warnpy3k
warnpy3k("the audiodev module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
__all__ = ["error","AudioDev"]
class error(Exception):
pass
class Play_Audio_sgi:
# Private instance... |
ywcui1990/nupic.research | refs/heads/master | setup.py | 9 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014-15, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This ... |
artnez/faceoff | refs/heads/master | faceoff/helpers/decorators.py | 1 | """
Copyright: (c) 2012-2014 Artem Nezvigin <artem@artnez.com>
License: MIT, see LICENSE for details
"""
from functools import wraps
from flask import g, request, session, render_template, url_for, redirect
from faceoff.models.user import find_user
def templated(template_name=None):
"""
Automatically renders... |
hottwaj/django | refs/heads/master | django/contrib/admin/templatetags/admin_urls.py | 553 | from django import template
from django.contrib.admin.utils import quote
from django.core.urlresolvers import Resolver404, get_script_prefix, resolve
from django.utils.http import urlencode
from django.utils.six.moves.urllib.parse import parse_qsl, urlparse, urlunparse
register = template.Library()
@register.filter
... |
kmod/icbd | refs/heads/master | stdlib/python2.5/distutils/command/register.py | 81 | """distutils.command.register
Implements the Distutils 'register' command (register with the repository).
"""
# created 2002/10/21, Richard Jones
__revision__ = "$Id: register.py 56542 2007-07-25 16:24:08Z martin.v.loewis $"
import sys, os, string, urllib2, getpass, urlparse
import StringIO, ConfigParser
from dist... |
juliankiedaisch/braunanlage | refs/heads/testing | brausteuerung/server/sensor_test.py | 2 |
print "running..."
import ow
import time
ow.init( 'localhost:4304' )
# We're accessing the 1-wire bus directly from python but
# if you want to use owserver:
# ow.init( 'localhost:3030' ) # /opt/owfs/bin/owserver -p 3030 -u -r
sensors = ow.Sensor("/").sensorList()
# We're only interested in temperature sensors... |
n3wb13/OpenNfrGui-5.0-1 | refs/heads/master | lib/python/Plugins/Extensions/TuxboxPlugins/__init__.py | 12133432 | |
xasopheno/audio_visual | refs/heads/master | audio/Training/csv/rnn.py | 12133432 | |
PatrickLeonard/superlists | refs/heads/master | accounts/migrations/__init__.py | 12133432 | |
sebastien-forestier/CogSci2017 | refs/heads/master | cogsci2017/dmp/__init__.py | 12133432 | |
siosio/intellij-community | refs/heads/master | python/testData/refactoring/move/starImportWithUsages/after/src/zzz.py | 12133432 | |
davidbgk/croquemort | refs/heads/master | tests/__init__.py | 12133432 | |
erikr/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_a/migrations/0002_a2.py | 381 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='A2',
fields=[
... |
alhashash/odoo | refs/heads/master | addons/website_forum_doc/__openerp__.py | 322 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
bbiskup/docker-python-devenv | refs/heads/dev | pkg1/mod1.py | 1 | import zmq
def f1():
print "f1() called"
return 2
if __name__ == '__main__':
f1()
|
tafaRU/account-financial-tools | refs/heads/8.0 | __unported__/l10n_fr_siret/company.py | 11 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 Numérigraphe SARL.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General ... |
samdowd/drumm-farm | refs/heads/master | drumm_env/lib/python2.7/site-packages/phonenumbers/data/region_VU.py | 2 | """Auto-generated file, do not edit by hand. VU metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_VU = PhoneMetadata(id='VU', country_code=678, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[2-57-9]\\d{4,6}', possible_length=(5, 7... |
Kleptobismol/scikit-bio | refs/heads/master | skbio/parse/sequences/tests/test_fasta.py | 2 | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------... |
calatre/epidemics_network | refs/heads/master | plt/SIR 1 plot.py | 1 | # Universidade de Aveiro - Physics Department
# 2016/2017 Project - Andre Calatre, 73207
# "Simulation of an epidemic" - 16/5/2017
# Plotting Multiple Simulations of a SIR Epidemic Model
#import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['lines.linewidth']... |
pirate42/xhtml2pdf | refs/heads/master | xhtml2pdf/pdf.py | 56 | # -*- coding: utf-8 -*-
# Copyright 2010 Dirk Holtwick, holtwick.it
#
# 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 ... |
mail-apps/translate | refs/heads/master | translate/convert/tiki2po.py | 25 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008 Mozilla Corporation, Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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; ... |
CopeX/odoo | refs/heads/8.0 | addons/sales_team/res_config.py | 366 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class sales_team_configuration(osv.TransientModel):
_name = 'sale.config.settings'
_inherit = ['sale.config.settings']
def set_group_multi_salesteams(self, cr, uid, ids, context=None):
""" This method is automatically called by res_conf... |
jdemel/gnuradio | refs/heads/master | gr-digital/python/digital/qamlike.py | 1 | # Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
This file contains constellations that are similar to QAM, but are not perfect squares.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
from . imp... |
hellsgate1001/bookit | refs/heads/master | docs/env/Lib/site-packages/django/conf/locale/__init__.py | 111 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
# About name_local: capitalize it as if your language name was appearing
# inside a sentence in your language.
LANG_INFO = {
'af': {
'bidi': False,
'code': 'af',
'name': 'Afrikaans',
'name_local': 'Afrikaans',
},... |
Fl0rianFischer/sme_odoo | refs/heads/9.0 | addons/website_hr/models/__init__.py | 439 | import hr
|
bop/foundation | refs/heads/master | lib/python2.7/site-packages/django/views/generic/create_update.py | 87 | from django.forms.models import ModelFormMetaclass, ModelForm
from django.template import RequestContext, loader
from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.core.xheaders import populate_xheaders
from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured
from django.... |
rishabhmalhotra/FireSync | refs/heads/master | PyObjC/Message/__init__.py | 1 | '''
Python mapping for the Message framework.
This module does not contain docstrings for the wrapped code, check Apple's
documentation for details on how to use these functions and classes.
'''
import sys
import objc
import Foundation
from Message import _metadata
sys.modules['Message'] = mod = objc.ObjCLazyModule(... |
CharlelieMichaud/paparazzi | refs/heads/master | sw/ground_segment/python/atc/atc.py | 22 | #!/usr/bin/env python
#
# Copyright (C) 2016 TUDelft
#
# This file is part of paparazzi.
#
# paparazzi 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... |
htwenhe/DJOA | refs/heads/master | env/Lib/site-packages/django/conf/locale/en_GB/__init__.py | 12133432 | |
agaffney/ansible | refs/heads/devel | test/units/utils/collection_loader/fixtures/collections/ansible_collections/testns/testcoll/plugins/module_utils/__init__.py | 12133432 | |
utlco/tcnc | refs/heads/master | tcnc/svg/geomsvg.py | 1 | #-----------------------------------------------------------------------------
# Copyright 2012-2016 Claude Zervas
# email: claude@utlco.com
#-----------------------------------------------------------------------------
"""
Methods for converting SVG shape elements to geometry objects.
"""
# Python 3 compatibility boil... |
Max-Vader/namebench | refs/heads/master | nb_third_party/dns/renderer.py | 248 | # Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation 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 ... |
savoirfairelinux/OpenUpgrade | refs/heads/master | addons/l10n_lu/__init__.py | 376 | # -*- 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... |
wzbozon/statsmodels | refs/heads/master | statsmodels/graphics/tests/test_factorplots.py | 27 | import numpy as np
from nose import SkipTest
from pandas import Series
from statsmodels.graphics.factorplots import interaction_plot
try:
import matplotlib.pyplot as plt
import matplotlib
have_matplotlib = True
except ImportError:
have_matplotlib = False
class TestInteractionPlot(object):
@class... |
smessmer/cryfs | refs/heads/develop | vendor/googletest/gtest/googlemock/scripts/generator/gmock_gen.py | 19 | #!/usr/bin/env python
#
# Copyright 2008 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... |
popazerty/obh-sh4 | refs/heads/master | lib/python/Tools/Profile.py | 47 | # the implementation here is a bit crappy.
import time
from Directories import resolveFilename, SCOPE_CONFIG
PERCENTAGE_START = 0
PERCENTAGE_END = 100
profile_start = time.time()
profile_data = {}
total_time = 1
profile_file = None
try:
profile_old = open(resolveFilename(SCOPE_CONFIG, "profile"), "r").readlines()
... |
lightbase/LBApp | refs/heads/master | lbapp/views/__init__.py | 12133432 | |
bencesomogyi/pyCFD | refs/heads/master | pyCFD_geometric_tools/cython_boost_win32/__init__.py | 12133432 | |
manashmndl/deeppy | refs/heads/master | deeppy/siamese/__init__.py | 12133432 | |
nkhuyu/commons | refs/heads/master | src/python/twitter/common/python/installer.py | 14 | from __future__ import absolute_import
from pex.installer import *
|
drmrd/ansible | refs/heads/devel | test/units/modules/cloud/amazon/__init__.py | 12133432 | |
dims/cinder | refs/heads/master | cinder/tests/unit/scheduler/__init__.py | 12133432 | |
mihail911/nupic | refs/heads/master | nupic/research/monitor_mixin/__init__.py | 12133432 | |
rohitwaghchaure/erpnext_smart | refs/heads/develop | erpnext/hr/doctype/employee_leave_approver/__init__.py | 12133432 | |
hardikamal/foursquared.eclair | refs/heads/master | mock_server/playfoursquare.py | 127 | #!/usr/bin/python2.6
#
# Simple http server to emulate api.playfoursquare.com
import logging
import shutil
import urlparse
import SimpleHTTPServer
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Handle playfoursquare.com requests, for testing."""
def do_GET(self):
logg... |
codilime/cloudify-openstack-plugin | refs/heads/master | neutron_plugin/subnet.py | 2 | #########
# Copyright (c) 2014 GigaSpaces Technologies 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/LICENSE-2.0
#
# Unless... |
zx8/youtube-dl | refs/heads/master | youtube_dl/extractor/iprima.py | 96 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from random import random
from math import floor
from .common import InfoExtractor
from ..compat import (
compat_urllib_request,
)
from ..utils import (
ExtractorError,
remove_end,
)
class IPrimaIE(InfoExtractor):
_VALID_URL =... |
puremourning/ycmd-1 | refs/heads/master | ycmd/completers/general_completer.py | 4 | # Copyright (C) 2020 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd 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.
#
# ycmd... |
lotaku/fzz | refs/heads/master | server/opccode.py | 1 | #encoding: utf8
import player
handler={
1:player.c2gsEnterWorld,
2:player.c2gsPlayerMove,
}
def handlePacket(player,packet):
handler[packet.id](player,packet)
|
mythmon/airmozilla | refs/heads/master | airmozilla/manage/widgets.py | 12 | import cgi
from django.forms import widgets
from django.utils.safestring import mark_safe
from funfactory.urlresolvers import reverse
from airmozilla.main.models import Picture
from airmozilla.main.helpers import thumbnail
class PictureWidget(widgets.Select):
def __init__(self, instance, attrs=None, **kwargs)... |
hefen1/chromium | refs/heads/master | third_party/cython/src/Tools/cython-epydoc.py | 125 | #! /usr/bin/env python
# --------------------------------------------------------------------
import re
from epydoc import docstringparser as dsp
CYTHON_SIGNATURE_RE = re.compile(
# Class name (for builtin methods)
r'^\s*((?P<class>\w+)\.)?' +
# The function name
r'(?P<func>\w+)' +
# The paramete... |
vergl4s/instarecon | refs/heads/master | scripts/instarecon.py | 1 | #!/usr/bin/env python
import argparse
import csv
import logging
import os
import sys
import ipaddress as ipa # https://docs.python.org/3/library/ipaddress.html
import dns.resolver
from src.ip import IP
from src.host import Host
from src.network import Network
from src import lookup
from src._version import __version... |
JetBrains/intellij-community | refs/heads/master | python/testData/console/ipython/psi/shell4.py | 14 | !!dir |
maniteja123/scipy | refs/heads/master | scipy/sparse/linalg/isolve/setup.py | 108 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from os.path import join
def configuration(parent_package='',top_path=None):
from numpy.distutils.system_info import get_info, NotFoundError
from numpy.distutils.misc_util import Configuration
from scipy._build_utils i... |
onitake/ansible | refs/heads/devel | lib/ansible/modules/cloud/rackspace/rax_dns.py | 118 | #!/usr/bin/python
# Copyright: 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': ['preview'],
... |
MythicApps/MythicAppsSite | refs/heads/master | General/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
dana-i2cat/felix | refs/heads/master | modules/resource/orchestrator/src/extensions/geni/util/cred_util.py | 2 | #----------------------------------------------------------------------
# Copyright (c) 2010 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including witho... |
AndyDiamondstein/vitess | refs/heads/master | test/custom_sharding.py | 2 | #!/usr/bin/env python
#
# Copyright 2015, 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.
import base64
import unittest
from vtproto import topodata_pb2
from vtdb import vtgate_client
import environment
import tablet
import utils... |
armenzg/build-mozharness | refs/heads/master | configs/b2g/gaia_integration_config.py | 2 | # This is a template config file for b2g emulator unittest testing
import platform
HG_SHARE_BASE_DIR = "/builds/hg-shared"
if platform.system().lower() == 'darwin':
xre_url = "https://api.pub.build.mozilla.org/tooltool/sha512/4d8d7a37d90c34a2a2fda3066a8fe85c189b183d05389cb957fc6fed31f10a6924e50c1b84488ff61c015293... |
mthornhill/django-pressroom | refs/heads/master | src/pressroom/tests/test_articles.py | 1 | import random
from django.contrib.webdesign.lorem_ipsum import words, sentence, paragraphs
from django.template.defaultfilters import slugify
from django.test import TestCase
from pressroom.models import Article
class PressroomTests(TestCase):
def test_environment(self):
"""Just make sure everything is set... |
nox/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/chunked.py | 219 | def main(request, response):
chunks = ["First chunk\r\n",
"Second chunk\r\n",
"Yet another (third) chunk\r\n",
"Yet another (fourth) chunk\r\n",
]
response.headers.set("Transfer-Encoding", "chunked");
response.headers.set("Trailer", "X-Test-Me");
r... |
northern-bites/nao-man | refs/heads/master | noggin/players/SoccerFSA.py | 1 | # Soccer FSA that implements an FSA but holds all the important
# soccer-playing functionality
#
#
from man.motion import HeadMoves
import man.motion as motion
from ..util import FSA
from ..navigator import NavHelper as helper
from . import CoreSoccerStates
class SoccerFSA(FSA.FSA):
def __init__(self,brain):
... |
vikas1885/test1 | refs/heads/master | common/djangoapps/student/migrations/0017_rename_date_to_created.py | 188 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Rename 'date' field to 'created'
db.rename_column('student_courseenrollment', 'date', 'created')
def ... |
lakshayg/tensorflow | refs/heads/master | tensorflow/contrib/layers/python/layers/regularizers_test.py | 73 | # 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... |
imply/chuu | refs/heads/master | chrome/browser/resources/test_presubmit.py | 61 | #!/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.
"""Unit tests for Web Development Style Guide checker."""
import os
import re
import sys
import unittest
test_dir = os.path.dirna... |
thesuperzapper/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/dataframe/tensorflow_dataframe.py | 75 | # 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... |
vvv1559/intellij-community | refs/heads/master | python/testData/inspections/PyUnresolvedReferencesInspection/FromImportToContainingFile2/p1/__init__.py | 12133432 | |
pjryan126/solid-start-careers | refs/heads/master | store/api/zillow/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/__init__.py | 12133432 | |
jsternberg/ansible-modules-core | refs/heads/devel | cloud/amazon/__init__.py | 12133432 | |
yazman/statscache_plugins | refs/heads/develop | statscache_plugins/volume/__init__.py | 12133432 | |
abhi11/tanglu-dak | refs/heads/master | dak/generate_metadata.py | 1 | #!/usr/bin/env python
"""
Processes all packages in a given suite to extract interesting metadata
(mainly AppStream metainfo data). The data will be stored in
the "bin_dep11" table.
Additionally, a screenshot cache and tarball of all the icons of packages
beloging to a given suite will be created.
"""
# Copyright (c)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.