repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
thePortus/arakhne
refs/heads/master
build/lib/arakhne/get/__init__.py
1
from .. import core from .get_nltk import GetNLTK from .get_cltk import GetCLTK def Get(language): if core.languages.test_lang(language): if language == 'latin' or language == 'greek': return GetCLTK(language) if language == 'english': return GetNLTK(language)
ctgriffiths/twister
refs/heads/git_hub_branch
demo/test-statuses/init_fail.py
3
# # version: 2.001 # <title>init file</title> # <description>Test status</description> # # `USER`, `EP`, `SUITE_NAME` and `FILE_NAME` are magic variables, # injected inside all Twister tests. import os import sys import time print 'I am init file.' print 'I am not doing anything special, just printing some variable...
MuckRock/API-examples
refs/heads/master
export_standard_full.py
1
#!/usr/bin/env python2 # -- coding: utf-8 -- # Standard Library import datetime import json import os import time # Third Party import requests from simplejson.scanner import JSONDecodeError import utils url = utils.API_URL token = utils.get_api_key() headers = utils.get_headers(token) page = 599 next_ = url + 'fo...
sometallgit/AutoUploader
refs/heads/master
Python27/Tools/Scripts/texcheck.py
96
""" TeXcheck.py -- rough syntax checking on Python style LaTeX documents. Written by Raymond D. Hettinger <python at rcn.com> Copyright (c) 2003 Python Software Foundation. All rights reserved. Designed to catch common markup errors including: * Unbalanced or mismatched parenthesis, brackets, and braces. * Unb...
QuantumFractal/hackisu-2017-nucleus
refs/heads/master
conv-ae/dsview.py
1
from tkinter import * import numpy as np from PIL import Image, ImageTk from tkinter import filedialog import h5py import os img_arr = np.zeros((28,28,3), dtype=np.float32) img_arr[0,0,0] = 1 img_arr = img_arr * 255.0 img_arr = img_arr.astype(np.uint8) # img = Image.fromarray(img_arr, mode='RGB') # img =...
GehenHe/Recognize-Face-on-Android
refs/heads/master
tensorflow/contrib/learn/python/learn/dataframe/transforms/binary_transforms.py
61
# 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...
ahb0327/intellij-community
refs/heads/master
python/testData/quickFixes/PyAddExceptionSuperClassQuickFixTest/emptySuperList.py
80
class MyException: def __new__(cls, x): pass def foo(): raise <warning descr="Exception doesn't inherit from base 'Exception' class">My<caret>Exception()</warning>
Fireblend/chromium-crosswalk
refs/heads/master
tools/perf/profile_creators/large_profile_extender.py
18
# 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 profile_creators import cookie_profile_extender from profile_creators import history_profile_extender from profile_creators import profile_extender cla...
varunnaganathan/django
refs/heads/master
tests/extra_regress/models.py
281
from __future__ import unicode_literals import copy import datetime from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class RevisionableModel(models.Model): base = models.ForeignKey('self', models.S...
agry/NGECore2
refs/heads/master
scripts/object/tangible/loot/quest/schematic_dress_s08_quest.py
85615
import sys def setup(core, object): return
kapouer/mapnik
refs/heads/master
scons/scons-local-2.3.0/SCons/compat/_scons_dbm.py
11
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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, incl...
BrewCenter/BrewCenterAPI
refs/heads/master
brewcenter_api/brew_data/management/commands/updatedata.py
1
""" Run this script in Django's Manage.py like so: `python manage.py shell < ../scripts/data_loader` """ import os import sqlite3 as sql from django.conf import settings from django.core.management.base import BaseCommand from brew_data.models import CountryCode, FermentableType, Fermentable, FermentableInstance, HopT...
codermoji-contrib/python
refs/heads/master
start/Hello, World/print hello/test.py
5
import os os.listdir('.')
wavicles/pycode-browser
refs/heads/master
Code/PythonBook/chap2/compare.py
2
x = raw_input('Enter a string ') if x == 'hello': print 'You typed ', x
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/core/serializers/json.py
86
""" Serialize data to/from JSON """ # Avoid shadowing the standard library json module from __future__ import absolute_import, unicode_literals import datetime import decimal import json import sys from django.core.serializers.base import DeserializationError from django.core.serializers.python import ( Deserial...
okwow123/djangol2
refs/heads/master
example/env/lib/python2.7/site-packages/django/utils/inspect.py
323
from __future__ import absolute_import import inspect from django.utils import six def getargspec(func): if six.PY2: return inspect.getargspec(func) sig = inspect.signature(func) args = [ p.name for p in sig.parameters.values() if p.kind == inspect.Parameter.POSITIONAL_OR_KEYWOR...
burlog/py-static-callgraph
refs/heads/master
tests/decorators.py
2
# -*- coding: utf-8 -*- # # LICENCE MIT # # DESCRIPTION Test suite for variable assigns. # # AUTHOR Michal Bukovsky <michal.bukovsky@trilogic.cz> # import pytest, re from functools import wraps from callgraph.builder import CallGraphBuilder from tests.helpers import dfs_node_names def test_decorators_...
archen/django
refs/heads/master
tests/migrate_signals/models.py
576
# This module has to exist, otherwise pre/post_migrate aren't sent for the # migrate_signals application.
dsbrown/FreeCAD
refs/heads/master
src/Mod/Test/testPathArray.py
27
#!/usr/bin/env python # -*- coding: utf-8 -*- # tester for Draft makePathArray - shapes on a path - without subelements (see testPathArraySel.py) # Usage: in FC gui, select a "shape" document object (sphere, box, etc) (!!select in # tree, not document view!!), then a "wire" document object (Wire, Circle, Rectangle, #...
hasadna/django
refs/heads/master
django/core/management/commands/shell.py
110
import os from django.core.management.base import NoArgsCommand from optparse import make_option class Command(NoArgsCommand): shells = ['ipython', 'bpython'] option_list = NoArgsCommand.option_list + ( make_option('--plain', action='store_true', dest='plain', help='Tells Django to use pl...
Rediker-Software/pehg
refs/heads/master
tests/tests/authorization.py
1
from django.contrib.auth.models import Permission from django.http import HttpRequest from django.test import TestCase from pehg.authentication import DjangoAuthentication from pehg.authorization import DjangoAuthorization, NoAuthorization from pehg.resources import ModelResource from ..models import Apple cl...
mildass/tlsfuzzer
refs/heads/master
scripts/test-tls13-session-resumption.py
1
# Author: Hubert Kario, (c) 2018 # Released under Gnu GPL v2.0, see LICENSE file for details from __future__ import print_function import traceback import sys import getopt from itertools import chain, islice from tlslite.constants import CipherSuite, AlertLevel, AlertDescription, \ TLS_1_3_DRAFT, GroupName, ...
fangxingli/hue
refs/heads/master
desktop/core/ext-py/South-1.0.2/south/management/commands/schemamigration.py
94
""" Startmigration command, version 2. """ from __future__ import print_function import sys import os import re import string import random import inspect from optparse import make_option try: set except NameError: from sets import Set as set from django.core.management.base import BaseCommand from django.c...
justasabc/python_tutorials
refs/heads/master
tutorial/gui/pygtk2/control/1_label.py
1
#!/usr/bin/env python import gtk class Label: def __init__(self): window = gtk.Window() hbox = gtk.HBox(False, 10) vbox_left = gtk.VBox(False, 10) vbox_right = gtk.VBox(False, 10) hbox.pack_start(vbox_left) hbox.pack_start(vbox_right) ...
D4wN/brickv
refs/heads/master
src/brickv/plugin_system/plugins/red/program_info_delphi_compile.py
1
# -*- coding: utf-8 -*- """ RED Plugin Copyright (C) 2014-2015 Matthias Bolte <matthias@tinkerforge.com> program_info_delphi_compile.py: Program Delphi Compile Info Widget 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...
dex1on/pub
refs/heads/master
BuildPackages/example-light/tools/sublime/Packages/AAAPackageDev/tests/test_sublime_lib/test_view/test_view.py
18
import sys import os import mock import sublime import sublime_lib.view as su_lib_view def test_append(): view = mock.Mock() edit = object() view.begin_edit.return_value = edit view.size.return_value = 100 su_lib_view.append(view, "new text") assert view.insert.call_args =...
metiscus/pychess
refs/heads/master
lib/pychess/Utils/Offer.py
22
from pychess.Utils.const import ACTIONS class Offer: def __init__(self, type_, param=None, index=None): assert type_ in ACTIONS, "Offer.__init__(): type not in ACTIONS: %s" % repr(type_) assert index is None or isinstance(index, int), \ "Offer.__init__(): index not int: %s" % repr(index...
GitHublong/hue
refs/heads/master
desktop/core/ext-py/boto-2.38.0/boto/cognito/sync/__init__.py
128
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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 limitation the rights...
getninjas/adwords-client
refs/heads/master
adwords_client/adwords_api/operations/adgroup.py
1
from .utils import _build_new_bid_type, _build_new_bidding_strategy_configuration, _get_selector def adgroup_operation(campaign_id: 'Long' = None, adgroup_id: 'Long' = None, adgroup_name: 'String' = None, status: 'String' = None, ...
rwl/PyCIM
refs/heads/master
CIM14/IEC61970/Wires/PhaseVariationCurve.py
1
# Copyright (C) 2010-2011 Richard Lincoln # # 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 limitation the # rights to use, copy, modify, merge, publish...
hashworks/CouchPotatoServer
refs/heads/forkDev
couchpotato/core/media/movie/providers/userscript/criticker.py
81
from couchpotato.core.media._base.providers.userscript.base import UserscriptBase autoload = 'Criticker' class Criticker(UserscriptBase): includes = ['http://www.criticker.com/film/*']
kamalx/edx-platform
refs/heads/release
common/test/acceptance/pages/studio/import_export.py
4
""" Import/Export pages. """ from bok_choy.promise import EmptyPromise import os import re import requests from .utils import click_css from .library import LibraryPage from .course_page import CoursePage from . import BASE_URL class TemplateCheckMixin(object): """ Mixin for verifying that a template is loadi...
Samuel789/MediPi
refs/heads/master
MedManagementWeb/env/lib/python3.5/site-packages/django/contrib/humanize/__init__.py
808
default_app_config = 'django.contrib.humanize.apps.HumanizeConfig'
arobb/python-processrunner
refs/heads/master
tests/tests/writeout_test.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs import tempfile import unittest from processrunner import writeOut class ProcessRunnerWriteOutTestCase(unittest.TestCase): def test_processrunner_writeout_same_values(self): targetPipe = tempfile.TemporaryFile() targetP...
QianBIG/odoo
refs/heads/8.0
openerp/addons/base/tests/test_ir_sequence.py
200
# -*- coding: utf-8 -*- # Run with one of these commands: # > OPENERP_ADDONS_PATH='../../addons/trunk' OPENERP_PORT=8069 \ # OPENERP_DATABASE=yy PYTHONPATH=. python tests/test_ir_sequence.py # > OPENERP_ADDONS_PATH='../../addons/trunk' OPENERP_PORT=8069 \ # OPENERP_DATABASE=yy nosetests tests/test_ir_se...
szopu/django
refs/heads/master
tests/utils_tests/test_module/good_module.py
582
content = 'Good Module'
Fireblend/chromium-crosswalk
refs/heads/master
tools/telemetry/telemetry/user_story/user_story_set_unittest.py
5
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry.story import shared_state from telemetry import user_story from telemetry.user_story import user_story_set from tel...
DirkHoffmann/indico
refs/heads/master
indico/modules/events/models/persons.py
3
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from operator import attrgetter from sqlalchemy.event import listens_for from sqlalchemy.ext.declarative ...
baylee/django
refs/heads/master
django/apps/__init__.py
597
from .config import AppConfig from .registry import apps __all__ = ['AppConfig', 'apps']
ResolveWang/algrithm_qa
refs/heads/master
分类代表题目/深搜、广搜和回溯/饥饿的小易.py
1
""" 问题描述: 小易总是感觉饥饿,所以作为章鱼的小易经常出去寻找贝壳吃。最开始小易在一个初始位置x_0。 对于小易所处的当前位置x,他只能通过神秘的力量移动到 4 * x + 3或者8 * x + 7。因为使用神秘力 量要耗费太多体力,所以它只能使用神秘力量最多100,000次。贝壳总生长在能被1,000,000,007整除的 位置(比如:位置0,位置1,000,000,007,位置2,000,000,014等)。小易需要你帮忙计算最少需要使 用多少次神秘力量就能吃到贝壳。 输入描述: 输入一个初始位置x_0,范围在1到1,000,000,006 输出描述: 输出小易最少需要使用神秘力量的次数,如果使用次数使用完还没找到贝壳,...
Korkki/django
refs/heads/master
tests/template_tests/filter_tests/test_lower.py
388
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import lower from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class LowerTests(SimpleTestCase): @setup({'lower01': '{% autoescape off %}{{ a|lower }}...
Sweetgrassbuffalo/ReactionSweeGrass-v2
refs/heads/master
.meteor/local/dev_bundle/python/Lib/idlelib/IOBinding.py
2
# changes by dscherer@cmu.edu # - IOBinding.open() replaces the current window with the opened file, # if the current window is both unmodified and unnamed # - IOBinding.loadfile() interprets Windows, UNIX, and Macintosh # end-of-line conventions, instead of relying on the standard library, # which will...
rapidsms/rapidsms-legacy
refs/heads/master
lib/rapidsms/tests/test_manager.py
3
import unittest import os class TestSettings (object): # this class is used by TestManager to test import_local_settings(0 default = "default" overridden = "default" LANGUAGE_CODE = "en-us" LANGUAGES = ( range(0,45) ) class TestManager (unittest.TestCase): def setUp(self): # must ensur...
xinghai-sun/models
refs/heads/develop
deep_speech_2/data_utils/audio.py
1
"""Contains the audio segment class.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import io import soundfile import resampy from scipy import signal import random import copy class AudioSegment(object): """Monaural audio segmen...
Kallehz/Python
refs/heads/master
Verkefni 4/stevedore/tests/test_named.py
55
from stevedore import named from stevedore.tests import utils import mock class TestNamed(utils.TestCase): def test_named(self): em = named.NamedExtensionManager( 'stevedore.test.extension', names=['t1'], invoke_on_load=True, invoke_args=('a',), ...
elgambitero/FreeCAD_sf_master
refs/heads/master
src/Tools/updatecrowdin.py
10
#!/usr/bin/python #*************************************************************************** #* * #* Copyright (c) 2015 Yorik van Havre <yorik@uncreated.net> * #* ...
dydek/django
refs/heads/master
tests/auth_tests/test_tokens.py
297
import unittest from datetime import date, timedelta from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.test import TestCase from django.utils.six import PY3 class TokenGeneratorTest(TestCase): def test_make...
seksan2538/schedule-generator
refs/heads/master
xlwt/Workbook.py
18
# -*- coding: windows-1252 -*- ''' Record Order in BIFF8 Workbook Globals Substream BOF Type = workbook globals Interface Header MMS Interface End WRITEACCESS CODEPAGE DSF TABID FNGROUPCOUNT Workbook Protection Block WINDOWPROTECT PRO...
klim-iv/phantomjs-qt5
refs/heads/qt5
src/webkit/Source/ThirdParty/gtest/test/gtest_shuffle_test.py
3023
#!/usr/bin/env python # # Copyright 2009 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...
doismellburning/django
refs/heads/master
django/contrib/auth/tests/test_signals.py
23
from django.contrib.auth import signals from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase from django.test.client import RequestFactory from django.test import override_settings @skipIfCustomUser @override_settings(USE_TZ=False, ...
Intel-Corporation/tensorflow
refs/heads/master
tensorflow/python/keras/engine/training_gpu_test.py
5
# 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...
heke123/chromium-crosswalk
refs/heads/master
native_client_sdk/src/tools/run.py
51
#!/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. """Launch a local http server, then launch a executable directed at the server. This command creates a local server (on port 5103 ...
AKST/Data-mining
refs/heads/master
scripts/jsonify.py
1
import json """ Transforms csv abolone data into json abolone data """ # Sex { M, F, I} # Length real # Diameter real # Height real # Whole weight real # Shucked weight real # Viscera weight real # Shell weight real # Class_Rings integer def toAboloneDictionary( sex, length, diameter, height, wholeWei...
scalyr/scalyr-agent-2
refs/heads/master
tests/unit/builtin_monitors/iostat_tcollector_test.py
2
# Copyright 2019 Scalyr 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...
brev/nupic
refs/heads/master
src/nupic/regions/KNNAnomalyClassifierRegion.py
12
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, 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 progra...
ArteliaTelemac/PostTelemac
refs/heads/master
PostTelemac/meshlayerlibs/pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py
9
from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph as pg import numpy as np app = pg.mkQApp() app.processEvents() def test_scatterplotitem(): plot = pg.PlotWidget() # set view range equal to its bounding rect. # This causes plots to look the same regardless of pxMode. plot.setRange(rect=plot.bou...
openhumanoids/pronto
refs/heads/master
pronto-utils/python/convert_viewer_cloud_to_pcd.py
3
import csv import sys import numpy as np fname = sys.argv[1] ins = open(fname , "r" ) array = [] count=0 for line in ins: if (line[0:2] == "%%"): continue y = line.split(" ") q = [] for d in y: q.append(float(d)) dist_range = np.sqrt( pow( q[0]-q[3],2) + pow(q[1]-q[4],2) + pow(q[2]-q[5...
code-sauce/tensorflow
refs/heads/master
tensorflow/python/framework/errors_test.py
83
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
labsland/labmanager
refs/heads/master
labmanager/tests/test_admin_rlms.py
5
# -*-*- encoding: utf8 -*-*- from flask import session from labmanager.tests.util import G4lTestCase, BaseTestLogged from flask.ext.testing import TestCase from labmanager.models import Laboratory from labmanager.db import db from sqlalchemy.exc import StatementError PUBLIC_AVAILABILITY_MSG_ERROR = "Public identifie...
daspecster/google-cloud-python
refs/heads/master
logging/unit_tests/handlers/transports/test_base.py
2
# Copyright 2016 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, ...
jbassen/edx-platform
refs/heads/master
lms/djangoapps/notification_prefs/views.py
163
from base64 import urlsafe_b64encode, urlsafe_b64decode from hashlib import sha256 import json from Crypto.Cipher import AES from Crypto import Random from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied from django.http import Http404, HttpRe...
pdeesawat/PSIT58_test_01
refs/heads/master
Test_Python_code/last/02_Indonesia/total_affect_Indonesia.py
1
import plotly.plotly as py import plotly.graph_objs as go data = open('Real_Final_database_02.csv') alldata = data.readlines() listdata = [] for i in alldata: listdata.append(i.strip().split(',')) type_z = ['Flood', 'Epidemic', 'Drought', 'Earthquake', 'Storm'] size_fill = [15,20,25,30,35] fill_colors = ['#00d0f5'...
Vogeltak/pauselan
refs/heads/master
lib/python3.4/site-packages/migrate/tests/versioning/test_shell.py
46
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import tempfile import six from six.moves import cStringIO from sqlalchemy import MetaData, Table from migrate.exceptions import * from migrate.versioning.repository import Repository from migrate.versioning import genmodel, shell, api from migrate.t...
KOala888/android_kernel_htc_k2
refs/heads/ics
scripts/tracing/draw_functrace.py
14679
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call ...
txdev/nuage-gluon
refs/heads/master
gluon-shim.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2016, Nokia # 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...
sanjeevtripurari/hue
refs/heads/master
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/tests/test_templatetags.py
43
import six from django.test import TestCase from django_extensions.templatetags.widont import widont, widont_html class TemplateTagsTests(TestCase): def test_widont(self): widont('Test Value') widont(six.u('Test Value')) def test_widont_html(self): widont_html('Test Value') ...
dieface/erpnext
refs/heads/develop
erpnext/manufacturing/doctype/production_order_operation/production_order_operation.py
103
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class ProductionOrderOperation(Document): pass
zhanghenry/stocks
refs/heads/master
tests/get_object_or_404/models.py
409
""" DB-API Shortcuts ``get_object_or_404()`` is a shortcut function to be used in view functions for performing a ``get()`` lookup and raising a ``Http404`` exception if a ``DoesNotExist`` exception was raised during the ``get()`` call. ``get_list_or_404()`` is a shortcut function to be used in view functions for per...
FeLUX42/Laserharp
refs/heads/master
video-analyze/subtractFirstPicture.py
1
# getting started https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html import numpy as np import time import cv2 import scipy.misc import scipy.signal #cap = cv2.VideoCapture(0) # 0 for /dev/video0; 1 for /dev/video1; or a filename. #print("dimension", ...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/ship/components/engine/eng_rss_imperial_skyrunner_3.py
85615
import sys def setup(core, object): return
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/mobile/dressed_corsair_captain_hum_m.py
85615
import sys def setup(core, object): return
nhomar/odoo
refs/heads/8.0
addons/website_sale/__init__.py
3964
import controllers import models
jgoclawski/django
refs/heads/master
django/test/utils.py
14
import logging import re import sys import time import warnings from contextlib import contextmanager from functools import wraps from unittest import skipIf, skipUnless from xml.dom.minidom import Node, parseString from django.apps import apps from django.conf import UserSettingsHolder, settings from django.core impo...
eesatfan/vuplus-enigma2
refs/heads/vuplus_experimental
lib/python/Screens/Dish.py
15
from Screen import Screen from Components.BlinkingPixmap import BlinkingPixmapConditional from Components.Pixmap import Pixmap from Components.config import config from enigma import eDVBSatelliteEquipmentControl class Dish(Screen): def __init__(self, session): Screen.__init__(self, session) self["Dishpixmap"] ...
dvliman/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.2/django/contrib/auth/management/commands/changepassword.py
320
from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User import getpass class Command(BaseCommand): help = "Change a user's password for django.contrib.auth." requires_model_validation = False def _get_pass(self, prompt="Password: "): p = getpa...
deathping1994/sendmail-api
refs/heads/master
venv/lib/python2.7/site-packages/jinja2/nodes.py
342
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
nvmanh/android-resource-remover
refs/heads/master
setup.py
10
import os import sys from setuptools import setup, find_packages version = '0.1.5' def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() setup(name='android-resource-remover', version=version, description=('Android resource remover'), long_description='\n\n'.join...
hmoco/osf.io
refs/heads/develop
api_tests/preprints/views/test_preprint_list.py
2
from nose.tools import * # flake8: noqa from addons.github.models import GithubFile from framework.auth.core import Auth from api.base.settings.defaults import API_BASE from api_tests.preprints.filters.test_filters import PreprintsListFilteringMixin from api_tests.preprints.views.test_preprint_list_mixin import Prepr...
mrshelly/openerp71313
refs/heads/master
openerp/addons/base_import/__openerp__.py
22
{ 'name': 'Base import', 'description': """ New extensible file import for OpenERP ====================================== Re-implement openerp's file import system: * Server side, the previous system forces most of the logic into the client which duplicates the effort (between clients), makes the import s...
hvekriya/mojwmt
refs/heads/master
node_modules/grunt-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...
denis-pitul/django
refs/heads/master
django/contrib/auth/backends.py
468
from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission class ModelBackend(object): """ Authenticates against settings.AUTH_USER_MODEL. """ def authenticate(self, username=None, password=None, **kwargs): UserMod...
timpott/ICAD
refs/heads/master
node_modules/node-gyp/gyp/PRESUBMIT.py
1369
# 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. """Top-level presubmit script for GYP. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
dslomov/intellij-community
refs/heads/master
python/testData/joinLines/StringDifferentOneQuotes.py
83
a = <caret>(u'A single quote ' u"is never found in this literal")
indoorConstructionMan/Django
refs/heads/master
website_1/polls/urls.py
1
from django.conf.urls import url from . import views app_name = 'polls' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<pk>[0-9]+)/$', views.DetailView.as_view(), name='detail'), url(r'^(?P<pk>[0-9]+)/results/$', views.ResultsView.as_view(), name='results'), url(r'^(?P...
alialiev/dj-stripe
refs/heads/master
filters.py
4
from django import forms import django_filters from bootstrap_toolkit.widgets import BootstrapDateInput from .models import Invoice class DateRangeWidget(forms.MultiWidget): def __init__(self, widgets=None, *args, **kwargs): widgets = ( BootstrapDateInput(attrs={ 'class': 'form...
diofeher/django-nfa
refs/heads/master
build/lib/django/core/management/validation.py
3
import sys from django.core.management.color import color_style from django.utils.itercompat import is_iterable class ModelErrorCollection: def __init__(self, outfile=sys.stdout): self.errors = [] self.outfile = outfile self.style = color_style() def add(self, context, error): ...
nilbus/sublime-text-2-plugin
refs/heads/patch-1
floo/listener.py
1
import os import Queue import hashlib from datetime import datetime import sublime import sublime_plugin import dmp_monkey dmp_monkey.monkey_patch() from lib import diff_match_patch as dmp import msg import shared as G import utils MODIFIED_EVENTS = Queue.Queue() SELECTED_EVENTS = Queue.Queue() BUFS = {} settings =...
sgillies/Fiona
refs/heads/master
src/fiona/tool.py
1
""" fiona.tool Converts Shapefiles (etc) to GeoJSON. """ import argparse import fiona import json import logging import pprint import sys def open_output(arg): if arg == sys.stdout: return arg else: return open(arg, 'wb') def main(): """Returns 0 on success, 1 on error, for sys.exit.""" ...
DARKPOP/external_chromium_org
refs/heads/dark-5.1
tools/binary_size/explain_binary_size_delta_unittest.py
35
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Check that explain_binary_size_delta seems to work.""" import cStringIO import sys import unittest import explain_binary_size_delt...
yuyu2172/chainercv
refs/heads/master
chainercv/datasets/ade20k/ade20k_test_image_dataset.py
3
import glob import os from chainercv.chainer_experimental.datasets.sliceable import GetterDataset from chainercv.datasets.ade20k.ade20k_utils import get_ade20k from chainercv.utils import read_image root = 'pfnet/chainercv/ade20k' url = 'http://data.csail.mit.edu/places/ADEchallenge/release_test.zip' class ADE20KTe...
pekeler/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/third_party/python_26/Lib/email/test/test_email_codecs.py
140
# Copyright (C) 2002-2006 Python Software Foundation # Contact: email-sig@python.org # email package unit tests for (optional) Asian codecs import unittest from test.test_support import TestSkipped, run_unittest from email.test.test_email import TestEmailBase from email.Charset import Charset from email.Header import...
siddharthasandhu/INF550
refs/heads/master
SourceCode/vowpalwabbit/kaggle.py
1
__author__ = 'Siddhartha' import math def zygmoid(x): #I know it's a common Sigmoid feature, but that's why I probably found #it on FastML too: https://github.com/zygmuntz/kaggle-stackoverflow/blob/master/sigmoid_mc.py return 1 / (1 + math.exp(-x)) with open("/home/squirrel/Documents/INF 550 Dataset/model/submiss...
ftomassetti/intellij-community
refs/heads/master
python/helpers/pydev/pydevd_utils.py
18
import traceback try: from urllib import quote except: from urllib.parse import quote import os import pydevd_constants import sys import pydev_log def save_main_module(file, module_name): # patch provided by: Scott Schlesier - when script is run, it does not # use globals from pydevd: # This wil...
xingzhong/python-oauth2
refs/heads/master
oauth2/clients/imap.py
885
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 limitation the ...
zhsso/ubunto-one
refs/heads/master
dev-scripts/supervisor-config-dev.py
6
# Copyright 2008-2015 Canonical # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed...
openstack/designate
refs/heads/master
designate/tests/unit/producer/test_service.py
1
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Federico Ceratto <federico.ceratto@hpe.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.o...
npalermo10/auto_choice_assay_train-test
refs/heads/master
venv/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py
1005
#------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy ...
bbsan2k/nzbToMedia
refs/heads/nightly
libs/xdg/Mime.py
14
""" This module is based on a rox module (LGPL): http://cvs.sourceforge.net/viewcvs.py/rox/ROX-Lib2/python/rox/mime.py?rev=1.21&view=log This module provides access to the shared MIME database. types is a dictionary of all known MIME types, indexed by the type name, e.g. types['application/x-python'] Applications c...
xin3liang/platform_external_chromium_org
refs/heads/master
tools/telemetry/telemetry/core/platform/tracing_controller_backend.py
6
# 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 telemetry.core.platform import tracing_category_filter from telemetry.core.platform import tracing_options class TracingControllerBackend(object): d...
Gamebasis/3DGamebasisServer
refs/heads/master
GameData/blender-2.71-windows64/2.71/scripts/presets/cycles/integrator/direct_light.py
2
import bpy cycles = bpy.context.scene.cycles cycles.max_bounces = 8 cycles.min_bounces = 8 cycles.no_caustics = True cycles.diffuse_bounces = 0 cycles.glossy_bounces = 1 cycles.transmission_bounces = 2 cycles.transparent_min_bounces = 8 cycles.transparent_max_bounces = 8