repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
piyurai/sp17-i524 | refs/heads/master | project/S17-IR-P001/code/TwitterStreaming.py | 20 | #Import the necessary methods from tweepy library
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
OutFile = "C:\\Users\\sriram\OneDrive for Business\\Election2016-"
Count=0
Fileno=1
TweetCount=0
out=open(OutFile+str(Fileno)+".txt","w")
#Variables that c... |
irzaip/chippy | refs/heads/master | speech/demo.py | 6 | import snowboydecoder
import sys
import signal
interrupted = False
def signal_handler(signal, frame):
global interrupted
interrupted = True
def interrupt_callback():
global interrupted
return interrupted
if len(sys.argv) == 1:
print("Error: need to specify model name")
print("Usage: python... |
Leopardob/dice-dev | refs/heads/master | dice/dice_extras/vis/cone_wrapper.py | 1 | # External modules
# ================
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSlot, pyqtSignal, qDebug, QMetaObject, QMetaMethod, Q_ARG
# DICE modules
# ============
from .basic_wrapper import BasicWrapper
class ConeWrapper(BasicWrapper):
def __init__(self, parent=None):
super(ConeWrapper, se... |
bop/foundation | refs/heads/master | lib/python2.7/site-packages/psycopg2/__init__.py | 61 | """A Python driver for PostgreSQL
psycopg is a PostgreSQL_ database adapter for the Python_ programming
language. This is version 2, a complete rewrite of the original code to
provide new-style classes for connection and cursor objects and other sweet
candies. Like the original, psycopg 2 was written with the aim of b... |
CouchPotato/CouchPotatoV1 | refs/heads/master | library/sqlalchemy/dialects/postgresql/psycopg2.py | 17 | """Support for the PostgreSQL database via the psycopg2 driver.
Driver
------
The psycopg2 driver is supported, available at http://pypi.python.org/pypi/psycopg2/ .
The dialect has several behaviors which are specifically tailored towards compatibility
with this module.
Note that psycopg1 is **not** supported.
Un... |
Hellowlol/HTPC-Manager | refs/heads/master2 | libs/sqlobject/tests/test_identity.py | 6 | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Identity (MS SQL)
########################################
class TestIdentity(SQLObject):
n = IntCol()
def test_identity():
# (re)create table
TestIdentity.dropTable(connection=getConnection(), ifExis... |
Bauble/bauble.api | refs/heads/master | bauble/model/invitation.py | 1 | from sqlalchemy import Column, Boolean, String, Integer, ForeignKey
from sqlalchemy.orm import relationship, backref
from bauble.model import SystemModel
import bauble.types as types
class Invitation(SystemModel):
email = Column(String, nullable=False)
token = Column(String, unique=True, index=True, nullabl... |
fentensoft/kernel_xt701 | refs/heads/2.6.32.9 | arch/ia64/scripts/unwcheck.py | 916 | #!/usr/bin/env python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthe... |
gjhiggins/vcoincore | refs/heads/master | test/functional/feature_nulldummy.py | 3 | #!/usr/bin/env python3
# Copyright (c) 2016-2019 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 NULLDUMMY softfork.
Connect to a single node.
Generate 2 blocks (save the coinbases for later).
G... |
xxd3vin/spp-sdk | refs/heads/master | opt/Python27/Lib/test/test_winreg.py | 35 | # Test the windows specific win32reg module.
# Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey
import os, sys
import unittest
from test import test_support
threading = test_support.import_module("threading")
from platform import machine
# Do this first so test will be skipped if module doesn't exi... |
lecovi/reveal.js | refs/heads/master | archivos/prueba_trabajador.py | 1 | #!/usr/bin/env python
from trabajador import Trabajador, Jubilado, Menor
nico = Trabajador('Nico')
juan = Jubilado('Juan')
thiago = Menor('Thiago')
nico.trabajar()
juan.trabajar()
thiago.trabajar()
|
cecep-edu/refactory | refs/heads/staging | requirements/PyChart-1.39/pychart/scaling.py | 12 | #
# Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com)
#
# Jockey 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, or (at your option) any
# later version.
#
# Jockey is distr... |
jianghc724/HappyXueTang | refs/heads/master | HappyXueTang/wsgi.py | 1 | """
WSGI config for HappyXueTang project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO... |
KordingLab/spykes | refs/heads/master | spykes/ml/tensorflow/__init__.py | 2 | from __future__ import absolute_import
from .sparse_filtering import SparseFiltering
# Checks that the correct version of TensorFlow is installed.
MIN_TF_VERSION = '1.4.0'
try:
from distutils.version import LooseVersion
import tensorflow as tf
assert LooseVersion(tf.__version__) >= LooseVersion(MIN_TF_VER... |
nupic-community/nupic.audio | refs/heads/master | NuMozart/midi/DataTypeConverters.py | 16 | # -*- coding: ISO-8859-1 -*-
from struct import pack, unpack
"""
This module contains functions for reading and writing the special data types
that a midi file contains.
"""
"""
nibbles are four bits. A byte consists of two nibles.
hiBits==0xF0, loBits==0x0F Especially used for setting
channel and event ... |
RuiNascimento/krepo | refs/heads/master | script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/en/ymovies.py | 1 | # -*- coding: utf-8 -*-
'''
ymovies scraper for Exodus forks.
Nov 9 2018 - Checked
Updated and refactored by someone.
Originally created by others.
'''
import re,urllib,urlparse,json,base64
from resources.lib.modules import cleantitle
from resources.lib.modules import client
from resources.lib.modules... |
Endika/account-financial-reporting | refs/heads/8.0 | account_financial_report_webkit_xls/__openerp__.py | 10 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under... |
lawrennd/collab | refs/heads/master | python/restartNetflix9.py | 2 | #!/usr/bin/env python
# Try collaborative filtering on the netflix data.
import collab
import ndlml as nl
opt = collab.options()
opt.resultsBaseDir = "/local/data/results/netflix/"
try:
collab.restart(loadIter = 2,
startCount = 1440000,
loadUser = 2331578,
... |
karstenw/nodebox-pyobjc | refs/heads/master | examples/Extended Application/matplotlib/examples/misc/patheffect_demo.py | 1 | """
===============
Patheffect Demo
===============
"""
import matplotlib.pyplot as plt
import matplotlib.patheffects as PathEffects
import numpy as np
# nodebox section
if __name__ == '__builtin__':
# were in nodebox
import os
import tempfile
W = 800
inset = 20
size(W, 600)
plt.cla()
... |
BaconPancakes/valor | refs/heads/master | lib/youtube_dl/extractor/sapo.py | 71 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
unified_strdate,
)
class SapoIE(InfoExtractor):
IE_DESC = 'SAPO Vídeos'
_VALID_URL = r'https?://(?:(?:v2|www)\.)?videos\.sapo\.(?:pt|cv|ao|mz|tl)/(?P<id>[\da-zA-Z... |
jrief/django-angular | refs/heads/master | examples/server/models/testing.py | 1 | # -*- coding: utf-8 -*-
import datetime
from django.db import models
class DummyModel(models.Model):
name = models.CharField(max_length=255)
model2 = models.ForeignKey('DummyModel2', on_delete=models.CASCADE)
timefield = models.DateTimeField(default=datetime.datetime.now)
class DummyModel2(models.Model)... |
ice9js/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pytest/_pytest/unittest.py | 176 | """ discovery and running of std-library "unittest" style tests. """
from __future__ import absolute_import
import sys
import traceback
import pytest
# for transfering markers
import _pytest._code
from _pytest.python import transfer_markers
from _pytest.skipping import MarkEvaluator
def pytest_pycollect_makeitem(co... |
bubae/gazeAssistRecognize | refs/heads/master | lib/BING-Objectness/source/add_path.py | 1 |
"""Set up paths."""
import os.path as osp
import sys
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
this_dir = osp.dirname(__file__)
# Add lib to PYTHONPATH
lib_path = osp.join(this_dir, '..' ,'build')
add_path(lib_path)
|
jsoref/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_b/migrations/0002_b2.py | 282 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0002_a2'),
('lookuperror_b', '0001_initial'),
]
operations = [
migrations.CreateModel(
... |
cjcardinale/climlab | refs/heads/master | climlab/radiation/aplusbt.py | 1 | from __future__ import division
from climlab.process.energy_budget import EnergyBudget
from climlab.utils import constants as const
import numpy as np
class AplusBT(EnergyBudget):
"""The simplest linear longwave radiation module.
Calculates the Outgoing Longwave Radation (OLR) :math:`R\uparrow` as
.. ma... |
qoo00783/linux | refs/heads/master | scripts/gdb/linux/cpus.py | 997 | #
# gdb helper commands and functions for Linux kernel debugging
#
# per-cpu tools
#
# Copyright (c) Siemens AG, 2011-2013
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL version 2.
#
import gdb
from linux import tasks, utils
MAX_CPUS = 4096
def get_cu... |
mozilla/stoneridge | refs/heads/master | python/src/Lib/test/test_urllib2.py | 19 | import unittest
from test import test_support
import os
import socket
import StringIO
import urllib2
from urllib2 import Request, OpenerDirector
# XXX
# Request
# CacheFTPHandler (hard to write)
# parse_keqv_list, parse_http_list, HTTPDigestAuthHandler
class TrivialTests(unittest.TestCase):
def test_trivial(sel... |
saukrIppl/seahub | refs/heads/master | thirdpart/captcha/management/commands/captcha_clean.py | 12 | from django.core.management.base import BaseCommand
from captcha.models import get_safe_now
import sys
class Command(BaseCommand):
help = "Clean up expired captcha hashkeys."
def handle(self, **options):
from captcha.models import CaptchaStore
verbose = int(options.get('verbosity'))
e... |
thodoris/djangoPharma | refs/heads/master | djangoPharma/env/Lib/site-packages/django/views/generic/edit.py | 47 | from django.core.exceptions import ImproperlyConfigured
from django.forms import models as model_forms
from django.http import HttpResponseRedirect
from django.utils.encoding import force_text
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
from django.views.generic.detail import (
B... |
Kortemme-Lab/klab | refs/heads/master | klab/benchmarking/analysis/ssm.py | 1 | #!/usr/bin/env python2
# The MIT License (MIT)
#
# Copyright (c) 2016 Samuel Thompson
#
# 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 ... |
prarthitm/edxplatform | refs/heads/master | lms/lib/xblock/test/test_mixin.py | 15 | """
Tests of the LMS XBlock Mixin
"""
import ddt
from nose.plugins.attrib import attr
from xblock.validation import ValidationMessage
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.tests.factories import CourseFactory, ToyCourseFactory, ItemFactory
from xmodule.modulestore.tests.django_utils ... |
andrewyoung1991/abjad | refs/heads/master | abjad/tools/rhythmtreetools/test/test_rhythmtreetools_RhythmTreeNode_parent.py | 2 | # -*- encoding: utf-8 -*-
import pytest
from abjad import *
def test_rhythmtreetools_RhythmTreeNode_parent_01():
leaf = rhythmtreetools.RhythmTreeLeaf()
container = rhythmtreetools.RhythmTreeContainer()
subcontainer = rhythmtreetools.RhythmTreeContainer()
assert leaf.parent is None
assert contai... |
consultiaio/mediatize | refs/heads/master | scripts/ec2_watch.py | 4 | #!/usr/bin/python
import argparse
import sys
import time
import datetime
import getpass
import smtplib
from email.mime.text import MIMEText
import subprocess
import os
import boto
from ec2_watchdata import WatchData
def main():
global configuration
now = int(time.time())
data = WatchData()
""" Set default cla... |
droundy/deft | refs/heads/master | papers/square-well-fluid/figs/plot-free-energy.py | 1 | #!/usr/bin/python2
from __future__ import division
import matplotlib, sys
if 'show' not in sys.argv:
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
matplotlib.rc('text', usetex=True)
plt.figure()
# input: ['data/homogeneous/ww%g-kT%g.dat' % (ww, kT) for ww in [1.3] for kT in range(1,11)... |
fbs/fubot | refs/heads/master | plugins/titlefetcher/titlefetcher.py | 1 | from twisted.web.client import getPage
from twisted.python import log
import re
import iptools
import urlparse
from bs4 import BeautifulSoup
from zope.interface import implements
from core.interface import IRawMsgHandler
INTERNAL_IPS = iptools.IpRangeList(
'127/8',
'192.168/16',
'10/8',
'::1',
'f... |
vjmac15/Lyilis | refs/heads/master | lib/youtube_dl/extractor/tumblr.py | 40 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import int_or_none
class TumblrIE(InfoExtractor):
_VALID_URL = r'https?://(?P<blog_name>[^/?#&]+)\.tumblr\.com/(?:post|video)/(?P<id>[0-9]+)(?:$|[/?#])'
_TESTS = [{
'url': 'http://tatiana... |
Linaro/squad | refs/heads/master | test/core/test_import_data.py | 1 | import os
from django.core.management import call_command
from django.test import TestCase
from squad.core.models import Build, Group, Project, TestRun, Metric, Test
from squad.core.management.commands.import_data import Command
class ImportTest(TestCase):
def setUp(self):
d = os.path.join(os.path.dir... |
kennethgillen/ansible | refs/heads/devel | lib/ansible/modules/network/dellos9/dellos9_config.py | 62 | #!/usr/bin/python
#
# (c) 2015 Peter Sprygada, <psprygada@ansible.com>
#
# Copyright (c) 2016 Dell Inc.
#
# 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 versi... |
xjsender/HaoGist | refs/heads/master | requests/packages/chardet/latin1prober.py | 1777 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
Dellware78/mtasa-blue | refs/heads/master | vendor/google-breakpad/src/tools/gyp/test/mac/gyptest-sourceless-module.py | 200 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that bundles that have no 'sources' (pure resource containers) work.
"""
import TestGyp
import sys
if sys.platform == 'darwi... |
Qalthos/ansible | refs/heads/devel | test/units/mock/vault_helper.py | 206 | # 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 in the hope that it will be useful,
# but WITHOUT ... |
auto-mat/klub | refs/heads/diakonie | apps/interactions/migrations/0003_auto_20200205_1028.py | 1 | # Generated by Django 2.2.9 on 2020-02-05 09:28
from django.conf import settings
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('aklub', '0070_delete_result'),
('interactions', '0002_aut... |
sggottlieb/cmfieldguide | refs/heads/master | cmfieldguide/cmsdetector/management/__init__.py | 2 | __author__ = 'Deane Barker'
|
luckylavish/zamboni | refs/heads/master | mkt/webapps/tests/test_utils_.py | 13 | import hashlib
import json
from django.core.cache import cache
from mock import patch
from nose.tools import eq_, ok_
from mkt.langpacks.models import LangPack
from mkt.site.fixtures import fixture
from mkt.site.tests import TestCase
from mkt.webapps.models import Webapp
from mkt.webapps.utils import get_cached_mini... |
petrushev/txplaya | refs/heads/master | txplayagui/settings.py | 1 | from PyQt5.QtCore import QSettings
settings = QSettings('TxPlaya')
def host():
return settings.value('host', 'localhost')
def port():
return settings.value('port', 8070, type=int)
def baseUrl():
return 'http://%s:%d' % (host(), port())
def setHost(host):
settings.setValue('host', host)
def setPo... |
yjwoo92/yjwoo92.github.io | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py | 1825 | # 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.
"""GYP backend that generates Eclipse CDT settings files.
This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
files that can be importe... |
wakatime/sketch-wakatime | refs/heads/master | WakaTime.sketchplugin/Contents/Resources/wakatime/packages/pygments/styles/monokai.py | 31 | # -*- coding: utf-8 -*-
"""
pygments.styles.monokai
~~~~~~~~~~~~~~~~~~~~~~~
Mimic the Monokai color scheme. Based on tango.py.
http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.... |
Bismarrck/tensorflow | refs/heads/master | tensorflow/lite/tools/pip_package/setup.py | 4 | # 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... |
eci/mezzanine-people | refs/heads/master | mezzanine_people/views.py | 3 | from django.http import Http404
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import get_object_or_404
#from django import VERSION
from .models import Person, PersonCategory
from mezzanine.conf import settings
from mezzanine.generic.models ... |
hanicker/odoo | refs/heads/8.0 | addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/logreport.py | 386 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... |
guerrerocarlos/odoo | refs/heads/8.0 | openerp/addons/base/tests/test_orm.py | 49 | from collections import defaultdict
from openerp.tools import mute_logger
from openerp.tests import common
UID = common.ADMIN_USER_ID
DB = common.DB
class TestORM(common.TransactionCase):
""" test special behaviors of ORM CRUD functions
TODO: use real Exceptions types instead of Exception """
d... |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/tangible/door/echo_base_door_hangar.py | 85615 | import sys
def setup(core, object):
return |
jianglu/mojo | refs/heads/master | third_party/ply/__init__.py | 108 | # PLY package
# Author: David Beazley (dave@dabeaz.com)
# -----------------------------------------------------------------------------
# ply: yacc.py
#
# Copyright (C) 2001-2011,
# David M. Beazley (Dabeaz LLC)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification... |
ol-loginov/intellij-community | refs/heads/master | python/testData/hierarchy/call/Static/OverriddenMethod/file_1.py | 80 |
class A(object):
def target_func(self, p):
pass
def another_func(self):
pass
|
coding-happily/FlaskTest | refs/heads/master | venv/lib/python3.5/site-packages/werkzeug/security.py | 255 | # -*- coding: utf-8 -*-
"""
werkzeug.security
~~~~~~~~~~~~~~~~~
Security related helpers such as secure password hashing tools.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import hmac
import hashlib
import posi... |
lliendo/Radar | refs/heads/master | tests/test_sequential_id_generator.py | 1 | # -*- coding: utf-8 -*-
"""
This file is part of Radar.
Radar 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 3 of the License, or
(at your option) any later version.
Radar is distributed ... |
rlindner81/pyload | refs/heads/stable | module/plugins/internal/Extractor.py | 1 | # -*- coding: utf-8 -*-
import os
import re
from module.plugins.internal.misc import encode
from module.plugins.internal.Plugin import Plugin
class ArchiveError(Exception):
pass
class CRCError(Exception):
pass
class PasswordError(Exception):
pass
class Extractor(Plugin):
__name__ = "Extractor"... |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.4/django/middleware/locale.py | 104 | "This is the locale selecting middleware that will look at accept headers"
from django.conf import settings
from django.core.urlresolvers import (is_valid_path, get_resolver,
LocaleRegexURLResolver)
from django.http import HttpResponseRedirect
from django.utils.cache import patch_... |
justinfay/jinja2 | refs/heads/master | jinja2/defaults.py | 336 | # -*- coding: utf-8 -*-
"""
jinja2.defaults
~~~~~~~~~~~~~~~
Jinja default filters and tags.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
from jinja2._compat import range_type
from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner
# defaults for ... |
bj7/pwndbg | refs/heads/master | pwndbg/commands/shell.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Wrapper for shell commands.
"""
import os
import gdb
import pwndbg.commands
shellcmds = [
"awk",
"bash",
"cat",
"chattr",
"chmod",
"chown",
"clear",
"cp",
"date",
"diff",
"egrep",
"find",
"grep",
"htop",
"id"... |
gkotton/neutron | refs/heads/master | neutron/plugins/bigswitch/extensions/routerrule.py | 12 | # Copyright 2013 Big Switch Networks, 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 ... |
wehkamp/ansible | refs/heads/devel | v1/ansible/module_utils/known_hosts.py | 229 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... |
axbaretto/beam | refs/heads/master | sdks/python/.tox/docs/lib/python2.7/site-packages/apitools/data/__init__.py | 174 | #!/usr/bin/env python
#
# Copyright 2015 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... |
ThePirateWhoSmellsOfSunflowers/Empire | refs/heads/master | lib/modules/python/situational_awareness/network/active_directory/get_ous.py | 12 | class Module:
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Name': 'Get OUs',
# list of one or more authors for the module
... |
kool79/intellij-community | refs/heads/master | python/testData/fillParagraph/emptyMultilineString_after.py | 79 | a = """
""" |
hehongliang/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/ackermann_test.py | 10 | # 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... |
abadger/ansible-modules-core | refs/heads/devel | source_control/subversion.py | 4 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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... |
ybrs/terminator-forked | refs/heads/master | terminatorlib/optionparse.py | 3 | #!/usr/bin/python
# Terminator.optionparse - Parse commandline options
# Copyright (C) 2006-2010 cmsj@tenshu.net
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2 only.
#
# ... |
domalexxx/shop | refs/heads/master | node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/xcode_ninja.py | 1789 | # 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.
"""Xcode-ninja wrapper project file generator.
This updates the data structures passed to the Xcode gyp generator to build
with ninja instead. The Xcode project i... |
jplana/python-etcd | refs/heads/master | bootstrap.py | 299 | ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | refs/heads/master | esstoolkit/external/networkx/algorithms/approximation/vertex_cover.py | 4 | """Functions for computing an approximate minimum weight vertex cover.
A |vertex cover|_ is a subset of nodes such that each edge in the graph
is incident to at least one node in the subset.
.. _vertex cover: https://en.wikipedia.org/wiki/Vertex_cover
.. |vertex cover| replace:: *vertex cover*
"""
__all__ = ["min_w... |
mwmuni/LIGGGHTS_GUI | refs/heads/master | OpenGL/GLES2/OES/fragment_precision_high.py | 8 | '''OpenGL extension OES.fragment_precision_high
This module customises the behaviour of the
OpenGL.raw.GLES2.OES.fragment_precision_high to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/OES/fragment_precision_high.txt
'''
from Op... |
LambdaCast/LambdaCast | refs/heads/dev | portal/BitTornadoABC/BitTornado/parsedir.py | 2 | # Written by John Hoffman and Uoti Urpala
# see LICENSE.txt for license information
from bencode import bencode, bdecode
from BT1.btformats import check_info
from sha import sha
import sys, os
try:
True
except:
True = 1
False = 0
NOISY = False
def _errfunc(x):
print ":: "+x
def par... |
pxquim/pelican-plugins | refs/heads/master | liquid_tags/__init__.py | 335 | from .liquid_tags import *
|
mganeva/mantid | refs/heads/master | scripts/Interface/reduction_gui/widgets/sans/eqsans_data.py | 1 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=invalid-name
from __future__... |
robhudson/django | refs/heads/master | django/db/backends/oracle/creation.py | 7 | import sys
import time
from django.conf import settings
from django.db.backends.base.creation import BaseDatabaseCreation
from django.db.utils import DatabaseError
from django.utils.functional import cached_property
from django.utils.six.moves import input
TEST_DATABASE_PREFIX = 'test_'
PASSWORD = 'Im_a_lumberjack'
... |
ammaritiz/pulp_puppet | refs/heads/master | pulp_puppet_plugins/test/unit/plugins/importer/downloaders/test_local.py | 4 | import os
import mock
import base_downloader
from pulp_puppet.common import constants
from pulp_puppet.plugins.db.models import RepositoryMetadata
from pulp_puppet.plugins.importers.downloaders.exceptions import FileRetrievalException
from pulp_puppet.plugins.importers.downloaders.local import LocalDownloader
DATA_... |
auduny/home-assistant | refs/heads/dev | homeassistant/components/edp_redy/__init__.py | 7 | """Support for EDP re:dy."""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.const import (
CONF_PASSWORD, CONF_USERNAME, EVENT_HOMEASSISTANT_START)
from homeassistant.core import callback
from homeassistant.helpers import aiohttp_client, discovery, dispatcher
import home... |
awemulya/fieldsight-kobocat | refs/heads/master | onadata/apps/logger/south_migrations/0026_auto__chg_field_xform_sms_id_string__add_unique_xform_sms_id_string_us.py | 13 | # -*- 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):
# Changing field 'XForm.sms_id_string'
db.alter_column('odk_logger_xform', 'sms_id_string', self.gf('django... |
venkatkamesh/kernel-msm7x27-ics-3.0.8 | refs/heads/master | arch/ia64/scripts/unwcheck.py | 13143 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... |
johnchase/scikit-bio | refs/heads/master | skbio/diversity/alpha/tests/__init__.py | 178 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... |
icea-dev/atn-sim-ng | refs/heads/master | atn/gui/wnd_main_atn_sim_ui.py | 1 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'wnd_main_atn_sim.ui'
#
# Created: Mon Jul 10 13:37:35 2017
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
exce... |
gems-uff/noworkflow | refs/heads/master | capture/noworkflow/now/persistence/models/environment_attr.py | 1 | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
"""Environment Attribute Model"""
from __future__ import (absolute_import, print_function,
... |
ApolloJustice/HexChat-pyscripts | refs/heads/master | rbtext.py | 1 | # rbtext.py by ApolloJustice
# for use with Python 3
# non PEP-8 compliant because honestly fuck that
# probably not commented because too lazy
__module_name__ = "RainbowFonts"
__module_version__ = "1.0"
__module_description__ = "Rainbowifies text"
__author__ = "ApolloJustice"
import hexchat
import random
def rainbo... |
GeoscienceAustralia/PyRate | refs/heads/master | docs/conf.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import datetime
import sphinx_rtd_theme
__version__ = "0.5.0"
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extensio... |
SamuelDSR/YouCompleteMe-Win7-GVIM | refs/heads/master | third_party/pythonfutures/concurrent/futures/thread.py | 89 | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ThreadPoolExecutor."""
from __future__ import with_statement
import atexit
import threading
import weakref
import sys
from concurrent.futures import _base
try:
import queue
except ImportError:
... |
vhf/python-markdown-linkfix | refs/heads/master | markdown/__main__.py | 75 | """
COMMAND-LINE SPECIFIC STUFF
=============================================================================
"""
import markdown
import sys
import optparse
import logging
from logging import DEBUG, INFO, CRITICAL
logger = logging.getLogger('MARKDOWN')
def parse_options():
"""
Define and parse `optparse` ... |
laborautonomo/poedit | refs/heads/stable | deps/boost/tools/build/v2/test/alias.py | 27 | #!/usr/bin/python
# Copyright 2003 Dave Abrahams
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
import BoostBuild
###########################################################################... |
openstack/networking-sfc | refs/heads/master | networking_sfc/services/flowclassifier/common/exceptions.py | 1 | # Copyright 2015 Futurewei. 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 app... |
nulldatamap/IceLeaf | refs/heads/master | tests/asttest.py | 1 | from IceLeaf import *
ast = ASTObject( "name" , index=10 , name="bla" );
print str( ast )
ast.type = "hello"
print str( ast )
ast.name = 1337
print str( ast )
ast.index = "Drop the bomb"
print str( ast )
print ast.name |
amenonsen/ansible | refs/heads/devel | test/units/modules/network/fortios/test_fortios_firewall_auth_portal.py | 21 | # Copyright 2019 Fortinet, 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 program is distributed in the... |
dazzzl/yowsup | refs/heads/master | yowsup/demos/sendclient/layer.py | 20 | from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
from yowsup.layers.protocol_messages.protocolentities import TextMessageProtocolEntity
from yowsup.common.tools import Jid
import threading
import logging
logger = logging.getLogger(__name__)
class SendLayer(YowInt... |
skyfsza/Logos | refs/heads/master | resources/lib/searchdialog.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
script.skin.helper.service
searchdialog.py
Special window to search the Kodi video database
'''
import threading
import thread
import xbmc
import xbmcgui
from metadatautils import process_method_on_list, KodiDb
from utils import getCondVisibility
class Search... |
lvduit/islab-portfolio-by-ghost | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/jvm.py | 193 | # -*- coding: utf-8 -*-
"""
pygments.lexers.jvm
~~~~~~~~~~~~~~~~~~~
Pygments lexers for JVM languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ... |
bspink/django | refs/heads/master | tests/test_runner/tests.py | 139 | """
Tests for django test runner
"""
from __future__ import unicode_literals
import unittest
from admin_scripts.tests import AdminScriptTestCase
from django import db
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management import call_command
from django.t... |
robintw/scikit-image | refs/heads/master | skimage/io/setup.py | 37 | #!/usr/bin/env python
from skimage._build import cython
import os.path
base_path = os.path.abspath(os.path.dirname(__file__))
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('io', parent_package, top_pa... |
calston/tensor | refs/heads/master | tensor/sources/redis.py | 1 | import time
from zope.interface import implementer
from twisted.internet import defer
from twisted.python import log
from tensor.interfaces import ITensorSource
from tensor.objects import Source
from tensor.aggregators import Counter
@implementer(ITensorSource)
class Queues(Source):
"""Query llen from redis-cl... |
jrumball/PyKoans | refs/heads/master | python 3/koans/local_module_with_all_defined.py | 15 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__all__ = (
'Goat',
'_Velociraptor'
)
class Goat:
@property
def name(self):
return "George"
class _Velociraptor:
@property
def name(self):
return "Cuddles"
class SecretDuck:
@property
def name(self):
return "None ... |
ivesbai/mediadrop | refs/heads/0.12dev | mediacore/websetup.py | 14 | from mediadrop.websetup import *
|
liqin75/vse-vpnaas-plugin | refs/heads/master | quantum/plugins/services/__init__.py | 234 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation.
# 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.apac... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.