repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
todaychi/hue
refs/heads/master
apps/oozie/src/oozie/migrations/0018_auto__add_field_workflow_managed.py
39
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Workflow.managed' db.add_column('oozie_workflow', 'managed', self.gf('django.db.models.fields.Bool...
harshilasu/GraphicMelon
refs/heads/master
y/google-cloud-sdk/lib/protorpc/transport.py
24
#!/usr/bin/env python # # Copyright 2010 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 law o...
UNINETT/nav
refs/heads/master
python/nav/pgsync.py
2
#!/usr/bin/env python # # Copyright (C) 2008, 2011-2013 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV 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 p...
jinnykoo/wuyisj
refs/heads/master
src/oscar/apps/catalogue/south_migrations/0009_auto__add_field_product_rating.py
18
# -*- 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): # Adding field 'Product.rating' db.add_column('catalogue_product', 'rating', self.gf('...
wa1tnr/ainsuSPI
refs/heads/master
0-Distribution.d/circuitpython-master/tests/cpydiff/types_int_tobytesfloat.py
22
""" categories: Types,int description: Incorrect error message when passing float into to_bytes cause: Unknown workaround: Unknown """ try: int('1').to_bytes(1.0) except TypeError as e: print(e)
budnyjj/courses_python
refs/heads/master
lectures/functions/code/first_class.py
1
def square(x): return x ** 2 s = square print s(5) def ff(f, x): return f(f(x) - 1) print ff(s, 5)
mythos234/SimplKernel-LL-G920F
refs/heads/master
scripts/exynos_checkpatch_helper.py
169
""" exynos_checkpatch_helper.py - a helper script for exynos_checkpatch.sh Dept : S/W Solution Dev Team Author : Solution3 Power Part Update : 2014.12.08 """ import subprocess as sp import sys def print_log(color, log): colored_log = '' if color == 'r': colored_log = "\033[31m" + log + "\033...
ArcherSys/ArcherSys
refs/heads/master
archersys/Lib/site-packages/pip/_vendor/certifi/__init__.py
275
from .core import where
ShineFan/odoo
refs/heads/8.0
addons/hw_posbox_upgrade/controllers/__init__.py
2344
import main # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
misachi/job_match
refs/heads/master
run_tests.py
1
import pytest from bs4 import BeautifulSoup as BS pytest.main(['--durations', '10', '--cov-report', 'html', '--junit-xml', 'test-reports/results.xml', '--verbose']) url = r'htmlcov/index.html' page = open(url) soup = BS(page.read(), features='html5lib') aggregate_total = soup.find_all('tr', {'class': 'total'}) final...
beermix/source
refs/heads/master
package/lienol/luci-app-ssr-mudb-server/root/usr/share/ssr_mudb_server/shadowsocks/crypto/table.py
1
# !/usr/bin/env python3 # # Copyright 2015 clowwindy # # 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 o...
lem9/weblate
refs/heads/master
weblate/trans/views/dictionary.py
1
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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, eith...
finfish/scrapy
refs/heads/master
scrapy/core/downloader/handlers/http10.py
2
"""Download handlers for http and https schemes """ from twisted.internet import reactor from scrapy.utils.misc import load_object from scrapy.utils.python import to_unicode class HTTP10DownloadHandler(object): lazy = False def __init__(self, settings): self.HTTPClientFactory = load_object(settings['...
CuonDeveloper/cuon
refs/heads/master
cuon_client/cuon_newclient/bin/cuon/Finances/SingleAccountSentence.py
1
# -*- coding: utf-8 -*- ##Copyright (C) [2003] [Jürgen Hamel, D-32584 Löhne] ##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 versio...
40223136/-2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_break.py
785
import gc import io import os import sys import signal import weakref import unittest @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill") @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows") @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 " "if threa...
bthirion/scikit-learn
refs/heads/master
sklearn/manifold/mds.py
20
""" Multi-dimensional Scaling (MDS) """ # author: Nelle Varoquaux <nelle.varoquaux@gmail.com> # License: BSD import numpy as np import warnings from ..base import BaseEstimator from ..metrics import euclidean_distances from ..utils import check_random_state, check_array, check_symmetric from ..externals.joblib impo...
davidfischer-ch/scdl
refs/heads/master
setup.py
1
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- from setuptools import setup, find_packages import scdl setup( name='scdl', version=scdl.__version__, packages=find_packages(), author='FlyinGrub', author_email='flyinggrub@gmail.com', description='Download Music from Souncloud', long_descr...
cortext/crawtextV2
refs/heads/master
~/venvs/crawler/lib/python2.7/site-packages/requests/packages/chardet/__init__.py
745
######################## BEGIN LICENSE BLOCK ######################## # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ve...
mfwarren/fabric-factory
refs/heads/master
src/factory/storage.py
1
import os import uuid from django.core.files.storage import FileSystemStorage class FileSystemStorageUuidName(FileSystemStorage): def get_available_name(self, name): """ Returns a filename composed of a uuid on the target storage system. """ root, file_ext = os.path.splitext(name) ...
Work4Labs/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/modeltests/custom_managers/__init__.py
12133432
marco-lilek/musiClr
refs/heads/master
src/windows/__init__.py
12133432
ngonzalvez/sentry
refs/heads/master
tests/sentry/ratelimits/__init__.py
12133432
sgzsh269/django
refs/heads/master
tests/generic_inline_admin/__init__.py
12133432
pandeyop/rally
refs/heads/master
tests/unit/doc/__init__.py
12133432
mmllnr/plugin.video.xstream
refs/heads/master
resources/lib/util.py
5
import re import urllib import htmlentitydefs class cUtil: def removeHtmlTags(self, sValue, sReplace = ''): p = re.compile(r'<.*?>') return p.sub(sReplace, sValue) def formatTime(self, iSeconds): iSeconds = int(iSeconds) iMinutes = int(iSeconds / 60) iSeconds = iSeco...
iblancasa/rticonnextdds-logparser
refs/heads/master
src/rtilogparser.py
1
#!/bin/python # Log Parser for RTI Connext. # # Copyright 2016 Real-Time Innovations, 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/LIC...
songyi199111/sentry
refs/heads/master
src/sentry/migrations/0106_auto__del_searchtoken__del_unique_searchtoken_document_field_token__de.py
36
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): """ A no-op migration to ensure the new search backend is clean. """ def forwards(self, orm): pass def backwards(self, orm):...
khoanguyen0791/cs170
refs/heads/master
CS170_homework/Maeander.py
1
import turtle kay = turtle.Turtle() a = 20 kay.penup() #I used kay.up and kay.down and the module still works fine. kay.goto(-310,0) #Is there any problem if I use these methods? kay.pendown() def pattern(): kay.forward(a*4) kay.left(90) kay.forward(a*3) kay.left(90) kay.forward(...
ericmckean/syzygy
refs/heads/master
third_party/numpy/files/numpy/distutils/ccompiler.py
18
import re import os import sys import types from copy import copy from distutils.ccompiler import * from distutils import ccompiler from distutils.errors import DistutilsExecError, DistutilsModuleError, \ DistutilsPlatformError from distutils.sysconfig import customize_compiler from distut...
paulgear/ntpmon
refs/heads/master
src/metrics.py
1
# # Copyright: (c) 2016 Paul D. Gear # License: GPLv3 <http://www.gnu.org/licenses/gpl.html> # # 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 yo...
Nikoala/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/fourtube.py
20
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_request, ) from ..utils import ( clean_html, parse_duration, str_to_int, unified_strdate, ) class FourTubeIE(InfoExtractor): IE_NAME = '4tube' _VALID_URL = r'https?://...
Chancoin-core/CHANCOIN
refs/heads/master
test/functional/bip68-112-113-p2p.py
37
#!/usr/bin/env python3 # Copyright (c) 2015-2016 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 activation of the first version bits soft fork. This soft fork will activate the following BIPS: ...
Podolyakofs/django
refs/heads/master
learning_django/learning_django/settings.py
1
# Django settings for learning_django project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ('Fedor Podolyako', 'podolyakofs@gmail.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2...
andfoy/margffoy-tuay-server
refs/heads/master
env/lib/python2.7/site-packages/setuptools/py26compat.py
805
""" Compatibility Support for Python 2.6 and earlier """ import sys from setuptools.compat import splittag def strip_fragment(url): """ In `Python 8280 <http://bugs.python.org/issue8280>`_, Python 2.7 and later was patched to disregard the fragment when making URL requests. Do the same for Python 2.6 and earlier...
j-rock/cs598ps
refs/heads/master
src/py/example5.py
1
# This contains a simple method to generate empty json files for new # TestRecordings. import sys from cssigps.dataset import * def process_group(path): # generate json files for a group of TestRecordings print('Generate json files for group of TestRecording') recordings = find_testrecordings(path) f...
craftytrickster/servo
refs/heads/master
tests/wpt/update/fetchlogs.py
222
# 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 argparse import cStringIO import gzip import json import os import requests import urlparse treeherder_base = "h...
suncycheng/intellij-community
refs/heads/master
python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/multilineAssignment_after.py
31
from typing import List xs: List[int] = [1, 2, 3]
kikocorreoso/brython
refs/heads/master
www/src/Lib/test/test_getargs2.py
4
import unittest import math import string import sys from test import support # Skip this test if the _testcapi module isn't available. _testcapi = support.import_module('_testcapi') from _testcapi import getargs_keywords, getargs_keyword_only # > How about the following counterproposal. This also changes some of # > ...
facebook/mysql-5.6
refs/heads/fb-mysql-5.6.35
xtrabackup/test/kewpie/lib/modes/native/native_test_management.py
21
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # ## 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...
DOAJ/doaj
refs/heads/develop
deploy/_legacy/esbackup.py
1
#! /usr/bin/python # TODO: update this to query 1000 rows at a time from large indices, or it falls over from datetime import datetime import os, requests, json, shutil # make sure this script is executable, then symlink it from a cron folder, # or trigger a schedule for it howevr you see fit # set the location of ...
twolfson/electron
refs/heads/master
script/lib/github.py
200
#!/usr/bin/env python import json import os import re import sys REQUESTS_DIR = os.path.abspath(os.path.join(__file__, '..', '..', '..', 'vendor', 'requests')) sys.path.append(os.path.join(REQUESTS_DIR, 'build', 'lib')) sys.path.append(os.path.join(REQUESTS_DIR, 'build', 'l...
subutai/htmresearch
refs/heads/master
projects/union_path_integration/plot_convergence.py
4
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2018, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
pwasiewi/dokerz
refs/heads/master
codelite-vnc/image/usr/lib/noVNC/utils/json2graph.py
5
#!/usr/bin/env python ''' Use matplotlib to generate performance charts Copyright 2011 Joel Martin Licensed under MPL-2.0 (see docs/LICENSE.MPL-2.0) ''' # a bar plot with errorbars import sys, json import numpy as np import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties def usage(): ...
edx/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/django/contrib/gis/tests/geoapp/models.py
259
from django.contrib.gis.db import models from django.contrib.gis.tests.utils import mysql, spatialite # MySQL spatial indices can't handle NULL geometries. null_flag = not mysql class Country(models.Model): name = models.CharField(max_length=30) mpoly = models.MultiPolygonField() # SRID, by default, is 4326 ...
dchaplinsky/pep.org.ua
refs/heads/master
pepdb/tasks/migrations/0064_auto_20191025_1656.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-25 13:56 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb import django.core.serializers.json from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('tasks', '0063_naisc...
gunchleoc/django
refs/heads/master
tests/test_runner/test_debug_sql.py
146
import sys import unittest from django.db import connection from django.test import TestCase from django.test.runner import DiscoverRunner from django.utils import six from django.utils.encoding import force_text from .models import Person @unittest.skipUnless(connection.vendor == 'sqlite', 'Only run on sqlite so w...
michigraber/scikit-learn
refs/heads/master
sklearn/svm/base.py
28
from __future__ import print_function import numpy as np import scipy.sparse as sp import warnings from abc import ABCMeta, abstractmethod from . import libsvm, liblinear from . import libsvm_sparse from ..base import BaseEstimator, ClassifierMixin, ChangedBehaviorWarning from ..preprocessing import LabelEncoder from...
jriegel/FreeCAD
refs/heads/dev-assembly-next
src/Mod/Fem/MechanicalMaterial.py
4
#*************************************************************************** #* * #* Copyright (c) 2013 - Juergen Riegel <FreeCAD@juergen-riegel.net> * #* * #* This pr...
ludmilamarian/invenio
refs/heads/master
invenio/modules/collections/upgrades/collections_2015_05_28_recjson_tag_value.py
8
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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 # License, or (at your option) any later...
knowsWhereHisTowelIs/pi-pyth-serv-socketio
refs/heads/master
lib/python3.5/site-packages/pip/_vendor/packaging/requirements.py
448
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import string import re from pip._vendor.pyparsing import ( stringSta...
krispingal/topic_modeling
refs/heads/master
enron/pre_process_enron.py
1
"""Preprocessing Enron email text for analysis includes removing stop-words and then tokenizing """ import os import logging import gensim import csv import email import re import sys from time import clock from nltk.corpus import stopwords logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', le...
dstanek/snake-guice.orig
refs/heads/master
snakeguice/__init__.py
2
"""Main API entry point for snake-guice.""" from snakeguice.injector import create_injector, Injector from snakeguice.decorators import inject, annotate, provides from snakeguice.errors import SnakeGuiceError, BindingError from snakeguice.interceptors import ParameterInterceptor
Haynie-Research-and-Development/jarvis
refs/heads/master
deps/lib/python3.4/site-packages/sqlalchemy/testing/util.py
1
# testing/util.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from ..util import jython, pypy, defaultdict, decorator, py2k import decimal import ...
aeijdenberg/certificate-transparency
refs/heads/master
python/ct/crypto/verify_rsa.py
24
from ct.crypto import error from ct.crypto import pem from ct.proto import client_pb2 import Crypto.Hash.SHA256 import Crypto.PublicKey.RSA import Crypto.Signature.PKCS1_v1_5 class RsaVerifier(object): """Verifies RSA signatures.""" # The signature algorithm used for this public key. SIGNATURE_ALGORITHM ...
neerajvashistha/pa-dude
refs/heads/master
lib/python2.7/site-packages/django/contrib/gis/db/models/lookups.py
104
from __future__ import unicode_literals import re from django.core.exceptions import FieldDoesNotExist from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import Col, Expression from django.db.models.lookups import Lookup from django.utils import six gis_lookups = {} class GISLookup...
yqzhang/OpenANN
refs/heads/master
benchmarks/octopusarm/benchmark.py
5
import glob import os import shutil import subprocess import sys import threading import time import urllib import zipfile DIRECTORY = "octopus-code-distribution" ARCHIVE = "octopus-code-distribution.zip" URL = "http://www.cs.mcgill.ca/~dprecup/workshops/ICML06/Octopus/%s" % ARCHIVE setup = { "env_dir" : DIRECTORY ...
Ritvik1512/namebench
refs/heads/master
nb_third_party/graphy/__init__.py
257
__version__='1.0'
boompieman/iim_project
refs/heads/master
project_python2/lib/python2.7/site-packages/tornado/test/iostream_test.py
72
from __future__ import absolute_import, division, print_function, with_statement from tornado.concurrent import Future from tornado import gen from tornado import netutil from tornado.iostream import IOStream, SSLIOStream, PipeIOStream, StreamClosedError from tornado.httputil import HTTPHeaders from tornado.log import ...
Thraxis/pymedusa
refs/heads/master
lib/requests/packages/chardet/jisfreq.py
3130
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
prune998/ansible
refs/heads/devel
test/units/plugins/cache/__init__.py
12133432
potatolondon/django-nonrel-1-4
refs/heads/master
tests/regressiontests/cache/__init__.py
12133432
starsplatter/Ubiqu-Ity
refs/heads/master
Support/jinja2_htmlcompress/__init__.py
12133432
IRI-Research/django
refs/heads/master
tests/select_related_regress/__init__.py
12133432
mdavoodi/konkourse-python
refs/heads/master
courses/__init__.py
12133432
jorgehortelano/BlackGecko
refs/heads/master
BlackGecko/messaging/__init__.py
12133432
manjunaths/tensorflow
refs/heads/master
tensorflow/python/ops/losses/losses.py
36
# 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...
Eibriel/rdany
refs/heads/master
processors/es/__init__.py
6
"""placeholder"""
jralls/gramps
refs/heads/master
gramps/gen/filters/rules/note/_noteprivate.py
6
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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...
acshi/osf.io
refs/heads/develop
addons/wiki/__init__.py
32
default_app_config = 'addons.wiki.apps.WikiAddonAppConfig'
Jonekee/chromium.src
refs/heads/nw12
tools/symsrc/source_index.py
59
#!/usr/bin/env python # Copyright (c) 2011 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. """Usage: <win-path-to-pdb.pdb> This tool will take a PDB on the command line, extract the source files that were used in building ...
liuzz1983/open_vision
refs/heads/master
openvision/utils/bboxes.py
1
# Copyright 2017 Paul Balanca. 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...
SCSSoftware/BlenderTools
refs/heads/master
addon/io_scs_tools/exp/pip/spawn_point.py
1
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation either version 2 # of the License, or (at your option) any later version. # # This program is distributed in...
peterdemin/mutant
refs/heads/master
src/mutant/__init__.py
223
__version__ = '1.0.0'
radarsat1/siconos
refs/heads/master
numerics/swig/tests/test_vi.py
2
# Copyright (C) 2005, 2018 by INRIA #!/usr/bin/env python import numpy as np import siconos.numerics as sn def vi_function_1D(n, x, F): F[0] = 1.0 + x[0] pass def vi_nabla_function_1D(n, x, nabla_F): nabla_F[0] = 1.0 pass def vi_function_2D(n, z, F): M = np.array([[2., 1.], ...
krikru/tensorflow-opencl
refs/heads/master
tensorflow/contrib/learn/python/learn/tests/dataframe/csv_parser_test.py
18
# 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...
after1990s/little_utils
refs/heads/master
pydev_ext/access_viloation_handler.py
1
from pydbg import * from pydbg.defines import * import utils def check_accessv(dbg): if dbg.dbg.u.Exception.dwFirstChance: return DBG_EXCEPTION_NOT_HANDLED; crash_bin = utils.crash_binning.crash_binning(); crash_bin.record_crash(dbg); print(crash_bin.crash_synopsis()); dbg.terminate_pr...
j2carv/xbmc-1
refs/heads/master
lib/libUPnP/Neptune/Extras/Tools/Logging/NeptuneLogConsole.py
22
#!/usr/bin/env python from socket import * from optparse import OptionParser UDP_ADDR = "0.0.0.0" UDP_PORT = 7724 BUFFER_SIZE = 65536 #HEADER_KEYS = ['Logger', 'Level', 'Source-File', 'Source-Function', 'Source-Line', 'TimeStamp'] HEADER_KEYS = { 'mini': ('Level'), 'standard': ('Logger', 'Level', 'Source-Func...
Smile-SA/odoo_addons
refs/heads/12.0
smile_account_asset/report/__init__.py
1
# -*- coding: utf-8 -*- # (C) 2019 Smile (<http://www.smile.fr>) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). # Please keep the following line here, because this is an AbstractModel from . import account_asset_report_mixin from . import account_asset_depreciations_report from . import account_asset...
eugenewong/AirShare
refs/heads/master
boilerplate/external/pytz/tzfile.py
118
#!/usr/bin/env python ''' $Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $ ''' from cStringIO import StringIO from datetime import datetime, timedelta from struct import unpack, calcsize from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo from pytz.tzinfo import memorized_datetime, memorized_timede...
Thraxis/pymedusa
refs/heads/master
lib/github/Gist.py
72
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Steve English <steve.english@navetas.com> # # Copyright 2012 Vincent Jacques <vincent@vincent-ja...
TeamEOS/external_skia
refs/heads/lp5.0
tools/sanitize_source_files.py
176
#!/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. """Module that sanitizes source files with specified modifiers.""" import commands import os import sys _FILE_EXTENSIONS_TO_SAN...
DasAllFolks/django-pedant
refs/heads/master
settings_test.py
2
import os DEBUG = True TEMPLATE_DEBUG = DEBUG # This allows specifying a file DB for manual testing, # but defaults to memory for test. __db_file_name = os.environ.get('DBFILENAME', ':memory:') DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': __db_file_name, 'USE...
sharhar/USB-Thing
refs/heads/master
UpdaterFiles/Lib/python-3.5.1.amd64/Lib/plat-linux/IN.py
166
# Generated by h2py from /usr/include/netinet/in.h _NETINET_IN_H = 1 # Included from features.h _FEATURES_H = 1 __USE_ANSI = 1 __FAVOR_BSD = 1 _ISOC99_SOURCE = 1 _POSIX_SOURCE = 1 _POSIX_C_SOURCE = 199506 _XOPEN_SOURCE = 600 _XOPEN_SOURCE_EXTENDED = 1 _LARGEFILE64_SOURCE = 1 _BSD_SOURCE = 1 _SVID_SOURCE = 1 _BSD_SOURC...
jcftang/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_vrf.py
8
#!/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 distribut...
mouhb/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/ios/gyptest-extension.py
74
#!/usr/bin/env python # Copyright (c) 2014 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 that ios app extensions are built correctly. """ import TestGyp import TestMac import sys if sys.platform == 'darwin' and Tes...
gminds/rapidnewsng
refs/heads/master
django/contrib/formtools/tests/wizard/wizardtests/__init__.py
12133432
Princu7/open-event-orga-server
refs/heads/development
app/views/public/__init__.py
12133432
texttochange/vusion-backend
refs/heads/develop
vusion/persist/participant/participant.py
1
import re from datetime import datetime from vusion.persist import Model from vusion.error import InvalidField, MissingField from vusion.utils import time_to_vusion_format ## TODO update the validation class Participant(Model): MODEL_TYPE = 'participant' MODEL_VERSION = '5' REGEX_RAW = re.compile('.*_ra...
shayanb/pycoin
refs/heads/master
pycoin/services/chain_so.py
3
import json try: from urllib2 import urlopen except ImportError: from urllib.request import urlopen from pycoin.serialize import h2b, h2b_rev from pycoin.tx import Spendable class ChainSoProvider(object): def __init__(self, netcode="BTC"): NETWORK_PATHS = { "BTC" : "BTC", ...
mlperf/training_results_v0.7
refs/heads/master
Google/benchmarks/bert/implementations/bert-cloud-TF2.0-tpu-v3-32/tf2_common/utils/testing/integration.py
2
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
henrysher/aws-cloudinit
refs/heads/v0.7.2
tests/unittests/test_handler/test_handler_growpart.py
1
from mocker import MockerTestCase from cloudinit import cloud from cloudinit import util from cloudinit.config import cc_growpart import errno import logging import os import re # growpart: # mode: auto # off, on, auto, 'growpart', 'parted' # devices: ['root'] HELP_PARTED_NO_RESIZE = """ Usage: parted [OPTION...
willingc/oh-mainline
refs/heads/master
vendor/packages/Pygments/pygments/lexers/_robotframeworklexer.py
76
# -*- coding: utf-8 -*- """ pygments.lexers._robotframeworklexer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Robot Framework. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Copyright 2012 Nokia Siemens Networks Oyj # # License...
spirrello/spirrello-pynet-work
refs/heads/master
applied_python/lib/python2.7/site-packages/pylint/test/input/func_noerror_crash_127416.py
7
# pylint: disable=C0111,R0201 """ FUNCTIONALITY """ class Example(object): """ @summary: Demonstrates pylint error caused by method expecting tuple but called method does not return tuple """ def method_expects_tuple(self, obj): meth, args = self.method_doesnot_return_tuple(obj) ...
tkaitchuck/nupic
refs/heads/master
external/linux64/lib/python2.6/site-packages/numpy/oldnumeric/random_array.py
87
# Backward compatible module for RandomArray __all__ = ['ArgumentError','F','beta','binomial','chi_square', 'exponential', 'gamma', 'get_seed', 'mean_var_test', 'multinomial', 'multivariate_normal', 'negative_binomial', 'noncentral_F', 'noncentral_chi_square', 'normal', 'permutation', ...
doismellburning/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/video_outlines/urls.py
189
""" URLs for video outline API """ from django.conf.urls import patterns, url from django.conf import settings from .views import VideoSummaryList, VideoTranscripts urlpatterns = patterns( 'mobile_api.video_outlines.views', url( r'^courses/{}$'.format(settings.COURSE_ID_PATTERN), VideoSummaryL...
ThkerLee/torngas
refs/heads/master
torngas/exception.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created by mengqingyun on 14-5-21. """ from tornado.web import HTTPError try: from exceptions import Exception, StandardError, Warning except ImportError: # Python 3 StandardError = Exception class BaseError(StandardError): """Base Error""" class A...
shines77/Google-ProtoBuf
refs/heads/master
examples/list_people.py
429
#! /usr/bin/python # See README.txt for information and build instructions. import addressbook_pb2 import sys # Iterates though all people in the AddressBook and prints info about them. def ListPeople(address_book): for person in address_book.person: print "Person ID:", person.id print " Name:", person.na...
quake0day/Dodrio
refs/heads/master
app/scholar.py
1
#! /usr/bin/env python """ scholar A module for retrieving article information from Google Scholar queries """ # ---------------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------------- from __future__ import print_function im...
mne-tools/mne-python
refs/heads/main
examples/stats/sensor_regression.py
10
""" ============================================================================ Analysing continuous features with binning and regression in sensor space ============================================================================ Predict single trial activity from a continuous variable. A single-trial regression is ...
rajsadho/django
refs/heads/master
tests/m2m_signals/tests.py
271
""" Testing signals emitted on changing m2m relations. """ from django.db import models from django.test import TestCase from .models import Car, Part, Person, SportsCar class ManyToManySignalsTest(TestCase): def m2m_changed_signal_receiver(self, signal, sender, **kwargs): message = { 'insta...