repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
mikerjacobi/oauth | refs/heads/master | go.py | 1 | #!/usr/bin/python
import os
cmd = "docker ps -a | grep oauth | awk '{print $1}' | xargs docker rm -f"
os.system(cmd)
cmd = "go build && docker-compose up -d"
os.system(cmd)
|
axbaretto/beam | refs/heads/master | sdks/python/apache_beam/metrics/monitoring_infos.py | 2 | #
# 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 us... |
hortonworks/hortonworks-sandbox | refs/heads/master | desktop/core/ext-py/eventlet-0.9.14/eventlet/tpool.py | 5 | # Copyright (c) 2007-2009, Linden Research, Inc.
# Copyright (c) 2007, IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... |
darklost/quick-ng | refs/heads/master | tools/cocos2d-console/plugins/project_new/__init__.py | 33 | from project_new import CCPluginNew
|
F5Networks/f5-ansible-modules | refs/heads/doc-update | ansible_collections/f5networks/f5_modules/tests/unit/modules/network/f5/test_bigip_firewall_policy.py | 2 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks 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
import os
import json
import pytest
import sys
if sys.version_info < (2... |
elventear/ansible | refs/heads/devel | test/units/parsing/vault/test_vault.py | 52 | # -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.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 So... |
windedge/odoo | refs/heads/8.0 | addons/website/models/ir_http.py | 162 | # -*- coding: utf-8 -*-
import logging
import os
import re
import traceback
import werkzeug
import werkzeug.routing
import werkzeug.utils
import openerp
from openerp.addons.base import ir
from openerp.addons.base.ir import ir_qweb
from openerp.addons.website.models.website import slug, url_for, _UNSLUG_RE
from opener... |
PeterDaveHello/eden | refs/heads/master | modules/ClimateDataPortal/import_NetCDF_readings.py | 41 |
"""
Gridded data is already aggregated by month
therefore we don't have daily gridded data, but this is
importing to the same basic table type as if it were daily.
So:
Don't make a daily table
Record what monthly aggregations are available
We only use monthly aggregations on the map and ... |
jelly/calibre | refs/heads/master | src/odf/opendocument.py | 21 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2010 Søren Roug, European Environment Agency
#
# This library 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 2.1 of the License, or (at you... |
kchodorow/tensorflow | refs/heads/master | tensorflow/contrib/ndlstm/python/misc_test.py | 22 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
jkshaver/virtualenv-1.8.2 | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/fr/__init__.py | 12133432 | |
seocam/django | refs/heads/master | tests/migrations/test_migrations_conflict/__init__.py | 12133432 | |
zcutlip/broken_abandoned | refs/heads/master | part_14/firmware_building/checksums/__init__.py | 12133432 | |
Pulgama/supriya | refs/heads/master | tests/test_realtime_Group_remove.py | 2 | import uqbar.strings
import supriya.assets.synthdefs
import supriya.realtime
def test_01(server):
group_a = supriya.realtime.Group()
group_a.allocate()
synth_a = supriya.realtime.Synth(supriya.assets.synthdefs.test)
group_a.append(synth_a)
group_b = supriya.realtime.Group()
group_a.append(gr... |
peeyush-tm/shinken | refs/heads/nocout | test/test_objects_and_notifways.py | 18 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken 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 F... |
alxyang/mysql-5.6 | refs/heads/fb-mysql-5.6.35 | xtrabackup/test/kewpie/lib/sys_mgmt/__init__.py | 12133432 | |
SySS-Research/outis | refs/heads/master | syhandler/message/__init__.py | 12133432 | |
SSL-Roots/CON-SAI | refs/heads/master | decision_making/scripts/proto/__init__.py | 12133432 | |
thaim/ansible | refs/heads/fix-broken-link | lib/ansible/modules/network/asa/asa_og.py | 37 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2019, Ansible by Red Hat, 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',
... |
Endika/LaZagne | refs/heads/master | Windows/src/LaZagne/softwares/games/galconfusion.py | 1 | import os
from _winreg import HKEY_CURRENT_USER, OpenKey, QueryValueEx
from config.constant import *
from config.write_output import print_output, print_debug
from config.header import Header
from config.moduleInfo import ModuleInfo
class GalconFusion(ModuleInfo):
def __init__(self):
options = {'command': '-g', 'ac... |
shsingh/ansible | refs/heads/devel | lib/ansible/modules/storage/purestorage/purefa_host.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Simon Dodsley (simon@purestorage.com)
# 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_versi... |
dewtx29/python_ann | refs/heads/master | python/ann/noise_sum_bit.py | 1 | import math
import random
import sys
INPUT_NEURONS = 4
HIDDEN_NEURONS = 6
OUTPUT_NEURONS = 14
LEARN_RATE = 0.2 # Rho.
NOISE_FACTOR = 0.58
TRAINING_REPS = 10000
MAX_SAMPLES = 14
TRAINING_INPUTS = [[1, 1, 1, 0],
[1, 1, 0, 0],
[0, 1, 1, 0],
[1, 0, 1, 0],
... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/reportlab-3.2.0/tests/test_pdfbase_pdfform.py | 12 | from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation, NearTestCase
setOutDir(__name__)
import unittest
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfform
class PdfFormTestCase(NearTestCase):
def testMultipleUsage(self):
for i in range(2):
... |
royalharsh/grpc | refs/heads/master | examples/python/multiplex/route_guide_pb2.py | 88 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: route_guide.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _r... |
NextDevBoard/Arduino | refs/heads/master | libraries/ArduinoJson/third-party/gtest-1.7.0/test/gtest_output_test.py | 1733 | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
elFua/cutepiesmtp | refs/heads/master | valid_encodings.py | 1 | VALID_ENCODINGS = ["ascii",
"big5",
"big5hkscs",
"cp037",
"cp424",
"cp437",
"cp500",
"cp720",
"cp737",
"cp775",
"cp850",
"cp852",
"cp855",
"cp856",
"cp857",
"cp858",
"cp860",
"cp861",
"cp862",
"cp863",
"cp864",
"cp865",
"cp866",
"cp869",
"cp874",
"cp875",
"cp932",
"cp949",
"cp950",
"cp1006",
"cp1026",
"cp1140",
"cp1250... |
obi-two/Rebelion | refs/heads/master | data/scripts/templates/object/mobile/shared_space_rebel_tier3_ezkiel.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_space_rebel_tier3_ezkiel.iff"
result.attribute_template_id = 9... |
Dawny33/luigi | refs/heads/master | luigi/server.py | 7 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
molmod/molmod | refs/heads/master | molmod/test/test_minimizer.py | 1 | # -*- coding: utf-8 -*-
# MolMod is a collection of molecular modelling tools for python.
# Copyright (C) 2007 - 2019 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center
# for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights
# reserved unless otherwise stated.
#
# This file is part of MolMod.
#
#... |
sergey-senozhatsky/anaconda-11-vlan-support | refs/heads/master | textw/constants_text.py | 1 | #
# constants_text.py: text mode constants
#
# Copyright 2000-2002 Red Hat, Inc.
#
# This software may be freely redistributed under the terms of the GNU
# library public license.
#
# You should have received a copy of the GNU Library Public License
# along with this program; if not, write to the Free Software
# Founda... |
clumsy/intellij-community | refs/heads/master | python/testData/refactoring/argumentList/addParam/addArgumentFile.after.py | 80 | from stub import *
import stub
class MyOldClass(SuperClass):
pass
class MyNewClass(object,SuperClass):
pass
class MyNewClass_2(object, datetime,SuperClass):
pass
class NewClass_3(stub.object,SuperClass):
pass
class NewClass_4(stub.object, stub.datetime,SuperClass):
pass
new_param = "ogg"
m... |
mayavanand/RMMAFinalProject | refs/heads/master | azimuth/features/microhomology.py | 3 | #Supplementary Figure 3 | Source code for assigning a score to a hypothetical deletion
#pattern associated with microhomology
# ------------------------------------------
# comes from the Supplementary Info of the paper, in pdf form, copied here, but refactored to make a function
# rather than to write it to fil... |
hsidky/MolSimScripts | refs/heads/master | reactive_flux.py | 1 | #!/afs/crc.nd.edu/x86_64_linux/python/3.4.0/gcc-4.8.0/bin/python3
''' reactive_flux.py - Calculates the normalized reactive flux, k(t),
from a set of GROMACS simulations started at the maximum of the
free energy barrier. Currently supports bimolecular reactions.
'''
import os
import numpy as np
import math
import sys... |
gaumire/heroku-buildpack-python | refs/heads/master | vendor/pip-pop/pip/vcs/git.py | 280 | from __future__ import absolute_import
import logging
import tempfile
import os.path
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip._vendor.six.moves.urllib import request as urllib_request
from pip.utils import display_path, rmtree
from pip.vcs import vcs, VersionControl
urlsplit = urllib... |
jantman/nodemeister | refs/heads/master | enc/tests/__init__.py | 12133432 | |
tangfeixiong/nova | refs/heads/stable/juno | nova/api/__init__.py | 12133432 | |
joakim-hove/django | refs/heads/master | tests/migrations/test_migrations_initial_false/__init__.py | 12133432 | |
dcosentino/edx-platform | refs/heads/master | cms/djangoapps/contentstore/management/commands/tests/__init__.py | 12133432 | |
davidharrigan/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_b/__init__.py | 12133432 | |
bcorbet/SickRage | refs/heads/master | sickbeard/providers/torrentleech.py | 2 | # Author: Idan Gutman
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... |
shruthiag96/ns3-dev-vns | refs/heads/master | bindings/python/ns3modulegen.py | 199 |
LOCAL_MODULES = [
#'my_extra_api_definitions',
]
import sys
import os
sys.path.insert(0, sys.argv[2])
from pybindgen import FileCodeSink, write_preamble
from pybindgen.module import MultiSectionFactory
import pybindgen.settings
pybindgen.settings.deprecated_virtuals = False
from ns3modulegen_generated i... |
webbers/pyhammer | refs/heads/master | pyhammer/tasks/git/gitcheckouttask.py | 1 | # -*- coding: utf-8 -*-
from pyhammer.tasks.taskbase import TaskBase
from pyhammer.utils import execProg
class GitCheckoutTask(TaskBase):
def __init__( self, branch, dir ):
super(GitCheckoutTask, self).__init__()
self.__branch = branch
self.__dir = dir
def do( self ):
self.rep... |
Armored-Dragon/goldmine | refs/heads/master | util/datastore.py | 1 | """Functions for handling the Data Store."""
import asyncio
import os
import sys
import random
import shutil
import util.json as json
import util.dynaimport as di
from discord.ext.commands import CommandInvokeError
from properties import storage_backend
bson = di.load('bson')
class DataStore():
"""The data store c... |
alexlo03/ansible | refs/heads/devel | lib/ansible/plugins/cliconf/iosxr.py | 21 | #
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... |
HydraCompany/HydraKernel | refs/heads/TW601-stable | tools/perf/python/twatch.py | 1565 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... |
eul-721/The-Perfect-Pokemon-Team-Balancer | refs/heads/master | libs/env/Lib/site-packages/pip/_vendor/html5lib/trie/__init__.py | 1735 | from __future__ import absolute_import, division, unicode_literals
from .py import Trie as PyTrie
Trie = PyTrie
try:
from .datrie import Trie as DATrie
except ImportError:
pass
else:
Trie = DATrie
|
aeklant/scipy | refs/heads/master | scipy/sparse/linalg/isolve/tests/test_iterative.py | 2 | """ Test functions for the sparse.linalg.isolve module
"""
import itertools
import platform
import numpy as np
from numpy.testing import (assert_equal, assert_array_equal,
assert_, assert_allclose, suppress_warnings)
import pytest
from pytest import raises as assert_raises
from numpy import zeros, arange, array... |
relekang/djangoproject.com | refs/heads/master | aggregator/tests.py | 3 | import datetime
import requests_mock
from django.conf import settings
from django.contrib.auth.models import Group, User
from django.core import mail
from django.core.management import call_command
from django.core.urlresolvers import reverse
from django.test import TestCase
from docs.models import DocumentRelease
f... |
alexsh/Telegram | refs/heads/master | TMessagesProj/jni/boringssl/util/bot/update_clang.py | 3 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This script is used to download prebuilt clang binaries."""
import os
import shutil
import subprocess
import stat
import sys
im... |
donkirkby/django | refs/heads/master | tests/template_tests/filter_tests/test_center.py | 345 | from django.template.defaultfilters import center
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class CenterTests(SimpleTestCase):
@setup({'center01':
'{% autoescape off %}.{{ a|center:"5" }}. .{{ b|center:"5" }}.{% endautoescape %}'})
... |
CiscoSystems/openstack-dashboard | refs/heads/master | django-openstack/django_openstack/context_processors.py | 4 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... |
cea-sec/miasm | refs/heads/master | miasm/arch/ppc/lifter_model_call.py | 2 | from miasm.expression.expression import ExprAssign, ExprOp
from miasm.ir.ir import AssignBlock
from miasm.ir.analysis import LifterModelCall
from miasm.arch.ppc.sem import Lifter_PPC32b
class LifterModelCallPpc32b(Lifter_PPC32b, LifterModelCall):
def __init__(self, loc_db, *args):
super(LifterModelCallPp... |
flp9001/astrology | refs/heads/master | astro/users/migrations/__init__.py | 12133432 | |
rmboggs/django | refs/heads/master | tests/m2m_recursive/__init__.py | 12133432 | |
lmorchard/django | refs/heads/master | django/contrib/auth/handlers/__init__.py | 12133432 | |
sgzsh269/django | refs/heads/master | tests/admin_scripts/simple_app/management/__init__.py | 12133432 | |
jvkops/django | refs/heads/master | tests/admin_views/__init__.py | 12133432 | |
maxsocl/django | refs/heads/master | tests/m2m_and_m2o/__init__.py | 12133432 | |
codepantry/django | refs/heads/master | tests/custom_methods/__init__.py | 12133432 | |
koobonil/Boss2D | refs/heads/master | Boss2D/addon/tensorflow-1.2.1_for_boss/tensorflow/python/kernel_tests/fft_ops_test.py | 32 | # 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... |
ministryofjustice/manchester_traffic_offences_pleas | refs/heads/master | apps/result/migrations/0002_auto_20160225_1621.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('result', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='result',
name='processed... |
Samsung/skia | refs/heads/dev/m36_1985 | gm/rebaseline_server/compare_rendered_pictures_test.py | 67 | #!/usr/bin/python
"""
Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
Test compare_rendered_pictures.py
TODO(epoger): Create a command to update the expected results (in
self._output_dir_expected) when appropriate. For now, you should:
1.... |
lizardsystem/lizard-kml | refs/heads/master | lizard_kml/templatetags/tools.py | 1 | from django.template import Library
from django.template.defaulttags import URLNode, url
register = Library()
class AbsoluteURLNode(URLNode):
def render(self, context):
path = super(AbsoluteURLNode, self).render(context)
return context['view'].request.build_absolute_uri(path)
@register.tag
def... |
jasrusable/fun | refs/heads/master | venv/lib/python2.7/site-packages/nose/importer.py | 14 | """Implements an importer that looks only in specific path (ignoring
sys.path), and uses a per-path cache in addition to sys.modules. This is
necessary because test modules in different directories frequently have the
same names, which means that the first loaded would mask the rest when using
the builtin importer.
"""... |
xfournet/intellij-community | refs/heads/master | python/testData/mover/indentedOneLine_afterUp.py | 83 | def a():
if True:
a = 1
c = 1
else:
b = 2
|
nkrinner/nova | refs/heads/master | nova/virt/baremetal/db/sqlalchemy/migrate_repo/versions/005_drop_unused_columns_from_nodes.py | 29 | # Copyright (c) 2013 NTT DOCOMO, 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 ... |
bask/or-tools | refs/heads/master | examples/python/eq10.py | 34 | # Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com
#
# 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 ... |
richardhsu/naarad | refs/heads/master | lib/luminol/src/luminol/__init__.py | 4 | # coding=utf-8
"""
© 2014 LinkedIn 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.0
Unless required by applicable law or agreed ... |
the100rabh/Barcamp-Bangalore-Android-App | refs/heads/master | gcm_flask/flask/debughelpers.py | 69 | # -*- coding: utf-8 -*-
"""
flask.debughelpers
~~~~~~~~~~~~~~~~~~
Various helpers to make the development experience better.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
class DebugFilesKeyError(KeyError, AssertionError):
"""Raised from request.fil... |
Tejal011089/huntercamp_erpnext | refs/heads/develop | erpnext/hr/doctype/earning_type/test_earning_type.py | 66 | # 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
test_records = frappe.get_test_records('Earning Type') |
isandlaTech/cohorte-devtools | refs/heads/master | org.cohorte.eclipse.runner.basic/files/jython/Lib/xml/sax/xmlreader.py | 136 | """An XML Reader is the SAX 2 name for an XML parser. XML Parsers
should be based on this code. """
import handler
from _exceptions import SAXNotSupportedException, SAXNotRecognizedException
# ===== XMLREADER =====
class XMLReader:
"""Interface for reading an XML document using callbacks.
XMLReader is the... |
belmiromoreira/nova | refs/heads/master | nova/scheduler/filters/image_props_filter.py | 58 | # Copyright (c) 2011-2012 OpenStack Foundation
# Copyright (c) 2012 Canonical Ltd
# Copyright (c) 2012 SUSE LINUX Products GmbH
# 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 o... |
sarakha63/persomov | refs/heads/master | libs/qbittorrent/torrent.py | 64 | from qbittorrent.base import Base
from qbittorrent.file import File
from qbittorrent.helpers import try_convert
class Torrent(Base):
properties = {
'num_seeds': {
'key': 'seeds',
'parse': lambda value: try_convert(value, int)
},
'num_leechs': {
'key': 'l... |
Orochimarufan/youtube-dl | refs/heads/master | youtube_dl/extractor/clippit.py | 38 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
parse_iso8601,
qualities,
)
import re
class ClippitIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?clippituser\.tv/c/(?P<id>[a-z]+)'
_TEST = {
'url': 'https://www.clippituse... |
blarghmatey/pip | refs/heads/develop | tests/unit/test_cmdoptions.py | 40 | import pip
from pip.basecommand import Command
from pip import cmdoptions
class SimpleCommand(Command):
name = 'fake'
summary = name
def __init__(self):
super(SimpleCommand, self).__init__()
self.cmd_opts.add_option(cmdoptions.no_use_wheel())
self.cmd_opts.add_option(cmdoptions.no... |
liikGit/MissionPlanner | refs/heads/master | Lib/site-packages/scipy/integrate/vode.py | 53 |
import sys
if sys.platform == 'cli':
import clr
clr.AddReference('integrate')
from scipy__integrate__vode import *
|
yetsky/extra | refs/heads/master | packages/my-application/python-all/files/usr/lib/python2.7/dumbdbm.py | 27 | """A dumb and slow but simple dbm clone.
For database spam, spam.dir contains the index (a text file),
spam.bak *may* contain a backup of the index (also a text file),
while spam.dat contains the data (a binary file).
XXX TO DO:
- seems to contain a bug when updating...
- reclaim free space (currently, space once o... |
fernandopso/python_koans | refs/heads/master | python3/koans/about_multiple_inheritance.py | 96 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Slightly based on AboutModules in the Ruby Koans
#
from runner.koan import *
class AboutMultipleInheritance(Koan):
class Nameable:
def __init__(self):
self._name = None
def set_name(self, new_name):
self._name = new_name
... |
khchine5/opal | refs/heads/v0.9.0 | opal/core/tagging.py | 2 | """
Tagging Opal episodes
"""
from opal.core import patient_lists
def parent(tag):
"""
Returns the parent tag, or None if the current
tag has no parent.
"""
for tlist in patient_lists.TaggedPatientList.list():
if getattr(tlist, 'subtag', None) == tag:
return tlist.tag
retur... |
GdZ/scriptfile | refs/heads/master | software/googleAppEngine/lib/PyAMF/pyamf/adapters/_django_db_models_fields.py | 45 | # Copyright (c) The PyAMF Project.
# See LICENSE.txt for details.
"""
C{django.db.models.fields} adapter module.
@see: U{Django Project<http://www.djangoproject.com>}
@since: 0.4
"""
from django.db.models import fields
import pyamf
def convert_NOT_PROVIDED(x, encoder):
"""
@rtype: L{Undefined<pyamf.Undefi... |
opengeogroep/inasafe | refs/heads/master | safe_qgis/impact_statistics/function_options_dialog.py | 2 | # coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid -
**Impact Functions Dialog.**
Contact : ole.moller.nielsen@gmail.com
.. note:: 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 Soft... |
microcom/odoo | refs/heads/9.0 | addons/account_bank_statement_import/__init__.py | 68 | # -*- encoding: utf-8 -*-
import account_bank_statement_import
import account_journal
import wizard
|
kohoumas/ns-3-click-mac-dev | refs/heads/master | src/emu/bindings/callbacks_list.py | 319 | callback_classes = [
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'],
['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ... |
koolspin/rosetta | refs/heads/master | filters/http_client_source.py | 1 | from tornado import httpclient, gen
from tornado.platform.asyncio import AsyncIOMainLoop
from filters.tornado_source import TornadoSource
from graph.filter_base import FilterBase, FilterState, FilterType
from graph.input_pin import InputPin
from graph.output_pin import OutputPin
class HttpClientSource(FilterBase):
... |
Micronaet/micronaet-product | refs/heads/master | inventory_status_extra_mrp/__init__.py | 16 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... |
benvermaercke/pyqtgraph | refs/heads/develop | pyqtgraph/graphicsItems/GraphicsWidget.py | 52 | from ..Qt import QtGui, QtCore
from ..GraphicsScene import GraphicsScene
from .GraphicsItem import GraphicsItem
__all__ = ['GraphicsWidget']
class GraphicsWidget(GraphicsItem, QtGui.QGraphicsWidget):
_qtBaseClass = QtGui.QGraphicsWidget
def __init__(self, *args, **kargs):
"""
**Bases:**... |
aperigault/ansible | refs/heads/devel | lib/ansible/plugins/netconf/default.py | 79 | #
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... |
googleapis/googleapis-gen | refs/heads/master | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/google_voice_call_status.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
kustodian/ansible | refs/heads/devel | lib/ansible/vars/hostvars.py | 4 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@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) an... |
oktools/coypu | refs/heads/master | quokka/core/admin/models.py | 5 | # coding : utf -8
import json
import random
import datetime
from flask.ext.admin.contrib.mongoengine import ModelView
from flask.ext.admin.contrib.fileadmin import FileAdmin as _FileAdmin
from flask.ext.admin.babel import gettext, ngettext
from flask.ext.admin import AdminIndexView
from flask.ext.admin import BaseView... |
xinhunbie/NS3- | refs/heads/master | src/tap-bridge/bindings/modulegen__gcc_ILP32.py | 19 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
ahb0327/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/conf/locale/te/__init__.py | 12133432 | |
jonaubf/vimrc | refs/heads/master | dot.vim/ftplugin/python/pyflakes/pyflakes/test/__init__.py | 12133432 | |
siosio/intellij-community | refs/heads/master | python/testData/intentions/paramTypeInGoogleDocStringParamDeclaredEmptyParenthesis.py | 53 | def f(<caret>x, y):
"""
Summary.
Parameters:
x (): foo
""" |
astocko/agpy | refs/heads/master | AG_fft_tools/upsample.py | 6 | import fast_ffts
import warnings
import numpy as np
import shift
def dftups(inp,nor=None,noc=None,usfac=1,roff=0,coff=0):
"""
*translated from matlab*
http://www.mathworks.com/matlabcentral/fileexchange/18401-efficient-subpixel-image-registration-by-cross-correlation/content/html/efficient_subpixel_registr... |
adminneyk/codificacionproyectando | refs/heads/master | application/views/Generacion/Generacion/lib/openoffice/openoffice.org/basis3.4/program/python-core-2.6.1/lib/gettext.py | 73 | """Internationalization and localization support.
This module provides internationalization (I18N) and localization (L10N)
support for your Python programs by providing an interface to the GNU gettext
message catalog library.
I18N refers to the operation by which a program is made aware of multiple
languages. L10N r... |
gtko/CouchPotatoServer | refs/heads/develop | libs/apscheduler/jobstores/ram_store.py | 117 | """
Stores jobs in an array in RAM. Provides no persistence support.
"""
from apscheduler.jobstores.base import JobStore
class RAMJobStore(JobStore):
def __init__(self):
self.jobs = []
def add_job(self, job):
self.jobs.append(job)
def update_job(self, job):
pass
def remove_... |
trishnaguha/ansible | refs/heads/devel | lib/ansible/plugins/filter/json_query.py | 197 | # (c) 2015, Filipe Niero Felisbino <filipenf@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 l... |
cloudfoundry/php-buildpack-legacy | refs/heads/master | builds/runtimes/python-2.7.6/lib/python2.7/email/parser.py | 392 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw, Thomas Wouters, Anthony Baxter
# Contact: email-sig@python.org
"""A parser of RFC 2822 and MIME email messages."""
__all__ = ['Parser', 'HeaderParser']
import warnings
from cStringIO import StringIO
from email.feedparser import FeedParser
... |
cloud-370/python3-webapp | refs/heads/master | www/test.py | 1 | import orm
from models import User, Blog, Comment
def test():
yield from orm.create_pool(user='www-data', passwd='www-data', database='awesome')
u = User(name='Test', email='test@example.com', passwd='1234567890', image='about:blank')
yield from u.save()
for x in test():
pass |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.