repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
glaubitz/fs-uae-debian
refs/heads/master
launcher/OpenGL/raw/GL/ARB/fragment_program.py
9
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GL import _types as _cs # End users want this... from OpenGL.raw.GL._types import * from OpenGL.raw.GL import _errors from OpenGL.constant import Constant as _C import ctypes _...
benoitsteiner/tensorflow-xsmm
refs/heads/master
tensorflow/contrib/distributions/python/ops/vector_student_t.py
13
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
fbradyirl/home-assistant
refs/heads/dev
homeassistant/components/wirelesstag/sensor.py
7
"""Sensor support for Wireless Sensor Tags platform.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_MONITORED_CONDITIONS from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeas...
frodejohansen/codebrag
refs/heads/master
scripts/dist/lib/s3cmd-1.5.0-alpha1/S3/Progress.py
11
## Amazon S3 manager ## Author: Michal Ludvig <michal@logix.cz> ## http://www.logix.cz/michal ## License: GPL Version 2 import sys import datetime import time import Utils class Progress(object): _stdout = sys.stdout _last_display = 0 def __init__(self, labels, total_size): self._stdout =...
c4goldsw/shogun
refs/heads/develop
examples/undocumented/python_modular/regression_svrlight_modular.py
26
#!/usr/bin/env python ########################################################################### # svm light based support vector regression ########################################################################### from numpy import array from numpy.random import seed, rand from tools.load import LoadMatrix lm=LoadM...
Journey316/candidate-test
refs/heads/master
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
1789
# Copyright (c) 2014 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. """Xcode-ninja wrapper project file generator. This updates the data structures passed to the Xcode gyp generator to build with ninja instead. The Xcode project i...
Jgarcia-IAS/ReporsitorioVacioOdoo
refs/heads/master
openerp/addons/hr_recruitment/hr_recruitment.py
202
# -*- coding: utf-8 -*- ############################################################################## # # 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...
tima/ansible
refs/heads/devel
lib/ansible/modules/source_control/hg.py
70
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Yeukhon Wong <yeukhon@acm.org> # Copyright: (c) 2014, Nate Coraor <nate@bx.psu.edu> # 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...
SantosDevelopers/sborganicos
refs/heads/master
venv/lib/python3.5/site-packages/django/utils/text.py
46
from __future__ import unicode_literals import re import unicodedata from gzip import GzipFile from io import BytesIO from django.utils import six from django.utils.encoding import force_text from django.utils.functional import ( SimpleLazyObject, keep_lazy, keep_lazy_text, lazy, ) from django.utils.safestring im...
shivam1111/odoo
refs/heads/8.0
addons/edi/__init__.py
437
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
kbdick/RecycleTracker
refs/heads/gh-pages
recyclecollector/scrap/gdata-2.0.18/tests/gdata_tests/oauth/data_test.py
39
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'samuel.cyprian@gmail.com (Samuel Cyprian)' import unittest from gdata import oauth, test_config HTTP_METHOD_POST = 'POST' VERSION = '1.0' class OauthUtilsTest(unittest.TestCase): def test_build_authenticate_header(self): self.assertEqual(oauth.build_aut...
dex4er/django
refs/heads/1.6.x
django/contrib/gis/geos/prototypes/coordseq.py
624
from ctypes import c_double, c_int, c_uint, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, CS_PTR from django.contrib.gis.geos.prototypes.errcheck import last_arg_byref, GEOSException from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc ## Error-checking routines specific to coordinate seq...
lseyesl/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
116
# Copyright (c) 2010 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 ...
Bysmyyr/chromium-crosswalk
refs/heads/master
chrome/test/nacl_test_injection/buildbot_chrome_nacl_stage.py
39
#!/usr/bin/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. """Do all the steps required to build and test against nacl.""" import optparse import os.path import re import shutil import subproc...
thoughtpalette/thoughts.thoughtpalette.com
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/autumn.py
364
# -*- coding: utf-8 -*- """ pygments.styles.autumn ~~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.to...
korealerts1/sentry
refs/heads/master
src/sentry/plugins/sentry_mail/models.py
8
""" sentry.plugins.sentry_mail.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import sentry from django.conf import settings from django.core.urlresolvers impo...
minghuascode/pyj
refs/heads/master
pyjd/pywebkitgtknew.py
7
#!/usr/bin/env python # Copyright (C) 2006, Red Hat, Inc. # Copyright (C) 2007, One Laptop Per Child # Copyright (C) 2007 Jan Alonzo <jmalonzo@unpluggable.com> # Copyright (C) 2008, 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # # This program is free software; you can redistribute it and/or modify # it under the ...
nathania/pysal
refs/heads/master
pysal/cg/tests/test_locators.py
20
"""locators Unittest.""" from pysal.cg import * import unittest class PolygonLocator_Tester(unittest.TestCase): """setup class for unit tests.""" def setUp(self): p1 = Polygon([Point((0, 1)), Point((4, 5)), Point((5, 1))]) p2 = Polygon([Point((3, 9)), Point((6, 7)), Point((1, 1))]) p3...
paplorinc/intellij-community
refs/heads/master
python/testData/refactoring/makeFunctionTopLevel/methodMoveToOtherFile/after/main.py
31
class C: def __init__(self): self.foo = 42 C().main('spam')
idem2lyon/persomov
refs/heads/master
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/criterion.py
138
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor class CriterionIE(InfoExtractor): _VALID_URL = r'https?://www\.criterion\.com/films/(?P<id>[0-9]+)-.+' _TEST = { 'url': 'http://www.criterion.com/films/184-le-samourai', 'md5': 'bc51be...
PeterWangIntel/chromium-crosswalk
refs/heads/master
tools/perf/measurements/page_cycler_unittest.py
5
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest from telemetry.core import browser_options from telemetry.internal import story_runner from telemetry.results import page_test_re...
signed/intellij-community
refs/heads/master
python/testData/inspections/PyMethodOverridingInspection/RequiredParameterAndKwargs.py
74
class B: def foo(self): pass class C(B): def foo<warning descr="Signature of method 'C.foo()' does not match signature of base method in class 'B'">(self, p1, **kwargs)</warning>: #fail pass
aequitas/home-assistant
refs/heads/dev
homeassistant/components/deluge/switch.py
7
"""Support for setting the Deluge BitTorrent client in Pause.""" import logging import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA from homeassistant.exceptions import PlatformNotReady from homeassistant.const import ( CONF_HOST, CONF_NAME, CONF_PORT, CONF_PASSWORD, CONF_USERNAME...
bottompawn/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/setuptools/command/install_egg_info.py
357
from setuptools import Command from setuptools.archive_util import unpack_archive from distutils import log, dir_util import os, shutil, pkg_resources class install_egg_info(Command): """Install an .egg-info directory for the package""" description = "Install an .egg-info directory for the package" user_...
llhe/tensorflow
refs/heads/master
tensorflow/contrib/slim/nets.py
191
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
willingc/vms
refs/heads/develop
vms/shift/utils.py
1
from event.models import Event from job.models import Job from administrator.models import Administrator from django.contrib.auth.models import User from shift.models import Shift, VolunteerShift from volunteer.models import Volunteer from organization.models import Organization from cities_light.models import Country ...
babbage/zulip
refs/heads/master
zilencer/migrations/0001_initial.py
126
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0001_initial'), ] operations = [ migrations.CreateModel( name='Deployment', fields=[ ...
nsabharwal/HiBench
refs/heads/master
src/sparkbench/src/main/python/sort.py
16
# # 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...
saadbinakhlaq/django-oscar
refs/heads/master
oscar/core/logging/handlers.py
47
from logging import FileHandler as BaseFileHandler import os class EnvFileHandler(BaseFileHandler): """ Custom filehandler that uses the LOG_ROOT setting to determine the folder to store log files in. We have to do some tricky stuff to avoid circular imports. To this end, we pass /dev/null to th...
varunnaganathan/django
refs/heads/master
django/db/backends/oracle/operations.py
11
from __future__ import unicode_literals import datetime import re import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.db.backends.utils import truncate_name from django.utils import six, timezone from django.utils.encoding import force_bytes, ...
Alwnikrotikz/video-tester
refs/heads/master
test/test-pkl2csv.py
4
# coding=UTF8 ## This file is part of VideoTester ## See http://video-tester.googlecode.com for more information ## Copyright 2011 Iñaki Úcar <i.ucar86@gmail.com> ## This program is published under a GPLv3 license # Description: convert .pkl files to .csv from <dir> (and all subdirs) import os, fnmatch, sys, pickle, ...
ville-k/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/__init__.py
136
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
ksmaheshkumar/grr
refs/heads/master
lib/email_alerts.py
4
#!/usr/bin/env python """A simple wrapper to send email alerts.""" from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import re import smtplib import socket from grr.lib import config_lib from grr.lib import rdfvalue f...
gangadhar-kadam/verve_frappe
refs/heads/v5.0
frappe/core/page/data_import_tool/data_import_tool.py
4
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json, os from frappe import _ import frappe.modules.import_file @frappe.whitelist() def get_data_keys(): return frappe._dict({ "data_separator": _('St...
laosiaudi/tensorflow
refs/heads/master
tensorflow/tensorboard/backend/process_graph.py
95
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
hynnet/openwrt-mt7620
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/cmd.py
32
"""A generic class to build line-oriented command interpreters. Interpreters constructed with this class obey the following conventions: 1. End of file on input is processed as the command 'EOF'. 2. A command is parsed out of each line by collecting the prefix composed of characters in the identchars member. 3. A ...
PetePriority/home-assistant
refs/heads/dev
homeassistant/components/http/real_ip.py
2
"""Middleware to fetch real IP.""" from ipaddress import ip_address from aiohttp.web import middleware from aiohttp.hdrs import X_FORWARDED_FOR from homeassistant.core import callback from .const import KEY_REAL_IP @callback def setup_real_ip(app, use_x_forwarded_for, trusted_proxies): """Create IP Ban middle...
Beercow/viper
refs/heads/master
viper/modules/pymacho/MachOSection.py
6
# encoding: utf-8 """ Copyright 2013 Jérémie BOUTOILLE This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distri...
GameTheory-/android_kernel_lge_f6mt
refs/heads/master
tools/perf/scripts/python/syscall-counts.py
11181
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
GitAngel/django
refs/heads/master
django/core/files/images.py
429
""" Utility functions for handling images. Requires Pillow as you might imagine. """ import struct import zlib from django.core.files import File class ImageFile(File): """ A mixin for use alongside django.core.files.base.File, which provides additional features for dealing with images. """ def ...
oikarinen/plugin.audio.spotlight
refs/heads/master
spotlight/service/util/__init__.py
2
# # Copyright (c) Dariusz Biskup # # This file is part of Spotlight # # Spotlight 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 ve...
Arcanemagus/SickRage
refs/heads/master
lib/hachoir_core/memory.py
177
import gc #---- Default implementation when resource is missing ---------------------- PAGE_SIZE = 4096 def getMemoryLimit(): """ Get current memory limit in bytes. Return None on error. """ return None def setMemoryLimit(max_mem): """ Set memory limit in bytes. Use value 'None' to d...
saurabh6790/alert-med-app
refs/heads/master
selling/report/quotation_trends/quotation_trends.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from controllers.trends import get_columns, get_data def execute(filters=None): if not filters: filters ={} data = [] conditions ...
chimeno/wagtail
refs/heads/master
wagtail/wagtaildocs/models.py
6
import os.path from taggit.managers import TaggableManager from django.db import models from django.db.models.signals import pre_delete from django.dispatch.dispatcher import receiver from django.dispatch import Signal from django.core.urlresolvers import reverse from django.conf import settings from django.utils.tra...
dejay313/dojostreams
refs/heads/master
plugin.video.youtube/resources/lib/kodion/__init__.py
23
__all__ = ['KodionException', 'RegisterProviderPath', 'AbstractProvider', 'Context'] __version__ = '1.5.4' # import base exception of kodion directly into the kodion namespace from .exceptions import KodionException # decorator for registering paths for navigating of a provider from .register_provider_path import Re...
ArthurGarnier/SickRage
refs/heads/master
lib/imdb/parser/http/searchCharacterParser.py
76
""" parser.http.searchCharacterParser module (imdb package). This module provides the HTMLSearchCharacterParser class (and the search_character_parser instance), used to parse the results of a search for a given character. E.g., when searching for the name "Jesse James", the parsed page would be: http://akas.imdb....
mlperf/training_results_v0.7
refs/heads/master
Google/benchmarks/resnet/implementations/resnet-cloud-TF2.0-tpu-v3-32/tf2_common/utils/flags/_conventions.py
2
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
zhaoqz/wechatpy
refs/heads/master
wechatpy/client/api/merchant/order.py
4
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from optionaldict import optionaldict from wechatpy.client.api.base import BaseWeChatAPI class MerchantOrder(BaseWeChatAPI): API_BASE_URL = 'https://api.weixin.qq.com/' def get(self, order_id): res = self._post( ...
liushu2000/django-crispy-formwizard
refs/heads/master
contact/forms.py
1
__author__ = 'shu' from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions class ContactForm1(forms.Form): name = forms.CharField(max_length=20, h...
edensparkles/FIRSTAID
refs/heads/master
FIRST_AID/venv/Lib/encodings/uu_codec.py
101
"""Python 'uu_codec' Codec - UU content transfer encoding. This codec de/encodes from bytes to bytes. Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were adapted from uu.py which was written by Lance Ellinghouse and modified by Jack Jansen and Fredrik Lundh. """ import codecs import binascii from io i...
pbokoc/pykickstart
refs/heads/master
tests/commands/liveimg.py
3
# # Martin Gracik <mgracik@redhat.com> # # Copyright 2009 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be use...
spcui/autotest
refs/heads/master
server/hosts/remote_unittest.py
6
#!/usr/bin/python import unittest try: import autotest.common as common except ImportError: import common from autotest.server.hosts import remote class test_remote_host(unittest.TestCase): def test_has_hostname(self): host = remote.RemoteHost("myhost") self.assertEqual(host.hostname, "m...
wbhuber/local_swift_branch
refs/heads/master
swift/common/middleware/container_quotas.py
39
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
uberamd/NGECore2
refs/heads/master
scripts/object/building/poi/tatooine_evil_nomad_large1.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/loot/creature_loot/collections/bondar_shard_04.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/draft_schematic/dance_prop/prop_ribbon_magic_r.py
85615
import sys def setup(core, object): return
rocopartners/django-oscar
refs/heads/master
src/oscar/apps/search/views.py
33
from oscar.core.loading import get_model, get_class from haystack import views from . import signals Product = get_model('catalogue', 'Product') FacetMunger = get_class('search.facets', 'FacetMunger') class FacetedSearchView(views.FacetedSearchView): """ A modified version of Haystack's FacetedSearchView ...
erinspace/osf.io
refs/heads/develop
addons/wiki/migrations/0003_auto_20170403_2228.py
28
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-04-04 03:28 from __future__ import unicode_literals from django.db import migrations import osf.utils.fields class Migration(migrations.Migration): dependencies = [ ('addons_wiki', '0002_auto_20170323_1534'), ] operations = [ mig...
dmsimard/ansible
refs/heads/devel
lib/ansible/module_utils/facts/virtual/freebsd.py
33
# 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 distributed in the hope that ...
debrief/debrief
refs/heads/develop
contribs/docbook-xsl-1.76.1/extensions/xslt.py
65
#!/usr/bin/python -u # $Id: xslt.py 8353 2009-03-17 16:57:50Z mzjn $ import sys import libxml2 import libxslt from docbook import adjustColumnWidths # Check the arguments usage = "Usage: %s xmlfile.xml xslfile.xsl [outputfile] [param1=val [param2=val]...]" % sys.argv[0] xmlfile = None xslfile = None outfile = "-" pa...
gorjuce/odoo
refs/heads/8.0
openerp/addons/base/module/__init__.py
462
# -*- coding: utf-8 -*- ############################################################################## # # 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...
LaMi-/pmatic
refs/heads/master
examples/lowlevel_api/list_shutter_contact_states.py
2
#!/usr/bin/env python # encoding: utf-8 # # pmatic - Python API for Homematic. Easy to use. # Copyright (C) 2016 Lars Michelsen <lm@larsmichelsen.com> # # 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 Found...
syseleven/vim-config
refs/heads/master
.vim/bundle/jedi-vim/jedi/test/test_evaluate/test_absolute_import.py
11
""" Tests ``from __future__ import absolute_import`` (only important for Python 2.X) """ import jedi from jedi._compatibility import u from jedi.parser import Parser from .. import helpers def test_explicit_absolute_imports(): """ Detect modules with ``from __future__ import absolute_import``. """ par...
shahbazn/neutron
refs/heads/master
neutron/tests/unit/plugins/ml2/test_port_binding.py
34
# Copyright (c) 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 ...
pigeonflight/strider-plone
refs/heads/master
docker/appengine/lib/django-1.2/tests/regressiontests/utils/urls.py
82
from django.conf.urls.defaults import * import views urlpatterns = patterns('', (r'^xview/$', views.xview), (r'^class_xview/$', views.class_xview), )
CarolinaSGomes/jaikuengine
refs/heads/master
common/__init__.py
1073
# Copyright 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 or agreed to in writing, ...
agry/NGECore2
refs/heads/master
scripts/object/tangible/space/content_infrastructure/basic_corridor_point.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/draft_schematic/chemistry/medpack_disease_area_action_b.py
85615
import sys def setup(core, object): return
mmcco/bioinformatics
refs/heads/master
scripts/format-SAM-reads.py
1
# Takes paths of Mason read simulator output files are formats them for easier reading. import sys, os if len(sys.argv) < 2: print "must supply path(s) of file(s) to be processed" os.Exit(1) for filepath in sys.argv[1:]: with open(filepath, "r") as infile, open(filepath + ".proc", "w") as outfile: ...
rogerscristo/BotFWD
refs/heads/master
env/lib/python3.6/site-packages/telegram/inline/inlinekeyboardbutton.py
1
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as publish...
agdsn/pycroft
refs/heads/develop
pycroft/model/alembic/versions/cd588620e7d0_add_bankaccount_used_for_usersheets_to_.py
2
"""add BankAccount used for usersheets to config Revision ID: cd588620e7d0 Revises: a32def81e36a Create Date: 2018-09-10 21:54:26.977248 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table import pycroft # revision identifiers, used by Alembic. revision = 'cd588620e7d0' down_revision...
charlon/mdot
refs/heads/master
mdot/test/client_get_resources.py
2
from django.test import TestCase, override_settings from mdot.mdot_rest_client.client import MDOT import json DAO = 'Mock' @override_settings(RESTCLIENTS_MDOT_DAO_CLASS=DAO) class MdotClientRequestTest(TestCase): def setUp(self): pass def test_get_all_resources(self): """ Tests gett...
ryanobjc/hadoop-cloudera
refs/heads/master
src/contrib/hod/hodlib/ServiceRegistry/__init__.py
1638
#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 use thi...
Arundhatii/erpnext
refs/heads/develop
erpnext/patches/v7_0/set_base_amount_in_invoice_payment_table.py
52
from __future__ import unicode_literals import frappe from frappe.utils import flt def execute(): si_list = frappe.db.sql(""" select distinct parent from `tabSales Invoice Payment` where docstatus!=2 and parenttype = 'Sales Invoice' and amount != 0 and base_amount = 0 """) count = 0 for d in si_list: si...
muffinresearch/addons-server
refs/heads/master
apps/stats/models.py
13
import datetime from django.conf import settings from django.db import models from django.utils import translation import bleach import caching.base import tower from babel import Locale, numbers from jinja2.filters import do_dictsort from tower import ugettext as _ import amo from amo.models import SearchMixin from...
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/lib/django-1.4/django/conf/locale/es_NI/formats.py
99
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' YEAR_MONTH_FORMAT = r'F \d\e Y' MONTH_DAY_FORMAT = r'j \d\e F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT...
jagguli/intellij-community
refs/heads/master
python/testData/intentions/beforeAddMissingVarargsInGoogleDocString.py
53
def <caret>f(x, *args, **kwargs): """ Args: x: foo """
ingokegel/intellij-community
refs/heads/master
python/testData/intentions/PyInvertIfConditionIntentionTest/commentsNoElseReturnIfNoFollowup.py
10
def func(): value = "not-none" # Is none <caret>if value is None: print("None") return
rbrtslmn/django-python3-ldap
refs/heads/master
django_python3_ldap/conf.py
1
""" Settings used by django-python3. """ from django.conf import settings from django_python3_ldap.utils import clean_user_data, sync_user_relations class LazySetting(object): """ A proxy to a named Django setting. """ def __init__(self, name, default=None): self.name = name self.d...
scherroman/mugen
refs/heads/master
mugen/video/sources/ImageSource.py
1
from mugen.video.segments.ImageSegment import ImageSegment from mugen.video.sources.Source import Source class ImageSource(Source): """ An image source for sampling image segments """ def __init__(self, file: str, **kwargs): super().__init__(**kwargs) self.segment = ImageSegment(file)...
tectronics/pysal
refs/heads/master
pysal/core/IOHandlers/pyDbfIO.py
13
import pysal.core.Tables import datetime import struct import itertools from warnings import warn import pysal __author__ = "Charles R Schmidt <schmidtc@gmail.com>" __all__ = ['DBF'] class DBF(pysal.core.Tables.DataTable): """ PySAL DBF Reader/Writer This DBF handler implements the PySAL DataTable inter...
sightmachine/SimpleCV2
refs/heads/master
SimpleCV/Features/HaarLikeFeatureExtractor.py
13
from SimpleCV.base import * from SimpleCV.ImageClass import Image from SimpleCV.Features.HaarLikeFeature import * from SimpleCV.Features.FeatureExtractorBase import * class HaarLikeFeatureExtractor(FeatureExtractorBase): """ This is used generate Haar like features from an image. These Haar like features ...
BMJHayward/django
refs/heads/master
tests/cache/models.py
513
from django.db import models from django.utils import timezone def expensive_calculation(): expensive_calculation.num_runs += 1 return timezone.now() class Poll(models.Model): question = models.CharField(max_length=200) answer = models.CharField(max_length=200) pub_date = models.DateTimeField('d...
GoogleCloudPlatform/keras-idiomatic-programmer
refs/heads/master
zoo/resnet/resnet_cifar10_v2_c.py
1
# Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
opsdisk/pyrax
refs/heads/master
samples/images/export_task.py
13
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c)2014 Rackspace US, 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.ap...
rbaumg/trac
refs/heads/trunk
trac/ticket/tests/default_workflow.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2019 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
yuancheng2013/pythran-replay
refs/heads/master
benchmark/nqueens.py
21
#runas n_queens(6) #pythran export n_queens(int) # Pure-Python implementation of itertools.permutations(). def permutations(iterable, r=None): """permutations(range(3), 2) --> (0,1) (0,2) (1,0) (1,2) (2,0) (2,1)""" pool = tuple(iterable) n = len(pool) if r is None: r = n indices = range(n) ...
treejames/ios-background-downloader
refs/heads/master
iOSDownloaderSrc/hooks/uninstall.py
365
#!/usr/bin/env python # # This is the module uninstall hook that will be # called when your module is uninstalled # import os, sys def main(args,argc): # TODO: write your uninstall hook here (optional) # exit sys.exit(0) if __name__ == '__main__': main(sys.argv,len(sys.argv))
v-iam/azure-sdk-for-python
refs/heads/master
azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/event_fragment.py
2
# 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 ...
Alshain-Oy/Hawthorn
refs/heads/master
libHawthornQuery.py
1
#!/usr/bin/env python import libHawthorn as Haw import threading commands = [ 'select-graph', 'create-graph', 'create-node', 'connect-nodes', 'disconnect-nodes', 'get-node', 'get-results', 'add-property', 'get-property', 'is-connected', 'find-shortest-path', 'find-longest-path', 'find-nearest-nodes', 'compute-pat...
massfords/we99
refs/heads/master
we99-web/src/main/resources/curveFitting.py
3
__author__ = 'orchie' import sys import json import logging import numpy as np from lmfit import minimize, Parameters from lmfit import Model def parsePoint(point): if point['y'] and point['x']: return point class Point: def __init__(self,xvalue,yvalue,sequence=0): self.sequenceNumber=sequen...
etuna-SBF-kog/Stadsparken
refs/heads/master
env/lib/python2.7/site-packages/django/contrib/sessions/tests.py
73
from __future__ import with_statement from datetime import datetime, timedelta import shutil import string import tempfile import warnings from django.conf import settings from django.contrib.sessions.backends.db import SessionStore as DatabaseSession from django.contrib.sessions.backends.cache import SessionStore as...
Danish15/RamenBowlBlog
refs/heads/master
app/__init__.py
1
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from config import config from flask.ext.login import LoginManager bootstrap = Bootstrap() mail = Mail() moment = Moment() db = SQLAlchemy() ...
haveal/googleads-dfa-reporting-samples
refs/heads/master
python/v1.3/get_all_report_files.py
3
#!/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...
google/pymql
refs/heads/main
test/mids_test.py
1
#!/usr/bin/python2.4 # Copyright 2020 Google 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 a...
trenton3983/Data_Science_from_Scratch
refs/heads/master
code-python3/statistics.py
15
from collections import Counter from linear_algebra import sum_of_squares, dot import math num_friends = [100,49,41,40,25,21,21,19,19,18,18,16,15,15,15,15,14,14,13,13,13,13,12,12,11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,...
darktears/chromium-crosswalk
refs/heads/master
tools/chrome_proxy/common/chrome_proxy_benchmark.py
43
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from common import chrome_proxy_measurements as measurements from telemetry import benchmark class ChromeProxyBenchmark(benchmark.Benchmark): @classmetho...
Venturi/cms
refs/heads/master
env/lib/python2.7/site-packages/django/template/loader.py
36
import warnings from django.utils.deprecation import RemovedInDjango110Warning from . import engines from .backends.django import DjangoTemplates from .base import Origin, TemplateDoesNotExist from .engine import ( _context_instance_undefined, _dictionary_undefined, _dirs_undefined, ) from .loaders import base ...
bringingheavendown/numpy
refs/heads/master
numpy/random/setup.py
68
from __future__ import division, print_function from os.path import join, split, dirname import os import sys from distutils.dep_util import newer from distutils.msvccompiler import get_build_version as get_msvc_build_version def needs_mingw_ftime_workaround(): # We need the mingw workaround for _ftime if the msv...
cstipkovic/spidermonkey-research
refs/heads/master
build/submit_telemetry_data.py
2
# 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 errno import logging import os import sys import time HERE = os.path.abspath(os.path.dirname(__file__)) sys.path...