repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
gibiansky/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/dataframe/transforms/in_memory_source.py
82
# Copyright 2016 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...
ubgarbage/gae-blog
refs/heads/master
django/contrib/staticfiles/views.py
154
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath import urllib from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from dja...
sigma-random/asuswrt-merlin
refs/heads/master
release/src/router/samba36/source4/scripting/python/samba/netcmd/__init__.py
19
#!/usr/bin/env python # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2009 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, ...
emreg00/biana
refs/heads/master
biana/BianaParser/XMLNode.py
2
""" BIANA: Biologic Interactions and Network Analysis Copyright (C) 2009 Javier Garcia-Garcia, Emre Guney, Baldo Oliva This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either vers...
CCI-Tools/ect-core
refs/heads/master
test/util/__init__.py
12133432
otherness-space/myProject
refs/heads/master
my_project_001/lib/python2.7/site-packages/django/conf/locale/ga/__init__.py
12133432
arifsetiawan/edx-platform
refs/heads/master
common/djangoapps/terrain/stubs/tests/__init__.py
12133432
danielmellado/tempest
refs/heads/master
tempest/api/database/limits/__init__.py
12133432
kxliugang/edx-platform
refs/heads/master
common/djangoapps/student/migrations/0040_auto__del_field_usersignupsource_user_id__add_field_usersignupsource_u.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): # Deleting field 'UserSignupSource.user_id' db.delete_column('student_usersignupsource', 'user_id_id') ...
leighpauls/k2cro4
refs/heads/master
third_party/python_26/Lib/sqlite3/dump.py
247
# Mimic the sqlite3 console shell's .dump command # Author: Paul Kippes <kippesp@gmail.com> def _iterdump(connection): """ Returns an iterator to the dump of the database in an SQL text format. Used to produce an SQL dump of the database. Useful to save an in-memory database for later restoration. T...
mrquim/repository.mrquim
refs/heads/master
repo/script.module.youtube.dl/lib/youtube_dl/extractor/beampro.py
36
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, clean_html, compat_str, float_or_none, int_or_none, parse_iso8601, try_get, urljoin, ) class BeamProBaseIE(InfoExtractor): _API_BASE = 'https://mixer.com...
snbueno/anaconda
refs/heads/master
pyanaconda/ui/gui/spokes/lib/cart.py
10
# Disk shopping cart # # Copyright (C) 2011, 2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed ...
ndsol/volcano
refs/heads/master
src/gn/toolchain/wrapper_utils.py
1
# Copyright (c) 2016 The Chromium Authors. All rights reserved. # Copyright (c) 2017-2018 the Volcano Authors. All rights reserved. # Licensed under the GPLv3. """Helper functions for gcc_toolchain.gni wrappers.""" import os import re import subprocess from select import select import shlex import sys _BAT_PREFIX = ...
scrappleapp/scrapple
refs/heads/master
scrapple/selectors/xpath.py
2
""" scrapple.selectors.xpath ~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import print_function from scrapple.selectors.selector import Selector from scrapple.utils.text import make_ascii class XpathSelector(Selector): """ The ``XpathSelector`` object defines XPath expressions. """ __selector_type__ = 'XPat...
mozilla/stoneridge
refs/heads/master
python/src/Lib/ctypes/test/test_bitfields.py
32
from ctypes import * import unittest import os import ctypes import _ctypes_test class BITS(Structure): _fields_ = [("A", c_int, 1), ("B", c_int, 2), ("C", c_int, 3), ("D", c_int, 4), ("E", c_int, 5), ("F", c_int, 6), ...
CospanDesign/nysa-gui
refs/heads/master
NysaGui/host/adc_visualizer/__init__.py
12133432
discoverygarden/fcrepo
refs/heads/master
src/fcrepo/tests/__init__.py
12133432
kmoocdev2/edx-platform
refs/heads/real_2019
common/djangoapps/static_replace/management/commands/__init__.py
12133432
fnouama/intellij-community
refs/heads/master
python/testData/refactoring/move/dunderAll/before/src/b.py
12133432
Ahmad31/Web_Flask_Cassandra
refs/heads/master
flask/lib/python2.7/site-packages/cqlengine/tests/connections/__init__.py
12133432
sagark123/coala
refs/heads/master
tests/results/AbsolutePositionTest.py
35
import unittest from coalib.results.AbsolutePosition import AbsolutePosition, calc_line_col from coalib.misc.Constants import COMPLEX_TEST_STRING class AbsolutePositionTest(unittest.TestCase): def test_calc_line_col_newlines(self): # no newlines text = ("find position of 'z'",) z_pos = t...
gilramir/instmake
refs/heads/master
instmakeplugins/report_ovtime.py
1
# Copyright (c) 2010 by Cisco Systems, Inc. """ Report multiple makes in the same directory. """ from instmakelib import instmake_log as LOG description = "Over-all Build Time. Accepts multiple instmake logs." def usage(): print "ovtime:", description def print_ovtime(log_file_name, print_filename): # Open ...
w12n/mascotas
refs/heads/master
mascotas/__init__.py
12133432
JioCloud/horizon
refs/heads/master
openstack_dashboard/dashboards/project/data_processing/data_plugins/urls.py
4
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
stuartsale/pyBHC
refs/heads/master
pyBHC/dists.py
1
from __future__ import print_function, division import abc import numpy as np from numpy.linalg import slogdet import math from scipy import stats from scipy.special import gammaln, multigammaln LOG2PI = math.log(2*math.pi) LOG2 = math.log(2) LOGPI = math.log(math.pi) class CollapsibleDistribution(object): ""...
inverthermit/pacman_ai
refs/heads/master
search/pacman.py
42
# pacman.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # A...
MarcosCommunity/odoo
refs/heads/marcos-8.0
addons/fleet/__init__.py
440
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
ajgallegog/gem5_arm
refs/heads/master
ext/ply/doc/makedoc.py
177
#!/usr/local/bin/python ############################################################################### # Takes a chapter as input and adds internal links and numbering to all # of the H1, H2, H3, H4 and H5 sections. # # Every heading HTML tag (H1, H2 etc) is given an autogenerated name to link # to. However, if the n...
bradleypj823/swift
refs/heads/master
swift/obj/mem_diskfile.py
10
# Copyright (c) 2010-2013 OpenStack, 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 by applicable law or agreed to ...
tiefpunkt/thingstore
refs/heads/master
ThingStoreProject/settings.py
1
# Django settings for ThingStoreProject project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME...
louietsai/python-for-android
refs/heads/master
python-modules/zope/zope/interface/interfaces.py
50
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
jsoref/django
refs/heads/master
django/db/models/sql/where.py
439
""" Code to manage the creation and SQL rendering of 'where' constraints. """ from django.db.models.sql.datastructures import EmptyResultSet from django.utils import tree from django.utils.functional import cached_property # Connection types AND = 'AND' OR = 'OR' class WhereNode(tree.Node): """ Used to repr...
portableant/open-context-py
refs/heads/master
opencontext_py/apps/edit/views.py
2
import json from django.http import HttpResponse, Http404 from django.template import RequestContext, loader from opencontext_py.apps.ocitems.ocitem.models import OCitem from opencontext_py.apps.ocitems.ocitem.templating import TemplateItem
alxgu/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_coe_cluster_template.py
31
#!/usr/bin/python # Copyright (c) 2018 Catalyst IT Ltd. # 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': ['pr...
MadManRises/Madgine
refs/heads/master
shared/bullet3-2.89/examples/pybullet/gym/pybullet_envs/deep_mimic/env/env.py
4
from abc import abstractmethod import sys, abc if sys.version_info >= (3, 4): ABC = abc.ABC else: ABC = abc.ABCMeta('ABC', (), {}) import numpy as np from enum import Enum class Env(ABC): class Terminate(Enum): Null = 0 Fail = 1 Succ = 2 def __init__(self, args, enable_draw): self.enable_dr...
dulaccc/django-accounting
refs/heads/master
accounting/apps/people/admin.py
3
from django.contrib import admin from . import models @admin.register(models.Client) class ClientAdmin(admin.ModelAdmin): pass @admin.register(models.Employee) class EmployeeAdmin(admin.ModelAdmin): pass
yland/coala-bears
refs/heads/master
bears/php/__init__.py
12133432
lfasmpao/safecore-api
refs/heads/master
administrator/models.py
12133432
cjerdonek/pip
refs/heads/develop
tests/data/packages/LocalExtras/localextras/__init__.py
12133432
xuru/pyvisdk
refs/heads/master
pyvisdk/enums/dv_port_status_vm_direct_path_gen2_inactive_reason_other.py
1
######################################## # Automatically generated, do not edit. ######################################## from pyvisdk.thirdparty import Enum DVPortStatusVmDirectPathGen2InactiveReasonOther = Enum( 'portNptIncompatibleConnectee', 'portNptIncompatibleHost', )
WillieMaddox/scipy
refs/heads/master
scipy/io/wavfile.py
13
""" Module to read / write wav files using numpy arrays Functions --------- `read`: Return the sample rate (in samples/sec) and data from a WAV file. `write`: Write a numpy array as a WAV file. """ from __future__ import division, print_function, absolute_import import sys import numpy import struct import warnings...
ehashman/oh-mainline
refs/heads/master
vendor/packages/zope.interface/build_ext_3.py
16
import os import sys from distutils.errors import (CCompilerError, DistutilsExecError, DistutilsPlatformError) try: from setuptools.command.build_ext import build_ext from pkg_resources import (normalize_path, working_set, add_activation_listener, r...
ryokochang/Slab-GCS
refs/heads/master
packages/IronPython.StdLib.2.7.5-beta1/content/Lib/distutils/command/sdist.py
41
"""distutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).""" __revision__ = "$Id$" import os import string import sys from glob import glob from warnings import warn from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from di...
saurabhbajaj207/CarpeDiem
refs/heads/master
venv/Lib/site-packages/pkg_resources/_vendor/six.py
2715
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
Richard2ndQuadrant/ansible
refs/heads/devel
contrib/inventory/linode.py
109
#!/usr/bin/env python ''' Linode external inventory script ================================= Generates inventory that Ansible can understand by making API request to Linode using the Chube library. NOTE: This script assumes Ansible is being executed where Chube is already installed and has a valid config at ~/.chube...
dotKom/onlineweb4
refs/heads/develop
apps/profiles/migrations/0004_auto_20180221_2241.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-02-21 21:41 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('profiles', '0003_privacy_visible_as_attending_events'), ] operations = [ mi...
pallavishende/angular-starter-master
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
1355
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """cmake output module This module is under development and should be considered experimental. This module produces cmake (2.8.8+) input as its output. One CMake...
zmwangx/you-get
refs/heads/develop
src/you_get/util/__init__.py
12133432
agepoly/delegues
refs/heads/develop
djangobb/djangobb_forum/management/commands/__init__.py
12133432
magic0704/neutron
refs/heads/master
neutron/tests/unit/agent/l3/__init__.py
12133432
jdar/phantomjs-modified
refs/heads/master
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/updatesvnrevision.py
143
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
arruda/pyfuzzy
refs/heads/master
fuzzy/set/Triangle.py
1
# -*- coding: iso-8859-1 -*- # # Copyright (C) 2009 Rene Liebscher # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 3 of the License, or (at your option) any # later ver...
vdods/heisenberg
refs/heads/master
heisenberg/plot/__init__.py
1
import heisenberg.library.monte_carlo import heisenberg.library.orbit_plot import heisenberg.library.shooting_method_objective import heisenberg.util import os import sys import traceback import vorpy.pickle subprogram_description = 'Plots an integral curve of the system using given initial condition, optionally runni...
Deep-Abstract/PyMVC
refs/heads/master
daoDetails.py
2
dbargs = {'user': 'your_username', 'password': 'your_passwd', 'db': 'your_db_name', 'host': 'localhost'}
cloudbase/maas
refs/heads/master
src/maastesting/tests/test_scenarios.py
1
# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for `maastesting.scenarios`.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metaclass__ = type __al...
petecummings/django
refs/heads/master
tests/utils_tests/test_glob.py
331
from __future__ import unicode_literals from django.test import SimpleTestCase from django.utils.glob import glob_escape class TestUtilsGlob(SimpleTestCase): def test_glob_escape(self): filename = '/my/file?/name[with special chars*' expected = '/my/file[?]/name[[]with special chars[*]' f...
chouseknecht/ansible
refs/heads/devel
lib/ansible/modules/clustering/consul_kv.py
19
#!/usr/bin/python # # (c) 2015, Steve Gargan <steve.gargan@gmail.com> # (c) 2018 Genome Research Ltd. # 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_versio...
kewu1992/test-infra
refs/heads/master
gubernator/third_party/defusedxml/xmlrpc.py
53
# defusedxml # # Copyright (c) 2013 by Christian Heimes <christian@python.org> # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. """Defused xmlrpclib Also defuses gzip bomb """ from __future__ import print_function, absolute_import import io from .common ...
renard/ansible
refs/heads/devel
lib/ansible/plugins/action/async_status.py
4
# Copyright: (c) 2018, 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 from ansible.errors import AnsibleError from ansible.plugins.action import ActionBase from ansible...
ack8006/Python-mode-klen
refs/heads/master
pymode/libs2/rope/base/prefs.py
91
class Prefs(object): def __init__(self): self.prefs = {} self.callbacks = {} def set(self, key, value): """Set the value of `key` preference to `value`.""" if key in self.callbacks: self.callbacks[key](value) else: self.prefs[key] = value de...
Sparker0i/fosswebsite
refs/heads/master
technical_resources/tests.py
24123
from django.test import TestCase # Create your tests here.
kennedyshead/home-assistant
refs/heads/dev
homeassistant/components/binary_sensor/significant_change.py
5
"""Helper to test significant Binary Sensor state changes.""" from __future__ import annotations from typing import Any from homeassistant.core import HomeAssistant, callback @callback def async_check_significant_change( hass: HomeAssistant, old_state: str, old_attrs: dict, new_state: str, new_a...
tjanez/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_ip_interface.py
11
#!/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...
team-items/MissionControl-Server
refs/heads/master
MC2ML/MC2ML_Parser.py
1
import sys import os import xml.etree.ElementTree as ET MC2MLPath = os.path.dirname(os.path.abspath(__file__)) #direct use flags = [] includes = [] variables = [] functions = [] dataFields = [] controlFields = [] getters = [] actions = [] inits = [] integers = [] floats = [] bools = [] groups = [] sliders = [] butt...
netgroup/wmSDN
refs/heads/master
controller/other_modules/utill.py
21
# Copyright 2011,2012 James McCauley # # This file is part of POX. # # POX 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. # # POX is d...
Endika/odoo
refs/heads/8.0
doc/conf.py
184
# -*- coding: utf-8 -*- import sys, os import sphinx # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. DIR = os.path.dirname(__file...
epssy/hue
refs/heads/master
apps/beeswax/src/beeswax/forms.py
21
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
sposs/DIRAC
refs/heads/integration
Core/Utilities/ClassAd/__init__.py
14
############################################################ # $HeadURL$ ############################################################ """ DIRAC.Core.ClassAd package """ __RCSID__ = "$Id$"
vitan/django
refs/heads/master
django/conf/locale/sr_Latn/__init__.py
12133432
eahneahn/free
refs/heads/master
lib/python2.7/site-packages/django/contrib/sitemaps/management/__init__.py
12133432
catch222/pupy
refs/heads/master
pupy/packages/windows/x86/psutil/_pssunos.py
80
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Sun OS Solaris platform implementation.""" import errno import os import socket import subprocess import sys from collections im...
foreverfaint/scrapy
refs/heads/master
scrapy/tests/test_contracts.py
7
from unittest import TextTestRunner from twisted.trial import unittest from scrapy.spider import Spider from scrapy.http import Request from scrapy.item import Item, Field from scrapy.contracts import ContractsManager from scrapy.contracts.default import ( UrlContract, ReturnsContract, ScrapesContract, ) ...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/wearables/armor/rebel_snow/armor_rebel_snow_leggings.py
14
import sys def setup(core, object): object.setStringAttribute('bio_link', '@obj_attr_n:bio_link_pending') object.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_rebel_snow_armor_3') object.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_rebel_snow_armor_5') obj...
fengbaicanhe/intellij-community
refs/heads/master
python/testData/quickdoc/DirectClass.py
83
# direct class doc class Foo(object): "<the_doc>Doc of Foo." pass <the_ref>Foo
Isendir/brython
refs/heads/master
www/src/Lib/test/test_set.py
16
import unittest from test import support import gc import weakref import operator import copy import pickle from random import randrange, shuffle import sys import warnings import collections import collections.abc class PassThru(Exception): pass def check_pass_thru(): raise PassThru yield 1 class BadCmp...
birocorneliu/youtube-dl
refs/heads/master
youtube_dl/extractor/brightcove.py
89
# encoding: utf-8 from __future__ import unicode_literals import re import json import xml.etree.ElementTree from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_str, compat_urllib_parse, compat_urllib_parse_urlparse, compat_urllib_request, compat_urlparse, comp...
xNovax/SickRage
refs/heads/master
sickbeard/notifiers/pytivo.py
1
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
manashmndl/scikit-learn
refs/heads/master
examples/mixture/plot_gmm.py
248
""" ================================= Gaussian Mixture Model Ellipsoids ================================= Plot the confidence ellipsoids of a mixture of two Gaussians with EM and variational Dirichlet process. Both models have access to five components with which to fit the data. Note that the EM model will necessari...
julian-seward1/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/lint/lint.py
23
from __future__ import print_function, unicode_literals import abc import argparse import ast import itertools import json import os import re import subprocess import sys from collections import defaultdict from . import fnmatch from ..localpaths import repo_root from ..gitignore.gitignore import PathFilter from m...
PetePriority/home-assistant
refs/heads/dev
homeassistant/components/sensor/fitbit.py
5
""" Support for the Fitbit API. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.fitbit/ """ import os import logging import datetime import time import voluptuous as vol from homeassistant.core import callback from homeassistant.components.http i...
maurerpe/FreeCAD
refs/heads/master
src/Tools/generateTemplates/templateCMakeFile.py
12133432
julienaubert/clothstream
refs/heads/master
clothstream/demo/management/commands/__init__.py
12133432
gratipay/gratipay.com
refs/heads/master
gratipay/utils/ghost.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals PACKAGE_JSON = '''\ { "name": "ghost", "version": "1.0.0-alpha.21", "description": "Just a blogging platform.", "author": "Ghost Foundation", "homepage": "http://ghost.org", "keywords": [ "ghost",...
hellwen/mytrade
refs/heads/master
mytrade/setup/views.py
1
# -*- coding: utf-8 -*- from flask import ( Blueprint, request, flash, url_for, redirect, ) from flask_login import login_required from .models import ( Unit, ItemGroup, Company, ) from .forms import ( UnitForm, ItemGroupForm, CompanyForm ) from mytrade.extensions import ( ...
Phil-LiDAR2-Geonode/pl2-geonode
refs/heads/master
geonode/layers/admin.py
17
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
ragupta-git/ImcSdk
refs/heads/master
imcsdk/mometa/bios/BiosVfMemoryMappedIOAbove4GB.py
1
"""This module contains the general information for BiosVfMemoryMappedIOAbove4GB ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class BiosVfMemoryMappedIOAbove4GBConsts: VP_MEMORY_MAPPED_IOABOVE4_GB_DISABLED = "Disabled" ...
x-kalux/bitcoin_WiG-B
refs/heads/W0.1
test/functional/mempool_resurrect_test.py
35
#!/usr/bin/env python3 # Copyright (c) 2014-2016 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 resurrection of mined transactions when the blockchain is re-organized.""" from test_framework.te...
Russell-IO/ansible
refs/heads/devel
lib/ansible/plugins/action/junos_config.py
29
# # (c) 2017, 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...
seann1/portfolio5
refs/heads/master
.meteor/dev_bundle/python/Lib/ctypes/test/test_prototypes.py
36
from ctypes import * from ctypes.test import need_symbol import unittest # IMPORTANT INFO: # # Consider this call: # func.restype = c_char_p # func(c_char_p("123")) # It returns # "123" # # WHY IS THIS SO? # # argument tuple (c_char_p("123"), ) is destroyed after the function # func is called, but NOT before ...
WarrenWeckesser/scikits-image
refs/heads/master
skimage/feature/tests/test_match.py
23
import numpy as np from numpy.testing import assert_equal, assert_raises from skimage import data from skimage import transform as tf from skimage.color import rgb2gray from skimage.feature import (BRIEF, match_descriptors, corner_peaks, corner_harris) def test_binary_descriptors_unequal_...
davidbroadwater/nyc-subway-datascience-project
refs/heads/master
lesson_3/gradient_descent/gradient_descent.py
1
import numpy import pandas def normalize_features(array): """ Normalize the features in our data set. """ array_normalized = (array - array.mean())/array.std() mu = array.mean() sigma = array.std() return array_normalized, mu, sigma def compute_cost(features, values, theta): """ ...
Yrthgze/prueba-sourcetree2
refs/heads/master
burness/0006/extract_key_word_Shlomi_Babluki.py
40
# coding=UTF-8 import nltk from nltk.corpus import brown import os # This is a fast and simple noun phrase extractor (based on NLTK) # Feel free to use it, just keep a link back to this post # http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/ # http://www.sharejs.com/codes/ # C...
hertzsprung/AtmosTests
refs/heads/master
generators/deformationPlane.py
1
from ninjaopenfoam import GhostMesh, DeformationPlaneBuilder, DeformationPlaneCollated import os class DeformationPlane: def __init__(self, parallel, fast): fastMesh = GhostMesh('deformationPlane-mesh-fast', os.path.join('src/deformationPlane/mesh-fast')) meshUniform6 = GhostMesh('deformationPlane...
louissobel/828-qemu-fork
refs/heads/tpm
scripts/qapi-types.py
54
# # QAPI types generator # # Copyright IBM, Corp. 2011 # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level directory. from ordereddict import OrderedDict from qapi import * import sys import os import getopt impor...
miselin/grpc
refs/heads/master
src/python/grpcio/grpc/framework/foundation/future.py
4
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
Deepakkothandan/ansible-modules-extras
refs/heads/devel
database/mssql/__init__.py
12133432
PetrDlouhy/django
refs/heads/master
tests/view_tests/urls.py
12
# -*- coding: utf-8 -*- from os import path from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.utils._os import upath from django.utils.translation import ugettext_lazy as _ from django.views import defaults, i18n, static from . import views base_dir = path.dirname(...
WillisXChen/django-oscar
refs/heads/master
oscar/lib/python2.7/site-packages/IPython/utils/tests/test_localinterfaces.py
12
#----------------------------------------------------------------------------- # Copyright (C) 2013 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #----------------------------------------------------...
kenkeiras/lxc-application-packages
refs/heads/master
lap/conventions.py
1
import os from os.path import expanduser LOCAL_PATH = os.path.join(expanduser("~"), '.local', 'share', 'lap')
liqi328/rjrepaircompany
refs/heads/master
django/contrib/gis/db/models/sql/aggregates.py
309
from django.db.models.sql.aggregates import * from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.db.models.sql.conversion import GeomField class GeoAggregate(Aggregate): # Default SQL template for spatial aggregates. sql_template = '%(function)s(%(field)s)' # Conversion ...