repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
rayNymous/nupic | refs/heads/master | tests/unit/nupic/research/monitor_mixin/metric_test.py | 35 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... |
fujunwei/chromium-crosswalk | refs/heads/master | third_party/boringssl/update_gypi_and_asm.py | 3 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can b
# found in the LICENSE file.
"""Enumerates the BoringSSL source in src/ and generates two gypi files:
boringssl.gypi and boringssl_tests.gypi."""
import os
import subprocess
import sys... |
geoalchimista/chflux | refs/heads/master | chflux/io/parsers.py | 1 | """PyChamberFlux I/O module containing a collection of data parsers."""
import pandas as pd
# A collection of parsers for timestamps stored in multiple columns.
# Supports only the ISO 8601 format (year-month-day).
# Does not support month-first (American) or day-first (European) format.
timestamp_parsers = {
# d... |
benreynwar/rfgnocchi | refs/heads/master | xilinx/__init__.py | 12133432 | |
theshteves/tweet-the-wolf | refs/heads/master | pips/cryptography/hazmat/primitives/kdf/pbkdf2.py | 70 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.exceptions import (
... |
machinecoin-project/machinecoin | refs/heads/0.17 | test/functional/p2p_segwit.py | 2 | #!/usr/bin/env python3
# Copyright (c) 2016-2018 The Machinecoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test segwit transactions and blocks on P2P network."""
from binascii import hexlify
import math
im... |
litchfield/django | refs/heads/master | tests/select_related/__init__.py | 12133432 | |
tomkralidis/geonode | refs/heads/master | geonode/documents/management/commands/__init__.py | 12133432 | |
TomHeatwole/osf.io | refs/heads/develop | website/addons/forward/tests/__init__.py | 12133432 | |
xujun10110/sleepy-puppy-1 | refs/heads/master | sleepypuppy/collector/__init__.py | 12133432 | |
Just-D/chromium-1 | refs/heads/master | third_party/cython/src/Cython/Compiler/Tests/TestVisitor.py | 133 | from Cython.Compiler.ModuleNode import ModuleNode
from Cython.Compiler.Symtab import ModuleScope
from Cython.TestUtils import TransformTest
from Cython.Compiler.Visitor import MethodDispatcherTransform
from Cython.Compiler.ParseTreeTransforms import (
NormalizeTree, AnalyseDeclarationsTransform,
AnalyseExpressi... |
ferabra/edx-platform | refs/heads/master | common/djangoapps/config_models/admin.py | 84 | """
Admin site models for managing :class:`.ConfigurationModel` subclasses
"""
from django.forms import models
from django.contrib import admin
from django.contrib.admin import ListFilter
from django.core.cache import get_cache, InvalidCacheBackendError
from django.core.urlresolvers import reverse
from django.http imp... |
Jeongseob/xen-coboost-sched | refs/heads/master | tools/python/xen/xend/server/SrvXendLog.py | 52 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... |
ProfessionalIT/professionalit-webiste | refs/heads/master | sdk/google_appengine/lib/django-1.5/django/contrib/localflavor/us/__init__.py | 12133432 | |
mathieui/pleaseshare | refs/heads/master | pleaseshare/torrent/__init__.py | 12133432 | |
CINPLA/expipe-dev | refs/heads/master | exdir-browser/exdirbrowser/models/__init__.py | 12133432 | |
longzhi/Zappa | refs/heads/master | zappa/core.py | 1 | from __future__ import print_function
import boto3
import botocore
import glob
import json
import logging
import os
import random
import requests
import shutil
import string
import subprocess
import tarfile
import tempfile
import time
import troposphere
import troposphere.apigateway
import zipfile
from builtins impor... |
HackerTool/Sark | refs/heads/master | sark/qt.py | 3 | import os
import sys
import idaapi
from . import exceptions
# This nasty piece of code is here to force the loading of IDA's PySide.
# Without it, Python attempts to load PySide from the site-packages directory,
# and failing, as it does not play nicely with IDA.
old_path = sys.path[:]
try:
ida_python_path = os.... |
rhertzog/django | refs/heads/master | tests/resolve_url/urls.py | 100 | from django.conf.urls import url
def some_view(request):
pass
urlpatterns = [
url(r'^some-url/$', some_view, name='some-view'),
]
|
WeblateOrg/weblate | refs/heads/main | weblate/api/apps.py | 2 | #
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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 Lice... |
kangxu/crosswalk-test-suite | refs/heads/master | apptools/apptools-ios-tests/apptools/manifest_name.py | 3 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... |
plotly/plotly.py | refs/heads/master | packages/python/plotly/plotly/validators/parcoords/line/_color.py | 1 | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(self, plotly_name="color", parent_name="parcoords.line", **kwargs):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... |
agincel/AdamTestBot | refs/heads/master | requests/packages/urllib3/util/response.py | 3 | def is_fp_closed(obj):
"""
Checks whether a given file-like object is closed.
:param obj:
The file-like object to check.
"""
try:
# Check via the official file-like-object way.
return obj.closed
except AttributeError:
pass
try:
# Chec... |
gameduell/duell | refs/heads/master | bin/mac/python2.7.9/lib/python2.7/heapq.py | 50 | # -*- coding: latin-1 -*-
"""Heap queue algorithm (a.k.a. priority queue).
Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for
all k, counting elements from 0. For the sake of comparison,
non-existing elements are considered to be infinite. The interesting
property of a heap is that a[0] is always ... |
edx/ecommerce-worker | refs/heads/master | ecommerce_worker/celery_app.py | 1 | from __future__ import absolute_import
import os
from celery import Celery
from ecommerce_worker.configuration import CONFIGURATION_MODULE
# Set the default configuration module, if one is not aleady defined.
os.environ.setdefault(CONFIGURATION_MODULE, 'ecommerce_worker.configuration.local')
app = Celery('ecommerce... |
JazzeYoung/VeryDeepAutoEncoder | refs/heads/master | pylearn2/pylearn2/datasets/wiskott.py | 45 | """
.. todo::
WRITEME
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
import numpy as N
from pylearn2.datasets import dense_design_matri... |
msmbuilder/msmbuilder-legacy | refs/heads/master | MSMBuilder/reduce/tICA.py | 1 | from __future__ import print_function, division, absolute_import
import numpy as np
import scipy.linalg
from time import time
import logging
from mdtraj import io
from mdtraj.utils.six.moves import cPickle
from msmbuilder.metrics import Vectorized
from msmbuilder.reduce import AbstractDimReduction
logger = logging.g... |
kajgan/e2 | refs/heads/master | lib/python/Screens/ServiceInfo.py | 2 | from Components.HTMLComponent import HTMLComponent
from Components.GUIComponent import GUIComponent
from Screen import Screen
from Components.ActionMap import ActionMap
from Components.Label import Label
from ServiceReference import ServiceReference
from enigma import eListboxPythonMultiContent, eListbox, gFont, iServi... |
lewislone/mStocks | refs/heads/master | packets-analysis/lib/dpkt-1.7/dpkt/rip.py | 15 | # $Id: rip.py 23 2006-11-08 15:45:33Z dugsong $
"""Routing Information Protocol."""
import dpkt
# RIP v2 - RFC 2453
# http://tools.ietf.org/html/rfc2453
REQUEST = 1
RESPONSE = 2
class RIP(dpkt.Packet):
__hdr__ = (
('cmd', 'B', REQUEST),
('v', 'B', 2),
('rsvd', 'H', 0)
)
def... |
koniiiik/django | refs/heads/master | tests/gis_tests/gis_migrations/migrations/0001_initial.py | 269 | from django.db import connection, migrations, models
from ...models import models as gis_models
ops = [
migrations.CreateModel(
name='Neighborhood',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('name', models.C... |
asnorkin/sentiment_analysis | refs/heads/master | site/lib/python2.7/site-packages/requests/__init__.py | 2 | # -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
Requests HTTP library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> ... |
nichung/wwwflaskBlogrevA | refs/heads/master | env/lib/python2.7/site-packages/flask/testsuite/ext.py | 563 | # -*- coding: utf-8 -*-
"""
flask.testsuite.ext
~~~~~~~~~~~~~~~~~~~
Tests the extension import thing.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import sys
import unittest
try:
from imp import reload as reload_module
except ImportError:
reload... |
tvibliani/odoo | refs/heads/8.0 | addons/website_blog/tests/test_website_blog_flow.py | 269 | # -*- coding: utf-8 -*-
from openerp.addons.website_blog.tests.common import TestWebsiteBlogCommon
class TestWebsiteBlogFlow(TestWebsiteBlogCommon):
def test_website_blog_followers(self):
""" Test the flow of followers and notifications for blogs. Intended
flow :
- people subscribe to ... |
Germanika/plover | refs/heads/bozzy | plover/gui_qt/about_dialog.py | 2 |
import re
from PyQt5.QtWidgets import QDialog
import plover
from plover.gui_qt.about_dialog_ui import Ui_AboutDialog
class AboutDialog(QDialog, Ui_AboutDialog):
ROLE = 'about'
def __init__(self, engine):
super(AboutDialog, self).__init__()
self.setupUi(self)
credits = []
... |
gmorph/MAVProxy | refs/heads/master | MAVProxy/modules/mavproxy_gasheli.py | 10 | """
helicopter monitoring and control module gas helicopters
"""
import os, sys, math, time
from pymavlink import mavutil
from MAVProxy.modules.lib import mp_util
from MAVProxy.modules.lib import mp_module
from MAVProxy.modules.lib import mp_settings
class GasHeliModule(mp_module.MPModule):
def __init__(self, mp... |
brucetsao/arduino-ameba | refs/heads/master | build/windows/work/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/arm-none-eabi/share/gdb/python/gdb/__init__.py | 110 | # Copyright (C) 2010-2013 Free Software Foundation, 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 3 of the License, or
# (at your option) any later version.
#
# This progr... |
andymckay/zamboni | refs/heads/master | wsgi/__init__.py | 12133432 | |
eestay/edx-platform | refs/heads/master | lms/djangoapps/dashboard/management/__init__.py | 12133432 | |
yanbober/SmallReptileTraining | refs/heads/master | DistributedBaseSpider/__init__.py | 12133432 | |
tomduijf/home-assistant | refs/heads/master | tests/util/__init__.py | 12133432 | |
tjlaboss/openmc | refs/heads/develop | tests/regression_tests/tallies/__init__.py | 12133432 | |
FireBladeNooT/Medusa_1_6 | refs/heads/master | medusa/post_processor.py | 1 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
#
# This file is part of Medusa.
#
# Medusa 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... |
mpdevilleres/tbpc_app | refs/heads/master | tbpc/team_mgt/migrations/0001_initial.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-03 04:29
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
... |
andyzsf/django | refs/heads/master | django/contrib/sessions/backends/cache.py | 102 | from django.conf import settings
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.core.cache import caches
from django.utils.six.moves import xrange
KEY_PREFIX = "django.contrib.sessions.cache"
class SessionStore(SessionBase):
"""
A cache-based session store.
"""
... |
kenshay/ImageScripter | refs/heads/master | ProgramData/Android/ADB/platform-tools/systrace/catapult/telemetry/telemetry/timeline/importer.py | 39 | # Copyright 2014 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.
class TimelineImporter(object):
"""Reads TraceData and populates timeline model with what it finds."""
def __init__(self, model, trace_data, import_orde... |
numenta/NAB | refs/heads/master | nab/detectors/htmjava/__init__.py | 12133432 | |
pixyj/feel | refs/heads/master | client/config/nginx/__init__.py | 12133432 | |
playm2mboy/edx-platform | refs/heads/master | lms/djangoapps/discussion_api/tests/__init__.py | 12133432 | |
gg7/sentry | refs/heads/master | tests/sentry/models/__init__.py | 12133432 | |
awainer/7539 | refs/heads/master | aplicaciones_informaticas/backend/migrations/__init__.py | 12133432 | |
proliming/zulip | refs/heads/master | zilencer/urls/__init__.py | 12133432 | |
aldryn/aldryn-grid-foundation | refs/heads/master | aldryn_grid_foundation/migrations/__init__.py | 12133432 | |
pali88/support-tools | refs/heads/master | googlecode-issues-exporter/__init__.py | 12133432 | |
citrix-openstack-build/nova | refs/heads/master | nova/api/openstack/compute/plugins/v3/__init__.py | 12133432 | |
coberger/DIRAC | refs/heads/integration | TransformationSystem/Agent/RequestOperations/__init__.py | 12133432 | |
threefoldfoundation/app_backend | refs/heads/master | plugins/tff_backend/models/investor.py | 1 | from google.appengine.ext import ndb
from enum import IntEnum
from framework.models.common import NdbModel
from framework.utils import now
from plugins.tff_backend.bizz.gcs import get_serving_url, encrypt_filename
from plugins.tff_backend.consts.payment import TOKEN_TFT
from plugins.tff_backend.plugin_consts import NA... |
PikaDm/clave-online-shop-template | refs/heads/master | clave/views.py | 1 | from django.shortcuts import render, get_object_or_404
from .models import Category, Product
from cart.forms import CartAddProductForm
from .recommender import Recommender
def product_list(request, category_slug=None):
category = None
categories = Category.objects.all()
products = Product.objects.filter(a... |
kaarl/pyload | refs/heads/stable | module/plugins/hoster/WarserverCz.py | 5 | # -*- coding: utf-8 -*-
from module.plugins.internal.DeadHoster import DeadHoster
class WarserverCz(DeadHoster):
__name__ = "WarserverCz"
__type__ = "hoster"
__version__ = "0.17"
__status__ = "stable"
__pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+'
__config__ = [] #@TOD... |
atsao72/sympy | refs/heads/master | examples/beginner/basic.py | 80 | #!/usr/bin/env python
"""Basic example
Demonstrates how to create symbols and print some algebra operations.
"""
import sympy
from sympy import pprint
def main():
a = sympy.Symbol('a')
b = sympy.Symbol('b')
c = sympy.Symbol('c')
e = ( a*b*b + 2*b*a*b )**c
print
pprint(e)
print
if __na... |
aweinstock314/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/wptserve/tests/functional/docroot/test_tuple_3.py | 467 | def main(request, response):
return (202, "Giraffe"), [("Content-Type", "text/html"), ("X-Test", "PASS")], "PASS"
|
gbrmachado/treeherder | refs/heads/master | tests/log_parser/test_error_parser.py | 10 | import pytest
from treeherder.log_parser.parsers import ErrorParser
ERROR_TEST_CASES = (
"23:52:39 INFO - 346 INFO TEST-UNEXPECTED-FAIL | dom/base/test/test_XHRDocURI.html | foo",
"00:54:55 WARNING - PROCESS-CRASH | Shutdown | application crashed [@ PR_GetThreadPrivate]",
"23:57:52 INFO - Remote Device Er... |
rgbconsulting/rgb-accounting | refs/heads/8.0 | account_move_extended/__init__.py | 6 | # -*- coding: utf-8 -*-
# See README file for full copyright and licensing details.
|
JakeBrand/CMPUT410-E3 | refs/heads/master | lab4/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/__init__.py | 132 | """Extensions to the 'distutils' for large or complex distributions"""
from setuptools.extension import Extension, Library
from setuptools.dist import Distribution, Feature, _get_unpatched
import distutils.core, setuptools.command
from setuptools.depends import Require
from distutils.core import Command as _Command
fro... |
gauravbose/digital-menu | refs/heads/master | build/lib.linux-x86_64-2.7/django/contrib/gis/geos/libgeos.py | 103 | """
This module houses the ctypes initialization procedures, as well
as the notice and error handler function callbacks (get called
when an error occurs in GEOS).
This module also houses GEOS Pointer utilities, including
get_pointer_arr(), and GEOM_PTR.
"""
import logging
import os
import re
from ctypes import CD... |
ychen820/microblog | refs/heads/master | y/google-cloud-sdk/platform/google_appengine/lib/django-1.4/django/dispatch/saferef.py | 86 | """
"Safe weakrefs", originally from pyDispatcher.
Provides a way to safely weakref any function, including bound methods (which
aren't handled by the core weakref module).
"""
import traceback
import weakref
def safeRef(target, onDelete = None):
"""Return a *safe* weak reference to a callable target
target... |
yurkis/whitebox | refs/heads/master | sysmanager/modules/comms/sys/info.py | 1 | import sys
import fileinput
import os
import subprocess
from ...result import *
################################################################################
def cpuload(args):
val= subprocess.getoutput("iostat proc")
strs=val.split("\n")
vals=strs[2].split()
idle= vals[6]
sys=vals[4]
user=vals[2]
in... |
Isilon/isilon_sdk | refs/heads/master | tests/test_namespace_directories.py | 1 | """Directories with isi_sdk.NamespaceApi."""
import urllib3
import isi_sdk_8_1_1 as isi_sdk
import test_constants
urllib3.disable_warnings()
def main():
# configure username and password
configuration = isi_sdk.Configuration()
configuration.username = test_constants.USERNAME
configuration.password ... |
ksrajkumar/openerp-6.1 | refs/heads/master | openerp/addons/mrp/report/bom_structure.py | 9 | ## -*- 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 GN... |
marckuz/django | refs/heads/master | tests/admin_scripts/custom_templates/app_template/api.py | 581 | # your API code
|
oOPa/ReClean | refs/heads/master | properties/migrations/0002_tennant.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('properties', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Tennant',
fields=[
... |
nicolasnoble/grpc | refs/heads/master | src/python/grpcio_status/grpc_status/__init__.py | 90 | # Copyright 2018 The gRPC 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 writ... |
damienmg/bazel | refs/heads/master | third_party/protobuf/3.4.0/python/google/protobuf/internal/message_test.py | 4 | #! /usr/bin/env python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... |
axsauze/eventsfinder | refs/heads/master | django/contrib/staticfiles/models.py | 12133432 | |
sghai/robottelo | refs/heads/master | tests/foreman/api/test_docker.py | 1 | # -*- encoding: utf-8 -*-
"""Unit tests for the Docker feature.
:Requirement: Docker
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: API
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
from random import choice, randint, shuffle
from time import sleep
from fauxfactory import gen_... |
valandil/complex_bessel | refs/heads/master | tests/hankelcontours.py | 2 | # Python script to generate the contour plot
# seen in Abramowitz & Stegun's book on p. 359.
# The values are imported from the file "contours.dat"
#
# The pylab module is required for this script to run
#
# Joey Dumont <joey.dumont@gmail.com>
# Denis Gagnon <gagnon88@gmail.com>
#
import numpy as np
import matplotlib... |
LUTAN/tensorflow | refs/heads/master | tensorflow/contrib/session_bundle/gc.py | 47 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
grayjay/aenea | refs/heads/master | client/aenea/communications.py | 4 | # This file is part of Aenea
#
# Aenea is free software: you can redistribute it and/or modify it under
# the terms of version 3 of the GNU Lesser General Public License as
# published by the Free Software Foundation.
#
# Aenea is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even ... |
DiogoGCosta/europe-travel | refs/heads/master | travel.py | 1 | #!/usr/bin/env python
#coding: utf-8
'''cidade de partida lisboa'''
'''o indice da cidade de partida (começando em 0) , neste caso é 7, pois é a 8ª cidade a aparecer no .csv'''
start_city = 7
'''cidade destino amsterdao'''
'''o indice da cidade destino, neste caso é 0, pois é o primeiro que aparece no .csv'''
dest_ci... |
paul-xxx/micropython | refs/heads/master | tests/basics/list_slice_3arg.py | 64 | x = list(range(10))
print(x[::-1])
print(x[::2])
print(x[::-2])
x = list(range(9))
print(x[::-1])
print(x[::2])
print(x[::-2])
|
adam111316/SickGear | refs/heads/master | lib/sqlalchemy/orm/persistence.py | 75 | # orm/persistence.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""private module containing functions used to emit INSERT, UPDATE
and DELETE state... |
saltduck/python-bitcoinlib | refs/heads/master | bitcoin/core/scripteval.py | 3 | # Copyright (C) 2012-2014 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or dist... |
MarcosCommunity/odoo | refs/heads/marcos-8.0 | addons/account/report/account_balance.py | 198 | # -*- 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... |
montoyjh/catmap | refs/heads/master | catmap/scalers/thermodynamic_scaler.py | 2 | from scaler_base import *
import numpy as np
class ThermodynamicScaler(ScalerBase):
"""Scaler which uses temperature/pressure/potential as descriptors and
treates energetics as a constant"""
def __init__(self,reaction_model=None):
ScalerBase.__init__(self,reaction_model)
def get_electronic_en... |
lmazuel/ansible | refs/heads/devel | lib/ansible/modules/cloud/ovirt/ovirt_clusters_facts.py | 45 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 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
#... |
John-Hart/autorest | refs/heads/master | src/generator/AutoRest.Python.Tests/AcceptanceTests/form_data_tests.py | 6 | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... |
alinbalutoiu/tempest | refs/heads/master | tempest/cmd/cleanup_service.py | 7 | #!/usr/bin/env python
# Copyright 2015 Dell 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 appl... |
bytedance/fedlearner | refs/heads/master | web_console_v2/api/test/fedlearner_webconsole/utils/mixins_test.py | 1 | # Copyright 2021 The FedLearner 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... |
singlebrook/AWS-ElasticBeanstalk-CLI | refs/heads/master | eb/linux/python3/scli/operation_queue.py | 8 | #!/usr/bin/env python
#==============================================================================
# Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use
# this file except in compliance with the License. A copy of the... |
amrdraz/brython | refs/heads/master | www/src/Lib/test/test_pep380.py | 34 | # -*- coding: utf-8 -*-
"""
Test suite for PEP 380 implementation
adapted from original tests written by Greg Ewing
see <http://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/YieldFrom-Python3.1.2-rev5.zip>
"""
import unittest
import io
import sys
import inspect
import parser
from test.support import captur... |
maxiee/MyCodes | refs/heads/master | AlgorithmInPython/Sort/sort_exer_151014.py | 1 | __author__ = 'maxiee'
import Sort.utils as utils
class Base:
data = []
aux = []
def __init__(self, data):
self.data = data
def sort(self):
pass
def less(self, i, j):
return self.data[i] < self.data[j]
def more(self, i, j):
return self.data[i] > self.data[j]
... |
Stanford-Online/edx-platform | refs/heads/master | common/djangoapps/entitlements/tests/factories.py | 17 | import string
from uuid import uuid4
import factory
from factory.fuzzy import FuzzyChoice, FuzzyText
from student.tests.factories import UserFactory
from course_modes.helpers import CourseMode
from entitlements.models import CourseEntitlement, CourseEntitlementPolicy
from openedx.core.djangoapps.site_configuration.te... |
LouisePaulDelvaux/Til-Liam | refs/heads/master | src_liam/config.py | 1 | from __future__ import print_function
import os
debug = os.environ.get("DEBUG", False)
input_directory = "."
output_directory = "."
skip_shows = False
assertions = "raise"
show_timings = True
autodump = None
autodump_file = None
autodiff = None
|
msebire/intellij-community | refs/heads/master | python/testData/surround/CustomFoldingRegionSeveralMethods_after.py | 22 | class C:
def m1(self):
pass
# <editor-fold desc="Description">
def m2(self):
pass
def m3(self):
pass
# </editor-fold> |
theknightorc/p2pool-candycoin | refs/heads/master | wstools/tests/test_wstools_net.py | 308 | #!/usr/bin/env python
############################################################################
# Joshua R. Boverhof, David W. Robertson, LBNL
# See LBNLCopyright for copyright notice!
###########################################################################
import unittest
import test_wsdl
def makeTestSuite():
... |
peterorum/functal | refs/heads/master | titles/nltk2-tweets.py | 1 | #!/usr/bin/python
import nltk
import os
import re
# import sys
# import random
# import collections
from pprint import pprint
import pymongo
client = pymongo.MongoClient(os.getenv('mongo_functal'))
db = client['topics']
possibly_sensitive_words = set(line.strip().replace(r'^', r'\b').replace(r'$', r'\b')
... |
joshowen/django-allauth | refs/heads/master | allauth/socialaccount/providers/oauth/provider.py | 6 | from django.utils.http import urlencode
from allauth.compat import parse_qsl, reverse
from allauth.socialaccount.providers.base import Provider
class OAuthProvider(Provider):
def get_login_url(self, request, **kwargs):
url = reverse(self.id + "_login")
if kwargs:
url = url + '?' + ur... |
plotly/python-api | refs/heads/master | packages/python/plotly/plotly/validators/isosurface/hoverlabel/font/_familysrc.py | 1 | import _plotly_utils.basevalidators
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self,
plotly_name="familysrc",
parent_name="isosurface.hoverlabel.font",
**kwargs
):
super(FamilysrcValidator, self).__init__(
plotly_name=... |
ishank08/scikit-learn | refs/heads/master | doc/sphinxext/sphinx_gallery/__init__.py | 25 | """
==============
Sphinx Gallery
==============
"""
import os
__version__ = '0.1.7'
def glr_path_static():
"""Returns path to packaged static files"""
return os.path.abspath(os.path.join(os.path.dirname(__file__), '_static'))
|
serviceagility/boto | refs/heads/develop | boto/roboto/__init__.py | 9480 | #
|
joshwalawender/POCS | refs/heads/develop | pocs/tests/test_dispatch_scheduler.py | 1 | import os
import pytest
import yaml
from astropy import units as u
from astropy.coordinates import EarthLocation
from astropy.time import Time
from astroplan import Observer
from pocs.scheduler.dispatch import Scheduler
from pocs.scheduler.constraint import Duration
from pocs.scheduler.constraint import MoonAvoidan... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.