repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
AlmostBetterNetwork/podmaster-host
refs/heads/master
podcasts/migrations/0048_auto_20180501_0154.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-01 01:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('podcasts', '0047_auto_20180417_0301'), ] operations = [ migrations.AlterField...
retomerz/intellij-community
refs/heads/master
python/testData/refactoring/extractsuperclass/moveExtendsCheckReference/source_module.py
80
from shared_module import TheParentOfItAll class MyClass(TheParentOfItAll): pass
Cynary/soar
refs/heads/master
test.py
1
import soar.brain.brain as brain import soar.gui.robot_model as model import soar.pioneer.geometry as geom from soar.gui.robot import transform import soar.gui.robot_model as model from math import * import time def get_dright_angle(r): s5,s6,s7 = r.getSonars()[5:8] i = 6 if s5 is not None: s6 = s5...
swdream/neutron
refs/heads/master
neutron/cmd/eventlet/agents/metadata.py
61
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
hdinsight/hue
refs/heads/master
desktop/core/ext-py/python-ldap-2.3.13/Tests/Lib/ldap/test_modlist.py
40
""" Tests for module ldap.modlist """ import ldap from ldap.modlist import addModlist,modifyModlist print '\nTesting function addModlist():' addModlist_tests = [ ( { 'objectClass':['person','pilotPerson'], 'cn':['Michael Str\303\266der','Michael Stroeder'], 'sn':['Str\303\266der'], 'd...
susansalkeld/discsongs
refs/heads/master
discsongs/lib/python2.7/site-packages/flask/ext/__init__.py
853
# -*- coding: utf-8 -*- """ flask.ext ~~~~~~~~~ Redirect imports for extensions. This module basically makes it possible for us to transition from flaskext.foo to flask_foo without having to force all extensions to upgrade at the same time. When a user does ``from flask.ext.foo import bar`` i...
dricciardelli/vae2vec
refs/heads/master
capt_gen_e2e_cs.py
1
# -*- coding: utf-8 -*- import math import os import tensorflow as tf import numpy as np import pandas as pd import pickle import pickle as pkl import cv2 import skimage import tensorflow.python.platform from tensorflow.python.ops import rnn from keras.preprocessing import sequence from collections import Counter from...
tugluck/galah
refs/heads/v0.2dev
galah/base/pretty.py
2
# Copyright 2012-2013 John Sullivan # Copyright 2012-2013 Other contributers as noted in the CONTRIBUTERS file # # This file is part of Galah. # # Galah 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, e...
rienafairefr/nYNABapi
refs/heads/master
test_live/get_webapp_code.py
2
import os import re from lxml import html import requests import jsbeautifier response = requests.get('http://app.youneedabudget.com') with open('index.html', 'w', encoding='utf-8') as file_before: file_before.write(response.text) parsed = html.fromstring(response.text) for src in parsed.xpath('//script/@src'): ...
pkoutsias/SickRage
refs/heads/master
lib/tornado/test/iostream_test.py
36
from __future__ import absolute_import, division, print_function, with_statement from tornado.concurrent import Future from tornado import gen from tornado import netutil from tornado.iostream import IOStream, SSLIOStream, PipeIOStream, StreamClosedError from tornado.httputil import HTTPHeaders from tornado.log import ...
zero-ui/miniblink49
refs/heads/master
third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
11
# Copyright (C) 2012 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
gleniooliveira/simplemooc
refs/heads/master
bin/player.py
1
#!/home/develop/Projeto/venv/bin/python3.5 # # The Python Imaging Library # $Id$ # from __future__ import print_function try: from tkinter import * except ImportError: from Tkinter import * from PIL import Image, ImageTk import sys # -------------------------------------------------------------------- # an...
JocelynDelalande/xhtml2pdf
refs/heads/master
demo/tgpisa/tgpisa/config/__init__.py
12133432
stanlee321/pysolper
refs/heads/master
permit/lib/dist/jinja2/_markupsafe/_constants.py
1535
# -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ Highlevel implementation of the Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ HTML_ENTITIES = { 'AElig': 198, 'Aacute': 193, 'Acirc': 194, 'Agrave': 1...
RDCEP/EDE
refs/heads/master
ede/crawler/crawler/items.py
5
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class CrawlerItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
JamesJeffryes/MINE-Database
refs/heads/master
Scripts/generate_metanetx_database.py
1
"""A script to generate a metanetx database. The purpose of the metanetx database is to provide mapping from InChI keys to a number of database identifiers. This database will then populate the website if there is an inchi match. Running this script requires downloading the following from https://www.metanetx.org/mnx...
xiangel/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/conf/locale/sr_Latn/formats.py
235
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y.' TIME_FORMAT = 'H:i' DATE...
andrewmoses/ssquiz
refs/heads/master
flask/lib/python2.7/locale.py
13
""" Locale support. The module provides low-level access to the C lib's locale APIs and adds high level number formatting APIs as well as a locale aliasing engine to complement these. The aliasing engine includes support for many commonly used locale names and maps them to values suitable for pass...
hoangcuongflp/enjarify
refs/heads/master
enjarify/jvm/scalartypes.py
35
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
niteoweb/libcloud
refs/heads/niteoweb_internal_release
docs/examples/compute/cloudstack/deploy_node_with_keypair_security_group.py
63
from pprint import pprint from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver # Import the deployment specific modules from libcloud.compute.deployment import ScriptDeployment from libcloud.compute.deployment import MultiStepDeployment cls = get_driver(Provider.EXOSCALE) dri...
CEG-FYP-OpenStack/scheduler
refs/heads/master
nova/tests/functional/api_sample_tests/test_instance_actions.py
8
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
junalmeida/Sick-Beard
refs/heads/master
lib/guessit/transfo/guess_episodes_rexps.py
10
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
Frouk/zulip
refs/heads/master
zerver/templatetags/app_filters.py
126
from django.template import Library register = Library() def and_n_others(values, limit): # A helper for the commonly appended "and N other(s)" string, with # the appropriate pluralization. return " and %d other%s" % (len(values) - limit, "" if len(values) == limit + 1 else...
kennethjiang/heroku-buildpack-python-libffi
refs/heads/master
test/django-1.5-skeleton/haystack/wsgi.py
45
""" WSGI config for haystack project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
exploreodoo/datStruct
refs/heads/master
odoo/addons/account_cancel/models/__init__.py
243
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import account_bank_statement
apaleyes/mxnet
refs/heads/master
tests/python/unittest/test_multi_device_exec.py
15
import os import mxnet as mx def test_ctx_group(): with mx.AttrScope(ctx_group='stage1'): data = mx.symbol.Variable('data') fc1 = mx.symbol.FullyConnected(data = data, name='fc1', num_hidden=128) act1 = mx.symbol.Activation(data = fc1, name='relu1', act_type="relu") set_stage1 = set(a...
OpenNetworkingFoundation/ONFOpenTransport
refs/heads/develop
RI/flask_server/tapi_server/models/tapi_odu_owned_node_edge_point_augmentation1.py
4
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_odu_odu_node_edge_point_spec import TapiOduOduNodeEdgePointSpec # noqa: F401,E501 from ta...
hfp/tensorflow-xsmm
refs/heads/master
tensorflow/contrib/seq2seq/python/ops/helper.py
36
# 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...
ikoveshnikov/tempesta
refs/heads/master
tempesta_fw/t/functional/testers/stress.py
1
from __future__ import print_function import unittest from helpers import tf_cfg, control, tempesta, stateful __author__ = 'Tempesta Technologies, Inc.' __copyright__ = 'Copyright (C) 2017-2018 Tempesta Technologies, Inc.' __license__ = 'GPL2' class StressTest(unittest.TestCase): """ Test Suite to use HTTP benchm...
Jawbone/UPPlatform_Python_SDK
refs/heads/master
upapi/scopes.py
1
""" OAuth2 scope constants for the UP API Refer to https://jawbone.com/up/developer/authentication for a definition of these scopes. """ BASIC_READ = 'basic_read' EXTENDED_READ = 'extended_read' LOCATION_READ = 'location_read' FRIENDS_READ = 'friends_read' MOOD_READ = 'mood_read' MOOD_WRITE = 'mood_write' MOVE_READ = '...
Orav/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_venv.py
2
""" Test harness for the venv module. Copyright (C) 2011-2012 Vinay Sajip. Licensed to the PSF under a contributor agreement. """ import ensurepip import os import os.path import shutil import struct import subprocess import sys import tempfile from test.support import (captured_stdout, captured_stderr...
EiNSTeiN-/deluge-gtk3
refs/heads/master
deluge/ui/gtkui/status_tab.py
1
# -*- coding: utf-8 -*- # # status_tab.py # # Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 you...
daspecster/google-cloud-python
refs/heads/master
vision/unit_tests/__init__.py
216
# 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, ...
jtopjian/st2
refs/heads/master
st2common/st2common/hooks.py
2
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
prculley/gramps
refs/heads/master
gramps/plugins/lib/libcairodoc.py
4
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007 Zsolt Foldvari # Copyright (C) 2009 Benny Malengier # Copyright (C) 2009 Brian Matherly # Copyright (C) 2010 Peter Landgren # Copyright (C) 2010 Jakim Friant # Copyright ...
muhaochen/MTransE
refs/heads/master
run/en_fr/train_MMtransE_15k.py
1
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '../../src/MMTransE')) from MMTransE import MMTransE model = MMTransE(dim=75, save_dir=os.path.join(os.path.dirname(__file__), 'model_MMtransE_person_15k.bin')) model.Train_MT(epochs=400, save_every_epochs=100, languages=['en', 'fr'],...
mwaterfall/alfred-kippt-search
refs/heads/master
workflow/requests/__init__.py
56
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('http://python.org') >>> r.sta...
akshah/netra
refs/heads/master
resultWriter/resultWriter.py
1
import threading from contextlib import closing import os.path import os import subprocess import traceback from customUtilities.helperFunctions import * from customUtilities.logger import logger class ResultWriter(): def __init__(self,resultfilename,logger=logger('detourResultWriter.log')): self.lock = ...
malon/presupuesto
refs/heads/master
budget_app/management/commands/__init__.py
12133432
havatv/QGIS
refs/heads/master
python/plugins/processing/modeler/__init__.py
12133432
step21/inkscape-osx-packaging-native
refs/heads/master
packaging/macosx/Inkscape.app/Contents/Resources/extensions/export_gimp_palette.py
3
#!/usr/bin/env python ''' Author: Jos Hirth, kaioa.com License: GNU General Public License - http://www.gnu.org/licenses/gpl.html Warranty: see above ''' DOCNAME='sodipodi:docname' import sys, simplestyle try: from xml.dom.minidom import parse except: sys.exit(_('The export_gpl.py module requires PyXML. Ple...
ryanahall/django
refs/heads/master
django/http/multipartparser.py
105
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ from __future__ import unicode_literals import base64 import binascii import cgi import sys from django.conf import settings from django.core.exceptions imp...
gminds/rapidnewsng
refs/heads/master
django/views/generic/base.py
107
from __future__ import unicode_literals import logging from functools import update_wrapper from django import http from django.core.exceptions import ImproperlyConfigured from django.template.response import TemplateResponse from django.utils.decorators import classonlymethod from django.utils import six logger = l...
takeshineshiro/cinder
refs/heads/master
cinder/cmd/backup.py
21
#!/usr/bin/env python # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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...
crakensio/django_training
refs/heads/master
lib/python2.7/site-packages/sphinx/writers/text.py
3
# -*- coding: utf-8 -*- """ sphinx.writers.text ~~~~~~~~~~~~~~~~~~~ Custom docutils writer for plain text. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import textwrap from itertools import groupby from docutils i...
dwkim78/pdtrend
refs/heads/master
pdtrend/utils/__init__.py
7
__author__ = 'kim'
linsicai/or-tools
refs/heads/master
examples/tests/test_cp_api.py
5
# Various calls to CP api from python to verify they work. from ortools.constraint_solver import pywrapcp from ortools.constraint_solver import model_pb2 from ortools.constraint_solver import search_limit_pb2 def test_member(): solver = pywrapcp.Solver('test member') x = solver.IntVar(1, 10, 'x') ct = x.Member(...
jk1/intellij-community
refs/heads/master
python/testData/mover/indent.py
83
class A: def foo(self, a, b, c, d): if a: if b: if c: if d: self.bar() c<caret> = 3 if c: a = 2 def bar(self): pass
danlrobertson/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/html5lib/html5lib/treeadapters/__init__.py
77
"""Tree adapters let you convert from one tree structure to another Example: .. code-block:: python import html5lib from html5lib.treeadapters import genshi doc = '<html><body>Hi!</body></html>' treebuilder = html5lib.getTreeBuilder('etree') parser = html5lib.HTMLParser(tree=treebuilder) tree = pa...
sadanandb/pmt
refs/heads/master
src/client/examples/query_shot.py
10
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
fastinetserver/portage-idfetch
refs/heads/master
pym/portage/_legacy_globals.py
1
# Copyright 2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import portage from portage import os from portage.const import CACHE_PATH, PROFILE_PATH def _get_legacy_global(name): constructed = portage._legacy_globals_constructed if name in constructed: return getattr(port...
downingstreet/Google-Code-Jam-2016
refs/heads/master
Round-1A/LastWord.py
1
def solve(S): words = [] words.append(S[0]) for i in S[1:]: if i >= words[0]: words.insert(0,i) else: words.append(i) return ''.join(words) for t in xrange(1, input()+1): S = raw_input() print "Case #{0}: {1}".format(t, solve(S))
jonfoster/pyxb1
refs/heads/master
pyxb/bundles/wssplat/wsdlx.py
6
from pyxb.bundles.wssplat.raw.wsdlx import *
repotvsupertuga/tvsupertuga.repository
refs/heads/master
script.module.openscrapers/lib/openscrapers/sources_openscrapers/en_Torrent/111ys.py
1
# -*- coding: UTF-8 -*- # ..#######.########.#######.##....#..######..######.########....###...########.#######.########..######. # .##.....#.##.....#.##......###...#.##....#.##....#.##.....#...##.##..##.....#.##......##.....#.##....## # .##.....#.##.....#.##......####..#.##......##......##.....#..##...##.##.....#....
AVSystem/avs_commons
refs/heads/master
tools/check_extern_c.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2021 AVSystem <avsystem@avsystem.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.org/licenses/LICEN...
Fillll/reddit2telegram
refs/heads/master
reddit2telegram/channels/canallixo/__init__.py
12133432
priya-pp/Tacker
refs/heads/master
tacker/agent/__init__.py
12133432
daxxi13/CouchPotatoServer
refs/heads/develop
libs/requests/packages/charade/jisfreq.py
3130
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
onaio/dkobo
refs/heads/master
dkobo/koboform/tests/test_kobo_to_xlsform.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- from django.test import TestCase from dkobo.koboform.kobo_to_xlsform import convert_any_kobo_features_to_xlsform_survey_structure from dkobo.koboform.kobo_to_xlsform import _sluggify_valid_xml def convert_survey(surv, choices=[], sheets={}): sheets.update({ 'surve...
santoshsahoo/filesync-server
refs/heads/master
src/server/tests/test_oops.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...
coreyfarrell/testsuite
refs/heads/master
lib/python/asterisk/astdicts.py
2
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # copied from http://code.activestate.com/recipes/576693/ try: # Use builtin OrderedDict() from Python2.7. from collections import OrderedDict except Impor...
icomms/wqmanager
refs/heads/master
reportlab/graphics/charts/legends.py
4
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/legends.py __version__=''' $Id: legends.py 3604 2009-11-27 16:35:29Z meitham $ ''' __doc__="""This will be a collection of legends to ...
tmpgit/intellij-community
refs/heads/master
python/lib/Lib/wsgiref/simple_server.py
104
"""BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21) This is both an example of how WSGI can be implemented, and a basis for running simple web applications on a local machine, such as might be done when testing or debugging an application. It has not been reviewed for security issues, howev...
rhertzog/django
refs/heads/master
tests/file_uploads/urls.py
452
from django.conf.urls import url from . import views urlpatterns = [ url(r'^upload/$', views.file_upload_view), url(r'^verify/$', views.file_upload_view_verify), url(r'^unicode_name/$', views.file_upload_unicode_name), url(r'^echo/$', views.file_upload_echo), url(r'^echo_content_type_extra/$', vie...
Krolov18/Languages
refs/heads/master
Projet_media/Collecteur_texte.py
2
__author__ = 'krolev' import os import shlex import argparse import codecs import subprocess import re import string import urllib.request import urllib.error from bs4 import BeautifulSoup from pyinotify import ProcessEvent, Notifier, ALL_EVENTS, WatchManager import sqlite3 caractère_special = ('&#160;: ', ';') net=...
johndoe31415/flightpanel
refs/heads/master
travis-deploy/BuildManager.py
1
#!/usr/bin/python3 # # flightpanel - A Cortex-M4 based USB flight panel for flight simulators. # Copyright (C) 2017-2017 Johannes Bauer # # This file is part of flightpanel. # # flightpanel is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
KennethPierce/pylearnk
refs/heads/fixNogil/master
pylearn2/distributions/__init__.py
147
__authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups"
eddyb/servo
refs/heads/master
tests/wpt/web-platform-tests/XMLHttpRequest/resources/access-control-origin-header.py
20
#!/usr/bin/env python def main(request, response): response.headers.set("Content-Type", "text/plain"); response.headers.set("Cache-Control", "no-cache, no-store"); response.headers.set("Access-Control-Allow-External", "true"); response.headers.set("Access-Control-Allow-Origin", "*"); response.conte...
radianbaskoro/mathdoku-solver
refs/heads/master
mathdokusolver/__init__.py
12133432
bohlian/erpnext
refs/heads/develop
erpnext/docs/assets/img/videos/__init__.py
12133432
netsuileo/sfu-cluster-dashboard
refs/heads/master
dashboard/app/api/monitoring/__init__.py
12133432
IEEE-NITK/DeepNLP
refs/heads/master
Project-Code/classifier_model/classifier_model.py
2
from keras.models import Sequential, Model, load_model from keras.layers import Dense, Dropout, Activation from keras.layers import Embedding, TimeDistributed from keras.layers import LSTM, Input, RepeatVector from keras.preprocessing.sequence import pad_sequences from scipy import spatial import numpy as np import nlt...
hale36/SRTV
refs/heads/master
lib/hachoir_core/event_handler.py
188
class EventHandler(object): """ Class to connect events to event handlers. """ def __init__(self): self.handlers = {} def connect(self, event_name, handler): """ Connect an event handler to an event. Append it to handlers list. """ try: self.hand...
stephen144/odoo
refs/heads/9.0
openerp/addons/base/tests/test_func.py
30
# -*- coding: utf-8 -*- import functools import unittest from openerp.tools.func import compose from openerp.tools import frozendict class TestCompose(unittest.TestCase): def test_basic(self): str_add = compose(str, lambda a, b: a + b) self.assertEqual( str_add(1, 2), "3") ...
rockyzhang/zhangyanhit-python-for-android-mips
refs/heads/master
python-build/python-libs/gdata/build/lib/gdata/alt/__init__.py
271
#!/usr/bin/python # # Copyright (C) 2008 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 ...
andris210296/andris-projeto
refs/heads/master
backend/venv/lib/python2.7/site-packages/gaecookie/security.py
9
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import json from webapp2_extras import securecookie from gaecookie.manager import FindOrCreateSecrets class SignCmd(FindOrCreateSecrets): def __init__(self, name, dct): self.name = name self.dct = dct self._...
ASCrookes/django
refs/heads/master
django/contrib/gis/gdal/geomtype.py
297
from django.contrib.gis.gdal.error import GDALException from django.utils import six class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0: 'Unknown', 1: 'Point', ...
Ozerich/ajenti
refs/heads/master
ajenti/ui/api.py
2
from ajenti.com import Interface class IXSLTFunctionProvider(Interface): def get_funcs(self): pass
clobrano/personfinder
refs/heads/master
app/pytz/zoneinfo/America/Port_of_Spain.py
9
'''tzinfo timezone information for America/Port_of_Spain.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Port_of_Spain(DstTzInfo): '''America/Port_of_Spain timezone definition. See datetime.tzinfo for details''' zone = '...
cloudera/hue
refs/heads/master
desktop/core/ext-py/ply-3.11/example/BASIC/basic.py
10
# An implementation of Dartmouth BASIC (1964) # import sys sys.path.insert(0, "../..") if sys.version_info[0] >= 3: raw_input = input import basiclex import basparse import basinterp # If a filename has been specified, we try to run it. # If a runtime error occurs, we bail out and enter # interactive mode below...
Kromey/fbxnano
refs/heads/master
forum/forms.py
2
from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textarea( ...
CAAD-RWTH/ClockworkForDynamo
refs/heads/master
nodes/0.8.x/python/View.SetPhase.py
16
import clr clr.AddReference('RevitAPI') from Autodesk.Revit.DB import * clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManage...
dtschan/weblate
refs/heads/master
weblate/trans/tests/test_suggestions.py
2
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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, eith...
reachalpineswift/frappe-bench
refs/heads/master
frappe/custom/doctype/customize_form/customize_form.py
3
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Customize Form is a Single DocType used to mask the Property Setter Thus providing a better UI from user perspective """ import frappe, json from frappe import _ from frappe...
liweitianux/chandra-acis-analysis
refs/heads/master
acispy/spectrum.py
1
# Copyright (c) 2017 Weitian LI <liweitianux@live.com> # MIT license """ Chandra ACIS spectrum. """ from astropy.io import fits from .acis import ACIS class Spectrum: """ Chandra ACIS spectrum """ def __init__(self, filepath): self.filepath = filepath self.fitsobj = fits.open(filep...
Ryati/satchmo
refs/heads/master
satchmo/apps/satchmo_store/contact/signals.py
14
import django.dispatch """ Signals for Contacts """ #: Sent after a user changes their location in their profile. #: #: :param sender: The form which was responsible for the location change. #: :type sender: ``satchmo_store.contact.forms.ContactInfoForm`` #: #: :param contact: The contact which was updated with a new...
matthiasdiener/spack
refs/heads/develop
var/spack/repos/builtin/packages/py-xopen/package.py
5
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
SwankSwashbucklers/bottle-builder
refs/heads/master
bottle-builder.py
1
""" """ ################################################################################ ##### Command Line Interface ################################################### ################################################################################ from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter...
shamindrasorg/eda_play
refs/heads/master
data/repeated-phrases-gop/robopol2.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- import random import numpy import math import string import operator from collections import defaultdict # candidates to pay attention to candidates = ["TRUMP", "CRUZ", "RUBIO", "KASICH"] # n-gram lengths to iterate through min_N = 1 # inclusive max_N = 15 # exc...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/skimage/morphology/tests/__init__.py
672
from ..._shared.testing import setup_test, teardown_test def setup(): setup_test() def teardown(): teardown_test()
amoad/amoad-native-cocos2dx-sdk
refs/heads/master
AMoAdNativeCocos2dxDemo/cocos2d/plugin/tools/android-build.py
240
#!/usr/bin/python # android-build.py # Build android samples import sys import os, os.path import shutil from optparse import OptionParser CPP_SAMPLES = ["HelloPlugins"] ALL_SAMPLES = CPP_SAMPLES def check_environment_variables(): ''' Checking the environment NDK_ROOT, which will be used for building ''' ...
sfepy/sfepy
refs/heads/master
sfepy/postprocess/plot_dofs.py
6
""" Functions to visualize the mesh connectivity with global and local DOF numberings. """ import numpy as nm import matplotlib.pyplot as plt def _get_axes(ax, dim): if ax is None: fig = plt.figure() if dim == 3: from mpl_toolkits.mplot3d import axes3d axes3d # Make pyflake...
puuu/micropython
refs/heads/master
tests/basics/string_rpartition.py
16
try: str.partition except AttributeError: print("SKIP") import sys sys.exit() print("asdf".rpartition('g')) print("asdf".rpartition('a')) print("asdf".rpartition('s')) print("asdf".rpartition('f')) print("asdf".rpartition('d')) print("asdf".rpartition('asd')) print("asdf".rpartition('sdf')) print("asdf...
Openlights/firemix
refs/heads/master
lib/plugin_loader.py
1
# This file is part of Firemix. # # Copyright 2013-2016 Jonathan Evans <jon@craftyjon.com> # # Firemix 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...
greyhwndz/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/win/gyptest-link-subsystem.py
239
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Make sure subsystem setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp.TestGyp...
afandria/mojo
refs/heads/master
mojo/public/python/mojo_bindings/__init__.py
1201
# 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.
leakim/svtplay-dl
refs/heads/master
lib/svtplay_dl/fetcher/__init__.py
1
from __future__ import absolute_import from svtplay_dl.utils import HTTP class VideoRetriever(object): def __init__(self, options, url, bitrate=0, **kwargs): self.options = options self.url = url self.bitrate = int(bitrate) self.kwargs = kwargs self.http = HTTP() def na...
RayMick/scikit-learn
refs/heads/master
benchmarks/bench_rcv1_logreg_convergence.py
149
# Authors: Tom Dupre la Tour <tom.dupre-la-tour@m4x.org> # Olivier Grisel <olivier.grisel@ensta.org> # # License: BSD 3 clause import matplotlib.pyplot as plt import numpy as np import gc import time from sklearn.externals.joblib import Memory from sklearn.linear_model import (LogisticRegression, SGDClassifi...
aleaxit/pysolper
refs/heads/master
latrop/lib/dist/werkzeug/templates.py
26
# -*- coding: utf-8 -*- r""" werkzeug.templates ~~~~~~~~~~~~~~~~~~ A minimal template engine. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD License. """ import sys import re import __builtin__ as builtins from compiler import ast, parse from compiler.pycode...
kdwink/intellij-community
refs/heads/master
python/testData/refactoring/unwrap/whileUnwrap_before.py
83
while True: x =<caret> 1