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 django.apps import AppConfig
class DocumentRequestsConfig(AppConfig):
name = 'document_requests'
| dhavalmanjaria/dma-student-information-system | document_requests/apps.py | Python | gpl-2.0 | 108 |
# -*- coding: utf-8 -*-
# vim:set noet ts=4:
#
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2009 Hideaki ABE <abe.sendai@gmail.com>
# Copyright (c) 2007-2011 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modif... | pkg-ime/ibus-anthy | setup/anthyprefs.py | Python | gpl-2.0 | 30,030 |
## Administrator interface for BibIndex
## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## Licen... | valkyriesavage/invenio | modules/bibharvest/lib/oai_harvest_admin.py | Python | gpl-2.0 | 65,264 |
#!/bin/env python3.4
# -*- coding: UTF-8 -*-
import simocracy.wiki as wiki
import re
## config ##
#Mรถglichkeit zur Simulation des Vorgangs
simulation = False
#Loglevel: schreibe nur geรคnderte Zeilen ("line") oder
# ganze geรคnderte Artikel ("article") auf stdin oder
# gar nicht ("none")
loglevel = "... | Simocracy/simocraPy | simocracy/ldhost.py | Python | gpl-2.0 | 2,714 |
class IPParseError(Exception):
pass
class ZoneNotFoundError(Exception):
pass
class InvalidInputError(Exception):
pass
| crustymonkey/r53-dyndns | libr53dyndns/errors.py | Python | gpl-2.0 | 133 |
# -*- coding: utf-8 -*-
# Copyright (C) Canux CHENG <canuxcheng@gmail.com>
#
# 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 ... | crazy-canux/xplugin_nagios | plugin/plugins/sharepoint_2013/src/plugin/base.py | Python | gpl-2.0 | 3,450 |
# coding:utf8
from datetime import date
from django.conf import settings
def SiteInfo(request):
return {
'site_title': settings.SITE_TITLE,
'site_motto': settings.SITE_MOTTO,
'site_since': "Desde " + settings.SITE_SINCE,
'more_than_five': date.today().year - int(settings.IS_OLD) >... | SolPi/Web-Django | webLH/context_processor.py | Python | gpl-2.0 | 352 |
"""Additional helper functions for the optlang solvers.
All functions integrate well with the context manager, meaning that
all operations defined here are automatically reverted when used in a
`with model:` block.
The functions defined here together with the existing model functions
should allow you to implement cus... | opencobra/cobrapy | src/cobra/util/solver.py | Python | gpl-2.0 | 21,838 |
#
# humanagent.py - provides server-side backend for interaction with
# human players in team formation
#
# Copyright (C) 2015 Nathan Dykhuis
#
# 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... | NDykhuis/team-formation-study-software | humanagent.py | Python | gpl-2.0 | 25,571 |
00000 0 output/lattice.py.err
32074 1 output/lattice.py.out
| Conedy/Conedy | testing/createNetwork/expected/sum_lattice.py | Python | gpl-2.0 | 68 |
# GemRB - Infinity Engine Emulator
# Copyright (C) 2003 The GemRB Project
#
# 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 versi... | ObsidianBlk/GemRB--Unofficial- | gemrb/GUIScripts/bg2/Start2.py | Python | gpl-2.0 | 9,946 |
"""
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | felipenaselva/repo.felipe | plugin.video.salts/scrapers/onlinedizi_scraper.py | Python | gpl-2.0 | 4,998 |
# Configuration file for ipython-notebook.
c = get_config()
#------------------------------------------------------------------------------
# NotebookApp configuration
#------------------------------------------------------------------------------
# NotebookApp will inherit config from: BaseIPythonApplication, Appli... | tschinz/iPython_Workspace | settings/profile_wpwiki/ipython_notebook_config.py | Python | gpl-2.0 | 24,145 |
#
# Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/]
#
# This file is part of IGE - Outer Space.
#
# IGE - Outer Space 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... | Lukc/ospace-lukc | client-pygame/lib/osci/dialog/EmpireOverviewDlg.py | Python | gpl-2.0 | 10,358 |
#!/usr/bin/env python3
###############################################################################
# #
# Copyright 2019. Triad National Security, LLC. All rights reserved. #
# This program was produced under U.S. Government contrac... | CSD-Public/stonix | src/tests/rules/unit_tests/zzzTestRulePreventXListen.py | Python | gpl-2.0 | 4,504 |
"""
Scriptable Packages Installer - Parcks
Copyright (C) 2017 JValck - Setarit
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.... | Parcks/core | test/domain/parse/test_installation_file_parser.py | Python | gpl-2.0 | 4,254 |
#!/usr/bin/python
import smbus
import time
'''
retrieve data from wii ir camera.
x = 0-1023
y = 0-720
size = 1-15?
top right of scene = [0,0]
'''
def getBlob(n,list): # return x,y,size for blob n (0-3) from list
if len(list)<13:
return []
x = list[1+(n*3)]
y = list[2+(n*3)]
s = list[3+(n*3)... | roving99/robot_pi | 0mq/wii_ir_test.py | Python | gpl-2.0 | 966 |
# -*- coding: utf-8 -*-
"""
Catch-up TV & More
Original work (C) JUL1EN094, SPM, SylvainCecchetto
Copyright (C) 2016 SylvainCecchetto
This file is part of Catch-up TV & More.
Catch-up TV & More is free software; you can redistribute it and/or modify
it under the terms of the GNU General Publi... | SylvainCecchetto/plugin.video.catchuptvandmore | plugin.video.catchuptvandmore/resources/lib/channels/fr/francetv.py | Python | gpl-2.0 | 14,146 |
"""
Show how to use a sprite backed by a graphic.
Sample Python/Pygame Programs
Simpson College Computer Science
http://programarcadegames.com/
http://simpson.edu/computer-science/
Explanation video: http://youtu.be/vRB_983kUMc
"""
import pygame
# Define some colors
BLACK = ( 0, 0, 0)
WHITE = ... | dannytpeck/python-arcade-game | pygame_base_template.py | Python | gpl-2.0 | 1,492 |
# Copyright (C) 2012-2015, Alphan Ulusoy (alphan@bu.edu)
#
# 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 pr... | wasserfeder/lomap | lomap/algorithms/__init__.py | Python | gpl-2.0 | 765 |
# -*- coding: utf-8 -*-
import os.path
files = os.listdir(os.path.dirname(__file__))
__all__ = [filename[:-3] for filename in files if not filename.startswith('__') and filename.endswith('.py')]
| repotvsupertuga/tvsupertuga.repository | script.module.streamtvsupertuga/lib/resources/lib/sources/en_torrents/__init__.py | Python | gpl-2.0 | 199 |
#!/usr/bin/env python
import gtk
#import NoteBuffer
import notemeister
class Note:
def __init__(self, path=None, title='', body='', link='', wrap="1"):
self.path = path
self.title = title
self.body = body
self.link = link
self.wrap = wrap
self.buffer = notemeister.NoteBuffer.NoteBuffer()
self.buffer.... | robotii/notemeister | src/lib/Note.py | Python | gpl-2.0 | 439 |
#A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* Copyright (c) Schrodinger, LLC
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove this copyright notice.
#F* ---------... | gratefulfrog/lib | python/pymol/computing.py | Python | gpl-2.0 | 10,218 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @first_date 20160122
# @date 20106122 - Build customize_form_errors
# @version 0.1
"""Error handling list
Error handling naming format:
%(API_NAME)s_ERR_%(ERROR_CODE)s_%(ERROR_EVENT)s
"""
USER_ERR_1001_REGISTERED_ACC = {
"error_code": 1001,
... | pythonistas-tw/academy | web-api/tonypythoneer/db-Exercise/v1/error_handlings/user_errors.py | Python | gpl-2.0 | 459 |
import unittest
from mock import Mock
import os
from katello.tests.core.action_test_utils import CLIOptionTestCase, CLIActionTestCase
from katello.tests.core.permission import permission_data
from katello.tests.core.user import user_data
import katello.client.core.permission
from katello.client.core.permission impor... | Katello/katello-cli | test/katello/tests/core/permission/permission_create_test.py | Python | gpl-2.0 | 3,671 |
__author__ = 'petastream'
import unittest
from game.map import Map
class TestMap(unittest.TestCase):
def setUp(self):
self.map = Map()
def test_generate(self):
self.map.generate()
if __name__ == "__main__":
unittest.main() | ghorejsi/hunt-the-wump | tests/map_tests.py | Python | gpl-2.0 | 256 |
# AI Classes
'''
Initiative: Either I win or I lose, if I win I go second, so I know my
opponents moves already- otherwise I have to try and predict them
Move Phase: Number of possible moves per unit depends on speeds and
world mechanics. It can easily be 100+ per unit. If we lost the
initiative then we need... | Bogadon/Battletech | ai.py | Python | gpl-2.0 | 18,339 |
# encoding: utf-8
# module PyKDE4.kdecore
# from /usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
import PyQt4.QtNetwork as __PyQt4_QtNetwork
from .KTimeZone import KTimeZone
class KTzfileTimeZone(KTimeZone):
... | ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdecore/KTzfileTimeZone.py | Python | gpl-2.0 | 414 |
# 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.
from __future__ import absolute_import
import os
try:
from os imp... | default-to-open/rpmdeplint | rpmdeplint/repodata.py | Python | gpl-2.0 | 12,665 |
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from builtins import dict
from builtins import int
from future import standard_library
standard_library.install_aliases()
from builtins import str
#!/usr/bin/env python
im... | erikdejonge/newsrivr | daemons/get-tweets-rest.py | Python | gpl-2.0 | 2,792 |
#! /usr/bin/env python
# This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Nils Weiss <nils@we155.de>
# Copyright (C) Enrico Pozzobon <enricopozzobon@gmail.com>
# Copyright (C) Alexander Schroeder <alexander1.schroeder@st.othr.de>
# This program is published und... | mtury/scapy | scapy/contrib/isotp.py | Python | gpl-2.0 | 75,260 |
#!/F3/core/run_it.py
# This file is used for creating a script
# Author : Ismail Sunni/@ismailsunni
# Created : 2012-04-06
import MySQLdb # accesing mysql database
from xlwt import Workbook # for writing in excel
import xlrd # for reading excel
from tempfile import TemporaryFile
import util as util
im... | ismailsunni/f3-factor-finder | core/run_it.py | Python | gpl-2.0 | 3,452 |
# -*- coding: utf-8 -*-
#
# This file is part of MyPaint.
# Copyright (C) 2007-2019 by the MyPaint Development Team.
# Copyright (C) 2007-2014 by Martin Renold <martinxyz@gmx.ch>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | mypaint/mypaint | gui/drawwindow.py | Python | gpl-2.0 | 34,612 |
from ..exception import FuzzExceptBadOptions
import re
import collections
from ..facade import BASELINE_CODE
class FuzzResSimpleFilter:
def __init__(self, ffilter=None):
self.hideparams = dict(
regex_show=None,
codes_show=None,
codes=[],
words=[],
... | xmendez/wfuzz | src/wfuzz/filters/simplefilter.py | Python | gpl-2.0 | 3,567 |
import logging, time, commands
from autotest.client.shared import error
from virttest import utils_test, aexpect
def run_timedrift(test, params, env):
"""
Time drift test (mainly for Windows guests):
1) Log into a guest.
2) Take a time reading from the guest and host.
3) Run load on the guest and... | ehabkost/virt-test | qemu/tests/timedrift.py | Python | gpl-2.0 | 7,552 |
#!/usr/bin/python3
# -*- coding:utf-8 -*-
import netconf
# accept NETCONF connection
session = netconf.Session.accept()
# process incoming requests until the connection is closed
while session.isActive() == True:
session.processRequest()
| rchuppala/usc_agent | src/usc-agent-dev/common/source/libnetconf/python/examples/server.py | Python | gpl-2.0 | 242 |
# schemagen_tsi.py
# Copyright 2013 - 2016, James Humphry
# 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.
#
# Thi... | jhumphry/ukraildata_etl | nrcif/schema/schemagen_tsi.py | Python | gpl-2.0 | 1,780 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/yeison/Documentos/python/developing/pinguino/pinguino-ide/qtgui/frames/board_config_advance.ui'
#
# Created: Fri Dec 19 15:43:20 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will ... | PinguinoIDE/pinguino-multilanguage | files/frames/board_config_advance.py | Python | gpl-2.0 | 5,588 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
from django.contrib import admin
from .models import Aggregation
class AggregationAdmin(admin.ModelAdmin):
list_display = (
'slug',
'user',
'database_name',
'collection_name',
'output_collection_name... | videntity/django-djmongo | djmongo/aggregations/admin.py | Python | gpl-2.0 | 401 |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import ... | q2apro/graph-padowan | Lib/Settings.py | Python | gpl-2.0 | 25,024 |
from sklearn.externals import joblib
import time
from . import folder_name
class ClassifierLoader(object):
"""Handles saving and loading of trained classifiers transparently."""
def __init__(self):
super(ClassifierLoader, self).__init__()
def dump_object(self, obj, classifier, category="", **kwar... | peret/visualize-bovw | util/classifierloader.py | Python | gpl-2.0 | 1,518 |
#! /usr/bin/env python3
def find_locations( sequence_file, pattern ):
"""
Find the most common kmers of a given size in a given text
"""
sequence = parse_sequence_file( sequence_file )
k = len(pattern)
for i in range(len(sequence)-k+1):
if sequence[i:i+k] == pattern:
yield i
def parse_sequence_file( sequen... | bnbowman/BifoAlgo | src/Chapter1/Sec3_PatternMatching.py | Python | gpl-2.0 | 627 |
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# 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
... | anthonyfok/frescobaldi | frescobaldi_app/guistyle.py | Python | gpl-2.0 | 1,666 |
#####################################################################
# -*- coding: iso-8859-1 -*- #
# #
# Frets on Fire X #
# Copyright (C) 2006 Sami Kyรถstilรค ... | cherbib/fofix | src/Svg.py | Python | gpl-2.0 | 7,545 |
import os
from selenium.webdriver.common.by import By
from pypop.pageobjects.base_page_object import PageObject
from pypop.pageobjects.base_page_element import InputField, PasswordField
class LoginPageObject(PageObject):
'''Page object for the login page'''
url = 'file:///' + os.path.dirname(__file__) + '/.... | gplayersv/pypop | pypop/example/project_to_test/tests/pageobjects/login.py | Python | gpl-2.0 | 533 |
# -*- coding: UTF-8 -*-
from scrapy.spiders import Spider
from mycrawler.items import BasicItem
from selenium import webdriver
from selenium.common.exceptions import *
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_co... | kooksee/firmSpyder | mycrawler/mycrawler/spiders/hikvisionSpider.py | Python | gpl-2.0 | 2,165 |
#!/usr/bin/python
import os
import threading
import time
import Queue
import signal
import subprocess
import collections
from json_get import generate_list
q = Queue.Queue()
ls = collections.deque( generate_list())
def showstuff():
while ( True ):
sb = subprocess.Popen(["feh", "-Z", "-g" ,"800x400",ls[0]... | Programvareverkstedet/pensieve | pensieve.py | Python | gpl-2.0 | 789 |
# -*- coding: UTF-8 -*-
# /*
# * Copyright (C) 2015 Libor Zoubek + jondas
# *
# *
# * 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, or (at your option)
# * any lat... | bbaronSVK/plugin.video.sosac.ph | resources/lib/sosac.py | Python | gpl-2.0 | 25,065 |
#!/usr/bin/env python
"""
This script is used to create default documentation for a library.
"""
# Imports ######################################################################
import os
import re
import argparse
# Metadata #####################################################################
__author__ = "Timothy Mc... | mtik00/obfuscator | docs/auto-generate.py | Python | gpl-2.0 | 4,778 |
#!/usr/bin/env python
"""
Make a pie chart where peaks fall in annotations; see \
:mod:`pybedtools.contrib.Classifier` for more flexibility.
The results here are similar to CEAS (http://liulab.dfci.harvard.edu/CEAS/).
However, multi-featuretype classes are reported. That is, if a peak falls in
an exon in one isoform... | jos4uke/getSeqFlankBlatHit | lib/python2.7/site-packages/pybedtools/scripts/peak_pie.py | Python | gpl-2.0 | 5,681 |
'''Module for the contacts pageset'''
from datetime import datetime
from murmeli.pages.base import PageSet, Bean
from murmeli.pagetemplate import PageTemplate
from murmeli import dbutils
from murmeli.fingerprints import FingerprintChecker
from murmeli.contactmgr import ContactManager
from murmeli import cryptoutils
... | activityworkshop/Murmeli | murmeli/pages/contacts.py | Python | gpl-2.0 | 16,404 |
#!/bin/python3
S = input().strip()
try:
print(int(S))
except ValueError:
print("Bad String")
| benosment/daily-exercises | hr-exception.py | Python | gpl-2.0 | 104 |
#-*- coding:utf-8 -*-
# ๅ็งๆนไพฟ็ๅทฅๅ
ทใ
import os, logging, threading
def is_empty(string):
# ๅคๆญๆฏๅฆ็ฉบๅญ็ฌฆไธฒ๏ผๅฆๆๆฏ็ฉบๆ ผไน็ฑป็๏ผไนๆฏemptyใ
# return:Bool:True,็ฉบ False,้็ฉบ
if string is None or len(string) == 0:
return True
elif string.isspace():
return True
else:
return False
def is_not_empty(s... | luo2chun1lei2/AgileEditor | ve/src/VeUtils.py | Python | gpl-2.0 | 503 |
##!/usr/bin/env python
from array import *
import os
import struct
stats = os.stat('freqtest.dat')
file_size = stats.st_size
#print('file size ', +file_size, ' bytes')
entries = file_size/4
#print('file has ', +entries, +' entries')
freq_array = array('f', []) #create an array to hold the entries
for a ... | unclejed613/gnuradio-projects-rtlsdr | scanner/frqedit.py | Python | gpl-2.0 | 2,267 |
# coding=utf-8
import os, sys, datetime, unicodedata, re
import xbmc, xbmcgui, xbmcvfs, xbmcaddon
import xml.etree.ElementTree as xmltree
from xml.sax.saxutils import escape as escapeXML
import copy
import ast
from traceback import print_exc
from unicodeutils import try_decode
if sys.version_info < (2, 7):
import ... | Jayz2K/script.skinshortcuts | resources/lib/xmlfunctions.py | Python | gpl-2.0 | 45,834 |
__pretty_app_name__ = "Gonvert"
__app_name__ = "gonvert"
__version__ = "1.1.6"
__build__ = 0
__app_magic__ = 0xdeadbeef
PROFILE_STARTUP = False
IS_MAEMO = True
| epage/Gonvert | gonvert/constants.py | Python | gpl-2.0 | 161 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('studies_app', '0005_auto_20161205_1202'),
]
operations = [
migrations.RemoveField(
model_name='observationalcase... | NavarraBiomed/clips | studies_app/migrations/0006_auto_20161205_1225.py | Python | gpl-2.0 | 6,384 |
"""
Copyright (c) 2008, Carl J Meyer
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions ... | lanky/fabrik | fabrik/snippets/betterforms.py | Python | gpl-2.0 | 8,496 |
################################################################
# CreditPiggy - Volunteering Computing Credit Bank Project
# Copyright (C) 2015 Ioannis Charalampidis
#
# 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... | wavesoft/creditpiggy | creditpiggy-server/creditpiggy/core/admin.py | Python | gpl-2.0 | 7,329 |
from django.db import models
class Picture(models.Model):
disp_title = models.CharField(max_length=256, blank=True)
caption = models.CharField(max_length=300,blank=True)
description = models.TextField(blank=True)
image = models.ImageField(upload_to='smedia', blank=True, null=True)
credit = models.T... | badrihippo/sirius | media/models.py | Python | gpl-2.0 | 1,378 |
__author__ = 'sysferland'
import argparse, subprocess, os
parser = argparse.ArgumentParser()
parser.add_argument('-feed', help='feed name')
parser.add_argument('-ffserver', help='ffserver IP and PORT')
parser.add_argument('-source', help='video source path if DVD Raw the path to the VIDEO_TS folder')
parser.add_argume... | RIEI/tongue | TongueD/StreamThread.py | Python | gpl-2.0 | 1,400 |
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
#
# **********************************************************************
import sys, traceback, Ice
slice_dir = Ice.getSliceDir()
if not slice_dir:
print(sy... | qiuxs/ice-demos | python/Ice/properties/Client.py | Python | gpl-2.0 | 3,232 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Moises Belchin <moisesbelchin@gmail.com>
# Date: February 2015
### Default mongoDB server
MONGO_SERVER = 'localhost'
### Default mongoDB port
MONGO_PORT = 27017
### Default mongoDB database name
MONGO_DB_NAME = 'social-graph'
... | mbelchin/cargomedia_social_graph | python_mongo/config.py | Python | gpl-2.0 | 391 |
from DataManager import DataManager, NoSuchCategoryException
import string
class CLEFManager(DataManager):
def __init__(self, *args, **kwargs):
super(CLEFManager, self).__init__(*args, **kwargs)
self.PATHS = {
"BASE" : "/home/peter/thesis/data_ImageCLEF",
"KEYPOINTS" : "/ho... | peret/visualize-bovw | datamanagers/ClefManager.py | Python | gpl-2.0 | 3,399 |
from typing import Any, Dict
from flask import g
from psycopg2 import connect, extras
def open_connection(config: Dict[str, Any]) -> None:
try:
g.db = connect(
database=config['DATABASE_NAME'],
user=config['DATABASE_USER'],
password=config['DATABASE_PASS'],
... | craws/OpenAtlas-Python | openatlas/database/connect.py | Python | gpl-2.0 | 946 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-01-12 17:08
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('themes', '0002_auto_20170110_1809'),
]
operations = [
migrations.AlterField(
... | amadeusproject/amadeuslms | themes/migrations/0003_auto_20170112_1408.py | Python | gpl-2.0 | 560 |
"""MySQLdb type conversion module
This module handles all the type conversions for MySQL. If the default
type conversions aren't what you need, you can make your own. The
dictionary conversions maps some kind of type to a conversion function
which returns the corresponding value:
Key: FIELD_TYPE.* (from MySQLdb.const... | PyMySQL/mysqlclient-python | MySQLdb/converters.py | Python | gpl-2.0 | 3,444 |
"""T2W modality class."""
import warnings
import numpy as np
import SimpleITK as sitk
from .standalone_modality import StandaloneModality
from ..utils.validation import check_path_data
class T2WModality(StandaloneModality):
"""Class to handle T2W-MRI modality.
Parameters
----------
path_data : st... | glemaitre/protoclass | protoclass/data_management/t2w_modality.py | Python | gpl-2.0 | 8,496 |
from flask import Blueprint
from simple_flask_blueprint.core.blueprint_core import say_hallo
bp = Blueprint('simple_flask_blueprint', __name__)
@bp.route('/')
def say_hallo_service():
return say_hallo()
@bp.route('/<name>/')
def say_hallo_to_guest_service(name):
return say_hallo(name)
| Kalimaha/simple_flask_blueprint | simple_flask_blueprint/rest/blueprint_rest.py | Python | gpl-2.0 | 299 |
##
# Copyright 2009-2017 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | ULHPC/easybuild-easyblocks | easybuild/easyblocks/c/cp2k.py | Python | gpl-2.0 | 35,231 |
# -*-mode: python; py-indent-offset: 4; tab-width: 8; coding: iso-8859-1 -*-
# DLLM (non-linear Differentiated Lifting Line Model, open source software)
#
# Copyright (C) 2013-2015 Airbus Group SAS
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Pub... | matthieu-meaux/DLLM | examples/broken_wing/test_broken_wing.py | Python | gpl-2.0 | 1,720 |
import os
import re
import json
import urllib.parse
import urllib.request
import contextlib
import hashlib
from lxml import etree
from django.conf import settings
from django.http import HttpResponse, JsonResponse, Http404
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.vary import va... | gislab-npo/gislab-web | server/webgis/map/views.py | Python | gpl-2.0 | 9,021 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class AccountInfo(models.Model):
user = models.ForeignKey(User)
balance = models.IntegerField()
DISH_NAME_MAX_LENGTH = 20
class Order(models.Model):
offerer ... | sysuccc/QiuDaBao | qiudabao/models.py | Python | gpl-2.0 | 617 |
# -*- coding: utf-8 -*-
#
# IPython documentation build configuration file.
# NOTE: This file has been edited manually from the auto-generated one from
# sphinx. Do NOT delete and re-generate. If any changes from sphinx are
# needed, generate a scratch one and merge by hand any new fields needed.
#
# This file is e... | lifeinoppo/littlefishlet-scode | RES/REF/python_sourcecode/ipython-master/docs/source/conf.py | Python | gpl-2.0 | 8,853 |
import sys
from mmse15project.views.Administration import Administration
from mmse15project.views.CustomerService import CustomerService
from mmse15project.views.Financial import Financial
from mmse15project.views.HR import HR
from mmse15project.views.Marketing import Marketing
from mmse15project.views.Production impor... | rssalessio/MMSE15Project-RussoJohansson | mmse15project/ctrls/MainController.py | Python | gpl-2.0 | 11,737 |
#!/usr/bin/env python
"""
.. module:: totalstation.py
:platform: Unix, Windows
:synopsis: Ulyxes - an open source project to drive total stations and
publish observation results. GPL v2.0 license Copyright (C)
2010- Zoltan Siki <siki.zoltan@epito.bme.hu>
.. moduleauthor:: Zoltan Siki <siki.zoltan@... | zsiki/ulyxes | pyapi/totalstation.py | Python | gpl-2.0 | 15,125 |
'''
Compute Hilbert Class Polynomials
'''
from mpmath import *
import mpmath
round = lambda x: mpmath.floor(x + 0.5)
def hilbert(d):
'''
Compute Hilbert Class Polynomial.
Follows pseudo code from Algorithm 7.5.8
Args:
d: fundamental discriminant
Returns:
Hilbert class number, Hil... | root-z/ECPP | hilbert.py | Python | gpl-2.0 | 4,207 |
# -*- coding: utf-8 -*-
import glob
import os
import csv
import smtplib
from email.mime.text import MIMEText
from whoosh import index
from whoosh.fields import Schema, TEXT
import config
from database import get_redis_pipeline
mail_config = config.mail_config
def sendmail(sbj, content,
fromwhom=mail_config['f... | liushuaikobe/GitArchiveUtils | daily-task/util.py | Python | gpl-2.0 | 3,053 |
import re
import time
import logging
from autotest.client.shared import error
from autotest.client.shared import utils
from virttest import utils_test
from virttest import utils_net
# The backports module will take care of using the builtin if available
from virttest.staging.backports import bin
@error.context_awa... | vipmike007/tp-qemu | qemu/tests/sr_iov_irqbalance.py | Python | gpl-2.0 | 12,966 |
# devices/md.py
#
# Copyright (C) 2009-2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the... | bcl/blivet | blivet/devices/md.py | Python | gpl-2.0 | 23,663 |
# coding=utf-8
"""
JSON token scanner
"""
import re
def _import_c_make_scanner():
try:
from simplejson._speedups import make_scanner
return make_scanner
except ImportError:
return None
c_make_scanner = _import_c_make_scanner()
__all__ = ['make_scanner', 'JSONDecodeError']
NUMBER_R... | ppizarror/Hero-of-Antair | bin/simplejson/scanner.py | Python | gpl-2.0 | 4,693 |
# Copyright (C) 2011 Midokura KK
# Copyright (C) 2011 Nicira, Inc
# Copyright 2011 OpenStack Foundation
# 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
#
# ... | Snergster/virl-salt | openstack/nova/files/kilo/vif.py | Python | gpl-2.0 | 31,926 |
import minecraft as minecraft
mc = minecraft.Minecraft.create()
friendsGame = minecraft.Minecraft.create("10.52.3.156")
friendsGame.player.setTilePos(16,16,16)
| mohsraspi/mhscs14 | tom/hackafriendsgame.py | Python | gpl-2.0 | 163 |
__author__ = 'Nataly'
from model.project import Project
import string
import random
def random_string(prefix, maxlen):
symbols = string.ascii_letters
return prefix + "".join([random.choice(symbols) for i in range(random.randrange(maxlen))])
def test_add_project(app):
project = Project(random_string("nam... | simonenkong/python_training_mantis | test/test_add_project.py | Python | gpl-2.0 | 726 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright 2011, 2013 Leandro Regueiro
#
# This file is part of Terminator.
#
# Terminator 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 ... | translate/terminator | project/manage.py | Python | gpl-3.0 | 969 |
import sys
import sqlite3
import CONST
import re
"""
Provides the low-level functions to insert, query and update the db
"""
def init():
con = sqlite3.connect( CONST.db_name )
# asr value is auto-speech-recognition rendered captions, either 0 (false) or 1 (true)
con.execute( '''CREATE TABLE IF NOT EXISTS... | krarkrrrc/vidpager | db/DbTools.py | Python | gpl-3.0 | 2,503 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import
CSV_DEFAULT_SEP = ','
CSV_DEFAULT_LF = '\n'
def append_same_length(columns, data):
if columns != []:
return len(columns) == len(data)
return True
class DataBuffer(object):
def __init__(self, csv_... | scls19fr/openchrono | openchrono/databuffer.py | Python | gpl-3.0 | 1,914 |
from django.contrib import admin
# Register your models here.
from .models import Video, Tag
admin.site.register(Video)
admin.site.register(Tag)
| i32baher/practicas-iss | tubeworld/video/admin.py | Python | gpl-3.0 | 147 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import viewsenators.initialization as initter
def populateParties(apps, schema_editor):
PartyInProgress = apps.get_model('viewsenators', 'Party')
db_alias = schema_editor.... | artoonie/RedStatesBlueStates | redblue/viewsenators/migrations/0004_add_cities.py | Python | gpl-3.0 | 4,790 |
from django.conf.urls import *
urlpatterns = patterns('tendenci.apps.payments.payflowlink.views',
url(r'^thankyou/$', 'thank_you', name="payflowlink.thank_you"),
url(r'^silentpost/', 'silent_post', name="payflowlink.silent_post"),
) | alirizakeles/tendenci | tendenci/apps/payments/payflowlink/urls.py | Python | gpl-3.0 | 243 |
# -*- coding:utf-8; mode:python -*-
"""
A terrible sorting algorithm
|----------------------+-----------------------+------------------|
| Best Time Complexity | Worst Time Complexity | Space Complexity |
|----------------------+-----------------------+------------------|
| O(n^2) | O(n) ... | wkmanire/StructuresAndAlgorithms | pythonpractice/bubblesort.py | Python | gpl-3.0 | 819 |
import os
from distutils.version import StrictVersion
import pytest
from wiring.scanning import scan_to_graph
from tomate.pomodoro import Events, PluginEngine, suppress_errors
@pytest.fixture
def plugin_engine(bus, graph, config) -> PluginEngine:
return PluginEngine(bus, config, graph)
def test_module(bus, co... | eliostvs/tomate-gtk | tests/pomodoro/test_plugin.py | Python | gpl-3.0 | 2,983 |
# Copyright (C) 2010 Mark Burnett
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program i... | mark-burnett/filament-dynamics | actin_dynamics/primitives/__init__.py | Python | gpl-3.0 | 776 |
#!/usr/bin/env python
import csv
import os
import sys
import argparse
import colored_traceback.always
# if you move this script, you'll need to change this method of getting the imports
partis_dir = os.path.dirname(os.path.realpath(__file__)).replace('/bin', '')
sys.path.insert(1, partis_dir + '/python')
import utils... | psathyrella/partis | bin/test-per-base.py | Python | gpl-3.0 | 8,597 |
#!/usr/bin/env python3
'''
kicad-footprint-generator 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.
kicad-footprint-generator is distributed... | SchrodingersGat/kicad-footprint-generator | scripts/Connector/Connector_Harwin/conn_harwin_m20-781xx45_smd_top_dual_row.py | Python | gpl-3.0 | 9,793 |
# -*- coding: UTF-8 -*-
'''
Authorized by vlon Jang
Created on Jul 3, 2016
Email:zhangzhiwei@ict.ac.cn
From Institute of Computing Technology
All Rights Reserved.
'''
import pandas as pd
import numpy as np
import pymysql
import matplotlib ... | wangqingbaidu/aliMusic | models/new_songs_incr.py | Python | gpl-3.0 | 38,314 |
'''
argparse.py - this file is part of S3QL.
Copyright ยฉ 2008 Nikolaus Rath <Nikolaus@rath.org>
This work can be distributed under the terms of the GNU GPLv3.
This module provides a customized ArgumentParser class. Differences
are:
* a --version argument is added by default
* convenience functions are availabl... | singleton7/main | src/s3ql/parse_args.py | Python | gpl-3.0 | 9,772 |
#!/usr/bin/env python
from unicodedata import name
import sys
if len(sys.argv) > 1:
query = sys.argv[1:]
else:
query = input('search words: ').split()
query = [s.upper() for s in query]
count = 0
for i in range(20, sys.maxunicode):
car = chr(i)
descr = name(car, None)
if descr is N... | YuxuanLing/trunk | trunk/code/study/python/Fluent-Python-example-code/attic/strings-bytes/charfinder.py | Python | gpl-3.0 | 555 |
"""
WSGI config for artge 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/dev/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTING... | neslihanturan/artge | artge/wsgi.py | Python | gpl-3.0 | 387 |
# -*- coding: utf-8 -*-
import curses
from functools import wraps
import logging
log = logging.getLogger('npyscreen2.widgets.input_handler')
__all__ = ['exit_edit_method', 'InputHandler']
def exit_edit_method(func):
"""
This functions serves as a decorator for Widget methods intended to end the
edit l... | SavinaRoja/npyscreen2 | npyscreen2/widgets/input_handler.py | Python | gpl-3.0 | 6,709 |