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 |
|---|---|---|---|---|---|
"""
Django settings for aestheticBlasphemy project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
i... | aestheticblasphemy/aestheticBlasphemy | aestheticBlasphemy/settings.py | Python | gpl-3.0 | 24,621 |
#!/usr/bin/env python3
# -*-coding:Utf-8 -*
'''Some code to compute the abuncance matching'''
import pyfits
import numpy as np
import matplotlib.pyplot as plt
import scipy
from astropy.cosmology import Planck15 as cosmo
#exec(open('TestCosmos2015.py').read())
def comov_volume(omega_sample, zmin, zmax):
"Compu... | Gorbagzog/StageIAP | AbundanceGalaxies.py | Python | gpl-3.0 | 2,309 |
#! /usr/bin/env python
# dnmapR_client.py is a revised and updated version of dnmap_client.py
# GPL v3
# Opsdisk LLC | opsdisk.com
# dnmap version modified: .6
# http://sourceforge.net/projects/dnmap
# Copyright (C) 2009 Sebastian Garcia
#
# This program is free software; you can redistribute it and/or modify
# it... | opsdisk/dnmapR | dnmapR_client.py | Python | gpl-3.0 | 12,638 |
#!/usr/bin/env python
# This file is part of nexdatas - Tango Server for NeXus data writer
#
# Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de>
#
# nexdatas is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | nexdatas/writer | test/Checkers.py | Python | gpl-3.0 | 52,497 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from uthportal.tasks.course import CourseTask
class ce437(CourseTask):
document_prototype = {
"code": "ce437",
"announcements": {
"link_site": "",
"link_eclass": "http://eclass.uth.gr/eclass/modules/announcements/rss.php?c=MHX28... | kkanellis/uthportal-server | uthportal/library/inf/courses/ce437.py | Python | gpl-3.0 | 635 |
from django import template
from DNAOrderApp.order.models import AffiliatedInstitute
register = template.Library()
# DEPRECATED - NOT IN USE
# def get_affiliated_institute_given_ai_list(ailist):
# """Returns all affiliated institute for fmprojectlist"""
# print "this is ailist", ailist
# html_string = "<ul>"
# fo... | aw18/DNAOrderApp | DNAOrderApp/order/templatetags/get_affiliated_institute_list.py | Python | gpl-3.0 | 1,767 |
from PySide.QtGui import QGridLayout, QWidget
import color
import koeppencolor
from sphereview import SphereView
def climatecolor(tile, _):
h, c = tile.elevation, tile.climate
if c == None:
return (127,127,127) if h > 0 else (0,0,0)
k = c.koeppen
if h > 0:
color = koeppencolor.value... | tps12/Tec-Nine | worlddisplay.py | Python | gpl-3.0 | 2,142 |
# ! /usr/bin/env python
# _*_ coding:utf-8 _*_
"""
@author = lucas.wang
@create_time = 2018-01-29
"""
from Tkinter import Tk
class Clipboard(object):
def addToClipboard(self, string):
"""字符串添加到剪贴板"""
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append(string)
... | Lucas-Wong/ToolsProject | Clipboard/Clipboard.py | Python | gpl-3.0 | 672 |
from __future__ import absolute_import
from django.conf.urls import include, url
from django.conf import settings
from django.conf.urls.static import static
# from djangui.admin import
from .views import (celery_status, CeleryTaskView, celery_task_command, DjanguiScriptJSON,
DjanguiHomeView... | Chris7/django-djangui | djangui/urls.py | Python | gpl-3.0 | 1,653 |
"""This plugin adds a menu File->Messages->Export Locations to Editor
which opens an editor with the contents of the Locations view.
It also add contextual menu to clear items for current file from
location view.
"""
import GPS
import gps_utils
import pygps
import os.path
def message_compare(a, b):
""" ... | qunying/gps | share/support/ui/locations_view_utils.py | Python | gpl-3.0 | 4,549 |
from gordon.io.audio import AudioFile
| bmcfee/gordon | gordon/io/__init__.py | Python | gpl-3.0 | 39 |
version = 1.1
| thomwiggers/besluiten | version.py | Python | gpl-3.0 | 14 |
#!/usr/bin/env python
# Written by Shlomi Fish, under the MIT Expat License.
import os
import os.path
import re
from sys import platform
IS_MAC = (platform == "darwin")
TEST_TAGS = os.getenv('TEST_TAGS', '')
def _has_tag(tag):
return re.search("\\b{}\\b".format(tag), TEST_TAGS)
PY_VERS = ([2] if _has_tag('WIT... | shlomif/PySolFC | scripts/gen_individual_importing_tests.py | Python | gpl-3.0 | 1,222 |
#skip#
####################################################################################################
import matplotlib.pyplot as plt
####################################################################################################
import PySpice.Logging.Logging as Logging
logger = Logging.setup_logging()
... | FabriceSalvaire/PySpice | examples/operational-amplifier/astable.py | Python | gpl-3.0 | 2,047 |
# 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
from frappe.utils import flt, cint, nowdate
from frappe import throw, _
import frappe.defaults
from frappe.utils import getdate
from erp... | KanchanChauhan/erpnext | erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | Python | gpl-3.0 | 16,742 |
#!/usr/bin/env python
'''Tree View/Tree Store
The GtkTreeStore is used to store data in tree form, to be used
later on by a GtkTreeView to display it. This demo builds a simple
GtkTreeStore and displays it. If you're new to the GtkTreeView widgets
and associates, look into the GtkListStore example first.'''
# pygtk ve... | chriskmanx/qmole | QMOLEDEV/pygtk-2.16.0/examples/pygtk-demo/demos/tree_store.py | Python | gpl-3.0 | 11,036 |
# Code404_Server - The serverside stuff and site for Code404_Server
# Copyright (C) 2015 Mitame, Doctor_N
#
# 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
# ... | CyboticCatfish/code404-server | code404/database.py | Python | gpl-3.0 | 3,190 |
#!/usr/bin/env python3
'''
Test the class in a function.
The instance will be created twice if the format_string funciont is invoked twice.
'''
def format_string(string, formatter=None):
"""Format a string using the formatter object,which is expected to have a format() emthod that accepts a string.
"""
... | jingwangian/tutorial | python/class/format_string.py | Python | gpl-3.0 | 936 |
import collections
'''
--- Part Two ---
Of course, that would be the message - if you hadn't agreed to use a modified repetition code instead.
In this modified code, the sender instead transmits what looks like random data, but for each character, the
character they actually want to send is slightly les... | tetrismegistus/advent16 | day6/day6_2.py | Python | gpl-3.0 | 1,318 |
''' Module to handle plugins including a template class for writing
plugins.
Programmer: Matts Bjorck
Last changed: 2008 07 23
'''
import os
import wx, StringIO, traceback
from utils import PluginHandler
head, tail = os.path.split(__file__)
# Look only after the file name and not the ending since
# the file endin... | joshp123/genx | plugins/add_on_framework.py | Python | gpl-3.0 | 16,107 |
#!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import time
import math
import random
import itertools
import scipy.misc
import os
import cv2 as cv
import numpy as np
import tensorflow as tf
slim=tf.contrib.slim
import matplotlib.pyplo... | DrarPan/tensorflow | reinforcement_learning/QLearning/GridWorld.py | Python | gpl-3.0 | 8,451 |
"""
Digest information retrieved from the Weather Underground API
"""
def get_near_stations_by_position(lat, lng):
"""
Returns a clean array with all stations near the given location
"""
from .endpoints import geolookup_by_position
data = geolookup_by_position(lat, lng)
stations ... | JoaquimPatriarca/senpy-for-gis | gasp/fromapi/weather/digest.py | Python | gpl-3.0 | 2,733 |
from nose.tools import *
from virtuback import app
from virtuback import db
from flask import json
from hashlib import sha256
class SetupAPI:
def setUp(self):
print('SETUP!')
app.config['TESTING'] = True
self.client = app.test_client()
self.db = db._client.virtuback_test.users
... | while/virtuback | tests/virtuback_tests.py | Python | gpl-3.0 | 2,340 |
import sys
from settings import *
# Used in an additional process!
class Information:
@staticmethod
def battle(player_party, enemy_party):
sys.stdout.flush()
box_width = GUI_ITEM_WIDTH
gui_width = GUI_WIDTH - 2 * box_width
rwidth = box_width + gui_width
... | Diapolo10/text_rpg | src/gui.py | Python | gpl-3.0 | 2,632 |
# -*- encoding: utf-8 -*-
import random
import string
from django.contrib.auth.models import User, Group, Permission
from django.core.management.base import BaseCommand, CommandError
import click
from event.models import *
class Command(BaseCommand):
help = 'Creates new Make Things event'
def create_group(se... | Makerland/makethings.io | core/management/commands/newevent.py | Python | gpl-3.0 | 4,726 |
import webapp2
import os
import math
import logging
from Analyzer import Analyzer
from Measurement import Measurement
from CallAgent import CallAgent
from google.appengine.api import users
from google.appengine.ext.webapp import template
from google.appengine.ext import ndb
"""
This class handles the GET from /analyze... | anawas/wasserblog | main.py | Python | gpl-3.0 | 1,832 |
import re
from dis_snek.client import Snake
from dis_snek.models import Scale, slash_command
from discordbot import command
from discordbot.command import MtgContext
from magic import image_fetcher
from magic.models import Card
class Art(Scale):
@slash_command('art')
@command.slash_card_option()
async d... | PennyDreadfulMTG/Penny-Dreadful-Tools | discordbot/commands/art.py | Python | gpl-3.0 | 1,032 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 8 21:52:39 2020
@author: piccinini
"""
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
x = np.loadtxt('eigvalues_heterog.txt')
eig = x[1:,0]
psis = x[1:,1:].T
r = (psis/eig).T
IP = 1e5/np.cumsum(r, axis=0)
# plt.semilog... | rbpiccinini/codes | eigendrake/output/IP.py | Python | gpl-3.0 | 412 |
# -*- 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
import os
import json
import sys
from nose.plugins.skip import SkipTest... | yfried/ansible | test/units/modules/network/f5/test_bigip_dns_nameserver.py | Python | gpl-3.0 | 3,915 |
#Copyright 2011 Dan Klinedinst
#
#This file is part of Gibson.
#
#Gibson 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.
#Gibson is distributed in the hop... | robscetury/gibson | lib/gibson/programs/network.py | Python | gpl-3.0 | 17,688 |
# -*- coding: utf-8 -*-
"""
Registrar
~~~~~
copyright: (c) 2014 by Halfmoon Labs, Inc.
copyright: (c) 2015 by Blockstack.org
This file is part of Registrar.
Registrar is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... | john-light/registrar | registrar/config.py | Python | gpl-3.0 | 1,715 |
#!/usr/bin/python3
# main.py
#
# Copyright (C) 2015 Yaroslav Strukevich <ah2.two.2o@gmal.com>
#
# This file is part of User Friendly Linux Package Manager.
#
# User Friendly Linux Package Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | BloodySucker/uflpm | main.py | Python | gpl-3.0 | 2,129 |
import sys
# Let's do some dep checking and handle missing ones gracefully
try:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.Qt import Qt
import PyQt4.QtCore as QtCore
except ImportError:
print "You need to have PyQT installed to run Electrum in graphical mode."
print "If yo... | wozz/electrum-myr | gui/qt/lite_window.py | Python | gpl-3.0 | 31,102 |
import numpy as np
import matplotlib.pyplot as plt
identity = lambda x: x
class DenoisingAutoencoder(object):
"""
Denoising autoencoder.
"""
def sigmoid(self, x):
#
# TODO: implement sigmoid
#
#if x>=0:
return 1./(1+np.exp(-x))
#return np.exp(x)/(1+np.exp(x))
def sigmoi... | kadircet/CENG | 783/HW2/METU/denoising_autoencoder.py | Python | gpl-3.0 | 8,230 |
threads_init = lambda *a, **k: None
class DBusConnection(object):
pass
class DBusConnectionFlags(object):
AUTHENTICATION_CLIENT = 1
pass
| timvideos/gst-switch | docs/fake-lib/gi/repository/Gio.py | Python | gpl-3.0 | 147 |
"""
Script will generate mock comparisons and output ranking/scoring data after every round of comparisons
uses Scoring and Pairing algorithms directly without using the full ComPAIR backend
Outputs:
- for every algorithms: file named 'out'+algorithm name+'.csv' in the scripts folder
- for every round: display a... | ubc/compair | scripts/generate_correlation_reports_direct.py | Python | gpl-3.0 | 8,082 |
#!/usr/bin/env python
# Copyright (C) 2015 Shea G Craig <shea.craig@sas.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 ve... | sheagcraig/phasetool | phasetool.py | Python | gpl-3.0 | 14,855 |
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class PyraclaItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
| aarkwright/pyracla | pyracla/items.py | Python | gpl-3.0 | 286 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Generates the tr file based on the defined PyQt Project File
"""
import os, sys
import subprocess
PYTHONPATH = os.path.split(sys.executable)[0]
PLYPATH = os.path.join(PYTHONPATH, "Lib\\site-packages\\PyQt4\\pylupdate4.exe")
LREPATH = os.path.join(PYTHONPATH, ... | Poofjunior/dxf2gcode | make_tr.py | Python | gpl-3.0 | 1,707 |
#!/usr/bin/python
"""
06 Feb 2011
use slr to compute evolutionary rates
"""
__author__ = "Francois-Jose Serra"
__email__ = "francois@barrabin.org"
__licence__ = "GPLv3"
__version__ = "0.0"
from ete_dev import EvolTree
tree = EvolTree ("data/S_example/measuring_S_tree.nw")
tree.link_to_alignment ("data/S_example... | khughitt/ete | examples/evol/7_slr.py | Python | gpl-3.0 | 574 |
#!/usr/bin/python
import toasim
import sys,random
nreal = 1
header = toasim.header()
header.parfile_name=sys.argv[1]
header.timfile_name=sys.argv[2]
par=open(sys.argv[1])
tim=open(sys.argv[2])
header.orig_parfile=par.read()
header.idealised_toas=tim.read()
reals=list()
i=0
while i < len(sys.argv):
if sys.arg... | mattpitkin/tempo2 | python/toasim/bin/fake_rfi.py | Python | gpl-3.0 | 1,132 |
# Copyright (C) 2017 Custodia Project Contributors - see LICENSE file
from __future__ import absolute_import
import json
from .base import CustodiaServerRunner
class TestKey(CustodiaServerRunner):
def test_store_key(self, custodia_server):
container = 'secrets/bucket{}/'.format(self.get_unique_number(... | latchset/custodia | tests/functional/test_key.py | Python | gpl-3.0 | 11,000 |
import PISM, time
import numpy as np
np.set_printoptions(precision=5, suppress=True)
ctx = PISM.Context()
ice_density = ctx.config.get_double("constants.ice.density")
ocean_density = ctx.config.get_double("constants.sea_water.density")
mu = ice_density / ocean_density
def allocate_grid(ctx):
params = PISM.Grid... | talbrecht/pism_pik | test/grounded_cell_fraction/grounded_cell_fraction.py | Python | gpl-3.0 | 4,170 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .views import module_bp
| Emercoin/emcweb | engine/emcweb/emcweb_webapi/__init__.py | Python | gpl-3.0 | 94 |
print ("Hello, Python!"); | ashoka-cs/people | setup.py | Python | gpl-3.0 | 25 |
from pysys.constants import *
from apama.correlator import CorrelatorHelper
from com.jtech.basetest import CycleMonitorTest
class PySysTest(CycleMonitorTest):
def execute(self):
#start server and set stations
self.startHTTPServer()
station = self.addStation(1,'Hyde Park',51512303,-159988)
station.update(2,20,... | moraygrieve/cycle-monitor | test/testcases/CycleMonitor_cor_004/run.py | Python | gpl-3.0 | 1,201 |
"""
Classes for modelling 3D vector fields.
"""
# Copyright (C) 2009-2011 University of Edinburgh
#
# This file is part of IMUSim.
#
# IMUSim 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... | alfkjartan/nvgimu | nvg/maths/vector_fields.py | Python | gpl-3.0 | 4,802 |
import tkinter as tk
class ToolTip(object):
def __init__(self, widget):
self.widget = widget
self.tipwindow = None
self.id = None
self.x = self.y = 0
def showtip(self, text):
"Display text in tooltip window"
self.text = text
if self.tipwindow or not sel... | mariana-LJ/groceries_desk_app | Tooltip.py | Python | gpl-3.0 | 1,513 |
# -*- coding: utf-8 -*-
# Copyright 2007-2021 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | ericpre/hyperspy | hyperspy/drawing/signal1d.py | Python | gpl-3.0 | 21,140 |
# granulecell_incremental_writing.py ---
#
# Filename: granulecell_incremental_writing.py
# Description:
# Author: subha
# Maintainer:
# Created: Mon Nov 3 23:28:21 2014 (+0530)
# Version:
# Last-Updated: Tue Nov 4 10:59:41 2014 (+0530)
# By: Subhasis Ray
# Update #: 4
# URL:
# Keywords:
# Compat... | nsdf/nsdf | examples/moose_NeuroML/granulecell_incremental_writing.py | Python | gpl-3.0 | 4,177 |
#!/usr/bin/python
import bluetooth
import time
import os
beforePresent = False
timeSleep = 5
countDown = 10
while True:
print "Checking " + time.strftime("%a, %d %b %Y %H:%M:%S", time.gmtime())
print "TP"
print bluetooth.lookup_name('2C:54:CF:79:C3:5E', timeout=5) or ' not present'
print "PW"
pri... | Tpeirce/Proximity-Lighting | test-tp.py | Python | gpl-3.0 | 1,765 |
#!/usr/bin/python
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distributed... | nazo/ansible | lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py | Python | gpl-3.0 | 16,288 |
__author__ = "Mikael Mortensen <mikaem@math.uio.no>"
__date__ = "2018-10-23"
__copyright__ = "Copyright (C) 2018 " + __author__
__license__ = "GNU Lesser GPL version 3 or any later version"
#pylint: disable=unbalanced-tuple-unpacking,unused-variable,function-redefined,unused-argument
from shenfun.spectralbase import ... | mikaem/spectralDNS | spectralDNS/solvers/KMMr.py | Python | gpl-3.0 | 19,773 |
# -*- coding: utf-8 -*-
"""
:copyright: Copyright 2014 by Łukasz Mierzwa
:contact: l.mierzwa@gmail.com
"""
from __future__ import unicode_literals
import pytest
from django.core.management import call_command
from upaas_admin.common.tests import MongoEngineTestCase
from upaas_admin.apps.scheduler.models im... | prymitive/upaas-admin | tests/test_migrate_run_plans.py | Python | gpl-3.0 | 1,423 |
#! /usr/bin/python
import requests
import bs4
import re
import datetime
import pg
conn = pg.connect(
host='localhost',
dbname='bidFTA',
user='postgres'
)
cons = pg.DB(host='localhost',
dbname='bidFTA',
user='postgres')
known = [x[0] for x in conn.query('SELECT num FROM auc... | bnjmnjhnsn/scraper | scraper.py | Python | gpl-3.0 | 8,978 |
class MifareClassic1k():
pass
| mchro/RejsekortReader | rfid/formats/mifare/MifareClassic1k.py | Python | gpl-3.0 | 34 |
from background_task import background
from .models import Notification
import requests
import json
from .models import Stream, Notification
import redis
import ast
import logging
logger = logging.getLogger('StreamBasedNotifs')
hdlr = logging.FileHandler('notifications.log')
formatter = logging.Formatter('%(asctime)s ... | bkaganyildiz/StreamBasedNotification | StreamBasedNotifs/capture/task.py | Python | gpl-3.0 | 3,089 |
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 27 20:17:27 2016
@author: alanschoen
"""
import sqlite3
conn = sqlite3.connect('../output/shelters.db')
print "Tables:"
for row in conn.execute("SELECT name FROM sqlite_master WHERE type='table'"):
print row
print "Shelters:"
for row in conn.execute('SELECT * FROM... | alanjschoen/hikkit | src/validate_db.py | Python | gpl-3.0 | 391 |
import datetime
import os.path
from sickchill import logger
from sickchill.helper.common import episode_num
from sickchill.oldbeard import common, db, helpers
MIN_DB_VERSION = 44
MAX_DB_VERSION = 44
class MainSanityCheck(db.DBSanityCheck):
def check(self):
self.fix_missing_table_indexes()
self.f... | Vagab0nd/SiCKRAGE | sickchill/oldbeard/databases/main.py | Python | gpl-3.0 | 15,696 |
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
import sys, string, traceback
import socket, asyncore
import logging, threading
class network(asyncore.dispatcher):
def __init__(self, iobuffer, nick, port):
logging_format = '%(asctime)-15s: %(message)s'
logging.basicConfig(filename='debug.log', format=logging_format, ... | nafac/microirc | microirc-0.1.1r34/network_old.py | Python | gpl-3.0 | 1,724 |
class Threshold(Block):
input = Input()
ratio = Output(input)
#passfail = Output(input)
average_period = .35
epoch = 13.0
# auto_mode = Bool(True)
# mode = Enum('increase', 'decrease', 'range')
auto_target = 0.8
# low_target = Float(0.90)
# high_target = Float(0.90)
de... | strfry/OpenNFB | blocks/threshold.py | Python | gpl-3.0 | 4,067 |
"""
formatting.py
Contains functions for formatting and working with strings.
The licensing for this module isn't solid, because I started working on this module before I had a proper
system for tracking code licences. If your code is in this file and you have any queries, contact me by
email at <lukeroge@gmail.com>!... | valesi/CloudBot | cloudbot/util/formatting.py | Python | gpl-3.0 | 11,182 |
# Python test set -- built-in functions
import ast
import builtins
import collections
import io
import locale
import os
import pickle
import platform
import random
import sys
import traceback
import types
import unittest
import warnings
from operator import neg
from test.support import TESTFN, unlink, run_unittest, c... | Microvellum/Fluid-Designer | win64-vc/2.78/python/lib/test/test_builtin.py | Python | gpl-3.0 | 60,127 |
# -*- coding: utf-8 -*- # NOQA
from service_framework.a_plugin import RestHandler as abstract_plugin # NOQA
class Service(abstract_plugin):
def get(self):
context = self.get_basic_context()
self.render("html/about.html", context=context)
config = {"service_name": "about",
"handler": ... | Romeren/Master | services/miscellanceous/ui_modules/about/restserver.py | Python | gpl-3.0 | 418 |
from atmospherics import Atmosphere
class Resource():
def __init__(self, name, peak_capacity, storage_capacity, obj=None):
self.name=name
self.available=0
self.previously_available=0
#maximum amount allowed, or bad things happen (fuses blow, pipes burst)
self.peak_c... | facepalm/bliss-station-game | src/module_resources.py | Python | gpl-3.0 | 2,149 |
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | nicoddemus/backtrader | backtrader/plot/plot.py | Python | gpl-3.0 | 24,950 |
#
# Copyright (C) 2013-2018 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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... | hmenke/espresso | testsuite/python/h5md.py | Python | gpl-3.0 | 8,047 |
# Copyright 2009 - 2011 Burak Sezer <purak@hadronproject.org>
#
# This file is part of lpms
#
# lpms 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) an... | hadronproject/lpms | lpms/operations/sync.py | Python | gpl-3.0 | 2,054 |
# coding=utf-8
"""Provider code for BTN."""
from __future__ import unicode_literals
import logging
import socket
import time
import jsonrpclib
from medusa import (
app,
scene_exceptions,
tv,
)
from medusa.common import cpu_presets
from medusa.helper.common import episode_num
from medusa.indexers.indexe... | fernandog/Medusa | medusa/providers/torrent/json/btn.py | Python | gpl-3.0 | 8,411 |
from leap.bitmask.config.providerconfig import ProviderConfig
from leap.bitmask.crypto.srpauth import SRPAuth
from leap.soledad.client import Soledad
from twisted.internet import reactor
import logging
logging.basicConfig(level=logging.DEBUG)
# EDIT THIS --------------------------------------------
user = u"USERNAME"... | leapcode/soledad | docs/client_examples/soledad_sync.py | Python | gpl-3.0 | 1,447 |
import os
import sys
import copy
import time
import datetime
import ctypes
from multiprocessing import Queue
from threading import Event, Lock, Thread
# Auto-detect whether we're running 32 or 64 bit, and decide which DLL to load.
if sys.maxsize > 2**32:
dll_name = "CEtAPIx64.dll"
print("Python Alea: detected ... | esdalmaijer/PyGaze | pygaze/_eyetracker/alea/alea.py | Python | gpl-3.0 | 73,900 |
#/usr/bin/env python
# -*- coding: utf-8 -*-
##
## Copyright (c) 2010-2012 Jorge J. García Flores, LIMSI/CNRS
## This file is part of Unoporuno.
## Unoporuno 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... | jorgegarciaflo/unoporuno | scripts/unoporuno_export.py | Python | gpl-3.0 | 3,167 |
# -*- coding: utf-8 -*-
# ##### 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.
#
#... | feureau/Small-Scripts | Blender/Blender config/2.91/scripts/addons/XNALaraMesh/import_obj.py | Python | gpl-3.0 | 62,932 |
"""
Django settings for skillserve project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import o... | Lucretiel/SkillServe | skillserve/settings.py | Python | gpl-3.0 | 4,428 |
#!/usr/bin/python
# coding=UTF-8
import smbus
import time
import datetime
import feedparser
import sys
# OpenWeatherMap key...
weatherKey=''
import pyowm
owm = pyowm.OWM(weatherKey)
# Define some device parameters
I2C_ADDR = 0x27 # I2C device address
LCD_WIDTH = 20 # Maximum characters per line
# Define some dev... | stsb11/SB-Pi-TFT | lcd_i2c.py | Python | gpl-3.0 | 4,163 |
"""
handhRL
Hulks and Horrors: The Roguelike
Copyright 2014 by John S. Berry III
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 versio... | jarcane/handhRL | handhrl.py | Python | gpl-3.0 | 66,404 |
# Copyright 2019-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | chrislit/abydos | tests/fingerprint/test_fingerprint_extract_position_frequency.py | Python | gpl-3.0 | 1,479 |
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved.
#
# This file is part of kiwi.
#
# kiwi 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 la... | b1-systems/kiwi | kiwi/system/shell.py | Python | gpl-3.0 | 3,930 |
# -*- coding: utf-8 -*-
# Copyright 2012 Vincent Jacques
# vincent@vincent-jacques.net
# This file is part of PyGithub. http://vincent-jacques.net/PyGithub
# PyGithub 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 Softwar... | andresriancho/PyGithub | github/IssuePullRequest.py | Python | gpl-3.0 | 2,100 |
import django_tables2 as tables
import os
from django_tables2.utils import A, AttributeDict
from django.utils.html import format_html, escape
from datetime import date
from .models import Transfer,Experiment,Frog,Permit, Notes, Document
class ExperimentTable(tables.Table):
#selection = tables.CheckBoxColumn(acce... | QBI-Software/FrogDB | frogs/tables.py | Python | gpl-3.0 | 10,287 |
#!/usr/bin/env python
#
# Copyright (C) 2017 - Massachusetts Institute of Technology (MIT)
#
# 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... | azariven/BioSig_SEAS | SEAS_Main/observation_effects/noise.py | Python | gpl-3.0 | 6,126 |
import sys
import os
sys.path.append(os.path.join(sys.path[0],"..",".."))
import argparse
from KicadModTree import *
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Commandline tool for generating ring pads.')
parser.add_argument('-n', '--name', metavar='fp_name', type=str,
... | pointhi/kicad-footprint-generator | scripts/PadGenerator/RingPad.py | Python | gpl-3.0 | 2,221 |
# -*- coding: utf-8 -*-
'''
Created on 6 mai 2012
'''
from events.event import Event
from missions.mission import Mission
from robots.robot import Robot
class UIMission(Mission):
def __init__(self, robot, can, ui):
super(self.__class__,self).__init__(robot, can, ui)
self.state = "repos"
... | 7Robot/cerveau | ia/missions/common/ui.py | Python | gpl-3.0 | 3,138 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.ui'
#
# Created: Tue Nov 18 17:53:57 2014
# by: PyQt5 UI code generator 5.3.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidge... | davy39/eric | Plugins/VcsPlugins/vcsMercurial/Ui_HgNewProjectOptionsDialog.py | Python | gpl-3.0 | 7,137 |
#!/usr/bin/env python
""" MultiQC module to parse output from HISAT2 """
from __future__ import print_function
from collections import OrderedDict
import logging
import re
from multiqc import config
from multiqc.plots import bargraph
from multiqc.modules.base_module import BaseMultiqcModule
# Initialise the logger
... | robinandeer/MultiQC | multiqc/modules/hisat2/hisat2.py | Python | gpl-3.0 | 6,980 |
#!/usr/bin/env python
# encoding: utf-8
"""
Created by Ben Scott on '26/01/2017'.
"""
import pytz
import datetime
def utc_timestamp():
now = datetime.datetime.utcnow()
return now.replace(tzinfo=pytz.utc)
| sparkd/fuse | fuse/utils.py | Python | gpl-3.0 | 215 |
#!/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'],
... | haad/ansible | lib/ansible/modules/network/aci/aci_tenant_span_dst_group.py | Python | gpl-3.0 | 4,099 |
from flask import Flask, render_template, request
from flask_socketio import SocketIO, send, emit, join_room, leave_room
from threading import Thread
import serial
import time
import json
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app)
arduino_conn = serial.Serial("/dev/ttyUSB0", ... | robinonsay/Eggsy | app.py | Python | gpl-3.0 | 1,188 |
teste = input ('digite algo: ')
print (teste)
| magaum/python_dos_irmao | imprimir_dados_digitados_no_shell.py | Python | gpl-3.0 | 46 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Copyright © 2016 by Michael Keil
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 yo... | RL-LDV-TUM/RobotAPI | robot/eSelector.py | Python | gpl-3.0 | 2,017 |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'OEILocation.gpgin'
db.delete_column(u'spoc_oeilocation'... | nens/spoc | spoc/migrations/0019_auto__del_field_oeilocation_gpgin.py | Python | gpl-3.0 | 24,485 |
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 18 15:35:39 2013
@author: Alison Kirkby
plots edi files (res/phase vs period) for all edis in a directory and saves out as png files
"""
import os
import mtpy.imaging.plotresponse as mtpr
from tests import EDI_DATA_DIR, EDI_DATA_DIR2
from tests.imaging import ImageTestC... | MTgeophysics/mtpy | tests/imaging/test_plotResponse.py | Python | gpl-3.0 | 1,651 |
# -*- coding: utf-8 -*-
"""
apt related tasks
"""
import os
import time
import codecs
from nuka.tasks import http
from nuka.task import Task
import logging as log
GPG_HEADER = b'-----BEGIN PGP PUBLIC KEY BLOCK-----'
def apt_watcher(delay, fd):
"""watcher for apt using APT::Status-Fd"""
def watcher(task, pr... | bearstech/nuka | nuka/tasks/apt.py | Python | gpl-3.0 | 14,188 |
import gzip
import urllib2
import zlib
import pytest
import simplejson as json
from django.conf import settings
from django.utils.six import BytesIO
from ..sampledata import SampleData
@pytest.fixture
def jobs_with_local_log(initial_data):
log = ("mozilla-inbound_ubuntu64_vm-debug_test-"
"mochitest-o... | avih/treeherder | tests/log_parser/test_tasks.py | Python | mpl-2.0 | 6,463 |
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os
import sys
import copy
from datetime import datetime
from functools import wraps
sys.pa... | Yukarumya/Yukarum-Redfoxes | testing/mozharness/scripts/spidermonkey_build.py | Python | mpl-2.0 | 17,369 |
"""
各领域中自定义错误类型的基类
有时候并不关注具体的错误,只需要知道错误的类型,这时候可以对这里定义的基类进行异常处理
"""
from everyclass.server.utils.api_helpers import STATUS_CODE_PERMISSION_DENIED, STATUS_CODE_INVALID_REQUEST, STATUS_CODE_INTERNAL_ERROR
class BizException(Exception):
"""所有业务错误类的基类,初始化时需要携带status_message和业务status_code"""
def __init__(self, st... | fr0der1c/EveryClass-server | everyclass/server/utils/base_exceptions.py | Python | mpl-2.0 | 1,307 |
# This is your project's main settings file that can be committed to your
# repo. If you need to override a setting locally, use settings_local.py
from funfactory.settings_base import *
import dj_database_url
from decouple import config, Csv
ALLOWED_HOSTS = config('ALLOWED_HOSTS', '', cast=Csv())
# This unset DATAB... | rhelmer/socorro | webapp-django/crashstats/settings/base.py | Python | mpl-2.0 | 19,647 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-24 03:21
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_post_description'),
]
operations = [
migrations.AlterField(
... | iannesbitt/iannesbitt.org | blog/migrations/0003_auto_20160723_2321.py | Python | mpl-2.0 | 461 |
# -*- coding: utf-8 -*-
# Copyright (c) 2016, Pierre Saikaly (saikalypierre@gmail.com)
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#====================... | PierSaik/RTE-MSDS | EurostagState.py | Python | mpl-2.0 | 3,686 |
from ott.utils.dao.base import BaseDao
from ott.utils import file_utils
from ott.utils import date_utils
from .alerts_dao import AlertsDao
from sqlalchemy.orm import object_session
from gtfsdb import Route, CurrentRoutes, util
try: Route.make_geom_lazy()
except: pass
import os
import logging
log = logging.getLogger(_... | OpenTransitTools/data | ott/data/dao/route_dao.py | Python | mpl-2.0 | 5,386 |