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 |
|---|---|---|---|---|---|
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_nyt', '0006_auto_20141229_1630'),
('wiki', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='ArticleSubscription',
fields=[
... | floemker/django-wiki | src/wiki/plugins/notifications/migrations/0001_initial.py | Python | gpl-3.0 | 881 |
#! /usr/bin/env python
import vcsn
from test import *
algos = ['hopcroft', 'moore', 'signature', 'weighted']
def aut(file):
return vcsn.automaton(filename = medir + "/" + file)
def file_to_string(file):
return open(medir + "/" + file, "r").read().strip()
def check(algo, aut, exp):
if isinstance(algo, ... | pombredanne/https-gitlab.lrde.epita.fr-vcsn-vcsn | tests/python/minimize.py | Python | gpl-3.0 | 5,086 |
import os
from route_model.config.network_config import NetworkConfig
class BikeNetworkConfig(NetworkConfig):
"""store network configuration data"""
def __init__(self, changes={}):
NetworkConfig.__init__(self)
self['data_dir']=r"X:\Projects\BikeModel\data\bike_model\input\network\2010_04_10"
self['link_file'... | sfcta/BikeRouter | Bike Model/bike_model/config/bike_network_config.py | Python | gpl-3.0 | 697 |
import re
import random
import bpy
import mathutils
from mathutils import Vector, Matrix
def matrix_sanitizer(matrix):
# reduces all values below threshold (+ or -) to 0.0, to avoid meaningless
# wandering floats.
coord_strip = lambda c: 0.0 if (-1.6e-5 <= c <= 1.6e-5) else c
san = lambda v: Vector... | kilon/sverchok | utils/sv_viewer_utils.py | Python | gpl-3.0 | 2,130 |
filename = 'pi_digits.txt'
with open(filename) as file_object:
contents = file_object.read() # read all
#print(contents)
print(contents.rstrip())
with open(filename) as file_object:
for line in file_object: # read line by line
print(line.rstrip())
with open(filename) as file_object:
l... | shucommon/little-routine | python/python-crash-course/file_reader.py | Python | gpl-3.0 | 524 |
#!/usr/bin/env python
# coding=utf-8
from .application import create_app
__version__ = '0.8'
app = create_app()
| rexzhang/rpress | rpress/__init__.py | Python | gpl-3.0 | 116 |
from typing import List
# Scan left, scan right, subtract actual heights, sum them all up
class Solution:
def trap(self, height: List[int]) -> int:
if not height:
return 0
left_heights = [0] * len(height)
right_heights = [0] * len(height)
left_max = 0
for idx,... | 1337/yesterday-i-learned | leetcode/42h.py | Python | gpl-3.0 | 1,171 |
#!/usr/bin/env python
#
#
# autohint math table builder
#
# Copyright 1996-2000 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By cont... | coringao/capitan | dependencies/alfont/freetype/src/autohint/mather.py | Python | gpl-3.0 | 1,699 |
#Import the pwntools library.
from pwn import *
#The process is like an actualy command you run, so you will have to adjust the path if your exploit isn't in the same directory as the challenge.
target = process("./b4_64")
#Just receive the first line, which for our purposes isn't important.
target.recvline()
#Store... | guyinatuxedo/escape | buf_ovf/b4_64/exploit.py | Python | gpl-3.0 | 1,016 |
from PySide import QtGui, QtCore
import os, struct, time
class ControlMainWindow(QtGui.QMainWindow):
_storeButtonUsed = False
_gv = None
_parser = None
_inter = None
_workpiecePos = [ 5, 5, 5 ]
_originOffset = [ 0, 0 ]
_polarCorrection = [ 1, 0 ]
_debounce = None
def __init__(self, chatBackend):
super(Cont... | stesie/PyPC-NC | Control/MainWindow.py | Python | gpl-3.0 | 11,785 |
from django.shortcuts import render_to_response
from django.template import RequestContext
def about(request):
return render_to_response('about.html',context_instance=RequestContext(request,{'active':'about'}))
| tstone2077/django-bases | site/main/views.py | Python | gpl-3.0 | 214 |
# Outspline - A highly modular and extensible outliner.
# Copyright (C) 2011 Dario Giovannetti <dev@dariogiovannetti.net>
#
# This file is part of Outspline.
#
# Outspline 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 F... | kynikos/outspline | src/outspline/interfaces/wxgui/rootw.py | Python | gpl-3.0 | 17,506 |
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2002 Ben Escoto <ben@emerose.org>
# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License... | hurlebouc/GDuplicity | Duplicity/duplicity-0.6.22/duplicity/backends/_ssh_pexpect.py | Python | gpl-3.0 | 14,459 |
#!/opt/jusers/venv/bin/python3
import grp
import os
import pwd
import random
import spwd
import subprocess
import sys
import click
from concurrent.futures import ProcessPoolExecutor
from ruamel.yaml import YAML
PROJECT = '/project'
DRY_RUN = False
VERBOSE = False
USERSDB = '/root/jusers.yml'
PWDLENG = 10
# PLUGINS... | ICOS-Carbon-Portal/infrastructure | devops/roles/icos.jupyter/files/jusers.py | Python | gpl-3.0 | 11,637 |
#!/usr/bin/python2
'''
This is an example of how to build a simple generator
'''
def my_reverse(data):
for index in range(len(data) - 1, -1, -1):
yield data[index]
for char in my_reverse('golf'):
print(char)
'''
Notice that 'my_reverse' is still recognized as a plain function and not
'generator' or... | nonZero/demos-python | src/examples/short/iteration/iterator_generator.py | Python | gpl-3.0 | 652 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
from __future__ import (unicode_literals, absolute_import,
division, print_function)
import os
import platform
from collections import defaultdict
from gutenbergtozim.database import Book, BookFormat, Url
from gute... | kiwix/gutenberg | gutenbergtozim/urls.py | Python | gpl-3.0 | 7,238 |
#!/usr/bin/env python
# --!-- coding: utf8 --!--
import subprocess
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QCursor
from PyQt5.QtWidgets import qApp, QMessageBox
from manuskript.exporter.basic import basicExporter, basicFormat
from manuskript.exporter.pandoc.HTML import HTML
from manuskript.exporter.pandoc... | olivierkes/manuskript | manuskript/exporter/pandoc/__init__.py | Python | gpl-3.0 | 3,708 |
from django.conf.urls.defaults import *
from tastypie.api import Api
#from tastytools.api import Api
from base.api import BaseResource
from bcmon.api import PlayoutResource as BcmonPlayoutResource
from bcmon.api import ChannelResource as BcmonChannelResource
from alibrary.api import MediaResource, ReleaseResource, ... | hzlf/openbroadcast | website/urls_api.py | Python | gpl-3.0 | 1,715 |
"""Basic graphic representing an image.
---NODOC---
TODO:
- use subsurface for crop transform (but requires rect to be within surface)
- GraphicView probably doesn't work if in different manager - need to have own _dirty?
- something that wraps a Graphic to be a copy of it, like Animation does, and has .graphic se... | ikn/wearhouse | game/engine/gfx/graphic.py | Python | gpl-3.0 | 51,464 |
# -*- 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 'PiezaConjunto.fragmentos'
db.delete_column(u'cachi_piez... | data-tsunami/museo-cachi | cachi/migrations/0008_auto__del_field_piezaconjunto_fragmentos.py | Python | gpl-3.0 | 15,336 |
################################################################################
### Copyright © 2012-2013 BlackDragonHunt
###
### This file is part of the Super Duper Script Editor.
###
### The Super Duper Script Editor is free software: you can redistribute it
### and/or modify it under the terms of the GNU Genera... | ThunderGemios10/The-Super-Duper-Script-Editor | script_analytics.py | Python | gpl-3.0 | 11,293 |
# -*- coding: utf-8 -*-
"""Tests haystack.utils ."""
import haystack.model
# init ctypes with a controlled type size
import ctypes
import logging
import unittest
import os
from haystack import model
from haystack import utils
from haystack import types
from haystack import target
from haystack.mappings.process impor... | trolldbois/python-haystack | test/haystack/test_utils.py | Python | gpl-3.0 | 12,507 |
import json
import time
from _md5 import md5
import requests
import RolevPlayer as r
def now_playing_last_fm(artist, track):
update_now_playing_sig = md5(("api_key" + r.API_KEY +
"artist" + artist +
"method" + "track.updateNowPlaying" +
... | SimeonRolev/RolevPlayerQT | RolevPlayer/Scrobbler.py | Python | gpl-3.0 | 1,642 |
# Author: Idan Gutman
# Modified by jkaberg, https://github.com/jkaberg for SceneAccess
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free So... | duramato/SickRage | sickbeard/providers/hdtorrents.py | Python | gpl-3.0 | 10,280 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# rdiffweb, A web interface to rdiff-backup repositories
# Copyright (C) 2014 rdiffweb contributors
#
# 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, ei... | sbellver/rdiffweb | rdiffweb/page_prefs.py | Python | gpl-3.0 | 5,423 |
# Elpy, the Emacs Lisp Python Environment
# Copyright (C) 2013 Jorgen Schaefer
# Author: Jorgen Schaefer <contact@jorgenschaefer.de>
# URL: http://github.com/jorgenschaefer/elpy
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as publishe... | joedursun/.emacs.d | elpa/elpy-20150226.1148/elpy/__init__.py | Python | gpl-3.0 | 1,388 |
#!/usr/bin/env python
"""
Compute and plot the Mandelbrot set using matplotlib.
"""
import time
import numpy as np
import pylab
from numba import jit
@jit
def mandel(x, y, max_iters):
"""
Given the real and imaginary parts of a complex number,
determine if it is a candidate for membership in the Mandel... | CCI-Tools/sandbox | numba/mandelbrot.py | Python | gpl-3.0 | 1,243 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cmd
from .plugins import Plugins
class Console(cmd.Cmd):
prompt = "WebHardening> "
_colors = {'red': '#FF0000',
'white': '#FFFFFF',
'black': '#000000'}
def __init__ (self):
"""Constructor"""
cmd... | elcodigok/WebHardening | core/api/console.py | Python | gpl-3.0 | 1,818 |
#!/usr/bin/env python
import gtk
import gobject
import os
from time import strftime, sleep
import datetime
from timekprpam import *
from timekprcommon import *
import locale
import gettext
import sys
APP_NAME = "timekpr"
#Translation stuff
#Get the local directory
local_path = '/usr/share/locale'
locale.setlocale(l... | simgunz/timekpr | src/original/gui/client/timekpr-client.py | Python | gpl-3.0 | 9,751 |
from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE
VARCHAR2 = VARCHAR
class AShareBalanceSheet(BaseModel):
"""
4.45 中国A股资产负债表
Attributes
----------
object_id: VARCHAR2(100)
对象ID
s_info_windcode: VARCHAR2(40)
Wind代码 ... | SnowWalkerJ/quantlib | quant/data/wind/tables/asharebalancesheet.py | Python | gpl-3.0 | 18,744 |
print("Before")
if 1:
print("In if")
if True:
print("True")
if 42:
print("42")
if 0:
print("Shouldn't see this: 0")
if False:
print("Shouldn't see this: False")
if None:
print("Shouldn't see this: None")
else:
print("Else")
if True:
if 1:
print("Nested If")
a = 5
if a == 7:
... | mattgreen/hython | test/control/if.py | Python | gpl-3.0 | 494 |
#!/usr/bin/env python
# Lucas Walter
# Configure a CameraInfo from a dynamic reconfigure interface
import rospy
from dynamic_reconfigure.server import Server
from sensor_msgs.msg import CameraInfo
from vimjay.cfg import DrCameraInfoConfig
class DrCameraInfo:
def __init__(self):
rospy.init_node('dr_camera... | lucasw/vimjay | scripts/dr_camera_info.py | Python | gpl-3.0 | 1,867 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
import babel
def language_name(code):
try:
return babel.Locale(code).get_language_name(code).title()
except Exception:
return other_language_names.get(code, code)
# Autonyms unknown by babel
# collected from CLDR,... | openzim/gutenberg | gutenbergtozim/iso639.py | Python | gpl-3.0 | 4,373 |
import files
CURRENT_LANGUAGE = 'ger'
class dictionary:
def __init__(self):
pass
score = {'ger': 'Punkte',
'bay': 'Punkte',
}
rank = {'ger': 'Platz',
'bay': 'Bloz',
}
time = {'ger': 'Datum',
'bay': 'Datum',
}
usern... | andb0t/Fuxenpruefung | src/i18n.py | Python | gpl-3.0 | 9,386 |
remote_server_ips = ('127.0.0.1', '127.0.0.1')
remote_server_ports = (8005, 8006)
assigned_server_index = 1 # in real system, client is distributed by a load balancing server in general; here I just simulate the balancing policy.
process_id = 4
client_addr = ('127.0.0.1', 7004)
poisson_lambda = 5
simu_len = 60
get_s... | SuperMass/distOS-lab3 | src/integrated/client4/client_config.py | Python | gpl-3.0 | 334 |
import urllib2 , re
name = raw_input("Enter GitHub Account: ")
project_name = raw_input("Enter the project name: ")
url = "https://github.com/" + name + "?tab=repositories"
searching = urllib2.urlopen(url)
reading = searching.read()
string = '<a href="/' + name + '/(.*?)" class="css-truncate css-truncate-targ... | haticeerturk/Github-Repositories | Github-Repositories.py | Python | gpl-3.0 | 957 |
##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... | Donkyhotay/MoonPy | zope/app/apidoc/browser/skin.py | Python | gpl-3.0 | 1,074 |
#!/usr/bin/env python2
# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
"""
Classify an image using individual model files
Use this script as an example to build your own tool
"""
import argparse
import os
import time
import struct
from google.protobuf import text_format
import numpy as np
impor... | dgschwend/hls_OO | TESTDATA_MAXI/data/classify.py | Python | gpl-3.0 | 14,639 |
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
## Copyright (C) 2013 Matt Ranostay <mranostay@gmail.com>
## Copyright (C) 2014 alberink <alberink@stampfini.org>
##
## This program is free software; you can redistribute it and/or modify
## it under the t... | uffejakobsen/libsigrokdecode | decoders/tca6408a/pd.py | Python | gpl-3.0 | 4,605 |
#! /usr/bin/env python
from __future__ import print_function
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
# Instanciate one distribution object
distribution = NonCentralChiSquare(1.5, 2.5)
print("Distribution ", repr(distribution))
print("Distribution ", distribution)
#... | dubourg/openturns | python/test/t_NonCentralChiSquare_std.py | Python | gpl-3.0 | 4,582 |
import apsw
import datetime
from playhouse.apsw_ext import *
from playhouse.tests.base import ModelTestCase
db = APSWDatabase(':memory:')
class BaseModel(Model):
class Meta:
database = db
class User(BaseModel):
username = CharField()
class Message(BaseModel):
user = ForeignKeyField(User)
m... | funkypawz/MakerRobot | peewee-master/playhouse/tests/test_apsw.py | Python | gpl-3.0 | 4,048 |
#!/usr/bin/python3
# Copyright 2013 Universidade Federal de Uberlândia
# Author: Lucas Clemente Vella <lucas.vella@i9nagi.ufu.br>
# Utility to batch create conference tags from CSV data and SVG template.
import os
import io
import os.path
import sys
import csv
import re
import subprocess
import itertools
import jinj... | lvella/tagmaker | tagmaker.py | Python | gpl-3.0 | 3,169 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('naf_autoticket', '0023_hostdevice_hostlocation'),
]
operations = [
migrations.CreateModel(
name='AlertCorrelatio... | kevinnguyeneng/django-uwsgi-nginx | app/naf_autoticket/migrations/0024_alertcorrelationweight.py | Python | gpl-3.0 | 1,043 |
# -*- coding: utf-8 -*-
# Copyright (C) 2010 by RoboLab - University of Extremadura
#
# This file is part of RoboComp
#
# RoboComp 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... | rajathkumarmp/robocomp | tools/rcmonitor/examples/laserViewer.py | Python | gpl-3.0 | 3,144 |
# -*- coding: utf-8 -*-
"""
github-indicator options
Author: Gabriel Patiño <gepatino@gmail.com>
License: Do whatever you want
"""
import optparse
import os
import xdg.BaseDirectory
from ghindicator import language
__version__ = (0, 0, 4)
# Hack to fix a missing function in my version of xdg
if not hasattr(xdg.Ba... | gepatino/github-indicator | ghindicator/options.py | Python | gpl-3.0 | 1,950 |
# -*- coding: utf-8 -*-
#
# This file is part of qemu-tools-elb
#
# Copyright (C) 2014 Eric Le Bihan <eric.le.bihan.dev@free.fr>
#
# 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 ... | elebihan/qemu-tools-elb | qemu_tools_elb/utils.py | Python | gpl-3.0 | 1,838 |
from ..writer.crawler import CrawlerWriter
from ..writer.run import RunConfigWriter
from ..writer.sentry import SentryConfigWriter
from ..writer.route import RouteConfigWriter
from ..writer.monitor import MonitorConfigWriter
class WriterFactory:
CRAWLER = 0
RUN_CONFIG = 1
SENTRY_CONFIG = 2
ROUTE... | franziz/arcrawler | lib/factory/writer.py | Python | gpl-3.0 | 940 |
# !!!!!!!!!!! Add a header to the documentation, that starts with something
# like "uncertainties.UFloat-compatible version of...", for all functions.
"""
Implementation of umath.py, with internals.
"""
# This module exists so as to define __all__, which in turn defines
# which functions are visible to the user in um... | EternityForest/KaithemAutomation | kaithem/src/thirdparty/uncertainties/umath_core.py | Python | gpl-3.0 | 14,767 |
import os
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
os.sys.path.insert(0, os.path.dirname(PROJECT_PATH))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = ()
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'dev.db',
}
}
TIME_ZONE = '... | hkage/django-issue-synchronisation | example/settings.py | Python | gpl-3.0 | 2,567 |
"""Endpoint to handle URL shorten request"""
from hashids import Hashids
from flask import Blueprint, request, jsonify, current_app
import models
from lib.url_validate import is_valid_url
from lib import error
api = Blueprint(__name__, "url")
@api.route("/url", methods=["POST"])
def shorten():
"""Shorten a pur... | tienhm-p4u/shorten_url | endpoint/__init__.py | Python | gpl-3.0 | 1,393 |
#!/usr/bin/env python3
from subprocess import getoutput
import threading
import time
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk as gtk
from gi.repository import GLib
class CheckConnection(threading.Thread):
def __init__(self, pppoedi):
super(CheckConnection,self).__init__()
... | LAR-UFES/pppoe-plugin | pppoediplugin/CheckConnection.py | Python | gpl-3.0 | 2,146 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 2017/10/19 12:52
# @Author : xxc727xxc (xxc727xxc@foxmail.com)
# @Version : 1.0.0
from datetime import datetime
import time
from core.template.jinja2.init import jinja_filter
@jinja_filter('datetime')
def datetime_filter(t):
delta = int(time.time() - ... | DreamerBear/awesome-py3-webapp | www/core/template/jinja2/filters.py | Python | gpl-3.0 | 667 |
"""
__canNotCommunicateWith.py_____________________________________________________
Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY)
Author: bogdan
Modified: Fri Jul 1 01:29:28 2016
_______________________________________________________________________________
"""
from ASGNode import *
from A... | Balannen/LSMASOMM | atom3/Formalisms/LSMASOMM/canNotCommunicateWith.py | Python | gpl-3.0 | 3,261 |
import sys
import ezpygame
from Box2D import b2World, b2PolygonShape
import shapes
from game import *
class MenuScene(ezpygame.Scene):
class MenuOption:
def __init__(self, callback, image, y_pos, selectable):
self.callback = callback
self.image = image
self.y_pos = y... | AndrewJamesTurner/Every-Womans-Ground | menu.py | Python | gpl-3.0 | 3,345 |
"""
AALMetaModel
Copyright (C) 2014 Walid Benghabrit
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 distribut... | hkff/AccLab | pyAAL/AALMetaModel.py | Python | gpl-3.0 | 66,923 |
# -*- coding: utf-8 -*-
import os, sys, shutils
if len(sys.argv) <= 1:
print('debe llamar al sistema usando : ')
print('python3 ' + sys.argv[0] + ' usuario dni')
exit(1)
usuario = sys.argv[1]
dni = sys.argv[2]
os.chdir('/home')
os.rename(usuario,dni)
os.chdir('/home/samba/profiles')
os.rename(usuario,dni... | pablodanielrey/python | gosa/changeOwnerDomain.py | Python | gpl-3.0 | 760 |
import json
import sqlite3
import os
from os import listdir
conn = sqlite3.connect('accidentsdb.sqlite')
cur = conn.cursor()
# Do some setup
cur.executescript('''
DROP TABLE IF EXISTS AccidentsData;
CREATE TABLE AccidentsData (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
State T... | dchucks/coursera-python-course | capstone/accidents-analysis/AccidentsJsonImporter.py | Python | gpl-3.0 | 2,735 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2017 F5 Networks Inc.
#
# 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
# ... | mryanlam/f5-ansible | library/bigip_user.py | Python | gpl-3.0 | 18,876 |
#!/usr/bin/env python
"""
This program analyzes data from NOAA weather stations.
Copyright 2012 Jeff Laughlin Consulting LLC, All Rights Reserved.
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, eit... | n1ywb/wx | main.py | Python | gpl-3.0 | 6,787 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import unittest
import urllib
from trytond.tests.test_tryton import (POOL, DB_NAME, USER, CONTEXT,
install_module)
from tryton... | openlabs/trytond | trytond/tests/test_mixins.py | Python | gpl-3.0 | 1,711 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Approach:
# - Listen for image load event and check the XMP tag GPano:UsePanoramaViewer
# https://developers.google.com/streetview/spherical-metadata
# - GExiv2 (in default Ubuntu install, but may not be robust enough to inconsistent/duplicate XMP tags)
# - ExifT... | Aerilius/eog_panorama | eog_panorama/eog_panorama.py | Python | gpl-3.0 | 15,642 |
from botplugin import BotPlugin
class CommandPing(BotPlugin):
def command_ping(self, bot, command, args, nick):
bot.speak('Pong!', paste=True)
| aelse/MrHappy | botplugins/cmd_ping.py | Python | gpl-3.0 | 158 |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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) an... | shawnsi/ansible | lib/ansible/playbook/task.py | Python | gpl-3.0 | 14,128 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
SUFFIX_NOT_ACRONYMS = set([
'esq',
'esquire',
'jr',
'jnr',
'sr',
'snr',
'2',
'i',
'ii',
'iii',
'iv',
'v',
])
SUFFIX_ACRONYMS = set([
'ae',
'afc',
'afm',
'arrc',
'bart',
'bem',
'bt... | konieboy/Seng_403 | Gender Computer/nameparser/config/suffixes.py | Python | gpl-3.0 | 1,616 |
"""
mtpy/processing/quality.py
Functions for the analysis of time series data quality.
Output can be visualised with the help of mtpy/imaging/plotquality.py
@UofA, 2013
(LK)
"""
#=================================================================
import numpy as np
import re
import sys
import os
import os.path ... | MTgeophysics/mtpy | legacy/quality.py | Python | gpl-3.0 | 445 |
from .ica import *
#from .ica_gpu import ica_gpu
| alvarouc/ica | ica/__init__.py | Python | gpl-3.0 | 49 |
__author__ = 'xiaoxiaol'
import sys
import os
import platform
if (platform.system() == "Linux"):
WORK_PATH = "/local1/xiaoxiaol/work"
else:
WORK_PATH = "/Users/xiaoxiaoliu/work"
p = WORK_PATH + '/src/morphology_analysis'
sys.path.append(p)
import bigneuron.recon_prescreening as rp
import bigneuron.plot_... | XiaoxiaoLiu/morphology_analysis | blast_neuron/plot_running_time.py | Python | gpl-3.0 | 2,344 |
from jarbas_utils.skill_tools import LILACSstorageQuery
from mycroft.util.log import getLogger
__authors__ = ["jarbas", "heinzschmidt"]
class ConceptNode():
'''
Node:
name:
type: "informational" <- all discussed nodes so far are informational
Connections:
synonims: [] <- is... | JarbasAI/JarbasAI | jarbas_skills/LILACS_core/concept.py | Python | gpl-3.0 | 25,737 |
"""This module deals with module paths, importing and the like.
"""
import inspect
import logging
import sys
import os
import imp
import importlib
logger = logging.getLogger(__name__)
def importModule(modulePath, name=None):
"""Import's the modulePath, if ModulePath is a dottedPath then the function will use impo... | dsparrow27/zoocore | zoo/libs/utils/modules.py | Python | gpl-3.0 | 4,491 |
#!/usr/bin/env python
# Author: Michael Devens
# Derek Ditch <github:@dcode>
# Github: https://github.com/co-devs
# Simple, poorly written script to download all of the files being shared
# by microsoft instead of downloading by hand. Downloads consecutively,
# will therefore take a while. Could be optimized, b... | co-devs/microsoftBookDownloader | microsoftBookDownloader.py | Python | gpl-3.0 | 3,629 |
'''
Task Coach - Your friendly task manager
Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org>
Task Coach 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
... | wdmchaft/taskcoach | taskcoachlib/gui/splash.py | Python | gpl-3.0 | 1,689 |
"""Farragone.
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."""
import gettext
from . import coreconf as _conf
gettext.inst... | ikn/farragone | farragone/__init__.py | Python | gpl-3.0 | 418 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import setuptools
import sys
from distutils.version import StrictVersion
version_file_path = os.path.join(
os.path.dirname(__file__),
'abjad',
'_version.py'
)
with open(version_file_path, 'r') as file_pointer:
file_contents_string = file_poi... | andrewyoung1991/abjad | setup.py | Python | gpl-3.0 | 2,910 |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import ... | detrout/python-htseq | HTSeq/StepVector.py | Python | gpl-3.0 | 25,079 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# live-magic - GUI frontend to create Debian LiveCDs, etc.
# Copyright (C) 2007-2010 Chris Lamb <lamby@debian.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
# t... | debian-live/live-magic | tests/test_sources_list.py | Python | gpl-3.0 | 4,591 |
# -*- coding: utf-8 -*-
# fields.py
# Copyright (C) 2013 LEAP
#
# 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... | kalikaneko/leap_mail | src/leap/mail/imap/fields.py | Python | gpl-3.0 | 4,610 |
from django.contrib import admin
from trainer.models import Language, Word, Card, Set
admin.site.register(Language)
admin.site.register(Word)
admin.site.register(Card)
admin.site.register(Set)
| chrigu6/vocabulary | vocabulary/trainer/admin.py | Python | gpl-3.0 | 195 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from datetime import date
from odoo import api, fields, models, _, exceptions
_logger = logging.getLogger(__name__)
class GamificationBadge(models.Model):
"""Badge object that users can send and re... | jeremiahyan/odoo | addons/gamification/models/gamification_badge.py | Python | gpl-3.0 | 9,182 |
# -*- encoding: utf-8 -*-
"""Base class for all UI operations"""
import logging
from robottelo.helpers import escape_search
from robottelo.ui.locators import locators, common_locators
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import TimeoutException
from selenium.co... | abalakh/robottelo | robottelo/ui/base.py | Python | gpl-3.0 | 19,925 |
# -*- coding: utf-8 -*-
'''
Mepinta
Copyright (c) 2011-2012, Joaquin G. Duo
This file is part of Mepinta.
Mepinta 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 opti... | joaduo/mepinta | core/python_core/mepinta/plugins_manager/metadata_wrappers/DataTypeMetadataWrapper.py | Python | gpl-3.0 | 1,735 |
""" implement internet free/busy vcal extension
very basic just to get something like this running:
BEGIN:VCALENDAR
PRODID:Zimbra-Calendar-Provider
VERSION:2.0
METHOD:PUBLISH
BEGIN:VFREEBUSY
ORGANIZER:mailto:ber201@mozilla.com
DTSTAMP:20140811T130952Z
DTSTART:20140811T130952Z
DTEND:20140812T130952Z
URL:http://zmmbo... | mozfreddyb/room-availability | ifb.py | Python | mpl-2.0 | 882 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from django.conf import settings
from django.http import HttpResponseRedirect
import l10n_utils
def secure_required(v... | davidwboswell/documentation_autoresponse | lib/bedrock_util.py | Python | mpl-2.0 | 995 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-03-21 12:36
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("clusters", "0020_emr_release_model")]
operations = [
mi... | mozilla/telemetry-analysis-service | atmo/clusters/migrations/0021_rename_cluster_emr_release.py | Python | mpl-2.0 | 1,083 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Contains Custom Exception Class"""
class CustomError(Exception):
"""
Attributes:
None
"""
def __init__(self, message, cause):
"""Custom Error that stores error reason.
Args:
cause (str): Reason for error.
... | ModestoCabrera/is210-week-12-synthesizing | task_02.py | Python | mpl-2.0 | 616 |
from .perceptron import MultilayerPerceptron
from .autoencoder import AutoEncoder
__all__ = ('MultilayerPerceptron', 'AutoEncoder',)
| rogerfan/simpleml | simpleml/neural/__init__.py | Python | mpl-2.0 | 134 |
from ludicrous.GeneratedLevel import GeneratedLevel
import random,math
__copying__="""
Written by Thomas Hori
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/."""
c... | thomas-hori/Repuge-NG | prelevula/SimpleDungeonLevel.py | Python | mpl-2.0 | 6,565 |
import pytest
from csirtg_smrt import Smrt
from csirtg_smrt.rule import Rule
from csirtg_smrt.constants import REMOTE_ADDR
from pprint import pprint
import os
DISABLE_TESTS = True
if os.environ.get('CSIRTG_SMRT_STIX_TEST'):
if os.environ['CSIRTG_SMRT_STIX_TEST'] == '1':
DISABLE_TESTS = False
if not DISAB... | csirtgadgets/csirtg-smrt-py | test/stix/test_stix.py | Python | mpl-2.0 | 1,012 |
# -*- coding: utf-8 -*-
"""
direct PAS
Python Application Services
----------------------------------------------------------------------------
(C) direct Netware Group - All rights reserved
https://www.direct-netware.de/redirect?pas;http;user
This Source Code Form is subject to the terms of the Mozilla Public Licens... | dNG-git/pas_http_user | src/dNG/module/controller/user/module.py | Python | mpl-2.0 | 2,059 |
import datetime
from airflow.models import DAG
from airflow.operators.latest_only_operator import LatestOnlyOperator
import utils.helpers as helpers
args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime.datetime(2017, 3, 1),
'retries': 1,
'retry_delay': datetime.timedelta(mi... | opentrials/opentrials-airflow | dags/data_contributions.py | Python | mpl-2.0 | 718 |
import os, sys
try:
from MonetDBtesting import process
except ImportError:
import process
def server_start(args):
sys.stderr.write('#mserver: "%s"\n' % ' '.join(args))
sys.stderr.flush()
srv = process.server(args = args, stdin = process.PIPE,
stdout = process.PIPE, stderr =... | zyzyis/monetdb | sql/test/BugTracker/Tests/mdb_starts_with_sql_debug_64.SF-1999354.py | Python | mpl-2.0 | 983 |
from django.views.generic import DetailView
from django.core.exceptions import PermissionDenied
from C4CApplication.views.utils import create_user
from C4CApplication.models.member import Member
class MemberDetailsView(DetailView):
model = Member
context_object_name = "member_shown"
templ... | dsarkozi/care4care-sdp-grp4 | Care4Care/C4CApplication/views/MemberDetailsView.py | Python | agpl-3.0 | 1,577 |
# -*- coding: utf-8 -*-
#
# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for
# more information about the licensing of this file.
""" Utilities for computation of statistics """
from collections import OrderedDict
import flask
from inginious.frontend.pages.course_admin.utils import make_... | UCL-INGI/INGInious | inginious/frontend/pages/course_admin/statistics.py | Python | agpl-3.0 | 13,926 |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import datet... | akintolga/superdesk-core | superdesk/activity.py | Python | agpl-3.0 | 10,291 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015-2018:
# Matthieu Estrada, ttamalfor@gmail.com
#
# This file is part of (AlignakApp).
#
# (AlignakApp) is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Sof... | Alignak-monitoring-contrib/alignak-app | test/test_system.py | Python | agpl-3.0 | 3,803 |
from sslyze import ServerNetworkLocation
from sslyze.plugins.elliptic_curves_plugin import (
SupportedEllipticCurvesScanResult,
SupportedEllipticCurvesImplementation,
)
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
from tests.markers import can_only_run_on_linux_64
from tests... | nabla-c0d3/sslyze | tests/plugins_tests/test_elliptic_curves_plugin.py | Python | agpl-3.0 | 2,148 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Module: account_tax_payment
# Author: Goran Kliska
# mail: gkliskaATgmail.com
# Copyright (C) 2011- Slobodni programi d.o.o., Zagreb
# htt... | BorgERP/borg-erp-6of3 | l10n_hr/account_tax_payment/__openerp__.py | Python | agpl-3.0 | 2,207 |
"""
gw2copilot/playerinfo.py
The latest version of this package is available at:
<https://github.com/jantman/gw2copilot>
################################################################################
Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
This file is part of gw2copilo... | jantman/gw2copilot | gw2copilot/playerinfo.py | Python | agpl-3.0 | 10,988 |
# -*- coding: utf-8 -*-
""" 1flow base processor pack (see metadata for details). """
# Always import this, it will give you a bunch of useful things handy.
from oneflow.core.models.reldb.processor.utils import * # NOQA
__all__ = [
'PROCESSOR_METADATA',
]
PROCESSOR_METADATA = {
'slug': '1fs-newspaper-common... | 1flow/1flow | oneflow/processors/newspaper_common.py | Python | agpl-3.0 | 592 |
# -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2017 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import re
f... | hlmnrmr/superdesk-core | superdesk/text_utils.py | Python | agpl-3.0 | 4,433 |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Marcelo Jorge Vieira <metal@alucinados.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at... | scorphus/politicos | tests/unit/handlers/test_political_party.py | Python | agpl-3.0 | 4,973 |