repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
rpm-software-management/yum
yum/pgpmsg.py
#! /usr/bin/python -tt ##Copyright (C) 2003,2005,2009 Jens B. Jorgensen <jbj1@ultraemail.net> ## ##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 o...
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/RunKeeper/Nutrition/DeleteEntry.py
# -*- coding: utf-8 -*- ############################################################################### # # DeleteEntry # Removes an individual nutrition entry from a user’s feed. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you...
boothead/karl
karl/scripts/cleantags.py
"""Reassign tags owned by users who no longer exist. """ from karl.scripting import get_default_config from karl.scripting import open_root import logging import optparse import sys import transaction log = logging.getLogger("cleantags") def cleantags(site, assign_to): profiles = site['profiles'] engine = sit...
Jabba/django_bootstrap
django_bootstrap/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url( r'^$', 'landing.views.index', name = 'index' ), url( r'^about/$', 'landing.views.about', name = 'about' ), url( r'^signup/$', 'landing.views.s...
jamesra/nornir-volumemodel
nornir_volumemodel/model/section.py
''' Created on Apr 11, 2014 @author: u0490822 ''' from . import DirectoryResource, Numbered from . import channel class Section(DirectoryResource, Numbered): ''' classdocs ''' @property def Channels(self): return self._channels @Channels.setter def Channels(self, val): se...
DBMandrake/osmc
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/apt_cache_action.py
''' This script is run as root by the osmc update module. ''' import apt import socket import sys from datetime import datetime import json import os import traceback t = datetime def call_parent(raw_message, data={}): address = '/var/tmp/osmc.settings.update.sockfile' print '%s %s sending response' % (t.now()...
siemens/django-dingos-authoring
dingos_authoring/validators.py
# Copyright (c) Siemens AG, 2014 # # This file is part of MANTIS. MANTIS 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 progr...
rarcega/fcsh-auto-compiler
flexcompile.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Fork of https://code.google.com/p/flexcompile ''' import os import re import time import socket import subprocess import sys import traceback import logging import argparse logging.basicConfig(level=logging.INFO, format='%(asctime)s [%(levelname...
S03D4-164/thug
src/DOM/W3C/HTML/HTMLDocument.py
#!/usr/bin/env python import sys import re import string import logging log = logging.getLogger("Thug") try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse try: from io import StringIO except ImportError: try: from cStringIO import StringIO except Imp...
guohongze/adminset
adminset/settings.py
""" Django settings for adminset project. Generated by 'django-admin startproject' using Django 1.9.8. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os i...
google/packetdrill
gtests/net/tcp/common/set_sysctls.py
#!/usr/bin/python import commands import os import sys pppid = int(os.popen("ps -p %d -oppid=" % os.getppid()).read().strip()) filename = '/tmp/sysctl_restore_%d.sh' % pppid restore_file = open(filename, 'w') print >> restore_file, '#!/bin/bash' for a in sys.argv[1:]: sysctl = a.split('=') # save current value...
dhavalmanjaria/dma-student-information-system
curriculum/management/commands/initcurriculum.py
from django.core.management.base import BaseCommand # from django.contrib.auth.models import User from curriculum.models import Course, Semester, Subject import logging LOG = logging.getLogger('app') class Command(BaseCommand): """ This command will initialze the curriculum for the college. In our case, w...
ipanova/pulp_puppet
run-tests.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this soft...
kampfschlaefer/comics_downloader
comic_downloader/informationextractor.py
import argparse import json import re import os.path import subprocess def parse_comics_json(filename): result = {} data = json.load(open(filename, 'r')) comics = data['subproducts'] for c in comics[:]: name = c['machine_name'] if name not in result: result[name] = {} ...
Excito/audiotools
audiotools/wavpack.py
#!/usr/bin/python #Audio Tools, a module and set of tools for manipulating audio data #Copyright (C) 2007-2012 Brian Langenberger #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...
kain88-de/mdanalysis
testsuite/MDAnalysisTests/tempdir.py
# License # ------- # MIT License # # Copyright (c) 2010-2016 Thomas Fenzl # # 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 ...
tatsuhirosatou/JMdictDB
python/lib/fmtxml.py
####################################################################### # This file is part of JMdictDB. # Copyright (c) 2006-2014 Stuart McGraw # # JMdictDB 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...
jralls/gramps
gramps/plugins/webreport/surnamelist.py
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com> # Copyright (C) 2007-2009 Gary Burton <gary.burton@zen.co.uk> # Copyright (C) 2007-2009 Stephane Charet...
tonnrueter/pymca_devel
PyMca/Object3D/Object3DMovement.py
import Object3DQt as qt ORIGIN = 0 BBOXMIN = 1 BBOXCENTER = 2 BBOXMAX = 3 class Object3DAnchorWidget(qt.QGroupBox): def __init__(self, parent = None, anchor = None): qt.QGroupBox.__init__(self, parent) self.setTitle('Anchor') text = 'Specify what origin to take for 3D object\n' ...
TinyOS-Camp/DDEA-DEV
Archive/[14_10_03] Data_Collection_Sample/DB access sample code/vtt/query_csv.py
import sys import csv from datetime import datetime import numpy as np """ -----query_csv------ ids = array of sensor names. eg: [sensor1,sensor2] start_time = datetime end_time = datetime returns numpy list of lists containing sensor data """ def query_csv(ids,start_time,end_time): all_data = [] for id in i...
epuzanov/ZenPacks.community.OracleMon
ZenPacks/community/OracleMon/OracleTablespace.py
################################################################################ # # This program is part of the OracleMon Zenpack for Zenoss. # Copyright (C) 2010 Egor Puzanov. # # This program can be used under the GNU General Public License version 2 # You can find full information here: http://www.zenoss.com/oss # ...
akkana/scripts
covid_timeseries.py
#!/usr/bin/env python3 # Plot COVID data from the Covid Atlas, https://covidatlas.com/data # (formerly Corona Data Scraper). # import json import csv import argparse import requests import shutil from datetime import datetime, date, timedelta, timezone from dateutil.relativedelta import relativedelta from dateutil.p...
eironman/reservarpista
reservarpista/settings-template.py
""" Django settings for reservarpista project. Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ imp...
mrkara/systemd
test/networkd-test.py
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # # networkd integration test # This uses temporary configuration in /run and temporary veth devices, and # does not write anything on disk or change any system configuration; # but it assumes (and checks at the beginning) that networkd is not currently # runn...
amagidow/dialects
dialectsDB/mywidgets.py
__author__ = 'Alex' from django.forms import widgets from django.shortcuts import render_to_response from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.html import format_html class TagAutoWidget(widgets.Textarea): #Takes either a queryset+field name...
Jianlong-Peng/pytools
PMF/bin1/pmf_step1.py
''' #============================================================================= # FileName: pmf_step1.py # Desc: # Author: jlpeng # Email: jlpeng1201@gmail.com # HomePage: # Created: 2014-03-22 15:51:01 # LastChange: 2014-07-22 15:25:25 # History: #=========================...
metabrainz/listenbrainz-server
docs/conf.py
# -*- coding: utf-8 -*- # # ListenBrainz documentation build configuration file, created by # sphinx-quickstart on Tue Sep 29 12:53:20 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. ...
chitwanix/Sagarmatha
files/usr/lib/sagarmatha-settings/modules/cs_user.py
#!/usr/bin/env python from SettingsWidgets import * from gi.repository import AccountsService, GLib import PAM import pexpect import time from random import randint import shutil import PIL class EditableEntry (Gtk.Notebook): __gsignals__ = { 'changed': (GObject.SIGNAL_RUN_FIRST, None, ...
huzhifeng/py12306
py12306.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # 标准库 import argparse import urllib import time import datetime import sys import re import ConfigParser import random import smtplib from email.mime.text import MIMEText # 第三方库 import requests from huzhifeng import dumpObj, hasKeys # Set default encoding to utf-8 reload...
nrgaway/qubes-core-admin
qubes/ext/services.py
# -*- encoding: utf-8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2017 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
iocoop/beancount
src/python/beancount/core/getters_test.py
__author__ = "Martin Blais <blais@furius.ca>" import unittest import datetime from beancount.core import getters from beancount.core import data from beancount import loader TEST_INPUT = """ 2012-02-01 open Assets:US:Cash 2012-02-01 open Assets:US:Credit-Card 2012-02-01 open Expenses:Grocery 2012-02-01 open Expens...
gbd-consult/CartoCSS-Export
CartoCSSExport/ce/export.py
"""Export controller.""" import re import error, result, css, project, debug class Process: def __init__(self, prj): self._fns = {} self._errors = set() self._rules = [] self._props = {} self._exprs = {} self._meta = {} self._prj = prj self._uid = 0...
JoepDriesen/Rikker
game/models.py
from django.db import models from django.contrib.auth import get_user_model from portal import bidding_needed, playing_needed, collection_needed import threading from django.conf import settings global_lock = threading.RLock() class GameException(Exception): pass class CardManager(models.Manager): def g...
SCPR/accountability-tracker
accountability_tracker/custom_fields.py
from django.db import models class SeparatedValuesField(models.TextField): __metaclass__ = models.SubfieldBase def __init__(self, *args, **kwargs): self.token = kwargs.pop('token', '|') super(SeparatedValuesField, self).__init__(*args, **kwargs) def to_python(self, value): if not ...
jergosh/slr_pipeline
bin/prank_bsub.py
from subprocess import Popen from glob import glob import os from os import path import argparse import re import utils segfault_RE = re.compile("core dumped") # For rerunning argparser = argparse.ArgumentParser() argparser.add_argument('--clade', metavar='clade_name', type=str, required=True) argparser.add_argument...
MuhammedHasan/metabolitics
metabolitics/preprocessing/reaction_diff_transformer.py
from sklearn.base import TransformerMixin from sklearn_utils.utils import average_by_label from metabolitics.utils import load_network_model class ReactionDiffTransformer(TransformerMixin): """Scaler reaction by diff""" def __init__(self, network_model="recon2", reference_label='healthy'): self.mode...
ganga-devs/ganga
ganga/GangaLHCb/Lib/Applications/FileFunctions.py
from GangaCore.Utility.Config import getConfig configGaudi = getConfig('GAUDI') def getpack(self, options=''): if self.newStyleApp is True: return getpack_cmake(self, options) else: return getpack_CMT(self, options) def make(self, argument=None): if self.newStyleApp is True: re...
lehnertu/TEUFEL
scripts/screen.py
#!/usr/bin/env python3 # coding=UTF-8 import numpy as np import h5py mu0 = 4*np.pi*1e-7 class TeufelScreen(): """ This class describes a time-domain optical field recorded on a screen during a TEUFEL run. It is used to hold the data for post-processing. """ def __init__(screen): ...
JeisonPacateque/Asphalt-Mixtures-Aging-Simulator
app/ui/canvas_2d.py
''' Copyright (C) 2015 Jeison Pacateque, Santiago Puerto, Wilmar Fernandez 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. Thi...
vasnake/casebook
casebook/http.py
#!/usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright (c) Valentin Fedulov <vasnake@gmail.com> # See COPYING for details. ''' casebook http lib module http://docs.python-requests.org/en/latest/community/faq/ http://stackoverflow.com/questions/13030095/how-to-save-requests-python-cookies-to-a-file '...
sid24ss/gstylemailer
mailer.py
import cPickle as pickle import os, sys import random from parse_styles import GStyleGuide, GStyleGuideParser try: from settings import * except: print 'Cannot find the settings file. Quitting.' sys.exit(1) # email related imports import smtplib from email.mime.text import MIMEText # Send the message via our own ...
mganeva/mantid
scripts/Muon/GUI/FrequencyDomainAnalysis/TransformSelection/transform_selection_widget.py
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
iradicek/clara
clara/__init__.py
''' imports of all (required) sub-modules ''' from . import common from . import model from . import parser from . import c_parser from . import py_parser from . import java_parser from . import interpreter from . import c_interpreter from . import py_interpreter from . import java_interpreter from . import matchi...
sujoykroy/motion-picture
editor/MotionPicture/shapes/__init__.py
from .shape import Shape from .shape_list import ShapeList from .rectangle_shape import RectangleShape from .oval_shape import OvalShape from .curve_shape import CurveShape from .polygon_shape import PolygonShape from .multi_shape import MultiShape, MultiShapeModule from .image_shape import ImageShape from .image_seq_s...
Rosebotics/cwc-projects
microbit-python/05_leds/leds_with_music.py
import microbit as mb import music def main(): loops = 0 mb.display.show(mb.Image.MUSIC_QUAVER) while True: if mb.button_a.is_pressed(): loops = loops + 1 mb.display.show(str(loops)) playNoteLights(loops, 80) if mb.button_b.is_pressed(): loop...
antonio-fr/Fast_Sign_Verify
MainFrame.py
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Jun 5 2014) ## http://www.wxformbuilder.org/ ## ## PLEASE DO "NOT" EDIT THIS FILE! ########################################################################### impo...
CroissanceCommune/autonomie
autonomie/models/indicators.py
# -*- coding: utf-8 -*- # * Authors: # * TJEBBES Gaston <g.t@majerti.fr> # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; """ """ import logging from datetime import datetime from sqlalchemy import ( Column, Integer, Boolean, ForeignKey, String, DateTime, ...
sillvan/hyperspy
hyperspy/tests/signal/test_remove_background.py
import numpy as np from nose.tools import ( assert_true,) from hyperspy import signals from hyperspy import components class TestRemoveBackground1DGaussian: def setUp(self): gaussian = components.Gaussian() gaussian.A.value = 10 gaussian.centre.value = 10 gaussian.sigma.value...
raydoom/ma
python/async/async_get_url.py
import asyncio import time import aiohttp import async_timeout # msg = "http://www.nationalgeographic.com.cn/photography/photo_of_the_day/{}.html" msg = "https://aizhi.zrbao.net/api/{}" headers = { 'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6' } urls = [m...
mindriot101/batman
batman/transitmodel.py
# The batman package: fast computation of exoplanet transit light curves # Copyright (C) 2015 Laura Kreidberg # # 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...
ibuioli/maquina-girondo
maquinaGirondoPy/verso.py
# -*- coding: utf-8 -*- import random from vglobals import Grammar from vglobals import Exe from vglobals import Vocabulary from tools import Tools class Verso(object): ############################################## ################ ESTRUCTURES ################# def verso(self, c, r, theme): palabras = [] ve...
702nADOS/sumo
tools/contributed/sumopy/coremodules/demand/virtualpop.py
import numpy as np from numpy import random import agilepy.lib_base.classman as cm import agilepy.lib_base.arrayman as am import agilepy.lib_base.xmlman as xm #from coremodules.modules_common import * from coremodules.network.network import SumoIdsConf, MODES from coremodules.network import routing from agilepy.lib_bas...
noplay/gns3-gui
gns3/modules/dynamips/settings.py
# -*- coding: utf-8 -*- # # Copyright (C) 2014 GNS3 Technologies Inc. # # 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. ...
opefitoo/lawyers
mms/settings.py
# Django settings for mms project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', ...
exv1p3r/PyScripts
arping_wsc.py
#!/usr/bin/python2 import subprocess import re import sys def arping(ipaddress='192.168.31.68'): """ARPing function takes IP address or network, returns nested mac/ip list""" #Assuming use of arping on RHEL p = subprocess.Popen("/usr/sbin/arping -c 2 %s" % ipaddress, shell=True, stdout=subprocess.PIPE) ...
SpaceVim/SpaceVim
bundle/deoplete.nvim/rplugin/python3/deoplete/filter/matcher_fuzzy.py
# ============================================================================ # FILE: matcher_fuzzy.py # AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> # License: MIT license # ============================================================================ import re from deoplete.base.filter import Base from deo...
priseborough/ardupilot
Tools/autotest/apmrover2.py
#!/usr/bin/env python # Drive APMrover2 in SITL from __future__ import print_function import os import pexpect import time from common import AutoTest from common import AutoTestTimeoutException from common import MsgRcvTimeoutException from common import NotAchievedException from common import PreconditionFailedEx...
nevil-brownlee/pypy-libtrace
test/pypy-test-cases/test-encap-pkt6.py
#!/usr/bin/env python # Thu, 13 Mar 14 (PDT) # encap-pkt6.py: Test Packet methods and ip6.new # Copyright (C) 2015, Nevil Brownlee, U Auckland | WAND from plt_testing import * t = get_example_trace('anon-v6.pcap') def compare_objects(a, b, msg, tag=''): if a.data != b.data: # Compare bytearrays print_da...
chepeftw/EC2TestAutomator
graphs/multirootnode/queryTimeout.py
import os import sys import json import pymongo from bson import BSON from bson import json_util import yaml from pymongo import MongoClient def assembleQuery( regex, timeout, speed ): return [ { '$match': { 'name': { '$regex': regex, '$options': "si" }, 'timeout': timeout, 'node_speed': speed } }, ...
sara-02/fabric8-analytics-stack-analysis
evaluation_platform/uranus/src/generate_test_data.py
"""Script to generate test data.""" from analytics_platform.kronos.src.config import ( SPARK_HOME_PATH, PY4J_VERSION, KRONOS_SCORING_REGION) from itertools import combinations import os import pickle import time import sys sys.path.insert(0, SPARK_HOME_PATH + "/python") sys.path.insert(0, os.path.join(SPA...
gitenberg-dev/pg-epubmaker
epubmaker/packagers/TxtPackager.py
#!/usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- coding: utf-8 -*- """ TxtPackager.py Copyright 2010 by Marcello Perathoner Distributable under the GNU General Public License Version 3 or newer. Package a Txt file for PG. """ from epubmaker.packagers import OneFileZipPackager TYPE = 'ww' FOR...
tuffery/Frog2
frowns/Depict/.happydoc.MoleculeDock.py
(S'bf92f83514c67619c6b612c22bf355e3' p1 (ihappydoclib.parseinfo.moduleinfo ModuleInfo p2 (dp3 S'_namespaces' p4 ((dp5 S'MoleculeDock' p6 (ihappydoclib.parseinfo.classinfo ClassInfo p7 (dp8 g4 ((dp9 (dp10 S'addMolecule' p11 (ihappydoclib.parseinfo.functioninfo FunctionInfo p12 (dp13 g4 ((dp14 (dp15 tp16 sS'_exception_in...
x899/Chrome-Password-Grabber
chrome.py
""" Get unencrypted 'Saved Password' from Google Chrome Supported platform: Mac, Linux and Windows """ import json import os import platform import sqlite3 import string import subprocess from getpass import getuser from importlib import import_module from os import unlink from shutil import copy import secretstor...
tetrismegistus/advent16
day2/day2_1.py
import operator ''' --- Day 2: Bathroom Security --- You arrive at Easter Bunny Headquarters under cover of darkness. However, you left in such a rush that you forgot to use the bathroom! Fancy office buildings like this one usually have keypad locks on their bathrooms, so you search the front desk for t...
calancha/DIRAC
DataManagementSystem/scripts/dirac-admin-allow-se.py
#!/usr/bin/env python ######################################################################## # $HeadURL$ ######################################################################## """ Enable using one or more Storage Elements """ __RCSID__ = "$Id$" import DIRAC from DIRAC.Core.Base import Script read = True write = Tr...
Ebag333/Pyfa
gui/notesView.py
import wx from service.fit import Fit import gui.globalEvents as GE import gui.mainFrame class NotesView(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) self.lastFitId = None self.mainFrame = gui.mainFrame.MainFrame.getInstance() mainSizer = wx.BoxSizer(wx.V...
colab/colab-superarchives-plugin
src/colab_superarchives/models.py
# -*- coding: utf-8 -*- import urllib from uuid import uuid4 from django.db import models from django.conf import settings from django.utils import timezone from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from html2text import html2text from haystack.query import...
mementum/backtrader
backtrader/feeds/__init__.py
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015-2020 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
CyberTaoFlow/scirius
rules/migrations/0041_source_authkey.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('rules', '0040_ruleset_rules_count'), ] operations = [ migrations.AddField( model_name='source', name...
richrr/scripts
python/compare-network-graphs-aug-4-backup.py
import networkx as nx import numpy as np import matplotlib.pyplot as plt from utils import * import brewer2mpl import re import os import sys import operator from time import localtime, strftime import argparse import os.path from subprocess import Popen, PIPE from collections import defaultdict import math from matplo...
lamontu/data-analysis
numpy/linear_algebra.py
# -*- coding: utf-8 -*- import numpy as np from numpy.linalg import det, inv, qr x = np.array([[1., 2., 3.], [4., 5., 6.]]) y = np.array([[6., 23.], [-1, 7], [8, 9]]) c1 = np.ones(3) print("x:") print(x) print("y:") print(y) print("c1") print(c1) print(""" ## x.dot(y), 2 two-dimension array x, y, dim 1 of x == dim 0 ...
invitecomm/asterisk-ivr
pigeonhole/agi_record.py
#!/usr/bin/python """ Example to get and set variables via AGI. You can call directly this script with AGI() in Asterisk dialplan. """ from asterisk.agi import * agi = AGI() agi.answer() agi.verbose("python agi started") # record file <filename> <format> <escape_digits> <timeout> [<offset samples>] [<BEEP>] [<s=si...
Eveler/libs
__Python__/ufms_blanks/appy3/shared/ldap_connector.py
# ------------------------------------------------------------------------------ try: import ldap except ImportError: # For people that do not care about ldap. ldap = None # ------------------------------------------------------------------------------ class LdapConnector: '''This class manages the com...
johnjcamilleri/apertium-mlt
dev/mt_verbs/classes/quad.py
#!/usr/bin/python # coding=utf-8 # -*- encoding: utf-8 -*- ## ----------------------------------------------------------------------------## ## quadriliteral = strong pattern 2 ## ----------------------------------------------------------------------------## # no ek/ok problems def quad_consonant_forms (form_sg, fo...
qtproject/qtqa
scripts/jira/jira-bug-closer/bot/args.py
############################################################################# ## ## Copyright (C) 2019 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Quality Assurance module of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees hold...
roshandash411/Lyrics-Scraper-Ubuntu-Spotify
myLyricsScrapper.py
import dbus, requests from bs4 import BeautifulSoup from Tkinter import * base_url = "https://api.genius.com" headers = {'Authorization': 'Bearer 7wzFJIh3SiXW4JUcjYgtPfPpVdCq4QonaMgn7wmCCqVnMMmebfqwXKqte2zF5QYA'} session_bus = dbus.SessionBus() player = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/m...
denys-duchier/django-wiki-py3
django_notify/__init__.py
# -*- coding: utf-8 -*- # This package and all its sub-packages are part of django_notify, # except where otherwise stated. # # django_notify 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...
zusitools/fahrstr_gen
fahrstr_gen/fahrstrasse.py
#!/usr/bin/env python3 import xml.etree.ElementTree as ET import logging from collections import namedtuple from .konstanten import * from .strecke import geschw_min # Eintrag in einer verketteten Liste ListenEintrag = namedtuple('Listeneintrag', ['eintrag', 'prev']) FahrstrWeichenstellung = namedtuple('FahrstrWeic...
power12317/weblate
weblate/accounts/models.py
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
pdxwebdev/yadapy
yadapy/api/node.py
import json, logging, os, copy, re from uuid import uuid4 from yadapy.lib.crypt import decrypt, encrypt from pymongo import Connection from base64 import b64encode, b64decode from yadapy.indexer import Indexer from yadapy.db.mongodb.node import Node from yadapy.db.mongodb.manager import YadaServer from yadapy.nodecommu...
stg7/phrasit
utils/transform.py
#!/usr/bin/env python3 """ Transform google-book-ngram format to phrasit's import format. This file is part of PhrasIt. PhrasIt 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 ...
TAMU-CPT/galaxy-tools
tools/gff3/intersect.py
#!/usr/bin/env python import logging import argparse from intervaltree import IntervalTree, Interval from CPT_GFFParser import gffParse, gffWrite from Bio.SeqRecord import SeqRecord from Bio.Seq import Seq logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def treeFeatures(features): for f...
LogikSim/LogikSimPython
src/schematics/mouse_modes/insert_connector.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2011-2015 The LogikSim Authors. All rights reserved. # Use of this source code is governed by the GNU GPL license that can # be found in the LICENSE.txt file. # ''' Defines functionality when inserting connectors. ''' from PySide import QtCore from .modes_b...
callgraph/StaticAnalyzing
complier/self_time.py
#!/usr/bin/env python import os,sys stack=[] dic_tid={} dic_time={} time1=0 time=0 time_d=0 i=0 j=0 name2=sys.argv[3] fout1 = open(name2, "w") for i in range(0,1): name=sys.argv[1] name1=sys.argv[2] fin = open(name) fout = open(name1, "w") for line in fin: gram=line.split(",") ...
EvolutionClip/pyload
module/plugins/hooks/MultishareCz.py
# -*- coding: utf-8 -*- import re from module.plugins.internal.MultiHook import MultiHook class MultishareCz(MultiHook): __name__ = "MultishareCz" __type__ = "hook" __version__ = "0.07" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ...
labseven/modsim-heatsink-fem
python/visualize3D.py
# Imports the output into python and then visualize it # tempraturesTimeArray holds [iteration#][0: time, 1+:z level][y level] import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.animation as animation zLevelResolution = 5 plotNumbe...
Erethon/synnefo
snf-pithos-app/pithos/api/test/objects.py
#!/usr/bin/env python #coding=utf8 # Copyright (C) 2010-2014 GRNET S.A. # # 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 versio...
MarineDataTools/pycnv
pycnv/test/plot_baltic_test_regions.py
# # Script plots the regions used by the pycnv module to figure out if a # CTD cast was performed in the Baltic Sea. This is necessary due to a # slightly different absolute salinity formulation of the Baltic Sea # water. # import pylab as pl import pycnv import cartopy.crs as ccrs # Baltic BAL_LON = [6.0,31.0] BAL_LA...
anpefi/agalma-modules
agalma/orthofinder.py
#! /usr/bin/env python __author__="Andres Perez-Figueroa" __date__ ="$28-jan-2015 08:00:00$" __version_="0.0.1" # Script to copy and prepare the assemblies files for their use in OrthoFinder import os import subprocess import datetime import re from glob import glob from collections import namedtuple from agalma impo...
jsm28/matholymp-py
matholymp/roundupreg/roundupemail.py
# Email sending for Roundup registration system for matholymp package. # Copyright 2014-2022 Joseph Samuel Myers. # 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 Licens...
TUB-Control/PaPI
papi/event/status/PluginStopped.py
#!/usr/bin/python3 #-*- coding: latin-1 -*- """ Copyright (C) 2014 Technische Universität Berlin, Fakultät IV - Elektrotechnik und Informatik, Fachgebiet Regelungssysteme, Einsteinufer 17, D-10587 Berlin, Germany This file is part of PaPI. PaPI is free software: you can redistribute it and/or modify it under the t...
dataf1ow/K-Mix_RemoteScript
K_Mix_ver_1_1/K_Mix.py
from __future__ import with_statement import Live import time import math from _Framework.Debug import debug_print from _Framework.ControlSurface import ControlSurface from _Framework.MixerComponent import MixerComponent from _Framework.SubjectSlot import subject_slot, subject_slot_group, Subject from K_MixSession im...
AungThiha/DitchButterKnife
run.py
""" Ditch ButterKnife A script to remove ButterKnife code and use Android Built-in methods instead Copyright (C) 2017 Aung Thiha 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 Foundatio...
dlharmon/footgen
setup.py
from distutils.core import setup classifiers = [ 'Development Status :: 3', 'Environment :: Console', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', ...
vikeen/band-maker
users/migrations/0011_remove_profile_avatar.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-12-26 17:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('users', '0010_profile_avatar'), ] operations = [ migrations.RemoveField( ...
nexedi/dream
dream/simulation/ScheduledBreak.py
# =========================================================================== # Copyright 2013 University of Limerick # # This file is part of DREAM. # # DREAM 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 Founda...
brightdroid/nagios-plugins
check_ssl.py
#!/usr/bin/env python # # Copyright (c) Christoph Roeder <chris@brightdroid.com> # import argparse import sys import re from OpenSSL import SSL, crypto import socket import datetime version = '1.1' ### print status and exit with return code def printCert(cert): # type check if not isinstance(cert, crypto.X509): ...
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_chart_blank06.py
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
lrmicmc/dataset
devkit/groundTruthApp.py
#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 the hope that it will be useful, #but WITHO...
arrabito/DIRAC
Interfaces/scripts/dirac-admin-get-pilot-info.py
#!/usr/bin/env python ######################################################################## # File : dirac-admin-get-pilot-output # Author : Ricardo Graciani ######################################################################## """ Retrieve available info about the given pilot """ __RCSID__ = "$Id$" # pyli...