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
#!/usr/bin/python from distutils.core import setup # Remember to change in reroute/__init__.py as well! VERSION = '1.1.1' setup( name='django-reroute', version=VERSION, description="A drop-in replacement for django.conf.urls.defaults which supports HTTP verb dispatch and view wrapping.", long_descrip...
dnerdy/django-reroute
setup.py
Python
mit
982
from setuptools import setup, find_packages import os import pgcryptoauth def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() README = read('README.rst') setup( name='django-pgcryptoauth', version=pgcryptoauth.__version__, description='Django hasher for pgcrypto enco...
tomatohater/django-pgcryptoauth
setup.py
Python
mit
1,290
from flask import session from flask_yoloapi import endpoint, parameter from findex_gui.web import app KEYS = [ "search_display_view" ] VALUES = [ "table", "fancy" ] @app.route("/api/v2/session/set", methods=["POST"]) @endpoint.api( parameter("key", type=str, required=True), parameter("val", type=s...
skftn/findex-gui
findex_gui/controllers/session/api.py
Python
mit
969
import sys import os import re import time import datetime from contextlib import closing # --------------------------------------------------- # Settings # --------------------------------------------------- # IMPORTANT: In the standard case (sqlite3) just point this to your own MyVideos database. DATABA...
nharrer/kodi-update-movie-dateadded
update_movie_dateadded.py
Python
mit
5,104
# -*- coding: utf-8 -*- import time from datetime import datetime, timedelta from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException from com.ericsson.xn...
lowitty/selenium
com/ericsson/xn/x/pm/PmCommons/PmCommon.py
Python
mit
29,289
# This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # spec/fixtures/responses/whois.nic.af/status_registered # # and regenerate the tests with the following script # # $ scripts/generate_tests.py # from nose.tools import * from dateutil.parser import parse ...
huyphan/pyyawhois
test/record/parser/test_response_whois_nic_af_status_registered.py
Python
mit
2,584
def count_substring(string, sub_string): return if __name__ == '__main__': string = input().strip() sub_string = input().strip() count = count_substring(string, sub_string) print(count)
jerodg/hackerrank-python
python/02.Strings/04.FindAString/template.py
Python
mit
209
# coding:utf-8 ''' Market data update functionality ''' from __future__ import print_function from datetime import datetime, timedelta from symbols import Symbols import yahoo def update_marketdata(from_date=None, to_date=None, sym=Symbols()): ''' Fetch latest market data and upate it in db '...
dp0h/marketdata
marketdata/update.py
Python
mit
1,099
import unittest from distributed_queue import core, backends class TestBackend(unittest.TestCase): def test_list_backends(self): backend_list = core.BACKEND_LIST self.assertTrue('dummy' in backend_list) self.assertTrue('redis' in backend_list) def test_create_backend_fail(self): ...
ProstoKSI/distributed-queue
distributed_queue/tests/test_backends_init.py
Python
mit
1,313
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== # Variables =================================================================== #: Categories used to choose RIV RIV_CATEGORIES = [ (1, "společenské,...
edeposit/edeposit.amqp.models
src/edeposit/amqp/models/riv.py
Python
mit
932
#!/usr/bin/python import yaml config = yaml.safe_load(open("config.yml")) twilio_account_sid = config["twilio"]["account_sid"] twilio_auth_token = config["twilio"]["auth_token"] twilio_from_number = config["twilio"]["from_number"] from twilio.rest import TwilioRestClient twilio_client = TwilioRestClient(twilio_accou...
alexshepard/aledison
text.py
Python
mit
877
reprophyloversion="99c16963" ############################################################################################ if False: """ ReproPhylo version 1 General purpose phylogenetics package for reproducible and experimental analysis Amir Szitenebrg A.Szitenberg@Hull.ac.uk Szitenb...
gawbul/ReproPhyloVagrant
reprophylo/reprophylo.py
Python
mit
281,160
__author__ = ['Xiaobo'] import time import httplib from pagrant.exceptions import VirtualBootstrapError from pagrant.provisioners import BaseProvisioner CHECK_TIMEOUT = 60 * 5 class HttpCheckerPrivisioner(BaseProvisioner): def __init__(self, machine, logger, provision_info, provider_info): super(HttpChe...
markshao/pagrant
pagrant/provisioners/health/http.py
Python
mit
1,669
import ast import sys import os import unittest import tempfile import shutil import json from StringIO import StringIO from lib.simple_config import (SimpleConfig, read_system_config, read_user_config) class Test_SimpleConfig(unittest.TestCase): def setUp(self): super(Tes...
protonn/Electrum-Cash
lib/tests/test_simple_config.py
Python
mit
11,045
#! /usr/bin/env python3 import argparse from os.path import basename, splitext, isdir, abspath, join from os import getcwd class comments: def __init__(self, comment_lines): self.comment_lines = [] temp_buffer = str() for each_line in comment_lines: each_line = each_line.stri...
c10k/docgen
cpp_doc_generator.py
Python
mit
28,176
import numpy as np from matplotlib import pyplot as plt from mushroom_rl.approximators import Regressor from mushroom_rl.approximators.parametric import LinearApproximator x = np.arange(10).reshape(-1, 1) intercept = 10 noise = np.random.randn(10, 1) * 1 y = 2 * x + intercept + noise phi = np.concatenate((np.ones(...
carloderamo/mushroom
docs/source/tutorials/code/generic_regressor.py
Python
mit
676
""" This is the Python implementation for the Java package "java.util.prefs", compiled by Pava. """ import pava from pava import nan, inf pava_classes = {} pava.module(__name__)
laffra/pava
pava/implementation/natives/java/util/prefs/__init__.py
Python
mit
181
import pcf8591read """ This is a barebones script for controlling the work flow of recording EMG words and associating the data with a specific word, captured in the filename. """ reader = pcf8591read.adc_reader() filename = input('Current word:') reader.record = True reader.run(filename)
bwc126/MLND-Subvocal
simple_svr.py
Python
mit
290
# -*- coding: utf-8 -*- """ NOCExec ----------------------- Library for automation of management and configuration of network devices """ import sys import os from setuptools import setup if sys.version_info < (2, 7): raise Exception("NOCExec requires Python 2.7 or higher.") # Hard linking doesn't work inside Vir...
velp/nocexec
setup.py
Python
mit
1,793
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Subscription.frequency' db.add_column('billing_subscription', 'frequency', ...
artminster/artminster
contrib/billing/migrations/0002_auto__add_field_subscription_frequency.py
Python
mit
5,583
from heapq import heappush, heappop import numpy as np from gtfspy.route_types import WALK from .event import Event class EventHeap: """ EventHeap represents a container for the event heap to run time-dependent Dijkstra for public transport routing objects. """ def __init__(self, pd_df=None): ...
CxAalto/gtfspy
gtfspy/spreading/heap.py
Python
mit
2,529
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import sys import os import os.path import argparse import warnings import flask from . import app from . import __meta__ as meta from .compat import PY_LEGACY, getdebug, get_terminal_size from .transform.glob import translate class HelpFormatter(argparse.Raw...
ergoithz/browsepy
browsepy/__main__.py
Python
mit
6,489
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/service_placement_policy_description.py
Python
mit
1,801
from flask_security import ( SQLAlchemyUserDatastore, UserMixin, RoleMixin, ) from sqlalchemy.ext.declarative import ( declarative_base, declared_attr, as_declarative ) from sqlalchemy.orm import relationship, backref from sqlalchemy import ( Table, Column, Integer, String, B...
slippers/Flask-Prose
tests/security_models.py
Python
mit
2,079
from django.db import models from uuid import uuid4 def get_short_uuid(): return str(uuid4())[0:5] class Code(models.Model): key = models.CharField(max_length=6, primary_key=True, default=get_short_uuid) lang = models.CharField(max_length=32, default='bash') code = models.TextField(max_length=2048, he...
octomike/hellodjango
paste/models.py
Python
mit
341
""" XML handler for calibrations """ # Standard library modules. # Third party modules. # Local modules. from pyhmsa.spec.condition.calibration import \ (CalibrationConstant, CalibrationLinear, CalibrationPolynomial, CalibrationExplicit) from pyhmsa.fileformat.xmlhandler.condition.condition import _Conditio...
pyhmsa/pyhmsa
pyhmsa/fileformat/xmlhandler/condition/calibration.py
Python
mit
965
""" Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary tree and sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ \ ...
fantuanmianshi/Daily
LeetCode/path_sum.py
Python
mit
1,167
import io import os import unittest from stango import Stango from stango.files import Files from . import StangoTestCase, make_suite, view_value, view_template dummy_view = view_value('') class GenerateTestCase(StangoTestCase): def setup(self): self.tmp = self.tempdir() self.manager = Stango() ...
akheron/stango
tests/test_generate.py
Python
mit
6,958
# -*- coding: utf-8 -*- from flask import current_app as app from sqlalchemy_utils import TSVectorType db = app.db class Author(db.Model): id = db.Column(db.Integer(), primary_key=True, nullable=False) name = db.Column(db.Unicode(1024), nullable=False, unique=True) name_vector = db.Column(TSVectorTyp...
philiptzou/taxonwiki
taxonwiki/models/author.py
Python
mit
331
def spiral_iterator(): x, y = 0, 0 direction = [(1, 0), (0, 1), (-1, 0), (0, -1)] i = 1 print x,y while True: dir_index = (i - 1) % 4 vector = i * direction[dir_index][0], i * direction[dir_index][1] x += vector[0] y += vector[1] print x,y ...
avenet/hackerrank
find_the_robot_iterator.py
Python
mit
377
""" Host app for nuke, check if we are in nuke. """ from assetbox.base.plugins.host import BaseHost import sys class HostApp(BaseHost): """ The host application class, which is used to determine context. """ ID = 'Nuke' filetypes = ['abc', 'exr'] def get_host(self): """Return True if ...
mlvfx/vfxAssetBox
assetbox/plugins/nuke/host.py
Python
cc0-1.0
458
#!/usr/bin/env python2.7 import os import pickle from matplotlib.path import Path from shapely.geometry import Polygon, MultiPolygon import fiona def define_clipping(_shapePath): """ Reads in a shapefile from some folder and creates a Matplotlib Patch artist from which one can clip gridded data plotted o...
rhyswhitley/spatial_plots
src/create_matplotlib_savanna_patch.py
Python
cc0-1.0
3,093
#!/usr/bin/env python # -*- coding: UTF-8 -*- import math from circle import Circle class Ellipse(Circle): """ class for 2D ellipses """ def __init__(self, x=0, y=0, p=2, r=1, b=1): super(Ellipse, self).__init__(x, y, p, r) self.b = b def __str__(self): return ("{0:." + str(sel...
OSGeoLabBp/tutorials
hungarian/python/code/ellipse.py
Python
cc0-1.0
775
from pythonlsf import lsf def query_queue(queue_name): """ "query queue info" """ if lsf.lsb_init("test") > 0: return -1; intp_num_queues = lsf.new_intp(); lsf.intp_assign(intp_num_queues, 1); strArr = lsf.new_stringArray(1); #print lsf.intp_value(intp_num_queues); lsf.str...
PlatformLSF/platform-python-lsf-api
examples/queue_info.py
Python
epl-1.0
1,265
#-*- coding: utf-8 -*- __all__ = ["XML_BibleParser", "reference"] import re import xml.etree.ElementTree as ET from BibleParser.abstract import parser as abstract_parser, reference as abstract_reference from BibleParser.error import * from BibleParser.Numbers import Number class parser(abstract_parser): """ ...
oelson/concordance
lib/BibleParser/xml.py
Python
gpl-2.0
17,962
#!/usr/bin/python3 # -*-coding:UTF-8 -* # Needed modules : python-mutagen python-glade2 # Application to manage the metadatas information on music track files # @author douze12 # @date 26/04/2015 import time try: import thread except ImportError as e: import _thread as thread import os #import pygtk #pygtk.re...
douze12/music-metadata-modifier
main.py
Python
gpl-2.0
48,079
# util/_preloaded.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Legacy routines to resolve circular module imports at runtime. These routines...
gltn/stdm
stdm/third_party/sqlalchemy/util/_preloaded.py
Python
gpl-2.0
5,765
# -*- coding: utf-8 -*- # Copyright (C) 2012-2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed ...
j-mracek/dnf
tests/test_config.py
Python
gpl-2.0
5,503
# Breadth-first Search # # Author: Michel Gagnon # michel.gagnon@polytml.ca from node import * from state import * def breadthfirst_search(initialState): frontier = [Node(initialState)] visited = set() while frontier: node = frontier.pop(0) visited.add(node.state) # node.st...
gaamy/INF4215_IA
tp1/breadthfirst_search.py
Python
gpl-2.0
634
from Components.ActionMap import ActionMap from Components.config import getConfigListEntry, config, ConfigSubsection, ConfigText, ConfigSelection, ConfigInteger, ConfigClock, NoSave from Components.ConfigList import ConfigListScreen from Components.Console import Console from Components.Label import Label from Compone...
popazerty/enigma2
lib/python/Screens/CronTimer.py
Python
gpl-2.0
18,099
import boardgame as bg class Card(bg.GamePiece): pass
tcstewar/boardgame
boardgame/card.py
Python
gpl-2.0
59
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsVectorFileWriter. .. 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 Software Foundation; either version 2 of the License, or (at your option) any later version. "...
ahuarte47/QGIS
tests/src/python/test_qgsvectorfilewriter.py
Python
gpl-2.0
49,644
import http.server import socketserver PORT = 8000 handler = http.server.CGIHTTPRequestHandler handler.cgi_directories = ['/webhook'] # or wherever you store the script... cgi_bin is default without this server_address = ("", PORT) httpd = http.server.HTTPServer(server_address, handler) print("serving at port", PO...
Jchase2/py-pubsubhubbub-subscriber
server.py
Python
gpl-2.0
347
#!/usr/bin/env python def n_ways(x, d, M): memo = {} def loop(x,M): if memo.has_key((x,M)): return memo[(x,M)] if M == 0: return 1 if x == d and x == 1: return 0 if x == 1: memo[(x,M)] = loop(x+1, M-1) elif x == d: memo[(x,M)] = loop(x-1, M-1) else: m...
ryota-sugimoto/hackerrank
dynamic_programming/grid_walking/tmp.py
Python
gpl-2.0
1,371
from django.conf.urls import patterns, url from .views import ( say_words, gather, process_demo, LoopWithGather, ) from .branching_demo import ( gather_branch, gather_branch_a, gather_branch_b, process_branch, process_branch_a, process_branch_b, ) urlpatterns = patterns('', ...
aptivate/ivr-twilio-demo
twilio_app/urls.py
Python
gpl-2.0
972
# -*- coding: utf-8 -*- def toflat(obj, ns=""): res = {} for key in obj: if type(obj[key]) is dict: subdict = toflat(obj[key], "%s%s" % (ns,key[0].upper()+key[1:])) for k in subdict: res[k[0].upper()+k[1:]] = subdict[k] else: res["%s%s" % (n...
fraoustin/flask-monitor
flask_monitor/util.py
Python
gpl-2.0
634
# # SPDX-License-Identifier: MIT # import os import shutil import unittest from oeqa.core.utils.path import remove_safe from oeqa.sdk.case import OESDKTestCase from oeqa.utils.subprocesstweak import errors_have_output errors_have_output() class GccCompileTest(OESDKTestCase): td_vars = ['MACHINE'] @classmet...
schleichdi2/OPENNFR-6.3-CORE
opennfr-openembedded-core/meta/lib/oeqa/sdk/cases/gcc.py
Python
gpl-2.0
1,658
# Copyright 2011 Patrick Connelly # # This file is part of mpd-rest # # mpd-rest 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. # # Th...
pcon/mpd-rest
mpdrest/webserver.py
Python
gpl-2.0
3,381
class Node: def __init__(self): self.inval=0 self.bias=0 # inputs=[] self.weights=[] self.activation=[] self.delta=0
smevawala/NeuralNet
node.py
Python
gpl-2.0
132
# -*- coding: UTF-8 -*- import pytest from mcm.comparators import UniqueKeyComparator, SingleElementComparator, OrderedComparator from mcm.datastructures import CmdPathRow @pytest.fixture def compare_data(request): single = { 'wanted':CmdPathRow({"primary-ntp":"1.1.1.1"}), 'present':CmdPathRow({...
luqasz/mcm
tests/integration/test_compare.py
Python
gpl-2.0
4,109
import metrics import node import slm_ratios as slm version = "1.0" slm.set_clks_event_name("CPU_CLK_UNHALTED.THREAD") smt_enabled = False class CyclesPerUop(slm.CyclesPerUop): server = True # LEVEL 1 class FrontendBound(slm.FrontendBound): server = True class BackendBound(slm.BackendBound): server = ...
andikleen/pmu-tools
knl_ratios.py
Python
gpl-2.0
2,582
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
fluxer/spm
nuitka/nuitka/nodes/BuiltinTypeNodes.py
Python
gpl-2.0
10,942
# -*- coding: utf-8 -*- """ ################################################ Plataforma ActivUFRJ ################################################ :Author: *Núcleo de Computação Eletrônica (NCE/UFRJ)* :Contact: carlo@nce.ufrj.br :Date: $Date: 2009-2010 $ :Status: This is a "work in progress" :Revision: $Revision: 0.0...
labase/activnce
main/activity/database.py
Python
gpl-2.0
5,622
#!/usr/bin/env python3.4 # -*- coding: utf-8 -*- import time import queue import multiprocessing import multiprocessing.managers import sql import gobjects import telegram import messages.save_sql import messages.msg_processor class MainWorker(multiprocessing.Process): ''' This class is responsable for all th...
TheRedFireFox/AnimeSubBot
src/worker.py
Python
gpl-2.0
14,016
#!/usr/bin/env python # # Copyright (c) 2018 Yousong Zhou <yszhou4tech@gmail.com> # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. import argparse import calendar import datetime import errno import fcntl import hashlib import json import os import os.pa...
xieyaxiongfly/Atheros_CSI_tool_OpenWRT_src
scripts/dl_github_archive.py
Python
gpl-2.0
14,504
import os def lowercase(source): if type(source) is str: return source.lower() elif type(source) is dict: return dict((k,lowercase(v)) for k,v in source.items()) elif type(source) is list: return [lowercase(x) for x in source] else: return source def unique(source): ...
narendergupta/mooc
mooc/src/gen_utils.py
Python
gpl-2.0
1,796
# # title : Interface # import os import time os.system('clear') print('#### ULTRA SECRET BOOT CAMP - NIS | ABC | NDSFLT | XEX | ####') time.sleep(1) print('Welcome to our organization, Agent 24') time.sleep(1) print('For our reccords, please answer truthfully to the following questions') time.sleep(1) person = raw_i...
lngauthier/LEAA.6
python/user_input.py
Python
gpl-2.0
707
from django.conf.urls import include, url from django.contrib import admin def i18n_javascript(request): return admin.site.i18n_javascript(request) urlpatterns = [ url(r'^$', 'GeneralReport.views.index'), url(r'^sgrs/', include('GeneralReport.urls')), url(r'^admin/jsi18n', i18n_javascript), url(r'...
JackyChou/SGRS
SGRS/urls.py
Python
gpl-2.0
359
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want wit...
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/en/moviesleak.py
Python
gpl-2.0
6,709
# -*- coding: utf-8 -*- # Copyright 2013 The Distro Tracker Developers # See the COPYRIGHT file at the top-level directory of this distribution and # at http://deb.li/DTAuthors # # This file is part of Distro Tracker. It is subject to the license terms # in the LICENSE file found in the top-level directory of this # d...
sa2ajj/DistroTracker
pts/mail/tests/tests_control.py
Python
gpl-2.0
90,050
from django.contrib import admin from priorityDB.models import * # Register your models here # For more information on this file, see # https://docs.djangoproject.com/en/dev/intro/tutorial02/ class TaskHistoryInline(admin.StackedInline): model = TaskHistory extra = 0 class EventAdmin(admin.ModelAdmin): ...
lowellbander/ngVote
priorityDB/priorityDB/admin.py
Python
gpl-2.0
418
# -*- coding: utf-8 -*- import requests from lxml import etree #使用requests库的get方法发起请求 headers = {"X-Requested-With" : "XMLHttpRequest"} url = 'http://www.newsmth.net/nForum/board/HouseRent' r = requests.get(url,headers=headers) #网页文本内容 htmlContent = r.text #建立HTML DOM tree page = etree.HTML(htmlContent) #用于解析的一些东西...
RioDream/learning-data-structure
python stuff/rent.py
Python
gpl-2.0
950
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012, 2013, 2014 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 yo...
JakeCowton/invenio-data
invenio_data/modules/deposit/workflows/alice.py
Python
gpl-2.0
3,371
# -*- coding: utf-8 -*- __author__ = 'iwdev1' from .settings import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'pizza_db', 'USER': 'root', 'PASSWORD': 'A8d32e08.', 'HOST': '', 'PORT': '', } } ALLOWED_HOSTS = [] STATIC_ROOT = '' ...
vellonce/PizzaFria
pizzafria/localsettings.py
Python
gpl-2.0
585
<<<<<<< HEAD #!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http...
marvoey/live-web
sites/all/libraries/fckeditor/editor/filemanager/connectors/py/upload.py
Python
gpl-2.0
6,011
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
kain88-de/mdanalysis
testsuite/MDAnalysisTests/analysis/test_contacts.py
Python
gpl-2.0
14,510
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (C) 2014 David Vavra (vavra.david@email.cz) 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 the Lice...
david-vavra/pyrage
pyrage/modules/arp_inspection.py
Python
gpl-2.0
2,260
# -*- coding: utf-8 -*- """ @author: Peter Morgan <pete@daffodil.uk.com> """ from Qt import QtGui, QtCore, Qt, pyqtSignal from ogt import ags4 import app_globals as G from img import Ico import xwidgets from ags4_models import CG, AGS4_COLORS, HeadingsModel, AbbrevItemsModel class AGS4DataDictBrowser( QtGui.QWidg...
open-geotechnical/ogt-ags-py
ogtgui/ags4_widgets.py
Python
gpl-2.0
27,425
import numpy, sys import scipy.linalg, scipy.special ''' VBLinRegARD: Linear basis regression with automatic relevance priors using Variational Bayes. For more details on the algorithm see Apprendix of Roberts, McQuillan, Reece & Aigrain, 2013, MNRAS, 354, 3639. History: 2011: Translated by Thomas Evans from origina...
saigrain/CBVshrink
src/VBLinRegARD.py
Python
gpl-2.0
3,845
import warnings from ... import features from .ancillary_feature import AncillaryFeature def compute_emodulus_legacy(mm): """This is how it was done in Shape-Out 1""" calccfg = mm.config["calculation"] deprecation_check_model_lut(calccfg) lut_identifier = calccfg["emodulus lut"] medium = calccfg[...
ZellMechanik-Dresden/dclab
dclab/rtdc_dataset/feat_anc_core/af_emodulus.py
Python
gpl-2.0
10,014
class ActionItem: def __init__(self, name=u'', query=u'', image=u'DefaultFolder'): self.name = name self.query = query self.image = image pass pass
noba3/KoTos
addons/plugin.video.streamcloud-master/resources/lib/items/action_item.py
Python
gpl-2.0
196
import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import numpy as np import matplotlib.pyplot as plt def vecExpancion(vec): """@todo: Docstring for vecExpancion. :vec: @todo :returns: @todo """ m = np.zeros((3,3)) m[0,1] = -vec[2] m[0,2] = vec[1] m[1,0] = vec[2] m[1,2] = -vec[0] m...
focs/svo_relocalization
svo_relocalization/python/T_plot.py
Python
gpl-2.0
2,982
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('p311', '0003_auto_20150323_1217'), ] operations = [ migrations.RenameField( model_name='commoninfo', ...
max1k/cbs
p311/migrations/0004_auto_20150325_1306.py
Python
gpl-2.0
781
# -*- coding: utf-8 -*- # # ITerativ GmbH # http://www.iterativ.ch/ # # Copyright (c) 2012 ITerativ GmbH. All rights reserved. # # 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 ...
atizo/djangojames
djangojames/templatetags/truncate.py
Python
gpl-2.0
2,021
from twython import Twython, TwythonError, TwythonAuthError from .config import app_key, app_secret, screen_name import unittest class TwythonAuthTestCase(unittest.TestCase): def setUp(self): self.api = Twython(app_key, app_secret) self.bad_api = Twython('BAD_APP_KEY', 'BAD_APP_SECRET') ...
alex-pardo/6degrees
twython-master/twython-master/tests/test_auth.py
Python
gpl-2.0
3,025
from . import hr_bulk_period
silvau/Addons_Odoo
hr_bulk_period/wizard/__init__.py
Python
gpl-2.0
29
from Screen import Screen from Components.config import config from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.Harddisk import harddiskmanager from Components.NimManager import nimmanager from Components.About import about from Components.ScrollLabel impor...
idrogeno/IdroMips
lib/python/Screens/About.py
Python
gpl-2.0
21,987
# Copyright (C) 2013 Korei Klein <korei.klein1@gmail.com> from misc import * from calculus import variable from lib import common_vars from lib.common_symbols import domainSymbol, relationSymbol, leftSymbol, rightSymbol from calculus.basic import endofunctor from calculus.basic import formula class UntransportableExc...
koreiklein/fantasia
calculus/basic/bifunctor.py
Python
gpl-2.0
13,217
import logging from flask import ( Flask, request, Response ) import requests app = Flask(__name__) @app.route('/<path:url>', methods=['GET', 'POST', 'PUT', 'PATCH']) def proxy(url): # extract the request info and change its destination # how to deal with socketio if url == "socket.io/": ...
sillygod/my-travel-in-learning-python
proxy.py
Python
gpl-2.0
1,022
#!/usr/bin/python import cairo import gtk import copy def abs(x): if x < 0: return -x else: return x class object: def __init__(self, name, x, y, w, h): self.name = name self.x = x self.y = y self.w = w self.h = h # huddung vector self.dx = 0 self.dy = 0 # 0 = normal ; 1 = active ; 2 = select...
Newterm/florence
editor/toolkit.py
Python
gpl-2.0
16,795
# # actions.py: routines that actually run the svn client. # # Subversion is a tool for revision control. # See http://subversion.tigris.org for more information. # # ==================================================================== # Copyright (c) 2000-2009 CollabNet. All rights reserved. # # This software is ...
bdmod/extreme-subversion
BinarySourcce/subversion-1.6.17/subversion/tests/cmdline/svntest/actions.py
Python
gpl-2.0
93,569
# pykarta/geocoder/massgis.py # Copyright 2013--2019, Trinity College Computing Center # Last modified: 22 October 2019 from __future__ import print_function import lxml.etree as ET from .geocoder_base import GeocoderBase, GeocoderResult, GeocoderError import pykarta.address # https://wiki.state.ma.us/confluence/page...
david672orford/pykarta
pykarta/geocoder/massgis.py
Python
gpl-2.0
3,478
# Copyright (c) 2006-2015 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2013 buck@yelp.com <buck@yelp.com> # Copyright (c) 2014-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Brett Cannon <brett@python.org> # Copyright (c) 2014 Arun Persaud <aru...
PyCQA/pylint
pylint/checkers/imports.py
Python
gpl-2.0
39,331
#VERSION: 2.12 #AUTHORS: Diego de las Heras (diegodelasheras@gmail.com) # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of ...
n054/qBittorrent
src/searchengine/nova/engines/torrentz.py
Python
gpl-2.0
5,201
#!/usr/bin/python # find_unicode.py # # Author: Jonathan Hosmer # Date: Sun Feb 15 14:06:15 2015 # import os import sys def help(): print 'Usage: {} [file, [dir, [file, ..]]]'.format(__file__) print 'Displays line:character position of all non-ascii Unicode character(s) in a file' def main(): args = sys....
jhosmer/find_unicode
find_unicode.py
Python
gpl-2.0
1,875
import RPi.GPIO as GPIO import dht11 import time # initialize GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.cleanup() instance = dht11.DHT11(pin = 23) while( 1 ) : result = instance.read() if result.is_valid(): print("Temperature: %d C" % result.temperature) print("Humidity: %d %%" % result...
attojeon/learnsteam.node.js
gpio/dht11Run.py
Python
gpl-2.0
410
import numpy as np class Quaternion: """Quaternion Rotation: Class to aid in representing 3D rotations via quaternions. """ @classmethod def from_v_theta(cls, v, theta): """ Construct quaternions from unit vectors v and rotation angles theta Parameters ---------- ...
davidwhogg/MagicCube
code/projection.py
Python
gpl-2.0
5,116
''' Copyright 2009, 2010 Anthony John Machin. All rights reserved. Supplied subject to The GNU General Public License v3.0 Created on 28 Jan 2009 Last Updated on 10 July 2010 As test20 with tests of: rules instantiation and query inference Related: single dict TS recursion rule plus generic rule + minimal da...
Semanticle/Semanticle
sm-mt-devel/src/metabulate/tests/test26case-009d.py
Python
gpl-2.0
18,357
#!/usr/bin/env python """ This is the main module driver for Ross Flieger-Allison's python-utils module. """ __author__ = "Ross Flieger-Allison" __date__ = "23-10-2015" __version__ = "1.0.0"
rfoxfa/python-utils
utils/__init__.py
Python
gpl-2.0
199
# GNU Enterprise Forms - GF Object Hierarchy - Layout # # Copyright 2001-2007 Free Software Foundation # # This file is part of GNU Enterprise # # GNU Enterprise 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;...
onoga/wm
src/gnue/forms/GFObjects/GFLayout.py
Python
gpl-2.0
3,034
import os os.environ["PYSDL2_DLL_PATH"] = os.getcwd() import sdl2 import win32gui def get_windows_bytitle(title_text, exact = False): """ Gets window by title text. [Windows Only] """ def _window_callback(hwnd, all_windows): all_windows.append((hwnd, win32gui.GetWindowText(hwnd))...
tpainter/df_everywhere
df_everywhere/test/sdltest/StackOverflow_Question_Code.py
Python
gpl-2.0
1,568
import time from com.googlecode.fascinator.common import JsonSimple from com.googlecode.fascinator.api.storage import StorageException from java.io import ByteArrayInputStream from org.apache.commons.lang import StringEscapeUtils def truncate(s, maxLength): return s[:maxLength] + (s[maxLength:] and "...") class I...
redbox-mint/redbox
config/src/main/config/portal/default/redbox/scripts/workflows/inbox.py
Python
gpl-2.0
5,512
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either ve...
Polarcraft/KbveBot
commands/wikipath.py
Python
gpl-2.0
3,242
from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QVariant from PyQt5.QtWidgets import QWidget, QFrame, QScrollArea, QMenu, QAction, \ QPushButton, QLabel, QVBoxLayout, QHBoxLayout, QLineEdit, QComboBox from PyQt5.QtGui import QIcon, QCursor from ui.xnova.xn_world import XNovaWorld_instance from ui.xnova import x...
minlexx/xnovacmd
ui/galaxy_widget.py
Python
gpl-2.0
11,809
COMP_PREFIX_LIST_MODEL={ "":{'tags':(u"", ), "vocalized":(u"", )}, u'ب':{'tags':(u'جر', ), "vocalized":(u"بِ", )}, u'ل':{'tags':(u'جر', ), "vocalized":(u"لِ", )}, u'ال':{'tags':(u'تعريف', ), "vocalized":(u"الْ", )}, u'بال':{'tags':(u'جر', u'تعريف', ), "vocalized":(u"بِالْ", )}, u'لل':{'tags':(u'جر', u'تعريف', ), "...
linuxscout/arramooz
scripts/nouns/t.py
Python
gpl-2.0
2,802
""" Cobbler uses Cheetah templates for lots of stuff, but there's some additional magic around that to deal with snippets/etc. (And it's not spelled wrong!) Copyright 2008, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This software may be freely redistributed under the terms of the GNU general public license. Yo...
brenton/cobbler
cobbler/templar.py
Python
gpl-2.0
7,386
 import urllib import urllib2 import re import sys import gzip import StringIO import copy import cookielib import time import random import argparse # from bs4 import BeautifulSoup class WBinfo(): def __init__(self, url, header, cookie_str, depth=0, db_set = [None, None]): ''' 初始化 ...
softtyphoon/tz
tools/weibo/WBinfo.py
Python
gpl-2.0
24,202
# coding=utf-8 product_map = {1: "Original 1000", 3: "Color 650", 10: "White 800 (Low Voltage)", 11: "White 800 (High Voltage)", 18: "White 900 BR30 (Low Voltage)", 20: "Color 1000 BR30", 22: "Color 1000", 27: "LIFX...
sanghviharshit/script.kodi.lifx.ambilight
resources/lib/lifxlan/products.py
Python
gpl-2.0
4,906
#def binh_phuong() try: a=int(raw_input("Nhap so n>=0 \n")) while a<=0: a=int(raw_input("Nhap lai so n>=0\n ")) print "%d" %(a) b=pow(a,2) c=int(raw_input("Doan so binh phuong cua ban\n")) while c!=b: if c<b: print"chua dung, cao len 1 chut\n" c=input() else: print"qua rui giam xuon...
pythonvietnam/pbc082015
VuQuangThang/21082015_B2/bai4.py
Python
gpl-2.0
433
from django.contrib import admin from .models import ( Image, NutritionalDataDish, NutritionalDataGuess, Dish, Guess) class ImageInline(admin.StackedInline): model = Image class NutritionalDataDishInline(admin.StackedInline): model = NutritionalDataDish class DishAdmin(admin.ModelAdmin): list_dis...
grigoryk/calory-game-server
dishes/admin.py
Python
gpl-2.0
727