repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
piece601/Openkore
refs/heads/master
src/scons-local-2.0.1/SCons/Options/PackageOption.py
61
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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"), to deal in the Software without restriction, including # without li...
TeamUACS1/410Project
refs/heads/master
main/apiviews.py
1
from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext from django.shortcuts import redirect from django.db.models import Q from django.core import serializers from django.http import HttpResponse, JsonResponse, HttpResponseRedirect import urllib2 ...
gwpy/gwpy
refs/heads/master
gwpy/detector/tests/test_channel.py
3
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2014-2020) # # This file is part of GWpy. # # GWpy 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)...
nuhman/MIT-OCW-6.034-Artificial-Intelligence
refs/heads/master
Lab 0/tests.py
1
import math import random random.seed() # Change to "random.seed(n)" to have the random tests always return the same value answers = {} ANSWER_1_getargs = 'VALUE' # Special case to get the value named "FOO_getargs" def ANSWER_1_testanswer(ans, original_val = None): return ( str(ans) == "2" ) ANSWER_1...
yqm/sl4a
refs/heads/master
python/src/Lib/test/test_importhooks.py
56
import sys import imp import os import unittest from test import test_support test_src = """\ def get_name(): return __name__ def get_file(): return __file__ """ absimp = "import sub\n" relimp = "from . import sub\n" deeprelimp = "from .... import sub\n" futimp = "from __future__ import absolute_import\n" r...
csci4140group8/sql-warehouse
refs/heads/master
app.py
1
from flask import Flask, jsonify, request, send_from_directory, send_file import service APP = Flask(__name__) # Static Files @APP.route('/') def get_index(): return send_file('static/index.html') @APP.route('/<path:path>') def static_pages(path): return send_from_directory('static', path) # Utility endpoi...
mariajosefrancolugo/osp
refs/heads/master
osp/notifications/migrations/0002_auto__chg_field_intervention_section.py
1
# encoding: 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): # Changing field 'Intervention.section' db.alter_column('notifications_intervention', 'section_id', self.g...
Kiiv/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/postprocessor/execafterdownload.py
30
from __future__ import unicode_literals import subprocess from .common import PostProcessor from ..compat import shlex_quote from ..utils import PostProcessingError class ExecAfterDownloadPP(PostProcessor): def __init__(self, downloader=None, verboseOutput=None, exec_cmd=None): self.verboseOutput = verb...
jikhanjung/scitilop_webapp
refs/heads/master
lib/werkzeug/__init__.py
296
# -*- coding: utf-8 -*- """ werkzeug ~~~~~~~~ Werkzeug is the Swiss Army knife of Python web development. It provides useful classes and functions for any WSGI application to make the life of a python web developer much easier. All of the provided classes are independent from each other so yo...
mbuffat/Tradfri-JEEDOM
refs/heads/master
tradfridaemon.py
1
#! /usr/bin/env python3 # daemon tradfy import sys import time import socket import json import requests,logging import configparser from pytradfri import Gateway from pytradfri.api.libcoap_api import api_factory # DEBUG=False SESSION_JEEDOM=None # def JeedomAPI(ID="0",methode="ping"): HEADERS = {'content-type':...
talishte/ctigre
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_list.py
105
from __future__ import unicode_literals import datetime from django.contrib.admin.templatetags.admin_urls import add_preserved_filters from django.contrib.admin.util import (lookup_field, display_for_field, display_for_value, label_for_field) from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_...
shsingh/ansible
refs/heads/devel
lib/ansible/module_utils/storage/emc/__init__.py
12133432
youdonghai/intellij-community
refs/heads/master
python/testData/optimizeImports/libraryRootInsideProject/lib/b.py
12133432
bubbleboy14/cantools
refs/heads/master
cantools/db/gae/__init__.py
12133432
shubhamgupta123/erpnext
refs/heads/master
erpnext/accounts/print_format/payment_receipt_voucher/__init__.py
12133432
ascoderu/opwen-webapp
refs/heads/master
opwen_email_client/webapp/forms/__init__.py
12133432
dls-controls/pymalcolm
refs/heads/master
malcolm/core/future.py
1
class Future: """Represents the result of an asynchronous computation. This class has a similar API to concurrent.futures.Future but this simpler version is not thread safe""" # Possible future states (for internal use). RUNNING = "RUNNING" # Task has set the return or exception and this futur...
pilnujemy/pytamy
refs/heads/master
foundation/offices/emails/migrations/0001_initial.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-12 08:41 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ ...
LittlewhiteChen/emmet-sublime
refs/heads/master
emmet/reloader.py
18
import sys import imp # Dependecy reloader for Emmet plugin # The original idea is borrowed from # https://github.com/wbond/sublime_package_control/blob/master/package_control/reloader.py reload_mods = [] for mod in sys.modules: if mod.startswith('emmet') and sys.modules[mod] != None: reload_mods.append(mod) mo...
ygenc/onlineLDA
refs/heads/master
onlineldavb_new/build/scipy/scipy/weave/tests/test_blitz_tools.py
10
import os import time from numpy import float32, float64, complex64, complex128, \ zeros, random, array, sum, abs, allclose from numpy.testing import TestCase, dec, assert_equal, assert_ from scipy.weave import blitz_tools from scipy.weave.ast_tools import harvest_variables from weave_test_utils import empty_te...
gkarlin/django-jenkins
refs/heads/master
build/Django/tests/regressiontests/test_client_regress/urls.py
65
from __future__ import absolute_import from django.conf.urls import patterns, url from django.views.generic import RedirectView from . import views urlpatterns = patterns('', (r'^no_template_view/$', views.no_template_view), (r'^staff_only/$', views.staff_only_view), (r'^get_view/$', views.get_view), ...
scanny/python-pptx
refs/heads/master
tests/chart/test_point.py
1
# encoding: utf-8 """ Unit test suite for the pptx.chart.point module. """ from __future__ import absolute_import, division, print_function, unicode_literals import pytest from pptx.chart.datalabel import DataLabel from pptx.chart.marker import Marker from pptx.chart.point import BubblePoints, CategoryPoints, Point...
bobhelander/house
refs/heads/master
house/data/service_data.py
1
""" service_data.py Database queries Copyright (C) 2013-2016 Bob Helander This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Th...
erikluo/omaha
refs/heads/master
third_party/gmock/scripts/generator/cpp/__init__.py
12133432
rebstar6/servo
refs/heads/master
tests/wpt/css-tests/tools/pywebsocket/src/test/__init__.py
12133432
Yong-Lee/decode-Django
refs/heads/master
Django-1.5.1/tests/regressiontests/dispatch/tests/__init__.py
116
""" Unit-tests for the dispatch project """ from __future__ import absolute_import from .test_dispatcher import DispatcherTests, ReceiverTestCase from .test_saferef import SaferefTests
gwpy/gwpy
refs/heads/master
gwpy/plot/tests/test_text.py
3
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2018-2020) # # This file is part of GWpy. # # GWpy 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)...
ratpack/FrameworkBenchmarks
refs/heads/master
frameworks/PHP/php-senthot/__init__.py
12133432
thaim/ansible
refs/heads/fix-broken-link
lib/ansible/modules/network/illumos/__init__.py
12133432
hellhovnd/django
refs/heads/master
tests/urlpatterns_reverse/models.py
12133432
mcouthon/benes
refs/heads/master
core/__init__.py
12133432
papados/ordersys
refs/heads/master
Lib/site-packages/django/contrib/humanize/models.py
12133432
ubc/edx-platform
refs/heads/release
lms/djangoapps/verify_student/migrations/__init__.py
12133432
ibinti/intellij-community
refs/heads/master
python/testData/completion/notImportedSubmodulesOfNamespacePackage/nspkg1/m2.py
12133432
a2sheppy/kuma
refs/heads/master
kuma/users/management/__init__.py
12133432
koyuawsmbrtn/eclock
refs/heads/master
windows/Python27/Lib/site-packages/plyer-1.1.2-py2.7.egg/plyer/platforms/ios/__init__.py
12133432
Chilledheart/chromium
refs/heads/master
base/allocator/prep_libc.py
50
#!/usr/bin/env python # Copyright (c) 2012 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. # # This script takes libcmt.lib for VS2013 and removes the allocation related # functions from it. # # Usage: prep_libc.py <VCLibD...
kasioumis/invenio
refs/heads/master
invenio/modules/sequencegenerator/upgrades/sequencegenerator_2014_03_18_id_increase.py
15
# -*- 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...
holmes/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/backslash.py
166
def f(x): return <selection>x.foo\ .bar</selection>.baz()
rednithin/Misc-Mini
refs/heads/master
Casual/TSP.py
1
"""Travelling Salesman Problem.""" import copy from pprint import pprint costTable = {} parentTable = {} startvertex = 1 def FillTable(vertex, mySet): """Fill the tables.""" if(len(mySet) == 0): return mySSet = [str(num) for num in mySet] finalKey = str(vertex) + "," + "-".join(mySSet) i...
matthdel/buildroot
refs/heads/master
support/scripts/gen-manual-lists.py
65
## gen-manual-lists.py ## ## This script generates the following Buildroot manual appendices: ## - the package tables (one for the target, the other for host tools); ## - the deprecated items. ## ## Author(s): ## - Samuel Martin <s.martin49@gmail.com> ## ## Copyright (C) 2013 Samuel Martin ## ## This program is free...
sirex/Misago
refs/heads/master
misago/users/tests/test_createsuperuser.py
9
from django.contrib.auth import get_user_model from django.core.management import call_command from django.test import TestCase from django.utils.six import StringIO class CreateSuperuserTests(TestCase): def test_create_superuser(self): """command creates superuser""" out = StringIO() call...
ramineni/myironic
refs/heads/master
ironic/tests/drivers/test_deploy_utils.py
1
# Copyright (c) 2012 NTT DOCOMO, INC. # Copyright 2011 OpenStack Foundation # Copyright 2011 Ilya Alekseyev # # 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:...
jaimeMF/youtube-dl
refs/heads/master
youtube_dl/extractor/tvp.py
132
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor class TvpIE(InfoExtractor): IE_NAME = 'tvp.pl' _VALID_URL = r'https?://(?:vod|www)\.tvp\.pl/.*/(?P<id>\d+)$' _TESTS = [{ 'url': 'http://vod.tvp.pl/filmy-fabularne/filmy-za-darmo/ogniem-i-...
utecuy/edx-platform
refs/heads/master
lms/djangoapps/mobile_api/tests.py
133
# -*- coding: utf-8 -*- """ Tests for mobile API utilities. """ import ddt from django.test import TestCase from mobile_api.models import MobileApiConfig from .utils import mobile_course_access, mobile_view @ddt.ddt class TestMobileAPIDecorators(TestCase): """ Basic tests for mobile api decorators to ensure...
UniMOOC/gcb-new-module
refs/heads/master
tools/etl/testing.py
11
# 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 by applicable law or ...
jscholes/codex
refs/heads/master
src/gui/__init__.py
1
# Codex # Copyright (C) 2020 James Scholes # This program is free software, licensed under the terms of the GNU General Public License (version 3 or later). # See the file LICENSE.txt for more details. import os.path import subprocess import webbrowser import wx import wx.lib.sized_controls as sc import application i...
MadRocker/jet-2.6.39.5
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
BrandonY/gsutil
refs/heads/master
gslib/tests/test_bucketconfig.py
7
# -*- coding: utf-8 -*- # 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 require...
foreni-packages/hachoir-parser
refs/heads/master
hachoir_parser/program/java.py
84
""" Compiled Java classes parser. Author: Thomas de Grenier de Latour (TGL) <degrenier@easyconnect.fr> Creation: 2006/11/01 Last-update: 2006/11/06 Introduction: * This parser is for compiled Java classes, aka .class files. What is nice with this format is that it is well documented in the official Java VM specs...
spirrello/spirrello-pynet-work
refs/heads/master
applied_python/lib/python2.7/site-packages/pysnmp/carrier/asyncio/dgram/udp.py
4
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> # # Redistribution and use in source and bi...
ramon-astudillo/lxmls-toolkit
refs/heads/master
lxmls/sequences/sequence_classification_decoder.py
2
import numpy as np from lxmls.sequences.log_domain import * import pdb class SequenceClassificationDecoder: """ Implements a sequence classification decoder.""" def __init__(self): pass # ---------- # Computes the forward trellis for a given sequence. # Receives: # # Initial scor...
lzw120/django
refs/heads/master
django/conf/locale/pt_BR/__init__.py
12133432
lzw120/django
refs/heads/master
tests/regressiontests/introspection/__init__.py
12133432
dspshin/fastcampus-django
refs/heads/master
helloworld/guestbook/__init__.py
12133432
ccrouch/python-tuskarclient
refs/heads/master
tuskarclient/tests/v1/__init__.py
12133432
heeraj123/oh-mainline
refs/heads/master
vendor/packages/mechanize/test/test_useragent.py
22
#!/usr/bin/env python from unittest import TestCase import mechanize from test_browser import make_mock_handler class UserAgentTests(TestCase): def _get_handler_from_ua(self, ua, name): handler = ua._ua_handlers.get(name) self.assertTrue(handler in ua.handlers) return handler def ...
giordi91/python_misc
refs/heads/master
widgets/plotWidget/taylor_demo.py
1
import math from PySide import QtGui, QtCore from plot_widget import PlotWidget class DrawableFunction(object): def __init__(self): self.color = [255,0,0] def evaluate(self,x): raise NotImplemented class SinFunc(DrawableFunction): def evaluate(self,x): return math.sin(x) cl...
thomasgilgenast/spqr-nonrel
refs/heads/master
django/conf/app_template/tests.py
6666
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
edx-solutions/xblock-discussion
refs/heads/master
discussion_app/tests.py
6666
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
davidbrazdil/nacl
refs/heads/master
src/trusted/validator_ragel/verify_superinstructions.py
4
#!/usr/bin/python # Copyright (c) 2013 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. """%prog [option...] superinsructions1.txt superinsructions2.txt... Regex-based verifier for superinstructions list.""" import op...
noobcoderT/ryu-3.21
refs/heads/master
ryu/services/protocols/bgp/rtconf/neighbors.py
12
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
vikas1885/test1
refs/heads/master
common/djangoapps/track/views/segmentio.py
40
"""Handle events that were forwarded from the Segment webhook integration""" import datetime import json import logging from django.conf import settings from django.contrib.auth.models import User from django.http import HttpResponse from django.views.decorators.http import require_POST from django.views.decorators.c...
breznak/nupic
refs/heads/master
src/nupic/research/spatial_pooler.py
5
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
ilvar/django-mailer
refs/heads/master
mailer/management/commands/__init__.py
12133432
appsembler/edx-platform
refs/heads/appsembler/tahoe/master
lms/djangoapps/courseware/tests/__init__.py
12133432
peiyuwang/pants
refs/heads/master
contrib/android/tests/python/pants_test/contrib/android/tasks/__init__.py
12133432
dlux/sayHi_tempest_plugin
refs/heads/master
demo_tempest_plugin/tests/api/__init__.py
12133432
efe/lesib
refs/heads/master
twitter/migrations/__init__.py
12133432
zhuhong/MD-package
refs/heads/master
MDPackage/Coor/__init__.py
12133432
rohit21122012/DCASE2013
refs/heads/master
runs/2016/dnn2016med_traps/traps14/src/__init__.py
12133432
XTAv2/Enigma2
refs/heads/master
lib/python/Plugins/Extensions/ExtrasPanel/Extra/__init__.py
12133432
ataylor32/django
refs/heads/master
tests/middleware/__init__.py
12133432
thenenadx/forseti-security
refs/heads/master
tests/scanner/test_data/__init__.py
12133432
SergeyPod/tmpCore
refs/heads/master
core/pbm/__init__.py
12133432
damahou/sagewui
refs/heads/master
sagewui_kernels/sage/__init__.py
12133432
WafaaT/spark-tk
refs/heads/master
python/sparktk/graph/constructors/import_orientdb_graph.py
11
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
TFenby/python-mode
refs/heads/develop
pymode/libs3/rope/base/builtins.py
32
"""This module trys to support builtin types and functions.""" import inspect import rope.base.evaluate from rope.base import pynames, pyobjects, arguments, utils, ast class BuiltinModule(pyobjects.AbstractModule): def __init__(self, name, pycore=None, initial={}): super(BuiltinModule, self).__init__() ...
tbenthompson/tectosaur
refs/heads/master
tectosaur/util/sparse.py
1
import scipy.sparse import numpy as np from tectosaur.util.cpp import imp fast_sparse = imp("tectosaur.util.fast_sparse") def get_mv_fnc(base_name, dtype, blocksize): fnc_name = base_name + str(blocksize) if dtype == np.float32: return getattr(fast_sparse, 's' + fnc_name) else: return geta...
xorpaul/shinken
refs/heads/master
test/test_eventids.py
2
#!/usr/bin/env python # Copyright (C) 2009-2010: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the F...
jpiccari/kubernetes
refs/heads/master
cluster/juju/charms/trusty/kubernetes/hooks/kubernetes_installer.py
148
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
ghtmtt/QGIS
refs/heads/master
python/plugins/processing/tests/AlgorithmsTestBase.py
14
# -*- coding: utf-8 -*- """ *************************************************************************** AlgorithmsTest.py --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch ***************************...
quheng/scikit-learn
refs/heads/master
sklearn/utils/tests/test_optimize.py
239
import numpy as np from sklearn.utils.optimize import newton_cg from scipy.optimize import fmin_ncg from sklearn.utils.testing import assert_array_almost_equal def test_newton_cg(): # Test that newton_cg gives same result as scipy's fmin_ncg rng = np.random.RandomState(0) A = rng.normal(size=(10, 10)) ...
varantz/airflow
refs/heads/master
airflow/hooks/oracle_hook.py
25
import cx_Oracle from airflow.hooks.dbapi_hook import DbApiHook from builtins import str from past.builtins import basestring from datetime import datetime import numpy import logging class OracleHook(DbApiHook): """ Interact with Oracle SQL. """ conn_name_attr = 'oracle_conn_id' default_conn_name...
codestergit/firefox-ios
refs/heads/master
Client/Assets/scrape_plugins.py
48
#!/usr/local/bin/python from lxml import html import os import requests import shutil import urllib def main(): if not os.path.exists("SearchPlugins"): os.makedirs("SearchPlugins") locales = getLocaleList() for locale in locales: files = getFileList(locale) if files == None: ...
malikcjm/qemu
refs/heads/master
scripts/tracetool/backend/simple.py
97
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple built-in backend. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi"...
MOA-2011/enigma2.pli4.0
refs/heads/master
lib/python/Components/Converter/ChannelNumbers.py
11
from Components.NimManager import nimmanager class ChannelNumbers: def getChannelNumber(self, frequency, nim): f = self.getMHz(frequency) descr = self.getTunerDescription(nim) if "Europe" in descr: if "DVB-T" in descr: if 174 < f < 230: # III d = (f + 1) % 7 return str(int(f - 174)/7 + 5) +...
m-debnath/bat-python
refs/heads/master
string-1/extra_end.py
1
def extra_end(str): """Given a string, return a new string made of 3 copies of the last 2 chars of the original string. The string length will be at least 2.""" return str[len(str)-2:]*3
SaschaMester/delicium
refs/heads/master
tools/telemetry/telemetry/internal/browser/tab_list.py
36
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class TabList(object): def __init__(self, tab_list_backend): self._tab_list_backend = tab_list_backend def New(self, timeout=300): return self._t...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/scatter/hoverlabel/__init__.py
84
import sys if sys.version_info < (3, 7): from ._namelengthsrc import NamelengthsrcValidator from ._namelength import NamelengthValidator from ._font import FontValidator from ._bordercolorsrc import BordercolorsrcValidator from ._bordercolor import BordercolorValidator from ._bgcolorsrc import ...
DinoCow/airflow
refs/heads/master
airflow/providers/google/cloud/example_dags/example_sheets_to_gcs.py
10
# # 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...
ASCrookes/django
refs/heads/master
tests/gis_tests/admin.py
481
try: from django.contrib.gis import admin except ImportError: from django.contrib import admin admin.OSMGeoAdmin = admin.ModelAdmin
slightperturbation/Cobalt
refs/heads/master
ext/emsdk_portable/emscripten/tag-1.34.1/tools/js_optimizer.py
1
import os, sys, subprocess, multiprocessing, re, string, json, shutil, logging import shared configuration = shared.configuration temp_files = configuration.get_temp_files() __rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def path_from_root(*pathelems): return os.path.join(__rootpath__, ...
simone-campagna/zirkon
refs/heads/master
zirkon/validator/check_range.py
2
# -*- coding: utf-8 -*- # # Copyright 2013 Simone Campagna # # 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...
ynotstartups/Wanhao
refs/heads/master
plugins/XRayView/XRayView.py
4
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import os.path from UM.Application import Application from UM.Math.Color import Color from UM.PluginRegistry import PluginRegistry from UM.Event import Event from UM.View.View import View from UM.Scene.Iterator.BreadthFirs...
xtao/code
refs/heads/master
vilya/views/organizations/new.py
3
# -*- coding: utf-8 -*- from __future__ import absolute_import from vilya.libs.template import st _q_exports = [] def __call__(request): return _q_index(request) def _q_index(request): context = {} return st('organizations/new.html', **context)
westinedu/sovleit
refs/heads/master
django/contrib/gis/db/backends/postgis/__init__.py
12133432
jeezybrick/django
refs/heads/master
django/conf/locale/it/__init__.py
12133432
gangadhar-kadam/smrterp
refs/heads/develop
erpnext/contacts/__init__.py
12133432
geometalab/OSMTagFinder
refs/heads/master
OSMTagFinder/semnet/__init__.py
12133432