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
# -*- coding: utf-8 -*- """ Module implementing MainWindow. """ import sys from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QMainWindow from PyQt5 import QtCore, QtGui, QtWidgets import webbrowser from Ui_main import Ui_MainWindow from PyQt5.QtWidgets import QMessageBox class MainWindow(QMainWindow, Ui_...
nanxung/vip_video
main.py
Python
gpl-3.0
2,066
# -*- coding: utf-8 -*- # 本题难度:★ # 不使用额外储存空间,判断一个整数是否为回文数字。例如: # -22 -> false # 1221 -> true # 1221221 -> true # 1234321 -> true # 234 -> false # 需要注意的是: # 考虑负数 # 不允许使用额外储存空间,比如将数字转换成字符串 # 反转数字需要考虑溢出问题 # 参考答案:https://github.com/barretlee/daily-algorithms/blob/master/answers/7.md import math def Palindrome_Number(nu...
pengkobe/leetcode
questions/Palindrome_Number.py
Python
gpl-3.0
1,166
import numpy as np import matplotlib.pyplot as plt data1 = np.loadtxt("threebody_euler.dat") data2 = np.loadtxt("threebody_verlet.dat") euler_earth = data1[0::3] euler_sun = data1[1::3] euler_jupiter = data1[2::3] verlet_earth = data2[0::3] verlet_sun = data2[1::3] verlet_jupiter = data2[2::3] fig = ...
linegpe/FYS3150
build-solar-system-fys3150-Desktop-Release/plot_methods.py
Python
gpl-3.0
1,392
from __future__ import print_function import itertools,cmath,re from .helpers import SkipThisVertex,extractAntiSymmetricIndices from .converter import py2cpp from .lorentzparser import parse_lorentz import string,re def compare(a,b) : num=abs(a-b) den=abs(a+b) if(den == 0. and 1e-10) : return True ...
hep-mirrors/herwig
Models/Feynrules/python/ufo2peg/check_lorentz.py
Python
gpl-3.0
38,432
class Solution(object): def combinationSum3(self, k, n): """ :type k: int :type n: int :rtype: List[List[int]] """ def dfs(s, n): if len(path) >= k: if n == 0: result.append(path[:]) return fo...
zqfan/leetcode
algorithms/216. Combination Sum III/solution2.py
Python
gpl-3.0
557
#!/usr/bin/python3 # -*- coding: utf-8 -*- # health.py file is part of slpkg. # Copyright 2014-2021 Dimitris Zlatanidis <d.zlatanidis@gmail.com> # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations # https://gitlab.com/dslackw/slpkg # Slpkg is free software: you can redistr...
dslackw/slpkg
slpkg/health.py
Python
gpl-3.0
3,641
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship from answer import Answer from base import Base class Question(Base): __tablename__ = 'question' id = Column(Integer, primary_key=True) question = Column(String(256)) answers = relationship('Answer', bac...
ZhuChara2004/MA-Summer-Practice-2016
homeworks/team-2/prof-test/backend/models/question.py
Python
gpl-3.0
438
# -*- coding: utf-8 -*- ''' Created on 22 Ιαν 2013 @author: tedlaz ''' from PyQt4 import QtGui, QtCore from gui import ui_pro class dlg(QtGui.QDialog): def __init__(self, args=None, parent=None): super(dlg, self).__init__(parent) self.ui = ui_pro.Ui_Dialog() se...
tedlaz/pyted
misthodosia/m13/f_pro.py
Python
gpl-3.0
1,976
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ## ## ...
rowinggolfer/openmolar2
src/lib_openmolar/client/qt4/dialogs/save_discard_cancel_dialog.py
Python
gpl-3.0
3,474
from sage import prompt, ansi, player class CustomPromptRenderer(prompt.PromptRenderer): """ Override prompt.PromptRenderer """ def colorize_vital(self, value): """ Give us green, yellow, and red colored numbers for vitals depending on our percentage. """ if value >= 66: ...
spicerack/sage
examples/custom_prompt/custom_prompt.py
Python
gpl-3.0
1,863
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin from kankim.utils import here admin.autodiscover() urlpatterns = patterns('', # genel sayfalar (r'^$', 'kankim.main.views.index') , (r'^register', 'kankim.main.views.r...
fatiherikli/kankim
urls.py
Python
gpl-3.0
1,217
# -*- coding: utf-8 -*- import logging from openerp import models, fields, api, exceptions as ex _logger = logging.getLogger(__name__) class MilestoneTemplate(models.Model): _name = 'project.milestone.template' _inherit = ['mail.thread', 'ir.needaction_mixin'] name = fields.Char('Name', required=True, ...
nemanja-d/odoo_project_extensions
project_task_forecasts/models/milestone_template.py
Python
gpl-3.0
1,778
# -*- coding: utf-8 -*- vim:fileencoding=utf-8: # Copyright (C) 2010-2014 GRNET S.A. # # 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 ...
grnet/ganetimgr
notifications/urls.py
Python
gpl-3.0
1,080
__author__ = 'OmerMahgoub' #!/usr/bin/env python import os import yaml class StackSettings: def ServiceSettings(self,ServiceName): basepath = os.path.dirname(__file__) keypairs = os.path.abspath(os.path.join(basepath, "config.yml")) with open(keypairs,'r') as f: do...
omermahgoub/MigTool
settings/settings.py
Python
gpl-3.0
424
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata...
pgmillon/ansible
lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py
Python
gpl-3.0
17,107
#!/usr/bin/env python ######################################################################## # File : dirac-admin-site-info # Author : Stuart Paterson ######################################################################## """ Print Configuration information for a given Site Usage: dirac-admin-site-info [opti...
yujikato/DIRAC
src/DIRAC/Interfaces/scripts/dirac_admin_site_info.py
Python
gpl-3.0
1,467
#!/usr/bin/env python3 import threading class thread(threading.Thread): a,b=True,False def __init__(self): threading.Thread.__init__(self,target=self.target,daemon=True) def target(self): # do something here while True: if self.a: self.b = False else: self.b =...
qinq-net/sandbox
Solution3/MyLibThread/MyLibThread.py
Python
gpl-3.0
355
import unittest import numpy as np from snakebacon import suggest_accumulation_rate from snakebacon.records import ChronRecord class TestUtils(unittest.TestCase): def test_suggest_accumulation_rate(self): goal = 20 testcore = ChronRecord(age=np.array([20, 50]), error=None, depth=np.array([1.5, ...
brews/snakebacon
snakebacon/tests/test_utils.py
Python
gpl-3.0
488
# -*- coding: utf-8 -*- # Relational # Copyright (C) 2008-2011 Salvo "LtWorf" Tomaselli # # Relational 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) an...
ltworf/relational
setup/python3-relational.setup.py
Python
gpl-3.0
846
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 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 ...
tomkralidis/geonode
geonode/qgis_server/gis_tools.py
Python
gpl-3.0
5,983
""" Django settings for mythoughts project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
kishs1991/mythoughts
mythoughts/mythoughts/settings.py
Python
gpl-3.0
3,202
import unittest import json import forgi.threedee.utilities._dssr as ftud import forgi.threedee.model.coarse_grain as ftmc import forgi.graph.residue as fgr class TestHelperFunctions(unittest.TestCase): def test_dssr_to_pdb_atom_id_validIds(self): self.assertEqual(ftud.dssr_to_pdb_resid( "B.C24...
ViennaRNA/forgi
test/forgi/threedee/utilities/test_dssr.py
Python
gpl-3.0
2,377
"""File to interact with cache folder to isolate cache handling functionality from main controllers code. The CacheHandler should only be accessed by controller classes. """ #.-------------------. #| imports | #'-------------------' import os import pickle #.-------------------. #| main ...
i-sultan/Smart-Trader
src/st_cache_handler.py
Python
gpl-3.0
3,536
from django.contrib import admin from .models import User class UserAdmin(admin.ModelAdmin): list_display = ('username', 'email', 'is_active', 'is_staff', 'validated') admin.site.register(User, UserAdmin)
gitaarik/jazzchords
apps/users/admin.py
Python
gpl-3.0
213
from command import Command from os import path class cd(Command): name = 'cd' desc = 'Changes the working directory' usage = 'cd <place to go>' author = 'native' def call(self, args=None): if args is not None: if len(args) == 0: print('I need at least the plac...
ThePerkinrex/PercOS
PercOS_filesystem/bin/cd.py
Python
gpl-3.0
709
"""Add obs_raw indexes Revision ID: bdc28573df56 Revises: 7a3b247c577b Create Date: 2021-05-06 10:41:36.554301 This migration conditionally creates/deletes the indexes. It is robust to their pre-existence on upgrade, and their non-existence on downgrade. The former is expected in some databases. It's hard to imagine ...
pacificclimate/pycds
pycds/alembic/versions/bdc28573df56_add_obs_raw_indexes.py
Python
gpl-3.0
2,150
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 dl1ksv. # # SPDX-License-Identifier: GPL-3.0-or-later # from gnuradio import gr, gr_unittest from PyQt5 import Qt import sip # from gnuradio import blocks try: from display import text_msg except ImportError: import os import sys dirname,...
dl1ksv/gr-display
python/qa_display_text_msg.py
Python
gpl-3.0
951
__author__ = 'dragonloverlord' from gi.repository import Gtk def menubar(pad): pad.main_grid.menubar = Gtk.MenuBar() pad.main_grid.menubar.set_hexpand(True) pad.main_grid.attach(pad.main_grid.menubar, 0, 0, 1, 1)
dragonloverlord/PyPad
pylibs/menubar.py
Python
gpl-3.0
227
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './Preferences/ShortcutDialog.ui' # # Created: Tue Nov 18 17:53:56 2014 # by: PyQt5 UI code generator 5.3.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_ShortcutDialog(obj...
davy39/eric
Preferences/Ui_ShortcutDialog.py
Python
gpl-3.0
4,515
import dredd_hooks as hooks import imp import os import json import uuid #if you want to import another module for use in this workflow utils = imp.load_source("utils",os.path.join(os.getcwd(),'utils.py')) ############################################################################### #################################...
benneely/duke-data-service-dredd
dredd/dredd_scripts/21_auth_provider.py
Python
gpl-3.0
1,178
############################################################################## # # Copyright (c) 2003 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
Donkyhotay/MoonPy
zope/testing/testrunner-ex/sample1/sampletests/test112.py
Python
gpl-3.0
3,574
#!/usr/bin/python3 # x11vnc # SoftAP from sense_hat import SenseHat from time import sleep sense = SenseHat() sense.low_light = True led_loop = [4, 5, 6, 7, 15, 23, 31, 39, 47, 55, 63, 62, 61, 60, 59, 58, 57, 56, 48, 40, 32, 24, 16, 8, 0, 1, 2, 3] prev_x = 0 prev_y = 0 while True: sense.set_rotation(180) sen...
pindanet/Raspberry
demoSenseHat.py
Python
gpl-3.0
2,108
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, unittest import frappe.defaults from frappe.utils import flt, nowdate, nowtime from erpnext.stock.doctype.serial_no.serial_no import * fr...
shubhamgupta123/erpnext
erpnext/stock/doctype/stock_entry/test_stock_entry.py
Python
gpl-3.0
28,700
# coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Ash Raster on Population Impact Function Contact : ole.moller.nielsen@gmail.com .. note:: 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 Softwa...
easmetz/inasafe
safe/impact_functions/ash/ash_raster_population/impact_function.py
Python
gpl-3.0
7,502
"""Performs statistics operations for ``mapmuts`` package. Written by Jesse Bloom. List of functions ---------------------- `Median` : returns the median of a list of numbers. `Mean` : returns the mean of a list of numbers. Documentation for individual functions ---------------------------------------- Documentat...
jbloom/mapmuts
src/stats.py
Python
gpl-3.0
1,472
#! /usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Etienne Chové <chove@crans.org> 2009 ## ## ...
duthils/osmose-frontend
control.py
Python
gpl-3.0
9,292
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013) # # This file is part of GWSumm. # # GWSumm 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) ...
gwpy/gwsumm
gwsumm/plot/core.py
Python
gpl-3.0
25,918
# -*- coding: utf-8 -*- # Copyright 2016-2021 The pyXem developers # # This file is part of pyXem. # # pyXem 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...
pycrystem/pycrystem
pyxem/generators/integration_generator.py
Python
gpl-3.0
11,204
import abc import logging import sys if sys.version_info >= (3, 4): ABC = abc.ABC # noqa else: ABC = abc.ABCMeta('ABC', (), {}) # ------------------------------------------------------------------------------- # captchaSolvers = {} # -------------------------------------------------------------------------...
pymedusa/Medusa
ext/cloudscraper/captcha/__init__.py
Python
gpl-3.0
1,511
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('replays', '0038_auto_20160417_1042'), ] operations = [ migrations.CreateModel( name='Body', fields=[...
rocket-league-replays/rocket-league-replays
rocket_league/apps/replays/migrations/0039_auto_20160417_1058.py
Python
gpl-3.0
548
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-24 12:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('candidates', '0016_auto_20160523_0841'), ] operatio...
macwis/simplehr
candidates/migrations/0017_auto_20160524_1213.py
Python
gpl-3.0
2,219
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2014 Thomas Perl and the gPodder Team # # gPodder 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...
somini/gpodder
src/gpodder/escapist_videos.py
Python
gpl-3.0
4,242
#!/usr/bin/python3 from sympy import * from sympy.utilities.codegen import codegen import argparse import numpy as np import matplotlib as mp import matplotlib.pyplot as plt from matplotlib import cm, colors from mpl_toolkits.mplot3d import Axes3D # A simple script that invokes Sympy to implement a Newton-Gauss least-...
Aghosh993/QuadcopterCodebase
targets/f3discovery/calibration/imucal.py
Python
gpl-3.0
6,676
#!/usr/bin/python """ This is a wrapper to run the 'lacheck(1)' tool from the 'lacheck' package. Why do we need this wrapper? - lacheck does NOT report in its exit status whether it had warnings or not. - it is too verbose when there are no warnings. """ import sys # for argv, exit, stderr import subprocess # for ...
veltzer/riddling
scripts/wrapper_lacheck.py
Python
gpl-3.0
939
from unittest import TestCase from currencies import Currency, get_version, __VERSION__ from currencies.exceptions import CurrencyDoesNotExist class TestCurrency(TestCase): def test_get_version(self): version = get_version() self.assertIsInstance(version, str) self.assertEqual(len(version...
Alir3z4/python-currencies
tests/test_currency.py
Python
gpl-3.0
1,997
#try to support many flavours of lapack import autoinstall_lib as atl from waflib import Logs import os.path as osp def options(ctx): atl.add_lib_option("pmc",ctx,install=False) def configure(ctx): ctx.env.has_pmc = False #pmc_config_path = ctx.find_program("pmc-config",path_list=[ctx.options.pmc_prefix+"...
ClaudioNahmad/Servicio-Social
Parametros/CosmoMC/prerrequisitos/plc-2.0/waf_tools/pmclib.py
Python
gpl-3.0
653
from django.conf.urls import url #from django.conf import settings from language_machines.lamadata.views import home, projectcategoryview urlpatterns = [ url(r'^$', home, name='home'), url(r'^categories/(?P<projectcategory_id>[A-Za-z0-9_\']+)/$', projectcategoryview, name='projectcategory') ]
Woseseltops/languagemachineswebsite
language_machines/lamadata/home_urls.py
Python
gpl-3.0
304
#!/usr/bin/python # # CPU sensor ontop of psutil # # Copyright 2012 Dan Ballard and Robert Hausch # ## License: # # This file is part of System-Monitoring-Daemon. # # System-Monitoring-Daemon is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
rhausch/System-Monitoring-Daemon
sensors/psutil_sensors/cpu.py
Python
gpl-3.0
1,700
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
zozo123/buildbot
master/buildbot/test/unit/test_www_rest.py
Python
gpl-3.0
26,772
from mock import patch, call import mock from collections import namedtuple from .test_helper import raises, patch_open from kiwi.iso_tools.cdrtools import IsoToolsCdrTools from kiwi.exceptions import KiwiIsoToolError class TestIsoToolsCdrTools(object): @patch('platform.machine') def setup(self, mock_machine...
adrianschroeter/kiwi
test/unit/iso_tools_cdrtools_test.py
Python
gpl-3.0
5,919
X = int(input()) Y = float(input()) M = X / Y print("%.3f km/l" % M)
deyvedvm/cederj
urionlinejudge/python/1014.py
Python
gpl-3.0
71
""" Reverse a singly linked list. """ # # Iterative solution # T(n)- O(n) # def reverse_list(head): """ :type head: ListNode :rtype: ListNode """ if not head or not head.next: return head prev = None while head: current = head head = head.next current.next =...
marcosfede/algorithms
linkedlist/reverse.py
Python
gpl-3.0
679
import pandas as pd import datetime import math from bokeh.models import HoverTool, FactorRange, Plot, LinearAxis, Grid, Range1d, Slider, PanTool, WheelZoomTool, ResetTool, SaveTool, CustomJS from bokeh.models.glyphs import Line from bokeh.models.markers import X from bokeh.plotting import figure from bokeh.charts imp...
Small-Star/PDV3
app/graph_weightlifting.py
Python
gpl-3.0
15,504
from bot_constant import FORWARD_LIST import global_vars from utils import send_both_side from command import command_listener import telegram import logging logger = logging.getLogger("CTBPlugin." + __name__) logger.debug(__name__ + " loading") global_vars.create_variable('group_members', [[]] * len(FORWARD_LIST)) ...
nickyc4/coolq-telegram-bot
plugins/qq_namelist.py
Python
gpl-3.0
1,401
'''Michael Lange <klappnase (at) freakmail (dot) de> The ToolTip class provides a flexible tooltip widget for Tkinter; it is based on IDLE's ToolTip module which unfortunately seems to be broken (at least the version I saw). INITIALIZATION OPTIONS: anchor : where the text should be positioned inside the widg...
regionbibliotekhalland/digitalasagor
tooltip.py
Python
gpl-3.0
8,114
from .basics import InferredType, UnknownType, TypeSet, is_inferred_type from .compound import InferredIterator, is_inferred_sequence from .builtins import get_global_scope, get_type_by_name, get_type_by_value, create_list, create_set, create_dict, create_tuple from .functions import FunctionType from .classes import C...
furbrain/tested
tested/itypes/__init__.py
Python
gpl-3.0
361
import unittest import socket from time import sleep import subprocess TESTMSG = 'Hello World' MSGLEN = len(TESTMSG) PORT = 3000 class MySocket: """demonstration class only - coded for clarity, not efficiency """ def close(self): self.sock.close() def __init__(self, sock=None): ...
koolkt/mendoza
tests/smtp_server/test_echo/test_echo.py
Python
gpl-3.0
2,153
''' Created on Mar 22, 2011 @author: jeroen ''' import os from fileinfo import FileInfo from bytesize import ByteSize class DirInfo(object): ''' Simple class to represent a directory and obtain data about if when needed. ''' def __init__(self, path, recursive=False): ''' Construc...
JeroenDeDauw/phpstat
src/phpstat/dirinfo.py
Python
gpl-3.0
4,098
import random perc2015 = [] perc2016 = [] perc2017 = [] perc2018 = [] perc2019 = [] def getColor(pais): foundColor = 0 theColor = 0x000000 for elem in perc2015: if elem[0]==pais: theColor = elem[2] foundColor = 1 for elem in perc2016: if elem[0]==pais: theColor = elem[2] foundColor = 1 for elem i...
ferriman/SSandSP
processing/spiritOfBCN/getdata.py
Python
gpl-3.0
4,690
#!/usr/bin/python import sys from os import path from numpy import random from tests.testlib import write_parset from stress.generator import FREQUENCY ERROR = 0.000001 def generate_image(filename, sourcename, band, size): f = open(sourcename, 'r') fo = open(filename, 'w') fo.write(f.readline()) #fo....
jjdmol/LOFAR
CEP/GSM/bremen/stress/image_generator.py
Python
gpl-3.0
1,088
# $Id$ ## ## This file is part of pyFormex 0.8.9 (Fri Nov 9 10:49:51 CET 2012) ## pyFormex is a tool for generating, manipulating and transforming 3D ## geometrical models by sequences of mathematical operations. ## Home page: http://pyformex.org ## Project page: http://savannah.nongnu.org/projects/pyformex/ ##...
dladd/pyFormex
pyformex/gui/colors.py
Python
gpl-3.0
5,194
import src class CommandBook(src.items.Item): type = "CommandBook" """ call superclass constructor with modified parameters """ def __init__(self): super().__init__(display="cb") self.name = "command book" self.bolted = False self.walkable = True totalCo...
MarxMustermann/OfMiceAndMechs
src/itemFolder/obsolete/commandBook.py
Python
gpl-3.0
689
''' * Created by Zhenia Syryanyy (Yevgen Syryanyy) * e-mail: yuginboy@gmail.com * License: this code is under GPL license * Last modified: 2017-10-24 ''' import re import os class TargetAtom(): def __init__(self): self.path_to_cfg_file = '' self.atom_type = 'Mn' self.number_of_target_atoms =...
yuginboy/from_GULP_to_FEFF
feff/libs/determine_numbers_of_target_atoms.py
Python
gpl-3.0
2,071
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ncbi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
erickpeirson/django-ncbi
ncbi/manage.py
Python
gpl-3.0
247
# shipHeavyMissileExpDmgPirateCruiser # # Used by: # Ship: Gnosis type = "passive" def handler(fit, ship, context): fit.modules.filteredChargeBoost(lambda mod: mod.charge.requiresSkill("Heavy Missiles"), "explosiveDamage", ship.getModifiedItemAttr("shipBonusRole7"))
bsmr-eve/Pyfa
eos/effects/shipheavymissileexpdmgpiratecruiser.py
Python
gpl-3.0
309
from PyQt4.QtCore import * import logging #Call Signals CALL_CONNECT = 'connectCall' CALL_HANGUP = 'hangupCurrentCall' CALL_NUMBER = 'callNumber' CALL_INCOMING = 'inCallSig' CALL_INCOMING_CANCELED = 'inCallCanceled' CALL_OUTGOING_CANCELED = 'outCallCanceled' CALL_SHOW_VIDEO = 'callShowVideo' CALL_SIGNAL_LEVEL_CHANGE ...
dennisguse/VoIP.py
Defines/SIGNALS.py
Python
gpl-3.0
1,227
#/usr/bin/env python # -*- coding: utf-8 -*- #Indicator-Netspeed # #Author: Dimitris Misdanitis #Date: 2014 #Version 0.1 #⇧ 349 B/s ⇩ 0.0 B/s # #▲▼ ↓↑ ✔ ⬆⬇ ⇩⇧ import commands from gi.repository import GObject,GLib import gtk import appindicator import time import urllib2 import os, subprocess import io import threa...
dmisdani/netspeed_indicator
netspeed-indicator2.py
Python
gpl-3.0
13,609
# -*- coding: utf-8 -*- """ Consolidate any user interface rgw calls for Wolffish and openATTIC. All operations will happen using the rest-api of RadosGW. The one execption is getting the credentials for an administrative user which is implemented here. """ import logging import os import json import re import glob...
supriti/DeepSea
srv/modules/runners/ui_rgw.py
Python
gpl-3.0
5,055
import argparse import cv2 import numpy as np from coccimorph.aux import load_image class Segmentator(object): def __init__(self, filename, threshold, scale): self.img = load_image(filename, scale) self.img_bin = binaryze(self.img, threshold) self.height, self.width, _ = self.img.shape ...
ricardoy/coccimorph
coccimorph/segment.py
Python
gpl-3.0
5,932
# coding: utf-8 from pedal import ( parse, transcript, _pedal ) import unittest class PedalParseTest(TestCase): _sample_code = r''' title "No trans" input { historical_samplings: int recent_n_min_no_trans_func: func } tweaks { sample_days: int daily_sa...
KenetJervet/mapensee
python/pedal/pedal/test/test_pedal_syntax.py
Python
gpl-3.0
2,077
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
zzacharo/inspire-next
tests/unit/workflows/test_workflows_tasks_actions.py
Python
gpl-3.0
12,472
# Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2019, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This program is free software: you can redistribute it and/or modify # it unde...
chetan51/nupic.research
projects/rsm/util.py
Python
gpl-3.0
11,475
from oslo_config import cfg OPTS = [ cfg.StrOpt('openhab_config_dir', default='/opt/openhab/config', help='The openhab configuration path'), cfg.StrOpt('mqtt_id', default='mosquitto', help='The mqtt id inside openhab config' 'to co...
ohaut/ohaut-core
ohaut/config.py
Python
gpl-3.0
1,064
#!/usr/bin/env python # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # BornProfiler --- A package to calculate electrostatic free energies with APBS # Written by Kaihsu Tai, Lennard van der Feltz, and Oliver Beckstein # Released under th...
Becksteinlab/BornProfiler
scripts/apbs-bornprofile-init.py
Python
gpl-3.0
1,462
import math from functools import partial import pytest import networkx as nx def _test_func(G, ebunch, expected, predict_func, **kwargs): result = predict_func(G, ebunch, **kwargs) exp_dict = {tuple(sorted([u, v])): score for u, v, score in expected} res_dict = {tuple(sorted([u, v])): score for u, v, s...
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/algorithms/tests/test_link_prediction.py
Python
gpl-3.0
18,091
''' Created on 2014-1-21 @author: Administrator ''' #import class/method from athelets import get_data_filelist, get_data_in_file james = get_data_in_file('james2.txt') print(james.name); print(get_data_filelist(['james2.txt']));
kane-chen/headFirstPython
src/com/lasho/headfirst/chap4/module_import_test.py
Python
gpl-3.0
231
""" """ import difflib import hashlib import math import os import socket import time # global variables settings_filename = "/home/fa11en/.config/synk/synk-settings.conf" server_ip_field = "server_ip" server_port_field = "server_port" local_project_loc_field = "local_project_location" server_project_loc_field = "s...
Eternali/synk
synk-pre/synk2cp2.py
Python
gpl-3.0
618
#!/usr/bin/python import asm """ Import script for sb1875 csv files 1st March, 2019 """ START_ID = 1000 ANIMAL_FILENAME = "/home/robin/tmp/asm3_import_data/sb1875_csv/ASM_Animal_Master.csv" LOG_FILENAME = "/home/robin/tmp/asm3_import_data/sb1875_csv/ASM_Animal_Log.csv" PERSON_FILENAME = "/home/robin/tmp/asm3_impor...
bobintetley/asm3
import/org/org_sb1875.py
Python
gpl-3.0
11,412
#coding=UTF-8 from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext from pyspark.sql.types import * from datetime import date, datetime, timedelta import sys, re, os st = datetime.now() conf = SparkConf().setAppName('PROC_O_IBK_WSYH_ECUSRLOGINTYPE').setMaster(sys.argv[2]) sc = SparkContext(conf = c...
cysuncn/python
spark/crm/PROC_O_IBK_WSYH_ECUSRLOGINTYPE.py
Python
gpl-3.0
6,837
#!/usr/bin/env python """show-attitude.py: Script to ask the MultiWii Board attitude and print it.""" __author__ = "Aldo Vargas" __copyright__ = "Copyright 2017 Altax.net" __license__ = "GPL" __version__ = "1.1" __maintainer__ = "Aldo Vargas" __email__ = "alduxvm@gmail.com" __status__ = "Development" from pymultiwi...
alduxvm/pyMultiWii
demo/show-attitude.py
Python
gpl-3.0
1,095
#!/usr/bin/python3 #################################### BY MIKICAT ############################################### ###############################A WORLDEV AFFILIATE############################################# ###IF YOU DETECT BUGS, PLEASE OPEN AN ISSUE OR REPORT THEM TO http://mikicatantivirus.weebly.com/contact.htm...
Worldev/Mikicat-Antivirus
antivirus.py
Python
gpl-3.0
20,145
import Adafruit_BBIO.ADC as ADC import Adafruit_BBIO.GPIO as GPIO import Adafruit_BBIO.PWM as PWM import time ADC.setup() GPIO.setup("P8_7", GPIO.OUT) GPIO.output("P8_7", GPIO.HIGH) servo_pin = "P8_13" duty_min = 3.5#3 duty_max = 14.5#14.5 duty_span = duty_max - duty_min angle = 0 direction = "left" PWM.start(se...
jordiguerrero/FresonCam
test_IR_servo.py
Python
gpl-3.0
1,050
# coding=utf-8 import numpy as np class CovalentAutocorrelation: def __init__(self, lattice): self.reset(lattice) def reset(self, lattice): self.lattice = lattice.copy() def calculate(self, lattice): return np.sum((lattice == self.lattice) & (lattice != 0)) class MeanSquareDis...
gkabbe/cMDLMC
mdlmc/LMC/output.py
Python
gpl-3.0
1,858
# This file is part of ArcJail. # # ArcJail 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. # # ArcJail is distributed in the hope that...
KirillMysnik/ArcJail
srcds/addons/source-python/plugins/arcjail/modules/lrs/game_classes/flashbang_battle.py
Python
gpl-3.0
4,042
from __future__ import print_function import os import optparse import sys import nmap def findTgts(subNet): nmScan = nmap.PortScanner() nmScan.scan(subNet, '445') tgtHosts = [] for host in nmScan.all_hosts(): if nmScan[host].has_tcp(445): state = nmScan[host]['tcp'][445]['state'] ...
ninijay/pycurity
metasploit/conficker.py
Python
gpl-3.0
3,118
#------------------------------------------------------------------------------ # Naam: libLog.py # Omschrijving: Generieke functies voor logging binnen BAG Extract+ # Auteur: Matthijs van der Deijl # Auteur: Just van den Broecke - porting naar NLExtract (2015) # # Versie: 1.3 # ...
sebastic/NLExtract
bag/src/loggui.py
Python
gpl-3.0
2,159
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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). """This provides a basic ButtonBox class, and imports the `ioLab python library <http:/...
psychopy/versions
psychopy/hardware/labjacks.py
Python
gpl-3.0
1,270
# -*- Python -*- # Common configuration for running leak detection tests under LSan/ASan. import os import re import lit.util def get_required_attr(config, attr_name): attr_value = getattr(config, attr_name, None) if attr_value == None: lit_config.fatal( "No attribute %r in test configuration! You may...
r0mai/metashell
3rd/templight/llvm/projects/compiler-rt/test/lsan/lit.common.cfg.py
Python
gpl-3.0
3,311
# -*- coding: utf-8 -*- # # Copyright © 2012-2013 Yury Konovalov <YKonovalov@gmail.com> # # This file is part of SSP. # # SSP 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...
mdcic/ssp
ssp/netconfig.py
Python
gpl-3.0
5,352
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.main_page, name='main_page'), )
apiaas/gae-base-app-with-drf
src/landing/urls.py
Python
gpl-3.0
145
#!/usr/bin/env python # -*- coding: ascii -*- r""" LazGUI helps to create Lazarus Pascal GUI project. LazGUI will place all of the required files for the Lazarus project into a subdirectory by project name. The project can be built using "lazbuild" that comes with a Lazarus install, or by opening the <project_name>....
sonofeft/LazGUI
lazgui/laz_gui.py
Python
gpl-3.0
8,605
# tf_unet 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. # # tf_unet is distributed in the hope that it will be useful, # but WITHOUT...
jakeret/tf_unet
scripts/ultrasound_launcher.py
Python
gpl-3.0
3,744
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2016-2021 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 the ...
chipaca/snapcraft
tests/unit/store/test_store_client.py
Python
gpl-3.0
63,982
# -*- coding: utf-8 -*- """ Routines for quality control of GeoDanmark map data Copyright (C) 2016 Developed by Septima.dk for the Danish Agency for Data Supply and Efficiency 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 F...
Septima/qgis-GeoDanmarkCheck
GeoDanmarkChecker/fot/geomutils/graph.py
Python
gpl-3.0
7,372
import requests eventurl = 'http://localhost:8008/events/json?maxEvents=10&timeout=60' eventID = -1 while 1 == 1: r = requests.get(eventurl + "&eventID=" + str(eventID)) if r.status_code != 200: break events = r.json() if len(events) == 0: continue eventID = events[0]["eventID"] events.reverse() for e i...
lindiyer/pxe
saltstack/etc/sflow-rt/extras/tail_log.py
Python
gpl-3.0
526
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-08-22 16:03 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion def forwards_func(apps, schema_editor): # We get the model from the versioned app registry; # if we directly import it, it'l...
GovReady/govready-q
guidedmodules/migrations/0011_modulequestion_answer_type_module.py
Python
gpl-3.0
1,551
# -*- coding: utf-8 -*- # # restflow documentation build configuration file, created by # sphinx-quickstart on Thu Jul 31 07:32:50 2014. # # 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. # # ...
CognitionGuidedSurgery/restflow
doc/conf.py
Python
gpl-3.0
8,911
# egret.py: Command line interface for EGRET # # Copyright (C) 2016-2018 Eric Larson and Anna Kirk # elarson@seattleu.edu # # This file is part of EGRET. # # 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...
elarsonSU/egret
egret.py
Python
gpl-3.0
7,045
# -*- coding: utf-8 -*- # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. from ulakbus.models import AbstractRole from ulakbus.models import Personel from ulakbus.models import Role from zengine.views.crud import CrudView from z...
zetaops/ulakbus
ulakbus/views/bap/bap_iletisim.py
Python
gpl-3.0
1,146
import json import logging import os import re import docker from invoke import run, task BOOTSTRAP_IMAGE_CHEIP = 'codenvy/che-ip:nightly' @task def waitfordbs(ctx): print "**************************databases*******************************" ctx.run("/usr/bin/wait-for-databases {0}".format('db'), pty=True) ...
timlinux/geonode
tasks.py
Python
gpl-3.0
6,112