repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
tracyjacks/PyMetWeather | pymetweather/pymetweather.py | 1 | 13941 | import curses
from datetime import date, timedelta
import locale
from textwrap import fill
from pymetweather.forecasts import WeatherForecast
from pymetweather.get_args import get_command_line_args, get_config_args
locale.setlocale(locale.LC_ALL, '')
class WeatherPrinter(object):
def __init__(self, forecast, sc... | gpl-2.0 | -7,420,689,951,984,828,000 | 35.413613 | 79 | 0.492955 | false |
jcarva/digital_image_processing_assignments | spatial_domain/python/task1_6.py | 1 | 1722 | # coding=UTF-8
# 1.6. Limiarização aplicada sobre Y, com limiar m e duas opções: a) m
# escolhido pelo usuáio; b) m = média de valores da banda Y;
import numpy as np
import utils
import color
def main():
image = utils.load_image('lenna.png')
yiq_image = color.rgb2yiq(image)
grayscale_image = yiq_image[:... | gpl-3.0 | -4,424,867,651,343,764,500 | 34.770833 | 117 | 0.689977 | false |
PXke/invenio | invenio/legacy/websubmit/functions/Create_Modify_Interface.py | 1 | 12922 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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... | gpl-2.0 | 429,905,731,939,165,250 | 46.682657 | 252 | 0.580019 | false |
quonb/atom-generator | atom_generator/video.py | 1 | 2028 | import re
class YouTube(object):
def __init__(self, url=None):
self._video_id = self._extract_id(url)
def __call__(self, url=False):
if url is None or url:
self._video_id = self._extract_id(url)
return self._video_id
def _extract_id(self, url=None):
"""Extract... | apache-2.0 | -9,203,827,087,365,975,000 | 37.264151 | 97 | 0.446746 | false |
nikolhm/Pokus | knownpaths.py | 1 | 9583 | import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)
]
def __init__(self, uuid_):
... | mit | -3,393,526,364,773,057,500 | 57.432927 | 93 | 0.627883 | false |
tanghaibao/jcvi | jcvi/projects/vanilla.py | 1 | 11915 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Plotting scripts for the vanilla genome paper.
"""
import logging
import sys
from jcvi.apps.base import ActionDispatcher, OptionParser
from jcvi.compara.synteny import AnchorFile, check_beds
from jcvi.formats.base import get_number
from jcvi.formats.bed import Bed
fro... | bsd-2-clause | 6,120,270,252,504,517,000 | 25.07221 | 83 | 0.573059 | false |
cwacek/python-jsonschema-objects | python_jsonschema_objects/wrapper_types.py | 1 | 11522 | import collections
import logging
import six
from python_jsonschema_objects import util
from python_jsonschema_objects.validators import registry, ValidationError
from python_jsonschema_objects.util import lazy_format as fmt
logger = logging.getLogger(__name__)
class ArrayWrapper(collections.abc.MutableSequence):
... | mit | 6,283,899,650,825,311,000 | 34.343558 | 96 | 0.518486 | false |
franciscogmm/FinancialAnalysisUsingNLPandMachineLearning | SentimentAnalysis - Polarity - Domain Specific Lexicon.py | 1 | 2667 | import csv
import pandas as pd
import nltk
from nltk import FreqDist,ngrams
from nltk.corpus import stopwords
import string
from os import listdir
from os.path import isfile, join
def ngram_list(file,n):
f = open(file,'rU')
raw = f.read()
raw = raw.replace('\n',' ')
#raw = raw.decode('utf8')
#raw =... | mit | 7,485,374,827,431,947,000 | 21.420168 | 98 | 0.578178 | false |
sassoftware/mint | mint/django_rest/rbuilder/querysets/views/v1/views.py | 1 | 8001 | #!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -5,749,486,631,042,150,000 | 36.56338 | 122 | 0.699038 | false |
Anonymike/pasta-bot | plugins/google_broken.py | 1 | 3457 | import random
from util import hook, http, text, database, web
import re
def api_get(kind, query):
"""Use the RESTful Google Search API"""
url = 'http://ajax.googleapis.com/ajax/services/search/%s?' \
'v=1.0&safe=off'
return http.get_json(url % kind, q=query)
@hook.command('search')
@hook.comma... | gpl-3.0 | 2,788,865,380,336,183,000 | 33.919192 | 119 | 0.639283 | false |
Himon-SYNCRAFT/taskplus | tests/core/actions/test_get_task_status_details.py | 1 | 3408 | from unittest import mock
from taskplus.core.actions import (GetTaskStatusDetailsAction,
GetTaskStatusDetailsRequest)
from taskplus.core.domain import TaskStatus
from taskplus.core.shared.response import ResponseFailure
def test_get_status_details_action():
status = mock.Mock()... | bsd-3-clause | -939,071,211,444,209,800 | 29.159292 | 63 | 0.701585 | false |
codeforamerica/comport | migrations/versions/0d78d545906f_.py | 1 | 1135 | """Add 'is_public' flags for datasets
Revision ID: 0d78d545906f
Revises: 6d30846080b2
Create Date: 2016-06-27 15:30:14.415519
"""
# revision identifiers, used by Alembic.
revision = '0d78d545906f'
down_revision = '6d30846080b2'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('depar... | bsd-3-clause | -5,945,847,998,224,271,000 | 39.535714 | 139 | 0.732159 | false |
forseti-security/forseti-security | google/cloud/forseti/common/gcp_api/admin_directory.py | 1 | 10459 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | apache-2.0 | -5,565,374,687,981,949,000 | 37.032727 | 103 | 0.627115 | false |
madgik/exareme | Exareme-Docker/src/exareme/exareme-tools/madis/src/functionslocal/vtable/dummycoding.py | 1 | 2450 | import setpath
import functions
import json
registered=True
def convert(data):
if isinstance(data, basestring):
return str(data)
elif isinstance(data, collections.Mapping):
return dict(map(convert, data.iteritems()))
elif isinstance(data, collections.Iterable):
return type(data)(map... | mit | -3,340,337,105,526,376,000 | 29.259259 | 88 | 0.517959 | false |
matrix-org/synapse | tests/replication/test_sharded_event_persister.py | 1 | 12377 | # Copyright 2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -5,067,781,765,285,621,000 | 35.83631 | 87 | 0.592874 | false |
gnarula/eden_deployment | modules/s3db/msg.py | 1 | 88933 | # -*- coding: utf-8 -*-
""" Sahana Eden Messaging Model
@copyright: 2009-2014 (c) Sahana Software Foundation
@license: MIT
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 wit... | mit | 2,607,987,622,534,597,000 | 37.903325 | 141 | 0.390586 | false |
jkyeung/XlsxWriter | xlsxwriter/test/comparison/test_chart_combined03.py | 1 | 1649 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause | 8,504,918,320,747,612,000 | 26.032787 | 79 | 0.554882 | false |
dnguyen0304/clare | clare/clare/common/messaging/consumer/interfaces.py | 1 | 1596 | # -*- coding: utf-8 -*-
import abc
class IConsumer(object):
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def consume(self, interval, timeout):
"""
Parameters
----------
interval : float
Rate of work. The units are in seconds.
timeout : float
... | mit | -8,734,426,544,833,338,000 | 16.932584 | 76 | 0.506892 | false |
fredmorcos/attic | projects/plantmaker/plantmaker-main/src/benchmark/benchmark.py | 1 | 2905 | from os import path
from extra.printer import pprint, GREEN, BLUE, RED
class Benchmark(object):
useCairoPlot = False
useGnuPlot = True
def __init__(self, plant, orderList, testNumber):
self.prefix = "generic"
self.testName = "generic"
self.testNumber = testNumber
self.cairoPlotTimes = []
self.gnuPlotTim... | isc | -2,449,704,126,314,705,400 | 28.343434 | 97 | 0.63821 | false |
cdubz/babybuddy | reports/graphs/feeding_amounts.py | 1 | 1422 | # -*- coding: utf-8 -*-
from django.utils import timezone
from django.utils.translation import gettext as _
import plotly.offline as plotly
import plotly.graph_objs as go
from reports import utils
def feeding_amounts(instances):
"""
Create a graph showing daily feeding amounts over time.
:param instance... | bsd-2-clause | -5,724,312,530,632,887,000 | 29.913043 | 72 | 0.627286 | false |
geraldinepascal/FROGS | tools/phyloseq_beta_diversity/phyloseq_beta_diversity.py | 1 | 7336 | #!/usr/bin/env python3
#
# Copyright (C) 2018 INRA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is... | gpl-3.0 | -1,608,606,170,957,709,000 | 54.157895 | 350 | 0.598555 | false |
Detailscool/YHSpider | JiraStoryMaker/JiraStoryMaker2.py | 1 | 5993 | #!/usr/bin/python
# -*- coding:utf-8 -*-
# JiraStoryMaker.py
# Created by Henry on 2018/4/9
# Description :
from selenium import webdriver
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selen... | mit | -496,559,804,413,257,400 | 31.78453 | 215 | 0.607281 | false |
sdgathman/pymilter | testsample.py | 1 | 5060 | import unittest
import Milter
import sample
import template
import mime
import zipfile
from Milter.test import TestBase
from Milter.testctx import TestCtx
class TestMilter(TestBase,sample.sampleMilter):
def __init__(self):
TestBase.__init__(self)
sample.sampleMilter.__init__(self)
class BMSMilterTestCase(un... | gpl-2.0 | 4,102,225,718,785,301,500 | 33.189189 | 77 | 0.651383 | false |
StuartGordonReid/Comp-Finance | Optimizers/Solution.py | 1 | 1512 | __author__ = 'Stuart Gordon Reid'
__email__ = 'stuartgordonreid@gmail.com'
__website__ = 'http://www.stuartreid.co.za'
"""
File description
"""
class Solution(object):
solution = []
def __init__(self, solution, problem):
"""
Abstract initialization method for a solution to some optimization ... | lgpl-3.0 | 2,597,317,269,718,818,000 | 25.526316 | 83 | 0.587963 | false |
ModoUnreal/PyWeather | setup.py | 1 | 99122 | '''
_______
| \ \ / @@@;
| \ \ / `#....@
| | \ / ,;@.....;,;
| | \ / @..@........@` PyWeather Setup
| | \ / .............@ version 0.6.3 beta
| / \ / .............@ ... | gpl-3.0 | 5,827,768,068,210,387,000 | 47.070297 | 167 | 0.616019 | false |
lambdaq/pytr | core.py | 1 | 7912 | #!/usr/bin/env python
# coding: utf8
# from gevent import monkey
# monkey.patch_all()
import socket
import os, sys
import random, struct
import logging
from collections import deque, Counter, defaultdict
logger = logging.getLogger(__file__)
logger.addHandler(logging.StreamHandler(sys.stderr))
logger.setLevel(loggin... | bsd-2-clause | -1,979,069,231,076,845,000 | 27.056738 | 98 | 0.523129 | false |
waxkinetic/fabcloudkit | fabcloudkit/build_tools/python_build.py | 1 | 7221 | """
fabcloudkit
:copyright: (c) 2013 by Rick Bohrer.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
# pypi
from fabric.context_managers import cd, prefix, settings
from fabric.operations import run, sudo
from fabric.state import env
# package
from fabcloudkit impo... | bsd-3-clause | 4,460,363,286,732,108,300 | 39.116667 | 113 | 0.62526 | false |
ajstarna/RicochetRobots | Brobot/model.py | 1 | 9336 | import itertools
import random
# Directions
NORTH = 'N'
EAST = 'E'
SOUTH = 'S'
WEST = 'W'
DIRECTIONS = [NORTH, EAST, SOUTH, WEST]
REVERSE = {
NORTH: SOUTH,
EAST: WEST,
SOUTH: NORTH,
WEST: EAST,
}
OFFSET = {
NORTH: -16,
EAST: 1,
SOUTH: 16,
WEST: -1,
}
# Masks
M_NORTH = 0x01
M_EAST =... | bsd-2-clause | -6,690,397,051,170,826,000 | 23.439791 | 76 | 0.487575 | false |
wolfgangmauerer/prosoda | prosoda/interactive.py | 1 | 1232 | # Commands that are useful after adist.yp has been
# run in ipython
# This file is part of prosoda. prosoda 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 h... | gpl-2.0 | -7,668,178,328,738,901,000 | 41.482759 | 81 | 0.729708 | false |
kdebrab/pandas | pandas/core/indexes/category.py | 1 | 30548 | import operator
import numpy as np
from pandas._libs import index as libindex
from pandas import compat
from pandas.compat.numpy import function as nv
from pandas.core.dtypes.generic import ABCCategorical, ABCSeries
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas.core.dtypes.common import (
is_... | bsd-3-clause | -6,292,839,324,184,888,000 | 34.52093 | 79 | 0.57097 | false |
chop-dbhi/varify-data-warehouse | vdw/genes/models.py | 1 | 4984 | from django.db import models
from django.contrib.auth.models import User
from objectset.models import ObjectSet, SetObject
from vdw.literature.models import PubMed
from vdw.genome.models import Chromosome
from vdw.phenotypes.models import Phenotype, PhenotypeThrough
from .managers import GeneManager
class GeneFamily(... | bsd-2-clause | 2,703,393,772,772,176,400 | 33.372414 | 79 | 0.660112 | false |
numericube/twistranet | twistranet/twistapp/forms/fields.py | 1 | 7275 | """
The twistranet Fields
"""
import os
import urlparse
from django import forms
from django.core.validators import URL_VALIDATOR_USER_AGENT
from django.db import models
from django.core.validators import EMPTY_VALUES
from django.utils.encoding import smart_unicode
from django.utils.translation import ugettext as _
fro... | agpl-3.0 | 4,674,477,367,613,389,000 | 37.492063 | 120 | 0.619794 | false |
PhyloStar/PyBayes | params_moves.py | 1 | 1027 | import numpy as np
from scipy.stats import dirichlet
import random, math
dir_alpha = 100.0
scaler_alpha = 1.25
epsilon = 1e-10
def mvDirichlet(pi):
pi_new = dirichlet.rvs(dir_alpha*pi)[0]
#print(pi, pi_new)
hastings_ratio = dirichlet.logpdf(pi, pi_new) - dirichlet.logpdf(pi_new, pi)
return pi_new, has... | gpl-2.0 | -2,911,197,455,575,236,000 | 21.822222 | 80 | 0.589094 | false |
The-WebOps-Club/odia-forum | pybbm_tag/views.py | 1 | 2818 | from django.shortcuts import render
from pybb.models import *
from pybbm_tag.models import Tag
from pybb.views import ForumView,AddPostView,EditPostView,TopicView
def add_tag(request,**kwargs):
# check permissions before calling this function
# in kwargs we expect the LABEL of the tag to add(not object) and the TO... | gpl-2.0 | -5,345,528,752,191,889,000 | 28.061856 | 94 | 0.689851 | false |
orwell-int/agent-server-game-python | setup.py | 1 | 1239 | #!/usr/bin/env python
import setuptools
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
# running python setup.py test (see
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
i... | bsd-3-clause | -2,430,673,641,645,783,000 | 29.769231 | 79 | 0.615819 | false |
tensorflow/examples | tensorflow_examples/lite/model_maker/demo/image_classification_demo_test.py | 1 | 2699 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -3,472,814,965,351,758,300 | 34.513158 | 79 | 0.70804 | false |
MrLucasCardoso/pycards | tests/test_amex.py | 1 | 2451 | import json
import pytest
from pycards import CreditCard
from datetime import datetime
from pycards.settings import FIXTURES_PATH
@pytest.fixture(scope="session")
def data():
with open(FIXTURES_PATH) as data_file:
return json.load(data_file)['AMEX']
def test_init(data):
assert len(data) > 0
card... | mit | 1,644,855,712,332,772,600 | 35.044118 | 126 | 0.669931 | false |
lichengshuang/createvhost | others/webvirtmgr/delServer.py | 1 | 1305 | #!/usr/bin/python
#-*-encoding:utf-8-*-
#author: asher
#date: 20160429 on train D909
# this scripts useed for add server ip to webvirtmgr
# if not , each server must add by website,it's too slow, and very not interesting.
# use this , it's make you feel very happy
import sqlite3
try:
conn = sqlite3.connect('../... | apache-2.0 | -621,791,100,471,414,800 | 33.342105 | 95 | 0.603065 | false |
louisq/staticguru | utility/artifact_archiver.py | 1 | 4495 | """
The MIT License (MIT)
Copyright (c) 2016 Louis-Philippe Querel l_querel@encs.concordia.ca
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... | mit | -329,184,961,511,472,600 | 34.96 | 121 | 0.729032 | false |
MCFlowMace/Wordom | src/setup.py | 1 | 1423 | #! /usr/bin/env python
# System imports
from distutils.core import *
from distutils import sysconfig
# Third-party modules - we depend on numpy
import numpy
# in order to check whether lapack are present ...
import numpy.distutils.system_info as sysinfo
# Obtain the numpy include directory. This works across nu... | gpl-3.0 | 8,072,262,394,954,524,000 | 32.880952 | 96 | 0.575545 | false |
montefra/dodocs | dodocs/__init__.py | 1 | 1068 | """Main function
Copyright (c) 2015 Francesco Montesano
MIT Licence
"""
import os
import sys
from dodocs.cmdline import parse
import dodocs.logger as dlog
__version__ = "0.0.1"
def main(argv=None):
"""
Main code
Parameters
----------
argv : list of strings, optional
command line argum... | mit | 1,274,893,821,913,090,000 | 21.723404 | 73 | 0.549625 | false |
mozilla/kitsune | kitsune/wiki/permissions.py | 1 | 4844 | import logging
from django.conf import settings
log = logging.getLogger("k.wiki")
# Why is this a mixin if it can only be used for the Document model?
# Good question! My only good reason is to keep the permission related
# code organized and contained in one place.
class DocumentPermissionMixin(object):
"""Ad... | bsd-3-clause | 3,488,450,285,851,385,000 | 35.69697 | 99 | 0.652147 | false |
aussendorf/bareos-fd-python-plugins | plugin/BareosFdPluginBaseclass.py | 1 | 5778 | #This file is now part of the main Bareos repo. Do not use this version, use the package bareos-filedaemon-python-plugin instead
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Baseclass for Bareos python plugins
# Functions taken and adapted from bareos-fd.py
# (c) Bareos GmbH & Co. KG, Maik Aussendorf
# AGPL v.3
... | agpl-3.0 | -9,126,865,445,505,169,000 | 40.271429 | 132 | 0.607823 | false |
uclouvain/osis_louvain | manage.py | 1 | 1269 | #!/usr/bin/env python
import os
import sys
import dotenv
if __name__ == "__main__":
if 'test' in sys.argv:
os.environ.setdefault('TESTING', 'True')
dotenv.read_dotenv()
SETTINGS_FILE = os.environ.get('DJANGO_SETTINGS_MODULE', 'backoffice.settings.local')
os.environ.setdefault("DJANGO_SETTINGS_... | agpl-3.0 | 1,813,836,332,511,796,500 | 41.3 | 115 | 0.666667 | false |
yuyichao/pyscical | pyscical/utils.py | 1 | 1930 | # Copyright (C) 2012~2014 by Yichao Yu
# yyc1992@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... | gpl-3.0 | -2,692,633,605,925,007,000 | 40.06383 | 75 | 0.622798 | false |
potzenheimer/meetshaus | src/meetshaus.sitetheme/meetshaus/sitetheme/tests.py | 1 | 1419 | import unittest
#from zope.testing import doctestunit
#from zope.component import testing
from Testing import ZopeTestCase as ztc
from Products.Five import fiveconfigure
from Products.PloneTestCase import PloneTestCase as ptc
from Products.PloneTestCase.layer import PloneSite
ptc.setupPloneSite()
import meetshaus.si... | mit | -5,397,782,054,567,176,000 | 24.8 | 61 | 0.653982 | false |
juanka1331/VAN-applied-to-Nifti-images | final_scripts/tests_over_3dmask_generator.py | 1 | 1589 | import sys
import os
from lib.data_loader import utils_mask3d
sys.path.append(os.path.dirname(os.getcwd()))
from lib.utils import output_utils
from lib.data_loader import mri_atlas
from lib.data_loader import pet_atlas
from lib.data_loader import PET_stack_NORAD
from lib.data_loader import MRI_stack_NORAD
from lib.uti... | gpl-2.0 | 1,206,515,291,192,381,200 | 27.375 | 69 | 0.713027 | false |
bbcf/bbcflib | bein/tests/test_bein.py | 1 | 13588 | import socket
import re
import sys
import random
from unittest2 import TestCase, TestSuite, main, TestLoader, skipIf
from bein import *
from bein.util import touch
M = MiniLIMS("testing_lims")
def hostname_contains(pattern):
hostname = socket.gethostbyaddr(socket.gethostname())[0]
if re.search(pattern, host... | gpl-3.0 | 8,427,574,205,783,375,000 | 35.04244 | 125 | 0.562629 | false |
stevenwudi/Kernelized_Correlation_Filter | CNN_training.py | 1 | 3640 | import numpy as np
from keras.optimizers import SGD
from models.CNN_CIFAR import cnn_cifar_batchnormalisation, cnn_cifar_small, cnn_cifar_nodropout, \
cnn_cifar_small_batchnormalisation
from models.DataLoader import DataLoader
from scripts.progress_bar import printProgress
from time import time, localtime
# this is... | gpl-3.0 | -7,064,727,878,876,511,000 | 39.898876 | 161 | 0.657143 | false |
Cubitect/ASMModSuit | ASMVillageMarker.py | 1 | 5318 | import SRenderLib
from asmutils import *
def create_mod(util):
print '\nSearching for mappings for ASMVillageMarker...'
SRenderLib.setup_lib(util)
lines = util.readj('World')
pos = findOps(lines,0,[['.field','protected',';'],['.field','protected','Z'],['.field','protected',';'],['.field','protected',... | gpl-3.0 | 2,978,141,941,346,353,700 | 52.717172 | 136 | 0.668672 | false |
shadowmint/nwidget | lib/cocos2d-0.5.5/test/test_menu_items.py | 1 | 2268 | # This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
testinfo = "s, q"
tags = "menu items, ToggleMenuItem, MultipleMenuItem, MenuItem, EntryMenuItem, ImageMenuItem, ColorMenuItem"
from pyglet import i... | apache-2.0 | 510,545,519,956,225,660 | 28.648649 | 108 | 0.609788 | false |
jpwhite3/python-whirlwind-tour | examples/lab4.py | 1 | 1539 | from __future__ import print_function
import sys
import re
import glob
import argparse
def eprint(*args, **kwargs):
# Print to STDERR instead of STDOUT
print(*args, file=sys.stderr, **kwargs)
def grep(expression, filepath, ignorecase=False, invert=False):
raw_expression = re.escape(expression)
... | cc0-1.0 | -776,733,871,353,268,600 | 30.744681 | 117 | 0.680962 | false |
ayoubg/gem5-graphics | gem5-gpu/tests/quick/se_gpu/10.backprop/test.py | 1 | 1654 | # Copyright (c) 2006 The Regents of The University of Michigan
# 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 ... | bsd-3-clause | 1,989,801,234,938,213,000 | 52.354839 | 72 | 0.792019 | false |
bcarr092/pyCovertAudio | src/pyCovertAudio/BFSKModulator.py | 1 | 2146 | from pyCovertAudio_lib import *
from BaseModulator import BaseModulator
from SignalFunctions import SignalFunctions
class BFSKModulator(BaseModulator):
def __init__(
self, bitsPerSymbol, sampleRate, samplesPerSymbol,
symbolExpansionFactor, separationIntervals, configuration
):
... | apache-2.0 | -7,536,725,190,212,510,000 | 29.225352 | 79 | 0.55685 | false |
modera/mcloud | mcloud/plugins/monitor.py | 1 | 1101 | import inject
from mcloud.application import ApplicationController
from mcloud.events import EventBus
from mcloud.plugin import IMcloudPlugin
from mcloud.plugins import Plugin
from mcloud.txdocker import IDockerClient
from twisted.internet import reactor
from twisted.python import log
from zope.interface import impleme... | apache-2.0 | -7,506,854,949,518,193,000 | 31.382353 | 82 | 0.722071 | false |
dhhagan/PAM | Python/PAM.py | 1 | 5037 | #PAM.py
import re
import glob, os, time
from numpy import *
from pylab import *
def analyzeFile(fileName,delim):
cols = {}
indexToName = {}
lineNum = 0
goodLines = 0
shortLines = 0
FILE = open(fileName,'r')
for line in FILE:
line = line.strip()
if lineNum < 1:
lineNu... | mit | -279,067,604,541,142,340 | 27.297753 | 97 | 0.561842 | false |
sguazt/prometheus | tools/giws/datatypes/stringDataGiws.py | 1 | 10567 | #!/usr/bin/python -u
# Copyright or Copr. INRIA/Scilab - Sylvestre LEDRU
#
# Sylvestre LEDRU - <sylvestre.ledru@inria.fr> <sylvestre@ledru.info>
#
# This software is a computer program whose purpose is to generate C++ wrapper
# for Java objects/methods.
#
# This software is governed by the CeCILL license under French ... | apache-2.0 | -4,025,532,918,523,767,000 | 39.48659 | 126 | 0.578972 | false |
ypid/series60-remote | pc/lib/log.py | 1 | 1490 | # -*- coding: utf-8 -*-
# Copyright (c) 2008 - 2009 Lukas Hetzenecker <LuHe@gmx.at>
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import logging
class QtStreamHandler(logging.Handler):
def __init__(self, parent, main):
logging.Handler.__init__(self)
self.parent = parent
self.main... | gpl-2.0 | 9,074,983,590,830,688,000 | 25.140351 | 69 | 0.606711 | false |
virt-who/virt-who | virtwho/manager/subscriptionmanager/subscriptionmanager.py | 1 | 16260 | # -*- coding: utf-8 -*-
from __future__ import print_function
"""
Module for communication with subscription-manager, part of virt-who
Copyright (C) 2011 Radek Novacek <rnovacek@redhat.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as pub... | gpl-2.0 | 2,120,471,579,209,106,700 | 40.692308 | 124 | 0.610701 | false |
naiquevin/jinger | jinger/test/test_site.py | 1 | 1107 | # import unittest
import os
from jinger.site import create_empty_site, createdir
from jinger.test import DIR_PLAYGROUND, JingerPlaygroundTest
class SiteTest(JingerPlaygroundTest):
def test_create_dir(self):
mysite = createdir(DIR_PLAYGROUND, 'mysite')
self.assertTrue(os.path.exists(mysite))
... | mit | 2,501,200,863,623,185,000 | 34.709677 | 74 | 0.661247 | false |
kata198/usrsvc | usrsvcmod/Monitoring/ActivityFile.py | 1 | 3670 | '''
Copyright (c) 2016 Tim Savannah All Rights Reserved.
This software is licensed under the terms of the GPLv3.
This may change at my discretion, retroactively, and without notice.
You should have received a copy of this with the source distribution as a file titled, LICENSE.
The most current lic... | lgpl-2.1 | 5,772,787,185,983,751,000 | 40.704545 | 212 | 0.687193 | false |
stefanoteso/musm-adt17 | musm/pc.py | 1 | 4018 | import numpy as np
import gurobipy as gurobi
from .problem import Problem
class PC(Problem):
_ATTRIBUTES = [
('cpu', 37),
('hd', 10),
('manufacturer', 8),
('ram', 10),
('monitor', 8),
('pctype', 3),
]
_ATTR_TO_COSTS = {
'pctype': [50, 0, 80],
... | mit | 4,937,620,061,646,593,000 | 43.153846 | 112 | 0.498507 | false |
hikelee/launcher | launcher/templatetags/helpers.py | 1 | 6201 | """
sentry.templatetags.sentry_helpers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import functools
import os.path
from collections import namedtuple
from datetime... | mit | 335,523,952,679,000,960 | 22.13806 | 100 | 0.687631 | false |
vigneshkarthi/satireguru | satire-bot.py | 1 | 3178 | import twitter
import yaml
import time
import pickle
import re
global match, api, msg, oldID
import random
msg = ''
#RegEx for parsing twitter handle from retrived
keyword = '';
#UTF_CHARS = ur'a-z0-9_\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u00ff'
#TAG_EXP = ur'(^|[^0-9A-Z&/]+)(#|\uff03)([0-9A-Z_]*[A-Z_]+[%s]*)' % UTF_CHARS... | gpl-2.0 | -6,554,156,474,092,308,000 | 35.113636 | 174 | 0.538704 | false |
CLVsol/oehealth | oehealth_dispensation/oehealth_dispensation.py | 1 | 9325 | # -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | agpl-3.0 | -279,910,869,561,610,850 | 49.405405 | 125 | 0.500268 | false |
shadowk29/cusumtools | legacy/minimal_psd.py | 1 | 12009 | ## COPYRIGHT
## Copyright (C) 2015 Kyle Briggs (kbrig035<at>uottawa.ca)
##
## This file is part of cusumtools.
##
## 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 Soft... | gpl-3.0 | 2,097,180,032,333,189,600 | 38.503289 | 126 | 0.615955 | false |
syhpoon/xyzcmd | libxyz/vfs/vfsobj.py | 1 | 8497 | #-*- coding: utf8 -*
#
# Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008
#
# This file is part of XYZCommander.
# XYZCommander is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free Software Foundation, either version 3 of the Licens... | gpl-3.0 | -442,618,524,861,205,300 | 26.146965 | 79 | 0.485348 | false |
317070/kaggle-heart | ira/configurations/gauss_roi10_maxout.py | 1 | 9185 | from collections import namedtuple
import lasagne as nn
from lasagne.layers.dnn import Conv2DDNNLayer, MaxPool2DDNNLayer
import data_iterators
import numpy as np
import theano.tensor as T
from functools import partial
import utils_heart
import nn_heart
from pathfinder import PKL_TRAIN_DATA_PATH, TRAIN_LABELS_PATH, PKL_... | mit | 3,756,646,750,156,495,400 | 39.10917 | 119 | 0.552314 | false |
SafeW3rd/Ciphers | primeSieve.py | 1 | 1139 | # Prime Number Sieve
# http://inventwithpython.com/hacking (BSD Licensed)
import math
def isPrime(num):
# Returns True if num is a prime number, otherwise False.
# Note: Generally, isPrime() is slower than primeSieve().
# all numbers less than 2 are not prime
if num < 2:
return... | mit | -7,295,585,561,268,958,000 | 23.886364 | 72 | 0.587357 | false |
iamaris/CMUAnalysis | Common/generateObjectTree.py | 1 | 11728 | import re
import os
objects = ['Photon', 'Electron', 'Muon', 'Jet', 'Vertex']
susyObjects = {'Photon': 'Photon', 'Electron': 'Electron', 'Muon': 'Muon', 'Jet': 'PFJet', 'Vertex': 'Vertex'}
objectVars = file('ObjectVars.h')
classPat = re.compile('^[ ]*class[ ]+([a-zA-Z0-9]+)Vars[ ]*{')
cTorPat = re.compile('^[ ]*[a-z... | apache-2.0 | 6,525,613,012,333,786,000 | 21.339048 | 125 | 0.548857 | false |
dsimic/taxsims | ss.py | 1 | 1112 | import pandas as pd
import numpy as np
def ss_calc(
contrib_yearly, inv_gwth_rt, num_years, safe_withdrw_rate, start_age=28
):
"""
inv_gwth_rt is infaltion adjusted.
contrib_yearly is in first years dollars
"""
tot_years = max(0, 62 - start_age - num_years) + num_years
df = pd.DataFrame({
... | gpl-2.0 | -1,677,530,639,553,851,100 | 31.705882 | 75 | 0.57554 | false |
pacoqueen/bbinn | PyChart-1.39/demos/linestyles.py | 1 | 1258 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.path.append("..")
#
# Copyright (C) 2000-2005 by Yasushi Saito (yasushi.saito@gmail.com)
#
# Pychart 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 Foundati... | gpl-2.0 | 5,223,164,027,098,408,000 | 26.347826 | 72 | 0.68283 | false |
Psycojoker/wanawana | wanawana/settings.py | 1 | 2687 | """
Django settings for wanawana project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | gpl-3.0 | 4,815,851,771,319,772,000 | 23.87963 | 71 | 0.723483 | false |
TamiaLab/carnetdumaker | apps/bugtracker/tests/test_context_processors.py | 1 | 2920 | """
Tests suite for the context processors of the bug tracker app.
"""
from django.test import SimpleTestCase
from django.http import HttpRequest
from ..context_processors import bugtracker
from ..constants import (STATUS_OPEN,
STATUS_NEED_DETAILS,
STATUS_CONFIRMED,
... | agpl-3.0 | -677,834,467,567,544,200 | 35.962025 | 88 | 0.492123 | false |
codedsk/hubcheck-hubzero-tests | hchztests/tests/test_website_support_need_help.py | 1 | 7124 | import pytest
import sys
import os
import re
import hubcheck
pytestmark = [ pytest.mark.website,
pytest.mark.tickets,
pytest.mark.need_help,
pytest.mark.reboot,
pytest.mark.upgrade,
pytest.mark.prod_safe_upgrade
]
class TestNee... | mit | -6,689,282,357,007,949,000 | 32.28972 | 79 | 0.592504 | false |
jasper-meyer/Platformer | platformer.py | 1 | 3751 | """
platformer.py
Author: Jasper Meyer
Credit: You, the internet, Brendan
Assignment:
Write and submit a program that implements the sandbox platformer game:
https://github.com/HHS-IntroProgramming/Platformer
"""
from ggame import App, RectangleAsset, ImageAsset, Sprite, LineStyle, Color, Frame
SCREEN_WIDTH = 1080
S... | mit | 2,481,779,371,456,941,600 | 17.76 | 82 | 0.546254 | false |
Ophiuchus1312/enigma2-master | lib/python/Screens/TimerEdit.py | 1 | 20176 | from Components.ActionMap import ActionMap
from Components.Button import Button
from Components.Label import Label
from Components.config import config
from Components.MenuList import MenuList
from Components.TimerList import TimerList
from Components.TimerSanityCheck import TimerSanityCheck
from Components.UsageConfig... | gpl-2.0 | -1,313,426,634,689,652,200 | 31.753247 | 179 | 0.6875 | false |
polaris-gslb/polaris-core | tests/test-polaris-pdns.py | 2 | 1937 | #!/usr/bin/env python3
import subprocess
import sys
import time
import json
POLARIS_PDNS_FILE = '/opt/polaris/bin/polaris-pdns'
def pretty_json(s):
d = json.loads(s)
return json.dumps(d, indent=4, separators=(',', ': '))
class TestPolarisPDNS:
def __init__(self, polaris_pdns_file):
sel... | bsd-3-clause | 3,387,221,317,398,084,600 | 24.486842 | 62 | 0.497161 | false |
daniel20162016/my-first | read_xml_all/calcul_matrix_compare_je_good_192matrix.py | 1 | 6357 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 31 15:45:22 2016
@author: wang
"""
#from matplotlib import pylab as plt
#from numpy import fft, fromstring, int16, linspace
#import wave
from read_wav_xml_good_1 import*
from matrix_24_2 import*
from max_matrix_norm import*
import numpy as np
# open a wave file
filename... | mit | 1,603,875,107,597,510,700 | 38.484472 | 147 | 0.46028 | false |
wholland/env | env.py | 1 | 6119 | #!/usr/bin/python
import argparse
import json
import shutil
import os
def copy_file(src, dest, backup):
success = True
if not backup is None:
(backup_folder, backup_file) = os.path.split(backup)
print("Creating backup file for " + dest + " at " + backup)
try:
if not os.path.exists(backup_folder):
os.ma... | mit | 4,431,598,936,096,710,000 | 34.575581 | 110 | 0.648962 | false |
jailuthra/misc | python/quicksort.py | 1 | 1066 | import sys
import random
comparisons = 0
def main():
global comparisons
with open(sys.argv[1], 'r') as f:
arr = [int(x) for x in f.read().split()]
quicksort(arr, 0, len(arr)-1)
# print(arr)
print(comparisons)
def getPivot(arr, l, r):
first = arr[l]
mid = arr[(l+r)//2]
last = a... | mit | 7,158,383,021,174,650,000 | 21.208333 | 54 | 0.5 | false |
nens/threedi-qgis-plugin | tests/test_geo_utils.py | 1 | 1446 | """
Test geo utils.
"""
from qgis.core import QgsCoordinateTransform
from ThreeDiToolbox.tests.utilities import ensure_qgis_app_is_initialized
from ThreeDiToolbox.utils.geo_utils import get_coord_transformation_instance
import pytest
@pytest.fixture
def rdnew_to_wgs84():
ensure_qgis_app_is_initialized()
src... | gpl-3.0 | -167,221,051,593,308,580 | 31.863636 | 76 | 0.744813 | false |
mistercrunch/panoramix | superset/views/base_api.py | 2 | 21953 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 3,086,351,560,622,024,000 | 36.398637 | 88 | 0.605475 | false |
sippy/voiptests | test_cases/reinv_brkn2.py | 1 | 2000 | # Copyright (c) 2016 Sippy Software, Inc. All rights reserved.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
... | bsd-2-clause | 1,664,678,858,462,998,500 | 43.444444 | 82 | 0.74 | false |
pycroscopy/pycroscopy | tests/io/test_hdf_writer.py | 1 | 36224 | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 3 15:07:16 2017
@author: Suhas Somnath
"""
from __future__ import division, print_function, unicode_literals, absolute_import
import unittest
import os
import h5py
import numpy as np
import sys
sys.path.append("../../../pycroscopy/")
from pycroscopy.io.virtual_data imp... | mit | 1,623,074,380,360,890,400 | 39.026519 | 124 | 0.552203 | false |
csmart/jockey-yum | setup.py | 1 | 1204 | #!/usr/bin/env python
# (c) 2007 Canonical Ltd.
# Author: Martin Pitt <martin.pitt@ubuntu.com>
# This script needs python-distutils-extra, an extension to the standard
# distutils which provides i18n, icon support, etc.
# https://launchpad.net/python-distutils-extra
from glob import glob
from distutils.version impor... | gpl-2.0 | 4,649,148,657,068,648,000 | 31.540541 | 98 | 0.680233 | false |
gersolar/stations | stations_configuration/settings.py | 1 | 5198 | # Only Celery settings for stations project.
#import djcelery
#djcelery.setup_loader()
#BROKER_TRANSPORT = 'amqplib'
#BROKER_URL = 'django://'
##CELERY_RESULT_BACKEND = 'database'
#CELERY_DEFAULT_QUEUE = "default"
#CELERY_QUEUES = {
# "default": {
# "binding_key": "task.#",
# },
# "mailer": {
# "binding_key": "t... | mit | 4,052,354,373,346,144,000 | 28.039106 | 85 | 0.729127 | false |
lizardsystem/lizard-measure | lizard_measure/migrations/0010_auto__del_score__del_measuringrod__del_field_measurestatusmoment_is_pl.py | 1 | 23606 | # 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):
# Deleting model 'Score'
db.delete_table('lizard_measure_score')
# Deleting model 'MeasuringRod'
... | gpl-3.0 | 1,789,020,140,202,263,800 | 77.949833 | 219 | 0.57604 | false |
konrad/kufpybio | kufpybiotools/generate_igr_gff.py | 1 | 1881 | #!/usr/bin/env python
__description__ = ""
__author__ = "Konrad Foerstner <konrad@foerstner.org>"
__copyright__ = "2013 by Konrad Foerstner <konrad@foerstner.org>"
__license__ = "ISC license"
__email__ = "konrad@foerstner.org"
__version__ = ""
import argparse
import csv
import sys
sys.path.append(".")
from kufpybio.g... | isc | -7,492,041,156,369,239,000 | 30.35 | 70 | 0.61563 | false |
jakobmoss/tsa | utils/makeweights.py | 1 | 2350 | # -*- coding: utf-8 -*-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Time Series Analysis -- Generate statistical weigts from scatter
#
# Author: Jakob Rørsted Mosumgaard
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##############################... | mit | 56,344,320,398,218,080 | 28.3625 | 79 | 0.43593 | false |
erstis-go-botting/sexy-bot | misc.py | 1 | 1888 | import os
#checks if settings.ini should be generated. if not given universe, username and password it will generate a settings.ini with the default account
#This settings_generator will only work for universe 82 if the flag argument is given als True(to make sure that universe 82 is intended)
def settings_generator(... | mit | 7,923,967,946,050,228,000 | 50.027027 | 146 | 0.678496 | false |
ActiveState/code | recipes/Python/275366_Email_address_leech/recipe-275366.py | 1 | 1624 | import re
def test():
text = \
''' You can contact us at myname@server.site.com
or at yourname AT server DOT site DOT com.
Also at o u r n a m e @ s e r v e r dot s i t e dot c o m
and t.h.e.i.r.n.a.m.e at server dot s/i/t/e DOT COM.
'''
for email in emailLee... | mit | 6,945,036,452,348,633,000 | 35.088889 | 80 | 0.513547 | false |
mosdef-hub/foyer | foyer/tests/test_forcefield_parameters.py | 1 | 10029 | import numpy as np
import pytest
from foyer import Forcefield, forcefields
from foyer.exceptions import MissingForceError, MissingParametersError
from foyer.forcefield import get_available_forcefield_loaders
from foyer.tests.base_test import BaseTest
from foyer.tests.utils import get_fn
@pytest.mark.skipif(
cond... | mit | 3,671,707,264,193,672,000 | 33.582759 | 79 | 0.5172 | false |
ecell/ecell3 | ecell/pyecell/ecell/analysis/PathwayProxy.py | 1 | 13263 | #!/usr/bin/env python
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# This file is part of the E-Cell System
#
# Copyright (C) 1996-2016 Keio University
# Copyright (C) 2008-2016 RIKEN
# Copyright (C) 2005-2009 The Molecular Sciences Institute
#
#:::::::::::::::::... | lgpl-3.0 | 1,427,795,092,905,206,500 | 30.133803 | 121 | 0.586594 | false |
Syralist/pixels_clock | clock.py | 1 | 3227 | # -*- coding: utf-8 -*-
import pygame, led, sys, os, random, csv
import smbus
from pygame.locals import *
from led.PixelEventHandler import *
from time import gmtime, strftime
""" A very simple arcade shooter demo :)
"""
random.seed()
BLACK = pygame.Color(0,0,0)
WHITE = pygame.Color(255, 255, 255)
RED = pygame.Color... | gpl-3.0 | 2,032,024,441,789,479,700 | 26.117647 | 89 | 0.578866 | false |
maverickYQB/mqtt_zway | test/test_main_class.py | 1 | 2397 | #!/usr/bin/env python
'''
Created on Mars 20 2016
@author: popotvin
'''
import mqtt_zway_test
import mqtt_zway
import paho.mqtt.client as mqtt
import time
import traceback
date_time = mqtt_zway_test.date_time
# Main variables
mqtt_old_payload = []
mqtt_new_payload = []
payload = {}
publish_string = ""
# MQTT confi... | gpl-3.0 | 1,230,353,802,321,709 | 28.9625 | 91 | 0.619942 | false |
tylerclair/py3canvas | py3canvas/apis/modules.py | 1 | 54047 | """Modules API Version 1.0.
This API client was generated using a template. Make sure this code is valid before using it.
"""
import logging
from datetime import date, datetime
from .base import BaseCanvasAPI
from .base import BaseModel
class ModulesAPI(BaseCanvasAPI):
"""Modules API Version 1.0."""
def __i... | mit | 998,213,574,905,809,700 | 37.412935 | 354 | 0.624493 | false |
shubhamVerma/code-eval | Category - Easy/sumdigitsCodeEval.py | 1 | 1271 | '''
sumdigitsCodeEval.py - Solution to Problem Lowercase (Category - Easy)
Copyright (C) 2013, Shubham Verma
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 Lice... | gpl-3.0 | 5,175,259,314,744,266,000 | 22.555556 | 83 | 0.707317 | false |
kajgan/stbgui | lib/python/Components/Converter/ClientsStreaming.py | 1 | 3432 | from Converter import Converter
from Poll import Poll
from Components.Element import cached
from Components.Sources.StreamService import StreamServiceList
from enigma import eStreamServer
from ServiceReference import ServiceReference
import socket
class ClientsStreaming(Converter, Poll, object):
UNKNOWN = -1
REF = 0... | gpl-2.0 | 5,481,053,068,278,078,000 | 23.347518 | 104 | 0.638986 | false |
viaict/viaduct | app/forms/pimpy.py | 1 | 1268 | import datetime
from flask_babel import _
from flask_login import current_user
from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, DateTimeField, SelectField
from wtforms.ext.sqlalchemy.fields import QuerySelectField
from wtforms.validators import InputRequired, Optional
from app import co... | mit | 2,035,201,200,967,457,500 | 36.294118 | 78 | 0.698738 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.