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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
camptocamp/QGIS | python/plugins/processing/algs/VectorLayerHistogram.py | 1 | 2809 | # -*- coding: utf-8 -*-
"""
***************************************************************************
EquivalentNumField.py
---------------------
Date : January 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
*******************... | gpl-2.0 | -1,480,211,663,228,776,400 | 40.308824 | 120 | 0.582414 | false | 4.56748 | false | false | false |
mbrukman/cloud-launcher | console/appengine/compute_api_base.py | 1 | 3530 | #!/usr/bin/python
#
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -7,540,717,689,034,970,000 | 32.301887 | 81 | 0.612748 | false | 4.11902 | false | false | false |
scholer/py2cytoscape | py2cytoscape/data/network_view.py | 1 | 6734 | # -*- coding: utf-8 -*-
import json
import pandas as pd
import requests
from py2cytoscape.data.edge_view import EdgeView
from py2cytoscape.data.node_view import NodeView
from . import BASE_URL, HEADERS
from py2cytoscape.data.util_network import NetworkUtil
BASE_URL_NETWORK = BASE_URL + 'networks'
class CyNetworkVi... | mit | 2,320,199,743,992,444,000 | 28.79646 | 92 | 0.527027 | false | 4.032335 | false | false | false |
tiagocoutinho/qarbon | qarbon/qt/designer/plugins/base.py | 1 | 5728 | # ----------------------------------------------------------------------------
# This file is part of qarbon (http://qarbon.rtfd.org/)
#
# Copyright (c) 2013 European Synchrotron Radiation Facility, Grenoble, France
#
# Distributed under the terms of the GNU Lesser General Public License,
# either version 3 of the Lice... | lgpl-3.0 | 2,594,814,560,425,023,500 | 32.893491 | 79 | 0.604399 | false | 4.56051 | false | false | false |
raytung/Slice | Slice/helper.py | 1 | 1240 | from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
def get_sorted_model(request, model):
sort = request.GET.get('sort', None)
obj = model
if sort == "price_lth":
obj = model.order_by('cost_per_unit')
elif sort == "price_htl":
obj = model.order_by('-cost_per_unit')... | mit | 9,062,097,367,307,635,000 | 30.794872 | 72 | 0.604839 | false | 3.220779 | false | false | false |
lmorchard/badger | apps/badges/views.py | 1 | 17108 | import hashlib
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse
from django.http import HttpResponseForbidden
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django... | bsd-3-clause | 5,775,551,979,241,219,000 | 37.272931 | 95 | 0.621639 | false | 3.946482 | false | false | false |
gferreira/hTools2_extension | hTools2.roboFontExt/lib/hTools2/extras/equalize.py | 1 | 4304 | # -*- coding: utf-8 -*-
# equalize.py
# by Jens Kutilek
# https://github.com/jenskutilek/Curve-Equalizer
#-----------------------
# EQMethods/geometry.py
#-----------------------
from math import atan2, cos, pi, sin, sqrt
# helper functions
def getTriangleArea(a, b, c):
return (b.x - a.x) * (c.y - a.y) - (c.x... | bsd-3-clause | 1,844,910,442,797,623,300 | 27.686667 | 108 | 0.572391 | false | 3.140876 | false | false | false |
cmsdaq/hltd | lib/python-inotify-0.5/inotify/watcher.py | 1 | 10565 | # watcher.py - high-level interfaces to the Linux inotify subsystem
# Copyright 2006 Bryan O'Sullivan <bos@serpentine.com>
# This library is free software; you can redistribute it and/or modify
# it under the terms of version 2.1 of the GNU Lesser General Public
# License, incorporated herein by reference.
'''High-l... | lgpl-3.0 | -1,142,226,267,472,128,100 | 30.537313 | 79 | 0.608045 | false | 4.146389 | false | false | false |
teamfx/openjfx-9-dev-rt | modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/port/xvfbdriver.py | 1 | 5142 | # Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2014 Igalia S.L.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice,... | gpl-2.0 | -9,165,940,927,032,183,000 | 40.804878 | 150 | 0.661221 | false | 3.803254 | true | false | false |
fjacob21/pycon2015 | elpiwear/proximity_warning.py | 1 | 1278 | import Edison.i2c as I2C
import sharp2y0a21
import ads1015
import time
import thread
class proximity_warning:
def __init__(self, sensorid, calibration, sensing_freq):
self.sensing_freq = sensing_freq
self.warning = []
adc = ads1015.ads1015(I2C.i2c(1,0x48))
adc.setchannel(sensorid, ... | mit | 3,095,774,286,955,395,000 | 29.428571 | 72 | 0.619718 | false | 3.435484 | false | false | false |
0111001101111010/cs595-f13 | assignment5/Q2/q2.py | 1 | 2515 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import requests
from requests_oauthlib import OAuth1
from urlparse import parse_qs
import json
REQUEST_TOKEN_URL = "https://api.twitter.com/oauth/request_token"
AUTHORIZE_URL = "https://api.twitter.com/oauth/authorize?oauth_token="
ACCESS_TOKEN_URL = "h... | mit | -1,771,581,753,640,997,600 | 35.463768 | 178 | 0.662823 | false | 3.266234 | false | false | false |
benpetty/Code-Katas | katas/cafe_order_checker/test_cafe_order_checker.py | 1 | 1249 | import unittest
from .cafe_order_checker import is_first_come_first_served
class Test(unittest.TestCase):
def test_both_registers_have_same_number_of_orders(self):
result = is_first_come_first_served([1, 4, 5], [2, 3, 6], [1, 2, 3, 4, 5, 6])
self.assertTrue(result)
def test_registers_have_di... | mit | 681,152,050,263,721,900 | 36.848485 | 85 | 0.606085 | false | 2.938824 | true | false | false |
maartenbreddels/vaex | packages/vaex-ui/vaex/ui/variables.py | 1 | 14562 | import sys
import vaex
import vaex.ui.qt as dialogs
from vaex.ui.qt import *
import logging
from vaex.ui.icons import iconfile
logger = logging.getLogger("vaex.ui.variables")
class VariablesTableModel(QtCore.QAbstractTableModel):
def __init__(self, dataset, parent=None, *args):
"""
:type dataset:... | mit | -4,402,532,888,900,061,700 | 42.861446 | 138 | 0.62512 | false | 3.788241 | false | false | false |
ZTH1970/alcide | scripts/check_double.py | 1 | 4980 | # -*- coding: utf-8 -*-
import sys
import alcide.settings
import django.core.management
from datetime import datetime
import csv
django.core.management.setup_environ(alcide.settings)
from alcide.dossiers.models import PatientRecord
from alcide.actes.models import Act
from django.db import transaction
@transaction.c... | agpl-3.0 | 203,624,864,541,269,220 | 42.304348 | 195 | 0.540361 | false | 3.653705 | false | false | false |
cfobel/sconspiracy | Python/racy/plugins/graphlibext/__init__.py | 1 | 2002 | # -*- coding: UTF8 -*-
# ***** BEGIN LICENSE BLOCK *****
# Sconspiracy - Copyright (C) IRCAD, 2004-2010.
# Distributed under the terms of the BSD Licence as
# published by the Open Source Initiative.
# ****** END LICENSE BLOCK ******
import os
import racy
from racy import renv
from generategraph import generate_... | bsd-3-clause | -698,847,453,254,980,100 | 26.054054 | 80 | 0.496004 | false | 4.028169 | false | false | false |
robocomp/robocomp-robolab | components/detection/test/emotionrecognitionclient/src/specificworker.py | 1 | 1855 | #
# Copyright (C) 2018 by YOUR NAME HERE
#
# This file is part of RoboComp
#
# RoboComp 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... | gpl-3.0 | -4,520,935,583,855,662,000 | 29.409836 | 102 | 0.710512 | false | 3.102007 | false | false | false |
wezhang/vim-setup | bundle/powerline/tools/colors_find.py | 1 | 1599 | #!/usr/bin/env python
from __future__ import division, print_function
import sys
import os
from colormath.color_objects import sRGBColor, LabColor
from colormath.color_conversions import convert_color
from colormath.color_diff import delta_e_cie2000
def get_lab(name, rgb):
rgb = sRGBColor(int(rgb[:2], 16), int(rgb[2... | apache-2.0 | -5,746,689,429,201,245,000 | 26.568966 | 93 | 0.659787 | false | 2.49454 | false | false | false |
vipmunot/Data-Science-Course | ML/Python/Decision Tree/decision tree.py | 1 | 4104 | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 18 10:38:03 2016
@author: Vipul Munot
"""
tennis=[line.strip().split(',') for line in open('tennis.txt')]
test_tennis=[line.strip().split(',') for line in open('test-tennis.txt')]
data=[['slashdot','USA','yes',18,'None'],
['google','France','yes',23,'Premium'],
... | mit | -5,807,969,691,469,534,000 | 31.322835 | 81 | 0.591618 | false | 3.22135 | false | false | false |
pinterest/kingpin | kingpin/logging_utils/__init__.py | 1 | 6156 | # Copyright 2016 Pinterest, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 | 4,123,217,767,275,541,000 | 37.006173 | 103 | 0.656595 | false | 3.785978 | false | false | false |
Aleksei-Badyaev/rst2db | abstrys/cmd_rst2db.py | 1 | 3650 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# rst2db.py
# =========
#
# A reStructuredText to DocBook conversion tool, using Python's docutils
# library.
#
# by Eron Hennessey
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
import os
import sys
from abstrys.docutils_ext.docboo... | bsd-3-clause | 7,693,333,083,520,566,000 | 36.244898 | 79 | 0.564384 | false | 4.345238 | false | false | false |
ggirelli/gpseq-img-py | pygpseq/anim/series.py | 1 | 12252 | # -*- coding: utf-8 -*-
'''
@author: Gabriele Girelli
@contact: gigi.ga90@gmail.com
@description: contains Series wrapper, which in turn contains Nucleus.
'''
# DEPENDENCIES =================================================================
import math
import os
import matplotlib.pyplot as plt
import numpy as np
fro... | mit | -8,803,791,289,384,075,000 | 31.327177 | 80 | 0.537382 | false | 3.849199 | false | false | false |
HaydenFaulkner/phd | processing/image/img2vid.py | 1 | 1058 | from os import listdir, remove
from os.path import isfile, join
import numpy as np
import cv2
from cv2 import __version__
cv_ver = __version__.split('.')
NEW_OCV = True
if int(cv_ver[0]) < 3:
NEW_OCV = False
import cv2.cv as cv
mypath = '/media/hayden/UStorage/DATASETS/VIDEO/TENNIS/BBS/imgtest/'
try:
rem... | mit | 117,083,903,024,079,600 | 22.511111 | 111 | 0.641777 | false | 2.791557 | false | false | false |
lino-framework/extjs6 | lino_extjs6/setup_info.py | 1 | 1673 | # -*- coding: UTF-8 -*-
# Copyright 2015-2021 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
SETUP_INFO = dict(
name='lino_extjs6',
version='17.10.0',
install_requires=['lino', 'lino_noi'],
tests_require=[],
test_suite='tests',
description="The Se... | bsd-2-clause | -5,701,226,676,232,019,000 | 28.875 | 87 | 0.717274 | false | 3.38664 | false | false | false |
fujicoin/electrum-fjc | electrum/transaction.py | 1 | 47135 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 Thomas Voegtlin
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without... | mit | 2,422,757,690,107,296,000 | 37.352319 | 144 | 0.586146 | false | 3.564083 | false | false | false |
mazvv/travelcrm | travelcrm/views/transfers.py | 1 | 7321 | # -*-coding: utf-8-*-
import logging
from pyramid.view import view_config, view_defaults
from pyramid.httpexceptions import HTTPFound
from . import BaseView
from ..models import DBSession
from ..models.transfer import Transfer
from ..lib.bl.subscriptions import subscribe_resource
from ..lib.utils.common_utils import... | gpl-3.0 | 309,576,990,781,245,800 | 25.718978 | 67 | 0.514274 | false | 4.244058 | true | false | false |
cinaljess/btools | type2_endcheck.py | 1 | 3097 | """
Module to check whether TypeIIs end-sites are compatible. Looks for
3bp homology then 2 basepair edge-homology for each input sequence given.
Comparisons are made between each element in the list and to the reverse
complement of each element. Repeat elements are also validated along with
noncanonical basepairs.
Ex... | mit | 4,699,142,080,002,238,000 | 29.663366 | 115 | 0.542783 | false | 3.55977 | false | false | false |
Rogentos/legacy-anaconda | installclasses/awesome.py | 1 | 2620 | #
# awesome.py
#
# Copyright (C) 2010 Fabio Erculiani
#
# 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... | gpl-2.0 | -426,004,386,784,388,740 | 28.772727 | 83 | 0.682061 | false | 3.910448 | false | false | false |
tomkralidis/GeoHealthCheck | GeoHealthCheck/views.py | 1 | 7335 | # =================================================================
#
# Authors: Tom Kralidis <tomkralidis@gmail.com>
#
# Copyright (c) 2014 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in ... | mit | 5,648,417,238,336,906,000 | 29.5625 | 77 | 0.602727 | false | 4.169983 | false | false | false |
markflyhigh/incubator-beam | sdks/python/apache_beam/testing/benchmarks/chicago_taxi/process_tfma.py | 1 | 6321 | # Copyright 2019 Google LLC. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -1,630,657,879,157,112,000 | 31.751295 | 80 | 0.684385 | false | 3.713866 | true | false | false |
ibrahimsharaf/crashsimilarity | tests/test_model.py | 1 | 11586 | import unittest
import multiprocessing
import numpy as np
from crashsimilarity.stacktrace import StackTraceProcessor
from crashsimilarity.models import doc2vec, word2vec
class CrashSimilarityTest(unittest.TestCase):
# Train Model to be used in all tests
@classmethod
def setUpClass(self):
self.pat... | mpl-2.0 | 912,696,117,037,497,200 | 62.311475 | 828 | 0.702745 | false | 3.519441 | true | false | false |
ESRF-BCU/emotion | tests/TestStates.py | 1 | 2381 | import unittest
import sys
import os
sys.path.insert(
0,
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..")))
from emotion.axis import AxisState
class TestStates(unittest.TestCase):
def setUp(self):
pass
def test_states(self):
# empty st... | gpl-2.0 | 2,039,020,055,200,330,000 | 26.686047 | 79 | 0.577488 | false | 3.624049 | true | false | false |
cschnei3/forseti-security | google/cloud/security/common/gcp_api/cloud_billing.py | 1 | 1114 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | 6,946,702,708,777,584,000 | 33.8125 | 76 | 0.737882 | false | 3.950355 | false | false | false |
tonybaloney/st2 | st2common/st2common/services/keyvalues.py | 1 | 6723 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | 2,687,711,165,332,260,400 | 32.78392 | 96 | 0.633348 | false | 3.747492 | false | false | false |
tedlaz/pyted | misthodosia/payroll/calc_example.py | 1 | 1345 | # -*- coding: utf-8 -*-
"""Module calc_example.py"""
if __name__ == '__main__':
import calc as c
B105 = c.Erg(50, 45.66, 18.95, False)
B101 = c.Erg(40, 40.06, 15.5, False)
# -----------------------------------------------
# Nea pososta IKA
#
# Perigrafi ergazomenos Ergodotis Syno... | gpl-3.0 | -7,101,075,765,270,606,000 | 36.361111 | 53 | 0.394796 | false | 2.949561 | false | true | false |
bobthekingofegypt/bobswitch-python | bobswitch/bobswitch.py | 1 | 9377 | # -*- coding: utf-8 -*-
"""
BobSwitch
~~~~~~~~~~~~~~
Online HTML5 version of the backpackers card game switch, also known as
crazy eights and a lot of different names. This version follows the rules
that I know.
:copyright: (c) Copyright 2013 by Bob
:license: BSD, see LICENSE for more d... | bsd-2-clause | -6,035,321,964,526,752,000 | 28.394984 | 102 | 0.581423 | false | 4.045298 | false | false | false |
xneby/tcs-web | tcsweb/settings.py | 1 | 2781 | import os
from django.conf import global_settings
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Karol Farbiś', 'kpchwk@gmail.com'),
)
MANAGERS = ADMINS
INSTALL_DIR = os.path.split(os.path.realpath(__file__ + '/../'))[0]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME... | gpl-2.0 | 3,219,644,417,738,109,000 | 22.361345 | 77 | 0.651799 | false | 3.293839 | false | false | false |
aleksandra-tarkowska/django | django/contrib/auth/forms.py | 1 | 15080 | from __future__ import unicode_literals
from collections import OrderedDict
from django import forms
from django.core.mail import EmailMultiAlternatives
from django.forms.utils import flatatt
from django.template import loader
from django.utils.encoding import force_bytes
from django.utils.html import format_html, fo... | bsd-3-clause | -5,871,558,577,920,095,000 | 36.889447 | 99 | 0.595358 | false | 4.443135 | false | false | false |
lnielsen/invenio-metrics | invenio_metrics/admin.py | 1 | 1755 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 | 7,231,030,946,259,079,000 | 28.25 | 76 | 0.716239 | false | 3.970588 | false | false | false |
hmrs-cr/PyArcPics | main_flickruploader.py | 1 | 2463 | #!/usr/bin/python
# coding=UTF8
import argparse
import os
import sys
import utils
import flickruploader
def main():
def scan(fup):
print "Scanning folder", options.folder, "..."
pc, npc, pcs, npcs = fup.scan_directory(options.folder)
print pc, "total pictures found. (" + utils.sizeof_fmt... | apache-2.0 | -344,921,521,824,689,100 | 32.297297 | 118 | 0.636622 | false | 3.528653 | false | false | false |
hongyan0118/uiautotestmacaca | THhealth/ForTest/run.py | 1 | 2307 | #-*- coding: utf-8 -*-
import os
import sys
from macaca import WebDriver
sys.path.append(os.path.split(os.path.split(os.path.abspath(''))[0])[0])
from Public.Log import Log
from Public.ReportPath import ReportPath
from Public.BasePage import BasePage
from THhealth.PageObject.THhealthHomePage import THhealthHomePage... | gpl-3.0 | 2,311,017,891,375,832,600 | 26.464286 | 85 | 0.627655 | false | 3.615987 | false | false | false |
elite-lang/eobject | conanfile.py | 1 | 1107 | from conans import ConanFile, CMake, tools
class eobjectConan(ConanFile):
name = "eobject"
version = "0.1.2"
license = "MIT"
url = "https://github.com/elite-lang/eobject"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = "shared=False", ... | mit | -6,422,170,414,423,412,000 | 33.59375 | 59 | 0.586269 | false | 3.275148 | false | false | false |
Barrog/C4-Datapack | data/jscript/quests/37_PleaseMakeMeFormalWear/__init__.py | 1 | 3555 | # Made by disKret
import sys
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
MYSTERIOUS_CLOTH = 7076
JEWEL_BOX = 7077
SEWING_KIT = 7078
DRESS_SHOES_BOX = 7113
FORMAL_WEAR = 6408
SIGNE... | gpl-2.0 | -1,861,287,874,612,827,000 | 31.916667 | 142 | 0.648383 | false | 2.703422 | false | false | false |
Laurawly/tvm-1 | python/tvm/relay/expr.py | 2 | 15511 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 2,622,873,690,291,774,500 | 27.724074 | 92 | 0.610857 | false | 4.006975 | false | false | false |
lebrice/SimpleParsing | simple_parsing/helpers/flatten.py | 1 | 6257 | import dataclasses
import warnings
from typing import *
from ..logging_utils import get_logger
logger = get_logger(__file__)
class FlattenedAccess:
""" Allows flattened access to the attributes of all children dataclasses.
This is meant to simplify the adoption of dataclasses for argument
hierarchies, r... | mit | 6,998,036,661,539,236,000 | 38.10625 | 80 | 0.55362 | false | 4.743745 | false | false | false |
caseman/grease | test/field_test.py | 1 | 9571 | import unittest
class TestData(object):
def __init__(self, entity=None, **kw):
self.entity = entity
self.__dict__.update(kw)
class TestComponent(dict):
def __init__(self, entities=()):
self.entities = set(entities)
def __getitem__(self, entity):
return self.setdefault(entity, TestData(entity))
clas... | mit | -2,909,231,861,432,820,700 | 31.334459 | 79 | 0.66994 | false | 2.811692 | true | false | false |
huertasdanny/inertialsense | src/scripts/IS_raw2msg.py | 1 | 1078 | #!/usr/bin/env python
import rospy
import serial
import checksum
from serial import SerialException
from std_msgs.msg import String
from create_dummy_msg import msg_creator
from sensor_msgs.msg import Imu
from sensor_msgs.msg import MagneticField as Mag
from inertialsense.msg import Rawgps
from inertialsense.msg impor... | mit | 2,085,095,145,195,710,700 | 29.828571 | 78 | 0.669759 | false | 3.992593 | false | false | false |
minlexx/pyevemon | esi_client/models/post_characters_character_id_fittings_internal_server_error.py | 1 | 3184 | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.4.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class PostCharactersCharacterIdFittingsInternalServerError(objec... | gpl-3.0 | 7,696,429,520,693,101,000 | 26.213675 | 93 | 0.550879 | false | 4.703102 | false | false | false |
dombrno/PG | Source/jugfile.py | 1 | 2178 | import numpy as np
import sys
from jug import TaskGenerator
from os.path import expanduser
HOME = expanduser("~")
if "storage" in HOME:
HOME = "/storage/home/geffroy"
sys.path.append(HOME + "/Code/PG/Source")
from phase_fluctuations import DWaveModel
from MCMC import MCMCDriver
# pylint: disable=E1101
N_RUNS = 32... | bsd-2-clause | -4,546,423,208,315,066,000 | 32.507692 | 79 | 0.60101 | false | 3.12931 | false | false | false |
MattNolanLab/Ramsden_MEC | ABAFunctions/ABA_errors.py | 1 | 4010 | '''
Code for error analysis
Copyright (c) 2014, Helen Ramsden
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of cond... | bsd-3-clause | -302,379,405,673,964,100 | 40.770833 | 118 | 0.738903 | false | 3.187599 | false | false | false |
toucheJterm2015/touche | testing/tests/admin/SetupHeadersForbiddenTest.py | 1 | 8114 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException... | gpl-2.0 | 2,244,912,800,512,903,700 | 58.661765 | 187 | 0.660217 | false | 3.609431 | true | false | false |
ToBaer94/pygame_platformer | main.py | 1 | 2485 | import sys
import pygame as pg
from states.splash_state import SplashScreen
from states.map_state import Map
from states.gameplay_state import GamePlay
from states.level_start_state import LevelOpening
from states.gameover_state import GameOver
class Game(object):
def __init__(self, screen, states, start_state):
... | lgpl-3.0 | -5,079,104,401,813,210,000 | 23.362745 | 72 | 0.574648 | false | 3.617176 | false | false | false |
bdang2012/taiga-back-casting | taiga/export_import/service.py | 1 | 21533 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | 3,825,578,864,173,581,300 | 37.243339 | 120 | 0.643305 | false | 4.37533 | false | false | false |
MwanzanFelipe/rockletonfortune | mysite/settings.py | 2 | 3895 | # 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 required by applicable law or a... | bsd-3-clause | -1,657,456,044,403,784,200 | 27.851852 | 76 | 0.672144 | false | 3.633396 | false | false | false |
niwinz/Green-Mine | src/greenmine/urls.py | 1 | 2396 | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
js_info_dict = {
'packages': ('greenmine',),
}
from greenmine.base.views import api
from greenmine.base.views import config
f... | bsd-3-clause | 4,532,184,812,102,661,000 | 35.30303 | 91 | 0.652337 | false | 3.341702 | false | false | false |
peoplepower/composer-sdk-python | com.ppc.Bot/devices/thermostat/thermostat_sensibo_sky.py | 1 | 3433 | '''
Created on March 27, 2017
This file is subject to the terms and conditions defined in the
file 'LICENSE.txt', which is part of this source code package.
@author: David Moss
'''
# Device Model
# https://presence.atlassian.net/wiki/display/devices/Thermostat
from devices.thermostat.thermostat import ThermostatDev... | apache-2.0 | -1,692,354,210,386,324,500 | 28.603448 | 139 | 0.630352 | false | 3.687433 | false | false | false |
dev4dev-io/pynt-aws | pyntaws/services/_cloudformation.py | 1 | 11141 | import boto3, botocore
import os, uuid, json, sys
from urlparse import urlparse
from boto3.s3.transfer import S3Transfer
from pyntaws.services._session import AWSSession
import __builtin__
__builtin__.validated_templates = list()
class AWSCloudFormation(AWSSession):
def __init__(self, **kwargs):
super(self.__... | apache-2.0 | -2,330,661,310,154,775,600 | 32.157738 | 123 | 0.614308 | false | 3.76131 | false | false | false |
simonwittber/middleman | clients/py/serviceprovider.py | 1 | 5656 | #!/usr/bin/env python
import asyncio
import websockets
import io
import uuid
SERVER_KEY = "xyzzy"
class ServiceProvider:
def init(self, ws, require_uid):
self.requests = {}
self.pub_handlers = {}
self.req_handlers = {}
self.ws = ws
self.public_pub_events = []
self.... | mit | 5,184,258,623,825,570,000 | 34.35 | 117 | 0.554102 | false | 3.845003 | false | false | false |
pFernbach/hpp-rbprm-corba | script/scenarios/sandbox/dynamic/stair_bauzil_hrp2_interp_noRamp.py | 1 | 7684 | from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.gepetto import Viewer
import omniORB.any
import stair_bauzil_hrp2_path_noRamp as tp
import time
from hpp.corbaserver.rbprm.rbprmstate import State,StateHelper
from display_tools import *
from constr... | lgpl-3.0 | 131,489,017,659,525,180 | 27.671642 | 324 | 0.707965 | false | 2.507833 | true | false | false |
phil65/script.skin.info.service | default.py | 1 | 11502 | import sys
import xbmc
import xbmcgui
import xbmcaddon
from Utils import *
ADDON = xbmcaddon.Addon()
ADDON_VERSION = ADDON.getAddonInfo('version')
WND = xbmcgui.Window(12003) # Video info dialog
HOME = xbmcgui.Window(10000) # Home Window
class Daemon:
def __init__(self):
log("version %s started" % ADD... | gpl-2.0 | -977,660,144,505,376,900 | 57.984615 | 414 | 0.580595 | false | 3.944444 | false | false | false |
ThatOneRoadie/stratux-cosensor | cosensor-monitor.py | 1 | 1668 | import smbus
import time
import os
import RPi.GPIO as GPIO
bus = smbus.SMBus(1)
# Set PPM limit variable to whatever would be an alarm for you
# For Uncalibrated sensors, use your better judgement or get it calibrated (390 is a fresh air outdoor baseline, depending on area).
# Sensor can also be calibrated by immersi... | mit | 81,206,056,788,457,280 | 34.489362 | 149 | 0.720024 | false | 3.106145 | false | false | false |
kristopher-h/vim-lsp | tools/create_portable_pyls.py | 2 | 4830 | #!/usr/bin/env python3
# Copyright 2017 Kristopher Heijari
#
# This file is part of vim-liq.
#
# vim-liq 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) a... | gpl-3.0 | -2,896,001,511,584,766,500 | 34.514706 | 96 | 0.64617 | false | 3.440171 | false | false | false |
vishnuprasadb/ResumeParser.py | code.py | 1 | 33299 | class ResumeXmlHandler(xml.sax.ContentHandler):
def __init__(self):
self.node = ''
self.params = {}
self.error = None
def startElement(self, name, attrs):
self.node = name
def endElement(self, name):
self.node = ''
... | mit | -7,531,375,839,906,011,000 | 43.877358 | 369 | 0.478483 | false | 4.291661 | false | false | false |
clawpack/clawpack-4.x | book/chap23/acoustics/1drad/setplot.py | 2 | 2339 |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
#--------------------------
def setplot(plotdata):
#--------------------------
"""
Specify what is to b... | bsd-3-clause | 3,620,500,045,018,423,000 | 30.2 | 74 | 0.61009 | false | 3.460059 | false | false | false |
erikhvatum/RisWidget | ris_widget/qwidgets/layer_table.py | 1 | 21314 | # The MIT License (MIT)
#
# Copyright (c) 2015 WUSTL ZPLAB
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modif... | mit | -986,687,564,985,971,600 | 45.641138 | 134 | 0.636248 | false | 3.80132 | false | false | false |
Tomographer/tomographer | test/py_gen_pickle_data.py | 1 | 4414 | #
# Generate pickled data for current tomographer version and store to data files (which are
# to be included in the git repo).
#
# These pickle files are loaded by pytest_pickle.py to make sure that data pickled by
# earlier versions of Tomographer can be successfully loaded, with full backwards
# compatibility.
#
fr... | mit | -625,831,304,714,543,000 | 28.039474 | 117 | 0.606026 | false | 3.198551 | false | false | false |
claudep/pootle | tests/views/timeline.py | 1 | 9375 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from hashlib import md5
from itertools impor... | gpl-3.0 | 1,652,952,501,231,101,700 | 31.77972 | 83 | 0.60832 | false | 4.049676 | true | false | false |
Lemma1/MAC-POSTS | doc_builder/sphinx-contrib/matlabdomain/tests/test_mat_types.py | 1 | 4777 | #! /usr/bin/env python
from sphinxcontrib import mat_documenters as doc
from nose.tools import eq_, ok_
import os
from pprint import pprint
DIRNAME = doc.MatObject.basedir = os.path.abspath(os.path.dirname(__file__))
def test_ellipsis_after_equals():
"""
test function with ellipsis after equals
... | mit | -6,209,920,148,156,492,000 | 30.496599 | 76 | 0.613565 | false | 3.454085 | true | false | false |
airbnb/caravel | superset/sql_parse.py | 1 | 7283 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 7,086,601,599,898,364,000 | 36.735751 | 77 | 0.595084 | false | 4.219583 | false | false | false |
KelvinLu/ping-at-me | ping_at_me/pingapp/users.py | 1 | 1481 | from django.contrib.auth import authenticate, login, logout
from pingapp import models, ping
def user_login(request, username, password):
user = authenticate(username = username, password = password)
if user is not None:
login(request, user)
return True
return False
def user_logout(request):
logout(request... | agpl-3.0 | -167,475,481,804,550,530 | 19.30137 | 62 | 0.740716 | false | 3.085417 | false | false | false |
ChristfriedBalizou/jeamsql | adapters/tabulate/benchmark.py | 1 | 3028 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
from timeit import timeit
import tabulate
import asciitable
import prettytable
import texttable
import sys
import codecs
setup_code = r"""
from csv import writer
try: # Python 2
from StringIO import StringIO
excep... | mit | 1,157,933,213,217,773,800 | 24.652542 | 109 | 0.618764 | false | 3.367075 | false | false | false |
jbloom/mutpath | src/plot.py | 1 | 10257 | """Module for performing plotting for ``mutpath`` package.
This module uses ``pylab`` and ``matplotlib`` to make plots. These plots will
fail if ``pylab`` and ``matplotlib`` are not available for importation. Before
running any function in this module, you can run the *PylabAvailable*
function to determine if ``pylab`... | gpl-3.0 | -7,922,455,184,414,203,000 | 32.087097 | 125 | 0.639271 | false | 3.619266 | false | false | false |
usc-isi-i2/lsh-linking | swoosh/evaluate.py | 1 | 1496 | from evaluator import evaluator
class evaluate:
def __init__(self, num, lencora, resultfile, answerfile):
self.num = num
self.lencora = lencora
fp = open('logs/merge_log.txt')
self.pairs = [line.strip().split('-') for line in fp]
self.marks = [0 for _ in xrange(lencora)]
self.clusters = [set() for _ in ... | apache-2.0 | 383,065,283,958,931,140 | 23.129032 | 58 | 0.601604 | false | 2.57931 | false | false | false |
Garvys/PingPongSkill | pingpongskill/text2num.py | 1 | 2798 | # This library is a simple implementation of a function to convert textual
# numbers written in English into their integer representations.
#
# This code is open source according to the MIT License as follows.
#
# Copyright (c) 2008 Greg Hewgill
#
# Permission is hereby granted, free of charge, to any person obtaining ... | mit | 7,822,326,639,760,076,000 | 28.145833 | 79 | 0.636883 | false | 3.701058 | false | false | false |
Kevin-Roberts/coinbase_trader | trader.py | 1 | 16564 | """
Coinbase Python Client Library
AUTHOR
Kevin Roberts
Github: Kevin-Roberts
Started on: 12-11-2013
LICENSE (The MIT License)
Copyright (c) 2013 Kevin Roberts "kr0b1486@hotmail.com"
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (t... | mit | 5,357,124,662,904,182,000 | 40.4125 | 180 | 0.616216 | false | 4.221203 | false | false | false |
fxb22/BioGUI | Utils/GetMotifs.py | 1 | 5020 | import CirclePlotClass as cpc
class GetMotifs():
def DefineColLists(self):
self.colList = []
r = 0
while r < self.total_length:
self.colList.append(-1)
r += 1
self.sse = self.cpss.GetSSE()
self.secLinks = self.cpss.GetSecLinks()
for s in self.... | gpl-2.0 | 7,772,521,076,914,863,000 | 32.026316 | 78 | 0.375498 | false | 3.42195 | false | false | false |
mgoral/subconvert | src/subconvert/cli/syncparse.py | 1 | 5412 | #-*- coding: utf-8 -*-
"""
Copyright (C) 2016 Michal Goral.
This file is part of Subconvert
Subconvert 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 la... | gpl-3.0 | 2,888,652,616,658,218,000 | 28.736264 | 77 | 0.601811 | false | 3.598404 | false | false | false |
ederfmartins/spojrec | crawler/util.py | 1 | 1390 | # -*- coding: utf-8 -*-
import sys
from lxml.html import parse
from lxml.html import tostring
from urllib2 import urlopen
from constants import SPOJ_URLS
from crawler.dataExtractor.extractor import extract_problem_data, extract_user_data, extract_submissions_data
from crawler.dataExtractor.signedlistParser import pars... | apache-2.0 | 4,539,961,427,479,909,000 | 28.574468 | 109 | 0.735252 | false | 2.963753 | true | false | false |
kriberg/stationspinner | stationspinner/corporation/views.py | 1 | 1853 | from django.core.cache import cache
from rest_framework import viewsets, views
from rest_framework.response import Response
from stationspinner.corporation.serializers import CorporationSheetSerializer, \
CorporationSheetListSerializer
from stationspinner.corporation.models import CorporationSheet, Asset
from stati... | agpl-3.0 | 6,093,940,278,719,828,000 | 36.08 | 93 | 0.678359 | false | 4.620948 | false | false | false |
shortbloke/home_assistant_config | custom_components/badnest/sensor.py | 1 | 3535 | import logging
from homeassistant.helpers.entity import Entity
from .const import DOMAIN
from homeassistant.const import (
ATTR_BATTERY_LEVEL,
DEVICE_CLASS_TEMPERATURE,
TEMP_CELSIUS
)
_LOGGER = logging.getLogger(__name__)
PROTECT_SENSOR_TYPES = [
"co_status",
"smoke_status",
"battery_health... | mit | -9,035,979,061,422,722,000 | 27.28 | 79 | 0.612164 | false | 4.105691 | false | false | false |
crateio/crate.web | crate/web/packages/admin.py | 1 | 3016 | from django.contrib import admin
from crate.web.packages.models import Package, Release, ReleaseFile, TroveClassifier, PackageURI
from crate.web.packages.models import ReleaseRequire, ReleaseProvide, ReleaseObsolete, ReleaseURI, ChangeLog
from crate.web.packages.models import DownloadDelta, ReadTheDocsPackageSlug
cl... | bsd-2-clause | -2,653,288,676,220,985,000 | 32.142857 | 150 | 0.718833 | false | 3.793711 | false | false | false |
Nic30/hwtHls | hwtHls/hls.py | 1 | 9330 | from hwt.code import If
from hwt.hdl.assignment import Assignment
from hwt.hdl.operator import Operator
from hwt.hdl.types.defs import BIT
from hwt.hdl.types.struct import HStruct
from hwt.hdl.value import HValue
from hwt.synthesizer.interfaceLevel.unitImplHelpers import getSignalName
from hwt.synthesizer.rtlLevel.netl... | mit | -8,524,985,038,770,063,000 | 29.390879 | 88 | 0.601393 | false | 3.872976 | false | false | false |
Pikecillo/genna | external/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/dc_20001112.py | 1 | 1722 | #David Carlisle <davidc@nag.co.uk> plays nifty tricks with xsl:key
from Xml.Xslt import test_harness
sheet_1 = """<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
>
<xsl:output method="xml" indent="yes"/>
<xsl:key name="items-by-itemid"
match="i... | gpl-2.0 | 5,069,500,956,196,828,000 | 21.96 | 78 | 0.546458 | false | 2.707547 | true | false | false |
jrief/django-websocket-redis | ws4redis/wsgi_server.py | 2 | 8452 | # -*- coding: utf-8 -*-
import sys
import logging
import six
from six.moves import http_client
from redis import StrictRedis
import django
if django.VERSION[:2] >= (1, 7):
django.setup()
from django.conf import settings
from django.contrib.auth import get_user
from django.core.handlers.wsgi import WSGIRequest
from... | mit | -7,399,043,440,575,994,000 | 46.217877 | 125 | 0.624823 | false | 4.544086 | false | false | false |
ScholarTools/crossref_api_python | crossref/utils.py | 1 | 3636 | # -*- coding: utf-8 -*-
"""
#TODO: break out display utils to another module
"""
def display_class(class_instance,pv,method_pv=None):
#TODO: Handle methods
return ('%s:\n' % type(class_instance)
+ property_values_to_string(pv,extra_indentation=4))
def float_or_none_to_string(x):
if ... | mit | 4,563,937,675,081,014,000 | 27.865079 | 91 | 0.578383 | false | 3.831401 | false | false | false |
tensorflow/probability | tensorflow_probability/python/optimizer/convergence_criteria/convergence_criterion.py | 1 | 6013 | # Copyright 2019 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 3,939,581,093,718,065,700 | 43.540741 | 80 | 0.695659 | false | 4.213735 | false | false | false |
night-crawler/rfnumplan | admin.py | 1 | 1304 | # -*- coding: utf-8 -*-
from django.contrib import admin
from .models import Operator, Region, NumberingPlan, NumberingPlanRange
class OperatorAdmin(admin.ModelAdmin):
list_display = ('id', 'name')
search_fields = ('name',)
admin.site.register(Operator, OperatorAdmin)
class RegionAdmin(admin.ModelAdmin):
... | mit | 8,253,701,673,165,946,000 | 24.568627 | 110 | 0.636503 | false | 3.7151 | false | false | false |
ellipsis14/dolfin-adjoint | timestepping/python/timestepping/fenics_overrides.py | 1 | 8590 | #!/usr/bin/env python2
# Copyright (C) 2011-2012 by Imperial College London
# Copyright (C) 2013 University of Oxford
# Copyright (C) 2014 University of Edinburgh
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the... | lgpl-3.0 | -8,315,689,074,679,420,000 | 29.569395 | 117 | 0.687311 | false | 3.618366 | true | false | false |
Codophile1/exide | exide/beamer_parser.py | 1 | 10947 | #!/usr/bin/python
#-*- coding: utf-8 -*-
import re, os
from datatypes.Section import Section
from datatypes.Slide import Slide
from datatypes.Presentation import Presentation
from parser_utils import get_named_entities, get_urls, get_slide_type
def parse_beamer(path):
"""
Transform a beamer tex file into a |... | lgpl-3.0 | -4,131,205,162,821,350,400 | 37.396491 | 120 | 0.538061 | false | 3.305044 | false | false | false |
mwilliamson/mayo | mayo/git.py | 1 | 1623 | from .util import run
class Git(object):
name = "git"
directory_name = ".git"
default_branch = "origin/master"
def clone(self, repository_uri, local_path):
_git(["clone", repository_uri, local_path])
return GitRepository(local_path)
def local_repo(self, working_direct... | bsd-2-clause | 113,674,665,099,766,480 | 29.055556 | 110 | 0.579791 | false | 3.92029 | false | false | false |
wek32/strava-club-ytd | extract_group_members.py | 1 | 1936 | '''
Strava club information is not publicly available. To get the club information
the club owner needs to be logged in. This script takes the HTML file of the
strava club page and extracts all the users/athletes.
'''
from bs4 import BeautifulSoup
import argparse
def get_group_members_from_html(html_in):
... | mit | -9,072,809,590,587,582,000 | 36.84 | 110 | 0.558368 | false | 3.895372 | false | false | false |
ej2/pixelpuncher | pixelpuncher/game/utils/skills.py | 1 | 1870 | from pixelpuncher.game.utils.message import add_game_message
from pixelpuncher.game.utils.messages import learned_skill_message
from pixelpuncher.player.models import PlayerSkill, Skill
def add_starting_skills(player):
skills = Skill.objects.filter(level=1)
for skill in skills:
create_player_skill(pl... | bsd-3-clause | -6,737,431,803,133,636,000 | 33.62963 | 87 | 0.720856 | false | 3.424908 | false | false | false |
RichDijk/eXe | exe/webui/editorpane.py | 1 | 19032 | # ===========================================================================
# eXe
# Copyright 2004-2006, University of Auckland
#
# 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... | gpl-2.0 | 3,098,465,449,447,214,600 | 42.852535 | 101 | 0.513661 | false | 4.274933 | false | false | false |
xcellerator/wifi_harvester | upload.py | 1 | 1335 | #!/usr/bin/python2.7
# Part of the WiFi Harvester project.
# AUTHOR: Harvey Phillips
# Project Home: https://github.com/xcellerator/wifi_harvester
# Released under GPL v2
import csv
import sys
import requests
if ( len(sys.argv) != 2 ):
print ("Usage: " + str(sys.argv[0]) + " <kismet csv>")
exit
else:
file = str(s... | gpl-2.0 | -3,401,414,217,709,408,000 | 24.673077 | 127 | 0.612734 | false | 2.50469 | false | false | false |
couchbaselabs/couchbase-cli | collector.py | 1 | 10474 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import traceback
import copy
import listservers
import buckets
import info
import util_cli as util
import cb_bin_client
import stats_buffer
class StatsCollector:
def __init__(self, log):
self.log = log
def seg(self, k, v):
# Parse ('some_... | apache-2.0 | 800,728,694,057,473,400 | 44.341991 | 115 | 0.531316 | false | 4.138285 | false | false | false |
ariloulaleelay/wrflow | wrflow/model/dag.py | 1 | 4111 | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, String, DateTime, Integer, Boolean
from sqlalchemy import orm
from json import loads as json_loads
from json import dumps as json_dumps
from wrflow.common import hash_dict, hash_list
Base = declarative_base()
__all__ = [
'Node... | gpl-2.0 | 4,163,380,599,301,173,000 | 29.227941 | 92 | 0.584529 | false | 3.941515 | false | false | false |
kubeflow/pipelines | components/gcp/container/component_sdk/python/kfp_component/google/dataflow/_launch_template.py | 1 | 3920 | # Copyright 2018 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | -3,260,293,467,452,129,300 | 41.150538 | 96 | 0.650255 | false | 4.024641 | false | false | false |
saiamrit/dora-s-nos | vpythonex.py | 1 | 4401 | """
This is an example for vpython
you need to install vpython to run this code.
"""
from vpython import *
# Bruce Sherwood
N = 3 # N by N by N array of atoms
# Surrounding the N**3 atoms is another layer of invisible fixed-position atoms
# that provide stability to the lattice.
k = 1
m = 1
spacing = 1
atom_radius = ... | mpl-2.0 | 2,712,751,095,923,883,000 | 40.518868 | 89 | 0.548512 | false | 3.446359 | false | false | false |
mogproject/artifact-cli | src/artifactcli/artifact/fileinfo.py | 1 | 2185 | import os
import time
import socket
import getpass
from datetime import datetime
import dateutil.parser
from .baseinfo import BaseInfo
from artifactcli.util import *
class FileInfo(BaseInfo):
keys = ['host', 'user', 'size', 'mtime', 'md5']
def __init__(self, host, user, size, mtime, md5):
super(FileI... | apache-2.0 | -2,693,232,162,032,509,000 | 27.75 | 105 | 0.516247 | false | 3.496 | false | false | false |
stemchan/smartclip | main/auth.py | 1 | 2328 | import os
from cStringIO import StringIO
from django.conf import settings
from django.template.loader import get_template
from django.template import Context
from wkhtmltopdf.utils import wkhtmltopdf
from django.contrib.auth import login
from django.contrib.auth.models import User
import smartfile
from smartclip impor... | gpl-3.0 | 3,221,612,337,584,908,300 | 35.952381 | 77 | 0.631443 | false | 3.803922 | false | false | false |
Azure/azure-sdk-for-python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2018_02_01/models/_models_py3.py | 1 | 92077 | # 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 | 8,378,640,038,500,191,000 | 39.173211 | 140 | 0.638759 | false | 3.955367 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.