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
# coding=utf-8 import pygame import pygame.locals class Board(object): """ Plansza do gry. Odpowiada za rysowanie okna gry. """ def __init__(self, width, height): """ Konstruktor planszy do gry. Przygotowuje okienko gry. :param width: szerokość w pikselach ...
roninek/python101
docs/pygame/life/code1a.py
Python
mit
5,039
""" File-based Checkpoints implementations. """ import os import shutil from tornado.web import HTTPError from .checkpoints import ( Checkpoints, GenericCheckpointsMixin, ) from .fileio import FileManagerMixin from IPython.utils import tz from IPython.utils.path import ensure_dir_exists from IPython.utils.py...
wolfram74/numerical_methods_iserles_notes
venv/lib/python2.7/site-packages/IPython/html/services/contents/filecheckpoints.py
Python
mit
6,954
"""Support for monitoring emoncms feeds.""" from __future__ import annotations from datetime import timedelta from http import HTTPStatus import logging import requests import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA, SensorDeviceClass, SensorEntity, SensorState...
rohitranjan1991/home-assistant
homeassistant/components/emoncms/sensor.py
Python
mit
8,487
import glob import logging import os import subprocess from plugins import BaseAligner from yapsy.IPlugin import IPlugin from assembly import get_qual_encoding class Bowtie2Aligner(BaseAligner, IPlugin): def run(self): """ Map READS to CONTIGS and return alignment. Set MERGED_PAIR to True ...
levinas/assembly
lib/assembly/plugins/bowtie2.py
Python
mit
2,404
from __future__ import unicode_literals import os import os.path import subprocess from pre_commit.util import cmd_output class PrefixedCommandRunner(object): """A PrefixedCommandRunner allows you to run subprocess commands with comand substitution. For instance: PrefixedCommandRunner('/tmp/foo...
barrysteyn/pre-commit
pre_commit/prefixed_command_runner.py
Python
mit
1,661
""" Python Blueprint ================ Does not install python itself, only develop and setup tools. Contains pip helper for other blueprints to use. **Fabric environment:** .. code-block:: yaml blueprints: - blues.python """ from fabric.decorators import task from refabric.api import run, info from refa...
gelbander/blues
blues/python.py
Python
mit
997
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible import __version__ from ansible.errors import AnsibleError from distutils.version import LooseVersion from operator import eq, ge, gt from sys import version_info try: from __main__ ...
jeffstieler/bedrock-ansible
lib/trellis/plugins/vars/version.py
Python
mit
2,048
""" A Pygments lexer for Magpie. """ from setuptools import setup __author__ = 'Robert Nystrom' setup( name='Magpie', version='1.0', description=__doc__, author=__author__, packages=['magpie'], entry_points=''' [pygments.lexers] magpielexer = magpie:MagpieLexer ''' )
munificent/magpie-optionally-typed
doc/site/magpie/setup.py
Python
mit
305
'output dimensionalities for each column' import csv import sys import re import math from collections import defaultdict def get_words( text ): text = text.replace( "'", "" ) text = re.sub( r'\W+', ' ', text ) text = text.lower() text = text.split() words = [] for w in text: if w in words: continue wo...
zygmuntz/kaggle-advertised-salaries
optional/cols_dimensionality.py
Python
mit
1,451
# -*- coding: utf-8 -*- import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore import numpy as np import csv, gzip, os from pyqtgraph import Point class GlassDB: """ Database of dispersion coefficients for Schott glasses + Corning 7980 """ def __init__(self, fileName='schott_glasses.csv'): ...
pmaunz/pyqtgraph
examples/optics/pyoptic.py
Python
mit
18,598
import logging from urllib.parse import urljoin import lxml.etree # noqa: S410 import requests from django.conf import settings as django_settings from django.utils import timezone logger = logging.getLogger(__name__) class ClientError(Exception): pass class ResponseParseError(ClientError): pass class ...
opennode/nodeconductor-assembly-waldur
src/waldur_auth_valimo/client.py
Python
mit
9,636
from PyQt4 import QtCore import acq4.Manager import acq4.util.imageAnalysis as imageAnalysis run = True man = acq4.Manager.getManager() cam = man.getDevice('Camera') frames = [] def collect(frame): global frames frames.append(frame) cam.sigNewFrame.connect(collect) def measure(): if len(frames)...
tropp/acq4
acq4/analysis/scripts/beamProfiler.py
Python
mit
976
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Create oauthclient tables.""" import sqlalchemy as sa import sqlalchemy_utils fro...
tiborsimko/invenio-oauthclient
invenio_oauthclient/alembic/97bbc733896c_create_oauthclient_tables.py
Python
mit
2,898
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com from thumbor.loaders import http_loader from tornado.concurrent impor...
jdunaravich/thumbor
thumbor/loaders/strict_https_loader.py
Python
mit
1,086
#### 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/item/shared_armor_composite_helmet.iff" result.attribute_template_id = ...
anhstudios/swganh
data/scripts/templates/object/static/item/shared_armor_composite_helmet.py
Python
mit
447
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
datalogics/scons
test/Perforce/P4COMSTR.py
Python
mit
4,112
# -*- coding: utf-8 -*- from __future__ import unicode_literals import time import string import json import config import helper import busses def log_message(msg): #log format: time type message time_str = str(time.time()) line = time_str[:time_str.find(".")] line = line.rjust(10, str(" ")) li...
Pixdigit/Saufbot
logger.py
Python
mit
1,904
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time import numpy as np import matplotlib matplotlib.use('GTKAgg') from matplotlib import pyplot as plt from koheron import connect from drivers import Spectrum from drivers import Laser host = os.getenv('HOST','192.168.1.100') client = connect(host, nam...
Koheron/lase
examples/spectrum_analyzer.py
Python
mit
1,482
__version__ = '0.8.1' __author__ = "Massimiliano Pippi & Federico Frenguelli" VERSION = __version__ # synonym
ramcn/demo3
venv/lib/python3.4/site-packages/oauth2_provider/__init__.py
Python
mit
113
#! /usr/bin/env python """Show file statistics by extension.""" import os import sys class Stats: def __init__(self): self.stats = {} def statargs(self, args): for arg in args: if os.path.isdir(arg): self.statdir(arg) elif os.path.isfile(arg): ...
OS2World/APP-INTERNET-torpak_2
Tools/scripts/byext.py
Python
mit
3,894
import os import pygtk pygtk.require('2.0') import gtk from gtkcodebuffer import CodeBuffer, SyntaxLoader class Ui(object): """ The user interface. This dialog is the LaTeX input window and includes widgets to display compilation logs and a preview. It uses GTK2 which must be installed an importable...
hvwaldow/inktex
inktex/ui.py
Python
mit
8,707
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class WebPageBlock(Document): pass
adityahase/frappe
frappe/website/doctype/web_page_block/web_page_block.py
Python
mit
272
# -*- coding: utf-8 -*- # # Cloud Robotics FX 会話理解API用メッセージ # # @author: Osamu Noguchi <noguchi@headwaters.co.jp> # @version: 0.0.1 import cloudrobotics.message as message APP_ID = 'SbrApiServices' PROCESSING_ID = 'RbAppConversationApi' # 会話メッセージ # class ConversationMessage(message.CRFXMessage): def __init__...
seijim/cloud-robotics-fx-v2
CloudRoboticsApi/ClientCode_Pepper/HeadWaters/PepperCode2/lib/cloudrobotics/conversation/message.py
Python
mit
746
import time import random from random import randint # from library import Trigger, Axis # from library import PS4 from library import Joystick import RPi.GPIO as GPIO # remove!!! from emotions import angry, happy, confused # from pysabertooth import Sabertooth # from smc import SMC from library import LEDDisplay from...
DFEC-R2D2/r2d2
pygecko/states/remote.py
Python
mit
11,721
#!/usr/bin/env python # -*- coding: utf-8 -*- # # pywim documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 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 # autog...
xmnlab/pywim
docs/conf.py
Python
mit
8,369
__all__ = [] import pkgutil import inspect # http://stackoverflow.com/questions/22209564/python-qualified-import-all-in-package for loader, name, is_pkg in pkgutil.walk_packages(__path__): module = loader.find_module(name).load_module(name) for name, value in inspect.getmembers(module): if name.start...
pawl/CalendarAdmin
application/views/__init__.py
Python
mit
416
# Note that this is not a valid measurement of tail latency. This uses the execution times we measure because they're convenient, but this does not include queueing time inside BitFunnel nor does it include head-of-line blocking queue waiting time on the queue into BitFunnel. import csv filename = "/tmp/QueryPipeline...
BitFunnel/BitFunnel
src/Scripts/tail-latency.py
Python
mit
1,033
from django.conf import settings from django.conf.urls.defaults import patterns, url from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.core.urlresolvers import NoReverseMatch, reverse, resolve, Resolver404 from django.db.models.sql.constants import QUERY_TERMS, LOOKUP_SEP from d...
colinsullivan/bingo-board
bingo_board/tastypie/resources.py
Python
mit
58,556
import os import re from opsbro.collector import Collector # DMI have lot of useful information that detectors can use to know lot about the platform/hardware class Dmidecode(Collector): def launch(self): logger = self.logger logger.debug('getDmidecode: start') res = {} #...
naparuba/kunai
data/global-configuration/packs/system/collectors/collector_dmidecode.py
Python
mit
2,003
#!/usr/bin/python # convert LLVM GenAsmWriter.inc for Capstone disassembler. # by Nguyen Anh Quynh, 2019 import sys if len(sys.argv) == 1: print("Syntax: %s <GenAsmWriter.inc> <Output-GenAsmWriter.inc> <Output-GenRegisterName.inc> <arch>" %sys.argv[0]) sys.exit(1) arch = sys.argv[4] f = open(sys.argv[1]) li...
capstone-rust/capstone-rs
capstone-sys/capstone/suite/synctools/asmwriter.py
Python
mit
33,268
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging, os logging.basicConfig(level=logging.INFO) from deepy.networks import RecursiveAutoEncoder from deepy.trainers import SGDTrainer, LearningRateAnnealer from util import get_data, VECTOR_SIZE model_path = os.path.join(os.path.dirname(__file__), "models", "...
zomux/deepy
examples/auto_encoders/recursive_auto_encoder.py
Python
mit
593
#!/usr/bin/env python2 """Example of server-side computations used in global forest change analysis. In this example we will focus on server side computation using NDVI and EVI data. This both metrics are computed bands created by third party companies or directly taken by the satellites. NDVI and EVI are two metric...
ArchangelX360/EnvironmentalEventsDetector
computation/imagefetcher/examples/ndvi_difference.py
Python
mit
2,028
# =================================================================== # # Copyright (c) 2015, Legrandin <helderijs@gmail.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. Redi...
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/Cryptodome/Hash/keccak.py
Python
mit
8,329
from typing import Dict import tempfile from dxlclient.client_config import DxlClientConfig from dxlclient.client import DxlClient from dxlclient.broker import Broker from dxlclient.message import Event import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * INTEGRATION_NAM...
VirusTotal/content
Packs/McAfee_DXL/Integrations/McAfee_DXL/McAfee_DXL.py
Python
mit
7,105
"""Tests for wheel binary packages and .dist-info.""" import os import pytest from mock import patch, Mock from pip._vendor import pkg_resources from pip import pep425tags, wheel from pip.exceptions import InvalidWheelFilename, UnsupportedWheel from pip.utils import unpack_file def test_get_entrypoints(tmpdir): ...
habnabit/pip
tests/unit/test_wheel.py
Python
mit
14,091
#!/usr/bin/python # Copyright 2014 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt) # Test the handling of toolset.add-requirements import BoostBuild t = BoostBuild.Tester(pass_toolset=0, ignore_toolset_requi...
davehorton/drachtio-server
deps/boost_1_77_0/tools/build/test/toolset_requirements.py
Python
mit
933
import os import sys from Bio import SeqIO f = open(sys.argv[1], 'rU') out = open(sys.argv[2], 'w') for records in SeqIO.parse(f, 'fastq'): SeqIO.write(records, out, 'fasta')
chnops/code
fastq_to_fasta.py
Python
mit
177
#!/usr/bin/env python # # GrovePi Example for using the Grove Electricity Sensor (http://www.seeedstudio.com/wiki/Grove_-_Electricity_Sensor) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this examp...
karan259/GrovePi
Software/Python/grove_electricity_sensor.py
Python
mit
2,530
import argparse import asyncio import gc import os.path import pathlib import socket import ssl PRINT = 0 async def echo_server(loop, address, unix): if unix: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) else: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock....
1st1/uvloop
examples/bench/echoserver.py
Python
mit
6,317
#!/usr/bin/python # -*- coding: utf-8 -*- # 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 progra...
0vercl0k/rp
src/third_party/beaengine/tests/0f3a25.py
Python
mit
2,835
import flask from donut import auth_utils from donut.modules.account import blueprint, helpers @blueprint.route("/request") def request_account(): """Provides a form to request an account.""" return flask.render_template("request_account.html") @blueprint.route("/request/submit", methods=["POST"]) def requ...
ASCIT/donut
donut/modules/account/routes.py
Python
mit
3,294
# -*- coding:utf-8 -*- from re import sub from itertools import islice ''' 如何调整字符串的文本格式 ''' # 将日志文件中的日期格式转变为美国日期格式mm/dd/yyyy # 使用正则表达式模块中的sub函数进行替换字符串 with open("./log.log","r") as f: for line in islice(f,0,None): #print sub("(\d{4})-(\d{2})-(\d{2})",r"\2/\3/\1",line) # 可以为每个匹配组起一个别名 print...
liuhll/BlogAndArticle
Notes/Python/src/exercise/string_repalce_by_resub.py
Python
mit
537
#!/usr/bin/env python # # GrovePi Example for using the Grove Slide Potentiometer (http://www.seeedstudio.com/wiki/Grove_-_Slide_Potentiometer) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this exa...
karan259/GrovePi
Software/Python/grove_slide_potentiometer.py
Python
mit
2,307
#!/usr/bin/env python import glob, os, sys import sipconfig from PyQt4 import pyqtconfig def get_diana_version(): depends = filter(lambda line: line.startswith("Depends:"), open("debian/control").readlines()) for line in depends: pieces = line.split() for piece in pi...
dboddie/python-diana
configure.py
Python
gpl-2.0
5,321
from datetime import datetime from flask import current_app from flask.cli import with_appcontext from invenio_db import db from hepdata.cli import fix from hepdata.ext.elasticsearch.api import index_record_ids, push_data_keywords from hepdata.modules.submission.models import HEPSubmission, DataSubmission from hepdat...
HEPData/hepdata3
fixes/missing_record_ids.py
Python
gpl-2.0
2,910
""" Small event module ======================= """ import numpy as np import logging logger = logging.getLogger(__name__) from ...utils.decorators import face_lookup from ...geometry.sheet_geometry import SheetGeometry from ...topology.sheet_topology import cell_division from .actions import ( exchange, r...
CellModels/tyssue
tyssue/behaviors/sheet/basic_events.py
Python
gpl-2.0
6,721
from flask import request, jsonify from sql_classes import UrlList, Acl, UserGroup, User, Role def _node_base_and_rest(path): """ Returns a tuple: (the substring of a path after the last nodeSeparator, the preceding path before it) If 'base' includes its own baseSeparator - return only a string after it ...
Aclz/Tentacles
python3/app/backend/maintree.py
Python
gpl-2.0
10,439
#!/usr/bin/env python """ gateway tests - Users Copyright 2009 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import unittest import omero import gatewaytest.library as lib from omero.gateway.scripts import dbhelpers class UserTest (lib.GTest): ...
rleigh-dundee/openmicroscopy
components/tools/OmeroPy/test/gatewaytest/user.py
Python
gpl-2.0
6,878
# Twisted, the Framework of Your Internet # Copyright (C) 2001 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in t...
fxia22/ASM_xf
PythonD/site_python/twisted/internet/stdio.py
Python
gpl-2.0
3,287
#!/usr/bin/env python2 import copy import Queue import os import socket import struct import subprocess import sys import threading import time import unittest import dns import dns.message import libnacl import libnacl.utils class DNSDistTest(unittest.TestCase): """ Set up a dnsdist instance and responder th...
DrRemorse/pdns
regression-tests.dnsdist/dnsdisttests.py
Python
gpl-2.0
13,296
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from variable_functions import my_attribute_label from urbansim.length_constants import UrbanSimLength, UrbanSimLengthConstants from numpy imp...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/gridcell/is_near_arterial.py
Python
gpl-2.0
2,343
import random from collections import namedtuple import dateparser import pytest from cfme import test_requirements from cfme.containers.image import Image from cfme.containers.provider import ContainersProvider from cfme.containers.provider import ContainersTestItem from cfme.utils.appliance.implementations.ui impor...
nachandr/cfme_tests
cfme/tests/containers/test_containers_smartstate_analysis.py
Python
gpl-2.0
5,838
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. currentmodule:: __init__.py .. moduleauthor:: Pat Daburu <pat@daburu.net> Provide a brief description of the module. """
patdaburu/mothergeo-py
mothergeo/db/postgis/__init__.py
Python
gpl-2.0
175
# Copyright (C) 2019 Fassio Blatter from stopeight import analyzer version=analyzer.version from stopeight.util.editor.data import ScribbleData def legal_segments(data): from stopeight.matrix import Vectors from stopeight.analyzer import legal_segments return legal_segments(Vectors(data)).__array__().view...
specpose/stopeight
stopeight/util/editor/modules/analyzer.py
Python
gpl-2.0
413
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud 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 v...
sixuanwang/SAMSaaS
wirecloud-develop/src/wirecloud/oauth2provider/models.py
Python
gpl-2.0
2,919
#!/usr/bin/env python3 # This file is part of ipxact2systemverilog # Copyright (C) 2013 Andreas Lindh # # 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...
vermaete/ipxact2systemverilog
ipxact2systemverilog/ipxact2hdlCommon.py
Python
gpl-2.0
46,497
#!/usr/bin/python # encoding: utf-8 # filename: outroTipoDeProducaoBibliografica.py # # scriptLattes V8 # Copyright 2005-2013: Jesús P. Mena-Chalco e Roberto M. Cesar-Jr. # http://scriptlattes.sourceforge.net/ # # # Este programa é um software livre; você pode redistribui-lo e/ou # modifica-lo dentro dos termos d...
DiegoQueiroz/scriptLattes
scriptLattes/producoesBibliograficas/outroTipoDeProducaoBibliografica.py
Python
gpl-2.0
3,771
# (c) 2017 - Copyright Red Hat Inc # 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. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; with...
release-monitoring/anitya
anitya/tests/test_alembic.py
Python
gpl-2.0
1,640
import pybedtools import os testdir = os.path.dirname(__file__) test_tempdir = os.path.join(os.path.abspath(testdir), 'tmp') unwriteable = os.path.join(os.path.abspath(testdir), 'unwriteable') def setup(): if not os.path.exists(test_tempdir): os.system('mkdir -p %s' % test_tempdir) pybedtools.set_temp...
jos4uke/getSeqFlankBlatHit
lib/python2.7/site-packages/pybedtools/test/tfuncs.py
Python
gpl-2.0
462
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # # 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 you...
Forage/Gramps
gramps/gui/widgets/linkbox.py
Python
gpl-2.0
1,754
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. ## ## Invenio 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...
labordoc/labordoc-next
modules/bibrank/lib/bibrank_tag_based_indexer_unit_tests.py
Python
gpl-2.0
1,743
def spaceship_building(cans): total_cans = 0 for week in range(1,53): total_cans = total_cans + cans print('Week %s = %s cans' % (week, total_cans)) spaceship_building(2) spaceship_building(13)
erikdejonge/python_for_kids
chapter07/spaceship_building.py
Python
gpl-2.0
227
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-24 15:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('emailer', '0007_auto_20150509_1922'), ] operations = [ migrations.AlterField( ...
JustinWingChungHui/okKindred
emailer/migrations/0008_auto_20151224_1528.py
Python
gpl-2.0
467
import MySQLdb class DatabaseHandler: def __init__(self): pass def is_delete(self, tableName): reservedTableNameList = ["mantis_user_table", "mantis_tokens_table", "mantis_config_table"] isDeleteFlag = 1 for name in reservedTableNameList: isIdentical = cmp(tab...
ezScrum/ezScrum
robotTesting/keywords/lib/DatabaseHandler.py
Python
gpl-2.0
1,547
#!/usr/bin/env python # # 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. See http://www.gnu.org/copyleft/gpl.html for # ...
abn/python-bugzilla
examples/query.py
Python
gpl-2.0
3,441
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 you...
pmghalvorsen/gramps_branch
gramps/gen/filters/rules/person/_hasidof.py
Python
gpl-2.0
1,631
import string import socket import base64 import sys class message: def __init__(self, name="generate" ): if name == "generate": self.name=socket.gethostname() else: self.name=name self.type="gc" self.decoded="" def set ( self, content=" " ): ...
LibraryBox-Dev/LibraryBox-core
piratebox_origin/piratebox/piratebox/python_lib/messages.py
Python
gpl-3.0
1,109
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 René Samselnig # # This file is part of Database Navigator. # # Database Navigator 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 vers...
resamsel/dbmanagr
scripts/toc.py
Python
gpl-3.0
1,614
# -*- coding: utf-8 -*- """ pygments.plugin ~~~~~~~~~~~~~~~ Pygments setuptools plugin interface. The methods defined here also work if setuptools isn't installed but they just return nothing. lexer plugins:: [pygments.lexers] yourlexer = yourmodule:YourLexer formatter pl...
davy39/eric
ThirdParty/Pygments/pygments/plugin.py
Python
gpl-3.0
1,903
import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-checkpoint archive name ends in a digit (e.g. from...
witten/borgmatic
borgmatic/borg/list.py
Python
gpl-3.0
3,343
# import re, os # from jandy.profiler import Profiler # # # class Base: # def __init__(self): # print('init call') # # def compile(self, str): # re.compile(str) # # # # p = Profiler("12K", "localhost:3000", 1) # try: # p.start() # b = Base() # b.compile("foo|bar") # print("Hello ...
jcooky/jandy
jandy-python/tests/a.py
Python
gpl-3.0
457
# Copyright (C) 1998-2014 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
adam-iris/mailman
src/mailman/bin/checkdbs.py
Python
gpl-3.0
7,696
# encoding: 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 'InstanceApplication.network' db.add_column('apply_instanceapplication', 'network', sel...
sunweaver/ganetimgr
apply/migrations/0005_add_application_network_field.py
Python
gpl-3.0
8,911
# coding=utf-8 # This file is part of SickChill. # # URL: https://sickchill.github.io # Git: https://github.com/SickChill/SickChill.git # # SickChill 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 vers...
dfalt974/SickRage
tests/sickchill_tests/show/show_tests.py
Python
gpl-3.0
4,719
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN', '%Y-%m-%d': '%Y.%m.%d.', '%Y-%m-%d %H:%M:%S': '%Y.%m.%d. %H:%M:%S', '%s...
henkelis/sonospy
web2py/applications/sonospy/languages/hu.py
Python
gpl-3.0
4,428
#coding=gbk """Convert HTML page to Word 97 document This script is used during the build process of "Dive Into Python" (http://diveintopython.org/) to create the downloadable Word 97 version of the book (http://diveintopython.org/diveintopython.doc) Looks for 2 arguments on the command line. The first argument is t...
qilicun/python
python2/diveintopythonzh-cn-5.4b/zh_cn/makerealworddoc.py
Python
gpl-3.0
2,374
## roster_nb.py ## based on roster.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## modified by Dimitur Kirov <dkirov@gmail.com> ## ## 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...
9thSenseRobotics/bosh_server
nbxmpp-0.1/nbxmpp/roster_nb.py
Python
gpl-3.0
13,001
# -*- coding: utf-8 -*- from django.contrib import admin from django.utils.translation import ugettext as _ from .models import AbuseReport, SearchTermRecord admin.site.register(AbuseReport) class SearchTermAdmin(admin.ModelAdmin): list_display = ('__unicode__', 'ip_address', 'get_user_full_name', ) search...
piotrek-golda/CivilHubIndependantCopy
places_core/admin.py
Python
gpl-3.0
596
""" ================================================================================ Logscaled Histogram ================================================================================ | Calculates a logarithmically spaced histogram for a data map. | Written By: Matthew Stadelman | Date Written: 2016/03/07 | Last Mod...
stadelmanma/netl-ap-map-flow
apmapflow/data_processing/histogram_logscale.py
Python
gpl-3.0
2,486
from ..daltools.util.full import init Z = [8., 1., 1.] Rc = init([0.00000000, 0.00000000, 0.48860959]) Dtot = [0, 0, -0.76539388] Daa = init([ [ 0.00000000, 0.00000000, -0.28357300], [ 0.15342658, 0.00000000, 0.12734703], [-0.15342658, 0.00000000, 0.12734703], ]) QUc = init([-7.31176220, 0., 0., -5.432...
fishstamp82/loprop
test/h2o_data.py
Python
gpl-3.0
11,431
import inctest error = 0 try: a = inctest.A() except: print "didn't find A" print "therefore, I didn't include 'testdir/subdir1/hello.i'" error = 1 pass try: b = inctest.B() except: print "didn't find B" print "therefore, I didn't include 'testdir/subdir2/hello.i'" error = 1 pass if error == 1: ra...
jrversteegh/softsailor
deps/swig-2.0.4/Examples/test-suite/python/inctest_runme.py
Python
gpl-3.0
563
from __future__ import absolute_import, print_function, division from mitmproxy import exceptions import pprint def _get_name(itm): return getattr(itm, "name", itm.__class__.__name__) class Addons(object): def __init__(self, master): self.chain = [] self.master = master ...
x2Ident/x2Ident_test
mitmproxy/mitmproxy/addons.py
Python
gpl-3.0
2,173
#! /usr/bin/env python ################################################################################################# # # Script Name: bip.py # Script Usage: This script is the menu system and runs everything else. Do not use other # files unless you are comfortable with the code. # # ...
SSCPS/bip-gam-v1
bip.py
Python
gpl-3.0
1,835
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
capoe/espressopp.soap
src/integrator/LangevinThermostat.py
Python
gpl-3.0
1,956
#!/usr/bin/env python3 # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program ...
snapcore/snapcraft
tools/collect_ppa_autopkgtests_results.py
Python
gpl-3.0
2,694
import gtk class ExtensionFeatures: SYSTEM_WIDE = 0 class MountManagerExtension: """Base class for mount manager extensions. Mount manager has only one instance and is created on program startup. Methods defined in this class are called automatically by the mount manager so you need to implement them. ""...
Azulinho/sunflower-file-manager-with-tmsu-tagging-support
application/plugin_base/mount_manager_extension.py
Python
gpl-3.0
1,433
import random from google.appengine.api import memcache from google.appengine.ext import ndb SHARD_KEY_TEMPLATE = 'shard-{}-{:d}' class GeneralCounterShardConfig(ndb.Model): num_shards = ndb.IntegerProperty(default=20) @classmethod def all_keys(cls, name): config = cls.get_or_insert(name) ...
VirtuosoChris/appengine
experimental/shardcounter_sync.py
Python
gpl-3.0
2,052
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
belokop/indico_bare
indico/web/http_api/metadata/serializer.py
Python
gpl-3.0
2,039
"""Data models for referral system.""" from __future__ import unicode_literals from builtins import map from django.db import models from django.core.urlresolvers import reverse from pttrack.models import (ReferralType, ReferralLocation, Note, ContactMethod, CompletableMixin,) from followup...
SaturdayNeighborhoodHealthClinic/osler
referral/models.py
Python
gpl-3.0
6,199
'''Test the analysis.signal module.''' from __future__ import absolute_import, print_function, division import pytest import numpy as np import gridcells.analysis.signal as asignal from gridcells.analysis.signal import (local_extrema, local_maxima, local_minima, ExtremumTypes, ...
lsolanka/gridcells
tests/unit/test_analysis_signal.py
Python
gpl-3.0
10,163
"""Add timetable related tables Revision ID: 33a1d6f25951 Revises: 225d0750c216 Create Date: 2015-11-25 14:05:51.856236 """ import sqlalchemy as sa from alembic import op from indico.core.db.sqlalchemy import PyIntEnum, UTCDateTime from indico.modules.events.timetable.models.entries import TimetableEntryType # rev...
belokop/indico_bare
migrations/versions/201511251405_33a1d6f25951_add_timetable_related_tables.py
Python
gpl-3.0
4,295
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
disabler/isida3
lib/chardet/sbcsgroupprober.py
Python
gpl-3.0
2,948
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
sergiusens/snapcraft
snapcraft/internal/project_loader/grammar_processing/_part_grammar_processor.py
Python
gpl-3.0
4,927
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestEInvoiceRequestLog(unittest.TestCase): pass
frappe/erpnext
erpnext/regional/doctype/e_invoice_request_log/test_e_invoice_request_log.py
Python
gpl-3.0
241
import pytest from umodbus.server.serial import AbstractSerialServer @pytest.fixture def abstract_serial_server(): return AbstractSerialServer() def test_abstract_serial_server_get_meta_data(abstract_serial_server): """ Test if meta data is correctly extracted from request. """ assert abstract_serial_s...
AdvancedClimateSystems/python-modbus
tests/unit/server/serial/test_init.py
Python
mpl-2.0
611
#!/usr/bin/env python # -*- coding: utf-8 -*- panel_file = open('panels.txt','r') name_file = open('testName.txt','r') sample_type_file = open("sampleType.txt") test_panel_results = open("output/testPanelResults.txt", 'w') panel = [] type = [] test_names = [] def get_split_names( name ): split_name_list = name.sp...
mark47/OESandbox
liquibase/OE2.8/testCatalogCI_LNSP/scripts/testPanel.py
Python
mpl-2.0
1,391
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django import forms from djang...
jorge-marques/shoop
shoop/discount_pricing/admin_form_part.py
Python
agpl-3.0
2,820
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
ksrajkumar/openerp-6.1
openerp/addons/email_template/wizard/mail_compose_message.py
Python
agpl-3.0
10,036
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('schedules', '0005_auto_20171010_1722'), ] operations = [ migrations.CreateModel( name='Schedule...
ESOedX/edx-platform
openedx/core/djangoapps/schedules/migrations/0006_scheduleexperience.py
Python
agpl-3.0
793
# -*- coding: utf-8 -*- # Copyright 2017 KMEE # Hendrix Costa <hendrix.costa@kmee.com.br> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp.addons.financial.tests.financial_test_classes import \ FinancialTestCase class ManualFinancialProcess(FinancialTestCase): def setUp(self): ...
thinkopensolutions/l10n-brazil
financial/tests/test_financial_move.py
Python
agpl-3.0
1,651