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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0xffea/keystone | keystone/auth/plugins/token.py | 1 | 2100 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack 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 requ... | apache-2.0 | 8,336,691,098,386,068,000 | 37.181818 | 78 | 0.633333 | false | 4.242424 | false | false | false |
crashbit/twitter | twitter/api.py | 1 | 12284 | # encoding: utf-8
from __future__ import unicode_literals
try:
import urllib.request as urllib_request
import urllib.error as urllib_error
except ImportError:
import urllib2 as urllib_request
import urllib2 as urllib_error
try:
from cStringIO import StringIO
except ImportError:
from io import ... | mit | 4,062,506,617,904,551,400 | 29.48139 | 79 | 0.558694 | false | 4.209733 | false | false | false |
precog/precog_python_client | precog/__init__.py | 1 | 12732 | # This file is subject to the terms and conditions defined in LICENSE.
# (c) 2011-2013, ReportGrid Inc. All rights reserved.
import json
import logging
import posixpath
import time
import datetime
import sys
from httplib import HTTPSConnection, HTTPConnection
from urllib import urlencode, quote_plus, pathname2url
fro... | mit | -5,901,166,349,713,652,000 | 35.377143 | 103 | 0.637842 | false | 3.663885 | false | false | false |
DeTeReR/wedding_seating | tables/score.py | 1 | 2311 | from functools import total_ordering
def _less_than(first, second):
if first == second:
return False
if first is None:
return True
if second is None:
return False
return first < second
def _score_difference_multiplier(old, new):
new = 0 if new is None else new
old = 1 if old is None or old == 0 else old... | gpl-2.0 | 4,838,348,078,097,547,000 | 27.54321 | 107 | 0.675898 | false | 3.028834 | false | false | false |
nive/nive_cms | nive_cms/text.py | 1 | 1698 | # Copyright 2012, 2013 Arndt Droullier, Nive GmbH. All rights reserved.
# Released under GPL3. See license.txt
#
__doc__ = """
Text
-----
Text element for the web page. Can be used to add headers, preformatted text
and paragraphs to the web page.
"""
from nive_cms.i18n import _
from nive.utils.utils import ConvertHT... | gpl-3.0 | 5,148,292,638,281,096,000 | 27.779661 | 133 | 0.656066 | false | 3.544885 | false | false | false |
y-usuzumi/survive-the-course | leetcode/15.3SumClosest/main.py | 1 | 1402 | from typing import *
class Solution:
def threeSumClosest(self, nums: List[int], target: int) -> int:
nums = sorted(nums)
idx1 = 0
l = len(nums)
closest = None
closest_dist = 2 ** 31 - 1
has_eq = False
while idx1 < l - 2:
idx2, idx3 = idx1 + 1, l -... | bsd-3-clause | -3,599,903,489,596,038,700 | 30.863636 | 72 | 0.400856 | false | 3.789189 | false | false | false |
Bajoo/client-pc | bajoo/gui/windows/change_password_window/change_password_window_controller.py | 1 | 2346 |
import logging
from ....api import Session
from ....common.i18n import N_
from ....common.signal import Signal
from ....promise import reduce_coroutine
from ...event_promise import ensure_gui_thread
from ..base_window_controller import BaseWindowController
_logger = logging.getLogger(__name__)
class ChangePassword... | gpl-3.0 | 8,026,490,227,641,596,000 | 30.702703 | 77 | 0.62873 | false | 4.385047 | false | false | false |
leonardr/botfriend | botfriend/publish/_mastodon.py | 1 | 2797 | from nose.tools import set_trace
from mastodon import Mastodon
from botfriend.bot import Publisher
class MastodonPublisher(Publisher):
def __init__(self, bot, full_config, instance):
for i in 'client_id', 'access_token':
if not i in instance:
raise ValueError(
... | mit | 7,042,999,248,382,747,000 | 36.797297 | 86 | 0.560601 | false | 4.62314 | false | false | false |
DavidPowell/OpenModes | openmodes/mesh/mesh.py | 1 | 9578 | # -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# OpenModes - An eigenmode solver for open electromagnetic resonantors
# Copyright (C) 2013 David Powell
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gen... | gpl-3.0 | -1,713,522,549,559,117,600 | 33.453237 | 79 | 0.610984 | false | 4.151712 | false | false | false |
ferreum/distanceutils | distance/bytes.py | 1 | 36814 | """.bytes file reading and writing primitives."""
import sys
from io import BytesIO
from struct import Struct
from contextlib import contextmanager
from collections import namedtuple
from .printing import PrintContext
from ._argtaker import ArgTaker
from .lazy import LazySequence
from trampoline import trampoline
i... | mit | -955,959,110,575,302,000 | 29.200164 | 94 | 0.550742 | false | 4.129908 | false | false | false |
dasbruns/netzob | src/netzob/Import/PCAPImporter/PCAPImporter.py | 1 | 19754 | # -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocol... | gpl-3.0 | -8,774,312,445,489,235,000 | 47.053528 | 157 | 0.582835 | false | 3.994741 | false | false | false |
tickbg/skaer | naming/expressions.py | 1 | 3492 | import re
explanation_words = (
'ac3','dts','custom','dc','divx','divx5','dsr','dsrip','dutch','dvd','dvdrip','dvdscr',
'dvdscreener','screener','dvdivx','cam','fragment','fs','hdtv','hdrip','hdtvrip','internal',
'limited','multisubs','ntsc','ogg','ogm','pal','pdtv','proper','repack','rerip','retail',... | gpl-3.0 | -3,337,043,514,736,104,000 | 35.148936 | 117 | 0.443299 | false | 2.641452 | false | false | false |
irmen/Pyro5 | examples/privilege-separation/drop_privs_server.py | 1 | 1333 | import os
import pwd
import Pyro5.api
class RestrictedService:
@Pyro5.api.expose
def who_is_server(self):
return os.getuid(), os.getgid(), pwd.getpwuid(os.getuid()).pw_name
@Pyro5.api.expose
def write_file(self):
# this should fail ("permission denied") because of the dropped privileg... | mit | 4,346,566,321,728,962,000 | 30 | 112 | 0.5994 | false | 3.535809 | false | false | false |
runt18/mojo | build/mac/tweak_info_plist.py | 1 | 10192 | #!/usr/bin/env python
# Copyright (c) 2012 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.
#
# Xcode supports build variable substitutions and CPP; sadly, that doesn't work
# because:
#
# 1. Xcode wants to do the Info.pli... | bsd-3-clause | -5,471,546,585,092,379,000 | 35.4 | 80 | 0.681809 | false | 3.680751 | false | false | false |
jolyonb/edx-platform | openedx/core/djangoapps/oauth_dispatch/jwt.py | 1 | 8211 | """Utilities for working with ID tokens."""
from __future__ import absolute_import
import json
from time import time
from django.conf import settings
from edx_django_utils.monitoring import set_custom_metric
from edx_rbac.utils import create_role_auth_claim_for_user
from jwkest import jwk
from jwkest.jws import JWS
... | agpl-3.0 | 2,019,161,785,056,372,000 | 36.322727 | 92 | 0.670442 | false | 3.749315 | false | false | false |
gilbertpilz/solum | solum/api/handlers/infrastructure_handler.py | 1 | 2877 | # Copyright 2014 - Numergy
#
# 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, s... | apache-2.0 | -575,896,221,804,397,060 | 32.847059 | 77 | 0.646854 | false | 3.946502 | false | false | false |
kkarbasi/GFFBlaster | GFFBlaster.py | 1 | 4571 | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 04 14:04:54 2015
@author: Kaveh
"""
import sys
import os.path
from Bio.Blast import NCBIWWW
from Bio.Blast import NCBIXML
class GFFBlaster:
def __init__(self , fastaData , gffData):
self.fastaData = fastaData
self.gffData = gffData
self.seqG... | gpl-2.0 | -5,769,246,530,430,649,000 | 30.972028 | 131 | 0.554364 | false | 3.513451 | false | false | false |
mark-burnett/filament-dynamics | actin_dynamics/visualization/contexts.py | 1 | 3904 | # Copyright (C) 2011 Mark Burnett
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program i... | gpl-3.0 | 2,737,465,348,615,916,500 | 33.245614 | 74 | 0.66624 | false | 3.711027 | false | false | false |
gousiosg/attic | coding-puzzles/strings.py | 1 | 5392 | from typing import List
# The function first discards as many whitespace characters as
# necessary until the first non-whitespace character is found.
# Then, starting from this character, takes an optional initial
# plus or minus sign followed by as many numerical digits as possible,
# and interprets them as a numeri... | mit | 8,027,056,327,314,327,000 | 22.241379 | 87 | 0.498702 | false | 3.177372 | false | false | false |
jayceyxc/hue | apps/security/src/security/api/hive.py | 1 | 13249 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 137,309,139,903,820,900 | 29.955607 | 181 | 0.665484 | false | 3.732113 | false | false | false |
chrisburr/lhcb-talky | talky/create_database.py | 1 | 8213 | # [SublimeLinter flake8-max-line-length:120]
from datetime import datetime, timedelta
import random
import os
from os.path import join, isdir
import secrets
from matplotlib import pyplot as plt
from flask_security.utils import encrypt_password
import lipsum
from .talky import app, mail
from .login import user_datasto... | bsd-3-clause | -8,199,905,649,734,249,000 | 35 | 145 | 0.600268 | false | 3.530323 | false | false | false |
OCA/l10n-italy | l10n_it_fatturapa_in_rc/wizard/wizard_import_fatturapa.py | 1 | 2085 | from odoo import models
class WizardImportFatturapa(models.TransientModel):
_inherit = "wizard.import.fatturapa"
def _prepare_generic_line_data(self, line):
retLine = {}
account_tax_model = self.env['account.tax']
if float(line.AliquotaIVA) == 0.0 and line.Natura.startswith('N6'):
... | agpl-3.0 | 4,362,262,520,405,419,500 | 40.7 | 77 | 0.541966 | false | 3.670775 | false | false | false |
prlosana/BuzzBoards | led7.py | 1 | 4869 | #-------------------------------------------------------------------------------
# Name: led7.py
# Purpose: Use SAA1064 LED Driver to control FortiTo's Buzz-Led7
# Author: Anasol Pena-Rios
# Created: 22/01/2013
# Copyright: (c) FortiTo 2013
# Version: 1.0
#-------------------------------... | agpl-3.0 | 86,581,771,263,870,610 | 25.177419 | 84 | 0.429657 | false | 3.463016 | false | false | false |
kmatzen/nyc3dcars-toolkit | scores.py | 1 | 19354 | """Implements all of the functions that compute the geographic
scores using geodatabase."""
from nyc3dcars import Photo, Detection, Elevation, \
PlanetOsmLine, Roadbed, GeoidHeight
from sqlalchemy import func
import sys
from collections import namedtuple
import numpy
import math
import logging
import pygeo
i... | bsd-3-clause | -3,833,514,409,460,040,700 | 25.806094 | 78 | 0.588457 | false | 3.54989 | false | false | false |
dgenin/nand2tetris | projects/07/VM2Hack.py | 1 | 5530 | import sys
class Parse:
command = "\n"
line = 0
eof = False
def __init__(self, file_name):
try:
self.f = open(file_name, "r")
except IOError:
print("Could not open {}", f)
exit(1)
def hasMoreCommands(self):
... | mit | -4,668,274,969,899,857,000 | 30.339181 | 105 | 0.399638 | false | 3.933144 | false | false | false |
yunify/qingcloud-sdk-python | qingcloud/iaas/actions/vxnet.py | 1 | 9123 | # =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | apache-2.0 | -7,291,875,216,326,923,000 | 46.025773 | 131 | 0.450619 | false | 5.261246 | false | false | false |
tdido/tstk | tstk/io.py | 1 | 2459 | def openfastx(fpath,mode="rt"):
import os
gz = False
fpathnoext, fext = os.path.splitext(fpath)
if fext == '.gz':
gz = True
fpathnoext, fext = os.path.splitext(fpathnoext)
if fext.lstrip(".") in ['fasta','fa']:
ftype = 'fasta'
elif fext.lstrip(".") in ['fastq','fq']:
... | mit | 4,320,139,171,405,635,600 | 35.161765 | 113 | 0.53843 | false | 3.860283 | false | false | false |
actioninja/MemebotJones | memebotjones/music.py | 1 | 5440 | import memebotjones.base as base
import discord
import asyncio
import json
import pickle
from random import choice
# set up some needed globals
with open("config.json") as data:
config = json.load(data)
queue_list = []
skip_list = []
player = None
shutdown_flag = False
snark_list = [
"is not in the sudoers fi... | gpl-3.0 | -352,312,786,594,506,600 | 33.213836 | 117 | 0.648713 | false | 3.785665 | true | false | false |
matejcik/weblate | weblate/urls.py | 1 | 23252 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2016 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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, eith... | gpl-3.0 | 3,698,905,534,964,588,000 | 26.128355 | 76 | 0.548454 | false | 3.660107 | false | false | false |
ftl/heating_mqtt | heating_simulation.py | 1 | 2028 | #!/usr/bin/python
# coding=latin-1
import serial
import argparse
# command line arguments
commandline = argparse.ArgumentParser(description='simulate serial communication with AlphaInnotec heating controller')
commandline.add_argument('--serial_port', '-p', default='/dev/ttyUSB0', help='the serial port to communicate ... | unlicense | -6,933,000,625,256,092,000 | 28.405797 | 225 | 0.690335 | false | 2.304545 | false | false | false |
aimas/TuniErp-8.0 | openerp/cli/start.py | 1 | 2751 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import glob
import os
import sys
from . import Command
from .server import main
from openerp.modules.module import get_module_root, MANIFEST
from openerp.service.db import _create_empty_database, DatabaseExists
class Start(Command):
"""Quick start the... | agpl-3.0 | 5,323,789,973,399,093,000 | 35.68 | 104 | 0.59651 | false | 3.697581 | false | false | false |
Ecotrust/forestplanner | lot/trees/migrations/0013_auto__add_field_scenariostand_acres__add_field_scenariostand_offset.py | 1 | 36112 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'ScenarioStand.acres'
db.add_column('trees_scenariostand', 'acres',
sel... | bsd-3-clause | 7,316,002,598,416,797,000 | 89.736181 | 222 | 0.543448 | false | 3.502279 | false | false | false |
bihealth/flowcelltool | flowcelltool/flowcells/migrations/0010_auto_20180322_0757.py | 1 | 3571 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-03-22 07:57
from __future__ import unicode_literals
from django.db import migrations, models
FLOWCELL_STATUS_INITIAL = 'initial'
FLOWCELL_STATUS_SEQ_RUNNING = 'seq_running'
FLOWCELL_STATUS_SEQ_COMPLETE = 'seq_complete'
FLOWCELL_STATUS_SEQ_RELEASED = 'seq_r... | mit | -327,925,581,789,153,400 | 45.986842 | 285 | 0.630076 | false | 3.770855 | false | false | false |
dashmug/django-payments | payments/models.py | 1 | 6592 | from __future__ import unicode_literals
import json
from uuid import uuid4
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
from . import provider_factory
DEFAULT_PAYMENT_STATUS_CHOICES = (
('waiting... | bsd-3-clause | -8,336,487,592,980,883,000 | 35.41989 | 79 | 0.623635 | false | 4.112289 | false | false | false |
palominodb/tableizer | tableizer/ttt_api/urls.py | 1 | 1870 | # urls.py
# Copyright (C) 2009-2013 PalominoDB, Inc.
#
# You may contact the maintainers at eng@palominodb.com.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the Licens... | gpl-2.0 | -4,996,133,155,390,779,000 | 46.948718 | 108 | 0.688235 | false | 3.67387 | false | false | false |
ReneHollander/rep0st | rep0st/analyze/wavelet_hash_analyzert.py | 1 | 2394 | import cv2
import numpy
import pywt
from injector import Module, multiprovider, singleton
from rep0st.analyze import Analyzer, Analyzers, InputImage
TYPE_NAME = "WHASH"
@singleton
class WaveletHashAnalyzer(Analyzer):
hash_size: int = None
image_scale: int = None
mode: str = None
remove_max_haar_ll: bool = N... | mit | -4,197,824,376,207,317,000 | 29.303797 | 84 | 0.63868 | false | 3.222073 | false | false | false |
MartinThoma/algorithms | noise/white/python.py | 1 | 1503 | #!/usr/bin/env python
"""Create a white noise RGB image of the dimensions you want."""
import Image
import numpy
def create_white_noise(outfile, width, height):
"""
Create white noise RGB image
Parameters
----------
outfile : str
width : int
height : int
"""
array = numpy.random... | mit | -5,458,365,709,487,750,000 | 29.673469 | 74 | 0.526946 | false | 4.667702 | false | false | false |
txomon/vdsm | vdsm/network/api.py | 1 | 39169 | # Copyright 2011-2014 Red Hat, Inc.
#
# 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.
#
# This program is distributed in... | gpl-2.0 | 8,352,791,766,073,405,000 | 39.25591 | 79 | 0.594016 | false | 4.155862 | true | false | false |
funkybob/django-marionette | marionette/__init__.py | 1 | 1712 |
from cgi import parse_header
import json
from django.http import HttpResponse
from django.core.handlers.wsgi import ISO_8859_1
from django.core.serializers.json import DjangoJSONEncoder
from django.views.generic import View
RPC_MARKER = '_rpc'
class RPCMixin(object):
'''Mix in to a standard View to provide RP... | mit | -2,164,420,703,256,248,600 | 30.127273 | 101 | 0.655958 | false | 3.926606 | false | false | false |
cc1-cloud/cc1 | src/cm/views/ec2ctx/latest/meta_data/__init__.py | 1 | 7149 | # _*_ coding: utf_8 _*_
# @COPYRIGHT_begin
#
# Copyright [2010_2013] Institute of Nuclear Physics PAN, Krakow, Poland
#
# 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.apac... | apache-2.0 | 6,059,017,828,234,703,000 | 27.702811 | 106 | 0.595635 | false | 3.261981 | false | false | false |
bt3gl/Numerical-Methods-for-Physics | homework6_rayleigh-taylor_instability/util/runparams.py | 1 | 6993 | """
basic syntax of the parameter file is:
# simple parameter file
[driver]
nsteps = 100 ; comment
max_time = 0.25
[riemann]
tol = 1.e-10
max_iter = 10
[io]
basename = myfile_
The recommended way to use this is for the code to have a master list
of parameters and their defaults (e.g. _defaults), and then ... | apache-2.0 | -1,651,459,131,550,943,700 | 26.423529 | 91 | 0.5996 | false | 4.1625 | false | false | false |
pobear/restless | restless/utils.py | 1 | 2175 | import datetime
import decimal
import traceback
try:
from django.conf import settings
from django.utils import timezone
except ImportError:
settings = None
timezone = None
try:
import json
except ImportError:
import simplejson as json
class MoreTypesJSONEncoder(json.JSONEncoder):
"""
... | bsd-3-clause | -3,955,385,150,163,104,300 | 30.536232 | 93 | 0.64046 | false | 4.206963 | false | false | false |
kovalp/libnpy | src/check_fnpy3.py | 1 | 1409 | #!/usr/bin/env python
import numpy as np
n = 0; t = 0;
arr = np.load('fa.npy')
t=t+1;
if arr.dtype!='float32': print("arr.dtype!='float32'"); n = n + 1
t=t+1;
if any(arr!=[1,2,3,4]): print("arr!=[1,2,3,4]"); n = n + 1
arr = np.load("fb.npy")
t=t+1
if arr.dtype!='float32': print("arr.dtype!='float32'"); n = n + 1
t=... | mit | 5,127,043,418,838,096,000 | 29.630435 | 122 | 0.534422 | false | 2.021521 | false | true | false |
medunigraz/outpost | src/outpost/django/base/models.py | 1 | 3219 | import logging
import subprocess
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.translation import ugettext_lazy as _
from PIL import (
Image,
ImageColor,... | bsd-2-clause | -5,118,186,053,709,484,000 | 23.386364 | 72 | 0.590556 | false | 4.153548 | false | false | false |
kastman/occiput | occiput/Core/Conversion.py | 1 | 1085 | # occiput
# Stefano Pedemonte
# Harvard University, Martinos Center for Biomedical Imaging
# Dec. 2014, Boston, MA
# April. 2014, Boston, MA
import occiput as __occiput
import nibabel as __nibabel
import warnings as __warnings
with __warnings.catch_warnings():
__warnings.simplefilter("ignore")
import nipy... | apache-2.0 | 1,105,560,736,878,284,200 | 23.681818 | 93 | 0.661751 | false | 2.692308 | false | false | false |
Weavebytesipl/FutureERP | common/tests/test_products.py | 1 | 1286 | from .base import BaseTestCase
from common.models import Product
class ProductTestCase(BaseTestCase):
def setUp(self):
"""
create a test product test cases
"""
super(ProductTestCase, self).setUp()
# creating dummy product
self.product = Product()
self.produ... | gpl-3.0 | -6,956,370,038,416,366,000 | 26.361702 | 72 | 0.589425 | false | 4.272425 | true | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201811/exchange_rate_service/create_exchange_rates.py | 1 | 1966 | #!/usr/bin/env python
#
# Copyright 2015 Google Inc. 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 requir... | apache-2.0 | 1,422,036,480,622,725,600 | 32.896552 | 77 | 0.656663 | false | 4.191898 | false | false | false |
cvng/django-geocoder | django_geocoder/mixins.py | 1 | 1690 | import warnings
from django_geocoder.wrapper import get_cached
class GeoMixin(object):
# Overridable by subclasses
geocoded_by = 'address'
def need_geocoding(self):
"""
Returns True if any of the required address components is missing
"""
need_geocoding = False
fo... | mit | -6,919,923,569,666,645,000 | 34.208333 | 104 | 0.566864 | false | 4.617486 | false | false | false |
QISKit/qiskit-sdk-py | test/python/visualization/test_pass_manager_drawer.py | 1 | 4089 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | apache-2.0 | -4,434,151,788,850,631,700 | 39.89 | 98 | 0.703106 | false | 3.612191 | true | false | false |
reiser4/amc | keyboard/keyboardxkeys.py | 1 | 8083 | '''
Classe per la lettura della tastiera collegata via usb
'''
import threading
import os, sys
from evdev import InputDevice, list_devices, categorize, ecodes
sys.path.insert(0, '../common')
from atomicwrite import AtomicWrite
class HandlerKeyboards(object):
def __init__(self, usbdevice):
'''
Come... | gpl-2.0 | -5,057,560,359,653,978,000 | 42.224599 | 167 | 0.520723 | false | 3.692554 | false | false | false |
cofiem/logomachy | unravel/tests/test_readability.py | 1 | 4124 | import logging
from django.test import TestCase
from unravel.lib.text_analysis.readability import AutomatedReadabilityIndex
from unravel.lib.text_analysis.readability.coleman_liau_index import ColemanLiauIndex
from unravel.lib.text_analysis.readability import DaleChallReadabilityFormula
from unravel.lib.text_analysis... | apache-2.0 | 6,626,802,706,164,468,000 | 49.91358 | 121 | 0.669496 | false | 3.822057 | true | false | false |
gennadykr/python_training | generator/group.py | 1 | 1049 | from model.group import Group
import random
import string
import json
import os
import getopt
import sys
import jsonpickle
try:
opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"])
except:
getopt.usage()
sys.exit(2)
n = 5
f = "data/groups.json"
for o, a in opts:
if o == "... | apache-2.0 | 1,407,437,091,399,537,000 | 21.340426 | 110 | 0.63489 | false | 3.198171 | false | false | false |
leasunhy/GalaxyOJ | server/views/upload_view.py | 1 | 1721 | from . import upload
from werkzeug.security import safe_join
from werkzeug import secure_filename
from flask import request, jsonify, url_for, current_app, abort, send_from_directory
import hashlib
from datetime import datetime
# for CKEDITOR
@upload.route('/upload_image', methods=['POST'])
def upload_image():
... | gpl-3.0 | 5,127,380,405,732,873,000 | 35.617021 | 109 | 0.643231 | false | 3.929224 | false | false | false |
deklungel/iRulez | old/modules/core/core - Copy.py | 1 | 66069 | #!/usr/bin/env python
#Version 5.5
"""
Created on Sun Jan 16 2017
@author: Laurent
"""
import sys
sys.path.append('/var/www/html/modules/libraries')
from astral import *
from time import gmtime,strftime
import datetime
import paho.mqtt.client as mqtt
import os
import time
import string
import smtplib
import mysql.con... | mit | -4,211,515,188,986,145,000 | 44.502066 | 261 | 0.639634 | false | 2.674317 | false | false | false |
raphaottoni/twitter-collector | collector.py | 1 | 2118 | #! /usr/bin/python
import tweepy
#import twitter dev account informaiton
from config import *
import gzip
import json
from multiprocessing import Pool
import time
import logging
#loggin setup
logging.basicConfig(filename="collector.log", filemode="a", level=logging.INFO, format="[ %(asctime)s ] %(levelname)s : %(mes... | mit | -9,043,031,379,053,527,000 | 28.416667 | 133 | 0.65864 | false | 3.213961 | false | false | false |
salceson/android-copernicus | device/device/device.py | 1 | 2996 | #!/usr/bin/env python
# coding=utf-8
__author__ = 'Michał Ciołczyk'
VIRTUAL_COPERNICUS = True
MCAST_GRP = '234.6.6.6'
MCAST_PORT = 3666
FLOOR = '1' # 1 at the moment only
ROOM = 'kitchen' # kitchen|corridor
DELAY = 5 # in seconds
DEBUG = True
from serial import Serial
if VIRTUAL_COPERNICUS:
# ----- BEGIN INI... | mit | 5,237,248,984,032,369,000 | 22.209302 | 75 | 0.602204 | false | 3.29011 | false | false | false |
chop-dbhi/ehb-client | setup.py | 1 | 4586 | #from distutils.core import setup
#
from setuptools import setup
#
from distutils.command.install_data import install_data
from distutils.command.install import INSTALL_SCHEMES
import os
import sys
main_package = 'ehb_client'
class osx_install_data(install_data):
# On MacOS, the platform-specific lib dir is /Sys... | bsd-2-clause | 3,605,603,917,931,651,000 | 28.025316 | 104 | 0.640645 | false | 3.665867 | false | false | false |
Azure/azure-sdk-for-python | sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/operations/_private_link_resources_operations.py | 1 | 5020 | # 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 may ... | mit | 6,531,409,837,512,051,000 | 46.809524 | 189 | 0.675498 | false | 4.494181 | true | false | false |
tbenthompson/okada_wrapper | setup.py | 1 | 1093 | from numpy.distutils.core import setup, Extension
version = open('VERSION').read().strip('\n')
# -g compiles with debugging information.
# -O0 means compile with no optimization, try -O3 for blazing speed
compile_args = ['-O3']
ext = []
ext.append(Extension('DC3D',
sources = ['okada_wrapper/DC3D.f',... | mit | 2,274,454,879,333,812,200 | 28.540541 | 84 | 0.637694 | false | 3.458861 | false | false | false |
megaprojectske/megaprojects.co.ke | megaprojects/programs/migrations/0004_auto__del_field_image_alt.py | 1 | 3372 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Image.alt'
db.delete_column(u'programs_image', 'alt')
def backwards(self, orm):
... | apache-2.0 | -8,822,621,678,394,434,000 | 56.152542 | 112 | 0.545374 | false | 3.742508 | false | false | false |
momiah/cvariants_opencv | predict.py | 1 | 6542 | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 3 11:57:19 2015
@author: mdmiah
"""
import numpy as np
import random
import cv2
import sys
import modelInputs
import modelMake
import ensembleInputs
import ensembleMake
def predictionsFor(u, labels, brisks, colors):
global probs
count = colors.shape[0]
trai... | gpl-2.0 | 962,487,839,004,187,100 | 32.208122 | 123 | 0.558086 | false | 3.389637 | true | false | false |
Palen/bmat-test | bmat/settings.py | 1 | 2116 | """
Django settings for bmat project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impor... | mit | 7,632,307,555,584,678,000 | 23.045455 | 71 | 0.714556 | false | 3.250384 | false | false | false |
dmnfarrell/peat | pKa/Design_accuracy.py | 1 | 10834 | #!/usr/bin/env python
#
# pKa - various programs and scripts for pKa value analysis, calculation and redesign
# Copyright (C) 2010 Jens Erik Nielsen
#
# 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 Foundat... | mit | -1,235,292,142,420,745,000 | 24.612293 | 120 | 0.522337 | false | 3.94969 | false | false | false |
akittas/geocoder | geocoder/mapbox_reverse.py | 1 | 1454 | #!/usr/bin/python
# coding: utf8
from __future__ import absolute_import
from geocoder.base import Base
from geocoder.mapbox import Mapbox
from geocoder.keys import mapbox_access_token
from geocoder.location import Location
class MapboxReverse(Mapbox, Base):
"""
Mapbox Reverse Geocoding
==================... | mit | -178,563,845,301,585,820 | 28.632653 | 77 | 0.598485 | false | 3.648241 | false | false | false |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/openmdao.main-0.13.0-py2.7.egg/openmdao/main/test/test_rbac.py | 1 | 8309 | """
Test Role-Based Access Control (RBAC).
"""
import inspect
import logging
import os
import socket
import sys
import threading
import unittest
import nose
from openmdao.main.rbac import Credentials, get_credentials, set_credentials, \
need_proxy, rbac, rbac_methods, check_role, \
... | gpl-2.0 | 5,961,070,698,889,552,000 | 35.765487 | 85 | 0.580455 | false | 4.280783 | true | false | false |
cychenyin/sfproxy | py/status.py | 1 | 1169 | #!/usr/bin/env python
import sys
import pprint
from urlparse import urlparse
from thrift.transport import TTransport
from thrift.transport import TSocket
from thrift.transport import THttpClient
from thrift.protocol import TBinaryProtocol
import RegistryProxy
#from RegistryProxy import *
from ttypes import *
class C... | apache-2.0 | -5,757,872,831,266,294,000 | 24.413043 | 65 | 0.611634 | false | 4.602362 | false | false | false |
etherkit/OpenBeacon2 | client/linux-arm/venv/lib/python3.6/site-packages/PyInstaller/utils/osx.py | 1 | 3554 | #-----------------------------------------------------------------------------
# Copyright (c) 2014-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | gpl-3.0 | 295,031,619,414,270,100 | 32.214953 | 89 | 0.638717 | false | 3.80107 | false | false | false |
Bekt/flask-pusher | setup.py | 1 | 2097 | """
Flask-Pusher
------------
Flask-Pusher is a wrapper around `pusher-http-python` and
adds Pusher support for your Flask application.
Easy Setup
``````````
Quickstart:
.. code:: python
from flask_pusher import Pusher
app = Flask(__name__)
pusher = Pusher(app)
# Use any `pusher.Pusher` method.
... | bsd-2-clause | 2,477,771,432,586,572,000 | 22.829545 | 82 | 0.608488 | false | 3.659686 | false | false | false |
Walnoot/graph-isomorphism | gi.py | 1 | 10604 | from basicgraphs import graph # , GraphError, vertex, edge
import permgrputil
from permv2 import permutation
from basicpermutationgroup import Orbit
# deprecated
def color_gradient(bg_1, bg_2, colors):
# types correct?
if not (isinstance(bg_1, graph) and isinstance(bg_2, graph)):
print("Not two graph... | mit | -2,072,899,935,280,558,000 | 32.22884 | 151 | 0.569434 | false | 3.947858 | false | false | false |
plilja/adventofcode | 2019/day15/day15.py | 1 | 2471 | import sys
sys.path.append("..")
from collections import defaultdict
from intcode import IntcodeProcess
UNKNOWN = -1
WALL = 0
OPEN = 1
OXYGEN_SYSTEM = 2
NORTH = 1
SOUTH = 2
WEST = 3
EAST = 4
def explore(instructions):
space = defaultdict(lambda: defaultdict(lambda: UNKNOWN))
def walk(direction, x, y):
... | gpl-3.0 | 6,711,106,795,635,935,000 | 25.569892 | 64 | 0.522461 | false | 3.163892 | false | false | false |
mrrrgn/build-relengapi | relengapi/blueprints/badpenny/rest.py | 1 | 1973 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import datetime
import wsme.types
class BadpennyJob(wsme.types.Base):
"""A job is a single occurrence of a task."... | mpl-2.0 | 641,664,974,216,964,100 | 33.017241 | 78 | 0.705525 | false | 3.708647 | false | false | false |
cloudify-cosmo/cloudify-training-labs | advanced-workflows/workflows-standard-lab/solution/plugins/custom/plugin/workflows.py | 1 | 2225 | '''Copyright Gigaspaces, 2017, All Rights Reserved'''
import json
import re
from cloudify.exceptions import NonRecoverableError, RecoverableError
import requests
CITY_NAME_REGEX = (r'^([a-z]+\,\s?[a-z]{2})$', re.IGNORECASE)
def get_wind_speed(ctx, city_name):
'''
Gets wind speed from an external service ... | apache-2.0 | 7,915,185,650,031,770,000 | 37.362069 | 78 | 0.620674 | false | 3.606159 | false | false | false |
HIIT/mediacollection | sites/kdlehti.py | 1 | 1721 | # -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import processor
from datetime import datetime
def parse( url ):
r = requests.get( url )
if r.status_code == 404:
return processor.create_dictionary('', url, r.status_code, [u''], [u''], u'', u'', u'', u'', [u''], [u''])
r.encoding = 'UTF-8'... | mit | 7,599,628,303,461,196,000 | 44.289474 | 142 | 0.672865 | false | 2.946918 | false | false | false |
python-sasx/sasx | setup.py | 1 | 1713 | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.absp... | mit | -5,837,628,330,606,025,000 | 25.353846 | 74 | 0.68885 | false | 3.789823 | false | false | false |
jakemadison/FeedEater | feedeater/config.py | 1 | 1823 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
from sqlalchemy import create_engine, MetaData
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'database/app.db')
SQLALCHEMY_MI... | agpl-3.0 | -674,163,083,461,122,400 | 32.759259 | 81 | 0.640702 | false | 3.375926 | false | false | false |
IntelligentSigma/PseudoLocCodeExamples | python/Properties.py | 1 | 10451 | #! /usr/bin/env python
## {{{ http://code.activestate.com/recipes/496795/ (r5)
"""
A Python replacement for java.util.Properties class
This is modelled as closely as possible to the Java original.
Created - Anand B Pillai <abpillai@gmail.com>
"""
import sys,os
import re
import time
class IllegalArgumentExceptio... | mpl-2.0 | 4,492,482,763,164,974,000 | 31.659375 | 79 | 0.518419 | false | 4.35277 | false | false | false |
ThePianoDentist/dotaHighlightHelper | api_requests.py | 1 | 2312 | import bz2
import os
import time
from urllib.request import urlopen, Request, urlretrieve
def request_(req_url, sleep_time=1):
print("Requesting: %s" % req_url)
request = Request(req_url)
request.add_header('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2... | mit | 2,054,432,087,653,582,300 | 31.125 | 183 | 0.655709 | false | 3.567901 | false | false | false |
kobotoolbox/kpi | kpi/serializers/create_user.py | 1 | 1291 | # coding: utf-8
from django.contrib.auth.models import User
from rest_framework import serializers
from kpi.forms import USERNAME_REGEX
from kpi.forms import USERNAME_MAX_LENGTH
from kpi.forms import USERNAME_INVALID_MESSAGE
class CreateUserSerializer(serializers.ModelSerializer):
username = serializers.RegexFie... | agpl-3.0 | 2,633,247,362,956,941,000 | 27.065217 | 60 | 0.58017 | false | 4.406143 | false | false | false |
openzim/zimfarm | dispatcher/backend/src/routes/languages/language.py | 1 | 1600 | from flask import request, jsonify
from common.mongo import Schedules
from routes.base import BaseRoute
from common.schemas.parameters import SkipLimit500Schema
class LanguagesRoute(BaseRoute):
rule = "/"
name = "languages"
methods = ["GET"]
def get(self, *args, **kwargs):
"""return a list o... | gpl-3.0 | 2,581,370,367,170,515,000 | 27.070175 | 85 | 0.444375 | false | 4.481793 | false | false | false |
lykops/lykops | lykops/sysadmin/privacy.py | 1 | 6304 | from django.http.response import HttpResponseRedirect
from django.shortcuts import render, render_to_response
from django.urls.base import reverse
from lykops.forms import Form_Login
from lykops.views import Base
class Privacy(Base):
'''
该功能用于保存用户的机密数据,但该版本暂时不需要使用,故暂时不做展示
'''
def detail(sel... | apache-2.0 | 5,264,878,710,520,726,000 | 43.393939 | 243 | 0.506314 | false | 3.683218 | false | false | false |
david672orford/pykarta | pykarta/maps/layers/marker.py | 1 | 2805 | # pykarta/maps/layers/marker.py
# A simple marker layer
# Copyright 2013, 2014, 2015, Trinity College
# Last modified: 3 February 2015
from pykarta.maps.layers import MapLayer
from pykarta.draw import poi_label
from pykarta.geometry import Point, BoundingBox
from pykarta.geometry.projection import project_to_tilespace... | gpl-2.0 | -7,051,575,560,584,702,000 | 33.207317 | 90 | 0.664884 | false | 2.85351 | false | false | false |
jussi-kalliokoski/paul | paul/settings.py | 1 | 3433 | """
Django settings for paul project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impor... | mit | -3,215,241,266,981,453,300 | 26.253968 | 89 | 0.712205 | false | 3.223474 | false | false | false |
ReactiveX/RxPY | tests/test_observable/test_debounce.py | 1 | 12181 | import unittest
from rx import empty, never, throw, operators as _
from rx.testing import TestScheduler, ReactiveTest
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = ReactiveTest.subscribed
disposed = ReactiveTest... | mit | -1,704,422,489,709,946,400 | 38.937705 | 183 | 0.565717 | false | 3.439989 | true | false | false |
asphalt-framework/asphalt | tests/test_event.py | 1 | 8547 | import gc
from asyncio import Queue
from datetime import datetime, timezone, timedelta
import pytest
from async_generator import aclosing
from asphalt.core import Event, Signal, stream_events, wait_event
try:
from asyncio import all_tasks, current_task
except ImportError:
from asyncio import Task
all_tas... | apache-2.0 | -2,732,997,239,036,818,400 | 32.256809 | 99 | 0.631567 | false | 3.926045 | true | false | false |
kalail/packer | docs/conf.py | 1 | 7939 | # -*- coding: utf-8 -*-
#
# Packer documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 30 02:22:45 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | mit | 1,450,626,135,869,590,000 | 31.012097 | 80 | 0.704245 | false | 3.746579 | true | false | false |
matthewpang/stretch_tester | Python/Serial Testing.py | 1 | 2364 | __author__ = 'matthewpang'
import serial
import time
import pickle
import struct
serStepper = serial.Serial('/dev/cu.usbmodem14231', 230400)
time.sleep(3)
def output_encoder(value):
"""
Takes a 16 bit integer value, packs it little endian, then encapsulates it in the defined format
[0xAA,LSByte,MSByte,Ox... | mit | 2,993,429,724,975,934,500 | 27.493976 | 135 | 0.648477 | false | 3.538922 | false | false | false |
Faianca/Anime-Tv-shows-Scrapper | tests/dsds.py | 1 | 1545 | PORT_NUMBER = 2134
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class handler(BaseHTTPRequestHandler):
path = '/index.html'
def do_GET(self):
curdir = "/home/jmeireles/Anime-Tv-shows-Scrapper/server/public/"
try:
# Check the file extension required and
... | apache-2.0 | -6,527,749,553,032,411,000 | 29.313725 | 73 | 0.530744 | false | 4.517544 | false | false | false |
tassioferenzini/PAA-2017-T1 | question1a.py | 1 | 2273 | import os
import sys
from sys import argv, exit
from scipy.sparse.csgraph import dijkstra
import CPUtimer
from data1 import instance_iteratorL, print_solution
def solve(instance_path):
timer = CPUtimer.CPUTimer()
for instance in instance_iteratorL(instance_path):
verticeInicial = 1
instance_n... | mit | -2,247,954,956,334,377,000 | 33.969231 | 92 | 0.658601 | false | 3.362426 | false | false | false |
b0bh00d/Newsroom | reporters/REST/Transmission/helper/daemon.py | 1 | 4044 | # pylint: disable=missing-docstring
# pylint: disable=bad-whitespace
import os
import sys
import time
import atexit
from signal import SIGTERM
# based on:
# https://web.archive.org/web/20160305151936/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
class Daemon(object):
... | lgpl-3.0 | -834,247,370,120,058,000 | 26.885714 | 120 | 0.492334 | false | 4.122324 | false | false | false |
me-systeme/gsv8pypi | GSV6_Protocol.py | 1 | 11339 | # -*- coding: utf-8 -*-
__author__ = 'Dennis Rump'
###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Dennis Rump
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation... | mit | -4,922,868,636,507,329,000 | 46.605042 | 150 | 0.568226 | false | 3.951866 | false | false | false |
PytLab/VASPy | scripts/md_viz/statdist.py | 1 | 1581 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from scipy.linalg import norm
from vaspy.iter import XdatCar, AniFile
fixed_coord = [0.00000000, 1.92610195, 10.69285799]
O_index = 1
max_x = 0.5
max_y = 0.5
def pdc_coord(coord):
''' Process the coordinate using PDC.
'''
new_coord = [0.0]... | mit | 8,805,649,501,640,363,000 | 25.79661 | 106 | 0.548387 | false | 3.063953 | false | false | false |
tinyvillain/django-cms-wunderground | cmsplugin_wunderground/templatetags/wunderground_tags.py | 1 | 1218 | from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter
@stringfilter
def wunderground_to_climacons(value, arg='day'):
# Mapping form
# http://www.nickschaden.com/weather/js/main.min.js?10015
day_dict = {
"chanceflurries":"p",
"chancer... | bsd-3-clause | -7,309,387,243,682,460,000 | 16.926471 | 58 | 0.573892 | false | 2.298113 | false | false | false |
ryandoherty/RaceCapture_App | autosportlabs/racecapture/views/analysis/sessionbrowser.py | 1 | 11582 | #
# Race Capture App
#
# Copyright (C) 2014-2016 Autosport Labs
#
# This file is part of the Race Capture App
#
# This 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 ... | gpl-3.0 | 2,731,869,881,543,200,300 | 38.128378 | 116 | 0.649801 | false | 3.887882 | false | false | false |
mrgokul/aggcluster | cluster/matrices.py | 1 | 6921 | import numpy as np
from collections import OrderedDict
__author__ = "Gokul Ramesh"
__copyright__ = "Copyright 2014, LatentView Analytics Pvt. Ltd."
__email__ = "gokul.ramesh@latentview.com"
__status__ = "Development"
__version__="0.0.1"
class SparseFeatureDistanceMatrix(np.ndarray):
def __new__(cls, records,... | apache-2.0 | -4,427,353,692,316,863,500 | 31.650943 | 79 | 0.459327 | false | 3.679426 | false | false | false |
awong1900/Boss-Key_Wio-link | boss-key_wio-link.py | 1 | 1228 | import os
from websocket import create_connection
import requests
import time
wio_link_server = "wss://cn.iot.seeed.cc/v1/node/event"
wio_link_key = "efe19ae9752add26d614d87cacd97f45"
ws = create_connection(wio_link_server)
ws.send(wio_link_key)
print "link to pion one sensor."
requests.post("https://cn.iot.seeed.cc/... | apache-2.0 | 8,546,627,437,106,191,000 | 42.857143 | 129 | 0.76873 | false | 2.403131 | false | false | false |
TheWardoctor/Wardoctors-repo | plugin.program.sgs.notifications/common.py | 1 | 13022 | import os,sys,xbmc,xbmcplugin,xbmcaddon,xbmcgui,urllib,urllib2,re,time,datetime,string,StringIO,logging,random,array,htmllib,xbmcvfs
#import common
addon_id='plugin.program.sgs.notifications' ##Change this to the same as the addon.xml
try: from addon.common.addon import Addon
except:
try: from t0mm0.common.ad... | apache-2.0 | -156,295,420,543,093,060 | 46.525547 | 177 | 0.655583 | false | 2.803445 | false | false | false |
gengwg/leetcode | 103_binary_tree_zigzag_level_order_traversal.py | 1 | 1345 | """
103. Binary Tree Zigzag Level Order Traversal
Given a binary tree,
return the zigzag level order traversal of its nodes' values.
(ie, from left to right, then right to left for the next level and alternate between).
For example:
Given binary tree [3,9,20,null,null,15,7],
3
/ \
9 20
/ \
15 7
r... | apache-2.0 | 5,094,910,735,694,493,000 | 22.189655 | 86 | 0.553903 | false | 3.567639 | false | false | false |
proycon/clam | clam/wrappers/textstats.py | 1 | 7230 | #!/usr/bin/env python3
#-*- coding:utf-8 -*-
###############################################################
# CLAM: Computational Linguistics Application Mediator
# -- CLAM Wrapper script for Text Statistics --
# by Maarten van Gompel (proycon)
# http://ilk.uvt.nl/~mvgompel
# Induction for Linguisti... | gpl-3.0 | 596,206,044,977,853,400 | 35.515152 | 179 | 0.602905 | false | 4.084746 | false | false | false |
lebronhkh/pythondotorg | users/views.py | 1 | 4903 | from braces.views import LoginRequiredMixin
from django.contrib.auth import authenticate, login
from django.conf import settings
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.http import Http404
from django.shortcuts import render, redirect
from django.utils import time... | apache-2.0 | -4,767,483,069,942,137,000 | 29.836478 | 79 | 0.675097 | false | 3.97648 | false | false | false |
ctn-waterloo/nengo_pushbot | nengo_pushbot/spinnaker.py | 1 | 18200 | import numpy as np
from . import accel, beep, compass, countspikes, gyro, motor
try:
import nengo_spinnaker
import nengo_spinnaker.builder
import pacman103.front.common
generic_robot_keyspace = nengo_spinnaker.utils.keyspaces.create_keyspace(
'OutboundRobotProtocol', [('x', 1), ('o', 19), ('... | mit | 8,149,764,305,671,209,000 | 43.390244 | 79 | 0.523297 | false | 4.102795 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.