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 abc import pytools from quantumsim.algebra.algebra import dm_to_pv, pv_to_dm class PauliVectorBase(metaclass=abc.ABCMeta): """A metaclass, that defines standard interface for Quantumsim density matrix backend. Every instance, that implements the interface of this class, should call `super().__...
brianzi/quantumsim
quantumsim/pauli_vectors/pauli_vector.py
Python
gpl-3.0
3,533
from __future__ import print_function __author__ = """Alex "O." Holcombe, Charles Ludowici, """ ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor import time, sys, platform, os from math import atan, atan2, pi, cos, sin, sqrt, ceil, radians, degrees import numpy as np import psychopy, ...
alexholcombe/dot-jump
dataRaw/Fixed Cue/test_dot-jump25Oct2016_10-53.py
Python
gpl-3.0
25,090
# -*- coding: utf-8 -*- from datetime import date from django.db import models from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse import reversion from users.models import Employee from services.models import Service class ProjectStatus(models.Model): id = model...
gdebure/cream
projects/models.py
Python
gpl-3.0
6,743
"""Unit test for the SNES nonlinear solver""" # Copyright (C) 2012 Patrick E. Farrell # # This file is part of DOLFIN. # # DOLFIN 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 ...
alogg/dolfin
test/unit/nls/python/PETScSNESSolver.py
Python
gpl-3.0
2,986
# ################################################################ # # Active Particles on Curved Spaces (APCS) # # Author: Silke Henkes # # ICSMB, Department of Physics # University of Aberdeen # Author: Rastko Sknepnek # # Division of Physics # School of Engineering, Physics and Mathem...
sknepneklab/SAMoS
analysis/batch_polar/batch_analyze_J10.py
Python
gpl-3.0
4,528
# # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...
jasonzzz/ansible
lib/ansible/module_utils/junos.py
Python
gpl-3.0
9,209
from django import forms from .models import * class TeamForm(forms.ModelForm): crest = forms.ImageField(required=False) class Meta: model = Team fields = ('name', 'short_name', 'crest', ) widgets = { 'name': forms.TextInput(attrs={ 'class': 'input-sm form-c...
Marcelpv96/SITWprac2017
sportsBetting/forms.py
Python
gpl-3.0
1,955
#!/usr/bin/python from PyQt4 import QtCore, QtGui import glob import os import sys import tempfile tempDir = tempfile.gettempdir() dirSelf = os.path.dirname(os.path.realpath(__file__)) print(dirSelf) sys.path.append(dirSelf.rstrip(os.sep).rstrip("guiBin").rstrip(os.sep) + os.sep + "lib") scb = "rbhusPipeProjCreate....
satishgoda/rbhus
rbhusUI/guiBin/rbhusPipeAdmin.py
Python
gpl-3.0
2,325
import csv import sys import numpy as np import matplotlib.pyplot as plt if len( sys.argv ) == 1: print "Please enter the csv file you want to plot!" sys.exit(0) points = [] with open( sys.argv[1] ) as csvfile: reader = csv.reader(csvfile) points = [ int(c[1]) for c in reader] print points xs = range...
MichaelMGonzalez/MagneticFieldLocalization
Arduino/Odometer/Data/Plotter.py
Python
gpl-3.0
370
#!/usr/bin/python # (c) 2013, Cove Schneider # (c) 2014, Joshua Conner <joshua.conner@gmail.com> # (c) 2014, Pavel Antonov <antonov@adwz.ru> # # This file is part of Ansible, # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
w1r0x/ansible-modules-core
cloud/docker/docker.py
Python
gpl-3.0
71,287
#!/usr/bin/env python """ @file routeStats.py @author Jakob Erdmann @date 2014-12-18 @version $Id: routeDiffStats.py 19649 2015-12-17 21:05:20Z behrisch $ compute statistics for two sets of routes (for the same set of vehicles) SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2014-2014...
702nADOS/sumo
tools/route/routeDiffStats.py
Python
gpl-3.0
3,296
#from feedback import FeedbackV4 # removed from WP API #from feedback import FeedbackV5 # removed from WP API from article_history import ArticleHistory from assessment import Assessment from backlinks import Backlinks from dom import DOM from google import GoogleNews from google import GoogleSearch from grokse impor...
mahmoud/womp
womp/inputs/__init__.py
Python
gpl-3.0
1,255
def fill_config_dict_with_defaults(config_dict: dict, defaults_dict: dict) -> dict: """ >>> fill_config_dict_with_defaults({a:2}, {b:3}) """ ## Substitute in default values from config_dict where missing from defaults_dict ## Works at multiple levels default_keys = list(defaults_dict.keys()) ...
robcarver17/pysystemtrade
sysdata/config/fill_config_dict_with_defaults.py
Python
gpl-3.0
979
#!/usr/bin/env python # # https://launchpad.net/wxbanker # account.py: Copyright 2007-2010 Mike Rooney <mrooney@ubuntu.com> # # This file is part of wxBanker. # # wxBanker is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
mrooney/wxbanker
wxbanker/bankobjects/account.py
Python
gpl-3.0
15,100
""" Tornado websocket server """ import tornado.ioloop import tornado.web import tornado.websocket import os from threading import Thread from modules import noise, anomaly, message, event settings = {"static_path": os.path.join(os.path.dirname(__file__), "static")} # Runt the audio level thread Thread(target=noise....
lepisma/audire
src/server.py
Python
gpl-3.0
1,838
#-*- coding: utf-8 -*- from django.core.files import File as DjangoFile from django.core.management.base import BaseCommand, NoArgsCommand from optparse import make_option import os import sys import re from django.template.defaultfilters import slugify from alibrary.models import Artist, Release, Media, Label from ...
hzlf/openbroadcast
website/apps/alibrary/management/commands/import_folder.py
Python
gpl-3.0
8,608
#!/usr/bin/env python from __future__ import division __author__ = 'Horea Christian' import matplotlib.pyplot import numpy from loadsums import loadsum from pylab import figure, xlabel, ylabel, show, title from load_vdaq_conds import data_type, bytes_per_pixel from get_data import data_name, lenheader, nframesperstim...
TheChymera/pyASF
ASFclassic.py
Python
gpl-3.0
2,848
# -*- coding: utf-8 -*- """ `tvdbsimple` is a wrapper, written in Python, for TheTVDb.com API v2. By calling the functions available in `tvdbsimple` you can simplify your code and easily access a vast amount of tv and cast data. To find out more about TheTVDb API, check out the [official api page](https://api.thet...
phate89/tvdbsimple
tvdbsimple/__init__.py
Python
gpl-3.0
2,681
# ------------------------------------------------------------------------------ import os, os.path, sys, re, time, random, types, base64 from appy import Object import appy.gen from appy.gen import Search, UiSearch, String, Page from appy.gen.layout import ColumnLayout from appy.gen import utils as gutils from appy.ge...
Eveler/libs
__Python__/ufms_blanks/appy3/gen/mixins/ToolMixin.py
Python
gpl-3.0
65,134
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2016 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
crisely09/horton
horton/meanfield/occ.py
Python
gpl-3.0
8,958
# run with: python3 downloadQbitTorrentScripts.py | xargs wget # then in qbitorrent you can go view -> search engine --> search plugins -> install a new one -> # and select the good ones this got import requests, re from bs4 import BeautifulSoup r = requests.get("https://github.com/qbittorrent/search-plugins/wiki/Un...
fullmooninu/tools
downloadQbitTorrentScripts.py
Python
gpl-3.0
515
from controller.component.component import Component from controller.component.graphics_component import GraphicsComponent from controller.component.movement_component import MovementComponent from controller.component.input_component import InputComponent from controller.component.player_input_component import PlayerI...
monodokimes/pythonmon
controller/component/__init__.py
Python
gpl-3.0
403
#!/usr/bin/env python3 import pylab as plt import numpy as np from argparse import ArgumentParser import importlib import sys import os.path """ Produce pie charts using PISM's profiling output produced using the -profile option. """ parser = ArgumentParser() parser.add_argument("FILE", nargs=1) options = parser.pars...
pism/pism
util/plot_profiling.py
Python
gpl-3.0
4,816
codes = { 307: 'Temporary Redirect', 303: 'See Other', 302: 'Found', 301: 'Moved Permanently' } def authRequired(realm): return { 'status': 401, 'reason': 'Authentication Required', 'headers': [ ('Content-type','text/plain'), ('WWW-Authenticate', 'Basic realm="%s"' % realm) ], 'body': 'Authentic...
xelphene/swaf
swaf/resp.py
Python
gpl-3.0
2,300
import math class Solution(object): def mySqrt(self, x): """ :type x: int :rtype: int """ s=1 while True: s=0.5*(s+x*1.0/s) if abs(s**2-x)<0.001: break print s return int(math.floor(s))
bxclib/leetcode
Sqrt(x).py
Python
gpl-3.0
306
from .. import runSimulation import pytest, os def test_makeSelectedSentences(): infoFile = open(os.path.dirname(__file__) + '/../EngFrJapGerm.txt') runSim1 = runSimulation.runSimulation(infoFile.readlines(), 611) infoFile.close() # These four ids are present in EngFrJapGerm: French=584, ...
malancas/CUNY-CoLAG-Sims-2016-17
Fodor-Sakas-model/tests/test_runSimulation.py
Python
gpl-3.0
1,576
# -*- coding: utf-8 -*- # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License,...
mzizzi/ansible
lib/ansible/playbook/play_context.py
Python
gpl-3.0
27,386
# # Copyright 2011-2013 Blender Foundation # # 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/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
Microvellum/Fluid-Designer
win64-vc/2.78/scripts/addons/cycles/__init__.py
Python
gpl-3.0
3,600
#!/usr/local/bin/python # encoding: utf-8 """ Take a sqlite database file and copy the tables within it to a MySQL database Usage: sqlite2mysql -s <pathToSettingsFile> <pathToSqliteDB> [<tablePrefix>] Options: pathToSqliteDB path to the sqlite database file tablePrefix a string to prefix...
thespacedoctor/fundamentals
fundamentals/mysql/sqlite2mysql.py
Python
gpl-3.0
10,966
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2010-2011, Volkan Esgel # # 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 l...
vesgel/quicknotes
plasmoid/contents/code/main.py
Python
gpl-3.0
1,970
# File: htmllib-example-1.py import htmllib import formatter import string class Parser(htmllib.HTMLParser): # return a dictionary mapping anchor texts to lists # of associated hyperlinks def __init__(self, verbose=0): self.anchors = {} f = formatter.NullFormatter() htmllib.HTMLPa...
gregpuzzles1/Sandbox
htmllib-example-1.py
Python
gpl-3.0
812
#!/usr/bin/env python # -*- coding: utf-8 -*- # # auto_partition.py # # This file was forked from Cnchi (graphical installer from Antergos) # Check it at https://github.com/antergos # # Copyright 2013 Antergos (http://antergos.com/) # Copyright 2013 Manjaro (http://manjaro.org) # # This program is free software; ...
ryanvade/ozunity-thus
src/installation/auto_partition.py
Python
gpl-3.0
29,212
""" Created on 9 Nov 2012 @author: plish """ class TrelloObject(object): """ This class is a base object that should be used by all trello objects; Board, List, Card, etc. It contains methods needed and used by all those objects and masks the client calls as methods belonging to the object. """ ...
Oksisane/RSS-Bot
Trolly-master/trolly/trelloobject.py
Python
gpl-3.0
3,944
'''monkey patch hacks''' import conf import os def _iter_filename_over_mountpoints(self, filename): '''iterate absolute filename over self.mountpoints and self.root''' for mountpoint in self.mountpoints + [self.root]: _drivename, _filename = os.path.splitdrive(filename) _filename = _filename.ls...
RedHatQE/python-moncov
moncov/monkey.py
Python
gpl-3.0
2,050
#!/usr/bin/env python # -*- coding: utf-8 -*- #É adimensional? adi = False #É para salvar as figuras(True|False)? save = True #Caso seja para salvar, qual é o formato desejado? formato = 'jpg' #Caso seja para salvar, qual é o diretório que devo salvar? dircg = 'fig-sen' #Caso seja para salvar, qual é o nome do arquivo...
asoliveira/NumShip
scripts/plot/beta-velo-cg-plt.py
Python
gpl-3.0
2,086
import widgy from widgy.models import Content from widgy.utils import update_context, render_to_string @widgy.register class Adaptive(Content): def render(self, context): template = 'widgy/adaptive/render.html' size = context.get('device_info') if size['type'] == 'tablet': t...
zmetcalf/fusionbox-demo-project
adaptive/models.py
Python
gpl-3.0
558
#!/usr/bin/env python # coding: utf-8 #encoding: latin1 def ingresar_numero(numero_minimo, numero_maximo): ''' Muestra un cursor de ingreso al usuario para que ingrese un número tal que numero_mínimo <= ingreso <= numero_máximo. Ante un ingreso inválido muestra un mensaje descriptivo de error y repregunta....
sit0x/farmasoft
interaccion_usuario.py
Python
gpl-3.0
2,473
# encoding: utf-8 from __future__ import absolute_import, division, print_function import os # TODO: most of these (except possibly input_directory) should be moved to # Simulation attributes (or in the context) debug = os.environ.get("DEBUG", "False").lower() == "true" input_directory = "." output_directory...
liam2/liam2
liam2/config.py
Python
gpl-3.0
585
#! /usr/bin/env python # -*- encoding: utf-8 -*- # vim:fenc=utf-8: from mole.event import Event from mole.action import Action, ActionSyntaxError from mole.parser import Parser class ActionParser(Parser): """This action parse the pipeline using specific parser :param `name`: a list with string representation...
ajdiaz/mole
mole/action/parser.py
Python
gpl-3.0
983
from __future__ import division import numpy as np from Tkinter import * import json import io import unicodecsv as csv #import csv #file = open("moviesTest-1970.txt",'r') act = open("invertedIndexActorsWeightedAll.txt",'r') dir = open("invertedIndexDirectorsWeightedAll.txt", 'r') wri = open("invertedIndexWritersWeig...
93lorenzo/software-suite-movie-market-analysis
testMovies.py
Python
gpl-3.0
6,486
# Copyright (c) 2014 Christian Schmitz <tynn.dev@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
tynn/python-flac
disttest.py
Python
gpl-3.0
5,344
import math import fractions import operator import factorization import gmpy2 def pocklingtonTest(N): if((N % 2) == 0 and N != 2): return False A = chooseAbeta(N); primeFactorization = factorization.factorize(A); primeFactors = getPrimeFactors(primeFactorization); for x in primeFactors: ...
Rathcke/uni
dis2/dis2-projekt/code/pocklington-test.py
Python
gpl-3.0
1,096
''' Created on 23.07.2012 @author: vlkv ''' from sqlalchemy.orm import contains_eager, joinedload_all from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.exc import ResourceClosedError import shutil import datetime import logging import os.path import reggata.errors as err import reggata.helpers as hlp import ...
vlkv/reggata
reggata/data/commands.py
Python
gpl-3.0
40,730
import sys import random # @include def matrix_search(A, x): row, col = 0, len(A[0]) - 1 # Start from the top-right corner. # Keeps searching while there are unclassified rows and columns. while row < len(A) and col >= 0: if A[row][col] == x: return True elif A[row][col] < x: ...
meisamhe/GPLshared
Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/matrix_search.py
Python
gpl-3.0
2,103
from vsg import parser from vsg import token from vsg.rules import consistent_token_case lTokens = [] lTokens.append(token.subtype_declaration.identifier) lIgnore = [] lIgnore.append(token.interface_signal_declaration.identifier) lIgnore.append(token.interface_unknown_declaration.identifier) lIgnore.append(token.in...
jeremiah-c-leary/vhdl-style-guide
vsg/rules/subtype/rule_002.py
Python
gpl-3.0
1,387
from django.conf.urls import url from sneakers_shop.pkg.main.views import IndexView, AboutView, ContactsView, \ CatalogView, DeliveryView urlpatterns = [ url(r'^$', IndexView.as_view()), url(r'^about/', AboutView.as_view()), url(r'^contacts/', ContactsView.as_view()), url(r'^catalog/', CatalogView....
Sashkiv/sneakers_shop
sneakers_shop/pkg/main/urls.py
Python
gpl-3.0
382
""" Contains lists of expected data and or rows for tests """ from utilities import BASE_TEST_URL, BASE_TEST_URL_DOMAIN, BASE_TEST_URL_NOPATH # Navigator and Screen properties properties = { "window.navigator.appCodeName", "window.navigator.appName", "window.navigator.appVersion", "window.navigator.bui...
natasasdj/OpenWPM
test/expected.py
Python
gpl-3.0
15,523
#!/usr/bin/env python # -*- coding: utf-8 -*- import ConfigParser import os import random import sys import subprocess import platform IS_WINDOWS = False win32api = None if platform.system() == 'Windows': IS_WINDOWS = True try: import win32api except (ImportError, ): pass CONFIG_FILE =...
callowayproject/django-app-skeleton
create_pkg.py
Python
gpl-3.0
9,890
# To make print working for Python2/3 from __future__ import print_function import ystockquote as ysq def _main(): for s in ["NA.TO", "XBB.TO", "NOU.V", "AP-UN.TO", "BRK-A", "AAPL"]: print("=============================================") print("s: {}".format(s)) print("get_name: {}".for...
mathieugouin/tradesim
demo/demo_ystockquote.py
Python
gpl-3.0
998
# Copyright 2009 Douglas Mayle # This file is part of YAMLTrak. # YAMLTrak 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. # ...
dmayle/YAMLTrak
yamltrak/commands.py
Python
gpl-3.0
11,746
# 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/base.py
Python
gpl-3.0
1,469
import smach import rospy import actionlib import tf import math class TurnWithoutMovebase(smach.State): def __init__(self, controller, angle): self.controller = controller self.angle = angle smach.State.__init__(self, outcomes=['success']) def execute(self, userdata): msg = '0:0:' + str(math.radia...
CentralLabFacilities/pepper_behavior_sandbox
pepper_behavior/skills/turn_base_without.py
Python
gpl-3.0
394
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name: Wascan - Web Application Scanner # @repo: https://github.com/m4ll0k/Wascan # @author: Momo Outaadi (M4ll0k) # @license: See the file 'LICENSE.txt from re import search,I def play(headers,content): _ = False for header in headers.items(): _ |= search(...
m4ll0k/Spaghetti
plugins/fingerprint/framework/play.py
Python
gpl-3.0
415
# ##### 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 3 # of the License, or (at your option) any later version. # # This program is distrib...
srgblnch/LinacGUI
ctli/widgets/actionform.py
Python
gpl-3.0
2,316
import numpy as np from pygmin import gui import oxdnagmin_ as GMIN import pygmin.gui.run as gr from pygmin.utils.rbtools import CoordsAdapter from pygmin import takestep from pygmin.utils import rotations from pygmin.potentials import GMINPotential from pygmin.transition_states import NEB, InterpolatedPath from pygmin...
js850/PyGMIN
playground/oxdna/oxgui.py
Python
gpl-3.0
2,319
#!/usr/bin/python import socket import time from Tkinter import * import logging class Finestra: def __init__(self): self.__f='' self.__s='' self.__StatusBar='' self.__ButtonAcition='' self.__Slider='' self.__APl='21' self.__active=FALSE s...
ska/myels
Finestra.py
Python
gpl-3.0
6,515
from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.shortcuts import redirect, get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext_lazy as _ from django.views.decorators.http import require_POST fr...
papedaniel/oioioi
oioioi/forum/views.py
Python
gpl-3.0
11,557
from io import BytesIO from hashlib import sha1 from os.path import isdir, join, abspath, dirname from zipfile import ZipFile, ZIP_DEFLATED from urllib.request import urlopen import hydrus.constants as c class WrongSha1Error(Exception): pass URL = ( # "https://www.qualitynet.org/dcs/BlobServer", "http://ww...
mark-r-g/hydrus
download_cms_data.py
Python
gpl-3.0
1,762
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2021 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
calexil/FightstickDisplay
pyglet/libs/win32/constants.py
Python
gpl-3.0
122,448
# # LMirror is Copyright (C) 2010 Robert Collins <robertc@robertcollins.net> # # LMirror 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...
rbtcollins/lmirror
l_mirror/tests/logging_resource.py
Python
gpl-3.0
2,057
# coding: utf-8 # Copyright 2017 Solthis. # # This file is part of Fugen 2.0. # # Fugen 2.0 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 ver...
Solthis/Fugen-2.0
data/indicators/lost_back_patients.py
Python
gpl-3.0
3,277
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
jakubbrindza/gtg
GTG/gtk/browser/browser.py
Python
gpl-3.0
61,395
#!/usr/bin/env python ############################################################################### # # # cb2cols.py # # ...
minillinim/colorbrewercolours
cb2cols.py
Python
gpl-3.0
15,527
dogum=list() Dogum_Tarihi=int(input ("Bir Doğum Tarihi Giriniz :")) if Dogum_Tarihi < 100: print("Evet!") else: print("Yanlış!")
boraklavun/python-
dogum.py
Python
gpl-3.0
146
""" from https://github.com/vpelletier/python-hidraw copied and renamed due to the existence of another 'hidraw' package on pypi which seems to conflict in some way. """ from __future__ import absolute_import from __future__ import print_function import ctypes import struct import collections import fcntl import ioc...
sircuri/GoodWeUSBLogger
hidrawpure.py
Python
gpl-3.0
4,988
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class ZeveraCom(MultiHoster): __name__ = "ZeveraCom" __type__ = "hoster" __version__ = "0.31" __pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/dow...
Zerknechterer/pyload
module/plugins/hoster/ZeveraCom.py
Python
gpl-3.0
883
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 Luis Alejandro Martínez Faneyth # # This file is part of Condiment. # # Condiment 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 ver...
LuisAlejandro/condiment
condiment/common/setup/report.py
Python
gpl-3.0
2,481
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://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, eithe...
ruleant/weblate
weblate/trans/models/unitdata.py
Python
gpl-3.0
10,092
#!/usr/bin/env python # coding: utf-8 """ pcvilag.muskatli.hu downloader Copyright (C) 2015 Gyulai Gergő This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at yo...
bevpy/pcvilag-dl
pcvilag-dl.py
Python
gpl-3.0
5,648
print("Operacoes Matematicas") #** Problema ** #Realizar operacoes matematicas sobre 20 e 2 numero1 = 20 numero2 = 2 soma = numero1+numero2 print("Soma:", soma) print("Subtracao:", numero1-numero2) print("Divisao:", numero1/numero2) print("Multiplicacao:", numero1*numero2) numero2 = 30 print(numero2)
fkenjikamei/python-exercises
aula03-2.py
Python
gpl-3.0
305
class Edge(): def __init__(self): self.origin = None self.goal = None self.value = None self.isDouble = False self.pX = [] # To Draw self.pY = []
ejherran/acaest
Grafos/general/Edge.py
Python
gpl-3.0
250
import osiris import os import osiris.events class Page(osiris.IPortalPage): def __init__(self, session): osiris.IPortalPage.__init__(self, session) self.ajax = (session.request.getUrlParam("act") != "") def getPageName(self): return "portal.pages.peers" def isMcpModeRequired(self): return True ...
OsirisSPS/osiris-sps
client/data/extensions/148B613D055759C619D5F4EFD9FDB978387E97CB/scripts/portals/peers.py
Python
gpl-3.0
3,117
from owslib.swe.sensor.sml import SensorML class IoosDescribeSensor(SensorML): def get_true(self): return True
acrosby/pyoos
pyoos/parsers/ioos_describe_sensor.py
Python
gpl-3.0
123
from pattern import Pattern import copy import numpy as np import random import collections #from scipy.signal import convolve2d import time from collections import deque class SpiralOutFast(Pattern): def __init__(self): self.register_param("r_leak", 0, 3, 1.2) self.register_param("g_leak", 0, 3, ...
TheGentlemanOctopus/thegentlemanoctopus
octopus_code/core/octopus/patterns/spiralOutFast.py
Python
gpl-3.0
1,846
# -*- coding: utf-8 -*- # Copyright (c) 2009 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the Python3 debugger interface for the debug server. """ from __future__ import unicode_literals import sys import os from PyQt5.QtCore import QObject, QTextCodec, QProcess, QProcessEnvironment...
paulmadore/Eric-IDE
6-6.0.9/eric/Debugger/DebuggerInterfacePython3.py
Python
gpl-3.0
43,276
#!/usr/bin/python -tt # # Copyright (c) 2011, Adam Simpkins # import sys from .chooser import ChooserBase class CliChooser(ChooserBase): def __init__(self, album, threshold): ChooserBase.__init__(self, album) self.confidenceThreshold = threshold def write(self, msg): if isinstance(ms...
simpkins/amass
src/amass/metadata/merge/cli_chooser.py
Python
gpl-3.0
2,152
#!/usr/bin/env python import kNN group,labels = kNN.createDataSet() print kNN.classify0([0,0.1], group, labels, 3)
markuskont/kirka
examples/ml/main.py
Python
gpl-3.0
117
# coding=utf-8 # Author: Mr_Orange <mr_orange@hotmail.it> # 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 versi...
elit3ge/SickRage
sickbeard/providers/kat.py
Python
gpl-3.0
9,861
# -*- coding: utf-8 -*- """ Online Analysis Configuration Control - TANGO attribute model Version 1.0 Michele Devetta (c) 2013 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 t...
wyrdmeister/OnlineAnalysis
OAGui/src/Control/OAAttrModel.py
Python
gpl-3.0
18,589
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # SoundConverter - GNOME application for converting between audio formats. # Copyright 2004 Lars Wirzenius # Copyright 2005-2020 Gautier Portet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
kassoulet/soundconverter
setup.py
Python
gpl-3.0
2,521
#Ret Samys, creator of this program, can be found at RetSamys.deviantArt.com #Please feel free to change anything or to correct me or to make requests... I'm a really bad coder. =) #Watch Andrew Huang's video here: https://www.youtube.com/watch?v=4IAZY7JdSHU changecounter=0 path="for_elise_by_beethoven.mid" prin...
RetSamys/midiflip
midiflip.py
Python
gpl-3.0
5,501
remote_server_ips = ('127.0.0.1', '127.0.0.1') remote_server_ports = (8005, 8006) assigned_server_index = 0 # in real system, client is distributed by a load balancing server in general; here I just simulate the balancing policy. process_id = 2 client_addr = ('127.0.0.1', 7002) poisson_lambda = 5 simu_len = 60 get_s...
SuperMass/distOS-lab3
src/integrated/client2/client_config.py
Python
gpl-3.0
334
from utilities import docs, ftom, mtof, scale_val from dynamic_value import * from behaviors import * from schedule import now, wait, sprout from rtcmix_import.commands import * from instruments import * import busses #__all__ = ["rtcmix_import", "utilities", "abstract", "dynamic_value", "instruments", "behavior...
bennymartinson/Oort
oort/__init__.py
Python
gpl-3.0
335
import pytest import __builtin__ from libturpial.api.models.media import Media from tests.helpers import DummyFileHandler class TestMedia: @classmethod @pytest.fixture(autouse=True) def setup_class(self, monkeypatch): monkeypatch.setattr(__builtin__, 'open', lambda x, y: DummyFileHandler()) ...
satanas/libturpial
tests/models/test_media.py
Python
gpl-3.0
1,767
# subsystemBonusGallenteOffensiveDroneDamageHP # # Used by: # Subsystem: Proteus Offensive - Drone Synthesis Projector type = "passive" def handler(fit, src, context): fit.drones.filteredItemBoost(lambda mod: mod.item.requiresSkill("Drones"), "armorHP", src.getModifiedItemAttr("su...
bsmr-eve/Pyfa
eos/effects/subsystembonusgallenteoffensivedronedamagehp.py
Python
gpl-3.0
1,189
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012 Peter Reuterås # # 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 l...
reuteras/sr_nyheter_m
news.py
Python
gpl-3.0
3,138
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-27 10:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tags', '0020_auto_20190326_1547'), ] operations = [ migrations.AddField( model_name='tagversiontype', ...
ESSolutions/ESSArch_Core
ESSArch_Core/tags/migrations/0021_tagversiontype_archive_type.py
Python
gpl-3.0
452
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2022 Pytroll developers # Author(s): # Adam Dybbroe <Firstname.Lastname @ smhi.se> # 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 Foundat...
pytroll/pytroll-aapp-runner
aapp_runner/tests/test_helper_functions.py
Python
gpl-3.0
5,294
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('browser', '0009_splitevent'), ] operations = [ migrations.AddField( model_name='affiliation', name='...
erickpeirson/mbl-browser
browser/migrations/0010_auto_20160804_1644.py
Python
gpl-3.0
13,851
"""This module allows the user to conveniently access the output of a MtiCorp Battery Analizer through a python interface and to run several computations and to plot/output the data. """ import sys import os.path as path from io import StringIO import collections import datetime as dt import numpy as np impo...
mattihappy/mtibattery
mtibattery/mtibattery.py
Python
gpl-3.0
17,206
import rospy class Config: DEFAULT_RESOLUTION = 4000.0 DEFAULT_COUNTS_RPM = 542.29383 DEFAULT_COUNTS_REVS = 16.15444 DEFAULT_COUNTS_SEC = 4069.0 DEFAULT_GEAR_RATIO = 26.25 DEFAULT_WHEEL_DIAMETER = 0.305 DEFAULT_ROBOT_WIDTH = 0.53 DEFAULT_NB_MOTORS = 2 DEFAULT_MAX_SPEED = 3.0 D...
clubcapra/Ibex
src/roboteq_motor/scripts/includes/config.py
Python
gpl-3.0
6,953
from django import forms from models import edi_address class DocumentForm(forms.ModelForm): docfile = forms.FileField() class Meta: model = edi_address fields = ["docfile",]
codelab-mx/edi-translator
data_mining/forms.py
Python
gpl-3.0
193
# -*- coding: utf-8 -*- # Home made test import xc_base import geom import xc from model import predefined_spaces from materials import typical_materials __author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)" __copyright__= "Copyright 2015, LCPT and AOO" __license__= "GPL" __version__= "3.0" __email__= "l.perez...
lcpt/xc
verif/tests/materials/geom_section/test_quad_region_02.py
Python
gpl-3.0
1,612
from pymongo import MongoClient from passlib.app import custom_app_context as pwd client = MongoClient( host = "db" ) ride_sharing = client.ride_sharing users = ride_sharing.users users.insert_one( { 'username' : 'sid', 'password_hash' : pwd.encrypt( 'test' ), 'role' : 'driver' } )
sidthakur/simple-user-management-api
user_auth/app/create_db.py
Python
gpl-3.0
299
# -*- coding: utf-8 -*- """py.test fixtures for kuma.wiki.tests.""" import base64 import json from collections import namedtuple from datetime import datetime import pytest from django.contrib.auth.models import Permission from waffle.testutils import override_flag from ..models import Document, DocumentDeletionLog, ...
SphinxKnight/kuma
kuma/wiki/tests/conftest.py
Python
mpl-2.0
11,242
import ast import random import re def main(): import sys infile = sys.argv[1] attempts = int(sys.argv[2]) outfile = sys.argv[3] with open(infile, "r", encoding="utf-8") as f: templates = read_opdata_file(f) buf = [] for template in templates: for _ in range(attempts): ...
CensoredUsername/dynasm-rs
tools/aarch64_gen_tests.py
Python
mpl-2.0
9,637
# 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 absolute_import from __f...
klahnakoski/JsonSchemaToMarkdown
vendor/mo_json/__init__.py
Python
mpl-2.0
13,209
# 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 marionette_driver import By, Wait from ..windows import BaseWindow from ...api.soft...
whimboo/firefox-ui-tests
firefox_puppeteer/ui/about_window/window.py
Python
mpl-2.0
5,779
from others import sms_request print(sms_request('15683000435', '123456'))
mrcodehang/cqut-chat-server
test/test_http.py
Python
mpl-2.0
75
import logging from django.conf import settings from django.contrib.postgres.fields import JSONField from django.db import models from django.utils import timezone from .task import validate_task_options logger = logging.getLogger('app.logger') class Preset(models.Model): owner = models.ForeignKey(settings.AUTH...
pierotofy/WebODM
app/models/preset.py
Python
mpl-2.0
1,040