repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JoeGlancy/micropython | examples/pomodoro.py | 3 | 1456 | """
A simple pomodoro timer.
It times a 25 minute work session then 5 minutes rest.
Press the reset button to restart the timer.
"""
from microbit import *
# Tweak CLOCK_ADJUST to make your system clock more accurate.
# My clock is too fast by 4 seconds every minute so I use 4/60.
# If your clock is too slow by 3 sec... | mit | -3,763,041,096,595,868,000 | 20.731343 | 64 | 0.635989 | false | 3.172113 | false | false | false |
vrutkovs/behave | behave/runner.py | 1 | 19829 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import contextlib
import os.path
import StringIO
import sys
import traceback
import warnings
import weakref
from behave import matchers
from behave.step_registry import setup_step_decorators
from behave.formatter import formatters
from behave.configuration... | bsd-2-clause | -7,974,072,771,693,652,000 | 34.220249 | 80 | 0.577488 | false | 4.320985 | true | false | false |
gcblue/gcblue | scripts/GroupCommands.py | 1 | 7973 |
from UnitCommands import *
from Landing import *
deg_to_rad = 0.01745329252
def AddWaypointOrderGroup(GI, lon, lat):
unit_count = GI.GetUnitCount()
for n in range(0, unit_count):
UnitInfo = GI.GetPlatformInterface(n)
AddWaypointOrder(UnitInfo, lon, lat)
def AddPatrolOrderGroup(GI):
... | bsd-3-clause | -2,618,796,694,849,269,000 | 27.887681 | 97 | 0.621849 | false | 3.108382 | false | false | false |
mojolab/LivingData | lib/livdatcube.py | 1 | 13850 | import os,sys,pandas
sys.path.append("/opt/SoMA/python/lib")
from libsoma import *
import pygsheets
from bs4 import BeautifulSoup
from tabulate import tabulate
def get_worksheet_names(ssheet):
sheetnames=[]
for ws in ssheet.worksheets():
sheetnames.append(ws.title)
return sheetnames
def get_as_dict(df):
i... | apache-2.0 | 1,013,403,885,030,380,800 | 39.976331 | 155 | 0.716823 | false | 3.014146 | false | false | false |
MisterPup/Ceilometer-Juno-Extension | ceilometer/utils.py | 1 | 7907 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance w... | apache-2.0 | -7,708,742,513,035,835,000 | 31.945833 | 79 | 0.618819 | false | 3.98137 | false | false | false |
NieMinMax/Kitte | kitte/data/import_data.py | 1 | 2671 | # -*- coding: utf-8 -*-
import logging
import multiprocessing
import psycopg2
import pyramid.threadlocal
from sqlalchemy.sql import text
from ..models.base import DBSession
from ..models.order_line import SOrderLine
log = logging.getLogger(__name__)
Is_Importing = False
def _get_origin_connection(host, port, dbnam... | agpl-3.0 | -8,947,348,869,443,384,000 | 28.677778 | 105 | 0.601647 | false | 3.486945 | false | false | false |
mewturn/Python | numberGuesser.py | 1 | 1056 | import random
import time
def go(lower_bound, upper_bound, bots):
iterations = 1
target = random.randint(lower_bound, upper_bound)
print(f"Target number: {'{:,}'.format(target)}")
while True:
answers = [random.randint(lower_bound, upper_bound)
for _ in range(bots)]
... | mit | 94,826,439,055,472,350 | 27.540541 | 124 | 0.536932 | false | 4.093023 | false | false | false |
lrq3000/pyFileFixity | pyFileFixity/easy_profiler.py | 1 | 8064 | #!/usr/bin/env python
#
# Easy Profiler
# Copyright (C) 2015 Larroque Stephen
#
# Licensed under the MIT 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 without restriction, i... | mit | 6,543,523,369,729,949,000 | 50.363057 | 342 | 0.65625 | false | 4.268925 | false | false | false |
nate97/TiKi | audiofile.py | 1 | 1951 | from mutagen.easyid3 import EasyID3
from mutagen.mp4 import MP4, MP4Tags, error, delete
from mutagen.mp3 import MP3
import mutagen
# We're treating every audio file as an individual object
class TiKiFile:
def __init__(self):
print ('Opened music file')
### Object globals ###
self.fileName ... | gpl-3.0 | 6,111,818,165,028,804,000 | 20.921348 | 62 | 0.548437 | false | 4.505774 | false | false | false |
cdegroc/scikit-learn | sklearn/pls.py | 2 | 27778 | """
The :mod:`sklearn.pls` module implements Partial Least Squares (PLS).
"""
# Author: Edouard Duchesnay <edouard.duchesnay@cea.fr>
# License: BSD Style.
from .base import BaseEstimator
from .utils import as_float_array
import warnings
import numpy as np
from scipy import linalg
def _nipals_twoblocks_inner_loop(X... | bsd-3-clause | -8,451,550,469,794,930,000 | 33.041667 | 79 | 0.573187 | false | 3.480516 | false | false | false |
xjlin0/cs246 | w2015/hw2/q1_recommendation_system_numpy_scipy.py | 1 | 2345 | # Under the unix shell, type:
# python q1_recommendation_system_numpy_scipy.py
# from scipy.spatial import distance
from scipy.spatial import distance as dt
from collections import Counter
import numpy as np
import time
start_time = time.time()
def center_vector(vector): #[7, 6, 0, 2] => [2, 1, 0, -3] (center only o... | mit | 3,351,689,810,764,469,000 | 43.264151 | 147 | 0.661407 | false | 2.74269 | false | false | false |
probml/pyprobml | scripts/mean_shift_opt.py | 1 | 2297 | # mean shift to find global modes
import numpy as np # original numpy
#import jax.numpy as jnp
#from jax import vmap
import numpy as np
from functools import partial
from scipy.stats import norm, uniform
import matplotlib.pyplot as plt
import os
figdir = "../figures"
def save_fig(fname): plt.savefig(os.path.join(figd... | mit | -2,644,600,856,373,294,600 | 23.967391 | 90 | 0.621245 | false | 2.572228 | false | false | false |
microelly2/cadquery-freecad-module | CadQuery/Libs/pyqode/core/modes/occurences.py | 1 | 6018 | """
This module contains the occurrences highlighter mode.
"""
from pyqode.qt import QtGui
from pyqode.core.api import Mode, DelayJobRunner, TextHelper, TextDecoration
from pyqode.core.backend import NotRunning
from pyqode.core.backend.workers import findall
class OccurrencesHighlighterMode(Mode):
""" Highlights ... | lgpl-3.0 | 6,628,412,959,711,078,000 | 34.609467 | 78 | 0.563809 | false | 4.654292 | false | false | false |
ginoledesma/curb_energy | src/curb_energy/schema.py | 1 | 9093 | """
The schema module helps convert the Curb API REST resources into
Python-friendly objects.
"""
import logging
from marshmallow import Schema
from marshmallow import fields
from marshmallow import validate
from marshmallow import pre_dump
from marshmallow import pre_load
from marshmallow import post_load
from curb_e... | apache-2.0 | 8,228,090,801,099,121,000 | 26.892638 | 80 | 0.60772 | false | 3.880922 | false | false | false |
mogoweb/chromium-crosswalk | chrome/common/extensions/docs/server2/sidenav_data_source_test.py | 1 | 3878 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import unittest
from compiled_file_system import CompiledFileSystem
from object_store_creator import ObjectStoreCreator
fr... | bsd-3-clause | -1,539,301,704,827,809,800 | 23.858974 | 78 | 0.55802 | false | 3.337349 | true | false | false |
maas/maas | src/maasserver/api/resourcepools.py | 1 | 6726 | # Copyright 2018 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""API handlers: `ResourcePool`."""
from piston3.utils import rc
from maasserver.api.support import (
AnonymousOperationsHandler,
ModelCollectionOperationsHandler,
M... | agpl-3.0 | -8,521,588,566,141,920,000 | 34.967914 | 79 | 0.616711 | false | 4.359041 | false | false | false |
ODM2/ODM2ControlledVocabularies | src/odm2cvs/cvinterface/views/base_views.py | 1 | 14543 | import json
from os import linesep
from urllib2 import Request, urlopen
from string import capwords
from django.conf import settings
from django.core.mail import send_mail
from django.contrib.auth.decorators import login_required
from django.contrib.messages.views import SuccessMessageMixin
from django.utils import ti... | bsd-3-clause | -1,116,590,425,199,225,600 | 44.024768 | 178 | 0.64739 | false | 4.215362 | false | false | false |
jcrocholl/nxdom | tools/prefixes_demo.py | 1 | 1648 | #!/usr/bin/env python
# Setup project environment in the parent directory.
import os
import sys
sys.path[0] = os.path.dirname(sys.path[0])
from common.appenginepatch.aecmd import setup_env
setup_env()
import datetime
from google.appengine.ext import db
from google.appengine.ext.remote_api import remote_api_stub
from... | mit | -8,164,987,333,584,045,000 | 30.692308 | 79 | 0.662015 | false | 3.933174 | false | false | false |
wbtuomela/mezzanine | mezzanine/forms/forms.py | 1 | 18240 | from __future__ import unicode_literals
from future.builtins import int, range, str
from datetime import date, datetime
from os.path import join, split
from uuid import uuid4
from django import forms
from django.forms.extras import SelectDateWidget
from django.core.files.storage import FileSystemStorage
from django.c... | bsd-2-clause | -4,238,282,606,167,028,700 | 41.816901 | 79 | 0.565899 | false | 4.103487 | false | false | false |
bstinsonmhk/fas | fas/safasprovider.py | 1 | 18419 | # -*- coding: utf-8 -*-
#
# Copyright © 2007-2014 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. This program is distributed in the hope that it
# will be useful, bu... | gpl-2.0 | -2,547,027,969,035,325,400 | 36.359026 | 100 | 0.61315 | false | 4.14633 | true | false | false |
kedz/cuttsum | trec2014/python/cuttsum/submissions.py | 1 | 4003 | import os
import gzip
from pkg_resources import resource_filename
import pandas as pd
from datetime import datetime
class Update(object):
def __init__(self, system_id, run_id, query_id, document_id, sentence_id,
update_datetime, confidence):
self.system_id = system_id
self.run_id =... | apache-2.0 | 3,364,004,241,436,947,500 | 38.245098 | 86 | 0.564577 | false | 3.249188 | false | false | false |
bretttegart/treadmill | lib/python/treadmill/websocket/client.py | 1 | 3245 | """Websocket client implementation.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import logging
import socket
import time
import websocket as ws_client
from treadmill import context
_LOGGER = lo... | apache-2.0 | 8,415,041,692,322,066,000 | 28.234234 | 78 | 0.564869 | false | 4.402985 | false | false | false |
leveille/blog.v1 | utils/update_js.py | 1 | 1645 | # borrowed heavily from http://bitbucket.org/bbangert/kai/src/
from datetime import datetime
from jsmin import jsmin
import os
import sys
if len(sys.argv) < 2:
print "Must have at least 1 argument:"
print "\tpython update_js.py CONFIG.INI"
sys.exit(0)
here_dir = os.path.dirname(os.path.abspath(__file__))... | mit | 2,343,272,612,662,612,000 | 26.416667 | 66 | 0.642553 | false | 2.816781 | false | false | false |
rgerkin/python-neo | neo/test/iotest/test_nwbio.py | 1 | 3755 | #
"""
Tests of neo.io.nwbio
"""
from __future__ import unicode_literals, print_function, division, absolute_import
import unittest
from neo.io.nwbio import NWBIO
from neo.test.iotest.common_io_test import BaseTestIO
from neo.core import AnalogSignal, SpikeTrain, Event, Epoch, IrregularlySampledSignal, Segment, Unit, B... | bsd-3-clause | 4,586,233,534,340,101,000 | 43.188235 | 121 | 0.634621 | false | 2.849014 | true | false | false |
georgid/htkModelParser | htkparser/htk_lexer.py | 1 | 1559 | # This file contains a lexer HTK model files in ASCII format.
#
# @author W.J. Maaskant
from ply import *
# Exception class.
class HtkScanningError(Exception):
pass
# List of token names.
tags = (
'BEGINHMM',
'ENDHMM',
'MEAN',
'MIXTURE',
'NUMMIXES',
'NUMSTATES',
'STATE',
'TRANSP',
'VARIANCE',
'OTHER_TAG... | bsd-3-clause | 9,034,970,010,462,440,000 | 14.59 | 153 | 0.57152 | false | 2.123978 | false | false | false |
SatoshiNakamotoGeoscripting/SatoshiNakamotoGeoscripting | Final_assignment/tweetAnalysisWrapper.py | 1 | 7685 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 1 10:51:48 2017
@author: Satoshi Nakamoto
names: Alex Levering and Hector Muro
Non-standard dependencies:
* Twython
* NLTK
* Folium
* Geocoder
* psycopg2
TO DO BEFOREHAND:
The following steps are non-automatable and have to be performed manually.
* Have the NLTK vader ... | mit | -7,867,473,114,705,040,000 | 50.583893 | 156 | 0.488744 | false | 5.106312 | false | false | false |
hzlf/openbroadcast.ch | app/onair/api/views.py | 1 | 1776 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import datetime
from django.utils import timezone
from datetime import datetime
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from rest_framework import mixins
from ..models import Sc... | gpl-3.0 | -6,018,978,163,852,398,000 | 27.645161 | 97 | 0.609797 | false | 4.248804 | false | false | false |
nomad-vino/SPSE-1 | Module 5/x5_7.py | 1 | 1696 | #!/usr/bin/python
print " __ "
print " |__|____ ___ __ "
print " | \__ \\\\ \/ / "
print " | |/ __ \\\\ / "
print " /\__| (____ /\_/ "
print " \______| \/ "
p... | gpl-3.0 | -5,561,623,925,449,538,000 | 28.754386 | 86 | 0.527123 | false | 3.351779 | false | false | false |
dmpetrov/dataversioncontrol | fastentrypoints.py | 1 | 4161 | # noqa: D300,D400
# Copyright (c) 2016, Aaron Christianson
# 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... | apache-2.0 | -3,801,276,357,273,432,600 | 32.829268 | 79 | 0.63206 | false | 3.966635 | false | false | false |
adamdoupe/enemy-of-the-state | jcc/jcc/__main__.py | 2 | 3808 |
import sys
from jcc import cpp
if len(sys.argv) == 1 or '--help' in sys.argv:
help = '''
JCC - C++/Python Java Native Interface Code Generator
Usage: python -m jcc.__main__ [options] [actions]
Input options:
--jar JARFILE - make JCC wrap all public classes found in
... | gpl-2.0 | 325,225,610,985,346,600 | 45.439024 | 80 | 0.559611 | false | 5.518841 | false | false | false |
mgorny/PyGithub | github/NamedUser.py | 1 | 29330 | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Steve English <steve.english@navetas.com> #
# Copyright 2012 Vincent Jacques <vincent@vincent-ja... | lgpl-3.0 | 9,082,512,396,611,207,000 | 36.032828 | 142 | 0.584726 | false | 4.279253 | false | false | false |
fiduswriter/fiduswriter | fiduswriter/user_template_manager/views.py | 1 | 6141 | import json
from django.http import JsonResponse
from django.contrib.auth.decorators import login_required
from django.db.models import Q
from django.views.decorators.http import require_POST
from base.decorators import ajax_required
from document.models import DocumentTemplate, FW_DOCUMENT_VERSION
from document.help... | agpl-3.0 | 89,205,573,798,540,260 | 27.562791 | 79 | 0.608696 | false | 4.021611 | false | false | false |
hplustree/trove | trove/quota/quota.py | 2 | 13400 | # Copyright 2011 OpenStack Foundation
# 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 requ... | apache-2.0 | 3,336,046,945,717,087,700 | 34.638298 | 79 | 0.596866 | false | 4.723299 | false | false | false |
linhaoran/smzdm_monitor | test.py | 1 | 1847 | # -*- coding: utf-8 -*-
import webapp2
import SMZDMscaner as sz
import FetchRSS as fr
import urllib2 as ureq
import Keywords
import json
import smtp2
# rss_url = 'http://feed.smzdm.com' # 优惠精选
# opener = ureq.build_opener()
# opener.addheaders = [('User-agent', 'Mozilla/5.0 (Macintosh Intel Mac OS X 10_10_2) \
# Appl... | lgpl-3.0 | -8,694,691,115,579,649,000 | 33.596154 | 93 | 0.626459 | false | 2.599711 | false | false | false |
fizz-ml/hDQN | agent.py | 1 | 1738 | class Agent:
"""The generic interface for an agent.
Attributes:
auxillary_rewards: The list of enabled
auxillary rewards for this agent
"""
def train():
"""Trains the agent for a bit.
Args:
None
Returns:
None
... | mit | -6,745,189,679,798,517,000 | 28.457627 | 68 | 0.521864 | false | 5.41433 | false | false | false |
ryu22e/django_template | project_name/settings/production.py | 1 | 2937 | from .base import * # NOQA
import dj_database_url
from os import environ
from urllib.parse import urlparse
from django.conf import global_settings
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
# SECURITY WARNING: keep the secret key used in production secret!
# https://docs.djangopr... | mit | -246,442,079,917,594,340 | 38.106667 | 85 | 0.735765 | false | 3.181128 | false | false | false |
hiroyuki-kasuga/street-movie | src/main/street_movie/api/forms.py | 1 | 1639 | # coding: utf-8
import logging
from django import forms
logger = logging.getLogger(__name__)
class CreateMovieForm(forms.Form):
latLng = forms.CharField(
label=u'緯度経度',
widget=forms.HiddenInput(attrs={'class': 'form-control'}),
)
start_lon = forms.DecimalField(
label=u'経度(スタート)... | mit | 2,812,089,011,081,242,600 | 20.549296 | 66 | 0.568999 | false | 3.225738 | false | false | false |
romain-intel/bcc | src/python/bcc/libbcc.py | 1 | 10520 | # Copyright 2015 PLUMgrid
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwar... | apache-2.0 | -3,391,977,972,698,822,700 | 40.746032 | 110 | 0.675665 | false | 2.384406 | false | false | false |
cloudbase/nova | nova/virt/libvirt/storage/rbd_utils.py | 1 | 17295 | # Copyright 2012 Grid Dynamics
# Copyright 2013 Inktank Storage, Inc.
# Copyright 2014 Mirantis, 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.or... | apache-2.0 | -828,969,302,011,707,300 | 37.518931 | 79 | 0.553628 | false | 4.164459 | false | false | false |
Turbo87/welt2000 | fabfile.py | 1 | 1574 | from fabric.api import env, task, run, local, require, cd
from gitric.api import ( # noqa
git_seed, git_reset, git_init, git_head_rev, allow_dirty, force_push
)
from fabvenv import virtualenv, make_virtualenv
env.use_ssh_config = True
@task
def prod():
'''an example production deployment'''
env.hosts = ... | mit | 5,199,323,885,435,480,000 | 20.27027 | 72 | 0.644854 | false | 3.377682 | false | false | false |
alexanderfefelov/nav | python/nav/mibs/itw_mib.py | 1 | 46625 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2011 UNINETT AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This progr... | gpl-2.0 | 6,104,478,532,853,801,000 | 53.724178 | 79 | 0.502241 | false | 4.048715 | false | false | false |
yaybu/touchdown | touchdown/template.py | 1 | 2114 | # Copyright 2015 Isotoma Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | 4,662,175,595,228,601,000 | 26.454545 | 78 | 0.687796 | false | 4.136986 | false | false | false |
DrSkippy/Gnacs | acscsv/test_foursquare_acs.py | 1 | 16013 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__="Josh Montague"
__license__="MIT License"
import sys
import unittest
from StringIO import StringIO
from foursquare_acs import *
# valid activity from source (eg from data/)
VALID_ACTIVITY = """{"id":"tag:gnip.foursquare.com:2013:checkin/53910e5c498eb98e8cadf5... | bsd-2-clause | -705,703,362,993,496,000 | 55.5053 | 957 | 0.627415 | false | 3.661782 | true | false | false |
franramirez688/Taric-Challange | taric_challange/core/test/books_manager_test.py | 1 | 1939 | import unittest
from taric_challange.core.books_manager import BooksManager
from taric_challange.core.models.book import Book
from mock import Mock
import mock
data = {"author_data" : [
{
"name": "Richards, Rowland",
"id": "richards_rowland"
}],
"awards_text": "",
... | mit | -1,006,073,948,080,156,700 | 34.254545 | 68 | 0.600309 | false | 3.468694 | false | false | false |
plumgrid/plumgrid-nova | nova/db/api.py | 1 | 61366 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (t... | apache-2.0 | -3,514,543,406,113,517,000 | 31.921674 | 79 | 0.663299 | false | 3.847398 | false | false | false |
tpltnt/SimpleCV | SimpleCV/Shell/Tutorial.py | 1 | 14040 | #!/usr/bin/python
# A Basic SimpleCV interactive shell tutorial
#load required libraries
from __future__ import print_function
from SimpleCV import *
from subprocess import call
from code import InteractiveInterpreter
import platform
lb = "\n" #linebreak
tb = "\t" #tab
tutorial_interpreter = InteractiveInterpreter(... | bsd-3-clause | -6,470,285,811,167,258,000 | 29.128755 | 86 | 0.618376 | false | 3.790497 | false | false | false |
kamijawa/libmpsse | src/examples/spiflash.py | 1 | 6528 | #!/usr/bin/env python
from mpsse import *
from time import sleep
class SPIFlash(object):
WCMD = "\x02" # Standard SPI flash write command (0x02)
RCMD = "\x03" # Standard SPI flash read command (0x03)
WECMD = "\x06" # Standard SPI flash write enable command (0x06)
CECMD = "\xc7" # Standard SPI flash chip eras... | mit | 3,797,314,655,123,427,000 | 26.897436 | 160 | 0.557751 | false | 3.066228 | false | false | false |
sharad/calibre | src/calibre/gui2/languages.py | 1 | 3098 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2011, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from calibre.g... | gpl-3.0 | -100,765,332,639,090,880 | 33.043956 | 85 | 0.550678 | false | 3.623392 | false | false | false |
Debian/britney2 | tests/mock_swift.py | 1 | 5898 | # Mock a Swift server with autopkgtest results
# Author: Martin Pitt <martin.pitt@ubuntu.com>
import os
import tarfile
import io
import sys
import socket
import time
import tempfile
import json
try:
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
except I... | gpl-2.0 | 737,054,188,517,968,600 | 33.694118 | 117 | 0.573923 | false | 3.839844 | true | false | false |
catapult-project/catapult | telemetry/third_party/websocket-client/examples/echoapp_client.py | 3 | 1175 | from __future__ import print_function
from __future__ import absolute_import
import websocket
try:
import six.moves._thread
except ImportError: # TODO use Threading instead of _thread in python3
import _thread as thread
import time
import sys
def on_message(ws, message):
print(message)
def on_error(ws,... | bsd-3-clause | -5,595,455,099,684,010,000 | 22.5 | 71 | 0.548936 | false | 3.742038 | false | false | false |
thepug/Speeqe | speeqeweb/httpbclient.py | 1 | 8908 | #
# Copyright (c) 2005 - 2008 Nathan Zorn, OGG, LLC
# See LICENSE.txt for details
#
import sys, os
import httplib, urllib
import random, binascii, sha
from punjab.httpb import HttpbParse
from twisted.words.xish import domish
from twisted.words.protocols.jabber import jid
TLS_XMLNS = 'urn:ietf:params:xml:ns:xmpp-tls'
... | agpl-3.0 | 6,041,719,072,620,019,000 | 35.962656 | 113 | 0.446453 | false | 4.147114 | false | false | false |
stoeckli/iMatrixSpray | octoprint/server.py | 1 | 40327 | # coding=utf-8
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
from werkzeug.utils import secure_filename
import tornadio2
from flask import Flask, request, render_template, jsonify, send_from_directory, url_for, current_app, session, ... | agpl-3.0 | -4,402,286,667,742,055,000 | 31.441673 | 163 | 0.691606 | false | 3.092882 | false | false | false |
foolwealth/django_multi_deployable_template | proj/site_a/project/settings.py | 1 | 2651 | """
Django settings for site_a project.
Generated by 'django-admin startproject' using Django 1.8.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths... | mit | 6,758,408,280,581,779,000 | 24.990196 | 71 | 0.692192 | false | 3.460836 | false | false | false |
genestack/python-client | genestack_client/scripts/genestack_application_manager.py | 1 | 29766 | #!python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import map
from builtins i... | mit | 8,163,076,377,088,212,000 | 33.692308 | 100 | 0.580293 | false | 4.148571 | false | false | false |
exekias/droplet | droplet/web/urls.py | 1 | 1506 | # -*- coding: utf-8 -*-
#
# droplet
# Copyright (C) 2014 Carlos Pérez-Aradros Herce <exekias@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | agpl-3.0 | -2,993,321,002,722,618,400 | 36.625 | 78 | 0.67309 | false | 3.644068 | false | false | false |
taotao54321/td6502 | td6502/plugin.py | 1 | 1628 | # -*- coding: utf-8 -*-
import os.path
import importlib.util
from importlib.machinery import SourceFileLoader
# 同梱プラグインの相対パッケージ名
_PLUGIN_PACKAGE = "plugins"
class PluginLoadError(Exception): pass
class Plugin:
def __init__(self, identifier, args, org, size):
# identifier はパス名もしくは同梱プラグイン名
# まず... | gpl-3.0 | 2,271,062,502,110,921,500 | 25.259259 | 85 | 0.627645 | false | 2.876268 | false | false | false |
DiamondLightSource/diffcalc | diffcalc/gdasupport/scannable/hkl.py | 1 | 4832 | ###
# Copyright 2008-2011 Diamond Light Source Ltd.
# This file is part of Diffcalc.
#
# Diffcalc 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 late... | gpl-3.0 | 1,528,877,540,709,744,400 | 34.014493 | 103 | 0.620447 | false | 3.550331 | false | false | false |
end0/django-super-inlines | super_inlines/admin.py | 1 | 4402 | # coding: utf-8
from __future__ import unicode_literals
from collections import defaultdict
from django.contrib.admin import helpers
from django.contrib.admin.options import InlineModelAdmin, ModelAdmin
class SuperInlineModelAdmin(InlineModelAdmin):
inlines = ()
def get_inline_instances(self, request, obj=... | bsd-3-clause | 4,950,188,053,996,090,000 | 42.156863 | 78 | 0.580645 | false | 4.614256 | false | false | false |
labepi/destate | core/Operations.py | 1 | 3221 | # vim: set fileencoding=utf-8 :
# Copyright (C) 2008 Joao Paulo de Souza Medeiros.
#
# Author(s): João Paulo de Souza Medeiros <ignotus21@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 Founda... | gpl-2.0 | 7,361,860,843,046,742,000 | 25.178862 | 76 | 0.498758 | false | 4.055416 | false | false | false |
vinokurov/salty_tickets | salty_tickets/products.py | 1 | 45448 | import inspect
from collections import namedtuple
import math
from itsdangerous import BadSignature
from salty_tickets.database import db_session
from salty_tickets.discounts import discount_users
from salty_tickets.tokens import order_product_deserialize, order_product_token_expired, GroupToken
from sqlalchemy impor... | mit | 7,546,869,553,202,527,000 | 40.505023 | 132 | 0.618641 | false | 3.931828 | true | false | false |
vdrhtc/Measurement-automation | lib2/fulaut/MeasurementRunner.py | 1 | 20887 | from lib.iq_mixer_calibration import *
from lib.data_management import *
from lib2.DispersiveHahnEcho import DispersiveHahnEcho
from lib2.ReadoutExcitationShiftCalibration import \
ReadoutExcitationShiftCalibration
from lib2.fulaut.ACStarkRunnner import ACStarkRunner
from lib2.fulaut.ResonatorOracle import *
from ... | gpl-3.0 | 8,761,803,286,628,741,000 | 43.535181 | 102 | 0.482357 | false | 4.060459 | false | false | false |
mathLab/RBniCS | rbnics/sampling/distributions/composite_distribution.py | 1 | 2845 | # Copyright (C) 2015-2021 by the RBniCS authors
#
# This file is part of RBniCS.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
from rbnics.sampling.distributions.distribution import Distribution
from rbnics.sampling.distributions.equispaced_distribution import EquispacedDistribution
class CompositeDistribution(Dist... | lgpl-3.0 | -1,076,312,272,696,125,400 | 52.679245 | 92 | 0.648506 | false | 4.087644 | false | false | false |
jcjl013/ylplines | libs/secrets.py | 1 | 1543 | # ylplines - Clarity for Yelp
# Copyright (C) 2016 Jeff Lee
#
# 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 ... | gpl-3.0 | 4,892,076,994,422,960,000 | 31.829787 | 132 | 0.704472 | false | 3.838308 | false | false | false |
tomsilver/nupic.research | sensorimotor/sensorimotor/orphan_temporal_memory.py | 1 | 17437 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | gpl-3.0 | -1,099,443,096,594,978,400 | 36.742424 | 143 | 0.606698 | false | 4.917372 | false | false | false |
FNST-OpenStack/cloudkitty | cloudkitty/utils.py | 1 | 6870 | # -*- coding: utf-8 -*-
# Copyright 2014 Objectif Libre
#
# 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 ... | apache-2.0 | 1,970,940,085,035,710,700 | 28.995633 | 83 | 0.643325 | false | 3.323174 | false | false | false |
muttiopenbts/kisskissie | collectors/http.py | 1 | 1344 | import asyncore
import base
import logging
import os.path
import re
import urllib
import uuid
class HTTPHandler(base.BaseHandler):
def __init__(self, server, conn, addr):
base.BaseHandler.__init__(self, server, conn, addr)
self.set_terminator(b"\r\n")
logging.info("HTTP connection from {... | gpl-3.0 | 841,817,109,965,159,400 | 26.428571 | 76 | 0.575149 | false | 3.393939 | false | false | false |
Spoken-tutorial/spoken-website | impersonate/views.py | 1 | 6394 | # -*- coding: utf-8 -*-
import logging
from django.db.models import Q
from django.shortcuts import get_object_or_404, redirect, render
from django.contrib.auth.models import User
from .settings import User, settings
from .decorators import allowed_user_required
from .signals import session_begin, session_end
from .help... | gpl-3.0 | -5,112,874,030,949,462,000 | 34.522222 | 101 | 0.614013 | false | 4.008777 | false | false | false |
jonas-eberle/pyEOM | pyEOM/datasets/predefined/MODIS/MYD10C1.py | 1 | 2123 | __author__ = 'we32zac'
from pyEOM.datasets import Dataset as DatasetAbs
class Dataset(DatasetAbs):
shortname = 'MYD10C1'
platform = 'Aqua'
collection = '005'
rastertype = 'CMG'
timeInterval = 'P1D'
host = 'n5eil01u.ecs.nsidc.org'
dir = '/SAN/MOSA/MYD10C1.005'
sources = ... | mit | -6,625,896,934,409,733,000 | 38.09434 | 300 | 0.602449 | false | 3.402244 | false | false | false |
opencord/voltha | experiments/netconf/yang2proto/yang2proto.py | 1 | 13052 | #!/usr/bin/env python
#
# Copyright 2016 the original author or authors.
#
# 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 require... | apache-2.0 | 269,009,027,840,746,200 | 32.552699 | 78 | 0.530264 | false | 3.936068 | false | false | false |
cloudbau/nova | nova/tests/virt/hyperv/test_hypervapi.py | 1 | 68706 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Cloudbase Solutions Srl
#
# 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/LICE... | apache-2.0 | 7,363,888,010,447,180,000 | 41.254613 | 79 | 0.560242 | false | 4.031333 | true | false | false |
cczhu/baseband | baseband/mark5b/frame.py | 1 | 4939 | # Licensed under the GPLv3 - see LICENSE
"""
Definitions for VLBI Mark 5B frames.
Implements a Mark5BFrame class that can be used to hold a header and a
payload, providing access to the values encoded in both.
For the specification, see
http://www.haystack.edu/tech/vlbi/mark5/docs/Mark%205B%20users%20manual.pdf
"""
i... | gpl-3.0 | -6,536,820,243,127,940,000 | 36.416667 | 79 | 0.619964 | false | 4.126149 | false | false | false |
mdiener21/python-geospatial-analysis-cookbook | ch05/code/ch05-03_point_on_line.py | 1 | 3216 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from shapely.geometry import asShape
import json
import os
from pyproj import Proj, transform
# define the pyproj CRS
# our output CRS
wgs84 = Proj("+init=EPSG:4326")
# output CRS
pseudo_mercator = Proj("+init=EPSG:3857")
def transform_point(in_point, in_crs, out_crs):
... | mit | -7,424,287,981,507,282,000 | 30.841584 | 182 | 0.691231 | false | 3.238671 | false | false | false |
funtoo/funtoo-overlay | modules/merge/extensions/xproto.py | 1 | 4503 | #!/usr/bin/python3
import os
from merge.merge_utils import runShell, MergeStep, CreateEbuildFromTemplate, get_catpkg_from_ebuild_path
from glob import glob
from collections import defaultdict
import itertools
import asyncio
class XProtoStepGenerator(MergeStep):
"""
This merge step will auto-generate surrogate "st... | gpl-2.0 | 9,009,645,567,873,744,000 | 40.694444 | 167 | 0.701532 | false | 3.10124 | false | false | false |
bfrascher/django-cardbox | cardbox/views.py | 1 | 17487 | # django-cardbox -- A collection manager for Magic: The Gathering
# Copyright (C) 2016 Benedikt Rascher-Friesenhausen
# 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 | -4,019,382,246,443,929,000 | 35.660377 | 98 | 0.624864 | false | 3.969807 | false | false | false |
avijaira/udacity | full-stack-web-developer/p1-movie-trailer-website/entertainment_center.py | 1 | 2210 | #! /usr/bin/env python3
"""Create a media website"""
import media
import fresh_tomatoes
def main():
# Create
grand_budapest_hotel = media.Movie(
"The Grand Budapest Hotel",
"The adventures of Gustave H, a legendary concierge at The \
Grand Budapest Hotel",
"https://upload.wik... | gpl-3.0 | 1,888,644,279,433,847,800 | 34.079365 | 93 | 0.650226 | false | 2.851613 | false | false | false |
nataddrho/DigiCue-USB | Python3/src/venv/Lib/site-packages/pip/_internal/req/req_tracker.py | 1 | 4510 | import contextlib
import hashlib
import logging
import os
from pip._vendor import contextlib2
from pip._internal.utils.temp_dir import TempDirectory
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
if MYPY_CHECK_RUNNING:
from types import TracebackType
from typing import Dict, Iterator, Optional, Se... | mit | 2,214,182,672,812,279,800 | 29.890411 | 79 | 0.603769 | false | 4.168207 | false | false | false |
stadtgestalten/stadtgestalten | grouprise/features/tags/signals.py | 1 | 1988 | import logging
import re
from django.apps import apps
from django.conf import settings
from django.db.models import signals
from taggit.models import Tag
from grouprise.features.tags import RE_TAG_REF
from grouprise.features.tags.utils import get_slug
logger = logging.getLogger(__name__)
_DEFAULT_CONF = {
'tag... | agpl-3.0 | 3,129,519,446,103,614,000 | 23.243902 | 78 | 0.588028 | false | 3.815739 | false | false | false |
Higg0/fanwatch | workspace/db_repository/versions/004_migration.py | 1 | 2815 | #updating DB to remove many-to-many requirement...much more similar to original MockFlow breakdown
from sqlalchemy import *
from migrate import *
from migrate.changeset import schema
pre_meta = MetaData()
post_meta = MetaData()
association = Table('association', pre_meta,
Column('user_id', Integer),
Column('... | gpl-2.0 | 4,106,252,176,429,499,400 | 32.915663 | 98 | 0.669627 | false | 3.563291 | false | false | false |
Clinical-Genomics/scout | scout/utils/ensembl_rest_clients.py | 1 | 10076 | """Code for talking to ensembl rest API"""
import logging
from urllib.parse import urlencode
import requests
LOG = logging.getLogger(__name__)
HEADERS = {"Content-type": "application/json"}
RESTAPI_37 = "http://grch37.rest.ensembl.org"
RESTAPI_38 = "http://rest.ensembl.org"
PING_ENDPOINT = "info/ping"
BIOMART_37 = ... | bsd-3-clause | -615,406,680,871,715,300 | 33.389078 | 124 | 0.563517 | false | 4 | false | false | false |
aitjcize/PttXP | pttxp/misc.py | 1 | 1502 | # misc.py
#
# Copyright (C) 2010 - Wei-Ning Huang (AZ) <aitjcize@gmail.com>
# 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 of the License, or
# (at yo... | gpl-3.0 | -7,687,356,133,368,796,000 | 30.291667 | 73 | 0.723036 | false | 3.323009 | false | false | false |
ConsenSys/eth-alerts | alerts/events/models.py | 1 | 1047 | from __future__ import unicode_literals
from django.db import models
from model_utils.models import TimeStampedModel
class User(TimeStampedModel):
"""
User class
"""
email = models.TextField(unique=True)
class DApp(TimeStampedModel):
"""
DApp class
"""
name = models.TextField()
... | gpl-3.0 | -348,603,654,065,908,300 | 20.387755 | 91 | 0.662846 | false | 3.996183 | false | false | false |
egtaonline/quiesce | egta/script/eosched.py | 1 | 2881 | """Command line creation for egtaonline scheduler"""
import argparse
from egtaonline import api
from gameanalysis import rsgame
from egta import eosched
from egta.script import utils
def add_parser(subparsers):
"""Create eosched parser"""
parser = subparsers.add_parser(
"eo",
help="""Egtaonl... | apache-2.0 | -8,229,260,102,792,551,000 | 26.701923 | 83 | 0.591461 | false | 3.867114 | false | false | false |
ramisetti/lammps | python/lammps.py | 1 | 31833 | # ----------------------------------------------------------------------
# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
# http://lammps.sandia.gov, Sandia National Laboratories
# Steve Plimpton, sjplimp@sandia.gov
#
# Copyright (2003) Sandia Corporation. Under the terms of Contract
# DE... | gpl-2.0 | 3,529,386,487,438,604,300 | 31.317766 | 146 | 0.600917 | false | 3.369998 | false | false | false |
basilfx/RIOT | tests/shell/tests/01-run.py | 1 | 4135 | #!/usr/bin/env python3
# Copyright (C) 2017 Alexandre Abadie <alexandre.abadie@inria.fr>
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
import sys
import os
from testrunner import run
EXPECTED_... | lgpl-2.1 | -1,541,473,447,269,278,000 | 27.129252 | 80 | 0.636759 | false | 3.504237 | true | false | false |
AllenRing/ProjectTabulas | sensorFlightTest/motorControl_v3.py | 1 | 9793 | #---------------------------------------------------------------------------------------------------------------|
# Organization: AllenRing |
# -- Created by Ritch ... | mit | -9,040,454,718,822,660,000 | 34.011029 | 166 | 0.532115 | false | 3.984133 | false | false | false |
dhoomakethu/kivy-modbus-simu | modbus_simulator/utils/common.py | 1 | 4503 | from __future__ import unicode_literals
from __future__ import absolute_import
import os
import shutil
import logging
def path(name=""):
"""
Retrieve the relative filepath to a supplied name
"""
if name.startswith(os.path.sep):
return name
actual = os.path.dirname(os.path.abspath(__file... | gpl-2.0 | -5,758,673,381,390,874,000 | 27.5 | 79 | 0.616922 | false | 3.777685 | false | false | false |
CurtisDyer/scratch | main.py | 1 | 1538 | #!/usr/bin/python3
import acunits.ac as ac
import acunits.acseries as series
import RPi.GPIO as GPIO
import time
import sys
GPIO.setmode(GPIO.BCM)
LIMIT = 16
units = [ac.AcUnit("AC1", 18, 12, 9), ac.AcUnit("AC2", 23, 16, 6),
ac.AcUnit("AC3", 24, 20, 6)]
def restart():
"Restart the Pi"
from subproces... | lgpl-3.0 | -4,420,264,387,987,027,500 | 30.387755 | 72 | 0.504551 | false | 3.835411 | false | false | false |
wojtek0806/f5-common-python | test/functional/tm/sys/test_dns.py | 1 | 1406 | # Copyright 2016 F5 Networks 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 or agreed to in writ... | apache-2.0 | 7,488,510,354,480,372,000 | 28.291667 | 76 | 0.655761 | false | 3.7 | false | false | false |
UPDDI/mps-database-server | drugtrials/migrations/0007.py | 1 | 2178 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-26 18:13
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('diseases', '0001_initial'),
('assays', '0030'),
('compounds', '0009'),
('... | mit | 9,176,515,614,792,193,000 | 35.915254 | 189 | 0.578053 | false | 4.109434 | false | false | false |
mganeva/mantid | scripts/Muon/GUI/Common/home_plot_widget/home_plot_widget_view.py | 1 | 3324 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from __future__ import (absolute_import, divi... | gpl-3.0 | 1,575,318,811,738,656,300 | 36.348315 | 118 | 0.623646 | false | 4.078528 | false | false | false |
futoke/cnc-simulator | gradient.py | 1 | 1439 | def hex_to_RGB(hx):
''' "#FFFFFF" -> [255,255,255] '''
# Pass 16 to the integer function for change of base.
return [int(hx[1:3], 16), int(hx[3:5], 16), int(hx[5:7], 16)]
def RGB_to_hex(RGB):
''' [255,255,255] -> "#FFFFFF" '''
# Components need to be integers for hex to make sense.
RGB = [in... | bsd-3-clause | 2,773,893,145,692,303,400 | 28.367347 | 73 | 0.571925 | false | 3.1766 | false | false | false |
code-for-india/sahana_shelter_worldbank | modules/s3/s3filter.py | 1 | 105722 | # -*- coding: utf-8 -*-
""" Framework for filtered REST requests
@copyright: 2013-14 (c) Sahana Software Foundation
@license: MIT
@requires: U{B{I{gluon}} <http://web2py.com>}
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentati... | mit | -5,146,352,323,822,949,000 | 35.798468 | 143 | 0.465646 | false | 4.943977 | false | false | false |
louisLouL/pair_trading | capstone_env/lib/python3.6/site-packages/kafka/consumer/group.py | 1 | 51975 | from __future__ import absolute_import
import copy
import logging
import socket
import time
from kafka.errors import KafkaConfigurationError, UnsupportedVersionError
from kafka.vendor import six
from kafka.client_async import KafkaClient, selectors
from kafka.consumer.fetcher import Fetcher
from kafka.consumer.subs... | mit | -7,256,280,843,852,207,000 | 45.866546 | 123 | 0.636902 | false | 4.859748 | true | false | false |
ronssemaxim/ClickController | SSH.py | 1 | 4147 | """
SSH.py. Creates and maintains an SSH connection
Ronsse Maxim <maxim.ronsse@ugent.be | ronsse.maxim@gmail.com>
"""
import paramiko as paramiko
import Logger
from Kube.Config import MASTER_NODE_NAME, NODES
from MainConfig import DO_LOG_SSH_CMDS_TO_FILE, LOG_SSH_FILE
# used to cache an often used SSH connection
mas... | gpl-3.0 | 4,400,567,558,825,759,000 | 38.495238 | 116 | 0.621895 | false | 3.879326 | false | false | false |
exratione/thywill-python | thywill_server/src/thywill_server/log/log_component.py | 1 | 2747 |
from thywill_server.component import Component
from thywill_server.settings import THYWILL_CONFIG
class LogComponent(Component):
'''
The parent class for log component definitions.
'''
singleton = None
DEBUG = 'debug'
INFO = 'info'
WARNING = 'warning'
ERROR = 'error'
CRITICAL ... | mit | 2,014,673,569,205,599,500 | 27.625 | 113 | 0.567164 | false | 4.827768 | false | false | false |
JordanP/openstack-snippets | vmcleaner/vm_cleaner.py | 1 | 8573 | #!/usr/bin/env python
"""
A CLI tool to list long running Rackspace Cloud servers.
Dependencies:
This script uses several 3rd party Python modules. You should install
them in a virtualenv with the following command:
.. code:: shell
$ pip install eventlet humanize iso8601 requests tabulate
Note:
... | apache-2.0 | -7,230,299,836,892,815,000 | 30.518382 | 79 | 0.605622 | false | 4.009822 | false | false | false |
SafeW3rd/Ciphers | transpositionFileHacker.py | 1 | 2388 | # Transposition File Hacker
# http://inventwithpython.com/hacking (BSD Licensed)
import sys, time, os, sys, transpositionDecrypt, detectEnglish
inputFilename = 'frankenstein.encrypted.txt'
outputFilename = 'frankenstein.decrypted.txt'
def main():
if not os.path.exists(inputFilename):
print('The... | mit | -1,033,698,933,635,512,300 | 33.147059 | 88 | 0.621859 | false | 3.934102 | false | false | false |
Psirus/altay | altai/lib/speaker.py | 1 | 3258 | import numpy as np
import scipy.signal as signal
from . import air
class Speaker(object):
def __init__(self, driver, box):
self.driver = driver
self.box = box
class VentedSpeaker(Speaker):
def __init__(self, driver, box):
Speaker.__init__(self, driver, box)
# Response para... | bsd-3-clause | 6,213,553,869,575,707,000 | 30.326923 | 105 | 0.521486 | false | 2.820779 | false | false | false |
arcturusannamalai/open-tamil | tests/transliterate_tests.py | 1 | 6339 | # -*- coding: utf-8 -*-
# (C) 2013-2018,2020 Muthiah Annamalai
#
# This file is part of 'open-tamil' package tests
#
# setup the paths
from opentamiltests import *
from transliterate import azhagi, jaffna, combinational, UOM, itrans, algorithm
class ReverseTransliterationTests(unittest.TestCase):
def test_tamil2e... | mit | 3,686,533,725,662,612,500 | 46.875 | 121 | 0.597737 | false | 2.225019 | true | false | false |
wcsjtu/myss | test/test_all.py | 1 | 1265 | # -*- coding: utf-8 -*-
import os
import sys
import unittest
import subprocess
import platform
import time
PWD = os.path.dirname(__file__)
import test_tcp, test_udp, test_http_tunnel
def start_services():
def run(name):
filename = "%s.py" % name
filepath = os.path.join(PWD, filename)
servi... | mit | 2,338,301,465,576,548,400 | 21.192982 | 82 | 0.578656 | false | 3.656069 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.