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 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import TransactionCase
class TestGetMailChannel(TransactionCase):
def setUp(self):
super(TestGetMailChannel, self).setUp()
self.operators = self.env['res.users'].create([{
... | t3dev/odoo | addons/im_livechat/tests/test_get_mail_channel.py | Python | gpl-3.0 | 2,152 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (C) 2013 BatOnBots-ML.
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
(... | BatOnBots-ML/batonbots-ml | BatOnBots-ML.py | Python | gpl-3.0 | 22,017 |
"""
Copyright (C) 2015 Quinn D Granfor <spootdev@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 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
... | MediaKraken/MediaKraken_Deployment | source/subprogram_match_anime_id.py | Python | gpl-3.0 | 3,312 |
# -*- coding: utf-8 -*-
# Mathmaker creates automatically maths exercises sheets
# with their answers
# Copyright 2006-2018 Nicolas Hainaux <nh.techn@gmail.com>
# This file is part of Mathmaker.
# Mathmaker is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | nicolashainaux/mathmaker | tests/integration/mental_calculation/04_yellow1/test_04_yellow1_W02b.py | Python | gpl-3.0 | 1,241 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Smewt - A smart collection manager
# Copyright (c) 2008 Nicolas Wack <wackou@smewt.com>
#
# Smewt 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 versio... | wackou/smewt | smewt/test/smewttest.py | Python | gpl-3.0 | 2,192 |
# -*- coding: utf-8 -*-
# Zeobuilder is an extensible GUI-toolkit for molecular model construction.
# Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center
# for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights
# reserved unless otherwise stated.
#
# This file is part of Z... | molmod/zeobuilder | share/plugins/basic/point.py | Python | gpl-3.0 | 7,413 |
# -*- coding: utf-8 -*-
MDL_BYTE = 1
MDL_UNSIGNED_BYTE = 2
MDL_SHORT = 3
MDL_UNSIGNED_SHORT = 4
MDL_HALF = 5
MDL_INT = 6
MDL_UNSIGNED_INT = 7
MDL_FLOAT = 8
MDL_DOUBLE = 9
MDL_FILE = 1
MDL_NODE = 2
MDL_MESH = 3
MDL_BONE = 4
MDL_VERTEXARRAY = 5
MDL_INDICEARRAY = 6
MDL_PROPERTIES = 7
MDL_ANIMATIONKEYS = 8
MDL_AABB = 9
M... | alrusdi/leadwerks-blender-exporter | io_scene_leadwerks/leadwerks/constants.py | Python | gpl-3.0 | 700 |
import os
import random
import traceback
from uuid import UUID
from OpenSSL import SSL
from twisted.internet import reactor, ssl, protocol
from twisted.python import log
from icl0ud.push.dispatch import BaseDispatch
from icl0ud.push.parser import APSParser
class MessageProxy(protocol.Protocol, BaseDispatch, object)... | meeee/pushproxy | src/icl0ud/push/intercept.py | Python | gpl-3.0 | 10,079 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2019 Manisha Singhal (ATIX AG)
#
# 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 ... | ATIX-AG/foreman-ansible-modules | plugins/modules/architecture.py | Python | gpl-3.0 | 3,245 |
#!/usr/bin/env python
import socket,sys,gateway_cfg,select,socketserver,http.server,urllib
from threading import *
class WebHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
parseParams = urllib.parse.urlparse(self.path)
if parseParams.path=="/t" :
self.send_error(404,"You can't pass!!")
... | fucxy/fucxy-node | gateway/modules.py | Python | gpl-3.0 | 1,672 |
from mumax2 import *
# Standard Problem 4
Nx = 32
Ny = 32
Nz = 1
setgridsize(Nx, Ny, Nz)
setcellsize(500e-9/Nx, 125e-9/Ny, 3e-9/Nz)
load('micromagnetism')
load('solver/rk12')
setv('Msat', 800e3)
setv('demag_acc', 7)
setv('Aex', 1.3e-11)
setv('alpha', 1)
setv('dt', 1e-12)
setv('m_maxerror', 1./1000)
new_maxabs("my_m... | mumax/2 | tests/reduce.py | Python | gpl-3.0 | 704 |
import re, math, itertools
from collections import defaultdict, deque
from sc2reader.events import *
from sc2reader.utils import DepotFile
from sc2reader.factories.plugins.utils import plugin
from pprint import pprint
from xml.dom import minidom
def framestr(frame):
if frame is None:
return 'None'
retu... | dsjoerg/ggpyjobs | sc2parse/plugins.py | Python | gpl-3.0 | 73,851 |
#!/usr/bin/env python3
import itertools as it
from pathlib import Path
from pprint import pprint
import shutil
import time
import numpy as np
import pandas as pd
from pysisyphus.calculators.Gaussian16 import Gaussian16
from pysisyphus.calculators.PySCF import PySCF
from pysisyphus.color import red, green
from pysisy... | eljost/pysisyphus | deprecated/tests/test_baker_ts/test_baker_ts.py | Python | gpl-3.0 | 6,474 |
#!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015-2020 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | mementum/backtrader | tests/test_ind_oscillator.py | Python | gpl-3.0 | 1,764 |
#!/usr/bin/env python3
from tkinter import *
#ttk = themed tkinter (excepté sous linux visiblement)
from tkinter.ttk import *
from dtmf import convertDTMF
from wave import open
dialWindow = Tk()
dialWindow.title("DTMF Dialer")
#NOTE: le nombre demandé est une string car d'après le standard DTMF il peut contenir les le... | s0r00t/ISN-DTMF | main.py | Python | gpl-3.0 | 2,967 |
# -*- coding: utf-8 -*-
#
# Created on Oct 15, 2013
# @authors: Jiri Spilka
# http://people.ciirc.cvut.cz/~spilkjir
# @2015, CIIRC, Czech Technical University in Prague
#
# Licensed under the terms of the GNU GENERAL PUBLIC LICENSE
# (see CTGViewer.py for details)
"""
PyQwtNavigationPlot
--------------------
The navi... | spilkjir/CTGViewer | src/PyQwtNavigationPlot.py | Python | gpl-3.0 | 7,973 |
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import textwra... | sharad/calibre | src/calibre/ebooks/html/to_zip.py | Python | gpl-3.0 | 4,758 |
#!/usr/bin/python
import RPi.GPIO as GPIO
import signal
import time
from on_off import *
class keypad():
def __init__(self, columnCount = 3):
GPIO.setmode(GPIO.BCM)
# CONSTANTS
if columnCount is 3:
self.KEYPAD = [
[1,2,3],
... | gacosta1/CATS | Software/src/keypad.py | Python | gpl-3.0 | 3,522 |
###
# Copyright (c) 2011, Alex Wood
# 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, an... | kg-bot/SupyBot | plugins/Asci/__init__.py | Python | gpl-3.0 | 2,672 |
from setuptools import setup
setup(name='scitools',
version='0.1',
description='The funniest joke in the world',
url='http://github.com/storborg/funniest',
author='Flying Circus',
author_email='flyingcircus@example.com',
license='MIT',
packages=['scitools'],
zip_safe=Fal... | binghongcha08/pyQMD | setup.py | Python | gpl-3.0 | 324 |
from couchpotato.core.logger import CPLog
from couchpotato.core.event import fireEvent
from couchpotato.core.media._base.providers.torrent.torrentday import Base
from couchpotato.core.media.movie.providers.base import MovieProvider
log = CPLog(__name__)
autoload = 'TorrentDay'
class TorrentDay(MovieProvider, Base):... | koomik/CouchPotatoServer | couchpotato/core/media/movie/providers/torrent/torrentday.py | Python | gpl-3.0 | 601 |
from django import forms
from django.contrib.auth.models import User
from models import Learner
class UserForm(forms.ModelForm):
password = forms.CharField(widget=forms.PasswordInput())
class Meta:
model = User
fields = ('username', 'email', 'password')
class LearnerForm(forms.ModelForm):
... | cheng10/Shanbay_Clone | words/forms.py | Python | gpl-3.0 | 407 |
# -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt, QLocale, QSettings, QMargins
from PyQt5.QtWidgets import *
import OpenNumismat
from OpenNumismat.EditCoinDialog.FormItems import NumberEdit
from OpenNumismat.Collection.CollectionFields import CollectionFieldsBase
from OpenNumismat.Reports import Report
from OpenNu... | kurtrr/open-numismat | OpenNumismat/Settings.py | Python | gpl-3.0 | 14,504 |
#!/usr/bin/env python
# coding=utf-8
import re
import random
from datetime import date
class Todo:
"""Single Todo item"""
_priority_regex = re.compile(r'\(([A-Z])\) ')
def __init__(self, item, index,
colored="", priority="", contexts=[], projects=[],
creation_date="", du... | AnthonyDiGirolamo/todotxt-machine | todotxt_machine/todo.py | Python | gpl-3.0 | 38,728 |
from bottle import run
from bottle_app import application
run(host='localhost', port=8080)
| snowfed/Chessology | run_locally.py | Python | gpl-3.0 | 92 |
################################ FIG J.2 P.683 ################################
import matplotlib.pyplot as plt
def freqplot(fdata, ydata, symbol='', ttl='', xlab='Frequency (Hz)', ylab=''):
""" FREQPLOT - Plot a function of frequency. See myplot for more features."""
#not sure what this means
#if nar... | vberthiaume/digitalFilters | ch2/freqplot.py | Python | gpl-3.0 | 469 |
#! /usr/bin/env python3
import sys
import csv
import menu_map
import datetime
db_input = sys.argv[1]
def normalize_elem(min_, max_, value):
'''DESCUBRA'''
return (value - min_)/(max_ - min_) - 0.5
def normalize(array, min_, max_):
'''DESCUBRA'''
for i in range(0, len(array)):
array[i] = norm... | guilhermerc/fournir-au-public | tools/fann_input_norm.py | Python | gpl-3.0 | 2,101 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-27 02:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | wrbutros/condominios | geoname/migrations/0001_initial.py | Python | gpl-3.0 | 1,067 |
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models.deletion import CASCADE
from django.db.models.signals import post_migrate
from django.db.utils import DEFAULT_DB_ALIAS
from django.utils.translat... | interlegis/sapl | sapl/base/models.py | Python | gpl-3.0 | 12,876 |
# Outspline - A highly modular and extensible outliner.
# Copyright (C) 2011-2014 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 Softw... | xguse/outspline | src/outspline/conf/plugins/wxtrayicon.py | Python | gpl-3.0 | 1,043 |
from __future__ import print_function
import tensorflow as tf
import numpy as np
from six.moves import cPickle as pickle
from sklearn.decomposition import PCA
from sklearn import preprocessing
import random
dataset = '/media/dat1/liao/dataset/new_new_try/'
train_data_filename = dataset + 'train_data_statis.pickle'
tra... | NCLAB2016/DF_STEALL_ELECTRIC | nn.py | Python | gpl-3.0 | 5,327 |
# ##### 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... | cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/scripts/freestyle/style_modules/nature.py | Python | gpl-3.0 | 1,715 |
#!/usr/bin/env python
'''waypoint command handling'''
import time, os, fnmatch, copy, platform
from pymavlink import mavutil, mavwp
from MAVProxy.modules.lib import mp_module
from MAVProxy.modules.lib import mp_util
if mp_util.has_wxpython:
from MAVProxy.modules.lib.mp_menu import *
class WPModule(mp_module.MPMod... | monkeypants/MAVProxy | MAVProxy/modules/mavproxy_wp.py | Python | gpl-3.0 | 33,902 |
# nnmware(c)2012-2020
from nnmware.core.models import NnmwareUser
class User(NnmwareUser):
pass
| nnmware/nnmware | docs/demo/models.py | Python | gpl-3.0 | 104 |
from django.http import Http404
from django.shortcuts import render
from directory.forms import SearchForm
def home(request):
searchform = SearchForm()
return render(request, 'onigiri/index.html', {'searchform' : searchform})
| cloudiirain/onigiri | onigiri/views.py | Python | gpl-3.0 | 235 |
''' Test_RSS_Policy_JobEfficiencyPolicy
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import unittest
import DIRAC.ResourceStatusSystem.Policy.JobEfficiencyPolicy as moduleTested
#######################################################################... | yujikato/DIRAC | src/DIRAC/ResourceStatusSystem/Policy/test/Test_RSS_Policy_JobEfficiencyPolicy.py | Python | gpl-3.0 | 3,905 |
# -*- coding: utf-8 -*-
#
# tests/test_hjp.py
#
# Copyright (C) 2011-18 Tomáš Pecina <tomas@pecina.cz>
#
# This file is part of legal.pecina.cz, a web-based toolbox for lawyers.
#
# This application is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# publi... | tompecina/legal | tests/test_hjp.py | Python | gpl-3.0 | 38,939 |
import numpy as np
from astropy import coordinates
from astropy import wcs
import astropy.units as u
from matplotlib.pyplot import figure
class World2ScreenMPL:
"""
Create a World2ScreenMPL for vizualizing a MOC in a matplotlib axis.
Parameters
----------
fig : `~matplotlib.pyplot.figure`
... | tboch/mocpy | mocpy/moc/plot/wcs.py | Python | gpl-3.0 | 3,529 |
#gravSim.py
import pygame
import math
frame_count = -1
WIDTH=640
HEIGHT=480
Quit = False
pygame.init()
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption('Gravity Sim')
objects_group = pygame.sprite.Group()
clock = pygame.time.Clock()
class Object(): #where the magic happens. Ideally there... | Laodicean/pyGravSim | gravSim.py | Python | gpl-3.0 | 4,070 |
#! /usr/bin/python
import re
input = raw_input()
result = re.findall(r"[0-9]",input)
print(result)
| JesusAMR/ProgramasUNI | testing.py | Python | gpl-3.0 | 101 |
from engine.subaction import *
# Go to the next frame in the action
class nextFrame(SubAction):
subact_group = 'Control'
fields = []
def execute(self, _action, _actor):
SubAction.execute(self, _action, _actor)
_action.frame += 1
def getDisplayName(self):
re... | eaglgenes101/universalSmashSystem | engine/subactions/control/nextFrame.py | Python | gpl-3.0 | 339 |
# -*- coding: utf-8 -*-
from django.db import models
from gestioneide.models import DIAS_SEMANA
import calendar
class Curso(models.Model):
year = models.ForeignKey('gestioneide.Year',on_delete=models.CASCADE)
nombre = models.CharField(max_length=50,default="")
def __unicode__(self):
return "%s - %s... | Etxea/gestioneide | turismo/models.py | Python | gpl-3.0 | 3,329 |
from collections import OrderedDict
import numpy
from numpy.testing import assert_array_almost_equal, assert_array_equal
import pandas
import pandas.testing as tm
import pytest
from sksurv import column
@pytest.fixture()
def numeric_data():
data = pandas.DataFrame(numpy.arange(50, dtype=float).reshape(10, 5))
... | sebp/scikit-survival | tests/test_column.py | Python | gpl-3.0 | 14,897 |
#!/usr/bin/env python3
## get_protein_www.py --
## get a protein sequence from the Uniprot or NCBI/Refseq web sites using the accession
##
import sys
import re
import textwrap
import time
import requests
ncbi_url = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?"
uniprot_url = "https://www.uniprot.org... | uwbmrb/BMRB-API | server/wsgi/bmrbapi/submodules/fasta36/scripts/get_protein.py | Python | gpl-3.0 | 1,680 |
# -*- coding: utf-8 -*-
from .context import igor
import unittest
class AdvancedTestSuite(unittest.TestCase):
"""Advanced test cases."""
def test_thoughts(self):
igor.hmm()
if __name__ == '__main__':
unittest.main()
| happykhan/igor | tests/test_advanced.py | Python | gpl-3.0 | 243 |
# 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 in the hope that it will be useful,
# b... | fracpete/python-weka-wrapper-examples | src/wekaexamples/flow/for_loop.py | Python | gpl-3.0 | 1,959 |
"""
buildtest cli: include functions to build, get test configurations, and
interact with a global configuration for buildtest.
"""
import argparse
import os
from termcolor import colored
from buildtest import BUILDTEST_VERSION, BUILDTEST_COPYRIGHT
from buildtest.defaults import BUILD_REPORT
from buildtest.schemas.def... | shahzebsiddiqui/BuildTest | buildtest/cli/__init__.py | Python | gpl-3.0 | 15,098 |
import numpy as np
import sympy as sp
from pystencils import Assignment, fields, TypedSymbol, Target
from pystencils.astnodes import Block, Conditional
from pystencils.simp import sympy_cse
from lbmpy import LBMConfig, LBStencil, Method, Stencil
from lbmpy.creationfunctions import create_lb_method
from lbmpy.boundari... | lssfau/walberla | apps/showcases/PhaseFieldAllenCahn/GPU/multiphase_codegen.py | Python | gpl-3.0 | 9,930 |
# Copyright (c) Mathias Kaerlev 2012.
# This file is part of Anaconda.
# Anaconda 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.
# ... | joaormatos/anaconda | mmfparser/data/chunkloaders/extdata.py | Python | gpl-3.0 | 1,201 |
#!/usr/bin/env python3
# -*- coding: utf8 -*-
"""
This script changes given rst document in place, converting old test action
directives ``test_step`` and ``test_result`` into ``test_action``.
It's a best effort hack, not an official part of pylatest (-: I realized that
such tool could be quite straighforward given a... | marbu/pylatest | contrib/convertdirectives.py | Python | gpl-3.0 | 2,851 |
from article_metrics import models, utils
import json
from django.conf import settings
import boto3
import logging
LOG = logging.getLogger(__name__)
def sns_topic_arn(**overrides):
"returns an arn path to an AWS event bus. this is used to connect and send/receive events"
vals = {}
vals.update(settings.EV... | elifesciences/elife-metrics | src/article_metrics/events.py | Python | gpl-3.0 | 1,616 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import six
import sys
from functools import wraps
from twisted.internet import defer
from twisted.trial import unittest
log = lo... | Stibbons/Squirrel | backend/squirrel/common/unittest.py | Python | gpl-3.0 | 4,675 |
#Hello World from pycom LoPy
import machine, pycom, time, sys, uos
pycom.heartbeat(False)
print("")
print("Hello World from pycom LoPy")
print("Running Python %s on %s" %(sys.version, uos.uname() [4]))
print("CPU clock = %d MHz" %(int(machine.freq()[0]/1000/1000)))
print("On-board RGB LED will blink 10... | ckuehnel/pycom | blink.py | Python | gpl-3.0 | 701 |
# Copyright 2018-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 | abydos/distance/_upholt.py | Python | gpl-3.0 | 4,479 |
# -*- coding: utf-8 -*-
# Copyright (C) 2010-2015 Avencall
#
# 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... | docteurmicro50/xivo-provd-plugins | plugins/xivo-snom/common/common.py | Python | gpl-3.0 | 15,004 |
"""
Python library to control an UR robot through its TCP/IP interface
Documentation from universal robots:
http://support.universal-robots.com/URRobot/RemoteAccess
"""
import logging
from urx import urrtmon
from urx import ursecmon
__author__ = "Olivier Roulet-Dubonnet"
__copyright__ = "Copyright 2011-2015, Sintef ... | auneri/python-urx | urx/urrobot.py | Python | gpl-3.0 | 15,381 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/gugu/w/calibre/src/calibre/gui2/convert/azw3_output.ui'
#
# Created: Thu Jul 19 23:32:30 2012
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
... | Eksmo/calibre | src/calibre/gui2/convert/azw3_output_ui.py | Python | gpl-3.0 | 2,960 |
from __future__ import absolute_import
import scanomatic.generics.model as model
class SegmentationModel(model.Model):
def __init__(self, dydt=None, dydt_ranks=None, dydt_signs=None, d2yd2t=None,
d2yd2t_signs=None, phases=None, offset=0, log2_curve=None, times=None,
plate=None,... | Scan-o-Matic/scanomatic | scanomatic/models/phases_models.py | Python | gpl-3.0 | 1,102 |
from Tkinter import *
import tkFileDialog
import os
#from ttk import Frame, Button, Style, Entry, Radiobutton
class gui(Frame):
def __init__(self, parent):
Frame.__init__(self, parent)
self.parent = parent
self.createUI()
def select_container(self):
filename = tkFileDialog.askopenfilename()
if os.pat... | 4144414D/pytruecrypt | examples/image-gui.py | Python | gpl-3.0 | 11,107 |
"""
Django settings for testapp project.
Generated by 'django-admin startproject' using Django 1.8.18.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pat... | edison7500/django-leancloud-sms | testapp/settings.py | Python | gpl-3.0 | 2,833 |
#!/usr/bin/python
#
#####################################################################################
# Scriptname : sat6-register.py
# Scriptauthor : Frank Reimer
# Creation date : 2016-01-05
# License : GPL v. 3
#
# This script was inspired by https://github.com/sideangleside/sat6-bootstrap
#
####################... | hambuergaer/sat6_client_configuration | sat6-register.py | Python | gpl-3.0 | 20,789 |
"""All main program modules."""
from . import autostart, listeners, settings, sound_play, timer_events
from . import tray
# useful if "from reminders_modules import *" will be called. Also prevent
# warnings in pyflakes
__all__ = [
'autostart', 'listeners', 'settings', 'sound_play',
'timer_events', 'tray',
]
| pythonization/reminder2standBy | reminder2standBy/reminders_modules/__init__.py | Python | gpl-3.0 | 320 |
# Flexlay - A Generic 2D Game Editor
# Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option)... | SuperTux/flexlay | flexlay/color.py | Python | gpl-3.0 | 2,408 |
__author__ = 'Chris Ottersen'
values = {
"id_short": None,
"id_byte": None,
"thread_id": None,
"thread_length": None,
"u0": None,
"FILETIME_0": None,
"message_count": None,
"u1": None,
"phone_0": None,
"phone_1": None,
"phone_2": None,
"FILETIME_1": None
}
| WindowsPhoneForensics/find_my_texts_wp8 | find_my_texts_wp8/recovery_expressions/thread_record/default/full.py | Python | gpl-3.0 | 306 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-10-02 22:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('foro', '0002_comentario_usuario'),
]
operations = [
migrations.AddField(
... | corumcorp/redsentir | redsentir/foro/migrations/0003_comentario_fecha.py | Python | gpl-3.0 | 453 |
# -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2018 CERN.
#
# INSPIRE 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 ... | inspirehep/inspire-next | inspirehep/modules/authors/forms.py | Python | gpl-3.0 | 17,833 |
#
# Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | phw/weblate | weblate/machinery/googlev3.py | Python | gpl-3.0 | 2,729 |
z = 4
w = 0
z1 = 1
x = w + z1 # x = 1
y = x + 1 # y = 2
w1 = y # w1 = 2
print w1
| cantora/pyc | p0tests/grader_tests/reg_alloc_0.py | Python | gpl-3.0 | 86 |
from commonregex import CommonRegex
parsed_text = CommonRegex("""John, please get that article on www.linkedin.com to me by 5:00PM
on Jan 9th 2012. 4:00 would be ideal, actually. If you have any
questions, You can reach me at (519)-236-2723x341 or get in ... | EuropeanSocialInnovationDatabase/ESID-main | TextMining/NER/testingcommonRegex.py | Python | gpl-3.0 | 626 |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
essToolkit
Space Syntax Toolkit
Set of tools for essential space syntax network analysis and results exploration
-------------------
begin ... | DougFirErickson/qgisSpaceSyntaxToolkit | esstoolkit/explorer/AttributeSymbology.py | Python | gpl-3.0 | 10,530 |
#! /usr/bin/python -O
# -*- coding: utf-8 -*-
#
# CANTA - A free entertaining educational software for singing
# Copyright (C) 2007 S. Huchler, A. Kattner, F. Lopez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | spiderbit/canta-ng | event/keyboard_event.py | Python | gpl-3.0 | 3,140 |
import media
import fresh_tomatoes
toy_story=media.Movie(
"Toy Story",
"A story of a boy and his toys that come to life",
"http://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg",
"https://www.youtube.com/watch?v=vwyZH85NQC4")
#print (toy_story.storyline)
avatar=media.Movie(
"Avatar",
"A marine on an alien... | pinakinathc/python_code | movies/entertainment_center.py | Python | gpl-3.0 | 1,497 |
# -*- coding: utf-8 -*-
import os
from math import factorial
import functools
def memoize(func):
cache = {}
def memoized(key):
# Returned, new, memoized version of decorated function
if key not in cache:
cache[key] = func(key)
return cache[key]
return functools.updat... | NicovincX2/Python-3.5 | Algorithmique/Mathématiques discrètes/Combinatoire/Nombre de Catalan/nb_catalan_3methods.py | Python | gpl-3.0 | 1,091 |
#!/usr/bin/env python3
import urllib
import codecs
from bs4 import BeautifulSoup
from sys import argv
import re,time
class Translate:
def start(self):
self._get_html_sourse()
self._get_content("enc")
self._remove_tag()
self.print_result()
def _get_html_sourse(self):
wo... | yonglong009/pycharmNoteBook | lean_python3/dive_into_p3/tanslate.py | Python | gpl-3.0 | 1,160 |
from kivy.uix.label import Label
from kivy.uix.behaviors import ButtonBehavior
from widgets.layoutint import GridLayoutInt
from kivy.uix.image import Image
from kivy.properties import StringProperty, ListProperty, ObjectProperty, NumericProperty, BooleanProperty
from kivy.compat import string_types
from kivy.factory im... | insiderr/insiderr-app | app/widgets/bar.py | Python | gpl-3.0 | 1,558 |
class Solution(object):
def trailingZeroes(self, n):
"""
:type n: int
:rtype: int
"""
count_5 = 0
while n > 0:
count_5 += n / 5
n /= 5
return count_5
| zqfan/leetcode | algorithms/172. Factorial Trailing Zeroes/solution.py | Python | gpl-3.0 | 234 |
# PyAnimation - Animation, in a terminal.
# Copyright (C) 2015 Nathaniel Olsen
#
# 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 ... | UltimateNate/TURPG | PyAnimationEngine.py | Python | gpl-3.0 | 2,064 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Taco Module for Python documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 17 16:17:48 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are prese... | grahambell/taco-python | doc/conf.py | Python | gpl-3.0 | 8,346 |
#
# Autor: Igor Nunes
# Materia: Programa Python
# Orientador : Ronaldo
# Aula de Banco Basico Delete
#
import mysql.connector
config =
{
'host':'localhost',
'port': 3306,
'database':'LojaDB',
'user':'admin',
'password':'admin'
}
db = mysql.connector.connector(**config)
cur... | ronas/PythonGNF | Igor/BancoDadosDelete.py | Python | gpl-3.0 | 548 |
# addImagingInfo.py: Python function to add meta info to a CASA image
# Copyright (C) 2012
# ASTRON (Netherlands Institute for Radio Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This file is part of the LOFAR software suite.
# The LOFAR software suite is free software: you can redistribute it and/or
#... | jjdmol/LOFAR | CEP/Imager/AWImager2/src/addImagingInfo.py | Python | gpl-3.0 | 16,822 |
from django.db import models
class Person(models.Model):
first_name = models.CharField(max_length=25, default='Rico')
last_name = models.CharField(max_length=25, blank=True)
hair_color = models.CharField(max_length=10, blank=True)
eye_color = models.CharField(max_length=10)
age = models.IntegerFie... | ricomoss/learn-tech | python/track_2/lesson2/apples_to_apples/common/models.py | Python | gpl-3.0 | 490 |
#!/usr/bin/python
"""
Read It Later (RIL) module for feedIO.
"""
__version__ = "0.0.5"
__license__ = """
Copyright (C) 2011 Sri Lanka Institute of Information Technology.
feedIO is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... | seejay/feedIO | feedio/rilPlugin.py | Python | gpl-3.0 | 1,738 |
"""
This module is a compatibility layer between the Virtual Retina configurations and behaviour and the python implementation.
"""
import xml.etree.ElementTree as ET
import collections
import copy
from future.utils import iteritems as _iteritems
def dict_recursive_update(d, u):
for k, v in _iteritems(u):
... | jahuth/convis | convis/retina_virtualretina.py | Python | gpl-3.0 | 30,950 |
#!/usr/bin/env python
#
# This file is protected by Copyright. Please refer to the COPYRIGHT file
# distributed with this source distribution.
#
# This file is part of GNUHAWK.
#
# GNUHAWK is free software: you can redistribute it and/or modify is under the
# terms of the GNU General Public License as published by ... | RedhawkSDR/integration-gnuhawk | components/add_const_ss/tests/test_add_const_ss.py | Python | gpl-3.0 | 4,531 |
#!/usr/bin/env python2.7
#
# ProFTPD versions - create proftpd versions and dump them into versions.h
#
# Copyright (c) 2015 by Hypsurus
#
#
import sys
# The proftpd versions cycle:
# proftpd-1.3.2rc1
# proftpd-1.3.2rc2
# proftpd-1.3.2rc3
# proftpd-1.3.2rc4
# proftpd-1.3.2
# proftpd-1.3.2a
# proftpd-1.3.2b
# p... | KorayAgaya/ftpmap | tools/proftpd_versions.py | Python | gpl-3.0 | 1,228 |
# -*- coding: utf-8 -*-
#################################################################################################
import json
import logging
import hashlib
import socket
import time
from datetime import datetime
from distutils.version import LooseVersion
from credentials import Credentials
from http import H... | angelblue05/plugin.video.emby | libraries/emby/core/connection_manager.py | Python | gpl-3.0 | 28,487 |
"""
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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.
T... | odicraig/kodi2odi | addons/plugin.video.salts/scrapers/rlshd_scraper.py | Python | gpl-3.0 | 3,957 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
import django.db.models.deletion
from django.utils.timezone import utc
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('events', '0001_initial'),... | Apogaea/voldb | volunteer/apps/shifts/migrations/0012_auto_20150312_1137.py | Python | gpl-3.0 | 2,426 |
from django.contrib import admin
from zds.forum.models import ForumCategory, Forum, Post, Topic, TopicRead
class TopicAdmin(admin.ModelAdmin):
list_display = ("title", "author", "forum", "pubdate")
list_filter = ("is_locked", "is_sticky")
raw_id_fields = ("forum", "author", "last_message", "tags", "solve... | ChantyTaguan/zds-site | zds/forum/admin.py | Python | gpl-3.0 | 1,098 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# TerminalRoastDB, released under GPLv3
# Roaster Set Time
import Pyro4
import sys
new_roaster_time = sys.argv[1]
roast_control = Pyro4.Proxy("PYRONAME:roaster.sr700")
if int(new_roaster_time) > 0 and int(new_roaster_time) <1200:
roast_control.set_time(new_roaster_ti... | infinigrove/TerminalRoastDB | cmds/Roaster_Set_Time.py | Python | gpl-3.0 | 324 |
################################################################################
# The Frenetic Project #
# frenetic@frenetic-lang.org #
#############################################################################... | XianliangJ/collections | CNUpdates/updates/update_lib.py | Python | gpl-3.0 | 49,836 |
# -*- coding: utf-8 -*-
# Test links (random.bin):
# http://www13.zippyshare.com/v/18665333/file.html
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
__pattern__ = r'(?P<HOST>http:/... | estaban/pyload | module/plugins/hoster/ZippyshareCom.py | Python | gpl-3.0 | 2,928 |
"""
Pull third-party libraries here
""" | kuz/BrainActivity3D | lib/__init__.py | Python | gpl-3.0 | 39 |
import pyodbc
import sqlite3 as lite
from datetime import datetime, timedelta
class GetDataFromPc(object):
def __init__(self, login, psw, host, dbase):
self.psw = psw
self.login = login
self.host = host
self.dbase = dbase
def read(self):
driver = '{FreeTDS}'
cn... | BEugen/AI | DATA/datasql.py | Python | gpl-3.0 | 8,727 |
#!/usr/bin/python
# -*- coding:utf-8 -*-
import functions
import Image
import math, time
import sys
import pygtk
pygtk.require('2.0')
import gtk
import gtk.gtkgl
from OpenGL.GL import *
from OpenGL.GLU import *
from threading import Thread
import gobject
gobject.threads_init() # For prevent GTK freeze
import dbus
... | magestik/TuxStereoViewer | src/lib_shutter.py | Python | gpl-3.0 | 6,327 |
from uaperrors import StepError
import sys
import copy
import csv
import glob
from logging import getLogger
import os
import re
import yaml
from abstract_step import AbstractSourceStep
logger = getLogger('uap_logger')
class RawFileSources(AbstractSourceStep):
def __init__(self, pipeline):
super(RawFileS... | kmpf/uap | include/sources/raw_file_sources.py | Python | gpl-3.0 | 2,778 |
# Do not Store images in the database, rather store True or False
# and keep image names same as the primary key of the item
# Delete the images of the items that have been deleted
# =================================================================
# Have the images evaluated when they get uploaded
# Save the evaluated... | Luther-Lost-and-Found/Lost-and-Found | Image_Proc/color_detect_server.py | Python | gpl-3.0 | 2,888 |
"""
Created at 15/10/17
__author__ = 'Sergio Padilla'
"""
import sys
from argparse import ArgumentParser
from pymongo import MongoClient
def get_javascript_functions(database):
"""Add elements in database."""
system = database.system_js
print("JavaScript functions stored in database: ")
print(system.... | SergioPadilla/tfg | computering/python/scripts/get_javascript_functions.py | Python | gpl-3.0 | 821 |
# -*- coding: utf-8 -*-
"""
Created on 4 dec. 2018, 16:00
Copyright François Durand 2014-2018
fradurand@gmail.com
This file is part of SVVAMP.
SVVAMP is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, e... | francois-durand/svvamp | svvamp/rules/rule_condorcet_sum_defeats.py | Python | gpl-3.0 | 12,230 |
# (C) British Crown Copyright 2010 - 2013, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | kwilliams-mo/iris | lib/iris/tests/test_io_init.py | Python | gpl-3.0 | 5,347 |