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
import numpy as np import pygame from sklearn.mixture import GMM from math import sqrt, atan, pi def emFit(results, numComponents): if len(results) == 0: return None m =np.matrix(results) gmm = GMM(numComponents,covariance_type='full', n_iter= 100, n_init = 4) gmm.fit(results) component...
sondree/Master-thesis
Python Simulator/simulator/FMM.py
Python
gpl-3.0
2,479
#!/usr/bin/env python # coding: utf-8 class Frequent(): def __init__(self): self.counters = {} def add(self, item, k, k2, t): if item in self.counters: counters[item] = counters[item] + 1 elif len(self.counters) <= k: self.counters[item] = 1 else: ...
markuskont/kirka
algorithms/Frequent.py
Python
gpl-3.0
610
import numpy class RotationTranslation: """Combined translational and rotational transformation. This is a subclass of Transformation. Objects of this class are not created directly, but can be the result of a composition of rotations and translations. """ def __init__(self, tensor, vector)...
lidaobing/itcc
itcc/ccs2/transformation.py
Python
gpl-3.0
1,262
""" Store only meta data but no real data (except from store state of nodes) """ import logging import os import pwd import yaml from pySPACE.resources.dataset_defs.base import BaseDataset class DummyDataset(BaseDataset): """ Class to store only meta data of collection This class overrides the 'store' method...
pyspace/test
pySPACE/resources/dataset_defs/dummy.py
Python
gpl-3.0
1,581
""" WSGI config for ncbi 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.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS...
erickpeirson/django-ncbi
ncbi/ncbi/wsgi.py
Python
gpl-3.0
385
import logging from unittest import TestCase from sass_to_scss import SassToSCSS class TestSassToSCSS(TestCase): def setUp(self): self.sassy = SassToSCSS(loglevel=logging.DEBUG) def trim_docstring(self, docstring): return '\n'.join(docstring.split('\n')[1:-1]) def test_double_spaces(sel...
luqmaan/sass_to_scss
test_sass_to_scss.py
Python
gpl-3.0
2,703
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Smewt - A smart collection manager # Copyright (c) 2008-2013 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 v...
wackou/smewt
smewt/actions.py
Python
gpl-3.0
5,613
# -*- coding: utf-8 -*- # sync.py # Copyright (C) 2017 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 p...
leapcode/soledad
src/leap/soledad/client/_db/blobs/sync.py
Python
gpl-3.0
7,065
import logging import pickle import random from gevent import Greenlet, sleep from threading import Lock from app import create_app from dota_bot import DotaBot from models import db, DynamicConfiguration, Game, GameStatus, GameVIP from helpers.general import divide_vip_list_per_type # Log logging.basicConfig(format=...
FroggedTV/grenouilleAPI
backend/bot_app.py
Python
gpl-3.0
3,850
#/logics/zeit.py #!/usr/bin/env python sh_now = sh.now() debug = False # Funktionen def leap_year(year): if (year % 400 == 0) or ((year % 4 == 0) and not (year % 100 == 0)): return True else: return False def days_of_month(month, year): if month in [1, 3, 5, 7, 8, 10, 1...
martinb07/mysmarthome
logics/zeit.py
Python
gpl-3.0
4,137
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- from autopilot.matchers import Eventually from testtools.matchers import Equals from bmicalc import tests class MainViewTestCase(tests.BaseTestCase): """Tests for the mainview""" def setUp(self): super(MainViewTestCase, self)...
avi-software/bmicalc
app/tests/autopilot/weightcalc/tests/test_main.py
Python
gpl-3.0
671
from __future__ import absolute_import, division, unicode_literals import codecs import re from io import StringIO from pip._vendor import webencodings from pip._vendor.six import text_type, binary_type from pip._vendor.six.moves import http_client, urllib from . import _utils from .constants import EOF, spaceCharac...
mars-knowsnothing/amos-bot
src/Lib/site-packages/pip/_vendor/html5lib/_inputstream.py
Python
gpl-3.0
32,530
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test copying a package category in the library editor """ def test(library_editor, helpers): """ Copy package category with "New Library Element" wizard """ le = library_editor # Open "New Library Element" wizard le.action('libraryEditorActio...
rnestler/LibrePCB
tests/funq/libraryeditor/test_copy_package_category.py
Python
gpl-3.0
2,109
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fileencoding=utf-8 """ quartet_samping.py: Quartet Sampling method for phylogenetic branch support evaluation <http://www.github.com/FePhyFoFum/quartetsampling> """ import argparse import os import sys import time from multiprocessing import Manager, Pool from shu...
FePhyFoFum/quartetsampling
pysrc/quartet_sampling.py
Python
gpl-3.0
18,821
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
indico/indico-migrate
indico_migrate/importer.py
Python
gpl-3.0
6,978
"""This module provides REST services for Layers""" import cherrypy from LmCommon.common.lmconstants import HTTPStatus from LmWebServer.common.lmconstants import HTTPMethod from LmWebServer.services.api.v2.base import LmService from LmWebServer.services.common.access_control import check_user_permission from LmWebServ...
lifemapper/core
LmWebServer/services/api/v2/layer.py
Python
gpl-3.0
9,222
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import sys sys.path.append('./MNIST_data') import os.path from download import download have_data = os.path.exists('MNIST_data/train-images-idx3-ubyte.gz') if not have_data: download('./MNIST_data') # load data mnist = input_data.r...
shucommon/little-routine
python/AI/tensorflow/dropout.py
Python
gpl-3.0
2,353
import logging from time import sleep from ethereum import keys from golem.ethereum import Client from golem.ethereum.paymentprocessor import PaymentProcessor from golem.transactions.transactionsystem import TransactionSystem log = logging.getLogger('golem.pay') class EthereumTransactionSystem(Transact...
scorpilix/Golemtest
golem/transactions/ethereum/ethereumtransactionsystem.py
Python
gpl-3.0
2,734
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib2, re, json, time, xbmc, traceback from _header import * BASE_URL = 'http://cinemaonline.kg/' BASE_NAME = 'Cinema Online' BASE_LABEL = 'oc' GA_CODE = 'UA-34889597-1' NK_CODE = '1744' def default_oc_noty(): plugin.notify('Сервер недоступен', BASE_NAME, image=...
delletenebre/xbmc-addon-kilogramme
plugin.video.kilogramme/resources/lib/site_ockg.py
Python
gpl-3.0
20,423
from openpyxl import load_workbook import os # list of text to search for keyWordList = ['Resume', 'Label', 'Description', 'ClueText', 'Title', 'QTEtitle'] # default path for docs on my PC for sh8 game xlsx documents #docDir = "d:/svn/ue3/SH8Game/Production/Dialogs/" docDir = "d:/svn/ue3/SH8Game/Production/...
AndreySibiryakov/coding
py/check_errors_xlsx.py
Python
gpl-3.0
3,308
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from email.header import decode_header from email.utils import formataddr from odoo import _, api, fields, models, SUPERUSER_ID, tools from odoo.exceptions import UserError, AccessError from odoo.osv imp...
ayepezv/GAD_ERP
addons/mail/models/mail_message.py
Python
gpl-3.0
38,977
# ##### BEGIN GPL LICENSE BLOCK ##### # # JewelCraft jewelry design toolkit for Blender. # Copyright (C) 2015-2022 Mikhail Rachinskiy # # 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, eith...
mrachinskiy/jewelcraft
lib/ui_lib.py
Python
gpl-3.0
1,174
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ...
proyectos-analizo-info/pyanalizo
src/app-ape/deprecated/get-propuestas-electorales-v5.py
Python
gpl-3.0
2,267
# This file is part of Lerot. # # Lerot 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 later version. # # Lerot is distributed in the hope tha...
m0re4u/LeRoT-SCLP
lerot/evaluation/DcgEval.py
Python
gpl-3.0
2,915
# -*- coding: utf-8 -*- """Package for suites and tests related to bots.modules package""" import pytest from qacode.core.bots.modules.nav_base import NavBase from qacode.core.exceptions.core_exception import CoreException from qacode.core.testing.asserts import Assert from qacode.core.testing.test_info import TestIn...
netzulo/qacode
tests/001_functionals/suite_004_navbase.py
Python
gpl-3.0
16,880
from django.db import models from .common_info import CommonInfo from django.utils import timezone from django.urls import reverse from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from django.core.validators import URLValidator def validate_nonzero(value): ...
HumanExposure/factotum
dashboard/models/data_source.py
Python
gpl-3.0
1,472
# -*- coding: utf-8 -*- import os from collections import namedtuple from copy import copy Colour = namedtuple('Colour', 'r,g,b') Colour.copy = lambda self: copy(self) black = Colour(0, 0, 0) white = Colour(255, 255, 255) # Colour ranges are not enforced. class Bitmap(): def __init__(self, width=40, height=...
NicovincX2/Python-3.5
Représentations graphiques/Bitmap/bitmap.py
Python
gpl-3.0
2,087
import bpy from functions import * class Combination(): '''A class containing all properties and methods relative to combination settings for Curve To Frame addon''' def update_curves( self, context ): '''method that must be over ride: update curve when settings have been changed''' type(self).update_curv...
CaptainDesAstres/Frames-Animated-By-Curve
single_track/Combination.py
Python
gpl-3.0
4,675
#!/usr/bin/env python3 # Copyright (C) 2005-2006 Dimitur Kirov <dkirov AT gmail.com> # Nikos Kouremenos <kourem AT gmail.com> # Copyright (C) 2005-2014 Yann Leboulanger <asterix AT lagaule.org> # Copyright (C) 2006 Junglecow <junglecow AT gmail.com> # Travis Shirk <travis AT ...
gajim/gajim
gajim/gajim_remote.py
Python
gpl-3.0
18,904
__RCSID__ = "$Id$" from DIRAC.AccountingSystem.Client.Types.BaseAccountingType import BaseAccountingType class Pilot(BaseAccountingType): def __init__(self): BaseAccountingType.__init__(self) self.definitionKeyFields = [('User', 'VARCHAR(64)'), ('UserGroup', 'VARCHAR(32)'),...
fstagni/DIRAC
AccountingSystem/Client/Types/Pilot.py
Python
gpl-3.0
801
# Created By: Virgil Dupras # Created On: 2011-04-20 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-...
stuckj/dupeguru
core_pe/exif.py
Python
gpl-3.0
10,797
SEFARIA_API_NODE = "https://www.sefaria.org/api/texts/" CACHE_MONITOR_LOOP_DELAY_IN_SECONDS = 86400 CACHE_LIFETIME_SECONDS = 604800 category_colors = { "Commentary": "#4871bf", "Tanakh": "#004e5f", "Midrash": "#5d956f", "Mishnah": "#5a99b7", "Talmud": "#c...
nassan/sefaria-embedded
constants.py
Python
gpl-3.0
1,909
T = input() while(T): T -= 1 buff = [] a,b = [int(i) for i in raw_input().split()] buff.append(b) pt = 0 while(a): a -= 1 c = [i for i in raw_input().split()] if len(c)==2: c[1] = int(c[1]) if c[0] == "P": buff.append(c[1]) ...
Dawny33/Code
HackerEarth/SuperProf Hiring/footy.py
Python
gpl-3.0
579
# Simple class SimgleList class SingleList: """Documentation for SingleList """ def __init__(self, initial_list=None): self.__list = [] if initial_list: for value in initial_list: if value not in self.__list: self.__list.append(value) ...
r-castro/Python
NewList.py
Python
gpl-3.0
1,219
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/colin/Projects/OpenCobolIDE/forms/dlg_preferences.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from pyqode.qt import QtCore, QtGui, QtWidgets class Ui_Dialog(object): de...
OpenCobolIDE/OpenCobolIDE
open_cobol_ide/view/forms/dlg_preferences_ui.py
Python
gpl-3.0
72,494
# -*- coding: utf-8 -*- """ ================================================ Following the Metal to Mott insulator Transition ================================================ Sequence of plots showing the transfer of spectral weight for a Hubbard Model in the Bethe Lattice as the local dopping is increased. """ # Cod...
Titan-C/learn-dmft
examples/twosite/plot_dop_A.py
Python
gpl-3.0
1,345
# -*- coding: utf-8 -*- # """ test_url.py websocket - WebSocket client library for Python Copyright 2021 engn33r Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/...
JonnyWong16/plexpy
lib/websocket/tests/test_url.py
Python
gpl-3.0
14,537
""" Script for building the Pieman package. """ from setuptools import setup try: import pypandoc LONG_DESCRIPTION = pypandoc.convert('README.md', 'rst') except (ImportError, OSError): # OSError is raised when pandoc is not installed. LONG_DESCRIPTION = ('Utilities written in Python which are used by ...
tolstoyevsky/pieman
pieman/setup.py
Python
gpl-3.0
1,517
import sys, re for fn in sys.argv[1:]: with open(fn, 'r') as f: s = f.read() xx = re.findall(r'([^\n]+)\s+\'\'\'(.*?)\'\'\'', s, re.M|re.S) for (obj, doc) in xx: s = re.findall('[^:`]\B(([`*])[a-zA-Z_][a-zA-Z0-9_]*\\2)\B', doc) if s: print '-'*50 ...
pyrocko/pyrocko
maintenance/docstring_cop.py
Python
gpl-3.0
543
from vsg import parser class if_label(parser.label): ''' unique_id = if_statement : if_label ''' def __init__(self, sString): parser.label.__init__(self, sString) class label_colon(parser.label_colon): ''' unique_id = if_statement : label_colon ''' def __init__(self): ...
jeremiah-c-leary/vhdl-style-guide
vsg/token/if_statement.py
Python
gpl-3.0
1,778
"""This module contains constants used by the Lifemapper web services """ import os from LmServer.base.utilities import get_mjd_time_from_iso_8601 from LmServer.common.lmconstants import SESSION_DIR from LmServer.common.localconstants import SCRATCH_PATH, APP_PATH from LmWebServer.common.localconstants import PACKAGIN...
lifemapper/core
LmWebServer/common/lmconstants.py
Python
gpl-3.0
13,281
from mrjob.job import MRJob from mrjob.step import MRStep def get_id_from_line(line): if line.find('.","Message-ID: <') > 0: start = line.find("Message-ID")+13 i=0 for char in line[start:]: i=i+1 if (not (char.isdigit() or (char == '.'))): stop = i+start-2 break return line[start:stop] class MR...
tokamstud/enron-analysis
src/complex/hive_prep.py
Python
gpl-3.0
2,895
# -*- coding: utf-8 -*- from MainWindow import Controller
bkolada/koalocleaner
uis/__init__.py
Python
gpl-3.0
59
from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from socketio import sdjango from web.api import EventResource, SummaryFeedResource, SummaryFeedByCountryCodeResource from tastypie.api import Api # Uncomment the next two lines to enable the admin: ...
YakindanEgitim/malwarez
malwarez/urls.py
Python
gpl-3.0
1,882
import numpy import logging import sys from apgl.graph import * from apgl.generator import * from sandbox.util.ProfileUtils import ProfileUtils from exp.sandbox.predictors.leafrank.SVMLeafRank import SVMLeafRank from exp.sandbox.predictors.TreeRank import TreeRank logging.basicConfig(stream=sys.stdout, level=logging.D...
charanpald/sandbox
sandbox/predictors/profile/TreeRankProfile.py
Python
gpl-3.0
1,271
#!/usr/bin/python # -*- coding: utf-8 -*- import sys from PyQt4 import QtGui,QtCore from Ui_about_author import Ui_About _IME = "<p>Author: Bojan Ili""&#263;</p>" _FAKULTET = "Faculty of Electrical Engineering, University of Belgrade - ETF" _MAIL = "https.rs@gmail.com" _URL = "<a href = ""https://www....
puyilio/Application-for-PyBoard
About_author.py
Python
gpl-3.0
1,254
# -*- coding: utf-8 -*- # EDIS - a simple cross-platform IDE for C # # This file is part of Edis # Copyright 2014-2015 - Gabriel Acosta <acostadariogabriel at gmail> # License: GPLv3 (see http://www.gnu.org/licenses/gpl.html) from PyQt4.Qsci import QsciLexerCPP from PyQt4.QtGui import QColor from src import editor_sc...
centaurialpha/edis
src/ui/editor/lexer.py
Python
gpl-3.0
2,435
def dummy_export_progress_cb(*args, **kwargs): pass class Exporter(object): def __init__(self, obj, export_format): self.obj = obj self.export_format = str(export_format) self.can_change_quality = False def set_quality(quality_pourcent): raise NotImplementedError() de...
jflesch/paperwork-backend
paperwork_backend/common/export.py
Python
gpl-3.0
885
'''a module to define a cache class for pictures''' # -*- coding: utf-8 -*- # This file is part of emesene. # # emesene 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 Licen...
emesene/emesene
emesene/e3/cache/PictureCache.py
Python
gpl-3.0
4,793
# Serial Photo Merge # Copyright (C) 2017 Simone Riva mail: simone.rva {at} gmail {dot} 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 optio...
simon-r/SerialPhotoMerge
imgmerge/mergeProcedureVirtual.py
Python
gpl-3.0
2,752
from functions import logger, config import asyncio class MessageHandler: def __init__(self, client, message, command, args): ''' Create a new messagehandler which handles the required parts for the commands. disabling this module will fuck up the whole bot.''' self.client = client ...
Tsumiki-Chan/Neko-Chan
classes/messagehandler.py
Python
gpl-3.0
1,344
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 ~ 2014 Andy Stewart # # Author: Andy Stewart <lazycat.manatee@gmail.com> # Maintainer: Andy Stewart <lazycat.manatee@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
zcwj/emacs
lisps/webkit/send_key.py
Python
gpl-3.0
3,676
__version__ = "0.1" import threading import numpy as np import pygame from expyriment.stimuli import Canvas from expyriment.stimuli._visual import Visual lock_expyriment = threading.Lock() Numpy_array_type = type(np.array([])) def inherit_docs(cls): for name, func in vars(cls).items(): if not func.__doc...
lindemann09/pytrak
pytrak/plotter.py
Python
gpl-3.0
10,237
import falcon import msgpack import json from btree import BinaryTree import ZODB, ZODB.FileStorage import transaction from persistent import Persistent import uuid import urllib import btree from pprint import pprint class Collection (object): def on_post(self, req, resp): # req.stream corresponds to the WSGI wsgi....
AgusRumayor/pypriorapi
order.py
Python
gpl-3.0
6,154
#!/usr/bin/python # Copyright MetaCommunications, Inc. 2003-2007 # Copyright Redshift Software, Inc. 2007 # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import glob import optparse import os import os.path impo...
kelvindk/Video-Stabilization
boost_1_42_0/tools/regression/src/regression.py
Python
gpl-3.0
36,064
#!/usr/bin/python """ wrapper to make simple calls to raxml """ import os import sys import glob import subprocess from ipyrad.analysis.utils import Params from ipyrad.assemble.utils import IPyradError # alias OPJ = os.path.join class Raxml(object): """ RAxML analysis utility function. This tool makes it ...
dereneaton/ipyrad
ipyrad/analysis/raxml.py
Python
gpl-3.0
9,380
#!/usr/bin/python # -*- coding: utf-8 -*- import psycopg2 import psycopg2.extras import os import subprocess import sys sys.path.append("C:\\Program Files\\FME\\fmeobjects\\python27") import fmeobjects # ----------------------##### VARIABLES #####---------------------- # # # formatList : liste des format...
TSIG15/CHIMN
src/televersement_regulier/DOUBLONnewBDD.py
Python
gpl-3.0
3,679
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim: set et sw=4 fenc=utf-8: # # Copyright 2016~2018 INVITE Communications Co., Ltd. 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 F...
invitecomm/asterisk-ivr
ivr/__init__.py
Python
gpl-3.0
1,089
helppage = "https://github.com/JorisPLA7/Super-D-mineur" githubpage = "https://github.com/JorisPLA7/Super-D-mineur/" rulepage = "http://demineur.hugames.fr/help.php" import webbrowser def help(): webbrowser.open(helppage) def github(): webbrowser.open(githubpage) def rules(): webbrowser.open(rulepage) if ...
JorisPLA7/Super-D-mineur
lib/web.py
Python
gpl-3.0
355
#TODO: make under 1 min. #SOLVED import math MAX_P = 1000 best_p = 120 best_num_sides = 3 for p in range(2, MAX_P+1): num_sides = 0 if p % 30 == 0: print(p) for a in range(1, MAX_P/2 + 2): for b in range(1, MAX_P/2 + 2): c = p - a - b if a > b and b > c and c**2 + ...
Daphron/project-euler
p39.py
Python
gpl-3.0
697
# Python 3: ArchiveNM.py # Function: # This will collect the files in /home/postgres that # need to be sent to a new Natural Message machine # that is being initialized. This currently grabs # directory server and shard server files. # It can also be used as an archiver. import datetime import tarfile import o...
naturalmessage/natmsgshardbig
sql/ArchiveNM.py
Python
gpl-3.0
2,018
#!/usr/bin/python """ VM starter - start your virtual hosts based on config file -------------------------------------------------------------------------------- @author Petr Juhanak, http://www.hackerlab.cz @release 1.0, 20130808 @licence GPLv3 http:://www.gnu.org/licenses/gpl-3.0.html ---------------------...
pjuhanak/vm-starter
vm.py
Python
gpl-3.0
3,827
#!/usr/bin/env Python import time import sys if len(sys.argv) > 1: INTERFACE = sys.argv[1] else: INTERFACE = 'eth1' STATS = [] print 'Interface:',INTERFACE def rx(): ifstat = open('/proc/net/dev').readlines() for interface in ifstat: #print '----', interface, '-----' if INTERFACE in ...
soarpenguin/python-scripts
net.py
Python
gpl-3.0
954
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 <+YOU OR YOUR COMPANY+>. # # This 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, or (at your option) # any later version. #...
kit-cel/gr-drm
python/qa_cell_mapping_cc.py
Python
gpl-3.0
1,593
# -*- coding: utf-8 -*- """ Created on Sat Sep 17 17:19:10 2016 @author: Michael """ from PyQt5 import QtWidgets class AboutWindow(QtWidgets.QTextEdit): def __init__(self, parent=None): super().__init__(parent) self.setReadOnly(True) self.setHtml( """ <h1 id="kano">Kano</h1> <p>Co...
MichaelSchreier/Kano
class_UI_aboutWindow.py
Python
gpl-3.0
4,429
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
electrumalt/electrum-doge
scripts/merchant/merchant.py
Python
gpl-3.0
9,336
# public class Solution { # public char[][] updateBoard(char[][] board, int[] click) { # int m = board.length, n = board[0].length; # int row = click[0], col = click[1]; # # if (board[row][col] == 'M') { // Mine # board[row][col] = 'X'; # } # else { // Empty # ...
sadad111/leetcodebox
Minesweeper.py
Python
gpl-3.0
2,887
#!coding: utf-8 import base64 import calendar import os import re import paramiko from io import StringIO import hashlib import threading import time import pyte def ssh_key_string_to_obj(text): key_f = StringIO(text) key = None try: key = paramiko.RSAKey.from_private_key(key_f) except para...
ibuler/coco
coco/utils.py
Python
gpl-3.0
6,619
import os def remove_fname_extension(fname): return os.path.splitext(fname)[0] def change_fname_extension(fname, extension): return remove_fname_extension(fname) + '.' + extension def concat(path, fname): return path + '/' + fname
matt77hias/FileUtils
src/name.py
Python
gpl-3.0
249
# -*- coding: utf-8 -*- # # Copyright (c) 2010-2012 Cidadania S. Coop. Galega # # This file is part of e-cidadania. # # e-cidadania 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 Licen...
bithinalangot/ecidadania-dev
src/core/spaces/views.py
Python
gpl-3.0
25,152
import time import numpy as np """ Module for prime related computations Includes: Infinite prime iterator Thresholded prime iterator Primality test Prime Factorization Divisor Computation Divisor Cardinality """ class EratosthenesSieve(object): """ Dynamic Sieve of Eratosthenes for p...
JJGO/ProjectEuler
euler/primes.py
Python
gpl-3.0
5,689
from collections import namedtuple from uuid import uuid4 from GEMEditor.model.classes.annotation import Annotation class Reference: """ ReferenceItem contains the information a pubmed or similar literature reference Authors are saved as author instances """ def __init__(self, id=None, pmid="", pmc="", d...
JuBra/GEMEditor
GEMEditor/model/classes/reference.py
Python
gpl-3.0
4,310
import unittest from datetime import datetime import tempfile import os from due.agent import Agent from due.episode import Episode from due.event import Event from due.persistence import serialize, deserialize from due.models.tfidf import TfIdfAgent from due.models.dummy import DummyAgent class TestTfIdfAgent(unitte...
dario-chiappetta/Due
due/models/test_tfidf.py
Python
gpl-3.0
3,631
import numpy as np import warnings import subprocess import pogoFunctions as pF import pdb from PolyInterface import poly class PogoInput: def __init__(self, fileName, elementTypes, signals, historyMeasurement, nodes = None, ...
ab9621/PogoLibrary
pogoInput.py
Python
gpl-3.0
17,129
############################################################################### # Name: php.py # # Purpose: Define PHP syntax for highlighting and other features # # Author: Cody Precord <cprecord@editra.org> # ...
beiko-lab/gengis
bin/Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/src/syntax/_php.py
Python
gpl-3.0
30,237
""" Creates fasta file from orfs """ import argparse import os import sys import site import re import numpy as np import numpy.random base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) base_path="%s/src"%base_path for directory_name in os.listdir(base_path): site.addsitedir(os.path.join(base...
idoerg/BOA
scripts/orffasta.py
Python
gpl-3.0
2,576
from django.db import models class Group(models.Model): BASE_URL = "https://www.facebook.com/groups/%s" def __unicode__(self): return self.name id = models.BigIntegerField(primary_key=True) name = models.CharField(max_length = 100) school = models.CharField(max_length = 100) class User(models.Model): def ...
AlJohri/nucraigslist
listings/models.py
Python
gpl-3.0
1,757
# Copyright (C) 2014 Google Inc. # # This file is part of ycmd. # # ycmd 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. # # ycmd is di...
volkhin/ycmd
ycmd/hmac_plugin.py
Python
gpl-3.0
3,445
from __future__ import print_function, division, unicode_literals from pprint import pprint from itertools import groupby from functools import wraps from collections import namedtuple, deque # OrderedDict was added in 2.7. ibm6 still uses python2.6 try: from collections import OrderedDict except ImportError: ...
jmbeuken/abinit
tests/pymods/memprof.py
Python
gpl-3.0
12,121
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 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, eith...
miyataken999/weblate
weblate/trans/fonts.py
Python
gpl-3.0
49,812
#!/bin/env python #-*-coding:utf-8-*- import MySQLdb import string import time import datetime import os import re import json import sys reload(sys) sys.setdefaultencoding('utf8') import ConfigParser import smtplib from email.mime.text import MIMEText from email.message import Message from email.header import Hea...
G8bao7/camelbell-server
include/functions.py
Python
gpl-3.0
19,363
#!/usr/bin/env python # encoding: utf-8 """ views.py Created by Christophe VAN FRACKEM on 2014/05/25. Copyright (c) 2014 Tiss'Page. All rights reserved. """ __author__ = 'Christophe VAN FRACKEM <contact@tisspage.fr>' __version__= '0.0.1' __copyright__ = '© 2014 Tiss\'Page' from django.shortcuts import render_to_res...
tisspage/resume-website
website/views.py
Python
gpl-3.0
2,019
#!/usr/bin/python import glob, gzip, csv, sys, os, copy, re csv.register_dialect('tab', delimiter='\t', quoting=csv.QUOTE_NONE) def usage(msg=None): if msg==None: print 'Usage: plot.py [OPTIONS] <dir>' print 'Options:' print ' -H, --highlight +group1,-group2 Highlight calls shared ...
wkretzsch/bcftools
misc/plot-roh.py
Python
gpl-3.0
13,378
# -*- coding: utf-8 -*- # # TGiT, Music Tagger for Professionals # Copyright (C) 2013 Iconoclaste Musique Inc. # # 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...
Iconoclasteinc/tgit
tgit/countries.py
Python
gpl-3.0
11,846
# encoding: utf-8 # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from distutils.util import convert_path import os...
klahnakoski/MoHg
setup.py
Python
mpl-2.0
2,261
import os import sys # Put communityshare in sys this_directory = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.abspath(os.path.join(this_directory, '..'))) from community_share import config, store, Base from community_share.models.user import User, TypedLabel from community_share.models.search...
seanastephens/communityshare
update_scripts/update_search.py
Python
mpl-2.0
3,386
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # 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/. # ***** END LICENSE BLOCK ***** """desktop_l10n.py This script m...
kartikgupta0909/build-mozharness
scripts/desktop_l10n.py
Python
mpl-2.0
44,931
from .version import version as __version__ from oplus.configuration import CONF from oplus.epm.api import * from oplus.weather_data.api import * from oplus.standard_output.api import * from oplus.eio import Eio from oplus.mtd import Mtd from oplus.err import Err from oplus.summary_table import SummaryTable from oplus...
Openergy/oplus
oplus/__init__.py
Python
mpl-2.0
404
import base64 import json import os import six from wptserve.utils import isomorphic_decode, isomorphic_encode def decodebytes(s): if six.PY3: return base64.decodebytes(six.ensure_binary(s)) return base64.decodestring(s) def main(request, response): headers = [] headers.append((b'X-ServiceWo...
KiChjang/servo
tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-access-control.py
Python
mpl-2.0
5,045
# 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 datetime import datetime from django.conf import settings from django.db import models from django_extensions.db.f...
sylvestre/rna
rna/models.py
Python
mpl-2.0
6,479
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import mozhttpd import urllib2 import os import unittest import mozunit here = os.path.dirname(os.path.abspath(__file_...
Yukarumya/Yukarum-Redfoxes
testing/mozbase/mozhttpd/tests/requestlog.py
Python
mpl-2.0
1,221
import cis_profile import cis_publisher import boto3 import botocore import os import logging import json import time from auth0.v3.authentication import GetToken from auth0.v3.management import Auth0 from auth0.v3.exceptions import Auth0Error from datetime import datetime, timezone, timedelta from traceback import for...
mozilla-iam/cis
python-modules/cis_publisher/cis_publisher/auth0.py
Python
mpl-2.0
24,297
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from __...
klahnakoski/intermittents
pyLibrary/queries/es14/util.py
Python
mpl-2.0
1,311
import copy import csv import datetime import json import mock import os import re import shutil import tempfile import urllib import pyquery from cStringIO import StringIO from nose.tools import eq_, ok_, assert_raises from nose.plugins.skip import SkipTest from django.test.client import RequestFactory from django.t...
rhelmer/socorro-webapp
crashstats/crashstats/tests/test_views.py
Python
mpl-2.0
222,462
from django.conf import settings as django_settings from django.contrib.auth.decorators import login_required from django.http import Http404 from django.http import HttpResponse from django.shortcuts import render, redirect, get_object_or_404 from django.views.decorators.cache import never_cache from helfertool.utils...
helfertool/helfertool
src/badges/views/settings.py
Python
agpl-3.0
4,316
import datetime import os from sqlalchemy import create_engine from sqlalchemy import MetaData, Table, Column, DateTime, Float, Integer, ForeignKey from sqlalchemy import between, func from sqlalchemy.sql import select from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy import Column, String, DateTime, Fl...
aguinane/energyusage
energy/models.py
Python
agpl-3.0
3,513
from django.conf.urls.defaults import patterns, url from django.conf import settings import views urlpatterns = patterns('', # CRUD url(r'^new$', views.new, name='create'), # Search url(r'^search$', views.search, name='search'), url(r'^search/cantfind$', views.search_cantfi...
SpreadBand/SpreadBand
apps/venue/urls.py
Python
agpl-3.0
2,471
''' Created on 2010 aza 30 @author: peio It test the mapping module of franklin ''' import unittest, os, StringIO from os.path import join, exists from tempfile import NamedTemporaryFile from franklin.utils.misc_utils import TEST_DATA_DIR, NamedTemporaryDir from franklin.mapping import map_reads_with_gmap, map_read...
JoseBlanca/franklin
test/mapping_test.py
Python
agpl-3.0
6,577
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). from django.conf.urls import patterns, url from piston.authentication import HttpBasicAuthentication from piston.resource import Resource from identityprovider.auth import ( ...
miing/mci_migo
api/urls.py
Python
agpl-3.0
3,433
# # Generated by the Open ERP module recorder ! #
avanzosc/avanzosc6.1
steel_quality_test/__init__.py
Python
agpl-3.0
50