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
# -*- coding: utf-8 -*- import re import urllib import BeautifulSoup from module.plugins.captcha.ReCaptcha import ReCaptcha from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" __version__ =...
fzimmermann89/pyload
module/plugins/hoster/ZippyshareCom.py
Python
gpl-3.0
3,483
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Munch is a subclass of dict with attribute-style access. >>> b = Munch() >>> b.hello = 'world' >>> b.hello 'world' >>> b['hello'] += "!" >>> b.hello 'world!' >>> b.foo = Munch(lol=True) >>> b.foo.lol True >>> b.foo is b['fo...
ozmartian/vidcutter
vidcutter/libs/munch.py
Python
gpl-3.0
14,022
import string from string import maketrans #-------------------AMSA-------------------# BaseDirectory = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))), "..", "..", "..", "..", "Plug-in Support", "Data", "com.plexapp.agents.amsa", "DataItems")) CacheDirectory = "...
Dingmatt/AMSA
Plug-ins/Amsa.bundle/Contents/Code/constants.py
Python
gpl-3.0
10,604
#!/usr/bin/python3 # This file is part of pulseaudio-dlna. # pulseaudio-dlna 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. # pulse...
Cygn/pulseaudio-dlna
pulseaudio_dlna/codecs.py
Python
gpl-3.0
10,705
# -*- coding: utf-8 -*- # # This file is part of Radicale Server - Calendar Server # Copyright © 2008 Nicolas Kandel # Copyright © 2008 Pascal Halter # Copyright © 2008-2013 Guillaume Ayoub # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
muggenhor/Radicale
radicale/__init__.py
Python
gpl-3.0
22,565
# _ buttonFromEntity.py ____________________________________________________________________________ # File generated automatically by ATOM3. Graph Grammar Rule # ___________________________________________________________________________________________ from GGrule import * from ASG_ERmetaMetaModel import * from ...
Balannen/LSMASOMM
atom3/Kernel/ButtonsModels/buttonFromEntity.py
Python
gpl-3.0
7,167
from motor import Motor from swivel import Swivel from config import Config import numpy as np import math class MotorConductor: FRONT = "front" REAR = "rear" LEFT = "left" RIGHT = "right" SWIVEL = "swivel" def __init__(self): self.motor_front_left = Motor(MotorConductor.FRONT, MotorCo...
clubcapra/Ibex
src/roboteq_motor/scripts/motor_conductor.py
Python
gpl-3.0
3,094
SPLATS = [ 'mage', 'default', # 'vampire', # 'geist', # 'changeling', # 'hunter', # 'werewolf', # 'promethean', # 'demon', ] goodDefault = ["You should take the beat, [userID].", "Aren't I a good bot, [userID]?", "Did you hack me, [userID]?", ...
further-reading/discord-dirceroller-bot
code/utils/messaging.py
Python
gpl-3.0
1,552
__author__ = "Luke Zambella" __copyright__ = "Copyright 2016" __version__ = "0.2"
lzambella/Qyoutube-dl
Version.py
Python
gpl-3.0
82
# -*- coding: utf-8 -*- # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Unit tests for ApiHelper functionality""" # pylint: disable=invalid-name from __future__ import absolute_import, division, print_function, unicode_literals import unittest from apihelper import ApiHe...
pietje666/plugin.video.vrt.nu
tests/test_apihelper.py
Python
gpl-3.0
7,764
""" See https://docs.python.org/3/library/itertools.html#itertools-recipes for more cool recipes! See also the toolz project for more cool functional programming helpers: https://github.com/pytoolz/toolz """ import operator as op from collections import defaultdict, deque from collections.abc import Iterator from func...
doctaphred/phredutils
itercools.py
Python
gpl-3.0
12,410
#!/usr/bin/env python # -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2017 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licens...
theochem/horton
tools/harmonics.py
Python
gpl-3.0
9,039
''' Created on Feb 29, 2016 @author: Daniel Rivas ''' from django.db import models from .runs import Run from jsonfield import JSONField import copy from django.template.defaultfilters import first class BaseTrial(models.Model): """ Abstract base class for all trial-data models. These represent a database t...
rivasd/djPsych
djreceive/models/BasicTrials.py
Python
gpl-3.0
7,501
# byteplay: CPython assembler/disassembler # Copyright (C) 2006 Noam Raphael | Version: http://code.google.com/p/byteplay # Rewritten 2009 Demur Rumed | Version: http://github.com/serprex/byteplay # Screwed the style over, modified stack logic to be more flexible, updated to Python 3 # # This...
kreczko/rootpy
rootpy/extern/byteplay3/__init__.py
Python
gpl-3.0
35,468
# -*- coding: utf-8 -*- """ ----------------------------------------------------- File Name: url_path Author: Lucas.wang Date: 2019-02-06 17:10 Description: ----------------------------------------------------- Change Activity: 2019-02-06 17:10 Description: ...
Lucas-Wong/ToolsProject
OperateAD/url_path.py
Python
gpl-3.0
2,101
import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) import math from mimircache.profiler.abstract.abstractLRUProfiler import abstractLRUProfiler class basicLRUProfiler(abstractLRUProfiler): def __init__(self, cache_class, cache_size, bin_size, reader): super().__init__...
Shureed/mimircache
mimircache/profiler/basicLRUProfiler.py
Python
gpl-3.0
746
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-02 07:11 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('bds', '0005_auto_20170402_0620'), ] operations = [ migrations.RemoveField( ...
tremblerz/breach-detection-system
dashboard/bds/migrations/0006_remove_packet_breach_confidence.py
Python
gpl-3.0
400
class LinkedList: def __init__(self): self.first = None self.last = None self.size = 0 def add(self, _data): if self.size == 0: self.first = Entry(_data, None, None) self.last = self.first else: self.last.next = Entry(_data, None, self...
Grouter/linked-list
src/LinkedList.py
Python
gpl-3.0
3,229
# SConsBuildFramework - Copyright (C) 2014, Nicolas Papier. # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation. # Author Nicolas Papier # @todo rename libpng => png class Use_libpng( IUse ): def getName( self ): return 'libpng' def getVer...
npapier/sbf
src/uses/libpng.py
Python
gpl-3.0
482
#!/usr/bin/env python3 import time import random import multiprocessing import dns.message import dns.query import dnstest.server class Inquirer: def __init__(self): self.proc = None def start(self, *args): self.proc = multiprocessing.Process(target=self._query, args=args) self.proc....
jkadlec/knot-dns-zoneapi
tests-extra/tools/dnstest/inquirer.py
Python
gpl-3.0
1,447
"""Jeremy Schulz""" def insertionsort(L,n=None): """implementation of insertionsort with my double-linked list""" if n==None: n=len(L) for x in range(1,n): key = L.get_i(x).getItem() i=x-1 while i>=0 and L.get_i(i).getItem()>key: L.set_i(i+1,L.get_i(i).getItem()) i-=1 L.set_i(i+1,key)
jbs1/programming
insertion.py
Python
gpl-3.0
306
import wsgiref.handlers from google.appengine.ext import webapp import logging from src import config, formatter, handler, storage N_FEED_ENTRIES = 20 class Handler(webapp.RequestHandler): def show(self, output): self.response.out.write(output) def showTemplate(self, pageName, title, extraHead=Non...
fidlej/searchrss
server.py
Python
gpl-3.0
3,027
#!/usr/bin/python """ getunalloc This command is used to extract unallocated space from filesystem when possible. """ import os import fritutils import fritutils.fritlog logger = fritutils.fritlog.loggers['getunallocLog'] def getUnalloc(Evidences): for evi in Evidences: for fs in evi.fileSystems: ...
d-fence/frit
frit/fritcommands/getunalloc.py
Python
gpl-3.0
2,132
# Copyright (C) 2017 The Sipwise Team - http://sipwise.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 version. # # This pr...
sipwise/repoapi
build/test/test_rest.py
Python
gpl-3.0
8,045
class Solution(object): def maxNumber(self, nums1, nums2, k): """ :type nums1: List[int] :type nums2: List[int] :type k: int :rtype: List[int] """ # inspired by StefanPochmann def pick(nums, k): '''pick k number and make it maximal''' ...
zqfan/leetcode
algorithms/321. Create Maximum Number/solution.py
Python
gpl-3.0
866
import module # unique to module import urllib import re import time import random class Module(module.Module): def __init__(self, params): module.Module.__init__(self, params, query='SELECT DISTINCT domain FROM domains WHERE domain IS NOT NULL ORDER BY domain') self.info = { ...
digistam/recon-ng
modules/recon/domains-hosts/google_site_web.py
Python
gpl-3.0
3,409
# -*- coding: utf-8 -*- """ Pinyto cloud - A secure cloud database for your personal data Copyright (C) 2019 Pina Merkert <pina@pinae.net> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either versi...
Pinyto/cloud
api/pinyto_BodyFat/assembly.py
Python
gpl-3.0
4,132
# This file is part of ranger, the console file manager. # License: GNU GPL version 3, see the file "AUTHORS" for details. from __future__ import (absolute_import, division, print_function) from os import devnull from subprocess import PIPE, CalledProcessError from ranger.ext.popen23 import Popen23 ENCODING = 'utf-...
astynax/ranger
ranger/ext/spawn.py
Python
gpl-3.0
2,319
import numpy as np from exact_match import StandardClusterAlignment from pele.utils import rotations from _minpermdist_policies import TransformAtomicCluster, MeasureAtomicCluster __all__ = ["MinPermDistCluster"] class MinPermDistCluster(object): """ Minimize the distance between two clusters. ...
cjforman/pele
pele/mindist/minpermdist_stochastic.py
Python
gpl-3.0
8,666
# -*- coding: utf-8 -*- from telegram.parsemode import ParseMode import blackjack.errors as errors from blackjack.game import BlackJackGame from blackjackbot.commands.util import html_mention, get_game_keyboard, get_join_keyboard, get_start_keyboard, remove_inline_keyboard from blackjackbot.commands.util.decorators i...
d-Rickyy-b/Python-BlackJackBot
blackjackbot/commands/game/commands.py
Python
gpl-3.0
8,235
"""Admin classes for defcon.status.""" from django.contrib import admin from defcon.status import models @admin.register(models.Component) class ComponentAdmin(admin.ModelAdmin): """Admin for Component.""" list_display = ('name', 'link', 'contact') @admin.register(models.Plugin) class PluginAdmin(admin.Mod...
iksaif/defcon
defcon/status/admin.py
Python
gpl-3.0
771
# -*- coding: utf-8 -*- # Copyright (C) 2015 Osmo Salomaa # # 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 pr...
otsaloma/poor-maps
routers/test/test_mapquest_open.py
Python
gpl-3.0
1,065
# pylint: disable=invalid-name from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [('centre_registry', '0005_auto_20150422_1913'), ] operations = [ migrations.AlterField( model_name='oaipmhendpoint', name='web_s...
clarin-eric/Centre-Registry
centre-registry-app/centre_registry/migrations/0006_auto_20150422_1920.py
Python
gpl-3.0
904
# -*- coding: iso-8859-1 -*- # ------------------------------------------------------------ # streamondemand - XBMC Plugin # Conector for videowood.tv # http://www.mimediacenter.info/foro/viewforum.php?f=36 # by DrZ3r0 # ------------------------------------------------------------ import re from core import logger fro...
costadorione/purestream
servers/videowood.py
Python
gpl-3.0
1,969
import urllib2 import bs4 import json #import socks import while using tor #import socket import while using tor from stalker_api.models import * def connectTor(): ''' If you want your http/https conection is through tor. ''' socks.setdefaultproxy( socks.PROXY_TYPE_SOCKS5, "127.0.0.1",905...
divingkite/Stalker
stalker_api/helper_functions.py
Python
gpl-3.0
12,435
# -*- coding: utf-8 *-* # Copyright (c) 2013 Tisserant Pierre # # This file is part of Dragon dice simulator. # # Dragon dice simulator is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either ve...
TheLazyHase/dragon_dice_simulator
business/dice/face/standard/id.py
Python
gpl-3.0
1,996
""" ReducePyROOTHistogram is a base class for classes that create histograms using ROOT. """ # This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus # # MAUS 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 ...
mice-software/maus
src/reduce/ReducePyROOTHistogram/ReducePyROOTHistogram.py
Python
gpl-3.0
11,333
# This file is part of Headphones. # # Headphones 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. # # Headphones is distributed i...
Trixter69/BookMarka
headphones/albumart.py
Python
gpl-3.0
6,477
# Author: Flavien Garcia <flavien.garcia@free.fr> # Sylvain Takerkart <Sylvain.Takerkart@incm.cnrs-mrs.fr> # License: BSD Style. """ Description ----------- This script processes the oidata functions on some selected raw files. The process is decomposed in 2 steps : 1. Model construction from a parameter file...
SylvainTakerkart/vobi_one
examples/scripts_ui_reproducibility/script1_lm_tbin1_sbin2_allalexparams03_script.py
Python
gpl-3.0
5,098
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' Test product features :copyright: (c) 2010-2014 by Openlabs Technologies & Consulting (P) LTD :license: GPLv3, see LICENSE for more details ''' import json import unittest import datetime from decimal import Decimal from dateutil.relativedelta import relat...
aroraumang/nereid-cart-b2c
tests/test_product.py
Python
gpl-3.0
27,190
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import etree import cgi import logging import lxml.html import lxml.html.clean as clean import random import re import socket import threading import time from email.utils import getaddresses, formataddr impor...
QinerTech/QinerApps
openerp/tools/mail.py
Python
gpl-3.0
31,289
#-*-coding=utf-8-*- try: import os from selenium import webdriver from selenium.webdriver import ActionChains #鼠标操作 from selenium.webdriver.common.keys import Keys #键盘操作 from selenium.common.exceptions import NoSuchElementException,TimeoutException #异常 from selenium.webdriver.support.ui import W...
xzdylyh/AT_PH
Scripts/BaseScript.py
Python
gpl-3.0
11,716
from edc_list_data import PreloadData from edc_constants.constants import OTHER, UNKNOWN, NORMAL from .constants import HEADACHE, VISUAL_LOSS list_data = { 'ambition_subject.antibiotic': [ ('flucloxacillin', 'Flucloxacillin'), ('gentamicin', 'Gentamicin'), ('ceftriaxone', 'Ceftriaxone'), ...
botswana-harvard/ambition-subject
ambition_subject/list_data.py
Python
gpl-3.0
4,639
from functools import reduce from itertools import count import operator def d(x): for n in count(1): s = str(n) l = len(s) if x > l: x -= l else: return int(s[x - 1]) def p40(): return reduce(operator.mul, map(lambda i: d(10 ** i), range(7)), 1) pri...
pillowsham/studies
projecteuler/p40.py
Python
gpl-3.0
330
import sys, ConfigParser, os def get_config(config= ConfigParser.RawConfigParser(), file=None): try: try: if file is None: raise config.read(file) except: print "Falling back to default config.ini" config.read(os.path.dirname(os.path.a...
jeremysmitherman/Hoggy2
Hoggy2/utils/__init__.py
Python
gpl-3.0
560
# -*- encoding: utf-8 -*- from . import stock_location
noemis-fr/custom
noemis_change_translation/models/__init__.py
Python
gpl-3.0
55
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext from frappe import _ from frappe.utils import formatdate, format_datetime, getdate, get_datetime, nowdate, flt, cstr from frappe....
Zlash65/erpnext
erpnext/hr/utils.py
Python
gpl-3.0
15,657
""" Spawns a daemon thread that: 1.Receives data from a socket 2.Unpickles if necessary 3.Adds message to a Queue for further processing. Socket data and message Queue are provided by a drone_network.Network object Author: Leonidas Antoniou mail: leonidas.antoniou@gmail.com """ import threading, select, hashlib, s...
LeonNie52/dk-plus
receive_thread.py
Python
gpl-3.0
2,800
from .swiglpk import *
biosustain/swiglpk
swiglpk/__init__.py
Python
gpl-3.0
23
import os, sys def fn_name(): return sys._getframe(1).f_code.co_name try: import gi except ImportError: raise ImportError("Gtk3 backend requires pygobject to be installed.") try: gi.require_version("Gtk", "3.0") except ValueError: raise ImportError( "Gtk3 backend requires the GObject introsp...
alephu5/Soundbyte
environment/lib/python3.3/site-packages/matplotlib/backends/backend_gtk3.py
Python
gpl-3.0
37,436
from http import HTTPStatus from .util import classproperty # pylint: disable=too-few-public-methods class SAFRSRelationshipObject: """ Relationship object, used to emulate a SAFRSBase object for the swagger for relationship targets so we can call the same methods on a relationship target as we do when us...
thomaxxl/safrs
safrs/_safrs_relationship.py
Python
gpl-3.0
1,980
from struct import pack, unpack def pack_header(n, dim): return pack('III', 4, n, dim) if __name__ == '__main__': import sys try: inp = sys.argv[1] indp = sys.argv[2] outp = sys.argv[3] f = file(inp) indf = file(indp) of = file(outp, 'w') except: sys.stderr.write("Usage: subset_record_file.py matrix...
girke-lab/chemmine-ei
src/euclidean-search/subset_record_file.py
Python
gpl-3.0
743
"""Logic for managing user API keys and other minuta. Copyright (C) 2014 A. Samuel Pottinger ("Sam Pottinger", gleap.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 Lice...
Samnsparky/cdibase
prog_code/util/api_key_util.py
Python
gpl-3.0
3,470
############################################################################# ## ## ## This file is part of Owade : www.owade.org ## ## Offline Windows Analyzer and Data Extractor ## ## ...
CarlosLannister/OwadeReborn
owade/fileAnalyze/historyIE.py
Python
gpl-3.0
3,094
import os [os.rename(f, f.replace('.png', '_tr.png')) for f in os.listdir('.')] #rename files inside the current working directory
aolgac/fileoperations
rename.py
Python
gpl-3.0
131
#!/usr/bin/python3 ## Copyright (C) 2016 D S Pavan Kumar ## dspavankumar [at] gmail [dot] 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 ## ...
dspavankumar/keras-kaldi
steps_kt/train.py
Python
gpl-3.0
3,767
# pylint: disable=missing-module-docstring, missing-class-docstring from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('rdrhc_calendar', '0002_auto_20171003_2051'), ] operations = [ migrations.RenameModel( ...
studybuffalo/studybuffalo
study_buffalo/rdrhc_calendar/migrations/0003_auto_20171003_2104.py
Python
gpl-3.0
944
# -*- coding: utf-8 -*- """ Copyright (c) 2015 Federico Vaga <federico.vaga@gmail.com> License GNU Public License v3 """ # KDE from PyQt4 import QtCore, QtGui from PyQt4.QtCore import Qt, SIGNAL, QTime, pyqtSignature, QString from PyQt4.QtGui import QGraphicsLinearLayout from PyKDE4.plasma import Plasma from PyKDE4 i...
FedericoVaga/plasmoggl
contents/code/plasmoggl.py
Python
gpl-3.0
8,846
# -*- coding: latin1 -*- ################################################################################################ # # import snap, datetime, sys, time, json, os, os.path, shutil, time, random, math import numpy as np from math import* from scipy.stats.stats import pearsonr reload(sys) sys.setdefaultencod...
amaurywalbert/twitter
net_structure/multilayer/unweighted_directed/hashmap_calc_nodes_correlation_v1.py
Python
gpl-3.0
6,326
#!python3 import os import sys import fnmatch import shutil import subprocess PYTEST = "pytest" FLAKE8 = "flake8" BLACK = "black" BLACK_FLAGS = ["-l", "79"] PYGETTEXT = os.path.join(sys.base_prefix, "tools", "i18n", "pygettext.py") INCLUDE_PATTERNS = {"*.py"} EXCLUDE_PATTERNS = { "build/*", "docs/*", "mu/...
ntoll/mu
make.py
Python
gpl-3.0
10,354
# # Count the number of unique paths from a[0][0] to a[m-1][n-1] # We are allowed to move either right or down from a cell in the matrix. # Approaches- # (i) Recursion- Recurse starting from a[m-1][n-1], upwards and leftwards, # add the path count of both recursions and return count. # (ii) Dynamic Progr...
marcosfede/algorithms
matrix/count_paths.py
Python
gpl-3.0
1,150
from django import forms class ArticleForm(forms.Form): title = forms.CharField(label="标题" ,max_length=100) content = forms.CharField(label="内容" ,max_length=10000)
zhangvs1988/zhangyl-Djangodemo
article/forms.py
Python
gpl-3.0
182
#-*- coding: utf-8 -*- # 格式:\033[显示方式;前景色;背景色m # 说明: # # 前景色 背景色 颜色 # --------------------------------------- # 30 40 黑色 # 31 41 红色 # 32 42 绿色 # 33 43 黃色 # 3...
qiuyingtao/kid-addition-subtraction
style.py
Python
gpl-3.0
3,971
from __future__ import with_statement from lofar.parmdb import parmdb from argparse import ArgumentTypeError def list_stations(parmdb, pattern=''): """ Get a sorted list of all the station names, without prepending polarisation Information, Can be called with a path or an instantiated parmdb ...
jjdmol/LOFAR
CEP/Pipeline/recipes/sip/helpers/WritableParmDB.py
Python
gpl-3.0
2,316
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
sio2project/oioioi
oioioi/submitservice/migrations/0001_initial.py
Python
gpl-3.0
792
#!/usr/bin/python # -*- coding: utf-8 -*- # question10.py ''' @since: 2014-12-09 @author: Javier Garcia @contact: javier.garcia@bskapital.com @summary: How many violations of the style guidelines for PoC and AlgTh does this code snippet contain? Enter the number of violations of these guide...
JavierGarciaD/Algorithmic_Thinking
capstone/question10.py
Python
gpl-3.0
630
from django.shortcuts import render, redirect, get_object_or_404 from django.http import Http404, HttpResponse from django.utils.translation import ugettext_lazy as _ from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied, Suspiciou...
papedaniel/oioioi
oioioi/portals/views.py
Python
gpl-3.0
8,373
# -*- coding: utf-8 -*- from PyQt4 import QtGui from miles import frm_gridv from tables import tables if __name__ == '__main__': from sys import argv, exit tbl = tables['eid'] app = QtGui.QApplication(argv) form = frm_gridv.Fgridv(tables, 'invd', ...
tedlaz/pyted
pymiles/miles_tst/tst_fgridv.py
Python
gpl-3.0
462
import os from collections import defaultdict from isca.loghandler import log _module_directory = os.path.dirname(os.path.realpath(__file__)) try: GFDL_BASE = os.environ['GFDL_BASE'] GFDL_WORK = os.environ['GFDL_WORK'] GFDL_DATA = os.environ['GFDL_DATA'] except Exception as e: lo...
jamesp/Isca
src/extra/python/isca/__init__.py
Python
gpl-3.0
2,926
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-31 09:21 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('survey', '0012_auto_20160531_1120'), ('survey', '0012_auto_20160531_1116'), ] operat...
simonspa/django-datacollect
datacollect/survey/migrations/0013_merge.py
Python
gpl-3.0
335
# -*- coding: utf-8 -*- __author__ = 'ogaidukov' # -*- coding: utf-8 -*- __all__ = ['transparent_image', 'alert_image'] import base64 # 1x1 transparent GIF transparent_image_base64 = 'R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' # 32x32 alert icon PNG alert_image_base64 = 'iVBORw0KGgoAAAANSUhEUgAAACA...
olegvg/me-advert
me-advert/rotabanner/lib/resource.py
Python
gpl-3.0
3,281
import sys import os import resource import faulthandler faulthandler.enable() for param in os.environ.keys(): os.write(2, str("%20s %s\n" % (param,os.environ[param])).encode()) import requests import json import textwrap import time host = 'http://192.168.116.128:8998' data = {'kind': 'spark'} headers = {'Conten...
ng310285/blog
spark/teradata_test/spark_script.py
Python
gpl-3.0
708
############################################################################## # # Copyright (c) 2004 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
Donkyhotay/MoonPy
zope/app/site/tests/test_deprecation.py
Python
gpl-3.0
1,522
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AreaConfiguration.ts_precipitation' db.add_column('lizard_wbconfiguration_areaconfiguratio...
lizardsystem/lizard-wbconfiguration
lizard_wbconfiguration/migrations/0026_auto__add_field_areaconfiguration_ts_precipitation__add_field_areaconf.py
Python
gpl-3.0
40,251
from scaler_base import * import numpy as np class ThermodynamicScaler(ScalerBase): """Scaler which uses temperature/pressure/potential as descriptors and treates energetics as a constant""" def __init__(self,reaction_model): ScalerBase.__init__(self,reaction_model) def get_electronic_energie...
ajmedford/catmap
catmap/scalers/thermodynamic_scaler.py
Python
gpl-3.0
3,855
from .action import * from .menu import *
dsparrow27/zoocore
zoo/libs/pyqt/extended/searchablemenu/__init__.py
Python
gpl-3.0
41
# -*- coding: utf-8 -*- from __future__ import absolute_import from .filesystem import FilesystemHelper class DictableMixin(object): """ A mixin class for providing the to_dict method. """ # Class Members # Instantiation # Static Methods # Class Methods # Public Methods def ...
lavalamp-/ws-backend-community
lib/mixin.py
Python
gpl-3.0
12,529
# -*- coding: utf-8 -*- from odoo import models, fields, api class customAccountPayment(models.Model): _inherit = 'account.payment' @api.model def default_get(self, fields): rec = super(customAccountPayment, self).default_get(fields) invoice_defaults = self.resolve_2many_...
hgsoft/hgsoft-addons
custom_account_payment_v11/models/account_payment.py
Python
gpl-3.0
711
import Hoggy2.meta as meta from sqlalchemy import Column, Integer, String, Text, Float class Time(meta.base): __tablename__ = "times" name = Column(String, primary_key=True) time = Column(Float) @classmethod def get_by_name(cls, name): try: return meta.session.query(cls).filter...
jeremysmitherman/Hoggy2
Hoggy2/models/time.py
Python
gpl-3.0
589
# # (C) Copyright L.P.Klyne 2013 # """This is based on the basic ssh server example, the protocol handler has been pulled out as a separate source as this is where the logic for the console server sits. """ import logging _log = logging.getLogger(__name__) import os import grp from zope.interface import implements fr...
LawrenceK/console-server
consoleserver/ssh.py
Python
gpl-3.0
4,049
#!/usr/bin/env python import collections import os import textwrap import unittest from cohesion import filesystem from pyfakefs import fake_filesystem_unittest class TestFilesystem(fake_filesystem_unittest.TestCase): def setUp(self): self.setUpPyfakefs() def tearDown(self): # It is no lo...
mschwager/cohesion
tests/test_filesystem.py
Python
gpl-3.0
2,264
# -*- coding:utf-8 -*- # ---------------------------------------------------------------------- # Copyright 2016 Juergen Probst; Copyright 2009 Seyed Hessam Moosavi Mehr # # This file is part of pyMPB. # # pyMPB is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
probstj/pyMPB
pympb/utility.py
Python
gpl-3.0
36,805
# -*- coding: utf-8 -*- import scrapy from scrapy.http import Request, FormRequest from scrapy.spiders import CrawlSpider from alexscrapper.items import * from datetime import datetime from scrapy.conf import settings import urllib import csv import json import re from datetime import datetime, timedelta from dateutil...
GaneshPandey/alex-scraper
alexscrapper/spiders/choiceprivilegesmall_spider.py
Python
gpl-3.0
2,913
from PyQt5.QtCore import Qt from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QWidget, QVBoxLayout, QGroupBox, QCheckBox, QListWidget, QPushButton from umlfri2.application import Application from umlfri2.types.version import Version class SettingsDialogUpdates(QWidget): def __init__(self, dialog): ...
umlfri/umlfri2
umlfri2/qtgui/appdialogs/settings/updates.py
Python
gpl-3.0
2,840
""" Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... For example, given nums = [3, 5, 2, 1, 6, 4], one possible answer is [1, 6, 2, 5, 3, 4]. Show Company Tags Show Tags Show Similar Problems """ class Solution(object): def wiggleSort(self, nums): "...
dichen001/Go4Jobs
JackChen/Google/280. Wiggle Sort.py
Python
gpl-3.0
588
# coding = utf-8 # 把输入的 str 标准化 # 也就是首字母大写,其他小写 from functools def Normalize(*name): for n in name : return # 求 积 def prod(L) : # 字符串到浮点 def str2float(s):
BobDengue/PythonLearn
src/Lesson17_Map&Reduce_Normalize.py
Python
gpl-3.0
231
from flask import render_template, flash, redirect, session, url_for, request, g from flask_login import login_user, logout_user, current_user, login_required from app import app, db, lm from .forms import LoginForm, SignupForm from .models import User from .modules.models import Module from .planes.models import Sessi...
ashlaban/m7011e-planeshift
app/views.py
Python
gpl-3.0
3,067
"""Provides data for the flowers dataset. The dataset scripts used to create the dataset can be found at: slim/datasets/download_and_convert_flowers.py """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from datasets import dataset_utils import os import...
iAInNet/tensorflow_in_action
slim/datasets/flowers.py
Python
gpl-3.0
2,578
# This file is part of Gajim. # # Gajim 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; version 3 only. # # Gajim is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
gajim/gajim
gajim/common/modules/roster.py
Python
gpl-3.0
6,045
from django.conf import settings class MetaInformationManager(object): cache = {} def get_metatags(self, path): if path in self.cache: return self.cache[path] info = self.cache[path] = MetaInformation() return info class MetaInformation(object): objec...
thepian/theapps
theapps/supervisor/meta.py
Python
gpl-3.0
624
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWpy. # # GWpy 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 ...
andrew-lundgren/gwpy
gwpy/frequencyseries/core.py
Python
gpl-3.0
12,452
from django.conf.urls import include, url from django.contrib import admin from coworkok import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^accounts/', include('accounts.urls', namespace='accounts')), url(r'^cowork/', include('cowork.urls', namespace='cowork')), ur...
dook/coworkok
coworkok/urls.py
Python
gpl-3.0
363
from vsg import deprecated_rule class rule_018(deprecated_rule.Rule): ''' This rule has been renamed to `generic_map_006 <generic_map_rules.html#generic-map-006>`_. ''' def __init__(self): deprecated_rule.Rule.__init__(self, 'instantiation', '018') self.message.append('Rule ' + self....
jeremiah-c-leary/vhdl-style-guide
vsg/rules/instantiation/rule_018.py
Python
gpl-3.0
378
import pymel.all as pm import traceback from collections import namedtuple as NamedTuple class Duck(object): pass class MmmmQuickMenus( object ): ## __init__ runs as soon as we start the cube maker ## we almost always put a reference to self in ## def __init__(self): self.setupNamedTuple...
joetainment/mmmmtools
MmmmToolsMod/Dynamic/QuickMenus.py
Python
gpl-3.0
7,596
# Permissions for OurPost, an example from django.db import models from apps.plus_permissions.models import SetSliderOptions, SetAgentSecurityContext, SetAgentDefaults, SetPossibleTypes, SetSliderAgents from apps.plus_permissions.interfaces import InterfaceReadProperty, InterfaceWriteProperty, InterfaceCallProperty ...
thehub/hubplus
apps/plus_permissions/types/OurPost.py
Python
gpl-3.0
1,695
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import datetime import os.path import time from fabric.api import (run, env, task, settings, hosts, open_shell, cd, local, with_settings, abort) from fabric import colors from fabric.contrib.files import exists, u...
simodalla/pg_harep_lab
fabfile.py
Python
gpl-3.0
40,313
import os import shutil from collections import namedtuple from unittest import TestCase import numpy as np from nose.tools import assert_true from core.handlers.serializers.plot_serializer import PlotSerializer __author__ = "Guido Pio Mariotti" __copyright__ = "Copyright (C) 2016 Guido Pio Mariotti" __license__ = "...
gmariotti/lassim
test/core/handlers/serializers/test_plot_serializer.py
Python
gpl-3.0
1,546
"""3.2 : Add mention to tva Revision ID: 1cf6d10d40cf Revises: 3c1321f40c0c Create Date: 2016-04-12 15:26:57.422710 """ # revision identifiers, used by Alembic. revision = '1cf6d10d40cf' down_revision = '3c1321f40c0c' from alembic import op import sqlalchemy as sa def upgrade(): op.execute(u"Alter table tva m...
CroissanceCommune/autonomie
autonomie/alembic/versions/3_2_add_mention_to_tva_1cf6d10d40cf.py
Python
gpl-3.0
932
# rFactorTools GUI # Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
Grumbel/rfactortools
rfactortools/gui/main_window.py
Python
gpl-3.0
11,884
# -*- coding: utf-8 -*- """ """ # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. import json from pyoko.conf import settings import pika import time from pika.exceptions import ConnectionClosed, ChannelClosed from zengine.lib...
zetaops/zengine
zengine/client_queue.py
Python
gpl-3.0
2,811