code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
from time import time from gi.repository import GLib, GObject from pychess.Utils.const import WHITE, BLACK from pychess.System.Log import log class TimeModel(GObject.GObject): __gsignals__ = { "player_changed": (GObject.SignalFlags.RUN_FIRST, None, ()), "time_changed": (GObject.SignalFlags.RUN_...
cajone/pychess
lib/pychess/Utils/TimeModel.py
Python
gpl-3.0
8,916
# -*- coding: utf-8 -*- __author__ = 'ogaidukov' import os.path import argparse import tornado.ioloop import tornado.httpserver import tornado.web from commonlib import configparser, logmaker from rotabanner.lib import route import redis import pygeoip config = None logger = None args = None redisdb = None geoip = N...
olegvg/me-advert
me-advert/rotabanner/application.py
Python
gpl-3.0
2,183
from collections import defaultdict from math import log2 as log from gui.transcriptions import STANDARD_SYMBOLS from imports import (QDialog, QHBoxLayout, QVBoxLayout, QGroupBox, QRadioButton, QButtonGroup, QPushButton, QStackedWidget, QWidget, QComboBox, QMessageBox, QLabel, QLineEdit, QTableWidge...
PhonologicalCorpusTools/SLP-Annotator
slpa/gui/functional_load.py
Python
gpl-3.0
15,434
# encoding=utf8 # pylint: disable=W0611 """ The utility Author: lipixun Created Time : 日 2/12 14:14:50 2017 File Name: utils.py Description: """ from spec import DataPath # Import json try: import simplejson as json except ImportError: import json # NLTK import nltk nltk.data.path = [ Data...
lipixun/newsanalyzer4w
newsanalyzer/utils.py
Python
gpl-3.0
329
""" WSGI config for antibiobank project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "antibiobank.settings") from djang...
dridk/antibiobank
antibiobank/wsgi.py
Python
gpl-3.0
397
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
pgmillon/ansible
lib/ansible/module_utils/network/common/network.py
Python
gpl-3.0
8,128
#!/usr/bin/python3 import sqlite3 import os, sys, time, datetime, random, string import urllib.request, urllib.error import configparser from flask import Flask, request, session, redirect from flask import render_template, g, flash, url_for from contextlib import closing from .modules import Pagi from pxeat import ap...
wnereiz/pxeat
pxeat/views.py
Python
gpl-3.0
12,105
import pigpio import time class LeftEncoder: def __init__(self, pin=24): self.pi = pigpio.pi() self.pin = pin self.pi.set_mode(pin, pigpio.INPUT) self.pi.set_pull_up_down(pin, pigpio.PUD_UP) cb1 = self.pi.callback(pin, pigpio.EITHER_EDGE, self.cbf) self.tick = 0 ...
MrYsLab/razmq
hardware_baseline/encoders/left_encoder.py
Python
gpl-3.0
491
#http://informatics.mccme.ru/mod/statements/view3.php?id=22783&chapterid=113362#1 n = int(input()) def sum_kv_cifr(x): su = 0 for i in str(x): su += int(i)*int(i) return su maxi_power = 0 for i in range(1, n//2+1): print('______',i) for k in range(n//i, 0, -1): power = sum_kv_cif...
dichenko/kpk2016
Diff/dra.py
Python
gpl-3.0
442
import unittest from .Weather_analyzer import is_not_number class BtcPriceTestCase(unittest.TestCase): def test_checking_of_input_in_form(self): input = 46 answer = is_not_number(input) # The bitcoin returned changes over time! self.assertEqual(answer, False)
AntonKuksov/Weather_analyzer
test_form.py
Python
gpl-3.0
300
#!/usr/bin/env python # Copyright (C) 2012,2013,2015(H),2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or mo...
cgchemlab/chemlab
tools/convert_gromacs2espp.py
Python
gpl-3.0
4,036
# Teacher Quiz - Python Code - Elizabeth Tweedale import csv, random def askName(): # askName function returns the name of the student print("Welcome to the Super Python Quiz!") yourName = input("What is your name? ") print ("Hello",str(yourName...
elizabethtweedale/HowToCode2
SuperSkill-08-Teacher/Teacher-Quiz.py
Python
gpl-3.0
3,594
""" WSGI config for mng_files project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os import sys path = os.path.abspath(__file__+'/../..') if path not in sys.path: sys....
idjung96/mng_files
mng_files/wsgi.py
Python
gpl-3.0
498
#!/usr/bin/env python2.7 # coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # URL: http://github.com/SickRage/SickRage # # 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 Softwar...
hernandito/SickRage
tests/helpers_tests.py
Python
gpl-3.0
16,369
''' Decomposition ------------- The core of sector decomposition. This module implements the actual decomposition routines. Common ~~~~~~ This module collects routines that are used by multiple decompition modules. .. autoclass:: pySecDec.decomposition.Sector .. autofunction:: pySecDec.decomposition.squash_symmetry...
mppmu/secdec
pySecDec/decomposition/__init__.py
Python
gpl-3.0
758
# -*- encoding: utf-8 -*- from robottelo.constants import FILTER, FOREMAN_PROVIDERS from nailgun import entities from robottelo.ui.base import Base, UINoSuchElementError, UIError from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class ResourceProfil...
sghai/robottelo
robottelo/ui/computeresource.py
Python
gpl-3.0
25,187
# Copyright (C) 2001 Steve Howell # You must read the file called INFO.txt before distributing this code. # --- # Worlds for Karel are defined with simple text files that we parse out # in this module. See the worlds folder for examples. from world import NORTH,SOUTH,EAST,WEST from utils import trace_error import ...
cristian99garcia/guido-van-robot-activity
worldMap.py
Python
gpl-3.0
5,535
from aquarius.objects.Book import Book class GetBookByTitleAndAuthor(object): def __init__(self, connection): self.__connection = connection def execute(self, book): b = Book() sql = "SELECT Id, Title, Author FROM Book WHERE Title=? AND Author=?" r = list(self.__connection.ex...
jeroanan/Aquarius
aquarius/persistence/sqlitepersistence/GetBookByTitleAndAuthor.py
Python
gpl-3.0
634
from django.contrib import admin from comments.models import Comment # Register your models here. admin.site.register(Comment)
awwong1/CMPUT410-Project
dogenode/comments/admin.py
Python
gpl-3.0
130
# -*- coding: utf-8 -*- """ Created on Tue Dec 08 13:25:40 2015 @author: J. Alejandro Cardona """ from Board import * import pygame UP, LEFT, DOWN, RIGHT = 1, 2, 3, 4 juego = Board() _2 = pygame.image.load("2.jpg"); _2re = _2.get_rect() _4 = pygame.image.load("4.jpg"); _4re = _4.get_rect() _8 = pygam...
Alecardv/College-projects
2048/Control.py
Python
gpl-3.0
1,336
from __future__ import division import numpy as np import argparse import matplotlib.pyplot as plt from matplotlib.colors import colorConverter from mpl_toolkits.axes_grid1 import ImageGrid import matplotlib.cm as cm from amitgroup.stats import bernoullimm def main(args): means = np.load('%s_means.npy' % args.sav...
markstoehr/spectral_features
local/display_bernoulli_model.py
Python
gpl-3.0
2,936
import os from django import template from django.conf import settings from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag() def custom_css(): theme_path = os.path.join( settings.MEDIA_ROOT, "overrides.css" ) if os.path.exists(theme_path): ...
danielquinn/paperless
src/documents/templatetags/customisation.py
Python
gpl-3.0
865
""" Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0' (the number zero), return the maximum enemies you can kill using one bomb. The bomb kills all the enemies in the same row and column from the planted point until it hits the wall since the wall is too strong to be destroyed. Note that you ca...
marcosfede/algorithms
matrix/bomb_enemy.py
Python
gpl-3.0
2,524
from distutils.core import setup # Dummy setup.py to install libtorrent for python 2.7 using pip setup( name='libtorrent', version='1.0.9', packages=['libtorrent',], data_files=[('Lib', ['libtorrent/libtorrent.pyd']),], ) # Install in "editable mode" for development: # pip install -e .
overfl0/Bulletproof-Arma-Launcher
dependencies/libtorrent/setup.py
Python
gpl-3.0
303
from pyFTS.common import FuzzySet, Membership import numpy as np from scipy.spatial import KDTree import matplotlib.pylab as plt import logging class Partitioner(object): """ Universe of Discourse partitioner. Split data on several fuzzy sets """ def __init__(self, **kwargs): """ Univ...
petroniocandido/pyFTS
pyFTS/partitioners/partitioner.py
Python
gpl-3.0
12,188
''' command_line.py Utility functions for reading command line arguments. Author: Martin Norbury Novemeber 2013 ''' import inspect import argparse def command_line(fn): ''' A decorator for functions intented to be run from the command line. This decorator introspects the method signature of the ...
mnorbury/scriptutil
src/scriptutil/command_line.py
Python
gpl-3.0
2,055
from django.http import HttpResponseRedirect, JsonResponse from django.views.generic import CreateView, UpdateView from django.contrib.messages.views import SuccessMessageMixin from .models import HistoriaClinica, Patologia from .forms import HistoriaClinicaForms from apps.afiliados.models import Titular, Adherente f...
montenegroariel/sigos
apps/historias_clinicas/views.py
Python
gpl-3.0
4,039
#!/usr/bin/env python # _*_ coding:utf-8 _*-_ ############################ # File Name: demo.py # Author: lza # Created Time: 2016-08-30 16:29:35 ############################ import dns.resolver domain = raw_input ('Please input an domain: ') #输入域名地址 MX = dns.resolver.query(domain , "MX") #指定查询类型为A记录 for i in M...
zhengjue/mytornado
study/1/dnspython/demo1.py
Python
gpl-3.0
537
# -*- coding: utf-8 -*- # Copyright 2014-2016 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # Copyright 2016 Sodexis (http://sodexis.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import models, fields, api, _ from openerp.exceptions imp...
stellaf/sales_rental
sale_rental/models/product.py
Python
gpl-3.0
2,194
# coding=utf-8 Version = "0.2.0" Description = "LOTRO/DDO Launcher" Author = "Alan Jackson" Email = "ajackson@bcs.org.uk" WebSite = "http://www.lotrolinux.com" LongDescription = "Lord of the Rings Online and Dungeons & Dragons Online\nLauncher for Linux & Mac OS X" Copyright=" (C) 2009-2010 AJackson" CLIReference = ...
Lynx3d/pylotro
PyLotROLauncher/Information.py
Python
gpl-3.0
441
n=int(input('Enter any number: ')) if n%2!=0: n=n+1 for i in range(n): for j in range(n): if (i==int(n/2)) or j==int(n/2) or ((i==0)and (j>=int(n/2))) or ((j==0)and (i<=int(n/2))) or ((j==n-1)and (i>=int(n/2))) or ((i==n-1)and (j<=int(n/2))): print('*',end='') else: ...
rohitjogson/pythonwork
assign27.09.py
Python
gpl-3.0
355
import numpy, cairo, math from scipy import ndimage from .object3d import Object3d from .point3d import Point3d from .polygon3d import Polygon3d from .draw_utils import * from .colors import hsv_to_rgb, rgb_to_hsv def surface2array(surface): data = surface.get_data() if not data: return None rgb_a...
sujoykroy/motion-picture
editor/MotionPicture/commons/camera3d.py
Python
gpl-3.0
18,923
#!/usr/bin/env python # Copyright (C) 2014 Equinor ASA, Norway. # # The file 'test_grid.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 ...
Statoil/libecl
python/tests/ecl_tests/test_grid.py
Python
gpl-3.0
23,060
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-15 09:46 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
mcallaghan/tmv
BasicBrowser/scoping/migrations/0129_auto_20170815_0946.py
Python
gpl-3.0
1,435
''' Created on Mar 20, 2011 @author: frederikns ''' from model.flyweight import Flyweight from collections import namedtuple from model.static.database import database from model.dynamic.inventory.item import Item class SchematicTypeMap(Flyweight): def __init__(self,schematic_id): #prevents reinitializing...
Iconik/eve-suite
src/model/static/planet/schematic_type_map.py
Python
gpl-3.0
914
#!/usr/bin/env python # vim: set expandtab shiftwidth=4: # http://www.voip-info.org/wiki/view/asterisk+manager+events import sys,time import simplejson as json from stompy.simple import Client import ConfigParser config = ConfigParser.ConfigParser() devel_config = ConfigParser.ConfigParser() config.read('/opt/ucall/...
gryzz/uCall
utils/asterisk-connector/ami2stomp-get.py
Python
gpl-3.0
972
import re import os import pytz from PIL import Image from dateutil.parser import parse from datetime import datetime from decimal import Decimal from django.template import Library from django.conf import settings from django.template.defaultfilters import stringfilter from django.utils import formats from django.uti...
alirizakeles/tendenci
tendenci/apps/base/templatetags/base_filters.py
Python
gpl-3.0
13,196
# Copyright (C) 2019 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 versio...
mkuron/espresso
testsuite/scripts/tutorials/test_04-lattice_boltzmann_part2.py
Python
gpl-3.0
1,053
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ProxyServe.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
nanshihui/ipProxyDec
ProxyServe/manage.py
Python
gpl-3.0
253
from __future__ import division from math import sqrt, pi import unittest from sapphire import clusters class SimpleClusterTest(unittest.TestCase): def setUp(self): self.cluster = clusters.SimpleCluster(size=100) def test_station_positions_and_angles(self): a = sqrt(100 ** 2 - 50 ** 2) ...
tomkooij/sapphire
sapphire/tests/test_clusters_acceptance.py
Python
gpl-3.0
1,327
from math import * def f(e, x): return abs(eval(e.replace('^', '**').replace('x', '('+str(x)+')'))) def solve(e, a, b): N = 1999 t = f(e, a) + f(e, b) for i in range(1, 2*N): if i % 2 == 0: t += 2*f(e, a + (b-a)*i/2/N) else: t += 4*f(e, a + (b-a)*i/2/N) return (b-a)*t/6/N def main(): ## with op...
Lipen/LipenDev
Azeroth/Northrend/TP Olymp/TaskE.py
Python
gpl-3.0
687
"""Utility functions""" import os import difflib def get_diff(str1, str2): """Returns git-diff-like diff between two strings""" expected = str1.splitlines(1) actual = str2.splitlines(1) diff = difflib.unified_diff(expected, actual, lineterm=-0, n=0) return ''.join(diff) def ensure_directory(path)...
perfalle/smartbox
common/utils.py
Python
gpl-3.0
1,360
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can re...
lercloud/shipping_api_usps
stock_packages.py
Python
gpl-3.0
3,338
# Copyright (C) 2018 Philipp Hörist <philipp AT hoerist.com> # # This file is part of nbxmpp. # # 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 opt...
gajim/python-nbxmpp
nbxmpp/modules/bookmarks/pep_bookmarks.py
Python
gpl-3.0
3,379
# Copyright (C) 2014 - Oscar Campos <oscar.campos@member.fsf.org> # This program is Free Software see LICENSE file for details import os import json import platform from collections import defaultdict from anaconda_go.lib import go from anaconda_go.lib.plugin import typing cachepath = { 'linux': os.path.join('~...
DamnWidget/anaconda_go
lib/cache.py
Python
gpl-3.0
2,829
from rest_framework import status from rest_framework.test import APITestCase, APIClient from django.core.urlresolvers import reverse from cherrymusic.apps.core.models import User, Track from cherrymusic.apps.api.v1.serializers import TrackSerializer from cherrymusic.apps.api.v1.tests.views import UNAUTHENTICATED_RE...
pando85/cherrymusic
web/cherrymusic/apps/api/v1/tests/views/test_track_view.py
Python
gpl-3.0
1,605
#!/usr/bin/env python # -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2014, Christoph Gohlke # Copyright (c) 2008-2014, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or w...
to266/hyperspy
hyperspy/external/tifffile.py
Python
gpl-3.0
172,696
import socketserver, os from configparser import ConfigParser """ Byte [1] = Action 255 items """ class BOBServer(socketserver.BaseRequestHandler): """ The request handler class for our server. It is instantiated once per connection to the server, and must override the handle() method to implement c...
arkalon76/bob
bobserver.py
Python
gpl-3.0
1,846
""" test-gvar.py """ # Copyright (c) 2012-20 G. Peter Lepage. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version (see <http://www.gnu.org/...
gplepage/gvar
tests/test_gvar.py
Python
gpl-3.0
91,671
# -*- coding: utf-8 -*- # * Authors: # * TJEBBES Gaston <g.t@majerti.fr> # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; import pytest from autonomie.tests.tools import Dummy def test_default_disable(): from autonomie.forms.user.user import deferred_company_disable_default ...
CroissanceCommune/autonomie
autonomie/tests/forms/user/test_user.py
Python
gpl-3.0
2,558
import matplotlib.pyplot as plt from h5py import File from numpy import array def launch_plots(): # TODO set activation of different plots plot3d = plt.figure('Plot 3D') xy_plane = plt.figure('XY') xz_plane = plt.figure('XZ') yz_plane = plt.figure('YZ') ax_plot3d = plot3d.add_subplot(111, project...
Neluso/SIFPAF
plot.py
Python
gpl-3.0
1,454
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=no-init,attribute-defined-ou...
mganeva/mantid
Testing/SystemTests/tests/analysis/EQSANSFlatTestAPIv2.py
Python
gpl-3.0
3,330
import time from datetime import datetime from pytz import timezone from dateutil.relativedelta import relativedelta import openerp from openerp.report.interface import report_rml from openerp.tools import to_xml from openerp.report import report_sxw from datetime import datetime from openerp.tools.translate import _ f...
davidsetiyadi/draft_python
new_edukits/edukits_total_retail_report.py
Python
gpl-3.0
24,578
# Copyright (C) 2005-2010 MISG/ICTI/EIA-FR # See LICENSE for details. """ Factories for AMQ clients, Thrift clients and SMAC Clients and servers. @author: Jonathan Stoppani <jonathan.stoppani@edu.hefr.ch> """ import weakref from twisted.internet.protocol import ReconnectingClientFactory from twisted.internet impo...
SMAC/corelib
smac/amqp/protocol.py
Python
gpl-3.0
13,170
### # #%L # Artimate Model Compiler # %% # Copyright (C) 2011 - 2012 INRIA # %% # 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 ...
psibre/artimate
artimate-model/src/main/resources/archetype-resources/__rootArtifactId__-model-animator/src/main/scripts/lab.py
Python
gpl-3.0
2,097
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-17 20:50 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('jordbruksmark', '0002_auto_20161217_2140'), ] operations = [ migrations.AlterModelO...
ortoloco/jordbruksmark
jordbruksmark/migrations/0003_auto_20161217_2150.py
Python
gpl-3.0
472
# "$Name: $"; # "$Header: $"; # ============================================================================ # # file : TestServer.py # # description : Python source for the TestServer and its commands. # The class is derived from Device. It represents the # CORBA servant ob...
nexdatas/recselector
test/TestServer.py
Python
gpl-3.0
49,959
# coding: utf8 # winetheme.py # 9/29/2013 jichi if __name__ == '__main__': import debug debug.initenv() import features if features.WINE: from sakurakit.skdebug import dwarn MAC_THEME = { 'ActiveBorder' : "240 240 240", 'ActiveTitle' : "240 240 240", 'AppWorkSpace' : "198 198 191", 'Backgroun...
Dangetsu/vnr
Frameworks/Sakura/py/apps/reader/TRASH/winetheme.py
Python
gpl-3.0
3,050
__all__ = ["core"]
alfiyansys/a-reconsidered-sign
algorithms/__init__.py
Python
gpl-3.0
18
# implement samba_tool drs commands # # Copyright Andrew Tridgell 2010 # Copyright Andrew Bartlett 2017 # # based on C implementation by Kamen Mazdrashki <kamen.mazdrashki@postpath.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
kernevil/samba
python/samba/netcmd/drs.py
Python
gpl-3.0
36,173
from setuptools import setup version = 'y.dev0' long_description = '\n\n'.join([ open('README.rst').read(), open('TODO.rst').read(), open('CREDITS.rst').read(), open('CHANGES.rst').read(), ]) install_requires = [ 'pkginfo', 'setuptools', 'nens', ], tests_require = [ ] setup(...
nens/timeseries
setup.py
Python
gpl-3.0
1,079
import abjad def test_LilyPondParser__functions__transpose_01(): pitches = ["e'", "gs'", "b'", "e''"] maker = abjad.NoteMaker() target = abjad.Staff(maker(pitches, (1, 4))) key_signature = abjad.KeySignature("e", "major") abjad.attach(key_signature, target[0]) assert abjad.lilypond(target) =...
Abjad/abjad
tests/test_LilyPondParser__functions__transpose.py
Python
gpl-3.0
2,425
import numpy as np import scipy.spatial.distance as dist from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import matplotlib.lines as mplines import scipy.cluster.hierarchy as clust import os def kabsch(coord, ref,app): C = np.dot(np.transpose(coord), ref) V, S, W = np.linalg.svd(C...
jEschweiler/Urease
urease_software/cluster.py
Python
gpl-3.0
5,877
#!/usr/bin/env python import VMSYSTEM.libSBTCVM as libSBTCVM import VMSYSTEM.libbaltcalc as libbaltcalc import sys import os assmoverrun=19683 instcnt=0 txtblk=0 VMSYSROMS=os.path.join("VMSYSTEM", "ROMS") critcomperr=0 compvers="v2.2.0" outfile="assmout.trom" #define IOmaps IOmapread={"random": "--0------"} IOmapwr...
ThomasTheSpaceFox/SBTCVM-Mark-2
SBTCVM-asm2.py
Python
gpl-3.0
33,216
#!/usr/bin/python # # generate_nametags_with_barcodes.py # Copyright (C) 2016 Sandeep M # # every year an elementary school in california runs a festival where families # sign up for parties and events, as well as bid for auctions and donations. # each family is issued some stickers with unique barcode to make...
d-e-e-p/generate_nametags_with_barcodes
generate_nametags_with_barcodes.py
Python
gpl-3.0
22,514
#!/usr/bin/env python3 '''Test on server shutdown when a zone transaction is open.''' import psutil from dnstest.libknot import libknot from dnstest.test import Test from dnstest.utils import * t = Test() knot = t.server("knot") zone = t.zone("example.com.") t.link(zone, knot) ctl = libknot.control.KnotCtl() t.st...
CZ-NIC/knot
tests-extra/tests/ctl/shutdown/test.py
Python
gpl-3.0
609
# Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # # 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 Software Foundation, either version 3 of the License, or # (at your...
gborri/SickRage
sickrage/core/exceptions/__init__.py
Python
gpl-3.0
2,553
import re import asyncio import threading from collections import defaultdict def connector(bot, dispatcher, NICK, CHANNELS, PASSWORD=None): @bot.on('client_connect') async def connect(**kwargs): bot.send('USER', user=NICK, realname=NICK) if PASSWORD: bot.send('PASS', password=PAS...
AiAeGames/DaniBot
dispatcher.py
Python
gpl-3.0
4,840
import unittest from aiourlstatus import app class TestEmpty(unittest.TestCase): def test_no_urls(self): data = '' urls, len_urls = app.find_sort_urls(data) self.assertEqual(urls, []) self.assertEqual(len_urls, 0) class TestTXT(unittest.TestCase): def test_parse_text(self): ...
riverrun/aiourlstatus
tests/parse_test.py
Python
gpl-3.0
990
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # Copyright (C) Zing contributors. # # This file is a part of the Zing project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import json...
iafan/zing
pootle/core/views/api.py
Python
gpl-3.0
10,141
from datetime import timedelta from django import template import ws.utils.dates as date_utils import ws.utils.perms as perm_utils from ws import forms from ws.utils.itinerary import get_cars register = template.Library() @register.inclusion_tag('for_templatetags/show_wimp.html') def show_wimp(wimp): return { ...
DavidCain/mitoc-trips
ws/templatetags/medical_tags.py
Python
gpl-3.0
1,991
#!/usr/bin/python # -*- coding: windows-1252 -*- import wxversion wxversion.select('2.8') import wx import wx.aui from id import * from model import * from graphic import * from sql import * from django import * import sqlite3 from xml.dom import minidom class MainFrame(wx.aui.AuiMDIParentFrame): def __init__(...
ajdelgados/Sofia
modules/main.py
Python
gpl-3.0
37,233
# -*- coding: utf-8 -*- # __init__.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. # # Th...
ivanalejandro0/keymanager
src/leap/keymanager/__init__.py
Python
gpl-3.0
16,455
import json import random import ssl import string import threading import time import websocket import settings from player import Player class WebsocketPlayerControl(object): def __init__(self, player, server=settings.WS_SERVER): websocket.enableTrace(settings.DEBUG) rand_chars = string.ascii_...
Menollo/menosic
client/main.py
Python
gpl-3.0
2,756
# *- coding: utf-8 -*- # mailbox.py # Copyright (C) 2013-2015 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. # #...
leapcode/bitmask-dev
src/leap/bitmask/mail/imap/mailbox.py
Python
gpl-3.0
30,254
# 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/distance/test_distance__token_distance.py
Python
gpl-3.0
15,537
#!/usr/bin/env python import sys import re """Rewrite the doxygen \\file lines to have the full path to the file.""" def fix(filename): contents = open(filename, "r").read() contents = re.sub( "\\\\file .*\\.h", "\\\\file " + filename[len("build/include/"):], contents, 1) ...
shanot/imp
tools/maintenance/fix_doxygen_file_lines.py
Python
gpl-3.0
593
# coding=utf-8 import unittest """69. Sqrt(x) https://leetcode.com/problems/sqrtx/description/ Implement `int sqrt(int x)`. Compute and return the square root of _x_ , where _x_ is guaranteed to be a non-negative integer. Since the return type is an integer, the decimal digits are truncated and only the integer p...
openqt/algorithms
leetcode/python/lc069-sqrtx.py
Python
gpl-3.0
925
from cloudbot import hook from cloudbot.util import http api_root = 'http://api.rottentomatoes.com/api/public/v1.0/' movie_search_url = api_root + 'movies.json' movie_reviews_url = api_root + 'movies/%s/reviews.json' @hook.command('rt') def rottentomatoes(inp, bot=None): """rt <title> -- gets ratings for <title>...
Zarthus/CloudBotRefresh
plugins/rottentomatoes.py
Python
gpl-3.0
1,312
# -*- coding: utf-8 -*- # This file is part of translate. # # translate 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. # # translate ...
erik/translate
translate/client/exceptions.py
Python
gpl-3.0
5,955
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'agent_connect_dlg.ui' # # Created: Tue Oct 12 14:22:17 2010 # by: PyQt4 UI code generator 4.7.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Dialog(object): def setupUi(self, Di...
mnunberg/yobot
py/gui/agent_connect_dlg.py
Python
gpl-3.0
2,632
from Ponos import init_db from env_vars import * import sqlite3 import os print(DB_PATH) open(DB_PATH, 'w').close() init_db()
shadowjig/ponos
initalize_db.py
Python
gpl-3.0
127
# Addierer mit += 1 # Eingaben erhalten a = input("Dies ist ein Addierer!\nGeben Sie a ein: ") b = input("Geben Sie b ein: ") # Zeichenketten in Zahlen umwandeln a = int(a) b = int(b) # neue Variable verwenden, Eingaben nicht verändern result = a i = 0 if b > 0: # wenn b größer Null while i < b: ...
Informatik-AG-KGN-2016/Dokumente
2016-11-28/aufgabe-addierer.py
Python
gpl-3.0
587
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import json import frappe from erpnext.accounts.party import get_party_account_currency from erpnext.controllers.accounts_controller import get_taxes_a...
neilLasrado/erpnext
erpnext/accounts/doctype/sales_invoice/pos.py
Python
gpl-3.0
21,154
import userHelper import serverPackets import exceptions import glob import consoleHelper import bcolors import locationHelper import countryHelper import time import generalFunctions import channelJoinEvent def handle(flaskRequest): # Data to return responseTokenString = "ayy" responseData = bytes() # The IP for ...
RlSEN/bannedcho
c.ppy.sh/loginEvent.py
Python
gpl-3.0
7,180
from yanntricks import * def KScolorD(): pspict,fig = SinglePicture("KScolorD") pspict.dilatation(1) x=var('x') C=Circle(Point(0,0),1) N1=C.graph(90,180) N2=C.graph(270,360) C.parameters.color="blue" N1.parameters.color="black" N2.parameters.color=N1.parameters.color N1.wave(0....
LaurentClaessens/mazhe
src_yanntricks/yanntricksKScolorD.py
Python
gpl-3.0
526
# coding: utf-8 # Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __m...
tonk/ansible
lib/ansible/plugins/action/__init__.py
Python
gpl-3.0
58,185
#!/usr/bin/python from __future__ import division import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec #from matplotlib.backends.backend_pdf import PdfPages import sys def stats_file_as_matrix(file_name): with open(file_name, 'r') as f: return [ map(float,line.strip()....
yossisolomon/ITGController
plot_from_stats.py
Python
gpl-3.0
1,136
from util import A, B, B_reversed, C, D, E, F, G, H, instr, spec, spec_reversed _mark = set(dir()) ; _mark.add('_mark') @A def jmp(address): ''' 1001 010k kkkk 110k kkkk kkkk kkkk kkkk ''' def cli(): return 16, 0b1001010011111000 @B def ldi(register, immediate): ''' 1110 KKKK dddd KKKK ''' @C ...
calroc/AVRV
instructions.py
Python
gpl-3.0
6,667
#!/usr/bin/env python import sugar_stats_consolidation from sugar_stats_consolidation.db import * from sugar_stats_consolidation.rrd_files import * from sugar_stats_consolidation.consolidation import * db = DB_Stats('statistics', 'root', 'gustavo') db.create(); con = Consolidation('/var/lib/sugar-stats/rrd', db) co...
activitycentral/statistics-consolidation
test/test_cons.py
Python
gpl-3.0
337
''' testing speedup of code Created on Sep 17, 2016 @author: jonaswallin ''' from Mixture.density import mNIG from Mixture.density.purepython import mNIG as pmNIG from Mixture import mixOneDims import numpy as np import numpy.random as npr import timeit # most speed here is used startup (iteration = 500, n = 1000) # ...
JonasWallin/Mixture
test/speed_checks/speed_mixture.py
Python
gpl-3.0
1,989
# -*- coding: utf-8 -*- #------------------------------------------------------------ import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int if PY3: import urllib.parse as urlparse # Es muy lento en PY2. En PY3 es nativo else: import...
alfa-addon/addon
plugin.video.alfa/channels/freeporn.py
Python
gpl-3.0
5,059
import json import re packageJson = '../../../package.json' with open(packageJson) as data_file: data = json.load(data_file) config = '../../pkjs/config.js' with open(config) as conf_file: s = conf_file.readline() keys = [] while (s): suggestKey = re.search(r"messageKey\"\:(.[^,]*)", s) ...
UnnamedHero/pebble-watchface-time-and-calendar
src/c/test/testMessageKeys.py
Python
gpl-3.0
661
import plt, ipp import os, string print "Starting try-trace.py: dir() = %s" % dir() # try-trace.py: test program for pypy plt print "- - - - -" print "NO_COMRESSION = %d" % plt.NO_COMPRESSION #base = "/Users/jbro111" # OSX base = "/home/nevil" # Ubuntu #fn = "pypy/small-sample.erf" #fn = "tcp-analyse/fdt-p5...
nevil-brownlee/pypy-libtrace
lib/natkit/try-dict.py
Python
gpl-3.0
2,776
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_O_IBK_WSYH_ECACCT').setMaster(sys.argv[2]) sc = SparkContext(conf = conf) sc....
cysuncn/python
spark/crm/PROC_O_IBK_WSYH_ECACCT.py
Python
gpl-3.0
6,823
# Copyright (C) 2013 Michael Biggs. See the COPYING file at the top-level # directory of this distribution and at http://shok.io/code/copyright.html # Tokens that come from the Lexer are either pairs or tuples: # colno:type # colno:type:value class LexToken: colno = 0 ttype = '' tvalue = '' def __init__(s...
nfomon/shok
parser/shokparser/LexToken.py
Python
gpl-3.0
757
from umlfri2.application.commands.base import Command from umlfri2.application.events.diagram import ConnectionMovedEvent class MoveConnectionLabelCommand(Command): def __init__(self, connection_label, delta): self.__diagram_name = connection_label.connection.diagram.get_display_name() self.__conn...
umlfri/umlfri2
umlfri2/application/commands/diagram/moveconnectionlabel.py
Python
gpl-3.0
1,001
# Author: Nic Wolfe <nic@wolfeden.ca> # 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 Software Foundation, either version 3 of the License,...
gylian/sickrage
sickbeard/providers/ezrss.py
Python
gpl-3.0
5,370
""" Unit tests for the HashTask object By Simon Jones 26/8/2017 """ import unittest from test.TestFunctions import * from source.HashTask import * from source.Channel import Channel class HashTaskUnitTests(unittest.TestCase): """ Unit tests for the HashTask object """ def setUp(self): self.task1_t_channel = Ch...
jonesyboynz/DuplicateFileFinder
unittests/HashTaskUnitTests.py
Python
gpl-3.0
4,641
# Copyright (C) 2013 Andreas Damgaard Pedersen # # 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 dis...
Damgaard/account-deleter
deleter/tests.py
Python
gpl-3.0
1,050