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 wx import wx.stc as stc import re from ide_global import * from doc_base import DocBase import doc_lexer #--------------------------------------------------------------------------------------------------- class DocJS(DocBase): def __init__(self, parent, file_path): DocBase.__init__(self, parent, f...
athenajc/XideSDCC
ide/doc_scripts.py
Python
gpl-2.0
3,860
import socket import json import sys, traceback import redis class http_parser: def __init__(self, sfhttp, is_client = True): self.__METHOD = 0 self.__RESP = 1 self.__HEADER = 2 self.__BODY = 3 self.__TRAILER = 4 self.__CHUNK_LEN = 5 self.__CHUNK_BOD...
7senses/shaka
shaka.py
Python
gpl-2.0
15,841
from django import forms class SelectModelForm(forms.Form): app_label = forms.CharField( label="App label", required=True) model_name = forms.CharField( label="Model name", required=True)
botswana-harvard/edc-describe
edc_describe/forms/select_model_form.py
Python
gpl-2.0
232
#! /usr/bin/env python # -*- coding: utf-8 -*- # # HnTool - A hardening tool for Linux/BSD # Copyright (C) 2009-2010 Authors # Authors: # * Hugo Doria <mail at hugodoria dot org> # * Aurelio A. Heckert <aurium at gmail dot com> # # This program is free software; you can redistribute it and/or modify # it under ...
hdoria/HnTool
HnTool/core.py
Python
gpl-2.0
9,011
# Utility for Physical Ethernet interface from app.model.modelTypes import * import subprocess class UtilPhysicEthernetInterface(): def configPhysicEthernetInterface(self, param): print "Config Physical Ethernet Interface Enter" # print param["name"] child = subprocess.Popen(["sh","app/uti...
sunlrain/CPTester
CPTesterClient/app/utils/utilPhysicEthernetInterface.py
Python
gpl-2.0
545
# # (C) Copyright 2001/2002 Kai Sterker <kaisterker@linuxgames.com> # Part of the Adonthell Project http://adonthell.linuxgames.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License. # This program is distributed in the hope that it will...
ksterker/wastesedge
scripts/schedules/mapcharacters/sarin.py
Python
gpl-2.0
2,833
from __future__ import unicode_literals from alliance_auth.celeryapp import app from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from .models import MumbleUser from .manager import MumbleManager import logging logger = logging.getLogg...
iAddz/allianceauth
services/modules/mumble/tasks.py
Python
gpl-2.0
1,977
# -*- coding: utf-8 -*- """ *************************************************************************** fixedaspectsvgwidget.py --------------------- Date : August 2016 Copyright : (C) 2016 Boundless, http://boundlessgeo.com ***************************************************...
boundlessgeo/qgis-connect-plugin
boundlessconnect/gui/fixedaspectsvgwidget.py
Python
gpl-2.0
1,963
# Copyright (C) 2011-2016 Codethink Limited # # 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; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but...
perryl/morph
morphlib/git.py
Python
gpl-2.0
10,923
from __future__ import print_function import sqlite3 import time from datetime import datetime def adapt_datetime(ts): return int(time.mktime(ts.timetuple())) sqlite3.register_adapter(datetime, adapt_datetime) def pp(cursor, data=None, rowlens=0): d = cursor.description if not d: return "#### NO ...
skagedal/fido
experiments/test.py
Python
gpl-2.0
3,542
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from default_config import config db = SQLAlchemy() def create_app(config_name): # Define the WSGI application object app = Flask(__name__) # Configurations app.config.from_object(config[config_name]) config[config_name].ini...
nbbl/ger-trek
app/__init__.py
Python
gpl-2.0
1,012
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your opt...
PXke/invenio
invenio/legacy/bibauthorid/merge.py
Python
gpl-2.0
15,747
# -*- coding: utf-8 -*- """ Tests of managing ESX hypervisors directly. If another direct ones will be supported, it should not be difficult to extend the parametrizer. """ import pytest import random from cfme.infrastructure.provider import VMwareProvider from utils.conf import cfme_data, credentials from utils.net ...
thom-at-redhat/cfme_tests
cfme/tests/infrastructure/test_esx_direct_host.py
Python
gpl-2.0
3,626
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'backGroundC.ui' # # Created: Sat Jun 21 13:16:32 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui from PyQt4 import QtCore import urllib import os import...
mnhkahn/python_code
bing.py
Python
gpl-2.0
5,311
# -*- coding: utf-8 -*- import pytest from .mocks import MockSocket from pylyskom.errors import ReceiveError from pylyskom.connection import ReceiveBuffer from pylyskom.datatypes import ArrayInt32, Int32, String, ConfType, ExtendedConfType def test_Array_can_parse_empty_array_with_star_format(): s = MockSocket(...
osks/pylyskom
tests/test_datatypes.py
Python
gpl-2.0
6,849
"""Agrega alturas.codprov y alturas.cp Revision ID: f5195fe91e09 Revises: fccbcd8362d7 Create Date: 2017-07-09 22:01:51.280360 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f5195fe91e09' down_revision = 'fccbcd8362d7' branch_labels = None depends_on = None ...
OpenDataCordoba/codigo-postal-argentino
alembic/versions/f5195fe91e09_agrega_alturas_codprov_y_alturas_cp.py
Python
gpl-2.0
796
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado # # (pacoqueen@users.sourceforge.net) # # ...
pacoqueen/upy
formularios/consulta_ventas_ticket.py
Python
gpl-2.0
19,273
from django.db import models from django.utils import timezone import pytz import datetime def hash(n): n = int(n) return ((0x0000FFFF & n)<<16) + ((0xFFFF0000 & n)>>16) class EventInstance(object): def __init__(self, event, event_time, date): self.date = date.date() self.time = date.time(...
dirjud/pickup
event/models.py
Python
gpl-2.0
3,032
#_PYTHON_INSERT_SAO_COPYRIGHT_HERE_(2007)_ #_PYTHON_INSERT_GPL_LICENSE_HERE_ from numpy import arange import sherpa.models.basic as basic from sherpa.utils import SherpaFloat, SherpaTestCase from sherpa.models.model import ArithmeticModel def userfunc(pars, x, *args, **kwargs): return x class test_basic(SherpaTes...
brefsdal/sherpa
sherpa/models/tests/test_basic.py
Python
gpl-2.0
1,765
#File fname = 'C3-1.gcode' f=open(fname,'w') #Laser Parameters laserPower = 20 #% max power dwellTime = 25 #ms x_start = 416 y_start = 343 z_start = 123.10 #mm above home pauseTime = 500 #ms; time paused after movement before ablation feedRate = 500 #movement speed # Rectangle...
Team02-TeamGuinness/BIOE421_RoboHand
ablation-GUI/CONFIG/2015-January-31/05-24-55 PM C3-1-CONFIG.py
Python
gpl-2.0
582
# -*- coding: utf-8 -*- """ *************************************************************************** JoinAttributes.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ************************...
myarjunar/QGIS
python/plugins/processing/algs/qgis/JoinAttributes.py
Python
gpl-2.0
4,402
# Copyright (c) Siemens AG, 2013 # # This file is part of MANTIS. MANTIS is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; either version 2 # of the License, or(at your option) any later version. # # This progr...
siemens/django-dingos
dingos/core/datastructures.py
Python
gpl-2.0
25,709
#!/opt/local/bin/python import string import os def header(n) : return "//\n\ // BAGEL - Brilliantly Advanced General Electronic Structure Library\n\ // Filename: SPCASPT2_gen" + str(n) + ".cc\n\ // Copyright (C) 2014 Toru Shiozaki\n\ //\n\ // Author: Toru Shiozaki <shiozaki@northwestern.edu>\n\ // Maintainer: Sh...
nubakery/smith3
python/spcaspt2/gen_split.py
Python
gpl-2.0
2,179
# -*- coding: utf-8 -*- cont = 0 v = [] for i in range(6): v.append(float(raw_input())) if (v[i] > 0): cont = cont + 1 print("%d valores positivos" % cont)
bergolho1337/URI-Online-Judge
Basicos/Python/1060/main.py
Python
gpl-2.0
173
from django.shortcuts import render_to_response from django.template.loader import render_to_string from lis.specimen.lab_result_item.classes import ResultItemFlag from lis.exim.lab_import_lis.classes import LisDataImporter from lis.exim.lab_import_dmis.classes import Dmis from ..models import Result, Order, ResultIt...
botswana-harvard/edc-lab
old/lab_clinic_api/classes/edc_lab_results.py
Python
gpl-2.0
4,109
# -*- coding: utf-8 -*- """ Created on Mon Aug 03 10:16:52 2015 @author: Keine """ import sqlite3 cx = sqlite3.connect("../text2DB/get_data.db") distxy = [([0.0] * 49) for i in range(49)] cu = cx.cursor() for i in range(49): for j in range(49): if i == j: distxy[i-1][j-1] = 0.0 else: ...
lele94218/social_network_paper
facebook/getdata/old_clustering_example.py
Python
gpl-2.0
1,361
#!/usr/bin/env python # # It is recommended to run the kafka module against Python 2.7+. If missing # 'kafka' read how to download it at: # http://kafka-python.readthedocs.org/ # # If missing 'avro' read how to download it at: # https://avro.apache.org/docs/1.8.1/gettingstartedpython.html # # Binding to the topic spec...
vanzylad/pmacct-static-analyser-fixes
examples/kafka/kafka_consumer.py
Python
gpl-2.0
6,677
import oauth2 as oauth import sher.settings as settings import cgi import urlparse import urllib import gdata.youtube import gdata.youtube.service import twitter class TwitterService(object): def __init__(self, consumer_key, consumer_secret): self.consumer_key = consumer_key self.consumer_secret =...
viswimmer1/PythonGenerator
data/python_files/28964260/services.py
Python
gpl-2.0
5,901
import struct import numpy as np #import scipy.weave as weave import matplotlib.pyplot as plt from matplotlib.patches import Rectangle import sys, csv, os from PyQt5 import QtGui, QtCore, QtWidgets #import matplotlib #matplotlib.use('Agg') from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanva...
dwaithe/FCS_point_correlator
focuspoint/correlation_gui.py
Python
gpl-2.0
51,790
import os import stepper import time import random import thermo import threading import traceback import logging import states import PID logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class TempLog(object): def __init__(self, history, interval=60, suffix=""): #save data every 60 seconds impo...
jamesgao/kiln_controller
kiln/manager.py
Python
gpl-2.0
5,025
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/src/calendar_edit.ui' # # Created: Wed Nov 17 12:05:53 2010 # by: PyQt4 UI code generator 4.7.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_CalendarEntryEdit(object): def se...
ypid/series60-remote
pc/ui/ui_calendar_edit.py
Python
gpl-2.0
14,073
# ------------------------------------------------------------------------------- # Name: # Purpose: # # Copyright 2014 Diarmuid Collins dcollins@curtisswright.com # https://github.com/diarmuid # # # # This program is free software; you can redistribute it and/or # modify it under the terms of th...
diarmuidcwc/GTSVideoDecom
VideoGTSDecom.py
Python
gpl-2.0
3,209
# -*- coding: cp1251 -*- # Çàäàíèå 10: èíòåðàêòèâíûé ïîäñ÷åò ãëàñíûõ. # ÓÑËÎÂÈÅ: # Íàïèñàòü ïðîãðàììó (python script), êîòîðàÿ ïðè çàïóñêå áóäåò # çàïðàøèâàòü ïîëüçîâàòåëÿ ââåñòè ïðîèçâîëüíóþ ñòðîêó è # âûäàâàòü â îòâåòå êîëè÷åñòâî ãëàñíûõ áóêâ. # Ïðèìå÷àíèå: # - äëÿ ðó÷íîãî ââîäà èñïîëüçóåì âñòðîåííóþ ôóíêöèþ...
pybursa/homeworks
m_zhelyaskoff/hw1/L01_task10.py
Python
gpl-2.0
2,316
# Raymond Hettingers # http://code.activestate.com/recipes/576647/ from itertools import permutations def queen_gf(n): cols = range(n) for ans in permutations(cols): if (n == len(set(ans[i]+i for i in cols)) == len(set(ans[i]-i for i in cols))): yield ans
yehnan/python_book_yehnan
ch06/ch06_8queen_hettingers_gf.py
Python
gpl-2.0
315
#!python #from Numeric import * from numpy import * from scipy import * from scipy import zeros from scipy.linalg import * from scipy import sparse import os #import time #from pylab import save from random import random #global size #global ratioC def generate(size,ratioC): N=2*size**2 #=size*(size+1) + size*(size-...
sideshownick/Snaking_Networks
MyPython/gen2.py
Python
gpl-2.0
4,649
# Django settings for hikeplanner project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Jaime', 'jaime.m.mccandless@gmail.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { #'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': ...
jsquare/hikeplanner
src/settings.py
Python
gpl-2.0
5,672
import cherrystrap import orielpy from cherrystrap import logger, formatter from orielpy import common # parse_qsl moved to urlparse module in v2.6 try: from urllib.parse import parse_qsl #@UnusedImport except: from cgi import parse_qsl #@Reimport import oauth2 as oauth import twitter class T...
theguardian/OrielPy
orielpy/notifiers/tweet.py
Python
gpl-2.0
4,510
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path.di...
glenpp/OrviboS20
setup.py
Python
gpl-2.0
1,055
#!/usr/bin/env python ''' a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other file formats) Copyright: Stuart Rackham (c) 2009 License: MIT Email: srackham@gmail.com ''' import os import fnmatch import HTMLParser import re import shutil import subprocess import sys import traceb...
Distrotech/asciidoc
a2x.py
Python
gpl-2.0
36,995
import logging import traceback from django.conf import settings from django.core.paginator import Paginator from django.http import HttpResponse, HttpResponseServerError, Http404 from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.template.loader i...
viswimmer1/PythonGenerator
data/python_files/32677285/views.py
Python
gpl-2.0
15,766
import os from django.core import serializers from django.db import models from django.utils.functional import cached_property from wagtail.admin.edit_handlers import FieldPanel from wagtail.core.fields import RichTextField from wagtail.core.models import Page from .settings import DISPLAYED_FACTOID_TYPES, BASE_DIR ...
kingsdigitallab/pbw-django
pbw/models.py
Python
gpl-2.0
46,771
#!/usr/bin/python import sys import plugins import flask import argparse import os import urllib2, urllib import threading import time import socket import subprocess import random import json import signal import traceback from uuid import uuid4 as generateUUID from killerbee import kbutils from beekeeperwids.utils.e...
riverloopsec/beekeeperwids
beekeeperwids/drone/daemon.py
Python
gpl-2.0
8,678
#!/usr/bin/python # -*- coding: utf-8 -*- def python3xBytesToStr(): f = open("BytesToStr.txt", "wb") zhcnBytes = b'\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74' zhcnUnicodeStr = zhcnBytes.decode('gbk') print(zhcnUnicodeStr) f.write(zhcnUnicodeStr.encode('utf-8')) f.close() if __name__ == "__ma...
weahwww/python
bytes_to_str.py
Python
gpl-2.0
351
#!/usr/bin/python -tt # Updated version of clipping adapters from sequences # Used cutadapt on combined sequences and removes first 13 bases with fastx_clipper # Website: https://code.google.com/p/cutadapt/ # Updated on: 09/26/2013 # Import OS features to run external programs import os import glob # Directories for ...
calandryll/transcriptome
scripts/old/quality_control3.py
Python
gpl-2.0
1,659
from edc_base.model_mixins import BaseModel, ListModelMixin class Cause (ListModelMixin, BaseModel): class Meta: ordering = ['display_index'] app_label = 'edc_death_report'
botswana-harvard/edc-death-report
edc_death_report/models/cause.py
Python
gpl-2.0
196
#!/usr/bin/env python import unittest from tests.logic_t.layer.LogicLayer.util import generate_ll class SearchTest(unittest.TestCase): def setUp(self): self.ll = generate_ll() self.pl = self.ll.pl self.admin = self.pl.create_user('name@example.org', None, True) self.pl.add(self.a...
izrik/tudor
tests/logic_t/layer/LogicLayer/test_search.py
Python
gpl-2.0
2,413
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException import unittest class WaitForElements(uni...
VolodyaEsk/selenium_python_tony_project
tests/other/waits.py
Python
gpl-2.0
1,361
from django.contrib import admin from .models import Friend class FriendAdmin(admin.ModelAdmin): list_display = ('full_name', 'profile_image') def profile_image(self, obj): return '<img src="%s" width="50" heith="50">' % obj.photo profile_image.allow_tags = True admin.site.register(Friend, Frie...
damianpv/exercise
home/admin.py
Python
gpl-2.0
328
import pygame as pg from .. import prepare, tools from ..components import drop_box, var_display from ..states import game class Level3(game.Game): def __init__(self): game.Game.__init__(self) self.next = 'MENU' self.drop_boxes = { 'move_down':drop_box.DropBox(self.tile_rect.siz...
metulburr/puzzle
data/levels/level3.py
Python
gpl-3.0
5,988
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. # Based on https://groups.google.com/d/topic/sqlalchemy/cQ9e9IVOykE/discussion # By David Gardner (dgardne...
DirkHoffmann/indico
indico/core/db/sqlalchemy/custom/static_array.py
Python
gpl-3.0
2,389
from ert_gui.ide.keywords.definitions import ProperNameFormatArgument from ecl.test import ExtendedTestCase class ProperNameFormatArgumentTest(ExtendedTestCase): def test_proper_name_format_argument(self): argument = ProperNameFormatArgument() self.assertTrue(argument.validate("NAME%d")) ...
pgdr/ert
python/tests/gui/ide/test_proper_name_format_argument.py
Python
gpl-3.0
595
# Copyright (C) 2009, 2010, 2011 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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...
linostar/timeline-clone
test/specs/db/DbOpen.py
Python
gpl-3.0
5,595
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-21 12:22 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('notification_management', '0001_initial'), ] operations = [ mig...
kyrelos/vitelco-mobile-money-wallet
app_dir/notification_management/migrations/0002_auto_20170321_1522.py
Python
gpl-3.0
1,833
import serial import numpy as np import json from datetime import datetime class ElectronicNose: def __init__(self, devAdd='/dev/ttyUSB0', baudrate=115200/3, \ tmax = 1000, outputFile = '', numSensors = 8): ## Creating the serial object self.Sensor = serial.Serial(devAdd, baud...
VandroiyLabs/FaroresWind
faroreswind/collector/ElectronicNose.py
Python
gpl-3.0
2,352
# gizela # # Copyright (C) 2010 Michal Seidl, Tomas Kubin # Author: Tomas Kubin <tomas.kubin@fsv.cvut.cz> # URL: <http://slon.fsv.cvut.cz/gizela> # # $Id$ """ module with functions for gama-data-obs.py and gama-data-adj.py scripts """ import sys def read_configuration_file(configFile, localSystem2D, localSyst...
gizela/gizela
gizela/util/gama_data_fun.py
Python
gpl-3.0
1,739
import os from PodSix.Resource import * from PodSix.Concurrent import Concurrent class Progress(Concurrent): def __init__(self): Concurrent.__init__(self) self.sprite = Image(file=os.path.join("resources", "progress.png")) self.showing = False self.maximum = 1 self.value = 0 self.width = 142 self.heig...
chr15m/Infinite8BitPlatformer
engine/Progress.py
Python
gpl-3.0
960
from collections import UserDict class PathDict(UserDict): def __normalize_key(self, key): tkey = key if isinstance(key, str) and '.' in key: tkey = tuple(key.split('.')) return tkey def __setitem__(self, key, value): tkey = self.__normalize_key(key) retur...
UKTradeInvestment/export-wins-data
fdi/tests/util.py
Python
gpl-3.0
706
# -*- coding: utf-8 -*- # # # Copyright: (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # Contributing Authors: # - Ansible Core Team # - Eduard Snesarev (@verm666) # - Berend De Schouwer (@berenddeschouwer) # - Abhijeet Kasurde (@Akasurde) # GNU General Public License v3.0+ (...
alexlo03/ansible
lib/ansible/module_utils/yumdnf.py
Python
gpl-3.0
6,502
#!/usr/bin/python # -*- coding: utf-8 -*- import os from multiplexer.multiplexer_constants import peers, types from obci.drivers.eeg.binary_driver_wrapper import BinaryDriverWrapper from obci.configs import settings from obci.control.launcher.launcher_tools import obci_root from obci.utils.openbci_logging import log_c...
BrainTech/openbci
obci/drivers/eeg/amplifier_virtual.py
Python
gpl-3.0
1,230
#!/usr/bin/env python import arff import numpy as np import sys from sklearn import preprocessing from sklearn.linear_model import RidgeClassifier from sklearn.feature_selection import RFE from sklearn.pipeline import Pipeline from sklearn.grid_search import GridSearchCV from sklearn.cross_validation import StratifiedK...
bcraenen/KFClassifier
other/methods/RidgeSample.py
Python
gpl-3.0
3,118
# -*- coding: utf-8 -*- """ Created on Wed Apr 20 16:01:21 2016 @author: KB """ #Listes des images du jeu import pygame dossier = "./Img_FS/" extension1 = ".png" extension2 = ".jpg" image_accueil = dossier + "accueil" + extension1 image_fond = dossier + "back1" + extension2 image_mur = dossier + "mur" + extension...
Ezopt/Fear-Shadows
cst.py
Python
gpl-3.0
796
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: # Mateusz Kruszyński <mateusz.kruszynski@gmail.com> # import time from obci.utils import tags_helper from multiplexer.multiplexer_constants import peers, types from obci.logic import logic_helper from obci.logic.logic_decision_peer import LogicDecision from ob...
BrainTech/openbci
obci/logic/logic_speller_peer.py
Python
gpl-3.0
1,099
# Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP 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. # # PySCAP is ...
cjaymes/pyscap
src/scap/model/oval_5/defs/independent/FileHash58TestElement.py
Python
gpl-3.0
902
#!/usr/bin/env python from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtXml import * import sys, os from ui_cheatsheet import Ui_CSDialog class CSWindow ( QDialog , Ui_CSDialog): settings = QSettings('Mte90','LearnHotkeys') settings.setFallbacksEnabled(False) theme_path = "./style" the...
Mte90/LearnHotkeys
cheatsheet.py
Python
gpl-3.0
5,629
from lingpy import * from collections import defaultdict invs = csv2list('inventories.tsv', strip_lines=False) segments = defaultdict(dict) langs = set() for d, t, v, a, n in invs[1:]: if a.strip(): allophone, context = a.split('/') segments[allophone, t][d] = (v, context) segments[v, t][d] = (a...
digling/cddb
datasets/Allen2007/raw/inventories.py
Python
gpl-3.0
838
# Copyright (C) 2014 Statoil ASA, Norway. # # The file 'job_queue_manager.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either vers...
iLoop2/ResInsight
ThirdParty/Ert/devel/python/python/ert/job_queue/job_queue_manager.py
Python
gpl-3.0
2,799
#!/usr/bin/env python ''' mission editor module Michael Day June 2104 ''' from MAVProxy.modules.lib import mp_module from MAVProxy.modules.lib import mp_util from MAVProxy.modules.mavproxy_misseditor import me_event MissionEditorEvent = me_event.MissionEditorEvent from pymavlink import mavutil import multiprocessin...
njoubert/MAVProxy
MAVProxy/modules/mavproxy_misseditor/__init__.py
Python
gpl-3.0
13,978
# -*- coding: utf-8 -*- """ OnionShare | https://onionshare.org/ Copyright (C) 2014 Micah Lee <micah@micahflee.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, o...
vecna/onionshare
onionshare/onionshare.py
Python
gpl-3.0
9,548
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=4:sw=4:et: # Simple debugging module import os import inspect from .config import OPTIONS __all__ = ["__DEBUG__", "__LINE__", "__FILE__"] # --------------------- END OF GLOBAL FLAGS --------------------- def __DEBUG__(msg, level=1): if level > OPTIONS.de...
boriel/zxbasic
src/api/debug.py
Python
gpl-3.0
810
''' LICENCE This file is part of primeDiceBot. primeDiceBot 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. primeDiceBo...
nico202/primeDiceBot
primeDiceClass.py
Python
gpl-3.0
6,205
import json import falcon import peewee from models import models_api from utils.myjson import JSONEncoderPlus class MinisterioId(object): """Endpoint para un ministerio en particular, identificado por id""" @models_api.database.atomic() def on_get(self, req, resp, ministerio_id): """Obtiene la...
ComprasTransparentes/api
endpoints/ministerio.py
Python
gpl-3.0
9,007
from __future__ import absolute_import, print_function from .presenter_base import AlgorithmProgressPresenterBase class AlgorithmProgressDialogPresenter(AlgorithmProgressPresenterBase): """ Presents progress reports on algorithms. """ def __init__(self, view, model): super(AlgorithmProgressDi...
ScreamingUdder/mantid
qt/python/mantidqt/widgets/algorithmprogress/dialog_presenter.py
Python
gpl-3.0
2,130
import websocket import sys args = sys.argv[1:] if (len(args) < 1): print("USAGE : python Part5_246645_247680.py command") sys.exit() cmd = args[0] ws = websocket.create_connection("ws://tcpip.epfl.ch:5006") # Sending cmd print("SENDING : ", cmd) ws.send(cmd) # Listening cnt = 0 try: while True: ...
pthevenet/tcp-ip
tp03/Lab3_246645_247680/Part5_246645_247680.py
Python
gpl-3.0
464
import re from enum import Enum, auto from fractions import Fraction from io import BufferedIOBase from numbers import Number from typing import Iterable import chardet class CueCmd(Enum): PERFORMER = auto() TITLE = auto() FILE = auto() TRACK = auto() INDEX = auto() REM = auto() EOF = aut...
magicgoose/simple_dr_meter
audio_io/cue/cue_parser.py
Python
gpl-3.0
2,049
import smbus, sys import time bus = smbus.SMBus(1) # i2c address address = 0x04 if len(sys.argv) < 3: print -1 sys.exit() cmd = sys.argv[1] msg = sys.argv[2] msAr = [] for x in msg: msAr.append(ord(x)) def writeNumber(): #bus.write_byte(address, value) bus.write_i2c_block_data(address,ord(cmd)...
a2ron44/alfredHomeAutomation
alfredPHP/controller.py
Python
gpl-3.0
539
#!/usr/bin/env python ''' Query Profiler Profile a list of queries from a file. Put the output on stdout. ''' import os import json import logging import time import pymysql import boto3 LOGGER = logging.getLogger('query_profile') LOGGER.setLevel(logging.DEBUG) # create file handler which logs even debug messages ...
tscalf/aws-rds-replica-tools
query_profiler.py
Python
gpl-3.0
5,180
# ################################################################ # # 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_nematic/batch_analyze_nematic_R8a.py
Python
gpl-3.0
2,379
""" :create: 2018 by Jens Diemer :copyleft: 2018 by the django-cms-tools team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ from django.conf import settings from django.utils.translation import ugettext_lazy as _ # Template used to render one landing pag...
jedie/django-cms-tools
django_cms_tools/plugin_landing_page/app_settings.py
Python
gpl-3.0
878
""" ESSArch is an open source archiving and digital preservation system ESSArch Copyright (C) 2005-2019 ES Solutions AB 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...
ESSolutions/ESSArch_Core
ESSArch_Core/WorkflowEngine/migrations/0019_processstep_parent_step.py
Python
gpl-3.0
1,448
#!/usr/bin/python3 from ctypes import * import random import logging import log logger = logging.getLogger('test.prime') __all__ = ['isPrime', 'getRandPrime', 'inv'] libgmp = CDLL('libgmp.so.10') class _mpz_t(Structure): _fields_ = [('_mp_alloc', c_int), ('_mp_size', c_int), ('_mp_d', POINTER(c_ulong))] def _...
cepheidxa/python
prime.py
Python
gpl-3.0
3,162
#!/usr/bin/python ''' ## Description A script to get mail from info@example.com and re-write the 'From"' Header as "From: John Doe via info at example.com <noreply@example.com>'" ## Installation Instuctions * Place the script under */usr/local/sbin/rewrite_from.py*. * Edit */etc/aliases*: ``` info: "|/usr/local/sb...
theodotos/arena
rewrite_from.py
Python
gpl-3.0
1,572
from .app import KiLauncherApp
alandmoore/KiLauncher
kilauncher/__init__.py
Python
gpl-3.0
31
""" Simplish interface to parts of the Last.fm API. Has a built-in lock to stop requests happening at more than one per second. """ import os import time # Import [c]ElementTree try: import cElementTree as ET except: import elementtree.ElementTree as ET # The directory to use to cache downloaded xml cachedir = "/v...
chrisgemignani/graphication2
graphication/lastfm.py
Python
gpl-3.0
4,285
#Copyright (C) 2012 Excensus, LLC. # #This file is part of PlanetWoo. # #PlanetWoo 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. # #Plan...
blc56/PlanetWoo
tiletree/multi.py
Python
gpl-3.0
4,546
# Copyright 2016 by Dai Trying # # This file is part of daixmms2client. # # daixmms2client 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 opti...
Dai-trying/daixmms2client
connector.py
Python
gpl-3.0
1,747
''' Created with dbus2any https://github.com/hugosenari/dbus2any This code require python-dbus Parameters: * pydbusclient.tpl * ./dbus_gen/dbus_dde_daemon_network.xml See also: http://dbus.freedesktop.org/doc/dbus-specification.html http://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html ''' import...
linuxdeepin/dde-daemon
network/examples/python/dbus_gen/com_deepin_daemon_Network.py
Python
gpl-3.0
20,639
import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = {"packages": ["os"], "excludes": ["tkinter"], } # GUI applications require a different base on Windows (the default is for a # console application). base = N...
nanxung/vip_video
setup.py
Python
gpl-3.0
572
#!/bin/python3.5 # Programa obtenido de hacker run, se le pasa lista con 0 y 1, que simbolizan puertas, 0 la puerta abierta 1 la puerta cerrada. # Nuestro objetivo es abrir todas las puertas # si se abre y las subyacentes se abrirán si no están abiertas # el programa devuelve para una lista de 0 y 1 le mínimo de puert...
BlancaCC/cultutrilla
python_aprendizaje/ejemplos_básicos/puertas.py
Python
gpl-3.0
1,203
''' Created on 13/08/2013 @author: Felipe Costa ''' from math import sqrt, atan2, pi import matplotlib.pyplot as pp import numpy as np import utils class Statistics : def __init__(self): self.table_name = "stats" def get_table_name(self): return self.table_name def process(self,rgb_img): #...
luamct/WebSci14
features/color/stats.py
Python
gpl-3.0
1,332
#!/usr/bin/python # # Ansible module for managing Fortigate devices via API # (c) 2017, Will Wagner <willwagner602@gmail.com> and Eugene Opredelennov <eoprede@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print...
eoprede/ansible_fortios_api
fortios/fortios_api_firewall_ippool.py
Python
gpl-3.0
2,902
#!/usr/bin/env python import sys from svn2svn.run.svnreplay import main sys.exit(main() or 0)
tonyduckles/svn2svn
svnreplay.py
Python
gpl-3.0
95
# -*- coding: utf-8 -*- import kivy from kivy.uix.floatlayout import FloatLayout from kivy.uix.button import Button from kivy.uix.label import Label from kivy.properties import ObjectProperty from kivy.uix.popup import Popup from pos_system import POS, Item from db import Database from buttonex import ButtonEx from ...
iamthekyt/POS-System
src/controller.py
Python
gpl-3.0
5,417
import numpy as np import pandas as pd # from matplotlib.pyplot import plot,show,draw import scipy.io import sys sys.path.append("../") from functions import * from pylab import * from sklearn.decomposition import PCA import _pickle as cPickle import matplotlib.cm as cm import os #####################################...
gviejo/ThalamusPhysio
python/figure_talk/main_talk_7_corr.py
Python
gpl-3.0
14,903
""" PostgreSQL Database data to Python Object/Array """ from gasp.pgsql import connection def sql_query(conParam, query, encoding=None): """ Retrive data from a SQL query """ conn = connection(conParam) if encoding: conn.set_client_encoding(encoding) cursor = conn.cursor() ...
JoaquimPatriarca/senpy-for-gis
gasp/frompsql.py
Python
gpl-3.0
3,280
from ply import lex, yacc class Lexer: reserved = { #'ikawna' : 'IF', #'syapala' : 'ELSE', #'akona' : 'ELSEIF', #'kamipa' : 'WHILE', #'ibalik' : 'RETURN', 'tayona' : 'MAIN', 'ayokona' : 'END', ...
habagat/hugot214
LexerParser.py
Python
gpl-3.0
9,650
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License,...
keen99/SickRage
sickbeard/clients/__init__.py
Python
gpl-3.0
3,669
from ga_utils import * from random import randint, gauss, random, seed import unittest def generate_xover(population, midpoint_dist='uniform'): """ Generates a new value using crossover mutation :param population: sorted iterable of current population :param midpoint_dist: 'uniform' or 'normal' distr...
gioGats/GeneticText
generation_functions.py
Python
gpl-3.0
6,538
import csv import operator import os import shutil from subprocess import call import pandas import numpy from Bio import SeqIO from Bio.Alphabet import IUPAC from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from scipy import stats from dartqc.DartUtils import stamp from dartqc.DartMessages ...
esteinig/dartQC
dartqc/DartModules.py
Python
gpl-3.0
36,121
#!/usr/bin/env python __version__ = '$Revision: 4791 $'.split()[1] __date__ = '$Date: 2007-01-04 $'.split()[1] __author__ = 'Kurt Schwehr' __doc__=""" Count the transits by ship type for each month. A transit is associated with the first month that the vessel is observed. @requires: U{epydoc<http://epydoc.sourcefor...
stregoika/aislib
scraps/ais_pg_monthhistogram.py
Python
gpl-3.0
9,416
# -*- coding: utf-8 -*- from .trello import * from .models import *
LuizArmesto/trellonotify
src/lib/trello/__init__.py
Python
gpl-3.0
69