code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
from blogging.tag_lib import parse_content from blogging.models import BlogContent, BlogParent, BlogContentType import json import os def convert_tags(blog,tag_name,fd): tag = {} # tag['name'] = tag_name + '_tag' tag['name'] = tag_name content = parse_content(blog,tag) if len(content) > 0: ...
PirateLearner/pi
PirateLearner/blogging/db_migrate.py
Python
gpl-2.0
2,332
#!/usr/bin/python2.7 # -*- coding=utf-8 -*- from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc import time from tongbutui.items import htmlItem import re,sys class t...
MasLinoma/scrapy_crawl
tongbutui/tongbutui/spiders/tongbutui_spider.py
Python
gpl-2.0
11,003
# Copyright (c) 2013 Vadim Rutkovsky <vrutkovs@redhat.com> # Copyright (c) 2013 Shivani Poddar <shivani.poddar92@gmail.com> # Copyright (c) 2013 Arnel A. Borja <kyoushuu@yahoo.com> # Copyright (c) 2013 Seif Lotfy <seif@lotfy.com> # Copyright (c) 2013 Sai Suman Prayaga <suman.sai14@gmail.com> # Copyright (c) 2013 Jackso...
vrutkovs/gnome-music
gnomemusic/widgets.py
Python
gpl-2.0
34,519
""" Module for check_snmp_ilo4 """ # Copyright (C) 2016-2019 rsmuc <rsmuc@sec-dev.de> # This file is part of "Health Monitoring Plugins". # "Health Monitoring Plugins" is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
rsmuc/health_monitoring_plugins
health_monitoring_plugins/ilo.py
Python
gpl-2.0
17,237
import wx import logging import matplotlib.cm import numpy as np import properties p = properties.Properties.getInstance() slider_width = 30 s_off = slider_width/2 class ColorBarPanel(wx.Panel): ''' A HORIZONTAL color bar and value axis drawn on a panel. ''' def __init__(self, parent, map, local_exte...
afraser/CellProfiler-Analyst
cpa/colorbarpanel.py
Python
gpl-2.0
12,477
class Profile(object): def __init__(self, name): self.name = name
r3alityc0d3r/pyisac-core
src/Pyisac/infrastructure/profile.py
Python
gpl-2.0
83
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################## # # Project: Metalink Checker # URL: https://github.com/metalink-dev/checker # E-mail: nabber00@gmail.com # # Copyright: (C) 2007-2016, Neil McNab # License: GNU General Public License Version 2 # (h...
metalink-dev/checker
metalinkcw.py
Python
gpl-2.0
11,953
# encoding: utf-8 # module gio._gio # from /usr/lib/python2.7/dist-packages/gtk-2.0/gio/_gio.so # by generator 1.135 # no doc # imports import gio as __gio import glib as __glib import gobject as __gobject import gobject._gobject as __gobject__gobject class InetSocketAddress(__gio.SocketAddress): """ Object ...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gio/_gio/InetSocketAddress.py
Python
gpl-2.0
1,078
from django import forms from empresas.models import Usuario, Pessoa, Empresa class LoginForm(forms.Form): username = forms.CharField(max_length='200', required=True) password = forms.CharField(widget=forms.PasswordInput, required=True) class UsuarioForm(forms.ModelForm): password = forms.CharField(widget...
mateusportal/portalconta
empresas/forms.py
Python
gpl-2.0
537
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingPlugin.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
camptocamp/QGIS
python/plugins/processing/ProcessingPlugin.py
Python
gpl-2.0
5,606
"""Super class for creating an list control (table), where the cells can be edited by the user. """ __author__ = "Ganesh N. Sivalingam <g.n.sivalingam@gmail.com" import wx from wx.lib.mixins.listctrl import TextEditMixin, ListCtrlAutoWidthMixin #class EditableListCtrl(wx.ListCtrl, TextEditMixin, ListCtrlAutoWidthMix...
gnsiva/Amphitrite
gui/SpectralAveragingGui/EditableListCtrl.py
Python
gpl-2.0
1,537
import sys import cx_Oracle import P1 import P3 def violation(conString): con = cx_Oracle.connect(conString); curs = con.cursor() owner=input('is this driver the primary owner of this vehicle? (y/n)') if owner.lower() == 'y': sqlcode=record(...
CMPUT291PRO1/Project-1
P4.py
Python
gpl-2.0
2,989
#!/usr/bin/env python # # A Python class to interact with a Open-E DSS storage server via the SSH API # Copyright (C) 2013 Andreas Thienemann <andreas@bawue.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the version 2 of the GNU General Public License ...
ixs/dss_cli
DSS_API.py
Python
gpl-2.0
2,153
""" WSGI config for erp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_...
elberthcabrales/djangoerp
source/erp/wsgi.py
Python
gpl-2.0
383
from __future__ import absolute_import from collections import OrderedDict from pybloom import BloomFilter from os import path, makedirs from celery import Task from gevent.queue import Queue from arachne.celery import celery import errno, sys ## these directories are used to output results from scripts and e...
gzzo/arachne
arachne/utils.py
Python
gpl-2.0
4,274
# Copyright (c) 2009 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ASKAP software distribution. # # The ASKAP software distribution is free softwar...
ATNF/askapsdp
Tools/scons_tools/askapenv.py
Python
gpl-2.0
4,699
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "practicaConCarratala.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Titulacion-Sistemas/PracticasDjango
practicaConCarratala/manage.py
Python
gpl-2.0
263
import yaml import sys import logging class ConfParse: def load_conf(self,conf): """ Loads and parses an audit category from a configuration file """ try: with open(conf) as conf: profile = yaml.load(conf) except IOError: logging.error("Invalid file specified: %s" %(conf)) ...
zuBux/drydock
utils/confparse.py
Python
gpl-2.0
356
import unittest import urlparse class URLTestCase(unittest.TestCase): def assertQueryStringArgsEqual(self, querystring1, querystring2): # clean-up '?' if isinstance(querystring1, basestring) and querystring1.startswith('?'): querystring1 = querystring1[1:] if isinstance(querys...
bmentges/brainiak_api
tests/utils.py
Python
gpl-2.0
754
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
iproduct/course-social-robotics
11-dnn-keras/venv/Lib/site-packages/tensorboard/plugins/base_plugin.py
Python
gpl-2.0
13,597
def LShift(t, k): k %= 8 return ((t << k) | (t >> (8 - k))) & 0xff def encode(p): ret = "" for i in range(8): ret = ('|' if (p >> i) & 1 else 'O') + ret return ret A = [85, 128, 177, 163, 7, 242, 231, 69, 185, 1, 91, 89, 80, 156, 81, 9, 102, 221, 195, 33, 31, 131, 179, 246, 15, 139, 205,...
Qwaz/solved-hacking-problem
SSCTF/2016/Crypto&Exploit/HeHeDa/Algorithm1-577265e1.py
Python
gpl-2.0
3,529
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
joshmoore/zeroc-ice
java/test/Ice/defaultServant/run.py
Python
gpl-2.0
965
# -*- coding: utf-8 -*- # vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=python:textwidth=0: # License: GPL2 or later see COPYING # Written by Michael Brown # Copyright (C) 2007 Michael E Brown <mebrown@michaels-house.net> # python library imports import fcntl import glob import os import time # our imports...
cgwalters/mock
py/mockbuild/plugins/yum_cache.py
Python
gpl-2.0
4,641
#!/usr/bin/python import sys import serial from intelhex import IntelHex import time import datetime import struct def add8(a, b): return (a + b & 0xFF) page_size = 255 class Hex2BinConv(): def __init__(self, out): self.hex = IntelHex() self.out = out def load(self, filename):...
pculka/SkyDrop
skydrop/utils/hex2bin/main.py
Python
gpl-2.0
2,182
#!/usr/bin/python # -*- coding: utf-8 -*- # Definition for a binary tree node. class TreeNode(object): def __init__(self, x, left = None, right = None): self.val = x self.left = left self.right = right class Solution(object): """ 【思路】 1. 这里我们使用hashtable,而python中的dict就是hashtable...
pandaoknight/leetcode
sum_problem_dynamic_programming/two-sum-iv-input-is-a-bst/hash-table.py
Python
gpl-2.0
1,485
from django.conf.urls import url, patterns '''Want to switch to class based views but not sure how''' from nepi.activities.views import (UpdateConversationView, DeleteConversationView, ScenarioListView, ScenarioDeta...
coati-00/nepi
nepi/activities/urls.py
Python
gpl-2.0
1,778
# Copyright (C) 2014 Linaro Limited # # Author: Neil Williams <neil.williams@linaro.org> # # This file is part of LAVA Dispatcher. # # LAVA Dispatcher 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 ver...
Linaro/lava-dispatcher
lava_dispatcher/job.py
Python
gpl-2.0
10,777
#This file is part of ClusterMass # # Copyright 2014 Uladox # # ClusterMass 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....
Uladox/ClusterMass
PYSTARS.py
Python
gpl-2.0
1,968
from datetime import date import datetime from django.contrib.auth.models import User from django.test import TestCase from pagetree.models import Hierarchy, Section, UserPageVisit from pagetree.tests.factories import HierarchyFactory, ModuleFactory from factories import SchoolGroupFactory from nepi.main.models impor...
coati-00/nepi
nepi/main/tests/test_models.py
Python
gpl-2.0
11,699
# Copyright 2009 One Laptop Per Child # Author: Sayamindu Dasgupta <sayamindu@laptop.org> # WebKit2 port Copyright (C) 2018 Lubomir Rintel <lkundrak@v3.sk> # # 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 ...
godiard/read-activity
epubview/jobs.py
Python
gpl-2.0
10,330
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ Classes and functions for layer 2 protocols. """ import os, struct, time, socket from scapy.base_classes import Net...
guedou/scapy-bpf
scapy/layers/l2.py
Python
gpl-2.0
25,633
# Seamless DVD Player # Copyright (C) 2004-2006 Martin Soto <martinsoto@users.sourceforge.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 op...
MartinSoto/Seamless
src/config/__init__.py
Python
gpl-2.0
1,339
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
drnextgis/QGIS
python/plugins/db_manager/db_plugins/postgis/plugin.py
Python
gpl-2.0
14,923
## FormEncode, a Form processor ## Copyright (C) 2003, Ian Bicking <ianb@colorstudy.com> ## ## This library 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 2.1 of the License, or ...
fregaham/DISP
formencode/validators.py
Python
gpl-2.0
71,779
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Deepin, Inc. # 2011 Hou Shaohui # # Author: Hou Shaohui <houshao55@gmail.com> # Maintainer: Hou ShaoHui <houshao55@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Ge...
dragondjf/musicplayertest
constant.py
Python
gpl-2.0
1,831
from cred.models import CredChangeQ from django.conf import settings from django.utils import timezone def base_template_reqs(request): cntx = { 'pageurl': request.path, 'LDAP_ENABLED': settings.LDAP_ENABLED, 'GOAUTH2_ENABLED': settings.GOAUTH2_ENABLED, 'EXPORT_ENABLED': not settin...
ipernet/RatticWeb
ratticweb/context_processors.py
Python
gpl-2.0
1,262
from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from django_countries.fields import CountryField from community.utils import get_groups from membership.constants imp...
willingc/portal
systers_portal/users/models.py
Python
gpl-2.0
6,677
from euler_functions import is_pandigital_set, number_digits for x in range(9123, 9876): # much smaller range: http://www.mathblog.dk/project-euler-38-pandigital-multiplying-fixed-number/ products = [] n = 1 num_digits_in_products = 0 while num_digits_in_products < 9: products.append(x * n) n += 1 num_di...
aarestad/euler-solutions
euler_38.py
Python
gpl-2.0
471
"""Tests for missing-function-docstring""" # pylint: disable=unused-argument, missing-class-docstring, too-few-public-methods, unused-variable def func(tion): # [missing-function-docstring] pass def func_two(tion): """Documented""" def inner(fun): # Not documented pass class MyClass:...
PyCQA/pylint
tests/functional/m/missing/missing_function_docstring.py
Python
gpl-2.0
413
from django.http import QueryDict, HttpResponse, HttpResponseRedirect import gzip class HttpDataDownloadResponse(HttpResponse): fmt = 'csv' gzipped = True data = None def __init__(self, data, report, fmt='csv', zipit=True): if data: c_type, download = self.get_mime_type(fmt) ...
hdzierz/Kaka
web/http_data_download_response.py
Python
gpl-2.0
1,477
import numpy as np def tau_branch(tau,epp): N = len(tau[0,:]) branch_cnt = [] for i in range(N): branch_cnt.append(np.sum(tau[i,:]>epp)) return branch_cnt
zjost/antsystem
functions/tau_branch.py
Python
gpl-2.0
184
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
rajul/tvb-framework
tvb/interfaces/web/entities/context_model_parameters.py
Python
gpl-2.0
9,421
import numpy as np def get_test_data(delta=0.05): ''' Return a tuple X, Y, Z with a test data set. ''' from matplotlib.mlab import bivariate_normal x = y = np.arange(-3.0, 3.0, delta) print x X, Y = np.meshgrid(x, y) Z = np.sin(X) print Z ## Z1 = bivariate_normal(X, Y, 1.0, 1....
IncidentNormal/TestApps
pyTest/meshgrid.py
Python
gpl-2.0
546
from rest_framework import permissions from korjournal.models import Driver class IsOwner(permissions.BasePermission): """ Custom permission to only allow owners of an object to see it """ def has_object_permission(self, request, view, obj): user = request.user try: if (ob...
linefeedse/korjournal
www/korjournal/permissions.py
Python
gpl-2.0
2,170
import struct from zope.interface import implements from twisted.internet import defer from allmydata.interfaces import IStorageBucketWriter, IStorageBucketReader, \ FileTooLargeError, HASH_SIZE from allmydata.util import mathutil, idlib, observer, pipeline from allmydata.util.assertutil import precondition from a...
drewp/tahoe-lafs
src/allmydata/immutable/layout.py
Python
gpl-2.0
20,826
import cv2 import ss_get_axis_points import math import numpy as np import ss_get_lit_button #now we don't care about what color the button is #just care about location of bright center relative to major axis def find_button(img, mean_cols, mean_rows): #testing cv2.circle(img, (mean_cols, mean_rows), 2, (255, 255, ...
ufieeehw/IEEE2015
ros/ieee2015_vision/src/object_detection/test_functions/ss_find_button_test.py
Python
gpl-2.0
1,759
# Copyright 2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import subprocess import sys import portage from portage import os from portage import _unicode_decode from portage.const import (BASH_BINARY, PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, USER_CONFIG_PATH) from portage.proce...
devurandom/portage
pym/portage/tests/emerge/test_emerge_slot_abi.py
Python
gpl-2.0
5,878
# -*- coding: utf-8 -*- # # Point Tracker documentation build configuration file, created by # sphinx-quickstart on Mon Oct 25 14:10:24 2010. # # 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. #...
PierreBdR/point_tracker
doc/source/conf.py
Python
gpl-2.0
7,170
""" Misago-native rehash of Django's createsuperuser command that works with double authentication fields on user model """ import sys from getpass import getpass from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.management.base import BaseCommand from d...
1905410/Misago
misago/users/management/commands/createsuperuser.py
Python
gpl-2.0
6,267
__author__ = 'roman' from django.utils.functional import SimpleLazyObject from . import get_card as _get_card def get_card(request): if not hasattr(request, '_cached_card'): request._cached_card = _get_card(request) return request._cached_card class CardAuthMiddleware(object): def process_requ...
suprotkin/atm
atm/card/middleware.py
Python
gpl-2.0
751
import unittest class Solution: def isPathCrossing(self, path: str) -> bool: fullpath = {"0-0": 1} x = 0 y = 0 for move in path: if move == "N": x += 1 elif move == "S": x -= 1 elif move == "E": y -...
rralcala/random-scripts
py/lc/6/1496.py
Python
gpl-2.0
784
# -*- coding: UTF-8 -*- # by Mafarricos # email: MafaStudios@gmail.com # This program is free software: GNU General Public License import xbmcplugin,xbmcgui,xbmc,xbmcaddon,os,threading,re,urllib,json,time from BeautifulSoup import BeautifulSoup from resources.libs import links,tmdb,imdb,trakt,rottentomatoes,youtube,b...
Mafarricos/Mafarricos-xbmc-addons
plugin.video.moviereleases/main.py
Python
gpl-2.0
19,311
#!/usr/bin/env osgeo_python from osgeo import ogr, osr import os, sys def openDataSource( filename ): driver = ogr.GetDriverByName( "ESRI Shapefile" ) ds = driver.Open( filename, 0 ) if ds is None: print "Unable to open %s", filename sys.exit( -1 ) return ds def printGeometryInfo( g ): print "...
ajfazan/tools
scripts/compute_vector_difference.py
Python
gpl-2.0
2,566
import numpy as np from netCDF4 import Dataset import matplotlib.pyplot as plt from matplotlib import cm, colors from mpl_toolkits.basemap import Basemap, addcyclic from scipy.io import FortranFile # Amplification factor for the mean wind stress ampMean = 3.0 initDir = '../init/' nlat = 31 nlon = 30 year0 = 1961 year...
atantet/transferCZ
tau/get_tau_norm_red.py
Python
gpl-2.0
13,933
__author__ = 'evren kutar' from django.conf.urls import patterns, url urlpatterns = patterns('', url(r'^(?P<cslug>[\w-]+)/$', 'blog.views.post_category', name='category'), url(r'^(?P<cslug>[\w-]+)/(?P<slug>[\w-]+)/$', 'blog.views.post', name='post') )
evrenkutar/blog
blog/urls.py
Python
gpl-2.0
299
""" Django settings for edc_sms project. Generated by 'django-admin startproject' using Django 3.0.6. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os i...
botswana-harvard/edc-sms
edc_sms/settings.py
Python
gpl-2.0
4,211
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Nick Hall # # 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)...
pmghalvorsen/gramps_branch
gramps/gui/editors/edittaglist.py
Python
gpl-2.0
4,483
from time import sleep import boto.ec2 import sys import subprocess import argparse import os # specify AWS keys auth = {"aws_access_key_id": "<aws key>", "aws_secret_access_key": "<value>"} # create the connection object conn = boto.ec2.connect_to_region("us-east-1", **auth) # status of vms instancefree={} # statu...
ProgramRepair/experiments-infrastructure
awsscripts-defects4j/fullrepairtesting.py
Python
gpl-2.0
8,390
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Clase (y programa principal) para un servidor de eco en UDP simple """ import sys import socketserver import time import json class SIPRegisterHandler(socketserver.DatagramRequestHandler): """ Echo server class """ dic = {} # almacena nombre usuario e ...
hblancolo/ptavi-p4
server.py
Python
gpl-2.0
2,750
# -** coding: utf-8 -*- import os, sys, re, time import logging import google, requests import lxml.html class GoogleReader(object): def __init__(self, path): self.path = path self.author = None self.language = None self.title = None self.lines = None ...
quamis/ebook-helpers
organizer/Reader/GoogleReader.py
Python
gpl-2.0
4,759
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Monk-ee (magic.monkee.magic@gmail.com). # """__init__.py: Init for unit testing this module.""" __author__ = "monkee" __maintainer__ = "monk-ee" __email__ = "magic.monkee.magic@gmail.com" __status__ = "Development" import unittest from PuppetDBClien...
monk-ee/AWSBillingToDynamoDB
tests/__init__.py
Python
gpl-2.0
623
import requests from lxml import html import datetime import inflect from docx import Document from docx.shared import Inches from PyQt4 import QtGui, uic from PyQt4.QtGui import QTableWidgetItem, QApplication, QColor, QIcon, QPushButton, QHBoxLayout, QAction from PyQt4.QtCore import QDate, QTimer, QSize, Qt import sys...
CoronalRain/Saga
saga.py
Python
gpl-3.0
20,417
# Copyright (C) 2018-2020 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 optio...
AMDmi3/repology
repology/repoproc/serialization.py
Python
gpl-3.0
2,963
#!/usr/bin/python # -*- coding: utf-8 -*- import os import functools from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * views = {} def collectView(func): @functools.wraps(func) def wrapper(*args, **kwargs): self = args[0] if hasattr(self, 'viewID'): ...
dragondjf/PFramer
qframer/futil.py
Python
gpl-3.0
664
# -*- coding: utf-8 -*- import pytest import peewee from tracboat.gitlab import model @pytest.mark.parametrize('version', [ '8.4', '8.5', '8.7', '8.13', '8.15', '8.16', '8.17', '9.0.0' ]) def test_get_model_supported(version): M = model.get_model(version) assert M assert M...
nazavode/tracboat
tests/test_model.py
Python
gpl-3.0
598
#! usr/bin/env python # # APM - Another Python Mud # Copyright (C) 2012 bdubyapee (BWP) p h i p p s b @ g m a i l . c o m # # 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 versi...
bdubyapee/apm
src/color.py
Python
gpl-3.0
5,554
#************************************************************************ # Codelet Tuning Infrastructure # Copyright (C) 2010-2015 Intel Corporation, CEA, GENCI, and UVSQ # # 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 # th...
franck-talbart/codelet_tuning_infrastructure
ctr-common/plugins/5b5a1158-32f7-11e2-bae0-0022191169c2/main.py
Python
gpl-3.0
2,464
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_document ---------------------------------- Tests for `document` module. """ import unittest from openrocketdoc import document class TestOpenrocketdoc(unittest.TestCase): def setUp(self): pass def test_spec_a_rocket(self): rocket = d...
open-aerospace/openrocketdoc
tests/test_document.py
Python
gpl-3.0
10,628
import argparse from pokersim.Table import Table from pokersim.Player import Player from pokersim.Recorder import Recorder rec = Recorder() parser = argparse.ArgumentParser(description='Set up a poker game') #parser.add_argument('-n', '--numplayers', type=int, nargs='?', default=10, help='Number of players') parser...
adamlincoln/pokersim
src/pokersim/__init__.py
Python
gpl-3.0
1,480
#!/bin/python2 # Script that replies to username mentions. import time import os import cPickle import sys import traceback import numpy import sys from PIL import Image from urlparse import urlparse import gabenizer IMG = "http://i.4cdn.org/r9k/1463377581531.jpg" def main(): image = gabenizer.process_...
rafa1231518/CommunityBot
plugins/gabenizer/mentions.py
Python
gpl-3.0
499
### # Copyright (c) 2013, KG-Bot # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry try: from supybot.i18n import PluginInternationalization _ = PluginInternationalization('Facebook') except: # Placeholder that allows to run the plugin on a bot # without the ...
kg-bot/SupyBot
plugins/Facebook/config.py
Python
gpl-3.0
1,169
# !/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "pwxc" import asyncio, os, inspect, logging, functools from urllib import parse from aiohttp import web from apis import APIError def get(path): """ Define decorator @get('/path') """ def decorator(func): @functools.wraps(func) ...
LBatsoft/python3-webapp
www/coroweb.py
Python
gpl-3.0
6,284
#!/usr/bin/env python3 # THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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...
oliver-sanders/cylc
cylc/flow/scripts/get_resources.py
Python
gpl-3.0
2,521
''' eand package (Easy Algebraic Numerical Differentiation) Copyright (C) 2013 Tu-Hoa Pham 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 lat...
ph4m/eand
eand/demo/monodiff_demo.py
Python
gpl-3.0
3,605
import datetime import re import requests import tempestmail.constants as constants from six.moves.urllib.parse import urljoin def compare_tests(failures): ''' Detect fails covered by bugs and new''' covered, new = [], [] for fail in failures: for test in constants.TESTS: if re.searc...
arxcruz/tempest-tool
tempestmail/utils.py
Python
gpl-3.0
2,611
#======================================================================= # Author: Donovan Parks # # Sequence histogram plot. # # Copyright 2011 Donovan Parks # # This file is part of STAMP. # # STAMP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
dparks1134/STAMP
stamp/plugins/samples/plots/SeqHistogram.py
Python
gpl-3.0
9,822
""" Test class for Pilot """ # pylint: disable=protected-access, missing-docstring, invalid-name, line-too-long # imports import unittest import json import stat import sys import os import shutil from Pilot.pilotTools import PilotParams from Pilot.pilotCommands import CheckWorkerNode, ConfigureSite, NagiosProbes ...
wkrzemien/Pilot
Pilot/tests/Test_Pilot.py
Python
gpl-3.0
4,260
# -*- coding: utf-8 -*- # # PolyVox documentation build configuration file, created by # sphinx-quickstart on Tue Jul 6 14:46:57 2010. # # 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....
Zidit/Fort_up
polyvox/documentation/conf.in.py
Python
gpl-3.0
7,849
# -*- coding: utf-8 -*- import os import random # pour melanger les graphes... def shuffle(G): random.shuffle(G[0]) for c in G[1].items(): random.shuffle(c[1]) # pour completer les graphes NON orientes... def completer_graphe_no(G): for x in G[0]: for y in G[0][x]: if not ...
NicovincX2/Python-3.5
Algorithmique/Algorithme/Algorithme de la théorie des graphes/graph_functions.py
Python
gpl-3.0
746
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2013, 2014 CERN # Author: Pawel Szostek (pawel.szostek@cern.ch) # Multi-tool support by Javier D. Garcia-Lasheras (javier@garcialasheras.com) # # This file is part of Hdlmake. # # Hdlmake is free software: you can redistribute it and/or modify # it under the t...
JamesHyunKim/myhdl
hdlmake/tools/aldec/aldec.py
Python
gpl-3.0
3,541
#!/usr/bin/env python3 def is_prime(a): """ stolen from stackoverflow """ return all(a % i for i in range(2, a)) def number_check(num): """ validate a number is whole and greater than zero """ if not isinstance(num, int): print("num %s is not an integer" % str(num)) re...
gorpon/misc
python/euclid.py
Python
gpl-3.0
1,512
__author__ = 'Arnau Sanchez' __email__ = 'pyarnau@gmail.com' __version__ = '0.1.3' from .shoogle import *
tokland/shoogle
shoogle/__init__.py
Python
gpl-3.0
107
from pygaze.display import Display from pygaze.screen import Screen from pygaze.eyetracker import EyeTracker import pygaze.libtime as timer disp = Display() scr = Screen() scr.draw_text("Preparing experiment...", fontsize=20) disp.fill(scr) disp.show() tracker = EyeTracker(disp) tracker.calibrate() tracker.start_re...
esdalmaijer/PyOpenGaze
example/example_pygaze.py
Python
gpl-3.0
561
# coding=utf8 # """ 批量将采集任务的种子信息放到对应的采集队列里 """ # 添加django的环境变量 import os import sys from os.path import dirname, join sys.path.append(join(dirname(__file__), '../')) sys.path.append(join(dirname(__file__), '../../')) os.environ['DJANGO_SETTINGS_MODULE'] = 'onedrop.settings' import django django.setup() from date...
seraphln/onedrop
onedrop/scripts/batch_add_crawler_seeds.py
Python
gpl-3.0
999
# -*- coding: utf-8 -*- #from mamchecker.conftest import * import os import os.path import webapp2 import datetime from mamchecker.app import app from mamchecker.model import (Assignment, Index, Problem, Student, Class, Teacher, Period, School, set_student, delete_all) from mamchecker.c...
mamchecker/mamchecker
mamchecker/test/hlp.py
Python
gpl-3.0
2,817
from random import randint import os PAN_HOST = "pan.baidu.com" PAN_INDEX = "http://" + PAN_HOST DISK_HOME = PAN_INDEX + '/disk/home' FILE_MANAGER = PAN_INDEX + "/api/filemanager" CLOUD_DL = PAN_INDEX + "/rest/2.0/services/cloud_dl" PASSPORT_HOST = 'passport.baidu.com' PASSPORT_INDEX = "https://" + PASSPORT_HOST PASSPO...
xiviwo/baiducloud
const.py
Python
gpl-3.0
977
def logging_config(level): return { 'version': 1, 'propagate': True, 'disable_existing_loggers': False, 'formatters': { 'simple': { 'format': '%(asctime)s [%(levelname)s] %(message)s' } }, 'handlers': { 'console': { ...
nsavch/xanmel
xanmel/logcfg.py
Python
gpl-3.0
723
# -*- coding: utf-8 -*- """ emoji ~~~~~ emoji terminal output for Python :copyright: (c) 2014 by Taehoon Kim. :license: BSD, see LICENSE for more details. """ from .emoji import emojize __version__ = '0.1.0' __all__ = ['emojize']
FeodorFitsner/kauri
script/emoji/__init__.py
Python
gpl-3.0
253
#!/usr/bin/python3 # -*- coding: utf-8 -*- r"""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 Softwa...
jjgomera/pychemqt
lib/EoS/Cubic/PRSV2.py
Python
gpl-3.0
2,556
#!/home/ela/Python_Django/coworkok/coworkok/bin/python # # The Python Imaging Library. # $Id$ # # convert image files # # History: # 0.1 96-04-20 fl Created # 0.2 96-10-04 fl Use draft mode when converting images # 0.3 96-12-30 fl Optimize output (PNG, JPEG) # 0.4 97-01-18 fl Made optimize an op...
elatomczyk/dook
coworkok/bin/pilconvert.py
Python
gpl-3.0
2,354
#%% Libraries: Built-In from copy import deepcopy as copy import pandas as pd import numpy as np from datetime import datetime as dt from datetime import timedelta as td #% Libraries: Custom from Clusters.Data import DataCluster from Clusters.ClusterGroup import ClusterGroup #%% class NetworkController(object): def...
Calvinxc1/neural_nets
Controller.py
Python
gpl-3.0
7,833
################################################################################ # copyright 2008 Gabriel Pettier <gabriel.pettier@gmail.com> # # # # This file is part of UltimateSmashFriends ...
tshirtman/ultimate-smash-friends
usf/animations.py
Python
gpl-3.0
5,865
from src.entities import TaskInstantiator from src.implementations.testing import MustRunTask from src.implementations.testing import ParentTask """ Holds all tasks as an instance, delivers them when asked """ class StoredTaskInstantiator(TaskInstantiator): def __init__(self): self.known_tasks = {} def...
mathiesonsterling/DoublePump
src/implementations/stored_task_instantiator.py
Python
gpl-3.0
626
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
rcatwood/Savu
savu/plugins/loaders/multi_modal_loaders/i18_loaders/i18stxm_loader.py
Python
gpl-3.0
1,776
# Define the grammar for the Pythonic Query Language. # the smallest unit is a term # between any two terms there can be: # a COMMA - delimits fields and defines explicit query groups: # a, b, c @ d>1, 2, 3 # a CONJUCTION - python in fields and acts as delimitor for conditions: # ...
pyql/PyQL
yaccer.py
Python
gpl-3.0
9,082
# -*- coding: utf-8 -*- from __future__ import print_function from random import random from six.moves.xmlrpc_client import ServerProxy def elan_login(username, password): return ServerProxy( "http://%s:%s@localhost:8081/dokpool" % (username, password), verbose=True ) def getESDs(client): """ ...
OpenBfS/dokpool-plone
Plone/src/wsapi4elan.core/wsapi4elan/core/tests/basic.py
Python
gpl-3.0
2,735
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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 lat...
Gu1/ansible-lxc-remote
_ssh.py
Python
gpl-3.0
21,418
class Config: telegram_token = ""
Eibriel/ice-cream-truck
sample_config.py
Python
gpl-3.0
38
# Copyright (c) 2017-2020 Glenn McKechnie <glenn.mckechnie@gmail.com> # Credit to Tom Keffer <tkeffer@gmail.com>, Matthew Wall and the core # weewx team, all from whom I've borrowed heavily. # Mistakes are mine, corrections and or improvements welcomed # https://github.com/glennmckechnie/weewx-wxobs # # rsync code b...
glennmckechnie/weewx-wxobs
bin/user/wxobs.py
Python
gpl-3.0
27,446
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Adrián López Tejedor <adrianlzt@gmail.com> # Óscar García Amor <ogarcia@connectical.com> # # Distributed under terms of the GNU GPLv3 license. from vaultcli.auth import Auth from vaultcli.client import Client from vau...
Telefonica/vaultier-cli
vaultcli/main.py
Python
gpl-3.0
37,793