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 -*-
from __future__ import unicode_literals
from io import BytesIO
from pytest import raises
from translate.misc.multistring import multistring
from translate.storage import base, jsonl10n, test_monolingual
JSON_I18NEXT = b"""{
"key": "value",
"keyDeep": {
"inner": "value"
},
... | diorcety/translate | translate/storage/test_jsonl10n.py | Python | gpl-2.0 | 7,601 |
# Copyright (C) 2014 Red Hat, Inc. Jamie Bainbridge <jbainbri@redhat.com>
# Copyright (C) 2014 Red Hat, Inc. Bryn M. Reeves <bmr@redhat.com>
# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute... | TurboTurtle/sos | sos/report/plugins/firewalld.py | Python | gpl-2.0 | 2,152 |
import pytest
from cfme import test_requirements
from cfme.infrastructure.provider import InfraProvider
from cfme.markers.env_markers.provider import ONE_PER_TYPE
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.wait import wait_for
pytestmark = [
pytest.mark.tier(2),
test_requ... | izapolsk/integration_tests | cfme/tests/infrastructure/test_cluster_analysis.py | Python | gpl-2.0 | 1,373 |
# Poupool - swimming pool control software
# Copyright (C) 2019 Cyril Jaquier
#
# 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 v... | lostcontrol/poupool | test/test_actor.py | Python | gpl-2.0 | 2,929 |
import distutils.sysconfig
import logging
import sys
import os
import time
import cobbler.templar
from cobbler.cexceptions import CX
plib = distutils.sysconfig.get_python_lib()
mod_path = "%s/cobbler" % plib
sys.path.insert(0, mod_path)
template_file = "/etc/cobbler/genders.template"
settings_file = "/etc/genders"
lo... | cobbler/cobbler | cobbler/modules/managers/genders.py | Python | gpl-2.0 | 4,161 |
# -*- coding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should h... | iNecas/katello | cli/src/katello/client/api/environment.py | Python | gpl-2.0 | 2,661 |
import time
import logging
class Event:
def __init__(self,type=None,x=None,y=None,activeWindow=None):
self.type = type
self.x = x
self.y = y
self.time = time.time()
self.activeWindow = activeWindow
class MouseEvent(Event):
def __init__(self,type=None,x=None,y=None,butto... | orochvilato/tutorial-builder | capture/KMEvents/events.py | Python | gpl-2.0 | 628 |
#!/usr/bin/python
import RequiemEasy
client = RequiemEasy.ClientEasy("PoolingTest", RequiemEasy.Client.IDMEF_READ)
client.Start()
while True:
idmef = RequiemEasy.IDMEF()
ret = client.RecvIDMEF(idmef)
if ret:
print idmef
| requiem-forasiem/librequiem | bindings/tests/pooling.py | Python | gpl-2.0 | 237 |
# This file is part of the Enkel web programming library.
#
# Copyright (C) 2007 Espen Angell Kristiansen (espen@wsgi.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 version 2
# of... | espenak/enkel | enkel/batteri/browser_route.py | Python | gpl-2.0 | 1,751 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2015 James Clark <james.clark@ligo.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 2 of the License, or
#... | astroclark/bhextractor | utils/mass_scaling.py | Python | gpl-2.0 | 7,682 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import math
# using Heron's formula. formula for general triangle. too slow and gives large squares to test
def isPerfectRoot(n):
return (math.sqrt(n) % 1 == 0)
def isPerfectRoot1(n):
m10 = n % 10
if m10 == 2 or m10 == 3 or m10 == 7 or m10 == 8:
return F... | anomen-s/programming-challenges | projecteuler.net/0094-Almost_equilateral_triangles/slow-1-wrong.py | Python | gpl-2.0 | 985 |
from typing import Optional, cast
import fsgamesys
import fsui
from fsbc import settings
from fsgamesys.product import Product
from fsui.qt.toplevelwidget import TopLevelWidget
from launcher.i18n import gettext
from launcher.launcher_settings import LauncherSettings
from launcher.launcher_signal import LauncherSignal
... | FrodeSolheim/fs-uae-launcher | launcher/settings/settings_dialog.py | Python | gpl-2.0 | 7,730 |
from django.contrib import admin
from classroom.models import *
admin.site.register(Profile)
admin.site.register(Organization)
admin.site.register(Department)
admin.site.register(Teacher)
admin.site.register(Subject)
admin.site.register(Elective)
admin.site.register(Class)
admin.site.register(Group)
admin.site.registe... | coders-circle/Notifica | web/classroom/admin.py | Python | gpl-2.0 | 364 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012 Anne Archibald <peridot.faceted@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... | jwvhewitt/dmeternal | old_game/util.py | Python | gpl-2.0 | 1,662 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from ripozo_oasis.api_builder import create_app
| timmartin19/ripozo-oasis | ripozo_oasis/__init__.py | Python | gpl-2.0 | 198 |
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# BitBake Cache implementation
#
# Caching of bitbake variables before task execution
# Copyright (C) 2006 Richard Purdie
# Copyright (C) 2012 Intel Corporation
# but small sections based on code from bin/bitbake:... | schleichdi2/OPENNFR-6.0-CORE | bitbake/lib/bb/cache.py | Python | gpl-2.0 | 32,689 |
#!/usr/bin/env python
import time
from sampy import *
# Create a Hub Proxy
myhub=SAMPHubProxy()
myhub.connect()
# Create a client that uses
# the passed Hub Proxy
cli1=SAMPClient(hub=myhub)
metadata1={"samp.name":"Client 1",
"samp.description.txt":"Test Client 1",
"cli1.version":"0.01"}
# Start ... | hugobuddel/sampy | examples/shutdowntest.py | Python | gpl-2.0 | 2,136 |
#encoding=utf-8
# 使用import语句将一个源代码文件作为模块导入
# 不能使用有"."的文件名
import import_2
print import_2.a
import_2.foo()
c=import_2.bar()
c.grok()
| solvery/lang-features | python/module_1/import.1.py | Python | gpl-2.0 | 190 |
#!/usr/bin/env python2
"""This script takes various parameters specified in
cfme_data['template_upload']['template_upload_gce'] and/or by command-line arguments.
Parameters specified by command-line have higher priority, and override data in cfme_data.
This script is designed to run either as a standalone gce templat... | kzvyahin/cfme_tests | scripts/template_upload_gce.py | Python | gpl-2.0 | 5,905 |
#!/usr/bin/env python
# coding: utf-8
# This script asks your name, email, password, SMTP server and destination
# name/email. It'll send an email with this script's code as attachment and
# with a plain-text message. You can also pass `message_type='html'` in
# `Email()` to send HTML emails instead of plain text.
# Y... | 321cyb/kernel-modules | Eudyptula-Challenge/sendMail/example_email_utils.py | Python | gpl-2.0 | 1,299 |
from ace.acetest import AceTest
from pyethereum.utils import coerce_to_bytes
class TestSimpleStoredWork(AceTest):
CONTRACT = "contract/image_stored_work.se"
CREATOR = "artist"
WORK = open('test/image_stored.pbm').read()
def test_do_nothing(self):
data = []
response = self.sim... | robmyers/artworld-ethereum | old/test/test_image_stored_work.py | Python | gpl-3.0 | 696 |
from .base import Simulation, LTFArray, XORPUF
from .bistable import XORBistableRingPUF, BistableRingPUF
from .delay import XORArbiterPUF, XORFeedForwardArbiterPUF, ArbiterPUF, LightweightSecurePUF, RandomTransformationPUF, \
PermutationPUF, InterposePUF, FeedForwardArbiterPUF
from .optical import IntegratedOpti... | nils-wisiol/pypuf | pypuf/simulation/__init__.py | Python | gpl-3.0 | 327 |
#!/usr/bin/env python2
import urllib2
import cookielib
import sys
from urllib import urlencode
SWITCH_IP = "192.168.0.0"
PASSWORD = "password"
LOGIN_URL = "http://%s/base/main_login.html" % SWITCH_IP
VLAN_URL = "http://%s/switching/dot1q/qnp_port_cfg_rw.html" % SWITCH_IP
cookie_handler = urllib2.HTTPCookieProcessor... | wazo-pbx/xivo-tools | switch-vlan/switch-vlan.py | Python | gpl-3.0 | 1,927 |
###
# Copyright (c) 2013, Valentin Lorentz
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, a... | kg-bot/SupyBot | plugins/StdoutCapture/test.py | Python | gpl-3.0 | 1,722 |
'''
Created on 31.07.2016
@author: mkennert
'''
class Singleton:
'''
represents the singleton-pattern.
if you want use this, set a annotation @Singleton over your class
'''
def __init__(self, decorated):
self._decorated = decorated
'''
proofs whether a instan... | simbtrix/mxnix | project/materialEditor/singleton.py | Python | gpl-3.0 | 855 |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
#
# This file is part of the NNGT project to generate and analyze
# neuronal networks and their activity.
# Copyright (C) 2015-2020 Tanguy Fardet
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | Silmathoron/NNGT | nngt/plot/hive_helpers.py | Python | gpl-3.0 | 12,761 |
# -*- coding: utf-8 -*-
# Copyright (C) 2015 Sylvain Boily
#
# 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 p... | sboily/xivo-popc-stats | popc_stats/calls.py | Python | gpl-3.0 | 9,352 |
# Networks experiment base class
#
# Copyright (C) 2017--2021 Simon Dobson
#
# This file is part of epydemic, epidemic network simulations in Python.
#
# epydemic 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... | simoninireland/epydemic | epydemic/networkexperiment.py | Python | gpl-3.0 | 6,035 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Janice Cheng
"""
"""
import s3
obj = s3.RedisHelper()
obj.public('alex db','fm111.7') | jcchoiling/learningPython | s13/Day12/practice/s5.py | Python | gpl-3.0 | 147 |
# Topydo - A todo.txt client written in Python.
# Copyright (C) 2014 Bram Schoenmakers <me@bramschoenmakers.nl>
#
# 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,... | mruwek/topydo | test/ViewTest.py | Python | gpl-3.0 | 1,530 |
################################################################################
#
# _/_/_/_/_/ _/_/_/ _/ _/_/_/
# _/ _/ _/ _/_/ _/ _/
# _/ _/ _/ _/ _/ _/ _/
# _/ _/_/_/ _/_/_/_/ _/_/_/
# _/ _/ _/ _/ _/ _/
# ... | socrocket/trap-gen | software/bsp/__build_cross_create_canadian.py | Python | gpl-3.0 | 13,040 |
class Solution(object):
def maxA(self, N):
"""
:type N: int
:rtype: int
"""
# @ xiyunyue2
dp = [i for i in xrange(N + 1)]
for i in xrange(1, N + 1):
for j in xrange(3, i):
dp[i] = max(dp[i], dp[i-j] * (j - 1))
return dp[N]
... | zqfan/leetcode | algorithms/651. 4 Keys Keyboard/solution3.py | Python | gpl-3.0 | 385 |
"""
This module contains code to actually perform searches in Goat. Idea is to take a
search object, and pointers to the query, record, and results databases. Using the
information in the search object, each query/database search is ran and used to
generate a new results object in the results db. Each result object is ... | chris-klinger/Goat | searches/search_runner.py | Python | gpl-3.0 | 7,582 |
# coding=utf-8
# Copyright (C) LIGO Scientific Collaboration (2015-)
#
# This file is part of the GW DetChar python package.
#
# GW DetChar 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 t... | ligovirgo/gwdetchar | gwdetchar/omega/__main__.py | Python | gpl-3.0 | 13,880 |
# pylint: skip-file
from builtins import object
__all__ = ["PhysicalParameters"]
class PhysicalParameters(object):
"""
A class to store physical constants and other immutable parameters
used by the sims_photUtils code
"""
def __init__(self):
#the quantities below are in nanometers
... | jbkalmbach/ESP | esp/lsst_utils/PhysicalParameters.py | Python | gpl-3.0 | 2,658 |
# coding: utf8
import logging
import simplejson
import sys
from django.views.decorators.csrf import csrf_exempt
from django.views.generic.simple import direct_to_template
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response, get_object_or_404
from django.template im... | opinnmr/stjornbord | user/views.py | Python | gpl-3.0 | 2,723 |
from django.core.management.base import BaseCommand
from django.conf import settings
from learn.models import Student, Task, TaskSession, ProgramSnapshot
class Command(BaseCommand):
help = 'Create test data (events) and store them to DB.'
def add_arguments(self, parser):
parser.add_argument(
... | adaptive-learning/robomission | backend/monitoring/management/commands/create_test_data.py | Python | gpl-3.0 | 1,063 |
from helper import unittest, PillowTestCase, hopper
from PIL import Image
class TestImageSplit(PillowTestCase):
def test_split(self):
def split(mode):
layers = hopper(mode).split()
return [(i.mode, i.size[0], i.size[1]) for i in layers]
self.assertEqual(split("1"), [('1',... | davidwilson-85/easymap | graphic_output/Pillow-4.2.1/Tests/test_image_split.py | Python | gpl-3.0 | 2,478 |
import argparse
from multiprocessing import Pool
from pathlib import Path
from scipy.optimize import minimize
from covest import version_string
from . import constants
from .data import load_histogram, parse_data, print_output, save_histogram
from .grid import initial_grid, optimize_grid
from .histogram import proce... | mhozza/covest | covest/covest.py | Python | gpl-3.0 | 10,610 |
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# Copyright (C) 2015 10Perfections 10Perfections@gmail.com
# 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 So... | homebru/permit | permit_lib/permitconfig.py | Python | gpl-3.0 | 2,125 |
'''
Copyright (C) 2012 Wiley Snyder
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
any later version.
This program is distributed in t... | wileynet/EatDudeWeb | EatDudeWeb/app/model/admin/restaurant.py | Python | gpl-3.0 | 2,856 |
# Copyright (C) 2010-2017 GRNET S.A.
#
# 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 i... | grnet/synnefo | snf-astakos-app/astakos/im/management/commands/project-control.py | Python | gpl-3.0 | 4,598 |
from tkinter import *
tk = Tk()
canvas = Canvas(tk, width=500, height=500)
canvas.pack()
# Draws a line from top left corner (0,0) to bottom right (500,500)
canvas.create_line(0, 0, 500, 500)
# Draw a rectangle first two coordinates are top left corner position,
# second two are bottom right coordinates
canvas.create_... | caw13/CCSUTechItOutPiTop | python/tk/basic_shapes.py | Python | gpl-3.0 | 855 |
# 42. Trapping Rain Water My Submissions QuestionEditorial Solution
# Total Accepted: 68613 Total Submissions: 210598 Difficulty: Hard
# Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
#
# For example,
# Given [0,1,... | shawncaojob/LC | PY/42_trapping_rain_water.py | Python | gpl-3.0 | 4,928 |
from django.apps import AppConfig
class Num2WordConfig(AppConfig):
name = 'num2word'
| jozekbudz/django-num2word | num2word/apps.py | Python | gpl-3.0 | 91 |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | qutebrowser/qutebrowser | tests/end2end/fixtures/test_quteprocess.py | Python | gpl-3.0 | 12,975 |
from typing import Iterable
import pysonic
import pysonic.utils as utils
class Artist(object):
"""This class implements the logical concept of an artist. """
data_dict = None
albums = []
def add_albums(self, albums: 'pysonic.album') -> None:
"""Add any number of albums to the artist. """
... | jonwedell/pysonic | pysonic/artist.py | Python | gpl-3.0 | 2,833 |
__version__ = '1.11'
default_app_config = 'easy_news.apps.NewsAppConfig'
| redsolution/django-easy-news | easy_news/__init__.py | Python | gpl-3.0 | 73 |
"""
This file is part of pikacon.
Pikacon 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.
Pikacon is distributed in the hope that it will b... | pingviini/pikacon | src/pikacon/config.py | Python | gpl-3.0 | 6,948 |
def input():
print("Hey, I'm input")
| WolfangAukang/watcher-hq | input/inputWatcher.py | Python | gpl-3.0 | 40 |
__problem_title__ = "Largest exponential"
__problem_url___ = "https://projecteuler.net/problem=99"
__problem_description__ = "Comparing two numbers written in index form like 2 and 3 is not " \
"difficult, as any calculator would confirm that 2 = 2048 < 3 = 2187. " \
... | jrichte43/ProjectEuler | Problem-0099/solutions.py | Python | gpl-3.0 | 1,286 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-22 09:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Bares', '0016_auto_20151222_0921'),
]
operations = [
migrations.AlterField(
... | AntonioPozo/Bares | Bares/migrations/0017_auto_20151222_0923.py | Python | gpl-3.0 | 472 |
# Copyright (C) 2013 ABRT Team
# Copyright (C) 2013 Red Hat, Inc.
#
# This file is part of faf.
#
# faf 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) ... | abrt/faf | src/pyfaf/utils/format.py | Python | gpl-3.0 | 1,400 |
# -*- coding: utf-8 -*-
# ***********************************************************************
# Copyright (C) 2014 - 2019 Oscar Gerardo Lazo Arjona *
# <oscar.lazoarjona@physics.ox.ac.uk> *
# *
... | oscarlazoarjona/fast | fast/error_propagation.py | Python | gpl-3.0 | 5,874 |
from datetime import datetime
import re
import random
from util import hook, http, text, timesince
reddit_re = (r'.*(((www\.)?reddit\.com/r|redd\.it)[^ ]+)', re.I)
base_url = "http://reddit.com/r/{}/.json"
short_url = "http://redd.it/{}"
@hook.regex(*reddit_re)
def reddit_url(match):
thread = http.get_html(ma... | FurCode/TechsupportModules | yiff.py | Python | gpl-3.0 | 2,387 |
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Mzero 4
# Copyright 2015 tvalacarta@gmail.com
# http://blog.tvalacarta.info/plugin-xbmc/Mzero/
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
# ------------------... | Mzero2010/MaxZone | plugin.video.Mzero/channels/trailertools.py | Python | gpl-3.0 | 26,836 |
# -*- coding: utf-8 -*-
"""
twython.streaming.api
~~~~~~~~~~~~~~~~~~~~~
This module contains functionality for interfacing with streaming
Twitter API calls.
"""
from birdieapp.twython import __version__
from birdieapp.twython.compat import json, is_py3
from birdieapp.twython.helpers import _transparent_params
from .... | mskala/birdie | birdieapp/twython/streaming/api.py | Python | gpl-3.0 | 7,484 |
"""lircthread.py -- Thread to read remote controller via lirc
"""
import Queue
import lirc
import threading
import time
class LircThread(threading.Thread):
"""
"""
def __init__(self, main):
"""
"""
threading.Thread.__init__(self)
self.main = main
self.queue = Q... | ujac81/PiBlaster | Pi/PyBlaster/src/lircthread.py | Python | gpl-3.0 | 1,516 |
import os
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from flask import Flask, request, render_template, url_for, send_from_directory
gauth = GoogleAuth()
drive = GoogleDrive(gauth)
try:
file_list = drive.ListFile({'q': "'root' in parents and trashed=false"}).GetList()
except:
fi... | hardwyrd/devfest-gdriveapp | gdriveapp.py | Python | gpl-3.0 | 602 |
from tracker import Tracker
import calculator
from controller import *
| zhangbright1986/cvgtracker | cvgtracker/__init__.py | Python | gpl-3.0 | 71 |
#!/usr/bin/env python
#coding: utf-8
#### FUNCTIONS ####
def header(string):
"""
Display header
"""
timeInfo = time.strftime("%Y-%m-%d %H:%M")
print '\n', timeInfo, "****", string, "****"
def info(string):
"""
Display basic information
"""
timeInfo = time.strftime("%Y-%m-%... | brguez/TEIBA | src/python/pairClusters.py | Python | gpl-3.0 | 17,093 |
# -*- coding: utf-8 -*
# Copyright 2017 Solthis.
#
# This file is part of Fugen 2.0.
#
# Fugen 2.0 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 optio... | Solthis/Fugen-2.0 | setup.py | Python | gpl-3.0 | 1,521 |
# -*- coding: utf-8 -*-
import re
import time
from pyload.plugin.Account import Account
from pyload.utils import json_loads
class RapiduNet(Account):
__name = "RapiduNet"
__type = "account"
__version = "0.05"
__description = """Rapidu.net account plugin"""
__license = "GPLv3"
__au... | ardi69/pyload-0.4.10 | pyload/plugin/account/RapiduNet.py | Python | gpl-3.0 | 1,876 |
#!/usr/bin/env python
"""
Features front-end import/export functions for kMC Projects.
Currently import and export is supported to XML
and export is supported to Fortran 90 source code.
"""
# Copyright 2009-2013 Max J. Hoffmann (mjhoffmann@gmail.com)
# This file is part of kmos.
#
# kmos is free software: you ... | jmlorenzi/kmos | kmos/io.py | Python | gpl-3.0 | 163,103 |
# encoding=utf-8
'''Base classes for processors.'''
import abc
import gettext
import logging
import trollius
from wpull.backport.logging import BraceMessage as __
from wpull.errors import ServerError, ProtocolError, SSLVerificationError, \
NetworkError
_logger = logging.getLogger(__name__)
_ = gettext.gettext
... | bright-sparks/wpull | wpull/processor/base.py | Python | gpl-3.0 | 1,460 |
#!/usr/bin/env python
import os, sys, shutil, datetime
from fabric.api import run, cd, local, get, settings, lcd
from fabric_ssh_config import getSSHInfoForHost
builddir = "/tmp/" + os.getenv('USER') + "/buildtemp"
version = "UNKNOWN"
################################################
# CHECKOUT CODE INTO A TEMP DIR
#... | wwgong/CVoltDB | tools/kit_tools/build_kits.py | Python | gpl-3.0 | 6,351 |
EVENT_KEYS="0" # because MQTT events come as strings
EVENT_TOUCHED=1
EVENT_TOUCHUP=2
EVENT_TOUCHDOWN=3 # intra keypad events
BLACK=(0,0,0)
COLOR_BLACK =(0,0,0)
COLOR_WHITE=(255,255,255)
EVENT_RFID_GETFIRMWAREVERSION = 23
EVENT_RFID_HASTAG = 21
EVENT_RFID_SWITCHDOWN = 22
EVENT_RFID_SWITCH... | dewoller/pi-kobo | pi_dispatcher/const.py | Python | gpl-3.0 | 758 |
from __future__ import division
from builtins import range
from past.utils import old_div
import numpy as np
import scipy.ndimage.filters as imf
import scipy.optimize as spo
"""
Author: jpg66 October 2018
This script is for auto detecting and fitting sparse, high SNR peaks form spectra with a flat background.
It is... | nanophotonics/nplab | nplab/analysis/SERS_Fitting/Auto_Fit_Raman.py | Python | gpl-3.0 | 5,348 |
"""
Django settings for bld project.
Generated by 'django-admin startproject' using Django 1.10.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
# ... | OmmyZhang/bld | bld/settings.py | Python | gpl-3.0 | 3,295 |
from power.actions import PowerActions
from power.view import PowerView
class PowerTools:
def __init__(self, actions, view):
self.power = 0
self.actions = actions
self.view = view
@classmethod
def build(cls, **kwargs):
actions = PowerActions.build(**kwargs)
view = ... | FAForever/client | src/power/__init__.py | Python | gpl-3.0 | 401 |
#!/usr/bin/env ../../jazzshell
"""
Load a midi and trim it to the required length.
"""
import sys, os
from optparse import OptionParser
from midi import read_midifile, write_midifile
from midi.slice import EventStreamSlice
from jazzparser.utils.midi import play_stream
from jazzparser.utils.base import ExecutionTimer
... | markgw/jazzparser | bin/data/midi/cutmidi.py | Python | gpl-3.0 | 5,125 |
# -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
import logging
import time
from django.util... | claudep/pootle | pootle/core/checks/checker.py | Python | gpl-3.0 | 11,350 |
from generatedsettings import DEBUG
if DEBUG:
from generatedsettings import HOME
import uno
import unohelper
def typednamedvalues( type, *args, **kwargs ):
if args:
dict = args[0]
else:
dict = kwargs
props = []
for k, v in dict.items():
p = uno.createUnoStruct( type )
p.Name = k
p.Value = v
props.app... | KAMI911/loec | examples/IDPhoto/idphoto/extensioncore.py | Python | gpl-3.0 | 17,966 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Regatta documentation build configuration file, created by
# sphinx-quickstart on Sat Feb 27 21:46:42 2016.
#
# 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
# au... | sturmf/regatta | docs/conf.py | Python | gpl-3.0 | 8,272 |
## Samuel Young
## GNU 3
## So i want this file to encrypt the information before I send it to the files and I want a a key to be used to insure that no one can have access to the files because this insure the security of subjects to read from the current on and move that data to from a file called iNR.py and move it ... | yuriprym/INR-tester-program | datasave.py | Python | gpl-3.0 | 4,237 |
import subprocess
import xml.dom.minidom
import traceback
import common
from logger import LOGGER_FACTORY
class HuaweiStatus:
"""Provides status of the Huawei 3G stick, such as signal strength."""
# Values to read from the Huawei stick: Huawei API name -> Huawei key -> our key
_QUERY = {'status': {'CurrentNet... | zieren/ip-anemometer | client/ipa/huawei_status.py | Python | gpl-3.0 | 1,916 |
# -*- coding: utf-8 -*-
# Copyright 2014-2016 The HyperSpyUI developers
#
# This file is part of HyperSpyUI.
#
# HyperSpyUI 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
#... | vidartf/hyperspyUI | hyperspyui/widgets/settingsdialog.py | Python | gpl-3.0 | 11,146 |
#
# AtHomePowerlineServer - database conversion from v2019 to v2020
# Copyright © 2020 Dave Hocker (email: AtHomeX10@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, version 3 of th... | dhocker/athomepowerlineserver | v2020_1_conversion.py | Python | gpl-3.0 | 3,738 |
from django.shortcuts import get_object_or_404
from django.core.exceptions import PermissionDenied
from functools import wraps
from bierapp.accounts.models import UserMembership, Site
def resolve_membership(func):
"""
Decorator which resolves the parameter 'id' to a membership object. It also
checks for... | basilfx/BierApp-Server | bierapp/accounts/decorators.py | Python | gpl-3.0 | 1,411 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | hryamzik/ansible | lib/ansible/modules/network/aci/aci_tenant_span_src_group.py | Python | gpl-3.0 | 7,028 |
# -*- coding: utf-8 -*-
from rest_framework import serializers
from apps.account.models import User
from apps.questionnaire.models import QuestionnaireRequest, RequestStep
class UserSerializer(serializers.ModelSerializer):
hospital = serializers.StringRelatedField()
class Meta:
model = User
f... | acesonl/remotecare | remotecare/apps/api/serializers.py | Python | gpl-3.0 | 715 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('naf_autoticket', '0061_incidentqueue_msg'),
]
operations = [
migrations.AlterField(
model_name='incidentqueue',
... | kevinnguyeneng/django-uwsgi-nginx | app/naf_autoticket/migrations/0062_auto_20170915_1209.py | Python | gpl-3.0 | 590 |
#!/usr/bin/python
#
# vim: tabstop=4 expandtab shiftwidth=4 autoindent
#
# Copyright (C) 2012 Steve Crook <steve@mixmin.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 version 3, o... | crooks/aam2mail | aam2mail/esub.py | Python | gpl-3.0 | 2,789 |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | TheDuckCow/MCprep | MCprep_addon/import_bridge/mineways_connector.py | Python | gpl-3.0 | 6,193 |
from .. import bar
import base
class TextBox(base._TextBox):
"""
A flexible textbox that can be updated from bound keys, scripts and
qsh.
"""
defaults = [
("font", "Arial", "Text font"),
("fontsize", None, "Font pixel size. Calculated if None."),
("fontshadow", None... | Fxrh/tispa-wm | libqtile/widget/textbox.py | Python | gpl-3.0 | 1,118 |
#-*- coding: utf-8 -*-
from django.core.urlresolvers import reverse
from django.utils import simplejson
from transifex.txcommon.tests import base
from transifex.actionlog.models import *
class ActionlogAPITests(base.BaseTestCase):
def setUp(self, *args, **kwargs):
super(ActionlogAPITests, self).setUp(*args... | tymofij/adofex | transifex/actionlog/tests/api.py | Python | gpl-3.0 | 8,475 |
from __future__ import (absolute_import, division, print_function)
from mantid.kernel import *
from mantid.api import *
import mantid.simpleapi as ms
from LoadEmptyVesuvio import LoadEmptyVesuvio
import copy
import numpy as np
import os
import re
import six
RUN_PROP = "Filename"
WKSP_PROP = "OutputWorkspace"
MODE_PR... | ScreamingUdder/mantid | Framework/PythonInterface/plugins/algorithms/LoadVesuvio.py | Python | gpl-3.0 | 54,654 |
"""
Test the loading of plugin file
"""
from tests.utils import run_temci_proc
def test_basic():
assert run_temci_proc("", files={
"bla.py": "print(42)"
}, misc_env={"TEMCI_PLUGIN_PATH": "bla.py"}).out.startswith("42")
| parttimenerd/temci | tests/test_plugins.py | Python | gpl-3.0 | 237 |
"""
Hou Farm. A Deadline submission tool for Houdini
Copyright (C) 2017 Andy Nicholas
https://github.com/fxnut/hou_farm
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... | fxnut/hou_farm | python/hou_farm/integersequence.py | Python | gpl-3.0 | 10,114 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import hashlib
import pkg_resources
from PyQt5.QtCore import QFileInfo
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
from sqlalchemy.ext.declarative import declarativ... | lheido/Mojuru | modules/core/file_inspector/file_inspector_helper.py | Python | gpl-3.0 | 6,861 |
import numpy as np
import pandas as pd
import myokit
from ionchannelABC.experiment import Experiment
ap_desc = """Action potential and calcium transient characteristics
from paced whole cell simulation. 80pA/pF for 0.5ms at 1Hz for 100s.
"""
# AP measurements
mdp, mdp_sem, mdp_n = -67, 2, 25 # maximum diastolic pote... | c22n/ion-channel-ABC | docs/examples/hl1/experiments/whole_cell.py | Python | gpl-3.0 | 3,187 |
# -*- encoding: utf-8 -*-
##############################################################################
# Copyright (c) 2014 - Present All Rights Reserved
# Author: Ivan Yelizariev <yelizariev@it-projects.info>
# Author: Cesar Lage <kaerdsar@gmail.com>
#
# This program is free software: you can redistribu... | ITPS/odoo-saas-tools | oauth_provider/controllers/main.py | Python | gpl-3.0 | 6,319 |
#!/usr/bin/python
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*-
"""
Role
====
The ``PluginManager`` loads plugins that enforce the `Plugin
Description Policy`_, and offers the most simple methods to activate
and deactivate the plugins once they are loaded.
.. note:: It may also classify the plugins in ... | cgroza/gEcrit | yapsy/PluginManager.py | Python | gpl-3.0 | 24,186 |
from .base import *
name = 'submissions'
def create(conn):
query = """create table submissions(
pid bigint,
usn varchar(10),
ans blob not null,
time_stamp datetime not null,
primary key(pid, usn),
pid references prog... | divkakwani/labcheck | src/services/dbm/models/submissions.py | Python | gpl-3.0 | 1,158 |
# Copyright 2015 John Walk
# This program is distributed under the terms of the GNU General Purpose License (GPL).
# Refer to http://www.gnu.org/licenses/gpl.txt
#
# 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 So... | jrwalk/scaling | scaling/powerlaw/fixedsize.py | Python | gpl-3.0 | 6,466 |
from django.conf.urls import patterns, url, include
from volunteer.core.admin import views
urlpatterns = patterns(
'',
# Main Admin Urls
url(r'^$', views.AdminIndexView.as_view(), name='index'),
# url(r'^guide/$', views.AdminGuideView.as_view(), name='guide'),
url(r'^login/$', views.AdminLoginView... | Apogaea/voldb | volunteer/core/admin/urls.py | Python | gpl-3.0 | 618 |
import threading
import os
import time
class Guestimator(threading.Thread):
def __init__(self, base_path):
threading.Thread.__init__(self)
self.base_path = base_path
self.complete = False
self.total_count = 0
self.exit = False
self.runnable = threading.Event()
... | CrispyMcToast/bkup | src/fs/Guestimator.py | Python | gpl-3.0 | 1,210 |
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 4 17:45:18 2016
@author: robouser
"""
import utilities
from datetime import datetime, timedelta
import json
from os import path
import urllib
import httplib
############################################################################
# EVENT OB... | rachel3834/event_observer | scripts/observer_classes.py | Python | gpl-3.0 | 8,924 |
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2009 Ars Aperta, Itaapy, Pierlis, Talend.
#
# Authors: Romain Gauthier <romain@itaapy.com>
# Hervé Cauwelier <herve@itaapy.com>
#
# This file is part of Lpod (see: http://lpod-project.org).
# Lpod is free software; you can redistribute it and/or modify it under
# the t... | kiniou/blender-smooth-slides | tools/lpod/test/test_list.py | Python | gpl-3.0 | 15,955 |
import abc
import math
import numpy as np
from pycgtool.util import SimpleEnum
class FunctionalForms(object):
"""
Class holding list of all defined functional forms for Boltzmann Inversion.
Creating an instance causes the Enum of functional forms to be updated with
all new subclasses of FunctionalF... | jag1g13/pycgtool | pycgtool/functionalforms.py | Python | gpl-3.0 | 4,265 |