repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
saleemjaveds/https-github.com-openstack-nova | refs/heads/master | nova/console/manager.py | 12 | # 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 ... |
dch312/scipy | refs/heads/master | scipy/weave/vtk_spec.py | 100 | """
VTK type converter.
This module handles conversion between VTK C++ and VTK Python objects
so that one can write inline C++ code to manipulate VTK Python
objects. It requires that you have VTK and the VTK-Python wrappers
installed. It has been tested with VTK 4.0 and above. You will need
to call inline with incl... |
Ballz0fSteel/Umeko | refs/heads/master | lib/youtube_dl/extractor/aljazeera.py | 47 | from __future__ import unicode_literals
from .common import InfoExtractor
class AlJazeeraIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?aljazeera\.com/(?:programmes|video)/.*?/(?P<id>[^/]+)\.html'
_TESTS = [{
'url': 'http://www.aljazeera.com/programmes/the-slum/2014/08/deliverance-201482883754... |
mapr/hue | refs/heads/hue-3.9.0-mapr | desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/Cipher/PKCS1_OAEP.py | 123 | # -*- coding: utf-8 -*-
#
# Cipher/PKCS1_OAEP.py : PKCS#1 OAEP
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, ro... |
Lilykos/invenio | refs/heads/master | invenio/ext/principal/wrappers.py | 17 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014 CERN.
#
# Invenio 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... |
apanju/odoo | refs/heads/8.0 | openerp/tools/win32.py | 457 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
OSSHealth/ghdata | refs/heads/master | augur/housekeeper.py | 1 | #SPDX-License-Identifier: MIT
"""
Keeps data up to date
"""
import coloredlogs
from copy import deepcopy
import logging, os, time, requests
import logging.config
from multiprocessing import Process, get_start_method
from sqlalchemy.ext.automap import automap_base
import sqlalchemy as s
import pandas as pd
from sqlalche... |
ProfessionalIT/professionalit-webiste | refs/heads/master | sdk/google_appengine/lib/django-1.2/django/conf/project_template/manage.py | 2072 | #!/usr/bin/env python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ... |
pozar87/apts | refs/heads/master | apts/constants/objecttablelabels.py | 1 | class ObjectTableLabels:
# Altitude
ALTITUDE = 'Altitude'
# Transit time
TRANSIT = 'Transit'
# Right ascension
RA = 'RA'
# Declination
DEC = 'Dec'
# Name
NAME = 'Name'
# Ephem obeject
EPHEM = 'Ephem'
# Magnitude
MAGNITUDE = 'Magnitude'
# Distance
DISTANCE = 'Distance'
# Phase
PHASE =... |
buqing2009/MissionPlanner | refs/heads/master | Lib/site-packages/numpy/testing/tests/test_decorators.py | 86 | import numpy as np
from numpy.testing import *
from numpy.testing.noseclasses import KnownFailureTest
import nose
def test_slow():
@dec.slow
def slow_func(x,y,z):
pass
assert(slow_func.slow)
def test_setastest():
@dec.setastest()
def f_default(a):
pass
@dec.setastest(True)
... |
benspaulding/django | refs/heads/master | tests/regressiontests/null_fk/__init__.py | 12133432 | |
ignaci0/pyafipws.web2py-app | refs/heads/master | modules/__init__.py | 12133432 | |
cmbclh/vnpy1.7 | refs/heads/master | build/lib/vnpy/trader/language/chinese/__init__.py | 12133432 | |
Lujeni/ansible | refs/heads/devel | lib/ansible/module_utils/network/iosxr/argspec/facts/__init__.py | 12133432 | |
samithaj/headphones | refs/heads/master | lib/requests/packages/urllib3/contrib/__init__.py | 12133432 | |
CanalTP/navitia | refs/heads/dev | source/jormungandr/tests/klaxit_routing_tests.py | 1 | # -*- coding: utf-8 -*-
# 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 mob... |
yewang15215/django | refs/heads/master | tests/postgres_tests/models.py | 14 | from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from .fields import (
ArrayField, BigIntegerRangeField, CITextField, DateRangeField,
DateTimeRangeField, FloatRangeField, HStoreField, IntegerRangeField,
JSONField, SearchVectorField,
)
class Tag(object):
def __in... |
devGregA/scrapy | refs/heads/master | scrapy/contrib/downloadermiddleware/httpauth.py | 89 | """
HTTP basic auth downloader middleware
See documentation in docs/topics/downloader-middleware.rst
"""
from w3lib.http import basic_auth_header
from scrapy import signals
class HttpAuthMiddleware(object):
"""Set Basic HTTP Authorization header
(http_user and http_pass spider class attributes)"""
@cl... |
mne-tools/mne-tools.github.io | refs/heads/main | 0.14/_downloads/plot_artifacts_correction_ssp.py | 3 | """
.. _tut_artifacts_correct_ssp:
Artifact Correction with SSP
============================
"""
import numpy as np
import mne
from mne.datasets import sample
from mne.preprocessing import compute_proj_ecg, compute_proj_eog
# getting some data ready
data_path = sample.data_path()
raw_fname = data_path + '/MEG/samp... |
mldbai/mldb | refs/heads/master | testing/MLDB-1328-join_empty_dataset_test.py | 1 | #
# MLDB-1328-join_empty_dataset_test.py
# Mich, 2016-01-28
# Copyright (c) 2016 mldb.ai inc. All rights reserved.
#
# Tools for the plugins and their tests.
import unittest
from mldb import mldb
def log(thing):
mldb.log(str(thing))
def perform(*args, **kwargs):
res = mldb.perform(*args, **kwargs)
assert... |
phobson/bokeh | refs/heads/master | examples/plotting/file/graphs.py | 5 | from bokeh.plotting import figure, gridplot, GridSpec, output_file, show
import networkx as nx
from sympy import *
def graph_draw(g, layout=nx.circular_layout, node_color="white", text_color="black"):
pos = layout(g)
labels = [ str(v) for v in g.nodes() ]
vx, vy = zip(*[ pos[v] for v in g.nodes() ])
xs... |
ryfeus/lambda-packs | refs/heads/master | Tensorflow_LightGBM_Scipy_nightly/source/scipy/interpolate/fitpack.py | 21 | from __future__ import print_function, division, absolute_import
__all__ = ['splrep', 'splprep', 'splev', 'splint', 'sproot', 'spalde',
'bisplrep', 'bisplev', 'insert', 'splder', 'splantider']
import warnings
import numpy as np
from ._fitpack_impl import bisplrep, bisplev, dblint
from . import _fitpack_i... |
Azulinho/ansible | refs/heads/devel | test/units/modules/system/interfaces_file/test_interfaces_file.py | 39 | # (c) 2017, Roman Belyakovsky <ihryamzik () gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any la... |
cdubz/babybuddy | refs/heads/master | core/templatetags/__init__.py | 12133432 | |
gabrielfalcao/lettuce | refs/heads/master | tests/integration/lib/Django-1.3/django/contrib/localflavor/be/__init__.py | 12133432 | |
uiri/pxqz | refs/heads/master | venv/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/__init__.py | 12133432 | |
kingvuplus/gui_test5 | refs/heads/master | lib/python/Plugins/SystemPlugins/DiseqcTester/__init__.py | 12133432 | |
asrie/phantomjs | refs/heads/master | src/breakpad/src/tools/gyp/test/library/gyptest-shared.py | 430 | #!/usr/bin/env python
# Copyright (c) 2009 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 simple build of a "Hello, world!" program with shared libraries,
including verifying that libraries are rebuilt correctly when ... |
aidanlister/django | refs/heads/master | django/db/backends/postgresql/utils.py | 682 | from django.utils.timezone import utc
def utc_tzinfo_factory(offset):
if offset != 0:
raise AssertionError("database connection isn't set to UTC")
return utc
|
lisa-lab/pylearn2 | refs/heads/master | pylearn2/devtools/tests/test_shebangs.py | 44 | from __future__ import print_function
__author__ = "Ian Goodfellow"
from pylearn2.devtools.list_files import list_files
def test_shebangs():
# Make sure all scripts that use shebangs use /usr/bin/env
# (instead of the non-standard /bin/env or hardcoding the path to
# the interpreter). This test allows an... |
raymondgom/pmip6ns3.13new | refs/heads/master | src/uan/bindings/modulegen__gcc_ILP32.py | 28 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
henrytao-me/openerp.positionq | refs/heads/master | openerp/addons/account_asset/report/account_asset_report.py | 54 | # -*- encoding: 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 t... |
JacerOmri/PokemonGo-Bot-Desktop | refs/heads/development | pywin/Lib/encodings/charmap.py | 860 | """ Generic Python Character Mapping Codec.
Use this codec directly rather than through the automatic
conversion mechanisms supplied by unicode() and .encode().
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import codecs
### Codec APIs
class... |
cslzchen/osf.io | refs/heads/develop | api_tests/wikis/views/test_wiki_content.py | 6 | from nose.tools import * # noqa:
from api.base.settings.defaults import API_BASE
from addons.wiki.models import WikiPage
from tests.base import ApiWikiTestCase
from osf_tests.factories import ProjectFactory, RegistrationFactory
class TestWikiContentView(ApiWikiTestCase):
def _set_up_public_project_with_wiki_pa... |
disko/modoboa-admin-limits | refs/heads/master | tests.py | 1 | """Tests runner for modoboa_admin."""
import unittest
from modoboa.lib.test_utils import TestRunnerMixin
class TestRunner(TestRunnerMixin, unittest.TestCase):
"""The tests runner."""
extension = "modoboa_admin_limits"
dependencies = [
"modoboa_admin"
]
|
dsajkl/123 | refs/heads/master | common/djangoapps/student/management/commands/transfer_students.py | 2 | """
Transfer Student Management Command
"""
from django.db import transaction
from opaque_keys.edx.keys import CourseKey
from optparse import make_option
from django.contrib.auth.models import User
from student.models import CourseEnrollment
from shoppingcart.models import CertificateItem
from track.management.tracked_... |
vtss/linux-stable | refs/heads/vtss_3.14 | tools/perf/python/twatch.py | 1565 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... |
beiko-lab/gengis | refs/heads/master | bin/Lib/site-packages/win32/test/test_win32file.py | 2 | import unittest
from pywin32_testutil import str2bytes, TestSkipped, testmain
import win32api, win32file, win32pipe, pywintypes, winerror, win32event
import win32con, ntsecuritycon
import sys
import os
import tempfile
import threading
import time
import shutil
import socket
import datetime
import random
... |
Loisel/colorview2d | refs/heads/master | colorview2d/data.py | 1 | #!/bin/python
"""
A module to handle 3D data with axes.
colorview2d.Data consists of a 2d array and x and y axes.
The class provides methods to rotate, flipp, copy and save
the datafile.
Example
-------
::
file = Data(np.random.random(100, 100))
file.rotate_cw()
file.report()
file.save('newdata.dat'... |
bikash/kaggleCompetition | refs/heads/master | microsoft malware/code/single_20.py | 1 | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 18 01:55:47 2015
@author: marios michailidis
"""
# licence: FreeBSD
"""
Copyright (c) 2015, Marios Michailidis
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following condit... |
shirishgoyal/crowdsource-platform | refs/heads/develop2 | mturk/migrations/0002_auto_20160629_1710.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-06-29 17:10
from __future__ import unicode_literals
from django.conf import settings
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
... |
shreyasp/erpnext | refs/heads/develop | erpnext/accounts/doctype/sales_invoice_timesheet/__init__.py | 12133432 | |
smharper/openmc | refs/heads/develop | tests/regression_tests/tallies/__init__.py | 12133432 | |
dawran6/zulip | refs/heads/master | zerver/views/__init__.py | 12133432 | |
PcBoy111/PCBOT | refs/heads/master | plugins/moderate.py | 1 | """ Plugin for server moderation
The bot will perform different tasks when some settings are enabled in a server:
_____________________________________NSFW Filter_____________________________________
If enabled on the server, spots any text containing the keyword nsfw and a link.
Then tries to delete their me... |
makson96/free-engineer | refs/heads/master | tools/status.py | 2 | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
##This software is available to you under the terms of the GPL-3, see "/usr/share/common-licenses/GPL-3".
##Copyright:
##- Tomasz Makarewicz (makson96@gmail.com)
import os
recultis_dir = os.getenv("HOME") + "/.recultis/"
def check(game, shop, engine_size, runtime_size):... |
aam-at/tensorflow | refs/heads/master | tensorflow/python/estimator/canned/boosted_trees_utils.py | 40 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
mjs/pyweek11-cube | refs/heads/master | run.py | 2 | #! /usr/bin/env python
import sys
from os.path import join
sys.path.append(join('source', 'lib'))
from source.main import main
main()
|
hodgestar/genshi | refs/heads/master | examples/basic/kidrun.py | 13 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import time
import kid
def test():
base_path = os.path.dirname(os.path.abspath(__file__))
kid.path = kid.TemplatePath([base_path])
ctxt = dict(hello='<world>', hey='ZYX', bozz=None,
items=['Number %d' % num for num in range(1... |
ZHAW-INES/rioxo-uClinux-dist | refs/heads/rtsp | user/python/python-2.4.4/Lib/plat-irix6/FILE.py | 8 | # Generated by h2py from /usr/include/sys/file.h
# Included from standards.h
# Included from sys/types.h
# Included from sgidefs.h
_MIPS_ISA_MIPS1 = 1
_MIPS_ISA_MIPS2 = 2
_MIPS_ISA_MIPS3 = 3
_MIPS_ISA_MIPS4 = 4
_MIPS_SIM_ABI32 = 1
_MIPS_SIM_NABI32 = 2
_MIPS_SIM_ABI64 = 3
# Included from sys/pthread.h
P_MYID = (-1)
... |
jmehnle/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/na_cdot_user_role.py | 69 | #!/usr/bin/python
# (c) 2017, NetApp, 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.... |
piqoni/onadata | refs/heads/master | onadata/apps/api/tools.py | 3 | import os
from datetime import datetime
import numpy as np
from django import forms
from django.conf import settings
from django.core.files.storage import get_storage_class
from django.contrib.auth.models import Permission
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import Cont... |
sajuptpm/neutron-ipam | refs/heads/stable/icehouse | neutron/plugins/metaplugin/__init__.py | 108 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012, Nachi Ueno, NTT MCL, 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://ww... |
ApuliaSoftware/odoo | refs/heads/8.0 | addons/pad/__openerp__.py | 249 | # -*- coding: utf-8 -*-
{
'name': 'Collaborative Pads',
'version': '2.0',
'category': 'Project Management',
'description': """
Adds enhanced support for (Ether)Pad attachments in the web client.
===================================================================
Lets the company customize which Pad ins... |
ahmedbodi/vertcoin | refs/heads/master | test/functional/wallet_fallbackfee.py | 42 | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test wallet replace-by-fee capabilities in conjunction with the fallbackfee."""
from test_framework.tes... |
evidation-health/bokeh | refs/heads/master | bokeh/session.py | 42 | ''' The session module provides the Session class, which encapsulates a
connection to a Document that resides on a Bokeh server.
The Session class provides methods for creating, loading and storing
documents and objects, as well as methods for user-authentication. These
are useful when the server is run in multi-user ... |
project-generator/project_generator | refs/heads/master | project_generator/tools/iar.py | 1 | # Copyright 2015 0xc0170
#
# 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, soft... |
qtproject/qtwebkit | refs/heads/dev | Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py | 3 | #!/usr/bin/env python
#
# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
# Copyright (c) 2014 University of Washington. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributio... |
optiminimalist/movingdata | refs/heads/master | deploy/ec2/__init__.py | 2 | """Handles EC2 communication via boto"""
__author__ = 'ml483'
|
stonebig/flexx | refs/heads/master | flexx/pyscript/parser3.py | 21 | """
Python Builtins
---------------
Most buildin functions (that make sense in JS) are automatically
translated to JavaScript: isinstance, issubclass, callable, hasattr,
getattr, setattr, delattr, print, len, max, min, chr, ord, dict, list,
tuple, range, pow, sum, round, int, float, str, bool, abs, divmod, all,
any, ... |
StefanDuan/IntroToComSci | refs/heads/master | ps1a_3.py | 2 | __author__ = 'wnduan'
# Problem Set 1-a From: MIT OPEN COURSEWARE
# Write a program computes and prints 1000th prime number.
# 1. Initialize some state variables:
i = 1 # ith prime number, the program started from 2nd prime number 3.(the 1st one is 2)
n = 1 # generates odd integers
maxI = 2000 #
p = [2,]
total_step... |
macks22/scikit-learn | refs/heads/master | benchmarks/bench_plot_fastkmeans.py | 294 | from __future__ import print_function
from collections import defaultdict
from time import time
import numpy as np
from numpy import random as nr
from sklearn.cluster.k_means_ import KMeans, MiniBatchKMeans
def compute_bench(samples_range, features_range):
it = 0
results = defaultdict(lambda: [])
chun... |
chetan51/neon | refs/heads/master | neon/backends/float_ew.py | 10 | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana 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
#
# ... |
phantomas1234/inspyred | refs/heads/master | recipes/micro_ec.py | 3 | import collections
import inspyred
class MicroEC(inspyred.ec.EvolutionaryComputation):
def __init__(self, random):
inspyred.ec.EvolutionaryComputation.__init__(self, random)
def evolve(self, generator, evaluator, pop_size=10, seeds=None, maximize=True, bounder=None, **args):
se... |
JackDandy/SickGear | refs/heads/master | lib/hachoir_py2/parser/common/win32.py | 2 | from hachoir_py2.field import (FieldSet,
UInt16, UInt32, Enum, String, Bytes, Bits, TimestampUUID60)
from hachoir_py2.parser.video.fourcc import video_fourcc_name
from hachoir_py2.core.bits import str2hex
from hachoir_py2.core.text_handler import textHandler, hexadecimal
from hachoir_py2.... |
Conedy/Conedy | refs/heads/master | testing/global/expected/sum_set.py | 1 | 00000 0 output/set.py.err
00000 0 output/set.py.out
|
asrie/phantomjs | refs/heads/master | src/breakpad/src/tools/gyp/test/generator-output/actions/subdir2/make-file.py | 973 | #!/usr/bin/env python
# Copyright (c) 2009 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
contents = "Hello from make-file.py\n"
open(sys.argv[1], 'wb').write(contents)
|
VitalPet/c2c-rd-addons | refs/heads/8.0 | c2c_stock_accounting/wizard/stock_fill_inventory.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2012-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>)
#
# Thi... |
CSGreater-Developers/HMC-Grader | refs/heads/master | app/scripts/helpers.py | 1 | from app.structures.models.user import *
from app.structures.models.course import *
def query_yes_no(question, default="yes"):
"""Ask a yes/no question via raw_input() and return their answer.
"question" is a string that is presented to the user.
"default" is the presumed answer if the user just hits <Enter>.
... |
Dev-Cloud-Platform/Dev-Cloud | refs/heads/master | dev_cloud/virtual_controller/juju_core/juju_instance.py | 1 | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2015] Michał Szczygieł, M4GiK Software
#
# 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... |
jagguli/intellij-community | refs/heads/master | python/lib/Lib/distutils/command/install_lib.py | 82 | # This module should be kept compatible with Python 2.1.
__revision__ = "$Id: install_lib.py 37946 2004-12-02 20:14:16Z lemburg $"
import sys, os, string
from types import IntType
from distutils.core import Command
from distutils.errors import DistutilsOptionError
# Extension for Python source files.
if hasattr(os,... |
atantet/transferPlasim | refs/heads/master | runPlasim/postprocessor/indices/get_index_area.py | 1 | import os, sys
import numpy as np
from netCDF4 import Dataset
# Index calculation functions definition
def getAreaRange(srcVar, lat, lon, WEIGHTS, rng, win):
""" Calculate the Mean Surface Temperature. """
nt = srcVar.shape[0]
index = np.empty((nt,))
ilat = (lat >= win[1]) & (lat <= win[3])
ilon = ... |
Split-Screen/android_kernel_huawei_msm8928 | refs/heads/pac-5.1 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
mzhr/snakepig_engine | refs/heads/master | src/game.py | 1 | import pyglet
from pyglet.window import key
from src import world
class GameStates:
MAIN_MENU = 0
GAME_LOAD = 1
GAME_PLAY = 2
GAME_MENU = 3
class Window(pyglet.window.Window):
def __init__(self, *args, **kwargs):
# Initialize window.
super(Window, self).__init__(800, 600, *args, **kwargs)
# Initilize wi... |
eltonsantos/django | refs/heads/master | tests/queries/__init__.py | 12133432 | |
lumig242/Hue-Integration-with-CDAP | refs/heads/pull3 | desktop/core/ext-py/django-extensions-1.5.0/django_extensions/templatetags/__init__.py | 12133432 | |
Tamriel/wagtail_room_booking | refs/heads/master | account/management/__init__.py | 12133432 | |
gangadhar-kadam/helpdesk-frappe | refs/heads/develop | frappe/print/doctype/__init__.py | 12133432 | |
camptocamp/QGIS | refs/heads/master | python/plugins/processing/algs/PointsDisplacement.py | 1 | # -*- coding: utf-8 -*-
"""
***************************************************************************
PointsDisplacement.py
---------------------
Date : July 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
*********... |
MarkTseng/django-farmersale | refs/heads/master | farmersale-env/lib/python2.7/site-packages/pip/_vendor/__init__.py | 360 | """
pip._vendor is for vendoring dependencies of pip to prevent needing pip to
depend on something external.
Files inside of pip._vendor should be considered immutable and should only be
updated to versions from upstream.
"""
from __future__ import absolute_import
|
plushvoxel/RIOT | refs/heads/master | dist/tools/pyterm/pytermcontroller/__init__.py | 138 | __all__ = ["pytermcontroller"]
|
cloudcache/zstack-utility | refs/heads/master | apibinding/test/__init__.py | 12133432 | |
adnanh/zulip | refs/heads/master | confirmation/management/commands/__init__.py | 12133432 | |
pkug/intelmq | refs/heads/master | intelmq/bots/parsers/fraunhofer/__init__.py | 12133432 | |
memnonila/django-cms | refs/heads/develop | cms/test_utils/project/fakemlng/south_migrations/__init__.py | 12133432 | |
gapan/functionplot | refs/heads/master | functionplot/img/__init__.py | 12133432 | |
qilicun/python | refs/heads/master | python3/src/input/bisection_plot.py | 1 | """
Graphical illustration of the bisection algorithm for solving nonlinear
algebraic equations of the form f(x)=0.
Usage:
python bisection_plot.py f_formula a b [epsilon]
Note that f(x) must change sign in the interval [a,b].
"""
from bisection import bisection_evolution
import sys, time
usage = '%s f-formula a b [... |
JBonsink/GSOC-2013 | refs/heads/master | tools/ns-allinone-3.14.1/ns-3.14.1/src/mesh/test/examples-to-run.py | 196 | #! /usr/bin/env python
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
# A list of C++ examples to run in order to ensure that they remain
# buildable and runnable over time. Each tuple in the list contains
#
# (example_name, do_run, do_valgrind_run).
#
# See test.py for more i... |
joshbohde/scikit-learn | refs/heads/master | sklearn/cross_val.py | 1 | import warnings
warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
' and will be removed in version 0.11.'
' Please use sklearn.cross_validation instead.')
from .cross_validation import *
|
NullSoldier/django | refs/heads/master | tests/messages_tests/test_middleware.py | 498 | import unittest
from django import http
from django.contrib.messages.middleware import MessageMiddleware
class MiddlewareTest(unittest.TestCase):
def setUp(self):
self.middleware = MessageMiddleware()
def test_response_without_messages(self):
"""
Makes sure that the response middlew... |
jagguli/intellij-community | refs/heads/master | python/testData/refactoring/pullup/moveInstanceAttributesSimple.py | 80 | class Parent:
def __init__(self):
pass
class Child(Parent):
def __init__(self):
Parent2.__init__(self)
self.instance_field = "eggs"
|
hmronline/home-assistant | refs/heads/dev | homeassistant/components/switch/template.py | 7 | """
Support for switches which integrates with other components.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.template/
"""
import logging
from homeassistant.components.switch import ENTITY_ID_FORMAT, SwitchDevice
from homeassistant.const impor... |
gdooper/scipy | refs/heads/master | scipy/special/_precompute/gammainc_asy.py | 32 | """
Precompute coefficients of Temme's asymptotic expansion for gammainc.
This takes about 8 hours to run on a 2.3 GHz Macbook Pro with 4GB ram.
Sources:
[1] NIST, "Digital Library of Mathematical Functions",
http://dlmf.nist.gov/
"""
from __future__ import division, print_function, absolute_import
import os
fr... |
iurisilvio/flask-admin | refs/heads/master | flask_admin/model/base.py | 1 | import warnings
import re
import csv
import mimetypes
import time
from math import ceil
from werkzeug import secure_filename
from flask import (request, redirect, flash, abort, json, Response,
get_flashed_messages, stream_with_context)
from jinja2 import contextfunction
try:
import tablib
excep... |
lombritz/odoo | refs/heads/8.0 | addons/analytic_user_function/analytic_user_function.py | 163 | # -*- 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... |
raviqqe/tensorflow-extenteten | refs/heads/master | extenteten/embedding/__init__.py | 1 | from .unidirectional import embeddings_to_embedding, id_vector_to_embedding
from .bidirectional import (bidirectional_embeddings_to_embedding,
bidirectional_id_vector_to_embedding,
bidirectional_id_vector_to_embeddings)
from .embeddings import embeddings
|
markherringer/waywayd | refs/heads/master | apps/flatpages/urls.py | 376 | from django.conf.urls.defaults import *
urlpatterns = patterns('django.contrib.flatpages.views',
(r'^(?P<url>.*)$', 'flatpage'),
)
|
Glasgow2015/team-10 | refs/heads/master | env/lib/python2.7/site-packages/setuptools/sandbox.py | 259 | import os
import sys
import tempfile
import operator
import functools
import itertools
import re
import contextlib
import pickle
import pkg_resources
if sys.platform.startswith('java'):
import org.python.modules.posix.PosixModule as _os
else:
_os = sys.modules[os.name]
try:
_file = file
except NameError:
... |
CatherineH/adolphus | refs/heads/master | demos/laserplan/pso.py | 2 | """\
Particle Swarm Optimization
@author: Aaron Mavrinac
@organization: University of Windsor
@contact: mavrin1@uwindsor.ca
@license: GPL-3
"""
import numpy
from random import uniform
class Particle(numpy.ndarray):
_gbest = None
_gbest_fitness = None
def __init__(self, *args):
self.velocity = n... |
adamdempsey90/fargo3d | refs/heads/master | utils/python/pyfargo3d/streams/setup.py | 1 | from distutils.core import setup, Extension
module1 = Extension('stream', sources = ['streammodule.c'])
setup (name = 'PackageName',
version = '1.0',
description = 'This is a demo package',
ext_modules = [module1])
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.