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
# This file is part of rERPy # Copyright (C) 2012 Nathaniel Smith <njs@pobox.com> # See file LICENSE.txt for license information. import os.path import functools import types import sys import numpy as np def maybe_open(file_like, mode="rb"): # FIXME: have more formal checking of binary/text, given how important...
rerpy/rerpy
rerpy/util.py
Python
gpl-2.0
3,923
# coding=utf-8 from Levenshtein import ratio import requests import re arr_abrev = {'AC': 'Ahuntsic-Cartierville', 'AJ': 'Anjou', 'BF': 'Beaconsfield', 'BU': "Baie-d'Urfé", 'BV': 'Sainte-Anne-de-Bellevue', 'CL': 'Côte-Saint-Luc', 'CN': 'Côte...
crevetor/libmtl
libmtl/__init__.py
Python
gpl-2.0
3,095
import chimera import XlaGuiTests import xlinkanalyzer as xla # for this test to run do: # chimera --pypath ~/devel/XlinkAnalyzer --pypath ~/devel/pyxlinks/ run.py <name of this file> RUNME = True description = "Tests gui class" class TestPolI(XlaGuiTests.XlaBaseTest): def setUp(self): mPaths = ['Pol...
crosslinks/XlinkAnalyzer
pytests/pyt_TestLoadPolI.py
Python
gpl-2.0
1,035
# # The Python Imaging Library. # $Id$ # # EPS file handling # # History: # 1995-09-01 fl Created (0.1) # 1996-05-18 fl Don't choke on "atend" fields, Ghostscript interface (0.2) # 1996-08-22 fl Don't choke on floating point BoundingBox values # 1996-08-23 fl Handle files from Macintosh (0.3) # 2001-02-17 fl ...
ppizarror/Hero-of-Antair
data/images/pil/EpsImagePlugin.py
Python
gpl-2.0
9,745
#!/usr/bin/python # -*- coding=utf-8 -*- #--- # # ------------ # Description: # ------------ # # Arabic codes # # (C) Copyright 2010, Taha Zerrouki # ----------------- # $Date: 2010/03/01 # $Author: Taha Zerrouki$ # $Revision: 0.1 $ # This program is written under the Gnu Public License. # """ Stack module """ clas...
mohsenuss91/pyarabic
pyarabic/stack.py
Python
gpl-3.0
582
#!/usr/bin/python #-------------------------------------- # ___ ___ _ ____ # / _ \/ _ \(_) __/__ __ __ # / , _/ ___/ /\ \/ _ \/ // / # /_/|_/_/ /_/___/ .__/\_, / # /_/ /___/ # # lcd_16x2.py # 16x2 LCD Test Script # # Author : Matt Hawkins # Date : 06/04/2015 # # http://www.raspberrypi-spy...
UgoesSky/Fahrradverleih
lcd_16x2.py
Python
gpl-3.0
4,028
#""" #This file is part of Happypanda. #Happypanda 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 #any later version. #Happypanda is distributed in the hope that it will be ...
peaceandpizza/happypanda
version/misc.py
Python
gpl-3.0
53,124
"""setuptools installer script for PyRSB.""" import os import setuptools from setuptools import setup, Extension from setuptools.command.build_ext import build_ext from time import gmtime, strftime if True: VERSION = "0.2.20210303" else: if os.environ.get("PYRSB_VERSION"): VERSION = os.environ.get("PYR...
michelemartone/pyrsb
setup.py
Python
gpl-3.0
1,979
from django.core.management.base import BaseCommand, CommandError from django.db import connection from tmv_app.models import * class Command(BaseCommand): help = 'copy doctopics' def handle(self, *args, **options): run_ids = list(RunStats.objects.all().order_by('run_id').values_list('run_id',flat=Tru...
mcallaghan/tmv
BasicBrowser/tmv_app/management/commands/partition_doctopic.py
Python
gpl-3.0
2,379
import random import numpy as np import pandas as pd import matplotlib.pyplot as plt def get_percentile(values, bucket_number): step = 100 / bucket_number return [np.percentile(values, i*step) for i in range(bucket_number)] def get_percentile_number(value, percentiles): i = 0 while value >= percentile...
lesina/labs2016
Laba06/exercise03.py
Python
gpl-3.0
2,388
# Copyright (C) 2013- Takafumi Arakaki # 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 distributed ...
tkf/rash
rash/tests/test_indexer.py
Python
gpl-3.0
3,242
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 <+YOU OR YOUR COMPANY+>. # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. #...
marcusmueller/gr-drm
gr-drm/python/qa_add_tailbits_vbvb.py
Python
gpl-3.0
1,599
#!/usr/bin/env python # -*- coding: utf8 -*- #~####################################################################### #~ Copyright (c) 2010 Timur Timirkhanov <timur@timirkhanov.kz> # #~ # #~ This file is part of FreQ-bot. ...
TLemur/freq-bot
src/plugins/muc_admin/invite.py
Python
gpl-3.0
2,134
# FRA 213.53 Gage full_name = "FRA Class I" short_name = "I" min_gauge = 56.0 standard_gauge = 56.5 max_gauge = 58.0
cpn18/track-chart
desktop/class_i.py
Python
gpl-3.0
119
# -*- coding: utf-8 -*- #!/usr/bin/env python __author__ = 'ifontarensky' __docformat__ = 'restructuredtext' __version__ = '0.9' plugin_class = 'Editor' plugin_name = 'SnortEditor' import os from PyQt4 import QtCore, QtGui from PyQt4.QtCore import (QObject, Qt, QDir, SIGNAL, SLOT) from ruleeditor.plugins.codeedito...
ifontarensky/RuleEditor
source/ruleeditor/plugins/snorteditor/snorteditor.py
Python
gpl-3.0
6,360
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ####################################################################### # Pinytodo - A Pinyto synced ToDo-List for Gtk+ # Copyright (C) 2105 Johannes Merkert <jonny@pinyto.de> # # This program is free software: you can redistribute it and/or mo...
Pinyto/pinytodo
pinyto_desktop_todo_lib/Builder.py
Python
gpl-3.0
11,625
# # 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...
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/addons/cycles/engine.py
Python
gpl-3.0
2,191
import cv2 import requests import time from socket import * from vision.LocalisationTresor import LocalisationTresor from ControleurPololu import ControleurPololu from Cameras.CameraRobot import CameraRobot from source.Decodeur import Decodeur from vision.Ajustement import Ajustement from ControlleurDeplacement import ...
phil888/Design3
Livrable3/Remise/Code source et tests/source/Robot.py
Python
gpl-3.0
8,491
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 OSGeo # # 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 ...
francbartoli/geonode
geonode/base/management/commands/set_all_layers_alternate.py
Python
gpl-3.0
2,844
# -*- coding: utf-8 -*- # StreetSign Digital Signage Project # (C) Copyright 2013 Daniel Fairhead # # StreetSign 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...
danthedeckie/streetsign
streetsign_server/user_session.py
Python
gpl-3.0
3,581
#@+leo-ver=5-thin #@+node:lee.20141215164031.94: * @file example.py #@@language python #@@tabwidth -4 #@+<<decorations>> #@+node:lee.20141215164031.95: ** <<decorations>> import cherrypy import random from std.asciisymbol import asciiImage from wsgi import env #@-<<decorations>> #@+others #@+node:lee.20141215164031.96...
dora40323106/2014cpa_final_project
std/a40323141.py
Python
gpl-3.0
7,813
#!/usr/bin/env python # -*- coding: utf-8 -*- """Platform specific extensions (using ctypes)""" # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from __future__ import absolute_import,...
psychopy/versions
psychopy/platform_specific/__init__.py
Python
gpl-3.0
1,379
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # This file is in the public domain ### END LICENSE ### DO NOT EDIT THIS FILE ### """Helpers for an Ubuntu application.""" import logging import os from . python_nameconfig import get_data_file from . Builder import Builder ...
didrocks/quickly
data/templates/ubuntu-application/project_root/python_lib/helpers.py
Python
gpl-3.0
3,153
# -*- coding: utf-8 -*- """ Created on Mon May 9 14:35:12 2016 @author: lifu """ import numpy as np from legonet.models import NeuralNetwork from legonet.layers import FullyConnected, Input from legonet.regularizers import l2 from legonet.optimizers import Adam nn = NeuralNetwork(optimizer=Adam(), log_dir='logs') n...
lifuhuang/legonet
demos/mlp_demo.py
Python
gpl-3.0
927
import numpy as np from numpy import linalg import numbers, math, os import cPickle as pickle class OdeTrajectory (object): def __init__(self, system, time, dt, u0 = None, tol=1e-8, t0 = 0.0 ): if callable(system) and hasattr(system, 'dim') and hasattr(system, 'dfdu'): self.system = system ...
gomezstevena/LSSSolver
trajectory.py
Python
gpl-3.0
3,693
import urllib2 import sys import threading import random import re #global params url='' host='' headers_useragents=[] headers_referers=[] request_counter=0 flag=0 safe=0 def inc_counter(): global request_counter request_counter+=1 def set_flag(val): global flag flag=val def set_safe(): ...
blacksaw1997/erdo
snakeloris.py
Python
gpl-3.0
19,151
''' Copyright 2016, 2017 Aviva Bulow This file is part of Fealden. Fealden 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. ...
aviva-bulow/fealden-0.2
fealden/seed.py
Python
gpl-3.0
16,679
def findSmallest(arr): smallest = arr[0] smallest_index = 0 for i in range(1, len(arr)): if arr[i] < smallest: smallest = arr[i] smallest_index = i return smallest_index def selectionSort(arr): newArr = [] for i in range(len(arr)): smallest = findSmalles...
serggrom/python-algorithms
Selection_sort.py
Python
gpl-3.0
434
usernames = ['tim05','admin','superman1','wethebestmusic','usersaurus'] if usernames: for username in usernames: if username == 'admin': print("Hello admin, would you like to see a status report?") else: print("Hello " + username + ", thank you for logging in again.") else: ...
lukeebhert/python_crash_course
Chapter_5/no_users.py
Python
gpl-3.0
673
from __future__ import division import errno import os, sys sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/../../") import random import math from itertools import product from multiprocessing import Pool, Process, Queue from threading import Thread from pymcda.electre_tri import MRSort from pymcda....
oso/pymcda
pymcda/learning/meta_mrsortvc4.py
Python
gpl-3.0
10,494
#! /usr/bin/env python """ Change current DIRAC File Catalog working directory """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from COMDIRAC.Interfaces import critical from COMDIRAC.Interfaces import DSession from COMDIRAC.Interfaces import D...
DIRACGrid/COMDIRAC
src/COMDIRAC/Interfaces/scripts/dcd.py
Python
gpl-3.0
1,668
import numpy as np data = [(1,2),(3,4)] np.save("temp.npy",data) stuff = np.load("temp.npy") print data print stuff print stuff == data
azariven/BioSig_SEAS
bin/test/test_np_save_load.py
Python
gpl-3.0
143
#!/usr/bin/env python3 # Copyright 2009-2017 BHG http://bw.org/ def main(): infile = open('lines.txt', 'rt') outfile = open('lines-copy.txt', 'wt') for line in infile: print(line.rstrip(), file=outfile) print('.', end='', flush=True) outfile.close() print('\ndone.') if __name__ == ...
shucommon/little-routine
python/ex_files_python_esst/exercise_files/Chap12/copy-text.py
Python
gpl-3.0
339
#!/usr/bin/env python3 """ Splitting text into chunks (a la polybius). Use the value of the -c parameter to set how long blocks to accumulate are. To assign a letter to each block in order to allow cryptanalysis with other tools, use -a. """ import re import sys import string import argparse import itertools acc_cod...
elterminad0r/cipher_tools
src/scripts/chunk_text.py
Python
gpl-3.0
1,484
from django.conf.urls import patterns, url from ..views import (LoanListView, LoanCreateView, LoanDetailView, LoanUpdateView, LoanDeleteView) from django.contrib.auth.decorators import login_required urlpatterns = patterns('', url(r'^create/$', # NOQA login_required(LoanCreateView.a...
show0k/ressources_management_django
flowers_ressources_management/resources/urls/loan_urls.py
Python
gpl-3.0
756
from PyQt5.QtWidgets import QWidget, QFrame, QVBoxLayout, QGridLayout, QLabel, QProgressBar; from PyQt5 import QtCore; import re, time; import numpy as np; from datetime import timedelta; from threading import Thread, Lock; durPattern = re.compile('Duration: [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}'); # Pattern for ...
kwodzicki/iTunes_Music_Converter
iTunes_Music_Converter/progressFrame.py
Python
gpl-3.0
24,270
def fact(n): if n == 1: return 1 return n * fact(n-1) print (fact(int(input().strip())))
sirishaditya/hackerrank_Python
algorithms/implementation/extralongfactorials.py
Python
gpl-3.0
107
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution, third party addon # Copyright (C) 2016- Vertel AB (<http://vertel.se>). # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
vertelab/odoo-payroll
hr_attendance_notification/__openerp__.py
Python
gpl-3.0
1,328
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_vpn_ipsec_phase1_interface.py
Python
gpl-3.0
59,722
# encoding: utf8 # # (C) Copyright Arskom Ltd. <info@arskom.com.tr> # Uğurcan Ergün <ugurcanergn@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 Software Foundation; either version 2 of t...
ugurcan377/spynepi
spynepi/entity/project.py
Python
gpl-3.0
5,040
def my_parse_int(s): try: return int(s) except: return 'NaN'
VladKha/CodeWars
7 kyu/String to integer conversion/solve.py
Python
gpl-3.0
85
"""Tests for the bob_emploi.importer.geonames_city_suggest module.""" from os import path import unittest from bob_emploi.data_analysis.importer.deployments.usa import counties class CountiesTestCase(unittest.TestCase): """Integration tests for the upload function.""" testdata_folder = path.join(path.dirna...
bayesimpact/bob-emploi
data_analysis/importer/deployments/usa/test/counties_test.py
Python
gpl-3.0
1,268
from registry.models import Passport, Visit from registry.extensions import db def test_sweep_closes_visits(app): """Visits are ordered by check_in""" with app.test_request_context(): passport = Passport(surname='John', name='Doe', pass_id=111, phone='123', age=7, address='...
arsgeografica/kinderstadt-registry
test/unit/test_sweep.py
Python
gpl-3.0
1,182
import svgwrite from svgwrite.text import TSpan import csv rows = 10 columns = 3 labelsize = { 'x': 2.5935, 'y': 1.0 } leftMargin = 0.21975 rightMargin = 0.21975 topMargin = 0.5 bottomMargin = 0.5 horSpacing = 0.14 vertSpacing = 0.0 fontSize = 12 yTxtSpacing = fontSize addresses = [] with open('Baby Shower Guest Li...
g19fanatic/labelSVG
labels.py
Python
gpl-3.0
1,197
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Editor Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtGui import (QVB...
jromang/retina-old
distinclude/spyderlib/plugins/editor.py
Python
gpl-3.0
98,134
# -*-python-*- # # Copyright (C) 1999-2006 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For more information, visit h...
oseemann/cvsreview
app/vclib/popen.py
Python
gpl-3.0
8,464
# Written by Shlomi Fish, under the MIT Expat License. import unittest import pysollib.stack from pysollib.acard import AbstractCard from pysollib.games.spider import ScorpionTail_RowStack from pysollib.games.spider import Scorpion_RowStack from pysollib.games.spider import Spider_RowStack from .common_mocks import ...
shlomif/PySolFC
tests/lib/pysol_tests/test_scorpion_canMove.py
Python
gpl-3.0
2,742
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2013 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
nexdatas/clients
simpleclients/simpleDecoderClient.py
Python
gpl-3.0
3,333
# -*- coding: utf-8 -*- """ WSGI config for qoala project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ from __future__ import unicode_literals, print_function, division, absolut...
last-g/qoala
qoala/wsgi.py
Python
gpl-3.0
494
#!/usr/bin/env python import string import itertools import binascii #char = string.ascii_letters #print char.__len__() char = [] string = "" for i in range(16,256): hexchar = hex(i) hexchar = hexchar.lstrip('0x') char.append(hexchar) for i in range(150, char.__len__()): hexstring = char[i] string = string + bina...
godoppl/project
otw/abraxas/level4/brute.py
Python
gpl-3.0
742
__author__ = 'Scott Ficarro' __version__ = '1.0' import wx, os, sys, re import wx.lib.mixins.listctrl as listmix import mz_workbench.mz_masses as mz_masses from collections import defaultdict class TestListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.TextEditM...
BlaisProteomics/mzStudio
mzStudio/ModManager.py
Python
gpl-3.0
19,731
from django.test import TestCase from django.utils.six import BytesIO from rest_framework.parsers import JSONParser from rest_framework.renderers import JSONRenderer from mediocris.serializers import SampleSerializer from mediocris.tests.helpers import serialized_datetime from mediocris.tests.factories import SampleFa...
sdeleeuw/mediocris
mediocris/tests/test_serializer_sample.py
Python
gpl-3.0
1,520
# -*- mode: python; coding: utf-8 -*- # # Copyright 2012 Andrej A Antonov <polymorphm@gmail.com>. # # This program 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 # (...
polymorphm/php-miniprog-shell
lib_php_miniprog_shell_2011_12_17/readlink_argparse.py
Python
gpl-3.0
969
""" Script to run the actual online classification of data """ import os import logging.handlers import multiprocessing import time import numpy import warnings import cPickle import xmlrpclib import sys online_logger = logging.getLogger("OnlineLogger") from pySPACE.environments.live import eeg_stream_manager import ...
pyspace/test
pySPACE/environments/live/prediction.py
Python
gpl-3.0
23,206
#!/usr/bin/env python # # Copyright 2004,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
RedhawkSDR/integration-gnuhawk
qa/tests/qa_add_v_and_friends.py
Python
gpl-3.0
13,912
# -*- coding: utf-8 -*- from . import utility from .exception import DataProcessorError import tempfile import functools from logging import getLogger, DEBUG logger = getLogger(__name__) logger.setLevel(DEBUG) class DataProcessorRunnerError(DataProcessorError): """ Exception about starting run """ def __i...
kenbeese/DataProcessor
lib/dataprocessor/runner.py
Python
gpl-3.0
1,629
#!/usr/bin/env python3 class Widget_geometries: ''' Class for holding information about widnow and elements geometries. ''' def __init__(self, settings): ''' Class container for the all dimensions of all elements used in the GUI. Args: settings: instance - cla...
mariuszkowalski/BioCounter
gui/widgets_geometries.py
Python
gpl-3.0
3,371
import os from io import BytesIO from shutil import copyfileobj from hashlib import md5 from pymongo import DESCENDING from flask import ( render_template, url_for, request, flash, make_response, abort, jsonify ) from flask_login import current_user from flask_classful import FlaskView, route from flask_paginat...
certsocietegenerale/fame
web/views/analyses.py
Python
gpl-3.0
15,600
# # SFHo/SFHx example for O$_2$sclpy # See the O$_2$sclpy documentation at # https://neutronstars.utk.edu/code/o2sclpy for more information. # + import o2sclpy import matplotlib.pyplot as plot import numpy import sys plots=True if 'pytest' in sys.modules: plots=False # - # Link the O$_2$scl library: link=o2scl...
awsteiner/o2sclpy
doc/static/examples/SFHo_SFHx.py
Python
gpl-3.0
1,575
from __future__ import with_statement import sys import lofarpipe.support.lofaringredient as ingredient from lofarpipe.support.baserecipe import BaseRecipe from lofarpipe.support.remotecommand import RemoteCommandRecipeMixIn from lofarpipe.support.remotecommand import ComputeJob from lofarpipe.support.data_map import ...
jjdmol/LOFAR
CEP/Pipeline/recipes/sip/master/selfcal_finalize.py
Python
gpl-3.0
9,208
#!/usr/bin/env python # Copyright (c) 2013 Maxim Kovalev, Carnegie Mellon University # This file is part of Locationing Server. # # Locationing Server 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...
maxikov/locationpythonserver
locationpythonserver/new_server/locationpythonserver.py
Python
gpl-3.0
9,521
# -*- coding: utf-8 -*- # # HackMT_2018 documentation build configuration file, created by # sphinx-quickstart on Wed Jan 24 18:54:23 2018. # # 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. #...
roguefalcon/rpi_docker_images
hackmt_2018_docs/hackmt2018/conf.py
Python
gpl-3.0
5,121
from tools import * from cochlea_model import *
pabloriera/jitcochlea
jitcochlea/__init__.py
Python
gpl-3.0
49
"test python"
millanes4/repotest
test.py
Python
gpl-3.0
14
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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...
jjgomera/pychemqt
lib/EoS/Grayson_Streed.py
Python
gpl-3.0
8,943
#!/usr/bin/env python # # Author: Pablo Iranzo Gomez (Pablo.Iranzo@gmail.com) # # Description: Script for monitoring host status and VM's rhevm-sdk # api and produce NAGIOS valid output # # Requires rhevm-sdk to work # # This program is free software; you can redistribute it and/or modify # it under the terms of the GN...
iranzo/rhevm-utils
monitoring/rhev-nagios-host.py
Python
gpl-3.0
2,893
# Copyright 2008 (C) Nicira, Inc. # # This file is part of NOX. # # NOX 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. # # NOX is dist...
bigswitch/snac-nox
src/nox/lib/directory_factory.py
Python
gpl-3.0
8,817
# -*coding: utf-8-*- from collections import Iterable from . import ResourcesQueryBuilder from ...models.resource import Resource from ...models.address import Address from ...models.country import Country from ...models.region import Region from ...models.location import Location class AddressesQueryBuilder(Resou...
mazvv/travelcrm
travelcrm/lib/qb/addresses.py
Python
gpl-3.0
1,608
import sys from .serializer import serialize class Configuration(object): """Wrap a dictionary and provide certain helper methods. Adds ability to access nested values using dotted keys. Parameters ---------- conf_dict: dict A dictionary which should be wrapped. If not provided, an empty ...
pri22296/yaydoc
modules/scripts/config/configuration.py
Python
gpl-3.0
6,376
#!/usr/bin/env python3 # # Note: # A re-implementaion (primary for myself) of: # https://github.com/yktoo/indicator-sound-switcher # Icon(s) by: https://github.com/yktoo/indicator-sound-switcher # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
peteroltmann/audio-sink-switcher
audio-sink-switcher.py
Python
gpl-3.0
6,285
from rdflib.Graph import Graph # Uses the forward chaining method, although the backward chaining method and a mixed approach have been considered # http://en.wikipedia.org/wiki/Inference_engine # http://en.wikipedia.org/wiki/Rete_algorithm # http://en.wikipedia.org/wiki/Semantic_reasoner class RuleEngine: contex...
diegomartin/Telemaco
TelemacoServer/src/rule_engine/RuleEngine.py
Python
gpl-3.0
2,972
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
dasbruns/netzob
src/netzob/Inference/Grammar/AutomataFactories/PTAAutomataFactory.py
Python
gpl-3.0
7,287
import pandas as pd import numpy as np import pickle from axiomatic.base import AxiomSystem, TrainingPipeline from axiomatic.axiom_training_stage import * from axiomatic.genetic_recognizer_training_stage import GeneticRecognizerTrainingStage from axiomatic.elementary_conditions import * from axiomatic.objective_functi...
victorshch/axiomatic
test_union_axioms.py
Python
gpl-3.0
1,940
# -*- coding:utf-8 -*- ## src/message_window.py ## ## Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org> ## Copyright (C) 2005-2008 Travis Shirk <travis AT pobox.com> ## Nikos Kouremenos <kourem AT gmail.com> ## Copyright (C) 2006 Geobert Quach <geobert AT gmail.com> ## ...
irl/gajim
src/message_window.py
Python
gpl-3.0
51,039
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2018-2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
chipaca/snapcraft
tests/unit/commands/test_build_providers.py
Python
gpl-3.0
18,460
from handlers.v2.base import RestBase class RestMain(RestBase): def get(self): return 'welcome to dark chess'
AHAPX/dark-chess
src/handlers/v2/main.py
Python
gpl-3.0
124
from __future__ import absolute_import, unicode_literals import logging import os import traceback from urllib.parse import urljoin from coadd.models import Release from common.notify import Notify from django.conf import settings from django.contrib.auth.models import User from django.template.loader import render_t...
linea-it/dri
api/userquery/create_table_as.py
Python
gpl-3.0
7,499
""" Indivo Model for Medication Fill """ from fact import Fact from django.db import models from django.conf import settings class MedicationFill(Fact): name = models.CharField(max_length=200) name_type = models.CharField(max_length=200, null=True) name_value = models.CharField(max_length=200, null=True) name...
newmediamedicine/indivo_server_1_0
indivo/models/fact_objects/medicationfill.py
Python
gpl-3.0
1,352
#!/usr/bin/env python3 import unittest import uuid from lofar.messaging.messagebus import TemporaryQueue import logging logger = logging.getLogger(__name__) #TODO: add tests for tbbservice if __name__ == '__main__': logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO) wit...
kernsuite-debian/lofar
MAC/Services/TBB/TBBServer/test/t_tbbserver.py
Python
gpl-3.0
490
import unittest import mock import upload.injectionContainer as injectionContainer from upload.strategy.dummys.injectedContainerDummy import ContainerMock class TestAppUpload(unittest.TestCase): """ Class Test for app Upload """ def test_app_upload(self): """ Test case for upload fi...
acostasg/upload
upload/tests/app/test_appUpload.py
Python
gpl-3.0
2,179
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-26 13:40 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('steam_app', '0001_initial'...
aexposito6/Steam
Steam/steam_app/migrations/0002_auto_20170526_1340.py
Python
gpl-3.0
571
# -*- coding: utf-8 -*- # # Last Modified: 2013-09-02 by Alan Pipitone # added lines for Al'exa-Ide # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
AlexaProjects/Alexa2
ALEXA-IDE/core/ninja_ide/gui/editor/editor.py
Python
gpl-3.0
58,712
# # Copyright 2004 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. #...
trnewman/VT-USRP-daughterboard-drivers_python
gnuradio-core/src/python/gnuradio/eng_option.py
Python
gpl-3.0
2,490
# coding: utf-8 # Deep Learning # ============= # # Assignment 2 # ------------ # # Previously in `1_notmnist.ipynb`, we created a pickle with formatted datasets for training, development and testing on the [notMNIST dataset](http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html). # # The goal of this assig...
jinzishuai/learn2deeplearn
google_dl_udacity/lesson3/prob3_sgd_1hl_reg.py
Python
gpl-3.0
5,473
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit import routes.mapper as r from .dbfunctions import ( userCanAddUsers, userCanManageResources, isResourceAdmin, userResourceAccess, ) class IlriauthPlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) plug...
ilri/ckanext-dataportal
ckanext-ilriauth/ckanext/ilriauth/plugin.py
Python
gpl-3.0
4,425
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-12-30 08:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('wechat', '0003_confbasic_money'), ] operations = [ migrations.RenameField( ...
yukeyi/meeting
wechat/migrations/0004_auto_20161230_1633.py
Python
gpl-3.0
424
import sys import os from six import print_ from sqlalchemy import Table, Column, String, Integer, \ create_engine, MetaData from slackclient import SlackClient # Setup script for Kwicksano v. 1.0 def connect(user, password, db, host, port): # Returns a connection and a metadata object url = 'postgresql:/...
mbeland/kwicksano
setup.py
Python
gpl-3.0
2,998
from sugar.datastore import datastore from datetime import date import json import os class badges: def __init__(self, activity, bundle_id): self._id = bundle_id ds_objects, num_objects = datastore.find({'activity': activity, 'has_badges': True})...
FOSSRIT/lemonade-stand
badges.py
Python
gpl-3.0
2,392
from ..audio_tools import AudioBlock, AudioFileBlock from ..commons import draw_utils import numpy class AVBase(object): DONT_PLAY_AUDIO = True def __init__(self): self.av_filename = None self.time_pos = 0. self.audio_active = True self.duration = 0 def set_av_filename(sel...
sujoykroy/motion-picture
editor/MotionPicture/shapes/av_base.py
Python
gpl-3.0
2,279
import numpy from .object3d import Object3d from .texture_map_color import TextureMapColor from .misc import * from .draw_utils import * from .colors import Color from xml.etree.ElementTree import Element as XmlElement class Polygon3d(Object3d): TAG_NAME = "pl3" Items = [] def __init__(self, parent, poi...
sujoykroy/motion-picture
editor/MotionPicture/commons/polygon3d.py
Python
gpl-3.0
9,463
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Daniel Estevez <daniel@destevez.net> # # This file is part of gr-satellites # # SPDX-License-Identifier: GPL-3.0-or-later # # This is based on the telemetry parser from # https://github.com/danalvarez/gr-quetzal1/blob/master/apps/quetzal1_parse.py from ...
daniestevez/gr-satellites
python/telemetry/quetzal1.py
Python
gpl-3.0
4,647
"""Test fonctional connectivity related functions.""" import numpy as np from brainpipe.connectivity import (sfc, directional_sfc, dfc, directional_dfc, fc_summarize) class TestFc(object): # noqa sfcm = ['corr', 'mtd', 'cmi'] def _generate_arrays(self, n, phi=0): ...
EtienneCmb/brainpipe
brainpipe/connectivity/tests/test_fc.py
Python
gpl-3.0
2,810
#!/usr/bin/env python3 from setuptools import setup, find_packages from trackma import utils try: LONG_DESCRIPTION = open("README.md").read() except IOError: LONG_DESCRIPTION = __doc__ NAME = "Trackma" REQUIREMENTS = [] EXTRA_REQUIREMENTS = { 'curses': ['urwid'], 'GTK': ['pygobject'], 'Qt': [], }...
z411/trackma
setup.py
Python
gpl-3.0
1,685
#!/usr/bin/env python """ crate_anon/tools/celery_status.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify it under ...
RudolfCardinal/crate
crate_anon/tools/celery_status.py
Python
gpl-3.0
1,517
import argparse import sys import time import re import requests from bs4 import BeautifulSoup from review import Review def get_playstore_review_by_appid(appid, iter, sortOrder): ''' Returns a list of reviews for an app in playstore. Each review is a object having below attributes: 1. 'author_na...
skumarlabs/Review_Miner
Review_Miner/spiders/playstore_reviews.py
Python
gpl-3.0
6,073
from django import template from django.utils.safestring import mark_safe import logging import markdown register = template.Library() @template.defaultfilters.stringfilter @register.filter def collapse(input): return ' '.join(input.split()) @register.filter def can_edit_post(user, post): return user.can_ed...
CLLKazan/iCQA
qa-engine/forum/templatetags/extra_filters.py
Python
gpl-3.0
1,493
#!/usr/bin/python # -*- coding: utf8 -*- import sys import logging import log from foremanclient.validator import Validator from foreman.client import Foreman, ForemanException from pprint import pprint class ForemanBase: def __init__(self, config, loglevel=logging.INFO): logging.basicConfig(level=logl...
invicnaper/foreman-ansible-postgres
roles/foreman_yml/files/foreman-yml/foremanclient/__init__.py
Python
gpl-3.0
3,402
#coding:utf8 ''' csv模块测试文件 ''' import re import csv import json import redis import copy import MySQLdb from urlparse import urlparse import pymongo def csv_write(info_list, file_name='', is_dict=True): ''' writer 根据字典列表写入csv 可处理csv_write_dic()能处理的格式 [{a:1, b:2}, {a:2, b:3}] 还可处理非字典形式 [(1,2),(2,3...
duanyifei/python_modules_test
test_csv.py
Python
gpl-3.0
6,342
# -*- coding: utf-8 -*- from pyload.plugin.internal.XFSAccount import XFSAccount class XFileSharingPro(XFSAccount): __name = "XFileSharingPro" __type = "account" __version = "0.06" __description = """XFileSharingPro multi-purpose account plugin""" __license = "GPLv3" __authors ...
ardi69/pyload-0.4.10
pyload/plugin/account/XFileSharingPro.py
Python
gpl-3.0
990
from django.contrib import admin # Register your models here. from .models import Article class ArticleAdmin(admin.ModelAdmin): """docstring for BlockAdmin""" list_display = ('title', 'author', 'channel', 'likes', 'views', 'comments_num', 'status', 'create_timestamp', ...
yqji/MySite
Code/DavidBlog/Article/admin.py
Python
gpl-3.0
465