repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
m0ppers/arangodb | refs/heads/devel | 3rdParty/V8/V8-5.0.71.39/build/gyp/test/rules/src/rule.py | 349 | #!/usr/bin/env python
# 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.
import sys
f = open(sys.argv[1] + ".cc", "w")
f.write("""\
#include <stdio.h>
int main() {
puts("Hello %s");
return 0;
}
""" % sys.argv... |
lunyang/pylearn2 | refs/heads/master | pylearn2/datasets/tests/test_utlc.py | 44 | from __future__ import print_function
import unittest
import numpy
import scipy.sparse
from pylearn2.testing.skip import skip_if_no_data
import pylearn2.datasets.utlc as utlc
def test_ule():
skip_if_no_data()
# Test loading of transfer data
train, valid, test, transfer = utlc.load_ndarray_dataset("ule"... |
VaneCloud/horizon | refs/heads/stable/kilo | openstack_dashboard/dashboards/project/data_processing/data_image_registry/tests.py | 23 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
TEAM-Gummy/platform_external_chromium_org | refs/heads/kk4.4 | tools/telemetry/telemetry/core/timeline/inspector_importer.py | 23 | # Copyright (c) 2013 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.
'''Imports event data obtained from the inspector's timeline.'''
from telemetry.core.timeline import importer
import telemetry.core.timeline.thread as ti... |
d4nielcosta/djangoembed | refs/heads/master | oembed/tests/admin.py | 5 | from django.contrib import admin
from oembed.tests.models import Blog, Category
admin.site.register(Blog)
admin.site.register(Category)
|
xujun10110/golismero | refs/heads/master | thirdparty_libs/nltk/draw/tree.py | 17 | # Natural Language Toolkit: Graphical Representations for Trees
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# URL: <http://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
Graphically display a Tree.
"""
import sys
from Tkinter import IntVar, Menu, Tk... |
JCBarahona/edX | refs/heads/master | common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py | 12 | """
Module for the dual-branch fall-back Draft->Published Versioning ModuleStore
"""
from xmodule.modulestore.split_mongo.split import SplitMongoModuleStore, EXCLUDE_ALL
from xmodule.exceptions import InvalidVersionError
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.exceptions import Insuffi... |
freezmeinster/teh-manis | refs/heads/master | django/views/decorators/cache.py | 229 | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
from django.utils.decorators import decorator_from_middleware_with_args, available_attrs
from django.utils.cache import patch_cache_control, add_never_cache_headers
from django.middleware.cach... |
windsorfoodcollective/windsorfoodcollective.github.io | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py | 327 | # Copyright (c) 2012 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.
import copy
import ntpath
import os
import posixpath
import re
import subprocess
import sys
import gyp.common
import gyp.easy_xml as easy_xml
import gyp.generator... |
yugangw-msft/azure-cli | refs/heads/dev | src/azure-cli/azure/cli/command_modules/billing/manual/_help.py | 2 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
AltSchool/django | refs/heads/master | tests/model_package/models/article.py | 522 | from django.db import models
class Site(models.Model):
name = models.CharField(max_length=100)
class Article(models.Model):
sites = models.ManyToManyField(Site)
headline = models.CharField(max_length=100)
publications = models.ManyToManyField("model_package.Publication", blank=True)
|
msabramo/pymssql | refs/heads/master | .pyrex/Pyrex/Distutils/__init__.py | 146 | # work around broken setuptools monkey patching
|
tongwang01/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/scatter_nd_ops_test.py | 1 | # 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... |
Guneet-Dhillon/mxnet | refs/heads/master | example/warpctc/ocr_predict.py | 56 | #!/usr/bin/env python2.7
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... |
boxu0001/practice | refs/heads/master | py3/S179.py | 1 | # Given a list of non negative integers, arrange them such that they form the largest number.
# For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.
# Note: The result may be very large, so you need to return a string instead of an integer.
class Solution:
def largestNumber(self, nums):
... |
jayceyxc/hue | refs/heads/master | desktop/libs/libsentry/gen-py/sentry_generic_policy_service/__init__.py | 10 | __all__ = ['ttypes', 'constants', 'SentryGenericPolicyService']
|
bpgc-cte/python2017 | refs/heads/master | Week 7/django/lib/python3.6/encodings/cp437.py | 272 | """ Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict... |
atomgalaxy/sndgraph | refs/heads/master | python/cxxtest/__init__.py | 48 | #-------------------------------------------------------------------------
# CxxTest: A lightweight C++ unit testing library.
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the LGPL License v2.1
# For more information, see the COPYING file in the top CxxTest directory.
# Under the terms o... |
MostlyOpen/odoo_addons_jcafb | refs/heads/master | myo_address_mng_cst/__init__.py | 2 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
#... |
marcusmueller/gnuradio | refs/heads/master | gr-vocoder/python/vocoder/qa_g721_vocoder.py | 7 | #!/usr/bin/env python
#
# Copyright 2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your optio... |
nathanielvarona/airflow | refs/heads/master | tests/dags/test_with_non_default_owner.py | 8 | #
# 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... |
j4/horizon | refs/heads/master | openstack_dashboard/dashboards/project/overview/tests.py | 13 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... |
guorendong/iridium-browser-ubuntu | refs/heads/ubuntu/precise | third_party/tlslite/tlslite/integration/xmlrpctransport.py | 113 | # Authors:
# Trevor Perrin
# Kees Bos - Fixes for compatibility with different Python versions
# Martin von Loewis - python 3 port
#
# See the LICENSE file for legal information regarding use of this file.
"""TLS Lite + xmlrpclib."""
try:
import xmlrpclib
import httplib
except ImportError:
# Pytho... |
gasongjian/ttpy | refs/heads/master | examples/test_common.py | 1 | import sys
sys.path.append('../')
from tt import *
import numpy as np
x = xfun(2, 3)
e = ones(2, 2)
X = matrix(x, [2]*3, [1]*3) # [0, 1, 2, 3, 4, 5, 6, 7]^T
E = matrix(e, [1]*2, [2]*2) # [1, 1, 1, 1]
print (X * E).full()
assert np.all((X * E) * np.arange(4) == np.arange(8) * 6.)
A = matrix(xfun(2, 3), [1] * 3, [2] * ... |
mitmproxy/mitmproxy | refs/heads/main | examples/addons/internet-in-mirror.py | 2 | """
Mirror all web pages.
Useful if you are living down under.
"""
from mitmproxy import http
def response(flow: http.HTTPFlow) -> None:
if flow.response and flow.response.content:
flow.response.content = flow.response.content.replace(
b"</head>",
b"<style>body {transform: scaleX(... |
tosolveit/scikit-learn | refs/heads/master | examples/applications/plot_outlier_detection_housing.py | 243 | """
====================================
Outlier detection on a real data set
====================================
This example illustrates the need for robust covariance estimation
on a real data set. It is useful both for outlier detection and for
a better understanding of the data structure.
We selected two sets o... |
PolicyStat/django | refs/heads/master | django/contrib/gis/gdal/prototypes/ds.py | 25 | """
This module houses the ctypes function prototypes for OGR DataSource
related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*,
OGR_Fld_* routines are relevant here.
"""
from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER
from django.contrib.gis.gdal.envelope import OGREnvelope
from djang... |
avoinsystems/odoo | refs/heads/8.0 | addons/gamification/models/challenge.py | 92 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... |
aerissecure/rdpy | refs/heads/master | pyasn1/v1/error.py | 5 | class PyAsn1Error(StandardError): pass
class ValueConstraintError(PyAsn1Error): pass
class SubstrateUnderrunError(PyAsn1Error): pass
|
hosseinmh/jango_learning | refs/heads/master | .venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py | 3132 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
gauribhoite/personfinder | refs/heads/master | env/google_appengine/lib/django-0.96/django/newforms/fields.py | 29 | """
Field classes
"""
from django.utils.translation import gettext
from util import ErrorList, ValidationError, smart_unicode
from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple
import datetime
import re
import time
__all__ = (
'... |
stanford-mast/nn_dataflow | refs/heads/master | nn_dataflow/tests/map_strategy_test/test_map_strategy_fixture.py | 1 | """ $lic$
Copyright (C) 2016-2020 by Tsinghua University and The Board of Trustees of
Stanford University
This program is free software: you can redistribute it and/or modify it under
the terms of the Modified BSD-3 License as published by the Open Source
Initiative.
This program is distributed in the hope that it wi... |
riveridea/gnuradio | refs/heads/master | gr-uhd/apps/uhd_fft_2.py | 1 | #!/usr/bin/env python
#
# Copyright 2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# ... |
dropbox/changes | refs/heads/master | migrations/versions/3bef10ab5088_add_various_testgrou.py | 4 | """Add various TestGroup indexes
Revision ID: 3bef10ab5088
Revises: fd1a52fe89f
Create Date: 2013-11-04 17:10:52.057285
"""
# revision identifiers, used by Alembic.
revision = '3bef10ab5088'
down_revision = 'fd1a52fe89f'
from alembic import op
def upgrade():
op.create_index('idx_testgroup_project_id', 'testgr... |
rooi/CouchPotatoServer | refs/heads/master | libs/chardet/big5prober.py | 236 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights ... |
fujunwei/chromium-crosswalk | refs/heads/master | mojo/tools/android_mojo_shell.py | 2 | #!/usr/bin/env python
# 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.
import argparse
import logging
import sys
from mopy.config import Config
from mopy import android
USAGE = ("android_mojo_shell.py "
... |
Affirm/moto | refs/heads/master | moto/sqs/models.py | 3 | from __future__ import unicode_literals
import base64
import hashlib
import json
import re
import six
import struct
from xml.sax.saxutils import escape
import boto.sqs
from moto.core.exceptions import RESTError
from moto.core import BaseBackend, BaseModel
from moto.core.utils import camelcase_to_underscores, get_ran... |
pwoodworth/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/core/management/commands/validate.py | 449 | from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
help = "Validates all installed models."
requires_model_validation = False
def handle_noargs(self, **options):
self.validate(display_num_errors=True)
|
hubsaysnuaa/odoo | refs/heads/8.0 | addons/l10n_tr/__openerp__.py | 259 | # -*- 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... |
pravj/Doga | refs/heads/master | Doga/interfaces/gui.py | 2 | # -*- coding: utf-8 -*-
"""
Doga.interfaces.gui
This module manages Doga GUI and keep it updated in realtime.
"""
import npyscreen
class WindowForm(npyscreen.ActionForm):
def create(self, *args, **keywords):
super(WindowForm, self).create(*args, **keywords)
def while_waiting(self):
pa... |
shannonturner/python-lessons | refs/heads/master | section_09_(functions)/open_csvfile.py | 4 | def open_csvfile(filename, delimiter=','):
with open(filename, "r") as csv_file:
rows = csv_file.read().split("\n")
for index, row in enumerate(rows):
rows[index] = row.split(delimiter)
return rows |
zdary/intellij-community | refs/heads/master | python/testData/docstrings/googleParametersSectionWithoutSummary.py | 45 | def f(x):
"""
Parameters:
x: foo
""" |
kressi/erpnext | refs/heads/develop | erpnext/patches/v7_1/update_lead_source.py | 31 | import frappe
from frappe import _
def execute():
from erpnext.setup.setup_wizard.install_fixtures import default_lead_sources
frappe.reload_doc('selling', 'doctype', 'lead_source')
frappe.local.lang = frappe.db.get_default("lang") or 'en'
for s in default_lead_sources:
insert_lead_source(_(s))
# get lead s... |
kurtrwall/wagtail | refs/heads/master | wagtail/wagtailcore/blocks/__init__.py | 38 | from __future__ import absolute_import
# Import block types defined in submodules into the wagtail.wagtailcore.blocks namespace
from .base import * # NOQA
from .field_block import * # NOQA
from .struct_block import * # NOQA
from .list_block import * # NOQA
from .stream_block import * # NOQA
|
jirikuncar/invenio | refs/heads/master | invenio/modules/pidstore/views.py | 8 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... |
kvar/ansible | refs/heads/seas_master_2.9.5 | lib/ansible/modules/cloud/amazon/ec2_transit_gateway_info.py | 33 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'su... |
artzers/MachineLearning | refs/heads/master | Tensorflow/fast-neural-style/nets/nets_factory.py | 2 | # 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 ... |
jokey2k/sentry | refs/heads/master | src/sentry/web/forms/accounts.py | 1 | """
sentry.web.forms.accounts
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import pytz
from captcha.fields import ReCaptchaField
from datetime import datetime
from django i... |
40323248/bg6-cdw11 | refs/heads/master | users/b/g11/bg11_40323252.py | 7 | # 各組分別在各自的 .py 程式中建立應用程式 (第1步/總共3步)
from flask import Blueprint, render_template, make_response
# 利用 Blueprint建立 ag1, 並且 url 前綴為 /ag1, 並設定 template 存放目錄
bg11_40323252 = Blueprint('bg11_40323252', __name__, url_prefix='/bg11_40323252', template_folder='templates')
@bg11_40323252.route('/task52_1')
def task52_1():
... |
0932938/Project2.2 | refs/heads/master | kimyiu's kopie/main(kimyiu - Owen)/Pygame_main/Pygame_main/Pregame.py | 1 | import pygame, random, time, basic, Category
from array import array
pygame.init()
Dice_resize = (120,120)
Medal_resize = (200,50)
avatar_resize = (120,150)
bg = pygame.image.load("Blanco_FrameB.png")
basic.screen
basic.clock
#avatars
ava_one = pygame.image.load('avatar1_standing.png')
#ava_oneL = py... |
lukeiwanski/tensorflow | refs/heads/master | tensorflow/contrib/slim/python/slim/nets/inception_v1.py | 164 | # 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... |
devopshq/crosspm | refs/heads/master | tests/test_helpers_python.py | 1 | # -*- coding: utf-8 -*-
import os
from crosspm.helpers.python import get_object_from_string
def test_get_object_from_string():
obj_ = get_object_from_string('os.path')
assert os.path is obj_
|
petrutlucian94/nova | refs/heads/master | nova/db/sqlalchemy/migrate_repo/versions/281_placeholder.py | 830 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
malexer/SublimeClassNavigator | refs/heads/master | naviclass/statusbar.py | 1 | import sublime
class StatusMessage(object):
"""Wrapper for Sublime Text status bar."""
KEY = 'ClassNavigator'
def __init__(self, sublime_view):
self.view = sublime_view
self.active = False
def show(self, message):
self.view.set_status(self.KEY, message)
self.active =... |
sharkykh/SickRage | refs/heads/develop | lib/imdb/parser/http/companyParser.py | 143 | """
parser.http.companyParser module (imdb package).
This module provides the classes (and the instances), used to parse
the IMDb pages on the akas.imdb.com server about a company.
E.g., for "Columbia Pictures [us]" the referred page would be:
main details: http://akas.imdb.com/company/co0071509/
Copyright 2008... |
glove747/liberty-neutron | refs/heads/master | neutron/tests/api/test_service_type_management.py | 36 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
oceanobservatories/mi-instrument | refs/heads/master | mi/instrument/harvard/massp/mcu/test/test_driver.py | 5 | """
@package mi.instrument.harvard.massp.mcu.test.test_driver
@file marine-integrations/mi/instrument/harvard/massp/mcu/driver.py
@author Peter Cable
@brief Test cases for mcu driver
USAGE:
Make tests verbose and provide stdout
* From the IDK
$ bin/test_driver
$ bin/test_driver -u [-t testname]
... |
SofiaReis/django-cms | refs/heads/develop | menus/utils.py | 46 | # -*- coding: utf-8 -*-
from __future__ import with_statement
from contextlib import contextmanager
import inspect
from cms.models.titlemodels import Title
from cms.utils import get_language_from_request
from cms.utils.compat import DJANGO_1_6
from cms.utils.i18n import force_language, hide_untranslated
from django.con... |
kayhayen/Nuitka | refs/heads/develop | nuitka/tree/ReformulationBooleanExpressions.py | 1 | # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... |
TonyZhaoyu/linux_gateway | refs/heads/master | unit_testing/googletest_src/googlemock/scripts/upload.py | 2511 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
latchset/custodia | refs/heads/master | src/custodia/store/sqlite.py | 1 | # Copyright (C) 2015 Custodia Project Contributors - see LICENSE file
from __future__ import absolute_import, print_function
import os
import sqlite3
from custodia.plugin import CSStore, CSStoreError, CSStoreExists
from custodia.plugin import PluginOption, REQUIRED
class SqliteStore(CSStore):
dburi = PluginOpt... |
arq5x/bedtools2 | refs/heads/master | docs/conf.py | 1 | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os... |
yoghadj/or-tools | refs/heads/master | examples/python/data/nonogram_regular/nonogram_crocodile.py | 74 | # 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 applica... |
leductan-nguyen/RaionPi | refs/heads/master | docs/conf.py | 38 | # -*- coding: utf-8 -*-
#
# OctoPrint documentation build configuration file, created by
# sphinx-quickstart on Mon Dec 02 17:08:50 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... |
bisho/pygit2 | refs/heads/master | test/test_repository.py | 2 | # -*- coding: UTF-8 -*-
#
# Copyright 2010-2014 The pygit2 contributors
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2,
# as published by the Free Software Foundation.
#
# In addition to the permissions in the GNU General Public Li... |
Microvellum/Fluid-Designer | refs/heads/master | win64-vc/2.78/Python/bin/2.78/scripts/presets/safe_areas/4_colon_3_in_16_colon_9.py | 7 | import bpy
safe_areas = bpy.context.scene.safe_areas
safe_areas.title = (0.035, 0.035)
safe_areas.action = (0.1, 0.05)
safe_areas.title_center = (0.175, 0.05)
safe_areas.action_center = (0.15, 0.05)
|
tsdmgz/ansible | refs/heads/devel | lib/ansible/utils/module_docs_fragments/zabbix.py | 21 | # Copyright (c) 2017 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... |
takeshineshiro/Django-facebook | refs/heads/master | docs/docs_env/Lib/encodings/mac_latin2.py | 647 | """ Python Character Mapping Codec generated from 'LATIN2.TXT' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,erro... |
nkhuyu/blaze | refs/heads/master | blaze/compute/tests/conftest.py | 17 | import pytest
@pytest.fixture(scope='session')
def sc():
pyspark = pytest.importorskip('pyspark')
return pyspark.SparkContext('local', 'blaze')
|
dancingdan/tensorflow | refs/heads/master | tensorflow/python/data/util/structure_test.py | 3 | # Copyright 2018 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... |
chienlieu2017/it_management | refs/heads/master | odoo/addons/fleet/__init__.py | 41 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import models |
chongtianfeiyu/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/test/test_unary.py | 179 | """Test compiler changes for unary ops (+, -, ~) introduced in Python 2.2"""
import unittest
from test.support import run_unittest
class UnaryOpTestCase(unittest.TestCase):
def test_negative(self):
self.assertTrue(-2 == 0 - 2)
self.assertEqual(-0, 0)
self.assertEqual(--2, 2)
self.... |
40423104/2016fallcadp_hw | refs/heads/gh-pages | plugin/render_math/pelican_mathjax_markdown_extension.py | 348 | # -*- coding: utf-8 -*-
"""
Pelican Mathjax Markdown Extension
==================================
An extension for the Python Markdown module that enables
the Pelican python blog to process mathjax. This extension
gives Pelican the ability to use Mathjax as a "first class
citizen" of the blog
"""
import markdown
from... |
colettace/omero-pychrm | refs/heads/master | scripts/Wndcharm_Remove_Annotations.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 University of Dundee & Open Microscopy Environment.
# All rights reserved.
#
# 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;... |
boompieman/iim_project | refs/heads/master | project_python2/lib/python2.7/site-packages/pip/utils/appdirs.py | 174 | """
This code was taken from https://github.com/ActiveState/appdirs and modified
to suit our purposes.
"""
from __future__ import absolute_import
import os
import sys
from pip.compat import WINDOWS, expanduser
def user_cache_dir(appname):
r"""
Return full path to the user-specific cache dir for this applica... |
osaddon/cdmi | refs/heads/master | test/functional/cdmi/test_cdmi_object.py | 1 | # Copyright (c) 2010-2011 IBM.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
brainix/imi-imi | refs/heads/master | base.py | 1 | #------------------------------------------------------------------------------#
# base.py #
# #
# Copyright (c) 2009-2010, Code A La Mode, original authors. ... |
40423209/2016fallcadp_bg9 | refs/heads/gh-pages | plugin/liquid_tags/__init__.py | 335 | from .liquid_tags import *
|
tysonclugg/django | refs/heads/master | django/db/backends/oracle/client.py | 132 | import subprocess
from django.db.backends.base.client import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'sqlplus'
def runshell(self):
conn_string = self.connection._connect_string()
args = [self.executable_name, "-L", conn_string]
subprocess.check_... |
bcarroll/authmgr | refs/heads/master | python-3.6.2-Win64/Lib/site-packages/psycopg2/tests/test_connection.py | 8 | #!/usr/bin/env python
# test_connection.py - unit test for connection attributes
#
# Copyright (C) 2008-2011 James Henstridge <james@jamesh.id.au>
#
# psycopg2 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 Foun... |
mgeorgehansen/FIFE_Technomage | refs/heads/master | tools/editor/scripts/gui/menubar.py | 2 | # -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2009 by the FIFE team
# http://www.fifengine.de
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# ... |
tinloaf/home-assistant | refs/heads/dev | homeassistant/components/binary_sensor/uptimerobot.py | 5 | """
A platform that to monitor Uptime Robot monitors.
For more details about this platform, please refer to the documentation at
https://www.home-assistant.io/components/binary_sensor.uptimerobot/
"""
import logging
import voluptuous as vol
from homeassistant.components.binary_sensor import (
PLATFORM_SCHEMA, Bi... |
karthikdevel/fit | refs/heads/master | gui/wxpython/fitplotter.py | 1 | import wx
from numpy import arange, sin, pi
import matplotlib
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend_wx import NavigationToolbar2Wx
from matplotlib.figure import Figure
class FitPlotter(wx.Frame):
def __init__(self,subplots):
wx.Fra... |
jkossen/imposter | refs/heads/master | dbmanage.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description {{{
"""
imposter.dbmanage
~~~~~~~~~~~~~~~~~
Application for maintaining the imposter database
It's mostly used for updating the database schema and data when upgrading
to newer imposter versions.
:copyright: (c) 2010 by Jochem Kosse... |
amir-qayyum-khan/edx-platform | refs/heads/master | openedx/core/djangoapps/credit/tests/test_tasks.py | 16 | """
Tests for credit course tasks.
"""
import mock
from nose.plugins.attrib import attr
from datetime import datetime, timedelta
from pytz import UTC
from openedx.core.djangoapps.credit.api import get_credit_requirements
from openedx.core.djangoapps.credit.exceptions import InvalidCreditRequirements
from openedx.core... |
saleemjaveds/https-github.com-openstack-nova | refs/heads/master | nova/api/openstack/compute/plugins/v3/evacuate.py | 3 | # Copyright 2013 OpenStack Foundation
#
# 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... |
alex/raven | refs/heads/master | raven/contrib/django/serializers.py | 1 | """
raven.contrib.django.serializers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from django.db.models.query import QuerySet
from django.utils.functional import Promise
from raven.utils.serializer import Seria... |
haya14busa/alc-etm-searcher | refs/heads/master | nltk-3.0a3/build/lib/nltk/classify/rte_classify.py | 2 | # Natural Language Toolkit: RTE Classifier
#
# Copyright (C) 2001-2013 NLTK Project
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
Simple classifier for RTE corpus.
It calculates the overlap in words and named entities between text and
hypothesis, and... |
RondaStrauch/landlab | refs/heads/master | landlab/components/flexure/examples/example_random_point_loads.py | 6 | #! /usr/bin/env python
import numpy as np
from landlab.components.flexure import Flexure
from landlab import RasterModelGrid
def get_random_load_locations(shape, n_loads):
return np.random.random_integers(0, shape[0] * shape[1] - 1, n_loads)
def get_random_load_magnitudes(n_loads):
return np.random.normal... |
digital-one/kempston_parkes | refs/heads/master | build/assets/httpdocs/admin/classes/components/formattedTextArea/fckeditor/fckeditor.py | 5 | """
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2007 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/licenses/gpl.html... |
RonGokhale/codeaurora_kernel | refs/heads/msm-3.4 | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | # failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... |
neoscoin/neos-core | refs/heads/master | src/ledger/lib/python2.7/site-packages/pip/_vendor/html5lib/_ihatexml.py | 5 | from __future__ import absolute_import, division, unicode_literals
import re
import warnings
from .constants import DataLossWarning
baseChar = """
[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] |
[#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] |
[#x014A-#x017E] ... |
nityansuman/Python-3 | refs/heads/master | puzzles/balance_paranthesis.py | 1 | """Given a string of paranthesis check if it is balanced or not.
For every opening of a paranthesis one needs to have a closing paranthesis for it
to be considered as balanced.
Ex- (())() is balanced"""
if __name__ == "__main__":
# get paranthesis string
string = input().strip()
# make a list out... |
mociepka/saleor | refs/heads/master | saleor/product/migrations/0007_auto_20160112_1025.py | 18 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-12 16:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0006_product_updated_at'),
]
operations = [
migrations.RenameMode... |
tuskar/tuskar-ui | refs/heads/master | openstack_dashboard/dashboards/project/network_topology/__init__.py | 25 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2013 NTT MCL, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# n... |
dalf/searx | refs/heads/master | tests/unit/test_webadapter.py | 1 | # -*- coding: utf-8 -*-
from searx.testing import SearxTestCase
from searx.preferences import Preferences
from searx.engines import engines
import searx.search
from searx.search import EngineRef
from searx.webadapter import validate_engineref_list
PRIVATE_ENGINE_NAME = 'general private offline'
TEST_ENGINES = [
... |
jerdog/android_kernel_oppo_find7 | refs/heads/master | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | # failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... |
zimmerle/gnuradio | refs/heads/master | gr-digital/python/qam.py | 14 | #
# Copyright 2005,2006,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later ... |
GoeGaming/openshift-iojs | refs/heads/master | bin/iojs/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py | 292 | # Copyright (c) 2012 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.
from compiler.ast import Const
from compiler.ast import Dict
from compiler.ast import Discard
from compiler.ast import List
from compiler.ast import Module
from co... |
taaviteska/django | refs/heads/master | tests/template_tests/syntax_tests/test_numpy.py | 83 | import warnings
from unittest import skipIf
from django.test import SimpleTestCase
from ..utils import setup
try:
import numpy
VisibleDeprecationWarning = numpy.VisibleDeprecationWarning
except ImportError:
numpy = False
except AttributeError: # numpy < 1.9.0, e.g. 1.8.2 in Debian 8
VisibleDeprecati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.