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
# Copyright (C) 2011-2012 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...
hcs/mailman
src/mailman/handlers/rfc_2369.py
Python
gpl-3.0
4,802
import copy from common.common_consts.post_breach_consts import POST_BREACH_COMMUNICATE_AS_BACKDOOR_USER from monkey_island.cc.database import mongo from monkey_island.cc.models import Monkey from monkey_island.cc.services.telemetry.zero_trust_checks.communicate_as_backdoor_user import ( check_new_user_communicati...
guardicore/monkey
monkey/monkey_island/cc/services/telemetry/processing/post_breach.py
Python
gpl-3.0
2,187
# coding: utf-8 # Copyright (C) 2016 Bruno Abude Cardoso # # Imagem Cinemática 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. # # Ima...
brunoabud/ic
gui/application.py
Python
gpl-3.0
6,056
#!/usr/bin/env python def odds_minus_evens(l): sum = 0 for x in l: if x % 2 == 0: sum -= x else: sum += x return sum print(odds_minus_evens(range(2, 6)))
veltzer/demos-python
src/exercises/basic/odds_minus_evens/solution2.py
Python
gpl-3.0
210
#!/usr/bin/env python import os import re from jinja2 import Environment, PackageLoader from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import EngFormatter import numpy as np class DatcomPlotter(object): def __init__(self, parser_dict): ...
arktools/pydatcom
pydatcom/plotter.py
Python
gpl-3.0
7,254
############################### # This file is part of PyLaDa. # # Copyright (C) 2013 National Renewable Energy Lab # # PyLaDa is a high throughput computational platform for Physics. It aims to make it easier to submit # large numbers of jobs on supercomputers. It provides a python interface to physical input, suc...
pylada/pylada-light
tests/process/test_mpi.py
Python
gpl-3.0
5,949
from django.conf.urls import url import views urlpatterns = [ url(r'^index/$', views.index), url(r'^idc/$', views.idc), url(r'^get_add_idc_page/$', views.get_add_idc_page), url(r'^add_idc/$', views.add_idc), url(r'^modify_idc_remark/$', views.modify_idc_remark), url(r'^group/$', views.group),...
SnowRomance/CMDB
app/urls.py
Python
gpl-3.0
819
import re class EuFileBuf: def __init__(self, filename): self.filename = filename self.indexes = [] self.createIndex() self.fd = open(self.filename,'r') self.lastline = {'line':0, 'txt':self.fd.readline()} def __del__(self): self.fd.close() def getLen(self): return len(self.indexes) def getLine(se...
ceccopierangiolieugenio/EuLog
EuLog_mod/EuFileBuf.py
Python
gpl-3.0
974
#! /usr/bin/env python from __future__ import print_function, division from collections import namedtuple """ Copyright (C) 2016 Wesley Fraser (westhefras@gmail.com, @wtfastro) 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 t...
fraserw/trippy
trippy/psf.py
Python
gpl-3.0
52,236
# encoding= utf-8 ## # Playback/Selection test. # <p> # Description of the test. # ## from qtaste import * import time # update in order to cope with the javaGUI extension declared in your testbed configuration. javaguiMI = testAPI.getJavaGUI(INSTANCE_ID=testData.getValue("JAVAGUI_INSTANCE_NAME")) subtitler = testA...
remybaranx/qtaste
demo/TestSuites/PlayBack/SelectionInTable/TestScript.py
Python
gpl-3.0
1,188
from pickle import load layers = load(open('data/snapshot2.dat', 'rb')) print(layers)
bdvllrs/Pyanissimo
ex/test.py
Python
gpl-3.0
87
# coding: utf-8 """ Copyright 2013 Oliver Schnabel This file is part of ADPY. ADPY 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 any later versio...
zwenson/ADPY
ADPY/ADFUN/globalfuncs.py
Python
gpl-3.0
1,896
""" A simple API to retrieve user info """ from athena.classes.api import Api from athena.classes.input_field import InputField class UserApi(Api): def __init__(self): self.save_data = [ InputField('username', require=True), InputField('full_name'), ...
athena-voice/athena-voice-client
athena/api_library/user_api.py
Python
gpl-3.0
677
import serial import pynmea2 import time filename = time.strftime("surface_data_%Y%m%d.sfc") print ("Opening new file: ",filename) file = open(filename,'a') wxt = serial.Serial('COM1', 19200, timeout=1.0) # open wxt536 serial port gps = serial.Serial('COM18', 19200, timeout=1.0) # open arduino combo device...
dwkennedy/multi-sensor
serialReader.py
Python
gpl-3.0
984
import re import urllib import urllib2 from urlparse import urlsplit import argparse import os import errno import unicodedata import getpass import netrc import mechanize import cookielib from bs4 import BeautifulSoup import tempfile from os import path import platform import _version class CourseraDownloader(object)...
rydnr/coursera-dl
courseradownloader/courseradownloader.py
Python
gpl-3.0
23,257
import random import math import util joblist = { 'CookJob':{'Inputs':{'Food':9.92, 'CookJob': 1.0},'Outputs':{'Meals':9.92,'SanitationJob':0.1}}, #fresh food, dirty kitchen 'SanitationJob':{'Inputs':{'General Consumables':0.55, 'SanitationJob': 1.0},'Outputs':{'Solid Waste':0.55}}, ...
facepalm/personal-space
src/job.py
Python
gpl-3.0
1,622
# encoding= utf-8 # Copyright 2007-2009 QSpin - www.qspin.be # # This file is part of QTaste framework. # # QTaste is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the...
remybaranx/qtaste
TestSuites/TestSuite_QTaste/EngineSuite/QTASTE_DATA/QTASTE_DATA_05/TestScript.py
Python
gpl-3.0
2,302
from django import forms from django.forms import formset_factory from django.forms.extras.widgets import SelectDateWidget from django.utils.html import format_html from django.utils.safestring import mark_safe from django.forms.utils import flatatt import datetime from .models import Resource_Type, Resource_Inst, Me...
nw0/mealy
forms.py
Python
gpl-3.0
7,338
#!/usr/bin/python # # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
orgito/ansible
lib/ansible/modules/cloud/azure/azure_rm_resource.py
Python
gpl-3.0
9,861
from django.db.models import CharField import uuid UUID_BASE_ID = 'fff0' UUID_BASE_VERSION = 1 UUID_BASE_NAME = 'anorg.net' UUID_BASE_NAMESPACE = uuid.NAMESPACE_DNS class UUIDVersionError(Exception): pass class UUIDField(CharField): """ UUIDField By default uses UUID version 1 (generate from host...
hzlf/openbroadcast
website/lib/fields/uuidfield.py
Python
gpl-3.0
3,309
#!/usr/local/bin/python __author__ = 'kalcho' # Standard multi-threaded TCP server import socket import threading bind_ip = '0.0.0.0' bind_port = 9999 # create a floating socket object server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # bind socket to address server.bind((bind_ip, bind_port)) # make serv...
kalcho83/black-hat-python
tcp_server.py
Python
gpl-3.0
1,025
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(ver...
cpscanarias/ssfinder-back-end
ssfinder_back_end/social_service/migrations/0001_initial.py
Python
gpl-3.0
483
#!/usr/bin/python # -*- coding: utf-8 -*- from lib.meos import MEoS from lib import unidades class CF3I(MEoS): """Multiparameter equation of state for trifluoroiodomethane >>> trifluoroiodometano=CF3I(T=300, P=0.1) >>> print "%0.1f %0.5f %0.2f %0.3f %0.5f %0.4f %0.4f %0.2f" % (trifluoroiodometano.T, tri...
edusegzy/pychemqt
lib/mEoS/CF3I.py
Python
gpl-3.0
2,646
#----------------------------------------------------------------------------- # Copyright (c) 2014-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
ijat/Hotspot-PUTRA-Auto-login
PyInstaller-3.2/PyInstaller/hooks/hook-PyQt5.QtWebEngineWidgets.py
Python
gpl-3.0
2,207
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
nexdatas/writer
test/FElementH5PY_test.py
Python
gpl-3.0
45,164
############################################################################### # # 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...
ivmech/iviny-scope
lib/xlsxwriter/test/comparison/test_image13.py
Python
gpl-3.0
1,787
from django.db import models from django.contrib.auth.models import User class Website(models.Model): user = models.ForeignKey(User, related_name='websites') name = models.CharField(null=True, max_length=100, unique=True) url = models.CharField(unique=True, max_length=200, db_index=True) embed_src = m...
dash1291/major
webserver/conceptual/webapp/models.py
Python
gpl-3.0
1,105
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
mwytock/cvxpy
cvxpy/atoms/affine/affine_atom.py
Python
gpl-3.0
3,669
# import vim normal = lambda s: vim().command('normal %s' % s) normal_silent = lambda s: vim().command('silent! normal %s' % s) def vim(): """ call Vim. This is wrapped so that it can easily be mocked. """ import vim return vim def _goto_window_for_buffer(expr): """ Moves the cursor to ...
SpaceVim/SpaceVim
bundle/vim-mundo/autoload/mundo/util.py
Python
gpl-3.0
1,462
# # Copyright (C) 2012 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV 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 hope...
hmpf/nav
python/nav/eventengine/daemon.py
Python
gpl-3.0
3,336
#!/usr/bin/python # -*- coding: utf-8 -*- #This file is part of pydsl. # #pydsl 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. # #pydsl i...
nesaro/pydsl
tests/functional/test_Binary.py
Python
gpl-3.0
1,500
import pandas as pd import numpy as np import matplotlib.pyplot as plt from twosampyle.plot_utils import plot_hist class ChiSquaredTest(): def __init__(self, observed=None, expected=None): self.observed = observed self.expected = expected @staticmethod def chi_s...
jwilber/twosampyle
twosampyle/permchisquare.py
Python
gpl-3.0
2,315
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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) a...
Eigenlabs/EigenD
app_commander/commander_cli.py
Python
gpl-3.0
11,251
import random import sys import datetime time = datetime.datetime.now() #Set up the seed based on the clock. table = [] #The table of words in the input. output = [] #The table of words in the output. final = "\n " #The final output. line = 0 random.seed = time print( "Enter Text. \n" ) for inp in sys.stdin: fo...
Wolfarc49/MassOfTextGens
Textgens/Backrunner.py
Python
gpl-3.0
750
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # jsonify.py # TODO: extend to `macro` objects # TODO: resolve schema issues with `vphi` and other external consumers # TODO: somehow check schema instead of version? """ PyPhi- and NumPy-aware JSON serialization. To be properly serialized and deserialized, PyPhi models...
rlmv/pyphi
pyphi/jsonify.py
Python
gpl-3.0
7,250
""" Job Base Class This class provides generic job definition functionality suitable for any VO. Helper functions are documented with example usage for the DIRAC API. An example script (for a simple executable) would be:: from DIRAC.Interfaces.API.Dirac import Dirac from DIRAC.Interfaces.API.J...
coberger/DIRAC
Interfaces/API/Job.py
Python
gpl-3.0
47,515
#!/usr/bin/env python # # Copyright 2007,2010,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
bastibl/gnuradio
gr-blocks/python/blocks/qa_skiphead.py
Python
gpl-3.0
4,664
# This file is part of python-flac. # # Copyright (c) 2014 Christian Schmitz <tynn.dev@gmail.com> # # python-flac 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 ...
tynn/python-flac
tests/test_flac_format.py
Python
gpl-3.0
1,325
#!/usr/bin/env python #encoding: utf-8 import os import logging import time import json import socket import subprocess import random from Crypto.PublicKey import RSA from Crypto.Cipher import ( PKCS1_OAEP, AES, ) from Crypto.Signature import PKCS1_PSS from Crypto.Hash.SHA import SHA1Hash import base64 import ...
david-caro/mssh
mssh.py
Python
gpl-3.0
17,492
# # @file TestCVTerms.py # @brief CVTerms unit tests # # @author Akiya Jouraku (Python conversion) # @author Sarah Keating # # $Id: TestCVTerms.py 11441 2010-07-09 02:22:23Z mhucka $ # $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/python/test/annotation/TestCVTerms.py $ # # ...
alexholehouse/SBMLIntegrator
libsbml-5.0.0/src/bindings/python/test/annotation/TestCVTerms.py
Python
gpl-3.0
5,615
import argiope as ag import numpy as np import pandas as pd mesh = ag.mesh.read_msh("demo.msh")
lcharleux/argiope
doc/examples/mesh/Mesh-read_msh.py
Python
gpl-3.0
97
if x(): if y(): if z(): if u(): a() else: b() else: c() else: d() else: e()
bronikkk/tirpan
tests/test_mir24.py
Python
gpl-3.0
180
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DNAOrderApp.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
aw18/DNAOrderApp
manage.py
Python
gpl-3.0
255
# Copyright 2007 Casey Durfee # Copyright 2007 Gabriel Farrell # # This file is part of Kochief. # # Kochief 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 opti...
edsu/lochief
kochief/settings.py
Python
gpl-3.0
7,699
from ..exceptions import DuplicateKeyError, SaveError from ..monitor import Monitor from curtsies import fmtstr import pymongo import bson.errors import logging import arrow import re class PostSaver: def __init__(self, **kwargs): self.logger = logging.getLogger(__name__) self.db_address = kwargs.get("...
franziz/arcrawler
lib/saver/post.py
Python
gpl-3.0
2,417
class AerogenError(Exception): pass
ctu-geoforall-lab-sandbox/qgis-aerogen-plugin
exceptions.py
Python
gpl-3.0
40
import re from xml.etree import ElementTree import sickchill.oldbeard.common from sickchill import logger, settings from sickchill.oldbeard import common from sickchill.oldbeard.helpers import getURL, make_session class Notifier(object): def __init__(self): self.headers = { 'X-Plex-Device-Nam...
Vagab0nd/SiCKRAGE
sickchill/oldbeard/notifiers/plex.py
Python
gpl-3.0
9,773
def execute(module, name): #Execute the line crawl method module.crawl()
runicer156/Oppomus
controllers/line.py
Python
gpl-3.0
82
__title__ = 'waechter' __version__ = '0.2.4'
glaslos/waechter
waechter/__init__.py
Python
gpl-3.0
45
#!/usr/bin/env python # # Copyright (C) 2017 - Massachusetts Institute of Technology (MIT) # # 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...
azariven/BioSig_SEAS
bin_stable/data_download/download_HITRAN_Line_List.py
Python
gpl-3.0
1,346
#!/usr/bin/env python # -*- coding: utf-8 -*- # # File : mail/MailBuilder.py # Description : pyTweetBot mail builder tool. # Auteur : Nils Schaetti <n.schaetti@gmail.com> # Date : 01.05.2017 17:59:05 # Lieu : Nyon, Suisse # # This file is part of the pyTweetBot. # The pyTweetBot is a set of free software: # you can red...
nschaetti/pyTweetBot
pyTweetBot/mail/MailBuilder.py
Python
gpl-3.0
1,802
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0014_auto_20150425_1828'), ] operations = [ migrations.AlterModelOptions( name='device', opti...
thomast74/oinkbrew_webapp
api/migrations/0015_auto_20150426_2042.py
Python
gpl-3.0
1,152
# -*- coding: utf-8 -*- """ @file person.py @author Jakob Erdmann @date 2015-02-06 @version $Id: _person.py 22929 2017-02-13 14:38:39Z behrisch $ Python implementation of the TraCI interface. SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2011-2017 DLR (http://www.dlr.de/) and contri...
702nADOS/sumo
tools/traci/_person.py
Python
gpl-3.0
16,025
# -*- coding: utf-8 -*- """ Created on Mon Apr 18 09:35:10 2016 @author: kristiny """ import process_data from matplotlib import pyplot as plt file_name = 'test.csv' analyzer = process_data.PowerConsumptionAnalyzer(file_name) target_fractions = [0.7, 0.8, 0.9] for target_fraction in target_fractions: total_ho...
bonus85/csv-analytics
days_script.py
Python
gpl-3.0
1,460
#!/usr/bin/env python # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # Copyright (C) 2013 Doro Wu <doro.wu@canonical.com> # 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 Softwa...
fcwu/lp-fish-init
lp_fish_init/execlocal.py
Python
gpl-3.0
3,721
# -*- coding: utf-8 -*- import random import telnetlib import json import scrapy import sys from scrapy import log from settings import FAILED_CODES from fake_useragent import UserAgent from scrapy.downloadermiddlewares.useragent import UserAgentMiddleware class RotateUserAgentMiddleware(UserAgentMiddleware): ...
Rafael-Cheng/Douban_Crawler
douban_book/book_crawler/douban_crawler/middlewares.py
Python
gpl-3.0
2,076
#!/usr/bin/env python3 # encoding: utf-8 # Copyright (C) 2014-2021 Space Science and Engineering Center (SSEC), # University of Wisconsin-Madison. # # 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 Softw...
davidh-ssec/polar2grid
polar2grid/tests/__init__.py
Python
gpl-3.0
1,096
import json import logging import os import pytest import tempfile from unittest import mock API_KEY = 'fnord' os.environ['SLIPSTREAM_API_KEY'] = API_KEY from slipstream import slipstream log = logging.getLogger('slipstream') log.addHandler(logging.StreamHandler()) log.setLevel(logging.DEBUG) SIMPLE_PAYLOAD = dict(...
waynew/slipstream
tests/test_slipstream.py
Python
gpl-3.0
3,485
# Example for: alignment.malign() # This will read all sequences from a file, align them, and write # the alignment to a new file: from modeller import * env = environ() aln = alignment(env, file='toxin.ali', align_codes='all') aln.malign(gap_penalties_1d=(-600, -400)) aln.write(file='toxin-seq.pap', alignment_form...
bjornwallner/proq2-server
apps/modeller9v8/examples/commands/malign.py
Python
gpl-3.0
330
import datetime from brewer import Brewer from receipe import Receipe from globalthings import * from step import Step print "Test begging" mon_step1=Step("monStep",TRANSITION,10) mon_step2=Step("monStep2",LEVEL,60,67) mon_step3=Step("monStep3",TRANSITION,10) mon_step4=Step("monStep4",LEVEL,1,90) mon_step1.print_self...
astrxlegaulois/RaspBrewerPy
test.py
Python
gpl-3.0
1,436
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing M2M table for field geometries on 'Datasource' db.delete_table('dpnetcdf_datasource_geometries') ...
nens/dpnetcdf
dpnetcdf/migrations/0035_auto.py
Python
gpl-3.0
6,488
print("Divisao entre dois números") try: num1 = int(input("Digite o primeiro número: ")) num2 = int(input("Digite o segundo número: ")) print("Divisao = ",num1/num2) except: print("Não podemos dividir um número por Zero") print("Continuei...")
fkenjikamei/python-exercises
aula12-3.py
Python
gpl-3.0
255
from distutils.core import setup setup( name='home_backup', version='1.0', packages=['home_backup'], url='http://zufallsheld.de/2013/09/29/python-backup-script-with-rsync/', license='GPL 3.0', author='Sebastian Gumprich', author_email='sebastian.gumprich@38.de', description='simple pyth...
dylan-reeves/home_backup
setup.py
Python
gpl-3.0
387
# # Autogenerated by Thrift Compiler (0.9.0-dev) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py:slots, dynamic # from thrift.Thrift import TType, TMessageType, TException from thrift.protocol.TBase import TBase, TExceptionBase class DownloadStatus(TBase): Finished = 0...
ardi69/pyload-0.4.10
pyload/remote/thriftbackend/thriftgen/pyload/ttypes.py
Python
gpl-3.0
17,135
from vilay.core.DescriptionScheme import DescriptionScheme from vilay.core.Film import Film class VDData: def __init__(self, film=None): self.dsRoot = DescriptionScheme("Feature Film") self.setFilm(film) def setFilm(self, film): if film is None: self.film = None ...
dakot/vilay-detect
vilay/core/VDData.py
Python
gpl-3.0
517
from __future__ import absolute_import, print_function, unicode_literals import itertools from streamparse.spout import Spout class WordSpout(Spout): def initialize(self, stormconf, context): self.sentences = [ "She advised him to take a long holiday, so " "he immediately quit wo...
unlessbamboo/grocery-shop
language/python/src/storm/wordcount/src/spouts/words.py
Python
gpl-3.0
1,441
import matplotlib.pyplot as plt import numpy as np import math from scripts import * if True: RESULT_SRC = './results_UAV123/{0}/' # '{0} : OPE, SRE, TRE' else: RESULT_SRC = './results_UAV_10fps/{0}/' # '{0} : OPE, SRE, TRE' def main(): evalTypes = ['OPE'] testname = 'UAV123' for i in range(len(e...
stevenwudi/Kernelized_Correlation_Filter
draw_graph_UAV.py
Python
gpl-3.0
7,588
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import utils.youtube_field class Migration(migrations.Migration): dependencies = [ ('ideas', '0007_remove_vote_vote'), ] operations = [ migrations.RemoveField( model_name...
CivilHub/CivilHub
ideas/migrations/0008_auto_20150626_1143.py
Python
gpl-3.0
954
__author__ = 'Salvakiya' import configparser import glob import os import traitfile def printcol(col, string): print( {"r": "\033[01;31m{0}\033[00m", "y": "\033[1;33m{0}\033[00m", "g": "\033[1;36m{0}\033[00m"}[col].format(string)) blue_print_instances = {} actor_instances = {} #retrie...
Salvakiya/PyRTS
src/Program.py
Python
gpl-3.0
2,343
import urllib.request class HTTPRedirectHandler(urllib.request.HTTPRedirectHandler): def http_error_302(self, req, fp, code, msg, headers): print("302 Redirection") print(headers['Location']) #return urllib.request.HTTPRedirectHandler.http_error_302(self, req, fp, code, msg, headers) ...
zeroidle/GomBot
HTTPRedirectHandler.py
Python
gpl-3.0
422
from flask import Flask, g import sqlite3 app = Flask(__name__) db_location = 'var/test.db' def get_db(): db = getattr(g, 'db', None) if db is None: db = sqlite3.connect(db_location) g.db = db return db @app.teardown_appcontext def close_db_connection(exception): db = getattr(g, 'db',...
siwells/teaching_set09103
code/topic_10/datastore.py
Python
gpl-3.0
1,079
from PyQt4 import Qt as qt from . import qt_util from ..abstract.asyncmsg import MessageBar, ButtonKind import collections import platform def _get_keyboard_hint(): if platform.system() == 'Darwin': return '\N{PLACE OF INTEREST SIGN}B' else: return 'Ctrl+B' class MessageBarView(qt.QWidget)...
sam-roth/Keypad
keypad/qt/asyncmsg.py
Python
gpl-3.0
6,931
__author__ = 'Chris Hamm' #NetworkClient_rBugg #Created: 11/21/2014 #This is a restructured version of r7A #NOTES: SOCKET IS NOT CLOSED WHEN FINISHED!!! #SUPERCEDED BY r9!!!! import socket import platform import Chunk #=================================================================== #Client constructor/class de...
COCS4950G7/COSC4950
Source/Network/Obsolete/NetworkClient_rBugg.py
Python
gpl-3.0
20,107
# -*- coding: UTF-8 -*- """ Date utilities. @author: Sébastien Renard <sebastien.renard@digitalfox.org> @license: GPL v3 or later """ import operator from datetime import date, datetime, timedelta from yokadi.ycli import basicparseutils from yokadi.core.yokadiexception import YokadiException WEEKDAYS = {"monday": 0,...
agateau/yokadi
yokadi/core/ydateutils.py
Python
gpl-3.0
8,617
#!/usr/bin/env python ## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner ## ## 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 Softwar...
graik/biskit
archive_biskit2/scripts/Biskit/replace_wildcard_import.py
Python
gpl-3.0
3,009
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-24 16:52 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scan', '0001_initial'), ] operations = [ migrations.AddField( mo...
404fovnd/vul
scan/migrations/0002_poc_poc_target_sample.py
Python
gpl-3.0
476
# -*- coding: utf-8 -*- from django.contrib.auth.decorators import login_required from manual.models import Manual from manual.forms import ManualFilterForm from manual.models import Manualgroup from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.contrib.auth.models ...
ximepa/docp
manual/views.py
Python
gpl-3.0
2,763
#!/usr/bin/env python """ Get a proxy from the proxy manager """ import os from DIRAC.Core.Base.Script import Script Script.setUsageMessage( "\n".join( [ __doc__.split("\n")[1], "Usage:", " %s [options] UserName Role" % Script.scriptName, "Arguments:", ...
DIRACGrid/DIRAC
tests/Jenkins/dirac-proxy-download.py
Python
gpl-3.0
1,068
#!/usr/bin/env python # coding: utf-8 import pytest import capytaine as cpt try: import vtk except ImportError: vtk = None try: import IPython except ImportError: IPython = None @pytest.mark.skipif(vtk is None or IPython is None, reason='vtk and/or Ipython are not installed') def...
mancellin/capytaine
pytest/test_ui_vtk.py
Python
gpl-3.0
512
""" py2app build script for VALENCE. Usage: python setup.py py2app """ from setuptools import setup setup( app = ["attractor.py"], py_modules = ["headset"], data_files = [ ('g', [ 'g/bg.png', 'g/blob.png']), ('g/cell', [ 'g/cell/flower1.png', ...
nodebox/valence
setup.py
Python
gpl-3.0
986
import cv2 import numpy as np def nothing(x): pass # Create a black image, a window img = np.zeros((300, 512, 3), np.uint8) cv2.namedWindow('image') # create trackbars for color change cv2.createTrackbar('R', 'image', 0, 255, nothing) cv2.createTrackbar('G', 'image', 0, 255, nothing) cv2.createTrackbar('B', 'i...
RyanChinSang/ECNG3020-ORSS4SCVI
BETA/TestCode/OpenCV/APP-ColorFilter2.py
Python
gpl-3.0
872
import bootstrap import unittest import unittest.mock import cifparser import collections from mandelbrot.model.evaluation import * class TestProcessCPU(unittest.TestCase): @unittest.mock.patch('time.time') def test_execute_ProcessCPU_check_healthy(self, time): "ProcessCPU check should return health...
msfrank/mandelbrot
test/test_check_processcpu.py
Python
gpl-3.0
4,020
# -*- coding: utf-8 -*- """ Copyright (C) 2014 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # nose from nose.tools import eq_ # Paste from paste.util.converters import asbo...
alirizakeles/zato
code/zato-server/test/zato/server/live/test_sio_live.py
Python
gpl-3.0
7,674
# -*- encoding: utf-8 -*- """Test class for CLI Foreman Discovery @Requirement: Discoveredhost @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: CLI @TestType: Functional @CaseImportance: High @Upstream: No """ from robottelo.decorators import run_only_on, stubbed, tier3 from robottelo.test impor...
Ichimonji10/robottelo
tests/foreman/cli/test_discoveredhost.py
Python
gpl-3.0
7,009
#!/usr/bin/env python3 from configparser import ConfigParser from os import environ, getcwd, chdir from os.path import isdir, isfile, join as path_join from sys import argv, exit try: root = INSTALLATION_PATH except NameError: print('3*** configuration error: you must run scripts/setup.sh first! ***\tfake\t(NULL)\...
sroracle/70chan
config.py
Python
gpl-3.0
3,016
from pyrser import meta, directives from pyrser.grammar import Grammar from pyrser.hooks import echo from pyrser.parsing.node import Node from pyrser.directives import ignore from cnorm import nodes from cnorm.parsing.expression import Expression class Statement(Grammar, Expression): """ interaction with ...
LionelAuroux/cnorm
cnorm/parsing/statement.py
Python
gpl-3.0
5,555
"""This module contains metadata about the project.""" title = 'hadaly' version = '0.1a' description = 'Presentation software for art historians' author = 'Bogdan Cordie' author_email = 'ooctogene@gmail.com' license = 'GPLv3'
octogene/hadaly
hadaly/meta.py
Python
gpl-3.0
225
"""Utilities not related to a specific challenge.""" import base64 class Error(Exception): pass class InvalidArgumentError(Error): pass # These should not be accessed externally. hex_to_bin_map = {'0': '0000', '1': '0001', '2': '0010', '3': '0011', '4': '0100', '5': '01...
shainer/matasano
lib/utils.py
Python
gpl-3.0
4,226
""" This is the program to write the complete works of William Shakespeare. """ import random import string import time CHARACTERS = string.ascii_letters + string.digits + '\n' + ' ' while True: print(random.choice(CHARACTERS), end='') time.sleep(random.random() / 50)
tetrau/dogwalker
test/monkey_typewriter.py
Python
gpl-3.0
278
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-06-06 14:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tmv_app', '0009_auto_20170602_1101'), ] operations = [ migrations.AddField(...
mcallaghan/tmv
BasicBrowser/tmv_app/migrations/0010_topic_year.py
Python
gpl-3.0
445
import tornado.web class MainHandler(tornado.web.RequestHandler): def data_received(self, chunk): pass async def get(self, *args, **kwargs): db = self.application.db page_count = await db.get_page_count(self.application.rows_per_page) genre_filter = self.get_argument('genre_f...
denissmirnov/spider2
application/handlers/main_handler.py
Python
gpl-3.0
1,222
########################################################################## # # This file is part of OCEMR. # # OCEMR 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...
ph1l/ocemr
ocemr/views/lab.py
Python
gpl-3.0
4,143
# -*- coding: utf-8 -*- # Copyright (c) 2003 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to show the output of the svn proplist command process. """ from __future__ import unicode_literals try: str = unicode except NameError: pass from PyQt5.QtCore import QTimer, QP...
paulmadore/Eric-IDE
6-6.0.9/eric/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py
Python
gpl-3.0
7,904
from traits.api import \ HasTraits, Float, Property, cached_property, Instance, \ Int import numpy as np from oricreate.api import \ YoshimuraCPFactory, fix, link, r_, s_, MapToSurface,\ GuConstantLength, GuDofConstraints, SimulationConfig, SimulationTask, \ FTV from oricreate.forming_tasks.form...
simvisage/oricreate
apps/sandbox/rch/ex02_yoshimura_2x2_ff_min_poteng.py
Python
gpl-3.0
6,546
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('payroll', '0008_hours_overall_total_hours'), ] operations = [ migrations.AlterField( model_name='netsalary', ...
KenanBek/rslservices
app/payroll/migrations/0009_auto_20160722_1720.py
Python
gpl-3.0
729
#!/usr/bin/python import os import requests import snowflake import subprocess import time import sys dirSelf = os.path.dirname(os.path.realpath(__file__)) libDir = dirSelf.rstrip(os.sep).rstrip("theBox").rstrip(os.sep) + os.sep + "lib" sys.path.append(libDir) import constants hostname = "google.com" #example head...
shrinidhi666/wtfBox
theBox/alive.py
Python
gpl-3.0
1,119
# -*- coding: UTF-8 """ nya.sh html parser Classes ======= Parser -- Parser implementation Attributes ========== NYA_SH_SOURCE_NAME -- Source name constant """ import html from html.parser import HTMLParser from lxml.html import HtmlElement from pyquery import PyQuery from ._base import * __all__ = ['Par...
kawashiro/dewyatochka2
src/dewyatochka/plugins/cool_story/parser/nya_sh.py
Python
gpl-3.0
1,954
#### import the simple module from the paraview from paraview.simple import * pnglocation = 'D:\\figure_JFMcylinder\\temp1_CLV_finer\\' # create a new 'XML Unstructured Grid Reader' M_MODES = [0, 4, 16, 39] K_SEGMENTS = range(350,451) def plotAverage(m_mode): print('plotting mode '+ str(m_mode)) ...
qiqi/fds
apps/charles_cylinder3D_Lyapunov/for_paraview/averageCLV.py
Python
gpl-3.0
3,150
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 Softwar...
jjgomera/pychemqt
tools/UI_confTransport.py
Python
gpl-3.0
14,642
# This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from trytond.pool import Pool from .product import * from .move import * def register(): Pool.register( Template, Product, Move, module='p...
kret0s/gnuhealth-live
tryton/server/trytond-3.8.3/trytond/modules/product_cost_fifo/__init__.py
Python
gpl-3.0
354