repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
odoo-turkiye/odoo | refs/heads/8.0 | addons/auth_ldap/__init__.py | 442 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... |
reverieinc/RevCode | refs/heads/master | revcode/mappings/telugu_to_rev.py | 1 | # -*- coding: utf-8 -*-
offset = 0x0C00
rev_code = {
0xC01: "M", # ఁ
0xC02: "x", # ం
0xC03: "X", # ః
0xC05: "a", # అ
0xC06: "A", # ఆ
0xC07: "i", # ఇ
0xC08: "I", # ఈ
0xC09: "u", # ఉ
0xC0A: "U", # ఊ
0xC0B: "WR", # ఋ
0xC0C: "", # -
0xC0D: "WA", # -
0xC0E: "e... |
vvuk/servo | refs/heads/master | tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_hixie75.py | 681 | # 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... |
chr1573r/is105lab | refs/heads/master | lab/python/lab4/lab4.py | 1 | # -*- coding: latin-1 -*-
#
# IS-105 LAB4
#
# lab4.py - kildekode som inneholder studentenes løsning.
#
#
#
import sys
import os
import subprocess
import re
import psutil # Kan installeres med "pip2.7 install psutil"
# Skriv inn fullt navn på gruppemedlemene (erstatte '-' med navn slikt 'Kari Trå')
gruppe ... |
actuaryzhang/spark | refs/heads/master | examples/src/main/python/sql/arrow.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 us... |
thaim/ansible | refs/heads/fix-broken-link | lib/ansible/modules/cloud/vmware/vmware_host_config_info.py | 21 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata... |
atlashealth/ansible | refs/heads/devel | v1/ansible/callbacks.py | 81 | # (C) 2012-2014, Michael DeHaan, <michael.dehaan@gmail.com>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
antonioIrizar/djangoTest | refs/heads/master | djangoPruebasMongo/mysite/polls/views.py | 6027 | # Create your views here.
|
CARocha/estudiocafe | refs/heads/master | produccion_finca/views.py | 6027 | # Create your views here.
|
realsaiko/odoo | refs/heads/8.0 | addons/event/__openerp__.py | 261 | # -*- 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... |
cpennington/edx-platform | refs/heads/master | lms/djangoapps/courseware/tests/test_context_processor.py | 4 | """
Unit tests for courseware context_processor
"""
from django.contrib.auth.models import AnonymousUser
from mock import Mock
from lms.djangoapps.courseware.context_processor import user_timezone_locale_prefs
from openedx.core.djangoapps.user_api.preferences.api import set_user_preference
from student.tests.factori... |
takluyver/git-cola | refs/heads/master | cola/widgets/standard.py | 2 | from __future__ import division, absolute_import, unicode_literals
import time
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4.QtCore import Qt
from PyQt4.QtCore import SIGNAL
from PyQt4.QtGui import QDockWidget
from cola import core
from cola import gitcfg
from cola import qtcompat
from cola import qtu... |
Zhongqilong/mykbengineer | refs/heads/master | kbe/src/lib/python/Lib/concurrent/futures/thread.py | 93 | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ThreadPoolExecutor."""
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
import atexit
from concurrent.futures import _base
import queue
import threading
import weakref
# Workers are created as daemon... |
s20121035/rk3288_android5.1_repo | refs/heads/master | external/skia/tools/tests/render_pictures_test.py | 67 | #!/usr/bin/python
"""
Copyright 2014 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
Test the render_pictures binary.
"""
# System-level imports
import copy
import json
import os
import shutil
import tempfile
# Imports from within Skia
import base_unitt... |
mdaniel/intellij-community | refs/heads/master | python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationGenericParametrizedWithAny_after.py | 18 | from typing import List, Any
def func():
var: [List[Any]] = []
|
allotria/intellij-community | refs/heads/master | python/testData/refactoring/move/dunderAll/after/src/a.py | 79 | __all__ = ['C']
class C:
pass |
harisibrahimkv/wye | refs/heads/master | wye/regions/forms.py | 4 | from django import forms
from django.core.exceptions import ValidationError
from wye.profiles.models import UserType, Profile
from . import models
class RegionalLeadForm(forms.ModelForm):
class Meta:
model = models.RegionalLead
exclude = ()
def clean(self):
error_message = []
... |
simbha/mAngE-Gin | refs/heads/master | lib/django/contrib/staticfiles/urls.py | 567 | from django.conf import settings
from django.conf.urls.static import static
from django.contrib.staticfiles.views import serve
urlpatterns = []
def staticfiles_urlpatterns(prefix=None):
"""
Helper function to return a URL pattern for serving static files.
"""
if prefix is None:
prefix = setti... |
edx-solutions/edx-platform | refs/heads/master | openedx/features/content_type_gating/migrations/0002_auto_20181119_0959.py | 5 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-19 14:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('content_type_gating', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='contenttyp... |
kuri65536/python-for-android | refs/heads/master | python3-alpha/python-libs/gdata/acl/__init__.py | 503 | #!/usr/bin/python
#
# Copyright (C) 2009 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 ... |
Nikea/VisTrails | refs/heads/master | vistrails/gui/port_documentation.py | 2 | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... |
RMKD/networkx | refs/heads/master | networkx/algorithms/bipartite/generators.py | 45 | # -*- coding: utf-8 -*-
"""
Generators and functions for bipartite graphs.
"""
# Copyright (C) 2006-2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import math
import random
import networkx
from funct... |
amenezes/secureheaders | refs/heads/master | lib/charts/datacharts.py | 1 | from lib.database.db import DB
from lib.cache.datacache import Datacache
from lib.secureheaders.xss import XSS
from lib.secureheaders.xfo import XFO
from lib.secureheaders.xcto import XCTO
from lib.secureheaders.sts import STS
from lib.secureheaders.pkp import PKP
from lib.secureheaders.csp import CSP
class Datachart... |
oerp-odoo/service-management | refs/heads/master | base_location_extension/__init__.py | 2 | import res
import better_zip
|
pquentin/django | refs/heads/stable/1.8.x | django/db/models/sql/compiler.py | 16 | import re
import warnings
from itertools import chain
from django.core.exceptions import FieldError
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import OrderBy, Random, RawSQL, Ref
from django.db.models.query_utils import QueryWrapper, select_related_descend
from django.db.models... |
StevenMPhillips/arrow | refs/heads/master | python/setup.py | 1 | #!/usr/bin/env python
# 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
# "L... |
Dellware78/mtasa-blue | refs/heads/master | vendor/google-breakpad/src/tools/gyp/test/win/precompiled/gyptest-all.py | 344 | #!/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.
"""
Verifies that precompiled headers can be specified.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.Test... |
nelango/ViralityAnalysis | refs/heads/master | model/lib/pytz/exceptions.py | 657 | '''
Custom exceptions raised by pytz.
'''
__all__ = [
'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError',
'NonExistentTimeError',
]
class UnknownTimeZoneError(KeyError):
'''Exception raised when pytz is passed an unknown timezone.
>>> isinstance(UnknownTimeZoneError(), LookupError)... |
Arable/evepod | refs/heads/master | lib/python2.7/site-packages/newrelic-2.12.0.10/newrelic/core/transaction_cache.py | 2 | """This module implements a global cache for tracking any transactions.
"""
import sys
import threading
import weakref
try:
import thread
except ImportError:
import _thread as thread
from newrelic.core.config import global_settings
class TransactionCache(object):
def __init__(self):
self._cach... |
xiaoyaozi5566/GEM5_DRAMSim2 | refs/heads/master | ext/DRAMSim2/comparison_gen.py | 9 | #!/usr/bin/python
"""
This script generates a series of commands to do parameter sweeps. One way to
use this script is to generate a big matrix of configurations and then run them
on different binaries to diff the output. This can be used as a poor man's
regression test when doing code cleanups (i.e. where functiona... |
leiferikb/bitpop | refs/heads/master | depot_tools/third_party/gsutil/gslib/commands/mb.py | 51 | # Copyright 2011 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 a... |
marxin/youtube-dl | refs/heads/master | youtube_dl/extractor/tv4.py | 117 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
parse_iso8601,
)
class TV4IE(InfoExtractor):
IE_DESC = 'tv4.se and tv4play.se'
_VALID_URL = r'''(?x)https?://(?:www\.)?
(?:
tv4\.se/(?:[^/]+)/klipp/(?:.*... |
simon-anders/htseq | refs/heads/master | python3/HTSeq/_version.py | 2 | __version__ = "0.11.5" |
undoware/neutron-drive | refs/heads/master | google_appengine/google/storage/speckle/python/django/backend/__init__.py | 1333 | #!/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... |
zanderle/django | refs/heads/master | django/contrib/admin/views/main.py | 327 | import sys
from collections import OrderedDict
from django.contrib.admin import FieldListFilter
from django.contrib.admin.exceptions import (
DisallowedModelAdminLookup, DisallowedModelAdminToField,
)
from django.contrib.admin.options import (
IS_POPUP_VAR, TO_FIELD_VAR, IncorrectLookupParameters,
)
from djang... |
pachcool4/damnvid | refs/heads/master | ui/dPrefEditor.py | 12 | # -*- coding: utf-8 -*-
from dUI import *
from dModules import *
class DamnPrefEditor(wx.Dialog): # Preference dialog (not manager)
def __init__(self, parent, id, title, main):
# Dialog init
if DV.os == u'posix': # Let the window be resizable on linux only
wx.Dialog.__init__(self, parent, id, title, style=wx.RE... |
qgeissmann/ouroboros | refs/heads/master | myApp.py | 1 | from myWindow import *
from game import *
from player import *
from playerAI import *
from palette import *
import numpy as np
import threading
import pyglet
# left up right down keys
lurd = [\
[pyglet.window.key.LEFT,\
pyglet.window.key.UP,\
pyglet.window.key.RIGHT,\
pyglet.window.key.DOWN],\
[pygl... |
fluxer/spm | refs/heads/master | nuitka/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Scanner/D.py | 6 | """SCons.Scanner.D
Scanner for the Digital Mars "D" programming language.
Coded by Andy Friesen
17 Nov 2003
"""
#
# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software")... |
prutseltje/ansible | refs/heads/devel | test/units/modules/network/nxos/test_nxos_vrf_af.py | 57 | # (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... |
EzyInsights/Diamond | refs/heads/master | src/collectors/http/http.py | 28 | # coding=utf-8
"""
Collect statistics from a HTTP or HTTPS connexion
#### Dependencies
* urllib2
#### Usage
Add the collector config as :
enabled = True
ttl_multiplier = 2
path_suffix = ""
measure_collector_time = False
byte_unit = byte,
req_vhost = www.my_server.com
req_url = https://www.my_server.com/, https://... |
chdecultot/erpnext | refs/heads/develop | erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.py | 121 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class EmployeeInternalWorkHistory(Document):
pass |
xujb/odoo | refs/heads/8.0 | addons/sale_journal/sale_journal.py | 276 | # -*- 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... |
ShaolongHu/Nitrate | refs/heads/develop | tcms/testplans/urls/__init__.py | 14224 | # -*- coding: utf-8 -*-
|
libcrosswind/libcrosswind | refs/heads/master | platform/windows/compilers/x64/TDM-GCC-64/gdb64/bin/lib/fractions.py | 252 | # Originally contributed by Sjoerd Mullender.
# Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>.
"""Rational, infinite-precision, real numbers."""
from __future__ import division
from decimal import Decimal
import math
import numbers
import operator
import re
__all__ = ['Fraction', 'gcd']
Rational... |
HKUST-SING/tensorflow | refs/heads/master | tensorflow/contrib/learn/python/learn/preprocessing/tests/categorical_vocabulary_test.py | 137 | # encoding: utf-8
# 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 r... |
darkpixel/statuspage | refs/heads/master | statuspage/urls.py | 1 | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth.views import login, logout
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView, ListView, DetailView
admin.autodiscover()
... |
camelliazhang/WhereHows | refs/heads/master | wherehows-etl/src/main/resources/jython/AzkabanLoad.py | 10 | #
# Copyright 2015 LinkedIn Corp. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
pactools/pactools | refs/heads/master | doc/conf.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pactools documentation build configuration file, created by
# sphinx-quickstart on Thu Mar 23 10:56:51 2017.
#
# 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
# a... |
noba3/KoTos | refs/heads/master | addons/script.module.youtube.dl/lib/youtube_dl/extractor/shahid.py | 31 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_urllib_parse
from ..utils import (
ExtractorError,
int_or_none,
parse_iso8601,
)
class ShahidIE(InfoExtractor):
_VALID_URL = r'https?://shahid\.mbc\.net/ar/episode/(?P<id>\d+)/?'
... |
MyRookie/SentimentAnalyse | refs/heads/master | venv/lib/python2.7/site-packages/pymongo/results.py | 71 | # Copyright 2015 MongoDB, 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 agreed to in writing, so... |
Anonymous-X6/django | refs/heads/master | tests/inline_formsets/models.py | 236 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
class School(models.Model):
name = models.CharField(max_length=100)
class Parent(models.Model):
name = models.CharField(max_length=100)
class Child(models.Model):
mother = models.ForeignK... |
MattNolanLab/ei-attractor | refs/heads/master | grid_cell_model/data_storage/sim_models/ei.py | 1 | '''
Simulation data model for the EI network: in general a network of two
populations, E and I cells; more specifically, a grid cell network.
'''
import numpy as np
from ...analysis import spikes
def getNetParam(data, p):
'''Extract a network parameter (p) from the data dictionary'''
return data['net_attr'][... |
2014c2g23/2015cd_midterm- | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/this.py | 948 | s = """Gur Mra bs Clguba, ol Gvz Crgref
Ornhgvshy vf orggre guna htyl.
Rkcyvpvg vf orggre guna vzcyvpvg.
Fvzcyr vf orggre guna pbzcyrk.
Pbzcyrk vf orggre guna pbzcyvpngrq.
Syng vf orggre guna arfgrq.
Fcnefr vf orggre guna qrafr.
Ernqnovyvgl pbhagf.
Fcrpvny pnfrf nera'g fcrpvny rabhtu gb oernx gur ehyrf.
Nygubhtu cenpg... |
keon/algorithms | refs/heads/master | algorithms/sort/counting_sort.py | 2 | def counting_sort(arr):
"""
Counting_sort
Sorting a array which has no element greater than k
Creating a new temp_arr,where temp_arr[i] contain the number of
element less than or equal to i in the arr
Then placing the number i into a correct position in the result_arr
return the result_arr
... |
MadCat34/Sick-Beard | refs/heads/development | lib/hachoir_parser/misc/torrent.py | 90 | """
.torrent metainfo file parser
http://wiki.theory.org/BitTorrentSpecification#Metainfo_File_Structure
Status: To statufy
Author: Christophe Gisquet <christophe.gisquet@free.fr>
"""
from lib.hachoir_parser import Parser
from lib.hachoir_core.field import (FieldSet, ParserError,
String, RawBytes)
from lib.hacho... |
diefenbach/lfc-blog | refs/heads/master | lfc_blog/admin.py | 1 | from django.contrib import admin
from lfc_blog.models import Blog
admin.site.register(Blog) |
cvrebert/werkzeug | refs/heads/master | werkzeug/testsuite/urls.py | 10 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.urls
~~~~~~~~~~~~~~~~~~~~~~~
URL helper tests.
:copyright: (c) 2013 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import unittest
from werkzeug.testsuite import WerkzeugTestCase
from werkzeug.datastructures import OrderedMultiD... |
shepdelacreme/ansible | refs/heads/devel | lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... |
MarcJoan/django | refs/heads/master | django/contrib/sessions/middleware.py | 256 | import time
from importlib import import_module
from django.conf import settings
from django.utils.cache import patch_vary_headers
from django.utils.http import cookie_date
class SessionMiddleware(object):
def __init__(self):
engine = import_module(settings.SESSION_ENGINE)
self.SessionStore = eng... |
albertjan/pypyjs | refs/heads/master | website/js/pypy.js-0.2.0/lib/modules/test/test_typechecks.py | 137 | """Unit tests for __instancecheck__ and __subclasscheck__."""
import unittest
from test import test_support
class ABC(type):
def __instancecheck__(cls, inst):
"""Implement isinstance(inst, cls)."""
return any(cls.__subclasscheck__(c)
for c in set([type(inst), inst.__class__]))... |
xzYue/odoo | refs/heads/8.0 | addons/account_budget/__openerp__.py | 261 | # -*- 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... |
chjw8016/GreenOdoo7-haibao | refs/heads/master | openerp/sql_db.py | 23 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2013 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... |
ace-han/quanquan | refs/heads/develop | quanquan/urls/api/__init__.py | 1 | from django.conf.urls import url, include, patterns
urlpatterns = patterns('',
url(r'^v1/', include('quanquan.urls.api.v1', namespace='v1')),
# url(r'^v2/', include('quanquan.urls.api.v1', namespace='v2')),
) |
Dude-X/selenium | refs/heads/master | py/selenium/webdriver/edge/webdriver.py | 5 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
SujaySKumar/django | refs/heads/master | django/contrib/auth/signals.py | 865 | from django.dispatch import Signal
user_logged_in = Signal(providing_args=['request', 'user'])
user_login_failed = Signal(providing_args=['credentials'])
user_logged_out = Signal(providing_args=['request', 'user'])
|
koirikivi/django-filter | refs/heads/develop | setup.py | 6 | import os
import sys
from setuptools import setup, find_packages
f = open('README.rst')
readme = f.read()
f.close()
version = '0.10.0'
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
os.system("python setup.py bdist_wheel upload")
print("You probably want to also tag the version n... |
ryfeus/lambda-packs | refs/heads/master | Opencv_pil/source/numpy/lib/tests/test_format.py | 27 | from __future__ import division, absolute_import, print_function
r''' Test the .npy file format.
Set up:
>>> import sys
>>> from io import BytesIO
>>> from numpy.lib import format
>>>
>>> scalars = [
... np.uint8,
... np.int8,
... np.uint16,
... np.int16,
... ... |
lamby/pkg-reinteract | refs/heads/master | lib/reinteract/editor_window.py | 1 | # Copyright 2008-2009 Owen Taylor
#
# This file is part of Reinteract and distributed under the terms
# of the BSD license. See the file COPYING in the Reinteract
# distribution for full details.
#
########################################################################
import gtk
import pango
import os
import sys
f... |
GFDRR/geonode | refs/heads/labs_geonode_2.6.x | geonode/contrib/geosites/views.py | 16 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... |
sacnayak/ssnayak-viz | refs/heads/master | lib/werkzeug/posixemulation.py | 364 | # -*- coding: utf-8 -*-
r"""
werkzeug.posixemulation
~~~~~~~~~~~~~~~~~~~~~~~
Provides a POSIX emulation for some features that are relevant to
web applications. The main purpose is to simplify support for
systems such as Windows NT that are not 100% POSIX compatible.
Currently this only imple... |
racker/service-registry | refs/heads/master | node_modules/rproxy/node_modules/cluster2/node_modules/npm/node_modules/node-gyp/gyp/test/product/gyptest-product.py | 290 | #!/usr/bin/env python
# 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.
"""
Verifies simplest-possible build of a "Hello, world!" program
using the default build target.
"""
import TestGyp
# Android does not su... |
aureooms/ghc-2015-qualification | refs/heads/master | src/__init__.py | 1 |
__all__ = []
def __init__():
import os
root = os.path.dirname(os.path.abspath(__file__))
module = os.path.basename(root)
for f in os.listdir(root):
path = root + '/' + f
if os.path.isdir(path):
if os.path.isfile(path + '/__init__.py'):
__import__(module + '.' + f)
__all__.append(f)
if os.path.i... |
bd339/servo | refs/heads/master | tests/wpt/harness/wptrunner/executors/executorselenium.py | 58 | # 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/.
import os
import socket
import sys
import threading
import time
import traceback
import urlparse
import uuid
from .base... |
p12tic/zeroclickinfo-fathead | refs/heads/master | lib/fathead/diveintopython/parse.py | 7 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from bs4 import BeautifulSoup
from tidylib import tidy_document
URL_ROOT = 'http://www.diveintopython3.net/'
DOWNLOADED_HTML_PATH = 'download/diveintopython3-master'
class PythonData(object):
"""
Object responsible for loading raw HTML dat... |
karthik339/Agni | refs/heads/master | MainDemo/flask/lib/python2.7/site-packages/sqlalchemy/sql/expression.py | 17 | # sql/expression.py
# Copyright (C) 2005-2012 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
"""Defines the base components of SQL expression trees.
All components are derived ... |
orione7/plugin.video.streamondemand-pureita | refs/heads/master | lib/sambatools/pyasn1/codec/cer/decoder.py | 10 | # CER decoder
from pyasn1 import error
from pyasn1.codec.ber import decoder
from pyasn1.compat.octets import oct2int
from pyasn1.type import univ
class BooleanDecoder(decoder.AbstractSimpleDecoder):
protoComponent = univ.Boolean(0)
def valueDecoder(self, fullSubstrate, substrate, asn1Spec, tagSet, length,
... |
ftiff/autopkgr | refs/heads/master | scripts/codesign.py | 8 | #!/usr/bin/python
'''
Make sure nested Frameworks get properly signed,
(in the Version/A folder).
Place this file in a folder named 'scripts' at
the root of your project.
Add this next line (including quotes) as a "Run Script"
AFTER all copy file phases.
"${PROJECT_DIR}/scripts/codesign.... |
geobricks/geobricks_qgis_plugin_faostat | refs/heads/master | help/source/conf.py | 1 | # -*- coding: utf-8 -*-
#
# geobricks_qgis_plugin_faostat documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 12 17:11:03 2012.
#
# 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
# autog... |
kkragenbrink/node-gyp | refs/heads/master | gyp/test/win/precompiled/gyptest-all.py | 344 | #!/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.
"""
Verifies that precompiled headers can be specified.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.Test... |
dynaryu/rmtk | refs/heads/master | rmtk/plotting/risk_maps/__init__.py | 15 | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 16 17:12:14 2014
@author: chiaracasotto
"""
|
DavidWhittingham/arcpyext | refs/heads/develop | arcpyext/mapping/compare_types.py | 1 | # coding=utf-8
"""This module contains classes used in making map document/project comparisons."""
# Python 2/3 compatibility
# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-order,wrong-import-position,import-error,no-name-in-module
from __future__ import (absolute_import, division, print_functio... |
Manolaru/Python_train | refs/heads/master | Les_7/Task_21/fixture/application.py | 4 | from selenium import webdriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.user import UserHelper
from fixture.binding import BindingHelper
class Application:
def __init__(self, browser, base_url):
if browser == "firefox":
self.wd = webdriver... |
SimonSapin/servo | refs/heads/master | tests/wpt/web-platform-tests/mathml/tools/stretchstacks.py | 101 | #!/usr/bin/python
from utils import mathfont
import fontforge
arrowCodePoint = 0x2192 # horizontal stretch operator
v = 3 * mathfont.em
f = mathfont.create("stretchstack-bottomshiftdown%d" % v)
mathfont.createSquareGlyph(f, arrowCodePoint)
f.math.LowerLimitBaselineDropMin = 0
f.math.LowerLimitGapMin = 0
f.math.Overb... |
axelkennedal/dissen | refs/heads/master | dissenEnv/lib/python3.5/site-packages/django/db/models/base.py | 24 | from __future__ import unicode_literals
import copy
import inspect
import warnings
from itertools import chain
from django.apps import apps
from django.conf import settings
from django.core import checks
from django.core.exceptions import (
NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,... |
trankmichael/numpy | refs/heads/master | numpy/lib/tests/test_packbits.py | 72 | import numpy as np
from numpy.testing import assert_array_equal, assert_equal, assert_raises
def test_packbits():
# Copied from the docstring.
a = [[[1, 0, 1], [0, 1, 0]],
[[1, 1, 0], [0, 0, 1]]]
for dtype in [np.bool, np.uint8, np.int]:
arr = np.array(a, dtype=dtype)
b = np.pack... |
DevilFruit99/GooglePythonClass | refs/heads/master | hello.py | 165 | #!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
"""A tiny Python program to check that Python is working.
Try running this program from t... |
HiSPARC/station-software | refs/heads/master | user/python/Lib/test/test_hotshot.py | 11 | import os
import pprint
import unittest
import tempfile
import _hotshot
import gc
from test import test_support
# Silence Py3k warning
hotshot = test_support.import_module('hotshot', deprecated=True)
from hotshot.log import ENTER, EXIT, LINE
from hotshot import stats
def shortfilename(fn):
# We use a really sho... |
parjong/coreclr | refs/heads/master | src/ToolBox/SOS/tests/testutils.py | 43 | from __future__ import print_function
import lldb
import re
import inspect
import sys
import os
import importlib
summary_file = ''
fail_flag = ''
failed = False
def assertCommon(passed, fatal):
global failed
with open(summary_file, 'a+') as summary:
print(bool(passed), file=summary)
if (not ... |
sjfloat/youtube-dl | refs/heads/master | youtube_dl/extractor/telegraaf.py | 90 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import remove_end
class TelegraafIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?telegraaf\.nl/tv/(?:[^/]+/)+(?P<id>\d+)/[^/]+\.html'
_TEST = {
'url': 'http://www.telegraaf.nl/tv/nieuws/binnenl... |
jphilipsen05/zulip | refs/heads/master | version.py | 3 | ZULIP_VERSION = "1.5.1+git"
PROVISION_VERSION = '5.0'
|
ifduyue/sentry | refs/heads/master | src/sentry/receivers/users.py | 6 | from __future__ import absolute_import, print_function
from django.db import router
from django.db.models.signals import post_syncdb
from sentry.models import User
def create_first_user(app, created_models, verbosity, db, **kwargs):
if User not in created_models:
return
if hasattr(router, 'allow_mig... |
dynius/p2pool | refs/heads/master | p2pool/test/test_node.py | 198 | from __future__ import division
import base64
import random
import tempfile
from twisted.internet import defer, reactor
from twisted.python import failure
from twisted.trial import unittest
from twisted.web import client, resource, server
from p2pool import data, node, work
from p2pool.bitcoin import data as bitcoin... |
ksanchezcld/volatility | refs/heads/master | volatility/plugins/linux/pidhashtable.py | 46 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 o... |
sduenas/perceval | refs/heads/master | tests/test_git.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2017 Bitergia
#
# 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 l... |
sensbio/sensbiotk | refs/heads/master | examples/scripts/fox_attitude.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is a part of sensbiotk
# Contact : sensbiotk@inria.fr
# Copyright (C) 2015 INRIA
#
# 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 v... |
ebar0n/django | refs/heads/master | django/contrib/messages/storage/base.py | 73 | from django.conf import settings
from django.contrib.messages import constants, utils
LEVEL_TAGS = utils.get_level_tags()
class Message:
"""
Represent an actual message that can be stored in any of the supported
storage classes (typically session- or cookie-based) and rendered in a view
or template.
... |
adangtran87/gbf-weap | refs/heads/master | weapon_list.py | 1 | import itertools
from weapon import *
from summon import SummonType, Summon
from weapon_pool import WeaponPool
class WeaponList:
def __init__(self, weapon_list):
self.weapon_list = weapon_list
self.all_pools = []
for pool in (itertools.combinations(self.weapon_list, 10)):
pool =... |
ojengwa/odoo | refs/heads/8.0 | addons/sale/__openerp__.py | 221 | # -*- 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... |
keedio/hue | refs/heads/master | desktop/core/ext-py/pyformance-0.3.2/pyformance/meters/__init__.py | 33 | from .counter import Counter
from .meter import Meter
from .histogram import Histogram
from .timer import Timer
from .gauge import Gauge, CallbackGauge, SimpleGauge
|
partofthething/home-assistant | refs/heads/dev | homeassistant/components/xiaomi_miio/__init__.py | 1 | """Support for Xiaomi Miio."""
from datetime import timedelta
import logging
from miio.gateway import GatewayException
from homeassistant import config_entries, core
from homeassistant.const import CONF_HOST, CONF_TOKEN
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.update_coordina... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.