repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
xiaozhuchacha/OpenBottle
refs/heads/master
action_earley_srv/scripts/nltk/corpus/reader/cmudict.py
5
# Natural Language Toolkit: Carnegie Mellon Pronouncing Dictionary Corpus Reader # # Copyright (C) 2001-2017 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ The Carnegie Mellon Pronouncing Dictionary [cmudict.0.6] ftp://ftp.cs.cmu.edu/...
babyliynfg/cross
refs/heads/master
tools/project-creator/Python2.6.6/Lib/email/mime/message.py
73
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing message/* MIME documents.""" __all__ = ['MIMEMessage'] from email import message from email.mime.nonmultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart):...
Iconik/eve-suite
refs/heads/master
src/model/static/map/landmark.py
1
from model.flyweight import Flyweight from model.static.database import database class Landmark(Flyweight): def __init__(self,landmark_id): #prevents reinitializing if "_inited" in self.__dict__: return self._inited = None #prevents reinitializing self.landmark_...
SNoiraud/gramps
refs/heads/master
gramps/gen/filters/rules/family/_hassourcecount.py
5
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2007 Donald N. Allingham # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2008 Jerome Rapinat # Copyright (C) 2008 Benny Malengier # # This program is free software; you can redistribute it and/or modify # it under the terms of the ...
markneville/nupic
refs/heads/master
examples/opf/experiments/anomaly/spatial/10field_few_skewed/description.py
96
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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...
kl0u/flink
refs/heads/master
flink-python/pyflink/table/tests/test_table_config_completeness.py
16
################################################################################ # 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...
zsiciarz/django
refs/heads/master
django/core/signals.py
684
from django.dispatch import Signal request_started = Signal(providing_args=["environ"]) request_finished = Signal() got_request_exception = Signal(providing_args=["request"]) setting_changed = Signal(providing_args=["setting", "value", "enter"])
ahmed-mahran/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/conditional_processing/__init__.py
389
# -*- coding:utf-8 -*-
Peddle/hue
refs/heads/master
desktop/core/ext-py/Babel-0.9.6/babel/messages/frontend.py
67
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. ...
AvaniPai/API
refs/heads/master
node_modules/pg/node_modules/generic-pool/fabfile.py
926
# # dependencies: # fabric (apt-get install fabric) # node-jslint (http://github.com/reid/node-jslint) # expresso (or replace with whatever node.js test tool you're using) # from fabric.api import local import os, os.path def test(): local('expresso -I lib test/*', capture=False) def jslint(): ...
reuk/wayverb
refs/heads/master
bin/fitted_boundary/graphs.py
2
#!/usr/local/bin/python import numpy as np import matplotlib render = True if render: matplotlib.use('pgf') import matplotlib.pyplot as plt import scipy.signal as signal import json import os.path from paths import * USE_DB_AXES = True CUTOFF = 0.196 def a2db(a): return 20 * np.log10(a) def frequency_plot...
markovg/nest-simulator
refs/heads/master
topology/pynest/tests/test_connection_with_elliptical_mask.py
10
# -*- coding: utf-8 -*- # # test_connection_with_elliptical_mask.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ver...
oskarpearson/mmblelink
refs/heads/master
mmeowlink/detect_radio_comms.py
2
import time from datetime import datetime from exceptions import CommsException from mmeowlink.exceptions import CommsException,InvalidPacketReceived from hex_handling import hexify from vendors.mmcommander_link import MMCommanderLink from vendors.subg_rfspy_link import SubgRfspyLink class DetectRadioComms(object): ...
heytcass/homeassistant-config
refs/heads/master
deps/sqlalchemy/dialects/sybase/__init__.py
55
# sybase/__init__.py # Copyright (C) 2005-2016 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 sqlalchemy.dialects.sybase import base, pysybase, pyodbc # default dialect ...
Nirvedh/CoarseCoherence
refs/heads/master
src/mem/ruby/network/MessageBuffer.py
24
# Copyright (c) 2015 Mark D. Hill and David A. Wood. # 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 conditi...
aliyun/oss-ftp
refs/heads/master
python27/win32/Lib/test/test_base64.py
72
import unittest from test import test_support import base64 class LegacyBase64TestCase(unittest.TestCase): def test_encodestring(self): eq = self.assertEqual eq(base64.encodestring("www.python.org"), "d3d3LnB5dGhvbi5vcmc=\n") eq(base64.encodestring("a"), "YQ==\n") eq(base64.encod...
sopac/pacgeo
refs/heads/master
geonode/geoserver/urls.py
6
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
ecell/libmoleculizer
refs/heads/master
python-src/language_parser/moleculizer/sectionexplicitspeciesblock.py
1
############################################################################### # Copyright (C) 2007, 2008, 2009 The Molecular Sciences Institute # Original Author: # Nathan Addy, Scientific Programmer Email: addy@molsci.org # The Molecular Sciences Institute # ##################################################...
earthican/BoxOfficeMojoAPI
refs/heads/master
bom/constants.py
2
#!/usr/bin/python BASE_URL = 'http://boxofficemojo.com' DAILY_CHART = 'daily/chart' WEEKEND_CHART = 'weekend/chart' WEEKLY_CHART = 'weekly/chart' # seconds to sleep between 2 consecutive page requests INTERVAL_BETWEEN_REQUESTS = 1
MrNuggles/HeyBoet-Telegram-Bot
refs/heads/master
temboo/Library/Bitly/Links/ExpandURL.py
4
# -*- coding: utf-8 -*- ############################################################################### # # ExpandURL # Returns the target (long) URL given a shortened Bitly URL. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you ...
tszym/ansible
refs/heads/devel
test/units/plugins/lookup/test_lastpass.py
153
# (c)2016 Andrew Zenk <azenk@umn.edu> # # 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. # # ...
lxneng/incubator-airflow
refs/heads/master
airflow/migrations/versions/9635ae0956e7_index_faskfail.py
7
# flake8: noqa # # 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...
infoxchange/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/contrib/localflavor/uy/uy_departaments.py
396
# -*- coding: utf-8 -*- """A list of Urguayan departaments as `choices` in a formfield.""" DEPARTAMENT_CHOICES = ( ('G', u'Artigas'), ('A', u'Canelones'), ('E', u'Cerro Largo'), ('L', u'Colonia'), ('Q', u'Durazno'), ('N', u'Flores'), ('O', u'Florida'), ('P', u'Lavalleja'), ('B', u'M...
dga4654dan/UTM-Demo
refs/heads/master
V_1_0_1/UtmDemo_Sfs_2.9.0/UtmDemo_Sfs_2.9.0_Server/lib/Lib/encodings/cp1257.py
9
""" Python Character Mapping Codec generated from 'CP1257.TXT' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,erro...
pcm17/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/determinant_op_test.py
65
# 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...
TheDr1ver/WIPSTER
refs/heads/master
wipster/uanalysis/forms.py
1
from django import forms from .models import URL from django.core.validators import validate_integer class UploadUrlForm(forms.ModelForm): UserAgent = forms.ChoiceField(choices=[('Internet Explorer 6.0 (Windows XP)', u'Internet Explorer 6.0 (Windows XP)'), ('Internet Explorer 6...
belangeo/qlive
refs/heads/master
Resources/MixerPanel.py
1
# encoding: utf-8 """ Copyright 2016 (Pierre Michaud, Olivier Belanger, Tiago Bortoletto Vaz) This file is part of QLive, a cues-based software to help the creation of mixed music. QLive is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published b...
DARKPOP/external_chromium_org_third_party_WebKit
refs/heads/dark-5.1
Tools/Scripts/webkitpy/layout_tests/port/linux.py
15
# Copyright (C) 2010 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 ...
javiergarridomellado/Empresa_django
refs/heads/master
devcodela/lib/python2.7/site-packages/pip/commands/show.py
344
import os from pip.basecommand import Command from pip.log import logger from pip._vendor import pkg_resources class ShowCommand(Command): """Show information about one or more installed packages.""" name = 'show' usage = """ %prog [options] <package> ...""" summary = 'Show information about in...
massot/account-invoice-reporting
refs/heads/8.0
__unported__/invoice_report_assemble/__openerp__.py
7
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
dr0pz0ne/sibble
refs/heads/add_block_rescue_task_variables
test/units/inventory/test_host.py
55
# Copyright 2015 Marius Gedminas <marius@gedmin.as> # # 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...
akretion/odoo
refs/heads/12-patch-paging-100-in-o2m
addons/mail/models/ir_actions.py
7
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil.relativedelta import relativedelta from odoo import _, api, fields, models from odoo.exceptions import UserError, ValidationError class ServerActions(models.Model): """ Add email option in server act...
hef/samba
refs/heads/bind9_10
lib/dnspython/dns/e164.py
56
# Copyright (C) 2006, 2007, 2009, 2011 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...
potzenheimer/meetshaus
refs/heads/master
src/meetshaus.blog/meetshaus/blog/blog.py
1
# -*- coding: UTF-8 -*- """ Module providing folderish blog content type """ from plone.dexterity.content import Container from plone.supermodel import model from zope import schema from zope.interface import implementer from meetshaus.blog import MessageFactory as _ class IBlog(model.Schema): """ Blog Conte...
KellyChan/Python
refs/heads/master
javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/conf/locale/ta/formats.py
434
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F, Y' TIME_FORMAT = 'g:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT ...
lepidaspa/ckanext-rernew
refs/heads/master
ckanext/rernew/plugin.py
1
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit class RernewPlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) # IConfigurer def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(con...
shams169/pythonProject
refs/heads/master
ContactsDir/env/lib/python3.6/site-packages/wheel/signatures/djbec.py
566
# Ed25519 digital signatures # Based on http://ed25519.cr.yp.to/python/ed25519.py # See also http://ed25519.cr.yp.to/software.html # Adapted by Ron Garret # Sped up considerably using coordinate transforms found on: # http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html # Specifically add-2008-hwcd-4 and d...
ayoubserti/winpty
refs/heads/master
build-gyp/test/win/gyptest-link-enable-winrt-app-revision.py
41
#!/usr/bin/env python # 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. """ Make sure msvs_application_type_revision works correctly. """ import TestGyp import os import sys import struct CHDIR = 'winrt-app-ty...
mahak/nova
refs/heads/master
nova/tests/unit/policies/test_migrate_server.py
3
# 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 # d...
boshnivolo/TIY-Assignments
refs/heads/master
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py
2687
#!/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. """ Unit tests for the msvs.py file. """ import gyp.generator.msvs as msvs import unittest import StringIO class TestSequenceFunctions(uni...
duoduo369/leaning-frontend
refs/heads/master
node_modules/gulp-iconfont/node_modules/gulp-ttf2woff2/node_modules/ttf2woff2/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py
1363
# 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. import filecmp import gyp.common import gyp.xcodeproj_file import gyp.xcode_ninja import errno import os import sys import posixpath import re import shutil import...
ingokegel/intellij-community
refs/heads/master
python/testData/paramInfo/ReassignedInstanceMethod.py
83
class Foo: def moo(self, a, b, c): pass foo = Foo() qoo = foo qoo.moo(<arg1>1, <arg2>2, <arg3>"bamboo")
zlfoxy/GitInPractice
refs/heads/master
expertpython/myiterator.py
1
class MyIterator(object): def __int__(self,step): self.step = step def next(self): """Returns the next element.""" if self.step == 0: raise StopIteration self.step -= 1 return self.step def __iter__(self): """Returns the iterator itself.""" ...
SatoshiNXSimudrone/sl4a-damon-clone
refs/heads/master
python/src/Demo/curses/life.py
43
#!/usr/bin/env python # life.py -- A curses-based version of Conway's Game of Life. # Contributed by AMK # # An empty board will be displayed, and the following commands are available: # E : Erase the board # R : Fill the board randomly # S : Step for a single generation # C : Update continuously until a key is str...
DecipherOne/Troglodyte
refs/heads/master
Trog Build Dependencies/Python26/Lib/test/crashers/borrowed_ref_1.py
168
""" _PyType_Lookup() returns a borrowed reference. This attacks the call in dictobject.c. """ class A(object): pass class B(object): def __del__(self): print 'hi' del D.__missing__ class D(dict): class __missing__: def __init__(self, *args): pass d = D() a = A() a.cy...
topiaruss/django-filer
refs/heads/develop
filer/migrations/0008_polymorphic__del_field_file__file_type_plugin_name.py
64
# 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): # Deleting field 'File._file_type_plugin_name' db.delete_column('filer_file', '_file_type_plugin_name') ...
tushar7795/MicroBlog
refs/heads/master
flask/lib/python2.7/site-packages/pip/_vendor/distlib/index.py
571
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # import hashlib import logging import os import shutil import subprocess import tempfile try: from threading import Thread except ImportErr...
JAOSP/aosp_platform_external_chromium_org
refs/heads/master
chrome/common/extensions/docs/server2/object_store.py
50
# 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. from future import Future class _SingleGetFuture(object): def __init__(self, multi_get, key): self._future = multi_get self._key = key def ...
golismero/golismero
refs/heads/master
misc/old_tests/test_auditdb.py
8
#!/usr/bin/python # -*- coding: utf-8 -*- """ GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Golismero project site: https://github.com/golismero Golismero project mail: contact@golismero-project.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General P...
bx2/django-moderation
refs/heads/master
src/example_project/production.py
5
from example_project.settings import *
reinferio/rpcz
refs/heads/master
python/rpcz/service.py
14
#!/usr/bin/env python class Service(object): pass
i22safed/POO
refs/heads/master
googletest/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 2010 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 o...
alonisser/Open-Knesset
refs/heads/master
presence/models.py
10644
from django.db import models # Create your models here.
kdart/pycopia3
refs/heads/master
core/pycopia/ezmail.py
1
#!/usr/bin/python3.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 app...
marcoantoniooliveira/labweb
refs/heads/master
oscar/lib/python2.7/site-packages/PIL/SgiImagePlugin.py
18
# # The Python Imaging Library. # $Id$ # # SGI image file handling # # See "The SGI Image File Format (Draft version 0.97)", Paul Haeberli. # <ftp://ftp.sgi.com/graphics/SGIIMAGESPEC> # # History: # 1995-09-10 fl Created # # Copyright (c) 2008 by Karsten Hiddemann. # Copyright (c) 1997 by Secret Labs AB. # Copyright ...
vdanen/rq
refs/heads/master
rq/binary.py
1
""" This program extracts data from RPM and SRPM packages and stores it in a database for later querying. based on the srpm script of similar function copyright (c) 2005 Stew Benedict <sbenedict@mandriva.com> copyright (c) 2007-2017 Vincent Danen <vdanen@linsec.ca> This file is part of rq. rq is free software: you c...
andrejro/coreos--scripts
refs/heads/master
build_library/gen_tmpfiles.py
18
#!/usr/bin/python '''Scan an existing directory tree and record installed directories. During build a number of directories under /var are created in the state partition. We want to make sure that those are always there so create a record of them using systemd's tempfiles config format so they are recreated during boo...
sanjuro/RCJK
refs/heads/master
vendor/gdata/test_data.py
10
#!/usr/bin/python # # Copyright (C) 2006 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 ...
kapilt/ansible
refs/heads/devel
test/units/utils/test_shlex.py
174
# (c) 2015, Marius Gedminas <marius@gedmin.as> # # 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 vers...
DiUS/build-lights
refs/heads/master
light-controller/lights/job2ledstrip.py
1
""" job to LED strip """ import os current_dir = os.path.dirname(os.path.realpath(__file__)) parent_dir = os.path.join(current_dir, "..") import sys sys.path.append(parent_dir) from lib import logger from lib import list_utils from lib import error class Error(error.Generic): pass class InputError(Error): pa...
apparena/docs
refs/heads/master
readthedocs/rtd_tests/tests/test_project_views.py
10
import re from django.contrib.messages import constants as message_const from rtd_tests.base import WizardTestCase, MockBuildTestCase from projects.models import Project class TestBasicsForm(WizardTestCase): fixtures = ["eric"] wizard_class_slug = 'import_wizard_view' url = '/dashboard/import/manual/' ...
sabi0/intellij-community
refs/heads/master
python/testData/inspections/DocstringParams2_after.py
40
""" file's docstring """ def spam(ham, eggs): # <== PyCharm suggests to apply quickfix there """Docstring @param ham: @param eggs: """ pass
candy7393/VTK
refs/heads/master
Filters/Hybrid/Testing/Python/TestGridWarpNearest.py
20
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # first, create an image to warp imageGrid = vtk.vtkImageGridSource() imageGrid.SetGridSpacing(16,16,0) imageGrid.SetGridOrigin(0,0,0) imageGrid.SetDataExtent(0,255,0,255,0,0) imageGr...
kakaba2009/MachineLearning
refs/heads/master
python/src/dna/time_dynamics.py
1
import numpy as np import pandas as pd import src.mylib.mfile as mfile import src.mylib.mcalc as mcalc import matplotlib.pyplot as plt dat = mfile.loadOneSymbol("JPY=X", "../db/forex.db", 'FX') dat = dat[['Close']] dat = mcalc.m_pct(dat, True) #dat = dat.iloc[:1000] #print(dat) T = mcalc.vector_delay_embed(dat, 6, 1) ...
Chenmxs/scrapy
refs/heads/master
scrapy/contrib/linkextractors/lxmlhtml.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.linkextractors.lxmlhtml` is deprecated, " "use `scrapy.linkextractors.lxmlhtml` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.linkextractors.lxmlhtml import *
hainm/mdtraj
refs/heads/master
mdtraj/formats/lammpstrj.py
3
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Christoph Klein # Contributors: Robert T. McGibbon # # MDTraj ...
mitocw/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/migrations/0013_sync_learner_profile_data.py
5
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('third_party_auth', '0012_auto_20170626_1135'), ] operations = [ migrations.AddField( model_name='ltiproviderconfig', name='sync_learner_pro...
espadrine/opera
refs/heads/master
chromium/src/webkit/tools/layout_tests/canary-webkit-revisions.py
96
#!/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. """Retrieve passing and failing WebKit revision numbers from canaries. From each canary, - the last WebKit revision number for whi...
openqt/algorithms
refs/heads/master
leetcode/python/ac/lc263-ugly-number.py
1
# coding=utf-8 import unittest """263. Ugly Number https://leetcode.com/problems/ugly-number/description/ Write a program to check whether a given number is an ugly number. Ugly numbers are **positive numbers** whose prime factors only include `2, 3, 5`. **Example 1:** **Input:** 6 **Output:** tr...
gylian/sickbeard
refs/heads/master
cherrypy/lib/jsontools.py
80
import sys import cherrypy if sys.version_info >= (2, 6): # Python 2.6: simplejson is part of the standard library import json else: try: import simplejson as json except ImportError: json = None if json is None: def json_decode(s): raise ValueError('No JSON library is avai...
vladmm/intellij-community
refs/heads/master
python/testData/completion/importInMiddleOfHierarchy/a.py
83
from xyzzy.cont<caret>
JASON-RR/Imperium_Kernel_TW_5.0.1
refs/heads/master
tools/perf/scripts/python/net_dropmonitor.py
1258
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
apanju/GMIO_Odoo
refs/heads/8.0
addons/auth_oauth/auth_oauth.py
321
from openerp.osv import osv, fields class auth_oauth_provider(osv.osv): """Class defining the configuration values of an OAuth2 provider""" _name = 'auth.oauth.provider' _description = 'OAuth2 provider' _order = 'name' _columns = { 'name' : fields.char('Provider name', required=True), ...
pcm17/tensorflow
refs/heads/master
tensorflow/python/training/monitored_session.py
1
# pylint: disable=g-bad-file-header # 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/LICENS...
yosinv/anyway
refs/heads/dev
alembic/versions/2438f7d83478_add_user_preferences.py
2
"""add user preferences Revision ID: 2438f7d83478 Revises: 40f5c56adfee Create Date: 2016-03-08 21:20:42.234353 """ # revision identifiers, used by Alembic. revision = '2438f7d83478' down_revision = '40f5c56adfee' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade():...
mikicz/arca
refs/heads/master
tests/test_vagrant.py
1
import os import shutil import pytest try: import vagrant except ImportError: vagrant = None from arca import VagrantBackend, Arca, Task from arca.exceptions import ArcaMisconfigured, BuildTimeoutError from common import BASE_DIR, RETURN_COLORAMA_VERSION_FUNCTION, SECOND_RETURN_STR_FUNCTION, TEST_UNICODE, \ ...
DavidNorman/tensorflow
refs/heads/master
tensorflow/python/framework/subscribe_test.py
22
# 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...
rembish/cfb
refs/heads/master
cfb/__init__.py
1
""" Compound File Binary Format IO module (currently read-only) """ from io import FileIO from os import fstat from six import string_types from cfb.constants import ENDOFCHAIN from cfb.directory import Directory from cfb.directory.entry import RootEntry from cfb.exceptions import MaybeDefected, ErrorDefect from cfb.h...
mPowering/django-orb
refs/heads/master
orb/peers/admin.py
1
from django.contrib import admin from .models import Peer, PeerQueryLog @admin.register(Peer) class PeerAdmin(admin.ModelAdmin): pass @admin.register(PeerQueryLog) class PeerQueryLogAdmin(admin.ModelAdmin): list_display = ('peer', 'created', 'new_resources', 'skipped_local_resources', 'updated_resources') ...
richardcs/ansible
refs/heads/devel
test/units/modules/remote_management/oneview/hpe_test_utils.py
118
# -*- coding: utf-8 -*- # # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # # 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 optio...
freedesktop-unofficial-mirror/ldtp__ldtp2
refs/heads/master
setup.py
2
#!/usr/bin/env python """ LDTP v2 Core. @author: Eitan Isaacson <eitan@ascender.com> @author: Nagappan Alagappan <nagappan@gmail.com> @copyright: Copyright (c) 2009 Eitan Isaacson @copyright: Copyright (c) 2009-13 Nagappan Alagappan @license: LGPL http://ldtp.freedesktop.org This file may be distributed and/or modif...
rossjones/ScraperWikiX
refs/heads/master
web/froth/specs/view_spec.py
1
import json from django.contrib.auth.models import User from django.conf import settings import helper from froth.views import check_key def setUp(): global user, profile user = User.objects.create_user('dcameron', 'dcameron@scraperwiki.com', 'bagger288') profile = user.get_profile() def ensure_staf...
praveen-pal/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/open_ended_grading_classes/controller_query_service.py
28
import logging from .grading_service_module import GradingService log = logging.getLogger(__name__) class ControllerQueryService(GradingService): """ Interface to controller query backend. """ def __init__(self, config, system): config['system'] = system super(ControllerQueryService,...
betrisey/home-assistant
refs/heads/dev
homeassistant/components/notify/gntp.py
6
""" GNTP (aka Growl) notification service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.gntp/ """ import logging import os import voluptuous as vol from homeassistant.components.notify import ( ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHE...
T-R0D/JustForFun
refs/heads/master
gen_aoc.py
1
import os def main(): print('Generating AoC directory...') year = 2018 root_dir = create_root_dir(year) os.chdir(root_dir) for day in range(1, 26): create_day_dir(root_dir, day) def create_root_dir(year): cwd = os.getcwd() aoc_dir = 'aoc{}'.format(year) root_dir = os.path.jo...
pet1330/strands_qsr_lib
refs/heads/master
qsr_prob_rep/scripts/example_pf_client.py
5
#!/usr/bin/env python # -*- coding: utf-8 -*- from qsrrep_ros.ros_client import ROSClient from qsrrep_lib.rep_io_pf import PfRepRequestCreate,PfRepRequestPredict, PfRepRequestUpdate, PfRepRequestList, PfRepRequestRemove from qsrrep_pf.pf_model import PfModel import os import rospy import json import numpy as np import...
alex/django-old
refs/heads/master
django/contrib/flatpages/tests/csrf.py
94
import os from django.conf import settings from django.contrib.auth.models import User from django.test import TestCase, Client class FlatpageCSRFTests(TestCase): fixtures = ['sample_flatpages'] urls = 'django.contrib.flatpages.tests.urls' def setUp(self): self.client = Client(enforce_csrf_checks=...
yarbelk/pgu
refs/heads/master
examples/gui2.py
13
"""<title>Connections</title> Same as the first -- but now you can click on the close window button in your windowing system to close out the example. """ import pygame from pygame.locals import * # the following line is not needed if pgu is installed import sys; sys.path.insert(0, "..") from pgu import gui app = g...
stefanosbou/trading-with-python
refs/heads/master
cookbook/guiqwt_CurveDialog.py
77
# -*- coding: utf-8 -*- """ Created on Wed Dec 14 19:47:02 2011 @author: jev """ from PyQt4.QtGui import * from PyQt4.QtCore import * from guiqwt.plot import CurveDialog from guiqwt.builder import make import sys import numpy as np class MainForm(QDialog): def __init__(self,parent=None): ...
shaitan/linux
refs/heads/master
scripts/analyze_suspend.py
1540
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
tobegit3hub/lambda-docker
refs/heads/master
runtime/c_container.py
1
import basic_container class CContainer(basic_container.BasicContainer): def __init__(self): super(self.__class__, self).__init__() self.image = "gcc" self.command = 'sh -c "gcc main.c -o main && ./main"' self.file_extension = ".c"
JCBarahona/edX
refs/heads/master
common/lib/xmodule/xmodule/lti_module.py
10
""" Learning Tools Interoperability (LTI) module. Resources --------- Theoretical background and detailed specifications of LTI can be found on: http://www.imsglobal.org/LTI/v1p1p1/ltiIMGv1p1p1.html This module is based on the version 1.1.1 of the LTI specifications by the IMS Global authority. For authenticat...
zubie7a/Algorithms
refs/heads/master
CodeSignal/Arcade/The_Core/Level_06_Labyrinth_Of_Nested_Loops/047_Comfortable_Numbers.py
3
# https://app.codesignal.com/arcade/code-arcade/labyrinth-of-nested-loops/pNfGgNk46YZ4c4RW5 def comfortableNumbers(l, r): # A number a feels comfortable with number b if a != b and b lies # in the segment [a - s(a), a + s(a)] where s(x) is sum of x digits. # How many pairs (a, b) are there such that a < b, ...
Ralev93/Clan-site
refs/heads/master
clan_site/memberSchedule/models.py
1
from django.db import models from basic.models import Member class Schedule(models.Model): member = models.ForeignKey(Member, on_delete=models.CASCADE) available = models.DateTimeField()
av8ramit/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/vector_exponential_linear_operator.py
17
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
dannyboi104/SickRage
refs/heads/master
lib/certifi/core.py
139
#!/usr/bin/env python # -*- coding: utf-8 -*- """ certifi.py ~~~~~~~~~~ This module returns the installation location of cacert.pem. """ import os def where(): f = os.path.split(__file__)[0] return os.path.join(f, 'cacert.pem') if __name__ == '__main__': print(where())
ramalho/eagle-py
refs/heads/master
examples/quadratic_function_graph.py
2
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from eagle import * import math epsilon = 0.000001 graph_font_size = 8 def clear(app, button): app["graph"].clear() def quadratic(a, b, c, x): return a * (x ** 2) + b * x + c def data_changed(app, *args): a = app["a"] b = app["b"] c = app["c"] ...
the100rabh/Barcamp-Bangalore-Android-App
refs/heads/master
gcm_flask/wtforms/ext/django/orm.py
23
""" Tools for generating forms based on Django models. """ from wtforms import fields as f from wtforms import Form from wtforms import validators from wtforms.ext.django.fields import ModelSelectField __all__ = ( 'model_fields', 'model_form', ) class ModelConverterBase(object): def __init__(self, converter...
stefanfoulis/django-multilingual
refs/heads/master
testproject/issue_16/models/page.py
5
from django.db import models from issue_16.models.category import Category import multilingual try: from django.utils.translation import ugettext as _ except: # if this fails then _ is a builtin pass class Page(models.Model): category = models.ForeignKey(Category, verbose_name=_("Parent category"), ...
regiontog/rab
refs/heads/master
rab/rab.py
3
""" Usage: rab snapshot create PATH... rab snapshot delete PATH... rab snapshot <name> add PATH... rab snapshot <name> reconstruct <file> PATH rab blocks delete rab [options] <command>... [<args>...] Options: -h --help Show this help message and quit. --version Show version. """ impo...