repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
mgadi/naemonbox
refs/heads/master
sources/psdash/gevent-1.0.1/gevent/select.py
11
# Copyright (c) 2009-2011 Denis Bilenko. See LICENSE for details. from __future__ import absolute_import import sys from gevent.event import Event from gevent.hub import get_hub __implements__ = ['select'] __all__ = ['error'] + __implements__ import select as __select__ error = __select__.error def get_fileno(obj):...
sosterwalder/bti7501p
refs/heads/master
test.py
1
#!/usr/bin/env python # test.py module # # The MIT License (MIT) # # Copyright (c) 2014 Thi Thuy-Duc Dao (daodt1@bfh.ch), Sven Osterwalder (ostes2@bfh.ch) # # 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...
yanheven/nova
refs/heads/master
nova/scheduler/filters/extra_specs_ops.py
11
# Copyright (c) 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 ...
T3chn3/HFP
refs/heads/master
list_proc/setup.py
1
#contains metadata for your distutils from distutils.core import setup setup( #setup used to assign metadata fields name = 'list_proc' version = '1.0.0' py_modules = ['list_proc'] author = 'jbihms' author_email = 'myemail@yahoo.com' ) #python3 setup.py sdist to build distro #install distro"sudo python3 setup.py ins...
cjaymes/pyscap
refs/heads/master
src/scap/model/xal_2_0/__init__.py
1
# Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP 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. # # PySCAP is ...
SFL-Kepler-Seminar/sciencequiz
refs/heads/master
sciencequiz.py
1
from flask import Flask, render_template, request, redirect, abort, send_from_directory, url_for from flask_socketio import SocketIO, emit, join_room, leave_room from flask_sqlalchemy import SQLAlchemy from beaker.middleware import SessionMiddleware import uuid import time import os import traceback # TODO!!!: Error h...
apigee/edx-configuration
refs/heads/master
fabfile/git.py
3
import itertools import os import re import socket from functools import partial from fabric.api import task, sudo, runs_once, execute from fabric.api import cd, env, abort, parallel, prefix from fabric.colors import white, green, red from fabric.contrib import console, files from fabric.operations import put from fab...
austinhartzheim/gravel
refs/heads/master
api/admin.py
13848
from django.contrib import admin # Register your models here.
nin042/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/builders.py
118
# Copyright (C) 2011 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 ...
zhangzhishan/thefuck
refs/heads/master
thefuck/rules/history.py
9
from difflib import get_close_matches from thefuck.shells import get_history, thefuck_alias from thefuck.utils import get_closest, memoize, get_all_executables def _not_corrected(history, tf_alias): """Returns all lines from history except that comes before `fuck`.""" previous = None for line in history: ...
hogarthj/ansible
refs/heads/devel
lib/ansible/module_utils/k8s/lookup.py
15
# # Copyright 2018 Red Hat | Ansible # # 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. # # ...
saeki-masaki/cinder
refs/heads/master
cinder/volume/drivers/netapp/dataontap/client/client_7mode.py
2
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. 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://w...
mattbernst/polyhartree
refs/heads/master
support/ansible/runner/lookup_plugins/sequence.py
52
# (c) 2013, Jayson Vantuyl <jayson@aggressive.ly> # # 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 v...
amberlallen/qipr_approver
refs/heads/master
qipr_approver/approver/views/dashboard.py
1
from django.shortcuts import render from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_protect from approver.forms import AboutYouForm, ProjectForm from django.contrib.auth.models import User from approver.models import Person from approver.models import Project from approver.wo...
petteyg/intellij-community
refs/heads/master
python/testData/resolve/multiFile/directoryVsClass/foo/context.py
83
class Context(object): pass
DFEC-R2D2/r2d2
refs/heads/master
pygecko/states/emotions.py
2
import time from random import randint # from library import Trigger, Axis # from library import PS4 from library import Joystick import RPi.GPIO as GPIO # remove!!! # Leg Motor Speed Global global_LegMotor = 70 # Happy Emotion def happy(leds, servos, mc, audio): print("4") print("Happy") audio.sound('music') ...
IllusionRom-deprecated/android_platform_tools_idea
refs/heads/master
python/testData/inspections/PyProtectedMemberInspection/trueNegative.py
83
__author__ = 'ktisha' class A: def __init__(self): self._a = 1 def foo(self): self.b= 1 class B(A): def __init__(self): A.__init__(self) self.b = self._a
wangjeaf/CSSCheckStyle
refs/heads/master
tests/unit/hacks/HackRuleSets.py
1
from helper import * def doTest(): equal(doRuleSetDetect('* html .test'), IE6, '* html') equal(doRuleSetDetect('* + html .test'), IE7, '* + html') equal(doRuleSetDetect('*:first-child+html .test'), IE7, '*:first-child+html .test') equal(doRuleSetDetect('html > body .test'), IE7 | IE8 | IE9PLUS, 'html > body') equ...
B-MOOC/edx-platform
refs/heads/master
common/djangoapps/student/migrations/0007_convert_to_utf8.py
188
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): if db.backend_name == 'mysql': db.execute_many(""" ALTER DATABASE CHARACTER SET utf8 COLLATE utf8_...
javierTerry/odoo
refs/heads/8.0
addons/procurement/wizard/schedulers_all.py
306
# -*- 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...
YuepengGuo/backtrader
refs/heads/master
backtrader/utils/date.py
4
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
cfei18/incubator-airflow
refs/heads/master
tests/lineage/backend/test_atlas.py
21
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
danieljaouen/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_snmp_location.py
106
#!/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...
supriyantomaftuh/django
refs/heads/master
tests/postgres_tests/test_unaccent.py
328
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import modify_settings from . import PostgreSQLTestCase from .models import CharFieldModel, TextFieldModel @modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'}) class UnaccentTest(PostgreSQLTestCase): Model = Char...
HSDL/HeuristicBursts
refs/heads/master
tests/Solution Quality Analysis/Simulation_50Low_50High_with_qualities.py
1
import heuristic_bursts.agent import heuristic_bursts.team import heuristic_bursts.options options = heuristic_bursts.options.Options() for sim_num in range(0, 20): # Instantiate team team = heuristic_bursts.team.Team(options) # Set team tier preferences for agent in team.agent_list: agent.ti...
creativcoder/servo
refs/heads/master
tests/wpt/web-platform-tests/mathml/tools/xHeight.py
101
#!/usr/bin/python from utils import mathfont import fontforge v = mathfont.em / 2 f = mathfont.create("xheight%d" % v) g = f.createChar(ord('x')) mathfont.drawRectangleGlyph(g, mathfont.em, v, 0) assert f.xHeight == v, "Bad x-height value!" mathfont.save(f)
marcoantoniooliveira/labweb
refs/heads/master
oscar/lib/python2.7/site-packages/django/contrib/gis/geos/tests/test_io.py
105
from __future__ import unicode_literals import binascii import unittest from django.contrib.gis import memoryview from django.utils.unittest import skipUnless from ..import HAS_GEOS if HAS_GEOS: from .. import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter, geos_version_info @skipUnless(HAS_GEOS, "G...
googleinterns/server-side-identity
refs/heads/master
tests/__init__.py
4
# Copyright 2016 Google LLC # Modifications: Copyright 2020 Google LLC # # 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 ...
odoo-turkiye/odoo
refs/heads/8.0
addons/hr_recruitment/wizard/hr_recruitment_create_partner_job.py
337
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
WoLpH/CouchPotatoServer
refs/heads/master
libs/elixir/statements.py
31
import sys MUTATORS = '__elixir_mutators__' class ClassMutator(object): ''' DSL-style syntax A ``ClassMutator`` object represents a DSL term. ''' def __init__(self, handler): ''' Create a new ClassMutator, using the `handler` callable to process it when the time will come...
SIgnlngX/sign-language-interpreter
refs/heads/master
ML/Minor/predict.py
1
import os import numpy as np import cv2 from sklearn.externals import joblib from image_transformation import apply_image_transformation clf= joblib.load('./modules/model-serialized-logistic.pkl') os.chdir('./snapshots/') l=os.listdir('.') l=sorted(l) str=[] print("Prediction: ") for i in l: frame= cv2.imread(i) ...
simonwydooghe/ansible
refs/heads/devel
test/units/modules/network/apconos/apconos_module.py
18
# (c) 2019 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gaopeiliang/aiodocker
refs/heads/master
tests/test_containers.py
2
import asyncio import pytest from aiodocker.exceptions import DockerError, DockerContainerError async def _validate_hello(container): try: await container.start() response = await container.wait() assert response["StatusCode"] == 0 logs = await container.log(stdout=True) a...
traveloka/ansible
refs/heads/devel
lib/ansible/plugins/action/ops_config.py
518
# # Copyright 2015 Peter Sprygada <psprygada@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 # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
hpi-xnor/BMXNet
refs/heads/master
tests/python/unittest/test_gluon_data.py
11
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
webjunkie/python-social-auth
refs/heads/master
social/backends/gae.py
89
""" Google App Engine support using User API """ from __future__ import absolute_import from google.appengine.api import users from social.backends.base import BaseAuth from social.exceptions import AuthException class GoogleAppEngineAuth(BaseAuth): """GoogleAppengine authentication backend""" name = 'googl...
yahoo/CaffeOnSpark
refs/heads/master
caffe-grid/pkr.py
2
#!/usr/bin/env python """ Given an strace output of a program, this file copies all of the Shared library and Python libraries that the program depends on into the $CWD/lib directory. E.g. strace -o straceoutput.txt -e trace=open -f java ... """ import re import os import sys import shutil def extract_opened_file(l...
orekyuu/intellij-community
refs/heads/master
python/testData/inspections/PyProtectedMemberInspection/fromImport.py
80
from tmp import <weak_warning descr="Access to a protected member _CONSTANT of a class">_CONSTANT</weak_warning>
2014cdag9/2014cdag9
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/Lib/test/pystone.py
718
#! /usr/bin/python3.3 """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness ha...
hmoco/osf.io
refs/heads/develop
api/base/wsgi.py
22
""" WSGI config for api project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ from website import settings from api.base import settings as api_settings if not settings.DEBUG_MODE...
bala4901/odoo
refs/heads/master
addons/web/tests/__init__.py
378
# -*- coding: utf-8 -*- import test_js import test_menu import test_serving_base
uannight/reposan
refs/heads/master
plugin.video.tvalacarta/lib/youtube_dl/extractor/threeqsdn.py
76
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, js_to_json, mimetype2ext, ) class ThreeQSDNIE(InfoExtractor): IE_NAME = '3qsdn' IE_DESC = '3Q SDN' _VALID_URL = r'https?://playout\.3qsdn\.com/(?P<id>[\da-f]{8}-[\da-f]{4}...
michael-dev2rights/ansible
refs/heads/ansible-d2r
lib/ansible/modules/cloud/rackspace/rax_mon_alarm.py
29
#!/usr/bin/python # 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', 'status': ['preview'], ...
tesb/flask-crystal
refs/heads/master
venv/Lib/site-packages/werkzeug/contrib/jsrouting.py
513
# -*- coding: utf-8 -*- """ werkzeug.contrib.jsrouting ~~~~~~~~~~~~~~~~~~~~~~~~~~ Addon module that allows to create a JavaScript function from a map that generates rules. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ ...
ZangeTsune/ReusQuest
refs/heads/master
game/utils/__init__.py
1
__author__ = 'Zange & Keiishi' __all__=['ItemEscenaContainer', 'GlobalParams', 'Utils'] from ItemEscenaContainer import ItemEscenaContainer from GlobalParams import GlobalParams from Utils import Utils
ken0-1n/mutation_util
refs/heads/master
mutation_util/version.py
1
#! /usr/bin/env python __version__ = '0.6.0'
labcodes/django
refs/heads/master
django/contrib/postgres/apps.py
15
from django.apps import AppConfig from django.db import connections from django.db.backends.signals import connection_created from django.db.models import CharField, TextField from django.utils.translation import gettext_lazy as _ from .lookups import SearchLookup, TrigramSimilar, Unaccent from .signals import registe...
HumanBrainProject/neuroglancer-scripts
refs/heads/master
unit_tests/test_precomputed_io.py
1
# Copyright (c) 2018 CEA # Author: Yann Leprince <yann.leprince@cea.fr> # # This software is made available under the MIT licence, see LICENCE.txt. import numpy as np import pytest from neuroglancer_scripts.accessor import get_accessor_for_url from neuroglancer_scripts.chunk_encoding import InvalidInfoError from neur...
bac/horizon
refs/heads/master
openstack_dashboard/test/integration_tests/video_recorder.py
6
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
kennethreitz/pipenv
refs/heads/master
pipenv/patched/notpip/_internal/utils/unpacking.py
1
"""Utilities related archives. """ # The following comment should be removed at some point in the future. # mypy: strict-optional=False # mypy: disallow-untyped-defs=False from __future__ import absolute_import import logging import os import shutil import stat import tarfile import zipfile from pipenv.patched.notp...
pschmitt/home-assistant
refs/heads/dev
homeassistant/components/brunt/__init__.py
36
"""The brunt component."""
xadahiya/django
refs/heads/master
tests/template_tests/test_smartif.py
580
import unittest from django.template.smartif import IfParser class SmartIfTests(unittest.TestCase): def assertCalcEqual(self, expected, tokens): self.assertEqual(expected, IfParser(tokens).parse().eval({})) # We only test things here that are difficult to test elsewhere # Many other tests are f...
ltiao/networkx
refs/heads/master
networkx/algorithms/bipartite/tests/test_redundancy.py
59
# test_redundancy.py - unit tests for the bipartite.redundancy module # # Copyright 2015 Jeffrey Finkelstein <jeffrey.finkelstein@gmail.com>. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for more # information. """Unit tests for the :mod:`networkx.algorithms.bipart...
sthzg/django-chatterbox
refs/heads/active_development
chatterbox/south_migrations/0006_auto__del_field_message_languages__add_field_message_language.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Message.languages' db.delete_column(u'chatterbox_messag...
qedsoftware/commcare-hq
refs/heads/master
corehq/apps/data_analytics/esaccessors.py
1
import datetime from corehq.apps.es.aggregations import AggregationTerm, NestedTermAggregationsHelper, TermsAggregation from corehq.apps.es.forms import FormES from corehq.apps.es.sms import SMSES from corehq.apps.hqadmin.reporting.reports import ( get_mobile_users ) from corehq.apps.data_analytics.const import DE...
lukeweber/gyp-override
refs/heads/master
test/compiler-override/my_cxx.py
980
#!/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. import sys print sys.argv
WebShark025/ZigZag-v2
refs/heads/master
plugins/start.py
1
def start(message): print "hi" class plstart: patterns=[]
DARKPOP/external_chromium_org
refs/heads/dark-5.1
third_party/cython/src/Cython/Compiler/MemoryView.py
95
from Errors import CompileError, error import ExprNodes from ExprNodes import IntNode, NameNode, AttributeNode import Options from Code import UtilityCode, TempitaUtilityCode from UtilityCode import CythonUtilityCode import Buffer import PyrexTypes import ModuleNode START_ERR = "Start must not be given." STOP_ERR = "A...
0atman/flask-admin
refs/heads/master
flask_admin/tests/sqlamodel/test_inlineform.py
2
# -*- coding: utf-8 -*- from nose.tools import eq_, ok_, raises from flask.ext import wtf from flask.ext.admin.contrib.sqlamodel import ModelView, fields from . import setup def test_inline_form(): app, db, admin = setup() client = app.test_client() # Set up models and database class User(db.Model):...
andrei4ka/fuel-web-redhat
refs/heads/master
fuel_upgrade_system/fuel_upgrade/fuel_upgrade/tests/test_docker_upgrader.py
3
# -*- coding: utf-8 -*- # Copyright 2014 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 requi...
jasonseminara/OpenSourceFinal
refs/heads/master
myvenv/lib/python3.5/site-packages/django/core/management/commands/migrate.py
118
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time import warnings from collections import OrderedDict from importlib import import_module from django.apps import apps from django.core.management import call_command from django.core.management.base import BaseCommand, CommandError from django...
RedHatInsights/insights-core
refs/heads/master
insights/parsers/rhn_entitlement_cert_xml.py
1
from .. import XMLParser, parser from insights.specs import Specs @parser(Specs.rhn_entitlement_cert_xml) class RHNCertConf(XMLParser): """Class to parse the xml files ``rhn-entitlement-cert.xml*`` Attributes: data (dict): A dict likes { 'product': 'RHN-SATELLITE-001' ...
Nashenas88/servo
refs/heads/master
tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/subresource/mozresource.py
63
import os, sys, json, urlparse, urllib def get_template(template_basename): script_directory = os.path.dirname(os.path.abspath(__file__)) template_directory = os.path.abspath(os.path.join(script_directory, "..", ...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py
2
import _plotly_utils.basevalidators class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scatterpolargl.marker.colorbar", **kwargs ): super(TickformatstopsValidator, self).__...
alexstachnik/block-wiedemann-example
refs/heads/master
Modular.py
1
import random import Algorithms #Represents GF(p) for prime p class Modular: def __init__(self,q): self.q=q def add(self,lhs,rhs): return (lhs+rhs)%self.q def neg(self,x): return self.q-x def sub(self,lhs,rhs): return (self.q+lhs-rhs)%self.q def mul(self,lhs,rhs)...
japeto/Vigtech-Services
refs/heads/master
env/lib/python2.7/site-packages/django/db/backends/base/base.py
103
import time import warnings from collections import deque from contextlib import contextmanager from django.conf import settings from django.db import DEFAULT_DB_ALIAS from django.db.backends import utils from django.db.backends.signals import connection_created from django.db.transaction import TransactionManagementE...
marty331/jakesclock
refs/heads/master
flask/lib/python2.7/site-packages/pyglet/window/key.py
22
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributi...
Sancus/bedrock
refs/heads/master
lib/l10n_utils/tests/__init__.py
10
import os import sys from contextlib import contextmanager from cStringIO import StringIO from tempfile import TemporaryFile from textwrap import dedent from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings from django_jinja.backend import Jinja...
deflaux/spark-examples
refs/heads/master
src/main/python/variants_pca.py
3
# spark-submit --jars googlegenomics-spark-examples-assembly-1.0.jar \ # --driver-class-path googlegenomics-spark-examples-assembly-1.0.jar \ # src/main/python/variants_pca.py --client-secrets client_secrets.json import json import numpy import operator import sys import pyspark from pyspark import serializers...
Deepakkothandan/ansible
refs/heads/devel
contrib/inventory/apstra_aos.py
14
#!/usr/bin/env python # # (c) 2017 Apstra Inc, <community@apstra.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...
PrasithL/python_scripts
refs/heads/master
triangle_area_calculator.py
1
# programme to calculate the Area of a triangle as an exercise # by Prasith #qpy:console #qpy:2 import math def main(): print print "This app will Calculate the Area of a triangle based on the lengths of it's sides." print a, b, c = input("Please enter the lengths of the sides separated by a coma ...
andrewyoung1991/scons
refs/heads/master
test/TEX/TEXCOM.py
5
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
AdrienGuille/TOM
refs/heads/master
tom_lib/nlp/__init__.py
3
__author__ = 'adrien'
bminchew/PySAR
refs/heads/master
pysar/plot/setup.py
1
import sys,os def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('plot', parent_package, top_path) config.add_subpackage('cm') config.make_config_py() return config if __name__ == '__main__': from distutils.dir_util import ...
Juniper/neutron
refs/heads/master
neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py
4
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Cisco 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 # # ...
desmovalvo/virtualsib-part2bis
refs/heads/master
tools/explo2/explorer_ui.py
5
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'explorer.ui' # # Created: Wed Apr 23 16:45:45 2008 # by: PyQt4 UI code generator 4.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_MainUI(object): def setupUi(self, MainUI): ...
openstack/tripleo-common
refs/heads/master
tripleo_common/tests/image/test_image_uploader.py
1
# Copyright 2015 Red Hat, 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 ...
py-geek/City-Air
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/gis/geos/point.py
224
from ctypes import c_uint from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils.six.moves import xrange class Point(GEOSGeometry): _minlength = 2 _ma...
yglazko/socorro
refs/heads/master
socorro/unittest/processor/test_processor_2015.py
9
import ujson from socorro.unittest.testbase import TestCase from nose.tools import eq_, ok_ from mock import Mock, patch from configman import ConfigurationManager from configman.dotdict import DotDict from socorro.processor.processor_2015 import ( Processor2015, rule_sets_from_string ) from socorro.lib.util...
beeftornado/sentry
refs/heads/master
src/sentry/integrations/slack/tasks.py
1
from __future__ import absolute_import import six from uuid import uuid4 from django.conf import settings from rest_framework import serializers from sentry.auth.access import SystemAccess from sentry.utils import json from sentry.tasks.base import instrumented_task from sentry.mediators import project_rules from se...
aiguofer/bokeh
refs/heads/master
bokeh/util/platform.py
11
""" Functions for testing what kind of Python or Python environment is in use. """ def is_py3(): """ Test whether we are running Python 3. Returns True if we are running Python 3, otherwise False """ import sys return sys.version_info[0] == 3 def is_pypy(): """ Test whether we are r...
mattvonrocketstein/smash
refs/heads/master
smashlib/ipy3x/extensions/__init__.py
40
# -*- coding: utf-8 -*- """This directory is meant for IPython extensions."""
DuoLife/script
refs/heads/master
python/scapy-2.3.1/scapy/modules/voip.py
17
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ VoIP (Voice over IP) related functions """ import os ################### ## Testing stuff ## ################### fr...
Team02-TeamGuinness/BIOE421_RoboHand
refs/heads/master
Printrun/printrun/stltool.py
21
# coding: utf-8 # This file is part of the Printrun suite. # # Printrun 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. # # Printrun i...
mpalomer/micropython
refs/heads/master
tests/misc/rge_sm.py
101
# evolve the RGEs of the standard model from electroweak scale up # by dpgeorge import math class RungeKutta(object): def __init__(self, functions, initConditions, t0, dh, save=True): self.Trajectory, self.save = [[t0] + initConditions], save self.functions = [lambda *args: 1.0] + list(functi...
maljac/odoo-addons
refs/heads/8.0
partner_source/partner.py
8
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import netsvc from openerp.osv import...
shhui/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/__init__.py
48
# Copyright 2012 OpenStack Foundation # # 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 ...
microcom/odoo
refs/heads/9.0
openerp/report/render/rml2html/__init__.py
49
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from rml2html import parseString
Tesora/tesora-horizon
refs/heads/master
cisco/files/enabled/_954_project_add_tesora_database_configurations_panel.py
1
# Copyright 2015 Tesora 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...
MungoRae/home-assistant
refs/heads/dev
homeassistant/components/notify/hipchat.py
1
""" HipChat platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.hipchat/ """ import logging import voluptuous as vol from homeassistant.components.notify import ( ATTR_TARGET, ATTR_DATA, PLATFORM_SCHEMA, BaseNot...
hennersz/pySpace
refs/heads/master
satelliteSimulator/propogation/keplerianPropogation.py
1
#! /usr/bin/env python # -*- coding: utf-8 -*- """ .. module:: keplerianPropogation :platform: Unix :synopsis: Calculate the postition and velocity vectors of the satellite after some time step .. moduleauthor:: Henry Mortimer <henry@morti.net> """ import math from ..utils import normalisedAtan2 fro...
nicolargo/intellij-community
refs/heads/master
python/testData/quickFixes/PyAddPropertyForFieldQuickFixTest/useProperty.py
80
class A: @property def x(self): return self._x def __init__(self): self._x = 1 def _foo(self): print(self._x) a = A() a._foo() print(a.x) print(a._<caret>x)
ilexius/odoo
refs/heads/master
addons/website_crm/tests/__init__.py
44
import test_website_crm
hardanimal/UFT_UPGEM
refs/heads/master
Lib/site-packages/pip-1.2.1-py2.7.egg/pip/__main__.py
558
import sys from .runner import run if __name__ == '__main__': exit = run() if exit: sys.exit(exit)
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/testData/quickFixes/PyMoveExceptQuickFixTest/simple_after.py
80
def foo(): pass try: foo() except UnboundLocalError: pass except NameError: pass
dushu1203/chromium.src
refs/heads/nw12
third_party/closure_compiler/processor_test.py
56
#!/usr/bin/env python # Copyright 2014 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. """Test resources processing, i.e. <if> and <include> tag handling.""" import unittest from processor import FileCache, Processor, Lin...
patochectp/navitia
refs/heads/dev
source/jormungandr/jormungandr/scenarios/helper_classes/__init__.py
2
# Copyright (c) 2001-2017, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
xujun10110/w3a_Scan_Console
refs/heads/master
plugin/NmapModule.py
2
#!/usr/bin/python #-*- encoding: utf-8 -*- ########################################### # # Nmap 扫描类(生成扫描结果) # ########################################### import nmap import time import sys class Web_Scan_Frame: def setScan_Main(self, scan_main): self.scan_main=scan_main def start(self,target,temple): # 在这...
sekikn/incubator-airflow
refs/heads/master
airflow/contrib/hooks/spark_submit_hook.py
7
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
cogmission/nupic
refs/heads/master
external/linux32/lib/python2.6/site-packages/matplotlib/numerix/random_array/__init__.py
70
from matplotlib.numerix import which if which[0] == "numarray": from numarray.random_array import * elif which[0] == "numeric": from RandomArray import * elif which[0] == "numpy": try: from numpy.oldnumeric.random_array import * except ImportError: from numpy.random import * else: r...