repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
VagrantApe/flaskMicroblog | refs/heads/master | venv/lib/python2.7/site-packages/werkzeug/testsuite/contrib/wrappers.py | 102 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.contrib.wrappers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Added tests for the sessions.
:copyright: (c) 2013 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import unittest
from werkzeug.testsuit... |
JamisHoo/Cloud-Image-Migration-Tool | refs/heads/master | usr/lib/requests/packages/chardet/codingstatemachine.py | 2930 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
Theer108/invenio | refs/heads/master | invenio/legacy/websession/webinterface.py | 5 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2014 CERN.
#
# Invenio 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
# Li... |
agry/NGECore2 | refs/heads/master | scripts/object/draft_schematic/chemistry/medpack_enhance_action_triad_d.py | 85615 | import sys
def setup(core, object):
return |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/ship/tieaggressor_tier8.py | 85615 | import sys
def setup(core, object):
return |
chemelnucfin/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/unicode_decode_op_test.py | 6 | # -*- coding: utf-8 -*-
# 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
#
# Un... |
Instagram/django | refs/heads/master | django/utils/synch.py | 376 | """
Synchronization primitives:
- reader-writer lock (preference to writers)
(Contributed to Django by eugene@lazutkin.com)
"""
try:
import threading
except ImportError:
import dummy_threading as threading
class RWLock:
"""
Classic implementation of reader-writer lock with preference to writers.... |
kailIII/emaresa | refs/heads/7.0 | aeroo/report_aeroo/installer.py | 6 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008-2013 Alistek Ltd (http://www.alistek.com) All Rights Reserved.
# General contacts <info@alistek.com>
#
# WARNING: This program as such is intended to be used by professional... |
sudosurootdev/gdb | refs/heads/master | gdb/testsuite/gdb.perf/single-step.py | 41 | # Copyright (C) 2013-2014 Free Software Foundation, Inc.
# 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
# (at your option) any later version.
#
# This progr... |
unseenlaser/machinekit | refs/heads/master | configs/sim/gmoccapy/python/stdglue.py | 18 | # This is a component of Machinekit
# Copyright 2014 Norbert Schechner <nieson@web.de>
#
# 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 you... |
vicnet/weboob | refs/heads/master | modules/foncia/browser.py | 2 | # -*- coding: utf-8 -*-
# Copyright(C) 2017 Phyks (Lucas Verney)
#
# 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 o... |
awalls-cx18/gnuradio | refs/heads/master | grc/core/utils/hide_bokeh_gui_options_if_not_installed.py | 7 | # Copyright 2008-2017 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# GNU Radio Companion 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 opti... |
anksp21/Community-Zenpacks | refs/heads/master | ZenPacks.chitambira.mgeUPS/ZenPacks/chitambira/mgeUPS/tests/__init__.py | 309 | # ##########################################################################
#
# This program is part of Zenoss Core, an open source monitoring platform.
# Copyright (C) 2008, Zenoss Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License vers... |
atmark-techno/atmark-dist | refs/heads/master | user/python/Demo/tkinter/matt/window-creation-more.py | 3 | from Tkinter import *
# this shows how to create a new window with a button in it
# that can create new windows
class Test(Frame):
def printit(self):
print "hi"
def makeWindow(self):
fred = Toplevel()
fred.label = Button(fred,
text="This is window number %d." % self.windownum,
command=self.... |
nmercier/linux-cross-gcc | refs/heads/master | win32/bin/Lib/socket.py | 5 | # Wrapper module for _socket, providing some additional facilities
# implemented in Python.
"""\
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are avai... |
hujiajie/chromium-crosswalk | refs/heads/master | tools/telemetry/telemetry/internal/platform/profiler/android_systrace_profiler.py | 8 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import StringIO
import subprocess
import zipfile
from telemetry.core import util
from telemetry.internal.backends.chrome import android_browser_fi... |
noxiouz/tornado | refs/heads/master | tornado/test/template_test.py | 63 | from __future__ import absolute_import, division, print_function, with_statement
import os
import sys
import traceback
from tornado.escape import utf8, native_str, to_unicode
from tornado.template import Template, DictLoader, ParseError, Loader
from tornado.test.util import unittest
from tornado.util import u, Object... |
group-policy/rally | refs/heads/master | rally/plugins/openstack/context/nova/servers.py | 2 | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
#... |
pythonistas-tw/academy | refs/heads/master | web-api/tonypythoneer/db-Exercise/v1/error_handlings/user_errors.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @first_date 20160122
# @date 20106122 - Build customize_form_errors
# @version 0.1
"""Error handling list
Error handling naming format:
%(API_NAME)s_ERR_%(ERROR_CODE)s_%(ERROR_EVENT)s
"""
USER_ERR_1001_REGISTERED_ACC = {
"error_code": 1001,
... |
ktan2020/legacy-automation | refs/heads/master | win/Lib/site-packages/bs4/tests/test_tree.py | 292 | # -*- coding: utf-8 -*-
"""Tests for Beautiful Soup's tree traversal methods.
The tree traversal methods are the main advantage of using Beautiful
Soup over just using a parser.
Different parsers will build different Beautiful Soup trees given the
same markup, but all Beautiful Soup trees can be traversed with the
me... |
jjohnson42/confluent | refs/heads/master | confluent_server/confluent/plugins/shell/ssh.py | 2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2015-2018 Lenovo
#
# 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 require... |
michaelarnauts/home-assistant | refs/heads/master | homeassistant/components/frontend/version.py | 1 | """ DO NOT MODIFY. Auto-generated by build_frontend script """
VERSION = "e9060d58fc9034468cfefa9794026d0c"
|
cayetanobv/daynight2geojson | refs/heads/master | daynight2geojson/__init__.py | 2 | # -*- coding: utf-8 -*-
#
# Author: Cayetano Benavent, 2015.
# https://github.com/GeographicaGS/daynight2geojson
#
# 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 ... |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/lxml-3.4.4/src/lxml/tests/test_http_io.py | 19 | # -*- coding: utf-8 -*-
"""
Web IO test cases that need Python 2.5+ (wsgiref)
"""
from __future__ import with_statement
import unittest
import textwrap
import os
import sys
import gzip
this_dir = os.path.dirname(__file__)
if this_dir not in sys.path:
sys.path.insert(0, this_dir) # needed for Py3
from .common_... |
Lake17000/visualdom | refs/heads/master | resources/demond/demond.py | 3 | # This file is part of Jeedom.
#
# Jeedom 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.
#
# Jeedom is distributed in the hope that i... |
chdecultot/erpnext | refs/heads/develop | erpnext/shopping_cart/product_info.py | 4 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from erpnext.shopping_cart.cart import _get_cart_quotation
from erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settin... |
sadven/Meisie-Kernel | refs/heads/master | tools/perf/scripts/python/syscall-counts.py | 11181 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... |
noba3/KoTos | refs/heads/master | addons/plugin.audio.CannaPower/resources/lib/mechanize/_version.py | 10 | "0.2.6"
__version__ = (0, 2, 6, None, None)
|
drunknbass/plexpy | refs/heads/master | lib/mutagen/aiff.py | 21 | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Evan Purkhiser
# 2014 Ben Ockmore
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
"""AIFF audio stream information a... |
iMichka/mini-iw | refs/heads/master | pygccxml/parser/declarations_cache.py | 12 | # Copyright 2014 Insight Software Consortium.
# Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
import os
import time
import hashlib
try:
import cPickle as pickle
except ImportError:
import pickle
from pygccxml import ... |
longmen21/edx-platform | refs/heads/master | lms/djangoapps/shoppingcart/reports.py | 46 | """ Objects and functions related to generating CSV reports """
from decimal import Decimal
import unicodecsv
from django.utils.translation import ugettext as _
from courseware.courses import get_course_by_id
from course_modes.models import CourseMode
from shoppingcart.models import CertificateItem, OrderItem
from s... |
LCBRU/reporter | refs/heads/master | reporter/uhl_reports/civicrm/enrolment_dq.py | 1 | #!/usr/bin/env python3
from reporter.core import SqlReport, Schedule
from reporter.uhl_reports.civicrm import (
get_case_link,
get_contact_id_search_link,
get_contact_link
)
class DuplicateStudyIdReport(SqlReport):
def __init__(self, case_type_id, recipients, schedule=None):
super... |
hrishioa/Aviato | refs/heads/master | flask/Lib/site-packages/jinja2/debug.py | 620 | # -*- coding: utf-8 -*-
"""
jinja2.debug
~~~~~~~~~~~~
Implements the debug interface for Jinja. This module does some pretty
ugly stuff with the Python traceback system in order to achieve tracebacks
with correct line numbers, locals and contents.
:copyright: (c) 2010 by the Jinja Team.
:... |
zahanm/foodpedia | refs/heads/master | django/contrib/gis/db/backends/spatialite/operations.py | 282 | import re
from decimal import Decimal
from django.contrib.gis.db.backends.base import BaseSpatialOperations
from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction
from django.contrib.gis.db.backends.spatialite.adapter import SpatiaLiteAdapter
from django.contrib.gis.geometry.backend import G... |
davesnowdon/nao-recorder | refs/heads/master | src/main/python/fluentnao/core/arms.py | 2 | class Arms():
# init method
def __init__(self, nao, elbows, wrists, hands):
self.elbows = elbows
self.wrists = wrists
self.hands = hands
# jobs for threading
self.nao = nao
self.joints = nao.joints
self.chains = nao.chains
self.log = nao... |
JohnnyKing94/pootle | refs/heads/master | pootle/apps/virtualfolder/migrations/0013_set_projects_languages.py | 8 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from pootle.core.url_helpers import split_pootle_path
def parse_vfolder_rules(vf):
languages = set()
projects = set()
new_rules = set()
full_rules = [vf.location.strip() + rule.strip()
... |
RAtechntukan/CouchPotatoServer | refs/heads/develop | libs/chardet/escprober.py | 215 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
wpoa/wiki-imports | refs/heads/master | lib/python2.7/site-packages/pywikibot-2.0b1-py2.7.egg/pywikibot/families/mediawiki_family.py | 1 | # -*- coding: utf-8 -*-
__version__ = '$Id: ca708d5165b16c56364ce3ce61beb47555da75a5 $'
from pywikibot import family
# The MediaWiki family
# user-config.py: usernames['mediawiki']['mediawiki'] = 'User name'
class Family(family.WikimediaFamily):
def __init__(self):
super(Family, self).__init__()
... |
Joergen/zamboni | refs/heads/uge43 | scripts/monitors/check_wsgi.py | 8 | #!/usr/bin/python2.6
"""Makes sure mod_wsgi has been restarted after the last code push i.e,
mod_wsgi is fresher than the mtime on all *.py files in the application dir.
"""
from datetime import datetime
from optparse import OptionParser
import os
from subprocess import PIPE, Popen
import urllib2
def check_modwsgi(... |
goofwear/raspberry_pwn | refs/heads/master | src/pentest/sqlmap/plugins/dbms/postgresql/connector.py | 7 | #!/usr/bin/env python
"""
Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
try:
import psycopg2
import psycopg2.extensions
psycopg2.extensions.register_type(psycopg2.extensions.UNICODE)
psycopg2.extensions.register_type(psycopg2.exten... |
aachik/flask-blog-abdulmx | refs/heads/master | env/lib/python2.7/sre_constants.py | 4 | /usr/lib/python2.7/sre_constants.py |
synconics/odoo | refs/heads/8.0 | addons/edi/models/res_partner.py | 437 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... |
exepulveda/swfc | refs/heads/master | python/plot_2d_bm_swfc.py | 1 | import numpy as np
from skimage import data, io
from case_study_bm import setup_case_study_ore
import matplotlib as mpl
mpl.use('agg')
import matplotlib.pyplot as plt
locations,data,min_values,max_values,scale,var_types,targets = setup_case_study_ore()
N,K = data.shape
#block model size
sx,ex = 8,42
sy,ey = 8,41
s... |
pytroll/satpy | refs/heads/main | satpy/tests/reader_tests/test_grib.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2018 Satpy developers
#
# This file is part of satpy.
#
# satpy 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... |
OmeGak/indico | refs/heads/master | indico/migrations/versions/20180129_0706_c820455976ba_add_include_description_to_reminders.py | 7 | """Add include_description to reminders
Revision ID: c820455976ba
Revises: 093533d27a96
Create Date: 2018-01-29 07:06:00.000000
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'c820455976ba'
down_revision = '093533d27a96'
branch_labels = None
depends_on = None
... |
hastexo/edx-platform | refs/heads/master | lms/djangoapps/ccx/tests/test_views.py | 2 | """
test views
"""
import datetime
import json
import re
import urlparse
import ddt
from ccx_keys.locator import CCXLocator
from django.conf import settings
from django.core.urlresolvers import resolve, reverse
from django.test import RequestFactory
from django.test.utils import override_settings
from pytz import UTC
... |
ben-manes/cassandra | refs/heads/trunk | bin/cqlsh.py | 1 | #!/bin/sh
# -*- mode: Python -*-
# 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.... |
cristianveron/PORNOFLIXXX | refs/heads/master | oneplay.py | 101 | ## ONLY FOR NOOBS :D
##CONVERSION OF following encryption by shani into python
## only decryption function is implemented
'''
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes S... |
vodik/pacman | refs/heads/master | test/pacman/tests/upgrade002.py | 23 | self.description = "Upgrade a package (same version)"
lp = pmpkg("dummy")
lp.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
self.addpkg2db("local", lp)
p = pmpkg("dummy")
p.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
self.addpkg(p)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETC... |
dkmva/igem-wiki-wizard | refs/heads/master | app/__init__.py | 1 | import os
import shutil
from flask import Flask
from flask.ext.themes2 import Themes
from sqlalchemy.exc import OperationalError, ProgrammingError
import yaml
from app.install import make_config, install_data
from app.models import db, login_manager, Setting, Page, User
from app.utils import css_sanitizer, is_hidden_... |
avkhadiev/bbtoDijet | refs/heads/master | CRAB/hlt_bTagDijetV11_MC.py | 1 | # /users/aavkhadi/bTagDijet/V11 (CMSSW_8_0_10)
import FWCore.ParameterSet.Config as cms
process = cms.Process( "TEST" )
# following the instructions from
# https://twiki.cern.ch/twiki/bin/view/Sandbox/HLTNtupleProductionSTEAM#Create_CMSSW_config_files_user_m
process.load("bbtoDijet.bbtoDijetAnalyzer.setup_cff")
# l... |
mtagle/airflow | refs/heads/master | tests/www/__init__.py | 5130 | #
# 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... |
ericshawlinux/bitcoin | refs/heads/master | test/functional/wallet_backup.py | 15 | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet backup features.
Test case is:
4 nodes. 1 2 and 3 send transactions between each other... |
you21979/phantomjs | refs/heads/2.0 | src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/internal/containers.py | 261 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... |
severin31/suplemon | refs/heads/master | suplemon/linelight/css.py | 2 | from suplemon import helpers
class Syntax:
def get_comment(self):
return ("/*", "*/")
def get_color(self, raw_line):
color = 7
line = raw_line.strip()
if helpers.starts(line, "@import"):
color = 4 # Blue
elif helpers.starts(line, "$"):
color ... |
jordanemedlock/psychtruths | refs/heads/master | temboo/Library/Fitbit/Devices/GetDevices.py | 5 | # -*- coding: utf-8 -*-
###############################################################################
#
# GetDevices
# Retrieves the list of Fitbit devices for a user.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not u... |
watonyweng/nova | refs/heads/master | nova/api/openstack/compute/schemas/block_device_mapping_v1.py | 74 | # Copyright 2014 NEC Corporation. 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 ... |
allanice001/OpenWRT-Builder | refs/heads/master | package/mac80211/files/host_bin/b43-fwsquash.py | 188 | #!/usr/bin/env python
#
# b43 firmware file squasher
# Removes unnecessary firmware files
#
# Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
#
# Licensed under the GNU/GPL version 2 or (at your option) any later version.
#
import sys
import os
def usage():
print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm... |
09zwcbupt/undergrad_thesis | refs/heads/master | ext/poxdesk/poxdesk/generate.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# qooxdoo - the new era of web development
#
# http://qooxdoo.org
#
# Copyright:
# 2008 - 2012 1&1 Internet AG, Germany, http://www.1und1.de
#
# License:
# LGPL: http://www.gnu.org/... |
fueler/python-tools | refs/heads/master | h264/nalu.py | 1 | import struct
__author__ = 'wmoorefi'
NALUTYPE_UNSPECIFIED = 0
NALUTYPE_SLICE_NONIDR = 0
NALUTYPE_SLICE_DATAPART_A = 2
NALUTYPE_SLICE_DATAPART_B = 3
NALUTYPE_SLICE_DATAPART_C = 4
NALUTYPE_SLICE_IDR = 5
NALUTYPE_SEI = 6 # Supplemental Enhancement Information
NALUTYPE_SPS = 7 # Sequence Parameter Set
NALUTYPE_PPS = 8... |
dllatas/deepLearning | refs/heads/master | aws/cifar10_train.py | 1 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
Nu3001/external_chromium_org | refs/heads/master | remoting/host/installer/build-installer-archive.py | 163 | #!/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.
"""Creates a zip archive for the Chrome Remote Desktop Host installer.
This script builds a zip file that contains all the files n... |
meredith-digops/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/lambda.py | 27 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
zhjunlang/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/site-packages/setuptools/tests/__init__.py | 412 | """Tests for the 'setuptools' package"""
import sys
import os
import unittest
from setuptools.tests import doctest
import distutils.core
import distutils.cmd
from distutils.errors import DistutilsOptionError, DistutilsPlatformError
from distutils.errors import DistutilsSetupError
from distutils.core import Extension
fr... |
isaac-philip/loolu | refs/heads/master | common/django/contrib/formtools/utils.py | 10 | try:
import cPickle as pickle
except ImportError:
import pickle
from django.conf import settings
from django.utils.hashcompat import md5_constructor
from django.forms import BooleanField
def security_hash(request, form, *args):
"""
Calculates a security hash for the given Form instance.
This crea... |
DeadBugEngineering/myHDL_shenanigans | refs/heads/master | ssd1306_8x64bit_driver/myhdl_10dev/lib/python2.7/site-packages/setuptools/command/saveopts.py | 1052 | from setuptools.command.setopt import edit_config, option_base
class saveopts(option_base):
"""Save command-line options to a file"""
description = "save supplied options to setup.cfg or other config file"
def run(self):
dist = self.distribution
settings = {}
for cmd in dist.com... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01_preview/models/__init__.py | 2 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
scottmcmaster/xskt-jstesting-class | refs/heads/master | webdriverjs/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py | 290 | import os
import sys
rootdir = sys.argv[1]
ino = {}
buf = []
for root, subFolders, files in os.walk(rootdir):
for filename in files:
filePath = os.path.join(root, filename)
try:
stat = os.lstat(filePath)
except OSError:
pass
inostr = stat.st_ino
if inostr... |
t3wz/mtasa-blue | refs/heads/master | vendor/google-breakpad/src/tools/gyp/pylib/gyp/generator/make.py | 124 | # Copyright (c) 2013 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.
# Notes:
#
# This is all roughly based on the Makefile system used by the Linux
# kernel, but is a non-recursive make -- we put the entire dependency
# graph in fr... |
kgao/MediaDrop | refs/heads/master | mediadrop/lib/tests/request_mixin_test.py | 2 | # -*- coding: utf-8 -*-
# This file is a part of MediaDrop (http://www.mediadrop.net),
# Copyright 2009-2014 MediaDrop contributors
# For the exact contribution history, see the git revision log.
# The source code in this file is dual licensed under the MIT license or
# the GPLv3 or (at your option) any later version.
... |
dimven/ClockworkForDynamo | refs/heads/master | nodes/0.9.x/python/Element.OverrideTransparencyInView.py | 12 | import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManage... |
shail2810/nova | refs/heads/master | nova/api/openstack/compute/schemas/attach_interfaces.py | 81 | # Copyright 2014 NEC Corporation. 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 ... |
shaurz/devo | refs/heads/master | search.py | 1 | import os, re, traceback
from dirtree_node import get_file_info
from util import is_text_file
class SearchAborted(Exception):
pass
def null_filter(info):
return True
class Search(object):
def __init__(self, path, match, output, file_filter=null_filter, dir_filter=null_filter):
self.path = path
... |
Ofgirls/ofgirlskorea | refs/heads/master | bamboo/migrations/0009_auto_20171015_1829.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-15 18:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bamboo', '0008_post_author'),
]
operations = [
migrations.RemoveField(
... |
collingreen/yaib | refs/heads/master | tools/util.py | 2 |
def dictToObject(d):
"""
Accepts a dictionary and returns an object with properties
matching the keys and values from the original dict. If the
key is not in the dict, returns the default given to the
constructor (defaults to None).
"""
class Container(object):
def __init__(self, d... |
yojota/volatility | refs/heads/master | volatility/plugins/addrspaces/standard.py | 44 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (C) 2004,2005,2006 4tphi Research
#
# Authors:
# {npetroni,awalters}@4tphi.net (Nick Petroni and AAron Walters)
# Michael Cohen <scudette@users.sourceforge.net>
# Mike Auty <mike.auty@gmail.com>
#
# This file is part of Volatility.
#
# Volatility ... |
jakevdp/networkx | refs/heads/master | networkx/tests/test_convert.py | 41 | #!/usr/bin/env python
from nose.tools import *
from networkx import *
from networkx.convert import *
from networkx.algorithms.operators import *
from networkx.generators.classic import barbell_graph,cycle_graph
class TestConvert():
def edgelists_equal(self,e1,e2):
return sorted(sorted(e) for e in e1)==sort... |
dcramer/django-compositepks | refs/heads/master | django/contrib/gis/tests/distapp/models.py | 8 | from django.contrib.gis.db import models
class SouthTexasCity(models.Model):
"City model on projected coordinate system for South Texas."
name = models.CharField(max_length=30)
point = models.PointField(srid=32140)
objects = models.GeoManager()
def __unicode__(self): return self.name
class SouthTe... |
heyigor/aubio | refs/heads/develop | python/demos/demo_pitch_sinusoid.py | 14 | #! /usr/bin/env python
from numpy import random, sin, arange, ones, zeros
from math import pi
from aubio import fvec, pitch
def build_sinusoid(length, freqs, samplerate):
return sin( 2. * pi * arange(length) * freqs / samplerate)
def run_pitch(p, input_vec):
f = fvec (p.hop_size)
cands = []
count = 0
for v... |
IGITUGraz/spore-nest-module | refs/heads/master | examples/lever_press_showcase/python/zmq_proxy_node_py3.py | 3 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from zmq_proxy_node import ZMQProxyNode
if __name__ == '__main__':
ZMQProxyNode().main()
|
tequa/ammisoft | refs/heads/master | ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/unittest/__main__.py | 301 | """Main entry point"""
import sys
if sys.argv[0].endswith("__main__.py"):
sys.argv[0] = "python -m unittest"
__unittest = True
from .main import main, TestProgram, USAGE_AS_MAIN
TestProgram.USAGE = USAGE_AS_MAIN
main(module=None)
|
valdecdev/odoo | refs/heads/master | addons/l10n_ch/account_wizard.py | 2 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Author: Nicolas Bessi. Copyright Camptocamp SA
# Financial contributors: Hasa SA, Open Net SA,
# Prisme Solutions Informatique SA, Quod SA
# Translation contributors: brain-tec AG, Agile Busines... |
okfish/django-oscar | refs/heads/master | tests/integration/order/model_tests.py | 41 | from datetime import timedelta, datetime
from decimal import Decimal as D
from django.test import TestCase
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
import mock
from oscar.apps.order.exceptions import (
InvalidOrderStatus, InvalidLineStatus, InvalidShippingEvent)
fr... |
nectR-Tutoring/nectr | refs/heads/new_development | features/steps/TutorProfile.py | 1 | from behave import *
use_step_matcher("re")
@given("Mike is a nect tutor and has already established student dashboard")
def step_impl(context):
"""
:type context: behave.runner.Context
"""
assert False
@step("Mike is on tutor interface")
def step_impl(context):
"""
:type context: behave.ru... |
trudikampfschaf/flask-microblog | refs/heads/master | flask/lib/python2.7/site-packages/werkzeug/formparser.py | 312 | # -*- coding: utf-8 -*-
"""
werkzeug.formparser
~~~~~~~~~~~~~~~~~~~
This module implements the form parsing. It supports url-encoded forms
as well as non-nested multipart uploads.
:copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more deta... |
mbrubeck/servo | refs/heads/master | tests/wpt/update.py | 144 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os
import sys
from wptrunner import wptcommandline
here = os.path.split(__file__)[0]
def wpt_path(*args):
... |
Ubuntu-Solutions-Engineering/ubuntu-tui-widgets | refs/heads/master | ubuntui/anchors.py | 3 | from urwid import Pile, Text, WidgetWrap
from .lists import SimpleList
from .utils import Padding, Color
class Header(WidgetWrap):
""" Header Widget
This widget uses the style key `frame_header`
Arguments:
title: Title text
excerpt: Additional header text
align: Text alignment, defaults=lef... |
fzheng/codejam | refs/heads/master | lib/python2.7/site-packages/sphinx/search/__init__.py | 2 | # -*- coding: utf-8 -*-
"""
sphinx.search
~~~~~~~~~~~~~
Create a full-text search index for offline search.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from six import iteritems, itervalues, text_type, string_types
from si... |
SaschaMester/delicium | refs/heads/master | build/android/pylib/device/battery_utils_test.py | 1 | #!/usr/bin/env python
# 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.
"""
Unit tests for the contents of battery_utils.py
"""
# pylint: disable=W0613
import logging
import os
import sys
import unittest
... |
PieXcoin/PieXcoin | refs/heads/master | qa/rpc-tests/mempool_resurrect_test.py | 150 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test resurrection of mined transactions when
# the blockchain is re-organized.
#
from test_framework impo... |
axt/angr | refs/heads/master | angr/analyses/identifier/functions/malloc.py | 5 |
from ..func import Func, TestData
from ....errors import SimMemoryError
class malloc(Func):
def __init__(self):
super(malloc, self).__init__() #pylint disable=useless-super-delegation
def num_args(self):
return 1
def get_name(self):
return "malloc"
def gen_input_output_pair... |
durden/tablib | refs/heads/develop | tablib/packages/ordereddict.py | 66 | # Copyright (c) 2009 Raymond Hettinger
#
# 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, modify, merge,
# publish,... |
achabotl/pambox | refs/heads/develop | pambox/tests/test_inner.py | 1 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import csv
import os.path
import numpy as np
import scipy.io as sio
from numpy.testing import assert_allclose
import pytest
from pambox import inner
__DATA_ROOT__ = os.path.join(os.path.dirname(__file__), 'data')
def test_low... |
dtroyer/python-openstacksdk | refs/heads/master | openstack/network/v2/agent.py | 1 | # 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 writing, software
# distributed under t... |
johnbachman/belpy | refs/heads/master | indra/ontology/virtual/__init__.py | 4 | """This module implements a virtual ontology which communicates with
a REST service to perform all ontology functions."""
from .ontology import VirtualOntology |
retomerz/intellij-community | refs/heads/master | python/testData/refactoring/rename/renameLocalWithComprehension.py | 83 | parameter_lists_copy = [m for m in parameter_lists]
for <caret>m in parameter_lists_copy:
if param_index >= len(m.GetParameters()):
parameter_lists.remove(m)
|
DataDog/integrations-core | refs/heads/master | twemproxy/tests/conftest.py | 1 | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
import requests
from datadog_checks.dev import docker_run
from datadog_checks.twemproxy import Twemproxy
from . import common
def setup_post_data():
requests.put('http://{}:2379/v2/ke... |
xionzz/earthquake | refs/heads/master | venv/lib/python2.7/site-packages/requests/packages/chardet/gb2312prober.py | 2993 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
iwxfer/pycrap | refs/heads/master | Nightwish.py | 2 | import config, urllib2, re
from bs4 import BeautifulSoup
from ScrapeJam import ScrapeJam, getHtml, cleanLyricList
NIGHTWISH_URL = 'http://nightwish.com/en/releases/lyrics'
def getAlbums(artist_tuple):
soup = BeautifulSoup(getHtml(artist_tuple[1]))
albums = soup.select('.sidebar_right_2c a')
ret = []
for album in ... |
SimVascular/VTK | refs/heads/master | ThirdParty/Twisted/twisted/protocols/basic.py | 40 | # -*- test-case-name: twisted.protocols.test.test_basic -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Basic protocols, such as line-oriented, netstring, and int prefixed strings.
"""
from __future__ import absolute_import, division
# System imports
import re
from struct import pack... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.