repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
leppa/home-assistant
refs/heads/dev
tests/components/verisure/test_ethernet_status.py
6
"""Test Verisure ethernet status.""" from contextlib import contextmanager from unittest.mock import patch from homeassistant.components.verisure import DOMAIN as VERISURE_DOMAIN from homeassistant.const import STATE_UNAVAILABLE from homeassistant.setup import async_setup_component CONFIG = { "verisure": { ...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Lib/plat-freebsd5/IN.py
374
# Generated by h2py from /usr/include/netinet/in.h IPPROTO_IP = 0 IPPROTO_HOPOPTS = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 IPPROTO_GGP = 3 IPPROTO_IPV4 = 4 IPPROTO_IPIP = IPPROTO_IPV4 IPPROTO_TCP = 6 IPPROTO_ST = 7 IPPROTO_EGP = 8 IPPROTO_PIGP = 9 IPPROTO_RCCMON = 10 IPPROTO_NVPII = 11 IPPROTO_PUP = 12 IPPROTO_ARGUS = 13 ...
quamilek/django
refs/heads/master
django/core/wsgi.py
361
import django from django.core.handlers.wsgi import WSGIHandler def get_wsgi_application(): """ The public interface to Django's WSGI support. Should return a WSGI callable. Allows us to avoid making django.core.handlers.WSGIHandler public API, in case the internal WSGI implementation changes or ...
diagramsoftware/l10n-spain
refs/heads/8.0
l10n_es_partner_mercantil/models/__init__.py
17
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2009 Spanish Localization Team # $Id$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
anomen-s/programming-challenges
refs/heads/master
coderbyte.com/easy/Powers of Two/solve.py
1
''' Using the Python language, have the function PowersofTwo(num) take the num parameter being passed which will be an integer and return the string true if it's a power of two. If it's not return the string false. For example if the input is 16 then your program should return the string true but if the input is 2...
Astoriane/jCrunchyroll
refs/heads/master
lib/crunchy-xml-decoder/unidecode/x058.py
252
data = ( 'Ku ', # 0x00 'Ke ', # 0x01 'Tang ', # 0x02 'Kun ', # 0x03 'Ni ', # 0x04 'Jian ', # 0x05 'Dui ', # 0x06 'Jin ', # 0x07 'Gang ', # 0x08 'Yu ', # 0x09 'E ', # 0x0a 'Peng ', # 0x0b 'Gu ', # 0x0c 'Tu ', # 0x0d 'Leng ', # 0x0e '[?] ', # 0x0f 'Ya ', # 0x10 'Qian ', ...
nuess0r/raspberry_preserve
refs/heads/master
Adafruit_Python_DHT/Adafruit_DHT/Raspberry_Pi.py
17
# Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # 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, mo...
taylorhxu/mickey
refs/heads/master
node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
2214
#!/usr/bin/env python import re import json # http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
bikong2/django
refs/heads/master
tests/field_subclassing/tests.py
214
from __future__ import unicode_literals import inspect from django.core import exceptions, serializers from django.db import connection from django.test import SimpleTestCase, TestCase from .fields import CustomTypedField, Small from .models import ChoicesModel, DataModel, MyModel, OtherModel class CustomField(Tes...
paolodedios/tensorflow
refs/heads/master
tensorflow/lite/python/lite_constants.py
13
# 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...
Jgarcia-IAS/localizacion
refs/heads/master
openerp/addons-extra/odoo-pruebas/odoo-server/addons/website_blog/models/__init__.py
433
import mail_message import website_blog
TangHao1987/intellij-community
refs/heads/master
python/helpers/python-skeletons/struct.py
80
"""Skeleton for 'struct' stdlib module.""" from __future__ import unicode_literals import sys def pack(fmt, *values): """Return a string containing the values packed according to the given format. :type fmt: bytes | unicode :rtype: bytes """ return b'' def unpack(fmt, string): """Unpa...
yuchengdong/project-beta-1
refs/heads/master
code/utils/tests/test_glm.py
4
import os import sys import numpy as np from sklearn import linear_model as lm import numpy.linalg as npl import matplotlib.pyplot as plt import nibabel as nib from numpy.testing import assert_almost_equal, assert_array_equal __file__ = os.getcwd() sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__...
fener06/pyload
refs/heads/master
module/lib/beaker/converters.py
83
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php def asbool(obj): if isinstance(obj, (str, unicode)): obj = obj.strip().lower() if obj in ['true', 'yes', 'on', 'y', 't', '1']: ...
drufat/vispy
refs/heads/master
vispy/util/svg/path.py
21
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- import re import math...
ccastell/Transfer-System
refs/heads/master
Website/env/lib/python3.5/site-packages/django/contrib/gis/geos/prototypes/prepared.py
178
from ctypes import c_char from django.contrib.gis.geos.libgeos import ( GEOM_PTR, PREPGEOM_PTR, GEOSFuncFactory, ) from django.contrib.gis.geos.prototypes.errcheck import check_predicate # Prepared geometry constructor and destructors. geos_prepare = GEOSFuncFactory('GEOSPrepare', argtypes=[GEOM_PTR], restype=PRE...
wormer/funrun
refs/heads/master
src/funrun/history/views.py
2
from django.db import models from django.shortcuts import render, get_object_or_404 from django.utils import timezone from .models import Sheet, Player, Match, Participation def sheets(request): processed = (Sheet.objects .filter(matches__isnull=False) .annotate( from_date=models.Min('matches__date'), to_d...
jebtang/likwid
refs/heads/master
test/profile_ctr/test_all_events.py
12
#!/usr/bin/env python import sys, os, re, subprocess, time perfctr = "../../likwid-perfctr" testcommand = "hostname" outfilename = "/tmp/profile/ctr_read_write_cyc" outfilename_suffix =".txt" counters = [] eventdict = {} parse_events = 0 LOOPS= 100 good_counters = ["PMC", "MBOX", "PWR", "TMP"] selected_counters =...
CydarLtd/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_networks_facts.py
49
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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 late...
pelson/cartopy
refs/heads/master
lib/cartopy/vector_transform.py
3
# (C) British Crown Copyright 2013 - 2018, Met Office # # This file is part of cartopy. # # cartopy 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)...
CentroGeo/geonode
refs/heads/master
geonode/geoapps/admin.py
6
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2020 OSGeo # # 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 ...
idstudiolab/imagestore
refs/heads/master
src/imagestore/accountcontainer.py
2
import grok from imagestore.interfaces import IRest from imagestore.xml import XmlContainerBase, NS, XmlContainerFactoryBase from imagestore.account import Account class AccountContainer(grok.Container): grok.implements(IRest) class AccountContainerXml(XmlContainerBase): tag = 'accounts' is_deletable = F...
gaoyingie/YouCompleteMe
refs/heads/master
python/ycm/tests/base_test.py
48
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 t...
akshitgrover/Python-Scripts
refs/heads/master
bin/facebook-auto-post.py
2
from selenium import webdriver from selenium.webdriver.common.keys import Keys from time import sleep from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By from s...
anilveeramalli/cloudify-azure-plugin
refs/heads/master
blueprints/clustered-dns/pen/pen_stop.py
2
import subprocess, os, sys def main(): subprocess.call("pidof pen > allpid.txt", shell=True) all_pid_file = open("/root/allpid.txt", 'r') all_pid_file_content = all_pid_file.read() all_pid_file.close() kill_command = "kill " + all_pid_file_content print kill_command subprocess.call(kill_command, s...
HSAnet/glimpse_client
refs/heads/develop
3rdparty/breakpad/src/tools/gyp/test/subdirectory/gyptest-top-all.py
240
#!/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 building a target and a subsidiary dependent target from a .gyp file in a subdirectory, without specifying an explicit output b...
Richard-West/RootTheBox
refs/heads/master
bot/build_bot.py
6
#!/usr/bin/env python """ Created on Feb 24, 2012 @author: moloch Copyright 2012 Root the Box 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...
soycode/pattern
refs/heads/master
pattern/server/cherrypy/cherrypy/lib/__init__.py
40
"""CherryPy Library""" # Deprecated in CherryPy 3.2 -- remove in CherryPy 3.3 from cherrypy.lib.reprconf import unrepr, modules, attributes class file_generator(object): """Yield the given input (a file object) in chunks (default 64k). (Core)""" def __init__(self, input, chunkSize=65536): self.input ...
MaxiCM/android_kernel_motorola_msm8226
refs/heads/maxi-5.1
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
dylanshine/streamschool
refs/heads/master
run.py
1
import os from project import app port = int(os.environ.get("PORT", 5000)) app.run(host='0.0.0.0', port=port, debug=True)
seem-sky/kbengine
refs/heads/master
kbe/src/lib/python/Lib/tokenize.py
78
"""Tokenization help for Python programs. tokenize(readline) is a generator that breaks a stream of bytes into Python tokens. It decodes the bytes according to PEP-0263 for determining source file encoding. It accepts a readline-like method which is called repeatedly to get the next line of input (or b"" for EOF). ...
QianBIG/odoo
refs/heads/8.0
addons/l10n_th/__init__.py
893
# -*- 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...
lptorres/noah-inasafe
refs/heads/master
web_api/safe/impact_functions/core.py
1
"""Function to manage self-registering plugins The design is based on http://effbot.org/zone/metaclass-plugins.htm To register the plugin, the module must be imported by the Python process using it. """ import logging from math import ceil import numpy from third_party.odict import OrderedDict impo...
mendersoftware/integration
refs/heads/master
tests/tests/test_portforward.py
1
# Copyright 2021 Northern.tech AS # # 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 ag...
jordiclariana/ansible
refs/heads/devel
lib/ansible/modules/network/basics/uri.py
25
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Romeo Theriault <romeot () hawaii.edu> # # 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 th...
Aptitudetech/ERPNext
refs/heads/master
erpnext/support/doctype/__init__.py
37694
from __future__ import unicode_literals
pedropena/iteexe
refs/heads/master
twisted/web/woven/simpleguard.py
14
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # """ A simple guard framework for implementing web sites that only need 'Anonymous' vs 'Logged on' distinction, but nothing more. If you need * multiple levels of access, or * multiple-interface applications, or * anything else mor...
openshift/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.10.0-0.29.0/roles/lib_openshift/src/lib/replicationcontroller.py
84
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-public-methods class ReplicationController(DeploymentConfig): ''' Class to model a replicationcontroller openshift object. Currently we are modeled after a deployment config since they are very similar. In the future, when the need ar...
anksp21/Community-Zenpacks
refs/heads/master
ZenPacks.community.SNMPLocation/ZenPacks/community/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
ovnicraft/server-tools
refs/heads/10.0
setup/base_kanban_stage_state/odoo/addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
atsareg/WebAppDIRAC
refs/heads/integration
WebApp/handler/PublicStateManagerHandler.py
2
from WebAppDIRAC.Lib.WebHandler import WebHandler, WErr, WOK, asyncGen from DIRAC import gConfig, S_OK, S_ERROR, gLogger from DIRAC.Core.Utilities import Time import json class PublicStateManagerHandler( WebHandler ): AUTH_PROPS = "authenticated" @asyncGen def web_getTreeMenuItems( self ): applications =...
lagopus/lagopus
refs/heads/master
test/ryu/vsw-602_mp_desc.py
1
from ryu.base.app_manager import RyuApp from ryu.controller.ofp_event import EventOFPSwitchFeatures from ryu.controller.ofp_event import EventOFPDescStatsReply from ryu.controller.handler import set_ev_cls from ryu.controller.handler import CONFIG_DISPATCHER from ryu.controller.handler import MAIN_DISPATCHER from ryu.o...
optima-ict/odoo
refs/heads/9.0
doc/_extensions/github_link.py
229
import inspect import importlib import os.path from urlparse import urlunsplit """ * adds github_link(mode) context variable: provides URL (in relevant mode) of current document on github * if sphinx.ext.linkcode is enabled, automatically generates github linkcode links (by setting config.linkcode_resolve) Settin...
canvasnetworks/canvas
refs/heads/master
website/canvas/management/commands/generate_footer.py
2
import datetime import os from tempfile import TemporaryFile import webbrowser from django.core.files.temp import gettempdir from django.core.management.base import BaseCommand, CommandError from canvas.models import Comment from django.conf import settings class Command(BaseCommand): args = 'filename' help...
philipkershaw/ndg_security_server
refs/heads/master
ndg/security/server/wsgi/client_proxy/middleware.py
1
"""Middleware for NDG Security HTTP Proxy MashMyData Project """ __author__ = "P J Kershaw" __date__ = "21/12/10" __copyright__ = "(C) 2011 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revision__ = "$Id$" import log...
adlius/osf.io
refs/heads/develop
osf/migrations/0101_merge_20180508_1011.py
16
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-05-08 15:11 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('osf', '0099_migrate_comments_on_deleted_objects'), ('osf', '0100_set_access_request_enabled...
jnovinger/django
refs/heads/master
django/test/html.py
251
""" Comparing two html documents. """ from __future__ import unicode_literals import re from django.utils import six from django.utils.encoding import force_text, python_2_unicode_compatible from django.utils.html_parser import HTMLParseError, HTMLParser WHITESPACE = re.compile('\s+') def normalize_whitespace(str...
DavidLP/home-assistant
refs/heads/dev
homeassistant/components/hassio/const.py
6
"""Hass.io const variables.""" ATTR_ADDONS = 'addons' ATTR_DISCOVERY = 'discovery' ATTR_ADDON = 'addon' ATTR_NAME = 'name' ATTR_SERVICE = 'service' ATTR_CONFIG = 'config' ATTR_UUID = 'uuid' ATTR_USERNAME = 'username' ATTR_PASSWORD = 'password' ATTR_PANELS = 'panels' ATTR_ENABLE = 'enable' ATTR_TITLE = 'title' ATTR_ICO...
rbalda/neural_ocr
refs/heads/master
env/lib/python2.7/site-packages/django/db/transaction.py
238
from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, Error, ProgrammingError, connections, ) from django.utils.decorators import ContextDecorator class TransactionManagementError(ProgrammingError): """ This exception is thrown when transaction management is used improperly. """ pass def get_...
faux123/BBB_kernel
refs/heads/tmp-patching-branch-sha
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
Tanmay28/coala
refs/heads/master
bears/c_languages/codeclone_detection/ClangCountVectorCreator.py
1
from bears.c_languages.codeclone_detection.CountVector import CountVector from bears.c_languages.codeclone_detection.ClangCountingConditions import ( is_reference, get_identifier_name, is_literal, is_function_declaration) from coalib.bearlib.parsing.clang.cindex import Cursor, Index class ClangCountVe...
aabbox/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_finalization.py
84
""" Tests for object finalization semantics, as outlined in PEP 442. """ import contextlib import gc import unittest import weakref try: from _testcapi import with_tp_del except ImportError: def with_tp_del(cls): class C(object): def __new__(cls, *args, **kwargs): raise Typ...
moden-py/pywinauto
refs/heads/UIA
pywinauto/six.py
1
"""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...
viaembedded/arm-soc
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
babycaseny/meld
refs/heads/master
meld/vc/svn.py
1
# Copyright (C) 2002-2005 Stephen Kennedy <stevek@gnome.org> # Copyright (C) 2011-2013, 2015 Kai Willadsen <kai.willadsen@gmail.com> # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code...
bratsche/Neutron-Drive
refs/heads/master
google_appengine/lib/django_1_3/django/core/management/commands/startproject.py
322
from django.core.management.base import copy_helper, CommandError, LabelCommand from django.utils.importlib import import_module import os import re from random import choice class Command(LabelCommand): help = "Creates a Django project directory structure for the given project name in the current directory." ...
pyKun/rally
refs/heads/master
tests/unit/deployment/test_lxc.py
2
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
akhilaananthram/nupic
refs/heads/master
nupic/frameworks/__init__.py
463
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
rCorvidae/OrionPI
refs/heads/master
src/tests/Updater/TestUpdaterDataProcessor.py
1
from bin.Updater.UpdaterDataProcessor import UpdaterDataProcessor from unittest.mock import patch import unittest class TestUpdaterDataProcessor(unittest.TestCase): def setUp(self): self.data_processor = UpdaterDataProcessor() self.random_data = b"random binary data in bytes :D" def test_proc...
xuanhan863/zulip
refs/heads/master
zerver/management/commands/deactivate_realm.py
116
from __future__ import absolute_import from django.core.management.base import BaseCommand from zerver.lib.actions import do_deactivate_realm from zerver.models import get_realm class Command(BaseCommand): help = """One-off script to deactivate our old realms.""" def add_arguments(self, parser): par...
kawamon/hue
refs/heads/master
desktop/core/ext-py/ply-3.11/test/yacc_misplaced.py
174
# ----------------------------------------------------------------------------- # yacc_misplaced.py # # A misplaced | in grammar rules # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import...
NL66278/odoo
refs/heads/8.0
addons/stock_dropshipping/__openerp__.py
52
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
GrandPaRPi/p2ptv-pi
refs/heads/master
acestream/ACEStream/Core/BitTornado/BT1/Storage.py
3
#Embedded file name: ACEStream\Core\BitTornado\BT1\Storage.pyo import sys import os import binascii import math from threading import Lock from time import strftime, localtime, time from os.path import exists, getsize, getmtime as getmtime_, basename from traceback import print_stack from bisect import bisect try: ...
nguyentu1602/statsmodels
refs/heads/master
examples/python/tsa_arma_0.py
22
## Autoregressive Moving Average (ARMA): Sunspots data from __future__ import print_function import numpy as np from scipy import stats import pandas as pd import matplotlib.pyplot as plt import statsmodels.api as sm from statsmodels.graphics.api import qqplot ### Sunpots Data print(sm.datasets.sunspots.NOTE) ...
nicoboss/Floatmotion
refs/heads/master
OpenGL/EGL/EXT/client_extensions.py
8
'''OpenGL extension EXT.client_extensions This module customises the behaviour of the OpenGL.raw.EGL.EXT.client_extensions to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/EXT/client_extensions.txt ''' from OpenGL import platform...
simudream/dask
refs/heads/master
dask/tests/test_rewrite.py
13
from dask.rewrite import RewriteRule, RuleSet, head, args, VAR, Traverser def inc(x): return x + 1 def add(x, y): return x + y def double(x): return x * 2 def test_head(): assert head((inc, 1)) == inc assert head((add, 1, 2)) == add assert head((add, (inc, 1), (inc, 1))) == add asser...
mitodl/configuration
refs/heads/master
util/aws_ip_locator/ipcollector.py
4
from __future__ import absolute_import from __future__ import print_function import boto3 import click import socket import json @click.group() def cli(): pass @click.command() @click.option('--file_name', required=True, help=""" file containing tags name etc that you wou...
westinedu/similarinterest
refs/heads/master
mezzanine/utils/cache.py
2
from hashlib import md5 from time import time from django.core.cache import cache from django.utils.cache import _i18n_cache_key_suffix from mezzanine.conf import settings from mezzanine.utils.device import device_from_request from mezzanine.utils.sites import current_site_id def _hashed_key(key): """ Hash...
openthread/openthread
refs/heads/main
tools/harness-automation/cases/med_9_2_13.py
18
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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. Redistributions of source code must retain the above copyright # notic...
richpolis/siveinpy
refs/heads/master
env/lib/python2.7/site-packages/django/utils/unittest/__init__.py
571
""" unittest2 unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7. It is tested to run on Python 2.4 - 2.6. To use unittest2 instead of unittest simply replace ``import unittest`` with ``import unittest2``. Copyright (c) 1999-2003 Steve Purcell Copyright (c) 2003-2010 P...
Tejal011089/digitales_erpnext
refs/heads/develop
erpnext/selling/doctype/quotation/test_quotation.py
37
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe, json from frappe.utils import flt import unittest test_dependencies = ["Sales BOM"] class TestQuotation(unittest.TestCase): def test_make_sales_order(self): from erpnext...
shaded-enmity/ansible-modules-extras
refs/heads/devel
notification/sns.py
61
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Michael J. Schultz <mjschultz@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 ...
pstjohn/cobrapy
refs/heads/master
cobra/core/Solution.py
4
class Solution(object): """Stores the solution from optimizing a cobra.Model. This is used to provide a single interface to results from different solvers that store their values in different ways. f: The objective value solver: A string indicating which solver package was used. x: List or Ar...
mdelpozobanos/eeglcf
refs/heads/develop
setup.py
1
#!/usr/bin/env python import io import re from setuptools import setup from setuptools.command.test import test as TestCommand import sys def find_version(*file_paths): """ Finds the *__version__* of a package by reading it from __init__.py """ version_file = read(*file_paths) version_match = re....
henrytao-me/openerp.positionq
refs/heads/master
openerp/addons/survey/survey.py
22
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
ruslanloman/nova
refs/heads/master
nova/api/openstack/compute/contrib/baremetal_ext_status.py
100
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
tmpgit/intellij-community
refs/heads/master
python/testData/joinLines/StringTripleQuotesDifferent-after.py
79
'''This doc comment is quite separate''' """from the literal below"""
haoji/gwl
refs/heads/master
cron/updateGameCache.py
1
import urllib2 urllib2.urlopen('http://www.gamingwithlemons.com/cron/update')
caphrim007/ansible
refs/heads/devel
lib/ansible/modules/network/panos/_panos_nat_policy.py
35
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
riklaunim/django-custom-multisite
refs/heads/master
tests/regressiontests/context_processors/tests.py
96
""" Tests for Django's bundled context processors. """ from django.test import TestCase class RequestContextProcessorTests(TestCase): """ Tests for the ``django.core.context_processors.request`` processor. """ urls = 'regressiontests.context_processors.urls' def test_request_attributes(self): ...
cyberark-bizdev/ansible
refs/heads/devel
contrib/inventory/rax.py
46
#!/usr/bin/env python # (c) 2013, Jesse Keating <jesse.keating@rackspace.com, # Paul Durivage <paul.durivage@rackspace.com>, # Matt Martz <matt@sivel.net> # # This file is part of Ansible. # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
mvaled/OpenUpgrade
refs/heads/8.0
openerp/addons/test_new_api/tests/__init__.py
134
# -*- coding: utf-8 -*- from . import test_related from . import test_new_fields from . import test_onchange from . import test_field_conversions from . import test_attributes
ojengwa/ibu
refs/heads/master
ibu/backends/mysql/operations.py
2
from __future__ import unicode_literals import uuid from ibu.backends.base.operations import BaseDatabaseOperations import six from time import timezone class DatabaseOperations(BaseDatabaseOperations): compiler_module = "ibu.backends.mysql.compiler" # MySQL stores positive fields as UNSIGNED ints. int...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/tests/migrations/test_graph.py
24
from unittest import expectedFailure from django.db.migrations.graph import ( CircularDependencyError, MigrationGraph, NodeNotFoundError, ) from django.test import TestCase from django.utils.encoding import force_text class GraphTests(TestCase): """ Tests the digraph structure. """ def test_simp...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/testData/completion/submoduleOfIndirectlyImportedPackage/pkg1/__init__.py
961
VAR = 42
ProjectSWGCore/NGECore2
refs/heads/master
scripts/skillMods/fast_attack_line_me_revive.py
1156
import sys def add(core, actor, skillMod, value): return def deduct(core, actor, skillMod, value): return
indautgrp/erpnext
refs/heads/develop
erpnext/patches/v6_4/__init__.py
37694
from __future__ import unicode_literals
ovresko/erpnext
refs/heads/master
erpnext/setup/doctype/email_digest/__init__.py
37694
from __future__ import unicode_literals
retomerz/intellij-community
refs/heads/master
python/testData/copyPaste/IndentTab.dst.py
83
class Test: def __init__(self): <caret> print "Line 1"
civisanalytics/ansible
refs/heads/civis
lib/ansible/modules/cloud/vmware/vsphere_guest.py
11
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
kdrone/crazyflie-python-client
refs/heads/master
lib/cfclient/ui/dialogs/cf2config.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
danimajo/pineapple_pdf
refs/heads/master
reportlab/pdfbase/__init__.py
37
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfbase/__init__.py __version__=''' $Id$ ''' __doc__="""Internal functionality for creating PDF files - not part of API """
aitormf/JdeRobot
refs/heads/master
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_tracker.py
15
#!/usr/bin/env python ''' Antenna tracker control module This module catches MAVLINK_MSG_ID_GLOBAL_POSITION_INT and sends them to a MAVlink connected antenna tracker running ardupilot AntennaTracker Mike McCauley, based on earlier work by Andrew Tridgell June 2012 ''' import sys, os, time from MAVProxy.modules.lib imp...
zenoss/Community-Zenpacks
refs/heads/master
ZenPacks.community.OpenSolaris/ZenPacks/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
audebert/alot
refs/heads/master
alot/db/utils.py
3
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import os import email import tempfile import re from email.header import Header import email.charset as charset charset.add_charset('u...
jonyroda97/redbot-amigosprovaveis
refs/heads/develop
cogs/penis.py
2
import discord import random from discord.ext import commands class Penis: """Penis related commands.""" def __init__(self, bot): self.bot = bot @commands.command() async def penis(self, *, user : discord.Member): """Detects user's penis length This is 100% accurate.""" ...
Serg09/socorro
refs/heads/master
socorro/external/es/supersearch.py
3
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import re from elasticsearch_dsl import Search, A, F, Q from elasticsearch.exceptions import NotFoundErr...
zzicewind/nova
refs/heads/master
nova/tests/unit/virt/test_imagecache.py
63
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
tarballs-are-good/sympy
refs/heads/master
sympy/polys/densetools.py
3
"""Advanced tools for dense recursive polynomials in `K[x]` or `K[X]`. """ from sympy.polys.densebasic import ( dup_strip, dmp_strip, dup_reverse, dup_convert, dmp_convert, dup_degree, dmp_degree, dmp_degree_in, dup_to_dict, dmp_to_dict, dup_from_dict, dmp_from_dict, dup_LC, dmp_LC, dmp_gro...
meizhoubao/three.js
refs/heads/master
utils/converters/obj/split_obj.py
369
"""Split single OBJ model into mutliple OBJ files by materials ------------------------------------- How to use ------------------------------------- python split_obj.py -i infile.obj -o outfile Will generate: outfile_000.obj outfile_001.obj ... outfile_XXX.obj ------------------------------------- Parser based ...