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
import logging class UrlProvider: def __init__(self, universe, country): self.main_url = 'https://s' + str(universe) + '-' + country + '.ogame.gameforge.com/game/index.php' self.logger = logging.getLogger('ogame-bot') self.pages = { 'overview': self.main_url + '?page=overview...
yosh778/OG-Bot
ogbot/scraping/util.py
Python
mit
1,721
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_profile_http2 sho...
F5Networks/f5-ansible-modules
ansible_collections/f5networks/f5_modules/plugins/modules/bigip_profile_http2.py
Python
mit
20,741
from collections import namedtuple def game(): # 元组拆包 a, b, *rest = range(5) print(a, b, rest) a, b, *rest = range(2) print(a, b, rest) a, *body, c, d = range(5) print(a, body, c, d) *head, b, c, d = range(5) print(head, b, c, d) # 具名元组 page_26 City = namedtuple('City',...
hugoxia/Python
FluentPython/chapter_2/sequence.py
Python
mit
919
""" ONE-TIME UPDATE OF converting SubredditPage.created_at, FrontPage.created_at to utc Daylight Savings Time = Nov 6 2am if we see the ET time Nov 6 12am, then it is EDT: EDT-->UTC = +4 = Nov 6 4am if we see the ET time Nov 6 1-2am, then it is unclear whether it is EDT or EST; assume it is EST > assumption is bec...
c4fcm/CivilServant
utils/data_migrations/12.06.2016.updated_page_created_at_to_utc.py
Python
mit
2,850
#!/usr/bin/env jython from __future__ import with_statement from contextlib import contextmanager import logging from plugins import __all__ log = logging.getLogger('kahuna') class PluginManager: """ Manages available plugins """ def __init__(self): """ Initialize the plugin list """ self.__...
nacx/kahuna
kahuna/pluginmanager.py
Python
mit
2,347
# coding: utf-8 import requests _IFTTT_URL = 'https://maker.ifttt.com/trigger/{event}/with/key/{key}' class IFTTTNotifier: def __init__(self, key, event_name): self._key = key self._timeout = 5 self._event = event_name def trigger(self, **kwargs): return self._trigger(self....
alviezhang/laputa
laputa/notify.py
Python
mit
1,042
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Python Telegram bot for the Perkins Light Project """ from telegram.ext import Updater, CommandHandler import telegram import logging import time from controller import * from color import * from solid_animation import * from fade_animation import * # Enable loggin...
bitoffdev/perkins-blues
interfaces/telegram/interface.py
Python
mit
7,601
import irc3 from toolbot.adapter import Adapter from toolbot.message import ( TextMessage, EnterMessage, LeaveMessage, TopicMessage) @irc3.plugin class Irc3ToToolbot: requires = ['irc3.plugins.core', ] def __init__(self, bot): self.bot = bot @irc3.event(irc3.rfc.PRIVMSG) def...
tgerdes/toolbot
toolbot/adapter/irc.py
Python
mit
3,433
from . import filter from click import testing as click_testing from grow.testing import testing import unittest class FilterTestCase(unittest.TestCase): def setUp(self): self.test_pod_dir = testing.create_test_pod_dir() self.runner = click_testing.CliRunner() def test_filter(self): args = [self.tes...
codedcolors/pygrow
grow/commands/filter_test.py
Python
mit
892
"""Run all of the tests.""" import sys import unittest2 as unittest def main(args=None): unittest_dir = '.' unittest_suite = unittest.defaultTestLoader.discover(unittest_dir) kwargs = {} if args and '-v' in args: kwargs['verbosity'] = 2 runner = unittest.TextTestRunner(sys.stdout, "Unitte...
laurentluce/lfu-cache
lfucache/test/all_tests.py
Python
mit
539
# app/informes/views.py # coding: utf-8 from flask import redirect, render_template, url_for, request from flask_login import current_user, login_required from app.informes import informes from app.informes.forms import FiltroInformePersonas from app import db from app.models import Miembro, EstadoCivil, TipoFamilia...
originaltebas/chmembers
app/informes/views.py
Python
mit
42,730
#!flask/bin/python # This script upgrades the database version to one version above the current # version. from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO api.upgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) print "Current database vers...
dharmit/microblog
db_upgrade.py
Python
mit
407
import pytest from selenium import webdriver from selenium.webdriver.common.keys import Keys @pytest.fixture(scope='function') def browser(request): browser_ = webdriver.Firefox() def fin(): browser_.quit() request.addfinalizer(fin) return browser_ def test_can_show_a_relevant_code_snippet...
jvanbrug/scout
functional_tests.py
Python
mit
1,460
"""Bootstrap""" from __future__ import absolute_import, unicode_literals import logging import os import sys from operator import eq, lt from virtualenv.util.path import Path from virtualenv.util.six import ensure_str from virtualenv.util.subprocess import Popen, subprocess from .bundle import from_bundle from .util...
TeamSPoon/logicmoo_workspace
packs_web/butterfly/lib/python3.7/site-packages/virtualenv/seed/wheels/acquire.py
Python
mit
4,426
# parsetab.py # This file is automatically generated. Do not edit. _tabversion = '3.2' _lr_method = 'LALR' _lr_signature = '\x91\x95\xa5\xf7\xe0^bz\xc0\xf4\x04\xf9Z\xebA\xba' _lr_action_items = {'NAME':([0,2,5,7,11,12,13,14,],[1,8,8,8,8,8,8,8,]),')':([3,8,9,10,16,17,18,19,20,],[-9,-10,-7,16,-8,-4,-3,-5,-6,]),'(...
quchunguang/test
testpy/parsetab.py
Python
mit
2,575
from main import * def palindrome_chain_length(n): count = 0 while True: reversed_n = reverse_order(n) if is_palindrome(n, reversed_n): return count n += reversed_n count += 1 def reverse_order(n): return int("".join([i for i in list(str(n)[::-1])])) def is_...
bionikspoon/Codewars-Challenges
python/5kyu/palindrome_chain_length/solution.py
Python
mit
612
""" benchmark.py provides functions for various evaluation tasks in this work """ import collections import sys import munkres import numpy as np def evaluation(fact, detection): """classify the detections into true positive, true negative, false positive and false negative Args: fact (list of int): ...
WenqinSHAO/rtt
localutils/benchmark.py
Python
mit
18,510
# -*- coding: utf-8 -*- from sqlalchemy import Column, desc, func from sqlalchemy.orm import backref from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from extensions import db, cache from utils import get_current_time from constants import USER, USER_ROLE, ...
rtx3/deyun.io
smwds/api/models.py
Python
mit
8,469
#!/usr/bin/env python3 lines = [] with open('input.txt', 'r') as f: lines = f.read().splitlines() #--- challenge 1 def get_trees(lines, right, down): trees = 0 pos = 0 line_len = len(lines[0]) for line in lines[down::down]: if (pos + right) >= line_len: pos = right - (line_len - pos) else:...
jekhokie/scriptbox
python--advent-of-code/2020/3/solve.py
Python
mit
757
""" Support for the Netatmo devices (Weather Station and Welcome camera). For more details about this platform, please refer to the documentation at https://home-assistant.io/components/netatmo/ """ import logging from urllib.error import HTTPError from homeassistant.const import ( CONF_API_KEY, CONF_PASSWORD, CON...
mikaelboman/home-assistant
homeassistant/components/netatmo.py
Python
mit
1,792
from starcluster.clustersetup import ClusterSetup from starcluster.logger import log class RootInstaller(ClusterSetup): def run(self, nodes, master, user, user_shell, volumes): for node in nodes: log.info("Installing Root 6.04/14 on %s " % (node.alias)) node.ssh.execute('mkdir -p /opt/software/root') node....
meissnert/StarCluster-Plugins
root_6_04_14.py
Python
mit
1,099
import datetime class Item(object): def __init__(self, item): self.title = item['title'].encode("utf-8") self.url = self.get_starred_url(item) self.content = self.get_content(item) self.datestamp = item['published'] self.date = datetime.datetime.fromtimestamp(self.datestamp).strftime('%m-%Y') def gens...
kamiben/starred
item.py
Python
mit
1,978
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/connectivity_issue.py
Python
mit
2,121
from templeplus.pymod import PythonModifier from toee import * import tpdp import char_class_utils import tpactions ################################################### def GetConditionName(): return "Abjurant Champion" def GetSpellCasterConditionName(): return "Abjurant Champion Spellcasting" print "Registering ...
GrognardsFromHell/TemplePlus
tpdatasrc/tpgamefiles/scr/tpModifiers/abjurant_champion.py
Python
mit
13,175
from helper import greeting if "__name__" == "__main__": greeting('blarg')
jay4ek/cs3240-labdemo
blarg.py
Python
mit
76
import math import random import struct import GLWindow import ModernGL # Window & Context wnd = GLWindow.create_window() ctx = ModernGL.create_context() tvert = ctx.vertex_shader(''' #version 330 uniform vec2 acc; in vec2 in_pos; in vec2 in_prev; out vec2 out_pos; out vec2 out_prev; ...
cprogrammer1994/ModernGL
examples/old-examples/GLWindow/particle_system.py
Python
mit
1,710
import process_data # process_data.process_concord(data_folder, output_folder) # process_data.process_country(data_folder, output_folder) # process_data.process_district(data_folder, output_folder) # process_data.process_enduse(data_folder, output_folder) # process_data.process_exp_comm(data_folder, output_folder) # p...
YangLiu928/NDP_Projects
Python_Projects/Python_MySQL/compare_FTD_code/scripts/merchandise_trade_exports.py
Python
mit
1,458
# Download the Python helper library from twilio.com/docs/python/install import os from twilio.rest import Client from datetime import datetime # Your Account Sid and Auth Token from twilio.com/user/account # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] au...
TwilioDevEd/api-snippets
sync/rest/documents/create-document/create-document.7.x.py
Python
mit
864
import os import codecs from ni.core.workspace import load_workspace def load_settings_from_file(filename, klass): settings = klass(filename) try: fle = open(filename) try: fields = set(settings.fields) for line in fle.readlines(): try: ...
lerouxb/ni
editors/base/settings.py
Python
mit
4,527
#!/usr/bin/env python #coding: utf8 #get the list of the scanned election results papers ( proces verbaux ) # sudo apt-get install python-setuptools # easy_install beautifulsoup4 import urllib2 from bs4 import BeautifulSoup from string import maketrans from string import whitespace import csv import time import json...
radproject/protocols
script.py
Python
cc0-1.0
3,299
import os from unittest import TestCase from click.testing import CliRunner from regparser.commands.clear import clear from regparser.index import entry class CommandsClearTests(TestCase): def setUp(self): self.cli = CliRunner() def test_no_errors_when_clear(self): """Should raise no errors...
cmc333333/regulations-parser
tests/commands_clear_tests.py
Python
cc0-1.0
2,301
"""flex_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
twerp/django-admin-flexselect-py3
flex_project/urls.py
Python
cc0-1.0
816
# Copyright (c) 2014-2015 by Ron Frederick <ronf@timeheart.net>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
nchammas/asyncssh
asyncssh/crypto/pyca/rsa.py
Python
epl-1.0
2,084
""" A formulation in original variables of a wedding seating problem Authors: Stuart Mitchell 2010 """ import pulp try: import path except ImportError: pass try: import src.dippy as dippy from src.dippy import DipSolStatOptimal except ImportError: import coinor.dippy as di...
tkralphs/Dip
Dip/src/dippy/examples/wedding/wedding.py
Python
epl-1.0
5,083
# -*- encoding: utf-8 -*- """ Module that defines an internal cache for managing processes and accesses through threads. """ from __future__ import unicode_literals import threading from mongoengine import DoesNotExist __all__ = ['cache'] THREAD_NAMESPACE = threading.local() class Cache(object): """ Cache...
PeRDy/django-audit-tools
audit_tools/audit/cache.py
Python
gpl-2.0
2,088
# -*- coding: 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 'MetricType.unit' db.add_column(u'schools_metrictype', 'unit', self.gf(...
formicablu/digischool
schools/migrations/0004_auto__add_field_metrictype_unit.py
Python
gpl-2.0
2,337
# -*- coding: utf-8 -*- # # Copyright 2017-2020 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 # ...
unioslo/cerebrum
Cerebrum/modules/no/uio/randsone_ldif.py
Python
gpl-2.0
1,562
# Autogenerated with SMOP version 0.23 # main.py ../../assessing-mininet/MATLAB/load_function.m ../../assessing-mininet/MATLAB/process_complete_test_set.m ../../assessing-mininet/MATLAB/process_single_testfile.m ../../assessing-mininet/MATLAB/ProcessAllLogsMain.m from __future__ import division from numpy import arang...
yossisolomon/assessing-mininet
matlab-to-python.py
Python
gpl-2.0
7,459
import traceback from util import * import importlib class DefaultLoader(object): def __init__(self): self.fixtures = {} def load(self, name): org_name = name fixture = self.fixtures.get(name) if fixture: print 'already exists, return' return fixture ...
epronk/pyfit2
engines.py
Python
gpl-2.0
3,171
#-*- coding:utf-8 -*- import dircache, os, math, sys from PIL import Image from psd_tools import PSDImage from psd_tools import Group import json class Rectangle: x = 0 y = 0 width = 0 height = 0 offX = 0 offY = 0 origin_width = 0 origin_height = 0 arena = 0 def __init__(self): self.name = ""...
hookehu/utility
max_rects_bin_pack.py
Python
gpl-2.0
22,454
# Copyright (C) 2010, One Laptop Per Child # Copyright (C) 2010, Kushal Das # # 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 ver...
godiard/pathagar
books/epubinfo.py
Python
gpl-2.0
3,947
# -*- coding: utf-8 -*- """ Ozone Bricklet Plugin Copyright (C) 2015 Olaf Lüke <olaf@tinkerforge.com> ozone.py: Ozone Bricklet Plugin Implementation 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; e...
D4wN/brickv
src/brickv/plugin_system/plugins/ozone/ozone.py
Python
gpl-2.0
3,949
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import os, sys print 3 < 4 < 6, "3 < 4 < 6" print 3 >= 5, "3 >= 5" print 4 == 4, "4 == 4" print 4 != 4, "4 != 4" for i, j in (0, 0), (0, 1), (1, 0), (1, 1): print i, j, ":", i & j, i | j, i ^ j pi = 3.1415926535897931 print pi ** 40
dtulyakov/py
intuit/test7.py
Python
gpl-2.0
281
__author__ = 'eran' import numpy as np import matplotlib.pyplot as plt from scipy import ndimage from scipy.signal import convolve2d def down_sample(img_data): img_data = img_data[:img_data.shape[0]-img_data.shape[0] % 2, :img_data.shape[1]-img_data.shape[1] % 2, :] img_data = img_data[::2, ::2, :] return...
eranroz/heocr
image_extractor.py
Python
gpl-2.0
2,439
# hgversion.py - Version information for Mercurial # # Copyright 2009 Steve Borho <steve@borho.org> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. import re try: # post 1.1.2 from mercurial import util h...
seewindcn/tortoisehg
src/tortoisehg/util/hgversion.py
Python
gpl-2.0
1,003
#!/usr/bin/python # -*- coding: utf-8 -*- import MySQLdb import MySQLdb.cursors class GameMysql(): def __init__(self,host,port,user,pwd): try: print host,port,user,pwd self.__conn = MySQLdb.connect(host = host,port = port,user = user,passwd = pwd) self.__cursor = self.__conn.cursor() except Exception,e...
firekillice/python-mysql-flushdata
gamemysql.py
Python
gpl-2.0
2,372
# pygsear # Copyright (C) 2003 Lee Harr # # # This file is part of pygsear. # # pygsear 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....
davesteele/pygsear-debian
examples/bezier.py
Python
gpl-2.0
6,324
# -*- coding: utf-8 -*- """ 扫描周围无线网络,列出SSID and mac address 开启网卡监听模式(mon),侦听无线网络流量 开启/关闭 监听模式 >sudo airmon-ng start/stop wlan0 找回网络管理图标 >NetworkManager start """ import sys from scapy.all import * from argparse import ArgumentParser def packet_handler(pkt): ap_list = [] if pkt.haslayer(Dot11): if...
hxer/exercise
scapy/scanwifi.py
Python
gpl-2.0
1,014
# -*- python -*- # -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011-2016 Serge Noiraud # # 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 ver...
gramps-project/gramps
gramps/plugins/view/geofamily.py
Python
gpl-2.0
22,744
""" Get inverter pv values via modbus 2018-12-28 Tommi2Day 2020-09-22 Tommi2Day fixes empty data exeptions 2021-01-02 sellth added support for multiple inverters Configuration: pip3 install pymodbus [FEATURE-pvdata] # How frequently to send updates over (defaults to 20 sec) min_u...
datenschuft/SMA-EM
features/pvdata.py
Python
gpl-2.0
3,769
# -*- coding: utf-8 -*- """ *************************************************************************** GrassAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ************************...
luca76/QGIS
python/plugins/processing/algs/grass/GrassAlgorithm.py
Python
gpl-2.0
23,620
__author__ = 'Dani' import ijson import json PG_SCORE = "pg_score" INCOMING_EDGES = "in_edges" OUTCOMING_EDGES = "out_edges" LABEL = "label" DESCRIPTION = "desc" class CommonIncomingCommand(object): def __init__(self, source_dump_file, out_file, source_target_ids_file, topk_target_entities): ...
DaniFdezAlvarez/wikidataExplorer
wikidata_exp/wdexp/wikidata/commands/common_incoming_props_DUMP.py
Python
gpl-2.0
5,792
import matplotlib.pyplot as plt import numpy as np import streamingpickle as spkl import math from scipy import stats ''' This program reads all spkl files, then sorts the alphas in to CS and off, and takes the absolute values of all alphas. The upper cut off is 90 (set to 90) and the lower cut off is 5 (set to 0). The...
walste/Fish-VR
auxiliary/CS_vs_off_all_files.py
Python
gpl-2.0
2,987
# -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; truncate-lines: 0 -*- # vi: set fileencoding=utf-8 filetype=python expandtab tabstop=4 shiftwidth=4 softtabstop=4 cindent: # :mode=python:indentSize=4:tabSize=4:noTabs=true: #-----------------------------------------------------...
luksan/kodos
modules/flags.py
Python
gpl-2.0
1,969
import rubber.module_interface class Module (rubber.module_interface.Module): def __init__ (self, document, opt): document.program = 'xelatex' document.engine = 'XeLaTeX' document.register_post_processor (old_suffix='.pdf', new_suffix='.pdf')
skapfer/rubber
src/latex_modules/xelatex.py
Python
gpl-2.0
273
import ipdb import numpy as np import theano from cle.cle.cost import NllBin from cle.cle.data import Iterator from cle.cle.models import Model from cle.cle.layers import InitCell from cle.cle.layers.feedforward import FullyConnectedLayer from cle.cle.layers.recurrent import LSTM from cle.cle.train import Training fro...
ruohoruotsi/Wavelet-Tree-Synth
nnet/VRNN_nips2015/cle/tutorials/music.py
Python
gpl-2.0
3,945
# -*- coding: utf-8 -*- # Pluggable PayPal NVP (Name Value Pair) API implementation for Django. # This file includes the PayPal driver class that maps NVP API methods to such # simple functions. # Feel free to distribute, modify or use any open or closed project without # any permission. # Author: Ozgur Vatansever #...
leepa/django-paypal-driver
paypal/driver.py
Python
gpl-2.0
14,675
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__,'MD4.so') del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
noba3/KoTos
addons/plugin.video.mega/resources/lib/platform_libraries/Linux/64bit/Crypto/Hash/MD4.py
Python
gpl-2.0
254
# SVC library - usefull Python routines and classes # Copyright (C) 2006-2008 Jan Svec, honza.svec@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, o...
jurcicek/extended-hidden-vector-state-parser
svc/ui/cdc/treedist.py
Python
gpl-2.0
23,841
from extract_feature_lib import * from sys import argv from dga_model_eval import * from __init__ import * def clear_cache(index, cache): print "clear cache", index for tmp in cache: client[db_name][coll_name_list[index]+"_matrix"].insert(cache[tmp]) def extract_domain_feature(index): #cursor = ...
whodewho/FluxEnder
src/extract_feature.py
Python
gpl-2.0
3,943
class EventSearchPageLocators(object): NAME_FIELD = ".form-control[name='name']" START_DATE_FIELD = ".form-control[name='start_date']" END_DATE_FIELD = ".form-control[name='end_date']" CITY_FIELD = ".form-control[name='city']" STATE_FIELD = ".form-control[name='state']" COUNTRY_FIELD = ".form-c...
systers/vms
vms/pom/locators/eventSearchPageLocators.py
Python
gpl-2.0
481
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, MySQLdb, csv table_sql = """drop table if exists hotel; create table hotel( id int primary key, Name varchar(255), CardNo varchar(255), Descriot varchar(255), CtfTp varchar(255), CtfId varchar(255), Gender varchar(255), Birthday v...
aaronzhang1990/workshare
test/python/restore_hotel_2000w_data.py
Python
gpl-2.0
2,060
#!/usr/bin/python # # # Copyright 2012-2019 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 Res...
gppezzi/easybuild-framework
test/framework/suite.py
Python
gpl-2.0
4,872
import ast from typing import Any, Dict, List, Optional from flask import g, json from flask_wtf import FlaskForm from openatlas.database.gis import Gis as Db from openatlas.models.entity import Entity from openatlas.models.imports import Project from openatlas.models.node import Node from openatlas.util.util import ...
craws/OpenAtlas-Python
openatlas/models/gis.py
Python
gpl-2.0
7,414
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado # # (pacoqueen@users.sourceforge.net) # # ...
pacoqueen/bbinn
informes/albaran_multipag.py
Python
gpl-2.0
26,260
"""Our instant answers come from a variety of sources, including Wikipedia, Wikia, CrunchBase, GitHub, WikiHow, The Free Dictionary – over 100 in total. Our long-term goal is for all of our instant answers to be available through this open API. Many of these instant answers are open source via our DuckDuckHack platfor...
s62305/ddgtesting
api-lvl-tests/test_ddg_api_instant_answers.py
Python
gpl-2.0
1,981
#! /usr/bin/python # vim: fileencoding=utf-8 encoding=utf-8 et sw=4 # Copyright (C) 2009 Jacek Konieczny <jajcus@jajcus.net> # Copyright (C) 2009 Andrzej Zaborowski <balrogg@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 pub...
OSMBrasil/IJSN_road_import
scripts/upload/osmpatch.py
Python
gpl-2.0
4,711
# author: Syed Shabih Hasan import argparse import os import sys from tqdm import tqdm def get_args(): parser = argparse.ArgumentParser() parser.add_argument("-f", help="folder", required=True) parser.add_argument("-e", help="extension", required=True) parser.add_argument("-o", help="output", require...
syedshabihhasan/UtilityCode
src/combine_num_files.py
Python
gpl-2.0
1,705
import column_chooser import constants import library_manager import list_manager import main_window import media import movie_tagger import prefs_manager import prefs_window import tag_manager __all__ = ['column_chooser', 'constants', 'library_manager', 'list_manager', 'main_window', 'media', 'movie...
viswimmer1/PythonGenerator
data/python_files/32695181/__init__.py
Python
gpl-2.0
387
# -*- coding: utf-8 -*- def social_snuggle(entity, argument): return True #- Fine Funzione -
Onirik79/aaritmud
src/socials/social_snuggle.py
Python
gpl-2.0
98
# -*- coding: utf-8 -*- # Copyright: (c) 2019, SylvainCecchetto # GNU General Public License v2.0+ (see LICENSE.txt or https://www.gnu.org/licenses/gpl-2.0.txt) # This file is part of Catch-up TV & More from __future__ import unicode_literals import re try: # Python 3 from urllib.parse import unquote_plus except...
Catch-up-TV-and-More/plugin.video.catchuptvandmore
resources/lib/channels/be/canalc.py
Python
gpl-2.0
4,279
import platform import os import getpass import sys import traceback from crontab import CronTab from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_session from scrapebot.configuration import Configuration from scrapebot.database import base, User, Instance def main(): print('Wel...
MarHai/ScrapeBot
setup.py
Python
gpl-2.0
13,133
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2010 Michiel D. Nauta # Copyright (C) 2011 Tim G L Lyons # Copyright (C) 2013 Doug Blank <doug.blank@gmail.com> # # This program is free software; you can redistribute it and/or modify # ...
beernarrd/gramps
gramps/gen/lib/eventref.py
Python
gpl-2.0
7,345
#------------------------------------------------------------------------------- # Name: levels # Purpose: # # Author: novirael # # Created: 17-04-2012 # Copyright: (c) novirael 2012 # Licence: <your licence> #-------------------------------------------------------------------------------...
novirael/arkanoid-pygame
levels.py
Python
gpl-2.0
1,317
''' Created on Aug 31, 2012 @author: u5682 ''' from sqlalchemy import exc from sqlalchemy import event from sqlalchemy.pool import Pool from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy import create_engine import os import sys @event.li...
supermanue/montera
base.py
Python
gpl-2.0
3,584
#!/usr/bin/python3.3 from __future__ import print_function import argparse import json ''' Zlib's implementation uses 262 bytes of overhead for pre-defined dictionary thus, the max zdict size is 32KB - 262B = 23506B ''' MAX_WINDOW_SIZE = 32506 # 32KB-262B, size of MAX_WBITS - zdict overhead MAX_LOOKAHEAD_BUFFER_SI...
pinterest/mysql_utils
zdict_gen/zdict_gen.py
Python
gpl-2.0
4,693
"""ShutIt module. See http://shutit.tk/ """ from shutit_module import ShutItModule class gperf(ShutItModule): def is_installed(self, shutit): return shutit.file_exists('/root/shutit_build/module_record/' + self.module_id + '/built') def build(self, shutit): shutit.send('mkdir -p /tmp/build/gperf') shutit....
ianmiell/OLD-shutitdist
gperf/gperf.py
Python
gpl-2.0
1,224
# -*- coding: utf-8 -*- import common import sys, os, traceback import time import random import re import urllib import string from string import lower from entities.CList import CList from entities.CItemInfo import CItemInfo from entities.CListItem import CListItem from entities.CRuleItem import CRuleItem import c...
AMOboxTV/AMOBox.LegoBuild
plugin.video.SportsDevil/lib/parser.py
Python
gpl-2.0
26,777
from BTrees.OOBTree import OOBTree from arche.interfaces import IObjectWillBeRemovedEvent from arche.interfaces import IRoot from arche.interfaces import IUser from pyramid.traversal import find_root from zope.component import adapter from zope.interface import implementer from arche_pas_social.interfaces import ISoci...
ArcheProject/arche_pas_social
arche_pas_social/models.py
Python
gpl-2.0
3,574
# -*- coding: utf-8 -*- # This file is part of the Rainbow Project __author__ = 'Jesús Arroyo Torrens' __email__ = 'jesus.arroyo@bq.com' __copyright__ = 'Copyright (c) 2015 Mundo Reader S.L.' __license__ = 'GPLv2' def run(): _service = None name = 'avahi-daemon' try: import time import ps...
bqlabs/rainbow
rainbow/avahi.py
Python
gpl-2.0
908
#!/usr/bin/env python3 import RPi.GPIO as GPIO TouchPin = 11 Gpin = 13 Rpin = 12 tmp = 0 def setup(): GPIO.setmode(GPIO.BOARD) # Numbers GPIOs by physical location GPIO.setup(Gpin, GPIO.OUT) # Set Green Led Pin mode to output GPIO.setup(Rpin, GPIO.OUT) # Set Red Led Pin mode to output GPIO.setu...
sunfounder/SunFounder_SensorKit_for_RPi2
Python/24_touch_switch.py
Python
gpl-2.0
1,264
import sys class MergeKBs(): def __init__(self, WNnodesFilename, WNedgesFilename, CNnodesFilename, CNedgesFilename, matchedNodesFilename, matchedEdgesFilename, matchKBs): self.WNnodesFilename = WNnodesFilename self.WNedgesFilename = WNedgesFilename self.CNnodesFilename = CNnodesFilename ...
redsk/neo_merger
neo_merger.py
Python
gpl-2.0
10,267
# # Advene: Annotate Digital Videos, Exchange on the NEt # Copyright (C) 2008-2017 Olivier Aubert <contact@olivieraubert.net> # # Advene 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 ...
oaubert/advene
lib/advene/gui/edit/transcribe.py
Python
gpl-2.0
51,178
#!/usr/bin/env python """ Generate BED files with TAD borders of particular width. TAD border of width 2r between two TADs is defined as a region consisting of r bp to the left and r bp to the right of the point separating the two TADs. Usage: call_borders.py (-f <TADs_filename> | -d <input_directory>) -w <border_w...
sidorov-si/TADStates
call_borders.py
Python
gpl-2.0
6,153
# -*- coding: utf-8 -*- from __future__ import unicode_literals from abc import ABCMeta import csv from performance_tools.exceptions import ProgressBarException, ElasticsearchException from performance_tools.utils.progress_bar import create_progress_bar class BaseURLFlowBackend(object): """Collect URL flow fro...
PeRDy/performance-tools
performance_tools/urls_flow/backends/base.py
Python
gpl-2.0
2,681
## # 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/b/binutils.py
Python
gpl-2.0
8,639
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path.di...
nico202/pyUniSR
setup.py
Python
gpl-2.0
919
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2014 Philipp Temminghoff (philipptemminghoff@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 ...
phil65/script.home
TrailerWindow.py
Python
gpl-2.0
2,625
i=0 numbers = [] while i < 6: print "At the top i is %d" %i numbers.append(i) i = i+1 print "Numbers now: ", numbers print "At the bottom i is %d" %i print "The numbers: " for num in numbers: print num
SurAnand/pyuthon
while2.py
Python
gpl-2.0
212
''' Created on 30-07-2014 @author: mateusz ''' from threading import Thread import gumtreeofferparser as Parser from injectdependency import Inject, InjectDependency @InjectDependency('urlfetcher') class OfferFetcher(Thread): urlfetcher = Inject def __init__(self, inQueue, outQueue): ...
mateuszmidor/GumtreeOnMap
src/offerfetcher.py
Python
gpl-2.0
848
# -*- coding: utf-8 -*- # Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in th...
mulkieran/pydevDAG
src/pydevDAG/_decorations/_node_decorators.py
Python
gpl-2.0
8,394
#! /usr/bin/env python # -*- coding: latin-1 -*- # Copyright (C) 2006 Universitat Pompeu Fabra # # Permission is hereby granted to distribute this software for # non-commercial research purposes, provided that this copyright # notice is included with any such distribution. # # THIS SOFTWARE IS PROVIDED "AS IS" WI...
PlanTool/plantool
code/Uncertainty/T0/translator/generators/sortnum.py
Python
gpl-2.0
3,602
""" This file was generated with the custommenu management command, it contains the classes for the admin menu, you can customize this class as you want. To activate your custom menu add the following to your settings.py:: ADMIN_TOOLS_MENU = 'OramaBank.menu.CustomMenu' """ from django.core.urlresolvers import rev...
lariodiniz/OramaBankTest
OramaBank/menu.py
Python
gpl-2.0
1,161
#!/usr/bin/env python from imp import load_source from json import load from os import remove from os.path import dirname, realpath from StringIO import StringIO from sys import path, stdin, stdout, stderr from unittest import TestCase, main basedir = realpath(dirname(__file__)+'/..') feedlinks = None def setUpModule...
nyirog/feedlink
test/test_bin_classfeedlinks.py
Python
gpl-2.0
3,411
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016-2019 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
unioslo/cerebrum
Cerebrum/rest/server.py
Python
gpl-2.0
2,520
from django.db import models from django.utils import timezone from edc_base.model.models import BaseUuidModel from simple_history.models import HistoricalRecords as AuditTrail from getresults_patient.models import Patient from .receive_identifier import ReceiveIdentifier class ReceiveBaseFieldsMixin(models.Model):...
botswana-harvard/getresults-receive
getresults_receive/models/receive.py
Python
gpl-2.0
2,273
#!/usr/bin/python import os, sys log_file = 'py_ns3_visualizer.log' # Remove log file if os.path.exists (log_file): os.system ('rm %s' % log_file) if len (sys.argv) == 2 and sys.argv[1] == 'help': #not in [1, 2, 3]: print 'Usage: runner [<events.log>] [<interval>]' sys.exit (0) if len (sys.argv) >= 2: event...
AliZafar120/NetworkStimulatorSPl3
rapidnet_visualizer/runner.py
Python
gpl-2.0
884
# -*- coding: utf-8 -*- # Copyright (C) 2011 Denis Kobozev # # 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...
dkobozev/tatlin
libtatlin/vector.py
Python
gpl-2.0
1,804
# AFM font NewCenturySchlbk-Bold (path: /usr/share/fonts/afms/adobe/pncb8a.afm). # Derived from Ghostscript distribution. # Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code. from . import dir dir.afm["NewCenturySchlbk-Bold"] = ( 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 5...
ska-sa/purr
Purr/Plugins/local_pychart/afm/NewCenturySchlbk_Bold.py
Python
gpl-2.0
1,509
# @author: Milinda Fernando # School of Computing, University of Utah. # generate all the slurm jobs for the sc16 poster, energy measurements, import argparse if __name__ == "__main__": parser = argparse.ArgumentParser(prog='slurm_pbs') parser.add_argument('-n','--npes', help=' number of mpi tasks') parser.add_ar...
paralab/Dendro4
slurm/slurm_pbs.py
Python
gpl-2.0
2,491