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
from __future__ import unicode_literals import json import socket from uuid import uuid4 from time import sleep from random import randrange from unittest import TestCase import six from six.moves.queue import Queue, Empty from six.moves.urllib.parse import urlparse, urlencode, parse_qsl import pytest import cherrypy...
RobRuana/sideboard
sideboard/tests/test_server.py
Python
bsd-3-clause
20,238
"""Network-related monitors for SimpleMonitor.""" import urllib2, httplib import re import os import sys import socket import datetime import subprocess from monitor import Monitor # coded by Kalys Osmonov # source: http://www.osmonov.com/2009/04/client-certificates-with-urllib2.html class HTTPSClientAuthHandler(ur...
nonbeing/simplemonitor
Monitors/network.py
Python
bsd-3-clause
12,277
# # Project: # glideinWMS # # File Version: # # Description: # factory/tool specific condorLogs helper # import time import os.path import mmap import re import binascii import StringIO import gzip from glideinwms.lib import condorLogParser from glideinwms.factory import glideFactoryLogParser # get the list of ...
holzman/glideinwms-old
factory/tools/lib/gWftLogParser.py
Python
bsd-3-clause
5,274
BASE_URLS = [ "www.biomedcentral.com", "www.actaneurocomms.org", "www.actavetscand.com", "www.ascpjournal.org", "www.agricultureandfoodsecurity.com", "www.aidsrestherapy.com", "www.almob.org", "www.aacijournal.com", "alzres.com", "www.amb-express.com", "www.animalbiotelemetry.com", "www.ann-clinmicrob.com", "www.annals...
CottageLabs/OpenArticleGauge
openarticlegauge/plugins/resources/bmc_base_urls.py
Python
bsd-3-clause
9,614
#!/usr/bin/env python3 # This is a reference client for interacting with wpd. Not intended for mainline use. import os, sys import socket if len(sys.argv) != 3: print("Usage: wpc.py <hostname or IP> <port>") exit(1) s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect((sys.argv[1],int(sys.argv[2]))) s...
richteer/wpd
wpc.py
Python
bsd-3-clause
505
""" Simple registration management for arbitrary events Copyright (c) 2009, Wes Winham All rights reserved. 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 copyri...
winhamwr/django-reservations
django_reservations/__init__.py
Python
bsd-3-clause
1,967
# -*-coding:Utf-8 -* # Copyright (c) 2010 DAVY Guillaume # All rights reserved. # # 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...
stormi/tsunami
src/secondaires/magie/commandes/sorts/__init__.py
Python
bsd-3-clause
2,505
n_plots_per_species = survey_data.groupby(["name"])["verbatimLocality"].nunique().sort_values() fig, ax = plt.subplots(figsize=(8, 8)) n_plots_per_species.plot(kind="barh", ax=ax, color='0.4') ax.set_xlabel("Number of plots"); ax.set_ylabel("");
jorisvandenbossche/DS-python-data-analysis
notebooks/_solutions/case2_observations_analysis21.py
Python
bsd-3-clause
246
from __future__ import division, print_function, absolute_import import os import sys if sys.version_info >= (3,): from configparser import ConfigParser else: from ConfigParser import ConfigParser def config(): """ Loads and returns a ConfigParser from ``~/.deepdish.conf``. """ conf = ConfigPa...
uchicago-cs/deepdish
deepdish/conf.py
Python
bsd-3-clause
489
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from django.conf import settings from django.views.generic import RedirectView # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(ad...
ebu/test-engine-ondemand
vendor/plugit-development-client/app/urls.py
Python
bsd-3-clause
590
# -*- coding: utf-8 -*- # Copyright (c) 2012, Jonas Obrist # All rights reserved. # # 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...
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/pymaging/pymaging/formats.py
Python
bsd-3-clause
2,964
# -*- 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 'Plan.provider' db.add_column(u'physical_plan', 'provider', self.gf('dj...
globocom/database-as-a-service
dbaas/physical/migrations/0008_auto__add_field_plan_provider.py
Python
bsd-3-clause
7,922
from math import sqrt from sympl import Stepper class BucketHydrology(Stepper): """ Manages surface energy and moisture balance This component assumes that the surface is a slab with some heat capacity and moisture holding capacity. Calculates the sensible and latent heat flux, takes precipitation va...
CliMT/climt-future
climt/_components/bucket_hydrology/component.py
Python
bsd-3-clause
6,444
#!/usr/bin/python import roslib; import rospy from serial import * from geometry_msgs.msg import Twist class EklavyaBotController: def __init__(self): rospy.init_node('eklavya_controller') rospy.loginfo("eklavya_controller Node") port_name = rospy.get_param('~port','/dev/ttyUSB0') baud = int(rospy.get_pa...
jitrc/eklavya-ros-pkg
eklavya_bringup/src/diffdrive_robot_controller.py
Python
bsd-3-clause
1,441
from custom.ilsgateway.tanzania.handlers.keyword import KeywordHandler from custom.ilsgateway.tanzania.reminders import YES_HELP class YesHandler(KeywordHandler): def help(self): return self.handle() def handle(self): self.respond(YES_HELP) return True
qedsoftware/commcare-hq
custom/ilsgateway/tanzania/handlers/yes.py
Python
bsd-3-clause
289
#!/usr/bin/env python # coding: utf-8 import numpy as np import os from astropy.table import Table, vstack from collections import OrderedDict ## Import some helper functions, you can see their definitions by uncomenting the bash shell command from desispec.workflow.exptable import default_obstypes_for_exptable fr...
desihub/desispec
py/desispec/workflow/proctable.py
Python
bsd-3-clause
19,829
from battlesnake.core.base_plugin import BattlesnakePlugin from battlesnake.plugins.contrib.factions.inbound_commands import FactionCommandTable class FactionPlugin(BattlesnakePlugin): """ Example plugin to use as a starting point. """ command_tables = [FactionCommandTable]
gtaylor/btmux_battlesnake
battlesnake/plugins/contrib/factions/plugin.py
Python
bsd-3-clause
295
"""From whence it came. --- layout: post source: unknown source_url: unknown title: whence date: 2014-06-10 12:31:19 categories: writing --- From whence it came. """ from proselint.tools import existence_check, memoize @memoize def check(text): """Check the text.""" err = "misc.whence" ...
amperser/proselint
proselint/checks/misc/whence.py
Python
bsd-3-clause
435
import os import glob import sys import copy import itertools import logging import numpy as np from .utils import stack_files from astropy.table import Column from fermipy.utils import get_parameter_limits def fit_region(gta,modelname,src_name,loge_bounds=None, **kwargs): skip_opt = kwargs.get('skip_opt',[...
woodmd/haloanalysis
extpipe/fit_funcs.py
Python
bsd-3-clause
16,120
""" Plugin for probing vnc """ from owtf.managers.resource import get_resources from owtf.plugin.helper import plugin_helper DESCRIPTION = " VNC Probing " def run(PluginInfo): resource = get_resources("BruteVncProbeMethods") return plugin_helper.CommandDump("Test Command", "Output", resource, PluginInfo, [])...
owtf/owtf
owtf/plugins/network/bruteforce/vnc@PTES-003.py
Python
bsd-3-clause
321
class Solution: def countVowelStrings(self, n: int) -> int: @lru_cache(None) def count(n, start): if n<=0 or start>4: return 0 if n==1: return 5-start answer=0 for i in range(start, 5): answer+=...
jianjunz/online-judge-solutions
leetcode/1761-count-sorted-vowel-strings.py
Python
mit
402
#!/usr/bin/env python # Copyright (C) 2008 Red Hat, Inc. # Copyright (C) 2012 Robert Deaton # # This library 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 2 of the License, or (at you...
justinmeister/spaceinvaders-spyral
setup.py
Python
mit
8,975
from test import support # If we end up with a significant number of tests that don't require # threading, this test module should be split. Right now we skip # them all if we don't have threading. threading = support.import_module('threading') from contextlib import contextmanager import imaplib import os.path impor...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.2/Lib/test/test_imaplib.py
Python
mit
8,967
import ctypes import json import os from sys import stdout, platform as _platform from datetime import datetime, timedelta from pokemongo_bot.base_task import BaseTask from pokemongo_bot.worker_result import WorkerResult from pokemongo_bot.tree_config_builder import ConfigException from pokemongo_bot.base_dir import _...
lythien/pokemongo
pokemongo_bot/cell_workers/update_live_stats.py
Python
mit
18,922
"""scholar_scrapy URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Cl...
alexandr-fonari/scholar-scrapy
scholar_scrapy/urls.py
Python
mit
814
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, cstr from frappe import _ from frappe.model.document import Document class CustomField(Document): def autoname(self): self...
gangadhar-kadam/hrfrappe
frappe/core/doctype/custom_field/custom_field.py
Python
mit
3,589
""" This features module provides access to features of the bytes of content in revisions. .. autodata:: revscoring.features.wikibase.revision Supporting classes ++++++++++++++++++ .. autoclass:: revscoring.features.wikibase.Revision :members: :member-order: bysource .. autoclass:: revscoring.features.wikib...
wiki-ai/revscoring
revscoring/features/wikibase/__init__.py
Python
mit
552
#!/usr/bin/env python """ """ # Standard library modules. # Third party modules. # Local modules. from pyxray.parser.wikipedia import WikipediaElementNameParser # Globals and constants variables. def test_wikipedia(): parser = WikipediaElementNameParser() assert len(list(parser)) > 0
ppinard/pyxray
tests/parser/test_wikipedia.py
Python
mit
299
# -*- coding: utf-8 -*- from django.core.validators import _lazy_re_compile, RegexValidator from django.db.models.fields import * # NOQA from django.utils.translation import ugettext as _ slug_re = _lazy_re_compile(r'^(?=.*[-a-zA-Z_])[-a-zA-Z0-9_]+\Z') validate_slug = RegexValidator( slug_re, _("Enter a vali...
altio/foundation
foundation/models/fields.py
Python
mit
660
import codecs import json import os from bottle import request from conans import DEFAULT_REVISION_V1 from conans.model.ref import ConanFileReference from conans.server.rest.bottle_routes import BottleRoutes from conans.server.service.v1.service import ConanService class DeleteController(object): """ Se...
memsharded/conan
conans/server/rest/controller/v1/delete.py
Python
mit
2,111
class NullStorage(object): def store(self, *args): print args def retrieve(self): return ''
ghostlines/ghostlines-robofont
src/lib/ghostlines/storage/null_storage.py
Python
mit
118
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2006, 2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and...
4shadoww/usploit
lib/dns/rdtypes/util.py
Python
mit
8,107
#Overconfidence makes you careless class Solution: # @return a string def convertToTitle(self, num): d = { 1:'A', 2:'B', 3:'C', 4:'D', 5:'E', 6:'F', 7:'G', 8:'H', 9:'I', 10:'J', 11:'K', 12:'L', 13:'M', 14:'N', 15:'O', 16:'P', 17:'Q', 18:'R', 19:'S', 20:'T'...
lsingal/leetcode
python/math/ExcelSheetColumnTitle.py
Python
mit
715
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_variegated_womp_rat.iff" result.attribute_template_id = 9 res...
anhstudios/swganh
data/scripts/templates/object/mobile/shared_variegated_womp_rat.py
Python
mit
441
# 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 ...
SUSE/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/ip_configuration.py
Python
mit
2,982
# coding: utf-8 from itertools import groupby from django.shortcuts import get_object_or_404 from django.contrib.syndication.views import Feed from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.core.urlresolvers import reverse from annoying.decorators import render_to from .models i...
dubnio/djangomx
djangomx/blog/views.py
Python
mit
2,705
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/engine/shared_eng_sorosuub_l_337_ion_engine.iff" re...
anhstudios/swganh
data/scripts/templates/object/tangible/ship/components/engine/shared_eng_sorosuub_l_337_ion_engine.py
Python
mit
503
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/component/droid/shared_data_storage_module_1.iff" result.attribute_...
obi-two/Rebelion
data/scripts/templates/object/tangible/component/droid/shared_data_storage_module_1.py
Python
mit
488
import boto3 import logging from django.conf import settings from django.core.management.base import BaseCommand logger = logging.getLogger(__name__) def get_s3_client(): """ A DRY place to make sure AWS credentials in settings override environment based credentials. Boto3 will fall back to: http://b...
stvkas/django-bakery
bakery/management/commands/__init__.py
Python
mit
3,455
""" ================== Window Interaction ================== A general module for selecting regions and inputting guesses via the interactive window. """ import numpy import pyspeckit from astropy import log class Interactive(object): def __init__(self, Spectrum, guesses=None, interactive_help_m...
bsipocz/pyspeckit
pyspeckit/spectrum/interactive.py
Python
mit
20,102
from parmed.amber import * import numpy as np import glob import pandas as pd files = glob.glob('./AlkEthOH_r47*.top') def drop(mylist, m, n): mylist = list(mylist) del mylist[m::n] return mylist # Reading in and cleaning up atoms involved in bonds lst0name = [] lstt0 = [] lst00 = [] print("PRINTING BOND PAIRS.....
bmanubay/open-forcefield-tools
single-molecule-property-generation/torsion_fitting/Mol2_files/AlkEthOH_rings_filt1/read_top.py
Python
mit
6,304
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './acq4/analysis/modules/IVCurve/ctrlTemplate.ui' # # Created: Tue Apr 14 17:37:07 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = ...
tropp/acq4
acq4/analysis/modules/IVCurve/ctrlTemplate.py
Python
mit
32,875
from melopy import Melopy import os def main(): m = Melopy('entertainer') m.tempo = 140 d = os.path.dirname(__file__) if len(d): m.parsefile(d + '/scores/entertainer.mlp') else: m.parsefile('scores/entertainer.mlp') m.render() if __name__ == '__main__': main()
jdan/Melopy
examples/entertainer.py
Python
mit
307
# encoding=utf-8 import tornado.escape import tornado.web class FormUIModule(tornado.web.UIModule): def render(self, form, action='', method='post', submit=None, submit_sm=False): strings = [ '<form action="{action}" method="{method}" class="form-horizontal" role="form">'.format( ...
hugovk/terroroftinytown
terroroftinytown/tracker/ui.py
Python
mit
1,663
from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.utils.importlib import import_module import anagrem.models class Command(BaseCommand): help = 'Start a Gearman worker to work jobtasks' def handle(self, *args, **options): # Load all apps'...
markpasc/anagrem
anagrem/management/commands/workjobs.py
Python
mit
607
"""SCons.Defaults Builders and other things for the local site. Here's where we'll duplicate the functionality of autoconf until we move it into the installation procedure or use something like qmconf. The code that reads the registry to find MSVC components was borrowed from distutils.msvccompiler. """ # # __COPY...
datalogics/scons
src/engine/SCons/Defaults.py
Python
mit
16,213
from .stop_words import STOP_WORDS from .lex_attrs import LEX_ATTRS from ...language import Language, BaseDefaults class SanskritDefaults(BaseDefaults): lex_attr_getters = LEX_ATTRS stop_words = STOP_WORDS class Sanskrit(Language): lang = "sa" Defaults = SanskritDefaults __all__ = ["Sanskrit"]
honnibal/spaCy
spacy/lang/sa/__init__.py
Python
mit
317
#ImportModules from ShareYourSystem.Standards.Classors.Representer import _print from ShareYourSystem.Standards.Objects import Inserter #Print a version of the class _print(dict(Inserter.InserterClass.__dict__.items())) #Print a version of this object _print(Inserter.InserterClass()) #Print a version of his __dict__...
Ledoux/ShareYourSystem
Pythonlogy/build/lib/ShareYourSystem/Standards/Modelers/Inserter/Test.py
Python
mit
403
month_number = [] start_time = 1 for i in range (6): month_label = 1 end_time = start_time + 2591999 i = [month_label,start_time,end_time] start_time = end_time + 1 month_number.append(i) def Update_month(table): for x in month_number: print ('UPDATE %s SET %s.month = \'%s\' WHERE %s.tstamp >= %s...
pcgeller/weirdo
test1.py
Python
mit
445
from .baseresource import BaseResource class Innings: def __init__(self, overs, runs, wickets): self.overs = overs self.runs = runs self.wickets = wickets class HomeAwayBase: def __init__( self, penaltiesScore, penaltiesSequence, halfTimeScore, ...
liampauling/betfairlightweight
betfairlightweight/resources/inplayserviceresources.py
Python
mit
6,370
# created by Chirath R, chirath.02@gmail.com from django import forms from django.contrib.auth.models import User from django.db.models.functions import datetime from django.utils.translation import ugettext_lazy as _ from registration.models import UserInfo class UserSignUpForm(forms.ModelForm): """ A form ...
akshayharidas/fosswebsite
registration/forms.py
Python
mit
8,042
import datetime from app.main.data_quality import default_data_quality_content_for_date_range def title(): return 'Order' def content(): return default_data_quality_content_for_date_range(__package__, datetime.date.today() - datetime.timedelta(days=731...
saltastro/salt-data-quality-site
app/main/pages/instrument/hrs/red/order/__init__.py
Python
mit
401
from tests.markup._util import desired_output def simple_schema(): from flatland import Form, String class SmallForm(Form): valued = String empty = String return SmallForm({u'valued': u'val'}) ### @desired_output('html', simple_schema) def input_value_html(): """<input name="value...
mmerickel/flatland
tests/markup/test_tag_pairing.py
Python
mit
2,284
#!/usr/bin/env python3 # Copyright (c) 2016-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # This script will locally construct a merge commit for a pull request on a # github repository, inspect ...
PIVX-Project/PIVX
src/chiabls/devtools/github-merge.py
Python
mit
21,018
# 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 ...
SUSE/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/service_health.py
Python
mit
2,719
# encoding: utf-8 from __future__ import print_function, unicode_literals from time import time from logging import getLogger from mongoengine import QuerySet, Q log = getLogger(__name__) class CappedQuerySet(QuerySet): """A custom queryset that allows for tailing of capped collections. Waiting can be interru...
marrow/task
marrow/task/queryset.py
Python
mit
5,295
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
azverkan/scons
test/TEX/bibliography.py
Python
mit
4,736
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_trandoshan_female.iff" result.attribute_template_id = 9 resul...
anhstudios/swganh
data/scripts/templates/object/mobile/shared_trandoshan_female.py
Python
mit
449
from keras.callbacks import TensorBoard import numpy as np import os class TensorBoardGrouped(TensorBoard): """TensorBoard basic visualizations. [TensorBoard](https://www.tensorflow.org/guide/summaries_and_tensorboard) is a visualization tool provided with TensorFlow. This callback is a subclass of ...
keras-team/keras-contrib
keras_contrib/callbacks/tensorboard.py
Python
mit
1,998
from django.conf.urls import patterns, include, url from django.contrib import admin from messages import views admin.autodiscover() from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'messages_old', views.MessageViewSet) urlpatterns = patterns( '', url(r'^$', views...
printminion/tdlogger
tdLoggerAnalyticsDjango/urls.py
Python
mit
902
# This file is part of Heartbeat: https://github.com/Storj/heartbeat # # The MIT License (MIT) # # Copyright (c) 2014 Will James <jameswt@gmail.com> # # Pieces of this code were derived from pybitcointools by Vitalik Buterin # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this soft...
Storj/siggy
siggy/siggy.py
Python
mit
3,235
#!/usr/bin/python # -*- coding: utf-8 -*- # 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 progra...
0vercl0k/rp
src/third_party/beaengine/tests/0feb.py
Python
mit
4,286
from django.conf.urls import include, url from . import views app_name = 'alerts' urlpatterns = [ # Examples: # url(r'^$', 'akwriters.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^test', views.test, name='test'), ]
Kromey/fbxnano
alerts/urls.py
Python
mit
262
from tornado import ioloop, httpclient as hc, gen, log, escape from . import _compat as _ from .graphite import GraphiteRecord from .utils import convert_to_format, parse_interval, parse_rule, HISTORICAL, LOGICAL_OPERATORS, interval_to_graphite import math from collections import deque, defaultdict from itertools impo...
tpeng/graphite-beacon
graphite_beacon/alerts.py
Python
mit
9,649
#!/usr/bin/python2.7 def yr_forecast_data(): #Weather forecast from yr.no, delivered by the Norwegian Meteorological Institute and the NRK import urllib #import datetime from datetime import datetime from xml.dom import minidom from forecast_db_interface import forecast_db_interface, YrTable, t...
tkuyucu/ForecastCompare
forecastSrc/yr_forecast_data.py
Python
gpl-2.0
5,054
class treasureSelect(): def __init__(self,treasureName,buttonX,buttonY,imageLocation,buttonHeight,buttonWidth): self.treasureName = treasureName self.buttonX = buttonX self.buttonY = buttonY self.imageLocation = imageLocation self.buttonHeight = buttonHeight self.buttonWidth = buttonWidth
502BadGateway/New_Wizards
treasureSelectClass.py
Python
gpl-2.0
302
""" DiagonalProjection.py This file is part of ANNarchy. Copyright (C) 2013-2016 Julien Vitay <julien.vitay@gmail.com>, Helge Uelo Dinkelbach <helge.dinkelbach@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licens...
ANNarchy/ANNarchy
ANNarchy/extensions/diagonal/DiagonalProjection.py
Python
gpl-2.0
16,376
# Copyright (c) 2018-2020 Alexander Todorov <atodorov@MrSenko.com> # Licensed under the GPL 2.0: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # NOTE: import order matches the numeric ID of the checker from .dunder_attributes import DunderClassAttributeChecker from .list_comprehension import ListComprehensio...
kiwitcms/Kiwi
kiwi_lint/__init__.py
Python
gpl-2.0
2,601
#!/usr/bin/env python """ A Simple wx example to test PyDev's event loop integration. To run this: 1) Enable the PyDev GUI event loop integration for wx 2) do an execfile on this script 3) ensure you have a working GUI simultaneously with an interactive console Ref: Modified from wxPython source code wxPython/samp...
AMOboxTV/AMOBox.LegoBuild
script.module.pydevd/lib/tests_mainloop/gui-wx.py
Python
gpl-2.0
2,962
import urllib import urllib2,json import xbmcvfs import requests,time import os,xbmc,xbmcaddon,xbmcgui,re addon = xbmcaddon.Addon('script.module.vod.tvsupertuga.addon') profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8')) cacheDir = os.path.join(profile, 'cachedir') clean_cache=os.path.join(cache...
repotvsupertuga/tvsupertuga.repository
script.module.vod.tvsupertuga.addon/_ytplist.py
Python
gpl-2.0
4,168
import string __version__ = string.split('$Revision: 1.5 $')[1] __date__ = string.join(string.split('$Date: 2001/07/20 23:53:31 $')[1:3], ' ') __author__ = 'Tarn Weisner Burton <twburton@users.sourceforge.net>' __doc__ = 'http://oss.sgi.com/projects/ogl-sample/registry/SGIX/shadow_ambient.txt' __api_version__ = 0x...
fxia22/ASM_xf
PythonD/site_python/OpenGL/GL/SGIX/shadow_ambient.py
Python
gpl-2.0
551
import re import copy from trac.core import * from trac.web.chrome import INavigationContributor, ITemplateProvider, add_script, add_script_data, add_stylesheet, add_notice, add_link from trac.web.main import IRequestHandler, IRequestFilter from trac.util import Markup from trac.util.text import to_unicode from trac.ut...
schwuk/trac-code-comments-plugin
code_comments/web.py
Python
gpl-2.0
11,501
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 your option) a...
lnielsen/invenio
invenio/modules/tags/restful.py
Python
gpl-2.0
12,439
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE import os import sys import time import copy import socket from opus_core.misc import get_config_from_opus_path from opus_core.misc import module_path_from_opus_path, get_host_name from ...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/tools/start_remote_run.py
Python
gpl-2.0
25,472
from lingpy import * from lingpy.align.sca import get_consensus, SCA from collections import defaultdict import networkx as nx from itertools import combinations from pyclics.utils import save_network from pyburmish import * from pyburmish.util import * from pyburmish.phonology import split_tokens from lingpy.settings ...
LinguList/burmish
pyburmish/patterns.py
Python
gpl-2.0
15,589
#* pyx509 - Python library for parsing X.509 #* Copyright (C) 2009-2010 CZ.NIC, z.s.p.o. (http://www.nic.cz) #* #* This library is free software; you can redistribute it and/or #* modify it under the terms of the GNU Library General Public #* License as published by the Free Software Foundation; either...
nimia/public_drown_scanner
pyx509/pkcs7/asn1_models/digest_info.py
Python
gpl-2.0
1,387
#!/usr/bin/python from distutils.core import setup from glob import glob import os fll_prog = ['pyfll', 'fll.conf'] fll_data = glob('data/*') fll_pkgs = [f for f in glob('packages/*') if os.path.isfile(f)] fll_pkgs_d = glob('packages/packages.d/*') setup( name='pyfll', author='Kelvin Modderman', author_e...
lxlive/pyfll
setup.py
Python
gpl-2.0
706
#!/usr/bin/env python ''' Created on Jun 12, 2014 This script parses a JSON format configuration file, including a set of parameters defining a weekly schedule and returns the temperature value defined for the current time. The file format is as follows: { "operation_mode":<mode>, "daily_schedule": [ {"weekday":...
Telegea/Smarthub-software
src/thermostat/get_target_temp2.py
Python
gpl-3.0
7,178
import cv2.cv as cv import tesseract image=cv.LoadImage("foo.png", cv.CV_LOAD_IMAGE_GRAYSCALE) api = tesseract.TessBaseAPI() api.Init(".","eng",tesseract.OEM_DEFAULT) api.SetPageSegMode(tesseract.PSM_SINGLE_WORD) tesseract.SetCvImage(image,api) text=api.GetUTF8Text() conf=api.MeanTextConf()
jemsz95/MPID2
tesseract/test2.py
Python
gpl-3.0
294
# encoding: 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 model 'Organization' db.create_table('apply_organization', ( ('website', self.gf(...
irregulator/ganetimgr
apply/migrations/0001_initial.py
Python
gpl-3.0
10,533
from django.utils.translation import gettext_lazy as _ from django.db import models class Item(models.Model): content = models.CharField( max_length=255, verbose_name=_('content')) hit = models.PositiveIntegerField( default=0, verbose_name=_('hit')) is_valid = models.Bool...
Nivl/www.melvin.re
nivls_website/search_engine/models.py
Python
gpl-3.0
954
t11,t2=input().split()\nt2=int(t2)\nt11=int(t11)\nprint(t11+t2)\n
GopiTheContributer/GuviCodeKataprograms
add.py
Python
gpl-3.0
66
if __name__ == '__main__': tc = int(raw_input()) for i in xrange(tc): a, b = map(int, raw_input().split(' ')) a %= 10 b = b > 0 and (b % 4 or 4) or 0 print (a ** b) % 10
sanSS/programming-contests
spoj/03442-LASTDIG.py
Python
gpl-3.0
211
""" Logging """ __RCSID__ = "$Id$" import logging import os from DIRAC.FrameworkSystem.private.standardLogging.LogLevels import LogLevels from DIRAC.Core.Utilities.LockRing import LockRing from DIRAC.Resources.LogBackends.AbstractBackend import AbstractBackend class Logging(object): """ Logging is a wrapper of...
Andrew-McNab-UK/DIRAC
FrameworkSystem/private/standardLogging/Logging.py
Python
gpl-3.0
17,268
# -*- coding: utf-8 -*- # Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ # # 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 vers...
bioinformatics-ua/catalogue
emif/population_characteristics/tasks.py
Python
gpl-3.0
1,332
import sys import re ALLTEXT = open(sys.argv[1]).read() HEADER = open("___HEADER_TEMPLATE.txt").read().strip() m = re.search("# #START_LICENSE.*# #END_LICENSE[^\n]+", ALLTEXT, re.DOTALL | re.MULTILINE) if m: if m.group() != HEADER: NEWFILE = ALLTEXT.replace(m.group(), HEADER+"\n") print sys.argv[1...
xguse/ete
___put_disclaimer.py
Python
gpl-3.0
511
# -*- coding: utf-8 -*- import time import datetime from dateutil.relativedelta import relativedelta from django.db.models import Count from django.utils.translation import ugettext as _ from atracker.models import Event DEFAULT_ACTIONS = ["playout", "stream", "download"] def last_day_of_month(date): if date.mon...
hzlf/openbroadcast.org
website/apps/statistics/utils/legacy.py
Python
gpl-3.0
5,140
import sys import re import urllib.parse import time import os import os.path import sys import calendar import weakref import threading from bs4 import BeautifulSoup from datetime import datetime import pycurl from io import StringIO,BytesIO from PyQt5 import QtCore, QtGui,QtNetwork,QtWidgets,QtWebEngineWidgets,QtWe...
abhishek-archlinux/ReadManga
ReadManga-PyQt5/headlessEngine.py
Python
gpl-3.0
12,950
__author__ = "Vijay Lakhujani, Project Scientist, Xcelris Labs Ltd." __maintainer__ = "Vijay Lakhujani, Project Scientist, Xcelris Labs Ltd." __copyright__ = "Copyright 2016, Xcelris Labs Ltd." __license__ = "GPL" __version__ = "1.0" __status__ = "Complete" __email__="vijay.lakhujani@xcelrislabs.com" ''' ...
Xcelris-Labs-Ltd/Merge-Qiime-Images
prepare_taxa_charts.py
Python
gpl-3.0
8,115
#!/usr/bin/env python # --!-- coding: utf8 --!-- """Tests for stuff in ui."""
gedakc/manuskript
manuskript/tests/ui/__init__.py
Python
gpl-3.0
79
#!/usr/bin/env python # -*- coding: utf-8 -*- from kallithea.lib.dbmigrate.migrate.versioning.script.base import BaseScript from kallithea.lib.dbmigrate.migrate.versioning.script.py import PythonScript from kallithea.lib.dbmigrate.migrate.versioning.script.sql import SqlScript
msabramo/kallithea
kallithea/lib/dbmigrate/migrate/versioning/script/__init__.py
Python
gpl-3.0
279
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import sys import random import string import traceback class HistogramFiles: def __init__(self, sequence, error, use_angle_range, prob_radius, histograms_path): self.sequence = sequence self.error = error self.float_precision = 2 self.use_angle_range ...
Ryusoru/DMA-3DPSP
modular/histogram.py
Python
gpl-3.0
21,526
# -*- encoding: utf-8 -*- from abjad import * def test_selectiontools_SliceSelection__get_offset_lists_01(): staff = Staff("c'4 d'4 e'4 f'4") selection = staff[:2] start_offsets, stop_offsets = selection._get_offset_lists() assert start_offsets == [Offset(0, 1), Offset(1, 4)] assert stop_offsets...
mscuthbert/abjad
abjad/tools/selectiontools/test/test_selectiontools_SliceSelection__get_offset_lists.py
Python
gpl-3.0
352
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
renard/ansible
lib/ansible/parsing/yaml/loader.py
Python
gpl-3.0
2,030
# -*- coding: utf-8 -*- import os from typing import List from outwiker.core.xmlversionparser import XmlVersionParser from outwiker.utilites.textfile import readTextFile from outwiker.utilites.downloader import Downloader from buildtools.defines import ( DOWNLOAD_TIMEOUT, OUTWIKER_VERSIONS_FILENAME, PLUGI...
unreal666/outwiker
buildtools/versions.py
Python
gpl-3.0
1,936
import os import logging import re from Bio import SeqIO '''Given a FASTQ file, extract all of the read names''' class FastqReadNames: def __init__(self,fastq_file, output_readnames_file, verbose, match_both_pairs): self.logger = logging.getLogger(__name__) self.fastq_file = fastq_file self.output_readnames_fi...
sanger-pathogens/plasmidtron
plasmidtron/FastqReadNames.py
Python
gpl-3.0
1,833
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models48174.py
Python
gpl-3.0
17,581
#!/usr/bin/env python3 description="""This tool is to be used in a case where a user has a BIP39 seedphrase but has no wallet file and no backup of imported keys, and they had earlier used SNICKER. This will usually not be needed as you should keep a backup of your *.jmdat joinmarket wallet file, which contains all t...
undeath/joinmarket-clientserver
scripts/snicker/snicker-recovery.py
Python
gpl-3.0
10,150
import sys sys.path.append("./W11") import tog sum=tog.tog(10,2) print(sum)
40423114/2017springcd_hw
W10/im a+b.py
Python
gpl-3.0
76
# coding=utf-8 # This file is part of SickRage. # # URL: https://sickrage.github.io # Git: https://github.com/SickRage/SickRage.git # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
p0psicles/SickRage
sickrage/helper/common.py
Python
gpl-3.0
10,397