repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
TheTacoScott/JudgeFoo | refs/heads/master | app/models.py | 1 | from django.db import models
from django.contrib.auth.models import User
class Performer(models.Model):
user = models.ForeignKey(User, unique=True)
name = models.CharField(max_length=256)
pic_url = models.CharField(max_length=4096)
copy = models.CharField(max_length=4096)
class Judge(models.Model):
name = m... |
moble/sympy | refs/heads/master | sympy/polys/tests/test_euclidtools.py | 98 | """Tests for Euclidean algorithms, GCDs, LCMs and polynomial remainder sequences. """
from sympy.polys.rings import ring
from sympy.polys.domains import ZZ, QQ, RR
from sympy.core.compatibility import range
from sympy.polys.specialpolys import (
f_polys,
dmp_fateman_poly_F_1,
dmp_fateman_poly_F_2,
dmp... |
SatelliteQE/robottelo | refs/heads/master | robottelo/cli/user.py | 3 | """
Usage::
hammer user [OPTIONS] SUBCOMMAND [ARG] ...
Parameters::
SUBCOMMAND subcommand
[ARG] ... subcommand arguments
Subcommands::
add-role Assign a user role
create Create an user.
delete ... |
umanoidTyphoon/AMICO-CM_Sketches | refs/heads/master | demo/csv_files_generator.py | 1 | __author__ = 'umanoidTyphoon'
from collections import defaultdict
from datetime import datetime
from time import time
# python-geoip is a library that provides access to GeoIP databases. Currently it only supports accessing MaxMind
# databases. It's similar to other GeoIP libraries but comes under the very ... |
openai/cleverhans | refs/heads/master | cleverhans/compat.py | 1 | """
Wrapper functions for writing code that is compatible with many versions
of TensorFlow.
"""
import warnings
import tensorflow as tf
# The following 2 imports are not used in this module. They are imported so that users of cleverhans.compat can
# get access to device_lib, app, and flags. A pylint bug makes these imp... |
rs2/pandas | refs/heads/master | pandas/core/array_algos/masked_reductions.py | 1 | """
masked_reductions.py is for reduction algorithms using a mask-based approach
for missing values.
"""
from typing import Callable
import numpy as np
from pandas._libs import missing as libmissing
from pandas.compat.numpy import np_version_under1p17
from pandas.core.nanops import check_below_min_count
def _sump... |
jusdng/odoo | refs/heads/8.0 | addons/purchase/report/purchase_report.py | 137 | # -*- 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... |
joodicator/PageBot | refs/heads/master | page/modal.py | 1 | #===============================================================================
# modal.py - allows certain types of input to be multiplexed between different
# modules, depending on which "mode" is active in each channel.
#
# A module wishing to take control of the channel may call set_mode(chan,M) to
# enter the mod... |
erickt/hue | refs/heads/master | desktop/core/ext-py/Paste-1.7.2/tests/urlparser_data/python/__init__.py | 9480 | #
|
fossilet/ansible | refs/heads/devel | contrib/inventory/abiquo.py | 110 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
External inventory script for Abiquo
====================================
Shamelessly copied from an existing inventory script.
This script generates an inventory that Ansible can understand by making API requests to Abiquo API
Requires some python libraries, ensure ... |
molobrakos/home-assistant | refs/heads/master | homeassistant/components/tuya/scene.py | 7 | """Support for the Tuya scenes."""
from homeassistant.components.scene import DOMAIN, Scene
from . import DATA_TUYA, TuyaDevice
ENTITY_ID_FORMAT = DOMAIN + '.{}'
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up Tuya scenes."""
if discovery_info is None:
return
tuya ... |
longsion/OpenBird | refs/heads/master | cocos2d/plugin/tools/toolsForGame/modifyManifest.py | 263 | import sys, string, os
from xml.etree import ElementTree as ET
manifestFile = sys.argv[1]
pluginStr = sys.argv[2]
pluginsDir = sys.argv[3]
androidNS = 'http://schemas.android.com/apk/res/android'
sourceCfgFile = '/android/ForManifest.xml'
def doModify(sourceFile, root):
bRet = False
sourceTree = ET.parse(sou... |
ehouarn-perret/EhouarnPerret.Python.Kattis | refs/heads/master | Trivial/Reversed Binary Numbers.py | 1 | n = int(input())
n = bin(n)[:1:-1]
n = int(n, base=2)
print(n)
|
EvanK/ansible | refs/heads/devel | lib/ansible/modules/network/cloudengine/ce_command.py | 22 | #!/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... |
molotof/infernal-twin | refs/heads/master | build/pip/pip/_vendor/cachecontrol/serialize.py | 317 | import base64
import io
import json
import zlib
from pip._vendor.requests.structures import CaseInsensitiveDict
from .compat import HTTPResponse, pickle
def _b64_encode_bytes(b):
return base64.b64encode(b).decode("ascii")
def _b64_encode_str(s):
return _b64_encode_bytes(s.encode("utf8"))
def _b64_decode... |
johncsnyder/SwiftKitten | refs/heads/master | cffi/doc/source/conf.py | 8 | # -*- coding: utf-8 -*-
#
# CFFI documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 14 16:37:47 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All co... |
crosswalk-project/crosswalk-test-suite | refs/heads/master | webapi/tct-csp-w3c-tests/csp-py/w3c/csp-self.py | 25 | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0])
_CSP = "default-src 'self' a... |
kelvin13/Knockout | refs/heads/master | edit/__init__.py | 12133432 | |
wwj718/edx-platform | refs/heads/master | lms/djangoapps/instructor/tests/views/__init__.py | 12133432 | |
evidation-health/bokeh | refs/heads/master | examples/glyphs/__init__.py | 12133432 | |
mbareta/edx-platform-ft | refs/heads/open-release/eucalyptus.master | common/djangoapps/student/management/__init__.py | 12133432 | |
GunnerJnr/_CodeInstitute | refs/heads/master | Stream-3/Full-Stack-Development/15.Paypal-Subscriptions/2.Setup-Products-That-Require-Subscriptions/we_are_social/magazines/views.py | 1 | # -*- coding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from .models import Magazine
# Create your views here.
@login_required(login_url='/login/')
def all_magazines(request):
magazines = Magazine.objects.all()
return render(request, "magazines/mag... |
insiderr/insiderr-app | refs/heads/master | ios-patches/basemodules/twisted/trial/test/mockcustomsuite2.py | 59 | # Copyright (c) 2006 Twisted Matrix Laboratories. See LICENSE for details
"""
Mock test module that contains a C{testSuite} method. L{runner.TestLoader}
should load the tests from the C{testSuite}, not from the C{Foo} C{TestCase}.
See L{twisted.trial.test.test_loader.LoaderTest.test_loadModuleWith_testSuite}.
"""
f... |
Ultimaker/Cura | refs/heads/master | plugins/MachineSettingsAction/__init__.py | 3 | # Copyright (c) 2016 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from . import MachineSettingsAction
def getMetaData():
return {}
def register(app):
return { "machine_action": MachineSettingsAction.MachineSettingsAction() }
|
toopy/django-toopy-editor | refs/heads/master | bootstrap.py | 81 | ##############################################################################
#
# Copyright (c) 2006 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... |
alexanderturner/ansible | refs/heads/devel | lib/ansible/modules/system/authorized_key.py | 25 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to add authorized_keys for ssh logins.
(c) 2012, Brad Olson <[email protected]>
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 ... |
DamnWidget/mamba | refs/heads/master | mamba/test/dummy_app/application/controller/contained.py | 3 | # -*- encoding: utf-8 -*-
# -*- mamba-file-type: mamba-controller -*-
# Copyright (c) 2012 Oscar Campos <[email protected]>
"""
Test Dummy Container
"""
from zope.interface import implements
from mamba.web.response import Ok
from mamba.core import interfaces
from mamba.application import controller, route
... |
nickgravgaard/sqlalchemy-fsm | refs/heads/master | sqlalchemy_fsm/__init__.py | 1 | from .fsm import FSMMeta, can_proceed, FSMField
from .transition import transition
|
kcsry/lippukala | refs/heads/master | lippukala/views.py | 1 | import json
from urllib.parse import parse_qs
from django.http import HttpResponse
from django.views.generic import TemplateView
from lippukala.excs import CantUseException
from lippukala.models import Code
def serialize_code(code):
return {
"id": code.id,
"used": bool(code.used_at),
"co... |
carquois/blobon | refs/heads/master | blobon/posts/migrations/0016_auto__add_blogcomment.py | 1 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'BlogComment'
db.create_table('posts_blogcomment', (
('post_ptr', self.gf('django... |
luogangyi/bcec-nova | refs/heads/stable/icehouse | nova/tests/console/__init__.py | 187 | # 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.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
FrankNagel/qlc | refs/heads/master | src/webapp/quanthistling/scripts/annotations/annotations_for_parker2010a.py | 1 | # -*- coding: utf8 -*-
import sys, os
sys.path.append(os.path.abspath('.'))
import re
from operator import attrgetter
import difflib
# Pylons model init sequence
import pylons.test
import logging
from quanthistling.config.environment import load_environment
from quanthistling.model.meta import Sessi... |
graemian/ami-mooc-pilot | refs/heads/master | modules/review/domain.py | 33 | # Copyright 2013 Google 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 by applicable law or ... |
timothyb89/stackviz | refs/heads/master | stackviz/views/devstack/urls.py | 1 | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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... |
beni55/sentry | refs/heads/master | src/sentry/migrations/0043_auto__chg_field_option_value__chg_field_projectoption_value.py | 6 | # 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):
# Changing field 'Option.value'
db.alter_column('sentry_option', 'value', self.gf('picklefield.fields.Pick... |
vollov/egallery | refs/heads/master | gallery/message/migrations/0002_auto_20150518_2158.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import uuid
class Migration(migrations.Migration):
dependencies = [
('message', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='message',
... |
Lujeni/ansible | refs/heads/devel | lib/ansible/modules/network/ingate/__init__.py | 12133432 | |
rapilabs/django | refs/heads/master | tests/messages_tests/__init__.py | 12133432 | |
sajeeshcs/nested_quota_latest | refs/heads/master | nova/tests/unit/conductor/__init__.py | 12133432 | |
amboycharlie/Child-Friendly-LCMS | refs/heads/Child-Friendly-LCMS-0.5 | leonardo/module/nav/widget/treenavigation/__init__.py | 12133432 | |
bdeniker/sg | refs/heads/master | sg/__init__.py | 12133432 | |
Teamxrtc/webrtc-streaming-node | refs/heads/master | third_party/webrtc/src/chromium/src/tools/swarming_client/third_party/requests/packages/urllib3/contrib/__init__.py | 12133432 | |
realestate-com-au/python-dashing | refs/heads/master | dashmat/core_modules/amazon_base/__init__.py | 12133432 | |
broferek/ansible | refs/heads/devel | lib/ansible/modules/web_infrastructure/__init__.py | 12133432 | |
mrucci/moto | refs/heads/master | moto/rds2/exceptions.py | 19 | from __future__ import unicode_literals
import json
from werkzeug.exceptions import BadRequest
class RDSClientError(BadRequest):
def __init__(self, code, message):
super(RDSClientError, self).__init__()
self.description = json.dumps({
"Error": {
"Code": code,
... |
msarahan/bokeh | refs/heads/master | bokeh/__init__.py | 8 | """ Bokeh is a Python interactive visualization library that targets modern
web browsers for presentation.
Its goal is to provide elegant, concise construction of novel graphics in the
style of d3.js, but also deliver this capability with high-performance
interactivity over very large or streaming datasets. Bokeh can ... |
etashjian/ECE757-final | refs/heads/master | src/arch/x86/isa/insts/general_purpose/data_transfer/stack_operations.py | 75 | # Copyright (c) 2007-2008 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware imp... |
mrkm4ntr/incubator-airflow | refs/heads/master | tests/providers/microsoft/azure/transfers/test_azure_blob_to_gcs.py | 7 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
oskar456/youtube-dl | refs/heads/master | setup.py | 8 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import os.path
import warnings
import sys
try:
from setuptools import setup, Command
setuptools_available = True
except ImportError:
from distutils.core import setup, Command
setuptools_available = False
from distutils.spawn ... |
anitagraser/processing_pysal | refs/heads/master | ext-libs/pysal/core/IOHandlers/tests/test_dat.py | 20 | import unittest
import pysal
from pysal.core.IOHandlers.dat import DatIO
import tempfile
import os
class test_DatIO(unittest.TestCase):
def setUp(self):
self.test_file = test_file = pysal.examples.get_path('wmat.dat')
self.obj = DatIO(test_file, 'r')
def test_close(self):
f = self.obj... |
hellhovnd/django | refs/heads/master | django/core/management/commands/makemessages.py | 3 | import fnmatch
import glob
import os
import re
import sys
from itertools import dropwhile
from optparse import make_option
import django
from django.core.management.base import CommandError, NoArgsCommand
from django.core.management.utils import (handle_extensions, find_command,
popen_wrapper)
from django.utils.fu... |
PeterHenell/performance-dashboard | refs/heads/master | performance-collector2/wmi_source.py | 1 | class WMISource:
def get_sources(self):
return []
#
#
# '''
# Original Author/Source:
# http://monkut.webfactional.com/blog/archive/2009/1/21/windows-process-memory-logging-python
# http://stackoverflow.com/questions/276052/how-to-get-current-cpu-and-ram-usage-in-python
# Monitor window processes
# derived... |
sexroute/commandergenius | refs/heads/sdl_android | project/jni/python/src/Tools/pybench/Lookups.py | 45 | from pybench import Test
class SpecialClassAttribute(Test):
version = 2.0
operations = 5*(12 + 12)
rounds = 100000
def test(self):
class c:
pass
for i in xrange(self.rounds):
c.__a = 2
c.__b = 3
c.__c = 4
c.__a = 2
... |
danielhjames/Booktype | refs/heads/master | lib/booktype/apps/portal/forms.py | 6 | from django import forms
from django.utils.html import escape
from django.forms.utils import ErrorList
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from booktype.utils.misc import booktype_slugify
from booki.editor.models import BookiGroup
from booktype.ut... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Tools/scripts/objgraph.py | 96 | #! /usr/bin/env python
# objgraph
#
# Read "nm -o" input (on IRIX: "nm -Bo") of a set of libraries or modules
# and print various interesting listings, such as:
#
# - which names are used but not defined in the set (and used where),
# - which names are defined in the set (and where),
# - which modules use which other ... |
auduny/home-assistant | refs/heads/dev | homeassistant/util/json.py | 12 | """JSON utility functions."""
import logging
from typing import Union, List, Dict, Optional
import json
import os
import tempfile
from homeassistant.exceptions import HomeAssistantError
_LOGGER = logging.getLogger(__name__)
class SerializationError(HomeAssistantError):
"""Error serializing the data to JSON."""... |
netfirms/erpnext | refs/heads/develop | erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.py | 121 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class AppraisalTemplateGoal(Document):
pass |
molobrakos/home-assistant | refs/heads/master | homeassistant/components/moon/__init__.py | 36 | """The moon component."""
|
aeischeid/servo | refs/heads/master | tests/wpt/web-platform-tests/old-tests/webdriver/command_contexts/__init__.py | 12133432 | |
RobertWWong/WebDev | refs/heads/master | djangoApp/dasDjangoApp/firstDjango/firstDjango/__init__.py | 12133432 | |
gidj/pyLinkedList | refs/heads/master | __init__.py | 12133432 | |
double12gzh/nova | refs/heads/master | nova/tests/unit/scheduler/weights/__init__.py | 12133432 | |
cecep-edu/edx-platform | refs/heads/eucalyptus.2 | cms/djangoapps/models/settings/__init__.py | 12133432 | |
justin-ho/passwd-mng | refs/heads/master | pycrypto-2.6.1/lib/Crypto/Util/asn1.py | 122 | # -*- coding: ascii -*-
#
# Util/asn1.py : Minimal support for ASN.1 DER binary encoding.
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted... |
kaplun/invenio | refs/heads/master | modules/websubmit/lib/functions/Send_APP_Mail.py | 24 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at... |
tashaxe/Red-DiscordBot | refs/heads/develop | lib/youtube_dl/extractor/lnkgo.py | 33 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
int_or_none,
unified_strdate,
)
class LnkGoIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?lnkgo\.alfa\.lt/visi-video/(?P<show>[^/]+)/ziurek-(?P<id>[A-Za-z0-9-]+)'
_TESTS = ... |
sphoebs/rockshell | refs/heads/master | mapreduce/third_party/__init__.py | 127 | #!/usr/bin/env python
#
# Copyright 2010 Google 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 o... |
bgris/ODL_bgris | refs/heads/master | lib/python3.5/site-packages/Sphinx-1.5.1-py3.5.egg/sphinx/util/images.py | 4 | # -*- coding: utf-8 -*-
"""
sphinx.util.images
~~~~~~~~~~~~~~~~~~
Image utility functions for Sphinx.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import imghdr
import imagesize
from os import path
try:
from PIL import Image ... |
OpenWinCon/OpenWinNet | refs/heads/master | web-gui/connector/version.py | 13 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... |
windelbouwman/ppci-mirror | refs/heads/master | tools/dbgui/dbguigdb.py | 1 | #!/usr/bin/python
import sys
import argparse
import logging
from ppci import api
from ppci.common import logformat
from ppci.binutils.dbg import Debugger
from ppci.binutils.dbg.gdb.client import GdbDebugDriver
from ppci.binutils.dbg.gdb.transport import TCP
from dbgui import DebugUi, QtWidgets
if __name__ == '__main... |
secdev/scapy | refs/heads/master | scapy/contrib/lldp.py | 2 | # scapy.contrib.description = Link Layer Discovery Protocol (LLDP)
# scapy.contrib.status = loads
"""
LLDP - Link Layer Discovery Protocol
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:author: Thomas Tannhaeuser, [email protected]
:license: GPLv2
This module is free software; you can redistribut... |
mitchrule/Miscellaneous | refs/heads/master | Django_Project/django/Lib/site-packages/wheel/pkginfo.py | 565 | """Tools for reading and writing PKG-INFO / METADATA without caring
about the encoding."""
from email.parser import Parser
try:
unicode
_PY3 = False
except NameError:
_PY3 = True
if not _PY3:
from email.generator import Generator
def read_pkg_info_bytes(bytestr):
return Parser().pars... |
AdaEne/CATMAID | refs/heads/master | django/applications/catmaid/migrations/0042_add_reviewer_whitelist.py | 3 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'ReviewerWhitelist'
db.create_table('reviewer_whitelist', ... |
seyriz/taiga-contrib-google-auth | refs/heads/master | back/tests/__init__.py | 12133432 | |
kageiit/infer | refs/heads/master | infer/lib/python/inferlib/capture/__init__.py | 12133432 | |
xfournet/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/conf/locale/ka/__init__.py | 12133432 | |
vergecurrency/VERGE | refs/heads/master | contrib/linearize/linearize-hashes.py | 1 | #!/usr/bin/env python3
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ impo... |
dhowland/EasyAVR | refs/heads/master | keymapper/easykeymap/cfgparse.py | 1 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#
# Easy AVR USB Keyboard Firmware Keymapper
# Copyright (C) 2013-2016 David Howland
#
# 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 versi... |
redhat-openstack/nova | refs/heads/f22-patches | nova/api/openstack/compute/contrib/server_list_multi_status.py | 97 | # 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
# d... |
dmick/autokey | refs/heads/master | src/lib/gtkui/popupmenu.py | 47 | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# 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, or
# (at your option) any later version.
#
# This pr... |
EmanueleCannizzaro/scons | refs/heads/master | test/MSVS/vs-7.0-variant_dir.py | 1 | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... |
schana/scheduling-python | refs/heads/master | scheduling/model/relationships.py | 2 | from scheduling import db
certifications_members = db.Table('certifications_members', db.Model.metadata,
db.Column('cert_id', db.Integer, db.ForeignKey('certification.id')),
db.Column('member_id', db.Integer, db.ForeignKey('member.id')))
certificati... |
ByteInternet/libcloud | refs/heads/byte | integration/driver/test.py | 16 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... |
sabi0/intellij-community | refs/heads/master | python/testData/types/NotMatchedOverloadsAndImplementationInImportedClass/b/__init__.py | 87 | from typing import overload
class A:
@overload
def foo(self, value: int) -> int:
pass
@overload
def foo(self, value: str) -> str:
pass
def foo(self, value):
return None |
barnsnake351/nova | refs/heads/master | nova/api/openstack/compute/schemas/aggregates.py | 59 | # Copyright 2014 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... |
andxeg/heat-templates | refs/heads/master | tests/software_config/test_heat_config.py | 7 | #
# 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
# ... |
raschuetz/foundations-homework | refs/heads/master | 07/data-analysis/lib/python3.5/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py | 1731 | from __future__ import absolute_import, division, unicode_literals
from . import _base
try:
from collections import OrderedDict
except ImportError:
from ordereddict import OrderedDict
class Filter(_base.Filter):
def __iter__(self):
for token in _base.Filter.__iter__(self):
if token["... |
steny138/PythonTaipeiOpendata | refs/heads/master | manage.py | 2 | import os
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
from app import app, db
app.config.from_object(os.environ['APP_SETTINGS'])
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
if __name__ == '__main__':
manager.run() |
ivrson9/cdol | refs/heads/master | contents/img_google/.eggs/py2app-0.10-py2.7.egg/py2app/bootstrap/ctypes_setup.py | 10 | def _setup_ctypes():
from ctypes.macholib import dyld
import os
frameworks = os.path.join(os.environ['RESOURCEPATH'], '..', 'Frameworks')
dyld.DEFAULT_FRAMEWORK_FALLBACK.insert(0, frameworks)
dyld.DEFAULT_LIBRARY_FALLBACK.insert(0, frameworks)
_setup_ctypes()
|
hohanhb285/chrome-app-samples | refs/heads/master | in-app-payments-with-server-validation/backend-appengine/main.py | 9 | # Copyright 2012 Google Inc. All Rights Reserved.
# pylint: disable-msg=C6409,C6203
"""In-App Payments - Online Store Python Sample"""
# standard library imports
from cgi import escape
import os
import json
import time
import logging
# third-party imports
from google.appengine.ext import db
from google.appengine.e... |
EduardoRG/sdn_ryu | refs/heads/master | dragon/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
sestrella/ansible | refs/heads/devel | lib/ansible/modules/cloud/google/gcp_compute_url_map_info.py | 4 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... |
gruunday/useradm | refs/heads/master | scripts/vote.py | 1 | #!/usr/bin/python
import os
import re
import sys
from ..useradm.rberror import RBError
from ..useradm.rbuser import RBUser
from ..useradm.rbuserdb import RBUserDB
voteregister = 'voted.txt'
def main():
"""Program entry function."""
voted = {}
if os.path.exists(voteregister):
fd = open(votereg... |
odoobgorg/odoo | refs/heads/9.0 | addons/website_blog/controllers/main.py | 12 | # -*- coding: utf-8 -*-
import datetime
import json
import werkzeug
from openerp import tools
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models.website import slug, unslug
from openerp.exceptions import UserError
from openerp.osv.orm import browse_recor... |
MyRobotLab/myrobotlab | refs/heads/develop | src/main/resources/resource/VirtualDevice/Arduino.py | 1 | #############################################
# This is a basic script to emulate the hardware of
# an Arduino microcontroller. The VirtualDevice
# service will execute this script when
# createVirtualArduino(port) is called
import time
import math
import threading
from random import randint
from org.myrobotl... |
openstack/barbican | refs/heads/master | bin/versionbuild.py | 4 | #!/usr/bin/env python
# Copyright (c) 2013-2014 Rackspace, 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 appli... |
dblia/nosql-ganeti | refs/heads/couch | lib/client/gnt_group.py | 3 | #
#
# Copyright (C) 2010, 2011, 2012 Google Inc.
#
# 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 2 of the License, or
# (at your option) any later version.
#
# This program is ... |
jnewland/home-assistant | refs/heads/ci | tests/components/config/test_init.py | 8 | """Test config init."""
import asyncio
from unittest.mock import patch
from homeassistant.const import EVENT_COMPONENT_LOADED
from homeassistant.setup import async_setup_component, ATTR_COMPONENT
from homeassistant.components import config
from tests.common import mock_coro, mock_component
@asyncio.coroutine
def te... |
CARocha/ciat_plataforma | refs/heads/master | mapeo/migrations/0002_auto__chg_field_organizaciones_departamento__chg_field_organizaciones_.py | 3 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Organizaciones.departamento'
db.alter_column(u'mapeo_o... |
mdworks2016/work_development | refs/heads/master | Python/20_Third_Certification/venv/lib/python3.7/site-packages/billiard/__init__.py | 1 | """Python multiprocessing fork with improvements and bugfixes"""
#
# Package analogous to 'threading.py' but using processes
#
# multiprocessing/__init__.py
#
# This package is intended to duplicate the functionality (and much of
# the API) of threading.py but uses processes instead of threads. A
# subpackage 'multipr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.