repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
geosim/QAD
refs/heads/master
qad_dsettings_dlg.py
1
# -*- coding: utf-8 -*- """ /*************************************************************************** QAD Quantum Aided Design plugin comando DSETTINGS per impostazione disegno ------------------- begin : 2013-05-22 copyright : iiiii ...
hchen1202/django-react
refs/heads/master
virtualenv/lib/python3.6/site-packages/django/middleware/cache.py
49
""" Cache middleware. If enabled, each Django-powered page will be cached based on URL. The canonical way to enable cache middleware is to set ``UpdateCacheMiddleware`` as your first piece of middleware, and ``FetchFromCacheMiddleware`` as the last:: MIDDLEWARE = [ 'django.middleware.cache.UpdateCacheMiddl...
aaron-fz/neutron_full_sync
refs/heads/full-sync
neutron/debug/__init__.py
14
# Copyright 2012, Nachi Ueno, NTT MCL, 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 # # U...
sopier/django
refs/heads/master
tests/migrations/test_migrations_conflict/0001_initial.py
2995
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ("name",...
swordest/data
refs/heads/master
Assignments/jmankoff-byte3/oauth2client/anyjson.py
303
# Copyright (C) 2010 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 writ...
rcgee/oq-hazardlib
refs/heads/master
openquake/hazardlib/tests/gsim/akkar_2014_test.py
2
# The Hazard Library # Copyright (C) 2013-2016 GEM Foundation # # 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. #...
miguelparaiso/OdooAccessible
refs/heads/master
addons/account_chart/__init__.py
526
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
tornadozou/tensorflow
refs/heads/master
tensorflow/python/framework/versions.py
127
# 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...
camilonova/django
refs/heads/master
django/core/files/images.py
56
""" 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. """ @pro...
updownlife/multipleK
refs/heads/master
dependencies/biopython-1.65/build/lib.linux-x86_64-2.7/Bio/NMR/NOEtools.py
4
# Copyright 2004 by Bob Bussell. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """NOEtools: For predicting NOE coordinates from assignment data. The input and output are model...
CEN3031-Project-9C/MEAN-Stack
refs/heads/master
node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/accessibility-developer-tools/scripts/parse_aria_schemas.py
381
import json import re import urllib import xml.etree.ElementTree as ET def parse_attributes(): schema = urllib.urlopen('http://www.w3.org/MarkUp/SCHEMA/aria-attributes-1.xsd') tree = ET.parse(schema) for node in tree.iter(): node.tag = re.sub(r'{.*}', r'', node.tag) type_map = { 'stat...
tndatacommons/tndata_backend
refs/heads/master
tndata_backend/goals/migrations/0064_create_single_action_triggers.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.utils.text import slugify def create_single_default_trigger_for_actions(apps, schema_editor): Action = apps.get_model("goals", "Action") Trigger = apps.get_model("goals", "Trigger") for ac...
zeroblade1984/htc_msm8930_kernel
refs/heads/master
scripts/gcc-wrapper.py
104
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011-2012, Code Aurora Forum. 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 a...
ruibarreira/linuxtrail
refs/heads/master
usr/lib/python2.7/dist-packages/reportlab/lib/logger.py
2
#! /usr/bin/python #Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/logger.py __version__=''' $Id$ ''' __doc__="Logging and warning framework, predating Python's logging package" from sys import s...
broferek/ansible
refs/heads/devel
lib/ansible/plugins/httpapi/nxos.py
13
# (c) 2018 Red Hat Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ --- author: Ansible Networking Team httpapi: nxos short_description: Use NX-API to run comman...
SamYaple/neutron
refs/heads/master
neutron/tests/tempest/common/glance_http.py
24
# Copyright 2012 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 requ...
ruchee/vimrc
refs/heads/master
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/c/class_attributes.py
3
"""Test that valid class attribute doesn't trigger errors""" __revision__ = 'sponge bob' # pylint: disable=useless-object-inheritance class Clazz(object): "dummy class" def __init__(self): self.topic = 5 self._data = 45 def change_type(self, new_class): """Change type""" s...
SOKP/external_chromium_org
refs/heads/sokp-l5.1
third_party/ply/yacc.py
465
# ----------------------------------------------------------------------------- # ply: yacc.py # # Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
openpli-arm/enigma2-arm
refs/heads/master
lib/python/Plugins/Extensions/SocketMMI/SocketMMI.py
150
from Screens.Ci import MMIDialog import socketmmi class SocketMMIMessageHandler: def __init__(self): self.session = None self.dlgs = { } socketmmi.getSocketStateChangedCallbackList().append(self.socketStateChanged) def setSession(self, session): self.session = session def connected(self): return socketm...
cekk/pergamena
refs/heads/master
tests/test_models.py
1
# -*- coding: utf-8 -*- """Model unit tests.""" import datetime as dt import pytest from pergamena.user.models import User, Role from .factories import UserFactory @pytest.mark.usefixtures('db') class TestUser: def test_get_by_id(self): user = User('foo', 'foo@bar.com') user.save() retr...
jfosorio/pelican-plugins
refs/heads/master
representative_image/test_representative_image.py
63
#!/bin/sh import unittest from jinja2.utils import generate_lorem_ipsum # Generate content with image TEST_CONTENT_IMAGE_URL = 'https://testimage.com/test.jpg' TEST_CONTENT = str(generate_lorem_ipsum(n=3, html=True)) + '<img src="' + TEST_CONTENT_IMAGE_URL + '"/>'+ str(generate_lorem_ipsum(n=2,html=True)) TEST_SUMM...
cemc/safeexec
refs/heads/master
tests/procname.py
1
# only works in Python 3 # demonstrates that the user can change the thread name # which is probably not a big deal # run "ps Hcx -ef" to see the effect def set_proc_name(newname): from ctypes import cdll, byref, create_string_buffer libc = cdll.LoadLibrary('libc.so.6') buff = create_string_buffer(len(ne...
goodwinnk/intellij-community
refs/heads/master
python/testData/editing/py254.after.py
166
class Foo(object): def foo(bar): pass def bar(foo): pass
jch1/models
refs/heads/master
real_nvp/real_nvp_multiscale_dataset.py
8
# Copyright 2016 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...
rjw57/videosequence
refs/heads/master
test/test_import.py
1
def test_import(): from videosequence import VideoSequence
EvanK/ansible
refs/heads/devel
lib/ansible/utils/singleton.py
104
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from threading import RLock class Singleton(type): """Metaclass...
PhillipNordwall/LabSchedule
refs/heads/master
GetDATAWCursor.py
1
import pyodbc import getpass def GetDATAWCursor(username="", password=""): """Prompt for username and password if they are not present, and return a cursor to the database connection.""" if not username: username = raw_input("Enter Database Username: ") if not password: passw...
frappe/erpnext
refs/heads/develop
erpnext/healthcare/doctype/inpatient_medication_order/test_inpatient_medication_order.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import add_days, getdate, now_datetime from erpnext.healthcare.doctype.inpatient_record.test_inpatient_record import cre...
jordanmsn12/volatility
refs/heads/master
volatility/plugins/overlays/windows/vista_sp2_x86_vtypes.py
58
ntkrnlmp_types = { '_KRESOURCEMANAGER_COMPLETION_BINDING' : [ 0x14, { 'NotificationListHead' : [ 0x0, ['_LIST_ENTRY']], 'Port' : [ 0x8, ['pointer', ['void']]], 'Key' : [ 0xc, ['unsigned long']], 'BindingProcess' : [ 0x10, ['pointer', ['_EPROCESS']]], } ], '_VF_TRACKER' : [ 0x10, { 'TrackerFlags'...
ericflo/startthedark
refs/heads/master
profile/views.py
2
from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.contrib.auth.models import User from socialgraph.util import get_people_user_follows, get_people_following_user from socialgraph.util import get_mutual_followers from events.models import Event, Att...
thresholdsoftware/asylum-v2.0
refs/heads/master
openerp/addons/base/res/__init__.py
63
# -*- 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...
Shifterovich/AoC
refs/heads/master
2015/1/part2.py
1
def solve(puzzle_input): current_position = 0 result = 0 for i, char in enumerate(puzzle_input): current_position += 1 if char == "(" else -1 if current_position == -1: result = i+1 # Solution is supposed to be a position (starting with 1), not an index (starting with 0). ...
deKupini/erp
refs/heads/master
addons/mrp_operations/mrp_operations.py
5
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
dhermes/gcloud-python
refs/heads/master
monitoring/google/cloud/monitoring_v3/proto/mutation_record_pb2_grpc.py
573
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc
xuru/pyvisdk
refs/heads/master
pyvisdk/enums/virtual_machine_ht_sharing.py
1
######################################## # Automatically generated, do not edit. ######################################## from pyvisdk.thirdparty import Enum VirtualMachineHtSharing = Enum( 'any', 'internal', 'none', )
fernandog/Sick-Beard
refs/heads/ThePirateBay
sickbeard/providers/kat.py
1
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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...
mrquim/mrquimrepo
refs/heads/master
plugin.video.mrpiracy/resources/lib/js2py/legecy_translators/jsparser.py
54
""" The process of translating JS will go like that: # TOP = 'imports and scope set' 1. Remove all the comments 2. Replace number, string and regexp literals with markers 4. Remove global Functions and move their translation to the TOP. Also add register code there. 5. Replace inline functions with lvals 6. Rem...
sxjscience/tvm
refs/heads/master
vta/python/vta/top/vta_conv2d_transpose.py
2
# 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 u...
qrqiuren/sms-tools
refs/heads/master
lectures/06-Harmonic-model/plots-code/predominantmelody.py
20
import sys, csv, os from essentia import * from essentia.standard import * from pylab import * from numpy import * sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import stft as STFT filename = '../../../sounds/carnatic.wav' hopSize = 128 frameSize = 2048 sampleR...
MaDKaTZe/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/text.py
193
# Copyright (C) 2009 Google Inc. All rights reserved. # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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...
AstroTech/workshop-python
refs/heads/master
_book/foundations/conf.py
1
from ..conf import * project = 'Python 3: Foundations' description = "Matt Harasymczuk's Python 3: Foundations" master_doc = '/_book/foundations/index'
cevaris/pants
refs/heads/master
contrib/go/tests/python/pants_test/contrib/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
pyfa-org/Pyfa
refs/heads/master
eos/db/migrations/upgrade32.py
2
""" Migration 32 - added speed, sig and radius columns to targetResists table """ import sqlalchemy def upgrade(saveddata_engine): for column in ('maxVelocity', 'signatureRadius', 'radius'): try: saveddata_engine.execute("SELECT {} FROM targetResists LIMIT 1;".format(column)) except...
code-sauce/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/student_t.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...
imtapps/django-imt-fork
refs/heads/IMT
django/contrib/messages/tests/__init__.py
201
from django.contrib.messages.tests.cookie import CookieTest from django.contrib.messages.tests.fallback import FallbackTest from django.contrib.messages.tests.middleware import MiddlewareTest from django.contrib.messages.tests.session import SessionTest
JasonFruit/abcviewer
refs/heads/master
abcv/tools.py
1
import os import subprocess commands = {"abcm2ps": "", "abc2midi": "", "abc2abc": "", "gs": ""} def default_tool_path(command): """Try to find the tool in the PATH""" if os.name == "nt": sh_cmd = command elif os.name == "posix": sh_cmd = "which %s" % com...
ntt-sic/nova
refs/heads/master
nova/db/sqlalchemy/migrate_repo/versions/164_placeholder.py
180
# This is a placeholder for Grizzly backports. # Do not use this number for new Havana work. New Havana work starts after # all the placeholders. # # See https://blueprints.launchpad.net/nova/+spec/backportable-db-migrations # http://lists.openstack.org/pipermail/openstack-dev/2013-March/006827.html def upgrade(migr...
mlperf/training_results_v0.7
refs/heads/master
Google/benchmarks/transformer/implementations/transformer-research-TF-tpu-v4-128/lingvo/core/tshape.py
3
# Copyright 2019 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...
jymannob/CouchPotatoServer
refs/heads/develop
couchpotato/core/notifications/plex/main.py
86
from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification from .client import PlexClientHTTP, PlexClientJSON from .server import PlexServer log = CPLog(__name__) class Plex(Notification): http_time_between_calls ...
davidzchen/tensorflow
refs/heads/master
tensorflow/compiler/tests/reduce_window_test.py
24
# 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...
Microvellum/Fluid-Designer
refs/heads/master
win64-vc/2.78/python/lib/site-packages/numpy/polynomial/polyutils.py
41
""" Utililty classes and functions for the polynomial modules. This module provides: error and warning objects; a polynomial base class; and some routines used in both the `polynomial` and `chebyshev` modules. Error objects ------------- .. autosummary:: :toctree: generated/ PolyError base class fo...
MER-GROUP/intellij-community
refs/heads/master
python/testData/completion/selfMethod.after.py
83
class A: def method(self): pass def test(self): self.method()
bencastan/LPTHW
refs/heads/master
ex2.py
1
# A comment, this is so you can read your program later. # Anyhting after the # is ignored by Python. print "I could have code like this." # and the comment after is ignored # You can slso use a comment to "disable" or comment out a piece of code: # print "This wont run" print "This will run"
micrexp/sqlautocode
refs/heads/master
sqlautocode/formatter.py
7
import sqlalchemy import config, constants, util def textclause_repr(self): return 'text(%r)' % self.text def table_repr(self): data = { 'name': self.name, 'columns': constants.NLTAB.join([repr(cl) for cl in self.columns]), 'constraints': constants.NLTAB.join( [repr(cn) for...
unseenlaser/python-for-android
refs/heads/master
python-modules/pybluez/examples/simple/rfcomm-server.py
67
# file: rfcomm-server.py # auth: Albert Huang <albert@csail.mit.edu> # desc: simple demonstration of a server application that uses RFCOMM sockets # # $Id: rfcomm-server.py 518 2007-08-10 07:20:07Z albert $ from bluetooth import * server_sock=BluetoothSocket( RFCOMM ) server_sock.bind(("",PORT_ANY)) server_sock.liste...
dkoppstein/recipes
refs/heads/master
recipes/pantools/pantools.py
35
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
gylian/headphones
refs/heads/master
lib/mutagen/asf.py
16
# Copyright 2006-2007 Lukas Lalinsky # Copyright 2005-2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Read and write ASF (Window Media Audio) files.""" __all_...
AbrahamSue/pymongolab
refs/heads/master
__init__.py
1
# -*- coding: utf-8 -*- # # Copyright 2016 Abraham Sue # # 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 applicab...
xuerong/MMServerEngine
refs/heads/master
code/MMServerEngine/others/table/xlrd/xlsx.py
5
## # Portions copyright (c) 2008-2012 Stephen John Machin, Lingfo Pty Ltd # This module is part of the xlrd package, which is released under a BSD-style licence. ## from __future__ import print_function, unicode_literals DEBUG = 0 from os.path import normpath, join import sys import re from .timemachine import * fro...
ibab/tensorflow
refs/heads/master
tensorflow/python/summary/impl/directory_watcher_test.py
8
# 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...
devcline/mtasa-blue
refs/heads/master
vendor/google-breakpad/src/tools/gyp/test/mac/gyptest-framework-dirs.py
342
#!/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. """ Verify that it is possible to build an object that depends on a PrivateFramework. """ import os import sys import TestGyp if sys.platf...
azatoth/scons
refs/heads/master
QMTest/TestRuntest.py
2
""" TestRuntest.py: a testing framework for the runtest.py command used to invoke SCons tests. A TestRuntest environment object is created via the usual invocation: test = TestRuntest() TestRuntest is a subclass of TestCommon, which is in turn is a subclass of TestCmd), and hence has available all of the method...
aperigault/ansible
refs/heads/devel
test/lib/ansible_test/_internal/sanity/import.py
2
"""Sanity test for proper import exception handling.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from .. import types as t from ..sanity import ( SanityMultipleVersion, SanityMessage, SanityFailure, SanitySuccess, SANITY_ROOT, ) from ..tar...
laplacesdemon/django-youtube
refs/heads/master
example/youtube_project/youtube_project/wsgi.py
1
""" WSGI config for youtube_project 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_APPLIC...
zemanel/ansible
refs/heads/devel
v2/ansible/plugins/lookup/redis_kv.py
176
# (c) 2012, Jan-Piet Mens <jpmens(at)gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
ehashman/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/conditional_processing/urls.py
176
from django.conf.urls import patterns from . import views urlpatterns = patterns('', ('^condition/$', views.index), ('^condition/last_modified/$', views.last_modified_view1), ('^condition/last_modified2/$', views.last_modified_view2), ('^condition/etag/$', views.etag_view1), ('^condition/etag2/$'...
PwnArt1st/searx
refs/heads/master
searx/engines/searchcode_code.py
2
""" Searchcode (It) @website https://searchcode.com/ @provide-api yes (https://searchcode.com/api/) @using-api yes @results JSON @stable yes @parse url, title, content """ from urllib import urlencode from json import loads # engine dependent config categories = ['it'] paging = True # ...
StaszicCode/sMusic-www
refs/heads/master
setup.py
2
#!/usr/bin/python2 # -*- coding: utf-8 -*- from distutils.core import setup from smusicwww import __version__ setup(name="sMusicServer", version=__version__, description="Serwer sMusic", url="https://github.com/mRokita/sMusic-www/", download_url="https://github.com/mRokita/sMusic-www/tarball/%...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/lib/Lib/ctypes/__init__.py
110
import jffi __version__ = "0.0.1" _TypeMap = { 'b': jffi.Type.BYTE, 'B': jffi.Type.UBYTE, 'h': jffi.Type.SHORT, 'H': jffi.Type.USHORT, 'i': jffi.Type.INT, 'I': jffi.Type.UINT, 'l': jffi.Type.LONG, 'L': jffi.Type.ULONG, 'q': jffi.Type.LONGLONG, 'Q': jffi.Type.ULONGLONG, 'f':...
Yen-Chung-En/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/testmock/testpatch.py
739
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ import os import sys import unittest from unittest.test.testmock import support from unittest.test.testmock.support import SomeClass, is_instance from unittest.mock import...
clovett/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/fftpack/tests/test_helper.py
51
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" # Created by Pearu Peterson, September 2002 """ Test functions for fftpack.helper module """ __usage__ = """ Build fftpack: python setup_fftpack.py build Run tests if scipy is installed: python -c 'import scipy;scip...
cupy/cupy
refs/heads/master
tests/cupy_tests/core_tests/test_syncdetect.py
1
import unittest import pytest import cupy import cupyx class TestSyncDetect(unittest.TestCase): def test_disallowed(self): a = cupy.array([2, 3]) with cupyx.allow_synchronize(False): with pytest.raises(cupyx.DeviceSynchronized): a.get() def test_allowed(self): ...
lubosch/productivity-classifier-linux
refs/heads/master
psutil/_psutil_linux.py
1
# encoding: utf-8 # module psutil._psutil_linux calls itself psutil_linux # from /home/fred/.local/lib/python3.4/site-packages/psutil/_psutil_linux.cpython-34m.so # by generator 1.136 # no doc # no imports # Variables with simple values DUPLEX_FULL = 1 DUPLEX_HALF = 0 DUPLEX_UNKNOWN = 255 RLIMIT_AS = 9 RLIMIT_CORE =...
toastedcornflakes/scikit-learn
refs/heads/master
sklearn/feature_selection/tests/test_variance_threshold.py
240
from sklearn.utils.testing import (assert_array_equal, assert_equal, assert_raises) from scipy.sparse import bsr_matrix, csc_matrix, csr_matrix from sklearn.feature_selection import VarianceThreshold data = [[0, 1, 2, 3, 4], [0, 2, 2, 3, 5], [1, 1, 2, 4, 0]] def t...
nistormihai/superdesk-core
refs/heads/master
apps/suggestions/resource.py
7
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2016 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from superdesk.res...
f0rki/cb-multios
refs/heads/master
original-challenges/Order_Up/support/make_todays_menu.py
1
#!/usr/bin/env python # # Copyright (C) 2014 Narf Industries <info@narfindustries.com> # # 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 # th...
Xperia-Nicki/android_platform_sony_nicki
refs/heads/master
external/webkit/Tools/Scripts/webkitpy/common/net/statusserver.py
15
# Copyright (C) 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 conditions and th...
ovnicraft/edx-platform
refs/heads/master
cms/djangoapps/contentstore/management/commands/utils.py
73
""" Common methods for cms commands to use """ from django.contrib.auth.models import User from opaque_keys.edx.keys import CourseKey from xmodule.modulestore.django import modulestore def user_from_str(identifier): """ Return a user identified by the given string. The string could be an email address, or...
rotofly/odoo
refs/heads/master
addons/marketing_campaign/__openerp__.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
menegon/geonode
refs/heads/master
geonode/upload/admin.py
35
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
erilyth/sugar
refs/heads/master
tests/extensions/cpsection/webaccount/services/__init__.py
966
from pkgutil import extend_path __path__ = extend_path(__path__, __name__)
zestrada/nova-cs498cc
refs/heads/master
plugins/xenserver/networking/etc/xensource/scripts/ovs_configure_vif_flows.py
14
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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 # # ...
tmm1/graphite
refs/heads/master
whisper/bin/whisper-resize.py
3
#!/usr/bin/env python import sys, os, time, traceback import whisper from optparse import OptionParser now = int(time.time()) option_parser = OptionParser( usage='''%prog path timePerPoint:timeToStore [timePerPoint:timeToStore]* timePerPoint and timeToStore specify lengths of time, for example: 60:1440 60...
BiznetGIO/horizon
refs/heads/stable/pike-gio
openstack_dashboard/dashboards/project/routers/urls.py
10
# Copyright 2012, Nachi Ueno, NTT MCL, 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 applic...
cathyyul/sumo-0.18
refs/heads/master
docs/tutorial/san_pablo_dam/validate.py
6
import sys, math, subprocess dDay = 1 obsTimes = {} verbose = False def readTimes(obsfile): times = [] for line in open(obsfile): ll = line.split(':') if ll: times.append(3600*int(ll[0]) + 60*int(ll[1]) + int(float(ll[2]))) return times def parseObsTimes(): for i in ra...
snailwalker/python
refs/heads/master
DIYgod/0005/change_resolution.py
116
# -*- coding: utf-8 -*- from PIL import Image def change_resolution(picPath, reslution): img = Image.open(picPath) x, y = img.size print x, y changex = float(x) / reslution[0] changey = float(y) / reslution[1] # 判断分辨率是否满足 if changex > 1 or changey > 1: change = changex if changex ...
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/loot/creature_loot/kashyyyk_loot/outcast_tool_05.py
85615
import sys def setup(core, object): return
MechCoder/sympy
refs/heads/master
sympy/integrals/tests/test_integrals.py
25
from sympy import ( Abs, acos, acosh, Add, asin, asinh, atan, Ci, cos, sinh, cosh, tanh, Derivative, diff, DiracDelta, E, exp, erf, erfi, EulerGamma, factor, Function, I, Integral, integrate, Interval, Lambda, LambertW, log, Matrix, O, oo, pi, Piecewise, Poly, Rational, S, simplify, sin, tan, sqrt, ...
moralitos/rabbitmq
refs/heads/master
python/rpc_server_start.py
1
#!/usr/bin/env python # This script starts and waits for messages to come in # Messages come with the signature: # { 'method' : 'python_method_to_execute', 'params' : { 'key' : 'value' } } # Once this is received, the rpc_server.on_request method is invoked # The rpc_server has a dispatch method # add to that method a...
hephaestus9/Radio
refs/heads/master
radioLib/flask/testsuite/test_apps/blueprintapp/apps/admin/__init__.py
794
from flask import Blueprint, render_template admin = Blueprint('admin', __name__, url_prefix='/admin', template_folder='templates', static_folder='static') @admin.route('/') def index(): return render_template('admin/index.html') @admin.route('/index2') def index2(): ret...
emedvedev/st2
refs/heads/master
st2common/st2common/exceptions/db.py
10
# 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...
sserrot/champion_relationships
refs/heads/master
venv/Lib/site-packages/networkx/algorithms/tree/mst.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2017 NetworkX Developers # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # Loïc Séguin-C. <loicseguin@gmail.com> # All rights reserved. # BSD license. """ Algorithms for calculating min/max spanning trees/f...
vlegoff/cocomud
refs/heads/master
src/autoupdate.py
1
# Copyright (c) 2016, LE GOFF Vincent # Copyright (c) 2016, LE GOFF Vincent # 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 notic...
xodus7/tensorflow
refs/heads/master
tensorflow/contrib/lite/toco/python/toco_from_protos_test.py
7
# Copyright 2017 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...
8v060htwyc/openh264
refs/heads/master
module/task_utils.py
75
# 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/. MAX_ARGS = 15 boilerplate = "/* This Source Code Form is subject to the terms of the Mozilla Public\n\ * License, v. 2....
40223123/finaltestone
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/color.py
603
## pygame - Python Game Library ## Copyright (C) 2000-2003 Pete Shinners ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (...
hbradleyiii/ext_pylib
refs/heads/master
tests/files/test_template.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # name: test_template.py # author: Harold Bradley III # email: harold@bradleystudio.net # created on: 01/09/2016 """ A unit test for ext_pylib file module's Template mixin class. """ from . import utils from ext_pylib.files import...
mitmproxy/mitmproxy
refs/heads/main
mitmproxy/platform/pf.py
3
import re import sys def lookup(address, port, s): """ Parse the pfctl state output s, to look up the destination host matching the client (address, port). Returns an (address, port) tuple, or None. """ # We may get an ipv4-mapped ipv6 address here, e.g. ::ffff:127.0.0.1. # Th...
engdan77/edoAutoHomeMobile
refs/heads/master
twisted/internet/error.py
12
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Exceptions and errors for use in twisted.internet modules. """ from __future__ import division, absolute_import import socket from twisted.python import deprecate from twisted.python.versions import Version class BindError(Exception): ...
davits/ycmd
refs/heads/master
ycmd/tests/identifier_utils_test.py
4
# Copyright (C) 2013-2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # #...