repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
JetBrains/intellij-community | refs/heads/master | python/testData/intentions/PyConvertTypeCommentToVariableAnnotationIntentionTest/assignmentWithComplexUnpacking.py | 31 | [y, (x, (z))] = undefined() # ty<caret>pe: Optional[Union[None, Any]], (Callable[..., int], Any) |
yunfeilu/scikit-learn | refs/heads/master | sklearn/datasets/svmlight_format.py | 79 | """This module implements a loader and dumper for the svmlight format
This format is a text-based format, with one sample per line. It does
not store zero valued features hence is suitable for sparse dataset.
The first element of each line can be used to store a target variable to
predict.
This format is used as the... |
tjanez/ansible | refs/heads/devel | lib/ansible/modules/packaging/os/dnf.py | 25 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2015 Cristian van Ee <cristian at cvee.org>
# Copyright 2015 Igor Gnatenko <i.gnatenko.brain@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 pu... |
wackou/smewt | refs/heads/master | smewt/test/smewttest.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Smewt - A smart collection manager
# Copyright (c) 2008 Nicolas Wack <wackou@smewt.com>
#
# Smewt 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 versio... |
raviflipsyde/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_base.py | 652 | # Copyright 2011, 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 of conditions and the f... |
syscoin/syscoin2 | refs/heads/master | contrib/macdeploy/custom_dsstore.py | 1 | #!/usr/bin/env python3
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import biplist
from ds_store import DSStore
from mac_alias import Alias
import sys
output_file = sys.argv... |
fbagirov/scikit-learn | refs/heads/master | sklearn/learning_curve.py | 110 | """Utilities to evaluate models with respect to a variable
"""
# Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import warnings
import numpy as np
from .base import is_classifier, clone
from .cross_validation import check_cv
from .externals.joblib import Parallel, delayed
fro... |
koebbe/homeworks | refs/heads/master | visit/export_poc.py | 1 | #!/usr/bin/env python
import datetime
import os
from openpyxl import Workbook
from openpyxl.cell import get_column_letter
from openpyxl.comments import Comment
from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font
import xlsxwriter
import django
django.setup()
from django.db.models impo... |
corpusmusic/billboardcorpus | refs/heads/master | 4Bars_0thPower.py | 1 | from __future__ import division
from collections import defaultdict
from operator import itemgetter
from readdata import read_data
import csv
import sys
RN = ['I', 'bII', 'II', 'bIII', 'III', 'IV', 'bV', 'V', 'bVI', 'VI', 'bVII', 'VII', 'NonHarmonic']
for j in range(0,4):
z = ['4','4','4','4']
t = ['1','2','... |
Z2PackDev/Z2Pack | refs/heads/dev/current | tests/test_max_move.py | 1 | """
Test the function that computes the maximum move between two sets of WCC.
"""
# pylint: disable=redefined-outer-name
import copy
import random
random.seed(2512351)
import pytest
import numpy as np
import z2pack
max_move = z2pack._utils._get_max_move # pylint: disable=protected-access,invalid-name
@pytest.fixt... |
CCI-MOC/nova | refs/heads/k2k-liberty | nova/tests/functional/api_sample_tests/test_cells.py | 17 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 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 required... |
jiangzhonghui/viewfinder | refs/heads/master | marketing/tornado/curl_httpclient.py | 37 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 a... |
chengduoZH/Paddle | refs/heads/develop | python/paddle/fluid/tests/unittests/test_save_model_without_var.py | 2 | # Copyright (c) 2019 PaddlePaddle 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 appli... |
jackrzhang/zulip | refs/heads/master | zilencer/forms.py | 70 | from django import forms
class EnterpriseToSForm(forms.Form):
full_name = forms.CharField(max_length=100)
company = forms.CharField(max_length=100)
terms = forms.BooleanField(required=True)
|
OpenNumismat/open-numismat | refs/heads/master | tools/make_patch.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import codecs
import json
import os
import sys
from PyQt5 import QtCore
from PyQt5.QtCore import QStandardPaths, Qt, QDateTime
from PyQt5.QtGui import QImage
from PyQt5.QtSql import QSqlTableModel, QSqlDatabase, QSqlQuery
from PyQt5.QtWidgets import QApplication, ... |
LearnEra/LearnEraPlaftform | refs/heads/master | lms/djangoapps/django_comment_client/settings.py | 271 | from django.conf import settings
MAX_COMMENT_DEPTH = None
MAX_UPLOAD_FILE_SIZE = 1024 * 1024 # result in bytes
ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff')
if hasattr(settings, 'DISCUSSION_SETTINGS'):
MAX_COMMENT_DEPTH = settings.DISCUSSION_SETTINGS.get('MAX_COMMENT_DEPTH')
... |
mikshepard/android_kernel_samsung_klte | refs/heads/cm-12.1 | tools/perf/scripts/python/sctop.py | 11180 | # system call top
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Periodically displays system-wide system call totals, broken down by
# syscall. If a [comm] arg is specified, only syscalls called by
# [comm] are displayed. If an [interval] arg is specified,... |
tanayseven/Voix | refs/heads/master | flask/lib/python2.7/site-packages/migrate/versioning/migrate_repository.py | 120 | """
Script to migrate repository from sqlalchemy <= 0.4.4 to the new
repository schema. This shouldn't use any other migrate modules, so
that it can work in any version.
"""
import os
import sys
import logging
log = logging.getLogger(__name__)
def usage():
"""Gives usage information."""
print """Us... |
Maccimo/intellij-community | refs/heads/master | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorSimpleDictConstructorCall.py | 31 | '%(foo)d %(bar)s' % dict(foo=.25, bar='spam'.upper())
|
cris-iisc/mpc-primitives | refs/heads/master | crislib/libscapi/lib/boost_1_64_0/libs/python/test/pickle4.py | 20 | # Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
r'''>>> import pickle4_ext
>>> import pickle
>>> def world_getinitargs(self):
... return (self.get_country(),)
>>> pic... |
dimagol/trex-core | refs/heads/master | scripts/external_libs/pyyaml-3.11/python3/yaml/reader.py | 272 | # This module contains abstractions for the input stream. You don't have to
# looks further, there are no pretty code.
#
# We define two classes here.
#
# Mark(source, line, column)
# It's just a record and its only use is producing nice error messages.
# Parser does not use it for any other purposes.
#
# Reader(so... |
dzbarsky/servo | refs/heads/master | python/mach/mach/test/test_logger.py | 128 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, unicode_literals
import logging
import time
import unittest
from mach.logging ... |
ggenikus/cld | refs/heads/master | src/libs/workflow/workflow3.py | 3 | # encoding: utf-8
#
# Copyright (c) 2016 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2016-06-25
#
"""
:class:`Workflow3` supports Alfred 3's new features.
It is an Alfred 3-only version of :class:`~workflow.workflow.Workflow`.
It supports setting :ref:`... |
nikitasingh981/scikit-learn | refs/heads/master | sklearn/ensemble/tests/test_bagging.py | 43 | """
Testing for the bagging ensemble module (sklearn.ensemble.bagging).
"""
# Author: Gilles Louppe
# License: BSD 3 clause
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.te... |
gpitel/pyjs | refs/heads/master | examples/libtest/WindowTest.py | 7 | from UnitTest import UnitTest, IN_BROWSER
from pyjamas import Window
class WindowTest(UnitTest):
"""tests for javascript object conversion"""
def onWindowResized(self, width, height):
if not self.resize_test:
self.fail("onWindowResized called after WindowListener removed")
re... |
stphivos/django-paypal | refs/heads/master | paypal/standard/pdt/tests/settings.py | 26 | from __future__ import unicode_literals
import os
TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates')
# Django 1.8 and later
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
TEMPLATE_DIR,
],
'APP_DIRS': True,
... |
balticembedded/be-kernel | refs/heads/be_imx_2.6.35_maintain | scripts/tracing/draw_functrace.py | 14679 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... |
nasonfish/algebra-py | refs/heads/master | linear_programming.py | 1 | #!/usr/bin/python
"""
This program is free and open source, released into the public domain.
Daniel Barnes http://nasonfish.com/
This program is made for linear programming, as discussed in my math book.
The program accepts a list of inequalities (in the form of ax+by=c, where
a, b, and c are integers or floats in th... |
jobscore/sync-engine | refs/heads/master | inbox/util/stats.py | 3 | import statsd
from inbox.config import config
def get_statsd_client():
return statsd.StatsClient(
str(config.get("STATSD_HOST", "localhost")),
config.get("STATSD_PORT", 8125),
prefix=config.get("STATSD_PREFIX", "stats"))
statsd_client = get_statsd_client()
|
glue-viz/glue-3d-viewer | refs/heads/master | glue_vispy_viewers/volume/layer_state.py | 3 | from glue.core import Subset
from glue.external.echo import (CallbackProperty, SelectionCallbackProperty,
delay_callback)
from glue.core.state_objects import StateAttributeLimitsHelper
from glue.core.data_combo_helper import ComponentIDComboHelper
from ..common.layer_state import VispyLa... |
ErinCall/sync-engine | refs/heads/master | migrations/versions/032_tighten_easuid.py | 9 | """Tighten EAS constraints and fix easfoldersync state enum.
Revision ID: 3f96e92953e1
Revises: 55f0ff54c776
Create Date: 2014-05-21 17:43:44.556716
"""
# revision identifiers, used by Alembic.
revision = '3f96e92953e1'
down_revision = '55f0ff54c776'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.ex... |
Urinx/SomeCodes | refs/heads/master | Python/python_gray/debugger1.0/my_debugger.py | 1 | from ctypes import *
from my_debugger_defines import *
kernel32=windll.kernel32
class debugger(object):
def __init__(self):
pass
def load(self,path_to_exe):
"""
dwCreation flag determines how to create the process
set creation_flags=CREATE_NEW_CONSOLE if you want to see the calculator GUI
"""
... |
roselleebarle04/django | refs/heads/master | django/conf/locale/mk/formats.py | 504 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'H:i'
DATETI... |
dagwieers/ansible | refs/heads/devel | lib/ansible/modules/network/cloudengine/ce_sflow.py | 32 | #!/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... |
hail-is/hail | refs/heads/master | datasets/load/load.1000_Genomes_phase3_sites.GRCh37.py | 3 |
import hail as hl
ht = hl.import_table(
'gs://hail-datasets-raw-data/1000_Genomes/1000_Genomes_phase3_sites_GRCh37.tsv.bgz',
reference_genome='GRCh37')
ht.describe()
|
realsagi/python_koans | refs/heads/master | python3/koans/about_lists.py | 48 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Based on AboutArrays in the Ruby Koans
#
from runner.koan import *
class AboutLists(Koan):
def test_creating_lists(self):
empty_list = list()
self.assertEqual(list, type(empty_list))
self.assertEqual(__, len(empty_list))
def test_list... |
stakemori/siegel_series | refs/heads/master | tests/fourier_coeff_low_degree2.py | 1 | import unittest
from sage.all import eisenstein_series_qexp, matrix, ZZ
from ..siegel_eisenstein import SiegelEisensteinSeries as sess
from degree2.all import eisenstein_series_degree2
class ForierCoeffsLowDegrees(unittest.TestCase):
def assert_degree_1(self, k):
es = eisenstein_series_qexp(k, prec=11, n... |
JFriel/honours_project | refs/heads/master | venv/lib/python2.7/site-packages/requests/packages/urllib3/__init__.py | 360 | """
urllib3 - Thread-safe connection pooling and re-using.
"""
from __future__ import absolute_import
import warnings
from .connectionpool import (
HTTPConnectionPool,
HTTPSConnectionPool,
connection_from_url
)
from . import exceptions
from .filepost import encode_multipart_formdata
from .poolmanager imp... |
h2oai/h2o-2 | refs/heads/master | py/testdir_multi_jvm/test_dead_node_status.py | 9 | import unittest, time, sys
sys.path.extend(['.','..','../..','py'])
import h2o_browse as h2b
import h2o, h2o_util, h2o_log
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_errors()
@classmethod
def setUpClass(cls):
h2o.init(3)
@classmethod
def tearDownClas... |
dulems/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/views/debug.py | 98 | from __future__ import unicode_literals
import datetime
import os
import re
import sys
import types
from django.conf import settings
from django.http import (HttpResponse, HttpResponseServerError,
HttpResponseNotFound, HttpRequest, build_request_repr)
from django.template import Template, Context, TemplateDoesNot... |
katevontaine/myblog2 | refs/heads/master | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py | 2779 | # Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""gypsh output module
gypsh is a GYP shell. It's not really a generator per se. All it does is
fire up an interactive Python session with a few local variables... |
seguijoaquin/taller2-appserver | refs/heads/master | Appserver/Test/ApiUnitTesting/requests/packages/chardet/compat.py | 2942 | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Ian Cordasco - port to Python
#
# 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
# versio... |
miraculixx/geocoder | refs/heads/master | geocoder/mapquest.py | 3 | #!/usr/bin/python
# coding: utf8
from __future__ import absolute_import
import re
import requests
from geocoder.base import Base
from geocoder.keys import mapquest_key
class Mapquest(Base):
"""
MapQuest
========
The geocoding service enables you to take an address and get the
associated latitude ... |
JuliaPackageMirrors/ReverseDiffSource.jl | refs/heads/master | doc/conf.py | 5 | # -*- coding: utf-8 -*-
#
# ReverseDiffSource documentation build configuration file, created by
# sphinx-quickstart on Tue Jun 17 11:18:11 2014.
#
# 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
# autoge... |
alexcuellar/odoo | refs/heads/8.0 | addons/payment_sips/controllers/__init__.py | 4497 | # -*- coding: utf-8 -*-
import main
|
npuichigo/ttsflow | refs/heads/master | third_party/tensorflow/tensorflow/python/estimator/export/export_output.py | 37 | # Copyright 2017 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... |
ARMP/ARM-Project | refs/heads/master | tools/perf/python/twatch.py | 3213 | #! /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... |
ivan-fedorov/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/messages/storage/user_messages.py | 308 | """
Storages used to assist in the deprecation of contrib.auth User messages.
"""
from django.contrib.messages import constants
from django.contrib.messages.storage.base import BaseStorage, Message
from django.contrib.auth.models import User
from django.contrib.messages.storage.fallback import FallbackStorage
class ... |
pombredanne/pyjs | refs/heads/master | examples/kitchensink/sink/Logger.py | 6 | from pyjamas.ui.Grid import Grid
class Logger(Grid):
instances = []
def __init__(self):
Logger.instances.append(self)
Grid.__init__(self)
self.targets=[]
self.targets.append("app")
#self.targets.append("ui")
self.resize(len(self.targets)+1, 2)
self.set... |
florian-dacosta/OpenUpgrade | refs/heads/master | addons/mail/mail_vote.py | 439 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
scottdanesi/earthshaker-aftershock | refs/heads/master | procgame/dmd/dmd.py | 2 | import pinproc
import time
import os
class Frame(pinproc.DMDBuffer):
"""DMD frame/bitmap.
Subclass of :class:`pinproc.DMDBuffer`.
"""
width = 0
"""Width of the frame in dots."""
height = 0
"""Height of the frame in dots."""
def __init__(self, width, height):
"""Initializes the frame to the given `width... |
gangadhar-kadam/adb-erp | refs/heads/master | setup/doctype/price_list/price_list.py | 5 | # ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# 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 yo... |
keithf4/spotify_pm | refs/heads/master | find_dupes_user_playlists.py | 1 | #!/usr/bin/env python
from SpotifyPM import SpotifyPM
spm = SpotifyPM()
# Turn this into argparse argument
username = spm.get_username()
# Turn scope into argparse argument
sp = spm.auth(username, 'playlist-read-private')
if sp != None:
playlists = sp.user_playlists(username)
for playlist in playlists['items'... |
py-geek/City-Air | refs/heads/master | venv/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py | 96 | # -*- coding: utf-8 -
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import os
import sys
from gunicorn.errors import ConfigError
from gunicorn.app.base import Application
from gunicorn import util
class WSGIApplication(Application):
def init(self, parse... |
souzainf3/namebench | refs/heads/master | tools/ordered-uniq.py | 175 | #!/usr/bin/env python
# Copyright 2009 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... |
laszlocsomor/tensorflow | refs/heads/master | tensorflow/python/keras/_impl/keras/layers/normalization_test.py | 30 | # 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... |
SMALLplayer/smallplayer-image-creator | refs/heads/master | storage/.xbmc/addons/script.module.requests/lib/requests/packages/urllib3/packages/six.py | 2374 | """Utilities for writing code that runs on Python 2 and 3"""
#Copyright (c) 2010-2011 Benjamin Peterson
#Permission is hereby granted, free of charge, to any person obtaining a copy of
#this software and associated documentation files (the "Software"), to deal in
#the Software without restriction, including without l... |
chp1084/raft | refs/heads/master | core/workers/ResponsesThread.py | 11 | #
# Author: Gregory Fleischer (gfleischer@gmail.com)
#
# Copyright (c) 2011 RAFT Team
#
# This file is part of RAFT.
#
# RAFT 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... |
jotes/moto | refs/heads/master | moto/ec2/responses/key_pairs.py | 10 | from __future__ import unicode_literals
import six
from moto.core.responses import BaseResponse
from moto.ec2.utils import keypair_names_from_querystring, filters_from_querystring
class KeyPairs(BaseResponse):
def create_key_pair(self):
name = self.querystring.get('KeyName')[0]
keypair = self.ec2... |
plotly/python-api | refs/heads/master | packages/python/plotly/plotly/validators/table/cells/_alignsrc.py | 1 | import _plotly_utils.basevalidators
class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="alignsrc", parent_name="table.cells", **kwargs):
super(AlignsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... |
byt3bl33d3r/MITMf | refs/heads/master | core/sslstrip/SSLServerConnection.py | 26 | # Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati
#
# 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... |
ghostwords/localore | refs/heads/master | localore/blog/migrations/0019_auto_20160325_1159.py | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0018_auto_20160324_1029'),
]
operations = [
migrations.AlterModelOptions(
name='blogindexpage',
... |
akloster/pysiology | refs/heads/master | pysiology/muse.py | 1 | import time
from collections import defaultdict
import asyncio
from asyncio import coroutine, sleep, async
import bluetooth
import numpy as np
import bcolz
from sample_source import SampleSource
from utils import TSLogger, message
from streamer import StreamerCommand
import json
from command import ServerCommand
import... |
studio666/gratipay.com | refs/heads/master | tests/js/utils/auth-helper.py | 3 | #!/usr/bin/env python
from __future__ import print_function, unicode_literals
import os
import sys
import uuid
from datetime import timedelta
from aspen.utils import utcnow
import gratipay
from gratipay import wireup
from gratipay.models.participant import Participant
if len(sys.argv) < 2:
sys.exit('Usage: ... |
SummerLW/Perf-Insight-Report | refs/heads/test | third_party/gsutil/gslib/addlhelp/wildcards.py | 22 | # -*- coding: utf-8 -*-
# Copyright 2012 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 require... |
mklinker/uavcan | refs/heads/master | pyuavcan/pyuavcan/dsdl/signature.py | 15 | #
# UAVCAN DSDL signature computation
#
# Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
#
from __future__ import division, absolute_import, print_function, unicode_literals
#
# CRC-64-WE
# Description: http://reveng.sourceforge.net/crc-catalogue/17plus.htm#crc.cat-bits.64
# Initial value: 0xFFFFFFFFFFF... |
tarvitz/django-actions | refs/heads/master | settings.py | 1 | # Django settings for actions project.
import os
import sys
ROOT_PATH = os.path.dirname(__file__)
#if not ROOT_PATH in sys.path:
# sys.path.insert(0, ROOT_PATH)
def rel_path(path):
return os.path.join(ROOT_PATH, path)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com')... |
infoxchange/django-guardian | refs/heads/devel | extras.py | 85 | import _ast
import os
import sys
from setuptools import Command
#from pyflakes.scripts import pyflakes as flakes
def check(filename):
from pyflakes import reporter as mod_reporter
from pyflakes.checker import Checker
codeString = open(filename).read()
reporter = mod_reporter._makeDefaultReporter()
... |
akionakamura/scikit-learn | refs/heads/master | sklearn/externals/joblib/hashing.py | 194 | """
Fast cryptographic hash of Python objects, with a special case for fast
hashing of numpy arrays.
"""
# Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org>
# Copyright (c) 2009 Gael Varoquaux
# License: BSD Style, 3 clauses.
import warnings
import pickle
import hashlib
import sys
import types
import ... |
fengbaicanhe/intellij-community | refs/heads/master | python/testData/refactoring/inlinelocal/operatorPrecedence/bitwiseShift.after.py | 79 | (10 << 2)[::-5]
(10 << 2)[5]
(10 << 2)(5)
(10 << 2).foo
-(10 << 2)
+(10 << 2)
~(10 << 2)
5 ** (10 << 2)
(10 << 2) ** 5
5 * (10 << 2)
(10 << 2) * 5
5 / (10 << 2)
(10 << 2) / 5
5 // (10 << 2)
(10 << 2) // 5
5 + (10 << 2)
(10 << 2) + 5
(10 << 2) - 5
5 - (10 << 2)
5 >> 10 << 2
10 << 2 << 5
5 & 10 << 2
10 << 2 & 5
... |
bjoshua/ansible | refs/heads/devel | lib/ansible/compat/tests/unittest.py | 375 | # (c) 2014, 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 Software Foundation, either version 3 of the License, or
# (at your option) any later... |
michaelgallacher/intellij-community | refs/heads/master | python/testData/completion/fromNamespacePackageImport/a.after.py | 83 | from p1 import m1 |
xin3liang/platform_external_chromium-trace | refs/heads/master | trace-viewer/third_party/pywebsocket/src/test/test_mux.py | 29 | #!/usr/bin/env python
#
# Copyright 2012, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
cosailer/caeproject | refs/heads/master | simulation_result/1/project3_harmonic_sub.py | 4 | # -*- coding: utf-8 -*-
"""
-------------------------------------
N A C S P Y T H O N S C R I P T
-------------------------------------
NACS version: 2.0.2745 - pre3
NACS architecture: CENTOS 5.11 (X86_64)
File generated at Tue Jan 20 16:55:05 2015
On host 'lse86' by 'cae42'
"""
from __future__ import division ... |
kpanic/lymph | refs/heads/master | iris/events/null.py | 1 | from iris.events.base import BaseEventSystem
class NullEventSystem(BaseEventSystem):
def emit(self, container, event):
pass
|
jefftc/changlab | refs/heads/master | Betsy/Betsy/modules/merge_class0_class1_signal_signal.py | 1 | from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, antecedents, out_attributes, user_options, num_cores,
outfile):
"""merge three signal file to generate a joined signal file"""
impor... |
Stargrazer82301/CAAPR | refs/heads/master | CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/config/prepare_data.py | 1 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
# ... |
sawirah/OD8 | refs/heads/master | themes/custom/ocelot_d8/node_modules/utf8/tests/generate-test-data.py | 1788 | #!/usr/bin/env python
import re
import json
# https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
# http://stackoverflow.com/a/13436167/96656
def unisymbol(codePoint):
if codePoint >= 0x0000 and codePoint <= 0xFFFF:
return unichr(codePoint)
elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
... |
roisagiv/webrtc-ios | refs/heads/master | tools/gyp/test/variables/commands/gyptest-commands-repeated.py | 14 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Test variable expansion of '<!()' syntax commands where they are evaluated
more then once..
"""
import os
import TestGyp
test = TestG... |
a-parhom/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/search.py | 18 | ''' useful functions for finding content and its position '''
from logging import getLogger
from .exceptions import (ItemNotFoundError, NoPathToItem)
LOGGER = getLogger(__name__)
def path_to_location(modulestore, usage_key, full_path=False):
'''
Try to find a course_id/chapter/section[/position] path to loc... |
aboutsajjad/Bridge | refs/heads/master | app_packages/youtube_dl/extractor/slutload.py | 5 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class SlutloadIE(InfoExtractor):
_VALID_URL = r'^https?://(?:\w+\.)?slutload\.com/video/[^/]+/(?P<id>[^/]+)/?$'
_TESTS = [{
'url': 'http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqSxc/',
'md5': ... |
izonder/intellij-community | refs/heads/master | python/helpers/generator3.py | 37 | # encoding: utf-8
import atexit
import zipfile
# TODO: Move all CLR-specific functions to clr_tools
from pycharm_generator_utils.module_redeclarator import *
from pycharm_generator_utils.util_methods import *
from pycharm_generator_utils.constants import *
from pycharm_generator_utils.clr_tools import *
debug_mode ... |
baylee/django | refs/heads/master | tests/lookup/tests.py | 27 | from __future__ import unicode_literals
import collections
from datetime import datetime
from operator import attrgetter
from unittest import skipUnless
from django.core.exceptions import FieldError
from django.db import connection
from django.test import (
TestCase, TransactionTestCase, ignore_warnings, skipUnle... |
lechat/jenkinsflow | refs/heads/master | test/direct_url_test.py | 1 | # Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
from jenkinsflow.flow import serial
from .framework import api_select
def test_direct_url_is_public_url(api_type, capsys):
with api_select.api(__file__, api_type) as api:
... |
darrenbilby/grr | refs/heads/master | endtoend_tests/processes.py | 10 | #!/usr/bin/env python
"""End to end tests for lib.flows.general.processes."""
from grr.endtoend_tests import base
from grr.lib import aff4
class TestProcessListing(base.AutomatedTest):
"""Test ListProcesses."""
platforms = ["Linux", "Windows", "Darwin"]
flow = "ListProcesses"
output_path = "analysis/ListP... |
arokem/PyEMMA | refs/heads/devel | pyemma/util/log.py | 2 |
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# 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... |
artdent/jgments | refs/heads/master | lib/Mako-0.3.4/mako/pyparser.py | 21 | # ast.py
# Copyright (C) Mako developers
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Handles parsing of Python code.
Parsing to AST is done via _ast on Python > 2.5, otherwise the compiler
module is used.
"""
from StringIO import Stri... |
zuku1985/scikit-learn | refs/heads/master | sklearn/__check_build/setup.py | 113 | # Author: Virgile Fritsch <virgile.fritsch@inria.fr>
# License: BSD 3 clause
import numpy
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('__check_build', parent_package, top_path)
config.add_extension('_check_build',
... |
samisalkosuo/pureapp | refs/heads/master | developerworks/simplejson/tests/test_default.py | 149 | from unittest import TestCase
import simplejson as json
class TestDefault(TestCase):
def test_default(self):
self.assertEqual(
json.dumps(type, default=repr),
json.dumps(repr(type)))
|
ishay2b/tensorflow | refs/heads/segnet | tensorflow/contrib/kernel_methods/python/losses.py | 31 | # 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... |
esakellari/root | refs/heads/master | interpreter/llvm/src/tools/clang/bindings/python/tests/cindex/test_access_specifiers.py | 82 |
from clang.cindex import AccessSpecifier
from clang.cindex import Cursor
from clang.cindex import TranslationUnit
from .util import get_cursor
from .util import get_tu
def test_access_specifiers():
"""Ensure that C++ access specifiers are available on cursors"""
tu = get_tu("""
class test_class {
public:
... |
edxzw/edx-platform | refs/heads/master | common/djangoapps/xblock_django/migrations/0001_initial.py | 62 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operati... |
ChuckCottrill/CodeSamples | refs/heads/master | python/alexa-ai-test.py | 1 |
'''
Prompt:
A circular definition is one that uses the term being defined as part of the definition.
For example, define
“oak” : “a tree that grows from an acorn”
“acorn” : “the nut produced by an oak tree”.
acorn = nut, produced, oak-tree
acorn -> nut -> oak -> acorn
acorn -> tree -> nut -> oak -> acorn
Task: G... |
olivierdalang/stdm | refs/heads/master | third_party/sqlalchemy/orm/scoping.py | 1 | # orm/scoping.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
from .. import exc as sa_exc
from ..util import ScopedRegistry, ThreadLocalRe... |
snamstorm/rockstor-core | refs/heads/master | src/rockstor/smart_manager/models/nfsd_uid_gid.py | 8 | """
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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)... |
noslenfa/tdjangorest | refs/heads/master | uw/lib/python2.7/site-packages/django/contrib/localflavor/sk/forms.py | 109 | """
Slovak-specific form helpers
"""
from __future__ import absolute_import, unicode_literals
from django.contrib.localflavor.sk.sk_districts import DISTRICT_CHOICES
from django.contrib.localflavor.sk.sk_regions import REGION_CHOICES
from django.forms.fields import Select, RegexField
from django.utils.translation imp... |
gcarq/freqtrade | refs/heads/develop | freqtrade/plugins/protections/max_drawdown_protection.py | 1 |
import logging
from datetime import datetime, timedelta
from typing import Any, Dict
import pandas as pd
from freqtrade.data.btanalysis import calculate_max_drawdown
from freqtrade.persistence import Trade
from freqtrade.plugins.protections import IProtection, ProtectionReturn
logger = logging.getLogger(__name__)
... |
badloop/SickRage | refs/heads/master | lib/guessit/transfo/guess_date.py | 29 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... |
TheMOOCAgency/edx-platform | refs/heads/master | cms/djangoapps/contentstore/management/commands/tests/test_cleanup_assets.py | 167 | """
Test for assets cleanup of courses for Mac OS metadata files (with filename ".DS_Store"
or with filename which starts with "._")
"""
from django.core.management import call_command
from opaque_keys.edx.locations import SlashSeparatedCourseKey
from xmodule.contentstore.content import XASSET_LOCATION_TAG
from xmodul... |
osvalr/odoo | refs/heads/8.0 | addons/hr_gamification/__openerp__.py | 320 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.