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 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
johngrantuk/myCommServer
myCommServer/migrations/0001_initial.py
Python
mit
767
import py import os import pytest import numpy as np import scipy as sp import openpnm as op class HDF5Test: def setup_class(self): ws = op.Workspace() ws.settings['local_data'] = True self.net = op.network.Cubic(shape=[2, 2, 2]) Ps = [0, 1, 2, 3] Ts = self.net.find_neighb...
TomTranter/OpenPNM
tests/unit/io/HDF5Test.py
Python
mit
3,746
import json import random import traceback import urllib from twisted_gears import client from time import time from twisted.application.service import Service from twisted.internet import defer, protocol, reactor, task from twisted.python import log from twisted.web.client import getPage, HTTPClientFactory from twiste...
hipchat/curler
curler/service.py
Python
mit
7,039
"""Entry point for the Supernova Catalog """ def main(args, clargs, log): from .supernovacatalog import SupernovaCatalog from astrocats.catalog.argshandler import ArgsHandler # Create an `ArgsHandler` instance with the appropriate argparse machinery log.debug("Initializing `ArgsHandler`") args_ha...
astrocatalogs/supernovae
main.py
Python
mit
777
from django.db import models from binder.models import BinderModel class Country(BinderModel): name = models.CharField(unique=True, max_length=100)
CodeYellowBV/django-binder
tests/testapp/models/country.py
Python
mit
154
"""Distance methods between two boolean vectors (representing word occurrences). References: 1. SciPy, https://www.scipy.org """ import numpy as np from .utils import distance def _nbool_correspond_ft_tf(u, v): """Function used by some distance methods (in Distance class). Based on: https://github.com...
aziele/alfpy
alfpy/word_bool_distance.py
Python
mit
5,945
import app.texto as texto import app.twitter as twitter import app.mongo_database as mongo import app.redis_database as rd from collections import Counter from textblob import TextBlob as tb import numpy as np def buscarTermo(termo): lista = list() bons = 0 ruins = 0 medios = 0 analysis = None ...
robsonpiere/nuvemdepalavras
app/contador.py
Python
mit
1,262
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('issue', '0002_auto_20170518_2349'), ] operations = [ migrations.AddField( model_name='issue', name='...
genonfire/portality
issue/migrations/0003_issue_claimusers.py
Python
mit
411
"""Utilities for fast persistence of big data, with optional compression.""" # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import pickle import os import sys import warnings try: from pathlib import Path except ImportError:...
flennerhag/mlens
mlens/externals/joblib/numpy_pickle.py
Python
mit
23,236
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-16 17:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('frisor_urls', '0001_initial'), ] operations = [ migrations.AlterField( ...
vevurka/frisor
frisor/frisor_urls/migrations/0002_auto_20170316_1704.py
Python
mit
584
import socket import time import sys import traceback import logging from dispatch import receiver from stoppable import StoppableLoopThread import signals logger = logging.getLogger(__name__) class TcpServer(StoppableLoopThread): def __init__(self): super(TcpServer, self).__init__() self.daem...
mrmayfield/pyethereum
pyethereum/tcpserver.py
Python
mit
1,643
# -*- coding: utf-8 -*- from .exceptions import ClientException, SnapshotException from . import debug, cache from .region import Region class Snapshot: """Manage operations related to Droplet snapshots""" def __init__(self, render): self.render = render self.region = Region(self.render) ...
bendtherules/pontoon
pontoon/snapshot.py
Python
mit
1,885
import pytest import sys from pwny import * @pytest.mark.xfail(sys.version_info < (2, 7), reason="inspect.getcallargs new in python 2.7") def test_shellcode_translate(): @sc.LinuxX86Mutable.translate() def shellcode(): buf = alloc_buffer(64) reg_add(SYSCALL_RET_REG, 127) ...
edibledinos/pwnypack
tests/test_shellcode.py
Python
mit
3,629
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:41879") else: access = Se...
einsteinium/einsteinium
contrib/bitrpc/bitrpc.py
Python
mit
7,846
import errno import os import signal import subprocess import sys import tempfile import time import mock import unittest2 import testlib import mitogen.parent def wait_for_child(pid, timeout=1.0): deadline = time.time() + timeout while timeout < time.time(): try: target_pid, status = os...
ConnectBox/wifi-test-framework
ansible/plugins/mitogen-0.2.3/tests/parent_test.py
Python
mit
10,015
from __future__ import absolute_import, unicode_literals import logging from .lowlevel import batches from .queue import delete_queues from .conf import settings logger = logging.getLogger(__name__) class ChinupMiddleware(object): def process_request(self, request): delete_queues() def process_re...
pagepart/chinup
chinup/middleware.py
Python
mit
590
from __future__ import unicode_literals import base64 import logging import six import sys from requestlogger import ApacheFormatter from sys import stderr from werkzeug import urls # The joy of version splintering. if sys.version_info[0] < 3: from urllib import urlencode else: from urllib.parse import urlen...
anush0247/Zappa
zappa/wsgi.py
Python
mit
6,777
from __future__ import division import numpy as np import pandas as pd from multiprocessing import Pool from matplotlib import pyplot as plt def load_panel(a): a = pd.read_pickle(a) return a def time_index(a): a = a.reindex(index=a.index.to_datetime()) return a def resamp(a): a = a.resample('10T'...
Aidan-Bharath/code_and_stuffs
profiles.py
Python
mit
2,042
from setuptools import setup setup( name="deferred2", version='0.0.1', description='Successor of the deferred library shipped with Google AppEngine (GAE)', long_description=open('README.rst').read(), license='MIT', author='herr kaste', author_email='herr.kaste@gmail.com', url='https://g...
kaste/deferred2
setup.py
Python
mit
777
import numpy as np import matplotlib.pyplot as plt fig, ((ax00, ax01, ax02), (ax10, ax11, ax12)) = plt.subplots(nrows=2, ncols=3, sharey=True) x = np.arange(4) ax00.plot(x, x, 'ro--') ax01.plot(x, x**1.5, 'g^-.') ax02.plot(x, x**2, 'bs:') ax10.bar(x, x + 1, width=0.5, align='center', color='r') ax11.bar(x, x**1.5 + ...
nkmk/python-snippets
notebook/matplotlib_example_multi.py
Python
mit
526
#!/usr/bin/env python # -*- coding: utf-8 -*- # # admin.py # # Copyright 2014 Gary Dalton <gary@ggis.biz> # # 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 Licen...
gary-dalton/Twenty47
twenty47/admin.py
Python
mit
17,181
class ClientProcess(object): def __init__(self, proc_id, server_ids, timeout, set_value=1): self._id = proc_id self._server_ids = server_ids self._server_states = dict((svr_id, True) for svr_id in server_ids) self._sent_requests = {} self._timeout = timeout self._set_...
airekans/paxosim
simple/two.py
Python
mit
6,862
""" A sample desktop application using the raumfeld library """ import time import raumfeld from PySide import QtCore, QtGui from raumfeld_desktop import __version__ from .mainwindow_ui import Ui_MainWindow as Ui class SearchThread(QtCore.QThread): devices_found = QtCore.Signal(list) def run(self): ...
tfeldmann/Raumfeld-Desktop
raumfeld_desktop/mainwindow.py
Python
mit
3,596
from pkg_resources import get_distribution __version__ = get_distribution('cmddocs').version
noqqe/cmddocs
cmddocs/version.py
Python
mit
93
import os from twilio.rest import Client # put your own credentials here # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_AUTH_TOKEN'] fax_sid = "FXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" client = Client(account_sid, auth_token) ...
TwilioDevEd/api-snippets
fax/instance-get-example/instance-get-example.7.x.py
Python
mit
383
import logging logging.basicConfig() import bacon bacon.window.resizable = True font = bacon.Font('res/DejaVuSans.ttf', 64) font2 = bacon.Font('res/DejaVuSans.ttf', 72) runs = [ bacon.GlyphRun(bacon.Style(font), 'Hello, '), bacon.GlyphRun(bacon.Style(font2, color=(1, 0.5, 0.5, 1)), 'Bacon'), bacon.GlyphR...
aholkner/bacon
examples/style.py
Python
mit
818
import subprocess def test_hypot(): subprocess.check_call(["python", "RunHypot.py"]) def test_matmul(): subprocess.check_call(["python", "Matmul.py", "-N", "10"]) def test_pisum(): subprocess.check_call(["python", "Pisum.py", "-N", "10000"])
scienceopen/python-performance
python_performance/tests/test_all.py
Python
mit
260
class Solution: def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ num1 = {} for count, value in enumerate(nums): if target - value in num1: return [num1[target - value], count] ...
rukashi10/LeetCode_Practice
Easy/#1 TwoSum.py
Python
mit
476
__author__ = 'mouton' import os import stateMachine import shutil exportMainFileName = 'exportMain.py' def copyFiles(exportFolder, rootDir): if not os.path.exists(exportFolder): os.makedirs(exportFolder) for fileName in os.listdir(rootDir): if rootDir + '/' + fileName == exportFolder: ...
mouton5000/DiscreteEventApplicationEditor
exporter/exporter.py
Python
mit
6,274
""" You have a list of points in the plane. Return the area of the largest triangle that can be formed by any 3 of the points. Example: Input: points = [[0,0],[0,1],[1,0],[0,2],[2,0]] Output: 2 Explanation: The five points are show in the figure below. The red triangle is the largest. ![fig](https://s3-lc-upload.s3.a...
franklingu/leetcode-solutions
questions/largest-triangle-area/Solution.py
Python
mit
1,520
import logging from dateutil.relativedelta import relativedelta from dataactbroker.helpers.generation_helper import a_file_query, d_file_query, copy_file_generation_to_job from dataactcore.config import CONFIG_BROKER from dataactcore.interfaces.function_bag import (mark_job_status, filename_fyp_sub_format, filename_...
fedspendingtransparency/data-act-broker-backend
dataactvalidator/validation_handlers/file_generation_manager.py
Python
cc0-1.0
11,318
# Program accepts a quiz score and prints out a grade def main(): #Create list letter = ["F", "F", "D", "C", "B", "A"] #prompt for quiz score score = eval(input("Input score: ")) #set grade grade = letter[score] #print grade print("Congrats you got a: ", grade) main()
src053/PythonComputerScience
chap5/grades.py
Python
cc0-1.0
283
def euler1(): counter = 0 num = 0 while counter < 1000: if counter %3 == 0 or counter %5 == 0: num += counter counter += 1 return num def euler2(): term1 = 1 term2 = 2 termone = 1 num = 0 while term1 + term2 < 4000000: if term2 %2 == 0: num += term2 term1 = term2 term2 = termone + term2 ter...
steven1695-cmis/steven1695-cmis-cs2
projecteuler1.py
Python
cc0-1.0
397
import os path = os.path.dirname(os.path.realpath(__file__)) sbmlFilePath = os.path.join(path, 'MODEL1310110049.xml') with open(sbmlFilePath,'r') as f: sbmlString = f.read() def module_exists(module_name): try: __import__(module_name) except ImportError: return False else: ret...
biomodels/MODEL1310110049
MODEL1310110049/model.py
Python
cc0-1.0
427
# Eating Functions # Author: Lmctruck30 # from server.util import ScriptManager # heal, delay, itemId, itemSlot # cake def itemClick_1891(player, itemId, itemSlot): player.getPA().eatFood(4, 1600, itemId, itemSlot) # cake 2/3 def itemClick_1893(player, itemId, itemSlot): player.getPA().eatFood(4, 1600, itemId, ite...
RodriguesJ/Atem
data/scripts/player/eat/eat.py
Python
epl-1.0
1,909
# Copyright (c) 2013-2015 by Ron Frederick <ronf@timeheart.net>. # 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 # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
nchammas/asyncssh
asyncssh/dsa.py
Python
epl-1.0
5,244
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Author: Corentin Arnaud Module: cluster Description: script to run the project on cluster ''' import sys from Utils.ReadXmlFile import ReadXmlFile from Main.MainCMAES import launchCMAESForAllPoint if __name__ == '__main__': rs = ReadXmlFile(sys.argv[1]) launc...
osigaud/ArmModelPython
Control/clusterOneTargetNController.py
Python
gpl-2.0
367
#!/usr/bin/python import SaX config = SaX.SaXConfig; keyboard = SaX.SaXImport ( SaX.SAX_KEYBOARD ); keyboard.doImport(); manip = SaX.SaXManipulateKeyboard (keyboard); models = manip.getModels(); for (key, item) in models.items(): print "Key: [%s] Value: [%s]" % (key, item)
schaefi/sax2
libsax/bindings/python/example.py
Python
gpl-2.0
284
versionNumberString = '0.90' # a string that can be turned into a number versionNumber = float(versionNumberString) versionNumberModifier = ' [2012.10.17]' # a string versionString = '%s%s' % (versionNumberString, versionNumberModifier) dateString = "17 October, 2012"
Anaphory/p4-phylogeny
p4/version.py
Python
gpl-2.0
275
# # 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...
arunkgupta/gramps
gramps/gui/filters/_filterstore.py
Python
gpl-2.0
2,380
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Django settings for OMERO.web project. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Copyright (c) 2008-2016 University of ...
simleo/openmicroscopy
components/tools/OmeroWeb/omeroweb/settings.py
Python
gpl-2.0
47,080
from django.db import models class Language(models.Model): code = models.CharField(max_length=5) description = models.CharField(max_length=50) def __unicode__(self): return u'%s' % (self.code)
cjaniake/ionicweb
webapp/common/models.py
Python
gpl-2.0
214
#!/usr/bin/python # -*- coding: utf-8 -*- import os, sys, time import csv def diffCSVofNoHeaderRow(file1, file2, resultFile, fieldnames, keyColumn): #with open('masterlist.csv', 'rb') as master: with open(file1, 'rb') as master: #for i, r in enumerate(csv.reader(master) # print i,r...
AaronZhangL/az-pyFilesLib
case2/outDiffRecordByIndexColumn.py
Python
gpl-2.0
2,326
''' Created on Feb 2, 2014 @author: Chris TODO: - test no argparse module - test argparse in main - test argparse in try/catch - ''' import os import ast import unittest import source_parser basic_pyfile = ''' import os def say_jello(): print "Jello!" def main(): print "h...
garrettcap/Bulletproof-Backup
gooey/source_parser_unittest.py
Python
gpl-2.0
9,087
# Django settings for PayForward project. from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS DEBUG = True TEMPLATE_DEBUG = DEBUG AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'loginza.authentication.LoginzaBackend', ) TEMPLATE_CONTEXT_PROCESSORS += ( 'django.co...
danikmil/payforward
PayForward/settings.py
Python
gpl-2.0
4,845
# -*- coding: utf-8 -*- from django.conf.urls import include, url from plugins.models import Plugin, PluginVersion from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.decorators import login_required, user_passes_test from plugins.models import Plugin, PluginVersion from plugins.views impo...
qgis/QGIS-Django
qgis-app/plugins/urls.py
Python
gpl-2.0
6,575
"""Stockplanconnect release/trade transaction source. Data format =========== To use, first download PDF release and trade confirmations into a directory on the filesystem either manually or using the `finance_dl.stockplanconnect` module. You might have a directory structure like: financial/ documents/ ...
jbms/beancount-import
beancount_import/source/stockplanconnect.py
Python
gpl-2.0
25,823
# -*- coding: utf-8 -*- # Micha Wildermuth, micha.wildermuth@kit.edu 2020 from qkit.core.instrument_base import Instrument import numpy as np def get_IVC_JJ(x, Ic, Rn, SNR): sign = np.sign(x[-1] - x[0]) return Rn * x * np.heaviside(np.abs(x) - Ic, int(sign > 0)) \ + (np.heaviside(x, int(sign > 0)) ...
qkitgroup/qkit
qkit/drivers/IVD_dummy.py
Python
gpl-2.0
1,735
import re class TimeConverter(object): def __init__(self, data): self.seconds = self.convert_to_second(data) self.string = self.convert_to_string(data) def convert_to_second(self, stringtime): if isinstance(stringtime, str): try: re.purge d...
stregatto/fabric_lib
converter.py
Python
gpl-2.0
1,975
# User creation spoke # # Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed i...
projectatomic/anaconda
pyanaconda/ui/gui/spokes/user.py
Python
gpl-2.0
18,693
from gi.repository import Gtk from gi.repository import Gdk import constants from gettext import gettext as _ from sugar3.graphics.icon import Icon from ReadTab import evinceadapter, epubadapter class _ModesComboHeaderNavigator: def __init__(self, app): self._app = app self._modes = {} self._ic...
activitycentral/ebookreader
src/widgets/modescomboheader.py
Python
gpl-2.0
7,573
# Rekall Memory Forensics # # Copyright 2013 Google Inc. All Rights Reserved. # # 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 v...
palaniyappanBala/rekall
rekall-core/rekall/plugins/overlays/windows/tcpip_vtypes.py
Python
gpl-2.0
20,786
#!/usr/bin/env python3 # How did Kepler measure planets' oppositions without an accurate clock? # One theory: a planet's opposition is right in the middle of its # retrograde loop. Compare those two positions. import ephem from ephem import cities import sys import os import math import argparse import gi gi.requir...
akkana/scripts
astro/oppretro/oppretro_ephem.py
Python
gpl-2.0
12,026
#!/usr/bin/python3 from socket import socket, AF_UNIX, SOCK_DGRAM from select import select from os import unlink, getcwd, stat from os.path import exists from os.path import relpath from sys import argv, exit def main(): if len(argv) < 2: print 'Usage: %s <socket name>' % argv[0] exit(1) sn = relpath(ar...
facebook/mysql-5.6
mysql-test/t/slocket_listen.py
Python
gpl-2.0
839
#!/usr/bin/env python2 # # # # # # # # # # # # # # # # # # # JodelExtract Configuration File # # # # # # # # # # # # # # # # # # # # app version to use when not specified otherwise APP_VERSION = '4.47.0' # General and debugging settings VERBOSE = True # Print post handling to command line CONNECTION_VERBOSE = False ...
knorkinator/PythonProject
TOOLS/Config.py
Python
gpl-2.0
7,570
""" .. module:: l_release_group_url The **L Release Group Url** Model. PostgreSQL Definition --------------------- The :code:`l_release_group_url` table is defined in the MusicBrainz Server as: .. code-block:: sql CREATE TABLE l_release_group_url ( -- replicate id SERIAL, link ...
marios-zindilis/musicbrainz-django-models
musicbrainz_django_models/models/l_release_group_url.py
Python
gpl-2.0
2,149
r""" Summary ---------- Test output of docker tag command Operational Summary ---------------------- #. Make new image name. #. tag changes. #. check if tagged image exists. #. remote tagged image from local repo. """ from autotest.client.shared import error from autotest.client import utils from dockertest.subtest...
luwensu/autotest-docker
subtests/docker_cli/tag/tag.py
Python
gpl-2.0
6,986
""" KVM test utility functions. @copyright: 2008-2009 Red Hat Inc. """ import time, string, random, socket, os, signal, re, logging, commands, cPickle import fcntl, shelve, ConfigParser, threading, sys, UserDict, inspect, tarfile import struct, shutil, glob from autotest_lib.client.bin import utils, os_dep from autot...
libvirt/autotest
client/virt/virt_utils.py
Python
gpl-2.0
125,243
__author__ = 'bison' from PIL import Image, ImageDraw class core: def __init__(self, imageX, imageY, pixelSize, fileType, dpi): self.imageX = imageX self.imageY = imageY self.pixelSize = pixelSize self.img = Image.new('RGB', (imageX, imageY), "black") # create a new black image self.pixels = self.img.loa...
bison--/draw-o-matic
core.py
Python
gpl-2.0
1,859
from django.contrib.syndication.views import Feed from packages.models import Package class PackageFeed(Feed): title = "Last updated packages" link = "/packages/" description = "" def items(self): return Package.objects.order_by('-last_update')[:5] def item_title(self, item): retu...
osa1/noan
src/feeds.py
Python
gpl-2.0
400
#!/usr/bin/env python import sys import os import re import json from collections import OrderedDict from argparse import ArgumentParser from argparse import RawDescriptionHelpFormatter from elasticsearch1 import Elasticsearch es_host = 'localhost:9200' es_type = "donor" es = Elasticsearch([es_host], timeout=600) es...
ICGC-TCGA-PanCancer/pcawg-central-index
pcawg_metadata_parser/pc_report-donors_alignment_summary.py
Python
gpl-2.0
22,302
from setuptools import setup, find_packages with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='Reddit Comic', version='0.0.1', description='Searches for Comics', long_description=readme, author='Ben Osment', author_email='benjami...
benosment/reddit-comic
setup.py
Python
gpl-2.0
475
from datetime import datetime import time import random import sys import math import string import os import base64 def generate_row(c_pk,c_1,c_10000): #when = time.time() + (transactionid / 100000.0) #datetime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(when)) #big_varchar = ''.join(random.choice(strin...
Percona-QA/toku-qa
tokudb/software/generator/generator_increments_simple.py
Python
gpl-2.0
1,601
from RepositoryInfo import RepositoryInfo from ProjectInfo import ProjectInfo import os class PackageInfo: """ Get basic information about project: imported packages provided packages tests """ def __init__(self, import_path, commit = "", noGodeps = [], skip_errors=False): self.import_path = import_path ...
piotr1212/gofed
modules/PackageInfo.py
Python
gpl-2.0
1,853
#!/usr/bin/env python #-*- coding: latin-1 -*- import sys, re, time def isvalidEntry(entry): # Standard keys in VCF Version 3 #FN|N|NICKNAME|PHOTO|BDAY|ADR|LABEL|TEL|EMAIL|MAILER|TZ|GEO|TITLE|ROLE|LOGO|AGENT| #ORG|CATEGORIES|NOTE|PRODID|REV|SORT\-STRING|SOUND|URL|UID|CLASS|KEY if (not(re.match('^(?:FN...
akelge/utils
ldap/vcard2ldif.py
Python
gpl-2.0
5,417
#!/usr/bin/python # -*- coding: utf-8 -*- import xbmcaddon import xbmc import xbmcvfs import gzip import os import base64 import time id = 'service.rytecepgdownloader' addon = xbmcaddon.Addon(id=id) def get_descriptions(): descriptions = [] set = [addon.getSetting('xmltv_1'), addon.getSetting('xmltv_2'), addo...
noba3/KoTos
addons/service.rytecepgdownloader/resources/lib/common.py
Python
gpl-2.0
5,341
#!/usr/bin/python3 ######################################################################## # File Name: csvExample.py # Author: chadd williams # Date: Oct 30, 2014 # Class: CS 360 # Assignment: Example CSV reader # Purpose: Show examples of using csv reader #####################################################...
cs360f14/PythonExamples_Lectures-Public
LectureExamples/csvExample.py
Python
gpl-2.0
1,546
# encoding: utf-8 # module PyKDE4.kio # from /usr/lib/python3/dist-packages/PyKDE4/kio.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyKDE4.kdeui as __PyKDE4_kdeui import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtGui as __PyQt4_QtGui class KOCRDialog(__PyKDE4_kdeui.KPageDialog): ...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyKDE4/kio/KOCRDialog.py
Python
gpl-2.0
736
"""passlib.handlers.phpass - PHPass Portable Crypt phppass located - http://www.openwall.com/phpass/ algorithm described - http://www.openwall.com/articles/PHP-Users-Passwords phpass context - blowfish, bsdi_crypt, phpass """ #============================================================================= # imports #==...
theguardian/JIRA-APPy
lib/passlib/handlers/phpass.py
Python
gpl-2.0
4,886
#!/usr/bin/env python # -*- coding: UTF8 -*- import sys import os import subprocess import webbrowser from fechas import CDateLocal (EXISTENCIA_ANTERIOR, ENTRADAS, SALIDAS, RETIROS, AUTOCONSUMOS, EXISTENCIA_ACTUAL, VALOR_ANTERIOR, ENTRADAS_BS, SALIDAS_BS, RETIROS_BS, AUTOCONSUMOS_BS, EXISTENCIA_BS) = range(12) cla...
jehomez/pymeadmin
inventariotreetohtml.py
Python
gpl-2.0
4,752
#Elaine Mao #ekm2133 #Computer Networks #Programming Assignment 1 - Client import sys, os import socket from threading import * #Main code for program def main (address, port): HOST = address PORT = int(port) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT))...
elainekmao/chat-program
Client.py
Python
gpl-2.0
2,485
#! /usr/bin/env python # (C) Copyright 2006 Nuxeo SAS <http://nuxeo.com> # Author: bdelbosc@nuxeo.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 Free Software Foundation; either version 2 of the License, or # (at ...
bdelbosc/bundleman
setup.py
Python
gpl-2.0
3,472
import os import pandas as pd import glob fname = '000' path = os.getcwd() files = os.listdir(path) files = glob.glob("*"+fname+"*") df1,df2,df3 = pd.DataFrame(),pd.DataFrame(),pd.DataFrame() df1 = pd.read_excel(files[0]) df2 = pd.read_excel(files[1]) df3 = pd.read_excel(files[2]) ez = pd.concat([df1,df2,df3], ax...
kalfasyan/DA224x
code/old code/fano/merger.py
Python
gpl-2.0
381
#!/usr/bin/env python # -*- coding: utf-8 -*- # ############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial Lice...
qtproject/pyside-shiboken
tests/samplebinding/nonzero_test.py
Python
gpl-2.0
1,563
# encoding: utf-8 # module pango # from /usr/lib/python2.7/dist-packages/gtk-2.0/pango.so # by generator 1.135 # no doc # imports import gobject as __gobject import gobject._gobject as __gobject__gobject class FontDescription(__gobject.GBoxed): # no doc def better_match(self, *args, **kwargs): # real signatu...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/pango/FontDescription.py
Python
gpl-2.0
3,003
# coding=utf-8 import os, sys, datetime, unicodedata, re, types import xbmc, xbmcaddon, xbmcgui, xbmcvfs, urllib import xml.etree.ElementTree as xmltree import hashlib, hashlist import ast from xml.dom.minidom import parse from traceback import print_exc from htmlentitydefs import name2codepoint from unidecode import u...
AMOboxTV/AMOBox.LegoBuild
script.skinshortcuts/resources/lib/datafunctions.py
Python
gpl-2.0
62,551
""" A wrapper for the VLBA Continuum Pipeline. This module can be invoked from the command line or by calling the function pipeWrap directly. External Dependencies: * Requires python 2.7 (for logging) * *diff* -- tested with 'diff (GNU diffutils) 2.8.1' """ from __future__ import absolute_import from __future__ impo...
kernsuite-debian/obit
python/VLBAContPipeWrap.py
Python
gpl-2.0
14,499
# -*- coding: utf-8 -*- ############################################################################### # # GetLegislator # Allows you to search for information on an individual legislator. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "Licens...
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/SunlightLabs/Congress/Legislator/GetLegislator.py
Python
gpl-2.0
7,597
#!/usr/bin/python # Rishabh Das <rishabh5290@gmail.com> # # This program is a 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://w...
rishabhdas/pyjdox
pyjdox.py
Python
gpl-2.0
3,316
#!/usr/bin/python #coding=utf-8 #FILENAME : __models.py__ #DESCRIBE: import google_models as gdb from google.appengine.ext import db import logging import tools class Anime(gdb.Model): u""" 用来记录动漫更新信息 """ #TODO把real_db的验证改成装饰器算了 def __init__(self, name = None, index = None, update_time = None,...
ariwaranosai/twitter_bot
twitter_bot/models.py
Python
gpl-2.0
1,903
import logging, os, sys, subprocess, tempfile, traceback import time, threading from autotest_lib.client.common_lib import utils from autotest_lib.server import utils as server_utils from autotest_lib.server.hosts import abstract_ssh, monitors MONITORDIR = monitors.__path__[0] SUPPORTED_PYTHON_VERS = ('2.4', '2.5', '...
libvirt/autotest
server/hosts/logfile_monitor.py
Python
gpl-2.0
10,290
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy from scrapy.item import Item, Field class StackItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() titl...
drupalmav/learningpython
scrapy/soexample/stack/stack/items.py
Python
gpl-2.0
359
#!/usr/bin/python from pisi.actionsapi import perlmodules, pisitools def setup(): perlmodules.configure() def build(): perlmodules.make() def install(): perlmodules.install() pisitools.remove("/usr/bin/instmodsh") pisitools.removeDir("/usr/bin") pisitools.remove("/usr/share/man/man1/inst...
richard-fisher/repository
programming/perl/perl-extutils-makemaker/actions.py
Python
gpl-2.0
335
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2011 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
halbbob/dff
ui/gui/dialog/dialog.py
Python
gpl-2.0
7,654
from mininet.topo import Topo from mininet.link import TCLink class UFRGSTopo(Topo): def __init__(self): Topo.__init__(self) self.host = {} for h in range(1,231): self.host[h] = self.addHost('h%s' %(h)) self.switch = {} for s in range(1,12): self.switch[s] = self.addSwitch('s%s'...
ComputerNetworks-UFRGS/AuroraSDN
extras/mininet/custom_topologies/ufrgstopo.py
Python
gpl-2.0
2,581
#Testes in a file with interactions, if two sets of user given coordinates #Have interactions where one interval is target of the other, and vice-versa #Returns the number of reciprocate interactions from sys import argv f=open(argv[1]) interval1=[int(argv[2]), int(argv[3])] interval2=[int(argv[4]), int(argv[5])] ...
Nymeria8/hi-c_helper_scripts
teste.py
Python
gpl-2.0
642
from routersploit.modules.creds.generic.snmp_bruteforce import Exploit def test_check_success(generic_target): """ Test scenerio - testing against SNMP server """ exploit = Exploit() assert exploit.target == "" assert exploit.port == 161 assert exploit.version == 1 assert exploit.threads == ...
dasseclab/dasseclab
clones/routersploit/tests/creds/generic/test_snmp_bruteforce.py
Python
gpl-2.0
444
# Chula imports from chula.www import controller class Rest(controller.Controller): def blog(self): return 'blog: %s' % self.env.form_rest def user(self): return 'user preferences'
jmcfarlane/chula
apps/example/webapp/controller/rest.py
Python
gpl-2.0
207
import sys from time import sleep from PyQt4 import QtGui from gui.main_window3 import Ui_MainWindow import zmq from threading import Thread from math import cos, sin, pi sys.path.append("../lib") import cflib.crtp from CF_class_sterowanie2 import Crazy as cf import usb.core import logging logging.basicConfig(level=log...
Venris/crazyflie-multilink
KM/main_sterowanie3_fuzzy.py
Python
gpl-2.0
8,451
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ,---------, ____ _ __ # | ,-^-, | / __ )(_) /_______________ _____ ___ # | ( O ) | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # | / ,--' | / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # +------` /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyri...
bitcraze/crazyflie-lib-python
cflib/crazyflie/mem/__init__.py
Python
gpl-2.0
23,474
from libs.fountain import Fountain import pandas as pd import os class ScreenPlay(Fountain): characters = None # Character Dictionary { Character : Contentlength Integer } topcharacters = [] # Sorted List of characters [ Char_mostContent, Char_2nd-mostContent , ... ] rawscript = None # Script broken up in array o...
MaroGM/gendersonification
screenplay.py
Python
gpl-2.0
5,001
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ('documents', ...
FUB-HCC/neonion
accounts/migrations/0001_initial.py
Python
gpl-2.0
4,596
#! /usr/local/bin/python3 from wsgiref.simple_server import make_server from cgi import parse_qs, escape #parse_qs(environ['HTTP_HOST']) import os,sys,importlib,urllib import Controller,Model,View #import default abstract classes #import Loader DEFAULT_APP_PATH = "/home/francesco/webapp" WORKING_APP_PATH = "" CONTROL...
frank2411/python-web-mvc-server
wsgipy.py
Python
gpl-2.0
1,747
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007-2009 Douglas S. Blank <doug.blank@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 Free Software Foundation; either version 2 of the Lic...
Forage/Gramps
gramps/plugins/gramplet/calendargramplet.py
Python
gpl-2.0
2,539
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
seankelly/buildbot
master/buildbot/test/unit/test_www_hooks_bitbucket.py
Python
gpl-2.0
9,160
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 ## License, or (at your opt...
pamoakoy/invenio
modules/bibupload/lib/batchuploader_templates.py
Python
gpl-2.0
23,046
# -*- coding: utf-8 -*- # # File: Student.py # # Copyright (c) 2008 by [] # Generator: ArchGenXML Version 2.0-beta10 # http://plone.org/products/archgenxml # # GNU General Public License (GPL) # __author__ = """unknown <unknown>""" __docformat__ = 'plaintext' from AccessControl import ClassSecurityInfo fro...
uwosh/UWOshMusicRecruiting
content/Student.py
Python
gpl-2.0
4,310
import numpy as np def pretty_depth(depth): """Converts depth into a 'nicer' format for display This is abstracted to allow for experimentation with normalization Args: depth: A numpy array with 2 bytes per pixel Returns: A numpy array that has been processed whos datatype is unspec...
team4099/Stronghold_2016_Vision
frame_convert.py
Python
gpl-2.0
1,697
""" MetPX Copyright (C) 2004-2006 Environment Canada MetPX comes with ABSOLUTELY NO WARRANTY; For details type see the file named COPYING in the root of the source directory tree. """ """ ############################################################################################# # Name: PDSClient.py # # Author: Dan...
khosrow/metpx
columbo/lib/PDSClient.py
Python
gpl-2.0
1,812
import os import tuned.logs from . import base from tuned.utils.commands import commands class kb2s(base.Function): """ Conversion function: kbytes to sectors """ def __init__(self): # 1 argument super(kb2s, self).__init__("kb2s", 1, 1) def execute(self, args): if not super(kb2s, self).execute(args): re...
redhat-performance/tuned
tuned/profiles/functions/function_kb2s.py
Python
gpl-2.0
405