code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
import sys import socket from PyQt5.QtWidgets import QApplication from qt_DisplayWindow import DisplayWindow from Server import Server def main(camID): hostname = socket.gethostname() ip_address = socket.gethostbyname_ex(hostname)[2][-1] print(hostname, ip_address) port = 12349 app = QApplicat...
natedileas/ImageRIT
Server/qt_main.py
Python
gpl-3.0
762
#coding=utf-8 import subprocess from time import sleep import os import signal import m3u8_generator import fifo_tool class Batch_Encoder: def __init__(self, fifo_tool_i): self.fifo_tool_i = fifo_tool_i self.output_list = [] self.output_counter = 1 self.EXTINF = 1 self.media...
bowringchan/SDRRadio_Remote_Version
encoder.py
Python
gpl-3.0
3,025
#!/usr/bin/env python3 # # Copyright (c) Bo Peng and the University of Texas MD Anderson Cancer Center # Distributed under the terms of the 3-clause BSD License. # # Utility functions used by various executors. # import os import re import sys import traceback from collections.abc import Sequence from io import String...
bpeng2000/SOS
src/sos/executor_utils.py
Python
gpl-3.0
17,163
""" 2x2 plotting analysis for 2 datasets pluggin | ------------- | ------------- | | contours from | pcolor from | | both datasets | dataset 1 | | ------------- | ------------- | | pcolor diff | pcolor from | | both datasets | dataset 2 | | ------------- | ------------- | col...
jhamman/rasmlib
rasmlib/analysis/plugins/sample.py
Python
gpl-3.0
865
from ..modules import HardwareModule from ..attributes import PWMRegister class AMS(HardwareModule): """mostly deprecated module (redpitaya has removed adc support). only here for dac2 and dac3""" addr_base = 0x40400000 # attention: writing to dac0 and dac1 has no effect # only write to dac2 and ...
lneuhaus/pyrpl
pyrpl/hardware_modules/ams.py
Python
gpl-3.0
859
import io import base64 import gevent from Tkinter import Label from PIL import ImageTk, Image class AnimatedImgLabel(Label): # http://stackoverflow.com/questions/7960600/python-tkinter-display-animated-gif-using-pil def __init__(self, master, data, encoding='base64', **kwargs): if encoding == 'base64...
MoroGasper/client
client/plugins/ui/tk/animate.py
Python
gpl-3.0
1,581
import re import socket import threading import time from chat.message import Message from chat.user import User from interfaces.chat import Chat class TwitchChat(Chat): host = 'irc.twitch.tv' port = 6667 rate = 1.5 def __init__(self, username, passwd, channel): ''' Creates IRC clien...
jk977/twitch-plays
bot/chat/twitchchat.py
Python
gpl-3.0
4,289
from __future__ import absolute_import import tempfile from django.utils.translation import ugettext_lazy as _ from acls.api import class_permissions from common.utils import validate_path, encapsulate from dynamic_search.classes import SearchModel from history.api import register_history_type from history.permissio...
rosarior/mayan
apps/documents/__init__.py
Python
gpl-3.0
8,594
# -*- coding: utf8 -*- from phystricks import * def MBWHooeesXIrsz(): pspict,fig = SinglePicture("MBWHooeesXIrsz") pspict.dilatation(0.3) l=4 A=Point(0,0) B=Point(l,0) C=Point(l,l) trig=Polygon(A,B,C) trig.put_mark(0.2,pspict=pspict) trig.edges[0].put_code(n=2,d=0.1,l=0.2,pspict=ps...
LaurentClaessens/phystricks
testing/demonstration/phystricksMBWHooeesXIrsz.py
Python
gpl-3.0
563
''' Created on Aug 27, 2013 @author: Devon Define gui events ''' from pyHopeEngine import BaseEvent class Event_ButtonPressed(BaseEvent): '''Sent when a button is pressed''' eventType = "ButtonPressed" def __init__(self, value): '''Contains a value identifying the button''' self.val...
Trinak/PyHopeEngine
src/pyHopeEngine/event/guiEvents.py
Python
gpl-3.0
550
#!/usr/bin/env python2 print "Hello World!" print "Hello Again" print "I like typing this." print "This is fun." print 'Yay! Printing.' print "I'd much rather you 'not'." print 'I "said" do not touch this.' print "Some text"
christianheinrichs/learning-lpthw
ex01/ex1-sd1.py
Python
gpl-3.0
226
from myhdl import * def registerbank(clk, reset, we, addrx, addry, addrz, xout, yout, zin, amount = 16, bitwidth = 32, protect0=True): reg_data = [Signal(intbv(0)[bitwidth:]) for _ in range(amount)] @always_seq(clk.posedge, reset=reset) def write(): assert addrx < amount assert addry < amo...
svenstaro/uni-projekt
hardware/registerbank.py
Python
gpl-3.0
674
# -*- 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) import re import os from datetime import datetime from PyQt4.QtGui import ( QDialog, ...
centaurialpha/edis
src/ui/dialogs/file_properties.py
Python
gpl-3.0
3,225
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from Feature import Feature class IsCountryBrasil(Feature): description = """ Regional: Production country: is it Brasil? """.strip() def __init__(self, *args, **kwargs): Feature.__init__(self) def extract(self, m): for pc in m.production_countries: ...
unoduetre/MovieRecommendator
featuremaker/plugins/IsCountryBrasil.py
Python
gpl-3.0
390
#!/usr/bin/env python2 ################################################## # GNU Radio Python Flow Graph # Title: bladeRF_transceiver # Author: Renzo Chan Rios # Generated: Sun Mar 13 00:27:54 2016 ################################################## from gnuradio import analog from gnuradio import blocks from gnuradio i...
IronSlayer/bladeRF-Rpi2
bladeRF_transceiver1.py
Python
gpl-3.0
12,438
#!/usr/bin/env python # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2015 NIWA # # 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...
kaday/cylc
lib/parsec/example/cfgspec.py
Python
gpl-3.0
1,963
#!/usr/bin/env python3 import asyncio import os from datetime import datetime import aiohttp from aiohttp import web from raven import Client from restaurants import (FormattedMenus, SafeRestaurant, OtherRestaurant, AvalonRestaurant, TOTORestaurant, TOTOCantinaRestaurant, ...
fadawar/infinit-lunch
main.py
Python
gpl-3.0
2,316
#!/usr/bin/python # # You should have received a copy of the GNU General Public License # along with comm module. If not, see <http://www.gnu.org/licenses/>. # # # Playing custom datafiles (.lpd) to remote submodules. # The .lpd entries shall be sorted according to their 1st field (time). # import sys import time im...
Dfred/concept-robot
experiments/play-human/human_player.py
Python
gpl-3.0
3,524
''' MiPyBot 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. MiPyBot is distributed in the hope that it will be useful, but WITHOUT ANY WARRA...
Eloston/mipybot
mipybot/world/world.py
Python
gpl-3.0
626
""" 30 Oct 2013 """ import sys from warnings import catch_warnings, simplefilter from itertools import combinations from math import pi, sqrt, cos, sin, acos from copy import deepcopy import numpy as np from numpy.random import shuffle as np_shuffle from scipy.stats import skew, kurtosis, norm as sc_no...
3DGenomes/tadbit
_pytadbit/utils/three_dim_stats.py
Python
gpl-3.0
28,455
import numpy as np import matplotlib.pyplot as plt from skimage import measure # Construct some test data x, y = np.ogrid[-np.pi:np.pi:100j, -np.pi:np.pi:100j] r = np.sin(np.exp((np.sin(x)**3 + np.cos(y)**2))) # Find contours at a constant value of 0.8 contours = measure.find_contours(r, 0.8) # Display the image a...
jackey-qiu/genx_pc_qiu
supportive_functions/backcor/image_processing.py
Python
gpl-3.0
588
import urllib.request import json import webbrowser ___author___ = 'D4rkC00d3r' bssid = input('Enter a BSSID: ') # Mac address of AP you want to locate api_uri = 'https://api.mylnikov.org/geolocation/wifi?v=1.1&data=open&bssid=' # Api endpoint for database. map_url = 'http://find-wifi.mylnikov.org/#' # Map provide...
D4rkC00d3r/locatebssid
locatebssid.py
Python
gpl-3.0
1,239
#!/usr/bin/python # -*- coding: utf-8 -*- # kate: space-indent on; indent-width 4; mixedindent off; indent-mode python; import re import copy import os from trac.resource import Resource, ResourceNotFound from trac.util.translation import _ from trac.util.datefmt import from_utimestamp, to_utimestamp, utc, utcmax from...
aroth-arsoft/arsoft-web-crashupload
app/crashdump/model.py
Python
gpl-3.0
24,814
#!/usr/bin/env python # testing/runner.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Nose test runner module. This script is a front-end to "...
ncdesouza/bookworm
env/lib/python2.7/site-packages/sqlalchemy/testing/runner.py
Python
gpl-3.0
1,626
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Timoth?Lecomte # This file is part of Friture. # # Friture 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. # # Friture is distribu...
tlecomte/friture
friture/octavefilters.py
Python
gpl-3.0
4,411
""" Alter the password_hash field to work with larger output. Particularly libsodium output for greater password security. Revision ID: 9ef1a1643c2a Created at: 2018-02-24 23:00:32.848575 """ import sqlalchemy as sa import sqlalchemy.ext.declarative import sqlalchemy.orm.session from alembic import op revision = "9e...
rr-/szurubooru
server/szurubooru/migrations/versions/9ef1a1643c2a_update_user_table_for_hardened_passwords.py
Python
gpl-3.0
2,667
#!/usr/bin/python # -*- coding: utf-8 -*- """ ZetCode PyQt4 tutorial This example shows a QtGui.QSlider widget. author: Jan Bodnar website: zetcode.com last edited: September 2011 """ import sys from PyQt4 import QtGui, QtCore class Example(QtGui.QWidget): def __init__(self): super(Example, self...
justasabc/python_tutorials
tutorial/gui/pyqt4/widget/slider.py
Python
gpl-3.0
1,427
#coding=utf-8 from functools import wraps from flask import abort from flask_login import current_user from app.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission): ...
ricardonhuang/blog
app/decorators.py
Python
gpl-3.0
516
#!/usr/bin/env python import urllib2 import json import freeswitch CNAM_PHP = "http://localhost/app/contact-importer/cnam.php" def handler(session, args): """Do the CID lookup (against our php service...).""" response = urllib2.urlopen("%s?call=%s&format=json" % (CNAM_PHP, session.getVariable("uuid"))) d...
AccelerateNetworks/FusionPBX-Contact-Importer
cidlookup.py
Python
gpl-3.0
773
# -*- coding: utf-8 -*- # Copyright (C) 2009, 2013-2015 Rocky Bernstein # # 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 ve...
rocky/python2-trepan
trepan/processor/command/edit.py
Python
gpl-3.0
2,860
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
stephanehenry27/Sickbeard-anime
sickbeard/encodingKludge.py
Python
gpl-3.0
2,060
# Copyright (C) 2017-2020 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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...
repology/repology
repology/fetchers/fetchers/rsync.py
Python
gpl-3.0
2,001
# TLS-SAK - TLS Swiss Army Knife # https://github.com/RBT-itsec/TLS-SAK # Copyright (C) 2016 by Mirko Hansen / ARGE Rundfunk-Betriebstechnik # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eit...
RBT-itsec/TLS-SAK
lib/tls/tlsconnection.py
Python
gpl-3.0
5,605
# (C) British Crown Copyright 2010 - 2014, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
scollis/iris
lib/iris/analysis/calculus.py
Python
gpl-3.0
25,484
import Tkinter as tk import tkFileDialog as fd import tkMessageBox as mbox import numpy as np import re import cv2 import excellon import serial from PIL import ImageTk,Image import sys, os import pickle global coordinates, camdev, printerdev, ser FPATH = None FILEOPENED=False app = tk.Tk() app.title('P...
nextime/pcbdrill
pcbdrill.py
Python
gpl-3.0
20,051
# Copyright 2016 Thomas Schatz, Xuan-Nga Cao, Mathieu Bernard # # This file is part of abkhazia: 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. # # Abkh...
bootphon/abkhazia
abkhazia/corpus/corpus_filter.py
Python
gpl-3.0
13,553
# -*- coding: utf-8 -*- # @Author: tasdik # @Date: 2016-04-11 18:52:17 # @Last Modified by: Tasdik Rahman # @Last Modified time: 2016-04-12 17:07:33 # @GPLv3 License # @http://tasdikrahman.me # @https://github.com/tasdikrahman from __future__ import absolute_import, division import os import bs4 from spammy.train...
prodicus/spammy
spammy/__init__.py
Python
gpl-3.0
7,251
''' Created on Jan 27, 2017 @author: montes ''' import bpy from inspect import * import mv import os import math from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import legal,inch,cm from reportlab.platypus import Image from reportlab.platypus import Paragraph,Table,TableStyle from reportlab.platypus ...
Microvellum/Fluid-Designer
win64-vc/2.78/scripts/startup/fluid_operators/fd_api_doc.py
Python
gpl-3.0
10,496
# author David Sanchez david.sanchez@lapp.in2p3.fr # ------ Imports --------------- # import numpy from Plot.PlotLibrary import * from Catalog.ReadFermiCatalog import * from environ import FERMI_CATALOG_DIR # ------------------------------ # #look for this 2FGL source #source = "2FGL J1015.1+4925" #source = "1FHL J215...
davidsanchez/CTAtools
Example/ExReadFermiCatalog.py
Python
gpl-3.0
2,277
import datetime import numpy as np from artist import Plot from sapphire import Station from sapphire.transformations.clock import datetime_to_gps, gps_to_datetime from get_aligned_eventtimes import get_aligned, get_station_numbers YEARS = range(2004, datetime.date.today().year + 1) YEARS_TICKS = np.array([datetim...
HiSPARC/topaz
130711_event_histogram/eventtime_histogram.py
Python
gpl-3.0
2,523
import socket FLAGS = None def main(_): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(5) sock.connect((FLAGS.ip, FLAGS.port)) print('Connected with server') msg = input('Type the message: ') msg = msg.encode('utf-8') sock.sendall(msg) data = sock.recv(1500)...
munhyunsu/Hobby
2019S_TCPIP/t07-tls-socket/c02-tcp-client.py
Python
gpl-3.0
716
from compare_sets import jaccard_coefficient, similarity_matrix, similar_users, recommendations from alternative_methods import asymmetric_similarity, minhash_similarity, minhashed from read_file import read_file from minhash import minhash import unittest from functools import reduce __author__ = 'lene' class Test...
lene/tavsiye
test_recommender.py
Python
gpl-3.0
6,800
from twisted.internet import protocol from twisted.python import log import uuid import re class FTPUnix(protocol.Protocol): localhost = None remote_host = None session = None ### START CUSTOM VARIABLES ############################################################### username = None UNAUTH, INAUTH = range(...
leyondlee/HoneyPy-Docker
HoneyPy-0.6.2/plugins/FTPUnix/FTPUnix.py
Python
gpl-3.0
2,806
# -*- coding: utf-8 -*- # # Hadoopy documentation build configuration file, created by # sphinx-quickstart on Sat Jan 15 20:41:41 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
bwhite/hadoopy
doc/conf.py
Python
gpl-3.0
6,505
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/Users/chernomirdinmacuvele/Documents/workspace/PescArt2.0/UserInt/ui_Ficha_Recolha_Tab_Amostras.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtW...
InUrSys/PescArt2.0
GeneratedFiles/ui_Ficha_Recolha_Tab_Amostras.py
Python
gpl-3.0
4,188
from django.db import models, migrations import django.utils.timezone import django.core.validators class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ] operations = [ migrations.CreateModel( name='LocalUser', fields=[ ...
mathiasertl/django-xmpp-server-list
account/migrations/0001_initial.py
Python
gpl-3.0
2,915
#!/usr/bin/python # -*- coding: utf-8 -*- class MiClase: @staticmethod def metodo(entrada): return entrada objeto = MiClase print objeto.metodo(5)
psicobyte/ejemplos-python
ApendiceI/p202.py
Python
gpl-3.0
167
# expwindow.py # Copyright (C) 2018 Georg Boenn # GNU General Public License version 3.0 # Free Software Foundation import math as m def expwin(n): win = [] step = 2./n for k in range(n+1): val = -1. + k*step win.append(m.exp(-(val*val))) return win #print expwin(128)
gboenn/chunking
python/expwindow.py
Python
gpl-3.0
304
import Rasterizer as r r.showMouse(1)
sanguinariojoe/sonsilentsea
scripts/showMouse.py
Python
gpl-3.0
38
#!python ############################################### # POP3 Fuzzer # # Author: malwrforensics # # Contact: malwr at malwrforensics dot com # ############################################### import sys, socket from random import randint MIN_LIMIT = 50 MAX_LIMI...
asaygo/malwrforensics
scripts/pop3.py
Python
gpl-3.0
1,227
#!/usr/bin/env python """extract only the unique IDs from a BSR matrix""" from __future__ import print_function from optparse import OptionParser import sys import os def test_file(option, opt_str, value, parser): try: with open(value): setattr(parser.values, option.dest, value) except IOError: ...
jasonsahl/LS-BSR
tools/isolate_uniques_BSR.py
Python
gpl-3.0
1,944
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2017 Julien Girard # # Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3 ; # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://http://www.gnu.org/licenses/gpl-3.0.htm...
julien-girard/openstick
openstick/openstick.py
Python
gpl-3.0
8,148
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk,Gdk from .plantlist import PlantList from funky.cards import cards colors = ( Gdk.RGBA(0.22265625, 0.234375, 0.6484375), Gdk.RGBA(0.58984375, 0.20703125, 0.54296875), Gdk.RGBA(0.71484375, 0.70703125, 0.23828125), Gdk.RGBA(0.61718...
giannitedesco/funky
funky/playerlist.py
Python
gpl-3.0
4,819
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Licen...
oliver-sanders/cylc
tests/integration/test_scan.py
Python
gpl-3.0
10,385
#!/usr/bin/env python2.7 ''' AFL crash analyzer, crash triage for the American Fuzzy Lop fuzzer Copyright (C) 2015 floyd 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 ve...
chubbymaggie/afl-crash-analyzer
AflCrashAnalyzer.py
Python
gpl-3.0
9,878
from django import forms from django.db.models.fields import CharField, DecimalField from django.utils.translation import ugettext_lazy as _ from tendenci.apps.invoices.models import Invoice from tendenci.apps.events.models import Event class AdminNotesForm(forms.ModelForm): class Meta: model = Invoice ...
alirizakeles/tendenci
tendenci/apps/invoices/forms.py
Python
gpl-3.0
4,200
# coding: utf-8 """ django find&replace ~~~~~~~~~~~~~~~ :copyleft: 2015 by find&replace team, see AUTHORS for more details. :created: 2015 by JensDiemer.de :license: GNU GPL v3 or above, see LICENSE for more details. """ from __future__ import absolute_import, print_function import os import doc...
jedie/djangocms-find_and_replace
find_and_replace/tests/test_doctest.py
Python
gpl-3.0
2,605
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from hashlib import md5 from flask import (redirect, url_for, request, abort, session, current_app, make_response, flash) from flask_login import login_user from ..models import Credentials, Users fr...
Emercoin/emcweb
engine/emcweb/login/views/login.py
Python
gpl-3.0
4,001
from __future__ import print_function, unicode_literals import pprint from django.contrib.auth import authenticate from django.shortcuts import resolve_url from django.utils.html import escape from django_functest import FuncBaseMixin from wiki import models from wiki.forms import validate_slug_numbers from wiki.mode...
cXhristian/django-wiki
tests/core/test_views.py
Python
gpl-3.0
17,595
# AsteriskLint -- an Asterisk PBX config syntax checker # Copyright (C) 2015-2016 Walter Doekes, OSSO B.V. # # 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 ...
ossobv/asterisklint
asterisklint/app/vall/app_celgenuserevent.py
Python
gpl-3.0
885
from models import Event, EventRole from common.adminForms import CommonAdminForm class EventAdminForm(CommonAdminForm): class Meta(CommonAdminForm.Meta): model = Event class EventRoleAdminForm(CommonAdminForm): class Meta(CommonAdminForm.Meta): model = EventRole
alfred82santa/tarrabme2
src/events/adminForms.py
Python
gpl-3.0
298
from pupa.scrape import Jurisdiction, Organization import scrapelib import lxml.html from .people import SDLegislatorScraper from .bills import SDBillScraper class SouthDakota(Jurisdiction): division_id = "ocd-division/country:us/state:sd" classification = "government" name = "South Dakota" url = "htt...
cliftonmcintosh/openstates
openstates/sd/__init__.py
Python
gpl-3.0
3,672
import urllib2 import HttpRequest class Get(HttpRequest.HttpRequest): data = None def __init__(self, data): self.data = self._setData(data) def sendRequest(self, url): return urllib2.urlopen(url+self.data).read() def _setData(self, data): queryString = "?...
aaronjwood/multilib
Python/http/request/Get.py
Python
gpl-3.0
550
from task_manager.tag_manager.tag_manager import TaggingModel from task_manager.models import Task import numpy as np import json enabled_tagger_ids = [tagger.pk for tagger in Task.objects.filter(task_type='train_tagger').filter(status='completed')] enabled_taggers = {} # Load Tagger models for _id in enabled_tagger...
cbentes/texta
dataset_importer/document_preprocessor/preprocessors/text_tagger.py
Python
gpl-3.0
3,426
import cPickle, string, numpy, getopt, sys, random, time, re, pprint import sys import onlineldauser import citydoc import os import subprocess import MySQLdb def main(): db=MySQLdb.Connect(host="localhost", user="team06", passwd="aiM7chah,d", db="randomtrip...
huyilin/TopicLda
src/onlineuser.py
Python
gpl-3.0
1,278
import math import numpy as np from collections import defaultdict from analytic import trajectory_manager import scipy.sparse as ss from sklearn.naive_bayes import MultinomialNB, GaussianNB, BernoulliNB from sklearn.ensemble import RandomForestClassifier, AdaBoostClassifier from sklearn.linear_model import LogisticReg...
amilcarsj/analytic
analytic/al_strategies.py
Python
gpl-3.0
12,074
""" An external application for performing the update after is was downloaded from the net. This file is compiled into an exe file for windows platform and launch when the ApplyUpdate method of WinUpdater is called. The module will extract the zip file if it exists, and execute the update manifest...
yosi-dediashvili/SubiT
src/Settings/Updaters/WinUpdaterHelper.py
Python
gpl-3.0
5,462
""" Source: https://github.com/kerguler/hoppMCMC (01/12/18) adaptive basin-hopping Markov-chain Monte Carlo for Bayesian optimisation This is the python (v2.7) implementation of the hoppMCMC algorithm aiming to identify and sample from the high-probability regions of a posterior distribution. The algorithm combines t...
asteca/ASteCA
packages/best_fit/DEPRECATED/hopp_DEPRECATED/hoppMCMC.py
Python
gpl-3.0
30,000
# -*- coding: utf-8 -*- # PEP8:OK, LINT:OK, PY3:OK ############################################################################# ## This file may be used under the terms of the GNU General Public ## License version 2.0 or 3.0 as published by the Free Software Foundation ## and appearing in the file LICENSE.GPL includ...
juancarlospaco/vagrant
main.py
Python
gpl-3.0
23,005
# This file is part of cloud-init. See LICENSE file for license information. """Base LXD instance.""" import os import shutil import time from tempfile import mkdtemp from cloudinit.util import load_yaml, subp, ProcessExecutionError, which from tests.cloud_tests import LOG from tests.cloud_tests.util import Platform...
larsks/cloud-init
tests/cloud_tests/platforms/lxd/instance.py
Python
gpl-3.0
9,690
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # pip3 install dnspython import re import random import sleekxmpp import configparser import smtplib from email.mime.text import MIMEText from sqlalchemy import Column, String, Integer, Boolean from sqlalchemy.ext.declarative import declarative_base from collections impor...
Finn10111/PimuxBot
pimuxbot.py
Python
gpl-3.0
7,396
import RPi.GPIO as GPIO import time import sys #on renseigne le pin sur lequel est branché le cable de commande du servo moteur superieur (haut-bas) servo_pin = 12 #recuperation de la valeur du mouvement a envoyer au servo duty_cycle = float(sys.argv[1]) GPIO.setmode(GPIO.BOARD) GPIO.setup(servo_pin, GPIO.OUT) # ...
MarionPiEnsg/RaspiModel
Application/Raspberry_Pi/scripts_python/1-activeRobotHaut.py
Python
gpl-3.0
910
from PythonQt import QtGui, QtCore from uic.uiparser import UIParser from uic.Loader.qobjectcreator import LoaderCreatorPolicy class DynamicUILoader(UIParser): def __init__(self): UIParser.__init__(self, QtCore, QtGui, LoaderCreatorPolicy()) def createToplevelWidget(self, classname, widgetname): ...
ximion/Clementine-LibDanceTag
data/pythonlibs/uic/Loader/loader.py
Python
gpl-3.0
849
#!/Library/Frameworks/Python.framework/Versions/2.7/bin/python # ---------------------------------------- # USAGE: # ---------------------------------------- # PREAMBLE: import numpy as np import sys import os import matplotlib.pyplot as plt from matplotlib.ticker import NullFormatter from mpl_toolkits.mplot3d impo...
rbdavid/RMSD_analyses
PCA_RMSD_One_Ref/system_rmsd_plotting.py
Python
gpl-3.0
1,985
import io from setuptools import ( setup, find_packages, ) # pylint: disable=no-name-in-module,import-error def dependencies(file): with open(file) as f: return f.read().splitlines() with io.open("README.md", encoding="utf-8") as infile: long_description = infile.read() setup( name="sm...
VictorAlessander/Smith
setup.py
Python
gpl-3.0
1,730
# -*- coding: utf-8 -*- """ Copyright (C) 2011 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib from contextlib import closing from json import dumps from traceback imp...
alirizakeles/zato
code/zato-server/src/zato/server/service/internal/http_soap.py
Python
gpl-3.0
31,245
# (c) 2014, Maciej Delmanowski <drybjed@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
t794104/ansible
lib/ansible/plugins/filter/ipaddr.py
Python
gpl-3.0
32,458
from .gpus_gpu__general_child import GpusGpuGeneralChildEndpoint class GpusGpuMemclockEndpoint(GpusGpuGeneralChildEndpoint): @classmethod def get_paths(cls): return [ "/gpus/<string:gpu>/memclock" ] @classmethod def get_name(cls): return "gpu memclock measurement" ...
OpServ-Monitoring/opserv-backend
app/server/restful_api/data/v1/endpoints/gpus_gpu_memclock.py
Python
gpl-3.0
407
# Copyright 2015 VPAC # # This file is part of Karaage. # # Karaage 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. # # Karaage is dist...
Karaage-Cluster/karaage-debian
karaage/plugins/kgapplications/views/base.py
Python
gpl-3.0
12,381
from django.contrib import admin from charcoallog.investments.models import NewInvestment, NewInvestmentDetails class NewInvestmentModelAdmin(admin.ModelAdmin): list_display = ('user_name', 'date', 'money', 'kind', 'tx_op', 'brokerage') readonly_fields = ('user_name',) search_fields = ('date',) date_...
hpfn/charcoallog
charcoallog/investments/admin.py
Python
gpl-3.0
915
from MCNPtools import Gen # example usage of the module # first you initialize the tally by defining the bins: segment (surface number), angle (cosine) and energy (MeV) cos = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1] seg = [666,667] erg =[1.000E-10, 1.259E-10, 1.585E-10, 1.995E-10, 2.512E-10, 3.162E-10, ...
ipostuma/MCNPtools
WriteTally.py
Python
gpl-3.0
1,830
# -*- coding: utf-8 -*- """ Projy template for Python script. """ # system from datetime import date # parent class from projy.templates.ProjyTemplate import ProjyTemplate # collectors from projy.collectors.AuthorCollector import AuthorCollector class PythonScriptTemplate(ProjyTemplate): """ Projy template for a...
stephanepechard/projy
projy/templates/PythonScriptTemplate.py
Python
gpl-3.0
1,236
# Copyright (C) 2022 The Sipwise Team - http://sipwise.com # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) # any later version. # # This pr...
sipwise/repoapi
repoapi/signals.py
Python
gpl-3.0
6,714
from rest_framework import serializers from .models import Program, ContactNumber, SecondaryEmail, InstituteAddress from django.contrib.auth.models import User import copy from .oauth import default_fields, user_fields class ProgramSerializer(serializers.ModelSerializer): class Meta: model = Program ...
prateekchandan/ldap-oauth2
user_resource/serializers.py
Python
gpl-3.0
1,772
from .Room import Room from .Client import Client from .Reservation import Reservation from support import Singleton from .ReservationSearcher import ReservationSearcher @Singleton class Repository(object): def __init__(self): self.rooms = [] self.clients = [] self.reservations = [] ...
morpheby/ist303-miye
models/Repository.py
Python
gpl-3.0
2,779
#------------------------------------------------------------------------------- # Copyright (c) 2012 Gael Honorez. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0 # which accompanies this distribution, and is available at # http://w...
HaraldWeber/client
src/modvault/utils.py
Python
gpl-3.0
15,457
from pathlib import Path from PySide2 import QtWidgets import FreeCADGui as Gui from PySide2.QtCore import Qt civiltools_path = Path(__file__).absolute().parent.parent class Form(QtWidgets.QWidget): def __init__(self, etabs_obj): super(Form, self).__init__() self.form = Gui.PySideUic.loadUi(str...
ebrahimraeyat/civilTools
py_widget/torsion.py
Python
gpl-3.0
2,302
MOVEMENT = { '^': (0, 1), 'v': (0, -1), '<': (-1, 0), '>': (1, 0) } def add_points(p1, p2): return (p1[0] + p2[0], p1[1] + p2[1]) def main(): file_data = '' with open('input.txt', 'r') as f: file_data = f.read().strip() positions = [(0, 0), (0, 0)] visiteds = [[(0, 0)], [(0, 0)]] who = 0 for instruction...
The6P4C/adventofcode
2015/day3/part2.py
Python
gpl-3.0
716
""" ********** Edge Lists ********** Read and write NetworkX graphs as edge lists. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)\nDan Schult (dschult@colgate.edu)""" # Copyright (C) 2004-2008 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> #...
emreg00/biana
biana/ext/networkx/readwrite/edgelist.py
Python
gpl-3.0
5,622
''' ____ _ _ _ _ _ ____ ___ | _ \ ___ __| | \ | | ___| |_ / \ | _ \_ _| | |_) / _ \ / _` | \| |/ _ \ __| / _ \ | |_) | | | __/ (_) | (_| | |\ | __/ |_ / ___ \| __/| | |_| \___/ \__,_|_| \_|\___|\__| /_/ \_\_| |___| File: CClock.py Author: Zach Podbieln...
zachpodbielniak/PodNet
Linux/Python/CClock.py
Python
gpl-3.0
4,740
import SourceBase from tkinter import * from tkinter import ttk import re class redditEarthporn(SourceBase.SourceBase): pluginid = '_r_EarthPorn' subreddit = 'EarthPorn' sourceurl = 'http://reddit.com/r/EarthPorn' def __init__(self): pass def load_plugin(self): '''This method is c...
Mgamerz/fsoi_plugins
FSOI_Plugins/Plugins/Reddit/redditEarthporn.py
Python
gpl-3.0
5,107
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softwar...
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_tvshows_realitytv.py
Python
gpl-3.0
1,096
# -*- coding: utf-8 -*- # zmq.py # Copyright (C) 2015, 2016 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. # # T...
leapcode/leap_pycommon
src/leap/common/events/zmq_components.py
Python
gpl-3.0
5,662
from PyQt5 import QtWidgets, uic, QtCore import sys class MainWindow(QtWidgets.QMainWindow): def __init__(self, *args, **kwargs): # Load the UI Page. uic is the thing that lets us use a .ui file # This only works if the .ui file is in the same directory super(MainWindow, self).__in...
UVicRocketry/Hybrid-Test-Stand-Control
client/hybrid_test_backend.py
Python
gpl-3.0
4,879
# This test is partly based from: # https://www.argpar.se/posts/programming/testing-django-admin/ from urllib.parse import urljoin import json from bs4 import BeautifulSoup from django import forms from django.contrib.admin import ACTION_CHECKBOX_NAME from django.contrib.admin.sites import AdminSite from django.c...
seanballais/botos
tests/test_admin.py
Python
gpl-3.0
95,577
import os from categorization import relative_rate_left_right from methods import get_data_path from constants import INNER_PATHS # assign the root data folder data_path = get_data_path() RED = 0 BLUE = 1 all_data = [] for ip in INNER_PATHS: print(ip) all_data.append(relative_rate_left_right(os.path.join(data_pa...
cpicanco/abpmc-2016
analysis/export.py
Python
gpl-3.0
997
""" OpenStreetMap to Land Use/Land Cover Maps """ def osm_to_sqdb(osmXml, osmSQLITE): """ Convert OSM file to SQLITE DB """ from gasp.toshp.gdal import ogr_btw_driver return ogr_btw_driver(osmXml, osmSQLITE, supportForSpatialLite=True) def osm_project(osmSQLITE, srs_epsg): """ R...
JoaquimPatriarca/senpy-for-gis
gasp/osm2lulc/grs.py
Python
gpl-3.0
17,992
import numpy as np import cv2 as cv # mouse callback function def draw_circle(event,x,y,flags,param): if event == cv.EVENT_LBUTTONDBLCLK: cv.circle(img,(x,y),50,(255,0,0),-1) # Create a black image, a window and bind the function to window img = np.zeros((512,512,3), np.uint8) cv.namedWindow('image') cv.s...
shucommon/little-routine
python/AI/opencv/gui/mouse.py
Python
gpl-3.0
477
import pytest def test_app_hostname_is_not_none(): from openods import app value = app.config['APP_HOSTNAME'] assert value is not None def test_cache_timeout_is_greater_equal_0(): from openods import app value = app.config['CACHE_TIMEOUT'] assert value >= 0 def test_database_url_is_not_non...
open-ods/open-ods
tests/test_openods_api_config.py
Python
gpl-3.0
421
from django.contrib.auth.models import * from django.db import models # Create your models here. from django.db.models.signals import post_save from django.dispatch import receiver class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) bio = models.TextField(max_...
WilsonKiggundu/HospitalManagement_InformationSystem
hospitalmanager/app/models.py
Python
gpl-3.0
999