repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
csutherl/sos
sos/plugins/acpid.py
12
1211
# 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 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but...
gpl-2.0
codypiersall/platformer
lib/menu.py
1
7244
""" A simple menu system for pygame. Probably a little too simple, unfortunately.""" from __future__ import division import pygame # This silly Exception is used to return from a menu. class ReturnError(Exception): pass class Exit(Exception): pass class Menu(object): """ Class for bui...
bsd-3-clause
ryanjmccall/nupic
examples/opf/experiments/classification/scalar_encoder_0/description.py
17
2421
# ---------------------------------------------------------------------- # 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...
gpl-3.0
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Zendesk/MonitoredTwitterHandles/GetMonitoredTwitterHandle.py
5
3934
# -*- coding: utf-8 -*- ############################################################################### # # GetMonitoredTwitterHandle # Retrieves detailed information on a specified monitored Twitter account. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Ver...
gpl-2.0
batxes/4Cin
SHH_WT_models_highres/SHH_WT_models_highres_final_output_0.1_-0.1_5000/SHH_WT_models_highres13173.py
4
88213
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
crosswalk-project/chromium-crosswalk-efl
third_party/closure_linter/closure_linter/error_fixer_test.py
121
1719
#!/usr/bin/env python # # Copyright 2012 The Closure Linter 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 # #...
bsd-3-clause
SHMEDIALIMITED/nodec
node_modules/grunt-css/node_modules/gzip-js/test/unzipTest.py
182
1840
import os from colorama import Fore from helpers import run_cmd outDirDefault = 'test-outs' testDirDefault = 'test-files' """ Run a single test @param tFile- required; the file to check against (uncompressed data) @param level- optional (default: all); the compression level [1-9] @return True if all tests passed; Fa...
mit
hobarrera/django
tests/test_client_regress/tests.py
15
63582
# -*- coding: utf-8 -*- """ Regression tests for the Test Client, especially the customized assertions. """ from __future__ import unicode_literals import itertools import os from django.contrib.auth.models import User from django.contrib.auth.signals import user_logged_in, user_logged_out from django.http import Htt...
bsd-3-clause
kiall/designate-py3
designate/storage/impl_sqlalchemy/migrate_repo/versions/058_placeholder.py
140
1035
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@hp.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/L...
apache-2.0
chirilo/mozillians
vendor-local/lib/python/djcelery/tests/test_backends/test_cache.py
30
4992
from __future__ import absolute_import import sys from datetime import timedelta from django.core.cache.backends.base import InvalidCacheBackendError from celery import result from celery import states from celery.utils import gen_unique_id from celery.datastructures import ExceptionInfo from djcelery.backends.cac...
bsd-3-clause
duolinwang/MusiteDeep
MusiteDeep/train_general.py
1
4521
import sys import os import pandas as pd import numpy as np import argparse def main(): parser=argparse.ArgumentParser(description='MusiteDeep custom training tool for general PTM prediction.') parser.add_argument('-input', dest='inputfile', type=str, help='training data in fasta format. Sites f...
gpl-2.0
keyurpatel076/MissionPlannerGit
packages/IronPython.StdLib.2.7.4/content/Lib/io.py
191
3624
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; impl...
gpl-3.0
Unrepentant-Atheist/mame
3rdparty/benchmark/.ycm_extra_conf.py
84
3641
import os import ycm_core # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). # CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. flags = [ '-Wall', '-Werror', '-pendantic-errors', '-std=c++0x', '-fno-strict-aliasing...
gpl-2.0
tencentyun/cos-python-sdk
qcloud_cos/cos_config.py
1
1384
#!/usr/bin/env python # coding=utf-8 ################################################################################ # CosConfig 有关cos的配置 ################################################################################ class CosConfig(object): def __init__(self): self._end_point = 'http://web.file.myqc...
mit
riveridea/gnuradio
gr-trellis/examples/python/test_cpm.py
11
5508
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: CPM test # Author: Achilleas Anastasopoulos # Description: gnuradio flow graph # Generated: Thu Feb 19 23:16:23 2009 ################################################## from gnuradio import gr from gnuradio im...
gpl-3.0
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_graphics_appearance1152.py
1
5506
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
lyft/incubator-airflow
tests/providers/google/cloud/sensors/test_pubsub.py
4
4436
# # 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...
apache-2.0
allenai/allennlp
allennlp/modules/seq2seq_encoders/pytorch_transformer_wrapper.py
1
4656
from typing import Optional from overrides import overrides import torch from torch import nn from allennlp.modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder from allennlp.nn.util import add_positional_features @Seq2SeqEncoder.register("pytorch_transformer") class PytorchTransformer(Seq2SeqEncoder): ...
apache-2.0
davidcusatis/horizon
openstack_dashboard/test/api_tests/cinder_rest_tests.py
8
10320
# Copyright 2015 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 by applicable law or agreed to in writing, sof...
apache-2.0
chenleicpp/p970_kernel_3.0.8
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 2 of the License, or (at your option) # any later version. # # This program i...
gpl-2.0
jbremer/androguard
androguard/misc.py
12
6313
from androguard.core import * from androguard.core.androgen import * from androguard.core.bytecode import * from androguard.core.bytecodes.dvm import * from androguard.core.bytecodes.apk import * from androguard.core.analysis.analysis import * from androguard.core.analysis.ganalysis import * from androguard.decompiler....
apache-2.0
mogoweb/chromium-crosswalk
native_client_sdk/src/tools/genhttpfs.py
79
2524
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This scripts generates a manifest file for the MountHttp file system. # Files and directory paths are specified on the command-li...
bsd-3-clause
jammerful/buildbot
master/buildbot/steps/slave.py
11
1812
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
brianr/uuss
scripts/process_userstates_buckets.py
1
10860
from __future__ import with_statement import base64 import optparse import os import pymongo import simplejson import sys import time import zlib from paste.deploy import converters from lolapps.util import processor from lolapps.util import db from lolapps.util.adapters import mongo, chunking from lolapps.common i...
mit
mohammed-alfatih/servo
tests/wpt/css-tests/tools/html5lib/doc/conf.py
436
9028
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # html5lib documentation build configuration file, created by # sphinx-quickstart on Wed May 8 00:04:49 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # aut...
mpl-2.0
elimence/edx-platform
cms/djangoapps/contentstore/management/commands/check_course.py
5
2830
from django.core.management.base import BaseCommand, CommandError from xmodule.modulestore.django import modulestore from xmodule.modulestore.xml_importer import check_module_metadata_editability from xmodule.course_module import CourseDescriptor from request_cache.middleware import RequestCache class Command(BaseCo...
agpl-3.0
suninsky/ReceiptOCR
Python/server/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py
3131
47315
######################## 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...
mit
jeasoft/odoo
marcos_addons/marcos_ncf/account_voucher/number_to_letter.py
3
4850
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
jnhdny/parts-unlimited-to-bigcommerce
python_scripts/catalog_content_export_unzipper.py
3
1551
#!/usr/bin/python # this script unzips the brand catalog content export zip files # one at a time, and numbers each exported xml file import zipfile import shutil import os import glob def bool_str(s): s = s.lower() T = ('1', 'true', 'y', 'ye', 'yes', 'yea', 'ya', 'yah', 'yup') F = ('0', 'false', 'n', 'no', 'not',...
gpl-2.0
bastimeyer/streamlink
src/streamlink/plugins/livestream.py
5
4599
import re from streamlink.compat import urljoin from streamlink.plugin import Plugin from streamlink.plugin.api import validate from streamlink.plugin.api.utils import parse_json from streamlink.stream import AkamaiHDStream, HLSStream _url_re = re.compile(r"http(s)?://(www\.)?livestream.com/") _stream_config_schema =...
bsd-2-clause
teichopsia-/take_brake
lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py
252
106466
""" Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipul...
mpl-2.0
sergiosvieira/ns3-dtn
src/uan/bindings/callbacks_list.py
150
1150
callback_classes = [ ['void', 'int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3...
gpl-2.0
weiyirong/crosswalk-1
app/tools/android/parse_xpk.py
39
3550
#!/usr/bin/env python # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=C0301 """The script is used to parse an XPK file. It will do: 1. Check the magic file header; 2. Verify the signatu...
bsd-3-clause
stonegithubs/odoo
addons/membership/wizard/membership_invoice.py
380
3229
# -*- 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...
agpl-3.0
DMRookie/RoomAI
models/crm/crm_kuhn/play.py
1
2054
#!/bin/python import roomai.kuhn import roomai.common import random class HumanInputPlayer(roomai.common.AbstractPlayer): """ """ def receive_info(self, info): """ Args: info: """ available_actions = info def take_action(self): """ Returns: ...
mit
tavendo/AutobahnPython
examples/asyncio/wamp/pubsub/unsubscribe/frontend.py
3
2752
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
mit
sachinkum/Bal-Aveksha
WebServer/BalAvekshaEnv/lib/python3.5/site-packages/django/utils/safestring.py
41
4575
""" Functions for working with "safe strings": strings that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ i...
gpl-3.0
gangadharkadam/shfr
frappe/widgets/query_builder.py
35
6998
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe out = frappe.response from frappe.utils import cint import frappe.defaults def get_sql_tables(q): if q.find('WHERE') != -1: tl = q.split('FROM')[1].split('...
mit
aleida/django
tests/regressiontests/file_uploads/views.py
6
4373
from __future__ import absolute_import, unicode_literals import hashlib import json import os from django.core.files.uploadedfile import UploadedFile from django.http import HttpResponse, HttpResponseServerError from .models import FileModel, UPLOAD_TO from .tests import UNICODE_FILENAME from .uploadhandler import Q...
bsd-3-clause
BT-ojossen/odoo
addons/l10n_do/__openerp__.py
309
2992
# -*- coding: utf-8 -*- # ############################################################################# # # First author: Jose Ernesto Mendez <tecnologia@obsdr.com> (Open Business Solutions SRL.) # Copyright (c) 2012 -TODAY Open Business Solutions, SRL. (http://obsdr.com). All rights reserved. # # This is a fork to upg...
agpl-3.0
algorhythms/LintCode
Maximal Square.py
4
2163
""" Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. Example For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 Return 4. """ __author__ = 'Daniel' class Solution: def maxSquare(self, matrix): """ Algo...
apache-2.0
leomorsy/medical8.0
oemedical_emr/models/oemedical_prescription_order.py
3
3191
# -*- coding: utf-8 -*- #/############################################################################# # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free sof...
agpl-3.0
kosz85/django
django/db/migrations/executor.py
18
17479
from django.apps.registry import apps as global_apps from django.db import migrations, router from .exceptions import InvalidMigrationPlan from .loader import MigrationLoader from .recorder import MigrationRecorder from .state import ProjectState class MigrationExecutor: """ End-to-end migration execution - ...
bsd-3-clause
vnsofthe/odoo
openerp/addons/base/ir/ir_qweb.py
38
64677
# -*- coding: utf-8 -*- import collections import cStringIO import datetime import hashlib import json import itertools import logging import math import os import re import sys import textwrap import uuid from subprocess import Popen, PIPE from urlparse import urlparse import babel import babel.dates import werkzeug ...
agpl-3.0
espadrine/opera
chromium/src/third_party/python_26/Lib/site-packages/win32/Demos/eventLogDemo.py
17
3273
import win32evtlog, traceback import win32api, win32con import win32security # To translate NT Sids to account names. from win32evtlogutil import * def ReadLog(computer, logType="Application", dumpEachRecord = 0): # read the entire log back. h=win32evtlog.OpenEventLog(computer, logType) numRecords = win32...
bsd-3-clause
hjfreyer/marry-fuck-kill
backend/core.py
1
11449
#!/usr/bin/env python # # Copyright 2011 Hunter Freyer and Michael Kelly # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
rmhyman/DataScience
Lesson1/IntroToPandas.py
1
1976
import pandas as pd ''' The following code is to help you play with the concept of Series in Pandas. You can think of Series as an one-dimensional object that is similar to an array, list, or column in a database. By default, it will assign an index label to each item in the Series ranging from 0 to N, where N...
mit
tedelhourani/ansible
lib/ansible/module_utils/known_hosts.py
7
6918
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
google/dnae
services/service-example/service_example_run.py
1
9308
# Copyright 2018 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,...
apache-2.0
pypa/setuptools
setuptools/_distutils/command/bdist_msi.py
26
35579
# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import os import sys import warnings from distutils.core import Command from distutils.dir_util import remove_tree from dist...
mit
mikemccllstr/seadir
seadir/commands/responses.py
1
1359
'''Command line handlers that address the responses in the Google Sheet''' import logging import os from cliff.lister import Lister import seadir.config as config import seadir.model.responses as responses class Dump(Lister): '''Dump the records from the Google Sheet to the screen''' log = logging.getLogg...
mit
windyuuy/opera
chromium/src/third_party/python_26/Lib/ctypes/test/test_pickling.py
48
2062
import unittest import pickle from ctypes import * import _ctypes_test dll = CDLL(_ctypes_test.__file__) class X(Structure): _fields_ = [("a", c_int), ("b", c_double)] init_called = 0 def __init__(self, *args, **kw): X.init_called += 1 self.x = 42 class Y(X): _fields_ = [("str", c_char...
bsd-3-clause
jacraven/lsiapp
main/auth/dropbox.py
2
1701
# coding: utf-8 # pylint: disable=missing-docstring, invalid-name import flask import auth import config import model from main import app dropbox_config = dict( access_token_method='POST', access_token_url='https://api.dropbox.com/1/oauth2/token', authorize_url='https://www.dropbox.com/...
mit
davidzchen/tensorflow
tensorflow/python/keras/distribute/model_collection_base.py
11
1687
# 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...
apache-2.0
cyrixhero/Django-facebook
docs/docs_env/Lib/encodings/zlib_codec.py
533
3015
""" Python 'zlib_codec' Codec - zlib compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import zlib # this codec needs the optional zlib modu...
bsd-3-clause
neale/CS-program
434-MachineLearning/final_project/linearClassifier/sklearn/__init__.py
27
3086
""" Machine learning module for Python ================================== sklearn is a Python module integrating classical machine learning algorithms in the tightly-knit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are acc...
unlicense
WarrenWeckesser/scipy
scipy/interpolate/fitpack.py
16
26807
__all__ = ['splrep', 'splprep', 'splev', 'splint', 'sproot', 'spalde', 'bisplrep', 'bisplev', 'insert', 'splder', 'splantider'] import warnings import numpy as np # These are in the API for fitpack even if not used in fitpack.py itself. from ._fitpack_impl import bisplrep, bisplev, dblint from . import _f...
bsd-3-clause
blackbliss/callme
flask/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py
163
11979
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from io import BytesIO import logging import os import re import struct import sys from .compat import sysconfig, fsencode, detect_encoding, ...
mit
mfussenegger/jedi
test/static_analysis/arguments.py
20
1150
# ----------------- # normal arguments (no keywords) # ----------------- def simple(a): return a simple(1) #! 6 type-error-too-few-arguments simple() #! 10 type-error-too-many-arguments simple(1, 2) #! 10 type-error-too-many-arguments simple(1, 2, 3) # ----------------- # keyword arguments # -----------------...
mit
junhuac/MQUIC
src/tools/gyp/pylib/gyp/xcode_emulation.py
7
67036
# 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ import copy import gyp.common...
mit
xavieraijon/init
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
2736
1804
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
mit
chfw/Flask-Excel
examples/database_example_formatted.py
2
3569
""" database_example_formatted.py :copyright: (c) 2015 by C. W. :license: New BSD """ from flask import Flask, request, jsonify, redirect, url_for import flask_excel as excel from flask_sqlalchemy import SQLAlchemy from datetime import datetime # please uncomment the following line if you use pyexcel < 0.2.2 # import ...
bsd-3-clause
dmitriy0611/django
tests/m2m_through_regress/tests.py
182
9847
from __future__ import unicode_literals from django.contrib.auth.models import User from django.core import management from django.test import TestCase from django.utils.six import StringIO from .models import ( Car, CarDriver, Driver, Group, Membership, Person, UserMembership, ) class M2MThroughTestCase(TestCa...
bsd-3-clause
raj454raj/eden
tests/dbmigration/example_migration.py
33
2001
import os import sys import copy import subprocess WEB2PY_PATH = sys.argv[1] APP = sys.argv[2] changed_table = "org_organisation" new_field = "type_id" new_table = "org_organisation_type" old_field = "type" new_table_field = "name" os.chdir(WEB2PY_PATH) sys.path.append(WEB2PY_PATH) from gluon.custom_import import cu...
mit
ahmadRagheb/goldenHR
erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py
62
3071
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ def execute(filters=None): columns = get_columns() proj_details = get_project_details() pr_item_map = get_purchas...
gpl-3.0
clubcapra/Ibex
src/capra_ai/scripts/igvc_basic_north.py
1
1052
#! /usr/bin/env python from state_ai import StateAi import rospy from math import pi from std_msgs.msg import Bool class IGVCBasicNorth(StateAi): def __init__(self): super(IGVCBasicNorth, self).__init__("igvc_basic_north") def on_start(self): #self.generate_circle(2.0, pi/4, 2 * pi - pi/4, ...
gpl-3.0
batxes/4c2vhic
SHH_WT_models_highres/SHH_WT_models_highres_final_output_0.1_-0.1_5000/SHH_WT_models_highres22408.py
4
88247
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
green-span/green-mail
old/imapproxyserver.py
1
2623
#|############################################################################## #|Copyright (c) 2009, The Green-Span Project. All rights reserved. This code is #|Open Source Free Software - redistribution and use in source and binary forms, #|with or without modification, are permitted under the Two Clause BSD Li...
bsd-2-clause
altsen/diandiyun-platform
lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py
9
10824
""" Send emails to users inviting them to add their course certificates to their LinkedIn profiles. """ from smtplib import SMTPServerDisconnected, SMTPDataError, SMTPConnectError, SMTPException import json import logging import urllib from boto.exception import AWSConnectionError from boto.ses.exceptions import ( ...
agpl-3.0
jupyter/nbgrader
nbgrader/tests/nbextensions/test_validate_assignment.py
3
7158
import pytest from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException, NoSuchElementException, NoAlertPresentException from .conftest import _make_nbserv...
bsd-3-clause
nkvelkov/Pyganizer
source/tests/test_task_scheduler.py
1
2614
import unittest from task_scheduler import TaskScheduler from task import Task import arrow class TaskSchedulerTestCase(unittest.TestCase): def setUp(self): self.task_scheduler = TaskScheduler() self.tz = 'local' self.datetime = arrow.Arrow(2015, 5, 9, 11, 11, 11, tzinfo=self.tz) s...
gpl-2.0
Glasgow2015/team-10
env/lib/python2.7/site-packages/PIL/ImageFilter.py
87
6618
# # The Python Imaging Library. # $Id$ # # standard filters # # History: # 1995-11-27 fl Created # 2002-06-08 fl Added rank and mode filters # 2003-09-15 fl Fixed rank calculation in rank filter; added expand call # # Copyright (c) 1997-2003 by Secret Labs AB. # Copyright (c) 1995-2002 by Fredrik Lundh. # # See t...
apache-2.0
xisisu/RT-Xen
tools/python/logging/logging-0.4.9.2/test/log_test5.py
42
1795
#!/usr/bin/env python # # Copyright 2001-2002 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright n...
gpl-2.0
simongoffin/website_version
addons/purchase_requisition/wizard/purchase_requisition_partner.py
373
2320
# -*- 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...
agpl-3.0
menardorama/ReadyNAS-Add-ons
headphones-1.0.0/files/apps/headphones/lib/unidecode/x1d4.py
248
3839
data = ( 'A', # 0x00 'B', # 0x01 'C', # 0x02 'D', # 0x03 'E', # 0x04 'F', # 0x05 'G', # 0x06 'H', # 0x07 'I', # 0x08 'J', # 0x09 'K', # 0x0a 'L', # 0x0b 'M', # 0x0c 'N', # 0x0d 'O', # 0x0e 'P', # 0x0f 'Q', # 0x10 'R', # 0x11 'S', # 0x12 'T', # 0x13 'U', # 0...
gpl-2.0
panchenji/Ryu_modified
ryu/controller/tunnels.py
50
6952
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne jp> # # 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 # # h...
apache-2.0
jeffninghan/tracker
OCR_test/ocr_test.py
1
1285
import numpy as np import cv2 from matplotlib import pyplot as plt # test algorithm to recognize digits using kNN # source: http://docs.opencv.org/trunk/doc/py_tutorials/py_ml/py_knn/py_knn_opencv/py_knn_opencv.html img = cv2.imread('../data/digits.png') gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) # Now we split the...
mit
be-cloud-be/horizon-addons
web/web_search_alphabetic/__init__.py
2
1129
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011-2014 Serpent Consulting Services (<http://www.serpentcs.com>) # # This program is f...
agpl-3.0
darkleons/BE
addons/crm/res_partner.py
47
4790
# -*- 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...
agpl-3.0
viewdy/phantomjs2
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/watchlist.py
134
2280
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
polojacky/ehfpi
ehf/filebrowser/management/commands/fb_version_remove.py
13
5220
# coding: utf-8 # PYTHON IMPORTS import os import re # DJANGO IMPORTS from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.utils.six.moves import input # FILEBROWSER IMPORTS from filebrowser.settings import EXTENSION_LIST, EXCLUDE, DIRECTORY, VERSIONS, EXTENS...
apache-2.0
wildtetris/python-social-auth
social/tests/backends/test_stocktwits.py
91
1658
import json from social.tests.backends.oauth import OAuth2Test class StocktwitsOAuth2Test(OAuth2Test): backend_path = 'social.backends.stocktwits.StocktwitsOAuth2' user_data_url = 'https://api.stocktwits.com/api/2/account/verify.json' expected_username = 'foobar' access_token_body = json.dumps({ ...
bsd-3-clause
young-geng/leet_code
problems/200_number-of-islands/main.py
1
2271
# https://leetcode.com/problems/number-of-islands/ class Solution(object): def numIslands(self, grid): """ :type grid: List[List[str]] :rtype: int """ if len(grid) == 0: return 0 cols,rows = len(grid), len(grid[0]) def dfs(i, j): """ he...
mit
onponomarev/ganeti
lib/build/sphinx_ext.py
3
18231
# # # Copyright (C) 2011, 2012, 2013 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
bsd-2-clause
anryko/ansible
lib/ansible/modules/network/netvisor/pn_port_config.py
38
12285
#!/usr/bin/python # Copyright: (c) 2018, Pluribus Networks # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['...
gpl-3.0
UOMx/edx-platform
lms/djangoapps/instructor/views/instructor_dashboard.py
3
30702
""" Instructor Dashboard Views """ import logging import datetime from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey import uuid import pytz from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from django.utils.translation imp...
agpl-3.0
agentxan/plugin.video.emby
resources/lib/mutagen/easyid3.py
38
15099
# -*- coding: utf-8 -*- # Copyright (C) 2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. """Easier access to ID3 tags. EasyID3 is a wrapper around mutagen.id...
gpl-2.0
AICP/external_chromium_org
tools/deep_memory_profiler/subcommands/upload.py
123
2545
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import subprocess import tempfile import zipfile from lib.subcommand import SubCommand from lib.symbol import SymbolDataSources L...
bsd-3-clause
Endika/OpenUpgrade
addons/sale_journal/__openerp__.py
262
2637
# -*- 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...
agpl-3.0
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/matplotlib/sphinxext/plot_directive.py
1
28321
""" A directive for including a matplotlib plot in a Sphinx document. By default, in HTML output, `plot` will include a .png file with a link to a high-res .png and .pdf. In LaTeX output, it will include a .pdf. The source code for the plot may be included in one of three ways: 1. **A path to a source file** as t...
mit
vpelletier/neoppod
neo/storage/app.py
1
13647
# # Copyright (C) 2006-2016 Nexedi SA # # 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 2 # of the License, or (at your option) any later version. # # This program is distributed...
gpl-2.0
sq5bpf/osmo-tetra-sq5bpf
src/demod/python-3.6/usrp1-tetra_demod.py
9
5194
#!/usr/bin/env python import sys import math from gnuradio import gr, gru, audio, eng_notation, blks2, optfir from gnuradio import usrp from gnuradio.eng_option import eng_option from optparse import OptionParser try: import cqpsk except: from tetra_demod import cqpsk # applies frequency translation, resampl...
agpl-3.0
sontek/rethinkdb
external/v8_3.30.33.16/tools/push-to-trunk/chromium_roll.py
40
4767
#!/usr/bin/env python # Copyright 2014 the V8 project 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 argparse import os import sys from common_includes import * class Preparation(Step): MESSAGE = "Preparation." def RunS...
agpl-3.0
JonathanBennett/marathon-metric-forwarder
node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
1407
47697
# 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. """ This module helps emulate Visual Studio 2008 behavior on top of other build systems, primarily ninja. """ import os import re import subprocess import sys fr...
mit
wileeam/airflow
airflow/migrations/versions/cf5dc11e79ad_drop_user_and_chart.py
7
3768
# 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...
apache-2.0
etnestad/xcsoar
tools/gdb.py
25
7308
# # XCSoar Glide Computer - http://www.xcsoar.org/ # Copyright (C) 2000-2012 The XCSoar Project # A detailed list of copyright holders can be found in the file "AUTHORS". # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published ...
gpl-2.0
natetrue/ReplicatorG
skein_engines/skeinforge-31/fabmetheus_utilities/geometry/geometry_tools/path.py
2
6168
""" Face of a triangle mesh. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module. import __init__ from fabmetheus_utilities.geometry.geometry_tools import dictionary fro...
gpl-2.0
xzovy/cryptographer.py
cryptochatter-server.py
1
2340
# chat_server.py import sys, socket, select HOST = '' SOCKET_LIST = [] RECV_BUFFER = 4096 PORT = 443 def chat_server(): server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server_socket.bind((HOST, PORT)) server_soc...
gpl-2.0
lrr-tum/mmbwmon
vendor/fast-lib/vendor/mosquitto-1.4.12/test/lib/03-publish-c2b-qos2-disconnect.py
10
3012
#!/usr/bin/env python # Test whether a client sends a correct PUBLISH to a topic with QoS 2 and responds to a disconnect. import inspect import os import socket import sys # From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder cmd_subfolder = os.path.realpath(os.path.abspath(os.path.jo...
gpl-3.0
j340m3/python-msquaredc
docs/conf.py
1
1313
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', 'sphinx.ext.ifconfig', 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext....
bsd-2-clause