repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
BehavioralInsightsTeam/edx-platform
refs/heads/release-bit
lms/djangoapps/instructor/views/api_urls.py
11
""" Instructor API endpoint urls. """ from django.conf.urls import url from lms.djangoapps.instructor.views import api, gradebook_api urlpatterns = [ url(r'^students_update_enrollment$', api.students_update_enrollment, name='students_update_enrollment'), url(r'^register_and_enroll_students$', api.register_an...
yize/grunt-tps
refs/heads/master
tasks/lib/python/Lib/python2.7/sqlite3/test/regression.py
36
#-*- coding: iso-8859-1 -*- # pysqlite2/test/regression.py: pysqlite regression tests # # Copyright (C) 2006-2007 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any dama...
apigee/edx-platform
refs/heads/master
scripts/runone.py
52
#!/usr/bin/env python import argparse import os import sys # I want this: # ERROR: test_update_and_fetch (edx-platform.cms.djangoapps.contentstore.tests.test_course_settings.CourseDetailsViewTest) # to become: # test --settings=cms.envs.test --pythonpath=. -s cms/djangoapps/contentstore/tests/test_course_settings...
nsharma283/php-new
refs/heads/master
lib/yaml/reader.py
425
# This module contains abstractions for the input stream. You don't have to # looks further, there are no pretty code. # # We define two classes here. # # Mark(source, line, column) # It's just a record and its only use is producing nice error messages. # Parser does not use it for any other purposes. # # Reader(so...
dstockwell/catapult
refs/heads/master
third_party/graphy/graphy/backends/google_chart_api/util_test.py
33
#!/usr/bin/python2.4 # # Copyright 2008 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...
rruebner/odoo
refs/heads/master
addons/point_of_sale/wizard/pos_confirm.py
343
# -*- 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...
JonathanStein/odoo
refs/heads/8.0
addons/account/wizard/account_automatic_reconcile.py
340
# -*- 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...
davidecaminati/Domotics-Raspberry
refs/heads/master
Installation/Martelli/Adafruit_PWM_Servo_Driver/Adafruit_PWM_Servo_Driver.py
3
#!/usr/bin/python import time import math from Adafruit_I2C import Adafruit_I2C # ============================================================================ # Adafruit PCA9685 16-Channel PWM Servo Driver # ============================================================================ class PWM : i2c = None # Re...
keshr3106/ThinkStats2
refs/heads/master
book/localdef.py
72
import plasTeX.Base as Base def idgen(): """ Generate a unique ID """ i = 1 while 1: yield 'a%.10d' % i i += 1 idgen = idgen() class Eqn(Base.Command): args = 'self' class Anchor(Base.Command): args = 'label:str' def invoke(self, tex): Base.Command.invoke(self, tex) ...
KontorConsulting/odoo
refs/heads/8.0
addons/bus/__init__.py
349
import bus
hayderimran7/zulip
refs/heads/master
analytics/management/commands/analyze_user_activity.py
115
from __future__ import absolute_import from zerver.lib.statistics import seconds_usage_between from optparse import make_option from django.core.management.base import BaseCommand from zerver.models import UserProfile import datetime from django.utils.timezone import utc def analyze_activity(options): day_start ...
OpenAcademy-OpenStack/nova-scheduler
refs/heads/master
nova/api/openstack/compute/contrib/aggregates.py
1
# Copyright (c) 2012 Citrix Systems, 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 ...
ZECTBynmo/notnode-gyp
refs/heads/master
gyp/test/msvs/uldi2010/gyptest-all.py
348
#!/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 uldi can be disabled on a per-project-reference basis in vs2010. """ import TestGyp test = TestGyp.TestGyp(formats=['msv...
deandunbar/bitwave
refs/heads/master
hackathon_version/venv/lib/python2.7/site-packages/django/contrib/auth/urls.py
113
# The views used below are normally mapped in django.contrib.admin.urls.py # This URLs file is used to provide a reliable view deployment for test purposes. # It is also provided as a convenience to those who want to deploy these URLs # elsewhere. from django.conf.urls import patterns, url urlpatterns = patterns('', ...
hbrunn/OpenUpgrade
refs/heads/master
addons/l10n_pt/__init__.py
439
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 Thinkopen Solutions, Lda. All Rights Reserved # http://www.thinkopensolutions.com. # $Id$ # # This program is free software: you can r...
blue236/ardupilot
refs/heads/master
Tools/autotest/jsb_sim/runsim.py
167
#!/usr/bin/env python # run a jsbsim model as a child process import sys, os, pexpect, socket import math, time, select, struct, signal, errno sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'pysim')) import util, atexit, fdpexpect from pymavlink import fgFDM class control_state(o...
shubhdev/edxOnBaadal
refs/heads/master
common/djangoapps/edxmako/management/commands/preprocess_assets.py
100
""" Preprocess templatized asset files, enabling asset authors to use Python/Django inside of Sass and CoffeeScript. This preprocessing will happen before the invocation of the asset compiler (currently handled by the assets paver file). For this to work, assets need to be named with the appropriate template extension...
ESOedX/edx-platform
refs/heads/master
lms/djangoapps/grades/context.py
1
""" Grading Context """ from __future__ import absolute_import from collections import OrderedDict from openedx.core.djangoapps.content.block_structure.api import get_course_in_cache from .course_grade import CourseGrade from .scores import possibly_scored def grading_context_for_course(course): """ Same a...
rahnarsson/ptkj
refs/heads/master
kisa/migrations/0002_auto_20170510_1119.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-10 11:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('kisa', '0001_initial'), ] operations = [ migrations.RemoveField( ...
UXE/local-edx
refs/heads/master
common/test/acceptance/pages/lms/course_info.py
205
""" Course info page. """ from .course_page import CoursePage class CourseInfoPage(CoursePage): """ Course info. """ url_path = "info" def is_browser_on_page(self): return self.q(css='section.updates').present @property def num_updates(self): """ Return the numb...
csrocha/OpenUpgrade
refs/heads/8.0
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...
paran0ids0ul/pupy
refs/heads/master
pupy/packages/windows/x86/psutil/__init__.py
66
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """psutil is a cross-platform library for retrieving information on running processes and system utilization...
jordanemedlock/psychtruths
refs/heads/master
temboo/core/Library/Twilio/Transcriptions/__init__.py
5
from temboo.Library.Twilio.Transcriptions.GetTranscription import GetTranscription, GetTranscriptionInputSet, GetTranscriptionResultSet, GetTranscriptionChoreographyExecution from temboo.Library.Twilio.Transcriptions.ListTranscriptions import ListTranscriptions, ListTranscriptionsInputSet, ListTranscriptionsResultSet, ...
pyconjp/pyconjp-website
refs/heads/develop
localeurlcustom/templatetags/localeurl_tags.py
1
from django import template from django.template import Node, Token, TemplateSyntaxError from django.template import resolve_variable from django.template.defaultfilters import stringfilter from django.templatetags import future from localeurlcustom import utils register = template.Library() def chlocale(url, loca...
MSylvia/CocosSharp
refs/heads/master
ReleaseNotes/GenCSReleaseNotes.py
6
#!/usr/bin/env python # # Author: Rami Tabbara # # CocosSharp # Use GitHub API to find closed issues between releases and generate markdown release notes # import urllib, json, dateutil.parser, os, sys, getopt repo_issues_root_url = "https://api.github.com/repos/mono/CocosSharp/" repo_root_url = repo_issues_root_url +...
NablaWebkom/django-wiki
refs/heads/master
wiki/core/plugins/base.py
2
from __future__ import absolute_import, unicode_literals from django import forms from django.utils.translation import ugettext as _ """Base classes for different plugin objects. * BasePlugin: Create a wiki_plugin.py with a class that inherits from BasePlugin. * PluginSidebarFormMixin: Mix in this class in the fo...
elsonidoq/py-l1tf
refs/heads/master
l1tf/__init__.py
1
from .pandas_wrapper import l1tf, remove_outliers, df_l1tf
homeslike/OpticalTweezer
refs/heads/master
scripts/p0.1_at0.05/vCOMhist.py
28
import numpy as np import matplotlib.pyplot as plt import matplotlib.mlab as mlab import sys # import vCOMdata.dat as array # folder="../output/runs/170123_2033/" folder="../output/runs/"+str(sys.argv[1]) # when = str(sys.argv[1]) for i in range(0,len(sys.argv)): print(str(i) + ": "+ str(sys.argv[i])) # data = np....
weinbe58/QuSpin
refs/heads/master
tests/project_to_test.py
1
from __future__ import print_function, division import sys,os quspin_path = os.path.join(os.getcwd(),"../") sys.path.insert(0,quspin_path) from quspin.operators import hamiltonian from quspin.basis import spin_basis_general import numpy as np import scipy.sparse as sp from numpy.linalg import norm from numpy.random i...
lipis/hurry-app
refs/heads/master
main/admin.py
2
# -*- coding: utf-8 -*- from flask.ext import wtf from google.appengine.api import app_identity import flask import auth import util import model import config from main import app class ConfigUpdateForm(wtf.Form): analytics_id = wtf.StringField('Analytics ID', filters=[util.strip_filter]) announcement_html = ...
CianciuStyles/project-euler
refs/heads/master
063.py
1
import math def main(): counter = 0 for power in range(1, 25): for i in range(1, 100): n = i ** power if len(str(n)) == power: print(str(i) + " ** " + str(power) + " = " + str(n)) counter += 1 print(counter) if __name__ == '__main__': main()
kumarshivam675/Mobile10X-Hack
refs/heads/master
yowsup/layers/protocol_profiles/protocolentities/test_iq_unregister.py
70
from yowsup.layers.protocol_iq.protocolentities.test_iq import IqProtocolEntityTest from yowsup.layers.protocol_profiles.protocolentities import UnregisterIqProtocolEntity from yowsup.structs import ProtocolTreeNode class UnregisterIqProtocolEntityTest(IqProtocolEntityTest): def setUp(self): super(Unregist...
abhishek-ch/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/null_fk_ordering/tests.py
150
from __future__ import absolute_import from django.test import TestCase from .models import Author, Article, SystemInfo, Forum, Post, Comment class NullFkOrderingTests(TestCase): def test_ordering_across_null_fk(self): """ Regression test for #7512 ordering across nullable Foreign Keys...
djphan/c410-Repo
refs/heads/master
c410-Lab4_5_Flask/env-lab4/lib/python2.7/site-packages/flask/testsuite/test_apps/blueprintapp/apps/admin/__init__.py
794
from flask import Blueprint, render_template admin = Blueprint('admin', __name__, url_prefix='/admin', template_folder='templates', static_folder='static') @admin.route('/') def index(): return render_template('admin/index.html') @admin.route('/index2') def index2(): ret...
Onager/plaso
refs/heads/master
plaso/formatters/winprefetch.py
4
# -*- coding: utf-8 -*- """Windows Prefetch custom event formatter helpers.""" from plaso.formatters import interface from plaso.formatters import manager class WindowsPrefetchPathHintsFormatterHelper( interface.CustomEventFormatterHelper): """Windows Prefetch path hints formatter helper.""" IDENTIFIER = 'w...
brchiu/tensorflow
refs/heads/master
tensorflow/examples/adding_an_op/zero_out_grad_2.py
183
# 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...
ptisserand/portage
refs/heads/master
pym/portage/emaint/defaults.py
15
# Copyright 2005-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # parser option data CHECK = {"short": "-c", "long": "--check", "help": "Check for problems (a default option for most modules)", 'status': "Checking %s for problems", 'action': 'store_true', 'func': 'check' ...
GheRivero/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_snapshot_policy.py
80
#!/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) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
patricklaw/pip
refs/heads/develop
pip/_vendor/certifi/core.py
139
#!/usr/bin/env python # -*- coding: utf-8 -*- """ certifi.py ~~~~~~~~~~ This module returns the installation location of cacert.pem. """ import os def where(): f = os.path.split(__file__)[0] return os.path.join(f, 'cacert.pem') if __name__ == '__main__': print(where())
ltilve/chromium
refs/heads/igalia-sidebar
tools/telemetry/telemetry/core/platform/mac_platform_backend.py
9
# 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. import ctypes import os import platform import sys import time from telemetry.core.platform import platform_backend from telemetry.core.platform import posi...
babycaseny/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-sampler.lv2/waflib/Tools/python.py
177
#! /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 os,sys from waflib import Utils,Options,Errors,Logs from waflib.TaskGen import extension,before_method,after_method,feature from waflib.Configure import conf FRAG=''' #...
jtattermusch/grpc
refs/heads/master
src/python/grpcio_tests/tests/fork/client.py
13
# Copyright 2018 gRPC 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 applicable law or agreed to in writing...
salguarnieri/intellij-community
refs/heads/master
python/testData/refactoring/changeSignature/keywordParam.after.py
83
def func(a, b): pass func(a=1, b=2)
QualiSystems/Azure-Shell
refs/heads/develop
package/tests/test_cp/test_azure/test_domain/test_services/test_tags.py
1
from unittest import TestCase from cloudshell.cp.azure.domain.services.tags import TagService class TestTagService(TestCase): def setUp(self): self.tags_service = TagService() def test_try_find_tag_list_is_none(self): tags_list = None tag_key = "SomeKey" tag_value = self.tags...
RoAbreu/AulaJavaScripts
refs/heads/master
PROJETO/backend/appengine/apps/permission_app/__init__.py
599
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals
SabrinaMasterson/Maya-Object-Generator
refs/heads/master
Desktop/Maya_Scripts/All Polygons.py
1
import maya.cmds as cmds import Torus import Sphere import Pyramid import Pipe import Cylinder import Cube import Cone PolyCubes() PolyCones() PolySpheres() PolyCylinders() PolyToruses() PolyPyramids() PolyPipes()
EasyLinux/Openchange
refs/heads/master
mapiproxy/services/ocsmanager/ocsmanager/model/NotificationModel.py
7
from pylons import config from lxml import etree from ocsmanager.lib.utils import validateDocXML import re class NotificationModel: def getNewMailParams(self, payload): """Retrieve newmail parameters.""" (error, xmlData) = validateDocXML(payload) if error is True: return (error, xmlData) ...
rosmo/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_aaa_server_host.py
49
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
VisheshHanda/production_backup
refs/heads/master
erpnext/stock/doctype/warehouse/test_warehouse.py
22
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals from frappe.model.rename_doc import rename_doc from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry from frappe.utils import ...
blancltd/django-glitter
refs/heads/master
glitter/blocks/related_pages/tests.py
2
from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import get_callable from django.test import TestCase from django.test.client import RequestFactory from django.test import modify_settings from glitter.models import Version, ContentBloc...
rcarrillocruz/ansible
refs/heads/devel
lib/ansible/plugins/callback/slack.py
18
# (C) 2014-2015, Matt Martz <matt@sivel.net> # 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...
ramitalat/odoo
refs/heads/8.0
addons/email_template/email_template.py
196
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Sharoon Thomas # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it ...
jh23453/privacyidea
refs/heads/master
migrations/env.py
3
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
maniero/SOpt
refs/heads/master
Python/Algorithm/Greatest.py
2
maior = 0 quantos = 0 while True: valor = int(input()) if valor < 1: break if valor > maior: maior = valor quantos = 1 elif valor == maior: quantos += 1 print('X =', maior, 'quantos = ', quantos) #https://pt.stackoverflow.com/q/448608/101
40223231/Final-Exam-with-classmate
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/signals.py
1016
import signal import weakref from functools import wraps __unittest = True class _InterruptHandler(object): def __init__(self, default_handler): self.called = False self.original_handler = default_handler if isinstance(default_handler, int): if default_handler == signal.SIG_D...
lakshayg/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/sinh_arcsinh.py
14
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
ddamiani/pyqtgraph
refs/heads/develop
examples/exampleLoaderTemplate_pyside.py
20
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'exampleLoaderTemplate.ui' # # Created: Sat Feb 28 10:31:57 2015 # by: pyside-uic 0.2.15 running on PySide 1.2.1 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_Form(object): def s...
eharney/nova
refs/heads/master
nova/virt/vmwareapi/ds_util.py
11
# Copyright (c) 2014 VMware, 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 or a...
rickerc/heat_audit
refs/heads/cis-havana-staging
heat/engine/properties.py
4
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
sadaf2605/django
refs/heads/master
tests/template_backends/test_django.py
55
from template_tests.test_response import test_processor_name from django.template import EngineHandler from django.template.backends.django import DjangoTemplates from django.template.library import InvalidTemplateLibrary from django.test import RequestFactory, override_settings from .test_dummy import TemplateString...
wd5/jangr
refs/heads/master
django/utils/datastructures.py
239
from types import GeneratorType from django.utils.copycompat import copy, deepcopy class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more than one of the given d...
ilpise/geonode
refs/heads/master
geonode/contrib/geosites/tests.py
22
import json from tastypie.test import ResourceTestCase from django.test.utils import override_settings from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from guardian.shortcuts import get_anonymous_user from guardian.shortcuts import remove_perm from geonode.base.populate_test...
yashodhank/erpnext
refs/heads/develop
erpnext/stock/page/__init__.py
37694
from __future__ import unicode_literals
Star2Billing/newfies-dialer
refs/heads/develop
newfies/apirest/sms_campaign_serializers.py
4
# -*- coding: utf-8 -*- # # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyright (C) 2011-2015 Star2Bi...
NaturalGIS/naturalgis_qgis
refs/heads/master
python/plugins/processing/algs/gdal/GdalUtils.py
2
# -*- coding: utf-8 -*- """ *************************************************************************** GdalUtils.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *****************************...
carragom/modoboa
refs/heads/master
modoboa/core/management/commands/generate_postfix_maps.py
1
"""Management command to generate/update postfix map files.""" import copy import hashlib import os import sys from django.conf import settings from django.core.management.base import BaseCommand from django.template import Context, Template from django.utils import timezone import dj_database_url from ... import s...
garrettjonesgoogle/api-client-staging
refs/heads/master
generated/python/gapic-google-cloud-vision-v1/google/cloud/gapic/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
mlaitinen/odoo
refs/heads/8.0
addons/portal_stock/__init__.py
971
# -*- 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...
digiwhite/rockycoin
refs/heads/master
contrib/qt_translations.py
4110
#!/usr/bin/env python # Helpful little script that spits out a comma-separated list of # language codes for Qt icons that should be included # in binary bitcoin distributions import glob import os import re import sys if len(sys.argv) != 3: sys.exit("Usage: %s $QTDIR/translations $BITCOINDIR/src/qt/locale"%sys.arg...
ramnes/qtile
refs/heads/master
test/widgets/test_idlerpg.py
2
# Copyright (c) 2021 elParaguayo # # 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, modify, merge, publish, distrib...
davidmam/pyMSA
refs/heads/master
pyMSA/plots.py
3
# Copyright (c) 2012 - N.P. de Klein # # This file is part of Python Mass Spec Analyzer (PyMSA). # # Python Mass Spec Analyzer (PyMSA) 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...
AloneRoad/Inforlearn
refs/heads/1.0-rc3
vendor/elementtree/TidyHTMLTreeBuilder.py
21
# # ElementTree # $Id: TidyHTMLTreeBuilder.py 3265 2007-09-06 20:42:00Z fredrik $ # from elementtidy.TidyHTMLTreeBuilder import *
must-/OpenBazaar
refs/heads/master
node/guid.py
20
""" A module to deal with identity management. """ class GUIDMixin(object): """ An interface for a GUID. Any class that is meant to be used as a GUID should inherit this one. """ def __init__(self, guid): self.guid = guid def __eq__(self, other): if isinstance(other, self...
mdwhatcott/pyspecs
refs/heads/main
tests/test_step_factory.py
1
from unittest import TestCase from mock import Mock from pyspecs._step import Step from pyspecs._step import StepFactory class StepFactoryTest(TestCase): def setUp(self): self.registry = Mock() def test_any_attribute_creates_a_new_step(self): kind = 'example' factory = StepFactory(ki...
computersalat/ansible
refs/heads/devel
test/integration/targets/module_precedence/roles_with_extension/foo/library/ping.py
105
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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...
sukwon0709/equip
refs/heads/master
examples/sample-test-program/test_module/mistune.py
2
# coding: utf-8 """ mistune ~~~~~~~ The fastest markdown parser in pure Python with renderer feature. :copyright: (c) 2014 by Hsiaoming Yang. """ import re import inspect __version__ = '0.4.1' __author__ = 'Hsiaoming Yang <me@lepture.com>' __all__ = [ 'BlockGrammar', 'BlockLexer', 'InlineGra...
borisroman/vdsm
refs/heads/master
tests/v2vTests.py
1
# Copyright 2014 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the ...
code-for-india/sahana_shelter_worldbank
refs/heads/hackathon
modules/s3/s3codecs/shp.py
5
# -*- coding: utf-8 -*- """ S3 Shapefile codec @copyright: 2013 (c) Sahana Software Foundation @license: MIT 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 r...
fkie-cad/iva
refs/heads/master
tests/test_local_repositories/test_cve_search.py
1
import unittest from tests.mock_config import * from local_repositories.cve_search import CVE_SEARCH_CPE_COLLECTION, CVE_SEARCH_CVE_COLLECTION from pymongo import MongoClient class TestCVESearchDB(unittest.TestCase): def setUp(self): self.create_mongodb_client() self.create_collections() ...
mibanescu/pulp_win
refs/heads/master
plugins/pulp_win/plugins/migrations/0003_msm_add_module_dependency.py
1
import logging from pulp.server.db import connection from pulp_win.plugins.db.models import MSM _logger = logging.getLogger(__name__) def migrate(*args, **kwargs): """ Add a ModuleDependency property. The property is extracted from running msiinfo on the msm file. """ collection = connection.ge...
jorik041/clusterd
refs/heads/master
src/platform/jboss/fingerprints/JBossRMI.py
8
from src.platform.jboss.interfaces import JINTERFACES from cprint import FingerPrint from log import LOG import state import utility import socket class FPrint(FingerPrint): def __init__(self): self.platform = "jboss" self.version = "Any" self.title = JINTERFACES.RMI self.uri = No...
stephenpascoe/luigi
refs/heads/master
sitecustomize.py
56
import os import sys def patch_process_for_coverage(): # patch multiprocessing module to get coverage # https://bitbucket.org/ned/coveragepy/issue/117/enable-coverage-measurement-of-code-run-by from coverage.collector import Collector from coverage import coverage import multiprocessing # dete...
anhstudios/swganh
refs/heads/develop
data/scripts/templates/object/ship/shared_hutt_transport_tier2.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Ship() result.template = "object/ship/shared_hutt_transport_tier2.iff" result.attribute_template_id = -1 result....
gminds/rapidnewsng
refs/heads/master
django/db/models/query.py
63
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import itertools import sys import warnings from django.core import exceptions from django.db import connections, router, transaction, IntegrityError from django.db.models.constants import LOOKUP_SEP from django.db.models....
mbr0wn/gnuradio
refs/heads/master
gr-trellis/docs/test_viterbi_equalization1.py
6
#!/usr/bin/env python from gnuradio import gr from gnuradio import audio from gnuradio import trellis, digital, filter, blocks from gnuradio import eng_notation import math import sys import random import fsm_utils try: from gnuradio import analog except ImportError: sys.stderr.write("Error: Program requires ...
kklt92/NetworkingCodeExamples
refs/heads/master
PacketProcessing/UdpOneToMany/runtime/build.py
1
#!/usr/bin/python import os import sys import getpass import subprocess try: from fabricate import * except ImportError, e: print "Couldn't find the fabricate module." sys.exit(1) MAXOSDIR = os.environ['MAXELEROSDIR'] MAXCOMPILERDIR = os.environ['MAXCOMPILERDIR'] DFE_MODEL = 'ISCA' MAXFILE = 'UdpOneToMany.max' D...
wichovw/tca-gt
refs/heads/master
server/tca/cellaut.py
1
# Based on cage v1.1.4 # http://www.alcyone.com/software/cage/ # Copyright (C) 2002-2006 Erik Max Francis <max@alcyone.com> # GPL License class Topology: """Encaptulation of the shape and dimentionality of a cellular automata""" def get(self, address): raise NotImplementedError def se...
liberorbis/libernext
refs/heads/master
env/lib/python2.7/site-packages/amqp/connection.py
20
"""AMQP Connections""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) ...
connoryork/blackjack-bot
refs/heads/master
user.py
1
""" Project Name: blackjack-bot File Name: user.py Author: Connor York (cxy1054@rit.edu) Updated: 7/20/16 Discord is a voice and chat app for gamers created by Hammer & Chisel, a startup based in Burlingame, CA. More information on Discord and Hammer & Chisel can be found through the following links: https://disco...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/sqlparse/engine/grouping.py
32
# -*- coding: utf-8 -*- import itertools from sqlparse import sql from sqlparse import tokens as T try: next except NameError: # Python < 2.6 next = lambda i: i.next() def _group_left_right(tlist, ttype, value, cls, check_right=lambda t: True, check_left=lambda ...
q40223241/2015cdb_g3_40223241
refs/heads/master
cadb_g3_0420-master/static/Brython3.1.1-20150328-091302/Lib/copyreg.py
749
"""Helper to provide extensibility for pickle. This is only useful to add pickle support for extension types defined in C, not for instances of user-defined classes. """ __all__ = ["pickle", "constructor", "add_extension", "remove_extension", "clear_extension_cache"] dispatch_table = {} def pickle(ob_typ...
Mitali-Sodhi/CodeLingo
refs/heads/master
Dataset/python/exceptions.py
374
# urllib3/exceptions.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php ## Base Exceptions class HTTPError(Exception): "Base exception used by this module." ...
ivanalejandro0/leap_pycommon
refs/heads/develop
src/leap/common/testing/basetest.py
1
# -*- coding: utf-8 -*- # basetest.py # Copyright (C) 2013 LEAP # # 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. # # Th...
Tommy-Geenexus/android_kernel_sony_msm8994_suzuran_6.0.x
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# 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...
stencila/hub
refs/heads/master
manager/accounts/tasks.py
1
from celery import shared_task from accounts.models import Account @shared_task def set_image_from_url(account_id: int, url: str): """ Set the image of an account from a URL. """ account = Account.objects.get(id=account_id) account.set_image_from_url(url) @shared_task def set_image_from_sociala...
toooonyy/shadowsocks
refs/heads/master
shadowsocks/common.py
945
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
egafford/sahara
refs/heads/master
sahara/db/__init__.py
19
# Copyright (c) 2013 Mirantis 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 or agreed to in writ...
SolusOS-discontinued/pisi
refs/heads/master
pisi/constants.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2005 - 2010, TUBITAK/UEKAE # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. #...
holixsure/emacs
refs/heads/master
elpa/elpy-20180820.2219/elpy/tests/test_yapf.py
6
# coding: utf-8 """Tests for the elpy.yapf module""" import unittest import os from elpy import yapfutil from elpy.rpc import Fault from elpy.tests.support import BackendTestCase @unittest.skipIf(yapfutil.YAPF_NOT_SUPPORTED, 'yapf not supported for current python version') class YAPFTestCase(Backen...
tmenjo/cinder-2015.1.1
refs/heads/master
cinder/volume/drivers/windows/remotefs.py
4
# Copyright 2014 Cloudbase Solutions Srl # # 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 ...