repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
sirrice/scorpion | refs/heads/master | scorpion/tests/run_cache_experiments.py | 1 | import os
from sqlalchemy import create_engine
from common import *
def print_clusters(sub, dim, clusters=[], tuples=[], title=''):
xattr = 'a_%d' % dim
yattr = 'a_%d' % (dim+1)
for cluster in clusters:
bbox = tuple(map(list, zip(*cluster.bbox)))
# we want bounds for attrs a_dim, a_dim+1, but bbox cols
... |
sidja/django-debug-toolbar | refs/heads/master | debug_toolbar/panels/templates/panel.py | 7 | from __future__ import absolute_import, unicode_literals
from contextlib import contextmanager
from os.path import normpath
from pprint import pformat
import django
from django import http
from django.conf.urls import url
from django.db.models.query import QuerySet, RawQuerySet
from django.template import Context, Re... |
uxlsl/uxlsl.github.io | refs/heads/master | demo/code/2015-12-22/myadmin/superhero/views.py | 6445 | from django.shortcuts import render
# Create your views here.
|
jesusfcr/airflow | refs/heads/master | airflow/www/forms.py | 51 | # -*- coding: utf-8 -*-
#
# 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
... |
uberamd/NGECore2 | refs/heads/master | scripts/object/tangible/wearables/armor/galactic_marine/armor_galactic_marine_leggings.py | 85615 | import sys
def setup(core, object):
return |
uberamd/NGECore2 | refs/heads/master | scripts/object/static/creature/tatooine_cu_pa.py | 85615 | import sys
def setup(core, object):
return |
kikusu/chainer | refs/heads/master | tests/cupy_tests/math_tests/test_floating.py | 24 | import unittest
import numpy
import cupy
from cupy import testing
@testing.gpu
class TestFloating(unittest.TestCase):
_multiprocess_can_split_ = True
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(atol=1e-5)
def check_unary(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), ... |
tensorflow/adanet | refs/heads/master | adanet/modelflow_test.py | 1 | # Lint as: python3
# Copyright 2020 The AdaNet 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
# https://www.apache.org/licenses/LICENSE-2.0
# Unless requir... |
lauri-codes/GameShop | refs/heads/master | gameshop/social/backends/stripe.py | 86 | """
Stripe OAuth2 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/stripe.html
"""
from social.backends.oauth import BaseOAuth2
class StripeOAuth2(BaseOAuth2):
"""Stripe OAuth2 authentication backend"""
name = 'stripe'
ID_KEY = 'stripe_user_id'
AUTHORIZATION_URL = 'https://connect.stri... |
evgchz/scikit-learn | refs/heads/master | examples/manifold/plot_manifold_sphere.py | 258 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=============================================
Manifold Learning methods on a severed sphere
=============================================
An application of the different :ref:`manifold` techniques
on a spherical data-set. Here one can see the use of
dimensionality reducti... |
cbuben/cloud-init | refs/heads/master | cloudinit/sources/DataSourceEc2.py | 7 | # vi: ts=4 expandtab
#
# Copyright (C) 2009-2010 Canonical Ltd.
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
# Copyright (C) 2012 Yahoo! Inc.
#
# Author: Scott Moser <scott.moser@canonical.com>
# Author: Juerg Hafliger <juerg.haefliger@hp.com>
# Author: Joshua Harlow <harlowja@yahoo-... |
tdtrask/ansible | refs/heads/devel | lib/ansible/modules/cloud/google/gcp_url_map.py | 99 | #!/usr/bin/python
# Copyright 2017 Google Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... |
raycarnes/partner-contact | refs/heads/8.0 | partner_contact_gender/__openerp__.py | 9 | # -*- encoding: utf-8 -*-
# Odoo, Open Source Management Solution
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either versio... |
xxxIsaacPeralxxx/anim-studio-tools | refs/heads/master | grenade/tests/unit/test_translators/test_human_user.py | 5 | #
# Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), its
# affiliates and/or its licensors.
#
from ..helpers.translators import verify_translate
from grenade.translators.human_user import HumanUserTranslator
from probe.fixtures.mock_shotgun import MockShotgun
class TestHumanUserTranslator(o... |
1T/harlib | refs/heads/master | harlib_viewer/__init__.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# harlib
# Copyright (c) 2014-2017, Andrew Robbins, All rights reserved.
#
# This library ("it") is free software; it is distributed in the hope that it
# will be useful, but WITHOUT ANY WARRANTY; you can redistribute it and/or
# modify it under the terms of LGPLv3 <https... |
indictranstech/vestasi-erpnext | refs/heads/develop | erpnext/selling/doctype/lead/test_lead.py | 41 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
test_records = frappe.get_test_records('Lead')
class TestLead(unittest.TestCase):
def test_make_customer(self):
f... |
webmasterraj/FogOrNot | refs/heads/master | flask/lib/python2.7/site-packages/pandas/io/sql.py | 2 | # -*- coding: utf-8 -*-
"""
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
"""
from __future__ import print_function, division
from datetime import datetime, date
import warnings
import traceback
import re
import numpy as np
import pandas.li... |
siyo-wang/IdentityServer4 | refs/heads/translate | docs/conf.py | 3 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# IdentityServer4 documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 20 08:57:27 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in t... |
barachka/odoo | refs/heads/master | addons/resource/faces/task.py | 433 | #@+leo-ver=4
#@+node:@file task.py
#@@language python
#@<< Copyright >>
#@+node:<< Copyright >>
############################################################################
# Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH
# mreithinger@web.de
#
# This file is part of faces.
#
# faces is free software; ... |
wiki-ai/revscoring | refs/heads/master | tests/languages/test_ukrainian.py | 2 | import pickle
from revscoring.datasources import revision_oriented
from revscoring.dependencies import solve
from revscoring.languages import ukrainian
from .util import compare_extraction
BAD = [
"довбойоб", "сучий", "ебать", "пісяти", "серун", "бздюха", "бздюх",
"матюгальники", "їбе", "вйоб", "дристало", "... |
tg-msft/azure-sdk-tools | refs/heads/master | packages/python-packages/api-stub-generator/apistub/nodes/_class_node.py | 1 | import logging
import inspect
import enum
from enum import Enum
import types
import operator
from ._base_node import NodeEntityBase
from ._function_node import FunctionNode
from ._enum_node import EnumNode
from ._property_node import PropertyNode
from ._docstring_parser import DocstringParser
from ._variable_node impo... |
2014c2g14/w17test2 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/external_import.py | 742 | import os
from browser import doc
import urllib.request
## this module is able to download modules that are external to
## localhost/src
## so we could download from any URL
class ModuleFinder:
def __init__(self, path_entry):
print("external_import here..")
#print(path_entry)
self._module=... |
thisthat/floodlight-controller | refs/heads/master | src/main/python/compileall.py | 251 | """Module/script to "compile" all .py files to .pyc (or .pyo) file.
When called as a script with arguments, this compiles the directories
given as arguments recursively; the -l option prevents it from
recursing into directories.
Without arguments, if compiles all modules on sys.path, without
recursing into subdirecto... |
trunca/enigma2 | refs/heads/6.5 | lib/python/Components/Renderer/PiconUni.py | 4 | #(c) 2boom mod 2012
from Renderer import Renderer
from enigma import ePixmap, eTimer
from Tools.Directories import fileExists, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, resolveFilename
from Tools.LoadPixmap import LoadPixmap
from Components.Pixmap import Pixmap
from Components.config import *
class PiconUni(Renderer... |
n8mob/dcpu16py | refs/heads/master | emuplugin.py | 3 | import glob
import imp
from os.path import join, basename, splitext, dirname
PLUGINS_DIR = join(dirname(__file__), "plugins")
def importPlugins(dir=PLUGINS_DIR):
# http://tinyurl.com/cfceawr
return [_load(path).plugin for path in glob.glob(join(dir, "[!_]*.py"))]
def _load(path):
# http://tinyurl.com/c... |
abhiQmar/servo | refs/heads/master | tests/wpt/web-platform-tests/mathml/tools/scripts.py | 101 | #!/usr/bin/python
from utils import mathfont
import fontforge
v = 3 * mathfont.em
f = mathfont.create("scripts-spaceafterscript%d" % v)
f.math.SpaceAfterScript = v
f.math.SubSuperscriptGapMin = 0
f.math.SubscriptBaselineDropMin = 0
f.math.SubscriptShiftDown = 0
f.math.SubscriptTopMax = 0
f.math.SuperscriptBaselineDro... |
llooker/python_sdk | refs/heads/master | lookerapi/models/permission_set.py | 1 | # coding: utf-8
"""
Looker API 3.0 Reference
### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token.... |
agry/NGECore2 | refs/heads/master | scripts/object/draft_schematic/furniture/wod_potted_plant_scem_06.py | 85615 | import sys
def setup(core, object):
return |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/mobile/dressed_commoner_tatooine_aqualish_female_05.py | 85615 | import sys
def setup(core, object):
return |
sertac/django | refs/heads/master | tests/utils_tests/test_checksums.py | 205 | import unittest
from django.test import ignore_warnings
from django.utils.deprecation import RemovedInDjango110Warning
class TestUtilsChecksums(unittest.TestCase):
def check_output(self, function, value, output=None):
"""
Check that function(value) equals output. If output is None,
chec... |
phamelin/ardupilot | refs/heads/master | Tools/scripts/decode_ICSR.py | 13 | #!/usr/bin/env python
'''
decode an stm32 ICSR register value
'''
import sys
import optparse
class DecodeICSR(object):
# https://www.st.com/content/ccc/resource/technical/document/programming_manual/6c/3a/cb/e7/e4/ea/44/9b/DM00046982.pdf/files/DM00046982.pdf/jcr:content/translations/en.DM00046982.pdf
# page ... |
caldwell/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_extensions.py | 413 | #!/usr/bin/env python
#
# Copyright 2012, 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... |
facepalm/personal-space | refs/heads/master | src/util.py | 1 | import logging
import numpy as np
import string
import globalvars
import uuid
import pickle
import os
#TIME_FACTOR = 168 # 1 irl hour = 1 week
#TIME_FACTOR = 24 # 1 irl hour = 1 day
#TIME_FACTOR = 120
#ZOOM = 15
equipment_targets = dict()
#GRAPHICS = None
GLOBAL_X=0
GLOBAL_Y=0
def radian(deg):
return 3.14159*d... |
puterakahfi/learn-python | refs/heads/master | flask/hello.py | 28 | from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
|
40223229/CDB_Final2 | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_runner.py | 785 | import io
import os
import sys
import pickle
import subprocess
import unittest
from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun
class TestCleanUp(unittest.TestCase):
def testCleanUp(self):
class TestableTest(unittest.TestCase):
def testNothing(self):
p... |
informatics-isi-edu/microscopy | refs/heads/master | rbk/worker/upload_youtube/clientlib/rbk_upload_youtube_lib/__init__.py | 39 | from client import *
|
Pluto-tv/blink-crosswalk | refs/heads/master | Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/server.py | 64 | import BaseHTTPServer
import errno
import os
import re
import socket
from SocketServer import ThreadingMixIn
import ssl
import sys
import threading
import time
import traceback
import types
import urlparse
import routes as default_routes
from logger import get_logger
from request import Server, Request
from response i... |
axmachado/simplepos | refs/heads/master | simplepos/compiler/SimplePOSLexer.py | 1 | # Generated from SimplePOS.g4 by ANTLR 4.6
from antlr4 import *
from io import StringIO
# -*- coding: utf-8 -*-
"""
Copyright © 2017 - Alexandre Machado <axmachado@gmail.com>
This file is part of Simple POS Compiler.
Simnple POS Compiler is free software: you can redistribute it
and/or modify it unde... |
CodingVault/LeetCodeInPython | refs/heads/master | triangle.py | 1 | #!/usr/bin/env python
# encoding: utf-8
"""
triangle.py
Created by Shengwei on 2014-07-03.
"""
# https://oj.leetcode.com/problems/triangle/
"""
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
... |
caktus/django-timepiece | refs/heads/develop | timepiece/crm/utils.py | 6 | from itertools import groupby
from django.db.models import Sum
from timepiece.utils import add_timezone, get_hours_summary, get_week_start
def daily_summary(day_entries):
projects = {}
all_day = {}
for name, entries in groupby(day_entries, lambda x: x['project__name']):
hours = get_hours_summary... |
RemoteEvilDragon/shadowsocks | refs/heads/master | backup/shadowsocks/eventloop.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013-2015 clowwindy
#
# 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... |
ubuntu-touch-apps/filemanager-app | refs/heads/master | tests/autopilot/filemanager/tests/test_filemanager.py | 1 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
# Copyright (C) 2013, 2014 Canonical Ltd.
#
# 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; version 3.
#
# Thi... |
Konubinix/qutebrowser | refs/heads/master | scripts/dev/segfault_test.py | 8 | #!/usr/bin/env python3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pu... |
cloudera/hue | refs/heads/master | desktop/core/ext-py/Django-1.11.29/tests/swappable_models/models.py | 581 | from django.db import models
class Article(models.Model):
title = models.CharField(max_length=100)
publication_date = models.DateField()
class Meta:
swappable = 'TEST_ARTICLE_MODEL'
class AlternateArticle(models.Model):
title = models.CharField(max_length=100)
publication_date = models.... |
leafclick/intellij-community | refs/heads/master | python/testData/inspections/PyUnresolvedReferencesInspection3K/noMostDerivedMetaClass.py | 40 | class M1(type):
def foo(cls):
pass
class M2(type):
def bar(cls):
pass
class C1(metaclass=M1):
pass
class C2(metaclass=M2):
pass
class D(C1, C2):
pass
print(D.<warning descr="Unresolved attribute reference 'foo' for class 'D'">foo</warning>()())
print(D.<warning descr="Unres... |
xNovax/SickRage | refs/heads/master | lib/hachoir_parser/archive/sevenzip.py | 93 | """
7zip file parser
Informations:
- File 7zformat.txt of 7-zip SDK:
http://www.7-zip.org/sdk.html
Author: Olivier SCHWAB
Creation date: 6 december 2006
"""
from hachoir_parser import Parser
from hachoir_core.field import (Field, FieldSet, ParserError,
GenericVector,
Enum, UInt8, UInt32, UInt64,
Bytes,... |
krzysztofr/juwreport | refs/heads/master | senders/e_mail.py | 1 | # -*- coding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
def send(message, settings):
s = smtplib.SMTP(settings['EMAIL_SMTP_HOST'])
s.login(settings['EMAIL_SMTP_USER'], settings['EMAIL_SMTP_PASS'])
for to in settings['EMAILS_TO']:
msg = MIMEText(message)
msg['Subject'... |
Dhivyap/ansible | refs/heads/devel | test/units/modules/network/enos/enos_module.py | 21 | # Copyright (C) 2017 Lenovo, 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.
#
# Ansi... |
TeamEpsilon/linux-3.8-test_context | refs/heads/master | tools/perf/scripts/python/futex-contention.py | 11261 | # futex contention
# (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Translation of:
#
# http://sourceware.org/systemtap/wiki/WSFutexContention
#
# to perf python scripting.
#
# Measures futex contention
import os, sys
sys.path.append(os.environ['PER... |
nixon/python-mode | refs/heads/master | pymode/libs2/rope/base/exceptions.py | 115 | class RopeError(Exception):
"""Base exception for rope"""
class ResourceNotFoundError(RopeError):
"""Resource not found exception"""
class RefactoringError(RopeError):
"""Errors for performing a refactoring"""
class InterruptedTaskError(RopeError):
"""The task has been interrupted"""
class Histo... |
bjko/phantomjs | refs/heads/master | src/breakpad/src/tools/gyp/pylib/gyp/xcodeproj_file.py | 137 | #!/usr/bin/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.
"""Xcode project file generator.
This module is both an Xcode project file generator and a documentation of the
Xcode project file format. Kno... |
keyboard-k/youtube-dl-pet | refs/heads/master | youtube_dl/extractor/imgur.py | 25 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_urlparse
from ..utils import (
int_or_none,
js_to_json,
mimetype2ext,
ExtractorError,
)
class ImgurIE(InfoExtractor):
_VALID_URL = r'https?://(?:i\.)?imgur\.com/(?:(?:gallery|topic/[^/... |
jasonseminara/OpenSourceFinal | refs/heads/master | venv/lib/python2.7/site-packages/setuptools/command/develop.py | 450 | from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsError, DistutilsOptionError
import os
import glob
from pkg_resources import Distribution, PathMetadata, normalize_path
from setuptools.command.easy_install import easy_install
from setuptools.compat import PY3
impor... |
reiser4/amc | refs/heads/master | sample/testqt.py | 1 | import sys
from PyQt5.QtWidgets import (QWidget,QApplication, QDesktopWidget, QPushButton,
QMessageBox, QMainWindow, QAction, qApp, QTextEdit, QLCDNumber, QSlider, QVBoxLayout,
QGridLayout, QTabWidget)
from PyQt5.QtGui import QIcon, QKeySequence
from PyQt5.QtCore import QCoreApplication, Qt
class Test(QMainWi... |
architecture-building-systems/CityEnergyAnalyst | refs/heads/master | cea/databases/__init__.py | 2 |
import os
from collections import OrderedDict
FILE_EXTENSIONS = ['.xlsx', '.xls', '.csv']
databases_folder_path = os.path.dirname(os.path.abspath(__file__))
def get_regions():
return [folder for folder in os.listdir(databases_folder_path) if folder != "weather"
and os.path.isdir(os.path.join(datab... |
camradal/ansible | refs/heads/devel | lib/ansible/modules/windows/win_updates.py | 25 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Matt Davis <mdavis_ansible@rolpdog.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 t... |
kevintaw/django | refs/heads/master | tests/template_tests/syntax_tests/test_named_endblock.py | 521 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class NamedEndblockTests(SimpleTestCase):
@setup({'namedendblocks01': '1{% block first %}_{% block second %}'
'2{% endblock second %}_{% endblock first %}3'})
def ... |
varunagrawal/azure-services | refs/heads/master | varunagrawal/VarunWeb/env/Lib/encodings/__init__.py | 406 | """ Standard "encodings" Package
Standard Python encoding modules are stored in this package
directory.
Codec modules must have names corresponding to normalized encoding
names as defined in the normalize_encoding() function below, e.g.
'utf-8' must be implemented by the module 'utf_8.py'.
Ea... |
hastexo/edx-platform | refs/heads/master | common/test/acceptance/pages/studio/xblock_editor.py | 21 | from bok_choy.page_object import PageObject
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from common.test.acceptance.pages.common.utils import click_css
from common.test.acceptance.tests.helpers import get_selected_option_text, select_option_by_text
class BaseXBloc... |
maxalbert/blaze | refs/heads/master | blaze/compute/tests/test_core_compute.py | 6 | from __future__ import absolute_import, division, print_function
import pytest
from datashape import discover, dshape
from blaze.compute.core import (compute_up, compute, bottom_up_until_type_break,
top_then_bottom_then_top_again_etc,
swap_resources_int... |
nephomaniac/eutester | refs/heads/reorg1 | testcases/cloud_admin/3-2/Euca2264.py | 6 | '''
Created on Oct 29, 2012
@author: mmunn
Unit test : EUCA-2264 Binding error when registering image with multiple device mappings.
euca-run-instances and euca-register have the same code path
This test only checks for this binding error:
412 Pre... |
leki75/ansible | refs/heads/devel | lib/ansible/plugins/lookup/dig.py | 46 | # (c) 2015, Jan-Piet Mens <jpmens(at)gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ver... |
ifduyue/sentry | refs/heads/master | src/sentry/south_migrations/0040_auto__del_unique_event_event_id__add_unique_event_project_event_id.py | 5 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'Event', fields ['event_id']
db.delete_unique('sentry_message', ['message_id'])
... |
rickerc/nova_audit | refs/heads/cis-havana-staging | nova/tests/fake_network_cache_model.py | 22 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... |
Distrotech/intellij-community | refs/heads/master | python/testData/console/indent7.py | 86 | print(1) |
mationic/pyload | refs/heads/stable | module/gui/__init__.py | 20578 | |
Microsoft/PTVS | refs/heads/master | Python/Product/Miniconda/Miniconda3-x64/Lib/lib2to3/fixes/fix_getcwdu.py | 203 | """
Fixer that changes os.getcwdu() to os.getcwd().
"""
# Author: Victor Stinner
# Local imports
from .. import fixer_base
from ..fixer_util import Name
class FixGetcwdu(fixer_base.BaseFix):
BM_compatible = True
PATTERN = """
power< 'os' trailer< dot='.' name='getcwdu' > any* >
""... |
TaskEvolution/Task-Coach-Evolution | refs/heads/master | taskcoach/taskcoachlib/thirdparty/reportlab/lib/yaml.py | 3 | #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/lib/yaml.py
# parses "Yet Another Markup Language" into a list of tuples.
# Each tuple says what the data is e.g.
# ('Paragraph', 'Heading1', 'Why Repo... |
qilicun/python | refs/heads/master | python2/PyMOTW-1.132/PyMOTW/math/math_hypot.py | 1 | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Calculate the distance to a point.
"""
#end_pymotw_header
import math
print '{:^7} {:^7} {:^10}'.format('X', 'Y', 'Hypotenuse')
print '{:-^7} {:-^7} {:-^10}'.format('', '', '')
for x, y in [ # simple points
... |
knehez/edx-platform | refs/heads/memooc | lms/djangoapps/verify_student/exceptions.py | 196 | """
Exceptions for the verify student app
"""
# (Exception Class Names are sort of self-explanatory, so skipping docstring requirement)
# pylint: disable=missing-docstring
class WindowExpiredException(Exception):
pass
|
Aminakh/or-tools | refs/heads/master | src/ortools/linear_solver/__init__.py | 36 | import os as _os
__path__.append(_os.path.join(__path__[0], '..', '..', 'gen', 'ortools', 'linear_solver'))
__path__.append(_os.path.join(__path__[0], '..', '..', '..', 'lib'))
|
abantam/pmtud | refs/heads/master | src/point-to-point-layout/bindings/callbacks_list.py | 772 | callback_classes = [
['void', 'ns3::Ptr<ns3::Socket>', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['void', 'ns3::Ptr<ns3::Socket>', 'unsigned int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empt... |
jayceyxc/hue | refs/heads/master | desktop/core/ext-py/pysqlite/doc/includes/sqlite3/execsql_printall_1.py | 49 | from pysqlite2 import dbapi2 as sqlite3
# Create a connection to the database file "mydb":
con = sqlite3.connect("mydb")
# Get a Cursor object that operates in the context of Connection con:
cur = con.cursor()
# Execute the SELECT statement:
cur.execute("select * from people order by age")
# Retrieve all rows as a ... |
AngelValera/bares-y-tapas-DAI | refs/heads/master | populate_app.py | 2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proyecto_DAI.settings')
import django
django.setup()
from app.models import Bar, Tapa
def populate():
bar1= add_bar('Plaza','España Orce Plaza Nueva nº 4')
add_tapa(bar=bar1,nombre="Boquerones",descripcion=... |
manashmndl/kivy | refs/heads/master | examples/gestures/gesture_board.py | 30 | #!/usr/bin/env python
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.widget import Widget
from kivy.uix.button import Button
from kivy.graphics import Color, Ellipse, Line
from kivy.gesture import Gesture, GestureDatabase
from my_gestures import cross, circle, check, square
def... |
acsone/website | refs/heads/8.0 | website_menu_by_user_status/models/__init__.py | 37 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2010 - 2014 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it a... |
nttcom/eclcli | refs/heads/master | eclcli/storage/storageclient/common/gettextutils.py | 1 | # Copyright 2012 Red Hat, Inc.
# Copyright 2013 IBM Corp.
# 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.... |
ronbelson/ghost-proxy-hebrew | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/_openedgebuiltins.py | 370 | # -*- coding: utf-8 -*-
"""
pygments.lexers._openedgebuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Builtin list for the OpenEdgeLexer.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
OPENEDGEKEYWORDS = [
'ABSOLUTE', 'ABS', 'ABSO', 'A... |
why404/pili-sdk-python | refs/heads/master | setup.py | 3 | from setuptools import setup, find_packages
setup(
name = 'pili',
version = '1.5.0',
keywords = ('pili'),
description = 'Pili Streaming Cloud server-side library for Python',
license = 'MIT License',
install_requires = [],
author = 'Pili Engineering',
author_email = 'pili@qiniu.com',
... |
mosmeh/danbooru-prediction | refs/heads/master | prediction/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
jesseengel/magenta | refs/heads/master | magenta/models/arbitrary_image_stylization/arbitrary_image_stylization_build_mobilenet_model.py | 2 | # Copyright 2019 The Magenta Authors.
#
# 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 ... |
chiefspace/udemy-rest-api | refs/heads/master | udemy_rest_flask1/env/lib/python3.4/site-packages/pip/exceptions.py | 398 | """Exceptions used throughout package"""
class PipError(Exception):
"""Base pip exception"""
class InstallationError(PipError):
"""General exception during installation"""
class UninstallationError(PipError):
"""General exception during uninstallation"""
class DistributionNotFound(InstallationError)... |
andriibekker/django-multilingual | refs/heads/master | multilingual/flatpages/models.py | 2 | from django.db import models
from django.contrib.sites.models import Site
import multilingual
from django.utils.translation import ugettext as _
class MultilingualFlatPage(models.Model):
# non-translatable fields first
url = models.CharField(_('URL'), max_length=100, db_index=True,
help_text=_("Exampl... |
fernandoacorreia/DjangoWAWSLogging | refs/heads/master | DjangoWAWSLogging/env/Lib/encodings/aliases.py | 418 | """ Encoding Aliases Support
This module is used by the encodings package search function to
map encodings names to module names.
Note that the search function normalizes the encoding names before
doing the lookup, so the mapping will have to map normalized
encoding names to module names.
Con... |
CPqD/RouteFlow | refs/heads/master | pox/pox/lib/graph/nom.py | 31 | # Copyright 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 distri... |
sgallagher/anaconda | refs/heads/master | pyanaconda/modules/storage/devicetree/utils.py | 2 | #
# Copyright (C) 2014 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 in the hope that it will be... |
gpfreitas/bokeh | refs/heads/master | examples/charts/file/boxplot_single.py | 4 | from bokeh.charts import BoxPlot, output_file, show
from bokeh.sampledata.autompg import autompg as df
# origin = the source of the data that makes up the autompg dataset
title = "MPG by Cylinders and Data Source, Colored by Cylinders"
# color by one dimension and label by two dimensions
# coloring by one of the colu... |
TomTheBear/likwid-python-api | refs/heads/master | tests/testaffinity.py | 2 | #!/usr/bin/env python
import pylikwid
def int_join(l, sep):
if l and len(l) > 0:
return sep.join([str(x) for x in l])
return "\"\""
aff = pylikwid.initaffinity()
for k in aff:
if isinstance(aff[k], int):
print("{}: {}".format(k, aff[k]))
print("")
for d in aff["domains"]:
print("Dom... |
evernym/zeno | refs/heads/master | plenum/test/pool_transactions/test_adding_stewards.py | 2 | import pytest
from plenum.common.constants import STEWARD_STRING
from plenum.common.exceptions import RequestRejectedException
from plenum.common.util import randomString
from plenum.test.helper import sdk_get_replies, sdk_eval_timeout, sdk_check_reply
from plenum.test.pool_transactions.helper import sdk_add_new_nym, ... |
openstack-hyper-v-python/numpy | refs/heads/master | numpy/polynomial/setup.py | 264 | from __future__ import division, print_function
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('polynomial', parent_package, top_path)
config.add_data_dir('tests')
return config
if __name__ == '__main__':
from numpy.di... |
joram/sickbeard-orange | refs/heads/ThePirateBay | sickbeard/metadata/ps3.py | 19 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 Lice... |
andreparrish/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/_weakrefset.py | 48 | # Access WeakSet through the weakref module.
# This code is separated-out because it is needed
# by abc.py to load everything else at startup.
from _weakref import ref
__all__ = ['WeakSet']
class _IterationGuard:
# This context manager registers itself in the current iterators of the
# weak container, such ... |
thresholdsoftware/asylum-v2.0 | refs/heads/master | openerp/addons/base_report_designer/openerp_sxw2rml/openerp_sxw2rml.py | 112 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c):
#
# 2005 pyopenoffice.py Martin Simon (http://www.bezirksreiter.de)
# 2005 Fabien Pinckaers, TINY SPRL. (http://tiny.be)
#
# This program is free software: you can redistribute it and/or ... |
MartynShaw/audacity | refs/heads/master | lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/Tools/gfortran.py | 276 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import re
from waflib import Utils
from waflib.Tools import fc,fc_config,fc_scan,ar
from waflib.Configure import conf
@conf
def find_gfortran(conf):
fc=conf.find_program(['gf... |
Pica4x6/numina | refs/heads/master | numina/core/tests/test_types.py | 1 | #
# Copyright 2008-2015 Universidad Complutense de Madrid
#
# This file is part of Numina
#
# Numina 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 l... |
rhatdan/docker-py | refs/heads/master | docker/errors.py | 39 | # Copyright 2014 dotCloud 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... |
ManageIQ/integration_tests | refs/heads/master | cfme/tests/services/test_iso_service_catalogs.py | 2 | import fauxfactory
import pytest
from widgetastic.utils import partial_match
from cfme import test_requirements
from cfme.infrastructure.provider import InfraProvider
from cfme.infrastructure.pxe import get_template_from_config
from cfme.infrastructure.pxe import ISODatastore
from cfme.services.service_catalogs import... |
sander76/home-assistant | refs/heads/dev | homeassistant/components/arduino/sensor.py | 5 | """Support for getting information from Arduino pins."""
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from . import DOMAIN
CONF_PINS = "pins"
CONF_TYPE = "analog"
PIN_... |
Antiun/odoo | refs/heads/8.0 | addons/l10n_in_hr_payroll/report/report_hr_salary_employee_bymonth.py | 374 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... |
andrewcmyers/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/edit_distance_op_test.py | 139 | # 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.