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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jhseu/tensorflow | tensorflow/python/compat/compat.py | 1 | 5876 | # Copyright 2018 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 | 8,131,980,518,395,135,000 | 34.39759 | 82 | 0.7226 | false | 3.978334 | false | false | false |
machinelearner/precis | tests/multi_document_corpus_test.py | 1 | 1884 | from unittest import TestCase
import os.path as ospath
from precis.core import Document, MultiDocumentCorpus, MultiDocument
class TestMultiDocumentCorpus(TestCase):
def setUp(self):
self.test_documents_path = ospath.join(ospath.dirname(__file__), "test_data/multi_document_test")
def test_shouldCreat... | agpl-3.0 | 2,021,960,114,921,098,000 | 47.333333 | 110 | 0.713376 | false | 4.017058 | true | false | false |
EVEprosper/ProsperDatareader | prosper/datareader/robinhood/news.py | 1 | 2089 | """prosper.datareader.robinhood.news: news parsing from Robinhood"""
import itertools
import warnings
import requests
from .. import config
from .. import exceptions
RH_NEWS = 'https://api.robinhood.com/midlands/news/'
PAGE_HARDBREAK = 50
def fetch_company_news_rh(
ticker,
page_limit=None,
ur... | mit | -4,225,727,469,407,912,000 | 28.013889 | 83 | 0.590713 | false | 3.926692 | false | false | false |
desecho/hangout-discontinued | hangout_project/hangout/models.py | 1 | 3252 | # -*- coding: utf8 -*-
from django.db import models
from django.contrib.auth.models import User
class UserData(models.Model):
user = models.ForeignKey(User, verbose_name='пользователь')
availability = models.BooleanField('доступность')
one_on_one = models.BooleanField('1 - 1')
location = models.CharFi... | mit | -9,206,949,850,237,264,000 | 31.931034 | 80 | 0.654101 | false | 2.926456 | false | false | false |
wlanslovenija/django-tastypie-mongoengine | setup.py | 1 | 1943 | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
try:
# Workaround for http://bugs.python.org/issue15881
import multiprocessing
except ImportError:
pass
VERSION = '0.4.6'
if __name__ == '__main__':
setup(
name = 'django-tastypie-mongoengine',
version = VER... | agpl-3.0 | -7,106,178,150,912,484,000 | 30.852459 | 94 | 0.521873 | false | 3.809804 | true | false | false |
ToonTownInfiniteRepo/ToontownInfinite | toontown/parties/PartyPlanner.py | 1 | 42719 | import calendar
from datetime import datetime
from datetime import timedelta
from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4
from otp.otpbase import OTPLocalizer
from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectScrolledList, DirectCheckButton
from direct.gui import Dir... | mit | 7,053,470,399,190,496,000 | 56.806495 | 399 | 0.683771 | false | 3.656197 | false | false | false |
JnyJny/GameOfLife | GameOfLife/world.py | 1 | 14721 |
from . import Cell
from .patterns import Patterns as BuiltinPatterns
import numpy as np
class World(object):
'''
The game World is a two dimensional grid populated with Cells.
>>> w = World()
>>> w[0]
Cell(location=(0,0),...)
>>> w[x,y]
Cell(location=(x,y),...)
>> w.step()
>> ... | mit | 4,682,165,656,399,587,000 | 24.42487 | 79 | 0.513077 | false | 4.145593 | false | false | false |
MSeifert04/nddata | nddata/nddata/mixins/ndunitconversion.py | 1 | 4189 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from ...utils.copyutils import do_copy
__all__ = ['NDUnitConvMixin']
class NDUnitConvMixin(object):
"""Mixin class to add unit conversion... | bsd-3-clause | 980,543,990,849,980,900 | 36.401786 | 80 | 0.592504 | false | 4.231313 | false | false | false |
kmuehlbauer/wradlib | wradlib/zonalstats.py | 1 | 39759 | #!/usr/bin/env python
# Copyright (c) 2011-2018, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.
"""
Zonal Statistics
^^^^^^^^^^^^^^^^
This module supports you in computing statistics over spatial zones. A typical
application would be to compute mean areal precipitation for a c... | mit | 5,919,154,849,767,441,000 | 30.554762 | 79 | 0.569204 | false | 4.128232 | false | false | false |
benvm/garmon | garmon/plugin.py | 1 | 2282 | #!/usr/bin/python
#
# plugin.py
#
# Copyright (C) Ben Van Mechelen 2007-2011 <me@benvm.be>
#
# This file is part of Garmon
#
# Garmon 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 ... | gpl-2.0 | 9,013,415,308,529,410,000 | 29.026316 | 98 | 0.57844 | false | 4.202578 | false | false | false |
lnls-sirius/dev-packages | siriuspy/siriuspy/machshift/main.py | 1 | 1965 | """Main module of Machine Shift Application."""
import time as _time
from datetime import datetime as _datetime
from ..callbacks import Callback as _Callback
from .csdev import Const as _Const, ETypes as _ETypes, \
get_machshift_propty_database as _get_database
from .utils import MacScheduleData as _MacSched
cl... | gpl-3.0 | -963,032,836,702,402,700 | 32.305085 | 78 | 0.597455 | false | 4.010204 | false | false | false |
jnealtowns/infra | builder/unix/tools/wod.py | 1 | 2179 | #!/usr/bin/python
################################################################
#
# Copyright 2013, Big Switch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at... | epl-1.0 | 1,587,029,211,437,916,000 | 30.128571 | 80 | 0.576411 | false | 4.2147 | false | false | false |
dhard/ILMpy | ilmpy/learners.py | 1 | 17256 | from __future__ import division
from __future__ import print_function
import warnings
import pandas
import numpy
import pdb
import ilmpy.signal_spaces as signal_spaces
import ilmpy.meaning_spaces as meaning_spaces
import random
import copy
import itertools
class _Learner ():
"""
This is a private base class
... | artistic-2.0 | 7,547,578,418,355,923,000 | 42.465995 | 844 | 0.550939 | false | 4.036491 | false | false | false |
MCLConsortium/mcl-site | src/jpl.mcl.site.knowledge/src/jpl/mcl/site/knowledge/_utils.py | 1 | 2509 | # encoding: utf-8
u'''MCL Site Knowledge — Utilities.'''
from Products.CMFCore.interfaces import IFolderish
from Products.CMFCore.WorkflowCore import WorkflowException
from plone.app.dexterity.behaviors.exclfromnav import IExcludeFromNavigation
from zope.event import notify
from zope.lifecycleevent import modified
i... | apache-2.0 | -5,006,026,829,755,486,000 | 32.878378 | 90 | 0.672916 | false | 3.752994 | false | false | false |
LionKiss/LabCloud | machinetestmanagershell/6将TensorFlow部署到kubernetes中/CNNtestpy2.py | 1 | 2307 | import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('mnist_data',one_hot=True)
batch_size = 100
n_batch = mnist.train.num_examples // batch_size
def weight_variable(shape):
initial = tf.truncated_normal(shape,stddev=0.1)
return tf.V... | apache-2.0 | 2,975,938,472,629,650,000 | 27.227848 | 103 | 0.659298 | false | 2.535165 | false | false | false |
akkana/pi-zero-w-book | multiplex/MCP23017.py | 1 | 3277 | #!/usr/bin/env python
from __future__ import print_function
# https://www.raspberrypi-spy.co.uk/2013/07/how-to-use-a-mcp23017-i2c-port-expander-with-the-raspberry-pi-part-1/
# https://www.raspberrypi-spy.co.uk/2013/07/how-to-use-a-mcp23017-i2c-port-expander-with-the-raspberry-pi-part-2/
# https://www.raspberrypi-spy.... | gpl-2.0 | -2,743,747,327,819,476,500 | 35.411111 | 153 | 0.577968 | false | 3.076995 | false | false | false |
UrLab/incubator | events/serializers.py | 1 | 1095 | from .models import Event, Meeting
from rest_framework import serializers
class EventSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Event
fields = ('id', 'place', 'start', 'stop', 'title', 'status', 'description', 'organizer', 'meeting', 'picture')
class HackerAgendaEven... | agpl-3.0 | -434,371,152,782,694,800 | 32.181818 | 118 | 0.669406 | false | 3.924731 | false | false | false |
fusionbox/satchless | satchless/cart/forms.py | 1 | 2751 | from django import forms
from django.utils.translation import ugettext_lazy as _, ugettext
from . import models
from ..forms.widgets import DecimalInput
from ..product.forms import registry
class QuantityForm(object):
def clean_quantity(self):
val = self.cleaned_data['quantity']
if val < 0:
... | bsd-3-clause | 8,328,682,056,375,513,000 | 37.746479 | 94 | 0.63904 | false | 4.02193 | false | false | false |
rfguri/vimfiles | bundle/ycm/third_party/ycmd/third_party/JediHTTP/vendor/jedi/test/completion/pep0484_comments.py | 1 | 1668 | a = 3 # type: str
#? str()
a
b = 3 # type: str but I write more
#? int()
b
c = 3 # type: str # I comment more
#? str()
c
d = "It should not read comments from the next line"
# type: int
#? str()
d
# type: int
e = "It should not read comments from the previous line"
#? str()
e
class BB: pass
def test(a, b):
... | mit | -1,894,933,442,225,605,600 | 14.302752 | 79 | 0.517986 | false | 2.72549 | false | false | false |
Mitame/the-boredom-files | falling-stars.py | 1 | 7027 | import pygame
import random
import time
import math
from common import SpriteCounter, BaseSprite
max_mass = 2500
screen_size = (800, 600)
def draw_star(points, size, point_length=0.5):
polygon = []
for n in range(points*2):
if n % 2 == 0:
x = math.sin(2*math.pi*n/points/2)*size/2 + size/... | gpl-2.0 | -998,973,881,889,040,300 | 27.334677 | 99 | 0.535648 | false | 3.453071 | false | false | false |
eri-trabiccolo/exaile | plugins/bpm/__init__.py | 1 | 8076 | # Copyright (C) 2011 Dustin Spicuzza
#
# 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that... | gpl-2.0 | 128,802,959,394,202,900 | 29.824427 | 126 | 0.583952 | false | 3.897683 | false | false | false |
open-synergy/opnsynid-stock-logistics-warehouse | stock_missing_operation/models/stock_warehouse.py | 1 | 3196 | # -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api, _
from openerp.exceptions import Warning as UserError
class StockWarehouse(models.Model):
_inherit = "stock.warehouse"
missing_type_id = fie... | agpl-3.0 | -516,797,030,982,502,400 | 28.592593 | 68 | 0.567272 | false | 3.773318 | false | false | false |
szlin/gitsome | setup.py | 1 | 3894 | #!/usr/bin/env python
# coding=utf-8
"""The gitsome installer."""
from __future__ import print_function, unicode_literals
import os
import sys
try:
from setuptools import setup, find_packages
from setuptools.command.sdist import sdist
from setuptools.command.install import install
from setuptools.comman... | gpl-3.0 | 4,516,863,207,845,362,000 | 29.186047 | 94 | 0.557268 | false | 3.802734 | false | false | false |
larsks/gproxy | protocol.py | 1 | 5479 | import json
import struct
from cStringIO import StringIO
import logging
from datatypes import *
from exc import *
LOG = logging.getLogger(__name__)
default_server_info = {'players': {'max': 20, 'online': 0},
'version': {'protocol': 4,
'name': 'Minecra... | gpl-3.0 | -5,884,459,803,446,532,000 | 29.780899 | 97 | 0.494251 | false | 3.944564 | false | false | false |
fxdemolisher/frano | frano/settings.py | 1 | 1426 | # Copyright (c) 2011 Gennadiy Shafranovich
# Licensed under the MIT license
# see LICENSE file for copying permission.
import datetime, os, glob
# build info
BUILD_VERSION = '0.12'
BUILD_DATETIME = datetime.datetime(2011, 9, 27, 7, 44, 0)
# base db set up, the rest is in environment specific setting files
DATABASE_E... | mit | -4,886,773,275,823,834,000 | 25.90566 | 86 | 0.714586 | false | 3.175947 | false | false | false |
wri/gfw-api | gfw/user/users.py | 1 | 2549 | # Global Forest Watch API
# Copyright (C) 2015 World Resource Institute
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version... | gpl-2.0 | -6,688,414,713,100,123,000 | 31.265823 | 91 | 0.661828 | false | 3.970405 | false | false | false |
drix00/pysemeels | tests/test_project.py | 1 | 5438 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. py:currentmodule:: tests.test_project
.. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca>
Tests for the module :py:mod:`pysemeels.project`.
"""
###############################################################################
# Copyright 2017 Hendrix D... | apache-2.0 | -2,100,272,967,289,971,000 | 30.433526 | 112 | 0.62854 | false | 3.644772 | true | false | false |
Jumpscale/jumpscale6_core | apps/portalftpgateway/asynchat.py | 1 | 11372 | # -*- Mode: Python; tab-width: 4 -*-
# Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp
# Author: Sam Rushing <rushing@nightmare.com>
# ======================================================================
# Copyright 1996 by Sam Rushing
#
# All Rights Reserved
#
# Permission... | bsd-2-clause | 8,711,805,615,401,872,000 | 34.5375 | 92 | 0.577031 | false | 4.18242 | false | false | false |
ariel17/poppurri | poppurri/user_profile/views.py | 1 | 1293 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Description: TODO
"""
__user__ = "Ariel Gerardo Rios (ariel.gerardo.rios@gmail.com)"
from django.db.models import Q
from django.contrib.auth import get_user_model
from django.conf import settings
from django.views.generic import TemplateView
from django.views.generic... | mit | -4,043,447,863,248,405,000 | 21.684211 | 79 | 0.655066 | false | 3.632022 | false | false | false |
robertodealmeida/pydap.handlers.pytables | setup.py | 1 | 1242 | from setuptools import setup, find_packages
import sys, os
version = '0.1'
install_requires = [
# List your project dependencies here.
# For more details, see:
# http://packages.python.org/distribute/setuptools.html#declaring-dependencies
'tables',
'Pydap>=3.2',
'Numpy',
]
setup(name='pydap... | mit | -2,261,205,215,611,690,800 | 28.571429 | 82 | 0.668277 | false | 3.421488 | false | false | false |
koverholt/bayes-fire | Example_Cases/FDS_Mass_Loss_Rate/Scripts/models.py | 1 | 1517 | #!/usr/bin/env python
"""Module for setting up statistical models"""
from __future__ import division
from math import pi
import numpy as np
import pymc as mc
import graphics
import data_fds
import external_fds
def fds_mlr():
"""PyMC configuration with FDS as the model."""
# Priors
# FDS inputs: abs_coe... | bsd-3-clause | 2,114,569,898,193,890,000 | 25.155172 | 65 | 0.540541 | false | 3.186975 | false | false | false |
chop-dbhi/varify-data-warehouse | vdw/raw/hgnc/management/subcommands/load.py | 1 | 3036 | import re
from vdw.raw.management.subcommands.load import LoadCommand
from vdw.raw.utils.stream import PGCopyEditor
valid_date_re = re.compile('\d{4}-\d{2}-\d{2}')
class HGNCGeneParser(PGCopyEditor):
def process_column(self, idx, value):
if not value:
value = None
elif idx == 0:
... | bsd-2-clause | 935,355,668,769,493,500 | 30.625 | 69 | 0.524704 | false | 3.418919 | false | false | false |
bytescout/ByteScout-SDK-SourceCode | Cloud API Server/PDF To Image API/Python/Convert PDF To Image From Uploaded File/ConvertPdfToImageFromUploadedFile.py | 1 | 3205 | import os
import requests # pip install requests
# Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost".
# If it's not then please replace this with with your hosting url.
# Base URL for PDF.co Web API requests
BASE_URL = "https://localhost"
# Source PDF file
SourceFile = ".\... | apache-2.0 | 2,475,841,309,778,389,500 | 30.742574 | 110 | 0.588768 | false | 4.103713 | false | false | false |
a-bioinformatician/BreaKmer | breakmer/utils.py | 1 | 26321 | #! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import glob
import logging
import time
import math
from Bio import SeqIO
import subprocess
from pysam import *
__author__ = "Ryan Abo"
__copyright__ = "Copyright 2015, Ryan Abo"
__email__ = "ryanabo@gmail.com"
__license__ = "MIT"
def which(program):
... | mit | 2,089,490,379,814,540,000 | 29.856975 | 239 | 0.534668 | false | 3.307074 | true | false | false |
jbzdak/edx-platform | cms/urls.py | 1 | 9471 | from django.conf import settings
from django.conf.urls import patterns, include, url
# There is a course creators admin table.
from ratelimitbackend import admin
admin.autodiscover()
# Pattern to match a course key or a library key
COURSELIKE_KEY_PATTERN = r'(?P<course_key_string>({}|{}))'.format(
r'[^/]+/[^/]+/[... | agpl-3.0 | 7,338,015,102,783,378,000 | 44.975728 | 119 | 0.656953 | false | 3.512982 | false | false | false |
brentp/gemini | gemini/gene_table.py | 1 | 2665 | import os
import database
from gemini.config import read_gemini_config
class gene_detailed:
def __init__(self, field):
field = [None if f == 'None' else f for f in field]
self.fields = field[:]
self.chrom = field[0]
self.gene = field[1]
self.is_hgnc = field[2]
self.... | mit | -1,033,318,861,435,471,600 | 36.013889 | 147 | 0.59212 | false | 3.135294 | false | false | false |
kubeflow/testing | py/kubeflow/testing/tekton_cr_clients.py | 1 | 1393 | """Some helper functions for working with Tekton resources."""
from kubernetes import client as k8s_client
# TODO(jlewi): Create a common base class to be shared with CnrmClients.
class TektonClientApi(k8s_client.CustomObjectsApi):
"""A wrapper around CustomObjectsApi."""
def __init__(self, client, kind):
"""... | apache-2.0 | -8,435,280,881,611,539,000 | 34.717949 | 77 | 0.590811 | false | 4.085044 | false | false | false |
hackerberry/ooni-probe | nettests/examples/example_httpt.py | 1 | 1125 | # -*- encoding: utf-8 -*-
#
# :authors: Arturo Filastò
# :licence: see LICENSE
from ooni.templates import httpt
class ExampleHTTP(httpt.HTTPTest):
name = "Example HTTP Test"
author = "Arturo Filastò"
version = 0.1
inputs = ['http://google.com/', 'http://wikileaks.org/',
'http://torprojec... | bsd-2-clause | 1,933,698,586,295,521,500 | 27.794872 | 77 | 0.582369 | false | 3.954225 | false | false | false |
petrmikheev/miksys | verilog/charmap/gen_hex.py | 1 | 1085 | #coding: utf-8
charlist = {}
char = []
into = False
enc = 0
for l in file('ter-u12n.bdf', 'r').readlines():
l = l.strip()
if into:
if l == 'ENDCHAR':
charlist[enc] = char
# print char
char = []
into = False
else:
char += [int(l, 16)]
... | gpl-3.0 | 2,283,825,782,201,857,500 | 25.463415 | 97 | 0.41106 | false | 2.956403 | false | false | false |
nrao/FLAG-Beamformer-Devel | src/vegas_hpc/python/GBTStatus.py | 1 | 9716 | import MySQLdb, string, sys, time, os, math
from pyslalib import slalib as s
RADTODEG = float('57.295779513082320876798154814105170332405472466564')
DEGTORAD = float('1.7453292519943295769236907684886127134428718885417e-2')
RADTOHRS = float('3.8197186342054880584532103209403446888270314977710')
HRSTORAD = ... | gpl-2.0 | -3,002,049,048,740,051,000 | 34.459854 | 113 | 0.458625 | false | 3.704156 | false | false | false |
emembrives/dispotrains | offline_analysis/statistics/ttl.py | 1 | 2396 | #!/usr/bin/python
# vim: set fileencoding=utf-8
import json
import datetime
import itertools
statuses = []
f = open('statuses-2014.json')
for line in f.readlines():
statuses.append(json.loads(line.strip()))
f.close()
class DataByAgency(object):
def __init__(self):
self.sncf = 0
self.ratp = 0
... | apache-2.0 | 5,875,727,288,177,439,000 | 30.933333 | 127 | 0.607098 | false | 3.377997 | false | false | false |
emreg00/biana | biana/BianaObjects/sequenceUtilities.py | 2 | 48971 | """
BIANA: Biologic Interactions and Network Analysis
Copyright (C) 2009 Javier Garcia-Garcia, Emre Guney, Baldo Oliva
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either vers... | gpl-3.0 | 725,941,153,884,592,800 | 39.041701 | 223 | 0.565416 | false | 3.661109 | false | false | false |
shenfei/oj_codes | leetcode/python/n43_Multiply_Strings.py | 1 | 1471 | class Solution(object):
def add(self, x, y):
n = max(len(x), len(y))
res = []
ext_add = 0
for i in range(n):
a = x[i] if i < len(x) else 0
b = y[i] if i < len(y) else 0
v = a + b + ext_add
res.append(v % 10)
ext_add = v // ... | mit | -3,042,604,636,802,212,400 | 25.745455 | 62 | 0.424201 | false | 3.197826 | false | false | false |
jaepil/python-goose | goose/utils/encoding.py | 1 | 4909 | # -*- coding: utf-8 -*-
import datetime
import six
from decimal import Decimal
class DjangoUnicodeDecodeError(UnicodeDecodeError):
def __init__(self, obj, *args):
self.obj = obj
UnicodeDecodeError.__init__(self, *args)
def __str__(self):
original = UnicodeDecodeError.__str__(self)
... | apache-2.0 | -6,096,122,349,483,352,000 | 35.634328 | 78 | 0.588307 | false | 4.344248 | false | false | false |
jim-easterbrook/pyctools-demo | src/scripts/de_interlace/stage_2.py | 1 | 3661 | #!/usr/bin/env python
# File written by pyctools-editor. Do not edit.
import argparse
import logging
from pyctools.core.compound import Compound
import pyctools.components.deinterlace.hhiprefilter
import pyctools.components.deinterlace.simple
import pyctools.components.io.videofilereader
import pyctools.components.qt.... | gpl-3.0 | 362,431,894,340,190,460 | 43.646341 | 96 | 0.552308 | false | 3.639165 | true | false | false |
OpenNumismat/open-numismat-tracker | OpenNumismat/Reports/Report.py | 1 | 9595 | import codecs
import locale
import os
import shutil
try:
# TODO: For speedup use additional a http://pypi.python.org/pypi/MarkupSafe
from jinja2 import Environment, FileSystemLoader
except ImportError:
print('jinja2 module missed. Report engine not available')
try:
import numpy
except ImportErr... | gpl-3.0 | -2,344,603,447,316,520,400 | 36.38 | 114 | 0.539865 | false | 4.168115 | false | false | false |
matthagy/Jamenson | jamenson/compiler/Attic/constant_copy.py | 1 | 1117 | '''Ensure non-immutable constants are copied to prevent
mutation affecting constant in future uses
'''
from ..runtime.builtins import get_builtin_symbol
from ..runtime.immutable import immutablep
from .walk import IRWalker, propigate_location
from . import ir as I
from .bind import Binding, BindingUse
copy_binding... | apache-2.0 | 1,211,236,649,289,185,800 | 30.027778 | 81 | 0.669651 | false | 3.650327 | false | false | false |
kevana/corpscores | tests/factories.py | 1 | 1119 | # -*- coding: utf-8 -*-
'''
Object factories for testing.
'''
from factory import Sequence, PostGenerationMethodCall
from factory.alchemy import SQLAlchemyModelFactory
from random import randint
from dci_notify.user.models import User
from dci_notify.database import db
class BaseFactory(SQLAlchemyModelFactory):
... | bsd-3-clause | 8,182,690,866,537,514,000 | 27.692308 | 75 | 0.676497 | false | 3.912587 | false | false | false |
joaoqalves/web2py-oauth2 | controllers/callback.py | 1 | 1431 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib, urllib2
# Change the values to your application id, secret and redirect_uri
APP = {'CLIENT_ID': '524fa225e2925ea0d9c700bfda40ec4e833c6e01',
'CLIENT_SECRET': 'acd709c3f403701b875dc224695466ba7ce117ef',
'REDIRECT_URI': 'http://localhost/oauth2/callb... | mit | 5,260,392,323,920,981,000 | 34.775 | 80 | 0.608665 | false | 3.755906 | false | false | false |
teffalump/health_fhir | tests/test_suite.py | 1 | 2601 | from gnu_health_fhir.adapters import (
Patient,
Condition,
Procedure,
Practitioner,
Observation,
DiagnosticReport,
Immunization,
FamilyMemberHistory,
MedicationStatement,
Encounter,
ClinicalImpression,
Coverage,
)
from proteus import config, Model
import pytest
config = ... | gpl-3.0 | 2,333,450,729,189,618,000 | 23.537736 | 71 | 0.651672 | false | 2.996544 | true | false | false |
adewynter/Tools | MLandDS/MachineLearning/multivariatepoly.py | 1 | 1148 | # Adrian deWynter, 2016
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.pipeline import make_pipeline
F, N = tuple(map(int, raw_input().strip().split(' ')))
trainingData = []
testData = []
for _ in range(N):
trainingData.appen... | mit | 6,460,760,746,449,651,000 | 27.02439 | 75 | 0.695993 | false | 3.308357 | false | false | false |
stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/special/gammaincinv/benchmark/python/scipy/benchmark.gammainccinv.py | 1 | 2239 | #!/usr/bin/env python
#
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib 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
#
# ... | apache-2.0 | 6,534,992,671,319,754,000 | 22.082474 | 80 | 0.634212 | false | 3.658497 | false | false | false |
Featuretools/featuretools | featuretools/entityset/deserialize.py | 1 | 8042 | import json
import os
import tarfile
import tempfile
from pathlib import Path
import boto3
import pandas as pd
from featuretools.entityset.relationship import Relationship
from featuretools.entityset.serialize import FORMATS
from featuretools.utils.gen_utils import (
check_schema_version,
use_s3fs_es,
use... | bsd-3-clause | -6,856,408,558,918,521,000 | 36.933962 | 145 | 0.651579 | false | 4.201672 | false | false | false |
stonebig/bokeh | examples/custom/parallel_plot/parallel_plot.py | 1 | 4171 | import numpy as np
import pandas as pd
from bokeh.plotting import figure
from bokeh.models import (Range1d, ColumnDataSource, LinearAxis,
LinearColorMapper, MultiLine,
FixedTicker, BasicTickFormatter, FuncTickFormatter)
from parallel_selection_tool import ParallelSe... | bsd-3-clause | 2,680,052,413,489,238,000 | 35.911504 | 101 | 0.62503 | false | 3.6019 | false | false | false |
jamiebull1/eppy | setup.py | 1 | 2380 |
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import io
import codecs
import os
import sys
import eppy
here = os.path.abspath(os.path.dirname(__file__))
def read(*filenames, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
sep = kwargs.get('sep', '\... | mit | -7,298,376,286,380,893,000 | 28.02439 | 93 | 0.580672 | false | 3.525926 | true | false | false |
newmediamedicine/indivo_server_1_0 | indivo/document_processing/idp_objs/device.py | 1 | 2421 | from indivo.lib import iso8601
from indivo.models import Device
XML = 'xml'
DOM = 'dom'
class IDP_Device:
def post_data(self, name=None,
name_type=None,
name_value=None,
name_abbrev=None,
identity=None,
id... | gpl-3.0 | 5,047,917,554,879,961,000 | 41.473684 | 74 | 0.379595 | false | 6.387863 | false | false | false |
offlinehacker/flumotion | flumotion/component/bouncers/plug.py | 1 | 4238 | # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General Public License version 2 as published by
# the Free ... | gpl-2.0 | -8,866,147,938,485,557,000 | 32.109375 | 77 | 0.654082 | false | 3.849228 | false | false | false |
SmartPeople/zulip | analytics/management/commands/update_analytics_counts.py | 1 | 2822 | from __future__ import absolute_import
from __future__ import print_function
import os
import sys
from scripts.lib.zulip_tools import ENDC, WARNING
from argparse import ArgumentParser
from datetime import timedelta
from django.core.management.base import BaseCommand
from django.utils.timezone import now as timezone_... | apache-2.0 | 2,374,817,877,506,764,300 | 36.626667 | 114 | 0.600283 | false | 4.416275 | false | false | false |
Nata-Fox-2016/-Nata-KPK | catch_the_ball/ball-1.py | 1 | 2280 | import tkinter
from random import choice, randint
ball_initial_number = 20
ball_minimal_radius = 15
ball_maximal_radius = 40
ball_available_colors = ['green', 'blue', 'red', 'lightgray', '#FF00FF', '#FFFF00']
balls_coord = []#cpis kor
balls_num = []#cpic nom
def click_ball(event):
""" ooo canvas
:param ... | gpl-3.0 | -5,685,410,711,987,284,000 | 25.511628 | 84 | 0.576754 | false | 3.081081 | false | false | false |
zhengwsh/InplusTrader_Linux | InplusTrader/vtConstant.py | 1 | 2717 | # encoding: UTF-8
# 默认空值
EMPTY_STRING = ''
EMPTY_LIST = []
EMPTY_DICT = {}
EMPTY_UNICODE = u''
EMPTY_INT = 0
EMPTY_FLOAT = 0.0
# 方向常量
DIRECTION_NONE = u'无方向'
DIRECTION_LONG = u'多'
DIRECTION_SHORT = u'空'
DIRECTION_UNKNOWN = u'未知'
DIRECTION_NET = u'净'
DIRECTION_SELL = u'卖出' # IB接口
# 开平常量
OFFSET_NONE = u'无开平'
OFFS... | mit | 5,811,918,107,846,119,000 | 22.57732 | 47 | 0.642763 | false | 1.876128 | false | true | false |
jamesthiele/acodec | token_myprint_codec.py | 1 | 1068 | import tokenize
LOGFILE = '/tmp/log.txt'
def translate(readline):
for type, name,_,_,_ in tokenize.generate_tokens(readline):
if type ==tokenize.NAME and name =='myprint':
yield tokenize.NAME, 'print'
else:
yield type,name
import codecs, cStringIO, encodings
from encodings ... | bsd-2-clause | -6,297,547,132,264,432,000 | 30.411765 | 67 | 0.662921 | false | 4.045455 | false | false | false |
rsms/smisk | lib/smisk/config.py | 1 | 13245 | # encoding: utf-8
'''User configuration.
'''
import sys, os, logging, glob, codecs, re
import logging.handlers
from smisk.util.collections import merge_dict
log = logging.getLogger(__name__)
__all__ = ['config', 'config_locations', 'Configuration',
'configure_logging', 'LOGGING_FORMAT']
# setup check_dirs
... | mit | -7,725,129,688,171,373,000 | 28.564732 | 101 | 0.610872 | false | 3.753188 | true | false | false |
ModernMT/MMT | cli/translate.py | 1 | 7911 | import argparse
import os
import sys
import tempfile
from cli import ensure_node_running, ensure_node_has_api, CLIArgsException
from cli.mmt.engine import EngineNode, Engine
from cli.mmt.fileformats import XLIFFFileFormat
from cli.mmt.translation import ModernMTTranslate, EchoTranslate, ModernMTEnterpriseTranslate
c... | apache-2.0 | -9,217,007,159,111,926,000 | 42.95 | 118 | 0.597902 | false | 4.299457 | false | false | false |
longBurn/cptt | cptt-mngr.py | 1 | 1815 | #!/usr/bin/python
import socket
import sys
import time
import json
node_list={}
node_list['cz7644']={'ip':'172.16.164.80', 'port':7777}
node_list['cz7645']={'ip':'172.16.164.81', 'port':7777}
node_list['cz7646']={'ip':'172.16.164.82', 'port':7777}
def send_message(node, message):
sock = socket.socket(socket.AF_... | gpl-3.0 | 7,154,375,413,663,307,000 | 28.754098 | 118 | 0.600551 | false | 3.405253 | false | false | false |
dhylands/Bioloid | bioloid/colored_formatter.py | 1 | 3655 | """Implements a logging formatter which produces colorized output, suitable
for use on an ANSI console.
"""
import logging
import time
# Attributes
# 0 Reset all attributes
# 1 Bright
# 2 Dim
# 4 Underscore
# 5 Blink
# 7 Reverse
# 8 Hidden
LT_BLACK = "\x1b[1;30m"
LT_RED = "\x1b[1;31m"
LT_GREEN = "\x1b[1;32m"
LT_YEL... | mit | -5,024,722,953,027,865,000 | 24.739437 | 77 | 0.599453 | false | 3.243123 | false | false | false |
bad-ants-fleet/ribolands | ribolands/crnwrapper.py | 1 | 3230 | #
# Coded by: Stefan Badelt <stef@tbi.univie.ac.at>
# University of Vienna, Department of Theoretical Chemistry
#
# -*- Style -*-
# Use double quotes or '#' for comments, such that single quotes are available
# for uncommenting large parts during testing
#
# *) do not exceed 80 characters per line
#
# Python 3 ... | mit | -4,996,663,445,911,798,000 | 34.494505 | 95 | 0.610217 | false | 3.541667 | false | false | false |
kern3020/opportunity | opportunity/tracker/forms.py | 1 | 9059 | from django import forms
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from .models import *
class CompanyForm(forms.ModelForm):
class Meta:
model = Company
fields = ('name', 'division', 'address', 'city',
'state_province', 'count... | mit | -1,745,292,379,861,285,600 | 27.221184 | 78 | 0.56408 | false | 3.933565 | false | false | false |
AprilBrother/ab-ble-gateway-sdk | gateway-v4/examples/python3/mqtt-client/gateway4-client.py | 1 | 1258 | import time
import paho.mqtt.client as mqtt
import msgpack
from beacontools import parse_packet
def on_subscribe(mosq, obj, mid, granted_qos):
print("Subscribed: " + str(mid))
def on_message(mosq, obj, msg):
for d in msgpack.unpackb(msg.payload, raw = True)[b'devices']:
#parse iBeacon data
advData... | apache-2.0 | 2,665,914,569,032,443,400 | 29.682927 | 111 | 0.568362 | false | 2.995238 | false | false | false |
TuSimple/simpledet | config/faster_r50v1_fpn_2x.py | 1 | 8629 | from symbol.builder import FasterRcnn as Detector
from symbol.builder import add_anchor_to_arg
from models.FPN.builder import MSRAResNet50V1FPN as Backbone
from models.FPN.builder import FPNNeck as Neck
from models.FPN.builder import FPNRpnHead as RpnHead
from models.FPN.builder import FPNRoiAlign as RoiExtractor
from ... | apache-2.0 | 2,512,851,258,607,566,000 | 27.859532 | 97 | 0.54931 | false | 3.513436 | true | false | false |
alexrudy/Zeeko | tools/zcli.py | 1 | 10788 | #!/usr/bin/env python
"""
Command-line interface for various Zeeko components
"""
import click
import logging
import logging.handlers
import zmq
import time
import sys
import numpy as np
from zutils import zmain, ioloop, MessageLine
log = logging.getLogger()
main = zmain()
@main.command()
@click.option(
"--i... | bsd-3-clause | -4,991,245,846,941,785,000 | 33.139241 | 93 | 0.538654 | false | 3.648292 | false | false | false |
NozesNaBrita/bigfuture | big_future/users/tests/test_forms.py | 1 | 1119 | import pytest
from big_future.users.forms import UserCreationForm
from big_future.users.tests.factories import UserFactory
pytestmark = pytest.mark.django_db
class TestUserCreationForm:
def test_clean_username(self):
# A user with proto_user params does not exist yet.
proto_user = UserFactory.bu... | mit | -4,764,088,166,558,472,000 | 26.975 | 59 | 0.575514 | false | 4.422925 | true | false | false |
elastic/elasticsearch-py | examples/fastapi-apm/app.py | 1 | 2596 | # Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
import aiohttp
import datetime
import os
from fastapi import FastAPI
from fastapi.encoders import jsonable_encoder
fr... | apache-2.0 | -219,758,731,271,770,620 | 24.70297 | 85 | 0.643297 | false | 3.522388 | false | false | false |
oostende/openblachole | lib/python/Tools/Notifications.py | 2 | 2011 | notifications = [ ]
notificationAdded = [ ]
# notifications which are currently on screen (and might be closed by similiar notifications)
current_notifications = [ ]
def __AddNotification(fnc, screen, id, *args, **kwargs):
if ".MessageBox'>" in `screen`:
kwargs["simple"] = True
notifications.append((fnc, screen,... | gpl-2.0 | -1,112,277,938,367,856,300 | 33.084746 | 122 | 0.723521 | false | 3.357262 | false | false | false |
andela-ooshodi/codango-debug | codango/votes/tests/test_models.py | 1 | 1232 | from django.test import TestCase
from resources.models import Resource
from votes.models import Vote
from django.contrib.auth.models import User
class VoteTestModels(TestCase):
def setUp(self):
self.user = User.objects.create(
username='inioluwafageyinbo', password='codango')
def create_... | mit | -5,985,197,929,331,815,000 | 29.8 | 61 | 0.635552 | false | 3.923567 | true | false | false |
ScreamingUdder/mantid | qt/python/mantidqt/widgets/codeeditor/execution.py | 1 | 8375 | # This file is part of the mantidqt package
#
# Copyright (C) 2017 mantidproject
#
# 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) an... | gpl-3.0 | 6,586,381,880,861,005,000 | 33.751037 | 111 | 0.605254 | false | 4.27078 | false | false | false |
ScreenZoneProjects/ScreenBot-Discord | cogs/game.py | 1 | 3828 | import discord
from discord.ext import commands
import requests
from .utils.dataIO import dataIO
from collections import defaultdict
import os
import json
class Game:
"""Trouver les infos d'un jeu sur ScreenScraper."""
def __init__(self, bot):
self.bot = bot
settings = dataIO.load_json("data/... | gpl-3.0 | -4,469,105,939,957,389,300 | 45.012048 | 219 | 0.572663 | false | 3.418979 | false | false | false |
cb1234/pynet-test | pyth_ansibel/class4/ex4_pexpect_me.py | 1 | 1504 | #!/usr/bin/env python
'''
Use Pexpect to change the logging buffer size(logging buffered <size>).
Verify this change by examining the output of 'show run'.
'''
import pexpect
import time
from getpass import getpass
def login(ssh_conn):
'''
Handle sending password
'''
password = getpass()
ssh_conn.... | apache-2.0 | 4,148,273,604,985,041,000 | 20.485714 | 82 | 0.621011 | false | 3.402715 | false | false | false |
FireBladeNooT/Medusa_1_6 | lib/tvdbapiv2/models/series_images_query_params.py | 1 | 3086 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
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... | gpl-3.0 | 6,453,343,939,771,762,000 | 26.070175 | 77 | 0.567077 | false | 4.61976 | false | false | false |
nilouco/dpAutoRigSystem | dpAutoRigSystem/Modules/dpSteering.py | 1 | 14266 | # importing libraries:
import maya.cmds as cmds
from Library import dpUtils as utils
import dpBaseClass as Base
import dpLayoutClass as Layout
# global variables to this module:
CLASS_NAME = "Steering"
TITLE = "m158_steering"
DESCRIPTION = "m159_steeringDesc"
ICON = "/Icons/dp_steering.png"
class Steering(Base... | gpl-2.0 | 310,895,733,879,030,460 | 63.845455 | 201 | 0.609 | false | 3.682499 | false | false | false |
tulth/diy-acura-bluetooth | target_desktop/py_lib/mbus/nibbles/__init__.py | 1 | 7068 | #!/bin/env python
from __future__ import print_function
import sys
import os
import datetime
import string
import ctypes
from .. import toggles
from .. import mbusTime
from ... import mbus
MAX_ARRAY_SIZE = 32
MBUS_LOW_TOO_LONG_CODE = 16
MBUS_TIMEOUT_CODE = 17
MBUS_END_MSG_CODE = 18
def nibbleSeq2Str(nibbleSeq):
... | mit | -6,940,255,234,127,763,000 | 32.339623 | 104 | 0.593096 | false | 3.53047 | false | false | false |
osisoft/OMF-Samples | Community Samples/Python3/SendOMFDataToPISystemFromBeagleBoneBlue.py | 1 | 23066 | #!/usr/bin/env python3
#Copyright 2018 OSIsoft, LLC
#
#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 agree... | apache-2.0 | 5,637,591,037,841,548,000 | 46.36345 | 193 | 0.569106 | false | 4.439184 | false | false | false |
RKrahl/photo-tools | photo/qt/imageViewer.py | 1 | 17504 | """Provide a PySide ImageViewer window.
"""
import sys
from PySide import QtCore, QtGui
import photo.index
from photo.listtools import LazyList
from photo.qt.image import Image
from photo.qt.filterDialog import FilterDialog
from photo.qt.imageInfoDialog import ImageInfoDialog
from photo.qt.overviewWindow import Overvi... | apache-2.0 | -1,181,274,713,418,973,000 | 37.81153 | 79 | 0.595921 | false | 4.249575 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-web/azure/mgmt/web/models/validate_response.py | 1 | 1056 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 8,262,153,767,385,893,000 | 33.064516 | 76 | 0.58428 | false | 4.672566 | false | false | false |
eirmag/weboob | modules/youtube/pages.py | 1 | 4197 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Christophe Benz, Romain Bignon
#
# This file is part of weboob.
#
# weboob 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 Licen... | agpl-3.0 | -8,146,902,619,968,947,000 | 31.789063 | 112 | 0.631165 | false | 3.843407 | false | false | false |
asmi92/odu-acm | raffleslave.py | 1 | 1668 | import tweepy
from pymongo import MongoClient
class RaffleSlave:
"The class responsbile for a single raffle, a new instance for each individual raffle"
Params = None
api = None
alive = True
def __init__(self, hashtag, max, id, owner ):
self.Params = {}
self.Params['max'] = max
... | mit | -8,022,019,772,720,388,000 | 37.790698 | 302 | 0.643285 | false | 3.005405 | false | false | false |
donour/racepi | python/racepi/sensor/handler/gps.py | 1 | 1915 | #!/usr/bin/env python3
# Copyright 2016 Donour Sizemore
#
# This file is part of RacePi
#
# RacePi 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.
#
# RacePi is distributed in the hope that it will ... | gpl-2.0 | -7,328,198,086,987,251,000 | 29.396825 | 91 | 0.639164 | false | 3.689788 | false | false | false |
markkorput/py2030 | py2030/components/osx_osc_video_resumer.py | 1 | 1427 | import os
import logging
from py2030.base_component import BaseComponent
class OsxOscVideoResumer(BaseComponent):
config_name = 'osx_osc_video_resumers'
def __init__(self, options = {}):
self.options = options
self.resume_on = options['resume_on'] if 'resume_on' in self.options else []
... | mit | 6,952,581,819,394,236,000 | 36.552632 | 144 | 0.622285 | false | 3.658974 | false | false | false |
RincewindLangner/Game_database | V12/gameDataEntry.py | 1 | 5594 | import gameValueEntry # enters the game data to the database
import ids
import sqlite3
# add the game data to the games database.
def gameDataComm(sqlite_file, numVal=0, expansion = ""):
"""Getting the data for each game to enter into the database"""
# for database table - games
# numVal = 0, no expansion. numVal ... | gpl-3.0 | -9,083,329,996,689,503,000 | 27.540816 | 166 | 0.692349 | false | 3.224207 | false | false | false |
Beautiful-Flowers/object_recognizer | or_lib/src/or_lib/img_manip.py | 1 | 1267 | import cv2
import cv2.cv as cv
import math
# Structuring element for morphing
def getStructuringElement(morphType, size):
return cv2.getStructuringElement(morphType, (2*size + 1, 2*size + 1), (size, size))
# Bounding rectangle for images
def getBoundingRectangle(img, kp, width, height, multiplier):
size = int(kp.... | gpl-2.0 | -3,961,185,064,622,368,300 | 32.368421 | 100 | 0.689818 | false | 2.879545 | false | false | false |
rhyshort/rhysbot-plugins | plugins/bus.py | 1 | 4284 | import logging
import posixpath
import requests
import arrow
from functools import partial
from errbot import BotPlugin, botcmd
from apscheduler.scheduler import Scheduler
from BeautifulSoup import BeautifulSoup
STOPS = {
'xmassteps': 'bstgajt',
'centre': 'bstgajp',
'hippodrome': 'bstdwmd',
'kennave':... | apache-2.0 | -2,113,667,724,509,997,000 | 28.342466 | 96 | 0.479692 | false | 3.751313 | false | false | false |
alexrudy/Zeeko | tests/workers/basic.py | 1 | 8778 | #!/usr/bin/env python
import click
import zmq
import logging
import socket
import urlparse
import time
import h5py
import os
def to_bind(address):
"""Parse an address to a bind address."""
parsed = urlparse.urlparse(address)
hostname = socket.gethostbyname(parsed.hostname)
return "{0.scheme}://{hostn... | bsd-3-clause | -7,145,910,647,417,785,000 | 33.976096 | 165 | 0.598542 | false | 3.34655 | false | false | false |
USGSDenverPychron/pychron | pychron/updater/packager.py | 1 | 4769 | # ===============================================================================
# Copyright 2014 Jake Ross
#
# 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... | apache-2.0 | -5,193,884,487,105,296,000 | 33.557971 | 98 | 0.533235 | false | 3.761041 | false | false | false |
wheeler-microfluidics/pygtkhelpers | pygtkhelpers/ui/objectlist/column.py | 1 | 15230 | # -*- coding: utf-8 -*-
"""
pygtkhelpers.ui.objectlist.column
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: 2005-2008 by pygtkhelpers Authors
:license: LGPL 2 or later (see README/COPYING/LICENSE)
"""
import gtk
class PropertyMapper(object):
def __init__(self, prop, attr=None, format_func=Non... | lgpl-3.0 | -1,343,680,139,629,024,500 | 35.876513 | 80 | 0.612213 | false | 3.825672 | false | false | false |
hack-shack/rorbuild | pyBuilder/MyGUIBuilder.py | 1 | 2559 | from pyBuilder import *
class MyGUIBuilder(BuildCMakeTarget):
def __init__(self):
self.initPaths()
def extract(self):
return_value = self.unzip('files/mygui-trunk*.zip')
# unpack dependencies, needed for freetype
return_value |= self.unzip('files/OgreDependencies_MSVC... | gpl-3.0 | -7,489,517,678,223,721,000 | 36.80303 | 194 | 0.65807 | false | 3.064671 | false | false | false |
stanzikratel/barbican-2 | bin/barbican-db-manage.py | 1 | 3947 | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
import os
import sys
import argparse
sys.path.insert(0, os.getcwd())
from barbican.model.migration import commands
from barbican.openstack.common import log
class DatabaseManager:
"""
Builds and executes a CLI parser to manage the Barbican d... | apache-2.0 | -6,719,331,947,827,315,000 | 36.590476 | 79 | 0.524196 | false | 4.807552 | false | false | false |
blaze/distributed | distributed/comm/utils.py | 1 | 3183 | import logging
import math
import socket
import dask
from dask.sizeof import sizeof
from dask.utils import parse_bytes
from .. import protocol
from ..utils import get_ip, get_ipv6, nbytes, offload
logger = logging.getLogger(__name__)
# Offload (de)serializing large frames to improve event loop responsiveness.
# W... | bsd-3-clause | -1,016,717,162,802,303,000 | 26.678261 | 84 | 0.615457 | false | 4.013871 | false | false | false |
Jaesin/OctoPrint | src/octoprint/util/gcodeInterpreter.py | 1 | 15988 | # coding=utf-8
from __future__ import absolute_import, division, print_function
__author__ = "Gina Häußge <osd@foosel.net> based on work by David Braam"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2013 David Braam, Gina Häußge - Released under t... | agpl-3.0 | -3,879,995,186,093,867,000 | 29.916828 | 142 | 0.623561 | false | 2.909885 | false | false | false |
madscatt/zazzie_1.5 | trunk/sassie/calculate/sascalc/cluster_ensemble.py | 1 | 5406 | import numpy
import os
import time
from collections import defaultdict
import sasmol.sasmol as sasmol
try:
dummy = os.environ["DISPLAY"]
except:
# allows for creating plots without an xserver
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def com_clustering(pdb_file_name, dcd... | gpl-3.0 | 810,665,458,775,670,700 | 34.565789 | 80 | 0.557344 | false | 3.368224 | false | false | false |
opensemanticsearch/open-semantic-etl | src/opensemanticetl/enhance_ocr_descew.py | 1 | 3213 | import os
import shutil
import sys
import tempfile
import subprocess
import etl_plugin_core
from tesseract_cache import tesseract_cache
#
# Optimize image with Scantailor before OCR
#
# Should be runned additionally to normal unoptimized OCR
# because sometimes Scantailor results incomplete with fewer text parts than... | gpl-3.0 | 5,599,863,580,580,049,000 | 28.477064 | 151 | 0.620604 | false | 4.021277 | false | false | false |
niranjan94/open-event-orga-server | app/views/users/ticket_sales.py | 1 | 24513 | from StringIO import StringIO
from flask import make_response
import pycountry
import re
from datetime import datetime
from flask import Blueprint
from flask import abort, jsonify
from flask import redirect, flash
from flask import request, render_template
from flask import url_for
from xhtml2pdf import pisa
from ap... | gpl-3.0 | -3,727,915,522,055,709,700 | 39.517355 | 124 | 0.588749 | false | 3.792821 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.