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
import datetime import json import os from flask import Flask, abort, g, render_template, session, request from flask_bootstrap import Bootstrap from flask_login import LoginManager, current_user from flask_mail import Mail from flask_moment import Moment from flask_sqlalchemy import SQLAlchemy from config import con...
nycrecords/intranet
app/__init__.py
Python
mit
1,884
import _plotly_utils.basevalidators class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="lowsrc", parent_name="ohlc", **kwargs): super(LowsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
plotly/python-api
packages/python/plotly/plotly/validators/ohlc/_lowsrc.py
Python
mit
432
# Django settings for math-club project. import dj_database_url import os from os import environ from urlparse import urlparse ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS if environ.has_key('DATABASE_URL'): DEBUG = False DATABASES = { 'default': dj_database_url.conf...
joshcai/utdmathclub
math-club/settings.py
Python
mit
5,912
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() from .models import Group, Firma, User, oauth, OAuthSignIn from random import randint from app.utils import fake_firma, fake_user def populate_db(num_users=5, num_groups=15, num_firms=5): """ Fills the data ...
Urumasi/Flask-Bones
app/data/__init__.py
Python
mit
4,084
""" Google app engine made local unit testing a pain ImportError: No module named appengine.ext so I'm flying blind on many parts """ import unittest #import main from app.hasher import gen_salt, hash_this, check_hash '''class SanityTest(unittest.TestCase): """testing sanity""" def setUp(self): pass ...
timBrockman/fsnd-p2-mublog
main_test.py
Python
mit
1,360
FILE_PREFIX = '__file__' class FormTransformer(object): """ Deserializes requests constructed by HTML forms, and serializes results to JSON. """ def parse(self, request, service_params): """ Parses the parameter values in the request to a list with the order of the given s...
orlade/microsimmer
host/server/transformer.py
Python
mit
2,039
# # File Header # # Define vowels vowels = "aeiouAEIOU" #I solved the case sensitivity by adding the vowels in both lowercase and uppercase. # Ask for word word = input("Please enter a word: ") if (originalword[0] in vowels): print((originalword + endofvowel).capitalize()) else: print((origina...
josiahhardacre/Week-Four-Assignment
pigify.py
Python
mit
562
#!/usr/bin/env python import os import sys if __name__ == "__main__": # CHANGED manage.py will use development settings by # default. Change the DJANGO_SETTINGS_MODULE environment variable # for using the environment specific settings file. os.environ.setdefault( 'DJANGO_SETTINGS_MODULE', 'bioc...
ccwang002/biocloud-server-kai
src/manage.py
Python
mit
454
#!/usr/bin/env python import logging import optparse from zillion.utils import cmdline logger = logging.getLogger(__name__) def main(): parser = optparse.OptionParser() options, args = parser.parse_args() logger.debug("foo") logger.debug("foo", 1) logger.debug("foo: %s", 1) logger.debug("f...
lgastako/loglint
example.py
Python
mit
413
# -*- coding: utf-8 -*- # # tissue documentation build configuration file, created by # sphinx-quickstart on Wed Sep 25 14:35:35 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
econchick/tissue
docs/conf.py
Python
mit
8,249
import binascii import os from django.conf import settings from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ @python_2_unicode_compatible class SUser(models.Model): sid = models.CharField(_("sid"), max_length=20, pr...
haoyutan/MSA-Framework
modules/msa/msa/contrib/authstoken/models.py
Python
mit
2,048
from nose.tools import eq_ import inflect def test_ancient_1(): p = inflect.engine() # DEFAULT... eq_(p.plural_noun('wildebeest'), 'wildebeests', msg="classical 'herd' not active") # "person" PLURALS ACTIVATED... p.classical(herd=True) eq_(p.plural_noun('wildebeest'), 'wildebeest', m...
GeneralizedLearningUtilities/SuperGLU
python_module/SuperGLU/Services/TextProcessing/Tests/Inflect/test_classical_herd.py
Python
mit
835
# Download the Python helper library from twilio.com/docs/python/install from datetime import datetime import pytz from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACCOUNT_SID" auth_token = "your_auth_token" client = Client(account_sid, auth_token) events =...
teoreteetik/api-snippets
monitor/events/list-get-example-sourceipaddress-filter/list-get-example-sourceipaddress-filter.6.x.py
Python
mit
552
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "FundCenter.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
ZimDeveloper/FundCenter
FundCenter/manage.py
Python
mit
253
""" Lightnet Engine Module |br| This module contains classes and functions to manage the training of your networks. It has an engine, capable of orchestrating your training and test cycles, and also contains function to easily visualise data with visdom_. """ #from .engine import * from ._voc_train import * from ._vo...
mileistone/test
vedanet/engine/__init__.py
Python
mit
336
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Article', fields=[ ('id', models.AutoField(verb...
nth2say/simple_django_blog
blog/migrations/0001_initial.py
Python
mit
1,171
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
rjschwei/azure-sdk-for-python
azure-mgmt-datalake-store/setup.py
Python
mit
2,242
from django.conf.urls import patterns, url from service import views urlpatterns = patterns ('', url(r'^$', views.index, name='index'), url(r'^index/$', views.index, name='index'), url(r'^inicio/$', views.inicio, name='inicio'), url(r'^registro/$', views.registro, name='registro'), url(r'^reg...
antorof/django-simple
service/urls.py
Python
mit
958
from django.conf.urls import patterns, include, url from service_order import views, data_views urlpatterns = patterns('', url(r'^$', views.index), url(r'^order_state_machine/$', views.order_state_machine), url(r'^make_order/$', views.make_order), url(r'^make_order2/$', views.make_order2), u...
yejia/order_system
service_order/urls.py
Python
mit
542
from . import header import os def savefig(filename,orient='portrait',color=True,debug=False): '''Make the output plot by actually running wip. filename - a string or list/tuple giving the output filename(s) with .gif or .ps extension (files) or .xs for an xwindow (e.g. 1.xs). orient ...
nlchap0/nlcpython
pywip/savefig.py
Python
mit
1,439
from django.core.management.base import BaseCommand from bot.models import * from datetime import datetime, timedelta, date class Command(BaseCommand): args = 'No args' help = 'Move problems from SuggestedProblem to ProblemSuggestion' def handle(self, *args, **options): for spojuser in SpojUser.o...
krisys/SpojBot
src/spojbot/bot/management/commands/migrate_suggestions.py
Python
mit
707
from __future__ import division import collect_ncs_files from libtbx.command_line import easy_qsub from glob import glob import sys import os class run_queue_tests(object): def __init__(self): """ Testing using: /work/NCS/ncs_paper/collect_ncs_files.py """ # set working environment paths = "/ne...
youdar/work
work/NCS/ncs_paper/submit_model_vs_data_to_queue.py
Python
mit
4,061
import bpy from bpy.props import StringProperty, IntProperty, CollectionProperty, EnumProperty, BoolProperty, FloatProperty from bpy.types import PropertyGroup, UIList, Operator, Panel from bpy_extras.io_utils import ImportHelper from .rman_ui_base import _RManPanelHeader from ..rfb_utils import texture_utils from ..rf...
prman-pixar/RenderManForBlender
rman_ui/rman_ui_txmanager.py
Python
mit
27,755
""" Django settings for mpgi_editor project. Generated by 'django-admin startproject' using Django 1.10.7. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ impor...
mpgi/mpgi
editor/mpgi_editor/settings.py
Python
mit
3,319
import sys import unittest import importlib import asn1tools sys.path.append('tests/files') sys.path.append('tests/files/3gpp') sys.path.append('tests/files/cen') sys.path.append('tests/files/etsi') sys.path.append('tests/files/ieee') sys.path.append('tests/files/ietf') sys.path.append('tests/files/oma') class Asn1...
eerimoq/asn1tools
tests/test_parse.py
Python
mit
19,718
#!/usr/bin/python import json import redis from ws4py.client.threadedclient import WebSocketClient r = redis.StrictRedis(host="localhost", port=6379, db=0) class SocketClient(WebSocketClient): def opened(self): # Subscribe to channel - JSON inside JSON, WTF is this library Snowden! print("opening"...
bleepr/bleepr-relay
socket_server/socket_server.py
Python
mit
1,009
# coding: utf-8 # In[1]: #Importing libraries import pandas as pd import numpy as np import matplotlib.pyplot as plt # In[2]: #Read csv file #data_frame = pd.read_csv('C:\\Users\\hp\\Desktop\\MAS ML\\datasets\\nyc_weather.csv') #Read excel file data_frame_1 = pd.read_excel('C:\\Users\\hp\\Desktop\\MAS ML\\dataset...
masml/masmlblog
Pandas/pandas_masml.py
Python
mit
7,022
import sys from os import walk import imghdr import csv import argparse from flask import Flask, redirect, url_for, request from flask import render_template from flask import send_file app = Flask(__name__) app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0 @app.route('/tagger') def tagger(): if (app.config["HEAD"] =...
sgp715/simple_image_annotator
app.py
Python
mit
3,289
import os path = os.path.dirname(os.path.realpath(__file__)) sbmlFilePath = os.path.join(path, 'BIOMD0000000155.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/BIOMD0000000155
BIOMD0000000155/model.py
Python
cc0-1.0
427
from distutils.core import setup from Cython.Build import cythonize setup( ext_modules=cythonize("matvec.pyx"), )
NuclearTalent/NuclearStructure
doc/Programs/cython_examples/matvec/setup.py
Python
cc0-1.0
119
from datetime import datetime import sys from listenbrainz_spark.tests import SparkTestCase from listenbrainz_spark.recommendations.recording import candidate_sets from listenbrainz_spark.recommendations.recording import create_dataframes from listenbrainz_spark import schema, utils, config, path, stats from listenbrai...
Freso/listenbrainz-server
listenbrainz_spark/recommendations/recording/tests/test_candidate.py
Python
gpl-2.0
25,386
import os files = os.listdir(os.path.join('src','effects')) for file in files: if file[-3:] == '.py' and file[:2] != '__': exec('from .%s import *' % (file[:-3]))
cycladesnz/chambersAndCreatures
src/effects/__init__.py
Python
gpl-2.0
175
from django.conf.urls import patterns, include, url urlpatterns = patterns('', # Examples: # url(r'^$', 'recetario.views.home', name='home'), # url(r'^blog/', include('blog.urls')), #url(r'^$','principal.views.home'), #url(r'^$', 'app_fase.views.indexFase', name = 'index'), #url(r'^fases/(...
SantiagoValdez/hpm
src/hpm/app_item/urls.py
Python
gpl-2.0
1,729
""" Module to handle sending error reports. """ import roam import roam.config import roam.utils errorreporting = False try: from raven import Client errorreporting = True except ImportError: errorreporting = False roam.utils.warning("Error reporting disabled due to import error") def can_send(): ...
skeenp/Roam
src/roam/errors.py
Python
gpl-2.0
854
# -*- coding: utf-8 -*- # # Copyright 2015 Nandaja Varma <nvarma@redhat.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 3 of the License, or # (at your option) any later ve...
lioupayphone/gdeploy
gdeploylib/helpers.py
Python
gpl-2.0
21,630
from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen from kivy.uix.actionbar import ActionBar from kivy.properties import ObjectProperty from kivy.garden.graph import Graph, MeshLinePlot class MenuScreen(Screen): actionbar = ObjectProperty() class BElGenL...
cmac4603/Home-Utilities-App
archive/HomeUtilitiesApp v2.3.7a.py
Python
gpl-2.0
3,783
import os import time from config import ComponentBase from transcode import Transcoder class MediaDiscovery(ComponentBase): DURATION_FORMAT = '%H:%M:%S' MAX_DEPTH = 4 def __init__(self, library): super(MediaDiscovery, self).__init__() self.library = library def search(self, paths,...
s-knibbs/py-web-player
pywebplayer/discover.py
Python
gpl-2.0
2,070
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'sign_in.ui' # # Created: Mon Jun 22 00:34:42 2015 # by: PyQt5 UI code generator 5.2.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_sign_inDialog(object): def setupUi...
dita-programming/dita-access
view/ui_sign_in.py
Python
gpl-2.0
6,113
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Evernote Corporation # # This file is part of Pootle. # # 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 L...
evernote/pootle
pootle/core/forms.py
Python
gpl-2.0
6,054
__author__ = 'Dongwoo Kim' import numpy as np from sklearn.metrics import precision_recall_curve, auc import path_tool heaviside = lambda x: 1 if x >= 0 else 0 class TAMDC: """ Implementation of Active Multi-relational Data Construction (AMDC) method. Reference: Kajino, H., Kishimoto, A., Botea, A....
chubbymaggie/almc
amdc/tri_model.py
Python
gpl-2.0
9,709
# yselect - An RPM/Yum package handling frontend. # Copyright (C) 2006 James Bowes <jbowes@redhat.com> # Copyright (C) 2006 Devan Goodwin <dg@fnordia.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
jbowes/yselect
test/fakes/repository.py
Python
gpl-2.0
1,532
from typing import List, Tuple, Sequence import logging logger = logging.getLogger(__name__) from .lock_tables import lock_tables from .uiformatters import UIFormatter, get_uiformatters, AutonumberOverflowException def autonumber_and_save(collection, user, obj) -> None: uiformatters = get_uiformatters(collectio...
specify/specify7
specifyweb/specify/autonumbering.py
Python
gpl-2.0
1,532
from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait import sys from .server_tools import reset_database class FunctionalTest(StaticLiveServerTestCase): @classmethod def setUpClass(cls): for arg in sys.argv:...
doctori/PythonTDD
functional_tests/base.py
Python
gpl-2.0
1,832
import wx import listControl as lc import getPlugins as gpi from decimal import Decimal import os class Plugin(): def OnSize(self): # Respond to size change self.bPSize = self.bigPanel.GetSize() self.list.SetSize((self.bPSize[0] - 118, self.bPSize[1] - 40)) self.ButtonShow(False) ...
fxb22/BioGUI
plugins/Views/BLASTView.py
Python
gpl-2.0
5,154
# Copyright (C) 2015 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 in the hope that it will be u...
mulkieran/bytesize
src/bytesize/_size.py
Python
gpl-2.0
18,819
#!/usr/bin/env python """ Python script to generate map tiles with mapnik using metatiles and multiprocessing/threading for improved performance (c) Henry Thasler based on other scripts from http://svn.openstreetmap.org/applications/rendering/mapnik/ """ from math import pi, cos, sin, log, exp, atan, floor, ceil, sqr...
henrythasler/TileGenerator
py3_render.py
Python
gpl-2.0
18,299
"""Helpers for reliable persistent message queues.""" RESYNC = object() # Used as a flag indicating a resync is needed def got_next_expected(store, next_expected): """Our peer has told us what it expects our next message's sequence to be. Call this with the message store and sequence number that the peer ...
CanonicalLtd/landscape-client
landscape/lib/message.py
Python
gpl-2.0
2,638
from Crypto.Util import number class PubKey(object): def __init__(self, poly, order, n): self.poly = poly self.order = order self.N = n def poly_rand(self): return [number.getRandomRange(0, self.N) for i in range(0, self.order)] def poly_mul(self, p, q): res = [0 ...
Qwaz/solved-hacking-problem
SCTF/2018 Finals/poly_pkc/problem.py
Python
gpl-2.0
2,099
#!/usr/bin/env python3 import unittest from mock import patch import os import auto_submit import requests import lxml class AutoSubmitTest(unittest.TestCase): message = None url = None def wifi_paths( self, p ): return p == '/sys/class/net/wlp3s0/phy80211' @patch.object( os, 'listdir' ) @patch.object( os.pa...
vagabondcoder/nm_tools
test_auto_submit.py
Python
gpl-2.0
2,924
# Copyright (C) 2012 Lars Wirzenius # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed i...
heysion/clone-cliapp
example3.py
Python
gpl-2.0
1,359
# document.py # A module to handle documents # Copyright (C) 2004 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.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 Found...
arichar6/veusz
veusz/document/doc.py
Python
gpl-2.0
21,692
import sqlite3 import directORM class Proveedor: def __init__(self): self.idProveedor = -1 self.nombre = '' self.email = '' self.tlf_fijo = '' self.tlf_movil = '' self.tlf_fijo2 = '' self.tlf_movil2 = '' self.banco = '' self.cuenta_bancaria ...
arkadoel/directORM
python/salida/directORM/forProveedores.py
Python
gpl-2.0
3,696
import itertools import math import unittest from collections import Counter, OrderedDict import pytest from boofuzz import * @pytest.fixture(autouse=True) def clear_requests(): yield blocks.REQUESTS = {} blocks.CURRENT = None class TestString(unittest.TestCase): def _given_string(self): s...
jtpereyda/boofuzz
unit_tests/test_string.py
Python
gpl-2.0
8,751
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) Copyright 2003-2007 Hewlett-Packard Development Company, L.P. # # 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 Lice...
matrumz/RPi_Custom_Files
Printing/hplip-3.15.2/installer/dcheck.py
Python
gpl-2.0
10,306
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007 Martin Hawlisch # # 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) ...
sam-m888/addons-source
PhpGedView/phpgedview.gpr.py
Python
gpl-2.0
1,398
# force floating point division. Can still use integer with // from __future__ import division # This file is used for importing the common utilities classes. import numpy as np import matplotlib.pyplot as plt import sys sys.path.append("../../../../") import BellZhurkov.Python.TestExamples.TestUtil.Bell_Test_Data as ...
prheenan/BioModel
BellZhurkov/Python/TestExamples/Examples/Bell_Examples.py
Python
gpl-2.0
3,266
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taas.user.models class Migration(migrations.Migration): dependencies = [ ('user', '0002_remove_username'), ] operations = [ migrations.AlterModelManagers( name='us...
crypotex/taas
taas/user/migrations/0003_change_user_manager.py
Python
gpl-2.0
447
import warnings warnings.simplefilter(action="ignore", category=RuntimeWarning) warnings.simplefilter(action="ignore", category=PendingDeprecationWarning) from hicexplorer import hicBuildMatrix, hicInfo from hicmatrix import HiCMatrix as hm from tempfile import NamedTemporaryFile, mkdtemp import shutil import os import...
maxplanck-ie/HiCExplorer
hicexplorer/test/long_run/test_hicBuildMatrix.py
Python
gpl-2.0
9,095
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 versio...
WoLpH/EventGhost
eg/WinApi/SerialPortScan.py
Python
gpl-2.0
4,912
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore class QGesture(__PyQt4_QtCore.QObject): """ QGesture(QObject parent=None) """ def gestureCancelPolicy(self): #...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QGesture.py
Python
gpl-2.0
1,703
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
avsm/xen-unstable
tools/python/xen/xend/XendConstants.py
Python
gpl-2.0
3,953
# ScummVM - Graphic Adventure Engine # # ScummVM is the legal property of its developers, whose names # are too numerous to list here. Please refer to the COPYRIGHT # file distributed with this source distribution. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU ...
chrisws/scummvm
devtools/tasmrecover/tasm/parser.py
Python
gpl-2.0
7,312
#!/usr/bin/env python # # Copyright (c) 2014, 2016 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributio...
teamfx/openjfx-8u-dev-rt
modules/web/src/main/native/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py
Python
gpl-2.0
14,357
#!/usr/bin/python import sys import re import string import httplib import urllib2 import re def StripTags(text): finished = 0 while not finished: finished = 1 start = text.find("<") if start >= 0: stop = text[start:].find(">") if stop >= 0: text ...
knightmare2600/d4rkc0de
others/goog-mail.py
Python
gpl-2.0
2,312
#-------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU ...
fabio-otsuka/invesalius3
invesalius/data/surface.py
Python
gpl-2.0
35,564
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # # plotpdf.py # # Copyright 2012 Greg <greg@greg-G53JW> # # 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 Founda...
gregreen/bayestar
scripts/plotpdf.py
Python
gpl-2.0
13,899
#!/bin/env python # @info - Unit testing suite for the main server program. We will spin it up on localhost # and send test API requests to it, making sure the correct responses are received. from unit_test import * class serverUnitTest(UnitTest) : def __init__(self, testargs) : pass
Praxyk/Praxyk-DevOps
server/unittest/server_unit_tests.py
Python
gpl-2.0
310
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.admin.widgets import AdminFileWidget from django.forms import ( HiddenInput, FileInput, CheckboxSelectMultiple, Textarea, TextInput, PasswordInput ) from django.forms.widgets import CheckboxInput from .zui import ( get_zui...
yuanxu/django-scaffold
scaffold_toolkit/zui/forms.py
Python
gpl-2.0
5,477
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 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 option) any...
inspirehep/invenio-search
invenio_search/registry.py
Python
gpl-2.0
5,066
import os import sys import time import tempfile import shutil if sys.version_info[:2] == (2, 6): import unittest2 as unittest else: import unittest from avocado.utils import process FAKE_VMSTAT_CONTENTS = """#!/usr/bin/python import time import random import signal import sys class FakeVMStat(object): ...
Hao-Liu/avocado
selftests/functional/test_utils.py
Python
gpl-2.0
4,216
# -*- coding: utf-8 -*- ############################################################################################### # # MediaPortal for Dreambox OS # # Coded by MediaPortal Team (c) 2013-2017 # # This plugin is open source but it is NOT free software. # # This plugin may only be distributed to and executed...
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Plugins/Extensions/MediaPortal/additions/porn/freeomovie.py
Python
gpl-2.0
9,341
# -*- coding: utf-8 -*- ''' Created on Nov 18, 2014 @author: Arturo Curiel ''' import ply.yacc as yacc import ply.lex as lex import ply.ctokens as ctokens import ConfigParser import StringIO from nixtla.core.tools.pdlsl import Atom, AtomAction from nixtla.core.tools import pdlsl class PDLSLLexer(object): ...
acuriel/Nixtla
nixtla/core/tools/database_parser.py
Python
gpl-2.0
9,452
#!/usr/bin/env python # -*- coding: utf-8 -*- ##################################################################### # Author: Cristian Segura L. # # Email: cristian+dot+segura+dot+lepe+arroba+dot+gmail+dot+com # # Creation Date: Sat nov 8 20:11:38 CLST 2014 ...
CSL-Consulting/asterisk-installation-script
asterisk-installation-script.py
Python
gpl-2.0
2,662
#!/usr/bin/python import requests from bs4 import BeautifulSoup class CoverGrabber: def __init__(self, url=None): if url is None: self.url = 'http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias=aps&field-keywords=cd' else: self.url = url def request_service(self...
Ganapati/DjangoZik
infos_grabber/coverGrabber.py
Python
gpl-2.0
998
#!/adsc/DDEA_PROTO/bin/python """ @author: NGO Quang Minh Khiem @contact: khiem.ngo@adsc.com.sg """ import urllib import urllib2 from datetime import * from pathos.multiprocessing import ProcessingPool import pathos.multiprocessing as pmp from toolset import dill_save_obj airport_codes = { 'SDH' : ...
TinyOS-Camp/DDEA-DEV
[Python]Collection/retrieve_weather.py
Python
gpl-2.0
6,690
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingPlugin.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
mhugent/Quantum-GIS
python/plugins/processing/ProcessingPlugin.py
Python
gpl-2.0
6,571
# # ---------------------------------------------------------------------------------------------------- # Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # un...
graalvm/mx
mx_proftool.py
Python
gpl-2.0
55,588
# encoding: UTF-8 from django import forms from django.forms import * from voodoo.admin_center.models import * from datetime import date, timedelta, datetime import datetime import os.path class OrderForm(forms.ModelForm): required_css_class = 'required' order_status = ModelChoiceField(OrderStatus....
Smiter/voodoo
voodoo/admin_center/forms.py
Python
gpl-2.0
8,129
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Evernote Corporation # # This file is part of Pootle. # # 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 L...
evernote/pootle
pootle/apps/pootle_app/management/commands/test_checks.py
Python
gpl-2.0
3,548
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' setup.py - Setup script for pytextseg Python package Copyright (C) 2012 by Hatuka*nezumi - IKEDA Soji. This file is part of the pytextseg package. This program is free software; you can redistribute it and/or modify it under the terms of either the GNU General Public...
hatukanezumi/pytextseg
setup.py
Python
gpl-2.0
7,432
#!/usr/bin/env python """ Fast Card A wikipedia like system where information is kept in a card format. The main audience for this project are individuals who repeatably refer to references online. Those references can be pulled in and the data stored as a card, and can then be easily searched. ...
scottgreenup/wiki
main.py
Python
gpl-2.0
592
from gi.repository import Gtk from gi.repository import WebKit class BrowserView: def __init__(self): window = Gtk.Window() window.connect('delete-event',Gtk.main_quit) self.view = WebKit.WebView() #self.view.load_uri('http://example.net') #https://www.raspberrypi.or...
samurailens/sop
app/samplePythonScript/webapp.py
Python
gpl-2.0
609
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- coding: utf-8 -*- """ [lib/lib/ergo_del.py] Defines the "del" command. """ from ergonomica import ErgonomicaError def _del(argc): """del: Delete variables. Usage: del [<variable>VARS...] """ for var in argc.args['VARS']: try: ...
ergonomica/ergonomica
ergonomica/lib/lib/ergo_del.py
Python
gpl-2.0
481
import time import urllib2 from urllib2 import urlopen import datetime from sys import argv website = argv[1] topSplit = '<div class=\"post\">' bottomSplit = '<div class=\"sp_right\">' def main(): try: sourceCode = urllib2.urlopen(website).read() #print sourceCode sourceSplit = sourceCode.split(topSplit)[1]...
genokan/Python-Learning
scraper.py
Python
gpl-2.0
443
from os import environ def load_env(app): if 'DATABASE_URI' in environ: app.config['DATABASE_URI'] = environ.get('DATABASE_URI') if 'INSTA_ID' in environ: app.config['INSTA_ID'] = environ.get('INSTA_ID') if 'INSTA_SECRET' in environ: app.config['INSTA_SECRET'] = environ.get('INSTA_SECRET') if 'SE...
petr-devaikin/commonview
web/env_settings.py
Python
gpl-2.0
395
""" Module containing class used for loading config files. Copyright 2012 Red Hat, Inc. Licensed under the GNU General Public License, version 2 as published by the Free Software Foundation; see COPYING for details. """ __autor__ = """ olichtne@redhat.com (Ondrej Lichtner) """ import os import sys import re import s...
jiriprochazka/lnst
lnst/Common/Config.py
Python
gpl-2.0
16,286
# -*- coding: utf-8; -*- """ Copyright (C) 2007-2013 Guake authors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This progra...
Guake/guake
guake/globals.py
Python
gpl-2.0
3,863
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np def plot_u(u): fig = plt.figure() ax = Axes3D(fig) x = [] y = [] for (i,j),val in np.ndenumerate(u): x.append(i) y.append(j) ax.plot(xs=x, ys=y, zs=u.flatten(), zdir='z', label='ys=0, zdir...
geobricks/Playground
playground/clustering/cluster_internet/plot_u.py
Python
gpl-2.0
340
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed ...
SCSSoftware/BlenderTools
addon/io_scs_tools/ui/mesh.py
Python
gpl-2.0
2,693
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() task = Table('task', post_meta, Column('id', Integer, primary_key=True, nullable=False), Column('parent_id', Integer, default=ColumnDefault(0)), Column('body', String), Colu...
itJunky/web-tasker.py
db_repository/versions/028_migration.py
Python
gpl-2.0
1,041
def __load(): import imp, os, sys ext = 'objc/_objc.so' for path in sys.path: if not path.endswith('lib-dynload'): continue ext = os.path.join(path, ext) if os.path.exists(ext): #print "py2app extension module", __name__, "->", ext mod = imp.load_...
debugger06/MiroX
osx/build/bdist.macosx-10.5-fat/python2.7-standalone/app/temp/objc/_objc.py
Python
gpl-2.0
540
# encoding: utf-8 # module PyKDE4.kdeui # from /usr/lib/python2.7/dist-packages/PyKDE4/kdeui.so # by generator 1.135 # no doc # imports import PyKDE4.kdecore as __PyKDE4_kdecore import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtGui as __PyQt4_QtGui import PyQt4.QtSvg as __PyQt4_QtSvg from KFindDialog import KFind...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyKDE4/kdeui/KReplaceDialog.py
Python
gpl-2.0
1,146
__author__ = 'ameadows' import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import datanexus class Tox(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True ...
OpenDataAlex/dataNexus
setup.py
Python
gpl-2.0
1,846
from flask import Flask, session, redirect, url_for, escape, request app = Flask(__name__) app.secret_key = "Tajny klic" @app.route('/') def index(): if 'username' in session: return "Logged in as %s <br><a href='logout'>Logout</a>" %escape(session['username']) return 'You are not logged in <br><a href=...
spseol/CzechFlaskDoc
Priklady/Dalsi/session.py
Python
gpl-2.0
831
# # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge...
IljaGrebel/OpenWrt-SDK-imx6_HummingBoard
staging_dir/host/lib/scons-2.3.5/SCons/Options/EnumOption.py
Python
gpl-2.0
1,980
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.ActionMap import NumberActionMap from Components.config import config, getConfigListEntry, ConfigNothing, NoSave, ConfigPIN from Components.ParentalControlList import ParentalControlEntryComponent, ParentalControlList ...
Ophiuchus1312/enigma2-master
lib/python/Screens/ParentalControlSetup.py
Python
gpl-2.0
14,944
import os import sys import math import pygame import loader import importlib import tkinter as tk from QuadTree import * from tkinter import ttk from CONSTANTS import * from pygame.locals import * TILEWIDTH = 128 TILEHEIGHT = 64 def load_module(path): spec = importlib.util.spec_from_file_location("module.name", ...
lumidify/fahrenheit451
EditorClasses.py
Python
gpl-2.0
37,759
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('rip', '0004_auto_20141218_1303'), ] operations = [ migrations.AlterFie...
harinarayan/litmus
rip/migrations/0005_auto_20141218_1306.py
Python
gpl-2.0
769
from django.db import models class Empresa(models.Model): nombre = models.CharField(max_length=100) ciudad = models.CharField(max_length=50) sector = models.CharField(max_length=200) def __str__(self): return self.nombre class Calificacion(models.Model): alumno = models.CharField(max_length=100) calificacion ...
JesGor/test_rest
apprest/models.py
Python
gpl-2.0
432
from Screen import Screen import ChannelSelection from ServiceReference import ServiceReference from Components.config import config, ConfigSelection, ConfigText, ConfigSubList, ConfigDateTime, ConfigClock, ConfigYesNo, getConfigListEntry from Components.ActionMap import NumberActionMap from Components.ConfigList impor...
IanSav/enigma2
lib/python/Screens/TimerEntry.py
Python
gpl-2.0
25,248