code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from mission.framework.search import SpiralSearch from mission.framework.helpers import ConsistencyCheck from mission.missions.old.bins import BinsTask as Bins from mission.missions.old.recovery import OptimalRecovery as Recovery from mission.framework.task import Task from mission.missions.old.torpedoes import LocateB...
cuauv/software
mission/missions/old/2017/random_pinger.py
Python
bsd-3-clause
6,914
import gevent import pytest from gevent import coros from boto.s3 import bucket from boto.s3 import key from fast_wait import fast_wait from wal_e import exception from wal_e.worker.s3 import s3_deleter assert fast_wait ISO8601 = '%Y-%m-%dT%H:%M:%SZ' class BucketDeleteKeysCollector(object): """A callable to ...
heroku/wal-e
tests/test_s3_deleter.py
Python
bsd-3-clause
5,541
import theano.sandbox.cuda.basic_ops as sbcuda import numpy as np import load_data import realtime_augmentation as ra import time import sys import json from custom_for_keras import input_generator from datetime import datetime, timedelta import csv import os import cPickle as pickle import matplotlib.pyplot as plt fro...
garbersc/keras-galaxies
testing.py
Python
bsd-3-clause
4,774
#!/usr/bin/env python from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages = ['vigir_behavior_sinusoide_joint_control_test'], package_dir = {'': 'src'} ) setup(**d)
team-vigir/vigir_behaviors
behaviors/vigir_behavior_sinusoide_joint_control_test/setup.py
Python
bsd-3-clause
256
#!/usr/bin/env python import sys, rospy from pimouse_ros.msg import LightSensorValues if __name__ == '__main__': devfile = '/dev/rtlightsensor0' rospy.init_node('lightsensors') pub = rospy.Publisher('lightsensors', LightSensorValues, queue_size=1) rate = rospy.Rate(10) while not rospy.is_shutdown(...
ishigem/pimouse_ros
scripts/lightsensors2.py
Python
bsd-3-clause
885
''' Cryptotrade ----------- This module provides wrappers for the Bitcoin trading APIs available from MtGox and Tradehill. In the future more trading platforms may be added. ''' from setuptools import setup setup( name='Cryptotrade', version='0.1.3', url='https://github.com/maxcountryman/cryptotrade', ...
maxcountryman/cryptotrade
setup.py
Python
bsd-3-clause
582
from setuptools import setup, find_packages import sys, os version = '1.2.6' setup(name='django-cached-field', version=version, description="Celery-deferred, cached fields on Django ORM for expensive-to-calculate data", long_description="""Celery-deferred, cached fields on Django ORM for expensive-t...
aquametalabs/django-cached-field
setup.py
Python
bsd-3-clause
939
import json from jsonobject.exceptions import BadValueError from corehq.apps.userreports.exceptions import BadSpecError from django.utils.translation import ugettext as _ from corehq.apps.userreports.reports.filters.specs import ReportFilter from corehq.apps.userreports.reports.specs import PieChartSpec, \ Multibar...
qedsoftware/commcare-hq
corehq/apps/userreports/reports/factory.py
Python
bsd-3-clause
3,066
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 5, transform = "Logit", sigma = 0.0, exog_count = 20, ar_order = 12);
antoinecarme/pyaf
tests/artificial/transf_Logit/trend_Lag1Trend/cycle_5/ar_12/test_artificial_1024_Logit_Lag1Trend_5_12_20.py
Python
bsd-3-clause
262
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Fabric deployment file. :copyright: (c) 2011 Julen Ruiz Aizpuru. :license: BSD, see LICENSE for more details. """ from fabric.api import cd, env from fabric.context_managers import hide, prefix, settings from fabric.contrib.console import confirm from fabri...
julen/tzos
fabfile.py
Python
bsd-3-clause
4,547
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Game.extra_data' db.add_column('competition_game', 'extra_data', self....
michaelwisely/django-competition
src/competition/migrations/0005_auto__add_field_game_extra_data.py
Python
bsd-3-clause
12,613
import os import numpy as np from scipy import io as sio import SimpleITK as sitk def loadimg(file, target_resolution): if file.endswith('.mat'): filecont = sio.loadmat(file) img = filecont['img'] for z in range(img.shape[-1]): # Flip the image upside down img[:, :, z] = np.fl...
RivuletStudio/rivuletpy
rivuletpy/utils/io.py
Python
bsd-3-clause
5,620
#!/usr/bin/env python import coverage_utils coverage_utils.cov_start() import rospkg import sys rospack = rospkg.RosPack() mission_control_path = rospack.get_path('mission_control') sys.path.append("%s/src" % mission_control_path) import rospy import behaviour from mission_control_utils_constants import Constants fro...
mission-control-ros/mission_control
test/behaviour_variable_node.py
Python
bsd-3-clause
2,286
from helper import * def doTest(): pass
wangjeaf/CSSCheckStyle
tests/unit/todos/TryParseKeyFrames.py
Python
bsd-3-clause
45
#!/usr/bin/env python import math import numpy as np import scipy import scipy.linalg as la import os from sklearn import linear_model class LinearPredictor: def __init__(self): self.m_w = 0 self.m_mean_x = 0 self.m_mean_y = 0 self.m_std_x = 1 # -------------------------...
icoderaven/slytherin_dagger
src/linear_predictor.py
Python
bsd-3-clause
4,306
import argparse import inspect import logging from compago import Option logger = logging.getLogger(__name__) class CommandError(Exception): pass class Command(object): def __init__(self, target, parent=None): self.target = target self.name = target.__name__ if parent: sel...
jmohr/compago
compago/command.py
Python
bsd-3-clause
3,203
# Copyright (C) 2014, 2015 University of Vienna # All rights reserved. # BSD license. # Author: Ali Baharev <ali.baharev@gmail.com> from __future__ import print_function from sys import stderr from codegen import gen_column_permutation from py3compat import irange from utils import has_matplotlib, DATADIR, create_dir ...
baharev/sdopt-tearing
plot_ordering.py
Python
bsd-3-clause
8,578
import subprocess subprocess.call(["coverage", "run", "--source", "toyplot", "--omit", "toyplot/testing.py", "-m", "nose", "--exclude-dir", "toyplot"]) subprocess.call(["coverage", "run", "--append", "--source", "toyplot", "--omit", "toyplot/testing.py", "-m", "behave"]) subprocess.ca...
cmorgan/toyplot
regression.py
Python
bsd-3-clause
410
from helper import * def doTest(): _combine_should_not_make_mistake() _totally_same_ruleset() do_not_touch_background_position() _do_not_change_comment() def _combine_should_not_make_mistake(): css = '''.a {width:0px} .a, .b{width:1px} .b{width:0px}''' expected = '''.a { width: 0; } .a,...
wangjeaf/CSSCheckStyle
tests/unit/fix/FEDCombineSameRuleSets.py
Python
bsd-3-clause
1,544
import os from setuptools import setup setup( name="django-recurrence", use_scm_version=True, license="BSD", description="Django utility wrapping dateutil.rrule", long_description="\n".join( [ open("README.rst", encoding="utf-8").read(), open("CHANGES.rst", encoding...
django-recurrence/django-recurrence
setup.py
Python
bsd-3-clause
2,011
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2008 Jason Davies # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. try: from setuptools import setup except ImportError: from distutils.core impor...
jasondavies/couchdb-fuse
setup.py
Python
bsd-3-clause
1,251
#!/usr/bin/env python # Copyright (c) 2014, Paessler AG <support@paessler.com> # 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 not...
PaesslerAG/PythonMiniProbe
miniprobe/miniprobe.py
Python
bsd-3-clause
7,571
""" A module which handles Matrix Expressions """ from .slice import MatrixSlice from .blockmatrix import BlockMatrix, BlockDiagMatrix, block_collapse, blockcut from .funcmatrix import FunctionMatrix from .inverse import Inverse from .matadd import MatAdd from .matexpr import (Identity, MatrixExpr, MatrixSymbol, ZeroM...
kaushik94/sympy
sympy/matrices/expressions/__init__.py
Python
bsd-3-clause
847
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-03-29 16:56 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('jobs', '0033_job_config'), ] operations = [ migrations.RemoveField( model_...
hotosm/osm-export-tool2
jobs/migrations/0034_remove_job_configs.py
Python
bsd-3-clause
377
from django.utils import timezone from rest_framework import serializers from shop.conf import app_settings from shop.models.cart import CartModel from shop.models.order import OrderModel from shop.modifiers.pool import cart_modifiers_pool from shop.rest.money import MoneyField class OrderListSerializer(serializers.M...
awesto/django-shop
shop/serializers/order.py
Python
bsd-3-clause
3,455
#Copyright (c) 2015, Matthew P. Grosvenor #All rights reserved. See LICENSE for more details import sys import os import subprocess import datetime import thread import threading import Queue import fcntl import select import time import signal #(optionaly) Make pretty logs of everything that we do def log(logfile,ms...
mgrosvenor/redo
redo.py
Python
bsd-3-clause
26,098
"""Tests for spelling.able_atable check.""" from proselint.checks.spelling import able_atable as chk from .check import Check class TestCheck(Check): """The test class for spelling.able_atable.""" __test__ = True @property def this_check(self): """Boilerplate.""" return chk de...
amperser/proselint
tests/test_spelling_able_atable.py
Python
bsd-3-clause
543
# Copyright (C) 2003-2005 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
liyongyue/dnsspider
dns/rdtypes/ANY/AFSDB.py
Python
isc
1,841
from sleekxmpp.test import * from sleekxmpp.xmlstream.stanzabase import ElementBase class TestElementBase(SleekTest): def testFixNs(self): """Test fixing namespaces in an XPath expression.""" e = ElementBase() ns = "http://jabber.org/protocol/disco#items" result = e._fix_ns("{%s}...
skinkie/SleekXMPP--XEP-0080-
tests/test_stanza_element.py
Python
mit
19,610
from conans.errors import NotFoundException, RequestErrorException, RecipeNotFoundException, \ PackageNotFoundException from conans.server.service.common.common import CommonService class ConanService(CommonService): """Handles authorization and expose methods for REST API""" def __init__(self, authorize...
memsharded/conan
conans/server/service/v1/service.py
Python
mit
3,783
""" Computes, plots, and saves the 2D vorticity field from a PetIBM simulation at saved time-steps. """ from snake.petibm.simulation import PetIBMSimulation simulation = PetIBMSimulation() simulation.read_grid() for time_step in simulation.get_time_steps(): simulation.read_fields('vorticity', time_step) simulat...
barbagroup/cuIBM
external/snake-0.3/examples/petibm/plotVorticity.py
Python
mit
590
from mpfmc.tests.MpfMcTestCase import MpfMcTestCase class TestWidgetStyles(MpfMcTestCase): def get_machine_path(self): return 'tests/machine_files/widget_styles' def get_config_file(self): return 'test_widget_styles.yaml' def get_widget(self, index=0): return self.mc.targets['def...
missionpinball/mpf_mc
mpfmc/tests/test_WidgetStyles.py
Python
mit
2,684
import torch import torch.nn as nn import argparse from sklearn.metrics import classification_report from losses import CenterLoss from mnist_net import Net import mnist_loader def main(): args = parse_args() # Device device = torch.device("cuda" if torch.cuda.is_available() else "cpu") # Dataset train_loade...
iShoto/testpy
codes/20200106_metric_learning_cifar10/src/test.py
Python
mit
2,170
# -*- coding: utf-8 -*- # # ScribleMark documentation build configuration file, created by # sphinx-quickstart on Sun Feb 22 06:46:26 2015. # # 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 # autogenerated file. #...
scribenet/jabiru
docs/conf.py
Python
mit
10,227
import os, sys sys.path.append('.\libraries') #from pabuehle_utilities_CV_v1 import * from pabuehle_utilities_general_v0 import * import requests, json, base64, datetime, time, threading from flask import Flask, jsonify #################################### # Parameters #################################### #imgDir =...
Edeleon4/PoolShark
flask/wildnature/WebProject1/obj/Release/Package/PackageTmp/apiCall.py
Python
mit
3,096
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: theme_specifics.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(im...
valurhrafn/chrome-sync-server
protocol/theme_specifics_pb2.py
Python
mit
3,431
""" String Substitution for a Mad Lib Adapted from code by Kirby Urner """ story = """ Once upon a time, deep in an ancient jungle, there lived a %(animal)s. This %(animal)s li...
deniederhut/programming-fundamentals
madlib.py
Python
mit
1,400
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
jkonecki/autorest
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/Http/setup.py
Python
mit
1,139
"""Snappy libmemcached wrapper pylibmc is a Python wrapper around TangentOrg's libmemcached library. The interface is intentionally made as close to python-memcached as possible, so that applications can drop-in replace it. Example usage ============= Create a connection and configure it:: >>> import pylibmc ...
alcance/blog_ng
build/pylibmc/src/pylibmc/__init__.py
Python
mit
2,410
# -*- coding: utf-8 -*- import random from twitterapi import TwitterAPI from tweets import tweets twitter = TwitterAPI() last_tweets = twitter.timeline('abadbot', 5) def get_random_tweet(): return random.choice(tweets) def get_new_tweet(): new_tweet = get_random_tweet() for tweet in last_tweets: ...
juanrossi/abadbot
bot.py
Python
mit
786
## \namespace orbit::parsers ## \brief Accelerator lattice parsers. ## ## Classes: ## - mad_parser - MAD-8 parser ## - sad_parser - SAD parser from mad_parser import MAD_Parser from mad_parser import MAD_LattElement from mad_parser import MAD_LattLine from madx_parser import MADX_Parser from madx_parser import MADX_L...
azukov/py-orbit
py/orbit/parsers/__init__.py
Python
mit
781
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 # Global Map Tiles Classes # Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, # generate a simple HTML viewers b...
geometalab/OSM-Crosswalk-Detection
src/base/globalmaptiles.py
Python
mit
14,459
import numpy as np from cea.constants import HEAT_CAPACITY_OF_WATER_JPERKGK from cea.technologies.boiler import cond_boiler_op_cost from cea.technologies.cogeneration import calc_cop_CCGT from cea.technologies.constants import BOILER_MIN from cea.technologies.furnace import furnace_op_cost from cea.technologies.he...
architecture-building-systems/CEAforArcGIS
cea/optimization/slave/heating_resource_activation.py
Python
mit
12,639
""" test_meta: ========== A module intended for use with Nose. """ from __future__ import absolute_import import random import string from unittest import skip from chart_studio import plotly as py from chart_studio.exceptions import PlotlyRequestError from chart_studio.grid_objs import Column, Grid from chart_stu...
plotly/python-api
packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_meta/test_meta.py
Python
mit
1,805
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/weapon_capacitor/shared_cap_mandal_tuned_powermaster...
anhstudios/swganh
data/scripts/templates/object/tangible/ship/components/weapon_capacitor/shared_cap_mandal_tuned_powermaster_mk2.py
Python
mit
519
# -*- coding:utf-8 -*- import os, sys current_path = os.path.dirname(os.path.abspath(__file__)) root_path = os.path.abspath( os.path.join(current_path, os.pardir)) sys.path.append(root_path) import threading import time import unittest from socket import error as sock_error from ftplib import FTP, FTP_TLS, error_temp...
johnkeepmoving/oss-ftp
test/login.py
Python
mit
4,240
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from referral.compat import AUTH_USER_MODEL class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Campaign.pattern' db.add_column('referral_campai...
Chris7/django-referral
referral/south_migrations/0002_auto__add_field_campaign_pattern.py
Python
mit
5,531
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-22 11:28 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_pgjson.fields class Migration(migrations.Migration): dependencies = [ mi...
jscott1989/happening
src/events/migrations/0002_auto_20170422_1128.py
Python
mit
1,610
import babel.numbers import babel.dates import decimal import locale from datetime import datetime from urlparse import urlparse from slugify import slugify from grano.core import app, url_for from grano.model import Schema, Project, Entity STOPWORDS = ['of', 'the', 'for', 'die', 'der', 'das', 'at', 'de', ...
IuliiSe/openinterests.eu
openinterests/views/util.py
Python
mit
3,044
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Building() result.template = "object/building/player/city/shared_garden_corellia_sml_03.iff" result.attribute_tem...
obi-two/Rebelion
data/scripts/templates/object/building/player/city/shared_garden_corellia_sml_03.py
Python
mit
458
"""Experiment data storage. There are two main use cases for the functionality in this module: reading/writing data during an experiment session, and reading data once an experiment is complete (i.e. for analysis). See the :ref:`user guide <storage>` for information on these use cases/api.jpeg/api.jpeg/api.jpeg. """ ...
ucdrascal/axopy
axopy/storage.py
Python
mit
12,668
import os import pytest from pyqode.qt import QtCore from pyqode.qt import QtWidgets from pyqode.qt.QtTest import QTest import datetime from pyqode.core import modes from test.helpers import editor_open, preserve_settings file_path = os.path.join( os.getcwd(), 'test', 'test_modes', 'file_to_watch.txt') def setu...
zwadar/pyqode.core
test/test_modes/test_filewatcher.py
Python
mit
2,194
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/structure/general/shared_data_terminal_wall_s2.iff" result.attribute_te...
obi-two/Rebelion
data/scripts/templates/object/static/structure/general/shared_data_terminal_wall_s2.py
Python
mit
459
from __future__ import print_function, unicode_literals, division import unittest import os import re from subprocess import check_output from tempfile import mkdtemp from pyrouge import Rouge155 from pyrouge.utils.file_utils import str_from_file, xml_equal module_path = os.path.dirname(__file__) os.chdir(module_p...
bheinzerling/pyrouge
pyrouge/tests/Rouge155_test.py
Python
mit
9,629
from __future__ import division import numpy as np from six.moves import range def normalize(theta, start=0): """ Normalize an angle to be in the range :math:`[0, 2\pi]` Parameters ----------- theta : float input angle to normalize start: float input start angle (optional, ...
srl-freiburg/navmet
navmet/utils.py
Python
mit
7,719
#!/usr/bin/env python3 # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2016 The Bitsend Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ impo...
madzebra/BitSend
contrib/linearize/linearize-hashes.py
Python
mit
3,974
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Result', fields=[ ('id', models.AutoField(verbo...
nalabelle/druid-django
frontend/migrations/0001_initial.py
Python
mit
536
from random import randint board = [] for x in range(5): board.append(["O"] * 5) def print_board(board): for row in board: print " ".join(row) print "Let's play Battleship!" print_board(board) def random_row(board): return randint(0, len(board) - 1) def random_col(board): return randint(0,...
vpstudios/Codecademy-Exercise-Answers
Language Skills/Python/Unit 7/2-Battleship!/You Sunk my Battleship/18-To Your Battle Stations.py
Python
mit
1,124
from numpy import array from numpy.testing import assert_allclose from glimix_core.cov import FreeFormCov def test_freeformcov(): cov = FreeFormCov(3) L = array([[1.5, 0, 0], [2.5, 0.8, 0], [-0.3, 0.4, 2.1]], float) cov.L = L assert_allclose(cov.value(), L @ L.T, rtol=1e-4) assert_allclose(cov._...
limix/glimix-core
glimix_core/cov/test/test_cov_free.py
Python
mit
878
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/loot/quest/shared_valarian_dagger.iff" result.attribute_template_id...
anhstudios/swganh
data/scripts/templates/object/tangible/loot/quest/shared_valarian_dagger.py
Python
mit
452
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import django.contrib.auth.models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), ...
metabrainz/botbot-web
botbot/apps/accounts/migrations/0002_auto_20150630_1459.py
Python
mit
2,751
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Direct unit tests for L{twisted.trial.unittest.TestCase}. """ from twisted.trial.unittest import TestCase class TestCaseTests(TestCase): """ L{TestCase} tests. """ class MyTestCase(TestCase): """ Some test me...
Varriount/Colliberation
libs/twisted/trial/test/test_testcase.py
Python
mit
1,449
import unittest import checksieve class TestStrings(unittest.TestCase): def test_multiline_strings(self): sieve = ''' require "vacation"; vacation :mime "Content-Type: multipart/alternative; boundary=foo --foo I'm at the beach relaxing. Mm...
dburkart/check-sieve
test/3028/strings_test.py
Python
mit
973
#! /usr/bin/env python # -*- coding: utf8 -*- import os,sys predoi="10.1021/" pos1str='<notes><style face="normal" font="default" size="100%">' pos1len=len(pos1str) pos2str='Times Cited' pos2len=len(pos2str) doistr='<electronic-resource-num><style face="normal" font="default" size="100%">' doistrlen=len(doistr) subs...
OAPDF/oapdftools
oapdf/GrepPDF/modifyXML.py
Python
mit
1,356
# -*- coding: utf-8 -*- import sys import re from PyQt4 import QtCore, QtGui from pygments import highlight from pygments.lexers import * from pygments.formatter import Formatter import time # Copyright (C) 2008 Christophe Kibleur <kib2@free.fr> # # This file is part of WikiParser (http://thewikiblog.appspot.com/). # ...
aquavitae/rst2pdf
gui/highlighter.py
Python
mit
4,089
#!/usr/bin/env python # Accelerator for pip, the Python package manager. # # Author: Peter Odding <peter.odding@paylogic.com> # Last Change: May 17, 2016 # URL: https://github.com/paylogic/pip-accel """Setup script for the `pip-accel` package.""" # Standard library modules. import codecs import os import re # De-fa...
pombredanne/pip-accel
setup.py
Python
mit
3,671
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/intangible/pet/shared_malkloc_hue.iff" result.attribute_template_id = -1 ...
anhstudios/swganh
data/scripts/templates/object/intangible/pet/shared_malkloc_hue.py
Python
mit
424
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-containerservice/azure/mgmt/containerservice/models/managed_cluster_upgrade_profile.py
Python
mit
2,281
def entrada(lista): while True: ad = (int(input('Digite um valor: '))) if ad not in lista: lista.append(ad) print('Adicionado com sucesso!') else: print('Valor duplicado. Adição negada.') while True: ask = str(input('Deseja continuar?[S...
bigown/SOpt
Python/Algorithm/WhileBreak.py
Python
mit
533
import json import httplib from django.http import HttpResponse from Bio.Alphabet import IUPAC from hippo import clean_sequence import features import orfs import gb def _post(params, is_ajax): """ Post a sequence and run the sequence through blast and orf detection. Expects: db and sequence Response:...
UndeadBlow/giraffe
src/giraffe/views.py
Python
mit
5,133
''' * TeleStax, Open Source Cloud Communications * Copyright 2011-2016, Telestax Inc and individual contributors * by the @authors tag. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; ei...
RestComm/restcomm-sdk-python
Restcomm_Python_SDk/Restcomm/UssdPush/UssdPush.py
Python
mit
2,591
try: from setuptools import setup, find_packages except ImportError: import sys print >>sys.stderr, "Error: setuptools is required to install this package." sys.exit(1) __version__ = '1.4.1' __author__ = 'Christopher Roach' __email__ = 'croach@freshplum.com' __license__ = 'MIT' setup( name='djang...
croach/django-simple-rest
setup.py
Python
mit
1,291
from req import WebRequestHandler from req import Service import tornado class Web404Handler(WebRequestHandler): @tornado.gen.coroutine def get(self): self.write_error(404)
allenwhalecs03/nctu_hackathon
backend/web/error.py
Python
mit
191
# elected_office/admin.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.contrib import admin # Register your models here.
jainanisha90/WeVoteServer
elected_office/admin.py
Python
mit
152
''' Text ==== An abstraction of text creation. Depending of the selected backend, the accuracy of text rendering may vary. .. versionchanged:: 1.5.0 :attr:`LabelBase.line_height` added. .. versionchanged:: 1.0.7 The :class:`LabelBase` does not generate any texture if the text has a width <= 1. This is t...
JohnHowland/kivy
kivy/core/text/__init__.py
Python
mit
27,271
from hearthbreaker.cards.minions.neutral import ( BloodfenRaptor, IronbeakOwl, NoviceEngineer, StonetuskBoar, WarGolem, MogushanWarden, FaerieDragon, KoboldGeomancer, ElvenArcher, ArgentSquire, SilvermoonGuardian, TwilightDrake, MagmaRager, DireWolfAlpha, Worg...
slaymaker1907/hearthbreaker
hearthbreaker/cards/minions/__init__.py
Python
mit
7,607
''' Copyright 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska This example implements the external hydrological model HYMOD into SPOTPY. ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function ...
thouska/spotpy
spotpy/examples/spot_setup_hymod_unix.py
Python
mit
4,291
# ***************************************************************************** # Copyright (c) 2015, 2019 IBM Corporation and other Contributors. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distrib...
ibm-watson-iot/iot-python
samples/exportTool/exportTool.py
Python
epl-1.0
3,508
# pylint: disable=W0223 import textwrap import warnings import numpy as np from pandas.compat import range, zip import pandas.compat as compat from pandas.core.dtypes.generic import ABCDataFrame, ABCPanel, ABCSeries from pandas.core.dtypes.common import ( is_integer_dtype, is_integer, is_float, is_list_like...
Ziqi-Li/bknqgis
pandas/pandas/core/indexing.py
Python
gpl-2.0
73,643
# -*- coding: utf-8 -*- """ :created: 9 Jan 2014 :author: kimon :copyright: © 2014 Kimon Tsitsikas, Delmic This file is part of Odemis. .. license:: Odemis 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 Softwa...
delmic/odemis
src/odemis/acq/test/stream_drift_test.py
Python
gpl-2.0
3,620
# Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2018 Pacman Development Team <pacman-dev@archlinux.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...
kylon/pacman-fakeroot
test/pacman/pmenv.py
Python
gpl-2.0
2,029
from conf.defaults import mysql class settings(): apikey = "INVALID-API-KEY" channel = "#BrokenBots" callSign = "unbot" name = "UnNamedBot" manOpList = ["Oper1","Oper2","Oper3"] commandPrefix = "!" #Leave as "" to disallow filterBotMessages = True # textPrefix = ...
MrMindImplosion/Slack-Bots
conf/defaults/__init__.py
Python
gpl-2.0
378
# coding: utf8 # Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
makerplane/FIX-Gateway
fixgw/plugins/rpi_bmp085/Adafruit_BMP/BMP085.py
Python
gpl-2.0
9,066
import random import string import md5 import re import time import json import urllib import urlparse _domain="cartoonhd.website" domain="http://%s"%_domain search="evokjaqbb8" slk="0A6ru35yyi5yn4THYpJqy0X82tE95btV" encoding="utf-8" def iframe(src): ret=None for sep in ['"',"'"]: res=re.findall("<iframe*.?src="+...
boogiekodi/plugin.program.ump
lib/providers/video_link_cartoonhd.py
Python
gpl-2.0
3,714
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
luisgg/iteexe
exe/webui/truefalseelement.py
Python
gpl-2.0
11,157
# -*- coding: utf-8 -*- """ *************************************************************************** OTBUtils.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya (C) 2013 by CS Systemes d'information (CS SI) Email...
sebastic/QGIS
python/plugins/processing/algs/otb/OTBUtils.py
Python
gpl-2.0
10,080
#!/usr/bin/env python import sys, os, getpass, datetime # PyGithub >= 1.13 is required https://pypi.python.org/pypi/PyGithub from github import Github from github_issues import GithubIssuesBase, GithubIssues # You could use OAuth here too for unattended access # see http://developer.github.com/v3/oauth/#create-a-new...
rbbratta/virt-test
tools/github/example.py
Python
gpl-2.0
3,402
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- # # Copyright (C) 2006 - Ed Catmur <ed@catmur.co.uk> # Copyright (C) 2009 - Jonathan Matthew <jonathan@d14n.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
paulbellamy/Rhythmbox-iPod-Plugin
plugins/artdisplay/artdisplay/LocalCoverArtSearchGIO.py
Python
gpl-2.0
6,993
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/rastertransparencydockwidgetbase.ui' # # Created: Mon Jul 29 13:57:02 2013 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QSt...
alfanugraha/LUMENS-repo
processing/raster_transparency/ui/ui_rastertransparencydockwidgetbase.py
Python
gpl-2.0
4,316
import struct import socket import datetime import random import hashlib import proto class Connection(object): def __init__(self, host, port): self.host = host self.port = port self._sock = socket.create_connection((host, port)) def sendall(self, data): return self._sock.se...
matsu777/sheepdog
tests/operation/sheep.py
Python
gpl-2.0
13,447
import os import Components.Task from twisted.internet import reactor, threads, task class FailedPostcondition(Components.Task.Condition): def __init__(self, exception): self.exception = exception def getErrorMessage(self, task): return str(self.exception) def check(self, task): return self.exception is None ...
libo/Enigma2
lib/python/Screens/CopyFiles.py
Python
gpl-2.0
1,518
#!/usr/bin/env python # -*- coding: UTF-8 -*- # REF [site] >> https://github.com/pymupdf/PyMuPDF import fitz # REF [site] >> https://pymupdf.readthedocs.io/en/latest/tutorial.html def tutorial(): pdf_filepath = '/path/to/sample.pdf' try: # Open a document. doc = fitz.open(pdf_filepath) #doc = fitz.Document(...
sangwook236/general-development-and-testing
sw_dev/python/ext/test/documentation/pymupdf_test.py
Python
gpl-2.0
18,130
#!/usr/bin/env python3 import requests import sys import subprocess import argparse def get_commits(pr): try: res = requests.get('https://api.github.com/repos/PowerDNS/pdns/pulls/' '{}/commits'.format(pr)).json() return [c['sha'] for c in res] except (ValueError, re...
oridistor/pdns
build-scripts/cherry-pick-pr.py
Python
gpl-2.0
1,840
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class TicketsConfig(AppConfig): name = 'default_set.tickets' verbose_name = _('Тикеты')
null-none/OpenGain
default_set/tickets/apps.py
Python
gpl-2.0
194
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import os import sys import tempfile import numpy as np import pytest import matplotlib as mpl from matplotlib import pyplot as plt from matplotlib import animation class NullMovieWriter(animati...
jonyroda97/redbot-amigosprovaveis
lib/matplotlib/tests/test_animation.py
Python
gpl-3.0
6,327
# Copyright (C) 2013, Walter Bender # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in...
quozl/sugar
tests/views/journal_detailstoolbox.py
Python
gpl-3.0
1,544
#!/usr/bin/python # -*- coding: utf-8 -*- # # CoMFoRT: a COntent Management system FOr Researchers and Teachers! # # Copyright (C) 2008 Projet2-L3IF ENS Lyon. # # Contributors: # * Jean-Alexandre Angles d'Auriac # * Gabriel Beaulieu # * Valentin Blot # * Pierre Boutillier # * Nicolas Brunie # * Aloï...
vdel/CoMFoRT
src/db/cleaner_xml.py
Python
gpl-3.0
1,998
import pytest @pytest.mark.xfail def test_i_will_fail(): assert False, 'I told you I was going to fail' @pytest.mark.xfail(run=False) def test_i_will_break_things_big_time(): print('Use this to not run e.g. tests that segfault') @pytest.mark.xfail(raises=IndexError) def test_moronic_list_access(): a = []...
mayankjohri/LetsExplorePython
Section 2 - Advance Python/Chapter S2.08 - Automated Testing/code/pytest - Copy/test_xfail/test_1.py
Python
gpl-3.0
495
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
DolphinDream/sverchok
utils/profile.py
Python
gpl-3.0
9,090
# -*- encoding: utf-8 -*- from abjad import * def test_pitchtools_NamedInterval_semitones_01(): assert pitchtools.NamedInterval('perfect', 1).semitones == 0 assert pitchtools.NamedInterval('minor', 2).semitones == 1 assert pitchtools.NamedInterval('major', 2).semitones == 2 assert pitchtools.NamedInt...
mscuthbert/abjad
abjad/tools/pitchtools/test/test_pitchtools_NamedInterval_semitones.py
Python
gpl-3.0
1,185