repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
matternet/ardupilot | refs/heads/master | Tools/autotest/pysim/rotmat.py | 74 | #!/usr/bin/env python
"""
vector3 and rotation matrix classes
This follows the conventions in the ArduPilot code,
and is essentially a python version of the AP_Math library
Andrew Tridgell, March 2012
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser Gener... |
tsl143/zamboni | refs/heads/master | mkt/receipts/tests/test_utils_.py | 21 | import calendar
import time
from nose.tools import eq_
from receipts.receipts import Receipt
from mkt.receipts.utils import reissue_receipt, sign
from mkt.receipts.tests.test_verify import ReceiptTest
class TestReissue(ReceiptTest):
def test_expired(self):
receipt_data = self.sample_app_receipt()
... |
Digilent/u-boot-digilent | refs/heads/master | test/py/u_boot_console_base.py | 8 | # Copyright (c) 2015 Stephen Warren
# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
#
# SPDX-License-Identifier: GPL-2.0
# Common logic to interact with U-Boot via the console. This class provides
# the interface that tests use to execute U-Boot shell commands and wait for
# their results. Sub-clas... |
RahulMahalingam/raft | refs/heads/master | ui/RaftAbout.py | 10 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'RaftAbout.ui'
#
# Created: Tue Aug 30 11:56:05 2011
# by: PyQt4 UI code generator 4.8.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attri... |
KyleBenson/ns3 | refs/heads/master | src/propagation/test/examples-to-run.py | 200 | #! /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... |
zhumengyuan/kallithea | refs/heads/master | kallithea/lib/dbmigrate/versions/011_version_1_6_0.py | 2 | import logging
from sqlalchemy import *
from kallithea.lib.dbmigrate.migrate import *
from kallithea.lib.dbmigrate.migrate.changeset import *
from kallithea.model import meta
from kallithea.lib.dbmigrate.versions import _reset_base, notify
log = logging.getLogger(__name__)
def upgrade(migrate_engine):
"""
... |
sopac/pacgeo | refs/heads/master | geonode/search/templatetags/search_tags.py | 8 | from django import template
register = template.Library()
def raw(parser, token):
# Whatever is between {% raw %} and {% endraw %} will be preserved as
# raw, unrendered template code.
text = []
parse_until = 'endraw'
tag_mapping = {
template.TOKEN_TEXT: ('', ''),
template.TOKEN_VA... |
PolicyStat/django | refs/heads/master | tests/model_regress/__init__.py | 12133432 | |
szilveszter/django | refs/heads/master | django/conf/project_template/project_name/__init__.py | 12133432 | |
marcore/edx-platform | refs/heads/master | lms/envs/cms/__init__.py | 12133432 | |
Code4SA/odac-ford-housing | refs/heads/master | msg_handler/__init__.py | 1 | import logging
from flask import Flask
from redis import Redis
from flask.ext.sqlalchemy import SQLAlchemy
import sys
redis = Redis()
app = Flask(__name__, instance_relative_config=True)
app.config.from_pyfile('config.py', silent=True)
app.config.from_pyfile('config_private.py', silent=True)
db = SQLAlchemy(app)
# l... |
privateip/ansible-modules-core | refs/heads/devel | cloud/openstack/os_server.py | 3 | #!/usr/bin/python
# coding: utf-8 -*-
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
# Copyright (c) 2013, John Dewey <john@dewey.ws>
#
# This module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... |
gregorlarson/loxodo | refs/heads/cmdline1 | src/frontends/ppygui/ppygui/line.py | 4 | ## Copyright (c) Alexandre Delattre 2008
## 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, pu... |
endlessm/chromium-browser | refs/heads/master | tools/binary_size/libsupersize/parallel.py | 1 | # Copyright 2017 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.
"""Helpers related to multiprocessing."""
import atexit
import builtins
import itertools
import logging
import multiprocessing
import multiprocessing.dummy
i... |
slventures/jormungand | refs/heads/master | src/jormungand/plugins/storage/__init__.py | 3 | __author__ = 'adam.jorgensen.za@gmail.com'
|
a1exwang/fm-synth | refs/heads/master | operators/filters/fir.py | 1 | import numpy as np
from operators.base import Operator
import scipy.signal
import pyqtgraph as pg
import math
from gui.helpers import LogValueAxis
class FIRFilter(Operator):
input_count = 1
output_count = 1
def __init__(self, input_ops, bands, window_func=np.hanning, filter_size=128, gui=None, name=None)... |
dexterx17/nodoSocket | refs/heads/master | clients/Python-2.7.6/Lib/unittest/test/test_program.py | 112 | from cStringIO import StringIO
import os
import sys
import unittest
class Test_TestProgram(unittest.TestCase):
def test_discovery_from_dotted_path(self):
loader = unittest.TestLoader()
tests = [self]
expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__))
self.w... |
iOSForensics/pymobiledevice | refs/heads/master | pymobiledevice/version.py | 1 | # -*- coding: utf-8 -*-
'''pymobiledevice2
'''
VERSION = '1.3.0'
|
iromli/tinykit | refs/heads/master | examples/core/with_model.py | 2 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import tempfile
import time
from datetime import datetime
from jsonmodels import fields
from tinykit import Database
from tinykit import Model
class Testing... |
kthordarson/CouchPotatoServer | refs/heads/master | libs/git/files.py | 122 | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# 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 li... |
badock/nova | refs/heads/master | nova/tests/integrated/v3/test_cells.py | 31 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... |
Belxjander/Kirito | refs/heads/master | Python-2.3.3-Amiga/Tools/scripts/treesync.py | 2 | #! /usr/bin/env python
"""Script to synchronize two source trees.
Invoke with two arguments:
python treesync.py slave master
The assumption is that "master" contains CVS administration while
slave doesn't. All files in the slave tree that have a CVS/Entries
entry in the master tree are synchronized. This means:
... |
blueboxgroup/horizon | refs/heads/master | openstack_dashboard/dashboards/project/database_backups/tests.py | 32 | # Copyright 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 agre... |
0dataloss/pyrax | refs/heads/master | samples/cloudservers/create_with_meta_and_files.py | 13 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c)2012 Rackspace US, 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.ap... |
rosarior/mayan | refs/heads/master | apps/job_processor/__init__.py | 12133432 | |
GoSteven/Diary | refs/heads/master | django/conf/locale/sv/__init__.py | 12133432 | |
embray/PyFITS | refs/heads/master | lib/pyfits/hdu/groups.py | 1 | import sys
import numpy as np
from ..column import Column, ColDefs, FITS2NUMPY
from ..fitsrec import FITS_rec, FITS_record
from ..util import lazyproperty, _is_int, _is_pseudo_unsigned, _unsigned_zero
from .image import _ImageBaseHDU, PrimaryHDU
from .table import _TableLikeHDU
class Group(FITS_record):
"""
... |
JorgeCoock/django | refs/heads/master | tests/auth_tests/test_hashers.py | 185 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import skipUnless
from django.conf.global_settings import PASSWORD_HASHERS
from django.contrib.auth.hashers import (
UNUSABLE_PASSWORD_PREFIX, UNUSABLE_PASSWORD_SUFFIX_LENGTH,
BasePasswordHasher, PBKDF2PasswordHasher, PBKDF2SHA1Pass... |
shivaenigma/pycoin | refs/heads/master | tests/tools_test.py | 2 | import unittest
from pycoin.serialize import h2b
from pycoin.intbytes import int2byte
from pycoin.tx.script.tools import bin_script, compile, disassemble, int_to_script_bytes, int_from_script_bytes
from pycoin.tx.script.opcodes import INT_TO_OPCODE, OPCODE_LIST
from pycoin.tx.script.vm import eval_script
class Tools... |
angelapper/edx-platform | refs/heads/master | lms/djangoapps/badges/events/course_complete.py | 5 | """
Helper functions for the course complete event that was originally included with the Badging MVP.
"""
import hashlib
import logging
from django.core.urlresolvers import reverse
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _
from badges.models import Badg... |
djsegal/ahab_legacy_ | refs/heads/master | pequod/addIdentifiedSubgroup.py | 1 | # -*- coding: utf-8 -*-
"""
Created on Fri May 30 16:31:36 2014
@author: dan
"""
from ahabSyntax import openingChars , closingChars
def addIdentifiedSubgroup( curVal , inputModes , inputValues , curInpVals) :
openSubgroup = True # subgroup is still open
if closingChars[inputModes[-1]] not ... |
mjames-upc/python-awips | refs/heads/master | dynamicserialize/dstypes/com/raytheon/uf/common/localization/msgs/ListResponseEntry.py | 1 | ##
##
# File auto-generated against equivalent DynamicSerialize Java class
class ListResponseEntry(object):
def __init__(self):
self.fileName = None
self.context = None
self.date = None
self.checksum = None
self.directory = None
self.protectedLevel = None
s... |
dendisuhubdy/tensorflow | refs/heads/master | tensorflow/contrib/layers/python/layers/utils.py | 75 | # 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... |
sudheesh001/oh-mainline | refs/heads/master | vendor/packages/Django/django/contrib/localflavor/nl/nl_provinces.py | 528 | from django.utils.translation import ugettext_lazy as _
PROVINCE_CHOICES = (
('DR', _('Drenthe')),
('FL', _('Flevoland')),
('FR', _('Friesland')),
('GL', _('Gelderland')),
('GR', _('Groningen')),
('LB', _('Limburg')),
('NB', _('Noord-Brabant')),
('NH', _('Noord-Holland')),
('OV', _(... |
robinro/ansible | refs/heads/devel | lib/ansible/modules/network/f5/__init__.py | 12133432 | |
elky/django | refs/heads/master | tests/admin_scripts/management/commands/__init__.py | 12133432 | |
maxalbert/geopandas | refs/heads/master | tests/__init__.py | 12133432 | |
pilou-/ansible | refs/heads/devel | lib/ansible/modules/net_tools/snmp_facts.py | 40 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Networklore's snmp library for Ansible
# 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_vers... |
mpdehaan/func | refs/heads/master | func/minion/modules/process.py | 2 | ## -*- coding: utf-8 -*-
##
## Process lister (control TBA)
##
## Copyright 2007, Red Hat, Inc
## Michael DeHaan <mdehaan@redhat.com>
##
## This software may be freely redistributed under the terms of the GNU
## general public license.
##
## You should have received a copy of the GNU General Public License
## along wit... |
Hakuba/youtube-dl | refs/heads/master | youtube_dl/extractor/academicearth.py | 142 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class AcademicEarthCourseIE(InfoExtractor):
_VALID_URL = r'^https?://(?:www\.)?academicearth\.org/playlists/(?P<id>[^?#/]+)'
IE_NAME = 'AcademicEarth:Course'
_TEST = {
'url': 'http://academicearth.org/playlists/l... |
openstack/tempest | refs/heads/master | tempest/lib/services/image/v2/versions_client.py | 1 | # Copyright 2017 NEC Corporation. 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 ... |
PyMamba/mamba-storm | refs/heads/master | storm/xid.py | 4 | #
# Copyright (c) 2006, 2012 Canonical
#
# Written by Gustavo Niemeyer <gustavo@niemeyer.net>
#
# This file is part of Storm Object Relational Mapper.
#
# Storm 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 Found... |
retomerz/intellij-community | refs/heads/master | python/testData/refactoring/extractsuperclass/properties.before.py | 80 | class FromClass(object):
C = 12
def __init__(self):
self.a = 1
def _get(self):
return 1
def _set(self, value):
pass
def _delete(self):
pass
old_property = property(_get, _set, _delete)
def foo(self):
pass
def lala(self):
pass |
YinongLong/scikit-learn | refs/heads/master | examples/neighbors/plot_nearest_centroid.py | 58 | """
===============================
Nearest Centroid Classification
===============================
Sample usage of Nearest Centroid classification.
It will plot the decision boundaries for each class.
"""
print(__doc__)
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
f... |
glennyonemitsu/MarkupHiveSDK | refs/heads/master | sdklib/utils/cms.py | 1 | '''
helper functions to query the CMS. These are all interfacing with the live
account CMS data.
'''
from sdklib.utils.general import api_parse
class CMSUtil(object):
'''
This is the util class sent to the templates as the object 'cms' to
provide the cms query interface. Behind the scenes this uses the ... |
bclau/nova | refs/heads/master | nova/cmd/all.py | 7 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ... |
SlimRemix/android_external_chromium_org | refs/heads/lp5.1 | tools/telemetry/telemetry/core/platform/profiler/monsoon.py | 29 | # 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.
"""Interface for a USB-connected Monsoon power meter.
http://msoon.com/LabEquipment/PowerMonitor/
Currently Unix-only. Relies on fcntl, /dev, and /tmp.
"""
... |
txm/make-good | refs/heads/master | django/views/generic/detail.py | 154 | import re
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.http import Http404
from django.utils.encoding import smart_str
from django.utils.translation import ugettext as _
from django.views.generic.base import TemplateResponseMixin, View
class SingleObjectMixin(object):
"... |
chutchinson/discord-soundboard-proxy | refs/heads/master | bin/__init__.py | 12133432 | |
dfirst/romasshop | refs/heads/master | lacesandstuff/apps/las_shop/migrations/0001_initial.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import cartridge.shop.fields
class Migration(migrations.Migration):
dependencies = [
('shop', '0005_auto_20150527_1127'),
]
operations = [
migrations.CreateModel(
name='S... |
garbled1/ansible | refs/heads/devel | lib/ansible/plugins/action/net_banner.py | 474 | # (c) 2017, Ansible 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 di... |
binoculars/osf.io | refs/heads/develop | website/notifications/tasks.py | 2 | """
Tasks for making even transactional emails consolidated.
"""
import itertools
from django.db import connection
from framework.celery_tasks import app as celery_app
from framework.sentry import log_exception
from osf.models import OSFUser, AbstractNode
from osf.models import NotificationDigest
from website import ... |
pwwang/pyppl | refs/heads/master | tests/test_channel.py | 1 | from pathlib import Path
from math import ceil
import pytest
from pipen.channel import *
from plyrda.all import *
from pandas import DataFrame
def test_create():
assert isinstance(Channel.create(DataFrame([[1]])), DataFrame)
def test_from_glob():
glob = Path(__file__).parent / 'test_*.py'
glob_files = li... |
AuyaJackie/odoo | refs/heads/8.0 | addons/product_extended/wizard/__init__.py | 374 | # -*- encoding: 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
#... |
flarior/backend | refs/heads/master | flarior/api/namespaces.py | 2 | from . import api
ns_auth = api.namespace('auth', description='Auth operations')
|
cataliniordache/Human-Computer-Interaction-Project | refs/heads/master | RestfulServices/flask/lib/python2.7/site-packages/pip/_vendor/re-vendor.py | 1240 | import os
import sys
import pip
import glob
import shutil
here = os.path.abspath(os.path.dirname(__file__))
def usage():
print("Usage: re-vendor.py [clean|vendor]")
sys.exit(1)
def clean():
for fn in os.listdir(here):
dirname = os.path.join(here, fn)
if os.path.isdir(dirname):
... |
jensadne/brixdb | refs/heads/master | brixdb/__init__.py | 12133432 | |
da1z/intellij-community | refs/heads/master | python/testData/inheritors/dotted/__init__.py | 12133432 | |
formiano/enigma2-4.4 | refs/heads/master | lib/python/Tools/__init__.py | 12133432 | |
lucafavatella/intellij-community | refs/heads/cli-wip | python/testData/refactoring/move/relativeImportOfNameFromInitPy/after/src/pkg/subpkg1/__init__.py | 12133432 | |
mardix/Webmaster | refs/heads/master | webmaster/core.py | 1 | """
Webmaster
"""
import re
import os
import sys
import inspect
import datetime
import functools
import logging
import logging.config
import utils
import exceptions
from six import string_types
from werkzeug.contrib.fixers import ProxyFix
from werkzeug.routing import BaseConverter, parse_rule
from werkzeug.exceptions... |
Obus/scikit-learn | refs/heads/master | sklearn/ensemble/forest.py | 176 | """Forest of trees-based ensemble methods
Those methods include random forests and extremely randomized trees.
The module structure is the following:
- The ``BaseForest`` base class implements a common ``fit`` method for all
the estimators in the module. The ``fit`` method of the base ``Forest``
class calls the ... |
DONIKAN/django | refs/heads/master | tests/template_tests/test_unicode.py | 347 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from unittest import TestCase
from django.template import Context, Engine
from django.template.base import TemplateEncodingError
from django.utils import six
from django.utils.safestring import SafeData
class UnicodeTests(TestCase):
def test_templa... |
jason-weirather/py-seq-tools | refs/heads/master | seqtools/format/fasta/__init__.py | 1 | import os, re, gzip
from collections import namedtuple
import seqtools.sequence
class FASTAStream:
"""Iterable Stream
:param fh: file handle
:param custom_buffer_size: default size (10000000)
:type fh: stream
:type custom_buffer_size: int
"""
def __init__(self,fh,custom_buffer_size=10000000):
self.f... |
angelapper/odoo | refs/heads/9.0 | addons/google_calendar/__openerp__.py | 19 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Google Calendar',
'version': '1.0',
'category': 'Tools',
'description': """
The module adds the possibility to synchronize Google Calendar with OpenERP
========================================... |
andreparames/odoo | refs/heads/8.0 | openerp/tests/common.py | 60 | # -*- coding: utf-8 -*-
"""
The module :mod:`openerp.tests.common` provides unittest2 test cases and a few
helpers and classes to write tests.
"""
import errno
import glob
import json
import logging
import os
import select
import subprocess
import threading
import time
import unittest2
import urllib2
import xmlrpclib
... |
fboender/ansible-cmdb | refs/heads/master | lib/yaml/serializer.py | 561 |
__all__ = ['Serializer', 'SerializerError']
from error import YAMLError
from events import *
from nodes import *
class SerializerError(YAMLError):
pass
class Serializer(object):
ANCHOR_TEMPLATE = u'id%03d'
def __init__(self, encoding=None,
explicit_start=None, explicit_end=None, version=No... |
Panda3D-google-code-repositories/panda3d-beast | refs/heads/master | rttcache/beast/Color.py | 2 | #!/usr/bin/python
#encoding: utf-8
'''
This file is part of the Panda3D user interface library, Beast.
See included "License.txt"
'''
class Color(object):
'''
Converts a full color eg, 255 color, (255, 255, 255) OR (255, 255, 255, 255) to a float color (1.0, 1.0, 1.0, 1.0)
Also accepts a fl... |
mit0110/oppia | refs/heads/develop | extensions/rules/base.py | 7 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... |
Ecotrust/forestplanner | refs/heads/master | lot/trees/migrations/0011_auto__add_field_rx_internal_type.py | 1 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Rx.internal_type'
db.add_column('trees_rx', 'internal_type',
self.gf('... |
JoaquimPatriarca/senpy-for-gis | refs/heads/master | gasp/geopnd/general.py | 1 | """
Operations
"""
def merge_shp(shps, outShp):
"""
Merge shps into a new shp
"""
from gasp.fromshp import shp_to_df
from gasp.toshp import pandas_to_shp
if type(shps) != list:
raise ValueError('shps should be a list with paths for Feature Classes')
dfs = [shp_to_df... |
brendan-w/python-OBD | refs/heads/master | obd/__init__.py | 1 | # -*- coding: utf-8 -*-
"""
A serial module for accessing data from a vehicles OBD-II port
For more documentation, visit:
http://python-obd.readthedocs.org/en/latest/
"""
########################################################################
# ... |
Avrg/handsonpython2.7 | refs/heads/master | Lectures/Lecture5/import_time.py | 1 | import time
import datetime
f=datetime.datetime.now() #storing current time data in f
msec=f.microsecond
sec=f.second
mins=f.minute
hour=f.hour
day=f.day
month=f.month
year=f.year
print msec,sec,mins,hour,day,month, year
'''now you know how to get all this data. Can be handy
next step. How to make a clock w... |
srm912/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_serializer.py | 451 | from __future__ import absolute_import, division, unicode_literals
import json
import unittest
from .support import get_data_files
try:
unittest.TestCase.assertEqual
except AttributeError:
unittest.TestCase.assertEqual = unittest.TestCase.assertEquals
import html5lib
from html5lib import constants
from html... |
aladdinwang/django-cms | refs/heads/master | cms/test_utils/project/pluginapp/plugins/manytomany_rel/cms_plugins.py | 15 | from django.utils.translation import ugettext as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.test_utils.project.pluginapp.plugins.manytomany_rel.models import ArticlePluginModel
from cms.test_utils.project.pluginapp.models import Article
class ArticlePlugin(CMSPlugi... |
EnviroCentre/jython-upgrade | refs/heads/develop | jython/lib/distutils/tests/test_dist.py | 83 | # -*- coding: utf8 -*-
"""Tests for distutils.dist."""
import os
import StringIO
import sys
import unittest
import warnings
import textwrap
from distutils.dist import Distribution, fix_help_options
from distutils.cmd import Command
import distutils.dist
from test.test_support import TESTFN, captured_stdout, run_unitt... |
waterbolik/prestudy | refs/heads/master | lib-src/fann/lib/gtest-1.6.0/test/gtest_output_test.py | 1733 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
jjmleiro/hue | refs/heads/master | desktop/core/ext-py/Pygments-1.3.1/pygments/__init__.py | 56 | # -*- coding: utf-8 -*-
"""
Pygments
~~~~~~~~
Pygments is a syntax highlighting package written in Python.
It is a generic syntax highlighter for general use in all kinds of software
such as forum systems, wikis or other applications that need to prettify
source code. Highlights are:
* a ... |
ClearCorp-dev/odoo-clearcorp | refs/heads/9.0 | TODO-8.0/account_report_signatures/__init__.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Addons modules by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute... |
MSOpenTech/edx-platform | refs/heads/master | lms/djangoapps/courseware/migrations/0008_add_xmodule_storage.py | 114 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'XModuleStudentInfoField'
db.create_table('courseware_xmodulestudentinfofield', (
... |
ramcn/demo3 | refs/heads/master | venv/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py | 2930 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
Maccimo/intellij-community | refs/heads/master | python/testData/multipleArgumentsCompletion/argumentParameter.py | 9 | def foo(bar, baz):
pass
def main(bar):
for baz in []:
foo(<caret>) |
koobonil/Boss2D | refs/heads/master | Boss2D/addon/opencv-3.1.0_for_boss/samples/python/contours.py | 5 | #!/usr/bin/env python
'''
This program illustrates the use of findContours and drawContours.
The original image is put up along with the image of drawn contours.
Usage:
contours.py
A trackbar is put up which controls the contour level from -3 to 3
'''
# Python 2/3 compatibility
from __future__ import print_funct... |
MaddTheSane/iTerm2 | refs/heads/madds | tools/ply/ply-3.4/test/testlex.py | 62 | # testlex.py
import unittest
try:
import StringIO
except ImportError:
import io as StringIO
import sys
import os
import imp
import warnings
sys.path.insert(0,"..")
sys.tracebacklimit = 0
import ply.lex
def make_pymodule_path(filename):
path = os.path.dirname(filename)
file = os.path.basename(filena... |
Spiderlover/Toontown | refs/heads/master | toontown/building/__init__.py | 12133432 | |
wegamekinglc/Finance-Python | refs/heads/master | PyFin/Math/RootFinder/Brent.py | 2 | # -*- coding: utf-8 -*-
u"""
Created on 2017-6-7
@author: cheng.li
"""
from math import exp
from math import fabs
from numpy import inf
from PyFin.Utilities.Asserts import pyFinAssert
from PyFin.Math.RootFinder.RootFinderBase import RootFinder
class BracketedBrent(RootFinder):
def __init__(self, tol, low=None,... |
ludwiktrammer/odoo | refs/heads/9.0 | addons/sale_timesheet/tests/__init__.py | 42 | import test_sale_timesheet
|
jalexvig/tensorflow | refs/heads/master | tensorflow/contrib/timeseries/python/timeseries/estimators.py | 3 | # 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... |
sidartaoliveira/ansible | refs/heads/devel | contrib/inventory/collins.py | 51 | #!/usr/bin/env python
"""
Collins external inventory script
=================================
Ansible has a feature where instead of reading from /etc/ansible/hosts
as a text file, it can query external programs to obtain the list
of hosts, groups the hosts are in, and even variables to assign to each host.
Collins ... |
leafclick/intellij-community | refs/heads/master | python/testData/refactoring/inlinelocal/comment.after.py | 80 | # some clever comment
value = "aaaaaa" + "bbbbb"
|
g-vidal/upm | refs/heads/master | examples/python/lsm303agr.py | 6 | #!/usr/bin/env python
# Author: Jon Trulson <jtrulson@ics.com>
# Copyright (c) 2017 Intel Corporation.
#
# The MIT License
#
# 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 restrictio... |
havard024/prego | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/gis/tests/geoadmin/urls.py | 383 | from django.conf.urls import patterns, include
from django.contrib import admin
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
)
|
njantrania/osf.io | refs/heads/develop | framework/forms/__init__.py | 39 | import framework.status as status
from wtforms import fields, Form, PasswordField, BooleanField, IntegerField, \
DateField, DateTimeField, FileField, HiddenField, RadioField, SelectField, \
SelectMultipleField, SubmitField, TextAreaField, TextField, FieldList, \
validators
from wtforms.widgets import TextI... |
dslomov/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/core/management/commands/loaddata.py | 250 | import sys
import os
import gzip
import zipfile
from optparse import make_option
from django.conf import settings
from django.core import serializers
from django.core.management.base import BaseCommand
from django.core.management.color import no_style
from django.db import connections, router, transaction, DEFAULT_DB_... |
freedesktop-unofficial-mirror/gstreamer__sdk__cerbero | refs/heads/master | cerbero/packages/packager.py | 21 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... |
denizs/torchUp | refs/heads/master | torchup/utils/random.py | 1 | '''
.. module: RandomProcess
.. moduleauthor: Deniz Saner <denizs247@gmil.com>
Ornstein-Uhlenbeck Random Process
=========================================
Note, that this module is entirely taken from `@CamDavidsonPilon's <https://github.com/\
CamDavidsonPilon/PyProcess/>`_ repo.
'''
import numpy as np
import scipy as... |
kaplun/ops | refs/heads/prod | modules/webaccess/lib/external_authentication.py | 28 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 ... |
wnt-zhp/hufce | refs/heads/master | django/contrib/localflavor/ca/__init__.py | 12133432 | |
uclouvain/osis | refs/heads/dev | infrastructure/shared_kernel/academic_year/repository/__init__.py | 12133432 | |
Maccimo/intellij-community | refs/heads/master | python/testData/refactoring/move/moveSymbolDoesntReorderImportsInUsageFile/before/src/a.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.