repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
emersonsoftware/ansiblefork
refs/heads/devel
lib/ansible/modules/system/cron.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2012, Dane Summers <dsummers@pinedesk.biz> # (c) 2013, Mike Grozak <mike.grozak@gmail.com> # (c) 2013, Patrick Callahan <pmc@patrickcallahan.com> # (c) 2015, Evan Kaufman <evan@digitalflophouse.com> # (c) 2015, Luca Berruti <nadirio@gmail.com> # # This file is part of ...
elimence/edx-platform
refs/heads/master
lms/djangoapps/courseware/views.py
1
import logging import urllib from functools import partial from django.conf import settings from django.core.context_processors import csrf from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.contrib.auth.decorators i...
iuliat/nova
refs/heads/master
nova/console/api.py
66
# Copyright (c) 2010 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.apache.org/licenses/LICENSE-2.0 # # Unless ...
visualputty/Landing-Lights
refs/heads/master
djangoflash/tests/__init__.py
9
# -*- coding: utf-8 -*- """Dummy file to make this directory a package. """
luser/socorro
refs/heads/master
socorro/cron/jobs/fetch_adi_from_hive.py
2
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import codecs import datetime import urllib2 import os import tempfile import unicodedata import pyhs2 from configman ...
dilworm/pytest
refs/heads/master
redisinfo/redisinfocollector.py
1
# -*- coding=utf8 -*- import Queue,threading,asyncore,time,socket import redisclient as rc import configparser as cf from redisreplycallback import RedisReplyCallback import redisreplyhandler as rrh exec_interval = 1 # send command "info" to redis def timer_check_connection(collector): for p in collector.peers: ...
ManageIQ/integration_tests
refs/heads/master
requirements/__init__.py
2
import os import subprocess from importlib_metadata import metadata from importlib_metadata import PackageNotFoundError from pip_module_scanner.scanner import Scanner # Override Scanner to skip dotfiles class RepoImportScanner(Scanner): """Overwrite Scanner to use git tracked files instead of os.walk Also o...
PmagPy/PmagPy
refs/heads/master
programs/revtest_mm1990.py
2
#!/usr/bin/env python from __future__ import division from __future__ import print_function from builtins import input from builtins import range from past.utils import old_div import sys import numpy import pmagpy.pmagplotlib as pmagplotlib import pmagpy.pmag as pmag # #contributed by N. Swanson-Hysell on 5/3/2013 r...
idovear/odoo
refs/heads/master
addons/project/wizard/__init__.py
381
# -*- 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...
thaim/ansible
refs/heads/fix-broken-link
lib/ansible/modules/cloud/cloudstack/cs_region.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'}...
israeleriston/scientific-week
refs/heads/master
backend/venv/lib/python3.5/site-packages/sqlalchemy/sql/selectable.py
20
# sql/selectable.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """The :class:`.FromClause` class of SQL expression elements, representing SQL tab...
carolineLe/miasm
refs/heads/master
miasm/ir/__init__.py
13
"Intermediate representation methods"
proppy/appengine-try-python-flask
refs/heads/master
lib/werkzeug/http.py
317
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
SimtterCom/gyp
refs/heads/master
test/link-dependency/gyptest-link-dependency.py
165
#!/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. """ Verify that a target marked as 'link_dependency==1' isn't being pulled into the 'none' target's dependency (which would otherwise lead t...
SlimRemix/android_external_chromium_org
refs/heads/lp5.1
third_party/simplejson/__init__.py
175
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
brendanwhitfield/python-OBD
refs/heads/master
obd/asynchronous.py
1
# -*- coding: utf-8 -*- ######################################################################## # # # python-OBD: A python OBD-II serial module derived from pyobd # # # # C...
ingadhoc/account-financial-tools
refs/heads/13.0
account_ux/__init__.py
16
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from . import models from . import wizards
xjzhou/PyMySQL
refs/heads/master
pymysql/tests/test_issues.py
7
import datetime import time import warnings import sys import pymysql from pymysql.tests import base import unittest2 try: import imp reload = imp.reload except AttributeError: pass __all__ = ["TestOldIssues", "TestNewIssues", "TestGitHubIssues"] class TestOldIssues(base.PyMySQLTestCase): def test_...
lshain-android-source/external-chromium_org
refs/heads/master
build/android/pylib/chrome_test_server_spawner.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. """A "Test Server Spawner" that handles killing/stopping per-test test servers. It's used to accept requests from the device to spawn and kill instances of ...
renegelinas/mi-instrument
refs/heads/master
mi/dataset/parser/test/test_auv_eng_auv.py
7
#!/usr/bin/env python """ @package mi.dataset.parser.test @fid marine-integrations/mi/dataset/parser/test/test_auv_eng_auv.py @author Jeff Roy @brief Test code for a auv_eng_auv data parser NOTE: there have been several other parsers built on auv_common tested already all negative paths through the code are not again...
redeyser/IceCash2
refs/heads/master
install/pyusb-1.0.0rc1/build/lib.linux-i686-2.7/usb/_lookup.py
28
# Copyright (C) 2009-2014 Walker Inman # # The following terms apply to all files associated # with the software unless explicitly disclaimed in individual files. # # The authors hereby grant permission to use, copy, modify, distribute, # and license this software and its documentation for any purpose, provided # that ...
cailiwei/buildroot
refs/heads/master
support/scripts/gen-manual-lists.py
18
#!/usr/bin/env python ## ## gen-manual-lists.py ## ## This script generates the following Buildroot manual appendices: ## - the package tables (one for the target, the other for host tools); ## - the deprecated items. ## ## Author(s): ## - Samuel Martin <s.martin49@gmail.com> ## ## Copyright (C) 2013 Samuel Martin #...
davidbrazdil/nacl
refs/heads/master
run.py
5
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import os import subprocess import sys import tempfile import pynacl.platform # Target architecture for PNaCl ca...
lixun910/pysal
refs/heads/master
pysal/model/spint/count_model.py
1
""" CountModel class for dispatching different types of count models and different types of estimation technqiues. """ __author__ = "Taylor Oshan tayoshan@gmail.com" import numpy as np from pysal.model.spglm.glm import GLM from pysal.model.spglm.family import Poisson, QuasiPoisson class CountModel(object): """ ...
twitter/pants
refs/heads/master
contrib/go/src/python/pants/contrib/go/targets/go_local_source.py
1
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import re from pants.base.exceptions import TargetDefinitionException from pan...
Kotaimen/georest
refs/heads/develop
georest/geo/__init__.py
1
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '5/29/14' """ georest.geo ~~~~~~~~~~~ This package provides GeoJson a-like Feature data model. Various python geo packages: - Geometry Engine: - shapely - geos - osgeo.ogr - django.contrib.gis.geos ...
tantexian/sps-2014-12-4
refs/heads/master
sps/tests/__init__.py
2
# Copyright 2010-2011 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.apache.org/licenses/LICENSE-2.0 # # Unless...
alfa-addon/addon
refs/heads/master
plugin.video.alfa/lib/quasar/quasar/osarch.py
2
import xbmc import sys import platform def get_platform(): build = xbmc.getInfoLabel("System.BuildVersion") kodi_version = int(build.split()[0][:2]) ret = { "auto_arch": sys.maxsize > 2 ** 32 and "64-bit" or "32-bit", "arch": sys.maxsize > 2 ** 32 and "x64" or "x86", "os": "", ...
wbc2010/django1.2.5
refs/heads/master
django1.2.5/django/conf/locale/en_GB/formats.py
80
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = 'N j, Y' # 'Oct. 25, 2006' TIME_FORMAT = 'P' # '2:30 pm' DATETIME_FORMAT = 'N j, Y, P' # 'Oct. 25, 2006, 2:30 pm' YEAR_MONTH_FORMAT = 'F Y' #...
leoliujie/odoo
refs/heads/8.0
addons/website/tests/test_crawl.py
251
# -*- coding: utf-8 -*- import logging import urlparse import time import lxml.html import openerp import re _logger = logging.getLogger(__name__) class Crawler(openerp.tests.HttpCase): """ Test suite crawling an openerp CMS instance and checking that all internal links lead to a 200 response. If a use...
lckung/spark-ec2
refs/heads/branch-1.5
launch-script/lib/boto-2.34.0/boto/vpc/dhcpoptions.py
170
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
ifxit/nidhogg
refs/heads/develop
nidhogg/clustermode.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from time import sleep import nidhogg.core # this style needed for patching from .compatible import ACE, CifsShare, SnapmirrorDestinationInfo, Snapshot, Volume from .core import Nidhogg, NidhoggException try: # py2 from backport...
druuu/django
refs/heads/master
tests/managers_regress/tests.py
264
from __future__ import unicode_literals from django.apps import apps from django.db import models from django.template import Context, Template from django.test import TestCase, override_settings from django.utils.encoding import force_text from .models import ( AbstractBase1, AbstractBase2, AbstractBase3, Child1...
orlenko/plei
refs/heads/master
mezzanine/generic/templatetags/rating_tags.py
7
from mezzanine import template from mezzanine.generic.forms import RatingForm register = template.Library() @register.inclusion_tag("generic/includes/rating.html", takes_context=True) def rating_for(context, obj): """ Provides a generic context variable name for the object that ratings are being render...
SciLifeLab/TACA
refs/heads/master
taca/log/__init__.py
3
""" TACA logging module for external scripts """ import logging # get root logger ROOT_LOG = logging.getLogger() ROOT_LOG.setLevel(logging.INFO) # Console logger stream_handler = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') stream_handler.setFormatter(f...
samupl/simpleERP
refs/heads/master
apps/contacts/migrations/0008_auto_20181207_1436.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2018-12-07 14:36 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0007_auto_20181207_1433'), ] operations = [ migrations.AlterFiel...
pslacerda/GromacsWrapper
refs/heads/develop
numkit/fitting.py
1
# numkit --- data fitting # Copyright (c) 2010 Oliver Beckstein <orbeckst@gmail.com> # Released under the "Modified BSD Licence" (see COPYING). """ :mod:`numkit.fitting` --- Fitting data ====================================== The module contains functions to do least square fits of functions of one variable f(x) to da...
3Jade/csbuild
refs/heads/master
csbuild/_gui.py
1
# coding=utf-8 import functools import re import stat import sys if sys.version_info >= (3,0): import io StringIO = io.StringIO else: import cStringIO StringIO = cStringIO.StringIO import csbuild from . import log # try: # from PyQt5 import QtCore, QtGui, QtWidgets # QMainWindow = QtWidgets.QMainWindow # QAppli...
ShassAro/ShassAro
refs/heads/master
Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/contrib/flatpages/views.py
105
from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.contrib.sites.shortcuts import get_current_site from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.template import loader, RequestContext...
google-code/android-scripting
refs/heads/master
python/src/Doc/includes/sqlite3/converter_point.py
44
import sqlite3 class Point(object): def __init__(self, x, y): self.x, self.y = x, y def __repr__(self): return "(%f;%f)" % (self.x, self.y) def adapt_point(point): return "%f;%f" % (point.x, point.y) def convert_point(s): x, y = map(float, s.split(";")) return Point(x, y) # Regi...
letzerp/framework
refs/heads/v5.0
frappe/desk/form/save.py
4
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json from frappe.desk.form.load import run_onload @frappe.whitelist() def savedocs(): """save / submit / update doclist""" try: doc = frappe.get_doc(json.lo...
Hackplayers/Empire-mod-Hackplayers
refs/heads/master
lib/modules/python/management/osx/ls_m.py
6
from lib.common import helpers 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': 'ls_m', # list of one or more au...
ly0/xxadmin
refs/heads/master
xadmin/plugins/xversion.py
1
from django.contrib.contenttypes.generic import GenericRelation from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.db import models from django.db.models.query import QuerySet from django import get_version v = get_version() if v[:3] > '1.7': ...
samithaj/headphones
refs/heads/master
lib/beets/util/bluelet.py
17
"""Extremely simple pure-Python implementation of coroutine-style asynchronous socket I/O. Inspired by, but inferior to, Eventlet. Bluelet can also be thought of as a less-terrible replacement for asyncore. Bluelet: easy concurrency without all the messy parallelism. """ import socket import select import sys import t...
crystalspace/CS
refs/heads/master
scripts/python/frozen/cspace/csgfx.py
1
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. import _csgfx import new new_instancemethod = new.instancemethod try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. d...
rahul-c1/scrapy
refs/heads/master
scrapy/cmdline.py
9
from __future__ import print_function import sys import optparse import cProfile import inspect import pkg_resources import scrapy from scrapy.crawler import CrawlerProcess from scrapy.xlib import lsprofcalltree from scrapy.command import ScrapyCommand from scrapy.exceptions import UsageError from scrapy.utils.misc im...
zhuwenping/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/distutils/core.py
54
"""distutils.core The only module that needs to be imported to use the Distutils; provides the 'setup' function (which is to be called from the setup script). Also indirectly provides the Distribution and Command classes, although they are really defined in distutils.dist and distutils.cmd. """ import os import sys ...
badlands-model/pyBadlands
refs/heads/master
badlands/badlands/surface/elevationTIN.py
1
##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~## ## ## ## This file forms part of the Badlands surface processes modelling application. ## ## ...
jagguli/intellij-community
refs/heads/master
python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/emptyParam_after.py
249
__author__ = 'ktisha' class Child(Base): def __init__(self): super(Child, self).__init__() @staticmethod def f(): test = 1
bnoordhuis/gyp
refs/heads/master
test/win/gyptest-link-enable-winrt.py
95
#!/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_enable_winrt works correctly. """ import TestGyp import os import sys import struct CHDIR = 'enable-winrt' print 'Thi...
akshayparopkari/phylotoast
refs/heads/master
bin/core_overlap_plot.py
2
#!/usr/bin/env python # coding: utf-8 """ Given a set of core microbiome files, create a matching set of ovelapping barplots that visualize which species belong to each core microbiome. """ from __future__ import absolute_import, division, print_function import ast import argparse from collections import Counter, Orde...
Tong-Chen/scikit-learn
refs/heads/master
benchmarks/bench_glm.py
297
""" A comparison of different methods in GLM Data comes from a random square matrix. """ from datetime import datetime import numpy as np from sklearn import linear_model from sklearn.utils.bench import total_seconds if __name__ == '__main__': import pylab as pl n_iter = 40 time_ridge = np.empty(n_it...
alxgu/ansible
refs/heads/devel
lib/ansible/plugins/action/wait_for_connection.py
16
# (c) 2017, Dag Wieers <dag@wieers.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 the License, or # (at your option) any later version. # ...
jcoady9/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/lib2to3/tests/__init__.py
308
"""Make tests/ into a package. This allows us to "import tests" and have tests.all_tests be a TestSuite representing all test cases from all test_*.py files in tests/.""" # Author: Collin Winter import os import os.path import unittest import types from . import support all_tests = unittest.TestSuite() tests_dir = ...
amyvmiwei/chromium
refs/heads/trunk
o3d/site_scons/site_tools/command_output.py
26
#!/usr/bin/python2.4 # Copyright 2009, 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...
ghickman/couchdbkit
refs/heads/master
examples/django_blogapp/blog_app/views.py
3
from couchdbkit.ext.django.forms import DocumentForm from django.forms.fields import CharField from django.forms.widgets import HiddenInput from django.shortcuts import render_to_response from django.template import RequestContext from models import Post, Comment class PostForm(DocumentForm): class Meta: ...
danieldmm/minerva
refs/heads/master
retrieval/lucene_index.py
1
# Prebuild bag-of-words representations # # Copyright: (c) Daniel Duma 2014 # Author: Daniel Duma <danielduma@gmail.com> # For license information, see LICENSE.TXT from __future__ import absolute_import from __future__ import print_function import sys, json, datetime, math import db.corpora as cp import proc.doc_r...
jmcorgan/gnuradio
refs/heads/master
gr-blocks/python/blocks/qa_throttle.py
57
#!/usr/bin/env python # # Copyright 2013 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) # ...
ezequielpereira/Time-Line
refs/heads/master
libs64/wx/lib/art/img2pyartprov.py
7
#----------------------------------------------------------------------------- # Name: img2pyartprov.py # Purpose: # # Author: Riaan Booysen # # RCS-ID: $Id: img2pyartprov.py 51004 2008-01-03 08:17:39Z RD $ # Copyright: (c) 2006 # Licence: wxPython #------------------------------------------...
msiebuhr/v8.go
refs/heads/master
v8/tools/testrunner/network/__init__.py
651
# Copyright 2012 the V8 project authors. 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...
nerzhul/ansible
refs/heads/devel
lib/ansible/modules/monitoring/logicmonitor_facts.py
13
#!/usr/bin/python """LogicMonitor Ansible module for managing Collectors, Hosts and Hostgroups Copyright (C) 2015 LogicMonitor 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 ver...
nightlydash/dash-abe
refs/heads/master
Abe/Chain/BlackCoin.py
22
# Copyright(C) 2014 by Abe developers. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is dist...
JamesMGreene/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/factory_unittest.py
118
# 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 f...
nfedera/rg3-youtube-dl
refs/heads/master
youtube_dl/extractor/ign.py
50
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, ) class IGNIE(InfoExtractor): """ Extractor for some of the IGN sites, like www.ign.com, es.ign.com de.ign.com. Some videos of it.ign.com are also supported "...
Krossom/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/encodings/iso2022_jp_2004.py
816
# # iso2022_jp_2004.py: Python Unicode Codec for ISO2022_JP_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_iso2022, codecs import _multibytecodec as mbc codec = _codecs_iso2022.getcodec('iso2022_jp_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class I...
yeahwhat-mc/CloudBotLegacy
refs/heads/develop
plugins/factoids.py
1
# Written by Scaevolus 2010 import string import re from util import hook, http, text, pyexec re_lineends = re.compile(r'[\r\n]*') db_ready = [] # some simple "shortcodes" for formatting purposes shortcodes = { '[b]': '\x02', '[/b]': '\x02', '[u]': '\x1F', '[/u]': '\x1F', '[i]': '\x16', '[/...
2buntu/2buntu-blog
refs/heads/master
twobuntu/shorturls/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import twobuntu.utils class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='ShortURL', fields=[ ('key...
aaronfang/personal_scripts
refs/heads/master
af_scripts/blendshapes/toggleCtrls.py
2
import maya.cmds as cmds def toggleCtrls(): curPanel = cmds.getPanel(withFocus=1) if cmds.modelEditor(curPanel,nurbsCurves=1,q=1)==True and cmds.modelEditor(curPanel,nurbsSurfaces=1,q=1)==True: cmds.modelEditor(curPanel,e=1,nurbsCurves=0) cmds.modelEditor(curPanel,e=1,nurbsSurfaces=0) elif cmds.modelEditor(curPa...
onitake/ansible
refs/heads/devel
lib/ansible/modules/storage/glusterfs/gluster_volume.py
33
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Taneli Leppä <taneli@crasman.fi> # 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': ...
zachjanicki/osf.io
refs/heads/develop
scripts/admin_permission_email.py
54
#!/usr/bin/env python # encoding: utf-8 import logging import datetime from modularodm import Q from framework.email.tasks import send_email from website import mails from website import models from website import settings from website.app import init_app from scripts import utils as script_utils logger = loggin...
ericzolf/ansible
refs/heads/devel
lib/ansible/plugins/inventory/toml.py
29
# Copyright (c) 2018 Matt Martz <matt@sivel.net> # 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 DOCUMENTATION = r''' name: toml version_added: "2.8" short_description: Uses...
pombredanne/bup
refs/heads/master
cmd/newliner-cmd.py
10
#!/usr/bin/env python import sys, os, re from bup import options from bup import _helpers # fixes up sys.argv on import optspec = """ bup newliner """ o = options.Options(optspec) (opt, flags, extra) = o.parse(sys.argv[1:]) if extra: o.fatal("no arguments expected") r = re.compile(r'([\r\n])') lastlen = 0 all ...
ShanghaiTimes/Audacity2015
refs/heads/master
lib-src/lv2/sratom/waflib/Tools/fc_scan.py
183
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import re from waflib import Utils,Task,TaskGen,Logs from waflib.TaskGen import feature,before_method,after_method,extension from waflib.Configure import conf INC_REGEX="""(?:...
rhdedgar/openshift-tools
refs/heads/stg
openshift/installer/vendored/openshift-ansible-3.7.0/roles/lib_openshift/src/ansible/oc_obj.py
25
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-branches def main(): ''' ansible oc module for services ''' module = AnsibleModule( argument_spec=dict( kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'), state=dict(default='present'...
dwf/numpy
refs/heads/master
doc/example.py
8
"""This is the docstring for the example.py module. Modules names should have short, all-lowercase names. The module name may have underscores if this improves readability. Every module should have a docstring at the very top of the file. The module's docstring may extend over multiple lines. If your docstring doe...
kgullikson88/GSSP_Analyzer
refs/heads/master
gsspy/analyzer.py
1
from __future__ import print_function, division, absolute_import import pandas as pd import numpy as np import matplotlib.pyplot as plt import os import logging from ._utils import get_minimum # Default labels for the Chi^2 output table CHI2_LABELS = ['feh', 'Teff', 'logg', 'micro_turb', 'vsini', 'c...
synthicity/activitysim
refs/heads/master
activitysim/__init__.py
12
# ActivitySim # See full license in LICENSE.txt.
nextstrain/fauna
refs/heads/master
tdb/append.py
1
import os, argparse, sys from rethinkdb import r sys.path.append('') # need to import from base from base.rethink_io import rethink_io from base.rethink_interact import rethink_interact from vdb.append import parser class append(object): def __init__(self, **kwargs): self.rethink_io = rethink_io() ...
kuri65536/python-for-android
refs/heads/master
python-build/python-libs/gdata/src/gdata/tlslite/Checker.py
359
"""Class for post-handshake certificate checking.""" from utils.cryptomath import hashAndBase64 from X509 import X509 from X509CertChain import X509CertChain from errors import * class Checker: """This class is passed to a handshake function to check the other party's certificate chain. If a handshake f...
wwright2/dcim3-angstrom1
refs/heads/master
sources/bitbake/lib/codegen.py
17
# -*- coding: utf-8 -*- """ codegen ~~~~~~~ Extension to ast that allow ast -> python code generation. :copyright: Copyright 2008 by Armin Ronacher. :license: BSD. """ from ast import * BOOLOP_SYMBOLS = { And: 'and', Or: 'or' } BINOP_SYMBOLS = { Add: '+', Su...
stackforge/compass-adapters
refs/heads/master
cobbler/triggers/sync/post/migrate_ks.py
2
#!/usr/bin/python """script to migrate rendered kickstart files from cobbler to outside.""" import logging from cobbler import api def main(): """main entry""" cobbler_api = api.BootAPI() for system in cobbler_api.systems(): cobbler_api.kickgen.generate_kickstart_for_system(system.name) t...
stoilov/Programming101
refs/heads/master
week2/Dungeon/fight.py
1
from random import randint from weapon import Weapon class Fight: def __init__(self, hero, orc): self.hero = hero self.orc = orc def flip_coin(self): chance = randint(0, 100) hero_first = False if chance < 50: hero_first = True return hero_first ...
aspose-slides/Aspose.Slides-for-Cloud
refs/heads/master
SDKs/Aspose.Slides-Cloud-SDK-for-Python/asposeslidescloud/models/PresentationStringReplaceResponse.py
4
#!/usr/bin/env python class PresentationStringReplaceResponse(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.""" def __init__(self): """ Attributes: swaggerTypes (dict): The key is attribute name and the value...
gangadhar-kadam/mic-wnframework
refs/heads/master
core/page/modules_setup/modules_setup.py
6
from __future__ import unicode_literals import webnotes @webnotes.whitelist() def update(ml): """update modules""" webnotes.conn.set_global('hidden_modules', ml) webnotes.msgprint('Updated') webnotes.clear_cache()
PetrDlouhy/django
refs/heads/master
tests/m2m_through/tests.py
295
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.test import TestCase from .models import ( CustomMembership, Employee, Event, Friendship, Group, Ingredient, Invitation, Membership, Person, PersonSelfRefM2M, Recipe, RecipeIngredient, Relati...
leesdolphin/rentme
refs/heads/master
rentme/urls.py
1
"""rentme URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
GeotrekCE/Geotrek-admin
refs/heads/master
geotrek/trekking/migrations/0013_auto_20200228_1755.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2020-02-28 16:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('trekking', '0012_auto_20200211_1011'), ] operations = [ migrations.AlterFi...
wilsonxiao/machinekit
refs/heads/master
nc_files/involute.py
43
from math import * print "G20 F60" print "G64 P0.001" print "G0 X0 Y0 Z0" a=.1 for i in range(100): t = i/10. x = a * (cos(t) + t * sin(t)) y = a * (sin(t) - t * cos(t)) print "G1 X%f Y%f" % (x,y) print "M2"
KaranToor/MA450
refs/heads/master
google-cloud-sdk/lib/surface/emulators/__init__.py
4
# 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 ag...
Stane1983/xbmc
refs/heads/master
tools/EventClients/examples/python/example_mouse.py
262
#!/usr/bin/python # This is a simple example showing how you can send mouse movement # events to XBMC. # NOTE: Read the comments in 'example_button1.py' for a more detailed # explanation. import sys sys.path.append("../../lib/python") from xbmcclient import * from socket import * def main(): import time im...
DamnWidget/anaconda_go
refs/heads/master
commands/doc.py
2
# Copyright (C) 2016 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details import os import traceback import sublime import sublime_plugin from anaconda_go.lib.plugin import typing from anaconda_go.lib import go, cache, panels from anaconda_go.lib.helpers import g...
wjr1005/p2pool
refs/heads/master
setup.py
30
import os import shutil import sys import zipfile import platform from distutils.core import setup from distutils.sysconfig import get_python_lib import py2exe version = __import__('p2pool').__version__ im64 = '64' in platform.architecture()[0] extra_includes = [] import p2pool.networks extra_includes.extend('p2pool...
liorvh/infernal-twin
refs/heads/master
build/pip/pip/_vendor/progress/__init__.py
916
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software 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 "AS IS" AND THE A...
Vishluck/sympy
refs/heads/master
sympy/combinatorics/named_groups.py
41
from __future__ import print_function, division from sympy.core.compatibility import range from sympy.combinatorics.perm_groups import PermutationGroup from sympy.combinatorics.group_constructs import DirectProduct from sympy.combinatorics.permutations import Permutation _af_new = Permutation._af_new def AbelianGro...
pap/nupic
refs/heads/master
tests/integration/nupic/algorithms/tp_test.py
34
#!/usr/bin/env python # ---------------------------------------------------------------------- # 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 ...
cristianquaglio/odoo
refs/heads/master
addons/crm_helpdesk/report/__init__.py
442
# -*- 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...
roadmapper/ansible
refs/heads/devel
lib/ansible/modules/storage/netapp/na_elementsw_ldap.py
44
#!/usr/bin/python # (c) 2017, NetApp, Inc # 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', 'status': ['preview'], ...
google/material-design-icons
refs/heads/master
update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/V_D_M_X_.py
5
from . import DefaultTable from fontTools.misc import sstruct from fontTools.misc.textTools import safeEval import struct VDMX_HeaderFmt = """ > # big endian version: H # Version number (0 or 1) numRecs: H # Number of VDMX groups present numRatios: H # Number of aspect ratio grou...
mandeepdhami/horizon
refs/heads/master
horizon/test/tests/middleware.py
61
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
trenton3983/Fluent_Python
refs/heads/master
09-pythonic-obj/mem_test.py
7
import importlib import sys import resource NUM_VECTORS = 10**7 if len(sys.argv) == 2: module_name = sys.argv[1].replace('.py', '') module = importlib.import_module(module_name) else: print('Usage: {} <vector-module-to-test>'.format()) sys.exit(1) fmt = 'Selected Vector2d type: {.__name__}.{.__name__...