code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-22 11:18 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('cotacao', '0003_auto_20170312_2049'), ] operations...
asleao/sistema-cotacao
project/cotacao/migrations/0004_auto_20170322_0818.py
Python
gpl-3.0
665
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'SPUser', fields ['username'] db.create_uni...
the0forge/sp
frontend/migrations/0038_auto__add_unique_spuser_username.py
Python
gpl-3.0
22,106
#! /usr/bin/python # _*_ coding: utf-8 _*_ # # Dell EMC OpenManage Ansible Modules # # Copyright © 2017 Dell Inc. or its subsidiaries. All rights reserved. # Dell, EMC, and other trademarks are trademarks of Dell Inc. or its # subsidiaries. Other trademarks may be trademarks of their respective owners. # # This progra...
anupamaloke/Dell-EMC-Ansible-Modules-for-iDRAC
library/dellemc_idrac_export_tsr.py
Python
gpl-3.0
5,134
from django.db import models import socket,logging # Create your models here. class Sensor(models.Model): timestamp = models.DateTimeField(auto_now_add=True) env_light = models.IntegerField() env_humid = models.IntegerField() env_raindrop = models.IntegerField() env_temperature = models.IntegerFie...
izhaohui/gardener
controller/home/flower/models.py
Python
gpl-3.0
2,048
import random def preprocessing(mazeMap, mazeWidth, mazeHeight, playerLocation, opponentLocation, piecesOfCheese, timeAllowed): return def turn (mazeMap, mazeWidth, mazeHeight, playerLocation, opponentLocation, playerScore, opponentScore, piecesOfCheese, timeAllowed): return def postprocessing (mazeMap, mazeWi...
vgripon/PyRat
imports/dummyplayer.py
Python
gpl-3.0
440
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Pavel Korshunov <Pavel.Korshunov@idiap.ch> # Tue 22 Sep 17:21:35 CEST 2015 # # Copyright (C) 2012-2015 Idiap Research Institute, Martigny, Switzerland # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General...
bioidiap/bob.bio.spear
bob/bio/spear/utils/extraction.py
Python
gpl-3.0
4,798
# oppia/gamification/models.py from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from oppia.models import Course, Activity, Media class DefaultGamificationEvent(models.Model): GLOBAL = 'global' CO...
DigitalCampus/django-oppia
gamification/models.py
Python
gpl-3.0
2,912
import pyglet from random import random as r from board import Board from math import floor cursor = None xi, yi = 30, 30 x, y = xi, yi lvl = 5 starts = True mines = Board(xi, yi, lvl) flag_mode = False brd = {(_x,_y) for _x in range(x) for _y in range(y)} scale = 20 black = 0, 0, 0, 255 white = 255, 255, 255 pur...
thismachinechills/minesqeeper
mines_pyglet.py
Python
gpl-3.0
4,042
# -*- coding: utf-8 -*- # This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) # Copyright (C) 2021 OzzieIsaacs # # 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...
janeczku/calibre-web
cps/services/Metadata.py
Python
gpl-3.0
3,837
# Copyright (C) 2006-2007 Owen Williams. # Copyright (C) 2006-2008 Red Hat, Inc. # # 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 late...
quozl/sugar
src/jarabe/model/shell.py
Python
gpl-3.0
28,028
#!/usr/bin/python # -*- coding: utf-8 -*- # kate: space-indent on; indent-width 4; mixedindent off; indent-mode python; import argparse import string import ldap import ldap.modlist as modlist from action_base import * class action_module(action_base): def __init__(self, app, args): action_base.__init__(...
aroth-arsoft/arsoft-python
python3/arsoft/ldap/slapd/action_module.py
Python
gpl-3.0
2,292
import pickle process_files = ["NameNode", "SecondaryNameNode", "DataNode", "ResourceManager", "NodeManager", "YarnChild", "MRAppMaster"] for f in process_files: try: with open('../pipelines/java_mappings/' + f + '.txt', 'rb') as fp: itemlist = pickle.load(fp) print(f +...
JonatanEnes/metrics-to-time-series
src/java_hadoop_snitch/read_java_maps.py
Python
gpl-3.0
394
"""Error codes used during the analysis.""" ERR_INPUT_INVALID = { "name": "ERR_INPUT_INVALID ", "msg": "Input is invalid." } ERR_MODEL_NOT_AVAILABLE = { "name": "ERR_MODEL_NOT_AVAILABLE", "msg": "Model does not seem to be available! It should be either trained or loaded " "before scoring." ...
sara-02/fabric8-analytics-stack-analysis
util/error/error_codes.py
Python
gpl-3.0
322
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand 5 # Copyright 2015 tvalacarta@gmail.com # http://www.mimediacenter.info/foro/viewforum.php?f=36 # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # -...
orione7/plugin.video.streamondemand-pureita
core/scrapertools.py
Python
gpl-3.0
17,985
''' Created on Aug 1, 2012 @author: ouayed ''' import logging,os import hdsr_controle.realtech_hdsr.models as model from django.contrib.gis.utils import LayerMapping,LayerMapError from django.db import transaction,IntegrityError from django.utils.datetime_safe import datetime from hdsr_controle.realtech_hdsr import e...
pombredanne/lizard-progress
hdsr_controle/realtech_hdsr/data_loader.py
Python
gpl-3.0
11,413
from django.db import models class Cliente(models.Model): nombre = models.CharField(max_length=200) apellidos = models.CharField(max_length=200) primerServicio = models.DateField('fecha primer Servicio') class Venta(models.Model): CONTADO = 'CONTADO' CREDITO = 'CREDITO' ...
danielstp/gestionAgua
aguaEmbotellada/clientes/models.py
Python
gpl-3.0
842
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Python DAB ~ DoS Tool ~ By Wįłłý Fœx : @BlackVikingPro """ """ Current Version: v2.0 """ """ Python D.A.B. [ |)3|\|`/ 411 |31T(|-|3z ] ~ DoS Tool ~ By Wįłłý Fœx : @BlackVikingPro Use at your own risk. I do/will not condone any illegal activity I'm not responsible f...
BlackVikingPro/D.A.B.
dab.py
Python
gpl-3.0
14,157
# -*- coding: utf-8 -*- # Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to manage history. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSignal, Qt, QUrl from PyQt5.QtGui import QFontMetrics, QCursor from PyQt5.QtWidgets import QD...
davy39/eric
Helpviewer/History/HistoryDialog.py
Python
gpl-3.0
5,112
# -*- coding: utf-8 -*- #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys from platformcode import config, logger from core import scrapertools from core.item import Item from core import servertools from core import httptools host = 'https://www.porndish.co...
alfa-jor/addon
plugin.video.alfa/channels/porndish.py
Python
gpl-3.0
3,595
"""CBCG method """ from chebyshev_polynomial import ChebyshevPolynomial from gerschgorin_circle_theorem import GerschgorinCircleTheoremEigenvalueEstimator import numpy as np from scipy.sparse import linalg class CBCG(): """ """ def __init__(self): pass def cbcg_solver(self, mat, rhs, init_x, step_...
sclc/NAEF
src/chebyshev_basis_cacg.py
Python
gpl-3.0
13,294
def hash_bytestr_iter(bytesiter, hasher, ashexstr=False): for block in bytesiter: hasher.update(block) return hasher.hexdigest() if ashexstr else hasher.digest() def file_as_blockiter(afile, blocksize=65536): with afile: block = afile.read(blocksize) while len(block) > 0: ...
sidya82/RepoApi
utils/Tools.py
Python
gpl-3.0
377
#!/usr/bin/env python ''' map display module Andrew Tridgell June 2012 ''' import sys, os, math import functools import time from MAVProxy.modules.mavproxy_map import mp_elevation from MAVProxy.modules.lib import mp_util from MAVProxy.modules.lib import mp_settings from MAVProxy.modules.lib import mp_module from MAVPr...
tridge/MAVProxy
MAVProxy/modules/mavproxy_map/__init__.py
Python
gpl-3.0
39,321
#!/usr/bin/env python import sys import cgi contentTemplate = "Content-Type: text/html \n" openingPageTemplate = """ <html> <head> <style type="text/css"> </style> </head> <body> </body> </html> """
sqzr1/Getter-Setter-Generator
tests/regression_test_samples/python/cgiPractice.py
Python
gpl-3.0
222
""" Django settings for unusebamboo project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build ...
unlessbamboo/django
unusebamboo/settings.py
Python
gpl-3.0
3,094
from distutils.core import setup setup( name='MetCalcs', version='0.1.1', author='Peter D. Willetts', author_email='peterwilletts24@gmail.com', packages=['metcalcs',], #scripts=[], license='LICENSE.txt', description='Some functions for calculating met parameters from sounding variab...
peterwilletts24/MetCalcs
setup.py
Python
gpl-3.0
459
# Copyright (c) 2015 RIPE NCC # # 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 is distributed in the h...
RIPE-NCC/ripe-atlas-cousteau
ripe/atlas/cousteau/api_meta_data.py
Python
gpl-3.0
6,704
#!/usr/bin/python """ ************************************************* * @Project: Self Balance * @Platform: Raspberry PI 2 B+ * @Description: Motor module * DC Motor with gearbox/encoder * Motor driver VNH2SP30 * @Owner: Guilherme Chinellato * @Email: guilhermechi...
gchinellato/Self-Balance-Robot
nfs-server/modules/Motion/Motor/motor.py
Python
gpl-3.0
3,971
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2010-2011, 2014. # Author(s): # Martin Raspaud <martin.raspaud@smhi.se> # This file is part of pytroll. # Pytroll 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 So...
pytroll/posttroll
posttroll/tests/test_bbmcast.py
Python
gpl-3.0
4,340
# browsershots.org - Test your web design in different browsers # Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org> # # Browsershots 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 ...
foligny/browsershots-psycopg2
shotfactory/shotfactory04/gui/linux/deerpark.py
Python
gpl-3.0
1,091
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ ============================ JSONRPC Library (jsonrpclib) ============================ This library is a JSON-RPC v.2 (proposed) implementation which follows the xmlrpclib API for portability between clients. It uses the same Server / ServerProxy, loads, dumps, etc...
pymedusa/Medusa
ext/jsonrpclib/jsonrpc.py
Python
gpl-3.0
43,868
# Self-standing executable for tall comparison mode from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QFileDialog, QPushButton, QPlainTextEdit, QWidget, QGridLayout, QDoubleSpinBox, QGroupBox, QSizePolicy, QSpacerItem, QLayout, QProgressDialog, QMessageBox, QVBoxLayout, QHBoxLayout, QStyle, QComboBox, QDi...
smarsland/AviaNZ
CompareCalls.py
Python
gpl-3.0
41,275
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import io import uuid import os.path import socket import optparse import cgi docvert_root = os.path.dirname(os.path.abspath(__file__)) inbuilt_bottle_path = os.path.join(docvert_root, 'lib/bottle') try: import bottle if not hasattr(bottle, 'static_file'...
holloway/docvert-python3
docvert-web.py
Python
gpl-3.0
12,330
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.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 Free Software Foundatio...
adw0rd/lettuce-py3
tests/unit/test_feature_parser.py
Python
gpl-3.0
27,374
def deposit(materials, life, sea, climate): contributions = [] depositkeys = set() for m in materials: t = 0 i = len(m.substance) - 1 sources = [] keys = set() while t < m.total: dt = m.total - t layer = m.substance[i] if layer['thi...
tps12/Tec-Nine
rock/sedimentary.py
Python
gpl-3.0
2,309
from ds_store import DSStore, DSStoreEntry from burp import IBurpExtender from burp import IScannerCheck from burp import IExtensionStateListener from burp import IScanIssue import StringIO from urlparse import urlparse def traverse_ds_store_file(d): """ Traverse a DSStore object from the node and yeld each ...
j4v/DS_Store-Scanner
dsstore_scanner.py
Python
gpl-3.0
6,357
#!/usr/bin/python """Use files with frequency counts of blasts on possible alleles (see format below) to genotype individuals. Usage: genotype_from_blast_results.py file_list threshold_file output_file - file_list is a file containing the path to the individual summary files. the file_list format is as follows...
enormandeau/ngs_genotyping
scripts/10_genotype_from_blast_results.py
Python
gpl-3.0
2,437
class abstract_identity_iterator(): """ an identity iterator to provide pre-defined identities""" def __init__(self): pass def next(self): """ Should return a pair (<adid>, <android_id>) """ pass class abstract_experiment: """ an experiment to be provided to run_once function...
tonyyanga/android-ad
appium_exec/abstract_experiment.py
Python
gpl-3.0
912
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2011 Mehmet Atakan Gürkan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed i...
atakan/Fractal-Trails
trail_maker.py
Python
gpl-3.0
6,471
# coding=utf-8 """Provider code for Speed.cd.""" from __future__ import unicode_literals import logging from medusa import tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import ( convert_size, try_int, ) from medusa.logger.adapters.style import BraceAdapter from medusa.providers.torren...
fernandog/Medusa
medusa/providers/torrent/html/speedcd.py
Python
gpl-3.0
7,255
""" xml.py - Copyright (C) 2016 Tobias Helfenstein <tobias.helfenstein@mailbox.org> Copyright (C) 2016 Anton Hammer <hammer.anton@gmail.com> Copyright (C) 2016 Sebastian Hein <hein@hs-rottenburg.de> Copyright (C) 2016 Hochschule für Forstwirtschaft Rottenburg <hfr@hs-rottenburg.de> This file is part of Wuchshüllenre...
tobiashelfenstein/wuchshuellenrechner
wuchshuellenrechner/lib/xml.py
Python
gpl-3.0
6,767
from PyQt5.QtCore import pyqtSignal from model.modelitem import ModelItem from model.rating import RatingType from model.transaction import transactional class Player(ModelItem): newCurrentGame = pyqtSignal(object, object, object) """ Represents a player the client knows about. """ def __init__...
FAForever/client
src/model/player.py
Python
gpl-3.0
4,165
from scipy.stats import bernoulli import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots(1, 1) # Calculate a few first moments: p = 0.3 mean, var, skew, kurt = bernoulli.stats(p, moments='mvsk') # Display the probability mass function (pmf): x = np.arange(bernoulli.ppf(0.01, p), berno...
davidam/python-examples
statistics/bernoulli.py
Python
gpl-3.0
842
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
dnjohnstone/hyperspy
hyperspy/_components/offset.py
Python
gpl-3.0
3,522
from __future__ import absolute_import from __future__ import print_function import os from os.path import join, dirname, abspath import sys import json import platform from functools import partial from hashlib import md5 from threading import Thread, Lock from copy import deepcopy from gi.repository import GObject ...
cajone/pychess
lib/pychess/Players/engineNest.py
Python
gpl-3.0
25,294
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **remote_updater.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines the :class:`RemoteUpdater` class and others online update related objects. **Others:** """ from __future__ import unicode_literals import os import platform from PyQt4....
KelSolaar/sIBL_GUI
sibl_gui/components/addons/online_updater/remote_updater.py
Python
gpl-3.0
31,337
#! /usr/bin/env python # encoding: utf-8 from waflib import Options from waflib.Configure import conf def options(opt): opt.add_option('--with-sqlite3', type='string', default=None, dest='with_sqlite3', help='''Path to SQLite3, e.g., /usr/local''') @conf def check_sqlite3(self, *k, **kw): ...
zhehaowang/ndn-cxx
.waf-tools/sqlite3.py
Python
gpl-3.0
1,318
#!/usr/bin/python # -*- coding: utf-8 -*- """ **Project Name:** MakeHuman **Product Home Page:** http://www.makehuman.org/ **Code Home Page:** http://code.google.com/p/makehuman/ **Authors:** Thomas Larsson **Copyright(c):** MakeHuman Team 2001-2014 **Licensing:** AGPL3 (see also ht...
jemandez/creaturas-magicas
Configuraciones básicas/scripts/addons/blendertools-1.0.0/maketarget/export_mh_obj.py
Python
gpl-3.0
8,237
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('base', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='checklistitem', options...
alirizakeles/tendenci
tendenci/apps/base/migrations/0002_auto_20150804_1545.py
Python
gpl-3.0
342
# coding=UTF-8 # Author: Dennis Lutter <lad1337@gmail.com> # URL: https://sick-rage.github.io # # This file is part of SickRage. # # SickRage 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...
Arcanemagus/SickRage
tests/torrent_tests.py
Python
gpl-3.0
4,493
# -*- coding: utf-8 -*- import numpy as np from numpy import ma import scipy as sp import networkx as nx from .utils import nxG from pymake import logger lgg = logger ########################## ### Stochastic Process ########################## def lognormalize(x): return np.exp(x - np.logaddexp.reduce(x)) def ...
dtrckd/pymake
pymake/util/math.py
Python
gpl-3.0
7,677
# speccon1d_vr example # Vertical consolidation of four soil layers # Figure 2 from: # Schiffman, R. L, and J. R Stein. (1970) 'One-Dimensional Consolidation of # Layered Systems'. Journal of the Soil Mechanics and Foundations # Division 96, no. 4 (1970): 1499-1504. from __future__ import division, print_function im...
rtrwalker/geotecha
examples/speccon/speccon1d_vr_4layers_vert_schiffmanandstein1970_Fig2.py
Python
gpl-3.0
2,145
from operator import itemgetter from lxml import html from fuzzywuzzy import fuzz from helpers.utils import cached_request, thread_pool, replace_all class StreamsApi: def __init__(self, data, cache): self.data = data self.cache = cache def get(self, url='', ttl=3600): base_url = 'livefootballol.me'...
jonian/kickoff-player
apis/streams.py
Python
gpl-3.0
6,137
''' Created on May 15, 2010 @author: ebakan ''' import sys if __name__ == '__main__': ints = sys.stdin.readline().split() for i in range(len(ints)): ints[i]=int(ints[i]) while ints[0]<=6 and ints[1]<=6 and ints[2]<=6: sys.stdout.write("R") ints[2]+=ints[0] if ints[2]>6: ...
ebakan/ProCo
ProCo2010/Speed Round/adv01.py
Python
gpl-3.0
665
#!/usr/bin/env python from distutils.core import setup setup(name='check_iftraffic_nrpe', version='0.12.1', description='Nagios NRPE plugin to check Linux network traffic', scripts = ['check_iftraffic_nrpe.py'], author='Samuel Krieg', author_email='samuel.krieg+github@gmail.com', u...
SamK/check_iftraffic_nrpe.py
setup.py
Python
gpl-3.0
524
PER_PAGE = 50 ANNOUNCE_INTERVAL = 300
kron4eg/django-btt
settings.py
Python
gpl-3.0
39
from os import path from errbot import BotPlugin, botcmd def tail(f, window=20): return ''.join(f.readlines()[-window:]) class Utils(BotPlugin): # noinspection PyUnusedLocal @botcmd def echo(self, _, args): """ A simple echo command. Useful for encoding tests etc ... """ re...
ESSS/err
errbot/core_plugins/utils.py
Python
gpl-3.0
2,355
# Topydo - A todo.txt client written in Python. # Copyright (C) 2014 - 2015 Bram Schoenmakers <bram@topydo.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 Free Software Foundation, either version 3 of the License,...
bram85/topydo
topydo/commands/AddCommand.py
Python
gpl-3.0
3,836
class TrieNode: def __init__(self, val): self.val = val self.children = [None] * 26 self.is_word = False class Trie: def __init__(self): """ Initialize your data structure here. """ self.root = TrieNode('') def insert(self, word): ...
YiqunPeng/Leetcode-pyq
solutions/208ImplementTrie.py
Python
gpl-3.0
1,935
#!/usr/bin/env python # -*- coding: utf-8 -*- # import os.path import sys import time # from slughifi import * import xlrd # from rncMongoDriver import rncMongoDB # # # # # if __name__ == "__main__": dburi = 'mongodb://uuuuu:ppppp@127.0.1:27017/rnc_production' rncdb = rncMongoDB(dburi,"rnc_production") pri...
pwldp/rodzice-na-czasie-pl
server/source_data/deleteCitiesWithoutSchool.py
Python
gpl-3.0
434
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # blog.py - maps requests to methods and handles them accordingly. # Copyright (C) 2017 Jose Ricardo Ziviani # # 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...
jrziviani/ziviani.net
build.py
Python
gpl-3.0
1,772
# Copyright 2009 Kieran Elliott <kierse@mediarover.tv> # # Media Rover 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. # # Media Rover...
kierse/mediarover
mediarover/source/nzbmatrix/item.py
Python
gpl-3.0
2,929
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2017/10/18 17:13 # @Author : xxc727xxc (xxc727xxc@foxmail.com) # @Version : 1.0.0 if __name__ == '__main__': pass
DreamerBear/awesome-py3-webapp
www/biz/__init__.py
Python
gpl-3.0
181
#!/usr/bin/env python3 # Basic program to read csv file and spit it back out import argparse import csv import sys def read_worksheet(csv_file): """ Read contents of worksheet_csv and return (contents, dialect, fields) """ contents = {} dialect = None fields = None with open(csv_file,...
asayler/moodle-offline-grading
moodle_grading_worksheet.py
Python
gpl-3.0
1,988
## Python implementation of MBMA (Van den Bosch & Daelemans 1999) ## Copyright (C) 2011 Folgert Karsdorp ## Author: Folgert Karsdorp <fbkarsdorp@gmail.com> ## URL: <http://github.com/fbkarsdorp/mbmp> ## For licence information, see LICENCE.TXT class Morpheme(object): """ A data class representing a m...
fbkarsdorp/mbmp
mbmp/datatypes.py
Python
gpl-3.0
2,861
################################################################################ # # # Folding@Home Client Control (FAHControl) # # Copyright (C) 2016-2020 foldingathome.org ...
FoldingAtHome/fah-control
fah/db/Database.py
Python
gpl-3.0
5,550
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2019 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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 Free Software Foundation, eith...
dontnod/weblate
weblate/fonts/admin.py
Python
gpl-3.0
1,510
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2016 Chris Lamb <lamby@debian.org> # # diffoscope 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,...
anthraxx/diffoscope
diffoscope/presenters/html/templates.py
Python
gpl-3.0
5,651
#!/usr/bin/env python # # Copyright 2008, Google Inc. # 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...
jcostamagna/restauranteConcurrente
test/lib/googletest/test/gtest_env_var_test.py
Python
gpl-3.0
4,036
import pygame from pygame.locals import * # pour les constantes touches... from constantes import * from fichiers import * from general import * from aide import * def edit(screen, levelNumber ,mode, lang, langu, levelFinal): motionX = 0 motionY = 0 alsoMario = 0 carte = [[int for lgn in range(NB_BLO...
litzler/marioSokoBan
edit.py
Python
gpl-3.0
8,847
#!/usr/bin/python # -*- coding: utf-8 -*- import os import re import types import StringIO from functools import wraps import tempfile import shutil from pipes import quote from ansible.runner.return_data import ReturnData from ansible import utils from ansible.utils import template DEFAULT_KEYRING = "" DEFAULT_GPG_...
llou/gpg_ansible
plugins/action_plugins/gpg_key.py
Python
gpl-3.0
45,135
from django.conf import settings from appconf import AppConf class ModelDatabankAppConf(AppConf): """App specific settings. Overridable in global settings. DATA_PATH: path to the real mercurial repositories; these should never be manipulated directly. Active repositories are symlinked in the ...
nens/model-databank
model_databank/conf.py
Python
gpl-3.0
1,241
#!/usr/bin/python3 import sys from time import sleep from random import randint import pifacecad import pifacecad.tools from pifacecad.lcd import LCD_WIDTH WORDS = ["piface", "raspberrypi", "pferd", "eier", "schnitzel", "hund", "knopf", "vogelei"] TOP_LEFT_INDEX, TOP_MIDDLE_INDEX, TOP_RIGHT_INDEX = range(3) BOTTOM_L...
MarvinMenzerath/PiFace
hangman.py
Python
gpl-3.0
8,035
import sqlite3 as sql from flask.json import jsonify from flask import current_app def total_entries(): with sql.connect("names.db") as con: cur = con.cursor() entries = cur.execute("SELECT count(*) FROM names").fetchone() con.commit() return '{}\n'.format('{}\n'.format(entries)[1:-3]) ...
carlitos26/RESTful-Web-service
browser-version/app/modules.py
Python
gpl-3.0
1,874
import data PRD = 'prd' from utils import * def test_messaging(IndivoClient): try: BODY = 'body' SUBJECT = 'subject' MSG_ID = 'message_id' SEVERITY = 'severity' admin_client = IndivoClient(data.machine_app_email, data.machine_app_secret) admin_client.set_app_id(data.app_email) ac...
newmediamedicine/indivo_server_1_0
indivo/tests/integration/test_modules/messaging.py
Python
gpl-3.0
2,631
# coding=utf-8 # Author: Idan Gutman # Modified by jkaberg, https://github.com/jkaberg for SceneAccess # URL: https://sick-rage.github.io # # This file is part of SickRage. # # SickRage 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...
Arcanemagus/SickRage
sickbeard/providers/scc.py
Python
gpl-3.0
7,234
# Author: Idan Gutman # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 o...
WebSpider/SickRage
sickbeard/providers/torrentleech.py
Python
gpl-3.0
8,079
"""Various utilities"""
UNICT-DMI/Telegram-DMI-Bot
module/utils/__init__.py
Python
gpl-3.0
24
""" Django settings for tdc project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
tdf/tdc
tdc/settings.py
Python
gpl-3.0
2,814
# Copyright (c) 2017 Cedric Bellegarde <cedric.bellegarde@adishatz.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 Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gnumdk/eolie
eolie/helper_dbus.py
Python
gpl-3.0
3,499
#!/usr/bin/env python # -*- coding: utf-8 -*- from builtins import object import pytest import locale from psychopy import localization from psychopy.localization import _translate welcome = u'Welcome to PsychoPy3!' trans = {'en': welcome, 'ja': u'PsychoPy3へようこそ!' } ### needs rewriting since locali...
hoechenberger/psychopy
psychopy/tests/test_misc/test_locale.py
Python
gpl-3.0
1,076
#!/usr/bin/env python # # Raspberry Pi Internet Radio # using an Adafruit RGB-backlit LCD plate for Raspberry Pi. # $Id: ada_radio.py,v 1.37 2014/11/04 19:53:46 bob Exp $ # # Author : Bob Rathbone # Site : http://www.bobrathbone.com # # This program uses Music Player Daemon 'mpd'and it's client 'mpc' # See http://...
pabloest/piradio
ada_radio.py
Python
gpl-3.0
23,437
# # Copyright (c) 2009 Mason Green & Tom Novelli # # This file is part of OpenMelee. # # OpenMelee is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version. # # O...
zzzzrrr/openmelee
ai/ai.py
Python
gpl-3.0
2,647
import os, psycopg2, rsa from urllib.parse import urlparse class Installer: def connect(self): self.url = urlparse(os.environ["DATABASE_URL"]) self.db = psycopg2.connect(database=self.url.path[1:], user=self.url.username, ...
MoarCatz/chat-server
installer.py
Python
gpl-3.0
2,510
# Generated by Django 1.11.15 on 2018-09-25 15:40 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django.db import migrations class Migration(migrations.Migrati...
lonnen/socorro
webapp-django/crashstats/crashstats/migrations/0001_initial.py
Python
mpl-2.0
369
#! /usr/bin/env python # coding=utf-8 import argparse from clint.textui.colored import red, green, blue from clint.textui import progress import copy import csv import io from lxml import etree import os import subprocess import sys from time import sleep SPRITESHEET_SVG = io.BytesIO('''<?xml version="1.0" encoding=...
bwinton/svg-magic
magic.py
Python
mpl-2.0
14,704
from django.db.backends import util from django_statsd.patches.utils import wrap def key(db, attr): return 'db.%s.%s.%s' % (db.client.executable_name, db.alias, attr) def __getattr__(self, attr): """ The CursorWrapper is a pretty small wrapper around the cursor. If you are NOT in debug mode, this i...
AdrianGaudebert/socorro-crashstats
vendor-local/lib/python/django_statsd/patches/db.py
Python
mpl-2.0
1,326
from configman import ConfigurationManager from configman.dotdict import DotDict from mock import Mock, patch import ujson from socorro.processor.mozilla_processor_2015 import ( MozillaProcessorAlgorithm2015 ) from socorro.unittest.testbase import TestCase thread_over_255_chars = { "frames": [ { ...
Tayamarn/socorro
socorro/unittest/processor/test_mozilla_processor_2015.py
Python
mpl-2.0
3,319
from flask_wtf import Form from wtforms.fields.html5 import DecimalRangeField from wtforms.fields import TextField, SubmitField, DateTimeField, DecimalField,\ HiddenField, BooleanField, PasswordField from wtforms import ValidationError from wtforms.validators import Optional, EqualTo, Requir...
paulfantom/Central-Heating-webpage
app/core/forms.py
Python
mpl-2.0
3,303
import os import zipfile import csv from django.core.management.base import BaseCommand from django.db import transaction from django.conf import settings from ...models import Service def get_service(row): for region in 'EA', 'EM', 'WM', 'SE', 'SW': col = 'TNDS-' + region if row[col]: ...
stev-0/bustimes.org.uk
busstops/management/commands/import_accessibility.py
Python
mpl-2.0
1,772
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import import datetime import time import flask import flask_lo...
srfraser/services
src/releng_tooltool/releng_tooltool/api.py
Python
mpl-2.0
11,752
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # Author: gdestuynder@mozilla.com # Requires: # mozliblda...
mozilla-it/mozlibldap
examples/simple_client_cert.py
Python
mpl-2.0
635
import json import mock import os import pytest import sys from io import BytesIO from .. import metadata, manifestupdate from ..update.update import WPTUpdate from ..update.base import StepRunner, Step from mozlog import structuredlog, handlers, formatters here = os.path.dirname(__file__) sys.path.insert(0, os.path....
KiChjang/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py
Python
mpl-2.0
64,506
import well_rested_unittest import unittest2 import os import sample_tests from sample_tests import subdirectory from sample_tests.subdirectory import test_class class NewSuite(well_rested_unittest.ErrorTolerantOptimisedTestSuite): pass class TestAutoDiscoveringTestLoader(unittest2.TestCase): maxDiff = Non...
klrmn/well-rested-tests
unittest/tests/test_loader.py
Python
mpl-2.0
2,850
"""This module defines classes that implements a threaded producer/consumer system. A single iterator thread pushes jobs into an internal queue while a flock of consumer/worker threads do the jobs. A job consists of a function and the data applied to the function.""" import time import threading import Queue from c...
bsmedberg/socorro
socorro/lib/threaded_task_manager.py
Python
mpl-2.0
16,098
############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your...
Comunitea/CMNT_004_15
project-addons/external_salesperson_visit/models/__init__.py
Python
agpl-3.0
874
# Copyright(C) 2011,2012,2013,2014 by Abe developers. # DataStore.py: back end database access for Abe. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
CraigsCoin/abe-craigscoin
Abe/DataStore.py
Python
agpl-3.0
124,415
# -*- coding: utf-8 -*- # © <2016> <SANDRA FIGUEROA VARELA sandrafigvar@gmail.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import calendar_event
sandrafig/addons
calendar_event_meeting_reason/models/__init__.py
Python
agpl-3.0
177
__author__ = 'Jonathan Senecal <jonathan@zap.coop>' from .team import Team from .ticket import Ticket, TICKET_ID_ALPHABET, TICKET_ID_SALT from .update import Update from .note import Note from .ticket_change import TicketChange from .ticket_subscriber import TicketSubscriber from .ticket_communication import TicketCom...
zapcoop/vertex
vertex_api/service/models/__init__.py
Python
agpl-3.0
373
# -*- coding: utf-8 -*- # # EbookLib documentation build configuration file, created by # sphinx-quickstart on Fri Apr 25 11:49:49 2014. # # 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...
eCrowdMedia/ebooklib
docs/conf.py
Python
agpl-3.0
9,313
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'designer/setgroup.ui' # # Created: Sun Mar 30 10:19:30 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exc...
z-jason/anki
aqt/forms/setgroup.py
Python
agpl-3.0
2,025