repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
baijum/consulate-1
refs/heads/master
consulate/api/base.py
5
""" Base Endpoint class used by all endpoint classes """ import base64 import json try: from urllib.parse import urlencode # Python 3 except ImportError: # pragma: no cover from urllib import urlencode # Python 2 from consulate import exceptions from consulate import utils class Endpoint(object): """...
SDHM/vitess
refs/heads/master
test/custom_sharding.py
2
#!/usr/bin/env python # # Copyright 2015, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. import unittest import environment import utils import tablet # shards shard_0_master = tablet.Tablet() shard_0_rdonly = tablet.Tablet() sh...
bflaven/BlogArticlesExamples
refs/heads/master
extending_streamlit_usage/008_simple_app_spacy_example/simple_app_spacy_example_9.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- """ [path] cd /Users/brunoflaven/Documents/01_work/blog_articles/extending_streamlit_usage/simple_app_spacy_example/ [file] streamlit run simple_app_spacy_example_9.py # more on infos and apps on https://streamlit.io/ https://streamlit.io/gallery https://doc...
Gagaro/django
refs/heads/master
tests/template_tests/syntax_tests/test_i18n.py
245
# coding: utf-8 from __future__ import unicode_literals from django.template import TemplateSyntaxError from django.test import SimpleTestCase from django.utils import translation from django.utils.safestring import mark_safe from ..utils import setup class I18nTagTests(SimpleTestCase): libraries = { 'c...
sebi-hgdata/ansible
refs/heads/expand-variables
plugins/inventory/softlayer.py
50
#!/usr/bin/env python """ SoftLayer external inventory script. The SoftLayer Python API client is required. Use `pip install softlayer` to install it. You have a few different options for configuring your username and api_key. You can pass environment variables (SL_USERNAME and SL_API_KEY). You can also write INI fil...
jhayworth/config
refs/heads/master
.emacs.d/elpy/rpc-venv/local/lib/python2.7/site-packages/rope/refactor/rename.py
19
import warnings from rope.base import (exceptions, pyobjects, pynames, taskhandle, evaluate, worder, codeanalyze, libutils) from rope.base.change import ChangeSet, ChangeContents, MoveResource from rope.refactor import occurrences class Rename(object): """A class for performing rename refa...
synergeticsedx/deployment-wipro
refs/heads/oxa/master.fic
lms/djangoapps/django_comment_client/tests/test_models.py
17
""" Tests for the django comment client integration models """ from django.test.testcases import TestCase from nose.plugins.attrib import attr from opaque_keys.edx.keys import CourseKey import django_comment_common.models as models from xmodule.modulestore.tests.django_utils import ( TEST_DATA_MIXED_MODULESTORE, M...
SpaceKatt/CSPLN
refs/heads/master
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/lib/python2.7/matplotlib/patheffects.py
3
""" Defines classes for path effects. The path effects are supported in :class:`~matplotlib.text.Text` and :class:`~matplotlib.patches.Patch` matplotlib.text.Text. """ from matplotlib.backend_bases import RendererBase from matplotlib.backends.backend_mixed import MixedModeRenderer import matplotlib.transforms as trans...
cirlabs/heroku-buildpack-geodjango
refs/heads/master
vendor/pip-1.3.1/pip/util.py
63
import sys import shutil import os import stat import re import posixpath import pkg_resources import zipfile import tarfile import subprocess import textwrap from pip.exceptions import InstallationError, BadCommand, PipError from pip.backwardcompat import(WindowsError, string_types, raw_input, ...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/database/postgresql/postgresql_ext.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
jmchilton/pulsar
refs/heads/master
test/manager_test.py
4
from pulsar.managers.unqueued import Manager from os.path import join from .test_utils import BaseManagerTestCase class ManagerTest(BaseManagerTestCase): def setUp(self): super(ManagerTest, self).setUp() self._set_manager() def _set_manager(self, **kwds): self.manager = Manager('_d...
usc-isi/essex-baremetal-support
refs/heads/master
plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py
8
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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 # # ...
Evervolv/android_external_chromium_org
refs/heads/kitkat
tools/perf/benchmarks/startup.py
23
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import test from measurements import startup class StartupColdBlankPage(test.Test): test = startup.Startup page_set = 'page_sets/blank_p...
mercycorps/tola-activity
refs/heads/master
htdocs/activitydb/migrations/0055_auto_20151216_1555.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('activitydb', '0054_auto_20151215_1417'), ] operations = [ migrations.AlterField( model_name='approvalauthority',...
ilexius/odoo
refs/heads/master
addons/base_action_rule/test_models.py
10
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import openerp from openerp.osv import fields, osv from openerp import api AVAILABLE_STATES = [ ('draft', 'New'), ('cancel', 'Cancelled'), ('open', 'In Progress'), ('pending', 'Pending'), ('done', 'C...
DeMille/emailhooks
refs/heads/master
django_nonrel/djangotoolbox/fields.py
52
# All fields except for BlobField written by Jonas Haag <jonas@lophus.org> from django.core.exceptions import ValidationError from django.utils.importlib import import_module from django.db import models from django.db.models.fields.subclassing import Creator from django.db.utils import IntegrityError from django.db.m...
agry/NGECore2
refs/heads/master
scripts/object/static/item/item_structure_module.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/dressed_eisley_officer_trandoshan_male_01.py
85615
import sys def setup(core, object): return
tfroehlich82/erpnext
refs/heads/develop
erpnext/stock/doctype/item_supplier/item_supplier.py
121
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ItemSupplier(Document): pass
johnwlockwood/appengine-mapreduce
refs/heads/master
python/src/mapreduce/lib/graphy/backends/__init__.py
1305
#!/usr/bin/env python
Netflix/security_monkey
refs/heads/develop
security_monkey/tests/core/__init__.py
9
# Copyright 2017 Bridgewater Associates # # 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 appli...
gedare/gem5
refs/heads/master
tests/configs/tsunami-switcheroo-full.py
13
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
oliver/jhbuild
refs/heads/kdevelop4-jaunty
jhbuild/utils/unpack.py
2
# jhbuild - a build script for GNOME 1.x and 2.x # Copyright (C) 2007 Alberto Ruiz <aruiz@gnome.org> # # unpack.py: helper functions for unpacking compressed packages # # 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 ...
fantasycheung/django_learning
refs/heads/master
lists/admin.py
13848
from django.contrib import admin # Register your models here.
thaihungle/deepexp
refs/heads/master
gen-dnc/dual_task/report.py
1
import pandas as pd import os import matplotlib.pyplot as plt plt.rc('text', usetex=True) plt.rc('font', family='serif') from matplotlib.lines import Line2D import numpy as np def report_sum2(path='./data/report/sum2/loss'): graph={} for fname in os.listdir(path): if 'previous' in fname: co...
manqala/erpnext
refs/heads/develop
erpnext/hr/doctype/salary_structure_employee/salary_structure_employee.py
37
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class SalaryStructureEmployee(Document): pass
icclab/MasterMind-ServiceManager
refs/heads/master
api/models/__init__.py
1
# coding: utf-8 # flake8: noqa from __future__ import absolute_import # import models into model package from models.network import Network from models.stack import Stack from models.swarm import Swarm from models.volume import Volume
ashishnitinpatil/django_appengine_project_template
refs/heads/master
django/contrib/comments/urls.py
382
from django.conf.urls import patterns, url urlpatterns = patterns('django.contrib.comments.views', url(r'^post/$', 'comments.post_comment', name='comments-post-comment'), url(r'^posted/$', 'comments.comment_done', name='comments-comment-done'), url(r'^flag/(\d+)/$', 'moderati...
inares/edx-platform
refs/heads/inares_sass
openedx/core/djangoapps/content/course_overviews/models.py
1
""" Declaration of CourseOverview model """ import json from django.db import models, transaction from django.db.models.fields import BooleanField, DateTimeField, DecimalField, TextField, FloatField, IntegerField from django.db.utils import IntegrityError from django.utils.translation import ugettext from lms.djangoap...
kfrodgers/vmax-py
refs/heads/master
examples/test_system.py
1
# Copyright 2016 EMC Corporation from os import getenv from emc_vmax_smis.vmax_smis_base import VmaxSmisBase def do_print(instance): for s in instance: print '\t' + str(s) for item in s.items(): print '\t\t' + str(item) if __name__ == '__main__': host = getenv("ECOM_IP", default=...
b-jesch/service.fritzbox.callmonitor
refs/heads/master
resources/lib/PhoneBooks/pyicloud/vendorlibs/keyring/util/properties.py
15
from collections import Callable class ClassProperty(property): """ An implementation of a property callable on a class. Used to decorate a classmethod but to then treat it like a property. Example: >>> class MyClass: ... @ClassProperty ... @classmethod ... def skillz(cls): ...
stnava/ITK
refs/heads/master
Wrapping/Generators/Python/Tests/BinaryThresholdImageFilter.py
19
#========================================================================== # # Copyright Insight Software Consortium # # 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...
himmih/cluedo
refs/heads/master
venv/lib/python2.7/site-packages/pip/vendor/html5lib/serializer/htmlserializer.py
79
from __future__ import absolute_import, division, unicode_literals from pip.vendor.six import text_type import gettext _ = gettext.gettext try: from functools import reduce except ImportError: pass from ..constants import voidElements, booleanAttributes, spaceCharacters from ..constants import rcdataElements...
morreene/tradenews
refs/heads/master
venv/Lib/site-packages/flask_debugtoolbar/panels/config_vars.py
7
from flask import current_app from flask_debugtoolbar.panels import DebugPanel _ = lambda x: x class ConfigVarsDebugPanel(DebugPanel): """ A panel to display all variables from Flask configuration """ name = 'ConfigVars' has_content = True def nav_title(self): return _('Config') ...
geminy/aidear
refs/heads/master
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/v8/tools/mb/mb_unittest.py
9
#!/usr/bin/python # Copyright 2016 the V8 project authors. All rights reserved. # Copyright 2015 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. """Tests for mb.py.""" import json import StringIO import os import sys impo...
OpenFurry/honeycomb
refs/heads/master
administration/migrations/0001_initial.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-30 04:16 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('conten...
Gamecredits-Universe/Gamecredits-electrum-client
refs/heads/master
gui/gtk.py
1
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
jakew02/android_kernel_moto_shamu
refs/heads/android-5.1
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
aclifton/cpeg853-gem5
refs/heads/master
src/arch/power/PowerInterrupts.py
69
# Copyright (c) 2011 Google # 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 following dis...
h4x3rotab/BTCGPU
refs/heads/master
test/functional/mempool_spend_coinbase.py
47
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test spending coinbase transactions. The coinbase transaction in block N can appear in block N+100... ...
slongwang/selenium
refs/heads/master
py/selenium/webdriver/edge/webdriver.py
29
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
farhaanbukhsh/nuancier
refs/heads/master
tests/test_model.py
4
# -*- coding: utf-8 -*- # # Copyright © 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2, or (at your option) any later # version. This program is distributed in t...
jwren/intellij-community
refs/heads/master
python/testData/editing/singleElse.py
83
if 1: pass else<caret> #blah
AnDann/ethersex
refs/heads/master
contrib/transgraph/transform.py
17
import sys import random import re from xml.dom.ext.reader import Sax2 from xml.dom.ext import Print from xml.dom.NodeFilter import NodeFilter scripts = [] deleteNodes = [] def handle_text_node(node): text = node.firstChild.nodeValue.strip() if text.find("%%") != -1: pre = text[0:text.find("%%")] rest = text[te...
selfsk/nodeset.core
refs/heads/core
src/nodeset/core/heartbeat.py
1
from zope.interface import implements from nodeset.core import interfaces class NodeMonitor: implements(interfaces.heartbeat.INodeMonitor) """ Special class for handling heartbeat monitor and its callbacks and errbacks """ def __init__(self, node): self.node = node self....
buntyke/Flask
refs/heads/master
microblog/flask/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree.py
284
from __future__ import absolute_import, division, unicode_literals try: from collections import OrderedDict except ImportError: try: from ordereddict import OrderedDict except ImportError: OrderedDict = dict import re from pip._vendor.six import text_type from . import _base from ..utils...
francisco-dlp/hyperspy
refs/heads/RELEASE_next_minor
hyperspy/samfire_utils/goodness_of_fit_tests/red_chisq.py
5
# -*- coding: utf-8 -*- # Copyright 2007-2011 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
jessfraz/test-infra
refs/heads/master
hack/coalesce_test.py
14
#!/usr/bin/env python3 # Copyright 2016 The Kubernetes Authors. # # 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 appl...
gurneyalex/OpenUpgrade
refs/heads/master
addons/base_vat/__init__.py
440
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
parthea/pydatalab
refs/heads/master
datalab/utils/commands/_job.py
6
# Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
isotoma/django-waffle
refs/heads/master
waffle/models.py
2
try: from django.utils import timezone as datetime except ImportError: from datetime import datetime from django.contrib.auth.models import Group from django.contrib.sites.models import Site from django.db import models from django.db.models.signals import post_save, post_delete, m2m_changed from waffle.compa...
JasonLee0524/trezor-crypto-master
refs/heads/master
test_curves.py
1
#!/usr/bin/python import ctypes as c import random import ecdsa import hashlib import binascii import os import pytest def bytes2num(s): res = 0 for i, b in enumerate(reversed(bytearray(s))): res += b << (i * 8) return res curves = { 'nist256p1': ecdsa.curves.NIST256p, 'secp256k1': ecdsa....
goodhanrry/N915S_goodHanrry_kernel
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
kleinrap/policyemergence
refs/heads/master
technical_model.py
1
import random class Technical_Model(): def __init__(self, len_DC, len_PC, len_S): self.len_DC = len_DC self.len_PC = len_PC self.len_S = len_S self.belieftree_truth = [None for i in range(len_DC + len_PC + len_S)] self.cells_repository = [] # belieftree_truth = [] # Add a cell to the list of cells: ...
Endika/django
refs/heads/master
tests/admin_custom_urls/tests.py
8
from __future__ import unicode_literals from django.contrib.admin.utils import quote from django.contrib.auth.models import User from django.template.response import TemplateResponse from django.test import TestCase, override_settings from django.urls import reverse from .models import Action, Car, Person @override...
aio-libs/sockjs
refs/heads/master
tests/test_transport_xhrsend.py
1
from aiohttp import web import pytest from sockjs.transports import xhrsend @pytest.fixture def make_transport(make_manager, make_request, make_handler, make_fut): def maker(method="GET", path="/", query_params={}): handler = make_handler(None) manager = make_manager(handler) request = m...
legalsylvain/OpenUpgrade
refs/heads/master
addons/email_template/tests/test_mail.py
34
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
kuiwei/kuiwei
refs/heads/master
common/djangoapps/course_modes/migrations/0001_initial.py
69
# -*- 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 model 'CourseMode' db.create_table('course_modes_coursemode', ( ('id', self.gf('django....
LukeHoersten/ansible-modules-core
refs/heads/devel
packaging/os/rhn_channel.py
197
#!/usr/bin/python # (c) Vincent Van de Kussen # # 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...
jack-song/evolving-life
refs/heads/master
mainsite/apps/evolvinglife/views.py
1
# coding: utf-8 from models import Geography from models import GeographyPoint from django.shortcuts import render from django.core import serializers def index(request): #use natural key to serialize needed fields from geographys easily #from each geography point geographypoints_json = serializers.serialize("json"...
okwasi/googlemock
refs/heads/master
scripts/generator/cpp/tokenize.py
679
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 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...
Josebaseba/TweetsDownloader
refs/heads/master
tweets_downloader.py
1
import tweepy import json ACCOUNT_NAME = "josebaseba" consumer_key = "" consumer_secret = "" access_key = "" access_secret = "" def downloadTweets(screen_name): print "Start tweets download..." auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_key, access_secret...
tersmitten/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py
6
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
adrn/ophiuchus
refs/heads/master
ophiuchus/tests/test_core.py
1
# coding: utf-8 """ Test ... """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os import sys import logging # Third-party from astropy import log as logger import matplotlib.pyplot as pl import numpy as np # Project from ..potential import...
guoyuyanggyy/distributed-transcoding
refs/heads/master
transcode_main.py
1
# coding: utf-8 import sys import os import time import json import logging import tornado import tornado.ioloop import tornado.web import tornado.httpserver import config from Log import * import db import redis import transcode_db from multiprocessing import Process class MainHandler(tornado.web.RequestHandler): ...
codebrainz/geany
refs/heads/master
scripts/create_py_tags.py
12
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Enrico Tröger # License: GPL v2 or later # # (based on the script at http://svn.python.org/view/*checkout*/python/trunk/Tools/scripts/ptags.py) # # This script should be run in the top source directory. # # Parses all files given on command line for Python clas...
paul-xxx/micropython
refs/heads/master
tests/bytecode/pylib-tests/types.py
756
""" Define names for built-in types that aren't directly accessible as a builtin. """ import sys # Iterators in Python aren't a matter of type but of protocol. A large # and changing number of builtin types implement *some* flavor of # iterator. Don't check the type! Use hasattr to check for both # "__iter__" and "...
saraivaufc/jornalEletronico
refs/heads/master
newspaper/utils/tools.py
1
def filterList(list, index=0, tam=0): if index <= 0: return list[:tam] if index == None: index = 1 if tam <= 0: return list list_return = list[(index*tam)-tam:index * tam] return list_return
jelmer/samba
refs/heads/master
third_party/dnspython/dns/rdtypes/ANY/LOC.py
72
# Copyright (C) 2003-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 "...
Pistachitos/Sick-Beard
refs/heads/Pistachitos
lib/trakt/__init__.py
49
import urllib2 from hashlib import sha1 try: import json except ImportError: from lib import simplejson as json def TraktCall(method, api, username, password, data = {}): """ A generic method for communicating with trakt. Uses the method and data provided along with the auth info to send the com...
Mr-meet/PythonApplets
refs/heads/master
spiders_packege/douban_movie/DoubanSpider.py
1
from spiders_packege.douban_movie import UrlsManager, HtmlDownloader, HtmlPorcesser, DataOutputer class DoubanSpider(object): def __init__(self): self.urlManager=UrlsManager.UrlsManager(); self.downloader=HtmlDownloader.HtmlDownloader(); self.dataJar={}; self.processer=HtmlPorcess...
ClaudeZoo/volatility
refs/heads/master
volatility/win32/xpress.py
58
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # This file is part of Volatility. # # Volatility 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...
raccoongang/edx-platform
refs/heads/ginkgo-rg
common/djangoapps/third_party_auth/tests/specs/test_twitter.py
23
""" Separate integration test for Twitter which is an OAuth1 provider. """ from mock import patch from third_party_auth.tests.specs import base class TwitterIntegrationTest(base.Oauth2IntegrationTest): """Integration tests for Twitter backend.""" def setUp(self): super(TwitterIntegrationTest, self)....
Jumpscale/jumpscale_core8
refs/heads/master
apps/agentcontroller/jumpscripts/jumpscale/system_echo_async.py
1
from JumpScale import j descr = """ echo (return mesg) """ organization = "jumpscale" author = "kristof@incubaid.com" license = "bsd" version = "1.0" category = "monitor.healthcheck" async = True roles = [] period = 600 log = True def action(msg=[{'category': 'JSAgent', 'message': 'Async test', 'state': 'OK'}]): ...
Eih3/CHIP-linux
refs/heads/nextthing/chip
tools/perf/scripts/python/syscall-counts-by-pid.py
1996
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
openfun/edx-platform
refs/heads/master
common/test/acceptance/tests/video/test_video_times.py
123
""" Acceptance tests for Video Times(Start, End and Finish) functionality. """ from flaky import flaky from .test_video_module import VideoBaseTest import unittest class VideoTimesTest(VideoBaseTest): """ Test Video Player Times """ def setUp(self): super(VideoTimesTest, self).setUp() def test_v...
thiagopa/thiagopagonha
refs/heads/master
blog/urls.py
1
from django.conf.urls.defaults import * from django.views.generic import list_detail, date_based from blog.models import * from blog.views import * urlpatterns = patterns('blog.views', (r"^preview/(\d+)$", "preview"), (r"^publish/(\d+)$", "publish"), (r"^(?P<slug>[a-zA-Z0-9-]+)/$", "post"), (r"^notify$", ...
JuhaS/django-restrictaccess
refs/heads/master
djrestrictaccess/models.py
1
from django.db import models import math import datetime class WhitelistedSession(models.Model): expiry = models.DateTimeField() sessionkey = models.CharField(max_length=128, null=True, blank=True) ip = models.CharField(max_length=15, null=True, blank=True) class AccessKey(models.Model): key = mod...
lidiamcfreitas/FenixScheduleMaker
refs/heads/master
oldFiles/project-env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py
2161
from __future__ import absolute_import from . import ssl_match_hostname
litobro/PyPlaybulb
refs/heads/master
setup.py
1
from distutils.core import setup setup(name='PyPlaybulb', version='0.1', license='MIT License', url='https://github.com/litobro/PyPlaybulb', download_url='https://github.com/litobro/PyPlaybulb/tarball/0.1', author='Thomas Dang', author_email='thomas.kyle.dang@gmail.com', descr...
jessstrap/servotk
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_treewalkers.py
429
from __future__ import absolute_import, division, unicode_literals import os import sys import unittest import warnings from difflib import unified_diff try: unittest.TestCase.assertEqual except AttributeError: unittest.TestCase.assertEqual = unittest.TestCase.assertEquals from .support import get_data_files...
SriHarshaGajavalli/SE2017
refs/heads/master
faculty/models.py
236
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models # Create your models here.
xhqu1981/pymatgen
refs/heads/master
pymatgen/io/tests/test_xyz.py
8
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ Created on Apr 17, 2012 """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "S...
no2key/autodock
refs/heads/master
edit.py
5
''' This class will edit a formation currently stored in etcd. ''' from etcd import Etcd class FormationEditor(object): def __init__(self, manager, logger): self.logger = logger self.manager = manager self.etcd = Etcd(logger)
mglukhikh/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_1/_pkg0_1_1_1/_pkg0_1_1_1_1/_mod0_1_1_1_1_3.py
30
name0_1_1_1_1_3_0 = None name0_1_1_1_1_3_1 = None name0_1_1_1_1_3_2 = None name0_1_1_1_1_3_3 = None name0_1_1_1_1_3_4 = None
tempbottle/Impala
refs/heads/cdh5-trunk
bin/run-workload.py
9
#!/usr/bin/env impala-python # Copyright (c) 2012 Cloudera, 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...
achang97/YouTunes
refs/heads/master
lib/python2.7/site-packages/oauth2client/contrib/django_util/__init__.py
39
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
luca76/QGIS
refs/heads/master
python/plugins/processing/algs/qgis/CreateConstantRaster.py
6
# -*- coding: utf-8 -*- """ *************************************************************************** CreateConstantRaster.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************...
yugangw-msft/azure-cli
refs/heads/dev
src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_custom.py
2
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
GiladE/birde
refs/heads/master
venv/lib/python2.7/site-packages/django/core/files/temp.py
56
""" The temp module provides a NamedTemporaryFile that can be reopened in the same process on any platform. Most platforms use the standard Python tempfile.NamedTemporaryFile class, but Windows users are given a custom class. This is needed because the Python implementation of NamedTemporaryFile uses the O_TEMPORARY f...
tensor-tang/Paddle
refs/heads/develop
python/paddle/__init__.py
2
# Copyright (c) 2016 PaddlePaddle 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 applic...
n-west/gnuradio
refs/heads/maint
gr-fec/python/fec/capillary_threaded_encoder.py
47
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
MinnPost/salesforce-stripe
refs/heads/master
app_celery.py
2
from celery import Celery from config import SENTRY_DSN def make_celery(app): celery = Celery( app.import_name, broker_pool_limit=1, broker_heartbeat=None, broker=app.config["CELERY_BROKER_URL"], broker_connection_timeout=30, result_backend=None, event_queue...
akirk/youtube-dl
refs/heads/master
youtube_dl/extractor/hellporno.py
153
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( js_to_json, remove_end, ) class HellPornoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hellporno\.com/videos/(?P<id>[^/]+)' _TEST = { 'url': 'http://hellporno.com/videos/dixie-is-...
reinhrst/panda
refs/heads/master
usr/lib/python2.7/dist-packages/DistUpgrade/xorg_fix_proprietary.py
2
../../../../share/pyshared/DistUpgrade/xorg_fix_proprietary.py
sebastic/QGIS
refs/heads/master
python/plugins/processing/gui/CreateNewScriptAction.py
17
# -*- coding: utf-8 -*- """ *************************************************************************** CreateNewScriptAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************...
honeycombio/honey_installers
refs/heads/master
nginx_installer/nginx_installer.py
1
#!/usr/bin/env python import subprocess from nginxparser import NginxParser import click import os.path import platform import pprint import semver import sys sys.path.append(os.path.abspath(os.path.join(os.path.basename(__file__), ".."))) from honey_installer import (HoneyInstaller, get_version, check_output) INS...
jackkiej/SickRage
refs/heads/master
lib/sqlalchemy/dialects/mysql/mysqlconnector.py
76
# mysql/mysqlconnector.py # Copyright (C) 2005-2014 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 """ .. dialect:: mysql+mysqlconnector :name: MySQL Connector/Python :d...
piniGitHUB/volatility
refs/heads/master
volatility/plugins/overlays/windows/win2003_sp12_x86_syscalls.py
45
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
mou4e/zirconium
refs/heads/master
native_client_sdk/src/tools/getos.py
47
#!/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. """Determine OS and various other system properties. Determine the name of the platform used and other system properties such as t...