repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
tecwebjoao/TecWeb-TF-2T-B-SI | refs/heads/master | venv/Lib/site-packages/django/core/management/commands/migrate.py | 44 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
from collections import OrderedDict
from importlib import import_module
from django.apps import apps
from django.core.checks import Tags, run_checks
from django.core.management.base import BaseCommand, CommandError
from django.core.management... |
sdgdsffdsfff/jumpserver | refs/heads/master | apps/terminal/urls/api_urls.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
from django.urls import path, include, re_path
from rest_framework_bulk.routes import BulkRouter
from common import api as capi
from .. import api
app_name = 'terminal'
router = BulkRouter()
router.register(r'sessions', api.SessionViewSet, 'session')
router.register(r... |
Zhongqilong/kbengine | refs/heads/master | kbe/src/lib/python/Lib/pickle.py | 67 | """Create portable serialized representations of Python objects.
See module copyreg for a mechanism for registering custom picklers.
See module pickletools source for extensive comments.
Classes:
Pickler
Unpickler
Functions:
dump(object, file)
dumps(object) -> string
load(file) -> object
lo... |
cctaylor/googleads-python-lib | refs/heads/master | examples/dfp/v201411/network_service/__init__.py | 407 | #!/usr/bin/python
#
# Copyright 2014 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 b... |
IKholopov/HackUPC2017 | refs/heads/master | hackupc/env/lib/python3.5/site-packages/social_core/backends/arcgis.py | 4 | """
ArcGIS OAuth2 backend
"""
from .oauth import BaseOAuth2
class ArcGISOAuth2(BaseOAuth2):
name = 'arcgis'
ID_KEY = 'username'
AUTHORIZATION_URL = 'https://www.arcgis.com/sharing/rest/oauth2/authorize'
ACCESS_TOKEN_URL = 'https://www.arcgis.com/sharing/rest/oauth2/token'
ACCESS_TOKEN_METHOD = 'PO... |
ahmadshahwan/cohorte-herald | refs/heads/master | python/herald/transports/xmpp/directory.py | 1 | #!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
Herald XMPP transport directory
:author: Thomas Calmant
:copyright: Copyright 2014, isandlaTech
:license: Apache License 2.0
:version: 0.0.4
:status: Alpha
..
Copyright 2014 isandlaTech
Licensed under the Apache License, Version 2.0 (the "License");
... |
aakash-cr7/zulip | refs/heads/master | zerver/management/commands/rate_limit.py | 14 | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from argparse import ArgumentParser
from zerver.models import UserProfile, get_user_profile_by_email
from zerver.lib.rate_limiter import block_user, unblock_user
from django.core.management.base import BaseCommand
fro... |
otherness-space/myProject003 | refs/heads/master | my_project_003/lib/python2.7/site-packages/django/contrib/formtools/models.py | 679 | """ models.py (even empty) currently required by the runtests.py to enable unit tests """
|
bogdandrutu/grpc | refs/heads/master | src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py | 1496 | # Copyright 2015, 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... |
toddg3s/snappy | refs/heads/master | MakeTheTurtle.py | 1 | import pygame
import os
pygame.init()
image = pygame.image.load("snappy_turtle.png")
string = pygame.image.tostring(image,"RGBA")
with open("snappy_turtle.txt", "w") as text_file:
text_file.write(string)
|
mancoast/CPythonPyc_test | refs/heads/master | cpython/261_test_site.py | 51 | """Tests for 'site'.
Tests assume the initial paths in sys.path once the interpreter has begun
executing have not been removed.
"""
import unittest
from test.test_support import TestSkipped, run_unittest, TESTFN
import __builtin__
import os
import sys
import encodings
import subprocess
# Need to make sure to not impo... |
AndrewGrossman/django | refs/heads/master | tests/middleware_exceptions/middleware.py | 284 | from __future__ import unicode_literals
from django.http import HttpResponse
class ProcessExceptionMiddleware(object):
def process_exception(self, request, exception):
return HttpResponse('Exception caught')
|
fhaoquan/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/gettext.py | 90 | """Internationalization and localization support.
This module provides internationalization (I18N) and localization (L10N)
support for your Python programs by providing an interface to the GNU gettext
message catalog library.
I18N refers to the operation by which a program is made aware of multiple
languages. L10N r... |
NewpTone/StackLab-swift | refs/heads/master | swift/common/middleware/proxy_logging.py | 3 | # Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
MalloyPower/parsing-python | refs/heads/master | front-end/testsuite-python-lib/Python-2.3/Lib/test/test_pep277.py | 9 | # Test the Unicode versions of normal file functions
# open, os.open, os.stat. os.listdir, os.rename, os.remove, os.mkdir, os.chdir, os.rmdir
import sys, os, unittest
from test import test_support
if not os.path.supports_unicode_filenames:
raise test_support.TestSkipped, "test works only on NT+"
filenames = [
... |
jiangwei1221/django-virtualenv-demo | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/gis/tests/geoadmin/models.py | 221 | from django.contrib.gis.db import models
from django.contrib.gis import admin
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class City(models.Model):
name = models.CharField(max_length=30)
point = models.PointField()
objects = models.GeoManager()
def __str__... |
mluo613/osf.io | refs/heads/develop | tests/test_events.py | 18 | from collections import OrderedDict
import mock
from nose.tools import *
from website.notifications.events.base import Event, register, event_registry
from website.notifications.events.files import (
FileAdded, FileRemoved, FolderCreated, FileUpdated,
AddonFileCopied, AddonFileMoved, AddonFileRenamed,
)
from ... |
kimshuye/LINE | refs/heads/master | line/client.py | 2 | # -*- coding: utf-8 -*-
"""
line.client
~~~~~~~~~~~
LineClient for sending and receiving message from LINE server.
:copyright: (c) 2014 by Taehoon Kim.
:license: BSD, see LICENSE for more details.
"""
import re
import requests
import sys
from api import LineAPI
from models import LineGroup, LineC... |
lzambella/Qyoutube-dl | refs/heads/master | youtube_dl/extractor/tudou.py | 5 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
int_or_none,
float_or_none,
unescapeHTML,
)
class TudouIE(InfoExtractor):
IE_NAME = 'tudou'
_VALID_URL = r'https?://(?:www\.)?tudou\.com/(?:(?:programs|... |
alvin319/CarnotKE | refs/heads/master | jyhton/lib-python/2.7/plat-freebsd8/IN.py | 344 | # Generated by h2py from /usr/include/netinet/in.h
# Included from sys/cdefs.h
__GNUCLIKE_ASM = 3
__GNUCLIKE_ASM = 2
__GNUCLIKE___TYPEOF = 1
__GNUCLIKE___OFFSETOF = 1
__GNUCLIKE___SECTION = 1
__GNUCLIKE_ATTRIBUTE_MODE_DI = 1
__GNUCLIKE_CTOR_SECTION_HANDLING = 1
__GNUCLIKE_BUILTIN_CONSTANT_P = 1
__GNUCLIKE_BUILTIN_VARA... |
emc-tridax/appengine-python-flask-master | refs/heads/master | lib/mysql/connector/constants.py | 10 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... |
quheng/scikit-learn | refs/heads/master | sklearn/linear_model/ransac.py | 191 | # coding: utf-8
# Author: Johannes Schönberger
#
# License: BSD 3 clause
import numpy as np
from ..base import BaseEstimator, MetaEstimatorMixin, RegressorMixin, clone
from ..utils import check_random_state, check_array, check_consistent_length
from ..utils.random import sample_without_replacement
from ..utils.valid... |
liu602348184/django | refs/heads/master | tests/requests/__init__.py | 12133432 | |
rismalrv/edx-platform | refs/heads/master | lms/djangoapps/instructor/management/__init__.py | 12133432 | |
elba7r/system | refs/heads/master | erpnext/schools/doctype/grading_structure/__init__.py | 12133432 | |
tsotetsi/textily-web | refs/heads/master | temba/flows/templatetags/__init__.py | 12133432 | |
gannetson/sportschooldeopenlucht | refs/heads/master | env/lib/python2.7/site-packages/gunicorn/workers/__init__.py | 12133432 | |
Joergen/olympia | refs/heads/master | apps/translations/management/__init__.py | 12133432 | |
suyashphadtare/gd-erp | refs/heads/develop | erpnext/stock/report/requested_items_to_be_transferred/__init__.py | 12133432 | |
miloharper/neural-network-animation | refs/heads/master | matplotlib/backends/backend_qt5.py | 10 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import os
import re
import signal
import sys
from six import unichr
import matplotlib
from matplotlib.cbook import is_string_like
from matplotlib.backend_bases import FigureManagerBase
from matplot... |
fnurl/alot | refs/heads/master | tests/commands/__init__.py | 12133432 | |
Kazade/NeHe-Website | refs/heads/master | google_appengine/lib/django-1.5/django/contrib/sessions/management/commands/__init__.py | 12133432 | |
yavuzovski/playground | refs/heads/master | python/django/RESTTest/.venv/lib/python3.4/site-packages/django/db/models/functions/base.py | 44 | """
Classes that represent database functions.
"""
from django.db.models import Func, Transform, Value, fields
class Cast(Func):
"""
Coerce an expression to a new field type.
"""
function = 'CAST'
template = '%(function)s(%(expressions)s AS %(db_type)s)'
mysql_types = {
fields.CharFie... |
beni55/edx-platform | refs/heads/master | lms/djangoapps/shoppingcart/migrations/0020_auto__add_courseregcodeitem__add_courseregcodeitemannotation__add_fiel.py | 120 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'CourseRegCodeItem'
db.create_table('shoppingcart_courseregcodeitem', (
('orderit... |
klmitch/nova | refs/heads/master | nova/tests/functional/api_sample_tests/test_floating_ip_dns.py | 6 | # Copyright 2014 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 by applicable law or agreed t... |
wicai/Try-Django-1.8 | refs/heads/master | src/newsletter/migrations/__init__.py | 12133432 | |
direvus/ansible | refs/heads/devel | test/units/module_utils/common/__init__.py | 12133432 | |
codingo/Reconnoitre | refs/heads/master | Reconnoitre/lib/__init__.py | 12133432 | |
kaedroho/django | refs/heads/master | tests/m2m_recursive/__init__.py | 12133432 | |
phreakocious/graphite-web | refs/heads/master | webapp/graphite/metrics/urls.py | 25 | """Copyright 2009 Chris Davis
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
... |
chrsrds/scikit-learn | refs/heads/master | sklearn/covariance/tests/test_robust_covariance.py | 21 | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# Virgile Fritsch <virgile.fritsch@inria.fr>
#
# License: BSD 3 clause
import itertools
import numpy as np
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing... |
cjmayo/mapnik | refs/heads/master | scons/scons-local-2.3.6/SCons/Tool/cc.py | 4 | """SCons.Tool.cc
Tool-specific initialization for generic Posix C compilers.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2015 The SCons Foundation
#
# Permission is hereby granted... |
iamahuman/angr | refs/heads/master | angr/engines/soot/statements/__init__.py | 3 |
import logging
l = logging.getLogger('angr.engines.soot.statements')
def translate_stmt(stmt, state):
stmt_name = stmt.__class__.__name__.split(".")[-1]
if stmt_name.endswith("Stmt"): stmt_name = stmt_name[:-4]
stmt_cls_name = "SimSootStmt_%s" % stmt_name
if stmt_cls_name in globals():
stmt_... |
chaubold/hytra | refs/heads/master | hytra/plugins/image_provider/dvid_image_loader.py | 1 | from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
from hytra.pluginsystem import image_provider_plugin
import numpy as np
import json_tricks as json
from libdvid import DVIDNodeService, DVIDServerService
class DvidImageLoader(image_provider_pl... |
Kamp9/scipy | refs/heads/master | scipy/integrate/odepack.py | 47 | # Author: Travis Oliphant
from __future__ import division, print_function, absolute_import
__all__ = ['odeint']
from . import _odepack
from copy import copy
import warnings
class ODEintWarning(Warning):
pass
_msgs = {2: "Integration successful.",
1: "Nothing was done; the integration time was 0.",
... |
rolandovillca/python_basis | refs/heads/master | hackerrank.com/05_staircase.py | 4 | '''
PROBLEM 5: Staircase:
--------------------
Consider a staircase of size n = 4:
#
##
###
####
Observe that its base and height are both equal to n, and the image is drawn
using # symbols and spaces. The last line is not preceded by any spaces.
Write a program that prints a staircase of size n.
INPUT FORMAT... |
newerthcom/savagerebirth | refs/heads/master | libs/python-2.72/Lib/pstats.py | 85 | """Class for printing reports on profiled python code."""
# Class for printing reports on profiled python code. rev 1.0 4/1/94
#
# Based on prior profile module by Sjoerd Mullender...
# which was hacked somewhat by: Guido van Rossum
#
# see profile.py for more info.
# Copyright 1994, by InfoSeek Corporation, all r... |
steedos/odoo7 | refs/heads/master | openerp/addons/account_analytic_plans/account_analytic_plans.py | 10 | # -*- 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... |
Triv90/Nova | refs/heads/openstack-ci/fuel/grizzly | nova/network/quantumv2/__init__.py | 6 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 OpenStack Foundation
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... |
daydayuplo/gee | refs/heads/master | earth_enterprise/src/fusion/portableglobe/servers/portable_web_interface.py | 4 | #!/usr/bin/python
#
# Copyright 2017 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 or a... |
lll9p/XRD_batch_helper | refs/heads/master | XRD_batch_helper/app.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import configparser
import csv
import logging
import os
import pathlib
import re
import subprocess
import sys
import time
import tkinter as tk
import tkinter.filedialog as filedialog
from tkinter import font, messagebox, ttk
import psutil
class Config(configparser.Confi... |
erik-sn/xlwrap | refs/heads/master | xlwrap.py | 1 | import os
import ntpath
import xlrd
import openpyxl
from openpyxl.utils import coordinate_from_string, column_index_from_string
from openpyxl.utils.exceptions import CellCoordinatesException
class ExcelManager:
"""
Wrapper that opens and operates on .xls, .xlsx or .xlsm excel files. By
default we take in ... |
leighpauls/k2cro4 | refs/heads/master | native_client/src/untrusted/crash_dump/decode_dump.py | 1 | #!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility to decode a crash dump generated by untrusted_crash_dump.[ch]
Currently this produces a simple stack trace.
"""
impor... |
kidmaple/CoolWall | refs/heads/nios2 | user/python/Demo/tkinter/guido/kill.py | 3 | #! /usr/bin/env python
# Tkinter interface to Linux `kill' command.
from Tkinter import *
from string import splitfields
from string import split
import commands
import os
class BarButton(Menubutton):
def __init__(self, master=None, **cnf):
apply(Menubutton.__init__, (self, master), cnf)
self.pack(side=LEFT)
s... |
neurord/pysb | refs/heads/master | doc/examples/robertson_standalone.py | 3 | """A simple three-species chemical kinetics system known as "Robertson's
example", as presented in:
H. H. Robertson, The solution of a set of reaction rate equations, in Numerical
Analysis: An Introduction, J. Walsh, ed., Academic Press, 1966, pp. 178-182.
"""
# exported from PySB model 'robertson'
import numpy
impo... |
JesseLivezey/pylearn2 | refs/heads/master | pylearn2/datasets/tests/test_stl10.py | 45 | """module for testing datasets.stl10"""
import unittest
from pylearn2.datasets import stl10
from pylearn2.testing.skip import skip_if_no_data
class TestSTL10(unittest.TestCase):
"""
This is a unittest for stl10.py.
Parameters
----------
none
"""
def setUp(self):
"""This loads t... |
IntelBUAP/Python3 | refs/heads/master | Evaluaciones/icazas/calc.py | 1 | #yolanda alvarez
#pedro ambrosio
#ignacio acevedo
#raul arias
#monica canizo
import os
import math
def suma():
try:
print ('{:^30}'.format('SUMA'))
num1 = int(input("Valor a: "))
num2 = int(input("Valor b: "))
print ('{} + {} = {}'.format(num1, num2, num1 + num2))
input(" ... |
Maccimo/intellij-community | refs/heads/master | python/testData/surround/CustomFoldingRegionSingleStatementInFile_after.py | 79 | # <editor-fold desc="Description">
print('foo')
# </editor-fold>
|
spadae22/odoo | refs/heads/chris_master_8 | addons/payment_authorize/models/__init__.py | 278 | # -*- coding: utf-8 -*-
import authorize
|
sharbison3/python-docs-samples | refs/heads/master | appengine/standard/ndb/schema_update/models_v1.py | 8 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
JioEducation/edx-platform | refs/heads/master | openedx/core/djangolib/tests/test_markup.py | 9 | # -*- coding: utf-8 -*-
"""
Tests for openedx.core.djangolib.markup
"""
from nose.plugins.attrib import attr
import unittest
import ddt
from django.utils.translation import ugettext as _, ungettext
from mako.template import Template
from openedx.core.djangolib.markup import HTML, Text
@attr('shard_2')
@ddt.ddt
cla... |
throwable-one/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/django/core/management/commands/reset.py | 81 | from optparse import make_option
from django.conf import settings
from django.core.management.base import AppCommand, CommandError
from django.core.management.color import no_style
from django.core.management.sql import sql_reset
from django.db import connections, transaction, DEFAULT_DB_ALIAS
class Command(AppComman... |
peterbrittain/asciimatics | refs/heads/master | asciimatics/widgets/label.py | 1 | # -*- coding: utf-8 -*-
"""This mdoule implements a widget to give a text label"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from builtins import str
from asciimatics.widgets.widget import Widget
from asciimatics.... |
bourdakos1/Fetch | refs/heads/master | requests/packages/urllib3/util/retry.py | 198 | from __future__ import absolute_import
import time
import logging
from ..exceptions import (
ConnectTimeoutError,
MaxRetryError,
ProtocolError,
ReadTimeoutError,
ResponseError,
)
from ..packages import six
log = logging.getLogger(__name__)
class Retry(object):
""" Retry configuration.
... |
antepsis/anteplahmacun | refs/heads/master | examples/advanced/grover_example.py | 110 | #!/usr/bin/env python
"""Grover's quantum search algorithm example."""
from sympy import pprint
from sympy.physics.quantum import qapply
from sympy.physics.quantum.qubit import IntQubit
from sympy.physics.quantum.grover import (OracleGate, superposition_basis,
WGate, grover_iteration)
def demo_vgate_app(v):... |
aldebaran/qibuild | refs/heads/master | python/qibuild/build.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Low-level build functions """
from __future__ import absolute_import
from __future__ import unicode_literals
from __fut... |
odpi/hadoop | refs/heads/trunk | dev-support/shelldocs.py | 84 | #!/usr/bin/python
#
# 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, s... |
mozilla/make.mozilla.org | refs/heads/master | vendor-local/lib/python/kombu/transport/sqlalchemy/__init__.py | 2 | """Kombu transport using SQLAlchemy as the message store."""
from Queue import Empty
from anyjson import loads, dumps
from sqlalchemy import create_engine
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm import sessionmaker
from .. import virtual
from ...exceptions import StdChannelError
from .models... |
cctaylor/googleads-python-lib | refs/heads/master | tests/oauth2_test.py | 4 | #!/usr/bin/python
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... |
frappe/erpnext | refs/heads/develop | erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py | 2 | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns, data = [], []
data = get_data(filters)
columns = get_columns(filters)
chart_data = g... |
sibaru/shadowsocks | refs/heads/master | shadowsocks/crypto/__init__.py | 1120 | #!/usr/bin/env python
#
# Copyright 2015 clowwindy
#
# 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 ... |
JorgeCoock/django | refs/heads/master | tests/model_meta/tests.py | 169 | from django.apps import apps
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.core.exceptions import FieldDoesNotExist
from django.db.models.fields import CharField, Field, related
from django.db.models.options import EMPTY_RELATION_TREE, IMMUTABLE_WARNING
from djan... |
syndicate-storage/syndicate-core | refs/heads/master | python/syndicate/rg/drivers/gstorage/config.py | 8 | #!/usr/bin/env python
CONFIG = {
}
|
sleep2death/BladeHaxe | refs/heads/master | Convert.py | 1 | import os
import shutil
import sys
import glob
import copy
import traceback
from PIL import Image
import pyglet
from pyglet.image.codecs.dds import DDSImageDecoder
from pyglet.image.codecs.png import PNGImageEncoder
env=""
OUTPUT = "/output"
PNG = ".png"
DDS = ".dds"
BIN_WIDTH = 2048;
BIN_HEIGHT = 2048;
class Rec... |
leorochael/odoo | refs/heads/8.0 | addons/base_report_designer/plugin/openerp_report_designer/bin/script/modify.py | 384 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... |
karanisverma/feature_langpop | refs/heads/master | librarian/plugins/logs/plugin.py | 2 | """
plugin.py: Log plugin
Display application log on dashboard.
Copyright 2014-2015, Outernet Inc.
Some rights reserved.
This software is free software licensed under the terms of GPLv3. See COPYING
file that comes with the source code, or http://www.gnu.org/licenses/gpl.txt.
"""
from bottle import request
from bot... |
retomerz/intellij-community | refs/heads/master | python/testData/resolve/multiFile/namespacePackageImport/p1/m1.py | 819 | def foo():
pass |
Varriount/Colliberation | refs/heads/master | libs/twisted/python/test/test_hashlib.py | 27 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.python.hashlib}
"""
from twisted.trial.unittest import TestCase
from twisted.python.hashlib import md5, sha1
class HashObjectTests(TestCase):
"""
Tests for the hash object APIs presented by L{hashlib}, C{md5} an... |
gitaarik/django | refs/heads/master | tests/gis_tests/test_spatialrefsys.py | 319 | import unittest
from django.contrib.gis.gdal import HAS_GDAL
from django.db import connection
from django.test import skipUnlessDBFeature
from django.utils import six
from .utils import SpatialRefSys, oracle, postgis, spatialite
test_srs = ({
'srid': 4326,
'auth_name': ('EPSG', True),
'auth_srid': 4326,
... |
City-of-Bloomington/green-rental | refs/heads/master | allauth/socialaccount/providers/openid/provider.py | 75 | try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
from django.core.urlresolvers import reverse
from django.utils.http import urlencode
from allauth.socialaccount import providers
from allauth.socialaccount.providers.base import Provider, ProviderAccount
from .utils impor... |
devigned/autorest | refs/heads/master | src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyComplex/autorestcomplextestservice/models/cat.py | 16 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
codeformuenster/microscale | refs/heads/master | fabric/fabfile.py | 1 | #!/usr/bin/env python2.7
from fabric.api import run, env, task, cd, runs_once, execute, settings, shell_env, put, execute, roles
import json, re
# from pandas.io.json import json_normalize, DataFrame
host_ids = {
'manager1': 'a3ecf088-26f3-406d-90c5-0ca92ee857d5',
'agent1': 'dd489ebf-6b49-4bd9-b294-5eba1a84e72... |
phalt/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_a/migrations/0004_a4.py | 381 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lookuperror_a', '0003_a3'),
]
operations = [
migrations.CreateModel(
name='A4',
fields=[
... |
mitar/django | refs/heads/master | tests/regressiontests/staticfiles_tests/urls/helper.py | 790 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns = staticfiles_urlpatterns()
|
znick/anytask | refs/heads/master | anytask/users/templatetags/__init__.py | 12133432 | |
MQQiang/kbengine | refs/heads/master | kbe/src/lib/python/Lib/urllib/__init__.py | 12133432 | |
alexmorozov/django | refs/heads/master | tests/swappable_models/tests.py | 339 | from __future__ import unicode_literals
from swappable_models.models import Article
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core import management
from django.test import TestCase, override_settings
from django.utils.six import StringIO
... |
ROMFactory/android_external_chromium_org | refs/heads/kitkat | tools/telemetry/third_party/png/png.py | 161 | #!/usr/bin/env python
# $URL$
# $Rev$
# png.py - PNG encoder/decoder in pure Python
#
# Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org>
# Portions Copyright (C) 2009 David Jones <drj@pobox.com>
# And probably portions Copyright (C) 2006 Nicko van Someren <nicko@nicko.org>
#
# Original concept by Johann... |
tragiclifestories/django | refs/heads/master | django/contrib/gis/geos/mutable_list.py | 94 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Released under the New BSD license.
"""
This module contains a base type which provides list-style mutations
without specific data storage methods.
See also http://www.aryehleib.com/MutableLists.html
Author: Aryeh Leib Taurog.
"""
from functools impo... |
Vogeltak/pauselan | refs/heads/master | lib/python3.4/site-packages/pbr/extra_files.py | 145 | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
adaptivethreat/Empire | refs/heads/master | lib/stagers/multi/pyinstaller.py | 10 | from lib.common import helpers
import os
"""
Install steps...
- install pyInstaller
-- try:
- copy into stagers directory
-- ./Empire/lib/stagers/
- kick off the empire agent on a remote target
-- /tmp/empire &
@TweekFawkes
"""
class Stager:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name... |
wattlebird/Bangumi_Spider | refs/heads/master | bgm/util.py | 1 | # -*- coding: utf-8 -*-
import re
import datetime
ptn=re.compile(r"""(((1\d{3})|(20\d{2}))([./\-\\]|年)( #
(((0?[13578])|(1[0-2]))(月|[./\-\\])(([1-2][0-9])|(3[01])|(0?[1-9])))日?| #
(((0?[469])|(11))(月|[./\-\\])(([1-2][0-9])|(30)|(0?[1-9])))日?| #
(0?2(月|[./... |
mfalkiewicz/diffusion_embed | refs/heads/master | doc/sphinxext/math_dollar.py | 68 | import re
def dollars_to_math(source):
r"""
Replace dollar signs with backticks.
More precisely, do a regular expression search. Replace a plain
dollar sign ($) by a backtick (`). Replace an escaped dollar sign
(\$) by a dollar sign ($). Don't change a dollar sign preceded or
followed by a ... |
windskyer/nova | refs/heads/master | nova/tests/unit/api/openstack/test_mapper.py | 30 | # Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
darknighte/linux | refs/heads/master | Documentation/trace/postprocess/decode_msr.py | 835 | #!/usr/bin/python
# add symbolic names to read_msr / write_msr in trace
# decode_msr msr-index.h < trace
import sys
import re
msrs = dict()
with open(sys.argv[1] if len(sys.argv) > 1 else "msr-index.h", "r") as f:
for j in f:
m = re.match(r'#define (MSR_\w+)\s+(0x[0-9a-fA-F]+)', j)
if m:
msrs[int(m.group(2), ... |
zhinaonet/sqlmap-z | refs/heads/master | lib/request/__init__.py | 70 | #!/usr/bin/env python
"""
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
pass
|
GuozhuHe/webspider | refs/heads/master | webspider/models/keyword_statistic.py | 1 | # -*- coding: utf-8 -*-
from datetime import datetime
from sqlalchemy import Column
from sqlalchemy.dialects.mysql import INTEGER, VARCHAR, TIMESTAMP
from webspider.models.base import BaseModel
from webspider.models.jobs_count import JobsCountModel
class KeywordStatisticModel(BaseModel):
__tablename__ = 'keywor... |
barachka/odoo | refs/heads/master | addons/hr_timesheet_invoice/__openerp__.py | 64 | # -*- 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... |
StrellaGroup/frappe | refs/heads/develop | frappe/model/rename_doc.py | 1 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals, print_function
import frappe
from frappe import _
from frappe.utils import cint
from frappe.model.naming import validate_name
from frappe.model.dynamic_links import get_dynamic_l... |
linebp/pandas | refs/heads/master | pandas/core/indexes/interval.py | 1 | """ define the IntervalIndex """
import numpy as np
from pandas.core.dtypes.missing import notnull, isnull
from pandas.core.dtypes.generic import ABCPeriodIndex
from pandas.core.dtypes.dtypes import IntervalDtype
from pandas.core.dtypes.common import (
_ensure_platform_int,
is_list_like,
is_datetime_or_ti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.